` | | `9090` | Which port web server should listen for requests on. |
@@ -109,6 +114,7 @@ overridden on a per-prompt basis (see
| Argument | Shortcut | Default | Description |
|--------------------|------------|---------------------|--------------|
+ | `--full_precision` | | `False` | Same as `--precision=fp32`|
| `--weights ` | | `None` | Path to weights file; use `--model stable-diffusion-1.4` instead |
| `--laion400m` | `-l` | `False` | Use older LAION400m weights; use `--model=laion400m` instead |
@@ -336,8 +342,10 @@ useful for debugging the text masking process prior to inpainting with the
### Model selection and importation
-The CLI allows you to add new models on the fly, as well as to switch among them
-rapidly without leaving the script.
+The CLI allows you to add new models on the fly, as well as to switch
+among them rapidly without leaving the script. There are several
+different model formats, each described in the [Model Installation
+Guide](../installation/050_INSTALLING_MODELS.md).
#### `!models`
@@ -347,9 +355,9 @@ model is bold-faced
Example:
-laion400m not loaded
-stable-diffusion-1.4 active Stable Diffusion v1.4
-waifu-diffusion not loaded Waifu Diffusion v1.3
+inpainting-1.5 not loaded Stable Diffusion inpainting model
+stable-diffusion-1.5 active Stable Diffusion v1.5
+waifu-diffusion not loaded Waifu Diffusion v1.4
#### `!switch `
@@ -361,43 +369,30 @@ Note how the second column of the `!models` table changes to `cached` after a
model is first loaded, and that the long initialization step is not needed when
loading a cached model.
-
-invoke> !models
-laion400m not loaded
-stable-diffusion-1.4 cached Stable Diffusion v1.4
-waifu-diffusion active Waifu Diffusion v1.3
+#### `!import_model `
-invoke> !switch waifu-diffusion
->> Caching model stable-diffusion-1.4 in system RAM
->> Loading waifu-diffusion from models/ldm/stable-diffusion-v1/model-epoch08-float16.ckpt
- | LatentDiffusion: Running in eps-prediction mode
- | DiffusionWrapper has 859.52 M params.
- | Making attention of type 'vanilla' with 512 in_channels
- | Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
- | Making attention of type 'vanilla' with 512 in_channels
- | Using faster float16 precision
->> Model loaded in 18.24s
->> Max VRAM used to load the model: 2.17G
->> Current VRAM usage:2.17G
->> Setting Sampler to k_lms
+This imports and installs a `diffusers`-style model that is stored on
+the [HuggingFace Web Site](https://huggingface.co). You can look up
+any [Stable Diffusion diffusers
+model](https://huggingface.co/models?library=diffusers) and install it
+with a command like the following:
-invoke> !models
-laion400m not loaded
-stable-diffusion-1.4 cached Stable Diffusion v1.4
-waifu-diffusion active Waifu Diffusion v1.3
+```bash
+!import_model prompthero/openjourney
+```
-invoke> !switch stable-diffusion-1.4
->> Caching model waifu-diffusion in system RAM
->> Retrieving model stable-diffusion-1.4 from system RAM cache
->> Setting Sampler to k_lms
+#### `!import_model `
-invoke> !models
-laion400m not loaded
-stable-diffusion-1.4 active Stable Diffusion v1.4
-waifu-diffusion cached Waifu Diffusion v1.3
-
+If you have a copy of a `diffusers`-style model saved to disk, you can
+import it by passing the path to model's top-level directory.
-#### `!import_model `
+#### `!import_model `
+
+For a `.ckpt` or `.safetensors` file, if you have a direct download
+URL for the file, you can provide it to `!import_model` and the file
+will be downloaded and installed for you.
+
+#### `!import_model `
This command imports a new model weights file into InvokeAI, makes it available
for image generation within the script, and writes out the configuration for the
@@ -417,35 +412,12 @@ below, the bold-faced text shows what the user typed in with the exception of
the width, height and configuration file paths, which were filled in
automatically.
-Example:
+#### `!import_model `
-
-invoke> !import_model models/ldm/stable-diffusion-v1/model-epoch08-float16.ckpt
->> Model import in process. Please enter the values needed to configure this model:
-
-Name for this model: waifu-diffusion
-Description of this model: Waifu Diffusion v1.3
-Configuration file for this model: configs/stable-diffusion/v1-inference.yaml
-Default image width: 512
-Default image height: 512
->> New configuration:
-waifu-diffusion:
- config: configs/stable-diffusion/v1-inference.yaml
- description: Waifu Diffusion v1.3
- height: 512
- weights: models/ldm/stable-diffusion-v1/model-epoch08-float16.ckpt
- width: 512
-OK to import [n]? y
->> Caching model stable-diffusion-1.4 in system RAM
->> Loading waifu-diffusion from models/ldm/stable-diffusion-v1/model-epoch08-float16.ckpt
- | LatentDiffusion: Running in eps-prediction mode
- | DiffusionWrapper has 859.52 M params.
- | Making attention of type 'vanilla' with 512 in_channels
- | Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
- | Making attention of type 'vanilla' with 512 in_channels
- | Using faster float16 precision
-invoke>
-
+If you provide the path of a directory that contains one or more
+`.ckpt` or `.safetensors` files, the CLI will scan the directory and
+interactively offer to import the models it finds there. Also see the
+`--autoconvert` command-line option.
#### `!edit_model `
@@ -479,11 +451,6 @@ OK to import [n]? y
...
-======= invoke> !fix 000017.4829112.gfpgan-00.png --embiggen 3 ...lots of
-text... Outputs: [2] outputs/img-samples/000018.2273800735.embiggen-00.png: !fix
-"outputs/img-samples/000017.243781548.gfpgan-00.png" -s 50 -S 2273800735 -W 512
--H 512 -C 7.5 -A k_lms --embiggen 3.0 0.75 0.25 ```
-
### History processing
The CLI provides a series of convenient commands for reviewing previous actions,
diff --git a/docs/features/IMG2IMG.md b/docs/features/IMG2IMG.md
index b35fd71de0..fffba05f1b 100644
--- a/docs/features/IMG2IMG.md
+++ b/docs/features/IMG2IMG.md
@@ -4,13 +4,24 @@ title: Image-to-Image
# :material-image-multiple: Image-to-Image
-## `img2img`
+Both the Web and command-line interfaces provide an "img2img" feature
+that lets you seed your creations with an initial drawing or
+photo. This is a really cool feature that tells stable diffusion to
+build the prompt on top of the image you provide, preserving the
+original's basic shape and layout.
-This script also provides an `img2img` feature that lets you seed your creations
-with an initial drawing or photo. This is a really cool feature that tells
-stable diffusion to build the prompt on top of the image you provide, preserving
-the original's basic shape and layout. To use it, provide the `--init_img`
-option as shown here:
+See the [WebUI Guide](WEB.md) for a walkthrough of the img2img feature
+in the InvokeAI web server. This document describes how to use img2img
+in the command-line tool.
+
+## Basic Usage
+
+Launch the command-line client by launching `invoke.sh`/`invoke.bat`
+and choosing option (1). Alternative, activate the InvokeAI
+environment and issue the command `invokeai`.
+
+Once the `invoke> ` prompt appears, you can start an img2img render by
+pointing to a seed file with the `-I` option as shown here:
!!! example ""
diff --git a/docs/features/TEXTUAL_INVERSION.md b/docs/features/TEXTUAL_INVERSION.md
index 48a4388f28..d472d04efa 100644
--- a/docs/features/TEXTUAL_INVERSION.md
+++ b/docs/features/TEXTUAL_INVERSION.md
@@ -54,8 +54,7 @@ Please enter 1, 2, 3, or 4: [1] 3
```
From the command line, with the InvokeAI virtual environment active,
-you can launch the front end with the command `textual_inversion
---gui`.
+you can launch the front end with the command `invokeai-ti --gui`.
This will launch a text-based front end that will look like this:
@@ -227,12 +226,12 @@ It accepts a large number of arguments, which can be summarized by
passing the `--help` argument:
```sh
-textual_inversion --help
+invokeai-ti --help
```
Typical usage is shown here:
```sh
-textual_inversion \
+invokeai-ti \
--model=stable-diffusion-1.5 \
--resolution=512 \
--learnable_property=style \
@@ -267,4 +266,4 @@ resources:
---
-copyright (c) 2023, Lincoln Stein and the InvokeAI Development Team
\ No newline at end of file
+copyright (c) 2023, Lincoln Stein and the InvokeAI Development Team
diff --git a/docs/features/WEB.md b/docs/features/WEB.md
index c6f4d3d387..b904f147b4 100644
--- a/docs/features/WEB.md
+++ b/docs/features/WEB.md
@@ -5,11 +5,14 @@ title: InvokeAI Web Server
# :material-web: InvokeAI Web Server
As of version 2.0.0, this distribution comes with a full-featured web server
-(see screenshot). To use it, run the `invoke.py` script by adding the `--web`
-option:
+(see screenshot).
+
+To use it, launch the `invoke.sh`/`invoke.bat` script and select
+option (2). Alternatively, with the InvokeAI environment active, run
+the `invokeai` script by adding the `--web` option:
```bash
-(invokeai) ~/InvokeAI$ python3 scripts/invoke.py --web
+invokeai --web
```
You can then connect to the server by pointing your web browser at
@@ -19,17 +22,23 @@ address of the host you are running it on, or the wildcard `0.0.0.0`. For
example:
```bash
-(invokeai) ~/InvokeAI$ python3 scripts/invoke.py --web --host 0.0.0.0
+invoke.sh --host 0.0.0.0
```
-## Quick guided walkthrough of the WebGUI's features
+or
-While most of the WebGUI's features are intuitive, here is a guided walkthrough
+```bash
+invokeai --web --host 0.0.0.0
+```
+
+## Quick guided walkthrough of the WebUI's features
+
+While most of the WebUI's features are intuitive, here is a guided walkthrough
through its various components.
{:width="640px"}
-The screenshot above shows the Text to Image tab of the WebGUI. There are three
+The screenshot above shows the Text to Image tab of the WebUI. There are three
main sections:
1. A **control panel** on the left, which contains various settings for text to
@@ -63,12 +72,14 @@ From top to bottom, these are:
1. Text to Image - generate images from text
2. Image to Image - from an uploaded starting image (drawing or photograph)
generate a new one, modified by the text prompt
-3. Inpainting (pending) - Interactively erase portions of a starting image and
- have the AI fill in the erased region from a text prompt.
-4. Outpainting (pending) - Interactively add blank space to the borders of a
- starting image and fill in the background from a text prompt.
-5. Postprocessing (pending) - Interactively postprocess generated images using a
- variety of filters.
+3. Unified Canvas - Interactively combine multiple images, extend them
+ with outpainting,and modify interior portions of the image with
+ inpainting, erase portions of a starting image and have the AI fill in
+ the erased region from a text prompt.
+4. Workflow Management (not yet implemented) - this panel will allow you to create
+ pipelines of common operations and combine them into workflows.
+5. Training (not yet implemented) - this panel will provide an interface to [textual
+ inversion training](TEXTUAL_INVERSION.md) and fine tuning.
The inpainting, outpainting and postprocessing tabs are currently in
development. However, limited versions of their features can already be accessed
@@ -76,18 +87,18 @@ through the Text to Image and Image to Image tabs.
## Walkthrough
-The following walkthrough will exercise most (but not all) of the WebGUI's
+The following walkthrough will exercise most (but not all) of the WebUI's
feature set.
### Text to Image
-1. Launch the WebGUI using `python scripts/invoke.py --web` and connect to it
+1. Launch the WebUI using `python scripts/invoke.py --web` and connect to it
with your browser by accessing `http://localhost:9090`. If the browser and
server are running on different machines on your LAN, add the option
`--host 0.0.0.0` to the launch command line and connect to the machine
hosting the web server using its IP address or domain name.
-2. If all goes well, the WebGUI should come up and you'll see a green
+2. If all goes well, the WebUI should come up and you'll see a green
`connected` message on the upper right.
#### Basics
@@ -234,7 +245,7 @@ walkthrough.
2. Drag-and-drop the Lincoln-and-Parrot image into the Image panel, or click
the blank area to get an upload dialog. The image will load into an area
- marked _Initial Image_. (The WebGUI will also load the most
+ marked _Initial Image_. (The WebUI will also load the most
recently-generated image from the gallery into a section on the left, but
this image will be replaced in the next step.)
@@ -284,13 +295,17 @@ initial image" icons are located.
{:width="640px"}
+### Unified Canvas
+
+See the [Unified Canvas Guide](UNIFIED_CANVAS.md)
+
## Parting remarks
This concludes the walkthrough, but there are several more features that you can
explore. Please check out the [Command Line Interface](CLI.md) documentation for
further explanation of the advanced features that were not covered here.
-The WebGUI is only rapid development. Check back regularly for updates!
+The WebUI is only rapid development. Check back regularly for updates!
## Reference
diff --git a/docs/features/index.md b/docs/features/index.md
index 42d855c643..d9b0e1fd7c 100644
--- a/docs/features/index.md
+++ b/docs/features/index.md
@@ -2,4 +2,62 @@
title: Overview
---
-Here you can find the documentation for different features.
+Here you can find the documentation for InvokeAI's various features.
+
+## The Basics
+### * The [Web User Interface](WEB.md)
+Guide to the Web interface. Also see the [WebUI Hotkeys Reference Guide](WEBUIHOTKEYS.md)
+
+### * The [Unified Canvas](UNIFIED_CANVAS.md)
+Build complex scenes by combine and modifying multiple images in a stepwise
+fashion. This feature combines img2img, inpainting and outpainting in
+a single convenient digital artist-optimized user interface.
+
+### * The [Command Line Interface (CLI)](CLI.md)
+Scriptable access to InvokeAI's features.
+
+## Image Generation
+### * [Prompt Engineering](PROMPTS.md)
+Get the images you want with the InvokeAI prompt engineering language.
+
+## * [Post-Processing](POSTPROCESS.md)
+Restore mangled faces and make images larger with upscaling. Also see the [Embiggen Upscaling Guide](EMBIGGEN.md).
+
+## * The [Concepts Library](CONCEPTS.md)
+Add custom subjects and styles using HuggingFace's repository of embeddings.
+
+### * [Image-to-Image Guide for the CLI](IMG2IMG.md)
+Use a seed image to build new creations in the CLI.
+
+### * [Inpainting Guide for the CLI](INPAINTING.md)
+Selectively erase and replace portions of an existing image in the CLI.
+
+### * [Outpainting Guide for the CLI](OUTPAINTING.md)
+Extend the borders of the image with an "outcrop" function within the CLI.
+
+### * [Generating Variations](VARIATIONS.md)
+Have an image you like and want to generate many more like it? Variations
+are the ticket.
+
+## Model Management
+
+## * [Model Installation](../installation/050_INSTALLING_MODELS.md)
+Learn how to import third-party models and switch among them. This
+guide also covers optimizing models to load quickly.
+
+## * [Merging Models](MODEL_MERGING.md)
+Teach an old model new tricks. Merge 2-3 models together to create a
+new model that combines characteristics of the originals.
+
+## * [Textual Inversion](TEXTUAL_INVERSION.md)
+Personalize models by adding your own style or subjects.
+
+# Other Features
+
+## * [The NSFW Checker](NSFW.md)
+Prevent InvokeAI from displaying unwanted racy images.
+
+## * [Miscellaneous](OTHER.md)
+Run InvokeAI on Google Colab, generate images with repeating patterns,
+batch process a file of prompts, increase the "creativity" of image
+generation by adding initial noise, and more!
diff --git a/docs/help/TROUBLESHOOT.md b/docs/help/deprecated/TROUBLESHOOT.md
similarity index 100%
rename from docs/help/TROUBLESHOOT.md
rename to docs/help/deprecated/TROUBLESHOOT.md
diff --git a/docs/index.md b/docs/index.md
index e20535d591..4587b08f18 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -81,28 +81,6 @@ Q&A]
This fork is rapidly evolving. Please use the [Issues tab](https://github.com/invoke-ai/InvokeAI/issues) to report bugs and make feature requests. Be sure to use the provided templates. They will help aid diagnose issues faster.
-## :octicons-package-dependencies-24: Installation
-
-This fork is supported across Linux, Windows and Macintosh. Linux users can use
-either an Nvidia-based card (with CUDA support) or an AMD card (using the ROCm
-driver).
-
-First time users, please see
-[Automated Installer](installation/INSTALL_AUTOMATED.md) for a walkthrough of
-getting InvokeAI up and running on your system. For alternative installation and
-upgrade instructions, please see:
-[InvokeAI Installation Overview](installation/)
-
-Users who wish to make use of the **PyPatchMatch** inpainting functions
-will need to perform a bit of extra work to enable this
-module. Instructions can be found at [Installing
-PyPatchMatch](installation/060_INSTALL_PATCHMATCH.md).
-
-If you have an NVIDIA card, you can benefit from the significant
-memory savings and performance benefits provided by Facebook Lab's
-**xFormers** module. Instructions for Linux and Windows users can be found
-at [Installing xFormers](installation/070_INSTALL_XFORMERS.md).
-
## :fontawesome-solid-computer: Hardware Requirements
### :octicons-cpu-24: System
@@ -122,141 +100,146 @@ images in full-precision mode:
- GTX 1650 series cards
- GTX 1660 series cards
-### :fontawesome-solid-memory: Memory
+### :fontawesome-solid-memory: Memory and Disk
- At least 12 GB Main Memory RAM.
-
-### :fontawesome-regular-hard-drive: Disk
-
- At least 18 GB of free disk space for the machine learning model, Python, and
all its dependencies.
-!!! info
+## :octicons-package-dependencies-24: Installation
- Precision is auto configured based on the device. If however you encounter errors like
- `expected type Float but found Half` or `not implemented for Half` you can try starting
- `invoke.py` with the `--precision=float32` flag:
+This fork is supported across Linux, Windows and Macintosh. Linux users can use
+either an Nvidia-based card (with CUDA support) or an AMD card (using the ROCm
+driver).
- ```bash
- (invokeai) ~/InvokeAI$ python scripts/invoke.py --full_precision
- ```
+### [Installation Getting Started Guide](installation)
+#### [Automated Installer](installation/010_INSTALL_AUTOMATED.md)
+This method is recommended for 1st time users
+#### [Manual Installation](installation/020_INSTALL_MANUAL.md)
+This method is recommended for experienced users and developers
+#### [Docker Installation](installation/040_INSTALL_DOCKER.md)
+This method is recommended for those familiar with running Docker containers
+### Other Installation Guides
+ - [PyPatchMatch](installation/060_INSTALL_PATCHMATCH.md)
+ - [XFormers](installation/070_INSTALL_XFORMERS.md)
+ - [CUDA and ROCm Drivers](installation/030_INSTALL_CUDA_AND_ROCM.md)
+ - [Installing New Models](installation/050_INSTALLING_MODELS.md)
## :octicons-gift-24: InvokeAI Features
-- [The InvokeAI Web Interface](features/WEB.md) -
-[WebGUI hotkey reference guide](features/WEBUIHOTKEYS.md) -
-[WebGUI Unified Canvas for Img2Img, inpainting and outpainting](features/UNIFIED_CANVAS.md)
-
-- [The Command Line Interace](features/CLI.md) -
-[Image2Image](features/IMG2IMG.md) - [Inpainting](features/INPAINTING.md) -
-[Outpainting](features/OUTPAINTING.md) -
-[Adding custom styles and subjects](features/CONCEPTS.md) -
-[Upscaling and Face Reconstruction](features/POSTPROCESS.md)
-
-- [Generating Variations](features/VARIATIONS.md)
-
-- [Prompt Engineering](features/PROMPTS.md)
-
+### The InvokeAI Web Interface
+- [WebUI overview](features/WEB.md)
+- [WebUI hotkey reference guide](features/WEBUIHOTKEYS.md)
+- [WebUI Unified Canvas for Img2Img, inpainting and outpainting](features/UNIFIED_CANVAS.md)
+
+### The InvokeAI Command Line Interface
+- [Command Line Interace Reference Guide](features/CLI.md)
+
+### Image Management
+- [Image2Image](features/IMG2IMG.md)
+- [Inpainting](features/INPAINTING.md)
+- [Outpainting](features/OUTPAINTING.md)
+- [Adding custom styles and subjects](features/CONCEPTS.md)
+- [Upscaling and Face Reconstruction](features/POSTPROCESS.md)
+- [Embiggen upscaling](features/EMBIGGEN.md)
+- [Other Features](features/OTHER.md)
+
+
+### Model Management
+- [Installing](installation/050_INSTALLING_MODELS.md)
- [Model Merging](features/MODEL_MERGING.md)
+- [Style/Subject Concepts and Embeddings](features/CONCEPTS.md)
+- [Textual Inversion](features/TEXTUAL_INVERSION.md)
+- [Not Safe for Work (NSFW) Checker](features/NSFW.md)
-- Miscellaneous
- - [NSFW Checker](features/NSFW.md)
- - [Embiggen upscaling](features/EMBIGGEN.md)
- - [Other](features/OTHER.md)
+### Prompt Engineering
+- [Prompt Syntax](features/PROMPTS.md)
+- [Generating Variations](features/VARIATIONS.md)
## :octicons-log-16: Latest Changes
-### v2.2.4 (11 December 2022)
+### v2.3.0 (9 February 2023)
-#### the `invokeai` directory
+#### Migration to Stable Diffusion `diffusers` models
-Previously there were two directories to worry about, the directory that
-contained the InvokeAI source code and the launcher scripts, and the `invokeai`
-directory that contained the models files, embeddings, configuration and
-outputs. With the 2.2.4 release, this dual system is done away with, and
-everything, including the `invoke.bat` and `invoke.sh` launcher scripts, now
-live in a directory named `invokeai`. By default this directory is located in
-your home directory (e.g. `\Users\yourname` on Windows), but you can select
-where it goes at install time.
+Previous versions of InvokeAI supported the original model file format introduced with Stable Diffusion 1.4. In the original format, known variously as "checkpoint", or "legacy" format, there is a single large weights file ending with `.ckpt` or `.safetensors`. Though this format has served the community well, it has a number of disadvantages, including file size, slow loading times, and a variety of non-standard variants that require special-case code to handle. In addition, because checkpoint files are actually a bundle of multiple machine learning sub-models, it is hard to swap different sub-models in and out, or to share common sub-models. A new format, introduced by the StabilityAI company in collaboration with HuggingFace, is called `diffusers` and consists of a directory of individual models. The most immediate benefit of `diffusers` is that they load from disk very quickly. A longer term benefit is that in the near future `diffusers` models will be able to share common sub-models, dramatically reducing disk space when you have multiple fine-tune models derived from the same base.
-After installation, you can delete the install directory (the one that the zip
-file creates when it unpacks). Do **not** delete or move the `invokeai`
-directory!
+When you perform a new install of version 2.3.0, you will be offered the option to install the `diffusers` versions of a number of popular SD models, including Stable Diffusion versions 1.5 and 2.1 (including the 768x768 pixel version of 2.1). These will act and work just like the checkpoint versions. Do not be concerned if you already have a lot of ".ckpt" or ".safetensors" models on disk! InvokeAI 2.3.0 can still load these and generate images from them without any extra intervention on your part.
-##### Initialization file `invokeai/invokeai.init`
+To take advantage of the optimized loading times of `diffusers` models, InvokeAI offers options to convert legacy checkpoint models into optimized `diffusers` models. If you use the `invokeai` command line interface, the relevant commands are:
-You can place frequently-used startup options in this file, such as the default
-number of steps or your preferred sampler. To keep everything in one place, this
-file has now been moved into the `invokeai` directory and is named
-`invokeai.init`.
+* `!convert_model` -- Take the path to a local checkpoint file or a URL that is pointing to one, convert it into a `diffusers` model, and import it into InvokeAI's models registry file.
+* `!optimize_model` -- If you already have a checkpoint model in your InvokeAI models file, this command will accept its short name and convert it into a like-named `diffusers` model, optionally deleting the original checkpoint file.
+* `!import_model` -- Take the local path of either a checkpoint file or a `diffusers` model directory and import it into InvokeAI's registry file. You may also provide the ID of any diffusers model that has been published on the [HuggingFace models repository](https://huggingface.co/models?pipeline_tag=text-to-image&sort=downloads) and it will be downloaded and installed automatically.
-#### To update from Version 2.2.3
+The WebGUI offers similar functionality for model management.
-The easiest route is to download and unpack one of the 2.2.4 installer files.
-When it asks you for the location of the `invokeai` runtime directory, respond
-with the path to the directory that contains your 2.2.3 `invokeai`. That is, if
-`invokeai` lives at `C:\Users\fred\invokeai`, then answer with `C:\Users\fred`
-and answer "Y" when asked if you want to reuse the directory.
+For advanced users, new command-line options provide additional functionality. Launching `invokeai` with the argument `--autoconvert ` takes the path to a directory of checkpoint files, automatically converts them into `diffusers` models and imports them. Each time the script is launched, the directory will be scanned for new checkpoint files to be loaded. Alternatively, the `--ckpt_convert` argument will cause any checkpoint or safetensors model that is already registered with InvokeAI to be converted into a `diffusers` model on the fly, allowing you to take advantage of future diffusers-only features without explicitly converting the model and saving it to disk.
-The `update.sh` (`update.bat`) script that came with the 2.2.3 source installer
-does not know about the new directory layout and won't be fully functional.
+Please see [INSTALLING MODELS](https://invoke-ai.github.io/InvokeAI/installation/050_INSTALLING_MODELS/) for more information on model management in both the command-line and Web interfaces.
-#### To update to 2.2.5 (and beyond) there's now an update path.
+#### Support for the `XFormers` Memory-Efficient Crossattention Package
-As they become available, you can update to more recent versions of InvokeAI
-using an `update.sh` (`update.bat`) script located in the `invokeai` directory.
-Running it without any arguments will install the most recent version of
-InvokeAI. Alternatively, you can get set releases by running the `update.sh`
-script with an argument in the command shell. This syntax accepts the path to
-the desired release's zip file, which you can find by clicking on the green
-"Code" button on this repository's home page.
+On CUDA (Nvidia) systems, version 2.3.0 supports the `XFormers` library. Once installed, the`xformers` package dramatically reduces the memory footprint of loaded Stable Diffusion models files and modestly increases image generation speed. `xformers` will be installed and activated automatically if you specify a CUDA system at install time.
-#### Other 2.2.4 Improvements
+The caveat with using `xformers` is that it introduces slightly non-deterministic behavior, and images generated using the same seed and other settings will be subtly different between invocations. Generally the changes are unnoticeable unless you rapidly shift back and forth between images, but to disable `xformers` and restore fully deterministic behavior, you may launch InvokeAI using the `--no-xformers` option. This is most conveniently done by opening the file `invokeai/invokeai.init` with a text editor, and adding the line `--no-xformers` at the bottom.
-- Fix InvokeAI GUI initialization by @addianto in #1687
-- fix link in documentation by @lstein in #1728
-- Fix broken link by @ShawnZhong in #1736
-- Remove reference to binary installer by @lstein in #1731
-- documentation fixes for 2.2.3 by @lstein in #1740
-- Modify installer links to point closer to the source installer by @ebr in
- #1745
-- add documentation warning about 1650/60 cards by @lstein in #1753
-- Fix Linux source URL in installation docs by @andybearman in #1756
-- Make install instructions discoverable in readme by @damian0815 in #1752
-- typo fix by @ofirkris in #1755
-- Non-interactive model download (support HUGGINGFACE_TOKEN) by @ebr in #1578
-- fix(srcinstall): shell installer - cp scripts instead of linking by @tildebyte
- in #1765
-- stability and usage improvements to binary & source installers by @lstein in
- #1760
-- fix off-by-one bug in cross-attention-control by @damian0815 in #1774
-- Eventually update APP_VERSION to 2.2.3 by @spezialspezial in #1768
-- invoke script cds to its location before running by @lstein in #1805
-- Make PaperCut and VoxelArt models load again by @lstein in #1730
-- Fix --embedding_directory / --embedding_path not working by @blessedcoolant in
- #1817
-- Clean up readme by @hipsterusername in #1820
-- Optimized Docker build with support for external working directory by @ebr in
- #1544
-- disable pushing the cloud container by @mauwii in #1831
-- Fix docker push github action and expand with additional metadata by @ebr in
- #1837
-- Fix Broken Link To Notebook by @VedantMadane in #1821
-- Account for flat models by @spezialspezial in #1766
-- Update invoke.bat.in isolate environment variables by @lynnewu in #1833
-- Arch Linux Specific PatchMatch Instructions & fixing conda install on linux by
- @SammCheese in #1848
-- Make force free GPU memory work in img2img by @addianto in #1844
-- New installer by @lstein
+#### A Negative Prompt Box in the WebUI
+There is now a separate text input box for negative prompts in the WebUI. This is convenient for stashing frequently-used negative prompts ("mangled limbs, bad anatomy"). The `[negative prompt]` syntax continues to work in the main prompt box as well.
+
+To see exactly how your prompts are being parsed, launch `invokeai` with the `--log_tokenization` option. The console window will then display the tokenization process for both positive and negative prompts.
+
+#### Model Merging
+
+Version 2.3.0 offers an intuitive user interface for merging up to three Stable Diffusion models using an intuitive user interface. Model merging allows you to mix the behavior of models to achieve very interesting effects. To use this, each of the models must already be imported into InvokeAI and saved in `diffusers` format, then launch the merger using a new menu item in the InvokeAI launcher script (`invoke.sh`, `invoke.bat`) or directly from the command line with `invokeai-merge --gui`. You will be prompted to select the models to merge, the proportions in which to mix them, and the mixing algorithm. The script will create a new merged `diffusers` model and import it into InvokeAI for your use.
+
+See [MODEL MERGING](https://invoke-ai.github.io/InvokeAI/features/MODEL_MERGING/) for more details.
+
+#### Textual Inversion Training
+
+Textual Inversion (TI) is a technique for training a Stable Diffusion model to emit a particular subject or style when triggered by a keyword phrase. You can perform TI training by placing a small number of images of the subject or style in a directory, and choosing a distinctive trigger phrase, such as "pointillist-style". After successful training, The subject or style will be activated by including `` in your prompt.
+
+Previous versions of InvokeAI were able to perform TI, but it required using a command-line script with dozens of obscure command-line arguments. Version 2.3.0 features an intuitive TI frontend that will build a TI model on top of any `diffusers` model. To access training you can launch from a new item in the launcher script or from the command line using `invokeai-ti --gui`.
+
+See [TEXTUAL INVERSION](https://invoke-ai.github.io/InvokeAI/features/TEXTUAL_INVERSION/) for further details.
+
+#### A New Installer Experience
+
+The InvokeAI installer has been upgraded in order to provide a smoother and hopefully more glitch-free experience. In addition, InvokeAI is now packaged as a PyPi project, allowing developers and power-users to install InvokeAI with the command `pip install InvokeAI --use-pep517`. Please see [Installation](#installation) for details.
+
+Developers should be aware that the `pip` installation procedure has been simplified and that the `conda` method is no longer supported at all. Accordingly, the `environments_and_requirements` directory has been deleted from the repository.
+
+#### Command-line name changes
+
+All of InvokeAI's functionality, including the WebUI, command-line interface, textual inversion training and model merging, can all be accessed from the `invoke.sh` and `invoke.bat` launcher scripts. The menu of options has been expanded to add the new functionality. For the convenience of developers and power users, we have normalized the names of the InvokeAI command-line scripts:
+
+* `invokeai` -- Command-line client
+* `invokeai --web` -- Web GUI
+* `invokeai-merge --gui` -- Model merging script with graphical front end
+* `invokeai-ti --gui` -- Textual inversion script with graphical front end
+* `invokeai-configure` -- Configuration tool for initializing the `invokeai` directory and selecting popular starter models.
+
+For backward compatibility, the old command names are also recognized, including `invoke.py` and `configure-invokeai.py`. However, these are deprecated and will eventually be removed.
+
+Developers should be aware that the locations of the script's source code has been moved. The new locations are:
+* `invokeai` => `ldm/invoke/CLI.py`
+* `invokeai-configure` => `ldm/invoke/config/configure_invokeai.py`
+* `invokeai-ti`=> `ldm/invoke/training/textual_inversion.py`
+* `invokeai-merge` => `ldm/invoke/merge_diffusers`
+
+Developers are strongly encouraged to perform an "editable" install of InvokeAI using `pip install -e . --use-pep517` in the Git repository, and then to call the scripts using their 2.3.0 names, rather than executing the scripts directly. Developers should also be aware that the several important data files have been relocated into a new directory named `invokeai`. This includes the WebGUI's `frontend` and `backend` directories, and the `INITIAL_MODELS.yaml` files used by the installer to select starter models. Eventually all InvokeAI modules will be in subdirectories of `invokeai`.
+
+Please see [2.3.0 Release Notes](https://github.com/invoke-ai/InvokeAI/releases/tag/v2.3.0) for further details.
For older changelogs, please visit the
**[CHANGELOG](CHANGELOG/#v223-2-december-2022)**.
## :material-target: Troubleshooting
-Please check out our
-**[:material-frequently-asked-questions: Q&A](help/TROUBLESHOOT.md)** to get
-solutions for common installation problems and other issues.
+Please check out our **[:material-frequently-asked-questions:
+Troubleshooting
+Guide](installation/010_INSTALL_AUTOMATED.md#troubleshooting)** to
+get solutions for common installation problems and other issues.
## :octicons-repo-push-24: Contributing
@@ -282,8 +265,8 @@ thank them for their time, hard work and effort.
For support, please use this repository's GitHub Issues tracking service. Feel
free to send me an email if you use and like the script.
-Original portions of the software are Copyright (c) 2020
-[Lincoln D. Stein](https://github.com/lstein)
+Original portions of the software are Copyright (c) 2022-23
+by [The InvokeAI Team](https://github.com/invoke-ai).
## :octicons-book-24: Further Reading
diff --git a/docs/installation/010_INSTALL_AUTOMATED.md b/docs/installation/010_INSTALL_AUTOMATED.md
index 2e865aa045..b7e4b03ed1 100644
--- a/docs/installation/010_INSTALL_AUTOMATED.md
+++ b/docs/installation/010_INSTALL_AUTOMATED.md
@@ -6,57 +6,106 @@ title: Installing with the Automated Installer
## Introduction
-The automated installer is a shell script that attempts to automate every step
-needed to install and run InvokeAI on a stock computer running recent versions
-of Linux, MacOS or Windows. It will leave you with a version that runs a stable
-version of InvokeAI with the option to upgrade to experimental versions later.
+The automated installer is a Python script that automates the steps
+needed to install and run InvokeAI on a stock computer running recent
+versions of Linux, MacOS or Windows. It will leave you with a version
+that runs a stable version of InvokeAI with the option to upgrade to
+experimental versions later.
## Walk through
-1. Make sure that your system meets the
- [hardware requirements](../index.md#hardware-requirements) and has the
- appropriate GPU drivers installed. In particular, if you are a Linux user
- with an AMD GPU installed, you may need to install the
- [ROCm driver](https://rocmdocs.amd.com/en/latest/Installation_Guide/Installation-Guide.html).
+1. **Hardware Requirements**: Make sure that your system meets the [hardware
+ requirements](../index.md#hardware-requirements) and has the
+ appropriate GPU drivers installed. For a system with an NVIDIA
+ card installed, you will need to install the CUDA driver, while
+ AMD-based cards require the ROCm driver. In most cases, if you've
+ already used the system for gaming or other graphics-intensive
+ tasks, the appropriate drivers will already be installed. If
+ unsure, check the [GPU Driver Guide](030_INSTALL_CUDA_AND_ROCM.md)
!!! info "Required Space"
- Installation requires roughly 18G of free disk space to load the libraries and
- recommended model weights files.
+ Installation requires roughly 18G of free disk space to load
+ the libraries and recommended model weights files.
- Regardless of your destination disk, your *system drive* (`C:\` on Windows, `/` on macOS/Linux) requires at least 6GB of free disk space to download and cache python dependencies. NOTE for Linux users: if your temporary directory is mounted as a `tmpfs`, ensure it has sufficient space.
+ Regardless of your destination disk, your *system drive*
+ (`C:\` on Windows, `/` on macOS/Linux) requires at least 6GB
+ of free disk space to download and cache python
+ dependencies.
-2. Check that your system has an up-to-date Python installed. To do this, open
- up a command-line window ("Terminal" on Linux and Macintosh, "Command" or
- "Powershell" on Windows) and type `python --version`. If Python is
- installed, it will print out the version number. If it is version `3.9.1` or `3.10.x`, you meet requirements.
+ NOTE for Linux users: if your temporary directory is mounted
+ as a `tmpfs`, ensure it has sufficient space.
- !!! warning "At this time we do not recommend Python 3.11"
+2. **Software Requirements**: Check that your system has an up-to-date Python installed. To do
+ this, open up a command-line window ("Terminal" on Linux and
+ Macintosh, "Command" or "Powershell" on Windows) and type `python
+ --version`. If Python is installed, it will print out the version
+ number. If it is version `3.9.1` or `3.10.x`, you meet
+ requirements.
- !!! warning "If you see an older version, or get a command not found error"
- Go to [Python Downloads](https://www.python.org/downloads/) and
- download the appropriate installer package for your platform. We recommend
- [Version 3.10.9](https://www.python.org/downloads/release/python-3109/),
- which has been extensively tested with InvokeAI.
+ !!! warning "What to do if you have an unsupported version"
+ Go to [Python Downloads](https://www.python.org/downloads/)
+ and download the appropriate installer package for your
+ platform. We recommend [Version
+ 3.10.9](https://www.python.org/downloads/release/python-3109/),
+ which has been extensively tested with InvokeAI. At this time
+ we do not recommend Python 3.11.
_Please select your platform in the section below for platform-specific
setup requirements._
- === "Windows users"
+ === "Windows"
+ During the Python configuration process, look out for a
+ checkbox to add Python to your PATH and select it. If the
+ install script complains that it can't find python, then open
+ the Python installer again and choose "Modify" existing
+ installation.
- - During the Python configuration process,
- look out for a checkbox to add Python to your PATH
- and select it. If the install script complains that it can't
- find python, then open the Python installer again and choose
- "Modify" existing installation.
+ Installation requires an up to date version of the Microsoft
+ Visual C libraries. Please install the 2015-2022 libraries
+ available here:
+ https://learn.microsoft.com/en-US/cpp/windows/latest-supported-vc-redist?view=msvc-170
- - Installation requires an up to date version of the Microsoft Visual C libraries. Please install the 2015-2022 libraries available here: https://learn.microsoft.com/en-US/cpp/windows/latest-supported-vc-redist?view=msvc-170
+ Please double-click on the file `WinLongPathsEnabled.reg` and
+ accept the dialog box that asks you if you wish to modify your registry.
+ This activates long filename support on your system and will prevent
+ mysterious errors during installation.
- === "Mac users"
+ === "Linux"
+ To install an appropriate version of Python on Ubuntu 22.04
+ and higher, run the following:
- - After installing Python, you may need to run the
+ ```
+ sudo apt update
+ sudo apt install -y python3 python3-pip python3-venv
+ sudo update-alternatives --install /usr/local/bin/python python /usr/bin/python3.10 3
+ ```
+
+ On Ubuntu 20.04, the process is slightly different:
+
+ ```
+ sudo apt update
+ sudo apt install -y software-properties-common
+ sudo add-apt-repository -y ppa:deadsnakes/ppa
+ sudo apt install python3.10 python3-pip python3.10-venv
+ sudo update-alternatives --install /usr/local/bin/python python /usr/bin/python3.10 3
+ ```
+
+ Both `python` and `python3` commands are now pointing at
+ Python3.10. You can still access older versions of Python by
+ calling `python2`, `python3.8`, etc.
+
+ Linux systems require a couple of additional graphics
+ libraries to be installed for proper functioning of
+ `python3-opencv`. Please run the following:
+
+ `sudo apt update && sudo apt install -y libglib2.0-0 libgl1-mesa-glx`
+
+ === "Mac"
+
+ After installing Python, you may need to run the
following command from the Terminal in order to install the Web
certificates needed to download model data from https sites. If
you see lots of CERTIFICATE ERRORS during the last part of the
@@ -64,97 +113,55 @@ version of InvokeAI with the option to upgrade to experimental versions later.
`/Applications/Python\ 3.10/Install\ Certificates.command`
- - You may need to install the Xcode command line tools. These
+ You may need to install the Xcode command line tools. These
are a set of tools that are needed to run certain applications in a
- Terminal, including InvokeAI. This package is provided directly by Apple.
+ Terminal, including InvokeAI. This package is provided
+ directly by Apple. To install, open a terminal window and run `xcode-select --install`. You will get a macOS system popup guiding you through the
+ install. If you already have them installed, you will instead see some
+ output in the Terminal advising you that the tools are already installed. More information can be found at [FreeCode Camp](https://www.freecodecamp.org/news/install-xcode-command-line-tools/)
- - To install, open a terminal window and run `xcode-select
- --install`. You will get a macOS system popup guiding you through the
- install. If you already have them installed, you will instead see some
- output in the Terminal advising you that the tools are already installed.
+3. **Download the Installer**: The InvokeAI installer is distributed as a ZIP files. Go to the
+ [latest release](https://github.com/invoke-ai/InvokeAI/releases/latest),
+ and look for a file named:
- - More information can be found here:
- https://www.freecodecamp.org/news/install-xcode-command-line-tools/
+ - InvokeAI-installer-v2.X.X.zip
- === "Linux users"
+ where "2.X.X" is the latest released version. The file is located
+ at the very bottom of the release page, under **Assets**.
- For reasons that are not entirely clear, installing the correct version of Python can be a bit of a challenge on Ubuntu, Linux Mint, Pop!_OS, and other Debian-derived distributions.
+4. **Unpack the installer**: Unpack the zip file into a convenient directory. This will create a new
+ directory named "InvokeAI-Installer". When unpacked, the directory
+ will look like this:
- On Ubuntu 22.04 and higher, run the following:
+
+ 
+
- ```
- sudo apt update
- sudo apt install -y python3 python3-pip python3-venv
- sudo update-alternatives --install /usr/local/bin/python python /usr/bin/python3.10 3
- ```
+5. **Launch the installer script from the desktop**: If you are using a desktop GUI, double-click the installer file
+ appropriate for your platform. It will be named `install.bat` on
+ Windows systems and `install.sh` on Linux and Macintosh
+ systems. Be aware that your system's file browser may suppress the
+ display of the file extension.
- On Ubuntu 20.04, the process is slightly different:
+ On Windows systems if you get an "Untrusted Publisher" warning.
+ Click on "More Info" and then select "Run Anyway." You trust us, right?
- ```
- sudo apt update
- sudo apt install -y software-properties-common
- sudo add-apt-repository -y ppa:deadsnakes/ppa
- sudo apt install python3.10 python3-pip python3.10-venv
- sudo update-alternatives --install /usr/local/bin/python python /usr/bin/python3.10 3
- ```
-
- Both `python` and `python3` commands are now pointing at Python3.10. You can still access older versions of Python by calling `python2`, `python3.8`, etc.
-
- Linux systems require a couple of additional graphics libraries to be installed for proper functioning of `python3-opencv`. Please run the following:
-
- `sudo apt update && sudo apt install -y libglib2.0-0 libgl1-mesa-glx`
-
-3. The source installer is distributed in ZIP files. Go to the
- [latest release](https://github.com/invoke-ai/InvokeAI/releases/latest), and
- look for a series of files named:
-
- - InvokeAI-installer-2.X.X.zip
-
- (Where 2.X.X is the current release number).
-
- Download the latest release.
-
-4. Unpack the zip file into a convenient directory. This will create a new
- directory named "InvokeAI-Installer". This example shows how this would look
- using the `unzip` command-line tool, but you may use any graphical or
- command-line Zip extractor:
-
- ```cmd
- C:\Documents\Linco> unzip InvokeAI-installer-2.X.X-windows.zip
- Archive: C: \Linco\Downloads\InvokeAI-installer-2.X.X-windows.zip
- creating: InvokeAI-Installer\
- inflating: InvokeAI-Installer\install.bat
- inflating: InvokeAI-Installer\readme.txt
- ...
- ```
-
- After successful installation, you can delete the `InvokeAI-Installer`
- directory.
-
-5. **Windows only** Please double-click on the file WinLongPathsEnabled.reg and
- accept the dialog box that asks you if you wish to modify your registry.
- This activates long filename support on your system and will prevent
- mysterious errors during installation.
-
-6. If you are using a desktop GUI, double-click the installer file. It will be
- named `install.bat` on Windows systems and `install.sh` on Linux and
- Macintosh systems.
-
- On Windows systems you will probably get an "Untrusted Publisher" warning.
- Click on "More Info" and select "Run Anyway." You trust us, right?
-
-7. Alternatively, from the command line, run the shell script or .bat file:
+6. **[Alternative] Launch the installer script from the command line**: Alternatively, from the command line, run the shell script or .bat file:
```cmd
C:\Documents\Linco> cd InvokeAI-Installer
C:\Documents\Linco\invokeAI> install.bat
```
-8. The script will ask you to choose where to install InvokeAI. Select a
+7. **Select the location to install InvokeAI**: The script will ask you to choose where to install InvokeAI. Select a
directory with at least 18G of free space for a full install. InvokeAI and
all its support files will be installed into a new directory named
`invokeai` located at the location you specify.
+
+ 
+
+
- The default is to install the `invokeai` directory in your home directory,
usually `C:\Users\YourName\invokeai` on Windows systems,
`/home/YourName/invokeai` on Linux systems, and `/Users/YourName/invokeai`
@@ -164,9 +171,23 @@ version of InvokeAI with the option to upgrade to experimental versions later.
Type part of the path (e.g. "C:\Users") and press ++tab++ repeatedly
to suggest completions.
-9. Sit back and let the install script work. It will install the third-party
- libraries needed by InvokeAI, then download the current InvokeAI release and
- install it.
+8. **Select your GPU**: The installer will autodetect your platform and will request you to
+ confirm the type of GPU your graphics card has. On Linux systems,
+ you will have the choice of CUDA (NVidia cards), ROCm (AMD cards),
+ or CPU (no graphics acceleration). On Windows, you'll have the
+ choice of CUDA vs CPU, and on Macs you'll be offered CPU only. When
+ you select CPU on M1 or M2 Macintoshes, you will get MPS-based
+ graphics acceleration without installing additional drivers. If you
+ are unsure what GPU you are using, you can ask the installer to
+ guess.
+
+
+ 
+
+
+
+9. **Watch it go!**: Sit back and let the install script work. It will install the third-party
+ libraries needed by InvokeAI and the application itself.
Be aware that some of the library download and install steps take a long
time. In particular, the `pytorch` package is quite large and often appears
@@ -176,25 +197,25 @@ version of InvokeAI with the option to upgrade to experimental versions later.
minutes and nothing is happening, you can interrupt the script with ^C. You
may restart it and it will pick up where it left off.
-10. After installation completes, the installer will launch the configuration script, which will guide you through the first-time process
- of selecting one or more Stable Diffusion model weights files, downloading
- and configuring them. We provide a list of popular models that InvokeAI
- performs well with. However, you can add more weight files later on using
- the command-line client or the Web UI. See
- [Installing Models](050_INSTALLING_MODELS.md) for details.
+10. **Post-install Configuration**: After installation completes, the installer will launch the
+ configuration script, which will guide you through the first-time
+ process of selecting one or more Stable Diffusion model weights
+ files, downloading and configuring them. We provide a list of
+ popular models that InvokeAI performs well with. However, you can
+ add more weight files later on using the command-line client or
+ the Web UI. See [Installing Models](050_INSTALLING_MODELS.md) for
+ details.
- Note that the main Stable Diffusion weights file is protected by a license
- agreement that you must agree to in order to use. The script will list the
- steps you need to take to create an account on the official site that hosts
- the weights files, accept the agreement, and provide an access token that
- allows InvokeAI to legally download and install the weights files.
+
+ 
+
If you have already downloaded the weights file(s) for another Stable
Diffusion distribution, you may skip this step (by selecting "skip" when
prompted) and configure InvokeAI to use the previously-downloaded files. The
process for this is described in [Installing Models](050_INSTALLING_MODELS.md).
-11. The script will now exit and you'll be ready to generate some images. Look
+11. **Running InvokeAI for the first time**: The script will now exit and you'll be ready to generate some images. Look
for the directory `invokeai` installed in the location you chose at the
beginning of the install session. Look for a shell script named `invoke.sh`
(Linux/Mac) or `invoke.bat` (Windows). Launch the script by double-clicking
@@ -205,49 +226,83 @@ version of InvokeAI with the option to upgrade to experimental versions later.
C:\Documents\Linco\invokeAI> invoke.bat
```
- - The `invoke.bat` (`invoke.sh`) script will give you the choice of starting
- (1) the command-line interface, or (2) the web GUI. If you start the
- latter, you can load the user interface by pointing your browser at
- http://localhost:9090.
+ - The `invoke.bat` (`invoke.sh`) script will give you the choice
+ of starting (1) the command-line interface, (2) the web GUI, (3)
+ textual inversion training, and (4) model merging.
- - The script also offers you a third option labeled "open the developer
- console". If you choose this option, you will be dropped into a
- command-line interface in which you can run python commands directly,
- access developer tools, and launch InvokeAI with customized options.
+ - By default, the script will launch the web interface. When you
+ do this, you'll see a series of startup messages ending with
+ instructions to point your browser at
+ http://localhost:9090. Click on this link to open up a browser
+ and start exploring InvokeAI's features.
-12. You can launch InvokeAI with several different command-line arguments that
+12. **InvokeAI Options**: You can launch InvokeAI with several different command-line arguments that
customize its behavior. For example, you can change the location of the
image output directory, or select your favorite sampler. See the
[Command-Line Interface](../features/CLI.md) for a full list of the options.
- - To set defaults that will take effect every time you launch InvokeAI,
- use a text editor (e.g. Notepad) to exit the file
- `invokeai\invokeai.init`. It contains a variety of examples that you can
- follow to add and modify launch options.
+ - To set defaults that will take effect every time you launch InvokeAI,
+ use a text editor (e.g. Notepad) to exit the file
+ `invokeai\invokeai.init`. It contains a variety of examples that you can
+ follow to add and modify launch options.
+
+ - The launcher script also offers you an option labeled "open the developer
+ console". If you choose this option, you will be dropped into a
+ command-line interface in which you can run python commands directly,
+ access developer tools, and launch InvokeAI with customized options.
+
+
+ !!! warning "Do not move or remove the `invokeai` directory"
+
+ The `invokeai` directory contains the `invokeai` application, its
+ configuration files, the model weight files, and outputs of image generation.
+ Once InvokeAI is installed, do not move or remove this directory."
-!!! warning "The `invokeai` directory contains the `invokeai` application, its
-configuration files, the model weight files, and outputs of image generation.
-Once InvokeAI is installed, do not move or remove this directory."
## Troubleshooting
### _Package dependency conflicts_
-If you have previously installed InvokeAI or another Stable Diffusion package,
-the installer may occasionally pick up outdated libraries and either the
-installer or `invoke` will fail with complaints about library conflicts. You can
-address this by entering the `invokeai` directory and running `update.sh`, which
-will bring InvokeAI up to date with the latest libraries.
+If you have previously installed InvokeAI or another Stable Diffusion
+package, the installer may occasionally pick up outdated libraries and
+either the installer or `invoke` will fail with complaints about
+library conflicts. In this case, run the `invoke.sh`/`invoke.bat`
+command and enter the Developer's Console by picking option (5). This
+will take you to a command-line prompt.
-### ldm from pypi
+Then give this command:
-!!! warning
+`pip install InvokeAI --force-reinstall`
- Some users have tried to correct dependency problems by installing
- the `ldm` package from PyPi.org. Unfortunately this is an unrelated package that
- has nothing to do with the 'latent diffusion model' used by InvokeAI. Installing
- ldm will make matters worse. If you've installed ldm, uninstall it with
- `pip uninstall ldm`.
+This should fix the issues.
+
+### InvokeAI runs extremely slowly on Linux or Windows systems
+
+The most frequent cause of this problem is when the installation
+process installed the CPU-only version of the torch machine-learning
+library, rather than a version that takes advantage of GPU
+acceleration. To confirm this issue, look at the InvokeAI startup
+messages. If you see a message saying ">> Using device CPU", then
+this is what happened.
+
+To fix this problem, first determine whether you have an NVidia or an
+AMD GPU. The former uses the CUDA driver, and the latter uses ROCm
+(only available on Linux). Then run the `invoke.sh`/`invoke.bat`
+command and enter the Developer's Console by picking option (5). This
+will take you to a command-line prompt.
+
+Then type the following commands:
+
+=== "NVIDIA System"
+ ```bash
+ pip install torch torchvision --force-reinstall --extra-index-url https://download.pytorch.org/whl/cu117
+ pip install xformers
+ ```
+
+=== "AMD System"
+ ```bash
+ pip install torch torchvision --force-reinstall --extra-index-url https://download.pytorch.org/whl/rocm5.2
+ ```
### Corrupted configuration file
@@ -272,7 +327,7 @@ the [InvokeAI Issues](https://github.com/invoke-ai/InvokeAI/issues) section, or
visit our [Discord Server](https://discord.gg/ZmtBAhwWhy) for interactive
assistance.
-### other problems
+### Other Problems
If you run into problems during or after installation, the InvokeAI team is
available to help you. Either create an
@@ -284,36 +339,34 @@ hours, and often much sooner.
## Updating to newer versions
-This distribution is changing rapidly, and we add new features on a daily basis.
-To update to the latest released version (recommended), run the `update.sh`
-(Linux/Mac) or `update.bat` (Windows) scripts. This will fetch the latest
-release and re-run the `invokeai-configure` script to download any updated
-models files that may be needed. You can also use this to add additional models
-that you did not select at installation time.
+This distribution is changing rapidly, and we add new features
+regularly. Releases are announced at
+http://github.com/invoke-ai/InvokeAI/releases, and at
+https://pypi.org/project/InvokeAI/ To update to the latest released
+version (recommended), follow these steps:
-You can now close the developer console and run `invoke` as before. If you get
-complaints about missing models, then you may need to do the additional step of
-running `invokeai-configure`. This happens relatively infrequently. To do
-this, simply open up the developer's console again and type
-`invokeai-configure`.
+1. Start the `invoke.sh`/`invoke.bat` launch script from within the
+ `invokeai` root directory.
-You may also use the `update` script to install any selected version of
-InvokeAI. From https://github.com/invoke-ai/InvokeAI, navigate to the zip file
-link of the version you wish to install. You can find the zip links by going to
-the one of the release pages and looking for the **Assets** section at the
-bottom. Alternatively, you can browse "branches" and "tags" at the top of the
-big code directory on the InvokeAI welcome page. When you find the version you
-want to install, go to the green "<> Code" button at the top, and copy the
-"Download ZIP" link.
+2. Choose menu item (6) "Developer's Console". This will launch a new
+ command line.
-Now run `update.sh` (or `update.bat`) with the version number of the desired InvokeAI
-version as its argument. For example, this will install the old 2.2.0 release.
+3. Type the following command:
+
+ ```bash
+ pip install InvokeAI --upgrade
+ ```
+4. Watch the installation run. Once it is complete, you may exit the
+ command line by typing `exit`, and then start InvokeAI from the
+ launch script as per usual.
+
+
+Alternatively, if you wish to get the most recent unreleased
+development version, perform the same steps to enter the developer's
+console, and then type:
+
+ ```bash
+ pip install https://github.com/invoke-ai/InvokeAI/archive/refs/heads/main.zip
+ ```
-```cmd
-update.sh v2.2.0
-```
-You can get the list of version numbers by going to the [releases
-page](https://github.com/invoke-ai/InvokeAI/releases) or by browsing
-the (Tags)[https://github.com/invoke-ai/InvokeAI/tags] list from the
-Code section of the main github page.
diff --git a/docs/installation/020_INSTALL_MANUAL.md b/docs/installation/020_INSTALL_MANUAL.md
index e4fefde7c5..57e508fef9 100644
--- a/docs/installation/020_INSTALL_MANUAL.md
+++ b/docs/installation/020_INSTALL_MANUAL.md
@@ -14,17 +14,46 @@ title: Installing Manually
## Introduction
-!!! tip As of InvokeAI v2.3.0 installation using the `conda` package manager
-is no longer being supported. It will likely still work, but we are not testing
-this installation method.
+!!! tip "Conda"
+ As of InvokeAI v2.3.0 installation using the `conda` package manager is no longer being supported. It will likely still work, but we are not testing this installation method.
On Windows systems, you are encouraged to install and use the
[PowerShell](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows?view=powershell-7.3),
-which provides compatibility with Linux and Mac shells and nice features such as
-command-line completion.
+which provides compatibility with Linux and Mac shells and nice
+features such as command-line completion.
-To install InvokeAI with virtual environments and the PIP package manager,
-please follow these steps:
+### Prerequisites
+
+Before you start, make sure you have the following preqrequisites
+installed. These are described in more detail in [Automated
+Installation](010_INSTALL_AUTOMATED.md), and in many cases will
+already be installed (if, for example, you have used your system for
+gaming):
+
+* **Python** version 3.9 or 3.10 (3.11 is not recommended).
+
+* **CUDA Tools** For those with _NVidia GPUs_, you will need to
+ install the [CUDA toolkit and optionally the XFormers library](070_INSTALL_XFORMERS.md).
+
+* **ROCm Tools** For _Linux users with AMD GPUs_, you will need
+ to install the [ROCm toolkit](./030_INSTALL_CUDA_AND_ROCM.md). Note that
+ InvokeAI does not support AMD GPUs on Windows systems due to
+ lack of a Windows ROCm library.
+
+* **Visual C++ Libraries** _Windows users_ must install the free
+ [Visual C++ libraries from Microsoft](https://learn.microsoft.com/en-US/cpp/windows/latest-supported-vc-redist?view=msvc-170)
+
+* **The Xcode command line tools** for _Macintosh users_. Instructions are
+ available at [Free Code Camp](https://www.freecodecamp.org/news/install-xcode-command-line-tools/)
+
+* _Macintosh users_ may also need to run the `Install Certificates` command
+ if model downloads give lots of certificate errors. Run:
+ `/Applications/Python\ 3.10/Install\ Certificates.command`
+
+### Installation Walkthrough
+
+To install InvokeAI with virtual environments and the PIP package
+manager, please follow these steps:
1. Please make sure you are using Python 3.9 or 3.10. The rest of the install
procedure depends on this and will not work with other versions:
@@ -33,74 +62,125 @@ please follow these steps:
python -V
```
-2. Clone the [InvokeAI](https://github.com/invoke-ai/InvokeAI) source code from
- GitHub:
+2. Create a directory to contain your InvokeAI library, configuration
+ files, and models. This is known as the "runtime" or "root"
+ directory, and often lives in your home directory under the name `invokeai`.
- ```bash
- git clone https://github.com/invoke-ai/InvokeAI.git
- ```
+ Please keep in mind the disk space requirements - you will need at
+ least 20GB for the models and the virtual environment. From now
+ on we will refer to this directory as `INVOKEAI_ROOT`. For convenience,
+ the steps below create a shell variable of that name which contains the
+ path to `HOME/invokeai`.
- This will create InvokeAI folder where you will follow the rest of the
- steps.
+ === "Linux/Mac"
-3. Create a directory of to contain your InvokeAI installation (known as the "runtime"
- or "root" directory). This is where your models, configs, and outputs will live
- by default. Please keep in mind the disk space requirements - you will need at
- least 18GB (as of this writing) for the models and the virtual environment.
- From now on we will refer to this directory as `INVOKEAI_ROOT`. This keeps the
- runtime directory separate from the source code and aids in updating.
+ ```bash
+ export INVOKEAI_ROOT="~/invokeai"
+ mkdir $INVOKEAI_ROOT
+ ```
- ```bash
- export INVOKEAI_ROOT="~/invokeai"
- mkdir ${INVOKEAI_ROOT}
- ```
+ === "Windows (Powershell)"
-4. From within the InvokeAI top-level directory, create and activate a virtual
- environment named `.venv` and prompt displaying `InvokeAI`:
+ ```bash
+ Set-Variable -Name INVOKEAI_ROOT -Value $Home/invokeai
+ mkdir $INVOKEAI_ROOT
+ ```
- ```bash
- python -m venv ${INVOKEAI_ROOT}/.venv \
- --prompt invokeai \
- --upgrade-deps \
- --copies
- source ${INVOKEAI_ROOT}/.venv/bin/activate
- ```
+3. Enter the root (invokeai) directory and create a virtual Python
+ environment within it named `.venv`. If the command `python`
+ doesn't work, try `python3`. Note that while you may create the
+ virtual environment anywhere in the file system, we recommend that
+ you create it within the root directory as shown here. This makes
+ it possible for the InvokeAI applications to find the model data
+ and configuration. If you do not choose to install the virtual
+ environment inside the root directory, then you **must** set the
+ `INVOKEAI_ROOT` environment variable in your shell environment, for
+ example, by editing `~/.bashrc` or `~/.zshrc` files, or setting the
+ Windows environment variable using the Advanced System Settings dialogue.
+ Refer to your operating system documentation for details.
- !!! warning
- You **may** create your virtual environment anywhere on the filesystem.
- But IF you choose a location that is *not* inside the `$INVOKEAI_ROOT` directory,
- then you must set the `INVOKEAI_ROOT` environment variable in your shell environment,
- for example, by editing `~/.bashrc` or `~/.zshrc` files, or setting the Windows environment
- variable. Refer to your operating system / shell documentation for the correct way of doing so.
+ === "Linux/Mac"
+ ```bash
+ cd $INVOKEAI_ROOT
+ python -m venv create .venv
+ ```
-5. Make sure that pip is installed in your virtual environment an up to date:
+ === "Windows"
+ ```bash
+ cd $INVOKEAI_ROOT
+ python -m venv create .venv
+ ```
+
+4. Activate the new environment:
+
+ === "Linux/Mac"
+ ```bash
+ source .venv/bin/activate
+ ```
+
+ === "Windows"
+ ```bash
+ .venv\script\activate
+ ```
+ If you get a permissions error at this point, run the command
+ `Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser`
+ and try `activate` again.
+
+ The command-line prompt should change to to show `(.venv)` at the
+ beginning of the prompt. Note that all the following steps should be
+ run while inside the INVOKEAI_ROOT directory
+
+5. Make sure that pip is installed in your virtual environment and up to date:
```bash
python -m pip install --upgrade pip
```
-6. Install Package
+6. Install the InvokeAI Package. The `--extra-index-url` option is used to select among CUDA, ROCm and CPU/MPS drivers as shown below:
- ```bash
- pip install --use-pep517 .
- ```
+ === "CUDA (NVidia)"
+ ```bash
+ pip install InvokeAI[xformers] --use-pep517 --extra-index-url https://download.pytorch.org/whl/cu117
+ ```
- Deactivate and reactivate your runtime directory so that the invokeai-specific commands
+ === "ROCm (AMD)"
+ ```bash
+ pip install InvokeAI --use-pep517 --extra-index-url https://download.pytorch.org/whl/rocm5.2
+ ```
+
+ === "CPU (Intel Macs & non-GPU systems)"
+ ```bash
+ pip install InvokeAI --use-pep517 --extra-index-url https://download.pytorch.org/whl/cpu
+ ```
+
+ === "MPS (M1 and M2 Macs)"
+ ```bash
+ pip install InvokeAI --use-pep517 --extra-index-url https://download.pytorch.org/whl/cpu
+ ```
+
+7. Deactivate and reactivate your runtime directory so that the invokeai-specific commands
become available in the environment
- ```
- deactivate && source ${INVOKEAI_ROOT}/.venv/bin/activate
- ```
+ === "Linux/Macintosh"
+ ```bash
+ deactivate && source .venv/bin/activate
+ ```
-7. Set up the runtime directory
+ === "Windows"
+ ```bash
+ deactivate
+ .venv\Scripts\activate
+ ```
+
+8. Set up the runtime directory
In this step you will initialize your runtime directory with the downloaded
models, model config files, directory for textual inversion embeddings, and
your outputs.
```bash
- invokeai-configure --root ${INVOKEAI_ROOT}
+ invokeai-configure
```
The script `invokeai-configure` will interactively guide you through the
@@ -119,35 +199,36 @@ please follow these steps:
If you have already downloaded the weights file(s) for another Stable
Diffusion distribution, you may skip this step (by selecting "skip" when
prompted) and configure InvokeAI to use the previously-downloaded files. The
- process for this is described in [here](050_INSTALLING_MODELS.md).
+ process for this is described in [Installing Models](050_INSTALLING_MODELS.md).
-7. Run the command-line- or the web- interface:
+9. Run the command-line- or the web- interface:
- Activate the environment (with `source .venv/bin/activate`), and then run
- the script `invokeai`. If you selected a non-default location for the
- runtime directory, please specify the path with the `--root_dir` option
- (abbreviated below as `--root`):
+ From within INVOKEAI_ROOT, activate the environment
+ (with `source .venv/bin/activate` or `.venv\scripts\activate), and then run
+ the script `invokeai`. If the virtual environment you selected is NOT inside
+ INVOKEAI_ROOT, then you must specify the path to the root directory by adding
+ `--root_dir \path\to\invokeai` to the commands below:
!!! example ""
- !!! warning "Make sure that the virtual environment is activated, which should create `(invokeai)` in front of your prompt!"
+ !!! warning "Make sure that the virtual environment is activated, which should create `(.venv)` in front of your prompt!"
=== "CLI"
```bash
- invokeai --root ~/invokeai
+ invokeai
```
=== "local Webserver"
```bash
- invokeai --web --root ~/invokeai
+ invokeai --web
```
=== "Public Webserver"
```bash
- invokeai --web --host 0.0.0.0 --root ~/invokeai
+ invokeai --web --host 0.0.0.0
```
If you choose the run the web interface, point your browser at
@@ -155,23 +236,99 @@ please follow these steps:
!!! tip
- You can permanently set the location of the runtime directory by setting the environment variable `INVOKEAI_ROOT` to the path of the directory. As mentioned previously, this is
- **required** if your virtual environment is located outside of your runtime directory.
+ You can permanently set the location of the runtime directory
+ by setting the environment variable `INVOKEAI_ROOT` to the
+ path of the directory. As mentioned previously, this is
+ *highly recommended** if your virtual environment is located outside of
+ your runtime directory.
-8. Render away!
+10. Render away!
Browse the [features](../features/CLI.md) section to learn about all the
things you can do with InvokeAI.
- Note that some GPUs are slow to warm up. In particular, when using an AMD
- card with the ROCm driver, you may have to wait for over a minute the first
- time you try to generate an image. Fortunately, after the warm-up period
- rendering will be fast.
-9. Subsequently, to relaunch the script, activate the virtual environment, and
+11. Subsequently, to relaunch the script, activate the virtual environment, and
then launch `invokeai` command. If you forget to activate the virtual
environment you will most likeley receive a `command not found` error.
!!! warning
- Do not move the runtime directory after installation. The virtual environment has absolute paths in it that get confused if the directory is moved.
+ Do not move the runtime directory after installation. The virtual environment will get confused if the directory is moved.
+
+12. Other scripts
+
+ The [Textual Inversion](../features/TEXTUAL_INVERSION.md) script can be launched with the command:
+
+ ```bash
+ invokeai-ti --gui
+ ```
+
+ Similarly, the [Model Merging](../features/MODEL_MERGING.md) script can be launched with the command:
+
+ ```bash
+ invokeai-merge --gui
+ ```
+
+ Leave off the `--gui` option to run the script using command-line arguments. Pass the `--help` argument
+ to get usage instructions.
+
+### Developer Install
+
+If you have an interest in how InvokeAI works, or you would like to
+add features or bugfixes, you are encouraged to install the source
+code for InvokeAI. For this to work, you will need to install the
+`git` source code management program. If it is not already installed
+on your system, please see the [Git Installation
+Guide](https://github.com/git-guides/install-git)
+
+1. From the command line, run this command:
+
+ ```bash
+ git clone https://github.com/invoke-ai/InvokeAI.git
+ ```
+
+This will create a directory named `InvokeAI` and populate it with the
+full source code from the InvokeAI repository.
+
+2. Activate the InvokeAI virtual environment as per step (4) of the manual
+installation protocol (important!)
+
+3. Enter the InvokeAI repository directory and run one of these
+ commands, based on your GPU:
+
+ === "CUDA (NVidia)"
+ ```bash
+ pip install -e .[xformers] --use-pep517 --extra-index-url https://download.pytorch.org/whl/cu117
+ ```
+
+ === "ROCm (AMD)"
+ ```bash
+ pip install -e . --use-pep517 --extra-index-url https://download.pytorch.org/whl/rocm5.2
+ ```
+
+ === "CPU (Intel Macs & non-GPU systems)"
+ ```bash
+ pip install -e . --use-pep517 --extra-index-url https://download.pytorch.org/whl/cpu
+ ```
+
+ === "MPS (M1 and M2 Macs)"
+ ```bash
+ pip install -e . --use-pep517 --extra-index-url https://download.pytorch.org/whl/cpu
+ ```
+
+ Be sure to pass `-e` (for an editable install) and don't forget the
+ dot ("."). It is part of the command.
+
+ You can now run `invokeai` and its related commands. The code will be
+ read from the repository, so that you can edit the .py source files
+ and watch the code's behavior change.
+
+4. If you wish to contribute to the InvokeAI project, you are
+ encouraged to establish a GitHub account and "fork"
+ https://github.com/invoke-ai/InvokeAI into your own copy of the
+ repository. You can then use GitHub functions to create and submit
+ pull requests to contribute improvements to the project.
+
+ Please see [Contributing](/index.md#Contributing) for hints
+ on getting started.
diff --git a/docs/installation/030_INSTALL_CUDA_AND_ROCM.md b/docs/installation/030_INSTALL_CUDA_AND_ROCM.md
new file mode 100644
index 0000000000..8ce690ca64
--- /dev/null
+++ b/docs/installation/030_INSTALL_CUDA_AND_ROCM.md
@@ -0,0 +1,125 @@
+---
+title: NVIDIA Cuda / AMD ROCm
+---
+
+
+
+# :simple-nvidia: CUDA | :simple-amd: ROCm
+
+
+
+In order for InvokeAI to run at full speed, you will need a graphics
+card with a supported GPU. InvokeAI supports NVidia cards via the CUDA
+driver on Windows and Linux, and AMD cards via the ROCm driver on Linux.
+
+## :simple-nvidia: CUDA
+
+### Linux and Windows Install
+
+If you have used your system for other graphics-intensive tasks, such
+as gaming, you may very well already have the CUDA drivers
+installed. To confirm, open up a command-line window and type:
+
+```
+nvidia-smi
+```
+
+If this command produces a status report on the GPU(s) installed on
+your system, CUDA is installed and you have no more work to do. If
+instead you get "command not found", or similar, then the driver will
+need to be installed.
+
+We strongly recommend that you install the CUDA Toolkit package
+directly from NVIDIA. **Do not try to install Ubuntu's
+nvidia-cuda-toolkit package. It is out of date and will cause
+conflicts among the NVIDIA driver and binaries.**
+
+Go to [CUDA Toolkit 11.7
+Downloads](https://developer.nvidia.com/cuda-11-7-0-download-archive),
+and use the target selection wizard to choose your operating system,
+hardware platform, and preferred installation method (e.g. "local"
+versus "network").
+
+This will provide you with a downloadable install file or, depending
+on your choices, a recipe for downloading and running a install shell
+script. Be sure to read and follow the full installation instructions.
+
+After an install that seems successful, you can confirm by again
+running `nvidia-smi` from the command line.
+
+### Linux Install with a Runtime Container
+
+On Linux systems, an alternative to installing CUDA Toolkit directly on
+your system is to run an NVIDIA software container that has the CUDA
+libraries already in place. This is recommended if you are already
+familiar with containerization technologies such as Docker.
+
+For downloads and instructions, visit the [NVIDIA CUDA Container
+Runtime Site](https://developer.nvidia.com/nvidia-container-runtime)
+
+### Torch Installation
+
+When installing torch and torchvision manually with `pip`, remember to provide
+the argument `--extra-index-url
+https://download.pytorch.org/whl/cu117` as described in the [Manual
+Installation Guide](020_INSTALL_MANUAL.md).
+
+## :simple-amd: ROCm
+
+### Linux Install
+
+AMD GPUs are only supported on Linux platforms due to the lack of a
+Windows ROCm driver at the current time. Also be aware that support
+for newer AMD GPUs is spotty. Your mileage may vary.
+
+It is possible that the ROCm driver is already installed on your
+machine. To test, open up a terminal window and issue the following
+command:
+
+```
+rocm-smi
+```
+
+If you get a table labeled "ROCm System Management Interface" the
+driver is installed and you are done. If you get "command not found,"
+then the driver needs to be installed.
+
+Go to AMD's [ROCm Downloads
+Guide](https://rocmdocs.amd.com/en/latest/Installation_Guide/Installation_new.html#installation-methods)
+and scroll to the _Installation Methods_ section. Find the subsection
+for the install method for your preferred Linux distribution, and
+issue the commands given in the recipe.
+
+Annoyingly, the official AMD site does not have a recipe for the most
+recent version of Ubuntu, 22.04. However, this [community-contributed
+recipe](https://novaspirit.github.io/amdgpu-rocm-ubu22/) is reported
+to work well.
+
+After installation, please run `rocm-smi` a second time to confirm
+that the driver is present and the GPU is recognized. You may need to
+do a reboot in order to load the driver.
+
+### Linux Install with a ROCm-docker Container
+
+If you are comfortable with the Docker containerization system, then
+you can build a ROCm docker file. The source code and installation
+recipes are available
+[Here](https://github.com/RadeonOpenCompute/ROCm-docker/blob/master/quick-start.md)
+
+### Torch Installation
+
+When installing torch and torchvision manually with `pip`, remember to provide
+the argument `--extra-index-url
+https://download.pytorch.org/whl/rocm5.2` as described in the [Manual
+Installation Guide](020_INSTALL_MANUAL.md).
+
+This will be done automatically for you if you use the installer
+script.
+
+Be aware that the torch machine learning library does not seamlessly
+interoperate with all AMD GPUs and you may experience garbled images,
+black images, or long startup delays before rendering commences. Most
+of these issues can be solved by Googling for workarounds. If you have
+a problem and find a solution, please post an
+[Issue](https://github.com/invoke-ai/InvokeAI/issues) so that other
+users benefit and we can update this document.
diff --git a/docs/installation/050_INSTALLING_MODELS.md b/docs/installation/050_INSTALLING_MODELS.md
index 4c27b342f1..91984fce1a 100644
--- a/docs/installation/050_INSTALLING_MODELS.md
+++ b/docs/installation/050_INSTALLING_MODELS.md
@@ -4,249 +4,347 @@ title: Installing Models
# :octicons-paintbrush-16: Installing Models
-## Model Weight Files
+## Checkpoint and Diffusers Models
-The model weight files ('\*.ckpt') are the Stable Diffusion "secret sauce". They
-are the product of training the AI on millions of captioned images gathered from
-multiple sources.
+The model checkpoint files ('\*.ckpt') are the Stable Diffusion
+"secret sauce". They are the product of training the AI on millions of
+captioned images gathered from multiple sources.
-Originally there was only a single Stable Diffusion weights file, which many
-people named `model.ckpt`. Now there are dozens or more that have been "fine
-tuned" to provide particulary styles, genres, or other features. InvokeAI allows
-you to install and run multiple model weight files and switch between them
-quickly in the command-line and web interfaces.
+Originally there was only a single Stable Diffusion weights file,
+which many people named `model.ckpt`. Now there are dozens or more
+that have been fine tuned to provide particulary styles, genres, or
+other features. In addition, there are several new formats that
+improve on the original checkpoint format: a `.safetensors` format
+which prevents malware from masquerading as a model, and `diffusers`
+models, the most recent innovation.
-This manual will guide you through installing and configuring model weight
-files.
+InvokeAI supports all three formats but strongly prefers the
+`diffusers` format. These are distributed as directories containing
+multiple subfolders, each of which contains a different aspect of the
+model. The advantage of this is that the models load from disk really
+fast. Another advantage is that `diffusers` models are supported by a
+large and active set of open source developers working at and with
+HuggingFace organization, and improvements in both rendering quality
+and performance are being made at a rapid pace. Among other features
+is the ability to download and install a `diffusers` model just by
+providing its HuggingFace repository ID.
+
+While InvokeAI will continue to support `.ckpt` and `.safetensors`
+models for the near future, these are deprecated and support will
+likely be withdrawn at some point in the not-too-distant future.
+
+This manual will guide you through installing and configuring model
+weight files and converting legacy `.ckpt` and `.safetensors` files
+into performant `diffusers` models.
## Base Models
-InvokeAI comes with support for a good initial set of models listed in the model
-configuration file `configs/models.yaml`. They are:
+InvokeAI comes with support for a good set of starter models. You'll
+find them listed in the master models file
+`configs/INITIAL_MODELS.yaml` in the InvokeAI root directory. The
+subset that are currently installed are found in
+`configs/models.yaml`. The current list is:
-| Model | Weight File | Description | DOWNLOAD FROM |
+| Model | HuggingFace Repo ID | Description | URL
| -------------------- | --------------------------------- | ---------------------------------------------------------- | -------------------------------------------------------------- |
-| stable-diffusion-1.5 | v1-5-pruned-emaonly.ckpt | Most recent version of base Stable Diffusion model | https://huggingface.co/runwayml/stable-diffusion-v1-5 |
-| stable-diffusion-1.4 | sd-v1-4.ckpt | Previous version of base Stable Diffusion model | https://huggingface.co/CompVis/stable-diffusion-v-1-4-original |
-| inpainting-1.5 | sd-v1-5-inpainting.ckpt | Stable Diffusion 1.5 model specialized for inpainting | https://huggingface.co/runwayml/stable-diffusion-inpainting |
-| waifu-diffusion-1.3 | model-epoch09-float32.ckpt | Stable Diffusion 1.4 trained to produce anime images | https://huggingface.co/hakurei/waifu-diffusion-v1-3 |
-| `` | vae-ft-mse-840000-ema-pruned.ckpt | A fine-tune file add-on file that improves face generation | https://huggingface.co/stabilityai/sd-vae-ft-mse-original/ |
+| stable-diffusion-1.5 | runwayml/stable-diffusion-v1-5 | Most recent version of base Stable Diffusion model | https://huggingface.co/runwayml/stable-diffusion-v1-5 |
+| stable-diffusion-1.4 | runwayml/stable-diffusion-v1-4 | Previous version of base Stable Diffusion model | https://huggingface.co/runwayml/stable-diffusion-v1-4 |
+| inpainting-1.5 | runwayml/stable-diffusion-inpainting | Stable diffusion 1.5 optimized for inpainting | https://huggingface.co/runwayml/stable-diffusion-inpainting |
+| stable-diffusion-2.1-base |stabilityai/stable-diffusion-2-1-base | Stable Diffusion version 2.1 trained on 512 pixel images | https://huggingface.co/stabilityai/stable-diffusion-2-1-base |
+| stable-diffusion-2.1-768 |stabilityai/stable-diffusion-2-1 | Stable Diffusion version 2.1 trained on 768 pixel images | https://huggingface.co/stabilityai/stable-diffusion-2-1 |
+| dreamlike-diffusion-1.0 | dreamlike-art/dreamlike-diffusion-1.0 | An SD 1.5 model finetuned on high quality art | https://huggingface.co/dreamlike-art/dreamlike-diffusion-1.0 |
+| dreamlike-photoreal-2.0 | dreamlike-art/dreamlike-photoreal-2.0 | A photorealistic model trained on 768 pixel images| https://huggingface.co/dreamlike-art/dreamlike-photoreal-2.0 |
+| openjourney-4.0 | prompthero/openjourney | An SD 1.5 model finetuned on Midjourney images prompt with "mdjrny-v4 style" | https://huggingface.co/prompthero/openjourney |
+| nitro-diffusion-1.0 | nitrosocke/Nitro-Diffusion | An SD 1.5 model finetuned on three styles, prompt with "archer style", "arcane style" or "modern disney style" | https://huggingface.co/nitrosocke/Nitro-Diffusion|
+| trinart-2.0 | naclbit/trinart_stable_diffusion_v2 | An SD 1.5 model finetuned with ~40,000 assorted high resolution manga/anime-style pictures | https://huggingface.co/naclbit/trinart_stable_diffusion_v2|
+| trinart-characters-2_0 | naclbit/trinart_derrida_characters_v2_stable_diffusion | An SD 1.5 model finetuned with 19.2M manga/anime-style pictures | https://huggingface.co/naclbit/trinart_derrida_characters_v2_stable_diffusion|
Note that these files are covered by an "Ethical AI" license which forbids
-certain uses. You will need to create an account on the Hugging Face website and
-accept the license terms before you can access the files.
-
-The predefined configuration file for InvokeAI (located at
-`configs/models.yaml`) provides entries for each of these weights files.
-`stable-diffusion-1.5` is the default model used, and we strongly recommend that
-you install this weights file if nothing else.
+certain uses. When you initially download them, you are asked to
+accept the license terms.
## Community-Contributed Models
-There are too many to list here and more are being contributed every day.
-Hugging Face maintains a
-[fast-growing repository](https://huggingface.co/sd-concepts-library) of
-fine-tune (".bin") models that can be imported into InvokeAI by passing the
-`--embedding_path` option to the `invoke.py` command.
+There are too many to list here and more are being contributed every
+day. [HuggingFace](https://huggingface.co/models?library=diffusers)
+is a great resource for diffusers models, and is also the home of a
+[fast-growing repository](https://huggingface.co/sd-concepts-library)
+of embedding (".bin") models that add subjects and/or styles to your
+images. The latter are automatically installed on the fly when you
+include the text `` in your prompt. See [Concepts
+Library](../features/CONCEPTS.md) for more information.
-[This page](https://rentry.org/sdmodels) hosts a large list of official and
-unofficial Stable Diffusion models and where they can be obtained.
+Another popular site for community-contributed models is
+[CIVITAI](https://civitai.com). This extensive site currently supports
+only `.safetensors` and `.ckpt` models, but they can be easily loaded
+into InvokeAI and/or converted into optimized `diffusers` models. Be
+aware that CIVITAI hosts many models that generate NSFW content.
## Installation
-There are three ways to install weights files:
+There are multiple ways to install and manage models:
-1. During InvokeAI installation, the `invokeai-configure` script can download
- them for you.
+1. The `invokeai-configure` script which will download and install them for you.
-2. You can use the command-line interface (CLI) to import, configure and modify
- new models files.
+2. The command-line tool (CLI) has commands that allows you to import, configure and modify
+ models files.
-3. You can download the files manually and add the appropriate entries to
- `models.yaml`.
+3. The web interface (WebUI) has a GUI for importing and managing
+models.
### Installation via `invokeai-configure`
-This is the most automatic way. Run `invokeai-configure` from the
-console. It will ask you to select which models to download and lead you through
-the steps of setting up a Hugging Face account if you haven't done so already.
-
-To start, run `invokeai-configure` from within the InvokeAI:
-directory
-
-!!! example ""
-
- ```text
- Loading Python libraries...
-
- ** INTRODUCTION **
- Welcome to InvokeAI. This script will help download the Stable Diffusion weight files
- and other large models that are needed for text to image generation. At any point you may interrupt
- this program and resume later.
-
- ** WEIGHT SELECTION **
- Would you like to download the Stable Diffusion model weights now? [y]
-
- Choose the weight file(s) you wish to download. Before downloading you
- will be given the option to view and change your selections.
-
- [1] stable-diffusion-1.5:
- The newest Stable Diffusion version 1.5 weight file (4.27 GB) (recommended)
- Download? [y]
- [2] inpainting-1.5:
- RunwayML SD 1.5 model optimized for inpainting (4.27 GB) (recommended)
- Download? [y]
- [3] stable-diffusion-1.4:
- The original Stable Diffusion version 1.4 weight file (4.27 GB)
- Download? [n] n
- [4] waifu-diffusion-1.3:
- Stable Diffusion 1.4 fine tuned on anime-styled images (4.27 GB)
- Download? [n] y
- [5] ft-mse-improved-autoencoder-840000:
- StabilityAI improved autoencoder fine-tuned for human faces (recommended; 335 MB) (recommended)
- Download? [y] y
- The following weight files will be downloaded:
- [1] stable-diffusion-1.5*
- [2] inpainting-1.5
- [4] waifu-diffusion-1.3
- [5] ft-mse-improved-autoencoder-840000
- *default
- Ok to download? [y]
- ** LICENSE AGREEMENT FOR WEIGHT FILES **
-
- 1. To download the Stable Diffusion weight files you need to read and accept the
- CreativeML Responsible AI license. If you have not already done so, please
- create an account using the "Sign Up" button:
-
- https://huggingface.co
-
- You will need to verify your email address as part of the HuggingFace
- registration process.
-
- 2. After creating the account, login under your account and accept
- the license terms located here:
-
- https://huggingface.co/CompVis/stable-diffusion-v-1-4-original
-
- Press when you are ready to continue:
- ...
- ```
-
-When the script is complete, you will find the downloaded weights files in
-`models/ldm/stable-diffusion-v1` and a matching configuration file in
-`configs/models.yaml`.
-
-You can run the script again to add any models you didn't select the first time.
-Note that as a safety measure the script will _never_ remove a
-previously-installed weights file. You will have to do this manually.
+From the `invoke` launcher, choose option (6) "re-run the configure
+script to download new models." This will launch the same script that
+prompted you to select models at install time. You can use this to add
+models that you skipped the first time around. It is all right to
+specify a model that was previously downloaded; the script will just
+confirm that the files are complete.
### Installation via the CLI
You can install a new model, including any of the community-supported ones, via
the command-line client's `!import_model` command.
-1. First download the desired model weights file and place it under
- `models/ldm/stable-diffusion-v1/`. You may rename the weights file to
- something more memorable if you wish. Record the path of the weights file
- (e.g. `models/ldm/stable-diffusion-v1/arabian-nights-1.0.ckpt`)
+#### Installing `.ckpt` and `.safetensors` models
-2. Launch the `invoke.py` CLI with `python scripts/invoke.py`.
+If the model is already downloaded to your local disk, use
+`!import_model /path/to/file.ckpt` to load it. For example:
-3. At the `invoke>` command-line, enter the command
- `!import_model `. For example:
+```bash
+invoke> !import_model C:/Users/fred/Downloads/martians.safetensors
+```
- `invoke> !import_model models/ldm/stable-diffusion-v1/arabian-nights-1.0.ckpt`
+!!! tip "Forward Slashes"
+ On Windows systems, use forward slashes rather than backslashes
+ in your file paths.
+ If you do use backslashes,
+ you must double them like this:
+ `C:\\Users\\fred\\Downloads\\martians.safetensors`
- !!! tip "the CLI supports file path autocompletion"
+Alternatively you can directly import the file using its URL:
+```bash
+invoke> !import_model https://example.org/sd_models/martians.safetensors
+```
+
+For this to work, the URL must not be password-protected. Otherwise
+you will receive a 404 error.
+
+When you import a legacy model, the CLI will ask you a few questions
+about the model, including what size image it was trained on (usually
+512x512), what name and description you wish to use for it, what
+configuration file to use for it (usually the default
+`v1-inference.yaml`), whether you'd like to make this model the
+default at startup time, and whether you would like to install a
+custom VAE (variable autoencoder) file for the model. For recent
+models, the answer to the VAE question is usually "no," but it won't
+hurt to answer "yes".
+
+#### Installing `diffusers` models
+
+You can install a `diffusers` model from the HuggingFace site using
+`!import_model` and the HuggingFace repo_id for the model:
+
+```bash
+invoke> !import_model andite/anything-v4.0
+```
+
+Alternatively, you can download the model to disk and import it from
+there. The model may be distributed as a ZIP file, or as a Git
+repository:
+
+```bash
+invoke> !import_model C:/Users/fred/Downloads/andite--anything-v4.0
+```
+
+!!! tip "The CLI supports file path autocompletion"
Type a bit of the path name and hit ++tab++ in order to get a choice of
possible completions.
- !!! tip "on Windows, you can drag model files onto the command-line"
+!!! tip "On Windows, you can drag model files onto the command-line"
+ Once you have typed in `!import_model `, you can drag the
+ model file or directory onto the command-line to insert the model path. This way, you don't need to
+ type it or copy/paste. However, you will need to reverse or
+ double backslashes as noted above.
- Once you have typed in `!import_model `, you can drag the model `.ckpt` file
- onto the command-line to insert the model path. This way, you don't need to
- type it or copy/paste.
+Before installing, the CLI will ask you for a short name and
+description for the model, whether to make this the default model that
+is loaded at InvokeAI startup time, and whether to replace its
+VAE. Generally the answer to the latter question is "no".
-4. Follow the wizard's instructions to complete installation as shown in the
- example here:
+### Converting legacy models into `diffusers`
- !!! example ""
+The CLI `!convert_model` will convert a `.safetensors` or `.ckpt`
+models file into `diffusers` and install it.This will enable the model
+to load and run faster without loss of image quality.
- ```text
- invoke> !import_model models/ldm/stable-diffusion-v1/arabian-nights-1.0.ckpt
- >> Model import in process. Please enter the values needed to configure this model:
+The usage is identical to `!import_model`. You may point the command
+to either a downloaded model file on disk, or to a (non-password
+protected) URL:
- Name for this model: arabian-nights
- Description of this model: Arabian Nights Fine Tune v1.0
- Configuration file for this model: configs/stable-diffusion/v1-inference.yaml
- Default image width: 512
- Default image height: 512
- >> New configuration:
- arabian-nights:
- config: configs/stable-diffusion/v1-inference.yaml
- description: Arabian Nights Fine Tune v1.0
- height: 512
- weights: models/ldm/stable-diffusion-v1/arabian-nights-1.0.ckpt
- width: 512
- OK to import [n]? y
- >> Caching model stable-diffusion-1.4 in system RAM
- >> Loading waifu-diffusion from models/ldm/stable-diffusion-v1/arabian-nights-1.0.ckpt
- | LatentDiffusion: Running in eps-prediction mode
- | DiffusionWrapper has 859.52 M params.
- | Making attention of type 'vanilla' with 512 in_channels
- | Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
- | Making attention of type 'vanilla' with 512 in_channels
- | Using faster float16 precision
- ```
+```bash
+invoke> !convert_model C:/Users/fred/Downloads/martians.safetensors
+```
-If you've previously installed the fine-tune VAE file
-`vae-ft-mse-840000-ema-pruned.ckpt`, the wizard will also ask you if you want to
-add this VAE to the model.
+After a successful conversion, the CLI will offer you the option of
+deleting the original `.ckpt` or `.safetensors` file.
-The appropriate entry for this model will be added to `configs/models.yaml` and
-it will be available to use in the CLI immediately.
+### Optimizing a previously-installed model
-The CLI has additional commands for switching among, viewing, editing, deleting
-the available models. These are described in
-[Command Line Client](../features/CLI.md#model-selection-and-importation), but
-the two most frequently-used are `!models` and `!switch `. The
-first prints a table of models that InvokeAI knows about and their load status.
-The second will load the requested model and lets you switch back and forth
-quickly among loaded models.
+Lastly, if you have previously installed a `.ckpt` or `.safetensors`
+file and wish to convert it into a `diffusers` model, you can do this
+without re-downloading and converting the original file using the
+`!optimize_model` command. Simply pass the short name of an existing
+installed model:
+
+```bash
+invoke> !optimize_model martians-v1.0
+```
+
+The model will be converted into `diffusers` format and replace the
+previously installed version. You will again be offered the
+opportunity to delete the original `.ckpt` or `.safetensors` file.
+
+### Related CLI Commands
+
+There are a whole series of additional model management commands in
+the CLI that you can read about in [Command-Line
+Interface](../features/CLI.md). These include:
+
+* `!models` - List all installed models
+* `!switch ` - Switch to the indicated model
+* `!edit_model ` - Edit the indicated model to change its name, description or other properties
+* `!del_model ` - Delete the indicated model
+
+### Manually editing `configs/models.yaml`
-### Manually editing of `configs/models.yaml`
If you are comfortable with a text editor then you may simply edit `models.yaml`
directly.
-First you need to download the desired .ckpt file and place it in
-`models/ldm/stable-diffusion-v1` as descirbed in step #1 in the previous
-section. Record the path to the weights file, e.g.
-`models/ldm/stable-diffusion-v1/arabian-nights-1.0.ckpt`
+You will need to download the desired `.ckpt/.safetensors` file and
+place it somewhere on your machine's filesystem. Alternatively, for a
+`diffusers` model, record the repo_id or download the whole model
+directory. Then using a **text** editor (e.g. the Windows Notepad
+application), open the file `configs/models.yaml`, and add a new
+stanza that follows this model:
-Then using a **text** editor (e.g. the Windows Notepad application), open the
-file `configs/models.yaml`, and add a new stanza that follows this model:
+#### A legacy model
+
+A legacy `.ckpt` or `.safetensors` entry will look like this:
```yaml
arabian-nights-1.0:
description: A great fine-tune in Arabian Nights style
- weights: ./models/ldm/stable-diffusion-v1/arabian-nights-1.0.ckpt
+ weights: ./path/to/arabian-nights-1.0.ckpt
config: ./configs/stable-diffusion/v1-inference.yaml
+ format: ckpt
width: 512
height: 512
- vae: ./models/ldm/stable-diffusion-v1/vae-ft-mse-840000-ema-pruned.ckpt
default: false
```
-| name | description |
-| :----------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| arabian-nights-1.0 | This is the name of the model that you will refer to from within the CLI and the WebGUI when you need to load and use the model. |
-| description | Any description that you want to add to the model to remind you what it is. |
-| weights | Relative path to the .ckpt weights file for this model. |
-| config | This is the confusingly-named configuration file for the model itself. Use `./configs/stable-diffusion/v1-inference.yaml` unless the model happens to need a custom configuration, in which case the place you downloaded it from will tell you what to use instead. For example, the runwayML custom inpainting model requires the file `configs/stable-diffusion/v1-inpainting-inference.yaml`. This is already inclued in the InvokeAI distribution and is configured automatically for you by the `invokeai-configure` script. |
-| vae | If you want to add a VAE file to the model, then enter its path here. |
-| width, height | This is the width and height of the images used to train the model. Currently they are always 512 and 512. |
+Note that `format` is `ckpt` for both `.ckpt` and `.safetensors` files.
+
+#### A diffusers model
+
+A stanza for a `diffusers` model will look like this for a HuggingFace
+model with a repository ID:
+
+```yaml
+arabian-nights-1.1:
+ description: An even better fine-tune of the Arabian Nights
+ repo_id: captahab/arabian-nights-1.1
+ format: diffusers
+ default: true
+```
+
+And for a downloaded directory:
+
+```yaml
+arabian-nights-1.1:
+ description: An even better fine-tune of the Arabian Nights
+ path: /path/to/captahab-arabian-nights-1.1
+ format: diffusers
+ default: true
+```
+
+There is additional syntax for indicating an external VAE to use with
+this model. See `INITIAL_MODELS.yaml` and `models.yaml` for examples.
+
+After you save the modified `models.yaml` file relaunch
+`invokeai`. The new model will now be available for your use.
+
+### Installation via the WebUI
+
+To access the WebUI Model Manager, click on the button that looks like
+a cute in the upper right side of the browser screen. This will bring
+up a dialogue that lists the models you have already installed, and
+allows you to load, delete or edit them:
+
+
+
+
+
+To add a new model, click on **+ Add New** and select to either a
+checkpoint/safetensors model, or a diffusers model:
+
+
+
+
+
+In this example, we chose **Add Diffusers**. As shown in the figure
+below, a new dialogue prompts you to enter the name to use for the
+model, its description, and either the location of the `diffusers`
+model on disk, or its Repo ID on the HuggingFace web site. If you
+choose to enter a path to disk, the system will autocomplete for you
+as you type:
+
+
+
+
+
+Press **Add Model** at the bottom of the dialogue (scrolled out of
+site in the figure), and the model will be downloaded, imported, and
+registered in `models.yaml`.
+
+The **Add Checkpoint/Safetensor Model** option is similar, except that
+in this case you can choose to scan an entire folder for
+checkpoint/safetensors files to import. Simply type in the path of the
+directory and press the "Search" icon. This will display the
+`.ckpt` and `.safetensors` found inside the directory and its
+subfolders, and allow you to choose which ones to import:
+
+
+
+
+
+## Model Management Startup Options
+
+The `invoke` launcher and the `invokeai` script accept a series of
+command-line arguments that modify InvokeAI's behavior when loading
+models. These can be provided on the command line, or added to the
+InvokeAI root directory's `invokeai.init` initialization file.
+
+The arguments are:
+
+* `--model ` -- Start up with the indicated model loaded
+* `--ckpt_convert` -- When a checkpoint/safetensors model is loaded, convert it into a `diffusers` model in memory. This does not permanently save the converted model to disk.
+* `--autoconvert ` -- Scan the indicated directory path for new checkpoint/safetensors files, convert them into `diffusers` models, and import them into InvokeAI.
+
+Here is an example of providing an argument on the command line using
+the `invoke.sh` launch script:
+
+```bash
+invoke.sh --autoconvert /home/fred/stable-diffusion-checkpoints
+```
+
+And here is what the same argument looks like in `invokeai.init`:
+
+```
+--outdir="/home/fred/invokeai/outputs
+--no-nsfw_checker
+--autoconvert /home/fred/stable-diffusion-checkpoints
+```
-Save the `models.yaml` and relaunch InvokeAI. The new model should now be
-available for your use.
diff --git a/docs/installation/index.md b/docs/installation/index.md
index 51753f2c9b..eb6c935fb7 100644
--- a/docs/installation/index.md
+++ b/docs/installation/index.md
@@ -3,7 +3,19 @@ title: Overview
---
We offer several ways to install InvokeAI, each one suited to your
-experience and preferences.
+experience and preferences. We suggest that everyone start by
+reviewing the
+[hardware](010_INSTALL_AUTOMATED.md#hardware_requirements) and
+[software](010_INSTALL_AUTOMATED.md#software_requirements)
+requirements, as they are the same across each install method. Then
+pick the install method most suitable to your level of experience and
+needs.
+
+See the [troubleshooting
+section](010_INSTALL_AUTOMATED.md#troubleshooting) of the automated
+install guide for frequently-encountered installation issues.
+
+## Main Application
1. [Automated Installer](010_INSTALL_AUTOMATED.md)
@@ -18,8 +30,8 @@ experience and preferences.
InvokeAI and its dependencies. We offer two recipes: one suited to
those who prefer the `conda` tool, and one suited to those who prefer
`pip` and Python virtual environments. In our hands the pip install
- is faster and more reliable, but your mileage may vary.
- Note that the conda installation method is currently deprecated and
+ is faster and more reliable, but your mileage may vary.
+ Note that the conda installation method is currently deprecated and
will not be supported at some point in the future.
This method is recommended for users who have previously used `conda`
@@ -33,3 +45,10 @@ experience and preferences.
InvokeAI and its dependencies. This method is recommended for
individuals with experience with Docker containers and understand
the pluses and minuses of a container-based install.
+
+## Quick Guides
+
+* [Installing CUDA and ROCm Drivers](./030_INSTALL_CUDA_AND_ROCM.md)
+* [Installing XFormers](./070_INSTALL_XFORMERS.md)
+* [Installing PyPatchMatch](./060_INSTALL_PATCHMATCH.md)
+* [Installing New Models](./050_INSTALLING_MODELS.md)
diff --git a/installer/create_installer.sh b/installer/create_installer.sh
old mode 100644
new mode 100755
index 9eff689a60..82826d7c2b
--- a/installer/create_installer.sh
+++ b/installer/create_installer.sh
@@ -56,12 +56,12 @@ rm -rf InvokeAI-Installer
# copy content
mkdir InvokeAI-Installer
-for f in templates *.py *.txt *.reg; do
+for f in templates lib *.txt *.reg; do
cp -r ${f} InvokeAI-Installer/
done
# Move the wheel
-mv dist/*.whl InvokeAI-Installer/
+mv dist/*.whl InvokeAI-Installer/lib/
# Install scripts
# Mac/Linux
@@ -75,17 +75,6 @@ cp WinLongPathsEnabled.reg InvokeAI-Installer/
# Zip everything up
zip -r InvokeAI-installer-$VERSION.zip InvokeAI-Installer
-# Updater
-mkdir tmp
-cp templates/update.sh.in tmp/update.sh
-cp templates/update.bat.in tmp/update.bat
-chmod +x tmp/update.sh
-chmod +x tmp/update.bat
-cd tmp
-zip InvokeAI-updater-$VERSION.zip update.sh update.bat
-cd ..
-mv tmp/InvokeAI-updater-$VERSION.zip .
-
# clean up
rm -rf InvokeAI-Installer tmp dist
diff --git a/installer/install.bat.in b/installer/install.bat.in
index b95ab65fd1..3e68568d3c 100644
--- a/installer/install.bat.in
+++ b/installer/install.bat.in
@@ -66,8 +66,7 @@ del /q .tmp1 .tmp2
@rem -------------- Install and Configure ---------------
-call python main.py
-
+call python .\lib\main.py
@rem ------------------------ Subroutines ---------------
@rem routine to do comparison of semantic version numbers
diff --git a/installer/install.sh.in b/installer/install.sh.in
index 2c354d413b..e78023dfcd 100755
--- a/installer/install.sh.in
+++ b/installer/install.sh.in
@@ -27,4 +27,4 @@ if [ -z "$PYTHON" ]; then
exit -1
fi
-exec $PYTHON ./main.py ${@}
+exec $PYTHON ./lib/main.py ${@}
diff --git a/installer/__init__.py b/installer/lib/__init__.py
similarity index 100%
rename from installer/__init__.py
rename to installer/lib/__init__.py
diff --git a/installer/installer.py b/installer/lib/installer.py
similarity index 99%
rename from installer/installer.py
rename to installer/lib/installer.py
index 053341df21..fb1fd2b217 100644
--- a/installer/installer.py
+++ b/installer/lib/installer.py
@@ -359,7 +359,7 @@ class InvokeAiInstance:
scripts = ['invoke']
for script in scripts:
- src = Path(__file__).parent / "templates" / f"{script}.{ext}.in"
+ src = Path(__file__).parent / '..' / "templates" / f"{script}.{ext}.in"
dest = self.runtime / f"{script}.{ext}"
shutil.copy(src, dest)
os.chmod(dest, 0o0755)
diff --git a/installer/main.py b/installer/lib/main.py
similarity index 100%
rename from installer/main.py
rename to installer/lib/main.py
diff --git a/installer/messages.py b/installer/lib/messages.py
similarity index 85%
rename from installer/messages.py
rename to installer/lib/messages.py
index 888eb28df0..dfc09dd94a 100644
--- a/installer/messages.py
+++ b/installer/lib/messages.py
@@ -9,10 +9,9 @@ from pathlib import Path
from prompt_toolkit import prompt
from prompt_toolkit.completion import PathCompleter
-from prompt_toolkit.shortcuts import CompleteStyle
from prompt_toolkit.validation import Validator
from rich import box, print
-from rich.console import Console, Group
+from rich.console import Console, Group, group
from rich.panel import Panel
from rich.prompt import Confirm
from rich.style import Style
@@ -37,17 +36,21 @@ else:
def welcome():
+
+ @group()
+ def text():
+ if (platform_specific := _platform_specific_help()) != "":
+ yield platform_specific
+ yield ""
+ yield Text.from_markup("Some of the installation steps take a long time to run. Please be patient. If the script appears to hang for more than 10 minutes, please interrupt with [i]Control-C[/] and retry.", justify="center")
+
console.rule()
print(
Panel(
title="[bold wheat1]Welcome to the InvokeAI Installer",
- renderable=Text(
- "Some of the installation steps take a long time to run. Please be patient. If the script appears to hang for more than 10 minutes, please interrupt with control-C and retry.",
- justify="center",
- ),
+ renderable=text(),
box=box.DOUBLE,
- width=80,
- expand=False,
+ expand=True,
padding=(1, 2),
style=Style(bgcolor="grey23", color="orange1"),
subtitle=f"[bold grey39]{OS}-{ARCH}",
@@ -200,7 +203,7 @@ def graphical_accelerator():
[
f"Detected the [gold1]{OS}-{ARCH}[/] platform",
"",
- "See [steel_blue3]https://invoke-ai.github.io/InvokeAI/#system[/] to ensure your system meets the minimum requirements.",
+ "See [deep_sky_blue1]https://invoke-ai.github.io/InvokeAI/#system[/] to ensure your system meets the minimum requirements.",
"",
"[red3]🠶[/] [b]Your GPU drivers must be correctly installed before using InvokeAI![/] [red3]🠴[/]",
]
@@ -294,3 +297,16 @@ def introduction() -> None:
)
)
console.line(2)
+
+def _platform_specific_help()->str:
+ if OS == "Darwin":
+ text = Text.from_markup("""[b wheat1]macOS Users![/]\n\nPlease be sure you have the [b wheat1]Xcode command-line tools[/] installed before continuing.\nIf not, cancel with [i]Control-C[/] and follow the Xcode install instructions at [deep_sky_blue1]https://www.freecodecamp.org/news/install-xcode-command-line-tools/[/].""")
+ elif OS == "Windows":
+ text = Text.from_markup("""[b wheat1]Windows Users![/]\n\nBefore you start, please do the following:
+ 1. Double-click on the file [b wheat1]WinLongPathsEnabled.reg[/] in order to
+ enable long path support on your system.
+ 2. Make sure you have the [b wheat1]Visual C++ core libraries[/] installed. If not, install from
+ [deep_sky_blue1]https://learn.microsoft.com/en-US/cpp/windows/latest-supported-vc-redist?view=msvc-170[/]""")
+ else:
+ text = ""
+ return text
diff --git a/installer/templates/invoke.bat.in b/installer/templates/invoke.bat.in
index 9fd05ca37e..f1a5ca5ef2 100644
--- a/installer/templates/invoke.bat.in
+++ b/installer/templates/invoke.bat.in
@@ -13,7 +13,8 @@ echo 3. run textual inversion training
echo 4. merge models (diffusers type only)
echo 5. re-run the configure script to download new models
echo 6. open the developer console
-set /P restore="Please enter 1, 2, 3, 4 or 5: [2] "
+echo 7. command-line help
+set /P restore="Please enter 1, 2, 3, 4, 5, 6 or 7: [2] "
if not defined restore set restore=2
IF /I "%restore%" == "1" (
echo Starting the InvokeAI command-line..
@@ -42,6 +43,11 @@ IF /I "%restore%" == "1" (
echo *************************
echo *** Type `exit` to quit this shell and deactivate the Python virtual environment ***
call cmd /k
+) ELSE IF /I "%restore%" == "7" (
+ echo Displaying command line help...
+ python .venv\Scripts\invokeai.exe --help %*
+ pause
+ exit /b
) ELSE (
echo Invalid selection
pause
diff --git a/invokeai/configs/INITIAL_MODELS.yaml b/invokeai/configs/INITIAL_MODELS.yaml
index 04530dd0cc..200c5bdf06 100644
--- a/invokeai/configs/INITIAL_MODELS.yaml
+++ b/invokeai/configs/INITIAL_MODELS.yaml
@@ -1,5 +1,5 @@
stable-diffusion-1.5:
- description: Stable Diffusion version 1.5 weight file (4.27 GB)
+ description: Stable Diffusion version 1.5 diffusers model (4.27 GB)
repo_id: runwayml/stable-diffusion-v1-5
format: diffusers
vae:
@@ -7,14 +7,14 @@ stable-diffusion-1.5:
recommended: True
default: True
inpainting-1.5:
- description: RunwayML SD 1.5 model optimized for inpainting (4.27 GB)
+ description: RunwayML SD 1.5 model optimized for inpainting, diffusers version (4.27 GB)
repo_id: runwayml/stable-diffusion-inpainting
format: diffusers
vae:
repo_id: stabilityai/sd-vae-ft-mse
recommended: True
dreamlike-diffusion-1.0:
- description: An SD 1.5 model fine tuned on high quality art by dreamlike.art
+ description: An SD 1.5 model fine tuned on high quality art by dreamlike.art, diffusers version (2.13 BG)
format: diffusers
repo_id: dreamlike-art/dreamlike-diffusion-1.0
vae:
@@ -49,9 +49,8 @@ nitro-diffusion-1.0:
vae:
repo_id: stabilityai/sd-vae-ft-mse
recommended: False
-
trinart-2.0:
- description: An SD model finetuned with ~40,000 assorted high resolution manga/anime-style pictures (2.13 GB)
+ description: An SD model finetuned with ~40,000 assorted high resolution manga/anime-style pictures, diffusers version (2.13 GB)
repo_id: naclbit/trinart_stable_diffusion_v2
format: diffusers
vae:
diff --git a/invokeai/frontend/.babelrc b/invokeai/frontend/.babelrc
new file mode 100644
index 0000000000..809872138a
--- /dev/null
+++ b/invokeai/frontend/.babelrc
@@ -0,0 +1,13 @@
+{
+ "plugins": [
+ [
+ "transform-imports",
+ {
+ "lodash": {
+ "transform": "lodash/${member}",
+ "preventFullImport": true
+ }
+ }
+ ]
+ ]
+}
diff --git a/invokeai/frontend/.eslintignore b/invokeai/frontend/.eslintignore
new file mode 100644
index 0000000000..31ae502559
--- /dev/null
+++ b/invokeai/frontend/.eslintignore
@@ -0,0 +1,5 @@
+dist/
+.husky/
+node_modules/
+patches/
+public/
diff --git a/invokeai/frontend/.eslintrc.cjs b/invokeai/frontend/.eslintrc.cjs
deleted file mode 100644
index 11da47aa86..0000000000
--- a/invokeai/frontend/.eslintrc.cjs
+++ /dev/null
@@ -1,13 +0,0 @@
-module.exports = {
- extends: [
- 'eslint:recommended',
- 'plugin:@typescript-eslint/recommended',
- 'plugin:react-hooks/recommended',
- ],
- parser: '@typescript-eslint/parser',
- plugins: ['@typescript-eslint', 'eslint-plugin-react-hooks'],
- root: true,
- rules: {
- '@typescript-eslint/no-unused-vars': ['warn', { varsIgnorePattern: '_+' }],
- },
-};
diff --git a/invokeai/frontend/.eslintrc.js b/invokeai/frontend/.eslintrc.js
new file mode 100644
index 0000000000..c0d6f3d3b8
--- /dev/null
+++ b/invokeai/frontend/.eslintrc.js
@@ -0,0 +1,40 @@
+module.exports = {
+ env: {
+ browser: true,
+ es6: true,
+ node: true,
+ },
+ extends: [
+ 'eslint:recommended',
+ 'plugin:@typescript-eslint/recommended',
+ 'plugin:react/recommended',
+ 'plugin:react-hooks/recommended',
+ 'plugin:prettier/recommended',
+ 'plugin:react/jsx-runtime',
+ ],
+ parser: '@typescript-eslint/parser',
+ parserOptions: {
+ ecmaFeatures: {
+ jsx: true,
+ },
+ ecmaVersion: 2018,
+ sourceType: 'module',
+ },
+ plugins: ['react', '@typescript-eslint', 'eslint-plugin-react-hooks'],
+ root: true,
+ rules: {
+ 'react-hooks/exhaustive-deps': 'error',
+ 'no-var': 'error',
+ 'brace-style': 'error',
+ 'prefer-template': 'error',
+ radix: 'error',
+ 'space-before-blocks': 'error',
+ 'import/prefer-default-export': 'off',
+ '@typescript-eslint/no-unused-vars': ['warn', { varsIgnorePattern: '_+' }],
+ },
+ settings: {
+ react: {
+ version: 'detect',
+ },
+ },
+};
diff --git a/invokeai/frontend/.gitignore b/invokeai/frontend/.gitignore
index fb702ebed8..e750940752 100644
--- a/invokeai/frontend/.gitignore
+++ b/invokeai/frontend/.gitignore
@@ -23,3 +23,6 @@ dist-ssr
*.njsproj
*.sln
*.sw?
+
+# build stats
+stats.html
\ No newline at end of file
diff --git a/invokeai/frontend/.husky/pre-commit b/invokeai/frontend/.husky/pre-commit
new file mode 100755
index 0000000000..f6a6881c94
--- /dev/null
+++ b/invokeai/frontend/.husky/pre-commit
@@ -0,0 +1,4 @@
+#!/usr/bin/env sh
+. "$(dirname -- "$0")/_/husky.sh"
+
+cd invokeai/frontend/ && npx run lint
diff --git a/invokeai/frontend/.prettierignore b/invokeai/frontend/.prettierignore
new file mode 100644
index 0000000000..31ae502559
--- /dev/null
+++ b/invokeai/frontend/.prettierignore
@@ -0,0 +1,5 @@
+dist/
+.husky/
+node_modules/
+patches/
+public/
diff --git a/invokeai/frontend/.prettierrc.js b/invokeai/frontend/.prettierrc.js
new file mode 100644
index 0000000000..f1284c64ef
--- /dev/null
+++ b/invokeai/frontend/.prettierrc.js
@@ -0,0 +1,6 @@
+module.exports = {
+ trailingComma: 'es5',
+ tabWidth: 2,
+ semi: true,
+ singleQuote: true,
+};
diff --git a/invokeai/frontend/README.md b/invokeai/frontend/README.md
index 6723716db9..2b620b2c70 100644
--- a/invokeai/frontend/README.md
+++ b/invokeai/frontend/README.md
@@ -17,4 +17,4 @@ From `invokeai/frontend/` run `yarn install` to get everything set up.
To build for dev: `yarn build-dev`
-To build for production: `yarn build`
\ No newline at end of file
+To build for production: `yarn build`
diff --git a/invokeai/frontend/dist/assets/Inter-Bold.790c108b.ttf b/invokeai/frontend/dist/assets/Inter-Bold-790c108b.ttf
similarity index 100%
rename from invokeai/frontend/dist/assets/Inter-Bold.790c108b.ttf
rename to invokeai/frontend/dist/assets/Inter-Bold-790c108b.ttf
diff --git a/invokeai/frontend/dist/assets/Inter.b9a8e5e2.ttf b/invokeai/frontend/dist/assets/Inter-b9a8e5e2.ttf
similarity index 100%
rename from invokeai/frontend/dist/assets/Inter.b9a8e5e2.ttf
rename to invokeai/frontend/dist/assets/Inter-b9a8e5e2.ttf
diff --git a/invokeai/frontend/dist/assets/favicon.0d253ced.ico b/invokeai/frontend/dist/assets/favicon-0d253ced.ico
similarity index 100%
rename from invokeai/frontend/dist/assets/favicon.0d253ced.ico
rename to invokeai/frontend/dist/assets/favicon-0d253ced.ico
diff --git a/invokeai/frontend/dist/assets/index-8606d352.js b/invokeai/frontend/dist/assets/index-8606d352.js
new file mode 100644
index 0000000000..0df2ce25d5
--- /dev/null
+++ b/invokeai/frontend/dist/assets/index-8606d352.js
@@ -0,0 +1,638 @@
+var uee=Object.defineProperty;var cee=(e,t,n)=>t in e?uee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var sn=(e,t,n)=>(cee(e,typeof t!="symbol"?t+"":t,n),n);function rj(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerpolicy&&(o.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?o.credentials="include":i.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var wo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function d_(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var y={},dee={get exports(){return y},set exports(e){y=e}},mS={},w={},fee={get exports(){return w},set exports(e){w=e}},tn={};/**
+ * @license React
+ * react.production.min.js
+ *
+ * Copyright (c) Facebook, Inc. and its affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */var cy=Symbol.for("react.element"),hee=Symbol.for("react.portal"),pee=Symbol.for("react.fragment"),gee=Symbol.for("react.strict_mode"),mee=Symbol.for("react.profiler"),vee=Symbol.for("react.provider"),yee=Symbol.for("react.context"),bee=Symbol.for("react.forward_ref"),See=Symbol.for("react.suspense"),xee=Symbol.for("react.memo"),wee=Symbol.for("react.lazy"),cL=Symbol.iterator;function Cee(e){return e===null||typeof e!="object"?null:(e=cL&&e[cL]||e["@@iterator"],typeof e=="function"?e:null)}var ij={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},oj=Object.assign,aj={};function d0(e,t,n){this.props=e,this.context=t,this.refs=aj,this.updater=n||ij}d0.prototype.isReactComponent={};d0.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};d0.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function sj(){}sj.prototype=d0.prototype;function f_(e,t,n){this.props=e,this.context=t,this.refs=aj,this.updater=n||ij}var h_=f_.prototype=new sj;h_.constructor=f_;oj(h_,d0.prototype);h_.isPureReactComponent=!0;var dL=Array.isArray,lj=Object.prototype.hasOwnProperty,p_={current:null},uj={key:!0,ref:!0,__self:!0,__source:!0};function cj(e,t,n){var r,i={},o=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)lj.call(t,r)&&!uj.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1{const i=t?n.preventTransition():void 0;document.documentElement.dataset.theme=r,document.documentElement.style.colorScheme=r,i==null||i()},setClassName(r){document.body.classList.add(r?j3.dark:j3.light),document.body.classList.remove(r?j3.light:j3.dark)},query(){return window.matchMedia("(prefers-color-scheme: dark)")},getSystemTheme(r){return n.query().matches??r==="dark"?"dark":"light"},addListener(r){const i=n.query(),o=a=>{r(a.matches?"dark":"light")};return typeof i.addListener=="function"?i.addListener(o):i.addEventListener("change",o),()=>{typeof i.removeListener=="function"?i.removeListener(o):i.removeEventListener("change",o)}},preventTransition(){const r=document.createElement("style");return r.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(r),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.head.removeChild(r)})})}}};return n}var Dee="chakra-ui-color-mode";function Nee(e){return{ssr:!1,type:"localStorage",get(t){if(!(globalThis!=null&&globalThis.document))return t;let n;try{n=localStorage.getItem(e)||t}catch{}return n||t},set(t){try{localStorage.setItem(e,t)}catch{}}}}var jee=Nee(Dee),hL=()=>{};function pL(e,t){return e.type==="cookie"&&e.ssr?e.get(t):t}function fj(e){const{value:t,children:n,options:{useSystemColorMode:r,initialColorMode:i,disableTransitionOnChange:o}={},colorModeManager:a=jee}=e,s=i==="dark"?"dark":"light",[l,u]=w.useState(()=>pL(a,s)),[d,h]=w.useState(()=>pL(a)),{getSystemTheme:m,setClassName:v,setDataset:b,addListener:S}=w.useMemo(()=>Ree({preventTransition:o}),[o]),k=i==="system"&&!l?d:l,E=w.useCallback(A=>{const I=A==="system"?m():A;u(I),v(I==="dark"),b(I),a.set(I)},[a,m,v,b]);Ws(()=>{i==="system"&&h(m())},[]),w.useEffect(()=>{const A=a.get();if(A){E(A);return}if(i==="system"){E("system");return}E(s)},[a,s,i,E]);const _=w.useCallback(()=>{E(k==="dark"?"light":"dark")},[k,E]);w.useEffect(()=>{if(r)return S(E)},[r,S,E]);const T=w.useMemo(()=>({colorMode:t??k,toggleColorMode:t?hL:_,setColorMode:t?hL:E,forced:t!==void 0}),[k,_,E,t]);return N.createElement(m_.Provider,{value:T},n)}fj.displayName="ColorModeProvider";var H4={},Bee={get exports(){return H4},set exports(e){H4=e}};(function(e,t){var n=200,r="__lodash_hash_undefined__",i=800,o=16,a=9007199254740991,s="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",d="[object Boolean]",h="[object Date]",m="[object Error]",v="[object Function]",b="[object GeneratorFunction]",S="[object Map]",k="[object Number]",E="[object Null]",_="[object Object]",T="[object Proxy]",A="[object RegExp]",I="[object Set]",R="[object String]",D="[object Undefined]",j="[object WeakMap]",z="[object ArrayBuffer]",V="[object DataView]",K="[object Float32Array]",te="[object Float64Array]",q="[object Int8Array]",F="[object Int16Array]",U="[object Int32Array]",X="[object Uint8Array]",Z="[object Uint8ClampedArray]",W="[object Uint16Array]",Q="[object Uint32Array]",ie=/[\\^$.*+?()[\]{}|]/g,fe=/^\[object .+?Constructor\]$/,Se=/^(?:0|[1-9]\d*)$/,Te={};Te[K]=Te[te]=Te[q]=Te[F]=Te[U]=Te[X]=Te[Z]=Te[W]=Te[Q]=!0,Te[s]=Te[l]=Te[z]=Te[d]=Te[V]=Te[h]=Te[m]=Te[v]=Te[S]=Te[k]=Te[_]=Te[A]=Te[I]=Te[R]=Te[j]=!1;var ye=typeof wo=="object"&&wo&&wo.Object===Object&&wo,He=typeof self=="object"&&self&&self.Object===Object&&self,Ne=ye||He||Function("return this")(),tt=t&&!t.nodeType&&t,_e=tt&&!0&&e&&!e.nodeType&&e,lt=_e&&_e.exports===tt,wt=lt&&ye.process,ct=function(){try{var Y=_e&&_e.require&&_e.require("util").types;return Y||wt&&wt.binding&&wt.binding("util")}catch{}}(),mt=ct&&ct.isTypedArray;function St(Y,re,ge){switch(ge.length){case 0:return Y.call(re);case 1:return Y.call(re,ge[0]);case 2:return Y.call(re,ge[0],ge[1]);case 3:return Y.call(re,ge[0],ge[1],ge[2])}return Y.apply(re,ge)}function Ae(Y,re){for(var ge=-1,it=Array(Y);++ge-1}function N0(Y,re){var ge=this.__data__,it=ms(ge,Y);return it<0?(++this.size,ge.push([Y,re])):ge[it][1]=re,this}ia.prototype.clear=vf,ia.prototype.delete=D0,ia.prototype.get=bc,ia.prototype.has=yf,ia.prototype.set=N0;function il(Y){var re=-1,ge=Y==null?0:Y.length;for(this.clear();++re1?ge[Wt-1]:void 0,kt=Wt>2?ge[2]:void 0;for(Sn=Y.length>3&&typeof Sn=="function"?(Wt--,Sn):void 0,kt&&Ap(ge[0],ge[1],kt)&&(Sn=Wt<3?void 0:Sn,Wt=1),re=Object(re);++it-1&&Y%1==0&&Y0){if(++re>=i)return arguments[0]}else re=0;return Y.apply(void 0,arguments)}}function _c(Y){if(Y!=null){try{return Ue.call(Y)}catch{}try{return Y+""}catch{}}return""}function Fa(Y,re){return Y===re||Y!==Y&&re!==re}var Cf=bu(function(){return arguments}())?bu:function(Y){return Xn(Y)&&Ye.call(Y,"callee")&&!Ke.call(Y,"callee")},wu=Array.isArray;function Yt(Y){return Y!=null&&Mp(Y.length)&&!Ec(Y)}function Op(Y){return Xn(Y)&&Yt(Y)}var kc=rn||K0;function Ec(Y){if(!la(Y))return!1;var re=al(Y);return re==v||re==b||re==u||re==T}function Mp(Y){return typeof Y=="number"&&Y>-1&&Y%1==0&&Y<=a}function la(Y){var re=typeof Y;return Y!=null&&(re=="object"||re=="function")}function Xn(Y){return Y!=null&&typeof Y=="object"}function _f(Y){if(!Xn(Y)||al(Y)!=_)return!1;var re=nn(Y);if(re===null)return!0;var ge=Ye.call(re,"constructor")&&re.constructor;return typeof ge=="function"&&ge instanceof ge&&Ue.call(ge)==_t}var Ip=mt?ut(mt):xc;function kf(Y){return ui(Y,Rp(Y))}function Rp(Y){return Yt(Y)?G0(Y,!0):sl(Y)}var gn=vs(function(Y,re,ge,it){oa(Y,re,ge,it)});function Kt(Y){return function(){return Y}}function Dp(Y){return Y}function K0(){return!1}e.exports=gn})(Bee,H4);const Wl=H4;function Us(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function xh(e,...t){return Fee(e)?e(...t):e}var Fee=e=>typeof e=="function",$ee=e=>/!(important)?$/.test(e),gL=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,QC=(e,t)=>n=>{const r=String(t),i=$ee(r),o=gL(r),a=e?`${e}.${o}`:o;let s=Us(n.__cssMap)&&a in n.__cssMap?n.__cssMap[a].varRef:t;return s=gL(s),i?`${s} !important`:s};function p2(e){const{scale:t,transform:n,compose:r}=e;return(o,a)=>{const s=QC(t,o)(a);let l=(n==null?void 0:n(s,a))??s;return r&&(l=r(l,a)),l}}var B3=(...e)=>t=>e.reduce((n,r)=>r(n),t);function As(e,t){return n=>{const r={property:n,scale:e};return r.transform=p2({scale:e,transform:t}),r}}var zee=({rtl:e,ltr:t})=>n=>n.direction==="rtl"?e:t;function Hee(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:zee(t),transform:n?p2({scale:n,compose:r}):r}}var hj=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];function Vee(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...hj].join(" ")}function Wee(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...hj].join(" ")}var Uee={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},Gee={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};function qee(e){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":e,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}var Yee={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},pj="& > :not(style) ~ :not(style)",Kee={[pj]:{marginInlineStart:"calc(var(--chakra-space-x) * calc(1 - var(--chakra-space-x-reverse)))",marginInlineEnd:"calc(var(--chakra-space-x) * var(--chakra-space-x-reverse))"}},Xee={[pj]:{marginTop:"calc(var(--chakra-space-y) * calc(1 - var(--chakra-space-y-reverse)))",marginBottom:"calc(var(--chakra-space-y) * var(--chakra-space-y-reverse))"}},JC={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},Zee=new Set(Object.values(JC)),gj=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),Qee=e=>e.trim();function Jee(e,t){var n;if(e==null||gj.has(e))return e;const r=/(?^[a-z-A-Z]+)\((?(.*))\)/g,{type:i,values:o}=((n=r.exec(e))==null?void 0:n.groups)??{};if(!i||!o)return e;const a=i.includes("-gradient")?i:`${i}-gradient`,[s,...l]=o.split(",").map(Qee).filter(Boolean);if((l==null?void 0:l.length)===0)return e;const u=s in JC?JC[s]:s;l.unshift(u);const d=l.map(h=>{if(Zee.has(h))return h;const m=h.indexOf(" "),[v,b]=m!==-1?[h.substr(0,m),h.substr(m+1)]:[h],S=mj(b)?b:b&&b.split(" "),k=`colors.${v}`,E=k in t.__cssMap?t.__cssMap[k].varRef:v;return S?[E,...Array.isArray(S)?S:[S]].join(" "):E});return`${a}(${d.join(", ")})`}var mj=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),ete=(e,t)=>Jee(e,t??{});function tte(e){return/^var\(--.+\)$/.test(e)}var nte=e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}},Tl=e=>t=>`${e}(${t})`,hn={filter(e){return e!=="auto"?e:Uee},backdropFilter(e){return e!=="auto"?e:Gee},ring(e){return qee(hn.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?Vee():e==="auto-gpu"?Wee():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=nte(e);return t||typeof e=="number"?`${e}px`:e},fraction(e){return typeof e!="number"||e>1?e:`${e*100}%`},float(e,t){const n={left:"right",right:"left"};return t.direction==="rtl"?n[e]:e},degree(e){if(tte(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:ete,blur:Tl("blur"),opacity:Tl("opacity"),brightness:Tl("brightness"),contrast:Tl("contrast"),dropShadow:Tl("drop-shadow"),grayscale:Tl("grayscale"),hueRotate:Tl("hue-rotate"),invert:Tl("invert"),saturate:Tl("saturate"),sepia:Tl("sepia"),bgImage(e){return e==null||mj(e)||gj.has(e)?e:`url(${e})`},outline(e){const t=String(e)==="0"||String(e)==="none";return e!==null&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){const{space:t,divide:n}=Yee[e]??{},r={flexDirection:e};return t&&(r[t]=1),n&&(r[n]=1),r}},ae={borderWidths:As("borderWidths"),borderStyles:As("borderStyles"),colors:As("colors"),borders:As("borders"),radii:As("radii",hn.px),space:As("space",B3(hn.vh,hn.px)),spaceT:As("space",B3(hn.vh,hn.px)),degreeT(e){return{property:e,transform:hn.degree}},prop(e,t,n){return{property:e,scale:t,...t&&{transform:p2({scale:t,transform:n})}}},propT(e,t){return{property:e,transform:t}},sizes:As("sizes",B3(hn.vh,hn.px)),sizesT:As("sizes",B3(hn.vh,hn.fraction)),shadows:As("shadows"),logical:Hee,blur:As("blur",hn.blur)},n4={background:ae.colors("background"),backgroundColor:ae.colors("backgroundColor"),backgroundImage:ae.propT("backgroundImage",hn.bgImage),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:hn.bgClip},bgSize:ae.prop("backgroundSize"),bgPosition:ae.prop("backgroundPosition"),bg:ae.colors("background"),bgColor:ae.colors("backgroundColor"),bgPos:ae.prop("backgroundPosition"),bgRepeat:ae.prop("backgroundRepeat"),bgAttachment:ae.prop("backgroundAttachment"),bgGradient:ae.propT("backgroundImage",hn.gradient),bgClip:{transform:hn.bgClip}};Object.assign(n4,{bgImage:n4.backgroundImage,bgImg:n4.backgroundImage});var wn={border:ae.borders("border"),borderWidth:ae.borderWidths("borderWidth"),borderStyle:ae.borderStyles("borderStyle"),borderColor:ae.colors("borderColor"),borderRadius:ae.radii("borderRadius"),borderTop:ae.borders("borderTop"),borderBlockStart:ae.borders("borderBlockStart"),borderTopLeftRadius:ae.radii("borderTopLeftRadius"),borderStartStartRadius:ae.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:ae.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:ae.radii("borderTopRightRadius"),borderStartEndRadius:ae.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:ae.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:ae.borders("borderRight"),borderInlineEnd:ae.borders("borderInlineEnd"),borderBottom:ae.borders("borderBottom"),borderBlockEnd:ae.borders("borderBlockEnd"),borderBottomLeftRadius:ae.radii("borderBottomLeftRadius"),borderBottomRightRadius:ae.radii("borderBottomRightRadius"),borderLeft:ae.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:ae.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:ae.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:ae.borders(["borderLeft","borderRight"]),borderInline:ae.borders("borderInline"),borderY:ae.borders(["borderTop","borderBottom"]),borderBlock:ae.borders("borderBlock"),borderTopWidth:ae.borderWidths("borderTopWidth"),borderBlockStartWidth:ae.borderWidths("borderBlockStartWidth"),borderTopColor:ae.colors("borderTopColor"),borderBlockStartColor:ae.colors("borderBlockStartColor"),borderTopStyle:ae.borderStyles("borderTopStyle"),borderBlockStartStyle:ae.borderStyles("borderBlockStartStyle"),borderBottomWidth:ae.borderWidths("borderBottomWidth"),borderBlockEndWidth:ae.borderWidths("borderBlockEndWidth"),borderBottomColor:ae.colors("borderBottomColor"),borderBlockEndColor:ae.colors("borderBlockEndColor"),borderBottomStyle:ae.borderStyles("borderBottomStyle"),borderBlockEndStyle:ae.borderStyles("borderBlockEndStyle"),borderLeftWidth:ae.borderWidths("borderLeftWidth"),borderInlineStartWidth:ae.borderWidths("borderInlineStartWidth"),borderLeftColor:ae.colors("borderLeftColor"),borderInlineStartColor:ae.colors("borderInlineStartColor"),borderLeftStyle:ae.borderStyles("borderLeftStyle"),borderInlineStartStyle:ae.borderStyles("borderInlineStartStyle"),borderRightWidth:ae.borderWidths("borderRightWidth"),borderInlineEndWidth:ae.borderWidths("borderInlineEndWidth"),borderRightColor:ae.colors("borderRightColor"),borderInlineEndColor:ae.colors("borderInlineEndColor"),borderRightStyle:ae.borderStyles("borderRightStyle"),borderInlineEndStyle:ae.borderStyles("borderInlineEndStyle"),borderTopRadius:ae.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:ae.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:ae.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:ae.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(wn,{rounded:wn.borderRadius,roundedTop:wn.borderTopRadius,roundedTopLeft:wn.borderTopLeftRadius,roundedTopRight:wn.borderTopRightRadius,roundedTopStart:wn.borderStartStartRadius,roundedTopEnd:wn.borderStartEndRadius,roundedBottom:wn.borderBottomRadius,roundedBottomLeft:wn.borderBottomLeftRadius,roundedBottomRight:wn.borderBottomRightRadius,roundedBottomStart:wn.borderEndStartRadius,roundedBottomEnd:wn.borderEndEndRadius,roundedLeft:wn.borderLeftRadius,roundedRight:wn.borderRightRadius,roundedStart:wn.borderInlineStartRadius,roundedEnd:wn.borderInlineEndRadius,borderStart:wn.borderInlineStart,borderEnd:wn.borderInlineEnd,borderTopStartRadius:wn.borderStartStartRadius,borderTopEndRadius:wn.borderStartEndRadius,borderBottomStartRadius:wn.borderEndStartRadius,borderBottomEndRadius:wn.borderEndEndRadius,borderStartRadius:wn.borderInlineStartRadius,borderEndRadius:wn.borderInlineEndRadius,borderStartWidth:wn.borderInlineStartWidth,borderEndWidth:wn.borderInlineEndWidth,borderStartColor:wn.borderInlineStartColor,borderEndColor:wn.borderInlineEndColor,borderStartStyle:wn.borderInlineStartStyle,borderEndStyle:wn.borderInlineEndStyle});var rte={color:ae.colors("color"),textColor:ae.colors("color"),fill:ae.colors("fill"),stroke:ae.colors("stroke")},e7={boxShadow:ae.shadows("boxShadow"),mixBlendMode:!0,blendMode:ae.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:ae.prop("backgroundBlendMode"),opacity:!0};Object.assign(e7,{shadow:e7.boxShadow});var ite={filter:{transform:hn.filter},blur:ae.blur("--chakra-blur"),brightness:ae.propT("--chakra-brightness",hn.brightness),contrast:ae.propT("--chakra-contrast",hn.contrast),hueRotate:ae.degreeT("--chakra-hue-rotate"),invert:ae.propT("--chakra-invert",hn.invert),saturate:ae.propT("--chakra-saturate",hn.saturate),dropShadow:ae.propT("--chakra-drop-shadow",hn.dropShadow),backdropFilter:{transform:hn.backdropFilter},backdropBlur:ae.blur("--chakra-backdrop-blur"),backdropBrightness:ae.propT("--chakra-backdrop-brightness",hn.brightness),backdropContrast:ae.propT("--chakra-backdrop-contrast",hn.contrast),backdropHueRotate:ae.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:ae.propT("--chakra-backdrop-invert",hn.invert),backdropSaturate:ae.propT("--chakra-backdrop-saturate",hn.saturate)},V4={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:hn.flexDirection},experimental_spaceX:{static:Kee,transform:p2({scale:"space",transform:e=>e!==null?{"--chakra-space-x":e}:null})},experimental_spaceY:{static:Xee,transform:p2({scale:"space",transform:e=>e!=null?{"--chakra-space-y":e}:null})},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:ae.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:ae.space("gap"),rowGap:ae.space("rowGap"),columnGap:ae.space("columnGap")};Object.assign(V4,{flexDir:V4.flexDirection});var vj={gridGap:ae.space("gridGap"),gridColumnGap:ae.space("gridColumnGap"),gridRowGap:ae.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},ote={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:hn.outline},outlineOffset:!0,outlineColor:ae.colors("outlineColor")},Xa={width:ae.sizesT("width"),inlineSize:ae.sizesT("inlineSize"),height:ae.sizes("height"),blockSize:ae.sizes("blockSize"),boxSize:ae.sizes(["width","height"]),minWidth:ae.sizes("minWidth"),minInlineSize:ae.sizes("minInlineSize"),minHeight:ae.sizes("minHeight"),minBlockSize:ae.sizes("minBlockSize"),maxWidth:ae.sizes("maxWidth"),maxInlineSize:ae.sizes("maxInlineSize"),maxHeight:ae.sizes("maxHeight"),maxBlockSize:ae.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:ae.propT("float",hn.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(Xa,{w:Xa.width,h:Xa.height,minW:Xa.minWidth,maxW:Xa.maxWidth,minH:Xa.minHeight,maxH:Xa.maxHeight,overscroll:Xa.overscrollBehavior,overscrollX:Xa.overscrollBehaviorX,overscrollY:Xa.overscrollBehaviorY});var ate={listStyleType:!0,listStylePosition:!0,listStylePos:ae.prop("listStylePosition"),listStyleImage:!0,listStyleImg:ae.prop("listStyleImage")};function ste(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},ute=lte(ste),cte={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},dte={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},Gw=(e,t,n)=>{const r={},i=ute(e,t,{});for(const o in i)o in n&&n[o]!=null||(r[o]=i[o]);return r},fte={srOnly:{transform(e){return e===!0?cte:e==="focusable"?dte:{}}},layerStyle:{processResult:!0,transform:(e,t,n)=>Gw(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>Gw(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>Gw(t,e,n)}},Rv={position:!0,pos:ae.prop("position"),zIndex:ae.prop("zIndex","zIndices"),inset:ae.spaceT("inset"),insetX:ae.spaceT(["left","right"]),insetInline:ae.spaceT("insetInline"),insetY:ae.spaceT(["top","bottom"]),insetBlock:ae.spaceT("insetBlock"),top:ae.spaceT("top"),insetBlockStart:ae.spaceT("insetBlockStart"),bottom:ae.spaceT("bottom"),insetBlockEnd:ae.spaceT("insetBlockEnd"),left:ae.spaceT("left"),insetInlineStart:ae.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:ae.spaceT("right"),insetInlineEnd:ae.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(Rv,{insetStart:Rv.insetInlineStart,insetEnd:Rv.insetInlineEnd});var hte={ring:{transform:hn.ring},ringColor:ae.colors("--chakra-ring-color"),ringOffset:ae.prop("--chakra-ring-offset-width"),ringOffsetColor:ae.colors("--chakra-ring-offset-color"),ringInset:ae.prop("--chakra-ring-inset")},ar={margin:ae.spaceT("margin"),marginTop:ae.spaceT("marginTop"),marginBlockStart:ae.spaceT("marginBlockStart"),marginRight:ae.spaceT("marginRight"),marginInlineEnd:ae.spaceT("marginInlineEnd"),marginBottom:ae.spaceT("marginBottom"),marginBlockEnd:ae.spaceT("marginBlockEnd"),marginLeft:ae.spaceT("marginLeft"),marginInlineStart:ae.spaceT("marginInlineStart"),marginX:ae.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:ae.spaceT("marginInline"),marginY:ae.spaceT(["marginTop","marginBottom"]),marginBlock:ae.spaceT("marginBlock"),padding:ae.space("padding"),paddingTop:ae.space("paddingTop"),paddingBlockStart:ae.space("paddingBlockStart"),paddingRight:ae.space("paddingRight"),paddingBottom:ae.space("paddingBottom"),paddingBlockEnd:ae.space("paddingBlockEnd"),paddingLeft:ae.space("paddingLeft"),paddingInlineStart:ae.space("paddingInlineStart"),paddingInlineEnd:ae.space("paddingInlineEnd"),paddingX:ae.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:ae.space("paddingInline"),paddingY:ae.space(["paddingTop","paddingBottom"]),paddingBlock:ae.space("paddingBlock")};Object.assign(ar,{m:ar.margin,mt:ar.marginTop,mr:ar.marginRight,me:ar.marginInlineEnd,marginEnd:ar.marginInlineEnd,mb:ar.marginBottom,ml:ar.marginLeft,ms:ar.marginInlineStart,marginStart:ar.marginInlineStart,mx:ar.marginX,my:ar.marginY,p:ar.padding,pt:ar.paddingTop,py:ar.paddingY,px:ar.paddingX,pb:ar.paddingBottom,pl:ar.paddingLeft,ps:ar.paddingInlineStart,paddingStart:ar.paddingInlineStart,pr:ar.paddingRight,pe:ar.paddingInlineEnd,paddingEnd:ar.paddingInlineEnd});var pte={textDecorationColor:ae.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:ae.shadows("textShadow")},gte={clipPath:!0,transform:ae.propT("transform",hn.transform),transformOrigin:!0,translateX:ae.spaceT("--chakra-translate-x"),translateY:ae.spaceT("--chakra-translate-y"),skewX:ae.degreeT("--chakra-skew-x"),skewY:ae.degreeT("--chakra-skew-y"),scaleX:ae.prop("--chakra-scale-x"),scaleY:ae.prop("--chakra-scale-y"),scale:ae.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:ae.degreeT("--chakra-rotate")},mte={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:ae.prop("transitionDuration","transition.duration"),transitionProperty:ae.prop("transitionProperty","transition.property"),transitionTimingFunction:ae.prop("transitionTimingFunction","transition.easing")},vte={fontFamily:ae.prop("fontFamily","fonts"),fontSize:ae.prop("fontSize","fontSizes",hn.px),fontWeight:ae.prop("fontWeight","fontWeights"),lineHeight:ae.prop("lineHeight","lineHeights"),letterSpacing:ae.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},yte={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:ae.spaceT("scrollMargin"),scrollMarginTop:ae.spaceT("scrollMarginTop"),scrollMarginBottom:ae.spaceT("scrollMarginBottom"),scrollMarginLeft:ae.spaceT("scrollMarginLeft"),scrollMarginRight:ae.spaceT("scrollMarginRight"),scrollMarginX:ae.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:ae.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:ae.spaceT("scrollPadding"),scrollPaddingTop:ae.spaceT("scrollPaddingTop"),scrollPaddingBottom:ae.spaceT("scrollPaddingBottom"),scrollPaddingLeft:ae.spaceT("scrollPaddingLeft"),scrollPaddingRight:ae.spaceT("scrollPaddingRight"),scrollPaddingX:ae.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:ae.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function yj(e){return Us(e)&&e.reference?e.reference:String(e)}var vS=(e,...t)=>t.map(yj).join(` ${e} `).replace(/calc/g,""),mL=(...e)=>`calc(${vS("+",...e)})`,vL=(...e)=>`calc(${vS("-",...e)})`,t7=(...e)=>`calc(${vS("*",...e)})`,yL=(...e)=>`calc(${vS("/",...e)})`,bL=e=>{const t=yj(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:t7(t,-1)},yh=Object.assign(e=>({add:(...t)=>yh(mL(e,...t)),subtract:(...t)=>yh(vL(e,...t)),multiply:(...t)=>yh(t7(e,...t)),divide:(...t)=>yh(yL(e,...t)),negate:()=>yh(bL(e)),toString:()=>e.toString()}),{add:mL,subtract:vL,multiply:t7,divide:yL,negate:bL});function bte(e,t="-"){return e.replace(/\s+/g,t)}function Ste(e){const t=bte(e.toString());return wte(xte(t))}function xte(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function wte(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function Cte(e,t=""){return[t,e].filter(Boolean).join("-")}function _te(e,t){return`var(${e}${t?`, ${t}`:""})`}function kte(e,t=""){return Ste(`--${Cte(e,t)}`)}function Vn(e,t,n){const r=kte(e,n);return{variable:r,reference:_te(r,t)}}function Ete(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function Pte(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}function n7(e){if(e==null)return e;const{unitless:t}=Pte(e);return t||typeof e=="number"?`${e}px`:e}var bj=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,v_=e=>Object.fromEntries(Object.entries(e).sort(bj));function SL(e){const t=v_(e);return Object.assign(Object.values(t),t)}function Tte(e){const t=Object.keys(v_(e));return new Set(t)}function xL(e){if(!e)return e;e=n7(e)??e;const t=e.endsWith("px")?-1:-.0625;return typeof e=="number"?`${e+t}`:e.replace(/(\d+\.?\d*)/u,n=>`${parseFloat(n)+t}`)}function mv(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${n7(e)})`),t&&n.push("and",`(max-width: ${n7(t)})`),n.join(" ")}function Lte(e){if(!e)return null;e.base=e.base??"0px";const t=SL(e),n=Object.entries(e).sort(bj).map(([o,a],s,l)=>{let[,u]=l[s+1]??[];return u=parseFloat(u)>0?xL(u):void 0,{_minW:xL(a),breakpoint:o,minW:a,maxW:u,maxWQuery:mv(null,u),minWQuery:mv(a),minMaxQuery:mv(a,u)}}),r=Tte(e),i=Array.from(r.values());return{keys:r,normalized:t,isResponsive(o){const a=Object.keys(o);return a.length>0&&a.every(s=>r.has(s))},asObject:v_(e),asArray:SL(e),details:n,media:[null,...t.map(o=>mv(o)).slice(1)],toArrayValue(o){if(!Us(o))throw new Error("toArrayValue: value must be an object");const a=i.map(s=>o[s]??null);for(;Ete(a)===null;)a.pop();return a},toObjectValue(o){if(!Array.isArray(o))throw new Error("toObjectValue: value must be an array");return o.reduce((a,s,l)=>{const u=i[l];return u!=null&&s!=null&&(a[u]=s),a},{})}}}var $i={hover:(e,t)=>`${e}:hover ${t}, ${e}[data-hover] ${t}`,focus:(e,t)=>`${e}:focus ${t}, ${e}[data-focus] ${t}`,focusVisible:(e,t)=>`${e}:focus-visible ${t}`,focusWithin:(e,t)=>`${e}:focus-within ${t}`,active:(e,t)=>`${e}:active ${t}, ${e}[data-active] ${t}`,disabled:(e,t)=>`${e}:disabled ${t}, ${e}[data-disabled] ${t}`,invalid:(e,t)=>`${e}:invalid ${t}, ${e}[data-invalid] ${t}`,checked:(e,t)=>`${e}:checked ${t}, ${e}[data-checked] ${t}`,indeterminate:(e,t)=>`${e}:indeterminate ${t}, ${e}[aria-checked=mixed] ${t}, ${e}[data-indeterminate] ${t}`,readOnly:(e,t)=>`${e}:read-only ${t}, ${e}[readonly] ${t}, ${e}[data-read-only] ${t}`,expanded:(e,t)=>`${e}:read-only ${t}, ${e}[aria-expanded=true] ${t}, ${e}[data-expanded] ${t}`,placeholderShown:(e,t)=>`${e}:placeholder-shown ${t}`},id=e=>Sj(t=>e(t,"&"),"[role=group]","[data-group]",".group"),Nu=e=>Sj(t=>e(t,"~ &"),"[data-peer]",".peer"),Sj=(e,...t)=>t.map(e).join(", "),yS={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:id($i.hover),_peerHover:Nu($i.hover),_groupFocus:id($i.focus),_peerFocus:Nu($i.focus),_groupFocusVisible:id($i.focusVisible),_peerFocusVisible:Nu($i.focusVisible),_groupActive:id($i.active),_peerActive:Nu($i.active),_groupDisabled:id($i.disabled),_peerDisabled:Nu($i.disabled),_groupInvalid:id($i.invalid),_peerInvalid:Nu($i.invalid),_groupChecked:id($i.checked),_peerChecked:Nu($i.checked),_groupFocusWithin:id($i.focusWithin),_peerFocusWithin:Nu($i.focusWithin),_peerPlaceholderShown:Nu($i.placeholderShown),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]"},Ate=Object.keys(yS);function wL(e,t){return Vn(String(e).replace(/\./g,"-"),void 0,t)}function Ote(e,t){let n={};const r={};for(const[i,o]of Object.entries(e)){const{isSemantic:a,value:s}=o,{variable:l,reference:u}=wL(i,t==null?void 0:t.cssVarPrefix);if(!a){if(i.startsWith("space")){const m=i.split("."),[v,...b]=m,S=`${v}.-${b.join(".")}`,k=yh.negate(s),E=yh.negate(u);r[S]={value:k,var:l,varRef:E}}n[l]=s,r[i]={value:s,var:l,varRef:u};continue}const d=m=>{const b=[String(i).split(".")[0],m].join(".");if(!e[b])return m;const{reference:k}=wL(b,t==null?void 0:t.cssVarPrefix);return k},h=Us(s)?s:{default:s};n=Wl(n,Object.entries(h).reduce((m,[v,b])=>{var S;const k=d(b);if(v==="default")return m[l]=k,m;const E=((S=yS)==null?void 0:S[v])??v;return m[E]={[l]:k},m},{})),r[i]={value:u,var:l,varRef:u}}return{cssVars:n,cssMap:r}}function Mte(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Ite(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var Rte=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur"];function Dte(e){return Ite(e,Rte)}function Nte(e){return e.semanticTokens}function jte(e){const{__cssMap:t,__cssVars:n,__breakpoints:r,...i}=e;return i}function Bte({tokens:e,semanticTokens:t}){const n=Object.entries(r7(e)??{}).map(([i,o])=>[i,{isSemantic:!1,value:o}]),r=Object.entries(r7(t,1)??{}).map(([i,o])=>[i,{isSemantic:!0,value:o}]);return Object.fromEntries([...n,...r])}function r7(e,t=1/0){return!Us(e)&&!Array.isArray(e)||!t?e:Object.entries(e).reduce((n,[r,i])=>(Us(i)||Array.isArray(i)?Object.entries(r7(i,t-1)).forEach(([o,a])=>{n[`${r}.${o}`]=a}):n[r]=i,n),{})}function Fte(e){var t;const n=jte(e),r=Dte(n),i=Nte(n),o=Bte({tokens:r,semanticTokens:i}),a=(t=n.config)==null?void 0:t.cssVarPrefix,{cssMap:s,cssVars:l}=Ote(o,{cssVarPrefix:a});return Object.assign(n,{__cssVars:{...{"--chakra-ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-ring-offset-width":"0px","--chakra-ring-offset-color":"#fff","--chakra-ring-color":"rgba(66, 153, 225, 0.6)","--chakra-ring-offset-shadow":"0 0 #0000","--chakra-ring-shadow":"0 0 #0000","--chakra-space-x-reverse":"0","--chakra-space-y-reverse":"0"},...l},__cssMap:s,__breakpoints:Lte(n.breakpoints)}),n}var y_=Wl({},n4,wn,rte,V4,Xa,ite,hte,ote,vj,fte,Rv,e7,ar,yte,vte,pte,gte,ate,mte),$te=Object.assign({},ar,Xa,V4,vj,Rv),zte=Object.keys($te),Hte=[...Object.keys(y_),...Ate],Vte={...y_,...yS},Wte=e=>e in Vte,Ute=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:i}=t.__breakpoints,o={};for(const a in e){let s=xh(e[a],t);if(s==null)continue;if(s=Us(s)&&n(s)?r(s):s,!Array.isArray(s)){o[a]=s;continue}const l=s.slice(0,i.length).length;for(let u=0;ue.startsWith("--")&&typeof t=="string"&&!qte(t),Kte=(e,t)=>{if(t==null)return t;const n=a=>{var s,l;return(l=(s=e.__cssMap)==null?void 0:s[a])==null?void 0:l.varRef},r=a=>n(a)??a,[i,o]=Gte(t);return t=n(i)??r(o)??r(t),t};function Xte(e){const{configs:t={},pseudos:n={},theme:r}=e,i=(o,a=!1)=>{var s;const l=xh(o,r),u=Ute(l)(r);let d={};for(let h in u){const m=u[h];let v=xh(m,r);h in n&&(h=n[h]),Yte(h,v)&&(v=Kte(r,v));let b=t[h];if(b===!0&&(b={property:h}),Us(v)){d[h]=d[h]??{},d[h]=Wl({},d[h],i(v,!0));continue}let S=((s=b==null?void 0:b.transform)==null?void 0:s.call(b,v,r,l))??v;S=b!=null&&b.processResult?i(S,!0):S;const k=xh(b==null?void 0:b.property,r);if(!a&&(b!=null&&b.static)){const E=xh(b.static,r);d=Wl({},d,E)}if(k&&Array.isArray(k)){for(const E of k)d[E]=S;continue}if(k){k==="&"&&Us(S)?d=Wl({},d,S):d[k]=S;continue}if(Us(S)){d=Wl({},d,S);continue}d[h]=S}return d};return i}var xj=e=>t=>Xte({theme:t,pseudos:yS,configs:y_})(e);function hr(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function Zte(e,t){if(Array.isArray(e))return e;if(Us(e))return t(e);if(e!=null)return[e]}function Qte(e,t){for(let n=t+1;n{Wl(u,{[T]:m?_[T]:{[E]:_[T]}})});continue}if(!v){m?Wl(u,_):u[E]=_;continue}u[E]=_}}return u}}function ene(e){return t=>{const{variant:n,size:r,theme:i}=t,o=Jte(i);return Wl({},xh(e.baseStyle??{},t),o(e,"sizes",r,t),o(e,"variants",n,t))}}function tne(e,t,n){var r,i;return((i=(r=e.__cssMap)==null?void 0:r[`${t}.${n}`])==null?void 0:i.varRef)??n}function En(e){return Mte(e,["styleConfig","size","variant","colorScheme"])}function nne(e){if(e.sheet)return e.sheet;for(var t=0;t0?Wi(f0,--ra):0,zm--,ii===10&&(zm=1,SS--),ii}function Pa(){return ii=ra2||m2(ii)>3?"":" "}function pne(e,t){for(;--t&&Pa()&&!(ii<48||ii>102||ii>57&&ii<65||ii>70&&ii<97););return fy(e,r4()+(t<6&&Yl()==32&&Pa()==32))}function o7(e){for(;Pa();)switch(ii){case e:return ra;case 34:case 39:e!==34&&e!==39&&o7(ii);break;case 40:e===41&&o7(e);break;case 92:Pa();break}return ra}function gne(e,t){for(;Pa()&&e+ii!==47+10;)if(e+ii===42+42&&Yl()===47)break;return"/*"+fy(t,ra-1)+"*"+bS(e===47?e:Pa())}function mne(e){for(;!m2(Yl());)Pa();return fy(e,ra)}function vne(e){return Pj(o4("",null,null,null,[""],e=Ej(e),0,[0],e))}function o4(e,t,n,r,i,o,a,s,l){for(var u=0,d=0,h=a,m=0,v=0,b=0,S=1,k=1,E=1,_=0,T="",A=i,I=o,R=r,D=T;k;)switch(b=_,_=Pa()){case 40:if(b!=108&&Wi(D,h-1)==58){i7(D+=An(i4(_),"&","&\f"),"&\f")!=-1&&(E=-1);break}case 34:case 39:case 91:D+=i4(_);break;case 9:case 10:case 13:case 32:D+=hne(b);break;case 92:D+=pne(r4()-1,7);continue;case 47:switch(Yl()){case 42:case 47:F3(yne(gne(Pa(),r4()),t,n),l);break;default:D+="/"}break;case 123*S:s[u++]=Bl(D)*E;case 125*S:case 59:case 0:switch(_){case 0:case 125:k=0;case 59+d:v>0&&Bl(D)-h&&F3(v>32?_L(D+";",r,n,h-1):_L(An(D," ","")+";",r,n,h-2),l);break;case 59:D+=";";default:if(F3(R=CL(D,t,n,u,d,i,s,T,A=[],I=[],h),o),_===123)if(d===0)o4(D,t,R,R,A,o,h,s,I);else switch(m===99&&Wi(D,3)===110?100:m){case 100:case 109:case 115:o4(e,R,R,r&&F3(CL(e,R,R,0,0,i,s,T,i,A=[],h),I),i,I,h,s,r?A:I);break;default:o4(D,R,R,R,[""],I,0,s,I)}}u=d=v=0,S=E=1,T=D="",h=a;break;case 58:h=1+Bl(D),v=b;default:if(S<1){if(_==123)--S;else if(_==125&&S++==0&&fne()==125)continue}switch(D+=bS(_),_*S){case 38:E=d>0?1:(D+="\f",-1);break;case 44:s[u++]=(Bl(D)-1)*E,E=1;break;case 64:Yl()===45&&(D+=i4(Pa())),m=Yl(),d=h=Bl(T=D+=mne(r4())),_++;break;case 45:b===45&&Bl(D)==2&&(S=0)}}return o}function CL(e,t,n,r,i,o,a,s,l,u,d){for(var h=i-1,m=i===0?o:[""],v=x_(m),b=0,S=0,k=0;b0?m[E]+" "+_:An(_,/&\f/g,m[E])))&&(l[k++]=T);return xS(e,t,n,i===0?b_:s,l,u,d)}function yne(e,t,n){return xS(e,t,n,wj,bS(dne()),g2(e,2,-2),0)}function _L(e,t,n,r){return xS(e,t,n,S_,g2(e,0,r),g2(e,r+1,-1),r)}function hm(e,t){for(var n="",r=x_(e),i=0;i6)switch(Wi(e,t+1)){case 109:if(Wi(e,t+4)!==45)break;case 102:return An(e,/(.+:)(.+)-([^]+)/,"$1"+Cn+"$2-$3$1"+W4+(Wi(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~i7(e,"stretch")?Lj(An(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Wi(e,t+1)!==115)break;case 6444:switch(Wi(e,Bl(e)-3-(~i7(e,"!important")&&10))){case 107:return An(e,":",":"+Cn)+e;case 101:return An(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Cn+(Wi(e,14)===45?"inline-":"")+"box$3$1"+Cn+"$2$3$1"+eo+"$2box$3")+e}break;case 5936:switch(Wi(e,t+11)){case 114:return Cn+e+eo+An(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Cn+e+eo+An(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Cn+e+eo+An(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Cn+e+eo+e+e}return e}var Pne=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case S_:t.return=Lj(t.value,t.length);break;case Cj:return hm([$1(t,{value:An(t.value,"@","@"+Cn)})],i);case b_:if(t.length)return cne(t.props,function(o){switch(une(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return hm([$1(t,{props:[An(o,/:(read-\w+)/,":"+W4+"$1")]})],i);case"::placeholder":return hm([$1(t,{props:[An(o,/:(plac\w+)/,":"+Cn+"input-$1")]}),$1(t,{props:[An(o,/:(plac\w+)/,":"+W4+"$1")]}),$1(t,{props:[An(o,/:(plac\w+)/,eo+"input-$1")]})],i)}return""})}},Tne=[Pne],Aj=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(S){var k=S.getAttribute("data-emotion");k.indexOf(" ")!==-1&&(document.head.appendChild(S),S.setAttribute("data-s",""))})}var i=t.stylisPlugins||Tne,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(S){for(var k=S.getAttribute("data-emotion").split(" "),E=1;E=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var $ne={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},zne=/[A-Z]|^ms/g,Hne=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Nj=function(t){return t.charCodeAt(1)===45},PL=function(t){return t!=null&&typeof t!="boolean"},qw=Tj(function(e){return Nj(e)?e:e.replace(zne,"-$&").toLowerCase()}),TL=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(Hne,function(r,i,o){return Fl={name:i,styles:o,next:Fl},i})}return $ne[t]!==1&&!Nj(t)&&typeof n=="number"&&n!==0?n+"px":n};function v2(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return Fl={name:n.name,styles:n.styles,next:Fl},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)Fl={name:r.name,styles:r.styles,next:Fl},r=r.next;var i=n.styles+";";return i}return Vne(e,t,n)}case"function":{if(e!==void 0){var o=Fl,a=n(e);return Fl=o,v2(e,t,a)}break}}if(t==null)return n;var s=t[n];return s!==void 0?s:n}function Vne(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i{t.includes(r)||(n[r]=e[r])}),n}function are(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},Vj=sre(are);function Wj(e,t){const n={};return Object.keys(e).forEach(r=>{const i=e[r];t(i,r,e)&&(n[r]=i)}),n}var Uj=e=>Wj(e,t=>t!=null);function lre(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var ure=lre();function Gj(e,...t){return ire(e)?e(...t):e}function cre(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}function dre(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,i=w.createContext(void 0);i.displayName=r;function o(){var a;const s=w.useContext(i);if(!s&&t){const l=new Error(n);throw l.name="ContextError",(a=Error.captureStackTrace)==null||a.call(Error,l,o),l}return s}return[i.Provider,o,i]}var fre=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,hre=Tj(function(e){return fre.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),pre=hre,gre=function(t){return t!=="theme"},ML=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?pre:gre},IL=function(t,n,r){var i;if(n){var o=n.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(a){return t.__emotion_forwardProp(a)&&o(a)}:o}return typeof i!="function"&&r&&(i=t.__emotion_forwardProp),i},mre=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return Rj(n,r,i),Une(function(){return Dj(n,r,i)}),null},vre=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,o,a;n!==void 0&&(o=n.label,a=n.target);var s=IL(t,n,r),l=s||ML(i),u=!l("as");return function(){var d=arguments,h=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&h.push("label:"+o+";"),d[0]==null||d[0].raw===void 0)h.push.apply(h,d);else{h.push(d[0][0]);for(var m=d.length,v=1;v[h,m.selector]))}function s(){return Object.fromEntries(Object.entries(t).map(([h,m])=>[h,m.className]))}function l(d){const v=`chakra-${(["container","root"].includes(d??"")?[e]:[e,d]).filter(Boolean).join("__")}`;return{className:v,selector:`.${v}`,toString:()=>d}}return{parts:i,toPart:l,extend:o,selectors:a,classnames:s,get keys(){return Object.keys(t)},__type:{}}}var bre=On("accordion").parts("root","container","button","panel").extend("icon"),Sre=On("alert").parts("title","description","container").extend("icon","spinner"),xre=On("avatar").parts("label","badge","container").extend("excessLabel","group"),wre=On("breadcrumb").parts("link","item","container").extend("separator");On("button").parts();var Cre=On("checkbox").parts("control","icon","container").extend("label");On("progress").parts("track","filledTrack").extend("label");var _re=On("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),kre=On("editable").parts("preview","input","textarea"),Ere=On("form").parts("container","requiredIndicator","helperText"),Pre=On("formError").parts("text","icon"),Tre=On("input").parts("addon","field","element"),Lre=On("list").parts("container","item","icon"),Are=On("menu").parts("button","list","item").extend("groupTitle","command","divider"),Ore=On("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),Mre=On("numberinput").parts("root","field","stepperGroup","stepper");On("pininput").parts("field");var Ire=On("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),Rre=On("progress").parts("label","filledTrack","track"),Dre=On("radio").parts("container","control","label"),Nre=On("select").parts("field","icon"),jre=On("slider").parts("container","track","thumb","filledTrack","mark"),Bre=On("stat").parts("container","label","helpText","number","icon"),Fre=On("switch").parts("container","track","thumb"),$re=On("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),zre=On("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),Hre=On("tag").parts("container","label","closeButton"),Vre=On("card").parts("container","header","body","footer");function Ui(e,t){Wre(e)&&(e="100%");var n=Ure(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function $3(e){return Math.min(1,Math.max(0,e))}function Wre(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function Ure(e){return typeof e=="string"&&e.indexOf("%")!==-1}function qj(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function z3(e){return e<=1?"".concat(Number(e)*100,"%"):e}function wh(e){return e.length===1?"0"+e:String(e)}function Gre(e,t,n){return{r:Ui(e,255)*255,g:Ui(t,255)*255,b:Ui(n,255)*255}}function RL(e,t,n){e=Ui(e,255),t=Ui(t,255),n=Ui(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=0,s=(r+i)/2;if(r===i)a=0,o=0;else{var l=r-i;switch(a=s>.5?l/(2-r-i):l/(r+i),r){case e:o=(t-n)/l+(t1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function qre(e,t,n){var r,i,o;if(e=Ui(e,360),t=Ui(t,100),n=Ui(n,100),t===0)i=n,o=n,r=n;else{var a=n<.5?n*(1+t):n+t-n*t,s=2*n-a;r=Yw(s,a,e+1/3),i=Yw(s,a,e),o=Yw(s,a,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function DL(e,t,n){e=Ui(e,255),t=Ui(t,255),n=Ui(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=r,s=r-i,l=r===0?0:s/r;if(r===i)o=0;else{switch(r){case e:o=(t-n)/s+(t>16,g:(e&65280)>>8,b:e&255}}var c7={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"};function Qre(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,o=null,a=!1,s=!1;return typeof e=="string"&&(e=tie(e)),typeof e=="object"&&(ju(e.r)&&ju(e.g)&&ju(e.b)?(t=Gre(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):ju(e.h)&&ju(e.s)&&ju(e.v)?(r=z3(e.s),i=z3(e.v),t=Yre(e.h,r,i),a=!0,s="hsv"):ju(e.h)&&ju(e.s)&&ju(e.l)&&(r=z3(e.s),o=z3(e.l),t=qre(e.h,r,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=qj(n),{ok:a,format:e.format||s,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 Jre="[-\\+]?\\d+%?",eie="[-\\+]?\\d*\\.\\d+%?",xd="(?:".concat(eie,")|(?:").concat(Jre,")"),Kw="[\\s|\\(]+(".concat(xd,")[,|\\s]+(").concat(xd,")[,|\\s]+(").concat(xd,")\\s*\\)?"),Xw="[\\s|\\(]+(".concat(xd,")[,|\\s]+(").concat(xd,")[,|\\s]+(").concat(xd,")[,|\\s]+(").concat(xd,")\\s*\\)?"),Ds={CSS_UNIT:new RegExp(xd),rgb:new RegExp("rgb"+Kw),rgba:new RegExp("rgba"+Xw),hsl:new RegExp("hsl"+Kw),hsla:new RegExp("hsla"+Xw),hsv:new RegExp("hsv"+Kw),hsva:new RegExp("hsva"+Xw),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 tie(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(c7[e])e=c7[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=Ds.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=Ds.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Ds.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=Ds.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Ds.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=Ds.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Ds.hex8.exec(e),n?{r:Ca(n[1]),g:Ca(n[2]),b:Ca(n[3]),a:jL(n[4]),format:t?"name":"hex8"}:(n=Ds.hex6.exec(e),n?{r:Ca(n[1]),g:Ca(n[2]),b:Ca(n[3]),format:t?"name":"hex"}:(n=Ds.hex4.exec(e),n?{r:Ca(n[1]+n[1]),g:Ca(n[2]+n[2]),b:Ca(n[3]+n[3]),a:jL(n[4]+n[4]),format:t?"name":"hex8"}:(n=Ds.hex3.exec(e),n?{r:Ca(n[1]+n[1]),g:Ca(n[2]+n[2]),b:Ca(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function ju(e){return Boolean(Ds.CSS_UNIT.exec(String(e)))}var hy=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var r;if(t instanceof e)return t;typeof t=="number"&&(t=Zre(t)),this.originalInput=t;var i=Qre(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=(r=n.format)!==null&&r!==void 0?r: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 this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,r,i,o=t.r/255,a=t.g/255,s=t.b/255;return o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),s<=.03928?i=s/12.92:i=Math.pow((s+.055)/1.055,2.4),.2126*n+.7152*r+.0722*i},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=qj(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.toHsv=function(){var t=DL(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=DL(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsva(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=RL(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=RL(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsla(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),NL(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),Kre(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},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 t=Math.round(this.r),n=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(r,")"):"rgba(".concat(t,", ").concat(n,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(Ui(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(Ui(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+NL(this.r,this.g,this.b,!1),n=0,r=Object.entries(c7);n=0,o=!n&&i&&(t.startsWith("hex")||t==="name");return o?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||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){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=$3(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=$3(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=$3(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=$3(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){n===void 0&&(n=50);var r=this.toRgb(),i=new e(t).toRgb(),o=n/100,a={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return new e(a)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var r=this.toHsl(),i=360/n,o=[this];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(new e(r));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(new e({h:r,s:i,v:o})),o=(o+s)%1;return a},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();return new e({r:r.r+(n.r-r.r)*n.a,g:r.g+(n.g-r.g)*n.a,b:r.b+(n.b-r.b)*n.a})},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,i=[this],o=360/t,a=1;an.length;)e.count=null,e.seed&&(e.seed+=1),n.push(Yj(e));return e.count=t,n}var r=nie(e.hue,e.seed),i=rie(r,e),o=iie(r,i,e),a={h:r,s:i,v:o};return e.alpha!==void 0&&(a.a=e.alpha),new hy(a)}function nie(e,t){var n=aie(e),r=U4(n,t);return r<0&&(r=360+r),r}function rie(e,t){if(t.hue==="monochrome")return 0;if(t.luminosity==="random")return U4([0,100],t.seed);var n=Kj(e).saturationRange,r=n[0],i=n[1];switch(t.luminosity){case"bright":r=55;break;case"dark":r=i-10;break;case"light":i=55;break}return U4([r,i],t.seed)}function iie(e,t,n){var r=oie(e,t),i=100;switch(n.luminosity){case"dark":i=r+20;break;case"light":r=(i+r)/2;break;case"random":r=0,i=100;break}return U4([r,i],n.seed)}function oie(e,t){for(var n=Kj(e).lowerBounds,r=0;r=i&&t<=a){var l=(s-o)/(a-i),u=o-l*i;return l*t+u}}return 0}function aie(e){var t=parseInt(e,10);if(!Number.isNaN(t)&&t<360&&t>0)return[t,t];if(typeof e=="string"){var n=Zj.find(function(a){return a.name===e});if(n){var r=Xj(n);if(r.hueRange)return r.hueRange}var i=new hy(e);if(i.isValid){var o=i.toHsv().h;return[o,o]}}return[0,360]}function Kj(e){e>=334&&e<=360&&(e-=360);for(var t=0,n=Zj;t=i.hueRange[0]&&e<=i.hueRange[1])return i}throw Error("Color not found")}function U4(e,t){if(t===void 0)return Math.floor(e[0]+Math.random()*(e[1]+1-e[0]));var n=e[1]||1,r=e[0]||0;t=(t*9301+49297)%233280;var i=t/233280;return Math.floor(r+i*(n-r))}function Xj(e){var t=e.lowerBounds[0][0],n=e.lowerBounds[e.lowerBounds.length-1][0],r=e.lowerBounds[e.lowerBounds.length-1][1],i=e.lowerBounds[0][1];return{name:e.name,hueRange:e.hueRange,lowerBounds:e.lowerBounds,saturationRange:[t,n],brightnessRange:[r,i]}}var Zj=[{name:"monochrome",hueRange:null,lowerBounds:[[0,0],[100,0]]},{name:"red",hueRange:[-26,18],lowerBounds:[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]},{name:"orange",hueRange:[19,46],lowerBounds:[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]},{name:"yellow",hueRange:[47,62],lowerBounds:[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]},{name:"green",hueRange:[63,178],lowerBounds:[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]},{name:"blue",hueRange:[179,257],lowerBounds:[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]},{name:"purple",hueRange:[258,282],lowerBounds:[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]},{name:"pink",hueRange:[283,334],lowerBounds:[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]]}];function sie(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;rObject.keys(e).length===0,Co=(e,t,n)=>{const r=sie(e,`colors.${t}`,t),{isValid:i}=new hy(r);return i?r:n},uie=e=>t=>{const n=Co(t,e);return new hy(n).isDark()?"dark":"light"},cie=e=>t=>uie(e)(t)==="dark",Hm=(e,t)=>n=>{const r=Co(n,e);return new hy(r).setAlpha(t).toRgbString()};function BL(e="1rem",t="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient(
+ 45deg,
+ ${t} 25%,
+ transparent 25%,
+ transparent 50%,
+ ${t} 50%,
+ ${t} 75%,
+ transparent 75%,
+ transparent
+ )`,backgroundSize:`${e} ${e}`}}function die(e){const t=Yj().toHexString();return!e||lie(e)?t:e.string&&e.colors?hie(e.string,e.colors):e.string&&!e.colors?fie(e.string):e.colors&&!e.string?pie(e.colors):t}function fie(e){let t=0;if(e.length===0)return t.toString();for(let r=0;r>r*8&255;n+=`00${i.toString(16)}`.substr(-2)}return n}function hie(e,t){let n=0;if(e.length===0)return t[0];for(let r=0;rn.colorMode==="dark"?t:e}function P_(e){const{orientation:t,vertical:n,horizontal:r}=e;return t?t==="vertical"?n:r:{}}function gie(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function Qj(e){return gie(e)&&e.reference?e.reference:String(e)}var RS=(e,...t)=>t.map(Qj).join(` ${e} `).replace(/calc/g,""),FL=(...e)=>`calc(${RS("+",...e)})`,$L=(...e)=>`calc(${RS("-",...e)})`,d7=(...e)=>`calc(${RS("*",...e)})`,zL=(...e)=>`calc(${RS("/",...e)})`,HL=e=>{const t=Qj(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:d7(t,-1)},Vu=Object.assign(e=>({add:(...t)=>Vu(FL(e,...t)),subtract:(...t)=>Vu($L(e,...t)),multiply:(...t)=>Vu(d7(e,...t)),divide:(...t)=>Vu(zL(e,...t)),negate:()=>Vu(HL(e)),toString:()=>e.toString()}),{add:FL,subtract:$L,multiply:d7,divide:zL,negate:HL});function mie(e){return!Number.isInteger(parseFloat(e.toString()))}function vie(e,t="-"){return e.replace(/\s+/g,t)}function Jj(e){const t=vie(e.toString());return t.includes("\\.")?e:mie(e)?t.replace(".","\\."):e}function yie(e,t=""){return[t,Jj(e)].filter(Boolean).join("-")}function bie(e,t){return`var(${Jj(e)}${t?`, ${t}`:""})`}function Sie(e,t=""){return`--${yie(e,t)}`}function yi(e,t){const n=Sie(e,t==null?void 0:t.prefix);return{variable:n,reference:bie(n,xie(t==null?void 0:t.fallback))}}function xie(e){return typeof e=="string"?e:e==null?void 0:e.reference}var{definePartsStyle:wie,defineMultiStyleConfig:Cie}=hr(bre.keys),_ie={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},kie={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},Eie={pt:"2",px:"4",pb:"5"},Pie={fontSize:"1.25em"},Tie=wie({container:_ie,button:kie,panel:Eie,icon:Pie}),Lie=Cie({baseStyle:Tie}),{definePartsStyle:py,defineMultiStyleConfig:Aie}=hr(Sre.keys),Ta=Vn("alert-fg"),Qu=Vn("alert-bg"),Oie=py({container:{bg:Qu.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:Ta.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:Ta.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function T_(e){const{theme:t,colorScheme:n}=e,r=Hm(`${n}.200`,.16)(t);return{light:`colors.${n}.100`,dark:r}}var Mie=py(e=>{const{colorScheme:t}=e,n=T_(e);return{container:{[Ta.variable]:`colors.${t}.500`,[Qu.variable]:n.light,_dark:{[Ta.variable]:`colors.${t}.200`,[Qu.variable]:n.dark}}}}),Iie=py(e=>{const{colorScheme:t}=e,n=T_(e);return{container:{[Ta.variable]:`colors.${t}.500`,[Qu.variable]:n.light,_dark:{[Ta.variable]:`colors.${t}.200`,[Qu.variable]:n.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:Ta.reference}}}),Rie=py(e=>{const{colorScheme:t}=e,n=T_(e);return{container:{[Ta.variable]:`colors.${t}.500`,[Qu.variable]:n.light,_dark:{[Ta.variable]:`colors.${t}.200`,[Qu.variable]:n.dark},pt:"2",borderTopWidth:"4px",borderTopColor:Ta.reference}}}),Die=py(e=>{const{colorScheme:t}=e;return{container:{[Ta.variable]:"colors.white",[Qu.variable]:`colors.${t}.500`,_dark:{[Ta.variable]:"colors.gray.900",[Qu.variable]:`colors.${t}.200`},color:Ta.reference}}}),Nie={subtle:Mie,"left-accent":Iie,"top-accent":Rie,solid:Die},jie=Aie({baseStyle:Oie,variants:Nie,defaultProps:{variant:"subtle",colorScheme:"blue"}}),eB={px:"1px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},Bie={max:"max-content",min:"min-content",full:"100%","3xs":"14rem","2xs":"16rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem","8xl":"90rem",prose:"60ch"},Fie={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},$ie={...eB,...Bie,container:Fie},tB=$ie,zie=e=>typeof e=="function";function Eo(e,...t){return zie(e)?e(...t):e}var{definePartsStyle:nB,defineMultiStyleConfig:Hie}=hr(xre.keys),pm=Vn("avatar-border-color"),Zw=Vn("avatar-bg"),Vie={borderRadius:"full",border:"0.2em solid",[pm.variable]:"white",_dark:{[pm.variable]:"colors.gray.800"},borderColor:pm.reference},Wie={[Zw.variable]:"colors.gray.200",_dark:{[Zw.variable]:"colors.whiteAlpha.400"},bgColor:Zw.reference},VL=Vn("avatar-background"),Uie=e=>{const{name:t,theme:n}=e,r=t?die({string:t}):"colors.gray.400",i=cie(r)(n);let o="white";return i||(o="gray.800"),{bg:VL.reference,"&:not([data-loaded])":{[VL.variable]:r},color:o,[pm.variable]:"colors.white",_dark:{[pm.variable]:"colors.gray.800"},borderColor:pm.reference,verticalAlign:"top"}},Gie=nB(e=>({badge:Eo(Vie,e),excessLabel:Eo(Wie,e),container:Eo(Uie,e)}));function od(e){const t=e!=="100%"?tB[e]:void 0;return nB({container:{width:e,height:e,fontSize:`calc(${t??e} / 2.5)`},excessLabel:{width:e,height:e},label:{fontSize:`calc(${t??e} / 2.5)`,lineHeight:e!=="100%"?t??e:void 0}})}var qie={"2xs":od(4),xs:od(6),sm:od(8),md:od(12),lg:od(16),xl:od(24),"2xl":od(32),full:od("100%")},Yie=Hie({baseStyle:Gie,sizes:qie,defaultProps:{size:"md"}}),Kie={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold"},gm=Vn("badge-bg"),Ul=Vn("badge-color"),Xie=e=>{const{colorScheme:t,theme:n}=e,r=Hm(`${t}.500`,.6)(n);return{[gm.variable]:`colors.${t}.500`,[Ul.variable]:"colors.white",_dark:{[gm.variable]:r,[Ul.variable]:"colors.whiteAlpha.800"},bg:gm.reference,color:Ul.reference}},Zie=e=>{const{colorScheme:t,theme:n}=e,r=Hm(`${t}.200`,.16)(n);return{[gm.variable]:`colors.${t}.100`,[Ul.variable]:`colors.${t}.800`,_dark:{[gm.variable]:r,[Ul.variable]:`colors.${t}.200`},bg:gm.reference,color:Ul.reference}},Qie=e=>{const{colorScheme:t,theme:n}=e,r=Hm(`${t}.200`,.8)(n);return{[Ul.variable]:`colors.${t}.500`,_dark:{[Ul.variable]:r},color:Ul.reference,boxShadow:`inset 0 0 0px 1px ${Ul.reference}`}},Jie={solid:Xie,subtle:Zie,outline:Qie},Nv={baseStyle:Kie,variants:Jie,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:eoe,definePartsStyle:toe}=hr(wre.keys),noe={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},roe=toe({link:noe}),ioe=eoe({baseStyle:roe}),ooe={lineHeight:"1.2",borderRadius:"md",fontWeight:"semibold",transitionProperty:"common",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{_disabled:{bg:"initial"}}},rB=e=>{const{colorScheme:t,theme:n}=e;if(t==="gray")return{color:Et("inherit","whiteAlpha.900")(e),_hover:{bg:Et("gray.100","whiteAlpha.200")(e)},_active:{bg:Et("gray.200","whiteAlpha.300")(e)}};const r=Hm(`${t}.200`,.12)(n),i=Hm(`${t}.200`,.24)(n);return{color:Et(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:Et(`${t}.50`,r)(e)},_active:{bg:Et(`${t}.100`,i)(e)}}},aoe=e=>{const{colorScheme:t}=e,n=Et("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:t==="gray"?n:"currentColor",".chakra-button__group[data-attached] > &:not(:last-of-type)":{marginEnd:"-1px"},...Eo(rB,e)}},soe={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},loe=e=>{const{colorScheme:t}=e;if(t==="gray"){const s=Et("gray.100","whiteAlpha.200")(e);return{bg:s,_hover:{bg:Et("gray.200","whiteAlpha.300")(e),_disabled:{bg:s}},_active:{bg:Et("gray.300","whiteAlpha.400")(e)}}}const{bg:n=`${t}.500`,color:r="white",hoverBg:i=`${t}.600`,activeBg:o=`${t}.700`}=soe[t]??{},a=Et(n,`${t}.200`)(e);return{bg:a,color:Et(r,"gray.800")(e),_hover:{bg:Et(i,`${t}.300`)(e),_disabled:{bg:a}},_active:{bg:Et(o,`${t}.400`)(e)}}},uoe=e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:Et(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:Et(`${t}.700`,`${t}.500`)(e)}}},coe={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},doe={ghost:rB,outline:aoe,solid:loe,link:uoe,unstyled:coe},foe={lg:{h:"12",minW:"12",fontSize:"lg",px:"6"},md:{h:"10",minW:"10",fontSize:"md",px:"4"},sm:{h:"8",minW:"8",fontSize:"sm",px:"3"},xs:{h:"6",minW:"6",fontSize:"xs",px:"2"}},hoe={baseStyle:ooe,variants:doe,sizes:foe,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:Ah,defineMultiStyleConfig:poe}=hr(Vre.keys),G4=Vn("card-bg"),mm=Vn("card-padding"),goe=Ah({container:{[G4.variable]:"chakra-body-bg",backgroundColor:G4.reference,color:"chakra-body-text"},body:{padding:mm.reference,flex:"1 1 0%"},header:{padding:mm.reference},footer:{padding:mm.reference}}),moe={sm:Ah({container:{borderRadius:"base",[mm.variable]:"space.3"}}),md:Ah({container:{borderRadius:"md",[mm.variable]:"space.5"}}),lg:Ah({container:{borderRadius:"xl",[mm.variable]:"space.7"}})},voe={elevated:Ah({container:{boxShadow:"base",_dark:{[G4.variable]:"colors.gray.700"}}}),outline:Ah({container:{borderWidth:"1px",borderColor:"chakra-border-color"}}),filled:Ah({container:{[G4.variable]:"colors.chakra-subtle-bg"}}),unstyled:{body:{padding:0},header:{padding:0},footer:{padding:0}}},yoe=poe({baseStyle:goe,variants:voe,sizes:moe,defaultProps:{variant:"elevated",size:"md"}}),{definePartsStyle:a4,defineMultiStyleConfig:boe}=hr(Cre.keys),jv=Vn("checkbox-size"),Soe=e=>{const{colorScheme:t}=e;return{w:jv.reference,h:jv.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:Et(`${t}.500`,`${t}.200`)(e),borderColor:Et(`${t}.500`,`${t}.200`)(e),color:Et("white","gray.900")(e),_hover:{bg:Et(`${t}.600`,`${t}.300`)(e),borderColor:Et(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:Et("gray.200","transparent")(e),bg:Et("gray.200","whiteAlpha.300")(e),color:Et("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:Et(`${t}.500`,`${t}.200`)(e),borderColor:Et(`${t}.500`,`${t}.200`)(e),color:Et("white","gray.900")(e)},_disabled:{bg:Et("gray.100","whiteAlpha.100")(e),borderColor:Et("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:Et("red.500","red.300")(e)}}},xoe={_disabled:{cursor:"not-allowed"}},woe={userSelect:"none",_disabled:{opacity:.4}},Coe={transitionProperty:"transform",transitionDuration:"normal"},_oe=a4(e=>({icon:Coe,container:xoe,control:Eo(Soe,e),label:woe})),koe={sm:a4({control:{[jv.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:a4({control:{[jv.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:a4({control:{[jv.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},q4=boe({baseStyle:_oe,sizes:koe,defaultProps:{size:"md",colorScheme:"blue"}}),Bv=yi("close-button-size"),z1=yi("close-button-bg"),Eoe={w:[Bv.reference],h:[Bv.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[z1.variable]:"colors.blackAlpha.100",_dark:{[z1.variable]:"colors.whiteAlpha.100"}},_active:{[z1.variable]:"colors.blackAlpha.200",_dark:{[z1.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:z1.reference},Poe={lg:{[Bv.variable]:"sizes.10",fontSize:"md"},md:{[Bv.variable]:"sizes.8",fontSize:"xs"},sm:{[Bv.variable]:"sizes.6",fontSize:"2xs"}},Toe={baseStyle:Eoe,sizes:Poe,defaultProps:{size:"md"}},{variants:Loe,defaultProps:Aoe}=Nv,Ooe={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm"},Moe={baseStyle:Ooe,variants:Loe,defaultProps:Aoe},Ioe={w:"100%",mx:"auto",maxW:"prose",px:"4"},Roe={baseStyle:Ioe},Doe={opacity:.6,borderColor:"inherit"},Noe={borderStyle:"solid"},joe={borderStyle:"dashed"},Boe={solid:Noe,dashed:joe},Foe={baseStyle:Doe,variants:Boe,defaultProps:{variant:"solid"}},{definePartsStyle:f7,defineMultiStyleConfig:$oe}=hr(_re.keys),Qw=Vn("drawer-bg"),Jw=Vn("drawer-box-shadow");function xg(e){return f7(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var zoe={bg:"blackAlpha.600",zIndex:"overlay"},Hoe={display:"flex",zIndex:"modal",justifyContent:"center"},Voe=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[Qw.variable]:"colors.white",[Jw.variable]:"shadows.lg",_dark:{[Qw.variable]:"colors.gray.700",[Jw.variable]:"shadows.dark-lg"},bg:Qw.reference,boxShadow:Jw.reference}},Woe={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Uoe={position:"absolute",top:"2",insetEnd:"3"},Goe={px:"6",py:"2",flex:"1",overflow:"auto"},qoe={px:"6",py:"4"},Yoe=f7(e=>({overlay:zoe,dialogContainer:Hoe,dialog:Eo(Voe,e),header:Woe,closeButton:Uoe,body:Goe,footer:qoe})),Koe={xs:xg("xs"),sm:xg("md"),md:xg("lg"),lg:xg("2xl"),xl:xg("4xl"),full:xg("full")},Xoe=$oe({baseStyle:Yoe,sizes:Koe,defaultProps:{size:"xs"}}),{definePartsStyle:Zoe,defineMultiStyleConfig:Qoe}=hr(kre.keys),Joe={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},eae={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},tae={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},nae=Zoe({preview:Joe,input:eae,textarea:tae}),rae=Qoe({baseStyle:nae}),{definePartsStyle:iae,defineMultiStyleConfig:oae}=hr(Ere.keys),vm=Vn("form-control-color"),aae={marginStart:"1",[vm.variable]:"colors.red.500",_dark:{[vm.variable]:"colors.red.300"},color:vm.reference},sae={mt:"2",[vm.variable]:"colors.gray.600",_dark:{[vm.variable]:"colors.whiteAlpha.600"},color:vm.reference,lineHeight:"normal",fontSize:"sm"},lae=iae({container:{width:"100%",position:"relative"},requiredIndicator:aae,helperText:sae}),uae=oae({baseStyle:lae}),{definePartsStyle:cae,defineMultiStyleConfig:dae}=hr(Pre.keys),ym=Vn("form-error-color"),fae={[ym.variable]:"colors.red.500",_dark:{[ym.variable]:"colors.red.300"},color:ym.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},hae={marginEnd:"0.5em",[ym.variable]:"colors.red.500",_dark:{[ym.variable]:"colors.red.300"},color:ym.reference},pae=cae({text:fae,icon:hae}),gae=dae({baseStyle:pae}),mae={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},vae={baseStyle:mae},yae={fontFamily:"heading",fontWeight:"bold"},bae={"4xl":{fontSize:["6xl",null,"7xl"],lineHeight:1},"3xl":{fontSize:["5xl",null,"6xl"],lineHeight:1},"2xl":{fontSize:["4xl",null,"5xl"],lineHeight:[1.2,null,1]},xl:{fontSize:["3xl",null,"4xl"],lineHeight:[1.33,null,1.2]},lg:{fontSize:["2xl",null,"3xl"],lineHeight:[1.33,null,1.2]},md:{fontSize:"xl",lineHeight:1.2},sm:{fontSize:"md",lineHeight:1.2},xs:{fontSize:"sm",lineHeight:1.2}},Sae={baseStyle:yae,sizes:bae,defaultProps:{size:"xl"}},{definePartsStyle:Wu,defineMultiStyleConfig:xae}=hr(Tre.keys),wae=Wu({field:{width:"100%",minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),ad={lg:{fontSize:"lg",px:"4",h:"12",borderRadius:"md"},md:{fontSize:"md",px:"4",h:"10",borderRadius:"md"},sm:{fontSize:"sm",px:"3",h:"8",borderRadius:"sm"},xs:{fontSize:"xs",px:"2",h:"6",borderRadius:"sm"}},Cae={lg:Wu({field:ad.lg,addon:ad.lg}),md:Wu({field:ad.md,addon:ad.md}),sm:Wu({field:ad.sm,addon:ad.sm}),xs:Wu({field:ad.xs,addon:ad.xs})};function L_(e){const{focusBorderColor:t,errorBorderColor:n}=e;return{focusBorderColor:t||Et("blue.500","blue.300")(e),errorBorderColor:n||Et("red.500","red.300")(e)}}var _ae=Wu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=L_(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:Et("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Co(t,r),boxShadow:`0 0 0 1px ${Co(t,r)}`},_focusVisible:{zIndex:1,borderColor:Co(t,n),boxShadow:`0 0 0 1px ${Co(t,n)}`}},addon:{border:"1px solid",borderColor:Et("inherit","whiteAlpha.50")(e),bg:Et("gray.100","whiteAlpha.300")(e)}}}),kae=Wu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=L_(e);return{field:{border:"2px solid",borderColor:"transparent",bg:Et("gray.100","whiteAlpha.50")(e),_hover:{bg:Et("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Co(t,r)},_focusVisible:{bg:"transparent",borderColor:Co(t,n)}},addon:{border:"2px solid",borderColor:"transparent",bg:Et("gray.100","whiteAlpha.50")(e)}}}),Eae=Wu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=L_(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Co(t,r),boxShadow:`0px 1px 0px 0px ${Co(t,r)}`},_focusVisible:{borderColor:Co(t,n),boxShadow:`0px 1px 0px 0px ${Co(t,n)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),Pae=Wu({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),Tae={outline:_ae,filled:kae,flushed:Eae,unstyled:Pae},_n=xae({baseStyle:wae,sizes:Cae,variants:Tae,defaultProps:{size:"md",variant:"outline"}}),e6=Vn("kbd-bg"),Lae={[e6.variable]:"colors.gray.100",_dark:{[e6.variable]:"colors.whiteAlpha.100"},bg:e6.reference,borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"},Aae={baseStyle:Lae},Oae={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},Mae={baseStyle:Oae},{defineMultiStyleConfig:Iae,definePartsStyle:Rae}=hr(Lre.keys),Dae={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},Nae=Rae({icon:Dae}),jae=Iae({baseStyle:Nae}),{defineMultiStyleConfig:Bae,definePartsStyle:Fae}=hr(Are.keys),jl=Vn("menu-bg"),t6=Vn("menu-shadow"),$ae={[jl.variable]:"#fff",[t6.variable]:"shadows.sm",_dark:{[jl.variable]:"colors.gray.700",[t6.variable]:"shadows.dark-lg"},color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px",bg:jl.reference,boxShadow:t6.reference},zae={py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{[jl.variable]:"colors.gray.100",_dark:{[jl.variable]:"colors.whiteAlpha.100"}},_active:{[jl.variable]:"colors.gray.200",_dark:{[jl.variable]:"colors.whiteAlpha.200"}},_expanded:{[jl.variable]:"colors.gray.100",_dark:{[jl.variable]:"colors.whiteAlpha.100"}},_disabled:{opacity:.4,cursor:"not-allowed"},bg:jl.reference},Hae={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},Vae={opacity:.6},Wae={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},Uae={transitionProperty:"common",transitionDuration:"normal"},Gae=Fae({button:Uae,list:$ae,item:zae,groupTitle:Hae,command:Vae,divider:Wae}),qae=Bae({baseStyle:Gae}),{defineMultiStyleConfig:Yae,definePartsStyle:h7}=hr(Ore.keys),Kae={bg:"blackAlpha.600",zIndex:"modal"},Xae=e=>{const{isCentered:t,scrollBehavior:n}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:n==="inside"?"hidden":"auto"}},Zae=e=>{const{scrollBehavior:t}=e;return{borderRadius:"md",bg:Et("white","gray.700")(e),color:"inherit",my:"16",zIndex:"modal",maxH:t==="inside"?"calc(100% - 7.5rem)":void 0,boxShadow:Et("lg","dark-lg")(e)}},Qae={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Jae={position:"absolute",top:"2",insetEnd:"3"},ese=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},tse={px:"6",py:"4"},nse=h7(e=>({overlay:Kae,dialogContainer:Eo(Xae,e),dialog:Eo(Zae,e),header:Qae,closeButton:Jae,body:Eo(ese,e),footer:tse}));function Os(e){return h7(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var rse={xs:Os("xs"),sm:Os("sm"),md:Os("md"),lg:Os("lg"),xl:Os("xl"),"2xl":Os("2xl"),"3xl":Os("3xl"),"4xl":Os("4xl"),"5xl":Os("5xl"),"6xl":Os("6xl"),full:Os("full")},ise=Yae({baseStyle:nse,sizes:rse,defaultProps:{size:"md"}}),ose={letterSpacings:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeights:{normal:"normal",none:1,shorter:1.25,short:1.375,base:1.5,tall:1.625,taller:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},fontWeights:{hairline:100,thin:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},fonts:{heading:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',body:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',mono:'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},fontSizes:{"3xs":"0.45rem","2xs":"0.625rem",xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"}},iB=ose,{defineMultiStyleConfig:ase,definePartsStyle:oB}=hr(Mre.keys),A_=yi("number-input-stepper-width"),aB=yi("number-input-input-padding"),sse=Vu(A_).add("0.5rem").toString(),n6=yi("number-input-bg"),r6=yi("number-input-color"),i6=yi("number-input-border-color"),lse={[A_.variable]:"sizes.6",[aB.variable]:sse},use=e=>{var t;return((t=Eo(_n.baseStyle,e))==null?void 0:t.field)??{}},cse={width:A_.reference},dse={borderStart:"1px solid",borderStartColor:i6.reference,color:r6.reference,bg:n6.reference,[r6.variable]:"colors.chakra-body-text",[i6.variable]:"colors.chakra-border-color",_dark:{[r6.variable]:"colors.whiteAlpha.800",[i6.variable]:"colors.whiteAlpha.300"},_active:{[n6.variable]:"colors.gray.200",_dark:{[n6.variable]:"colors.whiteAlpha.300"}},_disabled:{opacity:.4,cursor:"not-allowed"}},fse=oB(e=>({root:lse,field:Eo(use,e)??{},stepperGroup:cse,stepper:dse}));function H3(e){var t,n;const r=(t=_n.sizes)==null?void 0:t[e],i={lg:"md",md:"md",sm:"sm",xs:"sm"},o=((n=r.field)==null?void 0:n.fontSize)??"md",a=iB.fontSizes[o];return oB({field:{...r.field,paddingInlineEnd:aB.reference,verticalAlign:"top"},stepper:{fontSize:Vu(a).multiply(.75).toString(),_first:{borderTopEndRadius:i[e]},_last:{borderBottomEndRadius:i[e],mt:"-1px",borderTopWidth:1}}})}var hse={xs:H3("xs"),sm:H3("sm"),md:H3("md"),lg:H3("lg")},pse=ase({baseStyle:fse,sizes:hse,variants:_n.variants,defaultProps:_n.defaultProps}),WL,gse={...(WL=_n.baseStyle)==null?void 0:WL.field,textAlign:"center"},mse={lg:{fontSize:"lg",w:12,h:12,borderRadius:"md"},md:{fontSize:"md",w:10,h:10,borderRadius:"md"},sm:{fontSize:"sm",w:8,h:8,borderRadius:"sm"},xs:{fontSize:"xs",w:6,h:6,borderRadius:"sm"}},UL,vse={outline:e=>{var t,n;return((n=Eo((t=_n.variants)==null?void 0:t.outline,e))==null?void 0:n.field)??{}},flushed:e=>{var t,n;return((n=Eo((t=_n.variants)==null?void 0:t.flushed,e))==null?void 0:n.field)??{}},filled:e=>{var t,n;return((n=Eo((t=_n.variants)==null?void 0:t.filled,e))==null?void 0:n.field)??{}},unstyled:((UL=_n.variants)==null?void 0:UL.unstyled.field)??{}},yse={baseStyle:gse,sizes:mse,variants:vse,defaultProps:_n.defaultProps},{defineMultiStyleConfig:bse,definePartsStyle:Sse}=hr(Ire.keys),V3=yi("popper-bg"),xse=yi("popper-arrow-bg"),GL=yi("popper-arrow-shadow-color"),wse={zIndex:10},Cse={[V3.variable]:"colors.white",bg:V3.reference,[xse.variable]:V3.reference,[GL.variable]:"colors.gray.200",_dark:{[V3.variable]:"colors.gray.700",[GL.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},_se={px:3,py:2,borderBottomWidth:"1px"},kse={px:3,py:2},Ese={px:3,py:2,borderTopWidth:"1px"},Pse={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},Tse=Sse({popper:wse,content:Cse,header:_se,body:kse,footer:Ese,closeButton:Pse}),Lse=bse({baseStyle:Tse}),{defineMultiStyleConfig:Ase,definePartsStyle:vv}=hr(Rre.keys),Ose=e=>{const{colorScheme:t,theme:n,isIndeterminate:r,hasStripe:i}=e,o=Et(BL(),BL("1rem","rgba(0,0,0,0.1)"))(e),a=Et(`${t}.500`,`${t}.200`)(e),s=`linear-gradient(
+ to right,
+ transparent 0%,
+ ${Co(n,a)} 50%,
+ transparent 100%
+ )`;return{...!r&&i&&o,...r?{bgImage:s}:{bgColor:a}}},Mse={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},Ise=e=>({bg:Et("gray.100","whiteAlpha.300")(e)}),Rse=e=>({transitionProperty:"common",transitionDuration:"slow",...Ose(e)}),Dse=vv(e=>({label:Mse,filledTrack:Rse(e),track:Ise(e)})),Nse={xs:vv({track:{h:"1"}}),sm:vv({track:{h:"2"}}),md:vv({track:{h:"3"}}),lg:vv({track:{h:"4"}})},jse=Ase({sizes:Nse,baseStyle:Dse,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Bse,definePartsStyle:s4}=hr(Dre.keys),Fse=e=>{var t;const n=(t=Eo(q4.baseStyle,e))==null?void 0:t.control;return{...n,borderRadius:"full",_checked:{...n==null?void 0:n._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},$se=s4(e=>{var t,n,r,i;return{label:(n=(t=q4).baseStyle)==null?void 0:n.call(t,e).label,container:(i=(r=q4).baseStyle)==null?void 0:i.call(r,e).container,control:Fse(e)}}),zse={md:s4({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:s4({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:s4({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},Hse=Bse({baseStyle:$se,sizes:zse,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Vse,definePartsStyle:Wse}=hr(Nre.keys),W3=Vn("select-bg"),qL,Use={...(qL=_n.baseStyle)==null?void 0:qL.field,appearance:"none",paddingBottom:"1px",lineHeight:"normal",bg:W3.reference,[W3.variable]:"colors.white",_dark:{[W3.variable]:"colors.gray.700"},"> option, > optgroup":{bg:W3.reference}},Gse={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},qse=Wse({field:Use,icon:Gse}),U3={paddingInlineEnd:"8"},YL,KL,XL,ZL,QL,JL,eA,tA,Yse={lg:{...(YL=_n.sizes)==null?void 0:YL.lg,field:{...(KL=_n.sizes)==null?void 0:KL.lg.field,...U3}},md:{...(XL=_n.sizes)==null?void 0:XL.md,field:{...(ZL=_n.sizes)==null?void 0:ZL.md.field,...U3}},sm:{...(QL=_n.sizes)==null?void 0:QL.sm,field:{...(JL=_n.sizes)==null?void 0:JL.sm.field,...U3}},xs:{...(eA=_n.sizes)==null?void 0:eA.xs,field:{...(tA=_n.sizes)==null?void 0:tA.xs.field,...U3},icon:{insetEnd:"1"}}},Kse=Vse({baseStyle:qse,sizes:Yse,variants:_n.variants,defaultProps:_n.defaultProps}),o6=Vn("skeleton-start-color"),a6=Vn("skeleton-end-color"),Xse={[o6.variable]:"colors.gray.100",[a6.variable]:"colors.gray.400",_dark:{[o6.variable]:"colors.gray.800",[a6.variable]:"colors.gray.600"},background:o6.reference,borderColor:a6.reference,opacity:.7,borderRadius:"sm"},Zse={baseStyle:Xse},s6=Vn("skip-link-bg"),Qse={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[s6.variable]:"colors.white",_dark:{[s6.variable]:"colors.gray.700"},bg:s6.reference}},Jse={baseStyle:Qse},{defineMultiStyleConfig:ele,definePartsStyle:DS}=hr(jre.keys),S2=Vn("slider-thumb-size"),x2=Vn("slider-track-size"),vd=Vn("slider-bg"),tle=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...P_({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},nle=e=>({...P_({orientation:e.orientation,horizontal:{h:x2.reference},vertical:{w:x2.reference}}),overflow:"hidden",borderRadius:"sm",[vd.variable]:"colors.gray.200",_dark:{[vd.variable]:"colors.whiteAlpha.200"},_disabled:{[vd.variable]:"colors.gray.300",_dark:{[vd.variable]:"colors.whiteAlpha.300"}},bg:vd.reference}),rle=e=>{const{orientation:t}=e;return{...P_({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",_active:{transform:"translateX(-50%) scale(1.15)"}},horizontal:{top:"50%",transform:"translateY(-50%)",_active:{transform:"translateY(-50%) scale(1.15)"}}}),w:S2.reference,h:S2.reference,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",outline:0,zIndex:1,borderRadius:"full",bg:"white",boxShadow:"base",border:"1px solid",borderColor:"transparent",transitionProperty:"transform",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{bg:"gray.300"}}},ile=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[vd.variable]:`colors.${t}.500`,_dark:{[vd.variable]:`colors.${t}.200`},bg:vd.reference}},ole=DS(e=>({container:tle(e),track:nle(e),thumb:rle(e),filledTrack:ile(e)})),ale=DS({container:{[S2.variable]:"sizes.4",[x2.variable]:"sizes.1"}}),sle=DS({container:{[S2.variable]:"sizes.3.5",[x2.variable]:"sizes.1"}}),lle=DS({container:{[S2.variable]:"sizes.2.5",[x2.variable]:"sizes.0.5"}}),ule={lg:ale,md:sle,sm:lle},cle=ele({baseStyle:ole,sizes:ule,defaultProps:{size:"md",colorScheme:"blue"}}),bh=yi("spinner-size"),dle={width:[bh.reference],height:[bh.reference]},fle={xs:{[bh.variable]:"sizes.3"},sm:{[bh.variable]:"sizes.4"},md:{[bh.variable]:"sizes.6"},lg:{[bh.variable]:"sizes.8"},xl:{[bh.variable]:"sizes.12"}},hle={baseStyle:dle,sizes:fle,defaultProps:{size:"md"}},{defineMultiStyleConfig:ple,definePartsStyle:sB}=hr(Bre.keys),gle={fontWeight:"medium"},mle={opacity:.8,marginBottom:"2"},vle={verticalAlign:"baseline",fontWeight:"semibold"},yle={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},ble=sB({container:{},label:gle,helpText:mle,number:vle,icon:yle}),Sle={md:sB({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},xle=ple({baseStyle:ble,sizes:Sle,defaultProps:{size:"md"}}),{defineMultiStyleConfig:wle,definePartsStyle:l4}=hr(Fre.keys),Fv=yi("switch-track-width"),Oh=yi("switch-track-height"),l6=yi("switch-track-diff"),Cle=Vu.subtract(Fv,Oh),p7=yi("switch-thumb-x"),H1=yi("switch-bg"),_le=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[Fv.reference],height:[Oh.reference],transitionProperty:"common",transitionDuration:"fast",[H1.variable]:"colors.gray.300",_dark:{[H1.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[H1.variable]:`colors.${t}.500`,_dark:{[H1.variable]:`colors.${t}.200`}},bg:H1.reference}},kle={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[Oh.reference],height:[Oh.reference],_checked:{transform:`translateX(${p7.reference})`}},Ele=l4(e=>({container:{[l6.variable]:Cle,[p7.variable]:l6.reference,_rtl:{[p7.variable]:Vu(l6).negate().toString()}},track:_le(e),thumb:kle})),Ple={sm:l4({container:{[Fv.variable]:"1.375rem",[Oh.variable]:"sizes.3"}}),md:l4({container:{[Fv.variable]:"1.875rem",[Oh.variable]:"sizes.4"}}),lg:l4({container:{[Fv.variable]:"2.875rem",[Oh.variable]:"sizes.6"}})},Tle=wle({baseStyle:Ele,sizes:Ple,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Lle,definePartsStyle:bm}=hr($re.keys),Ale=bm({table:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full"},th:{fontFamily:"heading",fontWeight:"bold",textTransform:"uppercase",letterSpacing:"wider",textAlign:"start"},td:{textAlign:"start"},caption:{mt:4,fontFamily:"heading",textAlign:"center",fontWeight:"medium"}}),Y4={"&[data-is-numeric=true]":{textAlign:"end"}},Ole=bm(e=>{const{colorScheme:t}=e;return{th:{color:Et("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Et(`${t}.100`,`${t}.700`)(e),...Y4},td:{borderBottom:"1px",borderColor:Et(`${t}.100`,`${t}.700`)(e),...Y4},caption:{color:Et("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),Mle=bm(e=>{const{colorScheme:t}=e;return{th:{color:Et("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Et(`${t}.100`,`${t}.700`)(e),...Y4},td:{borderBottom:"1px",borderColor:Et(`${t}.100`,`${t}.700`)(e),...Y4},caption:{color:Et("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:Et(`${t}.100`,`${t}.700`)(e)},td:{background:Et(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),Ile={simple:Ole,striped:Mle,unstyled:{}},Rle={sm:bm({th:{px:"4",py:"1",lineHeight:"4",fontSize:"xs"},td:{px:"4",py:"2",fontSize:"sm",lineHeight:"4"},caption:{px:"4",py:"2",fontSize:"xs"}}),md:bm({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:bm({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},Dle=Lle({baseStyle:Ale,variants:Ile,sizes:Rle,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),Ko=Vn("tabs-color"),$s=Vn("tabs-bg"),G3=Vn("tabs-border-color"),{defineMultiStyleConfig:Nle,definePartsStyle:Kl}=hr(zre.keys),jle=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},Ble=e=>{const{isFitted:t}=e;return{flex:t?1:void 0,transitionProperty:"common",transitionDuration:"normal",_focusVisible:{zIndex:1,boxShadow:"outline"},_disabled:{cursor:"not-allowed",opacity:.4}}},Fle=e=>{const{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:n==="vertical"?"column":"row"}},$le={p:4},zle=Kl(e=>({root:jle(e),tab:Ble(e),tablist:Fle(e),tabpanel:$le})),Hle={sm:Kl({tab:{py:1,px:4,fontSize:"sm"}}),md:Kl({tab:{fontSize:"md",py:2,px:4}}),lg:Kl({tab:{fontSize:"lg",py:3,px:4}})},Vle=Kl(e=>{const{colorScheme:t,orientation:n}=e,r=n==="vertical",i=n==="vertical"?"borderStart":"borderBottom",o=r?"marginStart":"marginBottom";return{tablist:{[i]:"2px solid",borderColor:"inherit"},tab:{[i]:"2px solid",borderColor:"transparent",[o]:"-2px",_selected:{[Ko.variable]:`colors.${t}.600`,_dark:{[Ko.variable]:`colors.${t}.300`},borderColor:"currentColor"},_active:{[$s.variable]:"colors.gray.200",_dark:{[$s.variable]:"colors.whiteAlpha.300"}},_disabled:{_active:{bg:"none"}},color:Ko.reference,bg:$s.reference}}}),Wle=Kl(e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",[G3.reference]:"transparent",_selected:{[Ko.variable]:`colors.${t}.600`,[G3.variable]:"colors.white",_dark:{[Ko.variable]:`colors.${t}.300`,[G3.variable]:"colors.gray.800"},borderColor:"inherit",borderBottomColor:G3.reference},color:Ko.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),Ule=Kl(e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",[$s.variable]:"colors.gray.50",_dark:{[$s.variable]:"colors.whiteAlpha.50"},mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{[$s.variable]:"colors.white",[Ko.variable]:`colors.${t}.600`,_dark:{[$s.variable]:"colors.gray.800",[Ko.variable]:`colors.${t}.300`},borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"},color:Ko.reference,bg:$s.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),Gle=Kl(e=>{const{colorScheme:t,theme:n}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:Co(n,`${t}.700`),bg:Co(n,`${t}.100`)}}}}),qle=Kl(e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",[Ko.variable]:"colors.gray.600",_dark:{[Ko.variable]:"inherit"},_selected:{[Ko.variable]:"colors.white",[$s.variable]:`colors.${t}.600`,_dark:{[Ko.variable]:"colors.gray.800",[$s.variable]:`colors.${t}.300`}},color:Ko.reference,bg:$s.reference}}}),Yle=Kl({}),Kle={line:Vle,enclosed:Wle,"enclosed-colored":Ule,"soft-rounded":Gle,"solid-rounded":qle,unstyled:Yle},Xle=Nle({baseStyle:zle,sizes:Hle,variants:Kle,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),{defineMultiStyleConfig:Zle,definePartsStyle:Mh}=hr(Hre.keys),Qle={fontWeight:"medium",lineHeight:1.2,outline:0,borderRadius:"md",_focusVisible:{boxShadow:"outline"}},Jle={lineHeight:1.2,overflow:"visible"},eue={fontSize:"lg",w:"5",h:"5",transitionProperty:"common",transitionDuration:"normal",borderRadius:"full",marginStart:"1.5",marginEnd:"-1",opacity:.5,_disabled:{opacity:.4},_focusVisible:{boxShadow:"outline",bg:"rgba(0, 0, 0, 0.14)"},_hover:{opacity:.8},_active:{opacity:1}},tue=Mh({container:Qle,label:Jle,closeButton:eue}),nue={sm:Mh({container:{minH:"5",minW:"5",fontSize:"xs",px:"2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:Mh({container:{minH:"6",minW:"6",fontSize:"sm",px:"2"}}),lg:Mh({container:{minH:"8",minW:"8",fontSize:"md",px:"3"}})},rue={subtle:Mh(e=>{var t;return{container:(t=Nv.variants)==null?void 0:t.subtle(e)}}),solid:Mh(e=>{var t;return{container:(t=Nv.variants)==null?void 0:t.solid(e)}}),outline:Mh(e=>{var t;return{container:(t=Nv.variants)==null?void 0:t.outline(e)}})},iue=Zle({variants:rue,baseStyle:tue,sizes:nue,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),nA,oue={...(nA=_n.baseStyle)==null?void 0:nA.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},rA,aue={outline:e=>{var t;return((t=_n.variants)==null?void 0:t.outline(e).field)??{}},flushed:e=>{var t;return((t=_n.variants)==null?void 0:t.flushed(e).field)??{}},filled:e=>{var t;return((t=_n.variants)==null?void 0:t.filled(e).field)??{}},unstyled:((rA=_n.variants)==null?void 0:rA.unstyled.field)??{}},iA,oA,aA,sA,sue={xs:((iA=_n.sizes)==null?void 0:iA.xs.field)??{},sm:((oA=_n.sizes)==null?void 0:oA.sm.field)??{},md:((aA=_n.sizes)==null?void 0:aA.md.field)??{},lg:((sA=_n.sizes)==null?void 0:sA.lg.field)??{}},lue={baseStyle:oue,sizes:sue,variants:aue,defaultProps:{size:"md",variant:"outline"}},q3=yi("tooltip-bg"),u6=yi("tooltip-fg"),uue=yi("popper-arrow-bg"),cue={bg:q3.reference,color:u6.reference,[q3.variable]:"colors.gray.700",[u6.variable]:"colors.whiteAlpha.900",_dark:{[q3.variable]:"colors.gray.300",[u6.variable]:"colors.gray.900"},[uue.variable]:q3.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},due={baseStyle:cue},fue={Accordion:Lie,Alert:jie,Avatar:Yie,Badge:Nv,Breadcrumb:ioe,Button:hoe,Checkbox:q4,CloseButton:Toe,Code:Moe,Container:Roe,Divider:Foe,Drawer:Xoe,Editable:rae,Form:uae,FormError:gae,FormLabel:vae,Heading:Sae,Input:_n,Kbd:Aae,Link:Mae,List:jae,Menu:qae,Modal:ise,NumberInput:pse,PinInput:yse,Popover:Lse,Progress:jse,Radio:Hse,Select:Kse,Skeleton:Zse,SkipLink:Jse,Slider:cle,Spinner:hle,Stat:xle,Switch:Tle,Table:Dle,Tabs:Xle,Tag:iue,Textarea:lue,Tooltip:due,Card:yoe},hue={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},pue=hue,gue={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},mue=gue,vue={transparent:"transparent",current:"currentColor",black:"#000000",white:"#FFFFFF",whiteAlpha:{50:"rgba(255, 255, 255, 0.04)",100:"rgba(255, 255, 255, 0.06)",200:"rgba(255, 255, 255, 0.08)",300:"rgba(255, 255, 255, 0.16)",400:"rgba(255, 255, 255, 0.24)",500:"rgba(255, 255, 255, 0.36)",600:"rgba(255, 255, 255, 0.48)",700:"rgba(255, 255, 255, 0.64)",800:"rgba(255, 255, 255, 0.80)",900:"rgba(255, 255, 255, 0.92)"},blackAlpha:{50:"rgba(0, 0, 0, 0.04)",100:"rgba(0, 0, 0, 0.06)",200:"rgba(0, 0, 0, 0.08)",300:"rgba(0, 0, 0, 0.16)",400:"rgba(0, 0, 0, 0.24)",500:"rgba(0, 0, 0, 0.36)",600:"rgba(0, 0, 0, 0.48)",700:"rgba(0, 0, 0, 0.64)",800:"rgba(0, 0, 0, 0.80)",900:"rgba(0, 0, 0, 0.92)"},gray:{50:"#F7FAFC",100:"#EDF2F7",200:"#E2E8F0",300:"#CBD5E0",400:"#A0AEC0",500:"#718096",600:"#4A5568",700:"#2D3748",800:"#1A202C",900:"#171923"},red:{50:"#FFF5F5",100:"#FED7D7",200:"#FEB2B2",300:"#FC8181",400:"#F56565",500:"#E53E3E",600:"#C53030",700:"#9B2C2C",800:"#822727",900:"#63171B"},orange:{50:"#FFFAF0",100:"#FEEBC8",200:"#FBD38D",300:"#F6AD55",400:"#ED8936",500:"#DD6B20",600:"#C05621",700:"#9C4221",800:"#7B341E",900:"#652B19"},yellow:{50:"#FFFFF0",100:"#FEFCBF",200:"#FAF089",300:"#F6E05E",400:"#ECC94B",500:"#D69E2E",600:"#B7791F",700:"#975A16",800:"#744210",900:"#5F370E"},green:{50:"#F0FFF4",100:"#C6F6D5",200:"#9AE6B4",300:"#68D391",400:"#48BB78",500:"#38A169",600:"#2F855A",700:"#276749",800:"#22543D",900:"#1C4532"},teal:{50:"#E6FFFA",100:"#B2F5EA",200:"#81E6D9",300:"#4FD1C5",400:"#38B2AC",500:"#319795",600:"#2C7A7B",700:"#285E61",800:"#234E52",900:"#1D4044"},blue:{50:"#ebf8ff",100:"#bee3f8",200:"#90cdf4",300:"#63b3ed",400:"#4299e1",500:"#3182ce",600:"#2b6cb0",700:"#2c5282",800:"#2a4365",900:"#1A365D"},cyan:{50:"#EDFDFD",100:"#C4F1F9",200:"#9DECF9",300:"#76E4F7",400:"#0BC5EA",500:"#00B5D8",600:"#00A3C4",700:"#0987A0",800:"#086F83",900:"#065666"},purple:{50:"#FAF5FF",100:"#E9D8FD",200:"#D6BCFA",300:"#B794F4",400:"#9F7AEA",500:"#805AD5",600:"#6B46C1",700:"#553C9A",800:"#44337A",900:"#322659"},pink:{50:"#FFF5F7",100:"#FED7E2",200:"#FBB6CE",300:"#F687B3",400:"#ED64A6",500:"#D53F8C",600:"#B83280",700:"#97266D",800:"#702459",900:"#521B41"},linkedin:{50:"#E8F4F9",100:"#CFEDFB",200:"#9BDAF3",300:"#68C7EC",400:"#34B3E4",500:"#00A0DC",600:"#008CC9",700:"#0077B5",800:"#005E93",900:"#004471"},facebook:{50:"#E8F4F9",100:"#D9DEE9",200:"#B7C2DA",300:"#6482C0",400:"#4267B2",500:"#385898",600:"#314E89",700:"#29487D",800:"#223B67",900:"#1E355B"},messenger:{50:"#D0E6FF",100:"#B9DAFF",200:"#A2CDFF",300:"#7AB8FF",400:"#2E90FF",500:"#0078FF",600:"#0063D1",700:"#0052AC",800:"#003C7E",900:"#002C5C"},whatsapp:{50:"#dffeec",100:"#b9f5d0",200:"#90edb3",300:"#65e495",400:"#3cdd78",500:"#22c35e",600:"#179848",700:"#0c6c33",800:"#01421c",900:"#001803"},twitter:{50:"#E5F4FD",100:"#C8E9FB",200:"#A8DCFA",300:"#83CDF7",400:"#57BBF5",500:"#1DA1F2",600:"#1A94DA",700:"#1681BF",800:"#136B9E",900:"#0D4D71"},telegram:{50:"#E3F2F9",100:"#C5E4F3",200:"#A2D4EC",300:"#7AC1E4",400:"#47A9DA",500:"#0088CC",600:"#007AB8",700:"#006BA1",800:"#005885",900:"#003F5E"}},yue=vue,bue={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},Sue=bue,xue={xs:"0 0 0 1px rgba(0, 0, 0, 0.05)",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",base:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",outline:"0 0 0 3px rgba(66, 153, 225, 0.6)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.06)",none:"none","dark-lg":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px"},wue=xue,Cue={common:"background-color, border-color, color, fill, stroke, opacity, box-shadow, transform",colors:"background-color, border-color, color, fill, stroke",dimensions:"width, height",position:"left, right, top, bottom",background:"background-color, background-image, background-position"},_ue={"ease-in":"cubic-bezier(0.4, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.2, 1)","ease-in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},kue={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},Eue={property:Cue,easing:_ue,duration:kue},Pue=Eue,Tue={hide:-1,auto:"auto",base:0,docked:10,dropdown:1e3,sticky:1100,banner:1200,overlay:1300,modal:1400,popover:1500,skipLink:1600,toast:1700,tooltip:1800},Lue=Tue,Aue={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},Oue=Aue,Mue={breakpoints:mue,zIndices:Lue,radii:Sue,blur:Oue,colors:yue,...iB,sizes:tB,shadows:wue,space:eB,borders:pue,transition:Pue},Iue={colors:{"chakra-body-text":{_light:"gray.800",_dark:"whiteAlpha.900"},"chakra-body-bg":{_light:"white",_dark:"gray.800"},"chakra-border-color":{_light:"gray.200",_dark:"whiteAlpha.300"},"chakra-subtle-bg":{_light:"gray.100",_dark:"gray.700"},"chakra-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},Rue={global:{body:{fontFamily:"body",color:"chakra-body-text",bg:"chakra-body-bg",transitionProperty:"background-color",transitionDuration:"normal",lineHeight:"base"},"*::placeholder":{color:"chakra-placeholder-color"},"*, *::before, &::after":{borderColor:"chakra-border-color",wordWrap:"break-word"}}},Due="ltr",Nue={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},jue={semanticTokens:Iue,direction:Due,...Mue,components:fue,styles:Rue,config:Nue},Bue=typeof Element<"u",Fue=typeof Map=="function",$ue=typeof Set=="function",zue=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function u4(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!u4(e[r],t[r]))return!1;return!0}var o;if(Fue&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;for(o=e.entries();!(r=o.next()).done;)if(!u4(r.value[1],t.get(r.value[0])))return!1;return!0}if($ue&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(zue&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;if(Bue&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!u4(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var Hue=function(t,n){try{return u4(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};function h0(){const e=w.useContext(y2);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in ` ` or ` `");return e}function lB(){const e=dy(),t=h0();return{...e,theme:t}}function Vue(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__breakpoints)==null?void 0:o.asArray)==null?void 0:a[i]};return r(t)??r(n)??n}function Wue(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__cssMap)==null?void 0:o[i])==null?void 0:a.value};return r(t)??r(n)??n}function Uue(e,t,n){const r=Array.isArray(t)?t:[t],i=Array.isArray(n)?n:[n];return o=>{const a=i.filter(Boolean),s=r.map((l,u)=>{if(e==="breakpoints")return Vue(o,l,a[u]??l);const d=`${e}.${l}`;return Wue(o,d,a[u]??l)});return Array.isArray(t)?s:s[0]}}function Gue(e){const{cssVarsRoot:t,theme:n,children:r}=e,i=w.useMemo(()=>Fte(n),[n]);return N.createElement(Kne,{theme:i},N.createElement(que,{root:t}),r)}function que({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return N.createElement(MS,{styles:n=>({[t]:n.__cssVars})})}dre({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in ` ` "});function Yue(){const{colorMode:e}=dy();return N.createElement(MS,{styles:t=>{const n=Vj(t,"styles.global"),r=Gj(n,{theme:t,colorMode:e});return r?xj(r)(t):void 0}})}var Kue=new Set([...Hte,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),Xue=new Set(["htmlWidth","htmlHeight","htmlSize"]);function Zue(e){return Xue.has(e)||!Kue.has(e)}var Que=({baseStyle:e})=>t=>{const{theme:n,css:r,__css:i,sx:o,...a}=t,s=Wj(a,(h,m)=>Wte(m)),l=Gj(e,t),u=Object.assign({},i,l,Uj(s),o),d=xj(u)(t.theme);return r?[d,r]:d};function c6(e,t){const{baseStyle:n,...r}=t??{};r.shouldForwardProp||(r.shouldForwardProp=Zue);const i=Que({baseStyle:n}),o=u7(e,r)(i);return N.forwardRef(function(l,u){const{colorMode:d,forced:h}=dy();return N.createElement(o,{ref:u,"data-theme":h?d:void 0,...l})})}function Oe(e){return w.forwardRef(e)}function uB(e,t={}){const{styleConfig:n,...r}=t,{theme:i,colorMode:o}=lB(),a=e?Vj(i,`components.${e}`):void 0,s=n||a,l=Wl({theme:i,colorMode:o},(s==null?void 0:s.defaultProps)??{},Uj(ore(r,["children"]))),u=w.useRef({});if(s){const h=ene(s)(l);Hue(u.current,h)||(u.current=h)}return u.current}function Ao(e,t={}){return uB(e,t)}function Yi(e,t={}){return uB(e,t)}function Jue(){const e=new Map;return new Proxy(c6,{apply(t,n,r){return c6(...r)},get(t,n){return e.has(n)||e.set(n,c6(n)),e.get(n)}})}var Ce=Jue();function ece(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Mn(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:i="Provider",errorMessage:o}=e,a=w.createContext(void 0);a.displayName=t;function s(){var l;const u=w.useContext(a);if(!u&&n){const d=new Error(o??ece(r,i));throw d.name="ContextError",(l=Error.captureStackTrace)==null||l.call(Error,d,s),d}return u}return[a.Provider,s,a]}function tce(e,t){if(e!=null){if(typeof e=="function"){e(t);return}try{e.current=t}catch{throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function Yn(...e){return t=>{e.forEach(n=>{tce(n,t)})}}function nce(...e){return w.useMemo(()=>Yn(...e),e)}function lA(e){return e.sort((t,n)=>{const r=t.compareDocumentPosition(n);if(r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(r&Node.DOCUMENT_POSITION_DISCONNECTED||r&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0})}var rce=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function uA(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function cA(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var g7=typeof window<"u"?w.useLayoutEffect:w.useEffect,K4=e=>e,ice=class{constructor(){sn(this,"descendants",new Map);sn(this,"register",e=>{if(e!=null)return rce(e)?this.registerNode(e):t=>{this.registerNode(t,e)}});sn(this,"unregister",e=>{this.descendants.delete(e);const t=lA(Array.from(this.descendants.keys()));this.assignIndex(t)});sn(this,"destroy",()=>{this.descendants.clear()});sn(this,"assignIndex",e=>{this.descendants.forEach(t=>{const n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()})});sn(this,"count",()=>this.descendants.size);sn(this,"enabledCount",()=>this.enabledValues().length);sn(this,"values",()=>Array.from(this.descendants.values()).sort((t,n)=>t.index-n.index));sn(this,"enabledValues",()=>this.values().filter(e=>!e.disabled));sn(this,"item",e=>{if(this.count()!==0)return this.values()[e]});sn(this,"enabledItem",e=>{if(this.enabledCount()!==0)return this.enabledValues()[e]});sn(this,"first",()=>this.item(0));sn(this,"firstEnabled",()=>this.enabledItem(0));sn(this,"last",()=>this.item(this.descendants.size-1));sn(this,"lastEnabled",()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)});sn(this,"indexOf",e=>{var t;return e?((t=this.descendants.get(e))==null?void 0:t.index)??-1:-1});sn(this,"enabledIndexOf",e=>e==null?-1:this.enabledValues().findIndex(t=>t.node.isSameNode(e)));sn(this,"next",(e,t=!0)=>{const n=uA(e,this.count(),t);return this.item(n)});sn(this,"nextEnabled",(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=uA(r,this.enabledCount(),t);return this.enabledItem(i)});sn(this,"prev",(e,t=!0)=>{const n=cA(e,this.count()-1,t);return this.item(n)});sn(this,"prevEnabled",(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=cA(r,this.enabledCount()-1,t);return this.enabledItem(i)});sn(this,"registerNode",(e,t)=>{if(!e||this.descendants.has(e))return;const n=Array.from(this.descendants.keys()).concat(e),r=lA(n);t!=null&&t.disabled&&(t.disabled=!!t.disabled);const i={node:e,index:-1,...t};this.descendants.set(e,i),this.assignIndex(r)})}};function oce(){const e=w.useRef(new ice);return g7(()=>()=>e.current.destroy()),e.current}var[ace,cB]=Mn({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function sce(e){const t=cB(),[n,r]=w.useState(-1),i=w.useRef(null);g7(()=>()=>{i.current&&t.unregister(i.current)},[]),g7(()=>{if(!i.current)return;const a=Number(i.current.dataset.index);n!=a&&!Number.isNaN(a)&&r(a)});const o=K4(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(i.current),register:Yn(o,i)}}function dB(){return[K4(ace),()=>K4(cB()),()=>oce(),i=>sce(i)]}var Qr=(...e)=>e.filter(Boolean).join(" "),dA={path:N.createElement("g",{stroke:"currentColor",strokeWidth:"1.5"},N.createElement("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),N.createElement("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),N.createElement("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})),viewBox:"0 0 24 24"},Da=Oe((e,t)=>{const{as:n,viewBox:r,color:i="currentColor",focusable:o=!1,children:a,className:s,__css:l,...u}=e,d=Qr("chakra-icon",s),h={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:i,...l},m={ref:t,focusable:o,className:d,__css:h},v=r??dA.viewBox;if(n&&typeof n!="string")return N.createElement(Ce.svg,{as:n,...m,...u});const b=a??dA.path;return N.createElement(Ce.svg,{verticalAlign:"middle",viewBox:v,...m,...u},b)});Da.displayName="Icon";function yt(e){const{viewBox:t="0 0 24 24",d:n,displayName:r,defaultProps:i={}}=e,o=w.Children.toArray(e.path),a=Oe((s,l)=>N.createElement(Da,{ref:l,viewBox:t,...i,...s},o.length?o:N.createElement("path",{fill:"currentColor",d:n})));return a.displayName=r,a}function Er(e,t=[]){const n=w.useRef(e);return w.useEffect(()=>{n.current=e}),w.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function NS(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:i=(m,v)=>m!==v}=e,o=Er(r),a=Er(i),[s,l]=w.useState(n),u=t!==void 0,d=u?t:s,h=Er(m=>{const b=typeof m=="function"?m(d):m;a(d,b)&&(u||l(b),o(b))},[u,o,d,a]);return[d,h]}const O_=w.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),jS=w.createContext({});function lce(){return w.useContext(jS).visualElement}const p0=w.createContext(null),np=typeof document<"u",X4=np?w.useLayoutEffect:w.useEffect,fB=w.createContext({strict:!1});function uce(e,t,n,r){const i=lce(),o=w.useContext(fB),a=w.useContext(p0),s=w.useContext(O_).reducedMotion,l=w.useRef();r=r||o.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceId:a?a.id:void 0,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:s}));const u=l.current;return X4(()=>{u&&u.render()}),w.useEffect(()=>{u&&u.animationState&&u.animationState.animateChanges()}),X4(()=>()=>u&&u.notify("Unmount"),[]),u}function Hg(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function cce(e,t,n){return w.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Hg(n)&&(n.current=r))},[t])}function w2(e){return typeof e=="string"||Array.isArray(e)}function BS(e){return typeof e=="object"&&typeof e.start=="function"}const dce=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function FS(e){return BS(e.animate)||dce.some(t=>w2(e[t]))}function hB(e){return Boolean(FS(e)||e.variants)}function fce(e,t){if(FS(e)){const{initial:n,animate:r}=e;return{initial:n===!1||w2(n)?n:void 0,animate:w2(r)?r:void 0}}return e.inherit!==!1?t:{}}function hce(e){const{initial:t,animate:n}=fce(e,w.useContext(jS));return w.useMemo(()=>({initial:t,animate:n}),[fA(t),fA(n)])}function fA(e){return Array.isArray(e)?e.join(" "):e}const Bu=e=>({isEnabled:t=>e.some(n=>!!t[n])}),C2={measureLayout:Bu(["layout","layoutId","drag"]),animation:Bu(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:Bu(["exit"]),drag:Bu(["drag","dragControls"]),focus:Bu(["whileFocus"]),hover:Bu(["whileHover","onHoverStart","onHoverEnd"]),tap:Bu(["whileTap","onTap","onTapStart","onTapCancel"]),pan:Bu(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:Bu(["whileInView","onViewportEnter","onViewportLeave"])};function pce(e){for(const t in e)t==="projectionNodeConstructor"?C2.projectionNodeConstructor=e[t]:C2[t].Component=e[t]}function $S(e){const t=w.useRef(null);return t.current===null&&(t.current=e()),t.current}const $v={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let gce=1;function mce(){return $S(()=>{if($v.hasEverUpdated)return gce++})}const M_=w.createContext({});class vce extends N.Component{getSnapshotBeforeUpdate(){const{visualElement:t,props:n}=this.props;return t&&t.setProps(n),null}componentDidUpdate(){}render(){return this.props.children}}const pB=w.createContext({}),yce=Symbol.for("motionComponentSymbol");function bce({preloadedFeatures:e,createVisualElement:t,projectionNodeConstructor:n,useRender:r,useVisualState:i,Component:o}){e&&pce(e);function a(l,u){const d={...w.useContext(O_),...l,layoutId:Sce(l)},{isStatic:h}=d;let m=null;const v=hce(l),b=h?void 0:mce(),S=i(l,h);if(!h&&np){v.visualElement=uce(o,S,d,t);const k=w.useContext(fB).strict,E=w.useContext(pB);v.visualElement&&(m=v.visualElement.loadFeatures(d,k,e,b,n||C2.projectionNodeConstructor,E))}return w.createElement(vce,{visualElement:v.visualElement,props:d},m,w.createElement(jS.Provider,{value:v},r(o,l,b,cce(S,v.visualElement,u),S,h,v.visualElement)))}const s=w.forwardRef(a);return s[yce]=o,s}function Sce({layoutId:e}){const t=w.useContext(M_).id;return t&&e!==void 0?t+"-"+e:e}function xce(e){function t(r,i={}){return bce(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const wce=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function I_(e){return typeof e!="string"||e.includes("-")?!1:!!(wce.indexOf(e)>-1||/[A-Z]/.test(e))}const Z4={};function Cce(e){Object.assign(Z4,e)}const Q4=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],g0=new Set(Q4);function gB(e,{layout:t,layoutId:n}){return g0.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Z4[e]||e==="opacity")}const ou=e=>!!(e!=null&&e.getVelocity),_ce={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},kce=(e,t)=>Q4.indexOf(e)-Q4.indexOf(t);function Ece({transform:e,transformKeys:t},{enableHardwareAcceleration:n=!0,allowTransformNone:r=!0},i,o){let a="";t.sort(kce);for(const s of t)a+=`${_ce[s]||s}(${e[s]}) `;return n&&!e.z&&(a+="translateZ(0)"),a=a.trim(),o?a=o(e,i?"":a):r&&i&&(a="none"),a}function mB(e){return e.startsWith("--")}const Pce=(e,t)=>t&&typeof e=="number"?t.transform(e):e,vB=(e,t)=>n=>Math.max(Math.min(n,t),e),zv=e=>e%1?Number(e.toFixed(5)):e,_2=/(-)?([\d]*\.?[\d])+/g,m7=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,Tce=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function gy(e){return typeof e=="string"}const rp={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Hv=Object.assign(Object.assign({},rp),{transform:vB(0,1)}),Y3=Object.assign(Object.assign({},rp),{default:1}),my=e=>({test:t=>gy(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),cd=my("deg"),Xl=my("%"),Lt=my("px"),Lce=my("vh"),Ace=my("vw"),hA=Object.assign(Object.assign({},Xl),{parse:e=>Xl.parse(e)/100,transform:e=>Xl.transform(e*100)}),R_=(e,t)=>n=>Boolean(gy(n)&&Tce.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),yB=(e,t,n)=>r=>{if(!gy(r))return r;const[i,o,a,s]=r.match(_2);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},Ch={test:R_("hsl","hue"),parse:yB("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Xl.transform(zv(t))+", "+Xl.transform(zv(n))+", "+zv(Hv.transform(r))+")"},Oce=vB(0,255),d6=Object.assign(Object.assign({},rp),{transform:e=>Math.round(Oce(e))}),wd={test:R_("rgb","red"),parse:yB("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+d6.transform(e)+", "+d6.transform(t)+", "+d6.transform(n)+", "+zv(Hv.transform(r))+")"};function Mce(e){let t="",n="",r="",i="";return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),i=e.substr(4,1),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const v7={test:R_("#"),parse:Mce,transform:wd.transform},So={test:e=>wd.test(e)||v7.test(e)||Ch.test(e),parse:e=>wd.test(e)?wd.parse(e):Ch.test(e)?Ch.parse(e):v7.parse(e),transform:e=>gy(e)?e:e.hasOwnProperty("red")?wd.transform(e):Ch.transform(e)},bB="${c}",SB="${n}";function Ice(e){var t,n,r,i;return isNaN(e)&&gy(e)&&((n=(t=e.match(_2))===null||t===void 0?void 0:t.length)!==null&&n!==void 0?n:0)+((i=(r=e.match(m7))===null||r===void 0?void 0:r.length)!==null&&i!==void 0?i:0)>0}function xB(e){typeof e=="number"&&(e=`${e}`);const t=[];let n=0;const r=e.match(m7);r&&(n=r.length,e=e.replace(m7,bB),t.push(...r.map(So.parse)));const i=e.match(_2);return i&&(e=e.replace(_2,SB),t.push(...i.map(rp.parse))),{values:t,numColors:n,tokenised:e}}function wB(e){return xB(e).values}function CB(e){const{values:t,numColors:n,tokenised:r}=xB(e),i=t.length;return o=>{let a=r;for(let s=0;stypeof e=="number"?0:e;function Dce(e){const t=wB(e);return CB(e)(t.map(Rce))}const Ju={test:Ice,parse:wB,createTransformer:CB,getAnimatableNone:Dce},Nce=new Set(["brightness","contrast","saturate","opacity"]);function jce(e){let[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(_2)||[];if(!r)return e;const i=n.replace(r,"");let o=Nce.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const Bce=/([a-z-]*)\(.*?\)/g,y7=Object.assign(Object.assign({},Ju),{getAnimatableNone:e=>{const t=e.match(Bce);return t?t.map(jce).join(" "):e}}),pA={...rp,transform:Math.round},_B={borderWidth:Lt,borderTopWidth:Lt,borderRightWidth:Lt,borderBottomWidth:Lt,borderLeftWidth:Lt,borderRadius:Lt,radius:Lt,borderTopLeftRadius:Lt,borderTopRightRadius:Lt,borderBottomRightRadius:Lt,borderBottomLeftRadius:Lt,width:Lt,maxWidth:Lt,height:Lt,maxHeight:Lt,size:Lt,top:Lt,right:Lt,bottom:Lt,left:Lt,padding:Lt,paddingTop:Lt,paddingRight:Lt,paddingBottom:Lt,paddingLeft:Lt,margin:Lt,marginTop:Lt,marginRight:Lt,marginBottom:Lt,marginLeft:Lt,rotate:cd,rotateX:cd,rotateY:cd,rotateZ:cd,scale:Y3,scaleX:Y3,scaleY:Y3,scaleZ:Y3,skew:cd,skewX:cd,skewY:cd,distance:Lt,translateX:Lt,translateY:Lt,translateZ:Lt,x:Lt,y:Lt,z:Lt,perspective:Lt,transformPerspective:Lt,opacity:Hv,originX:hA,originY:hA,originZ:Lt,zIndex:pA,fillOpacity:Hv,strokeOpacity:Hv,numOctaves:pA};function D_(e,t,n,r){const{style:i,vars:o,transform:a,transformKeys:s,transformOrigin:l}=e;s.length=0;let u=!1,d=!1,h=!0;for(const m in t){const v=t[m];if(mB(m)){o[m]=v;continue}const b=_B[m],S=Pce(v,b);if(g0.has(m)){if(u=!0,a[m]=S,s.push(m),!h)continue;v!==(b.default||0)&&(h=!1)}else m.startsWith("origin")?(d=!0,l[m]=S):i[m]=S}if(t.transform||(u||r?i.transform=Ece(e,n,h,r):i.transform&&(i.transform="none")),d){const{originX:m="50%",originY:v="50%",originZ:b=0}=l;i.transformOrigin=`${m} ${v} ${b}`}}const N_=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function kB(e,t,n){for(const r in t)!ou(t[r])&&!gB(r,n)&&(e[r]=t[r])}function Fce({transformTemplate:e},t,n){return w.useMemo(()=>{const r=N_();return D_(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function $ce(e,t,n){const r=e.style||{},i={};return kB(i,r,e),Object.assign(i,Fce(e,t,n)),e.transformValues?e.transformValues(i):i}function zce(e,t,n){const r={},i=$ce(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),r.style=i,r}const Hce=["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],Vce=["whileTap","onTap","onTapStart","onTapCancel"],Wce=["onPan","onPanStart","onPanSessionStart","onPanEnd"],Uce=["whileInView","onViewportEnter","onViewportLeave","viewport"],Gce=new Set(["initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","onHoverStart","onHoverEnd","layoutScroll",...Uce,...Vce,...Hce,...Wce]);function J4(e){return Gce.has(e)}let EB=e=>!J4(e);function qce(e){e&&(EB=t=>t.startsWith("on")?!J4(t):e(t))}try{qce(require("@emotion/is-prop-valid").default)}catch{}function Yce(e,t,n){const r={};for(const i in e)(EB(i)||n===!0&&J4(i)||!t&&!J4(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function gA(e,t,n){return typeof e=="string"?e:Lt.transform(t+n*e)}function Kce(e,t,n){const r=gA(t,e.x,e.width),i=gA(n,e.y,e.height);return`${r} ${i}`}const Xce={offset:"stroke-dashoffset",array:"stroke-dasharray"},Zce={offset:"strokeDashoffset",array:"strokeDasharray"};function Qce(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?Xce:Zce;e[o.offset]=Lt.transform(-r);const a=Lt.transform(t),s=Lt.transform(n);e[o.array]=`${a} ${s}`}function j_(e,{attrX:t,attrY:n,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:s=0,...l},u,d){D_(e,l,u,d),e.attrs=e.style,e.style={};const{attrs:h,style:m,dimensions:v}=e;h.transform&&(v&&(m.transform=h.transform),delete h.transform),v&&(r!==void 0||i!==void 0||m.transform)&&(m.transformOrigin=Kce(v,r!==void 0?r:.5,i!==void 0?i:.5)),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),o!==void 0&&Qce(h,o,a,s,!1)}const PB=()=>({...N_(),attrs:{}});function Jce(e,t){const n=w.useMemo(()=>{const r=PB();return j_(r,t,{enableHardwareAcceleration:!1},e.transformTemplate),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};kB(r,e.style,e),n.style={...r,...n.style}}return n}function ede(e=!1){return(n,r,i,o,{latestValues:a},s)=>{const u=(I_(n)?Jce:zce)(r,a,s),h={...Yce(r,typeof n=="string",e),...u,ref:o};return i&&(h["data-projection-id"]=i),w.createElement(n,h)}}const TB=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function LB(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const AB=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function OB(e,t,n,r){LB(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(AB.has(i)?i:TB(i),t.attrs[i])}function B_(e){const{style:t}=e,n={};for(const r in t)(ou(t[r])||gB(r,e))&&(n[r]=t[r]);return n}function MB(e){const t=B_(e);for(const n in e)if(ou(e[n])){const r=n==="x"||n==="y"?"attr"+n.toUpperCase():n;t[r]=e[n]}return t}function F_(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}const k2=e=>Array.isArray(e),tde=e=>Boolean(e&&typeof e=="object"&&e.mix&&e.toValue),IB=e=>k2(e)?e[e.length-1]||0:e;function c4(e){const t=ou(e)?e.get():e;return tde(t)?t.toValue():t}function nde({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const a={latestValues:rde(r,i,o,e),renderState:t()};return n&&(a.mount=s=>n(r,s,a)),a}const RB=e=>(t,n)=>{const r=w.useContext(jS),i=w.useContext(p0),o=()=>nde(e,t,r,i);return n?o():$S(o)};function rde(e,t,n,r){const i={},o=r(e);for(const m in o)i[m]=c4(o[m]);let{initial:a,animate:s}=e;const l=FS(e),u=hB(e);t&&u&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let d=n?n.initial===!1:!1;d=d||a===!1;const h=d?s:a;return h&&typeof h!="boolean"&&!BS(h)&&(Array.isArray(h)?h:[h]).forEach(v=>{const b=F_(e,v);if(!b)return;const{transitionEnd:S,transition:k,...E}=b;for(const _ in E){let T=E[_];if(Array.isArray(T)){const A=d?T.length-1:0;T=T[A]}T!==null&&(i[_]=T)}for(const _ in S)i[_]=S[_]}),i}const ide={useVisualState:RB({scrapeMotionValuesFromProps:MB,createRenderState:PB,onMount:(e,t,{renderState:n,latestValues:r})=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}j_(n,r,{enableHardwareAcceleration:!1},e.transformTemplate),OB(t,n)}})},ode={useVisualState:RB({scrapeMotionValuesFromProps:B_,createRenderState:N_})};function ade(e,{forwardMotionProps:t=!1},n,r,i){return{...I_(e)?ide:ode,preloadedFeatures:n,useRender:ede(t),createVisualElement:r,projectionNodeConstructor:i,Component:e}}var tr;(function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"})(tr||(tr={}));function zS(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function b7(e,t,n,r){w.useEffect(()=>{const i=e.current;if(n&&i)return zS(i,t,n,r)},[e,t,n,r])}function sde({whileFocus:e,visualElement:t}){const{animationState:n}=t,r=()=>{n&&n.setActive(tr.Focus,!0)},i=()=>{n&&n.setActive(tr.Focus,!1)};b7(t,"focus",e?r:void 0),b7(t,"blur",e?i:void 0)}function DB(e){return typeof PointerEvent<"u"&&e instanceof PointerEvent?e.pointerType==="mouse":e instanceof MouseEvent}function NB(e){return!!e.touches}function lde(e){return t=>{const n=t instanceof MouseEvent;(!n||n&&t.button===0)&&e(t)}}const ude={pageX:0,pageY:0};function cde(e,t="page"){const r=e.touches[0]||e.changedTouches[0]||ude;return{x:r[t+"X"],y:r[t+"Y"]}}function dde(e,t="page"){return{x:e[t+"X"],y:e[t+"Y"]}}function $_(e,t="page"){return{point:NB(e)?cde(e,t):dde(e,t)}}const jB=(e,t=!1)=>{const n=r=>e(r,$_(r));return t?lde(n):n},fde=()=>np&&window.onpointerdown===null,hde=()=>np&&window.ontouchstart===null,pde=()=>np&&window.onmousedown===null,gde={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},mde={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function BB(e){return fde()?e:hde()?mde[e]:pde()?gde[e]:e}function Sm(e,t,n,r){return zS(e,BB(t),jB(n,t==="pointerdown"),r)}function e5(e,t,n,r){return b7(e,BB(t),n&&jB(n,t==="pointerdown"),r)}function FB(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const mA=FB("dragHorizontal"),vA=FB("dragVertical");function $B(e){let t=!1;if(e==="y")t=vA();else if(e==="x")t=mA();else{const n=mA(),r=vA();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function zB(){const e=$B(!0);return e?(e(),!1):!0}function yA(e,t,n){return(r,i)=>{!DB(r)||zB()||(e.animationState&&e.animationState.setActive(tr.Hover,t),n&&n(r,i))}}function vde({onHoverStart:e,onHoverEnd:t,whileHover:n,visualElement:r}){e5(r,"pointerenter",e||n?yA(r,!0,e):void 0,{passive:!e}),e5(r,"pointerleave",t||n?yA(r,!1,t):void 0,{passive:!t})}const HB=(e,t)=>t?e===t?!0:HB(e,t.parentElement):!1;function z_(e){return w.useEffect(()=>()=>e(),[])}function VB(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);iMath.min(Math.max(n,e),t),f6=.001,bde=.01,bA=10,Sde=.05,xde=1;function wde({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;yde(e<=bA*1e3);let a=1-t;a=n5(Sde,xde,a),e=n5(bde,bA,e/1e3),a<1?(i=u=>{const d=u*a,h=d*e,m=d-n,v=S7(u,a),b=Math.exp(-h);return f6-m/v*b},o=u=>{const h=u*a*e,m=h*n+n,v=Math.pow(a,2)*Math.pow(u,2)*e,b=Math.exp(-h),S=S7(Math.pow(u,2),a);return(-i(u)+f6>0?-1:1)*((m-v)*b)/S}):(i=u=>{const d=Math.exp(-u*e),h=(u-n)*e+1;return-f6+d*h},o=u=>{const d=Math.exp(-u*e),h=(n-u)*(e*e);return d*h});const s=5/e,l=_de(i,o,s);if(e=e*1e3,isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:a*2*Math.sqrt(r*u),duration:e}}}const Cde=12;function _de(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function Pde(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!SA(e,Ede)&&SA(e,kde)){const n=wde(e);t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function H_(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:i}=e,o=VB(e,["from","to","restSpeed","restDelta"]);const a={done:!1,value:t};let{stiffness:s,damping:l,mass:u,velocity:d,duration:h,isResolvedFromDuration:m}=Pde(o),v=xA,b=xA;function S(){const k=d?-(d/1e3):0,E=n-t,_=l/(2*Math.sqrt(s*u)),T=Math.sqrt(s/u)/1e3;if(i===void 0&&(i=Math.min(Math.abs(n-t)/100,.4)),_<1){const A=S7(T,_);v=I=>{const R=Math.exp(-_*T*I);return n-R*((k+_*T*E)/A*Math.sin(A*I)+E*Math.cos(A*I))},b=I=>{const R=Math.exp(-_*T*I);return _*T*R*(Math.sin(A*I)*(k+_*T*E)/A+E*Math.cos(A*I))-R*(Math.cos(A*I)*(k+_*T*E)-A*E*Math.sin(A*I))}}else if(_===1)v=A=>n-Math.exp(-T*A)*(E+(k+T*E)*A);else{const A=T*Math.sqrt(_*_-1);v=I=>{const R=Math.exp(-_*T*I),D=Math.min(A*I,300);return n-R*((k+_*T*E)*Math.sinh(D)+A*E*Math.cosh(D))/A}}}return S(),{next:k=>{const E=v(k);if(m)a.done=k>=h;else{const _=b(k)*1e3,T=Math.abs(_)<=r,A=Math.abs(n-E)<=i;a.done=T&&A}return a.value=a.done?n:E,a},flipTarget:()=>{d=-d,[t,n]=[n,t],S()}}}H_.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const xA=e=>0,E2=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},$r=(e,t,n)=>-n*e+n*t+e;function h6(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function wA({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,a=0;if(!t)i=o=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;i=h6(l,s,e+1/3),o=h6(l,s,e),a=h6(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}const Tde=(e,t,n)=>{const r=e*e,i=t*t;return Math.sqrt(Math.max(0,n*(i-r)+r))},Lde=[v7,wd,Ch],CA=e=>Lde.find(t=>t.test(e)),WB=(e,t)=>{let n=CA(e),r=CA(t),i=n.parse(e),o=r.parse(t);n===Ch&&(i=wA(i),n=wd),r===Ch&&(o=wA(o),r=wd);const a=Object.assign({},i);return s=>{for(const l in a)l!=="alpha"&&(a[l]=Tde(i[l],o[l],s));return a.alpha=$r(i.alpha,o.alpha,s),n.transform(a)}},x7=e=>typeof e=="number",Ade=(e,t)=>n=>t(e(n)),HS=(...e)=>e.reduce(Ade);function UB(e,t){return x7(e)?n=>$r(e,t,n):So.test(e)?WB(e,t):qB(e,t)}const GB=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,a)=>UB(o,t[a]));return o=>{for(let a=0;a{const n=Object.assign(Object.assign({},e),t),r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=UB(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}};function _A(e){const t=Ju.parse(e),n=t.length;let r=0,i=0,o=0;for(let a=0;a{const n=Ju.createTransformer(t),r=_A(e),i=_A(t);return r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers?HS(GB(r.parsed,i.parsed),n):a=>`${a>0?t:e}`},Mde=(e,t)=>n=>$r(e,t,n);function Ide(e){if(typeof e=="number")return Mde;if(typeof e=="string")return So.test(e)?WB:qB;if(Array.isArray(e))return GB;if(typeof e=="object")return Ode}function Rde(e,t,n){const r=[],i=n||Ide(e[0]),o=e.length-1;for(let a=0;an(E2(e,t,r))}function Nde(e,t){const n=e.length,r=n-1;return i=>{let o=0,a=!1;if(i<=e[0]?a=!0:i>=e[r]&&(o=r-1,a=!0),!a){let l=1;for(;li||l===r);l++);o=l-1}const s=E2(e[o],e[o+1],i);return t[o](s)}}function YB(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;t5(o===t.length),t5(!r||!Array.isArray(r)||r.length===o-1),e[0]>e[o-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());const a=Rde(t,r,i),s=o===2?Dde(e,a):Nde(e,a);return n?l=>s(n5(e[0],e[o-1],l)):s}const VS=e=>t=>1-e(1-t),V_=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,jde=e=>t=>Math.pow(t,e),KB=e=>t=>t*t*((e+1)*t-e),Bde=e=>{const t=KB(e);return n=>(n*=2)<1?.5*t(n):.5*(2-Math.pow(2,-10*(n-1)))},XB=1.525,Fde=4/11,$de=8/11,zde=9/10,W_=e=>e,U_=jde(2),Hde=VS(U_),ZB=V_(U_),QB=e=>1-Math.sin(Math.acos(e)),G_=VS(QB),Vde=V_(G_),q_=KB(XB),Wde=VS(q_),Ude=V_(q_),Gde=Bde(XB),qde=4356/361,Yde=35442/1805,Kde=16061/1805,r5=e=>{if(e===1||e===0)return e;const t=e*e;return ee<.5?.5*(1-r5(1-e*2)):.5*r5(e*2-1)+.5;function Qde(e,t){return e.map(()=>t||ZB).splice(0,e.length-1)}function Jde(e){const t=e.length;return e.map((n,r)=>r!==0?r/(t-1):0)}function efe(e,t){return e.map(n=>n*t)}function d4({from:e=0,to:t=1,ease:n,offset:r,duration:i=300}){const o={done:!1,value:e},a=Array.isArray(t)?t:[e,t],s=efe(r&&r.length===a.length?r:Jde(a),i);function l(){return YB(s,a,{ease:Array.isArray(n)?n:Qde(a,n)})}let u=l();return{next:d=>(o.value=u(d),o.done=d>=i,o),flipTarget:()=>{a.reverse(),u=l()}}}function tfe({velocity:e=0,from:t=0,power:n=.8,timeConstant:r=350,restDelta:i=.5,modifyTarget:o}){const a={done:!1,value:t};let s=n*e;const l=t+s,u=o===void 0?l:o(l);return u!==l&&(s=u-t),{next:d=>{const h=-s*Math.exp(-d/r);return a.done=!(h>i||h<-i),a.value=a.done?u:u+h,a},flipTarget:()=>{}}}const kA={keyframes:d4,spring:H_,decay:tfe};function nfe(e){if(Array.isArray(e.to))return d4;if(kA[e.type])return kA[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?d4:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?H_:d4}const JB=1/60*1e3,rfe=typeof performance<"u"?()=>performance.now():()=>Date.now(),eF=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(rfe()),JB);function ife(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,d=!1)=>{const h=d&&i,m=h?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),h&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=ife(()=>P2=!0),e),{}),afe=vy.reduce((e,t)=>{const n=WS[t];return e[t]=(r,i=!1,o=!1)=>(P2||ufe(),n.schedule(r,i,o)),e},{}),sfe=vy.reduce((e,t)=>(e[t]=WS[t].cancel,e),{});vy.reduce((e,t)=>(e[t]=()=>WS[t].process(xm),e),{});const lfe=e=>WS[e].process(xm),tF=e=>{P2=!1,xm.delta=w7?JB:Math.max(Math.min(e-xm.timestamp,ofe),1),xm.timestamp=e,C7=!0,vy.forEach(lfe),C7=!1,P2&&(w7=!1,eF(tF))},ufe=()=>{P2=!0,w7=!0,C7||eF(tF)},cfe=()=>xm;function nF(e,t,n=0){return e-t-n}function dfe(e,t,n=0,r=!0){return r?nF(t+-e,t,n):t-(e-t)+n}function ffe(e,t,n,r){return r?e>=t+n:e<=-n}const hfe=e=>{const t=({delta:n})=>e(n);return{start:()=>afe.update(t,!0),stop:()=>sfe.update(t)}};function rF(e){var t,n,{from:r,autoplay:i=!0,driver:o=hfe,elapsed:a=0,repeat:s=0,repeatType:l="loop",repeatDelay:u=0,onPlay:d,onStop:h,onComplete:m,onRepeat:v,onUpdate:b}=e,S=VB(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:k}=S,E,_=0,T=S.duration,A,I=!1,R=!0,D;const j=nfe(S);!((n=(t=j).needsInterpolation)===null||n===void 0)&&n.call(t,r,k)&&(D=YB([0,100],[r,k],{clamp:!1}),r=0,k=100);const z=j(Object.assign(Object.assign({},S),{from:r,to:k}));function V(){_++,l==="reverse"?(R=_%2===0,a=dfe(a,T,u,R)):(a=nF(a,T,u),l==="mirror"&&z.flipTarget()),I=!1,v&&v()}function K(){E.stop(),m&&m()}function te(F){if(R||(F=-F),a+=F,!I){const U=z.next(Math.max(0,a));A=U.value,D&&(A=D(A)),I=R?U.done:a<=0}b==null||b(A),I&&(_===0&&(T??(T=a)),_{h==null||h(),E.stop()}}}function iF(e,t){return t?e*(1e3/t):0}function pfe({from:e=0,velocity:t=0,min:n,max:r,power:i=.8,timeConstant:o=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:l=1,modifyTarget:u,driver:d,onUpdate:h,onComplete:m,onStop:v}){let b;function S(T){return n!==void 0&&Tr}function k(T){return n===void 0?r:r===void 0||Math.abs(n-T){var I;h==null||h(A),(I=T.onUpdate)===null||I===void 0||I.call(T,A)},onComplete:m,onStop:v}))}function _(T){E(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:l},T))}if(S(e))_({from:e,velocity:t,to:k(e)});else{let T=i*t+e;typeof u<"u"&&(T=u(T));const A=k(T),I=A===n?-1:1;let R,D;const j=z=>{R=D,D=z,t=iF(z-R,cfe().delta),(I===1&&z>A||I===-1&&zb==null?void 0:b.stop()}}const _7=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),EA=e=>_7(e)&&e.hasOwnProperty("z"),K3=(e,t)=>Math.abs(e-t);function Y_(e,t){if(x7(e)&&x7(t))return K3(e,t);if(_7(e)&&_7(t)){const n=K3(e.x,t.x),r=K3(e.y,t.y),i=EA(e)&&EA(t)?K3(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}}const oF=(e,t)=>1-3*t+3*e,aF=(e,t)=>3*t-6*e,sF=e=>3*e,i5=(e,t,n)=>((oF(t,n)*e+aF(t,n))*e+sF(t))*e,lF=(e,t,n)=>3*oF(t,n)*e*e+2*aF(t,n)*e+sF(t),gfe=1e-7,mfe=10;function vfe(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=i5(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>gfe&&++s=bfe?Sfe(a,h,e,n):m===0?h:vfe(a,s,s+X3,e,n)}return a=>a===0||a===1?a:i5(o(a),t,r)}function wfe({onTap:e,onTapStart:t,onTapCancel:n,whileTap:r,visualElement:i}){const o=e||t||n||r,a=w.useRef(!1),s=w.useRef(null),l={passive:!(t||e||n||v)};function u(){s.current&&s.current(),s.current=null}function d(){return u(),a.current=!1,i.animationState&&i.animationState.setActive(tr.Tap,!1),!zB()}function h(b,S){d()&&(HB(i.current,b.target)?e&&e(b,S):n&&n(b,S))}function m(b,S){d()&&n&&n(b,S)}function v(b,S){u(),!a.current&&(a.current=!0,s.current=HS(Sm(window,"pointerup",h,l),Sm(window,"pointercancel",m,l)),i.animationState&&i.animationState.setActive(tr.Tap,!0),t&&t(b,S))}e5(i,"pointerdown",o?v:void 0,l),z_(u)}const Cfe="production",uF=typeof process>"u"||process.env===void 0?Cfe:"production",PA=new Set;function cF(e,t,n){e||PA.has(t)||(console.warn(t),n&&console.warn(n),PA.add(t))}const k7=new WeakMap,p6=new WeakMap,_fe=e=>{const t=k7.get(e.target);t&&t(e)},kfe=e=>{e.forEach(_fe)};function Efe({root:e,...t}){const n=e||document;p6.has(n)||p6.set(n,{});const r=p6.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(kfe,{root:e,...t})),r[i]}function Pfe(e,t,n){const r=Efe(t);return k7.set(e,n),r.observe(e),()=>{k7.delete(e),r.unobserve(e)}}function Tfe({visualElement:e,whileInView:t,onViewportEnter:n,onViewportLeave:r,viewport:i={}}){const o=w.useRef({hasEnteredView:!1,isInView:!1});let a=Boolean(t||n||r);i.once&&o.current.hasEnteredView&&(a=!1),(typeof IntersectionObserver>"u"?Ofe:Afe)(a,o.current,e,i)}const Lfe={some:0,all:1};function Afe(e,t,n,{root:r,margin:i,amount:o="some",once:a}){w.useEffect(()=>{if(!e||!n.current)return;const s={root:r==null?void 0:r.current,rootMargin:i,threshold:typeof o=="number"?o:Lfe[o]},l=u=>{const{isIntersecting:d}=u;if(t.isInView===d||(t.isInView=d,a&&!d&&t.hasEnteredView))return;d&&(t.hasEnteredView=!0),n.animationState&&n.animationState.setActive(tr.InView,d);const h=n.getProps(),m=d?h.onViewportEnter:h.onViewportLeave;m&&m(u)};return Pfe(n.current,s,l)},[e,r,i,o])}function Ofe(e,t,n,{fallback:r=!0}){w.useEffect(()=>{!e||!r||(uF!=="production"&&cF(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(()=>{t.hasEnteredView=!0;const{onViewportEnter:i}=n.getProps();i&&i(null),n.animationState&&n.animationState.setActive(tr.InView,!0)}))},[e])}const Cd=e=>t=>(e(t),null),Mfe={inView:Cd(Tfe),tap:Cd(wfe),focus:Cd(sde),hover:Cd(vde)};function K_(){const e=w.useContext(p0);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=w.useId();return w.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}function Ife(){return Rfe(w.useContext(p0))}function Rfe(e){return e===null?!0:e.isPresent}function dF(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;re*1e3,Dfe={linear:W_,easeIn:U_,easeInOut:ZB,easeOut:Hde,circIn:QB,circInOut:Vde,circOut:G_,backIn:q_,backInOut:Ude,backOut:Wde,anticipate:Gde,bounceIn:Xde,bounceInOut:Zde,bounceOut:r5},TA=e=>{if(Array.isArray(e)){t5(e.length===4);const[t,n,r,i]=e;return xfe(t,n,r,i)}else if(typeof e=="string")return Dfe[e];return e},Nfe=e=>Array.isArray(e)&&typeof e[0]!="number",LA=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&Ju.test(t)&&!t.startsWith("url(")),rh=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),Z3=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),g6=()=>({type:"keyframes",ease:"linear",duration:.3}),jfe=e=>({type:"keyframes",duration:.8,values:e}),AA={x:rh,y:rh,z:rh,rotate:rh,rotateX:rh,rotateY:rh,rotateZ:rh,scaleX:Z3,scaleY:Z3,scale:Z3,opacity:g6,backgroundColor:g6,color:g6,default:Z3},Bfe=(e,t)=>{let n;return k2(t)?n=jfe:n=AA[e]||AA.default,{to:t,...n(t)}},Ffe={..._B,color:So,backgroundColor:So,outlineColor:So,fill:So,stroke:So,borderColor:So,borderTopColor:So,borderRightColor:So,borderBottomColor:So,borderLeftColor:So,filter:y7,WebkitFilter:y7},X_=e=>Ffe[e];function Z_(e,t){var n;let r=X_(e);return r!==y7&&(r=Ju),(n=r.getAnimatableNone)===null||n===void 0?void 0:n.call(r,t)}const $fe={current:!1},fF=1/60*1e3,zfe=typeof performance<"u"?()=>performance.now():()=>Date.now(),hF=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(zfe()),fF);function Hfe(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,d=!1)=>{const h=d&&i,m=h?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),h&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=Hfe(()=>T2=!0),e),{}),Gs=yy.reduce((e,t)=>{const n=US[t];return e[t]=(r,i=!1,o=!1)=>(T2||Ufe(),n.schedule(r,i,o)),e},{}),Vh=yy.reduce((e,t)=>(e[t]=US[t].cancel,e),{}),m6=yy.reduce((e,t)=>(e[t]=()=>US[t].process(wm),e),{}),Wfe=e=>US[e].process(wm),pF=e=>{T2=!1,wm.delta=E7?fF:Math.max(Math.min(e-wm.timestamp,Vfe),1),wm.timestamp=e,P7=!0,yy.forEach(Wfe),P7=!1,T2&&(E7=!1,hF(pF))},Ufe=()=>{T2=!0,E7=!0,P7||hF(pF)},T7=()=>wm;function gF(e,t){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Vh.read(r),e(o-t))};return Gs.read(r,!0),()=>Vh.read(r)}function Gfe({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:s,from:l,...u}){return!!Object.keys(u).length}function qfe({ease:e,times:t,yoyo:n,flip:r,loop:i,...o}){const a={...o};return t&&(a.offset=t),o.duration&&(a.duration=o5(o.duration)),o.repeatDelay&&(a.repeatDelay=o5(o.repeatDelay)),e&&(a.ease=Nfe(e)?e.map(TA):TA(e)),o.type==="tween"&&(a.type="keyframes"),(n||i||r)&&(n?a.repeatType="reverse":i?a.repeatType="loop":r&&(a.repeatType="mirror"),a.repeat=i||n||r||o.repeat),o.type!=="spring"&&(a.type="keyframes"),a}function Yfe(e,t){var n,r;return(r=(n=(Q_(e,t)||{}).delay)!==null&&n!==void 0?n:e.delay)!==null&&r!==void 0?r:0}function Kfe(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=[...e.to],e.to[0]=e.from),e}function Xfe(e,t,n){return Array.isArray(t.to)&&e.duration===void 0&&(e.duration=.8),Kfe(t),Gfe(e)||(e={...e,...Bfe(n,t.to)}),{...t,...qfe(e)}}function Zfe(e,t,n,r,i){const o=Q_(r,e)||{};let a=o.from!==void 0?o.from:t.get();const s=LA(e,n);a==="none"&&s&&typeof n=="string"?a=Z_(e,n):OA(a)&&typeof n=="string"?a=MA(n):!Array.isArray(n)&&OA(n)&&typeof a=="string"&&(n=MA(a));const l=LA(e,a);function u(){const h={from:a,to:n,velocity:t.getVelocity(),onComplete:i,onUpdate:m=>t.set(m)};return o.type==="inertia"||o.type==="decay"?pfe({...h,...o}):rF({...Xfe(o,h,e),onUpdate:m=>{h.onUpdate(m),o.onUpdate&&o.onUpdate(m)},onComplete:()=>{h.onComplete(),o.onComplete&&o.onComplete()}})}function d(){const h=IB(n);return t.set(h),i(),o.onUpdate&&o.onUpdate(h),o.onComplete&&o.onComplete(),{stop:()=>{}}}return!l||!s||o.type===!1?d:u}function OA(e){return e===0||typeof e=="string"&&parseFloat(e)===0&&e.indexOf(" ")===-1}function MA(e){return typeof e=="number"?0:Z_("",e)}function Q_(e,t){return e[t]||e.default||e}function J_(e,t,n,r={}){return $fe.current&&(r={type:!1}),t.start(i=>{let o;const a=Zfe(e,t,n,r,i),s=Yfe(r,e),l=()=>o=a();let u;return s?u=gF(l,o5(s)):l(),()=>{u&&u(),o&&o.stop()}})}const Qfe=e=>/^\-?\d*\.?\d+$/.test(e),Jfe=e=>/^0[^.\s]+$/.test(e);function ek(e,t){e.indexOf(t)===-1&&e.push(t)}function tk(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Vv{constructor(){this.subscriptions=[]}add(t){return ek(this.subscriptions,t),()=>tk(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o!isNaN(parseFloat(e));class the{constructor(t){this.version="7.6.9",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new Vv,this.velocityUpdateSubscribers=new Vv,this.renderSubscribers=new Vv,this.canTrackVelocity=!1,this.updateAndNotify=(n,r=!0)=>{this.prev=this.current,this.current=n;const{delta:i,timestamp:o}=T7();this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,Gs.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.updateSubscribers.notify(this.current),this.velocityUpdateSubscribers.getSize()&&this.velocityUpdateSubscribers.notify(this.getVelocity()),r&&this.renderSubscribers.notify(this.current)},this.scheduleVelocityCheck=()=>Gs.postRender(this.velocityCheck),this.velocityCheck=({timestamp:n})=>{n!==this.lastUpdated&&(this.prev=this.current,this.velocityUpdateSubscribers.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=ehe(this.current)}onChange(t){return this.updateSubscribers.add(t)}clearListeners(){this.updateSubscribers.clear()}onRenderRequest(t){return t(this.get()),this.renderSubscribers.add(t)}attach(t){this.passiveEffect=t}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?iF(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.stopAnimation=t(n)}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()}}function Vm(e){return new the(e)}const mF=e=>t=>t.test(e),nhe={test:e=>e==="auto",parse:e=>e},vF=[rp,Lt,Xl,cd,Ace,Lce,nhe],V1=e=>vF.find(mF(e)),rhe=[...vF,So,Ju],ihe=e=>rhe.find(mF(e));function ohe(e){const t={};return e.values.forEach((n,r)=>t[r]=n.get()),t}function ahe(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function GS(e,t,n){const r=e.getProps();return F_(r,t,n!==void 0?n:r.custom,ohe(e),ahe(e))}function she(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Vm(n))}function lhe(e,t){const n=GS(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const a in o){const s=IB(o[a]);she(e,a,s)}}function uhe(e,t,n){var r,i;const o=Object.keys(t).filter(s=>!e.hasValue(s)),a=o.length;if(a)for(let s=0;sL7(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=L7(e,t,n);else{const i=typeof t=="function"?GS(e,t,n.custom):t;r=yF(e,i,n)}return r.then(()=>e.notify("AnimationComplete",t))}function L7(e,t,n={}){var r;const i=GS(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const a=i?()=>yF(e,i,n):()=>Promise.resolve(),s=!((r=e.variantChildren)===null||r===void 0)&&r.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:h,staggerDirection:m}=o;return hhe(e,t,d+u,h,m,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[u,d]=l==="beforeChildren"?[a,s]:[s,a];return u().then(d)}else return Promise.all([a(),s(n.delay)])}function yF(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=e.makeTargetAnimatable(t);const u=e.getValue("willChange");r&&(a=r);const d=[],h=i&&((o=e.animationState)===null||o===void 0?void 0:o.getState()[i]);for(const m in l){const v=e.getValue(m),b=l[m];if(!v||b===void 0||h&&ghe(h,m))continue;let S={delay:n,...a};e.shouldReduceMotion&&g0.has(m)&&(S={...S,type:!1,delay:0});let k=J_(m,v,b,S);a5(u)&&(u.add(m),k=k.then(()=>u.remove(m))),d.push(k)}return Promise.all(d).then(()=>{s&&lhe(e,s)})}function hhe(e,t,n=0,r=0,i=1,o){const a=[],s=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>s-u*r;return Array.from(e.variantChildren).sort(phe).forEach((u,d)=>{a.push(L7(u,t,{...o,delay:n+l(d)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(a)}function phe(e,t){return e.sortNodePosition(t)}function ghe({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}const nk=[tr.Animate,tr.InView,tr.Focus,tr.Hover,tr.Tap,tr.Drag,tr.Exit],mhe=[...nk].reverse(),vhe=nk.length;function yhe(e){return t=>Promise.all(t.map(({animation:n,options:r})=>fhe(e,n,r)))}function bhe(e){let t=yhe(e);const n=xhe();let r=!0;const i=(l,u)=>{const d=GS(e,u);if(d){const{transition:h,transitionEnd:m,...v}=d;l={...l,...v,...m}}return l};function o(l){t=l(e)}function a(l,u){var d;const h=e.getProps(),m=e.getVariantContext(!0)||{},v=[],b=new Set;let S={},k=1/0;for(let _=0;_k&&R;const K=Array.isArray(I)?I:[I];let te=K.reduce(i,{});D===!1&&(te={});const{prevResolvedValues:q={}}=A,F={...q,...te},U=X=>{V=!0,b.delete(X),A.needsAnimating[X]=!0};for(const X in F){const Z=te[X],W=q[X];S.hasOwnProperty(X)||(Z!==W?k2(Z)&&k2(W)?!dF(Z,W)||z?U(X):A.protectedKeys[X]=!0:Z!==void 0?U(X):b.add(X):Z!==void 0&&b.has(X)?U(X):A.protectedKeys[X]=!0)}A.prevProp=I,A.prevResolvedValues=te,A.isActive&&(S={...S,...te}),r&&e.blockInitialAnimation&&(V=!1),V&&!j&&v.push(...K.map(X=>({animation:X,options:{type:T,...l}})))}if(b.size){const _={};b.forEach(T=>{const A=e.getBaseTarget(T);A!==void 0&&(_[T]=A)}),v.push({animation:_})}let E=Boolean(v.length);return r&&h.initial===!1&&!e.manuallyAnimateOnMount&&(E=!1),r=!1,E?t(v):Promise.resolve()}function s(l,u,d){var h;if(n[l].isActive===u)return Promise.resolve();(h=e.variantChildren)===null||h===void 0||h.forEach(v=>{var b;return(b=v.animationState)===null||b===void 0?void 0:b.setActive(l,u)}),n[l].isActive=u;const m=a(d,l);for(const v in n)n[v].protectedKeys={};return m}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>n}}function She(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!dF(t,e):!1}function ih(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function xhe(){return{[tr.Animate]:ih(!0),[tr.InView]:ih(),[tr.Hover]:ih(),[tr.Tap]:ih(),[tr.Drag]:ih(),[tr.Focus]:ih(),[tr.Exit]:ih()}}const whe={animation:Cd(({visualElement:e,animate:t})=>{e.animationState||(e.animationState=bhe(e)),BS(t)&&w.useEffect(()=>t.subscribe(e),[t])}),exit:Cd(e=>{const{custom:t,visualElement:n}=e,[r,i]=K_(),o=w.useContext(p0);w.useEffect(()=>{n.isPresent=r;const a=n.animationState&&n.animationState.setActive(tr.Exit,!r,{custom:o&&o.custom||t});a&&!r&&a.then(i)},[r])})};class bF{constructor(t,n,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=y6(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,h=Y_(u.offset,{x:0,y:0})>=3;if(!d&&!h)return;const{point:m}=u,{timestamp:v}=T7();this.history.push({...m,timestamp:v});const{onStart:b,onMove:S}=this.handlers;d||(b&&b(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),S&&S(this.lastMoveEvent,u)},this.handlePointerMove=(u,d)=>{if(this.lastMoveEvent=u,this.lastMoveEventInfo=v6(d,this.transformPagePoint),DB(u)&&u.buttons===0){this.handlePointerUp(u,d);return}Gs.update(this.updatePoint,!0)},this.handlePointerUp=(u,d)=>{this.end();const{onEnd:h,onSessionEnd:m}=this.handlers,v=y6(v6(d,this.transformPagePoint),this.history);this.startEvent&&h&&h(u,v),m&&m(u,v)},NB(t)&&t.touches.length>1)return;this.handlers=n,this.transformPagePoint=r;const i=$_(t),o=v6(i,this.transformPagePoint),{point:a}=o,{timestamp:s}=T7();this.history=[{...a,timestamp:s}];const{onSessionStart:l}=n;l&&l(t,y6(o,this.history)),this.removeListeners=HS(Sm(window,"pointermove",this.handlePointerMove),Sm(window,"pointerup",this.handlePointerUp),Sm(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Vh.update(this.updatePoint)}}function v6(e,t){return t?{point:t(e.point)}:e}function IA(e,t){return{x:e.x-t.x,y:e.y-t.y}}function y6({point:e},t){return{point:e,delta:IA(e,SF(t)),offset:IA(e,Che(t)),velocity:_he(t,.1)}}function Che(e){return e[0]}function SF(e){return e[e.length-1]}function _he(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=SF(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>o5(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Oa(e){return e.max-e.min}function RA(e,t=0,n=.01){return Y_(e,t)n&&(e=r?$r(n,e,r.max):Math.min(e,n)),e}function BA(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function Phe(e,{top:t,left:n,bottom:r,right:i}){return{x:BA(e.x,n,i),y:BA(e.y,t,r)}}function FA(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=E2(t.min,t.max-r,e.min):r>i&&(n=E2(e.min,e.max-i,t.min)),n5(0,1,n)}function Ahe(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const A7=.35;function Ohe(e=A7){return e===!1?e=0:e===!0&&(e=A7),{x:$A(e,"left","right"),y:$A(e,"top","bottom")}}function $A(e,t,n){return{min:zA(e,t),max:zA(e,n)}}function zA(e,t){var n;return typeof e=="number"?e:(n=e[t])!==null&&n!==void 0?n:0}const HA=()=>({translate:0,scale:1,origin:0,originPoint:0}),Gv=()=>({x:HA(),y:HA()}),VA=()=>({min:0,max:0}),pi=()=>({x:VA(),y:VA()});function Rl(e){return[e("x"),e("y")]}function xF({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Mhe({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Ihe(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function b6(e){return e===void 0||e===1}function O7({scale:e,scaleX:t,scaleY:n}){return!b6(e)||!b6(t)||!b6(n)}function ch(e){return O7(e)||wF(e)||e.z||e.rotate||e.rotateX||e.rotateY}function wF(e){return WA(e.x)||WA(e.y)}function WA(e){return e&&e!=="0%"}function s5(e,t,n){const r=e-n,i=t*r;return n+i}function UA(e,t,n,r,i){return i!==void 0&&(e=s5(e,i,r)),s5(e,n,r)+t}function M7(e,t=0,n=1,r,i){e.min=UA(e.min,t,n,r,i),e.max=UA(e.max,t,n,r,i)}function CF(e,{x:t,y:n}){M7(e.x,t.translate,t.scale,t.originPoint),M7(e.y,n.translate,n.scale,n.originPoint)}function Rhe(e,t,n,r=!1){var i,o;const a=n.length;if(!a)return;t.x=t.y=1;let s,l;for(let u=0;u{this.stopAnimation(),n&&this.snapToCursor($_(s,"page").point)},i=(s,l)=>{var u;const{drag:d,dragPropagation:h,onDragStart:m}=this.getProps();d&&!h&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=$B(d),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Rl(v=>{var b,S;let k=this.getAxisMotionValue(v).get()||0;if(Xl.test(k)){const E=(S=(b=this.visualElement.projection)===null||b===void 0?void 0:b.layout)===null||S===void 0?void 0:S.layoutBox[v];E&&(k=Oa(E)*(parseFloat(k)/100))}this.originPoint[v]=k}),m==null||m(s,l),(u=this.visualElement.animationState)===null||u===void 0||u.setActive(tr.Drag,!0))},o=(s,l)=>{const{dragPropagation:u,dragDirectionLock:d,onDirectionLock:h,onDrag:m}=this.getProps();if(!u&&!this.openGlobalLock)return;const{offset:v}=l;if(d&&this.currentDirection===null){this.currentDirection=$he(v),this.currentDirection!==null&&(h==null||h(this.currentDirection));return}this.updateAxis("x",l.point,v),this.updateAxis("y",l.point,v),this.visualElement.render(),m==null||m(s,l)},a=(s,l)=>this.stop(s,l);this.panSession=new bF(t,{onSessionStart:r,onStart:i,onMove:o,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o==null||o(t,n)}cancel(){var t,n;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(t=this.panSession)===null||t===void 0||t.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(n=this.visualElement.animationState)===null||n===void 0||n.setActive(tr.Drag,!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Q3(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=Ehe(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},i=this.constraints;t&&Hg(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=Phe(r.layoutBox,t):this.constraints=!1,this.elastic=Ohe(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Rl(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=Ahe(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Hg(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=jhe(r,i.root,this.visualElement.getTransformPagePoint());let a=The(i.layout.layoutBox,o);if(n){const s=n(Mhe(a));this.hasMutatedConstraints=!!s,s&&(a=xF(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=Rl(d=>{var h;if(!Q3(d,n,this.currentDirection))return;let m=(h=l==null?void 0:l[d])!==null&&h!==void 0?h:{};a&&(m={min:0,max:0});const v=i?200:1e6,b=i?40:1e7,S={type:"inertia",velocity:r?t[d]:0,bounceStiffness:v,bounceDamping:b,timeConstant:750,restDelta:1,restSpeed:10,...o,...m};return this.startAxisValueAnimation(d,S)});return Promise.all(u).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return J_(t,r,0,n)}stopAnimation(){Rl(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){var n,r;const i="_drag"+t.toUpperCase(),o=this.visualElement.getProps()[i];return o||this.visualElement.getValue(t,(r=(n=this.visualElement.getProps().initial)===null||n===void 0?void 0:n[t])!==null&&r!==void 0?r:0)}snapToCursor(t){Rl(n=>{const{drag:r}=this.getProps();if(!Q3(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:s}=i.layout.layoutBox[n];o.set(t[n]-$r(a,s,.5))}})}scalePositionWithinConstraints(){var t;if(!this.visualElement.current)return;const{drag:n,dragConstraints:r}=this.getProps(),{projection:i}=this.visualElement;if(!Hg(r)||!i||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Rl(s=>{const l=this.getAxisMotionValue(s);if(l){const u=l.get();o[s]=Lhe({min:u,max:u},this.constraints[s])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",(t=i.root)===null||t===void 0||t.updateScroll(),i.updateLayout(),this.resolveConstraints(),Rl(s=>{if(!Q3(s,n,null))return;const l=this.getAxisMotionValue(s),{min:u,max:d}=this.constraints[s];l.set($r(u,d,o[s]))})}addListeners(){var t;if(!this.visualElement.current)return;Bhe.set(this.visualElement,this);const n=this.visualElement.current,r=Sm(n,"pointerdown",u=>{const{drag:d,dragListener:h=!0}=this.getProps();d&&h&&this.start(u)}),i=()=>{const{dragConstraints:u}=this.getProps();Hg(u)&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,a=o.addEventListener("measure",i);o&&!o.layout&&((t=o.root)===null||t===void 0||t.updateScroll(),o.updateLayout()),i();const s=zS(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d})=>{this.isDragging&&d&&(Rl(h=>{const m=this.getAxisMotionValue(h);m&&(this.originPoint[h]+=u[h].translate,m.set(m.get()+u[h].translate))}),this.visualElement.render())});return()=>{s(),r(),a(),l==null||l()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=A7,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function Q3(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function $he(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}function zhe(e){const{dragControls:t,visualElement:n}=e,r=$S(()=>new Fhe(n));w.useEffect(()=>t&&t.subscribe(r),[r,t]),w.useEffect(()=>r.addListeners(),[r])}function Hhe({onPan:e,onPanStart:t,onPanEnd:n,onPanSessionStart:r,visualElement:i}){const o=e||t||n||r,a=w.useRef(null),{transformPagePoint:s}=w.useContext(O_),l={onSessionStart:r,onStart:t,onMove:e,onEnd:(d,h)=>{a.current=null,n&&n(d,h)}};w.useEffect(()=>{a.current!==null&&a.current.updateHandlers(l)});function u(d){a.current=new bF(d,l,{transformPagePoint:s})}e5(i,"pointerdown",o&&u),z_(()=>a.current&&a.current.end())}const Vhe={pan:Cd(Hhe),drag:Cd(zhe)};function I7(e){return typeof e=="string"&&e.startsWith("var(--")}const kF=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Whe(e){const t=kF.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}function R7(e,t,n=1){const[r,i]=Whe(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);return o?o.trim():I7(i)?R7(i,t,n+1):i}function Uhe(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(i=>{const o=i.get();if(!I7(o))return;const a=R7(o,r);a&&i.set(a)});for(const i in t){const o=t[i];if(!I7(o))continue;const a=R7(o,r);a&&(t[i]=a,n&&n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const Ghe=new Set(["width","height","top","left","right","bottom","x","y"]),EF=e=>Ghe.has(e),qhe=e=>Object.keys(e).some(EF),PF=(e,t)=>{e.set(t,!1),e.set(t)},qA=e=>e===rp||e===Lt;var YA;(function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"})(YA||(YA={}));const KA=(e,t)=>parseFloat(e.split(", ")[t]),XA=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return KA(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?KA(o[1],e):0}},Yhe=new Set(["x","y","z"]),Khe=Q4.filter(e=>!Yhe.has(e));function Xhe(e){const t=[];return Khe.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.render(),t}const ZA={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:XA(4,13),y:XA(5,14)},Zhe=(e,t,n)=>{const r=t.measureViewportBox(),i=t.current,o=getComputedStyle(i),{display:a}=o,s={};a==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(u=>{s[u]=ZA[u](r,o)}),t.render();const l=t.measureViewportBox();return n.forEach(u=>{const d=t.getValue(u);PF(d,s[u]),e[u]=ZA[u](l,o)}),e},Qhe=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(EF);let o=[],a=!1;const s=[];if(i.forEach(l=>{const u=e.getValue(l);if(!e.hasValue(l))return;let d=n[l],h=V1(d);const m=t[l];let v;if(k2(m)){const b=m.length,S=m[0]===null?1:0;d=m[S],h=V1(d);for(let k=S;k=0?window.pageYOffset:null,u=Zhe(t,e,s);return o.length&&o.forEach(([d,h])=>{e.getValue(d).set(h)}),e.render(),np&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function Jhe(e,t,n,r){return qhe(t)?Qhe(e,t,n,r):{target:t,transitionEnd:r}}const epe=(e,t,n,r)=>{const i=Uhe(e,t,r);return t=i.target,r=i.transitionEnd,Jhe(e,t,n,r)},D7={current:null},TF={current:!1};function tpe(){if(TF.current=!0,!!np)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>D7.current=e.matches;e.addListener(t),t()}else D7.current=!1}function npe(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],a=n[i];if(ou(o))e.addValue(i,o),a5(r)&&r.add(i);else if(ou(a))e.addValue(i,Vm(o)),a5(r)&&r.remove(i);else if(a!==o)if(e.hasValue(i)){const s=e.getValue(i);!s.hasAnimated&&s.set(o)}else{const s=e.getStaticValue(i);e.addValue(i,Vm(s!==void 0?s:o))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const LF=Object.keys(C2),rpe=LF.length,QA=["AnimationStart","AnimationComplete","Update","Unmount","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class ipe{constructor({parent:t,props:n,reducedMotionConfig:r,visualState:i},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.isPresent=!0,this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Gs.render(this.render,!1,!0);const{latestValues:a,renderState:s}=i;this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=s,this.parent=t,this.props=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.options=o,this.isControllingVariants=FS(n),this.isVariantNode=hB(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:l,...u}=this.scrapeMotionValuesFromProps(n);for(const d in u){const h=u[d];a[d]!==void 0&&ou(h)&&(h.set(a[d],!1),a5(l)&&l.add(d))}}scrapeMotionValuesFromProps(t){return{}}mount(t){var n;this.current=t,this.projection&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=(n=this.parent)===null||n===void 0?void 0:n.addVariantChild(this)),this.values.forEach((r,i)=>this.bindToMotionValue(i,r)),TF.current||tpe(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:D7.current,this.parent&&this.parent.children.add(this),this.setProps(this.props)}unmount(){var t,n,r;(t=this.projection)===null||t===void 0||t.unmount(),Vh.update(this.notifyUpdate),Vh.render(this.render),this.valueSubscriptions.forEach(i=>i()),(n=this.removeFromVariantTree)===null||n===void 0||n.call(this),(r=this.parent)===null||r===void 0||r.children.delete(this);for(const i in this.events)this.events[i].clear();this.current=null}bindToMotionValue(t,n){const r=g0.has(t),i=n.onChange(a=>{this.latestValues[t]=a,this.props.onUpdate&&Gs.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isProjectionDirty=!0)}),o=n.onRenderRequest(this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),o()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures(t,n,r,i,o,a){const s=[];for(let l=0;lthis.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:a,layoutScroll:m})}return s}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):pi()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}makeTargetAnimatable(t,n=!0){return this.makeTargetAnimatableFromInstance(t,this.props,n)}setProps(t){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.props=t;for(let n=0;nr.variantChildren.delete(t)}addValue(t,n){this.hasValue(t)&&this.removeValue(t),this.values.set(t,n),this.latestValues[t]=n.get(),this.bindToMotionValue(t,n)}removeValue(t){var n;this.values.delete(t),(n=this.valueSubscriptions.get(t))===null||n===void 0||n(),this.valueSubscriptions.delete(t),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Vm(n),this.addValue(t,r)),r}readValue(t){return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props,i=typeof r=="string"||typeof r=="object"?(n=F_(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!ou(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Vv),this.events[t].add(n)}notify(t,...n){var r;(r=this.events[t])===null||r===void 0||r.notify(...n)}}const AF=["initial",...nk],ope=AF.length;class OF extends ipe{sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){var r;return(r=t.style)===null||r===void 0?void 0:r[n]}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:n,...r},{transformValues:i},o){let a=dhe(r,t||{},this);if(i&&(n&&(n=i(n)),r&&(r=i(r)),a&&(a=i(a))),o){uhe(this,r,a);const s=epe(this,r,a,n);n=s.transitionEnd,r=s.target}return{transition:t,transitionEnd:n,...r}}}function ape(e){return window.getComputedStyle(e)}class spe extends OF{readValueFromInstance(t,n){if(g0.has(n)){const r=X_(n);return r&&r.default||0}else{const r=ape(t),i=(mB(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return _F(t,n)}build(t,n,r,i){D_(t,n,r,i.transformTemplate)}scrapeMotionValuesFromProps(t){return B_(t)}renderInstance(t,n,r,i){LB(t,n,r,i)}}class lpe extends OF{getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){var r;return g0.has(n)?((r=X_(n))===null||r===void 0?void 0:r.default)||0:(n=AB.has(n)?n:TB(n),t.getAttribute(n))}measureInstanceViewportBox(){return pi()}scrapeMotionValuesFromProps(t){return MB(t)}build(t,n,r,i){j_(t,n,r,i.transformTemplate)}renderInstance(t,n,r,i){OB(t,n,r,i)}}const upe=(e,t)=>I_(e)?new lpe(t,{enableHardwareAcceleration:!1}):new spe(t,{enableHardwareAcceleration:!0});function JA(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const W1={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Lt.test(e))e=parseFloat(e);else return e;const n=JA(e,t.target.x),r=JA(e,t.target.y);return`${n}% ${r}%`}},eO="_$css",cpe={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=e.includes("var("),o=[];i&&(e=e.replace(kF,v=>(o.push(v),eO)));const a=Ju.parse(e);if(a.length>5)return r;const s=Ju.createTransformer(e),l=typeof a[0]!="number"?1:0,u=n.x.scale*t.x,d=n.y.scale*t.y;a[0+l]/=u,a[1+l]/=d;const h=$r(u,d,.5);typeof a[2+l]=="number"&&(a[2+l]/=h),typeof a[3+l]=="number"&&(a[3+l]/=h);let m=s(a);if(i){let v=0;m=m.replace(eO,()=>{const b=o[v];return v++,b})}return m}};class dpe extends N.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;Cce(hpe),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),$v.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,a=r.projection;return a&&(a.isPresent=o,i||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||Gs.postRender(()=>{var s;!((s=a.getStack())===null||s===void 0)&&s.members.length||this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),!t.currentAnimation&&t.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n!=null&&n.group&&n.group.remove(i),r!=null&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t==null||t()}render(){return null}}function fpe(e){const[t,n]=K_(),r=w.useContext(M_);return N.createElement(dpe,{...e,layoutGroup:r,switchLayoutGroup:w.useContext(pB),isPresent:t,safeToRemove:n})}const hpe={borderRadius:{...W1,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:W1,borderTopRightRadius:W1,borderBottomLeftRadius:W1,borderBottomRightRadius:W1,boxShadow:cpe},ppe={measureLayout:fpe};function gpe(e,t,n={}){const r=ou(e)?e:Vm(e);return J_("",r,t,n),{stop:()=>r.stop(),isAnimating:()=>r.isAnimating()}}const MF=["TopLeft","TopRight","BottomLeft","BottomRight"],mpe=MF.length,tO=e=>typeof e=="string"?parseFloat(e):e,nO=e=>typeof e=="number"||Lt.test(e);function vpe(e,t,n,r,i,o){var a,s,l,u;i?(e.opacity=$r(0,(a=n.opacity)!==null&&a!==void 0?a:1,ype(r)),e.opacityExit=$r((s=t.opacity)!==null&&s!==void 0?s:1,0,bpe(r))):o&&(e.opacity=$r((l=t.opacity)!==null&&l!==void 0?l:1,(u=n.opacity)!==null&&u!==void 0?u:1,r));for(let d=0;drt?1:n(E2(e,t,r))}function iO(e,t){e.min=t.min,e.max=t.max}function Ms(e,t){iO(e.x,t.x),iO(e.y,t.y)}function oO(e,t,n,r,i){return e-=t,e=s5(e,1/n,r),i!==void 0&&(e=s5(e,1/i,r)),e}function Spe(e,t=0,n=1,r=.5,i,o=e,a=e){if(Xl.test(t)&&(t=parseFloat(t),t=$r(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=$r(o.min,o.max,r);e===o&&(s-=t),e.min=oO(e.min,t,n,s,i),e.max=oO(e.max,t,n,s,i)}function aO(e,t,[n,r,i],o,a){Spe(e,t[n],t[r],t[i],t.scale,o,a)}const xpe=["x","scaleX","originX"],wpe=["y","scaleY","originY"];function sO(e,t,n,r){aO(e.x,t,xpe,n==null?void 0:n.x,r==null?void 0:r.x),aO(e.y,t,wpe,n==null?void 0:n.y,r==null?void 0:r.y)}function lO(e){return e.translate===0&&e.scale===1}function RF(e){return lO(e.x)&&lO(e.y)}function DF(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function uO(e){return Oa(e.x)/Oa(e.y)}function Cpe(e,t,n=.1){return Y_(e,t)<=n}class _pe{constructor(){this.members=[]}add(t){ek(this.members,t),t.scheduleRender()}remove(t){if(tk(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){var r;const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,n&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),!((r=t.root)===null||r===void 0)&&r.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,i,o,a;(r=(n=t.options).onExitComplete)===null||r===void 0||r.call(n),(a=(i=t.resumingFrom)===null||i===void 0?void 0:(o=i.options).onExitComplete)===null||a===void 0||a.call(o)})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function cO(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y;if((i||o)&&(r=`translate3d(${i}px, ${o}px, 0) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:l,rotateX:u,rotateY:d}=n;l&&(r+=`rotate(${l}deg) `),u&&(r+=`rotateX(${u}deg) `),d&&(r+=`rotateY(${d}deg) `)}const a=e.x.scale*t.x,s=e.y.scale*t.y;return(a!==1||s!==1)&&(r+=`scale(${a}, ${s})`),r||"none"}const kpe=(e,t)=>e.depth-t.depth;class Epe{constructor(){this.children=[],this.isDirty=!1}add(t){ek(this.children,t),this.isDirty=!0}remove(t){tk(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(kpe),this.isDirty=!1,this.children.forEach(t)}}const dO=["","X","Y","Z"],fO=1e3;let Ppe=0;function NF({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a,s={},l=t==null?void 0:t()){this.id=Ppe++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(Mpe),this.nodes.forEach(Ipe)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=a,this.latestValues=s,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0,a&&this.root.registerPotentialNode(a,this);for(let u=0;uthis.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,m&&m(),m=gF(v,250),$v.hasAnimatedSinceResize&&($v.hasAnimatedSinceResize=!1,this.nodes.forEach(pO))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&h&&(u||d)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:v,hasRelativeTargetChanged:b,layout:S})=>{var k,E,_,T,A;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const I=(E=(k=this.options.transition)!==null&&k!==void 0?k:h.getDefaultTransition())!==null&&E!==void 0?E:Bpe,{onLayoutAnimationStart:R,onLayoutAnimationComplete:D}=h.getProps(),j=!this.targetLayout||!DF(this.targetLayout,S)||b,z=!v&&b;if(!((_=this.resumeFrom)===null||_===void 0)&&_.instance||z||v&&(j||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(m,z);const V={...Q_(I,"layout"),onPlay:R,onComplete:D};h.shouldReduceMotion&&(V.delay=0,V.type=!1),this.startAnimation(V)}else!v&&this.animationProgress===0&&pO(this),this.isLead()&&((A=(T=this.options).onExitComplete)===null||A===void 0||A.call(T));this.targetLayout=S})}unmount(){var a,s;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(a=this.getStack())===null||a===void 0||a.remove(this),(s=this.parent)===null||s===void 0||s.children.delete(this),this.instance=void 0,Vh.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var a;return this.isAnimationBlocked||((a=this.parent)===null||a===void 0?void 0:a.isTreeAnimationBlocked())||!1}startUpdate(){var a;this.isUpdateBlocked()||(this.isUpdating=!0,(a=this.nodes)===null||a===void 0||a.forEach(Rpe),this.animationId++)}willUpdate(a=!0){var s,l,u;if(this.root.isUpdateBlocked()){(l=(s=this.options).onExitComplete)===null||l===void 0||l.call(s);return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let v=0;v{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){var a;if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{var T;const A=_/1e3;gO(v.x,a.x,A),gO(v.y,a.y,A),this.setTargetDelta(v),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&(!((T=this.relativeParent)===null||T===void 0)&&T.layout)&&(Uv(b,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Npe(this.relativeTarget,this.relativeTargetOrigin,b,A)),S&&(this.animationValues=m,vpe(m,h,this.latestValues,A,E,k)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=A},this.mixTargetDelta(0)}startAnimation(a){var s,l;this.notifyListeners("animationStart"),(s=this.currentAnimation)===null||s===void 0||s.stop(),this.resumingFrom&&((l=this.resumingFrom.currentAnimation)===null||l===void 0||l.stop()),this.pendingAnimation&&(Vh.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Gs.update(()=>{$v.hasAnimatedSinceResize=!0,this.currentAnimation=gpe(0,fO,{...a,onUpdate:u=>{var d;this.mixTargetDelta(u),(d=a.onUpdate)===null||d===void 0||d.call(a,u)},onComplete:()=>{var u;(u=a.onComplete)===null||u===void 0||u.call(a),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var a;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(a=this.getStack())===null||a===void 0||a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var a;this.currentAnimation&&((a=this.mixTargetDelta)===null||a===void 0||a.call(this,fO),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:u,latestValues:d}=a;if(!(!s||!l||!u)){if(this!==a&&this.layout&&u&&jF(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||pi();const h=Oa(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+h;const m=Oa(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+m}Ms(s,l),Vg(s,d),Wv(this.projectionDeltaWithTransform,this.layoutCorrected,s,d)}}registerSharedNode(a,s){var l,u,d;this.sharedNodes.has(a)||this.sharedNodes.set(a,new _pe),this.sharedNodes.get(a).add(s),s.promote({transition:(l=s.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(d=(u=s.options.initialPromotionConfig)===null||u===void 0?void 0:u.shouldPreserveFollowOpacity)===null||d===void 0?void 0:d.call(u,s)})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const{latestValues:l}=a;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(s=!0),!s)return;const u={};for(let d=0;d{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(hO),this.root.sharedNodes.clear()}}}function Tpe(e){e.updateLayout()}function Lpe(e){var t,n,r;const i=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&i&&e.hasListeners("didUpdate")){const{layoutBox:o,measuredBox:a}=e.layout,{animationType:s}=e.options,l=i.source!==e.layout.source;s==="size"?Rl(v=>{const b=l?i.measuredBox[v]:i.layoutBox[v],S=Oa(b);b.min=o[v].min,b.max=b.min+S}):jF(s,i.layoutBox,o)&&Rl(v=>{const b=l?i.measuredBox[v]:i.layoutBox[v],S=Oa(o[v]);b.max=b.min+S});const u=Gv();Wv(u,o,i.layoutBox);const d=Gv();l?Wv(d,e.applyTransform(a,!0),i.measuredBox):Wv(d,o,i.layoutBox);const h=!RF(u);let m=!1;if(!e.resumeFrom){const v=e.getClosestProjectingParent();if(v&&!v.resumeFrom){const{snapshot:b,layout:S}=v;if(b&&S){const k=pi();Uv(k,i.layoutBox,b.layoutBox);const E=pi();Uv(E,o,S.layoutBox),DF(k,E)||(m=!0)}}}e.notifyListeners("didUpdate",{layout:o,snapshot:i,delta:d,layoutDelta:u,hasLayoutChanged:h,hasRelativeTargetChanged:m})}else e.isLead()&&((r=(n=e.options).onExitComplete)===null||r===void 0||r.call(n));e.options.transition=void 0}function Ape(e){e.clearSnapshot()}function hO(e){e.clearMeasurements()}function Ope(e){const{visualElement:t}=e.options;t!=null&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function pO(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function Mpe(e){e.resolveTargetDelta()}function Ipe(e){e.calcProjection()}function Rpe(e){e.resetRotation()}function Dpe(e){e.removeLeadSnapshot()}function gO(e,t,n){e.translate=$r(t.translate,0,n),e.scale=$r(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function mO(e,t,n,r){e.min=$r(t.min,n.min,r),e.max=$r(t.max,n.max,r)}function Npe(e,t,n,r){mO(e.x,t.x,n.x,r),mO(e.y,t.y,n.y,r)}function jpe(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Bpe={duration:.45,ease:[.4,0,.1,1]};function Fpe(e,t){let n=e.root;for(let o=e.path.length-1;o>=0;o--)if(Boolean(e.path[o].instance)){n=e.path[o];break}const i=(n&&n!==e.root?n.instance:document).querySelector(`[data-projection-id="${t}"]`);i&&e.mount(i,!0)}function vO(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function $pe(e){vO(e.x),vO(e.y)}function jF(e,t,n){return e==="position"||e==="preserve-aspect"&&!Cpe(uO(t),uO(n),.2)}const zpe=NF({attachResizeListener:(e,t)=>zS(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),S6={current:void 0},Hpe=NF({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!S6.current){const e=new zpe(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),S6.current=e}return S6.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>Boolean(window.getComputedStyle(e).position==="fixed")}),Vpe={...whe,...Mfe,...Vhe,...ppe},du=xce((e,t)=>ade(e,t,Vpe,upe,Hpe));function BF(){const e=w.useRef(!1);return X4(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Wpe(){const e=BF(),[t,n]=w.useState(0),r=w.useCallback(()=>{e.current&&n(t+1)},[t]);return[w.useCallback(()=>Gs.postRender(r),[r]),t]}class Upe extends w.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Gpe({children:e,isPresent:t}){const n=w.useId(),r=w.useRef(null),i=w.useRef({width:0,height:0,top:0,left:0});return w.useInsertionEffect(()=>{const{width:o,height:a,top:s,left:l}=i.current;if(t||!r.current||!o||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`
+ [data-motion-pop-id="${n}"] {
+ position: absolute !important;
+ width: ${o}px !important;
+ height: ${a}px !important;
+ top: ${s}px !important;
+ left: ${l}px !important;
+ }
+ `),()=>{document.head.removeChild(u)}},[t]),w.createElement(Upe,{isPresent:t,childRef:r,sizeRef:i},w.cloneElement(e,{ref:r}))}const x6=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:a})=>{const s=$S(qpe),l=w.useId(),u=w.useMemo(()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:d=>{s.set(d,!0);for(const h of s.values())if(!h)return;r&&r()},register:d=>(s.set(d,!1),()=>s.delete(d))}),o?void 0:[n]);return w.useMemo(()=>{s.forEach((d,h)=>s.set(h,!1))},[n]),w.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),a==="popLayout"&&(e=w.createElement(Gpe,{isPresent:n},e)),w.createElement(p0.Provider,{value:u},e)};function qpe(){return new Map}const Bg=e=>e.key||"";function Ype(e,t){e.forEach(n=>{const r=Bg(n);t.set(r,n)})}function Kpe(e){const t=[];return w.Children.forEach(e,n=>{w.isValidElement(n)&&t.push(n)}),t}const nf=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:a="sync"})=>{i&&(a="wait",cF(!1,"Replace exitBeforeEnter with mode='wait'"));let[s]=Wpe();const l=w.useContext(M_).forceRender;l&&(s=l);const u=BF(),d=Kpe(e);let h=d;const m=new Set,v=w.useRef(h),b=w.useRef(new Map).current,S=w.useRef(!0);if(X4(()=>{S.current=!1,Ype(d,b),v.current=h}),z_(()=>{S.current=!0,b.clear(),m.clear()}),S.current)return w.createElement(w.Fragment,null,h.map(T=>w.createElement(x6,{key:Bg(T),isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:a},T)));h=[...h];const k=v.current.map(Bg),E=d.map(Bg),_=k.length;for(let T=0;T<_;T++){const A=k[T];E.indexOf(A)===-1&&m.add(A)}return a==="wait"&&m.size&&(h=[]),m.forEach(T=>{if(E.indexOf(T)!==-1)return;const A=b.get(T);if(!A)return;const I=k.indexOf(T),R=()=>{b.delete(T),m.delete(T);const D=v.current.findIndex(j=>j.key===T);if(v.current.splice(D,1),!m.size){if(v.current=d,u.current===!1)return;s(),r&&r()}};h.splice(I,0,w.createElement(x6,{key:Bg(A),isPresent:!1,onExitComplete:R,custom:t,presenceAffectsLayout:o,mode:a},A))}),h=h.map(T=>{const A=T.key;return m.has(A)?T:w.createElement(x6,{key:Bg(T),isPresent:!0,presenceAffectsLayout:o,mode:a},T)}),uF!=="production"&&a==="wait"&&h.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),w.createElement(w.Fragment,null,m.size?h:h.map(T=>w.cloneElement(T)))};var $l=function(){return $l=Object.assign||function(t){for(var n,r=1,i=arguments.length;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function N7(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;re.filter(Boolean).join(" ");function Xpe(){return!1}var Zpe=e=>{const{condition:t,message:n}=e;t&&Xpe()&&console.warn(n)},_h={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},U1={scale:{enter:{scale:1},exit:{scale:.95}},fade:{enter:{opacity:1},exit:{opacity:0}},pushLeft:{enter:{x:"100%"},exit:{x:"-30%"}},pushRight:{enter:{x:"-100%"},exit:{x:"30%"}},pushUp:{enter:{y:"100%"},exit:{y:"-30%"}},pushDown:{enter:{y:"-100%"},exit:{y:"30%"}},slideLeft:{position:{left:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"-100%",y:0}},slideRight:{position:{right:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"100%",y:0}},slideUp:{position:{top:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"-100%"}},slideDown:{position:{bottom:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"100%"}}};function j7(e){switch((e==null?void 0:e.direction)??"right"){case"right":return U1.slideRight;case"left":return U1.slideLeft;case"bottom":return U1.slideDown;case"top":return U1.slideUp;default:return U1.slideRight}}var Ih={enter:{duration:.2,ease:_h.easeOut},exit:{duration:.1,ease:_h.easeIn}},qs={enter:(e,t)=>({...e,delay:typeof t=="number"?t:t==null?void 0:t.enter}),exit:(e,t)=>({...e,delay:typeof t=="number"?t:t==null?void 0:t.exit})},Qpe=e=>e!=null&&parseInt(e.toString(),10)>0,bO={exit:{height:{duration:.2,ease:_h.ease},opacity:{duration:.3,ease:_h.ease}},enter:{height:{duration:.3,ease:_h.ease},opacity:{duration:.4,ease:_h.ease}}},Jpe={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:Qpe(t)?1:0},height:t,transitionEnd:r==null?void 0:r.exit,transition:(n==null?void 0:n.exit)??qs.exit(bO.exit,i)}),enter:({animateOpacity:e,endingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:1},height:t,transitionEnd:r==null?void 0:r.enter,transition:(n==null?void 0:n.enter)??qs.enter(bO.enter,i)})},$F=w.forwardRef((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:i=!0,startingHeight:o=0,endingHeight:a="auto",style:s,className:l,transition:u,transitionEnd:d,...h}=e,[m,v]=w.useState(!1);w.useEffect(()=>{const _=setTimeout(()=>{v(!0)});return()=>clearTimeout(_)},[]),Zpe({condition:Boolean(o>0&&r),message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const b=parseFloat(o.toString())>0,S={startingHeight:o,endingHeight:a,animateOpacity:i,transition:m?u:{enter:{duration:0}},transitionEnd:{enter:d==null?void 0:d.enter,exit:r?d==null?void 0:d.exit:{...d==null?void 0:d.exit,display:b?"block":"none"}}},k=r?n:!0,E=n||r?"enter":"exit";return N.createElement(nf,{initial:!1,custom:S},k&&N.createElement(du.div,{ref:t,...h,className:by("chakra-collapse",l),style:{overflow:"hidden",display:"block",...s},custom:S,variants:Jpe,initial:r?"exit":!1,animate:E,exit:"exit"}))});$F.displayName="Collapse";var ege={enter:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:1,transition:(e==null?void 0:e.enter)??qs.enter(Ih.enter,n),transitionEnd:t==null?void 0:t.enter}),exit:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:0,transition:(e==null?void 0:e.exit)??qs.exit(Ih.exit,n),transitionEnd:t==null?void 0:t.exit})},zF={initial:"exit",animate:"enter",exit:"exit",variants:ege},tge=w.forwardRef(function(t,n){const{unmountOnExit:r,in:i,className:o,transition:a,transitionEnd:s,delay:l,...u}=t,d=i||r?"enter":"exit",h=r?i&&r:!0,m={transition:a,transitionEnd:s,delay:l};return N.createElement(nf,{custom:m},h&&N.createElement(du.div,{ref:n,className:by("chakra-fade",o),custom:m,...zF,animate:d,...u}))});tge.displayName="Fade";var nge={exit:({reverse:e,initialScale:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,...e?{scale:t,transitionEnd:r==null?void 0:r.exit}:{transitionEnd:{scale:t,...r==null?void 0:r.exit}},transition:(n==null?void 0:n.exit)??qs.exit(Ih.exit,i)}),enter:({transitionEnd:e,transition:t,delay:n})=>({opacity:1,scale:1,transition:(t==null?void 0:t.enter)??qs.enter(Ih.enter,n),transitionEnd:e==null?void 0:e.enter})},HF={initial:"exit",animate:"enter",exit:"exit",variants:nge},rge=w.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,initialScale:a=.95,className:s,transition:l,transitionEnd:u,delay:d,...h}=t,m=r?i&&r:!0,v=i||r?"enter":"exit",b={initialScale:a,reverse:o,transition:l,transitionEnd:u,delay:d};return N.createElement(nf,{custom:b},m&&N.createElement(du.div,{ref:n,className:by("chakra-offset-slide",s),...HF,animate:v,custom:b,...h}))});rge.displayName="ScaleFade";var SO={exit:{duration:.15,ease:_h.easeInOut},enter:{type:"spring",damping:25,stiffness:180}},ige={exit:({direction:e,transition:t,transitionEnd:n,delay:r})=>{const{exit:i}=j7({direction:e});return{...i,transition:(t==null?void 0:t.exit)??qs.exit(SO.exit,r),transitionEnd:n==null?void 0:n.exit}},enter:({direction:e,transitionEnd:t,transition:n,delay:r})=>{const{enter:i}=j7({direction:e});return{...i,transition:(n==null?void 0:n.enter)??qs.enter(SO.enter,r),transitionEnd:t==null?void 0:t.enter}}},VF=w.forwardRef(function(t,n){const{direction:r="right",style:i,unmountOnExit:o,in:a,className:s,transition:l,transitionEnd:u,delay:d,motionProps:h,...m}=t,v=j7({direction:r}),b=Object.assign({position:"fixed"},v.position,i),S=o?a&&o:!0,k=a||o?"enter":"exit",E={transitionEnd:u,transition:l,direction:r,delay:d};return N.createElement(nf,{custom:E},S&&N.createElement(du.div,{...m,ref:n,initial:"exit",className:by("chakra-slide",s),animate:k,exit:"exit",custom:E,variants:ige,style:b,...h}))});VF.displayName="Slide";var oge={initial:({offsetX:e,offsetY:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,x:e,y:t,transition:(n==null?void 0:n.exit)??qs.exit(Ih.exit,i),transitionEnd:r==null?void 0:r.exit}),enter:({transition:e,transitionEnd:t,delay:n})=>({opacity:1,x:0,y:0,transition:(e==null?void 0:e.enter)??qs.enter(Ih.enter,n),transitionEnd:t==null?void 0:t.enter}),exit:({offsetY:e,offsetX:t,transition:n,transitionEnd:r,reverse:i,delay:o})=>{const a={x:t,y:e};return{opacity:0,transition:(n==null?void 0:n.exit)??qs.exit(Ih.exit,o),...i?{...a,transitionEnd:r==null?void 0:r.exit}:{transitionEnd:{...a,...r==null?void 0:r.exit}}}}},B7={initial:"initial",animate:"enter",exit:"exit",variants:oge},age=w.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,className:a,offsetX:s=0,offsetY:l=8,transition:u,transitionEnd:d,delay:h,...m}=t,v=r?i&&r:!0,b=i||r?"enter":"exit",S={offsetX:s,offsetY:l,reverse:o,transition:u,transitionEnd:d,delay:h};return N.createElement(nf,{custom:S},v&&N.createElement(du.div,{ref:n,className:by("chakra-offset-slide",a),custom:S,...B7,animate:b,...m}))});age.displayName="SlideFade";var Sy=(...e)=>e.filter(Boolean).join(" ");function sge(){return!1}var qS=e=>{const{condition:t,message:n}=e;t&&sge()&&console.warn(n)};function w6(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}var[lge,YS]=Mn({name:"AccordionStylesContext",hookName:"useAccordionStyles",providerName:" "}),[uge,rk]=Mn({name:"AccordionItemContext",hookName:"useAccordionItemContext",providerName:" "}),[cge,K$e,dge,fge]=dB(),Wg=Oe(function(t,n){const{getButtonProps:r}=rk(),i=r(t,n),a={display:"flex",alignItems:"center",width:"100%",outline:0,...YS().button};return N.createElement(Ce.button,{...i,className:Sy("chakra-accordion__button",t.className),__css:a})});Wg.displayName="AccordionButton";function hge(e){const{onChange:t,defaultIndex:n,index:r,allowMultiple:i,allowToggle:o,...a}=e;mge(e),vge(e);const s=dge(),[l,u]=w.useState(-1);w.useEffect(()=>()=>{u(-1)},[]);const[d,h]=NS({value:r,defaultValue(){return i?n??[]:n??-1},onChange:t});return{index:d,setIndex:h,htmlProps:a,getAccordionItemProps:v=>{let b=!1;return v!==null&&(b=Array.isArray(d)?d.includes(v):d===v),{isOpen:b,onChange:k=>{if(v!==null)if(i&&Array.isArray(d)){const E=k?d.concat(v):d.filter(_=>_!==v);h(E)}else k?h(v):o&&h(-1)}}},focusedIndex:l,setFocusedIndex:u,descendants:s}}var[pge,ik]=Mn({name:"AccordionContext",hookName:"useAccordionContext",providerName:"Accordion"});function gge(e){const{isDisabled:t,isFocusable:n,id:r,...i}=e,{getAccordionItemProps:o,setFocusedIndex:a}=ik(),s=w.useRef(null),l=w.useId(),u=r??l,d=`accordion-button-${u}`,h=`accordion-panel-${u}`;yge(e);const{register:m,index:v,descendants:b}=fge({disabled:t&&!n}),{isOpen:S,onChange:k}=o(v===-1?null:v);bge({isOpen:S,isDisabled:t});const E=()=>{k==null||k(!0)},_=()=>{k==null||k(!1)},T=w.useCallback(()=>{k==null||k(!S),a(v)},[v,a,S,k]),A=w.useCallback(j=>{const V={ArrowDown:()=>{const K=b.nextEnabled(v);K==null||K.node.focus()},ArrowUp:()=>{const K=b.prevEnabled(v);K==null||K.node.focus()},Home:()=>{const K=b.firstEnabled();K==null||K.node.focus()},End:()=>{const K=b.lastEnabled();K==null||K.node.focus()}}[j.key];V&&(j.preventDefault(),V(j))},[b,v]),I=w.useCallback(()=>{a(v)},[a,v]),R=w.useCallback(function(z={},V=null){return{...z,type:"button",ref:Yn(m,s,V),id:d,disabled:!!t,"aria-expanded":!!S,"aria-controls":h,onClick:w6(z.onClick,T),onFocus:w6(z.onFocus,I),onKeyDown:w6(z.onKeyDown,A)}},[d,t,S,T,I,A,h,m]),D=w.useCallback(function(z={},V=null){return{...z,ref:V,role:"region",id:h,"aria-labelledby":d,hidden:!S}},[d,S,h]);return{isOpen:S,isDisabled:t,isFocusable:n,onOpen:E,onClose:_,getButtonProps:R,getPanelProps:D,htmlProps:i}}function mge(e){const t=e.index||e.defaultIndex,n=t!=null&&!Array.isArray(t)&&e.allowMultiple;qS({condition:!!n,message:`If 'allowMultiple' is passed, then 'index' or 'defaultIndex' must be an array. You passed: ${typeof t},`})}function vge(e){qS({condition:!!(e.allowMultiple&&e.allowToggle),message:"If 'allowMultiple' is passed, 'allowToggle' will be ignored. Either remove 'allowToggle' or 'allowMultiple' depending on whether you want multiple accordions visible or not"})}function yge(e){qS({condition:!!(e.isFocusable&&!e.isDisabled),message:`Using only 'isFocusable', this prop is reserved for situations where you pass 'isDisabled' but you still want the element to receive focus (A11y). Either remove it or pass 'isDisabled' as well.
+ `})}function bge(e){qS({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function Ug(e){const{isOpen:t,isDisabled:n}=rk(),{reduceMotion:r}=ik(),i=Sy("chakra-accordion__icon",e.className),o=YS(),a={opacity:n?.4:1,transform:t?"rotate(-180deg)":void 0,transition:r?void 0:"transform 0.2s",transformOrigin:"center",...o.icon};return N.createElement(Da,{viewBox:"0 0 24 24","aria-hidden":!0,className:i,__css:a,...e},N.createElement("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"}))}Ug.displayName="AccordionIcon";var Gg=Oe(function(t,n){const{children:r,className:i}=t,{htmlProps:o,...a}=gge(t),l={...YS().container,overflowAnchor:"none"},u=w.useMemo(()=>a,[a]);return N.createElement(uge,{value:u},N.createElement(Ce.div,{ref:n,...o,className:Sy("chakra-accordion__item",i),__css:l},typeof r=="function"?r({isExpanded:!!a.isOpen,isDisabled:!!a.isDisabled}):r))});Gg.displayName="AccordionItem";var qg=Oe(function(t,n){const{className:r,motionProps:i,...o}=t,{reduceMotion:a}=ik(),{getPanelProps:s,isOpen:l}=rk(),u=s(o,n),d=Sy("chakra-accordion__panel",r),h=YS();a||delete u.hidden;const m=N.createElement(Ce.div,{...u,__css:h.panel,className:d});return a?m:N.createElement($F,{in:l,...i},m)});qg.displayName="AccordionPanel";var ok=Oe(function({children:t,reduceMotion:n,...r},i){const o=Yi("Accordion",r),a=En(r),{htmlProps:s,descendants:l,...u}=hge(a),d=w.useMemo(()=>({...u,reduceMotion:!!n}),[u,n]);return N.createElement(cge,{value:l},N.createElement(pge,{value:d},N.createElement(lge,{value:o},N.createElement(Ce.div,{ref:i,...s,className:Sy("chakra-accordion",r.className),__css:o.root},t))))});ok.displayName="Accordion";var Sge=(...e)=>e.filter(Boolean).join(" "),xge=tf({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),xy=Oe((e,t)=>{const n=Ao("Spinner",e),{label:r="Loading...",thickness:i="2px",speed:o="0.45s",emptyColor:a="transparent",className:s,...l}=En(e),u=Sge("chakra-spinner",s),d={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:a,borderLeftColor:a,animation:`${xge} ${o} linear infinite`,...n};return N.createElement(Ce.div,{ref:t,__css:d,className:u,...l},r&&N.createElement(Ce.span,{srOnly:!0},r))});xy.displayName="Spinner";var KS=(...e)=>e.filter(Boolean).join(" ");function wge(e){return N.createElement(Da,{viewBox:"0 0 24 24",...e},N.createElement("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"}))}function Cge(e){return N.createElement(Da,{viewBox:"0 0 24 24",...e},N.createElement("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"}))}function xO(e){return N.createElement(Da,{viewBox:"0 0 24 24",...e},N.createElement("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"}))}var[_ge,kge]=Mn({name:"AlertContext",hookName:"useAlertContext",providerName:" "}),[Ege,ak]=Mn({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:" "}),WF={info:{icon:Cge,colorScheme:"blue"},warning:{icon:xO,colorScheme:"orange"},success:{icon:wge,colorScheme:"green"},error:{icon:xO,colorScheme:"red"},loading:{icon:xy,colorScheme:"blue"}};function Pge(e){return WF[e].colorScheme}function Tge(e){return WF[e].icon}var UF=Oe(function(t,n){const{status:r="info",addRole:i=!0,...o}=En(t),a=t.colorScheme??Pge(r),s=Yi("Alert",{...t,colorScheme:a}),l={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...s.container};return N.createElement(_ge,{value:{status:r}},N.createElement(Ege,{value:s},N.createElement(Ce.div,{role:i?"alert":void 0,ref:n,...o,className:KS("chakra-alert",t.className),__css:l})))});UF.displayName="Alert";var GF=Oe(function(t,n){const i={display:"inline",...ak().description};return N.createElement(Ce.div,{ref:n,...t,className:KS("chakra-alert__desc",t.className),__css:i})});GF.displayName="AlertDescription";function qF(e){const{status:t}=kge(),n=Tge(t),r=ak(),i=t==="loading"?r.spinner:r.icon;return N.createElement(Ce.span,{display:"inherit",...e,className:KS("chakra-alert__icon",e.className),__css:i},e.children||N.createElement(n,{h:"100%",w:"100%"}))}qF.displayName="AlertIcon";var YF=Oe(function(t,n){const r=ak();return N.createElement(Ce.div,{ref:n,...t,className:KS("chakra-alert__title",t.className),__css:r.title})});YF.displayName="AlertTitle";function Lge(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Age(e){const{loading:t,src:n,srcSet:r,onLoad:i,onError:o,crossOrigin:a,sizes:s,ignoreFallback:l}=e,[u,d]=w.useState("pending");w.useEffect(()=>{d(n?"loading":"pending")},[n]);const h=w.useRef(),m=w.useCallback(()=>{if(!n)return;v();const b=new Image;b.src=n,a&&(b.crossOrigin=a),r&&(b.srcset=r),s&&(b.sizes=s),t&&(b.loading=t),b.onload=S=>{v(),d("loaded"),i==null||i(S)},b.onerror=S=>{v(),d("failed"),o==null||o(S)},h.current=b},[n,a,r,s,i,o,t]),v=()=>{h.current&&(h.current.onload=null,h.current.onerror=null,h.current=null)};return Ws(()=>{if(!l)return u==="loading"&&m(),()=>{v()}},[u,m,l]),l?"loaded":u}var Oge=(e,t)=>e!=="loaded"&&t==="beforeLoadOrError"||e==="failed"&&t==="onError",l5=Oe(function(t,n){const{htmlWidth:r,htmlHeight:i,alt:o,...a}=t;return N.createElement("img",{width:r,height:i,ref:n,alt:o,...a})});l5.displayName="NativeImage";var XS=Oe(function(t,n){const{fallbackSrc:r,fallback:i,src:o,srcSet:a,align:s,fit:l,loading:u,ignoreFallback:d,crossOrigin:h,fallbackStrategy:m="beforeLoadOrError",referrerPolicy:v,...b}=t,S=r!==void 0||i!==void 0,k=u!=null||d||!S,E=Age({...t,ignoreFallback:k}),_=Oge(E,m),T={ref:n,objectFit:l,objectPosition:s,...k?b:Lge(b,["onError","onLoad"])};return _?i||N.createElement(Ce.img,{as:l5,className:"chakra-image__placeholder",src:r,...T}):N.createElement(Ce.img,{as:l5,src:o,srcSet:a,crossOrigin:h,loading:u,referrerPolicy:v,className:"chakra-image",...T})});XS.displayName="Image";Oe((e,t)=>N.createElement(Ce.img,{ref:t,as:l5,className:"chakra-image",...e}));function ZS(e){return w.Children.toArray(e).filter(t=>w.isValidElement(t))}var QS=(...e)=>e.filter(Boolean).join(" "),wO=e=>e?"":void 0,[Mge,Ige]=Mn({strict:!1,name:"ButtonGroupContext"});function F7(e){const{children:t,className:n,...r}=e,i=w.isValidElement(t)?w.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,o=QS("chakra-button__icon",n);return N.createElement(Ce.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:o},i)}F7.displayName="ButtonIcon";function $7(e){const{label:t,placement:n,spacing:r="0.5rem",children:i=N.createElement(xy,{color:"currentColor",width:"1em",height:"1em"}),className:o,__css:a,...s}=e,l=QS("chakra-button__spinner",o),u=n==="start"?"marginEnd":"marginStart",d=w.useMemo(()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[u]:t?r:0,fontSize:"1em",lineHeight:"normal",...a}),[a,t,u,r]);return N.createElement(Ce.div,{className:l,...s,__css:d},i)}$7.displayName="ButtonSpinner";function Rge(e){const[t,n]=w.useState(!e);return{ref:w.useCallback(o=>{o&&n(o.tagName==="BUTTON")},[]),type:t?"button":void 0}}var as=Oe((e,t)=>{const n=Ige(),r=Ao("Button",{...n,...e}),{isDisabled:i=n==null?void 0:n.isDisabled,isLoading:o,isActive:a,children:s,leftIcon:l,rightIcon:u,loadingText:d,iconSpacing:h="0.5rem",type:m,spinner:v,spinnerPlacement:b="start",className:S,as:k,...E}=En(e),_=w.useMemo(()=>{const R={...r==null?void 0:r._focus,zIndex:1};return{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",...r,...!!n&&{_focus:R}}},[r,n]),{ref:T,type:A}=Rge(k),I={rightIcon:u,leftIcon:l,iconSpacing:h,children:s};return N.createElement(Ce.button,{disabled:i||o,ref:nce(t,T),as:k,type:m??A,"data-active":wO(a),"data-loading":wO(o),__css:_,className:QS("chakra-button",S),...E},o&&b==="start"&&N.createElement($7,{className:"chakra-button__spinner--start",label:d,placement:"start",spacing:h},v),o?d||N.createElement(Ce.span,{opacity:0},N.createElement(CO,{...I})):N.createElement(CO,{...I}),o&&b==="end"&&N.createElement($7,{className:"chakra-button__spinner--end",label:d,placement:"end",spacing:h},v))});as.displayName="Button";function CO(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:i}=e;return N.createElement(N.Fragment,null,t&&N.createElement(F7,{marginEnd:i},t),r,n&&N.createElement(F7,{marginStart:i},n))}var oo=Oe(function(t,n){const{size:r,colorScheme:i,variant:o,className:a,spacing:s="0.5rem",isAttached:l,isDisabled:u,...d}=t,h=QS("chakra-button__group",a),m=w.useMemo(()=>({size:r,colorScheme:i,variant:o,isDisabled:u}),[r,i,o,u]);let v={display:"inline-flex"};return l?v={...v,"> *:first-of-type:not(:last-of-type)":{borderEndRadius:0},"> *:not(:first-of-type):not(:last-of-type)":{borderRadius:0},"> *:not(:first-of-type):last-of-type":{borderStartRadius:0}}:v={...v,"& > *:not(style) ~ *:not(style)":{marginStart:s}},N.createElement(Mge,{value:m},N.createElement(Ce.div,{ref:n,role:"group",__css:v,className:h,"data-attached":l?"":void 0,...d}))});oo.displayName="ButtonGroup";var ss=Oe((e,t)=>{const{icon:n,children:r,isRound:i,"aria-label":o,...a}=e,s=n||r,l=w.isValidElement(s)?w.cloneElement(s,{"aria-hidden":!0,focusable:!1}):null;return N.createElement(as,{padding:"0",borderRadius:i?"full":void 0,ref:t,"aria-label":o,...a},l)});ss.displayName="IconButton";var y0=(...e)=>e.filter(Boolean).join(" "),J3=e=>e?"":void 0,C6=e=>e?!0:void 0;function _O(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}var[Dge,KF]=Mn({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in " " `}),[Nge,b0]=Mn({strict:!1,name:"FormControlContext"});function jge(e){const{id:t,isRequired:n,isInvalid:r,isDisabled:i,isReadOnly:o,...a}=e,s=w.useId(),l=t||`field-${s}`,u=`${l}-label`,d=`${l}-feedback`,h=`${l}-helptext`,[m,v]=w.useState(!1),[b,S]=w.useState(!1),[k,E]=w.useState(!1),_=w.useCallback((D={},j=null)=>({id:h,...D,ref:Yn(j,z=>{z&&S(!0)})}),[h]),T=w.useCallback((D={},j=null)=>({...D,ref:j,"data-focus":J3(k),"data-disabled":J3(i),"data-invalid":J3(r),"data-readonly":J3(o),id:D.id??u,htmlFor:D.htmlFor??l}),[l,i,k,r,o,u]),A=w.useCallback((D={},j=null)=>({id:d,...D,ref:Yn(j,z=>{z&&v(!0)}),"aria-live":"polite"}),[d]),I=w.useCallback((D={},j=null)=>({...D,...a,ref:j,role:"group"}),[a]),R=w.useCallback((D={},j=null)=>({...D,ref:j,role:"presentation","aria-hidden":!0,children:D.children||"*"}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!o,isDisabled:!!i,isFocused:!!k,onFocus:()=>E(!0),onBlur:()=>E(!1),hasFeedbackText:m,setHasFeedbackText:v,hasHelpText:b,setHasHelpText:S,id:l,labelId:u,feedbackId:d,helpTextId:h,htmlProps:a,getHelpTextProps:_,getErrorMessageProps:A,getRootProps:I,getLabelProps:T,getRequiredIndicatorProps:R}}var dn=Oe(function(t,n){const r=Yi("Form",t),i=En(t),{getRootProps:o,htmlProps:a,...s}=jge(i),l=y0("chakra-form-control",t.className);return N.createElement(Nge,{value:s},N.createElement(Dge,{value:r},N.createElement(Ce.div,{...o({},n),className:l,__css:r.container})))});dn.displayName="FormControl";var lr=Oe(function(t,n){const r=b0(),i=KF(),o=y0("chakra-form__helper-text",t.className);return N.createElement(Ce.div,{...r==null?void 0:r.getHelpTextProps(t,n),__css:i.helperText,className:o})});lr.displayName="FormHelperText";function sk(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:i,...o}=lk(e);return{...o,disabled:t,readOnly:r,required:i,"aria-invalid":C6(n),"aria-required":C6(i),"aria-readonly":C6(r)}}function lk(e){const t=b0(),{id:n,disabled:r,readOnly:i,required:o,isRequired:a,isInvalid:s,isReadOnly:l,isDisabled:u,onFocus:d,onBlur:h,...m}=e,v=e["aria-describedby"]?[e["aria-describedby"]]:[];return t!=null&&t.hasFeedbackText&&(t!=null&&t.isInvalid)&&v.push(t.feedbackId),t!=null&&t.hasHelpText&&v.push(t.helpTextId),{...m,"aria-describedby":v.join(" ")||void 0,id:n??(t==null?void 0:t.id),isDisabled:r??u??(t==null?void 0:t.isDisabled),isReadOnly:i??l??(t==null?void 0:t.isReadOnly),isRequired:o??a??(t==null?void 0:t.isRequired),isInvalid:s??(t==null?void 0:t.isInvalid),onFocus:_O(t==null?void 0:t.onFocus,d),onBlur:_O(t==null?void 0:t.onBlur,h)}}var[Bge,Fge]=Mn({name:"FormErrorStylesContext",errorMessage:`useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in " " `}),ur=Oe((e,t)=>{const n=Yi("FormError",e),r=En(e),i=b0();return i!=null&&i.isInvalid?N.createElement(Bge,{value:n},N.createElement(Ce.div,{...i==null?void 0:i.getErrorMessageProps(r,t),className:y0("chakra-form__error-message",e.className),__css:{display:"flex",alignItems:"center",...n.text}})):null});ur.displayName="FormErrorMessage";var $ge=Oe((e,t)=>{const n=Fge(),r=b0();if(!(r!=null&&r.isInvalid))return null;const i=y0("chakra-form__error-icon",e.className);return N.createElement(Da,{ref:t,"aria-hidden":!0,...e,__css:n.icon,className:i},N.createElement("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"}))});$ge.displayName="FormErrorIcon";var kn=Oe(function(t,n){const r=Ao("FormLabel",t),i=En(t),{className:o,children:a,requiredIndicator:s=N.createElement(XF,null),optionalIndicator:l=null,...u}=i,d=b0(),h=(d==null?void 0:d.getLabelProps(u,n))??{ref:n,...u};return N.createElement(Ce.label,{...h,className:y0("chakra-form__label",i.className),__css:{display:"block",textAlign:"start",...r}},a,d!=null&&d.isRequired?s:l)});kn.displayName="FormLabel";var XF=Oe(function(t,n){const r=b0(),i=KF();if(!(r!=null&&r.isRequired))return null;const o=y0("chakra-form__required-indicator",t.className);return N.createElement(Ce.span,{...r==null?void 0:r.getRequiredIndicatorProps(t,n),__css:i.requiredIndicator,className:o})});XF.displayName="RequiredIndicator";function Vd(e,t){const n=w.useRef(!1),r=w.useRef(!1);w.useEffect(()=>{if(n.current&&r.current)return e();r.current=!0},t),w.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])}var uk={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},zge=Ce("span",{baseStyle:uk});zge.displayName="VisuallyHidden";var Hge=Ce("input",{baseStyle:uk});Hge.displayName="VisuallyHiddenInput";var kO=!1,JS=null,Wm=!1,z7=new Set,Vge=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function Wge(e){return!(e.metaKey||!Vge&&e.altKey||e.ctrlKey)}function ck(e,t){z7.forEach(n=>n(e,t))}function EO(e){Wm=!0,Wge(e)&&(JS="keyboard",ck("keyboard",e))}function wg(e){JS="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(Wm=!0,ck("pointer",e))}function Uge(e){e.target===window||e.target===document||(Wm||(JS="keyboard",ck("keyboard",e)),Wm=!1)}function Gge(){Wm=!1}function PO(){return JS!=="pointer"}function qge(){if(typeof window>"u"||kO)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...n){Wm=!0,e.apply(this,n)},document.addEventListener("keydown",EO,!0),document.addEventListener("keyup",EO,!0),window.addEventListener("focus",Uge,!0),window.addEventListener("blur",Gge,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",wg,!0),document.addEventListener("pointermove",wg,!0),document.addEventListener("pointerup",wg,!0)):(document.addEventListener("mousedown",wg,!0),document.addEventListener("mousemove",wg,!0),document.addEventListener("mouseup",wg,!0)),kO=!0}function Yge(e){qge(),e(PO());const t=()=>e(PO());return z7.add(t),()=>{z7.delete(t)}}var[X$e,Kge]=Mn({name:"CheckboxGroupContext",strict:!1}),Xge=(...e)=>e.filter(Boolean).join(" "),yo=e=>e?"":void 0;function Ya(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}function Zge(...e){return function(n){e.forEach(r=>{r==null||r(n)})}}function Qge(e){return N.createElement(Ce.svg,{width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...e},N.createElement("polyline",{points:"1.5 6 4.5 9 10.5 1"}))}function Jge(e){return N.createElement(Ce.svg,{width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4},...e},N.createElement("line",{x1:"21",x2:"3",y1:"12",y2:"12"}))}function eme(e){const{isIndeterminate:t,isChecked:n,...r}=e,i=t?Jge:Qge;return n||t?N.createElement(Ce.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"}},N.createElement(i,{...r})):null}function tme(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function ZF(e={}){const t=lk(e),{isDisabled:n,isReadOnly:r,isRequired:i,isInvalid:o,id:a,onBlur:s,onFocus:l,"aria-describedby":u}=t,{defaultChecked:d,isChecked:h,isFocusable:m,onChange:v,isIndeterminate:b,name:S,value:k,tabIndex:E=void 0,"aria-label":_,"aria-labelledby":T,"aria-invalid":A,...I}=e,R=tme(I,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),D=Er(v),j=Er(s),z=Er(l),[V,K]=w.useState(!1),[te,q]=w.useState(!1),[F,U]=w.useState(!1),[X,Z]=w.useState(!1);w.useEffect(()=>Yge(K),[]);const W=w.useRef(null),[Q,ie]=w.useState(!0),[fe,Se]=w.useState(!!d),Te=h!==void 0,ye=Te?h:fe,He=w.useCallback(Ae=>{if(r||n){Ae.preventDefault();return}Te||Se(ye?Ae.target.checked:b?!0:Ae.target.checked),D==null||D(Ae)},[r,n,ye,Te,b,D]);Ws(()=>{W.current&&(W.current.indeterminate=Boolean(b))},[b]),Vd(()=>{n&&q(!1)},[n,q]),Ws(()=>{const Ae=W.current;Ae!=null&&Ae.form&&(Ae.form.onreset=()=>{Se(!!d)})},[]);const Ne=n&&!m,tt=w.useCallback(Ae=>{Ae.key===" "&&Z(!0)},[Z]),_e=w.useCallback(Ae=>{Ae.key===" "&&Z(!1)},[Z]);Ws(()=>{if(!W.current)return;W.current.checked!==ye&&Se(W.current.checked)},[W.current]);const lt=w.useCallback((Ae={},ut=null)=>{const Mt=at=>{te&&at.preventDefault(),Z(!0)};return{...Ae,ref:ut,"data-active":yo(X),"data-hover":yo(F),"data-checked":yo(ye),"data-focus":yo(te),"data-focus-visible":yo(te&&V),"data-indeterminate":yo(b),"data-disabled":yo(n),"data-invalid":yo(o),"data-readonly":yo(r),"aria-hidden":!0,onMouseDown:Ya(Ae.onMouseDown,Mt),onMouseUp:Ya(Ae.onMouseUp,()=>Z(!1)),onMouseEnter:Ya(Ae.onMouseEnter,()=>U(!0)),onMouseLeave:Ya(Ae.onMouseLeave,()=>U(!1))}},[X,ye,n,te,V,F,b,o,r]),wt=w.useCallback((Ae={},ut=null)=>({...R,...Ae,ref:Yn(ut,Mt=>{Mt&&ie(Mt.tagName==="LABEL")}),onClick:Ya(Ae.onClick,()=>{var Mt;Q||((Mt=W.current)==null||Mt.click(),requestAnimationFrame(()=>{var at;(at=W.current)==null||at.focus()}))}),"data-disabled":yo(n),"data-checked":yo(ye),"data-invalid":yo(o)}),[R,n,ye,o,Q]),ct=w.useCallback((Ae={},ut=null)=>({...Ae,ref:Yn(W,ut),type:"checkbox",name:S,value:k,id:a,tabIndex:E,onChange:Ya(Ae.onChange,He),onBlur:Ya(Ae.onBlur,j,()=>q(!1)),onFocus:Ya(Ae.onFocus,z,()=>q(!0)),onKeyDown:Ya(Ae.onKeyDown,tt),onKeyUp:Ya(Ae.onKeyUp,_e),required:i,checked:ye,disabled:Ne,readOnly:r,"aria-label":_,"aria-labelledby":T,"aria-invalid":A?Boolean(A):o,"aria-describedby":u,"aria-disabled":n,style:uk}),[S,k,a,He,j,z,tt,_e,i,ye,Ne,r,_,T,A,o,u,n,E]),mt=w.useCallback((Ae={},ut=null)=>({...Ae,ref:ut,onMouseDown:Ya(Ae.onMouseDown,TO),onTouchStart:Ya(Ae.onTouchStart,TO),"data-disabled":yo(n),"data-checked":yo(ye),"data-invalid":yo(o)}),[ye,n,o]);return{state:{isInvalid:o,isFocused:te,isChecked:ye,isActive:X,isHovered:F,isIndeterminate:b,isDisabled:n,isReadOnly:r,isRequired:i},getRootProps:wt,getCheckboxProps:lt,getInputProps:ct,getLabelProps:mt,htmlProps:R}}function TO(e){e.preventDefault(),e.stopPropagation()}var nme={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},rme={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},ime=tf({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),ome=tf({from:{opacity:0},to:{opacity:1}}),ame=tf({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),QF=Oe(function(t,n){const r=Kge(),i={...r,...t},o=Yi("Checkbox",i),a=En(t),{spacing:s="0.5rem",className:l,children:u,iconColor:d,iconSize:h,icon:m=N.createElement(eme,null),isChecked:v,isDisabled:b=r==null?void 0:r.isDisabled,onChange:S,inputProps:k,...E}=a;let _=v;r!=null&&r.value&&a.value&&(_=r.value.includes(a.value));let T=S;r!=null&&r.onChange&&a.value&&(T=Zge(r.onChange,S));const{state:A,getInputProps:I,getCheckboxProps:R,getLabelProps:D,getRootProps:j}=ZF({...E,isDisabled:b,isChecked:_,onChange:T}),z=w.useMemo(()=>({animation:A.isIndeterminate?`${ome} 20ms linear, ${ame} 200ms linear`:`${ime} 200ms linear`,fontSize:h,color:d,...o.icon}),[d,h,,A.isIndeterminate,o.icon]),V=w.cloneElement(m,{__css:z,isIndeterminate:A.isIndeterminate,isChecked:A.isChecked});return N.createElement(Ce.label,{__css:{...rme,...o.container},className:Xge("chakra-checkbox",l),...j()},N.createElement("input",{className:"chakra-checkbox__input",...I(k,n)}),N.createElement(Ce.span,{__css:{...nme,...o.control},className:"chakra-checkbox__control",...R()},V),u&&N.createElement(Ce.span,{className:"chakra-checkbox__label",...D(),__css:{marginStart:s,...o.label}},u))});QF.displayName="Checkbox";function sme(e){return N.createElement(Da,{focusable:"false","aria-hidden":!0,...e},N.createElement("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"}))}var ex=Oe(function(t,n){const r=Ao("CloseButton",t),{children:i,isDisabled:o,__css:a,...s}=En(t),l={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return N.createElement(Ce.button,{type:"button","aria-label":"Close",ref:n,disabled:o,__css:{...l,...r,...a},...s},i||N.createElement(sme,{width:"1em",height:"1em"}))});ex.displayName="CloseButton";function lme(e){const t=parseFloat(e);return typeof t!="number"||Number.isNaN(t)?0:t}function dk(e,t){let n=lme(e);const r=10**(t??10);return n=Math.round(n*r)/r,t?n.toFixed(t):n.toString()}function H7(e){if(!Number.isFinite(e))return 0;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n+=1;return n}function u5(e,t,n){return(e-t)*100/(n-t)}function JF(e,t,n){return(n-t)*e+t}function V7(e,t,n){const r=Math.round((e-t)/n)*n+t,i=H7(n);return dk(r,i)}function Cm(e,t,n){return e==null?e:(nr==null?"":_6(r,o,n)??""),m=typeof i<"u",v=m?i:d,b=e$(dd(v),o),S=n??b,k=w.useCallback(V=>{V!==v&&(m||h(V.toString()),u==null||u(V.toString(),dd(V)))},[u,m,v]),E=w.useCallback(V=>{let K=V;return l&&(K=Cm(K,a,s)),dk(K,S)},[S,l,s,a]),_=w.useCallback((V=o)=>{let K;v===""?K=dd(V):K=dd(v)+V,K=E(K),k(K)},[E,o,k,v]),T=w.useCallback((V=o)=>{let K;v===""?K=dd(-V):K=dd(v)-V,K=E(K),k(K)},[E,o,k,v]),A=w.useCallback(()=>{let V;r==null?V="":V=_6(r,o,n)??a,k(V)},[r,n,o,k,a]),I=w.useCallback(V=>{const K=_6(V,o,S)??a;k(K)},[S,o,k,a]),R=dd(v);return{isOutOfRange:R>s||RN.createElement(MS,{styles:t$}),dme=()=>N.createElement(MS,{styles:`
+ html {
+ line-height: 1.5;
+ -webkit-text-size-adjust: 100%;
+ font-family: system-ui, sans-serif;
+ -webkit-font-smoothing: antialiased;
+ text-rendering: optimizeLegibility;
+ -moz-osx-font-smoothing: grayscale;
+ touch-action: manipulation;
+ }
+
+ body {
+ position: relative;
+ min-height: 100%;
+ font-feature-settings: 'kern';
+ }
+
+ *,
+ *::before,
+ *::after {
+ border-width: 0;
+ border-style: solid;
+ box-sizing: border-box;
+ }
+
+ main {
+ display: block;
+ }
+
+ hr {
+ border-top-width: 1px;
+ box-sizing: content-box;
+ height: 0;
+ overflow: visible;
+ }
+
+ pre,
+ code,
+ kbd,
+ samp {
+ font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace;
+ font-size: 1em;
+ }
+
+ a {
+ background-color: transparent;
+ color: inherit;
+ text-decoration: inherit;
+ }
+
+ abbr[title] {
+ border-bottom: none;
+ text-decoration: underline;
+ -webkit-text-decoration: underline dotted;
+ text-decoration: underline dotted;
+ }
+
+ b,
+ strong {
+ font-weight: bold;
+ }
+
+ small {
+ font-size: 80%;
+ }
+
+ sub,
+ sup {
+ font-size: 75%;
+ line-height: 0;
+ position: relative;
+ vertical-align: baseline;
+ }
+
+ sub {
+ bottom: -0.25em;
+ }
+
+ sup {
+ top: -0.5em;
+ }
+
+ img {
+ border-style: none;
+ }
+
+ button,
+ input,
+ optgroup,
+ select,
+ textarea {
+ font-family: inherit;
+ font-size: 100%;
+ line-height: 1.15;
+ margin: 0;
+ }
+
+ button,
+ input {
+ overflow: visible;
+ }
+
+ button,
+ select {
+ text-transform: none;
+ }
+
+ button::-moz-focus-inner,
+ [type="button"]::-moz-focus-inner,
+ [type="reset"]::-moz-focus-inner,
+ [type="submit"]::-moz-focus-inner {
+ border-style: none;
+ padding: 0;
+ }
+
+ fieldset {
+ padding: 0.35em 0.75em 0.625em;
+ }
+
+ legend {
+ box-sizing: border-box;
+ color: inherit;
+ display: table;
+ max-width: 100%;
+ padding: 0;
+ white-space: normal;
+ }
+
+ progress {
+ vertical-align: baseline;
+ }
+
+ textarea {
+ overflow: auto;
+ }
+
+ [type="checkbox"],
+ [type="radio"] {
+ box-sizing: border-box;
+ padding: 0;
+ }
+
+ [type="number"]::-webkit-inner-spin-button,
+ [type="number"]::-webkit-outer-spin-button {
+ -webkit-appearance: none !important;
+ }
+
+ input[type="number"] {
+ -moz-appearance: textfield;
+ }
+
+ [type="search"] {
+ -webkit-appearance: textfield;
+ outline-offset: -2px;
+ }
+
+ [type="search"]::-webkit-search-decoration {
+ -webkit-appearance: none !important;
+ }
+
+ ::-webkit-file-upload-button {
+ -webkit-appearance: button;
+ font: inherit;
+ }
+
+ details {
+ display: block;
+ }
+
+ summary {
+ display: list-item;
+ }
+
+ template {
+ display: none;
+ }
+
+ [hidden] {
+ display: none !important;
+ }
+
+ body,
+ blockquote,
+ dl,
+ dd,
+ h1,
+ h2,
+ h3,
+ h4,
+ h5,
+ h6,
+ hr,
+ figure,
+ p,
+ pre {
+ margin: 0;
+ }
+
+ button {
+ background: transparent;
+ padding: 0;
+ }
+
+ fieldset {
+ margin: 0;
+ padding: 0;
+ }
+
+ ol,
+ ul {
+ margin: 0;
+ padding: 0;
+ }
+
+ textarea {
+ resize: vertical;
+ }
+
+ button,
+ [role="button"] {
+ cursor: pointer;
+ }
+
+ button::-moz-focus-inner {
+ border: 0 !important;
+ }
+
+ table {
+ border-collapse: collapse;
+ }
+
+ h1,
+ h2,
+ h3,
+ h4,
+ h5,
+ h6 {
+ font-size: inherit;
+ font-weight: inherit;
+ }
+
+ button,
+ input,
+ optgroup,
+ select,
+ textarea {
+ padding: 0;
+ line-height: inherit;
+ color: inherit;
+ }
+
+ img,
+ svg,
+ video,
+ canvas,
+ audio,
+ iframe,
+ embed,
+ object {
+ display: block;
+ }
+
+ img,
+ video {
+ max-width: 100%;
+ height: auto;
+ }
+
+ [data-js-focus-visible] :focus:not([data-focus-visible-added]):not([data-focus-visible-disabled]) {
+ outline: none;
+ box-shadow: none;
+ }
+
+ select::-ms-expand {
+ display: none;
+ }
+
+ ${t$}
+ `});function Rh(e,t,n,r){const i=Er(n);return w.useEffect(()=>{const o=typeof e=="function"?e():e??document;if(!(!n||!o))return o.addEventListener(t,i,r),()=>{o.removeEventListener(t,i,r)}},[t,e,r,i,n]),()=>{const o=typeof e=="function"?e():e??document;o==null||o.removeEventListener(t,i,r)}}function fme(e){return"current"in e}var n$=()=>typeof window<"u";function hme(){const e=navigator.userAgentData;return(e==null?void 0:e.platform)??navigator.platform}var pme=e=>n$()&&e.test(navigator.vendor),gme=e=>n$()&&e.test(hme()),mme=()=>gme(/mac|iphone|ipad|ipod/i),vme=()=>mme()&&pme(/apple/i);function yme(e){const{ref:t,elements:n,enabled:r}=e,i=()=>{var o;return((o=t.current)==null?void 0:o.ownerDocument)??document};Rh(i,"pointerdown",o=>{if(!vme()||!r)return;const a=o.target,l=(n??[t]).some(u=>{const d=fme(u)?u.current:u;return(d==null?void 0:d.contains(a))||d===a});i().activeElement!==a&&l&&(o.preventDefault(),a.focus())})}var bme=ure?w.useLayoutEffect:w.useEffect;function LO(e,t=[]){const n=w.useRef(e);return bme(()=>{n.current=e}),w.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function Sme(e,t){const n=e!==void 0;return[n,n&&typeof e<"u"?e:t]}function xme(e,t){const n=w.useId();return w.useMemo(()=>e||[t,n].filter(Boolean).join("-"),[e,t,n])}function Wh(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=LO(n),a=LO(t),[s,l]=w.useState(e.defaultIsOpen||!1),[u,d]=Sme(r,s),h=xme(i,"disclosure"),m=w.useCallback(()=>{u||l(!1),a==null||a()},[u,a]),v=w.useCallback(()=>{u||l(!0),o==null||o()},[u,o]),b=w.useCallback(()=>{(d?m:v)()},[d,v,m]);return{isOpen:!!d,onOpen:v,onClose:m,onToggle:b,isControlled:u,getButtonProps:(S={})=>({...S,"aria-expanded":d,"aria-controls":h,onClick:cre(S.onClick,b)}),getDisclosureProps:(S={})=>({...S,hidden:!d,id:h})}}function fk(e){const t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}var hk=Oe(function(t,n){const{htmlSize:r,...i}=t,o=Yi("Input",i),a=En(i),s=sk(a),l=Qr("chakra-input",t.className);return N.createElement(Ce.input,{size:r,...s,__css:o.field,ref:n,className:l})});hk.displayName="Input";hk.id="Input";var[wme,r$]=Mn({name:"InputGroupStylesContext",errorMessage:`useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in " " `}),Cme=Oe(function(t,n){const r=Yi("Input",t),{children:i,className:o,...a}=En(t),s=Qr("chakra-input__group",o),l={},u=ZS(i),d=r.field;u.forEach(m=>{r&&(d&&m.type.id==="InputLeftElement"&&(l.paddingStart=d.height??d.h),d&&m.type.id==="InputRightElement"&&(l.paddingEnd=d.height??d.h),m.type.id==="InputRightAddon"&&(l.borderEndRadius=0),m.type.id==="InputLeftAddon"&&(l.borderStartRadius=0))});const h=u.map(m=>{var v,b;const S=fk({size:((v=m.props)==null?void 0:v.size)||t.size,variant:((b=m.props)==null?void 0:b.variant)||t.variant});return m.type.id!=="Input"?w.cloneElement(m,S):w.cloneElement(m,Object.assign(S,l,m.props))});return N.createElement(Ce.div,{className:s,ref:n,__css:{width:"100%",display:"flex",position:"relative"},...a},N.createElement(wme,{value:r},h))});Cme.displayName="InputGroup";var _me={left:{marginEnd:"-1px",borderEndRadius:0,borderEndColor:"transparent"},right:{marginStart:"-1px",borderStartRadius:0,borderStartColor:"transparent"}},kme=Ce("div",{baseStyle:{flex:"0 0 auto",width:"auto",display:"flex",alignItems:"center",whiteSpace:"nowrap"}}),pk=Oe(function(t,n){const{placement:r="left",...i}=t,o=_me[r]??{},a=r$();return N.createElement(kme,{ref:n,...i,__css:{...a.addon,...o}})});pk.displayName="InputAddon";var i$=Oe(function(t,n){return N.createElement(pk,{ref:n,placement:"left",...t,className:Qr("chakra-input__left-addon",t.className)})});i$.displayName="InputLeftAddon";i$.id="InputLeftAddon";var o$=Oe(function(t,n){return N.createElement(pk,{ref:n,placement:"right",...t,className:Qr("chakra-input__right-addon",t.className)})});o$.displayName="InputRightAddon";o$.id="InputRightAddon";var Eme=Ce("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),tx=Oe(function(t,n){const{placement:r="left",...i}=t,o=r$(),a=o.field,l={[r==="left"?"insetStart":"insetEnd"]:"0",width:(a==null?void 0:a.height)??(a==null?void 0:a.h),height:(a==null?void 0:a.height)??(a==null?void 0:a.h),fontSize:a==null?void 0:a.fontSize,...o.element};return N.createElement(Eme,{ref:n,__css:l,...i})});tx.id="InputElement";tx.displayName="InputElement";var a$=Oe(function(t,n){const{className:r,...i}=t,o=Qr("chakra-input__left-element",r);return N.createElement(tx,{ref:n,placement:"left",className:o,...i})});a$.id="InputLeftElement";a$.displayName="InputLeftElement";var s$=Oe(function(t,n){const{className:r,...i}=t,o=Qr("chakra-input__right-element",r);return N.createElement(tx,{ref:n,placement:"right",className:o,...i})});s$.id="InputRightElement";s$.displayName="InputRightElement";function Pme(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function Wd(e,t){return Array.isArray(e)?e.map(n=>n===null?null:t(n)):Pme(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}var Tme=Oe(function(e,t){const{ratio:n=4/3,children:r,className:i,...o}=e,a=w.Children.only(r),s=Qr("chakra-aspect-ratio",i);return N.createElement(Ce.div,{ref:t,position:"relative",className:s,_before:{height:0,content:'""',display:"block",paddingBottom:Wd(n,l=>`${1/l*100}%`)},__css:{"& > *:not(style)":{overflow:"hidden",position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},"& > img, & > video":{objectFit:"cover"}},...o},a)});Tme.displayName="AspectRatio";var Lme=Oe(function(t,n){const r=Ao("Badge",t),{className:i,...o}=En(t);return N.createElement(Ce.span,{ref:n,className:Qr("chakra-badge",t.className),...o,__css:{display:"inline-block",whiteSpace:"nowrap",verticalAlign:"middle",...r}})});Lme.displayName="Badge";var _o=Ce("div");_o.displayName="Box";var l$=Oe(function(t,n){const{size:r,centerContent:i=!0,...o}=t,a=i?{display:"flex",alignItems:"center",justifyContent:"center"}:{};return N.createElement(_o,{ref:n,boxSize:r,__css:{...a,flexShrink:0,flexGrow:0},...o})});l$.displayName="Square";var Ame=Oe(function(t,n){const{size:r,...i}=t;return N.createElement(l$,{size:r,ref:n,borderRadius:"9999px",...i})});Ame.displayName="Circle";var u$=Ce("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});u$.displayName="Center";var Ome={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};Oe(function(t,n){const{axis:r="both",...i}=t;return N.createElement(Ce.div,{ref:n,__css:Ome[r],...i,position:"absolute"})});var Mme=Oe(function(t,n){const r=Ao("Code",t),{className:i,...o}=En(t);return N.createElement(Ce.code,{ref:n,className:Qr("chakra-code",t.className),...o,__css:{display:"inline-block",...r}})});Mme.displayName="Code";var Ime=Oe(function(t,n){const{className:r,centerContent:i,...o}=En(t),a=Ao("Container",t);return N.createElement(Ce.div,{ref:n,className:Qr("chakra-container",r),...o,__css:{...a,...i&&{display:"flex",flexDirection:"column",alignItems:"center"}}})});Ime.displayName="Container";var Rme=Oe(function(t,n){const{borderLeftWidth:r,borderBottomWidth:i,borderTopWidth:o,borderRightWidth:a,borderWidth:s,borderStyle:l,borderColor:u,...d}=Ao("Divider",t),{className:h,orientation:m="horizontal",__css:v,...b}=En(t),S={vertical:{borderLeftWidth:r||a||s||"1px",height:"100%"},horizontal:{borderBottomWidth:i||o||s||"1px",width:"100%"}};return N.createElement(Ce.hr,{ref:n,"aria-orientation":m,...b,__css:{...d,border:"0",borderColor:u,borderStyle:l,...S[m],...v},className:Qr("chakra-divider",h)})});Rme.displayName="Divider";var qe=Oe(function(t,n){const{direction:r,align:i,justify:o,wrap:a,basis:s,grow:l,shrink:u,...d}=t,h={display:"flex",flexDirection:r,alignItems:i,justifyContent:o,flexWrap:a,flexBasis:s,flexGrow:l,flexShrink:u};return N.createElement(Ce.div,{ref:n,__css:h,...d})});qe.displayName="Flex";var c$=Oe(function(t,n){const{templateAreas:r,gap:i,rowGap:o,columnGap:a,column:s,row:l,autoFlow:u,autoRows:d,templateRows:h,autoColumns:m,templateColumns:v,...b}=t,S={display:"grid",gridTemplateAreas:r,gridGap:i,gridRowGap:o,gridColumnGap:a,gridAutoColumns:m,gridColumn:s,gridRow:l,gridAutoFlow:u,gridAutoRows:d,gridTemplateRows:h,gridTemplateColumns:v};return N.createElement(Ce.div,{ref:n,__css:S,...b})});c$.displayName="Grid";function AO(e){return Wd(e,t=>t==="auto"?"auto":`span ${t}/span ${t}`)}var Dme=Oe(function(t,n){const{area:r,colSpan:i,colStart:o,colEnd:a,rowEnd:s,rowSpan:l,rowStart:u,...d}=t,h=fk({gridArea:r,gridColumn:AO(i),gridRow:AO(l),gridColumnStart:o,gridColumnEnd:a,gridRowStart:u,gridRowEnd:s});return N.createElement(Ce.div,{ref:n,__css:h,...d})});Dme.displayName="GridItem";var Dh=Oe(function(t,n){const r=Ao("Heading",t),{className:i,...o}=En(t);return N.createElement(Ce.h2,{ref:n,className:Qr("chakra-heading",t.className),...o,__css:r})});Dh.displayName="Heading";Oe(function(t,n){const r=Ao("Mark",t),i=En(t);return N.createElement(_o,{ref:n,...i,as:"mark",__css:{bg:"transparent",whiteSpace:"nowrap",...r}})});var Nme=Oe(function(t,n){const r=Ao("Kbd",t),{className:i,...o}=En(t);return N.createElement(Ce.kbd,{ref:n,className:Qr("chakra-kbd",i),...o,__css:{fontFamily:"mono",...r}})});Nme.displayName="Kbd";var Nh=Oe(function(t,n){const r=Ao("Link",t),{className:i,isExternal:o,...a}=En(t);return N.createElement(Ce.a,{target:o?"_blank":void 0,rel:o?"noopener":void 0,ref:n,className:Qr("chakra-link",i),...a,__css:r})});Nh.displayName="Link";Oe(function(t,n){const{isExternal:r,target:i,rel:o,className:a,...s}=t;return N.createElement(Ce.a,{...s,ref:n,className:Qr("chakra-linkbox__overlay",a),rel:r?"noopener noreferrer":o,target:r?"_blank":i,__css:{position:"static","&::before":{content:"''",cursor:"inherit",display:"block",position:"absolute",top:0,left:0,zIndex:0,width:"100%",height:"100%"}}})});Oe(function(t,n){const{className:r,...i}=t;return N.createElement(Ce.div,{ref:n,position:"relative",...i,className:Qr("chakra-linkbox",r),__css:{"a[href]:not(.chakra-linkbox__overlay), abbr[title]":{position:"relative",zIndex:1}}})});var[jme,d$]=Mn({name:"ListStylesContext",errorMessage:`useListStyles returned is 'undefined'. Seems you forgot to wrap the components in "
" `}),gk=Oe(function(t,n){const r=Yi("List",t),{children:i,styleType:o="none",stylePosition:a,spacing:s,...l}=En(t),u=ZS(i),h=s?{["& > *:not(style) ~ *:not(style)"]:{mt:s}}:{};return N.createElement(jme,{value:r},N.createElement(Ce.ul,{ref:n,listStyleType:o,listStylePosition:a,role:"list",__css:{...r.container,...h},...l},u))});gk.displayName="List";var Bme=Oe((e,t)=>{const{as:n,...r}=e;return N.createElement(gk,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...r})});Bme.displayName="OrderedList";var Fme=Oe(function(t,n){const{as:r,...i}=t;return N.createElement(gk,{ref:n,as:"ul",styleType:"initial",marginStart:"1em",...i})});Fme.displayName="UnorderedList";var $me=Oe(function(t,n){const r=d$();return N.createElement(Ce.li,{ref:n,...t,__css:r.item})});$me.displayName="ListItem";var zme=Oe(function(t,n){const r=d$();return N.createElement(Da,{ref:n,role:"presentation",...t,__css:r.icon})});zme.displayName="ListIcon";var Hme=Oe(function(t,n){const{columns:r,spacingX:i,spacingY:o,spacing:a,minChildWidth:s,...l}=t,u=h0(),d=s?Wme(s,u):Ume(r);return N.createElement(c$,{ref:n,gap:a,columnGap:i,rowGap:o,templateColumns:d,...l})});Hme.displayName="SimpleGrid";function Vme(e){return typeof e=="number"?`${e}px`:e}function Wme(e,t){return Wd(e,n=>{const r=Uue("sizes",n,Vme(n))(t);return n===null?null:`repeat(auto-fit, minmax(${r}, 1fr))`})}function Ume(e){return Wd(e,t=>t===null?null:`repeat(${t}, minmax(0, 1fr))`)}var f$=Ce("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}});f$.displayName="Spacer";var W7="& > *:not(style) ~ *:not(style)";function Gme(e){const{spacing:t,direction:n}=e,r={column:{marginTop:t,marginEnd:0,marginBottom:0,marginStart:0},row:{marginTop:0,marginEnd:0,marginBottom:0,marginStart:t},"column-reverse":{marginTop:0,marginEnd:0,marginBottom:t,marginStart:0},"row-reverse":{marginTop:0,marginEnd:t,marginBottom:0,marginStart:0}};return{flexDirection:n,[W7]:Wd(n,i=>r[i])}}function qme(e){const{spacing:t,direction:n}=e,r={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":Wd(n,i=>r[i])}}var h$=e=>N.createElement(Ce.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});h$.displayName="StackItem";var mk=Oe((e,t)=>{const{isInline:n,direction:r,align:i,justify:o,spacing:a="0.5rem",wrap:s,children:l,divider:u,className:d,shouldWrapChildren:h,...m}=e,v=n?"row":r??"column",b=w.useMemo(()=>Gme({direction:v,spacing:a}),[v,a]),S=w.useMemo(()=>qme({spacing:a,direction:v}),[a,v]),k=!!u,E=!h&&!k,_=w.useMemo(()=>{const A=ZS(l);return E?A:A.map((I,R)=>{const D=typeof I.key<"u"?I.key:R,j=R+1===A.length,V=h?N.createElement(h$,{key:D},I):I;if(!k)return V;const K=w.cloneElement(u,{__css:S}),te=j?null:K;return N.createElement(w.Fragment,{key:D},V,te)})},[u,S,k,E,h,l]),T=Qr("chakra-stack",d);return N.createElement(Ce.div,{ref:t,display:"flex",alignItems:i,justifyContent:o,flexDirection:b.flexDirection,flexWrap:s,className:T,__css:k?{}:{[W7]:b[W7]},...m},_)});mk.displayName="Stack";var wy=Oe((e,t)=>N.createElement(mk,{align:"center",...e,direction:"row",ref:t}));wy.displayName="HStack";var yn=Oe((e,t)=>N.createElement(mk,{align:"center",...e,direction:"column",ref:t}));yn.displayName="VStack";var fn=Oe(function(t,n){const r=Ao("Text",t),{className:i,align:o,decoration:a,casing:s,...l}=En(t),u=fk({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return N.createElement(Ce.p,{ref:n,className:Qr("chakra-text",t.className),...u,...l,__css:r})});fn.displayName="Text";function OO(e){return typeof e=="number"?`${e}px`:e}var Yme=Oe(function(t,n){const{spacing:r="0.5rem",spacingX:i,spacingY:o,children:a,justify:s,direction:l,align:u,className:d,shouldWrapChildren:h,...m}=t,v=w.useMemo(()=>{const{spacingX:S=r,spacingY:k=r}={spacingX:i,spacingY:o};return{"--chakra-wrap-x-spacing":E=>Wd(S,_=>OO(QC("space",_)(E))),"--chakra-wrap-y-spacing":E=>Wd(k,_=>OO(QC("space",_)(E))),"--wrap-x-spacing":"calc(var(--chakra-wrap-x-spacing) / 2)","--wrap-y-spacing":"calc(var(--chakra-wrap-y-spacing) / 2)",display:"flex",flexWrap:"wrap",justifyContent:s,alignItems:u,flexDirection:l,listStyleType:"none",padding:"0",margin:"calc(var(--wrap-y-spacing) * -1) calc(var(--wrap-x-spacing) * -1)","& > *:not(style)":{margin:"var(--wrap-y-spacing) var(--wrap-x-spacing)"}}},[r,i,o,s,u,l]),b=w.useMemo(()=>h?w.Children.map(a,(S,k)=>N.createElement(p$,{key:k},S)):a,[a,h]);return N.createElement(Ce.div,{ref:n,className:Qr("chakra-wrap",d),overflow:"hidden",...m},N.createElement(Ce.ul,{className:"chakra-wrap__list",__css:v},b))});Yme.displayName="Wrap";var p$=Oe(function(t,n){const{className:r,...i}=t;return N.createElement(Ce.li,{ref:n,__css:{display:"flex",alignItems:"flex-start"},className:Qr("chakra-wrap__listitem",r),...i})});p$.displayName="WrapItem";var Kme={body:{classList:{add(){},remove(){}}},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}}},g$=Kme,Cg=()=>{},Xme={document:g$,navigator:{userAgent:""},CustomEvent:function(){return this},addEventListener:Cg,removeEventListener:Cg,getComputedStyle(){return{getPropertyValue(){return""}}},matchMedia(){return{matches:!1,addListener:Cg,removeListener:Cg}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)},setTimeout:()=>0,clearTimeout:Cg,setInterval:()=>0,clearInterval:Cg},Zme=Xme,Qme={window:Zme,document:g$},m$=typeof window<"u"?{window,document}:Qme,v$=w.createContext(m$);v$.displayName="EnvironmentContext";function y$(e){const{children:t,environment:n}=e,[r,i]=w.useState(null),[o,a]=w.useState(!1);w.useEffect(()=>a(!0),[]);const s=w.useMemo(()=>{if(n)return n;const l=r==null?void 0:r.ownerDocument,u=r==null?void 0:r.ownerDocument.defaultView;return l?{document:l,window:u}:m$},[r,n]);return N.createElement(v$.Provider,{value:s},t,!n&&o&&N.createElement("span",{id:"__chakra_env",hidden:!0,ref:l=>{w.startTransition(()=>{l&&i(l)})}}))}y$.displayName="EnvironmentProvider";var Jme=e=>e?"":void 0;function e0e(){const e=w.useRef(new Map),t=e.current,n=w.useCallback((i,o,a,s)=>{e.current.set(a,{type:o,el:i,options:s}),i.addEventListener(o,a,s)},[]),r=w.useCallback((i,o,a,s)=>{i.removeEventListener(o,a,s),e.current.delete(a)},[]);return w.useEffect(()=>()=>{t.forEach((i,o)=>{r(i.el,i.type,o,i.options)})},[r,t]),{add:n,remove:r}}function k6(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return n!=="INPUT"&&n!=="TEXTAREA"&&r!==!0}function t0e(e={}){const{ref:t,isDisabled:n,isFocusable:r,clickOnEnter:i=!0,clickOnSpace:o=!0,onMouseDown:a,onMouseUp:s,onClick:l,onKeyDown:u,onKeyUp:d,tabIndex:h,onMouseOver:m,onMouseLeave:v,...b}=e,[S,k]=w.useState(!0),[E,_]=w.useState(!1),T=e0e(),A=Z=>{Z&&Z.tagName!=="BUTTON"&&k(!1)},I=S?h:h||0,R=n&&!r,D=w.useCallback(Z=>{if(n){Z.stopPropagation(),Z.preventDefault();return}Z.currentTarget.focus(),l==null||l(Z)},[n,l]),j=w.useCallback(Z=>{E&&k6(Z)&&(Z.preventDefault(),Z.stopPropagation(),_(!1),T.remove(document,"keyup",j,!1))},[E,T]),z=w.useCallback(Z=>{if(u==null||u(Z),n||Z.defaultPrevented||Z.metaKey||!k6(Z.nativeEvent)||S)return;const W=i&&Z.key==="Enter";o&&Z.key===" "&&(Z.preventDefault(),_(!0)),W&&(Z.preventDefault(),Z.currentTarget.click()),T.add(document,"keyup",j,!1)},[n,S,u,i,o,T,j]),V=w.useCallback(Z=>{if(d==null||d(Z),n||Z.defaultPrevented||Z.metaKey||!k6(Z.nativeEvent)||S)return;o&&Z.key===" "&&(Z.preventDefault(),_(!1),Z.currentTarget.click())},[o,S,n,d]),K=w.useCallback(Z=>{Z.button===0&&(_(!1),T.remove(document,"mouseup",K,!1))},[T]),te=w.useCallback(Z=>{if(Z.button!==0)return;if(n){Z.stopPropagation(),Z.preventDefault();return}S||_(!0),Z.currentTarget.focus({preventScroll:!0}),T.add(document,"mouseup",K,!1),a==null||a(Z)},[n,S,a,T,K]),q=w.useCallback(Z=>{Z.button===0&&(S||_(!1),s==null||s(Z))},[s,S]),F=w.useCallback(Z=>{if(n){Z.preventDefault();return}m==null||m(Z)},[n,m]),U=w.useCallback(Z=>{E&&(Z.preventDefault(),_(!1)),v==null||v(Z)},[E,v]),X=Yn(t,A);return S?{...b,ref:X,type:"button","aria-disabled":R?void 0:n,disabled:R,onClick:D,onMouseDown:a,onMouseUp:s,onKeyUp:d,onKeyDown:u,onMouseOver:m,onMouseLeave:v}:{...b,ref:X,role:"button","data-active":Jme(E),"aria-disabled":n?"true":void 0,tabIndex:R?void 0:I,onClick:D,onMouseDown:te,onMouseUp:q,onKeyUp:V,onKeyDown:z,onMouseOver:F,onMouseLeave:U}}function b$(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function S$(e){if(!b$(e))return!1;const t=e.ownerDocument.defaultView??window;return e instanceof t.HTMLElement}function n0e(e){var t;return((t=x$(e))==null?void 0:t.defaultView)??window}function x$(e){return b$(e)?e.ownerDocument:document}function r0e(e){return x$(e).activeElement}var w$=e=>e.hasAttribute("tabindex"),i0e=e=>w$(e)&&e.tabIndex===-1;function o0e(e){return Boolean(e.getAttribute("disabled"))===!0||Boolean(e.getAttribute("aria-disabled"))===!0}function C$(e){return e.parentElement&&C$(e.parentElement)?!0:e.hidden}function a0e(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function _$(e){if(!S$(e)||C$(e)||o0e(e))return!1;const{localName:t}=e;if(["input","select","textarea","button"].indexOf(t)>=0)return!0;const r={a:()=>e.hasAttribute("href"),audio:()=>e.hasAttribute("controls"),video:()=>e.hasAttribute("controls")};return t in r?r[t]():a0e(e)?!0:w$(e)}function s0e(e){return e?S$(e)&&_$(e)&&!i0e(e):!1}var l0e=["input:not(:disabled):not([disabled])","select:not(:disabled):not([disabled])","textarea:not(:disabled):not([disabled])","embed","iframe","object","a[href]","area[href]","button:not(:disabled):not([disabled])","[tabindex]","audio[controls]","video[controls]","*[tabindex]:not([aria-disabled])","*[contenteditable]"],u0e=l0e.join(),c0e=e=>e.offsetWidth>0&&e.offsetHeight>0;function k$(e){const t=Array.from(e.querySelectorAll(u0e));return t.unshift(e),t.filter(n=>_$(n)&&c0e(n))}function d0e(e){const t=e.current;if(!t)return!1;const n=r0e(t);return!n||t.contains(n)?!1:!!s0e(n)}function f0e(e,t){const{shouldFocus:n,visible:r,focusRef:i}=t,o=n&&!r;Vd(()=>{if(!o||d0e(e))return;const a=(i==null?void 0:i.current)||e.current;a&&requestAnimationFrame(()=>{a.focus()})},[o,e,i])}var h0e={preventScroll:!0,shouldFocus:!1};function p0e(e,t=h0e){const{focusRef:n,preventScroll:r,shouldFocus:i,visible:o}=t,a=g0e(e)?e.current:e,s=i&&o,l=w.useRef(s),u=w.useRef(o);Ws(()=>{!u.current&&o&&(l.current=s),u.current=o},[o,s]);const d=w.useCallback(()=>{if(!(!o||!a||!l.current)&&(l.current=!1,!a.contains(document.activeElement)))if(n!=null&&n.current)requestAnimationFrame(()=>{var h;(h=n.current)==null||h.focus({preventScroll:r})});else{const h=k$(a);h.length>0&&requestAnimationFrame(()=>{h[0].focus({preventScroll:r})})}},[o,r,a,n]);Vd(()=>{d()},[d]),Rh(a,"transitionend",d)}function g0e(e){return"current"in e}var Zo="top",ls="bottom",us="right",Qo="left",vk="auto",Cy=[Zo,ls,us,Qo],Um="start",L2="end",m0e="clippingParents",E$="viewport",G1="popper",v0e="reference",MO=Cy.reduce(function(e,t){return e.concat([t+"-"+Um,t+"-"+L2])},[]),P$=[].concat(Cy,[vk]).reduce(function(e,t){return e.concat([t,t+"-"+Um,t+"-"+L2])},[]),y0e="beforeRead",b0e="read",S0e="afterRead",x0e="beforeMain",w0e="main",C0e="afterMain",_0e="beforeWrite",k0e="write",E0e="afterWrite",P0e=[y0e,b0e,S0e,x0e,w0e,C0e,_0e,k0e,E0e];function au(e){return e?(e.nodeName||"").toLowerCase():null}function hs(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Uh(e){var t=hs(e).Element;return e instanceof t||e instanceof Element}function is(e){var t=hs(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function yk(e){if(typeof ShadowRoot>"u")return!1;var t=hs(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function T0e(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!is(o)||!au(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function L0e(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,u){return l[u]="",l},{});!is(i)||!au(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const A0e={name:"applyStyles",enabled:!0,phase:"write",fn:T0e,effect:L0e,requires:["computeStyles"]};function Zl(e){return e.split("-")[0]}var jh=Math.max,c5=Math.min,Gm=Math.round;function U7(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function T$(){return!/^((?!chrome|android).)*safari/i.test(U7())}function qm(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&is(e)&&(i=e.offsetWidth>0&&Gm(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Gm(r.height)/e.offsetHeight||1);var a=Uh(e)?hs(e):window,s=a.visualViewport,l=!T$()&&n,u=(r.left+(l&&s?s.offsetLeft:0))/i,d=(r.top+(l&&s?s.offsetTop:0))/o,h=r.width/i,m=r.height/o;return{width:h,height:m,top:d,right:u+h,bottom:d+m,left:u,x:u,y:d}}function bk(e){var t=qm(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function L$(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&yk(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function ec(e){return hs(e).getComputedStyle(e)}function O0e(e){return["table","td","th"].indexOf(au(e))>=0}function rf(e){return((Uh(e)?e.ownerDocument:e.document)||window.document).documentElement}function nx(e){return au(e)==="html"?e:e.assignedSlot||e.parentNode||(yk(e)?e.host:null)||rf(e)}function IO(e){return!is(e)||ec(e).position==="fixed"?null:e.offsetParent}function M0e(e){var t=/firefox/i.test(U7()),n=/Trident/i.test(U7());if(n&&is(e)){var r=ec(e);if(r.position==="fixed")return null}var i=nx(e);for(yk(i)&&(i=i.host);is(i)&&["html","body"].indexOf(au(i))<0;){var o=ec(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function _y(e){for(var t=hs(e),n=IO(e);n&&O0e(n)&&ec(n).position==="static";)n=IO(n);return n&&(au(n)==="html"||au(n)==="body"&&ec(n).position==="static")?t:n||M0e(e)||t}function Sk(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function qv(e,t,n){return jh(e,c5(t,n))}function I0e(e,t,n){var r=qv(e,t,n);return r>n?n:r}function A$(){return{top:0,right:0,bottom:0,left:0}}function O$(e){return Object.assign({},A$(),e)}function M$(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var R0e=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,O$(typeof t!="number"?t:M$(t,Cy))};function D0e(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=Zl(n.placement),l=Sk(s),u=[Qo,us].indexOf(s)>=0,d=u?"height":"width";if(!(!o||!a)){var h=R0e(i.padding,n),m=bk(o),v=l==="y"?Zo:Qo,b=l==="y"?ls:us,S=n.rects.reference[d]+n.rects.reference[l]-a[l]-n.rects.popper[d],k=a[l]-n.rects.reference[l],E=_y(o),_=E?l==="y"?E.clientHeight||0:E.clientWidth||0:0,T=S/2-k/2,A=h[v],I=_-m[d]-h[b],R=_/2-m[d]/2+T,D=qv(A,R,I),j=l;n.modifiersData[r]=(t={},t[j]=D,t.centerOffset=D-R,t)}}function N0e(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||L$(t.elements.popper,i)&&(t.elements.arrow=i))}const j0e={name:"arrow",enabled:!0,phase:"main",fn:D0e,effect:N0e,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ym(e){return e.split("-")[1]}var B0e={top:"auto",right:"auto",bottom:"auto",left:"auto"};function F0e(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:Gm(t*i)/i||0,y:Gm(n*i)/i||0}}function RO(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,d=e.roundOffsets,h=e.isFixed,m=a.x,v=m===void 0?0:m,b=a.y,S=b===void 0?0:b,k=typeof d=="function"?d({x:v,y:S}):{x:v,y:S};v=k.x,S=k.y;var E=a.hasOwnProperty("x"),_=a.hasOwnProperty("y"),T=Qo,A=Zo,I=window;if(u){var R=_y(n),D="clientHeight",j="clientWidth";if(R===hs(n)&&(R=rf(n),ec(R).position!=="static"&&s==="absolute"&&(D="scrollHeight",j="scrollWidth")),R=R,i===Zo||(i===Qo||i===us)&&o===L2){A=ls;var z=h&&R===I&&I.visualViewport?I.visualViewport.height:R[D];S-=z-r.height,S*=l?1:-1}if(i===Qo||(i===Zo||i===ls)&&o===L2){T=us;var V=h&&R===I&&I.visualViewport?I.visualViewport.width:R[j];v-=V-r.width,v*=l?1:-1}}var K=Object.assign({position:s},u&&B0e),te=d===!0?F0e({x:v,y:S}):{x:v,y:S};if(v=te.x,S=te.y,l){var q;return Object.assign({},K,(q={},q[A]=_?"0":"",q[T]=E?"0":"",q.transform=(I.devicePixelRatio||1)<=1?"translate("+v+"px, "+S+"px)":"translate3d("+v+"px, "+S+"px, 0)",q))}return Object.assign({},K,(t={},t[A]=_?S+"px":"",t[T]=E?v+"px":"",t.transform="",t))}function $0e(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s,u={placement:Zl(t.placement),variation:Ym(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,RO(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,RO(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const z0e={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:$0e,data:{}};var eb={passive:!0};function H0e(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=hs(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(d){d.addEventListener("scroll",n.update,eb)}),s&&l.addEventListener("resize",n.update,eb),function(){o&&u.forEach(function(d){d.removeEventListener("scroll",n.update,eb)}),s&&l.removeEventListener("resize",n.update,eb)}}const V0e={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:H0e,data:{}};var W0e={left:"right",right:"left",bottom:"top",top:"bottom"};function h4(e){return e.replace(/left|right|bottom|top/g,function(t){return W0e[t]})}var U0e={start:"end",end:"start"};function DO(e){return e.replace(/start|end/g,function(t){return U0e[t]})}function xk(e){var t=hs(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function wk(e){return qm(rf(e)).left+xk(e).scrollLeft}function G0e(e,t){var n=hs(e),r=rf(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var u=T$();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+wk(e),y:l}}function q0e(e){var t,n=rf(e),r=xk(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=jh(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=jh(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+wk(e),l=-r.scrollTop;return ec(i||n).direction==="rtl"&&(s+=jh(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function Ck(e){var t=ec(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function I$(e){return["html","body","#document"].indexOf(au(e))>=0?e.ownerDocument.body:is(e)&&Ck(e)?e:I$(nx(e))}function Yv(e,t){var n;t===void 0&&(t=[]);var r=I$(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=hs(r),a=i?[o].concat(o.visualViewport||[],Ck(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(Yv(nx(a)))}function G7(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Y0e(e,t){var n=qm(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function NO(e,t,n){return t===E$?G7(G0e(e,n)):Uh(t)?Y0e(t,n):G7(q0e(rf(e)))}function K0e(e){var t=Yv(nx(e)),n=["absolute","fixed"].indexOf(ec(e).position)>=0,r=n&&is(e)?_y(e):e;return Uh(r)?t.filter(function(i){return Uh(i)&&L$(i,r)&&au(i)!=="body"}):[]}function X0e(e,t,n,r){var i=t==="clippingParents"?K0e(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,u){var d=NO(e,u,r);return l.top=jh(d.top,l.top),l.right=c5(d.right,l.right),l.bottom=c5(d.bottom,l.bottom),l.left=jh(d.left,l.left),l},NO(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function R$(e){var t=e.reference,n=e.element,r=e.placement,i=r?Zl(r):null,o=r?Ym(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Zo:l={x:a,y:t.y-n.height};break;case ls:l={x:a,y:t.y+t.height};break;case us:l={x:t.x+t.width,y:s};break;case Qo:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var u=i?Sk(i):null;if(u!=null){var d=u==="y"?"height":"width";switch(o){case Um:l[u]=l[u]-(t[d]/2-n[d]/2);break;case L2:l[u]=l[u]+(t[d]/2-n[d]/2);break}}return l}function A2(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,a=o===void 0?e.strategy:o,s=n.boundary,l=s===void 0?m0e:s,u=n.rootBoundary,d=u===void 0?E$:u,h=n.elementContext,m=h===void 0?G1:h,v=n.altBoundary,b=v===void 0?!1:v,S=n.padding,k=S===void 0?0:S,E=O$(typeof k!="number"?k:M$(k,Cy)),_=m===G1?v0e:G1,T=e.rects.popper,A=e.elements[b?_:m],I=X0e(Uh(A)?A:A.contextElement||rf(e.elements.popper),l,d,a),R=qm(e.elements.reference),D=R$({reference:R,element:T,strategy:"absolute",placement:i}),j=G7(Object.assign({},T,D)),z=m===G1?j:R,V={top:I.top-z.top+E.top,bottom:z.bottom-I.bottom+E.bottom,left:I.left-z.left+E.left,right:z.right-I.right+E.right},K=e.modifiersData.offset;if(m===G1&&K){var te=K[i];Object.keys(V).forEach(function(q){var F=[us,ls].indexOf(q)>=0?1:-1,U=[Zo,ls].indexOf(q)>=0?"y":"x";V[q]+=te[U]*F})}return V}function Z0e(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?P$:l,d=Ym(r),h=d?s?MO:MO.filter(function(b){return Ym(b)===d}):Cy,m=h.filter(function(b){return u.indexOf(b)>=0});m.length===0&&(m=h);var v=m.reduce(function(b,S){return b[S]=A2(e,{placement:S,boundary:i,rootBoundary:o,padding:a})[Zl(S)],b},{});return Object.keys(v).sort(function(b,S){return v[b]-v[S]})}function Q0e(e){if(Zl(e)===vk)return[];var t=h4(e);return[DO(e),t,DO(t)]}function J0e(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,u=n.padding,d=n.boundary,h=n.rootBoundary,m=n.altBoundary,v=n.flipVariations,b=v===void 0?!0:v,S=n.allowedAutoPlacements,k=t.options.placement,E=Zl(k),_=E===k,T=l||(_||!b?[h4(k)]:Q0e(k)),A=[k].concat(T).reduce(function(ye,He){return ye.concat(Zl(He)===vk?Z0e(t,{placement:He,boundary:d,rootBoundary:h,padding:u,flipVariations:b,allowedAutoPlacements:S}):He)},[]),I=t.rects.reference,R=t.rects.popper,D=new Map,j=!0,z=A[0],V=0;V =0,U=F?"width":"height",X=A2(t,{placement:K,boundary:d,rootBoundary:h,altBoundary:m,padding:u}),Z=F?q?us:Qo:q?ls:Zo;I[U]>R[U]&&(Z=h4(Z));var W=h4(Z),Q=[];if(o&&Q.push(X[te]<=0),s&&Q.push(X[Z]<=0,X[W]<=0),Q.every(function(ye){return ye})){z=K,j=!1;break}D.set(K,Q)}if(j)for(var ie=b?3:1,fe=function(He){var Ne=A.find(function(tt){var _e=D.get(tt);if(_e)return _e.slice(0,He).every(function(lt){return lt})});if(Ne)return z=Ne,"break"},Se=ie;Se>0;Se--){var Te=fe(Se);if(Te==="break")break}t.placement!==z&&(t.modifiersData[r]._skip=!0,t.placement=z,t.reset=!0)}}const e1e={name:"flip",enabled:!0,phase:"main",fn:J0e,requiresIfExists:["offset"],data:{_skip:!1}};function jO(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function BO(e){return[Zo,us,ls,Qo].some(function(t){return e[t]>=0})}function t1e(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=A2(t,{elementContext:"reference"}),s=A2(t,{altBoundary:!0}),l=jO(a,r),u=jO(s,i,o),d=BO(l),h=BO(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:d,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":h})}const n1e={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:t1e};function r1e(e,t,n){var r=Zl(e),i=[Qo,Zo].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Qo,us].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function i1e(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=P$.reduce(function(d,h){return d[h]=r1e(h,t.rects,o),d},{}),s=a[t.placement],l=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}const o1e={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:i1e};function a1e(e){var t=e.state,n=e.name;t.modifiersData[n]=R$({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const s1e={name:"popperOffsets",enabled:!0,phase:"read",fn:a1e,data:{}};function l1e(e){return e==="x"?"y":"x"}function u1e(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,u=n.rootBoundary,d=n.altBoundary,h=n.padding,m=n.tether,v=m===void 0?!0:m,b=n.tetherOffset,S=b===void 0?0:b,k=A2(t,{boundary:l,rootBoundary:u,padding:h,altBoundary:d}),E=Zl(t.placement),_=Ym(t.placement),T=!_,A=Sk(E),I=l1e(A),R=t.modifiersData.popperOffsets,D=t.rects.reference,j=t.rects.popper,z=typeof S=="function"?S(Object.assign({},t.rects,{placement:t.placement})):S,V=typeof z=="number"?{mainAxis:z,altAxis:z}:Object.assign({mainAxis:0,altAxis:0},z),K=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,te={x:0,y:0};if(R){if(o){var q,F=A==="y"?Zo:Qo,U=A==="y"?ls:us,X=A==="y"?"height":"width",Z=R[A],W=Z+k[F],Q=Z-k[U],ie=v?-j[X]/2:0,fe=_===Um?D[X]:j[X],Se=_===Um?-j[X]:-D[X],Te=t.elements.arrow,ye=v&&Te?bk(Te):{width:0,height:0},He=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:A$(),Ne=He[F],tt=He[U],_e=qv(0,D[X],ye[X]),lt=T?D[X]/2-ie-_e-Ne-V.mainAxis:fe-_e-Ne-V.mainAxis,wt=T?-D[X]/2+ie+_e+tt+V.mainAxis:Se+_e+tt+V.mainAxis,ct=t.elements.arrow&&_y(t.elements.arrow),mt=ct?A==="y"?ct.clientTop||0:ct.clientLeft||0:0,St=(q=K==null?void 0:K[A])!=null?q:0,Ae=Z+lt-St-mt,ut=Z+wt-St,Mt=qv(v?c5(W,Ae):W,Z,v?jh(Q,ut):Q);R[A]=Mt,te[A]=Mt-Z}if(s){var at,Ct=A==="x"?Zo:Qo,Zt=A==="x"?ls:us,le=R[I],De=I==="y"?"height":"width",Ue=le+k[Ct],Ye=le-k[Zt],we=[Zo,Qo].indexOf(E)!==-1,je=(at=K==null?void 0:K[I])!=null?at:0,_t=we?Ue:le-D[De]-j[De]-je+V.altAxis,Dt=we?le+D[De]+j[De]-je-V.altAxis:Ye,Le=v&&we?I0e(_t,le,Dt):qv(v?_t:Ue,le,v?Dt:Ye);R[I]=Le,te[I]=Le-le}t.modifiersData[r]=te}}const c1e={name:"preventOverflow",enabled:!0,phase:"main",fn:u1e,requiresIfExists:["offset"]};function d1e(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function f1e(e){return e===hs(e)||!is(e)?xk(e):d1e(e)}function h1e(e){var t=e.getBoundingClientRect(),n=Gm(t.width)/e.offsetWidth||1,r=Gm(t.height)/e.offsetHeight||1;return n!==1||r!==1}function p1e(e,t,n){n===void 0&&(n=!1);var r=is(t),i=is(t)&&h1e(t),o=rf(t),a=qm(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((au(t)!=="body"||Ck(o))&&(s=f1e(t)),is(t)?(l=qm(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=wk(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function g1e(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function m1e(e){var t=g1e(e);return P0e.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function v1e(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function y1e(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var FO={placement:"bottom",modifiers:[],strategy:"absolute"};function $O(){for(var e=arguments.length,t=new Array(e),n=0;n({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),oi={arrowShadowColor:_g("--popper-arrow-shadow-color"),arrowSize:_g("--popper-arrow-size","8px"),arrowSizeHalf:_g("--popper-arrow-size-half"),arrowBg:_g("--popper-arrow-bg"),transformOrigin:_g("--popper-transform-origin"),arrowOffset:_g("--popper-arrow-offset")};function w1e(e){if(e.includes("top"))return"1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("bottom"))return"-1px -1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("right"))return"-1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("left"))return"1px -1px 1px 0 var(--popper-arrow-shadow-color)"}var C1e={top:"bottom center","top-start":"bottom left","top-end":"bottom right",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"right top","left-end":"right bottom",right:"left center","right-start":"left top","right-end":"left bottom"},_1e=e=>C1e[e],zO={scroll:!0,resize:!0};function k1e(e){let t;return typeof e=="object"?t={enabled:!0,options:{...zO,...e}}:t={enabled:e,options:zO},t}var E1e={name:"matchWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:e})=>{e.styles.popper.width=`${e.rects.reference.width}px`},effect:({state:e})=>()=>{const t=e.elements.reference;e.elements.popper.style.width=`${t.offsetWidth}px`}},P1e={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{HO(e)},effect:({state:e})=>()=>{HO(e)}},HO=e=>{e.elements.popper.style.setProperty(oi.transformOrigin.var,_1e(e.placement))},T1e={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{L1e(e)}},L1e=e=>{var t;if(!e.placement)return;const n=A1e(e.placement);if((t=e.elements)!=null&&t.arrow&&n){Object.assign(e.elements.arrow.style,{[n.property]:n.value,width:oi.arrowSize.varRef,height:oi.arrowSize.varRef,zIndex:-1});const r={[oi.arrowSizeHalf.var]:`calc(${oi.arrowSize.varRef} / 2)`,[oi.arrowOffset.var]:`calc(${oi.arrowSizeHalf.varRef} * -1)`};for(const i in r)e.elements.arrow.style.setProperty(i,r[i])}},A1e=e=>{if(e.startsWith("top"))return{property:"bottom",value:oi.arrowOffset.varRef};if(e.startsWith("bottom"))return{property:"top",value:oi.arrowOffset.varRef};if(e.startsWith("left"))return{property:"right",value:oi.arrowOffset.varRef};if(e.startsWith("right"))return{property:"left",value:oi.arrowOffset.varRef}},O1e={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{VO(e)},effect:({state:e})=>()=>{VO(e)}},VO=e=>{if(!e.elements.arrow)return;const t=e.elements.arrow.querySelector("[data-popper-arrow-inner]");t&&Object.assign(t.style,{transform:"rotate(45deg)",background:oi.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:w1e(e.placement)})},M1e={"start-start":{ltr:"left-start",rtl:"right-start"},"start-end":{ltr:"left-end",rtl:"right-end"},"end-start":{ltr:"right-start",rtl:"left-start"},"end-end":{ltr:"right-end",rtl:"left-end"},start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}},I1e={"auto-start":"auto-end","auto-end":"auto-start","top-start":"top-end","top-end":"top-start","bottom-start":"bottom-end","bottom-end":"bottom-start"};function R1e(e,t="ltr"){var n;const r=((n=M1e[e])==null?void 0:n[t])||e;return t==="ltr"?r:I1e[e]??r}function D$(e={}){const{enabled:t=!0,modifiers:n,placement:r="bottom",strategy:i="absolute",arrowPadding:o=8,eventListeners:a=!0,offset:s,gutter:l=8,flip:u=!0,boundary:d="clippingParents",preventOverflow:h=!0,matchWidth:m,direction:v="ltr"}=e,b=w.useRef(null),S=w.useRef(null),k=w.useRef(null),E=R1e(r,v),_=w.useRef(()=>{}),T=w.useCallback(()=>{var V;!t||!b.current||!S.current||((V=_.current)==null||V.call(_),k.current=x1e(b.current,S.current,{placement:E,modifiers:[O1e,T1e,P1e,{...E1e,enabled:!!m},{name:"eventListeners",...k1e(a)},{name:"arrow",options:{padding:o}},{name:"offset",options:{offset:s??[0,l]}},{name:"flip",enabled:!!u,options:{padding:8}},{name:"preventOverflow",enabled:!!h,options:{boundary:d}},...n??[]],strategy:i}),k.current.forceUpdate(),_.current=k.current.destroy)},[E,t,n,m,a,o,s,l,u,h,d,i]);w.useEffect(()=>()=>{var V;!b.current&&!S.current&&((V=k.current)==null||V.destroy(),k.current=null)},[]);const A=w.useCallback(V=>{b.current=V,T()},[T]),I=w.useCallback((V={},K=null)=>({...V,ref:Yn(A,K)}),[A]),R=w.useCallback(V=>{S.current=V,T()},[T]),D=w.useCallback((V={},K=null)=>({...V,ref:Yn(R,K),style:{...V.style,position:i,minWidth:m?void 0:"max-content",inset:"0 auto auto 0"}}),[i,R,m]),j=w.useCallback((V={},K=null)=>{const{size:te,shadowColor:q,bg:F,style:U,...X}=V;return{...X,ref:K,"data-popper-arrow":"",style:D1e(V)}},[]),z=w.useCallback((V={},K=null)=>({...V,ref:K,"data-popper-arrow-inner":""}),[]);return{update(){var V;(V=k.current)==null||V.update()},forceUpdate(){var V;(V=k.current)==null||V.forceUpdate()},transformOrigin:oi.transformOrigin.varRef,referenceRef:A,popperRef:R,getPopperProps:D,getArrowProps:j,getArrowInnerProps:z,getReferenceProps:I}}function D1e(e){const{size:t,shadowColor:n,bg:r,style:i}=e,o={...i,position:"absolute"};return t&&(o["--popper-arrow-size"]=t),n&&(o["--popper-arrow-shadow-color"]=n),r&&(o["--popper-arrow-bg"]=r),o}function N$(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=Er(n),a=Er(t),[s,l]=w.useState(e.defaultIsOpen||!1),u=r!==void 0?r:s,d=r!==void 0,h=w.useId(),m=i??`disclosure-${h}`,v=w.useCallback(()=>{d||l(!1),a==null||a()},[d,a]),b=w.useCallback(()=>{d||l(!0),o==null||o()},[d,o]),S=w.useCallback(()=>{u?v():b()},[u,b,v]);function k(_={}){return{..._,"aria-expanded":u,"aria-controls":m,onClick(T){var A;(A=_.onClick)==null||A.call(_,T),S()}}}function E(_={}){return{..._,hidden:!u,id:m}}return{isOpen:u,onOpen:b,onClose:v,onToggle:S,isControlled:d,getButtonProps:k,getDisclosureProps:E}}function N1e(e){const{isOpen:t,ref:n}=e,[r,i]=w.useState(t),[o,a]=w.useState(!1);return w.useEffect(()=>{o||(i(t),a(!0))},[t,o,r]),Rh(()=>n.current,"animationend",()=>{i(t)}),{present:!(t?!1:!r),onComplete(){var l;const u=n0e(n.current),d=new u.CustomEvent("animationend",{bubbles:!0});(l=n.current)==null||l.dispatchEvent(d)}}}function j$(e){const{wasSelected:t,enabled:n,isSelected:r,mode:i="unmount"}=e;return!!(!n||r||i==="keepMounted"&&t)}var Qs={},j1e={get exports(){return Qs},set exports(e){Qs=e}},Na={},Bh={},B1e={get exports(){return Bh},set exports(e){Bh=e}},B$={};/**
+ * @license React
+ * scheduler.production.min.js
+ *
+ * Copyright (c) Facebook, Inc. and its affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */(function(e){function t(W,Q){var ie=W.length;W.push(Q);e:for(;0>>1,Se=W[fe];if(0>>1;fei(He,ie))Nei(tt,He)?(W[fe]=tt,W[Ne]=ie,fe=Ne):(W[fe]=He,W[ye]=ie,fe=ye);else if(Nei(tt,ie))W[fe]=tt,W[Ne]=ie,fe=Ne;else break e}}return Q}function i(W,Q){var ie=W.sortIndex-Q.sortIndex;return ie!==0?ie:W.id-Q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],u=[],d=1,h=null,m=3,v=!1,b=!1,S=!1,k=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function T(W){for(var Q=n(u);Q!==null;){if(Q.callback===null)r(u);else if(Q.startTime<=W)r(u),Q.sortIndex=Q.expirationTime,t(l,Q);else break;Q=n(u)}}function A(W){if(S=!1,T(W),!b)if(n(l)!==null)b=!0,X(I);else{var Q=n(u);Q!==null&&Z(A,Q.startTime-W)}}function I(W,Q){b=!1,S&&(S=!1,E(j),j=-1),v=!0;var ie=m;try{for(T(Q),h=n(l);h!==null&&(!(h.expirationTime>Q)||W&&!K());){var fe=h.callback;if(typeof fe=="function"){h.callback=null,m=h.priorityLevel;var Se=fe(h.expirationTime<=Q);Q=e.unstable_now(),typeof Se=="function"?h.callback=Se:h===n(l)&&r(l),T(Q)}else r(l);h=n(l)}if(h!==null)var Te=!0;else{var ye=n(u);ye!==null&&Z(A,ye.startTime-Q),Te=!1}return Te}finally{h=null,m=ie,v=!1}}var R=!1,D=null,j=-1,z=5,V=-1;function K(){return!(e.unstable_now()-VW||125fe?(W.sortIndex=ie,t(u,W),n(l)===null&&W===n(u)&&(S?(E(j),j=-1):S=!0,Z(A,ie-fe))):(W.sortIndex=Se,t(l,W),b||v||(b=!0,X(I))),W},e.unstable_shouldYield=K,e.unstable_wrapCallback=function(W){var Q=m;return function(){var ie=m;m=Q;try{return W.apply(this,arguments)}finally{m=ie}}}})(B$);(function(e){e.exports=B$})(B1e);/**
+ * @license React
+ * react-dom.production.min.js
+ *
+ * Copyright (c) Facebook, Inc. and its affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */var F$=w,Ma=Bh;function $e(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),q7=Object.prototype.hasOwnProperty,F1e=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,WO={},UO={};function $1e(e){return q7.call(UO,e)?!0:q7.call(WO,e)?!1:F1e.test(e)?UO[e]=!0:(WO[e]=!0,!1)}function z1e(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function H1e(e,t,n,r){if(t===null||typeof t>"u"||z1e(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Oo(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var qi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){qi[e]=new Oo(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];qi[t]=new Oo(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){qi[e]=new Oo(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){qi[e]=new Oo(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){qi[e]=new Oo(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){qi[e]=new Oo(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){qi[e]=new Oo(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){qi[e]=new Oo(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){qi[e]=new Oo(e,5,!1,e.toLowerCase(),null,!1,!1)});var _k=/[\-:]([a-z])/g;function kk(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(_k,kk);qi[t]=new Oo(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(_k,kk);qi[t]=new Oo(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(_k,kk);qi[t]=new Oo(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){qi[e]=new Oo(e,1,!1,e.toLowerCase(),null,!1,!1)});qi.xlinkHref=new Oo("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){qi[e]=new Oo(e,1,!1,e.toLowerCase(),null,!0,!0)});function Ek(e,t,n,r){var i=qi.hasOwnProperty(t)?qi[t]:null;(i!==null?i.type!==0:r||!(2s||i[a]!==o[s]){var l=`
+`+i[a].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{P6=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?yv(e):""}function V1e(e){switch(e.tag){case 5:return yv(e.type);case 16:return yv("Lazy");case 13:return yv("Suspense");case 19:return yv("SuspenseList");case 0:case 2:case 15:return e=T6(e.type,!1),e;case 11:return e=T6(e.type.render,!1),e;case 1:return e=T6(e.type,!0),e;default:return""}}function Z7(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Kg:return"Fragment";case Yg:return"Portal";case Y7:return"Profiler";case Pk:return"StrictMode";case K7:return"Suspense";case X7:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case H$:return(e.displayName||"Context")+".Consumer";case z$:return(e._context.displayName||"Context")+".Provider";case Tk:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Lk:return t=e.displayName||null,t!==null?t:Z7(e.type)||"Memo";case pd:t=e._payload,e=e._init;try{return Z7(e(t))}catch{}}return null}function W1e(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Z7(t);case 8:return t===Pk?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Ud(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function W$(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function U1e(e){var t=W$(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function nb(e){e._valueTracker||(e._valueTracker=U1e(e))}function U$(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=W$(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function d5(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Q7(e,t){var n=t.checked;return Tr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function qO(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Ud(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function G$(e,t){t=t.checked,t!=null&&Ek(e,"checked",t,!1)}function J7(e,t){G$(e,t);var n=Ud(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?e9(e,t.type,n):t.hasOwnProperty("defaultValue")&&e9(e,t.type,Ud(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function YO(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function e9(e,t,n){(t!=="number"||d5(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var bv=Array.isArray;function _m(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=rb.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function M2(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Kv={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},G1e=["Webkit","ms","Moz","O"];Object.keys(Kv).forEach(function(e){G1e.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Kv[t]=Kv[e]})});function X$(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Kv.hasOwnProperty(e)&&Kv[e]?(""+t).trim():t+"px"}function Z$(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=X$(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var q1e=Tr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function r9(e,t){if(t){if(q1e[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error($e(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error($e(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error($e(61))}if(t.style!=null&&typeof t.style!="object")throw Error($e(62))}}function i9(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var o9=null;function Ak(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var a9=null,km=null,Em=null;function ZO(e){if(e=Py(e)){if(typeof a9!="function")throw Error($e(280));var t=e.stateNode;t&&(t=sx(t),a9(e.stateNode,e.type,t))}}function Q$(e){km?Em?Em.push(e):Em=[e]:km=e}function J$(){if(km){var e=km,t=Em;if(Em=km=null,ZO(e),t)for(e=0;e>>=0,e===0?32:31-(ive(e)/ove|0)|0}var ib=64,ob=4194304;function Sv(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function g5(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~i;s!==0?r=Sv(s):(o&=a,o!==0&&(r=Sv(o)))}else a=n&~i,a!==0?r=Sv(a):o!==0&&(r=Sv(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function ky(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ys(t),e[t]=n}function uve(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Zv),aM=String.fromCharCode(32),sM=!1;function bz(e,t){switch(e){case"keyup":return jve.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Sz(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Xg=!1;function Fve(e,t){switch(e){case"compositionend":return Sz(t);case"keypress":return t.which!==32?null:(sM=!0,aM);case"textInput":return e=t.data,e===aM&&sM?null:e;default:return null}}function $ve(e,t){if(Xg)return e==="compositionend"||!Bk&&bz(e,t)?(e=vz(),g4=Dk=_d=null,Xg=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=dM(n)}}function _z(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?_z(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function kz(){for(var e=window,t=d5();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=d5(e.document)}return t}function Fk(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Kve(e){var t=kz(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&_z(n.ownerDocument.documentElement,n)){if(r!==null&&Fk(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=fM(n,o);var a=fM(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Zg=null,f9=null,Jv=null,h9=!1;function hM(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;h9||Zg==null||Zg!==d5(r)||(r=Zg,"selectionStart"in r&&Fk(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Jv&&B2(Jv,r)||(Jv=r,r=y5(f9,"onSelect"),0em||(e.current=b9[em],b9[em]=null,em--)}function nr(e,t){em++,b9[em]=e.current,e.current=t}var Gd={},so=af(Gd),Jo=af(!1),Gh=Gd;function Xm(e,t){var n=e.type.contextTypes;if(!n)return Gd;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function ea(e){return e=e.childContextTypes,e!=null}function S5(){fr(Jo),fr(so)}function SM(e,t,n){if(so.current!==Gd)throw Error($e(168));nr(so,t),nr(Jo,n)}function Rz(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error($e(108,W1e(e)||"Unknown",i));return Tr({},n,r)}function x5(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Gd,Gh=so.current,nr(so,e),nr(Jo,Jo.current),!0}function xM(e,t,n){var r=e.stateNode;if(!r)throw Error($e(169));n?(e=Rz(e,t,Gh),r.__reactInternalMemoizedMergedChildContext=e,fr(Jo),fr(so),nr(so,e)):fr(Jo),nr(Jo,n)}var Hu=null,lx=!1,H6=!1;function Dz(e){Hu===null?Hu=[e]:Hu.push(e)}function s2e(e){lx=!0,Dz(e)}function sf(){if(!H6&&Hu!==null){H6=!0;var e=0,t=Bn;try{var n=Hu;for(Bn=1;e>=a,i-=a,Uu=1<<32-Ys(t)+i|n<j?(z=D,D=null):z=D.sibling;var V=m(E,D,T[j],A);if(V===null){D===null&&(D=z);break}e&&D&&V.alternate===null&&t(E,D),_=o(V,_,j),R===null?I=V:R.sibling=V,R=V,D=z}if(j===T.length)return n(E,D),yr&&dh(E,j),I;if(D===null){for(;jj?(z=D,D=null):z=D.sibling;var K=m(E,D,V.value,A);if(K===null){D===null&&(D=z);break}e&&D&&K.alternate===null&&t(E,D),_=o(K,_,j),R===null?I=K:R.sibling=K,R=K,D=z}if(V.done)return n(E,D),yr&&dh(E,j),I;if(D===null){for(;!V.done;j++,V=T.next())V=h(E,V.value,A),V!==null&&(_=o(V,_,j),R===null?I=V:R.sibling=V,R=V);return yr&&dh(E,j),I}for(D=r(E,D);!V.done;j++,V=T.next())V=v(D,E,j,V.value,A),V!==null&&(e&&V.alternate!==null&&D.delete(V.key===null?j:V.key),_=o(V,_,j),R===null?I=V:R.sibling=V,R=V);return e&&D.forEach(function(te){return t(E,te)}),yr&&dh(E,j),I}function k(E,_,T,A){if(typeof T=="object"&&T!==null&&T.type===Kg&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case tb:e:{for(var I=T.key,R=_;R!==null;){if(R.key===I){if(I=T.type,I===Kg){if(R.tag===7){n(E,R.sibling),_=i(R,T.props.children),_.return=E,E=_;break e}}else if(R.elementType===I||typeof I=="object"&&I!==null&&I.$$typeof===pd&&TM(I)===R.type){n(E,R.sibling),_=i(R,T.props),_.ref=Q1(E,R,T),_.return=E,E=_;break e}n(E,R);break}else t(E,R);R=R.sibling}T.type===Kg?(_=$h(T.props.children,E.mode,A,T.key),_.return=E,E=_):(A=C4(T.type,T.key,T.props,null,E.mode,A),A.ref=Q1(E,_,T),A.return=E,E=A)}return a(E);case Yg:e:{for(R=T.key;_!==null;){if(_.key===R)if(_.tag===4&&_.stateNode.containerInfo===T.containerInfo&&_.stateNode.implementation===T.implementation){n(E,_.sibling),_=i(_,T.children||[]),_.return=E,E=_;break e}else{n(E,_);break}else t(E,_);_=_.sibling}_=X6(T,E.mode,A),_.return=E,E=_}return a(E);case pd:return R=T._init,k(E,_,R(T._payload),A)}if(bv(T))return b(E,_,T,A);if(q1(T))return S(E,_,T,A);fb(E,T)}return typeof T=="string"&&T!==""||typeof T=="number"?(T=""+T,_!==null&&_.tag===6?(n(E,_.sibling),_=i(_,T),_.return=E,E=_):(n(E,_),_=K6(T,E.mode,A),_.return=E,E=_),a(E)):n(E,_)}return k}var Qm=Vz(!0),Wz=Vz(!1),Ty={},Jl=af(Ty),H2=af(Ty),V2=af(Ty);function Ph(e){if(e===Ty)throw Error($e(174));return e}function Yk(e,t){switch(nr(V2,t),nr(H2,e),nr(Jl,Ty),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:n9(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=n9(t,e)}fr(Jl),nr(Jl,t)}function Jm(){fr(Jl),fr(H2),fr(V2)}function Uz(e){Ph(V2.current);var t=Ph(Jl.current),n=n9(t,e.type);t!==n&&(nr(H2,e),nr(Jl,n))}function Kk(e){H2.current===e&&(fr(Jl),fr(H2))}var _r=af(0);function P5(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var V6=[];function Xk(){for(var e=0;en?n:4,e(!0);var r=W6.transition;W6.transition={};try{e(!1),t()}finally{Bn=n,W6.transition=r}}function sH(){return ds().memoizedState}function d2e(e,t,n){var r=Dd(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},lH(e))uH(t,n);else if(n=Fz(e,t,n,r),n!==null){var i=Po();Ks(n,e,r,i),cH(n,t,r)}}function f2e(e,t,n){var r=Dd(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(lH(e))uH(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,Js(s,a)){var l=t.interleaved;l===null?(i.next=i,Gk(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=Fz(e,t,i,r),n!==null&&(i=Po(),Ks(n,e,r,i),cH(n,t,r))}}function lH(e){var t=e.alternate;return e===Pr||t!==null&&t===Pr}function uH(e,t){e2=T5=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function cH(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Mk(e,n)}}var L5={readContext:cs,useCallback:Qi,useContext:Qi,useEffect:Qi,useImperativeHandle:Qi,useInsertionEffect:Qi,useLayoutEffect:Qi,useMemo:Qi,useReducer:Qi,useRef:Qi,useState:Qi,useDebugValue:Qi,useDeferredValue:Qi,useTransition:Qi,useMutableSource:Qi,useSyncExternalStore:Qi,useId:Qi,unstable_isNewReconciler:!1},h2e={readContext:cs,useCallback:function(e,t){return Dl().memoizedState=[e,t===void 0?null:t],e},useContext:cs,useEffect:AM,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,b4(4194308,4,nH.bind(null,t,e),n)},useLayoutEffect:function(e,t){return b4(4194308,4,e,t)},useInsertionEffect:function(e,t){return b4(4,2,e,t)},useMemo:function(e,t){var n=Dl();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Dl();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=d2e.bind(null,Pr,e),[r.memoizedState,e]},useRef:function(e){var t=Dl();return e={current:e},t.memoizedState=e},useState:LM,useDebugValue:tE,useDeferredValue:function(e){return Dl().memoizedState=e},useTransition:function(){var e=LM(!1),t=e[0];return e=c2e.bind(null,e[1]),Dl().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Pr,i=Dl();if(yr){if(n===void 0)throw Error($e(407));n=n()}else{if(n=t(),Li===null)throw Error($e(349));Yh&30||Yz(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,AM(Xz.bind(null,r,o,e),[e]),r.flags|=2048,G2(9,Kz.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Dl(),t=Li.identifierPrefix;if(yr){var n=Gu,r=Uu;n=(r&~(1<<32-Ys(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=W2++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[zl]=t,e[z2]=r,bH(e,t,!1,!1),t.stateNode=e;e:{switch(a=i9(n,r),n){case"dialog":or("cancel",e),or("close",e),i=r;break;case"iframe":case"object":case"embed":or("load",e),i=r;break;case"video":case"audio":for(i=0;it0&&(t.flags|=128,r=!0,J1(o,!1),t.lanes=4194304)}else{if(!r)if(e=P5(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),J1(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!yr)return Ji(t),null}else 2*Zr()-o.renderingStartTime>t0&&n!==1073741824&&(t.flags|=128,r=!0,J1(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Zr(),t.sibling=null,n=_r.current,nr(_r,r?n&1|2:n&1),t):(Ji(t),null);case 22:case 23:return sE(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?_a&1073741824&&(Ji(t),t.subtreeFlags&6&&(t.flags|=8192)):Ji(t),null;case 24:return null;case 25:return null}throw Error($e(156,t.tag))}function x2e(e,t){switch(zk(t),t.tag){case 1:return ea(t.type)&&S5(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Jm(),fr(Jo),fr(so),Xk(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Kk(t),null;case 13:if(fr(_r),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error($e(340));Zm()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return fr(_r),null;case 4:return Jm(),null;case 10:return Uk(t.type._context),null;case 22:case 23:return sE(),null;case 24:return null;default:return null}}var pb=!1,io=!1,w2e=typeof WeakSet=="function"?WeakSet:Set,ht=null;function im(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Fr(e,t,r)}else n.current=null}function O9(e,t,n){try{n()}catch(r){Fr(e,t,r)}}var FM=!1;function C2e(e,t){if(p9=m5,e=kz(),Fk(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,s=-1,l=-1,u=0,d=0,h=e,m=null;t:for(;;){for(var v;h!==n||i!==0&&h.nodeType!==3||(s=a+i),h!==o||r!==0&&h.nodeType!==3||(l=a+r),h.nodeType===3&&(a+=h.nodeValue.length),(v=h.firstChild)!==null;)m=h,h=v;for(;;){if(h===e)break t;if(m===n&&++u===i&&(s=a),m===o&&++d===r&&(l=a),(v=h.nextSibling)!==null)break;h=m,m=h.parentNode}h=v}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(g9={focusedElem:e,selectionRange:n},m5=!1,ht=t;ht!==null;)if(t=ht,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ht=e;else for(;ht!==null;){t=ht;try{var b=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(b!==null){var S=b.memoizedProps,k=b.memoizedState,E=t.stateNode,_=E.getSnapshotBeforeUpdate(t.elementType===t.type?S:Ns(t.type,S),k);E.__reactInternalSnapshotBeforeUpdate=_}break;case 3:var T=t.stateNode.containerInfo;T.nodeType===1?T.textContent="":T.nodeType===9&&T.documentElement&&T.removeChild(T.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error($e(163))}}catch(A){Fr(t,t.return,A)}if(e=t.sibling,e!==null){e.return=t.return,ht=e;break}ht=t.return}return b=FM,FM=!1,b}function t2(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&O9(t,n,o)}i=i.next}while(i!==r)}}function dx(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function M9(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function wH(e){var t=e.alternate;t!==null&&(e.alternate=null,wH(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[zl],delete t[z2],delete t[y9],delete t[o2e],delete t[a2e])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function CH(e){return e.tag===5||e.tag===3||e.tag===4}function $M(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||CH(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function I9(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=b5));else if(r!==4&&(e=e.child,e!==null))for(I9(e,t,n),e=e.sibling;e!==null;)I9(e,t,n),e=e.sibling}function R9(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(R9(e,t,n),e=e.sibling;e!==null;)R9(e,t,n),e=e.sibling}var Hi=null,js=!1;function sd(e,t,n){for(n=n.child;n!==null;)_H(e,t,n),n=n.sibling}function _H(e,t,n){if(Ql&&typeof Ql.onCommitFiberUnmount=="function")try{Ql.onCommitFiberUnmount(rx,n)}catch{}switch(n.tag){case 5:io||im(n,t);case 6:var r=Hi,i=js;Hi=null,sd(e,t,n),Hi=r,js=i,Hi!==null&&(js?(e=Hi,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Hi.removeChild(n.stateNode));break;case 18:Hi!==null&&(js?(e=Hi,n=n.stateNode,e.nodeType===8?z6(e.parentNode,n):e.nodeType===1&&z6(e,n),N2(e)):z6(Hi,n.stateNode));break;case 4:r=Hi,i=js,Hi=n.stateNode.containerInfo,js=!0,sd(e,t,n),Hi=r,js=i;break;case 0:case 11:case 14:case 15:if(!io&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&(o&2||o&4)&&O9(n,t,a),i=i.next}while(i!==r)}sd(e,t,n);break;case 1:if(!io&&(im(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){Fr(n,t,s)}sd(e,t,n);break;case 21:sd(e,t,n);break;case 22:n.mode&1?(io=(r=io)||n.memoizedState!==null,sd(e,t,n),io=r):sd(e,t,n);break;default:sd(e,t,n)}}function zM(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new w2e),t.forEach(function(r){var i=M2e.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Is(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~o}if(r=i,r=Zr()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*k2e(r/1960))-r,10e?16:e,kd===null)var r=!1;else{if(e=kd,kd=null,M5=0,pn&6)throw Error($e(331));var i=pn;for(pn|=4,ht=e.current;ht!==null;){var o=ht,a=o.child;if(ht.flags&16){var s=o.deletions;if(s!==null){for(var l=0;lZr()-oE?Fh(e,0):iE|=n),ta(e,t)}function MH(e,t){t===0&&(e.mode&1?(t=ob,ob<<=1,!(ob&130023424)&&(ob=4194304)):t=1);var n=Po();e=rc(e,t),e!==null&&(ky(e,t,n),ta(e,n))}function O2e(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),MH(e,n)}function M2e(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error($e(314))}r!==null&&r.delete(t),MH(e,n)}var IH;IH=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Jo.current)Xo=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Xo=!1,b2e(e,t,n);Xo=!!(e.flags&131072)}else Xo=!1,yr&&t.flags&1048576&&Nz(t,C5,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;S4(e,t),e=t.pendingProps;var i=Xm(t,so.current);Tm(t,n),i=Qk(null,t,r,e,i,n);var o=Jk();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ea(r)?(o=!0,x5(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,qk(t),i.updater=ux,t.stateNode=i,i._reactInternals=t,_9(t,r,e,n),t=P9(null,t,r,!0,o,n)):(t.tag=0,yr&&o&&$k(t),xo(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(S4(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=R2e(r),e=Ns(r,e),i){case 0:t=E9(null,t,r,e,n);break e;case 1:t=NM(null,t,r,e,n);break e;case 11:t=RM(null,t,r,e,n);break e;case 14:t=DM(null,t,r,Ns(r.type,e),n);break e}throw Error($e(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ns(r,i),E9(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ns(r,i),NM(e,t,r,i,n);case 3:e:{if(mH(t),e===null)throw Error($e(387));r=t.pendingProps,o=t.memoizedState,i=o.element,$z(e,t),E5(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=e0(Error($e(423)),t),t=jM(e,t,r,n,i);break e}else if(r!==i){i=e0(Error($e(424)),t),t=jM(e,t,r,n,i);break e}else for(Ea=Md(t.stateNode.containerInfo.firstChild),La=t,yr=!0,Fs=null,n=Wz(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Zm(),r===i){t=ic(e,t,n);break e}xo(e,t,r,n)}t=t.child}return t;case 5:return Uz(t),e===null&&x9(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,m9(r,i)?a=null:o!==null&&m9(r,o)&&(t.flags|=32),gH(e,t),xo(e,t,a,n),t.child;case 6:return e===null&&x9(t),null;case 13:return vH(e,t,n);case 4:return Yk(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Qm(t,null,r,n):xo(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ns(r,i),RM(e,t,r,i,n);case 7:return xo(e,t,t.pendingProps,n),t.child;case 8:return xo(e,t,t.pendingProps.children,n),t.child;case 12:return xo(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,nr(_5,r._currentValue),r._currentValue=a,o!==null)if(Js(o.value,a)){if(o.children===i.children&&!Jo.current){t=ic(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=qu(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),w9(o.return,n,t),s.lanes|=n;break}l=l.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error($e(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),w9(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}xo(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Tm(t,n),i=cs(i),r=r(i),t.flags|=1,xo(e,t,r,n),t.child;case 14:return r=t.type,i=Ns(r,t.pendingProps),i=Ns(r.type,i),DM(e,t,r,i,n);case 15:return hH(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ns(r,i),S4(e,t),t.tag=1,ea(r)?(e=!0,x5(t)):e=!1,Tm(t,n),Hz(t,r,i),_9(t,r,i,n),P9(null,t,r,!0,e,n);case 19:return yH(e,t,n);case 22:return pH(e,t,n)}throw Error($e(156,t.tag))};function RH(e,t){return az(e,t)}function I2e(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ns(e,t,n,r){return new I2e(e,t,n,r)}function uE(e){return e=e.prototype,!(!e||!e.isReactComponent)}function R2e(e){if(typeof e=="function")return uE(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Tk)return 11;if(e===Lk)return 14}return 2}function Nd(e,t){var n=e.alternate;return n===null?(n=ns(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function C4(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")uE(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Kg:return $h(n.children,i,o,t);case Pk:a=8,i|=8;break;case Y7:return e=ns(12,n,t,i|2),e.elementType=Y7,e.lanes=o,e;case K7:return e=ns(13,n,t,i),e.elementType=K7,e.lanes=o,e;case X7:return e=ns(19,n,t,i),e.elementType=X7,e.lanes=o,e;case V$:return hx(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case z$:a=10;break e;case H$:a=9;break e;case Tk:a=11;break e;case Lk:a=14;break e;case pd:a=16,r=null;break e}throw Error($e(130,e==null?e:typeof e,""))}return t=ns(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function $h(e,t,n,r){return e=ns(7,e,r,t),e.lanes=n,e}function hx(e,t,n,r){return e=ns(22,e,r,t),e.elementType=V$,e.lanes=n,e.stateNode={isHidden:!1},e}function K6(e,t,n){return e=ns(6,e,null,t),e.lanes=n,e}function X6(e,t,n){return t=ns(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function D2e(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=A6(0),this.expirationTimes=A6(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=A6(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function cE(e,t,n,r,i,o,a,s,l){return e=new D2e(e,t,n,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=ns(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},qk(o),e}function N2e(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=Na})(j1e);const vb=d_(Qs);var[z2e,H2e]=Mn({strict:!1,name:"PortalManagerContext"});function BH(e){const{children:t,zIndex:n}=e;return N.createElement(z2e,{value:{zIndex:n}},t)}BH.displayName="PortalManager";var[FH,V2e]=Mn({strict:!1,name:"PortalContext"}),pE="chakra-portal",W2e=".chakra-portal",U2e=e=>N.createElement("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0}},e.children),G2e=e=>{const{appendToParentPortal:t,children:n}=e,[r,i]=w.useState(null),o=w.useRef(null),[,a]=w.useState({});w.useEffect(()=>a({}),[]);const s=V2e(),l=H2e();Ws(()=>{if(!r)return;const d=r.ownerDocument,h=t?s??d.body:d.body;if(!h)return;o.current=d.createElement("div"),o.current.className=pE,h.appendChild(o.current),a({});const m=o.current;return()=>{h.contains(m)&&h.removeChild(m)}},[r]);const u=l!=null&&l.zIndex?N.createElement(U2e,{zIndex:l==null?void 0:l.zIndex},n):n;return o.current?Qs.createPortal(N.createElement(FH,{value:o.current},u),o.current):N.createElement("span",{ref:d=>{d&&i(d)}})},q2e=e=>{const{children:t,containerRef:n,appendToParentPortal:r}=e,i=n.current,o=i??(typeof window<"u"?document.body:void 0),a=w.useMemo(()=>{const l=i==null?void 0:i.ownerDocument.createElement("div");return l&&(l.className=pE),l},[i]),[,s]=w.useState({});return Ws(()=>s({}),[]),Ws(()=>{if(!(!a||!o))return o.appendChild(a),()=>{o.removeChild(a)}},[a,o]),o&&a?Qs.createPortal(N.createElement(FH,{value:r?a:null},t),a):null};function ap(e){const{containerRef:t,...n}=e;return t?N.createElement(q2e,{containerRef:t,...n}):N.createElement(G2e,{...n})}ap.defaultProps={appendToParentPortal:!0};ap.className=pE;ap.selector=W2e;ap.displayName="Portal";var Y2e=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Eg=new WeakMap,yb=new WeakMap,bb={},Z6=0,$H=function(e){return e&&(e.host||$H(e.parentNode))},K2e=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=$H(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return Boolean(n)})},X2e=function(e,t,n,r){var i=K2e(t,Array.isArray(e)?e:[e]);bb[n]||(bb[n]=new WeakMap);var o=bb[n],a=[],s=new Set,l=new Set(i),u=function(h){!h||s.has(h)||(s.add(h),u(h.parentNode))};i.forEach(u);var d=function(h){!h||l.has(h)||Array.prototype.forEach.call(h.children,function(m){if(s.has(m))d(m);else{var v=m.getAttribute(r),b=v!==null&&v!=="false",S=(Eg.get(m)||0)+1,k=(o.get(m)||0)+1;Eg.set(m,S),o.set(m,k),a.push(m),S===1&&b&&yb.set(m,!0),k===1&&m.setAttribute(n,"true"),b||m.setAttribute(r,"true")}})};return d(t),s.clear(),Z6++,function(){a.forEach(function(h){var m=Eg.get(h)-1,v=o.get(h)-1;Eg.set(h,m),o.set(h,v),m||(yb.has(h)||h.removeAttribute(r),yb.delete(h)),v||h.removeAttribute(n)}),Z6--,Z6||(Eg=new WeakMap,Eg=new WeakMap,yb=new WeakMap,bb={})}},zH=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||Y2e(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),X2e(r,i,n,"aria-hidden")):function(){return null}};function gE(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var jn={},Z2e={get exports(){return jn},set exports(e){jn=e}},Q2e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",J2e=Q2e,eye=J2e;function HH(){}function VH(){}VH.resetWarningCache=HH;var tye=function(){function e(r,i,o,a,s,l){if(l!==eye){var u=new 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 u.name="Invariant Violation",u}}e.isRequired=e;function t(){return 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:VH,resetWarningCache:HH};return n.PropTypes=n,n};Z2e.exports=tye();var F9="data-focus-lock",WH="data-focus-lock-disabled",nye="data-no-focus-lock",rye="data-autofocus-inside",iye="data-no-autofocus";function oye(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function aye(e,t){var n=w.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}function UH(e,t){return aye(t||null,function(n){return e.forEach(function(r){return oye(r,n)})})}var Q6={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"};function GH(e){return e}function qH(e,t){t===void 0&&(t=GH);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(s){return o(s)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(o),a=n}var l=function(){var d=a;a=[],d.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(d){a.push(d),u()},filter:function(d){return a=a.filter(d),n}}}};return i}function mE(e,t){return t===void 0&&(t=GH),qH(e,t)}function YH(e){e===void 0&&(e={});var t=qH(null);return t.options=$l({async:!0,ssr:!1},e),t}var KH=function(e){var t=e.sideCar,n=FF(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return w.createElement(r,$l({},n))};KH.isSideCarExport=!0;function sye(e,t){return e.useMedium(t),KH}var XH=mE({},function(e){var t=e.target,n=e.currentTarget;return{target:t,currentTarget:n}}),ZH=mE(),lye=mE(),uye=YH({async:!0}),cye=[],vE=w.forwardRef(function(t,n){var r,i=w.useState(),o=i[0],a=i[1],s=w.useRef(),l=w.useRef(!1),u=w.useRef(null),d=t.children,h=t.disabled,m=t.noFocusGuards,v=t.persistentFocus,b=t.crossFrame,S=t.autoFocus;t.allowTextSelection;var k=t.group,E=t.className,_=t.whiteList,T=t.hasPositiveIndices,A=t.shards,I=A===void 0?cye:A,R=t.as,D=R===void 0?"div":R,j=t.lockProps,z=j===void 0?{}:j,V=t.sideCar,K=t.returnFocus,te=t.focusOptions,q=t.onActivation,F=t.onDeactivation,U=w.useState({}),X=U[0],Z=w.useCallback(function(){u.current=u.current||document&&document.activeElement,s.current&&q&&q(s.current),l.current=!0},[q]),W=w.useCallback(function(){l.current=!1,F&&F(s.current)},[F]);w.useEffect(function(){h||(u.current=null)},[]);var Q=w.useCallback(function(tt){var _e=u.current;if(_e&&_e.focus){var lt=typeof K=="function"?K(_e):K;if(lt){var wt=typeof lt=="object"?lt:void 0;u.current=null,tt?Promise.resolve().then(function(){return _e.focus(wt)}):_e.focus(wt)}}},[K]),ie=w.useCallback(function(tt){l.current&&XH.useMedium(tt)},[]),fe=ZH.useMedium,Se=w.useCallback(function(tt){s.current!==tt&&(s.current=tt,a(tt))},[]),Te=bn((r={},r[WH]=h&&"disabled",r[F9]=k,r),z),ye=m!==!0,He=ye&&m!=="tail",Ne=UH([n,Se]);return w.createElement(w.Fragment,null,ye&&[w.createElement("div",{key:"guard-first","data-focus-guard":!0,tabIndex:h?-1:0,style:Q6}),T?w.createElement("div",{key:"guard-nearest","data-focus-guard":!0,tabIndex:h?-1:1,style:Q6}):null],!h&&w.createElement(V,{id:X,sideCar:uye,observed:o,disabled:h,persistentFocus:v,crossFrame:b,autoFocus:S,whiteList:_,shards:I,onActivation:Z,onDeactivation:W,returnFocus:Q,focusOptions:te}),w.createElement(D,bn({ref:Ne},Te,{className:E,onBlur:fe,onFocus:ie}),d),He&&w.createElement("div",{"data-focus-guard":!0,tabIndex:h?-1:0,style:Q6}))});vE.propTypes={};vE.defaultProps={children:void 0,disabled:!1,returnFocus:!1,focusOptions:void 0,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,crossFrame:!0,hasPositiveIndices:void 0,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0};const QH=vE;function $9(e,t){return $9=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},$9(e,t)}function yE(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,$9(e,t)}function JH(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dye(e,t){function n(r){return r.displayName||r.name||"Component"}return function(i){var o=[],a;function s(){a=e(o.map(function(u){return u.props})),t(a)}var l=function(u){yE(d,u);function d(){return u.apply(this,arguments)||this}d.peek=function(){return a};var h=d.prototype;return h.componentDidMount=function(){o.push(this),s()},h.componentDidUpdate=function(){s()},h.componentWillUnmount=function(){var v=o.indexOf(this);o.splice(v,1),s()},h.render=function(){return N.createElement(i,this.props)},d}(w.PureComponent);return JH(l,"displayName","SideEffect("+n(i)+")"),l}}var fu=function(e){for(var t=Array(e.length),n=0;n=0}).sort(bye)},Sye=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],SE=Sye.join(","),xye="".concat(SE,", [data-focus-guard]"),lV=function(e,t){var n;return fu(((n=e.shadowRoot)===null||n===void 0?void 0:n.children)||e.children).reduce(function(r,i){return r.concat(i.matches(t?xye:SE)?[i]:[],lV(i))},[])},xE=function(e,t){return e.reduce(function(n,r){return n.concat(lV(r,t),r.parentNode?fu(r.parentNode.querySelectorAll(SE)).filter(function(i){return i===r}):[])},[])},wye=function(e){var t=e.querySelectorAll("[".concat(rye,"]"));return fu(t).map(function(n){return xE([n])}).reduce(function(n,r){return n.concat(r)},[])},wE=function(e,t){return fu(e).filter(function(n){return nV(t,n)}).filter(function(n){return mye(n)})},KM=function(e,t){return t===void 0&&(t=new Map),fu(e).filter(function(n){return rV(t,n)})},H9=function(e,t,n){return sV(wE(xE(e,n),t),!0,n)},XM=function(e,t){return sV(wE(xE(e),t),!1)},Cye=function(e,t){return wE(wye(e),t)},Y2=function(e,t){return e.shadowRoot?Y2(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:fu(e.children).some(function(n){return Y2(n,t)})},_ye=function(e){for(var t=new Set,n=e.length,r=0;r0&&t.add(i),(o&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(a,s){return!t.has(s)})},uV=function(e){return e.parentNode?uV(e.parentNode):e},CE=function(e){var t=z9(e);return t.filter(Boolean).reduce(function(n,r){var i=r.getAttribute(F9);return n.push.apply(n,i?_ye(fu(uV(r).querySelectorAll("[".concat(F9,'="').concat(i,'"]:not([').concat(WH,'="disabled"])')))):[r]),n},[])},cV=function(e){return e.activeElement?e.activeElement.shadowRoot?cV(e.activeElement.shadowRoot):e.activeElement:void 0},_E=function(){return document.activeElement?document.activeElement.shadowRoot?cV(document.activeElement.shadowRoot):document.activeElement:void 0},kye=function(e){return e===document.activeElement},Eye=function(e){return Boolean(fu(e.querySelectorAll("iframe")).some(function(t){return kye(t)}))},dV=function(e){var t=document&&_E();return!t||t.dataset&&t.dataset.focusGuard?!1:CE(e).some(function(n){return Y2(n,t)||Eye(n)})},Pye=function(){var e=document&&_E();return e?fu(document.querySelectorAll("[".concat(nye,"]"))).some(function(t){return Y2(t,e)}):!1},Tye=function(e,t){return t.filter(aV).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},kE=function(e,t){return aV(e)&&e.name?Tye(e,t):e},Lye=function(e){var t=new Set;return e.forEach(function(n){return t.add(kE(n,e))}),e.filter(function(n){return t.has(n)})},ZM=function(e){return e[0]&&e.length>1?kE(e[0],e):e[0]},QM=function(e,t){return e.length>1?e.indexOf(kE(e[t],e)):t},fV="NEW_FOCUS",Aye=function(e,t,n,r){var i=e.length,o=e[0],a=e[i-1],s=bE(n);if(!(n&&e.indexOf(n)>=0)){var l=n!==void 0?t.indexOf(n):-1,u=r?t.indexOf(r):l,d=r?e.indexOf(r):-1,h=l-u,m=t.indexOf(o),v=t.indexOf(a),b=Lye(t),S=n!==void 0?b.indexOf(n):-1,k=S-(r?b.indexOf(r):l),E=QM(e,0),_=QM(e,i-1);if(l===-1||d===-1)return fV;if(!h&&d>=0)return d;if(l<=m&&s&&Math.abs(h)>1)return _;if(l>=v&&s&&Math.abs(h)>1)return E;if(h&&Math.abs(k)>1)return d;if(l<=m)return _;if(l>v)return E;if(h)return Math.abs(h)>1?d:(i+d+h)%i}},Oye=function(e){return function(t){var n,r=(n=iV(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},Mye=function(e,t,n){var r=e.map(function(o){var a=o.node;return a}),i=KM(r.filter(Oye(n)));return i&&i.length?ZM(i):ZM(KM(t))},V9=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&V9(e.parentNode.host||e.parentNode,t),t},J6=function(e,t){for(var n=V9(e),r=V9(t),i=0;i=0)return o}return!1},hV=function(e,t,n){var r=z9(e),i=z9(t),o=r[0],a=!1;return i.filter(Boolean).forEach(function(s){a=J6(a||s,s)||a,n.filter(Boolean).forEach(function(l){var u=J6(o,l);u&&(!a||Y2(u,a)?a=u:a=J6(u,a))})}),a},Iye=function(e,t){return e.reduce(function(n,r){return n.concat(Cye(r,t))},[])},Rye=function(e,t){var n=new Map;return t.forEach(function(r){return n.set(r.node,r)}),e.map(function(r){return n.get(r)}).filter(yye)},Dye=function(e,t){var n=document&&_E(),r=CE(e).filter(D5),i=hV(n||e,e,r),o=new Map,a=XM(r,o),s=H9(r,o).filter(function(m){var v=m.node;return D5(v)});if(!(!s[0]&&(s=a,!s[0]))){var l=XM([i],o).map(function(m){var v=m.node;return v}),u=Rye(l,s),d=u.map(function(m){var v=m.node;return v}),h=Aye(d,l,n,t);return h===fV?{node:Mye(a,d,Iye(r,o))}:h===void 0?h:u[h]}},Nye=function(e){var t=CE(e).filter(D5),n=hV(e,e,t),r=new Map,i=H9([n],r,!0),o=H9(t,r).filter(function(a){var s=a.node;return D5(s)}).map(function(a){var s=a.node;return s});return i.map(function(a){var s=a.node,l=a.index;return{node:s,index:l,lockItem:o.indexOf(s)>=0,guard:bE(s)}})},jye=function(e,t){"focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},eC=0,tC=!1,Bye=function(e,t,n){n===void 0&&(n={});var r=Dye(e,t);if(!tC&&r){if(eC>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),tC=!0,setTimeout(function(){tC=!1},1);return}eC++,jye(r.node,n.focusOptions),eC--}};const pV=Bye;function gV(e){var t=window,n=t.setImmediate;typeof n<"u"?n(e):setTimeout(e,1)}var Fye=function(){return document&&document.activeElement===document.body},$ye=function(){return Fye()||Pye()},Am=null,am=null,Om=null,K2=!1,zye=function(){return!0},Hye=function(t){return(Am.whiteList||zye)(t)},Vye=function(t,n){Om={observerNode:t,portaledElement:n}},Wye=function(t){return Om&&Om.portaledElement===t};function JM(e,t,n,r){var i=null,o=e;do{var a=r[o];if(a.guard)a.node.dataset.focusAutoGuard&&(i=a);else if(a.lockItem){if(o!==e)return;i=null}else break}while((o+=n)!==t);i&&(i.node.tabIndex=0)}var Uye=function(t){return t&&"current"in t?t.current:t},Gye=function(t){return t?Boolean(K2):K2==="meanwhile"},qye=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},Yye=function(t,n){return n.some(function(r){return qye(t,r,r)})},N5=function(){var t=!1;if(Am){var n=Am,r=n.observed,i=n.persistentFocus,o=n.autoFocus,a=n.shards,s=n.crossFrame,l=n.focusOptions,u=r||Om&&Om.portaledElement,d=document&&document.activeElement;if(u){var h=[u].concat(a.map(Uye).filter(Boolean));if((!d||Hye(d))&&(i||Gye(s)||!$ye()||!am&&o)&&(u&&!(dV(h)||d&&Yye(d,h)||Wye(d))&&(document&&!am&&d&&!o?(d.blur&&d.blur(),document.body.focus()):(t=pV(h,am,{focusOptions:l}),Om={})),K2=!1,am=document&&document.activeElement),document){var m=document&&document.activeElement,v=Nye(h),b=v.map(function(S){var k=S.node;return k}).indexOf(m);b>-1&&(v.filter(function(S){var k=S.guard,E=S.node;return k&&E.dataset.focusAutoGuard}).forEach(function(S){var k=S.node;return k.removeAttribute("tabIndex")}),JM(b,v.length,1,v),JM(b,-1,-1,v))}}}return t},mV=function(t){N5()&&t&&(t.stopPropagation(),t.preventDefault())},EE=function(){return gV(N5)},Kye=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||Vye(r,n)},Xye=function(){return null},vV=function(){K2="just",setTimeout(function(){K2="meanwhile"},0)},Zye=function(){document.addEventListener("focusin",mV),document.addEventListener("focusout",EE),window.addEventListener("blur",vV)},Qye=function(){document.removeEventListener("focusin",mV),document.removeEventListener("focusout",EE),window.removeEventListener("blur",vV)};function Jye(e){return e.filter(function(t){var n=t.disabled;return!n})}function e3e(e){var t=e.slice(-1)[0];t&&!Am&&Zye();var n=Am,r=n&&t&&t.id===n.id;Am=t,n&&!r&&(n.onDeactivation(),e.filter(function(i){var o=i.id;return o===n.id}).length||n.returnFocus(!t)),t?(am=null,(!r||n.observed!==t.observed)&&t.onActivation(),N5(),gV(N5)):(Qye(),am=null)}XH.assignSyncMedium(Kye);ZH.assignMedium(EE);lye.assignMedium(function(e){return e({moveFocusInside:pV,focusInside:dV})});const t3e=dye(Jye,e3e)(Xye);var yV=w.forwardRef(function(t,n){return w.createElement(QH,bn({sideCar:t3e,ref:n},t))}),bV=QH.propTypes||{};bV.sideCar;gE(bV,["sideCar"]);yV.propTypes={};const n3e=yV;var SV=e=>{const{initialFocusRef:t,finalFocusRef:n,contentRef:r,restoreFocus:i,children:o,isDisabled:a,autoFocus:s,persistentFocus:l,lockFocusAcrossFrames:u}=e,d=w.useCallback(()=>{t!=null&&t.current?t.current.focus():r!=null&&r.current&&k$(r.current).length===0&&requestAnimationFrame(()=>{var b;(b=r.current)==null||b.focus()})},[t,r]),h=w.useCallback(()=>{var v;(v=n==null?void 0:n.current)==null||v.focus()},[n]),m=i&&!n;return N.createElement(n3e,{crossFrame:u,persistentFocus:l,autoFocus:s,disabled:a,onActivation:d,onDeactivation:h,returnFocus:m},o)};SV.displayName="FocusLock";var _4="right-scroll-bar-position",k4="width-before-scroll-bar",r3e="with-scroll-bars-hidden",i3e="--removed-body-scroll-bar-size",xV=YH(),nC=function(){},yx=w.forwardRef(function(e,t){var n=w.useRef(null),r=w.useState({onScrollCapture:nC,onWheelCapture:nC,onTouchMoveCapture:nC}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,h=e.shards,m=e.sideCar,v=e.noIsolation,b=e.inert,S=e.allowPinchZoom,k=e.as,E=k===void 0?"div":k,_=FF(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),T=m,A=UH([n,t]),I=$l($l({},_),i);return w.createElement(w.Fragment,null,d&&w.createElement(T,{sideCar:xV,removeScrollBar:u,shards:h,noIsolation:v,inert:b,setCallbacks:o,allowPinchZoom:!!S,lockRef:n}),a?w.cloneElement(w.Children.only(s),$l($l({},I),{ref:A})):w.createElement(E,$l({},I,{className:l,ref:A}),s))});yx.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};yx.classNames={fullWidth:k4,zeroRight:_4};var o3e=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function a3e(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=o3e();return t&&e.setAttribute("nonce",t),e}function s3e(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function l3e(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var u3e=function(){var e=0,t=null;return{add:function(n){e==0&&(t=a3e())&&(s3e(t,n),l3e(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},c3e=function(){var e=u3e();return function(t,n){w.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},wV=function(){var e=c3e(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},d3e={left:0,top:0,right:0,gap:0},rC=function(e){return parseInt(e||"",10)||0},f3e=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[rC(n),rC(r),rC(i)]},h3e=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return d3e;var t=f3e(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},p3e=wV(),g3e=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),`
+ .`.concat(r3e,` {
+ overflow: hidden `).concat(r,`;
+ padding-right: `).concat(s,"px ").concat(r,`;
+ }
+ body {
+ overflow: hidden `).concat(r,`;
+ overscroll-behavior: contain;
+ `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
+ padding-left: `.concat(i,`px;
+ padding-top: `).concat(o,`px;
+ padding-right: `).concat(a,`px;
+ margin-left:0;
+ margin-top:0;
+ margin-right: `).concat(s,"px ").concat(r,`;
+ `),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),`
+ }
+
+ .`).concat(_4,` {
+ right: `).concat(s,"px ").concat(r,`;
+ }
+
+ .`).concat(k4,` {
+ margin-right: `).concat(s,"px ").concat(r,`;
+ }
+
+ .`).concat(_4," .").concat(_4,` {
+ right: 0 `).concat(r,`;
+ }
+
+ .`).concat(k4," .").concat(k4,` {
+ margin-right: 0 `).concat(r,`;
+ }
+
+ body {
+ `).concat(i3e,": ").concat(s,`px;
+ }
+`)},m3e=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=w.useMemo(function(){return h3e(i)},[i]);return w.createElement(p3e,{styles:g3e(o,!t,i,n?"":"!important")})},W9=!1;if(typeof window<"u")try{var Sb=Object.defineProperty({},"passive",{get:function(){return W9=!0,!0}});window.addEventListener("test",Sb,Sb),window.removeEventListener("test",Sb,Sb)}catch{W9=!1}var Pg=W9?{passive:!1}:!1,v3e=function(e){return e.tagName==="TEXTAREA"},CV=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!v3e(e)&&n[t]==="visible")},y3e=function(e){return CV(e,"overflowY")},b3e=function(e){return CV(e,"overflowX")},eI=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=_V(e,n);if(r){var i=kV(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},S3e=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},x3e=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},_V=function(e,t){return e==="v"?y3e(t):b3e(t)},kV=function(e,t){return e==="v"?S3e(t):x3e(t)},w3e=function(e,t){return e==="h"&&t==="rtl"?-1:1},C3e=function(e,t,n,r,i){var o=w3e(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,l=t.contains(s),u=!1,d=a>0,h=0,m=0;do{var v=kV(e,s),b=v[0],S=v[1],k=v[2],E=S-k-o*b;(b||E)&&_V(e,s)&&(h+=E,m+=b),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(d&&(i&&h===0||!i&&a>h)||!d&&(i&&m===0||!i&&-a>m))&&(u=!0),u},xb=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},tI=function(e){return[e.deltaX,e.deltaY]},nI=function(e){return e&&"current"in e?e.current:e},_3e=function(e,t){return e[0]===t[0]&&e[1]===t[1]},k3e=function(e){return`
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
+`)},E3e=0,Tg=[];function P3e(e){var t=w.useRef([]),n=w.useRef([0,0]),r=w.useRef(),i=w.useState(E3e++)[0],o=w.useState(function(){return wV()})[0],a=w.useRef(e);w.useEffect(function(){a.current=e},[e]),w.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var S=N7([e.lockRef.current],(e.shards||[]).map(nI),!0).filter(Boolean);return S.forEach(function(k){return k.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),S.forEach(function(k){return k.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=w.useCallback(function(S,k){if("touches"in S&&S.touches.length===2)return!a.current.allowPinchZoom;var E=xb(S),_=n.current,T="deltaX"in S?S.deltaX:_[0]-E[0],A="deltaY"in S?S.deltaY:_[1]-E[1],I,R=S.target,D=Math.abs(T)>Math.abs(A)?"h":"v";if("touches"in S&&D==="h"&&R.type==="range")return!1;var j=eI(D,R);if(!j)return!0;if(j?I=D:(I=D==="v"?"h":"v",j=eI(D,R)),!j)return!1;if(!r.current&&"changedTouches"in S&&(T||A)&&(r.current=I),!I)return!0;var z=r.current||I;return C3e(z,k,S,z==="h"?T:A,!0)},[]),l=w.useCallback(function(S){var k=S;if(!(!Tg.length||Tg[Tg.length-1]!==o)){var E="deltaY"in k?tI(k):xb(k),_=t.current.filter(function(I){return I.name===k.type&&I.target===k.target&&_3e(I.delta,E)})[0];if(_&&_.should){k.cancelable&&k.preventDefault();return}if(!_){var T=(a.current.shards||[]).map(nI).filter(Boolean).filter(function(I){return I.contains(k.target)}),A=T.length>0?s(k,T[0]):!a.current.noIsolation;A&&k.cancelable&&k.preventDefault()}}},[]),u=w.useCallback(function(S,k,E,_){var T={name:S,delta:k,target:E,should:_};t.current.push(T),setTimeout(function(){t.current=t.current.filter(function(A){return A!==T})},1)},[]),d=w.useCallback(function(S){n.current=xb(S),r.current=void 0},[]),h=w.useCallback(function(S){u(S.type,tI(S),S.target,s(S,e.lockRef.current))},[]),m=w.useCallback(function(S){u(S.type,xb(S),S.target,s(S,e.lockRef.current))},[]);w.useEffect(function(){return Tg.push(o),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:m}),document.addEventListener("wheel",l,Pg),document.addEventListener("touchmove",l,Pg),document.addEventListener("touchstart",d,Pg),function(){Tg=Tg.filter(function(S){return S!==o}),document.removeEventListener("wheel",l,Pg),document.removeEventListener("touchmove",l,Pg),document.removeEventListener("touchstart",d,Pg)}},[]);var v=e.removeScrollBar,b=e.inert;return w.createElement(w.Fragment,null,b?w.createElement(o,{styles:k3e(i)}):null,v?w.createElement(m3e,{gapMode:"margin"}):null)}const T3e=sye(xV,P3e);var EV=w.forwardRef(function(e,t){return w.createElement(yx,$l({},e,{ref:t,sideCar:T3e}))});EV.classNames=yx.classNames;const PV=EV;var sp=(...e)=>e.filter(Boolean).join(" ");function wv(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}var L3e=class{constructor(){sn(this,"modals");this.modals=[]}add(e){this.modals.push(e)}remove(e){this.modals=this.modals.filter(t=>t!==e)}isTopModal(e){return this.modals[this.modals.length-1]===e}},U9=new L3e;function A3e(e,t){w.useEffect(()=>(t&&U9.add(e),()=>{U9.remove(e)}),[t,e])}function O3e(e){const{isOpen:t,onClose:n,id:r,closeOnOverlayClick:i=!0,closeOnEsc:o=!0,useInert:a=!0,onOverlayClick:s,onEsc:l}=e,u=w.useRef(null),d=w.useRef(null),[h,m,v]=I3e(r,"chakra-modal","chakra-modal--header","chakra-modal--body");M3e(u,t&&a),A3e(u,t);const b=w.useRef(null),S=w.useCallback(j=>{b.current=j.target},[]),k=w.useCallback(j=>{j.key==="Escape"&&(j.stopPropagation(),o&&(n==null||n()),l==null||l())},[o,n,l]),[E,_]=w.useState(!1),[T,A]=w.useState(!1),I=w.useCallback((j={},z=null)=>({role:"dialog",...j,ref:Yn(z,u),id:h,tabIndex:-1,"aria-modal":!0,"aria-labelledby":E?m:void 0,"aria-describedby":T?v:void 0,onClick:wv(j.onClick,V=>V.stopPropagation())}),[v,T,h,m,E]),R=w.useCallback(j=>{j.stopPropagation(),b.current===j.target&&U9.isTopModal(u)&&(i&&(n==null||n()),s==null||s())},[n,i,s]),D=w.useCallback((j={},z=null)=>({...j,ref:Yn(z,d),onClick:wv(j.onClick,R),onKeyDown:wv(j.onKeyDown,k),onMouseDown:wv(j.onMouseDown,S)}),[k,S,R]);return{isOpen:t,onClose:n,headerId:m,bodyId:v,setBodyMounted:A,setHeaderMounted:_,dialogRef:u,overlayRef:d,getDialogProps:I,getDialogContainerProps:D}}function M3e(e,t){const n=e.current;w.useEffect(()=>{if(!(!e.current||!t))return zH(e.current)},[t,e,n])}function I3e(e,...t){const n=w.useId(),r=e||n;return w.useMemo(()=>t.map(i=>`${i}-${r}`),[r,t])}var[R3e,lp]=Mn({name:"ModalStylesContext",errorMessage:`useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in " " `}),[D3e,qd]=Mn({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in ` `"}),Yd=e=>{const{portalProps:t,children:n,autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:d,motionPreset:h,lockFocusAcrossFrames:m,onCloseComplete:v}=e,b=Yi("Modal",e),k={...O3e(e),autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:d,motionPreset:h,lockFocusAcrossFrames:m};return N.createElement(D3e,{value:k},N.createElement(R3e,{value:b},N.createElement(nf,{onExitComplete:v},k.isOpen&&N.createElement(ap,{...t},n))))};Yd.defaultProps={lockFocusAcrossFrames:!0,returnFocusOnClose:!0,scrollBehavior:"outside",trapFocus:!0,autoFocus:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale"};Yd.displayName="Modal";var n0=Oe((e,t)=>{const{className:n,...r}=e,{bodyId:i,setBodyMounted:o}=qd();w.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=sp("chakra-modal__body",n),s=lp();return N.createElement(Ce.div,{ref:t,className:a,id:i,...r,__css:s.body})});n0.displayName="ModalBody";var Ly=Oe((e,t)=>{const{onClick:n,className:r,...i}=e,{onClose:o}=qd(),a=sp("chakra-modal__close-btn",r),s=lp();return N.createElement(ex,{ref:t,__css:s.closeButton,className:a,onClick:wv(n,l=>{l.stopPropagation(),o()}),...i})});Ly.displayName="ModalCloseButton";function TV(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:i,blockScrollOnMount:o,allowPinchZoom:a,finalFocusRef:s,returnFocusOnClose:l,preserveScrollBarGap:u,lockFocusAcrossFrames:d}=qd(),[h,m]=K_();return w.useEffect(()=>{!h&&m&&setTimeout(m)},[h,m]),N.createElement(SV,{autoFocus:t,isDisabled:!n,initialFocusRef:i,finalFocusRef:s,restoreFocus:l,contentRef:r,lockFocusAcrossFrames:d},N.createElement(PV,{removeScrollBar:!u,allowPinchZoom:a,enabled:o,forwardProps:!0},e.children))}var N3e={slideInBottom:{...B7,custom:{offsetY:16,reverse:!0}},slideInRight:{...B7,custom:{offsetX:16,reverse:!0}},scale:{...HF,custom:{initialScale:.95,reverse:!0}},none:{}},j3e=Ce(du.section),B3e=e=>N3e[e||"none"],LV=w.forwardRef((e,t)=>{const{preset:n,motionProps:r=B3e(n),...i}=e;return N.createElement(j3e,{ref:t,...r,...i})});LV.displayName="ModalTransition";var Zh=Oe((e,t)=>{const{className:n,children:r,containerProps:i,motionProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l}=qd(),u=s(a,t),d=l(i),h=sp("chakra-modal__content",n),m=lp(),v={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...m.dialog},b={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...m.dialogContainer},{motionPreset:S}=qd();return N.createElement(TV,null,N.createElement(Ce.div,{...d,className:"chakra-modal__content-container",tabIndex:-1,__css:b},N.createElement(LV,{preset:S,motionProps:o,className:h,...u,__css:v},r)))});Zh.displayName="ModalContent";var bx=Oe((e,t)=>{const{className:n,...r}=e,i=sp("chakra-modal__footer",n),a={display:"flex",alignItems:"center",justifyContent:"flex-end",...lp().footer};return N.createElement(Ce.footer,{ref:t,...r,__css:a,className:i})});bx.displayName="ModalFooter";var w0=Oe((e,t)=>{const{className:n,...r}=e,{headerId:i,setHeaderMounted:o}=qd();w.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=sp("chakra-modal__header",n),l={flex:0,...lp().header};return N.createElement(Ce.header,{ref:t,className:a,id:i,...r,__css:l})});w0.displayName="ModalHeader";var F3e=Ce(du.div),Kd=Oe((e,t)=>{const{className:n,transition:r,motionProps:i,...o}=e,a=sp("chakra-modal__overlay",n),l={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...lp().overlay},{motionPreset:u}=qd(),h=i||(u==="none"?{}:zF);return N.createElement(F3e,{...h,__css:l,ref:t,className:a,...o})});Kd.displayName="ModalOverlay";function AV(e){const{leastDestructiveRef:t,...n}=e;return N.createElement(Yd,{...n,initialFocusRef:t})}var OV=Oe((e,t)=>N.createElement(Zh,{ref:t,role:"alertdialog",...e})),[Z$e,$3e]=Mn(),z3e=Ce(VF),H3e=Oe((e,t)=>{const{className:n,children:r,motionProps:i,containerProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l,isOpen:u}=qd(),d=s(a,t),h=l(o),m=sp("chakra-modal__content",n),v=lp(),b={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...v.dialog},S={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...v.dialogContainer},{placement:k}=$3e();return N.createElement(TV,null,N.createElement(Ce.div,{...h,className:"chakra-modal__content-container",__css:S},N.createElement(z3e,{motionProps:i,direction:k,in:u,className:m,...d,__css:b},r)))});H3e.displayName="DrawerContent";function V3e(e,t){const n=Er(e);w.useEffect(()=>{let r=null;const i=()=>n();return t!==null&&(r=window.setInterval(i,t)),()=>{r&&window.clearInterval(r)}},[t,n])}var MV=(...e)=>e.filter(Boolean).join(" "),iC=e=>e?!0:void 0;function Al(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}var W3e=e=>N.createElement(Da,{viewBox:"0 0 24 24",...e},N.createElement("path",{fill:"currentColor",d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z"})),U3e=e=>N.createElement(Da,{viewBox:"0 0 24 24",...e},N.createElement("path",{fill:"currentColor",d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z"}));function rI(e,t,n,r){w.useEffect(()=>{if(!e.current||!r)return;const i=e.current.ownerDocument.defaultView??window,o=Array.isArray(t)?t:[t],a=new i.MutationObserver(s=>{for(const l of s)l.type==="attributes"&&l.attributeName&&o.includes(l.attributeName)&&n(l)});return a.observe(e.current,{attributes:!0,attributeFilter:o}),()=>a.disconnect()})}var G3e=50,iI=300;function q3e(e,t){const[n,r]=w.useState(!1),[i,o]=w.useState(null),[a,s]=w.useState(!0),l=w.useRef(null),u=()=>clearTimeout(l.current);V3e(()=>{i==="increment"&&e(),i==="decrement"&&t()},n?G3e:null);const d=w.useCallback(()=>{a&&e(),l.current=setTimeout(()=>{s(!1),r(!0),o("increment")},iI)},[e,a]),h=w.useCallback(()=>{a&&t(),l.current=setTimeout(()=>{s(!1),r(!0),o("decrement")},iI)},[t,a]),m=w.useCallback(()=>{s(!0),r(!1),u()},[]);return w.useEffect(()=>()=>u(),[]),{up:d,down:h,stop:m,isSpinning:n}}var Y3e=/^[Ee0-9+\-.]$/;function K3e(e){return Y3e.test(e)}function X3e(e,t){if(e.key==null)return!0;const n=e.ctrlKey||e.altKey||e.metaKey;return!(e.key.length===1)||n?!0:t(e.key)}function Z3e(e={}){const{focusInputOnChange:t=!0,clampValueOnBlur:n=!0,keepWithinRange:r=!0,min:i=Number.MIN_SAFE_INTEGER,max:o=Number.MAX_SAFE_INTEGER,step:a=1,isReadOnly:s,isDisabled:l,isRequired:u,isInvalid:d,pattern:h="[0-9]*(.[0-9]+)?",inputMode:m="decimal",allowMouseWheel:v,id:b,onChange:S,precision:k,name:E,"aria-describedby":_,"aria-label":T,"aria-labelledby":A,onFocus:I,onBlur:R,onInvalid:D,getAriaValueText:j,isValidCharacter:z,format:V,parse:K,...te}=e,q=Er(I),F=Er(R),U=Er(D),X=Er(z??K3e),Z=Er(j),W=ume(e),{update:Q,increment:ie,decrement:fe}=W,[Se,Te]=w.useState(!1),ye=!(s||l),He=w.useRef(null),Ne=w.useRef(null),tt=w.useRef(null),_e=w.useRef(null),lt=w.useCallback(Le=>Le.split("").filter(X).join(""),[X]),wt=w.useCallback(Le=>(K==null?void 0:K(Le))??Le,[K]),ct=w.useCallback(Le=>((V==null?void 0:V(Le))??Le).toString(),[V]);Vd(()=>{(W.valueAsNumber>o||W.valueAsNumber{if(!He.current)return;if(He.current.value!=W.value){const At=wt(He.current.value);W.setValue(lt(At))}},[wt,lt]);const mt=w.useCallback((Le=a)=>{ye&&ie(Le)},[ie,ye,a]),St=w.useCallback((Le=a)=>{ye&&fe(Le)},[fe,ye,a]),Ae=q3e(mt,St);rI(tt,"disabled",Ae.stop,Ae.isSpinning),rI(_e,"disabled",Ae.stop,Ae.isSpinning);const ut=w.useCallback(Le=>{if(Le.nativeEvent.isComposing)return;const Fe=wt(Le.currentTarget.value);Q(lt(Fe)),Ne.current={start:Le.currentTarget.selectionStart,end:Le.currentTarget.selectionEnd}},[Q,lt,wt]),Mt=w.useCallback(Le=>{var At;q==null||q(Le),Ne.current&&(Le.target.selectionStart=Ne.current.start??((At=Le.currentTarget.value)==null?void 0:At.length),Le.currentTarget.selectionEnd=Ne.current.end??Le.currentTarget.selectionStart)},[q]),at=w.useCallback(Le=>{if(Le.nativeEvent.isComposing)return;X3e(Le,X)||Le.preventDefault();const At=Ct(Le)*a,Fe=Le.key,nn={ArrowUp:()=>mt(At),ArrowDown:()=>St(At),Home:()=>Q(i),End:()=>Q(o)}[Fe];nn&&(Le.preventDefault(),nn(Le))},[X,a,mt,St,Q,i,o]),Ct=Le=>{let At=1;return(Le.metaKey||Le.ctrlKey)&&(At=.1),Le.shiftKey&&(At=10),At},Zt=w.useMemo(()=>{const Le=Z==null?void 0:Z(W.value);if(Le!=null)return Le;const At=W.value.toString();return At||void 0},[W.value,Z]),le=w.useCallback(()=>{let Le=W.value;if(W.value==="")return;/^[eE]/.test(W.value.toString())?W.setValue(""):(W.valueAsNumbero&&(Le=o),W.cast(Le))},[W,o,i]),De=w.useCallback(()=>{Te(!1),n&&le()},[n,Te,le]),Ue=w.useCallback(()=>{t&&requestAnimationFrame(()=>{var Le;(Le=He.current)==null||Le.focus()})},[t]),Ye=w.useCallback(Le=>{Le.preventDefault(),Ae.up(),Ue()},[Ue,Ae]),we=w.useCallback(Le=>{Le.preventDefault(),Ae.down(),Ue()},[Ue,Ae]);Rh(()=>He.current,"wheel",Le=>{var At;const vt=(((At=He.current)==null?void 0:At.ownerDocument)??document).activeElement===He.current;if(!v||!vt)return;Le.preventDefault();const nn=Ct(Le)*a,Rn=Math.sign(Le.deltaY);Rn===-1?mt(nn):Rn===1&&St(nn)},{passive:!1});const je=w.useCallback((Le={},At=null)=>{const Fe=l||r&&W.isAtMax;return{...Le,ref:Yn(At,tt),role:"button",tabIndex:-1,onPointerDown:Al(Le.onPointerDown,vt=>{vt.button!==0||Fe||Ye(vt)}),onPointerLeave:Al(Le.onPointerLeave,Ae.stop),onPointerUp:Al(Le.onPointerUp,Ae.stop),disabled:Fe,"aria-disabled":iC(Fe)}},[W.isAtMax,r,Ye,Ae.stop,l]),_t=w.useCallback((Le={},At=null)=>{const Fe=l||r&&W.isAtMin;return{...Le,ref:Yn(At,_e),role:"button",tabIndex:-1,onPointerDown:Al(Le.onPointerDown,vt=>{vt.button!==0||Fe||we(vt)}),onPointerLeave:Al(Le.onPointerLeave,Ae.stop),onPointerUp:Al(Le.onPointerUp,Ae.stop),disabled:Fe,"aria-disabled":iC(Fe)}},[W.isAtMin,r,we,Ae.stop,l]),Dt=w.useCallback((Le={},At=null)=>({name:E,inputMode:m,type:"text",pattern:h,"aria-labelledby":A,"aria-label":T,"aria-describedby":_,id:b,disabled:l,...Le,readOnly:Le.readOnly??s,"aria-readonly":Le.readOnly??s,"aria-required":Le.required??u,required:Le.required??u,ref:Yn(He,At),value:ct(W.value),role:"spinbutton","aria-valuemin":i,"aria-valuemax":o,"aria-valuenow":Number.isNaN(W.valueAsNumber)?void 0:W.valueAsNumber,"aria-invalid":iC(d??W.isOutOfRange),"aria-valuetext":Zt,autoComplete:"off",autoCorrect:"off",onChange:Al(Le.onChange,ut),onKeyDown:Al(Le.onKeyDown,at),onFocus:Al(Le.onFocus,Mt,()=>Te(!0)),onBlur:Al(Le.onBlur,F,De)}),[E,m,h,A,T,ct,_,b,l,u,s,d,W.value,W.valueAsNumber,W.isOutOfRange,i,o,Zt,ut,at,Mt,F,De]);return{value:ct(W.value),valueAsNumber:W.valueAsNumber,isFocused:Se,isDisabled:l,isReadOnly:s,getIncrementButtonProps:je,getDecrementButtonProps:_t,getInputProps:Dt,htmlProps:te}}var[Q3e,Sx]=Mn({name:"NumberInputStylesContext",errorMessage:`useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in " " `}),[J3e,PE]=Mn({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within "}),TE=Oe(function(t,n){const r=Yi("NumberInput",t),i=En(t),o=lk(i),{htmlProps:a,...s}=Z3e(o),l=w.useMemo(()=>s,[s]);return N.createElement(J3e,{value:l},N.createElement(Q3e,{value:r},N.createElement(Ce.div,{...a,ref:n,className:MV("chakra-numberinput",t.className),__css:{position:"relative",zIndex:0,...r.root}})))});TE.displayName="NumberInput";var IV=Oe(function(t,n){const r=Sx();return N.createElement(Ce.div,{"aria-hidden":!0,ref:n,...t,__css:{display:"flex",flexDirection:"column",position:"absolute",top:"0",insetEnd:"0px",margin:"1px",height:"calc(100% - 2px)",zIndex:1,...r.stepperGroup}})});IV.displayName="NumberInputStepper";var LE=Oe(function(t,n){const{getInputProps:r}=PE(),i=r(t,n),o=Sx();return N.createElement(Ce.input,{...i,className:MV("chakra-numberinput__field",t.className),__css:{width:"100%",...o.field}})});LE.displayName="NumberInputField";var RV=Ce("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),AE=Oe(function(t,n){const r=Sx(),{getDecrementButtonProps:i}=PE(),o=i(t,n);return N.createElement(RV,{...o,__css:r.stepper},t.children??N.createElement(W3e,null))});AE.displayName="NumberDecrementStepper";var OE=Oe(function(t,n){const{getIncrementButtonProps:r}=PE(),i=r(t,n),o=Sx();return N.createElement(RV,{...i,__css:o.stepper},t.children??N.createElement(U3e,null))});OE.displayName="NumberIncrementStepper";var Ay=(...e)=>e.filter(Boolean).join(" ");function ebe(e,...t){return tbe(e)?e(...t):e}var tbe=e=>typeof e=="function";function Ol(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}function nbe(...e){return function(n){e.forEach(r=>{r==null||r(n)})}}var[rbe,up]=Mn({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within ` `"}),[ibe,Oy]=Mn({name:"PopoverStylesContext",errorMessage:`usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in " " `}),Lg={click:"click",hover:"hover"};function obe(e={}){const{closeOnBlur:t=!0,closeOnEsc:n=!0,initialFocusRef:r,id:i,returnFocusOnClose:o=!0,autoFocus:a=!0,arrowSize:s,arrowShadowColor:l,trigger:u=Lg.click,openDelay:d=200,closeDelay:h=200,isLazy:m,lazyBehavior:v="unmount",computePositionOnMount:b,...S}=e,{isOpen:k,onClose:E,onOpen:_,onToggle:T}=N$(e),A=w.useRef(null),I=w.useRef(null),R=w.useRef(null),D=w.useRef(!1),j=w.useRef(!1);k&&(j.current=!0);const[z,V]=w.useState(!1),[K,te]=w.useState(!1),q=w.useId(),F=i??q,[U,X,Z,W]=["popover-trigger","popover-content","popover-header","popover-body"].map(ut=>`${ut}-${F}`),{referenceRef:Q,getArrowProps:ie,getPopperProps:fe,getArrowInnerProps:Se,forceUpdate:Te}=D$({...S,enabled:k||!!b}),ye=N1e({isOpen:k,ref:R});yme({enabled:k,ref:I}),f0e(R,{focusRef:I,visible:k,shouldFocus:o&&u===Lg.click}),p0e(R,{focusRef:r,visible:k,shouldFocus:a&&u===Lg.click});const He=j$({wasSelected:j.current,enabled:m,mode:v,isSelected:ye.present}),Ne=w.useCallback((ut={},Mt=null)=>{const at={...ut,style:{...ut.style,transformOrigin:oi.transformOrigin.varRef,[oi.arrowSize.var]:s?`${s}px`:void 0,[oi.arrowShadowColor.var]:l},ref:Yn(R,Mt),children:He?ut.children:null,id:X,tabIndex:-1,role:"dialog",onKeyDown:Ol(ut.onKeyDown,Ct=>{n&&Ct.key==="Escape"&&E()}),onBlur:Ol(ut.onBlur,Ct=>{const Zt=oI(Ct),le=oC(R.current,Zt),De=oC(I.current,Zt);k&&t&&(!le&&!De)&&E()}),"aria-labelledby":z?Z:void 0,"aria-describedby":K?W:void 0};return u===Lg.hover&&(at.role="tooltip",at.onMouseEnter=Ol(ut.onMouseEnter,()=>{D.current=!0}),at.onMouseLeave=Ol(ut.onMouseLeave,Ct=>{Ct.nativeEvent.relatedTarget!==null&&(D.current=!1,setTimeout(()=>E(),h))})),at},[He,X,z,Z,K,W,u,n,E,k,t,h,l,s]),tt=w.useCallback((ut={},Mt=null)=>fe({...ut,style:{visibility:k?"visible":"hidden",...ut.style}},Mt),[k,fe]),_e=w.useCallback((ut,Mt=null)=>({...ut,ref:Yn(Mt,A,Q)}),[A,Q]),lt=w.useRef(),wt=w.useRef(),ct=w.useCallback(ut=>{A.current==null&&Q(ut)},[Q]),mt=w.useCallback((ut={},Mt=null)=>{const at={...ut,ref:Yn(I,Mt,ct),id:U,"aria-haspopup":"dialog","aria-expanded":k,"aria-controls":X};return u===Lg.click&&(at.onClick=Ol(ut.onClick,T)),u===Lg.hover&&(at.onFocus=Ol(ut.onFocus,()=>{lt.current===void 0&&_()}),at.onBlur=Ol(ut.onBlur,Ct=>{const Zt=oI(Ct),le=!oC(R.current,Zt);k&&t&&le&&E()}),at.onKeyDown=Ol(ut.onKeyDown,Ct=>{Ct.key==="Escape"&&E()}),at.onMouseEnter=Ol(ut.onMouseEnter,()=>{D.current=!0,lt.current=window.setTimeout(()=>_(),d)}),at.onMouseLeave=Ol(ut.onMouseLeave,()=>{D.current=!1,lt.current&&(clearTimeout(lt.current),lt.current=void 0),wt.current=window.setTimeout(()=>{D.current===!1&&E()},h)})),at},[U,k,X,u,ct,T,_,t,E,d,h]);w.useEffect(()=>()=>{lt.current&&clearTimeout(lt.current),wt.current&&clearTimeout(wt.current)},[]);const St=w.useCallback((ut={},Mt=null)=>({...ut,id:Z,ref:Yn(Mt,at=>{V(!!at)})}),[Z]),Ae=w.useCallback((ut={},Mt=null)=>({...ut,id:W,ref:Yn(Mt,at=>{te(!!at)})}),[W]);return{forceUpdate:Te,isOpen:k,onAnimationComplete:ye.onComplete,onClose:E,getAnchorProps:_e,getArrowProps:ie,getArrowInnerProps:Se,getPopoverPositionerProps:tt,getPopoverProps:Ne,getTriggerProps:mt,getHeaderProps:St,getBodyProps:Ae}}function oC(e,t){return e===t||(e==null?void 0:e.contains(t))}function oI(e){const t=e.currentTarget.ownerDocument.activeElement;return e.relatedTarget??t}function ME(e){const t=Yi("Popover",e),{children:n,...r}=En(e),i=h0(),o=obe({...r,direction:i.direction});return N.createElement(rbe,{value:o},N.createElement(ibe,{value:t},ebe(n,{isOpen:o.isOpen,onClose:o.onClose,forceUpdate:o.forceUpdate})))}ME.displayName="Popover";function IE(e){const{bg:t,bgColor:n,backgroundColor:r}=e,{getArrowProps:i,getArrowInnerProps:o}=up(),a=Oy(),s=t??n??r;return N.createElement(Ce.div,{...i(),className:"chakra-popover__arrow-positioner"},N.createElement(Ce.div,{className:Ay("chakra-popover__arrow",e.className),...o(e),__css:{...a.arrow,"--popper-arrow-bg":s?`colors.${s}, ${s}`:void 0}}))}IE.displayName="PopoverArrow";var abe=Oe(function(t,n){const{getBodyProps:r}=up(),i=Oy();return N.createElement(Ce.div,{...r(t,n),className:Ay("chakra-popover__body",t.className),__css:i.body})});abe.displayName="PopoverBody";var sbe=Oe(function(t,n){const{onClose:r}=up(),i=Oy();return N.createElement(ex,{size:"sm",onClick:r,className:Ay("chakra-popover__close-btn",t.className),__css:i.closeButton,ref:n,...t})});sbe.displayName="PopoverCloseButton";function lbe(e){if(e)return{enter:{...e.enter,visibility:"visible"},exit:{...e.exit,transitionEnd:{visibility:"hidden"}}}}var ube={exit:{opacity:0,scale:.95,transition:{duration:.1,ease:[.4,0,1,1]}},enter:{scale:1,opacity:1,transition:{duration:.15,ease:[0,0,.2,1]}}},cbe=Ce(du.section),DV=Oe(function(t,n){const{variants:r=ube,...i}=t,{isOpen:o}=up();return N.createElement(cbe,{ref:n,variants:lbe(r),initial:!1,animate:o?"enter":"exit",...i})});DV.displayName="PopoverTransition";var RE=Oe(function(t,n){const{rootProps:r,motionProps:i,...o}=t,{getPopoverProps:a,getPopoverPositionerProps:s,onAnimationComplete:l}=up(),u=Oy(),d={position:"relative",display:"flex",flexDirection:"column",...u.content};return N.createElement(Ce.div,{...s(r),__css:u.popper,className:"chakra-popover__popper"},N.createElement(DV,{...i,...a(o,n),onAnimationComplete:nbe(l,o.onAnimationComplete),className:Ay("chakra-popover__content",t.className),__css:d}))});RE.displayName="PopoverContent";var dbe=Oe(function(t,n){const{getHeaderProps:r}=up(),i=Oy();return N.createElement(Ce.header,{...r(t,n),className:Ay("chakra-popover__header",t.className),__css:i.header})});dbe.displayName="PopoverHeader";function DE(e){const t=w.Children.only(e.children),{getTriggerProps:n}=up();return w.cloneElement(t,n(t.props,t.ref))}DE.displayName="PopoverTrigger";function fbe(e,t,n){return(e-t)*100/(n-t)}var hbe=tf({"0%":{strokeDasharray:"1, 400",strokeDashoffset:"0"},"50%":{strokeDasharray:"400, 400",strokeDashoffset:"-100"},"100%":{strokeDasharray:"400, 400",strokeDashoffset:"-260"}}),pbe=tf({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),gbe=tf({"0%":{left:"-40%"},"100%":{left:"100%"}}),mbe=tf({from:{backgroundPosition:"1rem 0"},to:{backgroundPosition:"0 0"}});function NV(e){const{value:t=0,min:n,max:r,valueText:i,getValueText:o,isIndeterminate:a,role:s="progressbar"}=e,l=fbe(t,n,r);return{bind:{"data-indeterminate":a?"":void 0,"aria-valuemax":r,"aria-valuemin":n,"aria-valuenow":a?void 0:t,"aria-valuetext":(()=>{if(t!=null)return typeof o=="function"?o(t,l):i})(),role:s},percent:l,value:t}}var jV=e=>{const{size:t,isIndeterminate:n,...r}=e;return N.createElement(Ce.svg,{viewBox:"0 0 100 100",__css:{width:t,height:t,animation:n?`${pbe} 2s linear infinite`:void 0},...r})};jV.displayName="Shape";var G9=e=>N.createElement(Ce.circle,{cx:50,cy:50,r:42,fill:"transparent",...e});G9.displayName="Circle";var vbe=Oe((e,t)=>{const{size:n="48px",max:r=100,min:i=0,valueText:o,getValueText:a,value:s,capIsRound:l,children:u,thickness:d="10px",color:h="#0078d4",trackColor:m="#edebe9",isIndeterminate:v,...b}=e,S=NV({min:i,max:r,value:s,valueText:o,getValueText:a,isIndeterminate:v}),k=v?void 0:(S.percent??0)*2.64,E=k==null?void 0:`${k} ${264-k}`,_=v?{css:{animation:`${hbe} 1.5s linear infinite`}}:{strokeDashoffset:66,strokeDasharray:E,transitionProperty:"stroke-dasharray, stroke",transitionDuration:"0.6s",transitionTimingFunction:"ease"},T={display:"inline-block",position:"relative",verticalAlign:"middle",fontSize:n};return N.createElement(Ce.div,{ref:t,className:"chakra-progress",...S.bind,...b,__css:T},N.createElement(jV,{size:n,isIndeterminate:v},N.createElement(G9,{stroke:m,strokeWidth:d,className:"chakra-progress__track"}),N.createElement(G9,{stroke:h,strokeWidth:d,className:"chakra-progress__indicator",strokeLinecap:l?"round":void 0,opacity:S.value===0&&!v?0:void 0,..._})),u)});vbe.displayName="CircularProgress";var[ybe,bbe]=Mn({name:"ProgressStylesContext",errorMessage:`useProgressStyles returned is 'undefined'. Seems you forgot to wrap the components in " " `}),Sbe=Oe((e,t)=>{const{min:n,max:r,value:i,isIndeterminate:o,role:a,...s}=e,l=NV({value:i,min:n,max:r,isIndeterminate:o,role:a}),d={height:"100%",...bbe().filledTrack};return N.createElement(Ce.div,{ref:t,style:{width:`${l.percent}%`,...s.style},...l.bind,...s,__css:d})}),BV=Oe((e,t)=>{var n;const{value:r,min:i=0,max:o=100,hasStripe:a,isAnimated:s,children:l,borderRadius:u,isIndeterminate:d,"aria-label":h,"aria-labelledby":m,title:v,role:b,...S}=En(e),k=Yi("Progress",e),E=u??((n=k.track)==null?void 0:n.borderRadius),_={animation:`${mbe} 1s linear infinite`},I={...!d&&a&&s&&_,...d&&{position:"absolute",willChange:"left",minWidth:"50%",animation:`${gbe} 1s ease infinite normal none running`}},R={overflow:"hidden",position:"relative",...k.track};return N.createElement(Ce.div,{ref:t,borderRadius:E,__css:R,...S},N.createElement(ybe,{value:k},N.createElement(Sbe,{"aria-label":h,"aria-labelledby":m,min:i,max:o,value:r,isIndeterminate:d,css:I,borderRadius:E,title:v,role:b}),l))});BV.displayName="Progress";var xbe=Ce("div",{baseStyle:{fontSize:"0.24em",top:"50%",left:"50%",width:"100%",textAlign:"center",position:"absolute",transform:"translate(-50%, -50%)"}});xbe.displayName="CircularProgressLabel";var wbe=(...e)=>e.filter(Boolean).join(" "),Cbe=e=>e?"":void 0;function _be(e,t){const n={},r={};for(const[i,o]of Object.entries(e))t.includes(i)?n[i]=o:r[i]=o;return[n,r]}var FV=Oe(function(t,n){const{children:r,placeholder:i,className:o,...a}=t;return N.createElement(Ce.select,{...a,ref:n,className:wbe("chakra-select",o)},i&&N.createElement("option",{value:""},i),r)});FV.displayName="SelectField";var $V=Oe((e,t)=>{var n;const r=Yi("Select",e),{rootProps:i,placeholder:o,icon:a,color:s,height:l,h:u,minH:d,minHeight:h,iconColor:m,iconSize:v,...b}=En(e),[S,k]=_be(b,zte),E=sk(k),_={width:"100%",height:"fit-content",position:"relative",color:s},T={paddingEnd:"2rem",...r.field,_focus:{zIndex:"unset",...(n=r.field)==null?void 0:n._focus}};return N.createElement(Ce.div,{className:"chakra-select__wrapper",__css:_,...S,...i},N.createElement(FV,{ref:t,height:u??l,minH:d??h,placeholder:o,...E,__css:T},e.children),N.createElement(zV,{"data-disabled":Cbe(E.disabled),...(m||s)&&{color:m||s},__css:r.icon,...v&&{fontSize:v}},a))});$V.displayName="Select";var kbe=e=>N.createElement("svg",{viewBox:"0 0 24 24",...e},N.createElement("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})),Ebe=Ce("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),zV=e=>{const{children:t=N.createElement(kbe,null),...n}=e,r=w.cloneElement(t,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return N.createElement(Ebe,{...n,className:"chakra-select__icon-wrapper"},w.isValidElement(t)?r:null)};zV.displayName="SelectIcon";function Pbe(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Tbe(e){const t=Abe(e);return typeof t.PointerEvent<"u"&&e instanceof t.PointerEvent?e.pointerType==="mouse":e instanceof t.MouseEvent}function HV(e){return!!e.touches}function Lbe(e){return HV(e)&&e.touches.length>1}function Abe(e){return e.view??window}function Obe(e,t="page"){const n=e.touches[0]||e.changedTouches[0];return{x:n[`${t}X`],y:n[`${t}Y`]}}function Mbe(e,t="page"){return{x:e[`${t}X`],y:e[`${t}Y`]}}function VV(e,t="page"){return HV(e)?Obe(e,t):Mbe(e,t)}function Ibe(e){return t=>{const n=Tbe(t);(!n||n&&t.button===0)&&e(t)}}function Rbe(e,t=!1){function n(i){e(i,{point:VV(i)})}return t?Ibe(n):n}function E4(e,t,n,r){return Pbe(e,t,Rbe(n,t==="pointerdown"),r)}function WV(e){const t=w.useRef(null);return t.current=e,t}var Dbe=class{constructor(e,t,n){sn(this,"history",[]);sn(this,"startEvent",null);sn(this,"lastEvent",null);sn(this,"lastEventInfo",null);sn(this,"handlers",{});sn(this,"removeListeners",()=>{});sn(this,"threshold",3);sn(this,"win");sn(this,"updatePoint",()=>{if(!(this.lastEvent&&this.lastEventInfo))return;const e=aC(this.lastEventInfo,this.history),t=this.startEvent!==null,n=Fbe(e.offset,{x:0,y:0})>=this.threshold;if(!t&&!n)return;const{timestamp:r}=OL();this.history.push({...e.point,timestamp:r});const{onStart:i,onMove:o}=this.handlers;t||(i==null||i(this.lastEvent,e),this.startEvent=this.lastEvent),o==null||o(this.lastEvent,e)});sn(this,"onPointerMove",(e,t)=>{this.lastEvent=e,this.lastEventInfo=t,ere.update(this.updatePoint,!0)});sn(this,"onPointerUp",(e,t)=>{const n=aC(t,this.history),{onEnd:r,onSessionEnd:i}=this.handlers;i==null||i(e,n),this.end(),!(!r||!this.startEvent)&&(r==null||r(e,n))});if(this.win=e.view??window,Lbe(e))return;this.handlers=t,n&&(this.threshold=n),e.stopPropagation(),e.preventDefault();const r={point:VV(e)},{timestamp:i}=OL();this.history=[{...r.point,timestamp:i}];const{onSessionStart:o}=t;o==null||o(e,aC(r,this.history)),this.removeListeners=Bbe(E4(this.win,"pointermove",this.onPointerMove),E4(this.win,"pointerup",this.onPointerUp),E4(this.win,"pointercancel",this.onPointerUp))}updateHandlers(e){this.handlers=e}end(){var e;(e=this.removeListeners)==null||e.call(this),tre.update(this.updatePoint)}};function aI(e,t){return{x:e.x-t.x,y:e.y-t.y}}function aC(e,t){return{point:e.point,delta:aI(e.point,t[t.length-1]),offset:aI(e.point,t[0]),velocity:jbe(t,.1)}}var Nbe=e=>e*1e3;function jbe(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=e[e.length-1];for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Nbe(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Bbe(...e){return t=>e.reduce((n,r)=>r(n),t)}function sC(e,t){return Math.abs(e-t)}function sI(e){return"x"in e&&"y"in e}function Fbe(e,t){if(typeof e=="number"&&typeof t=="number")return sC(e,t);if(sI(e)&&sI(t)){const n=sC(e.x,t.x),r=sC(e.y,t.y);return Math.sqrt(n**2+r**2)}return 0}function UV(e,t){const{onPan:n,onPanStart:r,onPanEnd:i,onPanSessionStart:o,onPanSessionEnd:a,threshold:s}=t,l=Boolean(n||r||i||o||a),u=w.useRef(null),d=WV({onSessionStart:o,onSessionEnd:a,onStart:r,onMove:n,onEnd(h,m){u.current=null,i==null||i(h,m)}});w.useEffect(()=>{var h;(h=u.current)==null||h.updateHandlers(d.current)}),w.useEffect(()=>{const h=e.current;if(!h||!l)return;function m(v){u.current=new Dbe(v,d.current,s)}return E4(h,"pointerdown",m)},[e,l,d,s]),w.useEffect(()=>()=>{var h;(h=u.current)==null||h.end(),u.current=null},[])}function $be(e,t){if(!e){t(void 0);return}t({width:e.offsetWidth,height:e.offsetHeight});const n=e.ownerDocument.defaultView??window,r=new n.ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const[o]=i;let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;t({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}var zbe=Boolean(globalThis==null?void 0:globalThis.document)?w.useLayoutEffect:w.useEffect;function Hbe(e,t){var n;if(!e||!e.parentElement)return;const r=((n=e.ownerDocument)==null?void 0:n.defaultView)??window,i=new r.MutationObserver(()=>{t()});return i.observe(e.parentElement,{childList:!0}),()=>{i.disconnect()}}function GV({getNodes:e,observeMutation:t=!0}){const[n,r]=w.useState([]),[i,o]=w.useState(0);return zbe(()=>{const a=e(),s=a.map((l,u)=>$be(l,d=>{r(h=>[...h.slice(0,u),d,...h.slice(u+1)])}));if(t){const l=a[0];s.push(Hbe(l,()=>{o(u=>u+1)}))}return()=>{s.forEach(l=>{l==null||l()})}},[i]),n}function Vbe(e){return typeof e=="object"&&e!==null&&"current"in e}function Wbe(e){const[t]=GV({observeMutation:!1,getNodes(){return[Vbe(e)?e.current:e]}});return t}var Ube=Object.getOwnPropertyNames,Gbe=(e,t)=>function(){return e&&(t=(0,e[Ube(e)[0]])(e=0)),t},lf=Gbe({"../../../react-shim.js"(){}});lf();lf();lf();var Ja=e=>e?"":void 0,Mm=e=>e?!0:void 0,uf=(...e)=>e.filter(Boolean).join(" ");lf();function Im(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}lf();lf();function qbe(e){return{root:`slider-root-${e}`,getThumb:t=>`slider-thumb-${e}-${t}`,getInput:t=>`slider-input-${e}-${t}`,track:`slider-track-${e}`,innerTrack:`slider-filled-track-${e}`,getMarker:t=>`slider-marker-${e}-${t}`,output:`slider-output-${e}`}}function Cv(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}var P4={width:0,height:0},wb=e=>e||P4;function qV(e){const{orientation:t,thumbPercents:n,thumbRects:r,isReversed:i}=e,o=S=>{const k=r[S]??P4;return{position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none",...Cv({orientation:t,vertical:{bottom:`calc(${n[S]}% - ${k.height/2}px)`},horizontal:{left:`calc(${n[S]}% - ${k.width/2}px)`}})}},a=t==="vertical"?r.reduce((S,k)=>wb(S).height>wb(k).height?S:k,P4):r.reduce((S,k)=>wb(S).width>wb(k).width?S:k,P4),s={position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0,...Cv({orientation:t,vertical:a?{paddingLeft:a.width/2,paddingRight:a.width/2}:{},horizontal:a?{paddingTop:a.height/2,paddingBottom:a.height/2}:{}})},l={position:"absolute",...Cv({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",height:"100%"},horizontal:{top:"50%",transform:"translateY(-50%)",width:"100%"}})},u=n.length===1,d=[0,i?100-n[0]:n[0]],h=u?d:n;let m=h[0];!u&&i&&(m=100-m);const v=Math.abs(h[h.length-1]-h[0]),b={...l,...Cv({orientation:t,vertical:i?{height:`${v}%`,top:`${m}%`}:{height:`${v}%`,bottom:`${m}%`},horizontal:i?{width:`${v}%`,right:`${m}%`}:{width:`${v}%`,left:`${m}%`}})};return{trackStyle:l,innerTrackStyle:b,rootStyle:s,getThumbStyle:o}}function YV(e){const{isReversed:t,direction:n,orientation:r}=e;return n==="ltr"||r==="vertical"?t:!t}function Ybe(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:d,isReadOnly:h,onChangeStart:m,onChangeEnd:v,step:b=1,getAriaValueText:S,"aria-valuetext":k,"aria-label":E,"aria-labelledby":_,name:T,focusThumbOnChange:A=!0,minStepsBetweenThumbs:I=0,...R}=e,D=Er(m),j=Er(v),z=Er(S),V=YV({isReversed:a,direction:s,orientation:l}),[K,te]=NS({value:i,defaultValue:o??[25,75],onChange:r});if(!Array.isArray(K))throw new TypeError(`[range-slider] You passed an invalid value for \`value\` or \`defaultValue\`, expected \`Array\` but got \`${typeof K}\``);const[q,F]=w.useState(!1),[U,X]=w.useState(!1),[Z,W]=w.useState(-1),Q=!(d||h),ie=w.useRef(K),fe=K.map(Ke=>Cm(Ke,t,n)),Se=I*b,Te=Kbe(fe,t,n,Se),ye=w.useRef({eventSource:null,value:[],valueBounds:[]});ye.current.value=fe,ye.current.valueBounds=Te;const He=fe.map(Ke=>n-Ke+t),tt=(V?He:fe).map(Ke=>u5(Ke,t,n)),_e=l==="vertical",lt=w.useRef(null),wt=w.useRef(null),ct=GV({getNodes(){const Ke=wt.current,xt=Ke==null?void 0:Ke.querySelectorAll("[role=slider]");return xt?Array.from(xt):[]}}),mt=w.useId(),Ae=qbe(u??mt),ut=w.useCallback(Ke=>{var xt;if(!lt.current)return;ye.current.eventSource="pointer";const ft=lt.current.getBoundingClientRect(),{clientX:Ht,clientY:rn}=((xt=Ke.touches)==null?void 0:xt[0])??Ke,pr=_e?ft.bottom-rn:Ht-ft.left,Mo=_e?ft.height:ft.width;let Oi=pr/Mo;return V&&(Oi=1-Oi),JF(Oi,t,n)},[_e,V,n,t]),Mt=(n-t)/10,at=b||(n-t)/100,Ct=w.useMemo(()=>({setValueAtIndex(Ke,xt){if(!Q)return;const ft=ye.current.valueBounds[Ke];xt=parseFloat(V7(xt,ft.min,at)),xt=Cm(xt,ft.min,ft.max);const Ht=[...ye.current.value];Ht[Ke]=xt,te(Ht)},setActiveIndex:W,stepUp(Ke,xt=at){const ft=ye.current.value[Ke],Ht=V?ft-xt:ft+xt;Ct.setValueAtIndex(Ke,Ht)},stepDown(Ke,xt=at){const ft=ye.current.value[Ke],Ht=V?ft+xt:ft-xt;Ct.setValueAtIndex(Ke,Ht)},reset(){te(ie.current)}}),[at,V,te,Q]),Zt=w.useCallback(Ke=>{const xt=Ke.key,Ht={ArrowRight:()=>Ct.stepUp(Z),ArrowUp:()=>Ct.stepUp(Z),ArrowLeft:()=>Ct.stepDown(Z),ArrowDown:()=>Ct.stepDown(Z),PageUp:()=>Ct.stepUp(Z,Mt),PageDown:()=>Ct.stepDown(Z,Mt),Home:()=>{const{min:rn}=Te[Z];Ct.setValueAtIndex(Z,rn)},End:()=>{const{max:rn}=Te[Z];Ct.setValueAtIndex(Z,rn)}}[xt];Ht&&(Ke.preventDefault(),Ke.stopPropagation(),Ht(Ke),ye.current.eventSource="keyboard")},[Ct,Z,Mt,Te]),{getThumbStyle:le,rootStyle:De,trackStyle:Ue,innerTrackStyle:Ye}=w.useMemo(()=>qV({isReversed:V,orientation:l,thumbRects:ct,thumbPercents:tt}),[V,l,tt,ct]),we=w.useCallback(Ke=>{var xt;const ft=Ke??Z;if(ft!==-1&&A){const Ht=Ae.getThumb(ft),rn=(xt=wt.current)==null?void 0:xt.ownerDocument.getElementById(Ht);rn&&setTimeout(()=>rn.focus())}},[A,Z,Ae]);Vd(()=>{ye.current.eventSource==="keyboard"&&(j==null||j(ye.current.value))},[fe,j]);const je=Ke=>{const xt=ut(Ke)||0,ft=ye.current.value.map(Oi=>Math.abs(Oi-xt)),Ht=Math.min(...ft);let rn=ft.indexOf(Ht);const pr=ft.filter(Oi=>Oi===Ht);pr.length>1&&xt>ye.current.value[rn]&&(rn=rn+pr.length-1),W(rn),Ct.setValueAtIndex(rn,xt),we(rn)},_t=Ke=>{if(Z==-1)return;const xt=ut(Ke)||0;W(Z),Ct.setValueAtIndex(Z,xt),we(Z)};UV(wt,{onPanSessionStart(Ke){Q&&(F(!0),je(Ke),D==null||D(ye.current.value))},onPanSessionEnd(){Q&&(F(!1),j==null||j(ye.current.value))},onPan(Ke){Q&&_t(Ke)}});const Dt=w.useCallback((Ke={},xt=null)=>({...Ke,...R,id:Ae.root,ref:Yn(xt,wt),tabIndex:-1,"aria-disabled":Mm(d),"data-focused":Ja(U),style:{...Ke.style,...De}}),[R,d,U,De,Ae]),Le=w.useCallback((Ke={},xt=null)=>({...Ke,ref:Yn(xt,lt),id:Ae.track,"data-disabled":Ja(d),style:{...Ke.style,...Ue}}),[d,Ue,Ae]),At=w.useCallback((Ke={},xt=null)=>({...Ke,ref:xt,id:Ae.innerTrack,style:{...Ke.style,...Ye}}),[Ye,Ae]),Fe=w.useCallback((Ke,xt=null)=>{const{index:ft,...Ht}=Ke,rn=fe[ft];if(rn==null)throw new TypeError(`[range-slider > thumb] Cannot find value at index \`${ft}\`. The \`value\` or \`defaultValue\` length is : ${fe.length}`);const pr=Te[ft];return{...Ht,ref:xt,role:"slider",tabIndex:Q?0:void 0,id:Ae.getThumb(ft),"data-active":Ja(q&&Z===ft),"aria-valuetext":(z==null?void 0:z(rn))??(k==null?void 0:k[ft]),"aria-valuemin":pr.min,"aria-valuemax":pr.max,"aria-valuenow":rn,"aria-orientation":l,"aria-disabled":Mm(d),"aria-readonly":Mm(h),"aria-label":E==null?void 0:E[ft],"aria-labelledby":E!=null&&E[ft]||_==null?void 0:_[ft],style:{...Ke.style,...le(ft)},onKeyDown:Im(Ke.onKeyDown,Zt),onFocus:Im(Ke.onFocus,()=>{X(!0),W(ft)}),onBlur:Im(Ke.onBlur,()=>{X(!1),W(-1)})}},[Ae,fe,Te,Q,q,Z,z,k,l,d,h,E,_,le,Zt,X]),vt=w.useCallback((Ke={},xt=null)=>({...Ke,ref:xt,id:Ae.output,htmlFor:fe.map((ft,Ht)=>Ae.getThumb(Ht)).join(" "),"aria-live":"off"}),[Ae,fe]),nn=w.useCallback((Ke,xt=null)=>{const{value:ft,...Ht}=Ke,rn=!(ftn),pr=ft>=fe[0]&&ft<=fe[fe.length-1];let Mo=u5(ft,t,n);Mo=V?100-Mo:Mo;const Oi={position:"absolute",pointerEvents:"none",...Cv({orientation:l,vertical:{bottom:`${Mo}%`},horizontal:{left:`${Mo}%`}})};return{...Ht,ref:xt,id:Ae.getMarker(Ke.value),role:"presentation","aria-hidden":!0,"data-disabled":Ja(d),"data-invalid":Ja(!rn),"data-highlighted":Ja(pr),style:{...Ke.style,...Oi}}},[d,V,n,t,l,fe,Ae]),Rn=w.useCallback((Ke,xt=null)=>{const{index:ft,...Ht}=Ke;return{...Ht,ref:xt,id:Ae.getInput(ft),type:"hidden",value:fe[ft],name:Array.isArray(T)?T[ft]:`${T}-${ft}`}},[T,fe,Ae]);return{state:{value:fe,isFocused:U,isDragging:q,getThumbPercent:Ke=>tt[Ke],getThumbMinValue:Ke=>Te[Ke].min,getThumbMaxValue:Ke=>Te[Ke].max},actions:Ct,getRootProps:Dt,getTrackProps:Le,getInnerTrackProps:At,getThumbProps:Fe,getMarkerProps:nn,getInputProps:Rn,getOutputProps:vt}}function Kbe(e,t,n,r){return e.map((i,o)=>{const a=o===0?t:e[o-1]+r,s=o===e.length-1?n:e[o+1]-r;return{min:a,max:s}})}var[Xbe,xx]=Mn({name:"SliderContext",errorMessage:"useSliderContext: `context` is undefined. Seems you forgot to wrap all slider components within "}),[Zbe,NE]=Mn({name:"RangeSliderStylesContext",errorMessage:`useRangeSliderStyles returned is 'undefined'. Seems you forgot to wrap the components in " " `}),KV=Oe(function(t,n){const r=Yi("Slider",t),i=En(t),{direction:o}=h0();i.direction=o;const{getRootProps:a,...s}=Ybe(i),l=w.useMemo(()=>({...s,name:t.name}),[s,t.name]);return N.createElement(Xbe,{value:l},N.createElement(Zbe,{value:r},N.createElement(Ce.div,{...a({},n),className:"chakra-slider",__css:r.container},t.children)))});KV.defaultProps={orientation:"horizontal"};KV.displayName="RangeSlider";var Qbe=Oe(function(t,n){const{getThumbProps:r,getInputProps:i,name:o}=xx(),a=NE(),s=r(t,n);return N.createElement(Ce.div,{...s,className:uf("chakra-slider__thumb",t.className),__css:a.thumb},s.children,o&&N.createElement("input",{...i({index:t.index})}))});Qbe.displayName="RangeSliderThumb";var Jbe=Oe(function(t,n){const{getTrackProps:r}=xx(),i=NE(),o=r(t,n);return N.createElement(Ce.div,{...o,className:uf("chakra-slider__track",t.className),__css:i.track,"data-testid":"chakra-range-slider-track"})});Jbe.displayName="RangeSliderTrack";var e4e=Oe(function(t,n){const{getInnerTrackProps:r}=xx(),i=NE(),o=r(t,n);return N.createElement(Ce.div,{...o,className:"chakra-slider__filled-track",__css:i.filledTrack})});e4e.displayName="RangeSliderFilledTrack";var t4e=Oe(function(t,n){const{getMarkerProps:r}=xx(),i=r(t,n);return N.createElement(Ce.div,{...i,className:uf("chakra-slider__marker",t.className)})});t4e.displayName="RangeSliderMark";lf();lf();function n4e(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:d,isReadOnly:h,onChangeStart:m,onChangeEnd:v,step:b=1,getAriaValueText:S,"aria-valuetext":k,"aria-label":E,"aria-labelledby":_,name:T,focusThumbOnChange:A=!0,...I}=e,R=Er(m),D=Er(v),j=Er(S),z=YV({isReversed:a,direction:s,orientation:l}),[V,K]=NS({value:i,defaultValue:o??i4e(t,n),onChange:r}),[te,q]=w.useState(!1),[F,U]=w.useState(!1),X=!(d||h),Z=(n-t)/10,W=b||(n-t)/100,Q=Cm(V,t,n),ie=n-Q+t,Se=u5(z?ie:Q,t,n),Te=l==="vertical",ye=WV({min:t,max:n,step:b,isDisabled:d,value:Q,isInteractive:X,isReversed:z,isVertical:Te,eventSource:null,focusThumbOnChange:A,orientation:l}),He=w.useRef(null),Ne=w.useRef(null),tt=w.useRef(null),_e=w.useId(),lt=u??_e,[wt,ct]=[`slider-thumb-${lt}`,`slider-track-${lt}`],mt=w.useCallback(Fe=>{var vt;if(!He.current)return;const nn=ye.current;nn.eventSource="pointer";const Rn=He.current.getBoundingClientRect(),{clientX:Ke,clientY:xt}=((vt=Fe.touches)==null?void 0:vt[0])??Fe,ft=Te?Rn.bottom-xt:Ke-Rn.left,Ht=Te?Rn.height:Rn.width;let rn=ft/Ht;z&&(rn=1-rn);let pr=JF(rn,nn.min,nn.max);return nn.step&&(pr=parseFloat(V7(pr,nn.min,nn.step))),pr=Cm(pr,nn.min,nn.max),pr},[Te,z,ye]),St=w.useCallback(Fe=>{const vt=ye.current;vt.isInteractive&&(Fe=parseFloat(V7(Fe,vt.min,W)),Fe=Cm(Fe,vt.min,vt.max),K(Fe))},[W,K,ye]),Ae=w.useMemo(()=>({stepUp(Fe=W){const vt=z?Q-Fe:Q+Fe;St(vt)},stepDown(Fe=W){const vt=z?Q+Fe:Q-Fe;St(vt)},reset(){St(o||0)},stepTo(Fe){St(Fe)}}),[St,z,Q,W,o]),ut=w.useCallback(Fe=>{const vt=ye.current,Rn={ArrowRight:()=>Ae.stepUp(),ArrowUp:()=>Ae.stepUp(),ArrowLeft:()=>Ae.stepDown(),ArrowDown:()=>Ae.stepDown(),PageUp:()=>Ae.stepUp(Z),PageDown:()=>Ae.stepDown(Z),Home:()=>St(vt.min),End:()=>St(vt.max)}[Fe.key];Rn&&(Fe.preventDefault(),Fe.stopPropagation(),Rn(Fe),vt.eventSource="keyboard")},[Ae,St,Z,ye]),Mt=(j==null?void 0:j(Q))??k,at=Wbe(Ne),{getThumbStyle:Ct,rootStyle:Zt,trackStyle:le,innerTrackStyle:De}=w.useMemo(()=>{const Fe=ye.current,vt=at??{width:0,height:0};return qV({isReversed:z,orientation:Fe.orientation,thumbRects:[vt],thumbPercents:[Se]})},[z,at,Se,ye]),Ue=w.useCallback(()=>{ye.current.focusThumbOnChange&&setTimeout(()=>{var vt;return(vt=Ne.current)==null?void 0:vt.focus()})},[ye]);Vd(()=>{const Fe=ye.current;Ue(),Fe.eventSource==="keyboard"&&(D==null||D(Fe.value))},[Q,D]);function Ye(Fe){const vt=mt(Fe);vt!=null&&vt!==ye.current.value&&K(vt)}UV(tt,{onPanSessionStart(Fe){const vt=ye.current;vt.isInteractive&&(q(!0),Ue(),Ye(Fe),R==null||R(vt.value))},onPanSessionEnd(){const Fe=ye.current;Fe.isInteractive&&(q(!1),D==null||D(Fe.value))},onPan(Fe){ye.current.isInteractive&&Ye(Fe)}});const we=w.useCallback((Fe={},vt=null)=>({...Fe,...I,ref:Yn(vt,tt),tabIndex:-1,"aria-disabled":Mm(d),"data-focused":Ja(F),style:{...Fe.style,...Zt}}),[I,d,F,Zt]),je=w.useCallback((Fe={},vt=null)=>({...Fe,ref:Yn(vt,He),id:ct,"data-disabled":Ja(d),style:{...Fe.style,...le}}),[d,ct,le]),_t=w.useCallback((Fe={},vt=null)=>({...Fe,ref:vt,style:{...Fe.style,...De}}),[De]),Dt=w.useCallback((Fe={},vt=null)=>({...Fe,ref:Yn(vt,Ne),role:"slider",tabIndex:X?0:void 0,id:wt,"data-active":Ja(te),"aria-valuetext":Mt,"aria-valuemin":t,"aria-valuemax":n,"aria-valuenow":Q,"aria-orientation":l,"aria-disabled":Mm(d),"aria-readonly":Mm(h),"aria-label":E,"aria-labelledby":E?void 0:_,style:{...Fe.style,...Ct(0)},onKeyDown:Im(Fe.onKeyDown,ut),onFocus:Im(Fe.onFocus,()=>U(!0)),onBlur:Im(Fe.onBlur,()=>U(!1))}),[X,wt,te,Mt,t,n,Q,l,d,h,E,_,Ct,ut]),Le=w.useCallback((Fe,vt=null)=>{const nn=!(Fe.valuen),Rn=Q>=Fe.value,Ke=u5(Fe.value,t,n),xt={position:"absolute",pointerEvents:"none",...r4e({orientation:l,vertical:{bottom:z?`${100-Ke}%`:`${Ke}%`},horizontal:{left:z?`${100-Ke}%`:`${Ke}%`}})};return{...Fe,ref:vt,role:"presentation","aria-hidden":!0,"data-disabled":Ja(d),"data-invalid":Ja(!nn),"data-highlighted":Ja(Rn),style:{...Fe.style,...xt}}},[d,z,n,t,l,Q]),At=w.useCallback((Fe={},vt=null)=>({...Fe,ref:vt,type:"hidden",value:Q,name:T}),[T,Q]);return{state:{value:Q,isFocused:F,isDragging:te},actions:Ae,getRootProps:we,getTrackProps:je,getInnerTrackProps:_t,getThumbProps:Dt,getMarkerProps:Le,getInputProps:At}}function r4e(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}function i4e(e,t){return t "}),[a4e,Cx]=Mn({name:"SliderStylesContext",hookName:"useSliderStyles",providerName:" "}),jE=Oe((e,t)=>{const n=Yi("Slider",e),r=En(e),{direction:i}=h0();r.direction=i;const{getInputProps:o,getRootProps:a,...s}=n4e(r),l=a(),u=o({},t);return N.createElement(o4e,{value:s},N.createElement(a4e,{value:n},N.createElement(Ce.div,{...l,className:uf("chakra-slider",e.className),__css:n.container},e.children,N.createElement("input",{...u}))))});jE.defaultProps={orientation:"horizontal"};jE.displayName="Slider";var XV=Oe((e,t)=>{const{getThumbProps:n}=wx(),r=Cx(),i=n(e,t);return N.createElement(Ce.div,{...i,className:uf("chakra-slider__thumb",e.className),__css:r.thumb})});XV.displayName="SliderThumb";var ZV=Oe((e,t)=>{const{getTrackProps:n}=wx(),r=Cx(),i=n(e,t);return N.createElement(Ce.div,{...i,className:uf("chakra-slider__track",e.className),__css:r.track})});ZV.displayName="SliderTrack";var QV=Oe((e,t)=>{const{getInnerTrackProps:n}=wx(),r=Cx(),i=n(e,t);return N.createElement(Ce.div,{...i,className:uf("chakra-slider__filled-track",e.className),__css:r.filledTrack})});QV.displayName="SliderFilledTrack";var q9=Oe((e,t)=>{const{getMarkerProps:n}=wx(),r=Cx(),i=n(e,t);return N.createElement(Ce.div,{...i,className:uf("chakra-slider__marker",e.className),__css:r.mark})});q9.displayName="SliderMark";var s4e=(...e)=>e.filter(Boolean).join(" "),lI=e=>e?"":void 0,BE=Oe(function(t,n){const r=Yi("Switch",t),{spacing:i="0.5rem",children:o,...a}=En(t),{state:s,getInputProps:l,getCheckboxProps:u,getRootProps:d,getLabelProps:h}=ZF(a),m=w.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0,...r.container}),[r.container]),v=w.useMemo(()=>({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer",...r.track}),[r.track]),b=w.useMemo(()=>({userSelect:"none",marginStart:i,...r.label}),[i,r.label]);return N.createElement(Ce.label,{...d(),className:s4e("chakra-switch",t.className),__css:m},N.createElement("input",{className:"chakra-switch__input",...l({},n)}),N.createElement(Ce.span,{...u(),className:"chakra-switch__track",__css:v},N.createElement(Ce.span,{__css:r.thumb,className:"chakra-switch__thumb","data-checked":lI(s.isChecked),"data-hover":lI(s.isHovered)})),o&&N.createElement(Ce.span,{className:"chakra-switch__label",...h(),__css:b},o))});BE.displayName="Switch";var C0=(...e)=>e.filter(Boolean).join(" ");function Y9(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}var[l4e,JV,u4e,c4e]=dB();function d4e(e){const{defaultIndex:t,onChange:n,index:r,isManual:i,isLazy:o,lazyBehavior:a="unmount",orientation:s="horizontal",direction:l="ltr",...u}=e,[d,h]=w.useState(t??0),[m,v]=NS({defaultValue:t??0,value:r,onChange:n});w.useEffect(()=>{r!=null&&h(r)},[r]);const b=u4e(),S=w.useId();return{id:`tabs-${e.id??S}`,selectedIndex:m,focusedIndex:d,setSelectedIndex:v,setFocusedIndex:h,isManual:i,isLazy:o,lazyBehavior:a,orientation:s,descendants:b,direction:l,htmlProps:u}}var[f4e,My]=Mn({name:"TabsContext",errorMessage:"useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within "});function h4e(e){const{focusedIndex:t,orientation:n,direction:r}=My(),i=JV(),o=w.useCallback(a=>{const s=()=>{var _;const T=i.nextEnabled(t);T&&((_=T.node)==null||_.focus())},l=()=>{var _;const T=i.prevEnabled(t);T&&((_=T.node)==null||_.focus())},u=()=>{var _;const T=i.firstEnabled();T&&((_=T.node)==null||_.focus())},d=()=>{var _;const T=i.lastEnabled();T&&((_=T.node)==null||_.focus())},h=n==="horizontal",m=n==="vertical",v=a.key,b=r==="ltr"?"ArrowLeft":"ArrowRight",S=r==="ltr"?"ArrowRight":"ArrowLeft",E={[b]:()=>h&&l(),[S]:()=>h&&s(),ArrowDown:()=>m&&s(),ArrowUp:()=>m&&l(),Home:u,End:d}[v];E&&(a.preventDefault(),E(a))},[i,t,n,r]);return{...e,role:"tablist","aria-orientation":n,onKeyDown:Y9(e.onKeyDown,o)}}function p4e(e){const{isDisabled:t,isFocusable:n,...r}=e,{setSelectedIndex:i,isManual:o,id:a,setFocusedIndex:s,selectedIndex:l}=My(),{index:u,register:d}=c4e({disabled:t&&!n}),h=u===l,m=()=>{i(u)},v=()=>{s(u),!o&&!(t&&n)&&i(u)},b=t0e({...r,ref:Yn(d,e.ref),isDisabled:t,isFocusable:n,onClick:Y9(e.onClick,m)}),S="button";return{...b,id:eW(a,u),role:"tab",tabIndex:h?0:-1,type:S,"aria-selected":h,"aria-controls":tW(a,u),onFocus:t?void 0:Y9(e.onFocus,v)}}var[g4e,m4e]=Mn({});function v4e(e){const t=My(),{id:n,selectedIndex:r}=t,o=ZS(e.children).map((a,s)=>w.createElement(g4e,{key:s,value:{isSelected:s===r,id:tW(n,s),tabId:eW(n,s),selectedIndex:r}},a));return{...e,children:o}}function y4e(e){const{children:t,...n}=e,{isLazy:r,lazyBehavior:i}=My(),{isSelected:o,id:a,tabId:s}=m4e(),l=w.useRef(!1);o&&(l.current=!0);const u=j$({wasSelected:l.current,isSelected:o,enabled:r,mode:i});return{tabIndex:0,...n,children:u?t:null,role:"tabpanel","aria-labelledby":s,hidden:!o,id:a}}function b4e(){const e=My(),t=JV(),{selectedIndex:n,orientation:r}=e,i=r==="horizontal",o=r==="vertical",[a,s]=w.useState(()=>{if(i)return{left:0,width:0};if(o)return{top:0,height:0}}),[l,u]=w.useState(!1);return Ws(()=>{if(n==null)return;const d=t.item(n);if(d==null)return;i&&s({left:d.node.offsetLeft,width:d.node.offsetWidth}),o&&s({top:d.node.offsetTop,height:d.node.offsetHeight});const h=requestAnimationFrame(()=>{u(!0)});return()=>{h&&cancelAnimationFrame(h)}},[n,i,o,t]),{position:"absolute",transitionProperty:"left, right, top, bottom, height, width",transitionDuration:l?"200ms":"0ms",transitionTimingFunction:"cubic-bezier(0, 0, 0.2, 1)",...a}}function eW(e,t){return`${e}--tab-${t}`}function tW(e,t){return`${e}--tabpanel-${t}`}var[S4e,Iy]=Mn({name:"TabsStylesContext",errorMessage:`useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in " " `}),nW=Oe(function(t,n){const r=Yi("Tabs",t),{children:i,className:o,...a}=En(t),{htmlProps:s,descendants:l,...u}=d4e(a),d=w.useMemo(()=>u,[u]),{isFitted:h,...m}=s;return N.createElement(l4e,{value:l},N.createElement(f4e,{value:d},N.createElement(S4e,{value:r},N.createElement(Ce.div,{className:C0("chakra-tabs",o),ref:n,...m,__css:r.root},i))))});nW.displayName="Tabs";var x4e=Oe(function(t,n){const r=b4e(),i={...t.style,...r},o=Iy();return N.createElement(Ce.div,{ref:n,...t,className:C0("chakra-tabs__tab-indicator",t.className),style:i,__css:o.indicator})});x4e.displayName="TabIndicator";var w4e=Oe(function(t,n){const r=h4e({...t,ref:n}),o={display:"flex",...Iy().tablist};return N.createElement(Ce.div,{...r,className:C0("chakra-tabs__tablist",t.className),__css:o})});w4e.displayName="TabList";var rW=Oe(function(t,n){const r=y4e({...t,ref:n}),i=Iy();return N.createElement(Ce.div,{outline:"0",...r,className:C0("chakra-tabs__tab-panel",t.className),__css:i.tabpanel})});rW.displayName="TabPanel";var iW=Oe(function(t,n){const r=v4e(t),i=Iy();return N.createElement(Ce.div,{...r,width:"100%",ref:n,className:C0("chakra-tabs__tab-panels",t.className),__css:i.tabpanels})});iW.displayName="TabPanels";var oW=Oe(function(t,n){const r=Iy(),i=p4e({...t,ref:n}),o={outline:"0",display:"flex",alignItems:"center",justifyContent:"center",...r.tab};return N.createElement(Ce.button,{...i,className:C0("chakra-tabs__tab",t.className),__css:o})});oW.displayName="Tab";var C4e=(...e)=>e.filter(Boolean).join(" ");function _4e(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var k4e=["h","minH","height","minHeight"],FE=Oe((e,t)=>{const n=Ao("Textarea",e),{className:r,rows:i,...o}=En(e),a=sk(o),s=i?_4e(n,k4e):n;return N.createElement(Ce.textarea,{ref:t,rows:i,...a,className:C4e("chakra-textarea",r),__css:s})});FE.displayName="Textarea";function E4e(e,t){const n=Er(e);w.useEffect(()=>{if(t==null)return;let r=null;return r=window.setTimeout(()=>{n()},t),()=>{r&&window.clearTimeout(r)}},[t,n])}function K9(e,...t){return P4e(e)?e(...t):e}var P4e=e=>typeof e=="function";function T4e(e,t){const n=e??"bottom",i={"top-start":{ltr:"top-left",rtl:"top-right"},"top-end":{ltr:"top-right",rtl:"top-left"},"bottom-start":{ltr:"bottom-left",rtl:"bottom-right"},"bottom-end":{ltr:"bottom-right",rtl:"bottom-left"}}[n];return(i==null?void 0:i[t])??n}var L4e=(e,t)=>e.find(n=>n.id===t);function uI(e,t){const n=aW(e,t),r=n?e[n].findIndex(i=>i.id===t):-1;return{position:n,index:r}}function aW(e,t){for(const[n,r]of Object.entries(e))if(L4e(r,t))return n}function A4e(e){const t=e.includes("right"),n=e.includes("left");let r="center";return t&&(r="flex-end"),n&&(r="flex-start"),{display:"flex",flexDirection:"column",alignItems:r}}function O4e(e){const n=e==="top"||e==="bottom"?"0 auto":void 0,r=e.includes("top")?"env(safe-area-inset-top, 0px)":void 0,i=e.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,o=e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",a=e.includes("right")?void 0:"env(safe-area-inset-left, 0px)";return{position:"fixed",zIndex:5500,pointerEvents:"none",display:"flex",flexDirection:"column",margin:n,top:r,bottom:i,right:o,left:a}}var M4e={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},Hl=I4e(M4e);function I4e(e){let t=e;const n=new Set,r=i=>{t=i(t),n.forEach(o=>o())};return{getState:()=>t,subscribe:i=>(n.add(i),()=>{r(()=>e),n.delete(i)}),removeToast:(i,o)=>{r(a=>({...a,[o]:a[o].filter(s=>s.id!=i)}))},notify:(i,o)=>{const a=R4e(i,o),{position:s,id:l}=a;return r(u=>{const h=s.includes("top")?[a,...u[s]??[]]:[...u[s]??[],a];return{...u,[s]:h}}),l},update:(i,o)=>{i&&r(a=>{const s={...a},{position:l,index:u}=uI(s,i);return l&&u!==-1&&(s[l][u]={...s[l][u],...o,message:sW(o)}),s})},closeAll:({positions:i}={})=>{r(o=>(i??["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((l,u)=>(l[u]=o[u].map(d=>({...d,requestClose:!0})),l),{...o}))},close:i=>{r(o=>{const a=aW(o,i);return a?{...o,[a]:o[a].map(s=>s.id==i?{...s,requestClose:!0}:s)}:o})},isActive:i=>Boolean(uI(Hl.getState(),i).position)}}var cI=0;function R4e(e,t={}){cI+=1;const n=t.id??cI,r=t.position??"bottom";return{id:n,message:e,position:r,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>Hl.removeToast(String(n),r),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var D4e=e=>{const{status:t,variant:n="solid",id:r,title:i,isClosable:o,onClose:a,description:s,icon:l}=e,u=r?{root:`toast-${r}`,title:`toast-${r}-title`,description:`toast-${r}-description`}:void 0;return N.createElement(UF,{addRole:!1,status:t,variant:n,id:u==null?void 0:u.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto"},N.createElement(qF,null,l),N.createElement(Ce.div,{flex:"1",maxWidth:"100%"},i&&N.createElement(YF,{id:u==null?void 0:u.title},i),s&&N.createElement(GF,{id:u==null?void 0:u.description,display:"block"},s)),o&&N.createElement(ex,{size:"sm",onClick:a,position:"absolute",insetEnd:1,top:1}))};function sW(e={}){const{render:t,toastComponent:n=D4e}=e;return i=>typeof t=="function"?t({...i,...e}):N.createElement(n,{...i,...e})}function N4e(e,t){const n=i=>({...t,...i,position:T4e((i==null?void 0:i.position)??(t==null?void 0:t.position),e)}),r=i=>{const o=n(i),a=sW(o);return Hl.notify(a,o)};return r.update=(i,o)=>{Hl.update(i,n(o))},r.promise=(i,o)=>{const a=r({...o.loading,status:"loading",duration:null});i.then(s=>r.update(a,{status:"success",duration:5e3,...K9(o.success,s)})).catch(s=>r.update(a,{status:"error",duration:5e3,...K9(o.error,s)}))},r.closeAll=Hl.closeAll,r.close=Hl.close,r.isActive=Hl.isActive,r}function Ry(e){const{theme:t}=lB();return w.useMemo(()=>N4e(t.direction,e),[e,t.direction])}var j4e={initial:e=>{const{position:t}=e,n=["top","bottom"].includes(t)?"y":"x";let r=["top-right","bottom-right"].includes(t)?1:-1;return t==="bottom"&&(r=1),{opacity:0,[n]:r*24}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},lW=w.memo(e=>{const{id:t,message:n,onCloseComplete:r,onRequestRemove:i,requestClose:o=!1,position:a="bottom",duration:s=5e3,containerStyle:l,motionVariants:u=j4e,toastSpacing:d="0.5rem"}=e,[h,m]=w.useState(s),v=Ife();Vd(()=>{v||r==null||r()},[v]),Vd(()=>{m(s)},[s]);const b=()=>m(null),S=()=>m(s),k=()=>{v&&i()};w.useEffect(()=>{v&&o&&i()},[v,o,i]),E4e(k,h);const E=w.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:d,...l}),[l,d]),_=w.useMemo(()=>A4e(a),[a]);return N.createElement(du.li,{layout:!0,className:"chakra-toast",variants:u,initial:"initial",animate:"animate",exit:"exit",onHoverStart:b,onHoverEnd:S,custom:{position:a},style:_},N.createElement(Ce.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:E},K9(n,{id:t,onClose:k})))});lW.displayName="ToastComponent";var B4e=e=>{const t=w.useSyncExternalStore(Hl.subscribe,Hl.getState,Hl.getState),{children:n,motionVariants:r,component:i=lW,portalProps:o}=e,s=Object.keys(t).map(l=>{const u=t[l];return N.createElement("ul",{role:"region","aria-live":"polite",key:l,id:`chakra-toast-manager-${l}`,style:O4e(l)},N.createElement(nf,{initial:!1},u.map(d=>N.createElement(i,{key:d.id,motionVariants:r,...d}))))});return N.createElement(N.Fragment,null,n,N.createElement(ap,{...o},s))};function F4e(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function $4e(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var z4e={exit:{scale:.85,opacity:0,transition:{opacity:{duration:.15,easings:"easeInOut"},scale:{duration:.2,easings:"easeInOut"}}},enter:{scale:1,opacity:1,transition:{opacity:{easings:"easeOut",duration:.2},scale:{duration:.2,ease:[.175,.885,.4,1.1]}}}};function tv(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}var j5=e=>{var t;return((t=e.current)==null?void 0:t.ownerDocument)||document},X9=e=>{var t,n;return((n=(t=e.current)==null?void 0:t.ownerDocument)==null?void 0:n.defaultView)||window};function H4e(e={}){const{openDelay:t=0,closeDelay:n=0,closeOnClick:r=!0,closeOnMouseDown:i,closeOnScroll:o,closeOnPointerDown:a=i,closeOnEsc:s=!0,onOpen:l,onClose:u,placement:d,id:h,isOpen:m,defaultIsOpen:v,arrowSize:b=10,arrowShadowColor:S,arrowPadding:k,modifiers:E,isDisabled:_,gutter:T,offset:A,direction:I,...R}=e,{isOpen:D,onOpen:j,onClose:z}=N$({isOpen:m,defaultIsOpen:v,onOpen:l,onClose:u}),{referenceRef:V,getPopperProps:K,getArrowInnerProps:te,getArrowProps:q}=D$({enabled:D,placement:d,arrowPadding:k,modifiers:E,gutter:T,offset:A,direction:I}),F=w.useId(),X=`tooltip-${h??F}`,Z=w.useRef(null),W=w.useRef(),Q=w.useCallback(()=>{W.current&&(clearTimeout(W.current),W.current=void 0)},[]),ie=w.useRef(),fe=w.useCallback(()=>{ie.current&&(clearTimeout(ie.current),ie.current=void 0)},[]),Se=w.useCallback(()=>{fe(),z()},[z,fe]),Te=V4e(Z,Se),ye=w.useCallback(()=>{if(!_&&!W.current){Te();const mt=X9(Z);W.current=mt.setTimeout(j,t)}},[Te,_,j,t]),He=w.useCallback(()=>{Q();const mt=X9(Z);ie.current=mt.setTimeout(Se,n)},[n,Se,Q]),Ne=w.useCallback(()=>{D&&r&&He()},[r,He,D]),tt=w.useCallback(()=>{D&&a&&He()},[a,He,D]),_e=w.useCallback(mt=>{D&&mt.key==="Escape"&&He()},[D,He]);Rh(()=>j5(Z),"keydown",s?_e:void 0),Rh(()=>j5(Z),"scroll",()=>{D&&o&&Se()}),w.useEffect(()=>{_&&(Q(),D&&z())},[_,D,z,Q]),w.useEffect(()=>()=>{Q(),fe()},[Q,fe]),Rh(()=>Z.current,"pointerleave",He);const lt=w.useCallback((mt={},St=null)=>({...mt,ref:Yn(Z,St,V),onPointerEnter:tv(mt.onPointerEnter,ut=>{ut.pointerType!=="touch"&&ye()}),onClick:tv(mt.onClick,Ne),onPointerDown:tv(mt.onPointerDown,tt),onFocus:tv(mt.onFocus,ye),onBlur:tv(mt.onBlur,He),"aria-describedby":D?X:void 0}),[ye,He,tt,D,X,Ne,V]),wt=w.useCallback((mt={},St=null)=>K({...mt,style:{...mt.style,[oi.arrowSize.var]:b?`${b}px`:void 0,[oi.arrowShadowColor.var]:S}},St),[K,b,S]),ct=w.useCallback((mt={},St=null)=>{const Ae={...mt.style,position:"relative",transformOrigin:oi.transformOrigin.varRef};return{ref:St,...R,...mt,id:X,role:"tooltip",style:Ae}},[R,X]);return{isOpen:D,show:ye,hide:He,getTriggerProps:lt,getTooltipProps:ct,getTooltipPositionerProps:wt,getArrowProps:q,getArrowInnerProps:te}}var lC="chakra-ui:close-tooltip";function V4e(e,t){return w.useEffect(()=>{const n=j5(e);return n.addEventListener(lC,t),()=>n.removeEventListener(lC,t)},[t,e]),()=>{const n=j5(e),r=X9(e);n.dispatchEvent(new r.CustomEvent(lC))}}var W4e=Ce(du.div),lo=Oe((e,t)=>{const n=Ao("Tooltip",e),r=En(e),i=h0(),{children:o,label:a,shouldWrapChildren:s,"aria-label":l,hasArrow:u,bg:d,portalProps:h,background:m,backgroundColor:v,bgColor:b,motionProps:S,...k}=r,E=m??v??d??b;if(E){n.bg=E;const z=tne(i,"colors",E);n[oi.arrowBg.var]=z}const _=H4e({...k,direction:i.direction}),T=typeof o=="string"||s;let A;if(T)A=N.createElement(Ce.span,{display:"inline-block",tabIndex:0,..._.getTriggerProps()},o);else{const z=w.Children.only(o);A=w.cloneElement(z,_.getTriggerProps(z.props,z.ref))}const I=!!l,R=_.getTooltipProps({},t),D=I?F4e(R,["role","id"]):R,j=$4e(R,["role","id"]);return a?N.createElement(N.Fragment,null,A,N.createElement(nf,null,_.isOpen&&N.createElement(ap,{...h},N.createElement(Ce.div,{..._.getTooltipPositionerProps(),__css:{zIndex:n.zIndex,pointerEvents:"none"}},N.createElement(W4e,{variants:z4e,initial:"exit",animate:"enter",exit:"exit",...S,...D,__css:n},a,I&&N.createElement(Ce.span,{srOnly:!0,...j},l),u&&N.createElement(Ce.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper"},N.createElement(Ce.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:n.bg}}))))))):N.createElement(N.Fragment,null,o)});lo.displayName="Tooltip";var U4e=e=>{const{children:t,colorModeManager:n,portalZIndex:r,resetCSS:i=!0,theme:o={},environment:a,cssVarsRoot:s}=e,l=N.createElement(y$,{environment:a},t);return N.createElement(Gue,{theme:o,cssVarsRoot:s},N.createElement(fj,{colorModeManager:n,options:o.config},i?N.createElement(dme,null):N.createElement(cme,null),N.createElement(Yue,null),r?N.createElement(BH,{zIndex:r},l):l))};function G4e({children:e,theme:t=jue,toastOptions:n,...r}){return N.createElement(U4e,{theme:t,...r},e,N.createElement(B4e,{...n}))}var Z9={},dI=Qs;Z9.createRoot=dI.createRoot,Z9.hydrateRoot=dI.hydrateRoot;var Q9={},q4e={get exports(){return Q9},set exports(e){Q9=e}},uW={};/**
+ * @license React
+ * use-sync-external-store-shim.production.min.js
+ *
+ * Copyright (c) Facebook, Inc. and its affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */var r0=w;function Y4e(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var K4e=typeof Object.is=="function"?Object.is:Y4e,X4e=r0.useState,Z4e=r0.useEffect,Q4e=r0.useLayoutEffect,J4e=r0.useDebugValue;function e5e(e,t){var n=t(),r=X4e({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return Q4e(function(){i.value=n,i.getSnapshot=t,uC(i)&&o({inst:i})},[e,n,t]),Z4e(function(){return uC(i)&&o({inst:i}),e(function(){uC(i)&&o({inst:i})})},[e]),J4e(n),n}function uC(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!K4e(e,n)}catch{return!0}}function t5e(e,t){return t()}var n5e=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?t5e:e5e;uW.useSyncExternalStore=r0.useSyncExternalStore!==void 0?r0.useSyncExternalStore:n5e;(function(e){e.exports=uW})(q4e);var J9={},r5e={get exports(){return J9},set exports(e){J9=e}},cW={};/**
+ * @license React
+ * use-sync-external-store-shim/with-selector.production.min.js
+ *
+ * Copyright (c) Facebook, Inc. and its affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */var _x=w,i5e=Q9;function o5e(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var a5e=typeof Object.is=="function"?Object.is:o5e,s5e=i5e.useSyncExternalStore,l5e=_x.useRef,u5e=_x.useEffect,c5e=_x.useMemo,d5e=_x.useDebugValue;cW.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=l5e(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=c5e(function(){function l(v){if(!u){if(u=!0,d=v,v=r(v),i!==void 0&&a.hasValue){var b=a.value;if(i(b,v))return h=b}return h=v}if(b=h,a5e(d,v))return b;var S=r(v);return i!==void 0&&i(b,S)?b:(d=v,h=S)}var u=!1,d,h,m=n===void 0?null:n;return[function(){return l(t())},m===null?void 0:function(){return l(m())}]},[t,n,r,i]);var s=s5e(e,o[0],o[1]);return u5e(function(){a.hasValue=!0,a.value=s},[s]),d5e(s),s};(function(e){e.exports=cW})(r5e);function f5e(e){e()}let dW=f5e;const h5e=e=>dW=e,p5e=()=>dW,Xd=w.createContext(null);function fW(){return w.useContext(Xd)}const g5e=()=>{throw new Error("uSES not initialized!")};let hW=g5e;const m5e=e=>{hW=e},v5e=(e,t)=>e===t;function y5e(e=Xd){const t=e===Xd?fW:()=>w.useContext(e);return function(r,i=v5e){const{store:o,subscription:a,getServerState:s}=t(),l=hW(a.addNestedSub,o.getState,s||o.getState,r,i);return w.useDebugValue(l),l}}const b5e=y5e();var fI={},S5e={get exports(){return fI},set exports(e){fI=e}},$n={};/**
+ * @license React
+ * react-is.production.min.js
+ *
+ * Copyright (c) Facebook, Inc. and its affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */var $E=Symbol.for("react.element"),zE=Symbol.for("react.portal"),kx=Symbol.for("react.fragment"),Ex=Symbol.for("react.strict_mode"),Px=Symbol.for("react.profiler"),Tx=Symbol.for("react.provider"),Lx=Symbol.for("react.context"),x5e=Symbol.for("react.server_context"),Ax=Symbol.for("react.forward_ref"),Ox=Symbol.for("react.suspense"),Mx=Symbol.for("react.suspense_list"),Ix=Symbol.for("react.memo"),Rx=Symbol.for("react.lazy"),w5e=Symbol.for("react.offscreen"),pW;pW=Symbol.for("react.module.reference");function ps(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case $E:switch(e=e.type,e){case kx:case Px:case Ex:case Ox:case Mx:return e;default:switch(e=e&&e.$$typeof,e){case x5e:case Lx:case Ax:case Rx:case Ix:case Tx:return e;default:return t}}case zE:return t}}}$n.ContextConsumer=Lx;$n.ContextProvider=Tx;$n.Element=$E;$n.ForwardRef=Ax;$n.Fragment=kx;$n.Lazy=Rx;$n.Memo=Ix;$n.Portal=zE;$n.Profiler=Px;$n.StrictMode=Ex;$n.Suspense=Ox;$n.SuspenseList=Mx;$n.isAsyncMode=function(){return!1};$n.isConcurrentMode=function(){return!1};$n.isContextConsumer=function(e){return ps(e)===Lx};$n.isContextProvider=function(e){return ps(e)===Tx};$n.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===$E};$n.isForwardRef=function(e){return ps(e)===Ax};$n.isFragment=function(e){return ps(e)===kx};$n.isLazy=function(e){return ps(e)===Rx};$n.isMemo=function(e){return ps(e)===Ix};$n.isPortal=function(e){return ps(e)===zE};$n.isProfiler=function(e){return ps(e)===Px};$n.isStrictMode=function(e){return ps(e)===Ex};$n.isSuspense=function(e){return ps(e)===Ox};$n.isSuspenseList=function(e){return ps(e)===Mx};$n.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===kx||e===Px||e===Ex||e===Ox||e===Mx||e===w5e||typeof e=="object"&&e!==null&&(e.$$typeof===Rx||e.$$typeof===Ix||e.$$typeof===Tx||e.$$typeof===Lx||e.$$typeof===Ax||e.$$typeof===pW||e.getModuleId!==void 0)};$n.typeOf=ps;(function(e){e.exports=$n})(S5e);function C5e(){const e=p5e();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],i=t;for(;i;)r.push(i),i=i.next;return r},subscribe(r){let i=!0,o=n={callback:r,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){!i||t===null||(i=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}const hI={notify(){},get:()=>[]};function _5e(e,t){let n,r=hI;function i(h){return l(),r.subscribe(h)}function o(){r.notify()}function a(){d.onStateChange&&d.onStateChange()}function s(){return Boolean(n)}function l(){n||(n=t?t.addNestedSub(a):e.subscribe(a),r=C5e())}function u(){n&&(n(),n=void 0,r.clear(),r=hI)}const d={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:a,isSubscribed:s,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return d}const k5e=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",E5e=k5e?w.useLayoutEffect:w.useEffect;function P5e({store:e,context:t,children:n,serverState:r}){const i=w.useMemo(()=>{const s=_5e(e);return{store:e,subscription:s,getServerState:r?()=>r:void 0}},[e,r]),o=w.useMemo(()=>e.getState(),[e]);E5e(()=>{const{subscription:s}=i;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),o!==e.getState()&&s.notifyNestedSubs(),()=>{s.tryUnsubscribe(),s.onStateChange=void 0}},[i,o]);const a=t||Xd;return N.createElement(a.Provider,{value:i},n)}function gW(e=Xd){const t=e===Xd?fW:()=>w.useContext(e);return function(){const{store:r}=t();return r}}const T5e=gW();function L5e(e=Xd){const t=e===Xd?T5e:gW(e);return function(){return t().dispatch}}const A5e=L5e();m5e(J9.useSyncExternalStoreWithSelector);h5e(Qs.unstable_batchedUpdates);function T4(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?T4=function(n){return typeof n}:T4=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},T4(e)}function O5e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pI(e,t){for(var n=0;n1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:HE(e)?2:VE(e)?3:0}function Rm(e,t){return _0(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function D5e(e,t){return _0(e)===2?e.get(t):e[t]}function vW(e,t,n){var r=_0(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function yW(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function HE(e){return z5e&&e instanceof Map}function VE(e){return H5e&&e instanceof Set}function hh(e){return e.o||e.t}function WE(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=SW(e);delete t[vr];for(var n=Dm(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=N5e),Object.freeze(e),t&&Qh(e,function(n,r){return UE(r,!0)},!0)),e}function N5e(){zs(2)}function GE(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function eu(e){var t=o8[e];return t||zs(18,e),t}function j5e(e,t){o8[e]||(o8[e]=t)}function n8(){return X2}function cC(e,t){t&&(eu("Patches"),e.u=[],e.s=[],e.v=t)}function B5(e){r8(e),e.p.forEach(B5e),e.p=null}function r8(e){e===X2&&(X2=e.l)}function gI(e){return X2={p:[],l:X2,h:e,m:!0,_:0}}function B5e(e){var t=e[vr];t.i===0||t.i===1?t.j():t.O=!0}function dC(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||eu("ES5").S(t,e,r),r?(n[vr].P&&(B5(t),zs(4)),oc(e)&&(e=F5(t,e),t.l||$5(t,e)),t.u&&eu("Patches").M(n[vr].t,e,t.u,t.s)):e=F5(t,n,[]),B5(t),t.u&&t.v(t.u,t.s),e!==bW?e:void 0}function F5(e,t,n){if(GE(t))return t;var r=t[vr];if(!r)return Qh(t,function(o,a){return mI(e,r,t,o,a,n)},!0),t;if(r.A!==e)return t;if(!r.P)return $5(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=WE(r.k):r.o;Qh(r.i===3?new Set(i):i,function(o,a){return mI(e,r,i,o,a,n)}),$5(e,i,!1),n&&e.u&&eu("Patches").R(r,n,e.u,e.s)}return r.o}function mI(e,t,n,r,i,o){if(Zd(i)){var a=F5(e,i,o&&t&&t.i!==3&&!Rm(t.D,r)?o.concat(r):void 0);if(vW(n,r,a),!Zd(a))return;e.m=!1}if(oc(i)&&!GE(i)){if(!e.h.F&&e._<1)return;F5(e,i),t&&t.A.l||$5(e,i)}}function $5(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&UE(t,n)}function fC(e,t){var n=e[vr];return(n?hh(n):e)[t]}function vI(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function Sd(e){e.P||(e.P=!0,e.l&&Sd(e.l))}function hC(e){e.o||(e.o=WE(e.t))}function i8(e,t,n){var r=HE(t)?eu("MapSet").N(t,n):VE(t)?eu("MapSet").T(t,n):e.g?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:n8(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=s,u=Z2;a&&(l=[s],u=_v);var d=Proxy.revocable(l,u),h=d.revoke,m=d.proxy;return s.k=m,s.j=h,m}(t,n):eu("ES5").J(t,n);return(n?n.A:n8()).p.push(r),r}function F5e(e){return Zd(e)||zs(22,e),function t(n){if(!oc(n))return n;var r,i=n[vr],o=_0(n);if(i){if(!i.P&&(i.i<4||!eu("ES5").K(i)))return i.t;i.I=!0,r=yI(n,o),i.I=!1}else r=yI(n,o);return Qh(r,function(a,s){i&&D5e(i.t,a)===s||vW(r,a,t(s))}),o===3?new Set(r):r}(e)}function yI(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return WE(e)}function $5e(){function e(o,a){var s=i[o];return s?s.enumerable=a:i[o]=s={configurable:!0,enumerable:a,get:function(){var l=this[vr];return Z2.get(l,o)},set:function(l){var u=this[vr];Z2.set(u,o,l)}},s}function t(o){for(var a=o.length-1;a>=0;a--){var s=o[a][vr];if(!s.P)switch(s.i){case 5:r(s)&&Sd(s);break;case 4:n(s)&&Sd(s)}}}function n(o){for(var a=o.t,s=o.k,l=Dm(s),u=l.length-1;u>=0;u--){var d=l[u];if(d!==vr){var h=a[d];if(h===void 0&&!Rm(a,d))return!0;var m=s[d],v=m&&m[vr];if(v?v.t!==h:!yW(m,h))return!0}}var b=!!a[vr];return l.length!==Dm(a).length+(b?0:1)}function r(o){var a=o.k;if(a.length!==o.t.length)return!0;var s=Object.getOwnPropertyDescriptor(a,a.length-1);if(s&&!s.get)return!0;for(var l=0;l1?E-1:0),T=1;T1?d-1:0),m=1;m=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var a=eu("Patches").$;return Zd(n)?a(n,r):this.produce(n,function(s){return a(s,r)})},e}(),Ia=new W5e,xW=Ia.produce;Ia.produceWithPatches.bind(Ia);Ia.setAutoFreeze.bind(Ia);Ia.setUseProxies.bind(Ia);Ia.applyPatches.bind(Ia);Ia.createDraft.bind(Ia);Ia.finishDraft.bind(Ia);function wI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function CI(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(ro(1));return n(YE)(e,t)}if(typeof e!="function")throw new Error(ro(2));var i=e,o=t,a=[],s=a,l=!1;function u(){s===a&&(s=a.slice())}function d(){if(l)throw new Error(ro(3));return o}function h(S){if(typeof S!="function")throw new Error(ro(4));if(l)throw new Error(ro(5));var k=!0;return u(),s.push(S),function(){if(k){if(l)throw new Error(ro(6));k=!1,u();var _=s.indexOf(S);s.splice(_,1),a=null}}}function m(S){if(!U5e(S))throw new Error(ro(7));if(typeof S.type>"u")throw new Error(ro(8));if(l)throw new Error(ro(9));try{l=!0,o=i(o,S)}finally{l=!1}for(var k=a=s,E=0;E"u")throw new Error(ro(12));if(typeof n(void 0,{type:z5.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ro(13))})}function wW(e){for(var t=Object.keys(e),n={},r=0;r"u")throw u&&u.type,new Error(ro(14));h[v]=k,d=d||k!==S}return d=d||o.length!==Object.keys(l).length,d?h:l}}function H5(){for(var e=arguments.length,t=new Array(e),n=0;n-1){var u=n[l];return l>0&&(n.splice(l,1),n.unshift(u)),u.value}return V5}function i(s,l){r(s)===V5&&(n.unshift({key:s,value:l}),n.length>e&&n.pop())}function o(){return n}function a(){n=[]}return{get:r,put:i,getEntries:o,clear:a}}var X5e=function(t,n){return t===n};function Z5e(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var i=n.length,o=0;o1?t-1:0),r=1;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]{Object.keys(R).forEach(function(D){T(D)&&d[D]!==R[D]&&m.indexOf(D)===-1&&m.push(D)}),Object.keys(d).forEach(function(D){R[D]===void 0&&T(D)&&m.indexOf(D)===-1&&d[D]!==void 0&&m.push(D)}),v===null&&(v=setInterval(E,i)),d=R},o)}function E(){if(m.length===0){v&&clearInterval(v),v=null;return}var R=m.shift(),D=r.reduce(function(j,z){return z.in(j,R,d)},d[R]);if(D!==void 0)try{h[R]=l(D)}catch(j){console.error("redux-persist/createPersistoid: error serializing state",j)}else delete h[R];m.length===0&&_()}function _(){Object.keys(h).forEach(function(R){d[R]===void 0&&delete h[R]}),b=s.setItem(a,l(h)).catch(A)}function T(R){return!(n&&n.indexOf(R)===-1&&R!=="_persist"||t&&t.indexOf(R)!==-1)}function A(R){u&&u(R)}var I=function(){for(;m.length!==0;)E();return b||Promise.resolve()};return{update:k,flush:I}}function OSe(e){return JSON.stringify(e)}function MSe(e){var t=e.transforms||[],n="".concat(e.keyPrefix!==void 0?e.keyPrefix:XE).concat(e.key),r=e.storage;e.debug;var i;return e.deserialize===!1?i=function(a){return a}:typeof e.deserialize=="function"?i=e.deserialize:i=ISe,r.getItem(n).then(function(o){if(o)try{var a={},s=i(o);return Object.keys(s).forEach(function(l){a[l]=t.reduceRight(function(u,d){return d.out(u,l,s)},i(s[l]))}),a}catch(l){throw l}else return})}function ISe(e){return JSON.parse(e)}function RSe(e){var t=e.storage,n="".concat(e.keyPrefix!==void 0?e.keyPrefix:XE).concat(e.key);return t.removeItem(n,DSe)}function DSe(e){}function OI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Fu(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function BSe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var FSe=5e3;function $Se(e,t){var n=e.version!==void 0?e.version:ESe;e.debug;var r=e.stateReconciler===void 0?LSe:e.stateReconciler,i=e.getStoredState||MSe,o=e.timeout!==void 0?e.timeout:FSe,a=null,s=!1,l=!0,u=function(h){return h._persist.rehydrated&&a&&!l&&a.update(h),h};return function(d,h){var m=d||{},v=m._persist,b=jSe(m,["_persist"]),S=b;if(h.type===TW){var k=!1,E=function(j,z){k||(h.rehydrate(e.key,j,z),k=!0)};if(o&&setTimeout(function(){!k&&E(void 0,new Error('redux-persist: persist timed out for persist key "'.concat(e.key,'"')))},o),l=!1,a||(a=ASe(e)),v)return Fu({},t(S,h),{_persist:v});if(typeof h.rehydrate!="function"||typeof h.register!="function")throw new Error("redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.");return h.register(e.key),i(e).then(function(D){var j=e.migrate||function(z,V){return Promise.resolve(z)};j(D,n).then(function(z){E(z)},function(z){E(void 0,z)})},function(D){E(void 0,D)}),Fu({},t(S,h),{_persist:{version:n,rehydrated:!1}})}else{if(h.type===LW)return s=!0,h.result(RSe(e)),Fu({},t(S,h),{_persist:v});if(h.type===EW)return h.result(a&&a.flush()),Fu({},t(S,h),{_persist:v});if(h.type===PW)l=!0;else if(h.type===ZE){if(s)return Fu({},S,{_persist:Fu({},v,{rehydrated:!0})});if(h.key===e.key){var _=t(S,h),T=h.payload,A=r!==!1&&T!==void 0?r(T,d,_,e):_,I=Fu({},A,{_persist:Fu({},v,{rehydrated:!0})});return u(I)}}}if(!v)return t(d,h);var R=t(S,h);return R===S?d:u(Fu({},R,{_persist:v}))}}function MI(e){return VSe(e)||HSe(e)||zSe()}function zSe(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function HSe(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function VSe(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0&&arguments[0]!==void 0?arguments[0]:OW,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case AW:return s8({},t,{registry:[].concat(MI(t.registry),[n.key])});case ZE:var r=t.registry.indexOf(n.key),i=MI(t.registry);return i.splice(r,1),s8({},t,{registry:i,bootstrapped:i.length===0});default:return t}};function GSe(e,t,n){var r=n||!1,i=YE(USe,OW,t&&t.enhancer?t.enhancer:void 0),o=function(u){i.dispatch({type:AW,key:u})},a=function(u,d,h){var m={type:ZE,payload:d,err:h,key:u};e.dispatch(m),i.dispatch(m),r&&s.getState().bootstrapped&&(r(),r=!1)},s=s8({},i,{purge:function(){var u=[];return e.dispatch({type:LW,result:function(h){u.push(h)}}),Promise.all(u)},flush:function(){var u=[];return e.dispatch({type:EW,result:function(h){u.push(h)}}),Promise.all(u)},pause:function(){e.dispatch({type:PW})},persist:function(){e.dispatch({type:TW,register:o,rehydrate:a})}});return t&&t.manualPersist||s.persist(),s}var QE={},JE={};JE.__esModule=!0;JE.default=KSe;function M4(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?M4=function(n){return typeof n}:M4=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},M4(e)}function vC(){}var qSe={getItem:vC,setItem:vC,removeItem:vC};function YSe(e){if((typeof self>"u"?"undefined":M4(self))!=="object"||!(e in self))return!1;try{var t=self[e],n="redux-persist ".concat(e," test");t.setItem(n,"test"),t.getItem(n),t.removeItem(n)}catch{return!1}return!0}function KSe(e){var t="".concat(e,"Storage");return YSe(t)?self[t]:qSe}QE.__esModule=!0;QE.default=QSe;var XSe=ZSe(JE);function ZSe(e){return e&&e.__esModule?e:{default:e}}function QSe(e){var t=(0,XSe.default)(e);return{getItem:function(r){return new Promise(function(i,o){i(t.getItem(r))})},setItem:function(r,i){return new Promise(function(o,a){o(t.setItem(r,i))})},removeItem:function(r){return new Promise(function(i,o){i(t.removeItem(r))})}}}var MW=void 0,JSe=exe(QE);function exe(e){return e&&e.__esModule?e:{default:e}}var txe=(0,JSe.default)("local");MW=txe;var IW={},RW={},Jh={};Object.defineProperty(Jh,"__esModule",{value:!0});Jh.PLACEHOLDER_UNDEFINED=Jh.PACKAGE_NAME=void 0;Jh.PACKAGE_NAME="redux-deep-persist";Jh.PLACEHOLDER_UNDEFINED="@@placeholder/undefined";var eP={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigType=void 0,function(t){t[t.WHITELIST=0]="WHITELIST",t[t.BLACKLIST=1]="BLACKLIST"}(e.ConfigType||(e.ConfigType={}))})(eP);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getRootKeysGroup=e.throwError=e.configValidator=e.transformsValidator=e.singleTransformValidator=e.findDuplicatesAndSubsets=e.unique=e.preserveUndefined=e.mergeDeep=e.dissocPath=e.assocPath=e.path=e.difference=e.cloneDeep=e._cloneDeep=e.getCircularPath=e.isEmpty=e.isDate=e.isString=e.isIntegerString=e.isPlainObject=e.isArray=e.isLength=e.isObjectLike=void 0;const t=Jh,n=eP,r=function(q){return typeof q=="object"&&q!==null};e.isObjectLike=r;const i=function(q){return typeof q=="number"&&q>-1&&q%1==0&&q<=Number.MAX_SAFE_INTEGER};e.isLength=i,e.isArray=Array.isArray||function(q){return(0,e.isLength)(q&&q.length)&&Object.prototype.toString.call(q)==="[object Array]"};const o=function(q){return!!q&&typeof q=="object"&&!(0,e.isArray)(q)};e.isPlainObject=o;const a=function(q){return String(~~q)===q&&Number(q)>=0};e.isIntegerString=a;const s=function(q){return Object.prototype.toString.call(q)==="[object String]"};e.isString=s;const l=function(q){return Object.prototype.toString.call(q)==="[object Date]"};e.isDate=l;const u=function(q){return Object.keys(q).length===0};e.isEmpty=u;const d=Object.prototype.hasOwnProperty,h=function(q,F,U){U||(U=new Set([q])),F||(F="");for(const X in q){const Z=F?`${F}.${X}`:X,W=q[X];if((0,e.isObjectLike)(W))return U.has(W)?`${F}.${X}:`:(U.add(W),(0,e.getCircularPath)(W,Z,U))}return null};e.getCircularPath=h;const m=function(q){if(!(0,e.isObjectLike)(q))return q;if((0,e.isDate)(q))return new Date(+q);const F=(0,e.isArray)(q)?[]:{};for(const U in q){const X=q[U];F[U]=(0,e._cloneDeep)(X)}return F};e._cloneDeep=m;const v=function(q){const F=(0,e.getCircularPath)(q);if(F)throw new Error(`${t.PACKAGE_NAME}: circular dependency detected under the path '${F}' of object you're trying to persist: ${q}`);return(0,e._cloneDeep)(q)};e.cloneDeep=v;const b=function(q,F){if(q===F)return{};if(!(0,e.isObjectLike)(q)||!(0,e.isObjectLike)(F))return F;const U=(0,e.cloneDeep)(q),X=(0,e.cloneDeep)(F),Z=Object.keys(U).reduce((Q,ie)=>(d.call(X,ie)||(Q[ie]=void 0),Q),{});if((0,e.isDate)(U)||(0,e.isDate)(X))return U.valueOf()===X.valueOf()?{}:X;const W=Object.keys(X).reduce((Q,ie)=>{if(!d.call(U,ie))return Q[ie]=X[ie],Q;const fe=(0,e.difference)(U[ie],X[ie]);return(0,e.isObjectLike)(fe)&&(0,e.isEmpty)(fe)&&!(0,e.isDate)(fe)?(0,e.isArray)(U)&&!(0,e.isArray)(X)||!(0,e.isArray)(U)&&(0,e.isArray)(X)?X:Q:(Q[ie]=fe,Q)},Z);return delete W._persist,W};e.difference=b;const S=function(q,F){return F.reduce((U,X)=>{if(U){const Z=parseInt(X,10),W=(0,e.isIntegerString)(X)&&Z<0?U.length+Z:X;return(0,e.isString)(U)?U.charAt(W):U[W]}},q)};e.path=S;const k=function(q,F){return[...q].reverse().reduce((Z,W,Q)=>{const ie=(0,e.isIntegerString)(W)?[]:{};return ie[W]=Q===0?F:Z,ie},{})};e.assocPath=k;const E=function(q,F){const U=(0,e.cloneDeep)(q);return F.reduce((X,Z,W)=>(W===F.length-1&&X&&(0,e.isObjectLike)(X)&&delete X[Z],X&&X[Z]),U),U};e.dissocPath=E;const _=function(q,F,...U){if(!U||!U.length)return F;const X=U.shift(),{preservePlaceholder:Z,preserveUndefined:W}=q;if((0,e.isObjectLike)(F)&&(0,e.isObjectLike)(X))for(const Q in X)if((0,e.isObjectLike)(X[Q])&&(0,e.isObjectLike)(F[Q]))F[Q]||(F[Q]={}),_(q,F[Q],X[Q]);else if((0,e.isArray)(F)){let ie=X[Q];const fe=Z?t.PLACEHOLDER_UNDEFINED:void 0;W||(ie=typeof ie<"u"?ie:F[parseInt(Q,10)]),ie=ie!==t.PLACEHOLDER_UNDEFINED?ie:fe,F[parseInt(Q,10)]=ie}else{const ie=X[Q]!==t.PLACEHOLDER_UNDEFINED?X[Q]:void 0;F[Q]=ie}return _(q,F,...U)},T=function(q,F,U){return _({preservePlaceholder:U==null?void 0:U.preservePlaceholder,preserveUndefined:U==null?void 0:U.preserveUndefined},(0,e.cloneDeep)(q),(0,e.cloneDeep)(F))};e.mergeDeep=T;const A=function(q,F=[],U,X,Z){if(!(0,e.isObjectLike)(q))return q;for(const W in q){const Q=q[W],ie=(0,e.isArray)(q),fe=X?X+"."+W:W;Q===null&&(U===n.ConfigType.WHITELIST&&F.indexOf(fe)===-1||U===n.ConfigType.BLACKLIST&&F.indexOf(fe)!==-1)&&ie&&(q[parseInt(W,10)]=void 0),Q===void 0&&Z&&U===n.ConfigType.BLACKLIST&&F.indexOf(fe)===-1&&ie&&(q[parseInt(W,10)]=t.PLACEHOLDER_UNDEFINED),A(Q,F,U,fe,Z)}},I=function(q,F,U,X){const Z=(0,e.cloneDeep)(q);return A(Z,F,U,"",X),Z};e.preserveUndefined=I;const R=function(q,F,U){return U.indexOf(q)===F};e.unique=R;const D=function(q){return q.reduce((F,U)=>{const X=q.filter(Se=>Se===U),Z=q.filter(Se=>(U+".").indexOf(Se+".")===0),{duplicates:W,subsets:Q}=F,ie=X.length>1&&W.indexOf(U)===-1,fe=Z.length>1;return{duplicates:[...W,...ie?X:[]],subsets:[...Q,...fe?Z:[]].filter(e.unique).sort()}},{duplicates:[],subsets:[]})};e.findDuplicatesAndSubsets=D;const j=function(q,F,U){const X=U===n.ConfigType.WHITELIST?"whitelist":"blacklist",Z=`${t.PACKAGE_NAME}: incorrect ${X} configuration.`,W=`Check your create${U===n.ConfigType.WHITELIST?"White":"Black"}list arguments.
+
+`;if(!(0,e.isString)(F)||F.length<1)throw new Error(`${Z} Name (key) of reducer is required. ${W}`);if(!q||!q.length)return;const{duplicates:Q,subsets:ie}=(0,e.findDuplicatesAndSubsets)(q);if(Q.length>1)throw new Error(`${Z} Duplicated paths.
+
+ ${JSON.stringify(Q)}
+
+ ${W}`);if(ie.length>1)throw new Error(`${Z} You are trying to persist an entire property and also some of its subset.
+
+${JSON.stringify(ie)}
+
+ ${W}`)};e.singleTransformValidator=j;const z=function(q){if(!(0,e.isArray)(q))return;const F=(q==null?void 0:q.map(U=>U.deepPersistKey).filter(U=>U))||[];if(F.length){const U=F.filter((X,Z)=>F.indexOf(X)!==Z);if(U.length)throw new Error(`${t.PACKAGE_NAME}: found duplicated keys in transforms creators. You can createWhitelist or createBlacklist for a specific root reducer key only once. Duplicated keys among createWhitelist and createBlacklist transforms are not allowed.
+
+ Duplicates: ${JSON.stringify(U)}`)}};e.transformsValidator=z;const V=function({whitelist:q,blacklist:F}){if(q&&q.length&&F&&F.length)throw new Error(`${t.PACKAGE_NAME}: you should not define a whitelist and blacklist in parallel. It is allowed to use only one of these lists per config.`);if(q){const{duplicates:U,subsets:X}=(0,e.findDuplicatesAndSubsets)(q);(0,e.throwError)({duplicates:U,subsets:X},"whitelist")}if(F){const{duplicates:U,subsets:X}=(0,e.findDuplicatesAndSubsets)(F);(0,e.throwError)({duplicates:U,subsets:X},"blacklist")}};e.configValidator=V;const K=function({duplicates:q,subsets:F},U){if(q.length)throw new Error(`${t.PACKAGE_NAME}: duplicates of paths found in your ${U}.
+
+ ${JSON.stringify(q)}`);if(F.length)throw new Error(`${t.PACKAGE_NAME}: subsets of some parent keys found in your ${U}. You must decide if you want to persist an entire path or its specific subset.
+
+ ${JSON.stringify(F)}`)};e.throwError=K;const te=function(q){return(0,e.isArray)(q)?q.filter(e.unique).reduce((F,U)=>{const X=U.split("."),Z=X[0],W=X.slice(1).join(".")||void 0,Q=F.filter(fe=>Object.keys(fe)[0]===Z)[0],ie=Q?Object.values(Q)[0]:void 0;return Q||F.push({[Z]:W?[W]:void 0}),Q&&!ie&&W&&(Q[Z]=[W]),Q&&ie&&W&&ie.push(W),F},[]):[]};e.getRootKeysGroup=te})(RW);(function(e){var t=wo&&wo.__rest||function(h,m){var v={};for(var b in h)Object.prototype.hasOwnProperty.call(h,b)&&m.indexOf(b)<0&&(v[b]=h[b]);if(h!=null&&typeof Object.getOwnPropertySymbols=="function")for(var S=0,b=Object.getOwnPropertySymbols(h);S!k(_)&&h?h(E,_,T):E,out:(E,_,T)=>!k(_)&&m?m(E,_,T):E,deepPersistKey:b&&b[0]}},a=(h,m,v,{debug:b,whitelist:S,blacklist:k,transforms:E})=>{if(S||k)throw new Error("State reconciler autoMergeDeep uses custom transforms instead of old whitelist or blacklist config properties. Please use createWhitelist or createBlacklist transforms.");(0,n.transformsValidator)(E);const _=(0,n.cloneDeep)(v);let T=h;if(T&&(0,n.isObjectLike)(T)){const A=(0,n.difference)(m,v);(0,n.isEmpty)(A)||(T=(0,n.mergeDeep)(h,A,{preserveUndefined:!0}),b&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: sub state of your state was modified by reducer during rehydration. Values from reducer will be kept: ${JSON.stringify(A)}`)),Object.keys(T).forEach(I=>{if(I!=="_persist"){if((0,n.isObjectLike)(_[I])){_[I]=(0,n.mergeDeep)(_[I],T[I]);return}_[I]=T[I]}})}return b&&T&&(0,n.isObjectLike)(T)&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: rehydrated keys ${JSON.stringify(T)}`),_};e.autoMergeDeep=a;const s=(h,m)=>((0,n.singleTransformValidator)(m,h,i.ConfigType.WHITELIST),o(v=>{if(!m||!m.length)return v;let b=null,S;return m.forEach(k=>{const E=k.split(".");S=(0,n.path)(v,E),typeof S>"u"&&(0,n.isIntegerString)(E[E.length-1])&&(S=r.PLACEHOLDER_UNDEFINED);const _=(0,n.assocPath)(E,S),T=(0,n.isArray)(_)?[]:{};b=(0,n.mergeDeep)(b||T,_,{preservePlaceholder:!0})}),b||v},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.WHITELIST),{whitelist:[h]}));e.createWhitelist=s;const l=(h,m)=>((0,n.singleTransformValidator)(m,h,i.ConfigType.BLACKLIST),o(v=>{if(!m||!m.length)return;const b=(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST,!0);return m.map(k=>k.split(".")).reduce((k,E)=>(0,n.dissocPath)(k,E),b)},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST),{whitelist:[h]}));e.createBlacklist=l;const u=function(h,m){return m.map(v=>{const b=Object.keys(v)[0],S=v[b];return h===i.ConfigType.WHITELIST?(0,e.createWhitelist)(b,S):(0,e.createBlacklist)(b,S)})};e.getTransforms=u;const d=h=>{var{key:m,whitelist:v,blacklist:b,storage:S,transforms:k,rootReducer:E}=h,_=t(h,["key","whitelist","blacklist","storage","transforms","rootReducer"]);(0,n.configValidator)({whitelist:v,blacklist:b});const T=(0,n.getRootKeysGroup)(v),A=(0,n.getRootKeysGroup)(b),I=Object.keys(E(void 0,{type:""})),R=T.map(te=>Object.keys(te)[0]),D=A.map(te=>Object.keys(te)[0]),j=I.filter(te=>R.indexOf(te)===-1&&D.indexOf(te)===-1),z=(0,e.getTransforms)(i.ConfigType.WHITELIST,T),V=(0,e.getTransforms)(i.ConfigType.BLACKLIST,A),K=(0,n.isArray)(v)?j.map(te=>(0,e.createBlacklist)(te)):[];return Object.assign(Object.assign({},_),{key:m,storage:S,transforms:[...z,...V,...K,...k||[]],stateReconciler:e.autoMergeDeep})};e.getPersistConfig=d})(IW);const Ed=(e,t)=>Math.floor(e/t)*t,Gl=(e,t)=>Math.round(e/t)*t;var Ee={},nxe={get exports(){return Ee},set exports(e){Ee=e}};/**
+ * @license
+ * Lodash
+ * Copyright OpenJS Foundation and other contributors
+ * Released under MIT license
+ * Based on Underscore.js 1.8.3
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ */(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",u=500,d="__lodash_placeholder__",h=1,m=2,v=4,b=1,S=2,k=1,E=2,_=4,T=8,A=16,I=32,R=64,D=128,j=256,z=512,V=30,K="...",te=800,q=16,F=1,U=2,X=3,Z=1/0,W=9007199254740991,Q=17976931348623157e292,ie=0/0,fe=4294967295,Se=fe-1,Te=fe>>>1,ye=[["ary",D],["bind",k],["bindKey",E],["curry",T],["curryRight",A],["flip",z],["partial",I],["partialRight",R],["rearg",j]],He="[object Arguments]",Ne="[object Array]",tt="[object AsyncFunction]",_e="[object Boolean]",lt="[object Date]",wt="[object DOMException]",ct="[object Error]",mt="[object Function]",St="[object GeneratorFunction]",Ae="[object Map]",ut="[object Number]",Mt="[object Null]",at="[object Object]",Ct="[object Promise]",Zt="[object Proxy]",le="[object RegExp]",De="[object Set]",Ue="[object String]",Ye="[object Symbol]",we="[object Undefined]",je="[object WeakMap]",_t="[object WeakSet]",Dt="[object ArrayBuffer]",Le="[object DataView]",At="[object Float32Array]",Fe="[object Float64Array]",vt="[object Int8Array]",nn="[object Int16Array]",Rn="[object Int32Array]",Ke="[object Uint8Array]",xt="[object Uint8ClampedArray]",ft="[object Uint16Array]",Ht="[object Uint32Array]",rn=/\b__p \+= '';/g,pr=/\b(__p \+=) '' \+/g,Mo=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Oi=/&(?:amp|lt|gt|quot|#39);/g,rl=/[&<>"']/g,I0=RegExp(Oi.source),Ba=RegExp(rl.source),kp=/<%-([\s\S]+?)%>/g,R0=/<%([\s\S]+?)%>/g,yc=/<%=([\s\S]+?)%>/g,Ep=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Pp=/^\w*$/,ia=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,vf=/[\\^$.*+?()[\]{}|]/g,D0=RegExp(vf.source),bc=/^\s+/,yf=/\s/,N0=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,il=/\{\n\/\* \[wrapped with (.+)\] \*/,Sc=/,? & /,j0=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,B0=/[()=,{}\[\]\/\s]/,F0=/\\(\\)?/g,$0=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,gs=/\w*$/,z0=/^[-+]0x[0-9a-f]+$/i,H0=/^0b[01]+$/i,V0=/^\[object .+?Constructor\]$/,W0=/^0o[0-7]+$/i,U0=/^(?:0|[1-9]\d*)$/,G0=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ol=/($^)/,q0=/['\n\r\u2028\u2029\\]/g,ms="\\ud800-\\udfff",vu="\\u0300-\\u036f",yu="\\ufe20-\\ufe2f",al="\\u20d0-\\u20ff",bu=vu+yu+al,Tp="\\u2700-\\u27bf",xc="a-z\\xdf-\\xf6\\xf8-\\xff",sl="\\xac\\xb1\\xd7\\xf7",oa="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Dn="\\u2000-\\u206f",Pn=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",aa="A-Z\\xc0-\\xd6\\xd8-\\xde",Hr="\\ufe0e\\ufe0f",li=sl+oa+Dn+Pn,sa="['’]",ll="["+ms+"]",ui="["+li+"]",vs="["+bu+"]",bf="\\d+",Su="["+Tp+"]",ys="["+xc+"]",Sf="[^"+ms+li+bf+Tp+xc+aa+"]",Mi="\\ud83c[\\udffb-\\udfff]",Lp="(?:"+vs+"|"+Mi+")",Ap="[^"+ms+"]",xf="(?:\\ud83c[\\udde6-\\uddff]){2}",ul="[\\ud800-\\udbff][\\udc00-\\udfff]",Io="["+aa+"]",cl="\\u200d",xu="(?:"+ys+"|"+Sf+")",Y0="(?:"+Io+"|"+Sf+")",wc="(?:"+sa+"(?:d|ll|m|re|s|t|ve))?",Cc="(?:"+sa+"(?:D|LL|M|RE|S|T|VE))?",wf=Lp+"?",_c="["+Hr+"]?",Fa="(?:"+cl+"(?:"+[Ap,xf,ul].join("|")+")"+_c+wf+")*",Cf="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",wu="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Yt=_c+wf+Fa,Op="(?:"+[Su,xf,ul].join("|")+")"+Yt,kc="(?:"+[Ap+vs+"?",vs,xf,ul,ll].join("|")+")",Ec=RegExp(sa,"g"),Mp=RegExp(vs,"g"),la=RegExp(Mi+"(?="+Mi+")|"+kc+Yt,"g"),Xn=RegExp([Io+"?"+ys+"+"+wc+"(?="+[ui,Io,"$"].join("|")+")",Y0+"+"+Cc+"(?="+[ui,Io+xu,"$"].join("|")+")",Io+"?"+xu+"+"+wc,Io+"+"+Cc,wu,Cf,bf,Op].join("|"),"g"),_f=RegExp("["+cl+ms+bu+Hr+"]"),Ip=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,kf=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Rp=-1,gn={};gn[At]=gn[Fe]=gn[vt]=gn[nn]=gn[Rn]=gn[Ke]=gn[xt]=gn[ft]=gn[Ht]=!0,gn[He]=gn[Ne]=gn[Dt]=gn[_e]=gn[Le]=gn[lt]=gn[ct]=gn[mt]=gn[Ae]=gn[ut]=gn[at]=gn[le]=gn[De]=gn[Ue]=gn[je]=!1;var Kt={};Kt[He]=Kt[Ne]=Kt[Dt]=Kt[Le]=Kt[_e]=Kt[lt]=Kt[At]=Kt[Fe]=Kt[vt]=Kt[nn]=Kt[Rn]=Kt[Ae]=Kt[ut]=Kt[at]=Kt[le]=Kt[De]=Kt[Ue]=Kt[Ye]=Kt[Ke]=Kt[xt]=Kt[ft]=Kt[Ht]=!0,Kt[ct]=Kt[mt]=Kt[je]=!1;var Dp={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},K0={"&":"&","<":"<",">":">",'"':""","'":"'"},Y={"&":"&","<":"<",">":">",""":'"',"'":"'"},re={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ge=parseFloat,it=parseInt,Wt=typeof wo=="object"&&wo&&wo.Object===Object&&wo,Sn=typeof self=="object"&&self&&self.Object===Object&&self,kt=Wt||Sn||Function("return this")(),Nt=t&&!t.nodeType&&t,Xt=Nt&&!0&&e&&!e.nodeType&&e,Jr=Xt&&Xt.exports===Nt,Ir=Jr&&Wt.process,xn=function(){try{var oe=Xt&&Xt.require&&Xt.require("util").types;return oe||Ir&&Ir.binding&&Ir.binding("util")}catch{}}(),ci=xn&&xn.isArrayBuffer,Ro=xn&&xn.isDate,uo=xn&&xn.isMap,$a=xn&&xn.isRegExp,dl=xn&&xn.isSet,X0=xn&&xn.isTypedArray;function Ii(oe,xe,ve){switch(ve.length){case 0:return oe.call(xe);case 1:return oe.call(xe,ve[0]);case 2:return oe.call(xe,ve[0],ve[1]);case 3:return oe.call(xe,ve[0],ve[1],ve[2])}return oe.apply(xe,ve)}function Z0(oe,xe,ve,nt){for(var It=-1,on=oe==null?0:oe.length;++It-1}function Np(oe,xe,ve){for(var nt=-1,It=oe==null?0:oe.length;++nt-1;);return ve}function bs(oe,xe){for(var ve=oe.length;ve--&&Lc(xe,oe[ve],0)>-1;);return ve}function J0(oe,xe){for(var ve=oe.length,nt=0;ve--;)oe[ve]===xe&&++nt;return nt}var Jy=Lf(Dp),Ss=Lf(K0);function hl(oe){return"\\"+re[oe]}function Bp(oe,xe){return oe==null?n:oe[xe]}function _u(oe){return _f.test(oe)}function Fp(oe){return Ip.test(oe)}function e3(oe){for(var xe,ve=[];!(xe=oe.next()).done;)ve.push(xe.value);return ve}function $p(oe){var xe=-1,ve=Array(oe.size);return oe.forEach(function(nt,It){ve[++xe]=[It,nt]}),ve}function zp(oe,xe){return function(ve){return oe(xe(ve))}}function da(oe,xe){for(var ve=-1,nt=oe.length,It=0,on=[];++ve-1}function b3(c,g){var C=this.__data__,O=Wr(C,c);return O<0?(++this.size,C.push([c,g])):C[O][1]=g,this}fa.prototype.clear=v3,fa.prototype.delete=y3,fa.prototype.get=p1,fa.prototype.has=g1,fa.prototype.set=b3;function ha(c){var g=-1,C=c==null?0:c.length;for(this.clear();++g=g?c:g)),c}function wi(c,g,C,O,B,H){var J,ne=g&h,ce=g&m,ke=g&v;if(C&&(J=B?C(c,O,B,H):C(c)),J!==n)return J;if(!wr(c))return c;var Pe=$t(c);if(Pe){if(J=BK(c),!ne)return Fi(c,J)}else{var Re=ki(c),et=Re==mt||Re==St;if(rd(c))return _l(c,ne);if(Re==at||Re==He||et&&!B){if(J=ce||et?{}:ST(c),!ne)return ce?I1(c,qc(J,c)):zo(c,st(J,c))}else{if(!Kt[Re])return B?c:{};J=FK(c,Re,ne)}}H||(H=new Dr);var bt=H.get(c);if(bt)return bt;H.set(c,J),KT(c)?c.forEach(function(Tt){J.add(wi(Tt,g,C,Tt,c,H))}):qT(c)&&c.forEach(function(Tt,Jt){J.set(Jt,wi(Tt,g,C,Jt,c,H))});var Pt=ke?ce?me:ya:ce?Vo:Ei,qt=Pe?n:Pt(c);return Zn(qt||c,function(Tt,Jt){qt&&(Jt=Tt,Tt=c[Jt]),ml(J,Jt,wi(Tt,g,C,Jt,c,H))}),J}function Kp(c){var g=Ei(c);return function(C){return Xp(C,c,g)}}function Xp(c,g,C){var O=C.length;if(c==null)return!O;for(c=mn(c);O--;){var B=C[O],H=g[B],J=c[B];if(J===n&&!(B in c)||!H(J))return!1}return!0}function b1(c,g,C){if(typeof c!="function")throw new Ri(a);return B1(function(){c.apply(n,C)},g)}function Yc(c,g,C,O){var B=-1,H=Ki,J=!0,ne=c.length,ce=[],ke=g.length;if(!ne)return ce;C&&(g=Un(g,Vr(C))),O?(H=Np,J=!1):g.length>=i&&(H=Oc,J=!1,g=new Wa(g));e:for(;++BB?0:B+C),O=O===n||O>B?B:Vt(O),O<0&&(O+=B),O=C>O?0:ZT(O);C0&&C(ne)?g>1?Ur(ne,g-1,C,O,B):za(B,ne):O||(B[B.length]=ne)}return B}var Qp=kl(),Bo=kl(!0);function va(c,g){return c&&Qp(c,g,Ei)}function Fo(c,g){return c&&Bo(c,g,Ei)}function Jp(c,g){return No(g,function(C){return Iu(c[C])})}function vl(c,g){g=Cl(g,c);for(var C=0,O=g.length;c!=null&&Cg}function tg(c,g){return c!=null&&un.call(c,g)}function ng(c,g){return c!=null&&g in mn(c)}function rg(c,g,C){return c>=fi(g,C)&&c=120&&Pe.length>=120)?new Wa(J&&Pe):n}Pe=c[0];var Re=-1,et=ne[0];e:for(;++Re-1;)ne!==c&&jf.call(ne,ce,1),jf.call(c,ce,1);return c}function Gf(c,g){for(var C=c?g.length:0,O=C-1;C--;){var B=g[C];if(C==O||B!==H){var H=B;Mu(B)?jf.call(c,B,1):hg(c,B)}}return c}function qf(c,g){return c+Eu(l1()*(g-c+1))}function xl(c,g,C,O){for(var B=-1,H=Rr($f((g-c)/(C||1)),0),J=ve(H);H--;)J[O?H:++B]=c,c+=C;return J}function ed(c,g){var C="";if(!c||g<1||g>W)return C;do g%2&&(C+=c),g=Eu(g/2),g&&(c+=c);while(g);return C}function Ot(c,g){return Lw(CT(c,g,Wo),c+"")}function lg(c){return Gc(Sg(c))}function Yf(c,g){var C=Sg(c);return P3(C,Tu(g,0,C.length))}function Au(c,g,C,O){if(!wr(c))return c;g=Cl(g,c);for(var B=-1,H=g.length,J=H-1,ne=c;ne!=null&&++BB?0:B+g),C=C>B?B:C,C<0&&(C+=B),B=g>C?0:C-g>>>0,g>>>=0;for(var H=ve(B);++O>>1,J=c[H];J!==null&&!ba(J)&&(C?J<=g:J=i){var ke=g?null:G(c);if(ke)return If(ke);J=!1,B=Oc,ce=new Wa}else ce=g?[]:ne;e:for(;++O=O?c:qr(c,g,C)}var L1=o3||function(c){return kt.clearTimeout(c)};function _l(c,g){if(g)return c.slice();var C=c.length,O=Nc?Nc(C):new c.constructor(C);return c.copy(O),O}function A1(c){var g=new c.constructor(c.byteLength);return new Di(g).set(new Di(c)),g}function Ou(c,g){var C=g?A1(c.buffer):c.buffer;return new c.constructor(C,c.byteOffset,c.byteLength)}function C3(c){var g=new c.constructor(c.source,gs.exec(c));return g.lastIndex=c.lastIndex,g}function Qn(c){return Hf?mn(Hf.call(c)):{}}function _3(c,g){var C=g?A1(c.buffer):c.buffer;return new c.constructor(C,c.byteOffset,c.length)}function O1(c,g){if(c!==g){var C=c!==n,O=c===null,B=c===c,H=ba(c),J=g!==n,ne=g===null,ce=g===g,ke=ba(g);if(!ne&&!ke&&!H&&c>g||H&&J&&ce&&!ne&&!ke||O&&J&&ce||!C&&ce||!B)return 1;if(!O&&!H&&!ke&&c=ne)return ce;var ke=C[O];return ce*(ke=="desc"?-1:1)}}return c.index-g.index}function k3(c,g,C,O){for(var B=-1,H=c.length,J=C.length,ne=-1,ce=g.length,ke=Rr(H-J,0),Pe=ve(ce+ke),Re=!O;++ne1?C[B-1]:n,J=B>2?C[2]:n;for(H=c.length>3&&typeof H=="function"?(B--,H):n,J&&mo(C[0],C[1],J)&&(H=B<3?n:H,B=1),g=mn(g);++O-1?B[H?g[J]:J]:n}}function D1(c){return mr(function(g){var C=g.length,O=C,B=fo.prototype.thru;for(c&&g.reverse();O--;){var H=g[O];if(typeof H!="function")throw new Ri(a);if(B&&!J&&be(H)=="wrapper")var J=new fo([],!0)}for(O=J?O:C;++O1&&an.reverse(),Pe&&cene))return!1;var ke=H.get(c),Pe=H.get(g);if(ke&&Pe)return ke==g&&Pe==c;var Re=-1,et=!0,bt=C&S?new Wa:n;for(H.set(c,g),H.set(g,c);++Re1?"& ":"")+g[O],g=g.join(C>2?", ":" "),c.replace(N0,`{
+/* [wrapped with `+g+`] */
+`)}function zK(c){return $t(c)||nh(c)||!!(a1&&c&&c[a1])}function Mu(c,g){var C=typeof c;return g=g??W,!!g&&(C=="number"||C!="symbol"&&U0.test(c))&&c>-1&&c%1==0&&c0){if(++g>=te)return arguments[0]}else g=0;return c.apply(n,arguments)}}function P3(c,g){var C=-1,O=c.length,B=O-1;for(g=g===n?O:g;++C1?c[g-1]:n;return C=typeof C=="function"?(c.pop(),C):n,DT(c,C)});function NT(c){var g=$(c);return g.__chain__=!0,g}function QX(c,g){return g(c),c}function T3(c,g){return g(c)}var JX=mr(function(c){var g=c.length,C=g?c[0]:0,O=this.__wrapped__,B=function(H){return Yp(H,c)};return g>1||this.__actions__.length||!(O instanceof Qt)||!Mu(C)?this.thru(B):(O=O.slice(C,+C+(g?1:0)),O.__actions__.push({func:T3,args:[B],thisArg:n}),new fo(O,this.__chain__).thru(function(H){return g&&!H.length&&H.push(n),H}))});function eZ(){return NT(this)}function tZ(){return new fo(this.value(),this.__chain__)}function nZ(){this.__values__===n&&(this.__values__=XT(this.value()));var c=this.__index__>=this.__values__.length,g=c?n:this.__values__[this.__index__++];return{done:c,value:g}}function rZ(){return this}function iZ(c){for(var g,C=this;C instanceof Vf;){var O=LT(C);O.__index__=0,O.__values__=n,g?B.__wrapped__=O:g=O;var B=O;C=C.__wrapped__}return B.__wrapped__=c,g}function oZ(){var c=this.__wrapped__;if(c instanceof Qt){var g=c;return this.__actions__.length&&(g=new Qt(this)),g=g.reverse(),g.__actions__.push({func:T3,args:[Aw],thisArg:n}),new fo(g,this.__chain__)}return this.thru(Aw)}function aZ(){return wl(this.__wrapped__,this.__actions__)}var sZ=gg(function(c,g,C){un.call(c,C)?++c[C]:pa(c,C,1)});function lZ(c,g,C){var O=$t(c)?Wn:S1;return C&&mo(c,g,C)&&(g=n),O(c,Me(g,3))}function uZ(c,g){var C=$t(c)?No:ma;return C(c,Me(g,3))}var cZ=R1(AT),dZ=R1(OT);function fZ(c,g){return Ur(L3(c,g),1)}function hZ(c,g){return Ur(L3(c,g),Z)}function pZ(c,g,C){return C=C===n?1:Vt(C),Ur(L3(c,g),C)}function jT(c,g){var C=$t(c)?Zn:Cs;return C(c,Me(g,3))}function BT(c,g){var C=$t(c)?Do:Zp;return C(c,Me(g,3))}var gZ=gg(function(c,g,C){un.call(c,C)?c[C].push(g):pa(c,C,[g])});function mZ(c,g,C,O){c=Ho(c)?c:Sg(c),C=C&&!O?Vt(C):0;var B=c.length;return C<0&&(C=Rr(B+C,0)),R3(c)?C<=B&&c.indexOf(g,C)>-1:!!B&&Lc(c,g,C)>-1}var vZ=Ot(function(c,g,C){var O=-1,B=typeof g=="function",H=Ho(c)?ve(c.length):[];return Cs(c,function(J){H[++O]=B?Ii(g,J,C):_s(J,g,C)}),H}),yZ=gg(function(c,g,C){pa(c,C,g)});function L3(c,g){var C=$t(c)?Un:jr;return C(c,Me(g,3))}function bZ(c,g,C,O){return c==null?[]:($t(g)||(g=g==null?[]:[g]),C=O?n:C,$t(C)||(C=C==null?[]:[C]),ji(c,g,C))}var SZ=gg(function(c,g,C){c[C?0:1].push(g)},function(){return[[],[]]});function xZ(c,g,C){var O=$t(c)?Ef:jp,B=arguments.length<3;return O(c,Me(g,4),C,B,Cs)}function wZ(c,g,C){var O=$t(c)?Ky:jp,B=arguments.length<3;return O(c,Me(g,4),C,B,Zp)}function CZ(c,g){var C=$t(c)?No:ma;return C(c,M3(Me(g,3)))}function _Z(c){var g=$t(c)?Gc:lg;return g(c)}function kZ(c,g,C){(C?mo(c,g,C):g===n)?g=1:g=Vt(g);var O=$t(c)?xi:Yf;return O(c,g)}function EZ(c){var g=$t(c)?xw:_i;return g(c)}function PZ(c){if(c==null)return 0;if(Ho(c))return R3(c)?Ha(c):c.length;var g=ki(c);return g==Ae||g==De?c.size:Gr(c).length}function TZ(c,g,C){var O=$t(c)?Pc:$o;return C&&mo(c,g,C)&&(g=n),O(c,Me(g,3))}var LZ=Ot(function(c,g){if(c==null)return[];var C=g.length;return C>1&&mo(c,g[0],g[1])?g=[]:C>2&&mo(g[0],g[1],g[2])&&(g=[g[0]]),ji(c,Ur(g,1),[])}),A3=a3||function(){return kt.Date.now()};function AZ(c,g){if(typeof g!="function")throw new Ri(a);return c=Vt(c),function(){if(--c<1)return g.apply(this,arguments)}}function FT(c,g,C){return g=C?n:g,g=c&&g==null?c.length:g,pe(c,D,n,n,n,n,g)}function $T(c,g){var C;if(typeof g!="function")throw new Ri(a);return c=Vt(c),function(){return--c>0&&(C=g.apply(this,arguments)),c<=1&&(g=n),C}}var Mw=Ot(function(c,g,C){var O=k;if(C.length){var B=da(C,Je(Mw));O|=I}return pe(c,O,g,C,B)}),zT=Ot(function(c,g,C){var O=k|E;if(C.length){var B=da(C,Je(zT));O|=I}return pe(g,O,c,C,B)});function HT(c,g,C){g=C?n:g;var O=pe(c,T,n,n,n,n,n,g);return O.placeholder=HT.placeholder,O}function VT(c,g,C){g=C?n:g;var O=pe(c,A,n,n,n,n,n,g);return O.placeholder=VT.placeholder,O}function WT(c,g,C){var O,B,H,J,ne,ce,ke=0,Pe=!1,Re=!1,et=!0;if(typeof c!="function")throw new Ri(a);g=qa(g)||0,wr(C)&&(Pe=!!C.leading,Re="maxWait"in C,H=Re?Rr(qa(C.maxWait)||0,g):H,et="trailing"in C?!!C.trailing:et);function bt(Kr){var Ls=O,Du=B;return O=B=n,ke=Kr,J=c.apply(Du,Ls),J}function Pt(Kr){return ke=Kr,ne=B1(Jt,g),Pe?bt(Kr):J}function qt(Kr){var Ls=Kr-ce,Du=Kr-ke,uL=g-Ls;return Re?fi(uL,H-Du):uL}function Tt(Kr){var Ls=Kr-ce,Du=Kr-ke;return ce===n||Ls>=g||Ls<0||Re&&Du>=H}function Jt(){var Kr=A3();if(Tt(Kr))return an(Kr);ne=B1(Jt,qt(Kr))}function an(Kr){return ne=n,et&&O?bt(Kr):(O=B=n,J)}function Sa(){ne!==n&&L1(ne),ke=0,O=ce=B=ne=n}function vo(){return ne===n?J:an(A3())}function xa(){var Kr=A3(),Ls=Tt(Kr);if(O=arguments,B=this,ce=Kr,Ls){if(ne===n)return Pt(ce);if(Re)return L1(ne),ne=B1(Jt,g),bt(ce)}return ne===n&&(ne=B1(Jt,g)),J}return xa.cancel=Sa,xa.flush=vo,xa}var OZ=Ot(function(c,g){return b1(c,1,g)}),MZ=Ot(function(c,g,C){return b1(c,qa(g)||0,C)});function IZ(c){return pe(c,z)}function O3(c,g){if(typeof c!="function"||g!=null&&typeof g!="function")throw new Ri(a);var C=function(){var O=arguments,B=g?g.apply(this,O):O[0],H=C.cache;if(H.has(B))return H.get(B);var J=c.apply(this,O);return C.cache=H.set(B,J)||H,J};return C.cache=new(O3.Cache||ha),C}O3.Cache=ha;function M3(c){if(typeof c!="function")throw new Ri(a);return function(){var g=arguments;switch(g.length){case 0:return!c.call(this);case 1:return!c.call(this,g[0]);case 2:return!c.call(this,g[0],g[1]);case 3:return!c.call(this,g[0],g[1],g[2])}return!c.apply(this,g)}}function RZ(c){return $T(2,c)}var DZ=_w(function(c,g){g=g.length==1&&$t(g[0])?Un(g[0],Vr(Me())):Un(Ur(g,1),Vr(Me()));var C=g.length;return Ot(function(O){for(var B=-1,H=fi(O.length,C);++B=g}),nh=og(function(){return arguments}())?og:function(c){return Br(c)&&un.call(c,"callee")&&!o1.call(c,"callee")},$t=ve.isArray,XZ=ci?Vr(ci):w1;function Ho(c){return c!=null&&I3(c.length)&&!Iu(c)}function Yr(c){return Br(c)&&Ho(c)}function ZZ(c){return c===!0||c===!1||Br(c)&&Ci(c)==_e}var rd=s3||Ww,QZ=Ro?Vr(Ro):C1;function JZ(c){return Br(c)&&c.nodeType===1&&!F1(c)}function eQ(c){if(c==null)return!0;if(Ho(c)&&($t(c)||typeof c=="string"||typeof c.splice=="function"||rd(c)||bg(c)||nh(c)))return!c.length;var g=ki(c);if(g==Ae||g==De)return!c.size;if(j1(c))return!Gr(c).length;for(var C in c)if(un.call(c,C))return!1;return!0}function tQ(c,g){return Xc(c,g)}function nQ(c,g,C){C=typeof C=="function"?C:n;var O=C?C(c,g):n;return O===n?Xc(c,g,n,C):!!O}function Rw(c){if(!Br(c))return!1;var g=Ci(c);return g==ct||g==wt||typeof c.message=="string"&&typeof c.name=="string"&&!F1(c)}function rQ(c){return typeof c=="number"&&Wp(c)}function Iu(c){if(!wr(c))return!1;var g=Ci(c);return g==mt||g==St||g==tt||g==Zt}function GT(c){return typeof c=="number"&&c==Vt(c)}function I3(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=W}function wr(c){var g=typeof c;return c!=null&&(g=="object"||g=="function")}function Br(c){return c!=null&&typeof c=="object"}var qT=uo?Vr(uo):Cw;function iQ(c,g){return c===g||Zc(c,g,Rt(g))}function oQ(c,g,C){return C=typeof C=="function"?C:n,Zc(c,g,Rt(g),C)}function aQ(c){return YT(c)&&c!=+c}function sQ(c){if(WK(c))throw new It(o);return ag(c)}function lQ(c){return c===null}function uQ(c){return c==null}function YT(c){return typeof c=="number"||Br(c)&&Ci(c)==ut}function F1(c){if(!Br(c)||Ci(c)!=at)return!1;var g=jc(c);if(g===null)return!0;var C=un.call(g,"constructor")&&g.constructor;return typeof C=="function"&&C instanceof C&&br.call(C)==Si}var Dw=$a?Vr($a):Sr;function cQ(c){return GT(c)&&c>=-W&&c<=W}var KT=dl?Vr(dl):Ut;function R3(c){return typeof c=="string"||!$t(c)&&Br(c)&&Ci(c)==Ue}function ba(c){return typeof c=="symbol"||Br(c)&&Ci(c)==Ye}var bg=X0?Vr(X0):ei;function dQ(c){return c===n}function fQ(c){return Br(c)&&ki(c)==je}function hQ(c){return Br(c)&&Ci(c)==_t}var pQ=P(yl),gQ=P(function(c,g){return c<=g});function XT(c){if(!c)return[];if(Ho(c))return R3(c)?Xi(c):Fi(c);if(Bc&&c[Bc])return e3(c[Bc]());var g=ki(c),C=g==Ae?$p:g==De?If:Sg;return C(c)}function Ru(c){if(!c)return c===0?c:0;if(c=qa(c),c===Z||c===-Z){var g=c<0?-1:1;return g*Q}return c===c?c:0}function Vt(c){var g=Ru(c),C=g%1;return g===g?C?g-C:g:0}function ZT(c){return c?Tu(Vt(c),0,fe):0}function qa(c){if(typeof c=="number")return c;if(ba(c))return ie;if(wr(c)){var g=typeof c.valueOf=="function"?c.valueOf():c;c=wr(g)?g+"":g}if(typeof c!="string")return c===0?c:+c;c=co(c);var C=H0.test(c);return C||W0.test(c)?it(c.slice(2),C?2:8):z0.test(c)?ie:+c}function QT(c){return Ua(c,Vo(c))}function mQ(c){return c?Tu(Vt(c),-W,W):c===0?c:0}function Ln(c){return c==null?"":po(c)}var vQ=go(function(c,g){if(j1(g)||Ho(g)){Ua(g,Ei(g),c);return}for(var C in g)un.call(g,C)&&ml(c,C,g[C])}),JT=go(function(c,g){Ua(g,Vo(g),c)}),D3=go(function(c,g,C,O){Ua(g,Vo(g),c,O)}),yQ=go(function(c,g,C,O){Ua(g,Ei(g),c,O)}),bQ=mr(Yp);function SQ(c,g){var C=Pu(c);return g==null?C:st(C,g)}var xQ=Ot(function(c,g){c=mn(c);var C=-1,O=g.length,B=O>2?g[2]:n;for(B&&mo(g[0],g[1],B)&&(O=1);++C1),H}),Ua(c,me(c),C),O&&(C=wi(C,h|m|v,jt));for(var B=g.length;B--;)hg(C,g[B]);return C});function FQ(c,g){return tL(c,M3(Me(g)))}var $Q=mr(function(c,g){return c==null?{}:E1(c,g)});function tL(c,g){if(c==null)return{};var C=Un(me(c),function(O){return[O]});return g=Me(g),sg(c,C,function(O,B){return g(O,B[0])})}function zQ(c,g,C){g=Cl(g,c);var O=-1,B=g.length;for(B||(B=1,c=n);++Og){var O=c;c=g,g=O}if(C||c%1||g%1){var B=l1();return fi(c+B*(g-c+ge("1e-"+((B+"").length-1))),g)}return qf(c,g)}var QQ=El(function(c,g,C){return g=g.toLowerCase(),c+(C?iL(g):g)});function iL(c){return Bw(Ln(c).toLowerCase())}function oL(c){return c=Ln(c),c&&c.replace(G0,Jy).replace(Mp,"")}function JQ(c,g,C){c=Ln(c),g=po(g);var O=c.length;C=C===n?O:Tu(Vt(C),0,O);var B=C;return C-=g.length,C>=0&&c.slice(C,B)==g}function eJ(c){return c=Ln(c),c&&Ba.test(c)?c.replace(rl,Ss):c}function tJ(c){return c=Ln(c),c&&D0.test(c)?c.replace(vf,"\\$&"):c}var nJ=El(function(c,g,C){return c+(C?"-":"")+g.toLowerCase()}),rJ=El(function(c,g,C){return c+(C?" ":"")+g.toLowerCase()}),iJ=vg("toLowerCase");function oJ(c,g,C){c=Ln(c),g=Vt(g);var O=g?Ha(c):0;if(!g||O>=g)return c;var B=(g-O)/2;return f(Eu(B),C)+c+f($f(B),C)}function aJ(c,g,C){c=Ln(c),g=Vt(g);var O=g?Ha(c):0;return g&&O>>0,C?(c=Ln(c),c&&(typeof g=="string"||g!=null&&!Dw(g))&&(g=po(g),!g&&_u(c))?Es(Xi(c),0,C):c.split(g,C)):[]}var hJ=El(function(c,g,C){return c+(C?" ":"")+Bw(g)});function pJ(c,g,C){return c=Ln(c),C=C==null?0:Tu(Vt(C),0,c.length),g=po(g),c.slice(C,C+g.length)==g}function gJ(c,g,C){var O=$.templateSettings;C&&mo(c,g,C)&&(g=n),c=Ln(c),g=D3({},g,O,ze);var B=D3({},g.imports,O.imports,ze),H=Ei(B),J=Mf(B,H),ne,ce,ke=0,Pe=g.interpolate||ol,Re="__p += '",et=Df((g.escape||ol).source+"|"+Pe.source+"|"+(Pe===yc?$0:ol).source+"|"+(g.evaluate||ol).source+"|$","g"),bt="//# sourceURL="+(un.call(g,"sourceURL")?(g.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Rp+"]")+`
+`;c.replace(et,function(Tt,Jt,an,Sa,vo,xa){return an||(an=Sa),Re+=c.slice(ke,xa).replace(q0,hl),Jt&&(ne=!0,Re+=`' +
+__e(`+Jt+`) +
+'`),vo&&(ce=!0,Re+=`';
+`+vo+`;
+__p += '`),an&&(Re+=`' +
+((__t = (`+an+`)) == null ? '' : __t) +
+'`),ke=xa+Tt.length,Tt}),Re+=`';
+`;var Pt=un.call(g,"variable")&&g.variable;if(!Pt)Re=`with (obj) {
+`+Re+`
+}
+`;else if(B0.test(Pt))throw new It(s);Re=(ce?Re.replace(rn,""):Re).replace(pr,"$1").replace(Mo,"$1;"),Re="function("+(Pt||"obj")+`) {
+`+(Pt?"":`obj || (obj = {});
+`)+"var __t, __p = ''"+(ne?", __e = _.escape":"")+(ce?`, __j = Array.prototype.join;
+function print() { __p += __j.call(arguments, '') }
+`:`;
+`)+Re+`return __p
+}`;var qt=sL(function(){return on(H,bt+"return "+Re).apply(n,J)});if(qt.source=Re,Rw(qt))throw qt;return qt}function mJ(c){return Ln(c).toLowerCase()}function vJ(c){return Ln(c).toUpperCase()}function yJ(c,g,C){if(c=Ln(c),c&&(C||g===n))return co(c);if(!c||!(g=po(g)))return c;var O=Xi(c),B=Xi(g),H=ca(O,B),J=bs(O,B)+1;return Es(O,H,J).join("")}function bJ(c,g,C){if(c=Ln(c),c&&(C||g===n))return c.slice(0,t1(c)+1);if(!c||!(g=po(g)))return c;var O=Xi(c),B=bs(O,Xi(g))+1;return Es(O,0,B).join("")}function SJ(c,g,C){if(c=Ln(c),c&&(C||g===n))return c.replace(bc,"");if(!c||!(g=po(g)))return c;var O=Xi(c),B=ca(O,Xi(g));return Es(O,B).join("")}function xJ(c,g){var C=V,O=K;if(wr(g)){var B="separator"in g?g.separator:B;C="length"in g?Vt(g.length):C,O="omission"in g?po(g.omission):O}c=Ln(c);var H=c.length;if(_u(c)){var J=Xi(c);H=J.length}if(C>=H)return c;var ne=C-Ha(O);if(ne<1)return O;var ce=J?Es(J,0,ne).join(""):c.slice(0,ne);if(B===n)return ce+O;if(J&&(ne+=ce.length-ne),Dw(B)){if(c.slice(ne).search(B)){var ke,Pe=ce;for(B.global||(B=Df(B.source,Ln(gs.exec(B))+"g")),B.lastIndex=0;ke=B.exec(Pe);)var Re=ke.index;ce=ce.slice(0,Re===n?ne:Re)}}else if(c.indexOf(po(B),ne)!=ne){var et=ce.lastIndexOf(B);et>-1&&(ce=ce.slice(0,et))}return ce+O}function wJ(c){return c=Ln(c),c&&I0.test(c)?c.replace(Oi,r3):c}var CJ=El(function(c,g,C){return c+(C?" ":"")+g.toUpperCase()}),Bw=vg("toUpperCase");function aL(c,g,C){return c=Ln(c),g=C?n:g,g===n?Fp(c)?Rf(c):Q0(c):c.match(g)||[]}var sL=Ot(function(c,g){try{return Ii(c,n,g)}catch(C){return Rw(C)?C:new It(C)}}),_J=mr(function(c,g){return Zn(g,function(C){C=Pl(C),pa(c,C,Mw(c[C],c))}),c});function kJ(c){var g=c==null?0:c.length,C=Me();return c=g?Un(c,function(O){if(typeof O[1]!="function")throw new Ri(a);return[C(O[0]),O[1]]}):[],Ot(function(O){for(var B=-1;++BW)return[];var C=fe,O=fi(c,fe);g=Me(g),c-=fe;for(var B=Of(O,g);++C0||g<0)?new Qt(C):(c<0?C=C.takeRight(-c):c&&(C=C.drop(c)),g!==n&&(g=Vt(g),C=g<0?C.dropRight(-g):C.take(g-c)),C)},Qt.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},Qt.prototype.toArray=function(){return this.take(fe)},va(Qt.prototype,function(c,g){var C=/^(?:filter|find|map|reject)|While$/.test(g),O=/^(?:head|last)$/.test(g),B=$[O?"take"+(g=="last"?"Right":""):g],H=O||/^find/.test(g);B&&($.prototype[g]=function(){var J=this.__wrapped__,ne=O?[1]:arguments,ce=J instanceof Qt,ke=ne[0],Pe=ce||$t(J),Re=function(Jt){var an=B.apply($,za([Jt],ne));return O&&et?an[0]:an};Pe&&C&&typeof ke=="function"&&ke.length!=1&&(ce=Pe=!1);var et=this.__chain__,bt=!!this.__actions__.length,Pt=H&&!et,qt=ce&&!bt;if(!H&&Pe){J=qt?J:new Qt(this);var Tt=c.apply(J,ne);return Tt.__actions__.push({func:T3,args:[Re],thisArg:n}),new fo(Tt,et)}return Pt&&qt?c.apply(this,ne):(Tt=this.thru(Re),Pt?O?Tt.value()[0]:Tt.value():Tt)})}),Zn(["pop","push","shift","sort","splice","unshift"],function(c){var g=Ic[c],C=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",O=/^(?:pop|shift)$/.test(c);$.prototype[c]=function(){var B=arguments;if(O&&!this.__chain__){var H=this.value();return g.apply($t(H)?H:[],B)}return this[C](function(J){return g.apply($t(J)?J:[],B)})}}),va(Qt.prototype,function(c,g){var C=$[g];if(C){var O=C.name+"";un.call(xs,O)||(xs[O]=[]),xs[O].push({name:g,func:C})}}),xs[Jf(n,E).name]=[{name:"wrapper",func:n}],Qt.prototype.clone=Zi,Qt.prototype.reverse=Ni,Qt.prototype.value=f3,$.prototype.at=JX,$.prototype.chain=eZ,$.prototype.commit=tZ,$.prototype.next=nZ,$.prototype.plant=iZ,$.prototype.reverse=oZ,$.prototype.toJSON=$.prototype.valueOf=$.prototype.value=aZ,$.prototype.first=$.prototype.head,Bc&&($.prototype[Bc]=rZ),$},Va=jo();Xt?((Xt.exports=Va)._=Va,Nt._=Va):kt._=Va}).call(wo)})(nxe,Ee);const Ag=(e,t,n,r,i,o,a)=>{const s=e/2-(n+i/2)*a,l=t/2-(r+o/2)*a;return{x:s,y:l}},Og=(e,t,n,r,i=.95)=>{const o=e*i/n,a=t*i/r;return Math.min(1,Math.min(o,a))},rxe=.999,ixe=.1,oxe=20,nv=.95,RI=30,l8=10,DI=e=>({x:Math.floor(e.x),y:Math.floor(e.y)}),oh=e=>{const{width:t,height:n}=e,r={width:t,height:n},i=512*512,o=t/n;let a=t*n,s=448;for(;a1?(r.width=s,r.height=Gl(s/o,64)):o<1&&(r.height=s,r.width=Gl(s*o,64)),a=r.width*r.height;return r},axe=e=>({width:Gl(e.width,64),height:Gl(e.height,64)}),DW=[{key:"Base",value:"base"},{key:"Mask",value:"mask"}],sxe=[{key:"Auto",value:"auto"},{key:"Manual",value:"manual"},{key:"None",value:"none"}],tP=e=>e.kind==="line"&&e.layer==="mask",lxe=e=>e.kind==="line"&&e.layer==="base",U5=e=>e.kind==="image"&&e.layer==="base",uxe=e=>e.kind==="fillRect"&&e.layer==="base",cxe=e=>e.kind==="eraseRect"&&e.layer==="base",dxe=e=>e.kind==="line",kv={objects:[],stagingArea:{images:[],selectedImageIndex:-1}},fxe={boundingBoxCoordinates:{x:0,y:0},boundingBoxDimensions:{width:512,height:512},boundingBoxPreviewFill:{r:0,g:0,b:0,a:.5},boundingBoxScaleMethod:"auto",brushColor:{r:90,g:90,b:255,a:1},brushSize:50,canvasContainerDimensions:{width:0,height:0},colorPickerColor:{r:90,g:90,b:255,a:1},cursorPosition:null,doesCanvasNeedScaling:!1,futureLayerStates:[],isCanvasInitialized:!1,isDrawing:!1,isMaskEnabled:!0,isMouseOverBoundingBox:!1,isMoveBoundingBoxKeyHeld:!1,isMoveStageKeyHeld:!1,isMovingBoundingBox:!1,isMovingStage:!1,isTransformingBoundingBox:!1,layer:"base",layerState:kv,maskColor:{r:255,g:90,b:90,a:1},maxHistory:128,minimumStageScale:1,pastLayerStates:[],scaledBoundingBoxDimensions:{width:512,height:512},shouldAutoSave:!1,shouldCropToBoundingBoxOnSave:!1,shouldDarkenOutsideBoundingBox:!1,shouldLockBoundingBox:!1,shouldPreserveMaskedArea:!1,shouldRestrictStrokesToBox:!0,shouldShowBoundingBox:!0,shouldShowBrush:!0,shouldShowBrushPreview:!1,shouldShowCanvasDebugInfo:!1,shouldShowCheckboardTransparency:!1,shouldShowGrid:!0,shouldShowIntermediates:!0,shouldShowStagingImage:!0,shouldShowStagingOutline:!0,shouldSnapToGrid:!0,stageCoordinates:{x:0,y:0},stageDimensions:{width:0,height:0},stageScale:1,tool:"brush"},NW=cp({name:"canvas",initialState:fxe,reducers:{setTool:(e,t)=>{const n=t.payload;e.tool=t.payload,n!=="move"&&(e.isTransformingBoundingBox=!1,e.isMouseOverBoundingBox=!1,e.isMovingBoundingBox=!1,e.isMovingStage=!1)},setLayer:(e,t)=>{e.layer=t.payload},toggleTool:e=>{const t=e.tool;t!=="move"&&(e.tool=t==="brush"?"eraser":"brush")},setMaskColor:(e,t)=>{e.maskColor=t.payload},setBrushColor:(e,t)=>{e.brushColor=t.payload},setBrushSize:(e,t)=>{e.brushSize=t.payload},clearMask:e=>{e.pastLayerStates.push(Ee.cloneDeep(e.layerState)),e.layerState.objects=e.layerState.objects.filter(t=>!tP(t)),e.futureLayerStates=[],e.shouldPreserveMaskedArea=!1},toggleShouldInvertMask:e=>{e.shouldPreserveMaskedArea=!e.shouldPreserveMaskedArea},toggleShouldShowMask:e=>{e.isMaskEnabled=!e.isMaskEnabled},setShouldPreserveMaskedArea:(e,t)=>{e.shouldPreserveMaskedArea=t.payload},setIsMaskEnabled:(e,t)=>{e.isMaskEnabled=t.payload,e.layer=t.payload?"mask":"base"},setShouldShowCheckboardTransparency:(e,t)=>{e.shouldShowCheckboardTransparency=t.payload},setShouldShowBrushPreview:(e,t)=>{e.shouldShowBrushPreview=t.payload},setShouldShowBrush:(e,t)=>{e.shouldShowBrush=t.payload},setCursorPosition:(e,t)=>{e.cursorPosition=t.payload},setInitialCanvasImage:(e,t)=>{const n=t.payload,{stageDimensions:r}=e,i={width:Ed(Ee.clamp(n.width,64,512),64),height:Ed(Ee.clamp(n.height,64,512),64)},o={x:Gl(n.width/2-i.width/2,64),y:Gl(n.height/2-i.height/2,64)};if(e.boundingBoxScaleMethod==="auto"){const l=oh(i);e.scaledBoundingBoxDimensions=l}e.boundingBoxDimensions=i,e.boundingBoxCoordinates=o,e.pastLayerStates.push(Ee.cloneDeep(e.layerState)),e.layerState={...kv,objects:[{kind:"image",layer:"base",x:0,y:0,width:n.width,height:n.height,image:n}]},e.futureLayerStates=[],e.isCanvasInitialized=!1;const a=Og(r.width,r.height,n.width,n.height,nv),s=Ag(r.width,r.height,0,0,n.width,n.height,a);e.stageScale=a,e.stageCoordinates=s,e.doesCanvasNeedScaling=!0},setBoundingBoxDimensions:(e,t)=>{const n=axe(t.payload);if(e.boundingBoxDimensions=n,e.boundingBoxScaleMethod==="auto"){const r=oh(n);e.scaledBoundingBoxDimensions=r}},setBoundingBoxCoordinates:(e,t)=>{e.boundingBoxCoordinates=DI(t.payload)},setStageCoordinates:(e,t)=>{e.stageCoordinates=t.payload},setBoundingBoxPreviewFill:(e,t)=>{e.boundingBoxPreviewFill=t.payload},setDoesCanvasNeedScaling:(e,t)=>{e.doesCanvasNeedScaling=t.payload},setStageScale:(e,t)=>{e.stageScale=t.payload},setShouldDarkenOutsideBoundingBox:(e,t)=>{e.shouldDarkenOutsideBoundingBox=t.payload},setIsDrawing:(e,t)=>{e.isDrawing=t.payload},clearCanvasHistory:e=>{e.pastLayerStates=[],e.futureLayerStates=[]},setShouldLockBoundingBox:(e,t)=>{e.shouldLockBoundingBox=t.payload},toggleShouldLockBoundingBox:e=>{e.shouldLockBoundingBox=!e.shouldLockBoundingBox},setShouldShowBoundingBox:(e,t)=>{e.shouldShowBoundingBox=t.payload},setIsTransformingBoundingBox:(e,t)=>{e.isTransformingBoundingBox=t.payload},setIsMovingBoundingBox:(e,t)=>{e.isMovingBoundingBox=t.payload},setIsMouseOverBoundingBox:(e,t)=>{e.isMouseOverBoundingBox=t.payload},setIsMoveBoundingBoxKeyHeld:(e,t)=>{e.isMoveBoundingBoxKeyHeld=t.payload},setIsMoveStageKeyHeld:(e,t)=>{e.isMoveStageKeyHeld=t.payload},addImageToStagingArea:(e,t)=>{const{boundingBox:n,image:r}=t.payload;!n||!r||(e.pastLayerStates.push(Ee.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea.images.push({kind:"image",layer:"base",...n,image:r}),e.layerState.stagingArea.selectedImageIndex=e.layerState.stagingArea.images.length-1,e.futureLayerStates=[])},discardStagedImages:e=>{e.pastLayerStates.push(Ee.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea={...kv.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!0,e.shouldShowStagingOutline=!0},addFillRect:e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n,brushColor:r}=e;e.pastLayerStates.push(Ee.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({kind:"fillRect",layer:"base",...t,...n,color:r}),e.futureLayerStates=[]},addEraseRect:e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n}=e;e.pastLayerStates.push(Ee.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({kind:"eraseRect",layer:"base",...t,...n}),e.futureLayerStates=[]},addLine:(e,t)=>{const{tool:n,layer:r,brushColor:i,brushSize:o,shouldRestrictStrokesToBox:a}=e;if(n==="move"||n==="colorPicker")return;const s=o/2,l=r==="base"&&n==="brush"?{color:i}:{};e.pastLayerStates.push(Ee.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift();const u={kind:"line",layer:r,tool:n,strokeWidth:s,points:t.payload,...l};a&&(u.clip={...e.boundingBoxCoordinates,...e.boundingBoxDimensions}),e.layerState.objects.push(u),e.futureLayerStates=[]},addPointToCurrentLine:(e,t)=>{const n=e.layerState.objects.findLast(dxe);n&&n.points.push(...t.payload)},undo:e=>{const t=e.pastLayerStates.pop();t&&(e.futureLayerStates.unshift(Ee.cloneDeep(e.layerState)),e.futureLayerStates.length>e.maxHistory&&e.futureLayerStates.pop(),e.layerState=t)},redo:e=>{const t=e.futureLayerStates.shift();t&&(e.pastLayerStates.push(Ee.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState=t)},setShouldShowGrid:(e,t)=>{e.shouldShowGrid=t.payload},setIsMovingStage:(e,t)=>{e.isMovingStage=t.payload},setShouldSnapToGrid:(e,t)=>{e.shouldSnapToGrid=t.payload},setShouldAutoSave:(e,t)=>{e.shouldAutoSave=t.payload},setShouldShowIntermediates:(e,t)=>{e.shouldShowIntermediates=t.payload},resetCanvas:e=>{e.pastLayerStates.push(Ee.cloneDeep(e.layerState)),e.layerState=kv,e.futureLayerStates=[]},setCanvasContainerDimensions:(e,t)=>{e.canvasContainerDimensions=t.payload},resizeAndScaleCanvas:e=>{const{width:t,height:n}=e.canvasContainerDimensions,r=e.layerState.objects.find(U5),i={width:Math.floor(t),height:Math.floor(n)};if(!r){const d=Og(i.width,i.height,512,512,nv),h=Ag(i.width,i.height,0,0,512,512,d),m={width:512,height:512};if(e.stageScale=d,e.stageCoordinates=h,e.stageDimensions=i,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions=m,e.boundingBoxScaleMethod==="auto"){const v=oh(m);e.scaledBoundingBoxDimensions=v}return}const{width:o,height:a}=r,l=Og(t,n,o,a,.95),u=Ag(i.width,i.height,0,0,o,a,l);e.minimumStageScale=l,e.stageScale=l,e.stageCoordinates=DI(u),e.stageDimensions=i,e.isCanvasInitialized=!0},resizeCanvas:e=>{const{width:t,height:n}=e.canvasContainerDimensions,r={width:Math.floor(t),height:Math.floor(n)};if(e.stageDimensions=r,!e.layerState.objects.find(U5)){const i=Og(r.width,r.height,512,512,nv),o=Ag(r.width,r.height,0,0,512,512,i),a={width:512,height:512};if(e.stageScale=i,e.stageCoordinates=o,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions=a,e.boundingBoxScaleMethod==="auto"){const s=oh(a);e.scaledBoundingBoxDimensions=s}}},resetCanvasView:(e,t)=>{const{contentRect:n,shouldScaleTo1:r}=t.payload,{stageDimensions:{width:i,height:o}}=e,{x:a,y:s,width:l,height:u}=n;if(l!==0&&u!==0){const d=r?1:Og(i,o,l,u,nv),h=Ag(i,o,a,s,l,u,d);e.stageScale=d,e.stageCoordinates=h}else{const d=Og(i,o,512,512,nv),h=Ag(i,o,0,0,512,512,d),m={width:512,height:512};if(e.stageScale=d,e.stageCoordinates=h,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions=m,e.boundingBoxScaleMethod==="auto"){const v=oh(m);e.scaledBoundingBoxDimensions=v}}},nextStagingAreaImage:e=>{const t=e.layerState.stagingArea.selectedImageIndex,n=e.layerState.stagingArea.images.length;e.layerState.stagingArea.selectedImageIndex=Math.min(t+1,n-1)},prevStagingAreaImage:e=>{const t=e.layerState.stagingArea.selectedImageIndex;e.layerState.stagingArea.selectedImageIndex=Math.max(t-1,0)},commitStagingAreaImage:e=>{const{images:t,selectedImageIndex:n}=e.layerState.stagingArea;e.pastLayerStates.push(Ee.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({...t[n]}),e.layerState.stagingArea={...kv.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!0,e.shouldShowStagingImage=!0},fitBoundingBoxToStage:e=>{const{boundingBoxDimensions:t,boundingBoxCoordinates:n,stageDimensions:r,stageScale:i}=e,o=r.width/i,a=r.height/i;if(n.x<0||n.x+t.width>o||n.y<0||n.y+t.height>a){const s={width:Ed(Ee.clamp(o,64,512),64),height:Ed(Ee.clamp(a,64,512),64)},l={x:Gl(o/2-s.width/2,64),y:Gl(a/2-s.height/2,64)};if(e.boundingBoxDimensions=s,e.boundingBoxCoordinates=l,e.boundingBoxScaleMethod==="auto"){const u=oh(s);e.scaledBoundingBoxDimensions=u}}},setBoundingBoxScaleMethod:(e,t)=>{if(e.boundingBoxScaleMethod=t.payload,t.payload==="auto"){const n=oh(e.boundingBoxDimensions);e.scaledBoundingBoxDimensions=n}},setScaledBoundingBoxDimensions:(e,t)=>{e.scaledBoundingBoxDimensions=t.payload},setShouldShowStagingImage:(e,t)=>{e.shouldShowStagingImage=t.payload},setShouldShowStagingOutline:(e,t)=>{e.shouldShowStagingOutline=t.payload},setShouldShowCanvasDebugInfo:(e,t)=>{e.shouldShowCanvasDebugInfo=t.payload},setShouldRestrictStrokesToBox:(e,t)=>{e.shouldRestrictStrokesToBox=t.payload},setShouldCropToBoundingBoxOnSave:(e,t)=>{e.shouldCropToBoundingBoxOnSave=t.payload},setColorPickerColor:(e,t)=>{e.colorPickerColor=t.payload},commitColorPickerColor:e=>{e.brushColor={...e.colorPickerColor,a:e.brushColor.a},e.tool="brush"},setMergedCanvas:(e,t)=>{e.pastLayerStates.push(Ee.cloneDeep(e.layerState)),e.futureLayerStates=[],e.layerState.objects=[t.payload]},resetCanvasInteractionState:e=>{e.cursorPosition=null,e.isDrawing=!1,e.isMouseOverBoundingBox=!1,e.isMoveBoundingBoxKeyHeld=!1,e.isMoveStageKeyHeld=!1,e.isMovingBoundingBox=!1,e.isMovingStage=!1,e.isTransformingBoundingBox=!1},mouseLeftCanvas:e=>{e.cursorPosition=null,e.isDrawing=!1,e.isMouseOverBoundingBox=!1,e.isMovingBoundingBox=!1,e.isTransformingBoundingBox=!1}}}),{addEraseRect:jW,addFillRect:BW,addImageToStagingArea:hxe,addLine:pxe,addPointToCurrentLine:FW,clearCanvasHistory:$W,clearMask:nP,commitColorPickerColor:gxe,commitStagingAreaImage:mxe,discardStagedImages:vxe,fitBoundingBoxToStage:Q$e,mouseLeftCanvas:yxe,nextStagingAreaImage:bxe,prevStagingAreaImage:Sxe,redo:xxe,resetCanvas:rP,resetCanvasInteractionState:wxe,resetCanvasView:zW,resizeAndScaleCanvas:Dx,resizeCanvas:Cxe,setBoundingBoxCoordinates:yC,setBoundingBoxDimensions:Ev,setBoundingBoxPreviewFill:J$e,setBoundingBoxScaleMethod:_xe,setBrushColor:Nm,setBrushSize:jm,setCanvasContainerDimensions:kxe,setColorPickerColor:Exe,setCursorPosition:Pxe,setDoesCanvasNeedScaling:vi,setInitialCanvasImage:Nx,setIsDrawing:HW,setIsMaskEnabled:Dy,setIsMouseOverBoundingBox:Cb,setIsMoveBoundingBoxKeyHeld:eze,setIsMoveStageKeyHeld:tze,setIsMovingBoundingBox:bC,setIsMovingStage:G5,setIsTransformingBoundingBox:SC,setLayer:q5,setMaskColor:VW,setMergedCanvas:Txe,setShouldAutoSave:WW,setShouldCropToBoundingBoxOnSave:UW,setShouldDarkenOutsideBoundingBox:GW,setShouldLockBoundingBox:nze,setShouldPreserveMaskedArea:qW,setShouldShowBoundingBox:Lxe,setShouldShowBrush:rze,setShouldShowBrushPreview:ize,setShouldShowCanvasDebugInfo:YW,setShouldShowCheckboardTransparency:oze,setShouldShowGrid:KW,setShouldShowIntermediates:XW,setShouldShowStagingImage:Axe,setShouldShowStagingOutline:NI,setShouldSnapToGrid:Y5,setStageCoordinates:ZW,setStageScale:Oxe,setTool:tu,toggleShouldLockBoundingBox:aze,toggleTool:sze,undo:Mxe,setScaledBoundingBoxDimensions:_b,setShouldRestrictStrokesToBox:QW}=NW.actions,Ixe=NW.reducer,Rxe={currentImageUuid:"",shouldPinGallery:!0,shouldShowGallery:!0,galleryScrollPosition:0,galleryImageMinimumWidth:64,galleryImageObjectFit:"cover",shouldHoldGalleryOpen:!1,shouldAutoSwitchToNewImages:!0,currentCategory:"result",categories:{user:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0},result:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0}},galleryWidth:300,shouldUseSingleGalleryColumn:!1},JW=cp({name:"gallery",initialState:Rxe,reducers:{setCurrentImage:(e,t)=>{e.currentImage=t.payload,e.currentImageUuid=t.payload.uuid},removeImage:(e,t)=>{const{uuid:n,category:r}=t.payload,i=e.categories[r].images,o=i.filter(a=>a.uuid!==n);if(n===e.currentImageUuid){const a=i.findIndex(l=>l.uuid===n),s=Ee.clamp(a,0,o.length-1);e.currentImage=o.length?o[s]:void 0,e.currentImageUuid=o.length?o[s].uuid:""}e.categories[r].images=o},addImage:(e,t)=>{const{image:n,category:r}=t.payload,{uuid:i,url:o,mtime:a}=n,s=e.categories[r];s.images.find(l=>l.url===o&&l.mtime===a)||(s.images.unshift(n),e.shouldAutoSwitchToNewImages&&(e.currentImageUuid=i,e.currentImage=n,e.currentCategory=r),e.intermediateImage=void 0,s.latest_mtime=a)},setIntermediateImage:(e,t)=>{e.intermediateImage=t.payload},clearIntermediateImage:e=>{e.intermediateImage=void 0},selectNextImage:e=>{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(r{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(r>0){const i=n[r-1];e.currentImage=i,e.currentImageUuid=i.uuid}}},addGalleryImages:(e,t)=>{const{images:n,areMoreImagesAvailable:r,category:i}=t.payload,o=e.categories[i].images;if(n.length>0){const a=n.filter(s=>!o.find(l=>l.url===s.url&&l.mtime===s.mtime));if(e.categories[i].images=o.concat(a).sort((s,l)=>l.mtime-s.mtime),!e.currentImage){const s=n[0];e.currentImage=s,e.currentImageUuid=s.uuid}e.categories[i].latest_mtime=n[0].mtime,e.categories[i].earliest_mtime=n[n.length-1].mtime}r!==void 0&&(e.categories[i].areMoreImagesAvailable=r)},setShouldPinGallery:(e,t)=>{e.shouldPinGallery=t.payload},setShouldShowGallery:(e,t)=>{e.shouldShowGallery=t.payload},setGalleryScrollPosition:(e,t)=>{e.galleryScrollPosition=t.payload},setGalleryImageMinimumWidth:(e,t)=>{e.galleryImageMinimumWidth=t.payload},setGalleryImageObjectFit:(e,t)=>{e.galleryImageObjectFit=t.payload},setShouldHoldGalleryOpen:(e,t)=>{e.shouldHoldGalleryOpen=t.payload},setShouldAutoSwitchToNewImages:(e,t)=>{e.shouldAutoSwitchToNewImages=t.payload},setCurrentCategory:(e,t)=>{e.currentCategory=t.payload},setGalleryWidth:(e,t)=>{e.galleryWidth=t.payload},setShouldUseSingleGalleryColumn:(e,t)=>{e.shouldUseSingleGalleryColumn=t.payload}}}),{addImage:sm,clearIntermediateImage:xC,removeImage:eU,setCurrentImage:jI,addGalleryImages:Dxe,setIntermediateImage:Nxe,selectNextImage:iP,selectPrevImage:oP,setShouldPinGallery:jxe,setShouldShowGallery:Bd,setGalleryScrollPosition:Bxe,setGalleryImageMinimumWidth:rv,setGalleryImageObjectFit:Fxe,setShouldHoldGalleryOpen:tU,setShouldAutoSwitchToNewImages:$xe,setCurrentCategory:kb,setGalleryWidth:zxe,setShouldUseSingleGalleryColumn:Hxe}=JW.actions,Vxe=JW.reducer,Wxe={isLightboxOpen:!1},Uxe=Wxe,nU=cp({name:"lightbox",initialState:Uxe,reducers:{setIsLightboxOpen:(e,t)=>{e.isLightboxOpen=t.payload}}}),{setIsLightboxOpen:Bm}=nU.actions,Gxe=nU.reducer,i2=e=>e.length===1?e[0].prompt:e.map(t=>`${t.prompt}:${t.weight}`).join(" ");function aP(e){let t=i2(e),n=null;const r=new RegExp(/\[([^\][]*)]/,"gi"),i=[...t.matchAll(r)].map(o=>o[1]);return i.length&&(n=i.join(" "),i.forEach(o=>{t=t.replace(`[${o}]`,"").replaceAll("[]","").trim()})),[t,n]}const qxe=e=>{const r=e.split(",").map(i=>i.split(":")).map(i=>({seed:Number(i[0]),weight:Number(i[1])}));return sP(r)?r:!1},sP=e=>Boolean(typeof e=="string"?qxe(e):e.length&&!e.some(t=>{const{seed:n,weight:r}=t,i=!isNaN(parseInt(n.toString(),10)),o=!isNaN(parseInt(r.toString(),10))&&r>=0&&r<=1;return!(i&&o)})),K5=e=>e.reduce((t,n,r,i)=>{const{seed:o,weight:a}=n;return t+=`${o}:${a}`,r!==i.length-1&&(t+=","),t},""),Yxe=e=>e.split(",").map(r=>r.split(":")).map(r=>[parseInt(r[0],10),parseFloat(r[1])]),rU={cfgScale:7.5,height:512,img2imgStrength:.75,infillMethod:"patchmatch",iterations:1,maskPath:"",perlin:0,prompt:"",negativePrompt:"",sampler:"k_lms",seamBlur:16,seamless:!1,seamSize:96,seamSteps:30,seamStrength:.7,seed:0,seedWeights:"",shouldFitToWidthHeight:!0,shouldGenerateVariations:!1,shouldRandomizeSeed:!0,steps:50,threshold:0,tileSize:32,variationAmount:.1,width:512},Kxe=rU,iU=cp({name:"generation",initialState:Kxe,reducers:{setPrompt:(e,t)=>{const n=t.payload;typeof n=="string"?e.prompt=n:e.prompt=i2(n)},setNegativePrompt:(e,t)=>{const n=t.payload;typeof n=="string"?e.negativePrompt=n:e.negativePrompt=i2(n)},setIterations:(e,t)=>{e.iterations=t.payload},setSteps:(e,t)=>{e.steps=t.payload},setCfgScale:(e,t)=>{e.cfgScale=t.payload},setThreshold:(e,t)=>{e.threshold=t.payload},setPerlin:(e,t)=>{e.perlin=t.payload},setHeight:(e,t)=>{e.height=t.payload},setWidth:(e,t)=>{e.width=t.payload},setSampler:(e,t)=>{e.sampler=t.payload},setSeed:(e,t)=>{e.seed=t.payload,e.shouldRandomizeSeed=!1},setImg2imgStrength:(e,t)=>{e.img2imgStrength=t.payload},setMaskPath:(e,t)=>{e.maskPath=t.payload},setSeamless:(e,t)=>{e.seamless=t.payload},setShouldFitToWidthHeight:(e,t)=>{e.shouldFitToWidthHeight=t.payload},resetSeed:e=>{e.seed=-1},setParameter:(e,t)=>{const{key:n,value:r}=t.payload,i={...e,[n]:r};return n==="seed"&&(i.shouldRandomizeSeed=!1),i},setShouldGenerateVariations:(e,t)=>{e.shouldGenerateVariations=t.payload},setVariationAmount:(e,t)=>{e.variationAmount=t.payload},setSeedWeights:(e,t)=>{e.seedWeights=t.payload,e.shouldGenerateVariations=!0,e.variationAmount=0},setAllTextToImageParameters:(e,t)=>{const{sampler:n,prompt:r,seed:i,variations:o,steps:a,cfg_scale:s,threshold:l,perlin:u,seamless:d,hires_fix:h,width:m,height:v}=t.payload.image;o&&o.length>0?(e.seedWeights=K5(o),e.shouldGenerateVariations=!0,e.variationAmount=0):e.shouldGenerateVariations=!1,i&&(e.seed=i,e.shouldRandomizeSeed=!1),r&&(e.prompt=i2(r)),n&&(e.sampler=n),a&&(e.steps=a),s&&(e.cfgScale=s),typeof l>"u"?e.threshold=0:e.threshold=l,u&&(e.perlin=u),typeof u>"u"&&(e.perlin=0),typeof d=="boolean"&&(e.seamless=d),m&&(e.width=m),v&&(e.height=v)},setAllImageToImageParameters:(e,t)=>{const{type:n,strength:r,fit:i,init_image_path:o,mask_image_path:a}=t.payload.image;n==="img2img"&&(o&&(e.initialImage=o),a&&(e.maskPath=a),r&&(e.img2imgStrength=r),typeof i=="boolean"&&(e.shouldFitToWidthHeight=i))},setAllParameters:(e,t)=>{const{type:n,sampler:r,prompt:i,seed:o,variations:a,steps:s,cfg_scale:l,threshold:u,perlin:d,seamless:h,hires_fix:m,width:v,height:b,strength:S,fit:k,init_image_path:E,mask_image_path:_}=t.payload.image;if(n==="img2img"&&(E&&(e.initialImage=E),_&&(e.maskPath=_),S&&(e.img2imgStrength=S),typeof k=="boolean"&&(e.shouldFitToWidthHeight=k)),a&&a.length>0?(e.seedWeights=K5(a),e.shouldGenerateVariations=!0,e.variationAmount=0):e.shouldGenerateVariations=!1,o&&(e.seed=o,e.shouldRandomizeSeed=!1),i){const[T,A]=aP(i);T&&(e.prompt=T),A?e.negativePrompt=A:e.negativePrompt=""}r&&(e.sampler=r),s&&(e.steps=s),l&&(e.cfgScale=l),u&&(e.threshold=u),typeof u>"u"&&(e.threshold=0),d&&(e.perlin=d),typeof d>"u"&&(e.perlin=0),typeof h=="boolean"&&(e.seamless=h),v&&(e.width=v),b&&(e.height=b)},resetParametersState:e=>({...e,...rU}),setShouldRandomizeSeed:(e,t)=>{e.shouldRandomizeSeed=t.payload},setInitialImage:(e,t)=>{e.initialImage=t.payload},clearInitialImage:e=>{e.initialImage=void 0},setSeamSize:(e,t)=>{e.seamSize=t.payload},setSeamBlur:(e,t)=>{e.seamBlur=t.payload},setSeamStrength:(e,t)=>{e.seamStrength=t.payload},setSeamSteps:(e,t)=>{e.seamSteps=t.payload},setTileSize:(e,t)=>{e.tileSize=t.payload},setInfillMethod:(e,t)=>{e.infillMethod=t.payload}}}),{clearInitialImage:oU,resetParametersState:lze,resetSeed:uze,setAllImageToImageParameters:Xxe,setAllParameters:aU,setAllTextToImageParameters:cze,setCfgScale:sU,setHeight:lU,setImg2imgStrength:u8,setInfillMethod:uU,setInitialImage:k0,setIterations:Zxe,setMaskPath:cU,setParameter:dze,setPerlin:dU,setPrompt:jx,setNegativePrompt:Q2,setSampler:fU,setSeamBlur:BI,setSeamless:hU,setSeamSize:FI,setSeamSteps:$I,setSeamStrength:zI,setSeed:Ny,setSeedWeights:pU,setShouldFitToWidthHeight:gU,setShouldGenerateVariations:Qxe,setShouldRandomizeSeed:Jxe,setSteps:mU,setThreshold:vU,setTileSize:HI,setVariationAmount:ewe,setWidth:yU}=iU.actions,twe=iU.reducer,bU={codeformerFidelity:.75,facetoolStrength:.8,facetoolType:"gfpgan",hiresFix:!1,hiresStrength:.75,shouldLoopback:!1,shouldRunESRGAN:!1,shouldRunFacetool:!1,upscalingLevel:4,upscalingStrength:.75},nwe=bU,SU=cp({name:"postprocessing",initialState:nwe,reducers:{setFacetoolStrength:(e,t)=>{e.facetoolStrength=t.payload},setCodeformerFidelity:(e,t)=>{e.codeformerFidelity=t.payload},setUpscalingLevel:(e,t)=>{e.upscalingLevel=t.payload},setUpscalingStrength:(e,t)=>{e.upscalingStrength=t.payload},setHiresFix:(e,t)=>{e.hiresFix=t.payload},setHiresStrength:(e,t)=>{e.hiresStrength=t.payload},resetPostprocessingState:e=>({...e,...bU}),setShouldRunFacetool:(e,t)=>{e.shouldRunFacetool=t.payload},setFacetoolType:(e,t)=>{e.facetoolType=t.payload},setShouldRunESRGAN:(e,t)=>{e.shouldRunESRGAN=t.payload},setShouldLoopback:(e,t)=>{e.shouldLoopback=t.payload}}}),{resetPostprocessingState:fze,setCodeformerFidelity:xU,setFacetoolStrength:I4,setFacetoolType:R4,setHiresFix:lP,setHiresStrength:VI,setShouldLoopback:rwe,setShouldRunESRGAN:iwe,setShouldRunFacetool:owe,setUpscalingLevel:c8,setUpscalingStrength:d8}=SU.actions,awe=SU.reducer;function Xs(e){return Xs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xs(e)}function hu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function swe(e,t){if(Xs(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Xs(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function wU(e){var t=swe(e,"string");return Xs(t)==="symbol"?t:String(t)}function WI(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&arguments[1]!==void 0?arguments[1]:{};hu(this,e),this.init(t,n)}return pu(e,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=n||hwe,this.options=r,this.debug=r.debug}},{key:"setDebug",value:function(n){this.debug=n}},{key:"log",value:function(){for(var n=arguments.length,r=new Array(n),i=0;i1?r-1:0),o=1;o-1?s.replace(/###/g,"."):s}function i(){return!e||typeof e=="string"}for(var o=typeof t!="string"?[].concat(t):t.split(".");o.length>1;){if(i())return{};var a=r(o.shift());!e[a]&&n&&(e[a]=new n),Object.prototype.hasOwnProperty.call(e,a)?e=e[a]:e={}}return i()?{}:{obj:e,k:r(o.shift())}}function KI(e,t,n){var r=uP(e,t,Object),i=r.obj,o=r.k;i[o]=n}function mwe(e,t,n,r){var i=uP(e,t,Object),o=i.obj,a=i.k;o[a]=o[a]||[],r&&(o[a]=o[a].concat(n)),r||o[a].push(n)}function X5(e,t){var n=uP(e,t),r=n.obj,i=n.k;if(r)return r[i]}function XI(e,t,n){var r=X5(e,n);return r!==void 0?r:X5(t,n)}function CU(e,t,n){for(var r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?typeof e[r]=="string"||e[r]instanceof String||typeof t[r]=="string"||t[r]instanceof String?n&&(e[r]=t[r]):CU(e[r],t[r],n):e[r]=t[r]);return e}function Mg(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var vwe={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function ywe(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,function(t){return vwe[t]}):e}var Fx=typeof window<"u"&&window.navigator&&typeof window.navigator.userAgentData>"u"&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,bwe=[" ",",","?","!",";"];function Swe(e,t,n){t=t||"",n=n||"";var r=bwe.filter(function(s){return t.indexOf(s)<0&&n.indexOf(s)<0});if(r.length===0)return!0;var i=new RegExp("(".concat(r.map(function(s){return s==="?"?"\\?":s}).join("|"),")")),o=!i.test(e);if(!o){var a=e.indexOf(n);a>0&&!i.test(e.substring(0,a))&&(o=!0)}return o}function ZI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Eb(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _U(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(e){if(e[t])return e[t];for(var r=t.split(n),i=e,o=0;oo+a;)a++,s=r.slice(o,o+a).join(n),l=i[s];if(l===void 0)return;if(l===null)return null;if(t.endsWith(s)){if(typeof l=="string")return l;if(s&&typeof l[s]=="string")return l[s]}var u=r.slice(o+a).join(n);return u?_U(l,u,n):void 0}i=i[r[o]]}return i}}var Cwe=function(e){Bx(n,e);var t=xwe(n);function n(r){var i,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return hu(this,n),i=t.call(this),Fx&&Qd.call(Fd(i)),i.data=r||{},i.options=o,i.options.keySeparator===void 0&&(i.options.keySeparator="."),i.options.ignoreJSONStructure===void 0&&(i.options.ignoreJSONStructure=!0),i}return pu(n,[{key:"addNamespaces",value:function(i){this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}},{key:"removeNamespaces",value:function(i){var o=this.options.ns.indexOf(i);o>-1&&this.options.ns.splice(o,1)}},{key:"getResource",value:function(i,o,a){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},l=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,u=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure,d=[i,o];a&&typeof a!="string"&&(d=d.concat(a)),a&&typeof a=="string"&&(d=d.concat(l?a.split(l):a)),i.indexOf(".")>-1&&(d=i.split("."));var h=X5(this.data,d);return h||!u||typeof a!="string"?h:_U(this.data&&this.data[i]&&this.data[i][o],a,l)}},{key:"addResource",value:function(i,o,a,s){var l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},u=this.options.keySeparator;u===void 0&&(u=".");var d=[i,o];a&&(d=d.concat(u?a.split(u):a)),i.indexOf(".")>-1&&(d=i.split("."),s=o,o=d[1]),this.addNamespaces(o),KI(this.data,d,s),l.silent||this.emit("added",i,o,a,s)}},{key:"addResources",value:function(i,o,a){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var l in a)(typeof a[l]=="string"||Object.prototype.toString.apply(a[l])==="[object Array]")&&this.addResource(i,o,l,a[l],{silent:!0});s.silent||this.emit("added",i,o,a)}},{key:"addResourceBundle",value:function(i,o,a,s,l){var u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},d=[i,o];i.indexOf(".")>-1&&(d=i.split("."),s=a,a=o,o=d[1]),this.addNamespaces(o);var h=X5(this.data,d)||{};s?CU(h,a,l):h=Eb(Eb({},h),a),KI(this.data,d,h),u.silent||this.emit("added",i,o,a)}},{key:"removeResourceBundle",value:function(i,o){this.hasResourceBundle(i,o)&&delete this.data[i][o],this.removeNamespaces(o),this.emit("removed",i,o)}},{key:"hasResourceBundle",value:function(i,o){return this.getResource(i,o)!==void 0}},{key:"getResourceBundle",value:function(i,o){return o||(o=this.options.defaultNS),this.options.compatibilityAPI==="v1"?Eb(Eb({},{}),this.getResource(i,o)):this.getResource(i,o)}},{key:"getDataByLanguage",value:function(i){return this.data[i]}},{key:"hasLanguageSomeTranslations",value:function(i){var o=this.getDataByLanguage(i),a=o&&Object.keys(o)||[];return!!a.find(function(s){return o[s]&&Object.keys(o[s]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),n}(Qd),kU={processors:{},addPostProcessor:function(t){this.processors[t.name]=t},handle:function(t,n,r,i,o){var a=this;return t.forEach(function(s){a.processors[s]&&(n=a.processors[s].process(n,r,i,o))}),n}};function QI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function bo(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var JI={},eR=function(e){Bx(n,e);var t=_we(n);function n(r){var i,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return hu(this,n),i=t.call(this),Fx&&Qd.call(Fd(i)),gwe(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],r,Fd(i)),i.options=o,i.options.keySeparator===void 0&&(i.options.keySeparator="."),i.logger=ql.create("translator"),i}return pu(n,[{key:"changeLanguage",value:function(i){i&&(this.language=i)}},{key:"exists",value:function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(i==null)return!1;var a=this.resolve(i,o);return a&&a.res!==void 0}},{key:"extractFromKey",value:function(i,o){var a=o.nsSeparator!==void 0?o.nsSeparator:this.options.nsSeparator;a===void 0&&(a=":");var s=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,l=o.ns||this.options.defaultNS||[],u=a&&i.indexOf(a)>-1,d=!this.options.userDefinedKeySeparator&&!o.keySeparator&&!this.options.userDefinedNsSeparator&&!o.nsSeparator&&!Swe(i,a,s);if(u&&!d){var h=i.match(this.interpolator.nestingRegexp);if(h&&h.length>0)return{key:i,namespaces:l};var m=i.split(a);(a!==s||a===s&&this.options.ns.indexOf(m[0])>-1)&&(l=m.shift()),i=m.join(s)}return typeof l=="string"&&(l=[l]),{key:i,namespaces:l}}},{key:"translate",value:function(i,o,a){var s=this;if(Xs(o)!=="object"&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),o||(o={}),i==null)return"";Array.isArray(i)||(i=[String(i)]);var l=o.returnDetails!==void 0?o.returnDetails:this.options.returnDetails,u=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,d=this.extractFromKey(i[i.length-1],o),h=d.key,m=d.namespaces,v=m[m.length-1],b=o.lng||this.language,S=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(b&&b.toLowerCase()==="cimode"){if(S){var k=o.nsSeparator||this.options.nsSeparator;return l?(E.res="".concat(v).concat(k).concat(h),E):"".concat(v).concat(k).concat(h)}return l?(E.res=h,E):h}var E=this.resolve(i,o),_=E&&E.res,T=E&&E.usedKey||h,A=E&&E.exactUsedKey||h,I=Object.prototype.toString.apply(_),R=["[object Number]","[object Function]","[object RegExp]"],D=o.joinArrays!==void 0?o.joinArrays:this.options.joinArrays,j=!this.i18nFormat||this.i18nFormat.handleAsObject,z=typeof _!="string"&&typeof _!="boolean"&&typeof _!="number";if(j&&_&&z&&R.indexOf(I)<0&&!(typeof D=="string"&&I==="[object Array]")){if(!o.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var V=this.options.returnedObjectHandler?this.options.returnedObjectHandler(T,_,bo(bo({},o),{},{ns:m})):"key '".concat(h," (").concat(this.language,")' returned an object instead of string.");return l?(E.res=V,E):V}if(u){var K=I==="[object Array]",te=K?[]:{},q=K?A:T;for(var F in _)if(Object.prototype.hasOwnProperty.call(_,F)){var U="".concat(q).concat(u).concat(F);te[F]=this.translate(U,bo(bo({},o),{joinArrays:!1,ns:m})),te[F]===U&&(te[F]=_[F])}_=te}}else if(j&&typeof D=="string"&&I==="[object Array]")_=_.join(D),_&&(_=this.extendTranslation(_,i,o,a));else{var X=!1,Z=!1,W=o.count!==void 0&&typeof o.count!="string",Q=n.hasDefaultValue(o),ie=W?this.pluralResolver.getSuffix(b,o.count,o):"",fe=o["defaultValue".concat(ie)]||o.defaultValue;!this.isValidLookup(_)&&Q&&(X=!0,_=fe),this.isValidLookup(_)||(Z=!0,_=h);var Se=o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,Te=Se&&Z?void 0:_,ye=Q&&fe!==_&&this.options.updateMissing;if(Z||X||ye){if(this.logger.log(ye?"updateKey":"missingKey",b,v,h,ye?fe:_),u){var He=this.resolve(h,bo(bo({},o),{},{keySeparator:!1}));He&&He.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var Ne=[],tt=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if(this.options.saveMissingTo==="fallback"&&tt&&tt[0])for(var _e=0;_e1&&arguments[1]!==void 0?arguments[1]:{},s,l,u,d,h;return typeof i=="string"&&(i=[i]),i.forEach(function(m){if(!o.isValidLookup(s)){var v=o.extractFromKey(m,a),b=v.key;l=b;var S=v.namespaces;o.options.fallbackNS&&(S=S.concat(o.options.fallbackNS));var k=a.count!==void 0&&typeof a.count!="string",E=k&&!a.ordinal&&a.count===0&&o.pluralResolver.shouldUseIntlApi(),_=a.context!==void 0&&(typeof a.context=="string"||typeof a.context=="number")&&a.context!=="",T=a.lngs?a.lngs:o.languageUtils.toResolveHierarchy(a.lng||o.language,a.fallbackLng);S.forEach(function(A){o.isValidLookup(s)||(h=A,!JI["".concat(T[0],"-").concat(A)]&&o.utils&&o.utils.hasLoadedNamespace&&!o.utils.hasLoadedNamespace(h)&&(JI["".concat(T[0],"-").concat(A)]=!0,o.logger.warn('key "'.concat(l,'" for languages "').concat(T.join(", "),`" won't get resolved as namespace "`).concat(h,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),T.forEach(function(I){if(!o.isValidLookup(s)){d=I;var R=[b];if(o.i18nFormat&&o.i18nFormat.addLookupKeys)o.i18nFormat.addLookupKeys(R,b,I,A,a);else{var D;k&&(D=o.pluralResolver.getSuffix(I,a.count,a));var j="".concat(o.options.pluralSeparator,"zero");if(k&&(R.push(b+D),E&&R.push(b+j)),_){var z="".concat(b).concat(o.options.contextSeparator).concat(a.context);R.push(z),k&&(R.push(z+D),E&&R.push(z+j))}}for(var V;V=R.pop();)o.isValidLookup(s)||(u=V,s=o.getResource(I,A,V,a))}}))})}}),{res:s,usedKey:l,exactUsedKey:u,usedLng:d,usedNS:h}}},{key:"isValidLookup",value:function(i){return i!==void 0&&!(!this.options.returnNull&&i===null)&&!(!this.options.returnEmptyString&&i==="")}},{key:"getResource",value:function(i,o,a){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(i,o,a,s):this.resourceStore.getResource(i,o,a,s)}}],[{key:"hasDefaultValue",value:function(i){var o="defaultValue";for(var a in i)if(Object.prototype.hasOwnProperty.call(i,a)&&o===a.substring(0,o.length)&&i[a]!==void 0)return!0;return!1}}]),n}(Qd);function wC(e){return e.charAt(0).toUpperCase()+e.slice(1)}var tR=function(){function e(t){hu(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ql.create("languageUtils")}return pu(e,[{key:"getScriptPartFromCode",value:function(n){if(!n||n.indexOf("-")<0)return null;var r=n.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}},{key:"getLanguagePartFromCode",value:function(n){if(!n||n.indexOf("-")<0)return n;var r=n.split("-");return this.formatLanguageCode(r[0])}},{key:"formatLanguageCode",value:function(n){if(typeof n=="string"&&n.indexOf("-")>-1){var r=["hans","hant","latn","cyrl","cans","mong","arab"],i=n.split("-");return this.options.lowerCaseLng?i=i.map(function(o){return o.toLowerCase()}):i.length===2?(i[0]=i[0].toLowerCase(),i[1]=i[1].toUpperCase(),r.indexOf(i[1].toLowerCase())>-1&&(i[1]=wC(i[1].toLowerCase()))):i.length===3&&(i[0]=i[0].toLowerCase(),i[1].length===2&&(i[1]=i[1].toUpperCase()),i[0]!=="sgn"&&i[2].length===2&&(i[2]=i[2].toUpperCase()),r.indexOf(i[1].toLowerCase())>-1&&(i[1]=wC(i[1].toLowerCase())),r.indexOf(i[2].toLowerCase())>-1&&(i[2]=wC(i[2].toLowerCase()))),i.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?n.toLowerCase():n}},{key:"isSupportedCode",value:function(n){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(n=this.getLanguagePartFromCode(n)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(n)>-1}},{key:"getBestMatchFromCodes",value:function(n){var r=this;if(!n)return null;var i;return n.forEach(function(o){if(!i){var a=r.formatLanguageCode(o);(!r.options.supportedLngs||r.isSupportedCode(a))&&(i=a)}}),!i&&this.options.supportedLngs&&n.forEach(function(o){if(!i){var a=r.getLanguagePartFromCode(o);if(r.isSupportedCode(a))return i=a;i=r.options.supportedLngs.find(function(s){if(s.indexOf(a)===0)return s})}}),i||(i=this.getFallbackCodes(this.options.fallbackLng)[0]),i}},{key:"getFallbackCodes",value:function(n,r){if(!n)return[];if(typeof n=="function"&&(n=n(r)),typeof n=="string"&&(n=[n]),Object.prototype.toString.apply(n)==="[object Array]")return n;if(!r)return n.default||[];var i=n[r];return i||(i=n[this.getScriptPartFromCode(r)]),i||(i=n[this.formatLanguageCode(r)]),i||(i=n[this.getLanguagePartFromCode(r)]),i||(i=n.default),i||[]}},{key:"toResolveHierarchy",value:function(n,r){var i=this,o=this.getFallbackCodes(r||this.options.fallbackLng||[],n),a=[],s=function(u){u&&(i.isSupportedCode(u)?a.push(u):i.logger.warn("rejecting language code not found in supportedLngs: ".concat(u)))};return typeof n=="string"&&n.indexOf("-")>-1?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(n)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(n)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(n))):typeof n=="string"&&s(this.formatLanguageCode(n)),o.forEach(function(l){a.indexOf(l)<0&&s(i.formatLanguageCode(l))}),a}}]),e}(),Ewe=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],Pwe={1:function(t){return Number(t>1)},2:function(t){return Number(t!=1)},3:function(t){return 0},4:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},5:function(t){return Number(t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5)},6:function(t){return Number(t==1?0:t>=2&&t<=4?1:2)},7:function(t){return Number(t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},8:function(t){return Number(t==1?0:t==2?1:t!=8&&t!=11?2:3)},9:function(t){return Number(t>=2)},10:function(t){return Number(t==1?0:t==2?1:t<7?2:t<11?3:4)},11:function(t){return Number(t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3)},12:function(t){return Number(t%10!=1||t%100==11)},13:function(t){return Number(t!==0)},14:function(t){return Number(t==1?0:t==2?1:t==3?2:3)},15:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2)},16:function(t){return Number(t%10==1&&t%100!=11?0:t!==0?1:2)},17:function(t){return Number(t==1||t%10==1&&t%100!=11?0:1)},18:function(t){return Number(t==0?0:t==1?1:2)},19:function(t){return Number(t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3)},20:function(t){return Number(t==1?0:t==0||t%100>0&&t%100<20?1:2)},21:function(t){return Number(t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0)},22:function(t){return Number(t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3)}},Twe=["v1","v2","v3"],nR={zero:0,one:1,two:2,few:3,many:4,other:5};function Lwe(){var e={};return Ewe.forEach(function(t){t.lngs.forEach(function(n){e[n]={numbers:t.nr,plurals:Pwe[t.fc]}})}),e}var Awe=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};hu(this,e),this.languageUtils=t,this.options=n,this.logger=ql.create("pluralResolver"),(!this.options.compatibilityJSON||this.options.compatibilityJSON==="v4")&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=Lwe()}return pu(e,[{key:"addRule",value:function(n,r){this.rules[n]=r}},{key:"getRule",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(n,{type:r.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[n]||this.rules[this.languageUtils.getLanguagePartFromCode(n)]}},{key:"needsPlural",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=this.getRule(n,r);return this.shouldUseIntlApi()?i&&i.resolvedOptions().pluralCategories.length>1:i&&i.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(n,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(n,i).map(function(o){return"".concat(r).concat(o)})}},{key:"getSuffixes",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=this.getRule(n,i);return o?this.shouldUseIntlApi()?o.resolvedOptions().pluralCategories.sort(function(a,s){return nR[a]-nR[s]}).map(function(a){return"".concat(r.options.prepend).concat(a)}):o.numbers.map(function(a){return r.getSuffix(n,a,i)}):[]}},{key:"getSuffix",value:function(n,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=this.getRule(n,i);return o?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(o.select(r)):this.getSuffixRetroCompatible(o,r):(this.logger.warn("no plural rule found for: ".concat(n)),"")}},{key:"getSuffixRetroCompatible",value:function(n,r){var i=this,o=n.noAbs?n.plurals(r):n.plurals(Math.abs(r)),a=n.numbers[o];this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1&&(a===2?a="plural":a===1&&(a=""));var s=function(){return i.options.prepend&&a.toString()?i.options.prepend+a.toString():a.toString()};return this.options.compatibilityJSON==="v1"?a===1?"":typeof a=="number"?"_plural_".concat(a.toString()):s():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1?s():this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString()}},{key:"shouldUseIntlApi",value:function(){return!Twe.includes(this.options.compatibilityJSON)}}]),e}();function rR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Rs(e){for(var t=1;t0&&arguments[0]!==void 0?arguments[0]:{};hu(this,e),this.logger=ql.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(n){return n},this.init(t)}return pu(e,[{key:"init",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};n.interpolation||(n.interpolation={escapeValue:!0});var r=n.interpolation;this.escape=r.escape!==void 0?r.escape:ywe,this.escapeValue=r.escapeValue!==void 0?r.escapeValue:!0,this.useRawValueToEscape=r.useRawValueToEscape!==void 0?r.useRawValueToEscape:!1,this.prefix=r.prefix?Mg(r.prefix):r.prefixEscaped||"{{",this.suffix=r.suffix?Mg(r.suffix):r.suffixEscaped||"}}",this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||",",this.unescapePrefix=r.unescapeSuffix?"":r.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":r.unescapeSuffix||"",this.nestingPrefix=r.nestingPrefix?Mg(r.nestingPrefix):r.nestingPrefixEscaped||Mg("$t("),this.nestingSuffix=r.nestingSuffix?Mg(r.nestingSuffix):r.nestingSuffixEscaped||Mg(")"),this.nestingOptionsSeparator=r.nestingOptionsSeparator?r.nestingOptionsSeparator:r.nestingOptionsSeparator||",",this.maxReplaces=r.maxReplaces?r.maxReplaces:1e3,this.alwaysFormat=r.alwaysFormat!==void 0?r.alwaysFormat:!1,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var n="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(n,"g");var r="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(r,"g");var i="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(i,"g")}},{key:"interpolate",value:function(n,r,i,o){var a=this,s,l,u,d=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function h(k){return k.replace(/\$/g,"$$$$")}var m=function(E){if(E.indexOf(a.formatSeparator)<0){var _=XI(r,d,E);return a.alwaysFormat?a.format(_,void 0,i,Rs(Rs(Rs({},o),r),{},{interpolationkey:E})):_}var T=E.split(a.formatSeparator),A=T.shift().trim(),I=T.join(a.formatSeparator).trim();return a.format(XI(r,d,A),I,i,Rs(Rs(Rs({},o),r),{},{interpolationkey:A}))};this.resetRegExp();var v=o&&o.missingInterpolationHandler||this.options.missingInterpolationHandler,b=o&&o.interpolation&&o.interpolation.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,S=[{regex:this.regexpUnescape,safeValue:function(E){return h(E)}},{regex:this.regexp,safeValue:function(E){return a.escapeValue?h(a.escape(E)):h(E)}}];return S.forEach(function(k){for(u=0;s=k.regex.exec(n);){var E=s[1].trim();if(l=m(E),l===void 0)if(typeof v=="function"){var _=v(n,s,o);l=typeof _=="string"?_:""}else if(o&&o.hasOwnProperty(E))l="";else if(b){l=s[0];continue}else a.logger.warn("missed to pass in variable ".concat(E," for interpolating ").concat(n)),l="";else typeof l!="string"&&!a.useRawValueToEscape&&(l=YI(l));var T=k.safeValue(l);if(n=n.replace(s[0],T),b?(k.regex.lastIndex+=l.length,k.regex.lastIndex-=s[0].length):k.regex.lastIndex=0,u++,u>=a.maxReplaces)break}}),n}},{key:"nest",value:function(n,r){var i=this,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a,s,l;function u(v,b){var S=this.nestingOptionsSeparator;if(v.indexOf(S)<0)return v;var k=v.split(new RegExp("".concat(S,"[ ]*{"))),E="{".concat(k[1]);v=k[0],E=this.interpolate(E,l);var _=E.match(/'/g),T=E.match(/"/g);(_&&_.length%2===0&&!T||T.length%2!==0)&&(E=E.replace(/'/g,'"'));try{l=JSON.parse(E),b&&(l=Rs(Rs({},b),l))}catch(A){return this.logger.warn("failed parsing options string in nesting for key ".concat(v),A),"".concat(v).concat(S).concat(E)}return delete l.defaultValue,v}for(;a=this.nestingRegexp.exec(n);){var d=[];l=Rs({},o),l.applyPostProcessor=!1,delete l.defaultValue;var h=!1;if(a[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(a[1])){var m=a[1].split(this.formatSeparator).map(function(v){return v.trim()});a[1]=m.shift(),d=m,h=!0}if(s=r(u.call(this,a[1].trim(),l),l),s&&a[0]===n&&typeof s!="string")return s;typeof s!="string"&&(s=YI(s)),s||(this.logger.warn("missed to resolve ".concat(a[1]," for nesting ").concat(n)),s=""),h&&(s=d.reduce(function(v,b){return i.format(v,b,o.lng,Rs(Rs({},o),{},{interpolationkey:a[1].trim()}))},s.trim())),n=n.replace(a[0],s),this.regexp.lastIndex=0}return n}}]),e}();function iR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ld(e){for(var t=1;t-1){var r=e.split("(");t=r[0].toLowerCase().trim();var i=r[1].substring(0,r[1].length-1);if(t==="currency"&&i.indexOf(":")<0)n.currency||(n.currency=i.trim());else if(t==="relativetime"&&i.indexOf(":")<0)n.range||(n.range=i.trim());else{var o=i.split(";");o.forEach(function(a){if(a){var s=a.split(":"),l=fwe(s),u=l[0],d=l.slice(1),h=d.join(":").trim().replace(/^'+|'+$/g,"");n[u.trim()]||(n[u.trim()]=h),h==="false"&&(n[u.trim()]=!1),h==="true"&&(n[u.trim()]=!0),isNaN(h)||(n[u.trim()]=parseInt(h,10))}})}}return{formatName:t,formatOptions:n}}function Ig(e){var t={};return function(r,i,o){var a=i+JSON.stringify(o),s=t[a];return s||(s=e(i,o),t[a]=s),s(r)}}var Iwe=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};hu(this,e),this.logger=ql.create("formatter"),this.options=t,this.formats={number:Ig(function(n,r){var i=new Intl.NumberFormat(n,r);return function(o){return i.format(o)}}),currency:Ig(function(n,r){var i=new Intl.NumberFormat(n,ld(ld({},r),{},{style:"currency"}));return function(o){return i.format(o)}}),datetime:Ig(function(n,r){var i=new Intl.DateTimeFormat(n,ld({},r));return function(o){return i.format(o)}}),relativetime:Ig(function(n,r){var i=new Intl.RelativeTimeFormat(n,ld({},r));return function(o){return i.format(o,r.range||"day")}}),list:Ig(function(n,r){var i=new Intl.ListFormat(n,ld({},r));return function(o){return i.format(o)}})},this.init(t)}return pu(e,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}},i=r.interpolation;this.formatSeparator=i.formatSeparator?i.formatSeparator:i.formatSeparator||","}},{key:"add",value:function(n,r){this.formats[n.toLowerCase().trim()]=r}},{key:"addCached",value:function(n,r){this.formats[n.toLowerCase().trim()]=Ig(r)}},{key:"format",value:function(n,r,i,o){var a=this,s=r.split(this.formatSeparator),l=s.reduce(function(u,d){var h=Mwe(d),m=h.formatName,v=h.formatOptions;if(a.formats[m]){var b=u;try{var S=o&&o.formatParams&&o.formatParams[o.interpolationkey]||{},k=S.locale||S.lng||o.locale||o.lng||i;b=a.formats[m](u,k,ld(ld(ld({},v),o),S))}catch(E){a.logger.warn(E)}return b}else a.logger.warn("there was no format function for ".concat(m));return u},n);return l}}]),e}();function oR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function aR(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Nwe(e,t){e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)}var jwe=function(e){Bx(n,e);var t=Rwe(n);function n(r,i,o){var a,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return hu(this,n),a=t.call(this),Fx&&Qd.call(Fd(a)),a.backend=r,a.store=i,a.services=o,a.languageUtils=o.languageUtils,a.options=s,a.logger=ql.create("backendConnector"),a.waitingReads=[],a.maxParallelReads=s.maxParallelReads||10,a.readingCalls=0,a.maxRetries=s.maxRetries>=0?s.maxRetries:5,a.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,a.state={},a.queue=[],a.backend&&a.backend.init&&a.backend.init(o,s.backend,s),a}return pu(n,[{key:"queueLoad",value:function(i,o,a,s){var l=this,u={},d={},h={},m={};return i.forEach(function(v){var b=!0;o.forEach(function(S){var k="".concat(v,"|").concat(S);!a.reload&&l.store.hasResourceBundle(v,S)?l.state[k]=2:l.state[k]<0||(l.state[k]===1?d[k]===void 0&&(d[k]=!0):(l.state[k]=1,b=!1,d[k]===void 0&&(d[k]=!0),u[k]===void 0&&(u[k]=!0),m[S]===void 0&&(m[S]=!0)))}),b||(h[v]=!0)}),(Object.keys(u).length||Object.keys(d).length)&&this.queue.push({pending:d,pendingCount:Object.keys(d).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(u),pending:Object.keys(d),toLoadLanguages:Object.keys(h),toLoadNamespaces:Object.keys(m)}}},{key:"loaded",value:function(i,o,a){var s=i.split("|"),l=s[0],u=s[1];o&&this.emit("failedLoading",l,u,o),a&&this.store.addResourceBundle(l,u,a),this.state[i]=o?-1:2;var d={};this.queue.forEach(function(h){mwe(h.loaded,[l],u),Nwe(h,i),o&&h.errors.push(o),h.pendingCount===0&&!h.done&&(Object.keys(h.loaded).forEach(function(m){d[m]||(d[m]={});var v=h.loaded[m];v.length&&v.forEach(function(b){d[m][b]===void 0&&(d[m][b]=!0)})}),h.done=!0,h.errors.length?h.callback(h.errors):h.callback())}),this.emit("loaded",d),this.queue=this.queue.filter(function(h){return!h.done})}},{key:"read",value:function(i,o,a){var s=this,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,u=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,d=arguments.length>5?arguments[5]:void 0;if(!i.length)return d(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:i,ns:o,fcName:a,tried:l,wait:u,callback:d});return}this.readingCalls++;var h=function(S,k){if(s.readingCalls--,s.waitingReads.length>0){var E=s.waitingReads.shift();s.read(E.lng,E.ns,E.fcName,E.tried,E.wait,E.callback)}if(S&&k&&l2&&arguments[2]!==void 0?arguments[2]:{},l=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),l&&l();typeof i=="string"&&(i=this.languageUtils.toResolveHierarchy(i)),typeof o=="string"&&(o=[o]);var u=this.queueLoad(i,o,s,l);if(!u.toLoad.length)return u.pending.length||l(),null;u.toLoad.forEach(function(d){a.loadOne(d)})}},{key:"load",value:function(i,o,a){this.prepareLoading(i,o,{},a)}},{key:"reload",value:function(i,o,a){this.prepareLoading(i,o,{reload:!0},a)}},{key:"loadOne",value:function(i){var o=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",s=i.split("|"),l=s[0],u=s[1];this.read(l,u,"read",void 0,void 0,function(d,h){d&&o.logger.warn("".concat(a,"loading namespace ").concat(u," for language ").concat(l," failed"),d),!d&&h&&o.logger.log("".concat(a,"loaded namespace ").concat(u," for language ").concat(l),h),o.loaded(i,d,h)})}},{key:"saveMissing",value:function(i,o,a,s,l){var u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},d=arguments.length>6&&arguments[6]!==void 0?arguments[6]:function(){};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(o)){this.logger.warn('did not save key "'.concat(a,'" as the namespace "').concat(o,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(a==null||a==="")){if(this.backend&&this.backend.create){var h=aR(aR({},u),{},{isUpdate:l}),m=this.backend.create.bind(this.backend);if(m.length<6)try{var v;m.length===5?v=m(i,o,a,s,h):v=m(i,o,a,s),v&&typeof v.then=="function"?v.then(function(b){return d(null,b)}).catch(d):d(null,v)}catch(b){d(b)}else m(i,o,a,s,d,h)}!i||!i[0]||this.store.addResource(i[0],o,a,s)}}}]),n}(Qd);function sR(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){var n={};if(Xs(t[1])==="object"&&(n=t[1]),typeof t[1]=="string"&&(n.defaultValue=t[1]),typeof t[2]=="string"&&(n.tDescription=t[2]),Xs(t[2])==="object"||Xs(t[3])==="object"){var r=t[3]||t[2];Object.keys(r).forEach(function(i){n[i]=r[i]})}return n},interpolation:{escapeValue:!0,format:function(t,n,r,i){return t},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function lR(e){return typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function uR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ml(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Pb(){}function $we(e){var t=Object.getOwnPropertyNames(Object.getPrototypeOf(e));t.forEach(function(n){typeof e[n]=="function"&&(e[n]=e[n].bind(e))})}var Z5=function(e){Bx(n,e);var t=Bwe(n);function n(){var r,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;if(hu(this,n),r=t.call(this),Fx&&Qd.call(Fd(r)),r.options=lR(i),r.services={},r.logger=ql,r.modules={external:[]},$we(Fd(r)),o&&!r.isInitialized&&!i.isClone){if(!r.options.initImmediate)return r.init(i,o),jy(r,Fd(r));setTimeout(function(){r.init(i,o)},0)}return r}return pu(n,[{key:"init",value:function(){var i=this,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;typeof o=="function"&&(a=o,o={}),!o.defaultNS&&o.defaultNS!==!1&&o.ns&&(typeof o.ns=="string"?o.defaultNS=o.ns:o.ns.indexOf("translation")<0&&(o.defaultNS=o.ns[0]));var s=sR();this.options=Ml(Ml(Ml({},s),this.options),lR(o)),this.options.compatibilityAPI!=="v1"&&(this.options.interpolation=Ml(Ml({},s.interpolation),this.options.interpolation)),o.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=o.keySeparator),o.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=o.nsSeparator);function l(E){return E?typeof E=="function"?new E:E:null}if(!this.options.isClone){this.modules.logger?ql.init(l(this.modules.logger),this.options):ql.init(null,this.options);var u;this.modules.formatter?u=this.modules.formatter:typeof Intl<"u"&&(u=Iwe);var d=new tR(this.options);this.store=new Cwe(this.options.resources,this.options);var h=this.services;h.logger=ql,h.resourceStore=this.store,h.languageUtils=d,h.pluralResolver=new Awe(d,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),u&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(h.formatter=l(u),h.formatter.init(h,this.options),this.options.interpolation.format=h.formatter.format.bind(h.formatter)),h.interpolator=new Owe(this.options),h.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},h.backendConnector=new jwe(l(this.modules.backend),h.resourceStore,h,this.options),h.backendConnector.on("*",function(E){for(var _=arguments.length,T=new Array(_>1?_-1:0),A=1;A<_;A++)T[A-1]=arguments[A];i.emit.apply(i,[E].concat(T))}),this.modules.languageDetector&&(h.languageDetector=l(this.modules.languageDetector),h.languageDetector.init&&h.languageDetector.init(h,this.options.detection,this.options)),this.modules.i18nFormat&&(h.i18nFormat=l(this.modules.i18nFormat),h.i18nFormat.init&&h.i18nFormat.init(this)),this.translator=new eR(this.services,this.options),this.translator.on("*",function(E){for(var _=arguments.length,T=new Array(_>1?_-1:0),A=1;A<_;A++)T[A-1]=arguments[A];i.emit.apply(i,[E].concat(T))}),this.modules.external.forEach(function(E){E.init&&E.init(i)})}if(this.format=this.options.interpolation.format,a||(a=Pb),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var m=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);m.length>0&&m[0]!=="dev"&&(this.options.lng=m[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined");var v=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];v.forEach(function(E){i[E]=function(){var _;return(_=i.store)[E].apply(_,arguments)}});var b=["addResource","addResources","addResourceBundle","removeResourceBundle"];b.forEach(function(E){i[E]=function(){var _;return(_=i.store)[E].apply(_,arguments),i}});var S=iv(),k=function(){var _=function(A,I){i.isInitialized&&!i.initializedStoreOnce&&i.logger.warn("init: i18next is already initialized. You should call init just once!"),i.isInitialized=!0,i.options.isClone||i.logger.log("initialized",i.options),i.emit("initialized",i.options),S.resolve(I),a(A,I)};if(i.languages&&i.options.compatibilityAPI!=="v1"&&!i.isInitialized)return _(null,i.t.bind(i));i.changeLanguage(i.options.lng,_)};return this.options.resources||!this.options.initImmediate?k():setTimeout(k,0),S}},{key:"loadResources",value:function(i){var o=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Pb,s=a,l=typeof i=="string"?i:this.language;if(typeof i=="function"&&(s=i),!this.options.resources||this.options.partialBundledLanguages){if(l&&l.toLowerCase()==="cimode")return s();var u=[],d=function(v){if(v){var b=o.services.languageUtils.toResolveHierarchy(v);b.forEach(function(S){u.indexOf(S)<0&&u.push(S)})}};if(l)d(l);else{var h=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);h.forEach(function(m){return d(m)})}this.options.preload&&this.options.preload.forEach(function(m){return d(m)}),this.services.backendConnector.load(u,this.options.ns,function(m){!m&&!o.resolvedLanguage&&o.language&&o.setResolvedLanguage(o.language),s(m)})}else s(null)}},{key:"reloadResources",value:function(i,o,a){var s=iv();return i||(i=this.languages),o||(o=this.options.ns),a||(a=Pb),this.services.backendConnector.reload(i,o,function(l){s.resolve(),a(l)}),s}},{key:"use",value:function(i){if(!i)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!i.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return i.type==="backend"&&(this.modules.backend=i),(i.type==="logger"||i.log&&i.warn&&i.error)&&(this.modules.logger=i),i.type==="languageDetector"&&(this.modules.languageDetector=i),i.type==="i18nFormat"&&(this.modules.i18nFormat=i),i.type==="postProcessor"&&kU.addPostProcessor(i),i.type==="formatter"&&(this.modules.formatter=i),i.type==="3rdParty"&&this.modules.external.push(i),this}},{key:"setResolvedLanguage",value:function(i){if(!(!i||!this.languages)&&!(["cimode","dev"].indexOf(i)>-1))for(var o=0;o-1)&&this.store.hasLanguageSomeTranslations(a)){this.resolvedLanguage=a;break}}}},{key:"changeLanguage",value:function(i,o){var a=this;this.isLanguageChangingTo=i;var s=iv();this.emit("languageChanging",i);var l=function(m){a.language=m,a.languages=a.services.languageUtils.toResolveHierarchy(m),a.resolvedLanguage=void 0,a.setResolvedLanguage(m)},u=function(m,v){v?(l(v),a.translator.changeLanguage(v),a.isLanguageChangingTo=void 0,a.emit("languageChanged",v),a.logger.log("languageChanged",v)):a.isLanguageChangingTo=void 0,s.resolve(function(){return a.t.apply(a,arguments)}),o&&o(m,function(){return a.t.apply(a,arguments)})},d=function(m){!i&&!m&&a.services.languageDetector&&(m=[]);var v=typeof m=="string"?m:a.services.languageUtils.getBestMatchFromCodes(m);v&&(a.language||l(v),a.translator.language||a.translator.changeLanguage(v),a.services.languageDetector&&a.services.languageDetector.cacheUserLanguage&&a.services.languageDetector.cacheUserLanguage(v)),a.loadResources(v,function(b){u(b,v)})};return!i&&this.services.languageDetector&&!this.services.languageDetector.async?d(this.services.languageDetector.detect()):!i&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(d):this.services.languageDetector.detect(d):d(i),s}},{key:"getFixedT",value:function(i,o,a){var s=this,l=function u(d,h){var m;if(Xs(h)!=="object"){for(var v=arguments.length,b=new Array(v>2?v-2:0),S=2;S1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var s=this.resolvedLanguage||this.languages[0],l=this.options?this.options.fallbackLng:!1,u=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;var d=function(v,b){var S=o.services.backendConnector.state["".concat(v,"|").concat(b)];return S===-1||S===2};if(a.precheck){var h=a.precheck(this,d);if(h!==void 0)return h}return!!(this.hasResourceBundle(s,i)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||d(s,i)&&(!l||d(u,i)))}},{key:"loadNamespaces",value:function(i,o){var a=this,s=iv();return this.options.ns?(typeof i=="string"&&(i=[i]),i.forEach(function(l){a.options.ns.indexOf(l)<0&&a.options.ns.push(l)}),this.loadResources(function(l){s.resolve(),o&&o(l)}),s):(o&&o(),Promise.resolve())}},{key:"loadLanguages",value:function(i,o){var a=iv();typeof i=="string"&&(i=[i]);var s=this.options.preload||[],l=i.filter(function(u){return s.indexOf(u)<0});return l.length?(this.options.preload=s.concat(l),this.loadResources(function(u){a.resolve(),o&&o(u)}),a):(o&&o(),Promise.resolve())}},{key:"dir",value:function(i){if(i||(i=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!i)return"rtl";var o=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],a=this.services&&this.services.languageUtils||new tR(sR());return o.indexOf(a.getLanguagePartFromCode(i))>-1||i.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var i=this,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Pb,s=Ml(Ml(Ml({},this.options),o),{isClone:!0}),l=new n(s);(o.debug!==void 0||o.prefix!==void 0)&&(l.logger=l.logger.clone(o));var u=["store","services","language"];return u.forEach(function(d){l[d]=i[d]}),l.services=Ml({},this.services),l.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l.translator=new eR(l.services,l.options),l.translator.on("*",function(d){for(var h=arguments.length,m=new Array(h>1?h-1:0),v=1;v0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new Z5(e,t)});var zt=Z5.createInstance();zt.createInstance=Z5.createInstance;zt.createInstance;zt.dir;zt.init;zt.loadResources;zt.reloadResources;zt.use;zt.changeLanguage;zt.getFixedT;zt.t;zt.exists;zt.setDefaultNamespace;zt.hasLoadedNamespace;zt.loadNamespaces;zt.loadLanguages;function zwe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function J2(e){return J2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},J2(e)}function Hwe(e,t){if(J2(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(J2(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Vwe(e){var t=Hwe(e,"string");return J2(t)==="symbol"?t:String(t)}function cR(e,t){for(var n=0;n0){var s=i.maxAge-0;if(Number.isNaN(s))throw new Error("maxAge should be a Number");a+="; Max-Age=".concat(Math.floor(s))}if(i.domain){if(!dR.test(i.domain))throw new TypeError("option domain is invalid");a+="; Domain=".concat(i.domain)}if(i.path){if(!dR.test(i.path))throw new TypeError("option path is invalid");a+="; Path=".concat(i.path)}if(i.expires){if(typeof i.expires.toUTCString!="function")throw new TypeError("option expires is invalid");a+="; Expires=".concat(i.expires.toUTCString())}if(i.httpOnly&&(a+="; HttpOnly"),i.secure&&(a+="; Secure"),i.sameSite){var l=typeof i.sameSite=="string"?i.sameSite.toLowerCase():i.sameSite;switch(l){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return a},fR={create:function(t,n,r,i){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};r&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+r*60*1e3)),i&&(o.domain=i),document.cookie=Ywe(t,encodeURIComponent(n),o)},read:function(t){for(var n="".concat(t,"="),r=document.cookie.split(";"),i=0;i-1&&(r=window.location.hash.substring(window.location.hash.indexOf("?")));for(var i=r.substring(1),o=i.split("&"),a=0;a0){var l=o[a].substring(0,s);l===t.lookupQuerystring&&(n=o[a].substring(s+1))}}}return n}},ov=null,hR=function(){if(ov!==null)return ov;try{ov=window!=="undefined"&&window.localStorage!==null;var t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch{ov=!1}return ov},Zwe={name:"localStorage",lookup:function(t){var n;if(t.lookupLocalStorage&&hR()){var r=window.localStorage.getItem(t.lookupLocalStorage);r&&(n=r)}return n},cacheUserLanguage:function(t,n){n.lookupLocalStorage&&hR()&&window.localStorage.setItem(n.lookupLocalStorage,t)}},av=null,pR=function(){if(av!==null)return av;try{av=window!=="undefined"&&window.sessionStorage!==null;var t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch{av=!1}return av},Qwe={name:"sessionStorage",lookup:function(t){var n;if(t.lookupSessionStorage&&pR()){var r=window.sessionStorage.getItem(t.lookupSessionStorage);r&&(n=r)}return n},cacheUserLanguage:function(t,n){n.lookupSessionStorage&&pR()&&window.sessionStorage.setItem(n.lookupSessionStorage,t)}},Jwe={name:"navigator",lookup:function(t){var n=[];if(typeof navigator<"u"){if(navigator.languages)for(var r=0;r0?n:void 0}},e6e={name:"htmlTag",lookup:function(t){var n,r=t.htmlTag||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},t6e={name:"path",lookup:function(t){var n;if(typeof window<"u"){var r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(r instanceof Array)if(typeof t.lookupFromPathIndex=="number"){if(typeof r[t.lookupFromPathIndex]!="string")return;n=r[t.lookupFromPathIndex].replace("/","")}else n=r[0].replace("/","")}return n}},n6e={name:"subdomain",lookup:function(t){var n=typeof t.lookupFromSubdomainIndex=="number"?t.lookupFromSubdomainIndex+1:1,r=typeof window<"u"&&window.location&&window.location.hostname&&window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}};function r6e(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"]}}var PU=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};zwe(this,e),this.type="languageDetector",this.detectors={},this.init(t,n)}return Wwe(e,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=n,this.options=qwe(r,this.options||{},r6e()),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=i,this.addDetector(Kwe),this.addDetector(Xwe),this.addDetector(Zwe),this.addDetector(Qwe),this.addDetector(Jwe),this.addDetector(e6e),this.addDetector(t6e),this.addDetector(n6e)}},{key:"addDetector",value:function(n){this.detectors[n.name]=n}},{key:"detect",value:function(n){var r=this;n||(n=this.options.order);var i=[];return n.forEach(function(o){if(r.detectors[o]){var a=r.detectors[o].lookup(r.options);a&&typeof a=="string"&&(a=[a]),a&&(i=i.concat(a))}}),this.services.languageUtils.getBestMatchFromCodes?i:i.length>0?i[0]:null}},{key:"cacheUserLanguage",value:function(n,r){var i=this;r||(r=this.options.caches),r&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(n)>-1||r.forEach(function(o){i.detectors[o]&&i.detectors[o].cacheUserLanguage(n,i.options)}))}}]),e}();PU.type="languageDetector";function h8(e){return h8=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},h8(e)}var TU=[],i6e=TU.forEach,o6e=TU.slice;function p8(e){return i6e.call(o6e.call(arguments,1),function(t){if(t)for(var n in t)e[n]===void 0&&(e[n]=t[n])}),e}function LU(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":h8(XMLHttpRequest))==="object"}function a6e(e){return!!e&&typeof e.then=="function"}function s6e(e){return a6e(e)?e:Promise.resolve(e)}function l6e(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var ey={},u6e={get exports(){return ey},set exports(e){ey=e}},o2={},c6e={get exports(){return o2},set exports(e){o2=e}},gR;function d6e(){return gR||(gR=1,function(e,t){var n=typeof self<"u"?self:wo,r=function(){function o(){this.fetch=!1,this.DOMException=n.DOMException}return o.prototype=n,new o}();(function(o){(function(a){var s={searchParams:"URLSearchParams"in o,iterable:"Symbol"in o&&"iterator"in Symbol,blob:"FileReader"in o&&"Blob"in o&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in o,arrayBuffer:"ArrayBuffer"in o};function l(F){return F&&DataView.prototype.isPrototypeOf(F)}if(s.arrayBuffer)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],d=ArrayBuffer.isView||function(F){return F&&u.indexOf(Object.prototype.toString.call(F))>-1};function h(F){if(typeof F!="string"&&(F=String(F)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(F))throw new TypeError("Invalid character in header field name");return F.toLowerCase()}function m(F){return typeof F!="string"&&(F=String(F)),F}function v(F){var U={next:function(){var X=F.shift();return{done:X===void 0,value:X}}};return s.iterable&&(U[Symbol.iterator]=function(){return U}),U}function b(F){this.map={},F instanceof b?F.forEach(function(U,X){this.append(X,U)},this):Array.isArray(F)?F.forEach(function(U){this.append(U[0],U[1])},this):F&&Object.getOwnPropertyNames(F).forEach(function(U){this.append(U,F[U])},this)}b.prototype.append=function(F,U){F=h(F),U=m(U);var X=this.map[F];this.map[F]=X?X+", "+U:U},b.prototype.delete=function(F){delete this.map[h(F)]},b.prototype.get=function(F){return F=h(F),this.has(F)?this.map[F]:null},b.prototype.has=function(F){return this.map.hasOwnProperty(h(F))},b.prototype.set=function(F,U){this.map[h(F)]=m(U)},b.prototype.forEach=function(F,U){for(var X in this.map)this.map.hasOwnProperty(X)&&F.call(U,this.map[X],X,this)},b.prototype.keys=function(){var F=[];return this.forEach(function(U,X){F.push(X)}),v(F)},b.prototype.values=function(){var F=[];return this.forEach(function(U){F.push(U)}),v(F)},b.prototype.entries=function(){var F=[];return this.forEach(function(U,X){F.push([X,U])}),v(F)},s.iterable&&(b.prototype[Symbol.iterator]=b.prototype.entries);function S(F){if(F.bodyUsed)return Promise.reject(new TypeError("Already read"));F.bodyUsed=!0}function k(F){return new Promise(function(U,X){F.onload=function(){U(F.result)},F.onerror=function(){X(F.error)}})}function E(F){var U=new FileReader,X=k(U);return U.readAsArrayBuffer(F),X}function _(F){var U=new FileReader,X=k(U);return U.readAsText(F),X}function T(F){for(var U=new Uint8Array(F),X=new Array(U.length),Z=0;Z-1?U:F}function j(F,U){U=U||{};var X=U.body;if(F instanceof j){if(F.bodyUsed)throw new TypeError("Already read");this.url=F.url,this.credentials=F.credentials,U.headers||(this.headers=new b(F.headers)),this.method=F.method,this.mode=F.mode,this.signal=F.signal,!X&&F._bodyInit!=null&&(X=F._bodyInit,F.bodyUsed=!0)}else this.url=String(F);if(this.credentials=U.credentials||this.credentials||"same-origin",(U.headers||!this.headers)&&(this.headers=new b(U.headers)),this.method=D(U.method||this.method||"GET"),this.mode=U.mode||this.mode||null,this.signal=U.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&X)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(X)}j.prototype.clone=function(){return new j(this,{body:this._bodyInit})};function z(F){var U=new FormData;return F.trim().split("&").forEach(function(X){if(X){var Z=X.split("="),W=Z.shift().replace(/\+/g," "),Q=Z.join("=").replace(/\+/g," ");U.append(decodeURIComponent(W),decodeURIComponent(Q))}}),U}function V(F){var U=new b,X=F.replace(/\r?\n[\t ]+/g," ");return X.split(/\r?\n/).forEach(function(Z){var W=Z.split(":"),Q=W.shift().trim();if(Q){var ie=W.join(":").trim();U.append(Q,ie)}}),U}I.call(j.prototype);function K(F,U){U||(U={}),this.type="default",this.status=U.status===void 0?200:U.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in U?U.statusText:"OK",this.headers=new b(U.headers),this.url=U.url||"",this._initBody(F)}I.call(K.prototype),K.prototype.clone=function(){return new K(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new b(this.headers),url:this.url})},K.error=function(){var F=new K(null,{status:0,statusText:""});return F.type="error",F};var te=[301,302,303,307,308];K.redirect=function(F,U){if(te.indexOf(U)===-1)throw new RangeError("Invalid status code");return new K(null,{status:U,headers:{location:F}})},a.DOMException=o.DOMException;try{new a.DOMException}catch{a.DOMException=function(U,X){this.message=U,this.name=X;var Z=Error(U);this.stack=Z.stack},a.DOMException.prototype=Object.create(Error.prototype),a.DOMException.prototype.constructor=a.DOMException}function q(F,U){return new Promise(function(X,Z){var W=new j(F,U);if(W.signal&&W.signal.aborted)return Z(new a.DOMException("Aborted","AbortError"));var Q=new XMLHttpRequest;function ie(){Q.abort()}Q.onload=function(){var fe={status:Q.status,statusText:Q.statusText,headers:V(Q.getAllResponseHeaders()||"")};fe.url="responseURL"in Q?Q.responseURL:fe.headers.get("X-Request-URL");var Se="response"in Q?Q.response:Q.responseText;X(new K(Se,fe))},Q.onerror=function(){Z(new TypeError("Network request failed"))},Q.ontimeout=function(){Z(new TypeError("Network request failed"))},Q.onabort=function(){Z(new a.DOMException("Aborted","AbortError"))},Q.open(W.method,W.url,!0),W.credentials==="include"?Q.withCredentials=!0:W.credentials==="omit"&&(Q.withCredentials=!1),"responseType"in Q&&s.blob&&(Q.responseType="blob"),W.headers.forEach(function(fe,Se){Q.setRequestHeader(Se,fe)}),W.signal&&(W.signal.addEventListener("abort",ie),Q.onreadystatechange=function(){Q.readyState===4&&W.signal.removeEventListener("abort",ie)}),Q.send(typeof W._bodyInit>"u"?null:W._bodyInit)})}return q.polyfill=!0,o.fetch||(o.fetch=q,o.Headers=b,o.Request=j,o.Response=K),a.Headers=b,a.Request=j,a.Response=K,a.fetch=q,Object.defineProperty(a,"__esModule",{value:!0}),a})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=r;t=i.fetch,t.default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t}(c6e,o2)),o2}(function(e,t){var n;if(typeof fetch=="function"&&(typeof wo<"u"&&wo.fetch?n=wo.fetch:typeof window<"u"&&window.fetch?n=window.fetch:n=fetch),typeof l6e<"u"&&(typeof window>"u"||typeof window.document>"u")){var r=n||d6e();r.default&&(r=r.default),t.default=r,e.exports=t.default}})(u6e,ey);const AU=ey,mR=rj({__proto__:null,default:AU},[ey]);function Q5(e){return Q5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Q5(e)}var Yu;typeof fetch=="function"&&(typeof global<"u"&&global.fetch?Yu=global.fetch:typeof window<"u"&&window.fetch?Yu=window.fetch:Yu=fetch);var ty;LU()&&(typeof global<"u"&&global.XMLHttpRequest?ty=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&(ty=window.XMLHttpRequest));var J5;typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?J5=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(J5=window.ActiveXObject));!Yu&&mR&&!ty&&!J5&&(Yu=AU||mR);typeof Yu!="function"&&(Yu=void 0);var g8=function(t,n){if(n&&Q5(n)==="object"){var r="";for(var i in n)r+="&"+encodeURIComponent(i)+"="+encodeURIComponent(n[i]);if(!r)return t;t=t+(t.indexOf("?")!==-1?"&":"?")+r.slice(1)}return t},vR=function(t,n,r){Yu(t,n).then(function(i){if(!i.ok)return r(i.statusText||"Error",{status:i.status});i.text().then(function(o){r(null,{status:i.status,data:o})}).catch(r)}).catch(r)},yR=!1,f6e=function(t,n,r,i){t.queryStringParams&&(n=g8(n,t.queryStringParams));var o=p8({},typeof t.customHeaders=="function"?t.customHeaders():t.customHeaders);r&&(o["Content-Type"]="application/json");var a=typeof t.requestOptions=="function"?t.requestOptions(r):t.requestOptions,s=p8({method:r?"POST":"GET",body:r?t.stringify(r):void 0,headers:o},yR?{}:a);try{vR(n,s,i)}catch(l){if(!a||Object.keys(a).length===0||!l.message||l.message.indexOf("not implemented")<0)return i(l);try{Object.keys(a).forEach(function(u){delete s[u]}),vR(n,s,i),yR=!0}catch(u){i(u)}}},h6e=function(t,n,r,i){r&&Q5(r)==="object"&&(r=g8("",r).slice(1)),t.queryStringParams&&(n=g8(n,t.queryStringParams));try{var o;ty?o=new ty:o=new J5("MSXML2.XMLHTTP.3.0"),o.open(r?"POST":"GET",n,1),t.crossDomain||o.setRequestHeader("X-Requested-With","XMLHttpRequest"),o.withCredentials=!!t.withCredentials,r&&o.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),o.overrideMimeType&&o.overrideMimeType("application/json");var a=t.customHeaders;if(a=typeof a=="function"?a():a,a)for(var s in a)o.setRequestHeader(s,a[s]);o.onreadystatechange=function(){o.readyState>3&&i(o.status>=400?o.statusText:null,{status:o.status,data:o.responseText})},o.send(r)}catch(l){console&&console.log(l)}},p6e=function(t,n,r,i){if(typeof r=="function"&&(i=r,r=void 0),i=i||function(){},Yu&&n.indexOf("file:")!==0)return f6e(t,n,r,i);if(LU()||typeof ActiveXObject=="function")return h6e(t,n,r,i);i(new Error("No fetch and no xhr implementation found!"))};function ny(e){return ny=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ny(e)}function g6e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bR(e,t){for(var n=0;n1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};g6e(this,e),this.services=t,this.options=n,this.allOptions=r,this.type="backend",this.init(t,n,r)}return m6e(e,[{key:"init",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=n,this.options=p8(i,this.options||{},b6e()),this.allOptions=o,this.services&&this.options.reloadInterval&&setInterval(function(){return r.reload()},this.options.reloadInterval)}},{key:"readMulti",value:function(n,r,i){this._readAny(n,n,r,r,i)}},{key:"read",value:function(n,r,i){this._readAny([n],n,[r],r,i)}},{key:"_readAny",value:function(n,r,i,o,a){var s=this,l=this.options.loadPath;typeof this.options.loadPath=="function"&&(l=this.options.loadPath(n,i)),l=s6e(l),l.then(function(u){if(!u)return a(null,{});var d=s.services.interpolator.interpolate(u,{lng:n.join("+"),ns:i.join("+")});s.loadUrl(d,a,r,o)})}},{key:"loadUrl",value:function(n,r,i,o){var a=this;this.options.request(this.options,n,void 0,function(s,l){if(l&&(l.status>=500&&l.status<600||!l.status))return r("failed loading "+n+"; status code: "+l.status,!0);if(l&&l.status>=400&&l.status<500)return r("failed loading "+n+"; status code: "+l.status,!1);if(!l&&s&&s.message&&s.message.indexOf("Failed to fetch")>-1)return r("failed loading "+n+": "+s.message,!0);if(s)return r(s,!1);var u,d;try{typeof l.data=="string"?u=a.options.parse(l.data,i,o):u=l.data}catch{d="failed parsing "+n+" to json"}if(d)return r(d,!1);r(null,u)})}},{key:"create",value:function(n,r,i,o,a){var s=this;if(this.options.addPath){typeof n=="string"&&(n=[n]);var l=this.options.parsePayload(r,i,o),u=0,d=[],h=[];n.forEach(function(m){var v=s.options.addPath;typeof s.options.addPath=="function"&&(v=s.options.addPath(m,r));var b=s.services.interpolator.interpolate(v,{lng:m,ns:r});s.options.request(s.options,b,l,function(S,k){u+=1,d.push(S),h.push(k),u===n.length&&a&&a(d,h)})})}}},{key:"reload",value:function(){var n=this,r=this.services,i=r.backendConnector,o=r.languageUtils,a=r.logger,s=i.language;if(!(s&&s.toLowerCase()==="cimode")){var l=[],u=function(h){var m=o.toResolveHierarchy(h);m.forEach(function(v){l.indexOf(v)<0&&l.push(v)})};u(s),this.allOptions.preload&&this.allOptions.preload.forEach(function(d){return u(d)}),l.forEach(function(d){n.allOptions.ns.forEach(function(h){i.read(d,h,"read",null,null,function(m,v){m&&a.warn("loading namespace ".concat(h," for language ").concat(d," failed"),m),!m&&v&&a.log("loaded namespace ".concat(h," for language ").concat(d),v),i.loaded("".concat(d,"|").concat(h),m,v)})})})}}}]),e}();MU.type="backend";function ry(e){return ry=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ry(e)}function S6e(e,t){if(ry(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(ry(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function IU(e){var t=S6e(e,"string");return ry(t)==="symbol"?t:String(t)}function RU(e,t,n){return t=IU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x6e(){if(console&&console.warn){for(var e,t=arguments.length,n=new Array(t),r=0;r2&&arguments[2]!==void 0?arguments[2]:{},r=t.languages[0],i=t.options?t.options.fallbackLng:!1,o=t.languages[t.languages.length-1];if(r.toLowerCase()==="cimode")return!0;var a=function(l,u){var d=t.services.backendConnector.state["".concat(l,"|").concat(u)];return d===-1||d===2};return n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!a(t.isLanguageChangingTo,e)?!1:!!(t.hasResourceBundle(r,e)||!t.services.backendConnector.backend||t.options.resources&&!t.options.partialBundledLanguages||a(r,e)&&(!i||a(o,e)))}function C6e(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!t.languages||!t.languages.length)return m8("i18n.languages were undefined or empty",t.languages),!0;var r=t.options.ignoreJSONStructure!==void 0;return r?t.hasLoadedNamespace(e,{precheck:function(o,a){if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&o.services.backendConnector.backend&&o.isLanguageChangingTo&&!a(o.isLanguageChangingTo,e))return!1}}):w6e(e,t,n)}var _6e=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,k6e={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},E6e=function(t){return k6e[t]},P6e=function(t){return t.replace(_6e,E6e)};function wR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function CR(e){for(var t=1;t0&&arguments[0]!==void 0?arguments[0]:{};v8=CR(CR({},v8),e)}function L6e(){return v8}var DU;function A6e(e){DU=e}function O6e(){return DU}function M6e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _R(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&arguments[1]!==void 0?arguments[1]:{},n=t.i18n,r=w.useContext(D6e)||{},i=r.i18n,o=r.defaultNS,a=n||i||O6e();if(a&&!a.reportNamespaces&&(a.reportNamespaces=new N6e),!a){m8("You will need to pass in an i18next instance by using initReactI18next");var s=function(z){return Array.isArray(z)?z[z.length-1]:z},l=[s,{},!1];return l.t=s,l.i18n={},l.ready=!1,l}a.options.react&&a.options.react.wait!==void 0&&m8("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var u=CC(CC(CC({},L6e()),a.options.react),t),d=u.useSuspense,h=u.keyPrefix,m=e||o||a.options&&a.options.defaultNS;m=typeof m=="string"?[m]:m||["translation"],a.reportNamespaces.addUsedNamespaces&&a.reportNamespaces.addUsedNamespaces(m);var v=(a.isInitialized||a.initializedStoreOnce)&&m.every(function(j){return C6e(j,a,u)});function b(){return a.getFixedT(null,u.nsMode==="fallback"?m:m[0],h)}var S=w.useState(b),k=z6e(S,2),E=k[0],_=k[1],T=m.join(),A=H6e(T),I=w.useRef(!0);w.useEffect(function(){var j=u.bindI18n,z=u.bindI18nStore;I.current=!0,!v&&!d&&xR(a,m,function(){I.current&&_(b)}),v&&A&&A!==T&&I.current&&_(b);function V(){I.current&&_(b)}return j&&a&&a.on(j,V),z&&a&&a.store.on(z,V),function(){I.current=!1,j&&a&&j.split(" ").forEach(function(K){return a.off(K,V)}),z&&a&&z.split(" ").forEach(function(K){return a.store.off(K,V)})}},[a,T]);var R=w.useRef(!0);w.useEffect(function(){I.current&&!R.current&&_(b),R.current=!1},[a,h]);var D=[E,a,v];if(D.t=E,D.i18n=a,D.ready=v,v||!v&&!d)return D;throw new Promise(function(j){xR(a,m,function(){j()})})}zt.use(MU).use(PU).use(R6e).init({fallbackLng:"en",debug:!1,ns:["common","gallery","hotkeys","parameters","settings","modelmanager","toast","tooltip","unifiedcanvas"],backend:{loadPath:"/locales/{{ns}}/{{lng}}.json"},interpolation:{escapeValue:!1},returnNull:!1});const V6e={isConnected:!1,isProcessing:!1,log:[],shouldShowLogViewer:!1,shouldDisplayInProgressType:"latents",shouldDisplayGuides:!0,isGFPGANAvailable:!0,isESRGANAvailable:!0,socketId:"",shouldConfirmOnDelete:!0,openAccordions:[],currentStep:0,totalSteps:0,currentIteration:0,totalIterations:0,currentStatus:zt.isInitialized?zt.t("common:statusDisconnected"):"Disconnected",currentStatusHasSteps:!1,model:"",model_id:"",model_hash:"",app_id:"",app_version:"",model_list:{},infill_methods:[],hasError:!1,wasErrorSeen:!0,isCancelable:!0,saveIntermediatesInterval:5,enableImageDebugging:!1,toastQueue:[],searchFolder:null,foundModels:null,openModel:null},NU=cp({name:"system",initialState:V6e,reducers:{setShouldDisplayInProgressType:(e,t)=>{e.shouldDisplayInProgressType=t.payload},setIsProcessing:(e,t)=>{e.isProcessing=t.payload},setCurrentStatus:(e,t)=>{e.currentStatus=t.payload},setSystemStatus:(e,t)=>({...e,...t.payload}),errorOccurred:e=>{e.hasError=!0,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus=zt.t("common:statusError"),e.wasErrorSeen=!1},errorSeen:e=>{e.hasError=!1,e.wasErrorSeen=!0,e.currentStatus=e.isConnected?zt.t("common:statusConnected"):zt.t("common:statusDisconnected")},addLogEntry:(e,t)=>{const{timestamp:n,message:r,level:i}=t.payload,a={timestamp:n,message:r,level:i||"info"};e.log.push(a)},setShouldShowLogViewer:(e,t)=>{e.shouldShowLogViewer=t.payload},setIsConnected:(e,t)=>{e.isConnected=t.payload,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.hasError=!1},setSocketId:(e,t)=>{e.socketId=t.payload},setShouldConfirmOnDelete:(e,t)=>{e.shouldConfirmOnDelete=t.payload},setOpenAccordions:(e,t)=>{e.openAccordions=t.payload},setSystemConfig:(e,t)=>({...e,...t.payload}),setShouldDisplayGuides:(e,t)=>{e.shouldDisplayGuides=t.payload},processingCanceled:e=>{e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus=zt.t("common:statusProcessingCanceled")},generationRequested:e=>{e.isProcessing=!0,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus=zt.t("common:statusPreparing")},setModelList:(e,t)=>{e.model_list=t.payload},setIsCancelable:(e,t)=>{e.isCancelable=t.payload},modelChangeRequested:e=>{e.currentStatus=zt.t("common:statusLoadingModel"),e.isCancelable=!1,e.isProcessing=!0,e.currentStatusHasSteps=!1},setSaveIntermediatesInterval:(e,t)=>{e.saveIntermediatesInterval=t.payload},setEnableImageDebugging:(e,t)=>{e.enableImageDebugging=t.payload},addToast:(e,t)=>{e.toastQueue.push(t.payload)},clearToastQueue:e=>{e.toastQueue=[]},setProcessingIndeterminateTask:(e,t)=>{e.isProcessing=!0,e.currentStatus=t.payload,e.currentStatusHasSteps=!1},setSearchFolder:(e,t)=>{e.searchFolder=t.payload},setFoundModels:(e,t)=>{e.foundModels=t.payload},setOpenModel:(e,t)=>{e.openModel=t.payload}}}),{setShouldDisplayInProgressType:W6e,setIsProcessing:Hs,addLogEntry:to,setShouldShowLogViewer:_C,setIsConnected:PR,setSocketId:hze,setShouldConfirmOnDelete:jU,setOpenAccordions:U6e,setSystemStatus:G6e,setCurrentStatus:D4,setSystemConfig:q6e,setShouldDisplayGuides:Y6e,processingCanceled:K6e,errorOccurred:TR,errorSeen:BU,setModelList:Tb,setIsCancelable:lm,modelChangeRequested:X6e,setSaveIntermediatesInterval:Z6e,setEnableImageDebugging:Q6e,generationRequested:J6e,addToast:Th,clearToastQueue:eCe,setProcessingIndeterminateTask:tCe,setSearchFolder:FU,setFoundModels:$U,setOpenModel:LR}=NU.actions,nCe=NU.reducer,cP=["txt2img","img2img","unifiedCanvas","nodes","postprocess","training"],rCe={activeTab:0,currentTheme:"dark",parametersPanelScrollPosition:0,shouldHoldParametersPanelOpen:!1,shouldPinParametersPanel:!0,shouldShowParametersPanel:!0,shouldShowDualDisplay:!0,shouldShowImageDetails:!1,shouldUseCanvasBetaLayout:!1,shouldShowExistingModelsInSearch:!1,addNewModelUIOption:null},iCe=rCe,zU=cp({name:"ui",initialState:iCe,reducers:{setActiveTab:(e,t)=>{typeof t.payload=="number"?e.activeTab=t.payload:e.activeTab=cP.indexOf(t.payload)},setCurrentTheme:(e,t)=>{e.currentTheme=t.payload},setParametersPanelScrollPosition:(e,t)=>{e.parametersPanelScrollPosition=t.payload},setShouldPinParametersPanel:(e,t)=>{e.shouldPinParametersPanel=t.payload},setShouldShowParametersPanel:(e,t)=>{e.shouldShowParametersPanel=t.payload},setShouldHoldParametersPanelOpen:(e,t)=>{e.shouldHoldParametersPanelOpen=t.payload},setShouldShowDualDisplay:(e,t)=>{e.shouldShowDualDisplay=t.payload},setShouldShowImageDetails:(e,t)=>{e.shouldShowImageDetails=t.payload},setShouldUseCanvasBetaLayout:(e,t)=>{e.shouldUseCanvasBetaLayout=t.payload},setShouldShowExistingModelsInSearch:(e,t)=>{e.shouldShowExistingModelsInSearch=t.payload},setAddNewModelUIOption:(e,t)=>{e.addNewModelUIOption=t.payload}}}),{setActiveTab:qo,setCurrentTheme:oCe,setParametersPanelScrollPosition:aCe,setShouldHoldParametersPanelOpen:sCe,setShouldPinParametersPanel:lCe,setShouldShowParametersPanel:Ku,setShouldShowDualDisplay:uCe,setShouldShowImageDetails:HU,setShouldUseCanvasBetaLayout:cCe,setShouldShowExistingModelsInSearch:dCe,setAddNewModelUIOption:zh}=zU.actions,fCe=zU.reducer,lu=Object.create(null);lu.open="0";lu.close="1";lu.ping="2";lu.pong="3";lu.message="4";lu.upgrade="5";lu.noop="6";const N4=Object.create(null);Object.keys(lu).forEach(e=>{N4[lu[e]]=e});const hCe={type:"error",data:"parser error"},pCe=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",gCe=typeof ArrayBuffer=="function",mCe=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,VU=({type:e,data:t},n,r)=>pCe&&t instanceof Blob?n?r(t):AR(t,r):gCe&&(t instanceof ArrayBuffer||mCe(t))?n?r(t):AR(new Blob([t]),r):r(lu[e]+(t||"")),AR=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+r)},n.readAsDataURL(e)},OR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Pv=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,r,i=0,o,a,s,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),d=new Uint8Array(u);for(r=0;r>4,d[i++]=(a&15)<<4|s>>2,d[i++]=(s&3)<<6|l&63;return u},yCe=typeof ArrayBuffer=="function",WU=(e,t)=>{if(typeof e!="string")return{type:"message",data:UU(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:bCe(e.substring(1),t)}:N4[n]?e.length>1?{type:N4[n],data:e.substring(1)}:{type:N4[n]}:hCe},bCe=(e,t)=>{if(yCe){const n=vCe(e);return UU(n,t)}else return{base64:!0,data:e}},UU=(e,t)=>{switch(t){case"blob":return e instanceof ArrayBuffer?new Blob([e]):e;case"arraybuffer":default:return e}},GU=String.fromCharCode(30),SCe=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,a)=>{VU(o,!1,s=>{r[a]=s,++i===n&&t(r.join(GU))})})},xCe=(e,t)=>{const n=e.split(GU),r=[];for(let i=0;itypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function YU(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const CCe=setTimeout,_Ce=clearTimeout;function $x(e,t){t.useNativeTimers?(e.setTimeoutFn=CCe.bind(Pd),e.clearTimeoutFn=_Ce.bind(Pd)):(e.setTimeoutFn=setTimeout.bind(Pd),e.clearTimeoutFn=clearTimeout.bind(Pd))}const kCe=1.33;function ECe(e){return typeof e=="string"?PCe(e):Math.ceil((e.byteLength||e.size)*kCe)}function PCe(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}class TCe extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class KU extends si{constructor(t){super(),this.writable=!1,$x(this,t),this.opts=t,this.query=t.query,this.readyState="",this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new TCe(t,n,r)),this}open(){return(this.readyState==="closed"||this.readyState==="")&&(this.readyState="opening",this.doOpen()),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=WU(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}}const XU="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),y8=64,LCe={};let MR=0,Lb=0,IR;function RR(e){let t="";do t=XU[e%y8]+t,e=Math.floor(e/y8);while(e>0);return t}function ZU(){const e=RR(+new Date);return e!==IR?(MR=0,IR=e):e+"."+RR(MR++)}for(;Lb{this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};xCe(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,SCe(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.query||{};const n=this.opts.secure?"https":"http";let r="";this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=ZU()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.opts.port&&(n==="https"&&Number(this.opts.port)!==443||n==="http"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port);const i=QU(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}request(t={}){return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new nu(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class nu extends si{constructor(t,n){super(),$x(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.async=n.async!==!1,this.data=n.data!==void 0?n.data:null,this.create()}create(){const t=YU(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;const n=this.xhr=new eG(t);try{n.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let r in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(r)&&n.setRequestHeader(r,this.opts.extraHeaders[r])}}catch{}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{n.readyState===4&&(n.status===200||n.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof n.status=="number"?n.status:0)},0))},n.send(this.data)}catch(r){this.setTimeoutFn(()=>{this.onError(r)},0);return}typeof document<"u"&&(this.index=nu.requestsCount++,nu.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=MCe,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete nu.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}nu.requestsCount=0;nu.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",DR);else if(typeof addEventListener=="function"){const e="onpagehide"in Pd?"pagehide":"unload";addEventListener(e,DR,!1)}}function DR(){for(let e in nu.requests)nu.requests.hasOwnProperty(e)&&nu.requests[e].abort()}const tG=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),Ab=Pd.WebSocket||Pd.MozWebSocket,NR=!0,DCe="arraybuffer",jR=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class NCe extends KU{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=jR?{}:YU(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=NR&&!jR?n?new Ab(t,n):new Ab(t):new Ab(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType||DCe,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n{const a={};try{NR&&this.ws.send(o)}catch{}i&&tG(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){let t=this.query||{};const n=this.opts.secure?"wss":"ws";let r="";this.opts.port&&(n==="wss"&&Number(this.opts.port)!==443||n==="ws"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=ZU()),this.supportsBinary||(t.b64=1);const i=QU(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}check(){return!!Ab}}const jCe={websocket:NCe,polling:RCe},BCe=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,FCe=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function b8(e){const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=BCe.exec(e||""),o={},a=14;for(;a--;)o[FCe[a]]=i[a]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=$Ce(o,o.path),o.queryKey=zCe(o,o.query),o}function $Ce(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function zCe(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}let nG=class Fg extends si{constructor(t,n={}){super(),t&&typeof t=="object"&&(n=t,t=null),t?(t=b8(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=b8(n.host).host),$x(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},n),this.opts.path=this.opts.path.replace(/\/$/,"")+"/",typeof this.opts.query=="string"&&(this.opts.query=ACe(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=qU,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts.transportOptions[t],this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new jCe[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Fg.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),r=!1;Fg.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",h=>{if(!r)if(h.type==="pong"&&h.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Fg.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(d(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const m=new Error("probe error");m.transport=n.name,this.emitReserved("upgradeError",m)}}))};function o(){r||(r=!0,d(),n.close(),n=null)}const a=h=>{const m=new Error("probe error: "+h);m.transport=n.name,o(),this.emitReserved("upgradeError",m)};function s(){a("transport closed")}function l(){a("socket closed")}function u(h){n&&h.name!==n.name&&o()}const d=()=>{n.removeListener("open",i),n.removeListener("error",a),n.removeListener("close",s),this.off("close",l),this.off("upgrading",u)};n.once("open",i),n.once("error",a),n.once("close",s),this.once("close",l),this.once("upgrading",u),n.open()}onOpen(){if(this.readyState="open",Fg.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade&&this.transport.pause){let t=0;const n=this.upgrades.length;for(;t{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){Fg.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const i=t.length;for(;rtypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,rG=Object.prototype.toString,UCe=typeof Blob=="function"||typeof Blob<"u"&&rG.call(Blob)==="[object BlobConstructor]",GCe=typeof File=="function"||typeof File<"u"&&rG.call(File)==="[object FileConstructor]";function dP(e){return VCe&&(e instanceof ArrayBuffer||WCe(e))||UCe&&e instanceof Blob||GCe&&e instanceof File}function j4(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n=0&&e.num0;case cn.ACK:case cn.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}class ZCe{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=YCe(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const QCe=Object.freeze(Object.defineProperty({__proto__:null,Decoder:fP,Encoder:XCe,get PacketType(){return cn},protocol:KCe},Symbol.toStringTag,{value:"Module"}));function Bs(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const JCe=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class iG extends si{constructor(t,n,r){super(),this.connected=!1,this.receiveBuffer=[],this.sendBuffer=[],this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[Bs(t,"open",this.onopen.bind(this)),Bs(t,"packet",this.onpacket.bind(this)),Bs(t,"error",this.onerror.bind(this)),Bs(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){if(JCe.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');n.unshift(t);const r={type:cn.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const a=this.ids++,s=n.pop();this._registerAckCallback(a,s),r.id=a}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(t,n){const r=this.flags.timeout;if(r===void 0){this.acks[t]=n;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let o=0;o{this.io.clearTimeoutFn(i),n.apply(this,[null,...o])}}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this.packet({type:cn.CONNECT,data:t})}):this.packet({type:cn.CONNECT,data:this.auth})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case cn.CONNECT:if(t.data&&t.data.sid){const i=t.data.sid;this.onconnect(i)}else this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case cn.EVENT:case cn.BINARY_EVENT:this.onevent(t);break;case cn.ACK:case cn.BINARY_ACK:this.onack(t);break;case cn.DISCONNECT:this.ondisconnect();break;case cn.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t)}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:cn.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t){this.id=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:cn.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r0&&e.jitter<=1?e.jitter:0,this.attempts=0}E0.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0};E0.prototype.reset=function(){this.attempts=0};E0.prototype.setMin=function(e){this.ms=e};E0.prototype.setMax=function(e){this.max=e};E0.prototype.setJitter=function(e){this.jitter=e};class w8 extends si{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,$x(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new E0({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||QCe;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new nG(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=Bs(n,"open",function(){r.onopen(),t&&t()}),o=Bs(n,"error",a=>{r.cleanup(),r._readyState="closed",this.emitReserved("error",a),t?t(a):r.maybeReconnectOnOpen()});if(this._timeout!==!1){const a=this._timeout;a===0&&i();const s=this.setTimeoutFn(()=>{i(),n.close(),n.emit("error",new Error("timeout"))},a);this.opts.autoUnref&&s.unref(),this.subs.push(function(){clearTimeout(s)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Bs(t,"ping",this.onping.bind(this)),Bs(t,"data",this.ondata.bind(this)),Bs(t,"error",this.onerror.bind(this)),Bs(t,"close",this.onclose.bind(this)),Bs(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){tG(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r||(r=new iG(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;rt()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(function(){clearTimeout(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const sv={};function B4(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=HCe(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,a=sv[i]&&o in sv[i].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||a;let l;return s?l=new w8(r,t):(sv[i]||(sv[i]=new w8(r,t)),l=sv[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(B4,{Manager:w8,Socket:iG,io:B4,connect:B4});const e7e=["ddim","plms","k_lms","k_dpm_2","k_dpm_2_a","k_dpmpp_2","k_dpmpp_2_a","k_euler","k_euler_a","k_heun"],t7e=["ddim","plms","k_lms","dpmpp_2","k_dpm_2","k_dpm_2_a","k_dpmpp_2","k_euler","k_euler_a","k_heun"],n7e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],r7e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],i7e=[{key:"2x",value:2},{key:"4x",value:4}],hP=0,pP=4294967295,o7e=["gfpgan","codeformer"],a7e=[{key:"None",value:"none"},{key:"Fast",value:"latents"},{key:"Accurate",value:"full-res"}];var s7e=Math.PI/180;function l7e(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const Fm=typeof global<"u"?global:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},pt={_global:Fm,version:"8.3.14",isBrowser:l7e(),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle(e){return pt.angleDeg?e*s7e:e},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return pt.DD.isDragging},isDragReady(){return!!pt.DD.node},releaseCanvasOnDestroy:!0,document:Fm.document,_injectGlobal(e){Fm.Konva=e}},Ar=e=>{pt[e.prototype.getClassName()]=e};pt._injectGlobal(pt);class ka{constructor(t=[1,0,0,1,0,0]){this.dirty=!1,this.m=t&&t.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new ka(this.m)}copyInto(t){t.m[0]=this.m[0],t.m[1]=this.m[1],t.m[2]=this.m[2],t.m[3]=this.m[3],t.m[4]=this.m[4],t.m[5]=this.m[5]}point(t){var n=this.m;return{x:n[0]*t.x+n[2]*t.y+n[4],y:n[1]*t.x+n[3]*t.y+n[5]}}translate(t,n){return this.m[4]+=this.m[0]*t+this.m[2]*n,this.m[5]+=this.m[1]*t+this.m[3]*n,this}scale(t,n){return this.m[0]*=t,this.m[1]*=t,this.m[2]*=n,this.m[3]*=n,this}rotate(t){var n=Math.cos(t),r=Math.sin(t),i=this.m[0]*n+this.m[2]*r,o=this.m[1]*n+this.m[3]*r,a=this.m[0]*-r+this.m[2]*n,s=this.m[1]*-r+this.m[3]*n;return this.m[0]=i,this.m[1]=o,this.m[2]=a,this.m[3]=s,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(t,n){var r=this.m[0]+this.m[2]*n,i=this.m[1]+this.m[3]*n,o=this.m[2]+this.m[0]*t,a=this.m[3]+this.m[1]*t;return this.m[0]=r,this.m[1]=i,this.m[2]=o,this.m[3]=a,this}multiply(t){var n=this.m[0]*t.m[0]+this.m[2]*t.m[1],r=this.m[1]*t.m[0]+this.m[3]*t.m[1],i=this.m[0]*t.m[2]+this.m[2]*t.m[3],o=this.m[1]*t.m[2]+this.m[3]*t.m[3],a=this.m[0]*t.m[4]+this.m[2]*t.m[5]+this.m[4],s=this.m[1]*t.m[4]+this.m[3]*t.m[5]+this.m[5];return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}invert(){var t=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),n=this.m[3]*t,r=-this.m[1]*t,i=-this.m[2]*t,o=this.m[0]*t,a=t*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),s=t*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}getMatrix(){return this.m}decompose(){var t=this.m[0],n=this.m[1],r=this.m[2],i=this.m[3],o=this.m[4],a=this.m[5],s=t*i-n*r;let l={x:o,y:a,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(t!=0||n!=0){var u=Math.sqrt(t*t+n*n);l.rotation=n>0?Math.acos(t/u):-Math.acos(t/u),l.scaleX=u,l.scaleY=s/u,l.skewX=(t*r+n*i)/s,l.skewY=0}else if(r!=0||i!=0){var d=Math.sqrt(r*r+i*i);l.rotation=Math.PI/2-(i>0?Math.acos(-r/d):-Math.acos(r/d)),l.scaleX=s/d,l.scaleY=d,l.skewX=0,l.skewY=(t*r+n*i)/s}return l.rotation=de._getRotation(l.rotation),l}}var u7e="[object Array]",c7e="[object Number]",d7e="[object String]",f7e="[object Boolean]",h7e=Math.PI/180,p7e=180/Math.PI,kC="#",g7e="",m7e="0",v7e="Konva warning: ",BR="Konva error: ",y7e="rgb(",EC={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},b7e=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,Ob=[];const S7e=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(e){setTimeout(e,60)},de={_isElement(e){return!!(e&&e.nodeType==1)},_isFunction(e){return!!(e&&e.constructor&&e.call&&e.apply)},_isPlainObject(e){return!!e&&e.constructor===Object},_isArray(e){return Object.prototype.toString.call(e)===u7e},_isNumber(e){return Object.prototype.toString.call(e)===c7e&&!isNaN(e)&&isFinite(e)},_isString(e){return Object.prototype.toString.call(e)===d7e},_isBoolean(e){return Object.prototype.toString.call(e)===f7e},isObject(e){return e instanceof Object},isValidSelector(e){if(typeof e!="string")return!1;var t=e[0];return t==="#"||t==="."||t===t.toUpperCase()},_sign(e){return e===0||e>0?1:-1},requestAnimFrame(e){Ob.push(e),Ob.length===1&&S7e(function(){const t=Ob;Ob=[],t.forEach(function(n){n()})})},createCanvasElement(){var e=document.createElement("canvas");try{e.style=e.style||{}}catch{}return e},createImageElement(){return document.createElement("img")},_isInDocument(e){for(;e=e.parentNode;)if(e==document)return!0;return!1},_urlToImage(e,t){var n=de.createImageElement();n.onload=function(){t(n)},n.src=e},_rgbToHex(e,t,n){return((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1)},_hexToRgb(e){e=e.replace(kC,g7e);var t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:t&255}},getRandomColor(){for(var e=(Math.random()*16777215<<0).toString(16);e.length<6;)e=m7e+e;return kC+e},getRGB(e){var t;return e in EC?(t=EC[e],{r:t[0],g:t[1],b:t[2]}):e[0]===kC?this._hexToRgb(e.substring(1)):e.substr(0,4)===y7e?(t=b7e.exec(e.replace(/ /g,"")),{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)}):{r:0,g:0,b:0}},colorToRGBA(e){return e=e||"black",de._namedColorToRBA(e)||de._hex3ColorToRGBA(e)||de._hex6ColorToRGBA(e)||de._rgbColorToRGBA(e)||de._rgbaColorToRGBA(e)||de._hslColorToRGBA(e)},_namedColorToRBA(e){var t=EC[e.toLowerCase()];return t?{r:t[0],g:t[1],b:t[2],a:1}:null},_rgbColorToRGBA(e){if(e.indexOf("rgb(")===0){e=e.match(/rgb\(([^)]+)\)/)[1];var t=e.split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:1}}},_rgbaColorToRGBA(e){if(e.indexOf("rgba(")===0){e=e.match(/rgba\(([^)]+)\)/)[1];var t=e.split(/ *, */).map((n,r)=>n.slice(-1)==="%"?r===3?parseInt(n)/100:parseInt(n)/100*255:Number(n));return{r:t[0],g:t[1],b:t[2],a:t[3]}}},_hex6ColorToRGBA(e){if(e[0]==="#"&&e.length===7)return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16),a:1}},_hex3ColorToRGBA(e){if(e[0]==="#"&&e.length===4)return{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16),a:1}},_hslColorToRGBA(e){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(e)){const[t,...n]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e),r=Number(n[0])/360,i=Number(n[1])/100,o=Number(n[2])/100;let a,s,l;if(i===0)return l=o*255,{r:Math.round(l),g:Math.round(l),b:Math.round(l),a:1};o<.5?a=o*(1+i):a=o+i-o*i;const u=2*o-a,d=[0,0,0];for(let h=0;h<3;h++)s=r+1/3*-(h-1),s<0&&s++,s>1&&s--,6*s<1?l=u+(a-u)*6*s:2*s<1?l=a:3*s<2?l=u+(a-u)*(2/3-s)*6:l=u,d[h]=l*255;return{r:Math.round(d[0]),g:Math.round(d[1]),b:Math.round(d[2]),a:1}}},haveIntersection(e,t){return!(t.x>e.x+e.width||t.x+t.widthe.y+e.height||t.y+t.height1?(a=n,s=r,l=(n-i)*(n-i)+(r-o)*(r-o)):(a=e+d*(n-e),s=t+d*(r-t),l=(a-i)*(a-i)+(s-o)*(s-o))}return[a,s,l]},_getProjectionToLine(e,t,n){var r=de.cloneObject(e),i=Number.MAX_VALUE;return t.forEach(function(o,a){if(!(!n&&a===t.length-1)){var s=t[(a+1)%t.length],l=de._getProjectionToSegment(o.x,o.y,s.x,s.y,e.x,e.y),u=l[0],d=l[1],h=l[2];ht.length){var a=t;t=e,e=a}for(r=0;r{t.width=0,t.height=0})}};function df(e){return de._isString(e)?'"'+e+'"':Object.prototype.toString.call(e)==="[object Number]"||de._isBoolean(e)?e:Object.prototype.toString.call(e)}function oG(e){return e>255?255:e<0?0:Math.round(e)}function Ge(){if(pt.isUnminified)return function(e,t){return de._isNumber(e)||de.warn(df(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}function aG(e){if(pt.isUnminified)return function(t,n){let r=de._isNumber(t),i=de._isArray(t)&&t.length==e;return!r&&!i&&de.warn(df(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array('+e+")"),t}}function gP(){if(pt.isUnminified)return function(e,t){var n=de._isNumber(e),r=e==="auto";return n||r||de.warn(df(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}function P0(){if(pt.isUnminified)return function(e,t){return de._isString(e)||de.warn(df(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}function sG(){if(pt.isUnminified)return function(e,t){const n=de._isString(e),r=Object.prototype.toString.call(e)==="[object CanvasGradient]"||e&&e.addColorStop;return n||r||de.warn(df(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}function x7e(){if(pt.isUnminified)return function(e,t){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&e instanceof n||(de._isArray(e)?e.forEach(function(r){de._isNumber(r)||de.warn('"'+t+'" attribute has non numeric element '+r+". Make sure that all elements are numbers.")}):de.warn(df(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}function nl(){if(pt.isUnminified)return function(e,t){var n=e===!0||e===!1;return n||de.warn(df(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}function w7e(e){if(pt.isUnminified)return function(t,n){return t==null||de.isObject(t)||de.warn(df(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}var lv="get",uv="set";const ee={addGetterSetter(e,t,n,r,i){ee.addGetter(e,t,n),ee.addSetter(e,t,r,i),ee.addOverloadedGetterSetter(e,t)},addGetter(e,t,n){var r=lv+de._capitalize(t);e.prototype[r]=e.prototype[r]||function(){var i=this.attrs[t];return i===void 0?n:i}},addSetter(e,t,n,r){var i=uv+de._capitalize(t);e.prototype[i]||ee.overWriteSetter(e,t,n,r)},overWriteSetter(e,t,n,r){var i=uv+de._capitalize(t);e.prototype[i]=function(o){return n&&o!==void 0&&o!==null&&(o=n.call(this,o,t)),this._setAttr(t,o),r&&r.call(this),this}},addComponentsGetterSetter(e,t,n,r,i){var o=n.length,a=de._capitalize,s=lv+a(t),l=uv+a(t),u,d;e.prototype[s]=function(){var m={};for(u=0;u{this._setAttr(t+a(S),void 0)}),this._fireChangeEvent(t,v,m),i&&i.call(this),this},ee.addOverloadedGetterSetter(e,t)},addOverloadedGetterSetter(e,t){var n=de._capitalize(t),r=uv+n,i=lv+n;e.prototype[t]=function(){return arguments.length?(this[r](arguments[0]),this):this[i]()}},addDeprecatedGetterSetter(e,t,n,r){de.error("Adding deprecated "+t);var i=lv+de._capitalize(t),o=t+" property is deprecated and will be removed soon. Look at Konva change log for more information.";e.prototype[i]=function(){de.error(o);var a=this.attrs[t];return a===void 0?n:a},ee.addSetter(e,t,r,function(){de.error(o)}),ee.addOverloadedGetterSetter(e,t)},backCompat(e,t){de.each(t,function(n,r){var i=e.prototype[r],o=lv+de._capitalize(n),a=uv+de._capitalize(n);function s(){i.apply(this,arguments),de.error('"'+n+'" method is deprecated and will be removed soon. Use ""'+r+'" instead.')}e.prototype[n]=s,e.prototype[o]=s,e.prototype[a]=s})},afterSetFilter(){this._filterUpToDate=!1}};function C7e(e){var t=[],n=e.length,r=de,i,o;for(i=0;itypeof d=="number"?Math.floor(d):d)),o+=_7e+u.join(FR)+k7e)):(o+=s.property,t||(o+=A7e+s.val)),o+=T7e;return o}clearTrace(){this.traceArr=[]}_trace(t){var n=this.traceArr,r;n.push(t),r=n.length,r>=M7e&&n.shift()}reset(){var t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}getCanvas(){return this.canvas}clear(t){var n=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,n.getWidth()/n.pixelRatio,n.getHeight()/n.pixelRatio)}_applyLineCap(t){var n=t.getLineCap();n&&this.setAttr("lineCap",n)}_applyOpacity(t){var n=t.getAbsoluteOpacity();n!==1&&this.setAttr("globalAlpha",n)}_applyLineJoin(t){var n=t.attrs.lineJoin;n&&this.setAttr("lineJoin",n)}setAttr(t,n){this._context[t]=n}arc(t,n,r,i,o,a){this._context.arc(t,n,r,i,o,a)}arcTo(t,n,r,i,o){this._context.arcTo(t,n,r,i,o)}beginPath(){this._context.beginPath()}bezierCurveTo(t,n,r,i,o,a){this._context.bezierCurveTo(t,n,r,i,o,a)}clearRect(t,n,r,i){this._context.clearRect(t,n,r,i)}clip(){this._context.clip()}closePath(){this._context.closePath()}createImageData(t,n){var r=arguments;if(r.length===2)return this._context.createImageData(t,n);if(r.length===1)return this._context.createImageData(t)}createLinearGradient(t,n,r,i){return this._context.createLinearGradient(t,n,r,i)}createPattern(t,n){return this._context.createPattern(t,n)}createRadialGradient(t,n,r,i,o,a){return this._context.createRadialGradient(t,n,r,i,o,a)}drawImage(t,n,r,i,o,a,s,l,u){var d=arguments,h=this._context;d.length===3?h.drawImage(t,n,r):d.length===5?h.drawImage(t,n,r,i,o):d.length===9&&h.drawImage(t,n,r,i,o,a,s,l,u)}ellipse(t,n,r,i,o,a,s,l){this._context.ellipse(t,n,r,i,o,a,s,l)}isPointInPath(t,n){return this._context.isPointInPath(t,n)}fill(t){t?this._context.fill(t):this._context.fill()}fillRect(t,n,r,i){this._context.fillRect(t,n,r,i)}strokeRect(t,n,r,i){this._context.strokeRect(t,n,r,i)}fillText(t,n,r,i){i?this._context.fillText(t,n,r,i):this._context.fillText(t,n,r)}measureText(t){return this._context.measureText(t)}getImageData(t,n,r,i){return this._context.getImageData(t,n,r,i)}lineTo(t,n){this._context.lineTo(t,n)}moveTo(t,n){this._context.moveTo(t,n)}rect(t,n,r,i){this._context.rect(t,n,r,i)}putImageData(t,n,r){this._context.putImageData(t,n,r)}quadraticCurveTo(t,n,r,i){this._context.quadraticCurveTo(t,n,r,i)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,n){this._context.scale(t,n)}setLineDash(t){this._context.setLineDash?this._context.setLineDash(t):"mozDash"in this._context?this._context.mozDash=t:"webkitLineDash"in this._context&&(this._context.webkitLineDash=t)}getLineDash(){return this._context.getLineDash()}setTransform(t,n,r,i,o,a){this._context.setTransform(t,n,r,i,o,a)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,n,r,i){this._context.strokeText(t,n,r,i)}transform(t,n,r,i,o,a){this._context.transform(t,n,r,i,o,a)}translate(t,n){this._context.translate(t,n)}_enableTrace(){var t=this,n=$R.length,r=this.setAttr,i,o,a=function(s){var l=t[s],u;t[s]=function(){return o=C7e(Array.prototype.slice.call(arguments,0)),u=l.apply(t,arguments),t._trace({method:s,args:o}),u}};for(i=0;i{t.dragStatus==="dragging"&&(e=!0)}),e},justDragged:!1,get node(){var e;return vn._dragElements.forEach(t=>{e=t.node}),e},_dragElements:new Map,_drag(e){const t=[];vn._dragElements.forEach((n,r)=>{const{node:i}=n,o=i.getStage();o.setPointersPositions(e),n.pointerId===void 0&&(n.pointerId=de._getFirstPointerId(e));const a=o._changedPointerPositions.find(u=>u.id===n.pointerId);if(a){if(n.dragStatus!=="dragging"){var s=i.dragDistance(),l=Math.max(Math.abs(a.x-n.startPointerPos.x),Math.abs(a.y-n.startPointerPos.y));if(l{n.fire("dragmove",{type:"dragmove",target:n,evt:e},!0)})},_endDragBefore(e){const t=[];vn._dragElements.forEach(n=>{const{node:r}=n,i=r.getStage();if(e&&i.setPointersPositions(e),!i._changedPointerPositions.find(s=>s.id===n.pointerId))return;(n.dragStatus==="dragging"||n.dragStatus==="stopped")&&(vn.justDragged=!0,pt._mouseListenClick=!1,pt._touchListenClick=!1,pt._pointerListenClick=!1,n.dragStatus="stopped");const a=n.node.getLayer()||n.node instanceof pt.Stage&&n.node;a&&t.indexOf(a)===-1&&t.push(a)}),t.forEach(n=>{n.draw()})},_endDragAfter(e){vn._dragElements.forEach((t,n)=>{t.dragStatus==="stopped"&&t.node.fire("dragend",{type:"dragend",target:t.node,evt:e},!0),t.dragStatus!=="dragging"&&vn._dragElements.delete(n)})}};pt.isBrowser&&(window.addEventListener("mouseup",vn._endDragBefore,!0),window.addEventListener("touchend",vn._endDragBefore,!0),window.addEventListener("mousemove",vn._drag),window.addEventListener("touchmove",vn._drag),window.addEventListener("mouseup",vn._endDragAfter,!1),window.addEventListener("touchend",vn._endDragAfter,!1));var F4="absoluteOpacity",Ib="allEventListeners",$u="absoluteTransform",zR="absoluteScale",ah="canvas",N7e="Change",j7e="children",B7e="konva",C8="listening",HR="mouseenter",VR="mouseleave",WR="set",UR="Shape",$4=" ",GR="stage",fd="transform",F7e="Stage",_8="visible",$7e=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join($4);let z7e=1,Xe=class k8{constructor(t){this._id=z7e++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(t),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(t){(t===fd||t===$u)&&this._cache.get(t)?this._cache.get(t).dirty=!0:t?this._cache.delete(t):this._cache.clear()}_getCache(t,n){var r=this._cache.get(t),i=t===fd||t===$u,o=r===void 0||i&&r.dirty===!0;return o&&(r=n.call(this),this._cache.set(t,r)),r}_calculate(t,n,r){if(!this._attachedDepsListeners.get(t)){const i=n.map(o=>o+"Change.konva").join($4);this.on(i,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,r)}_getCanvasCache(){return this._cache.get(ah)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===$u&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(ah)){const{scene:t,filter:n,hit:r}=this._cache.get(ah);de.releaseCanvas(t,n,r),this._cache.delete(ah)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){var n=t||{},r={};(n.x===void 0||n.y===void 0||n.width===void 0||n.height===void 0)&&(r=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()}));var i=Math.ceil(n.width||r.width),o=Math.ceil(n.height||r.height),a=n.pixelRatio,s=n.x===void 0?Math.floor(r.x):n.x,l=n.y===void 0?Math.floor(r.y):n.y,u=n.offset||0,d=n.drawBorder||!1,h=n.hitCanvasPixelRatio||1;if(!i||!o){de.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}i+=u*2+1,o+=u*2+1,s-=u,l-=u;var m=new $m({pixelRatio:a,width:i,height:o}),v=new $m({pixelRatio:a,width:0,height:0}),b=new mP({pixelRatio:h,width:i,height:o}),S=m.getContext(),k=b.getContext();return b.isCache=!0,m.isCache=!0,this._cache.delete(ah),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(m.getContext()._context.imageSmoothingEnabled=!1,v.getContext()._context.imageSmoothingEnabled=!1),S.save(),k.save(),S.translate(-s,-l),k.translate(-s,-l),this._isUnderCache=!0,this._clearSelfAndDescendantCache(F4),this._clearSelfAndDescendantCache(zR),this.drawScene(m,this),this.drawHit(b,this),this._isUnderCache=!1,S.restore(),k.restore(),d&&(S.save(),S.beginPath(),S.rect(0,0,i,o),S.closePath(),S.setAttr("strokeStyle","red"),S.setAttr("lineWidth",5),S.stroke(),S.restore()),this._cache.set(ah,{scene:m,filter:v,hit:b,x:s,y:l}),this._requestDraw(),this}isCached(){return this._cache.has(ah)}getClientRect(t){throw new Error('abstract "getClientRect" method call')}_transformedRect(t,n){var r=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],i,o,a,s,l=this.getAbsoluteTransform(n);return r.forEach(function(u){var d=l.point(u);i===void 0&&(i=a=d.x,o=s=d.y),i=Math.min(i,d.x),o=Math.min(o,d.y),a=Math.max(a,d.x),s=Math.max(s,d.y)}),{x:i,y:o,width:a-i,height:s-o}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const n=this._getCanvasCache();t.translate(n.x,n.y);var r=this._getCachedSceneCanvas(),i=r.pixelRatio;t.drawImage(r._canvas,0,0,r.width/i,r.height/i),t.restore()}_drawCachedHitCanvas(t){var n=this._getCanvasCache(),r=n.hit;t.save(),t.translate(n.x,n.y),t.drawImage(r._canvas,0,0,r.width/r.pixelRatio,r.height/r.pixelRatio),t.restore()}_getCachedSceneCanvas(){var t=this.filters(),n=this._getCanvasCache(),r=n.scene,i=n.filter,o=i.getContext(),a,s,l,u;if(t){if(!this._filterUpToDate){var d=r.pixelRatio;i.setSize(r.width/r.pixelRatio,r.height/r.pixelRatio);try{for(a=t.length,o.clear(),o.drawImage(r._canvas,0,0,r.getWidth()/d,r.getHeight()/d),s=o.getImageData(0,0,i.getWidth(),i.getHeight()),l=0;l{var n,r;if(!t)return this;for(n in t)n!==j7e&&(r=WR+de._capitalize(n),de._isFunction(this[r])?this[r](t[n]):this._setAttr(n,t[n]))}),this}isListening(){return this._getCache(C8,this._isListening)}_isListening(t){if(!this.listening())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isListening(t):!0}isVisible(){return this._getCache(_8,this._isVisible)}_isVisible(t){if(!this.visible())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isVisible(t):!0}shouldDrawHit(t,n=!1){if(t)return this._isVisible(t)&&this._isListening(t);var r=this.getLayer(),i=!1;vn._dragElements.forEach(a=>{a.dragStatus==="dragging"&&(a.node.nodeType==="Stage"||a.node.getLayer()===r)&&(i=!0)});var o=!n&&!pt.hitOnDragEnabled&&i;return this.isListening()&&this.isVisible()&&!o}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var t=this.getDepth(),n=this,r=0,i,o,a,s;function l(u){for(i=[],o=u.length,a=0;a0&&i[0].getDepth()<=t&&l(i)}return n.nodeType!==F7e&&l(n.getStage().getChildren()),r}getDepth(){for(var t=0,n=this.parent;n;)t++,n=n.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(fd),this._clearSelfAndDescendantCache($u)),this._needClearTransformCache=!1}setPosition(t){return this._batchTransformChanges(()=>{this.x(t.x),this.y(t.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){if(!this.getStage())return null;var t=this.getStage().getPointerPosition();if(!t)return null;var n=this.getAbsoluteTransform().copy();return n.invert(),n.point(t)}getAbsolutePosition(t){let n=!1,r=this.parent;for(;r;){if(r.isCached()){n=!0;break}r=r.parent}n&&!t&&(t=!0);var i=this.getAbsoluteTransform(t).getMatrix(),o=new ka,a=this.offset();return o.m=i.slice(),o.translate(a.x,a.y),o.getTranslation()}setAbsolutePosition(t){var n=this._clearTransform();this.attrs.x=n.x,this.attrs.y=n.y,delete n.x,delete n.y,this._clearCache(fd);var r=this._getAbsoluteTransform().copy();return r.invert(),r.translate(t.x,t.y),t={x:this.attrs.x+r.getTranslation().x,y:this.attrs.y+r.getTranslation().y},this._setTransform(n),this.setPosition({x:t.x,y:t.y}),this._clearCache(fd),this._clearSelfAndDescendantCache($u),this}_setTransform(t){var n;for(n in t)this.attrs[n]=t[n]}_clearTransform(){var t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){var n=t.x,r=t.y,i=this.x(),o=this.y();return n!==void 0&&(i+=n),r!==void 0&&(o+=r),this.setPosition({x:i,y:o}),this}_eachAncestorReverse(t,n){var r=[],i=this.getParent(),o,a;if(!(n&&n._id===this._id)){for(r.unshift(this);i&&(!n||i._id!==n._id);)r.unshift(i),i=i.parent;for(o=r.length,a=0;a0?(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return de.warn("Node has no parent. moveToBottom function is ignored."),!1;var t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(t){if(!this.parent)return de.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&de.warn("Unexpected value "+t+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");var n=this.index;return this.parent.children.splice(n,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(F4,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var t=this.opacity(),n=this.getParent();return n&&!n._isUnderCache&&(t*=n.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){var t={},n=this.getAttrs(),r,i,o,a,s;t.attrs={};for(r in n)i=n[r],s=de.isObject(i)&&!de._isPlainObject(i)&&!de._isArray(i),!s&&(o=typeof this[r]=="function"&&this[r],delete n[r],a=o?o.call(this):null,n[r]=i,a!==i&&(t.attrs[r]=i));return t.className=this.getClassName(),de._prepareToStringify(t)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,n,r){var i=[];n&&this._isMatch(t)&&i.push(this);for(var o=this.parent;o;){if(o===r)return i;o._isMatch(t)&&i.push(o),o=o.parent}return i}isAncestorOf(t){return!1}findAncestor(t,n,r){return this.findAncestors(t,n,r)[0]}_isMatch(t){if(!t)return!1;if(typeof t=="function")return t(this);var n=t.replace(/ /g,"").split(","),r=n.length,i,o;for(i=0;i{try{const i=t==null?void 0:t.callback;i&&delete t.callback,de._urlToImage(this.toDataURL(t),function(o){n(o),i==null||i(o)})}catch(i){r(i)}})}toBlob(t){return new Promise((n,r)=>{try{const i=t==null?void 0:t.callback;i&&delete t.callback,this.toCanvas(t).toBlob(o=>{n(o),i==null||i(o)})}catch(i){r(i)}})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():pt.dragDistance}_off(t,n,r){var i=this.eventListeners[t],o,a,s;for(o=0;o=0;if(r&&!this.isDragging()){var i=!1;vn._dragElements.forEach(o=>{this.isAncestorOf(o.node)&&(i=!0)}),i||this._createDragElement(t)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{this._dragCleanup();var t=this.getStage();if(!t)return;const n=vn._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",i=n&&n.dragStatus==="ready";r?this.stopDrag():i&&vn._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){const n=this.getStage();if(!n)return!1;const r={x:-t.x,y:-t.y,width:n.width()+2*t.x,height:n.height()+2*t.y};return de.haveIntersection(r,this.getClientRect())}static create(t,n){return de._isString(t)&&(t=JSON.parse(t)),this._createNode(t,n)}static _createNode(t,n){var r=k8.prototype.getClassName.call(t),i=t.children,o,a,s;n&&(t.attrs.container=n),pt[r]||(de.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const l=pt[r];if(o=new l(t.attrs),i)for(a=i.length,s=0;s0}removeChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.destroy()}),this.children=[],this._requestDraw(),this}add(...t){if(arguments.length>1){for(var n=0;n0?n[0]:void 0}_generalFind(t,n){var r=[];return this._descendants(i=>{const o=i._isMatch(t);return o&&r.push(i),!!(o&&n)}),r}_descendants(t){let n=!1;const r=this.getChildren();for(const i of r){if(n=t(i),n)return!0;if(i.hasChildren()&&(n=i._descendants(t),n))return!0}return!1}toObject(){var t=Xe.prototype.toObject.call(this);return t.children=[],this.getChildren().forEach(n=>{t.children.push(n.toObject())}),t}isAncestorOf(t){for(var n=t.getParent();n;){if(n._id===this._id)return!0;n=n.getParent()}return!1}clone(t){var n=Xe.prototype.clone.call(this,t);return this.getChildren().forEach(function(r){n.add(r.clone())}),n}getAllIntersections(t){var n=[];return this.find("Shape").forEach(function(r){r.isVisible()&&r.intersects(t)&&n.push(r)}),n}_clearSelfAndDescendantCache(t){var n;super._clearSelfAndDescendantCache(t),!this.isCached()&&((n=this.children)===null||n===void 0||n.forEach(function(r){r._clearSelfAndDescendantCache(t)}))}_setChildrenIndices(){var t;(t=this.children)===null||t===void 0||t.forEach(function(n,r){n.index=r}),this._requestDraw()}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas(),o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.scene,l=i&&i.isCache;if(!this.isVisible()&&!l)return this;if(s){o.save();var u=this.getAbsoluteTransform(n).getMatrix();o.transform(u[0],u[1],u[2],u[3],u[4],u[5]),this._drawCachedSceneCanvas(o),o.restore()}else this._drawChildren("drawScene",i,n);return this}drawHit(t,n){if(!this.shouldDrawHit(n))return this;var r=this.getLayer(),i=t||r&&r.hitCanvas,o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.hit;if(s){o.save();var l=this.getAbsoluteTransform(n).getMatrix();o.transform(l[0],l[1],l[2],l[3],l[4],l[5]),this._drawCachedHitCanvas(o),o.restore()}else this._drawChildren("drawHit",i,n);return this}_drawChildren(t,n,r){var i,o=n&&n.getContext(),a=this.clipWidth(),s=this.clipHeight(),l=this.clipFunc(),u=a&&s||l;const d=r===this;if(u){o.save();var h=this.getAbsoluteTransform(r),m=h.getMatrix();if(o.transform(m[0],m[1],m[2],m[3],m[4],m[5]),o.beginPath(),l)l.call(this,o,this);else{var v=this.clipX(),b=this.clipY();o.rect(v,b,a,s)}o.clip(),m=h.copy().invert().getMatrix(),o.transform(m[0],m[1],m[2],m[3],m[4],m[5])}var S=!d&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";S&&(o.save(),o._applyGlobalCompositeOperation(this)),(i=this.children)===null||i===void 0||i.forEach(function(k){k[t](n,r)}),S&&o.restore(),u&&o.restore()}getClientRect(t){var n;t=t||{};var r=t.skipTransform,i=t.relativeTo,o,a,s,l,u={x:1/0,y:1/0,width:0,height:0},d=this;(n=this.children)===null||n===void 0||n.forEach(function(S){if(S.visible()){var k=S.getClientRect({relativeTo:d,skipShadow:t.skipShadow,skipStroke:t.skipStroke});k.width===0&&k.height===0||(o===void 0?(o=k.x,a=k.y,s=k.x+k.width,l=k.y+k.height):(o=Math.min(o,k.x),a=Math.min(a,k.y),s=Math.max(s,k.x+k.width),l=Math.max(l,k.y+k.height)))}});for(var h=this.find("Shape"),m=!1,v=0;ve.indexOf("pointer")>=0?"pointer":e.indexOf("touch")>=0?"touch":"mouse",Rg=e=>{const t=Ov(e);if(t==="pointer")return pt.pointerEventsEnabled&&TC.pointer;if(t==="touch")return TC.touch;if(t==="mouse")return TC.mouse};function YR(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&de.warn("Stage does not support clipping. Please use clip for Layers or Groups."),e}const Y7e="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);",z4=[];let Vx=class extends Aa{constructor(t){super(YR(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),z4.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{YR(this.attrs)}),this._checkVisibility()}_validateAdd(t){const n=t.getType()==="Layer",r=t.getType()==="FastLayer";n||r||de.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const t=this.visible()?"":"none";this.content.style.display=t}setContainer(t){if(typeof t===V7e){if(t.charAt(0)==="."){var n=t.slice(1);t=document.getElementsByClassName(n)[0]}else{var r;t.charAt(0)!=="#"?r=t:r=t.slice(1),t=document.getElementById(r)}if(!t)throw"Can not find container in document with id "+r}return this._setAttr("container",t),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),t.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var t=this.children,n=t.length,r;for(r=0;r-1&&z4.splice(n,1),de.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){const t=this._pointerPositions[0]||this._changedPointerPositions[0];return t?{x:t.x,y:t.y}:(de.warn(Y7e),null)}_getPointerById(t){return this._pointerPositions.find(n=>n.id===t)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(t){t=t||{},t.x=t.x||0,t.y=t.y||0,t.width=t.width||this.width(),t.height=t.height||this.height();var n=new $m({width:t.width,height:t.height,pixelRatio:t.pixelRatio||1}),r=n.getContext()._context,i=this.children;return(t.x||t.y)&&r.translate(-1*t.x,-1*t.y),i.forEach(function(o){if(o.isVisible()){var a=o._toKonvaCanvas(t);r.drawImage(a._canvas,t.x,t.y,a.getWidth()/a.getPixelRatio(),a.getHeight()/a.getPixelRatio())}}),n}getIntersection(t){if(!t)return null;var n=this.children,r=n.length,i=r-1,o;for(o=i;o>=0;o--){const a=n[o].getIntersection(t);if(a)return a}return null}_resizeDOM(){var t=this.width(),n=this.height();this.content&&(this.content.style.width=t+qR,this.content.style.height=n+qR),this.bufferCanvas.setSize(t,n),this.bufferHitCanvas.setSize(t,n),this.children.forEach(r=>{r.setSize({width:t,height:n}),r.draw()})}add(t,...n){if(arguments.length>1){for(var r=0;rG7e&&de.warn("The stage has "+i+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),t.setSize({width:this.width(),height:this.height()}),t.draw(),pt.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return uG(t,this)}setPointerCapture(t){cG(t,this)}releaseCapture(t){a2(t)}getLayers(){return this.children}_bindContentEvents(){pt.isBrowser&&q7e.forEach(([t,n])=>{this.content.addEventListener(t,r=>{this[n](r)},{passive:!1})})}_pointerenter(t){this.setPointersPositions(t);const n=Rg(t.type);this._fire(n.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);const n=Rg(t.type);this._fire(n.pointerover,{evt:t,target:this,currentTarget:this})}_getTargetShape(t){let n=this[t+"targetShape"];return n&&!n.getStage()&&(n=null),n}_pointerleave(t){const n=Rg(t.type),r=Ov(t.type);if(n){this.setPointersPositions(t);var i=this._getTargetShape(r),o=!vn.isDragging||pt.hitOnDragEnabled;i&&o?(i._fireAndBubble(n.pointerout,{evt:t}),i._fireAndBubble(n.pointerleave,{evt:t}),this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this[r+"targetShape"]=null):o&&(this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this._fire(n.pointerout,{evt:t,target:this,currentTarget:this})),this.pointerPos=void 0,this._pointerPositions=[]}}_pointerdown(t){const n=Rg(t.type),r=Ov(t.type);if(n){this.setPointersPositions(t);var i=!1;this._changedPointerPositions.forEach(o=>{var a=this.getIntersection(o);if(vn.justDragged=!1,pt["_"+r+"ListenClick"]=!0,!(a&&a.isListening()))return;pt.capturePointerEventsEnabled&&a.setPointerCapture(o.id),this[r+"ClickStartShape"]=a,a._fireAndBubble(n.pointerdown,{evt:t,pointerId:o.id}),i=!0;const l=t.type.indexOf("touch")>=0;a.preventDefault()&&t.cancelable&&l&&t.preventDefault()}),i||this._fire(n.pointerdown,{evt:t,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(t){const n=Rg(t.type),r=Ov(t.type);if(!n)return;vn.isDragging&&vn.node.preventDefault()&&t.cancelable&&t.preventDefault(),this.setPointersPositions(t);var i=!vn.isDragging||pt.hitOnDragEnabled;if(!i)return;var o={};let a=!1;var s=this._getTargetShape(r);this._changedPointerPositions.forEach(l=>{const u=PC(l.id)||this.getIntersection(l),d=l.id,h={evt:t,pointerId:d};var m=s!==u;if(m&&s&&(s._fireAndBubble(n.pointerout,Object.assign({},h),u),s._fireAndBubble(n.pointerleave,Object.assign({},h),u)),u){if(o[u._id])return;o[u._id]=!0}u&&u.isListening()?(a=!0,m&&(u._fireAndBubble(n.pointerover,Object.assign({},h),s),u._fireAndBubble(n.pointerenter,Object.assign({},h),s),this[r+"targetShape"]=u),u._fireAndBubble(n.pointermove,Object.assign({},h))):s&&(this._fire(n.pointerover,{evt:t,target:this,currentTarget:this,pointerId:d}),this[r+"targetShape"]=null)}),a||this._fire(n.pointermove,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(t){const n=Rg(t.type),r=Ov(t.type);if(!n)return;this.setPointersPositions(t);const i=this[r+"ClickStartShape"],o=this[r+"ClickEndShape"];var a={};let s=!1;this._changedPointerPositions.forEach(l=>{const u=PC(l.id)||this.getIntersection(l);if(u){if(u.releaseCapture(l.id),a[u._id])return;a[u._id]=!0}const d=l.id,h={evt:t,pointerId:d};let m=!1;pt["_"+r+"InDblClickWindow"]?(m=!0,clearTimeout(this[r+"DblTimeout"])):vn.justDragged||(pt["_"+r+"InDblClickWindow"]=!0,clearTimeout(this[r+"DblTimeout"])),this[r+"DblTimeout"]=setTimeout(function(){pt["_"+r+"InDblClickWindow"]=!1},pt.dblClickWindow),u&&u.isListening()?(s=!0,this[r+"ClickEndShape"]=u,u._fireAndBubble(n.pointerup,Object.assign({},h)),pt["_"+r+"ListenClick"]&&i&&i===u&&(u._fireAndBubble(n.pointerclick,Object.assign({},h)),m&&o&&o===u&&u._fireAndBubble(n.pointerdblclick,Object.assign({},h)))):(this[r+"ClickEndShape"]=null,pt["_"+r+"ListenClick"]&&this._fire(n.pointerclick,{evt:t,target:this,currentTarget:this,pointerId:d}),m&&this._fire(n.pointerdblclick,{evt:t,target:this,currentTarget:this,pointerId:d}))}),s||this._fire(n.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),pt["_"+r+"ListenClick"]=!1,t.cancelable&&r!=="touch"&&t.preventDefault()}_contextmenu(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(E8,{evt:t}):this._fire(E8,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(P8,{evt:t}):this._fire(P8,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);const n=PC(t.pointerId)||this.getIntersection(this.getPointerPosition());n&&n._fireAndBubble(um,vP(t)),a2(t.pointerId)}_lostpointercapture(t){a2(t.pointerId)}setPointersPositions(t){var n=this._getContentPosition(),r=null,i=null;t=t||window.event,t.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(t.touches,o=>{this._pointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})}),Array.prototype.forEach.call(t.changedTouches||t.touches,o=>{this._changedPointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})})):(r=(t.clientX-n.left)/n.scaleX,i=(t.clientY-n.top)/n.scaleY,this.pointerPos={x:r,y:i},this._pointerPositions=[{x:r,y:i,id:de._getFirstPointerId(t)}],this._changedPointerPositions=[{x:r,y:i,id:de._getFirstPointerId(t)}])}_setPointerPosition(t){de.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(t)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var t=this.content.getBoundingClientRect();return{top:t.top,left:t.left,scaleX:t.width/this.content.clientWidth||1,scaleY:t.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new $m({width:this.width(),height:this.height()}),this.bufferHitCanvas=new mP({pixelRatio:1,width:this.width(),height:this.height()}),!!pt.isBrowser){var t=this.container();if(!t)throw"Stage has no container. A container is required.";t.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),t.appendChild(this.content),this._resizeDOM()}}cache(){return de.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(t){t.batchDraw()}),this}};Vx.prototype.nodeType=H7e;Ar(Vx);ee.addGetterSetter(Vx,"container");var xG="hasShadow",wG="shadowRGBA",CG="patternImage",_G="linearGradient",kG="radialGradient";let Bb;function LC(){return Bb||(Bb=de.createCanvasElement().getContext("2d"),Bb)}const s2={};function K7e(e){e.fill()}function X7e(e){e.stroke()}function Z7e(e){e.fill()}function Q7e(e){e.stroke()}function J7e(){this._clearCache(xG)}function e9e(){this._clearCache(wG)}function t9e(){this._clearCache(CG)}function n9e(){this._clearCache(_G)}function r9e(){this._clearCache(kG)}class Be extends Xe{constructor(t){super(t);let n;for(;n=de.getRandomColor(),!(n&&!(n in s2)););this.colorKey=n,s2[n]=this}getContext(){return de.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return de.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(xG,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(CG,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var t=LC();const n=t.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(n&&n.setTransform){const r=new ka;r.translate(this.fillPatternX(),this.fillPatternY()),r.rotate(pt.getAngle(this.fillPatternRotation())),r.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),r.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const i=r.getMatrix(),o=typeof DOMMatrix>"u"?{a:i[0],b:i[1],c:i[2],d:i[3],e:i[4],f:i[5]}:new DOMMatrix(i);n.setTransform(o)}return n}}_getLinearGradient(){return this._getCache(_G,this.__getLinearGradient)}__getLinearGradient(){var t=this.fillLinearGradientColorStops();if(t){for(var n=LC(),r=this.fillLinearGradientStartPoint(),i=this.fillLinearGradientEndPoint(),o=n.createLinearGradient(r.x,r.y,i.x,i.y),a=0;athis.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const t=this.hitStrokeWidth();return t==="auto"?this.hasStroke():this.strokeEnabled()&&!!t}intersects(t){var n=this.getStage(),r=n.bufferHitCanvas,i;return r.getContext().clear(),this.drawHit(r,null,!0),i=r.context.getImageData(Math.round(t.x),Math.round(t.y),1,1).data,i[3]>0}destroy(){return Xe.prototype.destroy.call(this),delete s2[this.colorKey],delete this.colorKey,this}_useBufferCanvas(t){var n;if(!this.getStage()||!((n=this.attrs.perfectDrawEnabled)!==null&&n!==void 0?n:!0))return!1;const i=t||this.hasFill(),o=this.hasStroke(),a=this.getAbsoluteOpacity()!==1;if(i&&o&&a)return!0;const s=this.hasShadow(),l=this.shadowForStrokeEnabled();return!!(i&&o&&s&&l)}setStrokeHitEnabled(t){de.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),t?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){var t=this.size();return{x:this._centroid?-t.width/2:0,y:this._centroid?-t.height/2:0,width:t.width,height:t.height}}getClientRect(t={}){const n=t.skipTransform,r=t.relativeTo,i=this.getSelfRect(),a=!t.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,s=i.width+a,l=i.height+a,u=!t.skipShadow&&this.hasShadow(),d=u?this.shadowOffsetX():0,h=u?this.shadowOffsetY():0,m=s+Math.abs(d),v=l+Math.abs(h),b=u&&this.shadowBlur()||0,S=m+b*2,k=v+b*2,E={width:S,height:k,x:-(a/2+b)+Math.min(d,0)+i.x,y:-(a/2+b)+Math.min(h,0)+i.y};return n?E:this._transformedRect(E,r)}drawScene(t,n){var r=this.getLayer(),i=t||r.getCanvas(),o=i.getContext(),a=this._getCanvasCache(),s=this.getSceneFunc(),l=this.hasShadow(),u,d,h,m=i.isCache,v=n===this;if(!this.isVisible()&&!v)return this;if(a){o.save();var b=this.getAbsoluteTransform(n).getMatrix();return o.transform(b[0],b[1],b[2],b[3],b[4],b[5]),this._drawCachedSceneCanvas(o),o.restore(),this}if(!s)return this;if(o.save(),this._useBufferCanvas()&&!m){u=this.getStage(),d=u.bufferCanvas,h=d.getContext(),h.clear(),h.save(),h._applyLineJoin(this);var S=this.getAbsoluteTransform(n).getMatrix();h.transform(S[0],S[1],S[2],S[3],S[4],S[5]),s.call(this,h,this),h.restore();var k=d.pixelRatio;l&&o._applyShadow(this),o._applyOpacity(this),o._applyGlobalCompositeOperation(this),o.drawImage(d._canvas,0,0,d.width/k,d.height/k)}else{if(o._applyLineJoin(this),!v){var S=this.getAbsoluteTransform(n).getMatrix();o.transform(S[0],S[1],S[2],S[3],S[4],S[5]),o._applyOpacity(this),o._applyGlobalCompositeOperation(this)}l&&o._applyShadow(this),s.call(this,o,this)}return o.restore(),this}drawHit(t,n,r=!1){if(!this.shouldDrawHit(n,r))return this;var i=this.getLayer(),o=t||i.hitCanvas,a=o&&o.getContext(),s=this.hitFunc()||this.sceneFunc(),l=this._getCanvasCache(),u=l&&l.hit;if(this.colorKey||de.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),u){a.save();var d=this.getAbsoluteTransform(n).getMatrix();return a.transform(d[0],d[1],d[2],d[3],d[4],d[5]),this._drawCachedHitCanvas(a),a.restore(),this}if(!s)return this;if(a.save(),a._applyLineJoin(this),!(this===n)){var m=this.getAbsoluteTransform(n).getMatrix();a.transform(m[0],m[1],m[2],m[3],m[4],m[5])}return s.call(this,a,this),a.restore(),this}drawHitFromCache(t=0){var n=this._getCanvasCache(),r=this._getCachedSceneCanvas(),i=n.hit,o=i.getContext(),a=i.getWidth(),s=i.getHeight(),l,u,d,h,m,v;o.clear(),o.drawImage(r._canvas,0,0,a,s);try{for(l=o.getImageData(0,0,a,s),u=l.data,d=u.length,h=de._hexToRgb(this.colorKey),m=0;mt?(u[m]=h.r,u[m+1]=h.g,u[m+2]=h.b,u[m+3]=255):u[m+3]=0;o.putImageData(l,0,0)}catch(b){de.error("Unable to draw hit graph from cached scene canvas. "+b.message)}return this}hasPointerCapture(t){return uG(t,this)}setPointerCapture(t){cG(t,this)}releaseCapture(t){a2(t)}}Be.prototype._fillFunc=K7e;Be.prototype._strokeFunc=X7e;Be.prototype._fillFuncHit=Z7e;Be.prototype._strokeFuncHit=Q7e;Be.prototype._centroid=!1;Be.prototype.nodeType="Shape";Ar(Be);Be.prototype.eventListeners={};Be.prototype.on.call(Be.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",J7e);Be.prototype.on.call(Be.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",e9e);Be.prototype.on.call(Be.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",t9e);Be.prototype.on.call(Be.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",n9e);Be.prototype.on.call(Be.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",r9e);ee.addGetterSetter(Be,"stroke",void 0,sG());ee.addGetterSetter(Be,"strokeWidth",2,Ge());ee.addGetterSetter(Be,"fillAfterStrokeEnabled",!1);ee.addGetterSetter(Be,"hitStrokeWidth","auto",gP());ee.addGetterSetter(Be,"strokeHitEnabled",!0,nl());ee.addGetterSetter(Be,"perfectDrawEnabled",!0,nl());ee.addGetterSetter(Be,"shadowForStrokeEnabled",!0,nl());ee.addGetterSetter(Be,"lineJoin");ee.addGetterSetter(Be,"lineCap");ee.addGetterSetter(Be,"sceneFunc");ee.addGetterSetter(Be,"hitFunc");ee.addGetterSetter(Be,"dash");ee.addGetterSetter(Be,"dashOffset",0,Ge());ee.addGetterSetter(Be,"shadowColor",void 0,P0());ee.addGetterSetter(Be,"shadowBlur",0,Ge());ee.addGetterSetter(Be,"shadowOpacity",1,Ge());ee.addComponentsGetterSetter(Be,"shadowOffset",["x","y"]);ee.addGetterSetter(Be,"shadowOffsetX",0,Ge());ee.addGetterSetter(Be,"shadowOffsetY",0,Ge());ee.addGetterSetter(Be,"fillPatternImage");ee.addGetterSetter(Be,"fill",void 0,sG());ee.addGetterSetter(Be,"fillPatternX",0,Ge());ee.addGetterSetter(Be,"fillPatternY",0,Ge());ee.addGetterSetter(Be,"fillLinearGradientColorStops");ee.addGetterSetter(Be,"strokeLinearGradientColorStops");ee.addGetterSetter(Be,"fillRadialGradientStartRadius",0);ee.addGetterSetter(Be,"fillRadialGradientEndRadius",0);ee.addGetterSetter(Be,"fillRadialGradientColorStops");ee.addGetterSetter(Be,"fillPatternRepeat","repeat");ee.addGetterSetter(Be,"fillEnabled",!0);ee.addGetterSetter(Be,"strokeEnabled",!0);ee.addGetterSetter(Be,"shadowEnabled",!0);ee.addGetterSetter(Be,"dashEnabled",!0);ee.addGetterSetter(Be,"strokeScaleEnabled",!0);ee.addGetterSetter(Be,"fillPriority","color");ee.addComponentsGetterSetter(Be,"fillPatternOffset",["x","y"]);ee.addGetterSetter(Be,"fillPatternOffsetX",0,Ge());ee.addGetterSetter(Be,"fillPatternOffsetY",0,Ge());ee.addComponentsGetterSetter(Be,"fillPatternScale",["x","y"]);ee.addGetterSetter(Be,"fillPatternScaleX",1,Ge());ee.addGetterSetter(Be,"fillPatternScaleY",1,Ge());ee.addComponentsGetterSetter(Be,"fillLinearGradientStartPoint",["x","y"]);ee.addComponentsGetterSetter(Be,"strokeLinearGradientStartPoint",["x","y"]);ee.addGetterSetter(Be,"fillLinearGradientStartPointX",0);ee.addGetterSetter(Be,"strokeLinearGradientStartPointX",0);ee.addGetterSetter(Be,"fillLinearGradientStartPointY",0);ee.addGetterSetter(Be,"strokeLinearGradientStartPointY",0);ee.addComponentsGetterSetter(Be,"fillLinearGradientEndPoint",["x","y"]);ee.addComponentsGetterSetter(Be,"strokeLinearGradientEndPoint",["x","y"]);ee.addGetterSetter(Be,"fillLinearGradientEndPointX",0);ee.addGetterSetter(Be,"strokeLinearGradientEndPointX",0);ee.addGetterSetter(Be,"fillLinearGradientEndPointY",0);ee.addGetterSetter(Be,"strokeLinearGradientEndPointY",0);ee.addComponentsGetterSetter(Be,"fillRadialGradientStartPoint",["x","y"]);ee.addGetterSetter(Be,"fillRadialGradientStartPointX",0);ee.addGetterSetter(Be,"fillRadialGradientStartPointY",0);ee.addComponentsGetterSetter(Be,"fillRadialGradientEndPoint",["x","y"]);ee.addGetterSetter(Be,"fillRadialGradientEndPointX",0);ee.addGetterSetter(Be,"fillRadialGradientEndPointY",0);ee.addGetterSetter(Be,"fillPatternRotation",0);ee.backCompat(Be,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});var i9e="#",o9e="beforeDraw",a9e="draw",EG=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],s9e=EG.length;let dp=class extends Aa{constructor(t){super(t),this.canvas=new $m,this.hitCanvas=new mP({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}setZIndex(t){super.setZIndex(t);var n=this.getStage();return n&&n.content&&(n.content.removeChild(this.getNativeCanvasElement()),t{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;for(var n=1,r=!1;;){for(let i=0;i0)return{antialiased:!0};return{}}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas();return this._fire(o9e,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),Aa.prototype.drawScene.call(this,i,n),this._fire(a9e,{node:this}),this}drawHit(t,n){var r=this.getLayer(),i=t||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),Aa.prototype.drawHit.call(this,i,n),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){de.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return de.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!(!this.parent||!this.parent.content)){var t=this.parent,n=!!this.hitCanvas._canvas.parentNode;n?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}}destroy(){return de.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}};dp.prototype.nodeType="Layer";Ar(dp);ee.addGetterSetter(dp,"imageSmoothingEnabled",!0);ee.addGetterSetter(dp,"clearBeforeDraw",!0);ee.addGetterSetter(dp,"hitGraphEnabled",!0,nl());class yP extends dp{constructor(t){super(t),this.listening(!1),de.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}yP.prototype.nodeType="FastLayer";Ar(yP);let i0=class extends Aa{_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&de.throw("You may only add groups and shapes to groups.")}};i0.prototype.nodeType="Group";Ar(i0);var AC=function(){return Fm.performance&&Fm.performance.now?function(){return Fm.performance.now()}:function(){return new Date().getTime()}}();class ts{constructor(t,n){this.id=ts.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:AC(),frameRate:0},this.func=t,this.setLayers(n)}setLayers(t){var n=[];return t?t.length>0?n=t:n=[t]:n=[],this.layers=n,this}getLayers(){return this.layers}addLayer(t){var n=this.layers,r=n.length,i;for(i=0;ithis.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():t<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=t,this.update())}getTime(){return this._time}setPosition(t){this.prevPos=this._pos,this.propFunc(t),this._pos=t}getPosition(t){return t===void 0&&(t=this._time),this.func(t,this.begin,this._change,this.duration)}play(){this.state=KR,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=XR,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(t){this.pause(),this._time=t,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){var t=this.getTimer()-this._startTime;this.state===KR?this.setTime(t):this.state===XR&&this.setTime(this.duration-t)}pause(){this.state=u9e,this.fire("onPause")}getTimer(){return new Date().getTime()}}class Xr{constructor(t){var n=this,r=t.node,i=r._id,o,a=t.easing||l2.Linear,s=!!t.yoyo,l;typeof t.duration>"u"?o=.3:t.duration===0?o=.001:o=t.duration,this.node=r,this._id=c9e++;var u=r.getLayer()||(r instanceof pt.Stage?r.getLayers():null);u||de.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new ts(function(){n.tween.onEnterFrame()},u),this.tween=new d9e(l,function(d){n._tweenFunc(d)},a,0,1,o*1e3,s),this._addListeners(),Xr.attrs[i]||(Xr.attrs[i]={}),Xr.attrs[i][this._id]||(Xr.attrs[i][this._id]={}),Xr.tweens[i]||(Xr.tweens[i]={});for(l in t)l9e[l]===void 0&&this._addAttr(l,t[l]);this.reset(),this.onFinish=t.onFinish,this.onReset=t.onReset,this.onUpdate=t.onUpdate}_addAttr(t,n){var r=this.node,i=r._id,o,a,s,l,u,d,h,m;if(s=Xr.tweens[i][t],s&&delete Xr.attrs[i][s][t],o=r.getAttr(t),de._isArray(n))if(a=[],u=Math.max(n.length,o.length),t==="points"&&n.length!==o.length&&(n.length>o.length?(h=o,o=de._prepareArrayForTween(o,n,r.closed())):(d=n,n=de._prepareArrayForTween(n,o,r.closed()))),t.indexOf("fill")===0)for(l=0;l{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var t=this.node,n=Xr.attrs[t._id][this._id];n.points&&n.points.trueEnd&&t.setAttr("points",n.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var t=this.node,n=Xr.attrs[t._id][this._id];n.points&&n.points.trueStart&&t.points(n.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(t){return this.tween.seek(t*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var t=this.node._id,n=this._id,r=Xr.tweens[t],i;this.pause();for(i in r)delete Xr.tweens[t][i];delete Xr.attrs[t][n]}}Xr.attrs={};Xr.tweens={};Xe.prototype.to=function(e){var t=e.onFinish;e.node=this,e.onFinish=function(){this.destroy(),t&&t()};var n=new Xr(e);n.play()};const l2={BackEaseIn(e,t,n,r){var i=1.70158;return n*(e/=r)*e*((i+1)*e-i)+t},BackEaseOut(e,t,n,r){var i=1.70158;return n*((e=e/r-1)*e*((i+1)*e+i)+1)+t},BackEaseInOut(e,t,n,r){var i=1.70158;return(e/=r/2)<1?n/2*(e*e*(((i*=1.525)+1)*e-i))+t:n/2*((e-=2)*e*(((i*=1.525)+1)*e+i)+2)+t},ElasticEaseIn(e,t,n,r,i,o){var a=0;return e===0?t:(e/=r)===1?t+n:(o||(o=r*.3),!i||i0?t:n),d=a*n,h=s*(s>0?t:n),m=l*(l>0?n:t);return{x:u,y:r?-1*m:h,width:d-u,height:m-h}}}cc.prototype._centroid=!0;cc.prototype.className="Arc";cc.prototype._attrsAffectingSize=["innerRadius","outerRadius"];Ar(cc);ee.addGetterSetter(cc,"innerRadius",0,Ge());ee.addGetterSetter(cc,"outerRadius",0,Ge());ee.addGetterSetter(cc,"angle",0,Ge());ee.addGetterSetter(cc,"clockwise",!1,nl());function T8(e,t,n,r,i,o,a){var s=Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2)),l=Math.sqrt(Math.pow(i-n,2)+Math.pow(o-r,2)),u=a*s/(s+l),d=a*l/(s+l),h=n-u*(i-e),m=r-u*(o-t),v=n+d*(i-e),b=r+d*(o-t);return[h,m,v,b]}function QR(e,t){var n=e.length,r=[],i,o;for(i=2;i4){for(s=this.getTensionPoints(),l=s.length,u=o?0:4,o||t.quadraticCurveTo(s[0],s[1],s[2],s[3]);ud?u:d,k=u>d?1:u/d,E=u>d?d/u:1;t.translate(s,l),t.rotate(v),t.scale(k,E),t.arc(0,0,S,h,h+m,1-b),t.scale(1/k,1/E),t.rotate(-v),t.translate(-s,-l);break;case"z":r=!0,t.closePath();break}}!r&&!this.hasFill()?t.strokeShape(this):t.fillStrokeShape(this)}getSelfRect(){var t=[];this.dataArray.forEach(function(u){if(u.command==="A"){var d=u.points[4],h=u.points[5],m=u.points[4]+h,v=Math.PI/180;if(Math.abs(d-m)m;b-=v){const S=Hn.getPointOnEllipticalArc(u.points[0],u.points[1],u.points[2],u.points[3],b,0);t.push(S.x,S.y)}else for(let b=d+v;bthis.dataArray[r].pathLength;)t-=this.dataArray[r].pathLength,++r;if(r===i)return n=this.dataArray[r-1].points.slice(-2),{x:n[0],y:n[1]};if(t<.01)return n=this.dataArray[r].points.slice(0,2),{x:n[0],y:n[1]};var o=this.dataArray[r],a=o.points;switch(o.command){case"L":return Hn.getPointOnLine(t,o.start.x,o.start.y,a[0],a[1]);case"C":return Hn.getPointOnCubicBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3],a[4],a[5]);case"Q":return Hn.getPointOnQuadraticBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3]);case"A":var s=a[0],l=a[1],u=a[2],d=a[3],h=a[4],m=a[5],v=a[6];return h+=m*t/o.pathLength,Hn.getPointOnEllipticalArc(s,l,u,d,h,v)}return null}static getLineLength(t,n,r,i){return Math.sqrt((r-t)*(r-t)+(i-n)*(i-n))}static getPointOnLine(t,n,r,i,o,a,s){a===void 0&&(a=n),s===void 0&&(s=r);var l=(o-r)/(i-n+1e-8),u=Math.sqrt(t*t/(1+l*l));i0&&!isNaN(b[0]);){var _=null,T=[],A=l,I=u,R,D,j,z,V,K,te,q,F,U;switch(v){case"l":l+=b.shift(),u+=b.shift(),_="L",T.push(l,u);break;case"L":l=b.shift(),u=b.shift(),T.push(l,u);break;case"m":var X=b.shift(),Z=b.shift();if(l+=X,u+=Z,_="M",a.length>2&&a[a.length-1].command==="z"){for(var W=a.length-2;W>=0;W--)if(a[W].command==="M"){l=a[W].points[0]+X,u=a[W].points[1]+Z;break}}T.push(l,u),v="l";break;case"M":l=b.shift(),u=b.shift(),_="M",T.push(l,u),v="L";break;case"h":l+=b.shift(),_="L",T.push(l,u);break;case"H":l=b.shift(),_="L",T.push(l,u);break;case"v":u+=b.shift(),_="L",T.push(l,u);break;case"V":u=b.shift(),_="L",T.push(l,u);break;case"C":T.push(b.shift(),b.shift(),b.shift(),b.shift()),l=b.shift(),u=b.shift(),T.push(l,u);break;case"c":T.push(l+b.shift(),u+b.shift(),l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),_="C",T.push(l,u);break;case"S":D=l,j=u,R=a[a.length-1],R.command==="C"&&(D=l+(l-R.points[2]),j=u+(u-R.points[3])),T.push(D,j,b.shift(),b.shift()),l=b.shift(),u=b.shift(),_="C",T.push(l,u);break;case"s":D=l,j=u,R=a[a.length-1],R.command==="C"&&(D=l+(l-R.points[2]),j=u+(u-R.points[3])),T.push(D,j,l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),_="C",T.push(l,u);break;case"Q":T.push(b.shift(),b.shift()),l=b.shift(),u=b.shift(),T.push(l,u);break;case"q":T.push(l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),_="Q",T.push(l,u);break;case"T":D=l,j=u,R=a[a.length-1],R.command==="Q"&&(D=l+(l-R.points[0]),j=u+(u-R.points[1])),l=b.shift(),u=b.shift(),_="Q",T.push(D,j,l,u);break;case"t":D=l,j=u,R=a[a.length-1],R.command==="Q"&&(D=l+(l-R.points[0]),j=u+(u-R.points[1])),l+=b.shift(),u+=b.shift(),_="Q",T.push(D,j,l,u);break;case"A":z=b.shift(),V=b.shift(),K=b.shift(),te=b.shift(),q=b.shift(),F=l,U=u,l=b.shift(),u=b.shift(),_="A",T=this.convertEndpointToCenterParameterization(F,U,l,u,te,q,z,V,K);break;case"a":z=b.shift(),V=b.shift(),K=b.shift(),te=b.shift(),q=b.shift(),F=l,U=u,l+=b.shift(),u+=b.shift(),_="A",T=this.convertEndpointToCenterParameterization(F,U,l,u,te,q,z,V,K);break}a.push({command:_||v,points:T,start:{x:A,y:I},pathLength:this.calcLength(A,I,_||v,T)})}(v==="z"||v==="Z")&&a.push({command:"z",points:[],start:void 0,pathLength:0})}return a}static calcLength(t,n,r,i){var o,a,s,l,u=Hn;switch(r){case"L":return u.getLineLength(t,n,i[0],i[1]);case"C":for(o=0,a=u.getPointOnCubicBezier(0,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),l=.01;l<=1;l+=.01)s=u.getPointOnCubicBezier(l,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"Q":for(o=0,a=u.getPointOnQuadraticBezier(0,t,n,i[0],i[1],i[2],i[3]),l=.01;l<=1;l+=.01)s=u.getPointOnQuadraticBezier(l,t,n,i[0],i[1],i[2],i[3]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"A":o=0;var d=i[4],h=i[5],m=i[4]+h,v=Math.PI/180;if(Math.abs(d-m)m;l-=v)s=u.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],l,0),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;else for(l=d+v;l1&&(s*=Math.sqrt(v),l*=Math.sqrt(v));var b=Math.sqrt((s*s*(l*l)-s*s*(m*m)-l*l*(h*h))/(s*s*(m*m)+l*l*(h*h)));o===a&&(b*=-1),isNaN(b)&&(b=0);var S=b*s*m/l,k=b*-l*h/s,E=(t+r)/2+Math.cos(d)*S-Math.sin(d)*k,_=(n+i)/2+Math.sin(d)*S+Math.cos(d)*k,T=function(V){return Math.sqrt(V[0]*V[0]+V[1]*V[1])},A=function(V,K){return(V[0]*K[0]+V[1]*K[1])/(T(V)*T(K))},I=function(V,K){return(V[0]*K[1]=1&&(z=0),a===0&&z>0&&(z=z-2*Math.PI),a===1&&z<0&&(z=z+2*Math.PI),[E,_,s,l,R,z,d,a]}}Hn.prototype.className="Path";Hn.prototype._attrsAffectingSize=["data"];Ar(Hn);ee.addGetterSetter(Hn,"data");class fp extends dc{_sceneFunc(t){super._sceneFunc(t);var n=Math.PI*2,r=this.points(),i=r,o=this.tension()!==0&&r.length>4;o&&(i=this.getTensionPoints());var a=this.pointerLength(),s=r.length,l,u;if(o){const m=[i[i.length-4],i[i.length-3],i[i.length-2],i[i.length-1],r[s-2],r[s-1]],v=Hn.calcLength(i[i.length-4],i[i.length-3],"C",m),b=Hn.getPointOnQuadraticBezier(Math.min(1,1-a/v),m[0],m[1],m[2],m[3],m[4],m[5]);l=r[s-2]-b.x,u=r[s-1]-b.y}else l=r[s-2]-r[s-4],u=r[s-1]-r[s-3];var d=(Math.atan2(u,l)+n)%n,h=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(r[s-2],r[s-1]),t.rotate(d),t.moveTo(0,0),t.lineTo(-a,h/2),t.lineTo(-a,-h/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(r[0],r[1]),o?(l=(i[0]+i[2])/2-r[0],u=(i[1]+i[3])/2-r[1]):(l=r[2]-r[0],u=r[3]-r[1]),t.rotate((Math.atan2(-u,-l)+n)%n),t.moveTo(0,0),t.lineTo(-a,h/2),t.lineTo(-a,-h/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){var n=this.dashEnabled();n&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),n&&(this.attrs.dashEnabled=!0)}getSelfRect(){const t=super.getSelfRect(),n=this.pointerWidth()/2;return{x:t.x-n,y:t.y-n,width:t.width+n*2,height:t.height+n*2}}}fp.prototype.className="Arrow";Ar(fp);ee.addGetterSetter(fp,"pointerLength",10,Ge());ee.addGetterSetter(fp,"pointerWidth",10,Ge());ee.addGetterSetter(fp,"pointerAtBeginning",!1);ee.addGetterSetter(fp,"pointerAtEnding",!0);let T0=class extends Be{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius()!==t/2&&this.radius(t/2)}setHeight(t){this.radius()!==t/2&&this.radius(t/2)}};T0.prototype._centroid=!0;T0.prototype.className="Circle";T0.prototype._attrsAffectingSize=["radius"];Ar(T0);ee.addGetterSetter(T0,"radius",0,Ge());class ff extends Be{_sceneFunc(t){var n=this.radiusX(),r=this.radiusY();t.beginPath(),t.save(),n!==r&&t.scale(1,r/n),t.arc(0,0,n,0,Math.PI*2,!1),t.restore(),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(t){this.radiusX(t/2)}setHeight(t){this.radiusY(t/2)}}ff.prototype.className="Ellipse";ff.prototype._centroid=!0;ff.prototype._attrsAffectingSize=["radiusX","radiusY"];Ar(ff);ee.addComponentsGetterSetter(ff,"radius",["x","y"]);ee.addGetterSetter(ff,"radiusX",0,Ge());ee.addGetterSetter(ff,"radiusY",0,Ge());let fc=class PG extends Be{constructor(t){super(t),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&t.readyState===4||t&&t.addEventListener&&t.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(t){const n=this.getWidth(),r=this.getHeight(),i=this.attrs.image;let o;if(i){const a=this.attrs.cropWidth,s=this.attrs.cropHeight;a&&s?o=[i,this.cropX(),this.cropY(),a,s,0,0,n,r]:o=[i,0,0,n,r]}(this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)),i&&t.drawImage.apply(t,o)}_hitFunc(t){var n=this.width(),r=this.height();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,n;return(t=this.attrs.width)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.width}getHeight(){var t,n;return(t=this.attrs.height)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.height}static fromURL(t,n,r=null){var i=de.createImageElement();i.onload=function(){var o=new PG({image:i});n(o)},i.onerror=r,i.crossOrigin="Anonymous",i.src=t}};fc.prototype.className="Image";Ar(fc);ee.addGetterSetter(fc,"image");ee.addComponentsGetterSetter(fc,"crop",["x","y","width","height"]);ee.addGetterSetter(fc,"cropX",0,Ge());ee.addGetterSetter(fc,"cropY",0,Ge());ee.addGetterSetter(fc,"cropWidth",0,Ge());ee.addGetterSetter(fc,"cropHeight",0,Ge());var TG=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],f9e="Change.konva",h9e="none",L8="up",A8="right",O8="down",M8="left",p9e=TG.length;class bP extends i0{constructor(t){super(t),this.on("add.konva",function(n){this._addListeners(n.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(t){var n=this,r,i=function(){n._sync()};for(r=0;r{n=Math.min(n,a.x),r=Math.max(r,a.x),i=Math.min(i,a.y),o=Math.max(o,a.y)}),{x:n,y:i,width:r-n,height:o-i}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}pp.prototype.className="RegularPolygon";pp.prototype._centroid=!0;pp.prototype._attrsAffectingSize=["radius"];Ar(pp);ee.addGetterSetter(pp,"radius",0,Ge());ee.addGetterSetter(pp,"sides",0,Ge());var JR=Math.PI*2;class gp extends Be{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,JR,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),JR,0,!0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}gp.prototype.className="Ring";gp.prototype._centroid=!0;gp.prototype._attrsAffectingSize=["innerRadius","outerRadius"];Ar(gp);ee.addGetterSetter(gp,"innerRadius",0,Ge());ee.addGetterSetter(gp,"outerRadius",0,Ge());class gu extends Be{constructor(t){super(t),this._updated=!0,this.anim=new ts(()=>{var n=this._updated;return this._updated=!1,n}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){this.anim.isRunning()&&(clearInterval(this.interval),this._setInterval())})}_sceneFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+0],l=o[i+1],u=o[i+2],d=o[i+3],h=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,u,d),t.closePath(),t.fillStrokeShape(this)),h)if(a){var m=a[n],v=r*2;t.drawImage(h,s,l,u,d,m[v+0],m[v+1],u,d)}else t.drawImage(h,s,l,u,d,0,0,u,d)}_hitFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+2],l=o[i+3];if(t.beginPath(),a){var u=a[n],d=r*2;t.rect(u[d+0],u[d+1],s,l)}else t.rect(0,0,s,l);t.closePath(),t.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var t=this;this.interval=setInterval(function(){t._updateIndex()},1e3/this.frameRate())}start(){if(!this.isRunning()){var t=this.getLayer();this.anim.setLayers(t),this._setInterval(),this.anim.start()}}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){var t=this.frameIndex(),n=this.animation(),r=this.animations(),i=r[n],o=i.length/4;t{t=t.trim();const n=t.indexOf(" ")>=0,r=t.indexOf('"')>=0||t.indexOf("'")>=0;return n&&!r&&(t=`"${t}"`),t}).join(", ")}var $b;function MC(){return $b||($b=de.createCanvasElement().getContext(v9e),$b)}function T9e(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function L9e(e){e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function A9e(e){return e=e||{},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||"black"),e}class Lr extends Be{constructor(t){super(A9e(t)),this._partialTextX=0,this._partialTextY=0;for(var n=0;n1&&(E+=a)}}}_hitFunc(t){var n=this.getWidth(),r=this.getHeight();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}setText(t){var n=de._isString(t)?t:t==null?"":t+"";return this._setAttr(y9e,n),this}getWidth(){var t=this.attrs.width===Dg||this.attrs.width===void 0;return t?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var t=this.attrs.height===Dg||this.attrs.height===void 0;return t?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return de.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(t){var n=MC(),r=this.fontSize(),i;return n.save(),n.font=this._getContextFont(),i=n.measureText(t),n.restore(),{width:i.width,height:r}}_getContextFont(){return this.fontStyle()+Fb+this.fontVariant()+Fb+(this.fontSize()+w9e)+P9e(this.fontFamily())}_addTextLine(t){this.align()===cv&&(t=t.trim());var n=this._getTextWidth(t);return this.textArr.push({text:t,width:n,lastInParagraph:!1})}_getTextWidth(t){var n=this.letterSpacing(),r=t.length;return MC().measureText(t).width+(r?n*(r-1):0)}_setTextData(){var t=this.text().split(`
+`),n=+this.fontSize(),r=0,i=this.lineHeight()*n,o=this.attrs.width,a=this.attrs.height,s=o!==Dg&&o!==void 0,l=a!==Dg&&a!==void 0,u=this.padding(),d=o-u*2,h=a-u*2,m=0,v=this.wrap(),b=v!==nD,S=v!==k9e&&b,k=this.ellipsis();this.textArr=[],MC().font=this._getContextFont();for(var E=k?this._getTextWidth(OC):0,_=0,T=t.length;_