+
+
+
+ Batch-downloading models and stuff in stable-diffusion-webui colab made simple and fast.
+
+
+
+ Report Bug
+ ·
+ Request Feature
+





+










Baka-DiffusionV1(Fp16).safetensors must be typed Baka-DiffusionV1\(Fp16\).safetensors)




















wget disabled on windows currently, until it fixed
+ gdown & curl bug fixed
+ utf-8 as default encoding for queue checker (fix bug in Windows)
+ > (for example: https://files.catbox.moe/uarze8.safetensors > neurosama.safetensors)
+ --gradio-queue (ported from onedotsix)
+ ! (for example: type !pip freeze, then hit the Download all! button and see the colab console)
+ --gradio-queue
+ aria2 as the only download method when using without --gradio-queue
+ --gradio-queue (just like onedotsix)
+ globaldebug = True, must be uncommented manually (it disrupt the progress bar)
+ aria2 as download method.
+ --gradio-queue required)
+ #textualinversion, #ti, #aestheticembedding, #aestheticembed, #controlnet, and #cnet
+ shlex.quote to properly quote links (Thanks @rti7743!)
+ subprocess.Popen instead of os.system
+ globaldebug = True, the moment this extension launch, it saves the current state of the webui on various location (into snapshot.txt), and when you type #debugresetdownloads on the textbox, it will compare the current state and the last saved state, and removes every new file/folder. This will be useful for debugging and testing.
+ globaldebug = True and you type #debugevery method on the textbox, every link that has 4 different method of download (Huggingface etc.) will be downloaded with every method, regardless of the radio button choice. The result is 4 file being downloaded.
+ globaldebug = True, it will give an output for how long a single download session lasts
+ This tool will read the textbox and download every links from top to bottom one by one
+Put your links down below. Supported link: Huggingface, CivitAI, MEGA, Discord, Github, Catbox, Google Drive, Pixeldrain, Mediafire, Anonfiles, Dropbox
+Use hashtag to separate downloaded items based on their download location
+Valid hashtags: #embed, #model, #hypernet, #lora, #vae, #addnetlora, etc.
+(For colab that uses sd-webui-additional-networks extension to load LoRA, use #addnetlora instead)
+Use double hashtag (##) after links for comment. Useful to mark which links downloads what.
+Remember to always press the 🔄️ refresh button on the UI after downloading models etc. in order for them to show up on the list.
Click these links for more:
+Readme Page
+Example
+Syntax
+Valid Hashtags
+Here's how you can get the direct links
+Report Bug
After clicking the Download All button, it's recommended to inspect the
+ colab console, as every information about the download progress is there.
Made with ❤️ by etherealxx
changeable blocks : BASE,IN00,IN01,IN02,IN03,IN04,IN05,IN06,IN07,IN08,IN09,IN10,IN11,M00,OUT00,OUT01,OUT02,OUT03,OUT04,OUT05,OUT06,OUT07,OUT08,OUT09,OUT10,OUT11
') + xyzsetting = gr.Radio(label = "Active",choices = ["Disable","XYZ plot","Effective Block Analyzer"], value ="Disable",type = "index") + with gr.Row(visible = False) as esets: + diffcol = gr.Radio(label = "diff image color",choices = ["black","white"], value ="black",type = "value",interactive =True) + revxy = gr.Checkbox(value = False,label="change X-Y",interactive =True,elem_id="lbw_changexy") + thresh = gr.Textbox(label="difference threshold",lines=1,value="20",interactive =True,elem_id="diff_thr") + xtype = gr.Dropdown(label="X Types ", choices=[x for x in ATYPES], value=ATYPES [2],interactive =True,elem_id="lbw_xtype") + xmen = gr.Textbox(label="X Values ",lines=1,value="0,0.25,0.5,0.75,1",interactive =True,elem_id="lbw_xmen") + ytype = gr.Dropdown(label="Y Types ", choices=[y for y in ATYPES], value=ATYPES [1],interactive =True,elem_id="lbw_ytype") + ymen = gr.Textbox(label="Y Values " ,lines=1,value="IN05-OUT05",interactive =True,elem_id="lbw_ymen") + ztype = gr.Dropdown(label="Z type ", choices=[z for z in ATYPES], value=ATYPES[0],interactive =True,elem_id="lbw_ztype") + zmen = gr.Textbox(label="Z values ",lines=1,value="",interactive =True,elem_id="lbw_zmen") + + exmen = gr.Textbox(label="Range",lines=1,value="0.5,1",interactive =True,elem_id="lbw_exmen",visible = False) + eymen = gr.Textbox(label="Blocks" ,lines=1,value="BASE,IN00,IN01,IN02,IN03,IN04,IN05,IN06,IN07,IN08,IN09,IN10,IN11,M00,OUT00,OUT01,OUT02,OUT03,OUT04,OUT05,OUT06,OUT07,OUT08,OUT09,OUT10,OUT11",interactive =True,elem_id="lbw_eymen",visible = False) + ecount = gr.Number(value=1, label="number of seed", interactive=True, visible = True) + + with gr.Accordion("Weights setting",open = True): + with gr.Row(): + reloadtext = gr.Button(value="Reload Presets",variant='primary',elem_id="lbw_reload") + reloadtags = gr.Button(value="Reload Tags",variant='primary',elem_id="lbw_reload") + savetext = gr.Button(value="Save Presets",variant='primary',elem_id="lbw_savetext") + openeditor = gr.Button(value="Open TextEditor",variant='primary',elem_id="lbw_openeditor") + lbw_loraratios = gr.TextArea(label="",value=lbwpresets,visible =True,interactive = True,elem_id="lbw_ratiospreset") + + with gr.Accordion("Elemental",open = False): + with gr.Row(): + e_reloadtext = gr.Button(value="Reload Presets",variant='primary',elem_id="lbw_reload") + e_savetext = gr.Button(value="Save Presets",variant='primary',elem_id="lbw_savetext") + e_openeditor = gr.Button(value="Open TextEditor",variant='primary',elem_id="lbw_openeditor") + elemsets = gr.Checkbox(value = False,label="print change",interactive =True,elem_id="lbw_print_change") + elemental = gr.TextArea(label="Identifer:BlockID:Elements:Ratio,...,separated by empty line ",value = elempresets,interactive =True,elem_id="element") + + d_true = gr.Checkbox(value = True,visible = False) + d_false = gr.Checkbox(value = False,visible = False) + + import subprocess + def openeditors(b): + path = extpath if b else extpathe + subprocess.Popen(['start', path], shell=True) + + def reloadpresets(isweight): + if isweight: + try: + with open(extpath,encoding="utf-8") as f: + return f.read() + except OSError as e: + pass + else: + try: + with open(extpath,encoding="utf-8") as f: + return f.read() + except OSError as e: + pass + + def tagdicter(presets): + presets=presets.splitlines() + wdict={} + for l in presets: + if ":" not in l or not (l.count(",") == 16 or l.count(",") == 25) : continue + w=[] + if ":" in l : + key = l.split(":",1)[0] + w = l.split(":",1)[1] + if len([w for w in w.split(",")]) == 17 or len([w for w in w.split(",")]) ==26: + wdict[key.strip()]=w + return ",".join(list(wdict.keys())) + + def savepresets(text,isweight): + if isweight: + with open(extpath,mode = 'w',encoding="utf-8") as f: + f.write(text) + else: + with open(extpathe,mode = 'w',encoding="utf-8") as f: + f.write(text) + + reloadtext.click(fn=reloadpresets,inputs=[d_true],outputs=[lbw_loraratios]) + reloadtags.click(fn=tagdicter,inputs=[lbw_loraratios],outputs=[bw_ratiotags]) + savetext.click(fn=savepresets,inputs=[lbw_loraratios,d_true],outputs=[]) + openeditor.click(fn=openeditors,inputs=[d_true],outputs=[]) + + e_reloadtext.click(fn=reloadpresets,inputs=[d_false],outputs=[elemental]) + e_savetext.click(fn=savepresets,inputs=[elemental,d_false],outputs=[]) + e_openeditor.click(fn=openeditors,inputs=[d_false],outputs=[]) + + def urawaza(active): + if active > 0: + for obj in scripts.scripts_txt2img.alwayson_scripts: + if "lora_block_weight" in obj.filename: + scripts.scripts_txt2img.selectable_scripts.append(obj) + scripts.scripts_txt2img.titles.append("LoRA Block Weight") + for obj in scripts.scripts_img2img.alwayson_scripts: + if "lora_block_weight" in obj.filename: + scripts.scripts_img2img.selectable_scripts.append(obj) + scripts.scripts_img2img.titles.append("LoRA Block Weight") + scripts.scripts_txt2img.run = newrun + scripts.scripts_img2img.run = newrun + if active == 1:return [*[gr.update(visible = True) for x in range(6)],*[gr.update(visible = False) for x in range(4)]] + else:return [*[gr.update(visible = False) for x in range(6)],*[gr.update(visible = True) for x in range(4)]] + else: + scripts.scripts_txt2img.run = runorigin + scripts.scripts_img2img.run = runorigini + return [*[gr.update(visible = True) for x in range(6)],*[gr.update(visible = False) for x in range(4)]] + + xyzsetting.change(fn=urawaza,inputs=[xyzsetting],outputs =[xtype,xmen,ytype,ymen,ztype,zmen,exmen,eymen,ecount,esets]) + + return lbw_loraratios,lbw_useblocks,xyzsetting,xtype,xmen,ytype,ymen,ztype,zmen,exmen,eymen,ecount,diffcol,thresh,revxy,elemental,elemsets + + def process(self, p, loraratios,useblocks,xyzsetting,xtype,xmen,ytype,ymen,ztype,zmen,exmen,eymen,ecount,diffcol,thresh,revxy,elemental,elemsets): + #print("self =",self,"p =",p,"presets =",loraratios,"useblocks =",useblocks,"xyzsettings =",xyzsetting,"xtype =",xtype,"xmen =",xmen,"ytype =",ytype,"ymen =",ymen,"ztype =",ztype,"zmen =",zmen) + #Note that this does not use the default arg syntax because the default args are supposed to be at the end of the function + if(loraratios == None): + loraratios = DEF_WEIGHT_PRESET + if(useblocks == None): + useblocks = True + + if useblocks: + loraratios=loraratios.splitlines() + elemental = elemental.split("\n\n") if elemental is not None else [] + lratios={} + elementals={} + for l in loraratios: + if ":" not in l or not (l.count(",") == 16 or l.count(",") == 25) : continue + l0=l.split(":",1)[0] + lratios[l0.strip()]=l.split(":",1)[1] + for e in elemental: + e0=e.split(":",1)[0] + elementals[e0.strip()]=e.split(":",1)[1] + if elemsets : print(xyelem) + if xyzsetting and "XYZ" in p.prompt: + lratios["XYZ"] = lxyz + lratios["ZYX"] = lzyx + if xyelem != "": + if "XYZ" in elementals.keys(): + elementals["XYZ"] = elementals["XYZ"] + ","+ xyelem + else: + elementals["XYZ"] = xyelem + self.lratios = lratios + self.elementals = elementals + global princ + princ = elemsets + return + + def before_process_batch(self, p, loraratios,useblocks,xyzsetting,xtype,xmen,ytype,ymen,ztype,zmen,exmen,eymen,ecount,diffcol,thresh,revxy,elemental,elemsets,**kwargs): + if useblocks: + global prompts + prompts = kwargs["prompts"].copy() + + def process_batch(self, p, loraratios,useblocks,xyzsetting,xtype,xmen,ytype,ymen,ztype,zmen,exmen,eymen,ecount,diffcol,thresh,revxy,elemental,elemsets,**kwargs): + if useblocks: + o_prompts = [p.prompt] + for prompt in prompts: + if "Model: {model_name}
Version: {model_version}
Uploaded by: {model_uploader}
Download Here
不仅仅是图像浏览器,更是一个强大的图像管理器。精确的图像搜索配合多选操作进行筛选/归档/打包,成倍提高效率。更是支持以独立模式运行,无需SD-Webui
+ + + +https://github.com/zanllp/sd-webui-infinite-image-browsing/assets/25872019/807b890b-7be8-4816-abba-f3ad340a2232 + + +## 主要特性 + +### 🔥 极佳性能 +- 存在缓存的情况下后,图像可以在几毫秒内显示。 +- 默认使用缩略图显示图像,默认大小为512像素,您可以在全局设置页中调整缩略图分辨率。 +- 你还可以控制网格图像的宽度,允许以64px到1024px的宽度范围进行显示 + +### 🔍 图像搜索和收藏 +- 将会把Prompt、Model、Lora等信息转成标签,将根据使用频率排序以供进行精确的搜索。 +- 支持标签自动完成、[翻译](https://github.com/zanllp/sd-webui-infinite-image-browsing/issues/39)和自定义。 +- 可通过在右键菜单切换自定义标签来实现图像收藏。 +- 支持类似谷歌的高级搜索。 +- 同样支持模糊搜索,您可以使用文件名或生成信息的一部分进行搜索。 +- 支持添加自定义搜索路径,方便管理自己创建的文件夹集合。 + +### 🖼️ 查看图像/视频和“发送到” +- 支持查看图像生成信息。全屏预览下同样支持。 +- 支持将图像发送到其他选项卡和其他插件,例如 ControlNet, openOutpaint。 +- 支持全屏预览,并且支持在全屏预览下使用自定义快捷键进行操作 +- 支持在全屏预览模式下通过按下方向键或点击按钮移动到前一个或后一个图像。 +- 支持播放远程服务器上的视频文件 + +### 💻 多种使用方法 +- 您可以将其作为 SD-webui 的扩展安装。 +- 您可以使用 Python 独立运行它。 +- 还提供桌面应用程序版本。 + +### 🚶♀️ Walk模式 +- 自动加载下一个文件夹 `(类似于 os.walk)`,可让您无需分页浏览所有图像。 +- 已测试可正常处理超过 27,000 个文件。 + +### 🌳 基于文件树结构的预览和文件操作 +- 支持基于文件树结构的预览。 +- 支持自动刷新。 +- 支持基本文件操作以及多选删除/移动/复制,新建文件夹等。 +- 按住 Ctrl、Shift 或 Cmd 键可选择多个项目。 + +### 🆚 图像对比 (类似ImgSli) +- 提供两张图片的并排比较 + +### 🌐 多语言支持 +- 目前支持简体中文/繁体中文/英文/德语。 +- 如果您希望添加新的语言,请参考 [i18n.ts](https://github.com/zanllp/sd-webui-infinite-image-browsing/blob/main/vue/src/i18n/zh-hans.ts) 并提交相关的代码。 + + +### 🔐 隐私和安全 +- 支持自定义secret key来进行身份验证 +- 支持配置对文件系统的访问控制,默认将在服务允许公开访问时启用 +- 支持自定义访问控制允许的路径。 +- 支持控制访问权限。你可以让IIB以只读模式运行 +- [点击这里查看详情](.env.example) + +### ⌨️ 快捷键 +- 支持删除和添加/移除Tag,在全局设置页进行自定义触发按钮 + +### 📦 打包 / 批量下载 +- 允许你一次性打包下载多个图像 +- 数据来源可以是搜索结果/普通的图像网格查看页面/walk模式等。使用拖拽或者“发送到”都可将图片添加待处理列表 + + +如果您喜欢这个项目并且觉得它对您有帮助,请考虑给我点个⭐️。这将对我持续开发和维护这个项目非常重要。如果您有任何建议或者想法,请随时在issue中提出,我会尽快回复。再次感谢您的支持! + + +
+
+## 图像搜索
+
+在第一次使用时,你需要点击等待索引的生成,我2万张图像的情况下大概需要15秒(配置是amd 5600x和pcie ssd)。后续使用他会检查文件夹是否发生变化,如果发生变化则需要重新生成索引,通常这个过程极快。
+
+图像搜索支持翻译,具体看这个 https://github.com/zanllp/sd-webui-infinite-image-browsing/issues/39 。
+
+## 图像比较
+
+
+
+## 全屏预览
+
+
+在全屏预览下同样可以查看图片信息和进行上下文菜单上的的操作,支持拖拽/调整/展开收起
+
+https://user-images.githubusercontent.com/25872019/235327735-bfb50ea7-7682-4e50-b303-38159456e527.mp4
+
+
+如果你和我一样不需要查看生成信息,你可以选择直接缩小这个面板,所有上下文操作仍然可用
+
+
+
+也可以通过右上角的图标来触发
+
+
+
diff --git a/TestingforfaivsixEx/content/eichellis/extensions/images-browser/README.md b/TestingforfaivsixEx/content/eichellis/extensions/images-browser/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..ba3846598043a72a012a59ec37dcce081054c2f3
--- /dev/null
+++ b/TestingforfaivsixEx/content/eichellis/extensions/images-browser/README.md
@@ -0,0 +1,141 @@
+[中文文档](./README-zh.md)
+
+[View recent updates (Change log)](https://github.com/zanllp/sd-webui-infinite-image-browsing/wiki/Change-log)
+
+# Stable Diffusion webui Infinite Image Browsing
+
+It's not just an image browser, but also a powerful image manager. Precise image search combined with multi-selection operations allows for filtering/archiving/packaging, greatly increasing efficiency. It also supports running in standalone mode, without the need for SD-Webui.
+ +https://github.com/zanllp/sd-webui-infinite-image-browsing/assets/25872019/807b890b-7be8-4816-abba-f3ad340a2232 +## Key Features + +### 🔥 Excellent Performance +- Once caching is generated, images can be displayed in just a few milliseconds. +- Images are displayed with thumbnails by default, with a default size of 512 pixels. You can adjust the thumbnail resolution on the global settings page. +- You can also control the width of the grid images, allowing them to be displayed in widths ranging from 64px to 1024px. + +### 🔍 Image Search & Favorite +- The prompt, model, Lora, and other information will be converted into tags and sorted by frequency of use for precise searching. +- Supports tag autocomplete, [auto-translation](https://github.com/zanllp/sd-webui-infinite-image-browsing/issues/39), and customization. +- Image favorite can be achieved by toggling custom tags for images in the right-click menu. +- Support for advanced search similar to Google +- Also supports fuzzy search, you can search by a part of the filename or generated information. +- Support adding custom search paths for easy management of folders created by the user. + +### 🖼️ View Images/Videos & `Send To` +- Supports viewing image generation information. Also supported in full-screen preview mode. +- Supports sending images to other tabs and third-party extensions such as ControlNet , openOutpaint. +- Support full-screen preview and enable custom shortcut key operations while in full-screen preview mode. +- Support navigating to the previous or next image in full-screen preview mode by pressing arrow keys or clicking buttons. +- Support playing video files from a remote server. + +### 💻 Multiple Usage Methods +- You can install it as an extension on SD-webui. +- You can run it independently using Python. +- The desktop app version is also available. + + +### 🚶♀️ Walk Mode +- Automatically load the next folder `(similar to os.walk)`, allowing you to browse all images without paging. +- Tested to work properly with over 27,000 files. + +### 🌳 Preview based on File Tree Structure & File operations +- Supports file tree-based preview. +- Supports automatic refreshing. +- Supports basic file operations, such as multiple selection for deleting/moving/copying, and creating new folders. +- Hold down the Ctrl, Shift, or Cmd key to select multiple items. + +### 🆚 image comparison (similar to Imgsli) +- Provides a side-by-side comparison of two images. + +### 🌐 Multilingual Support +- Currently supports Simplified Chinese/Traditional Chinese/English/German. +- If you would like to add a new language, please refer to [i18n.ts](https://github.com/zanllp/sd-webui-infinite-image-browsing/blob/main/vue/src/i18n/zh-hans.ts) and submit the relevant code. + +### 🔐 Privacy and Security +- Supports custom secret key for authentication. +- Supports configuring access control for the file system, which will be enabled by default when the service allows public access. +- Supports customizing the allowed paths for access control. +- Supports controlling access permissions. You can run IIB in read-only mode. +- [Click here to see details](.env.example) + + +### 📦 Packaging/Batch Download +- Allows you to download multiple images at once. +- The data source can be search results, a regular image grid view page, walk mode, etc. Images can be added to the processing list through drag-and-drop or "Send To". +### ⌨️ Keyboard Shortcuts +- Allows for deleting and adding/removing tags, with customizable trigger buttons in the global settings page. + + +If you like this project and find it helpful, please consider giving it a ⭐️. This would be very important for me to continue developing and maintaining this project. If you have any suggestions or ideas, please feel free to raise them in the issue section, and I will respond as soon as possible. Thank you again for your support! + + +
+
+## Image Search
+
+During the first use, you need to click and wait for the index generation. For my case with 20,000 images, it took about 15 seconds (with an AMD 5600X CPU and PCIe SSD). For subsequent uses, it will check whether there are changes in the folder, and if so, it needs to regenerate the index. Usually, this process is very fast.
+
+Image search supports translation, see https://github.com/zanllp/sd-webui-infinite-image-browsing/issues/39 for more detail. Feel free to share files for other languages to facilitate everyone's use.
+
+
+## Full Screen Preview
+
+
+
+In full-screen preview mode, you can also view image information and perform operations on the context menu. It supports dragging, resizing and expanding/collapsing .
+
+https://user-images.githubusercontent.com/25872019/235327735-bfb50ea7-7682-4e50-b303-38159456e527.mp4
+
+If you, like me, don't need to view the generation information, you can choose to simply minimize this panel, and all contextual operations will still be available.
+
+
+
+You can also trigger it by hovering your mouse over the icon in the top right corner.
+
+
diff --git a/TestingforfaivsixEx/content/eichellis/extensions/images-browser/app.py b/TestingforfaivsixEx/content/eichellis/extensions/images-browser/app.py
new file mode 100644
index 0000000000000000000000000000000000000000..c6a6c7e331abbae29f6434005d23ba130b1959ce
--- /dev/null
+++ b/TestingforfaivsixEx/content/eichellis/extensions/images-browser/app.py
@@ -0,0 +1,221 @@
+from typing import List
+from fastapi import FastAPI
+from fastapi.responses import FileResponse
+import uvicorn
+import os
+from scripts.iib.api import infinite_image_browsing_api, index_html_path
+from scripts.iib.tool import get_sd_webui_conf, get_valid_img_dirs, sd_img_dirs, normalize_paths
+from scripts.iib.db.datamodel import DataBase, Image
+from scripts.iib.db.update_image_data import update_image_data
+import argparse
+from typing import Optional, Coroutine
+import json
+
+tag = "\033[31m[warn]\033[0m"
+
+default_port = 8000
+default_host = "127.0.0.1"
+
+
+def sd_webui_paths_check(sd_webui_config: str, relative_to_config: bool):
+ conf = {}
+ with open(sd_webui_config, "r") as f:
+ conf = json.loads(f.read())
+ if relative_to_config:
+ for dir in sd_img_dirs:
+ if not os.path.isabs(conf[dir]):
+ conf[dir] = os.path.normpath(
+ os.path.join(sd_webui_config, "../", conf[dir])
+ )
+ paths = [conf.get(key) for key in sd_img_dirs]
+ paths_check(paths)
+
+
+def paths_check(paths):
+ for path in paths:
+ if not path or len(path.strip()) == 0:
+ continue
+ if os.path.isabs(path):
+ abs_path = path
+ else:
+ abs_path = os.path.join(os.getcwd(), path)
+ if not os.path.exists(abs_path):
+ print(f"{tag} The path '{abs_path}' will be ignored (value: {path}).")
+
+
+def do_update_image_index(sd_webui_config: str, relative_to_config=False):
+ dirs = get_valid_img_dirs(
+ get_sd_webui_conf(
+ sd_webui_config=sd_webui_config,
+ sd_webui_path_relative_to_config=relative_to_config,
+ )
+ )
+ if not len(dirs):
+ return print(f"{tag} no valid image directories, skipped")
+ conn = DataBase.get_conn()
+ update_image_data(dirs)
+ if Image.count(conn=conn) == 0:
+ return print(f"{tag} it appears that there is some issue")
+ print("update image index completed. ✨")
+
+
+class AppUtils:
+ def __init__(
+ self,
+ sd_webui_config: Optional[str] = None,
+ update_image_index: bool = False,
+ extra_paths: List[str] = [],
+ sd_webui_path_relative_to_config=False,
+ allow_cors=False,
+ enable_shutdown=False,
+ sd_webui_dir: Optional[str] = None,
+ ):
+ """
+ Parameter definitions can be found by running the `python app.py -h `command or by examining the setup_parser() function.
+ """
+ self.sd_webui_config = sd_webui_config
+ self.update_image_index = update_image_index
+ self.extra_paths = extra_paths
+ self.sd_webui_path_relative_to_config = sd_webui_path_relative_to_config
+ self.allow_cors = allow_cors
+ self.enable_shutdown = enable_shutdown
+ self.sd_webui_dir = sd_webui_dir
+ if sd_webui_dir:
+ DataBase.path = os.path.join(
+ sd_webui_dir, "extensions/sd-webui-infinite-image-browsing/iib.db"
+ )
+ self.sd_webui_config = os.path.join(sd_webui_dir, "config.json")
+ self.sd_webui_path_relative_to_config = True
+
+ def set_params(self, *args, **kwargs) -> None:
+ """改变参数,与__init__的行为一致"""
+ self.__init__(*args, **kwargs)
+
+ @staticmethod
+ def async_run(app: FastAPI, port: int = default_port, host = default_host) -> Coroutine:
+ """
+ 用于从异步运行的 FastAPI,在 Jupyter Notebook 环境中非常有用
+ """
+ # 不建议改成 async def,并且用 await 替换 return,
+ # 因为这样会失去对 server.serve() 的控制。
+ config = uvicorn.Config(app, host=host, port=port)
+ server = uvicorn.Server(config)
+ return server.serve()
+
+ def wrap_app(self, app: FastAPI) -> None:
+ """
+ 为传递的app挂载上infinite_image_browsing后端
+ """
+ sd_webui_config = self.sd_webui_config
+ update_image_index = self.update_image_index
+ extra_paths = self.extra_paths
+
+ if sd_webui_config:
+ sd_webui_paths_check(sd_webui_config, self.sd_webui_path_relative_to_config)
+ if update_image_index:
+ do_update_image_index(
+ sd_webui_config, self.sd_webui_path_relative_to_config
+ )
+ paths_check(extra_paths)
+
+ infinite_image_browsing_api(
+ app,
+ sd_webui_config=sd_webui_config,
+ extra_paths_cli=normalize_paths(extra_paths, os.getcwd()),
+ sd_webui_path_relative_to_config=self.sd_webui_path_relative_to_config,
+ allow_cors=self.allow_cors,
+ enable_shutdown=self.enable_shutdown,
+ launch_mode="server",
+ )
+
+ def get_root_browser_app(self) -> FastAPI:
+ """
+ 获取首页挂载在"/"上的infinite_image_browsing FastAPI实例
+ """
+ app = FastAPI()
+
+ # 用于在首页显示
+ @app.get("/")
+ def index():
+ return FileResponse(index_html_path)
+
+ self.wrap_app(app)
+ return app
+
+
+def setup_parser() -> argparse.ArgumentParser:
+ parser = argparse.ArgumentParser(
+ description="A fast and powerful image browser for Stable Diffusion webui."
+ )
+ parser.add_argument(
+ "--host", type=str, default=default_host, help="The host to use"
+ )
+ parser.add_argument(
+ "--port", type=int, help="The port to use", default=default_port
+ )
+ parser.add_argument(
+ "--sd_webui_config", type=str, default=None, help="The path to the config file"
+ )
+ parser.add_argument(
+ "--update_image_index", action="store_true", help="Update the image index"
+ )
+ parser.add_argument(
+ "--extra_paths",
+ nargs="+",
+ help="Extra paths to use, will be added to Quick Move.",
+ default=[],
+ )
+ parser.add_argument(
+ "--sd_webui_path_relative_to_config",
+ action="store_true",
+ help="Use the file path of the sd_webui_config file as the base for all relative paths provided within the sd_webui_config file.",
+ )
+ parser.add_argument(
+ "--allow_cors",
+ action="store_true",
+ help="Allow Cross-Origin Resource Sharing (CORS) for the API.",
+ )
+ parser.add_argument(
+ "--enable_shutdown",
+ action="store_true",
+ help="Enable the shutdown endpoint.",
+ )
+ parser.add_argument(
+ "--sd_webui_dir",
+ type=str,
+ default=None,
+ help="The path to the sd_webui folder. When specified, the sd_webui's configuration will be used and the extension must be installed within the sd_webui. Data will be shared between the two.",
+ )
+ return parser
+
+
+def launch_app(port: int = default_port, host: str = default_host, *args, **kwargs: dict) -> None:
+ """
+ Launches the application on the specified port.
+
+ Args:
+ **kwargs (dict): Optional keyword arguments that can be used to configure the application.
+ These can be viewed by running 'python app.py -h' or by checking the setup_parser() function.
+ """
+ app_utils = AppUtils(*args, **kwargs)
+ app = app_utils.get_root_browser_app()
+ uvicorn.run(app, host=host, port=port)
+
+
+async def async_launch_app(port: int = default_port, host: str = default_host, *args, **kwargs: dict) -> None:
+ """
+ Asynchronously launches the application on the specified port.
+
+ Args:
+ **kwargs (dict): Optional keyword arguments that can be used to configure the application.
+ These can be viewed by running 'python app.py -h' or by checking the setup_parser() function.
+ """
+ app_utils = AppUtils(*args, **kwargs)
+ app = app_utils.get_root_browser_app()
+ await app_utils.async_run(app, host=host, port=port)
+
+
+if __name__ == "__main__":
+ parser = setup_parser()
+ args = parser.parse_args()
+ launch_app(**vars(args))
diff --git a/TestingforfaivsixEx/content/eichellis/extensions/images-browser/install.py b/TestingforfaivsixEx/content/eichellis/extensions/images-browser/install.py
new file mode 100644
index 0000000000000000000000000000000000000000..308c9570c8f614b94ec7334b18f0bf419420ca48
--- /dev/null
+++ b/TestingforfaivsixEx/content/eichellis/extensions/images-browser/install.py
@@ -0,0 +1,28 @@
+import launch
+import os
+import pkg_resources
+
+req_file = os.path.join(os.path.dirname(os.path.realpath(__file__)), "requirements.txt")
+
+def dist2package(dist: str):
+ return ({
+ "pyfunctional": "functional",
+ "python-dotenv": "dotenv",
+ "Pillow": "PIL"
+ }).get(dist, dist)
+
+# copy from controlnet, thanks
+with open(req_file) as file:
+ for package in file:
+ try:
+ package = package.strip()
+ if '==' in package:
+ package_name, package_version = package.split('==')
+ installed_version = pkg_resources.get_distribution(package_name).version
+ if installed_version != package_version:
+ launch.run_pip(f"install {package}", f"sd-webui-infinite-image-browsing requirement: changing {package_name} version from {installed_version} to {package_version}")
+ elif not launch.is_installed(dist2package(package)):
+ launch.run_pip(f"install {package}", f"sd-webui-infinite-image-browsing requirement: {package}")
+ except Exception as e:
+ print(e)
+ print(f'Warning: Failed to install {package}, something may not work.')
diff --git a/TestingforfaivsixEx/content/eichellis/extensions/images-browser/javascript/index.js b/TestingforfaivsixEx/content/eichellis/extensions/images-browser/javascript/index.js
new file mode 100644
index 0000000000000000000000000000000000000000..94113a7534102f7a1c58783dce4b8ca4e52c3980
--- /dev/null
+++ b/TestingforfaivsixEx/content/eichellis/extensions/images-browser/javascript/index.js
@@ -0,0 +1,176 @@
+Promise.resolve().then(async () => {
+ /**
+ * This is a file generated using `yarn build`.
+ * If you want to make changes, please modify `index.tpl.js` and run the command to generate it again.
+ */
+ const html = `
+
+
+
+
+
+
+
+ 1&&arguments[1]!==void 0?arguments[1]:!1;g.activeIndex=E;var P={source:I?"keyboard":"mouse"},k=s.value[E];if(!k){o.onActiveValue(null,-1,P);return}o.onActiveValue(k.value,E,P)};pe([function(){return s.value.length},function(){return i.searchValue}],function(){c(o.defaultActiveFirstOption!==!1?p(0):-1)},{immediate:!0});var d=function(E){return o.rawValues.has(E)&&i.mode!=="combobox"};pe([function(){return i.open},function(){return i.searchValue}],function(){if(!i.multiple&&i.open&&o.rawValues.size===1){var _=Array.from(o.rawValues)[0],E=Me(s.value).findIndex(function(I){var P=I.data;return P[o.fieldNames.value]===_});E!==-1&&(c(E),Ke(function(){v(E)}))}i.open&&Ke(function(){var I;(I=u.current)===null||I===void 0||I.scrollTo(void 0)})},{immediate:!0,flush:"post"});var m=function(E){E!==void 0&&o.onSelect(E,{selected:!o.rawValues.has(E)}),i.multiple||i.toggleOpen(!1)},h=function(E){return typeof E.label=="function"?E.label():E.label};function y(_){var E=s.value[_];if(!E)return null;var I=E.data||{},P=I.value,k=E.group,L=zs(I,!0),F=h(E);return E?x("div",T(T({"aria-label":typeof F=="string"&&!k?F:null},L),{},{key:_,role:k?"presentation":"option",id:"".concat(i.id,"_list_").concat(_),"aria-selected":d(P)}),[P]):null}var b=function(E){var I=E.which,P=E.ctrlKey;switch(I){case Ce.N:case Ce.P:case Ce.UP:case Ce.DOWN:{var k=0;if(I===Ce.UP?k=-1:I===Ce.DOWN?k=1:aN()&&P&&(I===Ce.N?k=1:I===Ce.P&&(k=-1)),k!==0){var L=p(g.activeIndex+k,k);v(L),c(L,!0)}break}case Ce.ENTER:{var F=s.value[g.activeIndex];F&&!F.data.disabled?m(F.value):m(void 0),i.open&&E.preventDefault();break}case Ce.ESC:i.toggleOpen(!1),i.open&&E.stopPropagation()}},w=function(){},C=function(E){v(E)};return r({onKeydown:b,onKeyup:w,scrollTo:C}),function(){var _=i.id,E=i.notFoundContent,I=i.onPopupScroll,P=o.menuItemSelectedIcon,k=o.fieldNames,L=o.virtual,F=o.listHeight,j=o.listItemHeight,z=a.option,$=g.activeIndex,M=Object.keys(k).map(function(A){return k[A]});return s.value.length===0?x("div",{role:"listbox",id:"".concat(_,"_list"),class:"".concat(l.value,"-empty"),onMousedown:f},[E]):x(De,null,[x("div",{role:"listbox",id:"".concat(_,"_list"),style:{height:0,width:0,overflow:"hidden"}},[y($-1),y($),y($+1)]),x(nN,{itemKey:"key",ref:u,data:s.value,height:F,itemHeight:j,fullHeight:!1,onMousedown:f,onScroll:I,virtual:L},{default:function(N,D){var q,ee=N.group,Z=N.groupOption,Y=N.data,G=N.value,ne=Y.key,oe=typeof N.label=="function"?N.label():N.label;if(ee){var de,me=(de=Y.title)!==null&&de!==void 0?de:Jh(oe)&&oe;return x("div",{class:ge(l.value,"".concat(l.value,"-group")),title:me},[z?z(Y):oe!==void 0?oe:ne])}var ve=Y.disabled,he=Y.title;Y.children;var ye=Y.style,R=Y.class,S=Y.className,O=ut(Y,lN),B=xt(O,M),H=d(G),Q="".concat(l.value,"-option"),ae=ge(l.value,Q,R,S,(q={},te(q,"".concat(Q,"-grouped"),Z),te(q,"".concat(Q,"-active"),$===D&&!ve),te(q,"".concat(Q,"-disabled"),ve),te(q,"".concat(Q,"-selected"),H),q)),ie=h(N),re=!P||typeof P=="function"||H,X=typeof ie=="number"?ie:ie||G,V=Jh(X)?X.toString():void 0;return he!==void 0&&(V=he),x("div",T(T({},B),{},{"aria-selected":H,class:ae,title:V,onMousemove:function(se){O.onMousemove&&O.onMousemove(se),!($===D||ve)&&c(D)},onClick:function(se){ve||m(G),O.onClick&&O.onClick(se)},style:ye}),[x("div",{class:"".concat(Q,"-content")},[z?z(Y):X]),ar(P)||H,re&&x(ts,{class:"".concat(l.value,"-option-state"),customizeIcon:P,customizeIconProps:{isSelected:H}},{default:function(){return[H?"✓":null]}})])}})])}}});const uN=sN;var cN=["value","disabled"];function fN(t){var e=t.key,n=t.children,r=t.props,a=r.value,i=r.disabled,o=ut(r,cN),l=n==null?void 0:n.default;return T({key:e,value:a!==void 0?a:e,children:l,disabled:i||i===""},o)}function Uw(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=pn(t).map(function(r,a){var i;if(!ar(r)||!r.type)return null;var o=r.type.isSelectOptGroup,l=r.key,s=r.children,u=r.props;if(e||!o)return fN(r);var f=s&&s.default?s.default():void 0,v=(u==null?void 0:u.label)||((i=s.label)===null||i===void 0?void 0:i.call(s))||l;return T(T({key:"__RC_SELECT_GRP__".concat(l===null?a:String(l),"__")},u),{},{label:v,options:Uw(f||[])})}).filter(function(r){return r});return n}function dN(t,e,n){var r=$n(),a=$n(),i=$n(),o=$n([]);return pe([t,e],function(){t.value?o.value=Me(t.value).slice():o.value=Uw(e.value)},{immediate:!0,deep:!0}),st(function(){var l=o.value,s=new Map,u=new Map,f=n.value;function v(p){for(var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,c=0;c
=A*2&&w!==1+2&&(k[0]=x(aa,{locale:l,rootPrefixCls:r,onClick:this.handleChange,onKeypress:this.runIfEnter,key:de,page:de,class:"".concat(r,"-item-after-jump-prev"),active:!1,showTitle:this.showTitle,itemRender:g},null),k.unshift(L)),P-w>=A*2&&w!==P-2&&(k[k.length-1]=x(aa,{locale:l,rootPrefixCls:r,onClick:this.handleChange,onKeypress:this.runIfEnter,key:me,page:me,class:"".concat(r,"-item-before-jump-next"),active:!1,showTitle:this.showTitle,itemRender:g},null),k.push(F)),de!==1&&k.unshift(j),me!==P&&k.push(z)}var ye=null;v&&(ye=x("li",{class:"".concat(r,"-total-text")},[v(o,[o===0?0:(w-1)*C+1,w*C>o?o:w*C])]));var R=!q||!P,S=!ee||!P,O=this.buildOptionText||this.$slots.buildOptionText;return x("ul",T(T({unselectable:"on",ref:"paginationNode"},I),{},{class:ge((e={},te(e,"".concat(r),!0),te(e,"".concat(r,"-disabled"),a),e),E)}),[ye,x("li",{title:f?l.prev_page:null,onClick:this.prev,tabindex:R?null:0,onKeypress:this.runIfEnterPrev,class:ge("".concat(r,"-prev"),te({},"".concat(r,"-disabled"),R)),"aria-disabled":R},[this.renderPrev(N)]),k,x("li",{title:f?l.next_page:null,onClick:this.next,tabindex:S?null:0,onKeypress:this.runIfEnterNext,class:ge("".concat(r,"-next"),te({},"".concat(r,"-disabled"),S)),"aria-disabled":S},[this.renderNext(D)]),x(MF,{disabled:a,locale:l,rootPrefixCls:r,selectComponentClass:h,selectPrefixCls:y,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:w,pageSize:C,pageSizeOptions:b,buildOptionText:O||null,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:M},null)])}});var DF=["size","itemRender","buildOptionText","selectComponentClass","responsive"],FF=function(){return{total:Number,defaultCurrent:Number,disabled:{type:Boolean,default:void 0},current:Number,defaultPageSize:Number,pageSize:Number,hideOnSinglePage:{type:Boolean,default:void 0},showSizeChanger:{type:Boolean,default:void 0},pageSizeOptions:Array,buildOptionText:Function,showQuickJumper:{type:[Boolean,Object],default:void 0},showTotal:Function,size:String,simple:{type:Boolean,default:void 0},locale:Object,prefixCls:String,selectPrefixCls:String,totalBoundaryShowSizeChanger:Number,selectComponentClass:String,itemRender:Function,role:String,responsive:Boolean,showLessItems:{type:Boolean,default:void 0},onChange:Function,onShowSizeChange:Function,"onUpdate:current":Function,"onUpdate:pageSize":Function}};const BF=fe({compatConfig:{MODE:3},name:"APagination",inheritAttrs:!1,props:FF(),setup:function(e,n){var r=n.slots,a=n.attrs,i=Ze("pagination",e),o=i.prefixCls,l=i.configProvider,s=i.direction,u=K(function(){return l.getPrefixCls("select",e.selectPrefixCls)}),f=LN(),v=Zf("Pagination",p0,Kt(e,"locale")),p=_e(v,1),g=p[0],c=function(m){var h=x("span",{class:"".concat(m,"-item-ellipsis")},[Fn("•••")]),y=x("button",{class:"".concat(m,"-item-link"),type:"button",tabindex:-1},[x(TC,null,null)]),b=x("button",{class:"".concat(m,"-item-link"),type:"button",tabindex:-1},[x(tC,null,null)]),w=x("a",{rel:"nofollow",class:"".concat(m,"-item-link")},[x("div",{class:"".concat(m,"-item-container")},[x(PF,{class:"".concat(m,"-item-link-icon")},null),h])]),C=x("a",{rel:"nofollow",class:"".concat(m,"-item-link")},[x("div",{class:"".concat(m,"-item-container")},[x(IF,{class:"".concat(m,"-item-link-icon")},null),h])]);if(s.value==="rtl"){var _=[b,y];y=_[0],b=_[1];var E=[C,w];w=E[0],C=E[1]}return{prevIcon:y,nextIcon:b,jumpPrevIcon:w,jumpNextIcon:C}};return function(){var d,m=e.size,h=e.itemRender,y=h===void 0?r.itemRender:h,b=e.buildOptionText,w=b===void 0?r.buildOptionText:b,C=e.selectComponentClass,_=e.responsive,E=ut(e,DF),I=m==="small"||!!((d=f.value)!==null&&d!==void 0&&d.xs&&!m&&_),P=T(T(T(T({},E),c(o.value)),{},{prefixCls:o.value,selectPrefixCls:u.value,selectComponentClass:C||(I?AF:as),locale:g.value,buildOptionText:w},a),{},{class:ge(te({mini:I},"".concat(o.value,"-rtl"),s.value==="rtl"),a.class),itemRender:y});return x(LF,P,null)}}}),jF=No(BF);var zF=["prefixCls","visible","wrapClassName","centered","getContainer","closeIcon","focusTriggerAfterClose"],Qc=null,WF=function(e){Qc={x:e.pageX,y:e.pageY},setTimeout(function(){return Qc=null},100)};OC()&&Sn(document.documentElement,"click",WF,!0);var VF=function(){return{prefixCls:String,visible:{type:Boolean,default:void 0},confirmLoading:{type:Boolean,default:void 0},title:J.any,closable:{type:Boolean,default:void 0},closeIcon:J.any,onOk:Function,onCancel:Function,"onUpdate:visible":Function,onChange:Function,afterClose:Function,centered:{type:Boolean,default:void 0},width:[String,Number],footer:J.any,okText:J.any,okType:String,cancelText:J.any,icon:J.any,maskClosable:{type:Boolean,default:void 0},forceRender:{type:Boolean,default:void 0},okButtonProps:Object,cancelButtonProps:Object,destroyOnClose:{type:Boolean,default:void 0},wrapClassName:String,maskTransitionName:String,transitionName:String,getContainer:{type:[String,Function,Boolean,Object],default:void 0},zIndex:Number,bodyStyle:{type:Object,default:void 0},maskStyle:{type:Object,default:void 0},mask:{type:Boolean,default:void 0},keyboard:{type:Boolean,default:void 0},wrapProps:Object,focusTriggerAfterClose:{type:Boolean,default:void 0},modalRender:Function}},Wa=[];const Bt=fe({compatConfig:{MODE:3},name:"AModal",inheritAttrs:!1,props:Jt(VF(),{width:520,transitionName:"zoom",maskTransitionName:"fade",confirmLoading:!1,visible:!1,okType:"primary"}),setup:function(e,n){var r=n.emit,a=n.slots,i=n.attrs,o=Zf("Modal"),l=_e(o,1),s=l[0],u=Ze("modal",e),f=u.prefixCls,v=u.rootPrefixCls,p=u.direction,g=u.getPopupContainer,c=function(y){r("update:visible",!1),r("cancel",y),r("change",!1)},d=function(y){r("ok",y)},m=function(){var y,b,w=e.okText,C=w===void 0?(y=a.okText)===null||y===void 0?void 0:y.call(a):w,_=e.okType,E=e.cancelText,I=E===void 0?(b=a.cancelText)===null||b===void 0?void 0:b.call(a):E,P=e.confirmLoading;return x(De,null,[x(Tn,T({onClick:c},e.cancelButtonProps),{default:function(){return[I||s.value.cancelText]}}),x(Tn,T(T({},Jw(_)),{},{loading:P,onClick:d},e.okButtonProps),{default:function(){return[C||s.value.okText]}})])};return function(){var h,y;e.prefixCls;var b=e.visible,w=e.wrapClassName,C=e.centered,_=e.getContainer,E=e.closeIcon,I=E===void 0?(h=a.closeIcon)===null||h===void 0?void 0:h.call(a):E,P=e.focusTriggerAfterClose,k=P===void 0?!0:P,L=ut(e,zF),F=ge(w,(y={},te(y,"".concat(f.value,"-centered"),!!C),te(y,"".concat(f.value,"-wrap-rtl"),p.value==="rtl"),y));return x(YC,T(T(T({},L),i),{},{getContainer:_||g.value,prefixCls:f.value,wrapClassName:F,visible:b,mousePosition:Qc,onClose:c,focusTriggerAfterClose:k,transitionName:_a(v.value,"zoom",e.transitionName),maskTransitionName:_a(v.value,"fade",e.maskTransitionName)}),T(T({},a),{},{footer:a.footer||m,closeIcon:function(){return x("span",{class:"".concat(f.value,"-close-x")},[I||x(Ci,{class:"".concat(f.value,"-close-icon")},null)])}}))}}});var HF=function(){var e=W(!1);return Qe(function(){e.value=!0}),e};const UF=HF;var KF={type:{type:String},actionFn:Function,close:Function,autofocus:Boolean,prefixCls:String,buttonProps:Object,emitEvent:Boolean,quitOnNullishReturnValue:Boolean};function Tg(t){return!!(t&&t.then)}const Ig=fe({compatConfig:{MODE:3},name:"ActionButton",props:KF,setup:function(e,n){var r=n.slots,a=W(!1),i=W(),o=W(!1),l,s=UF();Re(function(){e.autofocus&&(l=setTimeout(function(){var v;return(v=i.value.$el)===null||v===void 0?void 0:v.focus()}))}),Qe(function(){clearTimeout(l)});var u=function(p){var g=e.close;Tg(p)&&(o.value=!0,p.then(function(){s.value||(o.value=!1),g.apply(void 0,arguments),a.value=!1},function(c){console.error(c),s.value||(o.value=!1),a.value=!1}))},f=function(p){var g=e.actionFn,c=e.close,d=c===void 0?function(){}:c;if(!a.value){if(a.value=!0,!g){d();return}var m;if(e.emitEvent){if(m=g(p),e.quitOnNullishReturnValue&&!Tg(m)){a.value=!1,d(p);return}}else if(g.length)m=g(d),a.value=!1;else if(m=g(),!m){d();return}u(m)}};return function(){var v=e.type,p=e.prefixCls,g=e.buttonProps;return x(Tn,T(T(T({},Jw(v)),{},{onClick:f,loading:o.value,prefixCls:p},g),{},{ref:i}),r)}}});function Li(t){return typeof t=="function"?t():t}const GF=fe({name:"ConfirmDialog",inheritAttrs:!1,props:["icon","onCancel","onOk","close","closable","zIndex","afterClose","visible","keyboard","centered","getContainer","maskStyle","okButtonProps","cancelButtonProps","okType","prefixCls","okCancel","width","mask","maskClosable","okText","cancelText","autoFocusButton","transitionName","maskTransitionName","type","title","content","direction","rootPrefixCls","bodyStyle","closeIcon","modalRender","focusTriggerAfterClose","wrapClassName"],setup:function(e,n){var r=n.attrs,a=Zf("Modal"),i=_e(a,1),o=i[0];return function(){var l=e.icon,s=e.onCancel,u=e.onOk,f=e.close,v=e.closable,p=v===void 0?!1:v,g=e.zIndex,c=e.afterClose,d=e.visible,m=e.keyboard,h=e.centered,y=e.getContainer,b=e.maskStyle,w=e.okButtonProps,C=e.cancelButtonProps,_=e.okCancel,E=_===void 0?!0:_,I=e.width,P=I===void 0?416:I,k=e.mask,L=k===void 0?!0:k,F=e.maskClosable,j=F===void 0?!1:F,z=e.type,$=e.title,M=e.content,A=e.direction,N=e.closeIcon,D=e.modalRender,q=e.focusTriggerAfterClose,ee=e.rootPrefixCls,Z=e.bodyStyle,Y=e.wrapClassName,G=e.okType||"primary",ne=e.prefixCls||"ant-modal",oe="".concat(ne,"-confirm"),de=r.style||{},me=Li(e.okText)||(E?o.value.okText:o.value.justOkText),ve=Li(e.cancelText)||o.value.cancelText,he=e.autoFocusButton===null?!1:e.autoFocusButton||"ok",ye=ge(oe,"".concat(oe,"-").concat(z),"".concat(ne,"-").concat(z),te({},"".concat(oe,"-rtl"),A==="rtl"),r.class),R=E&&x(Ig,{actionFn:s,close:f,autofocus:he==="cancel",buttonProps:C,prefixCls:"".concat(ee,"-btn")},{default:function(){return[ve]}});return x(Bt,{prefixCls:ne,class:ye,wrapClassName:ge(te({},"".concat(oe,"-centered"),!!h),Y),onCancel:function(O){return f({triggerCancel:!0},O)},visible:d,title:"",footer:"",transitionName:_a(ee,"zoom",e.transitionName),maskTransitionName:_a(ee,"fade",e.maskTransitionName),mask:L,maskClosable:j,maskStyle:b,style:de,bodyStyle:Z,width:P,zIndex:g,afterClose:c,keyboard:m,centered:h,getContainer:y,closable:p,closeIcon:N,modalRender:D,focusTriggerAfterClose:q},{default:function(){return[x("div",{class:"".concat(oe,"-body-wrapper")},[x("div",{class:"".concat(oe,"-body")},[Li(l),$===void 0?null:x("span",{class:"".concat(oe,"-title")},[Li($)]),x("div",{class:"".concat(oe,"-content")},[Li(M)])]),x("div",{class:"".concat(oe,"-btns")},[R,x(Ig,{type:G,actionFn:u,close:f,autofocus:he==="ok",buttonProps:w,prefixCls:"".concat(ee,"-btn")},{default:function(){return[me]}})])])]}})}}});var qF=function(e){var n=document.createDocumentFragment(),r=T(T({},xt(e,["parentContext","appContext"])),{},{close:o,visible:!0}),a=null;function i(){a&&(Ul(null,n),a.component.update(),a=null);for(var f=arguments.length,v=new Array(f),p=0;p {if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](a);r._listeners=null}),this.promise.then=a=>{let i;const o=new Promise(l=>{r.subscribe(l),i=l}).then(a);return o.cancel=function(){r.unsubscribe(i)},o},e(function(i,o,l){r.reason||(r.reason=new jo(i,o,l),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}static source(){let e;return{token:new E1(function(a){e=a}),cancel:e}}};const A6=I6;function M6(t){return function(n){return t.apply(null,n)}}function k6(t){return ue.isObject(t)&&t.isAxiosError===!0}const nf={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(nf).forEach(([t,e])=>{nf[e]=t});const N6=nf;function O1(t){const e=new Ll(t),n=s1(Ll.prototype.request,e);return ue.extend(n,Ll.prototype,e,{allOwnKeys:!0}),ue.extend(n,e,null,{allOwnKeys:!0}),n.create=function(a){return O1(ui(t,a))},n}const Et=O1(dv);Et.Axios=Ll;Et.CanceledError=jo;Et.CancelToken=A6;Et.isCancel=S1;Et.VERSION=P1;Et.toFormData=Zs;Et.AxiosError=Ve;Et.Cancel=Et.CanceledError;Et.all=function(e){return Promise.all(e)};Et.spread=M6;Et.isAxiosError=k6;Et.mergeConfig=ui;Et.AxiosHeaders=Cr;Et.formToJSON=t=>_1(ue.isHTMLForm(t)?new FormData(t):t);Et.HttpStatusCode=N6;Et.default=Et;const T1=Et,{Axios:s9,AxiosError:u9,CanceledError:c9,isCancel:f9,CancelToken:d9,VERSION:v9,all:p9,Cancel:h9,isAxiosError:$6,spread:m9,toFormData:g9,AxiosHeaders:y9,HttpStatusCode:b9,formToJSON:w9,mergeConfig:C9}=T1;/*!
+ * shared v9.3.0-beta.19
+ * (c) 2023 kazuya kawaguchi
+ * Released under the MIT License.
+ */const rf=typeof window<"u",Aa=(t,e=!1)=>e?Symbol.for(t):Symbol(t),R6=(t,e,n)=>L6({l:t,k:e,s:n}),L6=t=>JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),St=t=>typeof t=="number"&&isFinite(t),D6=t=>A1(t)==="[object Date]",Gr=t=>A1(t)==="[object RegExp]",nu=t=>Te(t)&&Object.keys(t).length===0;function F6(t,e){typeof console<"u"&&(console.warn("[intlify] "+t),e&&console.warn(e.stack))}const $t=Object.assign;let jg;const to=()=>jg||(jg=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function zg(t){return t.replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}const B6=Object.prototype.hasOwnProperty;function pv(t,e){return B6.call(t,e)}const ot=Array.isArray,gt=t=>typeof t=="function",be=t=>typeof t=="string",Fe=t=>typeof t=="boolean",Je=t=>t!==null&&typeof t=="object",I1=Object.prototype.toString,A1=t=>I1.call(t),Te=t=>{if(!Je(t))return!1;const e=Object.getPrototypeOf(t);return e===null||e.constructor===Object},j6=t=>t==null?"":ot(t)||Te(t)&&t.toString===I1?JSON.stringify(t,null,2):String(t);/*!
+ * message-compiler v9.3.0-beta.19
+ * (c) 2023 kazuya kawaguchi
+ * Released under the MIT License.
+ */const Ue={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14,__EXTEND_POINT__:15};function ru(t,e,n={}){const{domain:r,messages:a,args:i}=n,o=t,l=new SyntaxError(String(o));return l.code=t,e&&(l.location=e),l.domain=r,l}function z6(t){throw t}function W6(t,e,n){return{line:t,column:e,offset:n}}function af(t,e,n){const r={start:t,end:e};return n!=null&&(r.source=n),r}const hr=" ",V6="\r",Ut=`
+`,H6=String.fromCharCode(8232),U6=String.fromCharCode(8233);function K6(t){const e=t;let n=0,r=1,a=1,i=0;const o=E=>e[E]===V6&&e[E+1]===Ut,l=E=>e[E]===Ut,s=E=>e[E]===U6,u=E=>e[E]===H6,f=E=>o(E)||l(E)||s(E)||u(E),v=()=>n,p=()=>r,g=()=>a,c=()=>i,d=E=>o(E)||s(E)||u(E)?Ut:e[E],m=()=>d(n),h=()=>d(n+i);function y(){return i=0,f(n)&&(r++,a=0),o(n)&&n++,n++,a++,e[n]}function b(){return o(n+i)&&i++,i++,e[n+i]}function w(){n=0,r=1,a=1,i=0}function C(E=0){i=E}function _(){const E=n+i;for(;E!==n;)y();i=0}return{index:v,line:p,column:g,peekOffset:c,charAt:d,currentChar:m,currentPeek:h,next:y,peek:b,reset:w,resetPeek:C,skipToPeek:_}}const Nr=void 0,Wg="'",G6="tokenizer";function q6(t,e={}){const n=e.location!==!1,r=K6(t),a=()=>r.index(),i=()=>W6(r.line(),r.column(),r.index()),o=i(),l=a(),s={currentType:14,offset:l,startLoc:o,endLoc:o,lastType:14,lastOffset:l,lastStartLoc:o,lastEndLoc:o,braceNest:0,inLinked:!1,text:""},u=()=>s,{onError:f}=e;function v(S,O,B,...H){const Q=u();if(O.column+=B,O.offset+=B,f){const ae=af(Q.startLoc,O),ie=ru(S,ae,{domain:G6,args:H});f(ie)}}function p(S,O,B){S.endLoc=i(),S.currentType=O;const H={type:O};return n&&(H.loc=af(S.startLoc,S.endLoc)),B!=null&&(H.value=B),H}const g=S=>p(S,14);function c(S,O){return S.currentChar()===O?(S.next(),O):(v(Ue.EXPECTED_TOKEN,i(),0,O),"")}function d(S){let O="";for(;S.currentPeek()===hr||S.currentPeek()===Ut;)O+=S.currentPeek(),S.peek();return O}function m(S){const O=d(S);return S.skipToPeek(),O}function h(S){if(S===Nr)return!1;const O=S.charCodeAt(0);return O>=97&&O<=122||O>=65&&O<=90||O===95}function y(S){if(S===Nr)return!1;const O=S.charCodeAt(0);return O>=48&&O<=57}function b(S,O){const{currentType:B}=O;if(B!==2)return!1;d(S);const H=h(S.currentPeek());return S.resetPeek(),H}function w(S,O){const{currentType:B}=O;if(B!==2)return!1;d(S);const H=S.currentPeek()==="-"?S.peek():S.currentPeek(),Q=y(H);return S.resetPeek(),Q}function C(S,O){const{currentType:B}=O;if(B!==2)return!1;d(S);const H=S.currentPeek()===Wg;return S.resetPeek(),H}function _(S,O){const{currentType:B}=O;if(B!==8)return!1;d(S);const H=S.currentPeek()===".";return S.resetPeek(),H}function E(S,O){const{currentType:B}=O;if(B!==9)return!1;d(S);const H=h(S.currentPeek());return S.resetPeek(),H}function I(S,O){const{currentType:B}=O;if(!(B===8||B===12))return!1;d(S);const H=S.currentPeek()===":";return S.resetPeek(),H}function P(S,O){const{currentType:B}=O;if(B!==10)return!1;const H=()=>{const ae=S.currentPeek();return ae==="{"?h(S.peek()):ae==="@"||ae==="%"||ae==="|"||ae===":"||ae==="."||ae===hr||!ae?!1:ae===Ut?(S.peek(),H()):h(ae)},Q=H();return S.resetPeek(),Q}function k(S){d(S);const O=S.currentPeek()==="|";return S.resetPeek(),O}function L(S){const O=d(S),B=S.currentPeek()==="%"&&S.peek()==="{";return S.resetPeek(),{isModulo:B,hasSpace:O.length>0}}function F(S,O=!0){const B=(Q=!1,ae="",ie=!1)=>{const re=S.currentPeek();return re==="{"?ae==="%"?!1:Q:re==="@"||!re?ae==="%"?!0:Q:re==="%"?(S.peek(),B(Q,"%",!0)):re==="|"?ae==="%"||ie?!0:!(ae===hr||ae===Ut):re===hr?(S.peek(),B(!0,hr,ie)):re===Ut?(S.peek(),B(!0,Ut,ie)):!0},H=B();return O&&S.resetPeek(),H}function j(S,O){const B=S.currentChar();return B===Nr?Nr:O(B)?(S.next(),B):null}function z(S){return j(S,B=>{const H=B.charCodeAt(0);return H>=97&&H<=122||H>=65&&H<=90||H>=48&&H<=57||H===95||H===36})}function $(S){return j(S,B=>{const H=B.charCodeAt(0);return H>=48&&H<=57})}function M(S){return j(S,B=>{const H=B.charCodeAt(0);return H>=48&&H<=57||H>=65&&H<=70||H>=97&&H<=102})}function A(S){let O="",B="";for(;O=$(S);)B+=O;return B}function N(S){m(S);const O=S.currentChar();return O!=="%"&&v(Ue.EXPECTED_TOKEN,i(),0,O),S.next(),"%"}function D(S){let O="";for(;;){const B=S.currentChar();if(B==="{"||B==="}"||B==="@"||B==="|"||!B)break;if(B==="%")if(F(S))O+=B,S.next();else break;else if(B===hr||B===Ut)if(F(S))O+=B,S.next();else{if(k(S))break;O+=B,S.next()}else O+=B,S.next()}return O}function q(S){m(S);let O="",B="";for(;O=z(S);)B+=O;return S.currentChar()===Nr&&v(Ue.UNTERMINATED_CLOSING_BRACE,i(),0),B}function ee(S){m(S);let O="";return S.currentChar()==="-"?(S.next(),O+=`-${A(S)}`):O+=A(S),S.currentChar()===Nr&&v(Ue.UNTERMINATED_CLOSING_BRACE,i(),0),O}function Z(S){m(S),c(S,"'");let O="",B="";const H=ae=>ae!==Wg&&ae!==Ut;for(;O=j(S,H);)O==="\\"?B+=Y(S):B+=O;const Q=S.currentChar();return Q===Ut||Q===Nr?(v(Ue.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,i(),0),Q===Ut&&(S.next(),c(S,"'")),B):(c(S,"'"),B)}function Y(S){const O=S.currentChar();switch(O){case"\\":case"'":return S.next(),`\\${O}`;case"u":return G(S,O,4);case"U":return G(S,O,6);default:return v(Ue.UNKNOWN_ESCAPE_SEQUENCE,i(),0,O),""}}function G(S,O,B){c(S,O);let H="";for(let Q=0;QQ!=="{"&&Q!=="}"&&Q!==hr&&Q!==Ut;for(;O=j(S,H);)B+=O;return B}function oe(S){let O="",B="";for(;O=z(S);)B+=O;return B}function de(S){const O=(B=!1,H)=>{const Q=S.currentChar();return Q==="{"||Q==="%"||Q==="@"||Q==="|"||!Q||Q===hr?H:Q===Ut?(H+=Q,S.next(),O(B,H)):(H+=Q,S.next(),O(!0,H))};return O(!1,"")}function me(S){m(S);const O=c(S,"|");return m(S),O}function ve(S,O){let B=null;switch(S.currentChar()){case"{":return O.braceNest>=1&&v(Ue.NOT_ALLOW_NEST_PLACEHOLDER,i(),0),S.next(),B=p(O,2,"{"),m(S),O.braceNest++,B;case"}":return O.braceNest>0&&O.currentType===2&&v(Ue.EMPTY_PLACEHOLDER,i(),0),S.next(),B=p(O,3,"}"),O.braceNest--,O.braceNest>0&&m(S),O.inLinked&&O.braceNest===0&&(O.inLinked=!1),B;case"@":return O.braceNest>0&&v(Ue.UNTERMINATED_CLOSING_BRACE,i(),0),B=he(S,O)||g(O),O.braceNest=0,B;default:let Q=!0,ae=!0,ie=!0;if(k(S))return O.braceNest>0&&v(Ue.UNTERMINATED_CLOSING_BRACE,i(),0),B=p(O,1,me(S)),O.braceNest=0,O.inLinked=!1,B;if(O.braceNest>0&&(O.currentType===5||O.currentType===6||O.currentType===7))return v(Ue.UNTERMINATED_CLOSING_BRACE,i(),0),O.braceNest=0,ye(S,O);if(Q=b(S,O))return B=p(O,5,q(S)),m(S),B;if(ae=w(S,O))return B=p(O,6,ee(S)),m(S),B;if(ie=C(S,O))return B=p(O,7,Z(S)),m(S),B;if(!Q&&!ae&&!ie)return B=p(O,13,ne(S)),v(Ue.INVALID_TOKEN_IN_PLACEHOLDER,i(),0,B.value),m(S),B;break}return B}function he(S,O){const{currentType:B}=O;let H=null;const Q=S.currentChar();switch((B===8||B===9||B===12||B===10)&&(Q===Ut||Q===hr)&&v(Ue.INVALID_LINKED_FORMAT,i(),0),Q){case"@":return S.next(),H=p(O,8,"@"),O.inLinked=!0,H;case".":return m(S),S.next(),p(O,9,".");case":":return m(S),S.next(),p(O,10,":");default:return k(S)?(H=p(O,1,me(S)),O.braceNest=0,O.inLinked=!1,H):_(S,O)||I(S,O)?(m(S),he(S,O)):E(S,O)?(m(S),p(O,12,oe(S))):P(S,O)?(m(S),Q==="{"?ve(S,O)||H:p(O,11,de(S))):(B===8&&v(Ue.INVALID_LINKED_FORMAT,i(),0),O.braceNest=0,O.inLinked=!1,ye(S,O))}}function ye(S,O){let B={type:14};if(O.braceNest>0)return ve(S,O)||g(O);if(O.inLinked)return he(S,O)||g(O);switch(S.currentChar()){case"{":return ve(S,O)||g(O);case"}":return v(Ue.UNBALANCED_CLOSING_BRACE,i(),0),S.next(),p(O,3,"}");case"@":return he(S,O)||g(O);default:if(k(S))return B=p(O,1,me(S)),O.braceNest=0,O.inLinked=!1,B;const{isModulo:Q,hasSpace:ae}=L(S);if(Q)return ae?p(O,0,D(S)):p(O,4,N(S));if(F(S))return p(O,0,D(S));break}return B}function R(){const{currentType:S,offset:O,startLoc:B,endLoc:H}=s;return s.lastType=S,s.lastOffset=O,s.lastStartLoc=B,s.lastEndLoc=H,s.offset=a(),s.startLoc=i(),r.currentChar()===Nr?p(s,14):ye(r,s)}return{nextToken:R,currentOffset:a,currentPosition:i,context:u}}const Y6="parser",X6=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function J6(t,e,n){switch(t){case"\\\\":return"\\";case"\\'":return"'";default:{const r=parseInt(e||n,16);return r<=55295||r>=57344?String.fromCodePoint(r):"�"}}}function Q6(t={}){const e=t.location!==!1,{onError:n}=t;function r(h,y,b,w,...C){const _=h.currentPosition();if(_.offset+=w,_.column+=w,n){const E=af(b,_),I=ru(y,E,{domain:Y6,args:C});n(I)}}function a(h,y,b){const w={type:h,start:y,end:y};return e&&(w.loc={start:b,end:b}),w}function i(h,y,b,w){h.end=y,w&&(h.type=w),e&&h.loc&&(h.loc.end=b)}function o(h,y){const b=h.context(),w=a(3,b.offset,b.startLoc);return w.value=y,i(w,h.currentOffset(),h.currentPosition()),w}function l(h,y){const b=h.context(),{lastOffset:w,lastStartLoc:C}=b,_=a(5,w,C);return _.index=parseInt(y,10),h.nextToken(),i(_,h.currentOffset(),h.currentPosition()),_}function s(h,y){const b=h.context(),{lastOffset:w,lastStartLoc:C}=b,_=a(4,w,C);return _.key=y,h.nextToken(),i(_,h.currentOffset(),h.currentPosition()),_}function u(h,y){const b=h.context(),{lastOffset:w,lastStartLoc:C}=b,_=a(9,w,C);return _.value=y.replace(X6,J6),h.nextToken(),i(_,h.currentOffset(),h.currentPosition()),_}function f(h){const y=h.nextToken(),b=h.context(),{lastOffset:w,lastStartLoc:C}=b,_=a(8,w,C);return y.type!==12?(r(h,Ue.UNEXPECTED_EMPTY_LINKED_MODIFIER,b.lastStartLoc,0),_.value="",i(_,w,C),{nextConsumeToken:y,node:_}):(y.value==null&&r(h,Ue.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Kn(y)),_.value=y.value||"",i(_,h.currentOffset(),h.currentPosition()),{node:_})}function v(h,y){const b=h.context(),w=a(7,b.offset,b.startLoc);return w.value=y,i(w,h.currentOffset(),h.currentPosition()),w}function p(h){const y=h.context(),b=a(6,y.offset,y.startLoc);let w=h.nextToken();if(w.type===9){const C=f(h);b.modifier=C.node,w=C.nextConsumeToken||h.nextToken()}switch(w.type!==10&&r(h,Ue.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,Kn(w)),w=h.nextToken(),w.type===2&&(w=h.nextToken()),w.type){case 11:w.value==null&&r(h,Ue.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,Kn(w)),b.key=v(h,w.value||"");break;case 5:w.value==null&&r(h,Ue.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,Kn(w)),b.key=s(h,w.value||"");break;case 6:w.value==null&&r(h,Ue.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,Kn(w)),b.key=l(h,w.value||"");break;case 7:w.value==null&&r(h,Ue.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,Kn(w)),b.key=u(h,w.value||"");break;default:r(h,Ue.UNEXPECTED_EMPTY_LINKED_KEY,y.lastStartLoc,0);const C=h.context(),_=a(7,C.offset,C.startLoc);return _.value="",i(_,C.offset,C.startLoc),b.key=_,i(b,C.offset,C.startLoc),{nextConsumeToken:w,node:b}}return i(b,h.currentOffset(),h.currentPosition()),{node:b}}function g(h){const y=h.context(),b=y.currentType===1?h.currentOffset():y.offset,w=y.currentType===1?y.endLoc:y.startLoc,C=a(2,b,w);C.items=[];let _=null;do{const P=_||h.nextToken();switch(_=null,P.type){case 0:P.value==null&&r(h,Ue.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,Kn(P)),C.items.push(o(h,P.value||""));break;case 6:P.value==null&&r(h,Ue.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,Kn(P)),C.items.push(l(h,P.value||""));break;case 5:P.value==null&&r(h,Ue.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,Kn(P)),C.items.push(s(h,P.value||""));break;case 7:P.value==null&&r(h,Ue.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,Kn(P)),C.items.push(u(h,P.value||""));break;case 8:const k=p(h);C.items.push(k.node),_=k.nextConsumeToken||null;break}}while(y.currentType!==14&&y.currentType!==1);const E=y.currentType===1?y.lastOffset:h.currentOffset(),I=y.currentType===1?y.lastEndLoc:h.currentPosition();return i(C,E,I),C}function c(h,y,b,w){const C=h.context();let _=w.items.length===0;const E=a(1,y,b);E.cases=[],E.cases.push(w);do{const I=g(h);_||(_=I.items.length===0),E.cases.push(I)}while(C.currentType!==14);return _&&r(h,Ue.MUST_HAVE_MESSAGES_IN_PLURAL,b,0),i(E,h.currentOffset(),h.currentPosition()),E}function d(h){const y=h.context(),{offset:b,startLoc:w}=y,C=g(h);return y.currentType===14?C:c(h,b,w,C)}function m(h){const y=q6(h,$t({},t)),b=y.context(),w=a(0,b.offset,b.startLoc);return e&&w.loc&&(w.loc.source=h),w.body=d(y),b.currentType!==14&&r(y,Ue.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,h[b.offset]||""),i(w,y.currentOffset(),y.currentPosition()),w}return{parse:m}}function Kn(t){if(t.type===14)return"EOF";const e=(t.value||"").replace(/\r?\n/gu,"\\n");return e.length>10?e.slice(0,9)+"…":e}function Z6(t,e={}){const n={ast:t,helpers:new Set};return{context:()=>n,helper:i=>(n.helpers.add(i),i)}}function Vg(t,e){for(let n=0;n
If that doesn't work, click on FAQ for help
If that doesn't work, click on FAQ for help