diff --git a/docs/features/CONCEPTS.md b/docs/features/CONCEPTS.md index 7bf39c8b84..2d09db3de4 100644 --- a/docs/features/CONCEPTS.md +++ b/docs/features/CONCEPTS.md @@ -65,39 +65,21 @@ find out what each concept is for, you can browse the [Hugging Face concepts library](https://huggingface.co/sd-concepts-library) and look at examples of what each concept produces. -When you have an idea of a concept you wish to try, go to the command-line -client (CLI) and type a `<` character and the beginning of the Hugging Face -concept name you wish to load. Press ++tab++, and the CLI will show you all -matching concepts. You can also type `<` and hit ++tab++ to get a listing of all -~800 concepts, but be prepared to scroll up to see them all! If there is more -than one match you can continue to type and ++tab++ until the concept is -completed. +To load concepts, you will need to open the Web UI's configuration +dialogue and activate "Show Textual Inversions from HF Concepts +Library". This will then add a list of HF Concepts to the dropdown +"Add Textual Inversion" menu. Select the concept(s) of your choice and +they will be incorporated into the positive prompt. A few concepts are +designed for the negative prompt, in which case you can add them to +the negative prompt box by select the down arrow icon next to the +textual inversion menu. -!!! example - - if you type in ` - ``` - - Now type `id` and press ++tab++. It will be autocompleted to `` - because this is a unique match. - - Finish your prompt and generate as usual. You may include multiple concept terms - in the prompt. - -If you have never used this concept before, you will see a message that the TI -model is being downloaded and installed. After this, the concept will be saved -locally (in the `models/sd-concepts-library` directory) for future use. - -Several steps happen during downloading and installation, including a scan of -the file for malicious code. Should any errors occur, you will be warned and the -concept will fail to load. Generation will then continue treating the trigger -term as a normal string of characters (e.g. as literal ``). - -You can also use `` in the WebGUI's prompt textbox. There is no -autocompletion at this time. +There are nearly 1000 HF concepts, more than will fit into a menu. For +this reason we only show the most popular concepts (those which have +received 5 or more likes). If you wish to use a concept that is not on +the list, you may simply type its name surrounded by brackets. For +example, to load the concept named "xidiversity", add `` +to the positive or negative prompt text. ## Installing your Own TI Files @@ -112,18 +94,11 @@ At startup time, InvokeAI will scan the `embeddings` directory and load any TI files it finds there. At startup you will see a message similar to this one: ```bash ->> Current embedding manager terms: *, , +>> Current embedding manager terms: , ``` -Note the `*` trigger term. This is a placeholder term that many early TI -tutorials taught people to use rather than a more descriptive term. -Unfortunately, if you have multiple TI files that all use this term, only the -first one loaded will be triggered by use of the term. - -To avoid this problem, you can use the `merge_embeddings.py` script to merge two -or more TI files together. If it encounters a collision of terms, the script -will prompt you to select new terms that do not collide. See -[Textual Inversion](TEXTUAL_INVERSION.md) for details. +The terms you can use will appear in the "Add Textual Inversion" +dropdown menu above the HF Concepts. ## Further Reading diff --git a/docs/features/CONTROLNET.md b/docs/features/CONTROLNET.md new file mode 100644 index 0000000000..2c4e2e1147 --- /dev/null +++ b/docs/features/CONTROLNET.md @@ -0,0 +1,9 @@ +--- +title: ControlNet +--- + +# :material-loupe: ControlNet + +## ControlNet + +** TO BE WRITTEN ** diff --git a/docs/features/index.md b/docs/features/index.md index d9b0e1fd7c..8a8e117120 100644 --- a/docs/features/index.md +++ b/docs/features/index.md @@ -13,9 +13,6 @@ 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. diff --git a/docs/index.md b/docs/index.md index 4587b08f18..9f9da22f7b 100644 --- a/docs/index.md +++ b/docs/index.md @@ -13,6 +13,7 @@ title: Home
+ [![project logo](assets/invoke_ai_banner.png)](https://github.com/invoke-ai/InvokeAI) [![discord badge]][discord link] @@ -131,10 +132,9 @@ This method is recommended for those familiar with running Docker containers - [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) @@ -156,83 +156,60 @@ This method is recommended for those familiar with running Docker containers - [Prompt Syntax](features/PROMPTS.md) - [Generating Variations](features/VARIATIONS.md) -## :octicons-log-16: Latest Changes +## :octicons-log-16: Important Changes Since Version 2.3 -### v2.3.0 (9 February 2023) +### Nodes -#### Migration to Stable Diffusion `diffusers` models +Behind the scenes, InvokeAI has been completely rewritten to support +"nodes," small unitary operations that can be combined into graphs to +form arbitrary workflows. For example, there is a prompt node that +processes the prompt string and feeds it to a text2latent node that +generates a latent image. The latents are then fed to a latent2image +node that translates the latent image into a PNG. -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. +The WebGUI has a node editor that allows you to graphically design and +execute custom node graphs. The ability to save and load graphs is +still a work in progress, but coming soon. -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. +### Command-Line Interface Retired -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: +The original "invokeai" command-line interface has been retired. The +`invokeai` command will now launch a new command-line client that can +be used by developers to create and test nodes. It is not intended to +be used for routine image generation or manipulation. -* `!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 launch the Web GUI from the command-line, use the command +`invokeai-web` rather than the traditional `invokeai --web`. -The WebGUI offers similar functionality for model management. +### ControlNet -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. +This version of InvokeAI features ControlNet, a system that allows you +to achieve exact poses for human and animal figures by providing a +model to follow. Full details are found in [ControlNet](features/CONTROLNET.md) -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. +### New Schedulers -#### Support for the `XFormers` Memory-Efficient Crossattention Package +The list of schedulers has been completely revamped and brought up to date: -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. +| **Short Name** | **Scheduler** | **Notes** | +|----------------|---------------------------------|-----------------------------| +| **ddim** | DDIMScheduler | | +| **ddpm** | DDPMScheduler | | +| **deis** | DEISMultistepScheduler | | +| **lms** | LMSDiscreteScheduler | | +| **pndm** | PNDMScheduler | | +| **heun** | HeunDiscreteScheduler | original noise schedule | +| **heun_k** | HeunDiscreteScheduler | using karras noise schedule | +| **euler** | EulerDiscreteScheduler | original noise schedule | +| **euler_k** | EulerDiscreteScheduler | using karras noise schedule | +| **kdpm_2** | KDPM2DiscreteScheduler | | +| **kdpm_2_a** | KDPM2AncestralDiscreteScheduler | | +| **dpmpp_2s** | DPMSolverSinglestepScheduler | | +| **dpmpp_2m** | DPMSolverMultistepScheduler | original noise scnedule | +| **dpmpp_2m_k** | DPMSolverMultistepScheduler | using karras noise schedule | +| **unipc** | UniPCMultistepScheduler | CPU only | -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. - -#### 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)**. +Please see [3.0.0 Release Notes](https://github.com/invoke-ai/InvokeAI/releases/tag/v3.0.0) for further details. ## :material-target: Troubleshooting @@ -268,8 +245,3 @@ free to send me an email if you use and like the script. Original portions of the software are Copyright (c) 2022-23 by [The InvokeAI Team](https://github.com/invoke-ai). -## :octicons-book-24: Further Reading - -Please see the original README for more information on this software and -underlying algorithm, located in the file -[README-CompViz.md](other/README-CompViz.md). diff --git a/invokeai/frontend/web/dist/assets/App-08e5c546.css b/invokeai/frontend/web/dist/assets/App-08e5c546.css deleted file mode 100644 index 27d0052b89..0000000000 --- a/invokeai/frontend/web/dist/assets/App-08e5c546.css +++ /dev/null @@ -1 +0,0 @@ -.ltr-image-gallery-css-transition-enter{transform:translate(150%)}.ltr-image-gallery-css-transition-enter-active{transform:translate(0);transition:all .12s ease-out}.ltr-image-gallery-css-transition-exit{transform:translate(0)}.ltr-image-gallery-css-transition-exit-active{transform:translate(150%);transition:all .12s ease-out}.rtl-image-gallery-css-transition-enter{transform:translate(-150%)}.rtl-image-gallery-css-transition-enter-active{transform:translate(0);transition:all .12s ease-out}.rtl-image-gallery-css-transition-exit{transform:translate(0)}.rtl-image-gallery-css-transition-exit-active{transform:translate(-150%);transition:all .12s ease-out} diff --git a/invokeai/frontend/web/dist/assets/App-af7ef809.js b/invokeai/frontend/web/dist/assets/App-af7ef809.js deleted file mode 100644 index 9cc392a2c2..0000000000 --- a/invokeai/frontend/web/dist/assets/App-af7ef809.js +++ /dev/null @@ -1,188 +0,0 @@ -import{r as g,f as ue,j as l,u as BS,c as ne,a as ze,b as Ee,w as ns,d as un,o as At,S as yc,e as yo,g as qe,h as Nr,k as ei,i as xc,_ as Xd,l as HS,m as WS,R as _e,n as Pv,p as VS,q as Qd,s as ta,t as b1,v as S1,x as US,y as $S,z as ee,A as C1,B as w1,C as bc,D as rs,F as L,E as K,G as GS,H as dd,T as Ce,I as j1,J as qS,K as os,L as Iv,M as YS,N as KS,O as XS,P as Di,Q as k1,U as Mv,V as QS,W as E1,X as ZS,Y as JS,Z as e3,$ as P1,a0 as t3,a1 as n3,a2 as r3,a3 as o3,a4 as i3,a5 as a3,a6 as s3,a7 as I1,a8 as l3,a9 as c3,aa as ql,ab as u3,ac as d3,ad as Nl,ae as Yl,af as Zd,ag as Jd,ah as ef,ai as f3,aj as M1,ak as h3,al as T1,am as p3,an as _1,ao as D1,ap as Uo,aq as kn,ar as m3,as as A1,at as is,au as v3,av as g3,aw as O1,ax as tf,ay as nf,az as z1,aA as rf,aB as of,aC as Tv,aD as R1,aE as N1,aF as F1,aG as Fl,aH as Ll,aI as y3,aJ as af,aK as L1,aL as B1,aM as H1,aN as x3,aO as b3,aP as _v,aQ as Dv,aR as S3,aS as C3,aT as w3,aU as W1,aV as V1,aW as j3,aX as k3,aY as U1,aZ as Av,a_ as E3,a$ as Ov,b0 as P3,b1 as I3,b2 as $1,b3 as M3,b4 as T3,b5 as _3,b6 as fd,b7 as zv,b8 as G1,b9 as sf,ba as D3,bb as Rv,bc as Bl,bd as A3,be as O3,bf as Ua,bg as Kl,bh as q1,bi as Xl,bj as z3,bk as R3,bl as Sr,bm as Y1,bn as Zf,bo as as,bp as N3,bq as F3,br as L3,bs as jr,bt as K1,bu as B3,bv as H3,bw as X1,bx as W3,by as V3,bz as U3,bA as $3,bB as G3,bC as q3,bD as Y3,bE as K3,bF as X3,bG as Nv,bH as Q3,bI as Z3,bJ as J3,bK as eC,bL as tC,bM as nC,bN as hd,bO as za,bP as ml,bQ as Fv,bR as pd,bS as md,bT as vl,bU as Lv,bV as lf,bW as rC,bX as oC,bY as iC,bZ as Sc,b_ as aC,b$ as sC,c0 as lC,c1 as cC,c2 as gl,c3 as vd,c4 as yl,c5 as Ma,c6 as uC,c7 as dC,c8 as Q1,c9 as Ql,ca as Jf,cb as Z1,cc as J1,cd as e2,ce as fC,cf as t2,cg as n2,ch as r2,ci as o2,cj as i2,ck as Li,cl as Bi,cm as a2,cn as s2,co as l2,cp as c2,cq as u2,cr as hC,cs as pC,ct as Bv,cu as xl,cv as mC,cw as Hv,cx as Wv,cy as Vv,cz as Uv,cA as vC,cB as gC,cC as cf,cD as yC,cE as $v,cF as bl,cG as Zl,cH as xC,cI as bC,cJ as SC,cK as CC,cL as d2,cM as wC,cN as jC}from"./index-e53e8108.js";import{I as tn,u as kC,c as EC,a as kt,b as Wt,A as xo,m as ar,d as Hi,e as ti,P as $a,f as PC,C as IC,g as Y,h as A}from"./storeHooks-5cde7d31.js";function MC(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s=0)&&(n[o]=e[o]);return n}var Jl="NOT_FOUND";function TC(e){var t;return{get:function(r){return t&&e(t.key,r)?t.value:Jl},put:function(r,o){t={key:r,value:o}},getEntries:function(){return t?[t]:[]},clear:function(){t=void 0}}}function _C(e,t){var n=[];function r(u){var f=n.findIndex(function(h){return t(u,h.key)});if(f>-1){var p=n[f];return f>0&&(n.splice(f,1),n.unshift(p)),p.value}return Jl}function o(u,f){r(u)===Jl&&(n.unshift({key:u,value:f}),n.length>e&&n.pop())}function s(){return n}function c(){n=[]}return{get:r,put:o,getEntries:s,clear:c}}var DC=function(t,n){return t===n};function AC(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var o=n.length,s=0;s1?t-1:0),r=1;rperformance.now():()=>Date.now(),p2=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(BC()),h2);function HC(e){let t=[],n=[],r=0,o=!1,s=!1;const c=new WeakSet,u={schedule:(f,p=!1,h=!1)=>{const y=h&&o,x=y?t:n;return p&&c.add(f),x.indexOf(f)===-1&&(x.push(f),y&&o&&(r=t.length)),f},cancel:f=>{const p=n.indexOf(f);p!==-1&&n.splice(p,1),c.delete(f)},process:f=>{if(o){s=!0;return}if(o=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let p=0;p(e[t]=HC(()=>Ga=!0),e),{}),VC=ss.reduce((e,t)=>{const n=Cc[t];return e[t]=(r,o=!1,s=!1)=>(Ga||GC(),n.schedule(r,o,s)),e},{}),UC=ss.reduce((e,t)=>(e[t]=Cc[t].cancel,e),{});ss.reduce((e,t)=>(e[t]=()=>Cc[t].process(Wi),e),{});const $C=e=>Cc[e].process(Wi),m2=e=>{Ga=!1,Wi.delta=uf?h2:Math.max(Math.min(e-Wi.timestamp,WC),1),Wi.timestamp=e,df=!0,ss.forEach($C),df=!1,Ga&&(uf=!1,p2(m2))},GC=()=>{Ga=!0,uf=!0,df||p2(m2)},Gv=()=>Wi;function eh(e){const{viewBox:t="0 0 24 24",d:n,displayName:r,defaultProps:o={}}=e,s=g.Children.toArray(e.path),c=ue((u,f)=>l.jsx(tn,{ref:f,viewBox:t,...o,...u,children:s.length?s:l.jsx("path",{fill:"currentColor",d:n})}));return c.displayName=r,c}function ls(e){const{theme:t}=BS(),n=kC();return g.useMemo(()=>EC(t.direction,{...n,...e}),[e,t.direction,n])}var qC=Object.defineProperty,YC=(e,t,n)=>t in e?qC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,zt=(e,t,n)=>(YC(e,typeof t!="symbol"?t+"":t,n),n);function qv(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 KC=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function Yv(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function Kv(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var ff=typeof window<"u"?g.useLayoutEffect:g.useEffect,ec=e=>e,XC=class{constructor(){zt(this,"descendants",new Map),zt(this,"register",e=>{if(e!=null)return KC(e)?this.registerNode(e):t=>{this.registerNode(t,e)}}),zt(this,"unregister",e=>{this.descendants.delete(e);const t=qv(Array.from(this.descendants.keys()));this.assignIndex(t)}),zt(this,"destroy",()=>{this.descendants.clear()}),zt(this,"assignIndex",e=>{this.descendants.forEach(t=>{const n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()})}),zt(this,"count",()=>this.descendants.size),zt(this,"enabledCount",()=>this.enabledValues().length),zt(this,"values",()=>Array.from(this.descendants.values()).sort((t,n)=>t.index-n.index)),zt(this,"enabledValues",()=>this.values().filter(e=>!e.disabled)),zt(this,"item",e=>{if(this.count()!==0)return this.values()[e]}),zt(this,"enabledItem",e=>{if(this.enabledCount()!==0)return this.enabledValues()[e]}),zt(this,"first",()=>this.item(0)),zt(this,"firstEnabled",()=>this.enabledItem(0)),zt(this,"last",()=>this.item(this.descendants.size-1)),zt(this,"lastEnabled",()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)}),zt(this,"indexOf",e=>{var t,n;return e&&(n=(t=this.descendants.get(e))==null?void 0:t.index)!=null?n:-1}),zt(this,"enabledIndexOf",e=>e==null?-1:this.enabledValues().findIndex(t=>t.node.isSameNode(e))),zt(this,"next",(e,t=!0)=>{const n=Yv(e,this.count(),t);return this.item(n)}),zt(this,"nextEnabled",(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),o=Yv(r,this.enabledCount(),t);return this.enabledItem(o)}),zt(this,"prev",(e,t=!0)=>{const n=Kv(e,this.count()-1,t);return this.item(n)}),zt(this,"prevEnabled",(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),o=Kv(r,this.enabledCount()-1,t);return this.enabledItem(o)}),zt(this,"registerNode",(e,t)=>{if(!e||this.descendants.has(e))return;const n=Array.from(this.descendants.keys()).concat(e),r=qv(n);t!=null&&t.disabled&&(t.disabled=!!t.disabled);const o={node:e,index:-1,...t};this.descendants.set(e,o),this.assignIndex(r)})}};function QC(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 ct(...e){return t=>{e.forEach(n=>{QC(n,t)})}}function ZC(...e){return g.useMemo(()=>ct(...e),e)}function JC(){const e=g.useRef(new XC);return ff(()=>()=>e.current.destroy()),e.current}var[ew,v2]=kt({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function tw(e){const t=v2(),[n,r]=g.useState(-1),o=g.useRef(null);ff(()=>()=>{o.current&&t.unregister(o.current)},[]),ff(()=>{if(!o.current)return;const c=Number(o.current.dataset.index);n!=c&&!Number.isNaN(c)&&r(c)});const s=ec(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(o.current),register:ct(s,o)}}function th(){return[ec(ew),()=>ec(v2()),()=>JC(),o=>tw(o)]}var[nw,wc]=kt({name:"AccordionStylesContext",hookName:"useAccordionStyles",providerName:""}),[rw,nh]=kt({name:"AccordionItemContext",hookName:"useAccordionItemContext",providerName:""}),[ow,oL,iw,aw]=th(),Ai=ue(function(t,n){const{getButtonProps:r}=nh(),o=r(t,n),c={display:"flex",alignItems:"center",width:"100%",outline:0,...wc().button};return l.jsx(ne.button,{...o,className:ze("chakra-accordion__button",t.className),__css:c})});Ai.displayName="AccordionButton";function rh(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:o=(x,S)=>x!==S}=e,s=Wt(r),c=Wt(o),[u,f]=g.useState(n),p=t!==void 0,h=p?t:u,y=Wt(x=>{const j=typeof x=="function"?x(h):x;c(h,j)&&(p||f(j),s(j))},[p,s,h,c]);return[h,y]}function sw(e){const{onChange:t,defaultIndex:n,index:r,allowMultiple:o,allowToggle:s,...c}=e;uw(e),dw(e);const u=iw(),[f,p]=g.useState(-1);g.useEffect(()=>()=>{p(-1)},[]);const[h,y]=rh({value:r,defaultValue(){return o?n??[]:n??-1},onChange:t});return{index:h,setIndex:y,htmlProps:c,getAccordionItemProps:S=>{let j=!1;return S!==null&&(j=Array.isArray(h)?h.includes(S):h===S),{isOpen:j,onChange:w=>{if(S!==null)if(o&&Array.isArray(h)){const k=w?h.concat(S):h.filter(I=>I!==S);y(k)}else w?y(S):s&&y(-1)}}},focusedIndex:f,setFocusedIndex:p,descendants:u}}var[lw,oh]=kt({name:"AccordionContext",hookName:"useAccordionContext",providerName:"Accordion"});function cw(e){const{isDisabled:t,isFocusable:n,id:r,...o}=e,{getAccordionItemProps:s,setFocusedIndex:c}=oh(),u=g.useRef(null),f=g.useId(),p=r??f,h=`accordion-button-${p}`,y=`accordion-panel-${p}`;fw(e);const{register:x,index:S,descendants:j}=aw({disabled:t&&!n}),{isOpen:C,onChange:w}=s(S===-1?null:S);hw({isOpen:C,isDisabled:t});const k=()=>{w==null||w(!0)},I=()=>{w==null||w(!1)},P=g.useCallback(()=>{w==null||w(!C),c(S)},[S,c,C,w]),M=g.useCallback(R=>{const F={ArrowDown:()=>{const B=j.nextEnabled(S);B==null||B.node.focus()},ArrowUp:()=>{const B=j.prevEnabled(S);B==null||B.node.focus()},Home:()=>{const B=j.firstEnabled();B==null||B.node.focus()},End:()=>{const B=j.lastEnabled();B==null||B.node.focus()}}[R.key];F&&(R.preventDefault(),F(R))},[j,S]),T=g.useCallback(()=>{c(S)},[c,S]),D=g.useCallback(function(V={},F=null){return{...V,type:"button",ref:ct(x,u,F),id:h,disabled:!!t,"aria-expanded":!!C,"aria-controls":y,onClick:Ee(V.onClick,P),onFocus:Ee(V.onFocus,T),onKeyDown:Ee(V.onKeyDown,M)}},[h,t,C,P,T,M,y,x]),_=g.useCallback(function(V={},F=null){return{...V,ref:F,role:"region",id:y,"aria-labelledby":h,hidden:!C}},[h,C,y]);return{isOpen:C,isDisabled:t,isFocusable:n,onOpen:k,onClose:I,getButtonProps:D,getPanelProps:_,htmlProps:o}}function uw(e){const t=e.index||e.defaultIndex,n=t!=null&&!Array.isArray(t)&&e.allowMultiple;ns({condition:!!n,message:`If 'allowMultiple' is passed, then 'index' or 'defaultIndex' must be an array. You passed: ${typeof t},`})}function dw(e){ns({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 fw(e){ns({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 hw(e){ns({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function Oi(e){const{isOpen:t,isDisabled:n}=nh(),{reduceMotion:r}=oh(),o=ze("chakra-accordion__icon",e.className),s=wc(),c={opacity:n?.4:1,transform:t?"rotate(-180deg)":void 0,transition:r?void 0:"transform 0.2s",transformOrigin:"center",...s.icon};return l.jsx(tn,{viewBox:"0 0 24 24","aria-hidden":!0,className:o,__css:c,...e,children:l.jsx("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})})}Oi.displayName="AccordionIcon";var zi=ue(function(t,n){const{children:r,className:o}=t,{htmlProps:s,...c}=cw(t),f={...wc().container,overflowAnchor:"none"},p=g.useMemo(()=>c,[c]);return l.jsx(rw,{value:p,children:l.jsx(ne.div,{ref:n,...s,className:ze("chakra-accordion__item",o),__css:f,children:typeof r=="function"?r({isExpanded:!!c.isOpen,isDisabled:!!c.isDisabled}):r})})});zi.displayName="AccordionItem";var Wo={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},Ta={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 hf(e){var t;switch((t=e==null?void 0:e.direction)!=null?t:"right"){case"right":return Ta.slideRight;case"left":return Ta.slideLeft;case"bottom":return Ta.slideDown;case"top":return Ta.slideUp;default:return Ta.slideRight}}var $o={enter:{duration:.2,ease:Wo.easeOut},exit:{duration:.1,ease:Wo.easeIn}},rr={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})},pw=e=>e!=null&&parseInt(e.toString(),10)>0,Xv={exit:{height:{duration:.2,ease:Wo.ease},opacity:{duration:.3,ease:Wo.ease}},enter:{height:{duration:.3,ease:Wo.ease},opacity:{duration:.4,ease:Wo.ease}}},mw={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:o})=>{var s;return{...e&&{opacity:pw(t)?1:0},height:t,transitionEnd:r==null?void 0:r.exit,transition:(s=n==null?void 0:n.exit)!=null?s:rr.exit(Xv.exit,o)}},enter:({animateOpacity:e,endingHeight:t,transition:n,transitionEnd:r,delay:o})=>{var s;return{...e&&{opacity:1},height:t,transitionEnd:r==null?void 0:r.enter,transition:(s=n==null?void 0:n.enter)!=null?s:rr.enter(Xv.enter,o)}}},g2=g.forwardRef((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:o=!0,startingHeight:s=0,endingHeight:c="auto",style:u,className:f,transition:p,transitionEnd:h,...y}=e,[x,S]=g.useState(!1);g.useEffect(()=>{const I=setTimeout(()=>{S(!0)});return()=>clearTimeout(I)},[]),ns({condition:Boolean(s>0&&r),message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const j=parseFloat(s.toString())>0,C={startingHeight:s,endingHeight:c,animateOpacity:o,transition:x?p:{enter:{duration:0}},transitionEnd:{enter:h==null?void 0:h.enter,exit:r?h==null?void 0:h.exit:{...h==null?void 0:h.exit,display:j?"block":"none"}}},w=r?n:!0,k=n||r?"enter":"exit";return l.jsx(xo,{initial:!1,custom:C,children:w&&l.jsx(ar.div,{ref:t,...y,className:ze("chakra-collapse",f),style:{overflow:"hidden",display:"block",...u},custom:C,variants:mw,initial:r?"exit":!1,animate:k,exit:"exit"})})});g2.displayName="Collapse";var vw={enter:({transition:e,transitionEnd:t,delay:n}={})=>{var r;return{opacity:1,transition:(r=e==null?void 0:e.enter)!=null?r:rr.enter($o.enter,n),transitionEnd:t==null?void 0:t.enter}},exit:({transition:e,transitionEnd:t,delay:n}={})=>{var r;return{opacity:0,transition:(r=e==null?void 0:e.exit)!=null?r:rr.exit($o.exit,n),transitionEnd:t==null?void 0:t.exit}}},y2={initial:"exit",animate:"enter",exit:"exit",variants:vw},gw=g.forwardRef(function(t,n){const{unmountOnExit:r,in:o,className:s,transition:c,transitionEnd:u,delay:f,...p}=t,h=o||r?"enter":"exit",y=r?o&&r:!0,x={transition:c,transitionEnd:u,delay:f};return l.jsx(xo,{custom:x,children:y&&l.jsx(ar.div,{ref:n,className:ze("chakra-fade",s),custom:x,...y2,animate:h,...p})})});gw.displayName="Fade";var yw={exit:({reverse:e,initialScale:t,transition:n,transitionEnd:r,delay:o})=>{var s;return{opacity:0,...e?{scale:t,transitionEnd:r==null?void 0:r.exit}:{transitionEnd:{scale:t,...r==null?void 0:r.exit}},transition:(s=n==null?void 0:n.exit)!=null?s:rr.exit($o.exit,o)}},enter:({transitionEnd:e,transition:t,delay:n})=>{var r;return{opacity:1,scale:1,transition:(r=t==null?void 0:t.enter)!=null?r:rr.enter($o.enter,n),transitionEnd:e==null?void 0:e.enter}}},x2={initial:"exit",animate:"enter",exit:"exit",variants:yw},xw=g.forwardRef(function(t,n){const{unmountOnExit:r,in:o,reverse:s=!0,initialScale:c=.95,className:u,transition:f,transitionEnd:p,delay:h,...y}=t,x=r?o&&r:!0,S=o||r?"enter":"exit",j={initialScale:c,reverse:s,transition:f,transitionEnd:p,delay:h};return l.jsx(xo,{custom:j,children:x&&l.jsx(ar.div,{ref:n,className:ze("chakra-offset-slide",u),...x2,animate:S,custom:j,...y})})});xw.displayName="ScaleFade";var bw={initial:({offsetX:e,offsetY:t,transition:n,transitionEnd:r,delay:o})=>{var s;return{opacity:0,x:e,y:t,transition:(s=n==null?void 0:n.exit)!=null?s:rr.exit($o.exit,o),transitionEnd:r==null?void 0:r.exit}},enter:({transition:e,transitionEnd:t,delay:n})=>{var r;return{opacity:1,x:0,y:0,transition:(r=e==null?void 0:e.enter)!=null?r:rr.enter($o.enter,n),transitionEnd:t==null?void 0:t.enter}},exit:({offsetY:e,offsetX:t,transition:n,transitionEnd:r,reverse:o,delay:s})=>{var c;const u={x:t,y:e};return{opacity:0,transition:(c=n==null?void 0:n.exit)!=null?c:rr.exit($o.exit,s),...o?{...u,transitionEnd:r==null?void 0:r.exit}:{transitionEnd:{...u,...r==null?void 0:r.exit}}}}},pf={initial:"initial",animate:"enter",exit:"exit",variants:bw},Sw=g.forwardRef(function(t,n){const{unmountOnExit:r,in:o,reverse:s=!0,className:c,offsetX:u=0,offsetY:f=8,transition:p,transitionEnd:h,delay:y,...x}=t,S=r?o&&r:!0,j=o||r?"enter":"exit",C={offsetX:u,offsetY:f,reverse:s,transition:p,transitionEnd:h,delay:y};return l.jsx(xo,{custom:C,children:S&&l.jsx(ar.div,{ref:n,className:ze("chakra-offset-slide",c),custom:C,...pf,animate:j,...x})})});Sw.displayName="SlideFade";var Qv={exit:{duration:.15,ease:Wo.easeInOut},enter:{type:"spring",damping:25,stiffness:180}},Cw={exit:({direction:e,transition:t,transitionEnd:n,delay:r})=>{var o;const{exit:s}=hf({direction:e});return{...s,transition:(o=t==null?void 0:t.exit)!=null?o:rr.exit(Qv.exit,r),transitionEnd:n==null?void 0:n.exit}},enter:({direction:e,transitionEnd:t,transition:n,delay:r})=>{var o;const{enter:s}=hf({direction:e});return{...s,transition:(o=n==null?void 0:n.enter)!=null?o:rr.enter(Qv.enter,r),transitionEnd:t==null?void 0:t.enter}}},b2=g.forwardRef(function(t,n){const{direction:r="right",style:o,unmountOnExit:s,in:c,className:u,transition:f,transitionEnd:p,delay:h,motionProps:y,...x}=t,S=hf({direction:r}),j=Object.assign({position:"fixed"},S.position,o),C=s?c&&s:!0,w=c||s?"enter":"exit",k={transitionEnd:p,transition:f,direction:r,delay:h};return l.jsx(xo,{custom:k,children:C&&l.jsx(ar.div,{...x,ref:n,initial:"exit",className:ze("chakra-slide",u),animate:w,exit:"exit",custom:k,variants:Cw,style:j,...y})})});b2.displayName="Slide";var Ri=ue(function(t,n){const{className:r,motionProps:o,...s}=t,{reduceMotion:c}=oh(),{getPanelProps:u,isOpen:f}=nh(),p=u(s,n),h=ze("chakra-accordion__panel",r),y=wc();c||delete p.hidden;const x=l.jsx(ne.div,{...p,__css:y.panel,className:h});return c?x:l.jsx(g2,{in:f,...o,children:x})});Ri.displayName="AccordionPanel";var ih=ue(function({children:t,reduceMotion:n,...r},o){const s=un("Accordion",r),c=At(r),{htmlProps:u,descendants:f,...p}=sw(c),h=g.useMemo(()=>({...p,reduceMotion:!!n}),[p,n]);return l.jsx(ow,{value:f,children:l.jsx(lw,{value:h,children:l.jsx(nw,{value:s,children:l.jsx(ne.div,{ref:o,...u,className:ze("chakra-accordion",r.className),__css:s.root,children:t})})})})});ih.displayName="Accordion";var mf=ue(function(t,n){const{htmlWidth:r,htmlHeight:o,alt:s,...c}=t;return l.jsx("img",{width:r,height:o,ref:n,alt:s,...c})});mf.displayName="NativeImage";function ww(e){const{loading:t,src:n,srcSet:r,onLoad:o,onError:s,crossOrigin:c,sizes:u,ignoreFallback:f}=e,[p,h]=g.useState("pending");g.useEffect(()=>{h(n?"loading":"pending")},[n]);const y=g.useRef(),x=g.useCallback(()=>{if(!n)return;S();const j=new Image;j.src=n,c&&(j.crossOrigin=c),r&&(j.srcset=r),u&&(j.sizes=u),t&&(j.loading=t),j.onload=C=>{S(),h("loaded"),o==null||o(C)},j.onerror=C=>{S(),h("failed"),s==null||s(C)},y.current=j},[n,c,r,u,o,s,t]),S=()=>{y.current&&(y.current.onload=null,y.current.onerror=null,y.current=null)};return Hi(()=>{if(!f)return p==="loading"&&x(),()=>{S()}},[p,x,f]),f?"loaded":p}var jw=(e,t)=>e!=="loaded"&&t==="beforeLoadOrError"||e==="failed"&&t==="onError";function kw(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var cs=ue(function(t,n){const{fallbackSrc:r,fallback:o,src:s,srcSet:c,align:u,fit:f,loading:p,ignoreFallback:h,crossOrigin:y,fallbackStrategy:x="beforeLoadOrError",referrerPolicy:S,...j}=t,C=r!==void 0||o!==void 0,w=p!=null||h||!C,k=ww({...t,ignoreFallback:w}),I=jw(k,x),P={ref:n,objectFit:f,objectPosition:u,...w?j:kw(j,["onError","onLoad"])};return I?o||l.jsx(ne.img,{as:mf,className:"chakra-image__placeholder",src:r,...P}):l.jsx(ne.img,{as:mf,src:s,srcSet:c,crossOrigin:y,loading:p,referrerPolicy:S,className:"chakra-image",...P})});cs.displayName="Image";function ah(e){return g.Children.toArray(e).filter(t=>g.isValidElement(t))}var[Ew,Pw]=kt({strict:!1,name:"ButtonGroupContext"}),Iw={horizontal:{"> *: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}},vertical:{"> *:first-of-type:not(:last-of-type)":{borderBottomRadius:0},"> *:not(:first-of-type):not(:last-of-type)":{borderRadius:0},"> *:not(:first-of-type):last-of-type":{borderTopRadius:0}}},Mw={horizontal:e=>({"& > *:not(style) ~ *:not(style)":{marginStart:e}}),vertical:e=>({"& > *:not(style) ~ *:not(style)":{marginTop:e}})},Qt=ue(function(t,n){const{size:r,colorScheme:o,variant:s,className:c,spacing:u="0.5rem",isAttached:f,isDisabled:p,orientation:h="horizontal",...y}=t,x=ze("chakra-button__group",c),S=g.useMemo(()=>({size:r,colorScheme:o,variant:s,isDisabled:p}),[r,o,s,p]);let j={display:"inline-flex",...f?Iw[h]:Mw[h](u)};const C=h==="vertical";return l.jsx(Ew,{value:S,children:l.jsx(ne.div,{ref:n,role:"group",__css:j,className:x,"data-attached":f?"":void 0,"data-orientation":h,flexDir:C?"column":void 0,...y})})});Qt.displayName="ButtonGroup";function Tw(e){const[t,n]=g.useState(!e);return{ref:g.useCallback(s=>{s&&n(s.tagName==="BUTTON")},[]),type:t?"button":void 0}}function vf(e){const{children:t,className:n,...r}=e,o=g.isValidElement(t)?g.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,s=ze("chakra-button__icon",n);return l.jsx(ne.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:s,children:o})}vf.displayName="ButtonIcon";function tc(e){const{label:t,placement:n,spacing:r="0.5rem",children:o=l.jsx(yc,{color:"currentColor",width:"1em",height:"1em"}),className:s,__css:c,...u}=e,f=ze("chakra-button__spinner",s),p=n==="start"?"marginEnd":"marginStart",h=g.useMemo(()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[p]:t?r:0,fontSize:"1em",lineHeight:"normal",...c}),[c,t,p,r]);return l.jsx(ne.div,{className:f,...u,__css:h,children:o})}tc.displayName="ButtonSpinner";var ni=ue((e,t)=>{const n=Pw(),r=yo("Button",{...n,...e}),{isDisabled:o=n==null?void 0:n.isDisabled,isLoading:s,isActive:c,children:u,leftIcon:f,rightIcon:p,loadingText:h,iconSpacing:y="0.5rem",type:x,spinner:S,spinnerPlacement:j="start",className:C,as:w,...k}=At(e),I=g.useMemo(()=>{const D={...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:D}}},[r,n]),{ref:P,type:M}=Tw(w),T={rightIcon:p,leftIcon:f,iconSpacing:y,children:u};return l.jsxs(ne.button,{ref:ZC(t,P),as:w,type:x??M,"data-active":qe(c),"data-loading":qe(s),__css:I,className:ze("chakra-button",C),...k,disabled:o||s,children:[s&&j==="start"&&l.jsx(tc,{className:"chakra-button__spinner--start",label:h,placement:"start",spacing:y,children:S}),s?h||l.jsx(ne.span,{opacity:0,children:l.jsx(Zv,{...T})}):l.jsx(Zv,{...T}),s&&j==="end"&&l.jsx(tc,{className:"chakra-button__spinner--end",label:h,placement:"end",spacing:y,children:S})]})});ni.displayName="Button";function Zv(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:o}=e;return l.jsxs(l.Fragment,{children:[t&&l.jsx(vf,{marginEnd:o,children:t}),r,n&&l.jsx(vf,{marginStart:o,children:n})]})}var ho=ue((e,t)=>{const{icon:n,children:r,isRound:o,"aria-label":s,...c}=e,u=n||r,f=g.isValidElement(u)?g.cloneElement(u,{"aria-hidden":!0,focusable:!1}):null;return l.jsx(ni,{padding:"0",borderRadius:o?"full":void 0,ref:t,"aria-label":s,...c,children:f})});ho.displayName="IconButton";var[iL,_w]=kt({name:"CheckboxGroupContext",strict:!1});function Dw(e){return l.jsx(ne.svg,{width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...e,children:l.jsx("polyline",{points:"1.5 6 4.5 9 10.5 1"})})}function Aw(e){return l.jsx(ne.svg,{width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4},...e,children:l.jsx("line",{x1:"21",x2:"3",y1:"12",y2:"12"})})}function Ow(e){const{isIndeterminate:t,isChecked:n,...r}=e,o=t?Aw:Dw;return n||t?l.jsx(ne.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:l.jsx(o,{...r})}):null}var[zw,S2]=kt({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[Rw,ri]=kt({strict:!1,name:"FormControlContext"});function Nw(e){const{id:t,isRequired:n,isInvalid:r,isDisabled:o,isReadOnly:s,...c}=e,u=g.useId(),f=t||`field-${u}`,p=`${f}-label`,h=`${f}-feedback`,y=`${f}-helptext`,[x,S]=g.useState(!1),[j,C]=g.useState(!1),[w,k]=g.useState(!1),I=g.useCallback((_={},R=null)=>({id:y,..._,ref:ct(R,V=>{V&&C(!0)})}),[y]),P=g.useCallback((_={},R=null)=>{var V,F;return{..._,ref:R,"data-focus":qe(w),"data-disabled":qe(o),"data-invalid":qe(r),"data-readonly":qe(s),id:(V=_.id)!=null?V:p,htmlFor:(F=_.htmlFor)!=null?F:f}},[f,o,w,r,s,p]),M=g.useCallback((_={},R=null)=>({id:h,..._,ref:ct(R,V=>{V&&S(!0)}),"aria-live":"polite"}),[h]),T=g.useCallback((_={},R=null)=>({..._,...c,ref:R,role:"group"}),[c]),D=g.useCallback((_={},R=null)=>({..._,ref:R,role:"presentation","aria-hidden":!0,children:_.children||"*"}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!s,isDisabled:!!o,isFocused:!!w,onFocus:()=>k(!0),onBlur:()=>k(!1),hasFeedbackText:x,setHasFeedbackText:S,hasHelpText:j,setHasHelpText:C,id:f,labelId:p,feedbackId:h,helpTextId:y,htmlProps:c,getHelpTextProps:I,getErrorMessageProps:M,getRootProps:T,getLabelProps:P,getRequiredIndicatorProps:D}}var rt=ue(function(t,n){const r=un("Form",t),o=At(t),{getRootProps:s,htmlProps:c,...u}=Nw(o),f=ze("chakra-form-control",t.className);return l.jsx(Rw,{value:u,children:l.jsx(zw,{value:r,children:l.jsx(ne.div,{...s({},n),className:f,__css:r.container})})})});rt.displayName="FormControl";var pn=ue(function(t,n){const r=ri(),o=S2(),s=ze("chakra-form__helper-text",t.className);return l.jsx(ne.div,{...r==null?void 0:r.getHelpTextProps(t,n),__css:o.helperText,className:s})});pn.displayName="FormHelperText";var[Fw,Lw]=kt({name:"FormErrorStylesContext",errorMessage:`useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),mn=ue((e,t)=>{const n=un("FormError",e),r=At(e),o=ri();return o!=null&&o.isInvalid?l.jsx(Fw,{value:n,children:l.jsx(ne.div,{...o==null?void 0:o.getErrorMessageProps(r,t),className:ze("chakra-form__error-message",e.className),__css:{display:"flex",alignItems:"center",...n.text}})}):null});mn.displayName="FormErrorMessage";var Bw=ue((e,t)=>{const n=Lw(),r=ri();if(!(r!=null&&r.isInvalid))return null;const o=ze("chakra-form__error-icon",e.className);return l.jsx(tn,{ref:t,"aria-hidden":!0,...e,__css:n.icon,className:o,children:l.jsx("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"})})});Bw.displayName="FormErrorIcon";var st=ue(function(t,n){var r;const o=yo("FormLabel",t),s=At(t),{className:c,children:u,requiredIndicator:f=l.jsx(C2,{}),optionalIndicator:p=null,...h}=s,y=ri(),x=(r=y==null?void 0:y.getLabelProps(h,n))!=null?r:{ref:n,...h};return l.jsxs(ne.label,{...x,className:ze("chakra-form__label",s.className),__css:{display:"block",textAlign:"start",...o},children:[u,y!=null&&y.isRequired?f:p]})});st.displayName="FormLabel";var C2=ue(function(t,n){const r=ri(),o=S2();if(!(r!=null&&r.isRequired))return null;const s=ze("chakra-form__required-indicator",t.className);return l.jsx(ne.span,{...r==null?void 0:r.getRequiredIndicatorProps(t,n),__css:o.requiredIndicator,className:s})});C2.displayName="RequiredIndicator";function sh(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:o,...s}=lh(e);return{...s,disabled:t,readOnly:r,required:o,"aria-invalid":Nr(n),"aria-required":Nr(o),"aria-readonly":Nr(r)}}function lh(e){var t,n,r;const o=ri(),{id:s,disabled:c,readOnly:u,required:f,isRequired:p,isInvalid:h,isReadOnly:y,isDisabled:x,onFocus:S,onBlur:j,...C}=e,w=e["aria-describedby"]?[e["aria-describedby"]]:[];return o!=null&&o.hasFeedbackText&&(o!=null&&o.isInvalid)&&w.push(o.feedbackId),o!=null&&o.hasHelpText&&w.push(o.helpTextId),{...C,"aria-describedby":w.join(" ")||void 0,id:s??(o==null?void 0:o.id),isDisabled:(t=c??x)!=null?t:o==null?void 0:o.isDisabled,isReadOnly:(n=u??y)!=null?n:o==null?void 0:o.isReadOnly,isRequired:(r=f??p)!=null?r:o==null?void 0:o.isRequired,isInvalid:h??(o==null?void 0:o.isInvalid),onFocus:Ee(o==null?void 0:o.onFocus,S),onBlur:Ee(o==null?void 0:o.onBlur,j)}}var ch={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},w2=ne("span",{baseStyle:ch});w2.displayName="VisuallyHidden";var Hw=ne("input",{baseStyle:ch});Hw.displayName="VisuallyHiddenInput";var Jv=!1,us=null,Xo=!1,gf=!1,yf=new Set;function uh(e,t){yf.forEach(n=>n(e,t))}var Ww=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function Vw(e){return!(e.metaKey||!Ww&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function eg(e){Xo=!0,Vw(e)&&(us="keyboard",uh("keyboard",e))}function wi(e){if(us="pointer",e.type==="mousedown"||e.type==="pointerdown"){Xo=!0;const t=e.composedPath?e.composedPath()[0]:e.target;let n=!1;try{n=t.matches(":focus-visible")}catch{}if(n)return;uh("pointer",e)}}function Uw(e){return e.mozInputSource===0&&e.isTrusted?!0:e.detail===0&&!e.pointerType}function $w(e){Uw(e)&&(Xo=!0,us="virtual")}function Gw(e){e.target===window||e.target===document||(!Xo&&!gf&&(us="virtual",uh("virtual",e)),Xo=!1,gf=!1)}function qw(){Xo=!1,gf=!0}function tg(){return us!=="pointer"}function Yw(){if(typeof window>"u"||Jv)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...n){Xo=!0,e.apply(this,n)},document.addEventListener("keydown",eg,!0),document.addEventListener("keyup",eg,!0),document.addEventListener("click",$w,!0),window.addEventListener("focus",Gw,!0),window.addEventListener("blur",qw,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",wi,!0),document.addEventListener("pointermove",wi,!0),document.addEventListener("pointerup",wi,!0)):(document.addEventListener("mousedown",wi,!0),document.addEventListener("mousemove",wi,!0),document.addEventListener("mouseup",wi,!0)),Jv=!0}function j2(e){Yw(),e(tg());const t=()=>e(tg());return yf.add(t),()=>{yf.delete(t)}}function Kw(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function k2(e={}){const t=lh(e),{isDisabled:n,isReadOnly:r,isRequired:o,isInvalid:s,id:c,onBlur:u,onFocus:f,"aria-describedby":p}=t,{defaultChecked:h,isChecked:y,isFocusable:x,onChange:S,isIndeterminate:j,name:C,value:w,tabIndex:k=void 0,"aria-label":I,"aria-labelledby":P,"aria-invalid":M,...T}=e,D=Kw(T,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),_=Wt(S),R=Wt(u),V=Wt(f),[F,B]=g.useState(!1),[Q,U]=g.useState(!1),[X,te]=g.useState(!1),[re,$]=g.useState(!1);g.useEffect(()=>j2(B),[]);const Z=g.useRef(null),[fe,Se]=g.useState(!0),[Me,Ie]=g.useState(!!h),Pe=y!==void 0,he=Pe?y:Me,se=g.useCallback(ge=>{if(r||n){ge.preventDefault();return}Pe||Ie(he?ge.target.checked:j?!0:ge.target.checked),_==null||_(ge)},[r,n,he,Pe,j,_]);Hi(()=>{Z.current&&(Z.current.indeterminate=Boolean(j))},[j]),ti(()=>{n&&U(!1)},[n,U]),Hi(()=>{const ge=Z.current;ge!=null&&ge.form&&(ge.form.onreset=()=>{Ie(!!h)})},[]);const Ne=n&&!x,Ve=g.useCallback(ge=>{ge.key===" "&&$(!0)},[$]),Ue=g.useCallback(ge=>{ge.key===" "&&$(!1)},[$]);Hi(()=>{if(!Z.current)return;Z.current.checked!==he&&Ie(Z.current.checked)},[Z.current]);const $e=g.useCallback((ge={},Te=null)=>{const et=Be=>{Q&&Be.preventDefault(),$(!0)};return{...ge,ref:Te,"data-active":qe(re),"data-hover":qe(X),"data-checked":qe(he),"data-focus":qe(Q),"data-focus-visible":qe(Q&&F),"data-indeterminate":qe(j),"data-disabled":qe(n),"data-invalid":qe(s),"data-readonly":qe(r),"aria-hidden":!0,onMouseDown:Ee(ge.onMouseDown,et),onMouseUp:Ee(ge.onMouseUp,()=>$(!1)),onMouseEnter:Ee(ge.onMouseEnter,()=>te(!0)),onMouseLeave:Ee(ge.onMouseLeave,()=>te(!1))}},[re,he,n,Q,F,X,j,s,r]),Qe=g.useCallback((ge={},Te=null)=>({...D,...ge,ref:ct(Te,et=>{et&&Se(et.tagName==="LABEL")}),onClick:Ee(ge.onClick,()=>{var et;fe||((et=Z.current)==null||et.click(),requestAnimationFrame(()=>{var Be;(Be=Z.current)==null||Be.focus()}))}),"data-disabled":qe(n),"data-checked":qe(he),"data-invalid":qe(s)}),[D,n,he,s,fe]),me=g.useCallback((ge={},Te=null)=>({...ge,ref:ct(Z,Te),type:"checkbox",name:C,value:w,id:c,tabIndex:k,onChange:Ee(ge.onChange,se),onBlur:Ee(ge.onBlur,R,()=>U(!1)),onFocus:Ee(ge.onFocus,V,()=>U(!0)),onKeyDown:Ee(ge.onKeyDown,Ve),onKeyUp:Ee(ge.onKeyUp,Ue),required:o,checked:he,disabled:Ne,readOnly:r,"aria-label":I,"aria-labelledby":P,"aria-invalid":M?Boolean(M):s,"aria-describedby":p,"aria-disabled":n,style:ch}),[C,w,c,se,R,V,Ve,Ue,o,he,Ne,r,I,P,M,s,p,n,k]),De=g.useCallback((ge={},Te=null)=>({...ge,ref:Te,onMouseDown:Ee(ge.onMouseDown,ng),onTouchStart:Ee(ge.onTouchStart,ng),"data-disabled":qe(n),"data-checked":qe(he),"data-invalid":qe(s)}),[he,n,s]);return{state:{isInvalid:s,isFocused:Q,isChecked:he,isActive:re,isHovered:X,isIndeterminate:j,isDisabled:n,isReadOnly:r,isRequired:o},getRootProps:Qe,getCheckboxProps:$e,getInputProps:me,getLabelProps:De,htmlProps:D}}function ng(e){e.preventDefault(),e.stopPropagation()}var Xw={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},Qw={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},Zw=ei({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),Jw=ei({from:{opacity:0},to:{opacity:1}}),e5=ei({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),E2=ue(function(t,n){const r=_w(),o={...r,...t},s=un("Checkbox",o),c=At(t),{spacing:u="0.5rem",className:f,children:p,iconColor:h,iconSize:y,icon:x=l.jsx(Ow,{}),isChecked:S,isDisabled:j=r==null?void 0:r.isDisabled,onChange:C,inputProps:w,...k}=c;let I=S;r!=null&&r.value&&c.value&&(I=r.value.includes(c.value));let P=C;r!=null&&r.onChange&&c.value&&(P=xc(r.onChange,C));const{state:M,getInputProps:T,getCheckboxProps:D,getLabelProps:_,getRootProps:R}=k2({...k,isDisabled:j,isChecked:I,onChange:P}),V=g.useMemo(()=>({animation:M.isIndeterminate?`${Jw} 20ms linear, ${e5} 200ms linear`:`${Zw} 200ms linear`,fontSize:y,color:h,...s.icon}),[h,y,,M.isIndeterminate,s.icon]),F=g.cloneElement(x,{__css:V,isIndeterminate:M.isIndeterminate,isChecked:M.isChecked});return l.jsxs(ne.label,{__css:{...Qw,...s.container},className:ze("chakra-checkbox",f),...R(),children:[l.jsx("input",{className:"chakra-checkbox__input",...T(w,n)}),l.jsx(ne.span,{__css:{...Xw,...s.control},className:"chakra-checkbox__control",...D(),children:F}),p&&l.jsx(ne.span,{className:"chakra-checkbox__label",..._(),__css:{marginStart:u,...s.label},children:p})]})});E2.displayName="Checkbox";function t5(e){const t=parseFloat(e);return typeof t!="number"||Number.isNaN(t)?0:t}function dh(e,t){let n=t5(e);const r=10**(t??10);return n=Math.round(n*r)/r,t?n.toFixed(t):n.toString()}function xf(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 rg(e,t,n){return(e-t)*100/(n-t)}function n5(e,t,n){return(n-t)*e+t}function og(e,t,n){const r=Math.round((e-t)/n)*n+t,o=xf(n);return dh(r,o)}function Hl(e,t,n){return e==null?e:(n{var F;return r==null?"":(F=gd(r,s,n))!=null?F:""}),x=typeof o<"u",S=x?o:h,j=P2(io(S),s),C=n??j,w=g.useCallback(F=>{F!==S&&(x||y(F.toString()),p==null||p(F.toString(),io(F)))},[p,x,S]),k=g.useCallback(F=>{let B=F;return f&&(B=Hl(B,c,u)),dh(B,C)},[C,f,u,c]),I=g.useCallback((F=s)=>{let B;S===""?B=io(F):B=io(S)+F,B=k(B),w(B)},[k,s,w,S]),P=g.useCallback((F=s)=>{let B;S===""?B=io(-F):B=io(S)-F,B=k(B),w(B)},[k,s,w,S]),M=g.useCallback(()=>{var F;let B;r==null?B="":B=(F=gd(r,s,n))!=null?F:c,w(B)},[r,n,s,w,c]),T=g.useCallback(F=>{var B;const Q=(B=gd(F,s,C))!=null?B:c;w(Q)},[C,s,w,c]),D=io(S);return{isOutOfRange:D>u||D{const s=typeof e=="function"?e():e??document;if(!(!n||!s))return s.addEventListener(t,o,r),()=>{s.removeEventListener(t,o,r)}},[t,e,r,o,n]),()=>{const s=typeof e=="function"?e():e??document;s==null||s.removeEventListener(t,o,r)}}function o5(e){return"current"in e}var I2=()=>typeof window<"u";function i5(){var e;const t=navigator.userAgentData;return(e=t==null?void 0:t.platform)!=null?e:navigator.platform}var a5=e=>I2()&&e.test(navigator.vendor),s5=e=>I2()&&e.test(i5()),l5=()=>s5(/mac|iphone|ipad|ipod/i),c5=()=>l5()&&a5(/apple/i);function u5(e){const{ref:t,elements:n,enabled:r}=e,o=()=>{var s,c;return(c=(s=t.current)==null?void 0:s.ownerDocument)!=null?c:document};Go(o,"pointerdown",s=>{if(!c5()||!r)return;const c=s.target,f=(n??[t]).some(p=>{const h=o5(p)?p.current:p;return(h==null?void 0:h.contains(c))||h===c});o().activeElement!==c&&f&&(s.preventDefault(),c.focus())})}var lt={},d5={get exports(){return lt},set exports(e){lt=e}},f5="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",h5=f5,p5=h5;function M2(){}function T2(){}T2.resetWarningCache=M2;var m5=function(){function e(r,o,s,c,u,f){if(f!==p5){var p=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 p.name="Invariant Violation",p}}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:T2,resetWarningCache:M2};return n.PropTypes=n,n};d5.exports=m5();var bf="data-focus-lock",_2="data-focus-lock-disabled",v5="data-no-focus-lock",g5="data-autofocus-inside",y5="data-no-autofocus";function x5(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function b5(e,t){var n=g.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}function D2(e,t){return b5(t||null,function(n){return e.forEach(function(r){return x5(r,n)})})}var yd={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"},xr=function(){return xr=Object.assign||function(t){for(var n,r=1,o=arguments.length;r0&&s[s.length-1])&&(p[0]===6||p[0]===2)){n=0;continue}if(p[0]===3&&(!s||p[1]>s[0]&&p[1]0)&&!(o=r.next()).done;)s.push(o.value)}catch(u){c={error:u}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(c)throw c.error}}return s}function Sf(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r=0}).sort(O5)},z5=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],mh=z5.join(","),R5="".concat(mh,", [data-focus-guard]"),X2=function(e,t){return Er((e.shadowRoot||e).children).reduce(function(n,r){return n.concat(r.matches(t?R5:mh)?[r]:[],X2(r))},[])},N5=function(e,t){var n;return e instanceof HTMLIFrameElement&&(!((n=e.contentDocument)===null||n===void 0)&&n.body)?jc([e.contentDocument.body],t):[e]},jc=function(e,t){return e.reduce(function(n,r){var o,s=X2(r,t),c=(o=[]).concat.apply(o,s.map(function(u){return N5(u,t)}));return n.concat(c,r.parentNode?Er(r.parentNode.querySelectorAll(mh)).filter(function(u){return u===r}):[])},[])},F5=function(e){var t=e.querySelectorAll("[".concat(g5,"]"));return Er(t).map(function(n){return jc([n])}).reduce(function(n,r){return n.concat(r)},[])},vh=function(e,t){return Er(e).filter(function(n){return U2(t,n)}).filter(function(n){return _5(n)})},ag=function(e,t){return t===void 0&&(t=new Map),Er(e).filter(function(n){return $2(t,n)})},Cf=function(e,t,n){return K2(vh(jc(e,n),t),!0,n)},sg=function(e,t){return K2(vh(jc(e),t),!1)},L5=function(e,t){return vh(F5(e),t)},Vi=function(e,t){return e.shadowRoot?Vi(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:Er(e.children).some(function(n){var r;if(n instanceof HTMLIFrameElement){var o=(r=n.contentDocument)===null||r===void 0?void 0:r.body;return o?Vi(o,t):!1}return Vi(n,t)})},B5=function(e){for(var t=new Set,n=e.length,r=0;r0&&t.add(o),(s&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(c,u){return!t.has(u)})},Q2=function(e){return e.parentNode?Q2(e.parentNode):e},gh=function(e){var t=nc(e);return t.filter(Boolean).reduce(function(n,r){var o=r.getAttribute(bf);return n.push.apply(n,o?B5(Er(Q2(r).querySelectorAll("[".concat(bf,'="').concat(o,'"]:not([').concat(_2,'="disabled"])')))):[r]),n},[])},H5=function(e){try{return e()}catch{return}},qa=function(e){if(e===void 0&&(e=document),!(!e||!e.activeElement)){var t=e.activeElement;return t.shadowRoot?qa(t.shadowRoot):t instanceof HTMLIFrameElement&&H5(function(){return t.contentWindow.document})?qa(t.contentWindow.document):t}},W5=function(e,t){return e===t},V5=function(e,t){return Boolean(Er(e.querySelectorAll("iframe")).some(function(n){return W5(n,t)}))},Z2=function(e,t){return t===void 0&&(t=qa(H2(e).ownerDocument)),!t||t.dataset&&t.dataset.focusGuard?!1:gh(e).some(function(n){return Vi(n,t)||V5(n,t)})},U5=function(e){e===void 0&&(e=document);var t=qa(e);return t?Er(e.querySelectorAll("[".concat(v5,"]"))).some(function(n){return Vi(n,t)}):!1},$5=function(e,t){return t.filter(Y2).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},yh=function(e,t){return Y2(e)&&e.name?$5(e,t):e},G5=function(e){var t=new Set;return e.forEach(function(n){return t.add(yh(n,e))}),e.filter(function(n){return t.has(n)})},lg=function(e){return e[0]&&e.length>1?yh(e[0],e):e[0]},cg=function(e,t){return e.length>1?e.indexOf(yh(e[t],e)):t},J2="NEW_FOCUS",q5=function(e,t,n,r){var o=e.length,s=e[0],c=e[o-1],u=ph(n);if(!(n&&e.indexOf(n)>=0)){var f=n!==void 0?t.indexOf(n):-1,p=r?t.indexOf(r):f,h=r?e.indexOf(r):-1,y=f-p,x=t.indexOf(s),S=t.indexOf(c),j=G5(t),C=n!==void 0?j.indexOf(n):-1,w=C-(r?j.indexOf(r):f),k=cg(e,0),I=cg(e,o-1);if(f===-1||h===-1)return J2;if(!y&&h>=0)return h;if(f<=x&&u&&Math.abs(y)>1)return I;if(f>=S&&u&&Math.abs(y)>1)return k;if(y&&Math.abs(w)>1)return h;if(f<=x)return I;if(f>S)return k;if(y)return Math.abs(y)>1?h:(o+h+y)%o}},Y5=function(e){return function(t){var n,r=(n=G2(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},K5=function(e,t,n){var r=e.map(function(s){var c=s.node;return c}),o=ag(r.filter(Y5(n)));return o&&o.length?lg(o):lg(ag(t))},wf=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&wf(e.parentNode.host||e.parentNode,t),t},xd=function(e,t){for(var n=wf(e),r=wf(t),o=0;o=0)return s}return!1},ey=function(e,t,n){var r=nc(e),o=nc(t),s=r[0],c=!1;return o.filter(Boolean).forEach(function(u){c=xd(c||u,u)||c,n.filter(Boolean).forEach(function(f){var p=xd(s,f);p&&(!c||Vi(p,c)?c=p:c=xd(p,c))})}),c},X5=function(e,t){return e.reduce(function(n,r){return n.concat(L5(r,t))},[])},Q5=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(A5)},Z5=function(e,t){var n=qa(nc(e).length>0?document:H2(e).ownerDocument),r=gh(e).filter(rc),o=ey(n||e,e,r),s=new Map,c=sg(r,s),u=Cf(r,s).filter(function(S){var j=S.node;return rc(j)});if(!(!u[0]&&(u=c,!u[0]))){var f=sg([o],s).map(function(S){var j=S.node;return j}),p=Q5(f,u),h=p.map(function(S){var j=S.node;return j}),y=q5(h,f,n,t);if(y===J2){var x=K5(c,h,X5(r,s));if(x)return{node:x};console.warn("focus-lock: cannot find any node to move focus into");return}return y===void 0?y:p[y]}},J5=function(e){var t=gh(e).filter(rc),n=ey(e,e,t),r=new Map,o=Cf([n],r,!0),s=Cf(t,r).filter(function(c){var u=c.node;return rc(u)}).map(function(c){var u=c.node;return u});return o.map(function(c){var u=c.node,f=c.index;return{node:u,index:f,lockItem:s.indexOf(u)>=0,guard:ph(u)}})},e6=function(e,t){"focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},bd=0,Sd=!1,ty=function(e,t,n){n===void 0&&(n={});var r=Z5(e,t);if(!Sd&&r){if(bd>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),Sd=!0,setTimeout(function(){Sd=!1},1);return}bd++,e6(r.node,n.focusOptions),bd--}};function ny(e){var t=window,n=t.setImmediate;typeof n<"u"?n(e):setTimeout(e,1)}var t6=function(){return document&&document.activeElement===document.body},n6=function(){return t6()||U5()},Ui=null,Ni=null,$i=null,Ya=!1,r6=function(){return!0},o6=function(t){return(Ui.whiteList||r6)(t)},i6=function(t,n){$i={observerNode:t,portaledElement:n}},a6=function(t){return $i&&$i.portaledElement===t};function ug(e,t,n,r){var o=null,s=e;do{var c=r[s];if(c.guard)c.node.dataset.focusAutoGuard&&(o=c);else if(c.lockItem){if(s!==e)return;o=null}else break}while((s+=n)!==t);o&&(o.node.tabIndex=0)}var s6=function(t){return t&&"current"in t?t.current:t},l6=function(t){return t?Boolean(Ya):Ya==="meanwhile"},c6=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},u6=function(t,n){return n.some(function(r){return c6(t,r,r)})},oc=function(){var t=!1;if(Ui){var n=Ui,r=n.observed,o=n.persistentFocus,s=n.autoFocus,c=n.shards,u=n.crossFrame,f=n.focusOptions,p=r||$i&&$i.portaledElement,h=document&&document.activeElement;if(p){var y=[p].concat(c.map(s6).filter(Boolean));if((!h||o6(h))&&(o||l6(u)||!n6()||!Ni&&s)&&(p&&!(Z2(y)||h&&u6(h,y)||a6(h))&&(document&&!Ni&&h&&!s?(h.blur&&h.blur(),document.body.focus()):(t=ty(y,Ni,{focusOptions:f}),$i={})),Ya=!1,Ni=document&&document.activeElement),document){var x=document&&document.activeElement,S=J5(y),j=S.map(function(C){var w=C.node;return w}).indexOf(x);j>-1&&(S.filter(function(C){var w=C.guard,k=C.node;return w&&k.dataset.focusAutoGuard}).forEach(function(C){var w=C.node;return w.removeAttribute("tabIndex")}),ug(j,S.length,1,S),ug(j,-1,-1,S))}}}return t},ry=function(t){oc()&&t&&(t.stopPropagation(),t.preventDefault())},xh=function(){return ny(oc)},d6=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||i6(r,n)},f6=function(){return null},oy=function(){Ya="just",setTimeout(function(){Ya="meanwhile"},0)},h6=function(){document.addEventListener("focusin",ry),document.addEventListener("focusout",xh),window.addEventListener("blur",oy)},p6=function(){document.removeEventListener("focusin",ry),document.removeEventListener("focusout",xh),window.removeEventListener("blur",oy)};function m6(e){return e.filter(function(t){var n=t.disabled;return!n})}function v6(e){var t=e.slice(-1)[0];t&&!Ui&&h6();var n=Ui,r=n&&t&&t.id===n.id;Ui=t,n&&!r&&(n.onDeactivation(),e.filter(function(o){var s=o.id;return s===n.id}).length||n.returnFocus(!t)),t?(Ni=null,(!r||n.observed!==t.observed)&&t.onActivation(),oc(),ny(oc)):(p6(),Ni=null)}F2.assignSyncMedium(d6);L2.assignMedium(xh);C5.assignMedium(function(e){return e({moveFocusInside:ty,focusInside:Z2})});const g6=E5(m6,v6)(f6);var iy=g.forwardRef(function(t,n){return g.createElement(B2,Xd({sideCar:g6,ref:n},t))}),ay=B2.propTypes||{};ay.sideCar;MC(ay,["sideCar"]);iy.propTypes={};const dg=iy;function sy(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function ly(e){var t;if(!sy(e))return!1;const n=(t=e.ownerDocument.defaultView)!=null?t:window;return e instanceof n.HTMLElement}function y6(e){var t,n;return(n=(t=cy(e))==null?void 0:t.defaultView)!=null?n:window}function cy(e){return sy(e)?e.ownerDocument:document}function x6(e){return cy(e).activeElement}var uy=e=>e.hasAttribute("tabindex"),b6=e=>uy(e)&&e.tabIndex===-1;function S6(e){return Boolean(e.getAttribute("disabled"))===!0||Boolean(e.getAttribute("aria-disabled"))===!0}function dy(e){return e.parentElement&&dy(e.parentElement)?!0:e.hidden}function C6(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function fy(e){if(!ly(e)||dy(e)||S6(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]():C6(e)?!0:uy(e)}function w6(e){return e?ly(e)&&fy(e)&&!b6(e):!1}var j6=["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]"],k6=j6.join(),E6=e=>e.offsetWidth>0&&e.offsetHeight>0;function hy(e){const t=Array.from(e.querySelectorAll(k6));return t.unshift(e),t.filter(n=>fy(n)&&E6(n))}var fg,P6=(fg=dg.default)!=null?fg:dg,py=e=>{const{initialFocusRef:t,finalFocusRef:n,contentRef:r,restoreFocus:o,children:s,isDisabled:c,autoFocus:u,persistentFocus:f,lockFocusAcrossFrames:p}=e,h=g.useCallback(()=>{t!=null&&t.current?t.current.focus():r!=null&&r.current&&hy(r.current).length===0&&requestAnimationFrame(()=>{var j;(j=r.current)==null||j.focus()})},[t,r]),y=g.useCallback(()=>{var S;(S=n==null?void 0:n.current)==null||S.focus()},[n]),x=o&&!n;return l.jsx(P6,{crossFrame:p,persistentFocus:f,autoFocus:u,disabled:c,onActivation:h,onDeactivation:y,returnFocus:x,children:s})};py.displayName="FocusLock";var I6=LC?g.useLayoutEffect:g.useEffect;function ic(e,t=[]){const n=g.useRef(e);return I6(()=>{n.current=e}),g.useCallback((...r)=>{var o;return(o=n.current)==null?void 0:o.call(n,...r)},t)}function M6(e,t,n,r){const o=ic(t);return g.useEffect(()=>{var s;const c=(s=Pv(n))!=null?s:document;if(t)return c.addEventListener(e,o,r),()=>{c.removeEventListener(e,o,r)}},[e,n,r,o,t]),()=>{var s;((s=Pv(n))!=null?s:document).removeEventListener(e,o,r)}}function T6(e){const{ref:t,handler:n,enabled:r=!0}=e,o=ic(n),c=g.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}).current;g.useEffect(()=>{if(!r)return;const u=y=>{Cd(y,t)&&(c.isPointerDown=!0)},f=y=>{if(c.ignoreEmulatedMouseEvents){c.ignoreEmulatedMouseEvents=!1;return}c.isPointerDown&&n&&Cd(y,t)&&(c.isPointerDown=!1,o(y))},p=y=>{c.ignoreEmulatedMouseEvents=!0,n&&c.isPointerDown&&Cd(y,t)&&(c.isPointerDown=!1,o(y))},h=f2(t.current);return h.addEventListener("mousedown",u,!0),h.addEventListener("mouseup",f,!0),h.addEventListener("touchstart",u,!0),h.addEventListener("touchend",p,!0),()=>{h.removeEventListener("mousedown",u,!0),h.removeEventListener("mouseup",f,!0),h.removeEventListener("touchstart",u,!0),h.removeEventListener("touchend",p,!0)}},[n,t,o,c,r])}function Cd(e,t){var n;const r=e.target;return e.button>0||r&&!f2(r).contains(r)?!1:!((n=t.current)!=null&&n.contains(r))}function _6(e,t){const n=g.useId();return g.useMemo(()=>e||[t,n].filter(Boolean).join("-"),[e,t,n])}function D6(e,t){const n=e!==void 0;return[n,n&&typeof e<"u"?e:t]}function po(e={}){const{onClose:t,onOpen:n,isOpen:r,id:o}=e,s=ic(n),c=ic(t),[u,f]=g.useState(e.defaultIsOpen||!1),[p,h]=D6(r,u),y=_6(o,"disclosure"),x=g.useCallback(()=>{p||f(!1),c==null||c()},[p,c]),S=g.useCallback(()=>{p||f(!0),s==null||s()},[p,s]),j=g.useCallback(()=>{(h?x:S)()},[h,S,x]);return{isOpen:!!h,onOpen:S,onClose:x,onToggle:j,isControlled:p,getButtonProps:(C={})=>({...C,"aria-expanded":h,"aria-controls":y,onClick:VS(C.onClick,j)}),getDisclosureProps:(C={})=>({...C,hidden:!h,id:y})}}var bh=ue(function(t,n){const{htmlSize:r,...o}=t,s=un("Input",o),c=At(o),u=sh(c),f=ze("chakra-input",t.className);return l.jsx(ne.input,{size:r,...u,__css:s.field,ref:n,className:f})});bh.displayName="Input";bh.id="Input";var[A6,my]=kt({name:"ListStylesContext",errorMessage:`useListStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),Sh=ue(function(t,n){const r=un("List",t),{children:o,styleType:s="none",stylePosition:c,spacing:u,...f}=At(t),p=ah(o),y=u?{["& > *:not(style) ~ *:not(style)"]:{mt:u}}:{};return l.jsx(A6,{value:r,children:l.jsx(ne.ul,{ref:n,listStyleType:s,listStylePosition:c,role:"list",__css:{...r.container,...y},...f,children:p})})});Sh.displayName="List";var O6=ue((e,t)=>{const{as:n,...r}=e;return l.jsx(Sh,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...r})});O6.displayName="OrderedList";var vy=ue(function(t,n){const{as:r,...o}=t;return l.jsx(Sh,{ref:n,as:"ul",styleType:"initial",marginStart:"1em",...o})});vy.displayName="UnorderedList";var Ra=ue(function(t,n){const r=my();return l.jsx(ne.li,{ref:n,...t,__css:r.item})});Ra.displayName="ListItem";var z6=ue(function(t,n){const r=my();return l.jsx(tn,{ref:n,role:"presentation",...t,__css:r.icon})});z6.displayName="ListIcon";var ir=ue(function(t,n){const{templateAreas:r,gap:o,rowGap:s,columnGap:c,column:u,row:f,autoFlow:p,autoRows:h,templateRows:y,autoColumns:x,templateColumns:S,...j}=t,C={display:"grid",gridTemplateAreas:r,gridGap:o,gridRowGap:s,gridColumnGap:c,gridAutoColumns:x,gridColumn:u,gridRow:f,gridAutoFlow:p,gridAutoRows:h,gridTemplateRows:y,gridTemplateColumns:S};return l.jsx(ne.div,{ref:n,__css:C,...j})});ir.displayName="Grid";function gy(e,t){return Array.isArray(e)?e.map(n=>n===null?null:t(n)):Qd(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}var kc=ne("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}});kc.displayName="Spacer";var yy=e=>l.jsx(ne.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});yy.displayName="StackItem";var jf="& > *:not(style) ~ *:not(style)";function R6(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,[jf]:gy(n,o=>r[o])}}function N6(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{"&":gy(n,o=>r[o])}}var Ch=ue((e,t)=>{const{isInline:n,direction:r,align:o,justify:s,spacing:c="0.5rem",wrap:u,children:f,divider:p,className:h,shouldWrapChildren:y,...x}=e,S=n?"row":r??"column",j=g.useMemo(()=>R6({direction:S,spacing:c}),[S,c]),C=g.useMemo(()=>N6({spacing:c,direction:S}),[c,S]),w=!!p,k=!y&&!w,I=g.useMemo(()=>{const M=ah(f);return k?M:M.map((T,D)=>{const _=typeof T.key<"u"?T.key:D,R=D+1===M.length,F=y?l.jsx(yy,{children:T},_):T;if(!w)return F;const B=g.cloneElement(p,{__css:C}),Q=R?null:B;return l.jsxs(g.Fragment,{children:[F,Q]},_)})},[p,C,w,k,y,f]),P=ze("chakra-stack",h);return l.jsx(ne.div,{ref:t,display:"flex",alignItems:o,justifyContent:s,flexDirection:j.flexDirection,flexWrap:u,className:P,__css:w?{}:{[jf]:j[jf]},...x,children:I})});Ch.displayName="Stack";var Fe=ue((e,t)=>l.jsx(Ch,{align:"center",...e,direction:"column",ref:t}));Fe.displayName="VStack";var oa=ue((e,t)=>l.jsx(Ch,{align:"center",...e,direction:"row",ref:t}));oa.displayName="HStack";var Wn=ue(function(t,n){const r=yo("Heading",t),{className:o,...s}=At(t);return l.jsx(ne.h2,{ref:n,className:ze("chakra-heading",t.className),...s,__css:r})});Wn.displayName="Heading";var Ye=ne("div");Ye.displayName="Box";var xy=ue(function(t,n){const{size:r,centerContent:o=!0,...s}=t,c=o?{display:"flex",alignItems:"center",justifyContent:"center"}:{};return l.jsx(Ye,{ref:n,boxSize:r,__css:{...c,flexShrink:0,flexGrow:0},...s})});xy.displayName="Square";var F6=ue(function(t,n){const{size:r,...o}=t;return l.jsx(xy,{size:r,ref:n,borderRadius:"9999px",...o})});F6.displayName="Circle";var qo=ue(function(t,n){const r=yo("Link",t),{className:o,isExternal:s,...c}=At(t);return l.jsx(ne.a,{target:s?"_blank":void 0,rel:s?"noopener":void 0,ref:n,className:ze("chakra-link",o),...c,__css:r})});qo.displayName="Link";var by=ue(function(t,n){const r=yo("Badge",t),{className:o,...s}=At(t);return l.jsx(ne.span,{ref:n,className:ze("chakra-badge",t.className),...s,__css:{display:"inline-block",whiteSpace:"nowrap",verticalAlign:"middle",...r}})});by.displayName="Badge";var Sy=ne("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});Sy.displayName="Center";var L6={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};ue(function(t,n){const{axis:r="both",...o}=t;return l.jsx(ne.div,{ref:n,__css:L6[r],...o,position:"absolute"})});var Cy=ue(function(t,n){const{borderLeftWidth:r,borderBottomWidth:o,borderTopWidth:s,borderRightWidth:c,borderWidth:u,borderStyle:f,borderColor:p,...h}=yo("Divider",t),{className:y,orientation:x="horizontal",__css:S,...j}=At(t),C={vertical:{borderLeftWidth:r||c||u||"1px",height:"100%"},horizontal:{borderBottomWidth:o||s||u||"1px",width:"100%"}};return l.jsx(ne.hr,{ref:n,"aria-orientation":x,...j,__css:{...h,border:"0",borderColor:p,borderStyle:f,...C[x],...S},className:ze("chakra-divider",y)})});Cy.displayName="Divider";function B6(e){const{key:t}=e;return t.length===1||t.length>1&&/[^a-zA-Z0-9]/.test(t)}function H6(e={}){const{timeout:t=300,preventDefault:n=()=>!0}=e,[r,o]=g.useState([]),s=g.useRef(),c=()=>{s.current&&(clearTimeout(s.current),s.current=null)},u=()=>{c(),s.current=setTimeout(()=>{o([]),s.current=null},t)};g.useEffect(()=>c,[]);function f(p){return h=>{if(h.key==="Backspace"){const y=[...r];y.pop(),o(y);return}if(B6(h)){const y=r.concat(h.key);n(h)&&(h.preventDefault(),h.stopPropagation()),o(y),p(y.join("")),u()}}}return f}function W6(e,t,n,r){if(t==null)return r;if(!r)return e.find(c=>n(c).toLowerCase().startsWith(t.toLowerCase()));const o=e.filter(s=>n(s).toLowerCase().startsWith(t.toLowerCase()));if(o.length>0){let s;return o.includes(r)?(s=o.indexOf(r)+1,s===o.length&&(s=0),o[s]):(s=e.indexOf(o[0]),e[s])}return r}function V6(){const e=g.useRef(new Map),t=e.current,n=g.useCallback((o,s,c,u)=>{e.current.set(c,{type:s,el:o,options:u}),o.addEventListener(s,c,u)},[]),r=g.useCallback((o,s,c,u)=>{o.removeEventListener(s,c,u),e.current.delete(c)},[]);return g.useEffect(()=>()=>{t.forEach((o,s)=>{r(o.el,o.type,s,o.options)})},[r,t]),{add:n,remove:r}}function wd(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return n!=="INPUT"&&n!=="TEXTAREA"&&r!==!0}function wy(e={}){const{ref:t,isDisabled:n,isFocusable:r,clickOnEnter:o=!0,clickOnSpace:s=!0,onMouseDown:c,onMouseUp:u,onClick:f,onKeyDown:p,onKeyUp:h,tabIndex:y,onMouseOver:x,onMouseLeave:S,...j}=e,[C,w]=g.useState(!0),[k,I]=g.useState(!1),P=V6(),M=$=>{$&&$.tagName!=="BUTTON"&&w(!1)},T=C?y:y||0,D=n&&!r,_=g.useCallback($=>{if(n){$.stopPropagation(),$.preventDefault();return}$.currentTarget.focus(),f==null||f($)},[n,f]),R=g.useCallback($=>{k&&wd($)&&($.preventDefault(),$.stopPropagation(),I(!1),P.remove(document,"keyup",R,!1))},[k,P]),V=g.useCallback($=>{if(p==null||p($),n||$.defaultPrevented||$.metaKey||!wd($.nativeEvent)||C)return;const Z=o&&$.key==="Enter";s&&$.key===" "&&($.preventDefault(),I(!0)),Z&&($.preventDefault(),$.currentTarget.click()),P.add(document,"keyup",R,!1)},[n,C,p,o,s,P,R]),F=g.useCallback($=>{if(h==null||h($),n||$.defaultPrevented||$.metaKey||!wd($.nativeEvent)||C)return;s&&$.key===" "&&($.preventDefault(),I(!1),$.currentTarget.click())},[s,C,n,h]),B=g.useCallback($=>{$.button===0&&(I(!1),P.remove(document,"mouseup",B,!1))},[P]),Q=g.useCallback($=>{if($.button!==0)return;if(n){$.stopPropagation(),$.preventDefault();return}C||I(!0),$.currentTarget.focus({preventScroll:!0}),P.add(document,"mouseup",B,!1),c==null||c($)},[n,C,c,P,B]),U=g.useCallback($=>{$.button===0&&(C||I(!1),u==null||u($))},[u,C]),X=g.useCallback($=>{if(n){$.preventDefault();return}x==null||x($)},[n,x]),te=g.useCallback($=>{k&&($.preventDefault(),I(!1)),S==null||S($)},[k,S]),re=ct(t,M);return C?{...j,ref:re,type:"button","aria-disabled":D?void 0:n,disabled:D,onClick:_,onMouseDown:c,onMouseUp:u,onKeyUp:h,onKeyDown:p,onMouseOver:x,onMouseLeave:S}:{...j,ref:re,role:"button","data-active":qe(k),"aria-disabled":n?"true":void 0,tabIndex:D?void 0:T,onClick:_,onMouseDown:Q,onMouseUp:U,onKeyUp:F,onKeyDown:V,onMouseOver:X,onMouseLeave:te}}function U6(e){const t=e.current;if(!t)return!1;const n=x6(t);return!n||t.contains(n)?!1:!!w6(n)}function jy(e,t){const{shouldFocus:n,visible:r,focusRef:o}=t,s=n&&!r;ti(()=>{if(!s||U6(e))return;const c=(o==null?void 0:o.current)||e.current;c&&requestAnimationFrame(()=>{c.focus()})},[s,e,o])}var $6={preventScroll:!0,shouldFocus:!1};function G6(e,t=$6){const{focusRef:n,preventScroll:r,shouldFocus:o,visible:s}=t,c=q6(e)?e.current:e,u=o&&s,f=g.useRef(u),p=g.useRef(s);Hi(()=>{!p.current&&s&&(f.current=u),p.current=s},[s,u]);const h=g.useCallback(()=>{if(!(!s||!c||!f.current)&&(f.current=!1,!c.contains(document.activeElement)))if(n!=null&&n.current)requestAnimationFrame(()=>{var y;(y=n.current)==null||y.focus({preventScroll:r})});else{const y=hy(c);y.length>0&&requestAnimationFrame(()=>{y[0].focus({preventScroll:r})})}},[s,r,c,n]);ti(()=>{h()},[h]),Go(c,"transitionend",h)}function q6(e){return"current"in e}var ji=(e,t)=>({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),Ht={arrowShadowColor:ji("--popper-arrow-shadow-color"),arrowSize:ji("--popper-arrow-size","8px"),arrowSizeHalf:ji("--popper-arrow-size-half"),arrowBg:ji("--popper-arrow-bg"),transformOrigin:ji("--popper-transform-origin"),arrowOffset:ji("--popper-arrow-offset")};function Y6(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 K6={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"},X6=e=>K6[e],hg={scroll:!0,resize:!0};function Q6(e){let t;return typeof e=="object"?t={enabled:!0,options:{...hg,...e}}:t={enabled:e,options:hg},t}var Z6={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`}},J6={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{pg(e)},effect:({state:e})=>()=>{pg(e)}},pg=e=>{e.elements.popper.style.setProperty(Ht.transformOrigin.var,X6(e.placement))},ej={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{tj(e)}},tj=e=>{var t;if(!e.placement)return;const n=nj(e.placement);if((t=e.elements)!=null&&t.arrow&&n){Object.assign(e.elements.arrow.style,{[n.property]:n.value,width:Ht.arrowSize.varRef,height:Ht.arrowSize.varRef,zIndex:-1});const r={[Ht.arrowSizeHalf.var]:`calc(${Ht.arrowSize.varRef} / 2)`,[Ht.arrowOffset.var]:`calc(${Ht.arrowSizeHalf.varRef} * -1)`};for(const o in r)e.elements.arrow.style.setProperty(o,r[o])}},nj=e=>{if(e.startsWith("top"))return{property:"bottom",value:Ht.arrowOffset.varRef};if(e.startsWith("bottom"))return{property:"top",value:Ht.arrowOffset.varRef};if(e.startsWith("left"))return{property:"right",value:Ht.arrowOffset.varRef};if(e.startsWith("right"))return{property:"left",value:Ht.arrowOffset.varRef}},rj={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{mg(e)},effect:({state:e})=>()=>{mg(e)}},mg=e=>{if(!e.elements.arrow)return;const t=e.elements.arrow.querySelector("[data-popper-arrow-inner]");if(!t)return;const n=Y6(e.placement);n&&t.style.setProperty("--popper-arrow-default-shadow",n),Object.assign(t.style,{transform:"rotate(45deg)",background:Ht.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:"var(--popper-arrow-shadow, var(--popper-arrow-default-shadow))"})},oj={"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"}},ij={"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 aj(e,t="ltr"){var n,r;const o=((n=oj[e])==null?void 0:n[t])||e;return t==="ltr"?o:(r=ij[e])!=null?r:o}var Pn="top",Un="bottom",$n="right",In="left",wh="auto",ds=[Pn,Un,$n,In],Gi="start",Ka="end",sj="clippingParents",ky="viewport",_a="popper",lj="reference",vg=ds.reduce(function(e,t){return e.concat([t+"-"+Gi,t+"-"+Ka])},[]),Ey=[].concat(ds,[wh]).reduce(function(e,t){return e.concat([t,t+"-"+Gi,t+"-"+Ka])},[]),cj="beforeRead",uj="read",dj="afterRead",fj="beforeMain",hj="main",pj="afterMain",mj="beforeWrite",vj="write",gj="afterWrite",yj=[cj,uj,dj,fj,hj,pj,mj,vj,gj];function kr(e){return e?(e.nodeName||"").toLowerCase():null}function Gn(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Qo(e){var t=Gn(e).Element;return e instanceof t||e instanceof Element}function Vn(e){var t=Gn(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function jh(e){if(typeof ShadowRoot>"u")return!1;var t=Gn(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function xj(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},o=t.attributes[n]||{},s=t.elements[n];!Vn(s)||!kr(s)||(Object.assign(s.style,r),Object.keys(o).forEach(function(c){var u=o[c];u===!1?s.removeAttribute(c):s.setAttribute(c,u===!0?"":u)}))})}function bj(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 o=t.elements[r],s=t.attributes[r]||{},c=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),u=c.reduce(function(f,p){return f[p]="",f},{});!Vn(o)||!kr(o)||(Object.assign(o.style,u),Object.keys(s).forEach(function(f){o.removeAttribute(f)}))})}}const Sj={name:"applyStyles",enabled:!0,phase:"write",fn:xj,effect:bj,requires:["computeStyles"]};function Cr(e){return e.split("-")[0]}var Yo=Math.max,ac=Math.min,qi=Math.round;function kf(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Py(){return!/^((?!chrome|android).)*safari/i.test(kf())}function Yi(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),o=1,s=1;t&&Vn(e)&&(o=e.offsetWidth>0&&qi(r.width)/e.offsetWidth||1,s=e.offsetHeight>0&&qi(r.height)/e.offsetHeight||1);var c=Qo(e)?Gn(e):window,u=c.visualViewport,f=!Py()&&n,p=(r.left+(f&&u?u.offsetLeft:0))/o,h=(r.top+(f&&u?u.offsetTop:0))/s,y=r.width/o,x=r.height/s;return{width:y,height:x,top:h,right:p+y,bottom:h+x,left:p,x:p,y:h}}function kh(e){var t=Yi(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 Iy(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&jh(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Fr(e){return Gn(e).getComputedStyle(e)}function Cj(e){return["table","td","th"].indexOf(kr(e))>=0}function bo(e){return((Qo(e)?e.ownerDocument:e.document)||window.document).documentElement}function Ec(e){return kr(e)==="html"?e:e.assignedSlot||e.parentNode||(jh(e)?e.host:null)||bo(e)}function gg(e){return!Vn(e)||Fr(e).position==="fixed"?null:e.offsetParent}function wj(e){var t=/firefox/i.test(kf()),n=/Trident/i.test(kf());if(n&&Vn(e)){var r=Fr(e);if(r.position==="fixed")return null}var o=Ec(e);for(jh(o)&&(o=o.host);Vn(o)&&["html","body"].indexOf(kr(o))<0;){var s=Fr(o);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||t&&s.willChange==="filter"||t&&s.filter&&s.filter!=="none")return o;o=o.parentNode}return null}function fs(e){for(var t=Gn(e),n=gg(e);n&&Cj(n)&&Fr(n).position==="static";)n=gg(n);return n&&(kr(n)==="html"||kr(n)==="body"&&Fr(n).position==="static")?t:n||wj(e)||t}function Eh(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Fa(e,t,n){return Yo(e,ac(t,n))}function jj(e,t,n){var r=Fa(e,t,n);return r>n?n:r}function My(){return{top:0,right:0,bottom:0,left:0}}function Ty(e){return Object.assign({},My(),e)}function _y(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var kj=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,Ty(typeof t!="number"?t:_y(t,ds))};function Ej(e){var t,n=e.state,r=e.name,o=e.options,s=n.elements.arrow,c=n.modifiersData.popperOffsets,u=Cr(n.placement),f=Eh(u),p=[In,$n].indexOf(u)>=0,h=p?"height":"width";if(!(!s||!c)){var y=kj(o.padding,n),x=kh(s),S=f==="y"?Pn:In,j=f==="y"?Un:$n,C=n.rects.reference[h]+n.rects.reference[f]-c[f]-n.rects.popper[h],w=c[f]-n.rects.reference[f],k=fs(s),I=k?f==="y"?k.clientHeight||0:k.clientWidth||0:0,P=C/2-w/2,M=y[S],T=I-x[h]-y[j],D=I/2-x[h]/2+P,_=Fa(M,D,T),R=f;n.modifiersData[r]=(t={},t[R]=_,t.centerOffset=_-D,t)}}function Pj(e){var t=e.state,n=e.options,r=n.element,o=r===void 0?"[data-popper-arrow]":r;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||Iy(t.elements.popper,o)&&(t.elements.arrow=o))}const Ij={name:"arrow",enabled:!0,phase:"main",fn:Ej,effect:Pj,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ki(e){return e.split("-")[1]}var Mj={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Tj(e){var t=e.x,n=e.y,r=window,o=r.devicePixelRatio||1;return{x:qi(t*o)/o||0,y:qi(n*o)/o||0}}function yg(e){var t,n=e.popper,r=e.popperRect,o=e.placement,s=e.variation,c=e.offsets,u=e.position,f=e.gpuAcceleration,p=e.adaptive,h=e.roundOffsets,y=e.isFixed,x=c.x,S=x===void 0?0:x,j=c.y,C=j===void 0?0:j,w=typeof h=="function"?h({x:S,y:C}):{x:S,y:C};S=w.x,C=w.y;var k=c.hasOwnProperty("x"),I=c.hasOwnProperty("y"),P=In,M=Pn,T=window;if(p){var D=fs(n),_="clientHeight",R="clientWidth";if(D===Gn(n)&&(D=bo(n),Fr(D).position!=="static"&&u==="absolute"&&(_="scrollHeight",R="scrollWidth")),D=D,o===Pn||(o===In||o===$n)&&s===Ka){M=Un;var V=y&&D===T&&T.visualViewport?T.visualViewport.height:D[_];C-=V-r.height,C*=f?1:-1}if(o===In||(o===Pn||o===Un)&&s===Ka){P=$n;var F=y&&D===T&&T.visualViewport?T.visualViewport.width:D[R];S-=F-r.width,S*=f?1:-1}}var B=Object.assign({position:u},p&&Mj),Q=h===!0?Tj({x:S,y:C}):{x:S,y:C};if(S=Q.x,C=Q.y,f){var U;return Object.assign({},B,(U={},U[M]=I?"0":"",U[P]=k?"0":"",U.transform=(T.devicePixelRatio||1)<=1?"translate("+S+"px, "+C+"px)":"translate3d("+S+"px, "+C+"px, 0)",U))}return Object.assign({},B,(t={},t[M]=I?C+"px":"",t[P]=k?S+"px":"",t.transform="",t))}function _j(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=r===void 0?!0:r,s=n.adaptive,c=s===void 0?!0:s,u=n.roundOffsets,f=u===void 0?!0:u,p={placement:Cr(t.placement),variation:Ki(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,yg(Object.assign({},p,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:c,roundOffsets:f})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,yg(Object.assign({},p,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:f})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Dj={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:_j,data:{}};var Sl={passive:!0};function Aj(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,s=o===void 0?!0:o,c=r.resize,u=c===void 0?!0:c,f=Gn(t.elements.popper),p=[].concat(t.scrollParents.reference,t.scrollParents.popper);return s&&p.forEach(function(h){h.addEventListener("scroll",n.update,Sl)}),u&&f.addEventListener("resize",n.update,Sl),function(){s&&p.forEach(function(h){h.removeEventListener("scroll",n.update,Sl)}),u&&f.removeEventListener("resize",n.update,Sl)}}const Oj={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Aj,data:{}};var zj={left:"right",right:"left",bottom:"top",top:"bottom"};function Wl(e){return e.replace(/left|right|bottom|top/g,function(t){return zj[t]})}var Rj={start:"end",end:"start"};function xg(e){return e.replace(/start|end/g,function(t){return Rj[t]})}function Ph(e){var t=Gn(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Ih(e){return Yi(bo(e)).left+Ph(e).scrollLeft}function Nj(e,t){var n=Gn(e),r=bo(e),o=n.visualViewport,s=r.clientWidth,c=r.clientHeight,u=0,f=0;if(o){s=o.width,c=o.height;var p=Py();(p||!p&&t==="fixed")&&(u=o.offsetLeft,f=o.offsetTop)}return{width:s,height:c,x:u+Ih(e),y:f}}function Fj(e){var t,n=bo(e),r=Ph(e),o=(t=e.ownerDocument)==null?void 0:t.body,s=Yo(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),c=Yo(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),u=-r.scrollLeft+Ih(e),f=-r.scrollTop;return Fr(o||n).direction==="rtl"&&(u+=Yo(n.clientWidth,o?o.clientWidth:0)-s),{width:s,height:c,x:u,y:f}}function Mh(e){var t=Fr(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function Dy(e){return["html","body","#document"].indexOf(kr(e))>=0?e.ownerDocument.body:Vn(e)&&Mh(e)?e:Dy(Ec(e))}function La(e,t){var n;t===void 0&&(t=[]);var r=Dy(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),s=Gn(r),c=o?[s].concat(s.visualViewport||[],Mh(r)?r:[]):r,u=t.concat(c);return o?u:u.concat(La(Ec(c)))}function Ef(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Lj(e,t){var n=Yi(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 bg(e,t,n){return t===ky?Ef(Nj(e,n)):Qo(t)?Lj(t,n):Ef(Fj(bo(e)))}function Bj(e){var t=La(Ec(e)),n=["absolute","fixed"].indexOf(Fr(e).position)>=0,r=n&&Vn(e)?fs(e):e;return Qo(r)?t.filter(function(o){return Qo(o)&&Iy(o,r)&&kr(o)!=="body"}):[]}function Hj(e,t,n,r){var o=t==="clippingParents"?Bj(e):[].concat(t),s=[].concat(o,[n]),c=s[0],u=s.reduce(function(f,p){var h=bg(e,p,r);return f.top=Yo(h.top,f.top),f.right=ac(h.right,f.right),f.bottom=ac(h.bottom,f.bottom),f.left=Yo(h.left,f.left),f},bg(e,c,r));return u.width=u.right-u.left,u.height=u.bottom-u.top,u.x=u.left,u.y=u.top,u}function Ay(e){var t=e.reference,n=e.element,r=e.placement,o=r?Cr(r):null,s=r?Ki(r):null,c=t.x+t.width/2-n.width/2,u=t.y+t.height/2-n.height/2,f;switch(o){case Pn:f={x:c,y:t.y-n.height};break;case Un:f={x:c,y:t.y+t.height};break;case $n:f={x:t.x+t.width,y:u};break;case In:f={x:t.x-n.width,y:u};break;default:f={x:t.x,y:t.y}}var p=o?Eh(o):null;if(p!=null){var h=p==="y"?"height":"width";switch(s){case Gi:f[p]=f[p]-(t[h]/2-n[h]/2);break;case Ka:f[p]=f[p]+(t[h]/2-n[h]/2);break}}return f}function Xa(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=r===void 0?e.placement:r,s=n.strategy,c=s===void 0?e.strategy:s,u=n.boundary,f=u===void 0?sj:u,p=n.rootBoundary,h=p===void 0?ky:p,y=n.elementContext,x=y===void 0?_a:y,S=n.altBoundary,j=S===void 0?!1:S,C=n.padding,w=C===void 0?0:C,k=Ty(typeof w!="number"?w:_y(w,ds)),I=x===_a?lj:_a,P=e.rects.popper,M=e.elements[j?I:x],T=Hj(Qo(M)?M:M.contextElement||bo(e.elements.popper),f,h,c),D=Yi(e.elements.reference),_=Ay({reference:D,element:P,strategy:"absolute",placement:o}),R=Ef(Object.assign({},P,_)),V=x===_a?R:D,F={top:T.top-V.top+k.top,bottom:V.bottom-T.bottom+k.bottom,left:T.left-V.left+k.left,right:V.right-T.right+k.right},B=e.modifiersData.offset;if(x===_a&&B){var Q=B[o];Object.keys(F).forEach(function(U){var X=[$n,Un].indexOf(U)>=0?1:-1,te=[Pn,Un].indexOf(U)>=0?"y":"x";F[U]+=Q[te]*X})}return F}function Wj(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=n.boundary,s=n.rootBoundary,c=n.padding,u=n.flipVariations,f=n.allowedAutoPlacements,p=f===void 0?Ey:f,h=Ki(r),y=h?u?vg:vg.filter(function(j){return Ki(j)===h}):ds,x=y.filter(function(j){return p.indexOf(j)>=0});x.length===0&&(x=y);var S=x.reduce(function(j,C){return j[C]=Xa(e,{placement:C,boundary:o,rootBoundary:s,padding:c})[Cr(C)],j},{});return Object.keys(S).sort(function(j,C){return S[j]-S[C]})}function Vj(e){if(Cr(e)===wh)return[];var t=Wl(e);return[xg(e),t,xg(t)]}function Uj(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,s=o===void 0?!0:o,c=n.altAxis,u=c===void 0?!0:c,f=n.fallbackPlacements,p=n.padding,h=n.boundary,y=n.rootBoundary,x=n.altBoundary,S=n.flipVariations,j=S===void 0?!0:S,C=n.allowedAutoPlacements,w=t.options.placement,k=Cr(w),I=k===w,P=f||(I||!j?[Wl(w)]:Vj(w)),M=[w].concat(P).reduce(function(he,se){return he.concat(Cr(se)===wh?Wj(t,{placement:se,boundary:h,rootBoundary:y,padding:p,flipVariations:j,allowedAutoPlacements:C}):se)},[]),T=t.rects.reference,D=t.rects.popper,_=new Map,R=!0,V=M[0],F=0;F=0,te=X?"width":"height",re=Xa(t,{placement:B,boundary:h,rootBoundary:y,altBoundary:x,padding:p}),$=X?U?$n:In:U?Un:Pn;T[te]>D[te]&&($=Wl($));var Z=Wl($),fe=[];if(s&&fe.push(re[Q]<=0),u&&fe.push(re[$]<=0,re[Z]<=0),fe.every(function(he){return he})){V=B,R=!1;break}_.set(B,fe)}if(R)for(var Se=j?3:1,Me=function(se){var Ne=M.find(function(Ve){var Ue=_.get(Ve);if(Ue)return Ue.slice(0,se).every(function($e){return $e})});if(Ne)return V=Ne,"break"},Ie=Se;Ie>0;Ie--){var Pe=Me(Ie);if(Pe==="break")break}t.placement!==V&&(t.modifiersData[r]._skip=!0,t.placement=V,t.reset=!0)}}const $j={name:"flip",enabled:!0,phase:"main",fn:Uj,requiresIfExists:["offset"],data:{_skip:!1}};function Sg(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 Cg(e){return[Pn,$n,Un,In].some(function(t){return e[t]>=0})}function Gj(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,s=t.modifiersData.preventOverflow,c=Xa(t,{elementContext:"reference"}),u=Xa(t,{altBoundary:!0}),f=Sg(c,r),p=Sg(u,o,s),h=Cg(f),y=Cg(p);t.modifiersData[n]={referenceClippingOffsets:f,popperEscapeOffsets:p,isReferenceHidden:h,hasPopperEscaped:y},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":y})}const qj={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Gj};function Yj(e,t,n){var r=Cr(e),o=[In,Pn].indexOf(r)>=0?-1:1,s=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,c=s[0],u=s[1];return c=c||0,u=(u||0)*o,[In,$n].indexOf(r)>=0?{x:u,y:c}:{x:c,y:u}}function Kj(e){var t=e.state,n=e.options,r=e.name,o=n.offset,s=o===void 0?[0,0]:o,c=Ey.reduce(function(h,y){return h[y]=Yj(y,t.rects,s),h},{}),u=c[t.placement],f=u.x,p=u.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=f,t.modifiersData.popperOffsets.y+=p),t.modifiersData[r]=c}const Xj={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Kj};function Qj(e){var t=e.state,n=e.name;t.modifiersData[n]=Ay({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Zj={name:"popperOffsets",enabled:!0,phase:"read",fn:Qj,data:{}};function Jj(e){return e==="x"?"y":"x"}function ek(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,s=o===void 0?!0:o,c=n.altAxis,u=c===void 0?!1:c,f=n.boundary,p=n.rootBoundary,h=n.altBoundary,y=n.padding,x=n.tether,S=x===void 0?!0:x,j=n.tetherOffset,C=j===void 0?0:j,w=Xa(t,{boundary:f,rootBoundary:p,padding:y,altBoundary:h}),k=Cr(t.placement),I=Ki(t.placement),P=!I,M=Eh(k),T=Jj(M),D=t.modifiersData.popperOffsets,_=t.rects.reference,R=t.rects.popper,V=typeof C=="function"?C(Object.assign({},t.rects,{placement:t.placement})):C,F=typeof V=="number"?{mainAxis:V,altAxis:V}:Object.assign({mainAxis:0,altAxis:0},V),B=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,Q={x:0,y:0};if(D){if(s){var U,X=M==="y"?Pn:In,te=M==="y"?Un:$n,re=M==="y"?"height":"width",$=D[M],Z=$+w[X],fe=$-w[te],Se=S?-R[re]/2:0,Me=I===Gi?_[re]:R[re],Ie=I===Gi?-R[re]:-_[re],Pe=t.elements.arrow,he=S&&Pe?kh(Pe):{width:0,height:0},se=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:My(),Ne=se[X],Ve=se[te],Ue=Fa(0,_[re],he[re]),$e=P?_[re]/2-Se-Ue-Ne-F.mainAxis:Me-Ue-Ne-F.mainAxis,Qe=P?-_[re]/2+Se+Ue+Ve+F.mainAxis:Ie+Ue+Ve+F.mainAxis,me=t.elements.arrow&&fs(t.elements.arrow),De=me?M==="y"?me.clientTop||0:me.clientLeft||0:0,Ge=(U=B==null?void 0:B[M])!=null?U:0,ge=$+$e-Ge-De,Te=$+Qe-Ge,et=Fa(S?ac(Z,ge):Z,$,S?Yo(fe,Te):fe);D[M]=et,Q[M]=et-$}if(u){var Be,vt=M==="x"?Pn:In,Rt=M==="x"?Un:$n,N=D[T],le=T==="y"?"height":"width",ye=N+w[vt],je=N-w[Rt],q=[Pn,In].indexOf(k)!==-1,ie=(Be=B==null?void 0:B[T])!=null?Be:0,Re=q?ye:N-_[le]-R[le]-ie+F.altAxis,Ze=q?N+_[le]+R[le]-ie-F.altAxis:je,J=S&&q?jj(Re,N,Ze):Fa(S?Re:ye,N,S?Ze:je);D[T]=J,Q[T]=J-N}t.modifiersData[r]=Q}}const tk={name:"preventOverflow",enabled:!0,phase:"main",fn:ek,requiresIfExists:["offset"]};function nk(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function rk(e){return e===Gn(e)||!Vn(e)?Ph(e):nk(e)}function ok(e){var t=e.getBoundingClientRect(),n=qi(t.width)/e.offsetWidth||1,r=qi(t.height)/e.offsetHeight||1;return n!==1||r!==1}function ik(e,t,n){n===void 0&&(n=!1);var r=Vn(t),o=Vn(t)&&ok(t),s=bo(t),c=Yi(e,o,n),u={scrollLeft:0,scrollTop:0},f={x:0,y:0};return(r||!r&&!n)&&((kr(t)!=="body"||Mh(s))&&(u=rk(t)),Vn(t)?(f=Yi(t,!0),f.x+=t.clientLeft,f.y+=t.clientTop):s&&(f.x=Ih(s))),{x:c.left+u.scrollLeft-f.x,y:c.top+u.scrollTop-f.y,width:c.width,height:c.height}}function ak(e){var t=new Map,n=new Set,r=[];e.forEach(function(s){t.set(s.name,s)});function o(s){n.add(s.name);var c=[].concat(s.requires||[],s.requiresIfExists||[]);c.forEach(function(u){if(!n.has(u)){var f=t.get(u);f&&o(f)}}),r.push(s)}return e.forEach(function(s){n.has(s.name)||o(s)}),r}function sk(e){var t=ak(e);return yj.reduce(function(n,r){return n.concat(t.filter(function(o){return o.phase===r}))},[])}function lk(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function ck(e){var t=e.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var wg={placement:"bottom",modifiers:[],strategy:"absolute"};function jg(){for(var e=arguments.length,t=new Array(e),n=0;n{}),P=g.useCallback(()=>{var F;!t||!j.current||!C.current||((F=I.current)==null||F.call(I),w.current=fk(j.current,C.current,{placement:k,modifiers:[rj,ej,J6,{...Z6,enabled:!!x},{name:"eventListeners",...Q6(c)},{name:"arrow",options:{padding:s}},{name:"offset",options:{offset:u??[0,f]}},{name:"flip",enabled:!!p,options:{padding:8}},{name:"preventOverflow",enabled:!!y,options:{boundary:h}},...n??[]],strategy:o}),w.current.forceUpdate(),I.current=w.current.destroy)},[k,t,n,x,c,s,u,f,p,y,h,o]);g.useEffect(()=>()=>{var F;!j.current&&!C.current&&((F=w.current)==null||F.destroy(),w.current=null)},[]);const M=g.useCallback(F=>{j.current=F,P()},[P]),T=g.useCallback((F={},B=null)=>({...F,ref:ct(M,B)}),[M]),D=g.useCallback(F=>{C.current=F,P()},[P]),_=g.useCallback((F={},B=null)=>({...F,ref:ct(D,B),style:{...F.style,position:o,minWidth:x?void 0:"max-content",inset:"0 auto auto 0"}}),[o,D,x]),R=g.useCallback((F={},B=null)=>{const{size:Q,shadowColor:U,bg:X,style:te,...re}=F;return{...re,ref:B,"data-popper-arrow":"",style:hk(F)}},[]),V=g.useCallback((F={},B=null)=>({...F,ref:B,"data-popper-arrow-inner":""}),[]);return{update(){var F;(F=w.current)==null||F.update()},forceUpdate(){var F;(F=w.current)==null||F.forceUpdate()},transformOrigin:Ht.transformOrigin.varRef,referenceRef:M,popperRef:D,getPopperProps:_,getArrowProps:R,getArrowInnerProps:V,getReferenceProps:T}}function hk(e){const{size:t,shadowColor:n,bg:r,style:o}=e,s={...o,position:"absolute"};return t&&(s["--popper-arrow-size"]=t),n&&(s["--popper-arrow-shadow-color"]=n),r&&(s["--popper-arrow-bg"]=r),s}function _h(e={}){const{onClose:t,onOpen:n,isOpen:r,id:o}=e,s=Wt(n),c=Wt(t),[u,f]=g.useState(e.defaultIsOpen||!1),p=r!==void 0?r:u,h=r!==void 0,y=g.useId(),x=o??`disclosure-${y}`,S=g.useCallback(()=>{h||f(!1),c==null||c()},[h,c]),j=g.useCallback(()=>{h||f(!0),s==null||s()},[h,s]),C=g.useCallback(()=>{p?S():j()},[p,j,S]);function w(I={}){return{...I,"aria-expanded":p,"aria-controls":x,onClick(P){var M;(M=I.onClick)==null||M.call(I,P),C()}}}function k(I={}){return{...I,hidden:!p,id:x}}return{isOpen:p,onOpen:j,onClose:S,onToggle:C,isControlled:h,getButtonProps:w,getDisclosureProps:k}}function pk(e){const{ref:t,handler:n,enabled:r=!0}=e,o=Wt(n),c=g.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}).current;g.useEffect(()=>{if(!r)return;const u=y=>{jd(y,t)&&(c.isPointerDown=!0)},f=y=>{if(c.ignoreEmulatedMouseEvents){c.ignoreEmulatedMouseEvents=!1;return}c.isPointerDown&&n&&jd(y,t)&&(c.isPointerDown=!1,o(y))},p=y=>{c.ignoreEmulatedMouseEvents=!0,n&&c.isPointerDown&&jd(y,t)&&(c.isPointerDown=!1,o(y))},h=Oy(t.current);return h.addEventListener("mousedown",u,!0),h.addEventListener("mouseup",f,!0),h.addEventListener("touchstart",u,!0),h.addEventListener("touchend",p,!0),()=>{h.removeEventListener("mousedown",u,!0),h.removeEventListener("mouseup",f,!0),h.removeEventListener("touchstart",u,!0),h.removeEventListener("touchend",p,!0)}},[n,t,o,c,r])}function jd(e,t){var n;const r=e.target;return e.button>0||r&&!Oy(r).contains(r)?!1:!((n=t.current)!=null&&n.contains(r))}function Oy(e){var t;return(t=e==null?void 0:e.ownerDocument)!=null?t:document}function zy(e){const{isOpen:t,ref:n}=e,[r,o]=g.useState(t),[s,c]=g.useState(!1);return g.useEffect(()=>{s||(o(t),c(!0))},[t,s,r]),Go(()=>n.current,"animationend",()=>{o(t)}),{present:!(t?!1:!r),onComplete(){var f;const p=y6(n.current),h=new p.CustomEvent("animationend",{bubbles:!0});(f=n.current)==null||f.dispatchEvent(h)}}}function Dh(e){const{wasSelected:t,enabled:n,isSelected:r,mode:o="unmount"}=e;return!!(!n||r||o==="keepMounted"&&t)}var[mk,vk,gk,yk]=th(),[xk,hs]=kt({strict:!1,name:"MenuContext"});function bk(e,...t){const n=g.useId(),r=e||n;return g.useMemo(()=>t.map(o=>`${o}-${r}`),[r,t])}function Ry(e){var t;return(t=e==null?void 0:e.ownerDocument)!=null?t:document}function kg(e){return Ry(e).activeElement===e}function Sk(e={}){const{id:t,closeOnSelect:n=!0,closeOnBlur:r=!0,initialFocusRef:o,autoSelect:s=!0,isLazy:c,isOpen:u,defaultIsOpen:f,onClose:p,onOpen:h,placement:y="bottom-start",lazyBehavior:x="unmount",direction:S,computePositionOnMount:j=!1,...C}=e,w=g.useRef(null),k=g.useRef(null),I=gk(),P=g.useCallback(()=>{requestAnimationFrame(()=>{var Pe;(Pe=w.current)==null||Pe.focus({preventScroll:!1})})},[]),M=g.useCallback(()=>{const Pe=setTimeout(()=>{var he;if(o)(he=o.current)==null||he.focus();else{const se=I.firstEnabled();se&&U(se.index)}});Z.current.add(Pe)},[I,o]),T=g.useCallback(()=>{const Pe=setTimeout(()=>{const he=I.lastEnabled();he&&U(he.index)});Z.current.add(Pe)},[I]),D=g.useCallback(()=>{h==null||h(),s?M():P()},[s,M,P,h]),{isOpen:_,onOpen:R,onClose:V,onToggle:F}=_h({isOpen:u,defaultIsOpen:f,onClose:p,onOpen:D});pk({enabled:_&&r,ref:w,handler:Pe=>{var he;(he=k.current)!=null&&he.contains(Pe.target)||V()}});const B=Th({...C,enabled:_||j,placement:y,direction:S}),[Q,U]=g.useState(-1);ti(()=>{_||U(-1)},[_]),jy(w,{focusRef:k,visible:_,shouldFocus:!0});const X=zy({isOpen:_,ref:w}),[te,re]=bk(t,"menu-button","menu-list"),$=g.useCallback(()=>{R(),P()},[R,P]),Z=g.useRef(new Set([]));Ik(()=>{Z.current.forEach(Pe=>clearTimeout(Pe)),Z.current.clear()});const fe=g.useCallback(()=>{R(),M()},[M,R]),Se=g.useCallback(()=>{R(),T()},[R,T]),Me=g.useCallback(()=>{var Pe,he;const se=Ry(w.current),Ne=(Pe=w.current)==null?void 0:Pe.contains(se.activeElement);if(!(_&&!Ne))return;const Ue=(he=I.item(Q))==null?void 0:he.node;Ue==null||Ue.focus()},[_,Q,I]),Ie=g.useRef(null);return{openAndFocusMenu:$,openAndFocusFirstItem:fe,openAndFocusLastItem:Se,onTransitionEnd:Me,unstable__animationState:X,descendants:I,popper:B,buttonId:te,menuId:re,forceUpdate:B.forceUpdate,orientation:"vertical",isOpen:_,onToggle:F,onOpen:R,onClose:V,menuRef:w,buttonRef:k,focusedIndex:Q,closeOnSelect:n,closeOnBlur:r,autoSelect:s,setFocusedIndex:U,isLazy:c,lazyBehavior:x,initialFocusRef:o,rafId:Ie}}function Ck(e={},t=null){const n=hs(),{onToggle:r,popper:o,openAndFocusFirstItem:s,openAndFocusLastItem:c}=n,u=g.useCallback(f=>{const p=f.key,y={Enter:s,ArrowDown:s,ArrowUp:c}[p];y&&(f.preventDefault(),f.stopPropagation(),y(f))},[s,c]);return{...e,ref:ct(n.buttonRef,t,o.referenceRef),id:n.buttonId,"data-active":qe(n.isOpen),"aria-expanded":n.isOpen,"aria-haspopup":"menu","aria-controls":n.menuId,onClick:Ee(e.onClick,r),onKeyDown:Ee(e.onKeyDown,u)}}function Pf(e){var t;return Ek(e)&&!!((t=e==null?void 0:e.getAttribute("role"))!=null&&t.startsWith("menuitem"))}function wk(e={},t=null){const n=hs();if(!n)throw new Error("useMenuContext: context is undefined. Seems you forgot to wrap component within ");const{focusedIndex:r,setFocusedIndex:o,menuRef:s,isOpen:c,onClose:u,menuId:f,isLazy:p,lazyBehavior:h,unstable__animationState:y}=n,x=vk(),S=H6({preventDefault:k=>k.key!==" "&&Pf(k.target)}),j=g.useCallback(k=>{const I=k.key,M={Tab:D=>D.preventDefault(),Escape:u,ArrowDown:()=>{const D=x.nextEnabled(r);D&&o(D.index)},ArrowUp:()=>{const D=x.prevEnabled(r);D&&o(D.index)}}[I];if(M){k.preventDefault(),M(k);return}const T=S(D=>{const _=W6(x.values(),D,R=>{var V,F;return(F=(V=R==null?void 0:R.node)==null?void 0:V.textContent)!=null?F:""},x.item(r));if(_){const R=x.indexOf(_.node);o(R)}});Pf(k.target)&&T(k)},[x,r,S,u,o]),C=g.useRef(!1);c&&(C.current=!0);const w=Dh({wasSelected:C.current,enabled:p,mode:h,isSelected:y.present});return{...e,ref:ct(s,t),children:w?e.children:null,tabIndex:-1,role:"menu",id:f,style:{...e.style,transformOrigin:"var(--popper-transform-origin)"},"aria-orientation":"vertical",onKeyDown:Ee(e.onKeyDown,j)}}function jk(e={}){const{popper:t,isOpen:n}=hs();return t.getPopperProps({...e,style:{visibility:n?"visible":"hidden",...e.style}})}function kk(e={},t=null){const{onMouseEnter:n,onMouseMove:r,onMouseLeave:o,onClick:s,onFocus:c,isDisabled:u,isFocusable:f,closeOnSelect:p,type:h,...y}=e,x=hs(),{setFocusedIndex:S,focusedIndex:j,closeOnSelect:C,onClose:w,menuRef:k,isOpen:I,menuId:P,rafId:M}=x,T=g.useRef(null),D=`${P}-menuitem-${g.useId()}`,{index:_,register:R}=yk({disabled:u&&!f}),V=g.useCallback($=>{n==null||n($),!u&&S(_)},[S,_,u,n]),F=g.useCallback($=>{r==null||r($),T.current&&!kg(T.current)&&V($)},[V,r]),B=g.useCallback($=>{o==null||o($),!u&&S(-1)},[S,u,o]),Q=g.useCallback($=>{s==null||s($),Pf($.currentTarget)&&(p??C)&&w()},[w,s,C,p]),U=g.useCallback($=>{c==null||c($),S(_)},[S,c,_]),X=_===j,te=u&&!f;ti(()=>{I&&(X&&!te&&T.current?(M.current&&cancelAnimationFrame(M.current),M.current=requestAnimationFrame(()=>{var $;($=T.current)==null||$.focus(),M.current=null})):k.current&&!kg(k.current)&&k.current.focus())},[X,te,k,I]);const re=wy({onClick:Q,onFocus:U,onMouseEnter:V,onMouseMove:F,onMouseLeave:B,ref:ct(R,T,t),isDisabled:u,isFocusable:f});return{...y,...re,type:h??re.type,id:D,role:"menuitem",tabIndex:X?0:-1}}function Ek(e){var t;if(!Pk(e))return!1;const n=(t=e.ownerDocument.defaultView)!=null?t:window;return e instanceof n.HTMLElement}function Pk(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function Ik(e,t=[]){return g.useEffect(()=>()=>e(),t)}var[Mk,Pc]=kt({name:"MenuStylesContext",errorMessage:`useMenuStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),Ah=e=>{const{children:t}=e,n=un("Menu",e),r=At(e),{direction:o}=ta(),{descendants:s,...c}=Sk({...r,direction:o}),u=g.useMemo(()=>c,[c]),{isOpen:f,onClose:p,forceUpdate:h}=u;return l.jsx(mk,{value:s,children:l.jsx(xk,{value:u,children:l.jsx(Mk,{value:n,children:b1(t,{isOpen:f,onClose:p,forceUpdate:h})})})})};Ah.displayName="Menu";var Ny=ue((e,t)=>{const n=Pc();return l.jsx(ne.span,{ref:t,...e,__css:n.command,className:"chakra-menu__command"})});Ny.displayName="MenuCommand";var Tk=ue((e,t)=>{const{type:n,...r}=e,o=Pc(),s=r.as||n?n??void 0:"button",c=g.useMemo(()=>({textDecoration:"none",color:"inherit",userSelect:"none",display:"flex",width:"100%",alignItems:"center",textAlign:"start",flex:"0 0 auto",outline:0,...o.item}),[o.item]);return l.jsx(ne.button,{ref:t,type:s,...r,__css:c})}),Fy=e=>{const{className:t,children:n,...r}=e,o=g.Children.only(n),s=g.isValidElement(o)?g.cloneElement(o,{focusable:"false","aria-hidden":!0,className:ze("chakra-menu__icon",o.props.className)}):null,c=ze("chakra-menu__icon-wrapper",t);return l.jsx(ne.span,{className:c,...r,__css:{flexShrink:0},children:s})};Fy.displayName="MenuIcon";var gr=ue((e,t)=>{const{icon:n,iconSpacing:r="0.75rem",command:o,commandSpacing:s="0.75rem",children:c,...u}=e,f=kk(u,t),h=n||o?l.jsx("span",{style:{pointerEvents:"none",flex:1},children:c}):c;return l.jsxs(Tk,{...f,className:ze("chakra-menu__menuitem",f.className),children:[n&&l.jsx(Fy,{fontSize:"0.8em",marginEnd:r,children:n}),h,o&&l.jsx(Ny,{marginStart:s,children:o})]})});gr.displayName="MenuItem";var _k={enter:{visibility:"visible",opacity:1,scale:1,transition:{duration:.2,ease:[.4,0,.2,1]}},exit:{transitionEnd:{visibility:"hidden"},opacity:0,scale:.8,transition:{duration:.1,easings:"easeOut"}}},Dk=ne(ar.div),Oh=ue(function(t,n){var r,o;const{rootProps:s,motionProps:c,...u}=t,{isOpen:f,onTransitionEnd:p,unstable__animationState:h}=hs(),y=wk(u,n),x=jk(s),S=Pc();return l.jsx(ne.div,{...x,__css:{zIndex:(o=t.zIndex)!=null?o:(r=S.list)==null?void 0:r.zIndex},children:l.jsx(Dk,{variants:_k,initial:!1,animate:f?"enter":"exit",__css:{outline:0,...S.list},...c,className:ze("chakra-menu__menu-list",y.className),...y,onUpdate:p,onAnimationComplete:xc(h.onComplete,y.onAnimationComplete)})})});Oh.displayName="MenuList";var Ak=ue((e,t)=>{const n=Pc();return l.jsx(ne.button,{ref:t,...e,__css:{display:"inline-flex",appearance:"none",alignItems:"center",outline:0,...n.button}})}),zh=ue((e,t)=>{const{children:n,as:r,...o}=e,s=Ck(o,t),c=r||Ak;return l.jsx(c,{...s,className:ze("chakra-menu__menu-button",e.className),children:l.jsx(ne.span,{__css:{pointerEvents:"none",flex:"1 1 auto",minW:0},children:e.children})})});zh.displayName="MenuButton";var Ok={slideInBottom:{...pf,custom:{offsetY:16,reverse:!0}},slideInRight:{...pf,custom:{offsetX:16,reverse:!0}},scale:{...x2,custom:{initialScale:.95,reverse:!0}},none:{}},zk=ne(ar.section),Rk=e=>Ok[e||"none"],Ly=g.forwardRef((e,t)=>{const{preset:n,motionProps:r=Rk(n),...o}=e;return l.jsx(zk,{ref:t,...r,...o})});Ly.displayName="ModalTransition";var Nk=Object.defineProperty,Fk=(e,t,n)=>t in e?Nk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Lk=(e,t,n)=>(Fk(e,typeof t!="symbol"?t+"":t,n),n),Bk=class{constructor(){Lk(this,"modals"),this.modals=new Map}add(e){return this.modals.set(e,this.modals.size+1),this.modals.size}remove(e){this.modals.delete(e)}isTopModal(e){return e?this.modals.get(e)===this.modals.size:!1}},If=new Bk;function By(e,t){const[n,r]=g.useState(0);return g.useEffect(()=>{const o=e.current;if(o){if(t){const s=If.add(o);r(s)}return()=>{If.remove(o),r(0)}}},[t,e]),n}var Hk=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ki=new WeakMap,Cl=new WeakMap,wl={},kd=0,Hy=function(e){return e&&(e.host||Hy(e.parentNode))},Wk=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Hy(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)})},Vk=function(e,t,n,r){var o=Wk(t,Array.isArray(e)?e:[e]);wl[n]||(wl[n]=new WeakMap);var s=wl[n],c=[],u=new Set,f=new Set(o),p=function(y){!y||u.has(y)||(u.add(y),p(y.parentNode))};o.forEach(p);var h=function(y){!y||f.has(y)||Array.prototype.forEach.call(y.children,function(x){if(u.has(x))h(x);else{var S=x.getAttribute(r),j=S!==null&&S!=="false",C=(ki.get(x)||0)+1,w=(s.get(x)||0)+1;ki.set(x,C),s.set(x,w),c.push(x),C===1&&j&&Cl.set(x,!0),w===1&&x.setAttribute(n,"true"),j||x.setAttribute(r,"true")}})};return h(t),u.clear(),kd++,function(){c.forEach(function(y){var x=ki.get(y)-1,S=s.get(y)-1;ki.set(y,x),s.set(y,S),x||(Cl.has(y)||y.removeAttribute(r),Cl.delete(y)),S||y.removeAttribute(n)}),kd--,kd||(ki=new WeakMap,ki=new WeakMap,Cl=new WeakMap,wl={})}},Uk=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||Hk(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),Vk(r,o,n,"aria-hidden")):function(){return null}};function $k(e){const{isOpen:t,onClose:n,id:r,closeOnOverlayClick:o=!0,closeOnEsc:s=!0,useInert:c=!0,onOverlayClick:u,onEsc:f}=e,p=g.useRef(null),h=g.useRef(null),[y,x,S]=qk(r,"chakra-modal","chakra-modal--header","chakra-modal--body");Gk(p,t&&c),By(p,t);const j=g.useRef(null),C=g.useCallback(R=>{j.current=R.target},[]),w=g.useCallback(R=>{R.key==="Escape"&&(R.stopPropagation(),s&&(n==null||n()),f==null||f())},[s,n,f]),[k,I]=g.useState(!1),[P,M]=g.useState(!1),T=g.useCallback((R={},V=null)=>({role:"dialog",...R,ref:ct(V,p),id:y,tabIndex:-1,"aria-modal":!0,"aria-labelledby":k?x:void 0,"aria-describedby":P?S:void 0,onClick:Ee(R.onClick,F=>F.stopPropagation())}),[S,P,y,x,k]),D=g.useCallback(R=>{R.stopPropagation(),j.current===R.target&&If.isTopModal(p.current)&&(o&&(n==null||n()),u==null||u())},[n,o,u]),_=g.useCallback((R={},V=null)=>({...R,ref:ct(V,h),onClick:Ee(R.onClick,D),onKeyDown:Ee(R.onKeyDown,w),onMouseDown:Ee(R.onMouseDown,C)}),[w,C,D]);return{isOpen:t,onClose:n,headerId:x,bodyId:S,setBodyMounted:M,setHeaderMounted:I,dialogRef:p,overlayRef:h,getDialogProps:T,getDialogContainerProps:_}}function Gk(e,t){const n=e.current;g.useEffect(()=>{if(!(!e.current||!t))return Uk(e.current)},[t,e,n])}function qk(e,...t){const n=g.useId(),r=e||n;return g.useMemo(()=>t.map(o=>`${o}-${r}`),[r,t])}var[Yk,ia]=kt({name:"ModalStylesContext",errorMessage:`useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[Kk,Zo]=kt({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in ``"}),mo=e=>{const t={scrollBehavior:"outside",autoFocus:!0,trapFocus:!0,returnFocusOnClose:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale",lockFocusAcrossFrames:!0,...e},{portalProps:n,children:r,autoFocus:o,trapFocus:s,initialFocusRef:c,finalFocusRef:u,returnFocusOnClose:f,blockScrollOnMount:p,allowPinchZoom:h,preserveScrollBarGap:y,motionPreset:x,lockFocusAcrossFrames:S,onCloseComplete:j}=t,C=un("Modal",t),k={...$k(t),autoFocus:o,trapFocus:s,initialFocusRef:c,finalFocusRef:u,returnFocusOnClose:f,blockScrollOnMount:p,allowPinchZoom:h,preserveScrollBarGap:y,motionPreset:x,lockFocusAcrossFrames:S};return l.jsx(Kk,{value:k,children:l.jsx(Yk,{value:C,children:l.jsx(xo,{onExitComplete:j,children:k.isOpen&&l.jsx($a,{...n,children:r})})})})};mo.displayName="Modal";var Vl="right-scroll-bar-position",Ul="width-before-scroll-bar",Xk="with-scroll-bars-hidden",Qk="--removed-body-scroll-bar-size",Wy=R2(),Ed=function(){},Ic=g.forwardRef(function(e,t){var n=g.useRef(null),r=g.useState({onScrollCapture:Ed,onWheelCapture:Ed,onTouchMoveCapture:Ed}),o=r[0],s=r[1],c=e.forwardProps,u=e.children,f=e.className,p=e.removeScrollBar,h=e.enabled,y=e.shards,x=e.sideCar,S=e.noIsolation,j=e.inert,C=e.allowPinchZoom,w=e.as,k=w===void 0?"div":w,I=A2(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),P=x,M=D2([n,t]),T=xr(xr({},I),o);return g.createElement(g.Fragment,null,h&&g.createElement(P,{sideCar:Wy,removeScrollBar:p,shards:y,noIsolation:S,inert:j,setCallbacks:s,allowPinchZoom:!!C,lockRef:n}),c?g.cloneElement(g.Children.only(u),xr(xr({},T),{ref:M})):g.createElement(k,xr({},T,{className:f,ref:M}),u))});Ic.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Ic.classNames={fullWidth:Ul,zeroRight:Vl};var Eg,Zk=function(){if(Eg)return Eg;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Jk(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Zk();return t&&e.setAttribute("nonce",t),e}function e7(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function t7(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var n7=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Jk())&&(e7(t,n),t7(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},r7=function(){var e=n7();return function(t,n){g.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Vy=function(){var e=r7(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},o7={left:0,top:0,right:0,gap:0},Pd=function(e){return parseInt(e||"",10)||0},i7=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Pd(n),Pd(r),Pd(o)]},a7=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return o7;var t=i7(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])}},s7=Vy(),l7=function(e,t,n,r){var o=e.left,s=e.top,c=e.right,u=e.gap;return n===void 0&&(n="margin"),` - .`.concat(Xk,` { - overflow: hidden `).concat(r,`; - padding-right: `).concat(u,"px ").concat(r,`; - } - body { - overflow: hidden `).concat(r,`; - overscroll-behavior: contain; - `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` - padding-left: `.concat(o,`px; - padding-top: `).concat(s,`px; - padding-right: `).concat(c,`px; - margin-left:0; - margin-top:0; - margin-right: `).concat(u,"px ").concat(r,`; - `),n==="padding"&&"padding-right: ".concat(u,"px ").concat(r,";")].filter(Boolean).join(""),` - } - - .`).concat(Vl,` { - right: `).concat(u,"px ").concat(r,`; - } - - .`).concat(Ul,` { - margin-right: `).concat(u,"px ").concat(r,`; - } - - .`).concat(Vl," .").concat(Vl,` { - right: 0 `).concat(r,`; - } - - .`).concat(Ul," .").concat(Ul,` { - margin-right: 0 `).concat(r,`; - } - - body { - `).concat(Qk,": ").concat(u,`px; - } -`)},c7=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r,s=g.useMemo(function(){return a7(o)},[o]);return g.createElement(s7,{styles:l7(s,!t,o,n?"":"!important")})},Mf=!1;if(typeof window<"u")try{var jl=Object.defineProperty({},"passive",{get:function(){return Mf=!0,!0}});window.addEventListener("test",jl,jl),window.removeEventListener("test",jl,jl)}catch{Mf=!1}var Ei=Mf?{passive:!1}:!1,u7=function(e){return e.tagName==="TEXTAREA"},Uy=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!u7(e)&&n[t]==="visible")},d7=function(e){return Uy(e,"overflowY")},f7=function(e){return Uy(e,"overflowX")},Pg=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=$y(e,n);if(r){var o=Gy(e,n),s=o[1],c=o[2];if(s>c)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},h7=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},p7=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},$y=function(e,t){return e==="v"?d7(t):f7(t)},Gy=function(e,t){return e==="v"?h7(t):p7(t)},m7=function(e,t){return e==="h"&&t==="rtl"?-1:1},v7=function(e,t,n,r,o){var s=m7(e,window.getComputedStyle(t).direction),c=s*r,u=n.target,f=t.contains(u),p=!1,h=c>0,y=0,x=0;do{var S=Gy(e,u),j=S[0],C=S[1],w=S[2],k=C-w-s*j;(j||k)&&$y(e,u)&&(y+=k,x+=j),u=u.parentNode}while(!f&&u!==document.body||f&&(t.contains(u)||t===u));return(h&&(o&&y===0||!o&&c>y)||!h&&(o&&x===0||!o&&-c>x))&&(p=!0),p},kl=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ig=function(e){return[e.deltaX,e.deltaY]},Mg=function(e){return e&&"current"in e?e.current:e},g7=function(e,t){return e[0]===t[0]&&e[1]===t[1]},y7=function(e){return` - .block-interactivity-`.concat(e,` {pointer-events: none;} - .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},x7=0,Pi=[];function b7(e){var t=g.useRef([]),n=g.useRef([0,0]),r=g.useRef(),o=g.useState(x7++)[0],s=g.useState(function(){return Vy()})[0],c=g.useRef(e);g.useEffect(function(){c.current=e},[e]),g.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var C=Sf([e.lockRef.current],(e.shards||[]).map(Mg),!0).filter(Boolean);return C.forEach(function(w){return w.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),C.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var u=g.useCallback(function(C,w){if("touches"in C&&C.touches.length===2)return!c.current.allowPinchZoom;var k=kl(C),I=n.current,P="deltaX"in C?C.deltaX:I[0]-k[0],M="deltaY"in C?C.deltaY:I[1]-k[1],T,D=C.target,_=Math.abs(P)>Math.abs(M)?"h":"v";if("touches"in C&&_==="h"&&D.type==="range")return!1;var R=Pg(_,D);if(!R)return!0;if(R?T=_:(T=_==="v"?"h":"v",R=Pg(_,D)),!R)return!1;if(!r.current&&"changedTouches"in C&&(P||M)&&(r.current=T),!T)return!0;var V=r.current||T;return v7(V,w,C,V==="h"?P:M,!0)},[]),f=g.useCallback(function(C){var w=C;if(!(!Pi.length||Pi[Pi.length-1]!==s)){var k="deltaY"in w?Ig(w):kl(w),I=t.current.filter(function(T){return T.name===w.type&&T.target===w.target&&g7(T.delta,k)})[0];if(I&&I.should){w.cancelable&&w.preventDefault();return}if(!I){var P=(c.current.shards||[]).map(Mg).filter(Boolean).filter(function(T){return T.contains(w.target)}),M=P.length>0?u(w,P[0]):!c.current.noIsolation;M&&w.cancelable&&w.preventDefault()}}},[]),p=g.useCallback(function(C,w,k,I){var P={name:C,delta:w,target:k,should:I};t.current.push(P),setTimeout(function(){t.current=t.current.filter(function(M){return M!==P})},1)},[]),h=g.useCallback(function(C){n.current=kl(C),r.current=void 0},[]),y=g.useCallback(function(C){p(C.type,Ig(C),C.target,u(C,e.lockRef.current))},[]),x=g.useCallback(function(C){p(C.type,kl(C),C.target,u(C,e.lockRef.current))},[]);g.useEffect(function(){return Pi.push(s),e.setCallbacks({onScrollCapture:y,onWheelCapture:y,onTouchMoveCapture:x}),document.addEventListener("wheel",f,Ei),document.addEventListener("touchmove",f,Ei),document.addEventListener("touchstart",h,Ei),function(){Pi=Pi.filter(function(C){return C!==s}),document.removeEventListener("wheel",f,Ei),document.removeEventListener("touchmove",f,Ei),document.removeEventListener("touchstart",h,Ei)}},[]);var S=e.removeScrollBar,j=e.inert;return g.createElement(g.Fragment,null,j?g.createElement(s,{styles:y7(o)}):null,S?g.createElement(c7,{gapMode:"margin"}):null)}const S7=S5(Wy,b7);var qy=g.forwardRef(function(e,t){return g.createElement(Ic,xr({},e,{ref:t,sideCar:S7}))});qy.classNames=Ic.classNames;const C7=qy;function w7(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:o,blockScrollOnMount:s,allowPinchZoom:c,finalFocusRef:u,returnFocusOnClose:f,preserveScrollBarGap:p,lockFocusAcrossFrames:h,isOpen:y}=Zo(),[x,S]=PC();g.useEffect(()=>{!x&&S&&setTimeout(S)},[x,S]);const j=By(r,y);return l.jsx(py,{autoFocus:t,isDisabled:!n,initialFocusRef:o,finalFocusRef:u,restoreFocus:f,contentRef:r,lockFocusAcrossFrames:h,children:l.jsx(C7,{removeScrollBar:!p,allowPinchZoom:c,enabled:j===1&&s,forwardProps:!0,children:e.children})})}var vo=ue((e,t)=>{const{className:n,children:r,containerProps:o,motionProps:s,...c}=e,{getDialogProps:u,getDialogContainerProps:f}=Zo(),p=u(c,t),h=f(o),y=ze("chakra-modal__content",n),x=ia(),S={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...x.dialog},j={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...x.dialogContainer},{motionPreset:C}=Zo();return l.jsx(w7,{children:l.jsx(ne.div,{...h,className:"chakra-modal__content-container",tabIndex:-1,__css:j,children:l.jsx(Ly,{preset:C,motionProps:s,className:y,...p,__css:S,children:r})})})});vo.displayName="ModalContent";function Yy(e){const{leastDestructiveRef:t,...n}=e;return l.jsx(mo,{...n,initialFocusRef:t})}var Ky=ue((e,t)=>l.jsx(vo,{ref:t,role:"alertdialog",...e})),Lr=ue((e,t)=>{const{className:n,...r}=e,o=ze("chakra-modal__footer",n),c={display:"flex",alignItems:"center",justifyContent:"flex-end",...ia().footer};return l.jsx(ne.footer,{ref:t,...r,__css:c,className:o})});Lr.displayName="ModalFooter";var Br=ue((e,t)=>{const{className:n,...r}=e,{headerId:o,setHeaderMounted:s}=Zo();g.useEffect(()=>(s(!0),()=>s(!1)),[s]);const c=ze("chakra-modal__header",n),f={flex:0,...ia().header};return l.jsx(ne.header,{ref:t,className:c,id:o,...r,__css:f})});Br.displayName="ModalHeader";var j7=ne(ar.div),Hr=ue((e,t)=>{const{className:n,transition:r,motionProps:o,...s}=e,c=ze("chakra-modal__overlay",n),f={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...ia().overlay},{motionPreset:p}=Zo(),y=o||(p==="none"?{}:y2);return l.jsx(j7,{...y,__css:f,ref:t,className:c,...s})});Hr.displayName="ModalOverlay";var Wr=ue((e,t)=>{const{className:n,...r}=e,{bodyId:o,setBodyMounted:s}=Zo();g.useEffect(()=>(s(!0),()=>s(!1)),[s]);const c=ze("chakra-modal__body",n),u=ia();return l.jsx(ne.div,{ref:t,className:c,id:o,...r,__css:u.body})});Wr.displayName="ModalBody";var aa=ue((e,t)=>{const{onClick:n,className:r,...o}=e,{onClose:s}=Zo(),c=ze("chakra-modal__close-btn",r),u=ia();return l.jsx(IC,{ref:t,__css:u.closeButton,className:c,onClick:Ee(n,f=>{f.stopPropagation(),s()}),...o})});aa.displayName="ModalCloseButton";var k7=e=>l.jsx(tn,{viewBox:"0 0 24 24",...e,children:l.jsx("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"})}),E7=e=>l.jsx(tn,{viewBox:"0 0 24 24",...e,children:l.jsx("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 Tg(e,t,n,r){g.useEffect(()=>{var o;if(!e.current||!r)return;const s=(o=e.current.ownerDocument.defaultView)!=null?o:window,c=Array.isArray(t)?t:[t],u=new s.MutationObserver(f=>{for(const p of f)p.type==="attributes"&&p.attributeName&&c.includes(p.attributeName)&&n(p)});return u.observe(e.current,{attributes:!0,attributeFilter:c}),()=>u.disconnect()})}function P7(e,t){const n=Wt(e);g.useEffect(()=>{let r=null;const o=()=>n();return t!==null&&(r=window.setInterval(o,t)),()=>{r&&window.clearInterval(r)}},[t,n])}var I7=50,_g=300;function M7(e,t){const[n,r]=g.useState(!1),[o,s]=g.useState(null),[c,u]=g.useState(!0),f=g.useRef(null),p=()=>clearTimeout(f.current);P7(()=>{o==="increment"&&e(),o==="decrement"&&t()},n?I7:null);const h=g.useCallback(()=>{c&&e(),f.current=setTimeout(()=>{u(!1),r(!0),s("increment")},_g)},[e,c]),y=g.useCallback(()=>{c&&t(),f.current=setTimeout(()=>{u(!1),r(!0),s("decrement")},_g)},[t,c]),x=g.useCallback(()=>{u(!0),r(!1),p()},[]);return g.useEffect(()=>()=>p(),[]),{up:h,down:y,stop:x,isSpinning:n}}var T7=/^[Ee0-9+\-.]$/;function _7(e){return T7.test(e)}function D7(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 A7(e={}){const{focusInputOnChange:t=!0,clampValueOnBlur:n=!0,keepWithinRange:r=!0,min:o=Number.MIN_SAFE_INTEGER,max:s=Number.MAX_SAFE_INTEGER,step:c=1,isReadOnly:u,isDisabled:f,isRequired:p,isInvalid:h,pattern:y="[0-9]*(.[0-9]+)?",inputMode:x="decimal",allowMouseWheel:S,id:j,onChange:C,precision:w,name:k,"aria-describedby":I,"aria-label":P,"aria-labelledby":M,onFocus:T,onBlur:D,onInvalid:_,getAriaValueText:R,isValidCharacter:V,format:F,parse:B,...Q}=e,U=Wt(T),X=Wt(D),te=Wt(_),re=Wt(V??_7),$=Wt(R),Z=r5(e),{update:fe,increment:Se,decrement:Me}=Z,[Ie,Pe]=g.useState(!1),he=!(u||f),se=g.useRef(null),Ne=g.useRef(null),Ve=g.useRef(null),Ue=g.useRef(null),$e=g.useCallback(J=>J.split("").filter(re).join(""),[re]),Qe=g.useCallback(J=>{var Le;return(Le=B==null?void 0:B(J))!=null?Le:J},[B]),me=g.useCallback(J=>{var Le;return((Le=F==null?void 0:F(J))!=null?Le:J).toString()},[F]);ti(()=>{(Z.valueAsNumber>s||Z.valueAsNumber{if(!se.current)return;if(se.current.value!=Z.value){const Le=Qe(se.current.value);Z.setValue($e(Le))}},[Qe,$e]);const De=g.useCallback((J=c)=>{he&&Se(J)},[Se,he,c]),Ge=g.useCallback((J=c)=>{he&&Me(J)},[Me,he,c]),ge=M7(De,Ge);Tg(Ve,"disabled",ge.stop,ge.isSpinning),Tg(Ue,"disabled",ge.stop,ge.isSpinning);const Te=g.useCallback(J=>{if(J.nativeEvent.isComposing)return;const nt=Qe(J.currentTarget.value);fe($e(nt)),Ne.current={start:J.currentTarget.selectionStart,end:J.currentTarget.selectionEnd}},[fe,$e,Qe]),et=g.useCallback(J=>{var Le,nt,Nt;U==null||U(J),Ne.current&&(J.target.selectionStart=(nt=Ne.current.start)!=null?nt:(Le=J.currentTarget.value)==null?void 0:Le.length,J.currentTarget.selectionEnd=(Nt=Ne.current.end)!=null?Nt:J.currentTarget.selectionStart)},[U]),Be=g.useCallback(J=>{if(J.nativeEvent.isComposing)return;D7(J,re)||J.preventDefault();const Le=vt(J)*c,nt=J.key,de={ArrowUp:()=>De(Le),ArrowDown:()=>Ge(Le),Home:()=>fe(o),End:()=>fe(s)}[nt];de&&(J.preventDefault(),de(J))},[re,c,De,Ge,fe,o,s]),vt=J=>{let Le=1;return(J.metaKey||J.ctrlKey)&&(Le=.1),J.shiftKey&&(Le=10),Le},Rt=g.useMemo(()=>{const J=$==null?void 0:$(Z.value);if(J!=null)return J;const Le=Z.value.toString();return Le||void 0},[Z.value,$]),N=g.useCallback(()=>{let J=Z.value;if(Z.value==="")return;/^[eE]/.test(Z.value.toString())?Z.setValue(""):(Z.valueAsNumbers&&(J=s),Z.cast(J))},[Z,s,o]),le=g.useCallback(()=>{Pe(!1),n&&N()},[n,Pe,N]),ye=g.useCallback(()=>{t&&requestAnimationFrame(()=>{var J;(J=se.current)==null||J.focus()})},[t]),je=g.useCallback(J=>{J.preventDefault(),ge.up(),ye()},[ye,ge]),q=g.useCallback(J=>{J.preventDefault(),ge.down(),ye()},[ye,ge]);Go(()=>se.current,"wheel",J=>{var Le,nt;const de=((nt=(Le=se.current)==null?void 0:Le.ownerDocument)!=null?nt:document).activeElement===se.current;if(!S||!de)return;J.preventDefault();const Ae=vt(J)*c,dn=Math.sign(J.deltaY);dn===-1?De(Ae):dn===1&&Ge(Ae)},{passive:!1});const ie=g.useCallback((J={},Le=null)=>{const nt=f||r&&Z.isAtMax;return{...J,ref:ct(Le,Ve),role:"button",tabIndex:-1,onPointerDown:Ee(J.onPointerDown,Nt=>{Nt.button!==0||nt||je(Nt)}),onPointerLeave:Ee(J.onPointerLeave,ge.stop),onPointerUp:Ee(J.onPointerUp,ge.stop),disabled:nt,"aria-disabled":Nr(nt)}},[Z.isAtMax,r,je,ge.stop,f]),Re=g.useCallback((J={},Le=null)=>{const nt=f||r&&Z.isAtMin;return{...J,ref:ct(Le,Ue),role:"button",tabIndex:-1,onPointerDown:Ee(J.onPointerDown,Nt=>{Nt.button!==0||nt||q(Nt)}),onPointerLeave:Ee(J.onPointerLeave,ge.stop),onPointerUp:Ee(J.onPointerUp,ge.stop),disabled:nt,"aria-disabled":Nr(nt)}},[Z.isAtMin,r,q,ge.stop,f]),Ze=g.useCallback((J={},Le=null)=>{var nt,Nt,de,Ae;return{name:k,inputMode:x,type:"text",pattern:y,"aria-labelledby":M,"aria-label":P,"aria-describedby":I,id:j,disabled:f,...J,readOnly:(nt=J.readOnly)!=null?nt:u,"aria-readonly":(Nt=J.readOnly)!=null?Nt:u,"aria-required":(de=J.required)!=null?de:p,required:(Ae=J.required)!=null?Ae:p,ref:ct(se,Le),value:me(Z.value),role:"spinbutton","aria-valuemin":o,"aria-valuemax":s,"aria-valuenow":Number.isNaN(Z.valueAsNumber)?void 0:Z.valueAsNumber,"aria-invalid":Nr(h??Z.isOutOfRange),"aria-valuetext":Rt,autoComplete:"off",autoCorrect:"off",onChange:Ee(J.onChange,Te),onKeyDown:Ee(J.onKeyDown,Be),onFocus:Ee(J.onFocus,et,()=>Pe(!0)),onBlur:Ee(J.onBlur,X,le)}},[k,x,y,M,P,me,I,j,f,p,u,h,Z.value,Z.valueAsNumber,Z.isOutOfRange,o,s,Rt,Te,Be,et,X,le]);return{value:me(Z.value),valueAsNumber:Z.valueAsNumber,isFocused:Ie,isDisabled:f,isReadOnly:u,getIncrementButtonProps:ie,getDecrementButtonProps:Re,getInputProps:Ze,htmlProps:Q}}var[O7,Mc]=kt({name:"NumberInputStylesContext",errorMessage:`useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[z7,Rh]=kt({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within "}),Nh=ue(function(t,n){const r=un("NumberInput",t),o=At(t),s=lh(o),{htmlProps:c,...u}=A7(s),f=g.useMemo(()=>u,[u]);return l.jsx(z7,{value:f,children:l.jsx(O7,{value:r,children:l.jsx(ne.div,{...c,ref:n,className:ze("chakra-numberinput",t.className),__css:{position:"relative",zIndex:0,...r.root}})})})});Nh.displayName="NumberInput";var Fh=ue(function(t,n){const r=Mc();return l.jsx(ne.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}})});Fh.displayName="NumberInputStepper";var Lh=ue(function(t,n){const{getInputProps:r}=Rh(),o=r(t,n),s=Mc();return l.jsx(ne.input,{...o,className:ze("chakra-numberinput__field",t.className),__css:{width:"100%",...s.field}})});Lh.displayName="NumberInputField";var Xy=ne("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),Bh=ue(function(t,n){var r;const o=Mc(),{getDecrementButtonProps:s}=Rh(),c=s(t,n);return l.jsx(Xy,{...c,__css:o.stepper,children:(r=t.children)!=null?r:l.jsx(k7,{})})});Bh.displayName="NumberDecrementStepper";var Hh=ue(function(t,n){var r;const{getIncrementButtonProps:o}=Rh(),s=o(t,n),c=Mc();return l.jsx(Xy,{...s,__css:c.stepper,children:(r=t.children)!=null?r:l.jsx(E7,{})})});Hh.displayName="NumberIncrementStepper";var[R7,ps]=kt({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within ``"}),[N7,Wh]=kt({name:"PopoverStylesContext",errorMessage:`usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `});function Vh(e){const t=g.Children.only(e.children),{getTriggerProps:n}=ps();return g.cloneElement(t,n(t.props,t.ref))}Vh.displayName="PopoverTrigger";var Ii={click:"click",hover:"hover"};function F7(e={}){const{closeOnBlur:t=!0,closeOnEsc:n=!0,initialFocusRef:r,id:o,returnFocusOnClose:s=!0,autoFocus:c=!0,arrowSize:u,arrowShadowColor:f,trigger:p=Ii.click,openDelay:h=200,closeDelay:y=200,isLazy:x,lazyBehavior:S="unmount",computePositionOnMount:j,...C}=e,{isOpen:w,onClose:k,onOpen:I,onToggle:P}=_h(e),M=g.useRef(null),T=g.useRef(null),D=g.useRef(null),_=g.useRef(!1),R=g.useRef(!1);w&&(R.current=!0);const[V,F]=g.useState(!1),[B,Q]=g.useState(!1),U=g.useId(),X=o??U,[te,re,$,Z]=["popover-trigger","popover-content","popover-header","popover-body"].map(Te=>`${Te}-${X}`),{referenceRef:fe,getArrowProps:Se,getPopperProps:Me,getArrowInnerProps:Ie,forceUpdate:Pe}=Th({...C,enabled:w||!!j}),he=zy({isOpen:w,ref:D});u5({enabled:w,ref:T}),jy(D,{focusRef:T,visible:w,shouldFocus:s&&p===Ii.click}),G6(D,{focusRef:r,visible:w,shouldFocus:c&&p===Ii.click});const se=Dh({wasSelected:R.current,enabled:x,mode:S,isSelected:he.present}),Ne=g.useCallback((Te={},et=null)=>{const Be={...Te,style:{...Te.style,transformOrigin:Ht.transformOrigin.varRef,[Ht.arrowSize.var]:u?`${u}px`:void 0,[Ht.arrowShadowColor.var]:f},ref:ct(D,et),children:se?Te.children:null,id:re,tabIndex:-1,role:"dialog",onKeyDown:Ee(Te.onKeyDown,vt=>{n&&vt.key==="Escape"&&k()}),onBlur:Ee(Te.onBlur,vt=>{const Rt=Dg(vt),N=Id(D.current,Rt),le=Id(T.current,Rt);w&&t&&(!N&&!le)&&k()}),"aria-labelledby":V?$:void 0,"aria-describedby":B?Z:void 0};return p===Ii.hover&&(Be.role="tooltip",Be.onMouseEnter=Ee(Te.onMouseEnter,()=>{_.current=!0}),Be.onMouseLeave=Ee(Te.onMouseLeave,vt=>{vt.nativeEvent.relatedTarget!==null&&(_.current=!1,setTimeout(()=>k(),y))})),Be},[se,re,V,$,B,Z,p,n,k,w,t,y,f,u]),Ve=g.useCallback((Te={},et=null)=>Me({...Te,style:{visibility:w?"visible":"hidden",...Te.style}},et),[w,Me]),Ue=g.useCallback((Te,et=null)=>({...Te,ref:ct(et,M,fe)}),[M,fe]),$e=g.useRef(),Qe=g.useRef(),me=g.useCallback(Te=>{M.current==null&&fe(Te)},[fe]),De=g.useCallback((Te={},et=null)=>{const Be={...Te,ref:ct(T,et,me),id:te,"aria-haspopup":"dialog","aria-expanded":w,"aria-controls":re};return p===Ii.click&&(Be.onClick=Ee(Te.onClick,P)),p===Ii.hover&&(Be.onFocus=Ee(Te.onFocus,()=>{$e.current===void 0&&I()}),Be.onBlur=Ee(Te.onBlur,vt=>{const Rt=Dg(vt),N=!Id(D.current,Rt);w&&t&&N&&k()}),Be.onKeyDown=Ee(Te.onKeyDown,vt=>{vt.key==="Escape"&&k()}),Be.onMouseEnter=Ee(Te.onMouseEnter,()=>{_.current=!0,$e.current=window.setTimeout(()=>I(),h)}),Be.onMouseLeave=Ee(Te.onMouseLeave,()=>{_.current=!1,$e.current&&(clearTimeout($e.current),$e.current=void 0),Qe.current=window.setTimeout(()=>{_.current===!1&&k()},y)})),Be},[te,w,re,p,me,P,I,t,k,h,y]);g.useEffect(()=>()=>{$e.current&&clearTimeout($e.current),Qe.current&&clearTimeout(Qe.current)},[]);const Ge=g.useCallback((Te={},et=null)=>({...Te,id:$,ref:ct(et,Be=>{F(!!Be)})}),[$]),ge=g.useCallback((Te={},et=null)=>({...Te,id:Z,ref:ct(et,Be=>{Q(!!Be)})}),[Z]);return{forceUpdate:Pe,isOpen:w,onAnimationComplete:he.onComplete,onClose:k,getAnchorProps:Ue,getArrowProps:Se,getArrowInnerProps:Ie,getPopoverPositionerProps:Ve,getPopoverProps:Ne,getTriggerProps:De,getHeaderProps:Ge,getBodyProps:ge}}function Id(e,t){return e===t||(e==null?void 0:e.contains(t))}function Dg(e){var t;const n=e.currentTarget.ownerDocument.activeElement;return(t=e.relatedTarget)!=null?t:n}function Uh(e){const t=un("Popover",e),{children:n,...r}=At(e),o=ta(),s=F7({...r,direction:o.direction});return l.jsx(R7,{value:s,children:l.jsx(N7,{value:t,children:b1(n,{isOpen:s.isOpen,onClose:s.onClose,forceUpdate:s.forceUpdate})})})}Uh.displayName="Popover";function $h(e){var t;const{bg:n,bgColor:r,backgroundColor:o,shadow:s,boxShadow:c}=e,{getArrowProps:u,getArrowInnerProps:f}=ps(),p=Wh(),h=(t=n??r)!=null?t:o,y=s??c;return l.jsx(ne.div,{...u(),className:"chakra-popover__arrow-positioner",children:l.jsx(ne.div,{className:ze("chakra-popover__arrow",e.className),...f(e),__css:{"--popper-arrow-bg":h?`colors.${h}, ${h}`:void 0,"--popper-arrow-shadow":y?`shadows.${y}, ${y}`:void 0,...p.arrow}})})}$h.displayName="PopoverArrow";var Qy=ue(function(t,n){const{getBodyProps:r}=ps(),o=Wh();return l.jsx(ne.div,{...r(t,n),className:ze("chakra-popover__body",t.className),__css:o.body})});Qy.displayName="PopoverBody";function L7(e){if(e)return{enter:{...e.enter,visibility:"visible"},exit:{...e.exit,transitionEnd:{visibility:"hidden"}}}}var B7={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]}}},H7=ne(ar.section),Zy=ue(function(t,n){const{variants:r=B7,...o}=t,{isOpen:s}=ps();return l.jsx(H7,{ref:n,variants:L7(r),initial:!1,animate:s?"enter":"exit",...o})});Zy.displayName="PopoverTransition";var Gh=ue(function(t,n){const{rootProps:r,motionProps:o,...s}=t,{getPopoverProps:c,getPopoverPositionerProps:u,onAnimationComplete:f}=ps(),p=Wh(),h={position:"relative",display:"flex",flexDirection:"column",...p.content};return l.jsx(ne.div,{...u(r),__css:p.popper,className:"chakra-popover__popper",children:l.jsx(Zy,{...o,...c(s,n),onAnimationComplete:xc(f,s.onAnimationComplete),className:ze("chakra-popover__content",t.className),__css:h})})});Gh.displayName="PopoverContent";function W7(e,t,n){return(e-t)*100/(n-t)}ei({"0%":{strokeDasharray:"1, 400",strokeDashoffset:"0"},"50%":{strokeDasharray:"400, 400",strokeDashoffset:"-100"},"100%":{strokeDasharray:"400, 400",strokeDashoffset:"-260"}});ei({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}});var V7=ei({"0%":{left:"-40%"},"100%":{left:"100%"}}),U7=ei({from:{backgroundPosition:"1rem 0"},to:{backgroundPosition:"0 0"}});function $7(e){const{value:t=0,min:n,max:r,valueText:o,getValueText:s,isIndeterminate:c,role:u="progressbar"}=e,f=W7(t,n,r);return{bind:{"data-indeterminate":c?"":void 0,"aria-valuemax":r,"aria-valuemin":n,"aria-valuenow":c?void 0:t,"aria-valuetext":(()=>{if(t!=null)return typeof s=="function"?s(t,f):o})(),role:u},percent:f,value:t}}var[G7,q7]=kt({name:"ProgressStylesContext",errorMessage:`useProgressStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),Y7=ue((e,t)=>{const{min:n,max:r,value:o,isIndeterminate:s,role:c,...u}=e,f=$7({value:o,min:n,max:r,isIndeterminate:s,role:c}),h={height:"100%",...q7().filledTrack};return l.jsx(ne.div,{ref:t,style:{width:`${f.percent}%`,...u.style},...f.bind,...u,__css:h})}),Jy=ue((e,t)=>{var n;const{value:r,min:o=0,max:s=100,hasStripe:c,isAnimated:u,children:f,borderRadius:p,isIndeterminate:h,"aria-label":y,"aria-labelledby":x,"aria-valuetext":S,title:j,role:C,...w}=At(e),k=un("Progress",e),I=p??((n=k.track)==null?void 0:n.borderRadius),P={animation:`${U7} 1s linear infinite`},D={...!h&&c&&u&&P,...h&&{position:"absolute",willChange:"left",minWidth:"50%",animation:`${V7} 1s ease infinite normal none running`}},_={overflow:"hidden",position:"relative",...k.track};return l.jsx(ne.div,{ref:t,borderRadius:I,__css:_,...w,children:l.jsxs(G7,{value:k,children:[l.jsx(Y7,{"aria-label":y,"aria-labelledby":x,"aria-valuetext":S,min:o,max:s,value:r,isIndeterminate:h,css:D,borderRadius:I,title:j,role:C}),f]})})});Jy.displayName="Progress";function K7(e){return e&&Qd(e)&&Qd(e.target)}function X7(e={}){const{onChange:t,value:n,defaultValue:r,name:o,isDisabled:s,isFocusable:c,isNative:u,...f}=e,[p,h]=g.useState(r||""),y=typeof n<"u",x=y?n:p,S=g.useRef(null),j=g.useCallback(()=>{const T=S.current;if(!T)return;let D="input:not(:disabled):checked";const _=T.querySelector(D);if(_){_.focus();return}D="input:not(:disabled)";const R=T.querySelector(D);R==null||R.focus()},[]),w=`radio-${g.useId()}`,k=o||w,I=g.useCallback(T=>{const D=K7(T)?T.target.value:T;y||h(D),t==null||t(String(D))},[t,y]),P=g.useCallback((T={},D=null)=>({...T,ref:ct(D,S),role:"radiogroup"}),[]),M=g.useCallback((T={},D=null)=>({...T,ref:D,name:k,[u?"checked":"isChecked"]:x!=null?T.value===x:void 0,onChange(R){I(R)},"data-radiogroup":!0}),[u,k,I,x]);return{getRootProps:P,getRadioProps:M,name:k,ref:S,focus:j,setValue:h,value:x,onChange:I,isDisabled:s,isFocusable:c,htmlProps:f}}var[Q7,ex]=kt({name:"RadioGroupContext",strict:!1}),Qa=ue((e,t)=>{const{colorScheme:n,size:r,variant:o,children:s,className:c,isDisabled:u,isFocusable:f,...p}=e,{value:h,onChange:y,getRootProps:x,name:S,htmlProps:j}=X7(p),C=g.useMemo(()=>({name:S,size:r,onChange:y,colorScheme:n,value:h,variant:o,isDisabled:u,isFocusable:f}),[S,r,y,n,h,o,u,f]);return l.jsx(Q7,{value:C,children:l.jsx(ne.div,{...x(j,t),className:ze("chakra-radio-group",c),children:s})})});Qa.displayName="RadioGroup";var Z7={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"};function J7(e={}){const{defaultChecked:t,isChecked:n,isFocusable:r,isDisabled:o,isReadOnly:s,isRequired:c,onChange:u,isInvalid:f,name:p,value:h,id:y,"data-radiogroup":x,"aria-describedby":S,...j}=e,C=`radio-${g.useId()}`,w=ri(),I=!!ex()||!!x;let M=!!w&&!I?w.id:C;M=y??M;const T=o??(w==null?void 0:w.isDisabled),D=s??(w==null?void 0:w.isReadOnly),_=c??(w==null?void 0:w.isRequired),R=f??(w==null?void 0:w.isInvalid),[V,F]=g.useState(!1),[B,Q]=g.useState(!1),[U,X]=g.useState(!1),[te,re]=g.useState(!1),[$,Z]=g.useState(Boolean(t)),fe=typeof n<"u",Se=fe?n:$;g.useEffect(()=>j2(F),[]);const Me=g.useCallback(me=>{if(D||T){me.preventDefault();return}fe||Z(me.target.checked),u==null||u(me)},[fe,T,D,u]),Ie=g.useCallback(me=>{me.key===" "&&re(!0)},[re]),Pe=g.useCallback(me=>{me.key===" "&&re(!1)},[re]),he=g.useCallback((me={},De=null)=>({...me,ref:De,"data-active":qe(te),"data-hover":qe(U),"data-disabled":qe(T),"data-invalid":qe(R),"data-checked":qe(Se),"data-focus":qe(B),"data-focus-visible":qe(B&&V),"data-readonly":qe(D),"aria-hidden":!0,onMouseDown:Ee(me.onMouseDown,()=>re(!0)),onMouseUp:Ee(me.onMouseUp,()=>re(!1)),onMouseEnter:Ee(me.onMouseEnter,()=>X(!0)),onMouseLeave:Ee(me.onMouseLeave,()=>X(!1))}),[te,U,T,R,Se,B,D,V]),{onFocus:se,onBlur:Ne}=w??{},Ve=g.useCallback((me={},De=null)=>{const Ge=T&&!r;return{...me,id:M,ref:De,type:"radio",name:p,value:h,onChange:Ee(me.onChange,Me),onBlur:Ee(Ne,me.onBlur,()=>Q(!1)),onFocus:Ee(se,me.onFocus,()=>Q(!0)),onKeyDown:Ee(me.onKeyDown,Ie),onKeyUp:Ee(me.onKeyUp,Pe),checked:Se,disabled:Ge,readOnly:D,required:_,"aria-invalid":Nr(R),"aria-disabled":Nr(Ge),"aria-required":Nr(_),"data-readonly":qe(D),"aria-describedby":S,style:Z7}},[T,r,M,p,h,Me,Ne,se,Ie,Pe,Se,D,_,R,S]);return{state:{isInvalid:R,isFocused:B,isChecked:Se,isActive:te,isHovered:U,isDisabled:T,isReadOnly:D,isRequired:_},getCheckboxProps:he,getInputProps:Ve,getLabelProps:(me={},De=null)=>({...me,ref:De,onMouseDown:Ee(me.onMouseDown,Ag),onTouchStart:Ee(me.onTouchStart,Ag),"data-disabled":qe(T),"data-checked":qe(Se),"data-invalid":qe(R)}),getRootProps:(me,De=null)=>({...me,ref:De,"data-disabled":qe(T),"data-checked":qe(Se),"data-invalid":qe(R)}),htmlProps:j}}function Ag(e){e.preventDefault(),e.stopPropagation()}function e8(e,t){const n={},r={};for(const[o,s]of Object.entries(e))t.includes(o)?n[o]=s:r[o]=s;return[n,r]}var vn=ue((e,t)=>{var n;const r=ex(),{onChange:o,value:s}=e,c=un("Radio",{...r,...e}),u=At(e),{spacing:f="0.5rem",children:p,isDisabled:h=r==null?void 0:r.isDisabled,isFocusable:y=r==null?void 0:r.isFocusable,inputProps:x,...S}=u;let j=e.isChecked;(r==null?void 0:r.value)!=null&&s!=null&&(j=r.value===s);let C=o;r!=null&&r.onChange&&s!=null&&(C=xc(r.onChange,o));const w=(n=e==null?void 0:e.name)!=null?n:r==null?void 0:r.name,{getInputProps:k,getCheckboxProps:I,getLabelProps:P,getRootProps:M,htmlProps:T}=J7({...S,isChecked:j,isFocusable:y,isDisabled:h,onChange:C,name:w}),[D,_]=e8(T,S1),R=I(_),V=k(x,t),F=P(),B=Object.assign({},D,M()),Q={display:"inline-flex",alignItems:"center",verticalAlign:"top",cursor:"pointer",position:"relative",...c.container},U={display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,...c.control},X={userSelect:"none",marginStart:f,...c.label};return l.jsxs(ne.label,{className:"chakra-radio",...B,__css:Q,children:[l.jsx("input",{className:"chakra-radio__input",...V}),l.jsx(ne.span,{className:"chakra-radio__control",...R,__css:U}),p&&l.jsx(ne.span,{className:"chakra-radio__label",...F,__css:X,children:p})]})});vn.displayName="Radio";var tx=ue(function(t,n){const{children:r,placeholder:o,className:s,...c}=t;return l.jsxs(ne.select,{...c,ref:n,className:ze("chakra-select",s),children:[o&&l.jsx("option",{value:"",children:o}),r]})});tx.displayName="SelectField";function t8(e,t){const n={},r={};for(const[o,s]of Object.entries(e))t.includes(o)?n[o]=s:r[o]=s;return[n,r]}var nx=ue((e,t)=>{var n;const r=un("Select",e),{rootProps:o,placeholder:s,icon:c,color:u,height:f,h:p,minH:h,minHeight:y,iconColor:x,iconSize:S,...j}=At(e),[C,w]=t8(j,S1),k=sh(w),I={width:"100%",height:"fit-content",position:"relative",color:u},P={paddingEnd:"2rem",...r.field,_focus:{zIndex:"unset",...(n=r.field)==null?void 0:n._focus}};return l.jsxs(ne.div,{className:"chakra-select__wrapper",__css:I,...C,...o,children:[l.jsx(tx,{ref:t,height:p??f,minH:h??y,placeholder:s,...k,__css:P,children:e.children}),l.jsx(rx,{"data-disabled":qe(k.disabled),...(x||u)&&{color:x||u},__css:r.icon,...S&&{fontSize:S},children:c})]})});nx.displayName="Select";var n8=e=>l.jsx("svg",{viewBox:"0 0 24 24",...e,children:l.jsx("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),r8=ne("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),rx=e=>{const{children:t=l.jsx(n8,{}),...n}=e,r=g.cloneElement(t,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return l.jsx(r8,{...n,className:"chakra-select__icon-wrapper",children:g.isValidElement(t)?r:null})};rx.displayName="SelectIcon";var Mi=e=>e?"":void 0,Md=e=>e?!0:void 0,ms=(...e)=>e.filter(Boolean).join(" ");function Td(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}function El(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}var $l={width:0,height:0},Pl=e=>e||$l;function o8(e){const{orientation:t,thumbPercents:n,thumbRects:r,isReversed:o}=e,s=C=>{var w;const k=(w=r[C])!=null?w:$l;return{position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none",...El({orientation:t,vertical:{bottom:`calc(${n[C]}% - ${k.height/2}px)`},horizontal:{left:`calc(${n[C]}% - ${k.width/2}px)`}})}},c=t==="vertical"?r.reduce((C,w)=>Pl(C).height>Pl(w).height?C:w,$l):r.reduce((C,w)=>Pl(C).width>Pl(w).width?C:w,$l),u={position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0,...El({orientation:t,vertical:c?{paddingLeft:c.width/2,paddingRight:c.width/2}:{},horizontal:c?{paddingTop:c.height/2,paddingBottom:c.height/2}:{}})},f={position:"absolute",...El({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",height:"100%"},horizontal:{top:"50%",transform:"translateY(-50%)",width:"100%"}})},p=n.length===1,h=[0,o?100-n[0]:n[0]],y=p?h:n;let x=y[0];!p&&o&&(x=100-x);const S=Math.abs(y[y.length-1]-y[0]),j={...f,...El({orientation:t,vertical:o?{height:`${S}%`,top:`${x}%`}:{height:`${S}%`,bottom:`${x}%`},horizontal:o?{width:`${S}%`,right:`${x}%`}:{width:`${S}%`,left:`${x}%`}})};return{trackStyle:f,innerTrackStyle:j,rootStyle:u,getThumbStyle:s}}function i8(e){const{isReversed:t,direction:n,orientation:r}=e;return n==="ltr"||r==="vertical"?t:!t}function a8(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function s8(e){const t=c8(e);return typeof t.PointerEvent<"u"&&e instanceof t.PointerEvent?e.pointerType==="mouse":e instanceof t.MouseEvent}function ox(e){return!!e.touches}function l8(e){return ox(e)&&e.touches.length>1}function c8(e){var t;return(t=e.view)!=null?t:window}function u8(e,t="page"){const n=e.touches[0]||e.changedTouches[0];return{x:n[`${t}X`],y:n[`${t}Y`]}}function d8(e,t="page"){return{x:e[`${t}X`],y:e[`${t}Y`]}}function ix(e,t="page"){return ox(e)?u8(e,t):d8(e,t)}function f8(e){return t=>{const n=s8(t);(!n||n&&t.button===0)&&e(t)}}function h8(e,t=!1){function n(o){e(o,{point:ix(o)})}return t?f8(n):n}function Gl(e,t,n,r){return a8(e,t,h8(n,t==="pointerdown"),r)}var p8=Object.defineProperty,m8=(e,t,n)=>t in e?p8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Jn=(e,t,n)=>(m8(e,typeof t!="symbol"?t+"":t,n),n),v8=class{constructor(e,t,n){Jn(this,"history",[]),Jn(this,"startEvent",null),Jn(this,"lastEvent",null),Jn(this,"lastEventInfo",null),Jn(this,"handlers",{}),Jn(this,"removeListeners",()=>{}),Jn(this,"threshold",3),Jn(this,"win"),Jn(this,"updatePoint",()=>{if(!(this.lastEvent&&this.lastEventInfo))return;const u=_d(this.lastEventInfo,this.history),f=this.startEvent!==null,p=b8(u.offset,{x:0,y:0})>=this.threshold;if(!f&&!p)return;const{timestamp:h}=Gv();this.history.push({...u.point,timestamp:h});const{onStart:y,onMove:x}=this.handlers;f||(y==null||y(this.lastEvent,u),this.startEvent=this.lastEvent),x==null||x(this.lastEvent,u)}),Jn(this,"onPointerMove",(u,f)=>{this.lastEvent=u,this.lastEventInfo=f,VC.update(this.updatePoint,!0)}),Jn(this,"onPointerUp",(u,f)=>{const p=_d(f,this.history),{onEnd:h,onSessionEnd:y}=this.handlers;y==null||y(u,p),this.end(),!(!h||!this.startEvent)&&(h==null||h(u,p))});var r;if(this.win=(r=e.view)!=null?r:window,l8(e))return;this.handlers=t,n&&(this.threshold=n),e.stopPropagation(),e.preventDefault();const o={point:ix(e)},{timestamp:s}=Gv();this.history=[{...o.point,timestamp:s}];const{onSessionStart:c}=t;c==null||c(e,_d(o,this.history)),this.removeListeners=x8(Gl(this.win,"pointermove",this.onPointerMove),Gl(this.win,"pointerup",this.onPointerUp),Gl(this.win,"pointercancel",this.onPointerUp))}updateHandlers(e){this.handlers=e}end(){var e;(e=this.removeListeners)==null||e.call(this),UC.update(this.updatePoint)}};function Og(e,t){return{x:e.x-t.x,y:e.y-t.y}}function _d(e,t){return{point:e.point,delta:Og(e.point,t[t.length-1]),offset:Og(e.point,t[0]),velocity:y8(t,.1)}}var g8=e=>e*1e3;function y8(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=e[e.length-1];for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>g8(t)));)n--;if(!r)return{x:0,y:0};const s=(o.timestamp-r.timestamp)/1e3;if(s===0)return{x:0,y:0};const c={x:(o.x-r.x)/s,y:(o.y-r.y)/s};return c.x===1/0&&(c.x=0),c.y===1/0&&(c.y=0),c}function x8(...e){return t=>e.reduce((n,r)=>r(n),t)}function Dd(e,t){return Math.abs(e-t)}function zg(e){return"x"in e&&"y"in e}function b8(e,t){if(typeof e=="number"&&typeof t=="number")return Dd(e,t);if(zg(e)&&zg(t)){const n=Dd(e.x,t.x),r=Dd(e.y,t.y);return Math.sqrt(n**2+r**2)}return 0}function ax(e){const t=g.useRef(null);return t.current=e,t}function S8(e,t){const{onPan:n,onPanStart:r,onPanEnd:o,onPanSessionStart:s,onPanSessionEnd:c,threshold:u}=t,f=Boolean(n||r||o||s||c),p=g.useRef(null),h=ax({onSessionStart:s,onSessionEnd:c,onStart:r,onMove:n,onEnd(y,x){p.current=null,o==null||o(y,x)}});g.useEffect(()=>{var y;(y=p.current)==null||y.updateHandlers(h.current)}),g.useEffect(()=>{const y=e.current;if(!y||!f)return;function x(S){p.current=new v8(S,h.current,u)}return Gl(y,"pointerdown",x)},[e,f,h,u]),g.useEffect(()=>()=>{var y;(y=p.current)==null||y.end(),p.current=null},[])}function C8(e,t){var n;if(!e){t(void 0);return}t({width:e.offsetWidth,height:e.offsetHeight});const r=(n=e.ownerDocument.defaultView)!=null?n:window,o=new r.ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const[c]=s;let u,f;if("borderBoxSize"in c){const p=c.borderBoxSize,h=Array.isArray(p)?p[0]:p;u=h.inlineSize,f=h.blockSize}else u=e.offsetWidth,f=e.offsetHeight;t({width:u,height:f})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}var w8=Boolean(globalThis==null?void 0:globalThis.document)?g.useLayoutEffect:g.useEffect;function j8(e,t){var n,r;if(!e||!e.parentElement)return;const o=(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window,s=new o.MutationObserver(()=>{t()});return s.observe(e.parentElement,{childList:!0}),()=>{s.disconnect()}}function k8({getNodes:e,observeMutation:t=!0}){const[n,r]=g.useState([]),[o,s]=g.useState(0);return w8(()=>{const c=e(),u=c.map((f,p)=>C8(f,h=>{r(y=>[...y.slice(0,p),h,...y.slice(p+1)])}));if(t){const f=c[0];u.push(j8(f,()=>{s(p=>p+1)}))}return()=>{u.forEach(f=>{f==null||f()})}},[o]),n}function E8(e){return typeof e=="object"&&e!==null&&"current"in e}function P8(e){const[t]=k8({observeMutation:!1,getNodes(){return[E8(e)?e.current:e]}});return t}function I8(e){var t;const{min:n=0,max:r=100,onChange:o,value:s,defaultValue:c,isReversed:u,direction:f="ltr",orientation:p="horizontal",id:h,isDisabled:y,isReadOnly:x,onChangeStart:S,onChangeEnd:j,step:C=1,getAriaValueText:w,"aria-valuetext":k,"aria-label":I,"aria-labelledby":P,name:M,focusThumbOnChange:T=!0,...D}=e,_=Wt(S),R=Wt(j),V=Wt(w),F=i8({isReversed:u,direction:f,orientation:p}),[B,Q]=rh({value:s,defaultValue:c??T8(n,r),onChange:o}),[U,X]=g.useState(!1),[te,re]=g.useState(!1),$=!(y||x),Z=(r-n)/10,fe=C||(r-n)/100,Se=Hl(B,n,r),Me=r-Se+n,Pe=rg(F?Me:Se,n,r),he=p==="vertical",se=ax({min:n,max:r,step:C,isDisabled:y,value:Se,isInteractive:$,isReversed:F,isVertical:he,eventSource:null,focusThumbOnChange:T,orientation:p}),Ne=g.useRef(null),Ve=g.useRef(null),Ue=g.useRef(null),$e=g.useId(),Qe=h??$e,[me,De]=[`slider-thumb-${Qe}`,`slider-track-${Qe}`],Ge=g.useCallback(de=>{var Ae,dn;if(!Ne.current)return;const Vt=se.current;Vt.eventSource="pointer";const fn=Ne.current.getBoundingClientRect(),{clientX:sr,clientY:ko}=(dn=(Ae=de.touches)==null?void 0:Ae[0])!=null?dn:de,la=he?fn.bottom-ko:sr-fn.left,Xc=he?fn.height:fn.width;let ca=la/Xc;F&&(ca=1-ca);let Eo=n5(ca,Vt.min,Vt.max);return Vt.step&&(Eo=parseFloat(og(Eo,Vt.min,Vt.step))),Eo=Hl(Eo,Vt.min,Vt.max),Eo},[he,F,se]),ge=g.useCallback(de=>{const Ae=se.current;Ae.isInteractive&&(de=parseFloat(og(de,Ae.min,fe)),de=Hl(de,Ae.min,Ae.max),Q(de))},[fe,Q,se]),Te=g.useMemo(()=>({stepUp(de=fe){const Ae=F?Se-de:Se+de;ge(Ae)},stepDown(de=fe){const Ae=F?Se+de:Se-de;ge(Ae)},reset(){ge(c||0)},stepTo(de){ge(de)}}),[ge,F,Se,fe,c]),et=g.useCallback(de=>{const Ae=se.current,Vt={ArrowRight:()=>Te.stepUp(),ArrowUp:()=>Te.stepUp(),ArrowLeft:()=>Te.stepDown(),ArrowDown:()=>Te.stepDown(),PageUp:()=>Te.stepUp(Z),PageDown:()=>Te.stepDown(Z),Home:()=>ge(Ae.min),End:()=>ge(Ae.max)}[de.key];Vt&&(de.preventDefault(),de.stopPropagation(),Vt(de),Ae.eventSource="keyboard")},[Te,ge,Z,se]),Be=(t=V==null?void 0:V(Se))!=null?t:k,vt=P8(Ve),{getThumbStyle:Rt,rootStyle:N,trackStyle:le,innerTrackStyle:ye}=g.useMemo(()=>{const de=se.current,Ae=vt??{width:0,height:0};return o8({isReversed:F,orientation:de.orientation,thumbRects:[Ae],thumbPercents:[Pe]})},[F,vt,Pe,se]),je=g.useCallback(()=>{se.current.focusThumbOnChange&&setTimeout(()=>{var Ae;return(Ae=Ve.current)==null?void 0:Ae.focus()})},[se]);ti(()=>{const de=se.current;je(),de.eventSource==="keyboard"&&(R==null||R(de.value))},[Se,R]);function q(de){const Ae=Ge(de);Ae!=null&&Ae!==se.current.value&&Q(Ae)}S8(Ue,{onPanSessionStart(de){const Ae=se.current;Ae.isInteractive&&(X(!0),je(),q(de),_==null||_(Ae.value))},onPanSessionEnd(){const de=se.current;de.isInteractive&&(X(!1),R==null||R(de.value))},onPan(de){se.current.isInteractive&&q(de)}});const ie=g.useCallback((de={},Ae=null)=>({...de,...D,ref:ct(Ae,Ue),tabIndex:-1,"aria-disabled":Md(y),"data-focused":Mi(te),style:{...de.style,...N}}),[D,y,te,N]),Re=g.useCallback((de={},Ae=null)=>({...de,ref:ct(Ae,Ne),id:De,"data-disabled":Mi(y),style:{...de.style,...le}}),[y,De,le]),Ze=g.useCallback((de={},Ae=null)=>({...de,ref:Ae,style:{...de.style,...ye}}),[ye]),J=g.useCallback((de={},Ae=null)=>({...de,ref:ct(Ae,Ve),role:"slider",tabIndex:$?0:void 0,id:me,"data-active":Mi(U),"aria-valuetext":Be,"aria-valuemin":n,"aria-valuemax":r,"aria-valuenow":Se,"aria-orientation":p,"aria-disabled":Md(y),"aria-readonly":Md(x),"aria-label":I,"aria-labelledby":I?void 0:P,style:{...de.style,...Rt(0)},onKeyDown:Td(de.onKeyDown,et),onFocus:Td(de.onFocus,()=>re(!0)),onBlur:Td(de.onBlur,()=>re(!1))}),[$,me,U,Be,n,r,Se,p,y,x,I,P,Rt,et]),Le=g.useCallback((de,Ae=null)=>{const dn=!(de.valuer),Vt=Se>=de.value,fn=rg(de.value,n,r),sr={position:"absolute",pointerEvents:"none",...M8({orientation:p,vertical:{bottom:F?`${100-fn}%`:`${fn}%`},horizontal:{left:F?`${100-fn}%`:`${fn}%`}})};return{...de,ref:Ae,role:"presentation","aria-hidden":!0,"data-disabled":Mi(y),"data-invalid":Mi(!dn),"data-highlighted":Mi(Vt),style:{...de.style,...sr}}},[y,F,r,n,p,Se]),nt=g.useCallback((de={},Ae=null)=>({...de,ref:Ae,type:"hidden",value:Se,name:M}),[M,Se]);return{state:{value:Se,isFocused:te,isDragging:U},actions:Te,getRootProps:ie,getTrackProps:Re,getInnerTrackProps:Ze,getThumbProps:J,getMarkerProps:Le,getInputProps:nt}}function M8(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}function T8(e,t){return t"}),[D8,_c]=kt({name:"SliderStylesContext",hookName:"useSliderStyles",providerName:""}),sx=ue((e,t)=>{const n={orientation:"horizontal",...e},r=un("Slider",n),o=At(n),{direction:s}=ta();o.direction=s;const{getInputProps:c,getRootProps:u,...f}=I8(o),p=u(),h=c({},t);return l.jsx(_8,{value:f,children:l.jsx(D8,{value:r,children:l.jsxs(ne.div,{...p,className:ms("chakra-slider",n.className),__css:r.container,children:[n.children,l.jsx("input",{...h})]})})})});sx.displayName="Slider";var lx=ue((e,t)=>{const{getThumbProps:n}=Tc(),r=_c(),o=n(e,t);return l.jsx(ne.div,{...o,className:ms("chakra-slider__thumb",e.className),__css:r.thumb})});lx.displayName="SliderThumb";var cx=ue((e,t)=>{const{getTrackProps:n}=Tc(),r=_c(),o=n(e,t);return l.jsx(ne.div,{...o,className:ms("chakra-slider__track",e.className),__css:r.track})});cx.displayName="SliderTrack";var ux=ue((e,t)=>{const{getInnerTrackProps:n}=Tc(),r=_c(),o=n(e,t);return l.jsx(ne.div,{...o,className:ms("chakra-slider__filled-track",e.className),__css:r.filledTrack})});ux.displayName="SliderFilledTrack";var Tf=ue((e,t)=>{const{getMarkerProps:n}=Tc(),r=_c(),o=n(e,t);return l.jsx(ne.div,{...o,className:ms("chakra-slider__marker",e.className),__css:r.mark})});Tf.displayName="SliderMark";var dx=ue(function(t,n){const r=un("Switch",t),{spacing:o="0.5rem",children:s,...c}=At(t),{state:u,getInputProps:f,getCheckboxProps:p,getRootProps:h,getLabelProps:y}=k2(c),x=g.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0,...r.container}),[r.container]),S=g.useMemo(()=>({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer",...r.track}),[r.track]),j=g.useMemo(()=>({userSelect:"none",marginStart:o,...r.label}),[o,r.label]);return l.jsxs(ne.label,{...h(),className:ze("chakra-switch",t.className),__css:x,children:[l.jsx("input",{className:"chakra-switch__input",...f({},n)}),l.jsx(ne.span,{...p(),className:"chakra-switch__track",__css:S,children:l.jsx(ne.span,{__css:r.thumb,className:"chakra-switch__thumb","data-checked":qe(u.isChecked),"data-hover":qe(u.isHovered)})}),s&&l.jsx(ne.span,{className:"chakra-switch__label",...y(),__css:j,children:s})]})});dx.displayName="Switch";var[A8,O8,z8,R8]=th();function N8(e){var t;const{defaultIndex:n,onChange:r,index:o,isManual:s,isLazy:c,lazyBehavior:u="unmount",orientation:f="horizontal",direction:p="ltr",...h}=e,[y,x]=g.useState(n??0),[S,j]=rh({defaultValue:n??0,value:o,onChange:r});g.useEffect(()=>{o!=null&&x(o)},[o]);const C=z8(),w=g.useId();return{id:`tabs-${(t=e.id)!=null?t:w}`,selectedIndex:S,focusedIndex:y,setSelectedIndex:j,setFocusedIndex:x,isManual:s,isLazy:c,lazyBehavior:u,orientation:f,descendants:C,direction:p,htmlProps:h}}var[F8,Dc]=kt({name:"TabsContext",errorMessage:"useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within "});function L8(e){const{focusedIndex:t,orientation:n,direction:r}=Dc(),o=O8(),s=g.useCallback(c=>{const u=()=>{var I;const P=o.nextEnabled(t);P&&((I=P.node)==null||I.focus())},f=()=>{var I;const P=o.prevEnabled(t);P&&((I=P.node)==null||I.focus())},p=()=>{var I;const P=o.firstEnabled();P&&((I=P.node)==null||I.focus())},h=()=>{var I;const P=o.lastEnabled();P&&((I=P.node)==null||I.focus())},y=n==="horizontal",x=n==="vertical",S=c.key,j=r==="ltr"?"ArrowLeft":"ArrowRight",C=r==="ltr"?"ArrowRight":"ArrowLeft",k={[j]:()=>y&&f(),[C]:()=>y&&u(),ArrowDown:()=>x&&u(),ArrowUp:()=>x&&f(),Home:p,End:h}[S];k&&(c.preventDefault(),k(c))},[o,t,n,r]);return{...e,role:"tablist","aria-orientation":n,onKeyDown:Ee(e.onKeyDown,s)}}function B8(e){const{isDisabled:t,isFocusable:n,...r}=e,{setSelectedIndex:o,isManual:s,id:c,setFocusedIndex:u,selectedIndex:f}=Dc(),{index:p,register:h}=R8({disabled:t&&!n}),y=p===f,x=()=>{o(p)},S=()=>{u(p),!s&&!(t&&n)&&o(p)},j=wy({...r,ref:ct(h,e.ref),isDisabled:t,isFocusable:n,onClick:Ee(e.onClick,x)}),C="button";return{...j,id:fx(c,p),role:"tab",tabIndex:y?0:-1,type:C,"aria-selected":y,"aria-controls":hx(c,p),onFocus:t?void 0:Ee(e.onFocus,S)}}var[H8,W8]=kt({});function V8(e){const t=Dc(),{id:n,selectedIndex:r}=t,s=ah(e.children).map((c,u)=>g.createElement(H8,{key:u,value:{isSelected:u===r,id:hx(n,u),tabId:fx(n,u),selectedIndex:r}},c));return{...e,children:s}}function U8(e){const{children:t,...n}=e,{isLazy:r,lazyBehavior:o}=Dc(),{isSelected:s,id:c,tabId:u}=W8(),f=g.useRef(!1);s&&(f.current=!0);const p=Dh({wasSelected:f.current,isSelected:s,enabled:r,mode:o});return{tabIndex:0,...n,children:p?t:null,role:"tabpanel","aria-labelledby":u,hidden:!s,id:c}}function fx(e,t){return`${e}--tab-${t}`}function hx(e,t){return`${e}--tabpanel-${t}`}var[$8,Ac]=kt({name:"TabsStylesContext",errorMessage:`useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),px=ue(function(t,n){const r=un("Tabs",t),{children:o,className:s,...c}=At(t),{htmlProps:u,descendants:f,...p}=N8(c),h=g.useMemo(()=>p,[p]),{isFitted:y,...x}=u;return l.jsx(A8,{value:f,children:l.jsx(F8,{value:h,children:l.jsx($8,{value:r,children:l.jsx(ne.div,{className:ze("chakra-tabs",s),ref:n,...x,__css:r.root,children:o})})})})});px.displayName="Tabs";var mx=ue(function(t,n){const r=L8({...t,ref:n}),s={display:"flex",...Ac().tablist};return l.jsx(ne.div,{...r,className:ze("chakra-tabs__tablist",t.className),__css:s})});mx.displayName="TabList";var vx=ue(function(t,n){const r=U8({...t,ref:n}),o=Ac();return l.jsx(ne.div,{outline:"0",...r,className:ze("chakra-tabs__tab-panel",t.className),__css:o.tabpanel})});vx.displayName="TabPanel";var gx=ue(function(t,n){const r=V8(t),o=Ac();return l.jsx(ne.div,{...r,width:"100%",ref:n,className:ze("chakra-tabs__tab-panels",t.className),__css:o.tabpanels})});gx.displayName="TabPanels";var yx=ue(function(t,n){const r=Ac(),o=B8({...t,ref:n}),s={outline:"0",display:"flex",alignItems:"center",justifyContent:"center",...r.tab};return l.jsx(ne.button,{...o,className:ze("chakra-tabs__tab",t.className),__css:s})});yx.displayName="Tab";function G8(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var q8=["h","minH","height","minHeight"],qh=ue((e,t)=>{const n=yo("Textarea",e),{className:r,rows:o,...s}=At(e),c=sh(s),u=o?G8(n,q8):n;return l.jsx(ne.textarea,{ref:t,rows:o,...c,className:ze("chakra-textarea",r),__css:u})});qh.displayName="Textarea";var Y8={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]}}}},sc=e=>{var t;return((t=e.current)==null?void 0:t.ownerDocument)||document},_f=e=>{var t,n;return((n=(t=e.current)==null?void 0:t.ownerDocument)==null?void 0:n.defaultView)||window};function K8(e={}){const{openDelay:t=0,closeDelay:n=0,closeOnClick:r=!0,closeOnMouseDown:o,closeOnScroll:s,closeOnPointerDown:c=o,closeOnEsc:u=!0,onOpen:f,onClose:p,placement:h,id:y,isOpen:x,defaultIsOpen:S,arrowSize:j=10,arrowShadowColor:C,arrowPadding:w,modifiers:k,isDisabled:I,gutter:P,offset:M,direction:T,...D}=e,{isOpen:_,onOpen:R,onClose:V}=_h({isOpen:x,defaultIsOpen:S,onOpen:f,onClose:p}),{referenceRef:F,getPopperProps:B,getArrowInnerProps:Q,getArrowProps:U}=Th({enabled:_,placement:h,arrowPadding:w,modifiers:k,gutter:P,offset:M,direction:T}),X=g.useId(),re=`tooltip-${y??X}`,$=g.useRef(null),Z=g.useRef(),fe=g.useCallback(()=>{Z.current&&(clearTimeout(Z.current),Z.current=void 0)},[]),Se=g.useRef(),Me=g.useCallback(()=>{Se.current&&(clearTimeout(Se.current),Se.current=void 0)},[]),Ie=g.useCallback(()=>{Me(),V()},[V,Me]),Pe=X8($,Ie),he=g.useCallback(()=>{if(!I&&!Z.current){Pe();const De=_f($);Z.current=De.setTimeout(R,t)}},[Pe,I,R,t]),se=g.useCallback(()=>{fe();const De=_f($);Se.current=De.setTimeout(Ie,n)},[n,Ie,fe]),Ne=g.useCallback(()=>{_&&r&&se()},[r,se,_]),Ve=g.useCallback(()=>{_&&c&&se()},[c,se,_]),Ue=g.useCallback(De=>{_&&De.key==="Escape"&&se()},[_,se]);Go(()=>sc($),"keydown",u?Ue:void 0),Go(()=>sc($),"scroll",()=>{_&&s&&Ie()}),g.useEffect(()=>{I&&(fe(),_&&V())},[I,_,V,fe]),g.useEffect(()=>()=>{fe(),Me()},[fe,Me]),Go(()=>$.current,"pointerleave",se);const $e=g.useCallback((De={},Ge=null)=>({...De,ref:ct($,Ge,F),onPointerEnter:Ee(De.onPointerEnter,Te=>{Te.pointerType!=="touch"&&he()}),onClick:Ee(De.onClick,Ne),onPointerDown:Ee(De.onPointerDown,Ve),onFocus:Ee(De.onFocus,he),onBlur:Ee(De.onBlur,se),"aria-describedby":_?re:void 0}),[he,se,Ve,_,re,Ne,F]),Qe=g.useCallback((De={},Ge=null)=>B({...De,style:{...De.style,[Ht.arrowSize.var]:j?`${j}px`:void 0,[Ht.arrowShadowColor.var]:C}},Ge),[B,j,C]),me=g.useCallback((De={},Ge=null)=>{const ge={...De.style,position:"relative",transformOrigin:Ht.transformOrigin.varRef};return{ref:Ge,...D,...De,id:re,role:"tooltip",style:ge}},[D,re]);return{isOpen:_,show:he,hide:se,getTriggerProps:$e,getTooltipProps:me,getTooltipPositionerProps:Qe,getArrowProps:U,getArrowInnerProps:Q}}var Ad="chakra-ui:close-tooltip";function X8(e,t){return g.useEffect(()=>{const n=sc(e);return n.addEventListener(Ad,t),()=>n.removeEventListener(Ad,t)},[t,e]),()=>{const n=sc(e),r=_f(e);n.dispatchEvent(new r.CustomEvent(Ad))}}function Q8(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Z8(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var J8=ne(ar.div),Gt=ue((e,t)=>{var n,r;const o=yo("Tooltip",e),s=At(e),c=ta(),{children:u,label:f,shouldWrapChildren:p,"aria-label":h,hasArrow:y,bg:x,portalProps:S,background:j,backgroundColor:C,bgColor:w,motionProps:k,...I}=s,P=(r=(n=j??C)!=null?n:x)!=null?r:w;if(P){o.bg=P;const B=US(c,"colors",P);o[Ht.arrowBg.var]=B}const M=K8({...I,direction:c.direction}),T=typeof u=="string"||p;let D;if(T)D=l.jsx(ne.span,{display:"inline-block",tabIndex:0,...M.getTriggerProps(),children:u});else{const B=g.Children.only(u);D=g.cloneElement(B,M.getTriggerProps(B.props,B.ref))}const _=!!h,R=M.getTooltipProps({},t),V=_?Q8(R,["role","id"]):R,F=Z8(R,["role","id"]);return f?l.jsxs(l.Fragment,{children:[D,l.jsx(xo,{children:M.isOpen&&l.jsx($a,{...S,children:l.jsx(ne.div,{...M.getTooltipPositionerProps(),__css:{zIndex:o.zIndex,pointerEvents:"none"},children:l.jsxs(J8,{variants:Y8,initial:"exit",animate:"enter",exit:"exit",...k,...V,__css:o,children:[f,_&&l.jsx(ne.span,{srOnly:!0,...F,children:h}),y&&l.jsx(ne.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper",children:l.jsx(ne.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:o.bg}})})]})})})})]}):l.jsx(l.Fragment,{children:u})});Gt.displayName="Tooltip";const Yh=g.createContext(null);let Rg;const Kh=()=>({setOpenUploader:e=>{e&&(Rg=e)},openUploader:Rg}),bt=pe(e=>e.ui,e=>$S[e.activeTab],{memoizeOptions:{equalityCheck:ee.isEqual}}),eE=pe(e=>e.ui,e=>e.activeTab,{memoizeOptions:{equalityCheck:ee.isEqual}}),Pr=pe(e=>e.ui,e=>e,{memoizeOptions:{equalityCheck:ee.isEqual}}),Ng=e=>async(t,n)=>{const{imageFile:r}=e,o=n(),s=bt(o),c=new FormData;c.append("file",r,r.name),c.append("data",JSON.stringify({kind:"init"}));const f=await(await fetch(`${window.location.origin}/upload`,{method:"POST",body:c})).json(),p={uuid:C1(),category:"user",...f};t(w1({image:p,category:"user"})),s==="unifiedCanvas"?t(bc(p)):s==="img2img"&&t(rs(p))};var tE=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function vs(e,t){var n=nE(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function nE(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),o=tE.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var rE=[".DS_Store","Thumbs.db"];function oE(e){return na(this,void 0,void 0,function(){return ra(this,function(t){return lc(e)&&iE(e.dataTransfer)?[2,cE(e.dataTransfer,e.type)]:aE(e)?[2,sE(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,lE(e)]:[2,[]]})})}function iE(e){return lc(e)}function aE(e){return lc(e)&&lc(e.target)}function lc(e){return typeof e=="object"&&e!==null}function sE(e){return Df(e.target.files).map(function(t){return vs(t)})}function lE(e){return na(this,void 0,void 0,function(){var t;return ra(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return vs(r)})]}})})}function cE(e,t){return na(this,void 0,void 0,function(){var n,r;return ra(this,function(o){switch(o.label){case 0:return e.items?(n=Df(e.items).filter(function(s){return s.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(uE))]):[3,2];case 1:return r=o.sent(),[2,Fg(xx(r))];case 2:return[2,Fg(Df(e.files).map(function(s){return vs(s)}))]}})})}function Fg(e){return e.filter(function(t){return rE.indexOf(t.name)===-1})}function Df(e){if(e===null)return[];for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,Vg(n)];if(e.sizen)return[!1,Vg(n)]}return[!0,null]}function Ho(e){return e!=null}function EE(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,s=e.multiple,c=e.maxFiles,u=e.validator;return!s&&t.length>1||s&&c>=1&&t.length>c?!1:t.every(function(f){var p=wx(f,n),h=Za(p,1),y=h[0],x=jx(f,r,o),S=Za(x,1),j=S[0],C=u?u(f):null;return y&&j&&!C})}function cc(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Il(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function $g(e){e.preventDefault()}function PE(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function IE(e){return e.indexOf("Edge/")!==-1}function ME(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return PE(e)||IE(e)}function vr(){for(var e=arguments.length,t=new Array(e),n=0;n1?o-1:0),c=1;ce.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function GE(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s=0)&&(n[o]=e[o]);return n}var Xh=g.forwardRef(function(e,t){var n=e.children,r=uc(e,zE),o=Mx(r),s=o.open,c=uc(o,RE);return g.useImperativeHandle(t,function(){return{open:s}},[s]),_e.createElement(g.Fragment,null,n(Dt(Dt({},c),{},{open:s})))});Xh.displayName="Dropzone";var Ix={disabled:!1,getFilesFromEvent:oE,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};Xh.defaultProps=Ix;Xh.propTypes={children:lt.func,accept:lt.objectOf(lt.arrayOf(lt.string)),multiple:lt.bool,preventDropOnDocument:lt.bool,noClick:lt.bool,noKeyboard:lt.bool,noDrag:lt.bool,noDragEventsBubbling:lt.bool,minSize:lt.number,maxSize:lt.number,maxFiles:lt.number,disabled:lt.bool,getFilesFromEvent:lt.func,onFileDialogCancel:lt.func,onFileDialogOpen:lt.func,useFsAccessApi:lt.bool,autoFocus:lt.bool,onDragEnter:lt.func,onDragLeave:lt.func,onDragOver:lt.func,onDrop:lt.func,onDropAccepted:lt.func,onDropRejected:lt.func,onError:lt.func,validator:lt.func};var Rf={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Mx(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Dt(Dt({},Ix),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,s=t.maxSize,c=t.minSize,u=t.multiple,f=t.maxFiles,p=t.onDragEnter,h=t.onDragLeave,y=t.onDragOver,x=t.onDrop,S=t.onDropAccepted,j=t.onDropRejected,C=t.onFileDialogCancel,w=t.onFileDialogOpen,k=t.useFsAccessApi,I=t.autoFocus,P=t.preventDropOnDocument,M=t.noClick,T=t.noKeyboard,D=t.noDrag,_=t.noDragEventsBubbling,R=t.onError,V=t.validator,F=g.useMemo(function(){return DE(n)},[n]),B=g.useMemo(function(){return _E(n)},[n]),Q=g.useMemo(function(){return typeof w=="function"?w:qg},[w]),U=g.useMemo(function(){return typeof C=="function"?C:qg},[C]),X=g.useRef(null),te=g.useRef(null),re=g.useReducer(qE,Rf),$=Od(re,2),Z=$[0],fe=$[1],Se=Z.isFocused,Me=Z.isFileDialogActive,Ie=g.useRef(typeof window<"u"&&window.isSecureContext&&k&&TE()),Pe=function(){!Ie.current&&Me&&setTimeout(function(){if(te.current){var ie=te.current.files;ie.length||(fe({type:"closeDialog"}),U())}},300)};g.useEffect(function(){return window.addEventListener("focus",Pe,!1),function(){window.removeEventListener("focus",Pe,!1)}},[te,Me,U,Ie]);var he=g.useRef([]),se=function(ie){X.current&&X.current.contains(ie.target)||(ie.preventDefault(),he.current=[])};g.useEffect(function(){return P&&(document.addEventListener("dragover",$g,!1),document.addEventListener("drop",se,!1)),function(){P&&(document.removeEventListener("dragover",$g),document.removeEventListener("drop",se))}},[X,P]),g.useEffect(function(){return!r&&I&&X.current&&X.current.focus(),function(){}},[X,I,r]);var Ne=g.useCallback(function(q){R?R(q):console.error(q)},[R]),Ve=g.useCallback(function(q){q.preventDefault(),q.persist(),N(q),he.current=[].concat(LE(he.current),[q.target]),Il(q)&&Promise.resolve(o(q)).then(function(ie){if(!(cc(q)&&!_)){var Re=ie.length,Ze=Re>0&&EE({files:ie,accept:F,minSize:c,maxSize:s,multiple:u,maxFiles:f,validator:V}),J=Re>0&&!Ze;fe({isDragAccept:Ze,isDragReject:J,isDragActive:!0,type:"setDraggedFiles"}),p&&p(q)}}).catch(function(ie){return Ne(ie)})},[o,p,Ne,_,F,c,s,u,f,V]),Ue=g.useCallback(function(q){q.preventDefault(),q.persist(),N(q);var ie=Il(q);if(ie&&q.dataTransfer)try{q.dataTransfer.dropEffect="copy"}catch{}return ie&&y&&y(q),!1},[y,_]),$e=g.useCallback(function(q){q.preventDefault(),q.persist(),N(q);var ie=he.current.filter(function(Ze){return X.current&&X.current.contains(Ze)}),Re=ie.indexOf(q.target);Re!==-1&&ie.splice(Re,1),he.current=ie,!(ie.length>0)&&(fe({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Il(q)&&h&&h(q))},[X,h,_]),Qe=g.useCallback(function(q,ie){var Re=[],Ze=[];q.forEach(function(J){var Le=wx(J,F),nt=Od(Le,2),Nt=nt[0],de=nt[1],Ae=jx(J,c,s),dn=Od(Ae,2),Vt=dn[0],fn=dn[1],sr=V?V(J):null;if(Nt&&Vt&&!sr)Re.push(J);else{var ko=[de,fn];sr&&(ko=ko.concat(sr)),Ze.push({file:J,errors:ko.filter(function(la){return la})})}}),(!u&&Re.length>1||u&&f>=1&&Re.length>f)&&(Re.forEach(function(J){Ze.push({file:J,errors:[kE]})}),Re.splice(0)),fe({acceptedFiles:Re,fileRejections:Ze,type:"setFiles"}),x&&x(Re,Ze,ie),Ze.length>0&&j&&j(Ze,ie),Re.length>0&&S&&S(Re,ie)},[fe,u,F,c,s,f,x,S,j,V]),me=g.useCallback(function(q){q.preventDefault(),q.persist(),N(q),he.current=[],Il(q)&&Promise.resolve(o(q)).then(function(ie){cc(q)&&!_||Qe(ie,q)}).catch(function(ie){return Ne(ie)}),fe({type:"reset"})},[o,Qe,Ne,_]),De=g.useCallback(function(){if(Ie.current){fe({type:"openDialog"}),Q();var q={multiple:u,types:B};window.showOpenFilePicker(q).then(function(ie){return o(ie)}).then(function(ie){Qe(ie,null),fe({type:"closeDialog"})}).catch(function(ie){AE(ie)?(U(ie),fe({type:"closeDialog"})):OE(ie)?(Ie.current=!1,te.current?(te.current.value=null,te.current.click()):Ne(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided."))):Ne(ie)});return}te.current&&(fe({type:"openDialog"}),Q(),te.current.value=null,te.current.click())},[fe,Q,U,k,Qe,Ne,B,u]),Ge=g.useCallback(function(q){!X.current||!X.current.isEqualNode(q.target)||(q.key===" "||q.key==="Enter"||q.keyCode===32||q.keyCode===13)&&(q.preventDefault(),De())},[X,De]),ge=g.useCallback(function(){fe({type:"focus"})},[]),Te=g.useCallback(function(){fe({type:"blur"})},[]),et=g.useCallback(function(){M||(ME()?setTimeout(De,0):De())},[M,De]),Be=function(ie){return r?null:ie},vt=function(ie){return T?null:Be(ie)},Rt=function(ie){return D?null:Be(ie)},N=function(ie){_&&ie.stopPropagation()},le=g.useMemo(function(){return function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ie=q.refKey,Re=ie===void 0?"ref":ie,Ze=q.role,J=q.onKeyDown,Le=q.onFocus,nt=q.onBlur,Nt=q.onClick,de=q.onDragEnter,Ae=q.onDragOver,dn=q.onDragLeave,Vt=q.onDrop,fn=uc(q,NE);return Dt(Dt(zf({onKeyDown:vt(vr(J,Ge)),onFocus:vt(vr(Le,ge)),onBlur:vt(vr(nt,Te)),onClick:Be(vr(Nt,et)),onDragEnter:Rt(vr(de,Ve)),onDragOver:Rt(vr(Ae,Ue)),onDragLeave:Rt(vr(dn,$e)),onDrop:Rt(vr(Vt,me)),role:typeof Ze=="string"&&Ze!==""?Ze:"presentation"},Re,X),!r&&!T?{tabIndex:0}:{}),fn)}},[X,Ge,ge,Te,et,Ve,Ue,$e,me,T,D,r]),ye=g.useCallback(function(q){q.stopPropagation()},[]),je=g.useMemo(function(){return function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ie=q.refKey,Re=ie===void 0?"ref":ie,Ze=q.onChange,J=q.onClick,Le=uc(q,FE),nt=zf({accept:F,multiple:u,type:"file",style:{display:"none"},onChange:Be(vr(Ze,me)),onClick:Be(vr(J,ye)),tabIndex:-1},Re,te);return Dt(Dt({},nt),Le)}},[te,n,u,me,r]);return Dt(Dt({},Z),{},{isFocused:Se&&!r,getRootProps:le,getInputProps:je,rootRef:X,inputRef:te,open:Be(De)})}function qE(e,t){switch(t.type){case"focus":return Dt(Dt({},e),{},{isFocused:!0});case"blur":return Dt(Dt({},e),{},{isFocused:!1});case"openDialog":return Dt(Dt({},Rf),{},{isFileDialogActive:!0});case"closeDialog":return Dt(Dt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Dt(Dt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Dt(Dt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Dt({},Rf);default:return e}}function qg(){}function Nf(){return Nf=Object.assign?Object.assign.bind():function(e){for(var t=1;t'),!0):t?e.some(function(n){return t.includes(n)})||e.includes("*"):!0}var t9=function(t,n,r){r===void 0&&(r=!1);var o=n.alt,s=n.meta,c=n.mod,u=n.shift,f=n.ctrl,p=n.keys,h=t.key,y=t.code,x=t.ctrlKey,S=t.metaKey,j=t.shiftKey,C=t.altKey,w=so(y),k=h.toLowerCase();if(!r){if(o===!C&&k!=="alt"||u===!j&&k!=="shift")return!1;if(c){if(!S&&!x)return!1}else if(s===!S&&k!=="meta"||f===!x&&k!=="ctrl")return!1}return p&&p.length===1&&(p.includes(k)||p.includes(w))?!0:p?XE(p):!p},n9=g.createContext(void 0),r9=function(){return g.useContext(n9)};function Ox(e,t){return e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(e).length===Object.keys(t).length&&Object.keys(e).reduce(function(n,r){return n&&Ox(e[r],t[r])},!0):e===t}var o9=g.createContext({hotkeys:[],enabledScopes:[],toggleScope:function(){},enableScope:function(){},disableScope:function(){}}),i9=function(){return g.useContext(o9)};function a9(e){var t=g.useRef(void 0);return Ox(t.current,e)||(t.current=e),t.current}var Yg=function(t){t.stopPropagation(),t.preventDefault(),t.stopImmediatePropagation()},s9=typeof window<"u"?g.useLayoutEffect:g.useEffect;function ce(e,t,n,r){var o=g.useRef(null),s=g.useRef(!1),c=n instanceof Array?r instanceof Array?void 0:r:n,u=n instanceof Array?n:r instanceof Array?r:void 0,f=g.useCallback(t,u??[]),p=g.useRef(f);u?p.current=f:p.current=t;var h=a9(c),y=i9(),x=y.enabledScopes,S=r9();return s9(function(){if(!((h==null?void 0:h.enabled)===!1||!e9(x,h==null?void 0:h.scopes))){var j=function(I,P){var M;if(P===void 0&&(P=!1),!(JE(I)&&!Ax(I,h==null?void 0:h.enableOnFormTags))){if(o.current!==null&&document.activeElement!==o.current&&!o.current.contains(document.activeElement)){Yg(I);return}(M=I.target)!=null&&M.isContentEditable&&!(h!=null&&h.enableOnContentEditable)||zd(e,h==null?void 0:h.splitKey).forEach(function(T){var D,_=Rd(T,h==null?void 0:h.combinationKey);if(t9(I,_,h==null?void 0:h.ignoreModifiers)||(D=_.keys)!=null&&D.includes("*")){if(P&&s.current)return;if(QE(I,_,h==null?void 0:h.preventDefault),!ZE(I,_,h==null?void 0:h.enabled)){Yg(I);return}p.current(I,_),P||(s.current=!0)}})}},C=function(I){I.key!==void 0&&(_x(so(I.code)),((h==null?void 0:h.keydown)===void 0&&(h==null?void 0:h.keyup)!==!0||h!=null&&h.keydown)&&j(I))},w=function(I){I.key!==void 0&&(Dx(so(I.code)),s.current=!1,h!=null&&h.keyup&&j(I,!0))};return(o.current||(c==null?void 0:c.document)||document).addEventListener("keyup",w),(o.current||(c==null?void 0:c.document)||document).addEventListener("keydown",C),S&&zd(e,h==null?void 0:h.splitKey).forEach(function(k){return S.addHotkey(Rd(k,h==null?void 0:h.combinationKey))}),function(){(o.current||(c==null?void 0:c.document)||document).removeEventListener("keyup",w),(o.current||(c==null?void 0:c.document)||document).removeEventListener("keydown",C),S&&zd(e,h==null?void 0:h.splitKey).forEach(function(k){return S.removeHotkey(Rd(k,h==null?void 0:h.combinationKey))})}}},[e,h,x]),o}const l9=e=>{const{isDragAccept:t,isDragReject:n,overlaySecondaryText:r,setIsHandlingUpload:o}=e;return ce("esc",()=>{o(!1)}),l.jsx(Ye,{sx:{position:"absolute",top:0,insetInlineStart:0,width:"100vw",height:"100vh",zIndex:999,backdropFilter:"blur(20px)"},children:l.jsx(L,{sx:{opacity:.4,width:"100%",height:"100%",flexDirection:"column",rowGap:4,alignItems:"center",justifyContent:"center",bg:"base.900",boxShadow:`inset 0 0 20rem 1rem var(--invokeai-colors-${t?"accent":"error"}-500)`},children:t?l.jsxs(Wn,{size:"lg",children:["Upload Image",r]}):l.jsxs(l.Fragment,{children:[l.jsx(Wn,{size:"lg",children:"Invalid Upload"}),l.jsx(Wn,{size:"md",children:"Must be single JPEG or PNG image"})]})})})},c9=e=>{const{children:t}=e,n=Y(),r=A(bt),o=ls({}),{t:s}=K(),[c,u]=g.useState(!1),{setOpenUploader:f}=Kh(),p=g.useCallback(P=>{u(!0);const M=P.errors.reduce((T,D)=>`${T} -${D.message}`,"");o({title:s("toast.uploadFailed"),description:M,status:"error",isClosable:!0})},[s,o]),h=g.useCallback(async P=>{n(Ng({imageFile:P}))},[n]),y=g.useCallback((P,M)=>{M.forEach(T=>{p(T)}),P.forEach(T=>{h(T)})},[h,p]),{getRootProps:x,getInputProps:S,isDragAccept:j,isDragReject:C,isDragActive:w,open:k}=Mx({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},noClick:!0,onDrop:y,onDragOver:()=>u(!0),maxFiles:1});f(k),g.useEffect(()=>{const P=M=>{var R;const T=(R=M.clipboardData)==null?void 0:R.items;if(!T)return;const D=[];for(const V of T)V.kind==="file"&&["image/png","image/jpg"].includes(V.type)&&D.push(V);if(!D.length)return;if(M.stopImmediatePropagation(),D.length>1){o({description:s("toast.uploadFailedMultipleImagesDesc"),status:"error",isClosable:!0});return}const _=D[0].getAsFile();if(!_){o({description:s("toast.uploadFailedUnableToLoadDesc"),status:"error",isClosable:!0});return}n(Ng({imageFile:_}))};return document.addEventListener("paste",P),()=>{document.removeEventListener("paste",P)}},[s,n,o,r]);const I=["img2img","unifiedCanvas"].includes(r)?` to ${String(s(`common.${r}`))}`:"";return l.jsx(Yh.Provider,{value:k,children:l.jsxs(Ye,{...x({style:{}}),onKeyDown:P=>{P.key},children:[l.jsx("input",{...S()}),t,w&&c&&l.jsx(l9,{isDragAccept:j,isDragReject:C,overlaySecondaryText:I,setIsHandlingUpload:u})]})})},u9=g.memo(c9),zx=ue((e,t)=>{const{role:n,tooltip:r="",tooltipProps:o,isChecked:s,...c}=e;return l.jsx(Gt,{label:r,hasArrow:!0,...o,...o!=null&&o.placement?{placement:o.placement}:{placement:"top"},children:l.jsx(ho,{ref:t,role:n,"aria-checked":s!==void 0?s:void 0,...c})})});zx.displayName="IAIIconButton";const ae=g.memo(zx);var d9=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(r[s]=o[s])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Bt=globalThis&&globalThis.__assign||function(){return Bt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n"u"?void 0:Number(r),maxHeight:typeof o>"u"?void 0:Number(o),minWidth:typeof s>"u"?void 0:Number(s),minHeight:typeof c>"u"?void 0:Number(c)}},y9=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],Jg="__resizable_base__",Rx=function(e){p9(t,e);function t(n){var r=e.call(this,n)||this;return r.ratio=1,r.resizable=null,r.parentLeft=0,r.parentTop=0,r.resizableLeft=0,r.resizableRight=0,r.resizableTop=0,r.resizableBottom=0,r.targetLeft=0,r.targetTop=0,r.appendBase=function(){if(!r.resizable||!r.window)return null;var o=r.parentNode;if(!o)return null;var s=r.window.document.createElement("div");return s.style.width="100%",s.style.height="100%",s.style.position="absolute",s.style.transform="scale(0, 0)",s.style.left="0",s.style.flex="0 0 100%",s.classList?s.classList.add(Jg):s.className+=Jg,o.appendChild(s),s},r.removeBase=function(o){var s=r.parentNode;s&&s.removeChild(o)},r.ref=function(o){o&&(r.resizable=o)},r.state={isResizing:!1,width:typeof(r.propsSize&&r.propsSize.width)>"u"?"auto":r.propsSize&&r.propsSize.width,height:typeof(r.propsSize&&r.propsSize.height)>"u"?"auto":r.propsSize&&r.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},r.onResizeStart=r.onResizeStart.bind(r),r.onMouseMove=r.onMouseMove.bind(r),r.onMouseUp=r.onMouseUp.bind(r),r}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||m9},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var n=0,r=0;if(this.resizable&&this.window){var o=this.resizable.offsetWidth,s=this.resizable.offsetHeight,c=this.resizable.style.position;c!=="relative"&&(this.resizable.style.position="relative"),n=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:o,r=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:s,this.resizable.style.position=c}return{width:n,height:r}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var n=this,r=this.props.size,o=function(u){if(typeof n.state[u]>"u"||n.state[u]==="auto")return"auto";if(n.propsSize&&n.propsSize[u]&&n.propsSize[u].toString().endsWith("%")){if(n.state[u].toString().endsWith("%"))return n.state[u].toString();var f=n.getParentSize(),p=Number(n.state[u].toString().replace("px","")),h=p/f[u]*100;return h+"%"}return Nd(n.state[u])},s=r&&typeof r.width<"u"&&!this.state.isResizing?Nd(r.width):o("width"),c=r&&typeof r.height<"u"&&!this.state.isResizing?Nd(r.height):o("height");return{width:s,height:c}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var n=this.appendBase();if(!n)return{width:0,height:0};var r=!1,o=this.parentNode.style.flexWrap;o!=="wrap"&&(r=!0,this.parentNode.style.flexWrap="wrap"),n.style.position="relative",n.style.minWidth="100%",n.style.minHeight="100%";var s={width:n.offsetWidth,height:n.offsetHeight};return r&&(this.parentNode.style.flexWrap=o),this.removeBase(n),s},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var n=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:n.flexBasis!=="auto"?n.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(n,r){var o=this.propsSize&&this.propsSize[r];return this.state[r]==="auto"&&this.state.original[r]===n&&(typeof o>"u"||o==="auto")?"auto":n},t.prototype.calculateNewMaxFromBoundary=function(n,r){var o=this.props.boundsByDirection,s=this.state.direction,c=o&&Ti("left",s),u=o&&Ti("top",s),f,p;if(this.props.bounds==="parent"){var h=this.parentNode;h&&(f=c?this.resizableRight-this.parentLeft:h.offsetWidth+(this.parentLeft-this.resizableLeft),p=u?this.resizableBottom-this.parentTop:h.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(f=c?this.resizableRight:this.window.innerWidth-this.resizableLeft,p=u?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(f=c?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),p=u?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return f&&Number.isFinite(f)&&(n=n&&n"u"?10:s.width,y=typeof o.width>"u"||o.width<0?n:o.width,x=typeof s.height>"u"?10:s.height,S=typeof o.height>"u"||o.height<0?r:o.height,j=f||0,C=p||0;if(u){var w=(x-j)*this.ratio+C,k=(S-j)*this.ratio+C,I=(h-C)/this.ratio+j,P=(y-C)/this.ratio+j,M=Math.max(h,w),T=Math.min(y,k),D=Math.max(x,I),_=Math.min(S,P);n=Tl(n,M,T),r=Tl(r,D,_)}else n=Tl(n,h,y),r=Tl(r,x,S);return{newWidth:n,newHeight:r}},t.prototype.setBoundingClientRect=function(){if(this.props.bounds==="parent"){var n=this.parentNode;if(n){var r=n.getBoundingClientRect();this.parentLeft=r.left,this.parentTop=r.top}}if(this.props.bounds&&typeof this.props.bounds!="string"){var o=this.props.bounds.getBoundingClientRect();this.targetLeft=o.left,this.targetTop=o.top}if(this.resizable){var s=this.resizable.getBoundingClientRect(),c=s.left,u=s.top,f=s.right,p=s.bottom;this.resizableLeft=c,this.resizableRight=f,this.resizableTop=u,this.resizableBottom=p}},t.prototype.onResizeStart=function(n,r){if(!(!this.resizable||!this.window)){var o=0,s=0;if(n.nativeEvent&&v9(n.nativeEvent)?(o=n.nativeEvent.clientX,s=n.nativeEvent.clientY):n.nativeEvent&&_l(n.nativeEvent)&&(o=n.nativeEvent.touches[0].clientX,s=n.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var c=this.props.onResizeStart(n,r,this.resizable);if(c===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var u,f=this.window.getComputedStyle(this.resizable);if(f.flexBasis!=="auto"){var p=this.parentNode;if(p){var h=this.window.getComputedStyle(p).flexDirection;this.flexDir=h.startsWith("row")?"row":"column",u=f.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var y={original:{x:o,y:s,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:yr(yr({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(n.target).cursor||"auto"}),direction:r,flexBasis:u};this.setState(y)}},t.prototype.onMouseMove=function(n){var r=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&_l(n))try{n.preventDefault(),n.stopPropagation()}catch{}var o=this.props,s=o.maxWidth,c=o.maxHeight,u=o.minWidth,f=o.minHeight,p=_l(n)?n.touches[0].clientX:n.clientX,h=_l(n)?n.touches[0].clientY:n.clientY,y=this.state,x=y.direction,S=y.original,j=y.width,C=y.height,w=this.getParentSize(),k=g9(w,this.window.innerWidth,this.window.innerHeight,s,c,u,f);s=k.maxWidth,c=k.maxHeight,u=k.minWidth,f=k.minHeight;var I=this.calculateNewSizeFromDirection(p,h),P=I.newHeight,M=I.newWidth,T=this.calculateNewMaxFromBoundary(s,c);this.props.snap&&this.props.snap.x&&(M=Zg(M,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(P=Zg(P,this.props.snap.y,this.props.snapGap));var D=this.calculateNewSizeFromAspectRatio(M,P,{width:T.maxWidth,height:T.maxHeight},{width:u,height:f});if(M=D.newWidth,P=D.newHeight,this.props.grid){var _=Qg(M,this.props.grid[0]),R=Qg(P,this.props.grid[1]),V=this.props.snapGap||0;M=V===0||Math.abs(_-M)<=V?_:M,P=V===0||Math.abs(R-P)<=V?R:P}var F={width:M-S.width,height:P-S.height};if(j&&typeof j=="string"){if(j.endsWith("%")){var B=M/w.width*100;M=B+"%"}else if(j.endsWith("vw")){var Q=M/this.window.innerWidth*100;M=Q+"vw"}else if(j.endsWith("vh")){var U=M/this.window.innerHeight*100;M=U+"vh"}}if(C&&typeof C=="string"){if(C.endsWith("%")){var B=P/w.height*100;P=B+"%"}else if(C.endsWith("vw")){var Q=P/this.window.innerWidth*100;P=Q+"vw"}else if(C.endsWith("vh")){var U=P/this.window.innerHeight*100;P=U+"vh"}}var X={width:this.createSizeForCssProperty(M,"width"),height:this.createSizeForCssProperty(P,"height")};this.flexDir==="row"?X.flexBasis=X.width:this.flexDir==="column"&&(X.flexBasis=X.height),GS.flushSync(function(){r.setState(X)}),this.props.onResize&&this.props.onResize(n,x,this.resizable,F)}},t.prototype.onMouseUp=function(n){var r=this.state,o=r.isResizing,s=r.direction,c=r.original;if(!(!o||!this.resizable)){var u={width:this.size.width-c.width,height:this.size.height-c.height};this.props.onResizeStop&&this.props.onResizeStop(n,s,this.resizable,u),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:yr(yr({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(n){this.setState({width:n.width,height:n.height})},t.prototype.renderResizer=function(){var n=this,r=this.props,o=r.enable,s=r.handleStyles,c=r.handleClasses,u=r.handleWrapperStyle,f=r.handleWrapperClass,p=r.handleComponent;if(!o)return null;var h=Object.keys(o).map(function(y){return o[y]!==!1?g.createElement(h9,{key:y,direction:y,onResizeStart:n.onResizeStart,replaceStyles:s&&s[y],className:c&&c[y]},p&&p[y]?p[y]:null):null});return g.createElement("div",{className:f,style:u},h)},t.prototype.render=function(){var n=this,r=Object.keys(this.props).reduce(function(c,u){return y9.indexOf(u)!==-1||(c[u]=n.props[u]),c},{}),o=yr(yr(yr({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(o.flexBasis=this.state.flexBasis);var s=this.props.as||"div";return g.createElement(s,yr({ref:this.ref,style:o,className:this.props.className},r),this.state.isResizing&&g.createElement("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer())},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(g.PureComponent),Nx={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},e0=_e.createContext&&_e.createContext(Nx),uo=globalThis&&globalThis.__assign||function(){return uo=Object.assign||function(e){for(var t,n=1,r=arguments.length;ne.system,Y9=e=>e.system.toastQueue,Kx=pe(Et,e=>{const{model_list:t}=e,n=ee.reduce(t,(r,o,s)=>(o.status==="active"&&(r=s),r),"");return{...t[n],name:n}},{memoizeOptions:{resultEqualityCheck:ee.isEqual}}),K9=pe(Et,e=>{const{model_list:t}=e;return ee.pickBy(t,(r,o)=>{if(r.format==="diffusers")return{name:o,...r}})},{memoizeOptions:{resultEqualityCheck:ee.isEqual}}),X9=pe(Et,e=>e.log,{memoizeOptions:{resultEqualityCheck:(e,t)=>e.length===t.length}}),Q9=pe(Et,e=>({shouldShowLogViewer:e.shouldShowLogViewer,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:ee.isEqual}}),Z9=()=>{const e=Y(),{t}=K(),n=A(X9),{shouldShowLogViewer:r,hasError:o,wasErrorSeen:s}=A(Q9),[c,u]=g.useState(!0),f=g.useRef(null);g.useLayoutEffect(()=>{f.current!==null&&c&&(f.current.scrollTop=f.current.scrollHeight)},[c,n,r]);const p=()=>{e(j1()),e(dd(!r))};ce("`",()=>{e(dd(!r))},[r]),ce("esc",()=>{e(dd(!1))});const h=()=>{f.current&&c&&f.current.scrollTop{const{timestamp:S,message:j,level:C}=y,w=C==="info"?"base":C;return l.jsxs(L,{sx:{gap:2,color:`${w}.300`},children:[l.jsxs(Ce,{fontWeight:"600",children:[S,":"]}),l.jsx(Ce,{wordBreak:"break-all",children:j})]},x)})})}),r&&l.jsx(Gt,{hasArrow:!0,label:c?"Autoscroll On":"Autoscroll Off",children:l.jsx(ae,{size:"sm","aria-label":t("accessibility.toggleAutoscroll"),icon:l.jsx(w9,{}),onClick:()=>u(!c),isChecked:c,sx:{position:"fixed",insetInlineStart:2,bottom:12,zIndex:"10000"}})}),l.jsx(Gt,{hasArrow:!0,label:r?"Hide Console":"Show Console",children:l.jsx(ae,{size:"sm","aria-label":t("accessibility.toggleLogViewer"),icon:r?l.jsx(N9,{}):l.jsx(Hx,{}),onClick:p,sx:{position:"fixed",insetInlineStart:2,bottom:2,zIndex:"10000"},colorScheme:o||!s?"error":"base"})})]})},J9="0px",Xx="calc(70px + 1rem)",dc=1.5,eP=`calc(100vw - ${J9})`,tP=`calc(100vh - ${dc*4}px)`,nP=`calc(100vh - ${Xx})`,rP=`calc(100vh - (${Xx} + 4.4rem))`,r0=384,oP=pe(Et,e=>({isProcessing:e.isProcessing,currentStep:e.currentStep,totalSteps:e.totalSteps,currentStatusHasSteps:e.currentStatusHasSteps}),{memoizeOptions:{resultEqualityCheck:ee.isEqual}}),iP=()=>{const{t:e}=K(),{isProcessing:t,currentStep:n,totalSteps:r,currentStatusHasSteps:o}=A(oP),s=n?Math.round(n*100/r):0;return l.jsx(Jy,{value:s,"aria-label":e("accessibility.invokeProgressBar"),isIndeterminate:t&&!o,height:dc,zIndex:99})};function aP(e){const{title:t,hotkey:n,description:r}=e;return l.jsxs(ir,{sx:{gridTemplateColumns:"auto max-content",justifyContent:"space-between",alignItems:"center"},children:[l.jsxs(ir,{children:[l.jsx(Ce,{fontWeight:600,children:t}),r&&l.jsx(Ce,{sx:{fontSize:"sm"},variant:"subtext",children:r})]}),l.jsx(Ye,{sx:{fontSize:"sm",fontWeight:600,px:2,py:1},children:n})]})}function sP({children:e}){const{isOpen:t,onOpen:n,onClose:r}=po(),{t:o}=K(),s=[{title:o("hotkeys.invoke.title"),desc:o("hotkeys.invoke.desc"),hotkey:"Ctrl+Enter"},{title:o("hotkeys.cancel.title"),desc:o("hotkeys.cancel.desc"),hotkey:"Shift+X"},{title:o("hotkeys.focusPrompt.title"),desc:o("hotkeys.focusPrompt.desc"),hotkey:"Alt+A"},{title:o("hotkeys.toggleOptions.title"),desc:o("hotkeys.toggleOptions.desc"),hotkey:"O"},{title:o("hotkeys.pinOptions.title"),desc:o("hotkeys.pinOptions.desc"),hotkey:"Shift+O"},{title:o("hotkeys.toggleViewer.title"),desc:o("hotkeys.toggleViewer.desc"),hotkey:"Z"},{title:o("hotkeys.toggleGallery.title"),desc:o("hotkeys.toggleGallery.desc"),hotkey:"G"},{title:o("hotkeys.maximizeWorkSpace.title"),desc:o("hotkeys.maximizeWorkSpace.desc"),hotkey:"F"},{title:o("hotkeys.changeTabs.title"),desc:o("hotkeys.changeTabs.desc"),hotkey:"1-5"},{title:o("hotkeys.consoleToggle.title"),desc:o("hotkeys.consoleToggle.desc"),hotkey:"`"}],c=[{title:o("hotkeys.setPrompt.title"),desc:o("hotkeys.setPrompt.desc"),hotkey:"P"},{title:o("hotkeys.setSeed.title"),desc:o("hotkeys.setSeed.desc"),hotkey:"S"},{title:o("hotkeys.setParameters.title"),desc:o("hotkeys.setParameters.desc"),hotkey:"A"},{title:o("hotkeys.restoreFaces.title"),desc:o("hotkeys.restoreFaces.desc"),hotkey:"Shift+R"},{title:o("hotkeys.upscale.title"),desc:o("hotkeys.upscale.desc"),hotkey:"Shift+U"},{title:o("hotkeys.showInfo.title"),desc:o("hotkeys.showInfo.desc"),hotkey:"I"},{title:o("hotkeys.sendToImageToImage.title"),desc:o("hotkeys.sendToImageToImage.desc"),hotkey:"Shift+I"},{title:o("hotkeys.deleteImage.title"),desc:o("hotkeys.deleteImage.desc"),hotkey:"Del"},{title:o("hotkeys.closePanels.title"),desc:o("hotkeys.closePanels.desc"),hotkey:"Esc"}],u=[{title:o("hotkeys.previousImage.title"),desc:o("hotkeys.previousImage.desc"),hotkey:"Arrow Left"},{title:o("hotkeys.nextImage.title"),desc:o("hotkeys.nextImage.desc"),hotkey:"Arrow Right"},{title:o("hotkeys.toggleGalleryPin.title"),desc:o("hotkeys.toggleGalleryPin.desc"),hotkey:"Shift+G"},{title:o("hotkeys.increaseGalleryThumbSize.title"),desc:o("hotkeys.increaseGalleryThumbSize.desc"),hotkey:"Shift+Up"},{title:o("hotkeys.decreaseGalleryThumbSize.title"),desc:o("hotkeys.decreaseGalleryThumbSize.desc"),hotkey:"Shift+Down"}],f=[{title:o("hotkeys.selectBrush.title"),desc:o("hotkeys.selectBrush.desc"),hotkey:"B"},{title:o("hotkeys.selectEraser.title"),desc:o("hotkeys.selectEraser.desc"),hotkey:"E"},{title:o("hotkeys.decreaseBrushSize.title"),desc:o("hotkeys.decreaseBrushSize.desc"),hotkey:"["},{title:o("hotkeys.increaseBrushSize.title"),desc:o("hotkeys.increaseBrushSize.desc"),hotkey:"]"},{title:o("hotkeys.decreaseBrushOpacity.title"),desc:o("hotkeys.decreaseBrushOpacity.desc"),hotkey:"Shift + ["},{title:o("hotkeys.increaseBrushOpacity.title"),desc:o("hotkeys.increaseBrushOpacity.desc"),hotkey:"Shift + ]"},{title:o("hotkeys.moveTool.title"),desc:o("hotkeys.moveTool.desc"),hotkey:"V"},{title:o("hotkeys.fillBoundingBox.title"),desc:o("hotkeys.fillBoundingBox.desc"),hotkey:"Shift + F"},{title:o("hotkeys.eraseBoundingBox.title"),desc:o("hotkeys.eraseBoundingBox.desc"),hotkey:"Delete / Backspace"},{title:o("hotkeys.colorPicker.title"),desc:o("hotkeys.colorPicker.desc"),hotkey:"C"},{title:o("hotkeys.toggleSnap.title"),desc:o("hotkeys.toggleSnap.desc"),hotkey:"N"},{title:o("hotkeys.quickToggleMove.title"),desc:o("hotkeys.quickToggleMove.desc"),hotkey:"Hold Space"},{title:o("hotkeys.toggleLayer.title"),desc:o("hotkeys.toggleLayer.desc"),hotkey:"Q"},{title:o("hotkeys.clearMask.title"),desc:o("hotkeys.clearMask.desc"),hotkey:"Shift+C"},{title:o("hotkeys.hideMask.title"),desc:o("hotkeys.hideMask.desc"),hotkey:"H"},{title:o("hotkeys.showHideBoundingBox.title"),desc:o("hotkeys.showHideBoundingBox.desc"),hotkey:"Shift+H"},{title:o("hotkeys.mergeVisible.title"),desc:o("hotkeys.mergeVisible.desc"),hotkey:"Shift+M"},{title:o("hotkeys.saveToGallery.title"),desc:o("hotkeys.saveToGallery.desc"),hotkey:"Shift+S"},{title:o("hotkeys.copyToClipboard.title"),desc:o("hotkeys.copyToClipboard.desc"),hotkey:"Ctrl+C"},{title:o("hotkeys.downloadImage.title"),desc:o("hotkeys.downloadImage.desc"),hotkey:"Shift+D"},{title:o("hotkeys.undoStroke.title"),desc:o("hotkeys.undoStroke.desc"),hotkey:"Ctrl+Z"},{title:o("hotkeys.redoStroke.title"),desc:o("hotkeys.redoStroke.desc"),hotkey:"Ctrl+Shift+Z, Ctrl+Y"},{title:o("hotkeys.resetView.title"),desc:o("hotkeys.resetView.desc"),hotkey:"R"},{title:o("hotkeys.previousStagingImage.title"),desc:o("hotkeys.previousStagingImage.desc"),hotkey:"Arrow Left"},{title:o("hotkeys.nextStagingImage.title"),desc:o("hotkeys.nextStagingImage.desc"),hotkey:"Arrow Right"},{title:o("hotkeys.acceptStagingImage.title"),desc:o("hotkeys.acceptStagingImage.desc"),hotkey:"Enter"}],p=h=>l.jsx(L,{flexDir:"column",gap:4,children:h.map((y,x)=>l.jsxs(L,{flexDir:"column",px:2,gap:4,children:[l.jsx(aP,{title:y.title,description:y.desc,hotkey:y.hotkey}),x{const{children:n,tooltip:r="",tooltipProps:o,isChecked:s,...c}=e;return l.jsx(Gt,{label:r,...o,children:l.jsx(ni,{ref:t,"aria-checked":s,...c,children:n})})}),Je=g.memo(lP),cP=e=>{const{label:t="",isDisabled:n=!1,isInvalid:r,formControlProps:o,...s}=e;return l.jsxs(rt,{isInvalid:r,isDisabled:n,...o,children:[t!==""&&l.jsx(st,{children:t}),l.jsx(bh,{...s})]})},mt=g.memo(cP),o0=/^-?(0\.)?\.?$/,uP=e=>{const{label:t,isDisabled:n=!1,showStepper:r=!0,isInvalid:o,value:s,onChange:c,min:u,max:f,isInteger:p=!0,formControlProps:h,formLabelProps:y,numberInputFieldProps:x,numberInputStepperProps:S,tooltipProps:j,...C}=e,[w,k]=g.useState(String(s));g.useEffect(()=>{!w.match(o0)&&s!==Number(w)&&k(String(s))},[s,w]);const I=M=>{k(M),M.match(o0)||c(p?Math.floor(Number(M)):Number(M))},P=M=>{const T=ee.clamp(p?Math.floor(Number(M.target.value)):Number(M.target.value),u,f);k(String(T)),c(T)};return l.jsx(Gt,{...j,children:l.jsxs(rt,{isDisabled:n,isInvalid:o,...h,children:[t&&l.jsx(st,{...y,children:t}),l.jsxs(Nh,{value:w,min:u,max:f,keepWithinRange:!0,clampValueOnBlur:!1,onChange:I,onBlur:P,...C,children:[l.jsx(Lh,{...x}),r&&l.jsxs(Fh,{children:[l.jsx(Hh,{...S}),l.jsx(Bh,{...S})]})]})]})})},Vr=g.memo(uP);var i0=Array.isArray,a0=Object.keys,dP=Object.prototype.hasOwnProperty,fP=typeof Element<"u";function Ff(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){var n=i0(e),r=i0(t),o,s,c;if(n&&r){if(s=e.length,s!=t.length)return!1;for(o=s;o--!==0;)if(!Ff(e[o],t[o]))return!1;return!0}if(n!=r)return!1;var u=e instanceof Date,f=t instanceof Date;if(u!=f)return!1;if(u&&f)return e.getTime()==t.getTime();var p=e instanceof RegExp,h=t instanceof RegExp;if(p!=h)return!1;if(p&&h)return e.toString()==t.toString();var y=a0(e);if(s=y.length,s!==a0(t).length)return!1;for(o=s;o--!==0;)if(!dP.call(t,y[o]))return!1;if(fP&&e instanceof Element&&t instanceof Element)return e===t;for(o=s;o--!==0;)if(c=y[o],!(c==="_owner"&&e.$$typeof)&&!Ff(e[c],t[c]))return!1;return!0}return e!==e&&t!==t}var ao=function(t,n){try{return Ff(t,n)}catch(r){if(r.message&&r.message.match(/stack|recursion/i)||r.number===-2146828260)return console.warn("Warning: react-fast-compare does not handle circular references.",r.name,r.message),!1;throw r}},hP=function(t){return pP(t)&&!mP(t)};function pP(e){return!!e&&typeof e=="object"}function mP(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||yP(e)}var vP=typeof Symbol=="function"&&Symbol.for,gP=vP?Symbol.for("react.element"):60103;function yP(e){return e.$$typeof===gP}function xP(e){return Array.isArray(e)?[]:{}}function fc(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Ja(xP(e),e,t):e}function bP(e,t,n){return e.concat(t).map(function(r){return fc(r,n)})}function SP(e,t,n){var r={};return n.isMergeableObject(e)&&Object.keys(e).forEach(function(o){r[o]=fc(e[o],n)}),Object.keys(t).forEach(function(o){!n.isMergeableObject(t[o])||!e[o]?r[o]=fc(t[o],n):r[o]=Ja(e[o],t[o],n)}),r}function Ja(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||bP,n.isMergeableObject=n.isMergeableObject||hP;var r=Array.isArray(t),o=Array.isArray(e),s=r===o;return s?r?n.arrayMerge(e,t,n):SP(e,t,n):fc(t,n)}Ja.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,o){return Ja(r,o,n)},{})};var Lf=Ja,CP=typeof global=="object"&&global&&global.Object===Object&&global;const Qx=CP;var wP=typeof self=="object"&&self&&self.Object===Object&&self,jP=Qx||wP||Function("return this")();const Ir=jP;var kP=Ir.Symbol;const go=kP;var Zx=Object.prototype,EP=Zx.hasOwnProperty,PP=Zx.toString,Da=go?go.toStringTag:void 0;function IP(e){var t=EP.call(e,Da),n=e[Da];try{e[Da]=void 0;var r=!0}catch{}var o=PP.call(e);return r&&(t?e[Da]=n:delete e[Da]),o}var MP=Object.prototype,TP=MP.toString;function _P(e){return TP.call(e)}var DP="[object Null]",AP="[object Undefined]",s0=go?go.toStringTag:void 0;function oi(e){return e==null?e===void 0?AP:DP:s0&&s0 in Object(e)?IP(e):_P(e)}function Jx(e,t){return function(n){return e(t(n))}}var OP=Jx(Object.getPrototypeOf,Object);const np=OP;function ii(e){return e!=null&&typeof e=="object"}var zP="[object Object]",RP=Function.prototype,NP=Object.prototype,eb=RP.toString,FP=NP.hasOwnProperty,LP=eb.call(Object);function l0(e){if(!ii(e)||oi(e)!=zP)return!1;var t=np(e);if(t===null)return!0;var n=FP.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&eb.call(n)==LP}function BP(){this.__data__=[],this.size=0}function tb(e,t){return e===t||e!==e&&t!==t}function Nc(e,t){for(var n=e.length;n--;)if(tb(e[n][0],t))return n;return-1}var HP=Array.prototype,WP=HP.splice;function VP(e){var t=this.__data__,n=Nc(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():WP.call(t,n,1),--this.size,!0}function UP(e){var t=this.__data__,n=Nc(t,e);return n<0?void 0:t[n][1]}function $P(e){return Nc(this.__data__,e)>-1}function GP(e,t){var n=this.__data__,r=Nc(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Gr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1&&e%1==0&&e-1&&e%1==0&&e<=JI}var eM="[object Arguments]",tM="[object Array]",nM="[object Boolean]",rM="[object Date]",oM="[object Error]",iM="[object Function]",aM="[object Map]",sM="[object Number]",lM="[object Object]",cM="[object RegExp]",uM="[object Set]",dM="[object String]",fM="[object WeakMap]",hM="[object ArrayBuffer]",pM="[object DataView]",mM="[object Float32Array]",vM="[object Float64Array]",gM="[object Int8Array]",yM="[object Int16Array]",xM="[object Int32Array]",bM="[object Uint8Array]",SM="[object Uint8ClampedArray]",CM="[object Uint16Array]",wM="[object Uint32Array]",wt={};wt[mM]=wt[vM]=wt[gM]=wt[yM]=wt[xM]=wt[bM]=wt[SM]=wt[CM]=wt[wM]=!0;wt[eM]=wt[tM]=wt[hM]=wt[nM]=wt[pM]=wt[rM]=wt[oM]=wt[iM]=wt[aM]=wt[sM]=wt[lM]=wt[cM]=wt[uM]=wt[dM]=wt[fM]=!1;function jM(e){return ii(e)&&lb(e.length)&&!!wt[oi(e)]}function rp(e){return function(t){return e(t)}}var cb=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ba=cb&&typeof module=="object"&&module&&!module.nodeType&&module,kM=Ba&&Ba.exports===cb,Ld=kM&&Qx.process,EM=function(){try{var e=Ba&&Ba.require&&Ba.require("util").types;return e||Ld&&Ld.binding&&Ld.binding("util")}catch{}}();const Qi=EM;var p0=Qi&&Qi.isTypedArray,PM=p0?rp(p0):jM;const IM=PM;var MM=Object.prototype,TM=MM.hasOwnProperty;function ub(e,t){var n=ys(e),r=!n&&UI(e),o=!n&&!r&&sb(e),s=!n&&!r&&!o&&IM(e),c=n||r||o||s,u=c?LI(e.length,String):[],f=u.length;for(var p in e)(t||TM.call(e,p))&&!(c&&(p=="length"||o&&(p=="offset"||p=="parent")||s&&(p=="buffer"||p=="byteLength"||p=="byteOffset")||ZI(p,f)))&&u.push(p);return u}var _M=Object.prototype;function op(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||_M;return e===n}var DM=Jx(Object.keys,Object);const AM=DM;var OM=Object.prototype,zM=OM.hasOwnProperty;function RM(e){if(!op(e))return AM(e);var t=[];for(var n in Object(e))zM.call(e,n)&&n!="constructor"&&t.push(n);return t}function db(e){return e!=null&&lb(e.length)&&!nb(e)}function ip(e){return db(e)?ub(e):RM(e)}function NM(e,t){return e&&Lc(t,ip(t),e)}function FM(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var LM=Object.prototype,BM=LM.hasOwnProperty;function HM(e){if(!gs(e))return FM(e);var t=op(e),n=[];for(var r in e)r=="constructor"&&(t||!BM.call(e,r))||n.push(r);return n}function ap(e){return db(e)?ub(e,!0):HM(e)}function WM(e,t){return e&&Lc(t,ap(t),e)}var fb=typeof exports=="object"&&exports&&!exports.nodeType&&exports,m0=fb&&typeof module=="object"&&module&&!module.nodeType&&module,VM=m0&&m0.exports===fb,v0=VM?Ir.Buffer:void 0,g0=v0?v0.allocUnsafe:void 0;function UM(e,t){if(t)return e.slice();var n=e.length,r=g0?g0(n):new e.constructor(n);return e.copy(r),r}function hb(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n=0)&&(n[o]=e[o]);return n}function A0(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var O0=function(t){return Array.isArray(t)&&t.length===0},jn=function(t){return typeof t=="function"},Bc=function(t){return t!==null&&typeof t=="object"},W_=function(t){return String(Math.floor(Number(t)))===t},Bd=function(t){return Object.prototype.toString.call(t)==="[object String]"},jb=function(t){return g.Children.count(t)===0},Hd=function(t){return Bc(t)&&jn(t.then)};function en(e,t,n,r){r===void 0&&(r=0);for(var o=wb(t);e&&r=0?[]:{}}}return(s===0?e:o)[c[s]]===n?e:(n===void 0?delete o[c[s]]:o[c[s]]=n,s===0&&n===void 0&&delete r[c[s]],r)}function kb(e,t,n,r){n===void 0&&(n=new WeakMap),r===void 0&&(r={});for(var o=0,s=Object.keys(e);o0?le.map(function(je){return R(je,en(N,je))}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(ye).then(function(je){return je.reduce(function(q,ie,Re){return ie==="DO_NOT_DELETE_YOU_WILL_BE_FIRED"||ie&&(q=wr(q,le[Re],ie)),q},{})})},[R]),F=g.useCallback(function(N){return Promise.all([V(N),x.validationSchema?_(N):{},x.validate?D(N):{}]).then(function(le){var ye=le[0],je=le[1],q=le[2],ie=Lf.all([ye,je,q],{arrayMerge:Y_});return ie})},[x.validate,x.validationSchema,V,D,_]),B=Bn(function(N){return N===void 0&&(N=M.values),T({type:"SET_ISVALIDATING",payload:!0}),F(N).then(function(le){return k.current&&(T({type:"SET_ISVALIDATING",payload:!1}),T({type:"SET_ERRORS",payload:le})),le})});g.useEffect(function(){c&&k.current===!0&&ao(S.current,x.initialValues)&&B(S.current)},[c,B]);var Q=g.useCallback(function(N){var le=N&&N.values?N.values:S.current,ye=N&&N.errors?N.errors:j.current?j.current:x.initialErrors||{},je=N&&N.touched?N.touched:C.current?C.current:x.initialTouched||{},q=N&&N.status?N.status:w.current?w.current:x.initialStatus;S.current=le,j.current=ye,C.current=je,w.current=q;var ie=function(){T({type:"RESET_FORM",payload:{isSubmitting:!!N&&!!N.isSubmitting,errors:ye,touched:je,status:q,values:le,isValidating:!!N&&!!N.isValidating,submitCount:N&&N.submitCount&&typeof N.submitCount=="number"?N.submitCount:0}})};if(x.onReset){var Re=x.onReset(M.values,me);Hd(Re)?Re.then(ie):ie()}else ie()},[x.initialErrors,x.initialStatus,x.initialTouched]);g.useEffect(function(){k.current===!0&&!ao(S.current,x.initialValues)&&(p&&(S.current=x.initialValues,Q()),c&&B(S.current))},[p,x.initialValues,Q,c,B]),g.useEffect(function(){p&&k.current===!0&&!ao(j.current,x.initialErrors)&&(j.current=x.initialErrors||No,T({type:"SET_ERRORS",payload:x.initialErrors||No}))},[p,x.initialErrors]),g.useEffect(function(){p&&k.current===!0&&!ao(C.current,x.initialTouched)&&(C.current=x.initialTouched||Al,T({type:"SET_TOUCHED",payload:x.initialTouched||Al}))},[p,x.initialTouched]),g.useEffect(function(){p&&k.current===!0&&!ao(w.current,x.initialStatus)&&(w.current=x.initialStatus,T({type:"SET_STATUS",payload:x.initialStatus}))},[p,x.initialStatus,x.initialTouched]);var U=Bn(function(N){if(I.current[N]&&jn(I.current[N].validate)){var le=en(M.values,N),ye=I.current[N].validate(le);return Hd(ye)?(T({type:"SET_ISVALIDATING",payload:!0}),ye.then(function(je){return je}).then(function(je){T({type:"SET_FIELD_ERROR",payload:{field:N,value:je}}),T({type:"SET_ISVALIDATING",payload:!1})})):(T({type:"SET_FIELD_ERROR",payload:{field:N,value:ye}}),Promise.resolve(ye))}else if(x.validationSchema)return T({type:"SET_ISVALIDATING",payload:!0}),_(M.values,N).then(function(je){return je}).then(function(je){T({type:"SET_FIELD_ERROR",payload:{field:N,value:je[N]}}),T({type:"SET_ISVALIDATING",payload:!1})});return Promise.resolve()}),X=g.useCallback(function(N,le){var ye=le.validate;I.current[N]={validate:ye}},[]),te=g.useCallback(function(N){delete I.current[N]},[]),re=Bn(function(N,le){T({type:"SET_TOUCHED",payload:N});var ye=le===void 0?o:le;return ye?B(M.values):Promise.resolve()}),$=g.useCallback(function(N){T({type:"SET_ERRORS",payload:N})},[]),Z=Bn(function(N,le){var ye=jn(N)?N(M.values):N;T({type:"SET_VALUES",payload:ye});var je=le===void 0?n:le;return je?B(ye):Promise.resolve()}),fe=g.useCallback(function(N,le){T({type:"SET_FIELD_ERROR",payload:{field:N,value:le}})},[]),Se=Bn(function(N,le,ye){T({type:"SET_FIELD_VALUE",payload:{field:N,value:le}});var je=ye===void 0?n:ye;return je?B(wr(M.values,N,le)):Promise.resolve()}),Me=g.useCallback(function(N,le){var ye=le,je=N,q;if(!Bd(N)){N.persist&&N.persist();var ie=N.target?N.target:N.currentTarget,Re=ie.type,Ze=ie.name,J=ie.id,Le=ie.value,nt=ie.checked,Nt=ie.outerHTML,de=ie.options,Ae=ie.multiple;ye=le||Ze||J,je=/number|range/.test(Re)?(q=parseFloat(Le),isNaN(q)?"":q):/checkbox/.test(Re)?X_(en(M.values,ye),nt,Le):de&&Ae?K_(de):Le}ye&&Se(ye,je)},[Se,M.values]),Ie=Bn(function(N){if(Bd(N))return function(le){return Me(le,N)};Me(N)}),Pe=Bn(function(N,le,ye){le===void 0&&(le=!0),T({type:"SET_FIELD_TOUCHED",payload:{field:N,value:le}});var je=ye===void 0?o:ye;return je?B(M.values):Promise.resolve()}),he=g.useCallback(function(N,le){N.persist&&N.persist();var ye=N.target,je=ye.name,q=ye.id,ie=ye.outerHTML,Re=le||je||q;Pe(Re,!0)},[Pe]),se=Bn(function(N){if(Bd(N))return function(le){return he(le,N)};he(N)}),Ne=g.useCallback(function(N){jn(N)?T({type:"SET_FORMIK_STATE",payload:N}):T({type:"SET_FORMIK_STATE",payload:function(){return N}})},[]),Ve=g.useCallback(function(N){T({type:"SET_STATUS",payload:N})},[]),Ue=g.useCallback(function(N){T({type:"SET_ISSUBMITTING",payload:N})},[]),$e=Bn(function(){return T({type:"SUBMIT_ATTEMPT"}),B().then(function(N){var le=N instanceof Error,ye=!le&&Object.keys(N).length===0;if(ye){var je;try{if(je=De(),je===void 0)return}catch(q){throw q}return Promise.resolve(je).then(function(q){return k.current&&T({type:"SUBMIT_SUCCESS"}),q}).catch(function(q){if(k.current)throw T({type:"SUBMIT_FAILURE"}),q})}else if(k.current&&(T({type:"SUBMIT_FAILURE"}),le))throw N})}),Qe=Bn(function(N){N&&N.preventDefault&&jn(N.preventDefault)&&N.preventDefault(),N&&N.stopPropagation&&jn(N.stopPropagation)&&N.stopPropagation(),$e().catch(function(le){console.warn("Warning: An unhandled error was caught from submitForm()",le)})}),me={resetForm:Q,validateForm:B,validateField:U,setErrors:$,setFieldError:fe,setFieldTouched:Pe,setFieldValue:Se,setStatus:Ve,setSubmitting:Ue,setTouched:re,setValues:Z,setFormikState:Ne,submitForm:$e},De=Bn(function(){return h(M.values,me)}),Ge=Bn(function(N){N&&N.preventDefault&&jn(N.preventDefault)&&N.preventDefault(),N&&N.stopPropagation&&jn(N.stopPropagation)&&N.stopPropagation(),Q()}),ge=g.useCallback(function(N){return{value:en(M.values,N),error:en(M.errors,N),touched:!!en(M.touched,N),initialValue:en(S.current,N),initialTouched:!!en(C.current,N),initialError:en(j.current,N)}},[M.errors,M.touched,M.values]),Te=g.useCallback(function(N){return{setValue:function(ye,je){return Se(N,ye,je)},setTouched:function(ye,je){return Pe(N,ye,je)},setError:function(ye){return fe(N,ye)}}},[Se,Pe,fe]),et=g.useCallback(function(N){var le=Bc(N),ye=le?N.name:N,je=en(M.values,ye),q={name:ye,value:je,onChange:Ie,onBlur:se};if(le){var ie=N.type,Re=N.value,Ze=N.as,J=N.multiple;ie==="checkbox"?Re===void 0?q.checked=!!je:(q.checked=!!(Array.isArray(je)&&~je.indexOf(Re)),q.value=Re):ie==="radio"?(q.checked=je===Re,q.value=Re):Ze==="select"&&J&&(q.value=q.value||[],q.multiple=!0)}return q},[se,Ie,M.values]),Be=g.useMemo(function(){return!ao(S.current,M.values)},[S.current,M.values]),vt=g.useMemo(function(){return typeof u<"u"?Be?M.errors&&Object.keys(M.errors).length===0:u!==!1&&jn(u)?u(x):u:M.errors&&Object.keys(M.errors).length===0},[u,Be,M.errors,x]),Rt=pt({},M,{initialValues:S.current,initialErrors:j.current,initialTouched:C.current,initialStatus:w.current,handleBlur:se,handleChange:Ie,handleReset:Ge,handleSubmit:Qe,resetForm:Q,setErrors:$,setFormikState:Ne,setFieldTouched:Pe,setFieldValue:Se,setFieldError:fe,setStatus:Ve,setSubmitting:Ue,setTouched:re,setValues:Z,submitForm:$e,validateForm:B,validateField:U,isValid:vt,dirty:Be,unregisterField:te,registerField:X,getFieldProps:et,getFieldMeta:ge,getFieldHelpers:Te,validateOnBlur:o,validateOnChange:n,validateOnMount:c});return Rt}function xs(e){var t=$_(e),n=e.component,r=e.children,o=e.render,s=e.innerRef;return g.useImperativeHandle(s,function(){return t}),g.createElement(V_,{value:t},n?g.createElement(n,t):o?o(t):r?jn(r)?r(t):jb(r)?null:g.Children.only(r):null)}function G_(e){var t={};if(e.inner){if(e.inner.length===0)return wr(t,e.path,e.message);for(var o=e.inner,n=Array.isArray(o),r=0,o=n?o:o[Symbol.iterator]();;){var s;if(n){if(r>=o.length)break;s=o[r++]}else{if(r=o.next(),r.done)break;s=r.value}var c=s;en(t,c.path)||(t=wr(t,c.path,c.message))}}return t}function q_(e,t,n,r){n===void 0&&(n=!1),r===void 0&&(r={});var o=Uf(e);return t[n?"validateSync":"validate"](o,{abortEarly:!1,context:r})}function Uf(e){var t=Array.isArray(e)?[]:{};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=String(n);Array.isArray(e[r])===!0?t[r]=e[r].map(function(o){return Array.isArray(o)===!0||l0(o)?Uf(o):o!==""?o:void 0}):l0(e[r])?t[r]=Uf(e[r]):t[r]=e[r]!==""?e[r]:void 0}return t}function Y_(e,t,n){var r=e.slice();return t.forEach(function(s,c){if(typeof r[c]>"u"){var u=n.clone!==!1,f=u&&n.isMergeableObject(s);r[c]=f?Lf(Array.isArray(s)?[]:{},s,n):s}else n.isMergeableObject(s)?r[c]=Lf(e[c],s,n):e.indexOf(s)===-1&&r.push(s)}),r}function K_(e){return Array.from(e).filter(function(t){return t.selected}).map(function(t){return t.value})}function X_(e,t,n){if(typeof e=="boolean")return Boolean(t);var r=[],o=!1,s=-1;if(Array.isArray(e))r=e,s=e.indexOf(n),o=s>=0;else if(!n||n=="true"||n=="false")return Boolean(t);return t&&n&&!o?r.concat(n):o?r.slice(0,s).concat(r.slice(s+1)):r}var Q_=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?g.useLayoutEffect:g.useEffect;function Bn(e){var t=g.useRef(e);return Q_(function(){t.current=e}),g.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;or?o:r},0);return Array.from(pt({},t,{length:n+1}))}else return[]},nD=function(e){H_(t,e);function t(r){var o;return o=e.call(this,r)||this,o.updateArrayField=function(s,c,u){var f=o.props,p=f.name,h=f.formik.setFormikState;h(function(y){var x=typeof u=="function"?u:s,S=typeof c=="function"?c:s,j=wr(y.values,p,s(en(y.values,p))),C=u?x(en(y.errors,p)):void 0,w=c?S(en(y.touched,p)):void 0;return O0(C)&&(C=void 0),O0(w)&&(w=void 0),pt({},y,{values:j,errors:u?wr(y.errors,p,C):y.errors,touched:c?wr(y.touched,p,w):y.touched})})},o.push=function(s){return o.updateArrayField(function(c){return[].concat(Zi(c),[B_(s)])},!1,!1)},o.handlePush=function(s){return function(){return o.push(s)}},o.swap=function(s,c){return o.updateArrayField(function(u){return eD(u,s,c)},!0,!0)},o.handleSwap=function(s,c){return function(){return o.swap(s,c)}},o.move=function(s,c){return o.updateArrayField(function(u){return J_(u,s,c)},!0,!0)},o.handleMove=function(s,c){return function(){return o.move(s,c)}},o.insert=function(s,c){return o.updateArrayField(function(u){return Wd(u,s,c)},function(u){return Wd(u,s,null)},function(u){return Wd(u,s,null)})},o.handleInsert=function(s,c){return function(){return o.insert(s,c)}},o.replace=function(s,c){return o.updateArrayField(function(u){return tD(u,s,c)},!1,!1)},o.handleReplace=function(s,c){return function(){return o.replace(s,c)}},o.unshift=function(s){var c=-1;return o.updateArrayField(function(u){var f=u?[s].concat(u):[s];return c<0&&(c=f.length),f},function(u){var f=u?[null].concat(u):[null];return c<0&&(c=f.length),f},function(u){var f=u?[null].concat(u):[null];return c<0&&(c=f.length),f}),c},o.handleUnshift=function(s){return function(){return o.unshift(s)}},o.handleRemove=function(s){return function(){return o.remove(s)}},o.handlePop=function(){return function(){return o.pop()}},o.remove=o.remove.bind(A0(o)),o.pop=o.pop.bind(A0(o)),o}var n=t.prototype;return n.componentDidUpdate=function(o){this.props.validateOnChange&&this.props.formik.validateOnChange&&!ao(en(o.formik.values,o.name),en(this.props.formik.values,this.props.name))&&this.props.formik.validateForm(this.props.formik.values)},n.remove=function(o){var s;return this.updateArrayField(function(c){var u=c?Zi(c):[];return s||(s=u[o]),jn(u.splice)&&u.splice(o,1),u},!0,!0),s},n.pop=function(){var o;return this.updateArrayField(function(s){var c=s;return o||(o=c&&c.pop&&c.pop()),c},!0,!0),o},n.render=function(){var o={push:this.push,pop:this.pop,swap:this.swap,move:this.move,insert:this.insert,replace:this.replace,unshift:this.unshift,remove:this.remove,handlePush:this.handlePush,handlePop:this.handlePop,handleSwap:this.handleSwap,handleMove:this.handleMove,handleInsert:this.handleInsert,handleReplace:this.handleReplace,handleUnshift:this.handleUnshift,handleRemove:this.handleRemove},s=this.props,c=s.component,u=s.render,f=s.children,p=s.name,h=s.formik,y=Vo(h,["validate","validationSchema"]),x=pt({},o,{form:y,name:p});return c?g.createElement(c,x):u?u(x):f?typeof f=="function"?f(x):jb(f)?null:g.Children.only(f):null},t}(g.Component);nD.defaultProps={validateOnChange:!0};const rD=ue((e,t)=>{const{t:n}=K(),{acceptButtonText:r=n("common.accept"),acceptCallback:o,cancelButtonText:s=n("common.cancel"),cancelCallback:c,children:u,title:f,triggerComponent:p}=e,{isOpen:h,onOpen:y,onClose:x}=po(),S=g.useRef(null),j=()=>{o(),x()},C=()=>{c&&c(),x()};return l.jsxs(l.Fragment,{children:[g.cloneElement(p,{onClick:y,ref:t}),l.jsx(Yy,{isOpen:h,leastDestructiveRef:S,onClose:x,isCentered:!0,children:l.jsx(Hr,{children:l.jsxs(Ky,{children:[l.jsx(Br,{fontSize:"lg",fontWeight:"bold",children:f}),l.jsx(Wr,{children:u}),l.jsxs(Lr,{children:[l.jsx(Je,{ref:S,onClick:C,children:s}),l.jsx(Je,{colorScheme:"error",onClick:j,ml:3,children:r})]})]})})})]})}),Wc=g.memo(rD);function oD(e){const{model:t}=e,r=A(j=>j.system.model_list)[t],o=Y(),{t:s}=K(),c=A(j=>j.system.isProcessing),u=A(j=>j.system.isConnected),[f,p]=g.useState("same"),[h,y]=g.useState("");g.useEffect(()=>{p("same")},[t]);const x=()=>{p("same")},S=()=>{o(qS({model_name:t,save_location:f,custom_location:f==="custom"&&h!==""?h:null}))};return l.jsxs(Wc,{title:`${s("modelManager.convert")} ${t}`,acceptCallback:S,cancelCallback:x,acceptButtonText:`${s("modelManager.convert")}`,triggerComponent:l.jsxs(Je,{size:"sm","aria-label":s("modelManager.convertToDiffusers"),isDisabled:r.status==="active"||c||!u,className:" modal-close-btn",marginInlineEnd:8,children:["🧨 ",s("modelManager.convertToDiffusers")]}),motionPreset:"slideInBottom",children:[l.jsxs(L,{flexDirection:"column",rowGap:4,children:[l.jsx(Ce,{children:s("modelManager.convertToDiffusersHelpText1")}),l.jsxs(vy,{children:[l.jsx(Ra,{children:s("modelManager.convertToDiffusersHelpText2")}),l.jsx(Ra,{children:s("modelManager.convertToDiffusersHelpText3")}),l.jsx(Ra,{children:s("modelManager.convertToDiffusersHelpText4")}),l.jsx(Ra,{children:s("modelManager.convertToDiffusersHelpText5")})]}),l.jsx(Ce,{children:s("modelManager.convertToDiffusersHelpText6")})]}),l.jsxs(L,{flexDir:"column",gap:4,children:[l.jsxs(L,{marginTop:4,flexDir:"column",gap:2,children:[l.jsx(Ce,{fontWeight:"600",children:s("modelManager.convertToDiffusersSaveLocation")}),l.jsx(Qa,{value:f,onChange:j=>p(j),children:l.jsxs(L,{gap:4,children:[l.jsx(vn,{value:"same",children:l.jsx(Gt,{label:"Save converted model in the same folder",children:s("modelManager.sameFolder")})}),l.jsx(vn,{value:"root",children:l.jsx(Gt,{label:"Save converted model in the InvokeAI root folder",children:s("modelManager.invokeRoot")})}),l.jsx(vn,{value:"custom",children:l.jsx(Gt,{label:"Save converted model in a custom folder",children:s("modelManager.custom")})})]})})]}),f==="custom"&&l.jsxs(L,{flexDirection:"column",rowGap:2,children:[l.jsx(Ce,{fontWeight:"500",fontSize:"sm",variant:"subtext",children:s("modelManager.customSaveLocation")}),l.jsx(mt,{value:h,onChange:j=>{j.target.value!==""&&y(j.target.value)},width:"full"})]})]})]})}function tr(e){const{children:t,...n}=e;return l.jsx(pn,{margin:0,color:"base.400",...n,children:t})}function nr(e){const{children:t,...n}=e;return l.jsx(mn,{color:"error.400",...n,children:t})}const bs=ne.form,iD=pe([Et],e=>{const{openModel:t,model_list:n}=e;return{model_list:n,openModel:t}},{memoizeOptions:{resultEqualityCheck:ee.isEqual}}),z0=64,R0=2048;function aD(){const{openModel:e,model_list:t}=A(iD),n=A(f=>f.system.isProcessing),r=Y(),{t:o}=K(),[s,c]=g.useState({name:"",description:"",config:"configs/stable-diffusion/v1-inference.yaml",weights:"",vae:"",width:512,height:512,default:!1,format:"ckpt"});g.useEffect(()=>{var f,p,h,y,x,S,j;if(e){const C=ee.pickBy(t,(w,k)=>ee.isEqual(k,e));c({name:e,description:(f=C[e])==null?void 0:f.description,config:(p=C[e])==null?void 0:p.config,weights:(h=C[e])==null?void 0:h.weights,vae:(y=C[e])==null?void 0:y.vae,width:(x=C[e])==null?void 0:x.width,height:(S=C[e])==null?void 0:S.height,default:(j=C[e])==null?void 0:j.default,format:"ckpt"})}},[t,e]);const u=f=>{r(os({...f,width:Number(f.width),height:Number(f.height)}))};return e?l.jsxs(L,{flexDirection:"column",rowGap:4,width:"100%",children:[l.jsxs(L,{alignItems:"center",gap:4,justifyContent:"space-between",children:[l.jsx(Ce,{fontSize:"lg",fontWeight:"bold",children:e}),l.jsx(oD,{model:e})]}),l.jsx(L,{flexDirection:"column",maxHeight:window.innerHeight-270,overflowY:"scroll",paddingInlineEnd:8,children:l.jsx(xs,{enableReinitialize:!0,initialValues:s,onSubmit:u,children:({handleSubmit:f,errors:p,touched:h})=>l.jsx(bs,{onSubmit:f,children:l.jsxs(Fe,{rowGap:2,alignItems:"start",children:[l.jsxs(rt,{isInvalid:!!p.description&&h.description,isRequired:!0,children:[l.jsx(st,{htmlFor:"description",fontSize:"sm",children:o("modelManager.description")}),l.jsxs(Fe,{alignItems:"start",children:[l.jsx(jt,{as:mt,id:"description",name:"description",type:"text",width:"full"}),p.description&&h.description?l.jsx(nr,{children:p.description}):l.jsx(tr,{children:o("modelManager.descriptionValidationMsg")})]})]}),l.jsxs(rt,{isInvalid:!!p.config&&h.config,isRequired:!0,children:[l.jsx(st,{htmlFor:"config",fontSize:"sm",children:o("modelManager.config")}),l.jsxs(Fe,{alignItems:"start",children:[l.jsx(jt,{as:mt,id:"config",name:"config",type:"text",width:"full"}),p.config&&h.config?l.jsx(nr,{children:p.config}):l.jsx(tr,{children:o("modelManager.configValidationMsg")})]})]}),l.jsxs(rt,{isInvalid:!!p.weights&&h.weights,isRequired:!0,children:[l.jsx(st,{htmlFor:"config",fontSize:"sm",children:o("modelManager.modelLocation")}),l.jsxs(Fe,{alignItems:"start",children:[l.jsx(jt,{as:mt,id:"weights",name:"weights",type:"text",width:"full"}),p.weights&&h.weights?l.jsx(nr,{children:p.weights}):l.jsx(tr,{children:o("modelManager.modelLocationValidationMsg")})]})]}),l.jsxs(rt,{isInvalid:!!p.vae&&h.vae,children:[l.jsx(st,{htmlFor:"vae",fontSize:"sm",children:o("modelManager.vaeLocation")}),l.jsxs(Fe,{alignItems:"start",children:[l.jsx(jt,{as:mt,id:"vae",name:"vae",type:"text",width:"full"}),p.vae&&h.vae?l.jsx(nr,{children:p.vae}):l.jsx(tr,{children:o("modelManager.vaeLocationValidationMsg")})]})]}),l.jsxs(oa,{width:"100%",children:[l.jsxs(rt,{isInvalid:!!p.width&&h.width,children:[l.jsx(st,{htmlFor:"width",fontSize:"sm",children:o("modelManager.width")}),l.jsxs(Fe,{alignItems:"start",children:[l.jsx(jt,{id:"width",name:"width",children:({field:y,form:x})=>l.jsx(Vr,{id:"width",name:"width",min:z0,max:R0,step:64,value:x.values.width,onChange:S=>x.setFieldValue(y.name,Number(S))})}),p.width&&h.width?l.jsx(nr,{children:p.width}):l.jsx(tr,{children:o("modelManager.widthValidationMsg")})]})]}),l.jsxs(rt,{isInvalid:!!p.height&&h.height,children:[l.jsx(st,{htmlFor:"height",fontSize:"sm",children:o("modelManager.height")}),l.jsxs(Fe,{alignItems:"start",children:[l.jsx(jt,{id:"height",name:"height",children:({field:y,form:x})=>l.jsx(Vr,{id:"height",name:"height",min:z0,max:R0,step:64,value:x.values.height,onChange:S=>x.setFieldValue(y.name,Number(S))})}),p.height&&h.height?l.jsx(nr,{children:p.height}):l.jsx(tr,{children:o("modelManager.heightValidationMsg")})]})]})]}),l.jsx(Je,{type:"submit",className:"modal-close-btn",isLoading:n,children:o("modelManager.updateModel")})]})})})})]}):l.jsx(L,{sx:{width:"100%",justifyContent:"center",alignItems:"center",borderRadius:"base",bg:"base.900"},children:l.jsx(Ce,{fontWeight:500,children:"Pick A Model To Edit"})})}const sD=pe([Et],e=>{const{openModel:t,model_list:n}=e;return{model_list:n,openModel:t}},{memoizeOptions:{resultEqualityCheck:ee.isEqual}});function lD(){const{openModel:e,model_list:t}=A(sD),n=A(f=>f.system.isProcessing),r=Y(),{t:o}=K(),[s,c]=g.useState({name:"",description:"",repo_id:"",path:"",vae:{repo_id:"",path:""},default:!1,format:"diffusers"});g.useEffect(()=>{var f,p,h,y,x,S,j,C,w,k,I,P,M,T,D,_;if(e){const R=ee.pickBy(t,(V,F)=>ee.isEqual(F,e));c({name:e,description:(f=R[e])==null?void 0:f.description,path:(p=R[e])!=null&&p.path&&((h=R[e])==null?void 0:h.path)!=="None"?(y=R[e])==null?void 0:y.path:"",repo_id:(x=R[e])!=null&&x.repo_id&&((S=R[e])==null?void 0:S.repo_id)!=="None"?(j=R[e])==null?void 0:j.repo_id:"",vae:{repo_id:(w=(C=R[e])==null?void 0:C.vae)!=null&&w.repo_id?(I=(k=R[e])==null?void 0:k.vae)==null?void 0:I.repo_id:"",path:(M=(P=R[e])==null?void 0:P.vae)!=null&&M.path?(D=(T=R[e])==null?void 0:T.vae)==null?void 0:D.path:""},default:(_=R[e])==null?void 0:_.default,format:"diffusers"})}},[t,e]);const u=f=>{const p=f;f.path===""&&delete p.path,f.repo_id===""&&delete p.repo_id,f.vae.path===""&&delete p.vae.path,f.vae.repo_id===""&&delete p.vae.repo_id,r(os(f))};return e?l.jsxs(L,{flexDirection:"column",rowGap:4,width:"100%",children:[l.jsx(L,{alignItems:"center",children:l.jsx(Ce,{fontSize:"lg",fontWeight:"bold",children:e})}),l.jsx(L,{flexDirection:"column",overflowY:"scroll",paddingInlineEnd:8,children:l.jsx(xs,{enableReinitialize:!0,initialValues:s,onSubmit:u,children:({handleSubmit:f,errors:p,touched:h})=>{var y,x,S,j,C,w,k,I,P,M;return l.jsx(bs,{onSubmit:f,children:l.jsxs(Fe,{rowGap:2,alignItems:"start",children:[l.jsxs(rt,{isInvalid:!!p.description&&h.description,isRequired:!0,children:[l.jsx(st,{htmlFor:"description",fontSize:"sm",children:o("modelManager.description")}),l.jsxs(Fe,{alignItems:"start",children:[l.jsx(jt,{as:mt,id:"description",name:"description",type:"text",width:"full"}),p.description&&h.description?l.jsx(nr,{children:p.description}):l.jsx(tr,{children:o("modelManager.descriptionValidationMsg")})]})]}),l.jsxs(rt,{isInvalid:!!p.path&&h.path,isRequired:!0,children:[l.jsx(st,{htmlFor:"path",fontSize:"sm",children:o("modelManager.modelLocation")}),l.jsxs(Fe,{alignItems:"start",children:[l.jsx(jt,{as:mt,id:"path",name:"path",type:"text",width:"full"}),p.path&&h.path?l.jsx(nr,{children:p.path}):l.jsx(tr,{children:o("modelManager.modelLocationValidationMsg")})]})]}),l.jsxs(rt,{isInvalid:!!p.repo_id&&h.repo_id,children:[l.jsx(st,{htmlFor:"repo_id",fontSize:"sm",children:o("modelManager.repo_id")}),l.jsxs(Fe,{alignItems:"start",children:[l.jsx(jt,{as:mt,id:"repo_id",name:"repo_id",type:"text",width:"full"}),p.repo_id&&h.repo_id?l.jsx(nr,{children:p.repo_id}):l.jsx(tr,{children:o("modelManager.repoIDValidationMsg")})]})]}),l.jsxs(rt,{isInvalid:!!((y=p.vae)!=null&&y.path)&&((x=h.vae)==null?void 0:x.path),children:[l.jsx(st,{htmlFor:"vae.path",fontSize:"sm",children:o("modelManager.vaeLocation")}),l.jsxs(Fe,{alignItems:"start",children:[l.jsx(jt,{as:mt,id:"vae.path",name:"vae.path",type:"text",width:"full"}),(S=p.vae)!=null&&S.path&&((j=h.vae)!=null&&j.path)?l.jsx(nr,{children:(C=p.vae)==null?void 0:C.path}):l.jsx(tr,{children:o("modelManager.vaeLocationValidationMsg")})]})]}),l.jsxs(rt,{isInvalid:!!((w=p.vae)!=null&&w.repo_id)&&((k=h.vae)==null?void 0:k.repo_id),children:[l.jsx(st,{htmlFor:"vae.repo_id",fontSize:"sm",children:o("modelManager.vaeRepoID")}),l.jsxs(Fe,{alignItems:"start",children:[l.jsx(jt,{as:mt,id:"vae.repo_id",name:"vae.repo_id",type:"text",width:"full"}),(I=p.vae)!=null&&I.repo_id&&((P=h.vae)!=null&&P.repo_id)?l.jsx(nr,{children:(M=p.vae)==null?void 0:M.repo_id}):l.jsx(tr,{children:o("modelManager.vaeRepoIDValidationMsg")})]})]}),l.jsx(Je,{type:"submit",className:"modal-close-btn",isLoading:n,children:o("modelManager.updateModel")})]})})}})})]}):l.jsx(L,{sx:{width:"100%",justifyContent:"center",alignItems:"center",borderRadius:"base",bg:"base.900"},children:l.jsx(Ce,{fontWeight:"500",children:"Pick A Model To Edit"})})}const cD=e=>{const{label:t,...n}=e;return l.jsx(E2,{colorScheme:"accent",...n,children:t})},ft=g.memo(cD),Pb=pe([Et],e=>{const{model_list:t}=e,n=[];return ee.forEach(t,r=>{n.push(r.weights)}),n});function N0({model:e,modelsToAdd:t,setModelsToAdd:n}){const{t:r}=K(),o=A(Pb),s=c=>{t.includes(c.target.value)?n(ee.remove(t,u=>u!==c.target.value)):n([...t,c.target.value])};return l.jsxs(L,{flexDirection:"column",gap:2,backgroundColor:t.includes(e.name)?"accent.650":"base.800",paddingX:4,paddingY:2,borderRadius:4,children:[l.jsxs(L,{gap:4,alignItems:"center",justifyContent:"space-between",children:[l.jsx(ft,{value:e.name,label:l.jsx(Ce,{fontWeight:500,children:e.name}),isChecked:t.includes(e.name),isDisabled:o.includes(e.location),onChange:s}),o.includes(e.location)&&l.jsx(by,{colorScheme:"accent",children:r("modelManager.modelExists")})]}),l.jsx(Ce,{fontStyle:"italic",variant:"subtext",children:e.location})]})}function uD(){const e=Y(),{t}=K(),n=A(P=>P.system.searchFolder),r=A(P=>P.system.foundModels),o=A(Pb),s=A(P=>P.ui.shouldShowExistingModelsInSearch),c=A(P=>P.system.isProcessing),[u,f]=_e.useState([]),[p,h]=_e.useState("v1"),[y,x]=_e.useState(""),S=()=>{e(KS(null)),e(XS(null)),f([])},j=P=>{e(Iv(P.checkpointFolder))},C=()=>{f([]),r&&r.forEach(P=>{o.includes(P.location)||f(M=>[...M,P.name])})},w=()=>{f([])},k=()=>{const P=r==null?void 0:r.filter(T=>u.includes(T.name)),M={v1:"configs/stable-diffusion/v1-inference.yaml",v2_base:"configs/stable-diffusion/v2-inference-v.yaml",v2_768:"configs/stable-diffusion/v2-inference-v.yaml",inpainting:"configs/stable-diffusion/v1-inpainting-inference.yaml",custom:y};P==null||P.forEach(T=>{const D={name:T.name,description:"",config:M[p],weights:T.location,vae:"",width:512,height:512,default:!1,format:"ckpt"};e(os(D))}),f([])},I=()=>{const P=[],M=[];return r&&r.forEach((T,D)=>{o.includes(T.location)?M.push(l.jsx(N0,{model:T,modelsToAdd:u,setModelsToAdd:f},D)):P.push(l.jsx(N0,{model:T,modelsToAdd:u,setModelsToAdd:f},D))}),l.jsxs(L,{flexDirection:"column",rowGap:4,children:[P,s&&M]})};return l.jsxs(l.Fragment,{children:[n?l.jsxs(L,{sx:{padding:4,gap:2,position:"relative",borderRadius:"base",alignItems:"center",w:"full",bg:"base.900"},children:[l.jsxs(L,{sx:{flexDir:"column",gap:2},children:[l.jsx(Ce,{sx:{fontWeight:500},variant:"subtext",children:t("modelManager.checkpointFolder")}),l.jsx(Ce,{sx:{fontWeight:500},children:n})]}),l.jsx(kc,{}),l.jsx(ae,{"aria-label":t("modelManager.scanAgain"),tooltip:t("modelManager.scanAgain"),icon:l.jsx(t0,{}),fontSize:18,disabled:c,onClick:()=>e(Iv(n))}),l.jsx(ae,{"aria-label":t("modelManager.clearCheckpointFolder"),tooltip:t("modelManager.clearCheckpointFolder"),icon:l.jsx(So,{}),onClick:S})]}):l.jsx(xs,{initialValues:{checkpointFolder:""},onSubmit:P=>{j(P)},children:({handleSubmit:P})=>l.jsx(bs,{onSubmit:P,width:"100%",children:l.jsxs(oa,{columnGap:2,alignItems:"flex-end",children:[l.jsx(rt,{flexGrow:1,children:l.jsx(jt,{as:mt,id:"checkpointFolder",name:"checkpointFolder",type:"text",size:"md",label:t("modelManager.checkpointFolder")})}),l.jsx(Je,{leftIcon:l.jsx(t0,{}),"aria-label":t("modelManager.findModels"),tooltip:t("modelManager.findModels"),type:"submit",disabled:c,px:8,children:t("modelManager.findModels")})]})})}),r&&l.jsxs(L,{flexDirection:"column",rowGap:4,width:"full",children:[l.jsxs(L,{justifyContent:"space-between",alignItems:"center",children:[l.jsxs("p",{children:[t("modelManager.modelsFound"),": ",r.length]}),l.jsxs("p",{children:[t("modelManager.selected"),": ",u.length]})]}),l.jsxs(L,{columnGap:2,justifyContent:"space-between",children:[l.jsxs(L,{columnGap:2,children:[l.jsx(Je,{isDisabled:u.length===r.length,onClick:C,children:t("modelManager.selectAll")}),l.jsx(Je,{isDisabled:u.length===0,onClick:w,children:t("modelManager.deselectAll")}),l.jsx(ft,{label:t("modelManager.showExisting"),isChecked:s,onChange:()=>e(YS(!s))})]}),l.jsx(Je,{isDisabled:u.length===0,onClick:k,colorScheme:"accent",children:t("modelManager.addSelected")})]}),l.jsxs(L,{sx:{flexDirection:"column",padding:4,rowGap:4,borderRadius:"base",width:"full",bg:"base.900"},children:[l.jsxs(L,{gap:4,children:[l.jsx(Ce,{fontWeight:500,variant:"subtext",children:t("modelManager.pickModelType")}),l.jsx(Qa,{value:p,onChange:P=>h(P),defaultValue:"v1",name:"model_type",children:l.jsxs(L,{gap:4,children:[l.jsx(vn,{value:"v1",children:l.jsx(Ce,{fontSize:"sm",children:t("modelManager.v1")})}),l.jsx(vn,{value:"v2_base",children:l.jsx(Ce,{fontSize:"sm",children:t("modelManager.v2_base")})}),l.jsx(vn,{value:"v2_768",children:l.jsx(Ce,{fontSize:"sm",children:t("modelManager.v2_768")})}),l.jsx(vn,{value:"inpainting",children:l.jsx(Ce,{fontSize:"sm",children:t("modelManager.inpainting")})}),l.jsx(vn,{value:"custom",children:l.jsx(Ce,{fontSize:"sm",children:t("modelManager.customConfig")})})]})})]}),p==="custom"&&l.jsxs(L,{flexDirection:"column",rowGap:2,children:[l.jsx(Ce,{fontWeight:"500",fontSize:"sm",variant:"subtext",children:t("modelManager.pathToCustomConfig")}),l.jsx(mt,{value:y,onChange:P=>{P.target.value!==""&&x(P.target.value)},width:"full"})]})]}),l.jsx(L,{flexDirection:"column",maxHeight:72,overflowY:"scroll",borderRadius:"sm",gap:2,children:r.length>0?I():l.jsx(Ce,{fontWeight:"500",padding:2,borderRadius:"sm",textAlign:"center",variant:"subtext",children:t("modelManager.noModelsFound")})})]})]})}function er({children:e}){return l.jsx(L,{sx:{flexDirection:"column",padding:4,rowGap:4,borderRadius:"base",width:"full",bg:"base.900"},children:e})}const F0=64,L0=2048;function dD(){const e=Y(),{t}=K(),n=A(p=>p.system.isProcessing);function r(p){return/\s/.test(p)}function o(p){let h;return r(p)&&(h=t("modelManager.cannotUseSpaces")),h}const s={name:"",description:"",config:"configs/stable-diffusion/v1-inference.yaml",weights:"",vae:"",width:512,height:512,format:"ckpt",default:!1},c=p=>{e(os(p)),e(Di(null))},[u,f]=_e.useState(!1);return l.jsxs(Fe,{gap:2,alignItems:"flex-start",children:[l.jsxs(L,{columnGap:4,children:[l.jsx(ft,{isChecked:!u,label:t("modelManager.scanForModels"),onChange:()=>f(!u)}),l.jsx(ft,{label:t("modelManager.addManually"),isChecked:u,onChange:()=>f(!u)})]}),u?l.jsx(xs,{initialValues:s,onSubmit:c,children:({handleSubmit:p,errors:h,touched:y})=>l.jsx(bs,{onSubmit:p,sx:{w:"full"},children:l.jsxs(Fe,{rowGap:2,children:[l.jsx(Ce,{fontSize:20,fontWeight:"bold",alignSelf:"start",children:t("modelManager.manual")}),l.jsx(er,{children:l.jsxs(rt,{isInvalid:!!h.name&&y.name,isRequired:!0,children:[l.jsx(st,{htmlFor:"name",fontSize:"sm",children:t("modelManager.name")}),l.jsxs(Fe,{alignItems:"start",children:[l.jsx(jt,{as:mt,id:"name",name:"name",type:"text",validate:o,width:"full"}),h.name&&y.name?l.jsx(mn,{children:h.name}):l.jsx(pn,{margin:0,children:t("modelManager.nameValidationMsg")})]})]})}),l.jsx(er,{children:l.jsxs(rt,{isInvalid:!!h.description&&y.description,isRequired:!0,children:[l.jsx(st,{htmlFor:"description",fontSize:"sm",children:t("modelManager.description")}),l.jsxs(Fe,{alignItems:"start",children:[l.jsx(jt,{as:mt,id:"description",name:"description",type:"text",width:"full"}),h.description&&y.description?l.jsx(mn,{children:h.description}):l.jsx(pn,{margin:0,children:t("modelManager.descriptionValidationMsg")})]})]})}),l.jsx(er,{children:l.jsxs(rt,{isInvalid:!!h.config&&y.config,isRequired:!0,children:[l.jsx(st,{htmlFor:"config",fontSize:"sm",children:t("modelManager.config")}),l.jsxs(Fe,{alignItems:"start",children:[l.jsx(jt,{as:mt,id:"config",name:"config",type:"text",width:"full"}),h.config&&y.config?l.jsx(mn,{children:h.config}):l.jsx(pn,{margin:0,children:t("modelManager.configValidationMsg")})]})]})}),l.jsx(er,{children:l.jsxs(rt,{isInvalid:!!h.weights&&y.weights,isRequired:!0,children:[l.jsx(st,{htmlFor:"config",fontSize:"sm",children:t("modelManager.modelLocation")}),l.jsxs(Fe,{alignItems:"start",children:[l.jsx(jt,{as:mt,id:"weights",name:"weights",type:"text",width:"full"}),h.weights&&y.weights?l.jsx(mn,{children:h.weights}):l.jsx(pn,{margin:0,children:t("modelManager.modelLocationValidationMsg")})]})]})}),l.jsx(er,{children:l.jsxs(rt,{isInvalid:!!h.vae&&y.vae,children:[l.jsx(st,{htmlFor:"vae",fontSize:"sm",children:t("modelManager.vaeLocation")}),l.jsxs(Fe,{alignItems:"start",children:[l.jsx(jt,{as:mt,id:"vae",name:"vae",type:"text",width:"full"}),h.vae&&y.vae?l.jsx(mn,{children:h.vae}):l.jsx(pn,{margin:0,children:t("modelManager.vaeLocationValidationMsg")})]})]})}),l.jsxs(oa,{width:"100%",children:[l.jsx(er,{children:l.jsxs(rt,{isInvalid:!!h.width&&y.width,children:[l.jsx(st,{htmlFor:"width",fontSize:"sm",children:t("modelManager.width")}),l.jsxs(Fe,{alignItems:"start",children:[l.jsx(jt,{id:"width",name:"width",children:({field:x,form:S})=>l.jsx(Vr,{id:"width",name:"width",min:F0,max:L0,step:64,value:S.values.width,onChange:j=>S.setFieldValue(x.name,Number(j))})}),h.width&&y.width?l.jsx(mn,{children:h.width}):l.jsx(pn,{margin:0,children:t("modelManager.widthValidationMsg")})]})]})}),l.jsx(er,{children:l.jsxs(rt,{isInvalid:!!h.height&&y.height,children:[l.jsx(st,{htmlFor:"height",fontSize:"sm",children:t("modelManager.height")}),l.jsxs(Fe,{alignItems:"start",children:[l.jsx(jt,{id:"height",name:"height",children:({field:x,form:S})=>l.jsx(Vr,{id:"height",name:"height",min:F0,max:L0,step:64,value:S.values.height,onChange:j=>S.setFieldValue(x.name,Number(j))})}),h.height&&y.height?l.jsx(mn,{children:h.height}):l.jsx(pn,{margin:0,children:t("modelManager.heightValidationMsg")})]})]})})]}),l.jsx(Je,{type:"submit",className:"modal-close-btn",isLoading:n,children:t("modelManager.addModel")})]})})}):l.jsx(uD,{})]})}function fD(){const e=Y(),{t}=K(),n=A(u=>u.system.isProcessing);function r(u){return/\s/.test(u)}function o(u){let f;return r(u)&&(f=t("modelManager.cannotUseSpaces")),f}const s={name:"",description:"",repo_id:"",path:"",format:"diffusers",default:!1,vae:{repo_id:"",path:""}},c=u=>{const f=u;u.path===""&&delete f.path,u.repo_id===""&&delete f.repo_id,u.vae.path===""&&delete f.vae.path,u.vae.repo_id===""&&delete f.vae.repo_id,e(os(f)),e(Di(null))};return l.jsx(L,{children:l.jsx(xs,{initialValues:s,onSubmit:c,children:({handleSubmit:u,errors:f,touched:p})=>{var h,y,x,S,j,C,w,k,I,P;return l.jsx(bs,{onSubmit:u,children:l.jsxs(Fe,{rowGap:2,children:[l.jsx(er,{children:l.jsxs(rt,{isInvalid:!!f.name&&p.name,isRequired:!0,children:[l.jsx(st,{htmlFor:"name",fontSize:"sm",children:t("modelManager.name")}),l.jsxs(Fe,{alignItems:"start",children:[l.jsx(jt,{as:mt,id:"name",name:"name",type:"text",validate:o,width:"2xl",isRequired:!0}),f.name&&p.name?l.jsx(mn,{children:f.name}):l.jsx(pn,{margin:0,children:t("modelManager.nameValidationMsg")})]})]})}),l.jsx(er,{children:l.jsxs(rt,{isInvalid:!!f.description&&p.description,isRequired:!0,children:[l.jsx(st,{htmlFor:"description",fontSize:"sm",children:t("modelManager.description")}),l.jsxs(Fe,{alignItems:"start",children:[l.jsx(jt,{as:mt,id:"description",name:"description",type:"text",width:"2xl",isRequired:!0}),f.description&&p.description?l.jsx(mn,{children:f.description}):l.jsx(pn,{margin:0,children:t("modelManager.descriptionValidationMsg")})]})]})}),l.jsxs(er,{children:[l.jsx(Ce,{fontWeight:"bold",fontSize:"sm",children:t("modelManager.formMessageDiffusersModelLocation")}),l.jsx(Ce,{sx:{fontSize:"sm",fontStyle:"italic"},variant:"subtext",children:t("modelManager.formMessageDiffusersModelLocationDesc")}),l.jsxs(rt,{isInvalid:!!f.path&&p.path,children:[l.jsx(st,{htmlFor:"path",fontSize:"sm",children:t("modelManager.modelLocation")}),l.jsxs(Fe,{alignItems:"start",children:[l.jsx(jt,{as:mt,id:"path",name:"path",type:"text",width:"2xl"}),f.path&&p.path?l.jsx(mn,{children:f.path}):l.jsx(pn,{margin:0,children:t("modelManager.modelLocationValidationMsg")})]})]}),l.jsxs(rt,{isInvalid:!!f.repo_id&&p.repo_id,children:[l.jsx(st,{htmlFor:"repo_id",fontSize:"sm",children:t("modelManager.repo_id")}),l.jsxs(Fe,{alignItems:"start",children:[l.jsx(jt,{as:mt,id:"repo_id",name:"repo_id",type:"text",width:"2xl"}),f.repo_id&&p.repo_id?l.jsx(mn,{children:f.repo_id}):l.jsx(pn,{margin:0,children:t("modelManager.repoIDValidationMsg")})]})]})]}),l.jsxs(er,{children:[l.jsx(Ce,{fontWeight:"bold",children:t("modelManager.formMessageDiffusersVAELocation")}),l.jsx(Ce,{sx:{fontSize:"sm",fontStyle:"italic"},variant:"subtext",children:t("modelManager.formMessageDiffusersVAELocationDesc")}),l.jsxs(rt,{isInvalid:!!((h=f.vae)!=null&&h.path)&&((y=p.vae)==null?void 0:y.path),children:[l.jsx(st,{htmlFor:"vae.path",fontSize:"sm",children:t("modelManager.vaeLocation")}),l.jsxs(Fe,{alignItems:"start",children:[l.jsx(jt,{as:mt,id:"vae.path",name:"vae.path",type:"text",width:"2xl"}),(x=f.vae)!=null&&x.path&&((S=p.vae)!=null&&S.path)?l.jsx(mn,{children:(j=f.vae)==null?void 0:j.path}):l.jsx(pn,{margin:0,children:t("modelManager.vaeLocationValidationMsg")})]})]}),l.jsxs(rt,{isInvalid:!!((C=f.vae)!=null&&C.repo_id)&&((w=p.vae)==null?void 0:w.repo_id),children:[l.jsx(st,{htmlFor:"vae.repo_id",fontSize:"sm",children:t("modelManager.vaeRepoID")}),l.jsxs(Fe,{alignItems:"start",children:[l.jsx(jt,{as:mt,id:"vae.repo_id",name:"vae.repo_id",type:"text",width:"2xl"}),(k=f.vae)!=null&&k.repo_id&&((I=p.vae)!=null&&I.repo_id)?l.jsx(mn,{children:(P=f.vae)==null?void 0:P.repo_id}):l.jsx(pn,{margin:0,children:t("modelManager.vaeRepoIDValidationMsg")})]})]})]}),l.jsx(Je,{type:"submit",isLoading:n,children:t("modelManager.addModel")})]})})}})})}function B0({text:e,onClick:t}){return l.jsx(L,{position:"relative",width:"50%",height:40,justifyContent:"center",alignItems:"center",onClick:t,as:ni,children:l.jsx(Ce,{fontWeight:"bold",children:e})})}function hD(){const{isOpen:e,onOpen:t,onClose:n}=po(),r=A(u=>u.ui.addNewModelUIOption),o=Y(),{t:s}=K(),c=()=>{n(),o(Di(null))};return l.jsxs(l.Fragment,{children:[l.jsx(Je,{"aria-label":s("modelManager.addNewModel"),tooltip:s("modelManager.addNewModel"),onClick:t,size:"sm",children:l.jsxs(L,{columnGap:2,alignItems:"center",children:[l.jsx(zc,{}),s("modelManager.addNew")]})}),l.jsxs(mo,{isOpen:e,onClose:c,size:"3xl",closeOnOverlayClick:!1,children:[l.jsx(Hr,{}),l.jsxs(vo,{margin:"auto",children:[l.jsxs(Br,{children:[s("modelManager.addNewModel")," "]}),r!==null&&l.jsx(ae,{"aria-label":s("common.back"),tooltip:s("common.back"),onClick:()=>o(Di(null)),position:"absolute",variant:"ghost",zIndex:1,size:"sm",insetInlineEnd:12,top:2,icon:l.jsx(Lx,{})}),l.jsx(aa,{}),l.jsxs(Wr,{children:[r==null&&l.jsxs(L,{columnGap:4,children:[l.jsx(B0,{text:s("modelManager.addCheckpointModel"),onClick:()=>o(Di("ckpt"))}),l.jsx(B0,{text:s("modelManager.addDiffuserModel"),onClick:()=>o(Di("diffusers"))})]}),r=="ckpt"&&l.jsx(dD,{}),r=="diffusers"&&l.jsx(fD,{})]}),l.jsx(Lr,{})]})]})]})}var pD=eh({displayName:"EditIcon",path:l.jsxs("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[l.jsx("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),l.jsx("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]})}),Ib=eh({displayName:"ExternalLinkIcon",path:l.jsxs("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[l.jsx("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),l.jsx("path",{d:"M15 3h6v6"}),l.jsx("path",{d:"M10 14L21 3"})]})}),mD=eh({displayName:"DeleteIcon",path:l.jsx("g",{fill:"currentColor",children:l.jsx("path",{d:"M19.452 7.5H4.547a.5.5 0 00-.5.545l1.287 14.136A2 2 0 007.326 24h9.347a2 2 0 001.992-1.819L19.95 8.045a.5.5 0 00-.129-.382.5.5 0 00-.369-.163zm-9.2 13a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zm5 0a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zM22 4h-4.75a.25.25 0 01-.25-.25V2.5A2.5 2.5 0 0014.5 0h-5A2.5 2.5 0 007 2.5v1.25a.25.25 0 01-.25.25H2a1 1 0 000 2h20a1 1 0 000-2zM9 3.75V2.5a.5.5 0 01.5-.5h5a.5.5 0 01.5.5v1.25a.25.25 0 01-.25.25h-5.5A.25.25 0 019 3.75z"})})});function Ol(e){const{isProcessing:t,isConnected:n}=A(S=>S.system),r=A(S=>S.system.openModel),{t:o}=K(),s=Y(),{name:c,status:u,description:f}=e,p=()=>{s(k1(c))},h=()=>{s(Mv(c))},y=()=>{s(QS(c)),s(Mv(null))},x=()=>{switch(u){case"active":return"ok.500";case"cached":return"warning.500";case"not loaded":return"inherit"}};return l.jsxs(L,{alignItems:"center",p:2,borderRadius:"base",sx:c===r?{bg:"accent.750",_hover:{bg:"accent.750"}}:{_hover:{bg:"base.750"}},children:[l.jsx(Ye,{onClick:h,cursor:"pointer",children:l.jsx(Gt,{label:f,hasArrow:!0,placement:"bottom",children:l.jsx(Ce,{fontWeight:"600",children:c})})}),l.jsx(kc,{onClick:h,cursor:"pointer"}),l.jsxs(L,{gap:2,alignItems:"center",children:[l.jsx(Ce,{color:x(),children:u}),l.jsx(ni,{size:"sm",onClick:p,isDisabled:u==="active"||t||!n,children:o("modelManager.load")}),l.jsx(ae,{icon:l.jsx(pD,{}),size:"sm",onClick:h,"aria-label":o("accessibility.modifyConfig"),isDisabled:u==="active"||t||!n}),l.jsx(Wc,{title:o("modelManager.deleteModel"),acceptCallback:y,acceptButtonText:o("modelManager.delete"),triggerComponent:l.jsx(ae,{icon:l.jsx(mD,{}),size:"sm","aria-label":o("modelManager.deleteConfig"),isDisabled:u==="active"||t||!n,colorScheme:"error"}),children:l.jsxs(L,{rowGap:4,flexDirection:"column",children:[l.jsx("p",{style:{fontWeight:"bold"},children:o("modelManager.deleteMsg1")}),l.jsx("p",{children:o("modelManager.deleteMsg2")})]})})]})]})}function H0(e){const{children:t,value:n}=e,[r,o]=E1("colors",["base.800","base.200"]);return l.jsx("option",{value:n,style:{background:r,color:o},children:t})}const vD=e=>{const{label:t,isDisabled:n,validValues:r,tooltip:o,tooltipProps:s,...c}=e;return l.jsxs(rt,{isDisabled:n,onClick:u=>{u.stopPropagation(),u.nativeEvent.stopImmediatePropagation(),u.nativeEvent.stopPropagation(),u.nativeEvent.cancelBubble=!0},children:[t&&l.jsx(st,{children:t}),l.jsx(Gt,{label:o,...s,children:l.jsx(nx,{...c,children:r.map(u=>typeof u=="string"||typeof u=="number"?l.jsx(H0,{value:u,children:u},u):l.jsx(H0,{value:u.value,children:u.key},u.value))})})]})},Mn=g.memo(vD);function gD(e){return ve({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M19.002 3h-14c-1.103 0-2 .897-2 2v4h2V5h14v14h-14v-4h-2v4c0 1.103.897 2 2 2h14c1.103 0 2-.897 2-2V5c0-1.103-.898-2-2-2z"}},{tag:"path",attr:{d:"m11 16 5-4-5-4v3.001H3v2h8z"}}]})(e)}function Mb(e){return ve({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M12 16c1.671 0 3-1.331 3-3s-1.329-3-3-3-3 1.331-3 3 1.329 3 3 3z"}},{tag:"path",attr:{d:"M20.817 11.186a8.94 8.94 0 0 0-1.355-3.219 9.053 9.053 0 0 0-2.43-2.43 8.95 8.95 0 0 0-3.219-1.355 9.028 9.028 0 0 0-1.838-.18V2L8 5l3.975 3V6.002c.484-.002.968.044 1.435.14a6.961 6.961 0 0 1 2.502 1.053 7.005 7.005 0 0 1 1.892 1.892A6.967 6.967 0 0 1 19 13a7.032 7.032 0 0 1-.55 2.725 7.11 7.11 0 0 1-.644 1.188 7.2 7.2 0 0 1-.858 1.039 7.028 7.028 0 0 1-3.536 1.907 7.13 7.13 0 0 1-2.822 0 6.961 6.961 0 0 1-2.503-1.054 7.002 7.002 0 0 1-1.89-1.89A6.996 6.996 0 0 1 5 13H3a9.02 9.02 0 0 0 1.539 5.034 9.096 9.096 0 0 0 2.428 2.428A8.95 8.95 0 0 0 12 22a9.09 9.09 0 0 0 1.814-.183 9.014 9.014 0 0 0 3.218-1.355 8.886 8.886 0 0 0 1.331-1.099 9.228 9.228 0 0 0 1.1-1.332A8.952 8.952 0 0 0 21 13a9.09 9.09 0 0 0-.183-1.814z"}}]})(e)}function yD(e){return ve({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M6.758 8.758 5.344 7.344a8.048 8.048 0 0 0-1.841 2.859l1.873.701a6.048 6.048 0 0 1 1.382-2.146zM19 12.999a7.935 7.935 0 0 0-2.344-5.655A7.917 7.917 0 0 0 12 5.069V2L7 6l5 4V7.089a5.944 5.944 0 0 1 3.242 1.669A5.956 5.956 0 0 1 17 13v.002c0 .33-.033.655-.086.977-.007.043-.011.088-.019.131a6.053 6.053 0 0 1-1.138 2.536c-.16.209-.331.412-.516.597a5.954 5.954 0 0 1-.728.613 5.906 5.906 0 0 1-2.277 1.015c-.142.03-.285.05-.43.069-.062.009-.122.021-.184.027a6.104 6.104 0 0 1-1.898-.103L9.3 20.819a8.087 8.087 0 0 0 2.534.136c.069-.007.138-.021.207-.03.205-.026.409-.056.61-.098l.053-.009-.001-.005a7.877 7.877 0 0 0 2.136-.795l.001.001.028-.019a7.906 7.906 0 0 0 1.01-.67c.27-.209.532-.43.777-.675.248-.247.47-.513.681-.785.021-.028.049-.053.07-.081l-.006-.004a7.899 7.899 0 0 0 1.093-1.997l.008.003c.029-.078.05-.158.076-.237.037-.11.075-.221.107-.333.04-.14.073-.281.105-.423.022-.099.048-.195.066-.295.032-.171.056-.344.076-.516.01-.076.023-.15.03-.227.023-.249.037-.5.037-.753.002-.002.002-.004.002-.008zM6.197 16.597l-1.6 1.201a8.045 8.045 0 0 0 2.569 2.225l.961-1.754a6.018 6.018 0 0 1-1.93-1.672zM5 13c0-.145.005-.287.015-.429l-1.994-.143a7.977 7.977 0 0 0 .483 3.372l1.873-.701A5.975 5.975 0 0 1 5 13z"}}]})(e)}function xD(e){return ve({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M16.242 17.242a6.04 6.04 0 0 1-1.37 1.027l.961 1.754a8.068 8.068 0 0 0 2.569-2.225l-1.6-1.201a5.938 5.938 0 0 1-.56.645zm1.743-4.671a5.975 5.975 0 0 1-.362 2.528l1.873.701a7.977 7.977 0 0 0 .483-3.371l-1.994.142zm1.512-2.368a8.048 8.048 0 0 0-1.841-2.859l-1.414 1.414a6.071 6.071 0 0 1 1.382 2.146l1.873-.701zm-8.128 8.763c-.047-.005-.094-.015-.141-.021a6.701 6.701 0 0 1-.468-.075 5.923 5.923 0 0 1-2.421-1.122 5.954 5.954 0 0 1-.583-.506 6.138 6.138 0 0 1-.516-.597 5.91 5.91 0 0 1-.891-1.634 6.086 6.086 0 0 1-.247-.902c-.008-.043-.012-.088-.019-.131A6.332 6.332 0 0 1 6 13.002V13c0-1.603.624-3.109 1.758-4.242A5.944 5.944 0 0 1 11 7.089V10l5-4-5-4v3.069a7.917 7.917 0 0 0-4.656 2.275A7.936 7.936 0 0 0 4 12.999v.009c0 .253.014.504.037.753.007.076.021.15.03.227.021.172.044.345.076.516.019.1.044.196.066.295.032.142.065.283.105.423.032.112.07.223.107.333.026.079.047.159.076.237l.008-.003A7.948 7.948 0 0 0 5.6 17.785l-.007.005c.021.028.049.053.07.081.211.272.433.538.681.785a8.236 8.236 0 0 0 .966.816c.265.192.537.372.821.529l.028.019.001-.001a7.877 7.877 0 0 0 2.136.795l-.001.005.053.009c.201.042.405.071.61.098.069.009.138.023.207.03a8.038 8.038 0 0 0 2.532-.137l-.424-1.955a6.11 6.11 0 0 1-1.904.102z"}}]})(e)}function bD(e){return ve({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M11 6H9v3H6v2h3v3h2v-3h3V9h-3z"}},{tag:"path",attr:{d:"M10 2c-4.411 0-8 3.589-8 8s3.589 8 8 8a7.952 7.952 0 0 0 4.897-1.688l4.396 4.396 1.414-1.414-4.396-4.396A7.952 7.952 0 0 0 18 10c0-4.411-3.589-8-8-8zm0 14c-3.309 0-6-2.691-6-6s2.691-6 6-6 6 2.691 6 6-2.691 6-6 6z"}}]})(e)}function SD(e){return ve({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M6 9h8v2H6z"}},{tag:"path",attr:{d:"M10 18a7.952 7.952 0 0 0 4.897-1.688l4.396 4.396 1.414-1.414-4.396-4.396A7.952 7.952 0 0 0 18 10c0-4.411-3.589-8-8-8s-8 3.589-8 8 3.589 8 8 8zm0-14c3.309 0 6 2.691 6 6s-2.691 6-6 6-6-2.691-6-6 2.691-6 6-6z"}}]})(e)}const CD=e=>{const[t,n]=g.useState(!1),{label:r,value:o,min:s=1,max:c=100,step:u=1,onChange:f,tooltipSuffix:p="",withSliderMarks:h=!1,withInput:y=!1,isInteger:x=!1,inputWidth:S=16,inputReadOnly:j=!1,withReset:C=!1,hideTooltip:w=!1,isCompact:k=!1,handleReset:I,isResetDisabled:P,isSliderDisabled:M,isInputDisabled:T,sliderFormControlProps:D,sliderFormLabelProps:_,sliderMarkProps:R,sliderTrackProps:V,sliderThumbProps:F,sliderNumberInputProps:B,sliderNumberInputFieldProps:Q,sliderNumberInputStepperProps:U,sliderTooltipProps:X,sliderIAIIconButtonProps:te,...re}=e,{t:$}=K(),[Z,fe]=g.useState(String(o));g.useEffect(()=>{fe(o)},[o]);const Se=g.useMemo(()=>B!=null&&B.max?B.max:c,[c,B==null?void 0:B.max]),Me=se=>{f(se)},Ie=se=>{se.target.value===""&&(se.target.value=String(s));const Ne=ee.clamp(x?Math.floor(Number(se.target.value)):Number(Z),s,Se);f(Ne)},Pe=se=>{fe(se)},he=()=>{I&&I()};return l.jsxs(rt,{sx:k?{display:"flex",flexDirection:"row",alignItems:"center",columnGap:4,margin:0,padding:0}:{},...D,children:[l.jsx(st,{..._,mb:-1,children:r}),l.jsxs(oa,{w:"100%",gap:2,alignItems:"center",children:[l.jsxs(sx,{"aria-label":r,value:o,min:s,max:c,step:u,onChange:Me,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),focusThumbOnChange:!1,isDisabled:M,...re,children:[h&&l.jsxs(l.Fragment,{children:[l.jsx(Tf,{value:s,sx:{insetInlineStart:"0 !important",insetInlineEnd:"unset !important"},...R,children:s}),l.jsx(Tf,{value:c,sx:{insetInlineStart:"unset !important",insetInlineEnd:"0 !important"},...R,children:c})]}),l.jsx(cx,{...V,children:l.jsx(ux,{})}),l.jsx(Gt,{hasArrow:!0,placement:"top",isOpen:t,label:`${o}${p}`,hidden:w,...X,children:l.jsx(lx,{...F})})]}),y&&l.jsxs(Nh,{min:s,max:Se,step:u,value:Z,onChange:Pe,onBlur:Ie,isDisabled:T,...B,children:[l.jsx(Lh,{readOnly:j,minWidth:S,...Q}),l.jsxs(Fh,{...U,children:[l.jsx(Hh,{onClick:()=>f(Number(Z))}),l.jsx(Bh,{onClick:()=>f(Number(Z))})]})]}),C&&l.jsx(ae,{size:"sm","aria-label":$("accessibility.reset"),tooltip:"Reset",icon:l.jsx(Mb,{}),onClick:he,isDisabled:P,...te})]})]})},ut=g.memo(CD);function wD(){const e=Y(),{isOpen:t,onOpen:n,onClose:r}=po(),o=A(K9),{t:s}=K(),[c,u]=g.useState(Object.keys(o)[0]),[f,p]=g.useState(Object.keys(o)[1]),[h,y]=g.useState("none"),[x,S]=g.useState(""),[j,C]=g.useState(.5),[w,k]=g.useState("weighted_sum"),[I,P]=g.useState("root"),[M,T]=g.useState(""),[D,_]=g.useState(!1),R=Object.keys(o).filter(U=>U!==f&&U!==h),V=Object.keys(o).filter(U=>U!==c&&U!==h),F=[{key:s("modelManager.none"),value:"none"},...Object.keys(o).filter(U=>U!==c&&U!==f).map(U=>({key:U,value:U}))],B=A(U=>U.system.isProcessing),Q=()=>{let U=[c,f,h];U=U.filter(te=>te!=="none");const X={models_to_merge:U,merged_model_name:x!==""?x:U.join("-"),alpha:j,interp:w,model_merge_save_path:I==="root"?null:M,force:D};e(ZS(X))};return l.jsxs(l.Fragment,{children:[l.jsx(Je,{onClick:n,size:"sm",children:l.jsx(L,{columnGap:2,alignItems:"center",children:s("modelManager.mergeModels")})}),l.jsxs(mo,{isOpen:t,onClose:r,size:"4xl",closeOnOverlayClick:!1,children:[l.jsx(Hr,{}),l.jsxs(vo,{fontFamily:"Inter",margin:"auto",paddingInlineEnd:4,children:[l.jsx(Br,{children:s("modelManager.mergeModels")}),l.jsx(aa,{}),l.jsx(Wr,{children:l.jsxs(L,{flexDirection:"column",rowGap:4,children:[l.jsxs(L,{sx:{flexDirection:"column",marginBottom:4,padding:4,borderRadius:"base",rowGap:1,bg:"base.900"},children:[l.jsx(Ce,{children:s("modelManager.modelMergeHeaderHelp1")}),l.jsx(Ce,{fontSize:"sm",variant:"subtext",children:s("modelManager.modelMergeHeaderHelp2")})]}),l.jsxs(L,{columnGap:4,children:[l.jsx(Mn,{label:s("modelManager.modelOne"),validValues:R,onChange:U=>u(U.target.value)}),l.jsx(Mn,{label:s("modelManager.modelTwo"),validValues:V,onChange:U=>p(U.target.value)}),l.jsx(Mn,{label:s("modelManager.modelThree"),validValues:F,onChange:U=>{U.target.value!=="none"?(y(U.target.value),k("add_difference")):(y("none"),k("weighted_sum"))}})]}),l.jsx(mt,{label:s("modelManager.mergedModelName"),value:x,onChange:U=>S(U.target.value)}),l.jsxs(L,{sx:{flexDirection:"column",padding:4,borderRadius:"base",gap:4,bg:"base.900"},children:[l.jsx(ut,{label:s("modelManager.alpha"),min:.01,max:.99,step:.01,value:j,onChange:U=>C(U),withInput:!0,withReset:!0,handleReset:()=>C(.5),withSliderMarks:!0}),l.jsx(Ce,{variant:"subtext",fontSize:"sm",children:s("modelManager.modelMergeAlphaHelp")})]}),l.jsxs(L,{sx:{padding:4,borderRadius:"base",gap:4,bg:"base.900"},children:[l.jsx(Ce,{fontWeight:500,fontSize:"sm",variant:"subtext",children:s("modelManager.interpolationType")}),l.jsx(Qa,{value:w,onChange:U=>k(U),children:l.jsx(L,{columnGap:4,children:h==="none"?l.jsxs(l.Fragment,{children:[l.jsx(vn,{value:"weighted_sum",children:l.jsx(Ce,{fontSize:"sm",children:s("modelManager.weightedSum")})}),l.jsx(vn,{value:"sigmoid",children:l.jsx(Ce,{fontSize:"sm",children:s("modelManager.sigmoid")})}),l.jsx(vn,{value:"inv_sigmoid",children:l.jsx(Ce,{fontSize:"sm",children:s("modelManager.inverseSigmoid")})})]}):l.jsx(vn,{value:"add_difference",children:l.jsx(Gt,{label:s("modelManager.modelMergeInterpAddDifferenceHelp"),children:l.jsx(Ce,{fontSize:"sm",children:s("modelManager.addDifference")})})})})})]}),l.jsxs(L,{sx:{flexDirection:"column",padding:4,borderRadius:"base",gap:4,bg:"base.900"},children:[l.jsxs(L,{columnGap:4,children:[l.jsx(Ce,{fontWeight:"500",fontSize:"sm",variant:"subtext",children:s("modelManager.mergedModelSaveLocation")}),l.jsx(Qa,{value:I,onChange:U=>P(U),children:l.jsxs(L,{columnGap:4,children:[l.jsx(vn,{value:"root",children:l.jsx(Ce,{fontSize:"sm",children:s("modelManager.invokeAIFolder")})}),l.jsx(vn,{value:"custom",children:l.jsx(Ce,{fontSize:"sm",children:s("modelManager.custom")})})]})})]}),I==="custom"&&l.jsx(mt,{label:s("modelManager.mergedModelCustomSaveLocation"),value:M,onChange:U=>T(U.target.value)})]}),l.jsx(ft,{label:s("modelManager.ignoreMismatch"),isChecked:D,onChange:U=>_(U.target.checked),fontWeight:"500"}),l.jsx(Je,{onClick:Q,isLoading:B,isDisabled:I==="custom"&&M==="",children:s("modelManager.merge")})]})}),l.jsx(Lr,{})]})]})]})}const jD=pe(Et,e=>ee.map(e.model_list,(n,r)=>({name:r,...n})),{memoizeOptions:{resultEqualityCheck:ee.isEqual}});function Vd({label:e,isActive:t,onClick:n}){return l.jsx(Je,{onClick:n,isActive:t,sx:{_active:{bg:"accent.750"}},size:"sm",children:e})}const kD=()=>{const e=A(jD),[t,n]=_e.useState(!1);_e.useEffect(()=>{const x=setTimeout(()=>{n(!0)},200);return()=>clearTimeout(x)},[]);const[r,o]=g.useState(""),[s,c]=g.useState("all"),[u,f]=g.useTransition(),{t:p}=K(),h=x=>{f(()=>{o(x.target.value)})},y=g.useMemo(()=>{const x=[],S=[],j=[],C=[];return e.forEach((w,k)=>{w.name.toLowerCase().includes(r.toLowerCase())&&(j.push(l.jsx(Ol,{name:w.name,status:w.status,description:w.description},k)),w.format===s&&C.push(l.jsx(Ol,{name:w.name,status:w.status,description:w.description},k))),w.format!=="diffusers"?x.push(l.jsx(Ol,{name:w.name,status:w.status,description:w.description},k)):S.push(l.jsx(Ol,{name:w.name,status:w.status,description:w.description},k))}),r!==""?s==="all"?l.jsx(Ye,{marginTop:4,children:j}):l.jsx(Ye,{marginTop:4,children:C}):l.jsxs(L,{flexDirection:"column",rowGap:6,children:[s==="all"&&l.jsxs(l.Fragment,{children:[l.jsxs(Ye,{children:[l.jsx(Ce,{sx:{fontWeight:"500",py:2,px:4,my:4,mx:0,borderRadius:"base",width:"max-content",fontSize:"sm",bg:"base.750"},children:p("modelManager.checkpointModels")}),x]}),l.jsxs(Ye,{children:[l.jsx(Ce,{sx:{fontWeight:"500",py:2,px:4,mb:4,borderRadius:"base",width:"max-content",fontSize:"sm",bg:"base.750"},children:p("modelManager.diffusersModels")}),S]})]}),s==="ckpt"&&l.jsx(L,{flexDirection:"column",marginTop:4,children:x}),s==="diffusers"&&l.jsx(L,{flexDirection:"column",marginTop:4,children:S})]})},[e,r,p,s]);return l.jsxs(L,{flexDirection:"column",rowGap:4,width:"50%",minWidth:"50%",children:[l.jsxs(L,{justifyContent:"space-between",alignItems:"center",gap:2,children:[l.jsx(Wn,{size:"md",children:p("modelManager.availableModels")}),l.jsx(kc,{}),l.jsx(hD,{}),l.jsx(wD,{})]}),l.jsx(mt,{onChange:h,label:p("modelManager.search")}),l.jsxs(L,{flexDirection:"column",gap:1,maxHeight:window.innerHeight-240,overflow:"scroll",paddingInlineEnd:4,children:[l.jsxs(L,{columnGap:2,children:[l.jsx(Vd,{label:p("modelManager.allModels"),onClick:()=>c("all"),isActive:s==="all"}),l.jsx(Vd,{label:p("modelManager.checkpointModels"),onClick:()=>c("ckpt"),isActive:s==="ckpt"}),l.jsx(Vd,{label:p("modelManager.diffusersModels"),onClick:()=>c("diffusers"),isActive:s==="diffusers"})]}),t?y:l.jsx(L,{width:"100%",minHeight:96,justifyContent:"center",alignItems:"center",children:l.jsx(yc,{})})]})]})};function ED({children:e}){const{isOpen:t,onOpen:n,onClose:r}=po(),o=A(u=>u.system.model_list),s=A(u=>u.system.openModel),{t:c}=K();return l.jsxs(l.Fragment,{children:[g.cloneElement(e,{onClick:n}),l.jsxs(mo,{isOpen:t,onClose:r,size:"full",children:[l.jsx(Hr,{}),l.jsxs(vo,{children:[l.jsx(aa,{}),l.jsx(Br,{children:c("modelManager.modelManager")}),l.jsx(Wr,{children:l.jsxs(L,{width:"100%",columnGap:8,children:[l.jsx(kD,{}),s&&o[s].format==="diffusers"?l.jsx(lD,{}):l.jsx(aD,{})]})}),l.jsx(Lr,{})]})]})]})}const PD=pe([Et],e=>{const{isProcessing:t,model_list:n}=e;return{models:ee.map(n,(o,s)=>s),isProcessing:t}},{memoizeOptions:{resultEqualityCheck:ee.isEqual}}),ID=()=>{const e=Y(),{t}=K(),{models:n,isProcessing:r}=A(PD),o=A(Kx),s=c=>{e(k1(c.target.value))};return l.jsx(L,{style:{paddingInlineStart:1.5},children:l.jsx(Mn,{style:{fontSize:"sm"},"aria-label":t("accessibility.modelSelect"),tooltip:o.description,isDisabled:r,value:o.name,validValues:n,onChange:s})})},MD=e=>{const{label:t,isDisabled:n=!1,width:r="auto",formControlProps:o,formLabelProps:s,...c}=e;return l.jsxs(rt,{isDisabled:n,width:r,display:"flex",gap:4,alignItems:"center",justifyContent:"space-between",...o,children:[l.jsx(st,{my:1,...s,children:t}),l.jsx(dx,{...c})]})},En=g.memo(MD),TD=pe([Et,Pr],(e,t)=>{const{shouldDisplayInProgressType:n,shouldConfirmOnDelete:r,shouldDisplayGuides:o,model_list:s,saveIntermediatesInterval:c,enableImageDebugging:u}=e,{shouldUseCanvasBetaLayout:f,shouldUseSliders:p}=t;return{shouldDisplayInProgressType:n,shouldConfirmOnDelete:r,shouldDisplayGuides:o,models:ee.map(s,(h,y)=>y),saveIntermediatesInterval:c,enableImageDebugging:u,shouldUseCanvasBetaLayout:f,shouldUseSliders:p}},{memoizeOptions:{resultEqualityCheck:ee.isEqual}}),Ud={flexDirection:"column",gap:2,p:4,bg:"base.900"},_D=({children:e})=>{const t=Y(),{t:n}=K(),r=A(P=>P.generation.steps),{isOpen:o,onOpen:s,onClose:c}=po(),{isOpen:u,onOpen:f,onClose:p}=po(),{shouldDisplayInProgressType:h,shouldConfirmOnDelete:y,shouldDisplayGuides:x,saveIntermediatesInterval:S,enableImageDebugging:j,shouldUseCanvasBetaLayout:C,shouldUseSliders:w}=A(TD),k=()=>{i3.purge().then(()=>{c(),f()})},I=P=>{P>r&&(P=r),P<1&&(P=1),t(a3(P))};return l.jsxs(l.Fragment,{children:[g.cloneElement(e,{onClick:s}),l.jsxs(mo,{isOpen:o,onClose:c,size:"xl",children:[l.jsx(Hr,{}),l.jsxs(vo,{paddingInlineEnd:4,children:[l.jsx(Br,{children:n("common.settingsLabel")}),l.jsx(aa,{}),l.jsx(Wr,{children:l.jsxs(ir,{gap:4,children:[l.jsxs(L,{sx:Ud,children:[l.jsx(Mn,{label:n("settings.displayInProgress"),validValues:JS,value:h,onChange:P=>t(e3(P.target.value))}),h==="full-res"&&l.jsx(Vr,{label:n("settings.saveSteps"),min:1,max:r,step:1,onChange:I,value:S,width:"auto",textAlign:"center"}),l.jsx(En,{label:n("settings.confirmOnDelete"),isChecked:y,onChange:P=>t(P1(P.target.checked))}),l.jsx(En,{label:n("settings.displayHelpIcons"),isChecked:x,onChange:P=>t(t3(P.target.checked))}),l.jsx(En,{label:n("settings.useCanvasBeta"),isChecked:C,onChange:P=>t(n3(P.target.checked))}),l.jsx(En,{label:n("settings.useSlidersForAll"),isChecked:w,onChange:P=>t(r3(P.target.checked))})]}),l.jsxs(L,{sx:Ud,children:[l.jsx(Wn,{size:"sm",style:{fontWeight:"bold"},children:"Developer"}),l.jsx(En,{label:n("settings.enableImageDebugging"),isChecked:j,onChange:P=>t(o3(P.target.checked))})]}),l.jsxs(L,{sx:Ud,children:[l.jsx(Wn,{size:"sm",children:n("settings.resetWebUI")}),l.jsx(Je,{colorScheme:"error",onClick:k,children:n("settings.resetWebUI")}),l.jsx(Ce,{children:n("settings.resetWebUIDesc1")}),l.jsx(Ce,{children:n("settings.resetWebUIDesc2")})]})]})}),l.jsx(Lr,{children:l.jsx(Je,{onClick:c,children:n("common.close")})})]})]}),l.jsxs(mo,{closeOnOverlayClick:!1,isOpen:u,onClose:p,isCentered:!0,children:[l.jsx(Hr,{backdropFilter:"blur(40px)"}),l.jsxs(vo,{children:[l.jsx(Br,{}),l.jsx(Wr,{children:l.jsx(L,{justifyContent:"center",children:l.jsx(Ce,{fontSize:"lg",children:l.jsx(Ce,{children:n("settings.resetComplete")})})})}),l.jsx(Lr,{})]})]})]})},DD=pe(Et,e=>({isConnected:e.isConnected,isProcessing:e.isProcessing,currentIteration:e.currentIteration,totalIterations:e.totalIterations,currentStatus:e.currentStatus,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:ee.isEqual}}),AD=()=>{const{isConnected:e,isProcessing:t,currentIteration:n,totalIterations:r,currentStatus:o,hasError:s,wasErrorSeen:c}=A(DD),u=Y(),{t:f}=K();let p;e&&!s?p="ok":p="error";let h=o;t&&(p="working"),h&&t&&r>1&&(h=`${f(h)} (${n}/${r})`);const y=s&&!c?"Click to clear, check logs for details":void 0,x=s&&!c?"pointer":"initial",S=()=>{(s||!c)&&u(j1())};return l.jsx(Gt,{label:y,children:l.jsx(Ce,{cursor:x,onClick:S,sx:{fontSize:"xs",fontWeight:"600",color:`${p}.400`},children:f(h)})})},OD=e=>{const{triggerComponent:t,children:n,hasArrow:r=!0,isLazy:o=!0,...s}=e;return l.jsxs(Uh,{isLazy:o,...s,children:[l.jsx(Vh,{children:t}),l.jsxs(Gh,{children:[r&&l.jsx($h,{}),n]})]})},or=g.memo(OD);function zD(){const{t:e}=K(),t=Y(),n=A(c=>c.ui.currentTheme),r={dark:e("common.darkTheme"),light:e("common.lightTheme"),green:e("common.greenTheme"),ocean:e("common.oceanTheme")},o=c=>{t(s3(c))},s=()=>{const c=[];return Object.keys(r).forEach(u=>{c.push(l.jsx(Je,{isChecked:n===u,leftIcon:n===u?l.jsx(Oc,{}):void 0,size:"sm",onClick:()=>o(u),children:r[u]},u))}),c};return l.jsx(or,{triggerComponent:l.jsx(ae,{"aria-label":e("common.themeLabel"),size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:l.jsx(F9,{})}),children:l.jsx(Fe,{align:"stretch",children:s()})})}function RD(){const{t:e,i18n:t}=K(),n={ar:e("common.langArabic",{lng:"ar"}),nl:e("common.langDutch",{lng:"nl"}),en:e("common.langEnglish",{lng:"en"}),fr:e("common.langFrench",{lng:"fr"}),de:e("common.langGerman",{lng:"de"}),he:e("common.langHebrew",{lng:"he"}),it:e("common.langItalian",{lng:"it"}),ja:e("common.langJapanese",{lng:"ja"}),ko:e("common.langKorean",{lng:"ko"}),pl:e("common.langPolish",{lng:"pl"}),pt_BR:e("common.langBrPortuguese",{lng:"pt_BR"}),pt:e("common.langPortuguese",{lng:"pt"}),ru:e("common.langRussian",{lng:"ru"}),zh_CN:e("common.langSimplifiedChinese",{lng:"zh_CN"}),es:e("common.langSpanish",{lng:"es"}),uk:e("common.langUkranian",{lng:"ua"})},r=()=>{const o=[];return Object.keys(n).forEach(s=>{o.push(l.jsx(Je,{isChecked:localStorage.getItem("i18nextLng")===s,leftIcon:localStorage.getItem("i18nextLng")===s?l.jsx(Oc,{}):void 0,onClick:()=>t.changeLanguage(s),"aria-label":n[s],size:"sm",minWidth:"200px",children:n[s]},s))}),o};return l.jsx(or,{triggerComponent:l.jsx(ae,{"aria-label":e("common.languagePickerLabel"),tooltip:e("common.languagePickerLabel"),icon:l.jsx(z9,{}),size:"sm",variant:"link","data-variant":"link",fontSize:26}),children:l.jsx(Fe,{children:r()})})}function ND(e){return ve({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M16.5 9c-.42 0-.83.04-1.24.11L1.01 3 1 10l9 2-9 2 .01 7 8.07-3.46C9.59 21.19 12.71 24 16.5 24c4.14 0 7.5-3.36 7.5-7.5S20.64 9 16.5 9zm0 13c-3.03 0-5.5-2.47-5.5-5.5s2.47-5.5 5.5-5.5 5.5 2.47 5.5 5.5-2.47 5.5-5.5 5.5z"}},{tag:"path",attr:{d:"M18.27 14.03l-1.77 1.76-1.77-1.76-.7.7 1.76 1.77-1.76 1.77.7.7 1.77-1.76 1.77 1.76.7-.7-1.76-1.77 1.76-1.77z"}}]})(e)}function FD(e){return ve({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"}}]})(e)}function LD(e){return ve({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58a.49.49 0 00.12-.61l-1.92-3.32a.488.488 0 00-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54a.484.484 0 00-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58a.49.49 0 00-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"}}]})(e)}function BD(e){return ve({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M2.5 4v3h5v12h3V7h5V4h-13zm19 5h-9v3h3v7h3v-7h3V9z"}}]})(e)}function HD(e){return ve({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M17 16l-4-4V8.82C14.16 8.4 15 7.3 15 6c0-1.66-1.34-3-3-3S9 4.34 9 6c0 1.3.84 2.4 2 2.82V12l-4 4H3v5h5v-3.05l4-4.2 4 4.2V21h5v-5h-4z"}}]})(e)}function WD(e){return ve({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M7 2v11h3v9l7-12h-4l4-8z"}}]})(e)}function W0(e){return ve({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15 21h2v-2h-2v2zm4-12h2V7h-2v2zM3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2zm16-2v2h2c0-1.1-.9-2-2-2zm-8 20h2V1h-2v22zm8-6h2v-2h-2v2zM15 5h2V3h-2v2zm4 8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2z"}}]})(e)}function VD(e){return ve({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM8 20H4v-4h4v4zm0-6H4v-4h4v4zm0-6H4V4h4v4zm6 12h-4v-4h4v4zm0-6h-4v-4h4v4zm0-6h-4V4h4v4zm6 12h-4v-4h4v4zm0-6h-4v-4h4v4zm0-6h-4V4h4v4z"}}]})(e)}function UD(e){return ve({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M19.02 10v9H5V5h9V3H5.02c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-9h-2zM17 10l.94-2.06L20 7l-2.06-.94L17 4l-.94 2.06L14 7l2.06.94zm-3.75.75L12 8l-1.25 2.75L8 12l2.75 1.25L12 16l1.25-2.75L16 12z"}}]})(e)}function fp(e){return ve({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2zm-11-4l2.03 2.71L16 11l4 5H8l3-4zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"}}]})(e)}function $D(e){return ve({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"}}]})(e)}function GD(e){return ve({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M7 10l5 5 5-5z"}}]})(e)}function qD(e){return ve({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M7 14l5-5 5 5z"}}]})(e)}function YD(e){return ve({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}}]})(e)}const KD=""+new URL("logo-13003d72.png",import.meta.url).href,Tb=()=>{const e=A(t=>t.system.app_version);return l.jsxs(L,{alignItems:"center",gap:3,ps:1,children:[l.jsx(cs,{src:KD,alt:"invoke-ai-logo",w:"32px",h:"32px"}),l.jsxs(Ce,{fontSize:"xl",children:["invoke ",l.jsx("strong",{children:"ai"})]}),l.jsx(Ce,{sx:{fontWeight:300,marginTop:1},variant:"subtext",children:e})]})},_b=()=>{const{t:e}=K();return l.jsxs(ir,{gridTemplateColumns:"auto max-content",children:[l.jsx(Tb,{}),l.jsxs(L,{alignItems:"center",gap:2,children:[l.jsx(AD,{}),l.jsx(ID,{}),l.jsx(ED,{children:l.jsx(ae,{"aria-label":e("modelManager.modelManager"),tooltip:e("modelManager.modelManager"),size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:l.jsx(M9,{})})}),l.jsx(sP,{children:l.jsx(ae,{"aria-label":e("common.hotkeysLabel"),tooltip:e("common.hotkeysLabel"),size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:l.jsx(O9,{})})}),l.jsx(zD,{}),l.jsx(RD,{}),l.jsx(qo,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI/issues",marginBottom:"-0.25rem",children:l.jsx(ae,{"aria-label":e("common.reportBugLabel"),tooltip:e("common.reportBugLabel"),variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:l.jsx(I9,{})})}),l.jsx(qo,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI",marginBottom:"-0.25rem",children:l.jsx(ae,{"aria-label":e("common.githubLabel"),tooltip:e("common.githubLabel"),variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:l.jsx(C9,{})})}),l.jsx(qo,{isExternal:!0,href:"https://discord.gg/ZmtBAhwWhy",marginBottom:"-0.25rem",children:l.jsx(ae,{"aria-label":e("common.discordLabel"),tooltip:e("common.discordLabel"),variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:l.jsx(S9,{})})}),l.jsx(_D,{children:l.jsx(ae,{"aria-label":e("common.settingsLabel"),tooltip:e("common.settingsLabel"),variant:"link","data-variant":"link",fontSize:22,size:"sm",icon:l.jsx(LD,{})})})]})]})};_b.displayName="SiteHeader";const hp=e=>{const{children:t}=e;return l.jsx(L,{sx:{width:"100%",height:"100%",bg:"base.850"},children:t})};function XD(){const{t:e}=K();return l.jsx(hp,{children:l.jsxs(L,{sx:{flexDirection:"column",alignItems:"center",justifyContent:"center",w:"100%",h:"100%",gap:4,textAlign:"center"},children:[l.jsx(Wn,{children:e("common.nodes")}),l.jsx(Fe,{maxW:"50rem",gap:4,children:l.jsx(Ce,{children:e("common.nodesDesc")})})]})})}const QD=()=>{const{t:e}=K();return l.jsx(hp,{children:l.jsxs(L,{sx:{flexDirection:"column",alignItems:"center",justifyContent:"center",w:"100%",h:"100%",gap:4,textAlign:"center"},children:[l.jsx(Wn,{children:e("common.postProcessing")}),l.jsxs(Fe,{maxW:"50rem",gap:4,children:[l.jsx(Ce,{children:e("common.postProcessDesc1")}),l.jsx(Ce,{children:e("common.postProcessDesc2")}),l.jsx(Ce,{children:e("common.postProcessDesc3")})]})]})})};function ZD(){const{t:e}=K();return l.jsx(hp,{children:l.jsxs(L,{sx:{flexDirection:"column",alignItems:"center",justifyContent:"center",w:"100%",h:"100%",gap:4,textAlign:"center"},children:[l.jsx(Wn,{children:e("common.training")}),l.jsxs(Fe,{maxW:"50rem",gap:4,children:[l.jsx(Ce,{children:e("common.trainingDesc1")}),l.jsx(Ce,{children:e("common.trainingDesc2")})]})]})})}const Ss=pe(e=>e.lightbox,e=>e,{memoizeOptions:{equalityCheck:ee.isEqual}}),qr=e=>e.gallery,JD=pe([qr,Pr,Ss,bt],(e,t,n,r)=>{const{categories:o,currentCategory:s,currentImageUuid:c,galleryImageMinimumWidth:u,galleryImageObjectFit:f,shouldAutoSwitchToNewImages:p,galleryWidth:h,shouldUseSingleGalleryColumn:y}=e,{shouldPinGallery:x}=t,{isLightboxOpen:S}=n;return{currentImageUuid:c,shouldPinGallery:x,galleryImageMinimumWidth:u,galleryImageObjectFit:f,galleryGridTemplateColumns:y?"auto":`repeat(auto-fill, minmax(${u}px, auto))`,shouldAutoSwitchToNewImages:p,currentCategory:s,images:o[s].images,areMoreImagesAvailable:o[s].areMoreImagesAvailable,galleryWidth:h,shouldEnableResize:!(S||r==="unifiedCanvas"&&x),shouldUseSingleGalleryColumn:y}},{memoizeOptions:{resultEqualityCheck:ee.isEqual}}),eA=pe([qr,Et,Ss,bt],(e,t,n,r)=>({mayDeleteImage:t.isConnected&&!t.isProcessing,galleryImageObjectFit:e.galleryImageObjectFit,galleryImageMinimumWidth:e.galleryImageMinimumWidth,shouldUseSingleGalleryColumn:e.shouldUseSingleGalleryColumn,activeTabName:r,isLightboxOpen:n.isLightboxOpen}),{memoizeOptions:{resultEqualityCheck:ee.isEqual}}),tA=pe(qr,e=>({resultImages:e.categories.result.images,userImages:e.categories.user.images})),nA=()=>{const{resultImages:e,userImages:t}=A(tA);return n=>{const r=e.find(s=>s.uuid===n);if(r)return r;const o=t.find(s=>s.uuid===n);if(o)return o}},rA=({direction:e,langDirection:t})=>({top:e==="bottom",right:t!=="rtl"&&e==="left"||t==="rtl"&&e==="right",bottom:e==="top",left:t!=="rtl"&&e==="right"||t==="rtl"&&e==="left"}),oA=({direction:e,minWidth:t,maxWidth:n,minHeight:r,maxHeight:o})=>{const s=t??(["left","right"].includes(e)?10:void 0),c=n??(["left","right"].includes(e)?"95vw":void 0),u=r??(["top","bottom"].includes(e)?10:void 0),f=o??(["top","bottom"].includes(e)?"95vh":void 0);return{...s?{minWidth:s}:{},...c?{maxWidth:c}:{},...u?{minHeight:u}:{},...f?{maxHeight:f}:{}}},Rr="0.75rem",zl="1rem",iA="2px",aA="5px",sA=({isPinned:e,isResizable:t,direction:n})=>{if(!t)return{containerStyles:{},handleStyles:{}};const r=e?iA:aA,o=`calc((2 * ${Rr} + ${r}) / -2)`;return n==="top"?{containerStyles:{borderBottomWidth:r,paddingBottom:zl},handleStyles:{top:{paddingTop:Rr,paddingBottom:Rr,bottom:o}}}:n==="left"?{containerStyles:{borderInlineEndWidth:r,paddingInlineEnd:zl},handleStyles:{right:{paddingInlineStart:Rr,paddingInlineEnd:Rr,insetInlineEnd:o}}}:n==="bottom"?{containerStyles:{borderTopWidth:r,paddingTop:zl},handleStyles:{bottom:{paddingTop:Rr,paddingBottom:Rr,top:o}}}:n==="right"?{containerStyles:{borderInlineStartWidth:r,paddingInlineStart:zl},handleStyles:{left:{paddingInlineStart:Rr,paddingInlineEnd:Rr,insetInlineStart:o}}}:{containerStyles:{},handleStyles:{}}},lA=(e,t)=>["top","bottom"].includes(e)?e:e==="left"?t==="rtl"?"right":"left":e==="right"?t==="rtl"?"left":"right":"left",oo=(e,t)=>{if(e)return t?e+t:e},cA=ne(Rx,{shouldForwardProp:e=>!["sx"].includes(e)}),Db=({direction:e="left",isResizable:t,isPinned:n,isOpen:r,onClose:o,children:s,initialWidth:c,minWidth:u,maxWidth:f,initialHeight:p,minHeight:h,maxHeight:y,onResizeStart:x,onResizeStop:S,onResize:j,sx:C={}})=>{const w=ta().direction,k=g.useRef(null),I=g.useMemo(()=>c??u??(["left","right"].includes(e)?500:"100%"),[c,u,e]),P=g.useMemo(()=>p??h??(["top","bottom"].includes(e)?500:"100%"),[p,h,e]),[M,T]=g.useState(I),[D,_]=g.useState(P);T6({ref:k,handler:()=>{o()},enabled:r&&!n});const R=g.useMemo(()=>t?rA({direction:e,langDirection:w}):{},[t,w,e]),V=g.useMemo(()=>oA({direction:e,minWidth:t?oo(u,18):oo(u),maxWidth:t?oo(f,18):oo(f),minHeight:t?oo(h,18):oo(h),maxHeight:t?oo(y,18):oo(y)}),[u,f,h,y,e,t]),{containerStyles:F,handleStyles:B}=g.useMemo(()=>sA({isPinned:n,isResizable:t,direction:e}),[n,t,e]),Q=g.useMemo(()=>lA(e,w),[e,w]);return g.useEffect(()=>{["left","right"].includes(e)&&_(n?"100%":"100vh"),["top","bottom"].includes(e)&&T(n?"100%":"100vw")},[n,e]),l.jsx(b2,{direction:Q,in:r,unmountOnExit:n,motionProps:{initial:n},...n?{style:{position:void 0,left:void 0,right:void 0,top:void 0,bottom:void 0,width:void 0}}:{style:{zIndex:99,width:"full"}},children:l.jsx(Ye,{ref:k,sx:{width:"full",height:"full"},children:l.jsx(cA,{size:{width:t?M:I,height:t?D:P},enable:R,handleStyles:B,...V,sx:{borderColor:"base.800",p:n?0:4,bg:"base.900",height:"full",boxShadow:n?"":"0 0 4rem 0 rgba(0, 0, 0, 0.8)",...F,...C},onResizeStart:(U,X,te)=>{x&&x(U,X,te)},onResize:(U,X,te,re)=>{j&&j(U,X,te,re)},onResizeStop:(U,X,te,re)=>{["left","right"].includes(X)&&T(Number(M)+re.width),["top","bottom"].includes(X)&&_(Number(D)+re.height),S&&S(U,X,te,re)},children:s})})})},V0={position:"absolute",width:"full",height:24,left:0,pointerEvents:"none",transition:"opacity 0.2s ease-in-out"},Ab=({children:e})=>{const t=g.useRef(null),n=g.useRef(null),r=g.useRef(null),o=ee.throttle(()=>{if(!t.current||!n.current||!r.current)return;const{scrollTop:s,scrollHeight:c,offsetHeight:u}=t.current;s>0?n.current.style.opacity="1":n.current.style.opacity="0",s>=c-u?r.current.style.opacity="0":r.current.style.opacity="1"},33,{leading:!0});return g.useEffect(()=>{o()},[o]),l.jsxs(Ye,{position:"relative",w:"full",h:"full",children:[l.jsx(Ye,{ref:t,position:"absolute",w:"full",h:"full",overflowY:"scroll",onScroll:o,children:e}),l.jsx(Ye,{ref:r,sx:{...V0,bottom:0,boxShadow:"inset 0 -3.5rem 2rem -2rem var(--invokeai-colors-base-900)"}}),l.jsx(Ye,{ref:n,sx:{...V0,top:0,boxShadow:"inset 0 3.5rem 2rem -2rem var(--invokeai-colors-base-900)"}})]})},uA=ee.debounce(e=>{e(I1(!0))},300),cn=()=>(e,t)=>{bt(t())==="unifiedCanvas"&&uA(e)};function Ob(e){return ve({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146z"}}]})(e)}function zb(e){return ve({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146zm.122 2.112v-.002.002zm0-.002v.002a.5.5 0 0 1-.122.51L6.293 6.878a.5.5 0 0 1-.511.12H5.78l-.014-.004a4.507 4.507 0 0 0-.288-.076 4.922 4.922 0 0 0-.765-.116c-.422-.028-.836.008-1.175.15l5.51 5.509c.141-.34.177-.753.149-1.175a4.924 4.924 0 0 0-.192-1.054l-.004-.013v-.001a.5.5 0 0 1 .12-.512l3.536-3.535a.5.5 0 0 1 .532-.115l.096.022c.087.017.208.034.344.034.114 0 .23-.011.343-.04L9.927 2.028c-.029.113-.04.23-.04.343a1.779 1.779 0 0 0 .062.46z"}}]})(e)}const U0=e=>{const{sx:t}=e,n=Y(),r=A(c=>c.ui.shouldPinParametersPanel),{t:o}=K(),s=()=>{n(l3(!r)),n(cn())};return l.jsx(Gt,{label:o("common.pinOptionsPanel"),children:l.jsx(ae,{...e,"aria-label":o("common.pinOptionsPanel"),onClick:s,icon:r?l.jsx(Ob,{}):l.jsx(zb,{}),variant:"ghost",size:"sm",sx:{color:"base.700",_hover:{color:"base.550"},_active:{color:"base.500"},...t}})})},dA=pe([Pr,bt,Ss],(e,t,n)=>{const{shouldPinParametersPanel:r,shouldShowParametersPanel:o}=e,{isLightboxOpen:s}=n;return{shouldPinParametersPanel:r,shouldShowParametersPanel:o,isResizable:t!=="unifiedCanvas",isLightboxOpen:s}},{memoizeOptions:{resultEqualityCheck:ee.isEqual}}),fA=({children:e})=>{const t=Y(),{shouldPinParametersPanel:n,shouldShowParametersPanel:r,isResizable:o,isLightboxOpen:s}=A(dA),c=()=>{t(ql(!1))};return ce("o",()=>{t(c3()),n&&t(cn())},{enabled:()=>!s},[n,s]),ce("esc",()=>{t(ql(!1))},{enabled:()=>!n,preventDefault:!0},[n]),ce("shift+o",()=>{t(u3()),t(cn())},[]),l.jsx(Db,{direction:"left",isResizable:o||!n,isOpen:r,onClose:c,isPinned:n||s,sx:{borderColor:"base.700",p:n?0:4,bg:"base.900"},initialWidth:r0,minWidth:r0,children:l.jsxs(L,{flexDir:"column",position:"relative",h:"full",w:"full",children:[!n&&l.jsxs(L,{paddingTop:1.5,paddingBottom:4,justifyContent:"space-between",alignItems:"center",children:[l.jsx(Tb,{}),l.jsx(U0,{})]}),l.jsx(Ab,{children:e}),n&&l.jsx(U0,{sx:{position:"absolute",top:0,insetInlineEnd:0}})]})})},hA=g.memo(fA),pA=pe([Pr,bt],(e,t)=>{const{shouldPinParametersPanel:n}=e;return{shouldPinParametersPanel:n,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:ee.isEqual}}),pp=e=>{const{parametersPanelContent:t,children:n,...r}=e,o=Y(),{activeTabName:s}=A(pA),c=nA(),u=f=>{const p=f.dataTransfer.getData("invokeai/imageUuid"),h=c(p);h&&(s==="img2img"?o(rs(h)):s==="unifiedCanvas"&&o(bc(h)))};return l.jsxs(L,{...r,pos:"relative",w:"full",h:nP,gap:4,children:[l.jsx(hA,{children:t}),l.jsx(Ye,{pos:"relative",w:"100%",h:"100%",onDrop:u,children:n})]})},mA=e=>{const{styleClass:t}=e,n=g.useContext(Yh),r=()=>{n&&n()};return l.jsx(L,{sx:{width:"100%",height:"100%",alignItems:"center",justifyContent:"center"},className:t,children:l.jsxs(L,{onClick:r,sx:{display:"flex",flexDirection:"column",rowGap:8,p:8,borderRadius:"base",alignItems:"center",justifyContent:"center",textAlign:"center",cursor:"pointer",color:"base.600",bg:"base.800",_hover:{bg:"base.700"}},children:[l.jsx(tn,{as:Rc,boxSize:24}),l.jsx(Wn,{size:"md",children:"Click or Drag and Drop"})]})})};function vA(){const e=A(o=>o.postprocessing.facetoolType),t=Y(),{t:n}=K(),r=o=>t(Nl(o.target.value));return l.jsx(Mn,{label:n("parameters.type"),validValues:d3.concat(),value:e,onChange:r})}function gA(){const e=A(o=>o.system.isGFPGANAvailable),t=A(o=>o.postprocessing.facetoolStrength),{t:n}=K(),r=Y();return l.jsx(ut,{isSliderDisabled:!e,isInputDisabled:!e,isResetDisabled:!e,label:n("parameters.strength"),step:.05,min:0,max:1,onChange:o=>r(Yl(o)),handleReset:()=>r(Yl(.75)),value:t,withReset:!0,withSliderMarks:!0,withInput:!0})}function yA(){const e=A(o=>o.system.isGFPGANAvailable),t=A(o=>o.postprocessing.codeformerFidelity),{t:n}=K(),r=Y();return l.jsx(ut,{isSliderDisabled:!e,isInputDisabled:!e,isResetDisabled:!e,label:n("parameters.codeformerFidelity"),step:.05,min:0,max:1,onChange:o=>r(Zd(o)),handleReset:()=>r(Zd(1)),value:t,withReset:!0,withSliderMarks:!0,withInput:!0})}const mp=()=>{const e=A(t=>t.postprocessing.facetoolType);return l.jsxs(Fe,{gap:2,alignItems:"stretch",children:[l.jsx(vA,{}),l.jsx(gA,{}),e==="codeformer"&&l.jsx(yA,{})]})};function xA(){const e=A(o=>o.system.isESRGANAvailable),t=A(o=>o.postprocessing.upscalingDenoising),{t:n}=K(),r=Y();return l.jsx(ut,{label:n("parameters.denoisingStrength"),value:t,min:0,max:1,step:.01,onChange:o=>{r(Jd(o))},handleReset:()=>r(Jd(.75)),withSliderMarks:!0,withInput:!0,withReset:!0,isSliderDisabled:!e,isInputDisabled:!e,isResetDisabled:!e})}function bA(){const e=A(o=>o.system.isESRGANAvailable),t=A(o=>o.postprocessing.upscalingStrength),{t:n}=K(),r=Y();return l.jsx(ut,{label:`${n("parameters.upscale")} ${n("parameters.strength")}`,value:t,min:0,max:1,step:.05,onChange:o=>r(ef(o)),handleReset:()=>r(ef(.75)),withSliderMarks:!0,withInput:!0,withReset:!0,isSliderDisabled:!e,isInputDisabled:!e,isResetDisabled:!e})}function SA(){const e=A(s=>s.system.isESRGANAvailable),t=A(s=>s.postprocessing.upscalingLevel),{t:n}=K(),r=Y(),o=s=>r(M1(Number(s.target.value)));return l.jsx(Mn,{isDisabled:!e,label:n("parameters.scale"),value:t,onChange:o,validValues:f3})}const vp=()=>l.jsxs(Fe,{gap:2,alignItems:"stretch",children:[l.jsx(SA,{}),l.jsx(xA,{}),l.jsx(bA,{})]}),gp=e=>e.postprocessing,CA=pe(Et,e=>{const{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}=e;return{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}},{memoizeOptions:{resultEqualityCheck:ee.isEqual}}),hc=ue(({image:e,children:t},n)=>{const{isOpen:r,onOpen:o,onClose:s}=po(),c=Y(),{shouldConfirmOnDelete:u,isConnected:f,isProcessing:p}=A(CA),h=g.useRef(null),y=j=>{j.stopPropagation(),u?o():x()},x=()=>{f&&!p&&e&&c(h3(e)),s()};ce("delete",()=>{u?o():x()},[e,u,f,p]);const S=j=>c(P1(!j.target.checked));return l.jsxs(l.Fragment,{children:[g.cloneElement(t,{onClick:e?y:void 0,ref:n}),l.jsx(Yy,{isOpen:r,leastDestructiveRef:h,onClose:s,children:l.jsx(Hr,{children:l.jsxs(Ky,{children:[l.jsx(Br,{fontSize:"lg",fontWeight:"bold",children:"Delete image"}),l.jsx(Wr,{children:l.jsxs(L,{direction:"column",gap:5,children:[l.jsx(Ce,{children:"Are you sure? Deleted images will be sent to the Bin. You can restore from there if you wish to."}),l.jsx(En,{label:"Don't ask me again",isChecked:!u,onChange:S})]})}),l.jsxs(Lr,{children:[l.jsx(Je,{ref:h,onClick:s,children:"Cancel"}),l.jsx(Je,{colorScheme:"error",onClick:x,ml:3,children:"Delete"})]})]})})})]})});hc.displayName="DeleteImageModal";const yp=()=>{const e=Y();return t=>{const n=typeof t=="string"?t:T1(t),[r,o]=p3(n);e(_1(r)),e(D1(o))}},wA=pe([Et,qr,gp,Pr,Ss,bt],(e,t,n,r,o,s)=>{const{isProcessing:c,isConnected:u,isGFPGANAvailable:f,isESRGANAvailable:p}=e,{upscalingLevel:h,facetoolStrength:y}=n,{isLightboxOpen:x}=o,{shouldShowImageDetails:S,shouldHidePreview:j}=r,{intermediateImage:C,currentImage:w}=t;return{isProcessing:c,isConnected:u,isGFPGANAvailable:f,isESRGANAvailable:p,upscalingLevel:h,facetoolStrength:y,shouldDisableToolbarButtons:Boolean(C)||!w,currentImage:w,shouldShowImageDetails:S,activeTabName:s,isLightboxOpen:x,shouldHidePreview:j}},{memoizeOptions:{resultEqualityCheck:ee.isEqual}}),Rb=e=>{var U,X,te,re,$,Z,fe,Se;const t=Y(),{isProcessing:n,isConnected:r,isGFPGANAvailable:o,isESRGANAvailable:s,upscalingLevel:c,facetoolStrength:u,shouldDisableToolbarButtons:f,shouldShowImageDetails:p,currentImage:h,isLightboxOpen:y,activeTabName:x,shouldHidePreview:S}=A(wA),j=ls(),{t:C}=K(),w=yp(),k=()=>{h&&(y&&t(Uo(!1)),t(rs(h)),t(kn("img2img")))},I=async()=>{if(!h)return;const Me=await fetch(h.url).then(Pe=>Pe.blob()),Ie=[new ClipboardItem({[Me.type]:Me})];await navigator.clipboard.write(Ie),j({title:C("toast.imageCopied"),status:"success",duration:2500,isClosable:!0})},P=()=>{navigator.clipboard.writeText(h?window.location.toString()+h.url:"").then(()=>{j({title:C("toast.imageLinkCopied"),status:"success",duration:2500,isClosable:!0})})};ce("shift+i",()=>{h?(k(),j({title:C("toast.sentToImageToImage"),status:"success",duration:2500,isClosable:!0})):j({title:C("toast.imageNotLoaded"),description:C("toast.imageNotLoadedDesc"),status:"error",duration:2500,isClosable:!0})},[h]);const M=()=>{t(m3(!S))},T=()=>{var Me,Ie;h&&(h.metadata&&t(A1(h.metadata)),((Me=h.metadata)==null?void 0:Me.image.type)==="img2img"?t(kn("img2img")):((Ie=h.metadata)==null?void 0:Ie.image.type)==="txt2img"&&t(kn("txt2img")))};ce("a",()=>{var Me,Ie;["txt2img","img2img"].includes((Ie=(Me=h==null?void 0:h.metadata)==null?void 0:Me.image)==null?void 0:Ie.type)?(T(),j({title:C("toast.parametersSet"),status:"success",duration:2500,isClosable:!0})):j({title:C("toast.parametersNotSet"),description:C("toast.parametersNotSetDesc"),status:"error",duration:2500,isClosable:!0})},[h]);const D=()=>{h!=null&&h.metadata&&t(is(h.metadata.image.seed))};ce("s",()=>{var Me,Ie;(Ie=(Me=h==null?void 0:h.metadata)==null?void 0:Me.image)!=null&&Ie.seed?(D(),j({title:C("toast.seedSet"),status:"success",duration:2500,isClosable:!0})):j({title:C("toast.seedNotSet"),description:C("toast.seedNotSetDesc"),status:"error",duration:2500,isClosable:!0})},[h]);const _=g.useCallback(()=>{var Me,Ie,Pe,he;(Ie=(Me=h==null?void 0:h.metadata)==null?void 0:Me.image)!=null&&Ie.prompt&&w((he=(Pe=h==null?void 0:h.metadata)==null?void 0:Pe.image)==null?void 0:he.prompt)},[(X=(U=h==null?void 0:h.metadata)==null?void 0:U.image)==null?void 0:X.prompt,w]);ce("p",()=>{var Me,Ie;(Ie=(Me=h==null?void 0:h.metadata)==null?void 0:Me.image)!=null&&Ie.prompt?(_(),j({title:C("toast.promptSet"),status:"success",duration:2500,isClosable:!0})):j({title:C("toast.promptNotSet"),description:C("toast.promptNotSetDesc"),status:"error",duration:2500,isClosable:!0})},[h]);const R=()=>{h&&t(v3(h))};ce("Shift+U",()=>{s&&!f&&r&&!n&&c?R():j({title:C("toast.upscalingFailed"),status:"error",duration:2500,isClosable:!0})},[h,s,f,r,n,c]);const V=()=>{h&&t(g3(h))};ce("Shift+R",()=>{o&&!f&&r&&!n&&u?V():j({title:C("toast.faceRestoreFailed"),status:"error",duration:2500,isClosable:!0})},[h,o,f,r,n,u]);const F=()=>t(O1(!p)),B=()=>{h&&(y&&t(Uo(!1)),t(bc(h)),t(cn()),x!=="unifiedCanvas"&&t(kn("unifiedCanvas")),j({title:C("toast.sentToUnifiedCanvas"),status:"success",duration:2500,isClosable:!0}))};ce("i",()=>{h?F():j({title:C("toast.metadataLoadFailed"),status:"error",duration:2500,isClosable:!0})},[h,p]);const Q=()=>{t(Uo(!y))};return l.jsxs(L,{sx:{justifyContent:"center",alignItems:"center",columnGap:"0.5em"},...e,children:[l.jsxs(Qt,{isAttached:!0,children:[l.jsx(or,{triggerComponent:l.jsx(ae,{"aria-label":`${C("parameters.sendTo")}...`,icon:l.jsx(U9,{})}),children:l.jsxs(L,{sx:{flexDirection:"column",rowGap:2},children:[l.jsx(Je,{size:"sm",onClick:k,leftIcon:l.jsx(n0,{}),children:C("parameters.sendToImg2Img")}),l.jsx(Je,{size:"sm",onClick:B,leftIcon:l.jsx(n0,{}),children:C("parameters.sendToUnifiedCanvas")}),l.jsx(Je,{size:"sm",onClick:I,leftIcon:l.jsx(Xi,{}),children:C("parameters.copyImage")}),l.jsx(Je,{size:"sm",onClick:P,leftIcon:l.jsx(Xi,{}),children:C("parameters.copyImageToLink")}),l.jsx(qo,{download:!0,href:h==null?void 0:h.url,children:l.jsx(Je,{leftIcon:l.jsx(Qh,{}),size:"sm",w:"100%",children:C("parameters.downloadImage")})})]})}),l.jsx(ae,{icon:S?l.jsx(Zh,{}):l.jsx($x,{}),tooltip:C(S?"parameters.showPreview":"parameters.hidePreview"),"aria-label":C(S?"parameters.showPreview":"parameters.hidePreview"),isChecked:S,onClick:M}),l.jsx(ae,{icon:l.jsx(_9,{}),tooltip:y?`${C("parameters.closeViewer")} (Z)`:`${C("parameters.openInViewer")} (Z)`,"aria-label":y?`${C("parameters.closeViewer")} (Z)`:`${C("parameters.openInViewer")} (Z)`,isChecked:y,onClick:Q})]}),l.jsxs(Qt,{isAttached:!0,children:[l.jsx(ae,{icon:l.jsx(B9,{}),tooltip:`${C("parameters.usePrompt")} (P)`,"aria-label":`${C("parameters.usePrompt")} (P)`,isDisabled:!((re=(te=h==null?void 0:h.metadata)==null?void 0:te.image)!=null&&re.prompt),onClick:_}),l.jsx(ae,{icon:l.jsx(V9,{}),tooltip:`${C("parameters.useSeed")} (S)`,"aria-label":`${C("parameters.useSeed")} (S)`,isDisabled:!((Z=($=h==null?void 0:h.metadata)==null?void 0:$.image)!=null&&Z.seed),onClick:D}),l.jsx(ae,{icon:l.jsx(P9,{}),tooltip:`${C("parameters.useAll")} (A)`,"aria-label":`${C("parameters.useAll")} (A)`,isDisabled:!["txt2img","img2img"].includes((Se=(fe=h==null?void 0:h.metadata)==null?void 0:fe.image)==null?void 0:Se.type),onClick:T})]}),l.jsxs(Qt,{isAttached:!0,children:[l.jsx(or,{triggerComponent:l.jsx(ae,{icon:l.jsx(D9,{}),"aria-label":C("parameters.restoreFaces")}),children:l.jsxs(L,{sx:{flexDirection:"column",rowGap:4},children:[l.jsx(mp,{}),l.jsx(Je,{isDisabled:!o||!h||!(r&&!n)||!u,onClick:V,children:C("parameters.restoreFaces")})]})}),l.jsx(or,{triggerComponent:l.jsx(ae,{icon:l.jsx(T9,{}),"aria-label":C("parameters.upscale")}),children:l.jsxs(L,{sx:{flexDirection:"column",gap:4},children:[l.jsx(vp,{}),l.jsx(Je,{isDisabled:!s||!h||!(r&&!n)||!c,onClick:R,children:C("parameters.upscaleImage")})]})})]}),l.jsx(Qt,{isAttached:!0,children:l.jsx(ae,{icon:l.jsx(Hx,{}),tooltip:`${C("parameters.info")} (I)`,"aria-label":`${C("parameters.info")} (I)`,isChecked:p,onClick:F})}),l.jsx(hc,{image:h,children:l.jsx(ae,{icon:l.jsx(So,{}),tooltip:`${C("parameters.deleteImage")} (Del)`,"aria-label":`${C("parameters.deleteImage")} (Del)`,isDisabled:!h||!r||n,colorScheme:"error"})})]})},jA=e=>{const{size:t="xl",...n}=e;return l.jsx(L,{sx:{w:"full",h:"full",alignItems:"center",justifyContent:"center",position:"absolute",color:"base.400"},children:l.jsx(yc,{size:t,...n})})};function kA(e){return ve({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M245.09 327.74v-37.32c57.07 0 84.51 13.47 108.58 38.68 5.4 5.65 15 1.32 14.29-6.43-5.45-61.45-34.14-117.09-122.87-117.09v-37.32a8.32 8.32 0 00-14.05-6L146.58 242a8.2 8.2 0 000 11.94L231 333.71a8.32 8.32 0 0014.09-5.97z"}},{tag:"path",attr:{fill:"none",strokeMiterlimit:"10",strokeWidth:"32",d:"M256 64C150 64 64 150 64 256s86 192 192 192 192-86 192-192S362 64 256 64z"}}]})(e)}const yt=({label:e,value:t,onClick:n,isLink:r,labelPosition:o,withCopy:s=!1})=>{const{t:c}=K();return l.jsxs(L,{gap:2,children:[n&&l.jsx(Gt,{label:`Recall ${e}`,children:l.jsx(ho,{"aria-label":c("accessibility.useThisParameter"),icon:l.jsx(kA,{}),size:"xs",variant:"ghost",fontSize:20,onClick:n})}),s&&l.jsx(Gt,{label:`Copy ${e}`,children:l.jsx(ho,{"aria-label":`Copy ${e}`,icon:l.jsx(Xi,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(t.toString())})}),l.jsxs(L,{direction:o?"column":"row",children:[l.jsxs(Ce,{fontWeight:"semibold",whiteSpace:"pre-wrap",pr:2,children:[e,":"]}),r?l.jsxs(qo,{href:t.toString(),isExternal:!0,wordBreak:"break-all",children:[t.toString()," ",l.jsx(Ib,{mx:"2px"})]}):l.jsx(Ce,{overflowY:"scroll",wordBreak:"break-all",children:t.toString()})]})]})},EA=(e,t)=>e.image.uuid===t.image.uuid,xp=g.memo(({image:e})=>{var F,B;const t=Y(),n=yp();ce("esc",()=>{t(O1(!1))});const r=((F=e==null?void 0:e.metadata)==null?void 0:F.image)||{},o=e==null?void 0:e.dreamPrompt,{cfg_scale:s,fit:c,height:u,hires_fix:f,init_image_path:p,mask_image_path:h,orig_path:y,perlin:x,postprocessing:S,prompt:j,sampler:C,seamless:w,seed:k,steps:I,strength:P,threshold:M,type:T,variations:D,width:_}=r,{t:R}=K(),V=JSON.stringify(e.metadata,null,2);return l.jsxs(L,{sx:{padding:4,gap:1,flexDirection:"column",width:"full",height:"full",backdropFilter:"blur(20px)",bg:"whiteAlpha.600",_dark:{bg:"blackAlpha.600"}},children:[l.jsxs(L,{gap:2,children:[l.jsx(Ce,{fontWeight:"semibold",children:"File:"}),l.jsxs(qo,{href:e.url,isExternal:!0,maxW:"calc(100% - 3rem)",children:[e.url.length>64?e.url.substring(0,64).concat("..."):e.url,l.jsx(Ib,{mx:"2px"})]})]}),Object.keys(r).length>0?l.jsxs(l.Fragment,{children:[T&&l.jsx(yt,{label:"Generation type",value:T}),((B=e.metadata)==null?void 0:B.model_weights)&&l.jsx(yt,{label:"Model",value:e.metadata.model_weights}),["esrgan","gfpgan"].includes(T)&&l.jsx(yt,{label:"Original image",value:y}),j&&l.jsx(yt,{label:"Prompt",labelPosition:"top",value:typeof j=="string"?j:T1(j),onClick:()=>n(j)}),k!==void 0&&l.jsx(yt,{label:"Seed",value:k,onClick:()=>t(is(k))}),M!==void 0&&l.jsx(yt,{label:"Noise Threshold",value:M,onClick:()=>t(tf(M))}),x!==void 0&&l.jsx(yt,{label:"Perlin Noise",value:x,onClick:()=>t(nf(x))}),C&&l.jsx(yt,{label:"Sampler",value:C,onClick:()=>t(z1(C))}),I&&l.jsx(yt,{label:"Steps",value:I,onClick:()=>t(rf(I))}),s!==void 0&&l.jsx(yt,{label:"CFG scale",value:s,onClick:()=>t(of(s))}),D&&D.length>0&&l.jsx(yt,{label:"Seed-weight pairs",value:Tv(D),onClick:()=>t(R1(Tv(D)))}),w&&l.jsx(yt,{label:"Seamless",value:w,onClick:()=>t(N1(w))}),f&&l.jsx(yt,{label:"High Resolution Optimization",value:f,onClick:()=>t(F1(f))}),_&&l.jsx(yt,{label:"Width",value:_,onClick:()=>t(Fl(_))}),u&&l.jsx(yt,{label:"Height",value:u,onClick:()=>t(Ll(u))}),p&&l.jsx(yt,{label:"Initial image",value:p,isLink:!0,onClick:()=>t(rs(p))}),h&&l.jsx(yt,{label:"Mask image",value:h,isLink:!0,onClick:()=>t(y3(h))}),T==="img2img"&&P&&l.jsx(yt,{label:"Image to image strength",value:P,onClick:()=>t(af(P))}),c&&l.jsx(yt,{label:"Image to image fit",value:c,onClick:()=>t(L1(c))}),S&&S.length>0&&l.jsxs(l.Fragment,{children:[l.jsx(Wn,{size:"sm",children:"Postprocessing"}),S.map((Q,U)=>{if(Q.type==="esrgan"){const{scale:X,strength:te,denoise_str:re}=Q;return l.jsxs(L,{pl:8,gap:1,direction:"column",children:[l.jsx(Ce,{size:"md",children:`${U+1}: Upscale (ESRGAN)`}),l.jsx(yt,{label:"Scale",value:X,onClick:()=>t(M1(X))}),l.jsx(yt,{label:"Strength",value:te,onClick:()=>t(ef(te))}),re!==void 0&&l.jsx(yt,{label:"Denoising strength",value:re,onClick:()=>t(Jd(re))})]},U)}else if(Q.type==="gfpgan"){const{strength:X}=Q;return l.jsxs(L,{pl:8,gap:1,direction:"column",children:[l.jsx(Ce,{size:"md",children:`${U+1}: Face restoration (GFPGAN)`}),l.jsx(yt,{label:"Strength",value:X,onClick:()=>{t(Yl(X)),t(Nl("gfpgan"))}})]},U)}else if(Q.type==="codeformer"){const{strength:X,fidelity:te}=Q;return l.jsxs(L,{pl:8,gap:1,direction:"column",children:[l.jsx(Ce,{size:"md",children:`${U+1}: Face restoration (Codeformer)`}),l.jsx(yt,{label:"Strength",value:X,onClick:()=>{t(Yl(X)),t(Nl("codeformer"))}}),te&&l.jsx(yt,{label:"Fidelity",value:te,onClick:()=>{t(Zd(te)),t(Nl("codeformer"))}})]},U)}})]}),o&&l.jsx(yt,{withCopy:!0,label:"Dream Prompt",value:o}),l.jsxs(L,{gap:2,direction:"column",children:[l.jsxs(L,{gap:2,children:[l.jsx(Gt,{label:"Copy metadata JSON",children:l.jsx(ho,{"aria-label":R("accessibility.copyMetadataJson"),icon:l.jsx(Xi,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(V)})}),l.jsx(Ce,{fontWeight:"semibold",children:"Metadata JSON:"})]}),l.jsx(Ye,{sx:{mt:0,mr:2,mb:4,ml:2,padding:4,borderRadius:"base",overflowX:"scroll",wordBreak:"break-all",bg:"whiteAlpha.500",_dark:{bg:"blackAlpha.500"}},children:l.jsx("pre",{children:V})})]})]}):l.jsx(Sy,{width:"100%",pt:10,children:l.jsx(Ce,{fontSize:"lg",fontWeight:"semibold",children:"No metadata available"})})]})},EA);xp.displayName="ImageMetadataViewer";const $0={height:"100%",width:"15%",alignItems:"center",pointerEvents:"auto"},G0={color:"base.100"},PA=pe(qr,e=>{const{currentImage:t}=e,n=e.categories[t?t.category:"result"].images,r=n.findIndex(s=>{var c;return s.uuid===((c=e==null?void 0:e.currentImage)==null?void 0:c.uuid)}),o=n.length;return{isOnFirstImage:r===0,isOnLastImage:!isNaN(r)&&r===o-1}},{memoizeOptions:{resultEqualityCheck:ee.isEqual}}),Nb=()=>{const e=Y(),{t}=K(),{isOnFirstImage:n,isOnLastImage:r}=A(PA),[o,s]=g.useState(!1),c=()=>{s(!0)},u=()=>{s(!1)},f=()=>{e(B1())},p=()=>{e(H1())};return l.jsxs(L,{sx:{justifyContent:"space-between",zIndex:1,height:"100%",width:"100%",pointerEvents:"none"},children:[l.jsx(ir,{sx:{...$0,justifyContent:"flex-start"},onMouseOver:c,onMouseOut:u,children:o&&!n&&l.jsx(ho,{"aria-label":t("accessibility.previousImage"),icon:l.jsx(j9,{size:64}),variant:"unstyled",onClick:f,boxSize:16,sx:G0})}),l.jsx(ir,{sx:{...$0,justifyContent:"flex-end"},onMouseOver:c,onMouseOut:u,children:o&&!r&&l.jsx(ho,{"aria-label":t("accessibility.nextImage"),icon:l.jsx(k9,{size:64}),variant:"unstyled",onClick:p,boxSize:16,sx:G0})})]})},Fb=()=>l.jsx(L,{sx:{w:"full",h:"full",alignItems:"center",justifyContent:"center",position:"absolute",color:"base.400"},children:l.jsx(Zh,{size:"30vh"})}),IA=pe([qr,Pr],(e,t)=>{const{currentImage:n,intermediateImage:r}=e,{shouldShowImageDetails:o,shouldHidePreview:s}=t;return{imageToDisplay:r||n,isIntermediate:Boolean(r),shouldShowImageDetails:o,shouldHidePreview:s}},{memoizeOptions:{resultEqualityCheck:ee.isEqual}});function MA(){const{shouldShowImageDetails:e,imageToDisplay:t,isIntermediate:n,shouldHidePreview:r}=A(IA);return l.jsxs(L,{sx:{position:"relative",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},children:[t&&l.jsx(cs,{src:r?void 0:t.url,width:t.width,height:t.height,fallback:r?l.jsx(Fb,{}):n?void 0:l.jsx(jA,{}),sx:{objectFit:"contain",maxWidth:"100%",maxHeight:"100%",height:"auto",position:"absolute",imageRendering:n?"pixelated":"initial",borderRadius:"base"}}),!e&&l.jsx(Nb,{}),e&&t&&l.jsx(Ye,{sx:{position:"absolute",top:"0",width:"100%",height:"100%",borderRadius:"base",overflow:"scroll",maxHeight:rP},children:l.jsx(xp,{image:t})})]})}const TA=pe([qr],e=>{const{currentImage:t,intermediateImage:n}=e;return{hasAnImageToDisplay:t||n}},{memoizeOptions:{resultEqualityCheck:ee.isEqual}}),Lb=()=>{const{hasAnImageToDisplay:e}=A(TA);return l.jsx(L,{sx:{flexDirection:"column",height:"100%",width:"100%",rowGap:4,borderRadius:"base"},children:e?l.jsxs(l.Fragment,{children:[l.jsx(Rb,{}),l.jsx(MA,{})]}):l.jsx(L,{sx:{alignItems:"center",justifyContent:"center",width:"100%",height:"100%"},children:l.jsx(tn,{as:$D,sx:{boxSize:24,color:"base.500"}})})})},_A=()=>{const{t:e}=K(),t=g.useContext(Yh);return l.jsx(ae,{"aria-label":e("accessibility.uploadImage"),tooltip:"Upload Image",icon:l.jsx(Rc,{}),onClick:t||void 0})};function DA(){const e=A(c=>c.generation.initialImage),{shouldHidePreview:t}=A(c=>c.ui),{t:n}=K(),r=Y(),o=ls(),s=()=>{o({title:n("toast.parametersFailed"),description:n("toast.parametersFailedDesc"),status:"error",isClosable:!0}),r(x3())};return l.jsxs(l.Fragment,{children:[l.jsxs(L,{sx:{alignItems:"center",justifyContent:"center",w:"100%",gap:4},children:[l.jsx(Ce,{sx:{fontSize:"lg"},variant:"subtext",children:n("parameters.initialImage")}),l.jsx(_A,{})]}),e&&l.jsx(L,{sx:{position:"relative",height:"100%",width:"100%",alignItems:"center",justifyContent:"center"},children:l.jsx(cs,{sx:{fit:"contain",maxWidth:"100%",maxHeight:"100%",borderRadius:"base",objectFit:"contain",position:"absolute"},src:t?void 0:typeof e=="string"?e:e.url,fallback:l.jsx(Fb,{}),onError:s})})]})}const q0={flexDirection:"column",height:"100%",width:"100%",gap:4,padding:4},AA=()=>{const t=A(n=>n.generation.initialImage)?l.jsx(L,{flexDirection:"column",gap:4,w:"100%",h:"100%",children:l.jsx(DA,{})}):l.jsx(mA,{});return l.jsxs(ir,{sx:{w:"100%",h:"100%",gridTemplateColumns:"1fr 1fr",borderRadius:"base",bg:"base.850"},children:[l.jsx(L,{sx:{...q0,paddingInlineEnd:2},children:t}),l.jsx(L,{sx:{...q0,paddingInlineStart:2},children:l.jsx(Lb,{})})]})};var ln=(e=>(e[e.PROMPT=0]="PROMPT",e[e.GALLERY=1]="GALLERY",e[e.OTHER=2]="OTHER",e[e.SEED=3]="SEED",e[e.VARIATIONS=4]="VARIATIONS",e[e.UPSCALE=5]="UPSCALE",e[e.FACE_CORRECTION=6]="FACE_CORRECTION",e[e.IMAGE_TO_IMAGE=7]="IMAGE_TO_IMAGE",e[e.BOUNDING_BOX=8]="BOUNDING_BOX",e[e.SEAM_CORRECTION=9]="SEAM_CORRECTION",e[e.INFILL_AND_SCALING=10]="INFILL_AND_SCALING",e))(ln||{});const OA=()=>{const{t:e}=K();return g.useMemo(()=>({[0]:{text:e("tooltip.feature.prompt"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[1]:{text:e("tooltip.feature.gallery"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[2]:{text:e("tooltip.feature.other"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[3]:{text:e("tooltip.feature.seed"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[4]:{text:e("tooltip.feature.variations"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[5]:{text:e("tooltip.feature.upscale"),href:"link/to/docs/feature1.html",guideImage:"asset/path.gif"},[6]:{text:e("tooltip.feature.faceCorrection"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[7]:{text:e("tooltip.feature.imageToImage"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[8]:{text:e("tooltip.feature.boundingBox"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[9]:{text:e("tooltip.feature.seamCorrection"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[10]:{text:e("tooltip.feature.infillAndScaling"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"}}),[e])},zA=e=>OA()[e];function Bb(){const e=A(o=>o.system.isGFPGANAvailable),t=A(o=>o.postprocessing.shouldRunFacetool),n=Y(),r=o=>n(b3(o.target.checked));return l.jsx(En,{isDisabled:!e,isChecked:t,onChange:r})}const Hb=()=>{const e=Y(),t=A(o=>o.generation.seamless),n=o=>e(N1(o.target.checked)),{t:r}=K();return l.jsx(En,{label:r("parameters.seamlessTiling"),fontSize:"md",isChecked:t,onChange:n})},RA=()=>l.jsx(Fe,{gap:2,alignItems:"stretch",children:l.jsx(Hb,{})});function bp(){const e=A(s=>s.generation.horizontalSymmetrySteps),t=A(s=>s.generation.verticalSymmetrySteps),n=A(s=>s.generation.steps),r=Y(),{t:o}=K();return l.jsxs(Fe,{gap:2,alignItems:"stretch",children:[l.jsx(ut,{label:o("parameters.hSymmetryStep"),value:e,onChange:s=>r(_v(s)),min:0,max:n,step:1,withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:()=>r(_v(0))}),l.jsx(ut,{label:o("parameters.vSymmetryStep"),value:t,onChange:s=>r(Dv(s)),min:0,max:n,step:1,withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:()=>r(Dv(0))})]})}function Sp(){const e=A(n=>n.generation.shouldUseSymmetry),t=Y();return l.jsx(En,{isChecked:e,onChange:n=>t(S3(n.target.checked))})}function NA(){const e=Y(),t=A(r=>r.generation.perlin),{t:n}=K();return l.jsx(ut,{label:n("parameters.perlinNoise"),min:0,max:1,step:.05,onChange:r=>e(nf(r)),handleReset:()=>e(nf(0)),value:t,withInput:!0,withReset:!0,withSliderMarks:!0})}function FA(){const e=Y(),{t}=K(),n=A(o=>o.generation.shouldRandomizeSeed),r=o=>e(C3(o.target.checked));return l.jsx(En,{label:t("parameters.randomizeSeed"),isChecked:n,onChange:r})}function LA(){const e=Y(),t=A(o=>o.generation.shouldRandomizeSeed),{t:n}=K(),r=()=>e(is(w3(V1,W1)));return l.jsx(ni,{size:"sm",isDisabled:t,onClick:r,padding:"0 1.5rem",children:l.jsx("p",{children:n("parameters.shuffle")})})}function BA(){const e=A(c=>c.generation.seed),t=A(c=>c.generation.shouldRandomizeSeed),n=A(c=>c.generation.shouldGenerateVariations),{t:r}=K(),o=Y(),s=c=>o(is(c));return l.jsxs(oa,{gap:2,children:[l.jsx(Vr,{label:r("parameters.seed"),step:1,precision:0,flexGrow:1,min:V1,max:W1,isDisabled:t,isInvalid:e<0&&n,onChange:s,value:e,formControlProps:{display:"flex",alignItems:"center",gap:3}}),l.jsx(LA,{})]})}function HA(){const e=Y(),t=A(r=>r.generation.threshold),{t:n}=K();return l.jsx(ut,{label:n("parameters.noiseThreshold"),min:0,max:20,step:.1,onChange:r=>e(tf(r)),handleReset:()=>e(tf(0)),value:t,withInput:!0,withReset:!0,withSliderMarks:!0})}const Cp=()=>l.jsxs(Fe,{gap:2,alignItems:"stretch",children:[l.jsx(FA,{}),l.jsx(BA,{}),l.jsx(HA,{}),l.jsx(NA,{})]});function Wb(){const e=A(o=>o.system.isESRGANAvailable),t=A(o=>o.postprocessing.shouldRunESRGAN),n=Y(),r=o=>n(j3(o.target.checked));return l.jsx(En,{isDisabled:!e,isChecked:t,onChange:r})}function wp(){const e=A(r=>r.generation.shouldGenerateVariations),t=Y(),n=r=>t(k3(r.target.checked));return l.jsx(En,{isChecked:e,width:"auto",onChange:n})}function WA(){const e=A(s=>s.generation.seedWeights),t=A(s=>s.generation.shouldGenerateVariations),{t:n}=K(),r=Y(),o=s=>r(R1(s.target.value));return l.jsx(mt,{label:n("parameters.seedWeights"),value:e,isInvalid:t&&!(U1(e)||e===""),isDisabled:!t,onChange:o})}function VA(){const e=A(o=>o.generation.variationAmount),t=A(o=>o.generation.shouldGenerateVariations),{t:n}=K(),r=Y();return l.jsx(ut,{label:n("parameters.variationAmount"),value:e,step:.01,min:0,max:1,isSliderDisabled:!t,isInputDisabled:!t,isResetDisabled:!t,onChange:o=>r(Av(o)),handleReset:()=>r(Av(.1)),withInput:!0,withReset:!0,withSliderMarks:!0})}const jp=()=>l.jsxs(Fe,{gap:2,alignItems:"stretch",children:[l.jsx(VA,{}),l.jsx(WA,{})]});function Y0(){const e=Y(),t=A(s=>s.generation.cfgScale),n=A(s=>s.ui.shouldUseSliders),{t:r}=K(),o=s=>e(of(s));return n?l.jsx(ut,{label:r("parameters.cfgScale"),step:.5,min:1.01,max:30,onChange:o,handleReset:()=>e(of(7.5)),value:t,sliderNumberInputProps:{max:200},withInput:!0,withReset:!0,withSliderMarks:!0}):l.jsx(Vr,{label:r("parameters.cfgScale"),step:.5,min:1.01,max:200,onChange:o,value:t,isInteger:!1,numberInputFieldProps:{textAlign:"center"}})}function K0(){const e=A(s=>s.generation.height),t=A(s=>s.ui.shouldUseSliders),n=A(bt),r=Y(),{t:o}=K();return t?l.jsx(ut,{isSliderDisabled:n==="unifiedCanvas",isInputDisabled:n==="unifiedCanvas",isResetDisabled:n==="unifiedCanvas",label:o("parameters.height"),value:e,min:64,step:64,max:2048,onChange:s=>r(Ll(s)),handleReset:()=>r(Ll(512)),withInput:!0,withReset:!0,withSliderMarks:!0,sliderNumberInputProps:{max:15360}}):l.jsx(Mn,{isDisabled:n==="unifiedCanvas",label:o("parameters.height"),value:e,flexGrow:1,onChange:s=>r(Ll(Number(s.target.value))),validValues:E3})}function X0(){const e=A(s=>s.generation.iterations),t=A(s=>s.ui.shouldUseSliders),n=Y(),{t:r}=K(),o=s=>n(Ov(s));return t?l.jsx(ut,{label:r("parameters.images"),step:1,min:1,max:16,onChange:o,handleReset:()=>n(Ov(1)),value:e,withInput:!0,withReset:!0,withSliderMarks:!0,sliderNumberInputProps:{max:9999}}):l.jsx(Vr,{label:r("parameters.images"),step:1,min:1,max:9999,onChange:o,value:e,numberInputFieldProps:{textAlign:"center"}})}function Q0(){const e=A(s=>s.generation.sampler),t=A(Kx),n=Y(),{t:r}=K(),o=s=>n(z1(s.target.value));return l.jsx(Mn,{label:r("parameters.sampler"),value:e,onChange:o,validValues:t.format==="diffusers"?P3:I3,minWidth:36})}function Z0(){const e=Y(),t=A(c=>c.generation.steps),n=A(c=>c.ui.shouldUseSliders),{t:r}=K(),o=c=>{e(rf(c))},s=()=>{e($1())};return n?l.jsx(ut,{label:r("parameters.steps"),min:1,step:1,onChange:o,handleReset:()=>e(rf(20)),value:t,withInput:!0,withReset:!0,withSliderMarks:!0,sliderNumberInputProps:{max:9999}}):l.jsx(Vr,{label:r("parameters.steps"),min:1,max:9999,step:1,onChange:o,value:t,numberInputFieldProps:{textAlign:"center"},onBlur:s})}function J0(){const e=A(s=>s.generation.width),t=A(s=>s.ui.shouldUseSliders),n=A(bt),{t:r}=K(),o=Y();return t?l.jsx(ut,{isSliderDisabled:n==="unifiedCanvas",isInputDisabled:n==="unifiedCanvas",isResetDisabled:n==="unifiedCanvas",label:r("parameters.width"),value:e,min:64,step:64,max:2048,onChange:s=>o(Fl(s)),handleReset:()=>o(Fl(512)),withInput:!0,withReset:!0,withSliderMarks:!0,inputReadOnly:!0,sliderNumberInputProps:{max:15360}}):l.jsx(Mn,{isDisabled:n==="unifiedCanvas",label:r("parameters.width"),value:e,flexGrow:1,onChange:s=>o(Fl(Number(s.target.value))),validValues:M3})}function kp(){return A(t=>t.ui.shouldUseSliders)?l.jsxs(Fe,{gap:2,children:[l.jsx(X0,{}),l.jsx(Z0,{}),l.jsx(Y0,{}),l.jsx(J0,{}),l.jsx(K0,{}),l.jsx(Q0,{})]}):l.jsxs(L,{rowGap:2,flexDirection:"column",children:[l.jsxs(L,{columnGap:1,children:[l.jsx(X0,{}),l.jsx(Z0,{}),l.jsx(Y0,{})]}),l.jsxs(L,{columnGap:1,children:[l.jsx(J0,{}),l.jsx(K0,{}),l.jsx(Q0,{})]})]})}const UA=pe(Et,e=>e.shouldDisplayGuides),$A=({children:e,feature:t})=>{const n=A(UA),{text:r}=zA(t);return n?l.jsxs(Uh,{trigger:"hover",isLazy:!0,children:[l.jsx(Vh,{children:l.jsx(Ye,{children:e})}),l.jsxs(Gh,{maxWidth:"400px",onClick:o=>o.preventDefault(),cursor:"initial",children:[l.jsx($h,{}),l.jsx(Qy,{children:r})]})]}):null},GA=g.memo($A),qA=ue(({feature:e,icon:t=FD},n)=>l.jsx(GA,{feature:e,children:l.jsx(Ye,{ref:n,children:l.jsx(tn,{marginBottom:"-.15rem",as:t})})})),YA=g.memo(qA);function KA(e){const{header:t,feature:n,content:r,additionalHeaderComponents:o}=e;return l.jsxs(zi,{children:[l.jsx(Ai,{children:l.jsxs(L,{width:"100%",gap:2,align:"center",children:[l.jsx(Ye,{flexGrow:1,textAlign:"start",children:t}),o,n&&l.jsx(YA,{feature:n}),l.jsx(Oi,{})]})}),l.jsx(Ri,{children:r})]})}const Ep=e=>{const{accordionInfo:t}=e,n=A(c=>c.system.openAccordions),r=Y(),o=c=>r(T3(c)),s=()=>{const c=[];return t&&Object.keys(t).forEach(u=>{const{header:f,feature:p,content:h,additionalHeaderComponents:y}=t[u];c.push(l.jsx(KA,{header:f,feature:p,content:h,additionalHeaderComponents:y},u))}),c};return l.jsx(ih,{defaultIndex:n,allowMultiple:!0,reduceMotion:!0,onChange:o,sx:{display:"flex",flexDirection:"column",gap:2},children:s()})},XA=e=>{const{menuType:t="icon",iconTooltip:n,buttonText:r,isLazy:o=!0,menuItems:s,menuProps:c,menuButtonProps:u,menuListProps:f,menuItemProps:p}=e,h=()=>{const y=[];return s.forEach((x,S)=>{y.push(l.jsx(gr,{onClick:x.onClick,fontSize:"sm",...p,children:x.item},S))}),y};return l.jsx(Ah,{...c,isLazy:o,children:({isOpen:y})=>l.jsxs(l.Fragment,{children:[l.jsx(zh,{as:t==="icon"?ho:ni,tooltip:n,"aria-label":n,icon:y?l.jsx(qD,{}):l.jsx(GD,{}),paddingX:0,paddingY:t==="regular"?2:0,...u,children:t==="regular"&&r}),l.jsx(Oh,{zIndex:15,padding:0,...f,children:h()})]})})},QA=g.memo(XA),ZA=pe(Et,e=>({isProcessing:e.isProcessing,isConnected:e.isConnected,isCancelable:e.isCancelable,currentIteration:e.currentIteration,totalIterations:e.totalIterations,cancelType:e.cancelOptions.cancelType,cancelAfter:e.cancelOptions.cancelAfter}),{memoizeOptions:{resultEqualityCheck:ee.isEqual}}),JA=e=>{const t=Y(),{btnGroupWidth:n="auto",...r}=e,{isProcessing:o,isConnected:s,isCancelable:c,currentIteration:u,totalIterations:f,cancelType:p,cancelAfter:h}=A(ZA),y=g.useCallback(()=>{t(_3()),t(fd(null))},[t]),{t:x}=K(),S=h!==null;ce("shift+x",()=>{(s||o)&&c&&y()},[s,o,c]),g.useEffect(()=>{h!==null&&ht(zv("immediate"))},{item:x("parameters.cancel.schedule"),onClick:()=>t(zv("scheduled"))}];return l.jsxs(Qt,{isAttached:!0,width:n,children:[p==="immediate"?l.jsx(ae,{icon:l.jsx(YD,{}),tooltip:x("parameters.cancel.immediate"),"aria-label":x("parameters.cancel.immediate"),isDisabled:!s||!o||!c,onClick:y,colorScheme:"error",...r}):l.jsx(ae,{icon:S?l.jsx(tc,{}):l.jsx(ND,{}),tooltip:x(S?"parameters.cancel.isScheduled":"parameters.cancel.schedule"),"aria-label":x(S?"parameters.cancel.isScheduled":"parameters.cancel.schedule"),isDisabled:!s||!o||!c||u===f,onClick:()=>{t(S?fd(null):fd(u))},colorScheme:"error",...r}),l.jsx(QA,{menuItems:j,iconTooltip:x("parameters.cancel.setType"),menuButtonProps:{colorScheme:"error",minWidth:5}})]})},Pp=g.memo(JA),tt=e=>e.canvas,Ot=pe([tt,bt,Et],(e,t,n)=>e.layerState.stagingArea.images.length>0||t==="unifiedCanvas"&&n.isProcessing),Vb=e=>e.canvas.layerState.objects.find(G1),Ip=e=>e.generation;pe(Ip,({shouldRandomizeSeed:e,shouldGenerateVariations:t})=>e||t,{memoizeOptions:{resultEqualityCheck:ee.isEqual}});const Ub=pe([Ip,Et,Vb,bt],(e,t,n,r)=>{const{prompt:o,shouldGenerateVariations:s,seedWeights:c,initialImage:u,seed:f}=e,{isProcessing:p,isConnected:h}=t;let y=!0;const x=[];return(!o||Boolean(o.match(/^[\s\r\n]+$/)))&&(y=!1,x.push("Missing prompt")),r==="img2img"&&!u&&(y=!1,x.push("No initial image selected")),p&&(y=!1,x.push("System Busy")),h||(y=!1,x.push("System Disconnected")),s&&(!(U1(c)||c==="")||f===-1)&&(y=!1,x.push("Seed-Weights badly formatted.")),{isReady:y,reasonsWhyNotReady:x}},{memoizeOptions:{equalityCheck:ee.isEqual,resultEqualityCheck:ee.isEqual}});function Mp(e){const{iconButton:t=!1,...n}=e,r=Y(),{isReady:o}=A(Ub),s=A(bt),c=()=>{r(sf(s))},{t:u}=K();return ce(["ctrl+enter","meta+enter"],()=>{r($1()),r(sf(s))},{enabled:()=>o,preventDefault:!0,enableOnFormTags:["input","textarea","select"]},[o,s]),l.jsx(Ye,{style:{flexGrow:4},children:t?l.jsx(ae,{"aria-label":u("parameters.invoke"),type:"submit",icon:l.jsx(L9,{}),isDisabled:!o,onClick:c,flexGrow:1,w:"100%",tooltip:u("parameters.invoke"),tooltipProps:{placement:"bottom"},colorScheme:"accent",...n}):l.jsx(Je,{"aria-label":u("parameters.invoke"),type:"submit",isDisabled:!o,onClick:c,flexGrow:1,w:"100%",colorScheme:"accent",fontWeight:700,...n,children:"Invoke"})})}const eO=pe(gp,({shouldLoopback:e})=>e),tO=()=>{const e=Y(),t=A(eO),{t:n}=K();return l.jsx(ae,{"aria-label":n("parameters.toggleLoopback"),tooltip:n("parameters.toggleLoopback"),isChecked:t,icon:l.jsx(H9,{}),onClick:()=>{e(D3(!t))}})},Tp=()=>{const e=A(bt);return l.jsxs(L,{gap:2,children:[l.jsx(Mp,{}),e==="img2img"&&l.jsx(tO,{}),l.jsx(Pp,{})]})},_p=()=>{const e=A(r=>r.generation.negativePrompt),t=Y(),{t:n}=K();return l.jsx(rt,{children:l.jsx(qh,{id:"negativePrompt",name:"negativePrompt",value:e,onChange:r=>t(D1(r.target.value)),placeholder:n("parameters.negativePrompts"),_focusVisible:{borderColor:"error.600"},fontSize:"sm"})})},nO=pe([e=>e.generation,bt],(e,t)=>({prompt:e.prompt,activeTabName:t}),{memoizeOptions:{resultEqualityCheck:ee.isEqual}}),Dp=()=>{const e=Y(),{prompt:t,activeTabName:n}=A(nO),{isReady:r}=A(Ub),o=g.useRef(null),{t:s}=K(),c=f=>{e(_1(f.target.value))};ce("alt+a",()=>{var f;(f=o.current)==null||f.focus()},[]);const u=f=>{f.key==="Enter"&&f.shiftKey===!1&&r&&(f.preventDefault(),e(sf(n)))};return l.jsx(Ye,{children:l.jsx(rt,{isInvalid:t.length===0||Boolean(t.match(/^[\s\r\n]+$/)),children:l.jsx(qh,{id:"prompt",name:"prompt",placeholder:s("parameters.promptPlaceholder"),value:t,onChange:c,onKeyDown:u,resize:"vertical",ref:o,minH:40})})})};function rO(){const e=Y(),t=A(o=>o.generation.shouldFitToWidthHeight),n=o=>e(L1(o.target.checked)),{t:r}=K();return l.jsx(En,{label:r("parameters.imageFit"),isChecked:t,onChange:n})}function $b(e){const{t}=K(),{label:n=`${t("parameters.strength")}`}=e,r=A(u=>u.generation.img2imgStrength),o=Y(),s=u=>o(af(u)),c=()=>{o(af(.75))};return l.jsx(ut,{label:n,step:.01,min:.01,max:1,onChange:s,value:r,isInteger:!1,withInput:!0,withSliderMarks:!0,inputWidth:22,withReset:!0,handleReset:c})}function oO(){const{t:e}=K();return l.jsxs(Fe,{gap:2,alignItems:"stretch",children:[l.jsx($b,{label:e("parameters.img2imgStrength")}),l.jsx(rO,{})]})}const iO=()=>{const{t:e}=K(),t={general:{header:`${e("parameters.general")}`,feature:void 0,content:l.jsx(kp,{})},imageToImage:{header:`${e("parameters.imageToImage")}`,feature:void 0,content:l.jsx(oO,{})},seed:{header:`${e("parameters.seed")}`,feature:ln.SEED,content:l.jsx(Cp,{})},variations:{header:`${e("parameters.variations")}`,feature:ln.VARIATIONS,content:l.jsx(jp,{}),additionalHeaderComponents:l.jsx(wp,{})},face_restore:{header:`${e("parameters.faceRestoration")}`,feature:ln.FACE_CORRECTION,content:l.jsx(mp,{}),additionalHeaderComponents:l.jsx(Bb,{})},upscale:{header:`${e("parameters.upscaling")}`,feature:ln.UPSCALE,content:l.jsx(vp,{}),additionalHeaderComponents:l.jsx(Wb,{})},symmetry:{header:`${e("parameters.symmetry")}`,content:l.jsx(bp,{}),additionalHeaderComponents:l.jsx(Sp,{})},other:{header:`${e("parameters.otherOptions")}`,feature:ln.OTHER,content:l.jsx(RA,{})}};return l.jsxs(L,{flexDir:"column",gap:2,position:"relative",children:[l.jsx(Dp,{}),l.jsx(_p,{}),l.jsx(Tp,{}),l.jsx(Ep,{accordionInfo:t})]})},aO=g.memo(iO);function sO(){return l.jsx(pp,{parametersPanelContent:l.jsx(aO,{}),children:l.jsx(AA,{})})}const lO=()=>l.jsx(Ye,{sx:{width:"100%",height:"100%",borderRadius:"base",bg:"base.850"},children:l.jsx(L,{sx:{p:4,width:"100%",height:"100%"},children:l.jsx(Lb,{})})}),cO=pe([gp],({hiresFix:e,hiresStrength:t})=>({hiresFix:e,hiresStrength:t}),{memoizeOptions:{resultEqualityCheck:ee.isEqual}}),uO=()=>{const{hiresFix:e,hiresStrength:t}=A(cO),n=Y(),{t:r}=K(),o=c=>{n(Rv(c))},s=()=>{n(Rv(.75))};return l.jsx(ut,{label:r("parameters.hiresStrength"),step:.01,min:.01,max:.99,onChange:o,value:t,isInteger:!1,withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:s,isSliderDisabled:!e,isInputDisabled:!e,isResetDisabled:!e})},dO=()=>{const e=Y(),t=A(o=>o.postprocessing.hiresFix),{t:n}=K(),r=o=>e(F1(o.target.checked));return l.jsx(En,{label:n("parameters.hiresOptim"),fontSize:"md",isChecked:t,onChange:r})},fO=()=>l.jsxs(Fe,{gap:2,alignItems:"stretch",children:[l.jsx(Hb,{}),l.jsx(dO,{}),l.jsx(uO,{})]}),hO=()=>{const{t:e}=K(),t={general:{header:`${e("parameters.general")}`,feature:void 0,content:l.jsx(kp,{})},seed:{header:`${e("parameters.seed")}`,feature:ln.SEED,content:l.jsx(Cp,{})},variations:{header:`${e("parameters.variations")}`,feature:ln.VARIATIONS,content:l.jsx(jp,{}),additionalHeaderComponents:l.jsx(wp,{})},face_restore:{header:`${e("parameters.faceRestoration")}`,feature:ln.FACE_CORRECTION,content:l.jsx(mp,{}),additionalHeaderComponents:l.jsx(Bb,{})},upscale:{header:`${e("parameters.upscaling")}`,feature:ln.UPSCALE,content:l.jsx(vp,{}),additionalHeaderComponents:l.jsx(Wb,{})},symmetry:{header:`${e("parameters.symmetry")}`,content:l.jsx(bp,{}),additionalHeaderComponents:l.jsx(Sp,{})},other:{header:`${e("parameters.otherOptions")}`,feature:ln.OTHER,content:l.jsx(fO,{})}};return l.jsxs(L,{flexDir:"column",gap:2,children:[l.jsx(Dp,{}),l.jsx(_p,{}),l.jsx(Tp,{}),l.jsx(Ep,{accordionInfo:t})]})},pO=g.memo(hO);function mO(){return l.jsx(pp,{parametersPanelContent:l.jsx(pO,{}),children:l.jsx(lO,{})})}var $f={},vO={get exports(){return $f},set exports(e){$f=e}};/** - * @license React - * react-reconciler.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 gO=function(t){var n={},r=g,o=Bl,s=Object.assign;function c(i){for(var a="https://reactjs.org/docs/error-decoder.html?invariant="+i,d=1;dO||v[E]!==b[O]){var W=` -`+v[E].replace(" at new "," at ");return i.displayName&&W.includes("")&&(W=W.replace("",i.displayName)),W}while(1<=E&&0<=O);break}}}finally{eu=!1,Error.prepareStackTrace=d}return(i=i?i.displayName||i.name:"")?ua(i):""}var Y4=Object.prototype.hasOwnProperty,nu=[],ci=-1;function Yr(i){return{current:i}}function St(i){0>ci||(i.current=nu[ci],nu[ci]=null,ci--)}function gt(i,a){ci++,nu[ci]=i.current,i.current=a}var Kr={},nn=Yr(Kr),yn=Yr(!1),Po=Kr;function ui(i,a){var d=i.type.contextTypes;if(!d)return Kr;var m=i.stateNode;if(m&&m.__reactInternalMemoizedUnmaskedChildContext===a)return m.__reactInternalMemoizedMaskedChildContext;var v={},b;for(b in d)v[b]=a[b];return m&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=a,i.__reactInternalMemoizedMaskedChildContext=v),v}function xn(i){return i=i.childContextTypes,i!=null}function js(){St(yn),St(nn)}function $p(i,a,d){if(nn.current!==Kr)throw Error(c(168));gt(nn,a),gt(yn,d)}function Gp(i,a,d){var m=i.stateNode;if(a=a.childContextTypes,typeof m.getChildContext!="function")return d;m=m.getChildContext();for(var v in m)if(!(v in a))throw Error(c(108,R(i)||"Unknown",v));return s({},d,m)}function ks(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||Kr,Po=nn.current,gt(nn,i),gt(yn,yn.current),!0}function qp(i,a,d){var m=i.stateNode;if(!m)throw Error(c(169));d?(i=Gp(i,a,Po),m.__reactInternalMemoizedMergedChildContext=i,St(yn),St(nn),gt(nn,i)):St(yn),gt(yn,d)}var qn=Math.clz32?Math.clz32:Q4,K4=Math.log,X4=Math.LN2;function Q4(i){return i>>>=0,i===0?32:31-(K4(i)/X4|0)|0}var Es=64,Ps=4194304;function da(i){switch(i&-i){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64: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 i&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return i&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return i}}function Is(i,a){var d=i.pendingLanes;if(d===0)return 0;var m=0,v=i.suspendedLanes,b=i.pingedLanes,E=d&268435455;if(E!==0){var O=E&~v;O!==0?m=da(O):(b&=E,b!==0&&(m=da(b)))}else E=d&~v,E!==0?m=da(E):b!==0&&(m=da(b));if(m===0)return 0;if(a!==0&&a!==m&&!(a&v)&&(v=m&-m,b=a&-a,v>=b||v===16&&(b&4194240)!==0))return a;if(m&4&&(m|=d&16),a=i.entangledLanes,a!==0)for(i=i.entanglements,a&=m;0d;d++)a.push(i);return a}function fa(i,a,d){i.pendingLanes|=a,a!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,a=31-qn(a),i[a]=d}function eS(i,a){var d=i.pendingLanes&~a;i.pendingLanes=a,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=a,i.mutableReadLanes&=a,i.entangledLanes&=a,a=i.entanglements;var m=i.eventTimes;for(i=i.expirationTimes;0>=E,v-=E,Tr=1<<32-qn(a)+v|d<it?(Xt=We,We=null):Xt=We.sibling;var at=xe(H,We,G[it],be);if(at===null){We===null&&(We=Xt);break}i&&We&&at.alternate===null&&a(H,We),z=b(at,z,it),Ke===null?Oe=at:Ke.sibling=at,Ke=at,We=Xt}if(it===G.length)return d(H,We),Pt&&Mo(H,it),Oe;if(We===null){for(;itit?(Xt=We,We=null):Xt=We.sibling;var ro=xe(H,We,at.value,be);if(ro===null){We===null&&(We=Xt);break}i&&We&&ro.alternate===null&&a(H,We),z=b(ro,z,it),Ke===null?Oe=ro:Ke.sibling=ro,Ke=ro,We=Xt}if(at.done)return d(H,We),Pt&&Mo(H,it),Oe;if(We===null){for(;!at.done;it++,at=G.next())at=He(H,at.value,be),at!==null&&(z=b(at,z,it),Ke===null?Oe=at:Ke.sibling=at,Ke=at);return Pt&&Mo(H,it),Oe}for(We=m(H,We);!at.done;it++,at=G.next())at=Ct(We,H,it,at.value,be),at!==null&&(i&&at.alternate!==null&&We.delete(at.key===null?it:at.key),z=b(at,z,it),Ke===null?Oe=at:Ke.sibling=at,Ke=at);return i&&We.forEach(function(LS){return a(H,LS)}),Pt&&Mo(H,it),Oe}function zr(H,z,G,be){if(typeof G=="object"&&G!==null&&G.type===h&&G.key===null&&(G=G.props.children),typeof G=="object"&&G!==null){switch(G.$$typeof){case f:e:{for(var Oe=G.key,Ke=z;Ke!==null;){if(Ke.key===Oe){if(Oe=G.type,Oe===h){if(Ke.tag===7){d(H,Ke.sibling),z=v(Ke,G.props.children),z.return=H,H=z;break e}}else if(Ke.elementType===Oe||typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===P&&fm(Oe)===Ke.type){d(H,Ke.sibling),z=v(Ke,G.props),z.ref=pa(H,Ke,G),z.return=H,H=z;break e}d(H,Ke);break}else a(H,Ke);Ke=Ke.sibling}G.type===h?(z=Ro(G.props.children,H.mode,be,G.key),z.return=H,H=z):(be=fl(G.type,G.key,G.props,null,H.mode,be),be.ref=pa(H,z,G),be.return=H,H=be)}return E(H);case p:e:{for(Ke=G.key;z!==null;){if(z.key===Ke)if(z.tag===4&&z.stateNode.containerInfo===G.containerInfo&&z.stateNode.implementation===G.implementation){d(H,z.sibling),z=v(z,G.children||[]),z.return=H,H=z;break e}else{d(H,z);break}else a(H,z);z=z.sibling}z=ud(G,H.mode,be),z.return=H,H=z}return E(H);case P:return Ke=G._init,zr(H,z,Ke(G._payload),be)}if(te(G))return ht(H,z,G,be);if(D(G))return wn(H,z,G,be);Bs(H,G)}return typeof G=="string"&&G!==""||typeof G=="number"?(G=""+G,z!==null&&z.tag===6?(d(H,z.sibling),z=v(z,G),z.return=H,H=z):(d(H,z),z=cd(G,H.mode,be),z.return=H,H=z),E(H)):d(H,z)}return zr}var vi=hm(!0),pm=hm(!1),ma={},Rn=Yr(ma),va=Yr(ma),gi=Yr(ma);function dr(i){if(i===ma)throw Error(c(174));return i}function wu(i,a){gt(gi,a),gt(va,i),gt(Rn,ma),i=$(a),St(Rn),gt(Rn,i)}function yi(){St(Rn),St(va),St(gi)}function mm(i){var a=dr(gi.current),d=dr(Rn.current);a=Z(d,i.type,a),d!==a&&(gt(va,i),gt(Rn,a))}function ju(i){va.current===i&&(St(Rn),St(va))}var Tt=Yr(0);function Hs(i){for(var a=i;a!==null;){if(a.tag===13){var d=a.memoizedState;if(d!==null&&(d=d.dehydrated,d===null||Up(d)||Zc(d)))return a}else if(a.tag===19&&a.memoizedProps.revealOrder!==void 0){if(a.flags&128)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===i)break;for(;a.sibling===null;){if(a.return===null||a.return===i)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var ku=[];function Eu(){for(var i=0;id?d:4,i(!0);var m=Pu.transition;Pu.transition={};try{i(!1),a()}finally{ot=d,Pu.transition=m}}function Am(){return Nn().memoizedState}function fS(i,a,d){var m=eo(i);if(d={lane:m,action:d,hasEagerState:!1,eagerState:null,next:null},Om(i))zm(a,d);else if(d=om(i,a,d,m),d!==null){var v=sn();Fn(d,i,m,v),Rm(d,a,m)}}function hS(i,a,d){var m=eo(i),v={lane:m,action:d,hasEagerState:!1,eagerState:null,next:null};if(Om(i))zm(a,v);else{var b=i.alternate;if(i.lanes===0&&(b===null||b.lanes===0)&&(b=a.lastRenderedReducer,b!==null))try{var E=a.lastRenderedState,O=b(E,d);if(v.hasEagerState=!0,v.eagerState=O,Yn(O,E)){var W=a.interleaved;W===null?(v.next=v,xu(a)):(v.next=W.next,W.next=v),a.interleaved=v;return}}catch{}finally{}d=om(i,a,v,m),d!==null&&(v=sn(),Fn(d,i,m,v),Rm(d,a,m))}}function Om(i){var a=i.alternate;return i===_t||a!==null&&a===_t}function zm(i,a){ga=Vs=!0;var d=i.pending;d===null?a.next=a:(a.next=d.next,d.next=a),i.pending=a}function Rm(i,a,d){if(d&4194240){var m=a.lanes;m&=i.pendingLanes,d|=m,a.lanes=d,iu(i,d)}}var Gs={readContext:zn,useCallback:rn,useContext:rn,useEffect:rn,useImperativeHandle:rn,useInsertionEffect:rn,useLayoutEffect:rn,useMemo:rn,useReducer:rn,useRef:rn,useState:rn,useDebugValue:rn,useDeferredValue:rn,useTransition:rn,useMutableSource:rn,useSyncExternalStore:rn,useId:rn,unstable_isNewReconciler:!1},pS={readContext:zn,useCallback:function(i,a){return fr().memoizedState=[i,a===void 0?null:a],i},useContext:zn,useEffect:km,useImperativeHandle:function(i,a,d){return d=d!=null?d.concat([i]):null,Us(4194308,4,Im.bind(null,a,i),d)},useLayoutEffect:function(i,a){return Us(4194308,4,i,a)},useInsertionEffect:function(i,a){return Us(4,2,i,a)},useMemo:function(i,a){var d=fr();return a=a===void 0?null:a,i=i(),d.memoizedState=[i,a],i},useReducer:function(i,a,d){var m=fr();return a=d!==void 0?d(a):a,m.memoizedState=m.baseState=a,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:a},m.queue=i,i=i.dispatch=fS.bind(null,_t,i),[m.memoizedState,i]},useRef:function(i){var a=fr();return i={current:i},a.memoizedState=i},useState:wm,useDebugValue:Ou,useDeferredValue:function(i){return fr().memoizedState=i},useTransition:function(){var i=wm(!1),a=i[0];return i=dS.bind(null,i[1]),fr().memoizedState=i,[a,i]},useMutableSource:function(){},useSyncExternalStore:function(i,a,d){var m=_t,v=fr();if(Pt){if(d===void 0)throw Error(c(407));d=d()}else{if(d=a(),Kt===null)throw Error(c(349));_o&30||ym(m,a,d)}v.memoizedState=d;var b={value:d,getSnapshot:a};return v.queue=b,km(bm.bind(null,m,b,i),[i]),m.flags|=2048,ba(9,xm.bind(null,m,b,d,a),void 0,null),d},useId:function(){var i=fr(),a=Kt.identifierPrefix;if(Pt){var d=_r,m=Tr;d=(m&~(1<<32-qn(m)-1)).toString(32)+d,a=":"+a+"R"+d,d=ya++,0td&&(a.flags|=128,m=!0,wa(v,!1),a.lanes=4194304)}else{if(!m)if(i=Hs(b),i!==null){if(a.flags|=128,m=!0,i=i.updateQueue,i!==null&&(a.updateQueue=i,a.flags|=4),wa(v,!0),v.tail===null&&v.tailMode==="hidden"&&!b.alternate&&!Pt)return on(a),null}else 2*qt()-v.renderingStartTime>td&&d!==1073741824&&(a.flags|=128,m=!0,wa(v,!1),a.lanes=4194304);v.isBackwards?(b.sibling=a.child,a.child=b):(i=v.last,i!==null?i.sibling=b:a.child=b,v.last=b)}return v.tail!==null?(a=v.tail,v.rendering=a,v.tail=a.sibling,v.renderingStartTime=qt(),a.sibling=null,i=Tt.current,gt(Tt,m?i&1|2:i&1),a):(on(a),null);case 22:case 23:return ad(),d=a.memoizedState!==null,i!==null&&i.memoizedState!==null!==d&&(a.flags|=8192),d&&a.mode&1?_n&1073741824&&(on(a),me&&a.subtreeFlags&6&&(a.flags|=8192)):on(a),null;case 24:return null;case 25:return null}throw Error(c(156,a.tag))}function CS(i,a){switch(du(a),a.tag){case 1:return xn(a.type)&&js(),i=a.flags,i&65536?(a.flags=i&-65537|128,a):null;case 3:return yi(),St(yn),St(nn),Eu(),i=a.flags,i&65536&&!(i&128)?(a.flags=i&-65537|128,a):null;case 5:return ju(a),null;case 13:if(St(Tt),i=a.memoizedState,i!==null&&i.dehydrated!==null){if(a.alternate===null)throw Error(c(340));hi()}return i=a.flags,i&65536?(a.flags=i&-65537|128,a):null;case 19:return St(Tt),null;case 4:return yi(),null;case 10:return gu(a.type._context),null;case 22:case 23:return ad(),null;case 24:return null;default:return null}}var Qs=!1,an=!1,wS=typeof WeakSet=="function"?WeakSet:Set,we=null;function bi(i,a){var d=i.ref;if(d!==null)if(typeof d=="function")try{d(null)}catch(m){It(i,a,m)}else d.current=null}function Vu(i,a,d){try{d()}catch(m){It(i,a,m)}}var tv=!1;function jS(i,a){for(fe(i.containerInfo),we=a;we!==null;)if(i=we,a=i.child,(i.subtreeFlags&1028)!==0&&a!==null)a.return=i,we=a;else for(;we!==null;){i=we;try{var d=i.alternate;if(i.flags&1024)switch(i.tag){case 0:case 11:case 15:break;case 1:if(d!==null){var m=d.memoizedProps,v=d.memoizedState,b=i.stateNode,E=b.getSnapshotBeforeUpdate(i.elementType===i.type?m:Xn(i.type,m),v);b.__reactInternalSnapshotBeforeUpdate=E}break;case 3:me&&Eo(i.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(c(163))}}catch(O){It(i,i.return,O)}if(a=i.sibling,a!==null){a.return=i.return,we=a;break}we=i.return}return d=tv,tv=!1,d}function ja(i,a,d){var m=a.updateQueue;if(m=m!==null?m.lastEffect:null,m!==null){var v=m=m.next;do{if((v.tag&i)===i){var b=v.destroy;v.destroy=void 0,b!==void 0&&Vu(a,d,b)}v=v.next}while(v!==m)}}function Zs(i,a){if(a=a.updateQueue,a=a!==null?a.lastEffect:null,a!==null){var d=a=a.next;do{if((d.tag&i)===i){var m=d.create;d.destroy=m()}d=d.next}while(d!==a)}}function Uu(i){var a=i.ref;if(a!==null){var d=i.stateNode;switch(i.tag){case 5:i=re(d);break;default:i=d}typeof a=="function"?a(i):a.current=i}}function nv(i){var a=i.alternate;a!==null&&(i.alternate=null,nv(a)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(a=i.stateNode,a!==null&&Be(a)),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}function rv(i){return i.tag===5||i.tag===3||i.tag===4}function ov(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||rv(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function $u(i,a,d){var m=i.tag;if(m===5||m===6)i=i.stateNode,a?dn(d,i,a):Le(d,i);else if(m!==4&&(i=i.child,i!==null))for($u(i,a,d),i=i.sibling;i!==null;)$u(i,a,d),i=i.sibling}function Gu(i,a,d){var m=i.tag;if(m===5||m===6)i=i.stateNode,a?Ae(d,i,a):J(d,i);else if(m!==4&&(i=i.child,i!==null))for(Gu(i,a,d),i=i.sibling;i!==null;)Gu(i,a,d),i=i.sibling}var Zt=null,Qn=!1;function pr(i,a,d){for(d=d.child;d!==null;)qu(i,a,d),d=d.sibling}function qu(i,a,d){if(lr&&typeof lr.onCommitFiberUnmount=="function")try{lr.onCommitFiberUnmount(Ms,d)}catch{}switch(d.tag){case 5:an||bi(d,a);case 6:if(me){var m=Zt,v=Qn;Zt=null,pr(i,a,d),Zt=m,Qn=v,Zt!==null&&(Qn?fn(Zt,d.stateNode):Vt(Zt,d.stateNode))}else pr(i,a,d);break;case 18:me&&Zt!==null&&(Qn?U4(Zt,d.stateNode):V4(Zt,d.stateNode));break;case 4:me?(m=Zt,v=Qn,Zt=d.stateNode.containerInfo,Qn=!0,pr(i,a,d),Zt=m,Qn=v):(De&&(m=d.stateNode.containerInfo,v=Bp(m),Qc(m,v)),pr(i,a,d));break;case 0:case 11:case 14:case 15:if(!an&&(m=d.updateQueue,m!==null&&(m=m.lastEffect,m!==null))){v=m=m.next;do{var b=v,E=b.destroy;b=b.tag,E!==void 0&&(b&2||b&4)&&Vu(d,a,E),v=v.next}while(v!==m)}pr(i,a,d);break;case 1:if(!an&&(bi(d,a),m=d.stateNode,typeof m.componentWillUnmount=="function"))try{m.props=d.memoizedProps,m.state=d.memoizedState,m.componentWillUnmount()}catch(O){It(d,a,O)}pr(i,a,d);break;case 21:pr(i,a,d);break;case 22:d.mode&1?(an=(m=an)||d.memoizedState!==null,pr(i,a,d),an=m):pr(i,a,d);break;default:pr(i,a,d)}}function iv(i){var a=i.updateQueue;if(a!==null){i.updateQueue=null;var d=i.stateNode;d===null&&(d=i.stateNode=new wS),a.forEach(function(m){var v=AS.bind(null,i,m);d.has(m)||(d.add(m),m.then(v,v))})}}function Zn(i,a){var d=a.deletions;if(d!==null)for(var m=0;m";case el:return":has("+(Xu(i)||"")+")";case tl:return'[role="'+i.value+'"]';case rl:return'"'+i.value+'"';case nl:return'[data-testname="'+i.value+'"]';default:throw Error(c(365))}}function dv(i,a){var d=[];i=[i,0];for(var m=0;mv&&(v=E),m&=~b}if(m=v,m=qt()-m,m=(120>m?120:480>m?480:1080>m?1080:1920>m?1920:3e3>m?3e3:4320>m?4320:1960*ES(m/1960))-m,10i?16:i,Jr===null)var m=!1;else{if(i=Jr,Jr=null,ll=0,Xe&6)throw Error(c(331));var v=Xe;for(Xe|=4,we=i.current;we!==null;){var b=we,E=b.child;if(we.flags&16){var O=b.deletions;if(O!==null){for(var W=0;Wqt()-ed?Ao(i,0):Ju|=d),Cn(i,a)}function bv(i,a){a===0&&(i.mode&1?(a=Ps,Ps<<=1,!(Ps&130023424)&&(Ps=4194304)):a=1);var d=sn();i=ur(i,a),i!==null&&(fa(i,a,d),Cn(i,d))}function DS(i){var a=i.memoizedState,d=0;a!==null&&(d=a.retryLane),bv(i,d)}function AS(i,a){var d=0;switch(i.tag){case 13:var m=i.stateNode,v=i.memoizedState;v!==null&&(d=v.retryLane);break;case 19:m=i.stateNode;break;default:throw Error(c(314))}m!==null&&m.delete(a),bv(i,d)}var Sv;Sv=function(i,a,d){if(i!==null)if(i.memoizedProps!==a.pendingProps||yn.current)bn=!0;else{if(!(i.lanes&d)&&!(a.flags&128))return bn=!1,bS(i,a,d);bn=!!(i.flags&131072)}else bn=!1,Pt&&a.flags&1048576&&Zp(a,Ds,a.index);switch(a.lanes=0,a.tag){case 2:var m=a.type;Ys(i,a),i=a.pendingProps;var v=ui(a,nn.current);mi(a,d),v=Mu(null,a,m,i,v,d);var b=Tu();return a.flags|=1,typeof v=="object"&&v!==null&&typeof v.render=="function"&&v.$$typeof===void 0?(a.tag=1,a.memoizedState=null,a.updateQueue=null,xn(m)?(b=!0,ks(a)):b=!1,a.memoizedState=v.state!==null&&v.state!==void 0?v.state:null,bu(a),v.updater=Ls,a.stateNode=v,v._reactInternals=a,Cu(a,m,i,d),a=Fu(null,a,m,!0,b,d)):(a.tag=0,Pt&&b&&uu(a),hn(null,a,v,d),a=a.child),a;case 16:m=a.elementType;e:{switch(Ys(i,a),i=a.pendingProps,v=m._init,m=v(m._payload),a.type=m,v=a.tag=zS(m),i=Xn(m,i),v){case 0:a=Nu(null,a,m,i,d);break e;case 1:a=qm(null,a,m,i,d);break e;case 11:a=Wm(null,a,m,i,d);break e;case 14:a=Vm(null,a,m,Xn(m.type,i),d);break e}throw Error(c(306,m,""))}return a;case 0:return m=a.type,v=a.pendingProps,v=a.elementType===m?v:Xn(m,v),Nu(i,a,m,v,d);case 1:return m=a.type,v=a.pendingProps,v=a.elementType===m?v:Xn(m,v),qm(i,a,m,v,d);case 3:e:{if(Ym(a),i===null)throw Error(c(387));m=a.pendingProps,b=a.memoizedState,v=b.element,im(i,a),Fs(a,m,null,d);var E=a.memoizedState;if(m=E.element,Ge&&b.isDehydrated)if(b={element:m,isDehydrated:!1,cache:E.cache,pendingSuspenseBoundaries:E.pendingSuspenseBoundaries,transitions:E.transitions},a.updateQueue.baseState=b,a.memoizedState=b,a.flags&256){v=xi(Error(c(423)),a),a=Km(i,a,m,d,v);break e}else if(m!==v){v=xi(Error(c(424)),a),a=Km(i,a,m,d,v);break e}else for(Ge&&(On=z4(a.stateNode.containerInfo),Tn=a,Pt=!0,Kn=null,ha=!1),d=pm(a,null,m,d),a.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling;else{if(hi(),m===v){a=Ar(i,a,d);break e}hn(i,a,m,d)}a=a.child}return a;case 5:return mm(a),i===null&&hu(a),m=a.type,v=a.pendingProps,b=i!==null?i.memoizedProps:null,E=v.children,se(m,v)?E=null:b!==null&&se(m,b)&&(a.flags|=32),Gm(i,a),hn(i,a,E,d),a.child;case 6:return i===null&&hu(a),null;case 13:return Xm(i,a,d);case 4:return wu(a,a.stateNode.containerInfo),m=a.pendingProps,i===null?a.child=vi(a,null,m,d):hn(i,a,m,d),a.child;case 11:return m=a.type,v=a.pendingProps,v=a.elementType===m?v:Xn(m,v),Wm(i,a,m,v,d);case 7:return hn(i,a,a.pendingProps,d),a.child;case 8:return hn(i,a,a.pendingProps.children,d),a.child;case 12:return hn(i,a,a.pendingProps.children,d),a.child;case 10:e:{if(m=a.type._context,v=a.pendingProps,b=a.memoizedProps,E=v.value,rm(a,m,E),b!==null)if(Yn(b.value,E)){if(b.children===v.children&&!yn.current){a=Ar(i,a,d);break e}}else for(b=a.child,b!==null&&(b.return=a);b!==null;){var O=b.dependencies;if(O!==null){E=b.child;for(var W=O.firstContext;W!==null;){if(W.context===m){if(b.tag===1){W=Dr(-1,d&-d),W.tag=2;var oe=b.updateQueue;if(oe!==null){oe=oe.shared;var ke=oe.pending;ke===null?W.next=W:(W.next=ke.next,ke.next=W),oe.pending=W}}b.lanes|=d,W=b.alternate,W!==null&&(W.lanes|=d),yu(b.return,d,a),O.lanes|=d;break}W=W.next}}else if(b.tag===10)E=b.type===a.type?null:b.child;else if(b.tag===18){if(E=b.return,E===null)throw Error(c(341));E.lanes|=d,O=E.alternate,O!==null&&(O.lanes|=d),yu(E,d,a),E=b.sibling}else E=b.child;if(E!==null)E.return=b;else for(E=b;E!==null;){if(E===a){E=null;break}if(b=E.sibling,b!==null){b.return=E.return,E=b;break}E=E.return}b=E}hn(i,a,v.children,d),a=a.child}return a;case 9:return v=a.type,m=a.pendingProps.children,mi(a,d),v=zn(v),m=m(v),a.flags|=1,hn(i,a,m,d),a.child;case 14:return m=a.type,v=Xn(m,a.pendingProps),v=Xn(m.type,v),Vm(i,a,m,v,d);case 15:return Um(i,a,a.type,a.pendingProps,d);case 17:return m=a.type,v=a.pendingProps,v=a.elementType===m?v:Xn(m,v),Ys(i,a),a.tag=1,xn(m)?(i=!0,ks(a)):i=!1,mi(a,d),um(a,m,v),Cu(a,m,v,d),Fu(null,a,m,!0,i,d);case 19:return Zm(i,a,d);case 22:return $m(i,a,d)}throw Error(c(156,a.tag))};function Cv(i,a){return au(i,a)}function OS(i,a,d,m){this.tag=i,this.key=d,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=m,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ln(i,a,d,m){return new OS(i,a,d,m)}function ld(i){return i=i.prototype,!(!i||!i.isReactComponent)}function zS(i){if(typeof i=="function")return ld(i)?1:0;if(i!=null){if(i=i.$$typeof,i===C)return 11;if(i===I)return 14}return 2}function no(i,a){var d=i.alternate;return d===null?(d=Ln(i.tag,a,i.key,i.mode),d.elementType=i.elementType,d.type=i.type,d.stateNode=i.stateNode,d.alternate=i,i.alternate=d):(d.pendingProps=a,d.type=i.type,d.flags=0,d.subtreeFlags=0,d.deletions=null),d.flags=i.flags&14680064,d.childLanes=i.childLanes,d.lanes=i.lanes,d.child=i.child,d.memoizedProps=i.memoizedProps,d.memoizedState=i.memoizedState,d.updateQueue=i.updateQueue,a=i.dependencies,d.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},d.sibling=i.sibling,d.index=i.index,d.ref=i.ref,d}function fl(i,a,d,m,v,b){var E=2;if(m=i,typeof i=="function")ld(i)&&(E=1);else if(typeof i=="string")E=5;else e:switch(i){case h:return Ro(d.children,v,b,a);case y:E=8,v|=8;break;case x:return i=Ln(12,d,a,v|2),i.elementType=x,i.lanes=b,i;case w:return i=Ln(13,d,a,v),i.elementType=w,i.lanes=b,i;case k:return i=Ln(19,d,a,v),i.elementType=k,i.lanes=b,i;case M:return hl(d,v,b,a);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case S:E=10;break e;case j:E=9;break e;case C:E=11;break e;case I:E=14;break e;case P:E=16,m=null;break e}throw Error(c(130,i==null?i:typeof i,""))}return a=Ln(E,d,a,v),a.elementType=i,a.type=m,a.lanes=b,a}function Ro(i,a,d,m){return i=Ln(7,i,m,a),i.lanes=d,i}function hl(i,a,d,m){return i=Ln(22,i,m,a),i.elementType=M,i.lanes=d,i.stateNode={isHidden:!1},i}function cd(i,a,d){return i=Ln(6,i,null,a),i.lanes=d,i}function ud(i,a,d){return a=Ln(4,i.children!==null?i.children:[],i.key,a),a.lanes=d,a.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},a}function RS(i,a,d,m,v){this.tag=a,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=$e,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ou(0),this.expirationTimes=ou(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ou(0),this.identifierPrefix=m,this.onRecoverableError=v,Ge&&(this.mutableSourceEagerHydrationData=null)}function wv(i,a,d,m,v,b,E,O,W){return i=new RS(i,a,d,O,W),a===1?(a=1,b===!0&&(a|=8)):a=0,b=Ln(3,null,null,a),i.current=b,b.stateNode=i,b.memoizedState={element:m,isDehydrated:d,cache:null,transitions:null,pendingSuspenseBoundaries:null},bu(b),i}function jv(i){if(!i)return Kr;i=i._reactInternals;e:{if(V(i)!==i||i.tag!==1)throw Error(c(170));var a=i;do{switch(a.tag){case 3:a=a.stateNode.context;break e;case 1:if(xn(a.type)){a=a.stateNode.__reactInternalMemoizedMergedChildContext;break e}}a=a.return}while(a!==null);throw Error(c(171))}if(i.tag===1){var d=i.type;if(xn(d))return Gp(i,d,a)}return a}function kv(i){var a=i._reactInternals;if(a===void 0)throw typeof i.render=="function"?Error(c(188)):(i=Object.keys(i).join(","),Error(c(268,i)));return i=Q(a),i===null?null:i.stateNode}function Ev(i,a){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var d=i.retryLane;i.retryLane=d!==0&&d=oe&&b>=He&&v<=ke&&E<=xe){i.splice(a,1);break}else if(m!==oe||d.width!==W.width||xeE){if(!(b!==He||d.height!==W.height||kev)){oe>m&&(W.width+=oe-m,W.x=m),keb&&(W.height+=He-b,W.y=b),xed&&(d=E)),E ")+` - -No matching component was found for: - `)+i.join(" > ")}return null},n.getPublicRootInstance=function(i){if(i=i.current,!i.child)return null;switch(i.child.tag){case 5:return re(i.child.stateNode);default:return i.child.stateNode}},n.injectIntoDevTools=function(i){if(i={bundleType:i.bundleType,version:i.version,rendererPackageName:i.rendererPackageName,rendererConfig:i.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:u.ReactCurrentDispatcher,findHostInstanceByFiber:NS,findFiberByHostInstance:i.findFiberByHostInstance||FS,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")i=!1;else{var a=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(a.isDisabled||!a.supportsFiber)i=!0;else{try{Ms=a.inject(i),lr=a}catch{}i=!!a.checkDCE}}return i},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(i,a,d,m){if(!N)throw Error(c(363));i=Qu(i,a);var v=Ze(i,d,m).disconnect;return{disconnect:function(){v()}}},n.registerMutableSourceForHydration=function(i,a){var d=a._getVersion;d=d(a._source),i.mutableSourceEagerHydrationData==null?i.mutableSourceEagerHydrationData=[a,d]:i.mutableSourceEagerHydrationData.push(a,d)},n.runWithPriority=function(i,a){var d=ot;try{return ot=i,a()}finally{ot=d}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(i,a,d,m){var v=a.current,b=sn(),E=eo(v);return d=jv(d),a.context===null?a.context=d:a.pendingContext=d,a=Dr(b,E),a.payload={element:i},m=m===void 0?null:m,m!==null&&(a.callback=m),i=Qr(v,a,E),i!==null&&(Fn(i,v,E,b),Ns(i,v,E)),E},n};(function(e){e.exports=gO})(vO);const yO=A3($f);var pc={},xO={get exports(){return pc},set exports(e){pc=e}},li={};/** - * @license React - * react-reconciler-constants.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. - */li.ConcurrentRoot=1;li.ContinuousEventPriority=4;li.DefaultEventPriority=16;li.DiscreteEventPriority=1;li.IdleEventPriority=536870912;li.LegacyRoot=0;(function(e){e.exports=li})(xO);const e1={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let t1=!1,n1=!1;const Ap=".react-konva-event",bO=`ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled. -Position of a node will be changed during drag&drop, so you should update state of the react app as well. -Consider to add onDragMove or onDragEnd events. -For more info see: https://github.com/konvajs/react-konva/issues/256 -`,SO=`ReactKonva: You are using "zIndex" attribute for a Konva node. -react-konva may get confused with ordering. Just define correct order of elements in your render function of a component. -For more info see: https://github.com/konvajs/react-konva/issues/194 -`,CO={};function Vc(e,t,n=CO){if(!t1&&"zIndex"in t&&(console.warn(SO),t1=!0),!n1&&t.draggable){var r=t.x!==void 0||t.y!==void 0,o=t.onDragEnd||t.onDragMove;r&&!o&&(console.warn(bO),n1=!0)}for(var s in n)if(!e1[s]){var c=s.slice(0,2)==="on",u=n[s]!==t[s];if(c&&u){var f=s.substr(2).toLowerCase();f.substr(0,7)==="content"&&(f="content"+f.substr(7,1).toUpperCase()+f.substr(8)),e.off(f,n[s])}var p=!t.hasOwnProperty(s);p&&e.setAttr(s,void 0)}var h=t._useStrictMode,y={},x=!1;const S={};for(var s in t)if(!e1[s]){var c=s.slice(0,2)==="on",j=n[s]!==t[s];if(c&&j){var f=s.substr(2).toLowerCase();f.substr(0,7)==="content"&&(f="content"+f.substr(7,1).toUpperCase()+f.substr(8)),t[s]&&(S[f]=t[s])}!c&&(t[s]!==n[s]||h&&t[s]!==e.getAttr(s))&&(x=!0,y[s]=t[s])}x&&(e.setAttrs(y),wo(e));for(var f in S)e.on(f+Ap,S[f])}function wo(e){if(!O3.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const Gb={},wO={};Ua.Node.prototype._applyProps=Vc;function jO(e,t){if(typeof t=="string"){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${t}`);return}e.add(t),wo(e)}function kO(e,t,n){let r=Ua[e];r||(console.error(`Konva has no node with the type ${e}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${e}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`),r=Ua.Group);const o={},s={};for(var c in t){var u=c.slice(0,2)==="on";u?s[c]=t[c]:o[c]=t[c]}const f=new r(o);return Vc(f,s),f}function EO(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function PO(e,t,n){return!1}function IO(e){return e}function MO(){return null}function TO(){return null}function _O(e,t,n,r){return wO}function DO(){}function AO(e){}function OO(e,t){return!1}function zO(){return Gb}function RO(){return Gb}const NO=setTimeout,FO=clearTimeout,LO=-1;function BO(e,t){return!1}const HO=!1,WO=!0,VO=!0;function UO(e,t){t.parent===e?t.moveToTop():e.add(t),wo(e)}function $O(e,t){t.parent===e?t.moveToTop():e.add(t),wo(e)}function qb(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),wo(e)}function GO(e,t,n){qb(e,t,n)}function qO(e,t){t.destroy(),t.off(Ap),wo(e)}function YO(e,t){t.destroy(),t.off(Ap),wo(e)}function KO(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function XO(e,t,n){}function QO(e,t,n,r,o){Vc(e,o,r)}function ZO(e){e.hide(),wo(e)}function JO(e){}function ez(e,t){(t.visible==null||t.visible)&&e.show()}function tz(e,t){}function nz(e){}function rz(){}const oz=()=>pc.DefaultEventPriority,iz=Object.freeze(Object.defineProperty({__proto__:null,appendChild:UO,appendChildToContainer:$O,appendInitialChild:jO,cancelTimeout:FO,clearContainer:nz,commitMount:XO,commitTextUpdate:KO,commitUpdate:QO,createInstance:kO,createTextInstance:EO,detachDeletedInstance:rz,finalizeInitialChildren:PO,getChildHostContext:RO,getCurrentEventPriority:oz,getPublicInstance:IO,getRootHostContext:zO,hideInstance:ZO,hideTextInstance:JO,idlePriority:Bl.unstable_IdlePriority,insertBefore:qb,insertInContainerBefore:GO,isPrimaryRenderer:HO,noTimeout:LO,now:Bl.unstable_now,prepareForCommit:MO,preparePortalMount:TO,prepareUpdate:_O,removeChild:qO,removeChildFromContainer:YO,resetAfterCommit:DO,resetTextContent:AO,run:Bl.unstable_runWithPriority,scheduleTimeout:NO,shouldDeprioritizeSubtree:OO,shouldSetTextContent:BO,supportsMutation:VO,unhideInstance:ez,unhideTextInstance:tz,warnsIfNotActing:WO},Symbol.toStringTag,{value:"Module"}));var az=Object.defineProperty,sz=Object.defineProperties,lz=Object.getOwnPropertyDescriptors,r1=Object.getOwnPropertySymbols,cz=Object.prototype.hasOwnProperty,uz=Object.prototype.propertyIsEnumerable,o1=(e,t,n)=>t in e?az(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,i1=(e,t)=>{for(var n in t||(t={}))cz.call(t,n)&&o1(e,n,t[n]);if(r1)for(var n of r1(t))uz.call(t,n)&&o1(e,n,t[n]);return e},dz=(e,t)=>sz(e,lz(t));function Yb(e,t,n){if(!e)return;if(n(e)===!0)return e;let r=t?e.return:e.child;for(;r;){const o=Yb(r,t,n);if(o)return o;r=t?null:r.sibling}}function Kb(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}const Op=Kb(g.createContext(null));class Xb extends g.Component{render(){return g.createElement(Op.Provider,{value:this._reactInternals},this.props.children)}}const{ReactCurrentOwner:fz,ReactCurrentDispatcher:hz}=g.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function pz(){const e=g.useContext(Op);if(!e)throw new Error("its-fine: useFiber must be called within a !");const t=g.useId();return g.useMemo(()=>{var r;return(r=fz.current)!=null?r:Yb(e,!1,o=>{let s=o.memoizedState;for(;s;){if(s.memoizedState===t)return!0;s=s.next}})},[e,t])}function mz(){var e,t;const n=pz(),[r]=g.useState(()=>new Map);r.clear();let o=n;for(;o;){const s=(e=o.type)==null?void 0:e._context;s&&s!==Op&&!r.has(s)&&r.set(s,(t=hz.current)==null?void 0:t.readContext(Kb(s))),o=o.return}return g.useMemo(()=>Array.from(r.keys()).reduce((s,c)=>u=>g.createElement(s,null,g.createElement(c.Provider,dz(i1({},u),{value:r.get(c)}))),s=>g.createElement(Xb,i1({},s))),[r])}function vz(e){const t=_e.useRef();return _e.useLayoutEffect(()=>{t.current=e}),t.current}const gz=e=>{const t=_e.useRef(),n=_e.useRef(),r=_e.useRef(),o=vz(e),s=mz(),c=u=>{const{forwardedRef:f}=e;f&&(typeof f=="function"?f(u):f.current=u)};return _e.useLayoutEffect(()=>(n.current=new Ua.Stage({width:e.width,height:e.height,container:t.current}),c(n.current),r.current=Na.createContainer(n.current,pc.LegacyRoot,!1,null),Na.updateContainer(_e.createElement(s,{},e.children),r.current),()=>{Ua.isBrowser&&(c(null),Na.updateContainer(null,r.current,null),n.current.destroy())}),[]),_e.useLayoutEffect(()=>{c(n.current),Vc(n.current,e,o),Na.updateContainer(_e.createElement(s,{},e.children),r.current,null)}),_e.createElement("div",{ref:t,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},Aa="Layer",Ur="Group",$r="Rect",Fo="Circle",mc="Line",Qb="Image",yz="Transformer",Na=yO(iz);Na.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:_e.version,rendererPackageName:"react-konva"});const xz=_e.forwardRef((e,t)=>_e.createElement(Xb,{},_e.createElement(gz,{...e,forwardedRef:t}))),bz=pe([tt,Ot],(e,t)=>{const{tool:n,isMovingBoundingBox:r}=e;return{tool:n,isStaging:t,isMovingBoundingBox:r}},{memoizeOptions:{resultEqualityCheck:ee.isEqual}}),Sz=()=>{const e=Y(),{tool:t,isStaging:n,isMovingBoundingBox:r}=A(bz);return{handleDragStart:g.useCallback(()=>{(t==="move"||n)&&!r&&e(Kl(!0))},[e,r,n,t]),handleDragMove:g.useCallback(o=>{if(!((t==="move"||n)&&!r))return;const s={x:o.target.x(),y:o.target.y()};e(q1(s))},[e,r,n,t]),handleDragEnd:g.useCallback(()=>{(t==="move"||n)&&!r&&e(Kl(!1))},[e,r,n,t])}},Cz=pe([tt,bt,Ot],(e,t,n)=>{const{cursorPosition:r,shouldLockBoundingBox:o,shouldShowBoundingBox:s,tool:c,isMaskEnabled:u,shouldSnapToGrid:f}=e;return{activeTabName:t,isCursorOnCanvas:Boolean(r),shouldLockBoundingBox:o,shouldShowBoundingBox:s,tool:c,isStaging:n,isMaskEnabled:u,shouldSnapToGrid:f}},{memoizeOptions:{resultEqualityCheck:ee.isEqual}}),wz=()=>{const e=Y(),{activeTabName:t,shouldShowBoundingBox:n,tool:r,isStaging:o,isMaskEnabled:s,shouldSnapToGrid:c}=A(Cz),u=g.useRef(null),f=Y1(),p=()=>e(Zf());ce(["shift+c"],()=>{p()},{enabled:()=>!o,preventDefault:!0},[]);const h=()=>e(as(!s));ce(["h"],()=>{h()},{enabled:()=>!o,preventDefault:!0},[s]),ce(["n"],()=>{e(Xl(!c))},{enabled:!0,preventDefault:!0},[c]),ce("esc",()=>{e(z3())},{enabled:()=>!0,preventDefault:!0}),ce("shift+h",()=>{e(R3(!n))},{enabled:()=>!o,preventDefault:!0},[t,n]),ce(["space"],y=>{y.repeat||(f==null||f.container().focus(),r!=="move"&&(u.current=r,e(Sr("move"))),r==="move"&&u.current&&u.current!=="move"&&(e(Sr(u.current)),u.current="move"))},{keyup:!0,keydown:!0,preventDefault:!0},[r,u])},zp=e=>{const t=e.getPointerPosition(),n=e.getAbsoluteTransform().copy();if(!t||!n)return;const r=n.invert().point(t);return{x:r.x,y:r.y}},Zb=()=>{const e=Y(),t=jr(),n=Y1();return{updateColorUnderCursor:()=>{if(!n||!t)return;const r=n.getPointerPosition();if(!r)return;const o=N3.pixelRatio,[s,c,u,f]=t.getContext().getImageData(r.x*o,r.y*o,1,1).data;e(F3({r:s,g:c,b:u,a:f}))},commitColorUnderCursor:()=>{e(L3())}}},jz=pe([bt,tt,Ot],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:ee.isEqual}}),kz=e=>{const t=Y(),{tool:n,isStaging:r}=A(jz),{commitColorUnderCursor:o}=Zb();return g.useCallback(s=>{if(!e.current)return;if(e.current.container().focus(),n==="move"||r){t(Kl(!0));return}if(n==="colorPicker"){o();return}const c=zp(e.current);c&&(s.evt.preventDefault(),t(K1(!0)),t(B3([c.x,c.y])))},[e,n,r,t,o])},Ez=pe([bt,tt,Ot],(e,t,n)=>{const{tool:r,isDrawing:o}=t;return{tool:r,isDrawing:o,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:ee.isEqual}}),Pz=(e,t,n)=>{const r=Y(),{isDrawing:o,tool:s,isStaging:c}=A(Ez),{updateColorUnderCursor:u}=Zb();return g.useCallback(()=>{if(!e.current)return;const f=zp(e.current);if(f){if(r(H3(f)),n.current=f,s==="colorPicker"){u();return}!o||s==="move"||c||(t.current=!0,r(X1([f.x,f.y])))}},[t,r,o,c,n,e,s,u])},Iz=()=>{const e=Y();return g.useCallback(()=>{e(W3())},[e])},Mz=pe([bt,tt,Ot],(e,t,n)=>{const{tool:r,isDrawing:o}=t;return{tool:r,isDrawing:o,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:ee.isEqual}}),Tz=(e,t)=>{const n=Y(),{tool:r,isDrawing:o,isStaging:s}=A(Mz);return g.useCallback(()=>{if(r==="move"||s){n(Kl(!1));return}if(!t.current&&o&&e.current){const c=zp(e.current);if(!c)return;n(X1([c.x,c.y]))}else t.current=!1;n(K1(!1))},[t,n,o,s,e,r])},_z=pe([tt],e=>{const{isMoveStageKeyHeld:t,stageScale:n}=e;return{isMoveStageKeyHeld:t,stageScale:n}},{memoizeOptions:{resultEqualityCheck:ee.isEqual}}),Dz=e=>{const t=Y(),{isMoveStageKeyHeld:n,stageScale:r}=A(_z);return g.useCallback(o=>{if(!e.current||n)return;o.evt.preventDefault();const s=e.current.getPointerPosition();if(!s)return;const c={x:(s.x-e.current.x())/r,y:(s.y-e.current.y())/r};let u=o.evt.deltaY;o.evt.ctrlKey&&(u=-u);const f=ee.clamp(r*V3**u,U3,$3),p={x:s.x-c.x*f,y:s.y-c.y*f};t(G3(f)),t(q1(p))},[e,n,r,t])},Az=pe(tt,e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n,stageDimensions:r,stageScale:o,shouldDarkenOutsideBoundingBox:s,stageCoordinates:c}=e;return{boundingBoxCoordinates:t,boundingBoxDimensions:n,shouldDarkenOutsideBoundingBox:s,stageCoordinates:c,stageDimensions:r,stageScale:o}},{memoizeOptions:{resultEqualityCheck:ee.isEqual}}),Oz=()=>{const{boundingBoxCoordinates:e,boundingBoxDimensions:t,shouldDarkenOutsideBoundingBox:n,stageCoordinates:r,stageDimensions:o,stageScale:s}=A(Az);return l.jsxs(Ur,{children:[l.jsx($r,{offsetX:r.x/s,offsetY:r.y/s,height:o.height/s,width:o.width/s,fill:"rgba(0,0,0,0.4)",listening:!1,visible:n}),l.jsx($r,{x:e.x,y:e.y,width:t.width,height:t.height,fill:"rgb(255,255,255)",listening:!1,visible:n,globalCompositeOperation:"destination-out"})]})},zz=pe([tt],e=>{const{stageScale:t,stageCoordinates:n,stageDimensions:r}=e;return{stageScale:t,stageCoordinates:n,stageDimensions:r}},{memoizeOptions:{resultEqualityCheck:ee.isEqual}}),Rz=()=>{const e=A(f=>f.ui.currentTheme),{stageScale:t,stageCoordinates:n,stageDimensions:r}=A(zz),[o,s]=g.useState([]),[c]=E1("colors",["gridLineColor"]),u=g.useCallback(f=>f/t,[t]);return g.useLayoutEffect(()=>{const{width:f,height:p}=r,{x:h,y}=n,x={x1:0,y1:0,x2:f,y2:p,offset:{x:u(h),y:u(y)}},S={x:Math.ceil(u(h)/64)*64,y:Math.ceil(u(y)/64)*64},j={x1:-S.x,y1:-S.y,x2:u(f)-S.x+64,y2:u(p)-S.y+64},w={x1:Math.min(x.x1,j.x1),y1:Math.min(x.y1,j.y1),x2:Math.max(x.x2,j.x2),y2:Math.max(x.y2,j.y2)},k=w.x2-w.x1,I=w.y2-w.y1,P=Math.round(k/64)+1,M=Math.round(I/64)+1,T=ee.range(0,P).map(_=>l.jsx(mc,{x:w.x1+_*64,y:w.y1,points:[0,0,0,I],stroke:c,strokeWidth:1},`x_${_}`)),D=ee.range(0,M).map(_=>l.jsx(mc,{x:w.x1,y:w.y1+_*64,points:[0,0,k,0],stroke:c,strokeWidth:1},`y_${_}`));s(T.concat(D))},[t,n,r,e,u,c]),l.jsx(Ur,{children:o})},Nz=pe([e=>e.gallery],e=>e.intermediateImage?e.intermediateImage:null,{memoizeOptions:{resultEqualityCheck:ee.isEqual}}),Fz=e=>{const{...t}=e,n=A(Nz),[r,o]=g.useState(null);if(g.useEffect(()=>{if(!n)return;const p=new Image;p.onload=()=>{o(p)},p.src=n.url},[n]),!(n!=null&&n.boundingBox))return null;const{boundingBox:{x:s,y:c,width:u,height:f}}=n;return r?l.jsx(Qb,{x:s,y:c,width:u,height:f,image:r,listening:!1,...t}):null},Ko=e=>{const{r:t,g:n,b:r,a:o}=e;return`rgba(${t}, ${n}, ${r}, ${o})`},Lz=pe(tt,e=>{const{maskColor:t,stageCoordinates:n,stageDimensions:r,stageScale:o}=e;return{stageCoordinates:n,stageDimensions:r,stageScale:o,maskColorString:Ko(t)}}),a1=e=>`data:image/svg+xml;utf8, - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -`.replaceAll("black",e),Bz=e=>{const{...t}=e,{maskColorString:n,stageCoordinates:r,stageDimensions:o,stageScale:s}=A(Lz),[c,u]=g.useState(null),[f,p]=g.useState(0),h=g.useRef(null),y=g.useCallback(()=>{p(f+1),setTimeout(y,500)},[f]);return g.useEffect(()=>{if(c)return;const x=new Image;x.onload=()=>{u(x)},x.src=a1(n)},[c,n]),g.useEffect(()=>{c&&(c.src=a1(n))},[c,n]),g.useEffect(()=>{const x=setInterval(()=>p(S=>(S+1)%5),50);return()=>clearInterval(x)},[]),!c||!ee.isNumber(r.x)||!ee.isNumber(r.y)||!ee.isNumber(s)||!ee.isNumber(o.width)||!ee.isNumber(o.height)?null:l.jsx($r,{ref:h,offsetX:r.x/s,offsetY:r.y/s,height:o.height/s,width:o.width/s,fillPatternImage:c,fillPatternOffsetY:ee.isNumber(f)?f:0,fillPatternRepeat:"repeat",fillPatternScale:{x:1/s,y:1/s},listening:!0,globalCompositeOperation:"source-in",...t})},Hz=pe([tt],e=>({objects:e.layerState.objects}),{memoizeOptions:{resultEqualityCheck:ee.isEqual}}),Wz=e=>{const{...t}=e,{objects:n}=A(Hz);return l.jsx(Ur,{listening:!1,...t,children:n.filter(q3).map((r,o)=>l.jsx(mc,{points:r.points,stroke:"rgb(0,0,0)",strokeWidth:r.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:r.tool==="brush"?"source-over":"destination-out"},o))})};var Lo=g,Vz=function(t,n,r){const o=Lo.useRef("loading"),s=Lo.useRef(),[c,u]=Lo.useState(0),f=Lo.useRef(),p=Lo.useRef(),h=Lo.useRef();return(f.current!==t||p.current!==n||h.current!==r)&&(o.current="loading",s.current=void 0,f.current=t,p.current=n,h.current=r),Lo.useLayoutEffect(function(){if(!t)return;var y=document.createElement("img");function x(){o.current="loaded",s.current=y,u(Math.random())}function S(){o.current="failed",s.current=void 0,u(Math.random())}return y.addEventListener("load",x),y.addEventListener("error",S),n&&(y.crossOrigin=n),r&&(y.referrerpolicy=r),y.src=t,function(){y.removeEventListener("load",x),y.removeEventListener("error",S)}},[t,n,r]),[s.current,o.current]};const Jb=e=>{const{url:t,x:n,y:r}=e,[o]=Vz(t);return l.jsx(Qb,{x:n,y:r,image:o,listening:!1})},Uz=pe([tt],e=>{const{layerState:{objects:t}}=e;return{objects:t}},{memoizeOptions:{resultEqualityCheck:ee.isEqual}}),$z=()=>{const{objects:e}=A(Uz);return e?l.jsx(Ur,{name:"outpainting-objects",listening:!1,children:e.map((t,n)=>{if(G1(t))return l.jsx(Jb,{x:t.x,y:t.y,url:t.image.url},n);if(Y3(t)){const r=l.jsx(mc,{points:t.points,stroke:t.color?Ko(t.color):"rgb(0,0,0)",strokeWidth:t.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:t.tool==="brush"?"source-over":"destination-out"},n);return t.clip?l.jsx(Ur,{clipX:t.clip.x,clipY:t.clip.y,clipWidth:t.clip.width,clipHeight:t.clip.height,children:r},n):r}else{if(K3(t))return l.jsx($r,{x:t.x,y:t.y,width:t.width,height:t.height,fill:Ko(t.color)},n);if(X3(t))return l.jsx($r,{x:t.x,y:t.y,width:t.width,height:t.height,fill:"rgb(255, 255, 255)",globalCompositeOperation:"destination-out"},n)}})}):null},Gz=pe([tt],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingImage:r,shouldShowStagingOutline:o,boundingBoxCoordinates:{x:s,y:c},boundingBoxDimensions:{width:u,height:f}}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1,shouldShowStagingImage:r,shouldShowStagingOutline:o,x:s,y:c,width:u,height:f}},{memoizeOptions:{resultEqualityCheck:ee.isEqual}}),qz=e=>{const{...t}=e,{currentStagingAreaImage:n,shouldShowStagingImage:r,shouldShowStagingOutline:o,x:s,y:c,width:u,height:f}=A(Gz);return l.jsxs(Ur,{...t,children:[r&&n&&l.jsx(Jb,{url:n.image.url,x:s,y:c}),o&&l.jsxs(Ur,{children:[l.jsx($r,{x:s,y:c,width:u,height:f,strokeWidth:1,stroke:"white",strokeScaleEnabled:!1}),l.jsx($r,{x:s,y:c,width:u,height:f,dash:[4,4],strokeWidth:1,stroke:"black",strokeScaleEnabled:!1})]})]})},Yz=pe([tt],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingOutline:r,shouldShowStagingImage:o}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1,shouldShowStagingImage:o,shouldShowStagingOutline:r}},{memoizeOptions:{resultEqualityCheck:ee.isEqual}}),Kz=()=>{const e=Y(),{isOnFirstImage:t,isOnLastImage:n,currentStagingAreaImage:r,shouldShowStagingImage:o}=A(Yz),{t:s}=K(),c=g.useCallback(()=>{e(Nv(!0))},[e]),u=g.useCallback(()=>{e(Nv(!1))},[e]);ce(["left"],()=>{f()},{enabled:()=>!0,preventDefault:!0}),ce(["right"],()=>{p()},{enabled:()=>!0,preventDefault:!0}),ce(["enter"],()=>{h()},{enabled:()=>!0,preventDefault:!0});const f=()=>e(Q3()),p=()=>e(Z3()),h=()=>e(J3());return r?l.jsx(L,{pos:"absolute",bottom:4,w:"100%",align:"center",justify:"center",filter:"drop-shadow(0 0.5rem 1rem rgba(0,0,0))",onMouseOver:c,onMouseOut:u,children:l.jsxs(Qt,{isAttached:!0,children:[l.jsx(ae,{tooltip:`${s("unifiedCanvas.previous")} (Left)`,"aria-label":`${s("unifiedCanvas.previous")} (Left)`,icon:l.jsx(Lx,{}),onClick:f,colorScheme:"accent",isDisabled:t}),l.jsx(ae,{tooltip:`${s("unifiedCanvas.next")} (Right)`,"aria-label":`${s("unifiedCanvas.next")} (Right)`,icon:l.jsx(E9,{}),onClick:p,colorScheme:"accent",isDisabled:n}),l.jsx(ae,{tooltip:`${s("unifiedCanvas.accept")} (Enter)`,"aria-label":`${s("unifiedCanvas.accept")} (Enter)`,icon:l.jsx(Oc,{}),onClick:h,colorScheme:"accent"}),l.jsx(ae,{tooltip:s("unifiedCanvas.showHide"),"aria-label":s("unifiedCanvas.showHide"),"data-alert":!o,icon:o?l.jsx($x,{}):l.jsx(Zh,{}),onClick:()=>e(eC(!o)),colorScheme:"accent"}),l.jsx(ae,{tooltip:s("unifiedCanvas.saveToGallery"),"aria-label":s("unifiedCanvas.saveToGallery"),icon:l.jsx(Jh,{}),onClick:()=>e(tC(r.image.url)),colorScheme:"accent"}),l.jsx(ae,{tooltip:s("unifiedCanvas.discardAll"),"aria-label":s("unifiedCanvas.discardAll"),icon:l.jsx(zc,{style:{transform:"rotate(45deg)"}}),onClick:()=>e(nC()),colorScheme:"error",fontSize:20})]})}):null},Fi=e=>Math.round(e*100)/100,Xz=pe([tt],e=>{const{cursorPosition:t}=e,{cursorX:n,cursorY:r}=t?{cursorX:t.x,cursorY:t.y}:{cursorX:-1,cursorY:-1};return{cursorCoordinatesString:`(${Fi(n)}, ${Fi(r)})`}},{memoizeOptions:{resultEqualityCheck:ee.isEqual}});function Qz(){const{cursorCoordinatesString:e}=A(Xz),{t}=K();return l.jsx(Ye,{children:`${t("unifiedCanvas.cursorPosition")}: ${e}`})}const Gf="var(--invokeai-colors-warning-500)",Zz=pe([tt],e=>{const{stageDimensions:{width:t,height:n},stageCoordinates:{x:r,y:o},boundingBoxDimensions:{width:s,height:c},scaledBoundingBoxDimensions:{width:u,height:f},boundingBoxCoordinates:{x:p,y:h},stageScale:y,shouldShowCanvasDebugInfo:x,layer:S,boundingBoxScaleMethod:j,shouldPreserveMaskedArea:C}=e;let w="inherit";return(j==="none"&&(s<512||c<512)||j==="manual"&&u*f<512*512)&&(w=Gf),{activeLayerColor:S==="mask"?Gf:"inherit",activeLayerString:S.charAt(0).toUpperCase()+S.slice(1),boundingBoxColor:w,boundingBoxCoordinatesString:`(${Fi(p)}, ${Fi(h)})`,boundingBoxDimensionsString:`${s}×${c}`,scaledBoundingBoxDimensionsString:`${u}×${f}`,canvasCoordinatesString:`${Fi(r)}×${Fi(o)}`,canvasDimensionsString:`${t}×${n}`,canvasScaleString:Math.round(y*100),shouldShowCanvasDebugInfo:x,shouldShowBoundingBox:j!=="auto",shouldShowScaledBoundingBox:j!=="none",shouldPreserveMaskedArea:C}},{memoizeOptions:{resultEqualityCheck:ee.isEqual}}),Jz=()=>{const{activeLayerColor:e,activeLayerString:t,boundingBoxColor:n,boundingBoxCoordinatesString:r,boundingBoxDimensionsString:o,scaledBoundingBoxDimensionsString:s,shouldShowScaledBoundingBox:c,canvasCoordinatesString:u,canvasDimensionsString:f,canvasScaleString:p,shouldShowCanvasDebugInfo:h,shouldShowBoundingBox:y,shouldPreserveMaskedArea:x}=A(Zz),{t:S}=K();return l.jsxs(L,{sx:{flexDirection:"column",position:"absolute",top:0,insetInlineStart:0,opacity:.65,display:"flex",fontSize:"sm",padding:1,px:2,minWidth:48,margin:1,borderRadius:"base",pointerEvents:"none",bg:"base.800"},children:[l.jsx(Ye,{style:{color:e},children:`${S("unifiedCanvas.activeLayer")}: ${t}`}),l.jsx(Ye,{children:`${S("unifiedCanvas.canvasScale")}: ${p}%`}),x&&l.jsx(Ye,{style:{color:Gf},children:"Preserve Masked Area: On"}),y&&l.jsx(Ye,{style:{color:n},children:`${S("unifiedCanvas.boundingBox")}: ${o}`}),c&&l.jsx(Ye,{style:{color:n},children:`${S("unifiedCanvas.scaledBoundingBox")}: ${s}`}),h&&l.jsxs(l.Fragment,{children:[l.jsx(Ye,{children:`${S("unifiedCanvas.boundingBoxPosition")}: ${r}`}),l.jsx(Ye,{children:`${S("unifiedCanvas.canvasDimensions")}: ${f}`}),l.jsx(Ye,{children:`${S("unifiedCanvas.canvasPosition")}: ${u}`}),l.jsx(Qz,{})]})]})},eR=pe(tt,e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n,stageScale:r,isDrawing:o,isTransformingBoundingBox:s,isMovingBoundingBox:c,tool:u,shouldSnapToGrid:f}=e;return{boundingBoxCoordinates:t,boundingBoxDimensions:n,isDrawing:o,isMovingBoundingBox:c,isTransformingBoundingBox:s,stageScale:r,shouldSnapToGrid:f,tool:u,hitStrokeWidth:20/r}},{memoizeOptions:{resultEqualityCheck:ee.isEqual}}),tR=e=>{const{...t}=e,n=Y(),{boundingBoxCoordinates:r,boundingBoxDimensions:o,isDrawing:s,isMovingBoundingBox:c,isTransformingBoundingBox:u,stageScale:f,shouldSnapToGrid:p,tool:h,hitStrokeWidth:y}=A(eR),x=g.useRef(null),S=g.useRef(null),[j,C]=g.useState(!1);g.useEffect(()=>{var Q;!x.current||!S.current||(x.current.nodes([S.current]),(Q=x.current.getLayer())==null||Q.batchDraw())},[]);const w=64*f,k=g.useCallback(Q=>{if(!p){n(hd({x:Math.floor(Q.target.x()),y:Math.floor(Q.target.y())}));return}const U=Q.target.x(),X=Q.target.y(),te=Fv(U,64),re=Fv(X,64);Q.target.x(te),Q.target.y(re),n(hd({x:te,y:re}))},[n,p]),I=g.useCallback(()=>{if(!S.current)return;const Q=S.current,U=Q.scaleX(),X=Q.scaleY(),te=Math.round(Q.width()*U),re=Math.round(Q.height()*X),$=Math.round(Q.x()),Z=Math.round(Q.y());n(za({width:te,height:re})),n(hd({x:p?ml($,64):$,y:p?ml(Z,64):Z})),Q.scaleX(1),Q.scaleY(1)},[n,p]),P=g.useCallback((Q,U,X)=>{const te=Q.x%w,re=Q.y%w;return{x:ml(U.x,w)+te,y:ml(U.y,w)+re}},[w]),M=()=>{n(pd(!0))},T=()=>{n(pd(!1)),n(md(!1)),n(vl(!1)),C(!1)},D=()=>{n(md(!0))},_=()=>{n(pd(!1)),n(md(!1)),n(vl(!1)),C(!1)},R=()=>{C(!0)},V=()=>{!u&&!c&&C(!1)},F=()=>{n(vl(!0))},B=()=>{n(vl(!1))};return l.jsxs(Ur,{...t,children:[l.jsx($r,{height:o.height,width:o.width,x:r.x,y:r.y,onMouseEnter:F,onMouseOver:F,onMouseLeave:B,onMouseOut:B}),l.jsx($r,{draggable:!0,fillEnabled:!1,height:o.height,hitStrokeWidth:y,listening:!s&&h==="move",onDragStart:D,onDragEnd:_,onDragMove:k,onMouseDown:D,onMouseOut:V,onMouseOver:R,onMouseEnter:R,onMouseUp:_,onTransform:I,onTransformEnd:T,ref:S,stroke:j?"rgba(255,255,255,0.7)":"white",strokeWidth:(j?8:1)/f,width:o.width,x:r.x,y:r.y}),l.jsx(yz,{anchorCornerRadius:3,anchorDragBoundFunc:P,anchorFill:"rgba(212,216,234,1)",anchorSize:15,anchorStroke:"rgb(42,42,42)",borderDash:[4,4],borderEnabled:!0,borderStroke:"black",draggable:!1,enabledAnchors:h==="move"?void 0:[],flipEnabled:!1,ignoreStroke:!0,keepRatio:!1,listening:!s&&h==="move",onDragStart:D,onDragEnd:_,onMouseDown:M,onMouseUp:T,onTransformEnd:T,ref:x,rotateEnabled:!1})]})},nR=pe(tt,e=>{const{cursorPosition:t,brushSize:n,colorPickerColor:r,maskColor:o,brushColor:s,tool:c,layer:u,shouldShowBrush:f,isMovingBoundingBox:p,isTransformingBoundingBox:h,stageScale:y,stageDimensions:x,boundingBoxCoordinates:S,boundingBoxDimensions:j,shouldRestrictStrokesToBox:C}=e,w=C?{clipX:S.x,clipY:S.y,clipWidth:j.width,clipHeight:j.height}:{};return{cursorPosition:t,brushX:t?t.x:x.width/2,brushY:t?t.y:x.height/2,radius:n/2,colorPickerOuterRadius:Lv/y,colorPickerInnerRadius:(Lv-lf+1)/y,maskColorString:Ko({...o,a:.5}),brushColorString:Ko(s),colorPickerColorString:Ko(r),tool:c,layer:u,shouldShowBrush:f,shouldDrawBrushPreview:!(p||h||!t)&&f,strokeWidth:1.5/y,dotRadius:1.5/y,clip:w}},{memoizeOptions:{resultEqualityCheck:ee.isEqual}}),rR=e=>{const{...t}=e,{brushX:n,brushY:r,radius:o,maskColorString:s,tool:c,layer:u,shouldDrawBrushPreview:f,dotRadius:p,strokeWidth:h,brushColorString:y,colorPickerColorString:x,colorPickerInnerRadius:S,colorPickerOuterRadius:j,clip:C}=A(nR);return f?l.jsxs(Ur,{listening:!1,...C,...t,children:[c==="colorPicker"?l.jsxs(l.Fragment,{children:[l.jsx(Fo,{x:n,y:r,radius:j,stroke:y,strokeWidth:lf,strokeScaleEnabled:!1}),l.jsx(Fo,{x:n,y:r,radius:S,stroke:x,strokeWidth:lf,strokeScaleEnabled:!1})]}):l.jsxs(l.Fragment,{children:[l.jsx(Fo,{x:n,y:r,radius:o,fill:u==="mask"?s:y,globalCompositeOperation:c==="eraser"?"destination-out":"source-out"}),l.jsx(Fo,{x:n,y:r,radius:o,stroke:"rgba(255,255,255,0.4)",strokeWidth:h*2,strokeEnabled:!0,listening:!1}),l.jsx(Fo,{x:n,y:r,radius:o,stroke:"rgba(0,0,0,1)",strokeWidth:h,strokeEnabled:!0,listening:!1})]}),l.jsx(Fo,{x:n,y:r,radius:p*2,fill:"rgba(255,255,255,0.4)",listening:!1}),l.jsx(Fo,{x:n,y:r,radius:p,fill:"rgba(0,0,0,1)",listening:!1})]}):null},oR=pe([tt,Ot],(e,t)=>{const{isMaskEnabled:n,stageScale:r,shouldShowBoundingBox:o,isTransformingBoundingBox:s,isMouseOverBoundingBox:c,isMovingBoundingBox:u,stageDimensions:f,stageCoordinates:p,tool:h,isMovingStage:y,shouldShowIntermediates:x,shouldShowGrid:S,shouldRestrictStrokesToBox:j}=e;let C="none";return h==="move"||t?y?C="grabbing":C="grab":s?C=void 0:j&&!c&&(C="default"),{isMaskEnabled:n,isModifyingBoundingBox:s||u,shouldShowBoundingBox:o,shouldShowGrid:S,stageCoordinates:p,stageCursor:C,stageDimensions:f,stageScale:r,tool:h,isStaging:t,shouldShowIntermediates:x}},{memoizeOptions:{resultEqualityCheck:ee.isEqual}}),iR=ne(xz,{shouldForwardProp:e=>!["sx"].includes(e)}),e4=()=>{const{isMaskEnabled:e,isModifyingBoundingBox:t,shouldShowBoundingBox:n,shouldShowGrid:r,stageCoordinates:o,stageCursor:s,stageDimensions:c,stageScale:u,tool:f,isStaging:p,shouldShowIntermediates:h}=A(oR);wz();const y=g.useRef(null),x=g.useRef(null),S=g.useCallback(V=>{oC(V),y.current=V},[]),j=g.useCallback(V=>{rC(V),x.current=V},[]),C=g.useRef({x:0,y:0}),w=g.useRef(!1),k=Dz(y),I=kz(y),P=Tz(y,w),M=Pz(y,w,C),T=Iz(),{handleDragStart:D,handleDragMove:_,handleDragEnd:R}=Sz();return l.jsx(L,{sx:{position:"relative",height:"100%",width:"100%",borderRadius:"base"},children:l.jsxs(Ye,{sx:{position:"relative"},children:[l.jsxs(iR,{tabIndex:-1,ref:S,sx:{outline:"none",overflow:"hidden",cursor:s||void 0,canvas:{outline:"none"}},x:o.x,y:o.y,width:c.width,height:c.height,scale:{x:u,y:u},onTouchStart:I,onTouchMove:M,onTouchEnd:P,onMouseDown:I,onMouseLeave:T,onMouseMove:M,onMouseUp:P,onDragStart:D,onDragMove:_,onDragEnd:R,onContextMenu:V=>V.evt.preventDefault(),onWheel:k,draggable:(f==="move"||p)&&!t,children:[l.jsx(Aa,{id:"grid",visible:r,children:l.jsx(Rz,{})}),l.jsx(Aa,{id:"base",ref:j,listening:!1,imageSmoothingEnabled:!1,children:l.jsx($z,{})}),l.jsxs(Aa,{id:"mask",visible:e,listening:!1,children:[l.jsx(Wz,{visible:!0,listening:!1}),l.jsx(Bz,{listening:!1})]}),l.jsx(Aa,{children:l.jsx(Oz,{})}),l.jsxs(Aa,{id:"preview",imageSmoothingEnabled:!1,children:[!p&&l.jsx(rR,{visible:f!=="move",listening:!1}),l.jsx(qz,{visible:p}),h&&l.jsx(Fz,{}),l.jsx(tR,{visible:n&&!p})]})]}),l.jsx(Jz,{}),l.jsx(Kz,{})]})})},aR=pe(tt,Vb,bt,(e,t,n)=>{const{doesCanvasNeedScaling:r,isCanvasInitialized:o}=e;return{doesCanvasNeedScaling:r,activeTabName:n,initialCanvasImage:t,isCanvasInitialized:o}}),t4=()=>{const e=Y(),{doesCanvasNeedScaling:t,activeTabName:n,initialCanvasImage:r,isCanvasInitialized:o}=A(aR),s=g.useRef(null);return g.useLayoutEffect(()=>{window.setTimeout(()=>{if(!s.current)return;const{clientWidth:c,clientHeight:u}=s.current;e(iC({width:c,height:u})),e(o?aC():Sc()),e(I1(!1))},0)},[e,r,t,n,o]),l.jsx(L,{ref:s,sx:{flexDirection:"column",alignItems:"center",justifyContent:"center",gap:4,width:"100%",height:"100%"},children:l.jsx(yc,{thickness:"2px",speed:"1s",size:"xl"})})},sR=pe([tt,bt,Et],(e,t,n)=>{const{futureLayerStates:r}=e;return{canRedo:r.length>0&&!n.isProcessing,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:ee.isEqual}});function n4(){const e=Y(),{canRedo:t,activeTabName:n}=A(sR),{t:r}=K(),o=()=>{e(sC())};return ce(["meta+shift+z","ctrl+shift+z","control+y","meta+y"],()=>{o()},{enabled:()=>t,preventDefault:!0},[n,t]),l.jsx(ae,{"aria-label":`${r("unifiedCanvas.redo")} (Ctrl+Shift+Z)`,tooltip:`${r("unifiedCanvas.redo")} (Ctrl+Shift+Z)`,icon:l.jsx(W9,{}),onClick:o,isDisabled:!t})}const lR=pe([tt,bt,Et],(e,t,n)=>{const{pastLayerStates:r}=e;return{canUndo:r.length>0&&!n.isProcessing,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:ee.isEqual}});function r4(){const e=Y(),{t}=K(),{canUndo:n,activeTabName:r}=A(lR),o=()=>{e(lC())};return ce(["meta+z","ctrl+z"],()=>{o()},{enabled:()=>n,preventDefault:!0},[r,n]),l.jsx(ae,{"aria-label":`${t("unifiedCanvas.undo")} (Ctrl+Z)`,tooltip:`${t("unifiedCanvas.undo")} (Ctrl+Z)`,icon:l.jsx(G9,{}),onClick:o,isDisabled:!n})}const cR=(e,t,n)=>{const r=document.createElement("img");r.addEventListener("load",()=>{const o=document.createElement("canvas");o.width=t,o.height=n;const s=o.getContext("2d");s&&(s.drawImage(r,0,0),o.toBlob(c=>{c&&navigator.clipboard.write([new ClipboardItem({[c.type]:c})])}),o.remove(),r.remove())}),r.src=e},uR=e=>{const t=document.createElement("a");t.href=e,t.download="",document.body.appendChild(t),t.click(),document.body.removeChild(t),t.remove()},dR=(e,t,n,r)=>{const o=e.scale(),s=e.getClientRect({relativeTo:e.getParent()});e.scale({x:1/t,y:1/t});const{x:c,y:u,width:f,height:p}=e.getClientRect(),h=r?{x:r.x+n.x,y:r.y+n.y,width:r.width,height:r.height}:{x:c,y:u,width:f,height:p},y=e.toDataURL(h);return e.scale(o),{dataURL:y,boundingBox:{x:s.x,y:s.y,width:f,height:p}}},fR={cropVisible:!1,cropToBoundingBox:!1,shouldSaveToGallery:!1,shouldDownload:!1,shouldCopy:!1,shouldSetAsInitialImage:!0},co=(e=fR)=>async(t,n)=>{const{cropVisible:r,cropToBoundingBox:o,shouldSaveToGallery:s,shouldDownload:c,shouldCopy:u,shouldSetAsInitialImage:f}=e;t(cC("Exporting Image")),t(gl(!1));const p=n(),{stageScale:h,boundingBoxCoordinates:y,boundingBoxDimensions:x,stageCoordinates:S}=p.canvas,j=jr();if(!j){t(vd(!1)),t(gl(!0));return}const{dataURL:C,boundingBox:w}=dR(j,h,S,o?{...y,...x}:void 0);if(!C){t(vd(!1)),t(gl(!0));return}const k=new FormData;k.append("data",JSON.stringify({dataURL:C,filename:"merged_canvas.png",kind:s?"result":"temp",cropVisible:r}));const P=await(await fetch(`${window.location.origin}/upload`,{method:"POST",body:k})).json(),{url:M,width:T,height:D}=P,_={uuid:C1(),category:s?"result":"user",...P};c&&(uR(M),t(yl({title:Ma.t("toast.downloadImageStarted"),status:"success",duration:2500,isClosable:!0}))),u&&(cR(M,T,D),t(yl({title:Ma.t("toast.imageCopied"),status:"success",duration:2500,isClosable:!0}))),s&&(t(w1({image:_,category:"result"})),t(yl({title:Ma.t("toast.imageSavedToGallery"),status:"success",duration:2500,isClosable:!0}))),f&&(t(uC({kind:"image",layer:"base",...w,image:_})),t(yl({title:Ma.t("toast.canvasMerged"),status:"success",duration:2500,isClosable:!0}))),t(vd(!1)),t(dC(Ma.t("common.statusConnected"))),t(gl(!0))};function hR(){const e=A(Ot),t=jr(),n=A(u=>u.system.isProcessing),r=A(u=>u.canvas.shouldCropToBoundingBoxOnSave),o=Y(),{t:s}=K();ce(["meta+c","ctrl+c"],()=>{c()},{enabled:()=>!e,preventDefault:!0},[t,n]);const c=()=>{o(co({cropVisible:!r,cropToBoundingBox:r,shouldCopy:!0}))};return l.jsx(ae,{"aria-label":`${s("unifiedCanvas.copyToClipboard")} (Cmd/Ctrl+C)`,tooltip:`${s("unifiedCanvas.copyToClipboard")} (Cmd/Ctrl+C)`,icon:l.jsx(Xi,{}),onClick:c,isDisabled:e})}function pR(){const e=Y(),{t}=K(),n=jr(),r=A(Ot),o=A(u=>u.system.isProcessing),s=A(u=>u.canvas.shouldCropToBoundingBoxOnSave);ce(["shift+d"],()=>{c()},{enabled:()=>!r,preventDefault:!0},[n,o]);const c=()=>{e(co({cropVisible:!s,cropToBoundingBox:s,shouldDownload:!0}))};return l.jsx(ae,{"aria-label":`${t("unifiedCanvas.downloadAsImage")} (Shift+D)`,tooltip:`${t("unifiedCanvas.downloadAsImage")} (Shift+D)`,icon:l.jsx(Qh,{}),onClick:c,isDisabled:r})}function mR(){const e=A(Ot),{openUploader:t}=Kh(),{t:n}=K();return l.jsx(ae,{"aria-label":n("common.upload"),tooltip:n("common.upload"),icon:l.jsx(Rc,{}),onClick:t,isDisabled:e})}const vR=pe([tt,Ot],(e,t)=>{const{layer:n,isMaskEnabled:r}=e;return{layer:n,isMaskEnabled:r,isStaging:t}},{memoizeOptions:{resultEqualityCheck:ee.isEqual}});function gR(){const e=Y(),{t}=K(),{layer:n,isMaskEnabled:r,isStaging:o}=A(vR),s=()=>{e(Ql(n==="mask"?"base":"mask"))};ce(["q"],()=>{s()},{enabled:()=>!o,preventDefault:!0},[n]);const c=u=>{const f=u.target.value;e(Ql(f)),f==="mask"&&!r&&e(as(!0))};return l.jsx(Mn,{tooltip:`${t("unifiedCanvas.layer")} (Q)`,"aria-label":`${t("unifiedCanvas.layer")} (Q)`,tooltipProps:{hasArrow:!0,placement:"top"},value:n,validValues:Q1,onChange:c,isDisabled:o})}function yR(){const e=Y(),{t}=K(),n=jr(),r=A(Ot),o=A(c=>c.system.isProcessing);ce(["shift+m"],()=>{s()},{enabled:()=>!r,preventDefault:!0},[n,o]);const s=()=>{e(co({cropVisible:!1,shouldSetAsInitialImage:!0}))};return l.jsx(ae,{"aria-label":`${t("unifiedCanvas.mergeVisible")} (Shift+M)`,tooltip:`${t("unifiedCanvas.mergeVisible")} (Shift+M)`,icon:l.jsx(qx,{}),onClick:s,isDisabled:r})}function xR(){const e=A(s=>s.canvas.tool),t=A(Ot),n=Y(),{t:r}=K();ce(["v"],()=>{o()},{enabled:()=>!t,preventDefault:!0},[]);const o=()=>n(Sr("move"));return l.jsx(ae,{"aria-label":`${r("unifiedCanvas.move")} (V)`,tooltip:`${r("unifiedCanvas.move")} (V)`,icon:l.jsx(Bx,{}),isChecked:e==="move"||t,onClick:o})}function bR(){const e=A(s=>s.ui.shouldPinParametersPanel),t=A(s=>s.ui.shouldShowParametersPanel),n=Y(),{t:r}=K(),o=()=>{n(ql(!0)),e&&n(cn())};return!e||!t?l.jsxs(L,{flexDirection:"column",gap:2,children:[l.jsx(ae,{tooltip:`${r("parameters.showOptionsPanel")} (O)`,tooltipProps:{placement:"top"},"aria-label":r("parameters.showOptionsPanel"),onClick:o,children:l.jsx(ep,{})}),l.jsx(L,{children:l.jsx(Mp,{iconButton:!0})}),l.jsx(L,{children:l.jsx(Pp,{width:"100%",height:"40px",btnGroupWidth:"100%"})})]}):null}function SR(){const e=Y(),{t}=K(),n=A(Ot),r=()=>{e(Jf()),e(Sc())};return l.jsx(ae,{"aria-label":t("unifiedCanvas.clearCanvas"),tooltip:t("unifiedCanvas.clearCanvas"),icon:l.jsx(So,{}),onClick:r,isDisabled:n,colorScheme:"error"})}function o4(e,t,n=250){const[r,o]=g.useState(0);return g.useEffect(()=>{const s=setTimeout(()=>{r===1&&e(),o(0)},n);return r===2&&t(),()=>clearTimeout(s)},[r,e,t,n]),()=>o(s=>s+1)}function CR(){const e=jr(),t=Y(),{t:n}=K();ce(["r"],()=>{o()},{enabled:()=>!0,preventDefault:!0},[e]);const r=o4(()=>o(!1),()=>o(!0)),o=(s=!1)=>{const c=jr();if(!c)return;const u=c.getClientRect({skipTransform:!0});t(Z1({contentRect:u,shouldScaleTo1:s}))};return l.jsx(ae,{"aria-label":`${n("unifiedCanvas.resetView")} (R)`,tooltip:`${n("unifiedCanvas.resetView")} (R)`,icon:l.jsx(Wx,{}),onClick:r})}function wR(){const e=A(Ot),t=jr(),n=A(u=>u.system.isProcessing),r=A(u=>u.canvas.shouldCropToBoundingBoxOnSave),o=Y(),{t:s}=K();ce(["shift+s"],()=>{c()},{enabled:()=>!e,preventDefault:!0},[t,n]);const c=()=>{o(co({cropVisible:!r,cropToBoundingBox:r,shouldSaveToGallery:!0}))};return l.jsx(ae,{"aria-label":`${s("unifiedCanvas.saveToGallery")} (Shift+S)`,tooltip:`${s("unifiedCanvas.saveToGallery")} (Shift+S)`,icon:l.jsx(Jh,{}),onClick:c,isDisabled:e})}const jR=pe([tt,Ot,Et],(e,t,n)=>{const{isProcessing:r}=n,{tool:o}=e;return{tool:o,isStaging:t,isProcessing:r}},{memoizeOptions:{resultEqualityCheck:ee.isEqual}}),kR=()=>{const e=Y(),{t}=K(),{tool:n,isStaging:r}=A(jR);ce(["b"],()=>{o()},{enabled:()=>!r,preventDefault:!0},[]),ce(["e"],()=>{s()},{enabled:()=>!r,preventDefault:!0},[n]),ce(["c"],()=>{c()},{enabled:()=>!r,preventDefault:!0},[n]),ce(["shift+f"],()=>{u()},{enabled:()=>!r,preventDefault:!0}),ce(["delete","backspace"],()=>{f()},{enabled:()=>!r,preventDefault:!0});const o=()=>e(Sr("brush")),s=()=>e(Sr("eraser")),c=()=>e(Sr("colorPicker")),u=()=>e(J1()),f=()=>e(e2());return l.jsxs(L,{flexDirection:"column",gap:2,children:[l.jsxs(Qt,{children:[l.jsx(ae,{"aria-label":`${t("unifiedCanvas.brush")} (B)`,tooltip:`${t("unifiedCanvas.brush")} (B)`,icon:l.jsx(Yx,{}),isChecked:n==="brush"&&!r,onClick:o,isDisabled:r}),l.jsx(ae,{"aria-label":`${t("unifiedCanvas.eraser")} (E)`,tooltip:`${t("unifiedCanvas.eraser")} (B)`,icon:l.jsx(Vx,{}),isChecked:n==="eraser"&&!r,isDisabled:r,onClick:s})]}),l.jsxs(Qt,{children:[l.jsx(ae,{"aria-label":`${t("unifiedCanvas.fillBoundingBox")} (Shift+F)`,tooltip:`${t("unifiedCanvas.fillBoundingBox")} (Shift+F)`,icon:l.jsx(Gx,{}),isDisabled:r,onClick:u}),l.jsx(ae,{"aria-label":`${t("unifiedCanvas.eraseBoundingBox")} (Del/Backspace)`,tooltip:`${t("unifiedCanvas.eraseBoundingBox")} (Del/Backspace)`,icon:l.jsx(zc,{style:{transform:"rotate(45deg)"}}),isDisabled:r,onClick:f})]}),l.jsx(ae,{"aria-label":`${t("unifiedCanvas.colorPicker")} (C)`,tooltip:`${t("unifiedCanvas.colorPicker")} (C)`,icon:l.jsx(Ux,{}),isChecked:n==="colorPicker"&&!r,isDisabled:r,onClick:c,width:"max-content"})]})},i4=()=>{const e=A(Ot),t=Y(),{t:n}=K(),r=()=>{t(fC()),t(Jf()),t(t2())};return l.jsxs(Wc,{title:n("unifiedCanvas.emptyTempImageFolder"),acceptCallback:r,acceptButtonText:n("unifiedCanvas.emptyFolder"),triggerComponent:l.jsx(Je,{leftIcon:l.jsx(So,{}),size:"sm",isDisabled:e,children:n("unifiedCanvas.emptyTempImageFolder")}),children:[l.jsx("p",{children:n("unifiedCanvas.emptyTempImagesFolderMessage")}),l.jsx("br",{}),l.jsx("p",{children:n("unifiedCanvas.emptyTempImagesFolderConfirm")})]})},a4=()=>{const e=A(Ot),t=Y(),{t:n}=K();return l.jsxs(Wc,{title:n("unifiedCanvas.clearCanvasHistory"),acceptCallback:()=>t(t2()),acceptButtonText:n("unifiedCanvas.clearHistory"),triggerComponent:l.jsx(Je,{size:"sm",leftIcon:l.jsx(So,{}),isDisabled:e,children:n("unifiedCanvas.clearCanvasHistory")}),children:[l.jsx("p",{children:n("unifiedCanvas.clearCanvasHistoryMessage")}),l.jsx("br",{}),l.jsx("p",{children:n("unifiedCanvas.clearCanvasHistoryConfirm")})]})},ER=pe([tt],e=>{const{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldShowCanvasDebugInfo:r,shouldShowIntermediates:o}=e;return{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldShowCanvasDebugInfo:r,shouldShowIntermediates:o}},{memoizeOptions:{resultEqualityCheck:ee.isEqual}}),PR=()=>{const e=Y(),{t}=K(),{shouldAutoSave:n,shouldCropToBoundingBoxOnSave:r,shouldShowCanvasDebugInfo:o,shouldShowIntermediates:s}=A(ER);return l.jsx(or,{isLazy:!1,triggerComponent:l.jsx(ae,{tooltip:t("unifiedCanvas.canvasSettings"),tooltipProps:{placement:"bottom"},"aria-label":t("unifiedCanvas.canvasSettings"),icon:l.jsx(tp,{})}),children:l.jsxs(L,{direction:"column",gap:2,children:[l.jsx(ft,{label:t("unifiedCanvas.showIntermediates"),isChecked:s,onChange:c=>e(n2(c.target.checked))}),l.jsx(ft,{label:t("unifiedCanvas.autoSaveToGallery"),isChecked:n,onChange:c=>e(r2(c.target.checked))}),l.jsx(ft,{label:t("unifiedCanvas.saveBoxRegionOnly"),isChecked:r,onChange:c=>e(o2(c.target.checked))}),l.jsx(ft,{label:t("unifiedCanvas.showCanvasDebugInfo"),isChecked:o,onChange:c=>e(i2(c.target.checked))}),l.jsx(a4,{}),l.jsx(i4,{})]})})},IR=()=>l.jsxs(L,{flexDirection:"column",rowGap:2,children:[l.jsx(gR,{}),l.jsx(kR,{}),l.jsxs(L,{gap:2,children:[l.jsx(xR,{}),l.jsx(CR,{})]}),l.jsxs(L,{columnGap:2,children:[l.jsx(yR,{}),l.jsx(wR,{})]}),l.jsxs(L,{columnGap:2,children:[l.jsx(hR,{}),l.jsx(pR,{})]}),l.jsxs(L,{gap:2,children:[l.jsx(r4,{}),l.jsx(n4,{})]}),l.jsxs(L,{gap:2,children:[l.jsx(mR,{}),l.jsx(SR,{})]}),l.jsx(PR,{}),l.jsx(bR,{})]});function MR(){const e=Y(),t=A(o=>o.canvas.brushSize),{t:n}=K(),r=A(Ot);return ce(["BracketLeft"],()=>{e(Li(Math.max(t-5,5)))},{enabled:()=>!r,preventDefault:!0},[t]),ce(["BracketRight"],()=>{e(Li(Math.min(t+5,500)))},{enabled:()=>!r,preventDefault:!0},[t]),l.jsx(ut,{label:n("unifiedCanvas.brushSize"),value:t,withInput:!0,onChange:o=>e(Li(o)),sliderNumberInputProps:{max:500},inputReadOnly:!1,isCompact:!0})}function Uc(){return(Uc=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}function qf(e){var t=g.useRef(e),n=g.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var Ji=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:w.buttons>0)&&o.current?s(s1(o.current,w,u.current)):C(!1)},j=function(){return C(!1)};function C(w){var k=f.current,I=Yf(o.current),P=w?I.addEventListener:I.removeEventListener;P(k?"touchmove":"mousemove",S),P(k?"touchend":"mouseup",j)}return[function(w){var k=w.nativeEvent,I=o.current;if(I&&(l1(k),!function(M,T){return T&&!Wa(M)}(k,f.current)&&I)){if(Wa(k)){f.current=!0;var P=k.changedTouches||[];P.length&&(u.current=P[0].identifier)}I.focus(),s(s1(I,k,u.current)),C(!0)}},function(w){var k=w.which||w.keyCode;k<37||k>40||(w.preventDefault(),c({left:k===39?.05:k===37?-.05:0,top:k===40?.05:k===38?-.05:0}))},C]},[c,s]),h=p[0],y=p[1],x=p[2];return g.useEffect(function(){return x},[x]),_e.createElement("div",Uc({},r,{onTouchStart:h,onMouseDown:h,className:"react-colorful__interactive",ref:o,onKeyDown:y,tabIndex:0,role:"slider"}))}),$c=function(e){return e.filter(Boolean).join(" ")},Np=function(e){var t=e.color,n=e.left,r=e.top,o=r===void 0?.5:r,s=$c(["react-colorful__pointer",e.className]);return _e.createElement("div",{className:s,style:{top:100*o+"%",left:100*n+"%"}},_e.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},gn=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},l4=function(e){var t=e.s,n=e.v,r=e.a,o=(200-t)*n/100;return{h:gn(e.h),s:gn(o>0&&o<200?t*n/100/(o<=100?o:200-o)*100:0),l:gn(o/2),a:gn(r,2)}},Kf=function(e){var t=l4(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},$d=function(e){var t=l4(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},TR=function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var s=Math.floor(t),c=r*(1-n),u=r*(1-(t-s)*n),f=r*(1-(1-t+s)*n),p=s%6;return{r:gn(255*[r,u,c,c,f,r][p]),g:gn(255*[f,r,r,u,c,c][p]),b:gn(255*[c,c,f,r,r,u][p]),a:gn(o,2)}},_R=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,s=Math.max(t,n,r),c=s-Math.min(t,n,r),u=c?s===t?(n-r)/c:s===n?2+(r-t)/c:4+(t-n)/c:0;return{h:gn(60*(u<0?u+6:u)),s:gn(s?c/s*100:0),v:gn(s/255*100),a:o}},DR=_e.memo(function(e){var t=e.hue,n=e.onChange,r=$c(["react-colorful__hue",e.className]);return _e.createElement("div",{className:r},_e.createElement(Rp,{onMove:function(o){n({h:360*o.left})},onKey:function(o){n({h:Ji(t+360*o.left,0,360)})},"aria-label":"Hue","aria-valuenow":gn(t),"aria-valuemax":"360","aria-valuemin":"0"},_e.createElement(Np,{className:"react-colorful__hue-pointer",left:t/360,color:Kf({h:t,s:100,v:100,a:1})})))}),AR=_e.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:Kf({h:t.h,s:100,v:100,a:1})};return _e.createElement("div",{className:"react-colorful__saturation",style:r},_e.createElement(Rp,{onMove:function(o){n({s:100*o.left,v:100-100*o.top})},onKey:function(o){n({s:Ji(t.s+100*o.left,0,100),v:Ji(t.v-100*o.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+gn(t.s)+"%, Brightness "+gn(t.v)+"%"},_e.createElement(Np,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:Kf(t)})))}),c4=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0};function OR(e,t,n){var r=qf(n),o=g.useState(function(){return e.toHsva(t)}),s=o[0],c=o[1],u=g.useRef({color:t,hsva:s});g.useEffect(function(){if(!e.equal(t,u.current.color)){var p=e.toHsva(t);u.current={hsva:p,color:t},c(p)}},[t,e]),g.useEffect(function(){var p;c4(s,u.current.hsva)||e.equal(p=e.fromHsva(s),u.current.color)||(u.current={hsva:s,color:p},r(p))},[s,e,r]);var f=g.useCallback(function(p){c(function(h){return Object.assign({},h,p)})},[]);return[s,f]}var zR=typeof window<"u"?g.useLayoutEffect:g.useEffect,RR=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},c1=new Map,NR=function(e){zR(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!c1.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,c1.set(t,n);var r=RR();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},FR=function(e){var t=e.className,n=e.hsva,r=e.onChange,o={backgroundImage:"linear-gradient(90deg, "+$d(Object.assign({},n,{a:0}))+", "+$d(Object.assign({},n,{a:1}))+")"},s=$c(["react-colorful__alpha",t]),c=gn(100*n.a);return _e.createElement("div",{className:s},_e.createElement("div",{className:"react-colorful__alpha-gradient",style:o}),_e.createElement(Rp,{onMove:function(u){r({a:u.left})},onKey:function(u){r({a:Ji(n.a+u.left)})},"aria-label":"Alpha","aria-valuetext":c+"%","aria-valuenow":c,"aria-valuemin":"0","aria-valuemax":"100"},_e.createElement(Np,{className:"react-colorful__alpha-pointer",left:n.a,color:$d(n)})))},LR=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,s=e.onChange,c=s4(e,["className","colorModel","color","onChange"]),u=g.useRef(null);NR(u);var f=OR(n,o,s),p=f[0],h=f[1],y=$c(["react-colorful",t]);return _e.createElement("div",Uc({},c,{ref:u,className:y}),_e.createElement(AR,{hsva:p,onChange:h}),_e.createElement(DR,{hue:p.h,onChange:h}),_e.createElement(FR,{hsva:p,onChange:h,className:"react-colorful__last-control"}))},BR={defaultColor:{r:0,g:0,b:0,a:1},toHsva:_R,fromHsva:TR,equal:c4},HR=function(e){return _e.createElement(LR,Uc({},e,{colorModel:BR}))};const WR=ne(HR,{baseStyle:{paddingInline:4},shouldForwardProp:e=>!["pickerColor"].includes(e)}),Gd={width:6,height:6,borderColor:"base.100"},VR=e=>{const{styleClass:t="",...n}=e;return l.jsx(WR,{sx:{".react-colorful__hue-pointer":Gd,".react-colorful__saturation-pointer":Gd,".react-colorful__alpha-pointer":Gd},className:t,...n})},vc=g.memo(VR),UR=pe([tt,Ot],(e,t)=>{const{brushColor:n,maskColor:r,layer:o}=e;return{brushColor:n,maskColor:r,layer:o,isStaging:t}},{memoizeOptions:{resultEqualityCheck:ee.isEqual}});function $R(){const e=Y(),{brushColor:t,maskColor:n,layer:r,isStaging:o}=A(UR),s=()=>{if(r==="base")return`rgba(${t.r},${t.g},${t.b},${t.a})`;if(r==="mask")return`rgba(${n.r},${n.g},${n.b},${n.a})`};return ce(["shift+BracketLeft"],()=>{e(Bi({...t,a:ee.clamp(t.a-.05,.05,1)}))},{enabled:()=>!o,preventDefault:!0},[t]),ce(["shift+BracketRight"],()=>{e(Bi({...t,a:ee.clamp(t.a+.05,.05,1)}))},{enabled:()=>!o,preventDefault:!0},[t]),l.jsx(or,{triggerComponent:l.jsx(Ye,{sx:{width:7,height:7,minWidth:7,minHeight:7,borderRadius:"full",bg:s(),cursor:"pointer"}}),children:l.jsxs(L,{minWidth:60,direction:"column",gap:4,width:"100%",children:[r==="base"&&l.jsx(vc,{sx:{width:"100%",paddingTop:2,paddingBottom:2},pickerColor:t,onChange:c=>e(Bi(c))}),r==="mask"&&l.jsx(vc,{sx:{width:"100%",paddingTop:2,paddingBottom:2},pickerColor:n,onChange:c=>e(a2(c))})]})})}function u4(){return l.jsxs(L,{columnGap:4,alignItems:"center",children:[l.jsx(MR,{}),l.jsx($R,{})]})}function GR(){const e=Y(),t=A(r=>r.canvas.shouldRestrictStrokesToBox),{t:n}=K();return l.jsx(ft,{label:n("unifiedCanvas.betaLimitToBox"),isChecked:t,onChange:r=>e(s2(r.target.checked))})}function qR(){return l.jsxs(L,{gap:4,alignItems:"center",children:[l.jsx(u4,{}),l.jsx(GR,{})]})}function YR(){const e=Y(),{t}=K(),n=()=>e(Zf());return l.jsx(Je,{size:"sm",leftIcon:l.jsx(So,{}),onClick:n,tooltip:`${t("unifiedCanvas.clearMask")} (Shift+C)`,children:t("unifiedCanvas.betaClear")})}function KR(){const e=A(o=>o.canvas.isMaskEnabled),t=Y(),{t:n}=K(),r=()=>t(as(!e));return l.jsx(ft,{label:`${n("unifiedCanvas.enableMask")} (H)`,isChecked:e,onChange:r})}function XR(){const e=Y(),{t}=K(),n=A(r=>r.canvas.shouldPreserveMaskedArea);return l.jsx(ft,{label:t("unifiedCanvas.betaPreserveMasked"),isChecked:n,onChange:r=>e(l2(r.target.checked))})}function QR(){return l.jsxs(L,{gap:4,alignItems:"center",children:[l.jsx(u4,{}),l.jsx(KR,{}),l.jsx(XR,{}),l.jsx(YR,{})]})}function ZR(){const e=A(r=>r.canvas.shouldDarkenOutsideBoundingBox),t=Y(),{t:n}=K();return l.jsx(ft,{label:n("unifiedCanvas.betaDarkenOutside"),isChecked:e,onChange:r=>t(c2(r.target.checked))})}function JR(){const e=A(r=>r.canvas.shouldShowGrid),t=Y(),{t:n}=K();return l.jsx(ft,{label:n("unifiedCanvas.showGrid"),isChecked:e,onChange:r=>t(u2(r.target.checked))})}function eN(){const e=A(o=>o.canvas.shouldSnapToGrid),t=Y(),{t:n}=K(),r=o=>t(Xl(o.target.checked));return l.jsx(ft,{label:`${n("unifiedCanvas.snapToGrid")} (N)`,isChecked:e,onChange:r})}function tN(){return l.jsxs(L,{alignItems:"center",gap:4,children:[l.jsx(JR,{}),l.jsx(eN,{}),l.jsx(ZR,{})]})}const nN=pe([tt],e=>{const{tool:t,layer:n}=e;return{tool:t,layer:n}},{memoizeOptions:{resultEqualityCheck:ee.isEqual}});function rN(){const{tool:e,layer:t}=A(nN);return l.jsxs(L,{height:8,minHeight:8,maxHeight:8,alignItems:"center",children:[t=="base"&&["brush","eraser","colorPicker"].includes(e)&&l.jsx(qR,{}),t=="mask"&&["brush","eraser","colorPicker"].includes(e)&&l.jsx(QR,{}),e=="move"&&l.jsx(tN,{})]})}const oN=pe([tt],e=>{const{doesCanvasNeedScaling:t}=e;return{doesCanvasNeedScaling:t}},{memoizeOptions:{resultEqualityCheck:ee.isEqual}}),iN=()=>{const e=Y(),{doesCanvasNeedScaling:t}=A(oN);return g.useLayoutEffect(()=>{e(cn());const n=()=>{e(cn())};return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[e]),l.jsx(Ye,{sx:{width:"100%",height:"100%",borderRadius:"base",bg:"base.850"},children:l.jsxs(L,{flexDirection:"row",width:"100%",height:"100%",columnGap:4,padding:4,children:[l.jsx(IR,{}),l.jsxs(L,{width:"100%",height:"100%",flexDirection:"column",rowGap:4,children:[l.jsx(rN,{}),t?l.jsx(t4,{}):l.jsx(e4,{})]})]})})},aN=pe([tt,Ot],(e,t)=>{const{maskColor:n,layer:r,isMaskEnabled:o,shouldPreserveMaskedArea:s}=e;return{layer:r,maskColor:n,maskColorString:Ko(n),isMaskEnabled:o,shouldPreserveMaskedArea:s,isStaging:t}},{memoizeOptions:{resultEqualityCheck:ee.isEqual}}),sN=()=>{const e=Y(),{t}=K(),{layer:n,maskColor:r,isMaskEnabled:o,shouldPreserveMaskedArea:s,isStaging:c}=A(aN);ce(["q"],()=>{u()},{enabled:()=>!c,preventDefault:!0},[n]),ce(["shift+c"],()=>{f()},{enabled:()=>!c,preventDefault:!0},[]),ce(["h"],()=>{p()},{enabled:()=>!c,preventDefault:!0},[o]);const u=()=>{e(Ql(n==="mask"?"base":"mask"))},f=()=>e(Zf()),p=()=>e(as(!o));return l.jsx(or,{triggerComponent:l.jsx(Qt,{children:l.jsx(ae,{"aria-label":t("unifiedCanvas.maskingOptions"),tooltip:t("unifiedCanvas.maskingOptions"),icon:l.jsx(R9,{}),isChecked:n==="mask",isDisabled:c})}),children:l.jsxs(L,{direction:"column",gap:2,children:[l.jsx(ft,{label:`${t("unifiedCanvas.enableMask")} (H)`,isChecked:o,onChange:p}),l.jsx(ft,{label:t("unifiedCanvas.preserveMaskedArea"),isChecked:s,onChange:h=>e(l2(h.target.checked))}),l.jsx(vc,{sx:{paddingTop:2,paddingBottom:2},pickerColor:r,onChange:h=>e(a2(h))}),l.jsxs(Je,{size:"sm",leftIcon:l.jsx(So,{}),onClick:f,children:[t("unifiedCanvas.clearMask")," (Shift+C)"]})]})})},lN=pe([tt],e=>{const{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:o,shouldShowGrid:s,shouldShowIntermediates:c,shouldSnapToGrid:u,shouldRestrictStrokesToBox:f}=e;return{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:o,shouldShowGrid:s,shouldShowIntermediates:c,shouldSnapToGrid:u,shouldRestrictStrokesToBox:f}},{memoizeOptions:{resultEqualityCheck:ee.isEqual}}),cN=()=>{const e=Y(),{t}=K(),{shouldAutoSave:n,shouldCropToBoundingBoxOnSave:r,shouldDarkenOutsideBoundingBox:o,shouldShowCanvasDebugInfo:s,shouldShowGrid:c,shouldShowIntermediates:u,shouldSnapToGrid:f,shouldRestrictStrokesToBox:p}=A(lN);ce(["n"],()=>{e(Xl(!f))},{enabled:!0,preventDefault:!0},[f]);const h=y=>e(Xl(y.target.checked));return l.jsx(or,{isLazy:!1,triggerComponent:l.jsx(ae,{tooltip:t("unifiedCanvas.canvasSettings"),"aria-label":t("unifiedCanvas.canvasSettings"),icon:l.jsx(tp,{})}),children:l.jsxs(L,{direction:"column",gap:2,children:[l.jsx(ft,{label:t("unifiedCanvas.showIntermediates"),isChecked:u,onChange:y=>e(n2(y.target.checked))}),l.jsx(ft,{label:t("unifiedCanvas.showGrid"),isChecked:c,onChange:y=>e(u2(y.target.checked))}),l.jsx(ft,{label:t("unifiedCanvas.snapToGrid"),isChecked:f,onChange:h}),l.jsx(ft,{label:t("unifiedCanvas.darkenOutsideSelection"),isChecked:o,onChange:y=>e(c2(y.target.checked))}),l.jsx(ft,{label:t("unifiedCanvas.autoSaveToGallery"),isChecked:n,onChange:y=>e(r2(y.target.checked))}),l.jsx(ft,{label:t("unifiedCanvas.saveBoxRegionOnly"),isChecked:r,onChange:y=>e(o2(y.target.checked))}),l.jsx(ft,{label:t("unifiedCanvas.limitStrokesToBox"),isChecked:p,onChange:y=>e(s2(y.target.checked))}),l.jsx(ft,{label:t("unifiedCanvas.showCanvasDebugInfo"),isChecked:s,onChange:y=>e(i2(y.target.checked))}),l.jsx(a4,{}),l.jsx(i4,{})]})})},uN=pe([tt,Ot,Et],(e,t,n)=>{const{isProcessing:r}=n,{tool:o,brushColor:s,brushSize:c}=e;return{tool:o,isStaging:t,isProcessing:r,brushColor:s,brushSize:c}},{memoizeOptions:{resultEqualityCheck:ee.isEqual}}),dN=()=>{const e=Y(),{tool:t,brushColor:n,brushSize:r,isStaging:o}=A(uN),{t:s}=K();ce(["b"],()=>{c()},{enabled:()=>!o,preventDefault:!0},[]),ce(["e"],()=>{u()},{enabled:()=>!o,preventDefault:!0},[t]),ce(["c"],()=>{f()},{enabled:()=>!o,preventDefault:!0},[t]),ce(["shift+f"],()=>{p()},{enabled:()=>!o,preventDefault:!0}),ce(["delete","backspace"],()=>{h()},{enabled:()=>!o,preventDefault:!0}),ce(["BracketLeft"],()=>{e(Li(Math.max(r-5,5)))},{enabled:()=>!o,preventDefault:!0},[r]),ce(["BracketRight"],()=>{e(Li(Math.min(r+5,500)))},{enabled:()=>!o,preventDefault:!0},[r]),ce(["shift+BracketLeft"],()=>{e(Bi({...n,a:ee.clamp(n.a-.05,.05,1)}))},{enabled:()=>!o,preventDefault:!0},[n]),ce(["shift+BracketRight"],()=>{e(Bi({...n,a:ee.clamp(n.a+.05,.05,1)}))},{enabled:()=>!o,preventDefault:!0},[n]);const c=()=>e(Sr("brush")),u=()=>e(Sr("eraser")),f=()=>e(Sr("colorPicker")),p=()=>e(J1()),h=()=>e(e2());return l.jsxs(Qt,{isAttached:!0,children:[l.jsx(ae,{"aria-label":`${s("unifiedCanvas.brush")} (B)`,tooltip:`${s("unifiedCanvas.brush")} (B)`,icon:l.jsx(Yx,{}),isChecked:t==="brush"&&!o,onClick:c,isDisabled:o}),l.jsx(ae,{"aria-label":`${s("unifiedCanvas.eraser")} (E)`,tooltip:`${s("unifiedCanvas.eraser")} (E)`,icon:l.jsx(Vx,{}),isChecked:t==="eraser"&&!o,isDisabled:o,onClick:u}),l.jsx(ae,{"aria-label":`${s("unifiedCanvas.fillBoundingBox")} (Shift+F)`,tooltip:`${s("unifiedCanvas.fillBoundingBox")} (Shift+F)`,icon:l.jsx(Gx,{}),isDisabled:o,onClick:p}),l.jsx(ae,{"aria-label":`${s("unifiedCanvas.eraseBoundingBox")} (Del/Backspace)`,tooltip:`${s("unifiedCanvas.eraseBoundingBox")} (Del/Backspace)`,icon:l.jsx(zc,{style:{transform:"rotate(45deg)"}}),isDisabled:o,onClick:h}),l.jsx(ae,{"aria-label":`${s("unifiedCanvas.colorPicker")} (C)`,tooltip:`${s("unifiedCanvas.colorPicker")} (C)`,icon:l.jsx(Ux,{}),isChecked:t==="colorPicker"&&!o,isDisabled:o,onClick:f}),l.jsx(or,{triggerComponent:l.jsx(ae,{"aria-label":s("unifiedCanvas.brushOptions"),tooltip:s("unifiedCanvas.brushOptions"),icon:l.jsx(ep,{})}),children:l.jsxs(L,{minWidth:60,direction:"column",gap:4,width:"100%",children:[l.jsx(L,{gap:4,justifyContent:"space-between",children:l.jsx(ut,{label:s("unifiedCanvas.brushSize"),value:r,withInput:!0,onChange:y=>e(Li(y)),sliderNumberInputProps:{max:500},inputReadOnly:!1})}),l.jsx(vc,{sx:{width:"100%",paddingTop:2,paddingBottom:2},pickerColor:n,onChange:y=>e(Bi(y))})]})})]})},fN=pe([Et,tt,Ot],(e,t,n)=>{const{isProcessing:r}=e,{tool:o,shouldCropToBoundingBoxOnSave:s,layer:c,isMaskEnabled:u}=t;return{isProcessing:r,isStaging:n,isMaskEnabled:u,tool:o,layer:c,shouldCropToBoundingBoxOnSave:s}},{memoizeOptions:{resultEqualityCheck:ee.isEqual}}),hN=()=>{const e=Y(),{isProcessing:t,isStaging:n,isMaskEnabled:r,layer:o,tool:s,shouldCropToBoundingBoxOnSave:c}=A(fN),u=jr(),{t:f}=K(),{openUploader:p}=Kh();ce(["v"],()=>{h()},{enabled:()=>!n,preventDefault:!0},[]),ce(["r"],()=>{x()},{enabled:()=>!0,preventDefault:!0},[u]),ce(["shift+m"],()=>{j()},{enabled:()=>!n,preventDefault:!0},[u,t]),ce(["shift+s"],()=>{C()},{enabled:()=>!n,preventDefault:!0},[u,t]),ce(["meta+c","ctrl+c"],()=>{w()},{enabled:()=>!n,preventDefault:!0},[u,t]),ce(["shift+d"],()=>{k()},{enabled:()=>!n,preventDefault:!0},[u,t]);const h=()=>e(Sr("move")),y=o4(()=>x(!1),()=>x(!0)),x=(P=!1)=>{const M=jr();if(!M)return;const T=M.getClientRect({skipTransform:!0});e(Z1({contentRect:T,shouldScaleTo1:P}))},S=()=>{e(Jf()),e(Sc())},j=()=>{e(co({cropVisible:!1,shouldSetAsInitialImage:!0}))},C=()=>{e(co({cropVisible:!c,cropToBoundingBox:c,shouldSaveToGallery:!0}))},w=()=>{e(co({cropVisible:!c,cropToBoundingBox:c,shouldCopy:!0}))},k=()=>{e(co({cropVisible:!c,cropToBoundingBox:c,shouldDownload:!0}))},I=P=>{const M=P.target.value;e(Ql(M)),M==="mask"&&!r&&e(as(!0))};return l.jsxs(L,{sx:{alignItems:"center",gap:2},children:[l.jsx(Mn,{tooltip:`${f("unifiedCanvas.layer")} (Q)`,tooltipProps:{hasArrow:!0,placement:"top"},value:o,validValues:Q1,onChange:I,isDisabled:n}),l.jsx(sN,{}),l.jsx(dN,{}),l.jsxs(Qt,{isAttached:!0,children:[l.jsx(ae,{"aria-label":`${f("unifiedCanvas.move")} (V)`,tooltip:`${f("unifiedCanvas.move")} (V)`,icon:l.jsx(Bx,{}),isChecked:s==="move"||n,onClick:h}),l.jsx(ae,{"aria-label":`${f("unifiedCanvas.resetView")} (R)`,tooltip:`${f("unifiedCanvas.resetView")} (R)`,icon:l.jsx(Wx,{}),onClick:y})]}),l.jsxs(Qt,{isAttached:!0,children:[l.jsx(ae,{"aria-label":`${f("unifiedCanvas.mergeVisible")} (Shift+M)`,tooltip:`${f("unifiedCanvas.mergeVisible")} (Shift+M)`,icon:l.jsx(qx,{}),onClick:j,isDisabled:n}),l.jsx(ae,{"aria-label":`${f("unifiedCanvas.saveToGallery")} (Shift+S)`,tooltip:`${f("unifiedCanvas.saveToGallery")} (Shift+S)`,icon:l.jsx(Jh,{}),onClick:C,isDisabled:n}),l.jsx(ae,{"aria-label":`${f("unifiedCanvas.copyToClipboard")} (Cmd/Ctrl+C)`,tooltip:`${f("unifiedCanvas.copyToClipboard")} (Cmd/Ctrl+C)`,icon:l.jsx(Xi,{}),onClick:w,isDisabled:n}),l.jsx(ae,{"aria-label":`${f("unifiedCanvas.downloadAsImage")} (Shift+D)`,tooltip:`${f("unifiedCanvas.downloadAsImage")} (Shift+D)`,icon:l.jsx(Qh,{}),onClick:k,isDisabled:n})]}),l.jsxs(Qt,{isAttached:!0,children:[l.jsx(r4,{}),l.jsx(n4,{})]}),l.jsxs(Qt,{isAttached:!0,children:[l.jsx(ae,{"aria-label":`${f("common.upload")}`,tooltip:`${f("common.upload")}`,icon:l.jsx(Rc,{}),onClick:p,isDisabled:n}),l.jsx(ae,{"aria-label":`${f("unifiedCanvas.clearCanvas")}`,tooltip:`${f("unifiedCanvas.clearCanvas")}`,icon:l.jsx(So,{}),onClick:S,colorScheme:"error",isDisabled:n})]}),l.jsx(Qt,{isAttached:!0,children:l.jsx(cN,{})})]})},pN=pe([tt],e=>{const{doesCanvasNeedScaling:t}=e;return{doesCanvasNeedScaling:t}},{memoizeOptions:{resultEqualityCheck:ee.isEqual}}),mN=()=>{const e=Y(),{doesCanvasNeedScaling:t}=A(pN);return g.useLayoutEffect(()=>{e(cn());const n=()=>{e(cn())};return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[e]),l.jsx(Ye,{sx:{width:"100%",height:"100%",padding:4,borderRadius:"base",bg:"base.850"},children:l.jsxs(L,{sx:{flexDirection:"column",alignItems:"center",gap:4,width:"100%",height:"100%"},children:[l.jsx(hN,{}),l.jsx(L,{sx:{flexDirection:"column",alignItems:"center",justifyContent:"center",gap:4,width:"100%",height:"100%"},children:t?l.jsx(t4,{}):l.jsx(e4,{})})]})})},vN=pe(tt,e=>{const{boundingBoxDimensions:t,boundingBoxScaleMethod:n}=e;return{boundingBoxDimensions:t,boundingBoxScale:n}},{memoizeOptions:{resultEqualityCheck:ee.isEqual}}),gN=()=>{const e=Y(),{boundingBoxDimensions:t}=A(vN),{t:n}=K(),r=u=>{e(za({...t,width:Math.floor(u)}))},o=u=>{e(za({...t,height:Math.floor(u)}))},s=()=>{e(za({...t,width:Math.floor(512)}))},c=()=>{e(za({...t,height:Math.floor(512)}))};return l.jsxs(Fe,{gap:2,alignItems:"stretch",children:[l.jsx(ut,{label:n("parameters.width"),min:64,max:1024,step:64,value:t.width,onChange:r,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,inputReadOnly:!0,withReset:!0,handleReset:s}),l.jsx(ut,{label:n("parameters.height"),min:64,max:1024,step:64,value:t.height,onChange:o,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,inputReadOnly:!0,withReset:!0,handleReset:c})]})},yN=pe([Ip,Et,tt],(e,t,n)=>{const{tileSize:r,infillMethod:o}=e,{infill_methods:s}=t,{boundingBoxScaleMethod:c,scaledBoundingBoxDimensions:u}=n;return{boundingBoxScale:c,scaledBoundingBoxDimensions:u,tileSize:r,infillMethod:o,availableInfillMethods:s,isManual:c==="manual"}},{memoizeOptions:{resultEqualityCheck:ee.isEqual}}),xN=()=>{const e=Y(),{tileSize:t,infillMethod:n,availableInfillMethods:r,boundingBoxScale:o,isManual:s,scaledBoundingBoxDimensions:c}=A(yN),{t:u}=K(),f=S=>{e(xl({...c,width:Math.floor(S)}))},p=S=>{e(xl({...c,height:Math.floor(S)}))},h=()=>{e(xl({...c,width:Math.floor(512)}))},y=()=>{e(xl({...c,height:Math.floor(512)}))},x=S=>{e(mC(S.target.value))};return l.jsxs(Fe,{gap:2,alignItems:"stretch",children:[l.jsx(Mn,{label:u("parameters.scaleBeforeProcessing"),validValues:hC,value:o,onChange:x}),l.jsx(ut,{isInputDisabled:!s,isResetDisabled:!s,isSliderDisabled:!s,label:u("parameters.scaledWidth"),min:64,max:1024,step:64,value:c.width,onChange:f,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,inputReadOnly:!0,withReset:!0,handleReset:h}),l.jsx(ut,{isInputDisabled:!s,isResetDisabled:!s,isSliderDisabled:!s,label:u("parameters.scaledHeight"),min:64,max:1024,step:64,value:c.height,onChange:p,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,inputReadOnly:!0,withReset:!0,handleReset:y}),l.jsx(Mn,{label:u("parameters.infillMethod"),value:n,validValues:r,onChange:S=>e(pC(S.target.value))}),l.jsx(ut,{isInputDisabled:n!=="tile",isResetDisabled:n!=="tile",isSliderDisabled:n!=="tile",label:u("parameters.tileSize"),min:16,max:64,sliderNumberInputProps:{max:256},value:t,onChange:S=>{e(Bv(S))},withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:()=>{e(Bv(32))}})]})};function bN(){const e=Y(),t=A(r=>r.generation.seamBlur),{t:n}=K();return l.jsx(ut,{label:n("parameters.seamBlur"),min:0,max:64,sliderNumberInputProps:{max:512},value:t,onChange:r=>{e(Hv(r))},withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:()=>{e(Hv(16))}})}function SN(){const e=Y(),{t}=K(),n=A(r=>r.generation.seamSize);return l.jsx(ut,{label:t("parameters.seamSize"),min:1,max:256,sliderNumberInputProps:{max:512},value:n,onChange:r=>{e(Wv(r))},withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:()=>e(Wv(96))})}function CN(){const{t:e}=K(),t=A(r=>r.generation.seamSteps),n=Y();return l.jsx(ut,{label:e("parameters.seamSteps"),min:1,max:100,sliderNumberInputProps:{max:999},value:t,onChange:r=>{n(Vv(r))},withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:()=>{n(Vv(30))}})}function wN(){const e=Y(),{t}=K(),n=A(r=>r.generation.seamStrength);return l.jsx(ut,{label:t("parameters.seamStrength"),min:.01,max:.99,step:.01,value:n,onChange:r=>{e(Uv(r))},withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:()=>{e(Uv(.7))}})}const jN=()=>l.jsxs(Fe,{gap:2,alignItems:"stretch",children:[l.jsx(SN,{}),l.jsx(bN,{}),l.jsx(wN,{}),l.jsx(CN,{})]});function kN(){const{t:e}=K(),t={general:{header:`${e("parameters.general")}`,feature:void 0,content:l.jsx(kp,{})},unifiedCanvasImg2Img:{header:`${e("parameters.imageToImage")}`,feature:void 0,content:l.jsx($b,{label:e("parameters.img2imgStrength")})},seed:{header:`${e("parameters.seed")}`,feature:ln.SEED,content:l.jsx(Cp,{})},boundingBox:{header:`${e("parameters.boundingBoxHeader")}`,feature:ln.BOUNDING_BOX,content:l.jsx(gN,{})},seamCorrection:{header:`${e("parameters.seamCorrectionHeader")}`,feature:ln.SEAM_CORRECTION,content:l.jsx(jN,{})},infillAndScaling:{header:`${e("parameters.infillScalingHeader")}`,feature:ln.INFILL_AND_SCALING,content:l.jsx(xN,{})},variations:{header:`${e("parameters.variations")}`,feature:ln.VARIATIONS,content:l.jsx(jp,{}),additionalHeaderComponents:l.jsx(wp,{})},symmetry:{header:`${e("parameters.symmetry")}`,content:l.jsx(bp,{}),additionalHeaderComponents:l.jsx(Sp,{})}};return l.jsxs(L,{flexDir:"column",gap:2,position:"relative",children:[l.jsx(Dp,{}),l.jsx(_p,{}),l.jsx(Tp,{}),l.jsx(Ep,{accordionInfo:t})]})}function EN(){const e=A(n=>n.ui.shouldUseCanvasBetaLayout),t=A(bt);return l.jsx(pp,{parametersPanelContent:l.jsx(kN,{}),children:t==="unifiedCanvas"&&(e?l.jsx(iN,{}):l.jsx(mN,{}))})}const _i={boxSize:6},u1=[{id:"txt2img",icon:l.jsx(tn,{as:BD,sx:_i}),workarea:l.jsx(mO,{})},{id:"img2img",icon:l.jsx(tn,{as:fp,sx:_i}),workarea:l.jsx(sO,{})},{id:"unifiedCanvas",icon:l.jsx(tn,{as:VD,sx:_i}),workarea:l.jsx(EN,{})},{id:"nodes",icon:l.jsx(tn,{as:HD,sx:_i}),workarea:l.jsx(XD,{})},{id:"postprocessing",icon:l.jsx(tn,{as:UD,sx:_i}),workarea:l.jsx(QD,{})},{id:"training",icon:l.jsx(tn,{as:WD,sx:_i}),workarea:l.jsx(ZD,{})}];function PN(){const e=A(eE),t=A(f=>f.lightbox.isLightboxOpen),n=A(f=>f.ui.shouldPinGallery),r=A(f=>f.ui.shouldPinParametersPanel),{t:o}=K(),s=Y();ce("1",()=>{s(kn(0))}),ce("2",()=>{s(kn(1))}),ce("3",()=>{s(kn(2))}),ce("4",()=>{s(kn(3))}),ce("5",()=>{s(kn(4))}),ce("6",()=>{s(kn(5))}),ce("z",()=>{s(Uo(!t))},[t]),ce("f",()=>{s(vC()),(n||r)&&s(cn())},[n,r]);const c=g.useMemo(()=>u1.map(f=>l.jsx(Gt,{hasArrow:!0,label:String(o(`common.${f.id}`)),placement:"end",children:l.jsxs(yx,{children:[l.jsx(w2,{children:String(o(`common.${f.id}`))}),f.icon]})},f.id)),[o]),u=g.useMemo(()=>u1.map(f=>l.jsx(vx,{children:f.workarea},f.id)),[]);return l.jsxs(px,{defaultIndex:e,index:e,onChange:f=>{s(kn(f))},flexGrow:1,children:[l.jsx(mx,{children:c}),l.jsx(gx,{children:u})]})}function IN(){async function e(n=""){return await fetch(n,{method:"GET",cache:"no-cache"})}const t=()=>{const n=document.location;e(n+"/flaskwebgui-keep-server-alive").then(o=>o)};(!{}.NODE_ENV||{}.NODE_ENV==="production")&&document.addEventListener("DOMContentLoaded",()=>{t(),setInterval(t,3e3)})}const MN=()=>{const e=Y(),t=A(Y9),n=ls();g.useEffect(()=>{t.forEach(r=>{n(r)}),t.length>0&&e(gC())},[e,n,t])},TN=pe([bt,Pr],(e,t)=>{const{shouldPinGallery:n,shouldShowGallery:r}=t;return{shouldPinGallery:n,shouldShowGalleryButton:(!n||!r)&&["txt2img","img2img","unifiedCanvas"].includes(e)}},{memoizeOptions:{resultEqualityCheck:ee.isEqual}}),_N=()=>{const{t:e}=K(),{shouldPinGallery:t,shouldShowGalleryButton:n}=A(TN),r=Y(),o=()=>{r(cf(!0)),t&&r(cn())};return n?l.jsx(ae,{tooltip:"Show Gallery (G)",tooltipProps:{placement:"top"},"aria-label":e("accessibility.showGallery"),onClick:o,sx:{pos:"absolute",top:"50%",transform:"translate(0, -50%)",zIndex:31,p:0,insetInlineEnd:0,px:3,h:48,w:8,borderStartEndRadius:0,borderEndEndRadius:0},children:l.jsx(fp,{})}):null},qd={borderStartStartRadius:0,borderEndStartRadius:0},DN=pe([Pr,bt],(e,t)=>{const{shouldPinParametersPanel:n,shouldUseCanvasBetaLayout:r,shouldShowParametersPanel:o}=e,s=r&&t==="unifiedCanvas",c=!s&&(!n||!o),u=!s&&(!n||!o)&&["txt2img","img2img","unifiedCanvas"].includes(t);return{shouldPinParametersPanel:n,shouldShowParametersPanelButton:u,shouldShowProcessButtons:c}},{memoizeOptions:{resultEqualityCheck:ee.isEqual}}),AN=()=>{const e=Y(),{t}=K(),{shouldShowProcessButtons:n,shouldShowParametersPanelButton:r,shouldPinParametersPanel:o}=A(DN),s=()=>{e(ql(!0)),o&&e(cn())};return r?l.jsxs(L,{pos:"absolute",transform:"translate(0, -50%)",zIndex:20,minW:8,top:"50%",insetInlineStart:"4.5rem",direction:"column",gap:2,children:[l.jsx(ae,{tooltip:"Show Options Panel (O)",tooltipProps:{placement:"top"},"aria-label":t("accessibility.showOptionsPanel"),onClick:s,sx:qd,children:l.jsx(ep,{})}),n&&l.jsxs(l.Fragment,{children:[l.jsx(Mp,{iconButton:!0,sx:qd}),l.jsx(Pp,{sx:qd})]})]}):null};var Va=globalThis&&globalThis.__assign||function(){return Va=Object.assign||function(e){for(var t,n=1,r=arguments.length;ne.image.uuid===t.image.uuid&&e.isSelected===t.isSelected,d4=g.memo(e=>{const t=Y(),{activeTabName:n,galleryImageObjectFit:r,galleryImageMinimumWidth:o,mayDeleteImage:s,shouldUseSingleGalleryColumn:c}=A(eA),{image:u,isSelected:f}=e,{url:p,thumbnail:h,uuid:y,metadata:x}=u,[S,j]=g.useState(!1),C=ls(),{direction:w}=ta(),{t:k}=K(),I=yp(),P=()=>j(!0),M=()=>j(!1),T=()=>{var X,te,re,$;(te=(X=u.metadata)==null?void 0:X.image)!=null&&te.prompt&&I(($=(re=u.metadata)==null?void 0:re.image)==null?void 0:$.prompt),C({title:k("toast.promptSet"),status:"success",duration:2500,isClosable:!0})},D=()=>{u.metadata&&t(is(u.metadata.image.seed)),C({title:k("toast.seedSet"),status:"success",duration:2500,isClosable:!0})},_=()=>{t(rs(u)),n!=="img2img"&&t(kn("img2img")),C({title:k("toast.sentToImageToImage"),status:"success",duration:2500,isClosable:!0})},R=()=>{t(bc(u)),t(Sc()),n!=="unifiedCanvas"&&t(kn("unifiedCanvas")),C({title:k("toast.sentToUnifiedCanvas"),status:"success",duration:2500,isClosable:!0})},V=()=>{x&&t(A1(x)),C({title:k("toast.parametersSet"),status:"success",duration:2500,isClosable:!0})},F=async()=>{var X;if((X=x==null?void 0:x.image)!=null&&X.init_image_path&&(await fetch(x.image.init_image_path)).ok){t(kn("img2img")),t(yC(x)),C({title:k("toast.initialImageSet"),status:"success",duration:2500,isClosable:!0});return}C({title:k("toast.initialImageNotSet"),description:k("toast.initialImageNotSetDesc"),status:"error",duration:2500,isClosable:!0})},B=()=>t($v(u)),Q=X=>{X.dataTransfer.setData("invokeai/imageUuid",y),X.dataTransfer.effectAllowed="move"},U=()=>{t($v(u)),t(Uo(!0))};return l.jsx(ON,{menuProps:{size:"sm",isLazy:!0},renderMenu:()=>{var X,te,re,$,Z,fe,Se,Me;return l.jsxs(Oh,{children:[l.jsx(gr,{onClickCapture:U,children:k("parameters.openInViewer")}),l.jsx(gr,{onClickCapture:T,isDisabled:((te=(X=u==null?void 0:u.metadata)==null?void 0:X.image)==null?void 0:te.prompt)===void 0,children:k("parameters.usePrompt")}),l.jsx(gr,{onClickCapture:D,isDisabled:(($=(re=u==null?void 0:u.metadata)==null?void 0:re.image)==null?void 0:$.seed)===void 0,children:k("parameters.useSeed")}),l.jsx(gr,{onClickCapture:V,isDisabled:!["txt2img","img2img"].includes((fe=(Z=u==null?void 0:u.metadata)==null?void 0:Z.image)==null?void 0:fe.type),children:k("parameters.useAll")}),l.jsx(gr,{onClickCapture:F,isDisabled:((Me=(Se=u==null?void 0:u.metadata)==null?void 0:Se.image)==null?void 0:Me.type)!=="img2img",children:k("parameters.useInitImg")}),l.jsx(gr,{onClickCapture:_,children:k("parameters.sendToImg2Img")}),l.jsx(gr,{onClickCapture:R,children:k("parameters.sendToUnifiedCanvas")}),l.jsx(gr,{"data-warning":!0,children:l.jsx(hc,{image:u,children:l.jsx("p",{children:k("parameters.deleteImage")})})})]})},children:X=>l.jsxs(Ye,{position:"relative",onMouseOver:P,onMouseOut:M,userSelect:"none",draggable:!0,onDragStart:Q,ref:X,sx:{padding:2,display:"flex",justifyContent:"center",transition:"transform 0.2s ease-out",_hover:{cursor:"pointer",zIndex:2},_before:{content:'""',display:"block",paddingBottom:"100%"}},children:[l.jsx(cs,{objectFit:c?"contain":r,rounded:"md",src:h||p,loading:"lazy",sx:{position:"absolute",width:"100%",height:"100%",maxWidth:"100%",maxHeight:"100%",top:"50%",transform:"translate(-50%,-50%)",...w==="rtl"?{insetInlineEnd:"50%"}:{insetInlineStart:"50%"}}}),l.jsx(L,{onClick:B,sx:{position:"absolute",top:"0",insetInlineStart:"0",width:"100%",height:"100%",alignItems:"center",justifyContent:"center"},children:f&&l.jsx(tn,{as:Oc,sx:{width:"50%",height:"50%",fill:"ok.500"}})}),S&&o>=64&&l.jsx(Ye,{sx:{position:"absolute",top:1,insetInlineEnd:1},children:l.jsx(hc,{image:u,children:l.jsx(ae,{"aria-label":k("parameters.deleteImage"),icon:l.jsx($9,{}),size:"xs",fontSize:14,isDisabled:!s})})})]},y)})},zN);d4.displayName="HoverableImage";const RN=290,f4=()=>{const e=Y(),{t}=K(),n=g.useRef(null),[r,o]=g.useState(!0),{images:s,currentCategory:c,currentImageUuid:u,shouldPinGallery:f,galleryImageMinimumWidth:p,galleryGridTemplateColumns:h,galleryImageObjectFit:y,shouldAutoSwitchToNewImages:x,areMoreImagesAvailable:S,shouldUseSingleGalleryColumn:j}=A(JD),C=()=>{e(CC(c))},w=I=>{e(Zl(I))},k=()=>{e(d2()),e(cn())};return g.useEffect(()=>{if(!n.current)return;const I=new ResizeObserver(()=>{if(n.current){if(n.current.clientWidthI.disconnect()},[]),l.jsxs(L,{flexDirection:"column",w:"full",h:"full",gap:4,children:[l.jsxs(L,{ref:n,alignItems:"center",justifyContent:"space-between",children:[l.jsx(Qt,{size:"sm",isAttached:!0,w:"max-content",justifyContent:"stretch",children:r?l.jsxs(l.Fragment,{children:[l.jsx(ae,{"aria-label":t("gallery.showGenerations"),tooltip:t("gallery.showGenerations"),isChecked:c==="result",role:"radio",icon:l.jsx(A9,{}),onClick:()=>e(bl("result"))}),l.jsx(ae,{"aria-label":t("gallery.showUploads"),tooltip:t("gallery.showUploads"),role:"radio",isChecked:c==="user",icon:l.jsx(q9,{}),onClick:()=>e(bl("user"))})]}):l.jsxs(l.Fragment,{children:[l.jsx(Je,{size:"sm",isChecked:c==="result",onClick:()=>e(bl("result")),flexGrow:1,children:t("gallery.generations")}),l.jsx(Je,{size:"sm",isChecked:c==="user",onClick:()=>e(bl("user")),flexGrow:1,children:t("gallery.uploads")})]})}),l.jsxs(L,{gap:2,children:[l.jsx(or,{triggerComponent:l.jsx(ae,{size:"sm","aria-label":t("gallery.gallerySettings"),icon:l.jsx(tp,{})}),children:l.jsxs(L,{direction:"column",gap:2,children:[l.jsx(ut,{value:p,onChange:w,min:32,max:256,hideTooltip:!0,label:t("gallery.galleryImageSize"),withReset:!0,handleReset:()=>e(Zl(64))}),l.jsx(ft,{label:t("gallery.maintainAspectRatio"),isChecked:y==="contain",onChange:()=>e(xC(y==="contain"?"cover":"contain"))}),l.jsx(ft,{label:t("gallery.autoSwitchNewImages"),isChecked:x,onChange:I=>e(bC(I.target.checked))}),l.jsx(ft,{label:t("gallery.singleColumnLayout"),isChecked:j,onChange:I=>e(SC(I.target.checked))})]})}),l.jsx(ae,{size:"sm","aria-label":t("gallery.pinGallery"),tooltip:`${t("gallery.pinGallery")} (Shift+G)`,onClick:k,icon:f?l.jsx(Ob,{}):l.jsx(zb,{})})]})]}),l.jsx(Ab,{children:l.jsx(L,{direction:"column",gap:2,h:"full",children:s.length||S?l.jsxs(l.Fragment,{children:[l.jsx(ir,{gap:2,style:{gridTemplateColumns:h},children:s.map(I=>{const{uuid:P}=I,M=u===P;return l.jsx(d4,{image:I,isSelected:M},P)})}),l.jsx(Je,{onClick:C,isDisabled:!S,flexShrink:0,children:t(S?"gallery.loadMore":"gallery.allImagesLoaded")})]}):l.jsxs(L,{sx:{flexDirection:"column",alignItems:"center",justifyContent:"center",gap:2,padding:8,h:"100%",w:"100%",color:"base.500"},children:[l.jsx(tn,{as:fp,sx:{w:16,h:16}}),l.jsx(Ce,{textAlign:"center",children:t("gallery.noImagesInGallery")})]})})})]})};f4.displayName="ImageGalleryContent";const d1={txt2img:{galleryMinWidth:200,galleryMaxWidth:500},img2img:{galleryMinWidth:200,galleryMaxWidth:500},unifiedCanvas:{galleryMinWidth:200,galleryMaxWidth:200},nodes:{galleryMinWidth:200,galleryMaxWidth:500},postprocessing:{galleryMinWidth:200,galleryMaxWidth:500},training:{galleryMinWidth:200,galleryMaxWidth:500}},NN=pe([bt,Pr,qr,Ot,Ss],(e,t,n,r,o)=>{const{shouldPinGallery:s,shouldShowGallery:c}=t,{galleryImageMinimumWidth:u}=n,{isLightboxOpen:f}=o;return{activeTabName:e,isStaging:r,shouldPinGallery:s,shouldShowGallery:c,galleryImageMinimumWidth:u,isResizable:e!=="unifiedCanvas",isLightboxOpen:f}},{memoizeOptions:{resultEqualityCheck:ee.isEqual}});function FN(){const e=Y(),{shouldPinGallery:t,shouldShowGallery:n,galleryImageMinimumWidth:r,activeTabName:o,isStaging:s,isResizable:c,isLightboxOpen:u}=A(NN),f=()=>{e(d2()),e(cn())},p=()=>{e(wC()),t&&e(cn())},h=()=>{e(cf(!1)),t&&e(cn())};ce("g",()=>{p()},[t]),ce("left",()=>{e(B1())},{enabled:!s||o!=="unifiedCanvas"},[s,o]),ce("right",()=>{e(H1())},{enabled:!s||o!=="unifiedCanvas"},[s,o]),ce("shift+g",()=>{f()},[t]),ce("esc",()=>{e(cf(!1))},{enabled:()=>!t,preventDefault:!0},[t]);const y=32;return ce("shift+up",()=>{if(r<256){const x=ee.clamp(r+y,32,256);e(Zl(x))}},[r]),ce("shift+down",()=>{if(r>32){const x=ee.clamp(r-y,32,256);e(Zl(x))}},[r]),l.jsx(Db,{direction:"right",isResizable:c||!t,isOpen:n,onClose:h,isPinned:t&&!u,minWidth:t?d1[o].galleryMinWidth:200,maxWidth:t?d1[o].galleryMaxWidth:void 0,children:l.jsx(f4,{})})}var Hn=function(e,t){return Number(e.toFixed(t))},LN=function(e,t){return typeof e=="number"?e:t},Mt=function(e,t,n){n&&typeof n=="function"&&n(e,t)},BN=function(e){return-Math.cos(e*Math.PI)/2+.5},HN=function(e){return e},WN=function(e){return e*e},VN=function(e){return e*(2-e)},UN=function(e){return e<.5?2*e*e:-1+(4-2*e)*e},$N=function(e){return e*e*e},GN=function(e){return--e*e*e+1},qN=function(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1},YN=function(e){return e*e*e*e},KN=function(e){return 1- --e*e*e*e},XN=function(e){return e<.5?8*e*e*e*e:1-8*--e*e*e*e},QN=function(e){return e*e*e*e*e},ZN=function(e){return 1+--e*e*e*e*e},JN=function(e){return e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e},h4={easeOut:BN,linear:HN,easeInQuad:WN,easeOutQuad:VN,easeInOutQuad:UN,easeInCubic:$N,easeOutCubic:GN,easeInOutCubic:qN,easeInQuart:YN,easeOutQuart:KN,easeInOutQuart:XN,easeInQuint:QN,easeOutQuint:ZN,easeInOutQuint:JN},p4=function(e){typeof e=="number"&&cancelAnimationFrame(e)},br=function(e){e.mounted&&(p4(e.animation),e.animate=!1,e.animation=null,e.velocity=null)};function m4(e,t,n,r){if(e.mounted){var o=new Date().getTime(),s=1;br(e),e.animation=function(){if(!e.mounted)return p4(e.animation);var c=new Date().getTime()-o,u=c/n,f=h4[t],p=f(u);c>=n?(r(s),e.animation=null):e.animation&&(r(p),requestAnimationFrame(e.animation))},requestAnimationFrame(e.animation)}}function eF(e){var t=e.scale,n=e.positionX,r=e.positionY;return!(Number.isNaN(t)||Number.isNaN(n)||Number.isNaN(r))}function jo(e,t,n,r){var o=eF(t);if(!(!e.mounted||!o)){var s=e.setTransformState,c=e.transformState,u=c.scale,f=c.positionX,p=c.positionY,h=t.scale-u,y=t.positionX-f,x=t.positionY-p;n===0?s(t.scale,t.positionX,t.positionY):m4(e,r,n,function(S){var j=u+h*S,C=f+y*S,w=p+x*S;s(j,C,w)})}}function tF(e,t,n){var r=e.offsetWidth,o=e.offsetHeight,s=t.offsetWidth,c=t.offsetHeight,u=s*n,f=c*n,p=r-u,h=o-f;return{wrapperWidth:r,wrapperHeight:o,newContentWidth:u,newDiffWidth:p,newContentHeight:f,newDiffHeight:h}}var nF=function(e,t,n,r,o,s,c){var u=e>t?n*(c?1:.5):0,f=r>o?s*(c?1:.5):0,p=e-t-u,h=u,y=r-o-f,x=f;return{minPositionX:p,maxPositionX:h,minPositionY:y,maxPositionY:x}},Fp=function(e,t){var n=e.wrapperComponent,r=e.contentComponent,o=e.setup.centerZoomedOut;if(!n||!r)throw new Error("Components are not mounted");var s=tF(n,r,t),c=s.wrapperWidth,u=s.wrapperHeight,f=s.newContentWidth,p=s.newDiffWidth,h=s.newContentHeight,y=s.newDiffHeight,x=nF(c,f,p,u,h,y,Boolean(o));return x},Xf=function(e,t,n,r){return r?en?Hn(n,2):Hn(e,2):Hn(e,2)},ea=function(e,t){var n=Fp(e,t);return e.bounds=n,n};function Gc(e,t,n,r,o,s,c){var u=n.minPositionX,f=n.minPositionY,p=n.maxPositionX,h=n.maxPositionY,y=0,x=0;c&&(y=o,x=s);var S=Xf(e,u-y,p+y,r),j=Xf(t,f-x,h+x,r);return{x:S,y:j}}function qc(e,t,n,r,o,s){var c=e.transformState,u=c.scale,f=c.positionX,p=c.positionY,h=r-u;if(typeof t!="number"||typeof n!="number")return console.error("Mouse X and Y position were not provided!"),{x:f,y:p};var y=f-t*h,x=p-n*h,S=Gc(y,x,o,s,0,0,null);return S}function Cs(e,t,n,r,o){var s=o?r:0,c=t-s;return!Number.isNaN(n)&&e>=n?n:!Number.isNaN(t)&&e<=c?c:e}var f1=function(e,t){var n=e.setup.panning.excluded,r=e.isInitialized,o=e.wrapperComponent,s=t.target,c=o==null?void 0:o.contains(s),u=r&&s&&c;if(!u)return!1;var f=Yc(s,n);return!f},h1=function(e){var t=e.isInitialized,n=e.isPanning,r=e.setup,o=r.panning.disabled,s=t&&n&&!o;return!!s},rF=function(e,t){var n=e.transformState,r=n.positionX,o=n.positionY;e.isPanning=!0;var s=t.clientX,c=t.clientY;e.startCoords={x:s-r,y:c-o}},oF=function(e,t){var n=t.touches,r=e.transformState,o=r.positionX,s=r.positionY;e.isPanning=!0;var c=n.length===1;if(c){var u=n[0].clientX,f=n[0].clientY;e.startCoords={x:u-o,y:f-s}}};function iF(e){var t=e.transformState,n=t.positionX,r=t.positionY,o=t.scale,s=e.setup,c=s.disabled,u=s.limitToBounds,f=s.centerZoomedOut,p=e.wrapperComponent;if(!(c||!p||!e.bounds)){var h=e.bounds,y=h.maxPositionX,x=h.minPositionX,S=h.maxPositionY,j=h.minPositionY,C=n>y||nS||ry?p.offsetWidth:e.setup.minPositionX||0,I=r>S?p.offsetHeight:e.setup.minPositionY||0,P=qc(e,k,I,o,e.bounds,u||f),M=P.x,T=P.y;return{scale:o,positionX:C?M:n,positionY:w?T:r}}}function aF(e,t,n,r,o){var s=e.setup.limitToBounds,c=e.wrapperComponent,u=e.bounds,f=e.transformState,p=f.scale,h=f.positionX,y=f.positionY;if(!(c===null||u===null||t===h&&n===y)){var x=Gc(t,n,u,s,r,o,c),S=x.x,j=x.y;e.setTransformState(p,S,j)}}var sF=function(e,t,n){var r=e.startCoords,o=e.transformState,s=e.setup.panning,c=s.lockAxisX,u=s.lockAxisY,f=o.positionX,p=o.positionY;if(!r)return{x:f,y:p};var h=t-r.x,y=n-r.y,x=c?f:h,S=u?p:y;return{x,y:S}},gc=function(e,t){var n=e.setup,r=e.transformState,o=r.scale,s=n.minScale,c=n.disablePadding;return t>0&&o>=s&&!c?t:0},lF=function(e){var t=e.mounted,n=e.setup,r=n.disabled,o=n.velocityAnimation,s=e.transformState.scale,c=o.disabled,u=!c||s>1||!r||t;return!!u},cF=function(e){var t=e.mounted,n=e.velocity,r=e.bounds,o=e.setup,s=o.disabled,c=o.velocityAnimation,u=e.transformState.scale,f=c.disabled,p=!f||u>1||!s||t;return!(!p||!n||!r)};function uF(e,t){var n=e.setup.velocityAnimation,r=n.equalToMove,o=n.animationTime,s=n.sensitivity;return r?o*t*s:o}function p1(e,t,n,r,o,s,c,u,f,p){if(o){if(t>c&&n>c){var h=c+(e-c)*p;return h>f?f:hs?s:h}}return r?t:Xf(e,s,c,o)}function dF(e,t){var n=1;return t?Math.min(n,e.offsetWidth/window.innerWidth):n}function fF(e,t){var n=lF(e);if(n){var r=e.lastMousePosition,o=e.velocityTime,s=e.setup,c=e.wrapperComponent,u=s.velocityAnimation.equalToMove,f=Date.now();if(r&&o&&c){var p=dF(c,u),h=t.x-r.x,y=t.y-r.y,x=h/p,S=y/p,j=f-o,C=h*h+y*y,w=Math.sqrt(C)/j;e.velocity={velocityX:x,velocityY:S,total:w}}e.lastMousePosition=t,e.velocityTime=f}}function hF(e){var t=e.velocity,n=e.bounds,r=e.setup,o=e.wrapperComponent,s=cF(e);if(!(!s||!t||!n||!o)){var c=t.velocityX,u=t.velocityY,f=t.total,p=n.maxPositionX,h=n.minPositionX,y=n.maxPositionY,x=n.minPositionY,S=r.limitToBounds,j=r.alignmentAnimation,C=r.zoomAnimation,w=r.panning,k=w.lockAxisY,I=w.lockAxisX,P=C.animationType,M=j.sizeX,T=j.sizeY,D=j.velocityAlignmentTime,_=D,R=uF(e,f),V=Math.max(R,_),F=gc(e,M),B=gc(e,T),Q=F*o.offsetWidth/100,U=B*o.offsetHeight/100,X=p+Q,te=h-Q,re=y+U,$=x-U,Z=e.transformState,fe=new Date().getTime();m4(e,P,V,function(Se){var Me=e.transformState,Ie=Me.scale,Pe=Me.positionX,he=Me.positionY,se=new Date().getTime()-fe,Ne=se/_,Ve=h4[j.animationType],Ue=1-Ve(Math.min(1,Ne)),$e=1-Se,Qe=Pe+c*$e,me=he+u*$e,De=p1(Qe,Z.positionX,Pe,I,S,h,p,te,X,Ue),Ge=p1(me,Z.positionY,he,k,S,x,y,$,re,Ue);(Pe!==Qe||he!==me)&&e.setTransformState(Ie,De,Ge)})}}function m1(e,t){var n=e.transformState.scale;br(e),ea(e,n),window.TouchEvent!==void 0&&t instanceof TouchEvent?oF(e,t):rF(e,t)}function v4(e){var t=e.transformState.scale,n=e.setup,r=n.minScale,o=n.alignmentAnimation,s=o.disabled,c=o.sizeX,u=o.sizeY,f=o.animationTime,p=o.animationType,h=s||t.1&&y;x?hF(e):v4(e)}}function Lp(e,t,n,r){var o=e.setup,s=o.minScale,c=o.maxScale,u=o.limitToBounds,f=Cs(Hn(t,2),s,c,0,!1),p=ea(e,f),h=qc(e,n,r,f,p,u),y=h.x,x=h.y;return{scale:f,positionX:y,positionY:x}}function g4(e,t,n){var r=e.transformState.scale,o=e.wrapperComponent,s=e.setup,c=s.minScale,u=s.limitToBounds,f=s.zoomAnimation,p=f.disabled,h=f.animationTime,y=f.animationType,x=p||r>=c;if((r>=1||u)&&v4(e),!(x||!o||!e.mounted)){var S=t||o.offsetWidth/2,j=n||o.offsetHeight/2,C=Lp(e,c,S,j);C&&jo(e,C,h,y)}}var fo=function(){return fo=Object.assign||function(t){for(var n,r=1,o=arguments.length;rc||Math.sign(n.deltaY)!==Math.sign(t.deltaY)||n.deltaY>0&&n.deltaYt.deltaY||Math.sign(n.deltaY)!==Math.sign(t.deltaY):!1},TF=function(e,t){var n=e.setup.pinch,r=n.disabled,o=n.excluded,s=e.isInitialized,c=t.target,u=s&&!r&&c;if(!u)return!1;var f=Yc(c,o);return!f},_F=function(e){var t=e.setup.pinch.disabled,n=e.isInitialized,r=e.pinchStartDistance,o=n&&!t&&r;return!!o},DF=function(e,t,n){var r=n.getBoundingClientRect(),o=e.touches,s=Hn(o[0].clientX-r.left,5),c=Hn(o[0].clientY-r.top,5),u=Hn(o[1].clientX-r.left,5),f=Hn(o[1].clientY-r.top,5);return{x:(s+u)/2/t,y:(c+f)/2/t}},j4=function(e){return Math.sqrt(Math.pow(e.touches[0].pageX-e.touches[1].pageX,2)+Math.pow(e.touches[0].pageY-e.touches[1].pageY,2))},AF=function(e,t){var n=e.pinchStartScale,r=e.pinchStartDistance,o=e.setup,s=o.maxScale,c=o.minScale,u=o.zoomAnimation,f=o.disablePadding,p=u.size,h=u.disabled;if(!n||r===null||!t)throw new Error("Pinch touches distance was not provided");if(t<0)return e.transformState.scale;var y=t/r,x=y*n;return Cs(Hn(x,2),c,s,p,!h&&!f)},OF=160,zF=100,RF=function(e,t){var n=e.props,r=n.onWheelStart,o=n.onZoomStart;e.wheelStopEventTimer||(br(e),Mt(dt(e),t,r),Mt(dt(e),t,o))},NF=function(e,t){var n=e.props,r=n.onWheel,o=n.onZoom,s=e.contentComponent,c=e.setup,u=e.transformState,f=u.scale,p=c.limitToBounds,h=c.centerZoomedOut,y=c.zoomAnimation,x=c.wheel,S=c.disablePadding,j=y.size,C=y.disabled,w=x.step;if(!s)throw new Error("Component not mounted");t.preventDefault(),t.stopPropagation();var k=PF(t,null),I=IF(e,k,w,!t.ctrlKey);if(f!==I){var P=ea(e,I),M=w4(t,s,f),T=C||j===0||h||S,D=p&&T,_=qc(e,M.x,M.y,I,P,D),R=_.x,V=_.y;e.previousWheelEvent=t,e.setTransformState(I,R,V),Mt(dt(e),t,r),Mt(dt(e),t,o)}},FF=function(e,t){var n=e.props,r=n.onWheelStop,o=n.onZoomStop;Qf(e.wheelAnimationTimer),e.wheelAnimationTimer=setTimeout(function(){e.mounted&&(g4(e,t.x,t.y),e.wheelAnimationTimer=null)},zF);var s=MF(e,t);s&&(Qf(e.wheelStopEventTimer),e.wheelStopEventTimer=setTimeout(function(){e.mounted&&(e.wheelStopEventTimer=null,Mt(dt(e),t,r),Mt(dt(e),t,o))},OF))},LF=function(e,t){var n=j4(t);e.pinchStartDistance=n,e.lastDistance=n,e.pinchStartScale=e.transformState.scale,e.isPanning=!1,br(e)},BF=function(e,t){var n=e.contentComponent,r=e.pinchStartDistance,o=e.transformState.scale,s=e.setup,c=s.limitToBounds,u=s.centerZoomedOut,f=s.zoomAnimation,p=f.disabled,h=f.size;if(!(r===null||!n)){var y=DF(t,o,n);if(!(!Number.isFinite(y.x)||!Number.isFinite(y.y))){var x=j4(t),S=AF(e,x);if(S!==o){var j=ea(e,S),C=p||h===0||u,w=c&&C,k=qc(e,y.x,y.y,S,j,w),I=k.x,P=k.y;e.pinchMidpoint=y,e.lastDistance=x,e.setTransformState(S,I,P)}}}},HF=function(e){var t=e.pinchMidpoint;e.velocity=null,e.lastDistance=null,e.pinchMidpoint=null,e.pinchStartScale=null,e.pinchStartDistance=null,g4(e,t==null?void 0:t.x,t==null?void 0:t.y)},k4=function(e,t){var n=e.props.onZoomStop,r=e.setup.doubleClick.animationTime;Qf(e.doubleClickStopEventTimer),e.doubleClickStopEventTimer=setTimeout(function(){e.doubleClickStopEventTimer=null,Mt(dt(e),t,n)},r)},WF=function(e,t){var n=e.props,r=n.onZoomStart,o=n.onZoom,s=e.setup.doubleClick,c=s.animationTime,u=s.animationType;Mt(dt(e),t,r),S4(e,c,u,function(){return Mt(dt(e),t,o)}),k4(e,t)};function VF(e,t){var n=e.setup,r=e.doubleClickStopEventTimer,o=e.transformState,s=e.contentComponent,c=o.scale,u=e.props,f=u.onZoomStart,p=u.onZoom,h=n.doubleClick,y=h.disabled,x=h.mode,S=h.step,j=h.animationTime,C=h.animationType;if(!y&&!r){if(x==="reset")return WF(e,t);if(!s)return console.error("No ContentComponent found");var w=x==="zoomOut"?-1:1,k=x4(e,w,S);if(c!==k){Mt(dt(e),t,f);var I=w4(t,s,c),P=Lp(e,k,I.x,I.y);if(!P)return console.error("Error during zoom event. New transformation state was not calculated.");Mt(dt(e),t,p),jo(e,P,j,C),k4(e,t)}}}var UF=function(e,t){var n=e.isInitialized,r=e.setup,o=e.wrapperComponent,s=r.doubleClick,c=s.disabled,u=s.excluded,f=t.target,p=o==null?void 0:o.contains(f),h=n&&f&&p&&!c;if(!h)return!1;var y=Yc(f,u);return!y},$F=function(){function e(t){var n=this;this.mounted=!0,this.onChangeCallbacks=new Set,this.wrapperComponent=null,this.contentComponent=null,this.isInitialized=!1,this.bounds=null,this.previousWheelEvent=null,this.wheelStopEventTimer=null,this.wheelAnimationTimer=null,this.isPanning=!1,this.startCoords=null,this.lastTouch=null,this.distance=null,this.lastDistance=null,this.pinchStartDistance=null,this.pinchStartScale=null,this.pinchMidpoint=null,this.doubleClickStopEventTimer=null,this.velocity=null,this.velocityTime=null,this.lastMousePosition=null,this.animate=!1,this.animation=null,this.maxBounds=null,this.pressedKeys={},this.mount=function(){n.initializeWindowEvents()},this.unmount=function(){n.cleanupWindowEvents()},this.update=function(r){ea(n,n.transformState.scale),n.setup=y1(r)},this.initializeWindowEvents=function(){var r,o=Kd(),s=(r=n.wrapperComponent)===null||r===void 0?void 0:r.ownerDocument,c=s==null?void 0:s.defaultView;c==null||c.addEventListener("mousedown",n.onPanningStart,o),c==null||c.addEventListener("mousemove",n.onPanning,o),c==null||c.addEventListener("mouseup",n.onPanningStop,o),s==null||s.addEventListener("mouseleave",n.clearPanning,o),c==null||c.addEventListener("keyup",n.setKeyUnPressed,o),c==null||c.addEventListener("keydown",n.setKeyPressed,o)},this.cleanupWindowEvents=function(){var r,o,s=Kd(),c=(r=n.wrapperComponent)===null||r===void 0?void 0:r.ownerDocument,u=c==null?void 0:c.defaultView;u==null||u.removeEventListener("mousedown",n.onPanningStart,s),u==null||u.removeEventListener("mousemove",n.onPanning,s),u==null||u.removeEventListener("mouseup",n.onPanningStop,s),c==null||c.removeEventListener("mouseleave",n.clearPanning,s),u==null||u.removeEventListener("keyup",n.setKeyUnPressed,s),u==null||u.removeEventListener("keydown",n.setKeyPressed,s),document.removeEventListener("mouseleave",n.clearPanning,s),br(n),(o=n.observer)===null||o===void 0||o.disconnect()},this.handleInitializeWrapperEvents=function(r){var o=Kd();r.addEventListener("wheel",n.onWheelZoom,o),r.addEventListener("dblclick",n.onDoubleClick,o),r.addEventListener("touchstart",n.onTouchPanningStart,o),r.addEventListener("touchmove",n.onTouchPanning,o),r.addEventListener("touchend",n.onTouchPanningStop,o)},this.handleInitialize=function(r){var o=n.setup.centerOnInit;n.applyTransformation(),o&&(n.setCenter(),n.observer=new ResizeObserver(function(){var s;n.setCenter(),(s=n.observer)===null||s===void 0||s.disconnect()}),n.observer.observe(r))},this.onWheelZoom=function(r){var o=n.setup.disabled;if(!o){var s=kF(n,r);if(s){var c=n.isPressingKeys(n.setup.wheel.activationKeys);c&&(RF(n,r),NF(n,r),FF(n,r))}}},this.onPanningStart=function(r){var o=n.setup.disabled,s=n.props.onPanningStart;if(!o){var c=f1(n,r);if(c){var u=n.isPressingKeys(n.setup.panning.activationKeys);u&&(r.preventDefault(),r.stopPropagation(),br(n),m1(n,r),Mt(dt(n),r,s))}}},this.onPanning=function(r){var o=n.setup.disabled,s=n.props.onPanning;if(!o){var c=h1(n);if(c){var u=n.isPressingKeys(n.setup.panning.activationKeys);u&&(r.preventDefault(),r.stopPropagation(),v1(n,r.clientX,r.clientY),Mt(dt(n),r,s))}}},this.onPanningStop=function(r){var o=n.props.onPanningStop;n.isPanning&&(pF(n),Mt(dt(n),r,o))},this.onPinchStart=function(r){var o=n.setup.disabled,s=n.props,c=s.onPinchingStart,u=s.onZoomStart;if(!o){var f=TF(n,r);f&&(LF(n,r),br(n),Mt(dt(n),r,c),Mt(dt(n),r,u))}},this.onPinch=function(r){var o=n.setup.disabled,s=n.props,c=s.onPinching,u=s.onZoom;if(!o){var f=_F(n);f&&(r.preventDefault(),r.stopPropagation(),BF(n,r),Mt(dt(n),r,c),Mt(dt(n),r,u))}},this.onPinchStop=function(r){var o=n.props,s=o.onPinchingStop,c=o.onZoomStop;n.pinchStartScale&&(HF(n),Mt(dt(n),r,s),Mt(dt(n),r,c))},this.onTouchPanningStart=function(r){var o=n.setup.disabled,s=n.props.onPanningStart;if(!o){var c=f1(n,r);if(c){var u=n.lastTouch&&+new Date-n.lastTouch<200;if(u&&r.touches.length===1)n.onDoubleClick(r);else{n.lastTouch=+new Date,br(n);var f=r.touches,p=f.length===1,h=f.length===2;p&&(br(n),m1(n,r),Mt(dt(n),r,s)),h&&n.onPinchStart(r)}}}},this.onTouchPanning=function(r){var o=n.setup.disabled,s=n.props.onPanning;if(n.isPanning&&r.touches.length===1){if(o)return;var c=h1(n);if(!c)return;r.preventDefault(),r.stopPropagation();var u=r.touches[0];v1(n,u.clientX,u.clientY),Mt(dt(n),r,s)}else r.touches.length>1&&n.onPinch(r)},this.onTouchPanningStop=function(r){n.onPanningStop(r),n.onPinchStop(r)},this.onDoubleClick=function(r){var o=n.setup.disabled;if(!o){var s=UF(n,r);s&&VF(n,r)}},this.clearPanning=function(r){n.isPanning&&n.onPanningStop(r)},this.setKeyPressed=function(r){n.pressedKeys[r.key]=!0},this.setKeyUnPressed=function(r){n.pressedKeys[r.key]=!1},this.isPressingKeys=function(r){return r.length?Boolean(r.find(function(o){return n.pressedKeys[o]})):!0},this.setTransformState=function(r,o,s){var c=n.props.onTransformed;if(!Number.isNaN(r)&&!Number.isNaN(o)&&!Number.isNaN(s)){r!==n.transformState.scale&&(n.transformState.previousScale=n.transformState.scale,n.transformState.scale=r),n.transformState.positionX=o,n.transformState.positionY=s;var u=dt(n);n.onChangeCallbacks.forEach(function(f){return f(u)}),Mt(u,{scale:r,positionX:o,positionY:s},c),n.applyTransformation()}else console.error("Detected NaN set state values")},this.setCenter=function(){if(n.wrapperComponent&&n.contentComponent){var r=C4(n.transformState.scale,n.wrapperComponent,n.contentComponent);n.setTransformState(r.scale,r.positionX,r.positionY)}},this.handleTransformStyles=function(r,o,s){return n.props.customTransform?n.props.customTransform(r,o,s):wF(r,o,s)},this.applyTransformation=function(){if(!(!n.mounted||!n.contentComponent)){var r=n.transformState,o=r.scale,s=r.positionX,c=r.positionY,u=n.handleTransformStyles(s,c,o);n.contentComponent.style.transform=u}},this.getContext=function(){return dt(n)},this.onChange=function(r){return n.onChangeCallbacks.has(r)||n.onChangeCallbacks.add(r),function(){n.onChangeCallbacks.delete(r)}},this.init=function(r,o){n.cleanupWindowEvents(),n.wrapperComponent=r,n.contentComponent=o,ea(n,n.transformState.scale),n.handleInitializeWrapperEvents(r),n.handleInitialize(o),n.initializeWindowEvents(),n.isInitialized=!0,Mt(dt(n),void 0,n.props.onInit)},this.props=t,this.setup=y1(this.props),this.transformState=y4(this.props)}return e}(),Kc=_e.createContext(null),GF=function(e,t){return typeof e=="function"?e(t):e},qF=_e.forwardRef(function(e,t){var n=g.useState(0),r=n[1],o=e.children,s=g.useRef(new $F(e)).current,c=GF(e.children,dt(s)),u=g.useCallback(function(){typeof o=="function"&&r(function(f){return f+1})},[o]);return g.useImperativeHandle(t,function(){return dt(s)},[s]),g.useEffect(function(){s.update(e)},[s,e]),g.useEffect(function(){return s.onChange(u)},[s,e,u]),_e.createElement(Kc.Provider,{value:s},c)});function YF(e,t){t===void 0&&(t={});var n=t.insertAt;if(!(!e||typeof document>"u")){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",n==="top"&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}var KF=`.transform-component-module_wrapper__7HFJe { - position: relative; - width: -moz-fit-content; - width: fit-content; - height: -moz-fit-content; - height: fit-content; - overflow: hidden; - -webkit-touch-callout: none; /* iOS Safari */ - -webkit-user-select: none; /* Safari */ - -khtml-user-select: none; /* Konqueror HTML */ - -moz-user-select: none; /* Firefox */ - -ms-user-select: none; /* Internet Explorer/Edge */ - user-select: none; - margin: 0; - padding: 0; -} -.transform-component-module_content__uCDPE { - display: flex; - flex-wrap: wrap; - width: -moz-fit-content; - width: fit-content; - height: -moz-fit-content; - height: fit-content; - margin: 0; - padding: 0; - transform-origin: 0% 0%; -} -.transform-component-module_content__uCDPE img { - pointer-events: none; -} -`,x1={wrapper:"transform-component-module_wrapper__7HFJe",content:"transform-component-module_content__uCDPE"};YF(KF);var XF=function(e){var t=e.children,n=e.wrapperClass,r=n===void 0?"":n,o=e.contentClass,s=o===void 0?"":o,c=e.wrapperStyle,u=e.contentStyle,f=e.wrapperProps,p=f===void 0?{}:f,h=e.contentProps,y=h===void 0?{}:h,x=g.useContext(Kc).init,S=g.useRef(null),j=g.useRef(null);return g.useEffect(function(){var C=S.current,w=j.current;C!==null&&w!==null&&x&&x(C,w)},[]),_e.createElement("div",fo({},p,{ref:S,className:"react-transform-wrapper ".concat(x1.wrapper," ").concat(r),style:c}),_e.createElement("div",fo({},y,{ref:j,className:"react-transform-component ".concat(x1.content," ").concat(s),style:u}),t))},E4=function(){var e=g.useContext(Kc),t=g.useState(dt(e||{})),n=t[0],r=t[1];if(!e)throw new Error("Transform context mus be placed inside TransformWrapper");return g.useEffect(function(){e.onChange(function(o){r(o)})},[e]),n};_e.forwardRef(function(e,t){var n=g.useRef(null),r=g.useContext(Kc);return g.useEffect(function(){return r.onChange(function(o){if(n.current){var s=0,c=0;n.current.style.transform=r.handleTransformStyles(s,c,1/o.state.scale)}})},[r]),_e.createElement("div",fo({},e,{ref:jF([n,t])}))});const QF=()=>{const[e,t]=g.useState(0),[n,r]=g.useState(1),[o,s]=g.useState(1);return{rotation:e,scaleX:n,scaleY:o,flipHorizontally:()=>{r(n*-1)},flipVertically:()=>{s(o*-1)},rotateCounterClockwise:()=>{t(e===-270?0:e-90)},rotateClockwise:()=>{t(e===270?0:e+90)},reset:()=>{t(0),r(1),s(1)}}},ZF=({flipHorizontally:e,flipVertically:t,rotateCounterClockwise:n,rotateClockwise:r,reset:o})=>{const{zoomIn:s,zoomOut:c,resetTransform:u}=E4(),{t:f}=K();return l.jsxs(Qt,{isAttached:!0,orientation:"vertical",children:[l.jsx(ae,{icon:l.jsx(bD,{}),"aria-label":f("accessibility.zoomIn"),tooltip:f("accessibility.zoomIn"),onClick:()=>s(),fontSize:20}),l.jsx(ae,{icon:l.jsx(SD,{}),"aria-label":f("accessibility.zoomOut"),tooltip:f("accessibility.zoomOut"),onClick:()=>c(),fontSize:20}),l.jsx(ae,{icon:l.jsx(yD,{}),"aria-label":f("accessibility.rotateCounterClockwise"),tooltip:f("accessibility.rotateCounterClockwise"),onClick:n,fontSize:20}),l.jsx(ae,{icon:l.jsx(xD,{}),"aria-label":f("accessibility.rotateClockwise"),tooltip:f("accessibility.rotateClockwise"),onClick:r,fontSize:20}),l.jsx(ae,{icon:l.jsx(W0,{}),"aria-label":f("accessibility.flipHorizontally"),tooltip:f("accessibility.flipHorizontally"),onClick:e,fontSize:20}),l.jsx(ae,{icon:l.jsx(W0,{style:{transform:"rotate(90deg)"}}),"aria-label":f("accessibility.flipVertically"),tooltip:f("accessibility.flipVertically"),onClick:t,fontSize:20}),l.jsx(ae,{icon:l.jsx(Mb,{}),"aria-label":f("accessibility.reset"),tooltip:f("accessibility.reset"),onClick:()=>{u(),o()},fontSize:20})]})};function JF({image:e,alt:t,ref:n,styleClass:r,rotation:o,scaleX:s,scaleY:c}){const{centerView:u}=E4();return l.jsx(XF,{wrapperStyle:{width:"100%",height:"100%"},children:l.jsx("img",{style:{transform:`rotate(${o}deg) scaleX(${s}) scaleY(${c})`,width:"100%"},src:e.url,alt:t,ref:n,className:r||"",onLoad:()=>u(1,0,"easeOut")})})}const eL=pe([qr,Pr],(e,t)=>{const{currentImage:n}=e,{shouldShowImageDetails:r}=t;return{viewerImageToDisplay:n,shouldShowImageDetails:r}},{memoizeOptions:{resultEqualityCheck:ee.isEqual}});function tL(){const e=Y(),t=A(x=>x.lightbox.isLightboxOpen),{rotation:n,scaleX:r,scaleY:o,flipHorizontally:s,flipVertically:c,rotateCounterClockwise:u,rotateClockwise:f,reset:p}=QF(),{viewerImageToDisplay:h,shouldShowImageDetails:y}=A(eL);return ce("Esc",()=>{t&&e(Uo(!1))},[t]),l.jsx(xo,{children:t&&l.jsx(ar.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15,ease:"easeInOut"},style:{display:"flex",width:"100vw",height:`calc(100vh - ${dc*4}px)`,position:"fixed",top:`${dc*4}px`,background:"var(--invokeai-colors-base-900)",zIndex:99},children:l.jsxs(qF,{centerOnInit:!0,minScale:.1,initialPositionX:50,initialPositionY:50,children:[l.jsxs(L,{sx:{flexDir:"column",position:"absolute",insetInlineStart:4,gap:4,zIndex:3,top:4},children:[l.jsx(ae,{icon:l.jsx(gD,{}),"aria-label":"Exit Viewer",className:"lightbox-close-btn",onClick:()=>{e(Uo(!1))},fontSize:20}),l.jsx(ZF,{flipHorizontally:s,flipVertically:c,rotateCounterClockwise:u,rotateClockwise:f,reset:p})]}),l.jsx(L,{sx:{position:"absolute",top:4,zIndex:3,insetInlineStart:"50%",transform:"translate(-50%, 0)"},children:l.jsx(Rb,{})}),h&&l.jsxs(l.Fragment,{children:[l.jsx(JF,{rotation:n,scaleX:r,scaleY:o,image:h,styleClass:"lightbox-image"}),y&&l.jsx(xp,{image:h}),!y&&l.jsx(Ye,{sx:{position:"absolute",top:0,insetInlineStart:0,w:"100vw",h:"100vh",px:16,pointerEvents:"none"},children:l.jsx(Nb,{})})]})]})},"lightbox")})}IN();const aL=e=>{MN();const t=A(r=>r.ui.currentTheme),{setColorMode:n}=jC();return g.useEffect(()=>{n(["light"].includes(t)?"light":"dark")},[n,t]),l.jsxs(ir,{w:"100vw",h:"100vh",children:[l.jsx(tL,{}),l.jsxs(u9,{children:[l.jsx(iP,{}),l.jsxs(ir,{gap:4,p:4,gridAutoRows:"min-content auto",w:eP,h:tP,children:[e.children||l.jsx(_b,{}),l.jsxs(L,{gap:4,w:"full",h:"full",children:[l.jsx(PN,{}),l.jsx(FN,{})]})]}),l.jsx(Ye,{children:l.jsx(Z9,{})})]}),l.jsx($a,{children:l.jsx(AN,{})}),l.jsx($a,{children:l.jsx(_N,{})})]})};export{aL as default}; diff --git a/invokeai/frontend/web/dist/assets/ThemeLocaleProvider-7791bd91.js b/invokeai/frontend/web/dist/assets/ThemeLocaleProvider-7791bd91.js deleted file mode 100644 index 714b252ef2..0000000000 --- a/invokeai/frontend/web/dist/assets/ThemeLocaleProvider-7791bd91.js +++ /dev/null @@ -1,315 +0,0 @@ -import{j as y,cO as Ie,r as _,cP as bt,q as Lr,cQ as o,cR as b,cS as v,cT as S,cU as Vr,cV as ut,cW as vt,cN as ft,cX as mt,n as gt,cY as ht,E as pt}from"./index-e53e8108.js";import{d as yt,i as St,T as xt,j as $t,h as kt}from"./storeHooks-5cde7d31.js";var Or=` - :root { - --chakra-vh: 100vh; - } - - @supports (height: -webkit-fill-available) { - :root { - --chakra-vh: -webkit-fill-available; - } - } - - @supports (height: -moz-fill-available) { - :root { - --chakra-vh: -moz-fill-available; - } - } - - @supports (height: 100dvh) { - :root { - --chakra-vh: 100dvh; - } - } -`,_t=()=>y.jsx(Ie,{styles:Or}),wt=()=>y.jsx(Ie,{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; - } - - ${Or} - `}),pe={light:"chakra-ui-light",dark:"chakra-ui-dark"};function Ct(e={}){const{preventTransition:r=!0}=e,t={setDataset:a=>{const n=r?t.preventTransition():void 0;document.documentElement.dataset.theme=a,document.documentElement.style.colorScheme=a,n==null||n()},setClassName(a){document.body.classList.add(a?pe.dark:pe.light),document.body.classList.remove(a?pe.light:pe.dark)},query(){return window.matchMedia("(prefers-color-scheme: dark)")},getSystemTheme(a){var n;return((n=t.query().matches)!=null?n:a==="dark")?"dark":"light"},addListener(a){const n=t.query(),i=l=>{a(l.matches?"dark":"light")};return typeof n.addListener=="function"?n.addListener(i):n.addEventListener("change",i),()=>{typeof n.removeListener=="function"?n.removeListener(i):n.removeEventListener("change",i)}},preventTransition(){const a=document.createElement("style");return a.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(a),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.head.removeChild(a)})})}}};return t}var zt="chakra-ui-color-mode";function At(e){return{ssr:!1,type:"localStorage",get(r){if(!(globalThis!=null&&globalThis.document))return r;let t;try{t=localStorage.getItem(e)||r}catch{}return t||r},set(r){try{localStorage.setItem(e,r)}catch{}}}}var Pt=At(zt),lr=()=>{};function sr(e,r){return e.type==="cookie"&&e.ssr?e.get(r):r}function qr(e){const{value:r,children:t,options:{useSystemColorMode:a,initialColorMode:n,disableTransitionOnChange:i}={},colorModeManager:l=Pt}=e,d=n==="dark"?"dark":"light",[c,$]=_.useState(()=>sr(l,d)),[g,h]=_.useState(()=>sr(l)),{getSystemTheme:k,setClassName:F,setDataset:me,addListener:nr}=_.useMemo(()=>Ct({preventTransition:i}),[i]),ge=n==="system"&&!c?g:c,I=_.useCallback(re=>{const he=re==="system"?k():re;$(he),F(he==="dark"),me(he),l.set(he)},[l,k,F,me]);yt(()=>{n==="system"&&h(k())},[]),_.useEffect(()=>{const re=l.get();if(re){I(re);return}if(n==="system"){I("system");return}I(d)},[l,d,n,I]);const ir=_.useCallback(()=>{I(ge==="dark"?"light":"dark")},[ge,I]);_.useEffect(()=>{if(a)return nr(I)},[a,nr,I]);const ct=_.useMemo(()=>({colorMode:r??ge,toggleColorMode:r?lr:ir,setColorMode:r?lr:I,forced:r!==void 0}),[ge,ir,I,r]);return y.jsx(bt.Provider,{value:ct,children:t})}qr.displayName="ColorModeProvider";var Tt=["borders","breakpoints","colors","components","config","direction","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","shadows","sizes","space","styles","transition","zIndices"];function Ft(e){return Lr(e)?Tt.every(r=>Object.prototype.hasOwnProperty.call(e,r)):!1}var It={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},Bt=It,Mt={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},Et=Mt,Dt={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"}},jt=Dt,Rt={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},Wt=Rt,Ht={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"},Lt=Ht,Vt={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"},Ot={"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)"},qt={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},Nt={property:Vt,easing:Ot,duration:qt},Gt=Nt,Ut={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},Yt=Ut,Xt={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},Kt=Xt,Qt={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"}},Nr=Qt,Gr={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"},Zt={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"},Jt={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},eo={...Gr,...Zt,container:Jt},Ur=eo,ro={breakpoints:Et,zIndices:Bt,radii:Wt,blur:Yt,colors:jt,...Nr,sizes:Ur,shadows:Lt,space:Gr,borders:Kt,transition:Gt};function f(e,r={}){let t=!1;function a(){if(!t){t=!0;return}throw new Error("[anatomy] .part(...) should only be called once. Did you mean to use .extend(...) ?")}function n(...g){a();for(const h of g)r[h]=c(h);return f(e,r)}function i(...g){for(const h of g)h in r||(r[h]=c(h));return f(e,r)}function l(){return Object.fromEntries(Object.entries(r).map(([h,k])=>[h,k.selector]))}function d(){return Object.fromEntries(Object.entries(r).map(([h,k])=>[h,k.className]))}function c(g){const F=`chakra-${(["container","root"].includes(g??"")?[e]:[e,g]).filter(Boolean).join("__")}`;return{className:F,selector:`.${F}`,toString:()=>g}}return{parts:n,toPart:c,extend:i,selectors:l,classnames:d,get keys(){return Object.keys(r)},__type:{}}}var to=f("accordion").parts("root","container","button","panel").extend("icon"),oo=f("alert").parts("title","description","container").extend("icon","spinner"),ao=f("avatar").parts("label","badge","container").extend("excessLabel","group"),no=f("breadcrumb").parts("link","item","container").extend("separator");f("button").parts();var io=f("checkbox").parts("control","icon","container").extend("label");f("progress").parts("track","filledTrack").extend("label");var lo=f("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),so=f("editable").parts("preview","input","textarea"),co=f("form").parts("container","requiredIndicator","helperText"),bo=f("formError").parts("text","icon"),uo=f("input").parts("addon","field","element"),vo=f("list").parts("container","item","icon"),fo=f("menu").parts("button","list","item").extend("groupTitle","command","divider"),mo=f("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),go=f("numberinput").parts("root","field","stepperGroup","stepper");f("pininput").parts("field");var ho=f("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),po=f("progress").parts("label","filledTrack","track"),yo=f("radio").parts("container","control","label"),So=f("select").parts("field","icon"),xo=f("slider").parts("container","track","thumb","filledTrack","mark"),$o=f("stat").parts("container","label","helpText","number","icon"),ko=f("switch").parts("container","track","thumb"),_o=f("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),wo=f("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),Co=f("tag").parts("container","label","closeButton"),zo=f("card").parts("container","header","body","footer");function q(e,r,t){return Math.min(Math.max(e,t),r)}class Ao extends Error{constructor(r){super(`Failed to parse color: "${r}"`)}}var ae=Ao;function Je(e){if(typeof e!="string")throw new ae(e);if(e.trim().toLowerCase()==="transparent")return[0,0,0,0];let r=e.trim();r=Do.test(e)?Fo(e):e;const t=Io.exec(r);if(t){const l=Array.from(t).slice(1);return[...l.slice(0,3).map(d=>parseInt(be(d,2),16)),parseInt(be(l[3]||"f",2),16)/255]}const a=Bo.exec(r);if(a){const l=Array.from(a).slice(1);return[...l.slice(0,3).map(d=>parseInt(d,16)),parseInt(l[3]||"ff",16)/255]}const n=Mo.exec(r);if(n){const l=Array.from(n).slice(1);return[...l.slice(0,3).map(d=>parseInt(d,10)),parseFloat(l[3]||"1")]}const i=Eo.exec(r);if(i){const[l,d,c,$]=Array.from(i).slice(1).map(parseFloat);if(q(0,100,d)!==d)throw new ae(e);if(q(0,100,c)!==c)throw new ae(e);return[...jo(l,d,c),Number.isNaN($)?1:$]}throw new ae(e)}function Po(e){let r=5381,t=e.length;for(;t;)r=r*33^e.charCodeAt(--t);return(r>>>0)%2341}const dr=e=>parseInt(e.replace(/_/g,""),36),To="1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce((e,r)=>{const t=dr(r.substring(0,3)),a=dr(r.substring(3)).toString(16);let n="";for(let i=0;i<6-a.length;i++)n+="0";return e[t]=`${n}${a}`,e},{});function Fo(e){const r=e.toLowerCase().trim(),t=To[Po(r)];if(!t)throw new ae(e);return`#${t}`}const be=(e,r)=>Array.from(Array(r)).map(()=>e).join(""),Io=new RegExp(`^#${be("([a-f0-9])",3)}([a-f0-9])?$`,"i"),Bo=new RegExp(`^#${be("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i"),Mo=new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${be(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i"),Eo=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i,Do=/^[a-z]+$/i,cr=e=>Math.round(e*255),jo=(e,r,t)=>{let a=t/100;if(r===0)return[a,a,a].map(cr);const n=(e%360+360)%360/60,i=(1-Math.abs(2*a-1))*(r/100),l=i*(1-Math.abs(n%2-1));let d=0,c=0,$=0;n>=0&&n<1?(d=i,c=l):n>=1&&n<2?(d=l,c=i):n>=2&&n<3?(c=i,$=l):n>=3&&n<4?(c=l,$=i):n>=4&&n<5?(d=l,$=i):n>=5&&n<6&&(d=i,$=l);const g=a-i/2,h=d+g,k=c+g,F=$+g;return[h,k,F].map(cr)};function Ro(e,r,t,a){return`rgba(${q(0,255,e).toFixed()}, ${q(0,255,r).toFixed()}, ${q(0,255,t).toFixed()}, ${parseFloat(q(0,1,a).toFixed(3))})`}function Wo(e,r){const[t,a,n,i]=Je(e);return Ro(t,a,n,i-r)}function Ho(e){const[r,t,a,n]=Je(e);let i=l=>{const d=q(0,255,l).toString(16);return d.length===1?`0${d}`:d};return`#${i(r)}${i(t)}${i(a)}${n<1?i(Math.round(n*255)):""}`}function Lo(e,r,t,a,n){for(r=r.split?r.split("."):r,a=0;aObject.keys(e).length===0,w=(e,r,t)=>{const a=Lo(e,`colors.${r}`,r);try{return Ho(a),a}catch{return t??"#000000"}},Oo=e=>{const[r,t,a]=Je(e);return(r*299+t*587+a*114)/1e3},qo=e=>r=>{const t=w(r,e);return Oo(t)<128?"dark":"light"},No=e=>r=>qo(e)(r)==="dark",ee=(e,r)=>t=>{const a=w(t,e);return Wo(a,1-r)};function br(e="1rem",r="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient( - 45deg, - ${r} 25%, - transparent 25%, - transparent 50%, - ${r} 50%, - ${r} 75%, - transparent 75%, - transparent - )`,backgroundSize:`${e} ${e}`}}var Go=()=>`#${Math.floor(Math.random()*16777215).toString(16).padEnd(6,"0")}`;function Uo(e){const r=Go();return!e||Vo(e)?r:e.string&&e.colors?Xo(e.string,e.colors):e.string&&!e.colors?Yo(e.string):e.colors&&!e.string?Ko(e.colors):r}function Yo(e){let r=0;if(e.length===0)return r.toString();for(let a=0;a>a*8&255;t+=`00${n.toString(16)}`.substr(-2)}return t}function Xo(e,r){let t=0;if(e.length===0)return r[0];for(let a=0;at.colorMode==="dark"?r:e}function er(e){const{orientation:r,vertical:t,horizontal:a}=e;return r?r==="vertical"?t:a:{}}function Yr(e){return Lr(e)&&e.reference?e.reference:String(e)}var Be=(e,...r)=>r.map(Yr).join(` ${e} `).replace(/calc/g,""),ur=(...e)=>`calc(${Be("+",...e)})`,vr=(...e)=>`calc(${Be("-",...e)})`,Xe=(...e)=>`calc(${Be("*",...e)})`,fr=(...e)=>`calc(${Be("/",...e)})`,mr=e=>{const r=Yr(e);return r!=null&&!Number.isNaN(parseFloat(r))?String(r).startsWith("-")?String(r).slice(1):`-${r}`:Xe(r,-1)},D=Object.assign(e=>({add:(...r)=>D(ur(e,...r)),subtract:(...r)=>D(vr(e,...r)),multiply:(...r)=>D(Xe(e,...r)),divide:(...r)=>D(fr(e,...r)),negate:()=>D(mr(e)),toString:()=>e.toString()}),{add:ur,subtract:vr,multiply:Xe,divide:fr,negate:mr});function Qo(e){return!Number.isInteger(parseFloat(e.toString()))}function Zo(e,r="-"){return e.replace(/\s+/g,r)}function Xr(e){const r=Zo(e.toString());return r.includes("\\.")?e:Qo(e)?r.replace(".","\\."):e}function Jo(e,r=""){return[r,Xr(e)].filter(Boolean).join("-")}function ea(e,r){return`var(${Xr(e)}${r?`, ${r}`:""})`}function ra(e,r=""){return`--${Jo(e,r)}`}function x(e,r){const t=ra(e,r==null?void 0:r.prefix);return{variable:t,reference:ea(t,ta(r==null?void 0:r.fallback))}}function ta(e){return typeof e=="string"?e:e==null?void 0:e.reference}var{defineMultiStyleConfig:oa,definePartsStyle:we}=b(ko.keys),le=x("switch-track-width"),N=x("switch-track-height"),De=x("switch-track-diff"),aa=D.subtract(le,N),Ke=x("switch-thumb-x"),te=x("switch-bg"),na=o(e=>{const{colorScheme:r}=e;return{borderRadius:"full",p:"0.5",width:[le.reference],height:[N.reference],transitionProperty:"common",transitionDuration:"fast",[te.variable]:"colors.gray.300",_dark:{[te.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[te.variable]:`colors.${r}.500`,_dark:{[te.variable]:`colors.${r}.200`}},bg:te.reference}}),ia=o({bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[N.reference],height:[N.reference],_checked:{transform:`translateX(${Ke.reference})`}}),la=we(e=>({container:{[De.variable]:aa,[Ke.variable]:De.reference,_rtl:{[Ke.variable]:D(De).negate().toString()}},track:na(e),thumb:ia})),sa={sm:we({container:{[le.variable]:"1.375rem",[N.variable]:"sizes.3"}}),md:we({container:{[le.variable]:"1.875rem",[N.variable]:"sizes.4"}}),lg:we({container:{[le.variable]:"2.875rem",[N.variable]:"sizes.6"}})},da=oa({baseStyle:la,sizes:sa,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:ca,definePartsStyle:X}=b(_o.keys),ba=X({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"}}),Pe=o({"&[data-is-numeric=true]":{textAlign:"end"}}),ua=X(e=>{const{colorScheme:r}=e;return{th:{color:s("gray.600","gray.400")(e),borderBottom:"1px",borderColor:s(`${r}.100`,`${r}.700`)(e),...Pe},td:{borderBottom:"1px",borderColor:s(`${r}.100`,`${r}.700`)(e),...Pe},caption:{color:s("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),va=X(e=>{const{colorScheme:r}=e;return{th:{color:s("gray.600","gray.400")(e),borderBottom:"1px",borderColor:s(`${r}.100`,`${r}.700`)(e),...Pe},td:{borderBottom:"1px",borderColor:s(`${r}.100`,`${r}.700`)(e),...Pe},caption:{color:s("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:s(`${r}.100`,`${r}.700`)(e)},td:{background:s(`${r}.100`,`${r}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),fa={simple:ua,striped:va,unstyled:o({})},ma={sm:X({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:X({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:X({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},ga=ca({baseStyle:ba,variants:fa,sizes:ma,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),z=v("tabs-color"),T=v("tabs-bg"),ye=v("tabs-border-color"),{defineMultiStyleConfig:ha,definePartsStyle:E}=b(wo.keys),pa=o(e=>{const{orientation:r}=e;return{display:r==="vertical"?"flex":"block"}}),ya=o(e=>{const{isFitted:r}=e;return{flex:r?1:void 0,transitionProperty:"common",transitionDuration:"normal",_focusVisible:{zIndex:1,boxShadow:"outline"},_disabled:{cursor:"not-allowed",opacity:.4}}}),Sa=o(e=>{const{align:r="start",orientation:t}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[r],flexDirection:t==="vertical"?"column":"row"}}),xa=o({p:4}),$a=E(e=>({root:pa(e),tab:ya(e),tablist:Sa(e),tabpanel:xa})),ka={sm:E({tab:{py:1,px:4,fontSize:"sm"}}),md:E({tab:{fontSize:"md",py:2,px:4}}),lg:E({tab:{fontSize:"lg",py:3,px:4}})},_a=E(e=>{const{colorScheme:r,orientation:t}=e,a=t==="vertical",n=t==="vertical"?"borderStart":"borderBottom",i=a?"marginStart":"marginBottom";return{tablist:{[n]:"2px solid",borderColor:"inherit"},tab:{[n]:"2px solid",borderColor:"transparent",[i]:"-2px",_selected:{[z.variable]:`colors.${r}.600`,_dark:{[z.variable]:`colors.${r}.300`},borderColor:"currentColor"},_active:{[T.variable]:"colors.gray.200",_dark:{[T.variable]:"colors.whiteAlpha.300"}},_disabled:{_active:{bg:"none"}},color:z.reference,bg:T.reference}}}),wa=E(e=>{const{colorScheme:r}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",[ye.variable]:"transparent",_selected:{[z.variable]:`colors.${r}.600`,[ye.variable]:"colors.white",_dark:{[z.variable]:`colors.${r}.300`,[ye.variable]:"colors.gray.800"},borderColor:"inherit",borderBottomColor:ye.reference},color:z.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),Ca=E(e=>{const{colorScheme:r}=e;return{tab:{border:"1px solid",borderColor:"inherit",[T.variable]:"colors.gray.50",_dark:{[T.variable]:"colors.whiteAlpha.50"},mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{[T.variable]:"colors.white",[z.variable]:`colors.${r}.600`,_dark:{[T.variable]:"colors.gray.800",[z.variable]:`colors.${r}.300`},borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"},color:z.reference,bg:T.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),za=E(e=>{const{colorScheme:r,theme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:w(t,`${r}.700`),bg:w(t,`${r}.100`)}}}}),Aa=E(e=>{const{colorScheme:r}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",[z.variable]:"colors.gray.600",_dark:{[z.variable]:"inherit"},_selected:{[z.variable]:"colors.white",[T.variable]:`colors.${r}.600`,_dark:{[z.variable]:"colors.gray.800",[T.variable]:`colors.${r}.300`}},color:z.reference,bg:T.reference}}}),Pa=E({}),Ta={line:_a,enclosed:wa,"enclosed-colored":Ca,"soft-rounded":za,"solid-rounded":Aa,unstyled:Pa},Fa=ha({baseStyle:$a,sizes:ka,variants:Ta,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),Ia=o({px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold"}),K=v("badge-bg"),M=v("badge-color"),Ba=o(e=>{const{colorScheme:r,theme:t}=e,a=ee(`${r}.500`,.6)(t);return{[K.variable]:`colors.${r}.500`,[M.variable]:"colors.white",_dark:{[K.variable]:a,[M.variable]:"colors.whiteAlpha.800"},bg:K.reference,color:M.reference}}),Ma=o(e=>{const{colorScheme:r,theme:t}=e,a=ee(`${r}.200`,.16)(t);return{[K.variable]:`colors.${r}.100`,[M.variable]:`colors.${r}.800`,_dark:{[K.variable]:a,[M.variable]:`colors.${r}.200`},bg:K.reference,color:M.reference}}),Ea=o(e=>{const{colorScheme:r,theme:t}=e,a=ee(`${r}.200`,.8)(t);return{[M.variable]:`colors.${r}.500`,_dark:{[M.variable]:a},color:M.reference,boxShadow:`inset 0 0 0px 1px ${M.reference}`}}),Da={solid:Ba,subtle:Ma,outline:Ea},se=S({baseStyle:Ia,variants:Da,defaultProps:{variant:"subtle",colorScheme:"gray"}}),{defineMultiStyleConfig:ja,definePartsStyle:G}=b(Co.keys),Ra=o({fontWeight:"medium",lineHeight:1.2,outline:0,borderRadius:"md",_focusVisible:{boxShadow:"outline"}}),Wa=o({lineHeight:1.2,overflow:"visible"}),Ha=o({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}}),La=G({container:Ra,label:Wa,closeButton:Ha}),Va={sm:G({container:{minH:"5",minW:"5",fontSize:"xs",px:"2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:G({container:{minH:"6",minW:"6",fontSize:"sm",px:"2"}}),lg:G({container:{minH:"8",minW:"8",fontSize:"md",px:"3"}})},Oa={subtle:G(e=>{var r;return{container:(r=se.variants)==null?void 0:r.subtle(e)}}),solid:G(e=>{var r;return{container:(r=se.variants)==null?void 0:r.solid(e)}}),outline:G(e=>{var r;return{container:(r=se.variants)==null?void 0:r.outline(e)}})},qa=ja({variants:Oa,baseStyle:La,sizes:Va,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),{definePartsStyle:j,defineMultiStyleConfig:Na}=b(uo.keys),Ga=j({field:{width:"100%",minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),H={lg:o({fontSize:"lg",px:"4",h:"12",borderRadius:"md"}),md:o({fontSize:"md",px:"4",h:"10",borderRadius:"md"}),sm:o({fontSize:"sm",px:"3",h:"8",borderRadius:"sm"}),xs:o({fontSize:"xs",px:"2",h:"6",borderRadius:"sm"})},Ua={lg:j({field:H.lg,addon:H.lg}),md:j({field:H.md,addon:H.md}),sm:j({field:H.sm,addon:H.sm}),xs:j({field:H.xs,addon:H.xs})};function rr(e){const{focusBorderColor:r,errorBorderColor:t}=e;return{focusBorderColor:r||s("blue.500","blue.300")(e),errorBorderColor:t||s("red.500","red.300")(e)}}var Ya=j(e=>{const{theme:r}=e,{focusBorderColor:t,errorBorderColor:a}=rr(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:s("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:w(r,a),boxShadow:`0 0 0 1px ${w(r,a)}`},_focusVisible:{zIndex:1,borderColor:w(r,t),boxShadow:`0 0 0 1px ${w(r,t)}`}},addon:{border:"1px solid",borderColor:s("inherit","whiteAlpha.50")(e),bg:s("gray.100","whiteAlpha.300")(e)}}}),Xa=j(e=>{const{theme:r}=e,{focusBorderColor:t,errorBorderColor:a}=rr(e);return{field:{border:"2px solid",borderColor:"transparent",bg:s("gray.100","whiteAlpha.50")(e),_hover:{bg:s("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:w(r,a)},_focusVisible:{bg:"transparent",borderColor:w(r,t)}},addon:{border:"2px solid",borderColor:"transparent",bg:s("gray.100","whiteAlpha.50")(e)}}}),Ka=j(e=>{const{theme:r}=e,{focusBorderColor:t,errorBorderColor:a}=rr(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:w(r,a),boxShadow:`0px 1px 0px 0px ${w(r,a)}`},_focusVisible:{borderColor:w(r,t),boxShadow:`0px 1px 0px 0px ${w(r,t)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),Qa=j({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),Za={outline:Ya,filled:Xa,flushed:Ka,unstyled:Qa},u=Na({baseStyle:Ga,sizes:Ua,variants:Za,defaultProps:{size:"md",variant:"outline"}}),gr,Ja=o({...(gr=u.baseStyle)==null?void 0:gr.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"}),hr,pr,en={outline:o(e=>{var r,t;return(t=(r=u.variants)==null?void 0:r.outline(e).field)!=null?t:{}}),flushed:o(e=>{var r,t;return(t=(r=u.variants)==null?void 0:r.flushed(e).field)!=null?t:{}}),filled:o(e=>{var r,t;return(t=(r=u.variants)==null?void 0:r.filled(e).field)!=null?t:{}}),unstyled:(pr=(hr=u.variants)==null?void 0:hr.unstyled.field)!=null?pr:{}},yr,Sr,xr,$r,kr,_r,wr,Cr,rn={xs:(Sr=(yr=u.sizes)==null?void 0:yr.xs.field)!=null?Sr:{},sm:($r=(xr=u.sizes)==null?void 0:xr.sm.field)!=null?$r:{},md:(_r=(kr=u.sizes)==null?void 0:kr.md.field)!=null?_r:{},lg:(Cr=(wr=u.sizes)==null?void 0:wr.lg.field)!=null?Cr:{}},tn=S({baseStyle:Ja,sizes:rn,variants:en,defaultProps:{size:"md",variant:"outline"}}),Se=x("tooltip-bg"),je=x("tooltip-fg"),on=x("popper-arrow-bg"),an=o({bg:Se.reference,color:je.reference,[Se.variable]:"colors.gray.700",[je.variable]:"colors.whiteAlpha.900",_dark:{[Se.variable]:"colors.gray.300",[je.variable]:"colors.gray.900"},[on.variable]:Se.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"}),nn=S({baseStyle:an}),{defineMultiStyleConfig:ln,definePartsStyle:ne}=b(po.keys),sn=o(e=>{const{colorScheme:r,theme:t,isIndeterminate:a,hasStripe:n}=e,i=s(br(),br("1rem","rgba(0,0,0,0.1)"))(e),l=s(`${r}.500`,`${r}.200`)(e),d=`linear-gradient( - to right, - transparent 0%, - ${w(t,l)} 50%, - transparent 100% - )`;return{...!a&&n&&i,...a?{bgImage:d}:{bgColor:l}}}),dn=o({lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"}),cn=o(e=>({bg:s("gray.100","whiteAlpha.300")(e)})),bn=o(e=>({transitionProperty:"common",transitionDuration:"slow",...sn(e)})),un=ne(e=>({label:dn,filledTrack:bn(e),track:cn(e)})),vn={xs:ne({track:{h:"1"}}),sm:ne({track:{h:"2"}}),md:ne({track:{h:"3"}}),lg:ne({track:{h:"4"}})},fn=ln({sizes:vn,baseStyle:un,defaultProps:{size:"md",colorScheme:"blue"}}),mn=e=>typeof e=="function";function C(e,...r){return mn(e)?e(...r):e}var{definePartsStyle:Ce,defineMultiStyleConfig:gn}=b(io.keys),de=v("checkbox-size"),hn=o(e=>{const{colorScheme:r}=e;return{w:de.reference,h:de.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:s(`${r}.500`,`${r}.200`)(e),borderColor:s(`${r}.500`,`${r}.200`)(e),color:s("white","gray.900")(e),_hover:{bg:s(`${r}.600`,`${r}.300`)(e),borderColor:s(`${r}.600`,`${r}.300`)(e)},_disabled:{borderColor:s("gray.200","transparent")(e),bg:s("gray.200","whiteAlpha.300")(e),color:s("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:s(`${r}.500`,`${r}.200`)(e),borderColor:s(`${r}.500`,`${r}.200`)(e),color:s("white","gray.900")(e)},_disabled:{bg:s("gray.100","whiteAlpha.100")(e),borderColor:s("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:s("red.500","red.300")(e)}}}),pn=o({_disabled:{cursor:"not-allowed"}}),yn=o({userSelect:"none",_disabled:{opacity:.4}}),Sn=o({transitionProperty:"transform",transitionDuration:"normal"}),xn=Ce(e=>({icon:Sn,container:pn,control:C(hn,e),label:yn})),$n={sm:Ce({control:{[de.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:Ce({control:{[de.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:Ce({control:{[de.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},Te=gn({baseStyle:xn,sizes:$n,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:kn,definePartsStyle:ze}=b(yo.keys),_n=o(e=>{var r;const t=(r=C(Te.baseStyle,e))==null?void 0:r.control;return{...t,borderRadius:"full",_checked:{...t==null?void 0:t._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}}),wn=ze(e=>{var r,t,a,n;return{label:(t=(r=Te).baseStyle)==null?void 0:t.call(r,e).label,container:(n=(a=Te).baseStyle)==null?void 0:n.call(a,e).container,control:_n(e)}}),Cn={md:ze({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:ze({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:ze({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},zn=kn({baseStyle:wn,sizes:Cn,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:An,definePartsStyle:Pn}=b(So.keys),xe=v("select-bg"),zr,Tn=o({...(zr=u.baseStyle)==null?void 0:zr.field,appearance:"none",paddingBottom:"1px",lineHeight:"normal",bg:xe.reference,[xe.variable]:"colors.white",_dark:{[xe.variable]:"colors.gray.700"},"> option, > optgroup":{bg:xe.reference}}),Fn=o({width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}}),In=Pn({field:Tn,icon:Fn}),$e=o({paddingInlineEnd:"8"}),Ar,Pr,Tr,Fr,Ir,Br,Mr,Er,Bn={lg:{...(Ar=u.sizes)==null?void 0:Ar.lg,field:{...(Pr=u.sizes)==null?void 0:Pr.lg.field,...$e}},md:{...(Tr=u.sizes)==null?void 0:Tr.md,field:{...(Fr=u.sizes)==null?void 0:Fr.md.field,...$e}},sm:{...(Ir=u.sizes)==null?void 0:Ir.sm,field:{...(Br=u.sizes)==null?void 0:Br.sm.field,...$e}},xs:{...(Mr=u.sizes)==null?void 0:Mr.xs,field:{...(Er=u.sizes)==null?void 0:Er.xs.field,...$e},icon:{insetEnd:"1"}}},Mn=An({baseStyle:In,sizes:Bn,variants:u.variants,defaultProps:u.defaultProps}),Re=v("skeleton-start-color"),We=v("skeleton-end-color"),En=o({[Re.variable]:"colors.gray.100",[We.variable]:"colors.gray.400",_dark:{[Re.variable]:"colors.gray.800",[We.variable]:"colors.gray.600"},background:Re.reference,borderColor:We.reference,opacity:.7,borderRadius:"sm"}),Dn=S({baseStyle:En}),He=v("skip-link-bg"),jn=o({borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[He.variable]:"colors.white",_dark:{[He.variable]:"colors.gray.700"},bg:He.reference}}),Rn=S({baseStyle:jn}),{defineMultiStyleConfig:Wn,definePartsStyle:Me}=b(xo.keys),ue=v("slider-thumb-size"),ve=v("slider-track-size"),V=v("slider-bg"),Hn=o(e=>{const{orientation:r}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...er({orientation:r,vertical:{h:"100%"},horizontal:{w:"100%"}})}}),Ln=o(e=>({...er({orientation:e.orientation,horizontal:{h:ve.reference},vertical:{w:ve.reference}}),overflow:"hidden",borderRadius:"sm",[V.variable]:"colors.gray.200",_dark:{[V.variable]:"colors.whiteAlpha.200"},_disabled:{[V.variable]:"colors.gray.300",_dark:{[V.variable]:"colors.whiteAlpha.300"}},bg:V.reference})),Vn=o(e=>{const{orientation:r}=e;return{...er({orientation:r,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:ue.reference,h:ue.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"}}}),On=o(e=>{const{colorScheme:r}=e;return{width:"inherit",height:"inherit",[V.variable]:`colors.${r}.500`,_dark:{[V.variable]:`colors.${r}.200`},bg:V.reference}}),qn=Me(e=>({container:Hn(e),track:Ln(e),thumb:Vn(e),filledTrack:On(e)})),Nn=Me({container:{[ue.variable]:"sizes.4",[ve.variable]:"sizes.1"}}),Gn=Me({container:{[ue.variable]:"sizes.3.5",[ve.variable]:"sizes.1"}}),Un=Me({container:{[ue.variable]:"sizes.2.5",[ve.variable]:"sizes.0.5"}}),Yn={lg:Nn,md:Gn,sm:Un},Xn=Wn({baseStyle:qn,sizes:Yn,defaultProps:{size:"md",colorScheme:"blue"}}),O=x("spinner-size"),Kn=o({width:[O.reference],height:[O.reference]}),Qn={xs:o({[O.variable]:"sizes.3"}),sm:o({[O.variable]:"sizes.4"}),md:o({[O.variable]:"sizes.6"}),lg:o({[O.variable]:"sizes.8"}),xl:o({[O.variable]:"sizes.12"})},Zn=S({baseStyle:Kn,sizes:Qn,defaultProps:{size:"md"}}),{defineMultiStyleConfig:Jn,definePartsStyle:Kr}=b($o.keys),ei=o({fontWeight:"medium"}),ri=o({opacity:.8,marginBottom:"2"}),ti=o({verticalAlign:"baseline",fontWeight:"semibold"}),oi=o({marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"}),ai=Kr({container:{},label:ei,helpText:ri,number:ti,icon:oi}),ni={md:Kr({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},ii=Jn({baseStyle:ai,sizes:ni,defaultProps:{size:"md"}}),Le=v("kbd-bg"),li=o({[Le.variable]:"colors.gray.100",_dark:{[Le.variable]:"colors.whiteAlpha.100"},bg:Le.reference,borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"}),si=S({baseStyle:li}),di=o({transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}}),ci=S({baseStyle:di}),{defineMultiStyleConfig:bi,definePartsStyle:ui}=b(vo.keys),vi=o({marginEnd:"2",display:"inline",verticalAlign:"text-bottom"}),fi=ui({icon:vi}),mi=bi({baseStyle:fi}),{defineMultiStyleConfig:gi,definePartsStyle:hi}=b(fo.keys),B=v("menu-bg"),Ve=v("menu-shadow"),pi=o({[B.variable]:"#fff",[Ve.variable]:"shadows.sm",_dark:{[B.variable]:"colors.gray.700",[Ve.variable]:"shadows.dark-lg"},color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px",bg:B.reference,boxShadow:Ve.reference}),yi=o({py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{[B.variable]:"colors.gray.100",_dark:{[B.variable]:"colors.whiteAlpha.100"}},_active:{[B.variable]:"colors.gray.200",_dark:{[B.variable]:"colors.whiteAlpha.200"}},_expanded:{[B.variable]:"colors.gray.100",_dark:{[B.variable]:"colors.whiteAlpha.100"}},_disabled:{opacity:.4,cursor:"not-allowed"},bg:B.reference}),Si=o({mx:4,my:2,fontWeight:"semibold",fontSize:"sm"}),xi=o({opacity:.6}),$i=o({border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6}),ki=o({transitionProperty:"common",transitionDuration:"normal"}),_i=hi({button:ki,list:pi,item:yi,groupTitle:Si,command:xi,divider:$i}),wi=gi({baseStyle:_i}),{defineMultiStyleConfig:Ci,definePartsStyle:Qe}=b(mo.keys),zi=o({bg:"blackAlpha.600",zIndex:"modal"}),Ai=o(e=>{const{isCentered:r,scrollBehavior:t}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:r?"center":"flex-start",overflow:t==="inside"?"hidden":"auto",overscrollBehaviorY:"none"}}),Pi=o(e=>{const{scrollBehavior:r}=e;return{borderRadius:"md",bg:s("white","gray.700")(e),color:"inherit",my:"16",zIndex:"modal",maxH:r==="inside"?"calc(100% - 7.5rem)":void 0,boxShadow:s("lg","dark-lg")(e)}}),Ti=o({px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"}),Fi=o({position:"absolute",top:"2",insetEnd:"3"}),Ii=o(e=>{const{scrollBehavior:r}=e;return{px:"6",py:"2",flex:"1",overflow:r==="inside"?"auto":void 0}}),Bi=o({px:"6",py:"4"}),Mi=Qe(e=>({overlay:zi,dialogContainer:C(Ai,e),dialog:C(Pi,e),header:Ti,closeButton:Fi,body:C(Ii,e),footer:Bi}));function P(e){return Qe(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var Ei={xs:P("xs"),sm:P("sm"),md:P("md"),lg:P("lg"),xl:P("xl"),"2xl":P("2xl"),"3xl":P("3xl"),"4xl":P("4xl"),"5xl":P("5xl"),"6xl":P("6xl"),full:P("full")},Di=Ci({baseStyle:Mi,sizes:Ei,defaultProps:{size:"md"}}),{defineMultiStyleConfig:ji,definePartsStyle:Qr}=b(go.keys),tr=x("number-input-stepper-width"),Zr=x("number-input-input-padding"),Ri=D(tr).add("0.5rem").toString(),Oe=x("number-input-bg"),qe=x("number-input-color"),Ne=x("number-input-border-color"),Wi=o({[tr.variable]:"sizes.6",[Zr.variable]:Ri}),Hi=o(e=>{var r,t;return(t=(r=C(u.baseStyle,e))==null?void 0:r.field)!=null?t:{}}),Li=o({width:tr.reference}),Vi=o({borderStart:"1px solid",borderStartColor:Ne.reference,color:qe.reference,bg:Oe.reference,[qe.variable]:"colors.chakra-body-text",[Ne.variable]:"colors.chakra-border-color",_dark:{[qe.variable]:"colors.whiteAlpha.800",[Ne.variable]:"colors.whiteAlpha.300"},_active:{[Oe.variable]:"colors.gray.200",_dark:{[Oe.variable]:"colors.whiteAlpha.300"}},_disabled:{opacity:.4,cursor:"not-allowed"}}),Oi=Qr(e=>{var r;return{root:Wi,field:(r=C(Hi,e))!=null?r:{},stepperGroup:Li,stepper:Vi}});function ke(e){var r,t,a;const n=(r=u.sizes)==null?void 0:r[e],i={lg:"md",md:"md",sm:"sm",xs:"sm"},l=(a=(t=n.field)==null?void 0:t.fontSize)!=null?a:"md",d=Nr.fontSizes[l];return Qr({field:{...n.field,paddingInlineEnd:Zr.reference,verticalAlign:"top"},stepper:{fontSize:D(d).multiply(.75).toString(),_first:{borderTopEndRadius:i[e]},_last:{borderBottomEndRadius:i[e],mt:"-1px",borderTopWidth:1}}})}var qi={xs:ke("xs"),sm:ke("sm"),md:ke("md"),lg:ke("lg")},Ni=ji({baseStyle:Oi,sizes:qi,variants:u.variants,defaultProps:u.defaultProps}),Dr,Gi=o({...(Dr=u.baseStyle)==null?void 0:Dr.field,textAlign:"center"}),Ui={lg:o({fontSize:"lg",w:12,h:12,borderRadius:"md"}),md:o({fontSize:"md",w:10,h:10,borderRadius:"md"}),sm:o({fontSize:"sm",w:8,h:8,borderRadius:"sm"}),xs:o({fontSize:"xs",w:6,h:6,borderRadius:"sm"})},jr,Rr,Yi={outline:o(e=>{var r,t,a;return(a=(t=C((r=u.variants)==null?void 0:r.outline,e))==null?void 0:t.field)!=null?a:{}}),flushed:o(e=>{var r,t,a;return(a=(t=C((r=u.variants)==null?void 0:r.flushed,e))==null?void 0:t.field)!=null?a:{}}),filled:o(e=>{var r,t,a;return(a=(t=C((r=u.variants)==null?void 0:r.filled,e))==null?void 0:t.field)!=null?a:{}}),unstyled:(Rr=(jr=u.variants)==null?void 0:jr.unstyled.field)!=null?Rr:{}},Xi=S({baseStyle:Gi,sizes:Ui,variants:Yi,defaultProps:u.defaultProps}),{defineMultiStyleConfig:Ki,definePartsStyle:Qi}=b(ho.keys),_e=x("popper-bg"),Zi=x("popper-arrow-bg"),Wr=x("popper-arrow-shadow-color"),Ji=o({zIndex:10}),el=o({[_e.variable]:"colors.white",bg:_e.reference,[Zi.variable]:_e.reference,[Wr.variable]:"colors.gray.200",_dark:{[_e.variable]:"colors.gray.700",[Wr.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}}),rl=o({px:3,py:2,borderBottomWidth:"1px"}),tl=o({px:3,py:2}),ol=o({px:3,py:2,borderTopWidth:"1px"}),al=o({position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2}),nl=Qi({popper:Ji,content:el,header:rl,body:tl,footer:ol,closeButton:al}),il=Ki({baseStyle:nl}),{definePartsStyle:Ze,defineMultiStyleConfig:ll}=b(lo.keys),Ge=v("drawer-bg"),Ue=v("drawer-box-shadow");function Y(e){return Ze(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var sl=o({bg:"blackAlpha.600",zIndex:"overlay"}),dl=o({display:"flex",zIndex:"modal",justifyContent:"center"}),cl=o(e=>{const{isFullHeight:r}=e;return{...r&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[Ge.variable]:"colors.white",[Ue.variable]:"shadows.lg",_dark:{[Ge.variable]:"colors.gray.700",[Ue.variable]:"shadows.dark-lg"},bg:Ge.reference,boxShadow:Ue.reference}}),bl=o({px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"}),ul=o({position:"absolute",top:"2",insetEnd:"3"}),vl=o({px:"6",py:"2",flex:"1",overflow:"auto"}),fl=o({px:"6",py:"4"}),ml=Ze(e=>({overlay:sl,dialogContainer:dl,dialog:C(cl,e),header:bl,closeButton:ul,body:vl,footer:fl})),gl={xs:Y("xs"),sm:Y("md"),md:Y("lg"),lg:Y("2xl"),xl:Y("4xl"),full:Y("full")},hl=ll({baseStyle:ml,sizes:gl,defaultProps:{size:"xs"}}),{definePartsStyle:pl,defineMultiStyleConfig:yl}=b(so.keys),Sl=o({borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"}),xl=o({borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}}),$l=o({borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}}),kl=pl({preview:Sl,input:xl,textarea:$l}),_l=yl({baseStyle:kl}),{definePartsStyle:wl,defineMultiStyleConfig:Cl}=b(co.keys),Q=v("form-control-color"),zl=o({marginStart:"1",[Q.variable]:"colors.red.500",_dark:{[Q.variable]:"colors.red.300"},color:Q.reference}),Al=o({mt:"2",[Q.variable]:"colors.gray.600",_dark:{[Q.variable]:"colors.whiteAlpha.600"},color:Q.reference,lineHeight:"normal",fontSize:"sm"}),Pl=wl({container:{width:"100%",position:"relative"},requiredIndicator:zl,helperText:Al}),Tl=Cl({baseStyle:Pl}),{definePartsStyle:Fl,defineMultiStyleConfig:Il}=b(bo.keys),Z=v("form-error-color"),Bl=o({[Z.variable]:"colors.red.500",_dark:{[Z.variable]:"colors.red.300"},color:Z.reference,mt:"2",fontSize:"sm",lineHeight:"normal"}),Ml=o({marginEnd:"0.5em",[Z.variable]:"colors.red.500",_dark:{[Z.variable]:"colors.red.300"},color:Z.reference}),El=Fl({text:Bl,icon:Ml}),Dl=Il({baseStyle:El}),jl=o({fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}}),Rl=S({baseStyle:jl}),Wl=o({fontFamily:"heading",fontWeight:"bold"}),Hl={"4xl":o({fontSize:["6xl",null,"7xl"],lineHeight:1}),"3xl":o({fontSize:["5xl",null,"6xl"],lineHeight:1}),"2xl":o({fontSize:["4xl",null,"5xl"],lineHeight:[1.2,null,1]}),xl:o({fontSize:["3xl",null,"4xl"],lineHeight:[1.33,null,1.2]}),lg:o({fontSize:["2xl",null,"3xl"],lineHeight:[1.33,null,1.2]}),md:o({fontSize:"xl",lineHeight:1.2}),sm:o({fontSize:"md",lineHeight:1.2}),xs:o({fontSize:"sm",lineHeight:1.2})},Ll=S({baseStyle:Wl,sizes:Hl,defaultProps:{size:"xl"}}),{defineMultiStyleConfig:Vl,definePartsStyle:Ol}=b(no.keys),ql=o({transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}}),Nl=Ol({link:ql}),Gl=Vl({baseStyle:Nl}),Ul=o({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"}}}),Jr=o(e=>{const{colorScheme:r,theme:t}=e;if(r==="gray")return{color:s("inherit","whiteAlpha.900")(e),_hover:{bg:s("gray.100","whiteAlpha.200")(e)},_active:{bg:s("gray.200","whiteAlpha.300")(e)}};const a=ee(`${r}.200`,.12)(t),n=ee(`${r}.200`,.24)(t);return{color:s(`${r}.600`,`${r}.200`)(e),bg:"transparent",_hover:{bg:s(`${r}.50`,a)(e)},_active:{bg:s(`${r}.100`,n)(e)}}}),Yl=o(e=>{const{colorScheme:r}=e,t=s("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:r==="gray"?t:"currentColor",".chakra-button__group[data-attached][data-orientation=horizontal] > &:not(:last-of-type)":{marginEnd:"-1px"},".chakra-button__group[data-attached][data-orientation=vertical] > &:not(:last-of-type)":{marginBottom:"-1px"},...C(Jr,e)}}),Xl={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},Kl=o(e=>{var r;const{colorScheme:t}=e;if(t==="gray"){const c=s("gray.100","whiteAlpha.200")(e);return{bg:c,_hover:{bg:s("gray.200","whiteAlpha.300")(e),_disabled:{bg:c}},_active:{bg:s("gray.300","whiteAlpha.400")(e)}}}const{bg:a=`${t}.500`,color:n="white",hoverBg:i=`${t}.600`,activeBg:l=`${t}.700`}=(r=Xl[t])!=null?r:{},d=s(a,`${t}.200`)(e);return{bg:d,color:s(n,"gray.800")(e),_hover:{bg:s(i,`${t}.300`)(e),_disabled:{bg:d}},_active:{bg:s(l,`${t}.400`)(e)}}}),Ql=o(e=>{const{colorScheme:r}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:s(`${r}.500`,`${r}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:s(`${r}.700`,`${r}.500`)(e)}}}),Zl=o({bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"}),Jl={ghost:Jr,outline:Yl,solid:Kl,link:Ql,unstyled:Zl},es={lg:o({h:"12",minW:"12",fontSize:"lg",px:"6"}),md:o({h:"10",minW:"10",fontSize:"md",px:"4"}),sm:o({h:"8",minW:"8",fontSize:"sm",px:"3"}),xs:o({h:"6",minW:"6",fontSize:"xs",px:"2"})},rs=S({baseStyle:Ul,variants:Jl,sizes:es,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}}),{definePartsStyle:U,defineMultiStyleConfig:ts}=b(zo.keys),Fe=v("card-bg"),R=v("card-padding"),et=v("card-shadow"),Ae=v("card-radius"),rt=v("card-border-width","0"),tt=v("card-border-color"),os=U({container:{[Fe.variable]:"colors.chakra-body-bg",backgroundColor:Fe.reference,boxShadow:et.reference,borderRadius:Ae.reference,color:"chakra-body-text",borderWidth:rt.reference,borderColor:tt.reference},body:{padding:R.reference,flex:"1 1 0%"},header:{padding:R.reference},footer:{padding:R.reference}}),as={sm:U({container:{[Ae.variable]:"radii.base",[R.variable]:"space.3"}}),md:U({container:{[Ae.variable]:"radii.md",[R.variable]:"space.5"}}),lg:U({container:{[Ae.variable]:"radii.xl",[R.variable]:"space.7"}})},ns={elevated:U({container:{[et.variable]:"shadows.base",_dark:{[Fe.variable]:"colors.gray.700"}}}),outline:U({container:{[rt.variable]:"1px",[tt.variable]:"colors.chakra-border-color"}}),filled:U({container:{[Fe.variable]:"colors.chakra-subtle-bg"}}),unstyled:{body:{[R.variable]:0},header:{[R.variable]:0},footer:{[R.variable]:0}}},is=ts({baseStyle:os,variants:ns,sizes:as,defaultProps:{variant:"elevated",size:"md"}}),ce=x("close-button-size"),oe=x("close-button-bg"),ls=o({w:[ce.reference],h:[ce.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[oe.variable]:"colors.blackAlpha.100",_dark:{[oe.variable]:"colors.whiteAlpha.100"}},_active:{[oe.variable]:"colors.blackAlpha.200",_dark:{[oe.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:oe.reference}),ss={lg:o({[ce.variable]:"sizes.10",fontSize:"md"}),md:o({[ce.variable]:"sizes.8",fontSize:"xs"}),sm:o({[ce.variable]:"sizes.6",fontSize:"2xs"})},ds=S({baseStyle:ls,sizes:ss,defaultProps:{size:"md"}}),{variants:cs,defaultProps:bs}=se,us=o({fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm"}),vs=S({baseStyle:us,variants:cs,defaultProps:bs}),fs=o({w:"100%",mx:"auto",maxW:"prose",px:"4"}),ms=S({baseStyle:fs}),gs=o({opacity:.6,borderColor:"inherit"}),hs=o({borderStyle:"solid"}),ps=o({borderStyle:"dashed"}),ys={solid:hs,dashed:ps},Ss=S({baseStyle:gs,variants:ys,defaultProps:{variant:"solid"}}),{definePartsStyle:xs,defineMultiStyleConfig:$s}=b(to.keys),ks=o({borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}}),_s=o({transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"}),ws=o({pt:"2",px:"4",pb:"5"}),Cs=o({fontSize:"1.25em"}),zs=xs({container:ks,button:_s,panel:ws,icon:Cs}),As=$s({baseStyle:zs}),{definePartsStyle:fe,defineMultiStyleConfig:Ps}=b(oo.keys),A=v("alert-fg"),W=v("alert-bg"),Ts=fe({container:{bg:W.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:A.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:A.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function or(e){const{theme:r,colorScheme:t}=e,a=ee(`${t}.200`,.16)(r);return{light:`colors.${t}.100`,dark:a}}var Fs=fe(e=>{const{colorScheme:r}=e,t=or(e);return{container:{[A.variable]:`colors.${r}.500`,[W.variable]:t.light,_dark:{[A.variable]:`colors.${r}.200`,[W.variable]:t.dark}}}}),Is=fe(e=>{const{colorScheme:r}=e,t=or(e);return{container:{[A.variable]:`colors.${r}.500`,[W.variable]:t.light,_dark:{[A.variable]:`colors.${r}.200`,[W.variable]:t.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:A.reference}}}),Bs=fe(e=>{const{colorScheme:r}=e,t=or(e);return{container:{[A.variable]:`colors.${r}.500`,[W.variable]:t.light,_dark:{[A.variable]:`colors.${r}.200`,[W.variable]:t.dark},pt:"2",borderTopWidth:"4px",borderTopColor:A.reference}}}),Ms=fe(e=>{const{colorScheme:r}=e;return{container:{[A.variable]:"colors.white",[W.variable]:`colors.${r}.500`,_dark:{[A.variable]:"colors.gray.900",[W.variable]:`colors.${r}.200`},color:A.reference}}}),Es={subtle:Fs,"left-accent":Is,"top-accent":Bs,solid:Ms},Ds=Ps({baseStyle:Ts,variants:Es,defaultProps:{variant:"subtle",colorScheme:"blue"}}),{definePartsStyle:ot,defineMultiStyleConfig:js}=b(ao.keys),J=v("avatar-border-color"),Ye=v("avatar-bg"),Rs=o({borderRadius:"full",border:"0.2em solid",[J.variable]:"white",_dark:{[J.variable]:"colors.gray.800"},borderColor:J.reference}),Ws=o({[Ye.variable]:"colors.gray.200",_dark:{[Ye.variable]:"colors.whiteAlpha.400"},bgColor:Ye.reference}),Hr=v("avatar-background"),Hs=o(e=>{const{name:r,theme:t}=e,a=r?Uo({string:r}):"colors.gray.400",n=No(a)(t);let i="white";return n||(i="gray.800"),{bg:Hr.reference,"&:not([data-loaded])":{[Hr.variable]:a},color:i,[J.variable]:"colors.white",_dark:{[J.variable]:"colors.gray.800"},borderColor:J.reference,verticalAlign:"top"}}),Ls=ot(e=>({badge:C(Rs,e),excessLabel:C(Ws,e),container:C(Hs,e)}));function L(e){const r=e!=="100%"?Ur[e]:void 0;return ot({container:{width:e,height:e,fontSize:`calc(${r??e} / 2.5)`},excessLabel:{width:e,height:e},label:{fontSize:`calc(${r??e} / 2.5)`,lineHeight:e!=="100%"?r??e:void 0}})}var Vs={"2xs":L(4),xs:L(6),sm:L(8),md:L(12),lg:L(16),xl:L(24),"2xl":L(32),full:L("100%")},Os=js({baseStyle:Ls,sizes:Vs,defaultProps:{size:"md"}}),qs={Accordion:As,Alert:Ds,Avatar:Os,Badge:se,Breadcrumb:Gl,Button:rs,Checkbox:Te,CloseButton:ds,Code:vs,Container:ms,Divider:Ss,Drawer:hl,Editable:_l,Form:Tl,FormError:Dl,FormLabel:Rl,Heading:Ll,Input:u,Kbd:si,Link:ci,List:mi,Menu:wi,Modal:Di,NumberInput:Ni,PinInput:Xi,Popover:il,Progress:fn,Radio:zn,Select:Mn,Skeleton:Dn,SkipLink:Rn,Slider:Xn,Spinner:Zn,Stat:ii,Switch:da,Table:ga,Tabs:Fa,Tag:qa,Textarea:tn,Tooltip:nn,Card:is},Ns={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"}}},Gs={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"}}},Us="ltr",Ys={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},at={semanticTokens:Ns,direction:Us,...ro,components:qs,styles:Gs,config:Ys};function ie(e){return typeof e=="function"}function Xs(...e){return r=>e.reduce((t,a)=>a(t),r)}var Ks=e=>function(...t){let a=[...t],n=t[t.length-1];return Ft(n)&&a.length>1?a=a.slice(0,a.length-1):n=e,Xs(...a.map(i=>l=>ie(i)?i(l):Zs(l,i)))(n)},Qs=Ks(at);function Zs(...e){return Vr({},...e,nt)}function nt(e,r,t,a){if((ie(e)||ie(r))&&Object.prototype.hasOwnProperty.call(a,t))return(...n)=>{const i=ie(e)?e(...n):e,l=ie(r)?r(...n):r;return Vr({},i,l,nt)}}function Js(e={}){const{strict:r=!0,errorMessage:t="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:a}=e,n=_.createContext(void 0);n.displayName=a;function i(){var l;const d=_.useContext(n);if(!d&&r){const c=new Error(t);throw c.name="ContextError",(l=Error.captureStackTrace)==null||l.call(Error,c,i),c}return d}return[n.Provider,i,n]}function ed(e){const{cssVarsRoot:r,theme:t,children:a}=e,n=_.useMemo(()=>ut(t),[t]);return y.jsxs(vt,{theme:n,children:[y.jsx(rd,{root:r}),a]})}function rd({root:e=":host, :root"}){const r=[e,"[data-theme]"].join(",");return y.jsx(Ie,{styles:t=>({[r]:t.__cssVars})})}Js({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `` "});function td(){const{colorMode:e}=ft();return y.jsx(Ie,{styles:r=>{const t=mt(r,"styles.global"),a=gt(t,{theme:r,colorMode:e});return a?ht(a)(r):void 0}})}var it=_.createContext({getDocument(){return document},getWindow(){return window}});it.displayName="EnvironmentContext";function lt(e){const{children:r,environment:t,disabled:a}=e,n=_.useRef(null),i=_.useMemo(()=>t||{getDocument:()=>{var d,c;return(c=(d=n.current)==null?void 0:d.ownerDocument)!=null?c:document},getWindow:()=>{var d,c;return(c=(d=n.current)==null?void 0:d.ownerDocument.defaultView)!=null?c:window}},[t]),l=!a||!t;return y.jsxs(it.Provider,{value:i,children:[r,l&&y.jsx("span",{id:"__chakra_env",hidden:!0,ref:n})]})}lt.displayName="EnvironmentProvider";var od=e=>{const{children:r,colorModeManager:t,portalZIndex:a,resetCSS:n=!0,theme:i={},environment:l,cssVarsRoot:d,disableEnvironment:c}=e,$=y.jsx(lt,{environment:l,disabled:c,children:r});return y.jsx(ed,{theme:i,cssVarsRoot:d,children:y.jsxs(qr,{colorModeManager:t,options:i.config,children:[n?y.jsx(wt,{}):y.jsx(_t,{}),y.jsx(td,{}),a?y.jsx(St,{zIndex:a,children:$}):$]})})},ad=e=>function({children:t,theme:a=e,toastOptions:n,...i}){return y.jsxs(od,{theme:a,...i,children:[y.jsx(xt,{value:n==null?void 0:n.defaultOptions,children:t}),y.jsx($t,{...n})]})},nd=ad(at);function p(e,r,t=!1){e=String(e),r=String(r);const a=Array.from({length:21},(d,c)=>c*50),n=["0","5","10","15","20","25","30","35","40","45","50","55","59","64","68","73","77","82","86","95","100"],i={},l={};return a.forEach((d,c)=>{i[d]=`hsl(${e}, ${r}%, ${n[a.length-1-c]}%)`,l[d]=`hsl(${e}, ${r}%, ${n[c]}%)`}),t?l:i}const st={base:p(225,15),accent:p(250,50),working:p(47,67),warning:p(28,75),ok:p(113,70),error:p(0,76),gridLineColor:"rgba(255, 255, 255, 0.2)"};function m(e,r={}){let t=!1;function a(){if(!t){t=!0;return}throw new Error("[anatomy] .part(...) should only be called once. Did you mean to use .extend(...) ?")}function n(...g){a();for(const h of g)r[h]=c(h);return m(e,r)}function i(...g){for(const h of g)h in r||(r[h]=c(h));return m(e,r)}function l(){return Object.fromEntries(Object.entries(r).map(([h,k])=>[h,k.selector]))}function d(){return Object.fromEntries(Object.entries(r).map(([h,k])=>[h,k.className]))}function c(g){const F=`chakra-${(["container","root"].includes(g??"")?[e]:[e,g]).filter(Boolean).join("__")}`;return{className:F,selector:`.${F}`,toString:()=>g}}return{parts:n,toPart:c,extend:i,selectors:l,classnames:d,get keys(){return Object.keys(r)},__type:{}}}var id=m("accordion").parts("root","container","button","panel").extend("icon");m("alert").parts("title","description","container").extend("icon","spinner");m("avatar").parts("label","badge","container").extend("excessLabel","group");m("breadcrumb").parts("link","item","container").extend("separator");m("button").parts();var ld=m("checkbox").parts("control","icon","container").extend("label");m("progress").parts("track","filledTrack").extend("label");m("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer");m("editable").parts("preview","input","textarea");m("form").parts("container","requiredIndicator","helperText");m("formError").parts("text","icon");var sd=m("input").parts("addon","field","element");m("list").parts("container","item","icon");var dd=m("menu").parts("button","list","item").extend("groupTitle","command","divider"),cd=m("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),bd=m("numberinput").parts("root","field","stepperGroup","stepper");m("pininput").parts("field");var ud=m("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),vd=m("progress").parts("label","filledTrack","track");m("radio").parts("container","control","label");var fd=m("select").parts("field","icon"),md=m("slider").parts("container","track","thumb","filledTrack","mark");m("stat").parts("container","label","helpText","number","icon");var gd=m("switch").parts("container","track","thumb");m("table").parts("table","thead","tbody","tr","th","td","tfoot","caption");var hd=m("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator");m("tag").parts("container","label","closeButton");m("card").parts("container","header","body","footer");const{definePartsStyle:pd,defineMultiStyleConfig:yd}=b(id.keys),Sd=o({border:"none"}),xd=o(e=>{const{colorScheme:r}=e;return{fontWeight:"600",fontSize:"sm",border:"none",borderRadius:"base",bg:`${r}.800`,color:"base.100",_hover:{bg:`${r}.700`},_expanded:{bg:`${r}.750`,borderBottomRadius:"none",_hover:{bg:`${r}.700`}}}}),$d=o(e=>{const{colorScheme:r}=e;return{bg:`${r}.800`,borderRadius:"base",borderTopRadius:"none"}}),kd=o({}),_d=pd(e=>({container:Sd,button:xd(e),panel:$d(e),icon:kd})),wd=yd({variants:{invokeAI:_d},defaultProps:{variant:"invokeAI",colorScheme:"base"}}),Cd=o(e=>{const{colorScheme:r}=e,t={bg:`${r}.600`,color:`${r}.100`,svg:{fill:`${r}.100`}};return{bg:`${r}.700`,color:`${r}.100`,borderRadius:"base",svg:{fill:`${r}.100`},_disabled:t,_hover:{bg:`${r}.650`,color:`${r}.50`,svg:{fill:`${r}.50`},_disabled:t},_checked:{bg:"accent.700",color:"accent.100",svg:{fill:"accent.100"},_disabled:t,_hover:{bg:"accent.600",color:"accent.50",svg:{fill:"accent.50"},_disabled:t}}}}),zd=S({variants:{invokeAI:Cd},defaultProps:{variant:"invokeAI",colorScheme:"base"}}),{definePartsStyle:Ad,defineMultiStyleConfig:Pd}=b(ld.keys),Td=o(e=>{const{colorScheme:r}=e;return{_checked:{bg:`${r}.200`,borderColor:`${r}.200`,color:"base.900",_hover:{bg:`${r}.300`,borderColor:`${r}.300`},_disabled:{borderColor:"transparent",bg:"whiteAlpha.300",color:"whiteAlpha.500"}},_indeterminate:{bg:`${r}.200`,borderColor:`${r}.200`,color:"base.900"},_disabled:{bg:"whiteAlpha.100",borderColor:"transparent"},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:"red.300"}}}),Fd=Ad(e=>({control:Td(e)})),Id=Pd({variants:{invokeAI:Fd},defaultProps:{variant:"invokeAI",colorScheme:"accent"}}),Bd=o(e=>({fontSize:"sm",marginEnd:0,mb:1,fontWeight:"400",transitionProperty:"common",transitionDuration:"normal",whiteSpace:"nowrap",_disabled:{opacity:.4},color:"base.300"})),Md=S({variants:{invokeAI:Bd},defaultProps:{variant:"invokeAI"}}),Ee=e=>({outline:"none",borderWidth:2,borderStyle:"solid",borderColor:"base.800",bg:"base.900",borderRadius:"base",color:"base.100",boxShadow:"none",_hover:{borderColor:"base.600"},_focus:{borderColor:"accent.700",boxShadow:"none",_hover:{borderColor:"accent.600"}},_invalid:{borderColor:"error.700",boxShadow:"none",_hover:{borderColor:"error.600"}},_disabled:{borderColor:"base.700",bg:"base.700",color:"base.400",_hover:{borderColor:"base.700"}},_placeholder:{color:"base.400"}}),{definePartsStyle:Ed,defineMultiStyleConfig:Dd}=b(sd.keys),jd=Ed(e=>({field:Ee()})),Rd=Dd({variants:{invokeAI:jd},defaultProps:{size:"sm",variant:"invokeAI"}}),{definePartsStyle:Wd,defineMultiStyleConfig:Hd}=b(dd.keys),Ld=Wd({button:{fontWeight:"600",bg:"base.500",color:"base.200",_hover:{bg:"base.600",color:"white"}},list:{zIndex:9999,bg:"base.800"},item:{fontSize:"sm",bg:"base.800",_hover:{bg:"base.750"},_focus:{bg:"base.700"}}}),Vd=Hd({variants:{invokeAI:Ld},defaultProps:{variant:"invokeAI"}}),{defineMultiStyleConfig:Od,definePartsStyle:qd}=b(cd.keys),Nd=o({bg:"blackAlpha.600"}),Gd=o({}),Ud=o(e=>({bg:"base.850",maxH:"80vh"})),Yd=o(e=>({fontWeight:"600",fontSize:"lg",color:"base.200"})),Xd=o({}),Kd=o({overflowY:"scroll"}),Qd=o({}),Zd=qd(e=>({overlay:Nd,dialogContainer:Gd,dialog:Ud(e),header:Yd(e),closeButton:Xd,body:Kd,footer:Qd})),Jd=Od({variants:{invokeAI:Zd},defaultProps:{variant:"invokeAI",size:"lg"}}),{defineMultiStyleConfig:ec,definePartsStyle:rc}=b(bd.keys),tc=o(e=>({height:8})),oc=o(e=>({border:"none",fontWeight:"600",height:"auto",py:1,ps:2,pe:6,...Ee()})),ac=o(e=>({display:"flex"})),nc=o(e=>({border:"none",px:2,py:0,mx:-2,my:0,svg:{color:"base.300",width:2.5,height:2.5,_hover:{color:"base.50"}}})),ic=rc(e=>({root:tc(e),field:oc(e),stepperGroup:ac(e),stepper:nc(e)})),lc=ec({variants:{invokeAI:ic},defaultProps:{size:"sm",variant:"invokeAI"}});function sc(e){return!Number.isInteger(parseFloat(e.toString()))}function dc(e,r="-"){return e.replace(/\s+/g,r)}function dt(e){const r=dc(e.toString());return r.includes("\\.")?e:sc(e)?r.replace(".","\\."):e}function cc(e,r=""){return[r,dt(e)].filter(Boolean).join("-")}function bc(e,r){return`var(${dt(e)}${r?`, ${r}`:""})`}function uc(e,r=""){return`--${cc(e,r)}`}function ar(e,r){const t=uc(e,r==null?void 0:r.prefix);return{variable:t,reference:bc(t,vc(r==null?void 0:r.fallback))}}function vc(e){return typeof e=="string"?e:e==null?void 0:e.reference}const{defineMultiStyleConfig:fc,definePartsStyle:mc}=b(ud.keys),gc=ar("popper-bg"),hc=ar("popper-arrow-bg"),pc=ar("popper-arrow-shadow-color"),yc=o(e=>({[hc.variable]:"colors.base.800",[gc.variable]:"colors.base.800",[pc.variable]:"colors.base.600",minW:"unset",width:"unset",p:4,borderWidth:"2px",borderStyle:"solid",borderColor:"base.600",bg:"base.800"})),Sc=mc(e=>({content:yc(e)})),xc=fc({variants:{invokeAI:Sc},defaultProps:{variant:"invokeAI"}}),{defineMultiStyleConfig:$c,definePartsStyle:kc}=b(vd.keys),_c=o(e=>({bg:"accent.600",transition:"width 0.2s ease-in-out",_indeterminate:{bgGradient:"linear(to-r, transparent 0%, accent.600 50%, transparent 100%);"}})),wc=o(e=>({bg:"base.800"})),Cc=kc(e=>({filledTrack:_c(e),track:wc(e)})),zc=$c({variants:{invokeAI:Cc},defaultProps:{variant:"invokeAI"}}),Ac={"::-webkit-scrollbar":{display:"none"},scrollbarWidth:"none"},{definePartsStyle:Pc,defineMultiStyleConfig:Tc}=b(fd.keys),Fc=o(e=>({color:"base.300"})),Ic=o(e=>({fontWeight:"600",...Ee()})),Bc=Pc(e=>({field:Ic(e),icon:Fc(e)})),Mc=Tc({variants:{invokeAI:Bc},defaultProps:{size:"sm",variant:"invokeAI"}}),{definePartsStyle:Ec,defineMultiStyleConfig:Dc}=b(md.keys),jc=o(e=>({bg:"base.400",h:1.5})),Rc=o(e=>{const{colorScheme:r}=e;return{bg:`${r}.600`,h:1.5}}),Wc=o(e=>({w:2,h:4})),Hc=o(e=>({fontSize:"xs",fontWeight:"500",color:"base.200",mt:2,insetInlineStart:"unset"})),Lc=Ec(e=>({track:jc(e),filledTrack:Rc(e),thumb:Wc(e),mark:Hc(e)})),Vc=Dc({variants:{invokeAI:Lc},defaultProps:{variant:"invokeAI",colorScheme:"accent"}}),{defineMultiStyleConfig:Oc,definePartsStyle:qc}=b(gd.keys),Nc=o(e=>{const{colorScheme:r}=e;return{bg:"base.600",_focusVisible:{boxShadow:"none"},_checked:{bg:`${r}.600`}}}),Gc=o(e=>{const{colorScheme:r}=e;return{bg:`${r}.50`}}),Uc=qc(e=>({container:{},track:Nc(e),thumb:Gc(e)})),Yc=Oc({variants:{invokeAI:Uc},defaultProps:{size:"md",variant:"invokeAI",colorScheme:"accent"}}),{defineMultiStyleConfig:Xc,definePartsStyle:Kc}=b(hd.keys),Qc=o(e=>({display:"flex",columnGap:4})),Zc=o(e=>({})),Jc=o(e=>({display:"flex",flexDirection:"column",gap:1,color:"base.700",button:{fontSize:"sm",padding:2,borderRadius:"base",_selected:{bg:"accent.700",color:"accent.100",_hover:{bg:"accent.600",color:"accent.50"}},_hover:{bg:"base.600",color:"base.50"}}})),e0=o(e=>({padding:0,height:"100%"})),r0=Kc(e=>({root:Qc(e),tab:Zc(e),tablist:Jc(e),tabpanel:e0(e)})),t0=Xc({variants:{invokeAI:r0},defaultProps:{variant:"invokeAI"}}),o0=o(e=>({color:"base.400"})),a0=S({variants:{subtext:o0}}),n0=o(e=>Ee()),i0=S({variants:{invokeAI:n0},defaultProps:{size:"md",variant:"invokeAI"}}),l0={config:{cssVarPrefix:"invokeai"},styles:{global:e=>({body:{bg:"base.900",color:"base.50",overflow:"hidden"},"*":{...Ac}})},direction:"ltr",fonts:{body:"'Inter', sans-serif"},shadows:{light:{accent:"0 0 10px 0 var(--invokeai-colors-accent-300)",accentHover:"0 0 10px 0 var(--invokeai-colors-accent-400)",ok:"0 0 7px var(--invokeai-colors-ok-600)",working:"0 0 7px var(--invokeai-colors-working-600)",error:"0 0 7px var(--invokeai-colors-error-600)"},dark:{accent:"0 0 10px 0 var(--invokeai-colors-accent-600)",accentHover:"0 0 10px 0 var(--invokeai-colors-accent-500)",ok:"0 0 7px var(--invokeai-colors-ok-400)",working:"0 0 7px var(--invokeai-colors-working-400)",error:"0 0 7px var(--invokeai-colors-error-400)"}},colors:{...st},components:{Button:zd,Input:Rd,Textarea:i0,Tabs:t0,Progress:zc,Accordion:wd,FormLabel:Md,Switch:Yc,NumberInput:lc,Select:Mc,Slider:Vc,Popover:xc,Modal:Jd,Checkbox:Id,Menu:Vd,Text:a0}},s0={base:p(223,10),accent:p(155,80),working:p(47,68),warning:p(28,75),ok:p(122,49),error:p(0,50),gridLineColor:"rgba(255, 255, 255, 0.2)"},d0={base:p(223,10,!0),accent:p(40,80,!0),working:p(47,68,!0),warning:p(28,75,!0),ok:p(122,49,!0),error:p(0,50,!0),gridLineColor:"rgba(0, 0, 0, 0.2)"},c0={base:p(220,30),accent:p(210,80),working:p(47,68),warning:p(28,75),ok:p(122,49),error:p(0,100),gridLineColor:"rgba(136, 148, 184, 0.2)"},b0={dark:st,light:d0,green:s0,ocean:c0};function f0({children:e}){const{i18n:r}=pt(),t=kt(i=>i.ui.currentTheme),a=r.dir(),n=Qs({...l0,colors:b0[t],direction:a});return _.useEffect(()=>{document.body.dir=a},[a]),y.jsx(nd,{theme:n,children:e})}export{f0 as default}; diff --git a/invokeai/frontend/web/dist/assets/index-5483945c.css b/invokeai/frontend/web/dist/assets/index-5483945c.css deleted file mode 100644 index 395fcc729a..0000000000 --- a/invokeai/frontend/web/dist/assets/index-5483945c.css +++ /dev/null @@ -1 +0,0 @@ -@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:100;src:url(./inter-cyrillic-ext-100-normal-a1f4d02d.woff2) format("woff2"),url(./inter-all-100-normal-2596a8cd.woff) format("woff");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:100;src:url(./inter-cyrillic-100-normal-9747741a.woff2) format("woff2"),url(./inter-all-100-normal-2596a8cd.woff) format("woff");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:100;src:url(./inter-greek-ext-100-normal-71976b96.woff2) format("woff2"),url(./inter-all-100-normal-2596a8cd.woff) format("woff");unicode-range:U+1F00-1FFF}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:100;src:url(./inter-greek-100-normal-a44b9fc9.woff2) format("woff2"),url(./inter-all-100-normal-2596a8cd.woff) format("woff");unicode-range:U+0370-03FF}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:100;src:url(data:font/woff2;base64,d09GMgABAAAAAA6IABAAAAAAIpgAAA4qAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGmQbh2YcKgZgP1NUQVREAII4EQgKqiikYAuCEgABNgIkA4QgBCAFhDAHIAwHG6gdo6KEtKaP7C8WOCdWB0/8EUAQpJhsK9wKN21ulDGK8xnl/rCTFtIvmWeLh6e19P2Z3bsAsYrwLFSMJbSR4aKPLbCqkeRYqXYMnubs5202m81ugMWDp4ZowKvZfsxSTIMGfPEI0NScE69wYp46/Zean3DuOSOowqUAfNEJ+PsfALbw4Lmf7OC3g1+bKMwuEknBq3rk/+33rf75983hrZg8xEN0a5YIUe/O8/0zKyaI+V9U0h7SkuliFhp0DhU/XbwRUsNDT5hZOlZKqXCMH2I4FMdxFCF8BfqbywrQASBxT/8ywpMaESgYESoaESsFkWY5YqVcRL4CRJFyRJUaRJ1ORBcJMWwMMW0aQUAbNQ1qM6eoAoFrGR1AILLdMTwAAeHOBxAgYVG8FEBxCRAxhwbD/b3qN1WNHDVAZaGhjDJQdwtC4ytIqRM0pE95iDDDWsosr6wlEsBFoQlHb0wrn8OaMHLB3F4YdD5fmBFmllk0aupTtCG9XT0QoETSmpURyoxv6hwRvKuMah8e6Eb8BbZehFnfirA+i8FfuAiRokSLpZUoSbIUa2XJV6pKtRqN+vQbMIhSzaCGAdH1M3XxJPEi8SbxIfEl8SPxJ1GTBJEEk2Qy0DN4j5SpIiliIJIkmeUAjqftBeJt+zDxtf0S8SdqEkSCXcRTTFH9YQDgBr6ghmUQ70r6q4AOcqEAqlmMSwggcjsQJAh4Qi4XSyFOAo5WCkUksEARpriK+8d3epU6dTzU6ySLB5oouXtatQlwIHfJIkHRFP0HL67CB2+q/JsDk84SDQSvLD+dT4s7LC5UzXh/o4bmUuNefJeE/IM9XyaRZ0BCz0DHWqc/7NYVl8MeSfO67cW/Gmh7kV4QD9DAAjNUCIJFgQEUWECdG7tGiQdwvIFRIiBoAgJEr3aQEVT4A+UPkEAGA2QIGEDHUtBHIEOFjHhGVHST++PD1F+a18VFJCJEZHSR2Xg/NZuvhtP8fRC8+PD7iEqDhTb5j9tK0/IFqhKnS6g6sbrJ5KDlkluLkUkhCyub0v9wVuGtoaLjRuRuNU9FvBTzVsJHKV96ftbxV0atXJBqwWqEqafRYJFGizVZotlSBsu0CNcqQptI7aJ0iNYpXo8EvbT6JOqXZECyQSkkaYalG5Fh1HJjCFLoBlxC9IAVyH1Qj0P9nLwMqFGFDi8jub5Cz6CRjTxQ+npdYJbX1nAbpLUZvFa4xaNmWxOySNVdgKX9KlpFCz2s0OPHYWp4r78QceJQVvpz/gP12ZXqLqHDnaYEocu/SS8vNNVVI7rcSluSMMnj4jkrb+YsnMmT0KsibntuVXdDfqJyJx57TlFzjc9bzJzVRDzgZvXm1fAkNLxZ8wtZN/KH2/lJ2Sb187tem7XpFtRtHZzaKM437VZW/jKuIFeZ2VJhtvHjWHTJ6mftIZU41eWeXDXULmLmrbyJ4RT9OyklG66yq1MFIRvoEW8iBXhvka4tsJyMu9RV1S6mCHkM2xXpVLCRbOclyQZ1G1pW8grezFkb5CtYnNzFcr7rQF94X8iuwDAWYSzBt+NLbssKs2XneG9Np1UDW69XuW3OU8DGj6ox8w0Tl2HDy9w2u60yXbWkkjdzhLuEuWniiyLWRt6UeVOWZNc6XLS6VYHnXpaS6mrLB4V84kvelldYjXy7tZPvSBXtHDFyCaw5zBw5YfZrsAmmhLM+2+ajCnKOXGNVnc2oWnJsWXkZV0hzXYPpcEE9X5ONqI6vZUFeoaUM2xoqBWn2pVPXzgFwZ2CnBqfTK1YY+Q6us30wmj3NxxkHarm6dWpLmCBjY9DOceNkKuCVtOXemOSVU2dmJR5+C++txy47sGtOlN0fsevZMZsVN4ea9NRlxSqeY0M2v/Wa+BpqnKIzeM8XZ55HPKKPPT7yCRcrxgbd+suV41iDnHnHY79qawAWIlj4HhNEpwgRLLJEenZOnJvViFCztQti/BiWX74+xf7735Ty0vWM3romGf/+qzG/oC4j/PhbBufXXxn+OPFW5NKj3PD3t1+3OPEpi7Ht+0W8deDoK+Hi/oix+0i583b/PhYXkxeds+cUvnXxfPHbh3NwRjOa9Z1nohKePHw4oXzs34Ftbr+IqazH7ug0B4hdgRPlSbsK412LMSz00Ue/Y+nHo4+nUxyiA/vCpi8ZbSdnShK3Tw1+UvqcTzf/ZtiYblXD899fOfHAz3sTbK8uab5j1+lC09hrWRssmQ+36sUMNsF4970nKkZ0t36/f5f6ja9eKglrVY94rlWc9v+2peW21me+Og+tqHlFeW6f8dNPbjEqz79kOd1+1xsR69ntIliINjZq+o43HB0W3YPf2dcXnDtnK6CMBx6AbevJ+qcJqdCcij3/sPGTTx4xhp1/eetnQ4+famLuEM+JM6/fFet6fv9B15v3ZMreY0/t1rudOrzX3ja64e3kgG17LhqhBgMRDCiFOrAycGeeOzGSoXk57NwjXZ98+ohRprz8cuj5R1tYXf2FX9I9SL17R+G5c3cWEPuDD1B2QqDG/JMW9V/sFV/Ycfh+XqxRdObGbIv8IsdfVUqc7Js/sPgbmzrxx75D9367Zcu397Ii63C5HNsvjJnOoolJEafv36zN+k6IFcbVCds8jp6x33ylLqLa58hEa9QDfpPrI4fXfbqECc7SbHmOTQ+WFWlUL2ru2GTLxGuiXURU57z/s/qIZ5EUPh/x5PBvSD8xG5N8aChiByeE5aNg4a1Q/enWeNtYZ3ZbYpmuIjE9a6TSI9vlW3enVC/WJ+p1dYliyWA14rdD7Bk3d3dz2z1i6bqKkpLvAJFfbBePDDP1WShG/WiZFYfuwcw0jGgaGW5SwLV+FYeOUFxzH/3Rvfcs0b+8pPwKnt37cpj+njBEfnn3ba9vFR8oZ8rDw0J6UhpwaBy7OwozW4pyFYj+8v/GG+nYeZeyuEnKwdqaXH1uavKasttPbrWkRSpKyYt57D3DT6vLQH1hn1gvTKyveGfOdtufPzbrXc2ImRMzq0Jmibt6s1n89qHfsMiv8/Gb4gNDTL1Oh6KxYgsO3Y1bzKjRj/Q3KrD0qgfJzvzTo23TYMnyUq3rf4nPiU2lfNGfQvvGgYI0/jJrdTmJdn2THqqjdtEpggoHAaCAlQRTqs0U0w60mWQEalWbTeQItbTNZrxE1bTZQmzEqWwlPuSYfwTMm6Fi26wn28l37ja02UCaqJSZG0kOlRc0vJUEg4CQMvQxg48GxYKnKLAZwAkqwGtUgM1UADUVqNqVoUsCsDvYy6XlAU1lWmWqhCnaAEgh3opgfXwwx0NG5EVZpBAv0ieFeFEZNAQcNAQcRiyENpsg7RSHmPC+2dJEGwsxUDACIAYsBrAcqHHN6wQOEdsKumismOc1m8y47mNFqgc0IvXLhAaaCiqaCg/BimZWPAelrCfBru94RJkF7Sj/t96Njf3QAvELpBWBuAGx4ociV8HgEZvxWBWDzXlfk7QikPi4pBWBeMylKdOhzSZQ/hAgb/o2ar8MBBGskDCOeZdKFH4YECsKvXCNscUQl4raeGEnLxyZc5IWQh4thPdF4bw2eb+BA1CZYFmYBHgle8k+ExU/bMgQtR6uVfrI4H1ROxrYq1GbzbChBo9QRGthnta6z8eSumYMJky9t+kns51Z9LKMru7lRjjbqVHS6Edw8O4Wzgap23mJdoNd6nbW0G7wgaFs02yvo9zp2qkQsBuGZMvSh2bgAegW1r/u+vKfj1yDvx5aePctCgDQADB9nMgLGYLVubwAuopK1Mb1Vh9OQyPpUnpJVFkKQEQUymdZlgFvXvBUfjUHE8yvwhfai5dKA3kbc71nMU4DDSB7zbpoIECt4wWiKc1CZlnAIeGKPjZYdn2G0EFXUYnauN7qxWkOcQ83A29eyFJ+ZUEswu4nOte8AhohL6hzWAAtjEbBFnMzRkmzIhZh98MAMIYairyQkcNCo0UjRAbesk6l32cBkpWRSKtqsZToJWdVrfwp5SoK0mDcKcXIn1DauL6Wy6i5QMBLYK1RvBccSLL8IVZCYsTgpfhq6rxyFZ5gkEo/VNosXO9ZjNW4+gAZbV30F4CKUgpwcjUxKe6uiaci6VNTP1OuwjMaJPFJFH3K8ZSKQyywM+KtFLIVX1kWXWD2EsH1nVxLHkQI1jJAZBCaR8Fo2BmjlGJ10IhZmBTM/GcH1jTxZuCtFNDyBLg+AxSeLEAAyOgPWgIPypo9Vv3OBvEAgPd/eTMIAD6o1F/5c/7fyeAeFQAwoAAABPjXMCPEVpF/++0QIOiO9e1cBRzMHBrSeCjed33G9BFxJ3yhMyg7KmXXoBE7EO1q2Aw4WL9ezeiZX4JIdKyzW7EnzlEydhjGVv4b3mpyPK9nbsdL6HmN2xOooCQ4IRO17OrLwi+6gDGgbKdQ9wb3Z2hzKQgUiVAv/5TQveOzNWOEdsx0Rb/gctYm6s5ZyN/0LK7hEviJniFdwH/uwL/2ry1DNpur/F29T9xpP8zRmxFP1yFeDvTQ43iDnoGjDQGXnusgUSC6u6sR0OUZGamUgMf0CuFjxqbq9CFFJtoL3dKKXJr3FYZPXoq7lMIVARd1yZ7YaO+IeEAVfU4imbojLv/2t7thkMRsWDejLqM0kmhToUZFRjpuN9+AUR2GaegNG9SjQ5vx8muNGdVl0LARGpEBiFNLRqyQIIFRd/UyxrSK12ZQvwSg2COU3h3sHtWENWZlUvaljcb0aTEsWTytRMutVKZcsXIrPa3iSBVrgGwPKjeNSx/P+xxHq0WqRFppOmi1huiz0VfFI9o+Klta2SPMwu0+YbO3jbUWpXIURZir8modH7CrfCasmi3Tjeu/lt2cn6Ps1R0A) format("woff2"),url(./inter-all-100-normal-2596a8cd.woff) format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EF9,U+20AB}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:100;src:url(./inter-latin-ext-100-normal-d3be20b3.woff2) format("woff2"),url(./inter-all-100-normal-2596a8cd.woff) format("woff");unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:100;src:url(./inter-latin-100-normal-61cac109.woff2) format("woff2"),url(./inter-all-100-normal-2596a8cd.woff) format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:200;src:url(./inter-cyrillic-ext-200-normal-82562199.woff2) format("woff2"),url(./inter-all-200-normal-34e907e6.woff) format("woff");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:200;src:url(./inter-cyrillic-200-normal-87d2e1ba.woff2) format("woff2"),url(./inter-all-200-normal-34e907e6.woff) format("woff");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:200;src:url(./inter-greek-ext-200-normal-45dafb12.woff2) format("woff2"),url(./inter-all-200-normal-34e907e6.woff) format("woff");unicode-range:U+1F00-1FFF}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:200;src:url(./inter-greek-200-normal-9575e0f8.woff2) format("woff2"),url(./inter-all-200-normal-34e907e6.woff) format("woff");unicode-range:U+0370-03FF}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:200;src:url(data:font/woff2;base64,d09GMgABAAAAAA7YABAAAAAAIrgAAA56AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGmQbh2YcKgZgP1NUQVREAII4EQgKqhikZwuCEgABNgIkA4QgBCAFhGAHIAwHG98dUdTI0Sp5ZD8TTLc7SDuXNe2Cl41ikP6LJXJ+d74XRfD///v9b659ztlH7vviSdFKaD9BIlmIDKpFjzcSGqPjjUijWrXQLX3ZP0/b6n1aBmUQo49NsMFa3LSxcXUIGxOxGHRUwsC+0/M2rUvdK6/dvdxq9qLtDdyLCgk+1n77TuuXUESRRqiemf6HKNZMQ9VGtUZLDKVov6uTz/9/7Vudt/e9tfmYJv0rjRDFpBIJ5f5h3sj/b9ZEZ8H/YuuIJw4Jook2InQOlZKWDKeTCCGKhlwx27+pd+VW8PCBHUbmdFiPUwgu9Td3RIAFAMC45Z8ZIuAD8RMACRICCRMDiRMP2UUByZAJyVYAUdNCitRC6pCQFm2Qbt0QBBh8iNAWr2UT4LdTQTWDH7R9p6UZcIgbDwAIYDho3GWC2CCAwgEDsBN/n05ojEIurdlSUJBvOpsqCFWeGVpSCwPYR/ICxwMAMcNEaSQYMwHP17pxgO4VDniDwC3v2AGd1OULeoTeRIZIFT8fUiBXzgMgMCT6lDETciAOjhU4IgGMrr3UTrwnTfYLbSeC3muDvB+ieNtOTCJYiDBSMlGixUiUIoOSmoZWqUZNmhnRaOho6SB19UHcCJDckYRIHkieSF5I3kg+SP5IAUjJdPLoRg+mUyMV0RGSkrrdg0tguoMITQ8hnqZXJt7Eh/iTAA8aSabh/WIAwBU8wQe2QYQn6rcC+0ABmaBRYjx4AGGafiD+gBF0pzBs4SJxScVgRwIHaISVrOb2/l2Zp0gRvmK16PHAIC7CLa85BbjA9NAjgd0c4xeerIYFb+ryOwdWOIfMD9yjvKQuzVPGBshlBH/DBHXkDwJ8L4PTFxfSHQwzBcAwOsDijPMbe2M9pwAuiCZ6NeZOtQDjxeYAPQPgOAAO8CAIBw2wiQa4gHZ4t45CfICHO80UwkEYcAiA2jgAEoQW3gDE7wBggATYRIcAmxixFWAdjo4WdCRQsAya1fzeX6JXsQElCJdEdZrRS3sz7dq4wu+XgLjz4PUepQYImvIft126ZfCjFq5OkCJhDOjSMCgwJWJJxpaCI5WLJFy7Yfbi2cdVAjd7CGRzl0MolwclT3m87Octn48C/jQCaN2jmEiJTUptVmaLclvpbFNhu0piVSSqBasRolaEepEaSDWSaRKlWTSjGKQ4LXZoJUeJ1wZB9YYVAMwAqAFwBFILKD2g3AFpHgAKWs39S1DLT3FkytBnLzR+1hjWthub2A52pgc3iia6V33eEIWylMBheN0V8Bj4ajuN2B5SvH1tZ/XyE6ln7gzvzX5lF59lfOHG4GB82bsyVsarTy4tP8DGsGbLXF4HxrVhFq6VaxYALuAh17FP1or6V+/y3BB/bH1Fu7zstO7rbjOjyq6PhICzBESatvZmtr7lT7n3f75K71/7wnX0M59rS+fGHXEu0/pW1rHRT9Zs2MLHBFpasngyLPZlZ5N0d1XzR70zEKLtH2/dniVd7xYWzIaZWVx208jiIup9lqnJGQj1Lt7gJqJGj7GQQgBn0LkfR6lH95hzj2ZKvhzYFywjd1dR79onjnIVxsYsZ8baLvfqAYxlabpyUmsFwB0J97iJEwNzJi5Fq7ZUdLVhFuvIhxfGR0+zPgD7++drbDPWZa/2ZedhXS9PPW6T+VnKYgS5uS8zm42x7H+Vvz3SaCvMew2DSojTLJQUjcb6TqFc/GMhuCObHqu21WI1OaOai/SSAja1KAMxGtUhlMmucKVGIyyqkpWLlpbUO0+qWVhQLXxMmF+rF9f+1MWYtplVEVZYjateWgo6FuQPdi8dUbyAcixE/9jtP1jY8fqSTY/VcGurjcVYte2hFlffXMgtOnM3rQZIDVN3Cf1h8j5cjLt2giki9irsSACrPTAmghwjSSjb3nxBV4aVgQg5HOT7NhAiLucGUSXL1DLofqV+cO9YvTANgX4nD1cuoXuoraLpX1avwR5IWX/7uV8jHAAcuoCDp8c9daI6kAAHivpj/ynqVAGfAj9t7+JgJmDP2vIQc8MQS2y799xcGmTBhmB9OMvuwHOzyk9XVpR3zx0L8j9zTPnZ2gqw/ZiFds60BZYuffKhb+PDvl1ztKqftz+cQQ5dwLz+wcU04sytm6ozlxTwHtBF29XjM0L/R0+dylg6+eNg//OQeZy4cdI0iTdSgj5V3LQtYFMD5gxHJQU33fivdTTCo3y2exaOiAZvGgbeOqxLPjRmuJUy7U65vu5XF78rYe6jq6eedB4MM7WEhDY9dWhZ0aE/FX+4TfVaj8zq6SJWjdx/Kb+JPHj7/q7fHr5bpQ5q9GrH258WfpivGyx/ZOlVkF4QnRS+NVH71RdTtcK33xi4VD3w5OZKnsYCHNqV/K2V/U9dru4gH759oj3mypX2qNvzDz/qPNEeffFie6zzFYhNEL0f/c7TNZ99PqcXv3eu9/Pa+YvVgueyLxjTnh7Gvnrk8PT3z45sop2IujAk/Wd+vvsEYbI4msM2Zx+ectYAHRYWYEH/jEuelkgmg8/0XTeFaLvonPjtZ/Sff/FMrfidc5W8Y3wu2FY8S87++OpA7HGFwZgfXpudJRasqLH9qIXia4PUpUdWz7GrihnVmeJRSdq+8S+lnPxNd6zAwvoXN7b9x/EnJr/o7/957jfrjxe+/Pak+UaDxQE6Vjw5lHL8IU0PVFTo94gHhdHP+1+hbF9EoXDflvrSLVPCtg5Ja+r5LXGe/UGDVdz8cv2SYeZWvXH0gTR4j1qkQJy2hp08FHYSZF5rYQ8SVhC3OMcLuS7oxioG8k/eDAYev/+oZ3NMDz9gTCwP37+TiNiRoFe7JNfy3chHh/VJReE5O1URexVVWpCmA9U1PT40KF/jXZSyoFyjIcohxOto441mVtFuSAZlh4LklD4HTw1AI+jMDVoXkO1fCZ6UiKeCJVNiySSEKpbaTNNDw8PTQ6a2zAKNVkNobndPBtgvB9gPca37sp990g/CNEutpomhwYHJowqtmfkatRqvwVhugKe0TGILj2WMKHHZfxhm9EpFfUY6B8Kvv0OZpu71It6aicrI12o0BVrdsVwBS2Ww5ado9+Ul7JDtzalWurFUjd1EVPr2uwli0rkvB+h+vs9M9JqnhOnKo7+tV06wKyE6PbLP0jzMlN3i7fywyvhPFWyTy83m0U2iK2OkfBCS1yqf1TM1sfGQZEps4qhn4VFLaYGpWsWG4D8jB40jm4Qi4eiQMStbyeeW9rcTO7KCryWEzIAmszvXFSvr7dgflRWcEJcSPINrMoDHevu6TlQHtBEIUNlCYqCCu4pxILiz0FpMcL+eN9/gAcxJSvCgqvWLc4g/dP0ILrOEyGJ374kmd1M7g3ultLDyPiXYnqCZbSEBHEEJvjLsUeG0mjNQXgEcYjiUMhwyGA43Gc6YHkKn+DoeLNfFwneqnO0TvgvJWacIVI5SzteDf0QgZVPSQFn+NFA2Ng2UNc0C6WUeC0H7dARl0sfspj5TR7A1agy0ACvUhnIW2lMW6xzwqxU2C5pYGCyo1F16nA4dVuwIyKzYTxNGWSzksVg4DTv3sXkF5ezxV/zivmzzoE1FfWrnEtzLGmHBfbzNnvJ+yfHlrC2eL3cDOeV090F+DA0eoj+u6wPqq+mZf5oFSC8dpo3TQYFYMQa3w60NTytrFFJplj+Lw5nNwtpq8nWhRGQt5iOhWTLyYFnwtJX1ujZ5f4IEgSqPZOv/k0JVMsPHIr7ZoKKFMiuHFQbiQAt7omoQhcv4SFkhBLBCeIkVNlWJ5VAoSu9wn8pz5t/K5+mmbD1de1jo4bPJ9HS3CjnfAEN6xwFU2fzJHSP+IVs3eBDECJPfehXFHFjui4f4MDioSVp45QL44KjqORlfHN8J4///z5+hAQC3gb+P4l+xmo6d+GAyRjCjUHi7DDkLYL7sPavakwBogsTyShN/wDHxA/u/lX06yRhDyxOROp6MIhQjDYacRJC+vXYBYPsTHzGsCrrRAD6V/nWwBfjHpwgOJmMEMwqFVx7yvayOcTgmflT/14OwtWmJ407FNcL/jBPTAOhRuIg2PMY1S/UibO0QWuBPPSz+lZgGGj0qERG84M0pbA7Q3yUAuaa2fMne86nOdaaLjL3kxADR551uFIpeLMtb7HyYC6d3NRDH2ayL5FWXhUSqCKz/VvPgLkMrQKT+1I0eoRhp0OTRBdKc1/4NYGudD7ckW4/X93uWI5I6qrmsy9BpNYr9xRySY6lnL9I2XhydjyspRDbwQf6Lb4tSS/8hYhzg8hi/cRFOtnHNcnml3xA2j8d+eqHoempxODg6Hz3vQCwBtdsABEjZrQ/fHi3n7/7P8Z8AgB9/TvsDwM/beYt/OE86A+p5AOBoABD472HE7lXH/9+vewEknf/zuJe1CnA7L4kzltwiyRaM6Qh7B5lZSmIxBQjN4KRyoe0a09TR7Rokl7iLERxce8Wi/Ue0c+sCLzQf06Y/wxxGX9pEiwzr4RYqiU57Mrqq+xud4CS2ScjIZFMdWyLQK5v/9ojlt+oViyxO7MPlG/FXMRv1mPo0X2Ch2PgizyseOPkOnMyfW3bG+QKflVzAmHIr/4c0W0ea59Ga/co7eR4HCDBzFB4SG5KerUCAZS9ChzIXAF4A1YmIHDRpfTbvpItzbkSGybTYrxKrS4Q43cREphPHje5hAh5xby3EB148TIV0bkIk9HjPf9JkRiSLFgZ6dSgiUaQ5UYRoSM2TZmhGqdFCJE8Lo3o1qpx3TtSGUseoRSsRSQDiyqRWO0WKpGfoXrlNpQhVjJpEAovZynBDcNPgKYmpzLW8RYXsxT7FfDX02jSq0CJaBCmZeLvkK5CjwK7x0YcTtTL5UAZGzUQ3fM3OLJxUhVgyUnFqSFUG8lfMT5NbVb2fiSSqeiImJTeKeIdMfe8ApTTZcY2fpmvUVE/Bq1Wc0XRpcWdXuEDVj9oYfM8YAwA=) format("woff2"),url(./inter-all-200-normal-34e907e6.woff) format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EF9,U+20AB}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:200;src:url(./inter-latin-ext-200-normal-4336e69d.woff2) format("woff2"),url(./inter-all-200-normal-34e907e6.woff) format("woff");unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:200;src:url(./inter-latin-200-normal-74885a0c.woff2) format("woff2"),url(./inter-all-200-normal-34e907e6.woff) format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:300;src:url(./inter-cyrillic-ext-300-normal-66b2369e.woff2) format("woff2"),url(./inter-all-300-normal-e375e256.woff) format("woff");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:300;src:url(./inter-cyrillic-300-normal-cff08766.woff2) format("woff2"),url(./inter-all-300-normal-e375e256.woff) format("woff");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:300;src:url(./inter-greek-ext-300-normal-09d21325.woff2) format("woff2"),url(./inter-all-300-normal-e375e256.woff) format("woff");unicode-range:U+1F00-1FFF}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:300;src:url(./inter-greek-300-normal-d0749e19.woff2) format("woff2"),url(./inter-all-300-normal-e375e256.woff) format("woff");unicode-range:U+0370-03FF}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:300;src:url(data:font/woff2;base64,d09GMgABAAAAAA74ABAAAAAAImgAAA6ZAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGmQbh2YcKgZgP1NUQVREAII4EQgKqXCkZQuCEgABNgIkA4QgBCAFhDgHIAwHG7UdUZSQ1pSR/Ugw3eYjndBacK7QXB2i0JqXCZGpyG/0OXhFEI6h90kZHKCq8CxUjSW0jL4WaJuakeRYqS0+PL/NP/fxeDweBhZiszQKA2vb11VjgeiYWI1RsMBFpWvWznXp8i91EemPFFThUgC+6AT8f8192r//ZWdySK6UyRVIOEJ1daQqK8z+veQ2+5M9/jP5B4S5K/8rs+qcaiUoQHQVEtB1fKeWjKgwjoX29W1fbl7S49R1+MDKpJilWRopXb1/vaEADQASm/A7I+xIEa7cEZ78EAHCERGiEb0MRgw1DDFCIkIlBZEqF5FPj6hQjZhgAoKAOlIy1PSgEUlwXUZVKVyR2ZyKUogRNhwBARIWxd4wKBYBIlrQoLt/VtMmupajSqkBSJ5A6agVaUHDbaSUCxrSp9xFPENfaYy2vMQpKtgS4BgKs4oWCgAh1gJiF3SGsC+YB8uyikzU7ypyCC6lgwDFRx6zNJYoKAvqIltKnFbLutqNS4aZf7HJPKSlTQjrxxic9eTNhy8/AeRChAoTrq8BhhpNRS2FVrESpcpQ1HRS6BD5f6WJHT17eg70HOk50ZPQc6YnpedGz51efzpKutpDeVT0gupIb+nBEMWx4/ZADtwxICckQc5IityQu0lq8ilWfxgAWIMTSKEHBJmhfxWIhcEwDNTUxxQ7ID53BXIDESI3CiAQKBhHLpzAE1igEJOvYvPxXdhKqlS20uTi+QONhMImLNcEOOCbPE8QrEv/wakziNYW/s2ByWAJu4J9tsQQVuMhiwUV1UERgA/VI1Wr8D0OzD+cyTdI+BmQ0H3QsNbpJztzIxNxJpLsmXv4lwJ1D+mBuIcqLNDHCkGwKNCBAkOozbz8KmILrK60iogRNDECRGcEgIygwhkof4AEMujAQ0AHOrqDNmI8VPCIXfhGAdkQH3r+7nu2WIhExOET+aQx3nsa8xVwgb/3gj1Hko/ov3DuPAFJLxMM5UolUD5PqQIU4BmENhhfX4z+BAZgDSTUD6c3kV9YiWUtjo0+7IxgbyQHozgazYmSRDxnCaQSuVFzl8JLGpkxutDqaqxu0nWn00OGnjJ5y+Ijm68cfnIFKRSsiFyxECVClQpTJpxehAqRKkWpEq0aQUrRDDiCaAFjkNugcgAqb8ijgEpUQf8ywvqK1Mwa3uwDpa9XBkzvq+FmSGvm3CfWiSfNFgjZ5CHTg83SkscaK1osZleZEo7re9o5i73PXMJSZ87ZsdxaKLURW9nQNFBs4yyglxQLpLSWb6QNQdTF52HNGUX1nIGrs4PYzopYz331iPfw4UvOhtjOffGAmtT+3DAWaawj7a2NDhAzdsSNuWHUna+t5rx9yJv86N2UpDcPUibbs563bz63By9Es189MopM7Umkra3eYtQvjedZ3suH5MV775G3Ie/e3btTd9imK1EyROEcdQwnKJl1/z5puIirYZCTfZ+bNQmpiMW4NyQDyxHubrZq9gg3n3h4KIPpXv3V8hoevTLYySLBwcfxjmWPSMPDKxjtvO6DZa8HgD2xa7g/kn03aWmIjP42dfKUViKjqN4wqwfaMAcmudy0I3zxAKb259cl45ZpdptUdxHtDBEvd5/lAhFjelNaS845OW1E3ahRIOye6nuxQK02fFCEH/muA+yJMU2UbcwVaYypKRzJE+XAqIKngt4LvQZt7HGnKYeIvGwDRy6pJw33Ver72yqpbq6BTP2p0kQpWUqpIk03TtXW5rnRKUDBTku+e27OuoG1ZTfWy5gnyuFUSWU3T59bcXmlGi53Ledmr13SG0r2vCZn6qy8u9nqxg0fuO4kdng/EfMaEXLNcXHHG8/I1nC4ELQCLfRuXfDxtrbxSvzvL/NfyP9ufsNm3dzXIAK7a3zC1b/tzO49GjueXI7t9/Ja0++BUoDFcbBwrApcMGQBxGCx2fyBt8O8g/+/Ge5HSmdD/W+Ie9U+j+LxkPiyPS7OP5+iEsmdB2MdDs/oc/NKK9lHpjtSy+l9fr1y5Zeb9AWLmhnL93e843+1WrHaevoBXuXn6h/q3BQcB3/ErfNDxpx491Z78vzgW+CPOA5+7KaFnezC5mbhwgWdm9Agnd6EXdkfno4/yK6YyM7XRG3ZKZzUg8+ivUfHNfvwT9QeFD6z9lgtlned/aZ4+o0lFcmr12a1RTfYmmybnbVhMd3XHjuwd+uvC30zzb3Dxh9e9qpfdcqpwE36nJZVDs0dIq/+4yeejM/bOO/meP2vE56GjvGok9Ta/t5ge7h/Ro12zuUVCImTnXS7vC7n65d12R6XTs05mlm20HOAuMd+sNjj4eQ5sHzRsayajUtvbSz1PHakxPVW47JVt7cWu+3bX+J12wyFSdYW3bIj+8P7HflB1y6Pf5d65FiR69mUprX/LKn5fHvmrEVPVo+zYPnYwxPEH5Y2lmzur69wH2CO6Kpbt+lzJr6Awf4wBn86GzlymEIhIiN7/W4RDtlleevO7I+fd+bKWy5fDm7dlfP5oyT51S9tbHyys8Jj164Krye7G9c/3c2eZHjQFy3Sto43323++Yg3VUdljuo633trdP0P0vDm4QebwaDZYqOo/rBm++JXpoa/D71qbj9w5+HW/NNZxjPIZGIbFww71ZS+enJZfm/PKZLFsy5/htxYRZrDzuA1qW5zbUr0fpWRq7upbM+6T3WyCU931mdrh09p7ZI1Q/DG/NGMHj3vWS7eCb0IueRe6LPLUqP4o+mr7FCzxzp+0bLlB2MNyf278wX0lC3b6/qk+Skjknwj+qSq+XFzbJmpWxur+6f6DYlI8O0Vp1IjlIV5/ol9mzYc3zffPCqpUKdTF8Jf1bjiVjFfrYjpZ+idA7b+5KmZldnjshOFCN33KWLU8HDFqGERkZypCE9nQfD0eztrTy7ZsgWfvHbngGRNpk6t+at0qaTplkRP/rj0lmPTUscx2+5tqT20ZMP6Iy22DEjSjB2LFyldu5jaoeWpZUJUeadClLH7UGHisMrBQwWQb7tlNhxdvmnDieUG88DkMTpd0pgxxzJdKG3NtFQM1kSPjooJ/mVo1xxHKq1m3tjg013FBQ7o4hcUNxS8nifnVKyYW/H4347DhSf/fiv7qW02Ylo85pRnH/HjWeXkY0veWlEe/KPkhoqzLjZONucMFfqmaU1aJtEvLKY0bCzY4p076pGh1mtGsAg+4rE0/ZxTh6Tj7JL0eFW6M62aPDFVMbTbuvN+QcoBIWOcaJWpQRM0uOvnft18g5T9YNV/xYIhC0D1BAEggJGEUxDqeOYyoI5jGqkAdTJZRtmqU9CbkqtTyRDyRZmGB6T1KLxRTwIoX3UiSSR/r2uC2kBiqe7KJBJDhVnevS7vBGJCWK/1DHkaFAM2U6AzAC0WAw+LwRaLoVESh6HD1MsCF7Q5h1imWi5NZbqciYHj6RWA5BEqSNJMIYJAy6OjEKob9oBW7AH3JI8Qkid5BJOjzBc8D6glUyiOq8Nj1pKh2ECKdObggz9Ag/1j+lteaQB3EdAKKnHA2lcFMzE/BgahqIH+QvFlwlGsgCVYAbcg5gAjjkAoE9Fm+dv01jWntQeUwZTGagPOo7s6CacQ1jyZuMKWUq5HUymDKWe+plDEROGaRVcTpmlbmV2fS3B3wJDG6dR8HgR4U2VgDR5YvMTwWkjHwyGKUjkDQ7WqdwtB1vC+3HfxcHguDXeXi+FzWuuCvwvByT75hs59LCWH0CNE0o8aKiWNjykSWl8wQGh6gRhJ436ONfBZ0rjHY826v3pCanEtVnMVg7qOpDdjpBrQAKTVW3kfklWWNBWnaAwhoqANTJEK3I9xAQRqFGIo0g+QBOXBdful8krBVMtOUACtWWRD32dmYAvEdk48ann37zNLWcf6ztMnKADAaID5wEW500mw0ieyBvbGUVhr9bGGcUosxra4VRgsNogYfn4LyzIQKrIO5qTtmA0ibyg0d1QlEybSstWnpgenRBZA97A6hQA1T2SN99yCdLDAgZgoWM+6y5bXBDqwN47CWquPNZhT9sO6cavhE1mzV2oh6MUuJ2LLE4Gsx8z//4q5LCSxUJoDe45bzbRUK4GDnQ4lwPxaIlHudMplIX0ia04uxXrLE36IRrJQTCzLs7Al3Oo2VDLpQm+KUVp+QlTcD6HW6lPyMU7stMYay3NmNQsO7az1kOsy1QhRoghmpe2YSqE3GHZHVTJ8odZi9anpwSot84EXb3W+Aqh8oTXOczm5zrIl8dpTet2OmSj0hr2EKGHnhV+7Xqdq+8lkV0dSq5NXaiHowYzHJ8tnfol0fSIxlwE8FuMdzYE5w65mmksqdzo5mFjo/z/DX0AahTIg0PlNkFpaAYGcBQgAHv2kdpFyabpt799ZNxEA4PHP424A8CRZef/P5/+Ncy+0AgAGFACAAP8dZnqYCvJvv+0HBMPpP4M7gQ+CKIwOC/Pa0spMJ+JtoJCZ1COU0jOQFQ0hxsJ7NhEH2PRJTZxY+gA5EQuTCRioDIw5CmRQzifjhfXbt/zMi09jDSaetQ6DUmouzqP2C/XIMj96X0mbMUHnVTy+aV172lAVYlLwqXga3iU0PSBSBPRj0C8s/1bWUQn3QG7Qz3GHPx5P6F+JCPhvefAqv7Zy2oQnOPcS/KS3oYNfi1B+QfgujTDyK/CC/hUXqBBw5E4DPQFieLRKBDTZIyMVQsAVSSEkFnCqjLcqPAEOjEsrfBGeKwxJEsVGeAGKGBc6bgepcCRiC6uoopBM0xIn07n9g04po1evQoE8+arIhJIHv0xShnIedKhSVXJUkFGqUKZQjiyjv6/qyPPz9hUqyfg4EOZ60TtGsGB5Coo3UC1TkCxlSgQTLwnFwQqc1/VtkjGiH56Qfes81YplqBAmiFyIaL0kSDRSol5V4wYiFeXDFShTSnbUe+KB8pNnUAghFyGHXCYfNidtlV8p6wPj+hWvZOrPiyP9CHhe6aDRBhnhsvyqWC0nmYnzoeUcnmFB/+XOaPu5sv+BPgcAAA==) format("woff2"),url(./inter-all-300-normal-e375e256.woff) format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EF9,U+20AB}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:300;src:url(./inter-latin-ext-300-normal-34623012.woff2) format("woff2"),url(./inter-all-300-normal-e375e256.woff) format("woff");unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:300;src:url(./inter-latin-300-normal-6b2cee46.woff2) format("woff2"),url(./inter-all-300-normal-e375e256.woff) format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:400;src:url(./inter-cyrillic-ext-400-normal-f7666a51.woff2) format("woff2"),url(./inter-all-400-normal-f824029b.woff) format("woff");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:400;src:url(./inter-cyrillic-400-normal-e9493683.woff2) format("woff2"),url(./inter-all-400-normal-f824029b.woff) format("woff");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:400;src:url(./inter-greek-ext-400-normal-d3e30cde.woff2) format("woff2"),url(./inter-all-400-normal-f824029b.woff) format("woff");unicode-range:U+1F00-1FFF}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:400;src:url(./inter-greek-400-normal-2f2d421a.woff2) format("woff2"),url(./inter-all-400-normal-f824029b.woff) format("woff");unicode-range:U+0370-03FF}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:400;src:url(data:font/woff2;base64,d09GMgABAAAAAA6AABAAAAAAIkQAAA4gAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGmQbh2YcKgZgP1NUQVRIAII4EQgKqWikUQuCEgABNgIkA4QgBCAFhBYHIAwHG4MdUZSQ1lKR/ThwyuwFjhaNSE1IHRJNhJc5TuaR//PSZ8crHuzH0Jf8Mrh2rHaeUc1YQsvoawes0Agkpbb49Hxu/rkvLy+P9wKERUgh2LhB2IMECoUvqLijgAvsNWwhYY0QaiBUE0gt7vlfujMtdnWhdGMqbdMxrbjTymiEWNOKxfmfzqe7S1yDKlwKwBedgP/PtU/7cy87s5/KvLMFEpbBkaqsMPm5zWVz2RwUt0S8RVQ352pbRQy2qqwJHaAwFUbUVWhX33xV7wGS3G71+AEvWGYYGEaocUz2X/cqwACA5Jf+HkQAKSKMDDFXDCKOCpEqHZFhFWKNtYhcmxCFihGlNAgtPaJVO2KHHQgC+kjJUZtW5m5G2CoNzQhD9tS2NkOC8BMMCJBYlEBr4UtpB3EODaZ7MJSfdHeOaqZy0H0jpaZeE+c12p9MDWjIF22KxAab1AC5ysrOmOAkfhh/5FbnHE0ItZbUuUVQ4/A7PIJPEkuueg6WEtLbzQcClKKUNVBpUDZfqnOVbXn5ohbjQWMl35l1EfjgLIT1SQyhIkVRiBYjjlKSxZKpLJVjjTyFihSr0KhJsxaUImrF1Ajt2wwJoBdIL4heML059ELohdKT0gunJ6O3nFo+tXdFgUJ6hdRIj/U8n5oTIAKBgkQwozkiJKFQJEXhSCaJpyVF/IEBgC/MASksggS5+KMCWbAK1kIRjZGSACQUYUDhwCOytzgi8RJxlFREkcAChZiWhfzat3WxUqX8ldEQxAONfJRfGqcKcCCUgkgQTY/+gLcsxAd7fT7mwMSzpIVBYMMQY7jHMZYXHd0JYdMJ3Uu63sBHyd1+cLQeSdjQ6fQ8OfCd8X2w+9ZvgiNS/pC7968Y+u7lPWIOurDAPGIEwaLABAosQp2o0xqIP3BkzQYiQdCCCUBGaNjIt2iI1qFz3aUqatQmiaSmY2H3MRICnL2ABER06MjheDZzf95Dr5dIIglFaMlAPJ0ZmI4/buXvnBAoWEib/gsnMxeQMuywRphC8bTmKhVHR2Al2ipCSzGWE8nBWsHHMpxMvCXEsvjK5udfAuQKtF6QDYLlmSNfiAKhNpLaJFwRmWJPKyNXbp4K8z1nga0WUlukUqQqUaop1IhWK4ZGgnqJGig1StJksWbJWqjopWr1jDZpDNK1I0iVYcBFiBGwFtoYdA4AnXdpSwGdqELyGsJsIJ7KI6h1oNhuUsDzE6s4G3LH3BPHPOKfZZsQUpP3StMuS4d87yamJRJ2SAjhqGdkQKgk6sLn0z6UCw0u9+8j9ZOI/WjKLfELFdGjS0RSukJoojuTMsrV9xWbfDvEnZwxCIEBYuK7d/o6sfz4C+dH/PffvEZ1u6Y6OziTkQSANwVBQgdAmKbClB9evO+XHwU916d9bYnFPbe4e6Zc9pft2k1+7/R1E999S0z2TnZYEjrMRZ3bE0uO7tWrPItJ0CuCYCaqSq5vB582ZWQ4UdOeiQlimRxFEYYnxDLB7XFuLjwRi32VRwTDEe4Tp7PwBpe85oRQpQ4wf+64WwvL9WlD93heyHfsYJCunt7BdvG03/sRrgGBJMAy8UBrJzAPt2iLc+yPN/EdnXv+0IqNYNbj3LaSN6/B/G3qvnR90d0sGR81jIjv4ASc03lhT4CcNWLMT5rKxJutmyfhQVun3Miiq9KqqKizUYSP3hmETmIq860xaXxLTKXFHKnja2EqtIA6WpAt5ntErzASTk+NCB/Vo5Mjk5OtlUXrm2uzcasTMiVTVcYXT2pXWMqXzMsVBk2goMoWEOm8mNkIpjq+Vly4uWX2dN+PuK6qhNPsVoqrUnN1TUtj15y6+8z1w4Uevt82CcC9nbABbD3ZsuB06P6RSyeyQLqLdORKu0S+vF/qlkI/63Y/WX/qXd0Dz2HNUseftDs45sPbN88tyZ4e+/xubC/AwgMWQaOZI/qR446dbvdwv7t/ZNaNp9nSpmCyIufXyVe9DENEvDmnYf9Yzn3SFPf1V18RIS9Hr1xsZ/tm/cSL+NH+g9/SPf/17qK6Fx4Icy+Prq61//UXExaXzyOXn+20V3pmbluPH79j7Z55BZZtXTOjBo7qdY7ue6Ms8/PrIsdwdC9kC3rs0vSPJUvIGc715OLNhf/5rXnv5Vesde99VHE5od53b8BQYH58Ots38O67R08eitx0Iy9j77n+35cY1jrmDzdsv3bi9uy4eFvLti/zKq/sczRVfaR23ayRdQd3+m0u499SqbWlpi+6kOSQOxZ9937N7b/fr4769rtXhqrKu14Nvj0LFrdmZa9v3fFpVduVA6f6atmhwWrqlM32ypnXquh33qvhzvQjxSH/OXt0sGp2dlCbemHc+Gveyc+2LZqsGRj7pFtz0d5u3j+2p+mnnb1Dxj8nuw5WvKJqqo/Im85a0HZ06L4aLjCYBQPRKqyoqli2rKpihfDrm4bKLB9POz1U/fufQ7WIHT+5tX/+rgl2cenKWxcPV4reeKPS5+K7b53sdyUCWzT9hEXZLoP71hn+/pEadcHcQ1HMYnePtZRh3+zT/17RkhTD9DtDths7dmJ0fNZxxH72UPEXJV1foobJGX8tb+ysZvi9Lm1mSHeYQPv402jJyqwIlGZc2jKnh9doYwyx2xfsYhFmPSdJpwTFmanY5y39x9bhkTsfcGMBM/7PpeBnLiFx73vG90+3FGbkUuivblOS5W+7+j9ZCaRnRk6IXh/6zpJeFJmXtDkyNX1Dcdbn/v1DJywrSiJXJK2PTE9fW4zkc3C/c+N7xzc/f/+Oe0Nhu05X2o64XYOjLq2wMF6Z+kJSqejVS86DRo2lYj0PFXn0XAybfNY5tWPq8KlTiXx/zllF5Y260vKg5w75T93wz6f657kb6FDxq5yuHROHv/nqWj+urC3lGg1d0rxSu+DjKqo4IiqmY14p33b+QmPRhq6ctSySX3K6Ldc/cHzz8wcWd1ahWqdLl7Do8vYFGsu/NWtLkvKSMuOX5CSbwqst/Zr4NRE5UasjYuOX5UCw0v5qg7tz5dNXuu2Z/jlVtzC0DstWiye3Tn6o4f//nGwYC29A0mqFqcHj/5B/6DE1nDh+ZGSTME8er6yPKhD1DJ/o0JQ25+ewSOkVv5vn4a/A9sipFm1tebqgZ5c6eYWsdjA6Zk3Wwobwgp171DHLw69kh0dd9MiAWGD9ano6KhIEgAgmkk0p8wXGA5hdzAy10OwJM0WbVqBk5osRR2aMXewxtgpR6CBpVKzYmeFUIcxLW0JJfbtDRSmCajSRbJAQqH1sLRlsFoxODCToBkCBJcE6giVBTk0CNVgSxpTcp1s9hUfBAe8nBFZVnX6Pq9wv0MMAjgiJ9JZJF6kp2ILAgyOCjDgiGO/hiGCocESIfMJiYW6S7aSPovRGuHlNDrOT6CnEBKjYPGzWYtNs9t5igBwVVwuMWpzXobiJx3FwqBQPbFYpLybMaCng0lJgBp5NYoKdyrgTwzIqbwV5tWVsZmxaDJKZ3T6h6NvjEWiqVQeGTWt1QWa86EjN9GWwa9nYwB1sM4EawOreL2WvAAqiKOd+HhNehVrnBaO2DrSUkjDoNGbNngDoNNaTMrYsGMTr0CoCtinPSLwPgS2ZuTufjAFqy9s6YIa2GWyqxKN6lbUsMKoSDkjglCwl6qZWAnZcErULl8yLc5FQ2nY7BlUXBsbbA6vGaZ5OOGL8Tl2TpOHEstgw/ouhdHXgNaxTUzwBC48qUedssys702wW0ZjXztyQjbf58k+bgT+Q9WTnl97/Pbzhbfnn7Scn7RQAYDUgUnCiP6EVqxvxYvTM5GVQQclyKpecNGuY006PhjaqbBYX8CC10M3qQIgXBzjVQMwtXuZ156RMt87mc9lJ84zAaWEFuty6S4Aa5MUYe0JTMhY4IplEI6xMr1thXlwymZbrpCHAaZNhy7kBEC/TsSoLwQhsHzxet0hZM+HxjDRmQcRCqTbsI24gJmdZCRqxXS1Iy3IDim0tsJQKVMFWbmF5tOg+NLGMpxlpo1G2zsyIj4zSar2fRMmyM8E+uU5aiUzYIMRkT3n8LFSuEAKXPQUKigCrGoix+8i8wzkp01IaGQHDkbhYrXcABEZWBRdA9fqIW9WBeNhshBiEGBTAjPnIvKMKUVgRYqAziNbL6WMHhDAjqcLwfYwBLu+scB98LiKNGYBYKNVGJGEHYnKWlWAYJgfqxw6ho2RJiAGxML4XVF47iLJZgAAQ0D/9kN91eKt/5h02nAcAuP/+OhwAftqSP3Fv6lGXrF4MAAwoAAAB/leYEGEu6LdvLwcE49r19v0Jj0iP1QmpSn91g8x47V198MzjdesRqBl46ClYJUIFjrFqHOmxlq66VNZcCnh8rAQMTE8QtRXlY3U9MirY5u/9ZOp1opTaebzDaJ/9OIIeLoHEOyBUu1025EUfl2Cb1ztKM+pD2hq4kIufJoaayqEujvZ4H3UaKeURkhEhMC40w0n/CTfwqBx4JH3ZIlo5Cd3S3UJNhaz6bfpZOUAA9Oojhh6it44U0v54Fns0pMMHcJOTQXBsBsXPG4aA0hGDFsZlCKX622CEpcjnR9WyIog/xPG8IcFFtwyNPtqNWuh1aKVTR8tAbjFlai63eYJqj3aNZga1Wsnla9WiXq1q496Xameg1aJVGzlFAIHQqxGflShRHV1xL9pVSVCtRZNEIiLaKF4X7I2u8i1uVKtOu0aVWiVLoJQkXYaNNllvkwzjdOJ342ZLJpeFWF0bnRbN5KFskR/SeEqVUiRRSlVLqaoK2ygbWrapbqPQD6KNaQ3RKLQxoq40dp6VchWpbbXctCQa3EhgrN9/JYcBX0ade0ZfAwAAAA==) format("woff2"),url(./inter-all-400-normal-f824029b.woff) format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EF9,U+20AB}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:400;src:url(./inter-latin-ext-400-normal-64a98f58.woff2) format("woff2"),url(./inter-all-400-normal-f824029b.woff) format("woff");unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:400;src:url(./inter-latin-400-normal-0364d368.woff2) format("woff2"),url(./inter-all-400-normal-f824029b.woff) format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:500;src:url(./inter-cyrillic-ext-500-normal-8b5f6999.woff2) format("woff2"),url(./inter-all-500-normal-94e08ad8.woff) format("woff");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:500;src:url(./inter-cyrillic-500-normal-f6bd191e.woff2) format("woff2"),url(./inter-all-500-normal-94e08ad8.woff) format("woff");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:500;src:url(./inter-greek-ext-500-normal-528b79aa.woff2) format("woff2"),url(./inter-all-500-normal-94e08ad8.woff) format("woff");unicode-range:U+1F00-1FFF}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:500;src:url(./inter-greek-500-normal-ddbf6a70.woff2) format("woff2"),url(./inter-all-500-normal-94e08ad8.woff) format("woff");unicode-range:U+0370-03FF}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:500;src:url(data:font/woff2;base64,d09GMgABAAAAAA8cABAAAAAAIogAAA69AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGmQbh2YcKgZgP1NUQVREAII4EQgKqgikYwuCEgABNgIkA4QgBCAFhEAHIAwHG7sdo6KEtGaS7C+TNyY9PDQk2CZOW5KYaMRo0Jq5s3BCFfKGVoHIF9FOZ3x/PDx/7D33vUU2bcANNNFKHX5cYWnZaIJlTbT/DKI5m70kl8uFQvCghQqiQWvoYxbEgkuCWkWEGnUqJnzFHWp+h3OZazvKXdlPzs1NyZbViG2TG+XnCm4ehZnRqJDyHxYAVbgUgC86AX8CGgC4Oa/jdQvA8sns/+ZKm+zP9OWAIM2rOyHL4A7UyQozmby52Qm82+PsQQF4r0S7RVLAuhIQdF9tFbrasiNhKpQqC+0QHt9UfR+Q5HRMHpCF2gwLwyizxrUXFKAFQKLevmeEJinCkDHClA3CjivC3TDECEGIEKGIcLGIBEkIhXxEIRWiUg2iVSuCgCZSZqi1wPA4GC6ruhyGyEZeZTkkCHU6gAAJg6IlFAoHQMQpfNDfr619yhnOUuWUP8NjqExqvlnz5b5JKR98SM9Zj4QalFehdAWKjI9+4NTVdYZilbnZukidghbsN9VPzkR3OhPo6q9Qqj9c6QTFjJp1ZKEZcsYJUGh/CXNJQ5keyg9GnuED2Tnu1Abb9bMQCy7pol1svBwRfR6DPguWrFizYUfGiTMXrnz5CxElQaIkaUqVKadESZQpSSai8KfXRpOKFhVtKjpUdKnoUdGnIqViRMWYip9McpnZfXkSqBzpiypLBSOKpcm1ELW5zibqinqivigVjURjk2TqKGofGAD0A12QwmBwMJ0/KuANQRAKiaTGlBSIAm6IaARikVzIjpA9RywZV8JKYIAS6boE6k/fidUoKGhIkY9XD3xRZKm3OacACwKTVwnCJfE/4HUJxMX+oo850KWMIEPQKtfzM6zBTRaOUFPvEF8ggPq5uk58WFb+dCRfIBFkQMKfgJYdlS/s+kXE4khQZk9s938BTfepm7iDOgwwQQ1BMCjQgwIzqJOCwmqiARysvJpIEHwSBIjB+ALICCr0gfINkEAGPXgI6MGPQaCLBA8VPKIZ1lFElsWWsZ9m6zmOiEQkYRWFpCs2j3Xtz80J/u4ELTr0nqL/whkzBSQjtAphKIG9QqYU7BThCcQXRMAXzY+QP0YAkf+wPIh5UeOtHx/qPGkKpyWCtkg6ouiS0xNNXwypWEYSGUvSXwozqcylGSDdQBkGyTRYFgvZLOWwkstaHhv5HBRzVEKmlJMyzsq5UHKl4q7SEFWGqjZMDYIUjg+oQHSARchdUNsHtdfkeUAtqrB9NqJ02zkWXqbXgKK7BYH15zdxBVg7VjxfAuGXHpsX5aRmOQrD16vhq/ElHczOo8fKSItOfYnlH4Kovz6r3zMeXyRtk7So8yVL0qZfz59ZUi+tKRLQsqOb3dj9d4ldRVo2MRWFZLvdvIM5f9Kz/aFfrVH+aEXcQCiQ2QqcEM77nPu+1L83+7j+3ZixdMx7qb0vwv7Fbt4ZR5+gs4o4rjoayrI14NLDxwPZfgZGDix1Z0RwYztaM04T262ewPgnz/EFMJItkoUrHHFTG4sJ5BUesiMcOAF8rg0QqE5Wa+o/4Mzi2Nc5v5UbnYDo3OsUr6IIwhvsbsfwfP4BP6tX6fY7mVgrwM9xnLuXLcqf05L7Z9CyXM1fjTPhKrLlNUe2AlMxfvRPZcaKB3n0AtzoXnfOTE6rz3P9RGnRG2ahgWt3iVfckquCYBWXBWcGkhgG6RGST/pkD+OVICsAq15My+zZ05eSecfkEUnzUOcV2t5CjcVeZIWl9Og6N7MiOJWFeUQr6tSRW+AvblkjXsVlypLdW0/OJ6PVhVKu7Iztsggw9JC1ehrP/fXafBxtMYQuEYI2zGhHqxzvY2sfecSPj6nBDlLkyRMWPMh9ssTsarEV3wr1v9Rfv3HbskD++eP8KPuNj4Tqhvabv7w45e3z6uzub9bdAAM3MNAe5H1h3gU8BgO5D9iLqsmiyVV3WZgXDo+GFn8E993o+iNiqeu7GXQlsyJsR3MK+tWVoLdly1bdLcZ/Cca7dYse71zUd4/+oSt07Hdu/uj/+SuuZM+SWQh3CPxung4tO/Dta8PKb17/HHaDwGZS483HjQsXPWmsvzkJHYUl309WavKn3r0wfW666y4NacKHPxQZ5lUr9PSXJ8Oh+t4g10EYZz7zben4i/NG5qxZm3XZqVRtgsZ6nQhHd+GomdNmzNsw2kwu9XaadGTD78hJqRdsdlRUXen+M+iK2ukq5c4Qz77mLVmpS1L+5xSGVVpl6v4J7FSXuEy5coUKsnbTfQMOrcz++XN11sD9e6dtSs9s2az10xYMBvUZdOW2bE4L+dexbXzq5+VdKX1bx4wat32S4uP8zpSvO6bC7UP/p4HHtmT3vdtS4HX6xsjP8Ud3KwddLu551FWbsWtDUXXrvsbcE1WbO0tvHleNip8ky8syDDJ0Nm/etI/Ox2nQsG15RIHvI8sLQ0J5pMmhIezw0eGG/rd8e7bm9PZtzcO4deXk9fV6zDQ3fk3ePSvp6+w27rfdcyZP2TPHPLNm6wftnllIvVHy8t01Cbrz8+LM51veGJh+eCHZLaPsQMOClbg2vlq+cfaTke3k0GXbjYs37p0Utzq2fC0K9ULvY2nCjeslhzZ2qHyMx5tWZY2yjTd9uXzTrKexm/ZOvIcx3n5lOuuDvkTrtgmykwfnDcobaKHjI43rlrS797Wce962btzq/bGINsO/aDn+YUDt+dfnRridg/23867nwqtncMi3PefE58XqGulrfmas0YCB+75TgtXbekZ7pljJXeVWzsODE31PqK3ZfmgkglKtglzDrN2GBibA9RTzbW3vlbNn3l9Z+zUssbKkSFEB+xd73wnPFvETHdQEjfZJzMqnb6ahAdkjUyPFcL6iFaEsCA3FGxFZbph7glvitY9j+rovXOjtHvPBKzVNVZ6eZhWzWPT9pajvXP84uscv0mR0JBv9Ulj0O8f1+7V3GP169dlTb1aPedsvRVFSlqJIyLjGrsihkk15bG3/ZHHrzVulKRGt/mEM3Cyv9Y57u/7c6ffrx733UqQqy1JSfW5PtM4dOSsvLE0W5+hh6+HnMsk8p2Nhvn24cZBFmLGdjZc/ePmH5ygezlVY3O952FN//1Kpk0Up/K3oeQrL+z0PeixmKn58PF9+07ocTuMN2xVC7smfJ8I2xfGl+wTrYwVR5taygkFRzJQDR+sL45VyPwZDhtJLApk/Pb97REsCY1OaLKIbxqY5Bxutumtl+X5wXX957YQ060BD3wF+RhaWDyC+OvPivIugLEAACNFEYiintghpQG0WOlNG6iiyhPxUR0NAMeoY4k+eKGNxhlzYD0s0ECuqVm0joRQd2I7aQfwpnbEjSSBlWtRjE4mpkID26Ta1md5HGSmNWE6BPACwlCQh3FRJEoLzSAIxkkTGVjqF+HoDfC8O4bZbBlNl/jXmslr43YBkEirMp08rzEQm8A+ZQB4ygZWSSQixQSZoPOSD6VZ1ZB5FXD1esJkMtZE0UigpsG37EIlso0dw7yiQb9vNglJk57/fsRCrYzBstwxU6E5BC/0RegEYIzfgw/CtmrANKG1YB9qw7NMi/+Sx1E5V7cBK6KgjsRqmY0fhH/dTetWA8epoLg+MMCaMezKWxlibCxtL0Ldn8ExA8OhxVCP12kmWmmbV4gbnZIdloQSFwVwiW9FobO0qowiP+0nuGBSjMFgrhQkOGvRh+U2ZICA4XpbV+O8SYMe/seU9iLNAHEyVkkPoFik5mu4GSg7W5aTkaK4JUnI09nFW8p1x+aDkwCWloOhbh01uMI36v1vJPCZqI6YDJXm7oA/jUIE0gX6DpXbRJOiWilzfUREsR0UwERXBZKsiYZ+5It004QvuDMkLNSwiN6Y9MBoagPe/tr3cy98POeXnpf8OH6AAAIGAsIxlEPi3V1jG+AoxayPrxBQ8KOnZHmLJoqGscjX2FxrokD014jB4TD/BRwYqA6FiNpj1mkgIMcX19FwYTMeIPdSSZWZglWgB+MXRcahTYhaHdBxqKAMstUThNcZY5p5pEEbeFFNY5G2I7SGWLBrMKrfDjGQ7qRKzanhFMI2Y0XjMPRB6zPT8vWOVDHy5mCUfUT+2k/X0KGYapgR+gDBghE3+21vJwFeJWXW80BEdLGhlGBV+4cjcXpcw0SHX1MH0TREldUpuUQ/QYCPywJKNqmgdPy2LsdwT+gIDC/nnzEeL8Akjc49DRWww4zURfU9Ecct6LgymHUQeEUuW8WGUXCfAGxud9jRAbRCxWKEDKFMmZlRJG1eG0sYT0b0iitvmAZZPlYaOTBvrbGEH02k4S8X0ivjuoEtwmnsnOIZwGlslDTR1n5N8hOlMJ+sJXvLfXh86FPK/RwRvBYuwu5KG10QXzCPAbQaE0QxAAPD49w9K51/P0PD4yhiJAQD3Pu03AoD78fIb3x/9aTYuVgMAGhQAgAD/OfSYtA/kL1+2AIKfBzZePIjQwu0IbKJH6wf2zgduM70cj1fjeryH+s4A/ku0mEazh5gqLGXWtlgVuEiXtpZMEzwWTcBKoTpP8hWOh18RaT90rJlbtN/3CcbSi1qMXo1bRn/qIFYw4jTPkOs04h26C32+Q1voWp3bJkvbQfREnN5GaINzV/MkX3oE5HkEGtxfQT1leZ1knSAHNwTtOCPQwCWo/TEB/ui9bAMFmjjLtarjmkCCy7Q63GkNDKG1MJU2JEz/VR0ME6DiSgsV4VvHrPWXarNJRmpEgDOuFEJqukJR163wONjlzx8rAu6eKTRphoo615wVCTbyczWphcohGgA1E+zx+OnPrCAG0Rv1o6TSoFKRAoWqmXEma14zcXti3o2GKFctTyUzcpWUiuXJCV7YV41qhZQqVTFjVYA5sUqV4Rw5KlA0PHGNbA5yKJVxxFumitKi4kDrKTzCeO7At0aZGHkK5FOWylLJhQMZJ8OMECNWhFgjci3aCwlkkua4UgPMkvRucXvvm8WNExl33SmZbEX0gdGtrkrO08ZVG69SMqGulMMTwQtGe0UJFF4z99Y3Ud4TbsY+KBKo4PlZXFWGIyZ8iRuzMwUAAA==) format("woff2"),url(./inter-all-500-normal-94e08ad8.woff) format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EF9,U+20AB}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:500;src:url(./inter-latin-ext-500-normal-4fba9ae6.woff2) format("woff2"),url(./inter-all-500-normal-94e08ad8.woff) format("woff");unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:500;src:url(./inter-latin-500-normal-d5333670.woff2) format("woff2"),url(./inter-all-500-normal-94e08ad8.woff) format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:600;src:url(./inter-cyrillic-ext-600-normal-2ea11f8c.woff2) format("woff2"),url(./inter-all-600-normal-ba29c057.woff) format("woff");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:600;src:url(./inter-cyrillic-600-normal-9bc492f5.woff2) format("woff2"),url(./inter-all-600-normal-ba29c057.woff) format("woff");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:600;src:url(./inter-greek-ext-600-normal-c37a11b3.woff2) format("woff2"),url(./inter-all-600-normal-ba29c057.woff) format("woff");unicode-range:U+1F00-1FFF}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:600;src:url(./inter-greek-600-normal-4591e350.woff2) format("woff2"),url(./inter-all-600-normal-ba29c057.woff) format("woff");unicode-range:U+0370-03FF}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:600;src:url(data:font/woff2;base64,d09GMgABAAAAAA8kABAAAAAAIsAAAA7EAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGmQbh2YcKgZgP1NUQVREAII4EQgKqjCkbguCEgABNgIkA4QgBCAFhFAHIAwHG9Ydo6KK9D2KfybYdOoXFAbFQsoQic1SmyJAqzA0XiGE8RnceESOhCssixkPT3NS70+ayTRdAFYrVwNqwDsFgBJQAqpbeYjGoUPQRP1HNGezl4soFwpJEG0LgSLuIYJKsAQtySEBKmbUDWn/n3fk37FScYGguu391E2UUGiBhc1rHohl0Nw/ONlSqIYB16er/zf3bzaTO3OavhSAclIgYYFQVVaYSfImPP15VEJ8r0gKWBKg5uPR1bZLbteRXrVCWBZerZqpHqCkaykyLDM0Q492v3tTASwAoOBV/2UInwhizBRizh7iwAPixRfiLxoSKw6SQAKRUUAylULKqSF1GiFt2iAIGIlYwg4fTUgH435xQw0YQ9deXlcDBITHACCAggGjLw7ktAAiBuHA6vh0VXPBh7KwmhKBoWklv2xq/E181bBSCgflzU6AwAH5D8hdANIlQ7CAuwG51kuTczklIQcZUQztm4/liGbIfLV+SJnfyP9dJC2Tkc+lC6jcFKII5rflTXP5/AO5CpAvaIaPZAgImWN9G+wmL21xoX/U402YcTnC9TkGIRu2xOzYc+DClRt3HkJFiJVMRk4hR5VqNVQwcvkU8iHlcxUePjV9ajOoGVAzpCagJqQmomZCzZRauHwp8kP2pZBRK5SP1FhtGbKy8B19oBmOQUGGjuABCZEImSBTD7m7Yzh/HQDggiGIYDY4eW5/GgiGaIgDuR7oEVGI6hgDmQAboZs5oHPkjMWFB3o4MABDtO4yvA/y4hyZMunJUoqSBDhi+rxqzjxgAdWjhAM9Ff+r6xnATmb+4YGWxiAxBv2owEvG5hFzGpPBqShQwbCrbgE+aYp2nxroblJQOwAFvgUsuGb8hz1xJkpgIDDLl8aD/ysAxufLQRDnARUDsAUHgjBgwAoYsAN255XlDUgP4NZe04AICI6AALG+KIAOgoUQkO9AATpgBQoErIDHLGAZAgUWFMQPu1BGd5zc9NHypZwmCiJCHOWxK05s2tVJhot+dR6iz4CA6MfCzfP+x81fm1jGZByVM5fJgRJFFFw0qlA04egiMERiCsMSgC0IRzCuEDyB+BLoSzRDEgPJDKUQSCWURkTChJwpBQtZLGWzksNarpnyzJJvtgI2CtkqIlbMTgl7pZxUcFbJRRVX1dzUcKfiQc1LHW/1fDTw1QhBmRYDPAyIJcA+0C0D/U7QPwO63QA9LLl9HdRhVzunoLibFDCGZZZrcH7ZK6BcWxnzRWq8Go55IYoA8ZdzMHABjnNwgmBcBwIWh9vwhYTtsMDsK2QJDYxjM0U8gsPDWZTgCen4zARdhCupJK695s3Ni+dySK6Go2U1zyj6fB6Fu/RdRh3nFotH0Vs+l7DOuqHVcMhmxAc2SWIEzodDdhzSMDVn2Z2idPVtrsMuPvtHbpy1hEnQ7TH20lwmuZ2fg5ZGYw40OpvEWuKiAVdjzgR0OAhLrTHpsNnVuZpxDrV6icdRR14cOboh1HGJIumFE7lti9MCg4NYA4xmntsF7QWOR9UPdKqeN9bV1i6ubOqD9khORjs8l16iY5oj7pjwEsCy4I9PSaTDggJ5wZBz4z7QaG+0gza9G+iQc8xwgHMJdHXjAgHJHkvPQcvVPH0MOlfDobCGirCWeArFaLrLdyXZuhFjnnlOgzFbqbp4ZanpIZdrPzJaHnqUxLQUMotbTJZyM0hZOgeVcUuAlK3e8E4gl46SPrpV+uTqZo7JuZf9ci1HNhHzPWbJlyp9jPTmXVO7OIrR9gqzuAqdJZObIY5lk7G7ozJWZLqdZmKIvSuWJX3Ul5IMS+xDlrFL7qPpqm3opxNxymoyWKXXbnWsjDok0LHRWJl0/uCv8bdbLTOZAy+N+K5n0A5rvgZY83NIs/ZvB+QHC/8ucxTBsKMYlm3zyiasJL4+9j6gG0LfjpttW+nz+PFKL9GWf9ihlq7n3zweCg55MnLxrW0vAAPqgQH688Lu/HAHhoEBkhDw/tGhxbvFecgbZk7azg3tOMS/Gz/4kcs9+Ikd44TwccqGuIerQqb3HjhQUSY/5A8uaH0aaKad7+LRdc0j+P/fh1wjRwH1QPX7/K/Exv5Pn0vXPxOvDGojP9smd6t//1O9fPlfatXvOuh4JpM6pDKir7s9uX51gVNfuJ13KsoD2LNZssSgvPU9TuvxL3VfoN58zYPyBX9u7Mw7tK/kHw8VewH3gCDBxYNWO59sm7+l3jgp1dl2ac9FZm636rL7uaaakc149v8cvdM/u9NhRszqnTLZSuk5boqwiF/A9TjGaneNVUQVry6B18bnzPr2FXyFgxdZnD218FhmSVuP3rdKYEDxK0GPsuWY3Fxc390iub5+fdrlXZpGTXdr6tWVq9Ju7NaBl6X5/aSBM4Uvn54tjRy8suJL5k/fqWYNqx6/WQVl8t3bcspVByqyj0Lp2IKC708UNyW3O+TIhSGpsy3mn/7NsAr60aACFbGjpmRkXWpaSTK5ti4t1ZpwbvDUmd+M/fVs0bNnZ0sa96ZAJULRta9ZafcsSLm9bHnKnT0Lta17FyJYvkz+pN27AHJtCl+9uQL64fIK6awd4v0GMf1i/lugXcTvYh6fcNc92XNs470FHVjvfxVb1uw80pmyPjF/C1TZJD/cn3vjdu3Q+QWaCKuV1reztJVAg/wzu8LqZ4/ihre5ZV9ciyBJYpQkIFFunKXMPM163FInmLWIEHgs6rBp6rfXLD/+RzakrQKrtJNgBVb3hq8PFroNgsMpvQmKruET9bvXOzw9nIE87QkTzQkeGO2/MIWf7hlaGJpnn+KdaO/sGyaFsHEGnH7vl/kQDQVzYrxj7d08wyXgOUnonfgyOTn+ZRKOL4xRqKsqMlXgLPvNgPuDkiJ3YlIb7eSM0x+mVwIJuV3ZyWxwXWMn19anpj5w2d3zgdf9UQosmZ+4dOnLiaUQmJ/bWF+QGxC1n6L3nDJFGM+z6L+Tl+WTi0uqK8y1iHiJ9n4SB0YBlvxzdGri41FYMucWyGvrCxTZRU/0NxdjmebArjeTs5fceVANeRCri0xkgFfPKFr++eTk2NeTsCw5eYqG2gK53c1tTlDUubY4vshJ4Rgg9g9z3you6thc6phkEj+bb9HRxj8CKE0/rYu5tSHGcbLnUk/D71fVQR5qiBJOr49xnOiZ6pmzOob24krtLe9acB1kz48RPh18NijkH96fa0c43el4kvVs5yLrROaGX4bnKlNVyeFM8Lk/vSlA8KzncY/x5oBk+UKHVNWCTNc4k9chJraz/PGumZBYvSjLNtYo0jrKyMbaLQTYe7rvfn8XMBsIAOhAomJMqa10Q6C20ElMX+2K79AzdR4WeqPOj2x0VVlgAv17ELagQaKSoLajHIybqoPaEQqMM7ozMrAZkY2SqDhGAGqm1akttLuYvqKFfQX0vYANJuSsx4TsN0JAKCYyQGeMVid7GMGrDHn6vG+UL1FxSxVtxbcBYLMM9Bz2AcPP2EwuVGIGacQM9mIzOSyIGcmHHDDfai7agiFnM7y00i2oWtSFgRnF5xgglszJZp1vGGAxd0iFfOKQfF5ZdivYggXu6YYVhlKglfYJjCjIJ55gCX5bkXAQlHboxnVtDSwyOc6IdayoHbbhqJ22m6F0BZp+tq0NaLID2c8olJTET9qVYdg0dF7/74PlZT/T0A8AMSMXlkrsP4VttV7RJhib9uPxIZBL4uHXMBUtzAf6yoHG41cJEhIP+3G8OJOtfvwO064sQUx6hMtj1Jcmy8sLnv4Dh6WpGX9CkhGaxDNWBcYkA0pJBvThDHEPzkh5wiGz91wn1MCqOa/MXIuq1iZgBvEyA2whZXgHe4QprsyEXqwUd6KEm0QJ3UQJe/1aL/+E3s+3wfQEC4LDYbOkvV9ZBT2wb7T35f1/r6fq153ffrhYAHAEDG+OhMiaGE43mZgxu90fimj4HXAH+GJXYmwyJ54jA+mDpXqKMCxVGqUEKMKQWNEahm8YH+ZxKd4ZWC+fOZh9sXsGVpMmMLnTdY3y3YwJp/6fKOkN4Kkmz/CimUp5R54xh30aH1omE+OdLnegL3aFxqbttEPjWtAQJt1oM8U0rcFw3hxi0oP/R5p4A1KzztZMzce1VtdwUUzRMgWB4V4TbaSaiDeQ1BymBrvONbDf2QgKzynnIXVmnPaJSwfWd+0hszflIvFOwRo8dfDFpkQ1KFMygZx36+0GRR5G9l2UKpdCmrcowpAZ0cO/tIe5QsKdnpFTB7Mvdk/FaMq1oHvSdbN+UD6YMmHH/xMlvBWZuE849hln0GM8zG7JQomC+Ag+BrYw2tY2bHVoVDdPPVoL9eeT/n0R+mmJV4BW7AG2ZjjS1lpdIVr6f2KqmiykBqqAlMLxeAVJGSbFO5C7wXBJAwigm1xdmrO3z1sc8DvDZAaAz3+5YALAF6dTxt/f+K/F9JoFAFQYQIB/E4ONr0X67c0WIC8n9/BMEYbDO0cqdLjqj3TIh9xdTxheLY/LoKOh3+SZpkZDqafaAhvaX5UuSF1WlvYXiugbnq6ghYGVeaK1w4Cgdsw0dWvORZ3ez5FownzNq+UK9G3X7MCw/m5mrm102aWeZBBGDVrV6tldljaKbKf0bzOQBsQ80doqE1LRapPf+uZi/oCxtf/N5V7nh97JL0T/NfCf4RfYv3fzE+7X0S+9i1+rI+904peeNtbwMDV8U/0Q8LB1ONToPyKvl7db5DgKNGECeAQIBTG1SsHwHI1SRIeRjBsVKi9PFBrTsFZ4PCJIIbCirgQfES1lIT3gxDIR8U1IEqbHkInrYcOpqGnUUSpTroElNy5VV0vpGpU8bKwaDUrUsZSijkqFEkWerqEam4uVU6lTz5I4ivLiavX8OHNWRmm7eKNCToqoVHNG12r1SFNmpNrldZUo4W9bKYxKlWJpSpRpVKVAHXdOXLjy5S+NRCIJ/5DKOyKZnr0/JZUalo9spY6j7FrAs3PqXXgp4aIwlu2XXXWvV/RhOuqr7vWc8rpXcfp4jlXGWbIoCaHzvuotV/JVuJK9GvYYxUv75i4GjPt+TD/w+mQ5AAAA) format("woff2"),url(./inter-all-600-normal-ba29c057.woff) format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EF9,U+20AB}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:600;src:url(./inter-latin-ext-600-normal-cc23fe6f.woff2) format("woff2"),url(./inter-all-600-normal-ba29c057.woff) format("woff");unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:600;src:url(./inter-latin-600-normal-048d136d.woff2) format("woff2"),url(./inter-all-600-normal-ba29c057.woff) format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:700;src:url(./inter-cyrillic-ext-700-normal-b7bb121f.woff2) format("woff2"),url(./inter-all-700-normal-9d318ccb.woff) format("woff");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:700;src:url(./inter-cyrillic-700-normal-f6c6dcaf.woff2) format("woff2"),url(./inter-all-700-normal-9d318ccb.woff) format("woff");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:700;src:url(./inter-greek-ext-700-normal-22174f43.woff2) format("woff2"),url(./inter-all-700-normal-9d318ccb.woff) format("woff");unicode-range:U+1F00-1FFF}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:700;src:url(./inter-greek-700-normal-9e078f49.woff2) format("woff2"),url(./inter-all-700-normal-9d318ccb.woff) format("woff");unicode-range:U+0370-03FF}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:700;src:url(data:font/woff2;base64,d09GMgABAAAAAA8wABAAAAAAIpQAAA7TAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGmQbh2YcKgZgP1NUQVREAII4EQgKqjykcwuCEgABNgIkA4QgBCAFhBgHIAwHG6MdUZSR1tyR/ThwyuwFjhZdZivZRoQ5HpLjqB75nN/yDJ/joXeN/JNNdq/ECkl4oOcrPIMFlICqp8pgJDlW4mB8eH6bf+4DH48HKGasdLOCZSraiOJCZyEmw5jKAhfNdNHp1vrD78+VGEsXLsPV14coXgorgEx0Anb4/01V6tPXvSfZ7lA6p57SbkDDytdAgQXkfPZZOkuXtYfTvdmYOLxjjccDWF9pC1DZwoUFhPUVFmAyzUzN24VKSudMcA2WaQaiYZpRdPWbewowHUBhnsoJSw6z5sRFc+Ot+QrVZAZqg43XwkVokRI0pWQtRbaWQ6vplPJZXxB5d2AqBx6oHbsiFXC6qSWFcEIO7dEVQoowZwMIUDAoViIgOQEiGvHBovy4WbLwy1mqsIxheXxJK+vVWc+hVko2PpT3nR0pMeQ5cjuQgTkCDc5DGg1Lz7n0yefZyAzwIbrJ2vzXcmSa7X2LHtOYpmtJj+TnowyEFIoFirjJenvPnDvZClkD+Ry06t8cAbVmV4ftuB/bvdrL4SJCPr4L4X0fgz1PXvrqx5uvQEGChQg10hjhYiglSTZZvgKFilCSpEmWhsj5NWaypGVFy5qWDS1bWna07Gk50HKm5UJrtDSx0mov5FHSGppHWkcLExrLklsBWXObCdkiO2SPHJAzcrFJTSZF/I4BgARswQH6gL8d/F6B4TAeIiCJxtjSAGTGnYCcQYTIvXwJ+AnAChRKEAkMUIjOVDLfv2uLpUhhYaJsvHjgI6EwT32aAAtmNi8SBNvjv8MzlUTBWwvf50DHMsROYJVg58ewEc+ZHOrgXy5pMKzpN+Knzuh+qevuUZh1gIK/DKbPjD/Z3RuVgO1Bebxg908kw9SnZT8xCj0GWEaMIBgUmI8Cq1Dn9uWUEAvg1BWWECmCT4oAsbhcQoegwh7ITlBAB+bjIWA+fvQGc0nxUMEjltEvNLEjji/5vuwFxxGFSKNv5MT2OLZk+7I/rvF/VLBiw26Psl24NfmP22CzhHOi5CeHmxS+NHjG4RvPzEi00QTGYIwlNAprCJFhxIaTGMHcUJYiWYliLZqNGLZi2YljL56DBM6SuEjmbiIPk/QwWU9T9JKqtzR9TOUpnZcMfWXqJ4u3bP5yBcgTKF+QAsEKhSgSSktGp79iA5QYqBRBMs0CXIeYDTZDNxfaBmgP6DYBGipJdzz8kk2np+DVLD1QbB4YffMDNdwNZTaDB8Q28TPgCweNVP5lGL5d5Yv50tnMGGfHotJzjr3U68AlzLdn7eeX6wsdZkqnm/M5QzrTfuB3lw4OVdOur55fOYtyfWILsd6iQlzJlltTVpbmPIulj++QqtuP2I/PaHzYRs1pba+sEOvLiSVEej0lpSzJ9Uuuz7cXL3t0mzf3zmOJz8pcc7tmdklTKwxtJtHSljt6yck4MbndtQpPXIWhqLBLQuQ+ZDrCW0DBCXZYWKKwROly5XyxWcGS5mZS1fKDJyGDkKozT1ekt7Q8tkyMBEZM2KbQxBXxZPcdD01pMJjWBK6HOsqDRAJJxYyPJ1Q1n4Ey3lQxuklVt4emNqCSZ3kiWYHrKA+Z2tTUPmZUVC75Rg4LTDA02b7rrDYer7U95bxxetFXVUx2qfyPaGdxPHbowi5pvq0USOiLKnpRYhO7OuxJMFga02XQRJOpJSmpcqd83sfTU5U8/URJpj5botIrFWKilmThNqOqJYnTRX+0kERLscrfOEMvafqnW+Q3jUqrFCv5QW67mtkk40OFqUlRvlXicksMEUmS7Va6bk+xGKmUJEqmCKVkR0gZpDptcy81mW0kQ8bERMNfQq8go4ey+QL+7ebp1aKsmgRF0dXT22ZidaGKzZ4zC1jlntEwBQZ2LFGduCc0ZpU6KKuuTyzRczZWpwGrc0bogdPr7DsL6+u+A+Dv2xfXPex8pT0+CSbET8Ai22JeHb1onkfH43nuZgvrJMW9wy5/fv/n8BHv/6770qcVYHACDCx/G/d/x/84CQbKEcg69Tw/K/9FbRY8BxRvD8NviPnfdLLTwvLE15+m6JiUd6LT0oJk2fZsdJuh34sNW7aQ6NZtDx9d6FszrXp3jbS+uzL/Gv/TwdrbpAzACZgFtzfFzLzQzUn6rZj2x77Dy0hKs89cVM+cdUGtn+RSVJ2LsP43vwez/lX7BmOW5+XpAyva8fajwzVEZ5N+eTr8z/g2HW1Cqsuqjux5f603TD6yQ/Nf2DR2vmSXQ3hQEJ1api4oXphpK1/s7rr02D92hecMLwefnan5bbF4tUnce7w+/8gQQZ8p1RFxs+N2DRljkyhNFPeOYIsChsYOSZqVggcOx5xO704jzIEpTkcPVB1W5houS6gDYLC70+pB/ozDcWy8erk28u/Fi+V/VheoNdXTwv+cvyDin+U6yNLc3ijqatM/vanNiv7j0Xo67bf6gt6/lcZJwRgmxRiXxU6eujo5YTVSfuoUezap8saXeiXEqBY7uhrP3exZgoOg02KScQ2pC2apknmqKMkq8/jlIIPbi/iG2szXb0lov3hwv33d9ml4rrF8wo0FC9jEWJGbV1OBz9qacqRmp3R3f3ASH8wtSPba1S+bri6YELxcd+nv9QZ7aciC97uObHyxdA7BqZsHF2Bh9ZaKqPnj4pdC65n4FUeyXn4svXll6Zxwz9VeCYm6A6CxviJ+Uc0gzfvBHx8et8zhZurQCLtyXvJg5/EOI3qW+dZZP8mR2tjk/NpHuddbv/Lcg0wkvMdohRSj0SO74VbDksAG+DxtCGxY3NSAoU/PNX5q/JRnvrp26Jpaczh5Xn5NXb3090KMy/SNHRzu61MzRDH2OU0uXfxnAeSZvvJB4/38QofFQdbq0A9n2HuPnwjvnfXCmJSCgtyJeQg8e3OI7SkNX+VPm+n6KNk6kV01ZiNl3qRYEQLTh6cunKlSLZyZmrpASXozDFA32a6UnO14wp7FCimblVZRkZkWN+A41+crdyJSs+1yce3TUbUwRpqenSaTfZeO/gZqssEKyYlnT9kTWGElViumV6iVmWq+gzGLmugukWidlaLVHzsLkY4Jc8bEMBiQ1GSNlaKzjx+Jzq6yHJyurCzNVlg9PxqaPndNplztO8lviNfAUdQhf6RXrVP7xTpF94pz8us9YAx4axtWyp6uloXc3Gfapzv2oixiVBnGf/2+RhZya1/TvqAVMpu3L0vfji5FsKBrsazPvaPtR/sslrUtvGe1JpEX1auX/1T3cOH2v01l+XJt9CgWg/Z9Xxns2b7vzj7vNcHyhFXBiM1eoAyIdhzTa5SjZ88cz2qv6MwFSV4RjnKPcMfe7p6jIco49vPpT1CeIAAE0JMyyhgzBb0AY4bgd4o15pI75JExD+ak3ZhPSkiLvgAd5NYgvFBBGCrWmE2KKOttDTCqSD7F1+eQPEroePXaNyhRCnrpbNYzWASgV2IfBboB8JSlHk4lSz24gqUQIEsVxLMm1GY54m2wh7vgODZVzEJNM2MmvwaQXb2CBNYffHFcO/JQItnVg2Gyq4fsll09xFZ2dZMBZiy41U4nWynImHL8NFuaMCqJkUIwQPjkYTT2iWC5/xngkPBtBQrsCyd34Osy46L6irAaOCjCJJGCYYDdIiwAhsCgWj22AtRnYx2sHa88DeK0NctgCBqjCqvBN+ZgFYT6XMLjHp3oiYrAGPbqccs4PMi9maOwaIQk044GNZ8xg34DFiZUL6QmUxeM7OXLzCiDiRsl5LUQj+XwKUC9EksB2i+wQt4bDMVy2CnLJWtHvi1ZZsdLYqJDpKe7VSS+rt19gRWweFvVew+r3AyEqhdwwyqIxyqolVVSX1m1jVwgJXc6TphiGuXmU7CZSaMS24FgvVDn4ShWyyfZV7ATmkbQKGskT6wBd6yBWqyBS860CtHxQLNTGCeugz57cD/gUSrLhoyGBTC8e/Z57tnYA67o07buq5coAMBoQNDJOmB0V72gk7HJIkFOXFPRCOECx8PrZWfth+3AMNEpe7GHRrtOKrQToQJ4RQI3G9dIMIC9xq21UmMxPV3kIo5HTRd2FgoB/nzvbShONGBXVz2lZYDlOp4RMy4K98QjElS4sdcwwyazjblgyfHwethZx7nGGpXUMmvHeTpeYzJxkns8KFrGdV3WJAZChHINU/xZo5nzewnaMBEYBAiulIgqXfVJDCzxBOiDle4tbvWMA10dhGEs5TDhKWlx8WDHXOOoWVyJ1DilTxS6OB6lZNpG2gowjXvWf2cgni7OyqdCexEo3COvUOBm4hoNLsw1rlLsRmZPFLp4HI+adswszgi8Xd57HQSoT0IBNnbVUxqmVIQiEiloFApC1ViBtVjhUvjlOJ8ZoxJh1o5D+890Cg5yr3s/oIOj/Wj4PNZpXcPwnTGaOVec0lXfjk5EYFcdPYqErr1JNCxhgARvAbcWBDoGIAB4/HudK1vXpFoM+cI4iwAAdz9edAaAe4mxzV/b/5/hkisGCGhQAAAC/CcxztVQUD5/Pg4Iflz8i0TLSC9mEEanDQG3tpdxMkxO4dkV8DtRqD7OuYvZiOXMx6gbt51hd/QR02mcFK70MjRDeKxR8A2D1pNOR/r+uZJlbhemYSmrkL8PV4l8qhsbUXGQ58cZldp4ui7PP0uUun25au7oMyKgWhw8YfjX6YewWGOvE7jYDMvuVl7snjKMvbeHzeBTi3beqveQcevnLa7FWz+/XXKnW6wLvdzARhvWJDv6gghs8c4KcN0d02kJXjt244OmW6tDqhBwgwedYNXoFMZGncfbTp3Pxj+6GZl2nWYTu9nmQuO9ALGAOKboUmzk6vbMo8R2bfOs2xXRqqCjoZajhIdggSndg2KBstqHK1Qii06uFUunSK4sGc70kUqV5ywb6xTz0DeACNea9EECfmaqaYrXLpXOX4YiBQKEKC9mrCZ4635Nvu4oRfJlCuEvUJCBBouXIEqCwZ5Yv7lvh+bSVlqtmOaYQh5BrCfux/KpwgTp4GWyBEoPZhtiU2axjP1K1yoR2z88M5//DnB1qXeMcSIlydpTngB7aiSPnzPVSm2hDs+P6CYD1Wn4Nbgrb6sR) format("woff2"),url(./inter-all-700-normal-9d318ccb.woff) format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EF9,U+20AB}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:700;src:url(./inter-latin-ext-700-normal-1cc47d25.woff2) format("woff2"),url(./inter-all-700-normal-9d318ccb.woff) format("woff");unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:700;src:url(./inter-latin-700-normal-ced2d8e0.woff2) format("woff2"),url(./inter-all-700-normal-9d318ccb.woff) format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:800;src:url(./inter-cyrillic-ext-800-normal-f15d8f83.woff2) format("woff2"),url(./inter-all-800-normal-ab496fbe.woff) format("woff");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:800;src:url(./inter-cyrillic-800-normal-82994ee8.woff2) format("woff2"),url(./inter-all-800-normal-ab496fbe.woff) format("woff");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:800;src:url(./inter-greek-ext-800-normal-bddb6f8e.woff2) format("woff2"),url(./inter-all-800-normal-ab496fbe.woff) format("woff");unicode-range:U+1F00-1FFF}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:800;src:url(./inter-greek-800-normal-fb5de277.woff2) format("woff2"),url(./inter-all-800-normal-ab496fbe.woff) format("woff");unicode-range:U+0370-03FF}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:800;src:url(data:font/woff2;base64,d09GMgABAAAAAA8wABAAAAAAIugAAA7TAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGmQbh2YcKgZgP1NUQVREAII4EQgKqlCkdwuCEgABNgIkA4QgBCAFhFgHIAwHG+cdUZSQ1uSRfXHAk/EahJESYUWtxdYd2Ko1UY4oE1hTjvBc/iMeiaAay3p2w+AAVSrCslAxgkFGRqIKS3LwIORLcqzU3x755zezLyQ+qMAbHVTUV1VuWZbnA7TNf3cHx3H0rGLKMnCVJksrNnSBuGFsPyRE0Mk6WKWrKGIR6SoOZXA7ACeaAFf/AxQq/Gvu02bzdmfyqcyZ/JaFJHZVwLLCbPayt8nl72EOqcSkgHU9EDlAVUVkq+paV1+hVKdCSzT19ae7sHYkzHJXcP1MOpm/nFMATQAkkvwzQ3I6yMAEWQSgkBSUkYeK1qFNW9COY+jMBXSlDXVRaGYJffIJQqCBjg2ZW9s5AcM+LsZggKut2RhkkIQKIICEh1DYAoVDABFf8IDefp60T3hDGtIG6Y3wJKIl81KRheuS0gKwQHrN/mREoCzFOaC01B0DHKtMB7B/igmMUrniDETAgVBZ4FJ3PaFodfgVemULT8coSuCWcy2DrAzIIMr2Yn1OptuTMg0oD4IMu6Q78M42q4225a4H3nxFF20R5RUI66cYtDy8fPwCQmLiEpJS6lZs2nfm3IVbQyNjE8S5BxceoO5PQws5SoFSolQoNUqD0qJ0KCPKhGp6cODBuz/jDFXoAVFMRX9pAbmjAFI6qoTUjuYKaZEOGZHJRU8mIfrDAIAY1KADN0TcxF8FqrAOW3DOYlxZAGI7BiAjCBGeK4QrLEogJoUbCTwgiJN5RrJ/xxa5ckXqWhsTDyzEl5I8WxUQANtlIoG7NNYfPPOMMHhx/t8cOHE8EgMoEjXuQnWus3CgqnYiK7FB7VjNAvyQ2vmnI9Q5EnYGEtYAaDrlfEfnZ/cY/hFk4GVr/1+Ahse0lriHGjzAABGEeAjQhQAjyGGnu0AZ2N3xAuUQiwwCoj8rgQyR6AWUryABGejqZ+lBs2IE6CDDIJGjPRqFHpfFlr4ftvU4iBRt0TAKcGls7lvanjMd498SQUFFs0f/hTOxACRFn2wyOBPWZXElpIexhmUdWx1HE9cKnlV8DQIlQhUiVWI1EmVyOxR2Ke1R2ad2QOOQ1hGdY0bnTC5YXbO5YXfL4Y7TPZcHbo88nng983nh1xLQFtEXNRAzFDeSMJY0kUJlzGTN5SzkLSEsyABOINqASZA7QPU4qL4ijwNUIwU7RsHET3YNifF0FYFQzHc1i/OquBLIUxE8TyxB3Fu2uSERrzbv7jAMz5/HE/PkcuY03p/lsPqKAHmDhiLMD2ADfMtjCgOlcrGUx9pyaYCAN6NcEMjT8808U5ZlcsUyqVlmlJrYf3zIOgopJZvovU3Yb3nY82uc/PAmWXnjgckoNpdRPqTIbCblpIKOuX14c+WTB+JJj55RVc8fS2yJT4eOOfwE1w3YbrpFE723zZKR8WLiacWMlgyj7UZx7FuEWcLY3MnxvpgdCSyB5SgqpcmMony4Mp6Yb5jg8RB275mTjgyCsB+4Vkq+1/vYdjMMjJhgXTHZI9KIlWeenbYqDTb3mGGPblFVtw37pooEEuNpot1zAMYEt/HYT9inf+i+CZgohWcgOYWcxuA2eS7Xg+MCidE04YY2C9ywufTs4+yb3NqNB1mHjd6cDfKWvYvNDFHTsRM8t9IEEvpDS5klNpcdPR+Dtl7FJ2afFXnbtDDtFE2X6TKTJsqcLRlqHi7JNKeliAmdZBieMuzedMaLToudCi/FtcA8s8T14FF7lM6iPt8kTvN6w1d42PTJD1PcrpR/1ipM6lI7X5aW0iqVL0lV3WXSJMti0oJ8wUtg4lysSVmpC2ETyKib5vmAqOXkmXWiYZ7ElOLJs6cJxLqiTHb4aYaBTdszFlbKDRvvkrrDmMcdbAmbnPIhW1Vg9hFk70x3WfexI3pMpPk2aY+ZfLl8w/1+y+u7M8oyMC1ytWzDu39MzN27ZvrDYotideMOJz5/Odet++fzJz9HvQAYvAcDhSqhjqQOnGCQ2R0zVq3MmZmzatUMNFxbvFxUjkES5d73ycd37xfSNTCJdO/95OtD2j7cj4FnSnyuTZ418/pkcc68UqTPnHUNX1yUF6Qom/zQ+D2Zor3Oj5rtPU16Q7wDv9HTm0nVe0h+TvcmPX37/Xz/tzBn1Zrc4uLVubmrCmF/0aHuZX0j0eJPrxaPK1AeWZ9on4LKQKMQn8w6/NVq1NydsuHNBmiCZj7Krzwzz5a5eZHhYvt/hJWiJcHxrVvw++qTs/L+TZYlHJP5TFx9R2W9NPNb792VQw+afC94xA37WkfUqJt062/tpinRzEhcFiNLEPn2ZrXNWse37jOyP8771fhtXjWYL1uf679mmXF9UrE9NIYVvASDJz9k4bGl5hqN2pJZPrTXbou1505rXmZ2+ZDuOy2WHrstQxE9LexjzqF9+V/e7R+aeurFStmwk6cNqoOm5BKElqBvnNHSe2CSPV5jIfrVHZQwaWzfQT30UZqYyCPikDkH7rUywQkaL0FDFrtdN3NcnjaH6QpmjNPmie7DIdoWVpt1at/QN29Bxa199b99M/m7kgzjiO6HrTZSpmdkW6jZrBTfsNDuGiikOaXPhpGjMhuva6z+5n6Gccvn6l+AxrVweetJn1duXPR2ahWJjddfjobFPrUk4Z/uvS34JzqL2mH4DPPd09Mm9m3ibHK8v/7liD6+rNyw+E0529TSp3eyW4Yz+N8R+XEB/whSmhY0i6zfHood8XLF53hKFT2zUfm8Ix8MSNVieGoJhkPpOX722NZmx9D4SWmunHuXu3v2nHp+8vkCyZbDgzcfliB4zqG/xPmjlycgsaD5gK6xzRvaopMQ+5Mkzxy+Nh4a6Fv06RLTvHGrTv3Q7oWyJ/YHPv7wIfAx9ndDj+wRRSOy9Whd//7QkDV6KrM5xTfUTWUvKZtMhR1p1TkDRag9LZgxXqudOV6XaL5DdPjmaoC5oQc/vA88iLlKoT7PatXlDWu690cX7kdB8VaaEXy4tuxhzAgzF+ZpGlHKrqfaMcDVEHPDd3/9ErSbmFtPbBhYXmFIKRwRqqwaTuZEsFJDUIpoKUdPCB0RMyZmIIMOz131MS9k//t3oOl3QZRQl1RhHNmf+vCvA/KqZg/RGBprm3RWte9B7lcj3z5b1ywpKCkyJai5Ut0b1Oqz01UvZ6k6Xpx/eX7R/K+m9AEmJDyvnanqcHH+lfnR01SRb3+U/RhYhtZx76ao1OdnXZulnqp6bH4XNDGN7KOKaJYbFseuu37vX0NcSd+eInROr53UsO21+efnd5rWMK7/kvYYkONIbj4gKKFuTFC9iF18ZxNosqtT6/UN7K/sE6AKDomBqM0hhUQBsj4IAAKYiXGkMsoFrQHDwkhJwqgifqLXGAMf4oJRTUwirukO1KLnABrAiO8k1qggKsngJW0w7ISN+D2qkrASf4PMuc6JJDlS+3SmYRF0JAndhBoSbAVQD8sDXFcsD2A3kUM4kUMUq8J0VhBeBge4g5Ggqhp/qFC1y3ljABwWFCTyfYX6OCxA1iFh0ISEwUocFiBYHBYi5JAI4dv8TywjUb6MoEVNAcNEzCERHSCb9ENX3KQK/RF4fHfhkmxaC+JxUw0bBYVJxAkISLUHTkv1PEAk1QHwgqghAzpuY8YsKL0CUxAcadAfVWXxJmVs48mwYxL326jEBO6vXkXQnHf7+jDyYviPxx/BkY7aPM7CKBqOv54T4eBr8QcD4keMJfuRKxRuYPbU/g8uTiM1XoghGoi0qJswA2DzBYnUzA3qEw0swRqVjmjWhUVuTEpKFUcG/t6RqT9rTYvy9ZECDpzp0dnkM4P2MnMuEEUyoQvJhF04Uw3FmUtERkJW7v/YlgbSKAs44dUEDRPWAtF+qeuHo0SHT/NrGCj1leAG1qtdiB4GET1cInpwRUodsvaV9VZh2nK13A8+pBRV3R0aMqDb34q93PNf97niT0v+Hj5AAgB6AkwnVomef2pEMtoT0Qixu/CGkEgcCbQG2eq1sLcQEm2SDkuaEk5Uolsw0ICgiPazOeMIUthdXIVWNxTTE0RiRgI907HV0AG8GdbTUMEiGnP+1JCTGKBaKjENmVCNexIQ0UN7sLswUiezG/qkmJFAa4Ct3spXgQPUy3VMjoViKl4KnNwzgbZm/J9N4jEgtTB2Q9iNdYi+KCvFZEwHqAHBrxIV7U+Nx4OmFosm7GRrMf8Ro6Ryi3IObTEk3KQ6igVqZhfLVnNadUN1ulAojgSWkmnfNDmN4dwrgZRBCvx5Zmup0T0pNO4xhQU/kzOOoDOzi9NpdwPLjRKKPWGgZ3qmmnMA1Dbmq9D8hWh25hTGQVkSiUpYFEpCVlJCxpESpSTK4vh65xSODF8mJ1FOQQ+Ek3tD52vFSeHRgGmx17IbTCzjEH1KDrVSTEFnQfnnCG0oUVEWeTQ0tVikeA648YCgigEIABTvriIqRjFY1vkLEyICANyp3R8CAHdTB3i+PfhtCS0UAwANEgBAAP8mxofZCtrnz1sBgbuDf5zoCNGaKUfPPCAMN54+B+caXIWOp+qhgPcHdGIifA6zEdXCAIo5scRITUvzYJjgFziFc6kImHoe6CbTEuqepEuRvFZO2x4oYDEc3aGXQ7sGp0M+FYHZGOakojmHmHoK+gq0Al9oMXtag7OSlubBKvRfcG7HhGPt61zRTXoylM3wUzmO/YaUJBDWdPZnfBtq+AZsRMtfg4Dfiq+tkD8aW3ilhVjJL8EmuhAdaQN60CbU0HOIozfP9VMAJy41obgqDt1qfaEWX2RYVQ+c8qoji8+Lk7LOSPnVPEtny/ivc1iqr0uk6q3LCOKonpyiykailSgu1ZAPWKy3ZlL0W6911gT11kxPR9eCTUIsp9uctFDrWjeNLbTM2ByYmehreTaeu25poWtiZs7GF0BxbGquICqqo1c89tKTiGcTI1FQceaM6wUv6a/yY656Y2HmUcPE0IsjLR1LQ49mkiJi4vKKjhzbdazoblUYnbGq6T0TLmHz8zl+TcJiHqXFxWS0xDzF8bXyk8y555106EnmXKRO5lBkb5xOaZ99a3bC5nWSe671RbjH62S2JMZd/yot8Q9jf477Ft5k) format("woff2"),url(./inter-all-800-normal-ab496fbe.woff) format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EF9,U+20AB}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:800;src:url(./inter-latin-ext-800-normal-b6167428.woff2) format("woff2"),url(./inter-all-800-normal-ab496fbe.woff) format("woff");unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:800;src:url(./inter-latin-800-normal-a51ac27d.woff2) format("woff2"),url(./inter-all-800-normal-ab496fbe.woff) format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:900;src:url(./inter-cyrillic-ext-900-normal-b1c13874.woff2) format("woff2"),url(./inter-all-900-normal-50daf4f1.woff) format("woff");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:900;src:url(./inter-cyrillic-900-normal-768011c3.woff2) format("woff2"),url(./inter-all-900-normal-50daf4f1.woff) format("woff");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:900;src:url(./inter-greek-ext-900-normal-bebcb6fc.woff2) format("woff2"),url(./inter-all-900-normal-50daf4f1.woff) format("woff");unicode-range:U+1F00-1FFF}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:900;src:url(./inter-greek-900-normal-ffa82654.woff2) format("woff2"),url(./inter-all-900-normal-50daf4f1.woff) format("woff");unicode-range:U+0370-03FF}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:900;src:url(data:font/woff2;base64,d09GMgABAAAAAA68ABAAAAAAIsQAAA5cAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGmQbh2YcKgZgP1NUQVREAII4EQgKqkykcQuCEgABNgIkA4QgBCAFhDgHIAwHG8Edo6KGkVbdI/urA9uY9tCHApEtajW0DpSlMYxIKI2hfIPF0YbhM9A7UN7x+HENZp9HVATf7/fbc+97qFY8EbqHRKmmlUgkeyUyJEq0hqf0j//fful982cJKMS8wLNUYCFjVGVVj4+sjJBFFS4D4ItewGsU6azelbQaBZt1RCSDs0iFCFl3LCA4lRFZAjvLmaC3Aae0xksos/6jHn1Zd6/CckhZDvkuUy5dypRfTlmwh2saKgUexihZyXw6QPrcxq4g9FBJEqasxrY5KrFawkK8D1amCPu/udJm9k9ec4gKc3stCwnEqrLC/M0mnSSbOdwjKPNeAUkBS3i+KQBZ9GVZWwX4PAnjy8Kr+urr0nNYOxJmmRJ8bjDpgJu/d04BBgAU+vgvIyZOxM2L+KWRrBFkzCQybR3ZtIXsOEbOXCBXCkiJQNp6yA8/EAJ9nILY5trOCdz/2G3Ajbbz7QaMiJ4VEKBQYsy2ICUEIv7hYHrvRk0zPkzNGsyEYRXMzlxsueieoZQCOJRn2XAYaSHbIT0AaZAWABcigoedywYbZ+dMt6EDS+1sde+oE9Juaa/e5a58o4Ko/sBygGQA4kRlQJQpGJCEKZ7s7GsenF/FCdaqjXZg0xP/eEcrHWD6CoT1ZQwOcQlJKWlZAwYNGTZi0YpN+86cu3Crpq6hiTn34MIDUuoVQ0wEM8FCsBJsBDvBQXASPAQvYdmDAw+5+0vOCEEeiKCCpcPUTIYZxGJYA7EZ9gVxECfxEK+HcooZ7R8GADqwgRNi0OcZ+qvAPKzDFpwrPh6jA5EZbhAPaAidK0shp5/agBEKT1ACI/LiM/r3d2ytK1cMrhVI/sCJiuvjbEVADTKP5AmKpfE/ePEZjfPiqr85yDOUJLrBnG23CepxnSmBprtPJqCF7iXmU/DBifXTm+wchawCCj4DDIw1+s1u3e4x3igW3K/e03cBfY/0HogHoIsSmKFFiBIDExhYwM6LpS4FAcff6BILwhkRELMyAVSEhQMgX4ECKpggITCBRxQwxkjCQiITFU3V0lbqyIi3UfslCaKQkdJTNeShDo/wVOfEMf62CGZW9nf0XzgvP6CY9sMmtzM5JX5Xssoka7h1MovklimsUFqlskRthsYcrXk6C/Rmmeww22Wxx2qfzQG7Qw5HnI55nPO6EHAt6EbIrbA7EfeiHsQ8inuS8CzpRUpeWkGfin5VA2oG1Q1pGNY0QhjTNq5jQtekHkIpMQAuIUYAK1DHgHYJaK+hLgNoscSOSShoo13DSDkdRRhivoupNK+CK4GNmfM8sQRtVdvcEEYNL1By+3SolhtZ5SjTzoHTiD6/3uu/EhL96nl9jT5uosHxpMMo0XPqY2xGL9bA1iPAbORnfMWuA27oWH5Uzap8h7ppF/GNCnzqk+0yuc2nvRcKZ3RCAUA84gcDqvZwu58yM//07v8oW/bfXh37FHKIZ16kXQRVM1PiwwqFlv5ueB11VAWDGw86HrpuZHF8Wo4dDRO6iHZnzIlsp1TAN54YSej4qDw4Qcuif3w7n0fEwTwXzMkaBfjlIGf0tSzWGTYVencNONg3EDE3nM7eOiOcSfhGedDEZQRL/cKdXE2aMaxd5fA5LAptaoXX/Yl4yNnr4WBHfD4nHjsc1O3K3q3Q2YeUlhGKVwWqmAsr+lQHeHjt+birr4tMMzkZWBxotm/KZb0jIJbCpFqCFTUORku8qpYRyBsn08zQP1hXwatzHdThrL+9Ptfmg9erWWmKbnsWT2Zb56GP+jo3k77AS5urhC6owMx/hkVGPcI0TiFN93Ox5kwEHVEaUNRp9AR3d44Kq2JZGr27qpbgUCBXd0Z8ZWluu/nhG3dzuL5lrT5GGTZTEb60mpiznHXYzCF6zRyvO88rx4VrYowZb+iFmhiu+IxN2F7jqYHL4At33Z/Z8Pj+/abHP870DPUZjJ+9eHeX497evfNiFAEI4kDAChZ9ih4CCKZy8LrsFq/F7vQiVj09BBOqVD3XngzXXX1GeqxVqLj6RDc8YNU323bGHrjQvHEjIS9+5vzaxTpiikt6YQv2b7T5FPnrc01rWV9F1IOfrZvOKFWx8Efrg0u7uCczKp3Oyhn2rkr+JM5AM9EbvplvGLDj3YttQr3u2i9T7JVkBI4QGceGH4cjQbFa0AtID+761b7uxidrbcc+afwseynhVe7wgpQ4uXFKjrl0lklVGFB1dPsT//3XToXldLv9VH243KeNtzXX7koonZKzILlgZiE/Mehf9+RvD+LGcXpuUj5OD9kxeP+OaerhB6YM3upq2l+yqDmimGj1IBgT0EYWL125p3DGbotjYta2hqZo46iyWOqqMrY1NUXkRwRp3vBXsy5cmvXm0eXZ0248OhRSf+uz+tGneZsXBjtyuTmOjIL8hRl5s6k884QPFi3KrcicHplvfPcmZMuVBx/yEMFAjzoGpXkat3TV1BQ2NHYDwW7bIR3h72bfvDjH7weGxd+d7V5uLpw7Lf3g8hXpBxBbOKF2WuaK5RLxGYtZjHnowAFjQw8sWDY1/lCsoje7/0e0x/7s70/tGDbxP293HNj6pEuQYXeP3o7GpvU1BXOy0hxYXmhncX5x/0D+n6/+21WeuNWQbM64mz/kzNgfzumWteUHNwwoiwg5P/KmiQsS9GzQdb1pNMNHr+2+Sy1BlRft8TSIKvRevuyLvYzom97Yg3B5aP7NM9d+WAy9rb13ix9elhZhjJf13fhmE0ochvLcPMOYzv1tw6ylv73+XQdVDEdiCZefOM6QbkFGr34qro7vfd8Xkb+YEwdOrWmonzIXya1+cfT/6ujJCeywuohKzQ8puR9TG6jK1ikVGvxc/7XcWXZbTwa6Y6+/fzfuOroNZMGs5g31s1ZGXXtuVT5XBF+sS3+zP+ImXDofCmaFa0Au293qMVLdiRfkspgL/DAywhaVNrcuqmhsSBm/bD49LSo4si64UrN/wNCFVD1lai2oIIUErxTjfT5SSH1Jy5rGotDX3+ZghrB5lqUxem60cVQaR9/Lxqz1zvnxNp1tZLUuISLRBNnNzz4e4u8awt3quNdRv0G2bs6MdSi6VdGNd+wS/q9cJZ+xCkltv67HMp1fdW2VCS/D44WIXFdFW8aGxU8OLdAc/6F38cK8xuJcDT5U+tsiTdc6zndYOiLzi/bnoKyitSy+Ulc80qwbEy5ndidgQoVQMaYsuDKyNHh0cJAZGtln+hQ96HGgACixivqUhnCuUXKAczWZSL1xbqB11GeSgCpnNm+hdqTlVgqU7xDGYwV6aV/nOspJRy3Jk7A+hHoR00x1WuPbOrtTDgsKZCxqmyXlHIaklThAQ+1BADWGsgHSGMoG4AhlA6ClrCS90IoosiQEfzoHSF4rpKikcDKRuEa+HFgy4r3WG1FvRL0R9UbUG9HgCBihLzMvRlPUcoplJRlSV1IeGsyBx6Yhg8bGMz5oVQQon/C4UmCkcV7sEfMwMb9643hqDvypBnmNciigtBjixFRYDFnbrMJGQF4HAVHm+LRWZPFwnfJaENaHSC/abgYvb6CI9NlOxmGFz8cpSKQz5S1wWscwaH3iW7AM7Y34myUwj2qjOVoUdLwrkbgUPdIJL8qFDLEIylSSV8IFKO0Flhe1DVixCNy0yPHGKupXxq8FBFg2z4D+Xy1buQCFi1t/1iDQSV6mTGgtgxo+qS2gFyeBXpwEJ+gkB0snLfHGEyaXL8OJMJjB8qiRVoxR6kocAVg+n5+GHnE+/VFbgshrC0EvrXVYxVpwi7Xwp1gLfqsxg51dyUBSMueXzxvzSecDYxAE5PSvOyv98/4Xqfl8S//lCzQAgAMIr9aD63MSnshcjTzF3Sx20kCOhrUiiSJ8xShIs4cLlgI9BMQyZgIJCNTI/dWOCZQNardUIx2dgxi3OkAWmzOdWoQdkHus/WVpGnlqLPoIAVZzLDGRcEn6M0AjHz5H7cZUGaDuRPCAZrFWf7W4A1W4mifM1aTpsCBwOQ4EqVfpQIHQ52EvAdCiUHdUZWqepdxWhA/RwwCQDA1Z6nN6CSRaVHIh0ST1MnIVwleIOaRKQao9DmGQ0krcFCFKFuiM4knAYrVcZmjwlWOq5FeOIQgBfZ8ZVhKmIiTpT4QKf+IQlF63JB2dg5h2ErBYbE4lIko8yLxWQ+TQLJUcUwPoE8SlcdFTEN1eZDFxiKLoEUVBdFu2kkJ4xqBJ0wFEHYwZouRnXBJEZC8DuCy6m7pDnIRnKcGB1jqIk7GD7fO6gsXmqhKhpZ4Gh7QaUDoJQAGQyX9KefTH0xlBxpckTAMA+PHZ+TAA+MlWdv/1r4HV4XVaAGBAAwAo4H/EzAhekV682AoobA6Dds0L4ogXsU9YaTXjg7CGVJKZshT0V8hhZwVpiBerVUbEnFhiqkRtHpRG+QSCyo3MoMi5o7ukBoZeZHiY1ipZqoOVOkxFD5gjsC4pYaCMg4g8iT9XYn6FVZkCK89OeVKNNG0eFD4G4nakAW6aK7rL7AFbh8IBKJbT8qukGpgn8Ct4eBQitsL4XgcEvK9tgMKJ3bjjdjgVndjOtMPIiDAxbpxgvNREhTMgngTQDsoAQfHT8bTyQkP+qKhRAa44y8TuVWb0fsuSrL+Lc12WGfNflrNvuKw3sjjZSB0Phgm0UhMZoI2uAv4LizlK5lDIeq3LmoTP2sqKSrqChgzEwqCTCslf66aGrry2oANtTRV5z8ZzL+rpKmlq6whKOiCOLXRM6devqKweu+dJn2dNdf1ANjqUUXZeMlXk3EtqHj2rOpJX1JNvu21YnwGDJk07cmzXsemsunPCmZsOVNbUEFxqbfoY5Ax4NGrQgDF5A558WJ/UkdGpJraVCaNDir9RY+UdGEVtn31rdlxmH5Wfy79pz3FC0XMkm951DHjD+C+TWo7wTQAAAA==) format("woff2"),url(./inter-all-900-normal-50daf4f1.woff) format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EF9,U+20AB}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:900;src:url(./inter-latin-ext-900-normal-3cff82a5.woff2) format("woff2"),url(./inter-all-900-normal-50daf4f1.woff) format("woff");unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:900;src:url(./inter-latin-900-normal-f2db7f82.woff2) format("woff2"),url(./inter-all-900-normal-50daf4f1.woff) format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD} diff --git a/invokeai/frontend/web/dist/assets/index-e53e8108.js b/invokeai/frontend/web/dist/assets/index-e53e8108.js deleted file mode 100644 index a9d1c5aede..0000000000 --- a/invokeai/frontend/web/dist/assets/index-e53e8108.js +++ /dev/null @@ -1,115 +0,0 @@ -function h2(t,e){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const s of a.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();var yn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function AL(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var jt={},IL={get exports(){return jt},set exports(t){jt=t}},hh={},be={},LL={get exports(){return be},set exports(t){be=t}},De={};/** - * @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 qu=Symbol.for("react.element"),ML=Symbol.for("react.portal"),DL=Symbol.for("react.fragment"),NL=Symbol.for("react.strict_mode"),BL=Symbol.for("react.profiler"),FL=Symbol.for("react.provider"),$L=Symbol.for("react.context"),zL=Symbol.for("react.forward_ref"),GL=Symbol.for("react.suspense"),UL=Symbol.for("react.memo"),jL=Symbol.for("react.lazy"),qS=Symbol.iterator;function WL(t){return t===null||typeof t!="object"?null:(t=qS&&t[qS]||t["@@iterator"],typeof t=="function"?t:null)}var p2={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g2=Object.assign,m2={};function Us(t,e,n){this.props=t,this.context=e,this.refs=m2,this.updater=n||p2}Us.prototype.isReactComponent={};Us.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=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,t,e,"setState")};Us.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function v2(){}v2.prototype=Us.prototype;function my(t,e,n){this.props=t,this.context=e,this.refs=m2,this.updater=n||p2}var vy=my.prototype=new v2;vy.constructor=my;g2(vy,Us.prototype);vy.isPureReactComponent=!0;var KS=Array.isArray,y2=Object.prototype.hasOwnProperty,yy={current:null},S2={key:!0,ref:!0,__self:!0,__source:!0};function _2(t,e,n){var r,i={},a=null,s=null;if(e!=null)for(r in e.ref!==void 0&&(s=e.ref),e.key!==void 0&&(a=""+e.key),e)y2.call(e,r)&&!S2.hasOwnProperty(r)&&(i[r]=e[r]);var u=arguments.length-2;if(u===1)i.children=n;else if(1>>1,ve=W[oe];if(0>>1;oei(At,Q))mei(qt,At)?(W[oe]=qt,W[me]=Q,oe=me):(W[oe]=At,W[Ue]=Q,oe=Ue);else if(mei(qt,Q))W[oe]=qt,W[me]=Q,oe=me;else break e}}return Y}function i(W,Y){var Q=W.sortIndex-Y.sortIndex;return Q!==0?Q:W.id-Y.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;t.unstable_now=function(){return a.now()}}else{var s=Date,u=s.now();t.unstable_now=function(){return s.now()-u}}var c=[],f=[],h=1,p=null,g=3,y=!1,v=!1,w=!1,x=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function C(W){for(var Y=n(f);Y!==null;){if(Y.callback===null)r(f);else if(Y.startTime<=W)r(f),Y.sortIndex=Y.expirationTime,e(c,Y);else break;Y=n(f)}}function O(W){if(w=!1,C(W),!v)if(n(c)!==null)v=!0,V(I);else{var Y=n(f);Y!==null&&ie(O,Y.startTime-W)}}function I(W,Y){v=!1,w&&(w=!1,_(U),U=-1),y=!0;var Q=g;try{for(C(Y),p=n(c);p!==null&&(!(p.expirationTime>Y)||W&&!te());){var oe=p.callback;if(typeof oe=="function"){p.callback=null,g=p.priorityLevel;var ve=oe(p.expirationTime<=Y);Y=t.unstable_now(),typeof ve=="function"?p.callback=ve:p===n(c)&&r(c),C(Y)}else r(c);p=n(c)}if(p!==null)var we=!0;else{var Ue=n(f);Ue!==null&&ie(O,Ue.startTime-Y),we=!1}return we}finally{p=null,g=Q,y=!1}}var L=!1,D=null,U=-1,X=5,K=-1;function te(){return!(t.unstable_now()-KW||125oe?(W.sortIndex=Q,e(f,W),n(c)===null&&W===n(f)&&(w?(_(U),U=-1):w=!0,ie(O,Q-oe))):(W.sortIndex=ve,e(c,W),v||y||(v=!0,V(I))),W},t.unstable_shouldYield=te,t.unstable_wrapCallback=function(W){var Y=g;return function(){var Q=g;g=Y;try{return W.apply(this,arguments)}finally{g=Q}}}})(b2);(function(t){t.exports=b2})(nM);/** - * @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 C2=be,Yn=$m;function ae(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),zm=Object.prototype.hasOwnProperty,rM=/^[: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]*$/,QS={},JS={};function iM(t){return zm.call(JS,t)?!0:zm.call(QS,t)?!1:rM.test(t)?JS[t]=!0:(QS[t]=!0,!1)}function aM(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function oM(t,e,n,r){if(e===null||typeof e>"u"||aM(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function wn(t,e,n,r,i,a,s){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=a,this.removeEmptyString=s}var nn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){nn[t]=new wn(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];nn[e]=new wn(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){nn[t]=new wn(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){nn[t]=new wn(t,2,!1,t,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(t){nn[t]=new wn(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){nn[t]=new wn(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){nn[t]=new wn(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){nn[t]=new wn(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){nn[t]=new wn(t,5,!1,t.toLowerCase(),null,!1,!1)});var _y=/[\-:]([a-z])/g;function wy(t){return t[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(t){var e=t.replace(_y,wy);nn[e]=new wn(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(_y,wy);nn[e]=new wn(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(_y,wy);nn[e]=new wn(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){nn[t]=new wn(t,1,!1,t.toLowerCase(),null,!1,!1)});nn.xlinkHref=new wn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){nn[t]=new wn(t,1,!1,t.toLowerCase(),null,!0,!0)});function by(t,e,n,r){var i=nn.hasOwnProperty(e)?nn[e]:null;(i!==null?i.type!==0:r||!(2u||i[s]!==a[u]){var c=` -`+i[s].replace(" at new "," at ");return t.displayName&&c.includes("")&&(c=c.replace("",t.displayName)),c}while(1<=s&&0<=u);break}}}finally{Wg=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?Kl(t):""}function sM(t){switch(t.tag){case 5:return Kl(t.type);case 16:return Kl("Lazy");case 13:return Kl("Suspense");case 19:return Kl("SuspenseList");case 0:case 2:case 15:return t=Hg(t.type,!1),t;case 11:return t=Hg(t.type.render,!1),t;case 1:return t=Hg(t.type,!0),t;default:return""}}function Wm(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case ls:return"Fragment";case ss:return"Portal";case Gm:return"Profiler";case Cy:return"StrictMode";case Um:return"Suspense";case jm:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case P2:return(t.displayName||"Context")+".Consumer";case k2:return(t._context.displayName||"Context")+".Provider";case xy:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case ky:return e=t.displayName||null,e!==null?e:Wm(t.type)||"Memo";case ca:e=t._payload,t=t._init;try{return Wm(t(e))}catch{}}return null}function lM(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Wm(e);case 8:return e===Cy?"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 e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function Oa(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function O2(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function uM(t){var e=O2(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,a=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,a.call(this,s)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function df(t){t._valueTracker||(t._valueTracker=uM(t))}function T2(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=O2(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function kd(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function Hm(t,e){var n=e.checked;return mt({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function e_(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=Oa(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function R2(t,e){e=e.checked,e!=null&&by(t,"checked",e,!1)}function Vm(t,e){R2(t,e);var n=Oa(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?qm(t,e.type,n):e.hasOwnProperty("defaultValue")&&qm(t,e.type,Oa(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function t_(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function qm(t,e,n){(e!=="number"||kd(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var Yl=Array.isArray;function _s(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i"+e.valueOf().toString()+"",e=hf.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function wu(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var ou={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},cM=["Webkit","ms","Moz","O"];Object.keys(ou).forEach(function(t){cM.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),ou[e]=ou[t]})});function M2(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||ou.hasOwnProperty(t)&&ou[t]?(""+e).trim():e+"px"}function D2(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=M2(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}var fM=mt({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 Xm(t,e){if(e){if(fM[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(ae(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(ae(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(ae(61))}if(e.style!=null&&typeof e.style!="object")throw Error(ae(62))}}function Qm(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){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 Jm=null;function Py(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Zm=null,ws=null,bs=null;function i_(t){if(t=Xu(t)){if(typeof Zm!="function")throw Error(ae(280));var e=t.stateNode;e&&(e=yh(e),Zm(t.stateNode,t.type,e))}}function N2(t){ws?bs?bs.push(t):bs=[t]:ws=t}function B2(){if(ws){var t=ws,e=bs;if(bs=ws=null,i_(t),e)for(t=0;t>>=0,t===0?32:31-(bM(t)/CM|0)|0}var pf=64,gf=4194304;function Xl(t){switch(t&-t){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 t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function Td(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,i=t.suspendedLanes,a=t.pingedLanes,s=n&268435455;if(s!==0){var u=s&~i;u!==0?r=Xl(u):(a&=s,a!==0&&(r=Xl(a)))}else s=n&~i,s!==0?r=Xl(s):a!==0&&(r=Xl(a));if(r===0)return 0;if(e!==0&&e!==r&&!(e&i)&&(i=r&-r,a=e&-e,i>=a||i===16&&(a&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0n;n++)e.push(t);return e}function Ku(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Fr(e),t[e]=n}function EM(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0=lu),h_=String.fromCharCode(32),p_=!1;function rC(t,e){switch(t){case"keyup":return tD.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function iC(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var us=!1;function rD(t,e){switch(t){case"compositionend":return iC(e);case"keypress":return e.which!==32?null:(p_=!0,h_);case"textInput":return t=e.data,t===h_&&p_?null:t;default:return null}}function iD(t,e){if(us)return t==="compositionend"||!My&&rC(t,e)?(t=tC(),Jf=Ay=ga=null,us=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=y_(n)}}function lC(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?lC(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function uC(){for(var t=window,e=kd();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=kd(t.document)}return e}function Dy(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function hD(t){var e=uC(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&lC(n.ownerDocument.documentElement,n)){if(r!==null&&Dy(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=n.textContent.length,a=Math.min(r.start,i);r=r.end===void 0?a:Math.min(r.end,i),!t.extend&&a>r&&(i=r,r=a,a=i),i=S_(n,a);var s=S_(n,r);i&&s&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==s.node||t.focusOffset!==s.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),a>r?(t.addRange(e),t.extend(s.node,s.offset)):(e.setEnd(s.node,s.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,cs=null,av=null,cu=null,ov=!1;function __(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ov||cs==null||cs!==kd(r)||(r=cs,"selectionStart"in r&&Dy(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}),cu&&Eu(cu,r)||(cu=r,r=Id(av,"onSelect"),0hs||(t.current=dv[hs],dv[hs]=null,hs--)}function at(t,e){hs++,dv[hs]=t.current,t.current=e}var Ta={},fn=La(Ta),Rn=La(!1),so=Ta;function Ls(t,e){var n=t.type.contextTypes;if(!n)return Ta;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in n)i[a]=e[a];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function An(t){return t=t.childContextTypes,t!=null}function Md(){lt(Rn),lt(fn)}function E_(t,e,n){if(fn.current!==Ta)throw Error(ae(168));at(fn,e),at(Rn,n)}function yC(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in e))throw Error(ae(108,lM(t)||"Unknown",i));return mt({},n,r)}function Dd(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Ta,so=fn.current,at(fn,t),at(Rn,Rn.current),!0}function O_(t,e,n){var r=t.stateNode;if(!r)throw Error(ae(169));n?(t=yC(t,e,so),r.__reactInternalMemoizedMergedChildContext=t,lt(Rn),lt(fn),at(fn,t)):lt(Rn),at(Rn,n)}var Mi=null,Sh=!1,am=!1;function SC(t){Mi===null?Mi=[t]:Mi.push(t)}function kD(t){Sh=!0,SC(t)}function Ma(){if(!am&&Mi!==null){am=!0;var t=0,e=Qe;try{var n=Mi;for(Qe=1;t>=s,i-=s,Di=1<<32-Fr(e)+i|n<U?(X=D,D=null):X=D.sibling;var K=g(_,D,C[U],O);if(K===null){D===null&&(D=X);break}t&&D&&K.alternate===null&&e(_,D),S=a(K,S,U),L===null?I=K:L.sibling=K,L=K,D=X}if(U===C.length)return n(_,D),ft&&Qa(_,U),I;if(D===null){for(;UU?(X=D,D=null):X=D.sibling;var te=g(_,D,K.value,O);if(te===null){D===null&&(D=X);break}t&&D&&te.alternate===null&&e(_,D),S=a(te,S,U),L===null?I=te:L.sibling=te,L=te,D=X}if(K.done)return n(_,D),ft&&Qa(_,U),I;if(D===null){for(;!K.done;U++,K=C.next())K=p(_,K.value,O),K!==null&&(S=a(K,S,U),L===null?I=K:L.sibling=K,L=K);return ft&&Qa(_,U),I}for(D=r(_,D);!K.done;U++,K=C.next())K=y(D,_,U,K.value,O),K!==null&&(t&&K.alternate!==null&&D.delete(K.key===null?U:K.key),S=a(K,S,U),L===null?I=K:L.sibling=K,L=K);return t&&D.forEach(function(ce){return e(_,ce)}),ft&&Qa(_,U),I}function x(_,S,C,O){if(typeof C=="object"&&C!==null&&C.type===ls&&C.key===null&&(C=C.props.children),typeof C=="object"&&C!==null){switch(C.$$typeof){case ff:e:{for(var I=C.key,L=S;L!==null;){if(L.key===I){if(I=C.type,I===ls){if(L.tag===7){n(_,L.sibling),S=i(L,C.props.children),S.return=_,_=S;break e}}else if(L.elementType===I||typeof I=="object"&&I!==null&&I.$$typeof===ca&&D_(I)===L.type){n(_,L.sibling),S=i(L,C.props),S.ref=Ll(_,L,C),S.return=_,_=S;break e}n(_,L);break}else e(_,L);L=L.sibling}C.type===ls?(S=oo(C.props.children,_.mode,O,C.key),S.return=_,_=S):(O=od(C.type,C.key,C.props,null,_.mode,O),O.ref=Ll(_,S,C),O.return=_,_=O)}return s(_);case ss:e:{for(L=C.key;S!==null;){if(S.key===L)if(S.tag===4&&S.stateNode.containerInfo===C.containerInfo&&S.stateNode.implementation===C.implementation){n(_,S.sibling),S=i(S,C.children||[]),S.return=_,_=S;break e}else{n(_,S);break}else e(_,S);S=S.sibling}S=hm(C,_.mode,O),S.return=_,_=S}return s(_);case ca:return L=C._init,x(_,S,L(C._payload),O)}if(Yl(C))return v(_,S,C,O);if(Ol(C))return w(_,S,C,O);bf(_,C)}return typeof C=="string"&&C!==""||typeof C=="number"?(C=""+C,S!==null&&S.tag===6?(n(_,S.sibling),S=i(S,C),S.return=_,_=S):(n(_,S),S=dm(C,_.mode,O),S.return=_,_=S),s(_)):n(_,S)}return x}var Ds=EC(!0),OC=EC(!1),Qu={},si=La(Qu),Au=La(Qu),Iu=La(Qu);function ro(t){if(t===Qu)throw Error(ae(174));return t}function Wy(t,e){switch(at(Iu,e),at(Au,t),at(si,Qu),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:Ym(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=Ym(e,t)}lt(si),at(si,e)}function Ns(){lt(si),lt(Au),lt(Iu)}function TC(t){ro(Iu.current);var e=ro(si.current),n=Ym(e,t.type);e!==n&&(at(Au,t),at(si,n))}function Hy(t){Au.current===t&&(lt(si),lt(Au))}var pt=La(0);function Gd(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var om=[];function Vy(){for(var t=0;tn?n:4,t(!0);var r=sm.transition;sm.transition={};try{t(!1),e()}finally{Qe=n,sm.transition=r}}function HC(){return vr().memoizedState}function TD(t,e,n){var r=xa(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},VC(t))qC(e,n);else if(n=CC(t,e,n,r),n!==null){var i=Sn();$r(n,t,r,i),KC(n,e,r)}}function RD(t,e,n){var r=xa(t),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(VC(t))qC(e,i);else{var a=t.alternate;if(t.lanes===0&&(a===null||a.lanes===0)&&(a=e.lastRenderedReducer,a!==null))try{var s=e.lastRenderedState,u=a(s,n);if(i.hasEagerState=!0,i.eagerState=u,Gr(u,s)){var c=e.interleaved;c===null?(i.next=i,Uy(e)):(i.next=c.next,c.next=i),e.interleaved=i;return}}catch{}finally{}n=CC(t,e,i,r),n!==null&&(i=Sn(),$r(n,t,r,i),KC(n,e,r))}}function VC(t){var e=t.alternate;return t===gt||e!==null&&e===gt}function qC(t,e){fu=Ud=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function KC(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,Oy(t,n)}}var jd={readContext:mr,useCallback:on,useContext:on,useEffect:on,useImperativeHandle:on,useInsertionEffect:on,useLayoutEffect:on,useMemo:on,useReducer:on,useRef:on,useState:on,useDebugValue:on,useDeferredValue:on,useTransition:on,useMutableSource:on,useSyncExternalStore:on,useId:on,unstable_isNewReconciler:!1},AD={readContext:mr,useCallback:function(t,e){return Zr().memoizedState=[t,e===void 0?null:e],t},useContext:mr,useEffect:B_,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,nd(4194308,4,zC.bind(null,e,t),n)},useLayoutEffect:function(t,e){return nd(4194308,4,t,e)},useInsertionEffect:function(t,e){return nd(4,2,t,e)},useMemo:function(t,e){var n=Zr();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=Zr();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=TD.bind(null,gt,t),[r.memoizedState,t]},useRef:function(t){var e=Zr();return t={current:t},e.memoizedState=t},useState:N_,useDebugValue:Qy,useDeferredValue:function(t){return Zr().memoizedState=t},useTransition:function(){var t=N_(!1),e=t[0];return t=OD.bind(null,t[1]),Zr().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=gt,i=Zr();if(ft){if(n===void 0)throw Error(ae(407));n=n()}else{if(n=e(),Ht===null)throw Error(ae(349));uo&30||IC(r,e,n)}i.memoizedState=n;var a={value:n,getSnapshot:e};return i.queue=a,B_(MC.bind(null,r,a,t),[t]),r.flags|=2048,Du(9,LC.bind(null,r,a,n,e),void 0,null),n},useId:function(){var t=Zr(),e=Ht.identifierPrefix;if(ft){var n=Ni,r=Di;n=(r&~(1<<32-Fr(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=Lu++,0<\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=s.createElement(n,{is:r.is}):(t=s.createElement(n),n==="select"&&(s=t,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):t=s.createElementNS(t,n),t[ri]=e,t[Ru]=r,rx(t,e,!1,!1),e.stateNode=t;e:{switch(s=Qm(n,r),n){case"dialog":ot("cancel",t),ot("close",t),i=r;break;case"iframe":case"object":case"embed":ot("load",t),i=r;break;case"video":case"audio":for(i=0;iFs&&(e.flags|=128,r=!0,Ml(a,!1),e.lanes=4194304)}else{if(!r)if(t=Gd(s),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),Ml(a,!0),a.tail===null&&a.tailMode==="hidden"&&!s.alternate&&!ft)return sn(e),null}else 2*Pt()-a.renderingStartTime>Fs&&n!==1073741824&&(e.flags|=128,r=!0,Ml(a,!1),e.lanes=4194304);a.isBackwards?(s.sibling=e.child,e.child=s):(n=a.last,n!==null?n.sibling=s:e.child=s,a.last=s)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=Pt(),e.sibling=null,n=pt.current,at(pt,r?n&1|2:n&1),e):(sn(e),null);case 22:case 23:return r0(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?jn&1073741824&&(sn(e),e.subtreeFlags&6&&(e.flags|=8192)):sn(e),null;case 24:return null;case 25:return null}throw Error(ae(156,e.tag))}function $D(t,e){switch(By(e),e.tag){case 1:return An(e.type)&&Md(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Ns(),lt(Rn),lt(fn),Vy(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return Hy(e),null;case 13:if(lt(pt),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(ae(340));Ms()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return lt(pt),null;case 4:return Ns(),null;case 10:return Gy(e.type._context),null;case 22:case 23:return r0(),null;case 24:return null;default:return null}}var xf=!1,cn=!1,zD=typeof WeakSet=="function"?WeakSet:Set,he=null;function vs(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){wt(t,e,r)}else n.current=null}function xv(t,e,n){try{n()}catch(r){wt(t,e,r)}}var V_=!1;function GD(t,e){if(sv=Rd,t=uC(),Dy(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break e}var s=0,u=-1,c=-1,f=0,h=0,p=t,g=null;t:for(;;){for(var y;p!==n||i!==0&&p.nodeType!==3||(u=s+i),p!==a||r!==0&&p.nodeType!==3||(c=s+r),p.nodeType===3&&(s+=p.nodeValue.length),(y=p.firstChild)!==null;)g=p,p=y;for(;;){if(p===t)break t;if(g===n&&++f===i&&(u=s),g===a&&++h===r&&(c=s),(y=p.nextSibling)!==null)break;p=g,g=p.parentNode}p=y}n=u===-1||c===-1?null:{start:u,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(lv={focusedElem:t,selectionRange:n},Rd=!1,he=e;he!==null;)if(e=he,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,he=t;else for(;he!==null;){e=he;try{var v=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var w=v.memoizedProps,x=v.memoizedState,_=e.stateNode,S=_.getSnapshotBeforeUpdate(e.elementType===e.type?w:Lr(e.type,w),x);_.__reactInternalSnapshotBeforeUpdate=S}break;case 3:var C=e.stateNode.containerInfo;C.nodeType===1?C.textContent="":C.nodeType===9&&C.documentElement&&C.removeChild(C.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ae(163))}}catch(O){wt(e,e.return,O)}if(t=e.sibling,t!==null){t.return=e.return,he=t;break}he=e.return}return v=V_,V_=!1,v}function du(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&t)===t){var a=i.destroy;i.destroy=void 0,a!==void 0&&xv(e,n,a)}i=i.next}while(i!==r)}}function bh(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function kv(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function ox(t){var e=t.alternate;e!==null&&(t.alternate=null,ox(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[ri],delete e[Ru],delete e[fv],delete e[CD],delete e[xD])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function sx(t){return t.tag===5||t.tag===3||t.tag===4}function q_(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||sx(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Pv(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=Ld));else if(r!==4&&(t=t.child,t!==null))for(Pv(t,e,n),t=t.sibling;t!==null;)Pv(t,e,n),t=t.sibling}function Ev(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(Ev(t,e,n),t=t.sibling;t!==null;)Ev(t,e,n),t=t.sibling}var Zt=null,Mr=!1;function sa(t,e,n){for(n=n.child;n!==null;)lx(t,e,n),n=n.sibling}function lx(t,e,n){if(oi&&typeof oi.onCommitFiberUnmount=="function")try{oi.onCommitFiberUnmount(ph,n)}catch{}switch(n.tag){case 5:cn||vs(n,e);case 6:var r=Zt,i=Mr;Zt=null,sa(t,e,n),Zt=r,Mr=i,Zt!==null&&(Mr?(t=Zt,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):Zt.removeChild(n.stateNode));break;case 18:Zt!==null&&(Mr?(t=Zt,n=n.stateNode,t.nodeType===8?im(t.parentNode,n):t.nodeType===1&&im(t,n),ku(t)):im(Zt,n.stateNode));break;case 4:r=Zt,i=Mr,Zt=n.stateNode.containerInfo,Mr=!0,sa(t,e,n),Zt=r,Mr=i;break;case 0:case 11:case 14:case 15:if(!cn&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var a=i,s=a.destroy;a=a.tag,s!==void 0&&(a&2||a&4)&&xv(n,e,s),i=i.next}while(i!==r)}sa(t,e,n);break;case 1:if(!cn&&(vs(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(u){wt(n,e,u)}sa(t,e,n);break;case 21:sa(t,e,n);break;case 22:n.mode&1?(cn=(r=cn)||n.memoizedState!==null,sa(t,e,n),cn=r):sa(t,e,n);break;default:sa(t,e,n)}}function K_(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new zD),e.forEach(function(r){var i=XD.bind(null,t,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Rr(t,e){var n=e.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~a}if(r=i,r=Pt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*jD(r/1960))-r,10t?16:t,ma===null)var r=!1;else{if(t=ma,ma=null,Vd=0,$e&6)throw Error(ae(331));var i=$e;for($e|=4,he=t.current;he!==null;){var a=he,s=a.child;if(he.flags&16){var u=a.deletions;if(u!==null){for(var c=0;cPt()-t0?ao(t,0):e0|=n),In(t,e)}function mx(t,e){e===0&&(t.mode&1?(e=gf,gf<<=1,!(gf&130023424)&&(gf=4194304)):e=1);var n=Sn();t=Gi(t,e),t!==null&&(Ku(t,e,n),In(t,n))}function YD(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),mx(t,n)}function XD(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,i=t.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(ae(314))}r!==null&&r.delete(e),mx(t,n)}var vx;vx=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||Rn.current)Tn=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return Tn=!1,BD(t,e,n);Tn=!!(t.flags&131072)}else Tn=!1,ft&&e.flags&1048576&&_C(e,Bd,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;rd(t,e),t=e.pendingProps;var i=Ls(e,fn.current);xs(e,n),i=Ky(null,e,r,t,i,n);var a=Yy();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,An(r)?(a=!0,Dd(e)):a=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,jy(e),i.updater=_h,e.stateNode=i,i._reactInternals=e,vv(e,r,t,n),e=_v(null,e,r,!0,a,n)):(e.tag=0,ft&&a&&Ny(e),vn(null,e,i,n),e=e.child),e;case 16:r=e.elementType;e:{switch(rd(t,e),t=e.pendingProps,i=r._init,r=i(r._payload),e.type=r,i=e.tag=JD(r),t=Lr(r,t),i){case 0:e=Sv(null,e,r,t,n);break e;case 1:e=j_(null,e,r,t,n);break e;case 11:e=G_(null,e,r,t,n);break e;case 14:e=U_(null,e,r,Lr(r.type,t),n);break e}throw Error(ae(306,r,""))}return e;case 0:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Lr(r,i),Sv(t,e,r,i,n);case 1:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Lr(r,i),j_(t,e,r,i,n);case 3:e:{if(ex(e),t===null)throw Error(ae(387));r=e.pendingProps,a=e.memoizedState,i=a.element,xC(t,e),zd(e,r,null,n);var s=e.memoizedState;if(r=s.element,a.isDehydrated)if(a={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},e.updateQueue.baseState=a,e.memoizedState=a,e.flags&256){i=Bs(Error(ae(423)),e),e=W_(t,e,r,n,i);break e}else if(r!==i){i=Bs(Error(ae(424)),e),e=W_(t,e,r,n,i);break e}else for(Hn=wa(e.stateNode.containerInfo.firstChild),Vn=e,ft=!0,Nr=null,n=OC(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ms(),r===i){e=Ui(t,e,n);break e}vn(t,e,r,n)}e=e.child}return e;case 5:return TC(e),t===null&&pv(e),r=e.type,i=e.pendingProps,a=t!==null?t.memoizedProps:null,s=i.children,uv(r,i)?s=null:a!==null&&uv(r,a)&&(e.flags|=32),ZC(t,e),vn(t,e,s,n),e.child;case 6:return t===null&&pv(e),null;case 13:return tx(t,e,n);case 4:return Wy(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=Ds(e,null,r,n):vn(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Lr(r,i),G_(t,e,r,i,n);case 7:return vn(t,e,e.pendingProps,n),e.child;case 8:return vn(t,e,e.pendingProps.children,n),e.child;case 12:return vn(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,i=e.pendingProps,a=e.memoizedProps,s=i.value,at(Fd,r._currentValue),r._currentValue=s,a!==null)if(Gr(a.value,s)){if(a.children===i.children&&!Rn.current){e=Ui(t,e,n);break e}}else for(a=e.child,a!==null&&(a.return=e);a!==null;){var u=a.dependencies;if(u!==null){s=a.child;for(var c=u.firstContext;c!==null;){if(c.context===r){if(a.tag===1){c=Bi(-1,n&-n),c.tag=2;var f=a.updateQueue;if(f!==null){f=f.shared;var h=f.pending;h===null?c.next=c:(c.next=h.next,h.next=c),f.pending=c}}a.lanes|=n,c=a.alternate,c!==null&&(c.lanes|=n),gv(a.return,n,e),u.lanes|=n;break}c=c.next}}else if(a.tag===10)s=a.type===e.type?null:a.child;else if(a.tag===18){if(s=a.return,s===null)throw Error(ae(341));s.lanes|=n,u=s.alternate,u!==null&&(u.lanes|=n),gv(s,n,e),s=a.sibling}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}vn(t,e,i.children,n),e=e.child}return e;case 9:return i=e.type,r=e.pendingProps.children,xs(e,n),i=mr(i),r=r(i),e.flags|=1,vn(t,e,r,n),e.child;case 14:return r=e.type,i=Lr(r,e.pendingProps),i=Lr(r.type,i),U_(t,e,r,i,n);case 15:return QC(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Lr(r,i),rd(t,e),e.tag=1,An(r)?(t=!0,Dd(e)):t=!1,xs(e,n),PC(e,r,i),vv(e,r,i,n),_v(null,e,r,!0,t,n);case 19:return nx(t,e,n);case 22:return JC(t,e,n)}throw Error(ae(156,e.tag))};function yx(t,e){return W2(t,e)}function QD(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,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 hr(t,e,n,r){return new QD(t,e,n,r)}function a0(t){return t=t.prototype,!(!t||!t.isReactComponent)}function JD(t){if(typeof t=="function")return a0(t)?1:0;if(t!=null){if(t=t.$$typeof,t===xy)return 11;if(t===ky)return 14}return 2}function ka(t,e){var n=t.alternate;return n===null?(n=hr(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function od(t,e,n,r,i,a){var s=2;if(r=t,typeof t=="function")a0(t)&&(s=1);else if(typeof t=="string")s=5;else e:switch(t){case ls:return oo(n.children,i,a,e);case Cy:s=8,i|=8;break;case Gm:return t=hr(12,n,e,i|2),t.elementType=Gm,t.lanes=a,t;case Um:return t=hr(13,n,e,i),t.elementType=Um,t.lanes=a,t;case jm:return t=hr(19,n,e,i),t.elementType=jm,t.lanes=a,t;case E2:return xh(n,i,a,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case k2:s=10;break e;case P2:s=9;break e;case xy:s=11;break e;case ky:s=14;break e;case ca:s=16,r=null;break e}throw Error(ae(130,t==null?t:typeof t,""))}return e=hr(s,n,e,i),e.elementType=t,e.type=r,e.lanes=a,e}function oo(t,e,n,r){return t=hr(7,t,r,e),t.lanes=n,t}function xh(t,e,n,r){return t=hr(22,t,r,e),t.elementType=E2,t.lanes=n,t.stateNode={isHidden:!1},t}function dm(t,e,n){return t=hr(6,t,null,e),t.lanes=n,t}function hm(t,e,n){return e=hr(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function ZD(t,e,n,r,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=qg(0),this.expirationTimes=qg(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qg(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function o0(t,e,n,r,i,a,s,u,c){return t=new ZD(t,e,n,u,c),e===1?(e=1,a===!0&&(e|=8)):e=0,a=hr(3,null,null,e),t.current=a,a.stateNode=t,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},jy(a),t}function e3(t,e,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}e(),t.exports=Qn})(tM);var nw=xd;Fm.createRoot=nw.createRoot,Fm.hydrateRoot=nw.hydrateRoot;const a3="modulepreload",o3=function(t,e){return new URL(t,e).href},rw={},bx=function(e,n,r){if(!n||n.length===0)return e();const i=document.getElementsByTagName("link");return Promise.all(n.map(a=>{if(a=o3(a,r),a in rw)return;rw[a]=!0;const s=a.endsWith(".css"),u=s?'[rel="stylesheet"]':"";if(!!r)for(let h=i.length-1;h>=0;h--){const p=i[h];if(p.href===a&&(!s||p.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${a}"]${u}`))return;const f=document.createElement("link");if(f.rel=s?"stylesheet":a3,s||(f.as="script",f.crossOrigin=""),f.href=a,document.head.appendChild(f),s)return new Promise((h,p)=>{f.addEventListener("load",h),f.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${a}`)))})})).then(()=>e())};var Iv={},s3={get exports(){return Iv},set exports(t){Iv=t}},Cx={};/** - * @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 $s=be;function l3(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var u3=typeof Object.is=="function"?Object.is:l3,c3=$s.useState,f3=$s.useEffect,d3=$s.useLayoutEffect,h3=$s.useDebugValue;function p3(t,e){var n=e(),r=c3({inst:{value:n,getSnapshot:e}}),i=r[0].inst,a=r[1];return d3(function(){i.value=n,i.getSnapshot=e,pm(i)&&a({inst:i})},[t,n,e]),f3(function(){return pm(i)&&a({inst:i}),t(function(){pm(i)&&a({inst:i})})},[t]),h3(n),n}function pm(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!u3(t,n)}catch{return!0}}function g3(t,e){return e()}var m3=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?g3:p3;Cx.useSyncExternalStore=$s.useSyncExternalStore!==void 0?$s.useSyncExternalStore:m3;(function(t){t.exports=Cx})(s3);var Lv={},v3={get exports(){return Lv},set exports(t){Lv=t}},xx={};/** - * @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 Th=be,y3=Iv;function S3(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var _3=typeof Object.is=="function"?Object.is:S3,w3=y3.useSyncExternalStore,b3=Th.useRef,C3=Th.useEffect,x3=Th.useMemo,k3=Th.useDebugValue;xx.useSyncExternalStoreWithSelector=function(t,e,n,r,i){var a=b3(null);if(a.current===null){var s={hasValue:!1,value:null};a.current=s}else s=a.current;a=x3(function(){function c(y){if(!f){if(f=!0,h=y,y=r(y),i!==void 0&&s.hasValue){var v=s.value;if(i(v,y))return p=v}return p=y}if(v=p,_3(h,y))return v;var w=r(y);return i!==void 0&&i(v,w)?v:(h=y,p=w)}var f=!1,h,p,g=n===void 0?null:n;return[function(){return c(e())},g===null?void 0:function(){return c(g())}]},[e,n,r,i]);var u=w3(t,a[0],a[1]);return C3(function(){s.hasValue=!0,s.value=u},[u]),k3(u),u};(function(t){t.exports=xx})(v3);function P3(t){t()}let kx=P3;const E3=t=>kx=t,O3=()=>kx,Yd=be.createContext(null);function T3(){return be.useContext(Yd)}const R3=()=>{throw new Error("uSES not initialized!")};let Px=R3;const A3=t=>{Px=t},I3=(t,e)=>t===e;function L3(t=Yd){const e=t===Yd?T3:()=>be.useContext(t);return function(r,i=I3){const{store:a,subscription:s,getServerState:u}=e(),c=Px(s.addNestedSub,a.getState,u||a.getState,r,i);return be.useDebugValue(c),c}}const I8=L3();function Xd(){return Xd=Object.assign?Object.assign.bind():function(t){for(var e=1;e{let r=e;for(;r;)r.callback(),r=r.next})},get(){let r=[],i=e;for(;i;)r.push(i),i=i.next;return r},subscribe(r){let i=!0,a=n={callback:r,next:null,prev:n};return a.prev?a.prev.next=a:e=a,function(){!i||e===null||(i=!1,a.next?a.next.prev=a.prev:n=a.prev,a.prev?a.prev.next=a.next:e=a.next)}}}}const aw={notify(){},get:()=>[]};function V3(t,e){let n,r=aw;function i(p){return c(),r.subscribe(p)}function a(){r.notify()}function s(){h.onStateChange&&h.onStateChange()}function u(){return Boolean(n)}function c(){n||(n=e?e.addNestedSub(s):t.subscribe(s),r=H3())}function f(){n&&(n(),n=void 0,r.clear(),r=aw)}const h={addNestedSub:i,notifyNestedSubs:a,handleChangeWrapper:s,isSubscribed:u,trySubscribe:c,tryUnsubscribe:f,getListeners:()=>r};return h}const q3=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",K3=q3?be.useLayoutEffect:be.useEffect;function Y3({store:t,context:e,children:n,serverState:r}){const i=be.useMemo(()=>{const u=V3(t);return{store:t,subscription:u,getServerState:r?()=>r:void 0}},[t,r]),a=be.useMemo(()=>t.getState(),[t]);K3(()=>{const{subscription:u}=i;return u.onStateChange=u.notifyNestedSubs,u.trySubscribe(),a!==t.getState()&&u.notifyNestedSubs(),()=>{u.tryUnsubscribe(),u.onStateChange=void 0}},[i,a]);const s=e||Yd;return As.createElement(s.Provider,{value:i},n)}A3(Lv.useSyncExternalStoreWithSelector);E3(xd.unstable_batchedUpdates);function sd(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?sd=function(n){return typeof n}:sd=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},sd(t)}function X3(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ow(t,e){for(var n=0;n1?e-1:0),r=1;r3?e.i-4:e.i:Array.isArray(t)?1:g0(t)?2:m0(t)?3:0}function Ps(t,e){return Hs(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function eN(t,e){return Hs(t)===2?t.get(e):t[e]}function Ix(t,e,n){var r=Hs(t);r===2?t.set(e,n):r===3?t.add(n):t[e]=n}function Lx(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function g0(t){return oN&&t instanceof Map}function m0(t){return sN&&t instanceof Set}function Za(t){return t.o||t.t}function v0(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Dx(t);delete e[ct];for(var n=Es(e),r=0;r1&&(t.set=t.add=t.clear=t.delete=tN),Object.freeze(t),e&&ho(t,function(n,r){return y0(r,!0)},!0)),t}function tN(){Br(2)}function S0(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function li(t){var e=zv[t];return e||Br(18,t),e}function nN(t,e){zv[t]||(zv[t]=e)}function Bv(){return Bu}function gm(t,e){e&&(li("Patches"),t.u=[],t.s=[],t.v=e)}function Qd(t){Fv(t),t.p.forEach(rN),t.p=null}function Fv(t){t===Bu&&(Bu=t.l)}function sw(t){return Bu={p:[],l:Bu,h:t,m:!0,_:0}}function rN(t){var e=t[ct];e.i===0||e.i===1?e.j():e.O=!0}function mm(t,e){e._=e.p.length;var n=e.p[0],r=t!==void 0&&t!==n;return e.h.g||li("ES5").S(e,t,r),r?(n[ct].P&&(Qd(e),Br(4)),ji(t)&&(t=Jd(e,t),e.l||Zd(e,t)),e.u&&li("Patches").M(n[ct].t,t,e.u,e.s)):t=Jd(e,n,[]),Qd(e),e.u&&e.v(e.u,e.s),t!==Mx?t:void 0}function Jd(t,e,n){if(S0(e))return e;var r=e[ct];if(!r)return ho(e,function(u,c){return lw(t,r,e,u,c,n)},!0),e;if(r.A!==t)return e;if(!r.P)return Zd(t,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=v0(r.k):r.o,a=i,s=!1;r.i===3&&(a=new Set(i),i.clear(),s=!0),ho(a,function(u,c){return lw(t,r,i,u,c,n,s)}),Zd(t,i,!1),n&&t.u&&li("Patches").N(r,n,t.u,t.s)}return r.o}function lw(t,e,n,r,i,a,s){if(Ra(i)){var u=Jd(t,i,a&&e&&e.i!==3&&!Ps(e.R,r)?a.concat(r):void 0);if(Ix(n,r,u),!Ra(u))return;t.m=!1}else s&&n.add(i);if(ji(i)&&!S0(i)){if(!t.h.D&&t._<1)return;Jd(t,i),e&&e.A.l||Zd(t,i)}}function Zd(t,e,n){n===void 0&&(n=!1),!t.l&&t.h.D&&t.m&&y0(e,n)}function vm(t,e){var n=t[ct];return(n?Za(n):t)[e]}function uw(t,e){if(e in t)for(var n=Object.getPrototypeOf(t);n;){var r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function pa(t){t.P||(t.P=!0,t.l&&pa(t.l))}function ym(t){t.o||(t.o=v0(t.t))}function $v(t,e,n){var r=g0(e)?li("MapSet").F(e,n):m0(e)?li("MapSet").T(e,n):t.g?function(i,a){var s=Array.isArray(i),u={i:s?1:0,A:a?a.A:Bv(),P:!1,I:!1,R:{},l:a,t:i,k:null,o:null,j:null,C:!1},c=u,f=Fu;s&&(c=[u],f=Jl);var h=Proxy.revocable(c,f),p=h.revoke,g=h.proxy;return u.k=g,u.j=p,g}(e,n):li("ES5").J(e,n);return(n?n.A:Bv()).p.push(r),r}function iN(t){return Ra(t)||Br(22,t),function e(n){if(!ji(n))return n;var r,i=n[ct],a=Hs(n);if(i){if(!i.P&&(i.i<4||!li("ES5").K(i)))return i.t;i.I=!0,r=cw(n,a),i.I=!1}else r=cw(n,a);return ho(r,function(s,u){i&&eN(i.t,s)===u||Ix(r,s,e(u))}),a===3?new Set(r):r}(t)}function cw(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return v0(t)}function aN(){function t(a,s){var u=i[a];return u?u.enumerable=s:i[a]=u={configurable:!0,enumerable:s,get:function(){var c=this[ct];return Fu.get(c,a)},set:function(c){var f=this[ct];Fu.set(f,a,c)}},u}function e(a){for(var s=a.length-1;s>=0;s--){var u=a[s][ct];if(!u.P)switch(u.i){case 5:r(u)&&pa(u);break;case 4:n(u)&&pa(u)}}}function n(a){for(var s=a.t,u=a.k,c=Es(u),f=c.length-1;f>=0;f--){var h=c[f];if(h!==ct){var p=s[h];if(p===void 0&&!Ps(s,h))return!0;var g=u[h],y=g&&g[ct];if(y?y.t!==p:!Lx(g,p))return!0}}var v=!!s[ct];return c.length!==Es(s).length+(v?0:1)}function r(a){var s=a.k;if(s.length!==a.t.length)return!0;var u=Object.getOwnPropertyDescriptor(s,s.length-1);if(u&&!u.get)return!0;for(var c=0;c1?_-1:0),C=1;C<_;C++)S[C-1]=arguments[C];return c.produce(w,function(O){var I;return(I=a).call.apply(I,[x,O].concat(S))})}}var f;if(typeof a!="function"&&Br(6),s!==void 0&&typeof s!="function"&&Br(7),ji(i)){var h=sw(r),p=$v(r,i,void 0),g=!0;try{f=a(p),g=!1}finally{g?Qd(h):Fv(h)}return typeof Promise<"u"&&f instanceof Promise?f.then(function(w){return gm(h,s),mm(w,h)},function(w){throw Qd(h),w}):(gm(h,s),mm(f,h))}if(!i||typeof i!="object"){if((f=a(i))===void 0&&(f=i),f===Mx&&(f=void 0),r.D&&y0(f,!0),s){var y=[],v=[];li("Patches").M(i,f,y,v),s(y,v)}return f}Br(21,i)},this.produceWithPatches=function(i,a){if(typeof i=="function")return function(f){for(var h=arguments.length,p=Array(h>1?h-1:0),g=1;g=0;i--){var a=r[i];if(a.path.length===0&&a.op==="replace"){n=a.value;break}}i>-1&&(r=r.slice(i+1));var s=li("Patches").$;return Ra(n)?s(n,r):this.produce(n,function(u){return s(u,r)})},t}(),Xn=new uN,Nx=Xn.produce;Xn.produceWithPatches.bind(Xn);Xn.setAutoFreeze.bind(Xn);Xn.setUseProxies.bind(Xn);Xn.applyPatches.bind(Xn);Xn.createDraft.bind(Xn);Xn.finishDraft.bind(Xn);function gr(t){return gr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gr(t)}function cN(t,e){if(gr(t)!=="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(gr(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Bx(t){var e=cN(t,"string");return gr(e)==="symbol"?e:String(e)}function Ur(t,e,n){return e=Bx(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function pw(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function gw(t){for(var e=1;e"u"&&(n=e,e=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(un(1));return n(w0)(t,e)}if(typeof t!="function")throw new Error(un(2));var i=t,a=e,s=[],u=s,c=!1;function f(){u===s&&(u=s.slice())}function h(){if(c)throw new Error(un(3));return a}function p(w){if(typeof w!="function")throw new Error(un(4));if(c)throw new Error(un(5));var x=!0;return f(),u.push(w),function(){if(x){if(c)throw new Error(un(6));x=!1,f();var S=u.indexOf(w);u.splice(S,1),s=null}}}function g(w){if(!fN(w))throw new Error(un(7));if(typeof w.type>"u")throw new Error(un(8));if(c)throw new Error(un(9));try{c=!0,a=i(a,w)}finally{c=!1}for(var x=s=u,_=0;_"u")throw new Error(un(12));if(typeof n(void 0,{type:eh.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(un(13))})}function Fx(t){for(var e=Object.keys(t),n={},r=0;r"u")throw f&&f.type,new Error(un(14));p[y]=x,h=h||x!==w}return h=h||a.length!==Object.keys(c).length,h?p:c}}function th(){for(var t=arguments.length,e=new Array(t),n=0;n0&&a[a.length-1])&&(f[0]===6||f[0]===2)){n=0;continue}if(f[0]===3&&(!a||f[1]>a[0]&&f[1]{Object.keys(L).forEach(function(D){C(D)&&h[D]!==L[D]&&g.indexOf(D)===-1&&g.push(D)}),Object.keys(h).forEach(function(D){L[D]===void 0&&C(D)&&g.indexOf(D)===-1&&h[D]!==void 0&&g.push(D)}),y===null&&(y=setInterval(_,i)),h=L},a)}function _(){if(g.length===0){y&&clearInterval(y),y=null;return}var L=g.shift(),D=r.reduce(function(U,X){return X.in(U,L,h)},h[L]);if(D!==void 0)try{p[L]=c(D)}catch(U){console.error("redux-persist/createPersistoid: error serializing state",U)}else delete p[L];g.length===0&&S()}function S(){Object.keys(p).forEach(function(L){h[L]===void 0&&delete p[L]}),v=u.setItem(s,c(p)).catch(O)}function C(L){return!(n&&n.indexOf(L)===-1&&L!=="_persist"||e&&e.indexOf(L)!==-1)}function O(L){f&&f(L)}var I=function(){for(;g.length!==0;)_();return v||Promise.resolve()};return{update:x,flush:I}}function WN(t){return JSON.stringify(t)}function HN(t){var e=t.transforms||[],n="".concat(t.keyPrefix!==void 0?t.keyPrefix:C0).concat(t.key),r=t.storage;t.debug;var i;return t.deserialize===!1?i=function(s){return s}:typeof t.deserialize=="function"?i=t.deserialize:i=VN,r.getItem(n).then(function(a){if(a)try{var s={},u=i(a);return Object.keys(u).forEach(function(c){s[c]=e.reduceRight(function(f,h){return h.out(f,c,u)},i(u[c]))}),s}catch(c){throw c}else return})}function VN(t){return JSON.parse(t)}function qN(t){var e=t.storage,n="".concat(t.keyPrefix!==void 0?t.keyPrefix:C0).concat(t.key);return e.removeItem(n,KN)}function KN(t){}function Cw(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Ti(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function QN(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a=0)&&(n[i]=t[i]);return n}var JN=5e3;function ZN(t,e){var n=t.version!==void 0?t.version:$N;t.debug;var r=t.stateReconciler===void 0?UN:t.stateReconciler,i=t.getStoredState||HN,a=t.timeout!==void 0?t.timeout:JN,s=null,u=!1,c=!0,f=function(p){return p._persist.rehydrated&&s&&!c&&s.update(p),p};return function(h,p){var g=h||{},y=g._persist,v=XN(g,["_persist"]),w=v;if(p.type===Wx){var x=!1,_=function(U,X){x||(p.rehydrate(t.key,U,X),x=!0)};if(a&&setTimeout(function(){!x&&_(void 0,new Error('redux-persist: persist timed out for persist key "'.concat(t.key,'"')))},a),c=!1,s||(s=jN(t)),y)return Ti({},e(w,p),{_persist:y});if(typeof p.rehydrate!="function"||typeof p.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 p.register(t.key),i(t).then(function(D){var U=t.migrate||function(X,K){return Promise.resolve(X)};U(D,n).then(function(X){_(X)},function(X){_(void 0,X)})},function(D){_(void 0,D)}),Ti({},e(w,p),{_persist:{version:n,rehydrated:!1}})}else{if(p.type===Hx)return u=!0,p.result(qN(t)),Ti({},e(w,p),{_persist:y});if(p.type===Ux)return p.result(s&&s.flush()),Ti({},e(w,p),{_persist:y});if(p.type===jx)c=!0;else if(p.type===x0){if(u)return Ti({},w,{_persist:Ti({},y,{rehydrated:!0})});if(p.key===t.key){var S=e(w,p),C=p.payload,O=r!==!1&&C!==void 0?r(C,h,S,t):S,I=Ti({},O,{_persist:Ti({},y,{rehydrated:!0})});return f(I)}}}if(!y)return e(h,p);var L=e(w,p);return L===w?h:f(Ti({},L,{_persist:y}))}}function xw(t){return n5(t)||t5(t)||e5()}function e5(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function t5(t){if(Symbol.iterator in Object(t)||Object.prototype.toString.call(t)==="[object Arguments]")return Array.from(t)}function n5(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e0&&arguments[0]!==void 0?arguments[0]:qx,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case Vx:return Uv({},e,{registry:[].concat(xw(e.registry),[n.key])});case x0:var r=e.registry.indexOf(n.key),i=xw(e.registry);return i.splice(r,1),Uv({},e,{registry:i,bootstrapped:i.length===0});default:return e}};function a5(t,e,n){var r=n||!1,i=w0(i5,qx,e&&e.enhancer?e.enhancer:void 0),a=function(f){i.dispatch({type:Vx,key:f})},s=function(f,h,p){var g={type:x0,payload:h,err:p,key:f};t.dispatch(g),i.dispatch(g),r&&u.getState().bootstrapped&&(r(),r=!1)},u=Uv({},i,{purge:function(){var f=[];return t.dispatch({type:Hx,result:function(p){f.push(p)}}),Promise.all(f)},flush:function(){var f=[];return t.dispatch({type:Ux,result:function(p){f.push(p)}}),Promise.all(f)},pause:function(){t.dispatch({type:jx})},persist:function(){t.dispatch({type:Wx,register:a,rehydrate:s})}});return e&&e.manualPersist||u.persist(),u}var k0={},P0={};P0.__esModule=!0;P0.default=l5;function fd(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?fd=function(n){return typeof n}:fd=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},fd(t)}function bm(){}var o5={getItem:bm,setItem:bm,removeItem:bm};function s5(t){if((typeof self>"u"?"undefined":fd(self))!=="object"||!(t in self))return!1;try{var e=self[t],n="redux-persist ".concat(t," test");e.setItem(n,"test"),e.getItem(n),e.removeItem(n)}catch{return!1}return!0}function l5(t){var e="".concat(t,"Storage");return s5(e)?self[e]:o5}k0.__esModule=!0;k0.default=f5;var u5=c5(P0);function c5(t){return t&&t.__esModule?t:{default:t}}function f5(t){var e=(0,u5.default)(t);return{getItem:function(r){return new Promise(function(i,a){i(e.getItem(r))})},setItem:function(r,i){return new Promise(function(a,s){a(e.setItem(r,i))})},removeItem:function(r){return new Promise(function(i,a){i(e.removeItem(r))})}}}var Kx=void 0,d5=h5(k0);function h5(t){return t&&t.__esModule?t:{default:t}}var p5=(0,d5.default)("local");Kx=p5;var Yx={},Xx={},po={};Object.defineProperty(po,"__esModule",{value:!0});po.PLACEHOLDER_UNDEFINED=po.PACKAGE_NAME=void 0;po.PACKAGE_NAME="redux-deep-persist";po.PLACEHOLDER_UNDEFINED="@@placeholder/undefined";var E0={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigType=void 0,function(e){e[e.WHITELIST=0]="WHITELIST",e[e.BLACKLIST=1]="BLACKLIST"}(t.ConfigType||(t.ConfigType={}))})(E0);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getRootKeysGroup=t.throwError=t.configValidator=t.transformsValidator=t.singleTransformValidator=t.findDuplicatesAndSubsets=t.unique=t.preserveUndefined=t.mergeDeep=t.dissocPath=t.assocPath=t.path=t.difference=t.cloneDeep=t._cloneDeep=t.getCircularPath=t.isEmpty=t.isDate=t.isString=t.isIntegerString=t.isPlainObject=t.isArray=t.isLength=t.isObjectLike=void 0;const e=po,n=E0,r=function(j){return typeof j=="object"&&j!==null};t.isObjectLike=r;const i=function(j){return typeof j=="number"&&j>-1&&j%1==0&&j<=Number.MAX_SAFE_INTEGER};t.isLength=i,t.isArray=Array.isArray||function(j){return(0,t.isLength)(j&&j.length)&&Object.prototype.toString.call(j)==="[object Array]"};const a=function(j){return!!j&&typeof j=="object"&&!(0,t.isArray)(j)};t.isPlainObject=a;const s=function(j){return String(~~j)===j&&Number(j)>=0};t.isIntegerString=s;const u=function(j){return Object.prototype.toString.call(j)==="[object String]"};t.isString=u;const c=function(j){return Object.prototype.toString.call(j)==="[object Date]"};t.isDate=c;const f=function(j){return Object.keys(j).length===0};t.isEmpty=f;const h=Object.prototype.hasOwnProperty,p=function(j,T,$){$||($=new Set([j])),T||(T="");for(const V in j){const ie=T?`${T}.${V}`:V,W=j[V];if((0,t.isObjectLike)(W))return $.has(W)?`${T}.${V}:`:($.add(W),(0,t.getCircularPath)(W,ie,$))}return null};t.getCircularPath=p;const g=function(j){if(!(0,t.isObjectLike)(j))return j;if((0,t.isDate)(j))return new Date(+j);const T=(0,t.isArray)(j)?[]:{};for(const $ in j){const V=j[$];T[$]=(0,t._cloneDeep)(V)}return T};t._cloneDeep=g;const y=function(j){const T=(0,t.getCircularPath)(j);if(T)throw new Error(`${e.PACKAGE_NAME}: circular dependency detected under the path '${T}' of object you're trying to persist: ${j}`);return(0,t._cloneDeep)(j)};t.cloneDeep=y;const v=function(j,T){if(j===T)return{};if(!(0,t.isObjectLike)(j)||!(0,t.isObjectLike)(T))return T;const $=(0,t.cloneDeep)(j),V=(0,t.cloneDeep)(T),ie=Object.keys($).reduce((Y,Q)=>(h.call(V,Q)||(Y[Q]=void 0),Y),{});if((0,t.isDate)($)||(0,t.isDate)(V))return $.valueOf()===V.valueOf()?{}:V;const W=Object.keys(V).reduce((Y,Q)=>{if(!h.call($,Q))return Y[Q]=V[Q],Y;const oe=(0,t.difference)($[Q],V[Q]);return(0,t.isObjectLike)(oe)&&(0,t.isEmpty)(oe)&&!(0,t.isDate)(oe)?(0,t.isArray)($)&&!(0,t.isArray)(V)||!(0,t.isArray)($)&&(0,t.isArray)(V)?V:Y:(Y[Q]=oe,Y)},ie);return delete W._persist,W};t.difference=v;const w=function(j,T){return T.reduce(($,V)=>{if($){const ie=parseInt(V,10),W=(0,t.isIntegerString)(V)&&ie<0?$.length+ie:V;return(0,t.isString)($)?$.charAt(W):$[W]}},j)};t.path=w;const x=function(j,T){return[...j].reverse().reduce((ie,W,Y)=>{const Q=(0,t.isIntegerString)(W)?[]:{};return Q[W]=Y===0?T:ie,Q},{})};t.assocPath=x;const _=function(j,T){const $=(0,t.cloneDeep)(j);return T.reduce((V,ie,W)=>(W===T.length-1&&V&&(0,t.isObjectLike)(V)&&delete V[ie],V&&V[ie]),$),$};t.dissocPath=_;const S=function(j,T,...$){if(!$||!$.length)return T;const V=$.shift(),{preservePlaceholder:ie,preserveUndefined:W}=j;if((0,t.isObjectLike)(T)&&(0,t.isObjectLike)(V))for(const Y in V)if((0,t.isObjectLike)(V[Y])&&(0,t.isObjectLike)(T[Y]))T[Y]||(T[Y]={}),S(j,T[Y],V[Y]);else if((0,t.isArray)(T)){let Q=V[Y];const oe=ie?e.PLACEHOLDER_UNDEFINED:void 0;W||(Q=typeof Q<"u"?Q:T[parseInt(Y,10)]),Q=Q!==e.PLACEHOLDER_UNDEFINED?Q:oe,T[parseInt(Y,10)]=Q}else{const Q=V[Y]!==e.PLACEHOLDER_UNDEFINED?V[Y]:void 0;T[Y]=Q}return S(j,T,...$)},C=function(j,T,$){return S({preservePlaceholder:$==null?void 0:$.preservePlaceholder,preserveUndefined:$==null?void 0:$.preserveUndefined},(0,t.cloneDeep)(j),(0,t.cloneDeep)(T))};t.mergeDeep=C;const O=function(j,T=[],$,V,ie){if(!(0,t.isObjectLike)(j))return j;for(const W in j){const Y=j[W],Q=(0,t.isArray)(j),oe=V?V+"."+W:W;Y===null&&($===n.ConfigType.WHITELIST&&T.indexOf(oe)===-1||$===n.ConfigType.BLACKLIST&&T.indexOf(oe)!==-1)&&Q&&(j[parseInt(W,10)]=void 0),Y===void 0&&ie&&$===n.ConfigType.BLACKLIST&&T.indexOf(oe)===-1&&Q&&(j[parseInt(W,10)]=e.PLACEHOLDER_UNDEFINED),O(Y,T,$,oe,ie)}},I=function(j,T,$,V){const ie=(0,t.cloneDeep)(j);return O(ie,T,$,"",V),ie};t.preserveUndefined=I;const L=function(j,T,$){return $.indexOf(j)===T};t.unique=L;const D=function(j){return j.reduce((T,$)=>{const V=j.filter(ve=>ve===$),ie=j.filter(ve=>($+".").indexOf(ve+".")===0),{duplicates:W,subsets:Y}=T,Q=V.length>1&&W.indexOf($)===-1,oe=ie.length>1;return{duplicates:[...W,...Q?V:[]],subsets:[...Y,...oe?ie:[]].filter(t.unique).sort()}},{duplicates:[],subsets:[]})};t.findDuplicatesAndSubsets=D;const U=function(j,T,$){const V=$===n.ConfigType.WHITELIST?"whitelist":"blacklist",ie=`${e.PACKAGE_NAME}: incorrect ${V} configuration.`,W=`Check your create${$===n.ConfigType.WHITELIST?"White":"Black"}list arguments. - -`;if(!(0,t.isString)(T)||T.length<1)throw new Error(`${ie} Name (key) of reducer is required. ${W}`);if(!j||!j.length)return;const{duplicates:Y,subsets:Q}=(0,t.findDuplicatesAndSubsets)(j);if(Y.length>1)throw new Error(`${ie} Duplicated paths. - - ${JSON.stringify(Y)} - - ${W}`);if(Q.length>1)throw new Error(`${ie} You are trying to persist an entire property and also some of its subset. - -${JSON.stringify(Q)} - - ${W}`)};t.singleTransformValidator=U;const X=function(j){if(!(0,t.isArray)(j))return;const T=(j==null?void 0:j.map($=>$.deepPersistKey).filter($=>$))||[];if(T.length){const $=T.filter((V,ie)=>T.indexOf(V)!==ie);if($.length)throw new Error(`${e.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($)}`)}};t.transformsValidator=X;const K=function({whitelist:j,blacklist:T}){if(j&&j.length&&T&&T.length)throw new Error(`${e.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(j){const{duplicates:$,subsets:V}=(0,t.findDuplicatesAndSubsets)(j);(0,t.throwError)({duplicates:$,subsets:V},"whitelist")}if(T){const{duplicates:$,subsets:V}=(0,t.findDuplicatesAndSubsets)(T);(0,t.throwError)({duplicates:$,subsets:V},"blacklist")}};t.configValidator=K;const te=function({duplicates:j,subsets:T},$){if(j.length)throw new Error(`${e.PACKAGE_NAME}: duplicates of paths found in your ${$}. - - ${JSON.stringify(j)}`);if(T.length)throw new Error(`${e.PACKAGE_NAME}: subsets of some parent keys found in your ${$}. You must decide if you want to persist an entire path or its specific subset. - - ${JSON.stringify(T)}`)};t.throwError=te;const ce=function(j){return(0,t.isArray)(j)?j.filter(t.unique).reduce((T,$)=>{const V=$.split("."),ie=V[0],W=V.slice(1).join(".")||void 0,Y=T.filter(oe=>Object.keys(oe)[0]===ie)[0],Q=Y?Object.values(Y)[0]:void 0;return Y||T.push({[ie]:W?[W]:void 0}),Y&&!Q&&W&&(Y[ie]=[W]),Y&&Q&&W&&Q.push(W),T},[]):[]};t.getRootKeysGroup=ce})(Xx);(function(t){var e=yn&&yn.__rest||function(p,g){var y={};for(var v in p)Object.prototype.hasOwnProperty.call(p,v)&&g.indexOf(v)<0&&(y[v]=p[v]);if(p!=null&&typeof Object.getOwnPropertySymbols=="function")for(var w=0,v=Object.getOwnPropertySymbols(p);w!x(S)&&p?p(_,S,C):_,out:(_,S,C)=>!x(S)&&g?g(_,S,C):_,deepPersistKey:v&&v[0]}},s=(p,g,y,{debug:v,whitelist:w,blacklist:x,transforms:_})=>{if(w||x)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)(_);const S=(0,n.cloneDeep)(y);let C=p;if(C&&(0,n.isObjectLike)(C)){const O=(0,n.difference)(g,y);(0,n.isEmpty)(O)||(C=(0,n.mergeDeep)(p,O,{preserveUndefined:!0}),v&&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(O)}`)),Object.keys(C).forEach(I=>{if(I!=="_persist"){if((0,n.isObjectLike)(S[I])){S[I]=(0,n.mergeDeep)(S[I],C[I]);return}S[I]=C[I]}})}return v&&C&&(0,n.isObjectLike)(C)&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: rehydrated keys ${JSON.stringify(C)}`),S};t.autoMergeDeep=s;const u=(p,g)=>((0,n.singleTransformValidator)(g,p,i.ConfigType.WHITELIST),a(y=>{if(!g||!g.length)return y;let v=null,w;return g.forEach(x=>{const _=x.split(".");w=(0,n.path)(y,_),typeof w>"u"&&(0,n.isIntegerString)(_[_.length-1])&&(w=r.PLACEHOLDER_UNDEFINED);const S=(0,n.assocPath)(_,w),C=(0,n.isArray)(S)?[]:{};v=(0,n.mergeDeep)(v||C,S,{preservePlaceholder:!0})}),v||y},y=>(0,n.preserveUndefined)(y,g,i.ConfigType.WHITELIST),{whitelist:[p]}));t.createWhitelist=u;const c=(p,g)=>((0,n.singleTransformValidator)(g,p,i.ConfigType.BLACKLIST),a(y=>{if(!g||!g.length)return;const v=(0,n.preserveUndefined)(y,g,i.ConfigType.BLACKLIST,!0);return g.map(x=>x.split(".")).reduce((x,_)=>(0,n.dissocPath)(x,_),v)},y=>(0,n.preserveUndefined)(y,g,i.ConfigType.BLACKLIST),{whitelist:[p]}));t.createBlacklist=c;const f=function(p,g){return g.map(y=>{const v=Object.keys(y)[0],w=y[v];return p===i.ConfigType.WHITELIST?(0,t.createWhitelist)(v,w):(0,t.createBlacklist)(v,w)})};t.getTransforms=f;const h=p=>{var{key:g,whitelist:y,blacklist:v,storage:w,transforms:x,rootReducer:_}=p,S=e(p,["key","whitelist","blacklist","storage","transforms","rootReducer"]);(0,n.configValidator)({whitelist:y,blacklist:v});const C=(0,n.getRootKeysGroup)(y),O=(0,n.getRootKeysGroup)(v),I=Object.keys(_(void 0,{type:""})),L=C.map(ce=>Object.keys(ce)[0]),D=O.map(ce=>Object.keys(ce)[0]),U=I.filter(ce=>L.indexOf(ce)===-1&&D.indexOf(ce)===-1),X=(0,t.getTransforms)(i.ConfigType.WHITELIST,C),K=(0,t.getTransforms)(i.ConfigType.BLACKLIST,O),te=(0,n.isArray)(y)?U.map(ce=>(0,t.createBlacklist)(ce)):[];return Object.assign(Object.assign({},S),{key:g,storage:w,transforms:[...X,...K,...te,...x||[]],stateReconciler:t.autoMergeDeep})};t.getPersistConfig=h})(Yx);const Ef=(t,e)=>Math.floor(t/e)*e,va=(t,e)=>Math.round(t/e)*e;var _t={},g5={get exports(){return _t},set exports(t){_t=t}};/** - * @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(t,e){(function(){var n,r="4.17.21",i=200,a="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",s="Expected a function",u="Invalid `variable` option passed into `_.template`",c="__lodash_hash_undefined__",f=500,h="__lodash_placeholder__",p=1,g=2,y=4,v=1,w=2,x=1,_=2,S=4,C=8,O=16,I=32,L=64,D=128,U=256,X=512,K=30,te="...",ce=800,j=16,T=1,$=2,V=3,ie=1/0,W=9007199254740991,Y=17976931348623157e292,Q=0/0,oe=4294967295,ve=oe-1,we=oe>>>1,Ue=[["ary",D],["bind",x],["bindKey",_],["curry",C],["curryRight",O],["flip",X],["partial",I],["partialRight",L],["rearg",U]],At="[object Arguments]",me="[object Array]",qt="[object AsyncFunction]",Bt="[object Boolean]",bn="[object Date]",wr="[object DOMException]",Ft="[object Error]",xe="[object Function]",Wr="[object GeneratorFunction]",Et="[object Map]",gi="[object Number]",Xs="[object Null]",Mn="[object Object]",Fa="[object Promise]",Qs="[object Proxy]",er="[object RegExp]",Kt="[object Set]",Dn="[object String]",bt="[object Symbol]",$a="[object Undefined]",Hr="[object WeakMap]",Co="[object WeakSet]",Vr="[object ArrayBuffer]",br="[object DataView]",xo="[object Float32Array]",ko="[object Float64Array]",Po="[object Int8Array]",Eo="[object Int16Array]",Oo="[object Int32Array]",Js="[object Uint8Array]",Zs="[object Uint8ClampedArray]",Cr="[object Uint16Array]",Ki="[object Uint32Array]",sp=/\b__p \+= '';/g,tc=/\b(__p \+=) '' \+/g,lp=/(__e\(.*?\)|\b__t\)) \+\n'';/g,el=/&(?:amp|lt|gt|quot|#39);/g,Yi=/[&<>"']/g,up=RegExp(el.source),mi=RegExp(Yi.source),cp=/<%-([\s\S]+?)%>/g,fp=/<%([\s\S]+?)%>/g,nc=/<%=([\s\S]+?)%>/g,dp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,hp=/^\w*$/,xr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,tl=/[\\^$.*+?()[\]{}|]/g,pp=RegExp(tl.source),nl=/^\s+/,gp=/\s/,mp=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Xi=/\{\n\/\* \[wrapped with (.+)\] \*/,vp=/,? & /,yp=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Sp=/[()=,{}\[\]\/\s]/,_p=/\\(\\)?/g,wp=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,vi=/\w*$/,bp=/^[-+]0x[0-9a-f]+$/i,Cp=/^0b[01]+$/i,xp=/^\[object .+?Constructor\]$/,kp=/^0o[0-7]+$/i,Pp=/^(?:0|[1-9]\d*)$/,Ep=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Qi=/($^)/,Op=/['\n\r\u2028\u2029\\]/g,yi="\\ud800-\\udfff",rl="\\u0300-\\u036f",Tp="\\ufe20-\\ufe2f",To="\\u20d0-\\u20ff",il=rl+Tp+To,rc="\\u2700-\\u27bf",ic="a-z\\xdf-\\xf6\\xf8-\\xff",Rp="\\xac\\xb1\\xd7\\xf7",ac="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Ap="\\u2000-\\u206f",Ip=" \\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",oc="A-Z\\xc0-\\xd6\\xd8-\\xde",sc="\\ufe0e\\ufe0f",lc=Rp+ac+Ap+Ip,al="['’]",Lp="["+yi+"]",uc="["+lc+"]",Ro="["+il+"]",cc="\\d+",Ao="["+rc+"]",Io="["+ic+"]",fc="[^"+yi+lc+cc+rc+ic+oc+"]",ol="\\ud83c[\\udffb-\\udfff]",dc="(?:"+Ro+"|"+ol+")",hc="[^"+yi+"]",sl="(?:\\ud83c[\\udde6-\\uddff]){2}",ll="[\\ud800-\\udbff][\\udc00-\\udfff]",Si="["+oc+"]",pc="\\u200d",gc="(?:"+Io+"|"+fc+")",Mp="(?:"+Si+"|"+fc+")",Lo="(?:"+al+"(?:d|ll|m|re|s|t|ve))?",mc="(?:"+al+"(?:D|LL|M|RE|S|T|VE))?",vc=dc+"?",yc="["+sc+"]?",Mo="(?:"+pc+"(?:"+[hc,sl,ll].join("|")+")"+yc+vc+")*",ul="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",cl="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Do=yc+vc+Mo,Dp="(?:"+[Ao,sl,ll].join("|")+")"+Do,Sc="(?:"+[hc+Ro+"?",Ro,sl,ll,Lp].join("|")+")",fl=RegExp(al,"g"),_c=RegExp(Ro,"g"),kr=RegExp(ol+"(?="+ol+")|"+Sc+Do,"g"),za=RegExp([Si+"?"+Io+"+"+Lo+"(?="+[uc,Si,"$"].join("|")+")",Mp+"+"+mc+"(?="+[uc,Si+gc,"$"].join("|")+")",Si+"?"+gc+"+"+Lo,Si+"+"+mc,cl,ul,cc,Dp].join("|"),"g"),Np=RegExp("["+pc+yi+il+sc+"]"),wc=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Bp=["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"],bc=-1,nt={};nt[xo]=nt[ko]=nt[Po]=nt[Eo]=nt[Oo]=nt[Js]=nt[Zs]=nt[Cr]=nt[Ki]=!0,nt[At]=nt[me]=nt[Vr]=nt[Bt]=nt[br]=nt[bn]=nt[Ft]=nt[xe]=nt[Et]=nt[gi]=nt[Mn]=nt[er]=nt[Kt]=nt[Dn]=nt[Hr]=!1;var et={};et[At]=et[me]=et[Vr]=et[br]=et[Bt]=et[bn]=et[xo]=et[ko]=et[Po]=et[Eo]=et[Oo]=et[Et]=et[gi]=et[Mn]=et[er]=et[Kt]=et[Dn]=et[bt]=et[Js]=et[Zs]=et[Cr]=et[Ki]=!0,et[Ft]=et[xe]=et[Hr]=!1;var Cc={À:"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"},Fp={"&":"&","<":"<",">":">",'"':""","'":"'"},E={"&":"&","<":"<",">":">",""":'"',"'":"'"},N={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},H=parseFloat,fe=parseInt,Ie=typeof yn=="object"&&yn&&yn.Object===Object&&yn,Ye=typeof self=="object"&&self&&self.Object===Object&&self,Pe=Ie||Ye||Function("return this")(),Te=e&&!e.nodeType&&e,ze=Te&&!0&&t&&!t.nodeType&&t,dn=ze&&ze.exports===Te,Yt=dn&&Ie.process,$t=function(){try{var F=ze&&ze.require&&ze.require("util").types;return F||Yt&&Yt.binding&&Yt.binding("util")}catch{}}(),No=$t&&$t.isArrayBuffer,Bo=$t&&$t.isDate,dl=$t&&$t.isMap,H0=$t&&$t.isRegExp,V0=$t&&$t.isSet,q0=$t&&$t.isTypedArray;function Nn(F,J,q){switch(q.length){case 0:return F.call(J);case 1:return F.call(J,q[0]);case 2:return F.call(J,q[0],q[1]);case 3:return F.call(J,q[0],q[1],q[2])}return F.apply(J,q)}function eE(F,J,q,de){for(var Ce=-1,je=F==null?0:F.length;++Ce-1}function $p(F,J,q){for(var de=-1,Ce=F==null?0:F.length;++de-1;);return q}function t1(F,J){for(var q=F.length;q--&&Fo(J,F[q],0)>-1;);return q}function uE(F,J){for(var q=F.length,de=0;q--;)F[q]===J&&++de;return de}var cE=jp(Cc),fE=jp(Fp);function dE(F){return"\\"+N[F]}function hE(F,J){return F==null?n:F[J]}function $o(F){return Np.test(F)}function pE(F){return wc.test(F)}function gE(F){for(var J,q=[];!(J=F.next()).done;)q.push(J.value);return q}function qp(F){var J=-1,q=Array(F.size);return F.forEach(function(de,Ce){q[++J]=[Ce,de]}),q}function n1(F,J){return function(q){return F(J(q))}}function ea(F,J){for(var q=-1,de=F.length,Ce=0,je=[];++q-1}function nO(o,l){var d=this.__data__,m=Gc(d,o);return m<0?(++this.size,d.push([o,l])):d[m][1]=l,this}_i.prototype.clear=JE,_i.prototype.delete=ZE,_i.prototype.get=eO,_i.prototype.has=tO,_i.prototype.set=nO;function wi(o){var l=-1,d=o==null?0:o.length;for(this.clear();++l=l?o:l)),o}function ir(o,l,d,m,b,P){var R,M=l&p,z=l&g,Z=l&y;if(d&&(R=b?d(o,m,b,P):d(o)),R!==n)return R;if(!ht(o))return o;var ee=ke(o);if(ee){if(R=oT(o),!M)return Cn(o,R)}else{var ne=an(o),ue=ne==xe||ne==Wr;if(oa(o))return F1(o,M);if(ne==Mn||ne==At||ue&&!b){if(R=z||ue?{}:rS(o),!M)return z?YO(o,yO(R,o)):KO(o,p1(R,o))}else{if(!et[ne])return b?o:{};R=sT(o,ne,M)}}P||(P=new Er);var ge=P.get(o);if(ge)return ge;P.set(o,R),IS(o)?o.forEach(function(_e){R.add(ir(_e,l,d,_e,o,P))}):RS(o)&&o.forEach(function(_e,Le){R.set(Le,ir(_e,l,d,Le,o,P))});var Se=Z?z?Sg:yg:z?kn:zt,Oe=ee?n:Se(o);return tr(Oe||o,function(_e,Le){Oe&&(Le=_e,_e=o[Le]),Sl(R,Le,ir(_e,l,d,Le,o,P))}),R}function SO(o){var l=zt(o);return function(d){return g1(d,o,l)}}function g1(o,l,d){var m=d.length;if(o==null)return!m;for(o=rt(o);m--;){var b=d[m],P=l[b],R=o[b];if(R===n&&!(b in o)||!P(R))return!1}return!0}function m1(o,l,d){if(typeof o!="function")throw new nr(s);return Pl(function(){o.apply(n,d)},l)}function _l(o,l,d,m){var b=-1,P=xc,R=!0,M=o.length,z=[],Z=l.length;if(!M)return z;d&&(l=ut(l,Bn(d))),m?(P=$p,R=!1):l.length>=i&&(P=hl,R=!1,l=new ja(l));e:for(;++bb?0:b+d),m=m===n||m>b?b:Ee(m),m<0&&(m+=b),m=d>m?0:MS(m);d0&&d(M)?l>1?Xt(M,l-1,d,m,b):Zi(b,M):m||(b[b.length]=M)}return b}var eg=W1(),S1=W1(!0);function qr(o,l){return o&&eg(o,l,zt)}function tg(o,l){return o&&S1(o,l,zt)}function jc(o,l){return Ji(l,function(d){return Pi(o[d])})}function Ha(o,l){l=ia(l,o);for(var d=0,m=l.length;o!=null&&dl}function bO(o,l){return o!=null&&Xe.call(o,l)}function CO(o,l){return o!=null&&l in rt(o)}function xO(o,l,d){return o>=rn(l,d)&&o=120&&ee.length>=120)?new ja(R&&ee):n}ee=o[0];var ne=-1,ue=M[0];e:for(;++ne-1;)M!==o&&Mc.call(M,z,1),Mc.call(o,z,1);return o}function R1(o,l){for(var d=o?l.length:0,m=d-1;d--;){var b=l[d];if(d==m||b!==P){var P=b;ki(b)?Mc.call(o,b,1):fg(o,b)}}return o}function lg(o,l){return o+Bc(c1()*(l-o+1))}function BO(o,l,d,m){for(var b=-1,P=Lt(Nc((l-o)/(d||1)),0),R=q(P);P--;)R[m?P:++b]=o,o+=d;return R}function ug(o,l){var d="";if(!o||l<1||l>W)return d;do l%2&&(d+=o),l=Bc(l/2),l&&(o+=o);while(l);return d}function Re(o,l){return Pg(oS(o,l,Pn),o+"")}function FO(o){return h1(Xo(o))}function $O(o,l){var d=Xo(o);return ef(d,Wa(l,0,d.length))}function Cl(o,l,d,m){if(!ht(o))return o;l=ia(l,o);for(var b=-1,P=l.length,R=P-1,M=o;M!=null&&++bb?0:b+l),d=d>b?b:d,d<0&&(d+=b),b=l>d?0:d-l>>>0,l>>>=0;for(var P=q(b);++m>>1,R=o[P];R!==null&&!$n(R)&&(d?R<=l:R=i){var Z=l?null:ZO(o);if(Z)return Pc(Z);R=!1,b=hl,z=new ja}else z=l?[]:M;e:for(;++m=m?o:ar(o,l,d)}var B1=RE||function(o){return Pe.clearTimeout(o)};function F1(o,l){if(l)return o.slice();var d=o.length,m=a1?a1(d):new o.constructor(d);return o.copy(m),m}function gg(o){var l=new o.constructor(o.byteLength);return new Ic(l).set(new Ic(o)),l}function WO(o,l){var d=l?gg(o.buffer):o.buffer;return new o.constructor(d,o.byteOffset,o.byteLength)}function HO(o){var l=new o.constructor(o.source,vi.exec(o));return l.lastIndex=o.lastIndex,l}function VO(o){return yl?rt(yl.call(o)):{}}function $1(o,l){var d=l?gg(o.buffer):o.buffer;return new o.constructor(d,o.byteOffset,o.length)}function z1(o,l){if(o!==l){var d=o!==n,m=o===null,b=o===o,P=$n(o),R=l!==n,M=l===null,z=l===l,Z=$n(l);if(!M&&!Z&&!P&&o>l||P&&R&&z&&!M&&!Z||m&&R&&z||!d&&z||!b)return 1;if(!m&&!P&&!Z&&o=M)return z;var Z=d[m];return z*(Z=="desc"?-1:1)}}return o.index-l.index}function G1(o,l,d,m){for(var b=-1,P=o.length,R=d.length,M=-1,z=l.length,Z=Lt(P-R,0),ee=q(z+Z),ne=!m;++M1?d[b-1]:n,R=b>2?d[2]:n;for(P=o.length>3&&typeof P=="function"?(b--,P):n,R&&pn(d[0],d[1],R)&&(P=b<3?n:P,b=1),l=rt(l);++m-1?b[P?l[R]:R]:n}}function q1(o){return xi(function(l){var d=l.length,m=d,b=rr.prototype.thru;for(o&&l.reverse();m--;){var P=l[m];if(typeof P!="function")throw new nr(s);if(b&&!R&&Jc(P)=="wrapper")var R=new rr([],!0)}for(m=R?m:d;++m1&&Ne.reverse(),ee&&zM))return!1;var Z=P.get(o),ee=P.get(l);if(Z&&ee)return Z==l&&ee==o;var ne=-1,ue=!0,ge=d&w?new ja:n;for(P.set(o,l),P.set(l,o);++ne1?"& ":"")+l[m],l=l.join(d>2?", ":" "),o.replace(mp,`{ -/* [wrapped with `+l+`] */ -`)}function uT(o){return ke(o)||Ka(o)||!!(l1&&o&&o[l1])}function ki(o,l){var d=typeof o;return l=l??W,!!l&&(d=="number"||d!="symbol"&&Pp.test(o))&&o>-1&&o%1==0&&o0){if(++l>=ce)return arguments[0]}else l=0;return o.apply(n,arguments)}}function ef(o,l){var d=-1,m=o.length,b=m-1;for(l=l===n?m:l;++d1?o[l-1]:n;return d=typeof d=="function"?(o.pop(),d):n,yS(o,d)});function SS(o){var l=k(o);return l.__chain__=!0,l}function _R(o,l){return l(o),o}function tf(o,l){return l(o)}var wR=xi(function(o){var l=o.length,d=l?o[0]:0,m=this.__wrapped__,b=function(P){return Zp(P,o)};return l>1||this.__actions__.length||!(m instanceof Me)||!ki(d)?this.thru(b):(m=m.slice(d,+d+(l?1:0)),m.__actions__.push({func:tf,args:[b],thisArg:n}),new rr(m,this.__chain__).thru(function(P){return l&&!P.length&&P.push(n),P}))});function bR(){return SS(this)}function CR(){return new rr(this.value(),this.__chain__)}function xR(){this.__values__===n&&(this.__values__=LS(this.value()));var o=this.__index__>=this.__values__.length,l=o?n:this.__values__[this.__index__++];return{done:o,value:l}}function kR(){return this}function PR(o){for(var l,d=this;d instanceof zc;){var m=dS(d);m.__index__=0,m.__values__=n,l?b.__wrapped__=m:l=m;var b=m;d=d.__wrapped__}return b.__wrapped__=o,l}function ER(){var o=this.__wrapped__;if(o instanceof Me){var l=o;return this.__actions__.length&&(l=new Me(this)),l=l.reverse(),l.__actions__.push({func:tf,args:[Eg],thisArg:n}),new rr(l,this.__chain__)}return this.thru(Eg)}function OR(){return D1(this.__wrapped__,this.__actions__)}var TR=qc(function(o,l,d){Xe.call(o,d)?++o[d]:bi(o,d,1)});function RR(o,l,d){var m=ke(o)?K0:_O;return d&&pn(o,l,d)&&(l=n),m(o,ye(l,3))}function AR(o,l){var d=ke(o)?Ji:y1;return d(o,ye(l,3))}var IR=V1(hS),LR=V1(pS);function MR(o,l){return Xt(nf(o,l),1)}function DR(o,l){return Xt(nf(o,l),ie)}function NR(o,l,d){return d=d===n?1:Ee(d),Xt(nf(o,l),d)}function _S(o,l){var d=ke(o)?tr:na;return d(o,ye(l,3))}function wS(o,l){var d=ke(o)?tE:v1;return d(o,ye(l,3))}var BR=qc(function(o,l,d){Xe.call(o,d)?o[d].push(l):bi(o,d,[l])});function FR(o,l,d,m){o=xn(o)?o:Xo(o),d=d&&!m?Ee(d):0;var b=o.length;return d<0&&(d=Lt(b+d,0)),lf(o)?d<=b&&o.indexOf(l,d)>-1:!!b&&Fo(o,l,d)>-1}var $R=Re(function(o,l,d){var m=-1,b=typeof l=="function",P=xn(o)?q(o.length):[];return na(o,function(R){P[++m]=b?Nn(l,R,d):wl(R,l,d)}),P}),zR=qc(function(o,l,d){bi(o,d,l)});function nf(o,l){var d=ke(o)?ut:x1;return d(o,ye(l,3))}function GR(o,l,d,m){return o==null?[]:(ke(l)||(l=l==null?[]:[l]),d=m?n:d,ke(d)||(d=d==null?[]:[d]),O1(o,l,d))}var UR=qc(function(o,l,d){o[d?0:1].push(l)},function(){return[[],[]]});function jR(o,l,d){var m=ke(o)?zp:J0,b=arguments.length<3;return m(o,ye(l,4),d,b,na)}function WR(o,l,d){var m=ke(o)?nE:J0,b=arguments.length<3;return m(o,ye(l,4),d,b,v1)}function HR(o,l){var d=ke(o)?Ji:y1;return d(o,of(ye(l,3)))}function VR(o){var l=ke(o)?h1:FO;return l(o)}function qR(o,l,d){(d?pn(o,l,d):l===n)?l=1:l=Ee(l);var m=ke(o)?gO:$O;return m(o,l)}function KR(o){var l=ke(o)?mO:GO;return l(o)}function YR(o){if(o==null)return 0;if(xn(o))return lf(o)?zo(o):o.length;var l=an(o);return l==Et||l==Kt?o.size:ag(o).length}function XR(o,l,d){var m=ke(o)?Gp:UO;return d&&pn(o,l,d)&&(l=n),m(o,ye(l,3))}var QR=Re(function(o,l){if(o==null)return[];var d=l.length;return d>1&&pn(o,l[0],l[1])?l=[]:d>2&&pn(l[0],l[1],l[2])&&(l=[l[0]]),O1(o,Xt(l,1),[])}),rf=AE||function(){return Pe.Date.now()};function JR(o,l){if(typeof l!="function")throw new nr(s);return o=Ee(o),function(){if(--o<1)return l.apply(this,arguments)}}function bS(o,l,d){return l=d?n:l,l=o&&l==null?o.length:l,Ci(o,D,n,n,n,n,l)}function CS(o,l){var d;if(typeof l!="function")throw new nr(s);return o=Ee(o),function(){return--o>0&&(d=l.apply(this,arguments)),o<=1&&(l=n),d}}var Tg=Re(function(o,l,d){var m=x;if(d.length){var b=ea(d,Ko(Tg));m|=I}return Ci(o,m,l,d,b)}),xS=Re(function(o,l,d){var m=x|_;if(d.length){var b=ea(d,Ko(xS));m|=I}return Ci(l,m,o,d,b)});function kS(o,l,d){l=d?n:l;var m=Ci(o,C,n,n,n,n,n,l);return m.placeholder=kS.placeholder,m}function PS(o,l,d){l=d?n:l;var m=Ci(o,O,n,n,n,n,n,l);return m.placeholder=PS.placeholder,m}function ES(o,l,d){var m,b,P,R,M,z,Z=0,ee=!1,ne=!1,ue=!0;if(typeof o!="function")throw new nr(s);l=sr(l)||0,ht(d)&&(ee=!!d.leading,ne="maxWait"in d,P=ne?Lt(sr(d.maxWait)||0,l):P,ue="trailing"in d?!!d.trailing:ue);function ge(xt){var Tr=m,Oi=b;return m=b=n,Z=xt,R=o.apply(Oi,Tr),R}function Se(xt){return Z=xt,M=Pl(Le,l),ee?ge(xt):R}function Oe(xt){var Tr=xt-z,Oi=xt-Z,VS=l-Tr;return ne?rn(VS,P-Oi):VS}function _e(xt){var Tr=xt-z,Oi=xt-Z;return z===n||Tr>=l||Tr<0||ne&&Oi>=P}function Le(){var xt=rf();if(_e(xt))return Ne(xt);M=Pl(Le,Oe(xt))}function Ne(xt){return M=n,ue&&m?ge(xt):(m=b=n,R)}function zn(){M!==n&&B1(M),Z=0,m=z=b=M=n}function gn(){return M===n?R:Ne(rf())}function Gn(){var xt=rf(),Tr=_e(xt);if(m=arguments,b=this,z=xt,Tr){if(M===n)return Se(z);if(ne)return B1(M),M=Pl(Le,l),ge(z)}return M===n&&(M=Pl(Le,l)),R}return Gn.cancel=zn,Gn.flush=gn,Gn}var ZR=Re(function(o,l){return m1(o,1,l)}),eA=Re(function(o,l,d){return m1(o,sr(l)||0,d)});function tA(o){return Ci(o,X)}function af(o,l){if(typeof o!="function"||l!=null&&typeof l!="function")throw new nr(s);var d=function(){var m=arguments,b=l?l.apply(this,m):m[0],P=d.cache;if(P.has(b))return P.get(b);var R=o.apply(this,m);return d.cache=P.set(b,R)||P,R};return d.cache=new(af.Cache||wi),d}af.Cache=wi;function of(o){if(typeof o!="function")throw new nr(s);return function(){var l=arguments;switch(l.length){case 0:return!o.call(this);case 1:return!o.call(this,l[0]);case 2:return!o.call(this,l[0],l[1]);case 3:return!o.call(this,l[0],l[1],l[2])}return!o.apply(this,l)}}function nA(o){return CS(2,o)}var rA=jO(function(o,l){l=l.length==1&&ke(l[0])?ut(l[0],Bn(ye())):ut(Xt(l,1),Bn(ye()));var d=l.length;return Re(function(m){for(var b=-1,P=rn(m.length,d);++b=l}),Ka=w1(function(){return arguments}())?w1:function(o){return St(o)&&Xe.call(o,"callee")&&!s1.call(o,"callee")},ke=q.isArray,yA=No?Bn(No):PO;function xn(o){return o!=null&&sf(o.length)&&!Pi(o)}function Ct(o){return St(o)&&xn(o)}function SA(o){return o===!0||o===!1||St(o)&&hn(o)==Bt}var oa=LE||Gg,_A=Bo?Bn(Bo):EO;function wA(o){return St(o)&&o.nodeType===1&&!El(o)}function bA(o){if(o==null)return!0;if(xn(o)&&(ke(o)||typeof o=="string"||typeof o.splice=="function"||oa(o)||Yo(o)||Ka(o)))return!o.length;var l=an(o);if(l==Et||l==Kt)return!o.size;if(kl(o))return!ag(o).length;for(var d in o)if(Xe.call(o,d))return!1;return!0}function CA(o,l){return bl(o,l)}function xA(o,l,d){d=typeof d=="function"?d:n;var m=d?d(o,l):n;return m===n?bl(o,l,n,d):!!m}function Ag(o){if(!St(o))return!1;var l=hn(o);return l==Ft||l==wr||typeof o.message=="string"&&typeof o.name=="string"&&!El(o)}function kA(o){return typeof o=="number"&&u1(o)}function Pi(o){if(!ht(o))return!1;var l=hn(o);return l==xe||l==Wr||l==qt||l==Qs}function TS(o){return typeof o=="number"&&o==Ee(o)}function sf(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=W}function ht(o){var l=typeof o;return o!=null&&(l=="object"||l=="function")}function St(o){return o!=null&&typeof o=="object"}var RS=dl?Bn(dl):TO;function PA(o,l){return o===l||ig(o,l,wg(l))}function EA(o,l,d){return d=typeof d=="function"?d:n,ig(o,l,wg(l),d)}function OA(o){return AS(o)&&o!=+o}function TA(o){if(dT(o))throw new Ce(a);return b1(o)}function RA(o){return o===null}function AA(o){return o==null}function AS(o){return typeof o=="number"||St(o)&&hn(o)==gi}function El(o){if(!St(o)||hn(o)!=Mn)return!1;var l=Lc(o);if(l===null)return!0;var d=Xe.call(l,"constructor")&&l.constructor;return typeof d=="function"&&d instanceof d&&Tc.call(d)==EE}var Ig=H0?Bn(H0):RO;function IA(o){return TS(o)&&o>=-W&&o<=W}var IS=V0?Bn(V0):AO;function lf(o){return typeof o=="string"||!ke(o)&&St(o)&&hn(o)==Dn}function $n(o){return typeof o=="symbol"||St(o)&&hn(o)==bt}var Yo=q0?Bn(q0):IO;function LA(o){return o===n}function MA(o){return St(o)&&an(o)==Hr}function DA(o){return St(o)&&hn(o)==Co}var NA=Qc(og),BA=Qc(function(o,l){return o<=l});function LS(o){if(!o)return[];if(xn(o))return lf(o)?Pr(o):Cn(o);if(pl&&o[pl])return gE(o[pl]());var l=an(o),d=l==Et?qp:l==Kt?Pc:Xo;return d(o)}function Ei(o){if(!o)return o===0?o:0;if(o=sr(o),o===ie||o===-ie){var l=o<0?-1:1;return l*Y}return o===o?o:0}function Ee(o){var l=Ei(o),d=l%1;return l===l?d?l-d:l:0}function MS(o){return o?Wa(Ee(o),0,oe):0}function sr(o){if(typeof o=="number")return o;if($n(o))return Q;if(ht(o)){var l=typeof o.valueOf=="function"?o.valueOf():o;o=ht(l)?l+"":l}if(typeof o!="string")return o===0?o:+o;o=Z0(o);var d=Cp.test(o);return d||kp.test(o)?fe(o.slice(2),d?2:8):bp.test(o)?Q:+o}function DS(o){return Kr(o,kn(o))}function FA(o){return o?Wa(Ee(o),-W,W):o===0?o:0}function Ve(o){return o==null?"":Fn(o)}var $A=Vo(function(o,l){if(kl(l)||xn(l)){Kr(l,zt(l),o);return}for(var d in l)Xe.call(l,d)&&Sl(o,d,l[d])}),NS=Vo(function(o,l){Kr(l,kn(l),o)}),uf=Vo(function(o,l,d,m){Kr(l,kn(l),o,m)}),zA=Vo(function(o,l,d,m){Kr(l,zt(l),o,m)}),GA=xi(Zp);function UA(o,l){var d=Ho(o);return l==null?d:p1(d,l)}var jA=Re(function(o,l){o=rt(o);var d=-1,m=l.length,b=m>2?l[2]:n;for(b&&pn(l[0],l[1],b)&&(m=1);++d1),P}),Kr(o,Sg(o),d),m&&(d=ir(d,p|g|y,eT));for(var b=l.length;b--;)fg(d,l[b]);return d});function sI(o,l){return FS(o,of(ye(l)))}var lI=xi(function(o,l){return o==null?{}:DO(o,l)});function FS(o,l){if(o==null)return{};var d=ut(Sg(o),function(m){return[m]});return l=ye(l),T1(o,d,function(m,b){return l(m,b[0])})}function uI(o,l,d){l=ia(l,o);var m=-1,b=l.length;for(b||(b=1,o=n);++ml){var m=o;o=l,l=m}if(d||o%1||l%1){var b=c1();return rn(o+b*(l-o+H("1e-"+((b+"").length-1))),l)}return lg(o,l)}var _I=qo(function(o,l,d){return l=l.toLowerCase(),o+(d?GS(l):l)});function GS(o){return Dg(Ve(o).toLowerCase())}function US(o){return o=Ve(o),o&&o.replace(Ep,cE).replace(_c,"")}function wI(o,l,d){o=Ve(o),l=Fn(l);var m=o.length;d=d===n?m:Wa(Ee(d),0,m);var b=d;return d-=l.length,d>=0&&o.slice(d,b)==l}function bI(o){return o=Ve(o),o&&mi.test(o)?o.replace(Yi,fE):o}function CI(o){return o=Ve(o),o&&pp.test(o)?o.replace(tl,"\\$&"):o}var xI=qo(function(o,l,d){return o+(d?"-":"")+l.toLowerCase()}),kI=qo(function(o,l,d){return o+(d?" ":"")+l.toLowerCase()}),PI=H1("toLowerCase");function EI(o,l,d){o=Ve(o),l=Ee(l);var m=l?zo(o):0;if(!l||m>=l)return o;var b=(l-m)/2;return Xc(Bc(b),d)+o+Xc(Nc(b),d)}function OI(o,l,d){o=Ve(o),l=Ee(l);var m=l?zo(o):0;return l&&m>>0,d?(o=Ve(o),o&&(typeof l=="string"||l!=null&&!Ig(l))&&(l=Fn(l),!l&&$o(o))?aa(Pr(o),0,d):o.split(l,d)):[]}var DI=qo(function(o,l,d){return o+(d?" ":"")+Dg(l)});function NI(o,l,d){return o=Ve(o),d=d==null?0:Wa(Ee(d),0,o.length),l=Fn(l),o.slice(d,d+l.length)==l}function BI(o,l,d){var m=k.templateSettings;d&&pn(o,l,d)&&(l=n),o=Ve(o),l=uf({},l,m,J1);var b=uf({},l.imports,m.imports,J1),P=zt(b),R=Vp(b,P),M,z,Z=0,ee=l.interpolate||Qi,ne="__p += '",ue=Kp((l.escape||Qi).source+"|"+ee.source+"|"+(ee===nc?wp:Qi).source+"|"+(l.evaluate||Qi).source+"|$","g"),ge="//# sourceURL="+(Xe.call(l,"sourceURL")?(l.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++bc+"]")+` -`;o.replace(ue,function(_e,Le,Ne,zn,gn,Gn){return Ne||(Ne=zn),ne+=o.slice(Z,Gn).replace(Op,dE),Le&&(M=!0,ne+=`' + -__e(`+Le+`) + -'`),gn&&(z=!0,ne+=`'; -`+gn+`; -__p += '`),Ne&&(ne+=`' + -((__t = (`+Ne+`)) == null ? '' : __t) + -'`),Z=Gn+_e.length,_e}),ne+=`'; -`;var Se=Xe.call(l,"variable")&&l.variable;if(!Se)ne=`with (obj) { -`+ne+` -} -`;else if(Sp.test(Se))throw new Ce(u);ne=(z?ne.replace(sp,""):ne).replace(tc,"$1").replace(lp,"$1;"),ne="function("+(Se||"obj")+`) { -`+(Se?"":`obj || (obj = {}); -`)+"var __t, __p = ''"+(M?", __e = _.escape":"")+(z?`, __j = Array.prototype.join; -function print() { __p += __j.call(arguments, '') } -`:`; -`)+ne+`return __p -}`;var Oe=WS(function(){return je(P,ge+"return "+ne).apply(n,R)});if(Oe.source=ne,Ag(Oe))throw Oe;return Oe}function FI(o){return Ve(o).toLowerCase()}function $I(o){return Ve(o).toUpperCase()}function zI(o,l,d){if(o=Ve(o),o&&(d||l===n))return Z0(o);if(!o||!(l=Fn(l)))return o;var m=Pr(o),b=Pr(l),P=e1(m,b),R=t1(m,b)+1;return aa(m,P,R).join("")}function GI(o,l,d){if(o=Ve(o),o&&(d||l===n))return o.slice(0,r1(o)+1);if(!o||!(l=Fn(l)))return o;var m=Pr(o),b=t1(m,Pr(l))+1;return aa(m,0,b).join("")}function UI(o,l,d){if(o=Ve(o),o&&(d||l===n))return o.replace(nl,"");if(!o||!(l=Fn(l)))return o;var m=Pr(o),b=e1(m,Pr(l));return aa(m,b).join("")}function jI(o,l){var d=K,m=te;if(ht(l)){var b="separator"in l?l.separator:b;d="length"in l?Ee(l.length):d,m="omission"in l?Fn(l.omission):m}o=Ve(o);var P=o.length;if($o(o)){var R=Pr(o);P=R.length}if(d>=P)return o;var M=d-zo(m);if(M<1)return m;var z=R?aa(R,0,M).join(""):o.slice(0,M);if(b===n)return z+m;if(R&&(M+=z.length-M),Ig(b)){if(o.slice(M).search(b)){var Z,ee=z;for(b.global||(b=Kp(b.source,Ve(vi.exec(b))+"g")),b.lastIndex=0;Z=b.exec(ee);)var ne=Z.index;z=z.slice(0,ne===n?M:ne)}}else if(o.indexOf(Fn(b),M)!=M){var ue=z.lastIndexOf(b);ue>-1&&(z=z.slice(0,ue))}return z+m}function WI(o){return o=Ve(o),o&&up.test(o)?o.replace(el,SE):o}var HI=qo(function(o,l,d){return o+(d?" ":"")+l.toUpperCase()}),Dg=H1("toUpperCase");function jS(o,l,d){return o=Ve(o),l=d?n:l,l===n?pE(o)?bE(o):aE(o):o.match(l)||[]}var WS=Re(function(o,l){try{return Nn(o,n,l)}catch(d){return Ag(d)?d:new Ce(d)}}),VI=xi(function(o,l){return tr(l,function(d){d=Yr(d),bi(o,d,Tg(o[d],o))}),o});function qI(o){var l=o==null?0:o.length,d=ye();return o=l?ut(o,function(m){if(typeof m[1]!="function")throw new nr(s);return[d(m[0]),m[1]]}):[],Re(function(m){for(var b=-1;++bW)return[];var d=oe,m=rn(o,oe);l=ye(l),o-=oe;for(var b=Hp(m,l);++d0||l<0)?new Me(d):(o<0?d=d.takeRight(-o):o&&(d=d.drop(o)),l!==n&&(l=Ee(l),d=l<0?d.dropRight(-l):d.take(l-o)),d)},Me.prototype.takeRightWhile=function(o){return this.reverse().takeWhile(o).reverse()},Me.prototype.toArray=function(){return this.take(oe)},qr(Me.prototype,function(o,l){var d=/^(?:filter|find|map|reject)|While$/.test(l),m=/^(?:head|last)$/.test(l),b=k[m?"take"+(l=="last"?"Right":""):l],P=m||/^find/.test(l);b&&(k.prototype[l]=function(){var R=this.__wrapped__,M=m?[1]:arguments,z=R instanceof Me,Z=M[0],ee=z||ke(R),ne=function(Le){var Ne=b.apply(k,Zi([Le],M));return m&&ue?Ne[0]:Ne};ee&&d&&typeof Z=="function"&&Z.length!=1&&(z=ee=!1);var ue=this.__chain__,ge=!!this.__actions__.length,Se=P&&!ue,Oe=z&&!ge;if(!P&&ee){R=Oe?R:new Me(this);var _e=o.apply(R,M);return _e.__actions__.push({func:tf,args:[ne],thisArg:n}),new rr(_e,ue)}return Se&&Oe?o.apply(this,M):(_e=this.thru(ne),Se?m?_e.value()[0]:_e.value():_e)})}),tr(["pop","push","shift","sort","splice","unshift"],function(o){var l=Ec[o],d=/^(?:push|sort|unshift)$/.test(o)?"tap":"thru",m=/^(?:pop|shift)$/.test(o);k.prototype[o]=function(){var b=arguments;if(m&&!this.__chain__){var P=this.value();return l.apply(ke(P)?P:[],b)}return this[d](function(R){return l.apply(ke(R)?R:[],b)})}}),qr(Me.prototype,function(o,l){var d=k[l];if(d){var m=d.name+"";Xe.call(Wo,m)||(Wo[m]=[]),Wo[m].push({name:l,func:d})}}),Wo[Kc(n,_).name]=[{name:"wrapper",func:n}],Me.prototype.clone=WE,Me.prototype.reverse=HE,Me.prototype.value=VE,k.prototype.at=wR,k.prototype.chain=bR,k.prototype.commit=CR,k.prototype.next=xR,k.prototype.plant=PR,k.prototype.reverse=ER,k.prototype.toJSON=k.prototype.valueOf=k.prototype.value=OR,k.prototype.first=k.prototype.head,pl&&(k.prototype[pl]=kR),k},Go=CE();ze?((ze.exports=Go)._=Go,Te._=Go):Pe._=Go}).call(yn)})(g5,_t);const Jo=(t,e,n,r,i,a,s)=>{const u=t/2-(n+i/2)*s,c=e/2-(r+a/2)*s;return{x:u,y:c}},Zo=(t,e,n,r,i=.95)=>{const a=t*i/n,s=e*i/r;return Math.min(1,Math.min(a,s))},L8=.999,M8=.1,D8=20,Nl=.95,N8=30,B8=10,Pw=t=>({x:Math.floor(t.x),y:Math.floor(t.y)}),Ya=t=>{const{width:e,height:n}=t,r={width:e,height:n},i=512*512,a=e/n;let s=e*n,u=448;for(;s1?(r.width=u,r.height=va(u/a,64)):a<1&&(r.height=u,r.width=va(u*a,64)),s=r.width*r.height;return r},m5=t=>({width:va(t.width,64),height:va(t.height,64)}),F8=[{key:"Base",value:"base"},{key:"Mask",value:"mask"}],$8=[{key:"Auto",value:"auto"},{key:"Manual",value:"manual"},{key:"None",value:"none"}],Qx=t=>t.kind==="line"&&t.layer==="mask",z8=t=>t.kind==="line"&&t.layer==="base",Ew=t=>t.kind==="image"&&t.layer==="base",G8=t=>t.kind==="fillRect"&&t.layer==="base",U8=t=>t.kind==="eraseRect"&&t.layer==="base",v5=t=>t.kind==="line",Zl={objects:[],stagingArea:{images:[],selectedImageIndex:-1}},y5={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:Zl,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"},Jx=vo({name:"canvas",initialState:y5,reducers:{setTool:(t,e)=>{const n=e.payload;t.tool=e.payload,n!=="move"&&(t.isTransformingBoundingBox=!1,t.isMouseOverBoundingBox=!1,t.isMovingBoundingBox=!1,t.isMovingStage=!1)},setLayer:(t,e)=>{t.layer=e.payload},toggleTool:t=>{const e=t.tool;e!=="move"&&(t.tool=e==="brush"?"eraser":"brush")},setMaskColor:(t,e)=>{t.maskColor=e.payload},setBrushColor:(t,e)=>{t.brushColor=e.payload},setBrushSize:(t,e)=>{t.brushSize=e.payload},clearMask:t=>{t.pastLayerStates.push(_t.cloneDeep(t.layerState)),t.layerState.objects=t.layerState.objects.filter(e=>!Qx(e)),t.futureLayerStates=[],t.shouldPreserveMaskedArea=!1},toggleShouldInvertMask:t=>{t.shouldPreserveMaskedArea=!t.shouldPreserveMaskedArea},toggleShouldShowMask:t=>{t.isMaskEnabled=!t.isMaskEnabled},setShouldPreserveMaskedArea:(t,e)=>{t.shouldPreserveMaskedArea=e.payload},setIsMaskEnabled:(t,e)=>{t.isMaskEnabled=e.payload,t.layer=e.payload?"mask":"base"},setShouldShowCheckboardTransparency:(t,e)=>{t.shouldShowCheckboardTransparency=e.payload},setShouldShowBrushPreview:(t,e)=>{t.shouldShowBrushPreview=e.payload},setShouldShowBrush:(t,e)=>{t.shouldShowBrush=e.payload},setCursorPosition:(t,e)=>{t.cursorPosition=e.payload},setInitialCanvasImage:(t,e)=>{const n=e.payload,{stageDimensions:r}=t,i={width:Ef(_t.clamp(n.width,64,512),64),height:Ef(_t.clamp(n.height,64,512),64)},a={x:va(n.width/2-i.width/2,64),y:va(n.height/2-i.height/2,64)};if(t.boundingBoxScaleMethod==="auto"){const c=Ya(i);t.scaledBoundingBoxDimensions=c}t.boundingBoxDimensions=i,t.boundingBoxCoordinates=a,t.pastLayerStates.push(_t.cloneDeep(t.layerState)),t.layerState={...Zl,objects:[{kind:"image",layer:"base",x:0,y:0,width:n.width,height:n.height,image:n}]},t.futureLayerStates=[],t.isCanvasInitialized=!1;const s=Zo(r.width,r.height,n.width,n.height,Nl),u=Jo(r.width,r.height,0,0,n.width,n.height,s);t.stageScale=s,t.stageCoordinates=u,t.doesCanvasNeedScaling=!0},setBoundingBoxDimensions:(t,e)=>{const n=m5(e.payload);if(t.boundingBoxDimensions=n,t.boundingBoxScaleMethod==="auto"){const r=Ya(n);t.scaledBoundingBoxDimensions=r}},setBoundingBoxCoordinates:(t,e)=>{t.boundingBoxCoordinates=Pw(e.payload)},setStageCoordinates:(t,e)=>{t.stageCoordinates=e.payload},setBoundingBoxPreviewFill:(t,e)=>{t.boundingBoxPreviewFill=e.payload},setDoesCanvasNeedScaling:(t,e)=>{t.doesCanvasNeedScaling=e.payload},setStageScale:(t,e)=>{t.stageScale=e.payload},setShouldDarkenOutsideBoundingBox:(t,e)=>{t.shouldDarkenOutsideBoundingBox=e.payload},setIsDrawing:(t,e)=>{t.isDrawing=e.payload},clearCanvasHistory:t=>{t.pastLayerStates=[],t.futureLayerStates=[]},setShouldLockBoundingBox:(t,e)=>{t.shouldLockBoundingBox=e.payload},toggleShouldLockBoundingBox:t=>{t.shouldLockBoundingBox=!t.shouldLockBoundingBox},setShouldShowBoundingBox:(t,e)=>{t.shouldShowBoundingBox=e.payload},setIsTransformingBoundingBox:(t,e)=>{t.isTransformingBoundingBox=e.payload},setIsMovingBoundingBox:(t,e)=>{t.isMovingBoundingBox=e.payload},setIsMouseOverBoundingBox:(t,e)=>{t.isMouseOverBoundingBox=e.payload},setIsMoveBoundingBoxKeyHeld:(t,e)=>{t.isMoveBoundingBoxKeyHeld=e.payload},setIsMoveStageKeyHeld:(t,e)=>{t.isMoveStageKeyHeld=e.payload},addImageToStagingArea:(t,e)=>{const{boundingBox:n,image:r}=e.payload;!n||!r||(t.pastLayerStates.push(_t.cloneDeep(t.layerState)),t.pastLayerStates.length>t.maxHistory&&t.pastLayerStates.shift(),t.layerState.stagingArea.images.push({kind:"image",layer:"base",...n,image:r}),t.layerState.stagingArea.selectedImageIndex=t.layerState.stagingArea.images.length-1,t.futureLayerStates=[])},discardStagedImages:t=>{t.pastLayerStates.push(_t.cloneDeep(t.layerState)),t.pastLayerStates.length>t.maxHistory&&t.pastLayerStates.shift(),t.layerState.stagingArea={...Zl.stagingArea},t.futureLayerStates=[],t.shouldShowStagingOutline=!0,t.shouldShowStagingOutline=!0},addFillRect:t=>{const{boundingBoxCoordinates:e,boundingBoxDimensions:n,brushColor:r}=t;t.pastLayerStates.push(_t.cloneDeep(t.layerState)),t.pastLayerStates.length>t.maxHistory&&t.pastLayerStates.shift(),t.layerState.objects.push({kind:"fillRect",layer:"base",...e,...n,color:r}),t.futureLayerStates=[]},addEraseRect:t=>{const{boundingBoxCoordinates:e,boundingBoxDimensions:n}=t;t.pastLayerStates.push(_t.cloneDeep(t.layerState)),t.pastLayerStates.length>t.maxHistory&&t.pastLayerStates.shift(),t.layerState.objects.push({kind:"eraseRect",layer:"base",...e,...n}),t.futureLayerStates=[]},addLine:(t,e)=>{const{tool:n,layer:r,brushColor:i,brushSize:a,shouldRestrictStrokesToBox:s}=t;if(n==="move"||n==="colorPicker")return;const u=a/2,c=r==="base"&&n==="brush"?{color:i}:{};t.pastLayerStates.push(_t.cloneDeep(t.layerState)),t.pastLayerStates.length>t.maxHistory&&t.pastLayerStates.shift();const f={kind:"line",layer:r,tool:n,strokeWidth:u,points:e.payload,...c};s&&(f.clip={...t.boundingBoxCoordinates,...t.boundingBoxDimensions}),t.layerState.objects.push(f),t.futureLayerStates=[]},addPointToCurrentLine:(t,e)=>{const n=t.layerState.objects.findLast(v5);n&&n.points.push(...e.payload)},undo:t=>{const e=t.pastLayerStates.pop();e&&(t.futureLayerStates.unshift(_t.cloneDeep(t.layerState)),t.futureLayerStates.length>t.maxHistory&&t.futureLayerStates.pop(),t.layerState=e)},redo:t=>{const e=t.futureLayerStates.shift();e&&(t.pastLayerStates.push(_t.cloneDeep(t.layerState)),t.pastLayerStates.length>t.maxHistory&&t.pastLayerStates.shift(),t.layerState=e)},setShouldShowGrid:(t,e)=>{t.shouldShowGrid=e.payload},setIsMovingStage:(t,e)=>{t.isMovingStage=e.payload},setShouldSnapToGrid:(t,e)=>{t.shouldSnapToGrid=e.payload},setShouldAutoSave:(t,e)=>{t.shouldAutoSave=e.payload},setShouldShowIntermediates:(t,e)=>{t.shouldShowIntermediates=e.payload},resetCanvas:t=>{t.pastLayerStates.push(_t.cloneDeep(t.layerState)),t.layerState=Zl,t.futureLayerStates=[]},setCanvasContainerDimensions:(t,e)=>{t.canvasContainerDimensions=e.payload},resizeAndScaleCanvas:t=>{const{width:e,height:n}=t.canvasContainerDimensions,r=t.layerState.objects.find(Ew),i={width:Math.floor(e),height:Math.floor(n)};if(!r){const h=Zo(i.width,i.height,512,512,Nl),p=Jo(i.width,i.height,0,0,512,512,h),g={width:512,height:512};if(t.stageScale=h,t.stageCoordinates=p,t.stageDimensions=i,t.boundingBoxCoordinates={x:0,y:0},t.boundingBoxDimensions=g,t.boundingBoxScaleMethod==="auto"){const y=Ya(g);t.scaledBoundingBoxDimensions=y}return}const{width:a,height:s}=r,c=Zo(e,n,a,s,.95),f=Jo(i.width,i.height,0,0,a,s,c);t.minimumStageScale=c,t.stageScale=c,t.stageCoordinates=Pw(f),t.stageDimensions=i,t.isCanvasInitialized=!0},resizeCanvas:t=>{const{width:e,height:n}=t.canvasContainerDimensions,r={width:Math.floor(e),height:Math.floor(n)};if(t.stageDimensions=r,!t.layerState.objects.find(Ew)){const i=Zo(r.width,r.height,512,512,Nl),a=Jo(r.width,r.height,0,0,512,512,i),s={width:512,height:512};if(t.stageScale=i,t.stageCoordinates=a,t.boundingBoxCoordinates={x:0,y:0},t.boundingBoxDimensions=s,t.boundingBoxScaleMethod==="auto"){const u=Ya(s);t.scaledBoundingBoxDimensions=u}}},resetCanvasView:(t,e)=>{const{contentRect:n,shouldScaleTo1:r}=e.payload,{stageDimensions:{width:i,height:a}}=t,{x:s,y:u,width:c,height:f}=n;if(c!==0&&f!==0){const h=r?1:Zo(i,a,c,f,Nl),p=Jo(i,a,s,u,c,f,h);t.stageScale=h,t.stageCoordinates=p}else{const h=Zo(i,a,512,512,Nl),p=Jo(i,a,0,0,512,512,h),g={width:512,height:512};if(t.stageScale=h,t.stageCoordinates=p,t.boundingBoxCoordinates={x:0,y:0},t.boundingBoxDimensions=g,t.boundingBoxScaleMethod==="auto"){const y=Ya(g);t.scaledBoundingBoxDimensions=y}}},nextStagingAreaImage:t=>{const e=t.layerState.stagingArea.selectedImageIndex,n=t.layerState.stagingArea.images.length;t.layerState.stagingArea.selectedImageIndex=Math.min(e+1,n-1)},prevStagingAreaImage:t=>{const e=t.layerState.stagingArea.selectedImageIndex;t.layerState.stagingArea.selectedImageIndex=Math.max(e-1,0)},commitStagingAreaImage:t=>{const{images:e,selectedImageIndex:n}=t.layerState.stagingArea;t.pastLayerStates.push(_t.cloneDeep(t.layerState)),t.pastLayerStates.length>t.maxHistory&&t.pastLayerStates.shift(),t.layerState.objects.push({...e[n]}),t.layerState.stagingArea={...Zl.stagingArea},t.futureLayerStates=[],t.shouldShowStagingOutline=!0,t.shouldShowStagingImage=!0},fitBoundingBoxToStage:t=>{const{boundingBoxDimensions:e,boundingBoxCoordinates:n,stageDimensions:r,stageScale:i}=t,a=r.width/i,s=r.height/i;if(n.x<0||n.x+e.width>a||n.y<0||n.y+e.height>s){const u={width:Ef(_t.clamp(a,64,512),64),height:Ef(_t.clamp(s,64,512),64)},c={x:va(a/2-u.width/2,64),y:va(s/2-u.height/2,64)};if(t.boundingBoxDimensions=u,t.boundingBoxCoordinates=c,t.boundingBoxScaleMethod==="auto"){const f=Ya(u);t.scaledBoundingBoxDimensions=f}}},setBoundingBoxScaleMethod:(t,e)=>{if(t.boundingBoxScaleMethod=e.payload,e.payload==="auto"){const n=Ya(t.boundingBoxDimensions);t.scaledBoundingBoxDimensions=n}},setScaledBoundingBoxDimensions:(t,e)=>{t.scaledBoundingBoxDimensions=e.payload},setShouldShowStagingImage:(t,e)=>{t.shouldShowStagingImage=e.payload},setShouldShowStagingOutline:(t,e)=>{t.shouldShowStagingOutline=e.payload},setShouldShowCanvasDebugInfo:(t,e)=>{t.shouldShowCanvasDebugInfo=e.payload},setShouldRestrictStrokesToBox:(t,e)=>{t.shouldRestrictStrokesToBox=e.payload},setShouldCropToBoundingBoxOnSave:(t,e)=>{t.shouldCropToBoundingBoxOnSave=e.payload},setColorPickerColor:(t,e)=>{t.colorPickerColor=e.payload},commitColorPickerColor:t=>{t.brushColor={...t.colorPickerColor,a:t.brushColor.a},t.tool="brush"},setMergedCanvas:(t,e)=>{t.pastLayerStates.push(_t.cloneDeep(t.layerState)),t.futureLayerStates=[],t.layerState.objects=[e.payload]},resetCanvasInteractionState:t=>{t.cursorPosition=null,t.isDrawing=!1,t.isMouseOverBoundingBox=!1,t.isMoveBoundingBoxKeyHeld=!1,t.isMoveStageKeyHeld=!1,t.isMovingBoundingBox=!1,t.isMovingStage=!1,t.isTransformingBoundingBox=!1},mouseLeftCanvas:t=>{t.cursorPosition=null,t.isDrawing=!1,t.isMouseOverBoundingBox=!1,t.isMovingBoundingBox=!1,t.isTransformingBoundingBox=!1}}}),{addEraseRect:j8,addFillRect:W8,addImageToStagingArea:S5,addLine:H8,addPointToCurrentLine:V8,clearCanvasHistory:q8,clearMask:K8,commitColorPickerColor:Y8,commitStagingAreaImage:X8,discardStagedImages:Q8,fitBoundingBoxToStage:J8,mouseLeftCanvas:Z8,nextStagingAreaImage:eU,prevStagingAreaImage:tU,redo:nU,resetCanvas:rU,resetCanvasInteractionState:iU,resetCanvasView:aU,resizeAndScaleCanvas:oU,resizeCanvas:sU,setBoundingBoxCoordinates:lU,setBoundingBoxDimensions:uU,setBoundingBoxPreviewFill:cU,setBoundingBoxScaleMethod:fU,setBrushColor:dU,setBrushSize:hU,setCanvasContainerDimensions:pU,setColorPickerColor:gU,setCursorPosition:mU,setDoesCanvasNeedScaling:vU,setInitialCanvasImage:yU,setIsDrawing:SU,setIsMaskEnabled:_U,setIsMouseOverBoundingBox:wU,setIsMoveBoundingBoxKeyHeld:bU,setIsMoveStageKeyHeld:CU,setIsMovingBoundingBox:xU,setIsMovingStage:kU,setIsTransformingBoundingBox:PU,setLayer:EU,setMaskColor:OU,setMergedCanvas:TU,setShouldAutoSave:RU,setShouldCropToBoundingBoxOnSave:AU,setShouldDarkenOutsideBoundingBox:IU,setShouldLockBoundingBox:LU,setShouldPreserveMaskedArea:MU,setShouldShowBoundingBox:DU,setShouldShowBrush:NU,setShouldShowBrushPreview:BU,setShouldShowCanvasDebugInfo:FU,setShouldShowCheckboardTransparency:$U,setShouldShowGrid:zU,setShouldShowIntermediates:GU,setShouldShowStagingImage:UU,setShouldShowStagingOutline:jU,setShouldSnapToGrid:WU,setStageCoordinates:HU,setStageScale:VU,setTool:qU,toggleShouldLockBoundingBox:KU,toggleTool:YU,undo:XU,setScaledBoundingBoxDimensions:QU,setShouldRestrictStrokesToBox:JU}=Jx.actions,_5=Jx.reducer,w5={currentImageUuid:"",galleryImageMinimumWidth:64,galleryImageObjectFit:"cover",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},Zx=vo({name:"gallery",initialState:w5,reducers:{setCurrentImage:(t,e)=>{t.currentImage=e.payload,t.currentImageUuid=e.payload.uuid},removeImage:(t,e)=>{const{uuid:n,category:r}=e.payload,i=t.categories[r].images,a=i.filter(s=>s.uuid!==n);if(n===t.currentImageUuid){const s=i.findIndex(c=>c.uuid===n),u=_t.clamp(s,0,a.length-1);t.currentImage=a.length?a[u]:void 0,t.currentImageUuid=a.length?a[u].uuid:""}t.categories[r].images=a},addImage:(t,e)=>{const{image:n,category:r}=e.payload,{uuid:i,url:a,mtime:s}=n,u=t.categories[r];u.images.find(c=>c.url===a&&c.mtime===s)||(u.images.unshift(n),t.shouldAutoSwitchToNewImages&&(t.currentImageUuid=i,t.currentImage=n,t.currentCategory=r),t.intermediateImage=void 0,u.latest_mtime=s)},setIntermediateImage:(t,e)=>{t.intermediateImage=e.payload},clearIntermediateImage:t=>{t.intermediateImage=void 0},selectNextImage:t=>{const{currentImage:e}=t;if(!e)return;const n=t.categories[e.category].images;if(e){const r=n.findIndex(i=>i.uuid===e.uuid);if(r{const{currentImage:e}=t;if(!e)return;const n=t.categories[e.category].images;if(e){const r=n.findIndex(i=>i.uuid===e.uuid);if(r>0){const i=n[r-1];t.currentImage=i,t.currentImageUuid=i.uuid}}},addGalleryImages:(t,e)=>{const{images:n,areMoreImagesAvailable:r,category:i}=e.payload,a=t.categories[i].images;if(n.length>0){const s=n.filter(u=>!a.find(c=>c.url===u.url&&c.mtime===u.mtime));if(t.categories[i].images=a.concat(s).sort((u,c)=>c.mtime-u.mtime),!t.currentImage){const u=n[0];t.currentImage=u,t.currentImageUuid=u.uuid}t.categories[i].latest_mtime=n[0].mtime,t.categories[i].earliest_mtime=n[n.length-1].mtime}r!==void 0&&(t.categories[i].areMoreImagesAvailable=r)},setGalleryImageMinimumWidth:(t,e)=>{t.galleryImageMinimumWidth=e.payload},setGalleryImageObjectFit:(t,e)=>{t.galleryImageObjectFit=e.payload},setShouldAutoSwitchToNewImages:(t,e)=>{t.shouldAutoSwitchToNewImages=e.payload},setCurrentCategory:(t,e)=>{t.currentCategory=e.payload},setGalleryWidth:(t,e)=>{t.galleryWidth=e.payload},setShouldUseSingleGalleryColumn:(t,e)=>{t.shouldUseSingleGalleryColumn=e.payload}}}),{addImage:Of,clearIntermediateImage:Cm,removeImage:ek,setCurrentImage:ZU,addGalleryImages:b5,setIntermediateImage:C5,selectNextImage:ej,selectPrevImage:tj,setGalleryImageMinimumWidth:nj,setGalleryImageObjectFit:rj,setShouldAutoSwitchToNewImages:ij,setCurrentCategory:aj,setGalleryWidth:oj,setShouldUseSingleGalleryColumn:sj}=Zx.actions,x5=Zx.reducer,k5={isLightboxOpen:!1},P5=k5,tk=vo({name:"lightbox",initialState:P5,reducers:{setIsLightboxOpen:(t,e)=>{t.isLightboxOpen=e.payload}}}),{setIsLightboxOpen:lj}=tk.actions,E5=tk.reducer,dd=t=>typeof t=="string"?t:t.length===1?t[0].prompt:t.map(e=>`${e.prompt}:${e.weight}`).join(" ");function O5(t){let e=typeof t=="string"?t:dd(t),n="";const r=new RegExp(/\[([^\][]*)]/,"gi"),i=[...e.matchAll(r)].map(a=>a[1]);return i.length&&(n=i.join(" "),i.forEach(a=>{e=e.replace(`[${a}]`,"").replaceAll("[]","").trim()})),[e,n]}const T5=t=>{const r=t.split(",").map(i=>i.split(":")).map(i=>({seed:Number(i[0]),weight:Number(i[1])}));return R5(r)?r:!1},R5=t=>Boolean(typeof t=="string"?T5(t):t.length&&!t.some(e=>{const{seed:n,weight:r}=e,i=!isNaN(parseInt(n.toString(),10)),a=!isNaN(parseInt(r.toString(),10))&&r>=0&&r<=1;return!(i&&a)})),Ow=t=>t.reduce((e,n,r,i)=>{const{seed:a,weight:s}=n;return e+=`${a}:${s}`,r!==i.length-1&&(e+=","),e},""),A5=t=>t.split(",").map(r=>r.split(":")).map(r=>[parseInt(r[0],10),parseFloat(r[1])]),nk={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,shouldUseSymmetry:!1,horizontalSymmetrySteps:0,verticalSymmetrySteps:0},I5=nk,rk=vo({name:"generation",initialState:I5,reducers:{setPrompt:(t,e)=>{const n=e.payload;typeof n=="string"?t.prompt=n:t.prompt=dd(n)},setNegativePrompt:(t,e)=>{const n=e.payload;typeof n=="string"?t.negativePrompt=n:t.negativePrompt=dd(n)},setIterations:(t,e)=>{t.iterations=e.payload},setSteps:(t,e)=>{t.steps=e.payload},clampSymmetrySteps:t=>{t.horizontalSymmetrySteps=_t.clamp(t.horizontalSymmetrySteps,0,t.steps),t.verticalSymmetrySteps=_t.clamp(t.verticalSymmetrySteps,0,t.steps)},setCfgScale:(t,e)=>{t.cfgScale=e.payload},setThreshold:(t,e)=>{t.threshold=e.payload},setPerlin:(t,e)=>{t.perlin=e.payload},setHeight:(t,e)=>{t.height=e.payload},setWidth:(t,e)=>{t.width=e.payload},setSampler:(t,e)=>{t.sampler=e.payload},setSeed:(t,e)=>{t.seed=e.payload,t.shouldRandomizeSeed=!1},setImg2imgStrength:(t,e)=>{t.img2imgStrength=e.payload},setMaskPath:(t,e)=>{t.maskPath=e.payload},setSeamless:(t,e)=>{t.seamless=e.payload},setShouldFitToWidthHeight:(t,e)=>{t.shouldFitToWidthHeight=e.payload},resetSeed:t=>{t.seed=-1},setParameter:(t,e)=>{const{key:n,value:r}=e.payload,i={...t,[n]:r};return n==="seed"&&(i.shouldRandomizeSeed=!1),i},setShouldGenerateVariations:(t,e)=>{t.shouldGenerateVariations=e.payload},setVariationAmount:(t,e)=>{t.variationAmount=e.payload},setSeedWeights:(t,e)=>{t.seedWeights=e.payload,t.shouldGenerateVariations=!0,t.variationAmount=0},setAllTextToImageParameters:(t,e)=>{const{sampler:n,prompt:r,seed:i,variations:a,steps:s,cfg_scale:u,threshold:c,perlin:f,seamless:h,_hires_fix:p,width:g,height:y}=e.payload.image;a&&a.length>0?(t.seedWeights=Ow(a),t.shouldGenerateVariations=!0,t.variationAmount=0):t.shouldGenerateVariations=!1,i&&(t.seed=i,t.shouldRandomizeSeed=!1),r&&(t.prompt=dd(r)),n&&(t.sampler=n),s&&(t.steps=s),u&&(t.cfgScale=u),typeof c>"u"?t.threshold=0:t.threshold=c,typeof f>"u"?t.perlin=0:t.perlin=f,typeof h=="boolean"&&(t.seamless=h),g&&(t.width=g),y&&(t.height=y)},setAllImageToImageParameters:(t,e)=>{const{type:n,strength:r,fit:i,init_image_path:a,mask_image_path:s}=e.payload.image;n==="img2img"&&(a&&(t.initialImage=a),s&&(t.maskPath=s),r&&(t.img2imgStrength=r),typeof i=="boolean"&&(t.shouldFitToWidthHeight=i))},setAllParameters:(t,e)=>{const{type:n,sampler:r,prompt:i,seed:a,variations:s,steps:u,cfg_scale:c,threshold:f,perlin:h,seamless:p,_hires_fix:g,width:y,height:v,strength:w,fit:x,init_image_path:_,mask_image_path:S}=e.payload.image;if(n==="img2img"&&(_&&(t.initialImage=_),S&&(t.maskPath=S),w&&(t.img2imgStrength=w),typeof x=="boolean"&&(t.shouldFitToWidthHeight=x)),s&&s.length>0?(t.seedWeights=Ow(s),t.shouldGenerateVariations=!0,t.variationAmount=0):t.shouldGenerateVariations=!1,a&&(t.seed=a,t.shouldRandomizeSeed=!1),i){const[C,O]=O5(i);C&&(t.prompt=C),O?t.negativePrompt=O:t.negativePrompt=""}r&&(t.sampler=r),u&&(t.steps=u),c&&(t.cfgScale=c),typeof f>"u"?t.threshold=0:t.threshold=f,typeof h>"u"?t.perlin=0:t.perlin=h,typeof p=="boolean"&&(t.seamless=p),y&&(t.width=y),v&&(t.height=v)},resetParametersState:t=>({...t,...nk}),setShouldRandomizeSeed:(t,e)=>{t.shouldRandomizeSeed=e.payload},setInitialImage:(t,e)=>{t.initialImage=e.payload},clearInitialImage:t=>{t.initialImage=void 0},setSeamSize:(t,e)=>{t.seamSize=e.payload},setSeamBlur:(t,e)=>{t.seamBlur=e.payload},setSeamStrength:(t,e)=>{t.seamStrength=e.payload},setSeamSteps:(t,e)=>{t.seamSteps=e.payload},setTileSize:(t,e)=>{t.tileSize=e.payload},setInfillMethod:(t,e)=>{t.infillMethod=e.payload},setShouldUseSymmetry:(t,e)=>{t.shouldUseSymmetry=e.payload},setHorizontalSymmetrySteps:(t,e)=>{t.horizontalSymmetrySteps=e.payload},setVerticalSymmetrySteps:(t,e)=>{t.verticalSymmetrySteps=e.payload}}}),{clampSymmetrySteps:uj,clearInitialImage:L5,resetParametersState:cj,resetSeed:fj,setAllImageToImageParameters:dj,setAllParameters:hj,setAllTextToImageParameters:pj,setCfgScale:gj,setHeight:mj,setImg2imgStrength:vj,setInfillMethod:M5,setInitialImage:D5,setIterations:yj,setMaskPath:N5,setParameter:Sj,setPerlin:_j,setPrompt:wj,setNegativePrompt:bj,setSampler:Cj,setSeamBlur:xj,setSeamless:kj,setSeamSize:Pj,setSeamSteps:Ej,setSeamStrength:Oj,setSeed:Tj,setSeedWeights:Rj,setShouldFitToWidthHeight:Aj,setShouldGenerateVariations:Ij,setShouldRandomizeSeed:Lj,setSteps:Mj,setThreshold:Dj,setTileSize:Nj,setVariationAmount:Bj,setWidth:Fj,setShouldUseSymmetry:$j,setHorizontalSymmetrySteps:zj,setVerticalSymmetrySteps:Gj}=rk.actions,B5=rk.reducer,ik={codeformerFidelity:.75,facetoolStrength:.75,facetoolType:"gfpgan",hiresFix:!1,hiresStrength:.75,shouldLoopback:!1,shouldRunESRGAN:!1,shouldRunFacetool:!1,upscalingLevel:4,upscalingDenoising:.75,upscalingStrength:.75},F5=ik,ak=vo({name:"postprocessing",initialState:F5,reducers:{setFacetoolStrength:(t,e)=>{t.facetoolStrength=e.payload},setCodeformerFidelity:(t,e)=>{t.codeformerFidelity=e.payload},setUpscalingLevel:(t,e)=>{t.upscalingLevel=e.payload},setUpscalingDenoising:(t,e)=>{t.upscalingDenoising=e.payload},setUpscalingStrength:(t,e)=>{t.upscalingStrength=e.payload},setHiresFix:(t,e)=>{t.hiresFix=e.payload},setHiresStrength:(t,e)=>{t.hiresStrength=e.payload},resetPostprocessingState:t=>({...t,...ik}),setShouldRunFacetool:(t,e)=>{t.shouldRunFacetool=e.payload},setFacetoolType:(t,e)=>{t.facetoolType=e.payload},setShouldRunESRGAN:(t,e)=>{t.shouldRunESRGAN=e.payload},setShouldLoopback:(t,e)=>{t.shouldLoopback=e.payload}}}),{resetPostprocessingState:Uj,setCodeformerFidelity:jj,setFacetoolStrength:Wj,setFacetoolType:Hj,setHiresFix:Vj,setHiresStrength:qj,setShouldLoopback:Kj,setShouldRunESRGAN:Yj,setShouldRunFacetool:Xj,setUpscalingLevel:Qj,setUpscalingDenoising:Jj,setUpscalingStrength:Zj}=ak.actions,$5=ak.reducer;function Sr(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Tw(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&arguments[1]!==void 0?arguments[1]:{};Sr(this,t),this.init(e,n)}return _r(t,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=n||U5,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),a=1;a-1?u.replace(/###/g,"."):u}function i(){return!t||typeof t=="string"}for(var a=typeof e!="string"?[].concat(e):e.split(".");a.length>1;){if(i())return{};var s=r(a.shift());!t[s]&&n&&(t[s]=new n),Object.prototype.hasOwnProperty.call(t,s)?t=t[s]:t={}}return i()?{}:{obj:t,k:r(a.shift())}}function Mw(t,e,n){var r=O0(t,e,Object),i=r.obj,a=r.k;i[a]=n}function H5(t,e,n,r){var i=O0(t,e,Object),a=i.obj,s=i.k;a[s]=a[s]||[],r&&(a[s]=a[s].concat(n)),r||a[s].push(n)}function rh(t,e){var n=O0(t,e),r=n.obj,i=n.k;if(r)return r[i]}function Dw(t,e,n){var r=rh(t,n);return r!==void 0?r:rh(e,n)}function uk(t,e,n){for(var r in e)r!=="__proto__"&&r!=="constructor"&&(r in t?typeof t[r]=="string"||t[r]instanceof String||typeof e[r]=="string"||e[r]instanceof String?n&&(t[r]=e[r]):uk(t[r],e[r],n):t[r]=e[r]);return t}function es(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var V5={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function q5(t){return typeof t=="string"?t.replace(/[&<>"'\/]/g,function(e){return V5[e]}):t}var Qh=typeof window<"u"&&window.navigator&&typeof window.navigator.userAgentData>"u"&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,K5=[" ",",","?","!",";"];function Y5(t,e,n){e=e||"",n=n||"";var r=K5.filter(function(u){return e.indexOf(u)<0&&n.indexOf(u)<0});if(r.length===0)return!0;var i=new RegExp("(".concat(r.map(function(u){return u==="?"?"\\?":u}).join("|"),")")),a=!i.test(t);if(!a){var s=t.indexOf(n);s>0&&!i.test(t.substring(0,s))&&(a=!0)}return a}function Nw(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Tf(t){for(var e=1;e"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 ck(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(t){if(t[e])return t[e];for(var r=e.split(n),i=t,a=0;aa+s;)s++,u=r.slice(a,a+s).join(n),c=i[u];if(c===void 0)return;if(c===null)return null;if(e.endsWith(u)){if(typeof c=="string")return c;if(u&&typeof c[u]=="string")return c[u]}var f=r.slice(a+s).join(n);return f?ck(c,f,n):void 0}i=i[r[a]]}return i}}var J5=function(t){Xh(n,t);var e=X5(n);function n(r){var i,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return Sr(this,n),i=e.call(this),Qh&&Aa.call(Ea(i)),i.data=r||{},i.options=a,i.options.keySeparator===void 0&&(i.options.keySeparator="."),i.options.ignoreJSONStructure===void 0&&(i.options.ignoreJSONStructure=!0),i}return _r(n,[{key:"addNamespaces",value:function(i){this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}},{key:"removeNamespaces",value:function(i){var a=this.options.ns.indexOf(i);a>-1&&this.options.ns.splice(a,1)}},{key:"getResource",value:function(i,a,s){var u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},c=u.keySeparator!==void 0?u.keySeparator:this.options.keySeparator,f=u.ignoreJSONStructure!==void 0?u.ignoreJSONStructure:this.options.ignoreJSONStructure,h=[i,a];s&&typeof s!="string"&&(h=h.concat(s)),s&&typeof s=="string"&&(h=h.concat(c?s.split(c):s)),i.indexOf(".")>-1&&(h=i.split("."));var p=rh(this.data,h);return p||!f||typeof s!="string"?p:ck(this.data&&this.data[i]&&this.data[i][a],s,c)}},{key:"addResource",value:function(i,a,s,u){var c=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},f=this.options.keySeparator;f===void 0&&(f=".");var h=[i,a];s&&(h=h.concat(f?s.split(f):s)),i.indexOf(".")>-1&&(h=i.split("."),u=a,a=h[1]),this.addNamespaces(a),Mw(this.data,h,u),c.silent||this.emit("added",i,a,s,u)}},{key:"addResources",value:function(i,a,s){var u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var c in s)(typeof s[c]=="string"||Object.prototype.toString.apply(s[c])==="[object Array]")&&this.addResource(i,a,c,s[c],{silent:!0});u.silent||this.emit("added",i,a,s)}},{key:"addResourceBundle",value:function(i,a,s,u,c){var f=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},h=[i,a];i.indexOf(".")>-1&&(h=i.split("."),u=s,s=a,a=h[1]),this.addNamespaces(a);var p=rh(this.data,h)||{};u?uk(p,s,c):p=Tf(Tf({},p),s),Mw(this.data,h,p),f.silent||this.emit("added",i,a,s)}},{key:"removeResourceBundle",value:function(i,a){this.hasResourceBundle(i,a)&&delete this.data[i][a],this.removeNamespaces(a),this.emit("removed",i,a)}},{key:"hasResourceBundle",value:function(i,a){return this.getResource(i,a)!==void 0}},{key:"getResourceBundle",value:function(i,a){return a||(a=this.options.defaultNS),this.options.compatibilityAPI==="v1"?Tf(Tf({},{}),this.getResource(i,a)):this.getResource(i,a)}},{key:"getDataByLanguage",value:function(i){return this.data[i]}},{key:"hasLanguageSomeTranslations",value:function(i){var a=this.getDataByLanguage(i),s=a&&Object.keys(a)||[];return!!s.find(function(u){return a[u]&&Object.keys(a[u]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),n}(Aa),fk={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,n,r,i,a){var s=this;return e.forEach(function(u){s.processors[u]&&(n=s.processors[u].process(n,r,i,a))}),n}};function Bw(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function mn(t){for(var e=1;e"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 Fw={},$w=function(t){Xh(n,t);var e=Z5(n);function n(r){var i,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Sr(this,n),i=e.call(this),Qh&&Aa.call(Ea(i)),W5(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],r,Ea(i)),i.options=a,i.options.keySeparator===void 0&&(i.options.keySeparator="."),i.logger=ii.create("translator"),i}return _r(n,[{key:"changeLanguage",value:function(i){i&&(this.language=i)}},{key:"exists",value:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(i==null)return!1;var s=this.resolve(i,a);return s&&s.res!==void 0}},{key:"extractFromKey",value:function(i,a){var s=a.nsSeparator!==void 0?a.nsSeparator:this.options.nsSeparator;s===void 0&&(s=":");var u=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,c=a.ns||this.options.defaultNS||[],f=s&&i.indexOf(s)>-1,h=!this.options.userDefinedKeySeparator&&!a.keySeparator&&!this.options.userDefinedNsSeparator&&!a.nsSeparator&&!Y5(i,s,u);if(f&&!h){var p=i.match(this.interpolator.nestingRegexp);if(p&&p.length>0)return{key:i,namespaces:c};var g=i.split(s);(s!==u||s===u&&this.options.ns.indexOf(g[0])>-1)&&(c=g.shift()),i=g.join(u)}return typeof c=="string"&&(c=[c]),{key:i,namespaces:c}}},{key:"translate",value:function(i,a,s){var u=this;if(gr(a)!=="object"&&this.options.overloadTranslationOptionHandler&&(a=this.options.overloadTranslationOptionHandler(arguments)),a||(a={}),i==null)return"";Array.isArray(i)||(i=[String(i)]);var c=a.returnDetails!==void 0?a.returnDetails:this.options.returnDetails,f=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,h=this.extractFromKey(i[i.length-1],a),p=h.key,g=h.namespaces,y=g[g.length-1],v=a.lng||this.language,w=a.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(v&&v.toLowerCase()==="cimode"){if(w){var x=a.nsSeparator||this.options.nsSeparator;return c?{res:"".concat(y).concat(x).concat(p),usedKey:p,exactUsedKey:p,usedLng:v,usedNS:y}:"".concat(y).concat(x).concat(p)}return c?{res:p,usedKey:p,exactUsedKey:p,usedLng:v,usedNS:y}:p}var _=this.resolve(i,a),S=_&&_.res,C=_&&_.usedKey||p,O=_&&_.exactUsedKey||p,I=Object.prototype.toString.apply(S),L=["[object Number]","[object Function]","[object RegExp]"],D=a.joinArrays!==void 0?a.joinArrays:this.options.joinArrays,U=!this.i18nFormat||this.i18nFormat.handleAsObject,X=typeof S!="string"&&typeof S!="boolean"&&typeof S!="number";if(U&&S&&X&&L.indexOf(I)<0&&!(typeof D=="string"&&I==="[object Array]")){if(!a.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var K=this.options.returnedObjectHandler?this.options.returnedObjectHandler(C,S,mn(mn({},a),{},{ns:g})):"key '".concat(p," (").concat(this.language,")' returned an object instead of string.");return c?(_.res=K,_):K}if(f){var te=I==="[object Array]",ce=te?[]:{},j=te?O:C;for(var T in S)if(Object.prototype.hasOwnProperty.call(S,T)){var $="".concat(j).concat(f).concat(T);ce[T]=this.translate($,mn(mn({},a),{joinArrays:!1,ns:g})),ce[T]===$&&(ce[T]=S[T])}S=ce}}else if(U&&typeof D=="string"&&I==="[object Array]")S=S.join(D),S&&(S=this.extendTranslation(S,i,a,s));else{var V=!1,ie=!1,W=a.count!==void 0&&typeof a.count!="string",Y=n.hasDefaultValue(a),Q=W?this.pluralResolver.getSuffix(v,a.count,a):"",oe=a["defaultValue".concat(Q)]||a.defaultValue;!this.isValidLookup(S)&&Y&&(V=!0,S=oe),this.isValidLookup(S)||(ie=!0,S=p);var ve=a.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,we=ve&&ie?void 0:S,Ue=Y&&oe!==S&&this.options.updateMissing;if(ie||V||Ue){if(this.logger.log(Ue?"updateKey":"missingKey",v,y,p,Ue?oe:S),f){var At=this.resolve(p,mn(mn({},a),{},{keySeparator:!1}));At&&At.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 me=[],qt=this.languageUtils.getFallbackCodes(this.options.fallbackLng,a.lng||this.language);if(this.options.saveMissingTo==="fallback"&&qt&&qt[0])for(var Bt=0;Bt1&&arguments[1]!==void 0?arguments[1]:{},u,c,f,h,p;return typeof i=="string"&&(i=[i]),i.forEach(function(g){if(!a.isValidLookup(u)){var y=a.extractFromKey(g,s),v=y.key;c=v;var w=y.namespaces;a.options.fallbackNS&&(w=w.concat(a.options.fallbackNS));var x=s.count!==void 0&&typeof s.count!="string",_=x&&!s.ordinal&&s.count===0&&a.pluralResolver.shouldUseIntlApi(),S=s.context!==void 0&&(typeof s.context=="string"||typeof s.context=="number")&&s.context!=="",C=s.lngs?s.lngs:a.languageUtils.toResolveHierarchy(s.lng||a.language,s.fallbackLng);w.forEach(function(O){a.isValidLookup(u)||(p=O,!Fw["".concat(C[0],"-").concat(O)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(p)&&(Fw["".concat(C[0],"-").concat(O)]=!0,a.logger.warn('key "'.concat(c,'" for languages "').concat(C.join(", "),`" won't get resolved as namespace "`).concat(p,'" 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!!!")),C.forEach(function(I){if(!a.isValidLookup(u)){h=I;var L=[v];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(L,v,I,O,s);else{var D;x&&(D=a.pluralResolver.getSuffix(I,s.count,s));var U="".concat(a.options.pluralSeparator,"zero");if(x&&(L.push(v+D),_&&L.push(v+U)),S){var X="".concat(v).concat(a.options.contextSeparator).concat(s.context);L.push(X),x&&(L.push(X+D),_&&L.push(X+U))}}for(var K;K=L.pop();)a.isValidLookup(u)||(f=K,u=a.getResource(I,O,K,s))}}))})}}),{res:u,usedKey:c,exactUsedKey:f,usedLng:h,usedNS:p}}},{key:"isValidLookup",value:function(i){return i!==void 0&&!(!this.options.returnNull&&i===null)&&!(!this.options.returnEmptyString&&i==="")}},{key:"getResource",value:function(i,a,s){var u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(i,a,s,u):this.resourceStore.getResource(i,a,s,u)}}],[{key:"hasDefaultValue",value:function(i){var a="defaultValue";for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s)&&a===s.substring(0,a.length)&&i[s]!==void 0)return!0;return!1}}]),n}(Aa);function xm(t){return t.charAt(0).toUpperCase()+t.slice(1)}var zw=function(){function t(e){Sr(this,t),this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ii.create("languageUtils")}return _r(t,[{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(a){return a.toLowerCase()}):i.length===2?(i[0]=i[0].toLowerCase(),i[1]=i[1].toUpperCase(),r.indexOf(i[1].toLowerCase())>-1&&(i[1]=xm(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]=xm(i[1].toLowerCase())),r.indexOf(i[2].toLowerCase())>-1&&(i[2]=xm(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(a){if(!i){var s=r.formatLanguageCode(a);(!r.options.supportedLngs||r.isSupportedCode(s))&&(i=s)}}),!i&&this.options.supportedLngs&&n.forEach(function(a){if(!i){var s=r.getLanguagePartFromCode(a);if(r.isSupportedCode(s))return i=s;i=r.options.supportedLngs.find(function(u){if(u.indexOf(s)===0)return u})}}),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,a=this.getFallbackCodes(r||this.options.fallbackLng||[],n),s=[],u=function(f){f&&(i.isSupportedCode(f)?s.push(f):i.logger.warn("rejecting language code not found in supportedLngs: ".concat(f)))};return typeof n=="string"&&n.indexOf("-")>-1?(this.options.load!=="languageOnly"&&u(this.formatLanguageCode(n)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&u(this.getScriptPartFromCode(n)),this.options.load!=="currentOnly"&&u(this.getLanguagePartFromCode(n))):typeof n=="string"&&u(this.formatLanguageCode(n)),a.forEach(function(c){s.indexOf(c)<0&&u(i.formatLanguageCode(c))}),s}}]),t}(),t4=[{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}],n4={1:function(e){return Number(e>1)},2:function(e){return Number(e!=1)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(e==1?0:e>=2&&e<=4?1:2)},7:function(e){return Number(e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(e==1?0:e==2?1:e!=8&&e!=11?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(e==1?0:e==2?1:e<7?2:e<11?3:4)},11:function(e){return Number(e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(e!==0)},14:function(e){return Number(e==1?0:e==2?1:e==3?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:e!==0?1:2)},17:function(e){return Number(e==1||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(e==0?0:e==1?1:2)},19:function(e){return Number(e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(e==1?0:e==0||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3)}},r4=["v1","v2","v3"],Gw={zero:0,one:1,two:2,few:3,many:4,other:5};function i4(){var t={};return t4.forEach(function(e){e.lngs.forEach(function(n){t[n]={numbers:e.nr,plurals:n4[e.fc]}})}),t}var a4=function(){function t(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Sr(this,t),this.languageUtils=e,this.options=n,this.logger=ii.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=i4()}return _r(t,[{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(a){return"".concat(r).concat(a)})}},{key:"getSuffixes",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=this.getRule(n,i);return a?this.shouldUseIntlApi()?a.resolvedOptions().pluralCategories.sort(function(s,u){return Gw[s]-Gw[u]}).map(function(s){return"".concat(r.options.prepend).concat(s)}):a.numbers.map(function(s){return r.getSuffix(n,s,i)}):[]}},{key:"getSuffix",value:function(n,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=this.getRule(n,i);return a?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(a.select(r)):this.getSuffixRetroCompatible(a,r):(this.logger.warn("no plural rule found for: ".concat(n)),"")}},{key:"getSuffixRetroCompatible",value:function(n,r){var i=this,a=n.noAbs?n.plurals(r):n.plurals(Math.abs(r)),s=n.numbers[a];this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1&&(s===2?s="plural":s===1&&(s=""));var u=function(){return i.options.prepend&&s.toString()?i.options.prepend+s.toString():s.toString()};return this.options.compatibilityJSON==="v1"?s===1?"":typeof s=="number"?"_plural_".concat(s.toString()):u():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1?u():this.options.prepend&&a.toString()?this.options.prepend+a.toString():a.toString()}},{key:"shouldUseIntlApi",value:function(){return!r4.includes(this.options.compatibilityJSON)}}]),t}();function Uw(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Ar(t){for(var e=1;e0&&arguments[0]!==void 0?arguments[0]:{};Sr(this,t),this.logger=ii.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||function(n){return n},this.init(e)}return _r(t,[{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:q5,this.escapeValue=r.escapeValue!==void 0?r.escapeValue:!0,this.useRawValueToEscape=r.useRawValueToEscape!==void 0?r.useRawValueToEscape:!1,this.prefix=r.prefix?es(r.prefix):r.prefixEscaped||"{{",this.suffix=r.suffix?es(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?es(r.nestingPrefix):r.nestingPrefixEscaped||es("$t("),this.nestingSuffix=r.nestingSuffix?es(r.nestingSuffix):r.nestingSuffixEscaped||es(")"),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,a){var s=this,u,c,f,h=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function p(x){return x.replace(/\$/g,"$$$$")}var g=function(_){if(_.indexOf(s.formatSeparator)<0){var S=Dw(r,h,_);return s.alwaysFormat?s.format(S,void 0,i,Ar(Ar(Ar({},a),r),{},{interpolationkey:_})):S}var C=_.split(s.formatSeparator),O=C.shift().trim(),I=C.join(s.formatSeparator).trim();return s.format(Dw(r,h,O),I,i,Ar(Ar(Ar({},a),r),{},{interpolationkey:O}))};this.resetRegExp();var y=a&&a.missingInterpolationHandler||this.options.missingInterpolationHandler,v=a&&a.interpolation&&a.interpolation.skipOnVariables!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,w=[{regex:this.regexpUnescape,safeValue:function(_){return p(_)}},{regex:this.regexp,safeValue:function(_){return s.escapeValue?p(s.escape(_)):p(_)}}];return w.forEach(function(x){for(f=0;u=x.regex.exec(n);){var _=u[1].trim();if(c=g(_),c===void 0)if(typeof y=="function"){var S=y(n,u,a);c=typeof S=="string"?S:""}else if(a&&Object.prototype.hasOwnProperty.call(a,_))c="";else if(v){c=u[0];continue}else s.logger.warn("missed to pass in variable ".concat(_," for interpolating ").concat(n)),c="";else typeof c!="string"&&!s.useRawValueToEscape&&(c=Lw(c));var C=x.safeValue(c);if(n=n.replace(u[0],C),v?(x.regex.lastIndex+=c.length,x.regex.lastIndex-=u[0].length):x.regex.lastIndex=0,f++,f>=s.maxReplaces)break}}),n}},{key:"nest",value:function(n,r){var i=this,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s,u,c;function f(y,v){var w=this.nestingOptionsSeparator;if(y.indexOf(w)<0)return y;var x=y.split(new RegExp("".concat(w,"[ ]*{"))),_="{".concat(x[1]);y=x[0],_=this.interpolate(_,c);var S=_.match(/'/g),C=_.match(/"/g);(S&&S.length%2===0&&!C||C.length%2!==0)&&(_=_.replace(/'/g,'"'));try{c=JSON.parse(_),v&&(c=Ar(Ar({},v),c))}catch(O){return this.logger.warn("failed parsing options string in nesting for key ".concat(y),O),"".concat(y).concat(w).concat(_)}return delete c.defaultValue,y}for(;s=this.nestingRegexp.exec(n);){var h=[];c=Ar({},a),c=c.replace&&typeof c.replace!="string"?c.replace:c,c.applyPostProcessor=!1,delete c.defaultValue;var p=!1;if(s[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(s[1])){var g=s[1].split(this.formatSeparator).map(function(y){return y.trim()});s[1]=g.shift(),h=g,p=!0}if(u=r(f.call(this,s[1].trim(),c),c),u&&s[0]===n&&typeof u!="string")return u;typeof u!="string"&&(u=Lw(u)),u||(this.logger.warn("missed to resolve ".concat(s[1]," for nesting ").concat(n)),u=""),p&&(u=h.reduce(function(y,v){return i.format(y,v,a.lng,Ar(Ar({},a),{},{interpolationkey:s[1].trim()}))},u.trim())),n=n.replace(s[0],u),this.regexp.lastIndex=0}return n}}]),t}();function jw(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Ri(t){for(var e=1;e-1){var r=t.split("(");e=r[0].toLowerCase().trim();var i=r[1].substring(0,r[1].length-1);if(e==="currency"&&i.indexOf(":")<0)n.currency||(n.currency=i.trim());else if(e==="relativetime"&&i.indexOf(":")<0)n.range||(n.range=i.trim());else{var a=i.split(";");a.forEach(function(s){if(s){var u=s.split(":"),c=G5(u),f=c[0],h=c.slice(1),p=h.join(":").trim().replace(/^'+|'+$/g,"");n[f.trim()]||(n[f.trim()]=p),p==="false"&&(n[f.trim()]=!1),p==="true"&&(n[f.trim()]=!0),isNaN(p)||(n[f.trim()]=parseInt(p,10))}})}}return{formatName:e,formatOptions:n}}function ts(t){var e={};return function(r,i,a){var s=i+JSON.stringify(a),u=e[s];return u||(u=t(i,a),e[s]=u),u(r)}}var l4=function(){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Sr(this,t),this.logger=ii.create("formatter"),this.options=e,this.formats={number:ts(function(n,r){var i=new Intl.NumberFormat(n,Ri({},r));return function(a){return i.format(a)}}),currency:ts(function(n,r){var i=new Intl.NumberFormat(n,Ri(Ri({},r),{},{style:"currency"}));return function(a){return i.format(a)}}),datetime:ts(function(n,r){var i=new Intl.DateTimeFormat(n,Ri({},r));return function(a){return i.format(a)}}),relativetime:ts(function(n,r){var i=new Intl.RelativeTimeFormat(n,Ri({},r));return function(a){return i.format(a,r.range||"day")}}),list:ts(function(n,r){var i=new Intl.ListFormat(n,Ri({},r));return function(a){return i.format(a)}})},this.init(e)}return _r(t,[{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()]=ts(r)}},{key:"format",value:function(n,r,i){var a=this,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},u=r.split(this.formatSeparator),c=u.reduce(function(f,h){var p=s4(h),g=p.formatName,y=p.formatOptions;if(a.formats[g]){var v=f;try{var w=s&&s.formatParams&&s.formatParams[s.interpolationkey]||{},x=w.locale||w.lng||s.locale||s.lng||i;v=a.formats[g](f,x,Ri(Ri(Ri({},y),s),w))}catch(_){a.logger.warn(_)}return v}else a.logger.warn("there was no format function for ".concat(g));return f},n);return c}}]),t}();function Ww(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Hw(t){for(var e=1;e"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 f4(t,e){t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)}var d4=function(t){Xh(n,t);var e=u4(n);function n(r,i,a){var s,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return Sr(this,n),s=e.call(this),Qh&&Aa.call(Ea(s)),s.backend=r,s.store=i,s.services=a,s.languageUtils=a.languageUtils,s.options=u,s.logger=ii.create("backendConnector"),s.waitingReads=[],s.maxParallelReads=u.maxParallelReads||10,s.readingCalls=0,s.maxRetries=u.maxRetries>=0?u.maxRetries:5,s.retryTimeout=u.retryTimeout>=1?u.retryTimeout:350,s.state={},s.queue=[],s.backend&&s.backend.init&&s.backend.init(a,u.backend,u),s}return _r(n,[{key:"queueLoad",value:function(i,a,s,u){var c=this,f={},h={},p={},g={};return i.forEach(function(y){var v=!0;a.forEach(function(w){var x="".concat(y,"|").concat(w);!s.reload&&c.store.hasResourceBundle(y,w)?c.state[x]=2:c.state[x]<0||(c.state[x]===1?h[x]===void 0&&(h[x]=!0):(c.state[x]=1,v=!1,h[x]===void 0&&(h[x]=!0),f[x]===void 0&&(f[x]=!0),g[w]===void 0&&(g[w]=!0)))}),v||(p[y]=!0)}),(Object.keys(f).length||Object.keys(h).length)&&this.queue.push({pending:h,pendingCount:Object.keys(h).length,loaded:{},errors:[],callback:u}),{toLoad:Object.keys(f),pending:Object.keys(h),toLoadLanguages:Object.keys(p),toLoadNamespaces:Object.keys(g)}}},{key:"loaded",value:function(i,a,s){var u=i.split("|"),c=u[0],f=u[1];a&&this.emit("failedLoading",c,f,a),s&&this.store.addResourceBundle(c,f,s),this.state[i]=a?-1:2;var h={};this.queue.forEach(function(p){H5(p.loaded,[c],f),f4(p,i),a&&p.errors.push(a),p.pendingCount===0&&!p.done&&(Object.keys(p.loaded).forEach(function(g){h[g]||(h[g]={});var y=p.loaded[g];y.length&&y.forEach(function(v){h[g][v]===void 0&&(h[g][v]=!0)})}),p.done=!0,p.errors.length?p.callback(p.errors):p.callback())}),this.emit("loaded",h),this.queue=this.queue.filter(function(p){return!p.done})}},{key:"read",value:function(i,a,s){var u=this,c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,f=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,h=arguments.length>5?arguments[5]:void 0;if(!i.length)return h(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:i,ns:a,fcName:s,tried:c,wait:f,callback:h});return}this.readingCalls++;var p=function(w,x){if(u.readingCalls--,u.waitingReads.length>0){var _=u.waitingReads.shift();u.read(_.lng,_.ns,_.fcName,_.tried,_.wait,_.callback)}if(w&&x&&c2&&arguments[2]!==void 0?arguments[2]:{},c=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."),c&&c();typeof i=="string"&&(i=this.languageUtils.toResolveHierarchy(i)),typeof a=="string"&&(a=[a]);var f=this.queueLoad(i,a,u,c);if(!f.toLoad.length)return f.pending.length||c(),null;f.toLoad.forEach(function(h){s.loadOne(h)})}},{key:"load",value:function(i,a,s){this.prepareLoading(i,a,{},s)}},{key:"reload",value:function(i,a,s){this.prepareLoading(i,a,{reload:!0},s)}},{key:"loadOne",value:function(i){var a=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",u=i.split("|"),c=u[0],f=u[1];this.read(c,f,"read",void 0,void 0,function(h,p){h&&a.logger.warn("".concat(s,"loading namespace ").concat(f," for language ").concat(c," failed"),h),!h&&p&&a.logger.log("".concat(s,"loaded namespace ").concat(f," for language ").concat(c),p),a.loaded(i,h,p)})}},{key:"saveMissing",value:function(i,a,s,u,c){var f=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},h=arguments.length>6&&arguments[6]!==void 0?arguments[6]:function(){};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(a)){this.logger.warn('did not save key "'.concat(s,'" as the namespace "').concat(a,'" 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(!(s==null||s==="")){if(this.backend&&this.backend.create){var p=Hw(Hw({},f),{},{isUpdate:c}),g=this.backend.create.bind(this.backend);if(g.length<6)try{var y;g.length===5?y=g(i,a,s,u,p):y=g(i,a,s,u),y&&typeof y.then=="function"?y.then(function(v){return h(null,v)}).catch(h):h(null,y)}catch(v){h(v)}else g(i,a,s,u,h,p)}!i||!i[0]||this.store.addResource(i[0],a,s,u)}}}]),n}(Aa);function Vw(){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(e){var n={};if(gr(e[1])==="object"&&(n=e[1]),typeof e[1]=="string"&&(n.defaultValue=e[1]),typeof e[2]=="string"&&(n.tDescription=e[2]),gr(e[2])==="object"||gr(e[3])==="object"){var r=e[3]||e[2];Object.keys(r).forEach(function(i){n[i]=r[i]})}return n},interpolation:{escapeValue:!0,format:function(e,n,r,i){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function qw(t){return typeof t.ns=="string"&&(t.ns=[t.ns]),typeof t.fallbackLng=="string"&&(t.fallbackLng=[t.fallbackLng]),typeof t.fallbackNS=="string"&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t}function Kw(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Qr(t){for(var e=1;e"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 Rf(){}function g4(t){var e=Object.getOwnPropertyNames(Object.getPrototypeOf(t));e.forEach(function(n){typeof t[n]=="function"&&(t[n]=t[n].bind(t))})}var ih=function(t){Xh(n,t);var e=h4(n);function n(){var r,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;if(Sr(this,n),r=e.call(this),Qh&&Aa.call(Ea(r)),r.options=qw(i),r.services={},r.logger=ii,r.modules={external:[]},g4(Ea(r)),a&&!r.isInitialized&&!i.isClone){if(!r.options.initImmediate)return r.init(i,a),Ju(r,Ea(r));setTimeout(function(){r.init(i,a)},0)}return r}return _r(n,[{key:"init",value:function(){var i=this,a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=arguments.length>1?arguments[1]:void 0;typeof a=="function"&&(s=a,a={}),!a.defaultNS&&a.defaultNS!==!1&&a.ns&&(typeof a.ns=="string"?a.defaultNS=a.ns:a.ns.indexOf("translation")<0&&(a.defaultNS=a.ns[0]));var u=Vw();this.options=Qr(Qr(Qr({},u),this.options),qw(a)),this.options.compatibilityAPI!=="v1"&&(this.options.interpolation=Qr(Qr({},u.interpolation),this.options.interpolation)),a.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=a.keySeparator),a.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=a.nsSeparator);function c(_){return _?typeof _=="function"?new _:_:null}if(!this.options.isClone){this.modules.logger?ii.init(c(this.modules.logger),this.options):ii.init(null,this.options);var f;this.modules.formatter?f=this.modules.formatter:typeof Intl<"u"&&(f=l4);var h=new zw(this.options);this.store=new J5(this.options.resources,this.options);var p=this.services;p.logger=ii,p.resourceStore=this.store,p.languageUtils=h,p.pluralResolver=new a4(h,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),f&&(!this.options.interpolation.format||this.options.interpolation.format===u.interpolation.format)&&(p.formatter=c(f),p.formatter.init(p,this.options),this.options.interpolation.format=p.formatter.format.bind(p.formatter)),p.interpolator=new o4(this.options),p.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},p.backendConnector=new d4(c(this.modules.backend),p.resourceStore,p,this.options),p.backendConnector.on("*",function(_){for(var S=arguments.length,C=new Array(S>1?S-1:0),O=1;O1?S-1:0),O=1;O0&&g[0]!=="dev"&&(this.options.lng=g[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined");var y=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];y.forEach(function(_){i[_]=function(){var S;return(S=i.store)[_].apply(S,arguments)}});var v=["addResource","addResources","addResourceBundle","removeResourceBundle"];v.forEach(function(_){i[_]=function(){var S;return(S=i.store)[_].apply(S,arguments),i}});var w=Bl(),x=function(){var S=function(O,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),w.resolve(I),s(O,I)};if(i.languages&&i.options.compatibilityAPI!=="v1"&&!i.isInitialized)return S(null,i.t.bind(i));i.changeLanguage(i.options.lng,S)};return this.options.resources||!this.options.initImmediate?x():setTimeout(x,0),w}},{key:"loadResources",value:function(i){var a=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Rf,u=s,c=typeof i=="string"?i:this.language;if(typeof i=="function"&&(u=i),!this.options.resources||this.options.partialBundledLanguages){if(c&&c.toLowerCase()==="cimode")return u();var f=[],h=function(y){if(y){var v=a.services.languageUtils.toResolveHierarchy(y);v.forEach(function(w){f.indexOf(w)<0&&f.push(w)})}};if(c)h(c);else{var p=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);p.forEach(function(g){return h(g)})}this.options.preload&&this.options.preload.forEach(function(g){return h(g)}),this.services.backendConnector.load(f,this.options.ns,function(g){!g&&!a.resolvedLanguage&&a.language&&a.setResolvedLanguage(a.language),u(g)})}else u(null)}},{key:"reloadResources",value:function(i,a,s){var u=Bl();return i||(i=this.languages),a||(a=this.options.ns),s||(s=Rf),this.services.backendConnector.reload(i,a,function(c){u.resolve(),s(c)}),u}},{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"&&fk.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 a=0;a-1)&&this.store.hasLanguageSomeTranslations(s)){this.resolvedLanguage=s;break}}}},{key:"changeLanguage",value:function(i,a){var s=this;this.isLanguageChangingTo=i;var u=Bl();this.emit("languageChanging",i);var c=function(g){s.language=g,s.languages=s.services.languageUtils.toResolveHierarchy(g),s.resolvedLanguage=void 0,s.setResolvedLanguage(g)},f=function(g,y){y?(c(y),s.translator.changeLanguage(y),s.isLanguageChangingTo=void 0,s.emit("languageChanged",y),s.logger.log("languageChanged",y)):s.isLanguageChangingTo=void 0,u.resolve(function(){return s.t.apply(s,arguments)}),a&&a(g,function(){return s.t.apply(s,arguments)})},h=function(g){!i&&!g&&s.services.languageDetector&&(g=[]);var y=typeof g=="string"?g:s.services.languageUtils.getBestMatchFromCodes(g);y&&(s.language||c(y),s.translator.language||s.translator.changeLanguage(y),s.services.languageDetector&&s.services.languageDetector.cacheUserLanguage&&s.services.languageDetector.cacheUserLanguage(y)),s.loadResources(y,function(v){f(v,y)})};return!i&&this.services.languageDetector&&!this.services.languageDetector.async?h(this.services.languageDetector.detect()):!i&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(h):this.services.languageDetector.detect(h):h(i),u}},{key:"getFixedT",value:function(i,a,s){var u=this,c=function f(h,p){var g;if(gr(p)!=="object"){for(var y=arguments.length,v=new Array(y>2?y-2:0),w=2;w1&&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 u=this.resolvedLanguage||this.languages[0],c=this.options?this.options.fallbackLng:!1,f=this.languages[this.languages.length-1];if(u.toLowerCase()==="cimode")return!0;var h=function(y,v){var w=a.services.backendConnector.state["".concat(y,"|").concat(v)];return w===-1||w===2};if(s.precheck){var p=s.precheck(this,h);if(p!==void 0)return p}return!!(this.hasResourceBundle(u,i)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||h(u,i)&&(!c||h(f,i)))}},{key:"loadNamespaces",value:function(i,a){var s=this,u=Bl();return this.options.ns?(typeof i=="string"&&(i=[i]),i.forEach(function(c){s.options.ns.indexOf(c)<0&&s.options.ns.push(c)}),this.loadResources(function(c){u.resolve(),a&&a(c)}),u):(a&&a(),Promise.resolve())}},{key:"loadLanguages",value:function(i,a){var s=Bl();typeof i=="string"&&(i=[i]);var u=this.options.preload||[],c=i.filter(function(f){return u.indexOf(f)<0});return c.length?(this.options.preload=u.concat(c),this.loadResources(function(f){s.resolve(),a&&a(f)}),s):(a&&a(),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 a=["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"],s=this.services&&this.services.languageUtils||new zw(Vw());return a.indexOf(s.getLanguagePartFromCode(i))>-1||i.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var i=this,a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Rf,u=Qr(Qr(Qr({},this.options),a),{isClone:!0}),c=new n(u);(a.debug!==void 0||a.prefix!==void 0)&&(c.logger=c.logger.clone(a));var f=["store","services","language"];return f.forEach(function(h){c[h]=i[h]}),c.services=Qr({},this.services),c.services.utils={hasLoadedNamespace:c.hasLoadedNamespace.bind(c)},c.translator=new $w(c.services,c.options),c.translator.on("*",function(h){for(var p=arguments.length,g=new Array(p>1?p-1:0),y=1;y0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;return new ih(t,e)});var Ae=ih.createInstance();Ae.createInstance=ih.createInstance;Ae.createInstance;Ae.dir;Ae.init;Ae.loadResources;Ae.reloadResources;Ae.use;Ae.changeLanguage;Ae.getFixedT;Ae.t;Ae.exists;Ae.setDefaultNamespace;Ae.hasLoadedNamespace;Ae.loadNamespaces;Ae.loadLanguages;var dk=[],m4=dk.forEach,v4=dk.slice;function y4(t){return m4.call(v4.call(arguments,1),function(e){if(e)for(var n in e)t[n]===void 0&&(t[n]=e[n])}),t}var Yw=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,S4=function(e,n,r){var i=r||{};i.path=i.path||"/";var a=encodeURIComponent(n),s="".concat(e,"=").concat(a);if(i.maxAge>0){var u=i.maxAge-0;if(Number.isNaN(u))throw new Error("maxAge should be a Number");s+="; Max-Age=".concat(Math.floor(u))}if(i.domain){if(!Yw.test(i.domain))throw new TypeError("option domain is invalid");s+="; Domain=".concat(i.domain)}if(i.path){if(!Yw.test(i.path))throw new TypeError("option path is invalid");s+="; Path=".concat(i.path)}if(i.expires){if(typeof i.expires.toUTCString!="function")throw new TypeError("option expires is invalid");s+="; Expires=".concat(i.expires.toUTCString())}if(i.httpOnly&&(s+="; HttpOnly"),i.secure&&(s+="; Secure"),i.sameSite){var c=typeof i.sameSite=="string"?i.sameSite.toLowerCase():i.sameSite;switch(c){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return s},Xw={create:function(e,n,r,i){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};r&&(a.expires=new Date,a.expires.setTime(a.expires.getTime()+r*60*1e3)),i&&(a.domain=i),document.cookie=S4(e,encodeURIComponent(n),a)},read:function(e){for(var n="".concat(e,"="),r=document.cookie.split(";"),i=0;i-1&&(r=window.location.hash.substring(window.location.hash.indexOf("?")));for(var i=r.substring(1),a=i.split("&"),s=0;s0){var c=a[s].substring(0,u);c===e.lookupQuerystring&&(n=a[s].substring(u+1))}}}return n}},Fl=null,Qw=function(){if(Fl!==null)return Fl;try{Fl=window!=="undefined"&&window.localStorage!==null;var e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{Fl=!1}return Fl},b4={name:"localStorage",lookup:function(e){var n;if(e.lookupLocalStorage&&Qw()){var r=window.localStorage.getItem(e.lookupLocalStorage);r&&(n=r)}return n},cacheUserLanguage:function(e,n){n.lookupLocalStorage&&Qw()&&window.localStorage.setItem(n.lookupLocalStorage,e)}},$l=null,Jw=function(){if($l!==null)return $l;try{$l=window!=="undefined"&&window.sessionStorage!==null;var e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{$l=!1}return $l},C4={name:"sessionStorage",lookup:function(e){var n;if(e.lookupSessionStorage&&Jw()){var r=window.sessionStorage.getItem(e.lookupSessionStorage);r&&(n=r)}return n},cacheUserLanguage:function(e,n){n.lookupSessionStorage&&Jw()&&window.sessionStorage.setItem(n.lookupSessionStorage,e)}},x4={name:"navigator",lookup:function(e){var n=[];if(typeof navigator<"u"){if(navigator.languages)for(var r=0;r0?n:void 0}},k4={name:"htmlTag",lookup:function(e){var n,r=e.htmlTag||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},P4={name:"path",lookup:function(e){var n;if(typeof window<"u"){var r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(r instanceof Array)if(typeof e.lookupFromPathIndex=="number"){if(typeof r[e.lookupFromPathIndex]!="string")return;n=r[e.lookupFromPathIndex].replace("/","")}else n=r[0].replace("/","")}return n}},E4={name:"subdomain",lookup:function(e){var n=typeof e.lookupFromSubdomainIndex=="number"?e.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 O4(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"]}}var hk=function(){function t(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Sr(this,t),this.type="languageDetector",this.detectors={},this.init(e,n)}return _r(t,[{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=y4(r,this.options||{},O4()),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=i,this.addDetector(_4),this.addDetector(w4),this.addDetector(b4),this.addDetector(C4),this.addDetector(x4),this.addDetector(k4),this.addDetector(P4),this.addDetector(E4)}},{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(a){if(r.detectors[a]){var s=r.detectors[a].lookup(r.options);s&&typeof s=="string"&&(s=[s]),s&&(i=i.concat(s))}}),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(a){i.detectors[a]&&i.detectors[a].cacheUserLanguage(n,i.options)}))}}]),t}();hk.type="languageDetector";function Wv(t){return Wv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Wv(t)}var pk=[],T4=pk.forEach,R4=pk.slice;function Hv(t){return T4.call(R4.call(arguments,1),function(e){if(e)for(var n in e)t[n]===void 0&&(t[n]=e[n])}),t}function gk(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":Wv(XMLHttpRequest))==="object"}function A4(t){return!!t&&typeof t.then=="function"}function I4(t){return A4(t)?t:Promise.resolve(t)}function L4(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var $u={},M4={get exports(){return $u},set exports(t){$u=t}},gu={},D4={get exports(){return gu},set exports(t){gu=t}},Zw;function N4(){return Zw||(Zw=1,function(t,e){var n=typeof self<"u"?self:yn,r=function(){function a(){this.fetch=!1,this.DOMException=n.DOMException}return a.prototype=n,new a}();(function(a){(function(s){var u={searchParams:"URLSearchParams"in a,iterable:"Symbol"in a&&"iterator"in Symbol,blob:"FileReader"in a&&"Blob"in a&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in a,arrayBuffer:"ArrayBuffer"in a};function c(T){return T&&DataView.prototype.isPrototypeOf(T)}if(u.arrayBuffer)var f=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],h=ArrayBuffer.isView||function(T){return T&&f.indexOf(Object.prototype.toString.call(T))>-1};function p(T){if(typeof T!="string"&&(T=String(T)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(T))throw new TypeError("Invalid character in header field name");return T.toLowerCase()}function g(T){return typeof T!="string"&&(T=String(T)),T}function y(T){var $={next:function(){var V=T.shift();return{done:V===void 0,value:V}}};return u.iterable&&($[Symbol.iterator]=function(){return $}),$}function v(T){this.map={},T instanceof v?T.forEach(function($,V){this.append(V,$)},this):Array.isArray(T)?T.forEach(function($){this.append($[0],$[1])},this):T&&Object.getOwnPropertyNames(T).forEach(function($){this.append($,T[$])},this)}v.prototype.append=function(T,$){T=p(T),$=g($);var V=this.map[T];this.map[T]=V?V+", "+$:$},v.prototype.delete=function(T){delete this.map[p(T)]},v.prototype.get=function(T){return T=p(T),this.has(T)?this.map[T]:null},v.prototype.has=function(T){return this.map.hasOwnProperty(p(T))},v.prototype.set=function(T,$){this.map[p(T)]=g($)},v.prototype.forEach=function(T,$){for(var V in this.map)this.map.hasOwnProperty(V)&&T.call($,this.map[V],V,this)},v.prototype.keys=function(){var T=[];return this.forEach(function($,V){T.push(V)}),y(T)},v.prototype.values=function(){var T=[];return this.forEach(function($){T.push($)}),y(T)},v.prototype.entries=function(){var T=[];return this.forEach(function($,V){T.push([V,$])}),y(T)},u.iterable&&(v.prototype[Symbol.iterator]=v.prototype.entries);function w(T){if(T.bodyUsed)return Promise.reject(new TypeError("Already read"));T.bodyUsed=!0}function x(T){return new Promise(function($,V){T.onload=function(){$(T.result)},T.onerror=function(){V(T.error)}})}function _(T){var $=new FileReader,V=x($);return $.readAsArrayBuffer(T),V}function S(T){var $=new FileReader,V=x($);return $.readAsText(T),V}function C(T){for(var $=new Uint8Array(T),V=new Array($.length),ie=0;ie<$.length;ie++)V[ie]=String.fromCharCode($[ie]);return V.join("")}function O(T){if(T.slice)return T.slice(0);var $=new Uint8Array(T.byteLength);return $.set(new Uint8Array(T)),$.buffer}function I(){return this.bodyUsed=!1,this._initBody=function(T){this._bodyInit=T,T?typeof T=="string"?this._bodyText=T:u.blob&&Blob.prototype.isPrototypeOf(T)?this._bodyBlob=T:u.formData&&FormData.prototype.isPrototypeOf(T)?this._bodyFormData=T:u.searchParams&&URLSearchParams.prototype.isPrototypeOf(T)?this._bodyText=T.toString():u.arrayBuffer&&u.blob&&c(T)?(this._bodyArrayBuffer=O(T.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):u.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(T)||h(T))?this._bodyArrayBuffer=O(T):this._bodyText=T=Object.prototype.toString.call(T):this._bodyText="",this.headers.get("content-type")||(typeof T=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):u.searchParams&&URLSearchParams.prototype.isPrototypeOf(T)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},u.blob&&(this.blob=function(){var T=w(this);if(T)return T;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?w(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(_)}),this.text=function(){var T=w(this);if(T)return T;if(this._bodyBlob)return S(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(C(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},u.formData&&(this.formData=function(){return this.text().then(X)}),this.json=function(){return this.text().then(JSON.parse)},this}var L=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function D(T){var $=T.toUpperCase();return L.indexOf($)>-1?$:T}function U(T,$){$=$||{};var V=$.body;if(T instanceof U){if(T.bodyUsed)throw new TypeError("Already read");this.url=T.url,this.credentials=T.credentials,$.headers||(this.headers=new v(T.headers)),this.method=T.method,this.mode=T.mode,this.signal=T.signal,!V&&T._bodyInit!=null&&(V=T._bodyInit,T.bodyUsed=!0)}else this.url=String(T);if(this.credentials=$.credentials||this.credentials||"same-origin",($.headers||!this.headers)&&(this.headers=new v($.headers)),this.method=D($.method||this.method||"GET"),this.mode=$.mode||this.mode||null,this.signal=$.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&V)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(V)}U.prototype.clone=function(){return new U(this,{body:this._bodyInit})};function X(T){var $=new FormData;return T.trim().split("&").forEach(function(V){if(V){var ie=V.split("="),W=ie.shift().replace(/\+/g," "),Y=ie.join("=").replace(/\+/g," ");$.append(decodeURIComponent(W),decodeURIComponent(Y))}}),$}function K(T){var $=new v,V=T.replace(/\r?\n[\t ]+/g," ");return V.split(/\r?\n/).forEach(function(ie){var W=ie.split(":"),Y=W.shift().trim();if(Y){var Q=W.join(":").trim();$.append(Y,Q)}}),$}I.call(U.prototype);function te(T,$){$||($={}),this.type="default",this.status=$.status===void 0?200:$.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in $?$.statusText:"OK",this.headers=new v($.headers),this.url=$.url||"",this._initBody(T)}I.call(te.prototype),te.prototype.clone=function(){return new te(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new v(this.headers),url:this.url})},te.error=function(){var T=new te(null,{status:0,statusText:""});return T.type="error",T};var ce=[301,302,303,307,308];te.redirect=function(T,$){if(ce.indexOf($)===-1)throw new RangeError("Invalid status code");return new te(null,{status:$,headers:{location:T}})},s.DOMException=a.DOMException;try{new s.DOMException}catch{s.DOMException=function($,V){this.message=$,this.name=V;var ie=Error($);this.stack=ie.stack},s.DOMException.prototype=Object.create(Error.prototype),s.DOMException.prototype.constructor=s.DOMException}function j(T,$){return new Promise(function(V,ie){var W=new U(T,$);if(W.signal&&W.signal.aborted)return ie(new s.DOMException("Aborted","AbortError"));var Y=new XMLHttpRequest;function Q(){Y.abort()}Y.onload=function(){var oe={status:Y.status,statusText:Y.statusText,headers:K(Y.getAllResponseHeaders()||"")};oe.url="responseURL"in Y?Y.responseURL:oe.headers.get("X-Request-URL");var ve="response"in Y?Y.response:Y.responseText;V(new te(ve,oe))},Y.onerror=function(){ie(new TypeError("Network request failed"))},Y.ontimeout=function(){ie(new TypeError("Network request failed"))},Y.onabort=function(){ie(new s.DOMException("Aborted","AbortError"))},Y.open(W.method,W.url,!0),W.credentials==="include"?Y.withCredentials=!0:W.credentials==="omit"&&(Y.withCredentials=!1),"responseType"in Y&&u.blob&&(Y.responseType="blob"),W.headers.forEach(function(oe,ve){Y.setRequestHeader(ve,oe)}),W.signal&&(W.signal.addEventListener("abort",Q),Y.onreadystatechange=function(){Y.readyState===4&&W.signal.removeEventListener("abort",Q)}),Y.send(typeof W._bodyInit>"u"?null:W._bodyInit)})}return j.polyfill=!0,a.fetch||(a.fetch=j,a.Headers=v,a.Request=U,a.Response=te),s.Headers=v,s.Request=U,s.Response=te,s.fetch=j,Object.defineProperty(s,"__esModule",{value:!0}),s})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=r;e=i.fetch,e.default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,t.exports=e}(D4,gu)),gu}(function(t,e){var n;if(typeof fetch=="function"&&(typeof yn<"u"&&yn.fetch?n=yn.fetch:typeof window<"u"&&window.fetch?n=window.fetch:n=fetch),typeof L4<"u"&&(typeof window>"u"||typeof window.document>"u")){var r=n||N4();r.default&&(r=r.default),e.default=r,t.exports=e.default}})(M4,$u);const mk=$u,eb=h2({__proto__:null,default:mk},[$u]);function ah(t){return ah=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ah(t)}var Fi;typeof fetch=="function"&&(typeof global<"u"&&global.fetch?Fi=global.fetch:typeof window<"u"&&window.fetch?Fi=window.fetch:Fi=fetch);var zu;gk()&&(typeof global<"u"&&global.XMLHttpRequest?zu=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&(zu=window.XMLHttpRequest));var oh;typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?oh=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(oh=window.ActiveXObject));!Fi&&eb&&!zu&&!oh&&(Fi=mk||eb);typeof Fi!="function"&&(Fi=void 0);var Vv=function(e,n){if(n&&ah(n)==="object"){var r="";for(var i in n)r+="&"+encodeURIComponent(i)+"="+encodeURIComponent(n[i]);if(!r)return e;e=e+(e.indexOf("?")!==-1?"&":"?")+r.slice(1)}return e},tb=function(e,n,r){Fi(e,n).then(function(i){if(!i.ok)return r(i.statusText||"Error",{status:i.status});i.text().then(function(a){r(null,{status:i.status,data:a})}).catch(r)}).catch(r)},nb=!1,B4=function(e,n,r,i){e.queryStringParams&&(n=Vv(n,e.queryStringParams));var a=Hv({},typeof e.customHeaders=="function"?e.customHeaders():e.customHeaders);r&&(a["Content-Type"]="application/json");var s=typeof e.requestOptions=="function"?e.requestOptions(r):e.requestOptions,u=Hv({method:r?"POST":"GET",body:r?e.stringify(r):void 0,headers:a},nb?{}:s);try{tb(n,u,i)}catch(c){if(!s||Object.keys(s).length===0||!c.message||c.message.indexOf("not implemented")<0)return i(c);try{Object.keys(s).forEach(function(f){delete u[f]}),tb(n,u,i),nb=!0}catch(f){i(f)}}},F4=function(e,n,r,i){r&&ah(r)==="object"&&(r=Vv("",r).slice(1)),e.queryStringParams&&(n=Vv(n,e.queryStringParams));try{var a;zu?a=new zu:a=new oh("MSXML2.XMLHTTP.3.0"),a.open(r?"POST":"GET",n,1),e.crossDomain||a.setRequestHeader("X-Requested-With","XMLHttpRequest"),a.withCredentials=!!e.withCredentials,r&&a.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),a.overrideMimeType&&a.overrideMimeType("application/json");var s=e.customHeaders;if(s=typeof s=="function"?s():s,s)for(var u in s)a.setRequestHeader(u,s[u]);a.onreadystatechange=function(){a.readyState>3&&i(a.status>=400?a.statusText:null,{status:a.status,data:a.responseText})},a.send(r)}catch(c){console&&console.log(c)}},$4=function(e,n,r,i){if(typeof r=="function"&&(i=r,r=void 0),i=i||function(){},Fi&&n.indexOf("file:")!==0)return B4(e,n,r,i);if(gk()||typeof ActiveXObject=="function")return F4(e,n,r,i);i(new Error("No fetch and no xhr implementation found!"))};function Gu(t){return Gu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Gu(t)}function z4(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function rb(t,e){for(var n=0;n1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};z4(this,t),this.services=e,this.options=n,this.allOptions=r,this.type="backend",this.init(e,n,r)}return G4(t,[{key:"init",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=n,this.options=Hv(i,this.options||{},W4()),this.allOptions=a,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,a,s){var u=this,c=this.options.loadPath;typeof this.options.loadPath=="function"&&(c=this.options.loadPath(n,i)),c=I4(c),c.then(function(f){if(!f)return s(null,{});var h=u.services.interpolator.interpolate(f,{lng:n.join("+"),ns:i.join("+")});u.loadUrl(h,s,r,a)})}},{key:"loadUrl",value:function(n,r,i,a){var s=this;this.options.request(this.options,n,void 0,function(u,c){if(c&&(c.status>=500&&c.status<600||!c.status))return r("failed loading "+n+"; status code: "+c.status,!0);if(c&&c.status>=400&&c.status<500)return r("failed loading "+n+"; status code: "+c.status,!1);if(!c&&u&&u.message&&u.message.indexOf("Failed to fetch")>-1)return r("failed loading "+n+": "+u.message,!0);if(u)return r(u,!1);var f,h;try{typeof c.data=="string"?f=s.options.parse(c.data,i,a):f=c.data}catch{h="failed parsing "+n+" to json"}if(h)return r(h,!1);r(null,f)})}},{key:"create",value:function(n,r,i,a,s){var u=this;if(this.options.addPath){typeof n=="string"&&(n=[n]);var c=this.options.parsePayload(r,i,a),f=0,h=[],p=[];n.forEach(function(g){var y=u.options.addPath;typeof u.options.addPath=="function"&&(y=u.options.addPath(g,r));var v=u.services.interpolator.interpolate(y,{lng:g,ns:r});u.options.request(u.options,v,c,function(w,x){f+=1,h.push(w),p.push(x),f===n.length&&typeof s=="function"&&s(h,p)})})}}},{key:"reload",value:function(){var n=this,r=this.services,i=r.backendConnector,a=r.languageUtils,s=r.logger,u=i.language;if(!(u&&u.toLowerCase()==="cimode")){var c=[],f=function(p){var g=a.toResolveHierarchy(p);g.forEach(function(y){c.indexOf(y)<0&&c.push(y)})};f(u),this.allOptions.preload&&this.allOptions.preload.forEach(function(h){return f(h)}),c.forEach(function(h){n.allOptions.ns.forEach(function(p){i.read(h,p,"read",null,null,function(g,y){g&&s.warn("loading namespace ".concat(p," for language ").concat(h," failed"),g),!g&&y&&s.log("loaded namespace ".concat(p," for language ").concat(h),y),i.loaded("".concat(h,"|").concat(p),g,y)})})})}}}]),t}();yk.type="backend";function H4(){if(console&&console.warn){for(var t,e=arguments.length,n=new Array(e),r=0;r2&&arguments[2]!==void 0?arguments[2]:{},r=e.languages[0],i=e.options?e.options.fallbackLng:!1,a=e.languages[e.languages.length-1];if(r.toLowerCase()==="cimode")return!0;var s=function(c,f){var h=e.services.backendConnector.state["".concat(c,"|").concat(f)];return h===-1||h===2};return n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&e.services.backendConnector.backend&&e.isLanguageChangingTo&&!s(e.isLanguageChangingTo,t)?!1:!!(e.hasResourceBundle(r,t)||!e.services.backendConnector.backend||e.options.resources&&!e.options.partialBundledLanguages||s(r,t)&&(!i||s(a,t)))}function q4(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!e.languages||!e.languages.length)return qv("i18n.languages were undefined or empty",e.languages),!0;var r=e.options.ignoreJSONStructure!==void 0;return r?e.hasLoadedNamespace(t,{precheck:function(a,s){if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&a.services.backendConnector.backend&&a.isLanguageChangingTo&&!s(a.isLanguageChangingTo,t))return!1}}):V4(t,e,n)}var K4=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Y4={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},X4=function(e){return Y4[e]},Q4=function(e){return e.replace(K4,X4)};function ob(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function sb(t){for(var e=1;e0&&arguments[0]!==void 0?arguments[0]:{};Kv=sb(sb({},Kv),t)}function Z4(){return Kv}var Sk;function eB(t){Sk=t}function tB(){return Sk}var nB={type:"3rdParty",init:function(e){J4(e.options.react),eB(e)}},rB=be.createContext(),iB=function(){function t(){Sr(this,t),this.usedNamespaces={}}return _r(t,[{key:"addUsedNamespaces",value:function(n){var r=this;n.forEach(function(i){r.usedNamespaces[i]||(r.usedNamespaces[i]=!0)})}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}]),t}();function aB(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,a,s,u=[],c=!0,f=!1;try{if(a=(n=n.call(t)).next,e===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(u.push(r.value),u.length!==e);c=!0);}catch(h){f=!0,i=h}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(f)throw i}}return u}}function oB(t,e){return ok(t)||aB(t,e)||sk(t,e)||lk()}function lb(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function km(t){for(var e=1;e1&&arguments[1]!==void 0?arguments[1]:{},n=e.i18n,r=be.useContext(rB)||{},i=r.i18n,a=r.defaultNS,s=n||i||tB();if(s&&!s.reportNamespaces&&(s.reportNamespaces=new iB),!s){qv("You will need to pass in an i18next instance by using initReactI18next");var u=function(X,K){return typeof K=="string"?K:K&&gr(K)==="object"&&typeof K.defaultValue=="string"?K.defaultValue:Array.isArray(X)?X[X.length-1]:X},c=[u,{},!1];return c.t=u,c.i18n={},c.ready=!1,c}s.options.react&&s.options.react.wait!==void 0&&qv("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var f=km(km(km({},Z4()),s.options.react),e),h=f.useSuspense,p=f.keyPrefix,g=t||a||s.options&&s.options.defaultNS;g=typeof g=="string"?[g]:g||["translation"],s.reportNamespaces.addUsedNamespaces&&s.reportNamespaces.addUsedNamespaces(g);var y=(s.isInitialized||s.initializedStoreOnce)&&g.every(function(U){return q4(U,s,f)});function v(){return s.getFixedT(null,f.nsMode==="fallback"?g:g[0],p)}var w=be.useState(v),x=oB(w,2),_=x[0],S=x[1],C=g.join(),O=sB(C),I=be.useRef(!0);be.useEffect(function(){var U=f.bindI18n,X=f.bindI18nStore;I.current=!0,!y&&!h&&ab(s,g,function(){I.current&&S(v)}),y&&O&&O!==C&&I.current&&S(v);function K(){I.current&&S(v)}return U&&s&&s.on(U,K),X&&s&&s.store.on(X,K),function(){I.current=!1,U&&s&&U.split(" ").forEach(function(te){return s.off(te,K)}),X&&s&&X.split(" ").forEach(function(te){return s.store.off(te,K)})}},[s,C]);var L=be.useRef(!0);be.useEffect(function(){I.current&&!L.current&&S(v),L.current=!1},[s,p]);var D=[_,s,y];if(D.t=_,D.i18n=s,D.ready=y,y||!y&&!h)return D;throw new Promise(function(U){ab(s,g,function(){U()})})}Ae.use(yk).use(hk).use(nB).init({fallbackLng:"en",debug:!1,backend:{loadPath:"/locales/{{lng}}.json"},interpolation:{escapeValue:!1},returnNull:!1});const uB={isConnected:!1,isProcessing:!1,log:[],shouldShowLogViewer:!1,shouldDisplayInProgressType:"latents",shouldDisplayGuides:!0,isGFPGANAvailable:!0,isESRGANAvailable:!0,socketId:"",shouldConfirmOnDelete:!0,openAccordions:[0],currentStep:0,totalSteps:0,currentIteration:0,totalIterations:0,currentStatus:Ae.isInitialized?Ae.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,cancelOptions:{cancelType:"immediate",cancelAfter:null}},_k=vo({name:"system",initialState:uB,reducers:{setShouldDisplayInProgressType:(t,e)=>{t.shouldDisplayInProgressType=e.payload},setIsProcessing:(t,e)=>{t.isProcessing=e.payload},setCurrentStatus:(t,e)=>{t.currentStatus=e.payload},setSystemStatus:(t,e)=>({...t,...e.payload}),errorOccurred:t=>{t.hasError=!0,t.isProcessing=!1,t.isCancelable=!0,t.currentStep=0,t.totalSteps=0,t.currentIteration=0,t.totalIterations=0,t.currentStatusHasSteps=!1,t.currentStatus=Ae.t("common.statusError"),t.wasErrorSeen=!1},errorSeen:t=>{t.hasError=!1,t.wasErrorSeen=!0,t.currentStatus=t.isConnected?Ae.t("common.statusConnected"):Ae.t("common.statusDisconnected")},addLogEntry:(t,e)=>{const{timestamp:n,message:r,level:i}=e.payload,s={timestamp:n,message:r,level:i||"info"};t.log.push(s)},setShouldShowLogViewer:(t,e)=>{t.shouldShowLogViewer=e.payload},setIsConnected:(t,e)=>{t.isConnected=e.payload,t.isProcessing=!1,t.isCancelable=!0,t.currentStep=0,t.totalSteps=0,t.currentIteration=0,t.totalIterations=0,t.currentStatusHasSteps=!1,t.hasError=!1},setSocketId:(t,e)=>{t.socketId=e.payload},setShouldConfirmOnDelete:(t,e)=>{t.shouldConfirmOnDelete=e.payload},setOpenAccordions:(t,e)=>{t.openAccordions=e.payload},setSystemConfig:(t,e)=>({...t,...e.payload}),setShouldDisplayGuides:(t,e)=>{t.shouldDisplayGuides=e.payload},processingCanceled:t=>{t.isProcessing=!1,t.isCancelable=!0,t.currentStep=0,t.totalSteps=0,t.currentIteration=0,t.totalIterations=0,t.currentStatusHasSteps=!1,t.currentStatus=Ae.t("common.statusProcessingCanceled")},generationRequested:t=>{t.isProcessing=!0,t.isCancelable=!0,t.currentStep=0,t.totalSteps=0,t.currentIteration=0,t.totalIterations=0,t.currentStatusHasSteps=!1,t.currentStatus=Ae.t("common.statusPreparing")},setModelList:(t,e)=>{t.model_list=e.payload},setIsCancelable:(t,e)=>{t.isCancelable=e.payload},modelChangeRequested:t=>{t.currentStatus=Ae.t("common.statusLoadingModel"),t.isCancelable=!1,t.isProcessing=!0,t.currentStatusHasSteps=!1},modelConvertRequested:t=>{t.currentStatus=Ae.t("common.statusConvertingModel"),t.isCancelable=!1,t.isProcessing=!0,t.currentStatusHasSteps=!1},modelMergingRequested:t=>{t.currentStatus=Ae.t("common.statusMergingModels"),t.isCancelable=!1,t.isProcessing=!0,t.currentStatusHasSteps=!1},setSaveIntermediatesInterval:(t,e)=>{t.saveIntermediatesInterval=e.payload},setEnableImageDebugging:(t,e)=>{t.enableImageDebugging=e.payload},addToast:(t,e)=>{t.toastQueue.push(e.payload)},clearToastQueue:t=>{t.toastQueue=[]},setProcessingIndeterminateTask:(t,e)=>{t.isProcessing=!0,t.currentStatus=e.payload,t.currentStatusHasSteps=!1},setSearchFolder:(t,e)=>{t.searchFolder=e.payload},setFoundModels:(t,e)=>{t.foundModels=e.payload},setOpenModel:(t,e)=>{t.openModel=e.payload},setCancelType:(t,e)=>{t.cancelOptions.cancelType=e.payload},setCancelAfter:(t,e)=>{t.cancelOptions.cancelAfter=e.payload}}}),{setShouldDisplayInProgressType:eW,setIsProcessing:ei,addLogEntry:Gt,setShouldShowLogViewer:tW,setIsConnected:ub,setSocketId:nW,setShouldConfirmOnDelete:rW,setOpenAccordions:iW,setSystemStatus:cB,setCurrentStatus:ns,setSystemConfig:fB,setShouldDisplayGuides:aW,processingCanceled:dB,errorOccurred:cb,errorSeen:oW,setModelList:rs,setIsCancelable:Af,modelChangeRequested:hB,modelConvertRequested:pB,modelMergingRequested:gB,setSaveIntermediatesInterval:sW,setEnableImageDebugging:lW,generationRequested:mB,addToast:zl,clearToastQueue:uW,setProcessingIndeterminateTask:cW,setSearchFolder:vB,setFoundModels:yB,setOpenModel:fW,setCancelType:dW,setCancelAfter:hW}=_k.actions,SB=_k.reducer,wk=["txt2img","img2img","unifiedCanvas","nodes","postprocessing","training"],_B={activeTab:0,currentTheme:"dark",parametersPanelScrollPosition:0,shouldPinParametersPanel:!0,shouldShowParametersPanel:!0,shouldShowImageDetails:!1,shouldUseCanvasBetaLayout:!1,shouldShowExistingModelsInSearch:!1,shouldUseSliders:!1,addNewModelUIOption:null,shouldPinGallery:!0,shouldShowGallery:!0,shouldHidePreview:!1},wB=_B,bk=vo({name:"ui",initialState:wB,reducers:{setActiveTab:(t,e)=>{typeof e.payload=="number"?t.activeTab=e.payload:t.activeTab=wk.indexOf(e.payload)},setCurrentTheme:(t,e)=>{t.currentTheme=e.payload},setParametersPanelScrollPosition:(t,e)=>{t.parametersPanelScrollPosition=e.payload},setShouldPinParametersPanel:(t,e)=>{t.shouldPinParametersPanel=e.payload,t.shouldShowParametersPanel=!0},setShouldShowParametersPanel:(t,e)=>{t.shouldShowParametersPanel=e.payload},setShouldShowImageDetails:(t,e)=>{t.shouldShowImageDetails=e.payload},setShouldUseCanvasBetaLayout:(t,e)=>{t.shouldUseCanvasBetaLayout=e.payload},setShouldHidePreview:(t,e)=>{t.shouldHidePreview=e.payload},setShouldShowExistingModelsInSearch:(t,e)=>{t.shouldShowExistingModelsInSearch=e.payload},setShouldUseSliders:(t,e)=>{t.shouldUseSliders=e.payload},setAddNewModelUIOption:(t,e)=>{t.addNewModelUIOption=e.payload},setShouldPinGallery:(t,e)=>{t.shouldPinGallery=e.payload},setShouldShowGallery:(t,e)=>{t.shouldShowGallery=e.payload},togglePinGalleryPanel:t=>{t.shouldPinGallery=!t.shouldPinGallery},togglePinParametersPanel:t=>{t.shouldPinParametersPanel=!t.shouldPinParametersPanel},toggleParametersPanel:t=>{t.shouldShowParametersPanel=!t.shouldShowParametersPanel},toggleGalleryPanel:t=>{t.shouldShowGallery=!t.shouldShowGallery},togglePanels:t=>{t.shouldShowGallery||t.shouldShowParametersPanel?(t.shouldShowGallery=!1,t.shouldShowParametersPanel=!1):(t.shouldShowGallery=!0,t.shouldShowParametersPanel=!0)}}}),{setActiveTab:pW,setCurrentTheme:gW,setParametersPanelScrollPosition:mW,setShouldPinParametersPanel:vW,setShouldShowParametersPanel:yW,setShouldShowImageDetails:SW,setShouldUseCanvasBetaLayout:_W,setShouldShowExistingModelsInSearch:wW,setShouldUseSliders:bW,setAddNewModelUIOption:CW,setShouldHidePreview:xW,setShouldPinGallery:kW,setShouldShowGallery:PW,togglePanels:EW,togglePinGalleryPanel:OW,togglePinParametersPanel:TW,toggleParametersPanel:RW,toggleGalleryPanel:AW}=bk.actions,bB=bk.reducer,di=Object.create(null);di.open="0";di.close="1";di.ping="2";di.pong="3";di.message="4";di.upgrade="5";di.noop="6";const hd=Object.create(null);Object.keys(di).forEach(t=>{hd[di[t]]=t});const CB={type:"error",data:"parser error"},xB=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",kB=typeof ArrayBuffer=="function",PB=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,Ck=({type:t,data:e},n,r)=>xB&&e instanceof Blob?n?r(e):fb(e,r):kB&&(e instanceof ArrayBuffer||PB(e))?n?r(e):fb(new Blob([e]),r):r(di[t]+(e||"")),fb=(t,e)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];e("b"+(r||""))},n.readAsDataURL(t)},db="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",eu=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t{let e=t.length*.75,n=t.length,r,i=0,a,s,u,c;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);const f=new ArrayBuffer(e),h=new Uint8Array(f);for(r=0;r>4,h[i++]=(s&15)<<4|u>>2,h[i++]=(u&3)<<6|c&63;return f},OB=typeof ArrayBuffer=="function",xk=(t,e)=>{if(typeof t!="string")return{type:"message",data:kk(t,e)};const n=t.charAt(0);return n==="b"?{type:"message",data:TB(t.substring(1),e)}:hd[n]?t.length>1?{type:hd[n],data:t.substring(1)}:{type:hd[n]}:CB},TB=(t,e)=>{if(OB){const n=EB(t);return kk(n,e)}else return{base64:!0,data:t}},kk=(t,e)=>{switch(e){case"blob":return t instanceof ArrayBuffer?new Blob([t]):t;case"arraybuffer":default:return t}},Pk=String.fromCharCode(30),RB=(t,e)=>{const n=t.length,r=new Array(n);let i=0;t.forEach((a,s)=>{Ck(a,!1,u=>{r[s]=u,++i===n&&e(r.join(Pk))})})},AB=(t,e)=>{const n=t.split(Pk),r=[];for(let i=0;itypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function Ok(t,...e){return e.reduce((n,r)=>(t.hasOwnProperty(r)&&(n[r]=t[r]),n),{})}const LB=fr.setTimeout,MB=fr.clearTimeout;function Jh(t,e){e.useNativeTimers?(t.setTimeoutFn=LB.bind(fr),t.clearTimeoutFn=MB.bind(fr)):(t.setTimeoutFn=fr.setTimeout.bind(fr),t.clearTimeoutFn=fr.clearTimeout.bind(fr))}const DB=1.33;function NB(t){return typeof t=="string"?BB(t):Math.ceil((t.byteLength||t.size)*DB)}function BB(t){let e=0,n=0;for(let r=0,i=t.length;r=57344?n+=3:(r++,n+=4);return n}class FB extends Error{constructor(e,n,r){super(e),this.description=n,this.context=r,this.type="TransportError"}}class Tk extends Rt{constructor(e){super(),this.writable=!1,Jh(this,e),this.opts=e,this.query=e.query,this.socket=e.socket}onError(e,n,r){return super.emitReserved("error",new FB(e,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const n=xk(e,this.socket.binaryType);this.onPacket(n)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}}const Rk="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),Yv=64,$B={};let hb=0,If=0,pb;function gb(t){let e="";do e=Rk[t%Yv]+e,t=Math.floor(t/Yv);while(t>0);return e}function Ak(){const t=gb(+new Date);return t!==pb?(hb=0,pb=t):t+"."+gb(hb++)}for(;If{this.readyState="paused",e()};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(e){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)};AB(e,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,RB(e,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let e=this.query||{};const n=this.opts.secure?"https":"http";let r="";this.opts.timestampRequests!==!1&&(e[this.opts.timestampParam]=Ak()),!this.supportsBinary&&!e.sid&&(e.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=Ik(e),a=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(a?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}request(e={}){return Object.assign(e,{xd:this.xd,xs:this.xs},this.opts),new ui(this.uri(),e)}doWrite(e,n){const r=this.request({method:"POST",data:e});r.on("success",n),r.on("error",(i,a)=>{this.onError("xhr post error",i,a)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=e}}class ui extends Rt{constructor(e,n){super(),Jh(this,n),this.opts=n,this.method=n.method||"GET",this.uri=e,this.async=n.async!==!1,this.data=n.data!==void 0?n.data:null,this.create()}create(){const e=Ok(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");e.xdomain=!!this.opts.xd,e.xscheme=!!this.opts.xs;const n=this.xhr=new Mk(e);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=ui.requestsCount++,ui.requests[this.index]=this)}onError(e){this.emitReserved("error",e,this.xhr),this.cleanup(!0)}cleanup(e){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=UB,e)try{this.xhr.abort()}catch{}typeof document<"u"&&delete ui.requests[this.index],this.xhr=null}}onLoad(){const e=this.xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}ui.requestsCount=0;ui.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",mb);else if(typeof addEventListener=="function"){const t="onpagehide"in fr?"pagehide":"unload";addEventListener(t,mb,!1)}}function mb(){for(let t in ui.requests)ui.requests.hasOwnProperty(t)&&ui.requests[t].abort()}const Dk=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,n)=>n(e,0))(),Lf=fr.WebSocket||fr.MozWebSocket,vb=!0,HB="arraybuffer",yb=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class VB extends Tk{constructor(e){super(e),this.supportsBinary=!e.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const e=this.uri(),n=this.opts.protocols,r=yb?{}:Ok(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=vb&&!yb?n?new Lf(e,n):new Lf(e):new Lf(e,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType||HB,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let n=0;n{const s={};try{vb&&this.ws.send(a)}catch{}i&&Dk(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){let e=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&&(e[this.opts.timestampParam]=Ak()),this.supportsBinary||(e.b64=1);const i=Ik(e),a=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(a?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}check(){return!!Lf}}const qB={websocket:VB,polling:WB},KB=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,YB=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Xv(t){const e=t,n=t.indexOf("["),r=t.indexOf("]");n!=-1&&r!=-1&&(t=t.substring(0,n)+t.substring(n,r).replace(/:/g,";")+t.substring(r,t.length));let i=KB.exec(t||""),a={},s=14;for(;s--;)a[YB[s]]=i[s]||"";return n!=-1&&r!=-1&&(a.source=e,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=XB(a,a.path),a.queryKey=QB(a,a.query),a}function XB(t,e){const n=/\/{2,9}/g,r=e.replace(n,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&r.splice(0,1),e.slice(-1)=="/"&&r.splice(r.length-1,1),r}function QB(t,e){const n={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,a){i&&(n[i]=a)}),n}let Nk=class os extends Rt{constructor(e,n={}){super(),this.writeBuffer=[],e&&typeof e=="object"&&(n=e,e=null),e?(e=Xv(e),n.hostname=e.host,n.secure=e.protocol==="https"||e.protocol==="wss",n.port=e.port,e.query&&(n.query=e.query)):n.host&&(n.hostname=Xv(n.host).host),Jh(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.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=zB(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(e){const n=Object.assign({},this.opts.query);n.EIO=Ek,n.transport=e,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts.transportOptions[e],this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new qB[e](r)}open(){let e;if(this.opts.rememberUpgrade&&os.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)e="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else e=this.transports[0];this.readyState="opening";try{e=this.createTransport(e)}catch{this.transports.shift(),this.open();return}e.open(),this.setTransport(e)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.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(e){let n=this.createTransport(e),r=!1;os.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",p=>{if(!r)if(p.type==="pong"&&p.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;os.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(h(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const g=new Error("probe error");g.transport=n.name,this.emitReserved("upgradeError",g)}}))};function a(){r||(r=!0,h(),n.close(),n=null)}const s=p=>{const g=new Error("probe error: "+p);g.transport=n.name,a(),this.emitReserved("upgradeError",g)};function u(){s("transport closed")}function c(){s("socket closed")}function f(p){n&&p.name!==n.name&&a()}const h=()=>{n.removeListener("open",i),n.removeListener("error",s),n.removeListener("close",u),this.off("close",c),this.off("upgrading",f)};n.once("open",i),n.once("error",s),n.once("close",u),this.once("close",c),this.once("upgrading",f),n.open()}onOpen(){if(this.readyState="open",os.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){let e=0;const n=this.upgrades.length;for(;e{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 e=this.getWritablePackets();this.transport.send(e),this.prevBufferLen=e.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(e,n,r){return this.sendPacket("message",e,n,r),this}send(e,n,r){return this.sendPacket("message",e,n,r),this}sendPacket(e,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 a={type:e,data:n,options:r};this.emitReserved("packetCreate",a),this.writeBuffer.push(a),i&&this.once("flush",i),this.flush()}close(){const e=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),e()},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():e()}):this.upgrading?r():e()),this}onError(e){os.priorWebsocketSuccess=!1,this.emitReserved("error",e),this.onClose("transport error",e)}onClose(e,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",e,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(e){const n=[];let r=0;const i=e.length;for(;rtypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,Bk=Object.prototype.toString,tF=typeof Blob=="function"||typeof Blob<"u"&&Bk.call(Blob)==="[object BlobConstructor]",nF=typeof File=="function"||typeof File<"u"&&Bk.call(File)==="[object FileConstructor]";function T0(t){return ZB&&(t instanceof ArrayBuffer||eF(t))||tF&&t instanceof Blob||nF&&t instanceof File}function pd(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let n=0,r=t.length;n=0&&t.num0;case Be.ACK:case Be.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class sF{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const n=iF(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const lF=Object.freeze(Object.defineProperty({__proto__:null,Decoder:R0,Encoder:oF,get PacketType(){return Be},protocol:aF},Symbol.toStringTag,{value:"Module"}));function Dr(t,e,n){return t.on(e,n),function(){t.off(e,n)}}const uF=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Fk extends Rt{constructor(e,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[Dr(e,"open",this.onopen.bind(this)),Dr(e,"packet",this.onpacket.bind(this)),Dr(e,"error",this.onerror.bind(this)),Dr(e,"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(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...n){if(uF.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(n.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const r={type:Be.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const s=this.ids++,u=n.pop();this._registerAckCallback(s,u),r.id=s}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(e,n){var r;const i=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(i===void 0){this.acks[e]=n;return}const a=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let s=0;s{this.io.clearTimeoutFn(a),n.apply(this,[null,...s])}}emitWithAck(e,...n){const r=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((i,a)=>{n.push((s,u)=>r?s?a(s):i(u):i(s)),this.emit(e,...n)})}_addToQueue(e){let n;typeof e[e.length-1]=="function"&&(n=e.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((i,...a)=>r!==this._queue[0]?void 0:(i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...a)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!e||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:Be.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,n)}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case Be.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):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 Be.EVENT:case Be.BINARY_EVENT:this.onevent(e);break;case Be.ACK:case Be.BINARY_ACK:this.onack(e);break;case Be.DISCONNECT:this.ondisconnect();break;case Be.CONNECT_ERROR:this.destroy();const r=new Error(e.data.message);r.data=e.data.data,this.emitReserved("connect_error",r);break}}onevent(e){const n=e.data||[];e.id!=null&&n.push(this.ack(e.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:Be.ACK,id:e,data:i}))}}onack(e){const n=this.acks[e.id];typeof n=="function"&&(n.apply(this,e.data),delete this.acks[e.id])}onconnect(e,n){this.id=e,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Be.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const n=this._anyListeners;for(let r=0;r0&&t.jitter<=1?t.jitter:0,this.attempts=0}Vs.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=Math.floor(e*10)&1?t+n:t-n}return Math.min(t,this.max)|0};Vs.prototype.reset=function(){this.attempts=0};Vs.prototype.setMin=function(t){this.ms=t};Vs.prototype.setMax=function(t){this.max=t};Vs.prototype.setJitter=function(t){this.jitter=t};class Zv extends Rt{constructor(e,n){var r;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(n=e,e=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Jh(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 Vs({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=e;const i=n.parser||lF;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var n;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(n=this.backoff)===null||n===void 0||n.setMin(e),this)}randomizationFactor(e){var n;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(n=this.backoff)===null||n===void 0||n.setJitter(e),this)}reconnectionDelayMax(e){var n;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(n=this.backoff)===null||n===void 0||n.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new Nk(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=Dr(n,"open",function(){r.onopen(),e&&e()}),a=Dr(n,"error",s=>{r.cleanup(),r._readyState="closed",this.emitReserved("error",s),e?e(s):r.maybeReconnectOnOpen()});if(this._timeout!==!1){const s=this._timeout;s===0&&i();const u=this.setTimeoutFn(()=>{i(),n.close(),n.emit("error",new Error("timeout"))},s);this.opts.autoUnref&&u.unref(),this.subs.push(function(){clearTimeout(u)})}return this.subs.push(i),this.subs.push(a),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(Dr(e,"ping",this.onping.bind(this)),Dr(e,"data",this.ondata.bind(this)),Dr(e,"error",this.onerror.bind(this)),Dr(e,"close",this.onclose.bind(this)),Dr(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(n){this.onclose("parse error",n)}}ondecoded(e){Dk(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,n){let r=this.nsps[e];return r?this._autoConnect&&!r.active&&r.connect():(r=new Fk(this,e,n),this.nsps[e]=r),r}_destroy(e){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(e){const n=this.encoder.encode(e);for(let r=0;re()),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(e,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=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(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(i=>{i?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",i)):e.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(function(){clearTimeout(r)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const Gl={};function gd(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};const n=JB(t,e.path||"/socket.io"),r=n.source,i=n.id,a=n.path,s=Gl[i]&&a in Gl[i].nsps,u=e.forceNew||e["force new connection"]||e.multiplex===!1||s;let c;return u?c=new Zv(r,e):(Gl[i]||(Gl[i]=new Zv(r,e)),c=Gl[i]),n.query&&!e.query&&(e.query=n.queryKey),c.socket(n.path,e)}Object.assign(gd,{Manager:Zv,Socket:Fk,io:gd,connect:gd});const IW=["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"],LW=["ddim","plms","k_lms","dpmpp_2","k_dpm_2","k_dpm_2_a","k_dpmpp_2","k_euler","k_euler_a","k_heun"],MW=Array.from(Array(65)).map((t,e)=>e*64),DW=Array.from(Array(65)).map((t,e)=>e*64),NW=[{key:"2x",value:2},{key:"4x",value:4}],cF=0,fF=4294967295,BW=["gfpgan","codeformer"],FW=[{key:"None",value:"none"},{key:"Fast",value:"latents"},{key:"Accurate",value:"full-res"}];var dF=Math.PI/180;function hF(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const Os=typeof global<"u"?global:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},pe={_global:Os,version:"8.4.2",isBrowser:hF(),isUnminified:/param/.test(function(t){}.toString()),dblClickWindow:400,getAngle(t){return pe.angleDeg?t*dF:t},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 pe.DD.isDragging},isDragReady(){return!!pe.DD.node},releaseCanvasOnDestroy:!0,document:Os.document,_injectGlobal(t){Os.Konva=t}},yt=t=>{pe[t.prototype.getClassName()]=t};pe._injectGlobal(pe);class Wn{constructor(e=[1,0,0,1,0,0]){this.dirty=!1,this.m=e&&e.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 Wn(this.m)}copyInto(e){e.m[0]=this.m[0],e.m[1]=this.m[1],e.m[2]=this.m[2],e.m[3]=this.m[3],e.m[4]=this.m[4],e.m[5]=this.m[5]}point(e){var n=this.m;return{x:n[0]*e.x+n[2]*e.y+n[4],y:n[1]*e.x+n[3]*e.y+n[5]}}translate(e,n){return this.m[4]+=this.m[0]*e+this.m[2]*n,this.m[5]+=this.m[1]*e+this.m[3]*n,this}scale(e,n){return this.m[0]*=e,this.m[1]*=e,this.m[2]*=n,this.m[3]*=n,this}rotate(e){var n=Math.cos(e),r=Math.sin(e),i=this.m[0]*n+this.m[2]*r,a=this.m[1]*n+this.m[3]*r,s=this.m[0]*-r+this.m[2]*n,u=this.m[1]*-r+this.m[3]*n;return this.m[0]=i,this.m[1]=a,this.m[2]=s,this.m[3]=u,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(e,n){var r=this.m[0]+this.m[2]*n,i=this.m[1]+this.m[3]*n,a=this.m[2]+this.m[0]*e,s=this.m[3]+this.m[1]*e;return this.m[0]=r,this.m[1]=i,this.m[2]=a,this.m[3]=s,this}multiply(e){var n=this.m[0]*e.m[0]+this.m[2]*e.m[1],r=this.m[1]*e.m[0]+this.m[3]*e.m[1],i=this.m[0]*e.m[2]+this.m[2]*e.m[3],a=this.m[1]*e.m[2]+this.m[3]*e.m[3],s=this.m[0]*e.m[4]+this.m[2]*e.m[5]+this.m[4],u=this.m[1]*e.m[4]+this.m[3]*e.m[5]+this.m[5];return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=a,this.m[4]=s,this.m[5]=u,this}invert(){var e=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),n=this.m[3]*e,r=-this.m[1]*e,i=-this.m[2]*e,a=this.m[0]*e,s=e*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),u=e*(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]=a,this.m[4]=s,this.m[5]=u,this}getMatrix(){return this.m}decompose(){var e=this.m[0],n=this.m[1],r=this.m[2],i=this.m[3],a=this.m[4],s=this.m[5],u=e*i-n*r;let c={x:a,y:s,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(e!=0||n!=0){var f=Math.sqrt(e*e+n*n);c.rotation=n>0?Math.acos(e/f):-Math.acos(e/f),c.scaleX=f,c.scaleY=u/f,c.skewX=(e*r+n*i)/u,c.skewY=0}else if(r!=0||i!=0){var h=Math.sqrt(r*r+i*i);c.rotation=Math.PI/2-(i>0?Math.acos(-r/h):-Math.acos(r/h)),c.scaleX=u/h,c.scaleY=h,c.skewX=0,c.skewY=(e*r+n*i)/u}return c.rotation=G._getRotation(c.rotation),c}}var pF="[object Array]",gF="[object Number]",mF="[object String]",vF="[object Boolean]",yF=Math.PI/180,SF=180/Math.PI,Pm="#",_F="",wF="0",bF="Konva warning: ",Sb="Konva error: ",CF="rgb(",Em={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]},xF=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,Mf=[];const kF=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(t){setTimeout(t,60)},G={_isElement(t){return!!(t&&t.nodeType==1)},_isFunction(t){return!!(t&&t.constructor&&t.call&&t.apply)},_isPlainObject(t){return!!t&&t.constructor===Object},_isArray(t){return Object.prototype.toString.call(t)===pF},_isNumber(t){return Object.prototype.toString.call(t)===gF&&!isNaN(t)&&isFinite(t)},_isString(t){return Object.prototype.toString.call(t)===mF},_isBoolean(t){return Object.prototype.toString.call(t)===vF},isObject(t){return t instanceof Object},isValidSelector(t){if(typeof t!="string")return!1;var e=t[0];return e==="#"||e==="."||e===e.toUpperCase()},_sign(t){return t===0||t>0?1:-1},requestAnimFrame(t){Mf.push(t),Mf.length===1&&kF(function(){const e=Mf;Mf=[],e.forEach(function(n){n()})})},createCanvasElement(){var t=document.createElement("canvas");try{t.style=t.style||{}}catch{}return t},createImageElement(){return document.createElement("img")},_isInDocument(t){for(;t=t.parentNode;)if(t==document)return!0;return!1},_urlToImage(t,e){var n=G.createImageElement();n.onload=function(){e(n)},n.src=t},_rgbToHex(t,e,n){return((1<<24)+(t<<16)+(e<<8)+n).toString(16).slice(1)},_hexToRgb(t){t=t.replace(Pm,_F);var e=parseInt(t,16);return{r:e>>16&255,g:e>>8&255,b:e&255}},getRandomColor(){for(var t=(Math.random()*16777215<<0).toString(16);t.length<6;)t=wF+t;return Pm+t},getRGB(t){var e;return t in Em?(e=Em[t],{r:e[0],g:e[1],b:e[2]}):t[0]===Pm?this._hexToRgb(t.substring(1)):t.substr(0,4)===CF?(e=xF.exec(t.replace(/ /g,"")),{r:parseInt(e[1],10),g:parseInt(e[2],10),b:parseInt(e[3],10)}):{r:0,g:0,b:0}},colorToRGBA(t){return t=t||"black",G._namedColorToRBA(t)||G._hex3ColorToRGBA(t)||G._hex4ColorToRGBA(t)||G._hex6ColorToRGBA(t)||G._hex8ColorToRGBA(t)||G._rgbColorToRGBA(t)||G._rgbaColorToRGBA(t)||G._hslColorToRGBA(t)},_namedColorToRBA(t){var e=Em[t.toLowerCase()];return e?{r:e[0],g:e[1],b:e[2],a:1}:null},_rgbColorToRGBA(t){if(t.indexOf("rgb(")===0){t=t.match(/rgb\(([^)]+)\)/)[1];var e=t.split(/ *, */).map(Number);return{r:e[0],g:e[1],b:e[2],a:1}}},_rgbaColorToRGBA(t){if(t.indexOf("rgba(")===0){t=t.match(/rgba\(([^)]+)\)/)[1];var e=t.split(/ *, */).map((n,r)=>n.slice(-1)==="%"?r===3?parseInt(n)/100:parseInt(n)/100*255:Number(n));return{r:e[0],g:e[1],b:e[2],a:e[3]}}},_hex8ColorToRGBA(t){if(t[0]==="#"&&t.length===9)return{r:parseInt(t.slice(1,3),16),g:parseInt(t.slice(3,5),16),b:parseInt(t.slice(5,7),16),a:parseInt(t.slice(7,9),16)/255}},_hex6ColorToRGBA(t){if(t[0]==="#"&&t.length===7)return{r:parseInt(t.slice(1,3),16),g:parseInt(t.slice(3,5),16),b:parseInt(t.slice(5,7),16),a:1}},_hex4ColorToRGBA(t){if(t[0]==="#"&&t.length===5)return{r:parseInt(t[1]+t[1],16),g:parseInt(t[2]+t[2],16),b:parseInt(t[3]+t[3],16),a:parseInt(t[4]+t[4],16)/255}},_hex3ColorToRGBA(t){if(t[0]==="#"&&t.length===4)return{r:parseInt(t[1]+t[1],16),g:parseInt(t[2]+t[2],16),b:parseInt(t[3]+t[3],16),a:1}},_hslColorToRGBA(t){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(t)){const[e,...n]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(t),r=Number(n[0])/360,i=Number(n[1])/100,a=Number(n[2])/100;let s,u,c;if(i===0)return c=a*255,{r:Math.round(c),g:Math.round(c),b:Math.round(c),a:1};a<.5?s=a*(1+i):s=a+i-a*i;const f=2*a-s,h=[0,0,0];for(let p=0;p<3;p++)u=r+1/3*-(p-1),u<0&&u++,u>1&&u--,6*u<1?c=f+(s-f)*6*u:2*u<1?c=s:3*u<2?c=f+(s-f)*(2/3-u)*6:c=f,h[p]=c*255;return{r:Math.round(h[0]),g:Math.round(h[1]),b:Math.round(h[2]),a:1}}},haveIntersection(t,e){return!(e.x>t.x+t.width||e.x+e.widtht.y+t.height||e.y+e.height1?(s=n,u=r,c=(n-i)*(n-i)+(r-a)*(r-a)):(s=t+h*(n-t),u=e+h*(r-e),c=(s-i)*(s-i)+(u-a)*(u-a))}return[s,u,c]},_getProjectionToLine(t,e,n){var r=G.cloneObject(t),i=Number.MAX_VALUE;return e.forEach(function(a,s){if(!(!n&&s===e.length-1)){var u=e[(s+1)%e.length],c=G._getProjectionToSegment(a.x,a.y,u.x,u.y,t.x,t.y),f=c[0],h=c[1],p=c[2];pe.length){var s=e;e=t,t=s}for(r=0;r{e.width=0,e.height=0})},drawRoundedRectPath(t,e,n,r){let i=0,a=0,s=0,u=0;typeof r=="number"?i=a=s=u=Math.min(r,e/2,n/2):(i=Math.min(r[0]||0,e/2,n/2),a=Math.min(r[1]||0,e/2,n/2),u=Math.min(r[2]||0,e/2,n/2),s=Math.min(r[3]||0,e/2,n/2)),t.moveTo(i,0),t.lineTo(e-a,0),t.arc(e-a,a,a,Math.PI*3/2,0,!1),t.lineTo(e,n-u),t.arc(e-u,n-u,u,0,Math.PI/2,!1),t.lineTo(s,n),t.arc(s,n-s,s,Math.PI/2,Math.PI,!1),t.lineTo(0,i),t.arc(i,i,i,Math.PI,Math.PI*3/2,!1)}};function Da(t){return G._isString(t)?'"'+t+'"':Object.prototype.toString.call(t)==="[object Number]"||G._isBoolean(t)?t:Object.prototype.toString.call(t)}function $k(t){return t>255?255:t<0?0:Math.round(t)}function le(){if(pe.isUnminified)return function(t,e){return G._isNumber(t)||G.warn(Da(t)+' is a not valid value for "'+e+'" attribute. The value should be a number.'),t}}function A0(t){if(pe.isUnminified)return function(e,n){let r=G._isNumber(e),i=G._isArray(e)&&e.length==t;return!r&&!i&&G.warn(Da(e)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array('+t+")"),e}}function I0(){if(pe.isUnminified)return function(t,e){var n=G._isNumber(t),r=t==="auto";return n||r||G.warn(Da(t)+' is a not valid value for "'+e+'" attribute. The value should be a number or "auto".'),t}}function qs(){if(pe.isUnminified)return function(t,e){return G._isString(t)||G.warn(Da(t)+' is a not valid value for "'+e+'" attribute. The value should be a string.'),t}}function zk(){if(pe.isUnminified)return function(t,e){const n=G._isString(t),r=Object.prototype.toString.call(t)==="[object CanvasGradient]"||t&&t.addColorStop;return n||r||G.warn(Da(t)+' is a not valid value for "'+e+'" attribute. The value should be a string or a native gradient.'),t}}function PF(){if(pe.isUnminified)return function(t,e){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&t instanceof n||(G._isArray(t)?t.forEach(function(r){G._isNumber(r)||G.warn('"'+e+'" attribute has non numeric element '+r+". Make sure that all elements are numbers.")}):G.warn(Da(t)+' is a not valid value for "'+e+'" attribute. The value should be a array of numbers.')),t}}function jr(){if(pe.isUnminified)return function(t,e){var n=t===!0||t===!1;return n||G.warn(Da(t)+' is a not valid value for "'+e+'" attribute. The value should be a boolean.'),t}}function EF(t){if(pe.isUnminified)return function(e,n){return e==null||G.isObject(e)||G.warn(Da(e)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+t),e}}var Ul="get",jl="set";const A={addGetterSetter(t,e,n,r,i){A.addGetter(t,e,n),A.addSetter(t,e,r,i),A.addOverloadedGetterSetter(t,e)},addGetter(t,e,n){var r=Ul+G._capitalize(e);t.prototype[r]=t.prototype[r]||function(){var i=this.attrs[e];return i===void 0?n:i}},addSetter(t,e,n,r){var i=jl+G._capitalize(e);t.prototype[i]||A.overWriteSetter(t,e,n,r)},overWriteSetter(t,e,n,r){var i=jl+G._capitalize(e);t.prototype[i]=function(a){return n&&a!==void 0&&a!==null&&(a=n.call(this,a,e)),this._setAttr(e,a),r&&r.call(this),this}},addComponentsGetterSetter(t,e,n,r,i){var a=n.length,s=G._capitalize,u=Ul+s(e),c=jl+s(e),f,h;t.prototype[u]=function(){var g={};for(f=0;f{this._setAttr(e+s(w),void 0)}),this._fireChangeEvent(e,y,g),i&&i.call(this),this},A.addOverloadedGetterSetter(t,e)},addOverloadedGetterSetter(t,e){var n=G._capitalize(e),r=jl+n,i=Ul+n;t.prototype[e]=function(){return arguments.length?(this[r](arguments[0]),this):this[i]()}},addDeprecatedGetterSetter(t,e,n,r){G.error("Adding deprecated "+e);var i=Ul+G._capitalize(e),a=e+" property is deprecated and will be removed soon. Look at Konva change log for more information.";t.prototype[i]=function(){G.error(a);var s=this.attrs[e];return s===void 0?n:s},A.addSetter(t,e,r,function(){G.error(a)}),A.addOverloadedGetterSetter(t,e)},backCompat(t,e){G.each(e,function(n,r){var i=t.prototype[r],a=Ul+G._capitalize(n),s=jl+G._capitalize(n);function u(){i.apply(this,arguments),G.error('"'+n+'" method is deprecated and will be removed soon. Use ""'+r+'" instead.')}t.prototype[n]=u,t.prototype[a]=u,t.prototype[s]=u})},afterSetFilter(){this._filterUpToDate=!1}};function OF(t){var e=[],n=t.length,r=G,i,a;for(i=0;itypeof h=="number"?Math.floor(h):h)),a+=TF+f.join(_b)+RF)):(a+=u.property,e||(a+=DF+u.val)),a+=LF;return a}clearTrace(){this.traceArr=[]}_trace(e){var n=this.traceArr,r;n.push(e),r=n.length,r>=BF&&n.shift()}reset(){var e=this.getCanvas().getPixelRatio();this.setTransform(1*e,0,0,1*e,0,0)}getCanvas(){return this.canvas}clear(e){var n=this.getCanvas();e?this.clearRect(e.x||0,e.y||0,e.width||0,e.height||0):this.clearRect(0,0,n.getWidth()/n.pixelRatio,n.getHeight()/n.pixelRatio)}_applyLineCap(e){var n=e.getLineCap();n&&this.setAttr("lineCap",n)}_applyOpacity(e){var n=e.getAbsoluteOpacity();n!==1&&this.setAttr("globalAlpha",n)}_applyLineJoin(e){var n=e.attrs.lineJoin;n&&this.setAttr("lineJoin",n)}setAttr(e,n){this._context[e]=n}arc(e,n,r,i,a,s){this._context.arc(e,n,r,i,a,s)}arcTo(e,n,r,i,a){this._context.arcTo(e,n,r,i,a)}beginPath(){this._context.beginPath()}bezierCurveTo(e,n,r,i,a,s){this._context.bezierCurveTo(e,n,r,i,a,s)}clearRect(e,n,r,i){this._context.clearRect(e,n,r,i)}clip(){this._context.clip()}closePath(){this._context.closePath()}createImageData(e,n){var r=arguments;if(r.length===2)return this._context.createImageData(e,n);if(r.length===1)return this._context.createImageData(e)}createLinearGradient(e,n,r,i){return this._context.createLinearGradient(e,n,r,i)}createPattern(e,n){return this._context.createPattern(e,n)}createRadialGradient(e,n,r,i,a,s){return this._context.createRadialGradient(e,n,r,i,a,s)}drawImage(e,n,r,i,a,s,u,c,f){var h=arguments,p=this._context;h.length===3?p.drawImage(e,n,r):h.length===5?p.drawImage(e,n,r,i,a):h.length===9&&p.drawImage(e,n,r,i,a,s,u,c,f)}ellipse(e,n,r,i,a,s,u,c){this._context.ellipse(e,n,r,i,a,s,u,c)}isPointInPath(e,n,r,i){return r?this._context.isPointInPath(r,e,n,i):this._context.isPointInPath(e,n,i)}fill(e){e?this._context.fill(e):this._context.fill()}fillRect(e,n,r,i){this._context.fillRect(e,n,r,i)}strokeRect(e,n,r,i){this._context.strokeRect(e,n,r,i)}fillText(e,n,r,i){i?this._context.fillText(e,n,r,i):this._context.fillText(e,n,r)}measureText(e){return this._context.measureText(e)}getImageData(e,n,r,i){return this._context.getImageData(e,n,r,i)}lineTo(e,n){this._context.lineTo(e,n)}moveTo(e,n){this._context.moveTo(e,n)}rect(e,n,r,i){this._context.rect(e,n,r,i)}putImageData(e,n,r){this._context.putImageData(e,n,r)}quadraticCurveTo(e,n,r,i){this._context.quadraticCurveTo(e,n,r,i)}restore(){this._context.restore()}rotate(e){this._context.rotate(e)}save(){this._context.save()}scale(e,n){this._context.scale(e,n)}setLineDash(e){this._context.setLineDash?this._context.setLineDash(e):"mozDash"in this._context?this._context.mozDash=e:"webkitLineDash"in this._context&&(this._context.webkitLineDash=e)}getLineDash(){return this._context.getLineDash()}setTransform(e,n,r,i,a,s){this._context.setTransform(e,n,r,i,a,s)}stroke(e){e?this._context.stroke(e):this._context.stroke()}strokeText(e,n,r,i){this._context.strokeText(e,n,r,i)}transform(e,n,r,i,a,s){this._context.transform(e,n,r,i,a,s)}translate(e,n){this._context.translate(e,n)}_enableTrace(){var e=this,n=wb.length,r=this.setAttr,i,a,s=function(u){var c=e[u],f;e[u]=function(){return a=OF(Array.prototype.slice.call(arguments,0)),f=c.apply(e,arguments),e._trace({method:u,args:a}),f}};for(i=0;i{e.dragStatus==="dragging"&&(t=!0)}),t},justDragged:!1,get node(){var t;return Ge._dragElements.forEach(e=>{t=e.node}),t},_dragElements:new Map,_drag(t){const e=[];Ge._dragElements.forEach((n,r)=>{const{node:i}=n,a=i.getStage();a.setPointersPositions(t),n.pointerId===void 0&&(n.pointerId=G._getFirstPointerId(t));const s=a._changedPointerPositions.find(f=>f.id===n.pointerId);if(s){if(n.dragStatus!=="dragging"){var u=i.dragDistance(),c=Math.max(Math.abs(s.x-n.startPointerPos.x),Math.abs(s.y-n.startPointerPos.y));if(c{n.fire("dragmove",{type:"dragmove",target:n,evt:t},!0)})},_endDragBefore(t){const e=[];Ge._dragElements.forEach(n=>{const{node:r}=n,i=r.getStage();if(t&&i.setPointersPositions(t),!i._changedPointerPositions.find(u=>u.id===n.pointerId))return;(n.dragStatus==="dragging"||n.dragStatus==="stopped")&&(Ge.justDragged=!0,pe._mouseListenClick=!1,pe._touchListenClick=!1,pe._pointerListenClick=!1,n.dragStatus="stopped");const s=n.node.getLayer()||n.node instanceof pe.Stage&&n.node;s&&e.indexOf(s)===-1&&e.push(s)}),e.forEach(n=>{n.draw()})},_endDragAfter(t){Ge._dragElements.forEach((e,n)=>{e.dragStatus==="stopped"&&e.node.fire("dragend",{type:"dragend",target:e.node,evt:t},!0),e.dragStatus!=="dragging"&&Ge._dragElements.delete(n)})}};pe.isBrowser&&(window.addEventListener("mouseup",Ge._endDragBefore,!0),window.addEventListener("touchend",Ge._endDragBefore,!0),window.addEventListener("mousemove",Ge._drag),window.addEventListener("touchmove",Ge._drag),window.addEventListener("mouseup",Ge._endDragAfter,!1),window.addEventListener("touchend",Ge._endDragAfter,!1));var md="absoluteOpacity",Nf="allEventListeners",Ii="absoluteTransform",bb="absoluteScale",Xa="canvas",GF="Change",UF="children",jF="konva",ey="listening",Cb="mouseenter",xb="mouseleave",kb="set",Pb="Shape",vd=" ",Eb="stage",ua="transform",WF="Stage",ty="visible",HF=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(vd);let VF=1;class se{constructor(e){this._id=VF++,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(e),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(e){(e===ua||e===Ii)&&this._cache.get(e)?this._cache.get(e).dirty=!0:e?this._cache.delete(e):this._cache.clear()}_getCache(e,n){var r=this._cache.get(e),i=e===ua||e===Ii,a=r===void 0||i&&r.dirty===!0;return a&&(r=n.call(this),this._cache.set(e,r)),r}_calculate(e,n,r){if(!this._attachedDepsListeners.get(e)){const i=n.map(a=>a+"Change.konva").join(vd);this.on(i,()=>{this._clearCache(e)}),this._attachedDepsListeners.set(e,!0)}return this._getCache(e,r)}_getCanvasCache(){return this._cache.get(Xa)}_clearSelfAndDescendantCache(e){this._clearCache(e),e===Ii&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(Xa)){const{scene:e,filter:n,hit:r}=this._cache.get(Xa);G.releaseCanvas(e,n,r),this._cache.delete(Xa)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(e){var n=e||{},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),a=Math.ceil(n.height||r.height),s=n.pixelRatio,u=n.x===void 0?Math.floor(r.x):n.x,c=n.y===void 0?Math.floor(r.y):n.y,f=n.offset||0,h=n.drawBorder||!1,p=n.hitCanvasPixelRatio||1;if(!i||!a){G.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}i+=f*2+1,a+=f*2+1,u-=f,c-=f;var g=new Ts({pixelRatio:s,width:i,height:a}),y=new Ts({pixelRatio:s,width:0,height:0}),v=new L0({pixelRatio:p,width:i,height:a}),w=g.getContext(),x=v.getContext();return v.isCache=!0,g.isCache=!0,this._cache.delete(Xa),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(g.getContext()._context.imageSmoothingEnabled=!1,y.getContext()._context.imageSmoothingEnabled=!1),w.save(),x.save(),w.translate(-u,-c),x.translate(-u,-c),this._isUnderCache=!0,this._clearSelfAndDescendantCache(md),this._clearSelfAndDescendantCache(bb),this.drawScene(g,this),this.drawHit(v,this),this._isUnderCache=!1,w.restore(),x.restore(),h&&(w.save(),w.beginPath(),w.rect(0,0,i,a),w.closePath(),w.setAttr("strokeStyle","red"),w.setAttr("lineWidth",5),w.stroke(),w.restore()),this._cache.set(Xa,{scene:g,filter:y,hit:v,x:u,y:c}),this._requestDraw(),this}isCached(){return this._cache.has(Xa)}getClientRect(e){throw new Error('abstract "getClientRect" method call')}_transformedRect(e,n){var r=[{x:e.x,y:e.y},{x:e.x+e.width,y:e.y},{x:e.x+e.width,y:e.y+e.height},{x:e.x,y:e.y+e.height}],i,a,s,u,c=this.getAbsoluteTransform(n);return r.forEach(function(f){var h=c.point(f);i===void 0&&(i=s=h.x,a=u=h.y),i=Math.min(i,h.x),a=Math.min(a,h.y),s=Math.max(s,h.x),u=Math.max(u,h.y)}),{x:i,y:a,width:s-i,height:u-a}}_drawCachedSceneCanvas(e){e.save(),e._applyOpacity(this),e._applyGlobalCompositeOperation(this);const n=this._getCanvasCache();e.translate(n.x,n.y);var r=this._getCachedSceneCanvas(),i=r.pixelRatio;e.drawImage(r._canvas,0,0,r.width/i,r.height/i),e.restore()}_drawCachedHitCanvas(e){var n=this._getCanvasCache(),r=n.hit;e.save(),e.translate(n.x,n.y),e.drawImage(r._canvas,0,0,r.width/r.pixelRatio,r.height/r.pixelRatio),e.restore()}_getCachedSceneCanvas(){var e=this.filters(),n=this._getCanvasCache(),r=n.scene,i=n.filter,a=i.getContext(),s,u,c,f;if(e){if(!this._filterUpToDate){var h=r.pixelRatio;i.setSize(r.width/r.pixelRatio,r.height/r.pixelRatio);try{for(s=e.length,a.clear(),a.drawImage(r._canvas,0,0,r.getWidth()/h,r.getHeight()/h),u=a.getImageData(0,0,i.getWidth(),i.getHeight()),c=0;c{var n,r;if(!e)return this;for(n in e)n!==UF&&(r=kb+G._capitalize(n),G._isFunction(this[r])?this[r](e[n]):this._setAttr(n,e[n]))}),this}isListening(){return this._getCache(ey,this._isListening)}_isListening(e){if(!this.listening())return!1;const r=this.getParent();return r&&r!==e&&this!==e?r._isListening(e):!0}isVisible(){return this._getCache(ty,this._isVisible)}_isVisible(e){if(!this.visible())return!1;const r=this.getParent();return r&&r!==e&&this!==e?r._isVisible(e):!0}shouldDrawHit(e,n=!1){if(e)return this._isVisible(e)&&this._isListening(e);var r=this.getLayer(),i=!1;Ge._dragElements.forEach(s=>{s.dragStatus==="dragging"&&(s.node.nodeType==="Stage"||s.node.getLayer()===r)&&(i=!0)});var a=!n&&!pe.hitOnDragEnabled&&i;return this.isListening()&&this.isVisible()&&!a}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var e=this.getDepth(),n=this,r=0,i,a,s,u;function c(f){for(i=[],a=f.length,s=0;s0&&i[0].getDepth()<=e&&c(i)}return n.nodeType!==WF&&c(n.getStage().getChildren()),r}getDepth(){for(var e=0,n=this.parent;n;)e++,n=n.parent;return e}_batchTransformChanges(e){this._batchingTransformChange=!0,e(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(ua),this._clearSelfAndDescendantCache(Ii)),this._needClearTransformCache=!1}setPosition(e){return this._batchTransformChanges(()=>{this.x(e.x),this.y(e.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){if(!this.getStage())return null;var e=this.getStage().getPointerPosition();if(!e)return null;var n=this.getAbsoluteTransform().copy();return n.invert(),n.point(e)}getAbsolutePosition(e){let n=!1,r=this.parent;for(;r;){if(r.isCached()){n=!0;break}r=r.parent}n&&!e&&(e=!0);var i=this.getAbsoluteTransform(e).getMatrix(),a=new Wn,s=this.offset();return a.m=i.slice(),a.translate(s.x,s.y),a.getTranslation()}setAbsolutePosition(e){var n=this._clearTransform();this.attrs.x=n.x,this.attrs.y=n.y,delete n.x,delete n.y,this._clearCache(ua);var r=this._getAbsoluteTransform().copy();return r.invert(),r.translate(e.x,e.y),e={x:this.attrs.x+r.getTranslation().x,y:this.attrs.y+r.getTranslation().y},this._setTransform(n),this.setPosition({x:e.x,y:e.y}),this._clearCache(ua),this._clearSelfAndDescendantCache(Ii),this}_setTransform(e){var n;for(n in e)this.attrs[n]=e[n]}_clearTransform(){var e={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,e}move(e){var n=e.x,r=e.y,i=this.x(),a=this.y();return n!==void 0&&(i+=n),r!==void 0&&(a+=r),this.setPosition({x:i,y:a}),this}_eachAncestorReverse(e,n){var r=[],i=this.getParent(),a,s;if(!(n&&n._id===this._id)){for(r.unshift(this);i&&(!n||i._id!==n._id);)r.unshift(i),i=i.parent;for(a=r.length,s=0;s0?(this.parent.children.splice(e,1),this.parent.children.splice(e-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return G.warn("Node has no parent. moveToBottom function is ignored."),!1;var e=this.index;return e>0?(this.parent.children.splice(e,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(e){if(!this.parent)return G.warn("Node has no parent. zIndex parameter is ignored."),this;(e<0||e>=this.parent.children.length)&&G.warn("Unexpected value "+e+" 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(e,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(md,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var e=this.opacity(),n=this.getParent();return n&&!n._isUnderCache&&(e*=n.getAbsoluteOpacity()),e}moveTo(e){return this.getParent()!==e&&(this._remove(),e.add(this)),this}toObject(){var e={},n=this.getAttrs(),r,i,a,s,u;e.attrs={};for(r in n)i=n[r],u=G.isObject(i)&&!G._isPlainObject(i)&&!G._isArray(i),!u&&(a=typeof this[r]=="function"&&this[r],delete n[r],s=a?a.call(this):null,n[r]=i,s!==i&&(e.attrs[r]=i));return e.className=this.getClassName(),G._prepareToStringify(e)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(e,n,r){var i=[];n&&this._isMatch(e)&&i.push(this);for(var a=this.parent;a;){if(a===r)return i;a._isMatch(e)&&i.push(a),a=a.parent}return i}isAncestorOf(e){return!1}findAncestor(e,n,r){return this.findAncestors(e,n,r)[0]}_isMatch(e){if(!e)return!1;if(typeof e=="function")return e(this);var n=e.replace(/ /g,"").split(","),r=n.length,i,a;for(i=0;i{try{const i=e==null?void 0:e.callback;i&&delete e.callback,G._urlToImage(this.toDataURL(e),function(a){n(a),i==null||i(a)})}catch(i){r(i)}})}toBlob(e){return new Promise((n,r)=>{try{const i=e==null?void 0:e.callback;i&&delete e.callback,this.toCanvas(e).toBlob(a=>{n(a),i==null||i(a)})}catch(i){r(i)}})}setSize(e){return this.width(e.width),this.height(e.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():pe.dragDistance}_off(e,n,r){var i=this.eventListeners[e],a,s,u;for(a=0;a=0;if(r&&!this.isDragging()){var i=!1;Ge._dragElements.forEach(a=>{this.isAncestorOf(a.node)&&(i=!0)}),i||this._createDragElement(e)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{this._dragCleanup();var e=this.getStage();if(!e)return;const n=Ge._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",i=n&&n.dragStatus==="ready";r?this.stopDrag():i&&Ge._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(e={x:0,y:0}){const n=this.getStage();if(!n)return!1;const r={x:-e.x,y:-e.y,width:n.width()+2*e.x,height:n.height()+2*e.y};return G.haveIntersection(r,this.getClientRect())}static create(e,n){return G._isString(e)&&(e=JSON.parse(e)),this._createNode(e,n)}static _createNode(e,n){var r=se.prototype.getClassName.call(e),i=e.children,a,s,u;n&&(e.attrs.container=n),pe[r]||(G.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const c=pe[r];if(a=new c(e.attrs),i)for(s=i.length,u=0;u0}removeChildren(){return this.getChildren().forEach(e=>{e.parent=null,e.index=0,e.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(e=>{e.parent=null,e.index=0,e.destroy()}),this.children=[],this._requestDraw(),this}add(...e){if(e.length===0)return this;if(e.length>1){for(var n=0;n0?n[0]:void 0}_generalFind(e,n){var r=[];return this._descendants(i=>{const a=i._isMatch(e);return a&&r.push(i),!!(a&&n)}),r}_descendants(e){let n=!1;const r=this.getChildren();for(const i of r){if(n=e(i),n)return!0;if(i.hasChildren()&&(n=i._descendants(e),n))return!0}return!1}toObject(){var e=se.prototype.toObject.call(this);return e.children=[],this.getChildren().forEach(n=>{e.children.push(n.toObject())}),e}isAncestorOf(e){for(var n=e.getParent();n;){if(n._id===this._id)return!0;n=n.getParent()}return!1}clone(e){var n=se.prototype.clone.call(this,e);return this.getChildren().forEach(function(r){n.add(r.clone())}),n}getAllIntersections(e){var n=[];return this.find("Shape").forEach(function(r){r.isVisible()&&r.intersects(e)&&n.push(r)}),n}_clearSelfAndDescendantCache(e){var n;super._clearSelfAndDescendantCache(e),!this.isCached()&&((n=this.children)===null||n===void 0||n.forEach(function(r){r._clearSelfAndDescendantCache(e)}))}_setChildrenIndices(){var e;(e=this.children)===null||e===void 0||e.forEach(function(n,r){n.index=r}),this._requestDraw()}drawScene(e,n){var r=this.getLayer(),i=e||r&&r.getCanvas(),a=i&&i.getContext(),s=this._getCanvasCache(),u=s&&s.scene,c=i&&i.isCache;if(!this.isVisible()&&!c)return this;if(u){a.save();var f=this.getAbsoluteTransform(n).getMatrix();a.transform(f[0],f[1],f[2],f[3],f[4],f[5]),this._drawCachedSceneCanvas(a),a.restore()}else this._drawChildren("drawScene",i,n);return this}drawHit(e,n){if(!this.shouldDrawHit(n))return this;var r=this.getLayer(),i=e||r&&r.hitCanvas,a=i&&i.getContext(),s=this._getCanvasCache(),u=s&&s.hit;if(u){a.save();var c=this.getAbsoluteTransform(n).getMatrix();a.transform(c[0],c[1],c[2],c[3],c[4],c[5]),this._drawCachedHitCanvas(a),a.restore()}else this._drawChildren("drawHit",i,n);return this}_drawChildren(e,n,r){var i,a=n&&n.getContext(),s=this.clipWidth(),u=this.clipHeight(),c=this.clipFunc(),f=s&&u||c;const h=r===this;if(f){a.save();var p=this.getAbsoluteTransform(r),g=p.getMatrix();if(a.transform(g[0],g[1],g[2],g[3],g[4],g[5]),a.beginPath(),c)c.call(this,a,this);else{var y=this.clipX(),v=this.clipY();a.rect(y,v,s,u)}a.clip(),g=p.copy().invert().getMatrix(),a.transform(g[0],g[1],g[2],g[3],g[4],g[5])}var w=!h&&this.globalCompositeOperation()!=="source-over"&&e==="drawScene";w&&(a.save(),a._applyGlobalCompositeOperation(this)),(i=this.children)===null||i===void 0||i.forEach(function(x){x[e](n,r)}),w&&a.restore(),f&&a.restore()}getClientRect(e){var n;e=e||{};var r=e.skipTransform,i=e.relativeTo,a,s,u,c,f={x:1/0,y:1/0,width:0,height:0},h=this;(n=this.children)===null||n===void 0||n.forEach(function(w){if(w.visible()){var x=w.getClientRect({relativeTo:h,skipShadow:e.skipShadow,skipStroke:e.skipStroke});x.width===0&&x.height===0||(a===void 0?(a=x.x,s=x.y,u=x.x+x.width,c=x.y+x.height):(a=Math.min(a,x.x),s=Math.min(s,x.y),u=Math.max(u,x.x+x.width),c=Math.max(c,x.y+x.height)))}});for(var p=this.find("Shape"),g=!1,y=0;yt.indexOf("pointer")>=0?"pointer":t.indexOf("touch")>=0?"touch":"mouse",is=t=>{const e=iu(t);if(e==="pointer")return pe.pointerEventsEnabled&&Tm.pointer;if(e==="touch")return Tm.touch;if(e==="mouse")return Tm.mouse};function Tb(t={}){return(t.clipFunc||t.clipWidth||t.clipHeight)&&G.warn("Stage does not support clipping. Please use clip for Layers or Groups."),t}const ZF="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);",yd=[];class tp extends qn{constructor(e){super(Tb(e)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),yd.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{Tb(this.attrs)}),this._checkVisibility()}_validateAdd(e){const n=e.getType()==="Layer",r=e.getType()==="FastLayer";n||r||G.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const e=this.visible()?"":"none";this.content.style.display=e}setContainer(e){if(typeof e===KF){if(e.charAt(0)==="."){var n=e.slice(1);e=document.getElementsByClassName(n)[0]}else{var r;e.charAt(0)!=="#"?r=e:r=e.slice(1),e=document.getElementById(r)}if(!e)throw"Can not find container in document with id "+r}return this._setAttr("container",e),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),e.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var e=this.children,n=e.length,r;for(r=0;r-1&&yd.splice(n,1),G.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){const e=this._pointerPositions[0]||this._changedPointerPositions[0];return e?{x:e.x,y:e.y}:(G.warn(ZF),null)}_getPointerById(e){return this._pointerPositions.find(n=>n.id===e)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(e){e=e||{},e.x=e.x||0,e.y=e.y||0,e.width=e.width||this.width(),e.height=e.height||this.height();var n=new Ts({width:e.width,height:e.height,pixelRatio:e.pixelRatio||1}),r=n.getContext()._context,i=this.children;return(e.x||e.y)&&r.translate(-1*e.x,-1*e.y),i.forEach(function(a){if(a.isVisible()){var s=a._toKonvaCanvas(e);r.drawImage(s._canvas,e.x,e.y,s.getWidth()/s.getPixelRatio(),s.getHeight()/s.getPixelRatio())}}),n}getIntersection(e){if(!e)return null;var n=this.children,r=n.length,i=r-1,a;for(a=i;a>=0;a--){const s=n[a].getIntersection(e);if(s)return s}return null}_resizeDOM(){var e=this.width(),n=this.height();this.content&&(this.content.style.width=e+Ob,this.content.style.height=n+Ob),this.bufferCanvas.setSize(e,n),this.bufferHitCanvas.setSize(e,n),this.children.forEach(r=>{r.setSize({width:e,height:n}),r.draw()})}add(e,...n){if(arguments.length>1){for(var r=0;rQF&&G.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."),e.setSize({width:this.width(),height:this.height()}),e.draw(),pe.isBrowser&&this.content.appendChild(e.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(e){return Uk(e,this)}setPointerCapture(e){jk(e,this)}releaseCapture(e){mu(e)}getLayers(){return this.children}_bindContentEvents(){pe.isBrowser&&JF.forEach(([e,n])=>{this.content.addEventListener(e,r=>{this[n](r)},{passive:!1})})}_pointerenter(e){this.setPointersPositions(e);const n=is(e.type);this._fire(n.pointerenter,{evt:e,target:this,currentTarget:this})}_pointerover(e){this.setPointersPositions(e);const n=is(e.type);this._fire(n.pointerover,{evt:e,target:this,currentTarget:this})}_getTargetShape(e){let n=this[e+"targetShape"];return n&&!n.getStage()&&(n=null),n}_pointerleave(e){const n=is(e.type),r=iu(e.type);if(n){this.setPointersPositions(e);var i=this._getTargetShape(r),a=!Ge.isDragging||pe.hitOnDragEnabled;i&&a?(i._fireAndBubble(n.pointerout,{evt:e}),i._fireAndBubble(n.pointerleave,{evt:e}),this._fire(n.pointerleave,{evt:e,target:this,currentTarget:this}),this[r+"targetShape"]=null):a&&(this._fire(n.pointerleave,{evt:e,target:this,currentTarget:this}),this._fire(n.pointerout,{evt:e,target:this,currentTarget:this})),this.pointerPos=void 0,this._pointerPositions=[]}}_pointerdown(e){const n=is(e.type),r=iu(e.type);if(n){this.setPointersPositions(e);var i=!1;this._changedPointerPositions.forEach(a=>{var s=this.getIntersection(a);if(Ge.justDragged=!1,pe["_"+r+"ListenClick"]=!0,!(s&&s.isListening()))return;pe.capturePointerEventsEnabled&&s.setPointerCapture(a.id),this[r+"ClickStartShape"]=s,s._fireAndBubble(n.pointerdown,{evt:e,pointerId:a.id}),i=!0;const c=e.type.indexOf("touch")>=0;s.preventDefault()&&e.cancelable&&c&&e.preventDefault()}),i||this._fire(n.pointerdown,{evt:e,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(e){const n=is(e.type),r=iu(e.type);if(!n)return;Ge.isDragging&&Ge.node.preventDefault()&&e.cancelable&&e.preventDefault(),this.setPointersPositions(e);var i=!Ge.isDragging||pe.hitOnDragEnabled;if(!i)return;var a={};let s=!1;var u=this._getTargetShape(r);this._changedPointerPositions.forEach(c=>{const f=Om(c.id)||this.getIntersection(c),h=c.id,p={evt:e,pointerId:h};var g=u!==f;if(g&&u&&(u._fireAndBubble(n.pointerout,Object.assign({},p),f),u._fireAndBubble(n.pointerleave,Object.assign({},p),f)),f){if(a[f._id])return;a[f._id]=!0}f&&f.isListening()?(s=!0,g&&(f._fireAndBubble(n.pointerover,Object.assign({},p),u),f._fireAndBubble(n.pointerenter,Object.assign({},p),u),this[r+"targetShape"]=f),f._fireAndBubble(n.pointermove,Object.assign({},p))):u&&(this._fire(n.pointerover,{evt:e,target:this,currentTarget:this,pointerId:h}),this[r+"targetShape"]=null)}),s||this._fire(n.pointermove,{evt:e,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(e){const n=is(e.type),r=iu(e.type);if(!n)return;this.setPointersPositions(e);const i=this[r+"ClickStartShape"],a=this[r+"ClickEndShape"];var s={};let u=!1;this._changedPointerPositions.forEach(c=>{const f=Om(c.id)||this.getIntersection(c);if(f){if(f.releaseCapture(c.id),s[f._id])return;s[f._id]=!0}const h=c.id,p={evt:e,pointerId:h};let g=!1;pe["_"+r+"InDblClickWindow"]?(g=!0,clearTimeout(this[r+"DblTimeout"])):Ge.justDragged||(pe["_"+r+"InDblClickWindow"]=!0,clearTimeout(this[r+"DblTimeout"])),this[r+"DblTimeout"]=setTimeout(function(){pe["_"+r+"InDblClickWindow"]=!1},pe.dblClickWindow),f&&f.isListening()?(u=!0,this[r+"ClickEndShape"]=f,f._fireAndBubble(n.pointerup,Object.assign({},p)),pe["_"+r+"ListenClick"]&&i&&i===f&&(f._fireAndBubble(n.pointerclick,Object.assign({},p)),g&&a&&a===f&&f._fireAndBubble(n.pointerdblclick,Object.assign({},p)))):(this[r+"ClickEndShape"]=null,pe["_"+r+"ListenClick"]&&this._fire(n.pointerclick,{evt:e,target:this,currentTarget:this,pointerId:h}),g&&this._fire(n.pointerdblclick,{evt:e,target:this,currentTarget:this,pointerId:h}))}),u||this._fire(n.pointerup,{evt:e,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),pe["_"+r+"ListenClick"]=!1,e.cancelable&&r!=="touch"&&e.preventDefault()}_contextmenu(e){this.setPointersPositions(e);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(ny,{evt:e}):this._fire(ny,{evt:e,target:this,currentTarget:this})}_wheel(e){this.setPointersPositions(e);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(ry,{evt:e}):this._fire(ry,{evt:e,target:this,currentTarget:this})}_pointercancel(e){this.setPointersPositions(e);const n=Om(e.pointerId)||this.getIntersection(this.getPointerPosition());n&&n._fireAndBubble(Ss,M0(e)),mu(e.pointerId)}_lostpointercapture(e){mu(e.pointerId)}setPointersPositions(e){var n=this._getContentPosition(),r=null,i=null;e=e||window.event,e.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(e.touches,a=>{this._pointerPositions.push({id:a.identifier,x:(a.clientX-n.left)/n.scaleX,y:(a.clientY-n.top)/n.scaleY})}),Array.prototype.forEach.call(e.changedTouches||e.touches,a=>{this._changedPointerPositions.push({id:a.identifier,x:(a.clientX-n.left)/n.scaleX,y:(a.clientY-n.top)/n.scaleY})})):(r=(e.clientX-n.left)/n.scaleX,i=(e.clientY-n.top)/n.scaleY,this.pointerPos={x:r,y:i},this._pointerPositions=[{x:r,y:i,id:G._getFirstPointerId(e)}],this._changedPointerPositions=[{x:r,y:i,id:G._getFirstPointerId(e)}])}_setPointerPosition(e){G.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(e)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var e=this.content.getBoundingClientRect();return{top:e.top,left:e.left,scaleX:e.width/this.content.clientWidth||1,scaleY:e.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new Ts({width:this.width(),height:this.height()}),this.bufferHitCanvas=new L0({pixelRatio:1,width:this.width(),height:this.height()}),!!pe.isBrowser){var e=this.container();if(!e)throw"Stage has no container. A container is required.";e.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"),e.appendChild(this.content),this._resizeDOM()}}cache(){return G.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(e){e.batchDraw()}),this}}tp.prototype.nodeType=qF;yt(tp);A.addGetterSetter(tp,"container");var eP="hasShadow",tP="shadowRGBA",nP="patternImage",rP="linearGradient",iP="radialGradient";let Gf;function Rm(){return Gf||(Gf=G.createCanvasElement().getContext("2d"),Gf)}const vu={};function e$(t){t.fill()}function t$(t){t.stroke()}function n$(t){t.fill()}function r$(t){t.stroke()}function i$(){this._clearCache(eP)}function a$(){this._clearCache(tP)}function o$(){this._clearCache(nP)}function s$(){this._clearCache(rP)}function l$(){this._clearCache(iP)}class re extends se{constructor(e){super(e);let n;for(;n=G.getRandomColor(),!(n&&!(n in vu)););this.colorKey=n,vu[n]=this}getContext(){return G.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return G.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(eP,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(nP,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var e=Rm();const n=e.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(n&&n.setTransform){const r=new Wn;r.translate(this.fillPatternX(),this.fillPatternY()),r.rotate(pe.getAngle(this.fillPatternRotation())),r.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),r.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const i=r.getMatrix(),a=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(a)}return n}}_getLinearGradient(){return this._getCache(rP,this.__getLinearGradient)}__getLinearGradient(){var e=this.fillLinearGradientColorStops();if(e){for(var n=Rm(),r=this.fillLinearGradientStartPoint(),i=this.fillLinearGradientEndPoint(),a=n.createLinearGradient(r.x,r.y,i.x,i.y),s=0;sthis.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 e=this.hitStrokeWidth();return e==="auto"?this.hasStroke():this.strokeEnabled()&&!!e}intersects(e){var n=this.getStage(),r=n.bufferHitCanvas,i;return r.getContext().clear(),this.drawHit(r,null,!0),i=r.context.getImageData(Math.round(e.x),Math.round(e.y),1,1).data,i[3]>0}destroy(){return se.prototype.destroy.call(this),delete vu[this.colorKey],delete this.colorKey,this}_useBufferCanvas(e){var n;if(!this.getStage()||!((n=this.attrs.perfectDrawEnabled)!==null&&n!==void 0?n:!0))return!1;const i=e||this.hasFill(),a=this.hasStroke(),s=this.getAbsoluteOpacity()!==1;if(i&&a&&s)return!0;const u=this.hasShadow(),c=this.shadowForStrokeEnabled();return!!(i&&a&&u&&c)}setStrokeHitEnabled(e){G.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),e?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){var e=this.size();return{x:this._centroid?-e.width/2:0,y:this._centroid?-e.height/2:0,width:e.width,height:e.height}}getClientRect(e={}){const n=e.skipTransform,r=e.relativeTo,i=this.getSelfRect(),s=!e.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,u=i.width+s,c=i.height+s,f=!e.skipShadow&&this.hasShadow(),h=f?this.shadowOffsetX():0,p=f?this.shadowOffsetY():0,g=u+Math.abs(h),y=c+Math.abs(p),v=f&&this.shadowBlur()||0,w=g+v*2,x=y+v*2,_={width:w,height:x,x:-(s/2+v)+Math.min(h,0)+i.x,y:-(s/2+v)+Math.min(p,0)+i.y};return n?_:this._transformedRect(_,r)}drawScene(e,n){var r=this.getLayer(),i=e||r.getCanvas(),a=i.getContext(),s=this._getCanvasCache(),u=this.getSceneFunc(),c=this.hasShadow(),f,h,p,g=i.isCache,y=n===this;if(!this.isVisible()&&!y)return this;if(s){a.save();var v=this.getAbsoluteTransform(n).getMatrix();return a.transform(v[0],v[1],v[2],v[3],v[4],v[5]),this._drawCachedSceneCanvas(a),a.restore(),this}if(!u)return this;if(a.save(),this._useBufferCanvas()&&!g){f=this.getStage(),h=f.bufferCanvas,p=h.getContext(),p.clear(),p.save(),p._applyLineJoin(this);var w=this.getAbsoluteTransform(n).getMatrix();p.transform(w[0],w[1],w[2],w[3],w[4],w[5]),u.call(this,p,this),p.restore();var x=h.pixelRatio;c&&a._applyShadow(this),a._applyOpacity(this),a._applyGlobalCompositeOperation(this),a.drawImage(h._canvas,0,0,h.width/x,h.height/x)}else{if(a._applyLineJoin(this),!y){var w=this.getAbsoluteTransform(n).getMatrix();a.transform(w[0],w[1],w[2],w[3],w[4],w[5]),a._applyOpacity(this),a._applyGlobalCompositeOperation(this)}c&&a._applyShadow(this),u.call(this,a,this)}return a.restore(),this}drawHit(e,n,r=!1){if(!this.shouldDrawHit(n,r))return this;var i=this.getLayer(),a=e||i.hitCanvas,s=a&&a.getContext(),u=this.hitFunc()||this.sceneFunc(),c=this._getCanvasCache(),f=c&&c.hit;if(this.colorKey||G.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()"),f){s.save();var h=this.getAbsoluteTransform(n).getMatrix();return s.transform(h[0],h[1],h[2],h[3],h[4],h[5]),this._drawCachedHitCanvas(s),s.restore(),this}if(!u)return this;if(s.save(),s._applyLineJoin(this),!(this===n)){var g=this.getAbsoluteTransform(n).getMatrix();s.transform(g[0],g[1],g[2],g[3],g[4],g[5])}return u.call(this,s,this),s.restore(),this}drawHitFromCache(e=0){var n=this._getCanvasCache(),r=this._getCachedSceneCanvas(),i=n.hit,a=i.getContext(),s=i.getWidth(),u=i.getHeight(),c,f,h,p,g,y;a.clear(),a.drawImage(r._canvas,0,0,s,u);try{for(c=a.getImageData(0,0,s,u),f=c.data,h=f.length,p=G._hexToRgb(this.colorKey),g=0;ge?(f[g]=p.r,f[g+1]=p.g,f[g+2]=p.b,f[g+3]=255):f[g+3]=0;a.putImageData(c,0,0)}catch(v){G.error("Unable to draw hit graph from cached scene canvas. "+v.message)}return this}hasPointerCapture(e){return Uk(e,this)}setPointerCapture(e){jk(e,this)}releaseCapture(e){mu(e)}}re.prototype._fillFunc=e$;re.prototype._strokeFunc=t$;re.prototype._fillFuncHit=n$;re.prototype._strokeFuncHit=r$;re.prototype._centroid=!1;re.prototype.nodeType="Shape";yt(re);re.prototype.eventListeners={};re.prototype.on.call(re.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",i$);re.prototype.on.call(re.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",a$);re.prototype.on.call(re.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",o$);re.prototype.on.call(re.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",s$);re.prototype.on.call(re.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",l$);A.addGetterSetter(re,"stroke",void 0,zk());A.addGetterSetter(re,"strokeWidth",2,le());A.addGetterSetter(re,"fillAfterStrokeEnabled",!1);A.addGetterSetter(re,"hitStrokeWidth","auto",I0());A.addGetterSetter(re,"strokeHitEnabled",!0,jr());A.addGetterSetter(re,"perfectDrawEnabled",!0,jr());A.addGetterSetter(re,"shadowForStrokeEnabled",!0,jr());A.addGetterSetter(re,"lineJoin");A.addGetterSetter(re,"lineCap");A.addGetterSetter(re,"sceneFunc");A.addGetterSetter(re,"hitFunc");A.addGetterSetter(re,"dash");A.addGetterSetter(re,"dashOffset",0,le());A.addGetterSetter(re,"shadowColor",void 0,qs());A.addGetterSetter(re,"shadowBlur",0,le());A.addGetterSetter(re,"shadowOpacity",1,le());A.addComponentsGetterSetter(re,"shadowOffset",["x","y"]);A.addGetterSetter(re,"shadowOffsetX",0,le());A.addGetterSetter(re,"shadowOffsetY",0,le());A.addGetterSetter(re,"fillPatternImage");A.addGetterSetter(re,"fill",void 0,zk());A.addGetterSetter(re,"fillPatternX",0,le());A.addGetterSetter(re,"fillPatternY",0,le());A.addGetterSetter(re,"fillLinearGradientColorStops");A.addGetterSetter(re,"strokeLinearGradientColorStops");A.addGetterSetter(re,"fillRadialGradientStartRadius",0);A.addGetterSetter(re,"fillRadialGradientEndRadius",0);A.addGetterSetter(re,"fillRadialGradientColorStops");A.addGetterSetter(re,"fillPatternRepeat","repeat");A.addGetterSetter(re,"fillEnabled",!0);A.addGetterSetter(re,"strokeEnabled",!0);A.addGetterSetter(re,"shadowEnabled",!0);A.addGetterSetter(re,"dashEnabled",!0);A.addGetterSetter(re,"strokeScaleEnabled",!0);A.addGetterSetter(re,"fillPriority","color");A.addComponentsGetterSetter(re,"fillPatternOffset",["x","y"]);A.addGetterSetter(re,"fillPatternOffsetX",0,le());A.addGetterSetter(re,"fillPatternOffsetY",0,le());A.addComponentsGetterSetter(re,"fillPatternScale",["x","y"]);A.addGetterSetter(re,"fillPatternScaleX",1,le());A.addGetterSetter(re,"fillPatternScaleY",1,le());A.addComponentsGetterSetter(re,"fillLinearGradientStartPoint",["x","y"]);A.addComponentsGetterSetter(re,"strokeLinearGradientStartPoint",["x","y"]);A.addGetterSetter(re,"fillLinearGradientStartPointX",0);A.addGetterSetter(re,"strokeLinearGradientStartPointX",0);A.addGetterSetter(re,"fillLinearGradientStartPointY",0);A.addGetterSetter(re,"strokeLinearGradientStartPointY",0);A.addComponentsGetterSetter(re,"fillLinearGradientEndPoint",["x","y"]);A.addComponentsGetterSetter(re,"strokeLinearGradientEndPoint",["x","y"]);A.addGetterSetter(re,"fillLinearGradientEndPointX",0);A.addGetterSetter(re,"strokeLinearGradientEndPointX",0);A.addGetterSetter(re,"fillLinearGradientEndPointY",0);A.addGetterSetter(re,"strokeLinearGradientEndPointY",0);A.addComponentsGetterSetter(re,"fillRadialGradientStartPoint",["x","y"]);A.addGetterSetter(re,"fillRadialGradientStartPointX",0);A.addGetterSetter(re,"fillRadialGradientStartPointY",0);A.addComponentsGetterSetter(re,"fillRadialGradientEndPoint",["x","y"]);A.addGetterSetter(re,"fillRadialGradientEndPointX",0);A.addGetterSetter(re,"fillRadialGradientEndPointY",0);A.addGetterSetter(re,"fillPatternRotation",0);A.backCompat(re,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});var u$="#",c$="beforeDraw",f$="draw",aP=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],d$=aP.length;class yo extends qn{constructor(e){super(e),this.canvas=new Ts,this.hitCanvas=new L0({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(e){return this.getContext().clear(e),this.getHitCanvas().getContext().clear(e),this}setZIndex(e){super.setZIndex(e);var n=this.getStage();return n&&n.content&&(n.content.removeChild(this.getNativeCanvasElement()),e{this.draw(),this._waitingForDraw=!1})),this}getIntersection(e){if(!this.isListening()||!this.isVisible())return null;for(var n=1,r=!1;;){for(let i=0;i0)return{antialiased:!0};return{}}drawScene(e,n){var r=this.getLayer(),i=e||r&&r.getCanvas();return this._fire(c$,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),qn.prototype.drawScene.call(this,i,n),this._fire(f$,{node:this}),this}drawHit(e,n){var r=this.getLayer(),i=e||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),qn.prototype.drawHit.call(this,i,n),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(e){G.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(e)}getHitGraphEnabled(e){return G.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!(!this.parent||!this.parent.content)){var e=this.parent,n=!!this.hitCanvas._canvas.parentNode;n?e.content.removeChild(this.hitCanvas._canvas):e.content.appendChild(this.hitCanvas._canvas)}}destroy(){return G.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}}yo.prototype.nodeType="Layer";yt(yo);A.addGetterSetter(yo,"imageSmoothingEnabled",!0);A.addGetterSetter(yo,"clearBeforeDraw",!0);A.addGetterSetter(yo,"hitGraphEnabled",!0,jr());class D0 extends yo{constructor(e){super(e),this.listening(!1),G.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}D0.prototype.nodeType="FastLayer";yt(D0);class zs extends qn{_validateAdd(e){var n=e.getType();n!=="Group"&&n!=="Shape"&&G.throw("You may only add groups and shapes to groups.")}}zs.prototype.nodeType="Group";yt(zs);var Am=function(){return Os.performance&&Os.performance.now?function(){return Os.performance.now()}:function(){return new Date().getTime()}}();class dr{constructor(e,n){this.id=dr.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:Am(),frameRate:0},this.func=e,this.setLayers(n)}setLayers(e){var n=[];return e?e.length>0?n=e:n=[e]:n=[],this.layers=n,this}getLayers(){return this.layers}addLayer(e){var n=this.layers,r=n.length,i;for(i=0;ithis.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():e<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=e,this.update())}getTime(){return this._time}setPosition(e){this.prevPos=this._pos,this.propFunc(e),this._pos=e}getPosition(e){return e===void 0&&(e=this._time),this.func(e,this.begin,this._change,this.duration)}play(){this.state=Rb,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=Ab,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(e){this.pause(),this._time=e,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 e=this.getTimer()-this._startTime;this.state===Rb?this.setTime(e):this.state===Ab&&this.setTime(this.duration-e)}pause(){this.state=p$,this.fire("onPause")}getTimer(){return new Date().getTime()}}class kt{constructor(e){var n=this,r=e.node,i=r._id,a,s=e.easing||yu.Linear,u=!!e.yoyo,c;typeof e.duration>"u"?a=.3:e.duration===0?a=.001:a=e.duration,this.node=r,this._id=g$++;var f=r.getLayer()||(r instanceof pe.Stage?r.getLayers():null);f||G.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new dr(function(){n.tween.onEnterFrame()},f),this.tween=new m$(c,function(h){n._tweenFunc(h)},s,0,1,a*1e3,u),this._addListeners(),kt.attrs[i]||(kt.attrs[i]={}),kt.attrs[i][this._id]||(kt.attrs[i][this._id]={}),kt.tweens[i]||(kt.tweens[i]={});for(c in e)h$[c]===void 0&&this._addAttr(c,e[c]);this.reset(),this.onFinish=e.onFinish,this.onReset=e.onReset,this.onUpdate=e.onUpdate}_addAttr(e,n){var r=this.node,i=r._id,a,s,u,c,f,h,p,g;if(u=kt.tweens[i][e],u&&delete kt.attrs[i][u][e],a=r.getAttr(e),G._isArray(n))if(s=[],f=Math.max(n.length,a.length),e==="points"&&n.length!==a.length&&(n.length>a.length?(p=a,a=G._prepareArrayForTween(a,n,r.closed())):(h=n,n=G._prepareArrayForTween(n,a,r.closed()))),e.indexOf("fill")===0)for(c=0;c{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var e=this.node,n=kt.attrs[e._id][this._id];n.points&&n.points.trueEnd&&e.setAttr("points",n.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var e=this.node,n=kt.attrs[e._id][this._id];n.points&&n.points.trueStart&&e.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(e){return this.tween.seek(e*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var e=this.node._id,n=this._id,r=kt.tweens[e],i;this.pause();for(i in r)delete kt.tweens[e][i];delete kt.attrs[e][n]}}kt.attrs={};kt.tweens={};se.prototype.to=function(t){var e=t.onFinish;t.node=this,t.onFinish=function(){this.destroy(),e&&e()};var n=new kt(t);n.play()};const yu={BackEaseIn(t,e,n,r){var i=1.70158;return n*(t/=r)*t*((i+1)*t-i)+e},BackEaseOut(t,e,n,r){var i=1.70158;return n*((t=t/r-1)*t*((i+1)*t+i)+1)+e},BackEaseInOut(t,e,n,r){var i=1.70158;return(t/=r/2)<1?n/2*(t*t*(((i*=1.525)+1)*t-i))+e:n/2*((t-=2)*t*(((i*=1.525)+1)*t+i)+2)+e},ElasticEaseIn(t,e,n,r,i,a){var s=0;return t===0?e:(t/=r)===1?e+n:(a||(a=r*.3),!i||i0?e:n),h=s*n,p=u*(u>0?e:n),g=c*(c>0?n:e);return{x:f,y:r?-1*g:p,width:h-f,height:g-p}}}Hi.prototype._centroid=!0;Hi.prototype.className="Arc";Hi.prototype._attrsAffectingSize=["innerRadius","outerRadius"];yt(Hi);A.addGetterSetter(Hi,"innerRadius",0,le());A.addGetterSetter(Hi,"outerRadius",0,le());A.addGetterSetter(Hi,"angle",0,le());A.addGetterSetter(Hi,"clockwise",!1,jr());function iy(t,e,n,r,i,a,s){var u=Math.sqrt(Math.pow(n-t,2)+Math.pow(r-e,2)),c=Math.sqrt(Math.pow(i-n,2)+Math.pow(a-r,2)),f=s*u/(u+c),h=s*c/(u+c),p=n-f*(i-t),g=r-f*(a-e),y=n+h*(i-t),v=r+h*(a-e);return[p,g,y,v]}function Mb(t,e){var n=t.length,r=[],i,a;for(i=2;i4){for(u=this.getTensionPoints(),c=u.length,f=a?0:4,a||e.quadraticCurveTo(u[0],u[1],u[2],u[3]);fh?f:h,x=f>h?1:f/h,_=f>h?h/f:1;e.translate(u,c),e.rotate(y),e.scale(x,_),e.arc(0,0,w,p,p+g,1-v),e.scale(1/x,1/_),e.rotate(-y),e.translate(-u,-c);break;case"z":r=!0,e.closePath();break}}!r&&!this.hasFill()?e.strokeShape(this):e.fillStrokeShape(this)}getSelfRect(){var e=[];this.dataArray.forEach(function(f){if(f.command==="A"){var h=f.points[4],p=f.points[5],g=f.points[4]+p,y=Math.PI/180;if(Math.abs(h-g)g;v-=y){const w=tt.getPointOnEllipticalArc(f.points[0],f.points[1],f.points[2],f.points[3],v,0);e.push(w.x,w.y)}else for(let v=h+y;vthis.dataArray[r].pathLength;)e-=this.dataArray[r].pathLength,++r;if(r===i)return n=this.dataArray[r-1].points.slice(-2),{x:n[0],y:n[1]};if(e<.01)return n=this.dataArray[r].points.slice(0,2),{x:n[0],y:n[1]};var a=this.dataArray[r],s=a.points;switch(a.command){case"L":return tt.getPointOnLine(e,a.start.x,a.start.y,s[0],s[1]);case"C":return tt.getPointOnCubicBezier(e/a.pathLength,a.start.x,a.start.y,s[0],s[1],s[2],s[3],s[4],s[5]);case"Q":return tt.getPointOnQuadraticBezier(e/a.pathLength,a.start.x,a.start.y,s[0],s[1],s[2],s[3]);case"A":var u=s[0],c=s[1],f=s[2],h=s[3],p=s[4],g=s[5],y=s[6];return p+=g*e/a.pathLength,tt.getPointOnEllipticalArc(u,c,f,h,p,y)}return null}static getLineLength(e,n,r,i){return Math.sqrt((r-e)*(r-e)+(i-n)*(i-n))}static getPointOnLine(e,n,r,i,a,s,u){s===void 0&&(s=n),u===void 0&&(u=r);var c=(a-r)/(i-n+1e-8),f=Math.sqrt(e*e/(1+c*c));i0&&!isNaN(v[0]);){var S=null,C=[],O=c,I=f,L,D,U,X,K,te,ce,j,T,$;switch(y){case"l":c+=v.shift(),f+=v.shift(),S="L",C.push(c,f);break;case"L":c=v.shift(),f=v.shift(),C.push(c,f);break;case"m":var V=v.shift(),ie=v.shift();if(c+=V,f+=ie,S="M",s.length>2&&s[s.length-1].command==="z"){for(var W=s.length-2;W>=0;W--)if(s[W].command==="M"){c=s[W].points[0]+V,f=s[W].points[1]+ie;break}}C.push(c,f),y="l";break;case"M":c=v.shift(),f=v.shift(),S="M",C.push(c,f),y="L";break;case"h":c+=v.shift(),S="L",C.push(c,f);break;case"H":c=v.shift(),S="L",C.push(c,f);break;case"v":f+=v.shift(),S="L",C.push(c,f);break;case"V":f=v.shift(),S="L",C.push(c,f);break;case"C":C.push(v.shift(),v.shift(),v.shift(),v.shift()),c=v.shift(),f=v.shift(),C.push(c,f);break;case"c":C.push(c+v.shift(),f+v.shift(),c+v.shift(),f+v.shift()),c+=v.shift(),f+=v.shift(),S="C",C.push(c,f);break;case"S":D=c,U=f,L=s[s.length-1],L.command==="C"&&(D=c+(c-L.points[2]),U=f+(f-L.points[3])),C.push(D,U,v.shift(),v.shift()),c=v.shift(),f=v.shift(),S="C",C.push(c,f);break;case"s":D=c,U=f,L=s[s.length-1],L.command==="C"&&(D=c+(c-L.points[2]),U=f+(f-L.points[3])),C.push(D,U,c+v.shift(),f+v.shift()),c+=v.shift(),f+=v.shift(),S="C",C.push(c,f);break;case"Q":C.push(v.shift(),v.shift()),c=v.shift(),f=v.shift(),C.push(c,f);break;case"q":C.push(c+v.shift(),f+v.shift()),c+=v.shift(),f+=v.shift(),S="Q",C.push(c,f);break;case"T":D=c,U=f,L=s[s.length-1],L.command==="Q"&&(D=c+(c-L.points[0]),U=f+(f-L.points[1])),c=v.shift(),f=v.shift(),S="Q",C.push(D,U,c,f);break;case"t":D=c,U=f,L=s[s.length-1],L.command==="Q"&&(D=c+(c-L.points[0]),U=f+(f-L.points[1])),c+=v.shift(),f+=v.shift(),S="Q",C.push(D,U,c,f);break;case"A":X=v.shift(),K=v.shift(),te=v.shift(),ce=v.shift(),j=v.shift(),T=c,$=f,c=v.shift(),f=v.shift(),S="A",C=this.convertEndpointToCenterParameterization(T,$,c,f,ce,j,X,K,te);break;case"a":X=v.shift(),K=v.shift(),te=v.shift(),ce=v.shift(),j=v.shift(),T=c,$=f,c+=v.shift(),f+=v.shift(),S="A",C=this.convertEndpointToCenterParameterization(T,$,c,f,ce,j,X,K,te);break}s.push({command:S||y,points:C,start:{x:O,y:I},pathLength:this.calcLength(O,I,S||y,C)})}(y==="z"||y==="Z")&&s.push({command:"z",points:[],start:void 0,pathLength:0})}return s}static calcLength(e,n,r,i){var a,s,u,c,f=tt;switch(r){case"L":return f.getLineLength(e,n,i[0],i[1]);case"C":for(a=0,s=f.getPointOnCubicBezier(0,e,n,i[0],i[1],i[2],i[3],i[4],i[5]),c=.01;c<=1;c+=.01)u=f.getPointOnCubicBezier(c,e,n,i[0],i[1],i[2],i[3],i[4],i[5]),a+=f.getLineLength(s.x,s.y,u.x,u.y),s=u;return a;case"Q":for(a=0,s=f.getPointOnQuadraticBezier(0,e,n,i[0],i[1],i[2],i[3]),c=.01;c<=1;c+=.01)u=f.getPointOnQuadraticBezier(c,e,n,i[0],i[1],i[2],i[3]),a+=f.getLineLength(s.x,s.y,u.x,u.y),s=u;return a;case"A":a=0;var h=i[4],p=i[5],g=i[4]+p,y=Math.PI/180;if(Math.abs(h-g)g;c-=y)u=f.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],c,0),a+=f.getLineLength(s.x,s.y,u.x,u.y),s=u;else for(c=h+y;c1&&(u*=Math.sqrt(y),c*=Math.sqrt(y));var v=Math.sqrt((u*u*(c*c)-u*u*(g*g)-c*c*(p*p))/(u*u*(g*g)+c*c*(p*p)));a===s&&(v*=-1),isNaN(v)&&(v=0);var w=v*u*g/c,x=v*-c*p/u,_=(e+r)/2+Math.cos(h)*w-Math.sin(h)*x,S=(n+i)/2+Math.sin(h)*w+Math.cos(h)*x,C=function(K){return Math.sqrt(K[0]*K[0]+K[1]*K[1])},O=function(K,te){return(K[0]*te[0]+K[1]*te[1])/(C(K)*C(te))},I=function(K,te){return(K[0]*te[1]=1&&(X=0),s===0&&X>0&&(X=X-2*Math.PI),s===1&&X<0&&(X=X+2*Math.PI),[_,S,u,c,L,X,h,s]}}tt.prototype.className="Path";tt.prototype._attrsAffectingSize=["data"];yt(tt);A.addGetterSetter(tt,"data");class So extends Vi{_sceneFunc(e){super._sceneFunc(e);var n=Math.PI*2,r=this.points(),i=r,a=this.tension()!==0&&r.length>4;a&&(i=this.getTensionPoints());var s=this.pointerLength(),u=r.length,c,f;if(a){const g=[i[i.length-4],i[i.length-3],i[i.length-2],i[i.length-1],r[u-2],r[u-1]],y=tt.calcLength(i[i.length-4],i[i.length-3],"C",g),v=tt.getPointOnQuadraticBezier(Math.min(1,1-s/y),g[0],g[1],g[2],g[3],g[4],g[5]);c=r[u-2]-v.x,f=r[u-1]-v.y}else c=r[u-2]-r[u-4],f=r[u-1]-r[u-3];var h=(Math.atan2(f,c)+n)%n,p=this.pointerWidth();this.pointerAtEnding()&&(e.save(),e.beginPath(),e.translate(r[u-2],r[u-1]),e.rotate(h),e.moveTo(0,0),e.lineTo(-s,p/2),e.lineTo(-s,-p/2),e.closePath(),e.restore(),this.__fillStroke(e)),this.pointerAtBeginning()&&(e.save(),e.beginPath(),e.translate(r[0],r[1]),a?(c=(i[0]+i[2])/2-r[0],f=(i[1]+i[3])/2-r[1]):(c=r[2]-r[0],f=r[3]-r[1]),e.rotate((Math.atan2(-f,-c)+n)%n),e.moveTo(0,0),e.lineTo(-s,p/2),e.lineTo(-s,-p/2),e.closePath(),e.restore(),this.__fillStroke(e))}__fillStroke(e){var n=this.dashEnabled();n&&(this.attrs.dashEnabled=!1,e.setLineDash([])),e.fillStrokeShape(this),n&&(this.attrs.dashEnabled=!0)}getSelfRect(){const e=super.getSelfRect(),n=this.pointerWidth()/2;return{x:e.x-n,y:e.y-n,width:e.width+n*2,height:e.height+n*2}}}So.prototype.className="Arrow";yt(So);A.addGetterSetter(So,"pointerLength",10,le());A.addGetterSetter(So,"pointerWidth",10,le());A.addGetterSetter(So,"pointerAtBeginning",!1);A.addGetterSetter(So,"pointerAtEnding",!0);class Ks extends re{_sceneFunc(e){e.beginPath(),e.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(e){this.radius()!==e/2&&this.radius(e/2)}setHeight(e){this.radius()!==e/2&&this.radius(e/2)}}Ks.prototype._centroid=!0;Ks.prototype.className="Circle";Ks.prototype._attrsAffectingSize=["radius"];yt(Ks);A.addGetterSetter(Ks,"radius",0,le());class Na extends re{_sceneFunc(e){var n=this.radiusX(),r=this.radiusY();e.beginPath(),e.save(),n!==r&&e.scale(1,r/n),e.arc(0,0,n,0,Math.PI*2,!1),e.restore(),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(e){this.radiusX(e/2)}setHeight(e){this.radiusY(e/2)}}Na.prototype.className="Ellipse";Na.prototype._centroid=!0;Na.prototype._attrsAffectingSize=["radiusX","radiusY"];yt(Na);A.addComponentsGetterSetter(Na,"radius",["x","y"]);A.addGetterSetter(Na,"radiusX",0,le());A.addGetterSetter(Na,"radiusY",0,le());let hi=class oP extends re{constructor(e){super(e),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const e=this.image();e&&e.complete||e&&e.readyState===4||e&&e.addEventListener&&e.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(e){const n=this.getWidth(),r=this.getHeight(),i=this.cornerRadius(),a=this.attrs.image;let s;if(a){const u=this.attrs.cropWidth,c=this.attrs.cropHeight;u&&c?s=[a,this.cropX(),this.cropY(),u,c,0,0,n,r]:s=[a,0,0,n,r]}(this.hasFill()||this.hasStroke()||i)&&(e.beginPath(),i?G.drawRoundedRectPath(e,n,r,i):e.rect(0,0,n,r),e.closePath(),e.fillStrokeShape(this)),a&&(i&&e.clip(),e.drawImage.apply(e,s))}_hitFunc(e){var n=this.width(),r=this.height(),i=this.cornerRadius();e.beginPath(),i?G.drawRoundedRectPath(e,n,r,i):e.rect(0,0,n,r),e.closePath(),e.fillStrokeShape(this)}getWidth(){var e,n;return(e=this.attrs.width)!==null&&e!==void 0?e:(n=this.image())===null||n===void 0?void 0:n.width}getHeight(){var e,n;return(e=this.attrs.height)!==null&&e!==void 0?e:(n=this.image())===null||n===void 0?void 0:n.height}static fromURL(e,n,r=null){var i=G.createImageElement();i.onload=function(){var a=new oP({image:i});n(a)},i.onerror=r,i.crossOrigin="Anonymous",i.src=e}};hi.prototype.className="Image";yt(hi);A.addGetterSetter(hi,"cornerRadius",0,A0(4));A.addGetterSetter(hi,"image");A.addComponentsGetterSetter(hi,"crop",["x","y","width","height"]);A.addGetterSetter(hi,"cropX",0,le());A.addGetterSetter(hi,"cropY",0,le());A.addGetterSetter(hi,"cropWidth",0,le());A.addGetterSetter(hi,"cropHeight",0,le());var sP=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],v$="Change.konva",y$="none",ay="up",oy="right",sy="down",ly="left",S$=sP.length;class N0 extends zs{constructor(e){super(e),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(e){var n=this,r,i=function(){n._sync()};for(r=0;r{n=Math.min(n,s.x),r=Math.max(r,s.x),i=Math.min(i,s.y),a=Math.max(a,s.y)}),{x:n,y:i,width:r-n,height:a-i}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(e){this.radius(e/2)}setHeight(e){this.radius(e/2)}}wo.prototype.className="RegularPolygon";wo.prototype._centroid=!0;wo.prototype._attrsAffectingSize=["radius"];yt(wo);A.addGetterSetter(wo,"radius",0,le());A.addGetterSetter(wo,"sides",0,le());var Db=Math.PI*2;class bo extends re{_sceneFunc(e){e.beginPath(),e.arc(0,0,this.innerRadius(),0,Db,!1),e.moveTo(this.outerRadius(),0),e.arc(0,0,this.outerRadius(),Db,0,!0),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(e){this.outerRadius(e/2)}setHeight(e){this.outerRadius(e/2)}}bo.prototype.className="Ring";bo.prototype._centroid=!0;bo.prototype._attrsAffectingSize=["innerRadius","outerRadius"];yt(bo);A.addGetterSetter(bo,"innerRadius",0,le());A.addGetterSetter(bo,"outerRadius",0,le());class pi extends re{constructor(e){super(e),this._updated=!0,this.anim=new dr(()=>{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(e){var n=this.animation(),r=this.frameIndex(),i=r*4,a=this.animations()[n],s=this.frameOffsets(),u=a[i+0],c=a[i+1],f=a[i+2],h=a[i+3],p=this.image();if((this.hasFill()||this.hasStroke())&&(e.beginPath(),e.rect(0,0,f,h),e.closePath(),e.fillStrokeShape(this)),p)if(s){var g=s[n],y=r*2;e.drawImage(p,u,c,f,h,g[y+0],g[y+1],f,h)}else e.drawImage(p,u,c,f,h,0,0,f,h)}_hitFunc(e){var n=this.animation(),r=this.frameIndex(),i=r*4,a=this.animations()[n],s=this.frameOffsets(),u=a[i+2],c=a[i+3];if(e.beginPath(),s){var f=s[n],h=r*2;e.rect(f[h+0],f[h+1],u,c)}else e.rect(0,0,u,c);e.closePath(),e.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var e=this;this.interval=setInterval(function(){e._updateIndex()},1e3/this.frameRate())}start(){if(!this.isRunning()){var e=this.getLayer();this.anim.setLayers(e),this._setInterval(),this.anim.start()}}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){var e=this.frameIndex(),n=this.animation(),r=this.animations(),i=r[n],a=i.length/4;e{e=e.trim();const n=e.indexOf(" ")>=0,r=e.indexOf('"')>=0||e.indexOf("'")>=0;return n&&!r&&(e=`"${e}"`),e}).join(", ")}var jf;function Lm(){return jf||(jf=G.createCanvasElement().getContext(b$),jf)}function L$(t){t.fillText(this._partialText,this._partialTextX,this._partialTextY)}function M$(t){t.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function D$(t){return t=t||{},!t.fillLinearGradientColorStops&&!t.fillRadialGradientColorStops&&!t.fillPatternImage&&(t.fill=t.fill||"black"),t}let vt=class extends re{constructor(e){super(D$(e)),this._partialTextX=0,this._partialTextY=0;for(var n=0;n1&&(_+=s)}}}_hitFunc(e){var n=this.getWidth(),r=this.getHeight();e.beginPath(),e.rect(0,0,n,r),e.closePath(),e.fillStrokeShape(this)}setText(e){var n=G._isString(e)?e:e==null?"":e+"";return this._setAttr(C$,n),this}getWidth(){var e=this.attrs.width===as||this.attrs.width===void 0;return e?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var e=this.attrs.height===as||this.attrs.height===void 0;return e?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return G.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(e){var n=Lm(),r=this.fontSize(),i;return n.save(),n.font=this._getContextFont(),i=n.measureText(e),n.restore(),{width:i.width,height:r}}_getContextFont(){return this.fontStyle()+Uf+this.fontVariant()+Uf+(this.fontSize()+E$)+I$(this.fontFamily())}_addTextLine(e){this.align()===Wl&&(e=e.trim());var r=this._getTextWidth(e);return this.textArr.push({text:e,width:r,lastInParagraph:!1})}_getTextWidth(e){var n=this.letterSpacing(),r=e.length;return Lm().measureText(e).width+(r?n*(r-1):0)}_setTextData(){var e=this.text().split(` -`),n=+this.fontSize(),r=0,i=this.lineHeight()*n,a=this.attrs.width,s=this.attrs.height,u=a!==as&&a!==void 0,c=s!==as&&s!==void 0,f=this.padding(),h=a-f*2,p=s-f*2,g=0,y=this.wrap(),v=y!==Fb,w=y!==R$&&v,x=this.ellipsis();this.textArr=[],Lm().font=this._getContextFont();for(var _=x?this._getTextWidth(Im):0,S=0,C=e.length;Sh)for(;O.length>0;){for(var L=0,D=O.length,U="",X=0;L>>1,te=O.slice(0,K+1),ce=this._getTextWidth(te)+_;ce<=h?(L=K+1,U=te,X=ce):D=K}if(U){if(w){var j,T=O[U.length],$=T===Uf||T===Nb;$&&X<=h?j=U.length:j=Math.max(U.lastIndexOf(Uf),U.lastIndexOf(Nb))+1,j>0&&(L=j,U=U.slice(0,L),X=this._getTextWidth(U))}U=U.trimRight(),this._addTextLine(U),r=Math.max(r,X),g+=i;var V=this._shouldHandleEllipsis(g);if(V){this._tryToAddEllipsisToLastLine();break}if(O=O.slice(L),O=O.trimLeft(),O.length>0&&(I=this._getTextWidth(O),I<=h)){this._addTextLine(O),g+=i,r=Math.max(r,I);break}}else break}else this._addTextLine(O),g+=i,r=Math.max(r,I),this._shouldHandleEllipsis(g)&&Sp)break}this.textHeight=n,this.textWidth=r}_shouldHandleEllipsis(e){var n=+this.fontSize(),r=this.lineHeight()*n,i=this.attrs.height,a=i!==as&&i!==void 0,s=this.padding(),u=i-s*2,c=this.wrap(),f=c!==Fb;return!f||a&&e+r>u}_tryToAddEllipsisToLastLine(){var e=this.attrs.width,n=e!==as&&e!==void 0,r=this.padding(),i=e-r*2,a=this.ellipsis(),s=this.textArr[this.textArr.length-1];if(!(!s||!a)){if(n){var u=this._getTextWidth(s.text+Im)=1){var r=n[0].p0;e.moveTo(r.x,r.y)}for(var i=0;i0&&(u+=e.dataArray[c].pathLength);var f=0;i==="center"&&(f=Math.max(0,u/2-s/2)),i==="right"&&(f=Math.max(0,u-s));for(var h=lP(this.text()),p=this.text().split(" ").length-1,g,y,v,w=-1,x=0,_=function(){x=0;for(var ce=e.dataArray,j=w+1;j0)return w=j,ce[j];ce[j].command==="M"&&(g={x:ce[j].points[0],y:ce[j].points[1]})}return{}},S=function(ce){var j=e._getTextSize(ce).width+r;ce===" "&&i==="justify"&&(j+=(u-s)/p);var T=0,$=0;for(y=void 0;Math.abs(j-T)/j>.01&&$<20;){$++;for(var V=T;v===void 0;)v=_(),v&&V+v.pathLengthj?y=tt.getPointOnLine(j,g.x,g.y,v.points[0],v.points[1],g.x,g.y):v=void 0;break;case"A":var W=v.points[4],Y=v.points[5],Q=v.points[4]+Y;x===0?x=W+1e-8:j>T?x+=Math.PI/180*Y/Math.abs(Y):x-=Math.PI/360*Y/Math.abs(Y),(Y<0&&x=0&&x>Q)&&(x=Q,ie=!0),y=tt.getPointOnEllipticalArc(v.points[0],v.points[1],v.points[2],v.points[3],x,v.points[6]);break;case"C":x===0?j>v.pathLength?x=1e-8:x=j/v.pathLength:j>T?x+=(j-T)/v.pathLength/2:x=Math.max(x-(T-j)/v.pathLength/2,0),x>1&&(x=1,ie=!0),y=tt.getPointOnCubicBezier(x,v.start.x,v.start.y,v.points[0],v.points[1],v.points[2],v.points[3],v.points[4],v.points[5]);break;case"Q":x===0?x=j/v.pathLength:j>T?x+=(j-T)/v.pathLength:x-=(T-j)/v.pathLength,x>1&&(x=1,ie=!0),y=tt.getPointOnQuadraticBezier(x,v.start.x,v.start.y,v.points[0],v.points[1],v.points[2],v.points[3]);break}y!==void 0&&(T=tt.getLineLength(g.x,g.y,y.x,y.y)),ie&&(ie=!1,v=void 0)}},C="C",O=e._getTextSize(C).width+r,I=f/O-1,L=0;Lt+`.${gP}`).join(" "),$b="nodesRect",F$=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],$$={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135};const z$="ontouchstart"in pe._global;function G$(t,e){if(t==="rotater")return"crosshair";e+=G.degToRad($$[t]||0);var n=(G.radToDeg(e)%360+360)%360;return G._inRange(n,315+22.5,360)||G._inRange(n,0,22.5)?"ns-resize":G._inRange(n,45-22.5,45+22.5)?"nesw-resize":G._inRange(n,90-22.5,90+22.5)?"ew-resize":G._inRange(n,135-22.5,135+22.5)?"nwse-resize":G._inRange(n,180-22.5,180+22.5)?"ns-resize":G._inRange(n,225-22.5,225+22.5)?"nesw-resize":G._inRange(n,270-22.5,270+22.5)?"ew-resize":G._inRange(n,315-22.5,315+22.5)?"nwse-resize":(G.error("Transformer has unknown angle for cursor detection: "+n),"pointer")}var sh=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],zb=1e8;function U$(t){return{x:t.x+t.width/2*Math.cos(t.rotation)+t.height/2*Math.sin(-t.rotation),y:t.y+t.height/2*Math.cos(t.rotation)+t.width/2*Math.sin(t.rotation)}}function mP(t,e,n){const r=n.x+(t.x-n.x)*Math.cos(e)-(t.y-n.y)*Math.sin(e),i=n.y+(t.x-n.x)*Math.sin(e)+(t.y-n.y)*Math.cos(e);return Object.assign(Object.assign({},t),{rotation:t.rotation+e,x:r,y:i})}function j$(t,e){const n=U$(t);return mP(t,e,n)}function W$(t,e,n){let r=e;for(let i=0;i{const i=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()},a=r._attrsAffectingSize.map(s=>s+"Change."+this._getEventNamespace()).join(" ");r.on(a,i),r.on(F$.map(s=>s+`.${this._getEventNamespace()}`).join(" "),i),r.on(`absoluteTransformChange.${this._getEventNamespace()}`,i),this._proxyDrag(r)}),this._resetTransformCache();var n=!!this.findOne(".top-left");return n&&this.update(),this}_proxyDrag(e){let n;e.on(`dragstart.${this._getEventNamespace()}`,r=>{n=e.getAbsolutePosition(),!this.isDragging()&&e!==this.findOne(".back")&&this.startDrag(r,!1)}),e.on(`dragmove.${this._getEventNamespace()}`,r=>{if(!n)return;const i=e.getAbsolutePosition(),a=i.x-n.x,s=i.y-n.y;this.nodes().forEach(u=>{if(u===e||u.isDragging())return;const c=u.getAbsolutePosition();u.setAbsolutePosition({x:c.x+a,y:c.y+s}),u.startDrag(r)}),n=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(e=>{e.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache($b),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache($b,this.__getNodeRect)}__getNodeShape(e,n=this.rotation(),r){var i=e.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),a=e.getAbsoluteScale(r),s=e.getAbsolutePosition(r),u=i.x*a.x-e.offsetX()*a.x,c=i.y*a.y-e.offsetY()*a.y;const f=(pe.getAngle(e.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),h={x:s.x+u*Math.cos(f)+c*Math.sin(-f),y:s.y+c*Math.cos(f)+u*Math.sin(f),width:i.width*a.x,height:i.height*a.y,rotation:f};return mP(h,-pe.getAngle(n),{x:0,y:0})}__getNodeRect(){var e=this.getNode();if(!e)return{x:-zb,y:-zb,width:0,height:0,rotation:0};const n=[];this.nodes().map(f=>{const h=f.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var p=[{x:h.x,y:h.y},{x:h.x+h.width,y:h.y},{x:h.x+h.width,y:h.y+h.height},{x:h.x,y:h.y+h.height}],g=f.getAbsoluteTransform();p.forEach(function(y){var v=g.point(y);n.push(v)})});const r=new Wn;r.rotate(-pe.getAngle(this.rotation()));var i,a,s,u;n.forEach(function(f){var h=r.point(f);i===void 0&&(i=s=h.x,a=u=h.y),i=Math.min(i,h.x),a=Math.min(a,h.y),s=Math.max(s,h.x),u=Math.max(u,h.y)}),r.invert();const c=r.point({x:i,y:a});return{x:c.x,y:c.y,width:s-i,height:u-a,rotation:pe.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),sh.forEach(function(e){this._createAnchor(e)}.bind(this)),this._createAnchor("rotater")}_createAnchor(e){var n=new Zu({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:e+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:z$?10:"auto"}),r=this;n.on("mousedown touchstart",function(i){r._handleMouseDown(i)}),n.on("dragstart",i=>{n.stopDrag(),i.cancelBubble=!0}),n.on("dragend",i=>{i.cancelBubble=!0}),n.on("mouseenter",()=>{var i=pe.getAngle(this.rotation()),a=G$(e,i);n.getStage().content&&(n.getStage().content.style.cursor=a),this._cursorChange=!0}),n.on("mouseout",()=>{n.getStage().content&&(n.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(n)}_createBack(){var e=new re({name:"back",width:0,height:0,draggable:!0,sceneFunc(n){var r=this.getParent(),i=r.padding();n.beginPath(),n.rect(-i,-i,this.width()+i*2,this.height()+i*2),n.moveTo(this.width()/2,-i),r.rotateEnabled()&&n.lineTo(this.width()/2,-r.rotateAnchorOffset()*G._sign(this.height())-i),n.fillStrokeShape(this)},hitFunc:(n,r)=>{if(this.shouldOverdrawWholeArea()){var i=this.padding();n.beginPath(),n.rect(-i,-i,r.width()+i*2,r.height()+i*2),n.fillStrokeShape(r)}}});this.add(e),this._proxyDrag(e),e.on("dragstart",n=>{n.cancelBubble=!0}),e.on("dragmove",n=>{n.cancelBubble=!0}),e.on("dragend",n=>{n.cancelBubble=!0}),this.on("dragmove",n=>{this.update()})}_handleMouseDown(e){this._movingAnchorName=e.target.name().split(" ")[0];var n=this._getNodeRect(),r=n.width,i=n.height,a=Math.sqrt(Math.pow(r,2)+Math.pow(i,2));this.sin=Math.abs(i/a),this.cos=Math.abs(r/a),typeof window<"u"&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;var s=e.target.getAbsolutePosition(),u=e.target.getStage().getPointerPosition();this._anchorDragOffset={x:u.x-s.x,y:u.y-s.y},this._fire("transformstart",{evt:e.evt,target:this.getNode()}),this._nodes.forEach(c=>{c._fire("transformstart",{evt:e.evt,target:c})})}_handleMouseMove(e){var n,r,i,a=this.findOne("."+this._movingAnchorName),s=a.getStage();s.setPointersPositions(e);const u=s.getPointerPosition();let c={x:u.x-this._anchorDragOffset.x,y:u.y-this._anchorDragOffset.y};const f=a.getAbsolutePosition();this.anchorDragBoundFunc()&&(c=this.anchorDragBoundFunc()(f,c,e)),a.setAbsolutePosition(c);const h=a.getAbsolutePosition();if(!(f.x===h.x&&f.y===h.y)){if(this._movingAnchorName==="rotater"){var p=this._getNodeRect();n=a.x()-p.width/2,r=-a.y()+p.height/2;let ce=Math.atan2(-r,n)+Math.PI/2;p.height<0&&(ce-=Math.PI);var g=pe.getAngle(this.rotation());const j=g+ce,T=pe.getAngle(this.rotationSnapTolerance()),V=W$(this.rotationSnaps(),j,T)-p.rotation,ie=j$(p,V);this._fitNodesInto(ie,e);return}var y=this.keepRatio()||e.shiftKey,S=this.centeredScaling()||e.altKey;if(this._movingAnchorName==="top-left"){if(y){var v=S?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};i=Math.sqrt(Math.pow(v.x-a.x(),2)+Math.pow(v.y-a.y(),2));var w=this.findOne(".top-left").x()>v.x?-1:1,x=this.findOne(".top-left").y()>v.y?-1:1;n=i*this.cos*w,r=i*this.sin*x,this.findOne(".top-left").x(v.x-n),this.findOne(".top-left").y(v.y-r)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(a.y());else if(this._movingAnchorName==="top-right"){if(y){var v=S?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};i=Math.sqrt(Math.pow(a.x()-v.x,2)+Math.pow(v.y-a.y(),2));var w=this.findOne(".top-right").x()v.y?-1:1;n=i*this.cos*w,r=i*this.sin*x,this.findOne(".top-right").x(v.x+n),this.findOne(".top-right").y(v.y-r)}var _=a.position();this.findOne(".top-left").y(_.y),this.findOne(".bottom-right").x(_.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(a.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(a.x());else if(this._movingAnchorName==="bottom-left"){if(y){var v=S?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};i=Math.sqrt(Math.pow(v.x-a.x(),2)+Math.pow(a.y()-v.y,2));var w=v.x{r._fire("transformend",{evt:e,target:r})}),this._movingAnchorName=null}}_fitNodesInto(e,n){var r=this._getNodeRect();const i=1;if(G._inRange(e.width,-this.padding()*2-i,i)){this.update();return}if(G._inRange(e.height,-this.padding()*2-i,i)){this.update();return}const a=this.flipEnabled();var s=new Wn;if(s.rotate(pe.getAngle(this.rotation())),this._movingAnchorName&&e.width<0&&this._movingAnchorName.indexOf("left")>=0){const p=s.point({x:-this.padding()*2,y:0});if(e.x+=p.x,e.y+=p.y,e.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,!a){this.update();return}}else if(this._movingAnchorName&&e.width<0&&this._movingAnchorName.indexOf("right")>=0){const p=s.point({x:this.padding()*2,y:0});if(this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,e.width+=this.padding()*2,!a){this.update();return}}if(this._movingAnchorName&&e.height<0&&this._movingAnchorName.indexOf("top")>=0){const p=s.point({x:0,y:-this.padding()*2});if(e.x+=p.x,e.y+=p.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,e.height+=this.padding()*2,!a){this.update();return}}else if(this._movingAnchorName&&e.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const p=s.point({x:0,y:this.padding()*2});if(this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,e.height+=this.padding()*2,!a){this.update();return}}if(this.boundBoxFunc()){const p=this.boundBoxFunc()(r,e);p?e=p:G.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const u=1e7,c=new Wn;c.translate(r.x,r.y),c.rotate(r.rotation),c.scale(r.width/u,r.height/u);const f=new Wn;f.translate(e.x,e.y),f.rotate(e.rotation),f.scale(e.width/u,e.height/u);const h=f.multiply(c.invert());this._nodes.forEach(p=>{var g;const y=p.getParent().getAbsoluteTransform(),v=p.getTransform().copy();v.translate(p.offsetX(),p.offsetY());const w=new Wn;w.multiply(y.copy().invert()).multiply(h).multiply(y).multiply(v);const x=w.decompose();p.setAttrs(x),this._fire("transform",{evt:n,target:p}),p._fire("transform",{evt:n,target:p}),(g=p.getLayer())===null||g===void 0||g.batchDraw()}),this.rotation(G._getRotation(e.rotation)),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(e,n){this.findOne(e).setAttrs(n)}update(){var e,n=this._getNodeRect();this.rotation(G._getRotation(n.rotation));var r=n.width,i=n.height,a=this.enabledAnchors(),s=this.resizeEnabled(),u=this.padding(),c=this.anchorSize();this.find("._anchor").forEach(f=>{f.setAttrs({width:c,height:c,offsetX:c/2,offsetY:c/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:c/2+u,offsetY:c/2+u,visible:s&&a.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:r/2,y:0,offsetY:c/2+u,visible:s&&a.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:r,y:0,offsetX:c/2-u,offsetY:c/2+u,visible:s&&a.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:i/2,offsetX:c/2+u,visible:s&&a.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:r,y:i/2,offsetX:c/2-u,visible:s&&a.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:i,offsetX:c/2+u,offsetY:c/2-u,visible:s&&a.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:r/2,y:i,offsetY:c/2-u,visible:s&&a.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:r,y:i,offsetX:c/2-u,offsetY:c/2-u,visible:s&&a.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:r/2,y:-this.rotateAnchorOffset()*G._sign(i)-u,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:r,height:i,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0}),(e=this.getLayer())===null||e===void 0||e.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();var e=this.findOne("."+this._movingAnchorName);e&&e.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),zs.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return se.prototype.toObject.call(this)}clone(e){var n=se.prototype.clone.call(this,e);return n}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}function H$(t){return t instanceof Array||G.warn("enabledAnchors value should be an array"),t instanceof Array&&t.forEach(function(e){sh.indexOf(e)===-1&&G.warn("Unknown anchor name: "+e+". Available names are: "+sh.join(", "))}),t||[]}Ke.prototype.className="Transformer";yt(Ke);A.addGetterSetter(Ke,"enabledAnchors",sh,H$);A.addGetterSetter(Ke,"flipEnabled",!0,jr());A.addGetterSetter(Ke,"resizeEnabled",!0);A.addGetterSetter(Ke,"anchorSize",10,le());A.addGetterSetter(Ke,"rotateEnabled",!0);A.addGetterSetter(Ke,"rotationSnaps",[]);A.addGetterSetter(Ke,"rotateAnchorOffset",50,le());A.addGetterSetter(Ke,"rotationSnapTolerance",5,le());A.addGetterSetter(Ke,"borderEnabled",!0);A.addGetterSetter(Ke,"anchorStroke","rgb(0, 161, 255)");A.addGetterSetter(Ke,"anchorStrokeWidth",1,le());A.addGetterSetter(Ke,"anchorFill","white");A.addGetterSetter(Ke,"anchorCornerRadius",0,le());A.addGetterSetter(Ke,"borderStroke","rgb(0, 161, 255)");A.addGetterSetter(Ke,"borderStrokeWidth",1,le());A.addGetterSetter(Ke,"borderDash");A.addGetterSetter(Ke,"keepRatio",!0);A.addGetterSetter(Ke,"centeredScaling",!1);A.addGetterSetter(Ke,"ignoreStroke",!1);A.addGetterSetter(Ke,"padding",0,le());A.addGetterSetter(Ke,"node");A.addGetterSetter(Ke,"nodes");A.addGetterSetter(Ke,"boundBoxFunc");A.addGetterSetter(Ke,"anchorDragBoundFunc");A.addGetterSetter(Ke,"shouldOverdrawWholeArea",!1);A.addGetterSetter(Ke,"useSingleNodeRotation",!0);A.backCompat(Ke,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});class qi extends re{_sceneFunc(e){e.beginPath(),e.arc(0,0,this.radius(),0,pe.getAngle(this.angle()),this.clockwise()),e.lineTo(0,0),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(e){this.radius(e/2)}setHeight(e){this.radius(e/2)}}qi.prototype.className="Wedge";qi.prototype._centroid=!0;qi.prototype._attrsAffectingSize=["radius"];yt(qi);A.addGetterSetter(qi,"radius",0,le());A.addGetterSetter(qi,"angle",0,le());A.addGetterSetter(qi,"clockwise",!1);A.backCompat(qi,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});function Gb(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var V$=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],q$=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function K$(t,e){var n=t.data,r=t.width,i=t.height,a,s,u,c,f,h,p,g,y,v,w,x,_,S,C,O,I,L,D,U,X,K,te,ce,j=e+e+1,T=r-1,$=i-1,V=e+1,ie=V*(V+1)/2,W=new Gb,Y=null,Q=W,oe=null,ve=null,we=V$[e],Ue=q$[e];for(u=1;u>Ue,te!==0?(te=255/te,n[h]=(g*we>>Ue)*te,n[h+1]=(y*we>>Ue)*te,n[h+2]=(v*we>>Ue)*te):n[h]=n[h+1]=n[h+2]=0,g-=x,y-=_,v-=S,w-=C,x-=oe.r,_-=oe.g,S-=oe.b,C-=oe.a,c=p+((c=a+e+1)>Ue,te>0?(te=255/te,n[c]=(g*we>>Ue)*te,n[c+1]=(y*we>>Ue)*te,n[c+2]=(v*we>>Ue)*te):n[c]=n[c+1]=n[c+2]=0,g-=x,y-=_,v-=S,w-=C,x-=oe.r,_-=oe.g,S-=oe.b,C-=oe.a,c=a+((c=s+V)<$?c:$)*r<<2,g+=O+=oe.r=n[c],y+=I+=oe.g=n[c+1],v+=L+=oe.b=n[c+2],w+=D+=oe.a=n[c+3],oe=oe.next,x+=U=ve.r,_+=X=ve.g,S+=K=ve.b,C+=te=ve.a,O-=U,I-=X,L-=K,D-=te,ve=ve.next,h+=r}}const Y$=function(e){var n=Math.round(this.blurRadius());n>0&&K$(e,n)};A.addGetterSetter(se,"blurRadius",0,le(),A.afterSetFilter);const X$=function(t){var e=this.brightness()*255,n=t.data,r=n.length,i;for(i=0;i255?255:i,a=a<0?0:a>255?255:a,s=s<0?0:s>255?255:s,n[u]=i,n[u+1]=a,n[u+2]=s};A.addGetterSetter(se,"contrast",0,le(),A.afterSetFilter);const J$=function(t){var e=this.embossStrength()*10,n=this.embossWhiteLevel()*255,r=this.embossDirection(),i=this.embossBlend(),a=0,s=0,u=t.data,c=t.width,f=t.height,h=c*4,p=f;switch(r){case"top-left":a=-1,s=-1;break;case"top":a=-1,s=0;break;case"top-right":a=-1,s=1;break;case"right":a=0,s=1;break;case"bottom-right":a=1,s=1;break;case"bottom":a=1,s=0;break;case"bottom-left":a=1,s=-1;break;case"left":a=0,s=-1;break;default:G.error("Unknown emboss direction: "+r)}do{var g=(p-1)*h,y=a;p+y<1&&(y=0),p+y>f&&(y=0);var v=(p-1+y)*c*4,w=c;do{var x=g+(w-1)*4,_=s;w+_<1&&(_=0),w+_>c&&(_=0);var S=v+(w-1+_)*4,C=u[x]-u[S],O=u[x+1]-u[S+1],I=u[x+2]-u[S+2],L=C,D=L>0?L:-L,U=O>0?O:-O,X=I>0?I:-I;if(U>D&&(L=O),X>D&&(L=I),L*=e,i){var K=u[x]+L,te=u[x+1]+L,ce=u[x+2]+L;u[x]=K>255?255:K<0?0:K,u[x+1]=te>255?255:te<0?0:te,u[x+2]=ce>255?255:ce<0?0:ce}else{var j=n-L;j<0?j=0:j>255&&(j=255),u[x]=u[x+1]=u[x+2]=j}}while(--w)}while(--p)};A.addGetterSetter(se,"embossStrength",.5,le(),A.afterSetFilter);A.addGetterSetter(se,"embossWhiteLevel",.5,le(),A.afterSetFilter);A.addGetterSetter(se,"embossDirection","top-left",null,A.afterSetFilter);A.addGetterSetter(se,"embossBlend",!1,null,A.afterSetFilter);function Mm(t,e,n,r,i){var a=n-e,s=i-r,u;return a===0?r+s/2:s===0?r:(u=(t-e)/a,u=s*u+r,u)}const Z$=function(t){var e=t.data,n=e.length,r=e[0],i=r,a,s=e[1],u=s,c,f=e[2],h=f,p,g,y=this.enhance();if(y!==0){for(g=0;gi&&(i=a),c=e[g+1],cu&&(u=c),p=e[g+2],ph&&(h=p);i===r&&(i=255,r=0),u===s&&(u=255,s=0),h===f&&(h=255,f=0);var v,w,x,_,S,C,O,I,L;for(y>0?(w=i+y*(255-i),x=r-y*(r-0),S=u+y*(255-u),C=s-y*(s-0),I=h+y*(255-h),L=f-y*(f-0)):(v=(i+r)*.5,w=i+y*(i-v),x=r+y*(r-v),_=(u+s)*.5,S=u+y*(u-_),C=s+y*(s-_),O=(h+f)*.5,I=h+y*(h-O),L=f+y*(f-O)),g=0;g_?x:_;var S=s,C=a,O,I,L=360/C*Math.PI/180,D,U;for(I=0;IC?S:C;var O=s,I=a,L,D,U=n.polarRotation||0,X,K;for(h=0;he&&(O=C,I=0,L=-1),i=0;i=0&&y=0&&v=0&&y=0&&v=255*4?255:0}return s}function dz(t,e,n){for(var r=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],i=Math.round(Math.sqrt(r.length)),a=Math.floor(i/2),s=[],u=0;u=0&&y=0&&v=n))for(a=w;a=r||(s=(n*a+i)*4,u+=O[s+0],c+=O[s+1],f+=O[s+2],h+=O[s+3],C+=1);for(u=u/C,c=c/C,f=f/C,h=h/C,i=y;i=n))for(a=w;a=r||(s=(n*a+i)*4,O[s+0]=u,O[s+1]=c,O[s+2]=f,O[s+3]=h)}};A.addGetterSetter(se,"pixelSize",8,le(),A.afterSetFilter);const mz=function(t){var e=Math.round(this.levels()*254)+1,n=t.data,r=n.length,i=255/e,a;for(a=0;a255?255:t<0?0:Math.round(t)});A.addGetterSetter(se,"green",0,function(t){return this._filterUpToDate=!1,t>255?255:t<0?0:Math.round(t)});A.addGetterSetter(se,"blue",0,$k,A.afterSetFilter);const yz=function(t){var e=t.data,n=e.length,r=this.red(),i=this.green(),a=this.blue(),s=this.alpha(),u,c;for(u=0;u255?255:t<0?0:Math.round(t)});A.addGetterSetter(se,"green",0,function(t){return this._filterUpToDate=!1,t>255?255:t<0?0:Math.round(t)});A.addGetterSetter(se,"blue",0,$k,A.afterSetFilter);A.addGetterSetter(se,"alpha",1,function(t){return this._filterUpToDate=!1,t>1?1:t<0?0:t});const Sz=function(t){var e=t.data,n=e.length,r,i,a,s;for(r=0;r127&&(f=255-f),h>127&&(h=255-h),p>127&&(p=255-p),e[c]=f,e[c+1]=h,e[c+2]=p}while(--u)}while(--a)},wz=function(t){var e=this.threshold()*255,n=t.data,r=n.length,i;for(i=0;i{const{width:n,height:r}=e,i=document.createElement("div"),a=new Vl.Stage({container:i,width:n,height:r}),s=new Vl.Layer,u=new Vl.Layer;s.add(new Vl.Rect({...e,fill:"white"})),t.forEach(f=>u.add(new Vl.Line({points:f.points,stroke:"black",strokeWidth:f.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,globalCompositeOperation:f.tool==="brush"?"source-over":"destination-out"}))),a.add(s),a.add(u);const c=a.toDataURL({...e});return i.remove(),c};let vP=null,yP=null;const zW=t=>{vP=t},Cz=()=>vP,GW=t=>{yP=t},UW=()=>yP,xz=t=>{const e=window.open("");e&&t.forEach(n=>{const r=new Image;r.src=n.base64,e.document.write(n.caption),e.document.write("
"),e.document.write(r.outerHTML),e.document.write("

")})},kz=(t,e)=>Math.floor(Math.random()*(e-t+1)+t),Pz=t=>{const e=Cz(),{generationMode:n,generationState:r,postprocessingState:i,canvasState:a,systemState:s}=t,{codeformerFidelity:u,facetoolStrength:c,facetoolType:f,hiresFix:h,hiresStrength:p,shouldRunESRGAN:g,shouldRunFacetool:y,upscalingLevel:v,upscalingStrength:w,upscalingDenoising:x}=i,{cfgScale:_,height:S,img2imgStrength:C,infillMethod:O,initialImage:I,iterations:L,perlin:D,prompt:U,negativePrompt:X,sampler:K,seamBlur:te,seamless:ce,seamSize:j,seamSteps:T,seamStrength:$,seed:V,seedWeights:ie,shouldFitToWidthHeight:W,shouldGenerateVariations:Y,shouldRandomizeSeed:Q,steps:oe,threshold:ve,tileSize:we,variationAmount:Ue,width:At,shouldUseSymmetry:me,horizontalSymmetrySteps:qt,verticalSymmetrySteps:Bt}=r,{shouldDisplayInProgressType:bn,saveIntermediatesInterval:wr,enableImageDebugging:Ft}=s,xe={prompt:U,iterations:L,steps:oe,cfg_scale:_,threshold:ve,perlin:D,height:S,width:At,sampler_name:K,seed:V,progress_images:bn==="full-res",progress_latents:bn==="latents",save_intermediates:wr,generation_mode:n,init_mask:""};let Wr=!1,Et=!1;if(X!==""&&(xe.prompt=`${U} [${X}]`),xe.seed=Q?kz(cF,fF):V,me&&(qt>0&&(xe.h_symmetry_time_pct=Math.max(0,Math.min(1,qt/oe))),Bt>0&&(xe.v_symmetry_time_pct=Math.max(0,Math.min(1,Bt/oe)))),n==="txt2img"&&(xe.hires_fix=h,h&&(xe.strength=p)),["txt2img","img2img"].includes(n)&&(xe.seamless=ce,g&&(Wr={level:v,denoise_str:x,strength:w}),y&&(Et={type:f,strength:c},f==="codeformer"&&(Et.codeformer_fidelity=u))),n==="img2img"&&I&&(xe.init_img=typeof I=="string"?I:I.url,xe.strength=C,xe.fit=W),n==="unifiedCanvas"&&e){const{layerState:{objects:gi},boundingBoxCoordinates:Xs,boundingBoxDimensions:Mn,stageScale:Fa,isMaskEnabled:Qs,shouldPreserveMaskedArea:er,boundingBoxScaleMethod:Kt,scaledBoundingBoxDimensions:Dn}=a,bt={...Xs,...Mn},$a=bz(Qs?gi.filter(Qx):[],bt);xe.init_mask=$a,xe.fit=!1,xe.strength=C,xe.invert_mask=er,xe.bounding_box=bt;const Hr=e.scale();e.scale({x:1/Fa,y:1/Fa});const Co=e.getAbsolutePosition(),Vr=e.toDataURL({x:bt.x+Co.x,y:bt.y+Co.y,width:bt.width,height:bt.height});Ft&&xz([{base64:$a,caption:"mask sent as init_mask"},{base64:Vr,caption:"image sent as init_img"}]),e.scale(Hr),xe.init_img=Vr,xe.progress_images=!1,Kt!=="none"&&(xe.inpaint_width=Dn.width,xe.inpaint_height=Dn.height),xe.seam_size=j,xe.seam_blur=te,xe.seam_strength=$,xe.seam_steps=T,xe.tile_size=we,xe.infill_method=O,xe.force_outpaint=!1}return Y?(xe.variation_amount=Ue,ie&&(xe.with_variations=A5(ie))):xe.variation_amount=0,Ft&&(xe.enable_image_debugging=Ft),{generationParameters:xe,esrganParameters:Wr,facetoolParameters:Et}};var Ez=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,Oz=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g,Tz=/[^-+\dA-Z]/g;function Ut(t,e,n,r){if(arguments.length===1&&typeof t=="string"&&!/\d/.test(t)&&(e=t,t=void 0),t=t||t===0?t:new Date,t instanceof Date||(t=new Date(t)),isNaN(t))throw TypeError("Invalid date");e=String(Ub[e]||e||Ub.default);var i=e.slice(0,4);(i==="UTC:"||i==="GMT:")&&(e=e.slice(4),n=!0,i==="GMT:"&&(r=!0));var a=function(){return n?"getUTC":"get"},s=function(){return t[a()+"Date"]()},u=function(){return t[a()+"Day"]()},c=function(){return t[a()+"Month"]()},f=function(){return t[a()+"FullYear"]()},h=function(){return t[a()+"Hours"]()},p=function(){return t[a()+"Minutes"]()},g=function(){return t[a()+"Seconds"]()},y=function(){return t[a()+"Milliseconds"]()},v=function(){return n?0:t.getTimezoneOffset()},w=function(){return Rz(t)},x=function(){return Az(t)},_={d:function(){return s()},dd:function(){return Un(s())},ddd:function(){return En.dayNames[u()]},DDD:function(){return jb({y:f(),m:c(),d:s(),_:a(),dayName:En.dayNames[u()],short:!0})},dddd:function(){return En.dayNames[u()+7]},DDDD:function(){return jb({y:f(),m:c(),d:s(),_:a(),dayName:En.dayNames[u()+7]})},m:function(){return c()+1},mm:function(){return Un(c()+1)},mmm:function(){return En.monthNames[c()]},mmmm:function(){return En.monthNames[c()+12]},yy:function(){return String(f()).slice(2)},yyyy:function(){return Un(f(),4)},h:function(){return h()%12||12},hh:function(){return Un(h()%12||12)},H:function(){return h()},HH:function(){return Un(h())},M:function(){return p()},MM:function(){return Un(p())},s:function(){return g()},ss:function(){return Un(g())},l:function(){return Un(y(),3)},L:function(){return Un(Math.floor(y()/10))},t:function(){return h()<12?En.timeNames[0]:En.timeNames[1]},tt:function(){return h()<12?En.timeNames[2]:En.timeNames[3]},T:function(){return h()<12?En.timeNames[4]:En.timeNames[5]},TT:function(){return h()<12?En.timeNames[6]:En.timeNames[7]},Z:function(){return r?"GMT":n?"UTC":Iz(t)},o:function(){return(v()>0?"-":"+")+Un(Math.floor(Math.abs(v())/60)*100+Math.abs(v())%60,4)},p:function(){return(v()>0?"-":"+")+Un(Math.floor(Math.abs(v())/60),2)+":"+Un(Math.floor(Math.abs(v())%60),2)},S:function(){return["th","st","nd","rd"][s()%10>3?0:(s()%100-s()%10!=10)*s()%10]},W:function(){return w()},WW:function(){return Un(w())},N:function(){return x()}};return e.replace(Ez,function(S){return S in _?_[S]():S.slice(1,S.length-1)})}var Ub={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",paddedShortDate:"mm/dd/yyyy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},En={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]},Un=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return String(e).padStart(n,"0")},jb=function(e){var n=e.y,r=e.m,i=e.d,a=e._,s=e.dayName,u=e.short,c=u===void 0?!1:u,f=new Date,h=new Date;h.setDate(h[a+"Date"]()-1);var p=new Date;p.setDate(p[a+"Date"]()+1);var g=function(){return f[a+"Date"]()},y=function(){return f[a+"Month"]()},v=function(){return f[a+"FullYear"]()},w=function(){return h[a+"Date"]()},x=function(){return h[a+"Month"]()},_=function(){return h[a+"FullYear"]()},S=function(){return p[a+"Date"]()},C=function(){return p[a+"Month"]()},O=function(){return p[a+"FullYear"]()};return v()===n&&y()===r&&g()===i?c?"Tdy":"Today":_()===n&&x()===r&&w()===i?c?"Ysd":"Yesterday":O()===n&&C()===r&&S()===i?c?"Tmw":"Tomorrow":s},Rz=function(e){var n=new Date(e.getFullYear(),e.getMonth(),e.getDate());n.setDate(n.getDate()-(n.getDay()+6)%7+3);var r=new Date(n.getFullYear(),0,4);r.setDate(r.getDate()-(r.getDay()+6)%7+3);var i=n.getTimezoneOffset()-r.getTimezoneOffset();n.setHours(n.getHours()-i);var a=(n-r)/(864e5*7);return 1+Math.floor(a)},Az=function(e){var n=e.getDay();return n===0&&(n=7),n},Iz=function(e){return(String(e).match(Oz)||[""]).pop().replace(Tz,"").replace(/GMT\+0000/g,"UTC")};const Lz=(t,e)=>{const{dispatch:n,getState:r}=t;return{emitGenerateImage:i=>{n(ei(!0));const a=r(),{generation:s,postprocessing:u,system:c,canvas:f}=a,h={generationMode:i,generationState:s,postprocessingState:u,canvasState:f,systemState:c};n(mB());const{generationParameters:p,esrganParameters:g,facetoolParameters:y}=Pz(h);e.emit("generateImage",p,g,y),p.init_mask&&(p.init_mask=p.init_mask.substr(0,64).concat("...")),p.init_img&&(p.init_img=p.init_img.substr(0,64).concat("...")),n(Gt({timestamp:Ut(new Date,"isoDateTime"),message:`Image generation requested: ${JSON.stringify({...p,...g,...y})}`}))},emitRunESRGAN:i=>{n(ei(!0));const{postprocessing:{upscalingLevel:a,upscalingDenoising:s,upscalingStrength:u}}=r(),c={upscale:[a,s,u]};e.emit("runPostprocessing",i,{type:"esrgan",...c}),n(Gt({timestamp:Ut(new Date,"isoDateTime"),message:`ESRGAN upscale requested: ${JSON.stringify({file:i.url,...c})}`}))},emitRunFacetool:i=>{n(ei(!0));const{postprocessing:{facetoolType:a,facetoolStrength:s,codeformerFidelity:u}}=r(),c={facetool_strength:s};a==="codeformer"&&(c.codeformer_fidelity=u),e.emit("runPostprocessing",i,{type:a,...c}),n(Gt({timestamp:Ut(new Date,"isoDateTime"),message:`Face restoration (${a}) requested: ${JSON.stringify({file:i.url,...c})}`}))},emitDeleteImage:i=>{const{url:a,uuid:s,category:u,thumbnail:c}=i;n(ek(i)),e.emit("deleteImage",a,c,s,u)},emitRequestImages:i=>{const a=r().gallery,{earliest_mtime:s}=a.categories[i];e.emit("requestImages",i,s)},emitRequestNewImages:i=>{const a=r().gallery,{latest_mtime:s}=a.categories[i];e.emit("requestLatestImages",i,s)},emitCancelProcessing:()=>{e.emit("cancel")},emitRequestSystemConfig:()=>{e.emit("requestSystemConfig")},emitSearchForModels:i=>{e.emit("searchForModels",i)},emitAddNewModel:i=>{e.emit("addNewModel",i)},emitDeleteModel:i=>{e.emit("deleteModel",i)},emitConvertToDiffusers:i=>{n(pB()),e.emit("convertToDiffusers",i)},emitMergeDiffusersModels:i=>{n(gB()),e.emit("mergeDiffusersModels",i)},emitRequestModelChange:i=>{n(hB()),e.emit("requestModelChange",i)},emitSaveStagingAreaImageToGallery:i=>{e.emit("requestSaveStagingAreaImageToGallery",i)},emitRequestEmptyTempFolder:()=>{e.emit("requestEmptyTempFolder")}}};let Hf;const Mz=new Uint8Array(16);function Dz(){if(!Hf&&(Hf=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Hf))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Hf(Mz)}const Jt=[];for(let t=0;t<256;++t)Jt.push((t+256).toString(16).slice(1));function Nz(t,e=0){return(Jt[t[e+0]]+Jt[t[e+1]]+Jt[t[e+2]]+Jt[t[e+3]]+"-"+Jt[t[e+4]]+Jt[t[e+5]]+"-"+Jt[t[e+6]]+Jt[t[e+7]]+"-"+Jt[t[e+8]]+Jt[t[e+9]]+"-"+Jt[t[e+10]]+Jt[t[e+11]]+Jt[t[e+12]]+Jt[t[e+13]]+Jt[t[e+14]]+Jt[t[e+15]]).toLowerCase()}const Bz=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Wb={randomUUID:Bz};function Vf(t,e,n){if(Wb.randomUUID&&!e&&!t)return Wb.randomUUID();t=t||{};const r=t.random||(t.rng||Dz)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,e){n=n||0;for(let i=0;i<16;++i)e[n+i]=r[i];return e}return Nz(r)}const jW=dt("socketio/generateImage"),WW=dt("socketio/runESRGAN"),HW=dt("socketio/runFacetool"),VW=dt("socketio/deleteImage"),Hb=dt("socketio/requestImages"),Vb=dt("socketio/requestNewImages"),qW=dt("socketio/cancelProcessing"),Fz=dt("socketio/requestSystemConfig"),KW=dt("socketio/searchForModels"),YW=dt("socketio/addNewModel"),XW=dt("socketio/deleteModel"),QW=dt("socketio/convertToDiffusers"),JW=dt("socketio/mergeDiffusersModels"),ZW=dt("socketio/requestModelChange"),eH=dt("socketio/saveStagingAreaImageToGallery"),tH=dt("socketio/requestEmptyTempFolder"),$z=t=>{const{dispatch:e,getState:n}=t;return{onConnect:()=>{try{e(ub(!0)),e(ns(Ae.t("common.statusConnected"))),e(Fz());const r=n().gallery;r.categories.result.latest_mtime?e(Vb("result")):e(Hb("result")),r.categories.user.latest_mtime?e(Vb("user")):e(Hb("user"))}catch(r){console.error(r)}},onDisconnect:()=>{try{e(ub(!1)),e(ns(Ae.t("common.statusDisconnected"))),e(Gt({timestamp:Ut(new Date,"isoDateTime"),message:"Disconnected from server",level:"warning"}))}catch(r){console.error(r)}},onGenerationResult:r=>{try{const i=n(),{activeTab:a}=i.ui,{shouldLoopback:s}=i.postprocessing,{boundingBox:u,generationMode:c,...f}=r,h={uuid:Vf(),...f};if(["txt2img","img2img"].includes(c)&&e(Of({category:"result",image:{...h,category:"result"}})),c==="unifiedCanvas"&&r.boundingBox){const{boundingBox:p}=r;e(S5({image:{...h,category:"temp"},boundingBox:p})),i.canvas.shouldAutoSave&&e(Of({image:{...h,category:"result"},category:"result"}))}if(s)switch(wk[a]){case"img2img":{e(D5(h));break}}e(Cm()),e(Gt({timestamp:Ut(new Date,"isoDateTime"),message:`Image generated: ${r.url}`}))}catch(i){console.error(i)}},onIntermediateResult:r=>{try{e(C5({uuid:Vf(),...r,category:"result"})),r.isBase64||e(Gt({timestamp:Ut(new Date,"isoDateTime"),message:`Intermediate image generated: ${r.url}`}))}catch(i){console.error(i)}},onPostprocessingResult:r=>{try{e(Of({category:"result",image:{uuid:Vf(),...r,category:"result"}})),e(Gt({timestamp:Ut(new Date,"isoDateTime"),message:`Postprocessed: ${r.url}`}))}catch(i){console.error(i)}},onProgressUpdate:r=>{try{e(ei(!0)),e(cB(r))}catch(i){console.error(i)}},onError:r=>{const{message:i,additionalData:a}=r;try{e(Gt({timestamp:Ut(new Date,"isoDateTime"),message:`Server error: ${i}`,level:"error"})),e(cb()),e(Cm())}catch(s){console.error(s)}},onGalleryImages:r=>{const{images:i,areMoreImagesAvailable:a,category:s}=r,u=i.map(c=>({uuid:Vf(),...c}));e(b5({images:u,areMoreImagesAvailable:a,category:s})),e(Gt({timestamp:Ut(new Date,"isoDateTime"),message:`Loaded ${i.length} images`}))},onProcessingCanceled:()=>{e(dB());const{intermediateImage:r}=n().gallery;r&&(r.isBase64||(e(Of({category:"result",image:r})),e(Gt({timestamp:Ut(new Date,"isoDateTime"),message:`Intermediate image saved: ${r.url}`}))),e(Cm())),e(Gt({timestamp:Ut(new Date,"isoDateTime"),message:"Processing canceled",level:"warning"}))},onImageDeleted:r=>{const{url:i}=r;e(ek(r));const{generation:{initialImage:a,maskPath:s}}=n();(a===i||(a==null?void 0:a.url)===i)&&e(L5()),s===i&&e(N5("")),e(Gt({timestamp:Ut(new Date,"isoDateTime"),message:`Image deleted: ${i}`}))},onSystemConfig:r=>{e(fB(r)),r.infill_methods.includes("patchmatch")||e(M5(r.infill_methods[0]))},onFoundModels:r=>{const{search_folder:i,found_models:a}=r;e(vB(i)),e(yB(a))},onNewModelAdded:r=>{const{new_model_name:i,model_list:a,update:s}=r;e(rs(a)),e(ei(!1)),e(ns(Ae.t("modelManager.modelAdded"))),e(Gt({timestamp:Ut(new Date,"isoDateTime"),message:`Model Added: ${i}`,level:"info"})),e(zl({title:s?`${Ae.t("modelManager.modelUpdated")}: ${i}`:`${Ae.t("modelManager.modelAdded")}: ${i}`,status:"success",duration:2500,isClosable:!0}))},onModelDeleted:r=>{const{deleted_model_name:i,model_list:a}=r;e(rs(a)),e(ei(!1)),e(Gt({timestamp:Ut(new Date,"isoDateTime"),message:`${Ae.t("modelManager.modelAdded")}: ${i}`,level:"info"})),e(zl({title:`${Ae.t("modelManager.modelEntryDeleted")}: ${i}`,status:"success",duration:2500,isClosable:!0}))},onModelConverted:r=>{const{converted_model_name:i,model_list:a}=r;e(rs(a)),e(ns(Ae.t("common.statusModelConverted"))),e(ei(!1)),e(Af(!0)),e(Gt({timestamp:Ut(new Date,"isoDateTime"),message:`Model converted: ${i}`,level:"info"})),e(zl({title:`${Ae.t("modelManager.modelConverted")}: ${i}`,status:"success",duration:2500,isClosable:!0}))},onModelsMerged:r=>{const{merged_models:i,merged_model_name:a,model_list:s}=r;e(rs(s)),e(ns(Ae.t("common.statusMergedModels"))),e(ei(!1)),e(Af(!0)),e(Gt({timestamp:Ut(new Date,"isoDateTime"),message:`Models merged: ${i}`,level:"info"})),e(zl({title:`${Ae.t("modelManager.modelsMerged")}: ${a}`,status:"success",duration:2500,isClosable:!0}))},onModelChanged:r=>{const{model_name:i,model_list:a}=r;e(rs(a)),e(ns(Ae.t("common.statusModelChanged"))),e(ei(!1)),e(Af(!0)),e(Gt({timestamp:Ut(new Date,"isoDateTime"),message:`Model changed: ${i}`,level:"info"}))},onModelChangeFailed:r=>{const{model_name:i,model_list:a}=r;e(rs(a)),e(ei(!1)),e(Af(!0)),e(cb()),e(Gt({timestamp:Ut(new Date,"isoDateTime"),message:`Model change failed: ${i}`,level:"error"}))},onTempFolderEmptied:()=>{e(zl({title:Ae.t("toast.tempFoldersEmptied"),status:"success",duration:2500,isClosable:!0}))}}},zz=()=>{const{origin:t}=new URL(window.location.href),e=gd(t,{timeout:6e4,path:`${window.location.pathname}socket.io`});let n=!1;return i=>a=>s=>{const{onConnect:u,onDisconnect:c,onError:f,onPostprocessingResult:h,onGenerationResult:p,onIntermediateResult:g,onProgressUpdate:y,onGalleryImages:v,onProcessingCanceled:w,onImageDeleted:x,onSystemConfig:_,onModelChanged:S,onFoundModels:C,onNewModelAdded:O,onModelDeleted:I,onModelConverted:L,onModelsMerged:D,onModelChangeFailed:U,onTempFolderEmptied:X}=$z(i),{emitGenerateImage:K,emitRunESRGAN:te,emitRunFacetool:ce,emitDeleteImage:j,emitRequestImages:T,emitRequestNewImages:$,emitCancelProcessing:V,emitRequestSystemConfig:ie,emitSearchForModels:W,emitAddNewModel:Y,emitDeleteModel:Q,emitConvertToDiffusers:oe,emitMergeDiffusersModels:ve,emitRequestModelChange:we,emitSaveStagingAreaImageToGallery:Ue,emitRequestEmptyTempFolder:At}=Lz(i,e);switch(n||(e.on("connect",()=>u()),e.on("disconnect",()=>c()),e.on("error",me=>f(me)),e.on("generationResult",me=>p(me)),e.on("postprocessingResult",me=>h(me)),e.on("intermediateResult",me=>g(me)),e.on("progressUpdate",me=>y(me)),e.on("galleryImages",me=>v(me)),e.on("processingCanceled",()=>{w()}),e.on("imageDeleted",me=>{x(me)}),e.on("systemConfig",me=>{_(me)}),e.on("foundModels",me=>{C(me)}),e.on("newModelAdded",me=>{O(me)}),e.on("modelDeleted",me=>{I(me)}),e.on("modelConverted",me=>{L(me)}),e.on("modelsMerged",me=>{D(me)}),e.on("modelChanged",me=>{S(me)}),e.on("modelChangeFailed",me=>{U(me)}),e.on("tempFolderEmptied",()=>{X()}),n=!0),s.type){case"socketio/generateImage":{K(s.payload);break}case"socketio/runESRGAN":{te(s.payload);break}case"socketio/runFacetool":{ce(s.payload);break}case"socketio/deleteImage":{j(s.payload);break}case"socketio/requestImages":{T(s.payload);break}case"socketio/requestNewImages":{$(s.payload);break}case"socketio/cancelProcessing":{V();break}case"socketio/requestSystemConfig":{ie();break}case"socketio/searchForModels":{W(s.payload);break}case"socketio/addNewModel":{Y(s.payload);break}case"socketio/deleteModel":{Q(s.payload);break}case"socketio/convertToDiffusers":{oe(s.payload);break}case"socketio/mergeDiffusersModels":{ve(s.payload);break}case"socketio/requestModelChange":{we(s.payload);break}case"socketio/saveStagingAreaImageToGallery":{Ue(s.payload);break}case"socketio/requestEmptyTempFolder":{At();break}}a(s)}},Gz=["cursorPosition","isCanvasInitialized","doesCanvasNeedScaling"].map(t=>`canvas.${t}`),Uz=["currentIteration","currentStatus","currentStep","isCancelable","isConnected","isESRGANAvailable","isGFPGANAvailable","isProcessing","socketId","totalIterations","totalSteps","openModel","cancelOptions.cancelAfter"].map(t=>`system.${t}`),jz=["categories","currentCategory","currentImage","currentImageUuid","shouldAutoSwitchToNewImages","intermediateImage"].map(t=>`gallery.${t}`),Wz=["isLightboxOpen"].map(t=>`lightbox.${t}`),SP=Fx({generation:B5,postprocessing:$5,gallery:x5,system:SB,canvas:_5,ui:bB,lightbox:E5}),Hz=Yx.getPersistConfig({key:"root",storage:Kx,rootReducer:SP,blacklist:[...Gz,...Uz,...jz,...Wz],debounce:300}),Vz=ZN(Hz,SP),_P=TN({reducer:Vz,middleware:t=>t({immutableCheck:!1,serializableCheck:!1}).concat(zz()),devTools:{actionsDenylist:["canvas/setCursorPosition","canvas/setStageCoordinates","canvas/setStageScale","canvas/setIsDrawing","canvas/setBoundingBoxCoordinates","canvas/setBoundingBoxDimensions","canvas/setIsDrawing","canvas/addPointToCurrentLine"]}}),qz=a5(_P);function Kz(t){if(t.sheet)return t.sheet;for(var e=0;e0?en(Ys,--Ln):0,Gs--,Ot===10&&(Gs=1,rp--),Ot}function Kn(){return Ot=Ln2||Wu(Ot)>3?"":" "}function oG(t,e){for(;--e&&Kn()&&!(Ot<48||Ot>102||Ot>57&&Ot<65||Ot>70&&Ot<97););return ec(t,Sd()+(e<6&&ci()==32&&Kn()==32))}function cy(t){for(;Kn();)switch(Ot){case t:return Ln;case 34:case 39:t!==34&&t!==39&&cy(Ot);break;case 40:t===41&&cy(t);break;case 92:Kn();break}return Ln}function sG(t,e){for(;Kn()&&t+Ot!==47+10;)if(t+Ot===42+42&&ci()===47)break;return"/*"+ec(e,Ln-1)+"*"+np(t===47?t:Kn())}function lG(t){for(;!Wu(ci());)Kn();return ec(t,Ln)}function uG(t){return PP(wd("",null,null,null,[""],t=kP(t),0,[0],t))}function wd(t,e,n,r,i,a,s,u,c){for(var f=0,h=0,p=s,g=0,y=0,v=0,w=1,x=1,_=1,S=0,C="",O=i,I=a,L=r,D=C;x;)switch(v=S,S=Kn()){case 40:if(v!=108&&en(D,p-1)==58){uy(D+=qe(_d(S),"&","&\f"),"&\f")!=-1&&(_=-1);break}case 34:case 39:case 91:D+=_d(S);break;case 9:case 10:case 13:case 32:D+=aG(v);break;case 92:D+=oG(Sd()-1,7);continue;case 47:switch(ci()){case 42:case 47:qf(cG(sG(Kn(),Sd()),e,n),c);break;default:D+="/"}break;case 123*w:u[f++]=ti(D)*_;case 125*w:case 59:case 0:switch(S){case 0:case 125:x=0;case 59+h:y>0&&ti(D)-p&&qf(y>32?Kb(D+";",r,n,p-1):Kb(qe(D," ","")+";",r,n,p-2),c);break;case 59:D+=";";default:if(qf(L=qb(D,e,n,f,h,i,u,C,O=[],I=[],p),a),S===123)if(h===0)wd(D,e,L,L,O,a,p,u,I);else switch(g===99&&en(D,3)===110?100:g){case 100:case 109:case 115:wd(t,L,L,r&&qf(qb(t,L,L,0,0,i,u,C,i,O=[],p),I),i,I,p,u,r?O:I);break;default:wd(D,L,L,L,[""],I,0,u,I)}}f=h=y=0,w=_=1,C=D="",p=s;break;case 58:p=1+ti(D),y=v;default:if(w<1){if(S==123)--w;else if(S==125&&w++==0&&iG()==125)continue}switch(D+=np(S),S*w){case 38:_=h>0?1:(D+="\f",-1);break;case 44:u[f++]=(ti(D)-1)*_,_=1;break;case 64:ci()===45&&(D+=_d(Kn())),g=ci(),h=p=ti(C=D+=lG(Sd())),S++;break;case 45:v===45&&ti(D)==2&&(w=0)}}return a}function qb(t,e,n,r,i,a,s,u,c,f,h){for(var p=i-1,g=i===0?a:[""],y=$0(g),v=0,w=0,x=0;v0?g[_]+" "+S:qe(S,/&\f/g,g[_])))&&(c[x++]=C);return ip(t,e,n,i===0?B0:u,c,f,h)}function cG(t,e,n){return ip(t,e,n,wP,np(rG()),ju(t,2,-2),0)}function Kb(t,e,n,r){return ip(t,e,n,F0,ju(t,0,r),ju(t,r+1,-1),r)}function Rs(t,e){for(var n="",r=$0(t),i=0;i6)switch(en(t,e+1)){case 109:if(en(t,e+4)!==45)break;case 102:return qe(t,/(.+:)(.+)-([^]+)/,"$1"+He+"$2-$3$1"+lh+(en(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~uy(t,"stretch")?OP(qe(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(en(t,e+1)!==115)break;case 6444:switch(en(t,ti(t)-3-(~uy(t,"!important")&&10))){case 107:return qe(t,":",":"+He)+t;case 101:return qe(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+He+(en(t,14)===45?"inline-":"")+"box$3$1"+He+"$2$3$1"+ln+"$2box$3")+t}break;case 5936:switch(en(t,e+11)){case 114:return He+t+ln+qe(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return He+t+ln+qe(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return He+t+ln+qe(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return He+t+ln+t+t}return t}var SG=function(e,n,r,i){if(e.length>-1&&!e.return)switch(e.type){case F0:e.return=OP(e.value,e.length);break;case bP:return Rs([ql(e,{value:qe(e.value,"@","@"+He)})],i);case B0:if(e.length)return nG(e.props,function(a){switch(tG(a,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Rs([ql(e,{props:[qe(a,/:(read-\w+)/,":"+lh+"$1")]})],i);case"::placeholder":return Rs([ql(e,{props:[qe(a,/:(plac\w+)/,":"+He+"input-$1")]}),ql(e,{props:[qe(a,/:(plac\w+)/,":"+lh+"$1")]}),ql(e,{props:[qe(a,/:(plac\w+)/,ln+"input-$1")]})],i)}return""})}},_G=[SG],wG=function(e){var n=e.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(w){var x=w.getAttribute("data-emotion");x.indexOf(" ")!==-1&&(document.head.appendChild(w),w.setAttribute("data-s",""))})}var i=e.stylisPlugins||_G,a={},s,u=[];s=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(w){for(var x=w.getAttribute("data-emotion").split(" "),_=1;_=4;++r,i-=4)n=t.charCodeAt(r)&255|(t.charCodeAt(++r)&255)<<8|(t.charCodeAt(++r)&255)<<16|(t.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(i){case 3:e^=(t.charCodeAt(r+2)&255)<<16;case 2:e^=(t.charCodeAt(r+1)&255)<<8;case 1:e^=t.charCodeAt(r)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var kG={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},PG=/[A-Z]|^ms/g,EG=/_EMO_([^_]+?)_([^]*?)_EMO_/g,AP=function(e){return e.charCodeAt(1)===45},Qb=function(e){return e!=null&&typeof e!="boolean"},Dm=EP(function(t){return AP(t)?t:t.replace(PG,"-$&").toLowerCase()}),Jb=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(EG,function(r,i,a){return ni={name:i,styles:a,next:ni},i})}return kG[e]!==1&&!AP(e)&&typeof n=="number"&&n!==0?n+"px":n};function Hu(t,e,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 ni={name:n.name,styles:n.styles,next:ni},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)ni={name:r.name,styles:r.styles,next:ni},r=r.next;var i=n.styles+";";return i}return OG(t,e,n)}case"function":{if(t!==void 0){var a=ni,s=n(t);return ni=a,Hu(t,e,s)}break}}if(e==null)return n;var u=e[n];return u!==void 0?u:n}function OG(t,e,n){var r="";if(Array.isArray(n))for(var i=0;i` or ``");return t}var NP=be.createContext({});NP.displayName="ColorModeContext";function BP(){const t=be.useContext(NP);if(t===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return t}function DG(){const t=BP(),e=DP();return{...t,theme:e}}function NG(t,e,n){var r,i;if(e==null)return e;const a=s=>{var u,c;return(c=(u=t.__breakpoints)==null?void 0:u.asArray)==null?void 0:c[s]};return(i=(r=a(e))!=null?r:a(n))!=null?i:n}function BG(t,e,n){var r,i;if(e==null)return e;const a=s=>{var u,c;return(c=(u=t.__cssMap)==null?void 0:u[s])==null?void 0:c.value};return(i=(r=a(e))!=null?r:a(n))!=null?i:n}function iH(t,e,n){const r=DP();return FG(t,e,n)(r)}function FG(t,e,n){const r=Array.isArray(e)?e:[e],i=Array.isArray(n)?n:[n];return a=>{const s=i.filter(Boolean),u=r.map((c,f)=>{var h,p;if(t==="breakpoints")return NG(a,c,(h=s[f])!=null?h:c);const g=`${t}.${c}`;return BG(a,g,(p=s[f])!=null?p:c)});return Array.isArray(e)?u:u[0]}}var FP=(...t)=>t.filter(Boolean).join(" ");function $G(){return!1}function zr(t){const e=typeof t;return t!=null&&(e==="object"||e==="function")&&!Array.isArray(t)}var aH=t=>{const{condition:e,message:n}=t;e&&$G()&&console.warn(n)};function io(t,...e){return zG(t)?t(...e):t}var zG=t=>typeof t=="function",oH=t=>t?"":void 0,sH=t=>t?!0:void 0;function lH(...t){return function(n){t.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}function uH(...t){return function(n){t.forEach(r=>{r==null||r(n)})}}var uh={},GG={get exports(){return uh},set exports(t){uh=t}};(function(t,e){var n=200,r="__lodash_hash_undefined__",i=800,a=16,s=9007199254740991,u="[object Arguments]",c="[object Array]",f="[object AsyncFunction]",h="[object Boolean]",p="[object Date]",g="[object Error]",y="[object Function]",v="[object GeneratorFunction]",w="[object Map]",x="[object Number]",_="[object Null]",S="[object Object]",C="[object Proxy]",O="[object RegExp]",I="[object Set]",L="[object String]",D="[object Undefined]",U="[object WeakMap]",X="[object ArrayBuffer]",K="[object DataView]",te="[object Float32Array]",ce="[object Float64Array]",j="[object Int8Array]",T="[object Int16Array]",$="[object Int32Array]",V="[object Uint8Array]",ie="[object Uint8ClampedArray]",W="[object Uint16Array]",Y="[object Uint32Array]",Q=/[\\^$.*+?()[\]{}|]/g,oe=/^\[object .+?Constructor\]$/,ve=/^(?:0|[1-9]\d*)$/,we={};we[te]=we[ce]=we[j]=we[T]=we[$]=we[V]=we[ie]=we[W]=we[Y]=!0,we[u]=we[c]=we[X]=we[h]=we[K]=we[p]=we[g]=we[y]=we[w]=we[x]=we[S]=we[O]=we[I]=we[L]=we[U]=!1;var Ue=typeof yn=="object"&&yn&&yn.Object===Object&&yn,At=typeof self=="object"&&self&&self.Object===Object&&self,me=Ue||At||Function("return this")(),qt=e&&!e.nodeType&&e,Bt=qt&&!0&&t&&!t.nodeType&&t,bn=Bt&&Bt.exports===qt,wr=bn&&Ue.process,Ft=function(){try{var E=Bt&&Bt.require&&Bt.require("util").types;return E||wr&&wr.binding&&wr.binding("util")}catch{}}(),xe=Ft&&Ft.isTypedArray;function Wr(E,N,H){switch(H.length){case 0:return E.call(N);case 1:return E.call(N,H[0]);case 2:return E.call(N,H[0],H[1]);case 3:return E.call(N,H[0],H[1],H[2])}return E.apply(N,H)}function Et(E,N){for(var H=-1,fe=Array(E);++H-1}function mp(E,N){var H=this.__data__,fe=yi(H,E);return fe<0?(++this.size,H.push([E,N])):H[fe][1]=N,this}xr.prototype.clear=tl,xr.prototype.delete=pp,xr.prototype.get=nl,xr.prototype.has=gp,xr.prototype.set=mp;function Xi(E){var N=-1,H=E==null?0:E.length;for(this.clear();++N1?H[Ie-1]:void 0,Pe=Ie>2?H[2]:void 0;for(Ye=E.length>3&&typeof Ye=="function"?(Ie--,Ye):void 0,Pe&&hc(H[0],H[1],Pe)&&(Ye=Ie<3?void 0:Ye,Ie=1),N=Object(N);++fe-1&&E%1==0&&E0){if(++N>=i)return arguments[0]}else N=0;return E.apply(void 0,arguments)}}function yc(E){if(E!=null){try{return Dn.call(E)}catch{}try{return E+""}catch{}}return""}function Mo(E,N){return E===N||E!==E&&N!==N}var ul=il(function(){return arguments}())?il:function(E){return za(E)&&bt.call(E,"callee")&&!Js.call(E,"callee")},cl=Array.isArray;function Do(E){return E!=null&&_c(E.length)&&!fl(E)}function Dp(E){return za(E)&&Do(E)}var Sc=sp||Fp;function fl(E){if(!kr(E))return!1;var N=To(E);return N==y||N==v||N==f||N==C}function _c(E){return typeof E=="number"&&E>-1&&E%1==0&&E<=s}function kr(E){var N=typeof E;return E!=null&&(N=="object"||N=="function")}function za(E){return E!=null&&typeof E=="object"}function Np(E){if(!za(E)||To(E)!=S)return!1;var N=Eo(E);if(N===null)return!0;var H=bt.call(N,"constructor")&&N.constructor;return typeof H=="function"&&H instanceof H&&Dn.call(H)==Co}var wc=xe?gi(xe):ic;function Bp(E){return uc(E,bc(E))}function bc(E){return Do(E)?Ep(E,!0):Rp(E)}var nt=Ro(function(E,N,H,fe){ac(E,N,H,fe)});function et(E){return function(){return E}}function Cc(E){return E}function Fp(){return!1}t.exports=nt})(GG,uh);const ai=uh;var UG=t=>/!(important)?$/.test(t),t2=t=>typeof t=="string"?t.replace(/!(important)?$/,"").trim():t,jG=(t,e)=>n=>{const r=String(e),i=UG(r),a=t2(r),s=t?`${t}.${a}`:a;let u=zr(n.__cssMap)&&s in n.__cssMap?n.__cssMap[s].varRef:e;return u=t2(u),i?`${u} !important`:u};function G0(t){const{scale:e,transform:n,compose:r}=t;return(a,s)=>{var u;const c=jG(e,a)(s);let f=(u=n==null?void 0:n(c,s))!=null?u:c;return r&&(f=r(f,s)),f}}var Kf=(...t)=>e=>t.reduce((n,r)=>r(n),e);function Ir(t,e){return n=>{const r={property:n,scale:t};return r.transform=G0({scale:t,transform:e}),r}}var WG=({rtl:t,ltr:e})=>n=>n.direction==="rtl"?t:e;function HG(t){const{property:e,scale:n,transform:r}=t;return{scale:n,property:WG(e),transform:n?G0({scale:n,compose:r}):r}}var $P=["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 VG(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...$P].join(" ")}function qG(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...$P].join(" ")}var KG={"--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(" ")},YG={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 XG(t){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":t,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}var QG={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},fy={"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"},JG=new Set(Object.values(fy)),zP=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),ZG=t=>t.trim();function e6(t,e){if(t==null||zP.has(t))return t;const r=/(^[a-z-A-Z]+)\((.*)\)/g.exec(t),i=r==null?void 0:r[1],a=r==null?void 0:r[2];if(!i||!a)return t;const s=i.includes("-gradient")?i:`${i}-gradient`,[u,...c]=a.split(",").map(ZG).filter(Boolean);if((c==null?void 0:c.length)===0)return t;const f=u in fy?fy[u]:u;c.unshift(f);const h=c.map(p=>{if(JG.has(p))return p;const g=p.indexOf(" "),[y,v]=g!==-1?[p.substr(0,g),p.substr(g+1)]:[p],w=GP(v)?v:v&&v.split(" "),x=`colors.${y}`,_=x in e.__cssMap?e.__cssMap[x].varRef:y;return w?[_,...Array.isArray(w)?w:[w]].join(" "):_});return`${s}(${h.join(", ")})`}var GP=t=>typeof t=="string"&&t.includes("(")&&t.includes(")"),t6=(t,e)=>e6(t,e??{});function n6(t){return/^var\(--.+\)$/.test(t)}var r6=t=>{const e=parseFloat(t.toString()),n=t.toString().replace(String(e),"");return{unitless:!n,value:e,unit:n}},Jr=t=>e=>`${t}(${e})`,Fe={filter(t){return t!=="auto"?t:KG},backdropFilter(t){return t!=="auto"?t:YG},ring(t){return XG(Fe.px(t))},bgClip(t){return t==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:t}},transform(t){return t==="auto"?VG():t==="auto-gpu"?qG():t},vh(t){return t==="$100vh"?"var(--chakra-vh)":t},px(t){if(t==null)return t;const{unitless:e}=r6(t);return e||typeof t=="number"?`${t}px`:t},fraction(t){return typeof t!="number"||t>1?t:`${t*100}%`},float(t,e){const n={left:"right",right:"left"};return e.direction==="rtl"?n[t]:t},degree(t){if(n6(t)||t==null)return t;const e=typeof t=="string"&&!t.endsWith("deg");return typeof t=="number"||e?`${t}deg`:t},gradient:t6,blur:Jr("blur"),opacity:Jr("opacity"),brightness:Jr("brightness"),contrast:Jr("contrast"),dropShadow:Jr("drop-shadow"),grayscale:Jr("grayscale"),hueRotate:Jr("hue-rotate"),invert:Jr("invert"),saturate:Jr("saturate"),sepia:Jr("sepia"),bgImage(t){return t==null||GP(t)||zP.has(t)?t:`url(${t})`},outline(t){const e=String(t)==="0"||String(t)==="none";return t!==null&&e?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:t}},flexDirection(t){var e;const{space:n,divide:r}=(e=QG[t])!=null?e:{},i={flexDirection:t};return n&&(i[n]=1),r&&(i[r]=1),i}},B={borderWidths:Ir("borderWidths"),borderStyles:Ir("borderStyles"),colors:Ir("colors"),borders:Ir("borders"),radii:Ir("radii",Fe.px),space:Ir("space",Kf(Fe.vh,Fe.px)),spaceT:Ir("space",Kf(Fe.vh,Fe.px)),degreeT(t){return{property:t,transform:Fe.degree}},prop(t,e,n){return{property:t,scale:e,...e&&{transform:G0({scale:e,transform:n})}}},propT(t,e){return{property:t,transform:e}},sizes:Ir("sizes",Kf(Fe.vh,Fe.px)),sizesT:Ir("sizes",Kf(Fe.vh,Fe.fraction)),shadows:Ir("shadows"),logical:HG,blur:Ir("blur",Fe.blur)},bd={background:B.colors("background"),backgroundColor:B.colors("backgroundColor"),backgroundImage:B.propT("backgroundImage",Fe.bgImage),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:Fe.bgClip},bgSize:B.prop("backgroundSize"),bgPosition:B.prop("backgroundPosition"),bg:B.colors("background"),bgColor:B.colors("backgroundColor"),bgPos:B.prop("backgroundPosition"),bgRepeat:B.prop("backgroundRepeat"),bgAttachment:B.prop("backgroundAttachment"),bgGradient:B.propT("backgroundImage",Fe.gradient),bgClip:{transform:Fe.bgClip}};Object.assign(bd,{bgImage:bd.backgroundImage,bgImg:bd.backgroundImage});var We={border:B.borders("border"),borderWidth:B.borderWidths("borderWidth"),borderStyle:B.borderStyles("borderStyle"),borderColor:B.colors("borderColor"),borderRadius:B.radii("borderRadius"),borderTop:B.borders("borderTop"),borderBlockStart:B.borders("borderBlockStart"),borderTopLeftRadius:B.radii("borderTopLeftRadius"),borderStartStartRadius:B.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:B.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:B.radii("borderTopRightRadius"),borderStartEndRadius:B.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:B.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:B.borders("borderRight"),borderInlineEnd:B.borders("borderInlineEnd"),borderBottom:B.borders("borderBottom"),borderBlockEnd:B.borders("borderBlockEnd"),borderBottomLeftRadius:B.radii("borderBottomLeftRadius"),borderBottomRightRadius:B.radii("borderBottomRightRadius"),borderLeft:B.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:B.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:B.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:B.borders(["borderLeft","borderRight"]),borderInline:B.borders("borderInline"),borderY:B.borders(["borderTop","borderBottom"]),borderBlock:B.borders("borderBlock"),borderTopWidth:B.borderWidths("borderTopWidth"),borderBlockStartWidth:B.borderWidths("borderBlockStartWidth"),borderTopColor:B.colors("borderTopColor"),borderBlockStartColor:B.colors("borderBlockStartColor"),borderTopStyle:B.borderStyles("borderTopStyle"),borderBlockStartStyle:B.borderStyles("borderBlockStartStyle"),borderBottomWidth:B.borderWidths("borderBottomWidth"),borderBlockEndWidth:B.borderWidths("borderBlockEndWidth"),borderBottomColor:B.colors("borderBottomColor"),borderBlockEndColor:B.colors("borderBlockEndColor"),borderBottomStyle:B.borderStyles("borderBottomStyle"),borderBlockEndStyle:B.borderStyles("borderBlockEndStyle"),borderLeftWidth:B.borderWidths("borderLeftWidth"),borderInlineStartWidth:B.borderWidths("borderInlineStartWidth"),borderLeftColor:B.colors("borderLeftColor"),borderInlineStartColor:B.colors("borderInlineStartColor"),borderLeftStyle:B.borderStyles("borderLeftStyle"),borderInlineStartStyle:B.borderStyles("borderInlineStartStyle"),borderRightWidth:B.borderWidths("borderRightWidth"),borderInlineEndWidth:B.borderWidths("borderInlineEndWidth"),borderRightColor:B.colors("borderRightColor"),borderInlineEndColor:B.colors("borderInlineEndColor"),borderRightStyle:B.borderStyles("borderRightStyle"),borderInlineEndStyle:B.borderStyles("borderInlineEndStyle"),borderTopRadius:B.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:B.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:B.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:B.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(We,{rounded:We.borderRadius,roundedTop:We.borderTopRadius,roundedTopLeft:We.borderTopLeftRadius,roundedTopRight:We.borderTopRightRadius,roundedTopStart:We.borderStartStartRadius,roundedTopEnd:We.borderStartEndRadius,roundedBottom:We.borderBottomRadius,roundedBottomLeft:We.borderBottomLeftRadius,roundedBottomRight:We.borderBottomRightRadius,roundedBottomStart:We.borderEndStartRadius,roundedBottomEnd:We.borderEndEndRadius,roundedLeft:We.borderLeftRadius,roundedRight:We.borderRightRadius,roundedStart:We.borderInlineStartRadius,roundedEnd:We.borderInlineEndRadius,borderStart:We.borderInlineStart,borderEnd:We.borderInlineEnd,borderTopStartRadius:We.borderStartStartRadius,borderTopEndRadius:We.borderStartEndRadius,borderBottomStartRadius:We.borderEndStartRadius,borderBottomEndRadius:We.borderEndEndRadius,borderStartRadius:We.borderInlineStartRadius,borderEndRadius:We.borderInlineEndRadius,borderStartWidth:We.borderInlineStartWidth,borderEndWidth:We.borderInlineEndWidth,borderStartColor:We.borderInlineStartColor,borderEndColor:We.borderInlineEndColor,borderStartStyle:We.borderInlineStartStyle,borderEndStyle:We.borderInlineEndStyle});var i6={color:B.colors("color"),textColor:B.colors("color"),fill:B.colors("fill"),stroke:B.colors("stroke")},dy={boxShadow:B.shadows("boxShadow"),mixBlendMode:!0,blendMode:B.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:B.prop("backgroundBlendMode"),opacity:!0};Object.assign(dy,{shadow:dy.boxShadow});var a6={filter:{transform:Fe.filter},blur:B.blur("--chakra-blur"),brightness:B.propT("--chakra-brightness",Fe.brightness),contrast:B.propT("--chakra-contrast",Fe.contrast),hueRotate:B.degreeT("--chakra-hue-rotate"),invert:B.propT("--chakra-invert",Fe.invert),saturate:B.propT("--chakra-saturate",Fe.saturate),dropShadow:B.propT("--chakra-drop-shadow",Fe.dropShadow),backdropFilter:{transform:Fe.backdropFilter},backdropBlur:B.blur("--chakra-backdrop-blur"),backdropBrightness:B.propT("--chakra-backdrop-brightness",Fe.brightness),backdropContrast:B.propT("--chakra-backdrop-contrast",Fe.contrast),backdropHueRotate:B.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:B.propT("--chakra-backdrop-invert",Fe.invert),backdropSaturate:B.propT("--chakra-backdrop-saturate",Fe.saturate)},ch={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:Fe.flexDirection},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:B.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:B.space("gap"),rowGap:B.space("rowGap"),columnGap:B.space("columnGap")};Object.assign(ch,{flexDir:ch.flexDirection});var UP={gridGap:B.space("gridGap"),gridColumnGap:B.space("gridColumnGap"),gridRowGap:B.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},o6={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:Fe.outline},outlineOffset:!0,outlineColor:B.colors("outlineColor")},lr={width:B.sizesT("width"),inlineSize:B.sizesT("inlineSize"),height:B.sizes("height"),blockSize:B.sizes("blockSize"),boxSize:B.sizes(["width","height"]),minWidth:B.sizes("minWidth"),minInlineSize:B.sizes("minInlineSize"),minHeight:B.sizes("minHeight"),minBlockSize:B.sizes("minBlockSize"),maxWidth:B.sizes("maxWidth"),maxInlineSize:B.sizes("maxInlineSize"),maxHeight:B.sizes("maxHeight"),maxBlockSize:B.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,hideFrom:{scale:"breakpoints",transform:(t,e)=>{var n,r,i;return{[(i=(r=(n=e.__breakpoints)==null?void 0:n.get(t))==null?void 0:r.minWQuery)!=null?i:`@media screen and (min-width: ${t})`]:{display:"none"}}}},hideBelow:{scale:"breakpoints",transform:(t,e)=>{var n,r,i;return{[(i=(r=(n=e.__breakpoints)==null?void 0:n.get(t))==null?void 0:r.maxWQuery)!=null?i:`@media screen and (max-width: ${t})`]:{display:"none"}}}},verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:B.propT("float",Fe.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(lr,{w:lr.width,h:lr.height,minW:lr.minWidth,maxW:lr.maxWidth,minH:lr.minHeight,maxH:lr.maxHeight,overscroll:lr.overscrollBehavior,overscrollX:lr.overscrollBehaviorX,overscrollY:lr.overscrollBehaviorY});var s6={listStyleType:!0,listStylePosition:!0,listStylePos:B.prop("listStylePosition"),listStyleImage:!0,listStyleImg:B.prop("listStyleImage")};function l6(t,e,n,r){const i=typeof e=="string"?e.split("."):[e];for(r=0;r{const e=new WeakMap;return(r,i,a,s)=>{if(typeof r>"u")return t(r,i,a);e.has(r)||e.set(r,new Map);const u=e.get(r);if(u.has(i))return u.get(i);const c=t(r,i,a,s);return u.set(i,c),c}},c6=u6(l6),f6={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},d6={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},Nm=(t,e,n)=>{const r={},i=c6(t,e,{});for(const a in i)a in n&&n[a]!=null||(r[a]=i[a]);return r},h6={srOnly:{transform(t){return t===!0?f6:t==="focusable"?d6:{}}},layerStyle:{processResult:!0,transform:(t,e,n)=>Nm(e,`layerStyles.${t}`,n)},textStyle:{processResult:!0,transform:(t,e,n)=>Nm(e,`textStyles.${t}`,n)},apply:{processResult:!0,transform:(t,e,n)=>Nm(e,t,n)}},Su={position:!0,pos:B.prop("position"),zIndex:B.prop("zIndex","zIndices"),inset:B.spaceT("inset"),insetX:B.spaceT(["left","right"]),insetInline:B.spaceT("insetInline"),insetY:B.spaceT(["top","bottom"]),insetBlock:B.spaceT("insetBlock"),top:B.spaceT("top"),insetBlockStart:B.spaceT("insetBlockStart"),bottom:B.spaceT("bottom"),insetBlockEnd:B.spaceT("insetBlockEnd"),left:B.spaceT("left"),insetInlineStart:B.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:B.spaceT("right"),insetInlineEnd:B.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(Su,{insetStart:Su.insetInlineStart,insetEnd:Su.insetInlineEnd});var p6={ring:{transform:Fe.ring},ringColor:B.colors("--chakra-ring-color"),ringOffset:B.prop("--chakra-ring-offset-width"),ringOffsetColor:B.colors("--chakra-ring-offset-color"),ringInset:B.prop("--chakra-ring-inset")},st={margin:B.spaceT("margin"),marginTop:B.spaceT("marginTop"),marginBlockStart:B.spaceT("marginBlockStart"),marginRight:B.spaceT("marginRight"),marginInlineEnd:B.spaceT("marginInlineEnd"),marginBottom:B.spaceT("marginBottom"),marginBlockEnd:B.spaceT("marginBlockEnd"),marginLeft:B.spaceT("marginLeft"),marginInlineStart:B.spaceT("marginInlineStart"),marginX:B.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:B.spaceT("marginInline"),marginY:B.spaceT(["marginTop","marginBottom"]),marginBlock:B.spaceT("marginBlock"),padding:B.space("padding"),paddingTop:B.space("paddingTop"),paddingBlockStart:B.space("paddingBlockStart"),paddingRight:B.space("paddingRight"),paddingBottom:B.space("paddingBottom"),paddingBlockEnd:B.space("paddingBlockEnd"),paddingLeft:B.space("paddingLeft"),paddingInlineStart:B.space("paddingInlineStart"),paddingInlineEnd:B.space("paddingInlineEnd"),paddingX:B.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:B.space("paddingInline"),paddingY:B.space(["paddingTop","paddingBottom"]),paddingBlock:B.space("paddingBlock")};Object.assign(st,{m:st.margin,mt:st.marginTop,mr:st.marginRight,me:st.marginInlineEnd,marginEnd:st.marginInlineEnd,mb:st.marginBottom,ml:st.marginLeft,ms:st.marginInlineStart,marginStart:st.marginInlineStart,mx:st.marginX,my:st.marginY,p:st.padding,pt:st.paddingTop,py:st.paddingY,px:st.paddingX,pb:st.paddingBottom,pl:st.paddingLeft,ps:st.paddingInlineStart,paddingStart:st.paddingInlineStart,pr:st.paddingRight,pe:st.paddingInlineEnd,paddingEnd:st.paddingInlineEnd});var g6={textDecorationColor:B.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:B.shadows("textShadow")},m6={clipPath:!0,transform:B.propT("transform",Fe.transform),transformOrigin:!0,translateX:B.spaceT("--chakra-translate-x"),translateY:B.spaceT("--chakra-translate-y"),skewX:B.degreeT("--chakra-skew-x"),skewY:B.degreeT("--chakra-skew-y"),scaleX:B.prop("--chakra-scale-x"),scaleY:B.prop("--chakra-scale-y"),scale:B.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:B.degreeT("--chakra-rotate")},v6={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:B.prop("transitionDuration","transition.duration"),transitionProperty:B.prop("transitionProperty","transition.property"),transitionTimingFunction:B.prop("transitionTimingFunction","transition.easing")},y6={fontFamily:B.prop("fontFamily","fonts"),fontSize:B.prop("fontSize","fontSizes",Fe.px),fontWeight:B.prop("fontWeight","fontWeights"),lineHeight:B.prop("lineHeight","lineHeights"),letterSpacing:B.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,textIndent:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,isTruncated:{transform(t){if(t===!0)return{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}},noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},S6={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:B.spaceT("scrollMargin"),scrollMarginTop:B.spaceT("scrollMarginTop"),scrollMarginBottom:B.spaceT("scrollMarginBottom"),scrollMarginLeft:B.spaceT("scrollMarginLeft"),scrollMarginRight:B.spaceT("scrollMarginRight"),scrollMarginX:B.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:B.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:B.spaceT("scrollPadding"),scrollPaddingTop:B.spaceT("scrollPaddingTop"),scrollPaddingBottom:B.spaceT("scrollPaddingBottom"),scrollPaddingLeft:B.spaceT("scrollPaddingLeft"),scrollPaddingRight:B.spaceT("scrollPaddingRight"),scrollPaddingX:B.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:B.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function jP(t){return zr(t)&&t.reference?t.reference:String(t)}var ap=(t,...e)=>e.map(jP).join(` ${t} `).replace(/calc/g,""),n2=(...t)=>`calc(${ap("+",...t)})`,r2=(...t)=>`calc(${ap("-",...t)})`,hy=(...t)=>`calc(${ap("*",...t)})`,i2=(...t)=>`calc(${ap("/",...t)})`,a2=t=>{const e=jP(t);return e!=null&&!Number.isNaN(parseFloat(e))?String(e).startsWith("-")?String(e).slice(1):`-${e}`:hy(e,-1)},eo=Object.assign(t=>({add:(...e)=>eo(n2(t,...e)),subtract:(...e)=>eo(r2(t,...e)),multiply:(...e)=>eo(hy(t,...e)),divide:(...e)=>eo(i2(t,...e)),negate:()=>eo(a2(t)),toString:()=>t.toString()}),{add:n2,subtract:r2,multiply:hy,divide:i2,negate:a2});function _6(t,e="-"){return t.replace(/\s+/g,e)}function w6(t){const e=_6(t.toString());return C6(b6(e))}function b6(t){return t.includes("\\.")?t:!Number.isInteger(parseFloat(t.toString()))?t.replace(".","\\."):t}function C6(t){return t.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function x6(t,e=""){return[e,t].filter(Boolean).join("-")}function k6(t,e){return`var(${t}${e?`, ${e}`:""})`}function P6(t,e=""){return w6(`--${x6(t,e)}`)}function E6(t,e,n){const r=P6(t,n);return{variable:r,reference:k6(r,e)}}function O6(t){const e=t==null?0:t.length;return e?t[e-1]:void 0}function T6(t){const e=parseFloat(t.toString()),n=t.toString().replace(String(e),"");return{unitless:!n,value:e,unit:n}}function py(t){if(t==null)return t;const{unitless:e}=T6(t);return e||typeof t=="number"?`${t}px`:t}var WP=(t,e)=>parseInt(t[1],10)>parseInt(e[1],10)?1:-1,U0=t=>Object.fromEntries(Object.entries(t).sort(WP));function o2(t){const e=U0(t);return Object.assign(Object.values(e),e)}function R6(t){const e=Object.keys(U0(t));return new Set(e)}function s2(t){var e;if(!t)return t;t=(e=py(t))!=null?e:t;const n=-.02;return typeof t=="number"?`${t+n}`:t.replace(/(\d+\.?\d*)/u,r=>`${parseFloat(r)+n}`)}function au(t,e){const n=["@media screen"];return t&&n.push("and",`(min-width: ${py(t)})`),e&&n.push("and",`(max-width: ${py(e)})`),n.join(" ")}function A6(t){var e;if(!t)return null;t.base=(e=t.base)!=null?e:"0px";const n=o2(t),r=Object.entries(t).sort(WP).map(([s,u],c,f)=>{var h;let[,p]=(h=f[c+1])!=null?h:[];return p=parseFloat(p)>0?s2(p):void 0,{_minW:s2(u),breakpoint:s,minW:u,maxW:p,maxWQuery:au(null,p),minWQuery:au(u),minMaxQuery:au(u,p)}}),i=R6(t),a=Array.from(i.values());return{keys:i,normalized:n,isResponsive(s){const u=Object.keys(s);return u.length>0&&u.every(c=>i.has(c))},asObject:U0(t),asArray:o2(t),details:r,get(s){return r.find(u=>u.breakpoint===s)},media:[null,...n.map(s=>au(s)).slice(1)],toArrayValue(s){if(!zr(s))throw new Error("toArrayValue: value must be an object");const u=a.map(c=>{var f;return(f=s[c])!=null?f:null});for(;O6(u)===null;)u.pop();return u},toObjectValue(s){if(!Array.isArray(s))throw new Error("toObjectValue: value must be an array");return s.reduce((u,c,f)=>{const h=a[f];return h!=null&&c!=null&&(u[h]=c),u},{})}}}var Qt={hover:(t,e)=>`${t}:hover ${e}, ${t}[data-hover] ${e}`,focus:(t,e)=>`${t}:focus ${e}, ${t}[data-focus] ${e}`,focusVisible:(t,e)=>`${t}:focus-visible ${e}`,focusWithin:(t,e)=>`${t}:focus-within ${e}`,active:(t,e)=>`${t}:active ${e}, ${t}[data-active] ${e}`,disabled:(t,e)=>`${t}:disabled ${e}, ${t}[data-disabled] ${e}`,invalid:(t,e)=>`${t}:invalid ${e}, ${t}[data-invalid] ${e}`,checked:(t,e)=>`${t}:checked ${e}, ${t}[data-checked] ${e}`,indeterminate:(t,e)=>`${t}:indeterminate ${e}, ${t}[aria-checked=mixed] ${e}, ${t}[data-indeterminate] ${e}`,readOnly:(t,e)=>`${t}:read-only ${e}, ${t}[readonly] ${e}, ${t}[data-read-only] ${e}`,expanded:(t,e)=>`${t}:read-only ${e}, ${t}[aria-expanded=true] ${e}, ${t}[data-expanded] ${e}`,placeholderShown:(t,e)=>`${t}:placeholder-shown ${e}`},la=t=>HP(e=>t(e,"&"),"[role=group]","[data-group]",".group"),Ai=t=>HP(e=>t(e,"~ &"),"[data-peer]",".peer"),HP=(t,...e)=>e.map(t).join(", "),op={_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:la(Qt.hover),_peerHover:Ai(Qt.hover),_groupFocus:la(Qt.focus),_peerFocus:Ai(Qt.focus),_groupFocusVisible:la(Qt.focusVisible),_peerFocusVisible:Ai(Qt.focusVisible),_groupActive:la(Qt.active),_peerActive:Ai(Qt.active),_groupDisabled:la(Qt.disabled),_peerDisabled:Ai(Qt.disabled),_groupInvalid:la(Qt.invalid),_peerInvalid:Ai(Qt.invalid),_groupChecked:la(Qt.checked),_peerChecked:Ai(Qt.checked),_groupFocusWithin:la(Qt.focusWithin),_peerFocusWithin:Ai(Qt.focusWithin),_peerPlaceholderShown:Ai(Qt.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]"},I6=Object.keys(op);function l2(t,e){return E6(String(t).replace(/\./g,"-"),void 0,e)}function L6(t,e){let n={};const r={};for(const[i,a]of Object.entries(t)){const{isSemantic:s,value:u}=a,{variable:c,reference:f}=l2(i,e==null?void 0:e.cssVarPrefix);if(!s){if(i.startsWith("space")){const g=i.split("."),[y,...v]=g,w=`${y}.-${v.join(".")}`,x=eo.negate(u),_=eo.negate(f);r[w]={value:x,var:c,varRef:_}}n[c]=u,r[i]={value:u,var:c,varRef:f};continue}const h=g=>{const v=[String(i).split(".")[0],g].join(".");if(!t[v])return g;const{reference:x}=l2(v,e==null?void 0:e.cssVarPrefix);return x},p=zr(u)?u:{default:u};n=ai(n,Object.entries(p).reduce((g,[y,v])=>{var w,x;const _=h(v);if(y==="default")return g[c]=_,g;const S=(x=(w=op)==null?void 0:w[y])!=null?x:y;return g[S]={[c]:_},g},{})),r[i]={value:f,var:c,varRef:f}}return{cssVars:n,cssMap:r}}function M6(t,e=[]){const n=Object.assign({},t);for(const r of e)r in n&&delete n[r];return n}function D6(t,e){const n={};for(const r of e)r in t&&(n[r]=t[r]);return n}var N6=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur","breakpoints"];function B6(t){return D6(t,N6)}function F6(t){return t.semanticTokens}function $6(t){const{__cssMap:e,__cssVars:n,__breakpoints:r,...i}=t;return i}function z6({tokens:t,semanticTokens:e}){var n,r;const i=Object.entries((n=gy(t))!=null?n:{}).map(([s,u])=>[s,{isSemantic:!1,value:u}]),a=Object.entries((r=gy(e,1))!=null?r:{}).map(([s,u])=>[s,{isSemantic:!0,value:u}]);return Object.fromEntries([...i,...a])}function gy(t,e=1/0){return!zr(t)&&!Array.isArray(t)||!e?t:Object.entries(t).reduce((n,[r,i])=>(zr(i)||Array.isArray(i)?Object.entries(gy(i,e-1)).forEach(([a,s])=>{n[`${r}.${a}`]=s}):n[r]=i,n),{})}function cH(t){var e;const n=$6(t),r=B6(n),i=F6(n),a=z6({tokens:r,semanticTokens:i}),s=(e=n.config)==null?void 0:e.cssVarPrefix,{cssMap:u,cssVars:c}=L6(a,{cssVarPrefix:s});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"},...c},__cssMap:u,__breakpoints:A6(n.breakpoints)}),n}var j0=ai({},bd,We,i6,ch,lr,a6,p6,o6,UP,h6,Su,dy,st,S6,y6,g6,m6,s6,v6),G6=Object.assign({},st,lr,ch,UP,Su),fH=Object.keys(G6),U6=[...Object.keys(j0),...I6],j6={...j0,...op},W6=t=>t in j6,H6=t=>e=>{if(!e.__breakpoints)return t;const{isResponsive:n,toArrayValue:r,media:i}=e.__breakpoints,a={};for(const s in t){let u=io(t[s],e);if(u==null)continue;if(u=zr(u)&&n(u)?r(u):u,!Array.isArray(u)){a[s]=u;continue}const c=u.slice(0,i.length).length;for(let f=0;ft.startsWith("--")&&typeof e=="string"&&!q6(e),Y6=(t,e)=>{var n,r;if(e==null)return e;const i=c=>{var f,h;return(h=(f=t.__cssMap)==null?void 0:f[c])==null?void 0:h.varRef},a=c=>{var f;return(f=i(c))!=null?f:c},[s,u]=V6(e);return e=(r=(n=i(s))!=null?n:a(u))!=null?r:a(e),e};function X6(t){const{configs:e={},pseudos:n={},theme:r}=t,i=(a,s=!1)=>{var u,c,f;const h=io(a,r),p=H6(h)(r);let g={};for(let y in p){const v=p[y];let w=io(v,r);y in n&&(y=n[y]),K6(y,w)&&(w=Y6(r,w));let x=e[y];if(x===!0&&(x={property:y}),zr(w)){g[y]=(u=g[y])!=null?u:{},g[y]=ai({},g[y],i(w,!0));continue}let _=(f=(c=x==null?void 0:x.transform)==null?void 0:c.call(x,w,r,h))!=null?f:w;_=x!=null&&x.processResult?i(_,!0):_;const S=io(x==null?void 0:x.property,r);if(!s&&(x!=null&&x.static)){const C=io(x.static,r);g=ai({},g,C)}if(S&&Array.isArray(S)){for(const C of S)g[C]=_;continue}if(S){S==="&"&&zr(_)?g=ai({},g,_):g[S]=_;continue}if(zr(_)){g=ai({},g,_);continue}g[y]=_}return g};return i}var Q6=t=>e=>X6({theme:e,pseudos:op,configs:j0})(t);function dH(t){return t}function hH(t){return t}function pH(t){return{definePartsStyle(e){return e},defineMultiStyleConfig(e){return{parts:t,...e}}}}function J6(t,e){if(Array.isArray(t))return t;if(zr(t))return e(t);if(t!=null)return[t]}function Z6(t,e){for(let n=e+1;n{ai(f,{[C]:g?S[C]:{[_]:S[C]}})});continue}if(!y){g?ai(f,S):f[_]=S;continue}f[_]=S}}return f}}function t8(t){return e=>{var n;const{variant:r,size:i,theme:a}=e,s=e8(a);return ai({},io((n=t.baseStyle)!=null?n:{},e),s(t,"sizes",i,e),s(t,"variants",r,e))}}function gH(t,e,n){var r,i,a;return(a=(i=(r=t.__cssMap)==null?void 0:r[`${e}.${n}`])==null?void 0:i.varRef)!=null?a:n}function VP(t){return M6(t,["styleConfig","size","variant","colorScheme"])}function n8(t,e){const n={};return Object.keys(t).forEach(r=>{e.includes(r)||(n[r]=t[r])}),n}function r8(t,e,n,r){const i=typeof e=="string"?e.split("."):[e];for(r=0;r{const e=new WeakMap;return(r,i,a,s)=>{if(typeof r>"u")return t(r,i,a);e.has(r)||e.set(r,new Map);const u=e.get(r);if(u.has(i))return u.get(i);const c=t(r,i,a,s);return u.set(i,c),c}},a8=i8(r8);function qP(t,e){const n={};return Object.keys(t).forEach(r=>{const i=t[r];e(i,r,t)&&(n[r]=i)}),n}var KP=t=>qP(t,e=>e!=null);function o8(t){return typeof t=="function"}function s8(t,...e){return o8(t)?t(...e):t}function mH(...t){return function(n){t.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}var l8=typeof Element<"u",u8=typeof Map=="function",c8=typeof Set=="function",f8=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function Cd(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var n,r,i;if(Array.isArray(t)){if(n=t.length,n!=e.length)return!1;for(r=n;r--!==0;)if(!Cd(t[r],e[r]))return!1;return!0}var a;if(u8&&t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(a=t.entries();!(r=a.next()).done;)if(!e.has(r.value[0]))return!1;for(a=t.entries();!(r=a.next()).done;)if(!Cd(r.value[1],e.get(r.value[0])))return!1;return!0}if(c8&&t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(a=t.entries();!(r=a.next()).done;)if(!e.has(r.value[0]))return!1;return!0}if(f8&&ArrayBuffer.isView(t)&&ArrayBuffer.isView(e)){if(n=t.length,n!=e.length)return!1;for(r=n;r--!==0;)if(t[r]!==e[r])return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[r]))return!1;if(l8&&t instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&t.$$typeof)&&!Cd(t[i[r]],e[i[r]]))return!1;return!0}return t!==t&&e!==e}var d8=function(e,n){try{return Cd(e,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};function YP(t,e={}){var n;const{styleConfig:r,...i}=e,{theme:a,colorMode:s}=DG(),u=t?a8(a,`components.${t}`):void 0,c=r||u,f=ai({theme:a,colorMode:s},(n=c==null?void 0:c.defaultProps)!=null?n:{},KP(n8(i,["children"]))),h=be.useRef({});if(c){const g=t8(c)(f);d8(h.current,g)||(h.current=g)}return h.current}function XP(t,e={}){return YP(t,e)}function vH(t,e={}){return YP(t,e)}var h8=new Set([...U6,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),p8=new Set(["htmlWidth","htmlHeight","htmlSize","htmlTranslate"]);function g8(t){return p8.has(t)||!h8.has(t)}function m8(t){const e=Object.assign({},t);for(let n in e)e[n]===void 0&&delete e[n];return e}function v8(t,...e){if(t==null)throw new TypeError("Cannot convert undefined or null to object");const n={...t};for(const r of e)if(r!=null)for(const i in r)Object.prototype.hasOwnProperty.call(r,i)&&(i in n&&delete n[i],n[i]=r[i]);return n}var y8=/^((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)-.*))$/,S8=EP(function(t){return y8.test(t)||t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)<91}),_8=S8,w8=function(e){return e!=="theme"},u2=function(e){return typeof e=="string"&&e.charCodeAt(0)>96?_8:w8},c2=function(e,n,r){var i;if(n){var a=n.shouldForwardProp;i=e.__emotion_forwardProp&&a?function(s){return e.__emotion_forwardProp(s)&&a(s)}:a}return typeof i!="function"&&r&&(i=e.__emotion_forwardProp),i},b8=function(e){var n=e.cache,r=e.serialized,i=e.isStringTag;return TP(n,r,i),RG(function(){return RP(n,r,i)}),null},C8=function t(e,n){var r=e.__emotion_real===e,i=r&&e.__emotion_base||e,a,s;n!==void 0&&(a=n.label,s=n.target);var u=c2(e,n,r),c=u||u2(i),f=!c("as");return function(){var h=arguments,p=r&&e.__emotion_styles!==void 0?e.__emotion_styles.slice(0):[];if(a!==void 0&&p.push("label:"+a+";"),h[0]==null||h[0].raw===void 0)p.push.apply(p,h);else{p.push(h[0][0]);for(var g=h.length,y=1;ye=>{const{theme:n,css:r,__css:i,sx:a,...s}=e,u=qP(s,(p,g)=>W6(g)),c=s8(t,e),f=v8({},i,c,KP(u),a),h=Q6(f)(e.theme);return r?[h,r]:h};function Bm(t,e){const{baseStyle:n,...r}=e??{};r.shouldForwardProp||(r.shouldForwardProp=g8);const i=P8({baseStyle:n}),a=k8(t,r)(i);return As.forwardRef(function(c,f){const{colorMode:h,forced:p}=BP();return As.createElement(a,{ref:f,"data-theme":p?h:void 0,...c})})}function E8(){const t=new Map;return new Proxy(Bm,{apply(e,n,r){return Bm(...r)},get(e,n){return t.has(n)||t.set(n,Bm(n)),t.get(n)}})}var dh=E8();function W0(t){return be.forwardRef(t)}var O8=MG({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),QP=W0((t,e)=>{const n=XP("Spinner",t),{label:r="Loading...",thickness:i="2px",speed:a="0.45s",emptyColor:s="transparent",className:u,...c}=VP(t),f=FP("chakra-spinner",u),h={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:s,borderLeftColor:s,animation:`${O8} ${a} linear infinite`,...n};return jt.jsx(dh.div,{ref:e,__css:h,className:f,...c,children:r&&jt.jsx(dh.span,{srOnly:!0,children:r})})});QP.displayName="Spinner";var JP=W0(function(e,n){const r=XP("Text",e),{className:i,align:a,decoration:s,casing:u,...c}=VP(e),f=m8({textAlign:e.align,textDecoration:e.decoration,textTransform:e.casing});return jt.jsx(dh.p,{ref:n,className:FP("chakra-text",e.className),...f,...c,__css:r})});JP.displayName="Text";var ZP=W0(function(e,n){const{direction:r,align:i,justify:a,wrap:s,basis:u,grow:c,shrink:f,...h}=e,p={display:"flex",flexDirection:r,alignItems:i,justifyContent:a,flexWrap:s,flexBasis:u,flexGrow:c,flexShrink:f};return jt.jsx(dh.div,{ref:n,__css:p,...h})});ZP.displayName="Flex";const d2=t=>{const{t:e}=lB(),{showText:n=!1,text:r=e("common.loadingInvokeAI")}=t;return jt.jsxs(ZP,{width:"100vw",height:"100vh",alignItems:"center",justifyContent:"center",bg:"#121212",flexDirection:"column",rowGap:4,children:[jt.jsx(QP,{color:"grey",w:"5rem",h:"5rem"}),n&&jt.jsx(JP,{color:"grey",fontWeight:"semibold",fontFamily:"'Inter', sans-serif",children:r})]})},T8=be.lazy(()=>bx(()=>import("./App-af7ef809.js"),["./App-af7ef809.js","./storeHooks-5cde7d31.js","./App-08e5c546.css"],import.meta.url)),R8=be.lazy(()=>bx(()=>import("./ThemeLocaleProvider-7791bd91.js"),["./ThemeLocaleProvider-7791bd91.js","./storeHooks-5cde7d31.js"],import.meta.url));function A8(t){return jt.jsx(As.StrictMode,{children:jt.jsx(Y3,{store:_P,children:jt.jsx(Ax,{loading:jt.jsx(d2,{}),persistor:qz,children:jt.jsx(As.Suspense,{fallback:jt.jsx(d2,{showText:!0}),children:jt.jsx(R8,{children:jt.jsx(T8,{children:t.children})})})})})})}Fm.createRoot(document.getElementById("root")).render(jt.jsx(A8,{}));export{rW as $,Vf as A,Of as B,yU as C,D5 as D,lB as E,ZP as F,xd as G,tW as H,oW as I,QW as J,YW as K,KW as L,wW as M,vB as N,yB as O,CW as P,ZW as Q,As as R,QP as S,JP as T,fW as U,XW as V,iH as W,JW as X,FW as Y,eW as Z,Xd as _,FP as a,yj as a$,aW as a0,_W as a1,bW as a2,lW as a3,qz as a4,sW as a5,gW as a6,vU as a7,vW as a8,RW as a9,Mj as aA,gj as aB,Ow as aC,Rj as aD,kj as aE,Vj as aF,Fj as aG,mj as aH,N5 as aI,vj as aJ,Aj as aK,tj as aL,ej as aM,L5 as aN,Xj as aO,zj as aP,Gj as aQ,$j as aR,Lj as aS,kz as aT,fF as aU,cF as aV,Yj as aW,Ij as aX,R5 as aY,Bj as aZ,DW as a_,yW as aa,TW as ab,BW as ac,Hj as ad,Wj as ae,jj as af,Jj as ag,Zj as ah,NW as ai,Qj as aj,VW as ak,dd as al,O5 as am,wj as an,bj as ao,lj as ap,pW as aq,xW as ar,hj as as,Tj as at,WW as au,HW as av,SW as aw,Dj as ax,_j as ay,Cj as az,lH as b,nU as b$,LW as b0,IW as b1,uj as b2,MW as b3,iW as b4,qW as b5,hW as b6,dW as b7,Ew as b8,jW as b9,D8 as bA,VU as bB,Qx as bC,z8 as bD,G8 as bE,U8 as bF,jU as bG,tU as bH,eU as bI,X8 as bJ,UU as bK,eH as bL,Q8 as bM,lU as bN,uU as bO,Ef as bP,va as bQ,PU as bR,xU as bS,wU as bT,N8 as bU,B8 as bV,zW as bW,GW as bX,pU as bY,oU as bZ,sU as b_,Kj as ba,qj as bb,$m as bc,AL as bd,pe as be,Lb as bf,kU as bg,HU as bh,WU as bi,iU as bj,DU as bk,qU as bl,UW as bm,K8 as bn,_U as bo,Vl as bp,gU as bq,Y8 as br,Cz as bs,SU as bt,H8 as bu,mU as bv,V8 as bw,Z8 as bx,L8 as by,M8 as bz,dh as c,I8 as c$,XU as c0,cW as c1,Af as c2,ei as c3,zl as c4,Ae as c5,TU as c6,ns as c7,F8 as c8,EU as c9,EW as cA,uW as cB,PW as cC,dj as cD,ZU as cE,aj as cF,nj as cG,rj as cH,ij as cI,sj as cJ,Hb as cK,OW as cL,AW as cM,BP as cN,rH as cO,NP as cP,dH as cQ,pH as cR,E6 as cS,hH as cT,ai as cU,cH as cV,nH as cW,a8 as cX,Q6 as cY,Yd as cZ,T3 as c_,rU as ca,aU as cb,W8 as cc,j8 as cd,tH as ce,q8 as cf,GU as cg,RU as ch,AU as ci,FU as cj,hU as ck,dU as cl,OU as cm,JU as cn,MU as co,IU as cp,zU as cq,$8 as cr,M5 as cs,Nj as ct,QU as cu,fU as cv,xj as cw,Pj as cx,Ej as cy,Oj as cz,vH as d,XP as e,W0 as f,oH as g,sH as h,uH as i,jt as j,MG as k,jv as l,Ur as m,s8 as n,VP as o,mH as p,zr as q,be as r,DP as s,io as t,DG as u,fH as v,aH as w,gH as x,wk as y,_t as z}; diff --git a/invokeai/frontend/web/dist/assets/inter-all-100-normal-2596a8cd.woff b/invokeai/frontend/web/dist/assets/inter-all-100-normal-2596a8cd.woff deleted file mode 100644 index 0306d1d735..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-all-100-normal-2596a8cd.woff and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-all-200-normal-34e907e6.woff b/invokeai/frontend/web/dist/assets/inter-all-200-normal-34e907e6.woff deleted file mode 100644 index 9245b8f077..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-all-200-normal-34e907e6.woff and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-all-300-normal-e375e256.woff b/invokeai/frontend/web/dist/assets/inter-all-300-normal-e375e256.woff deleted file mode 100644 index 8b700d7c88..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-all-300-normal-e375e256.woff and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-all-400-normal-f824029b.woff b/invokeai/frontend/web/dist/assets/inter-all-400-normal-f824029b.woff deleted file mode 100644 index db0f8d1c3e..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-all-400-normal-f824029b.woff and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-all-500-normal-94e08ad8.woff b/invokeai/frontend/web/dist/assets/inter-all-500-normal-94e08ad8.woff deleted file mode 100644 index ec2c08d3a3..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-all-500-normal-94e08ad8.woff and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-all-600-normal-ba29c057.woff b/invokeai/frontend/web/dist/assets/inter-all-600-normal-ba29c057.woff deleted file mode 100644 index 8c99dc81ac..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-all-600-normal-ba29c057.woff and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-all-700-normal-9d318ccb.woff b/invokeai/frontend/web/dist/assets/inter-all-700-normal-9d318ccb.woff deleted file mode 100644 index 7248f274da..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-all-700-normal-9d318ccb.woff and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-all-800-normal-ab496fbe.woff b/invokeai/frontend/web/dist/assets/inter-all-800-normal-ab496fbe.woff deleted file mode 100644 index 241bb64d8f..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-all-800-normal-ab496fbe.woff and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-all-900-normal-50daf4f1.woff b/invokeai/frontend/web/dist/assets/inter-all-900-normal-50daf4f1.woff deleted file mode 100644 index cc3405d57f..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-all-900-normal-50daf4f1.woff and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-cyrillic-100-normal-9747741a.woff2 b/invokeai/frontend/web/dist/assets/inter-cyrillic-100-normal-9747741a.woff2 deleted file mode 100644 index 519ef27e60..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-cyrillic-100-normal-9747741a.woff2 and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-cyrillic-200-normal-87d2e1ba.woff2 b/invokeai/frontend/web/dist/assets/inter-cyrillic-200-normal-87d2e1ba.woff2 deleted file mode 100644 index d94f792fb6..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-cyrillic-200-normal-87d2e1ba.woff2 and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-cyrillic-300-normal-cff08766.woff2 b/invokeai/frontend/web/dist/assets/inter-cyrillic-300-normal-cff08766.woff2 deleted file mode 100644 index f98e5b2309..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-cyrillic-300-normal-cff08766.woff2 and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-cyrillic-400-normal-e9493683.woff2 b/invokeai/frontend/web/dist/assets/inter-cyrillic-400-normal-e9493683.woff2 deleted file mode 100644 index c1c57683d4..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-cyrillic-400-normal-e9493683.woff2 and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-cyrillic-500-normal-f6bd191e.woff2 b/invokeai/frontend/web/dist/assets/inter-cyrillic-500-normal-f6bd191e.woff2 deleted file mode 100644 index d1518426fa..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-cyrillic-500-normal-f6bd191e.woff2 and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-cyrillic-600-normal-9bc492f5.woff2 b/invokeai/frontend/web/dist/assets/inter-cyrillic-600-normal-9bc492f5.woff2 deleted file mode 100644 index b0f0af58b5..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-cyrillic-600-normal-9bc492f5.woff2 and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-cyrillic-700-normal-f6c6dcaf.woff2 b/invokeai/frontend/web/dist/assets/inter-cyrillic-700-normal-f6c6dcaf.woff2 deleted file mode 100644 index 22a09b0bb7..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-cyrillic-700-normal-f6c6dcaf.woff2 and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-cyrillic-800-normal-82994ee8.woff2 b/invokeai/frontend/web/dist/assets/inter-cyrillic-800-normal-82994ee8.woff2 deleted file mode 100644 index cad49b6327..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-cyrillic-800-normal-82994ee8.woff2 and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-cyrillic-900-normal-768011c3.woff2 b/invokeai/frontend/web/dist/assets/inter-cyrillic-900-normal-768011c3.woff2 deleted file mode 100644 index d1133f54c2..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-cyrillic-900-normal-768011c3.woff2 and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-cyrillic-ext-100-normal-a1f4d02d.woff2 b/invokeai/frontend/web/dist/assets/inter-cyrillic-ext-100-normal-a1f4d02d.woff2 deleted file mode 100644 index 878765a5f1..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-cyrillic-ext-100-normal-a1f4d02d.woff2 and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-cyrillic-ext-200-normal-82562199.woff2 b/invokeai/frontend/web/dist/assets/inter-cyrillic-ext-200-normal-82562199.woff2 deleted file mode 100644 index eb02003206..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-cyrillic-ext-200-normal-82562199.woff2 and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-cyrillic-ext-300-normal-66b2369e.woff2 b/invokeai/frontend/web/dist/assets/inter-cyrillic-ext-300-normal-66b2369e.woff2 deleted file mode 100644 index 294c7ff844..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-cyrillic-ext-300-normal-66b2369e.woff2 and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-cyrillic-ext-400-normal-f7666a51.woff2 b/invokeai/frontend/web/dist/assets/inter-cyrillic-ext-400-normal-f7666a51.woff2 deleted file mode 100644 index da834bb837..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-cyrillic-ext-400-normal-f7666a51.woff2 and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-cyrillic-ext-500-normal-8b5f6999.woff2 b/invokeai/frontend/web/dist/assets/inter-cyrillic-ext-500-normal-8b5f6999.woff2 deleted file mode 100644 index 5a1646bce5..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-cyrillic-ext-500-normal-8b5f6999.woff2 and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-cyrillic-ext-600-normal-2ea11f8c.woff2 b/invokeai/frontend/web/dist/assets/inter-cyrillic-ext-600-normal-2ea11f8c.woff2 deleted file mode 100644 index 3b4d7f4bc4..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-cyrillic-ext-600-normal-2ea11f8c.woff2 and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-cyrillic-ext-700-normal-b7bb121f.woff2 b/invokeai/frontend/web/dist/assets/inter-cyrillic-ext-700-normal-b7bb121f.woff2 deleted file mode 100644 index 7e52d98cd9..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-cyrillic-ext-700-normal-b7bb121f.woff2 and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-cyrillic-ext-800-normal-f15d8f83.woff2 b/invokeai/frontend/web/dist/assets/inter-cyrillic-ext-800-normal-f15d8f83.woff2 deleted file mode 100644 index f9a1a8cd52..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-cyrillic-ext-800-normal-f15d8f83.woff2 and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-cyrillic-ext-900-normal-b1c13874.woff2 b/invokeai/frontend/web/dist/assets/inter-cyrillic-ext-900-normal-b1c13874.woff2 deleted file mode 100644 index 160f0fff85..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-cyrillic-ext-900-normal-b1c13874.woff2 and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-greek-100-normal-a44b9fc9.woff2 b/invokeai/frontend/web/dist/assets/inter-greek-100-normal-a44b9fc9.woff2 deleted file mode 100644 index bbff286cb1..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-greek-100-normal-a44b9fc9.woff2 and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-greek-200-normal-9575e0f8.woff2 b/invokeai/frontend/web/dist/assets/inter-greek-200-normal-9575e0f8.woff2 deleted file mode 100644 index 8041bcbff9..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-greek-200-normal-9575e0f8.woff2 and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-greek-300-normal-d0749e19.woff2 b/invokeai/frontend/web/dist/assets/inter-greek-300-normal-d0749e19.woff2 deleted file mode 100644 index e96490ff2f..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-greek-300-normal-d0749e19.woff2 and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-greek-400-normal-2f2d421a.woff2 b/invokeai/frontend/web/dist/assets/inter-greek-400-normal-2f2d421a.woff2 deleted file mode 100644 index 143a941b81..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-greek-400-normal-2f2d421a.woff2 and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-greek-500-normal-ddbf6a70.woff2 b/invokeai/frontend/web/dist/assets/inter-greek-500-normal-ddbf6a70.woff2 deleted file mode 100644 index 5c9863829c..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-greek-500-normal-ddbf6a70.woff2 and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-greek-600-normal-4591e350.woff2 b/invokeai/frontend/web/dist/assets/inter-greek-600-normal-4591e350.woff2 deleted file mode 100644 index f4f0a5eb8c..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-greek-600-normal-4591e350.woff2 and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-greek-700-normal-9e078f49.woff2 b/invokeai/frontend/web/dist/assets/inter-greek-700-normal-9e078f49.woff2 deleted file mode 100644 index 140147ef94..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-greek-700-normal-9e078f49.woff2 and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-greek-800-normal-fb5de277.woff2 b/invokeai/frontend/web/dist/assets/inter-greek-800-normal-fb5de277.woff2 deleted file mode 100644 index 544d583571..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-greek-800-normal-fb5de277.woff2 and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-greek-900-normal-ffa82654.woff2 b/invokeai/frontend/web/dist/assets/inter-greek-900-normal-ffa82654.woff2 deleted file mode 100644 index ab3f1c08dd..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-greek-900-normal-ffa82654.woff2 and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-greek-ext-100-normal-71976b96.woff2 b/invokeai/frontend/web/dist/assets/inter-greek-ext-100-normal-71976b96.woff2 deleted file mode 100644 index 4f023ac30e..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-greek-ext-100-normal-71976b96.woff2 and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-greek-ext-200-normal-45dafb12.woff2 b/invokeai/frontend/web/dist/assets/inter-greek-ext-200-normal-45dafb12.woff2 deleted file mode 100644 index 8fa4e47281..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-greek-ext-200-normal-45dafb12.woff2 and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-greek-ext-300-normal-09d21325.woff2 b/invokeai/frontend/web/dist/assets/inter-greek-ext-300-normal-09d21325.woff2 deleted file mode 100644 index 97e45aae32..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-greek-ext-300-normal-09d21325.woff2 and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-greek-ext-400-normal-d3e30cde.woff2 b/invokeai/frontend/web/dist/assets/inter-greek-ext-400-normal-d3e30cde.woff2 deleted file mode 100644 index 5f4ae9236e..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-greek-ext-400-normal-d3e30cde.woff2 and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-greek-ext-500-normal-528b79aa.woff2 b/invokeai/frontend/web/dist/assets/inter-greek-ext-500-normal-528b79aa.woff2 deleted file mode 100644 index aec20f619f..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-greek-ext-500-normal-528b79aa.woff2 and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-greek-ext-600-normal-c37a11b3.woff2 b/invokeai/frontend/web/dist/assets/inter-greek-ext-600-normal-c37a11b3.woff2 deleted file mode 100644 index 0fee707f37..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-greek-ext-600-normal-c37a11b3.woff2 and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-greek-ext-700-normal-22174f43.woff2 b/invokeai/frontend/web/dist/assets/inter-greek-ext-700-normal-22174f43.woff2 deleted file mode 100644 index 3a44ec3683..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-greek-ext-700-normal-22174f43.woff2 and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-greek-ext-800-normal-bddb6f8e.woff2 b/invokeai/frontend/web/dist/assets/inter-greek-ext-800-normal-bddb6f8e.woff2 deleted file mode 100644 index 3d281d004b..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-greek-ext-800-normal-bddb6f8e.woff2 and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-greek-ext-900-normal-bebcb6fc.woff2 b/invokeai/frontend/web/dist/assets/inter-greek-ext-900-normal-bebcb6fc.woff2 deleted file mode 100644 index c23b86f1d3..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-greek-ext-900-normal-bebcb6fc.woff2 and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-latin-100-normal-61cac109.woff2 b/invokeai/frontend/web/dist/assets/inter-latin-100-normal-61cac109.woff2 deleted file mode 100644 index 1ef2357365..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-latin-100-normal-61cac109.woff2 and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-latin-200-normal-74885a0c.woff2 b/invokeai/frontend/web/dist/assets/inter-latin-200-normal-74885a0c.woff2 deleted file mode 100644 index ca591ae703..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-latin-200-normal-74885a0c.woff2 and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-latin-300-normal-6b2cee46.woff2 b/invokeai/frontend/web/dist/assets/inter-latin-300-normal-6b2cee46.woff2 deleted file mode 100644 index e085aa82c6..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-latin-300-normal-6b2cee46.woff2 and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-latin-400-normal-0364d368.woff2 b/invokeai/frontend/web/dist/assets/inter-latin-400-normal-0364d368.woff2 deleted file mode 100644 index c659f5e4a1..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-latin-400-normal-0364d368.woff2 and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-latin-500-normal-d5333670.woff2 b/invokeai/frontend/web/dist/assets/inter-latin-500-normal-d5333670.woff2 deleted file mode 100644 index 6fc94ad0cc..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-latin-500-normal-d5333670.woff2 and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-latin-600-normal-048d136d.woff2 b/invokeai/frontend/web/dist/assets/inter-latin-600-normal-048d136d.woff2 deleted file mode 100644 index bc76d107f6..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-latin-600-normal-048d136d.woff2 and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-latin-700-normal-ced2d8e0.woff2 b/invokeai/frontend/web/dist/assets/inter-latin-700-normal-ced2d8e0.woff2 deleted file mode 100644 index 8fcc4321c7..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-latin-700-normal-ced2d8e0.woff2 and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-latin-800-normal-a51ac27d.woff2 b/invokeai/frontend/web/dist/assets/inter-latin-800-normal-a51ac27d.woff2 deleted file mode 100644 index 27db0546cd..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-latin-800-normal-a51ac27d.woff2 and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-latin-900-normal-f2db7f82.woff2 b/invokeai/frontend/web/dist/assets/inter-latin-900-normal-f2db7f82.woff2 deleted file mode 100644 index b1c208a14c..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-latin-900-normal-f2db7f82.woff2 and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-latin-ext-100-normal-d3be20b3.woff2 b/invokeai/frontend/web/dist/assets/inter-latin-ext-100-normal-d3be20b3.woff2 deleted file mode 100644 index 9982f5f6e3..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-latin-ext-100-normal-d3be20b3.woff2 and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-latin-ext-200-normal-4336e69d.woff2 b/invokeai/frontend/web/dist/assets/inter-latin-ext-200-normal-4336e69d.woff2 deleted file mode 100644 index a822063f13..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-latin-ext-200-normal-4336e69d.woff2 and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-latin-ext-300-normal-34623012.woff2 b/invokeai/frontend/web/dist/assets/inter-latin-ext-300-normal-34623012.woff2 deleted file mode 100644 index 25be677ce2..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-latin-ext-300-normal-34623012.woff2 and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-latin-ext-400-normal-64a98f58.woff2 b/invokeai/frontend/web/dist/assets/inter-latin-ext-400-normal-64a98f58.woff2 deleted file mode 100644 index b0d08940ce..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-latin-ext-400-normal-64a98f58.woff2 and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-latin-ext-500-normal-4fba9ae6.woff2 b/invokeai/frontend/web/dist/assets/inter-latin-ext-500-normal-4fba9ae6.woff2 deleted file mode 100644 index e78729184b..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-latin-ext-500-normal-4fba9ae6.woff2 and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-latin-ext-600-normal-cc23fe6f.woff2 b/invokeai/frontend/web/dist/assets/inter-latin-ext-600-normal-cc23fe6f.woff2 deleted file mode 100644 index 8ff1de2f40..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-latin-ext-600-normal-cc23fe6f.woff2 and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-latin-ext-700-normal-1cc47d25.woff2 b/invokeai/frontend/web/dist/assets/inter-latin-ext-700-normal-1cc47d25.woff2 deleted file mode 100644 index d8c5665e3c..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-latin-ext-700-normal-1cc47d25.woff2 and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-latin-ext-800-normal-b6167428.woff2 b/invokeai/frontend/web/dist/assets/inter-latin-ext-800-normal-b6167428.woff2 deleted file mode 100644 index 1a2cf49605..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-latin-ext-800-normal-b6167428.woff2 and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/inter-latin-ext-900-normal-3cff82a5.woff2 b/invokeai/frontend/web/dist/assets/inter-latin-ext-900-normal-3cff82a5.woff2 deleted file mode 100644 index 2d12b58373..0000000000 Binary files a/invokeai/frontend/web/dist/assets/inter-latin-ext-900-normal-3cff82a5.woff2 and /dev/null differ diff --git a/invokeai/frontend/web/dist/assets/storeHooks-5cde7d31.js b/invokeai/frontend/web/dist/assets/storeHooks-5cde7d31.js deleted file mode 100644 index aa0bb74961..0000000000 --- a/invokeai/frontend/web/dist/assets/storeHooks-5cde7d31.js +++ /dev/null @@ -1,9 +0,0 @@ -import{cZ as zt,c_ as Ji,r as m,j as C,G as Cs,R as Ss,c as G,t as Te,f as Mt,a as Dt,e as As,S as Qi,o as Vs,d as to,c$ as eo}from"./index-e53e8108.js";function ws(t=zt){const e=t===zt?Ji:()=>m.useContext(t);return function(){const{store:s}=e();return s}}const no=ws();function so(t=zt){const e=t===zt?no:ws(t);return function(){return e().dispatch}}const io=so();function oo(t,e){return`${t} returned \`undefined\`. Seems you forgot to wrap component within ${e}`}function Rt(t={}){const{name:e,strict:n=!0,hookName:s="useContext",providerName:i="Provider",errorMessage:r}=t,o=m.createContext(void 0);o.displayName=e;function a(){var c;const l=m.useContext(o);if(!l&&n){const u=new Error(r??oo(s,i));throw u.name="ContextError",(c=Error.captureStackTrace)==null||c.call(Error,u,a),u}return l}return[o.Provider,a,o]}var[ro,ao]=Rt({strict:!1,name:"PortalManagerContext"});function co(t){const{children:e,zIndex:n}=t;return C.jsx(ro,{value:{zIndex:n},children:e})}co.displayName="PortalManager";var Ce=Boolean(globalThis==null?void 0:globalThis.document)?m.useLayoutEffect:m.useEffect,[Ms,lo]=Rt({strict:!1,name:"PortalContext"}),ze="chakra-portal",uo=".chakra-portal",fo=t=>C.jsx("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:t.zIndex,top:0,left:0,right:0},children:t.children}),ho=t=>{const{appendToParentPortal:e,children:n}=t,[s,i]=m.useState(null),r=m.useRef(null),[,o]=m.useState({});m.useEffect(()=>o({}),[]);const a=lo(),c=ao();Ce(()=>{if(!s)return;const u=s.ownerDocument,f=e?a??u.body:u.body;if(!f)return;r.current=u.createElement("div"),r.current.className=ze,f.appendChild(r.current),o({});const h=r.current;return()=>{f.contains(h)&&f.removeChild(h)}},[s]);const l=c!=null&&c.zIndex?C.jsx(fo,{zIndex:c==null?void 0:c.zIndex,children:n}):n;return r.current?Cs.createPortal(C.jsx(Ms,{value:r.current,children:l}),r.current):C.jsx("span",{ref:u=>{u&&i(u)}})},po=t=>{const{children:e,containerRef:n,appendToParentPortal:s}=t,i=n.current,r=i??(typeof window<"u"?document.body:void 0),o=m.useMemo(()=>{const c=i==null?void 0:i.ownerDocument.createElement("div");return c&&(c.className=ze),c},[i]),[,a]=m.useState({});return Ce(()=>a({}),[]),Ce(()=>{if(!(!o||!r))return r.appendChild(o),()=>{r.removeChild(o)}},[o,r]),r&&o?Cs.createPortal(C.jsx(Ms,{value:s?o:null,children:e}),o):null};function Jt(t){const e={appendToParentPortal:!0,...t},{containerRef:n,...s}=e;return n?C.jsx(po,{containerRef:n,...s}):C.jsx(ho,{...s})}Jt.className=ze;Jt.selector=uo;Jt.displayName="Portal";var mo=(t,e)=>t.find(n=>n.id===e);function yn(t,e){const n=Ds(t,e),s=n?t[n].findIndex(i=>i.id===e):-1;return{position:n,index:s}}function Ds(t,e){for(const[n,s]of Object.entries(t))if(mo(s,e))return n}function go(t){const e=t.includes("right"),n=t.includes("left");let s="center";return e&&(s="flex-end"),n&&(s="flex-start"),{display:"flex",flexDirection:"column",alignItems:s}}function yo(t){const n=t==="top"||t==="bottom"?"0 auto":void 0,s=t.includes("top")?"env(safe-area-inset-top, 0px)":void 0,i=t.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,r=t.includes("left")?void 0:"env(safe-area-inset-right, 0px)",o=t.includes("right")?void 0:"env(safe-area-inset-left, 0px)";return{position:"fixed",zIndex:5500,pointerEvents:"none",display:"flex",flexDirection:"column",margin:n,top:s,bottom:i,right:r,left:o}}function vo(t,e=[]){const n=m.useRef(t);return m.useEffect(()=>{n.current=t}),m.useCallback((...s)=>{var i;return(i=n.current)==null?void 0:i.call(n,...s)},e)}function xo(t,e){const n=vo(t);m.useEffect(()=>{if(e==null)return;let s=null;return s=window.setTimeout(()=>{n()},e),()=>{s&&window.clearTimeout(s)}},[e,n])}function vn(t,e){const n=m.useRef(!1),s=m.useRef(!1);m.useEffect(()=>{if(n.current&&s.current)return t();s.current=!0},e),m.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])}const Rs=m.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),Qt=m.createContext({});function Po(){return m.useContext(Qt).visualElement}const Et=m.createContext(null),te=typeof document<"u",$t=te?m.useLayoutEffect:m.useEffect,Es=m.createContext({strict:!1});function bo(t,e,n,s){const i=Po(),r=m.useContext(Es),o=m.useContext(Et),a=m.useContext(Rs).reducedMotion,c=m.useRef();s=s||r.renderer,!c.current&&s&&(c.current=s(t,{visualState:e,parent:i,props:n,presenceContext:o,blockInitialAnimation:o?o.initial===!1:!1,reducedMotionConfig:a}));const l=c.current;return m.useInsertionEffect(()=>{l&&l.update(n,o)}),$t(()=>{l&&l.render()}),m.useEffect(()=>{l&&l.updateFeatures()}),(window.HandoffAppearAnimations?$t:m.useEffect)(()=>{l&&l.animationState&&l.animationState.animateChanges()}),l}function lt(t){return typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function To(t,e,n){return m.useCallback(s=>{s&&t.mount&&t.mount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):lt(n)&&(n.current=s))},[e])}function Ct(t){return typeof t=="string"||Array.isArray(t)}function ee(t){return typeof t=="object"&&typeof t.start=="function"}const $e=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],He=["initial",...$e];function ne(t){return ee(t.animate)||He.some(e=>Ct(t[e]))}function Ls(t){return Boolean(ne(t)||t.variants)}function Co(t,e){if(ne(t)){const{initial:n,animate:s}=t;return{initial:n===!1||Ct(n)?n:void 0,animate:Ct(s)?s:void 0}}return t.inherit!==!1?e:{}}function So(t){const{initial:e,animate:n}=Co(t,m.useContext(Qt));return m.useMemo(()=>({initial:e,animate:n}),[xn(e),xn(n)])}function xn(t){return Array.isArray(t)?t.join(" "):t}const Pn={animation:["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},St={};for(const t in Pn)St[t]={isEnabled:e=>Pn[t].some(n=>!!e[n])};function Ao(t){for(const e in t)St[e]={...St[e],...t[e]}}function We(t){const e=m.useRef(null);return e.current===null&&(e.current=t()),e.current}const yt={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let Vo=1;function wo(){return We(()=>{if(yt.hasEverUpdated)return Vo++})}const Ge=m.createContext({}),js=m.createContext({}),Mo=Symbol.for("motionComponentSymbol");function Do({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:s,Component:i}){t&&Ao(t);function r(a,c){let l;const u={...m.useContext(Rs),...a,layoutId:Ro(a)},{isStatic:f}=u,h=So(a),d=f?void 0:wo(),p=s(a,f);if(!f&&te){h.visualElement=bo(i,p,u,e);const g=m.useContext(js),T=m.useContext(Es).strict;h.visualElement&&(l=h.visualElement.loadFeatures(u,T,t,d,g))}return m.createElement(Qt.Provider,{value:h},l&&h.visualElement?m.createElement(l,{visualElement:h.visualElement,...u}):null,n(i,a,d,To(p,h.visualElement,c),p,f,h.visualElement))}const o=m.forwardRef(r);return o[Mo]=i,o}function Ro({layoutId:t}){const e=m.useContext(Ge).id;return e&&t!==void 0?e+"-"+t:t}function Eo(t){function e(s,i={}){return Do(t(s,i))}if(typeof Proxy>"u")return e;const n=new Map;return new Proxy(e,{get:(s,i)=>(n.has(i)||n.set(i,e(i)),n.get(i))})}const Lo=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Ke(t){return typeof t!="string"||t.includes("-")?!1:!!(Lo.indexOf(t)>-1||/[A-Z]/.test(t))}const Ht={};function jo(t){Object.assign(Ht,t)}const se=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ot=new Set(se);function Bs(t,{layout:e,layoutId:n}){return ot.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Ht[t]||t==="opacity")}const j=t=>Boolean(t&&t.getVelocity),Bo={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},ko=se.length;function Fo(t,{enableHardwareAcceleration:e=!0,allowTransformNone:n=!0},s,i){let r="";for(let o=0;oe=>typeof e=="string"&&e.startsWith(t),Fs=ks("--"),Se=ks("var(--"),Io=(t,e)=>e&&typeof t=="number"?e.transform(t):t,ht=(t,e,n)=>Math.min(Math.max(n,t),e),rt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},vt={...rt,transform:t=>ht(0,1,t)},It={...rt,default:1},xt=t=>Math.round(t*1e5)/1e5,At=/(-)?([\d]*\.?[\d])+/g,Ae=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,Oo=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Lt(t){return typeof t=="string"}const jt=t=>({test:e=>Lt(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),q=jt("deg"),z=jt("%"),b=jt("px"),No=jt("vh"),Uo=jt("vw"),bn={...z,parse:t=>z.parse(t)/100,transform:t=>z.transform(t*100)},Tn={...rt,transform:Math.round},Is={borderWidth:b,borderTopWidth:b,borderRightWidth:b,borderBottomWidth:b,borderLeftWidth:b,borderRadius:b,radius:b,borderTopLeftRadius:b,borderTopRightRadius:b,borderBottomRightRadius:b,borderBottomLeftRadius:b,width:b,maxWidth:b,height:b,maxHeight:b,size:b,top:b,right:b,bottom:b,left:b,padding:b,paddingTop:b,paddingRight:b,paddingBottom:b,paddingLeft:b,margin:b,marginTop:b,marginRight:b,marginBottom:b,marginLeft:b,rotate:q,rotateX:q,rotateY:q,rotateZ:q,scale:It,scaleX:It,scaleY:It,scaleZ:It,skew:q,skewX:q,skewY:q,distance:b,translateX:b,translateY:b,translateZ:b,x:b,y:b,z:b,perspective:b,transformPerspective:b,opacity:vt,originX:bn,originY:bn,originZ:b,zIndex:Tn,fillOpacity:vt,strokeOpacity:vt,numOctaves:Tn};function Ze(t,e,n,s){const{style:i,vars:r,transform:o,transformOrigin:a}=t;let c=!1,l=!1,u=!0;for(const f in e){const h=e[f];if(Fs(f)){r[f]=h;continue}const d=Is[f],p=Io(h,d);if(ot.has(f)){if(c=!0,o[f]=p,!u)continue;h!==(d.default||0)&&(u=!1)}else f.startsWith("origin")?(l=!0,a[f]=p):i[f]=p}if(e.transform||(c||s?i.transform=Fo(t.transform,n,u,s):i.transform&&(i.transform="none")),l){const{originX:f="50%",originY:h="50%",originZ:d=0}=a;i.transformOrigin=`${f} ${h} ${d}`}}const qe=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Os(t,e,n){for(const s in e)!j(e[s])&&!Bs(s,n)&&(t[s]=e[s])}function _o({transformTemplate:t},e,n){return m.useMemo(()=>{const s=qe();return Ze(s,e,{enableHardwareAcceleration:!n},t),Object.assign({},s.vars,s.style)},[e])}function zo(t,e,n){const s=t.style||{},i={};return Os(i,s,t),Object.assign(i,_o(t,e,n)),t.transformValues?t.transformValues(i):i}function $o(t,e,n){const s={},i=zo(t,e,n);return t.drag&&t.dragListener!==!1&&(s.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(s.tabIndex=0),s.style=i,s}const Ho=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function Wt(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||Ho.has(t)}let Ns=t=>!Wt(t);function Wo(t){t&&(Ns=e=>e.startsWith("on")?!Wt(e):t(e))}try{Wo(require("@emotion/is-prop-valid").default)}catch{}function Go(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(Ns(i)||n===!0&&Wt(i)||!e&&!Wt(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}function Cn(t,e,n){return typeof t=="string"?t:b.transform(e+n*t)}function Ko(t,e,n){const s=Cn(e,t.x,t.width),i=Cn(n,t.y,t.height);return`${s} ${i}`}const Zo={offset:"stroke-dashoffset",array:"stroke-dasharray"},qo={offset:"strokeDashoffset",array:"strokeDasharray"};function Xo(t,e,n=1,s=0,i=!0){t.pathLength=1;const r=i?Zo:qo;t[r.offset]=b.transform(-s);const o=b.transform(e),a=b.transform(n);t[r.array]=`${o} ${a}`}function Xe(t,{attrX:e,attrY:n,originX:s,originY:i,pathLength:r,pathSpacing:o=1,pathOffset:a=0,...c},l,u,f){if(Ze(t,c,l,f),u){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:d,dimensions:p}=t;h.transform&&(p&&(d.transform=h.transform),delete h.transform),p&&(s!==void 0||i!==void 0||d.transform)&&(d.transformOrigin=Ko(p,s!==void 0?s:.5,i!==void 0?i:.5)),e!==void 0&&(h.x=e),n!==void 0&&(h.y=n),r!==void 0&&Xo(h,r,o,a,!1)}const Us=()=>({...qe(),attrs:{}}),Ye=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Yo(t,e,n,s){const i=m.useMemo(()=>{const r=Us();return Xe(r,e,{enableHardwareAcceleration:!1},Ye(s),t.transformTemplate),{...r.attrs,style:{...r.style}}},[e]);if(t.style){const r={};Os(r,t.style,t),i.style={...r,...i.style}}return i}function Jo(t=!1){return(n,s,i,r,{latestValues:o},a)=>{const l=(Ke(n)?Yo:$o)(s,o,a,n),f={...Go(s,typeof n=="string",t),...l,ref:r},{children:h}=s,d=m.useMemo(()=>j(h)?h.get():h,[h]);return i&&(f["data-projection-id"]=i),m.createElement(n,{...f,children:d})}}const Je=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function _s(t,{style:e,vars:n},s,i){Object.assign(t.style,e,i&&i.getProjectionStyles(s));for(const r in n)t.style.setProperty(r,n[r])}const zs=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function $s(t,e,n,s){_s(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(zs.has(i)?i:Je(i),e.attrs[i])}function Qe(t,e){const{style:n}=t,s={};for(const i in n)(j(n[i])||e.style&&j(e.style[i])||Bs(i,t))&&(s[i]=n[i]);return s}function Hs(t,e){const n=Qe(t,e);for(const s in t)if(j(t[s])||j(e[s])){const i=s==="x"||s==="y"?"attr"+s.toUpperCase():s;n[i]=t[s]}return n}function tn(t,e,n,s={},i={}){return typeof e=="function"&&(e=e(n!==void 0?n:t.custom,s,i)),typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"&&(e=e(n!==void 0?n:t.custom,s,i)),e}const Gt=t=>Array.isArray(t),Qo=t=>Boolean(t&&typeof t=="object"&&t.mix&&t.toValue),tr=t=>Gt(t)?t[t.length-1]||0:t;function Ut(t){const e=j(t)?t.get():t;return Qo(e)?e.toValue():e}function er({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},s,i,r){const o={latestValues:nr(s,i,r,t),renderState:e()};return n&&(o.mount=a=>n(s,a,o)),o}const Ws=t=>(e,n)=>{const s=m.useContext(Qt),i=m.useContext(Et),r=()=>er(t,e,s,i);return n?r():We(r)};function nr(t,e,n,s){const i={},r=s(t,{});for(const h in r)i[h]=Ut(r[h]);let{initial:o,animate:a}=t;const c=ne(t),l=Ls(t);e&&l&&!c&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let u=n?n.initial===!1:!1;u=u||o===!1;const f=u?a:o;return f&&typeof f!="boolean"&&!ee(f)&&(Array.isArray(f)?f:[f]).forEach(d=>{const p=tn(t,d);if(!p)return;const{transitionEnd:g,transition:T,...P}=p;for(const x in P){let y=P[x];if(Array.isArray(y)){const v=u?y.length-1:0;y=y[v]}y!==null&&(i[x]=y)}for(const x in g)i[x]=g[x]}),i}const sr={useVisualState:Ws({scrapeMotionValuesFromProps:Hs,createRenderState:Us,onMount:(t,e,{renderState:n,latestValues:s})=>{try{n.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}Xe(n,s,{enableHardwareAcceleration:!1},Ye(e.tagName),t.transformTemplate),$s(e,n)}})},ir={useVisualState:Ws({scrapeMotionValuesFromProps:Qe,createRenderState:qe})};function or(t,{forwardMotionProps:e=!1},n,s){return{...Ke(t)?sr:ir,preloadedFeatures:n,useRender:Jo(e),createVisualElement:s,Component:t}}function $(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}const Gs=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function ie(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const rr=t=>e=>Gs(e)&&t(e,ie(e));function H(t,e,n,s){return $(t,e,rr(n),s)}const ar=(t,e)=>n=>e(t(n)),Y=(...t)=>t.reduce(ar);function Ks(t){let e=null;return()=>{const n=()=>{e=null};return e===null?(e=t,n):!1}}const Sn=Ks("dragHorizontal"),An=Ks("dragVertical");function Zs(t){let e=!1;if(t==="y")e=An();else if(t==="x")e=Sn();else{const n=Sn(),s=An();n&&s?e=()=>{n(),s()}:(n&&n(),s&&s())}return e}function qs(){const t=Zs(!0);return t?(t(),!1):!0}class tt{constructor(e){this.isMounted=!1,this.node=e}update(){}}function Vn(t,e){const n="pointer"+(e?"enter":"leave"),s="onHover"+(e?"Start":"End"),i=(r,o)=>{if(r.type==="touch"||qs())return;const a=t.getProps();t.animationState&&a.whileHover&&t.animationState.setActive("whileHover",e),a[s]&&a[s](r,o)};return H(t.current,n,i,{passive:!t.getProps()[s]})}class cr extends tt{mount(){this.unmount=Y(Vn(this.node,!0),Vn(this.node,!1))}unmount(){}}class lr extends tt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Y($(this.node.current,"focus",()=>this.onFocus()),$(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Xs=(t,e)=>e?t===e?!0:Xs(t,e.parentElement):!1,I=t=>t;function le(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,ie(n))}class ur extends tt{constructor(){super(...arguments),this.removeStartListeners=I,this.removeEndListeners=I,this.removeAccessibleListeners=I,this.startPointerPress=(e,n)=>{if(this.removeEndListeners(),this.isPressing)return;const s=this.node.getProps(),r=H(window,"pointerup",(a,c)=>{if(!this.checkPressEnd())return;const{onTap:l,onTapCancel:u}=this.node.getProps();Xs(this.node.current,a.target)?l&&l(a,c):u&&u(a,c)},{passive:!(s.onTap||s.onPointerUp)}),o=H(window,"pointercancel",(a,c)=>this.cancelPress(a,c),{passive:!(s.onTapCancel||s.onPointerCancel)});this.removeEndListeners=Y(r,o),this.startPress(e,n)},this.startAccessiblePress=()=>{const e=r=>{if(r.key!=="Enter"||this.isPressing)return;const o=a=>{a.key!=="Enter"||!this.checkPressEnd()||le("up",this.node.getProps().onTap)};this.removeEndListeners(),this.removeEndListeners=$(this.node.current,"keyup",o),le("down",(a,c)=>{this.startPress(a,c)})},n=$(this.node.current,"keydown",e),s=()=>{this.isPressing&&le("cancel",(r,o)=>this.cancelPress(r,o))},i=$(this.node.current,"blur",s);this.removeAccessibleListeners=Y(n,i)}}startPress(e,n){this.isPressing=!0;const{onTapStart:s,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),s&&s(e,n)}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!qs()}cancelPress(e,n){if(!this.checkPressEnd())return;const{onTapCancel:s}=this.node.getProps();s&&s(e,n)}mount(){const e=this.node.getProps(),n=H(this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),s=$(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Y(n,s)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Ve=new WeakMap,ue=new WeakMap,fr=t=>{const e=Ve.get(t.target);e&&e(t)},hr=t=>{t.forEach(fr)};function dr({root:t,...e}){const n=t||document;ue.has(n)||ue.set(n,{});const s=ue.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(hr,{root:t,...e})),s[i]}function pr(t,e,n){const s=dr(e);return Ve.set(t,n),s.observe(t),()=>{Ve.delete(t),s.unobserve(t)}}const mr={some:0,all:1};class gr extends tt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}viewportFallback(){requestAnimationFrame(()=>{this.hasEnteredView=!0;const{onViewportEnter:e}=this.node.getProps();e&&e(null),this.node.animationState&&this.node.animationState.setActive("whileInView",!0)})}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:r,fallback:o=!0}=e;if(typeof IntersectionObserver>"u"){o&&this.viewportFallback();return}const a={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:mr[i]},c=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,r&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:f,onViewportLeave:h}=this.node.getProps(),d=u?f:h;d&&d(l)};return pr(this.node.current,a,c)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(yr(e,n))&&this.startObserver()}unmount(){}}function yr({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const vr={inView:{Feature:gr},tap:{Feature:ur},focus:{Feature:lr},hover:{Feature:cr}};function Ys(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s/^\-?\d*\.?\d+$/.test(t),Pr=t=>/^0[^.\s]+$/.test(t),W={delta:0,timestamp:0},Js=1/60*1e3,br=typeof performance<"u"?()=>performance.now():()=>Date.now(),Qs=typeof window<"u"?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(br()),Js);function Tr(t){let e=[],n=[],s=0,i=!1,r=!1;const o=new WeakSet,a={schedule:(c,l=!1,u=!1)=>{const f=u&&i,h=f?e:n;return l&&o.add(c),h.indexOf(c)===-1&&(h.push(c),f&&i&&(s=e.length)),c},cancel:c=>{const l=n.indexOf(c);l!==-1&&n.splice(l,1),o.delete(c)},process:c=>{if(i){r=!0;return}if(i=!0,[e,n]=[n,e],n.length=0,s=e.length,s)for(let l=0;l(t[e]=Tr(()=>Vt=!0),t),{}),R=Bt.reduce((t,e)=>{const n=oe[e];return t[e]=(s,i=!1,r=!1)=>(Vt||Ar(),n.schedule(s,i,r)),t},{}),J=Bt.reduce((t,e)=>(t[e]=oe[e].cancel,t),{}),fe=Bt.reduce((t,e)=>(t[e]=()=>oe[e].process(W),t),{}),Sr=t=>oe[t].process(W),ti=t=>{Vt=!1,W.delta=we?Js:Math.max(Math.min(t-W.timestamp,Cr),1),W.timestamp=t,Me=!0,Bt.forEach(Sr),Me=!1,Vt&&(we=!1,Qs(ti))},Ar=()=>{Vt=!0,we=!0,Me||Qs(ti)};function en(t,e){t.indexOf(e)===-1&&t.push(e)}function nn(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class sn{constructor(){this.subscriptions=[]}add(e){return en(this.subscriptions,e),()=>nn(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let r=0;r!isNaN(parseFloat(t));class wr{constructor(e,n={}){this.version="9.1.7",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(s,i=!0)=>{this.prev=this.current,this.current=s;const{delta:r,timestamp:o}=W;this.lastUpdated!==o&&(this.timeDelta=r,this.lastUpdated=o,R.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>R.postRender(this.velocityCheck),this.velocityCheck=({timestamp:s})=>{s!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=Vr(this.current),this.owner=n.owner}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new sn);const s=this.events[e].add(n);return e==="change"?()=>{s(),R.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e,n=!0){!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,n,s){this.set(n),this.prev=e,this.timeDelta=s}jump(e){this.updateAndNotify(e),this.prev=e,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?on(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n)||null,this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){this.animation=null}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function dt(t,e){return new wr(t,e)}const rn=(t,e)=>n=>Boolean(Lt(n)&&Oo.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),ei=(t,e,n)=>s=>{if(!Lt(s))return s;const[i,r,o,a]=s.match(At);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},Mr=t=>ht(0,255,t),he={...rt,transform:t=>Math.round(Mr(t))},it={test:rn("rgb","red"),parse:ei("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+he.transform(t)+", "+he.transform(e)+", "+he.transform(n)+", "+xt(vt.transform(s))+")"};function Dr(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const De={test:rn("#"),parse:Dr,transform:it.transform},ut={test:rn("hsl","hue"),parse:ei("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+z.transform(xt(e))+", "+z.transform(xt(n))+", "+xt(vt.transform(s))+")"},E={test:t=>it.test(t)||De.test(t)||ut.test(t),parse:t=>it.test(t)?it.parse(t):ut.test(t)?ut.parse(t):De.parse(t),transform:t=>Lt(t)?t:t.hasOwnProperty("red")?it.transform(t):ut.transform(t)},ni="${c}",si="${n}";function Rr(t){var e,n;return isNaN(t)&&Lt(t)&&(((e=t.match(At))===null||e===void 0?void 0:e.length)||0)+(((n=t.match(Ae))===null||n===void 0?void 0:n.length)||0)>0}function Kt(t){typeof t=="number"&&(t=`${t}`);const e=[];let n=0,s=0;const i=t.match(Ae);i&&(n=i.length,t=t.replace(Ae,ni),e.push(...i.map(E.parse)));const r=t.match(At);return r&&(s=r.length,t=t.replace(At,si),e.push(...r.map(rt.parse))),{values:e,numColors:n,numNumbers:s,tokenised:t}}function ii(t){return Kt(t).values}function oi(t){const{values:e,numColors:n,tokenised:s}=Kt(t),i=e.length;return r=>{let o=s;for(let a=0;atypeof t=="number"?0:t;function Lr(t){const e=ii(t);return oi(t)(e.map(Er))}const Q={test:Rr,parse:ii,createTransformer:oi,getAnimatableNone:Lr},jr=new Set(["brightness","contrast","saturate","opacity"]);function Br(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(At)||[];if(!s)return t;const i=n.replace(s,"");let r=jr.has(e)?1:0;return s!==n&&(r*=100),e+"("+r+i+")"}const kr=/([a-z-]*)\(.*?\)/g,Re={...Q,getAnimatableNone:t=>{const e=t.match(kr);return e?e.map(Br).join(" "):t}},Fr={...Is,color:E,backgroundColor:E,outlineColor:E,fill:E,stroke:E,borderColor:E,borderTopColor:E,borderRightColor:E,borderBottomColor:E,borderLeftColor:E,filter:Re,WebkitFilter:Re},an=t=>Fr[t];function cn(t,e){let n=an(t);return n!==Re&&(n=Q),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const ri=t=>e=>e.test(t),Ir={test:t=>t==="auto",parse:t=>t},ai=[rt,b,z,q,Uo,No,Ir],pt=t=>ai.find(ri(t)),Or=[...ai,E,Q],Nr=t=>Or.find(ri(t));function Ur(t){const e={};return t.values.forEach((n,s)=>e[s]=n.get()),e}function _r(t){const e={};return t.values.forEach((n,s)=>e[s]=n.getVelocity()),e}function re(t,e,n){const s=t.getProps();return tn(s,e,n!==void 0?n:s.custom,Ur(t),_r(t))}function zr(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,dt(n))}function $r(t,e){const n=re(t,e);let{transitionEnd:s={},transition:i={},...r}=n?t.makeTargetAnimatable(n,!1):{};r={...r,...s};for(const o in r){const a=tr(r[o]);zr(t,o,a)}}function Hr(t,e,n){var s,i;const r=Object.keys(e).filter(a=>!t.hasValue(a)),o=r.length;if(o)for(let a=0;at*1e3,Xr={current:!1},ln=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,un=t=>e=>1-t(1-e),fn=t=>t*t,Yr=un(fn),hn=ln(fn),A=(t,e,n)=>-n*t+n*e+t;function de(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Jr({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,r=0,o=0;if(!e)i=r=o=n;else{const a=n<.5?n*(1+e):n+e-n*e,c=2*n-a;i=de(c,a,t+1/3),r=de(c,a,t),o=de(c,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:s}}const pe=(t,e,n)=>{const s=t*t;return Math.sqrt(Math.max(0,n*(e*e-s)+s))},Qr=[De,it,ut],ta=t=>Qr.find(e=>e.test(t));function wn(t){const e=ta(t);let n=e.parse(t);return e===ut&&(n=Jr(n)),n}const ci=(t,e)=>{const n=wn(t),s=wn(e),i={...n};return r=>(i.red=pe(n.red,s.red,r),i.green=pe(n.green,s.green,r),i.blue=pe(n.blue,s.blue,r),i.alpha=A(n.alpha,s.alpha,r),it.transform(i))};function li(t,e){return typeof t=="number"?n=>A(t,e,n):E.test(t)?ci(t,e):fi(t,e)}const ui=(t,e)=>{const n=[...t],s=n.length,i=t.map((r,o)=>li(r,e[o]));return r=>{for(let o=0;o{const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=li(t[i],e[i]));return i=>{for(const r in s)n[r]=s[r](i);return n}},fi=(t,e)=>{const n=Q.createTransformer(e),s=Kt(t),i=Kt(e);return s.numColors===i.numColors&&s.numNumbers>=i.numNumbers?Y(ui(s.values,i.values),n):o=>`${o>0?e:t}`},wt=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s},Mn=(t,e)=>n=>A(t,e,n);function na(t){return typeof t=="number"?Mn:typeof t=="string"?E.test(t)?ci:fi:Array.isArray(t)?ui:typeof t=="object"?ea:Mn}function sa(t,e,n){const s=[],i=n||na(t[0]),r=t.length-1;for(let o=0;ot[r-1]&&(t=[...t].reverse(),e=[...e].reverse());const o=sa(e,s,i),a=o.length,c=l=>{let u=0;if(a>1)for(;uc(ht(t[0],t[r-1],l)):c}function ia(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=wt(0,e,s);t.push(A(n,1,i))}}function oa(t){const e=[0];return ia(e,t.length-1),e}function ra(t,e){return t.map(n=>n*e)}const di=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,aa=1e-7,ca=12;function la(t,e,n,s,i){let r,o,a=0;do o=e+(n-e)/2,r=di(o,s,i)-t,r>0?n=o:e=o;while(Math.abs(r)>aa&&++ala(r,0,1,t,n);return r=>r===0||r===1?r:di(i(r),e,s)}const mi=t=>1-Math.sin(Math.acos(t)),dn=un(mi),ua=ln(dn),gi=pi(.33,1.53,.69,.99),pn=un(gi),fa=ln(pn),ha=t=>(t*=2)<1?.5*pn(t):.5*(2-Math.pow(2,-10*(t-1))),da={linear:I,easeIn:fn,easeInOut:hn,easeOut:Yr,circIn:mi,circInOut:ua,circOut:dn,backIn:pn,backInOut:fa,backOut:gi,anticipate:ha},Dn=t=>{if(Array.isArray(t)){qt(t.length===4);const[e,n,s,i]=t;return pi(e,n,s,i)}else if(typeof t=="string")return da[t];return t},pa=t=>Array.isArray(t)&&typeof t[0]!="number";function ma(t,e){return t.map(()=>e||hn).splice(0,t.length-1)}function Ee({keyframes:t,ease:e=hn,times:n,duration:s=300}){t=[...t];const i=pa(e)?e.map(Dn):Dn(e),r={done:!1,value:t[0]},o=ra(n&&n.length===t.length?n:oa(t),s);function a(){return hi(o,t,{ease:Array.isArray(i)?i:ma(t,i)})}let c=a();return{next:l=>(r.value=c(l),r.done=l>=s,r),flipTarget:()=>{t.reverse(),c=a()}}}const me=.001,ga=.01,Rn=10,ya=.05,va=1;function xa({duration:t=800,bounce:e=.25,velocity:n=0,mass:s=1}){let i,r;qr(t<=Rn*1e3);let o=1-e;o=ht(ya,va,o),t=ht(ga,Rn,t/1e3),o<1?(i=l=>{const u=l*o,f=u*t,h=u-n,d=Le(l,o),p=Math.exp(-f);return me-h/d*p},r=l=>{const f=l*o*t,h=f*n+n,d=Math.pow(o,2)*Math.pow(l,2)*t,p=Math.exp(-f),g=Le(Math.pow(l,2),o);return(-i(l)+me>0?-1:1)*((h-d)*p)/g}):(i=l=>{const u=Math.exp(-l*t),f=(l-n)*t+1;return-me+u*f},r=l=>{const u=Math.exp(-l*t),f=(n-l)*(t*t);return u*f});const a=5/t,c=ba(i,r,a);if(t=t*1e3,isNaN(c))return{stiffness:100,damping:10,duration:t};{const l=Math.pow(c,2)*s;return{stiffness:l,damping:o*2*Math.sqrt(s*l),duration:t}}}const Pa=12;function ba(t,e,n){let s=n;for(let i=1;it[n]!==void 0)}function Sa(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!En(t,Ca)&&En(t,Ta)){const n=xa(t);e={...e,...n,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}const Aa=5;function yi({keyframes:t,restDelta:e,restSpeed:n,...s}){let i=t[0],r=t[t.length-1];const o={done:!1,value:i},{stiffness:a,damping:c,mass:l,velocity:u,duration:f,isResolvedFromDuration:h}=Sa(s);let d=Va,p=u?-(u/1e3):0;const g=c/(2*Math.sqrt(a*l));function T(){const P=r-i,x=Math.sqrt(a/l)/1e3,y=Math.abs(P)<5;if(n||(n=y?.01:2),e||(e=y?.005:.5),g<1){const v=Le(x,g);d=S=>{const w=Math.exp(-g*x*S);return r-w*((p+g*x*P)/v*Math.sin(v*S)+P*Math.cos(v*S))}}else if(g===1)d=v=>r-Math.exp(-x*v)*(P+(p+x*P)*v);else{const v=x*Math.sqrt(g*g-1);d=S=>{const w=Math.exp(-g*x*S),D=Math.min(v*S,300);return r-w*((p+g*x*P)*Math.sinh(D)+v*P*Math.cosh(D))/v}}}return T(),{next:P=>{const x=d(P);if(h)o.done=P>=f;else{let y=p;if(P!==0)if(g<1){const w=Math.max(0,P-Aa);y=on(x-d(w),P-w)}else y=0;const v=Math.abs(y)<=n,S=Math.abs(r-x)<=e;o.done=v&&S}return o.value=o.done?r:x,o},flipTarget:()=>{p=-p,[i,r]=[r,i],T()}}}yi.needsInterpolation=(t,e)=>typeof t=="string"||typeof e=="string";const Va=t=>0;function wa({keyframes:t=[0],velocity:e=0,power:n=.8,timeConstant:s=350,restDelta:i=.5,modifyTarget:r}){const o=t[0],a={done:!1,value:o};let c=n*e;const l=o+c,u=r===void 0?l:r(l);return u!==l&&(c=u-o),{next:f=>{const h=-c*Math.exp(-f/s);return a.done=!(h>i||h<-i),a.value=a.done?u:u+h,a},flipTarget:()=>{}}}const Ma={decay:wa,keyframes:Ee,tween:Ee,spring:yi};function vi(t,e,n=0){return t-e-n}function Da(t,e=0,n=0,s=!0){return s?vi(e+-t,e,n):e-(t-e)+n}function Ra(t,e,n,s){return s?t>=e+n:t<=-n}const Ea=t=>{const e=({delta:n})=>t(n);return{start:()=>R.update(e,!0),stop:()=>J.update(e)}};function Xt({duration:t,driver:e=Ea,elapsed:n=0,repeat:s=0,repeatType:i="loop",repeatDelay:r=0,keyframes:o,autoplay:a=!0,onPlay:c,onStop:l,onComplete:u,onRepeat:f,onUpdate:h,type:d="keyframes",...p}){const g=n;let T,P=0,x=t,y=!1,v=!0,S;const w=Ma[o.length>2?"keyframes":d]||Ee,D=o[0],N=o[o.length-1];let k={done:!1,value:D};const{needsInterpolation:O}=w;O&&O(D,N)&&(S=hi([0,100],[D,N],{clamp:!1}),o=[0,100]);const K=w({...p,duration:t,keyframes:o});function Ft(){P++,i==="reverse"?(v=P%2===0,n=Da(n,x,r,v)):(n=vi(n,x,r),i==="mirror"&&K.flipTarget()),y=!1,f&&f()}function ae(){T&&T.stop(),u&&u()}function Z(L){v||(L=-L),n+=L,y||(k=K.next(Math.max(0,n)),S&&(k.value=S(k.value)),y=v?k.done:n<=0),h&&h(k.value),y&&(P===0&&(x=x!==void 0?x:n),P{l&&l(),T&&T.stop()},set currentTime(L){n=g,Z(L)},sample:L=>{n=g;const at=t&&typeof t=="number"?Math.max(t*.5,50):50;let ce=0;for(Z(0);ce<=L;){const Yi=L-ce;Z(Math.min(Yi,at)),ce+=at}return k}}}function La(t){return!t||Array.isArray(t)||typeof t=="string"&&xi[t]}const gt=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,xi={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:gt([0,.65,.55,1]),circOut:gt([.55,0,1,.45]),backIn:gt([.31,.01,.66,-.59]),backOut:gt([.33,1.53,.69,.99])};function ja(t){if(t)return Array.isArray(t)?gt(t):xi[t]}function Ba(t,e,n,{delay:s=0,duration:i,repeat:r=0,repeatType:o="loop",ease:a,times:c}={}){return t.animate({[e]:n,offset:c},{delay:s,duration:i,easing:ja(a),fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"})}const Ln={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},ge={},Pi={};for(const t in Ln)Pi[t]=()=>(ge[t]===void 0&&(ge[t]=Ln[t]()),ge[t]);function ka(t,{repeat:e,repeatType:n="loop"}){const s=e&&n!=="loop"&&e%2===1?0:t.length-1;return t[s]}const Fa=new Set(["opacity","clipPath","filter","transform"]),Ot=10;function Ia(t,e,{onUpdate:n,onComplete:s,...i}){if(!(Pi.waapi()&&Fa.has(e)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0))return!1;let{keyframes:o,duration:a=300,elapsed:c=0,ease:l}=i;if(i.type==="spring"||!La(i.ease)){if(i.repeat===1/0)return;const f=Xt({...i,elapsed:0});let h={done:!1,value:o[0]};const d=[];let p=0;for(;!h.done&&p<2e4;)h=f.sample(p),d.push(h.value),p+=Ot;o=d,a=p-Ot,l="linear"}const u=Ba(t.owner.current,e,o,{...i,delay:-c,duration:a,ease:l});return u.onfinish=()=>{t.set(ka(o,i)),R.update(()=>u.cancel()),s&&s()},{get currentTime(){return u.currentTime||0},set currentTime(f){u.currentTime=f},stop:()=>{const{currentTime:f}=u;if(f){const h=Xt({...i,autoplay:!1});t.setWithVelocity(h.sample(f-Ot).value,h.sample(f).value,Ot)}R.update(()=>u.cancel())}}}function bi(t,e){const n=performance.now(),s=({timestamp:i})=>{const r=i-n;r>=e&&(J.read(s),t(r-e))};return R.read(s,!0),()=>J.read(s)}function Oa({keyframes:t,elapsed:e,onUpdate:n,onComplete:s}){const i=()=>{n&&n(t[t.length-1]),s&&s()};return e?{stop:bi(i,-e)}:i()}function Na({keyframes:t,velocity:e=0,min:n,max:s,power:i=.8,timeConstant:r=750,bounceStiffness:o=500,bounceDamping:a=10,restDelta:c=1,modifyTarget:l,driver:u,onUpdate:f,onComplete:h,onStop:d}){const p=t[0];let g;function T(v){return n!==void 0&&vs}function P(v){return n===void 0?s:s===void 0||Math.abs(n-v){f&&f(S),v.onUpdate&&v.onUpdate(S)},onComplete:h,onStop:d})}function y(v){x({type:"spring",stiffness:o,damping:a,restDelta:c,...v})}if(T(p))y({velocity:e,keyframes:[p,P(p)]});else{let v=i*e+p;typeof l<"u"&&(v=l(v));const S=P(v),w=S===n?-1:1;let D,N;const k=O=>{D=N,N=O,e=on(O-D,W.delta),(w===1&&O>S||w===-1&&Og&&g.stop()}}const Ua={type:"spring",stiffness:500,damping:25,restSpeed:10},_a=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),za={type:"keyframes",duration:.8},$a={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Ha=(t,{keyframes:e})=>e.length>2?za:ot.has(t)?t.startsWith("scale")?_a(e[1]):Ua:$a,je=(t,e)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&Q.test(e)&&!e.startsWith("url("));function Wa({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:r,repeatType:o,repeatDelay:a,from:c,elapsed:l,...u}){return!!Object.keys(u).length}function jn(t){return t===0||typeof t=="string"&&parseFloat(t)===0&&t.indexOf(" ")===-1}function Bn(t){return typeof t=="number"?0:cn("",t)}function Ti(t,e){return t[e]||t.default||t}function Ga(t,e,n,s){const i=je(e,n);let r=s.from!==void 0?s.from:t.get();return r==="none"&&i&&typeof n=="string"?r=cn(e,n):jn(r)&&typeof n=="string"?r=Bn(n):!Array.isArray(n)&&jn(n)&&typeof r=="string"&&(n=Bn(r)),Array.isArray(n)?(n[0]===null&&(n[0]=r),n):[r,n]}const mn=(t,e,n,s={})=>i=>{const r=Ti(s,t)||{},o=r.delay||s.delay||0;let{elapsed:a=0}=s;a=a-_t(o);const c=Ga(e,t,n,r),l=c[0],u=c[c.length-1],f=je(t,l),h=je(t,u);let d={keyframes:c,velocity:e.getVelocity(),...r,elapsed:a,onUpdate:p=>{e.set(p),r.onUpdate&&r.onUpdate(p)},onComplete:()=>{i(),r.onComplete&&r.onComplete()}};if(!f||!h||Xr.current||r.type===!1)return Oa(d);if(r.type==="inertia")return Na(d);if(Wa(r)||(d={...d,...Ha(t,d)}),d.duration&&(d.duration=_t(d.duration)),d.repeatDelay&&(d.repeatDelay=_t(d.repeatDelay)),e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){const p=Ia(e,t,d);if(p)return p}return Xt(d)};function Ka(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(r=>Be(t,r,n));s=Promise.all(i)}else if(typeof e=="string")s=Be(t,e,n);else{const i=typeof e=="function"?re(t,e,n.custom):e;s=Ci(t,i,n)}return s.then(()=>t.notify("AnimationComplete",e))}function Be(t,e,n={}){const s=re(t,e,n.custom);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const r=s?()=>Ci(t,s,n):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(c=0)=>{const{delayChildren:l=0,staggerChildren:u,staggerDirection:f}=i;return Za(t,e,l+c,u,f,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[c,l]=a==="beforeChildren"?[r,o]:[o,r];return c().then(l)}else return Promise.all([r(),o(n.delay)])}function Ci(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:r=t.getDefaultTransition(),transitionEnd:o,...a}=t.makeTargetAnimatable(e);const c=t.getValue("willChange");s&&(r=s);const l=[],u=i&&t.animationState&&t.animationState.getState()[i];for(const f in a){const h=t.getValue(f),d=a[f];if(!h||d===void 0||u&&Xa(u,f))continue;const p={delay:n,elapsed:0,...r};if(window.HandoffAppearAnimations&&!h.hasAnimated){const T=t.getProps()[Zr];T&&(p.elapsed=window.HandoffAppearAnimations(T,f,h,R))}let g=h.start(mn(f,h,d,t.shouldReduceMotion&&ot.has(f)?{type:!1}:p));Zt(c)&&(c.add(f),g=g.then(()=>c.remove(f))),l.push(g)}return Promise.all(l).then(()=>{o&&$r(t,o)})}function Za(t,e,n=0,s=0,i=1,r){const o=[],a=(t.variantChildren.size-1)*s,c=i===1?(l=0)=>l*s:(l=0)=>a-l*s;return Array.from(t.variantChildren).sort(qa).forEach((l,u)=>{l.notify("AnimationStart",e),o.push(Be(l,e,{...r,delay:n+c(u)}).then(()=>l.notify("AnimationComplete",e)))}),Promise.all(o)}function qa(t,e){return t.sortNodePosition(e)}function Xa({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}const Ya=[...$e].reverse(),Ja=$e.length;function Qa(t){return e=>Promise.all(e.map(({animation:n,options:s})=>Ka(t,n,s)))}function tc(t){let e=Qa(t);const n=nc();let s=!0;const i=(c,l)=>{const u=re(t,l);if(u){const{transition:f,transitionEnd:h,...d}=u;c={...c,...d,...h}}return c};function r(c){e=c(t)}function o(c,l){const u=t.getProps(),f=t.getVariantContext(!0)||{},h=[],d=new Set;let p={},g=1/0;for(let P=0;Pg&&S;const O=Array.isArray(v)?v:[v];let K=O.reduce(i,{});w===!1&&(K={});const{prevResolvedValues:Ft={}}=y,ae={...Ft,...K},Z=M=>{k=!0,d.delete(M),y.needsAnimating[M]=!0};for(const M in ae){const L=K[M],at=Ft[M];p.hasOwnProperty(M)||(L!==at?Gt(L)&&Gt(at)?!Ys(L,at)||N?Z(M):y.protectedKeys[M]=!0:L!==void 0?Z(M):d.add(M):L!==void 0&&d.has(M)?Z(M):y.protectedKeys[M]=!0)}y.prevProp=v,y.prevResolvedValues=K,y.isActive&&(p={...p,...K}),s&&t.blockInitialAnimation&&(k=!1),k&&!D&&h.push(...O.map(M=>({animation:M,options:{type:x,...c}})))}if(d.size){const P={};d.forEach(x=>{const y=t.getBaseTarget(x);y!==void 0&&(P[x]=y)}),h.push({animation:P})}let T=Boolean(h.length);return s&&u.initial===!1&&!t.manuallyAnimateOnMount&&(T=!1),s=!1,T?e(h):Promise.resolve()}function a(c,l,u){var f;if(n[c].isActive===l)return Promise.resolve();(f=t.variantChildren)===null||f===void 0||f.forEach(d=>{var p;return(p=d.animationState)===null||p===void 0?void 0:p.setActive(c,l)}),n[c].isActive=l;const h=o(u,c);for(const d in n)n[d].protectedKeys={};return h}return{animateChanges:o,setActive:a,setAnimateFunction:r,getState:()=>n}}function ec(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Ys(e,t):!1}function et(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function nc(){return{animate:et(!0),whileInView:et(),whileHover:et(),whileTap:et(),whileDrag:et(),whileFocus:et(),exit:et()}}class sc extends tt{constructor(e){super(e),e.animationState||(e.animationState=tc(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();this.unmount(),ee(e)&&(this.unmount=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let ic=0;class oc extends tt{constructor(){super(...arguments),this.id=ic++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n,custom:s}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===i)return;const r=this.node.animationState.setActive("exit",!e,{custom:s??this.node.getProps().custom});n&&!e&&r.then(()=>n(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const rc={animation:{Feature:sc},exit:{Feature:oc}},kn=(t,e)=>Math.abs(t-e);function ac(t,e){const n=kn(t.x,e.x),s=kn(t.y,e.y);return Math.sqrt(n**2+s**2)}class Si{constructor(e,n,{transformPagePoint:s}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const l=ve(this.lastMoveEventInfo,this.history),u=this.startEvent!==null,f=ac(l.offset,{x:0,y:0})>=3;if(!u&&!f)return;const{point:h}=l,{timestamp:d}=W;this.history.push({...h,timestamp:d});const{onStart:p,onMove:g}=this.handlers;u||(p&&p(this.lastMoveEvent,l),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,l)},this.handlePointerMove=(l,u)=>{this.lastMoveEvent=l,this.lastMoveEventInfo=ye(u,this.transformPagePoint),R.update(this.updatePoint,!0)},this.handlePointerUp=(l,u)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:f,onSessionEnd:h}=this.handlers,d=ve(l.type==="pointercancel"?this.lastMoveEventInfo:ye(u,this.transformPagePoint),this.history);this.startEvent&&f&&f(l,d),h&&h(l,d)},!Gs(e))return;this.handlers=n,this.transformPagePoint=s;const i=ie(e),r=ye(i,this.transformPagePoint),{point:o}=r,{timestamp:a}=W;this.history=[{...o,timestamp:a}];const{onSessionStart:c}=n;c&&c(e,ve(r,this.history)),this.removeListeners=Y(H(window,"pointermove",this.handlePointerMove),H(window,"pointerup",this.handlePointerUp),H(window,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),J.update(this.updatePoint)}}function ye(t,e){return e?{point:e(t.point)}:t}function Fn(t,e){return{x:t.x-e.x,y:t.y-e.y}}function ve({point:t},e){return{point:t,delta:Fn(t,Ai(e)),offset:Fn(t,cc(e)),velocity:lc(e,.1)}}function cc(t){return t[0]}function Ai(t){return t[t.length-1]}function lc(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=Ai(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>_t(e)));)n--;if(!s)return{x:0,y:0};const r=(i.timestamp-s.timestamp)/1e3;if(r===0)return{x:0,y:0};const o={x:(i.x-s.x)/r,y:(i.y-s.y)/r};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function B(t){return t.max-t.min}function ke(t,e=0,n=.01){return Math.abs(t-e)<=n}function In(t,e,n,s=.5){t.origin=s,t.originPoint=A(e.min,e.max,t.origin),t.scale=B(n)/B(e),(ke(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=A(n.min,n.max,t.origin)-t.originPoint,(ke(t.translate)||isNaN(t.translate))&&(t.translate=0)}function Pt(t,e,n,s){In(t.x,e.x,n.x,s?s.originX:void 0),In(t.y,e.y,n.y,s?s.originY:void 0)}function On(t,e,n){t.min=n.min+e.min,t.max=t.min+B(e)}function uc(t,e,n){On(t.x,e.x,n.x),On(t.y,e.y,n.y)}function Nn(t,e,n){t.min=e.min-n.min,t.max=t.min+B(e)}function bt(t,e,n){Nn(t.x,e.x,n.x),Nn(t.y,e.y,n.y)}function fc(t,{min:e,max:n},s){return e!==void 0&&tn&&(t=s?A(n,t,s.max):Math.min(t,n)),t}function Un(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function hc(t,{top:e,left:n,bottom:s,right:i}){return{x:Un(t.x,n,i),y:Un(t.y,e,s)}}function _n(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.mins?n=wt(e.min,e.max-s,t.min):s>i&&(n=wt(t.min,t.max-i,e.min)),ht(0,1,n)}function mc(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const Fe=.35;function gc(t=Fe){return t===!1?t=0:t===!0&&(t=Fe),{x:zn(t,"left","right"),y:zn(t,"top","bottom")}}function zn(t,e,n){return{min:$n(t,e),max:$n(t,n)}}function $n(t,e){return typeof t=="number"?t:t[e]||0}const Hn=()=>({translate:0,scale:1,origin:0,originPoint:0}),Tt=()=>({x:Hn(),y:Hn()}),Wn=()=>({min:0,max:0}),V=()=>({x:Wn(),y:Wn()});function U(t){return[t("x"),t("y")]}function Vi({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function yc({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function vc(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function xe(t){return t===void 0||t===1}function Ie({scale:t,scaleX:e,scaleY:n}){return!xe(t)||!xe(e)||!xe(n)}function nt(t){return Ie(t)||wi(t)||t.z||t.rotate||t.rotateX||t.rotateY}function wi(t){return Gn(t.x)||Gn(t.y)}function Gn(t){return t&&t!=="0%"}function Yt(t,e,n){const s=t-n,i=e*s;return n+i}function Kn(t,e,n,s,i){return i!==void 0&&(t=Yt(t,i,s)),Yt(t,n,s)+e}function Oe(t,e=0,n=1,s,i){t.min=Kn(t.min,e,n,s,i),t.max=Kn(t.max,e,n,s,i)}function Mi(t,{x:e,y:n}){Oe(t.x,e.translate,e.scale,e.originPoint),Oe(t.y,n.translate,n.scale,n.originPoint)}function xc(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let r,o;for(let a=0;a1.0000000000001||t<.999999999999?t:1}function X(t,e){t.min=t.min+e,t.max=t.max+e}function qn(t,e,[n,s,i]){const r=e[i]!==void 0?e[i]:.5,o=A(t.min,t.max,r);Oe(t,e[n],e[s],o,e.scale)}const Pc=["x","scaleX","originX"],bc=["y","scaleY","originY"];function ft(t,e){qn(t.x,e,Pc),qn(t.y,e,bc)}function Di(t,e){return Vi(vc(t.getBoundingClientRect(),e))}function Tc(t,e,n){const s=Di(t,n),{scroll:i}=e;return i&&(X(s.x,i.offset.x),X(s.y,i.offset.y)),s}const Cc=new WeakMap;class Sc{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=V(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=c=>{this.stopAnimation(),n&&this.snapToCursor(ie(c,"page").point)},r=(c,l)=>{const{drag:u,dragPropagation:f,onDragStart:h}=this.getProps();if(u&&!f&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Zs(u),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),U(p=>{let g=this.getAxisMotionValue(p).get()||0;if(z.test(g)){const{projection:T}=this.visualElement;if(T&&T.layout){const P=T.layout.layoutBox[p];P&&(g=B(P)*(parseFloat(g)/100))}}this.originPoint[p]=g}),h&&h(c,l);const{animationState:d}=this.visualElement;d&&d.setActive("whileDrag",!0)},o=(c,l)=>{const{dragPropagation:u,dragDirectionLock:f,onDirectionLock:h,onDrag:d}=this.getProps();if(!u&&!this.openGlobalLock)return;const{offset:p}=l;if(f&&this.currentDirection===null){this.currentDirection=Ac(p),this.currentDirection!==null&&h&&h(this.currentDirection);return}this.updateAxis("x",l.point,p),this.updateAxis("y",l.point,p),this.visualElement.render(),d&&d(c,l)},a=(c,l)=>this.stop(c,l);this.panSession=new Si(e,{onSessionStart:i,onStart:r,onMove:o,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(e,n){const s=this.isDragging;if(this.cancel(),!s)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:r}=this.getProps();r&&r(e,n)}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!Nt(e,i,this.currentDirection))return;const r=this.getAxisMotionValue(e);let o=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(o=fc(o,this.constraints[e],this.elastic[e])),r.set(o)}resolveConstraints(){const{dragConstraints:e,dragElastic:n}=this.getProps(),{layout:s}=this.visualElement.projection||{},i=this.constraints;e&<(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=hc(s.layoutBox,e):this.constraints=!1,this.elastic=gc(n),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&U(r=>{this.getAxisMotionValue(r)&&(this.constraints[r]=mc(s.layoutBox[r],this.constraints[r]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!lt(e))return!1;const s=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const r=Tc(s,i.root,this.visualElement.getTransformPagePoint());let o=dc(i.layout.layoutBox,r);if(n){const a=n(yc(o));this.hasMutatedConstraints=!!a,a&&(o=Vi(a))}return o}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},l=U(u=>{if(!Nt(u,n,this.currentDirection))return;let f=c&&c[u]||{};o&&(f={min:0,max:0});const h=i?200:1e6,d=i?40:1e7,p={type:"inertia",velocity:s?e[u]:0,bounceStiffness:h,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...r,...f};return this.startAxisValueAnimation(u,p)});return Promise.all(l).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return s.start(mn(e,s,0,n))}stopAnimation(){U(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const n="_drag"+e.toUpperCase(),s=this.visualElement.getProps(),i=s[n];return i||this.visualElement.getValue(e,(s.initial?s.initial[e]:void 0)||0)}snapToCursor(e){U(n=>{const{drag:s}=this.getProps();if(!Nt(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,r=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n];r.set(e[n]-A(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!lt(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};U(o=>{const a=this.getAxisMotionValue(o);if(a){const c=a.get();i[o]=pc({min:c,max:c},this.constraints[o])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),U(o=>{if(!Nt(o,e,null))return;const a=this.getAxisMotionValue(o),{min:c,max:l}=this.constraints[o];a.set(A(c,l,i[o]))})}addListeners(){if(!this.visualElement.current)return;Cc.set(this.visualElement,this);const e=this.visualElement.current,n=H(e,"pointerdown",c=>{const{drag:l,dragListener:u=!0}=this.getProps();l&&u&&this.start(c)}),s=()=>{const{dragConstraints:c}=this.getProps();lt(c)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,r=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),s();const o=$(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:c,hasLayoutChanged:l})=>{this.isDragging&&l&&(U(u=>{const f=this.getAxisMotionValue(u);f&&(this.originPoint[u]+=c[u].translate,f.set(f.get()+c[u].translate))}),this.visualElement.render())});return()=>{o(),n(),r(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:r=!1,dragElastic:o=Fe,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:r,dragElastic:o,dragMomentum:a}}}function Nt(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function Ac(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class Vc extends tt{constructor(e){super(e),this.removeGroupControls=I,this.removeListeners=I,this.controls=new Sc(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||I}unmount(){this.removeGroupControls(),this.removeListeners()}}class wc extends tt{constructor(){super(...arguments),this.removePointerDownListener=I}onPointerDown(e){this.session=new Si(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:e,onStart:n,onMove:s,onEnd:(r,o)=>{delete this.session,i&&i(r,o)}}}mount(){this.removePointerDownListener=H(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function Mc(){const t=m.useContext(Et);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:n,register:s}=t,i=m.useId();return m.useEffect(()=>s(i),[]),!e&&n?[!1,()=>n&&n(i)]:[!0]}function Dc(){return Rc(m.useContext(Et))}function Rc(t){return t===null?!0:t.isPresent}function Xn(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const mt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(b.test(t))t=parseFloat(t);else return t;const n=Xn(t,e.target.x),s=Xn(t,e.target.y);return`${n}% ${s}%`}},Ri=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Ec(t){const e=Ri.exec(t);if(!e)return[,];const[,n,s]=e;return[n,s]}function Ne(t,e,n=1){const[s,i]=Ec(t);if(!s)return;const r=window.getComputedStyle(e).getPropertyValue(s);return r?r.trim():Se(i)?Ne(i,e,n+1):i}function Lc(t,{...e},n){const s=t.current;if(!(s instanceof Element))return{target:e,transitionEnd:n};n&&(n={...n}),t.values.forEach(i=>{const r=i.get();if(!Se(r))return;const o=Ne(r,s);o&&i.set(o)});for(const i in e){const r=e[i];if(!Se(r))continue;const o=Ne(r,s);o&&(e[i]=o,n&&n[i]===void 0&&(n[i]=r))}return{target:e,transitionEnd:n}}const Yn="_$css",jc={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=t.includes("var("),r=[];i&&(t=t.replace(Ri,d=>(r.push(d),Yn)));const o=Q.parse(t);if(o.length>5)return s;const a=Q.createTransformer(t),c=typeof o[0]!="number"?1:0,l=n.x.scale*e.x,u=n.y.scale*e.y;o[0+c]/=l,o[1+c]/=u;const f=A(l,u,.5);typeof o[2+c]=="number"&&(o[2+c]/=f),typeof o[3+c]=="number"&&(o[3+c]/=f);let h=a(o);if(i){let d=0;h=h.replace(Yn,()=>{const p=r[d];return d++,p})}return h}};class Bc extends Ss.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:r}=e;jo(kc),r&&(n.group&&n.group.add(r),s&&s.register&&i&&s.register(r),r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,onExitComplete:()=>this.safeToRemove()})),yt.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:r}=this.props,o=s.projection;return o&&(o.isPresent=r,i||e.layoutDependency!==n||n===void 0?o.willUpdate():this.safeToRemove(),e.isPresent!==r&&(r?o.promote():o.relegate()||R.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),!e.currentAnimation&&e.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Ei(t){const[e,n]=Mc(),s=m.useContext(Ge);return Ss.createElement(Bc,{...t,layoutGroup:s,switchLayoutGroup:m.useContext(js),isPresent:e,safeToRemove:n})}const kc={borderRadius:{...mt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:mt,borderTopRightRadius:mt,borderBottomLeftRadius:mt,borderBottomRightRadius:mt,boxShadow:jc};function Fc(t,e,n={}){const s=j(t)?t:dt(t);return s.start(mn("",s,e,n)),{stop:()=>s.stop(),isAnimating:()=>s.isAnimating()}}const Li=["TopLeft","TopRight","BottomLeft","BottomRight"],Ic=Li.length,Jn=t=>typeof t=="string"?parseFloat(t):t,Qn=t=>typeof t=="number"||b.test(t);function Oc(t,e,n,s,i,r){i?(t.opacity=A(0,n.opacity!==void 0?n.opacity:1,Nc(s)),t.opacityExit=A(e.opacity!==void 0?e.opacity:1,0,Uc(s))):r&&(t.opacity=A(e.opacity!==void 0?e.opacity:1,n.opacity!==void 0?n.opacity:1,s));for(let o=0;ose?1:n(wt(t,e,s))}function es(t,e){t.min=e.min,t.max=e.max}function F(t,e){es(t.x,e.x),es(t.y,e.y)}function ns(t,e,n,s,i){return t-=e,t=Yt(t,1/n,s),i!==void 0&&(t=Yt(t,1/i,s)),t}function _c(t,e=0,n=1,s=.5,i,r=t,o=t){if(z.test(e)&&(e=parseFloat(e),e=A(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=A(r.min,r.max,s);t===r&&(a-=e),t.min=ns(t.min,e,n,a,i),t.max=ns(t.max,e,n,a,i)}function ss(t,e,[n,s,i],r,o){_c(t,e[n],e[s],e[i],e.scale,r,o)}const zc=["x","scaleX","originX"],$c=["y","scaleY","originY"];function is(t,e,n,s){ss(t.x,e,zc,n?n.x:void 0,s?s.x:void 0),ss(t.y,e,$c,n?n.y:void 0,s?s.y:void 0)}function os(t){return t.translate===0&&t.scale===1}function Bi(t){return os(t.x)&&os(t.y)}function Ue(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}function rs(t){return B(t.x)/B(t.y)}class Hc{constructor(){this.members=[]}add(e){en(this.members,e),e.scheduleRender()}remove(e){if(nn(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const r=this.members[i];if(r.isPresent!==!1){s=r;break}}return s?(this.promote(s),!0):!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender(),e.resumeFrom=s,n&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:s}=e;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function as(t,e,n){let s="";const i=t.x.translate/e.x,r=t.y.translate/e.y;if((i||r)&&(s=`translate3d(${i}px, ${r}px, 0) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{rotate:c,rotateX:l,rotateY:u}=n;c&&(s+=`rotate(${c}deg) `),l&&(s+=`rotateX(${l}deg) `),u&&(s+=`rotateY(${u}deg) `)}const o=t.x.scale*e.x,a=t.y.scale*e.y;return(o!==1||a!==1)&&(s+=`scale(${o}, ${a})`),s||"none"}const Wc=(t,e)=>t.depth-e.depth;class Gc{constructor(){this.children=[],this.isDirty=!1}add(e){en(this.children,e),this.isDirty=!0}remove(e){nn(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Wc),this.isDirty=!1,this.children.forEach(e)}}function Kc(t){window.MotionDebug&&window.MotionDebug.record(t)}const cs=["","X","Y","Z"],ls=1e3;let Zc=0;const st={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function ki({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(o,a={},c=e==null?void 0:e()){this.id=Zc++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!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=()=>{st.totalNodes=st.resolvedTargetDeltas=st.recalculatedProjection=0,this.nodes.forEach(Yc),this.nodes.forEach(el),this.nodes.forEach(nl),this.nodes.forEach(Jc),Kc(st)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=o,this.latestValues=a,this.root=c?c.root||c:this,this.path=c?[...c.path,c]:[],this.parent=c,this.depth=c?c.depth+1:0,o&&this.root.registerPotentialNode(o,this);for(let l=0;lthis.root.updateBlockedByResize=!1;t(o,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=bi(h,250),yt.hasAnimatedSinceResize&&(yt.hasAnimatedSinceResize=!1,this.nodes.forEach(fs))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&u&&(c||l)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:h,hasRelativeTargetChanged:d,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||u.getDefaultTransition()||al,{onLayoutAnimationStart:T,onLayoutAnimationComplete:P}=u.getProps(),x=!this.targetLayout||!Ue(this.targetLayout,p)||d,y=!h&&d;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||y||h&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,y);const v={...Ti(g,"layout"),onPlay:T,onComplete:P};(u.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v)}else!h&&this.animationProgress===0&&fs(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,J.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(sl),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c{const S=v/1e3;hs(f.x,o.x,S),hs(f.y,o.y,S),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(bt(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),ol(this.relativeTarget,this.relativeTargetOrigin,h,S),y&&Ue(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=V()),F(y,this.relativeTarget)),g&&(this.animationValues=u,Oc(u,l,this.latestValues,S,x,P)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(J.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=R.update(()=>{yt.hasAnimatedSinceResize=!0,this.currentAnimation=Fc(0,ls,{...o,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(ls),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:c,layout:l,latestValues:u}=o;if(!(!a||!c||!l)){if(this!==o&&this.layout&&l&&Fi(this.options.animationType,this.layout.layoutBox,l.layoutBox)){c=this.target||V();const f=B(this.layout.layoutBox.x);c.x.min=o.target.x.min,c.x.max=c.x.min+f;const h=B(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+h}F(a,c),ft(a,u),Pt(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new Hc),this.sharedNodes.get(o).add(a);const l=a.options.initialPromotionConfig;a.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:c}={}){const l=this.getStack();l&&l.promote(this,c),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:c}=o;if((c.rotate||c.rotateX||c.rotateY||c.rotateZ)&&(a=!0),!a)return;const l={};for(let u=0;u{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(us),this.root.sharedNodes.clear()}}}function qc(t){t.updateLayout()}function Xc(t){var e;const n=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:i}=t.layout,{animationType:r}=t.options,o=n.source!==t.layout.source;r==="size"?U(f=>{const h=o?n.measuredBox[f]:n.layoutBox[f],d=B(h);h.min=s[f].min,h.max=h.min+d}):Fi(r,n.layoutBox,s)&&U(f=>{const h=o?n.measuredBox[f]:n.layoutBox[f],d=B(s[f]);h.max=h.min+d});const a=Tt();Pt(a,s,n.layoutBox);const c=Tt();o?Pt(c,t.applyTransform(i,!0),n.measuredBox):Pt(c,s,n.layoutBox);const l=!Bi(a);let u=!1;if(!t.resumeFrom){const f=t.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:h,layout:d}=f;if(h&&d){const p=V();bt(p,n.layoutBox,h.layoutBox);const g=V();bt(g,s,d.layoutBox),Ue(p,g)||(u=!0),f.options.layoutRoot&&(t.relativeTarget=g,t.relativeTargetOrigin=p,t.relativeParent=f)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:n,delta:c,layoutDelta:a,hasLayoutChanged:l,hasRelativeTargetChanged:u})}else if(t.isLead()){const{onExitComplete:s}=t.options;s&&s()}t.options.transition=void 0}function Yc(t){st.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=Boolean(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Jc(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Qc(t){t.clearSnapshot()}function us(t){t.clearMeasurements()}function tl(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function fs(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0}function el(t){t.resolveTargetDelta()}function nl(t){t.calcProjection()}function sl(t){t.resetRotation()}function il(t){t.removeLeadSnapshot()}function hs(t,e,n){t.translate=A(e.translate,0,n),t.scale=A(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function ds(t,e,n,s){t.min=A(e.min,n.min,s),t.max=A(e.max,n.max,s)}function ol(t,e,n,s){ds(t.x,e.x,n.x,s),ds(t.y,e.y,n.y,s)}function rl(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const al={duration:.45,ease:[.4,0,.1,1]};function cl(t,e){let n=t.root;for(let r=t.path.length-1;r>=0;r--)if(Boolean(t.path[r].instance)){n=t.path[r];break}const i=(n&&n!==t.root?n.instance:document).querySelector(`[data-projection-id="${e}"]`);i&&t.mount(i,!0)}function ps(t){t.min=Math.round(t.min),t.max=Math.round(t.max)}function ll(t){ps(t.x),ps(t.y)}function Fi(t,e,n){return t==="position"||t==="preserve-aspect"&&!ke(rs(e),rs(n),.2)}const ul=ki({attachResizeListener:(t,e)=>$(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Pe={current:void 0},Ii=ki({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Pe.current){const t=new ul(0,{});t.mount(window),t.setOptions({layoutScroll:!0}),Pe.current=t}return Pe.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>Boolean(window.getComputedStyle(t).position==="fixed")}),fl={pan:{Feature:wc},drag:{Feature:Vc,ProjectionNode:Ii,MeasureLayout:Ei}},hl=new Set(["width","height","top","left","right","bottom","x","y"]),Oi=t=>hl.has(t),dl=t=>Object.keys(t).some(Oi),ms=t=>t===rt||t===b,gs=(t,e)=>parseFloat(t.split(", ")[e]),ys=(t,e)=>(n,{transform:s})=>{if(s==="none"||!s)return 0;const i=s.match(/^matrix3d\((.+)\)$/);if(i)return gs(i[1],e);{const r=s.match(/^matrix\((.+)\)$/);return r?gs(r[1],t):0}},pl=new Set(["x","y","z"]),ml=se.filter(t=>!pl.has(t));function gl(t){const e=[];return ml.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e.length&&t.render(),e}const vs={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:ys(4,13),y:ys(5,14)},yl=(t,e,n)=>{const s=e.measureViewportBox(),i=e.current,r=getComputedStyle(i),{display:o}=r,a={};o==="none"&&e.setStaticValue("display",t.display||"block"),n.forEach(l=>{a[l]=vs[l](s,r)}),e.render();const c=e.measureViewportBox();return n.forEach(l=>{const u=e.getValue(l);u&&u.jump(a[l]),t[l]=vs[l](c,r)}),t},vl=(t,e,n={},s={})=>{e={...e},s={...s};const i=Object.keys(e).filter(Oi);let r=[],o=!1;const a=[];if(i.forEach(c=>{const l=t.getValue(c);if(!t.hasValue(c))return;let u=n[c],f=pt(u);const h=e[c];let d;if(Gt(h)){const p=h.length,g=h[0]===null?1:0;u=h[g],f=pt(u);for(let T=g;T=0?window.pageYOffset:null,l=yl(e,t,a);return r.length&&r.forEach(([u,f])=>{t.getValue(u).set(f)}),t.render(),te&&c!==null&&window.scrollTo({top:c}),{target:l,transitionEnd:s}}else return{target:e,transitionEnd:s}};function xl(t,e,n,s){return dl(e)?vl(t,e,n,s):{target:e,transitionEnd:s}}const Pl=(t,e,n,s)=>{const i=Lc(t,e,s);return e=i.target,s=i.transitionEnd,xl(t,e,n,s)},_e={current:null},Ni={current:!1};function bl(){if(Ni.current=!0,!!te)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>_e.current=t.matches;t.addListener(e),e()}else _e.current=!1}function Tl(t,e,n){const{willChange:s}=e;for(const i in e){const r=e[i],o=n[i];if(j(r))t.addValue(i,r),Zt(s)&&s.add(i);else if(j(o))t.addValue(i,dt(r,{owner:t})),Zt(s)&&s.remove(i);else if(o!==r)if(t.hasValue(i)){const a=t.getValue(i);!a.hasAnimated&&a.set(r)}else{const a=t.getStaticValue(i);t.addValue(i,dt(a!==void 0?a:r,{owner:t}))}}for(const i in n)e[i]===void 0&&t.removeValue(i);return e}const Ui=Object.keys(St),Cl=Ui.length,xs=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Sl=He.length;class Al{constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,visualState:r},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},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=()=>R.render(this.render,!1,!0);const{latestValues:a,renderState:c}=r;this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=c,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=o,this.isControllingVariants=ne(n),this.isVariantNode=Ls(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:l,...u}=this.scrapeMotionValuesFromProps(n,{});for(const f in u){const h=u[f];a[f]!==void 0&&j(h)&&(h.set(a[f],!1),Zt(l)&&l.add(f))}}scrapeMotionValuesFromProps(e,n){return{}}mount(e){this.current=e,this.projection&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),Ni.current||bl(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:_e.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),J.update(this.notifyUpdate),J.render(this.render),this.valueSubscriptions.forEach(e=>e()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features)this.features[e].unmount();this.current=null}bindToMotionValue(e,n){const s=ot.has(e),i=n.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&R.update(this.notifyUpdate,!1,!0),s&&this.projection&&(this.projection.isTransformDirty=!0)}),r=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{i(),r()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}loadFeatures({children:e,...n},s,i,r,o){let a,c;for(let l=0;lthis.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:o,layoutScroll:d,layoutRoot:p})}return c}updateFeatures(){for(const e in this.features){const n=this.features[e];n.isMounted?n.update(this.props,this.prevProps):(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):V()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}makeTargetAnimatable(e,n=!0){return this.makeTargetAnimatableFromInstance(e,this.props,n)}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;sn.variantChildren.delete(e)}addValue(e,n){n!==this.values.get(e)&&(this.removeValue(e),this.bindToMotionValue(e,n)),this.values.set(e,n),this.latestValues[e]=n.get()}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=dt(n,{owner:this}),this.addValue(e,s)),s}readValue(e){return this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.readValueFromInstance(this.current,e,this.options)}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n;const{initial:s}=this.props,i=typeof s=="string"||typeof s=="object"?(n=tn(this.props,s))===null||n===void 0?void 0:n[e]:void 0;if(s&&i!==void 0)return i;const r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!j(r)?r:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new sn),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}class _i extends Al{sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}makeTargetAnimatableFromInstance({transition:e,transitionEnd:n,...s},{transformValues:i},r){let o=Gr(s,e||{},this);if(i&&(n&&(n=i(n)),s&&(s=i(s)),o&&(o=i(o))),r){Hr(this,s,o);const a=Pl(this,s,o,n);n=a.transitionEnd,s=a.target}return{transition:e,transitionEnd:n,...s}}}function Vl(t){return window.getComputedStyle(t)}class wl extends _i{readValueFromInstance(e,n){if(ot.has(n)){const s=an(n);return s&&s.default||0}else{const s=Vl(e),i=(Fs(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Di(e,n)}build(e,n,s,i){Ze(e,n,s,i.transformTemplate)}scrapeMotionValuesFromProps(e,n){return Qe(e,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;j(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(e,n,s,i){_s(e,n,s,i)}}class Ml extends _i{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(ot.has(n)){const s=an(n);return s&&s.default||0}return n=zs.has(n)?n:Je(n),e.getAttribute(n)}measureInstanceViewportBox(){return V()}scrapeMotionValuesFromProps(e,n){return Hs(e,n)}build(e,n,s,i){Xe(e,n,s,this.isSVGTag,i.transformTemplate)}renderInstance(e,n,s,i){$s(e,n,s,i)}mount(e){this.isSVGTag=Ye(e.tagName),super.mount(e)}}const Dl=(t,e)=>Ke(t)?new Ml(e,{enableHardwareAcceleration:!1}):new wl(e,{enableHardwareAcceleration:!0}),Rl={layout:{ProjectionNode:Ii,MeasureLayout:Ei}},El={...rc,...vr,...fl,...Rl},Ll=Eo((t,e)=>or(t,e,El,Dl));function zi(){const t=m.useRef(!1);return $t(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function jl(){const t=zi(),[e,n]=m.useState(0),s=m.useCallback(()=>{t.current&&n(e+1)},[e]);return[m.useCallback(()=>R.postRender(s),[s]),e]}class Bl extends m.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const s=this.props.sizeRef.current;s.height=n.offsetHeight||0,s.width=n.offsetWidth||0,s.top=n.offsetTop,s.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function kl({children:t,isPresent:e}){const n=m.useId(),s=m.useRef(null),i=m.useRef({width:0,height:0,top:0,left:0});return m.useInsertionEffect(()=>{const{width:r,height:o,top:a,left:c}=i.current;if(e||!s.current||!r||!o)return;s.current.dataset.motionPopId=n;const l=document.createElement("style");return document.head.appendChild(l),l.sheet&&l.sheet.insertRule(` - [data-motion-pop-id="${n}"] { - position: absolute !important; - width: ${r}px !important; - height: ${o}px !important; - top: ${a}px !important; - left: ${c}px !important; - } - `),()=>{document.head.removeChild(l)}},[e]),m.createElement(Bl,{isPresent:e,childRef:s,sizeRef:i},m.cloneElement(t,{ref:s}))}const be=({children:t,initial:e,isPresent:n,onExitComplete:s,custom:i,presenceAffectsLayout:r,mode:o})=>{const a=We(Fl),c=m.useId(),l=m.useMemo(()=>({id:c,initial:e,isPresent:n,custom:i,onExitComplete:u=>{a.set(u,!0);for(const f of a.values())if(!f)return;s&&s()},register:u=>(a.set(u,!1),()=>a.delete(u))}),r?void 0:[n]);return m.useMemo(()=>{a.forEach((u,f)=>a.set(f,!1))},[n]),m.useEffect(()=>{!n&&!a.size&&s&&s()},[n]),o==="popLayout"&&(t=m.createElement(kl,{isPresent:n},t)),m.createElement(Et.Provider,{value:l},t)};function Fl(){return new Map}function Il(t){return m.useEffect(()=>()=>t(),[])}const ct=t=>t.key||"";function Ol(t,e){t.forEach(n=>{const s=ct(n);e.set(s,n)})}function Nl(t){const e=[];return m.Children.forEach(t,n=>{m.isValidElement(n)&&e.push(n)}),e}const Ul=({children:t,custom:e,initial:n=!0,onExitComplete:s,exitBeforeEnter:i,presenceAffectsLayout:r=!0,mode:o="sync"})=>{i&&(o="wait");let[a]=jl();const c=m.useContext(Ge).forceRender;c&&(a=c);const l=zi(),u=Nl(t);let f=u;const h=new Set,d=m.useRef(f),p=m.useRef(new Map).current,g=m.useRef(!0);if($t(()=>{g.current=!1,Ol(u,p),d.current=f}),Il(()=>{g.current=!0,p.clear(),h.clear()}),g.current)return m.createElement(m.Fragment,null,f.map(y=>m.createElement(be,{key:ct(y),isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:r,mode:o},y)));f=[...f];const T=d.current.map(ct),P=u.map(ct),x=T.length;for(let y=0;y{if(P.indexOf(y)!==-1)return;const v=p.get(y);if(!v)return;const S=T.indexOf(y),w=()=>{p.delete(y),h.delete(y);const D=d.current.findIndex(N=>N.key===y);if(d.current.splice(D,1),!h.size){if(d.current=u,l.current===!1)return;a(),s&&s()}};f.splice(S,0,m.createElement(be,{key:ct(v),isPresent:!1,onExitComplete:w,custom:e,presenceAffectsLayout:r,mode:o},v))}),f=f.map(y=>{const v=y.key;return h.has(v)?y:m.createElement(be,{key:ct(y),isPresent:!0,presenceAffectsLayout:r,mode:o},y)}),m.createElement(m.Fragment,null,h.size?f:f.map(y=>m.cloneElement(y)))};var _l={initial:t=>{const{position:e}=t,n=["top","bottom"].includes(e)?"y":"x";let s=["top-right","bottom-right"].includes(e)?1:-1;return e==="bottom"&&(s=1),{opacity:0,[n]:s*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]}}},$i=m.memo(t=>{const{id:e,message:n,onCloseComplete:s,onRequestRemove:i,requestClose:r=!1,position:o="bottom",duration:a=5e3,containerStyle:c,motionVariants:l=_l,toastSpacing:u="0.5rem"}=t,[f,h]=m.useState(a),d=Dc();vn(()=>{d||s==null||s()},[d]),vn(()=>{h(a)},[a]);const p=()=>h(null),g=()=>h(a),T=()=>{d&&i()};m.useEffect(()=>{d&&r&&i()},[d,r,i]),xo(T,f);const P=m.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:u,...c}),[c,u]),x=m.useMemo(()=>go(o),[o]);return C.jsx(Ll.li,{layout:!0,className:"chakra-toast",variants:l,initial:"initial",animate:"animate",exit:"exit",onHoverStart:p,onHoverEnd:g,custom:{position:o},style:x,children:C.jsx(G.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:P,children:Te(n,{id:e,onClose:T})})})});$i.displayName="ToastComponent";function zl(t,e){var n;const s=t??"bottom",r={"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"}}[s];return(n=r==null?void 0:r[e])!=null?n:s}var Ps={path:C.jsxs("g",{stroke:"currentColor",strokeWidth:"1.5",children:[C.jsx("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"}),C.jsx("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),C.jsx("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},kt=Mt((t,e)=>{const{as:n,viewBox:s,color:i="currentColor",focusable:r=!1,children:o,className:a,__css:c,...l}=t,u=Dt("chakra-icon",a),f=As("Icon",t),h={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:i,...c,...f},d={ref:e,focusable:r,className:u,__css:h},p=s??Ps.viewBox;if(n&&typeof n!="string")return C.jsx(G.svg,{as:n,...d,...l});const g=o??Ps.path;return C.jsx(G.svg,{verticalAlign:"middle",viewBox:p,...d,...l,children:g})});kt.displayName="Icon";function $l(t){return C.jsx(kt,{viewBox:"0 0 24 24",...t,children:C.jsx("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 Hl(t){return C.jsx(kt,{viewBox:"0 0 24 24",...t,children:C.jsx("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 bs(t){return C.jsx(kt,{viewBox:"0 0 24 24",...t,children:C.jsx("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[Wl,Gl]=Rt({name:"AlertContext",hookName:"useAlertContext",providerName:""}),[Kl,gn]=Rt({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:""}),Hi={info:{icon:Hl,colorScheme:"blue"},warning:{icon:bs,colorScheme:"orange"},success:{icon:$l,colorScheme:"green"},error:{icon:bs,colorScheme:"red"},loading:{icon:Qi,colorScheme:"blue"}};function Zl(t){return Hi[t].colorScheme}function ql(t){return Hi[t].icon}var Wi=Mt(function(e,n){const i={display:"inline",...gn().description};return C.jsx(G.div,{ref:n,...e,className:Dt("chakra-alert__desc",e.className),__css:i})});Wi.displayName="AlertDescription";function Gi(t){const{status:e}=Gl(),n=ql(e),s=gn(),i=e==="loading"?s.spinner:s.icon;return C.jsx(G.span,{display:"inherit",...t,className:Dt("chakra-alert__icon",t.className),__css:i,children:t.children||C.jsx(n,{h:"100%",w:"100%"})})}Gi.displayName="AlertIcon";var Ki=Mt(function(e,n){const s=gn();return C.jsx(G.div,{ref:n,...e,className:Dt("chakra-alert__title",e.className),__css:s.title})});Ki.displayName="AlertTitle";var Zi=Mt(function(e,n){var s;const{status:i="info",addRole:r=!0,...o}=Vs(e),a=(s=e.colorScheme)!=null?s:Zl(i),c=to("Alert",{...e,colorScheme:a}),l={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...c.container};return C.jsx(Wl,{value:{status:i},children:C.jsx(Kl,{value:c,children:C.jsx(G.div,{role:r?"alert":void 0,ref:n,...o,className:Dt("chakra-alert",e.className),__css:l})})})});Zi.displayName="Alert";function Xl(t){return C.jsx(kt,{focusable:"false","aria-hidden":!0,...t,children:C.jsx("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 qi=Mt(function(e,n){const s=As("CloseButton",e),{children:i,isDisabled:r,__css:o,...a}=Vs(e),c={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return C.jsx(G.button,{type:"button","aria-label":"Close",ref:n,disabled:r,__css:{...c,...s,...o},...a,children:i||C.jsx(Xl,{width:"1em",height:"1em"})})});qi.displayName="CloseButton";var Yl={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},_=Jl(Yl);function Jl(t){let e=t;const n=new Set,s=i=>{e=i(e),n.forEach(r=>r())};return{getState:()=>e,subscribe:i=>(n.add(i),()=>{s(()=>t),n.delete(i)}),removeToast:(i,r)=>{s(o=>({...o,[r]:o[r].filter(a=>a.id!=i)}))},notify:(i,r)=>{const o=Ql(i,r),{position:a,id:c}=o;return s(l=>{var u,f;const d=a.includes("top")?[o,...(u=l[a])!=null?u:[]]:[...(f=l[a])!=null?f:[],o];return{...l,[a]:d}}),c},update:(i,r)=>{i&&s(o=>{const a={...o},{position:c,index:l}=yn(a,i);return c&&l!==-1&&(a[c][l]={...a[c][l],...r,message:Xi(r)}),a})},closeAll:({positions:i}={})=>{s(r=>(i??["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((c,l)=>(c[l]=r[l].map(u=>({...u,requestClose:!0})),c),{...r}))},close:i=>{s(r=>{const o=Ds(r,i);return o?{...r,[o]:r[o].map(a=>a.id==i?{...a,requestClose:!0}:a)}:r})},isActive:i=>Boolean(yn(_.getState(),i).position)}}var Ts=0;function Ql(t,e={}){var n,s;Ts+=1;const i=(n=e.id)!=null?n:Ts,r=(s=e.position)!=null?s:"bottom";return{id:i,message:t,position:r,duration:e.duration,onCloseComplete:e.onCloseComplete,onRequestRemove:()=>_.removeToast(String(i),r),status:e.status,requestClose:!1,containerStyle:e.containerStyle}}var tu=t=>{const{status:e,variant:n="solid",id:s,title:i,isClosable:r,onClose:o,description:a,icon:c}=t,l=s?{root:`toast-${s}`,title:`toast-${s}-title`,description:`toast-${s}-description`}:void 0;return C.jsxs(Zi,{addRole:!1,status:e,variant:n,id:l==null?void 0:l.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto",children:[C.jsx(Gi,{children:c}),C.jsxs(G.div,{flex:"1",maxWidth:"100%",children:[i&&C.jsx(Ki,{id:l==null?void 0:l.title,children:i}),a&&C.jsx(Wi,{id:l==null?void 0:l.description,display:"block",children:a})]}),r&&C.jsx(qi,{size:"sm",onClick:o,position:"absolute",insetEnd:1,top:1})]})};function Xi(t={}){const{render:e,toastComponent:n=tu}=t;return i=>typeof e=="function"?e({...i,...t}):C.jsx(n,{...i,...t})}function su(t,e){const n=i=>{var r;return{...e,...i,position:zl((r=i==null?void 0:i.position)!=null?r:e==null?void 0:e.position,t)}},s=i=>{const r=n(i),o=Xi(r);return _.notify(o,r)};return s.update=(i,r)=>{_.update(i,n(r))},s.promise=(i,r)=>{const o=s({...r.loading,status:"loading",duration:null});i.then(a=>s.update(o,{status:"success",duration:5e3,...Te(r.success,a)})).catch(a=>s.update(o,{status:"error",duration:5e3,...Te(r.error,a)}))},s.closeAll=_.closeAll,s.close=_.close,s.isActive=_.isActive,s}var[iu,ou]=Rt({name:"ToastOptionsContext",strict:!1}),ru=t=>{const e=m.useSyncExternalStore(_.subscribe,_.getState,_.getState),{motionVariants:n,component:s=$i,portalProps:i}=t,o=Object.keys(e).map(a=>{const c=e[a];return C.jsx("ul",{role:"region","aria-live":"polite",id:`chakra-toast-manager-${a}`,style:yo(a),children:C.jsx(Ul,{initial:!1,children:c.map(l=>C.jsx(s,{motionVariants:n,...l},l.id))})},a)});return C.jsx(Jt,{...i,children:o})};const au=io,cu=eo;export{Ul as A,qi as C,kt as I,Jt as P,iu as T,Rt as a,vo as b,su as c,Ce as d,vn as e,Mc as f,au as g,cu as h,co as i,ru as j,Ll as m,ou as u}; diff --git a/invokeai/frontend/web/dist/index.html b/invokeai/frontend/web/dist/index.html index a02ffb1bc9..a41ad12aa3 100644 --- a/invokeai/frontend/web/dist/index.html +++ b/invokeai/frontend/web/dist/index.html @@ -12,8 +12,7 @@ margin: 0; } - - + diff --git a/invokeai/frontend/web/dist/locales/de.json b/invokeai/frontend/web/dist/locales/de.json index deeef34194..cff09d46bb 100644 --- a/invokeai/frontend/web/dist/locales/de.json +++ b/invokeai/frontend/web/dist/locales/de.json @@ -18,7 +18,7 @@ "training": "Training", "trainingDesc1": "Ein spezieller Arbeitsablauf zum Trainieren Ihrer eigenen Embeddings und Checkpoints mit Textual Inversion und Dreambooth über die Weboberfläche.", "trainingDesc2": "InvokeAI unterstützt bereits das Training von benutzerdefinierten Embeddings mit Textual Inversion unter Verwendung des Hauptskripts.", - "upload": "Upload", + "upload": "Hochladen", "close": "Schließen", "load": "Laden", "statusConnected": "Verbunden", @@ -41,12 +41,34 @@ "statusUpscaling": "Hochskalierung", "statusUpscalingESRGAN": "Hochskalierung (ESRGAN)", "statusLoadingModel": "Laden des Modells", - "statusModelChanged": "Modell Geändert" + "statusModelChanged": "Modell Geändert", + "cancel": "Abbruch", + "accept": "Annehmen", + "back": "Zurück", + "langEnglish": "Englisch", + "langDutch": "Niederländisch", + "langFrench": "Französisch", + "oceanTheme": "Ozean", + "langItalian": "Italienisch", + "langPortuguese": "Portogisisch", + "langRussian": "Russisch", + "langUkranian": "Ukrainisch", + "hotkeysLabel": "Tastenkombinationen", + "githubLabel": "Github", + "discordLabel": "Discord", + "txt2img": "Text zu Bild", + "postprocessing": "Nachbearbeitung", + "langPolish": "Polnisch", + "langJapanese": "Japanisch", + "langArabic": "Arabisch", + "langKorean": "Koreanisch", + "langHebrew": "Hebräisch", + "langSpanish": "Spanisch" }, "gallery": { "generations": "Erzeugungen", "showGenerations": "Zeige Erzeugnisse", - "uploads": "Uploads", + "uploads": "Hochgelades", "showUploads": "Zeige Uploads", "galleryImageSize": "Bildgröße", "galleryImageResetSize": "Größe zurücksetzen", @@ -312,7 +334,11 @@ "deleteModel": "Model löschen", "deleteConfig": "Konfiguration löschen", "deleteMsg1": "Möchten Sie diesen Model-Eintrag wirklich aus InvokeAI löschen?", - "deleteMsg2": "Dadurch wird die Modellprüfpunktdatei nicht von Ihrer Festplatte gelöscht. Sie können sie bei Bedarf erneut hinzufügen." + "deleteMsg2": "Dadurch wird die Modellprüfpunktdatei nicht von Ihrer Festplatte gelöscht. Sie können sie bei Bedarf erneut hinzufügen.", + "customConfig": "Benutzerdefinierte Konfiguration", + "invokeRoot": "InvokeAI Ordner", + "formMessageDiffusersVAELocationDesc": "Falls nicht angegeben, sucht InvokeAI nach der VAE-Datei innerhalb des oben angegebenen Modell Speicherortes.", + "checkpointModels": "Kontrollpunkte" }, "parameters": { "images": "Bilder", @@ -370,7 +396,10 @@ "useInitImg": "Ausgangsbild verwenden", "deleteImage": "Bild löschen", "initialImage": "Ursprüngliches Bild", - "showOptionsPanel": "Optionsleiste zeigen" + "showOptionsPanel": "Optionsleiste zeigen", + "cancel": { + "setType": "Abbruchart festlegen" + } }, "settings": { "displayInProgress": "Bilder in Bearbeitung anzeigen", @@ -489,5 +518,25 @@ "betaDarkenOutside": "Außen abdunkeln", "betaLimitToBox": "Begrenzung auf das Feld", "betaPreserveMasked": "Maskiertes bewahren" + }, + "accessibility": { + "modelSelect": "Model Auswahl", + "uploadImage": "Bild hochladen", + "previousImage": "Voriges Bild", + "useThisParameter": "Benutze diesen Parameter", + "copyMetadataJson": "Kopiere metadata JSON", + "zoomIn": "Vergrößern", + "rotateClockwise": "Im Uhrzeigersinn drehen", + "flipHorizontally": "Horizontal drehen", + "flipVertically": "Vertikal drehen", + "modifyConfig": "Optionen einstellen", + "toggleAutoscroll": "Auroscroll ein/ausschalten", + "toggleLogViewer": "Log Betrachter ein/ausschalten", + "showGallery": "Zeige Galerie", + "showOptionsPanel": "Zeige Optionen", + "reset": "Zurücksetzen", + "nextImage": "Nächstes Bild", + "zoomOut": "Verkleinern", + "rotateCounterClockwise": "Gegen den Uhrzeigersinn verdrehen" } } diff --git a/invokeai/frontend/web/dist/locales/en.json b/invokeai/frontend/web/dist/locales/en.json index a99f54d741..94dff3934a 100644 --- a/invokeai/frontend/web/dist/locales/en.json +++ b/invokeai/frontend/web/dist/locales/en.json @@ -8,7 +8,7 @@ "nextImage": "Next Image", "useThisParameter": "Use this parameter", "copyMetadataJson": "Copy metadata JSON", - "exitViewer": "ExitViewer", + "exitViewer": "Exit Viewer", "zoomIn": "Zoom In", "zoomOut": "Zoom Out", "rotateCounterClockwise": "Rotate Counter-Clockwise", @@ -19,12 +19,13 @@ "toggleAutoscroll": "Toggle autoscroll", "toggleLogViewer": "Toggle Log Viewer", "showGallery": "Show Gallery", - "showOptionsPanel": "Show Options Panel" + "showOptionsPanel": "Show Options Panel", + "menu": "Menu" }, "common": { "hotkeysLabel": "Hotkeys", "themeLabel": "Theme", - "languagePickerLabel": "Language Picker", + "languagePickerLabel": "Language", "reportBugLabel": "Report Bug", "githubLabel": "Github", "discordLabel": "Discord", @@ -52,7 +53,8 @@ "txt2img": "Text To Image", "img2img": "Image To Image", "unifiedCanvas": "Unified Canvas", - "nodes": "Nodes", + "linear": "Linear", + "nodes": "Node Editor", "postprocessing": "Post Processing", "nodesDesc": "A node based system for the generation of images is under development currently. Stay tuned for updates about this amazing feature.", "postProcessing": "Post Processing", @@ -61,7 +63,7 @@ "postProcessDesc3": "The Invoke AI Command Line Interface offers various other features including Embiggen.", "training": "Training", "trainingDesc1": "A dedicated workflow for training your own embeddings and checkpoints using Textual Inversion and Dreambooth from the web interface.", - "trainingDesc2": "InvokeAI already supports training custom embeddings using Textual Inversion using the main script.", + "trainingDesc2": "InvokeAI already supports training custom embeddourings using Textual Inversion using the main script.", "upload": "Upload", "close": "Close", "cancel": "Cancel", @@ -95,7 +97,13 @@ "statusMergedModels": "Models Merged", "pinOptionsPanel": "Pin Options Panel", "loading": "Loading", - "loadingInvokeAI": "Loading Invoke AI" + "loadingInvokeAI": "Loading Invoke AI", + "random": "Random", + "generate": "Generate", + "openInNewTab": "Open in New Tab", + "dontAskMeAgain": "Don't ask me again", + "areYouSure": "Are you sure?", + "imagePrompt": "Image Prompt" }, "gallery": { "generations": "Generations", @@ -111,7 +119,10 @@ "pinGallery": "Pin Gallery", "allImagesLoaded": "All Images Loaded", "loadMore": "Load More", - "noImagesInGallery": "No Images In Gallery" + "noImagesInGallery": "No Images In Gallery", + "deleteImage": "Delete Image", + "deleteImageBin": "Deleted images will be sent to your operating system's Bin.", + "deleteImagePermanent": "Deleted images cannot be restored." }, "hotkeys": { "keyboardShortcuts": "Keyboard Shortcuts", @@ -439,13 +450,14 @@ "cfgScale": "CFG Scale", "width": "Width", "height": "Height", - "sampler": "Sampler", + "scheduler": "Scheduler", "seed": "Seed", "imageToImage": "Image to Image", "randomizeSeed": "Randomize Seed", - "shuffle": "Shuffle", + "shuffle": "Shuffle Seed", "noiseThreshold": "Noise Threshold", "perlinNoise": "Perlin Noise", + "noiseSettings": "Noise", "variations": "Variations", "variationAmount": "Variation Amount", "seedWeights": "Seed Weights", @@ -460,6 +472,8 @@ "scale": "Scale", "otherOptions": "Other Options", "seamlessTiling": "Seamless Tiling", + "seamlessXAxis": "X Axis", + "seamlessYAxis": "Y Axis", "hiresOptim": "High Res Optimization", "hiresStrength": "High Res Strength", "imageFit": "Fit Initial Image To Output Size", @@ -503,7 +517,6 @@ "useAll": "Use All", "useInitImg": "Use Initial Image", "info": "Info", - "deleteImage": "Delete Image", "initialImage": "Initial Image", "showOptionsPanel": "Show Options Panel", "hidePreview": "Hide Preview", @@ -518,21 +531,35 @@ "useCanvasBeta": "Use Canvas Beta Layout", "enableImageDebugging": "Enable Image Debugging", "useSlidersForAll": "Use Sliders For All Options", + "showProgressInViewer": "Show Progress Images in Viewer", + "antialiasProgressImages": "Antialias Progress Images", "resetWebUI": "Reset Web UI", "resetWebUIDesc1": "Resetting the web UI only resets the browser's local cache of your images and remembered settings. It does not delete any images from disk.", "resetWebUIDesc2": "If images aren't showing up in the gallery or something else isn't working, please try resetting before submitting an issue on GitHub.", - "resetComplete": "Web UI has been reset. Refresh the page to reload." + "resetComplete": "Web UI has been reset. Refresh the page to reload.", + "consoleLogLevel": "Log Level", + "shouldLogToConsole": "Console Logging", + "developer": "Developer", + "general": "General", + "generation": "Generation", + "ui": "User Interface", + "availableSchedulers": "Available Schedulers" }, "toast": { + "serverError": "Server Error", + "disconnected": "Disconnected from Server", + "connected": "Connected to Server", + "canceled": "Processing Canceled", "tempFoldersEmptied": "Temp Folder Emptied", "uploadFailed": "Upload failed", - "uploadFailedMultipleImagesDesc": "Multiple images pasted, may only upload one image at a time", "uploadFailedUnableToLoadDesc": "Unable to load file", + "uploadFailedInvalidUploadDesc": "Must be single PNG or JPEG image", "downloadImageStarted": "Image Download Started", "imageCopied": "Image Copied", "imageLinkCopied": "Image Link Copied", + "problemCopyingImageLink": "Unable to Copy Image Link", "imageNotLoaded": "No Image Loaded", - "imageNotLoadedDesc": "No image found to send to image to image module", + "imageNotLoadedDesc": "Could not find image", "imageSavedToGallery": "Image Saved to Gallery", "canvasMerged": "Canvas Merged", "sentToImageToImage": "Sent To Image To Image", @@ -627,6 +654,11 @@ "betaClear": "Clear", "betaDarkenOutside": "Darken Outside", "betaLimitToBox": "Limit To Box", - "betaPreserveMasked": "Preserve Masked" + "betaPreserveMasked": "Preserve Masked", + "antialiasing": "Antialiasing" + }, + "ui": { + "showProgressImages": "Show Progress Images", + "hideProgressImages": "Hide Progress Images" } } diff --git a/invokeai/frontend/web/dist/locales/es.json b/invokeai/frontend/web/dist/locales/es.json index 9c2b6bf983..d17cefaad2 100644 --- a/invokeai/frontend/web/dist/locales/es.json +++ b/invokeai/frontend/web/dist/locales/es.json @@ -73,7 +73,8 @@ "postprocessing": "Tratamiento posterior", "txt2img": "De texto a imagen", "accept": "Aceptar", - "cancel": "Cancelar" + "cancel": "Cancelar", + "linear": "Lineal" }, "gallery": { "generations": "Generaciones", @@ -483,7 +484,9 @@ "negativePrompts": "Preguntas negativas", "imageToImage": "Imagen a imagen", "denoisingStrength": "Intensidad de la eliminación del ruido", - "hiresStrength": "Alta resistencia" + "hiresStrength": "Alta resistencia", + "showPreview": "Mostrar la vista previa", + "hidePreview": "Ocultar la vista previa" }, "settings": { "models": "Modelos", @@ -529,7 +532,11 @@ "metadataLoadFailed": "Error al cargar metadatos", "initialImageSet": "Imágen inicial establecida", "initialImageNotSet": "Imagen inicial no establecida", - "initialImageNotSetDesc": "Error al establecer la imágen inicial" + "initialImageNotSetDesc": "Error al establecer la imágen inicial", + "serverError": "Error en el servidor", + "disconnected": "Desconectado del servidor", + "canceled": "Procesando la cancelación", + "connected": "Conectado al servidor" }, "tooltip": { "feature": { @@ -625,6 +632,7 @@ "toggleAutoscroll": "Activar el autodesplazamiento", "toggleLogViewer": "Alternar el visor de registros", "showGallery": "Mostrar galería", - "showOptionsPanel": "Mostrar el panel de opciones" + "showOptionsPanel": "Mostrar el panel de opciones", + "menu": "Menú" } } diff --git a/invokeai/frontend/web/dist/locales/it.json b/invokeai/frontend/web/dist/locales/it.json index 7df34173df..4ac5b6831d 100644 --- a/invokeai/frontend/web/dist/locales/it.json +++ b/invokeai/frontend/web/dist/locales/it.json @@ -73,7 +73,8 @@ "postprocessing": "Post Elaborazione", "txt2img": "Testo a Immagine", "accept": "Accetta", - "cancel": "Annulla" + "cancel": "Annulla", + "linear": "Lineare" }, "gallery": { "generations": "Generazioni", @@ -483,7 +484,9 @@ }, "hSymmetryStep": "Passi Simmetria Orizzontale", "vSymmetryStep": "Passi Simmetria Verticale", - "symmetry": "Simmetria" + "symmetry": "Simmetria", + "hidePreview": "Nascondi l'anteprima", + "showPreview": "Mostra l'anteprima" }, "settings": { "models": "Modelli", @@ -529,7 +532,11 @@ "metadataLoadFailed": "Impossibile caricare i metadati", "initialImageSet": "Immagine iniziale impostata", "initialImageNotSet": "Immagine iniziale non impostata", - "initialImageNotSetDesc": "Impossibile caricare l'immagine iniziale" + "initialImageNotSetDesc": "Impossibile caricare l'immagine iniziale", + "serverError": "Errore del Server", + "disconnected": "Disconnesso dal Server", + "connected": "Connesso al Server", + "canceled": "Elaborazione annullata" }, "tooltip": { "feature": { @@ -625,6 +632,7 @@ "showOptionsPanel": "Mostra il pannello opzioni", "flipVertically": "Capovolgi verticalmente", "toggleAutoscroll": "Attiva/disattiva lo scorrimento automatico", - "modifyConfig": "Modifica configurazione" + "modifyConfig": "Modifica configurazione", + "menu": "Menu" } } diff --git a/invokeai/frontend/web/dist/locales/ja.json b/invokeai/frontend/web/dist/locales/ja.json index 542cffbb74..007aa9b491 100644 --- a/invokeai/frontend/web/dist/locales/ja.json +++ b/invokeai/frontend/web/dist/locales/ja.json @@ -37,7 +37,43 @@ "statusUpscaling": "アップスケーリング", "statusUpscalingESRGAN": "アップスケーリング (ESRGAN)", "statusLoadingModel": "モデルを読み込む", - "statusModelChanged": "モデルを変更" + "statusModelChanged": "モデルを変更", + "cancel": "キャンセル", + "accept": "同意", + "langBrPortuguese": "Português do Brasil", + "langRussian": "Русский", + "langSimplifiedChinese": "简体中文", + "langUkranian": "Украї́нська", + "langSpanish": "Español", + "img2img": "img2img", + "unifiedCanvas": "Unified Canvas", + "statusMergingModels": "モデルのマージ", + "statusModelConverted": "変換済モデル", + "statusGeneratingInpainting": "Inpaintingを生成", + "statusIterationComplete": "Iteration Complete", + "statusGeneratingOutpainting": "Outpaintingを生成", + "loading": "ロード中", + "loadingInvokeAI": "Invoke AIをロード中", + "statusConvertingModel": "モデルの変換", + "statusMergedModels": "マージ済モデル", + "pinOptionsPanel": "オプションパネルを固定", + "githubLabel": "Github", + "hotkeysLabel": "ホットキー", + "langHebrew": "עברית", + "discordLabel": "Discord", + "langItalian": "Italiano", + "langEnglish": "English", + "oceanTheme": "オーシャン", + "langArabic": "アラビア語", + "langDutch": "Nederlands", + "langFrench": "Français", + "langGerman": "Deutsch", + "langPortuguese": "Português", + "nodes": "ノード", + "langKorean": "한국어", + "langPolish": "Polski", + "txt2img": "txt2img", + "postprocessing": "Post Processing" }, "gallery": { "uploads": "アップロード", @@ -46,11 +82,14 @@ "galleryImageResetSize": "サイズをリセット", "gallerySettings": "ギャラリーの設定", "maintainAspectRatio": "アスペクト比を維持", - "singleColumnLayout": "シングルカラムレイアウト", + "singleColumnLayout": "1カラムレイアウト", "pinGallery": "ギャラリーにピン留め", "allImagesLoaded": "すべての画像を読み込む", "loadMore": "さらに読み込む", - "noImagesInGallery": "ギャラリーに画像がありません" + "noImagesInGallery": "ギャラリーに画像がありません", + "generations": "生成", + "showGenerations": "生成過程を見る", + "autoSwitchNewImages": "新しい画像に自動切替" }, "hotkeys": { "keyboardShortcuts": "キーボードショートカット", @@ -59,14 +98,16 @@ "galleryHotkeys": "ギャラリーのホットキー", "unifiedCanvasHotkeys": "Unified Canvasのホットキー", "invoke": { - "desc": "画像を生成" + "desc": "画像を生成", + "title": "Invoke" }, "cancel": { "title": "キャンセル", "desc": "画像の生成をキャンセル" }, "focusPrompt": { - "desc": "プロンプトテキストボックスにフォーカス" + "desc": "プロンプトテキストボックスにフォーカス", + "title": "プロジェクトにフォーカス" }, "toggleOptions": { "title": "オプションパネルのトグル", @@ -410,5 +451,27 @@ "accept": "同意", "showHide": "表示/非表示", "discardAll": "すべて破棄" + }, + "accessibility": { + "modelSelect": "モデルを選択", + "invokeProgressBar": "進捗バー", + "reset": "リセット", + "uploadImage": "画像をアップロード", + "previousImage": "前の画像", + "nextImage": "次の画像", + "useThisParameter": "このパラメータを使用する", + "copyMetadataJson": "メタデータをコピー(JSON)", + "zoomIn": "ズームイン", + "exitViewer": "ExitViewer", + "zoomOut": "ズームアウト", + "rotateCounterClockwise": "反時計回りに回転", + "rotateClockwise": "時計回りに回転", + "flipHorizontally": "水平方向に反転", + "flipVertically": "垂直方向に反転", + "toggleAutoscroll": "自動スクロールの切替", + "modifyConfig": "Modify Config", + "toggleLogViewer": "Log Viewerの切替", + "showGallery": "ギャラリーを表示", + "showOptionsPanel": "オプションパネルを表示" } } diff --git a/invokeai/frontend/web/dist/locales/nl.json b/invokeai/frontend/web/dist/locales/nl.json index 70b836dbc1..230e3b5b64 100644 --- a/invokeai/frontend/web/dist/locales/nl.json +++ b/invokeai/frontend/web/dist/locales/nl.json @@ -62,7 +62,18 @@ "statusConvertingModel": "Omzetten van model", "statusModelConverted": "Model omgezet", "statusMergingModels": "Samenvoegen van modellen", - "statusMergedModels": "Modellen samengevoegd" + "statusMergedModels": "Modellen samengevoegd", + "cancel": "Annuleer", + "accept": "Akkoord", + "langPortuguese": "Português", + "pinOptionsPanel": "Zet deelscherm Opties vast", + "loading": "Bezig met laden", + "loadingInvokeAI": "Bezig met laden van Invoke AI", + "oceanTheme": "Oceaan", + "langHebrew": "עברית", + "langKorean": "한국어", + "txt2img": "Tekst naar afbeelding", + "postprocessing": "Nabewerking" }, "gallery": { "generations": "Gegenereerde afbeeldingen", @@ -301,7 +312,7 @@ "name": "Naam", "nameValidationMsg": "Geef een naam voor je model", "description": "Beschrijving", - "descriptionValidationMsg": "Voeg een beschrijving toe voor je model.", + "descriptionValidationMsg": "Voeg een beschrijving toe voor je model", "config": "Configuratie", "configValidationMsg": "Pad naar het configuratiebestand van je model.", "modelLocation": "Locatie model", @@ -391,7 +402,13 @@ "modelMergeInterpAddDifferenceHelp": "In deze stand wordt model 3 eerst van model 2 afgehaald. Wat daar uitkomt wordt gemengd met model 1, gebruikmakend van de hierboven ingestelde alfawaarde.", "inverseSigmoid": "Keer Sigmoid om", "sigmoid": "Sigmoid", - "weightedSum": "Gewogen som" + "weightedSum": "Gewogen som", + "v2_base": "v2 (512px)", + "v2_768": "v2 (768px)", + "none": "geen", + "addDifference": "Voeg verschil toe", + "scanForModels": "Scan naar modellen", + "pickModelType": "Kies modelsoort" }, "parameters": { "images": "Afbeeldingen", @@ -561,7 +578,7 @@ "autoSaveToGallery": "Bewaar automatisch naar galerij", "saveBoxRegionOnly": "Bewaar alleen tekengebied", "limitStrokesToBox": "Beperk streken tot tekenvak", - "showCanvasDebugInfo": "Toon foutopsporingsgegevens canvas", + "showCanvasDebugInfo": "Toon aanvullende canvasgegevens", "clearCanvasHistory": "Wis canvasgeschiedenis", "clearHistory": "Wis geschiedenis", "clearCanvasHistoryMessage": "Het wissen van de canvasgeschiedenis laat het huidige canvas ongemoeid, maar wist onherstelbaar de geschiedenis voor het ongedaan maken en herhalen.", @@ -587,5 +604,27 @@ "betaDarkenOutside": "Verduister buiten tekenvak", "betaLimitToBox": "Beperk tot tekenvak", "betaPreserveMasked": "Behoud masker" + }, + "accessibility": { + "exitViewer": "Stop viewer", + "zoomIn": "Zoom in", + "rotateCounterClockwise": "Draai tegen de klok in", + "modelSelect": "Modelkeuze", + "invokeProgressBar": "Voortgangsbalk Invoke", + "reset": "Herstel", + "uploadImage": "Upload afbeelding", + "previousImage": "Vorige afbeelding", + "nextImage": "Volgende afbeelding", + "useThisParameter": "Gebruik deze parameter", + "copyMetadataJson": "Kopieer metagegevens-JSON", + "zoomOut": "Zoom uit", + "rotateClockwise": "Draai met de klok mee", + "flipHorizontally": "Spiegel horizontaal", + "flipVertically": "Spiegel verticaal", + "modifyConfig": "Wijzig configuratie", + "toggleAutoscroll": "Autom. scrollen aan/uit", + "toggleLogViewer": "Logboekviewer aan/uit", + "showGallery": "Toon galerij", + "showOptionsPanel": "Toon deelscherm Opties" } } diff --git a/invokeai/frontend/web/dist/locales/ru.json b/invokeai/frontend/web/dist/locales/ru.json index 0280341dee..822389d78a 100644 --- a/invokeai/frontend/web/dist/locales/ru.json +++ b/invokeai/frontend/web/dist/locales/ru.json @@ -9,7 +9,7 @@ "lightTheme": "Светлая", "greenTheme": "Зеленая", "img2img": "Изображение в изображение (img2img)", - "unifiedCanvas": "Универсальный холст", + "unifiedCanvas": "Единый холст", "nodes": "Ноды", "langRussian": "Русский", "nodesDesc": "Cистема генерации изображений на основе нодов (узлов) уже разрабатывается. Следите за новостями об этой замечательной функции.", @@ -53,7 +53,28 @@ "loading": "Загрузка", "loadingInvokeAI": "Загрузка Invoke AI", "back": "Назад", - "statusConvertingModel": "Конвертация модели" + "statusConvertingModel": "Конвертация модели", + "cancel": "Отменить", + "accept": "Принять", + "oceanTheme": "Океан", + "langUkranian": "Украинский", + "langEnglish": "Английский", + "postprocessing": "Постобработка", + "langArabic": "Арабский", + "langSpanish": "Испанский", + "langSimplifiedChinese": "Китайский (упрощенный)", + "langDutch": "Нидерландский", + "langFrench": "Французский", + "langGerman": "Немецкий", + "langHebrew": "Иврит", + "langItalian": "Итальянский", + "langJapanese": "Японский", + "langKorean": "Корейский", + "langPolish": "Польский", + "langPortuguese": "Португальский", + "txt2img": "Текст в изображение (txt2img)", + "langBrPortuguese": "Португальский (Бразилия)", + "linear": "Линейная обработка" }, "gallery": { "generations": "Генерации", @@ -72,11 +93,11 @@ "noImagesInGallery": "Изображений нет" }, "hotkeys": { - "keyboardShortcuts": "Клавиатурные сокращения", + "keyboardShortcuts": "Горячие клавиши", "appHotkeys": "Горячие клавиши приложения", "generalHotkeys": "Общие горячие клавиши", "galleryHotkeys": "Горячие клавиши галереи", - "unifiedCanvasHotkeys": "Горячие клавиши универсального холста", + "unifiedCanvasHotkeys": "Горячие клавиши Единого холста", "invoke": { "title": "Invoke", "desc": "Сгенерировать изображение" @@ -266,12 +287,12 @@ "desc": "Сбросить вид холста" }, "previousStagingImage": { - "title": "Previous Staging Image", - "desc": "Предыдущее изображение" + "title": "Предыдущее изображение", + "desc": "Предыдущая область изображения" }, "nextStagingImage": { - "title": "Next Staging Image", - "desc": "Следующее изображение" + "title": "Следующее изображение", + "desc": "Следующая область изображения" }, "acceptStagingImage": { "title": "Принять изображение", @@ -353,7 +374,42 @@ "modelConverted": "Модель преобразована", "invokeRoot": "Каталог InvokeAI", "modelsMerged": "Модели объединены", - "mergeModels": "Объединить модели" + "mergeModels": "Объединить модели", + "scanForModels": "Просканировать модели", + "sigmoid": "Сигмоид", + "formMessageDiffusersModelLocation": "Расположение Diffusers-модели", + "modelThree": "Модель 3", + "modelMergeHeaderHelp2": "Только Diffusers-модели доступны для объединения. Если вы хотите объединить checkpoint-модели, сначала преобразуйте их в Diffusers.", + "pickModelType": "Выбрать тип модели", + "formMessageDiffusersVAELocation": "Расположение VAE", + "v1": "v1", + "convertToDiffusersSaveLocation": "Путь сохранения", + "customSaveLocation": "Пользовательский путь сохранения", + "alpha": "Альфа", + "diffusersModels": "Diffusers", + "customConfig": "Пользовательский конфиг", + "pathToCustomConfig": "Путь к пользовательскому конфигу", + "inpainting": "v1 Inpainting", + "sameFolder": "В ту же папку", + "modelOne": "Модель 1", + "mergedModelCustomSaveLocation": "Пользовательский путь", + "none": "пусто", + "addDifference": "Добавить разницу", + "vaeRepoIDValidationMsg": "Онлайн репозиторий VAE", + "convertToDiffusersHelpText2": "Этот процесс заменит вашу запись в Model Manager на версию той же модели в Diffusers.", + "custom": "Пользовательский", + "modelTwo": "Модель 2", + "mergedModelSaveLocation": "Путь сохранения", + "merge": "Объединить", + "interpolationType": "Тип интерполяции", + "modelMergeInterpAddDifferenceHelp": "В этом режиме Модель 3 сначала вычитается из Модели 2. Результирующая версия смешивается с Моделью 1 с установленным выше коэффициентом Альфа.", + "modelMergeHeaderHelp1": "Вы можете объединить до трех разных моделей, чтобы создать смешанную, соответствующую вашим потребностям.", + "modelMergeAlphaHelp": "Альфа влияет на силу смешивания моделей. Более низкие значения альфа приводят к меньшему влиянию второй модели.", + "inverseSigmoid": "Обратный Сигмоид", + "weightedSum": "Взвешенная сумма", + "safetensorModels": "SafeTensors", + "v2_768": "v2 (768px)", + "v2_base": "v2 (512px)" }, "parameters": { "images": "Изображения", @@ -380,7 +436,7 @@ "scale": "Масштаб", "otherOptions": "Другие параметры", "seamlessTiling": "Бесшовный узор", - "hiresOptim": "Высокое разрешение", + "hiresOptim": "Оптимизация High Res", "imageFit": "Уместить изображение", "codeformerFidelity": "Точность", "seamSize": "Размер шва", @@ -397,11 +453,11 @@ "infillScalingHeader": "Заполнение и масштабирование", "img2imgStrength": "Сила обработки img2img", "toggleLoopback": "Зациклить обработку", - "invoke": "Вызвать", + "invoke": "Invoke", "promptPlaceholder": "Введите запрос здесь (на английском). [исключенные токены], (более значимые)++, (менее значимые)--, swap и blend тоже доступны (смотрите Github)", "sendTo": "Отправить", "sendToImg2Img": "Отправить в img2img", - "sendToUnifiedCanvas": "Отправить на холст", + "sendToUnifiedCanvas": "Отправить на Единый холст", "copyImageToLink": "Скопировать ссылку", "downloadImage": "Скачать", "openInViewer": "Открыть в просмотрщике", @@ -413,7 +469,24 @@ "info": "Метаданные", "deleteImage": "Удалить изображение", "initialImage": "Исходное изображение", - "showOptionsPanel": "Показать панель настроек" + "showOptionsPanel": "Показать панель настроек", + "vSymmetryStep": "Шаг верт. симметрии", + "cancel": { + "immediate": "Отменить немедленно", + "schedule": "Отменить после текущей итерации", + "isScheduled": "Отмена", + "setType": "Установить тип отмены" + }, + "general": "Основное", + "hiresStrength": "Сила High Res", + "symmetry": "Симметрия", + "hSymmetryStep": "Шаг гор. симметрии", + "hidePreview": "Скрыть предпросмотр", + "imageToImage": "Изображение в изображение", + "denoisingStrength": "Сила шумоподавления", + "copyImage": "Скопировать изображение", + "negativePrompts": "Исключающий запрос", + "showPreview": "Показать предпросмотр" }, "settings": { "models": "Модели", @@ -423,10 +496,11 @@ "displayHelpIcons": "Показывать значки подсказок", "useCanvasBeta": "Показывать инструменты слева (Beta UI)", "enableImageDebugging": "Включить отладку", - "resetWebUI": "Вернуть умолчания", + "resetWebUI": "Сброс настроек Web UI", "resetWebUIDesc1": "Сброс настроек веб-интерфейса удаляет только локальный кэш браузера с вашими изображениями и настройками. Он не удаляет изображения с диска.", "resetWebUIDesc2": "Если изображения не отображаются в галерее или не работает что-то еще, пожалуйста, попробуйте сбросить настройки, прежде чем сообщать о проблеме на GitHub.", - "resetComplete": "Интерфейс сброшен. Обновите эту страницу." + "resetComplete": "Интерфейс сброшен. Обновите эту страницу.", + "useSlidersForAll": "Использовать ползунки для всех параметров" }, "toast": { "tempFoldersEmptied": "Временная папка очищена", @@ -441,7 +515,7 @@ "imageSavedToGallery": "Изображение сохранено в галерею", "canvasMerged": "Холст объединен", "sentToImageToImage": "Отправить в img2img", - "sentToUnifiedCanvas": "Отправить на холст", + "sentToUnifiedCanvas": "Отправлено на Единый холст", "parametersSet": "Параметры заданы", "parametersNotSet": "Параметры не заданы", "parametersNotSetDesc": "Не найдены метаданные изображения.", @@ -458,7 +532,11 @@ "metadataLoadFailed": "Не удалось загрузить метаданные", "initialImageSet": "Исходное изображение задано", "initialImageNotSet": "Исходное изображение не задано", - "initialImageNotSetDesc": "Не получилось загрузить исходное изображение" + "initialImageNotSetDesc": "Не получилось загрузить исходное изображение", + "serverError": "Ошибка сервера", + "disconnected": "Отключено от сервера", + "connected": "Подключено к серверу", + "canceled": "Обработка отменена" }, "tooltip": { "feature": { @@ -507,7 +585,7 @@ "autoSaveToGallery": "Автосохранение в галерее", "saveBoxRegionOnly": "Сохранять только выделение", "limitStrokesToBox": "Ограничить штрихи выделением", - "showCanvasDebugInfo": "Показать отладку холста", + "showCanvasDebugInfo": "Показать доп. информацию о холсте", "clearCanvasHistory": "Очистить историю холста", "clearHistory": "Очистить историю", "clearCanvasHistoryMessage": "Очистка истории холста оставляет текущий холст нетронутым, но удаляет историю отмен и повторов.", @@ -535,6 +613,26 @@ "betaPreserveMasked": "Сохранять маскируемую область" }, "accessibility": { - "modelSelect": "Выбор модели" + "modelSelect": "Выбор модели", + "uploadImage": "Загрузить изображение", + "nextImage": "Следующее изображение", + "previousImage": "Предыдущее изображение", + "zoomIn": "Приблизить", + "zoomOut": "Отдалить", + "rotateClockwise": "Повернуть по часовой стрелке", + "rotateCounterClockwise": "Повернуть против часовой стрелки", + "flipVertically": "Перевернуть вертикально", + "flipHorizontally": "Отразить горизонтально", + "toggleAutoscroll": "Включить автопрокрутку", + "toggleLogViewer": "Показать или скрыть просмотрщик логов", + "showOptionsPanel": "Показать опции", + "showGallery": "Показать галерею", + "invokeProgressBar": "Индикатор выполнения", + "reset": "Сброс", + "modifyConfig": "Изменить конфиг", + "useThisParameter": "Использовать этот параметр", + "copyMetadataJson": "Скопировать метаданные JSON", + "exitViewer": "Закрыть просмотрщик", + "menu": "Меню" } } diff --git a/invokeai/frontend/web/dist/locales/uk.json b/invokeai/frontend/web/dist/locales/uk.json index 044cea64a4..8261aa82e0 100644 --- a/invokeai/frontend/web/dist/locales/uk.json +++ b/invokeai/frontend/web/dist/locales/uk.json @@ -16,9 +16,9 @@ "postProcessing": "Постобробка", "postProcessDesc1": "Invoke AI пропонує широкий спектр функцій постобробки. Збільшення зображення (upscale) та відновлення облич вже доступні в інтерфейсі. Отримайте доступ до них з меню 'Додаткові параметри' на вкладках 'Зображення із тексту' та 'Зображення із зображення'. Обробляйте зображення безпосередньо, використовуючи кнопки дій із зображеннями над поточним зображенням або в режимі перегляду.", "postProcessDesc2": "Найближчим часом буде випущено спеціальний інтерфейс для більш сучасних процесів постобробки.", - "postProcessDesc3": "Інтерфейс командного рядка Invoke AI пропонує різні інші функції, включаючи збільшення Embiggen", + "postProcessDesc3": "Інтерфейс командного рядка Invoke AI пропонує різні інші функції, включаючи збільшення Embiggen.", "training": "Навчання", - "trainingDesc1": "Спеціальний інтерфейс для навчання власних моделей з використанням Textual Inversion та Dreambooth", + "trainingDesc1": "Спеціальний інтерфейс для навчання власних моделей з використанням Textual Inversion та Dreambooth.", "trainingDesc2": "InvokeAI вже підтримує навчання моделей за допомогою TI, через інтерфейс командного рядка.", "upload": "Завантажити", "close": "Закрити", @@ -43,7 +43,38 @@ "statusUpscaling": "Збільшення", "statusUpscalingESRGAN": "Збільшення (ESRGAN)", "statusLoadingModel": "Завантаження моделі", - "statusModelChanged": "Модель змінено" + "statusModelChanged": "Модель змінено", + "cancel": "Скасувати", + "accept": "Підтвердити", + "back": "Назад", + "postprocessing": "Постобробка", + "statusModelConverted": "Модель сконвертована", + "statusMergingModels": "Злиття моделей", + "loading": "Завантаження", + "loadingInvokeAI": "Завантаження Invoke AI", + "langHebrew": "Іврит", + "langKorean": "Корейська", + "langPortuguese": "Португальська", + "pinOptionsPanel": "Закріпити панель налаштувань", + "oceanTheme": "Океан", + "langArabic": "Арабська", + "langSimplifiedChinese": "Китайська (спрощена)", + "langSpanish": "Іспанська", + "langEnglish": "Англійська", + "langGerman": "Німецька", + "langItalian": "Італійська", + "langJapanese": "Японська", + "langPolish": "Польська", + "langBrPortuguese": "Португальська (Бразилія)", + "langRussian": "Російська", + "githubLabel": "Github", + "txt2img": "Текст в зображення (txt2img)", + "discordLabel": "Discord", + "langDutch": "Голландська", + "langFrench": "Французька", + "statusMergedModels": "Моделі об'єднані", + "statusConvertingModel": "Конвертація моделі", + "linear": "Лінійна обробка" }, "gallery": { "generations": "Генерації", @@ -284,15 +315,15 @@ "description": "Опис", "descriptionValidationMsg": "Введіть опис моделі", "config": "Файл конфігурації", - "configValidationMsg": "Шлях до файлу конфігурації", + "configValidationMsg": "Шлях до файлу конфігурації.", "modelLocation": "Розташування моделі", - "modelLocationValidationMsg": "Шлях до файлу з моделлю", + "modelLocationValidationMsg": "Шлях до файлу з моделлю.", "vaeLocation": "Розтышування VAE", - "vaeLocationValidationMsg": "Шлях до VAE", + "vaeLocationValidationMsg": "Шлях до VAE.", "width": "Ширина", - "widthValidationMsg": "Початкова ширина зображень", + "widthValidationMsg": "Початкова ширина зображень.", "height": "Висота", - "heightValidationMsg": "Початкова висота зображень", + "heightValidationMsg": "Початкова висота зображень.", "addModel": "Додати модель", "updateModel": "Оновити модель", "availableModels": "Доступні моделі", @@ -319,7 +350,66 @@ "deleteModel": "Видалити модель", "deleteConfig": "Видалити конфігурацію", "deleteMsg1": "Ви точно хочете видалити модель із InvokeAI?", - "deleteMsg2": "Це не призведе до видалення файлу моделі з диску. Позніше ви можете додати його знову." + "deleteMsg2": "Це не призведе до видалення файлу моделі з диску. Позніше ви можете додати його знову.", + "allModels": "Усі моделі", + "diffusersModels": "Diffusers", + "scanForModels": "Сканувати моделі", + "convert": "Конвертувати", + "convertToDiffusers": "Конвертувати в Diffusers", + "formMessageDiffusersVAELocationDesc": "Якщо не надано, InvokeAI буде шукати файл VAE в розташуванні моделі, вказаній вище.", + "convertToDiffusersHelpText3": "Файл моделі на диску НЕ буде видалено або змінено. Ви можете знову додати його в Model Manager, якщо потрібно.", + "customConfig": "Користувальницький конфіг", + "invokeRoot": "Каталог InvokeAI", + "custom": "Користувальницький", + "modelTwo": "Модель 2", + "modelThree": "Модель 3", + "mergedModelName": "Назва об'єднаної моделі", + "alpha": "Альфа", + "interpolationType": "Тип інтерполяції", + "mergedModelSaveLocation": "Шлях збереження", + "mergedModelCustomSaveLocation": "Користувальницький шлях", + "invokeAIFolder": "Каталог InvokeAI", + "ignoreMismatch": "Ігнорувати невідповідності між вибраними моделями", + "modelMergeHeaderHelp2": "Тільки Diffusers-моделі доступні для об'єднання. Якщо ви хочете об'єднати checkpoint-моделі, спочатку перетворіть їх на Diffusers.", + "checkpointModels": "Checkpoints", + "repo_id": "ID репозиторію", + "v2_base": "v2 (512px)", + "repoIDValidationMsg": "Онлайн-репозиторій моделі", + "formMessageDiffusersModelLocationDesc": "Вкажіть хоча б одне.", + "formMessageDiffusersModelLocation": "Шлях до Diffusers-моделі", + "v2_768": "v2 (768px)", + "formMessageDiffusersVAELocation": "Шлях до VAE", + "convertToDiffusersHelpText5": "Переконайтеся, що у вас достатньо місця на диску. Моделі зазвичай займають від 4 до 7 Гб.", + "convertToDiffusersSaveLocation": "Шлях збереження", + "v1": "v1", + "convertToDiffusersHelpText6": "Ви хочете перетворити цю модель?", + "inpainting": "v1 Inpainting", + "modelConverted": "Модель перетворено", + "sameFolder": "У ту ж папку", + "statusConverting": "Перетворення", + "merge": "Об'єднати", + "mergeModels": "Об'єднати моделі", + "modelOne": "Модель 1", + "sigmoid": "Сігмоїд", + "weightedSum": "Зважена сума", + "none": "пусто", + "addDifference": "Додати різницю", + "pickModelType": "Вибрати тип моделі", + "convertToDiffusersHelpText4": "Це одноразова дія. Вона може зайняти від 30 до 60 секунд в залежності від характеристик вашого комп'ютера.", + "pathToCustomConfig": "Шлях до конфігу користувача", + "safetensorModels": "SafeTensors", + "addCheckpointModel": "Додати модель Checkpoint/Safetensor", + "addDiffuserModel": "Додати Diffusers", + "vaeRepoID": "ID репозиторію VAE", + "vaeRepoIDValidationMsg": "Онлайн-репозиторій VAE", + "modelMergeInterpAddDifferenceHelp": "У цьому режимі Модель 3 спочатку віднімається з Моделі 2. Результуюча версія змішується з Моделью 1 із встановленим вище коефіцієнтом Альфа.", + "customSaveLocation": "Користувальницький шлях збереження", + "modelMergeAlphaHelp": "Альфа впливає силу змішування моделей. Нижчі значення альфа призводять до меншого впливу другої моделі.", + "convertToDiffusersHelpText1": "Ця модель буде конвертована в формат 🧨 Diffusers.", + "convertToDiffusersHelpText2": "Цей процес замінить ваш запис в Model Manager на версію тієї ж моделі в Diffusers.", + "modelsMerged": "Моделі об'єднані", + "modelMergeHeaderHelp1": "Ви можете об'єднати до трьох різних моделей, щоб створити змішану, що відповідає вашим потребам.", + "inverseSigmoid": "Зворотній Сігмоїд" }, "parameters": { "images": "Зображення", @@ -346,7 +436,7 @@ "scale": "Масштаб", "otherOptions": "інші параметри", "seamlessTiling": "Безшовний узор", - "hiresOptim": "Висока роздільна здатність", + "hiresOptim": "Оптимізація High Res", "imageFit": "Вмістити зображення", "codeformerFidelity": "Точність", "seamSize": "Размір шву", @@ -379,7 +469,24 @@ "info": "Метадані", "deleteImage": "Видалити зображення", "initialImage": "Початкове зображення", - "showOptionsPanel": "Показати панель налаштувань" + "showOptionsPanel": "Показати панель налаштувань", + "general": "Основне", + "cancel": { + "immediate": "Скасувати негайно", + "schedule": "Скасувати після поточної ітерації", + "isScheduled": "Відміна", + "setType": "Встановити тип скасування" + }, + "vSymmetryStep": "Крок верт. симетрії", + "hiresStrength": "Сила High Res", + "hidePreview": "Сховати попередній перегляд", + "showPreview": "Показати попередній перегляд", + "imageToImage": "Зображення до зображення", + "denoisingStrength": "Сила шумоподавлення", + "copyImage": "Копіювати зображення", + "symmetry": "Симетрія", + "hSymmetryStep": "Крок гор. симетрії", + "negativePrompts": "Виключний запит" }, "settings": { "models": "Моделі", @@ -392,7 +499,8 @@ "resetWebUI": "Повернути початкові", "resetWebUIDesc1": "Скидання настройок веб-інтерфейсу видаляє лише локальний кеш браузера з вашими зображеннями та налаштуваннями. Це не призводить до видалення зображень з диску.", "resetWebUIDesc2": "Якщо зображення не відображаються в галереї або не працює ще щось, спробуйте скинути налаштування, перш ніж повідомляти про проблему на GitHub.", - "resetComplete": "Інтерфейс скинуто. Оновіть цю сторінку." + "resetComplete": "Інтерфейс скинуто. Оновіть цю сторінку.", + "useSlidersForAll": "Використовувати повзунки для всіх параметрів" }, "toast": { "tempFoldersEmptied": "Тимчасова папка очищена", @@ -410,21 +518,25 @@ "sentToUnifiedCanvas": "Надіслати на полотно", "parametersSet": "Параметри задані", "parametersNotSet": "Параметри не задані", - "parametersNotSetDesc": "Не знайдені метадані цього зображення", + "parametersNotSetDesc": "Не знайдені метадані цього зображення.", "parametersFailed": "Проблема із завантаженням параметрів", - "parametersFailedDesc": "Неможливо завантажити початкове зображення", + "parametersFailedDesc": "Неможливо завантажити початкове зображення.", "seedSet": "Сід заданий", "seedNotSet": "Сід не заданий", - "seedNotSetDesc": "Не вдалося знайти сід для зображення", + "seedNotSetDesc": "Не вдалося знайти сід для зображення.", "promptSet": "Запит заданий", "promptNotSet": "Запит не заданий", - "promptNotSetDesc": "Не вдалося знайти запит для зображення", + "promptNotSetDesc": "Не вдалося знайти запит для зображення.", "upscalingFailed": "Збільшення не вдалося", "faceRestoreFailed": "Відновлення облич не вдалося", "metadataLoadFailed": "Не вдалося завантажити метадані", "initialImageSet": "Початкове зображення задане", "initialImageNotSet": "Початкове зображення не задане", - "initialImageNotSetDesc": "Не вдалося завантажити початкове зображення" + "initialImageNotSetDesc": "Не вдалося завантажити початкове зображення", + "serverError": "Помилка сервера", + "disconnected": "Відключено від сервера", + "connected": "Підключено до сервера", + "canceled": "Обробку скасовано" }, "tooltip": { "feature": { @@ -473,10 +585,10 @@ "autoSaveToGallery": "Автозбереження до галереї", "saveBoxRegionOnly": "Зберiгати тiльки видiлення", "limitStrokesToBox": "Обмежити штрихи виділенням", - "showCanvasDebugInfo": "Показати налаштування полотна", + "showCanvasDebugInfo": "Показати дод. інформацію про полотно", "clearCanvasHistory": "Очистити iсторiю полотна", "clearHistory": "Очистити iсторiю", - "clearCanvasHistoryMessage": "Очищення історії полотна залишає поточне полотно незайманим, але видаляє історію скасування та повтору", + "clearCanvasHistoryMessage": "Очищення історії полотна залишає поточне полотно незайманим, але видаляє історію скасування та повтору.", "clearCanvasHistoryConfirm": "Ви впевнені, що хочете очистити історію полотна?", "emptyTempImageFolder": "Очистити тимчасову папку", "emptyFolder": "Очистити папку", @@ -499,5 +611,28 @@ "betaDarkenOutside": "Затемнити зовні", "betaLimitToBox": "Обмежити виділенням", "betaPreserveMasked": "Зберiгати замасковану область" + }, + "accessibility": { + "nextImage": "Наступне зображення", + "modelSelect": "Вибір моделі", + "invokeProgressBar": "Індикатор виконання", + "reset": "Скинути", + "uploadImage": "Завантажити зображення", + "useThisParameter": "Використовувати цей параметр", + "exitViewer": "Вийти з переглядача", + "zoomIn": "Збільшити", + "zoomOut": "Зменшити", + "rotateCounterClockwise": "Обертати проти годинникової стрілки", + "rotateClockwise": "Обертати за годинниковою стрілкою", + "toggleAutoscroll": "Увімкнути автопрокручування", + "toggleLogViewer": "Показати або приховати переглядач журналів", + "showGallery": "Показати галерею", + "previousImage": "Попереднє зображення", + "copyMetadataJson": "Скопіювати метадані JSON", + "flipVertically": "Перевернути по вертикалі", + "flipHorizontally": "Відобразити по горизонталі", + "showOptionsPanel": "Показати опції", + "modifyConfig": "Змінити конфігурацію", + "menu": "Меню" } } diff --git a/invokeai/frontend/web/dist/locales/zh_CN.json b/invokeai/frontend/web/dist/locales/zh_CN.json index b23ac8cc99..d4d7746926 100644 --- a/invokeai/frontend/web/dist/locales/zh_CN.json +++ b/invokeai/frontend/web/dist/locales/zh_CN.json @@ -481,5 +481,22 @@ "betaDarkenOutside": "暗化外部区域", "betaLimitToBox": "限制在框内", "betaPreserveMasked": "保留遮罩层" + }, + "accessibility": { + "modelSelect": "模型选择", + "invokeProgressBar": "Invoke 进度条", + "reset": "重置", + "nextImage": "下一张图片", + "useThisParameter": "使用此参数", + "uploadImage": "上传图片", + "previousImage": "上一张图片", + "copyMetadataJson": "复制JSON元数据", + "exitViewer": "退出视口(ExitViewer)", + "zoomIn": "放大", + "zoomOut": "缩小", + "rotateCounterClockwise": "逆时针旋转", + "rotateClockwise": "顺时针旋转", + "flipHorizontally": "水平翻转", + "flipVertically": "垂直翻转" } } diff --git a/invokeai/frontend/web/stats.html b/invokeai/frontend/web/stats.html index 89bfdffeda..589e02298c 100644 --- a/invokeai/frontend/web/stats.html +++ b/invokeai/frontend/web/stats.html @@ -6157,7 +6157,7 @@ var drawChart = (function (exports) {