diff --git a/doc/lucky1.png b/doc/lucky1.png deleted file mode 100644 index a5b41b6e..00000000 Binary files a/doc/lucky1.png and /dev/null differ diff --git a/doc/lucky2.png b/doc/lucky2.png deleted file mode 100644 index ba4c026f..00000000 Binary files a/doc/lucky2.png and /dev/null differ diff --git a/doc/lucky3.png b/doc/lucky3.png deleted file mode 100644 index 6fa7982f..00000000 Binary files a/doc/lucky3.png and /dev/null differ diff --git a/doc/taskplan1.png b/doc/taskplan1.png new file mode 100644 index 00000000..1f8db7be Binary files /dev/null and b/doc/taskplan1.png differ diff --git a/doc/taskplan2.png b/doc/taskplan2.png new file mode 100644 index 00000000..edb45d6d Binary files /dev/null and b/doc/taskplan2.png differ diff --git a/doc/taskplan3.png b/doc/taskplan3.png new file mode 100644 index 00000000..d4794702 Binary files /dev/null and b/doc/taskplan3.png differ diff --git a/doc/view.png b/doc/view.png new file mode 100644 index 00000000..169e112f Binary files /dev/null and b/doc/view.png differ diff --git a/doc/view2.png b/doc/view2.png new file mode 100644 index 00000000..9058c632 Binary files /dev/null and b/doc/view2.png differ diff --git a/luci-app-chatgpt-web/.github/workflows/main.yml b/luci-app-chatgpt-web/.github/workflows/main.yml deleted file mode 100644 index 3de4bc6d..00000000 --- a/luci-app-chatgpt-web/.github/workflows/main.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: Build - -on: - push: - tags: - - v* - -jobs: - build: - name: Build ${{ matrix.arch }} - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - arch: - - - aarch64_generic - - i386_pentium-mmx - - loongarch64_generic - - mips_mips32 - - mipsel_24kc - - mipsel_mips32 - - x86_64 - - steps: - - uses: actions/checkout@main - with: - fetch-depth: 0 - - name: Building packages - uses: sbwml/openwrt-gh-action-sdk@go1.24 - env: - ARCH: ${{ matrix.arch }}-openwrt-24.10 - FEEDNAME: packages_ci - PACKAGES: luci-app-chatgpt-web - NO_REFRESH_CHECK: true - - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: ${{ matrix.arch }} - path: bin/packages/${{ matrix.arch }}/packages_ci/*.ipk - - - name: Upload packages - uses: ncipollo/release-action@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - allowUpdates: true - replacesArtifacts: true - artifacts: "bin/packages/${{ matrix.arch }}/packages_ci/*.ipk" diff --git a/luci-app-chatgpt-web/Makefile b/luci-app-chatgpt-web/Makefile deleted file mode 100644 index b5cae97b..00000000 --- a/luci-app-chatgpt-web/Makefile +++ /dev/null @@ -1,22 +0,0 @@ -# SPDX-License-Identifier: GPL-3.0-only -# -# Copyright (C) 2023-2025 sirpdboy https://github.com/sirpdboy/luci-app-chatgpt-web -# -# This is free software, licensed under the Apache License, Version 2.0 . -# -include $(TOPDIR)/rules.mk - -NAME:=chatgpt-web -PKG_NAME:=luci-app-$(NAME) -PKG_VERSION:=1.2.1 -PKG_RELEASE:=16 - -LUCI_TITLE:=LuCI Support for chatgpt-web Client -LUCI_PKGARCH:=all - -define Package/$(PKG_NAME)/conffiles -/etc/config/chatgpt-web -endef -include $(TOPDIR)/feeds/luci/luci.mk - -# call BuildPackage - OpenWrt buildroot signature diff --git a/luci-app-chatgpt-web/README.md b/luci-app-chatgpt-web/README.md deleted file mode 100644 index ab5de559..00000000 --- a/luci-app-chatgpt-web/README.md +++ /dev/null @@ -1,179 +0,0 @@ -## 访问数:![hello](https://views.whatilearened.today/views/github/sirpdboy/deplives.svg)[![](https://img.shields.io/badge/TG群-点击加入-FFFFFF.svg)](https://t.me/joinchat/AAAAAEpRF88NfOK5vBXGBQ) - - - -

-
luci-app-chatgpt-web
-

- -

-OpenWrt -Chrome -Safari -Firefox - GitHub release -Downloads -

- - -![screenshots](https://raw.githubusercontent.com/sirpdboy/openwrt/master/doc/说明1.jpg) - -请 **认真阅读完毕** 本页面,本页面包含注意事项和如何使用。 - -## 功能说明 - -luci-app-chatgpt Pure ChatGPT by OPENWRT based on OpenAI API - -luci-app-chatgpt 在OPENWRT上实现ChatGPT项目,基于OpenAI API - - - -- [luci-app-chatgpt](#功能说明) - - [特性](#特性) - - [编译方法](#编译方法) - - [使用方法](#使用方法) - - [自定义选项](#自定义选项)。 - - [说明](#说明) - - [界面](#界面) - - [捐助](#捐助) - - - -## 特性 - -- 无须第三依赖,直接使用官方API接口。 -- 支持复制/更新/刷新会话,语音输入,朗读等功能,以及众多[自定义选项](#自定义选项)。 -- 支持搜索会话,导入导出会话和设置,自定义头像,自定义系统角色等。 - -参考项目: -[markdown-it](https://github.com/markdown-it/markdown-it), -[highlight.js](https://github.com/highlightjs/highlight.js), -[github-markdown-css](https://github.com/sindresorhus/github-markdown-css), -[chatgpt-html](https://github.com/slippersheepig/chatgpt-html), -[markdown-it-copy](https://github.com/ReAlign/markdown-it-copy), -[markdown-it-texmath](https://github.com/goessner/markdown-it-texmath), -[awesome-chatgpt-prompts-zh](https://github.com/PlexPt/awesome-chatgpt-prompts-zh) - - -## 编译方法 - -- 将luci-app-chatgpt添加至 LEDE/OpenWRT 源码的方法。 - -### 下载源码方法: - - ```Brach - - # 下载源码 - - git clone https://github.com/sirpdboy/chatgpt-web.git package/luci-app-chatgpt - make menuconfig - - ``` -### 配置菜单 - - ```Brach - make menuconfig - # 找到 LuCI -> Applications, 选择 luci-app-chatgpt, 保存后退出。 - ``` - -### 编译 - - ```Brach - # 编译固件 - make package/luci-app-chatgpt/compile V=s - ``` - -## 使用方法 - - - 打开luci-app-chatgpt基本设置,填写API密钥、GPT模型、填写OpenAI接口、选择用户图像等。 - - - 可选GPT模型,默认gpt-3.5,当前使用gpt-4模型需通过openai的表单申请。 - - - OpenAI接口当本地可正常访问`api.openai.com`,填写`https://api.openai.com/` - - - 不可正常访问`api.openai.com`,填写其反代地址,注意:反代接口响应需添加跨域Header `Access-Control-Allow-Origin` - - - chatgpt-web页面就可以正常使用了,如果需要设置更多请看 自定义设置设置语音和系统角色等。 - -## 自定义选项 - -- 左边栏支持,清除对话,搜索会话,新建/重命名/删除(会话/文件夹)导出/导入/重置会话和设置数据,显示本地存储。 - -- 可选系统角色,默认不开启,有四个预设角色,后期会加入更多角色。 - -- 可选角色性格,默认灵活创新,对应接口文档的top_p参数。 - -- 可选回答质量,默认平衡,对应接口文档的temperature参数。 - -- 修改打字机速度,默认较快,值越大速度越快。 - -- 允许连续对话,默认开启,对话中包含上下文信息,会导致api费用增加。 - -- 允许长回复,默认关闭,**开启后可能导致api费用增加,并丢失大部分上下文,对于一些要发送`继续`才完整的回复,不用发`继续`了。** - -- 选择语音,默认Bing语音,支持Azure语音和系统语音,可分开设置提问语音和回答语音。 - -- 音量,默认最大。 - -- 语速,默认正常。 - -- 音调,默认正常。 - -- 允许连续朗读,默认开启,连续郎读到所有对话结束。 - -- 允许自动朗读,默认关闭,自动朗读新的回答。**(iOS需打开设置-自动播放视频预览,Mac上Safari需打开此网站的设置-允许全部自动播放)** - -- 支持语音输入,默认识别为普通话,可长按语音按钮修改识别选项。**语音识别必需条件:使用chrome内核系浏览器 + https网页或本地网页。** 如点击语音按钮没反应,可能是未授予麦克风权限或者没安装麦克风设备。 - - -## 说明 - --源码来源:https://github.com/sirpdboy/chatgpt-web --你可以随意使用其中的源码,但请注明出处。 - -![screenshots](https://raw.githubusercontent.com/sirpdboy/openwrt/master/doc/说明2.jpg) - -## 界面 - -![screenshots](./doc/chatgpt1.png) - -![screenshots](./doc/chatgpt2.png) - -![screenshots](./doc/chatgpt3.png) - - -## 使用与授权相关说明 - -- 本人开源的所有源码,任何引用需注明本处出处,如需修改二次发布必告之本人,未经许可不得做于任何商用用途。 - -# My other project - -- 路由安全看门狗 :https://github.com/sirpdboy/luci-app-watchdog -- 网络速度测试 :https://github.com/sirpdboy/luci-app-netspeedtest -- 计划任务插件(原定时设置) : https://github.com/sirpdboy/luci-app-taskplan -- 关机功能插件 : https://github.com/sirpdboy/luci-app-poweroffdevice -- opentopd主题 : https://github.com/sirpdboy/luci-theme-opentopd -- kucat酷猫主题: https://github.com/sirpdboy/luci-theme-kucat -- kucat酷猫主题设置工具: https://github.com/sirpdboy/luci-app-kucat-config -- NFT版上网时间控制插件: https://github.com/sirpdboy/luci-app-timecontrol -- 家长控制: https://github.com/sirpdboy/luci-theme-parentcontrol -- 定时限速: https://github.com/sirpdboy/luci-app-eqosplus -- 系统高级设置 : https://github.com/sirpdboy/luci-app-advanced -- ddns-go动态域名: https://github.com/sirpdboy/luci-app-ddns-go -- 进阶设置(系统高级设置+主题设置kucat/agron/opentopd): https://github.com/sirpdboy/luci-app-advancedplus -- 网络设置向导: https://github.com/sirpdboy/luci-app-netwizard -- 一键分区扩容: https://github.com/sirpdboy/luci-app-partexp -- lukcy大吉: https://github.com/sirpdboy/luci-app-lukcy - -## 捐助 - -![screenshots](https://raw.githubusercontent.com/sirpdboy/openwrt/master/doc/说明3.jpg) - -| 图飞了😂 | 图飞了😂 | -| :-----------------: | :-------------: | -|![xm1](https://raw.githubusercontent.com/sirpdboy/openwrt/master/doc/支付宝.png) | ![xm1](https://raw.githubusercontent.com/sirpdboy/openwrt/master/doc/微信.png) | - - - 图飞了😂 - - diff --git a/luci-app-chatgpt-web/doc/chatgpt1.png b/luci-app-chatgpt-web/doc/chatgpt1.png deleted file mode 100644 index f715b006..00000000 Binary files a/luci-app-chatgpt-web/doc/chatgpt1.png and /dev/null differ diff --git a/luci-app-chatgpt-web/doc/chatgpt2.png b/luci-app-chatgpt-web/doc/chatgpt2.png deleted file mode 100644 index 7de824a2..00000000 Binary files a/luci-app-chatgpt-web/doc/chatgpt2.png and /dev/null differ diff --git a/luci-app-chatgpt-web/doc/chatgpt3.png b/luci-app-chatgpt-web/doc/chatgpt3.png deleted file mode 100644 index 9d280941..00000000 Binary files a/luci-app-chatgpt-web/doc/chatgpt3.png and /dev/null differ diff --git a/luci-app-chatgpt-web/luasrc/controller/chatgpt-web.lua b/luci-app-chatgpt-web/luasrc/controller/chatgpt-web.lua deleted file mode 100644 index c100132c..00000000 --- a/luci-app-chatgpt-web/luasrc/controller/chatgpt-web.lua +++ /dev/null @@ -1,17 +0,0 @@ --- Copyright (C) 2023-2025 sirpdboy https://github.com/sirpdboy/luci-app-chatgpt-web --- Licensed to the public under the Apache License 2.0. - -module("luci.controller.chatgpt-web", package.seeall) - -function index() - if not nixio.fs.access("/etc/config/chatgpt-web") then - return - end - - local e = entry({"admin", "services", "chatgpt-web"}, alias("admin", "services", "chatgpt-web", "setting"),_("Chatgpt Web"), 20) - e.dependent=false - e.acl_depends = { "luci-app-chatgpt-web" } - entry({"admin", "services", "chatgpt-web", "setting"}, cbi("chatgpt-web"), _("Base Setting"), 10).leaf=true - entry({"admin", "services", "chatgpt-web", "chatgpt-web"}, cbi("chatgpt",{hideapplybtn=true, hidesavebtn=true, hideresetbtn=true}), _("Chatgpt Web"), 30).leaf=true -end - diff --git a/luci-app-chatgpt-web/luasrc/model/cbi/chatgpt-web.lua b/luci-app-chatgpt-web/luasrc/model/cbi/chatgpt-web.lua deleted file mode 100644 index 38f5e7da..00000000 --- a/luci-app-chatgpt-web/luasrc/model/cbi/chatgpt-web.lua +++ /dev/null @@ -1,36 +0,0 @@ --- Copyright (C) 2023-2025 sirpdboy https://github.com/sirpdboy/https://github.com/sirpdboy/luci-app-chatgpt-web - -local m, s ,o - -m = Map("chatgpt-web") -m.title = translate("Chatgpt Web") -m.description = translate("ChatGPT-Web is the version used on OPENWRT of OPENAI")..translate("
For specific usage, see:")..translate("GitHub @sirpdboy/chatgpt-web\ ") - -s = m:section(TypedSection, "basic", translate("Base Setting")) -s.addremove = false -s.anonymous = true - - -o = s:option(Value,"userpic",translate("Character images")) -o:value("girl.jpg",translate("girl")) -o:value("girl2.jpg",translate("girl2")) -o:value("girl3.jpg",translate("girl3")) -o:value("boy.jpg",translate("boy")) -o:value("boy2.jpg",translate("boy2")) -o:value("boy3.jpg",translate("boy3")) -o:value("dog.jpg",translate("dog")) -o:value("cartoon.jpg",translate("cartoon")) -o:value("cartoonboy.jpg",translate("cartoonboy")) -o:value("cartoonboy2.jpg",translate("cartoonboy2")) -o:value("cartoongirl.jpg",translate("cartoongirl")) -o:value("cartoongirl2.jpg",translate("cartoongirl2")) -o.rmempty = true -o.default="girl.jpg" - - -o=s:option(TextValue, "systemrole" ,translate("Default Role Settings")) -o.rows = 5 -o.rmempty=false - - -return m diff --git a/luci-app-chatgpt-web/luasrc/model/cbi/chatgpt.lua b/luci-app-chatgpt-web/luasrc/model/cbi/chatgpt.lua deleted file mode 100644 index 162de6d0..00000000 --- a/luci-app-chatgpt-web/luasrc/model/cbi/chatgpt.lua +++ /dev/null @@ -1,9 +0,0 @@ --- Copyright (C) 2023-2025 sirpdboy https://github.com/sirpdboy/luci-app-chatgpt-web -require("luci.util") -local m, s - -m = Map("chatgpt-web",translate("")) - -m:section(SimpleSection).template = "chatgpt-web" - -return m diff --git a/luci-app-chatgpt-web/luasrc/view/chatgpt-web.htm b/luci-app-chatgpt-web/luasrc/view/chatgpt-web.htm deleted file mode 100644 index 078e5ac7..00000000 --- a/luci-app-chatgpt-web/luasrc/view/chatgpt-web.htm +++ /dev/null @@ -1,6845 +0,0 @@ -<%# - Copyright 2023-2025 sirpdboy Wich https://github.com/sirpdboy/luci-app-chatgpt-web - Licensed to the public under the Apache License 2.0. --%> -<% -local fs = require "nixio.fs" -local dsp = require "luci.dispatcher" -local uci = luci.model.uci.cursor() -local apikeys = uci:get_first('chatgpt-web', 'basic', 'apikey') -local userpic = "/luci-static/chatgpt-web/user/" .. uci:get_first('chatgpt-web', 'basic', 'userpic') -local sysrole = uci:get_first('chatgpt-web', 'basic', 'systemrole') - --%> - -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
ChatGPT
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
- - 4o - - -
-
-
- - -
- - -
-
-
-
- -
-
-
-
- - -
- - -
-
-
-
-
-
- - - -
-
-
-
-
- - - -
-
- - - -
-
-
-
-
-
ChatGPT
-
DeepSeek
-
Azure
-
Gemini
-
Claude
-
-
- -
-
-
-
ChatGPT
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- - - - -
- - - -
-
-
-
- - - - - - - - - - - - - - - - -
\ No newline at end of file diff --git a/luci-app-chatgpt-web/po/zh-cn/chatgpt-web.po b/luci-app-chatgpt-web/po/zh-cn/chatgpt-web.po deleted file mode 100644 index 91654dbd..00000000 --- a/luci-app-chatgpt-web/po/zh-cn/chatgpt-web.po +++ /dev/null @@ -1,71 +0,0 @@ -msgid "" -msgstr "Content-Type: text/plain; charset=UTF-8" - -msgid "chatgpt-web" -msgstr "ChatGPT-Web" - -msgid "ChatGPT-Web is the version used on OPENWRT of OPENAI" -msgstr "ChatGPT-Web是OPENAI的OPENWRT上使用的WEB版本,不需要第三方依赖,绿色安全直接使用OPENAI的API接口" - -msgid "Base Setting" -msgstr "基本设置" - -msgid "GPT Model" -msgstr "GPT模型" - -msgid "Character images" -msgstr "人物图像" - -msgid "boy" -msgstr "男生" - -msgid "boy2" -msgstr "男生2" - -msgid "boy3" -msgstr "男生3" - -msgid "girl" -msgstr "女生" - -msgid "girl2" -msgstr "女生2" - -msgid "girl3" -msgstr "女生3" - -msgid "dog" -msgstr "狗" - -msgid "cartoon" -msgstr "卡通图像" - -msgid "cartoonboy" -msgstr "卡通男孩" - -msgid "cartoonboy2" -msgstr "卡通小男孩" - -msgid "cartoongirl" -msgstr "卡通女生" - -msgid "cartoongirl2" -msgstr "卡通女生2" - -msgid "OpenAI interface" -msgstr "OpenAI接口" - -msgid "API Key" -msgstr "API密钥" - -msgid "Enter your own API key, and if you do not have one, enter the official website API to generate it:" -msgstr "输入自己的API密钥(sk-开头),没有的进官网API生成:" - -msgid "Click to open" -msgstr "点击前往" - -msgid "Default Role Settings" -msgstr "默认角色设置" - -msgid "
For specific usage, see:" -msgstr "
具体使用方法参见:" diff --git a/luci-app-chatgpt-web/po/zh_Hans/chatgpt-web.po b/luci-app-chatgpt-web/po/zh_Hans/chatgpt-web.po deleted file mode 100644 index 91654dbd..00000000 --- a/luci-app-chatgpt-web/po/zh_Hans/chatgpt-web.po +++ /dev/null @@ -1,71 +0,0 @@ -msgid "" -msgstr "Content-Type: text/plain; charset=UTF-8" - -msgid "chatgpt-web" -msgstr "ChatGPT-Web" - -msgid "ChatGPT-Web is the version used on OPENWRT of OPENAI" -msgstr "ChatGPT-Web是OPENAI的OPENWRT上使用的WEB版本,不需要第三方依赖,绿色安全直接使用OPENAI的API接口" - -msgid "Base Setting" -msgstr "基本设置" - -msgid "GPT Model" -msgstr "GPT模型" - -msgid "Character images" -msgstr "人物图像" - -msgid "boy" -msgstr "男生" - -msgid "boy2" -msgstr "男生2" - -msgid "boy3" -msgstr "男生3" - -msgid "girl" -msgstr "女生" - -msgid "girl2" -msgstr "女生2" - -msgid "girl3" -msgstr "女生3" - -msgid "dog" -msgstr "狗" - -msgid "cartoon" -msgstr "卡通图像" - -msgid "cartoonboy" -msgstr "卡通男孩" - -msgid "cartoonboy2" -msgstr "卡通小男孩" - -msgid "cartoongirl" -msgstr "卡通女生" - -msgid "cartoongirl2" -msgstr "卡通女生2" - -msgid "OpenAI interface" -msgstr "OpenAI接口" - -msgid "API Key" -msgstr "API密钥" - -msgid "Enter your own API key, and if you do not have one, enter the official website API to generate it:" -msgstr "输入自己的API密钥(sk-开头),没有的进官网API生成:" - -msgid "Click to open" -msgstr "点击前往" - -msgid "Default Role Settings" -msgstr "默认角色设置" - -msgid "
For specific usage, see:" -msgstr "
具体使用方法参见:" diff --git a/luci-app-chatgpt-web/root/etc/config/chatgpt-web b/luci-app-chatgpt-web/root/etc/config/chatgpt-web deleted file mode 100644 index a7a1636a..00000000 --- a/luci-app-chatgpt-web/root/etc/config/chatgpt-web +++ /dev/null @@ -1,8 +0,0 @@ - -config basic - option apiHost 'https://api.openai.com/' - option modelver 'gpt-3.5-turbo' - option userpic 'girl.jpg' - option apikey '' - option systemrole '你是一个乐于助人的专业助手,尽量简明扼要地回答' - diff --git a/luci-app-chatgpt-web/root/usr/share/rpcd/acl.d/luci-app-chatgpt-web.json b/luci-app-chatgpt-web/root/usr/share/rpcd/acl.d/luci-app-chatgpt-web.json deleted file mode 100644 index c8c06f50..00000000 --- a/luci-app-chatgpt-web/root/usr/share/rpcd/acl.d/luci-app-chatgpt-web.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "luci-app-chatgpt-web": { - "description": "Grant UCI access for luci-app-chatgpt-web", - "read": { - "uci": [ "chatgpt-web" ] - }, - "write": { - "uci": [ "chatgpt-web" ] - } - } -} diff --git a/luci-app-chatgpt-web/root/www/luci-static/chatgpt-web/11.11.1github.min.css b/luci-app-chatgpt-web/root/www/luci-static/chatgpt-web/11.11.1github.min.css deleted file mode 100644 index 275239a7..00000000 --- a/luci-app-chatgpt-web/root/www/luci-static/chatgpt-web/11.11.1github.min.css +++ /dev/null @@ -1,10 +0,0 @@ -pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*! - Theme: GitHub - Description: Light theme as seen on github.com - Author: github.com - Maintainer: @Hirse - Updated: 2021-05-15 - - Outdated base version: https://github.com/primer/github-syntax-light - Current colors taken from GitHub's CSS -*/.hljs{color:#24292e;background:#fff}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#d73a49}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#6f42c1}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id,.hljs-variable{color:#005cc5}.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#032f62}.hljs-built_in,.hljs-symbol{color:#e36209}.hljs-code,.hljs-comment,.hljs-formula{color:#6a737d}.hljs-name,.hljs-quote,.hljs-selector-pseudo,.hljs-selector-tag{color:#22863a}.hljs-subst{color:#24292e}.hljs-section{color:#005cc5;font-weight:700}.hljs-bullet{color:#735c0f}.hljs-emphasis{color:#24292e;font-style:italic}.hljs-strong{color:#24292e;font-weight:700}.hljs-addition{color:#22863a;background-color:#f0fff4}.hljs-deletion{color:#b31d28;background-color:#ffeef0} \ No newline at end of file diff --git a/luci-app-chatgpt-web/root/www/luci-static/chatgpt-web/chatgpt-web.css b/luci-app-chatgpt-web/root/www/luci-static/chatgpt-web/chatgpt-web.css deleted file mode 100644 index 7a24e376..00000000 --- a/luci-app-chatgpt-web/root/www/luci-static/chatgpt-web/chatgpt-web.css +++ /dev/null @@ -1,2166 +0,0 @@ - - .chat_window { - display: flex; - width: 100%; - max-width: 1920px; - height: 888px; - border-radius: 8px; - background-color: rgba(255,255,255,0.5); - overflow: auto; - } - - .chat_window>.overlay { - width: 100%; - height: 100%; - position: absolute; - left: 0; - top: 0; - background-color: rgba(0, 0, 0, .3); - z-index: 90; - opacity: 0; - visibility: hidden; - cursor: pointer; - transition: all 120ms ease-in-out; - } - - .chat_window .mainContent .cbi-input-invalid { - color: var(--title-color); - border-bottom-color: var(--title-color); - } - - - @media screen and (min-width: 800px) { - - .mainContent { - width: calc(100% - 250px); - } - - .chat_window>.nav { - position: relative; - margin-left: -250px; - transition: margin-left 250ms; - transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); - } - - .show-nav .nav { - margin-left: 0; - } - - #sysDialog { - max-width: 600px; - } - - .sysContent { - display: flex; - } - - .sysSwitch { - flex-shrink: 0; - width: 160px; - } - - .sysSwitch>div { - padding-left: 6px; - } - - .sysDetail { - margin-left: 12px; - margin-top: 5px; - } - } - - @media screen and (max-width: 800px) { - - .mainContent { - width: 100%; - } - - .chat_window>.nav { - position: absolute !important; - left: -250px; - transition: left 250ms; - transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); - } - - .show-nav .nav { - left: 0; - box-shadow: rgba(0, 0, 0, 0.2) 0px 8px 10px -5px, rgba(0, 0, 0, 0.14) 0px 16px 24px 2px, rgba(0, 0, 0, 0.12) 0px 6px 30px 5px; - } - - .show-nav .overlay { - visibility: visible; - opacity: 1; - } - - #sysDialog { - max-width: 400px; - } - - .sysSwitch { - display: flex; - } - - .sysSwitch>div { - width: 50%; - justify-content: center; - } - - .sysDetail { - margin-top: 8px; - } - } - .full_window { - max-width: none; - max-height: none; - } - - .chat_window>.nav { - width: 250px; - background-color: rgba(var(--primary-rgbbody),1); - color: var(--body-color); - top: 0; - z-index: 99; - flex-shrink: 0; - display: flex; - flex-direction: column; - margin-left: -250px; - transition: left 120ms ease-in-out; - } - - .mainContent { - height: 100%; - position: relative; - width: 100%; - display: flex; - flex-direction: column; - flex: 1; - } - - .show-nav .nav { - margin-left: 0; - } - .show-nav .chatnav { - margin-left: 0; - box-shadow: rgba(0, 0, 0, 0.2) 0px 8px 10px -5px, rgba(0, 0, 0, 0.14) 0px 16px 24px 2px, rgba(0, 0, 0, 0.12) 0px 6px 30px 5px; - } - - .show-nav .overlay { - opacity: 1; - visibility: visible; - } - .top_menu { - width: 100%; - background-color: rgba(255,255,255,0.5); - height: 50px; - padding: 5px 0; - } - - .top_menu .toggler { - margin-left: 10px; - width: 40px; - height: 40px; - float: left; - padding: 5px 7px; - border-radius: 4px; - cursor: pointer; - -webkit-tap-highlight-color: transparent; - } - - .top_menu .toggler:hover { - background: #e0e0e0; - } - - .top_menu .toggler .button { - width: 26px; - height: 4px; - border-radius: 4px; - position: absolute; - pointer-events: none; - } - - .top_menu .toggler .button.close { - margin-top: 3px; - background-color: #000; - } - - .top_menu .toggler .button.minimize { - margin-top: 13px; - background-color: #000; - } - - .top_menu .toggler .button.maximize { - margin-top: 23px; - background-color: #000; - } - - .top_menu .title { - font-size: 20px; - height: 40px; - line-height: 40px; - position: relative; - pointer-events: none; - } - - #selector { - position: absolute; - top: 50%; - left: 50%; - padding: 0 4px 0 10px; - cursor: pointer; - font-size: 20px; - transform: translate(-50%, -50%); - pointer-events: auto; - border-radius: 4px; - -webkit-user-select: none; - user-select: none; - display: flex; - align-items: center; - } - - #selector:hover { - color: var(--title-color); - } - - #modelVer { - margin-left: 6px; - margin-right: 4px; - height: 40px; - line-height: 38px; - } - - .messages { - position: relative; - flex: 1; - overflow-x: hidden; - overflow-y: auto; - font-size: 16px; - width: 100%; - text-align: center; - } - - .messages::-webkit-scrollbar, - - #chatlog .markdown-body>pre::-webkit-scrollbar, - #chatlog .markdown-body>pre>code::-webkit-scrollbar, - #chatlog .responseBody pre>code::-webkit-scrollbar, - #setDialog::-webkit-scrollbar, - .allList::-webkit-scrollbar, - .sysDetail::-webkit-scrollbar, - #apiSelect::-webkit-scrollbar { - width: 10px; - height: 10px; - } - - .messages::-webkit-scrollbar-track, - - #chatlog .markdown-body>pre::-webkit-scrollbar-track, - #chatlog .markdown-body>pre>code::-webkit-scrollbar-track, - #chatlog .responseBody pre>code::-webkit-scrollbar-track, - #setDialog::-webkit-scrollbar-track, - .allList::-webkit-scrollbar-track, - .sysDetail::-webkit-scrollbar-track, - #apiSelect::-webkit-scrollbar-track { - background-clip: padding-box; - background: transparent; - border: none; - } - - .messages::-webkit-scrollbar-corner, - - #chatlog .markdown-body>pre::-webkit-scrollbar-corner, - #chatlog .markdown-body>pre>code::-webkit-scrollbar-corner, - #chatlog .responseBody pre>code::-webkit-scrollbar-corner, - #setDialog::-webkit-scrollbar-corner, - .allList::-webkit-scrollbar-corner, - .sysDetail::-webkit-scrollbar-corner, - #apiSelect::-webkit-scrollbar-corner { - background-color: transparent; - } - - .messages::-webkit-scrollbar-thumb, - - #chatlog .markdown-body>pre::-webkit-scrollbar-thumb, - #chatlog .markdown-body>pre>code::-webkit-scrollbar-thumb, - #chatlog .responseBody pre>code::-webkit-scrollbar-thumb, - #setDialog::-webkit-scrollbar-thumb, - .allList::-webkit-scrollbar-thumb, - .sysDetail::-webkit-scrollbar-thumb, - #apiSelect::-webkit-scrollbar-thumb { - background-color: rgba(0, 0, 0, 0.1); - background-clip: padding-box; - border: solid transparent; - border-radius: 10px; - } - - .messages::-webkit-scrollbar-thumb:hover, - - #chatlog .markdown-body>pre::-webkit-scrollbar-thumb:hover, - #chatlog .markdown-body>pre>code::-webkit-scrollbar-thumb:hover, - #chatlog .responseBody pre>code::-webkit-scrollbar-thumb:hover, - #setDialog::-webkit-scrollbar-thumb:hover, - .allList::-webkit-scrollbar-thumb:hover, - .sysDetail::-webkit-scrollbar-thumb:hover, - #apiSelect::-webkit-scrollbar-thumb:hover { - background-color: rgba(0, 0, 0, 0.4); - } - - #chatlog { - word-wrap: break-word; - text-align: start; - } - - #chatlog>div { - padding: 18px 40px 18px 54px; - } - .chatAvatar { - position: absolute; - width: 30px; - height: 30px; - border-radius: 2px; - } - - .request>.chatAvatar { - top: 18px; - left: 13px; - margin-top: 15px; - margin-bottom: 15px; - } - .response>.chatAvatar { - background: #10a37f; - top: 18px; - left: 13px; - margin-top: 15px; - margin-bottom: 15px; - } - - .gptAvatar>svg { - margin-top: 3px; - margin-left: 3px; - } - - .chatAvatar>img { - display: block; - width: 100%; - height: 100%; - border-radius: 2px; - } - - .modelAvatar>svg, - .chatAvatar>svg { - display: block; - margin-top: 4px; - margin-left: 4px; - } - - #chatlog .request { - position: relative; - background-color: var(--inputborder-color); - display: flex; - justify-content: center; - } - - - .response .responseBody { - display: flex; - justify-content: flex-end; - margin: 18px 45px 18px 20px; - font-size: 15px; - - } - .requestBody { - white-space: pre-wrap; - margin: 18px; - flex: 1; - } - - #chatlog .response { - background-color: var(--inputborder-color); - position: relative; - } - - .response .markdown-body { - margin: 18px 65px 18px 0px; - flex: 1; - font-size: 15px; - background-color: rgba(255,255,255,0)!important; - - } - - #chatlog .markdown-body a { - padding: 0 1px 0 2px; - } - - #chatlog .markdown-body pre { - overflow-x: auto; - padding: 10px; - position: relative; - white-space: pre-wrap; - background-color: var(--inputborder-color)!important; - - } - - #chatlog .markdown-body .mermaid { - margin-bottom: 8px; - padding: 0 10px 0 10px; - position: relative; - border-radius: 6px; - } - - .mermaid>svg { - cursor: pointer; - max-height: 600px; - display: block; - } - - #chatlog .markdown-body pre>code { - overflow-x: auto; - white-space: pre-wrap; - display: block; - } - - #chatlog .markdown-body ul { - list-style-type: disc; - } - - .m-mdic-copy-wrapper { - position: absolute; - top: 5px; - right: 16px; - -webkit-user-select: none; - user-select: none; - } - - .m-mdic-copy-wrapper span.u-mdic-copy-code_lang { - position: absolute; - top: 3px; - right: calc(100% + 4px); - font-family: system-ui; - font-size: 12px; - line-height: 18px; - color: #bbb; - } - - .m-mdic-copy-wrapper div.u-mdic-copy-notify { - position: absolute; - top: 0; - right: 0; - padding: 3px 6px; - border: 0; - border-radius: 3px; - background: none; - font-family: system-ui; - font-size: 12px; - line-height: 18px; - color: #555; - outline: none; - right: 100%; - padding-right: 4px; - } - - .m-mdic-copy-wrapper button.u-mdic-copy-btn { - position: relative; - top: 0; - right: 0; - padding: 3px 6px; - border: 0; - border-radius: 3px; - background: none; - font-family: system-ui; - font-size: 12px; - line-height: 18px; - color: #bbb; - outline: none; - cursor: pointer; - transition: color 0.2s; - } - - .m-mdic-copy-wrapper span.u-mdic-copy-code_lang::before, - .m-mdic-copy-wrapper div.u-mdic-copy-notify::before, - .m-mdic-copy-wrapper button.u-mdic-copy-btn::before { - content: attr(text); - } - - .m-mdic-copy-wrapper button.u-mdic-copy-btn:hover { - color: #555; - } - - #stopChat { - display: none; - margin: 0 auto; - margin-top: 3px; - width: 80px; - height: 32px; - text-align: center; - line-height: 32px; - color: white; - background: #f8b26a; - cursor: pointer; - border-radius: 3px; - position: sticky; - bottom: 2px; - justify-content: center; - align-items: center; - } - - #stopChat>svg { - margin-right: 8px; - } - - #stopChat:hover { - background: #f0aa60; - } - - .bottom_wrapper { - position: relative; - width: 100%; - padding: 10px 10px; - max-width: 91%; - margin: 0 auto; - } - - .bottom_wrapper .message_input_wrapper { - width: calc(100% - 134px); - position: relative; - text-align: left; - } - - .bottom_wrapper .message_input_wrapper .message_input_text { - border-radius: 4px; - border: none; - outline: none; - resize: none; - background-color: var(--inputborder-color); - height: 47px; - font-size: 16px; - max-height: 200px; - padding: 13px 0 13px 13px; - width: 100%!important; - display: block; - transition: background-color 250ms; - } - - .bottom_wrapper .message_input_wrapper .message_input_text:focus { - background-color: var(--inputborder-color); - } - - .bottom_wrapper .message_input_wrapper .message_input_text::-webkit-scrollbar { - display: none; - width: 0; - height: 0; - } - - #sendbutton { - width: 70px; - height: 47px; - font-size: 18px; - font-weight: bold; - color: #fff; - background-color: #7ac516; - padding: 0.5rem 0.5rem; - transition: all 0.2s linear; - position: absolute; - right: 65px; - bottom: 10px; - cursor: not-allowed; - } - - .activeSendBtn { - background-color: #99c959 !important; - cursor: pointer !important; - } - - .activeSendBtn:hover { - background-color: #90c050 !important; - } - - .clearConv { - position: absolute; - right: 10px; - bottom: 10px; - width: 47px; - padding: 0.5rem 0.5rem; - height: 47px; - } - - .clearConv>svg { - margin: 0 auto; - top: 50%; - left: 50%; - } - - .clearConv:hover { - background-color: var(--body-hover-bgcolor); - } - - .clearConv svg:first-child { - display: none; - } - - .clearConv svg:nth-child(2) { - display: block; - } - - .closeConv { - background: #e0e0e0;; - } - - .closeConv:hover { - background: #e8e8e8; - } - - .closeConv svg:first-child { - display: block; - } - - .closeConv svg:nth-child(2) { - display: none; - } - - .loaded>span { - display: inline-block; - } - - .loaded>svg { - display: none; - } - - .loading { - background: rgba(0,0,0,0) !important; - } - - .loading>span { - display: none; - } - - .loading>svg { - display: block; - } - - .switch-slide { - display: inline-block; - vertical-align: middle; - } - - .switch-slide-label { - display: block; - width: 38px; - height: 18px; - background: #909090; - border-radius: 30px; - cursor: pointer; - position: relative; - -webkit-transition: 0.3s ease; - transition: 0.3s ease; - } - - .switch-slide-label:after { - content: ""; - display: block; - width: 16px; - height: 16px; - border-radius: 100%; - background: #fff; - box-shadow: 0 1px 1px rgba(0, 0, 0, .1); - position: absolute; - left: 1px; - top: 1px; - -webkit-transform: translateZ(0); - transform: translateZ(0); - -webkit-transition: all 250ms; - transition: all 250ms; - } - - .switch-slide input:checked+label { - background: #99c959; - -webkit-transition: all 250ms; - transition: all 250ms; - } - - .switch-slide input:checked+label:after { - left: 21px; - } - - .settings { - padding: 0px 7px; - margin-top: -40px; - float: right; - border-radius: 4px; - cursor: pointer; - top: 5px; - } - - - .setBtn { - margin-left: 2px; - cursor: pointer; - padding: 5px; - border: none; - border-radius: 4px; - } - - .setBtn>svg { - display: block; - color: #909090; - } - - .setBtn:hover { - background: #e0e0e0;; - } - - #setting { - right: 15px; - } - - #toggleFull { - right: 56px; - } - - #toggleLight *, - #toggleFull * { - pointer-events: none; - } - - .showSetting { - background-color: var(--inputborder-color); - } - - .showModels { - background-color: var(--inputborder-color); - } - - .showModels>svg:last-child { - transform: scaleY(-1); - } - - #modelDialog { - position: absolute; - z-index: 2; - background: rgba(var(--primary-rgbbody), 1); - width: 240px; - left: 50%; - transform: translateX(-50%); - top: 46px; - overflow-y: auto; - max-height: calc(100% - 55px); - -webkit-user-select: none; - user-select: none; - border-radius: 4px; - padding: 8px 5px 8px 5px; - box-shadow: 0 0 6px rgba(0, 0, 0, 0.15); - } - - .modelSingle { - height: 40px; - border-radius: 3px; - cursor: pointer; - line-height: 40px; - display: flex; - align-items: center; - position: relative; - } - - .modelSingle * { - pointer-events: none; - } - - .modelSingle:hover { - background-color: var(--body-hover-bgcolor); - } - - .activeModel::before { - content: ""; - position: absolute; - right: 15px; - top: 7px; - width: 8px; - height: 16px; - border-style: solid; - border-width: 0 4px 4px 0; - transform: rotate(45deg); - } - - .modelAvatar { - margin-left: 6px; - margin-right: 10px; - width: 30px; - flex-shrink: 0; - border-radius: 2px; - height: 30px; - } - - #setDialog { - position: absolute; - z-index: 2; - background-color: rgba(var(--primary-rgbbody),1); - width: 320px; - right: 6px; - top: 46px; - overflow-y: auto; - max-height: calc(100% - 55px); - -webkit-user-select: none; - user-select: none; - border-radius: 5px; - padding: 8px 12px 8px 12px; - box-shadow: 0 0 6px rgba(0, 0, 0, 0.15); - } - - #setDialog input { - width: 100%; - } - - #setDialog .inlineTitle { - display: inline-block; - width: 80px; - line-height: 16px; - vertical-align: middle; - } - - #convOption, - #speechOption, - #speechDetail, - #recOption { - margin-bottom: 6px; - } - - #convOption>div, - #speechOption>div, - #speechDetail>div, - #recOption div { - margin-top: 10px; - } - - #voiceRecSetting select, #speechDetail select { - color: var(--title-color); - - } - .inputTextClass { - outline: none; - border-radius: 2px; - margin-top: 3px; - height: 32px; - font-size: 15px; - padding-left: 6px; - border: none; - } - - .areaTextClass { - width: 100%; - height: 150px; - white-space: normal; - resize: none; - padding: 6px; - } - - input[type="range"] { - -webkit-appearance: none; - appearance: none; - display: block; - margin: 4px 0 3px 0; - height: 8px; - background: #909090; - border-radius: 5px; - background-image: linear-gradient(#99c959, #99c959); - background-size: 100% 100%; - background-repeat: no-repeat; - } - - input[type="range"]::-webkit-slider-thumb { - -webkit-appearance: none; - height: 15px; - width: 15px; - border-radius: 50%; - background: #99c959; - cursor: ew-resize; - } - - input[type=range]::-webkit-slider-runnable-track { - -webkit-appearance: none; - box-shadow: none; - border: none; - background: transparent; - } - - .justSetLine { - display: flex; - justify-content: space-between; - align-items: center; - } - - .justSetBtn { - height: 32px; - border-radius: 3px; - line-height: 32px; - background-color: var(--inputborder-color); - text-align: center; - padding: 0px 8px; - display: flex; - justify-content: center; - align-items: center; - cursor: pointer; - } - - .justSetBtn:hover { - background-color: #d0d0d0; - } - - .justSetBtn>svg { - margin-right: 3px; - } - - .readyTestVoice>div:not(:first-child) { - display: none; - } - - .pauseTestVoice>div:nth-child(1), - .pauseTestVoice>div:nth-child(3) { - display: none; - } - - .resumeTestVoice>div:nth-child(1), - .resumeTestVoice>div:nth-child(2) { - display: none; - } - - .presetSelect>div { - display: inline-block; - } - - .presetSelect select { - outline: none; - border-radius: 3px; - width: 120px; - border-color: rgba(0, 0, 0, .3); - } - - .selectDef { - display: flex; - justify-content: space-between; - font-size: 13px; - color: #909090; - } - - #preSetSpeech { - width: 100%; - outline: none; - height: 30px; - line-height: 30px; - font-size: 14px; - margin-top: 5px; - border-radius: 3px; - border-color: rgba(0, 0, 0, .3); - } - - .mdOption { - position: absolute; - right: 0px; - top: 0; - width: 50px; - height: 100%; - pointer-events: none; - } - - .mdOption>div { - pointer-events: auto; - cursor: pointer; - } - - .mdOption svg * { - pointer-events: none; - } - - .refreshReq svg:not(:first-child) { - display: none; - } - - .halfRefReq svg:not(:nth-child(2)) { - display: none; - } - - .optionItems { - position: absolute; - bottom: -5px; - display: flex; - justify-content: space-between; - visibility: visible; - z-index: 1; - color: #808080; - } - - .optionItems:hover { - visibility: visible; - } - - .request:hover .optionItems, - .request:hover .voiceCls, - .response:hover .optionItems, - .response:hover .voiceCls { - visibility: visible; - } - - .optionItem { - border-radius: 10px; - height: 24px; - width: 32px; - border: 1px solid #e0e0e0;; - background-color: #f7f7f8; ; - display: flex !important; - justify-content: center; - align-items: center; - } - - .optionItem * { - pointer-events: none; - } - - .optionItem:hover { - background: #e0e0e0;; - } - - .voiceCls { - position: relative; - height: 100%; - visibility: visible; - display: flex; - align-items: center; - } - - .voiceCls>svg { - color: #c0c0c0; - display: block; - margin-left: 5px; - position: relative; - pointer-events: none; - } - - .voiceCls:hover>svg { - color: #808080; - } - - .showVoiceCls, - .showVoiceCls .markdown-body { - background: #e0e0e0 !important; - } - - .showVoiceCls .voiceCls { - visibility: visible !important; - } - - .showEditReq { - position: sticky !important; - top: 0; - bottom: 0; - z-index: 1; - } - - .showEditReq, - .showEditReq .markdown-body { - background: #e0e0e0 !important; - } - - .readyVoice svg:not(:first-child) { - display: none; - } - - .pauseVoice svg:not(:nth-child(2)) { - display: none; - } - - .resumeVoice svg:not(:nth-child(3)) { - display: none; - } - - #voiceTypes>span { - border-radius: 3px; - margin-left: 4px; - cursor: pointer; - color: var(--title-color); - padding: 1px 5px; - } - - #voiceTypes>span:hover { - background-color: var(--body-hover-bgcolor); - } - - .selVoiceType { - background-color: var(--inputborder-color); - } - - .navHeader { - width: 100%; - padding: 5px 10px; - display: flex; - justify-content: space-between; - } - - #newChat { - text-align: center; - width: 80%; - height: 40px; - border-radius: 3px; - background: var(--inputborder-color); - display: flex; - align-items: center; - justify-content: center; - -webkit-user-select: none; - user-select: none; - cursor: pointer; - flex: 1; - } - - .navHeader>div:hover { - background: var(--body-hover-bgcolor)!important; - } - - #newChat>svg { - margin-right: 2px; - } - - #newFolder { - height: 40px; - width: 40px; - margin-left: 10px; - border-radius: 3px; - background: var(--inputborder-color); - cursor: pointer; - position: relative; - -webkit-user-select: none; - user-select: none; - } - - #newFolder>svg { - display: block; - margin: 8px auto; - } - - .extraChat { - padding: 2px 10px 6px 10px; - position: relative; - } - - #searchChat { - width: 100%; - height: 36px; - padding-left: 10px; - padding-right: 16px; - font-size: 16px; - outline: none; - border: none; - background: var(--inputborder-color); - border-radius: 3px; - } - - #searchChat:focus { - background: var(--inputborder-color); - } - - #searchChat:placeholder-shown+#clearSearch { - display: none; - } - - #clearSearch { - position: absolute; - right: 12px; - top: 8px; - cursor: pointer; - } - - #clearSearch:hover { - color: var(--title-color); - } - - #clearSearch>svg { - display: block; - } - - .seledSearch { - background: var(--inputborder-color)!important; - } - - #matchCaseSearch { - position: absolute; - right: 12px; - top: 8px; - cursor: pointer; - border-radius: 3px; - color: var(--inputborder-color); - } - - #matchCaseSearch:hover { - background: var(--body-hover-bgcolor); - } - - #matchCaseSearch>svg { - display: block; - } - - .navFooter { - padding-bottom: 8px; - background: var(--inputborder-color); - } - - .navFooter .divider { - width: 100%; - border-top: 1px solid var(--inputborder-color); - margin: 4px 0; - } - - .navFunc { - padding-top: 5px; - display: flex; - justify-content: space-evenly; - } - - .navFunc svg { - display: block; - } - - .navFunc>div, - .navFunc>label { - border-radius: 20px; - text-align: center; - padding: 8px 8px; - font-size: 14px; - cursor: pointer; - } - - .navFunc>div:hover, - .navFunc>label:hover { - background: var(--body-hover-bgcolor); - } - - .navFooter .links { - text-align: center; - -webkit-user-select: none; - user-select: none; - } - - .navFooter .links a { - text-decoration: none; - } - - - .allList { - width: 100%; - flex: 1; - overflow-y: auto; - } - - #chatList { - min-height: 50px; - } - - .dragingLi { - filter: brightness(90%); - } - - .dragingChat { - background: #e8e8e8; - } - - .expandFolder>.headLi>svg { - transform: rotate(90deg); - } - - .expandFolder>.chatsInFolder { - display: block; - } - - .chatsInFolder { - display: none; - margin-left: 22px; - padding-left: 2px; - border-left: 1px solid #909090; ; - } - - .headLi, - .chatLi { - cursor: pointer; - width: 100%; - height: 50px; - display: flex; - justify-content: space-between; - align-items: center; - position: relative; - } - - .headLi *, - .chatLi * { - pointer-events: none; - } - - .headLi>svg, - .chatLi>svg { - margin-left: 10px; - pointer-events: none; - } - - .folderOption svg, - .chatOption svg { - pointer-events: auto; - } - - .headLi svg *, - .chatLi svg * { - pointer-events: none; - } - - .headLi .folderInfo { - position: absolute; - left: 40px; - height: 40px; - max-width: calc(100% - 115px); - } - - .chatLi .chatInfo { - position: absolute; - left: 45px; - height: 40px; - max-width: calc(100% - 100px); - } - - .folderInfo *, - .chatInfo * { - -webkit-user-select: none; - user-select: none; - } - - .chatInfo span { - background: var(--inputborder-color)!important; - } - - .headLi .folderName, - .chatLi .chatName { - text-overflow: ellipsis; - white-space: nowrap; - overflow: hidden; - line-height: 20px; - height: 20px; - } - - .headLi .folderNum, - .chatLi .chatPre { - text-overflow: ellipsis; - white-space: nowrap; - overflow: hidden; - font-size: 12px; - line-height: 20px; - height: 20px; - } - - .headLi .folderOption, - .chatLi .chatOption { - visibility: hidden; - display: flex; - margin-right: 5px; - } - - .folderLi .chatLi>svg { - margin-left: 5px; - } - - .folderLi .chatLi .chatInfo { - left: 35px; - max-width: calc(100% - 85px); - } - - .folderLi .chatLi #activeChatEdit { - left: 32px; - width: calc(100% - 60px) - } - - .folderLi:hover { - background: var(--body-hover-bgcolor)!important; - } - - .chatLi:hover { - background: var(--body-hover-bgcolor)!important; - } - - .headLi:hover .folderOption, - .chatLi:hover .chatOption { - visibility: visible !important; - } - - .activeFolder, - .activeChatLi { - background: var(--inputborder-color)!important; - } - - .activeChatLi .chatOption { - visibility: visible !important; - } - - .folderOption>svg:hover, - .chatOption>svg:hover { - color: var(--title-color); - } - - #activeChatEdit { - position: absolute; - left: 42px; - font-size: 16px; - border-radius: 2px; - color: var(--title-color); - background-color: rgba(var(--primary-rgbbody),1); - outline: none; - border: none; - pointer-events: auto; - height: 24px; - line-height: 24px; - width: calc(100% - 75px); - padding: 20px 3px; - z-index: 1; - } - - #loadMask { - position: fixed; - top: 0; - left: 0; - right: 0; - bottom: 0; - z-index: 100; - background-color: #edeff2; - } - - #loadMask>div { - position: absolute; - left: 50%; - top: 50%; - transform: translate(-50%, -50%); - text-align: center; - } - - @keyframes loading { - - 0%, - 100% { - transform: scale(0); - } - - 50% { - transform: scale(1); - } - } - - .loadingCSSIcon { - position: relative; - display: flex; - align-items: center; - justify-content: space-evenly; - } - - .loadingCSSIcon div { - width: 15%; - height: 0; - padding-bottom: 15%; - border-radius: 50%; - animation: loading 1s cubic-bezier(0.3, 0, 0.7, 1) infinite; - } - - .loadingCSSIcon div:nth-child(1) { - background: #e15b64; - animation-delay: -0.4s - } - - .loadingCSSIcon div:nth-child(2) { - background: #f8b26a; - animation-delay: -0.2s - } - - .loadingCSSIcon div:nth-child(3) { - background: #99c959; - animation-delay: 0s; - } - - #loadMask>div>:first-child { - font-size: 40px; - color: #909090; ; - } - - #loadMask>div>:last-child { - width: 140px; - height: 70px; - margin: 0 auto; - } - - #voiceRec { - position: absolute; - right: 0; - top: 0; - width: 47px; - height: 100%; - } - - .message_if_voice { - padding-right: 47px !important; - } - - #voiceRecIcon { - width: 100%; - height: 100%; - text-align: center; - cursor: pointer; - position: relative; - } - - #voiceRecIcon:hover>svg { - color: #808080; - } - - #voiceRecIcon>svg { - width: 38px; - height: 38px; - color: #b0b0b0; - position: absolute; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - } - - #voiceRecIcon>svg .animVoice { - display: none; - } - - .voiceRecing>svg { - color: #99c959 !important; - } - - .voiceRecing .animVoice { - display: inline !important; - transform-origin: 0 64%; - animation-duration: 1.5s; - animation-name: scaleVoice; - animation-timing-function: ease; - animation-iteration-count: infinite; - } - - .voiceLong .animVoice { - display: inline !important; - transform-origin: 0 64%; - animation-duration: 0.3s; - animation-name: longVoice; - animation-timing-function: ease-in-out; - animation-iteration-count: 1; - } - - @keyframes longVoice { - 0% { - transform: scaleY(0); - } - - 100% { - transform: scaleY(1); - } - } - - @keyframes scaleVoice { - 0% { - transform: scaleY(0.28); - } - - 20% { - transform: scaleY(0.60); - } - - 28% { - transform: scaleY(0.28); - } - - 36% { - transform: scaleY(0.45); - } - - 44% { - transform: scaleY(0.28); - } - - 52% { - transform: scaleY(0.45); - } - - 62% { - transform: scaleY(0.80); - } - - 72% { - transform: scaleY(0.80); - } - - 90% { - transform: scaleY(0.28); - } - - 100% { - transform: scaleY(0.28); - } - } - - #voiceRecSetting { - display: none; - position: absolute; - top: -70px; - left: -26px; - z-index: 1; - padding: 4px 4px; - -webkit-user-select: none; - user-select: none; - border-radius: 3px; - box-shadow: 0 0 6px rgba(0, 0, 0, 0.15); - } - - #voiceRecSetting select { - width: 102px; - outline: none; - height: 28px; - border-radius: 3px; - border-color: rgba(0, 0, 0, .3); - } - - .presetModelCls label { - margin-right: 8px; - } - - .presetModelCls select { - height: 30px; - line-height: 30px; - margin-top: 2px; - font-size: 15px; - } - - .modelSwitch, - .setSwitch { - display: flex; - } - - .modelSwitch { - margin-bottom: 10px; - -webkit-user-select: none; - user-select: none; - } - - .modelSwitch>div, - .setSwitch>div { - border-radius: 3px; - width: calc(100% / 3); - padding: 8px; - line-height: 1; - text-align: center; - cursor: pointer; - } - - .modelSwitch>div:hover, - .setSwitch>div:hover { - background-color: var(--body-hover-bgcolor); - } - - .activeSwitch { - background-color: var(--inputborder-color); - } - - .checkLoad { - height: 32px; - border-radius: 3px; - line-height: 32px; - background: #d0d0d0; - text-align: center; - display: flex; - justify-content: center; - cursor: pointer; - } - - .checkLoad:hover { - background: #c0c0c0; - } - - .voiceChecking { - background-color: #c0c0c0 !important; - } - - .voiceChecking>svg { - display: inline !important; - } - - .checkLoad>svg { - display: none; - margin-right: 8px; - height: 32px; - width: 64px; - } - - #preSetSystem { - height: 30px; - line-height: 30px; - } - - #sysMask { - display: none; - position: fixed; - z-index: 200; - top: 0; - left: 0; - bottom: 0; - right: 0; - cursor: pointer; - justify-content: center; - align-items: center; - background: rgba(0, 0, 0, .4); - -webkit-tap-highlight-color: transparent; - } - - #sysDialog { - position: relative; - background: rgba(var(--primary-rgbbody),1); - cursor: auto; - max-height: 100%; - width: 100%; - display: flex; - flex-direction: column; - border-radius: 4px; - padding: 20px; - } - - .sysTitle { - font-size: 20px; - font-weight: bold; - margin-bottom: 8px; - -webkit-user-select: none; - user-select: none; - } - - .sysSwitch, - .sysSwitch>div * { - pointer-events: none; - } - - .sysSwitch>div { - border-radius: 3px; - height: 32px; - line-height: 32px; - text-align: center; - cursor: pointer; - pointer-events: auto; - font-weight: bold; - display: flex; - align-items: center; - -webkit-user-select: none; - user-select: none; - } - - .sysSwitch>div>svg { - margin-right: 4px; - } - - .sysSwitch>div:hover { - background-color: var(--body-hover-bgcolor); - } - - .sysDetail { - overflow-y: auto; - flex: 1; - margin-top: 4px; - } - - #closeSet { - position: absolute; - right: 0px; - top: 0px; - cursor: pointer; - padding: 10px 14px; - } - - #closeSet:hover { - color: #000; - } - - .setContent { - margin-top: 8px; - } - - .setNotNormalFlow { - position: relative; - } - - .setTitle { - margin-bottom: 6px; - font-weight: bold; - -webkit-user-select: none; - user-select: none; - } - - .setDetail { - margin: 0 10px; - -webkit-user-select: none; - user-select: none; - } - - .autoSelect>label, - .autoSelect>input { - cursor: pointer; - } - - .dataDetail { - display: flex; - } - - .dataDetail svg { - margin-right: 4px; - } - - .dataDetail>div, - .dataDetail>label { - border-radius: 3px; - text-align: center; - padding: 6px 8px; - margin-right: 12px; - font-size: 15px; - cursor: pointer; - display: flex; - align-items: center; - justify-content: space-between; - } - - .dataDetail>div:hover, - .dataDetail>label:hover { - background-color: var(--body-hover-bgcolor); - } - - .keyOptionDetail { - display: flex; - margin-top: 10px; - } - - #resetHotKey { - display: flex; - align-items: center; - justify-content: space-between; - cursor: pointer; - font-size: 15px; - border-radius: 3px; - padding: 6px 8px; - margin-left: 90px; - } - - #resetHotKey>svg { - margin-right: 4px; - } - - #resetHotKey:hover { - background-color:var(--body-hover-bgcolor); - } - - .hotKeyDetail>div { - position: relative; - height: 30px; - margin-bottom: 2px; - } - - .hotKeyDetail label { - line-height: 30px; - } - - .hotKeyDetail select { - position: absolute; - left: 110px; - outline: none; - border-radius: 3px; - width: 120px; - border-color: rgba(0, 0, 0, .3); - height: 30px; - font-size: 15px; - } - - .avatarDetail { - display: flex; - margin-top: 2px; - } - - .avatarDetail img { - border-radius: 2px; - width: 32px; - height: 32px; - flex-shrink: 0; - margin-right: 10px; - margin-top: 2px; - } - - .inputDetail input { - outline: none; - border-radius: 3px; - padding-left: 8px; - font-size: 15px; - width: 100%; - height: 34px; - border: 1px solid rgba(0, 0, 0, .3); - } - - .themeDetail { - display: flex; - width: 180px; - justify-content: space-between; - pointer-events: none; - } - - .themeDetail svg { - display: block; - } - - .themeDetail>div { - pointer-events: auto; - border-radius: 20px; - text-align: center; - padding: 8px 8px; - font-size: 14px; - cursor: pointer; - } - - .themeDetail>div * { - pointer-events: none; - } - - .themeDetail>div:hover { - background-color: var(--body-hover-bgcolor); - } - - .darkTheme>div:first-child { - background-color: var(--inputborder-color); - } - - .lightTheme>div:nth-child(2) { - background-color: var(--inputborder-color); - } - - .autoTheme>div:nth-child(3) { - background-color: var(--inputborder-color); - } - - .langDetail { - width: 110px; - } - - .enLang>div:first-child { - background-color: var(--inputborder-color); - } - - .zhLang>div:nth-child(2) { - background-color: var(--inputborder-color); - } - - #customAutoSet input { - width: 100px; - height: 30px; - line-height: 30px; - font-size: 15px; - outline: none; - border: 1px solid rgba(0, 0, 0, .3); - text-align: center; - border-radius: 3px; - background: #fff; - color: #24292f; - } - - #customAutoSet label { - margin-right: 8px; - } - - .progressBar { - position: relative; - width: 100%; - height: 12px; - border-radius: 6px; - background: #e0e0e0; - overflow: hidden; - } - - .nowProgress { - position: absolute; - left: 0; - top: 0; - height: 12px; - min-width: 1px; - border-radius: 6px; - background: #99c959; - } - - .progressDetail { - display: flex; - justify-content: space-between; - font-size: 15px; - } - - .cursorCls { - background-color: var(--inputborder-color); - width: 4px; - animation: 1s cursor-blinker infinite step-start; - } - - @keyframes cursor-blinker { - 0% { - opacity: 0; - } - - 50% { - opacity: 1; - } - - 100% { - opacity: 0; - } - } - - .apiSelsContainer { - position: relative; - z-index: 1; - } - - #apiSelect { - position: absolute; - top: 64px; - padding: 4px 0; - width: calc(100% - 20px); - left: 10px; - box-shadow: 0 0 6px rgba(0, 0, 0, 0.15); - max-height: 180px; - overflow-y: auto; - -webkit-user-select: none; - user-select: none; - } - - #apiSelect>div { - pointer-events: auto; - cursor: pointer; - font-size: 15px; - padding: 6px 0 6px 8px; - height: 36px; - display: flex; - justify-content: space-between; - align-items: center; - } - - #apiSelect>div:hover { - background-color:var(--body-hover-bgcolor); - } - - #apiSelect>div>span { - height: 100%; - line-height: 23px; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - } - - #apiSelect>div * { - pointer-events: none; - } - - .delApiOption:hover { - background-color: var(--body-hover-bgcolor); - } - - .delApiOption { - width: 36px; - height: 36px; - flex-shrink: 0; - pointer-events: auto !important; - } - - .delApiOption>svg { - margin: 6px; - display: block; - } - - @keyframes textInOut { - from { - opacity: 0; - } - - to { - opacity: 1; - } - } - - .response[data-loading="true"]>.responseBody>*:not(.cursorCls) { - animation: textInOut 0.48s ease-in-out forwards; - } - - .cotBtn { - width: 120px; - height: 32px; - font-size: 14px; - user-select: none; - background-color: var(--inputborder-color); - position: relative; - padding-left: 14px; - line-height: 32px; - border-radius: 8px; - margin-bottom: 12px; - cursor: pointer; - } - - .cotBtn:hover { - background-color: var(--body-hover-bgcolor); - } - - .cotBtn.endCot { - width: 142px; - } - - .cotBtn::after { - content: ''; - display: inline-block; - position: absolute; - right: 15px; - top: 14px; - width: 6px; - height: 6px; - transform: rotate(-45deg); - } - - .cotBtn.down::after { - top: 11px; - transform: rotate(135deg); - } - - .cotContent { - background-color: var(--inputborder-color); - padding-left: 12px; - font-size: 14px; - } - - .cotContent>:last-child { - margin-bottom: 12px !important; - } - - .hide { - display: none; - } - - @@ -694,83 +521,3 @@ - -
- <%:Dashboard Update%> -
-
-
-
-
- <%:Panel Version Management%> -
-
-
-
-
- <%:Yacd Panel%> -
-
-
-
-
<%:Collecting data...%>
-
- -
-
- -
-
-
-
-
- <%:Dashboard Panel%> -
-
-
-
-
<%:Collecting data...%>
-
- -
-
- -
-
-
-
-
- <%:Zashboard Panel%> -
-
-
-
-
<%:Collecting data...%>
-
- -
-
- -
-
-
-
-
- <%:Metacubexd Panel%> -
-
-
-
-
<%:Collecting data...%>
-
- -
-
- -
-
-
-
-
-
-
diff --git a/luci-app-ssr-plus/po/templates/ssr-plus.pot b/luci-app-ssr-plus/po/templates/ssr-plus.pot index 4ee8446c..35eef481 100644 --- a/luci-app-ssr-plus/po/templates/ssr-plus.pot +++ b/luci-app-ssr-plus/po/templates/ssr-plus.pot @@ -100,16 +100,16 @@ msgstr "" msgid "Accept LAN Access" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:692 +#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:649 msgid "Access Control" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1359 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1118 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/subscribe_actions_footer.htm:302 msgid "Actions" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1339 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1098 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/server_table.htm:349 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/server_table.htm:357 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/subscribe_actions_footer.htm:256 @@ -130,11 +130,11 @@ msgstr "" msgid "Additional Version" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:625 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:452 msgid "Address" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:693 +#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:650 msgid "Advanced Settings" msgstr "" @@ -164,11 +164,11 @@ msgstr "" msgid "All Ports" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1267 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1046 msgid "All client proxy rules cleared and applied." msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1267 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1046 msgid "All client proxy rules cleared." msgstr "" @@ -242,10 +242,6 @@ msgstr "" msgid "Are you sure you want to delete subscribe link: %s ?" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:381 -msgid "Are you sure you want to delete this panel?" -msgstr "" - #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/backup_restore.htm:133 msgid "Are you sure you want to restore the client to default settings?" msgstr "" @@ -378,8 +374,8 @@ msgstr "" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:173 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:326 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:653 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:688 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:480 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:515 msgid "Check Update" msgstr "" @@ -423,13 +419,13 @@ msgstr "" msgid "Clang.CN.CIDR" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:419 +#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:380 msgid "Clash" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:112 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1116 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1337 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:893 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1096 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_panel.htm:3 msgid "Clash Panel" msgstr "" @@ -450,11 +446,11 @@ msgstr "" msgid "Clash/Mihomo" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1342 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1101 msgid "Clear All Rules" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1256 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1035 msgid "Clear all custom client proxy rules and restore empty state?" msgstr "" @@ -473,24 +469,23 @@ msgstr "" msgid "Click to the page" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1356 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1115 msgid "Client" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1222 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1001 msgid "Client rules exported to CSV file." msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1246 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1025 msgid "Client rules imported from CSV file. Click Save to apply." msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1351 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1110 msgid "Client supports manual IP or IP/CIDR input." msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1328 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1348 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1107 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/subscribe.htm:251 msgid "Close" msgstr "" @@ -505,21 +500,17 @@ msgstr "" msgid "Cloudflare DNS (1.1.1.1)" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:650 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:685 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:716 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:732 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:748 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:764 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:477 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:512 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/status.htm:21 msgid "Collecting data..." msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:637 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:464 msgid "Component" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:695 +#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:652 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/component.lua:5 msgid "Component Update" msgstr "" @@ -562,12 +553,12 @@ msgstr "" msgid "Copy SSR to clipboard successfully." msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:616 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:443 msgid "Core Components" msgstr "" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:24 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:676 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:503 msgid "Country MMDB" msgstr "" @@ -595,8 +586,8 @@ msgstr "" msgid "Custom" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1303 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1304 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1073 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1074 msgid "Custom Client Proxies Rules" msgstr "" @@ -632,11 +623,11 @@ msgstr "" msgid "Custom YAML imported successfully: %s" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1007 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:784 msgid "Custom client proxy rules saved and applied." msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1007 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:784 msgid "Custom client proxy rules saved." msgstr "" @@ -667,15 +658,7 @@ msgstr "" msgid "DTLS 1.2" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:727 -msgid "Dashboard Panel" -msgstr "" - -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:699 -msgid "Dashboard Update" -msgstr "" - -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:672 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:499 msgid "Database" msgstr "" @@ -691,10 +674,6 @@ msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1566 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1578 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1592 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:591 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:398 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:401 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:437 msgid "Default" msgstr "" @@ -723,17 +702,17 @@ msgid "" "proxy protocol." msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:499 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:373 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_panel_button.htm:41 msgid "Defaults Cleared!" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:499 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:373 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_panel_button.htm:41 msgid "Defaults Restored!" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1351 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1110 msgid "" "Define per-client Mihomo proxy targets. Rules are injected as SRC-IP-CIDR " "entries before the original Clash rules." @@ -743,11 +722,7 @@ msgstr "" msgid "Delay (ms)" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:888 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:718 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:734 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:750 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:766 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:665 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/server_table.htm:319 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/subscribe_actions_footer.htm:196 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/subscribe_actions_footer.htm:328 @@ -825,7 +800,7 @@ msgstr "" msgid "Downlink Capacity(Default:Mbps)" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:624 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:451 msgid "Download Source" msgstr "" @@ -833,10 +808,6 @@ msgstr "" msgid "Download failed" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:355 -msgid "Downloading File..." -msgstr "" - #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:971 msgid "Dual-stack Listening Socket" msgstr "" @@ -869,7 +840,7 @@ msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server-config.lua:54 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server.lua:101 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:676 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1355 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1114 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/subscribe_actions_footer.htm:184 msgid "Enable" msgstr "" @@ -1043,7 +1014,7 @@ msgstr "" msgid "Expecting: %s" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1343 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1102 msgid "Export Client Rules" msgstr "" @@ -1055,7 +1026,7 @@ msgstr "" msgid "FORCE BRUTAL" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1269 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1048 msgid "Failed to clear all client proxy rules." msgstr "" @@ -1084,7 +1055,7 @@ msgstr "" msgid "Failed to query geo database information." msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1009 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:786 msgid "Failed to save custom client proxy rules." msgstr "" @@ -1195,16 +1166,16 @@ msgstr "" msgid "Gecko Packet Size (min)" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:664 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:491 msgid "Geo Database Update" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:673 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:500 msgid "Geo Resource" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/component.lua:14 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:628 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:455 msgid "GitHub Direct" msgstr "" @@ -1339,7 +1310,7 @@ msgstr "" msgid "Httpupgrade Path" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:459 +#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:420 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:467 msgid "Hysteria2" msgstr "" @@ -1398,7 +1369,7 @@ msgstr "" msgid "Import" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1344 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1103 msgid "Import Client Rules" msgstr "" @@ -1601,8 +1572,8 @@ msgstr "" msgid "Listen only on the given interface or, if unspecified, on all" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1017 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1070 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:794 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:847 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_panel.htm:84 msgid "Loading..." msgstr "" @@ -1620,7 +1591,7 @@ msgstr "" msgid "Local addresses" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:697 +#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:666 msgid "Log" msgstr "" @@ -1675,22 +1646,18 @@ msgstr "" msgid "Maximum packet size the socks5 server can receive from external" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:759 -msgid "Metacubexd Panel" -msgstr "" - -#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:415 -#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:418 -#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:421 -#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:427 -#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:443 +#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:376 +#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:379 +#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:382 +#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:388 +#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:404 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:13 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:643 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:470 msgid "Mihomo" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1318 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1319 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1087 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1088 msgid "Mihomo Pannel" msgstr "" @@ -1768,10 +1735,10 @@ msgstr "" msgid "NOT RUNNING" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:453 +#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:414 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:398 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:17 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:644 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:471 msgid "NaiveProxy" msgstr "" @@ -1823,14 +1790,10 @@ msgstr "" msgid "No custom YAML file was selected." msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:773 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:550 msgid "No custom client proxy rules yet." msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:565 -msgid "No dashboard panel installed. Please install one first." -msgstr "" - #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/refresh.htm:21 msgid "No new data!" msgstr "" @@ -1843,7 +1806,7 @@ msgstr "" msgid "No subscription items found" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:914 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:691 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_panel.htm:32 msgid "No switchable proxy groups found." msgstr "" @@ -1966,7 +1929,7 @@ msgid "Only when Socks5 Auth Mode is password valid, Not mandatory." msgstr "" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:28 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:677 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:504 msgid "OpenClash GeoSite Database" msgstr "" @@ -1990,7 +1953,7 @@ msgstr "" msgid "Package Manager" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:638 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:465 msgid "Package Name" msgstr "" @@ -2007,10 +1970,6 @@ msgstr "" msgid "Panel" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:705 -msgid "Panel Version Management" -msgstr "" - #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:540 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server-config.lua:95 msgid "Password" @@ -2057,7 +2016,7 @@ msgstr "" msgid "Plugin Opts" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1357 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1116 msgid "Policy" msgstr "" @@ -2162,22 +2121,22 @@ msgstr "" msgid "RST Backup" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:481 +#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:442 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/status.htm:7 msgid "RUNNING" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:474 +#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:435 msgid "RUNNING in %s (%s) Mode" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:478 +#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:439 msgid "RUNNING in %s Mode" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:903 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1051 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1101 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:680 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:828 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:878 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_panel.htm:93 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:291 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/subscribe.htm:253 @@ -2197,7 +2156,7 @@ msgid "Realm URL" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:860 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:474 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:348 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_panel_button.htm:17 msgid "Reapply" msgstr "" @@ -2247,14 +2206,14 @@ msgstr "" msgid "Reload YAML" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:467 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:341 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_panel_button.htm:10 msgid "Reloading YAML..." msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server-config.lua:135 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server-config.lua:136 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1358 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1117 msgid "Remarks" msgstr "" @@ -2275,14 +2234,14 @@ msgstr "" msgid "Reserved bytes(optional)" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1310 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1311 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1080 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1081 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_panel_button.htm:62 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_panel_button.htm:63 msgid "Reset Default Proxies Rules" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:502 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:376 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_panel_button.htm:44 msgid "Reset Defaults Failed!" msgstr "" @@ -2292,7 +2251,7 @@ msgstr "" msgid "Reset complete" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:488 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:362 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_panel_button.htm:30 msgid "Reset saved Mihomo proxy-group selections and restore YAML defaults?" msgstr "" @@ -2301,7 +2260,7 @@ msgstr "" msgid "Reset to defaults" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:492 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:366 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_panel_button.htm:34 msgid "Resetting Defaults..." msgstr "" @@ -2341,7 +2300,7 @@ msgstr "" msgid "Running Mode" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:455 +#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:416 msgid "SOCKS5" msgstr "" @@ -2349,20 +2308,20 @@ msgstr "" msgid "SS URL base64 sstr format not recognized." msgstr "" -#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:690 +#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:647 msgid "SSR Client" msgstr "" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:5 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:641 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:468 msgid "SSR Plus+ Main Program" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:694 +#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:651 msgid "SSR Server" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1347 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1106 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/subscribe_actions_footer.htm:195 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/subscribe_actions_footer.htm:327 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/subscribe_actions_footer.htm:352 @@ -2387,7 +2346,7 @@ msgstr "" msgid "Save failed:" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:986 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:763 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/subscribe_actions_footer.htm:81 msgid "Saving..." msgstr "" @@ -2396,10 +2355,6 @@ msgstr "" msgid "Second" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1327 -msgid "Select Dashboard Panel" -msgstr "" - #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1744 msgid "Self-signed Certificate" msgstr "" @@ -2439,7 +2394,7 @@ msgstr "" msgid "Server failsafe auto swith and custom update settings" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:691 +#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:648 msgid "Servers Nodes" msgstr "" @@ -2451,15 +2406,6 @@ msgstr "" msgid "Session Ticket" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:387 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:403 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:721 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:737 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:753 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:769 -msgid "Set to Default" -msgstr "" - #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:407 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:615 msgid "Shadow-TLS" @@ -2469,15 +2415,15 @@ msgstr "" msgid "Shadow-TLS ChainPoxy type" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:416 +#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:377 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:392 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:462 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server-config.lua:61 msgid "ShadowSocks" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:428 -#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:430 +#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:389 +#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:391 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:395 msgid "ShadowSocks-Rust" msgstr "" @@ -2486,7 +2432,7 @@ msgstr "" msgid "ShadowSocks-rust Version" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:685 +#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:644 msgid "ShadowSocksR Plus+" msgstr "" @@ -2494,7 +2440,7 @@ msgstr "" msgid "ShadowSocksR Plus+ Settings" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:457 +#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:418 msgid "ShadowTLS" msgstr "" @@ -2503,7 +2449,7 @@ msgstr "" msgid "Shadowsocks Password" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:424 +#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:385 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:389 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server-config.lua:64 msgid "ShadowsocksR" @@ -2590,7 +2536,7 @@ msgstr "" msgid "Starting subscription update..." msgstr "" -#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:696 +#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:653 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:130 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:132 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:134 @@ -2676,39 +2622,21 @@ msgid "" "a maximum length of 3 bytes." msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:373 -msgid "Switch Failed" -msgstr "" - -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:365 -msgid "Switch Successful" -msgstr "" - -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:365 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:432 -msgid "Switch To Meta Version" -msgstr "" - -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:365 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:431 -msgid "Switch To Official Version" -msgstr "" - #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:104 msgid "Switch check cycly(second)" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:953 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:730 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_panel.htm:71 msgid "Switch failed." msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:950 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:727 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_panel.htm:68 msgid "Switched successfully." msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:943 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:720 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_panel.htm:61 msgid "Switching..." msgstr "" @@ -2762,7 +2690,7 @@ msgstr "" msgid "TLS is used to verify the leaf certificate name." msgstr "" -#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:422 +#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:383 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:404 msgid "TUIC" msgstr "" @@ -2831,8 +2759,8 @@ msgid "" "GitHub release page." msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1039 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1094 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:816 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:871 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_panel.htm:89 msgid "This Clash total node is not active. Apply this node first." msgstr "" @@ -2886,7 +2814,7 @@ msgstr "" msgid "Transport Protocol" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:451 +#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:412 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:461 msgid "Trojan" msgstr "" @@ -2977,10 +2905,6 @@ msgstr "" msgid "Unsupported package manager" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:372 -msgid "Unzip Error" -msgstr "" - #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/subscribe_actions_footer.htm:197 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/subscribe_actions_footer.htm:332 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/subscribe_actions_footer.htm:333 @@ -2991,10 +2915,6 @@ msgstr "" msgid "Update All Subscribe Servers" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:373 -msgid "Update Failed" -msgstr "" - #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:511 msgid "Update Interval(min)" msgstr "" @@ -3003,16 +2923,6 @@ msgstr "" msgid "Update Mode" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:362 -msgid "Update Successful" -msgstr "" - -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:362 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:425 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:427 -msgid "Update Version" -msgstr "" - #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:482 msgid "Update cycle (Day/Week)" msgstr "" @@ -3041,8 +2951,8 @@ msgstr "" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:173 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:326 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:654 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:689 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:481 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:516 msgid "Upgrade" msgstr "" @@ -3148,12 +3058,12 @@ msgid "Using incorrect encryption mothod may causes service fail to start" msgstr "" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:33 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:678 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:505 msgid "V2Ray GeoIP Databases" msgstr "" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:37 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:679 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:506 msgid "V2Ray GeoSite Databases" msgstr "" @@ -3265,7 +3175,7 @@ msgstr "" msgid "XTLS" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:445 +#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:406 msgid "Xray" msgstr "" @@ -3278,32 +3188,24 @@ msgid "Xray Noise Packets" msgstr "" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:9 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:642 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:469 msgid "Xray-core" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:477 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:351 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_panel_button.htm:20 msgid "YAML Reload Failed!" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:474 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:348 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_panel_button.htm:17 msgid "YAML Reloaded!" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:711 -msgid "Yacd Panel" -msgstr "" - #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:273 msgid "Yes" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:743 -msgid "Zashboard Panel" -msgstr "" - #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:157 msgid "adblock_url" msgstr "" diff --git a/luci-app-ssr-plus/po/zh_Hans/ssr-plus.po b/luci-app-ssr-plus/po/zh_Hans/ssr-plus.po index df6ced12..7558982f 100644 --- a/luci-app-ssr-plus/po/zh_Hans/ssr-plus.po +++ b/luci-app-ssr-plus/po/zh_Hans/ssr-plus.po @@ -104,16 +104,16 @@ msgstr "一个合法的文件路径。在运行之前,此文件必须不存在 msgid "Accept LAN Access" msgstr "接受局域网访问" -#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:692 +#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:649 msgid "Access Control" msgstr "访问控制" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1359 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1118 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/subscribe_actions_footer.htm:302 msgid "Actions" msgstr "操作" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1339 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1098 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/server_table.htm:349 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/server_table.htm:357 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/subscribe_actions_footer.htm:256 @@ -134,11 +134,11 @@ msgstr "添加中..." msgid "Additional Version" msgstr "附加版本" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:625 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:452 msgid "Address" msgstr "地址" -#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:693 +#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:650 msgid "Advanced Settings" msgstr "高级设置" @@ -168,11 +168,11 @@ msgstr "全部" msgid "All Ports" msgstr "所有端口(默认)" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1267 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1046 msgid "All client proxy rules cleared and applied." msgstr "所有客户端代理规则已清空并生效。" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1267 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1046 msgid "All client proxy rules cleared." msgstr "所有客户端代理规则已清空。" @@ -246,10 +246,6 @@ msgstr "定时模式" msgid "Are you sure you want to delete subscribe link: %s ?" msgstr "确定要删除此订阅链接:%s 吗?" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:381 -msgid "Are you sure you want to delete this panel?" -msgstr "确定要删除此面板吗?" - #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/backup_restore.htm:133 msgid "Are you sure you want to restore the client to default settings?" msgstr "是否真的要恢复客户端默认配置?" @@ -382,8 +378,8 @@ msgstr "切换检查重试次数" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:173 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:326 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:653 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:688 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:480 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:515 msgid "Check Update" msgstr "检查更新" @@ -427,13 +423,13 @@ msgstr "" msgid "Clang.CN.CIDR" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:419 +#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:380 msgid "Clash" msgstr "Clash" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:112 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1116 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1337 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:893 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1096 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_panel.htm:3 msgid "Clash Panel" msgstr "Clash 面板" @@ -454,11 +450,11 @@ msgstr "Clash YAML 路径" msgid "Clash/Mihomo" msgstr "Clash/Mihomo" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1342 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1101 msgid "Clear All Rules" msgstr "清空所有规则" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1256 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1035 msgid "Clear all custom client proxy rules and restore empty state?" msgstr "清空所有自定义客户端代理规则,并恢复为空白状态吗?" @@ -477,24 +473,23 @@ msgstr "点击此处前往管理" msgid "Click to the page" msgstr "点击前往" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1356 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1115 msgid "Client" msgstr "客户端" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1222 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1001 msgid "Client rules exported to CSV file." msgstr "客户端规则已导出为 CSV 文件。" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1246 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1025 msgid "Client rules imported from CSV file. Click Save to apply." msgstr "客户端规则已从 CSV 文件导入,请点击保存生效。" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1351 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1110 msgid "Client supports manual IP or IP/CIDR input." msgstr "客户端支持手动输入 IP 或 IP/CIDR。" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1328 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1348 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1107 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/subscribe.htm:251 msgid "Close" msgstr "关闭" @@ -509,21 +504,17 @@ msgstr "" msgid "Cloudflare DNS (1.1.1.1)" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:650 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:685 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:716 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:732 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:748 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:764 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:477 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:512 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/status.htm:21 msgid "Collecting data..." msgstr "正在收集数据中..." -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:637 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:464 msgid "Component" msgstr "组件" -#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:695 +#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:652 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/component.lua:5 msgid "Component Update" msgstr "组件升级" @@ -566,12 +557,12 @@ msgstr "使用订阅转换模板 URL 将订阅转换为 Clash/Mihomo YAML。" msgid "Copy SSR to clipboard successfully." msgstr "成功复制 SSR 网址到剪贴板。" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:616 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:443 msgid "Core Components" msgstr "核心组件" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:24 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:676 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:503 msgid "Country MMDB" msgstr "Country MMDB" @@ -599,8 +590,8 @@ msgstr "当前版本" msgid "Custom" msgstr "自定义" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1303 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1304 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1073 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1074 msgid "Custom Client Proxies Rules" msgstr "自定义客户端代理规则" @@ -637,11 +628,11 @@ msgstr "自定义端口" msgid "Custom YAML imported successfully: %s" msgstr "自定义 YAML 导入成功:%s" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1007 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:784 msgid "Custom client proxy rules saved and applied." msgstr "自定义客户端代理规则已保存并生效。" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1007 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:784 msgid "Custom client proxy rules saved." msgstr "自定义客户端代理规则已保存。" @@ -672,15 +663,7 @@ msgstr "" msgid "DTLS 1.2" msgstr "DTLS 1.2 数据包" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:727 -msgid "Dashboard Panel" -msgstr "Dashboard 面板" - -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:699 -msgid "Dashboard Update" -msgstr "Dashboard 更新" - -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:672 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:499 msgid "Database" msgstr "数据库" @@ -696,10 +679,6 @@ msgstr "解密" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1566 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1578 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1592 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:591 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:398 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:401 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:437 msgid "Default" msgstr "默认" @@ -730,17 +709,17 @@ msgstr "" "默认值:16。填负数时,如 -1,不使用 Mux 模块承载 UDP 流量。将使用代理协议原本" "的 UDP 传输方式。" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:499 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:373 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_panel_button.htm:41 msgid "Defaults Cleared!" msgstr "已清空默认状态!" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:499 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:373 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_panel_button.htm:41 msgid "Defaults Restored!" msgstr "默认值已恢复!" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1351 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1110 msgid "" "Define per-client Mihomo proxy targets. Rules are injected as SRC-IP-CIDR " "entries before the original Clash rules." @@ -752,11 +731,7 @@ msgstr "" msgid "Delay (ms)" msgstr "延迟(ms)" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:888 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:718 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:734 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:750 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:766 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:665 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/server_table.htm:319 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/subscribe_actions_footer.htm:196 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/subscribe_actions_footer.htm:328 @@ -834,7 +809,7 @@ msgstr "国内 DNS 服务器" msgid "Downlink Capacity(Default:Mbps)" msgstr "下行链路容量(默认:Mbps)" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:624 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:451 msgid "Download Source" msgstr "下载源" @@ -842,10 +817,6 @@ msgstr "下载源" msgid "Download failed" msgstr "下载失败" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:355 -msgid "Downloading File..." -msgstr "文件下载中..." - #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:971 msgid "Dual-stack Listening Socket" msgstr "双栈 Socket 监听" @@ -878,7 +849,7 @@ msgstr "编辑服务器配置" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server-config.lua:54 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server.lua:101 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:676 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1355 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1114 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/subscribe_actions_footer.htm:184 msgid "Enable" msgstr "启用" @@ -1052,7 +1023,7 @@ msgstr "示例:" msgid "Expecting: %s" msgstr "应为:%s" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1343 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1102 msgid "Export Client Rules" msgstr "批量导出客户端规则" @@ -1064,7 +1035,7 @@ msgstr "解压失败" msgid "FORCE BRUTAL" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1269 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1048 msgid "Failed to clear all client proxy rules." msgstr "清空所有客户端代理规则失败。" @@ -1093,7 +1064,7 @@ msgstr "获取组件信息失败。" msgid "Failed to query geo database information." msgstr "获取 Geo 数据库信息失败。" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1009 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:786 msgid "Failed to save custom client proxy rules." msgstr "保存自定义客户端代理规则失败。" @@ -1204,16 +1175,16 @@ msgstr "Gecko 包大小(最大)" msgid "Gecko Packet Size (min)" msgstr "Gecko 包大小(最小)" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:664 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:491 msgid "Geo Database Update" msgstr "Geo 数据库更新" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:673 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:500 msgid "Geo Resource" msgstr "Geo 资源" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/component.lua:14 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:628 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:455 msgid "GitHub Direct" msgstr "GitHub 直连" @@ -1348,7 +1319,7 @@ msgstr "HTTPUpgrade 主机名" msgid "Httpupgrade Path" msgstr "HTTPUpgrade 路径" -#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:459 +#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:420 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:467 msgid "Hysteria2" msgstr "" @@ -1409,7 +1380,7 @@ msgstr "如果你使用自签证书,请选择" msgid "Import" msgstr "导入配置信息" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1344 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1103 msgid "Import Client Rules" msgstr "批量导入客户端规则" @@ -1612,8 +1583,8 @@ msgstr "Linux 内核 TUN 虚拟网卡需要系统支持和 root 权限。" msgid "Listen only on the given interface or, if unspecified, on all" msgstr "仅监听指定的接口,未指定则监听全部。" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1017 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1070 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:794 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:847 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_panel.htm:84 msgid "Loading..." msgstr "加载中..." @@ -1631,7 +1602,7 @@ msgstr "本机服务端" msgid "Local addresses" msgstr "本地地址" -#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:697 +#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:666 msgid "Log" msgstr "日志" @@ -1688,22 +1659,18 @@ msgstr "最大分片数" msgid "Maximum packet size the socks5 server can receive from external" msgstr "socks5 服务器可以从外部接收的最大数据包大小(单位:字节)" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:759 -msgid "Metacubexd Panel" -msgstr "Metacubexd 面板" - -#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:415 -#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:418 -#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:421 -#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:427 -#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:443 +#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:376 +#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:379 +#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:382 +#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:388 +#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:404 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:13 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:643 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:470 msgid "Mihomo" msgstr "Mihomo" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1318 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1319 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1087 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1088 msgid "Mihomo Pannel" msgstr "Mihomo 面板" @@ -1783,10 +1750,10 @@ msgstr "" msgid "NOT RUNNING" msgstr "未运行" -#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:453 +#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:414 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:398 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:17 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:644 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:471 msgid "NaiveProxy" msgstr "" @@ -1838,14 +1805,10 @@ msgstr "没有可用的核心(Shadowsocks, Mihomo 或 Xray)可以导入此 msgid "No custom YAML file was selected." msgstr "没有选择自定义 YAML 文件。" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:773 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:550 msgid "No custom client proxy rules yet." msgstr "暂无自定义客户端代理规则。" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:565 -msgid "No dashboard panel installed. Please install one first." -msgstr "未安装 Dashboard 面板,请先安装至少一个面板。" - #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/refresh.htm:21 msgid "No new data!" msgstr "你已经是最新数据,无需更新!" @@ -1858,7 +1821,7 @@ msgstr "没有上传证书。" msgid "No subscription items found" msgstr "没有找到任何订阅项" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:914 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:691 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_panel.htm:32 msgid "No switchable proxy groups found." msgstr "未找到可切换的代理组。" @@ -1982,7 +1945,7 @@ msgid "Only when Socks5 Auth Mode is password valid, Not mandatory." msgstr "仅当 Socks5 认证方式为 Password 时有效,非必填。" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:28 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:677 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:504 msgid "OpenClash GeoSite Database" msgstr "OpenClash GeoSite 数据库" @@ -2006,7 +1969,7 @@ msgstr "" msgid "Package Manager" msgstr "包管理器" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:638 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:465 msgid "Package Name" msgstr "组件包名称" @@ -2023,10 +1986,6 @@ msgstr "数据包 | Rand 长度" msgid "Panel" msgstr "面板" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:705 -msgid "Panel Version Management" -msgstr "面板版本管理" - #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:540 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server-config.lua:95 msgid "Password" @@ -2073,7 +2032,7 @@ msgstr "请填写 Clash 订阅 URL 或本地 YAML 路径中的至少一项。" msgid "Plugin Opts" msgstr "插件参数" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1357 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1116 msgid "Policy" msgstr "策略" @@ -2178,22 +2137,22 @@ msgstr "" msgid "RST Backup" msgstr "恢复备份" -#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:481 +#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:442 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/status.htm:7 msgid "RUNNING" msgstr "运行中" -#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:474 +#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:435 msgid "RUNNING in %s (%s) Mode" msgstr "运行中,当前为 %s(%s)模式" -#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:478 +#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:439 msgid "RUNNING in %s Mode" msgstr "运行中,当前为 %s 模式" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:903 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1051 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1101 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:680 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:828 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:878 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_panel.htm:93 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:291 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/subscribe.htm:253 @@ -2213,7 +2172,7 @@ msgid "Realm URL" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:860 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:474 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:348 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_panel_button.htm:17 msgid "Reapply" msgstr "重新应用" @@ -2263,14 +2222,14 @@ msgstr "发布包名" msgid "Reload YAML" msgstr "重载 YAML" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:467 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:341 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_panel_button.htm:10 msgid "Reloading YAML..." msgstr "正在重载 YAML..." #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server-config.lua:135 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server-config.lua:136 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1358 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1117 msgid "Remarks" msgstr "备注" @@ -2291,14 +2250,14 @@ msgstr "获取 TLS 证书链指纹需要 OpenSSL 支持。" msgid "Reserved bytes(optional)" msgstr "保留字节(可选)" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1310 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1311 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1080 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1081 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_panel_button.htm:62 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_panel_button.htm:63 msgid "Reset Default Proxies Rules" msgstr "重置代理分组规则" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:502 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:376 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_panel_button.htm:44 msgid "Reset Defaults Failed!" msgstr "重置默认值失败!" @@ -2308,7 +2267,7 @@ msgstr "重置默认值失败!" msgid "Reset complete" msgstr "重置完成" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:488 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:362 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_panel_button.htm:30 msgid "Reset saved Mihomo proxy-group selections and restore YAML defaults?" msgstr "要清空已保存的 Mihomo 分组选择,并恢复为 YAML 默认值吗?" @@ -2317,7 +2276,7 @@ msgstr "要清空已保存的 Mihomo 分组选择,并恢复为 YAML 默认值 msgid "Reset to defaults" msgstr "恢复出厂设置" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:492 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:366 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_panel_button.htm:34 msgid "Resetting Defaults..." msgstr "正在重置默认值..." @@ -2357,7 +2316,7 @@ msgstr "运行中" msgid "Running Mode" msgstr "运行模式" -#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:455 +#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:416 msgid "SOCKS5" msgstr "SOCKS5" @@ -2365,20 +2324,20 @@ msgstr "SOCKS5" msgid "SS URL base64 sstr format not recognized." msgstr "无法识别 SS URL 的 Base64 格式。" -#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:690 +#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:647 msgid "SSR Client" msgstr "客户端" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:5 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:641 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:468 msgid "SSR Plus+ Main Program" msgstr "SSR Plus+ 主程序" -#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:694 +#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:651 msgid "SSR Server" msgstr "服务端" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1347 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1106 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/subscribe_actions_footer.htm:195 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/subscribe_actions_footer.htm:327 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/subscribe_actions_footer.htm:352 @@ -2404,7 +2363,7 @@ msgstr "保存当前订阅设置" msgid "Save failed:" msgstr "保存失败:" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:986 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:763 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/subscribe_actions_footer.htm:81 msgid "Saving..." msgstr "保存中..." @@ -2413,10 +2372,6 @@ msgstr "保存中..." msgid "Second" msgstr "周期" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1327 -msgid "Select Dashboard Panel" -msgstr "选择 Dashboard 面板" - #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1744 msgid "Self-signed Certificate" msgstr "自签证书" @@ -2456,7 +2411,7 @@ msgstr "服务端类型" msgid "Server failsafe auto swith and custom update settings" msgstr "服务器节点故障自动切换/广告屏蔽/中国大陆 IP 段数据库更新设置" -#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:691 +#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:648 msgid "Servers Nodes" msgstr "服务器节点" @@ -2468,15 +2423,6 @@ msgstr "服务器节点订阅与管理" msgid "Session Ticket" msgstr "会话凭据" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:387 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:403 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:721 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:737 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:753 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:769 -msgid "Set to Default" -msgstr "设为默认" - #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:407 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:615 msgid "Shadow-TLS" @@ -2486,15 +2432,15 @@ msgstr "" msgid "Shadow-TLS ChainPoxy type" msgstr "代理链类型" -#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:416 +#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:377 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:392 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:462 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server-config.lua:61 msgid "ShadowSocks" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:428 -#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:430 +#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:389 +#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:391 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:395 msgid "ShadowSocks-Rust" msgstr "" @@ -2503,7 +2449,7 @@ msgstr "" msgid "ShadowSocks-rust Version" msgstr "ShadowSocks-rust 版本" -#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:685 +#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:644 msgid "ShadowSocksR Plus+" msgstr "" @@ -2511,7 +2457,7 @@ msgstr "" msgid "ShadowSocksR Plus+ Settings" msgstr "ShadowSocksR Plus+ 设置" -#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:457 +#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:418 msgid "ShadowTLS" msgstr "ShadowTLS" @@ -2520,7 +2466,7 @@ msgstr "ShadowTLS" msgid "Shadowsocks Password" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:424 +#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:385 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:389 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server-config.lua:64 msgid "ShadowsocksR" @@ -2607,7 +2553,7 @@ msgstr "开始探测" msgid "Starting subscription update..." msgstr "正在开始更新订阅..." -#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:696 +#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:653 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:130 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:132 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:134 @@ -2695,39 +2641,21 @@ msgstr "" "支持以“,”分隔的十进制数字,或者经过 Base64 编码的字符串,其最大长度为 3 个字" "节。" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:373 -msgid "Switch Failed" -msgstr "切换失败" - -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:365 -msgid "Switch Successful" -msgstr "切换成功" - -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:365 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:432 -msgid "Switch To Meta Version" -msgstr "切换至 Meta 版本" - -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:365 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:431 -msgid "Switch To Official Version" -msgstr "切换至官方版本" - #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:104 msgid "Switch check cycly(second)" msgstr "自动切换检查周期(秒)" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:953 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:730 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_panel.htm:71 msgid "Switch failed." msgstr "切换失败。" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:950 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:727 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_panel.htm:68 msgid "Switched successfully." msgstr "切换成功。" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:943 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:720 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_panel.htm:61 msgid "Switching..." msgstr "正在切换..." @@ -2781,7 +2709,7 @@ msgstr "TLS 主机名" msgid "TLS is used to verify the leaf certificate name." msgstr "TLS 用于验证 leaf 证书的 name。" -#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:422 +#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:383 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:404 msgid "TUIC" msgstr "TUIC" @@ -2860,8 +2788,8 @@ msgstr "" "在线升级只跟踪 Mihomo 最新稳定版,并根据当前架构从官方 GitHub 发布页下载匹配" "的 Linux 压缩包。" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1039 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:1094 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:816 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:871 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_panel.htm:89 msgid "This Clash total node is not active. Apply this node first." msgstr "该 Clash 总节点当前未启用,请先应用该节点。" @@ -2915,7 +2843,7 @@ msgstr "传输协议" msgid "Transport Protocol" msgstr "传输协议" -#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:451 +#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:412 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:461 msgid "Trojan" msgstr "Trojan" @@ -3006,10 +2934,6 @@ msgstr "不支持的组件" msgid "Unsupported package manager" msgstr "不支持的包管理器" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:372 -msgid "Unzip Error" -msgstr "解压失败" - #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/subscribe_actions_footer.htm:197 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/subscribe_actions_footer.htm:332 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/subscribe_actions_footer.htm:333 @@ -3020,10 +2944,6 @@ msgstr "更新" msgid "Update All Subscribe Servers" msgstr "更新所有订阅节点" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:373 -msgid "Update Failed" -msgstr "更新失败" - #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:511 msgid "Update Interval(min)" msgstr "更新间隔(分钟)" @@ -3032,16 +2952,6 @@ msgstr "更新间隔(分钟)" msgid "Update Mode" msgstr "更新模式" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:362 -msgid "Update Successful" -msgstr "更新成功" - -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:362 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:425 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:427 -msgid "Update Version" -msgstr "更新版本" - #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:482 msgid "Update cycle (Day/Week)" msgstr "更新周期(天/周)" @@ -3070,8 +2980,8 @@ msgstr "更新中..." #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:173 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:326 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:654 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:689 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:481 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:516 msgid "Upgrade" msgstr "升级" @@ -3179,12 +3089,12 @@ msgid "Using incorrect encryption mothod may causes service fail to start" msgstr "输入不正确的参数组合可能会导致服务无法启动" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:33 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:678 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:505 msgid "V2Ray GeoIP Databases" msgstr "V2Ray GeoIP 数据库" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:37 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:679 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:506 msgid "V2Ray GeoSite Databases" msgstr "V2Ray GeoSite 数据库" @@ -3296,7 +3206,7 @@ msgstr "XHTTP 路径" msgid "XTLS" msgstr "" -#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:445 +#: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:406 msgid "Xray" msgstr "Xray" @@ -3309,32 +3219,24 @@ msgid "Xray Noise Packets" msgstr "Xray 噪声数据包" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:9 -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:642 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:469 msgid "Xray-core" msgstr "Xray-core" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:477 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:351 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_panel_button.htm:20 msgid "YAML Reload Failed!" msgstr "YAML 重载失败!" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:474 +#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_main_panel.htm:348 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/clash_panel_button.htm:17 msgid "YAML Reloaded!" msgstr "YAML 已重载!" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:711 -msgid "Yacd Panel" -msgstr "Yacd 面板" - #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:273 msgid "Yes" msgstr "是" -#: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/component.htm:743 -msgid "Zashboard Panel" -msgstr "Zashboard 面板" - #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:157 msgid "adblock_url" msgstr "广告屏蔽更新 URL" diff --git a/luci-app-ssr-plus/root/etc/init.d/shadowsocksr b/luci-app-ssr-plus/root/etc/init.d/shadowsocksr index 3cacf7e1..1b050327 100755 --- a/luci-app-ssr-plus/root/etc/init.d/shadowsocksr +++ b/luci-app-ssr-plus/root/etc/init.d/shadowsocksr @@ -611,9 +611,7 @@ prepare_clash_runtime_config() { local enable_fake_ip local socks5_auth local socks5_user - local default_dashboard - local yacd_type - local dashboard_type + local socks5_pass cache_file="$(get_clash_cache_file "$sid")" workdir="$(get_clash_workdir "$sid")" @@ -637,41 +635,11 @@ prepare_clash_runtime_config() { cp -f "$cache_file" "$raw_file" filter_clash_yaml_proxies "$raw_file" - default_dashboard=$(uci_get_by_type global default_dashboard "zashboard") - yacd_type=$(uci_get_by_type global yacd_type "Meta") - dashboard_type=$(uci_get_by_type global dashboard_type "Official") - case "$default_dashboard" in - dashboard) - if [ "$dashboard_type" = "Official" ]; then - EXTERNAL_UI_URL="https://codeload.github.com/ayanamist/clash-dashboard/zip/refs/heads/gh-pages" - else - EXTERNAL_UI_URL="https://codeload.github.com/MetaCubeX/Razord-meta/zip/refs/heads/gh-pages" - fi - ;; - yacd) - if [ "$yacd_type" = "Official" ]; then - EXTERNAL_UI_URL="https://codeload.github.com/haishanh/yacd/zip/refs/heads/gh-pages" - else - EXTERNAL_UI_URL="https://codeload.github.com/MetaCubeX/Yacd-meta/zip/refs/heads/gh-pages" - fi - ;; - metacubexd) - EXTERNAL_UI_URL="https://codeload.github.com/MetaCubeX/metacubexd/zip/refs/heads/gh-pages" - ;; - zashboard|*) - EXTERNAL_UI_URL="https://codeload.github.com/Zephyruso/zashboard/zip/refs/heads/gh-pages-cdn-fonts" - default_dashboard="zashboard" - ;; - esac - cat >"$overlay_file" <<-EOF redir-port: $local_port tproxy-port: $local_port - external-controller: 0.0.0.0:$CLASH_API_PORT - secret: "" - external-ui: /usr/share/shadowsocksr/ui - external-ui-name: $default_dashboard - external-ui-url: $EXTERNAL_UI_URL + external-controller: 127.0.0.1:$CLASH_API_PORT + secret: $clash_secret allow-lan: true bind-address: 0.0.0.0 routing-mark: $CLASH_OUTBOUND_MARK @@ -2508,7 +2476,7 @@ Start_Run() { return 1 } clash_workdir="$(get_clash_workdir "$GLOBAL_SERVER")" - SAFE_PATHS="/usr/share/shadowsocksr/" ln_start_bin "$mihomo_bin" ssr-retcp -d "$clash_workdir" -f "$clash_workdir/config.yaml" + ln_start_bin "$mihomo_bin" ssr-retcp -d "$clash_workdir" -f "$clash_workdir/config.yaml" echolog "Main node: $($mihomo_bin -v 2>&1 | head -1 | awk '{print $1, $3}') (Clash) Started!" ;; socks5) @@ -2534,13 +2502,11 @@ load_config() { else GLOBAL_SERVER=$switch_server fi - # 全局 socks5 注释掉后配合 advanced.lua 中取消注释 -- Server Selection 选项 if [ "$(uci_get_by_type socks5_proxy enabled 0)" = "1" ]; then uci -q set "$NAME.@socks5_proxy[0].server=same" else uci -q set "$NAME.@socks5_proxy[0].server=nil" fi - # 全局 3proxy 注释掉后配合 advanced.lua 中取消注释 -- Server Selection 选项 if [ "$(uci_get_by_type http_proxy enabled 0)" = "1" ]; then uci -q set "$NAME.@http_proxy[0].server=same" else diff --git a/luci-app-ssr-plus/root/etc/uci-defaults/luci-ssr-plus b/luci-app-ssr-plus/root/etc/uci-defaults/luci-ssr-plus index 82c7f97f..0fa213b6 100755 --- a/luci-app-ssr-plus/root/etc/uci-defaults/luci-ssr-plus +++ b/luci-app-ssr-plus/root/etc/uci-defaults/luci-ssr-plus @@ -84,18 +84,6 @@ if [ -s "/etc/config/shadowsocksr" ]; then uci -q set shadowsocksr.@global[0].component_mirror='direct' fi - if ! uci -q get shadowsocksr.@global[0].yacd_type > /dev/null; then - uci -q set shadowsocksr.@global[0].yacd_type='Meta' - fi - - if ! uci -q get shadowsocksr.@global[0].dashboard_type > /dev/null; then - uci -q set shadowsocksr.@global[0].dashboard_type='Official' - fi - - if ! uci -q get shadowsocksr.@global[0].default_dashboard > /dev/null; then - uci -q set shadowsocksr.@global[0].default_dashboard='zashboard' - fi - if ! uci -q get shadowsocksr.@global[0].filter_aaaa > /dev/null; then legacy_filter_aaaa="$(uci -q get shadowsocksr.@global[0].mosdns_ipv6)" uci -q set shadowsocksr.@global[0].filter_aaaa="${legacy_filter_aaaa:-1}" diff --git a/luci-app-ssr-plus/root/usr/share/shadowsocksr/shadowsocksr.config b/luci-app-ssr-plus/root/usr/share/shadowsocksr/shadowsocksr.config index e8cfa5ea..67c3af72 100644 --- a/luci-app-ssr-plus/root/usr/share/shadowsocksr/shadowsocksr.config +++ b/luci-app-ssr-plus/root/usr/share/shadowsocksr/shadowsocksr.config @@ -15,9 +15,6 @@ config global option switch_try_count '3' option default_node_local_port '1234' option component_mirror 'direct' - option yacd_type 'Meta' - option dashboard_type 'Official' - option default_dashboard 'zashboard' option gfwlist_url 'https://fastly.jsdelivr.net/gh/YW5vbnltb3Vz/domain-list-community@release/gfwlist.txt' option chnroute_url 'https://ispip.clang.cn/all_cn.txt' option adblock_url 'https://anti-ad.net/anti-ad-for-dnsmasq.conf' diff --git a/luci-app-ssr-plus/root/usr/share/shadowsocksr/ui/zashboard/.nojekyll b/luci-app-ssr-plus/root/usr/share/shadowsocksr/ui/zashboard/.nojekyll deleted file mode 100644 index e69de29b..00000000 diff --git a/luci-app-ssr-plus/root/usr/share/shadowsocksr/ui/zashboard/CNAME b/luci-app-ssr-plus/root/usr/share/shadowsocksr/ui/zashboard/CNAME deleted file mode 100644 index a922593b..00000000 --- a/luci-app-ssr-plus/root/usr/share/shadowsocksr/ui/zashboard/CNAME +++ /dev/null @@ -1 +0,0 @@ -board.zash.run.place diff --git a/luci-app-ssr-plus/root/usr/share/shadowsocksr/ui/zashboard/THIRD_PARTY_NOTICES.md b/luci-app-ssr-plus/root/usr/share/shadowsocksr/ui/zashboard/THIRD_PARTY_NOTICES.md deleted file mode 100644 index 15f5075c..00000000 --- a/luci-app-ssr-plus/root/usr/share/shadowsocksr/ui/zashboard/THIRD_PARTY_NOTICES.md +++ /dev/null @@ -1,30 +0,0 @@ -# Third-party notices - -## Earth textures - -The Earth day, night, bump, roughness, and cloud textures in -`src/assets/images/earth/` are resized/combined derivatives of the Solar System -Scope planet textures. `background.jpg` preserves the downloaded 2K stars image. - -- Source: https://www.solarsystemscope.com/textures/ -- 2K stars source: https://www.solarsystemscope.com/textures/download/2k_stars.jpg -- Creator: Solar System Scope -- License: Creative Commons Attribution 4.0 International (CC BY 4.0) - https://creativecommons.org/licenses/by/4.0/ - -The node-material treatment is adapted from the Three.js WebGPU TSL Earth -example (Three.js, MIT License): -https://threejs.org/examples/webgpu_tsl_earth.html - -## DB-IP City Lite - -The application can download `dbip-city-lite@1.0.16` on explicit user request. -The database is not bundled with this application. It is downloaded into and -queried from the user's browser storage. - -- Source: https://www.npmjs.com/package/dbip-city-lite/v/1.0.16 -- Data provider: DB-IP.com, https://db-ip.com/db/lite.php -- License: Creative Commons Attribution 4.0 International (CC BY 4.0) - https://creativecommons.org/licenses/by/4.0/ - -IP geolocation data provided by DB-IP.com. diff --git a/luci-app-ssr-plus/root/usr/share/shadowsocksr/ui/zashboard/apple-touch-icon.png b/luci-app-ssr-plus/root/usr/share/shadowsocksr/ui/zashboard/apple-touch-icon.png deleted file mode 100644 index 2e4b12c5..00000000 Binary files a/luci-app-ssr-plus/root/usr/share/shadowsocksr/ui/zashboard/apple-touch-icon.png and /dev/null differ diff --git a/luci-app-ssr-plus/root/usr/share/shadowsocksr/ui/zashboard/assets/EarthGlobeCard-DQPfbIzt.css b/luci-app-ssr-plus/root/usr/share/shadowsocksr/ui/zashboard/assets/EarthGlobeCard-DQPfbIzt.css deleted file mode 100644 index c79effae..00000000 --- a/luci-app-ssr-plus/root/usr/share/shadowsocksr/ui/zashboard/assets/EarthGlobeCard-DQPfbIzt.css +++ /dev/null @@ -1 +0,0 @@ -.earth-globe-card--expanded[data-v-dede773a]{z-index:60;border-radius:0;flex-direction:column;display:flex;position:fixed;inset:0}@media (width>=769px){.home-page.sidebar-expanded{left:16rem}.home-page.sidebar-collapsed{left:4.5rem}} diff --git a/luci-app-ssr-plus/root/usr/share/shadowsocksr/ui/zashboard/assets/EarthGlobeCard-DhFkBz8U.js b/luci-app-ssr-plus/root/usr/share/shadowsocksr/ui/zashboard/assets/EarthGlobeCard-DhFkBz8U.js deleted file mode 100644 index 4fe29435..00000000 --- a/luci-app-ssr-plus/root/usr/share/shadowsocksr/ui/zashboard/assets/EarthGlobeCard-DhFkBz8U.js +++ /dev/null @@ -1,2 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./earth-renderer-Dh_x8rMR.js","./palette-DPyxzM37.js"])))=>i.map(i=>d[i]); -import{$ as e,A as t,B as n,D as r,E as i,F as a,G as o,H as s,I as c,J as l,K as u,L as ee,M as te,O as d,P as f,Q as p,R as m,S as ne,T as re,U as ie,V as h,W as g,X as _,Y as ae,Z as oe,a as se,at as v,b as ce,c as y,ct as b,d as le,et as ue,f as de,g as x,h as S,i as fe,it as C,j as pe,k as me,l as w,lt as T,m as E,n as he,nt as D,o as O,ot as k,p as ge,q as _e,r as ve,rt as ye,s as be,st as xe,t as Se,u as Ce,w as we,x as Te,y as Ee,z as A}from"./index-DC9m9n9t.js";import{t as De}from"./palette-DPyxzM37.js";var Oe=T(Ce(),1),j=e=>{try{return Oe.parse(e).toNormalizedString()}catch{return null}},M=e=>{let t=e.trim();if(!t)return null;let n=j(t);if(n)return n;if(t.startsWith(`[`)){let e=t.indexOf(`]`);if(e>1)return j(t.slice(1,e))}let r=t.lastIndexOf(`:`);return r>0&&/^\d+$/.test(t.slice(r+1))?j(t.slice(0,r)):null},N=e=>{let t=w(),n=[];for(let r of e){let e=M(t.destination(r)),i=t.hostname(r).trim().replace(/\.$/,``);!e&&!i||n.push({destinationIP:e,resolutionHost:i.toLowerCase(),upload:Math.max(0,r.uploadSpeed),download:Math.max(0,r.downloadSpeed),host:i||e||``,downloaded:Math.max(0,t.download(r)),direct:t.isDirect(r)})}return n},P=({latitude:e,longitude:t})=>`${e.toFixed(4)},${t.toFixed(4)}`,F=(...e)=>e.flat().sort((e,t)=>t.downloaded-e.downloaded).slice(0,5),I=e=>e!==null&&e.latitude!==null&&e.longitude!==null&&Number.isFinite(e.latitude)&&Number.isFinite(e.longitude)&&e.latitude>=-90&&e.latitude<=90&&e.longitude>=-180&&e.longitude<=180,L=(e,t,n)=>{let r,i;if(n&&I(n))r=n.latitude,i=n.longitude;else if(t&&I(t))r=t.latitude,i=t.longitude;else return null;return{ip:e,latitude:r,longitude:i,city:n?.city.trim()||t?.city||``,country:t?.country||n?.country.trim()||``}},ke=async(e,t,n,r,i,a)=>{let o=j(t);if(!o)return{routes:[],origin:null};let s=N(e),c=[...new Set(s.filter(e=>!e.destinationIP).map(e=>e.resolutionHost))],l=a&&c.length>0?await a(c):{};for(let e of s)e.destinationIP||=j(l[e.resolutionHost]??``);let u=s.filter(e=>e.destinationIP!==null),ee=new Set([o]);for(let e of u)ee.add(e.destinationIP);let te=await r([...ee],n),d=L(o,te[o],i);if(!d)return{routes:[],origin:null};let f=new Map;for(let e of u){let t=te[e.destinationIP];if(!t)continue;let n=[{...d,role:`origin`},{...t,role:`destination`}],r=n.map(e=>`${e.role}:${P(e)}`).join(`>`),i=f.get(r);i?(i.direct&&=e.direct,i.connections+=1,i.upload+=e.upload,i.download+=e.download,i.topHosts=F(i.topHosts,e.host?[{host:e.host,downloaded:e.downloaded}]:[])):f.set(r,{key:r,path:n,direct:e.direct,connections:1,upload:e.upload,download:e.download,topHosts:e.host?[{host:e.host,downloaded:e.downloaded}]:[]})}return{routes:[...f.values()],origin:d}},Ae=617e5;u(),e(),v(),f();var je={class:`flex items-center justify-between`},Me={class:`text-base-content/60 text-xs font-semibold tracking-wider uppercase`},Ne={class:`flex items-center gap-1`},Pe=[`aria-label`,`title`,`aria-pressed`],Fe=[`aria-label`,`title`,`aria-pressed`],Ie=[`aria-label`,`title`,`aria-pressed`],Le={class:`pointer-events-none absolute top-2 right-2 left-2 flex flex-wrap gap-1.5 text-xs`},Re={class:`bg-base-100/75 pointer-events-auto flex h-8 items-center gap-1.5 rounded-lg px-2 shadow backdrop-blur-md`},ze={class:`text-base-content/60`},Be={class:`font-mono`},Ve=[`aria-label`],He=[`aria-label`],Ue={class:`pointer-events-none absolute right-2 bottom-2 left-2 flex items-end justify-between gap-2`},We=[`aria-label`],Ge={class:`text-base-content/70 whitespace-nowrap`},Ke={key:0,class:`pointer-events-none absolute inset-0 flex items-center justify-center p-4`},qe={class:`bg-base-100/90 max-w-sm rounded-xl p-4 text-center text-sm shadow-xl backdrop-blur-md`},Je={class:`text-error`},Ye={key:1,class:`pointer-events-none absolute inset-0 flex items-center justify-center`},Xe={class:`bg-base-100/85 flex items-center gap-2 rounded-xl px-4 py-3 text-sm shadow-xl backdrop-blur-md`},Ze={key:2,class:`pointer-events-none absolute inset-0 flex items-center justify-center p-4`},Qe={class:`bg-base-100/90 pointer-events-auto max-w-md rounded-xl p-4 text-sm shadow-xl backdrop-blur-md`},$e={class:`font-semibold`},et={class:`text-base-content/70 mt-1.5 leading-5`},tt={key:0,class:`text-warning mt-1.5 text-xs`},nt={class:`mt-3 flex items-center gap-2`},rt={class:`link text-xs`,href:`https://db-ip.com/db/lite.php`,target:`_blank`,rel:`noopener noreferrer`},it={key:3,class:`pointer-events-none absolute inset-0 flex items-center justify-center p-4`},at={class:`bg-base-100/90 pointer-events-auto w-80 max-w-full rounded-xl p-4 text-sm shadow-xl backdrop-blur-md`},ot={class:`flex items-center justify-between gap-3`},st={class:`font-semibold`},ct={class:`text-base-content/60 text-xs`},lt=[`value`],ut={key:4,class:`pointer-events-none absolute inset-0 flex items-center justify-center p-4`},dt={class:`bg-base-100/90 pointer-events-auto max-w-sm rounded-xl p-4 text-center text-sm shadow-xl backdrop-blur-md`},ft={class:`text-error`},pt={key:5,class:`pointer-events-none absolute inset-0 flex items-center justify-center p-4`},mt={class:`bg-base-100/85 rounded-xl px-4 py-3 text-sm shadow-xl backdrop-blur-md`},ht={key:6,class:`pointer-events-none absolute inset-0 flex items-center justify-center p-4`},gt={class:`bg-base-100/75 rounded-xl px-4 py-3 text-sm shadow backdrop-blur-md`},_t={class:`font-semibold`},vt={class:`text-base-content/65 mt-1`},yt={class:`text-base-content/65`},bt={key:0,class:`border-base-300 mt-2 border-t pt-1.5`},xt={class:`text-base-content/55 mb-1`},St={class:`min-w-0 truncate font-mono`},Ct={class:`text-base-content/55 shrink-0`},wt=400,Tt=1e3,R=O(o({__name:`EarthGlobeCard`,setup(e){let{t:o}=ge(),u=Object.values(ne).map(e=>({value:e,label:e})),f=D(),v=ye(),w=D(``),T=D(`checking`),O=D(),Ce=D(!1),j=D(0),M=D(Ae),N=D(``),P=D(null),F=D(`loading`),I=D(!1),L=D(!0),R=D(!1),z=D(!1),B=D(0),Et=D(!1),V=D(null),Dt=D({x:0,y:0}),Ot=te(`(prefers-reduced-motion: reduce)`),H=new Map,U=new Map,W=new Map,kt=be(6),G=new Map,At=0,K=null,q=null,jt=!1,Mt=!1,J=!1,Y=0,X=null,Z=null,Q=null,Nt=e=>!!(e&&Oe.isValid(e)),Pt=e=>{try{return Oe.parse(e).toNormalizedString()}catch{return null}},Ft=e=>{if(!Nt(e))return`—`;let t=Oe.parse(e);if(t.kind()===`ipv4`){let e=t.toByteArray();return`${e[0]}.${e[1]}.*.*`}let n=t.toNormalizedString().split(`:`);return`${n[0]}:${n[1]}:****:****`},It=m(()=>S.value===`2d`),Lt=m(()=>It.value||x.value===`flat`),Rt=m(()=>F.value===`loading`?o(`getting`):F.value===`error`?o(`testFailed`):I.value?N.value:Ft(N.value)),zt=m(()=>Math.min(100,j.value/Math.max(1,M.value)*100)),Bt=m(()=>{let e=Te(j.value);return M.value?`${e} / ${Te(M.value)}`:e}),Vt=m(()=>o(`earthDatabaseError_${O.value??`unknown`}`)),Ht=m(()=>T.value===`error`||F.value===`error`||T.value===`ready`&&B.value===0&&y.value.length>0),Ut=m(()=>T.value===`ready`&&F.value===`ready`&&!Et.value&&B.value===0),Wt=m(()=>[{color:De.origin,label:o(`earthRole_origin`)},{color:De.destination,label:o(`earthLegendProxied`)},{color:De.direct,label:o(`direct`)}]),Gt=m(()=>({left:`${Math.min(window.innerWidth-190,Dt.value.x+12)}px`,top:`${Math.min(window.innerHeight-100,Dt.value.y+12)}px`})),Kt=e=>K?.postMessage(e),qt=e=>{let t=U.get(e);if(t&&t.expiresAt>Date.now())return Promise.resolve(t.ip);let n=W.get(e);if(n)return n;let r=kt(async()=>{for(let{type:t,answerType:n}of[{type:`A`,answerType:1},{type:`AAAA`,answerType:28}])try{let r=await de({name:e,type:t});for(let t of r.Answer??[]){let r=t.type===n?Pt(t.data):null;if(r)return U.set(e,{ip:r,expiresAt:Date.now()+Math.max(1,t.TTL)*1e3}),r}}catch{}return U.set(e,{ip:null,expiresAt:Date.now()+3e4}),null}).finally(()=>W.delete(e));return W.set(e,r),r},Jt=async e=>{let t=await Promise.all(e.map(async e=>[e,await qt(e)]));for(;U.size>4096;){let e=U.keys().next().value;if(e===void 0)break;U.delete(e)}return Object.fromEntries(t)},Yt=async(e,t)=>{let n={},r=[];for(let t of e)H.has(t)?n[t]=H.get(t)??null:r.push(t);if(r.length>0){let e=++At,i=await new Promise(n=>{G.set(e,n),Kt({type:`lookup`,id:e,ips:r,locale:t})});for(let[e,t]of Object.entries(i))H.set(e,t),n[e]=t;for(;H.size>8192;){let e=H.keys().next().value;if(e===void 0)break;H.delete(e)}}return n},Xt=async()=>{if(jt){Mt=!0;return}jt=!0;do{if(Mt=!1,T.value!==`ready`||!Nt(N.value)){B.value=0,v.value?.setRoutes([]);continue}Et.value=!0;let e=y.value,t=N.value,n=Y,r=E.value!==ne.IPIP&&P.value?{latitude:P.value.latitude,longitude:P.value.longitude,city:P.value.city,country:P.value.country}:null;try{let i=await ke(e,t,Ee.value,Yt,r,Jt);!J&&n===Y&&t===N.value&&(B.value=i.routes.length,i.origin&&v.value?.setInitialLocation(i.origin),v.value?.setRoutes(i.routes))}catch{!J&&n===Y&&t===N.value&&(B.value=0,v.value?.setRoutes([]))}finally{Et.value=!1}}while(Mt&&!J);jt=!1},$=()=>{q&&clearTimeout(q),q=setTimeout(()=>{q=null,Xt()},150)},Zt=async(e=!1)=>{let t=++Y,n=E.value,r=e?null:Se(n);if(r&&Nt(r.ip)){N.value=r.ip,P.value=r,F.value=`ready`,$();return}F.value=`loading`,N.value=``,P.value=null,B.value=0,v.value?.setRoutes([]);try{let e=await ve(n);if(!Nt(e.ip))throw Error(`Invalid origin IP`);if(t!==Y||n!==E.value)return;N.value=e.ip,P.value=e,F.value=`ready`,$()}catch{if(t!==Y||n!==E.value)return;F.value=`error`,N.value=``,P.value=null}},Qt=()=>{O.value=void 0,Kt({type:`download`})},$t=()=>Kt({type:`cancel`}),en=()=>{T.value===`error`&&Qt(),F.value===`error`&&Zt(!0),T.value===`ready`&&F.value===`ready`&&$()},tn=({data:e})=>{if(e.type===`lookup`){G.get(e.id)?.(e.locations),G.delete(e.id);return}T.value=e.status,e.error&&(O.value=e.error),e.recoveredCorruptCache&&(Ce.value=!0),e.received!=null&&(j.value=e.received),e.total!=null&&(M.value=e.total),e.status===`ready`&&(H.clear(),$()),e.status!==`ready`&&e.status!==`downloading`&&(B.value=0,v.value?.setRoutes([]))},nn=(e,t,n)=>{V.value=e,t!=null&&n!=null&&(Dt.value={x:t,y:n})},rn=()=>{R.value=!R.value,v.value?.setAutoRotation(!R.value)},an=()=>{L.value=!L.value,v.value?.setCityLabelsVisible(L.value)},on=e=>{e.key===`Escape`&&z.value&&(z.value=!1)};p(y,$),p(E,()=>void Zt()),p(Ee,()=>{H.clear(),$()}),p(Ot,e=>v.value?.setReducedMotion(e)),p(S,e=>v.value?.setProjection(e)),p(x,e=>v.value?.setVisualMode(e)),p(ce,async()=>{await _e(),v.value?.setColorScheme(he.value)},{flush:`post`});let sn=async()=>{if(!J){K=new Worker(new URL(``+new URL(`geoip.worker-CYCCgy29.js`,import.meta.url).href,``+import.meta.url),{type:`module`}),K.addEventListener(`message`,tn),Kt({type:`init`}),Zt(),await _e();try{let{createEarthRenderer:e}=await le(async()=>{let{createEarthRenderer:e}=await import(`./earth-renderer-Dh_x8rMR.js`);return{createEarthRenderer:e}},__vite__mapDeps([0,1]),import.meta.url);if(!f.value||J)return;let t=await e(f.value,{reducedMotion:Ot.value,projection:S.value,visualMode:x.value,colorScheme:he.value,onEndpointHover:nn});if(J){t.dispose();return}v.value=t,t.setAutoRotation(!R.value),t.setCityLabelsVisible(L.value),$()}catch{f.value?.replaceChildren(),w.value=o(`earthRendererError`)}}},cn=()=>{X=setTimeout(()=>{X=null,typeof requestIdleCallback==`function`?Q=requestIdleCallback(()=>{Q=null,sn()},{timeout:Tt}):Z=setTimeout(()=>{Z=null,sn()})},wt)};return ae(()=>{window.addEventListener(`keydown`,on),cn()}),l(()=>{J=!0,window.removeEventListener(`keydown`,on),q&&clearTimeout(q),X&&clearTimeout(X),Z&&clearTimeout(Z),Q!==null&&cancelIdleCallback(Q),v.value?.dispose(),v.value=void 0,K?.removeEventListener(`message`,tn),K?.terminate(),K=null,U.clear(),W.clear(),G.clear()}),(e,l)=>(_(),s(`div`,{class:k([`earth-globe-card base-container p-4`,{"earth-globe-card--expanded":z.value}])},[A(`div`,je,[A(`div`,Me,b(C(o)(`earthGlobeTitle`)),1),A(`div`,Ne,[g(fe,{title:C(o)(`earthProjection`),"model-value":C(S),options:[{value:`3d`,label:`3D`},{value:`2d`,label:`2D`}],"onUpdate:modelValue":l[0]||=e=>S.value=e},null,8,[`title`,`model-value`]),It.value?h(``,!0):(_(),n(se,{key:0,modelValue:C(x),"onUpdate:modelValue":l[1]||=e=>ue(x)?x.value=e:null,class:`select select-ghost select-sm h-8 min-h-8 w-auto border-0`,"aria-label":C(o)(`earthVisualStyle`),title:C(o)(`earthVisualStyle`),options:[{value:`space`,label:C(o)(`earthVisualStyle_space`)},{value:`flat`,label:C(o)(`earthVisualStyle_flat`)}]},null,8,[`modelValue`,`aria-label`,`title`,`options`])),A(`button`,{class:`btn btn-ghost btn-sm btn-square`,"aria-label":C(o)(L.value?`earthHideCityLabels`:`earthShowCityLabels`),title:C(o)(L.value?`earthHideCityLabels`:`earthShowCityLabels`),"aria-pressed":L.value,onClick:an},[g(C(i),{class:k([`h-4 w-4`,{"opacity-40":!L.value}])},null,8,[`class`])],8,Pe),It.value?h(``,!0):(_(),s(`button`,{key:1,class:`btn btn-ghost btn-sm btn-square`,"aria-label":C(o)(R.value?`earthResumeRotation`:`earthPauseRotation`),title:C(o)(R.value?`earthResumeRotation`:`earthPauseRotation`),"aria-pressed":R.value,onClick:rn},[R.value?(_(),n(C(we),{key:0,class:`h-4 w-4`})):(_(),n(C(re),{key:1,class:`h-4 w-4`}))],8,Fe)),A(`button`,{class:`btn btn-ghost btn-sm btn-square`,"aria-label":C(o)(z.value?`earthCollapse`:`earthExpand`),title:C(o)(z.value?`earthCollapse`:`earthExpand`),"aria-pressed":z.value,onClick:l[2]||=e=>z.value=!z.value},[z.value?(_(),n(C(t),{key:0,class:`h-4 w-4`})):(_(),n(C(me),{key:1,class:`h-4 w-4`}))],8,Ie)])]),A(`div`,{class:k([`relative mt-2 w-full overflow-hidden rounded-xl`,[z.value?`min-h-0 flex-1`:`h-96`,Lt.value?`bg-base-200/30`:`bg-black`]])},[A(`div`,{ref_key:`canvasRef`,ref:f,class:`absolute inset-0 touch-none`,onTouchstart:l[3]||=a(()=>{},[`stop`]),onTouchmove:l[4]||=a(()=>{},[`stop`,`prevent`]),onTouchend:l[5]||=a(()=>{},[`stop`]),onTouchcancel:l[6]||=a(()=>{},[`stop`])},null,544),A(`div`,Le,[g(se,{modelValue:C(E),"onUpdate:modelValue":l[7]||=e=>ue(E)?E.value=e:null,class:`select select-sm bg-base-100/75 pointer-events-auto h-8 min-h-8 w-auto rounded-lg border-0 shadow backdrop-blur-md`,"aria-label":C(o)(`earthOriginAPI`),options:C(u)},null,8,[`modelValue`,`aria-label`,`options`]),A(`div`,Re,[A(`span`,ze,b(C(o)(`earthLocalIP`)),1),A(`span`,Be,b(Rt.value),1),A(`button`,{class:`btn btn-ghost btn-circle btn-xs`,"aria-label":C(o)(`earthToggleIP`),onClick:l[8]||=e=>I.value=!I.value},[I.value?(_(),n(C(r),{key:0,class:`h-3.5 w-3.5`})):(_(),n(C(d),{key:1,class:`h-3.5 w-3.5`}))],8,Ve)]),Ht.value?(_(),s(`button`,{key:0,class:`btn btn-sm btn-square pointer-events-auto`,"aria-label":C(o)(`retry`),onClick:en},[g(C(pe),{class:`h-4 w-4`})],8,He)):h(``,!0)]),A(`div`,Ue,[A(`div`,{class:k([`pointer-events-auto flex flex-col items-start gap-0.5 text-[10px]`,Lt.value?`text-base-content/55`:`text-white/65`])},[A(`a`,{class:k([`hover:underline`,Lt.value?`hover:text-base-content`:`hover:text-white`]),href:`https://db-ip.com/db/lite.php`,target:`_blank`,rel:`noopener noreferrer`},` DB-IP City Lite `,2),A(`a`,{class:k([`hover:underline`,Lt.value?`hover:text-base-content`:`hover:text-white`]),href:`https://www.solarsystemscope.com/textures/`,target:`_blank`,rel:`noopener noreferrer`},` Solar System Scope · CC BY 4.0 `,2)],2),A(`ul`,{class:`bg-base-100/75 flex flex-wrap justify-end gap-x-2.5 gap-y-1 rounded-lg px-2 py-1.5 text-[10px] shadow backdrop-blur-md`,"aria-label":C(o)(`earthLegend`)},[(_(!0),s(c,null,oe(Wt.value,e=>(_(),s(`li`,{key:e.label,class:`flex items-center gap-1`},[A(`span`,{class:`ring-base-content/20 h-2 w-2 shrink-0 rounded-full ring-1`,style:xe({backgroundColor:e.color})},null,4),A(`span`,Ge,b(e.label),1)]))),128))],8,We)]),w.value?(_(),s(`div`,Ke,[A(`div`,qe,[A(`div`,Je,b(w.value),1)])])):T.value===`checking`||T.value===`loading-cache`?(_(),s(`div`,Ye,[A(`div`,Xe,[l[9]||=A(`span`,{class:`loading loading-spinner loading-sm`},null,-1),ie(` `+b(C(o)(T.value===`checking`?`earthDatabaseChecking`:`earthDatabaseLoading`)),1)])])):T.value===`idle`?(_(),s(`div`,Ze,[A(`div`,Qe,[A(`div`,$e,b(C(o)(`earthDatabaseConsentTitle`)),1),A(`p`,et,b(C(o)(`earthDatabaseConsent`,{download:`61.7 MB`,stored:`130.2 MB`})),1),Ce.value?(_(),s(`p`,tt,b(C(o)(`earthDatabaseCacheRecovered`)),1)):h(``,!0),A(`div`,nt,[A(`button`,{class:`btn btn-primary btn-sm`,onClick:Qt},b(C(o)(`earthDatabaseDownload`)),1),A(`a`,rt,b(C(o)(`earthDatabaseLearnMore`)),1)])])])):T.value===`downloading`?(_(),s(`div`,it,[A(`div`,at,[A(`div`,ot,[A(`span`,st,b(C(o)(`earthDatabaseDownloading`)),1),A(`span`,ct,b(Bt.value),1)]),A(`progress`,{class:`progress progress-primary mt-3 w-full`,value:zt.value,max:`100`},null,8,lt),A(`button`,{class:`btn btn-ghost btn-sm mt-2`,onClick:$t},b(C(o)(`cancel`)),1)])])):T.value===`error`?(_(),s(`div`,ut,[A(`div`,dt,[A(`div`,ft,b(Vt.value),1),A(`button`,{class:`btn btn-sm mt-3`,onClick:en},b(C(o)(`retry`)),1)])])):T.value===`ready`&&F.value===`error`?(_(),s(`div`,pt,[A(`div`,mt,b(C(o)(`earthOriginError`)),1)])):Ut.value?(_(),s(`div`,ht,[A(`div`,gt,b(C(y).length?C(o)(`earthNoLocatedConnections`):C(o)(`earthNoConnections`)),1)])):h(``,!0)],2),(_(),n(ee,{to:`body`},[V.value?(_(),s(`div`,{key:0,class:`bg-base-100 border-base-300 pointer-events-none fixed z-[10000] min-w-40 rounded-lg border p-2 text-xs shadow-xl`,style:xe(Gt.value)},[A(`div`,_t,b([V.value.city,V.value.country].filter(Boolean).join(`, `)||C(o)(`unknown`)),1),A(`div`,vt,b(C(o)(`earthEndpointRole`))+`: `+b(C(o)(`earthRole_${V.value.role}`)),1),A(`div`,yt,b(C(o)(`connectionCount`))+`: `+b(V.value.connections),1),V.value.role===`destination`&&V.value.topHosts.length?(_(),s(`div`,bt,[A(`div`,xt,b(C(o)(`earthTopDownloadedHosts`)),1),(_(!0),s(c,null,oe(V.value.topHosts,(e,t)=>(_(),s(`div`,{key:`${e.host}-${t}`,class:`flex max-w-64 items-center justify-between gap-3 leading-5`},[A(`span`,St,b(e.host),1),A(`span`,Ct,b(C(Te)(e.downloaded)),1)]))),128))])):h(``,!0)],4)):h(``,!0)]))],2))}}),[[`__scopeId`,`data-v-dede773a`]]);export{R as default}; \ No newline at end of file diff --git a/luci-app-ssr-plus/root/usr/share/shadowsocksr/ui/zashboard/assets/NotoColorEmoji-flagsonly-CWWDk9km.ttf b/luci-app-ssr-plus/root/usr/share/shadowsocksr/ui/zashboard/assets/NotoColorEmoji-flagsonly-CWWDk9km.ttf deleted file mode 100644 index 6e1642ec..00000000 Binary files a/luci-app-ssr-plus/root/usr/share/shadowsocksr/ui/zashboard/assets/NotoColorEmoji-flagsonly-CWWDk9km.ttf and /dev/null differ diff --git a/luci-app-ssr-plus/root/usr/share/shadowsocksr/ui/zashboard/assets/TwemojiMozilla-flags-B12sb_Bp.woff2 b/luci-app-ssr-plus/root/usr/share/shadowsocksr/ui/zashboard/assets/TwemojiMozilla-flags-B12sb_Bp.woff2 deleted file mode 100644 index b87c4ce0..00000000 Binary files a/luci-app-ssr-plus/root/usr/share/shadowsocksr/ui/zashboard/assets/TwemojiMozilla-flags-B12sb_Bp.woff2 and /dev/null differ diff --git a/luci-app-ssr-plus/root/usr/share/shadowsocksr/ui/zashboard/assets/background-DTLDDGUj.jpg b/luci-app-ssr-plus/root/usr/share/shadowsocksr/ui/zashboard/assets/background-DTLDDGUj.jpg deleted file mode 100644 index dfb34bae..00000000 Binary files a/luci-app-ssr-plus/root/usr/share/shadowsocksr/ui/zashboard/assets/background-DTLDDGUj.jpg and /dev/null differ diff --git a/luci-app-ssr-plus/root/usr/share/shadowsocksr/ui/zashboard/assets/connection-geoip-database-NH8WGZdk.js b/luci-app-ssr-plus/root/usr/share/shadowsocksr/ui/zashboard/assets/connection-geoip-database-NH8WGZdk.js deleted file mode 100644 index 88489f1f..00000000 --- a/luci-app-ssr-plus/root/usr/share/shadowsocksr/ui/zashboard/assets/connection-geoip-database-NH8WGZdk.js +++ /dev/null @@ -1 +0,0 @@ -import{$ as e,C as t,N as n,_ as r,lt as i,tt as a,u as o,v as s,y as c}from"./index-DC9m9n9t.js";var l=`zashboard-geoip`,u=2,d=`manifests`,f=`chunks`,p=256*1024,m=8,h=8,g,_=class extends Error{code;constructor(e,t){super(`GeoIP chunk store ${e} error`,t),this.code=e}},v=()=>{if(g)return g;let e=new Promise((t,n)=>{let r=indexedDB.open(l,u),i=!1;r.onupgradeneeded=()=>{r.result.objectStoreNames.contains(`mmdb`)&&r.result.deleteObjectStore(`mmdb`),r.result.objectStoreNames.contains(d)||r.result.createObjectStore(d),r.result.objectStoreNames.contains(f)||r.result.createObjectStore(f)},r.onsuccess=()=>{let n=r.result;if(i){n.close();return}i=!0;let a=()=>{g===e&&(g=void 0)};n.onversionchange=()=>{n.close(),a()},n.onclose=a,t(n)},r.onerror=()=>{i||(i=!0,g===e&&(g=void 0),n(r.error))},r.onblocked=()=>{i||(i=!0,g===e&&(g=void 0),n(new _(`storage`)))}});return g=e,e},y=e=>{if(!e||typeof e!=`object`)return!1;let t=e;return Number.isSafeInteger(t.chunkCount)&&t.chunkCount>0&&t.chunkSize===262144&&typeof t.generation==`string`&&t.generation.length>0&&Number.isSafeInteger(t.size)&&t.size>0&&Math.ceil(t.size/t.chunkSize)===t.chunkCount&&Number.isFinite(t.updatedAt)},b=new Set,x=new Set,S=async e=>{let t=await v(),n=await new Promise((n,r)=>{let i=t.transaction(d,`readonly`).objectStore(d).get(e);i.onsuccess=()=>n(y(i.result)?i.result:void 0),i.onerror=()=>r(i.error)});return n&&!x.has(e)&&(x.add(e),E(e,n.generation,n.previousGeneration).catch(()=>x.delete(e))),n},C=async(e,t,n,r)=>{let i=await v();return new Promise((a,o)=>{let s=i.transaction(f,`readwrite`),c=s.objectStore(f);r.forEach((r,i)=>{c.put(r.buffer,[e,t,n+i])}),s.oncomplete=()=>a(),s.onerror=()=>o(s.error),s.onabort=()=>o(s.error)})},w=async(e,t,n)=>{let r=await v();return new Promise((i,a)=>{let o=r.transaction(f,`readonly`).objectStore(f).get([e,t,n]);o.onsuccess=()=>{let e=o.result;if(!(e instanceof ArrayBuffer)){a(Error(`Missing GeoIP database chunk ${n}`));return}i(new Uint8Array(e))},o.onerror=()=>a(o.error)})},T=async(e,t)=>{let n=await v();return new Promise((r,i)=>{let a=n.transaction(f,`readwrite`),o=IDBKeyRange.bound([e,t,0],[e,t,2**53-1]);a.objectStore(f).delete(o),a.oncomplete=()=>r(),a.onerror=()=>i(a.error),a.onabort=()=>i(a.error)})},E=async(e,t,n)=>{let r=await v();return new Promise((i,a)=>{let o=r.transaction(f,`readwrite`),s=o.objectStore(f).openKeyCursor(IDBKeyRange.bound([e,``],[e,`￿`]));s.onsuccess=()=>{let e=s.result;if(!e)return;let r=e.primaryKey;r[1]!==t&&r[1]!==n&&!b.has(r[1])&&e.delete(),e.continue()},o.oncomplete=()=>i(),o.onerror=()=>a(o.error),o.onabort=()=>a(o.error)})},D=class{key;manifest;memoryChunkCacheMax;size;chunks=new Map;constructor(e,t,n){this.key=e,this.manifest=t,this.memoryChunkCacheMax=n,this.size=t.size}async read(e,t){if(!Number.isSafeInteger(e)||!Number.isSafeInteger(t)||e<0||t<0)throw Error(`Invalid GeoIP database byte range`);if(e+t>this.size)throw Error(`GeoIP database byte range is out of bounds`);if(t===0)return new Uint8Array;let n=Math.floor(e/this.manifest.chunkSize),r=Math.floor((e+t-1)/this.manifest.chunkSize);if(n===r){let r=await this.loadChunk(n),i=e-n*this.manifest.chunkSize;return r.subarray(i,i+t)}let i=new Uint8Array(t),a=0;for(let o=n;o<=r;o++){let n=await this.loadChunk(o),r=o*this.manifest.chunkSize,s=Math.max(e,r)-r,c=Math.min(e+t,r+n.length)-r;i.set(n.subarray(s,c),a),a+=c-s}if(a!==t)throw Error(`Incomplete GeoIP database byte range`);return i}loadChunk(e){if(e<0||e>=this.manifest.chunkCount)return Promise.reject(Error(`Invalid GeoIP database chunk ${e}`));let t=this.chunks.get(e);if(t)return this.chunks.delete(e),this.chunks.set(e,t),t;let n=w(this.key,this.manifest.generation,e).catch(t=>{throw this.chunks.delete(e),t});for(this.chunks.set(e,n);this.chunks.size>this.memoryChunkCacheMax;){let e=this.chunks.keys().next().value;if(e===void 0)break;this.chunks.delete(e)}return n}},O={getManifest:S,createSource(e,t,n=h){return new D(e,t,n)},async stageStream(e,t,n={}){let r=globalThis.crypto?.randomUUID?.()??`${Date.now()}-${Math.random().toString(36).slice(2)}`;b.add(r);let i=t.getReader(),a=new Uint8Array(p),o=0,s=0,c=0,l=[],u=0,d=async()=>{if(l.length!==0){try{await C(e,r,u,l)}catch(e){throw new _(`storage`,{cause:e})}l=[]}},f=async e=>{l.length===0&&(u=s),l.push(e),s++,l.length>=m&&await d()};try{for(;;){let e;try{e=await i.read()}catch(e){throw new _(`stream`,{cause:e})}if(e.done)break;c+=e.value.byteLength;let t=0;for(;t0&&await f(a.slice(0,o)),await d(),c===0||s===0)throw new _(`stream`);return{chunkCount:s,chunkSize:p,generation:r,size:c,updatedAt:n.updatedAt??Date.now()}}catch(t){throw await i.cancel().catch(()=>{}),await T(e,r).catch(()=>{}),b.delete(r),t}},async activate(e,t,n={}){let r=await v(),i;try{await new Promise((a,o)=>{let s=r.transaction(d,`readwrite`),c=s.objectStore(d),l=c.get(e);l.onsuccess=()=>{let r=y(l.result)?l.result:void 0;i={...t,previousGeneration:n.retainPrevious?r?.generation:void 0},c.put(i,e)},s.oncomplete=()=>a(),s.onerror=()=>o(s.error),s.onabort=()=>o(s.error)})}catch(e){throw new _(`storage`,{cause:e})}if(!i)throw new _(`storage`);return b.delete(i.generation),x.add(e),E(e,i.generation,i.previousGeneration).catch(()=>{}),i},async discard(e,t){try{await T(e,t)}finally{b.delete(t)}},async invalidate(e,t){let n=await v();return new Promise((r,i)=>{let a=n.transaction([d,f],`readwrite`),o=a.objectStore(d),s=o.get(e),c=IDBKeyRange.bound([e,t,0],[e,t,2**53-1]);s.onsuccess=()=>{(y(s.result)?s.result:void 0)?.generation===t&&o.delete(e)},a.objectStore(f).delete(c),a.oncomplete=()=>r(),a.onerror=()=>i(a.error),a.onabort=()=>i(a.error)})}},k=i(o(),1),A=16,j=128*1024,M=new Uint8Array([171,205,239,77,97,120,77,105,110,100,46,99,111,109]),N=[0,2048,526336,0],P=new TextDecoder,F=(e,t=0,n=e.length-t)=>{let r=0;for(let i=0;i{let n=typeof e==`bigint`?Number(e):e;if(typeof n!=`number`||!Number.isFinite(n))throw Error(`Invalid MMDB metadata field: ${t}`);return n},L=class{source;baseOffset;constructor(e,t){this.source=e,this.baseOffset=t}async decode(e){let t=(await this.source.read(e,1))[0],n=t>>5,r=e+1;if(n===1){let e=await this.decodePointer(t,r);return{value:(await this.decode(e.value)).value,offset:e.offset}}if(n===0&&(n=(await this.source.read(r,1))[0]+7,r++,n<8))throw Error(`Invalid extended MMDB type at offset ${e}`);let i=await this.sizeFromControlByte(t,r);return this.decodeByType(n,i.offset,i.value)}async sizeFromControlByte(e,t){let n=e&31;return n<29?{value:n,offset:t}:n===29?{value:29+(await this.source.read(t,1))[0],offset:t+1}:n===30?{value:285+F(await this.source.read(t,2)),offset:t+2}:{value:65821+F(await this.source.read(t,3)),offset:t+3}}async decodePointer(e,t){let n=e>>3&3,r=await this.source.read(t,n+1),i;switch(n){case 0:i=(e&7)<<8|r[0];break;case 1:i=(e&7)*65536+F(r);break;case 2:i=(e&7)*16777216+F(r);break;default:i=F(r)}return{value:this.baseOffset+N[n]+i,offset:t+n+1}}async decodeByType(e,t,n){switch(e){case 2:{let e=await this.source.read(t,n);return{value:P.decode(e),offset:t+n}}case 3:{let e=await this.source.read(t,8);return{value:new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat64(0),offset:t+8}}case 4:return{value:await this.source.read(t,n),offset:t+n};case 5:case 6:return{value:await this.decodeUint(t,n),offset:t+n};case 7:return this.decodeMap(n,t);case 8:return{value:await this.decodeInt32(t,n),offset:t+n};case 9:case 10:return{value:await this.decodeBigUint(t,n),offset:t+n};case 11:return this.decodeArray(n,t);case 14:return{value:n!==0,offset:t};case 15:{let e=await this.source.read(t,4);return{value:new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat32(0),offset:t+4}}default:throw Error(`Unknown MMDB type ${e} at offset ${t}`)}}async decodeMap(e,t){let n={};for(let r=0;r4)throw Error(`Invalid MMDB unsigned integer size: ${t}`);return F(await this.source.read(e,t))}async decodeInt32(e,t){if(t===0)return 0;if(t>4)throw Error(`Invalid MMDB signed integer size: ${t}`);let n=await this.source.read(e,t);return t<4?F(n):new DataView(n.buffer,n.byteOffset,n.byteLength).getInt32(0)}async decodeBigUint(e,t){if(t>16)throw Error(`Invalid MMDB large integer size: ${t}`);let n=await this.source.read(e,t),r=0n;for(let e of n)r=r<<8n|BigInt(e);return r}},R=async e=>{let t=Math.min(e.size,j),n=e.size-t,r=await e.read(n,t);for(let e=r.length-M.length;e>=0;e--){let t=!0;for(let n=0;n{let t=await R(e),n=(await new L(e,t).decode(t)).value,r=I(n.node_count,`node_count`),i=I(n.record_size,`record_size`),a=I(n.ip_version,`ip_version`);if(![24,28,32].includes(i))throw Error(`Unsupported MMDB record size`);if(![4,6].includes(a))throw Error(`Unsupported MMDB IP version`);if(!Number.isSafeInteger(r)||r<=0)throw Error(`Invalid MMDB node count`);let o=i/4,s=r*o;if(s+A>=t)throw Error(`Invalid MMDB search tree size`);return{databaseType:typeof n.database_type==`string`?n.database_type:``,ipVersion:a,nodeByteSize:o,nodeCount:r,recordSize:i,searchTreeSize:s}},B=class e{source;metadata;decoder;decodedRecords=new Map;ipv4StartNodeNumber=0;constructor(e,t){this.source=e,this.metadata=t,this.decoder=new L(e,t.searchTreeSize+A)}static async open(t){let n=new e(t,await z(t));return n.ipv4StartNodeNumber=await n.findIPv4Start(),n}async get(e){if(!k.isValid(e))return null;let t=k.parse(e).toByteArray(),n=this.metadata.nodeCount,r=t.length===4?this.ipv4StartNodeNumber:0;for(let e=0;e>3]>>(7^e&7)&1,[i,a]=await this.readNode(r);r=n?a:i}if(r<=n)return null;let i=r-n+this.metadata.searchTreeSize,a=this.decodedRecords.get(i);if(a)return this.decodedRecords.delete(i),this.decodedRecords.set(i,a),a;let o=this.decoder.decode(i).then(e=>e.value);for(this.decodedRecords.set(i,o);this.decodedRecords.size>512;){let e=this.decodedRecords.keys().next().value;if(e===void 0)break;this.decodedRecords.delete(e)}try{return await o}catch(e){throw this.decodedRecords.delete(i),e}}async findIPv4Start(){if(this.metadata.ipVersion===4)return 0;let e=0;for(let t=0;t<96&&eB.open(O.createSource(e,t)),U=async e=>{let t=await O.getManifest(e).catch(()=>void 0),n;if(t)try{if(n=await H(e,t),Date.now()-t.updatedAt<=V)return n}catch{await O.invalidate(e,t.generation).catch(()=>{}),t=void 0}try{let t=await fetch(e);if(!t.ok||!t.body)throw Error(`Failed to stream GeoIP database: ${t.status}`);let n=await O.stageStream(e,t.body),r;try{r=await H(e,n),await O.activate(e,n,{retainPrevious:!0})}catch(t){throw await O.discard(e,n.generation).catch(()=>{}),t}return r}catch(e){if(n)return n;throw e}},W=2,G=new Map,K=e=>{let t=G.get(e);if(t)return G.delete(e),G.set(e,t),t;let n=U(e).catch(t=>{throw G.delete(e),t});for(G.set(e,n);G.size>W;){let e=G.keys().next().value;if(e===void 0)break;G.delete(e)}return n},q=e=>e?c.value===t.ZH_CN||c.value===t.ZH_TW?e[`zh-CN`]??e.en:e.en:``,J=async(e,t)=>{let n=await K(e);try{return await n.get(t)}catch{return null}},Y=async e=>{let[t,n]=await Promise.all([J(s.value,e),J(r.value,e)]);return{ip:e,country:q(t?.country?.names)||(t?.country?.iso_code??``),region:``,city:``,asn:n?.autonomous_system_number?.toString()??``,organization:n?.autonomous_system_organization??``,latitude:null,longitude:null}},X={ip:``,country:``,region:``,city:``,asn:``,organization:``,latitude:null,longitude:null},Z=4096,Q=a(new Map),$=new Set,ee=e=>!e||!k.isValid(e)?X:Q.get(e)||($.has(e)||($.add(e),Y(e).then(t=>{for(Q.set(e,t);Q.size>Z;){let e=Q.keys().next().value;if(e===void 0)break;Q.delete(e)}}).catch(()=>{}).finally(()=>$.delete(e))),X);n([s,r],()=>{G.clear(),Q.clear(),$.clear()},{debounce:800});export{ee as getConnectionGeoIPInfoSync}; \ No newline at end of file diff --git a/luci-app-ssr-plus/root/usr/share/shadowsocksr/ui/zashboard/assets/earth-day-O5DYyPrv.webp b/luci-app-ssr-plus/root/usr/share/shadowsocksr/ui/zashboard/assets/earth-day-O5DYyPrv.webp deleted file mode 100644 index 6cae7a55..00000000 Binary files a/luci-app-ssr-plus/root/usr/share/shadowsocksr/ui/zashboard/assets/earth-day-O5DYyPrv.webp and /dev/null differ diff --git a/luci-app-ssr-plus/root/usr/share/shadowsocksr/ui/zashboard/assets/earth-night-DiMNTAKM.webp b/luci-app-ssr-plus/root/usr/share/shadowsocksr/ui/zashboard/assets/earth-night-DiMNTAKM.webp deleted file mode 100644 index 621105f0..00000000 Binary files a/luci-app-ssr-plus/root/usr/share/shadowsocksr/ui/zashboard/assets/earth-night-DiMNTAKM.webp and /dev/null differ diff --git a/luci-app-ssr-plus/root/usr/share/shadowsocksr/ui/zashboard/assets/earth-renderer-Dh_x8rMR.js b/luci-app-ssr-plus/root/usr/share/shadowsocksr/ui/zashboard/assets/earth-renderer-Dh_x8rMR.js deleted file mode 100644 index bedf07ba..00000000 --- a/luci-app-ssr-plus/root/usr/share/shadowsocksr/ui/zashboard/assets/earth-renderer-Dh_x8rMR.js +++ /dev/null @@ -1,538 +0,0 @@ -import{t as e}from"./palette-DPyxzM37.js";var t={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},n={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},r=1e3,i=1001,a=1002,o=1003,s=1004,c=1005,l=1006,u=1007,d=1008,f=1008,p=1009,m=1010,h=1011,g=1012,_=1013,v=1014,y=1015,b=1016,x=1017,S=1018,C=1020,ee=35902,te=35899,w=1021,ne=1022,re=1023,ie=1026,ae=1027,oe=1028,se=1029,ce=1030,le=1031,ue=1032,de=1033,fe=33776,pe=33777,me=33778,he=33779,ge=35840,_e=35841,ve=35842,ye=35843,be=36196,xe=37492,Se=37496,Ce=37488,we=37489,Te=37490,Ee=37491,De=37808,Oe=37809,ke=37810,Ae=37811,je=37812,Me=37813,Ne=37814,Pe=37815,Fe=37816,Ie=37817,Le=37818,Re=37819,ze=37820,Be=37821,Ve=36492,He=36494,Ue=36495,We=36283,Ge=36284,Ke=36285,qe=36286,Je=2300,Ye=2301,Xe=2302,Ze=2303,Qe=2400,$e=2401,et=2402,tt=`srgb`,nt=`srgb-linear`,rt=`linear`,it=`srgb`,at=7680,ot=7681,st=7682,ct=7683,lt=34055,ut=34056,dt=5386,ft=35044,pt=35048,mt=2e3,ht=2001,gt={COMPUTE:`compute`,RENDER:`render`},_t={TEXTURE_COMPARE:`depthTextureCompare`};function vt(e){for(let t=e.length-1;t>=0;--t)if(e[t]>=65535)return!0;return!1}function yt(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function bt(e){return document.createElementNS(`http://www.w3.org/1999/xhtml`,e)}function xt(){let e=bt(`canvas`);return e.style.display=`block`,e}var St={};function Ct(...e){let t=`THREE.`+e.shift();console.log(t,...e)}function wt(e){let t=e[0];if(typeof t==`string`&&t.startsWith(`TSL:`)){let t=e[1];t&&t.isStackTrace?e[0]+=` `+t.getLocation():e[1]=`Stack trace not available. Enable "THREE.Node.captureStackTrace" to capture stack traces.`}return e}function T(...e){e=wt(e);let t=`THREE.`+e.shift();{let n=e[0];n&&n.isStackTrace?console.warn(n.getError(t)):console.warn(t,...e)}}function E(...e){e=wt(e);let t=`THREE.`+e.shift();{let n=e[0];n&&n.isStackTrace?console.error(n.getError(t)):console.error(t,...e)}}function Tt(...e){let t=e.join(` `);t in St||(St[t]=!0,T(...e))}function Et(){return typeof self<`u`&&self.scheduler!==void 0&&self.scheduler.yield!==void 0?self.scheduler.yield():new Promise(e=>{requestAnimationFrame(e)})}var Dt={0:1,2:6,4:7,3:5,1:0,6:2,7:4,5:3},Ot=class{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});let n=this._listeners;n[e]===void 0&&(n[e]=[]),n[e].indexOf(t)===-1&&n[e].push(t)}hasEventListener(e,t){let n=this._listeners;return n!==void 0&&n[e]!==void 0&&n[e].indexOf(t)!==-1}removeEventListener(e,t){let n=this._listeners;if(n===void 0)return;let r=n[e];if(r!==void 0){let e=r.indexOf(t);e!==-1&&r.splice(e,1)}}dispatchEvent(e){let t=this._listeners;if(t===void 0)return;let n=t[e.type];if(n!==void 0){e.target=this;let t=n.slice(0);for(let n=0,r=t.length;n>8&255]+kt[e>>16&255]+kt[e>>24&255]+`-`+kt[t&255]+kt[t>>8&255]+`-`+kt[t>>16&15|64]+kt[t>>24&255]+`-`+kt[n&63|128]+kt[n>>8&255]+`-`+kt[n>>16&255]+kt[n>>24&255]+kt[r&255]+kt[r>>8&255]+kt[r>>16&255]+kt[r>>24&255]).toLowerCase()}function D(e,t,n){return Math.max(t,Math.min(n,e))}function Pt(e,t){return(e%t+t)%t}function Ft(e,t,n,r,i){return r+(e-t)*(i-r)/(n-t)}function It(e,t,n){return e===t?0:(n-e)/(t-e)}function Lt(e,t,n){return(1-n)*e+n*t}function Rt(e,t,n,r){return Lt(e,t,1-Math.exp(-n*r))}function zt(e,t=1){return t-Math.abs(Pt(e,t*2)-t)}function Bt(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t),e*e*(3-2*e))}function Vt(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t),e*e*e*(e*(e*6-15)+10))}function Ht(e,t){return e+Math.floor(Math.random()*(t-e+1))}function Ut(e,t){return e+Math.random()*(t-e)}function Wt(e){return e*(.5-Math.random())}function Gt(e){e!==void 0&&(At=e);let t=At+=1831565813;return t=Math.imul(t^t>>>15,t|1),t^=t+Math.imul(t^t>>>7,t|61),((t^t>>>14)>>>0)/4294967296}function Kt(e){return e*jt}function qt(e){return e*Mt}function Jt(e){return(e&e-1)==0&&e!==0}function Yt(e){return 2**Math.ceil(Math.log(e)/Math.LN2)}function Xt(e){return 2**Math.floor(Math.log(e)/Math.LN2)}function Zt(e,t,n,r,i){let a=Math.cos,o=Math.sin,s=a(n/2),c=o(n/2),l=a((t+r)/2),u=o((t+r)/2),d=a((t-r)/2),f=o((t-r)/2),p=a((r-t)/2),m=o((r-t)/2);switch(i){case`XYX`:e.set(s*u,c*d,c*f,s*l);break;case`YZY`:e.set(c*f,s*u,c*d,s*l);break;case`ZXZ`:e.set(c*d,c*f,s*u,s*l);break;case`XZX`:e.set(s*u,c*m,c*p,s*l);break;case`YXY`:e.set(c*p,s*u,c*m,s*l);break;case`ZYZ`:e.set(c*m,c*p,s*u,s*l);break;default:T(`MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: `+i)}}function Qt(e,t){switch(t.constructor){case Float32Array:return e;case Uint32Array:return e/4294967295;case Uint16Array:return e/65535;case Uint8Array:return e/255;case Int32Array:return Math.max(e/2147483647,-1);case Int16Array:return Math.max(e/32767,-1);case Int8Array:return Math.max(e/127,-1);default:throw Error(`THREE.MathUtils: Invalid component type.`)}}function $t(e,t){switch(t.constructor){case Float32Array:return e;case Uint32Array:return Math.round(e*4294967295);case Uint16Array:return Math.round(e*65535);case Uint8Array:return Math.round(e*255);case Int32Array:return Math.round(e*2147483647);case Int16Array:return Math.round(e*32767);case Int8Array:return Math.round(e*127);default:throw Error(`THREE.MathUtils: Invalid component type.`)}}var en={DEG2RAD:jt,RAD2DEG:Mt,generateUUID:Nt,clamp:D,euclideanModulo:Pt,mapLinear:Ft,inverseLerp:It,lerp:Lt,damp:Rt,pingpong:zt,smoothstep:Bt,smootherstep:Vt,randInt:Ht,randFloat:Ut,randFloatSpread:Wt,seededRandom:Gt,degToRad:Kt,radToDeg:qt,isPowerOfTwo:Jt,ceilPowerOfTwo:Yt,floorPowerOfTwo:Xt,setQuaternionFromProperEuler:Zt,normalize:$t,denormalize:Qt},O=class e{static{e.prototype.isVector2=!0}constructor(e=0,t=0){this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw Error(`THREE.Vector2: index is out of range: `+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw Error(`THREE.Vector2: index is out of range: `+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){let t=this.x,n=this.y,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6],this.y=r[1]*t+r[4]*n+r[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=D(this.x,e.x,t.x),this.y=D(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=D(this.x,e,t),this.y=D(this.y,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(D(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){let t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;let n=this.dot(e)/t;return Math.acos(D(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,n=this.y-e.y;return t*t+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){let n=Math.cos(t),r=Math.sin(t),i=this.x-e.x,a=this.y-e.y;return this.x=i*n-a*r+e.x,this.y=i*r+a*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}},tn=class{constructor(e=0,t=0,n=0,r=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=n,this._w=r}static slerpFlat(e,t,n,r,i,a,o){let s=n[r+0],c=n[r+1],l=n[r+2],u=n[r+3],d=i[a+0],f=i[a+1],p=i[a+2],m=i[a+3];if(u!==m||s!==d||c!==f||l!==p){let e=s*d+c*f+l*p+u*m;e<0&&(d=-d,f=-f,p=-p,m=-m,e=-e);let t=1-o;if(e<.9995){let n=Math.acos(e),r=Math.sin(n);t=Math.sin(t*n)/r,o=Math.sin(o*n)/r,s=s*t+d*o,c=c*t+f*o,l=l*t+p*o,u=u*t+m*o}else{s=s*t+d*o,c=c*t+f*o,l=l*t+p*o,u=u*t+m*o;let e=1/Math.sqrt(s*s+c*c+l*l+u*u);s*=e,c*=e,l*=e,u*=e}}e[t]=s,e[t+1]=c,e[t+2]=l,e[t+3]=u}static multiplyQuaternionsFlat(e,t,n,r,i,a){let o=n[r],s=n[r+1],c=n[r+2],l=n[r+3],u=i[a],d=i[a+1],f=i[a+2],p=i[a+3];return e[t]=o*p+l*u+s*f-c*d,e[t+1]=s*p+l*d+c*u-o*f,e[t+2]=c*p+l*f+o*d-s*u,e[t+3]=l*p-o*u-s*d-c*f,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t=!0){let n=e._x,r=e._y,i=e._z,a=e._order,o=Math.cos,s=Math.sin,c=o(n/2),l=o(r/2),u=o(i/2),d=s(n/2),f=s(r/2),p=s(i/2);switch(a){case`XYZ`:this._x=d*l*u+c*f*p,this._y=c*f*u-d*l*p,this._z=c*l*p+d*f*u,this._w=c*l*u-d*f*p;break;case`YXZ`:this._x=d*l*u+c*f*p,this._y=c*f*u-d*l*p,this._z=c*l*p-d*f*u,this._w=c*l*u+d*f*p;break;case`ZXY`:this._x=d*l*u-c*f*p,this._y=c*f*u+d*l*p,this._z=c*l*p+d*f*u,this._w=c*l*u-d*f*p;break;case`ZYX`:this._x=d*l*u-c*f*p,this._y=c*f*u+d*l*p,this._z=c*l*p-d*f*u,this._w=c*l*u+d*f*p;break;case`YZX`:this._x=d*l*u+c*f*p,this._y=c*f*u+d*l*p,this._z=c*l*p-d*f*u,this._w=c*l*u-d*f*p;break;case`XZY`:this._x=d*l*u-c*f*p,this._y=c*f*u-d*l*p,this._z=c*l*p+d*f*u,this._w=c*l*u+d*f*p;break;default:T(`Quaternion: .setFromEuler() encountered an unknown order: `+a)}return t===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,t){let n=t/2,r=Math.sin(n);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){let t=e.elements,n=t[0],r=t[4],i=t[8],a=t[1],o=t[5],s=t[9],c=t[2],l=t[6],u=t[10],d=n+o+u;if(d>0){let e=.5/Math.sqrt(d+1);this._w=.25/e,this._x=(l-s)*e,this._y=(i-c)*e,this._z=(a-r)*e}else if(n>o&&n>u){let e=2*Math.sqrt(1+n-o-u);this._w=(l-s)/e,this._x=.25*e,this._y=(r+a)/e,this._z=(i+c)/e}else if(o>u){let e=2*Math.sqrt(1+o-n-u);this._w=(i-c)/e,this._x=(r+a)/e,this._y=.25*e,this._z=(s+l)/e}else{let e=2*Math.sqrt(1+u-n-o);this._w=(a-r)/e,this._x=(i+c)/e,this._y=(s+l)/e,this._z=.25*e}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return n<1e-8?(n=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(D(this.dot(e),-1,1)))}rotateTowards(e,t){let n=this.angleTo(e);if(n===0)return this;let r=Math.min(1,t/n);return this.slerp(e,r),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x*=e,this._y*=e,this._z*=e,this._w*=e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){let n=e._x,r=e._y,i=e._z,a=e._w,o=t._x,s=t._y,c=t._z,l=t._w;return this._x=n*l+a*o+r*c-i*s,this._y=r*l+a*s+i*o-n*c,this._z=i*l+a*c+n*s-r*o,this._w=a*l-n*o-r*s-i*c,this._onChangeCallback(),this}slerp(e,t){let n=e._x,r=e._y,i=e._z,a=e._w,o=this.dot(e);o<0&&(n=-n,r=-r,i=-i,a=-a,o=-o);let s=1-t;if(o<.9995){let e=Math.acos(o),c=Math.sin(e);s=Math.sin(s*e)/c,t=Math.sin(t*e)/c,this._x=this._x*s+n*t,this._y=this._y*s+r*t,this._z=this._z*s+i*t,this._w=this._w*s+a*t,this._onChangeCallback()}else this._x=this._x*s+n*t,this._y=this._y*s+r*t,this._z=this._z*s+i*t,this._w=this._w*s+a*t,this.normalize();return this}slerpQuaternions(e,t,n){return this.copy(e).slerp(t,n)}random(){let e=2*Math.PI*Math.random(),t=2*Math.PI*Math.random(),n=Math.random(),r=Math.sqrt(1-n),i=Math.sqrt(n);return this.set(r*Math.sin(e),r*Math.cos(e),i*Math.sin(t),i*Math.cos(t))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}},k=class e{static{e.prototype.isVector3=!0}constructor(e=0,t=0,n=0){this.x=e,this.y=t,this.z=n}set(e,t,n){return n===void 0&&(n=this.z),this.x=e,this.y=t,this.z=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw Error(`THREE.Vector3: index is out of range: `+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw Error(`THREE.Vector3: index is out of range: `+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(rn.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(rn.setFromAxisAngle(e,t))}applyMatrix3(e){let t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[3]*n+i[6]*r,this.y=i[1]*t+i[4]*n+i[7]*r,this.z=i[2]*t+i[5]*n+i[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){let t=this.x,n=this.y,r=this.z,i=e.elements,a=1/(i[3]*t+i[7]*n+i[11]*r+i[15]);return this.x=(i[0]*t+i[4]*n+i[8]*r+i[12])*a,this.y=(i[1]*t+i[5]*n+i[9]*r+i[13])*a,this.z=(i[2]*t+i[6]*n+i[10]*r+i[14])*a,this}applyQuaternion(e){let t=this.x,n=this.y,r=this.z,i=e.x,a=e.y,o=e.z,s=e.w,c=2*(a*r-o*n),l=2*(o*t-i*r),u=2*(i*n-a*t);return this.x=t+s*c+a*u-o*l,this.y=n+s*l+o*c-i*u,this.z=r+s*u+i*l-a*c,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){let t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[4]*n+i[8]*r,this.y=i[1]*t+i[5]*n+i[9]*r,this.z=i[2]*t+i[6]*n+i[10]*r,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=D(this.x,e.x,t.x),this.y=D(this.y,e.y,t.y),this.z=D(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=D(this.x,e,t),this.y=D(this.y,e,t),this.z=D(this.z,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(D(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){let n=e.x,r=e.y,i=e.z,a=t.x,o=t.y,s=t.z;return this.x=r*s-i*o,this.y=i*a-n*s,this.z=n*o-r*a,this}projectOnVector(e){let t=e.lengthSq();if(t===0)return this.set(0,0,0);let n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return nn.copy(this).projectOnVector(e),this.sub(nn)}reflect(e){return this.sub(nn.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){let t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;let n=this.dot(e)/t;return Math.acos(D(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,n=this.y-e.y,r=this.z-e.z;return t*t+n*n+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,n){let r=Math.sin(t)*e;return this.x=r*Math.sin(n),this.y=Math.cos(t)*e,this.z=r*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){let t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){let t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=r,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){let e=Math.random()*Math.PI*2,t=Math.random()*2-1,n=Math.sqrt(1-t*t);return this.x=n*Math.cos(e),this.y=t,this.z=n*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}},nn=new k,rn=new tn,an=class e{static{e.prototype.isMatrix3=!0}constructor(e,t,n,r,i,a,o,s,c){this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,n,r,i,a,o,s,c)}set(e,t,n,r,i,a,o,s,c){let l=this.elements;return l[0]=e,l[1]=r,l[2]=o,l[3]=t,l[4]=i,l[5]=s,l[6]=n,l[7]=a,l[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){let t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(e){let t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let n=e.elements,r=t.elements,i=this.elements,a=n[0],o=n[3],s=n[6],c=n[1],l=n[4],u=n[7],d=n[2],f=n[5],p=n[8],m=r[0],h=r[3],g=r[6],_=r[1],v=r[4],y=r[7],b=r[2],x=r[5],S=r[8];return i[0]=a*m+o*_+s*b,i[3]=a*h+o*v+s*x,i[6]=a*g+o*y+s*S,i[1]=c*m+l*_+u*b,i[4]=c*h+l*v+u*x,i[7]=c*g+l*y+u*S,i[2]=d*m+f*_+p*b,i[5]=d*h+f*v+p*x,i[8]=d*g+f*y+p*S,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){let e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],c=e[7],l=e[8];return t*a*l-t*o*c-n*i*l+n*o*s+r*i*c-r*a*s}invert(){let e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],c=e[7],l=e[8],u=l*a-o*c,d=o*s-l*i,f=c*i-a*s,p=t*u+n*d+r*f;if(p===0)return this.set(0,0,0,0,0,0,0,0,0);let m=1/p;return e[0]=u*m,e[1]=(r*c-l*n)*m,e[2]=(o*n-r*a)*m,e[3]=d*m,e[4]=(l*t-r*s)*m,e[5]=(r*i-o*t)*m,e[6]=f*m,e[7]=(n*s-c*t)*m,e[8]=(a*t-n*i)*m,this}transpose(){let e,t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){let t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,n,r,i,a,o){let s=Math.cos(i),c=Math.sin(i);return this.set(n*s,n*c,-n*(s*a+c*o)+a+e,-r*c,r*s,-r*(-c*a+s*o)+o+t,0,0,1),this}scale(e,t){return Tt(`Matrix3: .scale() is deprecated. Use .makeScale() instead.`),this.premultiply(on.makeScale(e,t)),this}rotate(e){return Tt(`Matrix3: .rotate() is deprecated. Use .makeRotation() instead.`),this.premultiply(on.makeRotation(-e)),this}translate(e,t){return Tt(`Matrix3: .translate() is deprecated. Use .makeTranslation() instead.`),this.premultiply(on.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,n,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){let t=this.elements,n=e.elements;for(let e=0;e<9;e++)if(t[e]!==n[e])return!1;return!0}fromArray(e,t=0){for(let n=0;n<9;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){let n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}clone(){return new this.constructor().fromArray(this.elements)}},on=new an,sn=new an().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),cn=new an().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function ln(){let e={enabled:!0,workingColorSpace:nt,spaces:{},convert:function(e,t,n){return this.enabled===!1||t===n||!t||!n?e:(this.spaces[t].transfer===`srgb`&&(e.r=dn(e.r),e.g=dn(e.g),e.b=dn(e.b)),this.spaces[t].primaries!==this.spaces[n].primaries&&(e.applyMatrix3(this.spaces[t].toXYZ),e.applyMatrix3(this.spaces[n].fromXYZ)),this.spaces[n].transfer===`srgb`&&(e.r=fn(e.r),e.g=fn(e.g),e.b=fn(e.b)),e)},workingToColorSpace:function(e,t){return this.convert(e,this.workingColorSpace,t)},colorSpaceToWorking:function(e,t){return this.convert(e,t,this.workingColorSpace)},getPrimaries:function(e){return this.spaces[e].primaries},getTransfer:function(e){return e===``?rt:this.spaces[e].transfer},getToneMappingMode:function(e){return this.spaces[e].outputColorSpaceConfig.toneMappingMode||`standard`},getLuminanceCoefficients:function(e,t=this.workingColorSpace){return e.fromArray(this.spaces[t].luminanceCoefficients)},define:function(e){Object.assign(this.spaces,e)},_getMatrix:function(e,t,n){return e.copy(this.spaces[t].toXYZ).multiply(this.spaces[n].fromXYZ)},_getDrawingBufferColorSpace:function(e){return this.spaces[e].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(e=this.workingColorSpace){return this.spaces[e].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(t,n){return Tt(`ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace().`),e.workingToColorSpace(t,n)},toWorkingColorSpace:function(t,n){return Tt(`ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking().`),e.colorSpaceToWorking(t,n)}},t=[.64,.33,.3,.6,.15,.06],n=[.2126,.7152,.0722],r=[.3127,.329];return e.define({[nt]:{primaries:t,whitePoint:r,transfer:rt,toXYZ:sn,fromXYZ:cn,luminanceCoefficients:n,workingColorSpaceConfig:{unpackColorSpace:tt},outputColorSpaceConfig:{drawingBufferColorSpace:tt}},[tt]:{primaries:t,whitePoint:r,transfer:it,toXYZ:sn,fromXYZ:cn,luminanceCoefficients:n,outputColorSpaceConfig:{drawingBufferColorSpace:tt}}}),e}var un=ln();function dn(e){return e<.04045?e*.0773993808:(e*.9478672986+.0521327014)**2.4}function fn(e){return e<.0031308?e*12.92:1.055*e**.41666-.055}var pn,mn=class{static getDataURL(e,t=`image/png`){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>`u`)return e.src;let n;if(e instanceof HTMLCanvasElement)n=e;else{pn===void 0&&(pn=bt(`canvas`)),pn.width=e.width,pn.height=e.height;let t=pn.getContext(`2d`);e instanceof ImageData?t.putImageData(e,0,0):t.drawImage(e,0,0,e.width,e.height),n=pn}return n.toDataURL(t)}static sRGBToLinear(e){if(typeof HTMLImageElement<`u`&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<`u`&&e instanceof HTMLCanvasElement||typeof ImageBitmap<`u`&&e instanceof ImageBitmap){let t=bt(`canvas`);t.width=e.width,t.height=e.height;let n=t.getContext(`2d`);n.drawImage(e,0,0,e.width,e.height);let r=n.getImageData(0,0,e.width,e.height),i=r.data;for(let e=0;e1),this.pmremVersion=0,this.normalized=!1}get width(){return this.source.getSize(yn).x}get height(){return this.source.getSize(yn).y}get depth(){return this.source.getSize(yn).z}get image(){return this.source.data}set image(e){this.source.data=e}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}clone(){return new this.constructor().copy(this)}copy(e){return this.name=e.name,this.source=e.source,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.channel=e.channel,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.normalized=e.normalized,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.colorSpace=e.colorSpace,this.renderTarget=e.renderTarget,this.isRenderTargetTexture=e.isRenderTargetTexture,this.isArrayTexture=e.isArrayTexture,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}setValues(e){for(let t in e){let n=e[t];if(n===void 0){T(`Texture.setValues(): parameter '${t}' has value of undefined.`);continue}let r=this[t];if(r===void 0){T(`Texture.setValues(): property '${t}' does not exist.`);continue}r&&n&&r.isVector2&&n.isVector2||r&&n&&r.isVector3&&n.isVector3||r&&n&&r.isMatrix3&&n.isMatrix3?r.copy(n):this[t]=n}}toJSON(e){let t=e===void 0||typeof e==`string`;if(!t&&e.textures[this.uuid]!==void 0)return e.textures[this.uuid];let n={metadata:{version:4.7,type:`Texture`,generator:`Texture.toJSON`},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,normalized:this.normalized,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(n.userData=this.userData),t||(e.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:`dispose`})}transformUv(e){if(this.mapping!==300)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case r:e.x-=Math.floor(e.x);break;case i:e.x=e.x<0?0:1;break;case a:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x-=Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case r:e.y-=Math.floor(e.y);break;case i:e.y=e.y<0?0:1;break;case a:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y-=Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(e){e===!0&&this.pmremVersion++}};bn.DEFAULT_IMAGE=null,bn.DEFAULT_MAPPING=300,bn.DEFAULT_ANISOTROPY=1;var xn=class e{static{e.prototype.isVector4=!0}constructor(e=0,t=0,n=0,r=1){this.x=e,this.y=t,this.z=n,this.w=r}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,n,r){return this.x=e,this.y=t,this.z=n,this.w=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw Error(`THREE.Vector4: index is out of range: `+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw Error(`THREE.Vector4: index is out of range: `+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w===void 0?1:e.w,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){let t=this.x,n=this.y,r=this.z,i=this.w,a=e.elements;return this.x=a[0]*t+a[4]*n+a[8]*r+a[12]*i,this.y=a[1]*t+a[5]*n+a[9]*r+a[13]*i,this.z=a[2]*t+a[6]*n+a[10]*r+a[14]*i,this.w=a[3]*t+a[7]*n+a[11]*r+a[15]*i,this}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this.w/=e.w,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);let t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,n,r,i,a=.01,o=.1,s=e.elements,c=s[0],l=s[4],u=s[8],d=s[1],f=s[5],p=s[9],m=s[2],h=s[6],g=s[10];if(Math.abs(l-d)s&&e>_?e_?s1);this.dispose()}this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.textures.length=0;for(let t=0,n=e.textures.length;t>>0}enable(e){this.mask|=1<1){for(let e=0;e1){for(let e=0;e0&&(r.userData=this.userData),r.layers=this.layers.mask,r.matrix=this.matrix.toArray(),r.up=this.up.toArray(),this.pivot!==null&&(r.pivot=this.pivot.toArray()),this.matrixAutoUpdate===!1&&(r.matrixAutoUpdate=!1),this.morphTargetDictionary!==void 0&&(r.morphTargetDictionary=Object.assign({},this.morphTargetDictionary)),this.morphTargetInfluences!==void 0&&(r.morphTargetInfluences=this.morphTargetInfluences.slice()),this.isInstancedMesh&&(r.type=`InstancedMesh`,r.count=this.count,r.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(r.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(r.type=`BatchedMesh`,r.perObjectFrustumCulled=this.perObjectFrustumCulled,r.sortObjects=this.sortObjects,r.drawRanges=this._drawRanges,r.reservedRanges=this._reservedRanges,r.geometryInfo=this._geometryInfo.map(e=>({...e,boundingBox:e.boundingBox?e.boundingBox.toJSON():void 0,boundingSphere:e.boundingSphere?e.boundingSphere.toJSON():void 0})),r.instanceInfo=this._instanceInfo.map(e=>({...e})),r.availableInstanceIds=this._availableInstanceIds.slice(),r.availableGeometryIds=this._availableGeometryIds.slice(),r.nextIndexStart=this._nextIndexStart,r.nextVertexStart=this._nextVertexStart,r.geometryCount=this._geometryCount,r.maxInstanceCount=this._maxInstanceCount,r.maxVertexCount=this._maxVertexCount,r.maxIndexCount=this._maxIndexCount,r.geometryInitialized=this._geometryInitialized,r.matricesTexture=this._matricesTexture.toJSON(e),r.indirectTexture=this._indirectTexture.toJSON(e),this._colorsTexture!==null&&(r.colorsTexture=this._colorsTexture.toJSON(e)),this.boundingSphere!==null&&(r.boundingSphere=this.boundingSphere.toJSON()),this.boundingBox!==null&&(r.boundingBox=this.boundingBox.toJSON()));function i(t,n){return t[n.uuid]===void 0&&(t[n.uuid]=n.toJSON(e)),n.uuid}if(this.isScene)this.background&&(this.background.isColor?r.background=this.background.toJSON():this.background.isTexture&&(r.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(r.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){r.geometry=i(e.geometries,this.geometry);let t=this.geometry.parameters;if(t!==void 0&&t.shapes!==void 0){let n=t.shapes;if(Array.isArray(n))for(let t=0,r=n.length;t0){r.children=[];for(let t=0;t0){r.animations=[];for(let t=0;t0&&(n.geometries=t),r.length>0&&(n.materials=r),i.length>0&&(n.textures=i),o.length>0&&(n.images=o),s.length>0&&(n.shapes=s),c.length>0&&(n.skeletons=c),l.length>0&&(n.animations=l),u.length>0&&(n.nodes=u)}return n.object=r,n;function a(e){let t=[];for(let n in e){let r=e[n];delete r.metadata,t.push(r)}return t}}clone(e){return new this.constructor().copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.pivot=e.pivot===null?null:e.pivot.clone(),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.static=e.static,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),t===!0)for(let t=0;t.025?(c.inputState.pinching=!1,this.dispatchEvent({type:`pinchend`,handedness:e.handedness,target:this})):!c.inputState.pinching&&o<=.015&&(c.inputState.pinching=!0,this.dispatchEvent({type:`pinchstart`,handedness:e.handedness,target:this}))}else s!==null&&e.gripSpace&&(i=t.getPose(e.gripSpace,n),i!==null&&(s.matrix.fromArray(i.transform.matrix),s.matrix.decompose(s.position,s.rotation,s.scale),s.matrixWorldNeedsUpdate=!0,i.linearVelocity?(s.hasLinearVelocity=!0,s.linearVelocity.copy(i.linearVelocity)):s.hasLinearVelocity=!1,i.angularVelocity?(s.hasAngularVelocity=!0,s.angularVelocity.copy(i.angularVelocity)):s.hasAngularVelocity=!1,s.eventsEnabled&&s.dispatchEvent({type:`gripUpdated`,data:e,target:this})));o!==null&&(r=t.getPose(e.targetRaySpace,n),r===null&&i!==null&&(r=i),r!==null&&(o.matrix.fromArray(r.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),o.matrixWorldNeedsUpdate=!0,r.linearVelocity?(o.hasLinearVelocity=!0,o.linearVelocity.copy(r.linearVelocity)):o.hasLinearVelocity=!1,r.angularVelocity?(o.hasAngularVelocity=!0,o.angularVelocity.copy(r.angularVelocity)):o.hasAngularVelocity=!1,this.dispatchEvent(Qn)))}return o!==null&&(o.visible=r!==null),s!==null&&(s.visible=i!==null),c!==null&&(c.visible=a!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){let n=new Zn;n.matrixAutoUpdate=!1,n.visible=!1,e.joints[t.jointName]=n,e.add(n)}return e.joints[t.jointName]}},er={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},tr={h:0,s:0,l:0},nr={h:0,s:0,l:0};function rr(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*6*(2/3-n):e}var j=class{constructor(e,t,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,n)}set(e,t,n){if(t===void 0&&n===void 0){let t=e;t&&t.isColor?this.copy(t):typeof t==`number`?this.setHex(t):typeof t==`string`&&this.setStyle(t)}else this.setRGB(e,t,n);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=tt){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,un.colorSpaceToWorking(this,t),this}setRGB(e,t,n,r=un.workingColorSpace){return this.r=e,this.g=t,this.b=n,un.colorSpaceToWorking(this,r),this}setHSL(e,t,n,r=un.workingColorSpace){if(e=Pt(e,1),t=D(t,0,1),n=D(n,0,1),t===0)this.r=this.g=this.b=n;else{let r=n<=.5?n*(1+t):n+t-n*t,i=2*n-r;this.r=rr(i,r,e+1/3),this.g=rr(i,r,e),this.b=rr(i,r,e-1/3)}return un.colorSpaceToWorking(this,r),this}setStyle(e,t=tt){function n(t){t!==void 0&&parseFloat(t)<1&&T(`Color: Alpha component of `+e+` will be ignored.`)}let r;if(r=/^(\w+)\(([^\)]*)\)/.exec(e)){let i,a=r[1],o=r[2];switch(a){case`rgb`:case`rgba`:if(i=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return n(i[4]),this.setRGB(Math.min(255,parseInt(i[1],10))/255,Math.min(255,parseInt(i[2],10))/255,Math.min(255,parseInt(i[3],10))/255,t);if(i=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return n(i[4]),this.setRGB(Math.min(100,parseInt(i[1],10))/100,Math.min(100,parseInt(i[2],10))/100,Math.min(100,parseInt(i[3],10))/100,t);break;case`hsl`:case`hsla`:if(i=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return n(i[4]),this.setHSL(parseFloat(i[1])/360,parseFloat(i[2])/100,parseFloat(i[3])/100,t);break;default:T(`Color: Unknown color model `+e)}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(e)){let n=r[1],i=n.length;if(i===3)return this.setRGB(parseInt(n.charAt(0),16)/15,parseInt(n.charAt(1),16)/15,parseInt(n.charAt(2),16)/15,t);if(i===6)return this.setHex(parseInt(n,16),t);T(`Color: Invalid hex color `+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=tt){let n=er[e.toLowerCase()];return n===void 0?T(`Color: Unknown color `+e):this.setHex(n,t),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=dn(e.r),this.g=dn(e.g),this.b=dn(e.b),this}copyLinearToSRGB(e){return this.r=fn(e.r),this.g=fn(e.g),this.b=fn(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=tt){return un.workingToColorSpace(ir.copy(this),e),Math.round(D(ir.r*255,0,255))*65536+Math.round(D(ir.g*255,0,255))*256+Math.round(D(ir.b*255,0,255))}getHexString(e=tt){return(`000000`+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=un.workingColorSpace){un.workingToColorSpace(ir.copy(this),t);let n=ir.r,r=ir.g,i=ir.b,a=Math.max(n,r,i),o=Math.min(n,r,i),s,c,l=(o+a)/2;if(o===a)s=0,c=0;else{let e=a-o;switch(c=l<=.5?e/(a+o):e/(2-a-o),a){case n:s=(r-i)/e+(r0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(t.object.backgroundIntensity=this.backgroundIntensity),t.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(t.object.environmentIntensity=this.environmentIntensity),t.object.environmentRotation=this.environmentRotation.toArray(),t}},or=new k,sr=new k,cr=new k,lr=new k,ur=new k,dr=new k,fr=new k,pr=new k,mr=new k,hr=new k,gr=new xn,_r=new xn,vr=new xn,yr=class e{constructor(e=new k,t=new k,n=new k){this.a=e,this.b=t,this.c=n}static getNormal(e,t,n,r){r.subVectors(n,t),or.subVectors(e,t),r.cross(or);let i=r.lengthSq();return i>0?r.multiplyScalar(1/Math.sqrt(i)):r.set(0,0,0)}static getBarycoord(e,t,n,r,i){or.subVectors(r,t),sr.subVectors(n,t),cr.subVectors(e,t);let a=or.dot(or),o=or.dot(sr),s=or.dot(cr),c=sr.dot(sr),l=sr.dot(cr),u=a*c-o*o;if(u===0)return i.set(0,0,0),null;let d=1/u,f=(c*s-o*l)*d,p=(a*l-o*s)*d;return i.set(1-f-p,p,f)}static containsPoint(e,t,n,r){return this.getBarycoord(e,t,n,r,lr)!==null&&lr.x>=0&&lr.y>=0&&lr.x+lr.y<=1}static getInterpolation(e,t,n,r,i,a,o,s){return this.getBarycoord(e,t,n,r,lr)===null?(s.x=0,s.y=0,`z`in s&&(s.z=0),`w`in s&&(s.w=0),null):(s.setScalar(0),s.addScaledVector(i,lr.x),s.addScaledVector(a,lr.y),s.addScaledVector(o,lr.z),s)}static getInterpolatedAttribute(e,t,n,r,i,a){return gr.setScalar(0),_r.setScalar(0),vr.setScalar(0),gr.fromBufferAttribute(e,t),_r.fromBufferAttribute(e,n),vr.fromBufferAttribute(e,r),a.setScalar(0),a.addScaledVector(gr,i.x),a.addScaledVector(_r,i.y),a.addScaledVector(vr,i.z),a}static isFrontFacing(e,t,n,r){return or.subVectors(n,t),sr.subVectors(e,t),or.cross(sr).dot(r)<0}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,r){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,t,n,r){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,n),this.c.fromBufferAttribute(e,r),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return or.subVectors(this.c,this.b),sr.subVectors(this.a,this.b),or.cross(sr).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return e.getNormal(this.a,this.b,this.c,t)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,n){return e.getBarycoord(t,this.a,this.b,this.c,n)}getInterpolation(t,n,r,i,a){return e.getInterpolation(t,this.a,this.b,this.c,n,r,i,a)}containsPoint(t){return e.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return e.isFrontFacing(this.a,this.b,this.c,t)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){let n=this.a,r=this.b,i=this.c,a,o;ur.subVectors(r,n),dr.subVectors(i,n),pr.subVectors(e,n);let s=ur.dot(pr),c=dr.dot(pr);if(s<=0&&c<=0)return t.copy(n);mr.subVectors(e,r);let l=ur.dot(mr),u=dr.dot(mr);if(l>=0&&u<=l)return t.copy(r);let d=s*u-l*c;if(d<=0&&s>=0&&l<=0)return a=s/(s-l),t.copy(n).addScaledVector(ur,a);hr.subVectors(e,i);let f=ur.dot(hr),p=dr.dot(hr);if(p>=0&&f<=p)return t.copy(i);let m=f*c-s*p;if(m<=0&&c>=0&&p<=0)return o=c/(c-p),t.copy(n).addScaledVector(dr,o);let h=l*p-f*u;if(h<=0&&u-l>=0&&f-p>=0)return fr.subVectors(i,r),o=(u-l)/(u-l+(f-p)),t.copy(r).addScaledVector(fr,o);let g=1/(h+m+d);return a=m*g,o=d*g,t.copy(n).addScaledVector(ur,a).addScaledVector(dr,o)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}},br=class{constructor(e=new k(1/0,1/0,1/0),t=new k(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,n=e.length;t=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y&&e.z>=this.min.z&&e.z<=this.max.z}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y&&e.max.z>=this.min.z&&e.min.z<=this.max.z}intersectsSphere(e){return this.clampPoint(e.center,Sr),Sr.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(Ar),jr.subVectors(this.max,Ar),wr.subVectors(e.a,Ar),Tr.subVectors(e.b,Ar),Er.subVectors(e.c,Ar),Dr.subVectors(Tr,wr),Or.subVectors(Er,Tr),kr.subVectors(wr,Er);let t=[0,-Dr.z,Dr.y,0,-Or.z,Or.y,0,-kr.z,kr.y,Dr.z,0,-Dr.x,Or.z,0,-Or.x,kr.z,0,-kr.x,-Dr.y,Dr.x,0,-Or.y,Or.x,0,-kr.y,kr.x,0];return!Pr(t,wr,Tr,Er,jr)||(t=[1,0,0,0,1,0,0,0,1],!Pr(t,wr,Tr,Er,jr))?!1:(Mr.crossVectors(Dr,Or),t=[Mr.x,Mr.y,Mr.z],Pr(t,wr,Tr,Er,jr))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Sr).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(Sr).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(xr[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),xr[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),xr[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),xr[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),xr[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),xr[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),xr[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),xr[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(xr),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}toJSON(){return{min:this.min.toArray(),max:this.max.toArray()}}fromJSON(e){return this.min.fromArray(e.min),this.max.fromArray(e.max),this}},xr=[new k,new k,new k,new k,new k,new k,new k,new k],Sr=new k,Cr=new br,wr=new k,Tr=new k,Er=new k,Dr=new k,Or=new k,kr=new k,Ar=new k,jr=new k,Mr=new k,Nr=new k;function Pr(e,t,n,r,i){for(let a=0,o=e.length-3;a<=o;a+=3){Nr.fromArray(e,a);let o=i.x*Math.abs(Nr.x)+i.y*Math.abs(Nr.y)+i.z*Math.abs(Nr.z),s=t.dot(Nr),c=n.dot(Nr),l=r.dot(Nr);if(Math.max(-Math.max(s,c,l),Math.min(s,c,l))>o)return!1}return!0}var Fr=Ir();function Ir(){let e=new ArrayBuffer(4),t=new Float32Array(e),n=new Uint32Array(e),r=new Uint32Array(512),i=new Uint32Array(512);for(let e=0;e<256;++e){let t=e-127;t<-27?(r[e]=0,r[e|256]=32768,i[e]=24,i[e|256]=24):t<-14?(r[e]=1024>>-t-14,r[e|256]=1024>>-t-14|32768,i[e]=-t-1,i[e|256]=-t-1):t<=15?(r[e]=t+15<<10,r[e|256]=t+15<<10|32768,i[e]=13,i[e|256]=13):t<128?(r[e]=31744,r[e|256]=64512,i[e]=24,i[e|256]=24):(r[e]=31744,r[e|256]=64512,i[e]=13,i[e|256]=13)}let a=new Uint32Array(2048),o=new Uint32Array(64),s=new Uint32Array(64);for(let e=1;e<1024;++e){let t=e<<13,n=0;for(;!(t&8388608);)t<<=1,n-=8388608;t&=-8388609,n+=947912704,a[e]=t|n}for(let e=1024;e<2048;++e)a[e]=939524096+(e-1024<<13);for(let e=1;e<31;++e)o[e]=e<<23;o[31]=1199570944,o[32]=2147483648;for(let e=33;e<63;++e)o[e]=2147483648+(e-32<<23);o[63]=3347054592;for(let e=1;e<64;++e)e!==32&&(s[e]=1024);return{floatView:t,uint32View:n,baseTable:r,shiftTable:i,mantissaTable:a,exponentTable:o,offsetTable:s}}function Lr(e){Math.abs(e)>65504&&T(`DataUtils.toHalfFloat(): Value out of range.`),e=D(e,-65504,65504),Fr.floatView[0]=e;let t=Fr.uint32View[0],n=t>>23&511;return Fr.baseTable[n]+((t&8388607)>>Fr.shiftTable[n])}function Rr(e){let t=e>>10;return Fr.uint32View[0]=Fr.mantissaTable[Fr.offsetTable[t]+(e&1023)]+Fr.exponentTable[t],Fr.floatView[0]}var zr=new k,Br=new O,Vr=0,Hr=class extends Ot{constructor(e,t,n=!1){if(super(),Array.isArray(e))throw TypeError(`THREE.BufferAttribute: array should be a Typed Array.`);this.isBufferAttribute=!0,Object.defineProperty(this,"id",{value:Vr++}),this.name=``,this.array=e,this.itemSize=t,this.count=e===void 0?0:e.length/t,this.normalized=n,this.usage=ft,this.updateRanges=[],this.gpuType=y,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,n){e*=this.itemSize,n*=t.itemSize;for(let r=0,i=this.itemSize;rthis.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius*=e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;Jr.subVectors(e,this.center);let t=Jr.lengthSq();if(t>this.radius*this.radius){let e=Math.sqrt(t),n=(e-this.radius)*.5;this.center.addScaledVector(Jr,n/e),this.radius+=n}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(Yr.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(Jr.copy(e.center).add(Yr)),this.expandByPoint(Jr.copy(e.center).sub(Yr))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}toJSON(){return{radius:this.radius,center:this.center.toArray()}}fromJSON(e){return this.radius=e.radius,this.center.fromArray(e.center),this}},Zr=0,Qr=new A,$r=new Xn,ei=new k,ti=new br,ni=new br,ri=new k,ii=class e extends Ot{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:Zr++}),this.uuid=Nt(),this.name=``,this.type=`BufferGeometry`,this.index=null,this.indirect=null,this.indirectOffset=0,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={},this._transformed=!1}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(vt(e)?Wr:Ur)(e,1):this.index=e,this}setIndirect(e,t=0){return this.indirect=e,this.indirectOffset=t,this}getIndirect(){return this.indirect}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return this.attributes[e]!==void 0}addGroup(e,t,n=0){this.groups.push({start:e,count:t,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){let t=this.attributes.position;t!==void 0&&(t.applyMatrix4(e),t.needsUpdate=!0);let n=this.attributes.normal;if(n!==void 0){let t=new an().getNormalMatrix(e);n.applyNormalMatrix(t),n.needsUpdate=!0}let r=this.attributes.tangent;return r!==void 0&&(r.transformDirection(e),r.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this._transformed=!0,this}applyQuaternion(e){return Qr.makeRotationFromQuaternion(e),this.applyMatrix4(Qr),this}rotateX(e){return Qr.makeRotationX(e),this.applyMatrix4(Qr),this}rotateY(e){return Qr.makeRotationY(e),this.applyMatrix4(Qr),this}rotateZ(e){return Qr.makeRotationZ(e),this.applyMatrix4(Qr),this}translate(e,t,n){return Qr.makeTranslation(e,t,n),this.applyMatrix4(Qr),this}scale(e,t,n){return Qr.makeScale(e,t,n),this.applyMatrix4(Qr),this}lookAt(e){return $r.lookAt(e),$r.updateMatrix(),this.applyMatrix4($r.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(ei).negate(),this.translate(ei.x,ei.y,ei.z),this}setFromPoints(e){let t=this.getAttribute(`position`);if(t===void 0){let t=[];for(let n=0,r=e.length;nt.count&&T(`BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry.`),t.needsUpdate=!0}return this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new br);let e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){E(`BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.`,this),this.boundingBox.set(new k(-1/0,-1/0,-1/0),new k(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),t)for(let e=0,n=t.length;e0&&(e.userData=this.userData),this.parameters!==void 0&&this._transformed!==!0){let t=this.parameters;for(let n in t)t[n]!==void 0&&(e[n]=t[n]);return e}e.data={attributes:{}};let t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});let n=this.attributes;for(let t in n){let r=n[t];e.data.attributes[t]=r.toJSON(e.data)}let r={},i=!1;for(let t in this.morphAttributes){let n=this.morphAttributes[t],a=[];for(let t=0,r=n.length;t0&&(r[t]=a,i=!0)}i&&(e.data.morphAttributes=r,e.data.morphTargetsRelative=this.morphTargetsRelative);let a=this.groups;a.length>0&&(e.data.groups=JSON.parse(JSON.stringify(a)));let o=this.boundingSphere;return o!==null&&(e.data.boundingSphere=o.toJSON()),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;let t={};this.name=e.name;let n=e.index;n!==null&&this.setIndex(n.clone());let r=e.attributes;for(let e in r){let n=r[e];this.setAttribute(e,n.clone(t))}let i=e.morphAttributes;for(let e in i){let n=[],r=i[e];for(let e=0,i=r.length;e0!=e>0&&this.version++,this._alphaTest=e}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(let t in e){let n=e[t];if(n===void 0){T(`Material: parameter '${t}' has value of undefined.`);continue}let r=this[t];if(r===void 0){T(`Material: '${t}' is not a property of THREE.${this.type}.`);continue}r&&r.isColor?r.set(n):r&&r.isVector2&&n&&n.isVector2||r&&r.isEuler&&n&&n.isEuler||r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[t]=n}}toJSON(e){let t=e===void 0||typeof e==`string`;t&&(e={textures:{},images:{}});let n={metadata:{version:4.7,type:`Material`,generator:`Material.toJSON`}};n.uuid=this.uuid,n.type=this.type,this.name!==``&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),this.roughness!==void 0&&(n.roughness=this.roughness),this.metalness!==void 0&&(n.metalness=this.metalness),this.sheen!==void 0&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(n.shininess=this.shininess),this.clearcoat!==void 0&&(n.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.sheenColorMap&&this.sheenColorMap.isTexture&&(n.sheenColorMap=this.sheenColorMap.toJSON(e).uuid),this.sheenRoughnessMap&&this.sheenRoughnessMap.isTexture&&(n.sheenRoughnessMap=this.sheenRoughnessMap.toJSON(e).uuid),this.dispersion!==void 0&&(n.dispersion=this.dispersion),this.iridescence!==void 0&&(n.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(n.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(n.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(n.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(n.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(n.combine=this.combine)),this.envMapRotation!==void 0&&(n.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(n.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(n.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(n.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(n.size=this.size),this.shadowSide!==null&&(n.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==1&&(n.blending=this.blending),this.side!==0&&(n.side=this.side),this.vertexColors===!0&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),this.transparent===!0&&(n.transparent=!0),this.blendSrc!==204&&(n.blendSrc=this.blendSrc),this.blendDst!==205&&(n.blendDst=this.blendDst),this.blendEquation!==100&&(n.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(n.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(n.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(n.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(n.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(n.blendAlpha=this.blendAlpha),this.depthFunc!==3&&(n.depthFunc=this.depthFunc),this.depthTest===!1&&(n.depthTest=this.depthTest),this.depthWrite===!1&&(n.depthWrite=this.depthWrite),this.colorWrite===!1&&(n.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(n.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==519&&(n.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(n.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(n.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==7680&&(n.stencilFail=this.stencilFail),this.stencilZFail!==7680&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==7680&&(n.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(n.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(n.rotation=this.rotation),this.polygonOffset===!0&&(n.polygonOffset=!0),this.polygonOffsetFactor!==0&&(n.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(n.linewidth=this.linewidth),this.dashSize!==void 0&&(n.dashSize=this.dashSize),this.gapSize!==void 0&&(n.gapSize=this.gapSize),this.scale!==void 0&&(n.scale=this.scale),this.dithering===!0&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),this.alphaHash===!0&&(n.alphaHash=!0),this.alphaToCoverage===!0&&(n.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(n.premultipliedAlpha=!0),this.forceSinglePass===!0&&(n.forceSinglePass=!0),this.allowOverride===!1&&(n.allowOverride=!1),this.wireframe===!0&&(n.wireframe=!0),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!==`round`&&(n.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!==`round`&&(n.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(n.flatShading=!0),this.visible===!1&&(n.visible=!1),this.toneMapped===!1&&(n.toneMapped=!1),this.fog===!1&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.userData=this.userData);function r(e){let t=[];for(let n in e){let r=e[n];delete r.metadata,t.push(r)}return t}if(t){let t=r(e.textures),i=r(e.images);t.length>0&&(n.textures=t),i.length>0&&(n.images=i)}return n}fromJSON(e,t){if(e.uuid!==void 0&&(this.uuid=e.uuid),e.name!==void 0&&(this.name=e.name),e.color!==void 0&&this.color!==void 0&&this.color.setHex(e.color),e.roughness!==void 0&&(this.roughness=e.roughness),e.metalness!==void 0&&(this.metalness=e.metalness),e.sheen!==void 0&&(this.sheen=e.sheen),e.sheenColor!==void 0&&(this.sheenColor=new j().setHex(e.sheenColor)),e.sheenRoughness!==void 0&&(this.sheenRoughness=e.sheenRoughness),e.emissive!==void 0&&this.emissive!==void 0&&this.emissive.setHex(e.emissive),e.specular!==void 0&&this.specular!==void 0&&this.specular.setHex(e.specular),e.specularIntensity!==void 0&&(this.specularIntensity=e.specularIntensity),e.specularColor!==void 0&&this.specularColor!==void 0&&this.specularColor.setHex(e.specularColor),e.shininess!==void 0&&(this.shininess=e.shininess),e.clearcoat!==void 0&&(this.clearcoat=e.clearcoat),e.clearcoatRoughness!==void 0&&(this.clearcoatRoughness=e.clearcoatRoughness),e.dispersion!==void 0&&(this.dispersion=e.dispersion),e.iridescence!==void 0&&(this.iridescence=e.iridescence),e.iridescenceIOR!==void 0&&(this.iridescenceIOR=e.iridescenceIOR),e.iridescenceThicknessRange!==void 0&&(this.iridescenceThicknessRange=e.iridescenceThicknessRange),e.transmission!==void 0&&(this.transmission=e.transmission),e.thickness!==void 0&&(this.thickness=e.thickness),e.attenuationDistance!==void 0&&(this.attenuationDistance=e.attenuationDistance),e.attenuationColor!==void 0&&this.attenuationColor!==void 0&&this.attenuationColor.setHex(e.attenuationColor),e.anisotropy!==void 0&&(this.anisotropy=e.anisotropy),e.anisotropyRotation!==void 0&&(this.anisotropyRotation=e.anisotropyRotation),e.fog!==void 0&&(this.fog=e.fog),e.flatShading!==void 0&&(this.flatShading=e.flatShading),e.blending!==void 0&&(this.blending=e.blending),e.combine!==void 0&&(this.combine=e.combine),e.side!==void 0&&(this.side=e.side),e.shadowSide!==void 0&&(this.shadowSide=e.shadowSide),e.opacity!==void 0&&(this.opacity=e.opacity),e.transparent!==void 0&&(this.transparent=e.transparent),e.alphaTest!==void 0&&(this.alphaTest=e.alphaTest),e.alphaHash!==void 0&&(this.alphaHash=e.alphaHash),e.depthFunc!==void 0&&(this.depthFunc=e.depthFunc),e.depthTest!==void 0&&(this.depthTest=e.depthTest),e.depthWrite!==void 0&&(this.depthWrite=e.depthWrite),e.colorWrite!==void 0&&(this.colorWrite=e.colorWrite),e.blendSrc!==void 0&&(this.blendSrc=e.blendSrc),e.blendDst!==void 0&&(this.blendDst=e.blendDst),e.blendEquation!==void 0&&(this.blendEquation=e.blendEquation),e.blendSrcAlpha!==void 0&&(this.blendSrcAlpha=e.blendSrcAlpha),e.blendDstAlpha!==void 0&&(this.blendDstAlpha=e.blendDstAlpha),e.blendEquationAlpha!==void 0&&(this.blendEquationAlpha=e.blendEquationAlpha),e.blendColor!==void 0&&this.blendColor!==void 0&&this.blendColor.setHex(e.blendColor),e.blendAlpha!==void 0&&(this.blendAlpha=e.blendAlpha),e.stencilWriteMask!==void 0&&(this.stencilWriteMask=e.stencilWriteMask),e.stencilFunc!==void 0&&(this.stencilFunc=e.stencilFunc),e.stencilRef!==void 0&&(this.stencilRef=e.stencilRef),e.stencilFuncMask!==void 0&&(this.stencilFuncMask=e.stencilFuncMask),e.stencilFail!==void 0&&(this.stencilFail=e.stencilFail),e.stencilZFail!==void 0&&(this.stencilZFail=e.stencilZFail),e.stencilZPass!==void 0&&(this.stencilZPass=e.stencilZPass),e.stencilWrite!==void 0&&(this.stencilWrite=e.stencilWrite),e.wireframe!==void 0&&(this.wireframe=e.wireframe),e.wireframeLinewidth!==void 0&&(this.wireframeLinewidth=e.wireframeLinewidth),e.wireframeLinecap!==void 0&&(this.wireframeLinecap=e.wireframeLinecap),e.wireframeLinejoin!==void 0&&(this.wireframeLinejoin=e.wireframeLinejoin),e.rotation!==void 0&&(this.rotation=e.rotation),e.linewidth!==void 0&&(this.linewidth=e.linewidth),e.dashSize!==void 0&&(this.dashSize=e.dashSize),e.gapSize!==void 0&&(this.gapSize=e.gapSize),e.scale!==void 0&&(this.scale=e.scale),e.polygonOffset!==void 0&&(this.polygonOffset=e.polygonOffset),e.polygonOffsetFactor!==void 0&&(this.polygonOffsetFactor=e.polygonOffsetFactor),e.polygonOffsetUnits!==void 0&&(this.polygonOffsetUnits=e.polygonOffsetUnits),e.dithering!==void 0&&(this.dithering=e.dithering),e.alphaToCoverage!==void 0&&(this.alphaToCoverage=e.alphaToCoverage),e.premultipliedAlpha!==void 0&&(this.premultipliedAlpha=e.premultipliedAlpha),e.forceSinglePass!==void 0&&(this.forceSinglePass=e.forceSinglePass),e.allowOverride!==void 0&&(this.allowOverride=e.allowOverride),e.visible!==void 0&&(this.visible=e.visible),e.toneMapped!==void 0&&(this.toneMapped=e.toneMapped),e.userData!==void 0&&(this.userData=e.userData),e.vertexColors!==void 0&&(typeof e.vertexColors==`number`?this.vertexColors=e.vertexColors>0:this.vertexColors=e.vertexColors),e.size!==void 0&&(this.size=e.size),e.sizeAttenuation!==void 0&&(this.sizeAttenuation=e.sizeAttenuation),e.map!==void 0&&(this.map=t[e.map]||null),e.matcap!==void 0&&(this.matcap=t[e.matcap]||null),e.alphaMap!==void 0&&(this.alphaMap=t[e.alphaMap]||null),e.bumpMap!==void 0&&(this.bumpMap=t[e.bumpMap]||null),e.bumpScale!==void 0&&(this.bumpScale=e.bumpScale),e.normalMap!==void 0&&(this.normalMap=t[e.normalMap]||null),e.normalMapType!==void 0&&(this.normalMapType=e.normalMapType),e.normalScale!==void 0){let t=e.normalScale;Array.isArray(t)===!1&&(t=[t,t]),this.normalScale=new O().fromArray(t)}return e.displacementMap!==void 0&&(this.displacementMap=t[e.displacementMap]||null),e.displacementScale!==void 0&&(this.displacementScale=e.displacementScale),e.displacementBias!==void 0&&(this.displacementBias=e.displacementBias),e.roughnessMap!==void 0&&(this.roughnessMap=t[e.roughnessMap]||null),e.metalnessMap!==void 0&&(this.metalnessMap=t[e.metalnessMap]||null),e.emissiveMap!==void 0&&(this.emissiveMap=t[e.emissiveMap]||null),e.emissiveIntensity!==void 0&&(this.emissiveIntensity=e.emissiveIntensity),e.specularMap!==void 0&&(this.specularMap=t[e.specularMap]||null),e.specularIntensityMap!==void 0&&(this.specularIntensityMap=t[e.specularIntensityMap]||null),e.specularColorMap!==void 0&&(this.specularColorMap=t[e.specularColorMap]||null),e.envMap!==void 0&&(this.envMap=t[e.envMap]||null),e.envMapRotation!==void 0&&this.envMapRotation.fromArray(e.envMapRotation),e.envMapIntensity!==void 0&&(this.envMapIntensity=e.envMapIntensity),e.reflectivity!==void 0&&(this.reflectivity=e.reflectivity),e.refractionRatio!==void 0&&(this.refractionRatio=e.refractionRatio),e.lightMap!==void 0&&(this.lightMap=t[e.lightMap]||null),e.lightMapIntensity!==void 0&&(this.lightMapIntensity=e.lightMapIntensity),e.aoMap!==void 0&&(this.aoMap=t[e.aoMap]||null),e.aoMapIntensity!==void 0&&(this.aoMapIntensity=e.aoMapIntensity),e.gradientMap!==void 0&&(this.gradientMap=t[e.gradientMap]||null),e.clearcoatMap!==void 0&&(this.clearcoatMap=t[e.clearcoatMap]||null),e.clearcoatRoughnessMap!==void 0&&(this.clearcoatRoughnessMap=t[e.clearcoatRoughnessMap]||null),e.clearcoatNormalMap!==void 0&&(this.clearcoatNormalMap=t[e.clearcoatNormalMap]||null),e.clearcoatNormalScale!==void 0&&(this.clearcoatNormalScale=new O().fromArray(e.clearcoatNormalScale)),e.iridescenceMap!==void 0&&(this.iridescenceMap=t[e.iridescenceMap]||null),e.iridescenceThicknessMap!==void 0&&(this.iridescenceThicknessMap=t[e.iridescenceThicknessMap]||null),e.transmissionMap!==void 0&&(this.transmissionMap=t[e.transmissionMap]||null),e.thicknessMap!==void 0&&(this.thicknessMap=t[e.thicknessMap]||null),e.anisotropyMap!==void 0&&(this.anisotropyMap=t[e.anisotropyMap]||null),e.sheenColorMap!==void 0&&(this.sheenColorMap=t[e.sheenColorMap]||null),e.sheenRoughnessMap!==void 0&&(this.sheenRoughnessMap=t[e.sheenRoughnessMap]||null),this}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;let t=e.clippingPlanes,n=null;if(t!==null){let e=t.length;n=Array(e);for(let r=0;r!==e;++r)n[r]=t[r].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.allowOverride=e.allowOverride,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:`dispose`})}set needsUpdate(e){e===!0&&this.version++}},ui=class extends li{constructor(e){super(),this.isSpriteMaterial=!0,this.type=`SpriteMaterial`,this.color=new j(16777215),this.map=null,this.alphaMap=null,this.rotation=0,this.sizeAttenuation=!0,this.transparent=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.rotation=e.rotation,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}},di=new k,fi=new k,pi=new k,mi=new k,hi=new k,gi=new k,_i=new k,vi=class{constructor(e=new k,t=new k(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,di)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);let n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,n)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){let t=di.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(di.copy(this.origin).addScaledVector(this.direction,t),di.distanceToSquared(e))}distanceSqToSegment(e,t,n,r){fi.copy(e).add(t).multiplyScalar(.5),pi.copy(t).sub(e).normalize(),mi.copy(this.origin).sub(fi);let i=e.distanceTo(t)*.5,a=-this.direction.dot(pi),o=mi.dot(this.direction),s=-mi.dot(pi),c=mi.lengthSq(),l=Math.abs(1-a*a),u,d,f,p;if(l>0)if(u=a*s-o,d=a*o-s,p=i*l,u>=0)if(d>=-p)if(d<=p){let e=1/l;u*=e,d*=e,f=u*(u+a*d+2*o)+d*(a*u+d+2*s)+c}else d=i,u=Math.max(0,-(a*d+o)),f=-u*u+d*(d+2*s)+c;else d=-i,u=Math.max(0,-(a*d+o)),f=-u*u+d*(d+2*s)+c;else d<=-p?(u=Math.max(0,-(-a*i+o)),d=u>0?-i:Math.min(Math.max(-i,-s),i),f=-u*u+d*(d+2*s)+c):d<=p?(u=0,d=Math.min(Math.max(-i,-s),i),f=d*(d+2*s)+c):(u=Math.max(0,-(a*i+o)),d=u>0?i:Math.min(Math.max(-i,-s),i),f=-u*u+d*(d+2*s)+c);else d=a>0?-i:i,u=Math.max(0,-(a*d+o)),f=-u*u+d*(d+2*s)+c;return n&&n.copy(this.origin).addScaledVector(this.direction,u),r&&r.copy(fi).addScaledVector(pi,d),f}intersectSphere(e,t){di.subVectors(e.center,this.origin);let n=di.dot(this.direction),r=di.dot(di)-n*n,i=e.radius*e.radius;if(r>i)return null;let a=Math.sqrt(i-r),o=n-a,s=n+a;return s<0?null:o<0?this.at(s,t):this.at(o,t)}intersectsSphere(e){return e.radius<0?!1:this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){let t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;let n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}intersectPlane(e,t){let n=this.distanceToPlane(e);return n===null?null:this.at(n,t)}intersectsPlane(e){let t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let n,r,i,a,o,s,c=1/this.direction.x,l=1/this.direction.y,u=1/this.direction.z,d=this.origin;return c>=0?(n=(e.min.x-d.x)*c,r=(e.max.x-d.x)*c):(n=(e.max.x-d.x)*c,r=(e.min.x-d.x)*c),l>=0?(i=(e.min.y-d.y)*l,a=(e.max.y-d.y)*l):(i=(e.max.y-d.y)*l,a=(e.min.y-d.y)*l),n>a||i>r||((i>n||isNaN(n))&&(n=i),(a=0?(o=(e.min.z-d.z)*u,s=(e.max.z-d.z)*u):(o=(e.max.z-d.z)*u,s=(e.min.z-d.z)*u),n>s||o>r)||((o>n||n!==n)&&(n=o),(s=0?n:r,t)}intersectsBox(e){return this.intersectBox(e,di)!==null}intersectTriangle(e,t,n,r,i){hi.subVectors(t,e),gi.subVectors(n,e),_i.crossVectors(hi,gi);let a=this.direction.dot(_i),o;if(a>0){if(r)return null;o=1}else if(a<0)o=-1,a=-a;else return null;mi.subVectors(this.origin,e);let s=o*this.direction.dot(gi.crossVectors(mi,gi));if(s<0)return null;let c=o*this.direction.dot(hi.cross(mi));if(c<0||s+c>a)return null;let l=-o*mi.dot(_i);return l<0?null:this.at(l/a,i)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}},yi=class extends li{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type=`MeshBasicMaterial`,this.color=new j(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Nn,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap=`round`,this.wireframeLinejoin=`round`,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}},bi=new A,xi=new vi,Si=new Xr,Ci=new k,wi=new k,Ti=new k,Ei=new k,Di=new k,Oi=new k,ki=new k,Ai=new k,ji=class extends Xn{constructor(e=new ii,t=new yi){super(),this.isMesh=!0,this.type=`Mesh`,this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.count=1,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),e.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),e.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}updateMorphTargets(){let e=this.geometry.morphAttributes,t=Object.keys(e);if(t.length>0){let n=e[t[0]];if(n!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=n.length;e(e.far-e.near)**2))&&(bi.copy(i).invert(),xi.copy(e.ray).applyMatrix4(bi),!(n.boundingBox!==null&&xi.intersectsBox(n.boundingBox)===!1)&&this._computeIntersections(e,t,xi)))}_computeIntersections(e,t,n){let r,i=this.geometry,a=this.material,o=i.index,s=i.attributes.position,c=i.attributes.uv,l=i.attributes.uv1,u=i.attributes.normal,d=i.groups,f=i.drawRange;if(o!==null)if(Array.isArray(a))for(let i=0,s=d.length;in.far?null:{distance:l,point:Ai.clone(),object:e}}function Ni(e,t,n,r,i,a,o,s,c,l){e.getVertexPosition(s,wi),e.getVertexPosition(c,Ti),e.getVertexPosition(l,Ei);let u=Mi(e,t,n,r,wi,Ti,Ei,ki);if(u){let e=new k;yr.getBarycoord(ki,wi,Ti,Ei,e),i&&(u.uv=yr.getInterpolatedAttribute(i,s,c,l,e,new O)),a&&(u.uv1=yr.getInterpolatedAttribute(a,s,c,l,e,new O)),o&&(u.normal=yr.getInterpolatedAttribute(o,s,c,l,e,new k),u.normal.dot(r.direction)>0&&u.normal.multiplyScalar(-1));let t={a:s,b:c,c:l,normal:new k,materialIndex:0};yr.getNormal(wi,Ti,Ei,t.normal),u.face=t,u.barycoord=e}return u}var Pi=class extends bn{constructor(e=null,t=1,n=1,r,i,a,s,c,l=o,u=o,d,f){super(null,a,s,c,l,u,r,i,d,f),this.isDataTexture=!0,this.image={data:e,width:t,height:n},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}},Fi=class extends Hr{constructor(e,t,n,r=1){super(e,t,n),this.isInstancedBufferAttribute=!0,this.meshPerAttribute=r}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}toJSON(){let e=super.toJSON();return e.meshPerAttribute=this.meshPerAttribute,e.isInstancedBufferAttribute=!0,e}},Ii=new A,Li=new A,Ri=[],zi=new br,Bi=new A,Vi=new ji,Hi=new Xr,Ui=class extends ji{constructor(e,t,n){super(e,t),this.isInstancedMesh=!0,this.instanceMatrix=new Fi(new Float32Array(n*16),16),this.instanceColor=null,this.morphTexture=null,this.count=n,this.boundingBox=null,this.boundingSphere=null;for(let e=0;e1)?null:t.copy(e.start).addScaledVector(r,a)}intersectsLine(e){let t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){let n=t||Ki.getNormalMatrix(e),r=this.coplanarPoint(Wi).applyMatrix4(e),i=this.normal.applyMatrix3(n).normalize();return this.constant=-r.dot(i),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}},Ji=new Xr,Yi=new O(.5,.5),Xi=new k,Zi=class{constructor(e=new qi,t=new qi,n=new qi,r=new qi,i=new qi,a=new qi){this.planes=[e,t,n,r,i,a]}set(e,t,n,r,i,a){let o=this.planes;return o[0].copy(e),o[1].copy(t),o[2].copy(n),o[3].copy(r),o[4].copy(i),o[5].copy(a),this}copy(e){let t=this.planes;for(let n=0;n<6;n++)t[n].copy(e.planes[n]);return this}setFromProjectionMatrix(e,t=mt,n=!1){let r=this.planes,i=e.elements,a=i[0],o=i[1],s=i[2],c=i[3],l=i[4],u=i[5],d=i[6],f=i[7],p=i[8],m=i[9],h=i[10],g=i[11],_=i[12],v=i[13],y=i[14],b=i[15];if(r[0].setComponents(c-a,f-l,g-p,b-_).normalize(),r[1].setComponents(c+a,f+l,g+p,b+_).normalize(),r[2].setComponents(c+o,f+u,g+m,b+v).normalize(),r[3].setComponents(c-o,f-u,g-m,b-v).normalize(),n)r[4].setComponents(s,d,h,y).normalize(),r[5].setComponents(c-s,f-d,g-h,b-y).normalize();else if(r[4].setComponents(c-s,f-d,g-h,b-y).normalize(),t===2e3)r[5].setComponents(c+s,f+d,g+h,b+y).normalize();else if(t===2001)r[5].setComponents(s,d,h,y).normalize();else throw Error(`THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: `+t);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),Ji.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{let t=e.geometry;t.boundingSphere===null&&t.computeBoundingSphere(),Ji.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(Ji)}intersectsSprite(e){return Ji.center.set(0,0,0),Ji.radius=.7071067811865476+Yi.distanceTo(e.center),Ji.applyMatrix4(e.matrixWorld),this.intersectsSphere(Ji)}intersectsSphere(e){let t=this.planes,n=e.center,r=-e.radius;for(let e=0;e<6;e++)if(t[e].distanceToPoint(n)0?e.max.x:e.min.x,Xi.y=r.normal.y>0?e.max.y:e.min.y,Xi.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(Xi)<0)return!1}return!0}containsPoint(e){let t=this.planes;for(let n=0;n<6;n++)if(t[n].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}},Qi=new A,$i=class e{constructor(){this.coordinateSystem=mt,this._frustums=[],this._count=0}setFromArrayCamera(e){let t=e.cameras,n=this._frustums;for(let e=0;e0?1:-1,l.push(ne.x,ne.y,ne.z),u.push(s/h),u.push(1-a/g),te+=1}for(let e=0;e0&&v(!0),t>0&&v(!1)),this.setIndex(l),this.setAttribute(`position`,new Kr(u,3)),this.setAttribute(`normal`,new Kr(d,3)),this.setAttribute(`uv`,new Kr(f,2));function _(){let a=new k,_=new k,v=0,y=(t-e)/n;for(let c=0;c<=i;c++){let l=[],g=c/i,v=g*(t-e)+e;for(let e=0;e<=r;e++){let t=e/r,i=t*s+o,c=Math.sin(i),m=Math.cos(i);_.x=v*c,_.y=-g*n+h,_.z=v*m,u.push(_.x,_.y,_.z),a.set(c,y,m).normalize(),d.push(a.x,a.y,a.z),f.push(t,1-g),l.push(p++)}m.push(l)}for(let n=0;n0||r!==0)&&(l.push(a,o,c),v+=3),(t>0||r!==i-1)&&(l.push(o,s,c),v+=3)}c.addGroup(g,v,0),g+=v}function v(n){let i=p,a=new O,m=new k,_=0,v=n===!0?e:t,y=n===!0?1:-1;for(let e=1;e<=r;e++)u.push(0,h*y,0),d.push(0,y,0),f.push(.5,.5),p++;let b=p;for(let e=0;e<=r;e++){let t=e/r*s+o,n=Math.cos(t),i=Math.sin(t);m.x=v*i,m.y=h*y,m.z=v*n,u.push(m.x,m.y,m.z),d.push(0,y,0),a.x=n*.5+.5,a.y=i*.5*y+.5,f.push(a.x,a.y),p++}for(let e=0;e0)&&f.push(t,i,c),(e!==n-1||s0!=e>0&&this.version++,this._anisotropy=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get dispersion(){return this._dispersion}set dispersion(e){this._dispersion>0!=e>0&&this.version++,this._dispersion=e}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:``,PHYSICAL:``},this.anisotropy=e.anisotropy,this.anisotropyRotation=e.anisotropyRotation,this.anisotropyMap=e.anisotropyMap,this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.dispersion=e.dispersion,this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}},ha=class extends li{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type=`MeshPhongMaterial`,this.color=new j(16777215),this.specular=new j(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new j(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new O(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Nn,this.combine=0,this.reflectivity=1,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap=`round`,this.wireframeLinejoin=`round`,this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.envMapIntensity=e.envMapIntensity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}},ga=class extends li{constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:``},this.type=`MeshToonMaterial`,this.color=new j(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new j(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new O(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap=`round`,this.wireframeLinejoin=`round`,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.gradientMap=e.gradientMap,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}},_a=class extends li{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type=`MeshNormalMaterial`,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new O(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this}},va=class extends li{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type=`MeshLambertMaterial`,this.color=new j(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new j(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new O(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Nn,this.combine=0,this.reflectivity=1,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap=`round`,this.wireframeLinejoin=`round`,this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.envMapIntensity=e.envMapIntensity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}},ya=class extends li{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:``},this.type=`MeshMatcapMaterial`,this.color=new j(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new O(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:``},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this.fog=e.fog,this}},ba=class extends ea{constructor(e){super(),this.isLineDashedMaterial=!0,this.type=`LineDashedMaterial`,this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}copy(e){return super.copy(e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}};function xa(e,t){return!e||e.constructor===t?e:typeof t.BYTES_PER_ELEMENT==`number`?new t(e):Array.prototype.slice.call(e)}var Sa=class{constructor(e,t,n,r){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=r===void 0?new t.constructor(n):r,this.sampleValues=t,this.valueSize=n,this.settings=null,this.DefaultSettings_={}}evaluate(e){let t=this.parameterPositions,n=this._cachedIndex,r=t[n],i=t[n-1];validate_interval:{seek:{let a;linear_scan:{forward_scan:if(!(e=i)){let o=t[1];e=i)break seek}a=n,n=0;break linear_scan}break validate_interval}for(;n>>1;et;)--a;if(++a,i!==0||a!==r){i>=a&&(a=Math.max(a,1),i=a-1);let e=this.getValueSize();this.times=n.slice(i,a),this.values=this.values.slice(i*e,a*e)}return this}validate(){let e=!0,t=this.getValueSize();t-Math.floor(t)!==0&&(E(`KeyframeTrack: Invalid value size in track.`,this),e=!1);let n=this.times,r=this.values,i=n.length;i===0&&(E(`KeyframeTrack: Track is empty.`,this),e=!1);let a=null;for(let t=0;t!==i;t++){let r=n[t];if(typeof r==`number`&&isNaN(r)){E(`KeyframeTrack: Time is not a valid number.`,this,t,r),e=!1;break}if(a!==null&&a>r){E(`KeyframeTrack: Out of order keys.`,this,t,r,a),e=!1;break}a=r}if(r!==void 0&&yt(r))for(let t=0,n=r.length;t!==n;++t){let n=r[t];if(isNaN(n)){E(`KeyframeTrack: Value is not a valid number.`,this,t,n),e=!1;break}}return e}optimize(){let e=this.times.slice(),t=this.values.slice(),n=this.getValueSize(),r=this.getInterpolation()===Xe,i=e.length-1,a=1;for(let o=1;o0){e[a]=e[i];for(let e=i*n,r=a*n,o=0;o!==n;++o)t[r+o]=t[e+o];++a}return a===e.length?(this.times=e,this.values=t):(this.times=e.slice(0,a),this.values=t.slice(0,a*n)),this}clone(){let e=this.times.slice(),t=this.values.slice(),n=this.constructor,r=new n(this.name,e,t);return r.createInterpolant=this.createInterpolant,r}};Da.prototype.ValueTypeName=``,Da.prototype.TimeBufferType=Float32Array,Da.prototype.ValueBufferType=Float32Array,Da.prototype.DefaultInterpolation=Ye;var Oa=class extends Da{constructor(e,t,n){super(e,t,n)}};Oa.prototype.ValueTypeName=`bool`,Oa.prototype.ValueBufferType=Array,Oa.prototype.DefaultInterpolation=Je,Oa.prototype.InterpolantFactoryMethodLinear=void 0,Oa.prototype.InterpolantFactoryMethodSmooth=void 0;var ka=class extends Da{constructor(e,t,n,r){super(e,t,n,r)}};ka.prototype.ValueTypeName=`color`;var Aa=class extends Da{constructor(e,t,n,r){super(e,t,n,r)}};Aa.prototype.ValueTypeName=`number`;var ja=class extends Sa{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e,t,n,r){let i=this.resultBuffer,a=this.sampleValues,o=this.valueSize,s=(n-t)/(r-t),c=e*o;for(let e=c+o;c!==e;c+=4)tn.slerpFlat(i,0,a,c-o,a,c,s);return i}},Ma=class extends Da{constructor(e,t,n,r){super(e,t,n,r)}InterpolantFactoryMethodLinear(e){return new ja(this.times,this.values,this.getValueSize(),e)}};Ma.prototype.ValueTypeName=`quaternion`,Ma.prototype.InterpolantFactoryMethodSmooth=void 0;var Na=class extends Da{constructor(e,t,n){super(e,t,n)}};Na.prototype.ValueTypeName=`string`,Na.prototype.ValueBufferType=Array,Na.prototype.DefaultInterpolation=Je,Na.prototype.InterpolantFactoryMethodLinear=void 0,Na.prototype.InterpolantFactoryMethodSmooth=void 0;var Pa=class extends Da{constructor(e,t,n,r){super(e,t,n,r)}};Pa.prototype.ValueTypeName=`vector`;var Fa={enabled:!1,files:{},add:function(e,t){this.enabled!==!1&&(Ia(e)||(this.files[e]=t))},get:function(e){if(this.enabled!==!1&&!Ia(e))return this.files[e]},remove:function(e){delete this.files[e]},clear:function(){this.files={}}};function Ia(e){try{let t=e.slice(e.indexOf(`:`)+1);return new URL(t).protocol===`blob:`}catch{return!1}}var La=new class{constructor(e,t,n){let r=this,i=!1,a=0,o=0,s,c=[];this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=n,this._abortController=null,this.itemStart=function(e){o++,i===!1&&r.onStart!==void 0&&r.onStart(e,a,o),i=!0},this.itemEnd=function(e){a++,r.onProgress!==void 0&&r.onProgress(e,a,o),a===o&&(i=!1,r.onLoad!==void 0&&r.onLoad())},this.itemError=function(e){r.onError!==void 0&&r.onError(e)},this.resolveURL=function(e){return e=e.normalize(`NFC`),s?s(e):e},this.setURLModifier=function(e){return s=e,this},this.addHandler=function(e,t){return c.push(e,t),this},this.removeHandler=function(e){let t=c.indexOf(e);return t!==-1&&c.splice(t,2),this},this.getHandler=function(e){for(let t=0,n=c.length;t1&&(a=1,i=D((t-e)/u,0,1))}}return t.copy(o).addScaledVector(Vo,i),n.copy(s).addScaledVector(Ho,a),t.distanceToSquared(n)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return new this.constructor().copy(this)}},qo=class extends Ot{constructor(e,t=null){super(),this.object=e,this.domElement=t,this.enabled=!0,this.state=-1,this.keys={},this.mouseButtons={LEFT:null,MIDDLE:null,RIGHT:null},this.touches={ONE:null,TWO:null}}connect(e){if(e===void 0){T(`Controls: connect() now requires an element.`);return}this.domElement!==null&&this.disconnect(),this.domElement=e}disconnect(){}dispose(){}update(){}};function Jo(e,t,n,r){let i=Yo(r);switch(n){case w:return e*t;case oe:return e*t/i.components*i.byteLength;case se:return e*t/i.components*i.byteLength;case ce:return e*t*2/i.components*i.byteLength;case le:return e*t*2/i.components*i.byteLength;case ne:return e*t*3/i.components*i.byteLength;case re:return e*t*4/i.components*i.byteLength;case de:return e*t*4/i.components*i.byteLength;case fe:case pe:return Math.floor((e+3)/4)*Math.floor((t+3)/4)*8;case me:case he:return Math.floor((e+3)/4)*Math.floor((t+3)/4)*16;case _e:case ye:return Math.max(e,16)*Math.max(t,8)/4;case ge:case ve:return Math.max(e,8)*Math.max(t,8)/2;case be:case xe:case Ce:case we:return Math.floor((e+3)/4)*Math.floor((t+3)/4)*8;case Se:case Te:case Ee:return Math.floor((e+3)/4)*Math.floor((t+3)/4)*16;case De:return Math.floor((e+3)/4)*Math.floor((t+3)/4)*16;case Oe:return Math.floor((e+4)/5)*Math.floor((t+3)/4)*16;case ke:return Math.floor((e+4)/5)*Math.floor((t+4)/5)*16;case Ae:return Math.floor((e+5)/6)*Math.floor((t+4)/5)*16;case je:return Math.floor((e+5)/6)*Math.floor((t+5)/6)*16;case Me:return Math.floor((e+7)/8)*Math.floor((t+4)/5)*16;case Ne:return Math.floor((e+7)/8)*Math.floor((t+5)/6)*16;case Pe:return Math.floor((e+7)/8)*Math.floor((t+7)/8)*16;case Fe:return Math.floor((e+9)/10)*Math.floor((t+4)/5)*16;case Ie:return Math.floor((e+9)/10)*Math.floor((t+5)/6)*16;case Le:return Math.floor((e+9)/10)*Math.floor((t+7)/8)*16;case Re:return Math.floor((e+9)/10)*Math.floor((t+9)/10)*16;case ze:return Math.floor((e+11)/12)*Math.floor((t+9)/10)*16;case Be:return Math.floor((e+11)/12)*Math.floor((t+11)/12)*16;case Ve:case He:case Ue:return Math.ceil(e/4)*Math.ceil(t/4)*16;case We:case Ge:return Math.ceil(e/4)*Math.ceil(t/4)*8;case Ke:case qe:return Math.ceil(e/4)*Math.ceil(t/4)*16}throw Error(`Unable to determine texture byte length for ${n} format.`)}function Yo(e){switch(e){case p:case m:return{byteLength:1,components:1};case g:case h:case b:return{byteLength:2,components:1};case x:case S:return{byteLength:2,components:4};case v:case _:case y:return{byteLength:4,components:1};case ee:case te:return{byteLength:4,components:3}}throw Error(`THREE.TextureUtils: Unknown texture type ${e}.`)}typeof __THREE_DEVTOOLS__<`u`&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent(`register`,{detail:{revision:`185`}})),typeof window<`u`&&(window.__THREE__?T(`WARNING: Multiple instances of Three.js being imported.`):window.__THREE__=`185`);var Xo={type:`change`},Zo={type:`start`},Qo={type:`end`},$o=new vi,es=new qi,ts=Math.cos(70*en.DEG2RAD),ns=new k,rs=2*Math.PI,is={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6},as=1e-6,os=class extends qo{constructor(e,r=null){super(e,r),this.state=is.NONE,this.target=new k,this.cursor=new k,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minTargetRadius=0,this.maxTargetRadius=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.keyRotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.zoomToCursor=!1,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:`ArrowLeft`,UP:`ArrowUp`,RIGHT:`ArrowRight`,BOTTOM:`ArrowDown`},this.mouseButtons={LEFT:t.ROTATE,MIDDLE:t.DOLLY,RIGHT:t.PAN},this.touches={ONE:n.ROTATE,TWO:n.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._cursorStyle=`auto`,this._domElementKeyEvents=null,this._lastPosition=new k,this._lastQuaternion=new tn,this._lastTargetPosition=new k,this._quat=new tn().setFromUnitVectors(e.up,new k(0,1,0)),this._quatInverse=this._quat.clone().invert(),this._spherical=new Lo,this._sphericalDelta=new Lo,this._scale=1,this._panOffset=new k,this._rotateStart=new O,this._rotateEnd=new O,this._rotateDelta=new O,this._panStart=new O,this._panEnd=new O,this._panDelta=new O,this._dollyStart=new O,this._dollyEnd=new O,this._dollyDelta=new O,this._dollyDirection=new k,this._mouse=new O,this._performCursorZoom=!1,this._pointers=[],this._pointerPositions={},this._controlActive=!1,this._onPointerMove=cs.bind(this),this._onPointerDown=ss.bind(this),this._onPointerUp=ls.bind(this),this._onContextMenu=gs.bind(this),this._onMouseWheel=fs.bind(this),this._onKeyDown=ps.bind(this),this._onTouchStart=ms.bind(this),this._onTouchMove=hs.bind(this),this._onMouseDown=us.bind(this),this._onMouseMove=ds.bind(this),this._interceptControlDown=_s.bind(this),this._interceptControlUp=vs.bind(this),this.domElement!==null&&this.connect(this.domElement),this.update()}set cursorStyle(e){this._cursorStyle=e,e===`grab`?this.domElement.style.cursor=`grab`:this.domElement.style.cursor=`auto`}get cursorStyle(){return this._cursorStyle}connect(e){super.connect(e),this.domElement.addEventListener(`pointerdown`,this._onPointerDown),this.domElement.addEventListener(`pointercancel`,this._onPointerUp),this.domElement.addEventListener(`contextmenu`,this._onContextMenu),this.domElement.addEventListener(`wheel`,this._onMouseWheel,{passive:!1}),this.domElement.getRootNode().addEventListener(`keydown`,this._interceptControlDown,{passive:!0,capture:!0}),this.domElement.style.touchAction=`none`}disconnect(){this.domElement.removeEventListener(`pointerdown`,this._onPointerDown),this.domElement.ownerDocument.removeEventListener(`pointermove`,this._onPointerMove),this.domElement.ownerDocument.removeEventListener(`pointerup`,this._onPointerUp),this.domElement.removeEventListener(`pointercancel`,this._onPointerUp),this.domElement.removeEventListener(`wheel`,this._onMouseWheel),this.domElement.removeEventListener(`contextmenu`,this._onContextMenu),this.stopListenToKeyEvents(),this.domElement.getRootNode().removeEventListener(`keydown`,this._interceptControlDown,{capture:!0}),this.domElement.style.touchAction=``}dispose(){this.disconnect()}getPolarAngle(){return this._spherical.phi}getAzimuthalAngle(){return this._spherical.theta}getDistance(){return this.object.position.distanceTo(this.target)}listenToKeyEvents(e){e.addEventListener(`keydown`,this._onKeyDown),this._domElementKeyEvents=e}stopListenToKeyEvents(){this._domElementKeyEvents!==null&&(this._domElementKeyEvents.removeEventListener(`keydown`,this._onKeyDown),this._domElementKeyEvents=null)}saveState(){this.target0.copy(this.target),this.position0.copy(this.object.position),this.zoom0=this.object.zoom}reset(){this.target.copy(this.target0),this.object.position.copy(this.position0),this.object.zoom=this.zoom0,this.object.updateProjectionMatrix(),this.dispatchEvent(Xo),this.update(),this.state=is.NONE}pan(e,t){this._pan(e,t),this.update()}dollyIn(e){this._dollyIn(e),this.update()}dollyOut(e){this._dollyOut(e),this.update()}rotateLeft(e){this._rotateLeft(e),this.update()}rotateUp(e){this._rotateUp(e),this.update()}update(e=null){let t=this.object.position;ns.copy(t).sub(this.target),ns.applyQuaternion(this._quat),this._spherical.setFromVector3(ns),this.autoRotate&&this.state===is.NONE&&this._rotateLeft(this._getAutoRotationAngle(e)),this.enableDamping?(this._spherical.theta+=this._sphericalDelta.theta*this.dampingFactor,this._spherical.phi+=this._sphericalDelta.phi*this.dampingFactor):(this._spherical.theta+=this._sphericalDelta.theta,this._spherical.phi+=this._sphericalDelta.phi);let n=this.minAzimuthAngle,r=this.maxAzimuthAngle;isFinite(n)&&isFinite(r)&&(n<-Math.PI?n+=rs:n>Math.PI&&(n-=rs),r<-Math.PI?r+=rs:r>Math.PI&&(r-=rs),n<=r?this._spherical.theta=Math.max(n,Math.min(r,this._spherical.theta)):this._spherical.theta=this._spherical.theta>(n+r)/2?Math.max(n,this._spherical.theta):Math.min(r,this._spherical.theta)),this._spherical.phi=Math.max(this.minPolarAngle,Math.min(this.maxPolarAngle,this._spherical.phi)),this._spherical.makeSafe(),this.enableDamping===!0?this.target.addScaledVector(this._panOffset,this.dampingFactor):this.target.add(this._panOffset),this.target.sub(this.cursor),this.target.clampLength(this.minTargetRadius,this.maxTargetRadius),this.target.add(this.cursor);let i=!1;if(this.zoomToCursor&&this._performCursorZoom||this.object.isOrthographicCamera)this._spherical.radius=this._clampDistance(this._spherical.radius);else{let e=this._spherical.radius;this._spherical.radius=this._clampDistance(this._spherical.radius*this._scale),i=e!=this._spherical.radius}if(ns.setFromSpherical(this._spherical),ns.applyQuaternion(this._quatInverse),t.copy(this.target).add(ns),this.object.lookAt(this.target),this.enableDamping===!0?(this._sphericalDelta.theta*=1-this.dampingFactor,this._sphericalDelta.phi*=1-this.dampingFactor,this._panOffset.multiplyScalar(1-this.dampingFactor)):(this._sphericalDelta.set(0,0,0),this._panOffset.set(0,0,0)),this.zoomToCursor&&this._performCursorZoom){let e=null;if(this.object.isPerspectiveCamera){let t=ns.length();e=this._clampDistance(t*this._scale);let n=t-e;this.object.position.addScaledVector(this._dollyDirection,n),this.object.updateMatrixWorld(),i=!!n}else if(this.object.isOrthographicCamera){let t=new k(this._mouse.x,this._mouse.y,0);t.unproject(this.object);let n=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),this.object.updateProjectionMatrix(),i=n!==this.object.zoom;let r=new k(this._mouse.x,this._mouse.y,0);r.unproject(this.object),this.object.position.sub(r).add(t),this.object.updateMatrixWorld(),e=ns.length()}else console.warn(`WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled.`),this.zoomToCursor=!1;e!==null&&(this.screenSpacePanning?this.target.set(0,0,-1).transformDirection(this.object.matrix).multiplyScalar(e).add(this.object.position):($o.origin.copy(this.object.position),$o.direction.set(0,0,-1).transformDirection(this.object.matrix),Math.abs(this.object.up.dot($o.direction))as||8*(1-this._lastQuaternion.dot(this.object.quaternion))>as||this._lastTargetPosition.distanceToSquared(this.target)>as?(this.dispatchEvent(Xo),this._lastPosition.copy(this.object.position),this._lastQuaternion.copy(this.object.quaternion),this._lastTargetPosition.copy(this.target),!0):!1}_getAutoRotationAngle(e){return e===null?rs/60/60*this.autoRotateSpeed:rs/60*this.autoRotateSpeed*e}_getZoomScale(e){let t=Math.abs(e*.01);return .95**(this.zoomSpeed*t)}_rotateLeft(e){this._sphericalDelta.theta-=e}_rotateUp(e){this._sphericalDelta.phi-=e}_panLeft(e,t){ns.setFromMatrixColumn(t,0),ns.multiplyScalar(-e),this._panOffset.add(ns)}_panUp(e,t){this.screenSpacePanning===!0?ns.setFromMatrixColumn(t,1):(ns.setFromMatrixColumn(t,0),ns.crossVectors(this.object.up,ns)),ns.multiplyScalar(e),this._panOffset.add(ns)}_pan(e,t){let n=this.domElement;if(this.object.isPerspectiveCamera){let r=this.object.position;ns.copy(r).sub(this.target);let i=ns.length();i*=Math.tan(this.object.fov/2*Math.PI/180),this._panLeft(2*e*i/n.clientHeight,this.object.matrix),this._panUp(2*t*i/n.clientHeight,this.object.matrix)}else this.object.isOrthographicCamera?(this._panLeft(e*(this.object.right-this.object.left)/this.object.zoom/n.clientWidth,this.object.matrix),this._panUp(t*(this.object.top-this.object.bottom)/this.object.zoom/n.clientHeight,this.object.matrix)):(console.warn(`WARNING: OrbitControls.js encountered an unknown camera type - pan disabled.`),this.enablePan=!1)}_dollyOut(e){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale/=e:(console.warn(`WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled.`),this.enableZoom=!1)}_dollyIn(e){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale*=e:(console.warn(`WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled.`),this.enableZoom=!1)}_updateZoomParameters(e,t){if(!this.zoomToCursor)return;this._performCursorZoom=!0;let n=this.domElement.getBoundingClientRect(),r=e-n.left,i=t-n.top,a=n.width,o=n.height;this._mouse.x=r/a*2-1,this._mouse.y=-(i/o)*2+1,this._dollyDirection.set(this._mouse.x,this._mouse.y,1).unproject(this.object).sub(this.object.position).normalize()}_clampDistance(e){return Math.max(this.minDistance,Math.min(this.maxDistance,e))}_handleMouseDownRotate(e){this._rotateStart.set(e.clientX,e.clientY)}_handleMouseDownDolly(e){this._updateZoomParameters(e.clientX,e.clientX),this._dollyStart.set(e.clientX,e.clientY)}_handleMouseDownPan(e){this._panStart.set(e.clientX,e.clientY)}_handleMouseMoveRotate(e){this._rotateEnd.set(e.clientX,e.clientY),this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);let t=this.domElement;this._rotateLeft(rs*this._rotateDelta.x/t.clientHeight),this._rotateUp(rs*this._rotateDelta.y/t.clientHeight),this._rotateStart.copy(this._rotateEnd),this.update()}_handleMouseMoveDolly(e){this._dollyEnd.set(e.clientX,e.clientY),this._dollyDelta.subVectors(this._dollyEnd,this._dollyStart),this._dollyDelta.y>0?this._dollyOut(this._getZoomScale(this._dollyDelta.y)):this._dollyDelta.y<0&&this._dollyIn(this._getZoomScale(this._dollyDelta.y)),this._dollyStart.copy(this._dollyEnd),this.update()}_handleMouseMovePan(e){this._panEnd.set(e.clientX,e.clientY),this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd),this.update()}_handleMouseWheel(e){this._updateZoomParameters(e.clientX,e.clientY),e.deltaY<0?this._dollyIn(this._getZoomScale(e.deltaY)):e.deltaY>0&&this._dollyOut(this._getZoomScale(e.deltaY)),this.update()}_handleKeyDown(e){let t=!1;switch(e.code){case this.keys.UP:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateUp(rs*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,this.keyPanSpeed),t=!0;break;case this.keys.BOTTOM:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateUp(-rs*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,-this.keyPanSpeed),t=!0;break;case this.keys.LEFT:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateLeft(rs*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(this.keyPanSpeed,0),t=!0;break;case this.keys.RIGHT:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateLeft(-rs*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(-this.keyPanSpeed,0),t=!0;break}t&&(e.preventDefault(),this.update())}_handleTouchStartRotate(e){if(this._pointers.length===1)this._rotateStart.set(e.pageX,e.pageY);else{let t=this._getSecondPointerPosition(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);this._rotateStart.set(n,r)}}_handleTouchStartPan(e){if(this._pointers.length===1)this._panStart.set(e.pageX,e.pageY);else{let t=this._getSecondPointerPosition(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);this._panStart.set(n,r)}}_handleTouchStartDolly(e){let t=this._getSecondPointerPosition(e),n=e.pageX-t.x,r=e.pageY-t.y,i=Math.sqrt(n*n+r*r);this._dollyStart.set(0,i)}_handleTouchStartDollyPan(e){this.enableZoom&&this._handleTouchStartDolly(e),this.enablePan&&this._handleTouchStartPan(e)}_handleTouchStartDollyRotate(e){this.enableZoom&&this._handleTouchStartDolly(e),this.enableRotate&&this._handleTouchStartRotate(e)}_handleTouchMoveRotate(e){if(this._pointers.length==1)this._rotateEnd.set(e.pageX,e.pageY);else{let t=this._getSecondPointerPosition(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);this._rotateEnd.set(n,r)}this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);let t=this.domElement;this._rotateLeft(rs*this._rotateDelta.x/t.clientHeight),this._rotateUp(rs*this._rotateDelta.y/t.clientHeight),this._rotateStart.copy(this._rotateEnd)}_handleTouchMovePan(e){if(this._pointers.length===1)this._panEnd.set(e.pageX,e.pageY);else{let t=this._getSecondPointerPosition(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);this._panEnd.set(n,r)}this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd)}_handleTouchMoveDolly(e){let t=this._getSecondPointerPosition(e),n=e.pageX-t.x,r=e.pageY-t.y,i=Math.sqrt(n*n+r*r);this._dollyEnd.set(0,i),this._dollyDelta.set(0,(this._dollyEnd.y/this._dollyStart.y)**+this.zoomSpeed),this._dollyOut(this._dollyDelta.y),this._dollyStart.copy(this._dollyEnd);let a=(e.pageX+t.x)*.5,o=(e.pageY+t.y)*.5;this._updateZoomParameters(a,o)}_handleTouchMoveDollyPan(e){this.enableZoom&&this._handleTouchMoveDolly(e),this.enablePan&&this._handleTouchMovePan(e)}_handleTouchMoveDollyRotate(e){this.enableZoom&&this._handleTouchMoveDolly(e),this.enableRotate&&this._handleTouchMoveRotate(e)}_addPointer(e){this._pointers.push(e.pointerId)}_removePointer(e){delete this._pointerPositions[e.pointerId];for(let t=0;t=-1&&bs.z<=1&&e.layers.test(r.layers)===!0,l=e.element;l.style.display=c===!0?``:`none`,c===!0&&(e.onBeforeRender(t,n,r),l.style.transform=`translate(`+-100*e.center.x+`%,`+-100*e.center.y+`%)translate(`+(bs.x*i+i)+`px,`+(-bs.y*a+a)+`px)`,l.parentNode!==s&&s.appendChild(l),e.onAfterRender(t,n,r));let d={distanceToCameraSquared:u(r,e)};o.objects.set(e,d)}for(let t=0,i=e.children.length;t0){let{width:n,height:r}=e.context;t.bufferWidth=n,t.bufferHeight=r}let{environmentIntensity:i,environmentRotation:a}=e.scene;t.environmentIntensity=i,t.environmentRotation=a.clone(),t.lights=this.getLightsData(e.lightsNode.getLights(),[]),this.renderObjects.set(e,t)}return t}getAttributesData(e){let t={};for(let n in e){let r=e[n];t[n]={id:r.isInterleavedBufferAttribute?r.data.uuid:r.id,version:r.isInterleavedBufferAttribute?r.data.version:r.version}}return t}containsNode(e){let t=e.material;for(let e in t)if(t[e]&&t[e].isNode)return!0;return!!(e.context.modelViewMatrix||e.context.modelNormalViewMatrix||e.context.getAO||e.context.getShadow)}getGeometryData(e){let t=ks.get(e);return t===void 0&&(t={_renderId:-1,_equal:!1,attributes:this.getAttributesData(e.attributes),indexId:e.index?e.index.id:null,indexVersion:e.index?e.index.version:null,drawRange:{start:e.drawRange.start,count:e.drawRange.count}},ks.set(e,t)),t}getMaterialData(e){let t=Os.get(e);if(t===void 0){t={_renderId:-1,_equal:!1};for(let n of this.refreshUniforms){let r=e[n];r!=null&&(typeof r==`object`&&r.clone!==void 0?r.isTexture===!0?t[n]={id:r.id,version:0}:t[n]=r.clone():t[n]=r)}Os.set(e,t)}return t}equals(e,t,n){let{object:r,material:i,geometry:a}=e,o=this.getRenderObjectData(e);if(o.worldMatrix.equals(r.matrixWorld)!==!0)return o.worldMatrix.copy(r.matrixWorld),!1;let s=this.getMaterialData(e.material);if(s._renderId!==n){s._renderId=n;for(let e in s){let t=s[e],n=i[e];if(e!==`_renderId`&&e!==`_equal`){if(t.equals!==void 0){if(t.equals(n)===!1)return t.copy(n),s._equal=!1,!1}else if(n.isTexture===!0){if(t.id!==n.id||t.version!==n.version)return t.id=n.id,t.version=n.version,s._equal=!1,!1}else if(t!==n)return s[e]=n,s._equal=!1,!1}}if(s.transmission>0){let{width:t,height:n}=e.context;if(o.bufferWidth!==t||o.bufferHeight!==n)return o.bufferWidth=t,o.bufferHeight=n,s._equal=!1,!1}s._equal=!0}else if(s._equal===!1)return!1;if(o.geometryId!==a.id)return o.geometryId=a.id,!1;let c=this.getGeometryData(e.geometry);if(c._renderId!==n){c._renderId=n;let e=a.attributes,t=c.attributes,r=0,i=0;for(let t in e)r++;for(let n in t){i++;let r=t[n],a=e[n];if(a===void 0)return delete t[n],c._equal=!1,!1;let o=a.isInterleavedBufferAttribute?a.data.uuid:a.id,s=a.isInterleavedBufferAttribute?a.data.version:a.version;if(r.id!==o||r.version!==s)return r.id=o,r.version=s,c._equal=!1,!1}if(i!==r)return c.attributes=this.getAttributesData(e),c._equal=!1,!1;let o=a.index,s=c.indexId,l=c.indexVersion,u=o?o.id:null,d=o?o.version:null;if(s!==u||l!==d)return c.indexId=u,c.indexVersion=d,c._equal=!1,!1;if(c.drawRange.start!==a.drawRange.start||c.drawRange.count!==a.drawRange.count)return c.drawRange.start=a.drawRange.start,c.drawRange.count=a.drawRange.count,c._equal=!1,!1;c._equal=!0}else if(c._equal===!1)return!1;if(o.morphTargetInfluences){let e=!1;for(let t=0;t{let n=e.match(t);if(!n)return null;let r=n[1]||n[2]||``,i=n[3].split(`?`)[0],a=parseInt(n[4],10),o=parseInt(n[5],10);return{fn:r,file:i.split(`/`).pop(),line:a,column:o}}).filter(e=>e&&!js.some(t=>t.test(e.file)))}var Ns=class{constructor(e=null){this.isStackTrace=!0,this.stack=Ms(e||Error().stack)}getLocation(){if(this.stack.length===0)return`[Unknown location]`;let e=this.stack[0],t=e.fn;return`${t?`"${t}()" at `:``}"${e.file}:${e.line}"`}getError(e){return this.stack.length===0?e:`${e}\n${this.stack.map(e=>{let t=`${e.file}:${e.line}:${e.column}`;return e.fn?` at ${e.fn} (${t})`:` at ${t}`}).join(` -`)}`}};function Ps(e,t=0){let n=3735928559^t,r=1103547991^t;if(Array.isArray(e))for(let t=0,i;t>>16,2246822507),n^=Math.imul(r^r>>>13,3266489909),r=Math.imul(r^r>>>16,2246822507),r^=Math.imul(n^n>>>13,3266489909),4294967296*(2097151&r)+(n>>>0)}var Fs=e=>Ps(e),Is=e=>Ps(e),Ls=(...e)=>Ps(e),Rs=new Map([[1,`float`],[2,`vec2`],[3,`vec3`],[4,`vec4`],[9,`mat3`],[16,`mat4`]]),zs=new WeakMap;function Bs(e){return Rs.get(e)}function Vs(e){if(/[iu]?vec\d/.test(e))return e.startsWith(`ivec`)?Int32Array:e.startsWith(`uvec`)?Uint32Array:Float32Array;if(/mat\d/.test(e)||/float/.test(e))return Float32Array;if(/uint/.test(e))return Uint32Array;if(/int/.test(e))return Int32Array;throw Error(`THREE.NodeUtils: Unsupported type: ${e}`)}function Hs(e){if(/float|int|uint|bool/.test(e))return 1;if(/vec2/.test(e))return 2;if(/vec3/.test(e))return 3;if(/vec4/.test(e)||/mat2/.test(e))return 4;if(/mat3/.test(e))return 9;if(/mat4/.test(e))return 16;E(`TSL: Unsupported type: ${e}`,new Ns)}function Us(e){if(/float|int|uint|bool/.test(e))return 1;if(/vec2/.test(e))return 2;if(/vec3/.test(e))return 3;if(/vec4/.test(e)||/mat2/.test(e))return 4;if(/mat3/.test(e))return 12;if(/mat4/.test(e))return 16;E(`TSL: Unsupported type: ${e}`,new Ns)}function Ws(e){if(/float|int|uint|bool/.test(e))return 1;if(/vec2/.test(e))return 2;if(/vec3/.test(e)||/vec4/.test(e))return 4;if(/mat2/.test(e))return 2;if(/mat3/.test(e)||/mat4/.test(e))return 4;E(`TSL: Unsupported type: ${e}`,new Ns)}function Gs(e){if(e==null)return null;let t=typeof e;return e.isNode===!0?`node`:t===`number`?`float`:t===`boolean`?`bool`:t===`string`?`string`:t===`function`?`shader`:e.isVector2===!0?`vec2`:e.isVector3===!0?`vec3`:e.isVector4===!0?`vec4`:e.isMatrix2===!0?`mat2`:e.isMatrix3===!0?`mat3`:e.isMatrix4===!0?`mat4`:e.isColor===!0?`color`:e instanceof ArrayBuffer?`ArrayBuffer`:null}function Ks(e,...t){let n=e?e.slice(-4):void 0;return t.length===1&&(n===`vec2`?t=[t[0],t[0]]:n===`vec3`?t=[t[0],t[0],t[0]]:n===`vec4`&&(t=[t[0],t[0],t[0],t[0]])),e===`color`?new j(...t):n===`vec2`?new O(...t):n===`vec3`?new k(...t):n===`vec4`?new xn(...t):n===`mat2`?new Ro(...t):n===`mat3`?new an(...t):n===`mat4`?new A(...t):e===`bool`?t[0]||!1:e===`float`||e===`int`||e===`uint`?t[0]||0:e===`string`?t[0]||``:e===`ArrayBuffer`?Ys(t[0]):null}function qs(e){let t=zs.get(e);return t===void 0&&(t={},zs.set(e,t)),t}function Js(e){let t=``,n=new Uint8Array(e);for(let e=0;ee.charCodeAt(0)).buffer}var Xs={VERTEX:`vertex`,FRAGMENT:`fragment`},M={NONE:`none`,FRAME:`frame`,RENDER:`render`,OBJECT:`object`},Zs={BOOLEAN:`bool`,INTEGER:`int`,FLOAT:`float`,VECTOR2:`vec2`,VECTOR3:`vec3`,VECTOR4:`vec4`,MATRIX2:`mat2`,MATRIX3:`mat3`,MATRIX4:`mat4`},Qs={READ_ONLY:`readOnly`,WRITE_ONLY:`writeOnly`,READ_WRITE:`readWrite`},$s=[`fragment`,`vertex`],ec=[`setup`,`analyze`,`generate`],tc=[...$s,`compute`],nc=[`x`,`y`,`z`,`w`],rc={analyze:`setup`,generate:`analyze`},ic=0,N=class e extends Ot{static get type(){return`Node`}constructor(t=null){super(),this.nodeType=t,this.updateType=M.NONE,this.updateBeforeType=M.NONE,this.updateAfterType=M.NONE,this.version=0,this.name=``,this.global=!1,this.parents=!1,this.isNode=!0,this._beforeNodes=null,this._cacheKey=null,this._uuid=null,this._cacheKeyVersion=0,this.id=ic++,this.stackTrace=null,e.captureStackTrace===!0&&(this.stackTrace=new Ns)}set needsUpdate(e){e===!0&&this.version++}get uuid(){return this._uuid===null&&(this._uuid=en.generateUUID()),this._uuid}get type(){return this.constructor.type}onUpdate(e,t){return this.updateType=t,this.update=e.bind(this),this}onFrameUpdate(e){return this.onUpdate(e,M.FRAME)}onRenderUpdate(e){return this.onUpdate(e,M.RENDER)}onObjectUpdate(e){return this.onUpdate(e,M.OBJECT)}onReference(e){return this.updateReference=e.bind(this),this}updateReference(){return this}isGlobal(){return this.global}*getChildren(){for(let{childNode:e}of this._getChildren())yield e}dispose(){this.dispatchEvent({type:`dispose`})}traverse(e){e(this);for(let t of this.getChildren())t.traverse(e)}_getChildren(e=new Set){let t=[];e.add(this);for(let n of Object.getOwnPropertyNames(this)){let r=this[n];if(!(n.startsWith(`_`)===!0||e.has(r))){if(Array.isArray(r)===!0)for(let e=0;e0&&(e.inputNodes=n)}deserialize(e){if(e.inputNodes!==void 0){let t=e.meta.nodes;for(let n in e.inputNodes)if(Array.isArray(e.inputNodes[n])){let r=[];for(let i of e.inputNodes[n])r.push(t[i]);this[n]=r}else if(typeof e.inputNodes[n]==`object`){let r={};for(let i in e.inputNodes[n])r[i]=t[e.inputNodes[n][i]];this[n]=r}else{let r=e.inputNodes[n];this[n]=t[r]}}}toJSON(e){let{uuid:t,type:n}=this,r=e===void 0||typeof e==`string`;r&&(e={textures:{},images:{},nodes:{}});let i=e.nodes[t];i===void 0&&(i={uuid:t,type:n,meta:e,metadata:{version:4.7,type:`Node`,generator:`Node.toJSON`}},r!==!0&&(e.nodes[i.uuid]=i),this.serialize(i),delete i.meta);function a(e){let t=[];for(let n in e){let r=e[n];delete r.metadata,t.push(r)}return t}if(r){let t=a(e.textures),n=a(e.images),r=a(e.nodes);t.length>0&&(i.textures=t),n.length>0&&(i.images=n),r.length>0&&(i.nodes=r)}return i}};N.captureStackTrace=!1;var ac=class extends N{static get type(){return`ArrayElementNode`}constructor(e,t){super(),this.node=e,this.indexNode=t,this.isArrayElementNode=!0}generateNodeType(e){return this.node.getElementType(e)}getMemberType(e,t){return this.node.getMemberType(e,t)}generate(e){let t=this.indexNode.getNodeType(e);return`${this.node.build(e)}[ ${this.indexNode.build(e,!e.isVector(t)&&e.isInteger(t)?t:`uint`)} ]`}},oc=class extends N{static get type(){return`ConvertNode`}constructor(e,t){super(),this.node=e,this.convertTo=t}generateNodeType(e){let t=this.node.getNodeType(e),n=null;for(let r of this.convertTo.split(`|`))(n===null||e.getTypeLength(t)===e.getTypeLength(r))&&(n=r);return n}serialize(e){super.serialize(e),e.convertTo=this.convertTo}deserialize(e){super.deserialize(e),this.convertTo=e.convertTo}generate(e,t){let n=this.node,r=this.getNodeType(e),i=n.build(e,r);return e.format(i,r,t)}},sc=class extends N{static get type(){return`TempNode`}constructor(e=null){super(e),this.isTempNode=!0}hasDependencies(e){return e.getDataFromNode(this).usageCount>1}build(e,t){if(e.getBuildStage()===`generate`){let n=e.getVectorType(this.getNodeType(e,t)),r=e.getDataFromNode(this);if(r.propertyName!==void 0)return e.format(r.propertyName,n,t);if(n!==`void`&&t!==`void`&&this.hasDependencies(e)){let i=super.build(e,n),a=e.getVarFromNode(this,null,n),o=e.getPropertyName(a);return e.addLineFlowCode(`${o} = ${i}`,this),r.snippet=i,r.propertyName=o,e.format(r.propertyName,n,t)}}return super.build(e,t)}},cc=class extends sc{static get type(){return`JoinNode`}constructor(e=[],t=null){super(t),this.nodes=e}generateNodeType(e){return this.nodeType===null?e.getTypeFromLength(this.nodes.reduce((t,n)=>t+e.getTypeLength(n.getNodeType(e)),0)):e.getVectorType(this.nodeType)}generate(e,t){let n=this.getNodeType(e),r=e.getTypeLength(n),i=this.nodes,a=e.getComponentType(n),o=[],s=0;for(let t of i){if(s>=r){E(`TSL: Length of parameters exceeds maximum length of function '${n}()' type.`,this.stackTrace);break}let i=t.getNodeType(e),c=e.getTypeLength(i),l;if(s+c>r&&(E(`TSL: Length of '${n}()' data exceeds maximum length of output type.`,this.stackTrace),c=r-s,i=e.getTypeFromLength(c)),s+=c,l=t.build(e,i),e.getComponentType(i)!==a){let t=e.getTypeFromLength(c,a);l=e.format(l,i,t)}o.push(l)}let c=`${e.getType(n)}( ${o.join(`, `)} )`;return e.format(c,n,t)}},lc=nc.join(``),uc=class extends N{static get type(){return`SplitNode`}constructor(e,t=`x`){super(),this.node=e,this.components=t,this.isSplitNode=!0}getVectorLength(){let e=this.components.length;for(let t of this.components)e=Math.max(nc.indexOf(t)+1,e);return e}getComponentType(e){return e.getComponentType(this.node.getNodeType(e))}generateNodeType(e){return e.getTypeFromLength(this.components.length,this.getComponentType(e))}getScope(){return this.node.getScope()}generate(e,t){let n=this.node,r=e.getTypeLength(n.getNodeType(e)),i=null;if(r>1){let a=null;this.getVectorLength()>=r&&(a=e.getTypeFromLength(this.getVectorLength(),this.getComponentType(e)));let o=n.build(e,a);i=this.components.length===r&&this.components===lc.slice(0,this.components.length)?e.format(o,a,t):e.format(`${o}.${this.components}`,this.getNodeType(e),t)}else i=n.build(e,t);return i}serialize(e){super.serialize(e),e.components=this.components}deserialize(e){super.deserialize(e),this.components=e.components}},dc=class extends sc{static get type(){return`SetNode`}constructor(e,t,n){super(),this.sourceNode=e,this.components=t,this.targetNode=n}generateNodeType(e){return this.sourceNode.getNodeType(e)}generate(e){let{sourceNode:t,components:n,targetNode:r}=this,i=this.getNodeType(e),a=e.getComponentType(r.getNodeType(e)),o=e.getTypeFromLength(n.length,a),s=r.build(e,o),c=t.build(e,i),l=e.getTypeLength(i),u=[];for(let e=0;ee.replace(/r|s/g,`x`).replace(/g|t/g,`y`).replace(/b|p/g,`z`).replace(/a|q/g,`w`),bc=e=>yc(e).split(``).sort().join(``);N.prototype.assign=function(...e){if(this.isStackNode!==!0)return _c===null?E(`TSL: No stack defined for assign operation. Make sure the assign is inside a Fn().`,new Ns):_c.assign(this,...e),this;{let t=vc.get(`assign`);return this.addToStack(t(...e))}},N.prototype.toVarIntent=function(){return this},N.prototype.get=function(e){return new gc(this,e)};var xc={};function Sc(e,t,n){xc[e]=xc[t]=xc[n]={get(){this._cache=this._cache||{};let t=this._cache[e];return t===void 0&&(t=new uc(this,e),this._cache[e]=t),t},set(t){this[e].assign(F(t))}};let r=e.toUpperCase(),i=t.toUpperCase(),a=n.toUpperCase();N.prototype[`set`+r]=N.prototype[`set`+i]=N.prototype[`set`+a]=function(t){let n=bc(e);return new dc(this,n,F(t))},N.prototype[`flip`+r]=N.prototype[`flip`+i]=N.prototype[`flip`+a]=function(){let t=bc(e);return new fc(this,t)}}var Cc=[`x`,`y`,`z`,`w`],wc=[`r`,`g`,`b`,`a`],Tc=[`s`,`t`,`p`,`q`];for(let e=0;e<4;e++){let t=Cc[e],n=wc[e],r=Tc[e];Sc(t,n,r);for(let i=0;i<4;i++){t=Cc[e]+Cc[i],n=wc[e]+wc[i],r=Tc[e]+Tc[i],Sc(t,n,r);for(let a=0;a<4;a++){t=Cc[e]+Cc[i]+Cc[a],n=wc[e]+wc[i]+wc[a],r=Tc[e]+Tc[i]+Tc[a],Sc(t,n,r);for(let o=0;o<4;o++)t=Cc[e]+Cc[i]+Cc[a]+Cc[o],n=wc[e]+wc[i]+wc[a]+wc[o],r=Tc[e]+Tc[i]+Tc[a]+Tc[o],Sc(t,n,r)}}}for(let e=0;e<32;e++)xc[e]={get(){this._cache=this._cache||{};let t=this._cache[e];return t===void 0&&(t=new ac(this,new hc(e,`uint`)),this._cache[e]=t),t},set(t){this[e].assign(F(t))}};Object.defineProperties(N.prototype,xc);var Ec=function(e,t=null){let n=Gs(e);return n===`node`?e:t===null&&(n===`float`||n===`boolean`)||n&&n!==`shader`&&n!==`string`?F(Kc(e,t)):n===`shader`?e.isFn?e:R(e):e},Dc=function(e,t=null){for(let n in e)e[n]=F(e[n],t);return e},Oc=function(e,t=null){let n=e.length;for(let r=0;rc?(E(`TSL: "${n}" parameter length exceeds limit.`,new Ns),t.slice(0,c)):t}return t===null?a=(...t)=>i(new e(...$c(l(t)))):n===null?a=(...n)=>i(new e(t,...$c(l(n)))):(n=F(n),a=(...r)=>i(new e(t,...$c(l(r)),n))),a.setParameterLength=(...e)=>(e.length===1?s=c=e[0]:e.length===2&&([s,c]=e),a),a.setName=e=>(o=e,a),a},Ac=function(e,...t){return new e(...$c(t))},jc=class extends N{constructor(e,t){super(),this.shaderNode=e,this.rawInputs=t,this.isShaderCallNodeInternal=!0}generateNodeType(e){return this.shaderNode.nodeType||this.getOutputNode(e).getNodeType(e)}getElementType(e){return this.getOutputNode(e).getElementType(e)}getMemberType(e,t){return this.getOutputNode(e).getMemberType(e,t)}call(e){let{shaderNode:t,rawInputs:n}=this,r=e.getNodeProperties(t),i=e.getClosestSubBuild(t.subBuilds)||``,a=i||`default`;if(r[a])return r[a];let o=e.subBuildFn,s=e.fnCall;e.subBuildFn=i,e.fnCall=this;let c=null;if(t.layout){if(n){let r=t.layout.inputs;if(Mc(n)){let t=n;for(let n=0;n{let r;return r=Symbol.iterator===t?function*(){yield void 0}:Reflect.get(e,t,n),r}}),i=n?Pc(n):null,a=Array.isArray(n)?n.length>0:n!==null,o=t.jsFunc;c=F(a||o.length>1?o(i,r):o(r))}return e.subBuildFn=o,e.fnCall=s,t.once&&(r[a]=c),c}setupOutput(e){return e.addStack(),e.stack.outputNode=this.call(e),e.removeStack()}getOutputNode(e){let t=e.getNodeProperties(this),n=e.getSubBuildOutput(this);return t[n]=t[n]||this.setupOutput(e),t[n].subBuild=e.getClosestSubBuild(this),t[n]}build(e,t=null){let n=null,r=e.getBuildStage(),i=e.getNodeProperties(this),a=e.getSubBuildOutput(this),o=this.getOutputNode(e),s=e.fnCall;if(e.fnCall=this,r===`setup`){let t=e.getSubBuildProperty(`initialized`,this);if(i[t]!==!0&&(i[t]=!0,i[a]=this.getOutputNode(e),i[a].build(e),this.shaderNode.subBuilds))for(let t of e.chaining){let n=e.getDataFromNode(t,`any`);n.subBuilds=n.subBuilds||new Set;for(let e of this.shaderNode.subBuilds)n.subBuilds.add(e)}n=i[a]}else r===`analyze`?o.build(e,t):r===`generate`&&(n=o.build(e,t)||``);return e.fnCall=s,n}};function Mc(e){return e[0]&&(e[0].isNode||Object.getPrototypeOf(e[0])!==Object.prototype)}function Nc(e){let t;return Qc(e),t=Mc(e)?[...e]:e[0],t}function Pc(e){let t=0;return Qc(e),new Proxy(e,{get:(n,r,i)=>{let a;if(r===`length`)return a=e.length,a;if(Symbol.iterator===r)a=function*(){for(let t of e)yield F(t)};else{if(e.length>0)if(Object.getPrototypeOf(e[0])===Object.prototype){let n=e[0];a=n[r]===void 0?n[t++]:Reflect.get(n,r,i)}else e[0]instanceof N&&(a=e[r]===void 0?e[t++]:Reflect.get(e,r,i));else a=Reflect.get(n,r,i);a=F(a)}return a}})}var Fc=class extends N{constructor(e,t){super(t),this.jsFunc=e,this.layout=null,this.global=!0,this.once=!1}setLayout(e){return this.layout=e,this}getLayout(){return this.layout}call(e=null){return new jc(this,e)}setup(){return this.call()}},Ic=[!1,!0],Lc=[0,1,2,3],Rc=[-1,-2],zc=[.5,1.5,1/3,1e-6,1e6,Math.PI,Math.PI*2,1/Math.PI,2/Math.PI,1/(Math.PI*2),Math.PI/2],Bc=new Map;for(let e of Ic)Bc.set(e,new hc(e));var Vc=new Map;for(let e of Lc)Vc.set(e,new hc(e,`uint`));var Hc=new Map([...Vc].map(e=>new hc(e.value,`int`)));for(let e of Rc)Hc.set(e,new hc(e,`int`));var Uc=new Map([...Hc].map(e=>new hc(e.value)));for(let e of zc)Uc.set(e,new hc(e));for(let e of zc)Uc.set(-e,new hc(-e));var Wc={bool:Bc,uint:Vc,ints:Hc,float:Uc},Gc=new Map([...Bc,...Uc]),Kc=(e,t)=>Gc.has(e)?Gc.get(e):e.isNode===!0?e:new hc(e,t),qc=function(e,t=null){return(...n)=>{for(let t of n)if(t===void 0)return E(`TSL: Invalid parameter for the type "${e}".`,new Ns),new hc(0,e);if((n.length===0||![`bool`,`float`,`int`,`uint`].includes(e)&&n.every(e=>{let t=typeof e;return t!==`object`&&t!==`function`}))&&(n=[Ks(e,...n)]),n.length===1&&t!==null&&t.has(n[0]))return Zc(t.get(n[0]));if(n.length===1){let t=Kc(n[0],e);return t.nodeType===e?Zc(t):Zc(new oc(t,e))}return Zc(new cc(n.map(e=>Kc(e)),e))}};function Jc(e){return e&&e.isNode&&e.traverse(t=>{t.isConstNode&&(e=t.value)}),!!e}var Yc=e=>e==null?null:e.nodeType||e.convertTo||(typeof e==`string`?e:null);function Xc(e,t){return new Fc(e,t)}var F=(e,t=null)=>Ec(e,t),Zc=(e,t=null)=>F(e,t).toVarIntent(),Qc=(e,t=null)=>new Dc(e,t),$c=(e,t=null)=>new Oc(e,t),el=(e,t=null,n=null,r=null)=>new kc(e,t,n,r),I=(e,...t)=>new Ac(e,...t),L=(e,t=null,n=null,r={})=>new kc(e,t,n,{...r,intent:!0}),tl=(e,t)=>new Proxy(e,{get(e,n,r){return Reflect.get(t,n,r)},set(e,n,r){return Reflect.set(t,n,r)}}),nl=0,rl=class extends N{constructor(e,t=null){super();let n=null;t!==null&&(typeof t==`object`?n=t.return:(typeof t==`string`?n=t:E(`TSL: Invalid layout type.`,new Ns),t=null)),this.shaderNode=new Xc(e,n),t!==null&&this.setLayout(t),this.isFn=!0}setLayout(e){let t=this.shaderNode.nodeType;if(typeof e.inputs!=`object`){let n={name:`fn`+nl++,type:t,inputs:[]};for(let t in e)t!==`return`&&n.inputs.push({name:t,type:e[t]});e=n}return this.shaderNode.setLayout(e),this}generateNodeType(e){return this.shaderNode.getNodeType(e)||`float`}call(...e){let t=this.shaderNode.call(e);return this.shaderNode.nodeType===`void`&&t.toStack(),t.toVarIntent()}once(e=null){return this.shaderNode.once=!0,this.shaderNode.subBuilds=e,this}generate(e){let t=this.getNodeType(e);return E(`TSL: "Fn()" was declared but not invoked. Try calling it like "Fn()( ...params )".`,this.stackTrace),e.generateConst(t)}};function R(e,t=null){let n=new rl(e,t);return new Proxy(()=>{},{apply(e,t,r){return n.call(...r)},get(e,t,r){return Reflect.get(n,t,r)},set(e,t,r,i){return Reflect.set(n,t,r,i)}})}var il=e=>{_c=e},al=()=>_c,z=(...e)=>_c.If(...e),ol=(...e)=>_c.Switch(...e);function sl(e){return _c&&_c.addToStack(e),e}P(`toStack`,sl);var cl=new qc(`color`),B=new qc(`float`,Wc.float),V=new qc(`int`,Wc.ints),H=new qc(`uint`,Wc.uint),ll=new qc(`bool`,Wc.bool),U=new qc(`vec2`),ul=new qc(`ivec2`),dl=new qc(`uvec2`),fl=new qc(`bvec2`),W=new qc(`vec3`),pl=new qc(`ivec3`),ml=new qc(`uvec3`),hl=new qc(`bvec3`),G=new qc(`vec4`),gl=new qc(`ivec4`),_l=new qc(`uvec4`),vl=new qc(`bvec4`),yl=new qc(`mat2`),bl=new qc(`mat3`),xl=new qc(`mat4`);P(`toColor`,cl),P(`toFloat`,B),P(`toInt`,V),P(`toUint`,H),P(`toBool`,ll),P(`toVec2`,U),P(`toIVec2`,ul),P(`toUVec2`,dl),P(`toBVec2`,fl),P(`toVec3`,W),P(`toIVec3`,pl),P(`toUVec3`,ml),P(`toBVec3`,hl),P(`toVec4`,G),P(`toIVec4`,gl),P(`toUVec4`,_l),P(`toBVec4`,vl),P(`toMat2`,yl),P(`toMat3`,bl),P(`toMat4`,xl);var Sl=el(ac).setParameterLength(2),Cl=(e,t)=>new oc(F(e),t),wl=(e,t)=>new uc(F(e),t);P(`element`,Sl),P(`convert`,Cl);var Tl=e=>(T(`TSL: append() has been renamed to Stack().`,new Ns),sl(e));P(`append`,e=>(T(`TSL: .append() has been renamed to .toStack().`,new Ns),sl(e)));var El=class extends N{static get type(){return`PropertyNode`}constructor(e,t=null,n=!1,r=null){super(e),this.name=t,this.varying=n,this.placeholderNode=F(r),this.isPropertyNode=!0,this.global=!0}getNodeType(e){let t=super.getNodeType(e);return t===`output`?e.getOutputType():t}customCacheKey(){return Fs(this.type+`:`+(this.name||``)+`:`+(this.varying?`1`:`0`))}getHash(e){return this.name||super.getHash(e)}generate(e){let t;if(this.varying===!0)t=e.getVaryingFromNode(this,this.name),t.needsInterpolation=!0;else if(t=e.getVarFromNode(this,this.name),this.placeholderNode!==null&&e.hasWriteUsage(this)===!1){let n=this.placeholderNode.build(e,this.getNodeType(e));e.addLineFlowCode(`${e.getPropertyName(t)} = ${n}`,this)}return e.getPropertyName(t)}},Dl=(e,t,n=null)=>new El(e,t,!1,n),Ol=(e,t,n=null)=>new El(e,t,!0,n),kl=I(El,`vec4`,`DiffuseColor`),Al=I(El,`vec3`,`DiffuseContribution`),jl=I(El,`vec3`,`EmissiveColor`),Ml=I(El,`float`,`Roughness`),Nl=I(El,`float`,`Metalness`),Pl=I(El,`float`,`Clearcoat`),Fl=I(El,`float`,`ClearcoatRoughness`),Il=I(El,`vec3`,`Sheen`),Ll=I(El,`float`,`SheenRoughness`),Rl=I(El,`float`,`Iridescence`),zl=I(El,`float`,`IridescenceIOR`),Bl=I(El,`float`,`IridescenceThickness`),Vl=I(El,`float`,`AlphaT`),Hl=I(El,`float`,`Anisotropy`),Ul=I(El,`vec3`,`AnisotropyT`),Wl=I(El,`vec3`,`AnisotropyB`),Gl=I(El,`color`,`SpecularColor`),Kl=I(El,`color`,`SpecularColorBlended`),ql=I(El,`float`,`SpecularF90`),Jl=I(El,`float`,`Shininess`),Yl=I(El,`output`,`Output`),Xl=I(El,`float`,`dashSize`),Zl=I(El,`float`,`gapSize`),Ql=I(El,`float`,`pointWidth`),$l=I(El,`float`,`IOR`),eu=I(El,`float`,`Transmission`),tu=I(El,`float`,`Thickness`),nu=I(El,`float`,`AttenuationDistance`),ru=I(El,`color`,`AttenuationColor`),iu=I(El,`float`,`Dispersion`),au=I(El,`float`,`AmbientOcclusion`,!1,1),ou=class extends N{static get type(){return`UniformGroupNode`}constructor(e,t=!1,n=1,r=null){super(`string`),this.name=e,this.shared=t,this.order=n,this.updateType=r,this.isUniformGroup=!0}update(){this.needsUpdate=!0}serialize(e){super.serialize(e),e.name=this.name,e.version=this.version,e.shared=this.shared}deserialize(e){super.deserialize(e),this.name=e.name,this.version=e.version,this.shared=e.shared}},su=(e,t=1,n=null)=>new ou(e,!1,t,n),cu=(e,t=0,n=null)=>new ou(e,!0,t,n),lu=cu(`frame`,0,M.FRAME),K=cu(`render`,0,M.RENDER),uu=su(`object`,1,M.OBJECT),du=class extends pc{static get type(){return`UniformNode`}constructor(e,t=null){super(e,t),this.isUniformNode=!0,this.name=``,this.groupNode=uu}setName(e){return this.name=e,this}label(e){return T(`TSL: "label()" has been deprecated. Use "setName()" instead.`,new Ns),this.setName(e)}setGroup(e){return this.groupNode=e,this}getGroup(){return this.groupNode}getUniformHash(e){return this.getHash(e)}onUpdate(e,t){return e=e.bind(this),super.onUpdate(t=>{let n=e(t,this);n!==void 0&&(this.value=n)},t)}getInputType(e){let t=super.getInputType(e);return t===`bool`&&(t=`uint`),t}generate(e,t){let n=this.getNodeType(e),r=this.getUniformHash(e),i=e.getNodeFromHash(r);i===void 0&&(e.setHashNode(this,r),i=this);let a=i.getInputType(e),o=e.getUniformFromNode(i,a,e.shaderStage,this.name||e.context.nodeName),s=e.getPropertyName(o);e.context.nodeName!==void 0&&delete e.context.nodeName;let c=s;if(n===`bool`){let t=e.getDataFromNode(this),r=t.propertyName;if(r===void 0){let i=e.getVarFromNode(this,null,`bool`);r=e.getPropertyName(i),t.propertyName=r,c=e.format(s,a,n),e.addLineFlowCode(`${r} = ${c}`,this)}c=r}return e.format(c,n,t)}},q=(e,t)=>{let n=Yc(t||e);if(n===e&&(e=Ks(n)),e&&e.isNode===!0){let t=e.value;e.traverse(e=>{e.isConstNode===!0&&(t=e.value)}),e=t}return new du(e,n)},fu=class extends sc{static get type(){return`ArrayNode`}constructor(e,t,n=null){super(e),this.count=t,this.values=n,this.isArrayNode=!0}getArrayCount(){return this.count}generateNodeType(e){return this.nodeType===null?this.values[0].getNodeType(e):this.nodeType}getElementType(e){return this.getNodeType(e)}getMemberType(e,t){return this.nodeType===null?this.values[0].getMemberType(e,t):super.getMemberType(e,t)}generate(e){let t=this.getNodeType(e);return e.generateArray(t,this.count,this.values)}},pu=(...e)=>{let t;if(e.length===1){let n=e[0];t=new fu(null,n.length,n)}else{let n=e[0],r=e[1];t=new fu(n,r)}return F(t)};P(`toArray`,(e,t)=>pu(Array(t).fill(e)));var mu=el(class extends sc{static get type(){return`AssignNode`}constructor(e,t){super(),this.targetNode=e,this.sourceNode=t,this.isAssignNode=!0}hasDependencies(){return!1}generateNodeType(e,t){return t===`void`?`void`:this.targetNode.getNodeType(e)}needsSplitAssign(e){let{targetNode:t}=this;if(e.isAvailable(`swizzleAssign`)===!1&&t.isSplitNode&&t.components.length>1){let n=e.getTypeLength(t.node.getNodeType(e));return nc.join(``).slice(0,n)!==t.components}return!1}setup(e){let{targetNode:t,sourceNode:n}=this,r=t.getScope(),i=e.getDataFromNode(r);i.assign=!0;let a=e.getNodeProperties(this);a.sourceNode=n,a.targetNode=t.context({assign:!0})}generate(e,t){let{targetNode:n,sourceNode:r}=e.getNodeProperties(this),i=this.needsSplitAssign(e),a=n.build(e),o=n.getNodeType(e),s=r.build(e,o),c=r.getNodeType(e),l=e.getDataFromNode(this),u;if(l.initialized===!0)t!==`void`&&(u=a);else if(i){let r=e.getVarFromNode(this,null,o),i=e.getPropertyName(r);e.addLineFlowCode(`${i} = ${s}`,this);let c=n.node,l=c.node.context({assign:!0}).build(e);for(let t=0;t{let r=n.type,i=r===`pointer`,a;return a=i?`&`+t.build(e):t.build(e,r),a};if(Array.isArray(i)){if(i.length>r.length)E(`TSL: The number of provided parameters exceeds the expected number of inputs in 'Fn()'.`),i.length=r.length;else if(i.length(t=t.length>1||t[0]&&t[0].isNode===!0?$c(t):Qc(t[0]),new hu(F(e),t));P(`call`,gu);var _u={"==":`equal`,"!=":`notEqual`,"<":`lessThan`,">":`greaterThan`,"<=":`lessThanEqual`,">=":`greaterThanEqual`,"%":`mod`},vu=class e extends sc{static get type(){return`OperatorNode`}constructor(t,n,r,...i){if(super(),i.length>0){let a=new e(t,n,r);for(let n=0;n>`||n===`<<`)return e.getIntegerType(a);if(n===`&&`||n===`||`||n===`^^`)return`bool`;if(n===`!`){let t=e.getTypeLength(a);return t>1?`bvec${t}`:`bool`}else if(n===`==`||n===`!=`||n===`<`||n===`>`||n===`<=`||n===`>=`){let t=Math.max(e.getTypeLength(a),e.getTypeLength(o));return t>1?`bvec${t}`:`bool`}else{if(e.isMatrix(a)){if(o===`float`)return a;if(e.isVector(o))return e.getVectorFromMatrix(a);if(e.isMatrix(o))return a}else if(e.isMatrix(o)){if(a===`float`)return o;if(e.isVector(a))return e.getVectorFromMatrix(o)}return e.getTypeLength(o)>e.getTypeLength(a)?o:a}}generate(e,t){let n=this.op,{aNode:r,bNode:i}=this,a=this.getNodeType(e,t),o=null,s=null;a===`void`?o=s=a:(o=r.getNodeType(e),s=i?i.getNodeType(e):null,n===`<`||n===`>`||n===`<=`||n===`>=`||n===`==`||n===`!=`?e.isVector(o)?s=o:e.isVector(s)?o=s:o!==s&&(o=s=`float`):n===`>>`||n===`<<`?(o=a,s=e.changeComponentType(s,`uint`)):n===`%`?(o=a,s=e.isInteger(o)&&e.isInteger(s)?s:o):e.isMatrix(o)?s===`float`?s=`float`:e.isVector(s)?s=e.getVectorFromMatrix(o):e.isMatrix(s)||(o=s=a):o=e.isMatrix(s)?o===`float`?`float`:e.isVector(o)?e.getVectorFromMatrix(s):s=a:s=a);let c=r.build(e,o),l=i?i.build(e,s):null,u=e.getFunctionOperator(n);if(t!==`void`){let r=e.renderer.coordinateSystem===mt;if(n===`==`||n===`!=`||n===`<`||n===`>`||n===`<=`||n===`>=`)return r&&e.isVector(o)?e.format(`${this.getOperatorMethod(e,t)}( ${c}, ${l} )`,a,t):e.format(`( ${c} ${n} ${l} )`,a,t);if(n===`%`)return e.isInteger(s)?e.format(`( ${c} % ${l} )`,a,t):e.format(`${this.getOperatorMethod(e,a)}( ${c}, ${l} )`,a,t);if(n===`!`)return r&&e.isVector(o)?e.format(`not( ${c} )`,t):e.format(`( ${n} ${c} )`,o,t);if(n===`~`)return e.format(`( ${n} ${c} )`,o,t);if(u)return e.format(`${u}( ${c}, ${l} )`,a,t);if(e.isMatrix(o)&&s===`float`)return e.format(`( ${l} ${n} ${c} )`,a,t);if(o===`float`&&e.isMatrix(s))return e.format(`${c} ${n} ${l}`,a,t);{let i=`( ${c} ${n} ${l} )`;return!r&&a===`bool`&&e.isVector(o)&&e.isVector(s)&&(i=`all${i}`),e.format(i,a,t)}}else if(o!==`void`)return u?e.format(`${u}( ${c}, ${l} )`,a,t):e.isMatrix(o)&&s===`float`?e.format(`${l} ${n} ${c}`,a,t):e.format(`${c} ${n} ${l}`,a,t)}serialize(e){super.serialize(e),e.op=this.op}deserialize(e){super.deserialize(e),this.op=e.op}},yu=L(vu,`+`).setParameterLength(2,1/0).setName(`add`),bu=L(vu,`-`).setParameterLength(2,1/0).setName(`sub`),J=L(vu,`*`).setParameterLength(2,1/0).setName(`mul`),xu=L(vu,`/`).setParameterLength(2,1/0).setName(`div`),Su=L(vu,`%`).setParameterLength(2).setName(`mod`),Cu=L(vu,`==`).setParameterLength(2).setName(`equal`),wu=L(vu,`!=`).setParameterLength(2).setName(`notEqual`),Tu=L(vu,`<`).setParameterLength(2).setName(`lessThan`),Eu=L(vu,`>`).setParameterLength(2).setName(`greaterThan`),Du=L(vu,`<=`).setParameterLength(2).setName(`lessThanEqual`),Ou=L(vu,`>=`).setParameterLength(2).setName(`greaterThanEqual`),ku=L(vu,`&&`).setParameterLength(2,1/0).setName(`and`),Au=L(vu,`||`).setParameterLength(2,1/0).setName(`or`),ju=L(vu,`!`).setParameterLength(1).setName(`not`),Mu=L(vu,`^^`).setParameterLength(2).setName(`xor`),Nu=L(vu,`&`).setParameterLength(2).setName(`bitAnd`),Pu=L(vu,`~`).setParameterLength(1).setName(`bitNot`),Fu=L(vu,`|`).setParameterLength(2).setName(`bitOr`),Iu=L(vu,`^`).setParameterLength(2).setName(`bitXor`),Lu=L(vu,`<<`).setParameterLength(2).setName(`shiftLeft`),Ru=L(vu,`>>`).setParameterLength(2).setName(`shiftRight`),zu=R(([e])=>(e.addAssign(1),e)),Bu=R(([e])=>(e.subAssign(1),e)),Vu=R(([e])=>{let t=V(e).toConst();return e.addAssign(1),t}),Hu=R(([e])=>{let t=V(e).toConst();return e.subAssign(1),t});P(`add`,yu),P(`sub`,bu),P(`mul`,J),P(`div`,xu),P(`mod`,Su),P(`equal`,Cu),P(`notEqual`,wu),P(`lessThan`,Tu),P(`greaterThan`,Eu),P(`lessThanEqual`,Du),P(`greaterThanEqual`,Ou),P(`and`,ku),P(`or`,Au),P(`not`,ju),P(`xor`,Mu),P(`bitAnd`,Nu),P(`bitNot`,Pu),P(`bitOr`,Fu),P(`bitXor`,Iu),P(`shiftLeft`,Lu),P(`shiftRight`,Ru),P(`incrementBefore`,zu),P(`decrementBefore`,Bu),P(`increment`,Vu),P(`decrement`,Hu);var Y=class e extends sc{static get type(){return`MathNode`}constructor(t,n,r=null,i=null){if(super(),(t===e.MAX||t===e.MIN)&&arguments.length>3){let a=new e(t,n,r);for(let n=3;na&&i>o?t:a>o?n:o>i?r:t}generateNodeType(t){let n=this.method;return n===e.LENGTH||n===e.DISTANCE||n===e.DOT?`float`:n===e.CROSS?`vec3`:n===e.ALL||n===e.ANY?`bool`:n===e.EQUALS?t.changeComponentType(this.aNode.getNodeType(t),`bool`):this.getInputType(t)}setup(t){let{aNode:n,bNode:r,method:i}=this,a=null;if(i===e.ONE_MINUS)a=bu(1,n);else if(i===e.RECIPROCAL)a=xu(1,n);else if(i===e.DIFFERENCE)a=xd(bu(n,r));else if(i===e.TRANSFORM_DIRECTION){let e,i;t.isMatrix(n.getNodeType(t))?(e=n,i=r):(e=r,i=n),a=sd(J(e,G(W(i),0)).xyz)}return a===null?super.setup(t):a}generate(t,n){if(t.getNodeProperties(this).outputNode)return super.generate(t,n);let r=this.method,i=this.getNodeType(t),a=this.getInputType(t),o=this.aNode,s=this.bNode,c=this.cNode,l=t.renderer.coordinateSystem;if(r===e.NEGATE)return t.format(`( - `+o.build(t,a)+` )`,i,n);{let u=[];return r===e.CROSS?u.push(o.build(t,i),s.build(t,i)):l===2e3&&r===e.STEP?u.push(o.build(t,t.getTypeLength(o.getNodeType(t))===1?`float`:a),s.build(t,a)):l===2e3&&(r===e.MIN||r===e.MAX)?u.push(o.build(t,a),s.build(t,t.getTypeLength(s.getNodeType(t))===1?`float`:a)):r===e.REFRACT?u.push(o.build(t,a),s.build(t,a),c.build(t,`float`)):r===e.MIX?u.push(o.build(t,a),s.build(t,a),c.build(t,t.getTypeLength(c.getNodeType(t))===1?`float`:a)):(l===2001&&r===e.ATAN&&s!==null&&(r=`atan2`),t.shaderStage!==`fragment`&&(r===e.DFDX||r===e.DFDY)&&(T(`TSL: '${r}' is not supported in the ${t.shaderStage} stage.`,this.stackTrace),r=`/*`+r+`*/`),u.push(o.build(t,a)),s!==null&&u.push(s.build(t,a)),c!==null&&u.push(c.build(t,a))),t.format(`${t.getMethod(r,i)}( ${u.join(`, `)} )`,i,n)}}serialize(e){super.serialize(e),e.method=this.method}deserialize(e){super.deserialize(e),this.method=e.method}};Y.ALL=`all`,Y.ANY=`any`,Y.RADIANS=`radians`,Y.DEGREES=`degrees`,Y.EXP=`exp`,Y.EXP2=`exp2`,Y.LOG=`log`,Y.LOG2=`log2`,Y.SQRT=`sqrt`,Y.INVERSE_SQRT=`inversesqrt`,Y.FLOOR=`floor`,Y.CEIL=`ceil`,Y.NORMALIZE=`normalize`,Y.FRACT=`fract`,Y.SIN=`sin`,Y.SINH=`sinh`,Y.COS=`cos`,Y.COSH=`cosh`,Y.TAN=`tan`,Y.TANH=`tanh`,Y.ASIN=`asin`,Y.ASINH=`asinh`,Y.ACOS=`acos`,Y.ACOSH=`acosh`,Y.ATAN=`atan`,Y.ATANH=`atanh`,Y.ABS=`abs`,Y.SIGN=`sign`,Y.LENGTH=`length`,Y.NEGATE=`negate`,Y.ONE_MINUS=`oneMinus`,Y.DFDX=`dFdx`,Y.DFDY=`dFdy`,Y.ROUND=`round`,Y.RECIPROCAL=`reciprocal`,Y.TRUNC=`trunc`,Y.FWIDTH=`fwidth`,Y.TRANSPOSE=`transpose`,Y.DETERMINANT=`determinant`,Y.INVERSE=`inverse`,Y.EQUALS=`equals`,Y.MIN=`min`,Y.MAX=`max`,Y.STEP=`step`,Y.REFLECT=`reflect`,Y.DISTANCE=`distance`,Y.DIFFERENCE=`difference`,Y.DOT=`dot`,Y.CROSS=`cross`,Y.POW=`pow`,Y.TRANSFORM_DIRECTION=`transformDirection`,Y.MIX=`mix`,Y.CLAMP=`clamp`,Y.REFRACT=`refract`,Y.SMOOTHSTEP=`smoothstep`,Y.FACEFORWARD=`faceforward`;var Uu=B(1e-6),Wu=B(1e6),Gu=B(Math.PI),Ku=B(Math.PI*2),qu=B(Math.PI*2),Ju=B(Math.PI*.5),Yu=L(Y,Y.ALL).setParameterLength(1),Xu=L(Y,Y.ANY).setParameterLength(1),Zu=L(Y,Y.RADIANS).setParameterLength(1),Qu=L(Y,Y.DEGREES).setParameterLength(1),$u=L(Y,Y.EXP).setParameterLength(1),ed=L(Y,Y.EXP2).setParameterLength(1),td=L(Y,Y.LOG).setParameterLength(1),nd=L(Y,Y.LOG2).setParameterLength(1),rd=L(Y,Y.SQRT).setParameterLength(1),id=L(Y,Y.INVERSE_SQRT).setParameterLength(1),ad=L(Y,Y.FLOOR).setParameterLength(1),od=L(Y,Y.CEIL).setParameterLength(1),sd=L(Y,Y.NORMALIZE).setParameterLength(1),cd=L(Y,Y.FRACT).setParameterLength(1),ld=L(Y,Y.SIN).setParameterLength(1),ud=L(Y,Y.SINH).setParameterLength(1),dd=L(Y,Y.COS).setParameterLength(1),fd=L(Y,Y.COSH).setParameterLength(1),pd=L(Y,Y.TAN).setParameterLength(1),md=L(Y,Y.TANH).setParameterLength(1),hd=L(Y,Y.ASIN).setParameterLength(1),gd=L(Y,Y.ASINH).setParameterLength(1),_d=L(Y,Y.ACOS).setParameterLength(1),vd=L(Y,Y.ACOSH).setParameterLength(1),yd=L(Y,Y.ATAN).setParameterLength(1,2),bd=L(Y,Y.ATANH).setParameterLength(1),xd=L(Y,Y.ABS).setParameterLength(1),Sd=L(Y,Y.SIGN).setParameterLength(1),Cd=L(Y,Y.LENGTH).setParameterLength(1),wd=L(Y,Y.NEGATE).setParameterLength(1),Td=L(Y,Y.ONE_MINUS).setParameterLength(1),Ed=L(Y,Y.DFDX).setParameterLength(1),Dd=L(Y,Y.DFDY).setParameterLength(1),Od=L(Y,Y.ROUND).setParameterLength(1),kd=L(Y,Y.RECIPROCAL).setParameterLength(1),Ad=L(Y,Y.TRUNC).setParameterLength(1),jd=L(Y,Y.FWIDTH).setParameterLength(1),Md=L(Y,Y.TRANSPOSE).setParameterLength(1),Nd=L(Y,Y.DETERMINANT).setParameterLength(1),Pd=L(Y,Y.INVERSE).setParameterLength(1),Fd=L(Y,Y.MIN).setParameterLength(2,1/0),Id=L(Y,Y.MAX).setParameterLength(2,1/0),Ld=L(Y,Y.STEP).setParameterLength(2),Rd=L(Y,Y.REFLECT).setParameterLength(2),zd=L(Y,Y.DISTANCE).setParameterLength(2),Bd=L(Y,Y.DIFFERENCE).setParameterLength(2),Vd=L(Y,Y.DOT).setParameterLength(2),Hd=L(Y,Y.CROSS).setParameterLength(2),Ud=L(Y,Y.POW).setParameterLength(2),Wd=e=>J(e,e),Gd=e=>J(e,e,e),Kd=e=>J(e,e,e,e),qd=L(Y,Y.TRANSFORM_DIRECTION).setParameterLength(2),Jd=(e,t)=>sd(J(t,G(W(e),0)).xyz),Yd=(e,t)=>sd(G(W(e),0).mul(t).xyz),Xd=e=>J(Sd(e),Ud(xd(e),1/3)),Zd=e=>Vd(e,e),Qd=L(Y,Y.MIX).setParameterLength(3),$d=(e,t=0,n=1)=>new Y(Y.CLAMP,F(e),F(t),F(n)),ef=e=>$d(e),tf=L(Y,Y.REFRACT).setParameterLength(3),nf=L(Y,Y.SMOOTHSTEP).setParameterLength(3),rf=L(Y,Y.FACEFORWARD).setParameterLength(3),af=R(([e])=>cd(ld(Su(Vd(e.xy,U(12.9898,78.233)),Gu)).mul(43758.5453))),of=(e,t,n)=>Qd(t,n,e),sf=(e,t,n)=>nf(t,n,e),cf=(e,t)=>Ld(t,e),lf=rf,uf=id;P(`all`,Yu),P(`any`,Xu),P(`radians`,Zu),P(`degrees`,Qu),P(`exp`,$u),P(`exp2`,ed),P(`log`,td),P(`log2`,nd),P(`sqrt`,rd),P(`inverseSqrt`,id),P(`floor`,ad),P(`ceil`,od),P(`normalize`,sd),P(`fract`,cd),P(`sin`,ld),P(`sinh`,ud),P(`cos`,dd),P(`cosh`,fd),P(`tan`,pd),P(`tanh`,md),P(`asin`,hd),P(`asinh`,gd),P(`acos`,_d),P(`acosh`,vd),P(`atan`,yd),P(`atanh`,bd),P(`abs`,xd),P(`sign`,Sd),P(`length`,Cd),P(`lengthSq`,Zd),P(`negate`,wd),P(`oneMinus`,Td),P(`dFdx`,Ed),P(`dFdy`,Dd),P(`round`,Od),P(`reciprocal`,kd),P(`trunc`,Ad),P(`fwidth`,jd),P(`min`,Fd),P(`max`,Id),P(`step`,cf),P(`reflect`,Rd),P(`distance`,zd),P(`dot`,Vd),P(`cross`,Hd),P(`pow`,Ud),P(`pow2`,Wd),P(`pow3`,Gd),P(`pow4`,Kd),P(`transformDirection`,qd),P(`transformNormalByViewMatrix`,Jd),P(`transformNormalByInverseViewMatrix`,Yd),P(`mix`,of),P(`clamp`,$d),P(`refract`,tf),P(`smoothstep`,sf),P(`faceForward`,rf),P(`difference`,Bd),P(`saturate`,ef),P(`cbrt`,Xd),P(`transpose`,Md),P(`determinant`,Nd),P(`inverse`,Pd),P(`rand`,af);var df=el(class extends N{static get type(){return`ConditionalNode`}constructor(e,t,n=null){super(),this.condNode=e,this.ifNode=t,this.elseNode=n}generateNodeType(e){let{ifNode:t,elseNode:n}=e.getNodeProperties(this);if(t===void 0)return e.flowBuildStage(this,`setup`),this.getNodeType(e);let r=t.getNodeType(e);if(n!==null){let t=n.getNodeType(e);if(e.getTypeLength(t)>e.getTypeLength(r))return t}return r}setup(e){let t=this.condNode,n=this.ifNode.isolate(),r=this.elseNode?this.elseNode.isolate():null,i=e.context.nodeBlock;e.getDataFromNode(n).parentNodeBlock=i,r!==null&&(e.getDataFromNode(r).parentNodeBlock=i);let a=e.context.uniformFlow,o=e.getNodeProperties(this);o.condNode=t,o.ifNode=a?n:n.context({nodeBlock:n}),o.elseNode=r?a?r:r.context({nodeBlock:r}):null}generate(e,t){let n=this.getNodeType(e),r=e.getDataFromNode(this);if(r.nodeProperty!==void 0)return r.nodeProperty;let{condNode:i,ifNode:a,elseNode:o}=e.getNodeProperties(this),s=e.currentFunctionNode,c=t!==`void`,l=c?Dl(n).build(e):``;r.nodeProperty=l;let u=i.build(e,`bool`);if(e.context.uniformFlow&&o!==null){let r=a.build(e,n),i=o.build(e,n),s=e.getTernary(u,r,i);return e.format(s,n,t)}e.addFlowCode(`\n${e.tab}if ( ${u} ) {\n\n`).addFlowTab();let d=a.build(e,n);if(d&&(c?d=l+` = `+d+`;`:(d=`return `+d+`;`,s===null&&(T(`TSL: Return statement used in an inline 'Fn()'. Define a layout struct to allow return values.`,this.stackTrace),d=`// `+d))),e.removeFlowTab().addFlowCode(e.tab+` `+d+` - -`+e.tab+`}`),o!==null){e.addFlowCode(` else { - -`).addFlowTab();let t=o.build(e,n);t&&(c?t=l+` = `+t+`;`:(t=`return `+t+`;`,s===null&&(T(`TSL: Return statement used in an inline 'Fn()'. Define a layout struct to allow return values.`,this.stackTrace),t=`// `+t))),e.removeFlowTab().addFlowCode(e.tab+` `+t+` - -`+e.tab+`} - -`)}else e.addFlowCode(` - -`);return e.format(l,n,t)}}).setParameterLength(2,3);P(`select`,df);var ff=class extends N{static get type(){return`ContextNode`}constructor(e=null,t={}){super(),this.isContextNode=!0,this.node=e,this.value=t}getScope(){return this.node.getScope()}generateNodeType(e){return this.node.getNodeType(e)}getFlowContextData(){let e=[];return this.traverse(t=>{t.isContextNode===!0&&e.push(t.value)}),Object.assign({},...e)}getMemberType(e,t){return this.node.getMemberType(e,t)}analyze(e){let t=e.addContext(this.value);this.node.build(e),e.setContext(t)}setup(e){let t=e.addContext(this.value);this.node.build(e),e.setContext(t)}generate(e,t){let n=e.addContext(this.value),r=this.node.build(e,t);return e.setContext(n),r}},pf=(e=null,t={})=>{let n=e;return(n===null||n.isNode!==!0)&&(t=n||t,n=null),new ff(n,t)},mf=e=>pf(e,{uniformFlow:!0}),hf=(e,t)=>pf(e,{nodeName:t});function gf(e,t,n=null){return pf(n,{getShadow:({light:n,shadowColorNode:r})=>t===n?r.mul(e):r})}function _f(e,t=null){return pf(t,{getAO:(t,{material:n})=>n.transparent===!0?t:t===null?e:t.mul(e)})}function vf(e,t){return T(`TSL: "label()" has been deprecated. Use "setName()" instead.`),hf(e,t)}P(`context`,pf),P(`label`,vf),P(`uniformFlow`,mf),P(`setName`,hf),P(`builtinShadowContext`,(e,t,n)=>gf(t,n,e)),P(`builtinAOContext`,(e,t)=>_f(t,e));var yf=class extends N{static get type(){return`VarNode`}constructor(e,t=null,n=!1){super(),this.node=e,this.name=t,this.global=!0,this.isVarNode=!0,this.readOnly=n,this.parents=!0,this.intent=!1}setIntent(e){return this.intent=e,this}isIntent(e){return e.getDataFromNode(this).forceDeclaration!==!0&&this.intent}getIntent(){return this.intent}getMemberType(e,t){return this.node.getMemberType(e,t)}getElementType(e){return this.node.getElementType(e)}generateNodeType(e){return this.node.getNodeType(e)}getArrayCount(e){return this.node.getArrayCount(e)}isAssign(e){return e.getDataFromNode(this).assign}build(...e){let t=e[0],n=this.getShared(t);if(this!==n)return n.build(...e);if(this._hasStack(t)===!1&&t.buildStage===`setup`&&(t.context.nodeLoop||t.context.nodeBlock)){let e=!1;if(this.node.isShaderCallNodeInternal&&this.node.shaderNode.getLayout()===null&&t.fnCall&&t.fnCall.shaderNode&&t.getDataFromNode(this.node.shaderNode).hasLoop){let n=t.getDataFromNode(this);n.forceDeclaration=!0,e=!0}let n=t.getBaseStack();e?n.addToStackBefore(this):n.addToStack(this)}return this.isIntent(t)&&this.isAssign(t)!==!0?this.node.build(...e):super.build(...e)}generate(e){let{node:t,name:n,readOnly:r}=this,{renderer:i}=e,a=i.backend.isWebGPUBackend===!0,o=!1,s=!1;r&&(o=e.isDeterministic(t),s=a?r:o);let c=this.getNodeType(e);if(c==`void`)return this.isIntent(e)!==!0&&E(`TSL: ".toVar()" can not be used with void type.`,this.stackTrace),t.build(e);let l=e.getVectorType(c),u=t.build(e,l),d=e.getVarFromNode(this,n,l,void 0,s),f=e.getPropertyName(d),p=f;if(s)if(a)p=o?`const ${f}`:`let ${f}`;else{let n=t.getArrayCount(e);p=`const ${e.getVar(d.type,f,n)}`}return e.addLineFlowCode(`${p} = ${u}`,this),f}_hasStack(e){return e.getDataFromNode(this).stack!==void 0}},bf=el(yf),xf=(e,t=null)=>bf(e,t).toStack(),Sf=(e,t=null)=>bf(e,t,!0).toStack(),Cf=e=>bf(e).setIntent(!0).toStack();P(`toVar`,xf),P(`toConst`,Sf),P(`toVarIntent`,Cf);var wf=class extends N{static get type(){return`SubBuild`}constructor(e,t,n=null){super(n),this.node=e,this.name=t,this.isSubBuildNode=!0}generateNodeType(e){if(this.nodeType!==null)return this.nodeType;e.addSubBuild(this.name);let t=this.node.getNodeType(e);return e.removeSubBuild(),t}build(e,...t){e.addSubBuild(this.name);let n=this.node.build(e,...t);return e.removeSubBuild(),n}},Tf=(e,t,n=null)=>new wf(F(e),t,n),Ef=el(class extends N{static get type(){return`VaryingNode`}constructor(e,t=null){super(),this.node=Tf(e,`VERTEX`),this.name=t,this.isVaryingNode=!0,this.interpolationType=null,this.interpolationSampling=null,this.global=!0}setInterpolation(e,t=null){return this.interpolationType=e,this.interpolationSampling=t,this}getHash(e){return this.name||super.getHash(e)}generateNodeType(e){return this.node.getNodeType(e)}setupVarying(e){let t=e.getNodeProperties(this),n=t.varying;if(n===void 0){let r=this.name,i=this.getNodeType(e),a=this.interpolationType,o=this.interpolationSampling;t.varying=n=e.getVaryingFromNode(this,r,i,a,o),t.node=Tf(this.node,`VERTEX`)}return n.needsInterpolation||=e.shaderStage===`fragment`,n}setup(e){this.setupVarying(e),e.flowNodeFromShaderStage(Xs.VERTEX,this.node)}analyze(e){this.setupVarying(e),e.flowNodeFromShaderStage(Xs.VERTEX,this.node)}generate(e){let t=e.getSubBuildProperty(`property`,e.currentStack),n=e.getNodeProperties(this),r=this.setupVarying(e);if(n[t]===void 0){let i=this.getNodeType(e),a=e.getPropertyName(r,Xs.VERTEX);if(e.shaderStage===Xs.VERTEX){let t=n.node.build(e,i);e.addLineFlowCode(`${a} = ${t}`,this)}else e.flowNodeFromShaderStage(Xs.VERTEX,n.node,i,a);n[t]=a}return e.getPropertyName(r)}}).setParameterLength(1,2),Df=e=>Ef(e);P(`toVarying`,Ef),P(`toVertexStage`,Df);var Of=R(([e])=>Qd(e.mul(.9478672986).add(.0521327014).pow(2.4),e.mul(.0773993808),e.lessThanEqual(.04045))).setLayout({name:`sRGBTransferEOTF`,type:`vec3`,inputs:[{name:`color`,type:`vec3`}]}),kf=R(([e])=>Qd(e.pow(.41666).mul(1.055).sub(.055),e.mul(12.92),e.lessThanEqual(.0031308))).setLayout({name:`sRGBTransferOETF`,type:`vec3`,inputs:[{name:`color`,type:`vec3`}]}),Af=`WorkingColorSpace`,jf=`OutputColorSpace`,Mf=class extends sc{static get type(){return`ColorSpaceNode`}constructor(e,t,n){super(`vec4`),this.colorNode=e,this.source=t,this.target=n}resolveColorSpace(e,t){return t===Af?un.workingColorSpace:t===jf?e.context.outputColorSpace||e.renderer.outputColorSpace:t}setup(e){let{colorNode:t}=this,n=this.resolveColorSpace(e,this.source),r=this.resolveColorSpace(e,this.target),i=t;return un.enabled===!1||n===r||!n||!r?i:(un.getTransfer(n)===`srgb`&&(i=G(Of(i.rgb),i.a)),un.getPrimaries(n)!==un.getPrimaries(r)&&(i=G(bl(un._getMatrix(new an,n,r)).mul(i.rgb),i.a)),un.getTransfer(r)===`srgb`&&(i=G(kf(i.rgb),i.a)),i)}},Nf=(e,t)=>new Mf(F(e),Af,t),Pf=(e,t)=>new Mf(F(e),t,Af),Ff=(e,t,n)=>new Mf(F(e),t,n);P(`workingToColorSpace`,Nf),P(`colorSpaceToWorking`,Pf);var If=class extends ac{static get type(){return`ReferenceElementNode`}constructor(e,t){super(e,t),this.referenceNode=e,this.isReferenceElementNode=!0}generateNodeType(){return this.referenceNode.uniformType}generate(e){let t=super.generate(e),n=this.referenceNode.getNodeType(),r=this.getNodeType();return e.format(t,n,r)}},Lf=class extends N{static get type(){return`ReferenceBaseNode`}constructor(e,t,n=null,r=null){super(),this.property=e,this.uniformType=t,this.object=n,this.count=r,this.properties=e.split(`.`),this.reference=n,this.node=null,this.group=null,this.updateType=M.OBJECT}setGroup(e){return this.group=e,this}element(e){return new If(this,F(e))}setNodeType(e){let t=q(null,e);this.group!==null&&t.setGroup(this.group),this.node=t}generateNodeType(e){return this.node===null&&(this.updateReference(e),this.updateValue()),this.node.getNodeType(e)}getValueFromReference(e=this.reference){let{properties:t}=this,n=e[t[0]];for(let e=1;enew Lf(e,t,n),zf=class extends Lf{static get type(){return`RendererReferenceNode`}constructor(e,t,n=null){super(e,t,n),this.renderer=n,this.setGroup(K)}updateReference(e){return this.reference=this.renderer===null?e.renderer:this.renderer,this.reference}},Bf=(e,t,n=null)=>new zf(e,t,n),Vf=class extends sc{static get type(){return`ToneMappingNode`}constructor(e,t=Uf,n=null){super(`vec3`),this._toneMapping=e,this.exposureNode=t,this.colorNode=n}customCacheKey(){return Ls(this._toneMapping)}setToneMapping(e){return this._toneMapping=e,this}getToneMapping(){return this._toneMapping}setup(e){let t=this.colorNode||e.context.color,n=this._toneMapping;if(n===0)return t;let r=null,i=e.renderer.library.getToneMappingFunction(n);return i===null?(E(`ToneMappingNode: Unsupported Tone Mapping configuration.`,n),r=t):r=G(i(t.rgb,this.exposureNode),t.a),r}},Hf=(e,t,n)=>new Vf(e,F(t),F(n)),Uf=Bf(`toneMappingExposure`,`float`);P(`toneMapping`,(e,t,n)=>Hf(t,n,e));var Wf=new WeakMap;function Gf(e,t){let n=Wf.get(e);return n===void 0&&(n=new ai(e,t),Wf.set(e,n)),n}var Kf=class extends pc{static get type(){return`BufferAttributeNode`}constructor(e,t=null,n=0,r=0){super(e,t),this.isBufferNode=!0,this.bufferType=t,this.bufferStride=n,this.bufferOffset=r,this.usage=ft,this.instanced=!1,this.attribute=null,this.global=!0,e&&e.isBufferAttribute===!0&&e.itemSize<=4&&(this.attribute=e,this.usage=e.usage,this.instanced=e.isInstancedBufferAttribute)}getHash(e){let t;if(this.bufferStride===0&&this.bufferOffset===0){let n=e.globalCache.getData(this.value);n===void 0&&(n={node:this},e.globalCache.setData(this.value,n)),t=n.node.id}else t=this.id;return String(t)}generateNodeType(e){return this.bufferType===null&&(this.bufferType=e.getTypeFromAttribute(this.attribute)),this.bufferType}setup(e){if(this.attribute!==null)return;let t=this.getNodeType(e),n=e.getTypeLength(t),r=this.value,i=this.bufferStride||n,a=this.bufferOffset,o;o=r.isInterleavedBuffer===!0?r:r.isBufferAttribute===!0?Gf(r.array,i):Gf(r,i);let s=new si(o,n,a);o.setUsage(this.usage),this.attribute=s,this.attribute.isInstancedBufferAttribute=this.instanced}generate(e){let t=this.getNodeType(e),n=e.context.nodeName;n!==void 0&&delete e.context.nodeName;let r=e.getBufferAttributeFromNode(this,t,n),i=e.getPropertyName(r),a=null;if(e.shaderStage===`vertex`||e.shaderStage===`compute`)this.name=i,a=i;else{let r;n&&(r=n+`Varying`),a=Ef(this,r).build(e,t)}return a}getInputType(){return`bufferAttribute`}setUsage(e){return this.usage=e,this.attribute&&this.attribute.isBufferAttribute===!0&&(this.attribute.usage=e),this}setInstanced(e){return this.instanced=e,this}};function qf(e,t=null,n=0,r=0,i=ft,a=!1){return t===`mat3`||t===null&&e.itemSize===9?bl(new Kf(e,`vec3`,9,0).setUsage(i).setInstanced(a),new Kf(e,`vec3`,9,3).setUsage(i).setInstanced(a),new Kf(e,`vec3`,9,6).setUsage(i).setInstanced(a)):t===`mat4`||t===null&&e.itemSize===16?xl(new Kf(e,`vec4`,16,0).setUsage(i).setInstanced(a),new Kf(e,`vec4`,16,4).setUsage(i).setInstanced(a),new Kf(e,`vec4`,16,8).setUsage(i).setInstanced(a),new Kf(e,`vec4`,16,12).setUsage(i).setInstanced(a)):new Kf(e,t,n,r).setUsage(i)}var Jf=(e,t=null,n=0,r=0)=>qf(e,t,n,r),Yf=(e,t=null,n=0,r=0)=>qf(e,t,n,r,pt),Xf=(e,t=null,n=0,r=0)=>qf(e,t,n,r,ft,!0),Zf=(e,t=null,n=0,r=0)=>qf(e,t,n,r,pt,!0);P(`toAttribute`,e=>Jf(e.value));var Qf=class e extends N{static get type(){return`IndexNode`}constructor(e){super(`uint`),this.scope=e,this.isIndexNode=!0}generate(t){let n=this.getNodeType(t),r=this.scope,i;if(r===e.VERTEX)i=t.getVertexIndex();else if(r===e.INSTANCE)i=t.getInstanceIndex();else if(r===e.DRAW)i=t.getDrawIndex();else if(r===e.INVOCATION_LOCAL)i=t.getInvocationLocalIndex();else if(r===e.INVOCATION_SUBGROUP)i=t.getInvocationSubgroupIndex();else if(r===e.SUBGROUP)i=t.getSubgroupIndex();else throw Error(`THREE.IndexNode: Unknown scope: `+r);let a;return a=t.shaderStage===`vertex`||t.shaderStage===`compute`?i:Ef(this).build(t,n),a}};Qf.VERTEX=`vertex`,Qf.INSTANCE=`instance`,Qf.SUBGROUP=`subgroup`,Qf.INVOCATION_LOCAL=`invocationLocal`,Qf.INVOCATION_SUBGROUP=`invocationSubgroup`,Qf.DRAW=`draw`;var $f=I(Qf,Qf.VERTEX),ep=I(Qf,Qf.INSTANCE),tp=I(Qf,Qf.SUBGROUP),np=I(Qf,Qf.INVOCATION_SUBGROUP),rp=I(Qf,Qf.INVOCATION_LOCAL),ip=I(Qf,Qf.DRAW),ap=class extends N{static get type(){return`ComputeNode`}constructor(e,t){super(`void`),this.isComputeNode=!0,this.computeNode=e,this.workgroupSize=t,this.count=null,this.dispatchSize=null,this.version=1,this.name=``,this.updateBeforeType=M.OBJECT,this.onInitFunction=null,this.countNode=null}dispose(){this.dispatchEvent({type:`dispose`})}setName(e){return this.name=e,this}label(e){return T(`TSL: "label()" has been deprecated. Use "setName()" instead.`,new Ns),this.setName(e)}onInit(e){return this.onInitFunction=e,this}updateBefore({renderer:e}){e.compute(this)}setup(e){this.count!==null&&this.countNode===null&&(this.countNode=q(this.count,`uint`).onObjectUpdate(()=>this.count));let t=this.computeNode.build(e);if(t){let n=e.getNodeProperties(this);n.outputComputeNode=t.outputNode,t.outputNode=null}return t}generate(e,t){let{shaderStage:n}=e;if(n===`compute`){let t=this.computeNode.build(e,`void`);if(t!==``&&e.addLineFlowCode(t,this),this.count!==null&&e.allowEarlyReturns===!0){let t=this.countNode.build(e,`uint`),n=ep.build(e,`uint`);e.flow.code=`${e.tab}if ( ${n} >= ${t} ) { return; }\n\n${e.flow.code}`}}else{let n=e.getNodeProperties(this).outputComputeNode;if(n)return n.build(e,t)}}},op=(e,t=[64])=>{(t.length===0||t.length>3)&&E(`TSL: compute() workgroupSize must have 1, 2, or 3 elements`,new Ns);for(let e=0;e{let r=op(e,n);return typeof t==`number`?r.count=t:r.dispatchSize=t,r};P(`compute`,sp),P(`computeKernel`,op);var cp=class extends N{static get type(){return`IsolateNode`}constructor(e,t=!0){super(),this.node=e,this.parent=t,this.isIsolateNode=!0}generateNodeType(e){let t=e.getCache(),n=e.getCacheFromNode(this,this.parent);e.setCache(n);let r=this.node.getNodeType(e);return e.setCache(t),r}build(e,...t){let n=e.getCache(),r=e.getCacheFromNode(this,this.parent);e.setCache(r);let i=this.node.build(e,...t);return e.setCache(n),i}setParent(e){return this.parent=e,this}getParent(){return this.parent}},lp=e=>new cp(F(e));function up(e,t=!0){return T(`TSL: "cache()" has been deprecated. Use "isolate()" instead.`),lp(e).setParent(t)}P(`cache`,up),P(`isolate`,lp);var dp=el(class extends N{static get type(){return`BypassNode`}constructor(e,t){super(),this.isBypassNode=!0,this.outputNode=e,this.callNode=t}generateNodeType(e){return this.outputNode.getNodeType(e)}generate(e){let t=this.callNode.build(e,`void`);return t!==``&&e.addLineFlowCode(t,this),this.outputNode.build(e)}}).setParameterLength(2);P(`bypass`,dp);var fp=R(([e,t,n,r=B(0),i=B(1),a=ll(!1)])=>{let o=e.sub(t).div(n.sub(t));return Jc(a)&&(o=o.clamp()),o.mul(i.sub(r)).add(r)});function pp(e,t,n,r=B(0),i=B(1)){return fp(e,t,n,r,i,!0)}P(`remap`,fp),P(`remapClamp`,pp);var mp=class extends N{static get type(){return`ExpressionNode`}constructor(e=``,t=`void`){super(t),this.snippet=e}generate(e,t){let n=this.getNodeType(e),r=this.snippet;if(n===`void`)e.addLineFlowCode(r,this);else return e.format(r,n,t)}},hp=el(mp).setParameterLength(1,2),gp=e=>(e?df(e,hp(`discard`)):hp(`discard`)).toStack(),_p=()=>hp(`return`).toStack();P(`discard`,gp);var vp=R(([e])=>G(e.rgb.mul(e.a),e.a),{color:`vec4`,return:`vec4`}),yp=R(([e])=>e.a.equal(0).select(G(0),G(e.rgb.div(e.a),e.a)),{color:`vec4`,return:`vec4`}),bp=class extends sc{static get type(){return`RenderOutputNode`}constructor(e,t,n){super(`vec4`),this.colorNode=e,this._toneMapping=t,this.outputColorSpace=n,this.isRenderOutputNode=!0}setToneMapping(e){return this._toneMapping=e,this}getToneMapping(){return this._toneMapping}setup({context:e}){let t=this.colorNode||e.color;t=G(t.rgb,t.a.clamp(0,1)),t=yp(t);let n=(this._toneMapping===null?e.toneMapping:this._toneMapping)||0,r=(this.outputColorSpace===null?e.outputColorSpace:this.outputColorSpace)||``;return n!==0&&(t=t.toneMapping(n)),r!==``&&r!==un.workingColorSpace&&(t=t.workingToColorSpace(r)),t=vp(t),t}},xp=(e,t=null,n=null)=>new bp(F(e),t,n);P(`renderOutput`,xp);var Sp=class extends sc{static get type(){return`DebugNode`}constructor(e,t=null){super(),this.node=e,this.callback=t}generateNodeType(e){return this.node.getNodeType(e)}setup(e){return this.node.build(e)}analyze(e){return this.node.build(e)}generate(e){let t=this.callback,n=this.node.build(e);if(t!==null)t(e,n);else{let t=`--- TSL debug - `+e.shaderStage+` shader ---`,r=`-`.repeat(t.length),i=``;i+=`// #`+t+`# -`,i+=e.flow.code.replace(/^\t/gm,``)+` -`,i+=`/* ... */ `+n+` /* ... */ -`,i+=`// #`+r+`# -`,Ct(i)}return n}},Cp=(e,t=null)=>new Sp(F(e),t).toStack();P(`debug`,Cp);var wp=class extends Ot{constructor(){super(),this._renderer=null,this.currentFrame=null}get nodeFrame(){return this._renderer._nodes.nodeFrame}setRenderer(e){return this._renderer=e,this}getRenderer(){return this._renderer}init(){}begin(){}finish(){}inspect(){}computeAsync(){}beginCompute(){}finishCompute(){}beginRender(){}finishRender(){}copyTextureToTexture(){}copyFramebufferToTexture(){}},Tp=class extends N{static get type(){return`InspectorNode`}constructor(e,t=``,n=null){super(),this.node=e,this.name=t,this.callback=n,this.updateType=M.FRAME,this.isInspectorNode=!0}getName(){return this.name||this.node.name}update(e){e.renderer.inspector.inspect(this)}generateNodeType(e){return this.node.getNodeType(e)}setup(e){let t=this.node;return e.context.inspector===!0&&this.callback!==null&&(t=this.callback(t)),e.renderer.backend.isWebGPUBackend!==!0&&e.renderer.inspector.constructor!==wp&&Tt(`TSL: ".toInspector()" is only available with WebGPU.`),t}};function Ep(e,t=``,n=null){return e=F(e),e.before(new Tp(e,t,n))}P(`toInspector`,Ep);function Dp(e){T(`TSL: AddNodeElement has been removed in favor of tree-shaking. Trying add`,e)}var Op=class extends N{static get type(){return`AttributeNode`}constructor(e,t=null){super(t),this.global=!0,this._attributeName=e}getHash(e){return this.getAttributeName(e)}generateNodeType(e){let t=this.nodeType;if(t===null){let n=this.getAttributeName(e);if(e.hasGeometryAttribute(n)){let r=e.geometry.getAttribute(n);t=e.getTypeFromAttribute(r)}else t=`float`}return t}setAttributeName(e){return this._attributeName=e,this}getAttributeName(){return this._attributeName}generate(e){let t=this.getAttributeName(e),n=this.getNodeType(e);if(e.hasGeometryAttribute(t)===!0){let r=e.geometry.getAttribute(t),i=e.getTypeFromAttribute(r),a=e.getAttribute(t,i);return e.shaderStage===`vertex`?e.format(a.name,i,n):Ef(this).build(e,n)}else return T(`AttributeNode: Vertex attribute "${t}" not found on geometry.`),e.generateConst(n)}serialize(e){super.serialize(e),e.global=this.global,e._attributeName=this._attributeName}deserialize(e){super.deserialize(e),this.global=e.global,this._attributeName=e._attributeName}},kp=(e,t=null)=>new Op(e,t),Ap=(e=0)=>kp(`uv`+(e>0?e:``),`vec2`),jp=el(class extends N{static get type(){return`TextureSizeNode`}constructor(e,t=null){super(`uvec2`),this.isTextureSizeNode=!0,this.textureNode=e,this.levelNode=t}generate(e,t){let n=this.textureNode.build(e,`property`),r=this.levelNode===null?`0`:this.levelNode.build(e,`int`);return e.format(`${e.getMethod(`textureDimensions`)}( ${n}, ${r} )`,this.getNodeType(e),t)}}).setParameterLength(1,2),Mp=el(class extends du{static get type(){return`MaxMipLevelNode`}constructor(e){super(0),this._textureNode=e,this.updateType=M.FRAME}get textureNode(){return this._textureNode}get texture(){return this._textureNode.value}update(){let e=this.texture,t=e.images,n=t&&t.length>0?t[0]&&t[0].image||t[0]:e.image;if(n&&n.width!==void 0){let{width:e,height:t}=n;this.value=Math.log2(Math.max(e,t))}}}).setParameterLength(1),Np=class extends Error{constructor(e,t=null){super(e),this.name=`NodeError`,this.stackTrace=t}},Pp=new bn,Fp=class extends du{static get type(){return`TextureNode`}constructor(e=Pp,t=null,n=null,r=null){super(e),this.isTextureNode=!0,this.uvNode=t,this.levelNode=n,this.biasNode=r,this.compareNode=null,this.depthNode=null,this.gradNode=null,this.gatherNode=null,this.offsetNode=null,this.sampler=!0,this.updateMatrix=!1,this.updateType=M.NONE,this.referenceNode=null,this._value=e,this._matrixUniform=null,this._flipYUniform=null,this.setUpdateMatrix(t===null)}set value(e){this.referenceNode?this.referenceNode.value=e:this._value=e}get value(){return this.referenceNode?this.referenceNode.value:this._value}getUniformHash(){return this.value.uuid}generateNodeType(){return this.value.isDepthTexture===!0?this.gatherNode===null?`float`:`vec4`:this.value.type===1014?`uvec4`:this.value.type===1013?`ivec4`:`vec4`}getInputType(){return`texture`}getDefaultUV(){return Ap(this.value.channel)}updateReference(){return this.value}getTransformedUV(e){return this._matrixUniform===null&&(this._matrixUniform=q(this.value.matrix)),this._matrixUniform.mul(W(e,1)).xy}setUpdateMatrix(e){return this.updateMatrix=e,this}setupUV(e,t){return e.isFlipY()&&(this._flipYUniform===null&&(this._flipYUniform=q(!1)),t=t.toVar(),t=this.sampler?this._flipYUniform.select(t.flipY(),t):this._flipYUniform.select(t.setY(V(jp(this,this.levelNode).y).sub(t.y).sub(1)),t)),t}setup(e){let t=e.getNodeProperties(this);t.referenceNode=this.referenceNode;let n=this.value;if(!n||n.isTexture!==!0)throw new Np("THREE.TSL: `texture( value )` function expects a valid instance of THREE.Texture().",this.stackTrace);let r=R(()=>{let t=this.uvNode;return(t===null||e.context.forceUVContext===!0)&&e.context.getUV&&(t=e.context.getUV(this,e)),t||=this.getDefaultUV(),this.updateMatrix===!0&&(t=this.getTransformedUV(t)),t=this.setupUV(e,t),this.updateType=this._matrixUniform!==null||this._flipYUniform!==null?M.OBJECT:M.NONE,t})(),i=this.levelNode;i===null&&e.context.getTextureLevel&&(i=e.context.getTextureLevel(this));let a=null,o=null;if(this.compareNode!==null)if(e.renderer.hasCompatibility(_t.TEXTURE_COMPARE))a=this.compareNode;else{let e=n.compareFunction;e===null||e===513||e===515||e===516||e===518?o=this.compareNode:(a=this.compareNode,Tt(`TSL: Only "LessCompare", "LessEqualCompare", "GreaterCompare" and "GreaterEqualCompare" are supported for depth texture comparison fallback.`))}t.uvNode=r,t.levelNode=i,t.biasNode=this.biasNode,t.compareNode=a,t.compareStepNode=o,t.gradNode=this.gradNode,t.gatherNode=this.gatherNode,t.depthNode=this.depthNode,t.offsetNode=this.offsetNode}generateUV(e,t){return t.build(e,this.sampler===!0?`vec2`:`ivec2`)}generateOffset(e,t){return t.build(e,`ivec2`)}generateSnippet(e,t,n,r,i,a,o,s,c,l,u){let d=this.value,f;return f=i?e.generateTextureBias(d,t,n,i,a,l):s?e.generateTextureGrad(d,t,n,s,a,l):c?o?e.generateTextureGatherCompare(d,t,n,o,a,l,u):e.generateTextureGather(d,t,n,c,a,l,u):o?e.generateTextureCompare(d,t,n,o,a,l):this.sampler===!1?e.generateTextureLoad(d,t,n,r,a,l):r?e.generateTextureLevel(d,t,n,r,a,l):e.generateTexture(d,t,n,a,l),f}generate(e,t){let n=this.value,r=e.getNodeProperties(this),i=super.generate(e,`property`);if(/^sampler/.test(t))return i+`_sampler`;if(e.isReference(t))return i;{let a=e.getDataFromNode(this),o=this.getNodeType(e),s=a.propertyName;if(s===void 0){let{uvNode:t,levelNode:c,biasNode:l,compareNode:u,compareStepNode:d,depthNode:f,gradNode:p,gatherNode:m,offsetNode:h}=r,g=this.generateUV(e,t),_=c?c.build(e,`float`):null,v=l?l.build(e,`float`):null,y=f?f.build(e,`int`):null,b=u?u.build(e,`float`):null,x=d?d.build(e,`float`):null,S=p?[p[0].build(e,`vec2`),p[1].build(e,`vec2`)]:null,C=m?m.build(e,`int`):null,ee=h?this.generateOffset(e,h):null,te=this._flipYUniform?this._flipYUniform.build(e,`bool`):null;C&&(o=`vec4`);let w=y;w===null&&n.isArrayTexture&&this.isTexture3DNode!==!0&&(w=`0`);let ne=e.getVarFromNode(this);s=e.getPropertyName(ne);let re=this.generateSnippet(e,i,g,_,v,w,b,S,C,ee,te);if(x!==null){let t=n.compareFunction;re=t===516||t===518?Ld(hp(re,o),hp(x,`float`)).build(e,o):Ld(hp(x,`float`),hp(re,o)).build(e,o)}e.addLineFlowCode(`${s} = ${re}`,this),a.snippet=re,a.propertyName=s}let c=s;return e.needsToWorkingColorSpace(n)&&(c=Pf(hp(c,o),n.colorSpace).setup(e).build(e,o)),e.format(c,o,t)}}setSampler(e){return this.sampler=e,this}getSampler(){return this.sampler}sample(e){let t=this.clone();return t.uvNode=F(e),t.referenceNode=this.getBase(),F(t)}load(e){return this.sample(e).setSampler(!1)}blur(e){let t=this.clone();t.biasNode=F(e).mul(Mp(t)),t.referenceNode=this.getBase();let n=t.value;return t.generateMipmaps===!1&&(n&&n.generateMipmaps===!1||n.minFilter===1003||n.magFilter===1003)&&(T(`TSL: texture().blur() requires mipmaps and sampling. Use .generateMipmaps=true and .minFilter/.magFilter=THREE.LinearFilter in the Texture.`),t.biasNode=null),F(t)}level(e){let t=this.clone();return t.levelNode=F(e),t.referenceNode=this.getBase(),F(t)}size(e){return jp(this,e)}bias(e){let t=this.clone();return t.biasNode=F(e),t.referenceNode=this.getBase(),F(t)}getBase(){return this.referenceNode?this.referenceNode.getBase():this}compare(e){let t=this.clone();return t.compareNode=F(e),t.referenceNode=this.getBase(),F(t)}grad(e,t){let n=this.clone();return n.gradNode=[F(e),F(t)],n.referenceNode=this.getBase(),F(n)}gather(e=0){let t=this.clone();return t.gatherNode=F(e),t.referenceNode=this.getBase(),F(t)}depth(e){let t=this.clone();return t.depthNode=F(e),t.referenceNode=this.getBase(),F(t)}offset(e){let t=this.clone();return t.offsetNode=F(e),t.referenceNode=this.getBase(),F(t)}serialize(e){super.serialize(e),e.value=this.value.toJSON(e.meta).uuid,e.sampler=this.sampler,e.updateMatrix=this.updateMatrix,e.updateType=this.updateType}deserialize(e){super.deserialize(e),this.value=e.meta.textures[e.value],this.sampler=e.sampler,this.updateMatrix=e.updateMatrix,this.updateType=e.updateType}update(){let e=this.value,t=this._matrixUniform;t!==null&&(t.value=e.matrix),e.matrixAutoUpdate===!0&&e.updateMatrix();let n=this._flipYUniform;n!==null&&(n.value=e.image instanceof ImageBitmap&&e.flipY===!0||e.isRenderTargetTexture===!0||e.isFramebufferTexture===!0||e.isDepthTexture===!0)}clone(){let e=new this.constructor(this.value,this.uvNode,this.levelNode,this.biasNode);return e.sampler=this.sampler,e.depthNode=this.depthNode,e.compareNode=this.compareNode,e.gradNode=this.gradNode,e.gatherNode=this.gatherNode,e.offsetNode=this.offsetNode,e}},Ip=el(Fp).setParameterLength(1,4).setName(`texture`),Lp=(e=Pp,t=null,n=null,r=null)=>{let i;return e&&e.isTextureNode===!0?(i=F(e.clone()),i.referenceNode=e.getBase(),t!==null&&(i.uvNode=F(t)),n!==null&&(i.levelNode=F(n)),r!==null&&(i.biasNode=F(r))):i=Ip(e,t,n,r),i},Rp=(e=Pp)=>Lp(e),zp=(...e)=>Lp(...e).setSampler(!1),Bp=(e,t,n)=>Lp(e,t).level(n),Vp=e=>(e.isNode===!0?e:Lp(e)).convert(`sampler`),Hp=e=>(e.isNode===!0?e:Lp(e)).convert(`samplerComparison`),Up=class extends du{static get type(){return`BufferNode`}constructor(e,t,n=0){super(e,t),this.isBufferNode=!0,this.bufferType=t,this.bufferCount=n,this.updateRanges=[]}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}getElementType(e){return this.getNodeType(e)}getInputType(){return`buffer`}},Wp=(e,t,n)=>new Up(e,t,n),Gp=class extends ac{static get type(){return`UniformArrayElementNode`}constructor(e,t){super(e,t),this.isArrayBufferElementNode=!0}generate(e){let t=super.generate(e),n=this.getNodeType(e),r=this.node.getPaddedType();return e.format(t,r,n)}},Kp=class extends Up{static get type(){return`UniformArrayNode`}constructor(e,t=null){super(null),this.array=e,this.elementType=t===null?Gs(e[0]):t,this.paddedType=this.getPaddedType(),this.updateType=M.RENDER,this.isArrayBufferNode=!0}generateNodeType(){return this.paddedType}getElementType(){return this.elementType}getPaddedType(){let e=this.elementType,t=`vec4`;return e===`mat2`?t=`mat2`:/mat/.test(e)===!0?t=`mat4`:e.charAt(0)===`i`?t=`ivec4`:e.charAt(0)===`u`&&(t=`uvec4`),t}update(){let{array:e,value:t}=this,n=this.elementType;if(n===`float`||n===`int`||n===`uint`)for(let n=0;nnew Kp(e,t),Jp=el(class extends N{constructor(e){super(`float`),this.name=e,this.isBuiltinNode=!0}generate(){return this.name}}).setParameterLength(1),Yp,Xp,Zp=class e extends N{static get type(){return`ScreenNode`}constructor(e){super(),this.scope=e,this._output=null,this.isViewportNode=!0}generateNodeType(){return this.scope===e.DPR?`float`:this.scope===e.VIEWPORT?`vec4`:`vec2`}getUpdateType(){let t=M.NONE;return(this.scope===e.SIZE||this.scope===e.VIEWPORT||this.scope===e.DPR)&&(t=M.RENDER),this.updateType=t,t}update({renderer:t}){let n=t.getRenderTarget();this.scope===e.VIEWPORT?n===null?(t.getViewport(Xp),Xp.multiplyScalar(t.getPixelRatio())):Xp.copy(n.viewport):this.scope===e.DPR?this._output.value=t.getPixelRatio():n===null?t.getDrawingBufferSize(Yp):(Yp.width=n.width,Yp.height=n.height)}setup(){let t=this.scope,n=null;return n=t===e.SIZE?q(Yp||=new O):t===e.VIEWPORT?q(Xp||=new xn):t===e.DPR?q(1):U(tm.div(em)),this._output=n,n}generate(t){if(this.scope===e.COORDINATE){let e=t.getFragCoord();if(t.isFlipY()){let n=t.getNodeProperties(em).outputNode.build(t);e=`${t.getType(`vec2`)}( ${e}.x, ${n}.y - ${e}.y )`}return e}return super.generate(t)}};Zp.COORDINATE=`coordinate`,Zp.VIEWPORT=`viewport`,Zp.SIZE=`size`,Zp.UV=`uv`,Zp.DPR=`dpr`;var Qp=I(Zp,Zp.DPR),$p=I(Zp,Zp.UV),em=I(Zp,Zp.SIZE),tm=I(Zp,Zp.COORDINATE),nm=I(Zp,Zp.VIEWPORT),rm=nm.zw,im=tm.sub(nm.xy),am=im.div(rm),om=R(()=>(T(`TSL: "viewportResolution" is deprecated. Use "screenSize" instead.`,new Ns),em),`vec2`).once()(),sm=null,cm=null,lm=null,um=null,dm=null,fm=null,pm=null,mm=null,hm=null,gm=null,_m=null,vm=null,ym=null,bm=null,xm=q(0,`uint`).setName(`u_cameraIndex`).setGroup(cu(`cameraIndex`)).toVarying(`v_cameraIndex`),Sm=q(`float`).setName(`cameraNear`).setGroup(K).onRenderUpdate(({camera:e})=>e.near),Cm=q(`float`).setName(`cameraFar`).setGroup(K).onRenderUpdate(({camera:e})=>e.far),wm=R(({camera:e})=>{let t;if(e.isArrayCamera&&e.cameras.length>0){let n=[];for(let t of e.cameras)n.push(t.projectionMatrix);cm===null?cm=qp(n).setGroup(K).setName(`cameraProjectionMatrices`):cm.array=n,t=cm.element(e.isMultiViewCamera?Jp(`gl_ViewID_OVR`):xm)}else sm===null&&(sm=q(e.projectionMatrix).setName(`cameraProjectionMatrix`).setGroup(K).onRenderUpdate(({camera:e})=>e.projectionMatrix)),t=sm;return t}).once()(),Tm=R(({camera:e})=>{let t;if(e.isArrayCamera&&e.cameras.length>0){let n=[];for(let t of e.cameras)n.push(t.projectionMatrixInverse);um===null?um=qp(n).setGroup(K).setName(`cameraProjectionMatricesInverse`):um.array=n,t=um.element(e.isMultiViewCamera?Jp(`gl_ViewID_OVR`):xm)}else lm===null&&(lm=q(e.projectionMatrixInverse).setName(`cameraProjectionMatrixInverse`).setGroup(K).onRenderUpdate(({camera:e})=>e.projectionMatrixInverse)),t=lm;return t}).once()(),Em=R(({camera:e})=>{let t;if(e.isArrayCamera&&e.cameras.length>0){let n=[];for(let t of e.cameras)n.push(t.matrixWorldInverse);fm===null?fm=qp(n).setGroup(K).setName(`cameraViewMatrices`):fm.array=n,t=fm.element(e.isMultiViewCamera?Jp(`gl_ViewID_OVR`):xm)}else dm===null&&(dm=q(e.matrixWorldInverse).setName(`cameraViewMatrix`).setGroup(K).onRenderUpdate(({camera:e})=>e.matrixWorldInverse)),t=dm;return t}).once()(),Dm=R(({camera:e})=>{let t;if(e.isArrayCamera&&e.cameras.length>0){let n=[];for(let t of e.cameras)n.push(t.matrixWorld);mm===null?mm=qp(n).setGroup(K).setName(`cameraWorldMatrices`):mm.array=n,t=mm.element(e.isMultiViewCamera?Jp(`gl_ViewID_OVR`):xm)}else pm===null&&(pm=q(e.matrixWorld).setName(`cameraWorldMatrix`).setGroup(K).onRenderUpdate(({camera:e})=>e.matrixWorld)),t=pm;return t}).once()(),Om=R(({camera:e})=>{let t;if(e.isArrayCamera&&e.cameras.length>0){let n=[];for(let t of e.cameras)n.push(t.normalMatrix);gm===null?gm=qp(n).setGroup(K).setName(`cameraNormalMatrices`):gm.array=n,t=gm.element(e.isMultiViewCamera?Jp(`gl_ViewID_OVR`):xm)}else hm===null&&(hm=q(e.normalMatrix).setName(`cameraNormalMatrix`).setGroup(K).onRenderUpdate(({camera:e})=>e.normalMatrix)),t=hm;return t}).once()(),km=R(({camera:e})=>{let t;if(e.isArrayCamera&&e.cameras.length>0){let n=[];for(let t=0,r=e.cameras.length;t{let n=e.cameras,r=t.array;for(let e=0,t=n.length;et.value.setFromMatrixPosition(e.matrixWorld))),t=_m;return t}).once()(),Am=R(({camera:e})=>{let t;if(e.isArrayCamera&&e.cameras.length>0){let n=[];for(let t of e.cameras)n.push(t.viewport);bm===null?bm=qp(n,`vec4`).setGroup(K).setName(`cameraViewports`):bm.array=n,t=bm.element(xm)}else ym===null&&(ym=G(0,0,em.x,em.y).toConst(`cameraViewport`)),t=ym;return t}).once()(),jm=new Xr,Mm=class e extends N{static get type(){return`Object3DNode`}constructor(e,t=null){super(),this.scope=e,this.object3d=t,this.updateType=M.OBJECT,this.uniformNode=new du(null)}generateNodeType(){let t=this.scope;if(t===e.WORLD_MATRIX)return`mat4`;if(t===e.POSITION||t===e.VIEW_POSITION||t===e.DIRECTION||t===e.SCALE)return`vec3`;if(t===e.RADIUS)return`float`}update(t){let n=this.object3d,r=this.uniformNode,i=this.scope;if(i===e.WORLD_MATRIX)r.value=n.matrixWorld;else if(i===e.POSITION)r.value=r.value||new k,r.value.setFromMatrixPosition(n.matrixWorld);else if(i===e.SCALE)r.value=r.value||new k,r.value.setFromMatrixScale(n.matrixWorld);else if(i===e.DIRECTION)r.value=r.value||new k,n.getWorldDirection(r.value);else if(i===e.VIEW_POSITION){let e=t.camera;r.value=r.value||new k,r.value.setFromMatrixPosition(n.matrixWorld),r.value.applyMatrix4(e.matrixWorldInverse)}else if(i===e.RADIUS){let e=t.object.geometry;e.boundingSphere===null&&e.computeBoundingSphere(),jm.copy(e.boundingSphere).applyMatrix4(n.matrixWorld),r.value=jm.radius}}generate(t){let n=this.scope;return n===e.WORLD_MATRIX?this.uniformNode.nodeType=`mat4`:n===e.POSITION||n===e.VIEW_POSITION||n===e.DIRECTION||n===e.SCALE?this.uniformNode.nodeType=`vec3`:n===e.RADIUS&&(this.uniformNode.nodeType=`float`),this.uniformNode.build(t)}serialize(e){super.serialize(e),e.scope=this.scope}deserialize(e){super.deserialize(e),this.scope=e.scope}};Mm.WORLD_MATRIX=`worldMatrix`,Mm.POSITION=`position`,Mm.SCALE=`scale`,Mm.VIEW_POSITION=`viewPosition`,Mm.DIRECTION=`direction`,Mm.RADIUS=`radius`;var Nm=el(Mm,Mm.DIRECTION).setParameterLength(1),Pm=el(Mm,Mm.WORLD_MATRIX).setParameterLength(1),Fm=el(Mm,Mm.POSITION).setParameterLength(1),Im=el(Mm,Mm.SCALE).setParameterLength(1),Lm=el(Mm,Mm.VIEW_POSITION).setParameterLength(1),Rm=el(Mm,Mm.RADIUS).setParameterLength(1),zm=class extends Mm{static get type(){return`ModelNode`}constructor(e){super(e)}update(e){this.object3d=e.object,super.update(e)}},Bm=I(zm,zm.DIRECTION),Vm=I(zm,zm.WORLD_MATRIX),Hm=I(zm,zm.POSITION),Um=I(zm,zm.SCALE),Wm=I(zm,zm.VIEW_POSITION),Gm=I(zm,zm.RADIUS),Km=q(new an).onObjectUpdate(({object:e},t)=>t.value.getNormalMatrix(e.matrixWorld)),qm=q(new A).onObjectUpdate(({object:e},t)=>t.value.copy(e.matrixWorld).invert()),Jm=R(e=>e.context.modelViewMatrix||Ym).once()().toVar(`modelViewMatrix`),Ym=Em.mul(Vm),Xm=R(e=>(e.context.isHighPrecisionModelViewMatrix=!0,q(`mat4`).onObjectUpdate(({object:e,camera:t})=>e.modelViewMatrix.multiplyMatrices(t.matrixWorldInverse,e.matrixWorld)))).once()().toVar(`highpModelViewMatrix`),Zm=R(e=>{let t=e.context.isHighPrecisionModelViewMatrix;return q(`mat3`).onObjectUpdate(({object:e,camera:n})=>(t!==!0&&e.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,e.matrixWorld),e.normalMatrix.getNormalMatrix(e.modelViewMatrix)))}).once()().toVar(`highpModelNormalViewMatrix`),Qm=R(e=>e.shaderStage===`fragment`?e.context.clipSpace.toVarying(`v_clipSpace`):(Tt("TSL: `clipSpace` is only available in fragment stage."),G())).once()(),$m=kp(`position`,`vec3`),eh=$m.toVarying(`positionLocal`),th=$m.toVarying(`positionPrevious`),nh=R(e=>Vm.mul(eh).xyz.toVarying(e.getSubBuildProperty(`v_positionWorld`)),`vec3`).once([`POSITION`])(),rh=R(()=>eh.transformDirection(Vm).toVarying(`v_positionWorldDirection`).normalize().toVar(`positionWorldDirection`),`vec3`).once([`POSITION`])(),ih=R(e=>{if(e.shaderStage===`fragment`&&e.material.vertexNode){let e=Tm.mul(Qm);return e.xyz.div(e.w).toVar(`positionView`)}return e.context.setupPositionView().toVarying(`v_positionView`)},`vec3`).once([`POSITION`,`VERTEX`])(),ah=R(e=>{let t;return t=e.camera.isOrthographicCamera?W(0,0,1):ih.negate().toVarying(`v_positionViewDirection`).normalize(),t.toVar(`positionViewDirection`)},`vec3`).once([`POSITION`])(),oh=I(class extends N{static get type(){return`FrontFacingNode`}constructor(){super(`bool`),this.isFrontFacingNode=!0}generate(e){if(e.shaderStage!==`fragment`)return`true`;let{material:t}=e;return t.side===1?`false`:e.getFrontFacing()}}),sh=B(oh).mul(2).sub(1),ch=R(([e],{material:t})=>{let n=t.side;return n===1?e=e.mul(-1):n===2&&(e=e.mul(sh)),e}),lh=e=>(Tt(`TSL: "directionToFaceDirection()" has been renamed to "negateOnBackSide()".`),ch(e)),uh=kp(`normal`,`vec3`),dh=R(e=>e.geometry.hasAttribute(`normal`)===!1?(T(`TSL: Vertex attribute "normal" not found on geometry.`),W(0,1,0)):uh,`vec3`).once()().toVar(`normalLocal`),fh=ih.dFdx().cross(ih.dFdy()).normalize().toVar(`normalFlat`),ph=R(e=>{let t;return t=e.isFlatShading()?fh:yh(dh).toVarying(`v_normalViewGeometry`).normalize(),t},`vec3`).once()().toVar(`normalViewGeometry`),mh=R(e=>{let t=ph.transformNormalByInverseViewMatrix(Em);return e.isFlatShading()!==!0&&(t=t.toVarying(`v_normalWorldGeometry`)),t.normalize().toVar(`normalWorldGeometry`)},`vec3`).once()(),hh=R(e=>{let t;return e.subBuildFn===`NORMAL`||e.subBuildFn===`VERTEX`?(t=ph,e.isFlatShading()!==!0&&(t=ch(t))):t=e.context.setupNormal().context({getUV:null,getTextureLevel:null}),t},`vec3`).once([`NORMAL`,`VERTEX`])().toVar(`normalView`),gh=hh.transformNormalByInverseViewMatrix(Em).toVar(`normalWorld`),_h=R(({subBuildFn:e,context:t})=>{let n;return n=e===`NORMAL`||e===`VERTEX`?hh:t.setupClearcoatNormal().context({getUV:null,getTextureLevel:null}),n},`vec3`).once([`NORMAL`,`VERTEX`])().toVar(`clearcoatNormalView`),vh=R(([e,t=Vm])=>bl(t).inverse().transpose().mul(e).normalize());P(`transformNormal`,vh);var yh=R(([e],t)=>{let n=t.context.modelNormalViewMatrix;return n?e.transformNormalByViewMatrix(n):Km.mul(e).transformNormalByViewMatrix(Em)}),bh=R(()=>(T(`TSL: "transformedNormalView" is deprecated. Use "normalView" instead.`),hh)).once([`NORMAL`,`VERTEX`])(),xh=R(()=>(T(`TSL: "transformedNormalWorld" is deprecated. Use "normalWorld" instead.`),gh)).once([`NORMAL`,`VERTEX`])(),Sh=R(()=>(T(`TSL: "transformedClearcoatNormalView" is deprecated. Use "clearcoatNormalView" instead.`),_h)).once([`NORMAL`,`VERTEX`])(),Ch=new A,wh=q(0).onReference(({material:e})=>e).onObjectUpdate(({material:e})=>e.refractionRatio),Th=q(1).onReference(({material:e})=>e).onObjectUpdate(function({material:e,scene:t}){return e.envMap?e.envMapIntensity:t.environmentIntensity}),Eh=q(new A).onReference(function(e){return e.material}).onObjectUpdate(function({material:e,scene:t}){let n=(t.environment!==null||t.environmentNode&&t.environmentNode.isNode)&&e.envMap===null?t.environmentRotation:e.envMapRotation;return n?Ch.makeRotationFromEuler(n).transpose():Ch.identity(),Ch}),Dh=ah.negate().reflect(hh),Oh=ah.negate().refract(hh,wh),kh=Dh.transformDirection(Dm).toVar(`reflectVector`),Ah=Oh.transformDirection(Dm).toVar(`refractVector`),jh=new ra,Mh=el(class extends Fp{static get type(){return`CubeTextureNode`}constructor(e,t=null,n=null,r=null){super(e,t,n,r),this.isCubeTextureNode=!0}getInputType(){return this.value.isDepthTexture===!0?`cubeDepthTexture`:`cubeTexture`}getDefaultUV(){let e=this.value;return e.mapping===301?kh:e.mapping===302?Ah:(E(`CubeTextureNode: Mapping "%s" not supported.`,e.mapping),W(0,0,0))}setUpdateMatrix(){}setupUV(e,t){let n=this.value;return n.isDepthTexture===!0?e.renderer.coordinateSystem===2001?W(t.x,t.y.negate(),t.z):t:(t=Eh.mul(t),(e.renderer.coordinateSystem===2001||!n.isRenderTargetTexture)&&(t=W(t.x.negate(),t.yz)),t)}generateUV(e,t){return t.build(e,this.sampler===!0?`vec3`:`ivec3`)}}).setParameterLength(1,4).setName(`cubeTexture`),Nh=(e=jh,t=null,n=null,r=null)=>{let i;return e&&e.isCubeTextureNode===!0?(i=F(e.clone()),i.referenceNode=e,t!==null&&(i.uvNode=F(t)),n!==null&&(i.levelNode=F(n)),r!==null&&(i.biasNode=F(r))):i=Mh(e,t,n,r),i},Ph=(e=jh)=>Mh(e),Fh=class extends ac{static get type(){return`ReferenceElementNode`}constructor(e,t){super(e,t),this.referenceNode=e,this.isReferenceElementNode=!0}generateNodeType(){return this.referenceNode.uniformType}generate(e){let t=super.generate(e),n=this.referenceNode.getNodeType(e),r=this.getNodeType(e);return e.format(t,n,r)}},Ih=class extends N{static get type(){return`ReferenceNode`}constructor(e,t,n=null,r=null){super(),this.property=e,this.uniformType=t,this.object=n,this.count=r,this.properties=e.split(`.`),this.reference=n,this.node=null,this.group=null,this.name=null,this.updateType=M.OBJECT}element(e){return new Fh(this,F(e))}setGroup(e){return this.group=e,this}setName(e){return this.name=e,this}label(e){return T(`TSL: "label()" has been deprecated. Use "setName()" instead.`),this.setName(e)}setNodeType(e){let t=null;this.count===null?Array.isArray(this.getValueFromReference())?(t=qp(null,e),t.updateType=M.OBJECT):t=e===`texture`?Lp(null):e===`cubeTexture`?Nh(null):q(null,e):t=Wp(null,e,this.count),this.group!==null&&t.setGroup(this.group),this.name!==null&&t.setName(this.name),this.node=t}generateNodeType(e){return this.node===null&&(this.updateReference(e),this.updateValue()),this.node.getNodeType(e)}getValueFromReference(e=this.reference){let{properties:t}=this,n=e[t[0]];for(let e=1;enew Ih(e,t,n),Rh=(e,t,n,r)=>new Ih(e,t,r,n),zh=class extends Ih{static get type(){return`MaterialReferenceNode`}constructor(e,t,n=null){super(e,t,n),this.material=n,this.isMaterialReferenceNode=!0}updateReference(e){return this.reference=this.material===null?e.material:this.material,this.reference}},Bh=(e,t,n=null)=>new zh(e,t,n),Vh=Ap(),Hh=ih.dFdx(),Uh=ih.dFdy(),Wh=Vh.dFdx(),Gh=Vh.dFdy(),Kh=hh,qh=Uh.cross(Kh),Jh=Kh.cross(Hh),Yh=qh.mul(Wh.x).add(Jh.mul(Gh.x)),Xh=qh.mul(Wh.y).add(Jh.mul(Gh.y)),Zh=Yh.dot(Yh).max(Xh.dot(Xh)),Qh=Zh.equal(0).select(0,Zh.inverseSqrt()),$h=Yh.mul(Qh).toVar(`tangentViewFrame`),eg=Xh.mul(Qh).toVar(`bitangentViewFrame`),tg=kp(`tangent`,`vec4`),ng=tg.xyz.toVar(`tangentLocal`),rg=R(e=>{let t;return t=e.subBuildFn===`VERTEX`||e.geometry.hasAttribute(`tangent`)?Jm.mul(G(ng,0)).xyz.toVarying(`v_tangentView`).normalize():$h,e.isFlatShading()!==!0&&(t=ch(t)),t},`vec3`).once([`NORMAL`,`VERTEX`])().toVar(`tangentView`),ig=rg.transformDirection(Dm).toVarying(`v_tangentWorld`).normalize().toVar(`tangentWorld`),ag=R(([e,t],n)=>{let r=e.mul(tg.w).xyz;return n.subBuildFn===`NORMAL`&&n.isFlatShading()!==!0&&(r=r.toVarying(t)),r}).once([`NORMAL`]),og=ag(uh.cross(tg),`v_bitangentGeometry`).normalize().toVar(`bitangentGeometry`),sg=ag(dh.cross(ng),`v_bitangentLocal`).normalize().toVar(`bitangentLocal`),cg=R(e=>{let t;return t=e.subBuildFn===`VERTEX`||e.geometry.hasAttribute(`tangent`)?ag(hh.cross(rg),`v_bitangentView`).normalize():eg,e.isFlatShading()!==!0&&(t=ch(t)),t},`vec3`).once([`NORMAL`,`VERTEX`])().toVar(`bitangentView`),lg=ag(gh.cross(ig),`v_bitangentWorld`).normalize().toVar(`bitangentWorld`),ug=bl(rg,cg,hh).toVar(`TBNViewMatrix`),dg=ah.mul(ug),fg=(e,t)=>e.sub(dg.mul(t)),pg=R(()=>{let e=Wl.cross(ah);return e=e.cross(Wl).normalize(),e=Qd(e,hh,Hl.mul(Ml.oneMinus()).oneMinus().pow2().pow2()).normalize(),e}).once()(),mg=e=>F(e).mul(.5).add(.5),hg=e=>F(e).mul(2).sub(1),gg=e=>W(e,rd(ef(B(1).sub(Vd(e,e))))),_g=e=>(Tt(`TSL: "directionToColor()" has been renamed to "packNormalToRGB()".`),mg(e)),vg=e=>(Tt(`TSL: "colorToDirection()" has been renamed to "unpackRGBToNormal()".`),hg(e)),yg=el(class extends sc{static get type(){return`NormalMapNode`}constructor(e,t=null){super(`vec3`),this.node=e,this.scaleNode=t,this.normalMapType=0,this.unpackNormalMode=``}setup(e){let{normalMapType:t,scaleNode:n,unpackNormalMode:r}=this,i=this.node.mul(2).sub(1);if(t===0?r===`rg`?i=gg(i.xy):r===`ga`?i=gg(i.yw):r!==``&&E(`THREE.NodeMaterial: Unexpected unpack normal mode: ${r}`):r!==``&&E(`THREE.NodeMaterial: Normal map type '${t}' is not compatible with unpack normal mode '${r}'`),n!==null){let t=n;e.isFlatShading()===!0&&(t=ch(t)),i=W(i.xy.mul(t),i.z)}let a=null;return t===1?a=yh(i):t===0?a=ug.mul(i).normalize():(E(`NodeMaterial: Unsupported normal map type: ${t}`),a=hh),a}}).setParameterLength(1,2),bg=R(({textureNode:e,bumpScale:t})=>{let n=t=>e.isolate().context({getUV:e=>t(e.uvNode||Ap()),forceUVContext:!0}),r=B(n(e=>e));return U(B(n(e=>e.add(e.dFdx()))).sub(r),B(n(e=>e.add(e.dFdy()))).sub(r)).mul(t)}),xg=R(e=>{let{surf_pos:t,surf_norm:n,dHdxy:r}=e,i=t.dFdx().normalize(),a=t.dFdy().normalize(),o=n,s=a.cross(o),c=o.cross(i),l=i.dot(s).mul(sh),u=l.sign().mul(r.x.mul(s).add(r.y.mul(c)));return l.abs().mul(n).sub(u).normalize()}),Sg=el(class extends sc{static get type(){return`BumpMapNode`}constructor(e,t=null){super(`vec3`),this.textureNode=e,this.scaleNode=t}setup(e){if(e.material.wireframe===!0)return hh;let t=this.scaleNode===null?1:this.scaleNode;return xg({surf_pos:ih,surf_norm:hh,dHdxy:bg({textureNode:this.textureNode,bumpScale:t})})}}).setParameterLength(1,2),Cg=new Map,X=class e extends N{static get type(){return`MaterialNode`}constructor(e){super(),this.scope=e}getCache(e,t){let n=Cg.get(e);return n===void 0&&(n=Bh(e,t),Cg.set(e,n)),n}getFloat(e){return this.getCache(e,`float`)}getColor(e){return this.getCache(e,`color`)}getTexture(e){return this.getCache(e===`map`?`map`:e+`Map`,`texture`)}setup(t){let n=t.context.material,r=this.scope,i=null;if(r===e.COLOR){let e=n.color===void 0?W():this.getColor(r);i=n.map&&n.map.isTexture===!0?e.mul(this.getTexture(`map`)):e}else if(r===e.OPACITY){let e=this.getFloat(r);i=n.alphaMap&&n.alphaMap.isTexture===!0?e.mul(this.getTexture(`alpha`)):e}else if(r===e.SPECULAR_STRENGTH)i=n.specularMap&&n.specularMap.isTexture===!0?this.getTexture(`specular`).r:B(1);else if(r===e.SPECULAR_INTENSITY){let e=this.getFloat(r);i=n.specularIntensityMap&&n.specularIntensityMap.isTexture===!0?e.mul(this.getTexture(r).a):e}else if(r===e.SPECULAR_COLOR){let e=this.getColor(r);i=n.specularColorMap&&n.specularColorMap.isTexture===!0?e.mul(this.getTexture(r).rgb):e}else if(r===e.ROUGHNESS){let e=this.getFloat(r);i=n.roughnessMap&&n.roughnessMap.isTexture===!0?e.mul(this.getTexture(r).g):e}else if(r===e.METALNESS){let e=this.getFloat(r);i=n.metalnessMap&&n.metalnessMap.isTexture===!0?e.mul(this.getTexture(r).b):e}else if(r===e.EMISSIVE){let e=this.getFloat(`emissiveIntensity`),t=this.getColor(r).mul(e);i=n.emissiveMap&&n.emissiveMap.isTexture===!0?t.mul(this.getTexture(r)):t}else if(r===e.NORMAL)n.normalMap?(i=yg(this.getTexture(`normal`),this.getCache(`normalScale`,`vec2`)),i.normalMapType=n.normalMapType,(n.normalMap.format==1030||n.normalMap.format==36285||n.normalMap.format==37490)&&(i.unpackNormalMode=`rg`)):i=n.bumpMap?Sg(this.getTexture(`bump`).r,this.getFloat(`bumpScale`)):hh;else if(r===e.CLEARCOAT){let e=this.getFloat(r);i=n.clearcoatMap&&n.clearcoatMap.isTexture===!0?e.mul(this.getTexture(r).r):e}else if(r===e.CLEARCOAT_ROUGHNESS){let e=this.getFloat(r);i=n.clearcoatRoughnessMap&&n.clearcoatRoughnessMap.isTexture===!0?e.mul(this.getTexture(r).r):e}else if(r===e.CLEARCOAT_NORMAL)i=n.clearcoatNormalMap?yg(this.getTexture(r),this.getCache(r+`Scale`,`vec2`)):hh;else if(r===e.SHEEN){let e=this.getColor(`sheenColor`).mul(this.getFloat(`sheen`));i=n.sheenColorMap&&n.sheenColorMap.isTexture===!0?e.mul(this.getTexture(`sheenColor`).rgb):e}else if(r===e.SHEEN_ROUGHNESS){let e=this.getFloat(r);i=n.sheenRoughnessMap&&n.sheenRoughnessMap.isTexture===!0?e.mul(this.getTexture(r).a):e,i=i.clamp(1e-4,1)}else if(r===e.ANISOTROPY)if(n.anisotropyMap&&n.anisotropyMap.isTexture===!0){let e=this.getTexture(r);i=yl(s_.x,s_.y,s_.y.negate(),s_.x).mul(e.rg.mul(2).sub(U(1)).normalize().mul(e.b))}else i=s_;else if(r===e.IRIDESCENCE_THICKNESS){let e=Lh(`1`,`float`,n.iridescenceThicknessRange);if(n.iridescenceThicknessMap){let t=Lh(`0`,`float`,n.iridescenceThicknessRange);i=e.sub(t).mul(this.getTexture(r).g).add(t)}else i=e}else if(r===e.TRANSMISSION){let e=this.getFloat(r);i=n.transmissionMap?e.mul(this.getTexture(r).r):e}else if(r===e.THICKNESS){let e=this.getFloat(r);i=n.thicknessMap?e.mul(this.getTexture(r).g):e}else if(r===e.IOR)i=this.getFloat(r);else if(r===e.LIGHT_MAP)i=n.lightMap?this.getTexture(r).rgb.mul(this.getFloat(`lightMapIntensity`)):W(0);else if(r===e.AO)i=n.aoMap?this.getTexture(r).r.sub(1).mul(this.getFloat(`aoMapIntensity`)).add(1):B(1);else if(r===e.LINE_DASH_OFFSET)i=n.dashOffset?this.getFloat(r):B(0);else{let e=this.getNodeType(t);i=this.getCache(r,e)}return i}};X.ALPHA_TEST=`alphaTest`,X.COLOR=`color`,X.OPACITY=`opacity`,X.SHININESS=`shininess`,X.SPECULAR=`specular`,X.SPECULAR_STRENGTH=`specularStrength`,X.SPECULAR_INTENSITY=`specularIntensity`,X.SPECULAR_COLOR=`specularColor`,X.REFLECTIVITY=`reflectivity`,X.ROUGHNESS=`roughness`,X.METALNESS=`metalness`,X.NORMAL=`normal`,X.CLEARCOAT=`clearcoat`,X.CLEARCOAT_ROUGHNESS=`clearcoatRoughness`,X.CLEARCOAT_NORMAL=`clearcoatNormal`,X.EMISSIVE=`emissive`,X.ROTATION=`rotation`,X.SHEEN=`sheen`,X.SHEEN_ROUGHNESS=`sheenRoughness`,X.ANISOTROPY=`anisotropy`,X.IRIDESCENCE=`iridescence`,X.IRIDESCENCE_IOR=`iridescenceIOR`,X.IRIDESCENCE_THICKNESS=`iridescenceThickness`,X.IOR=`ior`,X.TRANSMISSION=`transmission`,X.THICKNESS=`thickness`,X.ATTENUATION_DISTANCE=`attenuationDistance`,X.ATTENUATION_COLOR=`attenuationColor`,X.LINE_SCALE=`scale`,X.LINE_DASH_SIZE=`dashSize`,X.LINE_GAP_SIZE=`gapSize`,X.LINE_WIDTH=`linewidth`,X.LINE_DASH_OFFSET=`dashOffset`,X.POINT_SIZE=`size`,X.DISPERSION=`dispersion`,X.LIGHT_MAP=`light`,X.AO=`ao`;var wg=I(X,X.ALPHA_TEST),Tg=I(X,X.COLOR),Eg=I(X,X.SHININESS),Dg=I(X,X.EMISSIVE),Og=I(X,X.OPACITY),kg=I(X,X.SPECULAR),Ag=I(X,X.SPECULAR_INTENSITY),jg=I(X,X.SPECULAR_COLOR),Mg=I(X,X.SPECULAR_STRENGTH),Ng=I(X,X.REFLECTIVITY),Pg=I(X,X.ROUGHNESS),Fg=I(X,X.METALNESS),Ig=I(X,X.NORMAL),Lg=I(X,X.CLEARCOAT),Rg=I(X,X.CLEARCOAT_ROUGHNESS),zg=I(X,X.CLEARCOAT_NORMAL),Bg=I(X,X.ROTATION),Vg=I(X,X.SHEEN),Hg=I(X,X.SHEEN_ROUGHNESS),Ug=I(X,X.ANISOTROPY),Wg=I(X,X.IRIDESCENCE),Gg=I(X,X.IRIDESCENCE_IOR),Kg=I(X,X.IRIDESCENCE_THICKNESS),qg=I(X,X.TRANSMISSION),Jg=I(X,X.THICKNESS),Yg=I(X,X.IOR),Xg=I(X,X.ATTENUATION_DISTANCE),Zg=I(X,X.ATTENUATION_COLOR),Qg=I(X,X.LINE_SCALE),$g=I(X,X.LINE_DASH_SIZE),e_=I(X,X.LINE_GAP_SIZE),t_=I(X,X.LINE_WIDTH),n_=I(X,X.LINE_DASH_OFFSET),r_=I(X,X.POINT_SIZE),i_=I(X,X.DISPERSION),a_=I(X,X.LIGHT_MAP),o_=I(X,X.AO),s_=q(new O).onReference(function(e){return e.material}).onRenderUpdate(function({material:e}){this.value.set(e.anisotropy*Math.cos(e.anisotropyRotation),e.anisotropy*Math.sin(e.anisotropyRotation))}),c_=R(e=>e.context.setupModelViewProjection(),`vec4`).once()().toVarying(`v_modelViewProjection`),l_=class e extends N{static get type(){return`EventNode`}constructor(t,n){super(`void`),this.eventType=t,this.callback=n,t===e.OBJECT?this.updateType=M.OBJECT:t===e.MATERIAL?this.updateType=M.RENDER:t===e.FRAME?this.updateType=M.FRAME:t===e.BEFORE_OBJECT?this.updateBeforeType=M.OBJECT:t===e.BEFORE_MATERIAL?this.updateBeforeType=M.RENDER:t===e.BEFORE_FRAME&&(this.updateBeforeType=M.FRAME)}update(e){this.callback(e)}updateBefore(e){this.callback(e)}};l_.OBJECT=`object`,l_.MATERIAL=`material`,l_.FRAME=`frame`,l_.BEFORE_OBJECT=`beforeObject`,l_.BEFORE_MATERIAL=`beforeMaterial`,l_.BEFORE_FRAME=`beforeFrame`;var u_=(e,t)=>new l_(e,t).toStack(),d_=e=>u_(l_.OBJECT,e),f_=e=>u_(l_.MATERIAL,e),p_=e=>u_(l_.FRAME,e),m_=e=>u_(l_.BEFORE_OBJECT,e),h_=e=>u_(l_.BEFORE_MATERIAL,e),g_=e=>u_(l_.BEFORE_FRAME,e),__=el(class extends ac{static get type(){return`StorageArrayElementNode`}constructor(e,t){super(e,t),this.isStorageArrayElementNode=!0}set storageBufferNode(e){this.node=e}get storageBufferNode(){return this.node}getMemberType(e,t){let n=this.storageBufferNode.structTypeNode;return n?n.getMemberType(e,t):`void`}setup(e){return e.isAvailable(`storageBuffer`)===!1&&this.node.isPBO===!0&&e.setupPBO(this.node),super.setup(e)}generate(e,t){let n,r=e.isContextAssign();if(n=e.isAvailable(`storageBuffer`)===!1?this.node.isPBO===!0&&r!==!0&&(this.node.value.isInstancedBufferAttribute||e.shaderStage!==`compute`)?e.generatePBO(this):this.node.build(e):super.generate(e),r!==!0){let r=this.getNodeType(e);n=e.format(n,r,t)}return n}}).setParameterLength(2),v_=class extends Up{static get type(){return`StorageBufferNode`}constructor(e,t=null,n=0){let r,i=null;t&&t.isStructTypeNode?(r=`struct`,i=t,(e.isStorageBufferAttribute||e.isStorageInstancedBufferAttribute)&&(n=e.count)):t===null&&(e.isStorageBufferAttribute||e.isStorageInstancedBufferAttribute)?(r=Bs(e.itemSize),n=e.count):r=t,super(e,r,n),this.isStorageBufferNode=!0,this.structTypeNode=i,this.access=Qs.READ_WRITE,this.isAtomic=!1,this.isPBO=!1,this._attribute=null,this._varying=null,this.global=!0,e.isStorageBufferAttribute!==!0&&e.isStorageInstancedBufferAttribute!==!0&&(e.isInstancedBufferAttribute?e.isStorageInstancedBufferAttribute=!0:e.isStorageBufferAttribute=!0)}getHash(e){let t;if(this.bufferCount===0){let n=e.globalCache.getData(this.value);n===void 0&&(n={node:this},e.globalCache.setData(this.value,n)),t=n.node.id}else t=this.id;return String(t)}getInputType(){return this.value.isIndirectStorageBufferAttribute?`indirectStorageBuffer`:`storageBuffer`}element(e){return __(this,e)}setPBO(e){return this.isPBO=e,this}getPBO(){return this.isPBO}setAccess(e){return this.access=e,this}toReadOnly(){return this.setAccess(Qs.READ_ONLY)}setAtomic(e){return this.isAtomic=e,this}toAtomic(){return this.setAtomic(!0)}getAttributeData(){return this._attribute===null&&(this._attribute=Jf(this.value),this._varying=Ef(this._attribute)),{attribute:this._attribute,varying:this._varying}}generateNodeType(e){if(this.structTypeNode!==null)return this.structTypeNode.getNodeType(e);if(e.isAvailable(`storageBuffer`)||e.isAvailable(`indirectStorageBuffer`))return super.generateNodeType(e);let{attribute:t}=this.getAttributeData();return t.getNodeType(e)}getMemberType(e,t){return this.structTypeNode===null?`void`:this.structTypeNode.getMemberType(e,t)}generate(e){if(this.structTypeNode!==null&&this.structTypeNode.build(e),e.isAvailable(`storageBuffer`)||e.isAvailable(`indirectStorageBuffer`))return super.generate(e);let{attribute:t,varying:n}=this.getAttributeData(),r=n.build(e);return e.registerTransform(r,t),r}},y_=(e,t=null,n=0)=>new v_(e,t,n),b_=new WeakMap,x_=new WeakMap,S_=new WeakMap;function C_(e,t){let n,r=Math.max(t.count,1);if(t.isStorageInstancedBufferAttribute===!0)n=y_(t,`mat4`,r).element(ep);else if(r*16*4<=e.getUniformBufferLimit())n=Wp(t.array,`mat4`,r).element(ep);else{let e=b_.get(t);e||(e=new jo(t.array,16,1),b_.set(t,e));let r=t.usage===35048?Zf:Xf;n=xl(r(e,`vec4`,16,0),r(e,`vec4`,16,4),r(e,`vec4`,16,8),r(e,`vec4`,16,12))}return n}function w_(e,t,n){let r=S_.get(e);if(r===void 0){let i=t.clone();r={previousInstanceMatrix:i,node:C_(n,i)},S_.set(e,r)}return r.node}var T_=Ol(`vec3`,`vInstanceColor`),E_=R(([e,t=null],n)=>{let r=e.isStorageInstancedBufferAttribute===!0,i=t&&t.isStorageInstancedBufferAttribute===!0,a=C_(n,e),o=null;r||Math.max(e.count,1)*16*4>n.getUniformBufferLimit()&&(o=b_.get(e));let s=null,c=null;if(t)if(i)s=y_(t,`vec3`,Math.max(t.count,1)).element(ep);else{let e=x_.get(t);e||(e=new Fi(t.array,3),x_.set(t,e)),c=e,s=W((t.usage===35048?Zf:Xf)(e,`vec3`,3,0))}(o!==null||c!==null)&&p_(()=>{o!==null&&(o.clearUpdateRanges(),o.updateRanges.push(...e.updateRanges),e.version!==o.version&&(o.version=e.version)),t&&c!==null&&(c.clearUpdateRanges(),c.updateRanges.push(...t.updateRanges),t.version!==c.version&&(c.version=t.version))});let l=a.mul(eh).xyz;if(eh.assign(l),n.needsPreviousData()){let t=n.object;d_(({object:t})=>{S_.get(t).previousInstanceMatrix.array.set(e.array)});let r=w_(t,e,n);th.assign(r.mul(th).xyz)}if(n.hasGeometryAttribute(`normal`)){let e=vh(dh,a);dh.assign(e)}s!==null&&T_.assign(s)},`void`),D_=R(([e])=>{let{instanceMatrix:t,instanceColor:n}=e;E_(t,n)},`void`),O_=R(([e,t])=>{let n=V(jp(zp(e),0).x).toConst(),r=V(t);return zp(e,ul(r.mod(n).toConst(),r.div(n).toConst()))}),k_=R(([e,t])=>{let n=V(jp(zp(e),0).x).toConst();return zp(e,ul(V(t).mod(n).toConst(),V(t).div(n).toConst())).x}),A_=Ol(`vec4`,`vBatchColor`),j_=R(([e],t)=>{let n=t.getDrawIndex()===null?ep:ip,r=k_(e._indirectTexture,V(n)),i=e._matricesTexture,a=V(jp(zp(i),0).x).toConst(),o=B(r).mul(4).toInt().toConst(),s=o.mod(a).toConst(),c=o.div(a).toConst(),l=xl(zp(i,ul(s,c)),zp(i,ul(s.add(1),c)),zp(i,ul(s.add(2),c)),zp(i,ul(s.add(3),c))),u=e._colorsTexture;if(u!==null){let e=O_(u,r);A_.assign(e)}let d=bl(l);eh.assign(l.mul(eh));let f=dh.div(W(d[0].dot(d[0]),d[1].dot(d[1]),d[2].dot(d[2]))),p=d.mul(f).xyz;dh.assign(p),t.hasGeometryAttribute(`tangent`)&&ng.mulAssign(d)},`void`),M_=new WeakMap,N_=new WeakMap;function P_(e,t,n,r,i,a){let o=e.element(i.x),s=e.element(i.y),c=e.element(i.z),l=e.element(i.w),u=n.mul(t),d=yu(o.mul(a.x).mul(u),s.mul(a.y).mul(u),c.mul(a.z).mul(u),l.mul(a.w).mul(u));return r.mul(d).xyz}function F_(e,t,n,r,i,a,o){let s=e.element(a.x),c=e.element(a.y),l=e.element(a.z),u=e.element(a.w),d=yu(o.x.mul(s),o.y.mul(c),o.z.mul(l),o.w.mul(u));return d=i.mul(d).mul(r),{skinNormal:d.transformDirection(t).xyz,skinTangent:d.transformDirection(n).xyz}}function I_(e,t,n,r,i){let a=e.skeleton,o=N_.get(a);if(o===void 0){a.update();let e=new Float32Array(a.boneMatrices);o={previousBoneMatrices:e,node:Wp(e,`mat4`,a.bones.length)},N_.set(a,o)}return P_(o.node,th,t,n,r,i)}var L_=R(([e],t)=>{let n=kp(`skinIndex`,`uvec4`),r=kp(`skinWeight`,`vec4`),i=Lh(`bindMatrix`,`mat4`),a=Lh(`bindMatrixInverse`,`mat4`),o=Rh(`skeleton.boneMatrices`,`mat4`,e.skeleton.bones.length);if(d_(({object:e,frameId:t})=>{let n=e.skeleton;if(M_.get(n)!==t){M_.set(n,t);let e=N_.get(n);e!==void 0&&e.previousBoneMatrices.set(n.boneMatrices),n.update()}}),t.needsPreviousData()){let t=I_(e,i,a,n,r);th.assign(t)}let s=P_(o,eh,i,a,n,r);if(eh.assign(s),t.hasGeometryAttribute(`normal`)){let{skinNormal:e,skinTangent:s}=F_(o,dh,ng,i,a,n,r);dh.assign(e),t.hasGeometryAttribute(`tangent`)&&ng.assign(s)}},`void`),R_=R(([e,t=null],n)=>{let r=y_(new Fi(e.geometry.getAttribute(`position`).array,3),`vec3`).setPBO(!0).toReadOnly().element(ep).toVar(),i=y_(new Fi(new Uint32Array(e.geometry.getAttribute(`skinIndex`).array),4),`uvec4`).setPBO(!0).toReadOnly().element(ep).toVar(),a=y_(new Fi(e.geometry.getAttribute(`skinWeight`).array,4),`vec4`).setPBO(!0).toReadOnly().element(ep).toVar(),o=q(e.bindMatrix,`mat4`),s=q(e.bindMatrixInverse,`mat4`),c=Wp(e.skeleton.boneMatrices,`mat4`,e.skeleton.bones.length),l=e.skeleton;if(d_(({frameId:e})=>{if(M_.get(l)!==e){M_.set(l,e);let t=N_.get(l);t!==void 0&&t.previousBoneMatrices.set(l.boneMatrices),l.update()}}),n.needsPreviousData()){let t=I_(e,o,s,i,a);th.assign(t)}let u=P_(c,r,o,s,i,a);if(t!==null&&t.assign(u),n.hasGeometryAttribute(`normal`)){let{skinNormal:e,skinTangent:t}=F_(c,dh,ng,o,s,i,a);dh.assign(e),n.hasGeometryAttribute(`tangent`)&&ng.assign(t)}return u}),z_=class extends N{static get type(){return`LoopNode`}constructor(e=[]){super(`void`),this.params=e}getVarName(e){return String.fromCharCode(105+e)}getProperties(e){let t=e.getNodeProperties(this);if(t.stackNode!==void 0)return t;let n={};for(let e=0,t=this.params.length-1;e=`):s!==void 0&&o===void 0&&(o=`0`,u=`<`),u===void 0&&(u=Number(o)>Number(s)?`>=`:`<`));let f;if(a)f=`while ( ${s} )`;else{let n={start:o,end:s},r=n.start,i=n.end,a,p=()=>u.includes(`<`)?`+=`:`-=`;if(d!=null)switch(typeof d){case`function`:a=e.flowStagesNode(t.updateNode,`void`).code.replace(/\t|;/g,``);break;case`number`:a=c+` `+p()+` `+e.generateConst(l,d);break;case`string`:a=c+` `+d;break;default:d.isNode?a=c+` `+p()+` `+d.build(e):(E(`TSL: 'Loop( { update: ... } )' is not a function, string or number.`,this.stackTrace),a=`break /* invalid update */`)}else d=l===`int`||l===`uint`?u.includes(`<`)?`++`:`--`:p()+` 1.`,a=c+` `+d;f=`for ( ${e.getVar(l,c)+` = `+r}; ${c+` `+u+` `+i}; ${a} )`}e.addFlowCode((r===0?` -`:``)+e.tab+f+` { - -`).addFlowTab()}let i=r.build(e,`void`);t.returnsNode.build(e,`void`),e.removeFlowTab().addFlowCode(` -`+e.tab+i);for(let t=0,n=this.params.length-1;tnew z_($c(e,`int`)).toStack(),V_=()=>hp(`continue`).toStack(),H_=()=>hp(`break`).toStack(),U_=new WeakMap,W_=new xn,G_=new WeakMap,K_=R(({bufferMap:e,influence:t,stride:n,width:r,depth:i,offset:a})=>{let o=V($f).mul(n).add(a),s=o.div(r);return zp(e,ul(o.sub(s.mul(r)),s)).depth(i).xyz.mul(t)});function q_(e){let t=e.morphAttributes.position!==void 0,n=e.morphAttributes.normal!==void 0,r=e.morphAttributes.color!==void 0,i=e.morphAttributes.position||e.morphAttributes.normal||e.morphAttributes.color,a=i===void 0?0:i.length,o=U_.get(e);if(o===void 0||o.count!==a){o!==void 0&&o.texture.dispose();let i=e.morphAttributes.position||[],s=e.morphAttributes.normal||[],c=e.morphAttributes.color||[],l=0;t===!0&&(l=1),n===!0&&(l=2),r===!0&&(l=3);let u=e.attributes.position.count*l,d=1,f=4096;u>f&&(d=Math.ceil(u/f),u=f);let p=new Float32Array(u*d*4*a),m=new Cn(p,u,d,a);m.type=y,m.needsUpdate=!0;let h=l*4;for(let e=0;e{let{geometry:t}=e,n=t.morphAttributes.position!==void 0,r=t.hasAttribute(`normal`)&&t.morphAttributes.normal!==void 0,i=t.morphAttributes.position||t.morphAttributes.normal||t.morphAttributes.color,a=i===void 0?0:i.length;if(a===0)return;let o=G_.get(e);(o===void 0||o.count!==a)&&(o={base:q(1),influences:e.morphTargetInfluences?qp(e.morphTargetInfluences,`float`):null,count:a},G_.set(e,o));let{base:s,influences:c}=o,{texture:l,stride:u,size:d}=q_(t);n===!0&&eh.mulAssign(s),r===!0&&dh.mulAssign(s);let f=V(d.width);B_(a,({i:t})=>{let i=B(0).toVar();e.count>1&&e.morphTexture!==null&&e.morphTexture!==void 0?i.assign(zp(e.morphTexture,ul(V(t).add(1),V(ep))).r):i.assign(c.element(t).toVar()),z(i.notEqual(0),()=>{n===!0&&eh.addAssign(K_({bufferMap:l,influence:i,stride:u,width:f,depth:t,offset:V(0)})),r===!0&&dh.addAssign(K_({bufferMap:l,influence:i,stride:u,width:f,depth:t,offset:V(1)}))})}),d_(({object:e})=>{let{base:t,influences:n}=o;e.geometry.morphTargetsRelative?t.value=1:t.value=1-e.morphTargetInfluences.reduce((e,t)=>e+t,0),n&&(n.array=e.morphTargetInfluences,n.update())})},`void`),Y_=class extends N{static get type(){return`LightingNode`}constructor(){super(`vec3`),this.isLightingNode=!0}},X_=class extends Y_{static get type(){return`AONode`}constructor(e=null){super(),this.aoNode=e}setup(e){e.context.ambientOcclusion.mulAssign(this.aoNode)}},Z_=el(class extends ff{static get type(){return`LightingContextNode`}constructor(e,t=null,n=[],r=null,i=null){super(e),this.lightingModel=t,this.materialLightings=n,this.backdropNode=r,this.backdropAlphaNode=i,this._value=null}getContext(){let{materialLightings:e,backdropNode:t,backdropAlphaNode:n}=this,r={directDiffuse:W().toVar(`directDiffuse`),directSpecular:W().toVar(`directSpecular`),indirectDiffuse:W().toVar(`indirectDiffuse`),indirectSpecular:W().toVar(`indirectSpecular`)};return{radiance:W().toVar(`radiance`),irradiance:W().toVar(`irradiance`),iblIrradiance:W().toVar(`iblIrradiance`),ambientOcclusion:B(1).toVar(`ambientOcclusion`),reflectedLight:r,materialLightings:e,backdrop:t,backdropAlpha:n}}setup(e){return this.value=this._value||=this.getContext(),this.value.lightingModel=this.lightingModel||e.context.lightingModel,super.setup(e)}}),Q_=class extends Y_{static get type(){return`IrradianceNode`}constructor(e){super(),this.node=e}setup(e){e.context.irradiance.addAssign(this.node)}},$_=new O,ev=class extends Fp{static get type(){return`ViewportTextureNode`}constructor(e=$p,t=null,n=null){let r=null;n===null?(r=new na,r.minFilter=d,n=r):r=n,super(n,e,t),this.generateMipmaps=!1,this.defaultFramebuffer=r,this.isOutputTextureNode=!0,this.updateBeforeType=M.RENDER,this._cacheTextures=new WeakMap}getTextureForReference(e=null){let t,n;if(this.referenceNode?(t=this.referenceNode.defaultFramebuffer,n=this.referenceNode._cacheTextures):(t=this.defaultFramebuffer,n=this._cacheTextures),e===null)return t;if(n.has(e)===!1){let r=t.clone();n.set(e,r)}return n.get(e)}updateReference(e){let t=e.renderer,n=t.getRenderTarget(),r=t.getCanvasTarget(),i=n||r;return this.value=this.getTextureForReference(i),this.value}updateBefore(e){let t=e.renderer,n=t.getRenderTarget(),r=t.getCanvasTarget(),i=n||r;i===null?t.getDrawingBufferSize($_):i.getDrawingBufferSize?i.getDrawingBufferSize($_):$_.set(i.width,i.height);let a=this.getTextureForReference(i);(a.image.width!==$_.width||a.image.height!==$_.height)&&(a.image.width=$_.width,a.image.height=$_.height,a.needsUpdate=!0);let o=a.generateMipmaps;a.generateMipmaps=this.generateMipmaps,t.copyFramebufferToTexture(a),a.generateMipmaps=o}clone(){let e=new this.constructor(this.uvNode,this.levelNode,this.value);return e.generateMipmaps=this.generateMipmaps,e}},tv=el(ev).setParameterLength(0,3),nv=el(ev,null,null,{generateMipmaps:!0}).setParameterLength(0,3),rv=nv(),iv=(e=$p,t=null)=>rv.sample(e,t),av=null,ov=el(class extends ev{static get type(){return`ViewportDepthTextureNode`}constructor(e=$p,t=null,n=null){n===null&&(av===null&&(av=new ia),n=av),super(e,t,n)}}).setParameterLength(0,3),sv=class e extends N{static get type(){return`ViewportDepthNode`}constructor(e,t=null){super(`float`),this.scope=e,this.valueNode=t,this.isViewportDepthNode=!0}generate(t){let{scope:n}=this;return n===e.DEPTH_BASE?t.getFragDepth():super.generate(t)}setup({camera:t}){let{scope:n}=this,r=this.valueNode,i=null;return n===e.DEPTH_BASE?r!==null&&(i=gv().assign(r)):n===e.DEPTH?i=t.isPerspectiveCamera?dv(ih.z,Sm,Cm):cv(ih.z,Sm,Cm):n===e.LINEAR_DEPTH&&(i=r===null?cv(ih.z,Sm,Cm):t.isPerspectiveCamera?cv(pv(r,Sm,Cm),Sm,Cm):r),i}};sv.DEPTH_BASE=`depthBase`,sv.DEPTH=`depth`,sv.LINEAR_DEPTH=`linearDepth`;var cv=(e,t,n)=>e.add(t).div(t.sub(n)),lv=(e,t,n)=>e.add(n).div(n.sub(t)),uv=R(([e,t,n],r)=>r.renderer.reversedDepthBuffer===!0?n.sub(t).mul(e).sub(n):t.sub(n).mul(e).sub(t)),dv=(e,t,n)=>t.add(e).mul(n).div(n.sub(t).mul(e)),fv=(e,t,n)=>t.mul(e.add(n)).div(e.mul(t.sub(n))),pv=R(([e,t,n],r)=>r.renderer.reversedDepthBuffer===!0?t.mul(n).div(t.sub(n).mul(e).sub(t)):t.mul(n).div(n.sub(t).mul(e).sub(n))),mv=(e,t,n)=>{t=t.max(1e-6).toVar();let r=nd(e.negate().div(t)),i=nd(n.div(t));return r.div(i)},hv=(e,t,n)=>{let r=e.mul(td(n.div(t)));return B(Math.E).pow(r).mul(t).negate()},gv=el(sv,sv.DEPTH_BASE),_v=I(sv,sv.DEPTH),vv=el(sv,sv.LINEAR_DEPTH).setParameterLength(0,1),yv=vv(ov());_v.assign=e=>gv(e);var bv=class e extends N{static get type(){return`ClippingNode`}constructor(t=e.DEFAULT){super(),this.scope=t}setup(t){super.setup(t);let{intersectionPlanes:n,unionPlanes:r}=t.clippingContext;return this.hardwareClipping=t.hardwareClipping,this.scope===e.ALPHA_TO_COVERAGE?this.setupAlphaToCoverage(n,r):this.scope===e.HARDWARE?this.setupHardwareClipping(r,t):this.setupDefault(n,r)}setupAlphaToCoverage(e,t){return R(()=>{let n=B().toVar(`distanceToPlane`),r=B().toVar(`distanceToGradient`),i=B(1).toVar(`clipOpacity`),a=t.length;if(this.hardwareClipping===!1&&a>0){let e=qp(t).setGroup(K);B_(a,({i:t})=>{let a=e.element(t);n.assign(ih.dot(a.xyz).negate().add(a.w)),r.assign(n.fwidth().div(2)),i.mulAssign(nf(r.negate(),r,n))})}let o=e.length;if(o>0){let t=qp(e).setGroup(K),a=B(1).toVar(`intersectionClipOpacity`);B_(o,({i:e})=>{let i=t.element(e);n.assign(ih.dot(i.xyz).negate().add(i.w)),r.assign(n.fwidth().div(2)),a.mulAssign(nf(r.negate(),r,n).oneMinus())}),i.mulAssign(a.oneMinus())}kl.a.mulAssign(i),kl.a.equal(0).discard()})()}setupDefault(e,t){return R(()=>{let n=t.length;if(this.hardwareClipping===!1&&n>0){let e=qp(t).setGroup(K);B_(n,({i:t})=>{let n=e.element(t);ih.dot(n.xyz).greaterThan(n.w).discard()})}let r=e.length;if(r>0){let t=qp(e).setGroup(K),n=ll(!0).toVar(`clipped`);B_(r,({i:e})=>{let r=t.element(e);n.assign(ih.dot(r.xyz).greaterThan(r.w).and(n))}),n.discard()}})()}setupHardwareClipping(e,t){let n=e.length;return t.enableHardwareClipping(n),R(()=>{let r=qp(e).setGroup(K),i=Jp(t.getClipDistance());B_(n,({i:e})=>{let t=r.element(e),n=ih.dot(t.xyz).sub(t.w).negate();i.element(e).assign(n)})})()}};bv.ALPHA_TO_COVERAGE=`alphaToCoverage`,bv.DEFAULT=`default`,bv.HARDWARE=`hardware`;var xv=()=>new bv,Sv=()=>new bv(bv.ALPHA_TO_COVERAGE),Cv=()=>new bv(bv.HARDWARE),wv=.05,Tv=R(([e])=>cd(J(1e4,ld(J(17,e.x).add(J(.1,e.y)))).mul(yu(.1,xd(ld(J(13,e.y).add(e.x))))))),Ev=R(([e])=>Tv(U(Tv(e.xy),e.z))),Dv=R(([e])=>{let t=Id(Cd(Ed(e.xyz)),Cd(Dd(e.xyz))),n=B(1).div(B(wv).mul(t)).toVar(`pixScale`),r=U(ed(ad(nd(n))),ed(od(nd(n)))),i=U(Ev(ad(r.x.mul(e.xyz))),Ev(ad(r.y.mul(e.xyz)))),a=cd(nd(n)),o=yu(J(a.oneMinus(),i.x),J(a,i.y)),s=Fd(a,a.oneMinus()),c=W(o.mul(o).div(J(2,s).mul(bu(1,s))),o.sub(J(.5,s)).div(bu(1,s)),bu(1,bu(1,o).mul(bu(1,o)).div(J(2,s).mul(bu(1,s)))));return $d(o.lessThan(s.oneMinus()).select(o.lessThan(s).select(c.x,c.y),c.z),1e-6,1)}).setLayout({name:`getAlphaHashThreshold`,type:`float`,inputs:[{name:`position`,type:`vec3`}]}),Ov=class extends Op{static get type(){return`VertexColorNode`}constructor(e){super(null,`vec4`),this.isVertexColorNode=!0,this.index=e}getAttributeName(){let e=this.index;return`color`+(e>0?e:``)}generate(e){let t=this.getAttributeName(e),n=e.hasGeometryAttribute(t),r;return r=n===!0?super.generate(e):e.generateConst(this.nodeType,new xn(1,1,1,1)),r}serialize(e){super.serialize(e),e.index=this.index}deserialize(e){super.deserialize(e),this.index=e.index}},kv=(e=0)=>new Ov(e),Av=class extends li{static get type(){return`NodeMaterial`}get type(){return this.constructor.type}set type(e){}constructor(){super(),this.isNodeMaterial=!0,this.fog=!0,this.lights=!1,this.lightsNode=null,this.envNode=null,this.aoNode=null,this.colorNode=null,this.normalNode=null,this.opacityNode=null,this.backdropNode=null,this.backdropAlphaNode=null,this.alphaTestNode=null,this.maskNode=null,this.maskShadowNode=null,this.positionNode=null,this.geometryNode=null,this.depthNode=null,this.receivedShadowPositionNode=null,this.castShadowPositionNode=null,this.receivedShadowNode=null,this.castShadowNode=null,this.outputNode=null,this.mrtNode=null,this.fragmentNode=null,this.vertexNode=null,this.contextNode=null}_getNodeChildren(){let e=[];for(let t of Object.getOwnPropertyNames(this)){if(t.startsWith(`_`)===!0)continue;let n=this[t];n&&n.isNode===!0&&e.push({property:t,childNode:n})}return e}customProgramCacheKey(){let e=[];for(let{property:t,childNode:n}of this._getNodeChildren())e.push(Fs(t.slice(0,-4)),n.getCacheKey());return this.type+Is(e)}build(e){this.setup(e)}setupObserver(e){return new As(e)}setup(e){e.context.setupNormal=()=>Tf(this.setupNormal(e),`NORMAL`,`vec3`),e.context.setupPositionView=()=>this.setupPositionView(e),e.context.setupModelViewProjection=()=>this.setupModelViewProjection(e);let t=e.renderer,n=t.getRenderTarget();e.addStack();let r=this.setupVertex(e),i=Tf(this.vertexNode||r,`VERTEX`);e.context.clipSpace=i,e.stack.outputNode=i,this.setupHardwareClipping(e),this.geometryNode!==null&&(e.stack.outputNode=e.stack.outputNode.bypass(this.geometryNode)),e.addFlow(`vertex`,e.removeStack()),e.addStack();let a,o=this.setupClipping(e);if((this.depthWrite===!0||this.depthTest===!0)&&(n===null?t.depth===!0&&this.setupDepth(e):n.depthBuffer===!0&&this.setupDepth(e)),this.fragmentNode===null){this.setupDiffuseColor(e),this.setupAmbientOcclusion(e),this.setupVariants(e);let r=this.setupLighting(e);o!==null&&e.stack.addToStack(o);let i=G(r,kl.a).max(0);a=this.setupOutput(e,i),Yl.assign(a);let s=this.outputNode!==null;if(s&&(a=this.outputNode),e.context.getOutput&&(a=e.context.getOutput(a,e)),n!==null){let e=t.getMRT(),n=this.mrtNode;e===null?n!==null&&(a=n):(s&&Yl.assign(a),a=e,n!==null&&(a=e.merge(n)))}}else{let t=this.fragmentNode;t.isOutputStructNode!==!0&&(t=t.convert(e.getOutputType())),a=this.setupOutput(e,t)}e.stack.outputNode=a,e.addFlow(`fragment`,e.removeStack()),e.observer=this.setupObserver(e)}setupClipping(e){if(e.clippingContext===null)return null;let{unionPlanes:t,intersectionPlanes:n}=e.clippingContext,r=null;if(t.length>0||n.length>0){let t=e.renderer.currentSamples;this.alphaToCoverage&&t>1?r=Sv():e.stack.addToStack(xv())}return r}setupHardwareClipping(e){if(e.hardwareClipping=!1,e.clippingContext===null)return;let t=e.clippingContext.unionPlanes.length;t>0&&t<=8&&e.isAvailable(`clipDistance`)&&(e.stack.addToStack(Cv()),e.hardwareClipping=!0)}setupDepth(e){let{renderer:t,camera:n}=e,r=this.depthNode;if(r===null){let e=t.getMRT();e&&e.has(`depth`)?r=e.get(`depth`):t.logarithmicDepthBuffer===!0&&(r=n.isPerspectiveCamera?mv(ih.z,Sm,Cm):cv(ih.z,Sm,Cm))}r!==null&&_v.assign(r).toStack()}setupPositionView(){return Jm.mul(eh).xyz}setupModelViewProjection(){return wm.mul(ih)}setupVertex(e){return e.addStack(),this.setupPosition(e),e.context.position=e.removeStack(),c_}setupPosition(e){let{object:t,geometry:n}=e;if((n.morphAttributes.position||n.morphAttributes.normal||n.morphAttributes.color)&&J_(t),t.isSkinnedMesh===!0&&L_(t),this.displacementMap){let e=Bh(`displacementMap`,`texture`),t=Bh(`displacementScale`,`float`),n=Bh(`displacementBias`,`float`);eh.addAssign(dh.normalize().mul(e.x.mul(t).add(n)))}return t.isBatchedMesh&&j_(t),t.isInstancedMesh&&t.instanceMatrix&&t.instanceMatrix.isInstancedBufferAttribute===!0&&D_(t),this.positionNode!==null&&eh.assign(Tf(this.positionNode,`POSITION`,`vec3`)),eh}setupDiffuseColor(e){let{object:t,geometry:n}=e;this.maskNode!==null&&ll(this.maskNode).not().discard();let r=this.colorNode?G(this.colorNode):Tg;this.vertexColors===!0&&n.hasAttribute(`color`)&&(r=r.mul(kv())),t.instanceColor&&(r=T_.mul(r)),t.isBatchedMesh&&t._colorsTexture&&(r=A_.mul(r)),kl.assign(r);let i=this.opacityNode?B(this.opacityNode):Og;kl.a.assign(kl.a.mul(i));let a=null;(this.alphaTestNode!==null||this.alphaTest>0)&&(a=this.alphaTestNode===null?wg:B(this.alphaTestNode),this.alphaToCoverage===!0?(kl.a=nf(a,a.add(jd(kl.a)),kl.a),kl.a.lessThanEqual(0).discard()):kl.a.lessThanEqual(a).discard()),this.alphaHash===!0&&kl.a.lessThan(Dv(eh)).discard(),e.isOpaque()&&kl.a.assign(1)}setupVariants(){}setupOutgoingLight(){return this.lights===!0?W(0):kl.rgb}setupNormal(){return this.normalNode?W(this.normalNode):Ig}setupEnvironment(){let e=null;return this.envNode?e=this.envNode:this.envMap&&(e=this.envMap.isCubeTexture?Bh(`envMap`,`cubeTexture`):Bh(`envMap`,`texture`)),e}setupLightMap(e){let t=null;return e.material.lightMap&&(t=new Q_(a_)),t}setupMaterialLightings(e){let t=[];if(e.renderer.lighting.enabled===!1)return t;let n=this.setupEnvironment(e);n&&n.isLightingNode&&t.push(n);let r=this.setupLightMap(e);return r&&r.isLightingNode&&t.push(r),e.context.ambientOcclusion&&t.push(new X_(e.context.ambientOcclusion)),t}setupAmbientOcclusion(e){let t=this.aoNode;t===null&&e.material.aoMap&&(t=o_),e.context.getAO&&(t=e.context.getAO(t,e)),t!==null&&(au.assign(t),e.context.ambientOcclusion=au)}setupLightingModel(){}setupLighting(e){let{material:t}=e,{backdropNode:n,backdropAlphaNode:r,emissiveNode:i}=this,a=this.lights===!0||this.lightsNode!==null,o=this.lights===!0?this.setupMaterialLightings(e):[],s=a?this.lightsNode||e.lightsNode:null,c=this.setupOutgoingLight(e);return s&&(o.length>0||s.getScope().hasLights)?c=Z_(s,this.setupLightingModel(e)||null,o,n,r):n!==null&&(c=W(r===null?n:Qd(c,n,r))),(i&&i.isNode===!0||t.emissive&&t.emissive.isColor===!0)&&(jl.assign(W(i||Dg)),c=c.add(jl)),c}setupFog(e,t){let n=e.fogNode;return n&&(Yl.assign(t),t=G(n.toVar())),t}setupPremultipliedAlpha(e,t){return vp(t)}setupOutput(e,t){return this.fog===!0&&(t=this.setupFog(e,t)),this.premultipliedAlpha===!0&&(t=this.setupPremultipliedAlpha(e,t)),t}setDefaultValues(e){for(let t in e){let n=e[t];this[t]===void 0&&(this[t]=n,n&&n.clone&&(this[t]=n.clone()))}let t=Object.getOwnPropertyDescriptors(e.constructor.prototype);for(let e in t)Object.getOwnPropertyDescriptor(this.constructor.prototype,e)===void 0&&t[e].get!==void 0&&Object.defineProperty(this.constructor.prototype,e,t[e])}toJSON(e){let t=e===void 0||typeof e==`string`;t&&(e={textures:{},images:{},nodes:{}});let n=li.prototype.toJSON.call(this,e);n.inputNodes={};for(let{property:t,childNode:r}of this._getNodeChildren())n.inputNodes[t]=r.toJSON(e).uuid;function r(e){let t=[];for(let n in e){let r=e[n];delete r.metadata,t.push(r)}return t}if(t){let t=r(e.textures),i=r(e.images),a=r(e.nodes);t.length>0&&(n.textures=t),i.length>0&&(n.images=i),a.length>0&&(n.nodes=a)}return n}copy(e){let t=Object.getOwnPropertyDescriptors(this.constructor.prototype);for(let n in t)if(t[n].set!==void 0&&e[n]!==void 0){let t=e[n];this[n]&&this[n].copy!==void 0?this[n].copy(t):this[n]=t}for(let t in this)if(!/^(?:is[A-Z]|_)|^(?:id|uuid|version|type|userData|clippingPlanes)$/.test(t)&&this[t]!==void 0&&e[t]!==void 0){let n=e[t];this[t]&&this[t].copy!==void 0?this[t].copy(n):this[t]=n}return this.clippingPlanes=e.clippingPlanes?e.clippingPlanes.map(e=>e.clone()):null,this.userData=JSON.parse(JSON.stringify(e.userData)),this}},jv=new ea,Mv=class extends Av{static get type(){return`LineBasicNodeMaterial`}constructor(e){super(),this.isLineBasicNodeMaterial=!0,this.setDefaultValues(jv),this.setValues(e)}},Nv=new ba,Pv=class extends Av{static get type(){return`LineDashedNodeMaterial`}constructor(e){super(),this.isLineDashedNodeMaterial=!0,this.setDefaultValues(Nv),this.dashOffset=0,this.offsetNode=null,this.dashScaleNode=null,this.dashSizeNode=null,this.gapSizeNode=null,this.setValues(e)}setupVariants(){let e=this.offsetNode?B(this.offsetNode):n_,t=this.dashScaleNode?B(this.dashScaleNode):Qg,n=this.dashSizeNode?B(this.dashSizeNode):$g,r=this.gapSizeNode?B(this.gapSizeNode):e_;Xl.assign(n),Zl.assign(r);let i=Ef(kp(`lineDistance`).mul(t));(e?i.add(e):i).mod(Xl.add(Zl)).greaterThan(Xl).discard()}},Fv=new ba,Iv=Ol(`vec3`,`worldStart`),Lv=Ol(`vec3`,`worldEnd`),Rv=Ol(`float`,`lineDistance`),zv=Ol(`vec4`,`worldPos`),Bv=R(({start:e,end:t})=>{let n=wm.element(2).element(2),r=wm.element(3).element(2);return n.greaterThan(0).select(r.negate().div(n.add(1)),r.mul(-.5).div(n)).sub(e.z).div(t.z.sub(e.z))},{start:`vec4`,end:`vec4`,return:`float`}),Vv=R(({p1:e,p2:t,p3:n,p4:r})=>{let i=e.sub(n),a=r.sub(n),o=t.sub(e),s=i.dot(a),c=a.dot(o),l=i.dot(o),u=a.dot(a),d=o.dot(o).mul(u).sub(c.mul(c)),f=s.mul(c).sub(l.mul(u)).div(d).clamp();return U(f,s.add(c.mul(f)).div(u).clamp())},{p1:`vec3`,p2:`vec3`,p3:`vec3`,p4:`vec3`,return:`vec2`}),Hv=R(({material:e})=>{let t=e._useDash,n=e._useWorldUnits,r=kp(`instanceStart`),i=kp(`instanceEnd`),a=G(Jm.mul(G(r,1))).toVar(`start`),o=G(Jm.mul(G(i,1))).toVar(`end`),s,c;t&&(s=B(kp(`instanceDistanceStart`)).toVar(`distanceStart`),c=B(kp(`instanceDistanceEnd`)).toVar(`distanceEnd`)),n&&(Iv.assign(a.xyz),Lv.assign(o.xyz));let l=nm.z.div(nm.w);if(z(wm.element(2).element(3).equal(-1),()=>{z(a.z.lessThan(0).and(o.z.greaterThan(0)),()=>{let e=Bv({start:a,end:o});o.assign(G(Qd(a.xyz,o.xyz,e),o.w)),t&&c.assign(Qd(s,c,e))}).ElseIf(o.z.lessThan(0).and(a.z.greaterThanEqual(0)),()=>{let e=Bv({start:o,end:a});a.assign(G(Qd(o.xyz,a.xyz,e),a.w)),t&&s.assign(Qd(c,s,e))})}),t){let t=e.dashScaleNode?B(e.dashScaleNode):Qg,n=e.offsetNode?B(e.offsetNode):n_,r=$m.y.lessThan(.5).select(t.mul(s),t.mul(c));r=r.add(n),Rv.assign(r)}let u=wm.mul(a),d=wm.mul(o),f=u.xyz.div(u.w),p=d.xyz.div(d.w),m=p.xy.sub(f.xy).toVar();m.x.assign(m.x.mul(l)),m.assign(m.normalize());let h=G().toVar();if(n){let e=o.xyz.sub(a.xyz).normalize(),n=Qd(a.xyz,o.xyz,.5).normalize(),r=e.cross(n).normalize(),i=e.cross(r);zv.assign($m.y.lessThan(.5).select(a,o));let s=t_.mul(.5);zv.addAssign(G($m.x.lessThan(0).select(r.mul(s),r.mul(s).negate()),0)),t||(zv.addAssign(G($m.y.lessThan(.5).select(e.mul(s).negate(),e.mul(s)),0)),zv.addAssign(G(i.mul(s),0)),z($m.y.greaterThan(1).or($m.y.lessThan(0)),()=>{zv.subAssign(G(i.mul(2).mul(s),0))})),h.assign(wm.mul(zv));let c=W().toVar();c.assign($m.y.lessThan(.5).select(f,p)),h.z.assign(c.z.mul(h.w))}else{let e=U(m.y,m.x.negate()).toVar(`offset`);m.x.assign(m.x.div(l)),e.x.assign(e.x.div(l)),e.assign($m.x.lessThan(0).select(e.negate(),e)),z($m.y.lessThan(0),()=>{e.assign(e.sub(m))}).ElseIf($m.y.greaterThan(1),()=>{e.assign(e.add(m))}),e.assign(e.mul(t_)),e.assign(e.div(nm.w.div(Qp))),h.assign($m.y.lessThan(.5).select(u,d)),e.assign(e.mul(h.w)),h.assign(h.add(G(e,0,0)))}return h})(),Uv=R(({material:e,renderer:t})=>{let n=e._useAlphaToCoverage,r=e._useDash,i=e._useWorldUnits,a=Ap();if(r){let t=e.dashSizeNode?B(e.dashSizeNode):$g,n=e.gapSizeNode?B(e.gapSizeNode):e_;Xl.assign(t),Zl.assign(n),a.y.lessThan(-1).or(a.y.greaterThan(1)).discard(),Rv.mod(Xl.add(Zl)).greaterThan(Xl).discard()}let o=B(1).toVar(`alpha`);if(i){let e=zv.xyz.normalize().mul(1e5),i=Lv.sub(Iv),a=Vv({p1:Iv,p2:Lv,p3:W(0,0,0),p4:e}),s=Iv.add(i.mul(a.x)),c=e.mul(a.y),l=s.sub(c).length().div(t_);if(!r)if(n&&t.currentSamples>0){let e=l.fwidth();o.assign(nf(e.negate().add(.5),e.add(.5),l).oneMinus())}else l.greaterThan(.5).discard()}else if(n&&t.currentSamples>0){let e=a.x,t=a.y.greaterThan(0).select(a.y.sub(1),a.y.add(1)),n=e.mul(e).add(t.mul(t)),r=B(n.fwidth()).toVar(`dlen`);z(a.y.abs().greaterThan(1),()=>{o.assign(nf(r.oneMinus(),r.add(1),n).oneMinus())})}else z(a.y.abs().greaterThan(1),()=>{let e=a.x,t=a.y.greaterThan(0).select(a.y.sub(1),a.y.add(1));e.mul(e).add(t.mul(t)).greaterThan(1).discard()});return o})(),Wv=class extends Av{static get type(){return`Line2NodeMaterial`}constructor(e={}){super(),this.isLine2NodeMaterial=!0,this.setDefaultValues(Fv),this.vertexColors=e.vertexColors,this.dashOffset=0,this.offsetNode=null,this.dashScaleNode=null,this.dashSizeNode=null,this.gapSizeNode=null,this.blending=0,this._useDash=e.dashed,this._useAlphaToCoverage=!0,this._useWorldUnits=!1,this.setValues(e)}setupDiffuseColor(e){if(super.setupDiffuseColor(e),kl.a.mulAssign(Uv),this.vertexColors===!0&&e.geometry.hasAttribute(`instanceColorStart`)){let e=kp(`instanceColorStart`),t=kp(`instanceColorEnd`),n=$m.y.lessThan(.5).select(e,t);kl.rgb.mulAssign(n)}this.transparent&&kl.rgb.assign(kl.rgb.mul(kl.a).add(iv().rgb.mul(kl.a.oneMinus())))}setupModelViewProjection(){return Hv}get lineColorNode(){return this.colorNode}set lineColorNode(e){Tt(`Line2NodeMaterial: "lineColorNode" has been deprecated. Use "colorNode" instead.`),this.colorNode=e}get worldUnits(){return this._useWorldUnits}set worldUnits(e){this._useWorldUnits!==e&&(this._useWorldUnits=e,this.needsUpdate=!0)}get dashed(){return this._useDash}set dashed(e){this._useDash!==e&&(this._useDash=e,this.needsUpdate=!0)}get alphaToCoverage(){return this._useAlphaToCoverage}set alphaToCoverage(e){this._useAlphaToCoverage!==e&&(this._useAlphaToCoverage=e,this.needsUpdate=!0)}},Gv=new _a,Kv=class extends Av{static get type(){return`MeshNormalNodeMaterial`}constructor(e){super(),this.isMeshNormalNodeMaterial=!0,this.setDefaultValues(Gv),this.setValues(e)}setupDiffuseColor(){let e=this.opacityNode?B(this.opacityNode):Og;kl.assign(Pf(G(mg(hh),e),tt))}},qv=R(([e=rh])=>U(e.z.atan(e.x).mul(1/(Math.PI*2)).add(.5),e.y.clamp(-1,1).asin().mul(1/Math.PI).add(.5))),Jv=R(([e=Ap()])=>{let t=e.x.sub(.5).mul(Math.PI*2),n=e.y.sub(.5).mul(Math.PI),r=n.cos();return W(r.mul(t.cos()),n.sin(),r.mul(t.sin()))}),Yv=class extends Sn{constructor(e=1,t={}){super(e,e,t),this.isCubeRenderTarget=!0;let n={width:e,height:e,depth:1},r=[n,n,n,n,n,n];this.texture=new ra(r),this._setTextureOptions(t),this.texture.isRenderTargetTexture=!0}fromEquirectangularTexture(e,t){let n=t.minFilter,r=t.generateMipmaps;t.generateMipmaps=!0,this.texture.type=t.type,this.texture.colorSpace=t.colorSpace,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;let i=new oa(5,5,5),a=qv(rh),o=new Av;o.colorNode=Lp(t,a,0),o.side=1,o.blending=0;let s=new ji(i,o),c=new ar;c.add(s),t.minFilter===1008&&(t.minFilter=l);let u=new _o(1,10,this),d=e.getMRT();return e.setMRT(null),u.update(e,c),e.setMRT(d),t.minFilter=n,t.generateMipmaps=r,s.geometry.dispose(),s.material.dispose(),this}clear(e,t=!0,n=!0,r=!0){let i=e.getRenderTarget();for(let i=0;i<6;i++)e.setRenderTarget(this,i),e.clear(t,n,r);e.setRenderTarget(i)}},Xv=new WeakMap,Zv=class extends sc{static get type(){return`CubeMapNode`}constructor(e){super(`vec3`),this.envNode=e,this._cubeTexture=null,this._cubeTextureNode=Nh(null);let t=new ra;t.isRenderTargetTexture=!0,this._defaultTexture=t,this.updateBeforeType=M.RENDER}updateBefore(e){let{renderer:t,material:n}=e,r=this.envNode;if(r.isTextureNode||r.isMaterialReferenceNode){let e=r.isTextureNode?r.value:n[r.property];if(e&&e.isTexture){let n=e.mapping;if(n===303||n===304){if(Xv.has(e)){let t=Xv.get(e);ey(t,e.mapping),this._cubeTexture=t}else{let n=e.image;if(Qv(n)){let r=new Yv(n.height);r.fromEquirectangularTexture(t,e),ey(r.texture,e.mapping),this._cubeTexture=r.texture,Xv.set(e,r.texture),e.addEventListener(`dispose`,$v)}else this._cubeTexture=this._defaultTexture}this._cubeTextureNode.value=this._cubeTexture}else this._cubeTextureNode=this.envNode}}}setup(e){return this.updateBefore(e),this._cubeTextureNode}};function Qv(e){return e!=null&&e.height>0}function $v(e){let t=e.target;t.removeEventListener(`dispose`,$v);let n=Xv.get(t);n!==void 0&&(Xv.delete(t),n.dispose())}function ey(e,t){t===303?e.mapping=301:t===304&&(e.mapping=302)}var ty=el(Zv).setParameterLength(1),ny=class extends Y_{static get type(){return`BasicEnvironmentNode`}constructor(e=null){super(),this.envNode=e}setup(e){e.context.environment=ty(this.envNode)}},ry=class extends Y_{static get type(){return`BasicLightMapNode`}constructor(e=null){super(),this.lightMapNode=e}setup(e){let t=B(1/Math.PI);e.context.irradianceLightMap=this.lightMapNode.mul(t)}},iy=class{start(e){e.lightsNode.setupLights(e,e.lightsNode.getLightNodes(e)),this.indirect(e)}finish(){}direct(){}directRectArea(){}indirect(){}ambientOcclusion(){}},ay=class extends iy{constructor(){super()}indirect({context:e}){let t=e.ambientOcclusion,n=e.reflectedLight,r=e.irradianceLightMap;n.indirectDiffuse.assign(G(0)),r?n.indirectDiffuse.addAssign(r):n.indirectDiffuse.addAssign(G(1,1,1,0)),n.indirectDiffuse.mulAssign(t),n.indirectDiffuse.mulAssign(kl.rgb)}finish(e){let{material:t,context:n}=e,r=n.outgoingLight,i=e.context.environment;if(i)switch(t.combine){case 0:r.rgb.assign(Qd(r.rgb,r.rgb.mul(i.rgb),Mg.mul(Ng)));break;case 1:r.rgb.assign(Qd(r.rgb,i.rgb,Mg.mul(Ng)));break;case 2:r.rgb.addAssign(i.rgb.mul(Mg.mul(Ng)));break;default:T(`BasicLightingModel: Unsupported .combine value:`,t.combine);break}}},oy=new yi,sy=class extends Av{static get type(){return`MeshBasicNodeMaterial`}constructor(e){super(),this.isMeshBasicNodeMaterial=!0,this.lights=!0,this.setDefaultValues(oy),this.setValues(e)}setupNormal(){return ch(ph)}setupEnvironment(e){let t=super.setupEnvironment(e);return t?new ny(t):null}setupLightMap(e){let t=null;return e.material.lightMap&&(t=new ry(a_)),t}setupOutgoingLight(){return kl.rgb}setupLightingModel(){return new ay}},cy=R(({f0:e,f90:t,dotVH:n})=>{let r=n.mul(-5.55473).sub(6.98316).mul(n).exp2();return e.mul(r.oneMinus()).add(t.mul(r))}),ly=R(e=>e.diffuseColor.mul(1/Math.PI)),uy=()=>B(.25),dy=R(({dotNH:e})=>Jl.mul(B(.5)).add(1).mul(B(1/Math.PI)).mul(e.pow(Jl))),fy=R(({lightDirection:e})=>{let t=e.add(ah).normalize(),n=hh.dot(t).clamp(),r=cy({f0:Gl,f90:1,dotVH:ah.dot(t).clamp()}),i=uy(),a=dy({dotNH:n});return r.mul(i).mul(a)}),py=class extends ay{constructor(e=!0){super(),this.specular=e}direct({lightDirection:e,lightColor:t,reflectedLight:n}){let r=hh.dot(e).clamp().mul(t);n.directDiffuse.addAssign(r.mul(ly({diffuseColor:kl.rgb}))),this.specular===!0&&n.directSpecular.addAssign(r.mul(fy({lightDirection:e})).mul(Mg))}indirect(e){let{ambientOcclusion:t,irradiance:n,reflectedLight:r}=e.context;r.indirectDiffuse.addAssign(n.mul(ly({diffuseColor:kl}))),r.indirectDiffuse.mulAssign(t)}},my=new va,hy=class extends Av{static get type(){return`MeshLambertNodeMaterial`}constructor(e){super(),this.isMeshLambertNodeMaterial=!0,this.lights=!0,this.setDefaultValues(my),this.setValues(e)}setupEnvironment(e){let t=super.setupEnvironment(e);return t?new ny(t):null}setupLightingModel(){return new py(!1)}},gy=new ha,_y=class extends Av{static get type(){return`MeshPhongNodeMaterial`}constructor(e){super(),this.isMeshPhongNodeMaterial=!0,this.lights=!0,this.shininessNode=null,this.specularNode=null,this.setDefaultValues(gy),this.setValues(e)}setupEnvironment(e){let t=super.setupEnvironment(e);return t?new ny(t):null}setupLightingModel(){return new py}setupVariants(){let e=(this.shininessNode?B(this.shininessNode):Eg).max(1e-4);Jl.assign(e);let t=this.specularNode||kg;Gl.assign(t)}},vy=R(e=>{if(e.geometry.hasAttribute(`normal`)===!1)return B(0);let t=ph.dFdx().abs().max(ph.dFdy().abs());return t.x.max(t.y).max(t.z)}),yy=R(e=>{let{roughness:t}=e,n=vy(),r=t.max(.0525);return r=r.add(n),r=r.min(1),r}),by=R(({alpha:e,dotNL:t,dotNV:n})=>{let r=e.pow2(),i=t.mul(r.add(r.oneMinus().mul(n.pow2())).sqrt()),a=n.mul(r.add(r.oneMinus().mul(t.pow2())).sqrt());return xu(.5,i.add(a).max(Uu))}).setLayout({name:`V_GGX_SmithCorrelated`,type:`float`,inputs:[{name:`alpha`,type:`float`},{name:`dotNL`,type:`float`},{name:`dotNV`,type:`float`}]}),xy=R(({alphaT:e,alphaB:t,dotTV:n,dotBV:r,dotTL:i,dotBL:a,dotNV:o,dotNL:s})=>{let c=s.mul(W(e.mul(n),t.mul(r),o).length()),l=o.mul(W(e.mul(i),t.mul(a),s).length());return xu(.5,c.add(l).max(Uu))}).setLayout({name:`V_GGX_SmithCorrelated_Anisotropic`,type:`float`,inputs:[{name:`alphaT`,type:`float`,qualifier:`in`},{name:`alphaB`,type:`float`,qualifier:`in`},{name:`dotTV`,type:`float`,qualifier:`in`},{name:`dotBV`,type:`float`,qualifier:`in`},{name:`dotTL`,type:`float`,qualifier:`in`},{name:`dotBL`,type:`float`,qualifier:`in`},{name:`dotNV`,type:`float`,qualifier:`in`},{name:`dotNL`,type:`float`,qualifier:`in`}]}),Sy=R(({alpha:e,dotNH:t})=>{let n=e.pow2(),r=t.pow2().mul(n.oneMinus()).oneMinus();return n.div(r.pow2()).mul(1/Math.PI)}).setLayout({name:`D_GGX`,type:`float`,inputs:[{name:`alpha`,type:`float`},{name:`dotNH`,type:`float`}]}),Cy=B(1/Math.PI),wy=R(({alphaT:e,alphaB:t,dotNH:n,dotTH:r,dotBH:i})=>{let a=e.mul(t),o=W(t.mul(r),e.mul(i),a.mul(n)),s=o.dot(o),c=a.div(s);return Cy.mul(a.mul(c.pow2()))}).setLayout({name:`D_GGX_Anisotropic`,type:`float`,inputs:[{name:`alphaT`,type:`float`,qualifier:`in`},{name:`alphaB`,type:`float`,qualifier:`in`},{name:`dotNH`,type:`float`,qualifier:`in`},{name:`dotTH`,type:`float`,qualifier:`in`},{name:`dotBH`,type:`float`,qualifier:`in`}]}),Ty=R(({lightDirection:e,f0:t,f90:n,roughness:r,f:i,normalView:a=hh,USE_IRIDESCENCE:o,USE_ANISOTROPY:s})=>{let c=r.pow2(),l=e.add(ah).normalize(),u=a.dot(e).clamp(),d=a.dot(ah).clamp(),f=a.dot(l).clamp(),p=cy({f0:t,f90:n,dotVH:ah.dot(l).clamp()}),m,h;if(Jc(o)&&(p=Rl.mix(p,i)),Jc(s)){let t=Ul.dot(e),n=Ul.dot(ah),r=Ul.dot(l),i=Wl.dot(e),a=Wl.dot(ah),o=Wl.dot(l);m=xy({alphaT:Vl,alphaB:c,dotTV:n,dotBV:a,dotTL:t,dotBL:i,dotNV:d,dotNL:u}),h=wy({alphaT:Vl,alphaB:c,dotNH:f,dotTH:r,dotBH:o})}else m=by({alpha:c,dotNL:u,dotNV:d}),h=Sy({alpha:c,dotNH:f});return p.mul(m).mul(h)}),Ey=new Uint16Array([12469,15057,12620,14925,13266,14620,13807,14376,14323,13990,14545,13625,14713,13328,14840,12882,14931,12528,14996,12233,15039,11829,15066,11525,15080,11295,15085,10976,15082,10705,15073,10495,13880,14564,13898,14542,13977,14430,14158,14124,14393,13732,14556,13410,14702,12996,14814,12596,14891,12291,14937,11834,14957,11489,14958,11194,14943,10803,14921,10506,14893,10278,14858,9960,14484,14039,14487,14025,14499,13941,14524,13740,14574,13468,14654,13106,14743,12678,14818,12344,14867,11893,14889,11509,14893,11180,14881,10751,14852,10428,14812,10128,14765,9754,14712,9466,14764,13480,14764,13475,14766,13440,14766,13347,14769,13070,14786,12713,14816,12387,14844,11957,14860,11549,14868,11215,14855,10751,14825,10403,14782,10044,14729,9651,14666,9352,14599,9029,14967,12835,14966,12831,14963,12804,14954,12723,14936,12564,14917,12347,14900,11958,14886,11569,14878,11247,14859,10765,14828,10401,14784,10011,14727,9600,14660,9289,14586,8893,14508,8533,15111,12234,15110,12234,15104,12216,15092,12156,15067,12010,15028,11776,14981,11500,14942,11205,14902,10752,14861,10393,14812,9991,14752,9570,14682,9252,14603,8808,14519,8445,14431,8145,15209,11449,15208,11451,15202,11451,15190,11438,15163,11384,15117,11274,15055,10979,14994,10648,14932,10343,14871,9936,14803,9532,14729,9218,14645,8742,14556,8381,14461,8020,14365,7603,15273,10603,15272,10607,15267,10619,15256,10631,15231,10614,15182,10535,15118,10389,15042,10167,14963,9787,14883,9447,14800,9115,14710,8665,14615,8318,14514,7911,14411,7507,14279,7198,15314,9675,15313,9683,15309,9712,15298,9759,15277,9797,15229,9773,15166,9668,15084,9487,14995,9274,14898,8910,14800,8539,14697,8234,14590,7790,14479,7409,14367,7067,14178,6621,15337,8619,15337,8631,15333,8677,15325,8769,15305,8871,15264,8940,15202,8909,15119,8775,15022,8565,14916,8328,14804,8009,14688,7614,14569,7287,14448,6888,14321,6483,14088,6171,15350,7402,15350,7419,15347,7480,15340,7613,15322,7804,15287,7973,15229,8057,15148,8012,15046,7846,14933,7611,14810,7357,14682,7069,14552,6656,14421,6316,14251,5948,14007,5528,15356,5942,15356,5977,15353,6119,15348,6294,15332,6551,15302,6824,15249,7044,15171,7122,15070,7050,14949,6861,14818,6611,14679,6349,14538,6067,14398,5651,14189,5311,13935,4958,15359,4123,15359,4153,15356,4296,15353,4646,15338,5160,15311,5508,15263,5829,15188,6042,15088,6094,14966,6001,14826,5796,14678,5543,14527,5287,14377,4985,14133,4586,13869,4257,15360,1563,15360,1642,15358,2076,15354,2636,15341,3350,15317,4019,15273,4429,15203,4732,15105,4911,14981,4932,14836,4818,14679,4621,14517,4386,14359,4156,14083,3795,13808,3437,15360,122,15360,137,15358,285,15355,636,15344,1274,15322,2177,15281,2765,15215,3223,15120,3451,14995,3569,14846,3567,14681,3466,14511,3305,14344,3121,14037,2800,13753,2467,15360,0,15360,1,15359,21,15355,89,15346,253,15325,479,15287,796,15225,1148,15133,1492,15008,1749,14856,1882,14685,1886,14506,1783,14324,1608,13996,1398,13702,1183]),Dy=null,Oy=R(({roughness:e,dotNV:t})=>{Dy===null&&(Dy=new Pi(Ey,16,16,ce,b),Dy.name=`DFG_LUT`,Dy.minFilter=l,Dy.magFilter=l,Dy.wrapS=i,Dy.wrapT=i,Dy.generateMipmaps=!1,Dy.needsUpdate=!0);let n=U(e,t);return Lp(Dy,n).rg}),ky=R(({lightDirection:e,f0:t,f90:n,roughness:r,f:i,USE_IRIDESCENCE:a,USE_ANISOTROPY:o})=>{let s=Ty({lightDirection:e,f0:t,f90:n,roughness:r,f:i,USE_IRIDESCENCE:a,USE_ANISOTROPY:o}),c=hh.dot(e).clamp(),l=Oy({roughness:r,dotNV:hh.dot(ah).clamp()}),u=Oy({roughness:r,dotNV:c}),d=t.mul(l.x).add(n.mul(l.y)),f=t.mul(u.x).add(n.mul(u.y)),p=l.x.add(l.y),m=u.x.add(u.y),h=B(1).sub(p),g=B(1).sub(m),_=t.add(t.oneMinus().mul(.047619)),v=d.mul(f).mul(_).div(B(1).sub(h.mul(g).mul(_).mul(_)).add(Uu)),y=h.mul(g),b=v.mul(y);return s.add(b)}),Ay=R(e=>{let{dotNV:t,specularColor:n,specularF90:r,roughness:i}=e,a=Oy({dotNV:t,roughness:i});return n.mul(a.x).add(r.mul(a.y))}),jy=R(({f:e,f90:t,dotVH:n})=>{let r=n.oneMinus().saturate(),i=r.mul(r),a=r.mul(i,i).clamp(0,.9999);return e.sub(W(t).mul(a)).div(a.oneMinus())}).setLayout({name:`Schlick_to_F0`,type:`vec3`,inputs:[{name:`f`,type:`vec3`},{name:`f90`,type:`float`},{name:`dotVH`,type:`float`}]}),My=R(({roughness:e,dotNH:t})=>{let n=e.pow2(),r=B(1).div(n),i=t.pow2().oneMinus().max(.0078125);return B(2).add(r).mul(i.pow(r.mul(.5))).div(2*Math.PI)}).setLayout({name:`D_Charlie`,type:`float`,inputs:[{name:`roughness`,type:`float`},{name:`dotNH`,type:`float`}]}),Ny=R(({dotNV:e,dotNL:t})=>B(1).div(B(4).mul(t.add(e).sub(t.mul(e))))).setLayout({name:`V_Neubelt`,type:`float`,inputs:[{name:`dotNV`,type:`float`},{name:`dotNL`,type:`float`}]}),Py=R(({lightDirection:e})=>{let t=e.add(ah).normalize(),n=hh.dot(e).clamp(),r=hh.dot(ah).clamp(),i=My({roughness:Ll,dotNH:hh.dot(t).clamp()}),a=Ny({dotNV:r,dotNL:n});return Il.mul(i).mul(a)}),Fy=R(({N:e,V:t,roughness:n})=>{let r=U(n,e.dot(t).saturate().oneMinus().sqrt());return r.assign(r.mul(.984375).add(.0078125)),r}).setLayout({name:`LTC_Uv`,type:`vec2`,inputs:[{name:`N`,type:`vec3`},{name:`V`,type:`vec3`},{name:`roughness`,type:`float`}]}),Iy=R(({f:e})=>{let t=e.length();return Id(t.mul(t).add(e.z).div(t.add(1)),0)}).setLayout({name:`LTC_ClippedSphereFormFactor`,type:`float`,inputs:[{name:`f`,type:`vec3`}]}),Ly=R(({v1:e,v2:t})=>{let n=e.dot(t),r=n.abs().toVar(),i=r.mul(.0145206).add(.4965155).mul(r).add(.8543985).toVar(),a=r.add(4.1616724).mul(r).add(3.417594).toVar(),o=i.div(a),s=n.greaterThan(0).select(o,Id(n.mul(n).oneMinus(),1e-7).inverseSqrt().mul(.5).sub(o));return e.cross(t).mul(s)}).setLayout({name:`LTC_EdgeVectorFormFactor`,type:`vec3`,inputs:[{name:`v1`,type:`vec3`},{name:`v2`,type:`vec3`}]}),Ry=R(({N:e,V:t,P:n,mInv:r,p0:i,p1:a,p2:o,p3:s})=>{let c=a.sub(i).toVar(),l=s.sub(i).toVar(),u=c.cross(l),d=W().toVar();return z(u.dot(n.sub(i)).greaterThanEqual(0),()=>{let c=t.sub(e.mul(t.dot(e))).normalize(),l=e.cross(c).negate(),u=r.mul(bl(c,l,e).transpose()).toVar(),f=u.mul(i.sub(n)).normalize().toVar(),p=u.mul(a.sub(n)).normalize().toVar(),m=u.mul(o.sub(n)).normalize().toVar(),h=u.mul(s.sub(n)).normalize().toVar(),g=W(0).toVar();g.addAssign(Ly({v1:f,v2:p})),g.addAssign(Ly({v1:p,v2:m})),g.addAssign(Ly({v1:m,v2:h})),g.addAssign(Ly({v1:h,v2:f})),d.assign(W(Iy({f:g})))}),d}).setLayout({name:`LTC_Evaluate`,type:`vec3`,inputs:[{name:`N`,type:`vec3`},{name:`V`,type:`vec3`},{name:`P`,type:`vec3`},{name:`mInv`,type:`mat3`},{name:`p0`,type:`vec3`},{name:`p1`,type:`vec3`},{name:`p2`,type:`vec3`},{name:`p3`,type:`vec3`}]}),zy=1/6,By=e=>J(zy,J(e,J(e,e.negate().add(3)).sub(3)).add(1)),Vy=e=>J(zy,J(e,J(e,J(3,e).sub(6))).add(4)),Hy=e=>J(zy,J(e,J(e,J(-3,e).add(3)).add(3)).add(1)),Uy=e=>J(zy,Ud(e,3)),Wy=e=>By(e).add(Vy(e)),Gy=e=>Hy(e).add(Uy(e)),Ky=e=>yu(-1,Vy(e).div(By(e).add(Vy(e)))),qy=e=>yu(1,Uy(e).div(Hy(e).add(Uy(e)))),Jy=(e,t,n)=>{let r=e.uvNode,i=J(r,t.zw).add(.5),a=ad(i),o=cd(i),s=Wy(o.x),c=Gy(o.x),l=Ky(o.x),u=qy(o.x),d=Ky(o.y),f=qy(o.y),p=U(a.x.add(l),a.y.add(d)).sub(.5).mul(t.xy),m=U(a.x.add(u),a.y.add(d)).sub(.5).mul(t.xy),h=U(a.x.add(l),a.y.add(f)).sub(.5).mul(t.xy),g=U(a.x.add(u),a.y.add(f)).sub(.5).mul(t.xy),_=Wy(o.y).mul(yu(s.mul(e.sample(p).level(n)),c.mul(e.sample(m).level(n)))),v=Gy(o.y).mul(yu(s.mul(e.sample(h).level(n)),c.mul(e.sample(g).level(n))));return _.add(v)},Yy=R(([e,t])=>{let n=U(e.size(V(t))),r=U(e.size(V(t.add(1)))),i=xu(1,n),a=xu(1,r),o=Jy(e,G(i,n),ad(t)),s=Jy(e,G(a,r),od(t));return cd(t).mix(o,s)}),Xy=R(([e,t])=>Yy(e,t.mul(Mp(e)))),Zy=R(([e,t,n,r,i])=>{let a=W(tf(t.negate(),sd(e),xu(1,r))),o=W(Cd(i[0].xyz),Cd(i[1].xyz),Cd(i[2].xyz));return sd(a).mul(n.mul(o))}).setLayout({name:`getVolumeTransmissionRay`,type:`vec3`,inputs:[{name:`n`,type:`vec3`},{name:`v`,type:`vec3`},{name:`thickness`,type:`float`},{name:`ior`,type:`float`},{name:`modelMatrix`,type:`mat4`}]}),Qy=R(([e,t])=>e.mul($d(t.mul(2).sub(2),0,1))).setLayout({name:`applyIorToRoughness`,type:`float`,inputs:[{name:`roughness`,type:`float`},{name:`ior`,type:`float`}]}),$y=nv(),eb=iv(),tb=R(([e,t,n],{material:r})=>Yy((r.side===1?$y:eb).sample(e),nd(em.x).mul(Qy(t,n)))),nb=R(([e,t,n])=>(z(n.notEqual(0),()=>$u(td(t).negate().div(n).negate().mul(e))),W(1))).setLayout({name:`volumeAttenuation`,type:`vec3`,inputs:[{name:`transmissionDistance`,type:`float`},{name:`attenuationColor`,type:`vec3`},{name:`attenuationDistance`,type:`float`}]}),rb=R(([e,t,n,r,i,a,o,s,c,l,u,d,f,p,m])=>{let h,g;if(m){h=G().toVar(),g=W().toVar();let i=u.sub(1).mul(m.mul(.025)),a=W(u.sub(i),u,u.add(i));B_({start:0,end:3},({i})=>{let u=a.element(i),m=Zy(e,t,d,u,s),_=o.add(m),v=l.mul(c.mul(G(_,1))),y=U(v.xy.div(v.w)).toVar();y.addAssign(1),y.divAssign(2),y.assign(U(y.x,y.y.oneMinus()));let b=tb(y,n,u);h.element(i).assign(b.element(i)),h.a.addAssign(b.a),g.element(i).assign(r.element(i).mul(nb(Cd(m),f,p).element(i)))}),h.a.divAssign(3)}else{let i=Zy(e,t,d,u,s),a=o.add(i),m=l.mul(c.mul(G(a,1))),_=U(m.xy.div(m.w)).toVar();_.addAssign(1),_.divAssign(2),_.assign(U(_.x,_.y.oneMinus())),h=tb(_,n,u),g=r.mul(nb(Cd(i),f,p))}let _=g.rgb.mul(h.rgb),v=W(Ay({dotNV:e.dot(t).clamp(),specularColor:i,specularF90:a,roughness:n})),y=g.r.add(g.g,g.b).div(3);return G(v.oneMinus().mul(_),h.a.oneMinus().mul(y).oneMinus())}),ib=bl(3.2404542,-.969266,.0556434,-1.5371385,1.8760108,-.2040259,-.4985314,.041556,1.0572252),ab=e=>{let t=e.sqrt();return W(1).add(t).div(W(1).sub(t))},ob=(e,t)=>e.sub(t).div(e.add(t)).pow2(),sb=(e,t)=>{let n=e.mul(2*Math.PI*1e-9),r=W(54856e-17,44201e-17,52481e-17),i=W(1681e3,1795300,2208400),a=W(43278e5,93046e5,66121e5),o=B(9747e-17*Math.sqrt(2*Math.PI*45282e5)).mul(n.mul(2239900).add(t.x).cos()).mul(n.pow2().mul(-45282e5).exp()),s=r.mul(a.mul(2*Math.PI).sqrt()).mul(i.mul(n).add(t).cos()).mul(n.pow2().negate().mul(a).exp());return s=W(s.x.add(o),s.y,s.z).div(1.0685e-7),ib.mul(s)},cb=R(({outsideIOR:e,eta2:t,cosTheta1:n,thinFilmThickness:r,baseF0:i})=>{let a=Qd(e,t,nf(0,.03,r)),o=e.div(a).pow2().mul(n.pow2().oneMinus()).oneMinus();z(o.lessThan(0),()=>W(1));let s=o.sqrt(),c=cy({f0:ob(a,e),f90:1,dotVH:n}),l=c.oneMinus(),u=a.lessThan(e).select(Math.PI,0),d=B(Math.PI).sub(u),f=ab(i.clamp(0,.9999)),p=cy({f0:ob(f,a.toVec3()),f90:1,dotVH:s}),m=W(f.x.lessThan(a).select(Math.PI,0),f.y.lessThan(a).select(Math.PI,0),f.z.lessThan(a).select(Math.PI,0)),h=a.mul(r,s,2),g=W(d).add(m),_=c.mul(p).clamp(1e-5,.9999),v=_.sqrt(),y=l.pow2().mul(p).div(W(1).sub(_)),b=c.add(y).toVar(),x=y.sub(l).toVar();return B_({start:1,end:2,condition:`<=`,name:`m`},({m:e})=>{x.mulAssign(v);let t=sb(B(e).mul(h),B(e).mul(g)).mul(2);b.addAssign(x.mul(t))}),b.max(W(0))}).setLayout({name:`evalIridescence`,type:`vec3`,inputs:[{name:`outsideIOR`,type:`float`},{name:`eta2`,type:`float`},{name:`cosTheta1`,type:`float`},{name:`thinFilmThickness`,type:`float`},{name:`baseF0`,type:`vec3`}]}),lb=R(({normal:e,viewDir:t,roughness:n})=>{let r=e.dot(t).saturate(),i=n.mul(n),a=n.add(.1).reciprocal(),o=B(-1.9362).add(n.mul(1.0678)).add(i.mul(.4573)).sub(a.mul(.8469)),s=B(-.6014).add(n.mul(.5538)).sub(i.mul(.467)).sub(a.mul(.1255));return o.mul(r).add(s).exp().saturate()}),ub=W(.04),db=B(1),fb=class extends iy{constructor(e=!1,t=!1,n=!1,r=!1,i=!1,a=!1){super(),this.clearcoat=e,this.sheen=t,this.iridescence=n,this.anisotropy=r,this.transmission=i,this.dispersion=a,this.clearcoatRadiance=null,this.clearcoatSpecularDirect=null,this.clearcoatSpecularIndirect=null,this.sheenSpecularDirect=null,this.sheenSpecularIndirect=null,this.iridescenceFresnel=null,this.iridescenceF0=null,this.iridescenceF0Dielectric=null,this.iridescenceF0Metallic=null}start(e){if(this.clearcoat===!0&&(this.clearcoatRadiance=W().toVar(`clearcoatRadiance`),this.clearcoatSpecularDirect=W().toVar(`clearcoatSpecularDirect`),this.clearcoatSpecularIndirect=W().toVar(`clearcoatSpecularIndirect`)),this.sheen===!0&&(this.sheenSpecularDirect=W().toVar(`sheenSpecularDirect`),this.sheenSpecularIndirect=W().toVar(`sheenSpecularIndirect`)),this.iridescence===!0){let e=hh.dot(ah).clamp(),t=cb({outsideIOR:B(1),eta2:zl,cosTheta1:e,thinFilmThickness:Bl,baseF0:Gl}),n=cb({outsideIOR:B(1),eta2:zl,cosTheta1:e,thinFilmThickness:Bl,baseF0:kl.rgb});this.iridescenceFresnel=Qd(t,n,Nl),this.iridescenceF0Dielectric=jy({f:t,f90:1,dotVH:e}),this.iridescenceF0Metallic=jy({f:n,f90:1,dotVH:e}),this.iridescenceF0=Qd(this.iridescenceF0Dielectric,this.iridescenceF0Metallic,Nl)}if(this.transmission===!0){let t=nh,n=km.sub(nh).normalize(),r=gh,i=e.context;i.backdrop=rb(r,n,Ml,Al,Kl,ql,t,Vm,Em,wm,$l,tu,ru,nu,this.dispersion?iu:null),i.backdropAlpha=eu,kl.a.mulAssign(Qd(1,i.backdrop.a,eu))}super.start(e)}computeMultiscattering(e,t,n,r,i=null){let a=Oy({roughness:Ml,dotNV:hh.dot(ah).clamp()}),o=i?Rl.mix(r,i):r,s=o.mul(a.x).add(n.mul(a.y)),c=a.x.add(a.y).oneMinus(),l=o.add(o.oneMinus().mul(.047619)),u=s.mul(l).div(c.mul(l).oneMinus());e.addAssign(s),t.addAssign(u.mul(c))}direct({lightDirection:e,lightColor:t,reflectedLight:n}){let r=hh.dot(e).clamp().mul(t).toVar();if(this.sheen===!0){this.sheenSpecularDirect.addAssign(r.mul(Py({lightDirection:e})));let t=lb({normal:hh,viewDir:ah,roughness:Ll}),n=lb({normal:hh,viewDir:e,roughness:Ll}),i=Il.r.max(Il.g).max(Il.b).mul(t.max(n)).oneMinus();r.mulAssign(i)}if(this.clearcoat===!0){let n=_h.dot(e).clamp().mul(t);this.clearcoatSpecularDirect.addAssign(n.mul(Ty({lightDirection:e,f0:ub,f90:db,roughness:Fl,normalView:_h})))}n.directDiffuse.addAssign(r.mul(ly({diffuseColor:Al}))),n.directSpecular.addAssign(r.mul(ky({lightDirection:e,f0:Kl,f90:1,roughness:Ml,f:this.iridescenceFresnel,USE_IRIDESCENCE:this.iridescence,USE_ANISOTROPY:this.anisotropy})))}directRectArea({lightColor:e,lightPosition:t,halfWidth:n,halfHeight:r,reflectedLight:i,ltc_1:a,ltc_2:o}){let s=t.add(n).sub(r),c=t.sub(n).sub(r),l=t.sub(n).add(r),u=t.add(n).add(r),d=hh,f=ah,p=ih.toVar(),m=Fy({N:d,V:f,roughness:Ml}),h=a.sample(m).toVar(),g=o.sample(m).toVar(),_=bl(W(h.x,0,h.y),W(0,1,0),W(h.z,0,h.w)).toVar(),v=Kl.mul(g.x).add(ql.sub(Kl).mul(g.y)).toVar();if(i.directSpecular.addAssign(e.mul(v).mul(Ry({N:d,V:f,P:p,mInv:_,p0:s,p1:c,p2:l,p3:u}))),i.directDiffuse.addAssign(e.mul(Al).mul(Ry({N:d,V:f,P:p,mInv:bl(1,0,0,0,1,0,0,0,1),p0:s,p1:c,p2:l,p3:u}))),this.clearcoat===!0){let t=_h,n=Fy({N:t,V:f,roughness:Fl}),r=a.sample(n),i=o.sample(n),d=bl(W(r.x,0,r.y),W(0,1,0),W(r.z,0,r.w)),m=ub.mul(i.x).add(db.sub(ub).mul(i.y));this.clearcoatSpecularDirect.addAssign(e.mul(m).mul(Ry({N:t,V:f,P:p,mInv:d,p0:s,p1:c,p2:l,p3:u})))}}indirect(e){this.indirectDiffuse(e),this.indirectSpecular(e),this.ambientOcclusion(e)}indirectDiffuse(e){let{irradiance:t,reflectedLight:n}=e.context,r=t.mul(ly({diffuseColor:Al})).toVar();if(this.sheen===!0){let e=lb({normal:hh,viewDir:ah,roughness:Ll}),t=Il.r.max(Il.g).max(Il.b).mul(e).oneMinus();r.mulAssign(t)}n.indirectDiffuse.addAssign(r)}indirectSpecular(e){let{radiance:t,iblIrradiance:n,reflectedLight:r}=e.context;if(this.sheen===!0&&this.sheenSpecularIndirect.addAssign(n.mul(Il,lb({normal:hh,viewDir:ah,roughness:Ll}))),this.clearcoat===!0){let e=Ay({dotNV:_h.dot(ah).clamp(),specularColor:ub,specularF90:db,roughness:Fl});this.clearcoatSpecularIndirect.addAssign(this.clearcoatRadiance.mul(e))}let i=W().toVar(`singleScatteringDielectric`),a=W().toVar(`multiScatteringDielectric`),o=W().toVar(`singleScatteringMetallic`),s=W().toVar(`multiScatteringMetallic`);this.computeMultiscattering(i,a,ql,Gl,this.iridescenceF0Dielectric),this.computeMultiscattering(o,s,ql,kl.rgb,this.iridescenceF0Metallic);let c=Qd(i,o,Nl),l=Qd(a,s,Nl),u=i.add(a),d=Al.mul(u.oneMinus()),f=n.mul(1/Math.PI),p=t.mul(c).add(l.mul(f)).toVar(),m=d.mul(f).toVar();if(this.sheen===!0){let e=lb({normal:hh,viewDir:ah,roughness:Ll}),t=Il.r.max(Il.g).max(Il.b).mul(e).oneMinus();p.mulAssign(t),m.mulAssign(t)}r.indirectSpecular.addAssign(p),r.indirectDiffuse.addAssign(m)}ambientOcclusion(e){let{ambientOcclusion:t,reflectedLight:n}=e.context,r=hh.dot(ah).clamp().add(t),i=Ml.mul(-16).oneMinus().negate().exp2(),a=t.sub(r.pow(i).oneMinus()).clamp();this.clearcoat===!0&&this.clearcoatSpecularIndirect.mulAssign(t),this.sheen===!0&&this.sheenSpecularIndirect.mulAssign(t),n.indirectDiffuse.mulAssign(t),n.indirectSpecular.mulAssign(a)}finish({context:e}){let{outgoingLight:t}=e;if(this.clearcoat===!0){let e=cy({dotVH:_h.dot(ah).clamp(),f0:ub,f90:db}),n=t.mul(Pl.mul(e).oneMinus()).add(this.clearcoatSpecularDirect.add(this.clearcoatSpecularIndirect).mul(Pl));t.assign(n)}if(this.sheen===!0){let e=t.add(this.sheenSpecularDirect,this.sheenSpecularIndirect.mul(1/Math.PI));t.assign(e)}}},pb=B(1),mb=B(-2),hb=B(.8),gb=B(-1),_b=B(.4),vb=B(2),yb=B(.305),bb=B(3),xb=B(.21),Sb=B(4),Cb=B(4),wb=B(16),Tb=R(([e])=>{let t=W(xd(e)).toVar(),n=B(-1).toVar();return z(t.x.greaterThan(t.z),()=>{z(t.x.greaterThan(t.y),()=>{n.assign(df(e.x.greaterThan(0),0,3))}).Else(()=>{n.assign(df(e.y.greaterThan(0),1,4))})}).Else(()=>{z(t.z.greaterThan(t.y),()=>{n.assign(df(e.z.greaterThan(0),2,5))}).Else(()=>{n.assign(df(e.y.greaterThan(0),1,4))})}),n}).setLayout({name:`getFace`,type:`float`,inputs:[{name:`direction`,type:`vec3`}]}),Eb=R(([e,t])=>{let n=U().toVar();return z(t.equal(0),()=>{n.assign(U(e.z,e.y).div(xd(e.x)))}).ElseIf(t.equal(1),()=>{n.assign(U(e.x.negate(),e.z.negate()).div(xd(e.y)))}).ElseIf(t.equal(2),()=>{n.assign(U(e.x.negate(),e.y).div(xd(e.z)))}).ElseIf(t.equal(3),()=>{n.assign(U(e.z.negate(),e.y).div(xd(e.x)))}).ElseIf(t.equal(4),()=>{n.assign(U(e.x.negate(),e.z).div(xd(e.y)))}).Else(()=>{n.assign(U(e.x,e.y).div(xd(e.z)))}),J(.5,n.add(1))}).setLayout({name:`getUV`,type:`vec2`,inputs:[{name:`direction`,type:`vec3`},{name:`face`,type:`float`}]}),Db=R(([e])=>{let t=B(0).toVar();return z(e.greaterThanEqual(hb),()=>{t.assign(pb.sub(e).mul(gb.sub(mb)).div(pb.sub(hb)).add(mb))}).ElseIf(e.greaterThanEqual(_b),()=>{t.assign(hb.sub(e).mul(vb.sub(gb)).div(hb.sub(_b)).add(gb))}).ElseIf(e.greaterThanEqual(yb),()=>{t.assign(_b.sub(e).mul(bb.sub(vb)).div(_b.sub(yb)).add(vb))}).ElseIf(e.greaterThanEqual(xb),()=>{t.assign(yb.sub(e).mul(Sb.sub(bb)).div(yb.sub(xb)).add(bb))}).Else(()=>{t.assign(B(-2).mul(nd(J(1.16,e))))}),t}).setLayout({name:`roughnessToMip`,type:`float`,inputs:[{name:`roughness`,type:`float`}]}),Ob=R(([e,t])=>{let n=e.toVar();n.assign(J(2,n).sub(1));let r=W(n,1).toVar();return z(t.equal(0),()=>{r.assign(r.zyx)}).ElseIf(t.equal(1),()=>{r.assign(r.xzy),r.xz.mulAssign(-1)}).ElseIf(t.equal(2),()=>{r.x.mulAssign(-1)}).ElseIf(t.equal(3),()=>{r.assign(r.zyx),r.xz.mulAssign(-1)}).ElseIf(t.equal(4),()=>{r.assign(r.xzy),r.xy.mulAssign(-1)}).ElseIf(t.equal(5),()=>{r.z.mulAssign(-1)}),r}).setLayout({name:`getDirection`,type:`vec3`,inputs:[{name:`uv`,type:`vec2`},{name:`face`,type:`float`}]}),kb=R(([e,t,n,r,i,a])=>{let o=B(n),s=W(t),c=$d(Db(o),mb,a),l=cd(c),u=ad(c),d=W(Ab(e,s,u,r,i,a)).toVar();return z(l.notEqual(0),()=>{let t=W(Ab(e,s,u.add(1),r,i,a)).toVar();d.assign(Qd(d,t,l))}),d}),Ab=R(([e,t,n,r,i,a])=>{let o=B(n).toVar(),s=W(t),c=B(Tb(s)).toVar(),l=B(Id(Cb.sub(o),0)).toVar();o.assign(Id(o,Cb));let u=B(ed(o)).toVar(),d=U(Eb(s,c).mul(u.sub(2)).add(1)).toVar();return z(c.greaterThan(2),()=>{d.y.addAssign(u),c.subAssign(3)}),d.x.addAssign(c.mul(u)),d.x.addAssign(l.mul(J(3,wb))),d.y.addAssign(J(4,ed(a).sub(u))),d.x.mulAssign(r),d.y.mulAssign(i),e.sample(d).grad(U(),U())}),jb=R(({envMap:e,mipInt:t,outputDirection:n,theta:r,axis:i,CUBEUV_TEXEL_WIDTH:a,CUBEUV_TEXEL_HEIGHT:o,CUBEUV_MAX_MIP:s})=>{let c=dd(r);return Ab(e,n.mul(c).add(i.cross(n).mul(ld(r))).add(i.mul(i.dot(n).mul(c.oneMinus()))),t,a,o,s)}),Mb=R(({n:e,latitudinal:t,poleAxis:n,outputDirection:r,weights:i,samples:a,dTheta:o,mipInt:s,envMap:c,CUBEUV_TEXEL_WIDTH:l,CUBEUV_TEXEL_HEIGHT:u,CUBEUV_MAX_MIP:d})=>{let f=W(df(t,n,Hd(n,r))).toVar();z(f.equal(W(0)),()=>{f.assign(W(r.z,0,r.x.negate()))}),f.assign(sd(f));let p=W().toVar();return p.addAssign(i.element(0).mul(jb({theta:0,axis:f,outputDirection:r,mipInt:s,envMap:c,CUBEUV_TEXEL_WIDTH:l,CUBEUV_TEXEL_HEIGHT:u,CUBEUV_MAX_MIP:d}))),B_({start:V(1),end:e},({i:e})=>{z(e.greaterThanEqual(a),()=>{H_()});let t=B(o.mul(B(e))).toVar();p.addAssign(i.element(e).mul(jb({theta:t.mul(-1),axis:f,outputDirection:r,mipInt:s,envMap:c,CUBEUV_TEXEL_WIDTH:l,CUBEUV_TEXEL_HEIGHT:u,CUBEUV_MAX_MIP:d}))),p.addAssign(i.element(e).mul(jb({theta:t,axis:f,outputDirection:r,mipInt:s,envMap:c,CUBEUV_TEXEL_WIDTH:l,CUBEUV_TEXEL_HEIGHT:u,CUBEUV_MAX_MIP:d})))}),G(p,1)}),Nb=R(([e])=>{let t=H(e).toVar();return t.assign(t.shiftLeft(H(16)).bitOr(t.shiftRight(H(16)))),t.assign(t.bitAnd(H(1431655765)).shiftLeft(H(1)).bitOr(t.bitAnd(H(2863311530)).shiftRight(H(1)))),t.assign(t.bitAnd(H(858993459)).shiftLeft(H(2)).bitOr(t.bitAnd(H(3435973836)).shiftRight(H(2)))),t.assign(t.bitAnd(H(252645135)).shiftLeft(H(4)).bitOr(t.bitAnd(H(4042322160)).shiftRight(H(4)))),t.assign(t.bitAnd(H(16711935)).shiftLeft(H(8)).bitOr(t.bitAnd(H(4278255360)).shiftRight(H(8)))),B(t).mul(23283064365386963e-26)}),Pb=R(([e,t])=>U(B(e).div(B(t)),Nb(e))),Fb=R(([e,t,n])=>{let r=n.mul(n).toConst(),i=W(1,0,0).toConst(),a=Hd(t,i).toConst(),o=rd(e.x).toConst(),s=J(2,3.14159265359).mul(e.y).toConst(),c=o.mul(dd(s)).toConst(),l=o.mul(ld(s)).toVar(),u=J(.5,t.z.add(1)).toConst();l.assign(u.oneMinus().mul(rd(c.mul(c).oneMinus())).add(u.mul(l)));let d=i.mul(c).add(a.mul(l)).add(t.mul(rd(Id(0,c.mul(c).add(l.mul(l)).oneMinus()))));return sd(W(r.mul(d.x),r.mul(d.y),Id(0,d.z)))}),Ib=R(({roughness:e,mipInt:t,envMap:n,N_immutable:r,GGX_SAMPLES:i,CUBEUV_TEXEL_WIDTH:a,CUBEUV_TEXEL_HEIGHT:o,CUBEUV_MAX_MIP:s})=>{let c=W(r).toVar(),l=W(0).toVar(),u=B(0).toVar();return z(e.lessThan(.001),()=>{l.assign(Ab(n,c,t,a,o,s))}).Else(()=>{let r=sd(Hd(df(xd(c.z).lessThan(.999),W(0,0,1),W(1,0,0)),c)).toVar(),d=Hd(c,r).toVar();B_({start:H(0),end:i},({i:f})=>{let p=Fb(Pb(f,i),W(0,0,1),e),m=sd(r.mul(p.x).add(d.mul(p.y)).add(c.mul(p.z))),h=sd(m.mul(Vd(c,m).mul(2)).sub(c)),g=Id(Vd(c,h),0);z(g.greaterThan(0),()=>{let e=Ab(n,h,t,a,o,s);l.addAssign(e.mul(g)),u.addAssign(g)})}),z(u.greaterThan(0),()=>{l.assign(l.div(u))})}),G(l,1)}),Lb=4,Rb=[.125,.215,.35,.446,.526,.582],zb=20,Bb=512,Vb=new oo(-1,1,1,-1,0,1),Hb=new to(90,1),Ub=new j,Wb=null,Gb=0,Kb=0,qb=new k,Jb=new WeakMap,Yb=[3,1,5,0,4,2],Xb=Ob(Ap(),kp(`faceIndex`)).normalize(),Zb=W(Xb.x,Xb.y,Xb.z),Qb=class{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._sizeLods=[],this._sigmas=[],this._lodMeshes=[],this._blurMaterial=null,this._ggxMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._backgroundBox=null}get _hasInitialized(){return this._renderer.hasInitialized()}fromScene(e,t=0,n=.1,r=100,i={}){let{size:a=256,position:o=qb,renderTarget:s=null}=i;if(this._setSize(a),this._hasInitialized===!1)throw Error(`THREE.PMREMGenerator: .fromScene() called before the backend is initialized. Use "await renderer.init();" before using this method.`);Wb=this._renderer.getRenderTarget(),Gb=this._renderer.getActiveCubeFace(),Kb=this._renderer.getActiveMipmapLevel();let c=s||this._allocateTarget(!0);return this._init(c),this._sceneToCubeUV(e,n,r,c,o),t>0&&this._blur(c,0,0,t),this._applyPMREM(c),this._cleanup(c),c}async fromSceneAsync(e,t=0,n=.1,r=100,i={}){return Tt(`PMREMGenerator: ".fromSceneAsync()" is deprecated. Use "await renderer.init()" instead.`),await this._renderer.init(),this.fromScene(e,t,n,r,i)}fromEquirectangular(e,t=null){if(this._hasInitialized===!1)throw Error(`THREE.PMREMGenerator: .fromEquirectangular() called before the backend is initialized. Use "await renderer.init();" before using this method.`);return this._fromTexture(e,t)}async fromEquirectangularAsync(e,t=null){return Tt(`PMREMGenerator: ".fromEquirectangularAsync()" is deprecated. Use "await renderer.init()" instead.`),await this._renderer.init(),this._fromTexture(e,t)}fromCubemap(e,t=null){if(this._hasInitialized===!1)throw Error(`THREE.PMREMGenerator: .fromCubemap() called before the backend is initialized. Use "await renderer.init();" before using this method.`);return this._fromTexture(e,t)}async fromCubemapAsync(e,t=null){return Tt(`PMREMGenerator: ".fromCubemapAsync()" is deprecated. Use "await renderer.init()" instead.`),await this._renderer.init(),this._fromTexture(e,t)}async compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=ix(),await this._compileMaterial(this._cubemapMaterial))}async compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=ax(),await this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose(),this._backgroundBox!==null&&(this._backgroundBox.geometry.dispose(),this._backgroundBox.material.dispose())}_setSizeFromTexture(e){e.mapping===301||e.mapping===302?this._setSize(e.image.length===0?16:e.image[0].width||e.image[0].image.width):this._setSize(e.image.width/4)}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=2**this._lodMax}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._ggxMaterial!==null&&this._ggxMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e2?l:0,l,l),c.render(e,a)}c.autoClear=l,e.background=p}_textureToCubeUV(e,t){let n=this._renderer,r=e.mapping===301||e.mapping===302;r?this._cubemapMaterial===null&&(this._cubemapMaterial=ix(e)):this._equirectMaterial===null&&(this._equirectMaterial=ax(e));let i=r?this._cubemapMaterial:this._equirectMaterial;i.fragmentNode.value=e;let a=this._lodMeshes[0];a.material=i;let o=this._cubeSize;this._setViewport(t,0,0,3*o,2*o),n.setRenderTarget(t),n.render(a,Vb)}_applyPMREM(e){let t=this._renderer,n=t.autoClear;t.autoClear=!1;let r=this._lodMeshes.length;for(let t=1;td-Lb?n-d+Lb:0),m=4*(this._cubeSize-f);e.texture.frame=(e.texture.frame||0)+1,s.envMap.value=e.texture,s.roughness.value=u,s.mipInt.value=d-t,this._setViewport(i,p,m,3*f,2*f),r.setRenderTarget(i),r.render(o,Vb),i.texture.frame=(i.texture.frame||0)+1,s.envMap.value=i.texture,s.roughness.value=0,s.mipInt.value=d-n,this._setViewport(e,p,m,3*f,2*f),r.setRenderTarget(e),r.render(o,Vb)}_blur(e,t,n,r,i){let a=this._pingPongRenderTarget;this._halfBlur(e,a,t,n,r,`latitudinal`,i),this._halfBlur(a,e,n,n,r,`longitudinal`,i)}_halfBlur(e,t,n,r,i,a,o){let s=this._renderer,c=this._blurMaterial;a!==`latitudinal`&&a!==`longitudinal`&&E(`blur direction must be either latitudinal or longitudinal!`);let l=this._lodMeshes[r];l.material=c;let u=Jb.get(c),d=this._sizeLods[n]-1,f=isFinite(i)?Math.PI/(2*d):2*Math.PI/(2*zb-1),p=i/f,m=isFinite(i)?1+Math.floor(3*p):zb;m>zb&&T(`sigmaRadians, ${i}, is too large and will clip, as it requested ${m} samples when the maximum is set to ${zb}`);let h=[],g=0;for(let e=0;e_-Lb?r-_+Lb:0),b=4*(this._cubeSize-v);this._setViewport(t,y,b,3*v,2*v),s.setRenderTarget(t),s.render(l,Vb)}_setViewport(e,t,n,r,i){this._renderer.isWebGLRenderer?(e.viewport.set(t,e.height-i-n,r,i),e.scissor.set(t,e.height-i-n,r,i)):(e.viewport.set(t,n,r,i),e.scissor.set(t,n,r,i))}};function $b(e){let t=[],n=[],r=[],i=e,a=e-Lb+1+Rb.length;for(let o=0;oe-Lb?s=Rb[o-e+Lb-1]:o===0&&(s=0),n.push(s);let c=1/(a-2),l=-c,u=1+c,d=[l,l,u,l,u,u,l,l,u,u,l,u],f=new Float32Array(108),p=new Float32Array(72),m=new Float32Array(36);for(let e=0;e<6;e++){let t=e%3*2/3-1,n=e>2?0:-1,r=[t,n,0,t+2/3,n,0,t+2/3,n+1,0,t,n,0,t+2/3,n+1,0,t,n+1,0],i=Yb[e];f.set(r,18*i),p.set(d,12*i);let a=[i,i,i,i,i,i];m.set(a,6*i)}let h=new ii;h.setAttribute(`position`,new Hr(f,3)),h.setAttribute(`uv`,new Hr(p,2)),h.setAttribute(`faceIndex`,new Hr(m,1)),r.push(new ji(h,null)),i>Lb&&i--}return{lodMeshes:r,sizeLods:t,sigmas:n}}function ex(e,t,n){let r=new Sn(e,t,{magFilter:l,minFilter:l,generateMipmaps:!1,type:b,format:re,colorSpace:nt,depthBuffer:n});return r.texture.mapping=306,r.texture.name=`PMREM.cubeUv`,r.texture.isPMREMTexture=!0,r.scissorTest=!0,r}function tx(e){let t=new Av;return t.depthTest=!1,t.depthWrite=!1,t.blending=0,t.name=`PMREM_${e}`,t}function nx(e,t,n){let r=qp(Array(zb).fill(0)),i=q(new k(0,1,0)),a=q(0),o=B(zb),s=q(0),c={n:o,latitudinal:s,weights:r,poleAxis:i,outputDirection:Zb,dTheta:a,samples:q(1),envMap:Lp(),mipInt:q(0),CUBEUV_TEXEL_WIDTH:B(1/t),CUBEUV_TEXEL_HEIGHT:B(1/n),CUBEUV_MAX_MIP:B(e)},l=tx(`blur`);return l.fragmentNode=Mb({...c,latitudinal:s.equal(1)}),Jb.set(l,c),l}function rx(e,t,n){let r={envMap:Lp(),roughness:q(0),mipInt:q(0),CUBEUV_TEXEL_WIDTH:B(1/t),CUBEUV_TEXEL_HEIGHT:B(1/n),CUBEUV_MAX_MIP:B(e)},i=tx(`ggx`);return i.fragmentNode=Ib({...r,N_immutable:Zb,GGX_SAMPLES:H(Bb)}),Jb.set(i,r),i}function ix(e){let t=tx(`cubemap`);return t.fragmentNode=Nh(e,Zb),t}function ax(e){let t=tx(`equirect`);return t.fragmentNode=Lp(e,qv(Zb),0),t}var ox=new WeakMap;function sx(e){let t=Math.log2(e)-2,n=1/e;return{texelWidth:1/(3*Math.max(2**t,112)),texelHeight:n,maxMip:t}}function cx(e,t,n){let r=lx(t),i=r.get(e);if((i===void 0?-1:i.pmremVersion)!==e.pmremVersion){let t=e.image;if(e.isCubeTexture)if(dx(t))i=n.fromCubemap(e,i);else return null;else if(fx(t))i=n.fromEquirectangular(e,i);else return null;if(i.pmremVersion=e.pmremVersion,r.has(e)===!1){let t=()=>{e.removeEventListener(`dispose`,t);let n=r.get(e);n!==void 0&&(n.dispose(),r.delete(e))};e.addEventListener(`dispose`,t)}r.set(e,i)}return i.texture}function lx(e){let t=ox.get(e);return t===void 0&&(t=new WeakMap,ox.set(e,t)),t}var ux=class extends sc{static get type(){return`PMREMNode`}constructor(e,t=null,n=null){super(`vec3`),this._value=e,this._pmrem=null,this.uvNode=t,this.levelNode=n,this._generator=null;let r=new bn;r.isRenderTargetTexture=!0,this._texture=Lp(r),this._width=q(0),this._height=q(0),this._maxMip=q(0),this.updateBeforeType=M.RENDER}set value(e){this._value=e,this._pmrem=null}get value(){return this._value}updateFromTexture(e){let t=sx(e.image.height);this._texture.value=e,this._width.value=t.texelWidth,this._height.value=t.texelHeight,this._maxMip.value=t.maxMip}updateBefore(e){let t=this._pmrem,n=t?t.pmremVersion:-1,r=this._value;n!==r.pmremVersion&&(t=r.isPMREMTexture===!0||r.mapping===306?r:cx(r,e.renderer,this._generator),t!==null&&(this._pmrem=t,this.updateFromTexture(t)))}setup(e){this._generator===null&&(this._generator=new Qb(e.renderer)),this.updateBefore(e);let t=this.uvNode;t===null&&e.context.getUV&&(t=e.context.getUV(this,e)),t=this._pmrem.isRenderTargetTexture?Eh.mul(W(t.x,t.y.negate(),t.z)):Eh.mul(t);let n=this.levelNode;return n===null&&e.context.getTextureLevel&&(n=e.context.getTextureLevel(this)),kb(this._texture,t,n,this._width,this._height,this._maxMip)}dispose(){super.dispose(),this._generator!==null&&this._generator.dispose()}};function dx(e){if(e==null)return!1;let t=0;for(let n=0;n<6;n++)e[n]!==void 0&&t++;return t===6}function fx(e){return e!=null&&e.height>0}var px=el(ux).setParameterLength(1,3),mx=new WeakMap,hx=class extends Y_{static get type(){return`EnvironmentNode`}constructor(e=null){super(),this.envNode=e}setup(e){let{material:t}=e,n=this.envNode;if(n.isTextureNode||n.isMaterialReferenceNode){let r=n.isTextureNode?n.value:t[n.property],i=this._getPMREMNodeCache(e.renderer),a=i.get(r);a===void 0&&(a=px(r),i.set(r,a)),n=a}let r=t.useAnisotropy===!0||t.anisotropy>0?pg:hh,i=n.context(gx(Ml,r)).mul(Th),a=n.context(_x(gh)).mul(Math.PI).mul(Th),o=lp(i),s=lp(a);e.context.radiance.addAssign(o),e.context.iblIrradiance.addAssign(s);let c=e.context.lightingModel.clearcoatRadiance;if(c){let e=lp(n.context(gx(Fl,_h)).mul(Th));c.addAssign(e)}}_getPMREMNodeCache(e){let t=mx.get(e);return t===void 0&&(t=new WeakMap,mx.set(e,t)),t}},gx=(e,t)=>{let n=null;return{getUV:()=>(n===null&&(n=ah.negate().reflect(t),n=Kd(e).mix(n,t).normalize(),n=n.transformDirection(Dm)),n),getTextureLevel:()=>e}},_x=e=>({getUV:()=>e,getTextureLevel:()=>B(1)}),vx=new pa,yx=class extends Av{static get type(){return`MeshStandardNodeMaterial`}constructor(e){super(),this.isMeshStandardNodeMaterial=!0,this.lights=!0,this.emissiveNode=null,this.metalnessNode=null,this.roughnessNode=null,this.setDefaultValues(vx),this.setValues(e)}setupEnvironment(e){let t=super.setupEnvironment(e);return t===null&&e.environmentNode&&(t=e.environmentNode),t?new hx(t):null}setupLightingModel(){return new fb}setupSpecular(){let e=Qd(W(.04),kl.rgb,Nl);Gl.assign(W(.04)),Kl.assign(e),ql.assign(1)}setupVariants(){let e=this.metalnessNode?B(this.metalnessNode):Fg;Nl.assign(e);let t=this.roughnessNode?B(this.roughnessNode):Pg;t=yy({roughness:t}),Ml.assign(t),this.setupSpecular(),Al.assign(kl.rgb.mul(e.oneMinus()))}},bx=new ma,xx=class extends yx{static get type(){return`MeshPhysicalNodeMaterial`}constructor(e){super(),this.isMeshPhysicalNodeMaterial=!0,this.clearcoatNode=null,this.clearcoatRoughnessNode=null,this.clearcoatNormalNode=null,this.sheenNode=null,this.sheenRoughnessNode=null,this.iridescenceNode=null,this.iridescenceIORNode=null,this.iridescenceThicknessNode=null,this.specularIntensityNode=null,this.specularColorNode=null,this.iorNode=null,this.transmissionNode=null,this.thicknessNode=null,this.attenuationDistanceNode=null,this.attenuationColorNode=null,this.dispersionNode=null,this.anisotropyNode=null,this.setDefaultValues(bx),this.setValues(e)}get useClearcoat(){return this.clearcoat>0||this.clearcoatNode!==null}get useIridescence(){return this.iridescence>0||this.iridescenceNode!==null}get useSheen(){return this.sheen>0||this.sheenNode!==null}get useAnisotropy(){return this.anisotropy>0||this.anisotropyNode!==null}get useTransmission(){return this.transmission>0||this.transmissionNode!==null}get useDispersion(){return this.dispersion>0||this.dispersionNode!==null}setupSpecular(){let e=this.iorNode?B(this.iorNode):Yg;$l.assign(e),Gl.assign(Fd(Wd($l.sub(1).div($l.add(1))).mul(jg),W(1)).mul(Ag)),Kl.assign(Qd(Gl,kl.rgb,Nl)),ql.assign(Qd(Ag,1,Nl))}setupLightingModel(){return new fb(this.useClearcoat,this.useSheen,this.useIridescence,this.useAnisotropy,this.useTransmission,this.useDispersion)}setupVariants(e){if(super.setupVariants(e),this.useClearcoat){let e=this.clearcoatNode?B(this.clearcoatNode):Lg,t=this.clearcoatRoughnessNode?B(this.clearcoatRoughnessNode):Rg;Pl.assign(e),Fl.assign(yy({roughness:t}))}if(this.useSheen){let e=this.sheenNode?W(this.sheenNode):Vg,t=this.sheenRoughnessNode?B(this.sheenRoughnessNode):Hg;Il.assign(e),Ll.assign(t)}if(this.useIridescence){let e=this.iridescenceNode?B(this.iridescenceNode):Wg,t=this.iridescenceIORNode?B(this.iridescenceIORNode):Gg,n=this.iridescenceThicknessNode?B(this.iridescenceThicknessNode):Kg;Rl.assign(e),zl.assign(t),Bl.assign(n)}if(this.useAnisotropy){let e=(this.anisotropyNode?U(this.anisotropyNode):Ug).toVar();Hl.assign(e.length()),z(Hl.equal(0),()=>{e.assign(U(1,0))}).Else(()=>{e.divAssign(U(Hl)),Hl.assign(Hl.saturate())}),Vl.assign(Hl.pow2().mix(Ml.pow2(),1)),Ul.assign(ug[0].mul(e.x).add(ug[1].mul(e.y))),Wl.assign(ug[1].mul(e.x).sub(ug[0].mul(e.y)))}if(this.useTransmission){let e=this.transmissionNode?B(this.transmissionNode):qg,t=this.thicknessNode?B(this.thicknessNode):Jg,n=this.attenuationDistanceNode?B(this.attenuationDistanceNode):Xg,r=this.attenuationColorNode?W(this.attenuationColorNode):Zg;if(eu.assign(e),tu.assign(t),nu.assign(n),ru.assign(r),this.useDispersion){let e=this.dispersionNode?B(this.dispersionNode):i_;iu.assign(e)}}}setupClearcoatNormal(){return this.clearcoatNormalNode?W(this.clearcoatNormalNode):zg}setup(e){e.context.setupClearcoatNormal=()=>Tf(this.setupClearcoatNormal(e),`NORMAL`,`vec3`),super.setup(e)}},Sx=R(({normal:e,lightDirection:t,builder:n})=>{let r=U(e.dot(t).mul(.5).add(.5),0);if(n.material.gradientMap)return W(Bh(`gradientMap`,`texture`).context({getUV:()=>r}).r);{let e=r.fwidth().mul(.5);return Qd(W(.7),W(1),nf(B(.7).sub(e.x),B(.7).add(e.x),r.x))}}),Cx=class extends iy{direct({lightDirection:e,lightColor:t,reflectedLight:n},r){let i=Sx({normal:uh,lightDirection:e,builder:r}).mul(t);n.directDiffuse.addAssign(i.mul(ly({diffuseColor:kl.rgb})))}indirect(e){let{ambientOcclusion:t,irradiance:n,reflectedLight:r}=e.context;r.indirectDiffuse.addAssign(n.mul(ly({diffuseColor:kl}))),r.indirectDiffuse.mulAssign(t)}},wx=new ga,Tx=class extends Av{static get type(){return`MeshToonNodeMaterial`}constructor(e){super(),this.isMeshToonNodeMaterial=!0,this.lights=!0,this.setDefaultValues(wx),this.setValues(e)}setupLightingModel(){return new Cx}},Ex=R(()=>{let e=W(ah.z,0,ah.x.negate()).normalize(),t=ah.cross(e);return U(e.dot(hh),t.dot(hh)).mul(.495).add(.5)}).once([`NORMAL`,`VERTEX`])().toVar(`matcapUV`),Dx=new ya,Ox=class extends Av{static get type(){return`MeshMatcapNodeMaterial`}constructor(e){super(),this.isMeshMatcapNodeMaterial=!0,this.setDefaultValues(Dx),this.setValues(e)}setupVariants(e){let t=Ex,n;n=e.material.matcap?Bh(`matcap`,`texture`).context({getUV:()=>t}):W(Qd(.2,.8,t.y)),kl.rgb.mulAssign(n.rgb)}},kx=el(class extends sc{static get type(){return`RotateNode`}constructor(e,t){super(),this.positionNode=e,this.rotationNode=t}generateNodeType(e){return this.positionNode.getNodeType(e)}setup(e){let{rotationNode:t,positionNode:n}=this;if(this.getNodeType(e)===`vec2`){let e=t.cos(),r=t.sin();return yl(e,r,r.negate(),e).mul(n)}else{let e=t,r=xl(G(1,0,0,0),G(0,dd(e.x),ld(e.x).negate(),0),G(0,ld(e.x),dd(e.x),0),G(0,0,0,1)),i=xl(G(dd(e.y),0,ld(e.y),0),G(0,1,0,0),G(ld(e.y).negate(),0,dd(e.y),0),G(0,0,0,1)),a=xl(G(dd(e.z),ld(e.z).negate(),0,0),G(ld(e.z),dd(e.z),0,0),G(0,0,1,0),G(0,0,0,1));return r.mul(i).mul(a).mul(G(n,1)).xyz}}}).setParameterLength(2),Ax=new ui,jx=class extends Av{static get type(){return`SpriteNodeMaterial`}constructor(e){super(),this.isSpriteNodeMaterial=!0,this._useSizeAttenuation=!0,this.positionNode=null,this.rotationNode=null,this.scaleNode=null,this.transparent=!0,this.setDefaultValues(Ax),this.setValues(e)}setupPositionView(e){let{object:t,camera:n}=e,{positionNode:r,rotationNode:i,scaleNode:a,sizeAttenuation:o}=this,s=Jm.mul(W(r||0)),c=U(Vm[0].xyz.length(),Vm[1].xyz.length());a!==null&&(c=c.mul(U(a))),n.isPerspectiveCamera&&o===!1&&(c=c.mul(s.z.negate()));let l=$m.xy;if(t.center&&t.center.isVector2===!0){let e=Rf(`center`,`vec2`,t);l=l.sub(e.sub(.5))}l=l.mul(c);let u=B(i||Bg),d=kx(l,u);return G(s.xy.add(d),s.zw)}get sizeAttenuation(){return this._useSizeAttenuation}set sizeAttenuation(e){this._useSizeAttenuation!==e&&(this._useSizeAttenuation=e,this.needsUpdate=!0)}},Mx=new ta,Nx=new O,Px=class extends jx{static get type(){return`PointsNodeMaterial`}constructor(e){super(),this.sizeNode=null,this.isPointsNodeMaterial=!0,this.setDefaultValues(Mx),this.setValues(e)}setupPositionView(){let{positionNode:e}=this;return Jm.mul(W(e||eh)).xyz}setupVertexSprite(e){let{material:t,camera:n}=e,{rotationNode:r,scaleNode:i,sizeNode:a,sizeAttenuation:o}=this,s=super.setupVertex(e);if(t.isNodeMaterial!==!0)return s;let c=a===null?r_:U(a);c=c.mul(Qp),n.isPerspectiveCamera&&o===!0&&(c=c.mul(Fx.div(ih.z.negate()))),i&&i.isNode&&(c=c.mul(U(i)));let l=$m.xy;if(r&&r.isNode){let e=B(r);l=kx(l,e)}return l=l.mul(c),l=l.div(rm.div(2)),l=l.mul(s.w),s=s.add(G(l,0,0)),s}setupVertex(e){return e.object.isPoints?super.setupVertex(e):this.setupVertexSprite(e)}get alphaToCoverage(){return this._useAlphaToCoverage}set alphaToCoverage(e){this._useAlphaToCoverage!==e&&(this._useAlphaToCoverage=e,this.needsUpdate=!0)}},Fx=q(1).onFrameUpdate(function({renderer:e}){let t=e.getSize(Nx);this.value=.5*t.y}),Ix=class extends iy{constructor(){super(),this.shadowNode=B(1).toVar(`shadowMask`)}direct({lightNode:e}){e.shadowNode!==null&&this.shadowNode.mulAssign(e.shadowNode)}finish({context:e}){kl.a.mulAssign(this.shadowNode.oneMinus()),e.outgoingLight.rgb.assign(kl.rgb)}},Lx=new fa,Rx=class extends Av{static get type(){return`ShadowNodeMaterial`}constructor(e){super(),this.isShadowNodeMaterial=!0,this.lights=!0,this.transparent=!0,this.setDefaultValues(Lx),this.setValues(e)}setupLightingModel(){return new Ix}};Dl(`vec3`),Dl(`vec3`),Dl(`vec3`);var zx=class{constructor(e,t,n){this.renderer=e,this.nodes=t,this.info=n,this._context=typeof self<`u`?self:null,this._animationLoop=null,this._requestId=null}start(){let e=(t,n)=>{this._requestId=this._context.requestAnimationFrame(e),this.info.autoReset===!0&&this.info.reset(),this.nodes.nodeFrame.update(),this.info.frame=this.nodes.nodeFrame.frameId,this.renderer._inspector.begin(),this._animationLoop!==null&&this._animationLoop(t,n),this.renderer._inspector.finish()};e()}stop(){this._context!==null&&this._context.cancelAnimationFrame(this._requestId),this._requestId=null}getAnimationLoop(){return this._animationLoop}setAnimationLoop(e){this._animationLoop=e}getContext(){return this._context}setContext(e){this._context=e}dispose(){this.stop()}},Bx=class{constructor(){this.weakMaps={}}_getWeakMap(e){let t=e.length,n=this.weakMaps[t];return n===void 0&&(n=new WeakMap,this.weakMaps[t]=n),n}get(e){let t=this._getWeakMap(e);for(let n=0;n{this.dispose()},this.onGeometryDispose=()=>{this.attributes=null,this.attributesId=null},this.material.addEventListener(`dispose`,this.onMaterialDispose),this.geometry.addEventListener(`dispose`,this.onGeometryDispose),this._sourceMaterial!==null&&this._sourceMaterial.addEventListener(`dispose`,this.onMaterialDispose)}updateClipping(e){this.clippingContext=e}get clippingNeedsUpdate(){return this.clippingContext===null||this.clippingContext.cacheKey===this.clippingContextCacheKey?!1:(this.clippingContextCacheKey=this.clippingContext.cacheKey,!0)}get hardwareClippingPlanes(){return this.getNodeBuilderState().hardwareClipping===!0?this.clippingContext.unionClippingCount:0}getNodeBuilderState(){return this._nodeBuilderState||=this._nodes.getForRender(this)}getMonitor(){return this._monitor||=this.getNodeBuilderState().observer}getBindings(){return this._bindings||=this.getNodeBuilderState().createBindings()}getBindingGroup(e){for(let t of this.getBindings())if(t.name===e)return t}getIndex(){return this._geometries.getIndex(this)}getIndirect(){return this._geometries.getIndirect(this)}getIndirectOffset(){return this._geometries.getIndirectOffset(this)}getChainArray(){return[this.object,this.material,this.context,this.lightsNode]}setGeometry(e){this.geometry=e,this.attributes=null,this.attributesId=null}getAttributes(){if(this.attributes!==null)return this.attributes;let e=this.getNodeBuilderState().nodeAttributes,t=this.geometry,n=[],r=new Set,i={};for(let a of e){let e;if(a.node&&a.node.attribute?e=a.node.attribute:(e=t.getAttribute(a.name),e!==void 0&&(e.isInterleavedBufferAttribute?i[a.name]=e.data.uuid:i[a.name]=e.id)),e===void 0)continue;n.push(e);let o=e.isInterleavedBufferAttribute?e.data:e;r.add(o)}return this.attributes=n,this.attributesId=i,this.vertexBuffers=Array.from(r.values()),n}getVertexBuffers(){return this.vertexBuffers===null&&this.getAttributes(),this.vertexBuffers}getDrawParameters(){let{object:e,material:t,geometry:n,group:r,drawRange:i}=this,a=this.drawParams||={vertexCount:0,firstVertex:0,instanceCount:0,firstInstance:0},o=this.getIndex(),s=o!==null,c=1;if(n.isInstancedBufferGeometry===!0?c=n.instanceCount:e.count!==void 0&&(c=Math.max(0,e.count)),c===0)return null;if(a.instanceCount=c,e.isBatchedMesh===!0)return a;let l=1;t.wireframe===!0&&!e.isPoints&&!e.isLineSegments&&!e.isLine&&!e.isLineLoop&&(l=2);let u=i.start*l,d=(i.start+i.count)*l;r!==null&&(u=Math.max(u,r.start*l),d=Math.min(d,(r.start+r.count)*l));let f=n.attributes.position,p=1/0;s?p=o.count:f!=null&&(p=f.count),u=Math.max(u,0),d=Math.min(d,p);let m=d-u;return m<0||m===1/0?null:(a.vertexCount=m,a.firstVertex=u,a)}getGeometryCacheKey(){let{geometry:e}=this,t=``;for(let n of Object.keys(e.attributes).sort()){let r=e.attributes[n];t+=n+`,`,r.data&&(t+=r.data.stride+`,`),r.offset&&(t+=r.offset+`,`),r.itemSize&&(t+=r.itemSize+`,`),r.normalized&&(t+=`n,`)}for(let n of Object.keys(e.morphAttributes).sort()){let r=e.morphAttributes[n];t+=`morph-`+n+`,`;for(let e=0,n=r.length;e1)&&(r+=e.uuid+`,`),r+=this.context.id+`,`,r+=e.receiveShadow+`,`,Fs(r)}get needsGeometryUpdate(){if(this.geometry.id!==this.object.geometry.id)return!0;if(this.attributes!==null){let e=this.attributesId;for(let t in e){let n=this.geometry.getAttribute(t);if(n===void 0)return!0;let r=n.isInterleavedBufferAttribute?n.data.uuid:n.id;if(e[t]!==r)return!0}}return!1}get needsUpdate(){return this.initialNodesCacheKey!==this.getDynamicCacheKey()||this.clippingNeedsUpdate}getDynamicCacheKey(){let e=0;return this.material.isShadowPassMaterial!==!0&&(e=this._nodes.getCacheKey(this.scene,this.lightsNode)),this.camera.isArrayCamera&&(e=Ls(e,this.camera.cameras.length)),this.object.receiveShadow&&(e=Ls(e,1)),e=Ls(e,this.renderer.contextNode.id,this.renderer.contextNode.version),e}getCacheKey(){return this.getMaterialCacheKey()+this.getDynamicCacheKey()}dispose(){this.material.removeEventListener(`dispose`,this.onMaterialDispose),this.geometry.removeEventListener(`dispose`,this.onGeometryDispose),this._sourceMaterial!==null&&this._sourceMaterial.removeEventListener(`dispose`,this.onMaterialDispose),this.onDispose()}},Gx=[],Kx=class{constructor(e,t,n,r,i,a){this.renderer=e,this.nodes=t,this.geometries=n,this.pipelines=r,this.bindings=i,this.info=a,this.chainMaps={}}get(e,t,n,r,i,a,o,s){let c=this.getChainMap(s);Gx[0]=e,Gx[1]=t,Gx[2]=a,Gx[3]=i;let l=c.get(Gx);return l===void 0?(l=this.createRenderObject(this.nodes,this.geometries,this.renderer,e,t,n,r,i,a,o,s),c.set(Gx,l)):(l.camera=r,l.updateClipping(o),l.needsGeometryUpdate&&l.setGeometry(e.geometry),(l.version!==t.version||l.needsUpdate)&&(l.initialCacheKey===l.getCacheKey()?l.version=t.version:(l.dispose(),l=this.get(e,t,n,r,i,a,o,s)))),Gx[0]=null,Gx[1]=null,Gx[2]=null,Gx[3]=null,l}getChainMap(e=`default`){return this.chainMaps[e]||(this.chainMaps[e]=new Bx)}dispose(){this.chainMaps={}}createRenderObject(e,t,n,r,i,a,o,s,c,l,u){let d=this.getChainMap(u),f=new Wx(e,t,n,r,i,a,o,s,c,l);return f.onDispose=()=>{this.pipelines.delete(f),this.bindings.deleteForRender(f),this.nodes.delete(f),d.delete(f.getChainArray())},f}},qx=class{constructor(){this.data=new WeakMap}get(e){let t=this.data.get(e);return t===void 0&&(t={},this.data.set(e,t)),t}delete(e){let t=null;return this.data.has(e)&&(t=this.data.get(e),this.data.delete(e)),t}has(e){return this.data.has(e)}dispose(){this.data=new WeakMap}},Jx={VERTEX:1,INDEX:2,STORAGE:3,INDIRECT:4},Yx=16,Xx=211,Zx=212,Qx=class extends qx{constructor(e,t){super(),this.backend=e,this.info=t}delete(e){let t=super.delete(e);return t!==null&&(this.backend.destroyAttribute(e),this.info.destroyAttribute(e)),t}update(e,t){let n=this.get(e);if(n.version===void 0)t===Jx.VERTEX?(this.backend.createAttribute(e),this.info.createAttribute(e)):t===Jx.INDEX?(this.backend.createIndexAttribute(e),this.info.createIndexAttribute(e)):t===Jx.STORAGE?(this.backend.createStorageAttribute(e),this.info.createStorageAttribute(e)):t===Jx.INDIRECT&&(this.backend.createIndirectStorageAttribute(e),this.info.createIndirectStorageAttribute(e)),n.version=this._getBufferAttribute(e).version;else{let t=this._getBufferAttribute(e);(n.version=65535?Wr:Ur)(t,1);return i.version=$x(e),i.__id=eS(e),i}var nS=class extends qx{constructor(e,t){super(),this.attributes=e,this.info=t,this.wireframes=new WeakMap,this.attributeCall=new WeakMap,this._geometryDisposeListeners=new Map}has(e){let t=e.geometry;return super.has(t)&&this.get(t).initialized===!0}updateForRender(e){this.has(e)===!1&&this.initGeometry(e),this.updateAttributes(e)}initGeometry(e){let t=e.geometry,n=this.get(t);n.initialized=!0,this.info.memory.geometries++;let r=()=>{this.info.memory.geometries--;let n=t.index,i=e.getAttributes();n!==null&&this.attributes.delete(n);for(let e of i)this.attributes.delete(e);let a=this.wireframes.get(t);a!==void 0&&this.attributes.delete(a),t.removeEventListener(`dispose`,r),this._geometryDisposeListeners.delete(t)};t.addEventListener(`dispose`,r),this._geometryDisposeListeners.set(t,r)}updateAttributes(e){let t=e.getAttributes();for(let e of t)e.isStorageBufferAttribute||e.isStorageInstancedBufferAttribute?this.updateAttribute(e,Jx.STORAGE):this.updateAttribute(e,Jx.VERTEX);let n=this.getIndex(e);n!==null&&this.updateAttribute(n,Jx.INDEX);let r=e.geometry.indirect;r!==null&&this.updateAttribute(r,Jx.INDIRECT)}updateAttribute(e,t){let n=this.info.render.calls;e.isInterleavedBufferAttribute?this.attributeCall.get(e)===void 0?(this.attributes.update(e,t),this.attributeCall.set(e,n)):this.attributeCall.get(e.data)!==n&&(this.attributes.update(e,t),this.attributeCall.set(e.data,n),this.attributeCall.set(e,n)):this.attributeCall.get(e)!==n&&(this.attributes.update(e,t),this.attributeCall.set(e,n))}getIndirect(e){return e.geometry.indirect}getIndirectOffset(e){return e.geometry.indirectOffset}getIndex(e){let{geometry:t,material:n}=e,r=t.index;if(n.wireframe===!0){let e=this.wireframes,n=e.get(t);n===void 0?(n=tS(t),e.set(t,n)):(n.version!==$x(t)||n.__id!==eS(t))&&(this.attributes.delete(n),n=tS(t),e.set(t,n)),r=n}return r}dispose(){for(let[e,t]of this._geometryDisposeListeners.entries())e.removeEventListener(`dispose`,t);this._geometryDisposeListeners.clear()}},rS=class{constructor(){this.autoReset=!0,this.frame=0,this.calls=0,this.render={calls:0,frameCalls:0,drawCalls:0,triangles:0,points:0,lines:0,timestamp:0},this.compute={calls:0,frameCalls:0,timestamp:0},this.memory={attributes:0,attributesSize:0,geometries:0,indexAttributes:0,indexAttributesSize:0,indirectStorageAttributes:0,indirectStorageAttributesSize:0,programs:0,programsSize:0,readbackBuffers:0,readbackBuffersSize:0,renderTargets:0,storageAttributes:0,storageAttributesSize:0,textures:0,texturesSize:0,uniformBuffers:0,uniformBuffersSize:0,total:0},this.memoryMap=new Map}update(e,t,n){this.render.drawCalls++,e.isMesh||e.isSprite?this.render.triangles+=t/3*n:e.isPoints?this.render.points+=n*t:e.isLineSegments?this.render.lines+=t/2*n:e.isLine?this.render.lines+=n*(t-1):E(`WebGPUInfo: Unknown object type.`)}reset(){this.render.drawCalls=0,this.render.frameCalls=0,this.compute.frameCalls=0,this.render.triangles=0,this.render.points=0,this.render.lines=0}dispose(){this.reset(),this.calls=0,this.render.calls=0,this.compute.calls=0,this.render.timestamp=0,this.compute.timestamp=0;for(let e in this.memory)this.memory[e]=0;this.memoryMap.clear()}createTexture(e){let t=this._getTextureMemorySize(e);this.memoryMap.set(e,t),this.memory.textures++,this.memory.total+=t,this.memory.texturesSize+=t}destroyTexture(e){let t=this.memoryMap.get(e)||0;this.memoryMap.delete(e),this.memory.textures--,this.memory.total-=t,this.memory.texturesSize-=t}_createAttribute(e,t){let n=this._getAttributeMemorySize(e);this.memoryMap.set(e,{size:n,type:t}),this.memory[t]++,this.memory.total+=n,this.memory[t+`Size`]+=n}createAttribute(e){this._createAttribute(e,`attributes`)}createIndexAttribute(e){this._createAttribute(e,`indexAttributes`)}createStorageAttribute(e){this._createAttribute(e,`storageAttributes`)}createIndirectStorageAttribute(e){this._createAttribute(e,`indirectStorageAttributes`)}destroyAttribute(e){let t=this.memoryMap.get(e);t&&(this.memoryMap.delete(e),this.memory[t.type]--,this.memory.total-=t.size,this.memory[t.type+`Size`]-=t.size)}createReadbackBuffer(e){let t=e.maxByteLength;this.memoryMap.set(e,{size:t,type:`readbackBuffers`}),this.memory.readbackBuffers++,this.memory.total+=t,this.memory.readbackBuffersSize+=t}destroyReadbackBuffer(e){let{size:t}=this.memoryMap.get(e);this.memoryMap.delete(e),this.memory.readbackBuffers--,this.memory.total-=t,this.memory.readbackBuffersSize-=t}createUniformBuffer(e){let t=e.byteLength;this.memoryMap.set(e,{size:t,type:`uniformBuffers`}),this.memory.uniformBuffers++,this.memory.total+=t,this.memory.uniformBuffersSize+=t}destroyUniformBuffer(e){let t=this.memoryMap.get(e);t&&(this.memoryMap.delete(e),this.memory.uniformBuffers--,this.memory.total-=t.size,this.memory.uniformBuffersSize-=t.size)}createProgram(e){let t=e.code.length;this.memoryMap.set(e,t),this.memory.programs++,this.memory.total+=t,this.memory.programsSize+=t}destroyProgram(e){let t=this.memoryMap.get(e)||0;this.memoryMap.delete(e),this.memory.programs--,this.memory.total-=t,this.memory.programsSize-=t}_getTextureMemorySize(e){if(e.isCompressedTexture)return 1;let t=1;e.type===1010||e.type===1009?t=1:e.type===1011||e.type===1012||e.type===1016?t=2:(e.type===1013||e.type===1014||e.type===1015)&&(t=4);let n=4;e.format===1021||e.format===1028||e.format===1029||e.format===1026||e.format===1027?n=1:e.format===1030||e.format===1031?n=2:(e.format===1022||e.format===1032)&&(n=3);let r=t*n;e.type===1017||e.type===1018?r=2:(e.type===1020||e.type===35902||e.type===35899)&&(r=4);let i=e.width||1,a=e.height||1,o=e.isCubeTexture?6:e.depth||1,s=i*a*o*r,c=e.mipmaps;if(c&&c.length>0){let e=0;for(let t=0;t>t),c=n.height||Math.max(1,a>>t);e+=s*c*o*r}}s+=e}else e.generateMipmaps&&(s*=1.333);return Math.round(s)}_getAttributeMemorySize(e){return e.isInterleavedBufferAttribute&&(e=e.data),e.array?e.array.byteLength:e.count&&e.itemSize?e.count*e.itemSize*4:0}},iS=class{constructor(e){this.cacheKey=e,this.usedTimes=0}},aS=class extends iS{constructor(e,t,n){super(e),this.vertexProgram=t,this.fragmentProgram=n}},oS=class extends iS{constructor(e,t){super(e),this.computeProgram=t,this.isComputePipeline=!0}},sS=0,cS=class{constructor(e,t,n,r=null,i=null){this.id=sS++,this.code=e,this.stage=t,this.name=n,this.transforms=r,this.attributes=i,this.usedTimes=0}},lS=class extends qx{constructor(e,t,n){super(),this.backend=e,this.nodes=t,this.info=n,this.bindings=null,this.caches=new Map,this.programs={vertex:new Map,fragment:new Map,compute:new Map}}getForCompute(e,t){let{backend:n}=this,r=this.get(e);if(this._needsComputeUpdate(e)){let i=r.pipeline;i&&(i.usedTimes--,i.computeProgram.usedTimes--);let a=this.nodes.getForCompute(e),o=this.programs.compute.get(a.computeShader);o===void 0&&(i&&i.computeProgram.usedTimes===0&&this._releaseProgram(i.computeProgram),o=new cS(a.computeShader,`compute`,e.name,a.transforms,a.nodeAttributes),this.programs.compute.set(a.computeShader,o),n.createProgram(o),this.info.createProgram(o));let s=this._getComputeCacheKey(e,o),c=this.caches.get(s);c===void 0&&(i&&i.usedTimes===0&&this._releasePipeline(i),c=this._getComputePipeline(e,o,s,t)),c.usedTimes++,o.usedTimes++,r.version=e.version,r.pipeline=c}return r.pipeline}getForRender(e,t=null){let{backend:n}=this,r=this.get(e);if(this._needsRenderUpdate(e)){let i=r.pipeline;i&&(i.usedTimes--,i.vertexProgram.usedTimes--,i.fragmentProgram.usedTimes--);let a=e.getNodeBuilderState(),o=e.material?e.material.name:``,s=this.programs.vertex.get(a.vertexShader);s===void 0&&(i&&i.vertexProgram.usedTimes===0&&this._releaseProgram(i.vertexProgram),s=new cS(a.vertexShader,`vertex`,o),this.programs.vertex.set(a.vertexShader,s),n.createProgram(s),this.info.createProgram(s));let c=this.programs.fragment.get(a.fragmentShader);c===void 0&&(i&&i.fragmentProgram.usedTimes===0&&this._releaseProgram(i.fragmentProgram),c=new cS(a.fragmentShader,`fragment`,o),this.programs.fragment.set(a.fragmentShader,c),n.createProgram(c),this.info.createProgram(c));let l=this._getRenderCacheKey(e,s,c),u=this.caches.get(l);u===void 0?(i&&i.usedTimes===0&&this._releasePipeline(i),u=this._getRenderPipeline(e,s,c,l,t)):e.pipeline=u,u.usedTimes++,s.usedTimes++,c.usedTimes++,r.pipeline=u}return r.pipeline}isReady(e){let t=this.get(e).pipeline;if(t===void 0)return!1;let n=this.backend.get(t);return n.pipeline!==void 0&&n.pipeline!==null}delete(e){let t=this.get(e).pipeline;return t&&(t.usedTimes--,t.usedTimes===0&&this._releasePipeline(t),t.isComputePipeline?(t.computeProgram.usedTimes--,t.computeProgram.usedTimes===0&&this._releaseProgram(t.computeProgram)):(t.fragmentProgram.usedTimes--,t.vertexProgram.usedTimes--,t.vertexProgram.usedTimes===0&&this._releaseProgram(t.vertexProgram),t.fragmentProgram.usedTimes===0&&this._releaseProgram(t.fragmentProgram))),super.delete(e)}dispose(){super.dispose(),this.caches=new Map,this.programs={vertex:new Map,fragment:new Map,compute:new Map}}updateForRender(e){this.getForRender(e)}_getComputePipeline(e,t,n,r){n||=this._getComputeCacheKey(e,t);let i=this.caches.get(n);return i===void 0&&(i=new oS(n,t),this.caches.set(n,i),this.backend.createComputePipeline(i,r)),i}_getRenderPipeline(e,t,n,r,i){r||=this._getRenderCacheKey(e,t,n);let a=this.caches.get(r);return a===void 0&&(a=new aS(r,t,n),this.caches.set(r,a),e.pipeline=a,this.backend.createRenderPipeline(e,i)),a}_getComputeCacheKey(e,t){return e.id+`,`+t.id}_getRenderCacheKey(e,t,n){return t.id+`,`+n.id+`,`+this.backend.getRenderCacheKey(e)}_releasePipeline(e){this.caches.delete(e.cacheKey)}_releaseProgram(e){let t=e.code,n=e.stage;this.programs[n].delete(t),this.info.destroyProgram(e)}_needsComputeUpdate(e){let t=this.get(e);return t.pipeline===void 0||t.version!==e.version}_needsRenderUpdate(e){return this.get(e).pipeline===void 0||this.backend.needsRenderUpdate(e)}},uS=class extends qx{constructor(e,t,n,r,i,a){super(),this.backend=e,this.textures=n,this.pipelines=i,this.attributes=r,this.nodes=t,this.info=a,this.pipelines.bindings=this}getForRender(e){let t=e.getBindings(),n=this.get(e);return n.initialized!==!0&&(this._createBindings(t),n.initialized=!0),t}getForCompute(e){let t=this.nodes.getForCompute(e).bindings,n=this.get(e);return(n.initialized!==!0||n.bindings!==t)&&(n.bindings!==void 0&&this._destroyBindings(n.bindings),this._createBindings(t),n.initialized=!0,n.bindings=t),t}updateForCompute(e){this._updateBindings(this.getForCompute(e))}updateForRender(e){this._updateBindings(this.getForRender(e))}deleteForCompute(e){let t=this.get(e).bindings||this.nodes.getForCompute(e).bindings;this._destroyBindings(t),this.delete(e)}deleteForRender(e){let t=e.getBindings();this._destroyBindings(t),this.delete(e)}_createBindings(e){for(let t of e){let n=this.get(t);if(n.bindGroup===void 0){for(let e of t.bindings)if(e.isUniformBuffer)this.backend.createUniformBuffer(e),this.info.createUniformBuffer(e);else if(e.isSampledTexture)this.textures.updateTexture(e.texture);else if(e.isSampler)this.textures.updateSampler(e);else if(e.isStorageBuffer){let t=e.attribute,n=t.isIndirectStorageBufferAttribute?Jx.INDIRECT:Jx.STORAGE;this.attributes.update(t,n)}this.backend.createBindings(t,e,0),n.bindGroup=t,n.usedTimes=1}else n.usedTimes++}}_destroyBindings(e){for(let t of e){let e=this.get(t);if(e.usedTimes--,e.usedTimes===0){for(let e of t.bindings)e.isUniformBuffer?(this.backend.destroyUniformBuffer(e),this.info.destroyUniformBuffer(e),e.release()):e.isSampler&&(e.isSampledTexture!==!0&&this.backend.destroySampler(e),e.release());this.backend.deleteBindGroupData(t),this.delete(t)}}}_updateBindings(e){for(let t of e)this._update(t,e)}_update(e,t){let{backend:n}=this,r=!1,i=!0,a=0,o=0;for(let t of e.bindings)if(this.nodes.updateGroup(t)!==!1){if(t.isStorageBuffer){let e=t.attribute,i=e.isIndirectStorageBufferAttribute?Jx.INDIRECT:Jx.STORAGE,a=n.get(t);this.attributes.update(e,i),a.attribute!==e&&(a.attribute=e,r=!0)}if(t.isUniformBuffer)t.update()&&n.updateBinding(t);else if(t.isSampledTexture){let s=t.update(),c=t.texture,l=this.textures.get(c);if(s&&(this.textures.updateTexture(c),t.generation!==l.generation&&(t.generation=l.generation,r=!0),l.bindGroups.add(e)),n.get(c).externalTexture!==void 0||l.isDefaultTexture?i=!1:(a=a*10+c.id,o+=c.version),c.isStorageTexture===!0&&c.mipmapsAutoUpdate===!0){let e=this.get(c);t.store===!0?e.needsMipmap=!0:this.textures.needsMipmaps(c)&&e.needsMipmap===!0&&(this.backend.generateMipmaps(c),e.needsMipmap=!1)}}else if(t.isSampler&&t.update()){let e=this.textures.updateSampler(t);t.samplerKey!==e&&(t.samplerKey=e,r=!0)}t.isBuffer&&t.updateRanges.length>0&&t.clearUpdateRanges()}r===!0&&this.backend.updateBindings(e,t,i?a:0,o)}},dS=Object.freeze([]);function fS(e,t){return e.groupOrder===t.groupOrder?e.renderOrder===t.renderOrder?e.z===t.z?e.id-t.id:e.z-t.z:e.renderOrder-t.renderOrder:e.groupOrder-t.groupOrder}function pS(e,t){return e.groupOrder===t.groupOrder?e.renderOrder===t.renderOrder?e.z===t.z?e.id-t.id:t.z-e.z:e.renderOrder-t.renderOrder:e.groupOrder-t.groupOrder}function mS(e){return(e.transmission>0||e.transmissionNode&&e.transmissionNode.isNode)&&e.side===2&&e.forceSinglePass===!1}var hS=class{constructor(e,t,n){this.renderItems=[],this.renderItemsIndex=0,this.opaque=[],this.transparentDoublePass=[],this.transparent=[],this.bundles=[],this.lighting=e,this.lightsNode=e.getNode(t),this.lightsArray=[],this.scene=t,this.camera=n,this.occlusionQueryCount=0,this._lastOcclusionObject=null}begin(){return this.renderItemsIndex=0,this.opaque.length=0,this.transparentDoublePass.length=0,this.transparent.length=0,this.bundles.length=0,this.lightsArray.length=0,this.occlusionQueryCount=0,this}getNextRenderItem(e,t,n,r,i,a,o){let s=this.renderItems[this.renderItemsIndex];return s===void 0?(s={id:e.id,object:e,geometry:t,material:n,groupOrder:r,renderOrder:e.renderOrder,z:i,group:a,clippingContext:o},this.renderItems[this.renderItemsIndex]=s):(s.id=e.id,s.object=e,s.geometry=t,s.material=n,s.groupOrder=r,s.renderOrder=e.renderOrder,s.z=i,s.group=a,s.clippingContext=o),this.renderItemsIndex++,s}push(e,t,n,r,i,a,o){let s=this.getNextRenderItem(e,t,n,r,i,a,o);e.occlusionTest===!0&&this._lastOcclusionObject!==e&&(this.occlusionQueryCount++,this._lastOcclusionObject=e),n.transparent===!0||n.transmission>0||n.transmissionNode&&n.transmissionNode.isNode||n.backdropNode&&n.backdropNode.isNode?(mS(n)&&this.transparentDoublePass.push(s),this.transparent.push(s)):this.opaque.push(s)}unshift(e,t,n,r,i,a,o){let s=this.getNextRenderItem(e,t,n,r,i,a,o);n.transparent===!0||n.transmission>0||n.transmissionNode&&n.transmissionNode.isNode||n.backdropNode&&n.backdropNode.isNode?(mS(n)&&this.transparentDoublePass.unshift(s),this.transparent.unshift(s)):this.opaque.unshift(s)}pushBundle(e){this.bundles.push(e)}pushLight(e){this.lightsArray.push(e)}sort(e,t,n){this.opaque.length>1&&this.opaque.sort(e||fS),this.transparentDoublePass.length>1&&this.transparentDoublePass.sort(t||pS),this.transparent.length>1&&this.transparent.sort(t||pS),n&&(this.opaque.reverse(),this.transparentDoublePass.reverse(),this.transparent.reverse())}finish(){this.lightsNode.setLights(this.lighting.enabled?this.lightsArray:dS);for(let e=this.renderItemsIndex,t=this.renderItems.length;e>t,c=o.height>>t,l=e.depthTexture||i[t],u=e.depthBuffer===!0||e.stencilBuffer===!0,d=!1,f=l!==void 0&&l.image!==void 0&&l.image.depth>1,p=o.depth>1&&(e.useArrayDepthTexture||e.multiview||f);l===void 0&&u&&(l=new ia,l.format=e.stencilBuffer?ae:ie,l.type=e.stencilBuffer?C:v,l.image.width=s,l.image.height=c,l.image.depth=o.depth,l.renderTarget=e,i[t]=l),l&&(l.isArrayTexture=p),(n.width!==o.width||o.height!==n.height)&&(d=!0,l&&(l.needsUpdate=!0,l.image.width=s,l.image.height=c,l.image.depth=p?o.depth:1)),n.width=o.width,n.height=o.height,n.textures=a,n.depthTexture=l||null,n.depth=e.depthBuffer,n.stencil=e.stencilBuffer,n.renderTarget=e,n.sampleCount!==r&&(d=!0,l&&(l.needsUpdate=!0),n.sampleCount=r);let m={sampleCount:r};if(e.isXRRenderTarget!==!0){for(let e=0;e{this._destroyRenderTarget(e)},e.addEventListener(`dispose`,n.onDispose))}updateTexture(e,t={}){let n=this.get(e);if(n.initialized===!0&&n.version===e.version)return;let r=e.isRenderTargetTexture||e.isDepthTexture||e.isFramebufferTexture,i=this.backend;if(r&&n.initialized===!0&&i.destroyTexture(e),e.isFramebufferTexture){let t=this.renderer.getRenderTarget();t?e.type=t.texture.type:e.type=p}if(e.isHTMLTexture&&e.image){let t=this.renderer.domElement;if(`requestPaint`in t){if(t.hasAttribute(`layoutsubtree`)||t.setAttribute(`layoutsubtree`,`true`),e.image.parentNode!==t&&t.appendChild(e.image),this._htmlTextures.size===0){let e=this._htmlTextures;t.onpaint=t=>{let n=t&&t.changedElements;for(let t of e)(!n||n.includes(t.image))&&(t.needsUpdate=!0)}}this._htmlTextures.add(e)}}let{width:a,height:o,depth:s}=this.getSize(e);if(t.width=a,t.height=o,t.depth=s,t.needsMipmaps=this.needsMipmaps(e),t.levels=t.needsMipmaps?this.getMipLevels(e,a,o):1,e.isCubeTexture&&e.mipmaps.length>0&&t.levels++,r||e.isStorageTexture===!0||e.isExternalTexture===!0)i.createTexture(e,t),n.generation=e.version;else if(e.version>0){let r=e.image;if(r===void 0)T(`Renderer: Texture marked for update but image is undefined.`);else if(r.complete===!1)T(`Renderer: Texture marked for update but image is incomplete.`);else{if(e.images){let n=[];for(let t of e.images)n.push(t);t.images=n}else t.image=r;(n.isDefaultTexture===void 0||n.isDefaultTexture===!0)&&(i.createTexture(e,t),n.isDefaultTexture=!1,n.generation=e.version),e.source.dataReady===!0&&i.updateTexture(e,t);let a=e.isStorageTexture===!0&&e.mipmapsAutoUpdate===!1;t.needsMipmaps&&e.mipmaps.length===0&&!a&&i.generateMipmaps(e),e.onUpdate&&e.onUpdate(e)}}else i.createDefaultTexture(e),n.isDefaultTexture=!0,n.generation=e.version;n.initialized!==!0&&(n.initialized=!0,n.generation=e.version,n.bindGroups=new Set,this.info.createTexture(e),e.isVideoTexture&&un.enabled===!0&&un.getTransfer(e.colorSpace)!==`srgb`&&T(`WebGPURenderer: Video textures must use a color space with a sRGB transfer function, e.g. SRGBColorSpace.`),n.onDispose=()=>{this._destroyTexture(e)},e.addEventListener(`dispose`,n.onDispose)),n.version=e.version}updateSampler(e){return this.backend.updateSampler(e)}getSize(e,t=SS){let n=e.images?e.images[0]:e.image;return n?(n.image!==void 0&&(n=n.image),e.isHTMLTexture?(t.width=n.offsetWidth||1,t.height=n.offsetHeight||1,t.depth=1):typeof HTMLVideoElement<`u`&&n instanceof HTMLVideoElement?(t.width=n.videoWidth||1,t.height=n.videoHeight||1,t.depth=1):typeof VideoFrame<`u`&&n instanceof VideoFrame?(t.width=n.displayWidth||1,t.height=n.displayHeight||1,t.depth=1):(t.width=n.width||1,t.height=n.height||1,t.depth=e.isCubeTexture?6:n.depth||1)):t.width=t.height=t.depth=1,t}getMipLevels(e,t,n){let r;return r=e.mipmaps.length>0?e.mipmaps.length:e.isCompressedTexture===!0?1:Math.floor(Math.log2(Math.max(t,n)))+1,r}needsMipmaps(e){return e.generateMipmaps===!0||e.mipmaps.length>0}_destroyRenderTarget(e){if(this.has(e)===!0){let t=this.get(e),n=t.textures,r=t.depthTexture;e.removeEventListener(`dispose`,t.onDispose);for(let e=0;e{t.isOverrideContextNode===!0&&e.push(t.value.overrideNodes)});let t=new Map(e.flatMap(e=>Array.from(e.entries()))),n=super.getFlowContextData();return n.overrideNodes=t,n}};function ES(e,t=null,n=null){if(t&&t.isNode){let e=t;t=()=>e}return new TS(new Map([[e,t]]),n)}P(`overrideNode`,(e,t,n)=>ES(t,n,e));function DS(e,t=null){let n=new Map;for(let[t,r]of e){let e=r===null?null:typeof r==`function`?r:()=>r;n.set(t,e)}return new TS(n,t)}P(`overrideNodes`,(e,t)=>DS(t,e));var OS=class extends El{static get type(){return`ParameterNode`}constructor(e,t=null){super(e,t),this.isParameterNode=!0}getMemberType(e,t){let n=this.getNodeType(e),r=e.getStructTypeNode(n),i;return r===null?(E(`TSL: Member "${t}" not found in struct "${n}".`,new Ns),i=`float`):i=r.getMemberType(e,t),i}getHash(){return String(this.id)}generate(){return this.name}},kS=(e,t)=>new OS(e,t),AS=el(class extends N{static get type(){return`StackNode`}constructor(e=null){super(),this.nodes=[],this.outputNode=null,this.parent=e,this._currentCond=null,this._expressionNode=null,this._currentNode=null,this._nodeDataLibrary=new Map,this.isStackNode=!0}getElementType(e){return this.outputNode?this.outputNode.getElementType(e):`void`}generateNodeType(e){return this.outputNode?this.outputNode.getNodeType(e):`void`}getMemberType(e,t){return this.outputNode?this.outputNode.getMemberType(e,t):`void`}addToStack(e,t=-1){if(e.isNode!==!0)return E(`TSL: Invalid node added to stack.`,new Ns),this;if(t===-1)if(this._currentNode){let e=this._nodeDataLibrary.get(this._currentNode);e===void 0&&(e={delta:0},this._nodeDataLibrary.set(this._currentNode,e)),e.delta++,t=this.nodes.indexOf(this._currentNode)+e.delta}else t=this.nodes.length;return this.nodes.splice(t,0,e),this}addToStackBefore(e){let t=this._currentNode?this.nodes.indexOf(this._currentNode):0;return this.addToStack(e,t)}If(e,t){let n=new Xc(t);return this._currentCond=df(e,n),this.addToStack(this._currentCond)}ElseIf(e,t){let n=df(e,new Xc(t));return this._currentCond.elseNode=n,this._currentCond=n,this}Else(e){return this._currentCond.elseNode=new Xc(e),this}Switch(e){return this._expressionNode=F(e),this}Case(...e){let t=[];if(e.length>=2)for(let n=0;ntypeof t==`string`?{name:e,type:t,atomic:!1}:{name:e,type:t.type,atomic:t.atomic||!1})}var MS=class extends N{static get type(){return`StructTypeNode`}constructor(e,t=null){super(`struct`),this.membersLayout=jS(e),this.name=t,this.isStructTypeNode=!0}getLength(){let e=1,t=0;for(let n of this.membersLayout){let r=n.type,i=Us(r),a=Ws(r);e=Math.max(e,a);let o=t%e%a;o!==0&&(t+=a-o),t+=i}return Math.ceil(t/e)*e}getMemberType(e,t){let n=this.membersLayout.find(e=>e.name===t);return n?n.type:`void`}generateNodeType(e){return e.getStructTypeFromNode(this,this.membersLayout,this.name).name}setup(e){e.getStructTypeFromNode(this,this.membersLayout,this.name),e.addInclude(this)}generate(e){return this.getNodeType(e)}},NS=class extends N{static get type(){return`StructNode`}constructor(e,t){super(`vec3`),this.structTypeNode=e,this.values=t,this.isStructNode=!0}generateNodeType(e){return this.structTypeNode.getNodeType(e)}getMemberType(e,t){return this.structTypeNode.getMemberType(e,t)}_getChildren(){let e=super._getChildren(),t=e.find(e=>e.childNode===this.structTypeNode);return e.splice(e.indexOf(t),1),e.push(t),e}generate(e){let t=e.getVarFromNode(this),n=t.type,r=e.getPropertyName(t);return e.addLineFlowCode(`${r} = ${e.generateStruct(n,this.structTypeNode.membersLayout,this.values)}`,this),t.name}},PS=(e,t=null)=>{let n=new MS(e,t);return tl((...t)=>{let r=null;if(t.length>0)if(t[0].isNode){r={};let n=Object.keys(e);for(let e=0;enew HS(e,`int`,`float`),GS=e=>new HS(e,`uint`,`float`),KS=e=>new HS(e,`float`,`int`),qS=e=>new HS(e,`float`,`uint`),JS={},YS=class e extends Y{static get type(){return`BitcountNode`}constructor(e,t){super(e,t),this.isBitcountNode=!0}_resolveElementType(e,t,n){n===`int`?t.assign(US(e,`uint`)):t.assign(e)}_returnDataNode(e){switch(e){case`uint`:return H;case`int`:return V;case`uvec2`:return dl;case`uvec3`:return ml;case`uvec4`:return _l;case`ivec2`:return ul;case`ivec3`:return pl;case`ivec4`:return gl}}_createTrailingZerosBaseLayout(e,t){let n=this._returnDataNode(t);return R(([e])=>{let r=H(0);this._resolveElementType(e,r,t);let i=GS(B(r.bitAnd(wd(r)))).shiftRight(23).sub(127);return n(i)}).setLayout({name:e,type:t,inputs:[{name:`value`,type:t}]})}_createLeadingZerosBaseLayout(e,t){let n=this._returnDataNode(t);return R(([e])=>{z(e.equal(H(0)),()=>H(32));let r=H(0),i=H(0);return this._resolveElementType(e,r,t),z(r.shiftRight(16).equal(0),()=>{i.addAssign(16),r.shiftLeftAssign(16)}),z(r.shiftRight(24).equal(0),()=>{i.addAssign(8),r.shiftLeftAssign(8)}),z(r.shiftRight(28).equal(0),()=>{i.addAssign(4),r.shiftLeftAssign(4)}),z(r.shiftRight(30).equal(0),()=>{i.addAssign(2),r.shiftLeftAssign(2)}),z(r.shiftRight(31).equal(0),()=>{i.addAssign(1)}),n(i)}).setLayout({name:e,type:t,inputs:[{name:`value`,type:t}]})}_createOneBitsBaseLayout(e,t){let n=this._returnDataNode(t);return R(([e])=>{let r=H(0);this._resolveElementType(e,r,t),r.assign(r.sub(r.shiftRight(H(1)).bitAnd(H(1431655765)))),r.assign(r.bitAnd(H(858993459)).add(r.shiftRight(H(2)).bitAnd(H(858993459))));let i=r.add(r.shiftRight(H(4))).bitAnd(H(252645135)).mul(H(16843009)).shiftRight(H(24));return n(i)}).setLayout({name:e,type:t,inputs:[{name:`value`,type:t}]})}_createMainLayout(e,t,n,r){let i=this._returnDataNode(t);return R(([e])=>{if(n===1)return i(r(e));{let t=i(0),a=[`x`,`y`,`z`,`w`];for(let i=0;id(r))()}};YS.COUNT_TRAILING_ZEROS=`countTrailingZeros`,YS.COUNT_LEADING_ZEROS=`countLeadingZeros`,YS.COUNT_ONE_BITS=`countOneBits`;var XS=L(YS,YS.COUNT_TRAILING_ZEROS).setParameterLength(1),ZS=L(YS,YS.COUNT_LEADING_ZEROS).setParameterLength(1),QS=L(YS,YS.COUNT_ONE_BITS).setParameterLength(1),$S=R(([e])=>{let t=e.toUint().mul(747796405).add(2891336453),n=t.shiftRight(t.shiftRight(28).add(4)).bitXor(t).mul(277803737);return n.shiftRight(22).bitXor(n).toFloat().mul(1/2**32)}),eC=(e,t)=>Ud(J(4,e.mul(bu(1,e))),t),tC=(e,t)=>e.lessThan(.5)?eC(e.mul(2),t).div(2):bu(1,eC(J(bu(1,e),2),t).div(2)),nC=(e,t,n)=>Ud(xu(Ud(e,t),yu(Ud(e,t),Ud(bu(1,e),n))),1/t),rC=(e,t)=>ld(Gu.mul(t.mul(e).sub(1))).div(Gu.mul(t.mul(e).sub(1))),iC=class extends sc{static get type(){return`PackFloatNode`}constructor(e,t){super(),this.vectorNode=t,this.encoding=e,this.isPackFloatNode=!0}generateNodeType(){return`uint`}generate(e){let t=this.vectorNode.getNodeType(e);return`${e.getFloatPackingMethod(this.encoding)}(${this.vectorNode.build(e,t)})`}},aC=L(iC,`snorm`).setParameterLength(1),oC=L(iC,`unorm`).setParameterLength(1),sC=L(iC,`float16`).setParameterLength(1),cC=class extends sc{static get type(){return`UnpackFloatNode`}constructor(e,t){super(),this.uintNode=t,this.encoding=e,this.isUnpackFloatNode=!0}generateNodeType(){return`vec2`}generate(e){let t=this.uintNode.getNodeType(e);return`${e.getFloatUnpackingMethod(this.encoding)}(${this.uintNode.build(e,t)})`}},lC=L(cC,`snorm`).setParameterLength(1),uC=L(cC,`unorm`).setParameterLength(1),dC=L(cC,`float16`).setParameterLength(1),fC=R(([e])=>e.fract().sub(.5).abs()).setLayout({name:`tri`,type:`float`,inputs:[{name:`x`,type:`float`}]}),pC=R(([e])=>W(fC(e.z.add(fC(e.y.mul(1)))),fC(e.z.add(fC(e.x.mul(1)))),fC(e.y.add(fC(e.x.mul(1)))))).setLayout({name:`tri3`,type:`vec3`,inputs:[{name:`p`,type:`vec3`}]}),mC=R(([e,t,n])=>{let r=W(e).toVar(),i=B(1.4).toVar(),a=B(0).toVar(),o=W(r).toVar();return B_({start:B(0),end:B(3),type:`float`,condition:`<=`},()=>{let e=W(pC(o.mul(2))).toVar();r.addAssign(e.add(n.mul(B(.1).mul(t)))),o.mulAssign(1.8),i.mulAssign(1.5),r.mulAssign(1.2);let s=B(fC(r.z.add(fC(r.x.add(fC(r.y)))))).toVar();a.addAssign(s.div(i)),o.addAssign(.14)}),a}).setLayout({name:`triNoise3D`,type:`float`,inputs:[{name:`position`,type:`vec3`},{name:`speed`,type:`float`},{name:`time`,type:`float`}]}),hC=el(class extends N{static get type(){return`FunctionOverloadingNode`}constructor(e=[],...t){super(),this.functionNodes=e,this.parametersNodes=t,this._candidateFn=null,this.global=!0}generateNodeType(e){return this.getCandidateFn(e).shaderNode.layout.type}getCandidateFn(e){let t=this.parametersNodes,n=this._candidateFn;if(n===null){let r=null,i=-1;for(let n of this.functionNodes){let a=n.shaderNode.layout;if(a===null)throw Error(`THREE.FunctionOverloadingNode: FunctionNode must be a layout.`);let o=a.inputs;if(t.length===o.length){let a=0;for(let n=0;ni&&(r=n,i=a)}}this._candidateFn=n=r}return n}setup(e){return this.getCandidateFn(e)(...this.parametersNodes)}}),gC=e=>(...t)=>hC(e,...t),_C=q(0).setGroup(K).onRenderUpdate(e=>e.time),vC=q(0).setGroup(K).onRenderUpdate(e=>e.deltaTime),yC=q(0,`uint`).setGroup(K).onRenderUpdate(e=>e.frameId),bC=(e=_C)=>e.add(.75).mul(Math.PI*2).sin().mul(.5).add(.5),xC=(e=_C)=>e.fract().round(),SC=(e=_C)=>e.add(.5).fract().mul(2).sub(1).abs(),CC=(e=_C)=>e.fract();function wC(e,t=null){return pf(t,{getUV:typeof e==`function`?e:()=>e})}var TC=R(([e,t,n=U(.5)])=>kx(e.sub(n),t).add(n)),EC=R(([e,t,n=U(.5)])=>{let r=e.sub(n),i=r.dot(r),a=i.mul(i).mul(t);return e.add(r.mul(a))}),DC=R(({position:e=null,horizontal:t=!0,vertical:n=!1})=>{let r;e===null?r=Vm:(r=Vm.toVar(),r[3][0]=e.x,r[3][1]=e.y,r[3][2]=e.z);let i=Em.mul(r);return Jc(t)&&(i[0][0]=Vm[0].length(),i[0][1]=0,i[0][2]=0),Jc(n)&&(i[1][0]=0,i[1][1]=Vm[1].length(),i[1][2]=0),i[2][0]=0,i[2][1]=0,i[2][2]=1,wm.mul(i).mul(eh)}),OC=R(([e=null])=>{let t=vv();return vv(ov(e)).sub(t).lessThan(0).select($p,e)}),kC=R(([e,t=Ap(),n=B(0)])=>{let r=e.x,i=e.y,a=n.mod(r.mul(i)).floor(),o=a.mod(r),s=i.sub(a.add(1).div(r).ceil()),c=e.reciprocal(),l=U(o,s);return t.add(l).mul(c)}),AC=R(([e,t=null,n=null,r=B(1),i=eh,a=dh])=>{let o=a.abs().normalize();o=o.div(o.dot(W(1)));let s=i.yz.mul(r),c=i.zx.mul(r),l=i.xy.mul(r),u=e.value,d=t===null?u:t.value,f=n===null?u:n.value;return yu(Lp(u,s).mul(o.x),Lp(d,c).mul(o.y),Lp(f,l).mul(o.z))}),jC=(...e)=>AC(...e),MC=new qi,NC=new k,PC=new k,FC=new k,IC=new A,LC=new k(0,0,-1),RC=new xn,zC=new k,BC=new k,VC=new xn,HC=new O,UC=new Sn,WC=$p.flipX();UC.depthTexture=new ia(1,1);var GC=!1,KC=class e extends Fp{static get type(){return`ReflectorNode`}constructor(e={}){super(e.defaultTexture||UC.texture,WC),this._reflectorBaseNode=e.reflector||new qC(this,e),this._depthNode=null,this.setUpdateMatrix(!1)}get reflector(){return this._reflectorBaseNode}get target(){return this._reflectorBaseNode.target}getDepthNode(){if(this._depthNode===null){if(this._reflectorBaseNode.depth!==!0)throw Error(`THREE.ReflectorNode: Depth node can only be requested when the reflector is created with { depth: true }. `);this._depthNode=new e({defaultTexture:UC.depthTexture,reflector:this._reflectorBaseNode})}return this._depthNode}setup(e){return e.object.isQuadMesh||this._reflectorBaseNode.build(e),super.setup(e)}clone(){let e=new this.constructor(this.reflectorNode);return e.uvNode=this.uvNode,e.levelNode=this.levelNode,e.biasNode=this.biasNode,e.sampler=this.sampler,e.depthNode=this.depthNode,e.compareNode=this.compareNode,e.gradNode=this.gradNode,e.gatherNode=this.gatherNode,e.offsetNode=this.offsetNode,e._reflectorBaseNode=this._reflectorBaseNode,e}dispose(){super.dispose(),this._reflectorBaseNode.dispose()}},qC=class extends N{static get type(){return`ReflectorBaseNode`}constructor(e,t={}){super();let{target:n=new Xn,resolutionScale:r=1,generateMipmaps:i=!1,bounces:a=!0,depth:o=!1,samples:s=0}=t;this.textureNode=e,this.target=n,this.resolutionScale=r,t.resolution!==void 0&&(Tt(`ReflectorNode: The "resolution" parameter has been renamed to "resolutionScale".`),this.resolutionScale=t.resolution),this.generateMipmaps=i,this.bounces=a,this.depth=o,this.samples=s,this.updateBeforeType=a?M.RENDER:M.FRAME,this.virtualCameras=new WeakMap,this.renderTargets=new Map,this.forceUpdate=!1,this.hasOutput=!1}_updateResolution(e,t){let n=this.resolutionScale;t.getDrawingBufferSize(HC),e.setSize(Math.round(HC.width*n),Math.round(HC.height*n))}setup(e){return this._updateResolution(UC,e.renderer),super.setup(e)}dispose(){super.dispose();for(let e of this.renderTargets.values())e.dispose()}getVirtualCamera(e){let t=this.virtualCameras.get(e);return t===void 0&&(t=e.clone(),this.virtualCameras.set(e,t)),t}getRenderTarget(e){let t=this.renderTargets.get(e);return t===void 0&&(t=new Sn(0,0,{type:b,samples:this.samples}),this.generateMipmaps===!0&&(t.texture.minFilter=f,t.texture.generateMipmaps=!0),this.depth===!0&&(t.depthTexture=new ia),this.renderTargets.set(e,t)),t}updateBefore(e){if(this.bounces===!1&&GC)return!1;GC=!0;let{scene:t,camera:n,renderer:r,material:i}=e,{target:a}=this,o=this.getVirtualCamera(n),s=this.getRenderTarget(o);r.getDrawingBufferSize(HC),this._updateResolution(s,r),PC.setFromMatrixPosition(a.matrixWorld),FC.setFromMatrixPosition(n.matrixWorld),IC.extractRotation(a.matrixWorld),NC.set(0,0,1),NC.applyMatrix4(IC),zC.subVectors(PC,FC);let c=zC.dot(NC)>0,l=!1;if(c===!0&&this.forceUpdate===!1){if(this.hasOutput===!1){GC=!1;return}l=!0}zC.reflect(NC).negate(),zC.add(PC),IC.extractRotation(n.matrixWorld),LC.set(0,0,-1),LC.applyMatrix4(IC),LC.add(FC),BC.subVectors(PC,LC),BC.reflect(NC).negate(),BC.add(PC),o.coordinateSystem=n.coordinateSystem,o.position.copy(zC),o.up.set(0,1,0),o.up.applyMatrix4(IC),o.up.reflect(NC),o.lookAt(BC),o.near=n.near,o.far=n.far,o.updateMatrixWorld(),o.projectionMatrix.copy(n.projectionMatrix),MC.setFromNormalAndCoplanarPoint(NC,PC),MC.applyMatrix4(o.matrixWorldInverse),RC.set(MC.normal.x,MC.normal.y,MC.normal.z,MC.constant);let u=o.projectionMatrix;VC.x=(Math.sign(RC.x)+u.elements[8])/u.elements[0],VC.y=(Math.sign(RC.y)+u.elements[9])/u.elements[5],VC.z=-1,VC.w=(1+u.elements[10])/u.elements[14],RC.multiplyScalar(1/RC.dot(VC)),u.elements[2]=RC.x,u.elements[6]=RC.y,u.elements[10]=r.coordinateSystem===2001?RC.z-0:RC.z+1-0,u.elements[14]=RC.w,this.textureNode.value=s.texture,this.depth===!0&&(this.textureNode.getDepthNode().value=s.depthTexture),i.visible=!1;let d=r.getRenderTarget(),f=r.getMRT(),p=r.autoClear;r.setMRT(null),r.setRenderTarget(s),r.autoClear=!0;let m=t.name;t.name=(t.name||`Scene`)+` [ Reflector ]`,l?(r.clear(),this.hasOutput=!1):(r.render(t,o),this.hasOutput=!0),t.name=m,r.setMRT(f),r.setRenderTarget(d),r.autoClear=p,i.visible=!0,GC=!1,this.forceUpdate=!1}get resolution(){return Tt(`ReflectorNode: The "resolution" property has been renamed to "resolutionScale".`),this.resolutionScale}set resolution(e){Tt(`ReflectorNode: The "resolution" property has been renamed to "resolutionScale".`),this.resolutionScale=e}},JC=e=>new KC(e),YC=new oo(-1,1,1,-1,0,1),XC=new class extends ii{constructor(e=!1){super();let t=e===!1?[0,-1,0,1,2,1]:[0,2,0,0,2,0];this.setAttribute(`position`,new Kr([-1,3,0,-1,-1,0,3,-1,0],3)),this.setAttribute(`uv`,new Kr(t,2))}},ZC=class extends ji{constructor(e=null){super(XC,e),this.camera=YC,this.isQuadMesh=!0}async renderAsync(e){Tt(`QuadMesh: "renderAsync()" has been deprecated. Use "render()" and "await renderer.init();" when creating the renderer.`),await e.init(),e.render(this,YC)}render(e){e.render(this,YC)}},QC=new O,$C=class extends Fp{static get type(){return`RTTNode`}constructor(e,t=null,n=null,r={type:b}){let i=new Sn(t,n,r);super(i.texture,Ap()),this.isRTTNode=!0,this.node=e,this.width=t,this.height=n,this.renderTarget=i,this.textureNeedsUpdate=!0,this.autoUpdate=!0,this._resolutionScale=1,this._rttNode=null,this._quadMesh=new ZC(new Av),this.updateBeforeType=M.RENDER}get autoResize(){return this.width===null}setup(e){return this._rttNode=this.node.context(e.getSharedContext()),this._quadMesh.material.name=`RTT`,this._quadMesh.material.needsUpdate=!0,super.setup(e)}setSize(e,t){let n=Math.floor(e*this._resolutionScale),r=Math.floor(t*this._resolutionScale);this.renderTarget.setSize(n,r),this.textureNeedsUpdate=!0}setResolutionScale(e){return this._resolutionScale=e,this.autoResize===!1&&this.setSize(this.width,this.height),this}getResolutionScale(){return this._resolutionScale}updateBefore({renderer:e}){if(this.textureNeedsUpdate===!1&&this.autoUpdate===!1)return;this.textureNeedsUpdate=!1;let t=e.getRenderTarget();if(this.autoResize===!0){let t=e.getDrawingBufferSize(QC),n=Math.floor(t.width*this._resolutionScale),r=Math.floor(t.height*this._resolutionScale);(n!==this.renderTarget.width||r!==this.renderTarget.height)&&(this.renderTarget.setSize(n,r),this.textureNeedsUpdate=!0)}let n=`RTT`;this.node.name&&(n=this.node.name+` [ `+n+` ]`),this._quadMesh.material.fragmentNode=this._rttNode,this._quadMesh.name=n,e.setRenderTarget(this.renderTarget),this._quadMesh.render(e),e.setRenderTarget(t)}clone(){let e=new Fp(this.value,this.uvNode,this.levelNode);return e.sampler=this.sampler,e.referenceNode=this,e}},ew=(e,...t)=>new $C(F(e),...t),tw=(e,...t)=>e.isSampleNode||e.isTextureNode?e:e.isPassNode?e.getTextureNode():ew(e,...t),nw=R(([e,t,n],r)=>{let i;r.renderer.coordinateSystem===2001?(e=U(e.x,e.y.oneMinus()).mul(2).sub(1),i=G(W(e,t),1)):i=G(W(e.x,e.y.oneMinus(),t).mul(2).sub(1),1);let a=G(n.mul(i));return a.xyz.div(a.w)}),rw=R(([e,t])=>{let n=t.mul(G(e,1)),r=n.xy.div(n.w).mul(.5).add(.5).toVar();return U(r.x,r.y.oneMinus())}),iw=R(([e,t,n])=>{let r=jp(zp(t)),i=ul(e.mul(r)).toVar(),a=zp(t,i).toVar(),o=zp(t,i.sub(ul(2,0))).toVar(),s=zp(t,i.sub(ul(1,0))).toVar(),c=zp(t,i.add(ul(1,0))).toVar(),l=zp(t,i.add(ul(2,0))).toVar(),u=zp(t,i.add(ul(0,2))).toVar(),d=zp(t,i.add(ul(0,1))).toVar(),f=zp(t,i.sub(ul(0,1))).toVar(),p=zp(t,i.sub(ul(0,2))).toVar(),m=xd(bu(B(2).mul(s).sub(o),a)).toVar(),h=xd(bu(B(2).mul(c).sub(l),a)).toVar(),g=xd(bu(B(2).mul(d).sub(u),a)).toVar(),_=xd(bu(B(2).mul(f).sub(p),a)).toVar(),v=nw(e,a,n).toVar();return sd(Hd(m.lessThan(h).select(v.sub(nw(e.sub(U(B(1).div(r.x),0)),s,n)),v.negate().add(nw(e.add(U(B(1).div(r.x),0)),c,n))),g.lessThan(_).select(v.sub(nw(e.add(U(0,B(1).div(r.y))),d,n)),v.negate().add(nw(e.sub(U(0,B(1).div(r.y))),f,n)))))}),aw=R(([e])=>cd(B(52.9829189).mul(cd(Vd(e,U(.06711056,.00583715)))))).setLayout({name:`interleavedGradientNoise`,type:`float`,inputs:[{name:`position`,type:`vec2`}]}),ow=R(([e,t,n])=>{let r=B(2.399963229728653),i=rd(B(e).add(.5).div(B(t))),a=B(e).mul(r).add(n);return U(dd(a),ld(a)).mul(i)}).setLayout({name:`vogelDiskSample`,type:`vec2`,inputs:[{name:`sampleIndex`,type:`int`},{name:`samplesCount`,type:`int`},{name:`phi`,type:`float`}]}),sw=class extends N{static get type(){return`SampleNode`}constructor(e,t=null){super(),this.callback=e,this.uvNode=t,this.isSampleNode=!0}setup(){return this.sample(Ap())}sample(e){return this.callback(e)}},cw=(e,t=null)=>new sw(e,F(t)),lw=class extends Fi{constructor(e,t,n=Float32Array){let r=ArrayBuffer.isView(e)?e:new n(e*t);super(r,t),this.isStorageInstancedBufferAttribute=!0}},uw=class extends Hr{constructor(e,t,n=Float32Array){let r=ArrayBuffer.isView(e)?e:new n(e*t);super(r,t),this.isStorageBufferAttribute=!0}},dw=(e,t=`float`)=>{let n,r;return t.isStructTypeNode===!0?(n=t.getLength(),r=Vs(`float`)):(n=Hs(t),r=Vs(t)),y_(new uw(e,n,r),t,e)},fw=(e,t=`float`)=>{let n,r;t.isStructTypeNode===!0?(n=t.getLength(),r=Vs(`float`)):(n=Hs(t),r=Vs(t));let i=new lw(e,n,r);return y_(i,t,i.count)},pw=I(class extends N{static get type(){return`PointUVNode`}constructor(){super(`vec2`),this.isPointUVNode=!0}generate(){return`vec2( gl_PointCoord.x, 1.0 - gl_PointCoord.y )`}}),mw=new A,hw=q(0).setGroup(K).onRenderUpdate(({scene:e})=>e.backgroundBlurriness),gw=q(1).setGroup(K).onRenderUpdate(({scene:e})=>e.backgroundIntensity),_w=q(new A).setGroup(K).onRenderUpdate(({scene:e})=>{let t=e.background;return t!==null&&t.isTexture&&t.mapping!==300||e.backgroundNode&&e.backgroundNode.isNode?mw.makeRotationFromEuler(e.backgroundRotation).transpose():mw.identity(),mw}),vw=class extends Fp{static get type(){return`StorageTextureNode`}constructor(e,t,n=null){super(e,t),this.storeNode=n,this.mipLevel=0,this.isStorageTextureNode=!0,this.access=Qs.WRITE_ONLY}getInputType(){return`storageTexture`}getTransformedUV(e){return e}setup(e){super.setup(e);let t=e.getNodeProperties(this);return t.storeNode=this.storeNode,t}setAccess(e){return this.access=e,this}setMipLevel(e){return this.mipLevel=e,this}generate(e,t){return this.storeNode===null?super.generate(e,t):(this.generateStore(e),``)}generateSnippet(e,t,n,r,i,a,o,s,c){let l=this.value;return e.generateStorageTextureLoad(l,t,n,r,a,c)}toReadWrite(){return this.setAccess(Qs.READ_WRITE)}toReadOnly(){return this.setAccess(Qs.READ_ONLY)}toWriteOnly(){return this.setAccess(Qs.WRITE_ONLY)}store(e,t){let n=this.clone();return n.referenceNode=this.getBase(),n.uvNode=e,n.storeNode=t,t!==null&&n.toStack(),n}generateStore(e){let{uvNode:t,storeNode:n,depthNode:r}=e.getNodeProperties(this),i=super.generate(e,`property`),a=t.build(e,this.value.is3DTexture===!0?`uvec3`:`uvec2`),o=n.build(e,`vec4`),s=r?r.build(e,`int`):null,c=e.generateTextureStore(this.value,i,a,s,o);e.addLineFlowCode(c,this)}clone(){let e=super.clone();return e.storeNode=this.storeNode,e.mipLevel=this.mipLevel,e.access=this.access,e}},yw=el(vw).setParameterLength(1,3),bw=(e,t,n)=>{let r;return e.isStorageTextureNode===!0?r=e.store(t,n):(r=yw(e,t,n),n!==null&&r.toStack()),r},xw=el(class extends vw{static get type(){return`StorageTexture3DNode`}constructor(e,t,n=null){super(e,t,n),this.isStorageTexture3DNode=!0}getDefaultUV(){return W(.5,.5,.5)}setUpdateMatrix(){}generateUV(e,t){return t.build(e,this.sampler===!0?`vec3`:`ivec3`)}generateOffset(e,t){return t.build(e,`ivec3`)}}).setParameterLength(1,3),Sw=R(({texture:e,uv:t})=>{let n=1e-4,r=W().toVar();return z(t.x.lessThan(n),()=>{r.assign(W(1,0,0))}).ElseIf(t.y.lessThan(n),()=>{r.assign(W(0,1,0))}).ElseIf(t.z.lessThan(n),()=>{r.assign(W(0,0,1))}).ElseIf(t.x.greaterThan(1-n),()=>{r.assign(W(-1,0,0))}).ElseIf(t.y.greaterThan(1-n),()=>{r.assign(W(0,-1,0))}).ElseIf(t.z.greaterThan(1-n),()=>{r.assign(W(0,0,-1))}).Else(()=>{let n=.01,i=e.sample(t.add(W(-.01,0,0))).r.sub(e.sample(t.add(W(n,0,0))).r),a=e.sample(t.add(W(0,-.01,0))).r.sub(e.sample(t.add(W(0,n,0))).r),o=e.sample(t.add(W(0,0,-.01))).r.sub(e.sample(t.add(W(0,0,n))).r);r.assign(W(i,a,o))}),r.normalize()}),Cw=el(class extends Fp{static get type(){return`Texture3DNode`}constructor(e,t=null,n=null){super(e,t,n),this.isTexture3DNode=!0}getInputType(){return`texture3D`}getDefaultUV(){return W(.5,.5,.5)}setUpdateMatrix(){}generateUV(e,t){return t.build(e,this.sampler===!0?`vec3`:`ivec3`)}generateOffset(e,t){return t.build(e,`ivec3`)}normal(e){return Sw({texture:this,uv:e})}}).setParameterLength(1,3),ww=(...e)=>Cw(...e).setSampler(!1),Tw=(e,t,n)=>Cw(e,t).level(n),Ew=class extends Ih{static get type(){return`UserDataNode`}constructor(e,t,n=null){super(e,t,n),this.userData=n}updateReference(e){return this.reference=this.userData===null?e.object.userData:this.userData,this.reference}},Dw=(e,t,n)=>new Ew(e,t,n),Ow=new WeakMap,kw=class extends sc{static get type(){return`VelocityNode`}constructor(){super(`vec2`),this.projectionMatrix=null,this.updateType=M.OBJECT,this.updateAfterType=M.OBJECT,this.previousModelWorldMatrix=q(new A),this.previousProjectionMatrix=q(new A).setGroup(K),this.previousCameraViewMatrix=q(new A)}setProjectionMatrix(e){this.projectionMatrix=e}update({frameId:e,camera:t,object:n}){let r=jw(n);this.previousModelWorldMatrix.value.copy(r);let i=Aw(t);i.frameId!==e&&(i.frameId=e,i.previousProjectionMatrix===void 0?(i.previousProjectionMatrix=new A,i.previousCameraViewMatrix=new A,i.currentProjectionMatrix=new A,i.currentCameraViewMatrix=new A,i.previousProjectionMatrix.copy(this.projectionMatrix||t.projectionMatrix),i.previousCameraViewMatrix.copy(t.matrixWorldInverse)):(i.previousProjectionMatrix.copy(i.currentProjectionMatrix),i.previousCameraViewMatrix.copy(i.currentCameraViewMatrix)),i.currentProjectionMatrix.copy(this.projectionMatrix||t.projectionMatrix),i.currentCameraViewMatrix.copy(t.matrixWorldInverse),this.previousProjectionMatrix.value.copy(i.previousProjectionMatrix),this.previousCameraViewMatrix.value.copy(i.previousCameraViewMatrix))}updateAfter({object:e}){jw(e).copy(e.matrixWorld)}setup(){let e=this.projectionMatrix===null?wm:q(this.projectionMatrix),t=this.previousCameraViewMatrix.mul(this.previousModelWorldMatrix),n=e.mul(Jm).mul(eh),r=this.previousProjectionMatrix.mul(t).mul(th);return bu(n.xy.div(n.w),r.xy.div(r.w))}};function Aw(e){let t=Ow.get(e);return t===void 0&&(t={},Ow.set(e,t)),t}function jw(e,t=0){let n=Aw(e),r=n[t];return r===void 0&&(n[t]=r=new A,n[t].copy(e.matrixWorld)),r}var Mw=I(kw),Nw=R(([e,t])=>Fd(1,e.oneMinus().div(t)).oneMinus()).setLayout({name:`blendBurn`,type:`vec3`,inputs:[{name:`base`,type:`vec3`},{name:`blend`,type:`vec3`}]}),Pw=R(([e,t])=>Fd(e.div(t.oneMinus()),1)).setLayout({name:`blendDodge`,type:`vec3`,inputs:[{name:`base`,type:`vec3`},{name:`blend`,type:`vec3`}]}),Fw=R(([e,t])=>e.oneMinus().mul(t.oneMinus()).oneMinus()).setLayout({name:`blendScreen`,type:`vec3`,inputs:[{name:`base`,type:`vec3`},{name:`blend`,type:`vec3`}]}),Iw=R(([e,t])=>Qd(e.mul(2).mul(t),e.oneMinus().mul(2).mul(t.oneMinus()).oneMinus(),Ld(.5,e))).setLayout({name:`blendOverlay`,type:`vec3`,inputs:[{name:`base`,type:`vec3`},{name:`blend`,type:`vec3`}]}),Lw=R(([e,t])=>{let n=t.a.add(e.a.mul(t.a.oneMinus()));return G(t.rgb.mul(t.a).add(e.rgb.mul(e.a).mul(t.a.oneMinus())).div(n),n)}).setLayout({name:`blendColor`,type:`vec4`,inputs:[{name:`base`,type:`vec4`},{name:`blend`,type:`vec4`}]}),Rw=R(([e])=>Hw(e.rgb)),zw=R(([e,t=B(1)])=>t.mix(Hw(e.rgb),e.rgb).max(0)),Bw=R(([e,t=B(0)])=>{let n=yu(e.r,e.g,e.b).div(3),r=e.r.max(e.g.max(e.b)),i=r.sub(n).mul(t).mul(-3);return Qd(e.rgb,r,i).max(0)}),Vw=R(([e,t=B(1)])=>{let n=W(.57735,.57735,.57735),r=t.cos();return W(e.rgb.mul(r).add(n.cross(e.rgb).mul(t.sin()).add(n.mul(Vd(n,e.rgb).mul(r.oneMinus()))))).max(0)}),Hw=(e,t=W(un.getLuminanceCoefficients(new k)))=>Vd(e,t),Uw=R(([e,t=W(1),n=W(0),r=W(1),i=B(1),a=W(un.getLuminanceCoefficients(new k,nt))])=>{let o=e.rgb.dot(W(a)),s=Id(e.rgb.mul(t).add(n),0),c=s.pow(r);return z(s.r.greaterThan(0),()=>{s.r.assign(c.r)}),z(s.g.greaterThan(0),()=>{s.g.assign(c.g)}),z(s.b.greaterThan(0),()=>{s.b.assign(c.b)}),s.assign(o.add(s.sub(o).mul(i)).max(0)),G(s.rgb,e.a)}),Ww=R(([e,t])=>e.mul(t).floor().div(t)),Gw=null,Kw=el(class extends ev{static get type(){return`ViewportSharedTextureNode`}constructor(e=$p,t=null){Gw===null&&(Gw=new na),super(e,t,Gw)}getTextureForReference(){return Gw}updateReference(){return this}}).setParameterLength(0,2),qw=new O,Jw=class extends Fp{static get type(){return`PassTextureNode`}constructor(e,t){super(t),this.passNode=e,this.isPassTextureNode=!0,this.setUpdateMatrix(!1)}setup(e){let t=e.getNodeProperties(this);return t.passNode=this.passNode,super.setup(e)}clone(){return new this.constructor(this.passNode,this.value)}},Yw=class extends Jw{static get type(){return`PassMultipleTextureNode`}constructor(e,t,n=!1){super(e,null),this.textureName=t,this.previousTexture=n,this.isPassMultipleTextureNode=!0}updateTexture(){this.value=this.previousTexture?this.passNode.getPreviousTexture(this.textureName):this.passNode.getTexture(this.textureName)}setup(e){return this.updateTexture(),super.setup(e)}clone(){let e=new this.constructor(this.passNode,this.textureName,this.previousTexture);return e.uvNode=this.uvNode,e.levelNode=this.levelNode,e.biasNode=this.biasNode,e.sampler=this.sampler,e.depthNode=this.depthNode,e.compareNode=this.compareNode,e.gradNode=this.gradNode,e.gatherNode=this.gatherNode,e.offsetNode=this.offsetNode,e}},Xw=class e extends sc{static get type(){return`PassNode`}constructor(t,n,r,i={}){super(`vec4`),this.scope=t,this.scene=n,this.camera=r,this.options=i,this._width=1,this._height=1;let a=new Sn(this._width,this._height,{type:b,...i});a.texture.name=`output`;let o=null;(this.scope===e.DEPTH||i.depthBuffer!==!1)&&(o=new ia,o.isRenderTargetTexture=!0,o.name=`depth`,a.depthTexture=o),this.renderTarget=a,this.overrideMaterial=null,this.transparent=!0,this.opaque=!0,this.contextNode=null,this._contextNodeCache=null,this._textures={output:a.texture},o!==null&&(this._textures.depth=o),this._textureNodes={},this._linearDepthNodes={},this._viewZNodes={},this._previousTextures={},this._previousTextureNodes={},this._cameraNear=q(0),this._cameraFar=q(0),this._mrt=null,this._layers=null,this._resolutionScale=1,this._viewport=null,this._scissor=null,this.isPassNode=!0,this.updateBeforeType=M.FRAME,this.global=!0}setResolutionScale(e){return this._resolutionScale=e,this}getResolutionScale(){return this._resolutionScale}setResolution(e){return T(`PassNode: .setResolution() is deprecated. Use .setResolutionScale() instead.`),this.setResolutionScale(e)}getResolution(){return T(`PassNode: .getResolution() is deprecated. Use .getResolutionScale() instead.`),this.getResolutionScale()}setLayers(e){return this._layers=e,this}getLayers(){return this._layers}setMRT(e){return this._mrt=e,this}getMRT(){return this._mrt}getTexture(e){let t=this._textures[e];if(t===void 0){if(e===`depth`)throw Error(`THREE.PassNode: Depth texture is not available for this pass.`);t=this.renderTarget.texture.clone(),t.name=e,this._textures[e]=t,this.renderTarget.textures.push(t)}return t}getPreviousTexture(e){let t=this._previousTextures[e];return t===void 0&&(t=this.getTexture(e).clone(),this._previousTextures[e]=t),t}toggleTexture(e){let t=this._previousTextures[e];if(t!==void 0){let n=this._textures[e],r=this.renderTarget.textures.indexOf(n);this.renderTarget.textures[r]=t,this._textures[e]=t,this._previousTextures[e]=n,this._textureNodes[e].updateTexture(),this._previousTextureNodes[e].updateTexture()}}getTextureNode(e=`output`){let t=this._textureNodes[e];return t===void 0&&(t=new Yw(this,e),t.updateTexture(),this._textureNodes[e]=t),t}getPreviousTextureNode(e=`output`){let t=this._previousTextureNodes[e];return t===void 0&&(this._textureNodes[e]===void 0&&this.getTextureNode(e),t=new Yw(this,e,!0),t.updateTexture(),this._previousTextureNodes[e]=t),t}getViewZNode(e=`depth`){let t=this._viewZNodes[e];if(t===void 0){let n=this._cameraNear,r=this._cameraFar;this._viewZNodes[e]=t=pv(this.getTextureNode(e),n,r)}return t}getLinearDepthNode(e=`depth`){let t=this._linearDepthNodes[e];if(t===void 0){let n=this._cameraNear,r=this._cameraFar,i=this.getViewZNode(e);this._linearDepthNodes[e]=t=cv(i,n,r)}return t}async compileAsync(e){let t=e.getRenderTarget(),n=e.getMRT();e.setRenderTarget(this.renderTarget),e.setMRT(this._mrt),await e.compileAsync(this.scene,this.camera),e.setRenderTarget(t),e.setMRT(n)}setup({renderer:t}){return this.renderTarget.samples=this.options.samples===void 0?t.samples:this.options.samples,this.renderTarget.texture.type=t.getOutputBufferType(),t.reversedDepthBuffer===!0&&this.renderTarget.depthTexture!==null&&(this.renderTarget.depthTexture.type=y),this.scope===e.COLOR?this.getTextureNode():this.getLinearDepthNode()}updateBefore(e){let{renderer:t}=e,{scene:n}=this,r,i=t.getOutputRenderTarget();i&&i.isXRRenderTarget===!0?(r=t.xr.getCamera(),t.xr.updateCamera(r),qw.set(i.width,i.height)):(r=this.camera,t.getDrawingBufferSize(qw)),this.setSize(qw.width,qw.height);let a=t.getRenderTarget(),o=t.getMRT(),s=t.autoClear,c=t.transparent,l=t.opaque,u=r.layers.mask,d=t.contextNode,f=n.overrideMaterial;this._cameraNear.value=r.near,this._cameraFar.value=r.far,this._layers!==null&&(r.layers.mask=this._layers.mask);for(let e in this._previousTextures)this.toggleTexture(e);this.overrideMaterial!==null&&(n.overrideMaterial=this.overrideMaterial),t.setRenderTarget(this.renderTarget),t.setMRT(this._mrt),t.autoClear=!0,t.transparent=this.transparent,t.opaque=this.opaque,this.contextNode!==null&&((this._contextNodeCache===null||this._contextNodeCache.version!==this.version)&&(this._contextNodeCache={version:this.version,context:pf({...t.contextNode.getFlowContextData(),...this.contextNode.getFlowContextData()})}),t.contextNode=this._contextNodeCache.context);let p=n.name;n.name=this.name?this.name:n.name,t.render(n,r),n.name=p,n.overrideMaterial=f,t.setRenderTarget(a),t.setMRT(o),t.autoClear=s,t.transparent=c,t.opaque=l,t.contextNode=d,r.layers.mask=u}setSize(e,t){this._width=e,this._height=t;let n=Math.floor(this._width*this._resolutionScale),r=Math.floor(this._height*this._resolutionScale);this.renderTarget.setSize(n,r),this._scissor===null?this.renderTarget.scissorTest=!1:(this.renderTarget.scissor.copy(this._scissor).multiplyScalar(this._resolutionScale).floor(),this.renderTarget.scissorTest=!0),this._viewport!==null&&this.renderTarget.viewport.copy(this._viewport).multiplyScalar(this._resolutionScale).floor()}setScissor(e,t,n,r){e===null?this._scissor=null:(this._scissor===null&&(this._scissor=new xn),e.isVector4?this._scissor.copy(e):this._scissor.set(e,t,n,r))}setViewport(e,t,n,r){e===null?this._viewport=null:(this._viewport===null&&(this._viewport=new xn),e.isVector4?this._viewport.copy(e):this._viewport.set(e,t,n,r))}dispose(){this.renderTarget.dispose()}};Xw.COLOR=`color`,Xw.DEPTH=`depth`;var Zw=(e,t,n)=>new Xw(Xw.COLOR,e,t,n),Qw=(e,t)=>new Jw(e,t),$w=(e,t,n)=>new Xw(Xw.DEPTH,e,t,n),eT=class extends Xw{static get type(){return`ToonOutlinePassNode`}constructor(e,t,n,r,i){super(Xw.COLOR,e,t),this.colorNode=n,this.thicknessNode=r,this.alphaNode=i,this._materialCache=new WeakMap,this.name=`Outline Pass`}updateBefore(e){let{renderer:t}=e,n=t.getRenderObjectFunction();t.setRenderObjectFunction((e,n,r,i,a,o,s,c)=>{if((a.isMeshToonMaterial||a.isMeshToonNodeMaterial)&&a.wireframe===!1){let l=this._getOutlineMaterial(a);t.renderObject(e,n,r,i,l,o,s,c)}t.renderObject(e,n,r,i,a,o,s,c)}),super.updateBefore(e),t.setRenderObjectFunction(n)}_createMaterial(){let e=new Av;e.isMeshToonOutlineMaterial=!0,e.name=`Toon_Outline`,e.side=1;let t=dh.negate(),n=wm.mul(Jm),r=B(1),i=n.mul(G(eh,1)),a=n.mul(G(eh.add(t),1)),o=sd(i.sub(a));return e.vertexNode=i.add(o.mul(this.thicknessNode).mul(i.w).mul(r)),e.colorNode=G(this.colorNode,this.alphaNode),e}_getOutlineMaterial(e){let t=this._materialCache.get(e);return t===void 0&&(t=this._createMaterial(),this._materialCache.set(e,t)),t}},tT=(e,t,n=new j(0,0,0),r=.003,i=1)=>new eT(e,t,F(n),F(r),F(i)),nT=R(([e,t])=>e.mul(t).clamp()).setLayout({name:`linearToneMapping`,type:`vec3`,inputs:[{name:`color`,type:`vec3`},{name:`exposure`,type:`float`}]}),rT=R(([e,t])=>(e=e.mul(t),e.div(e.add(1)).clamp())).setLayout({name:`reinhardToneMapping`,type:`vec3`,inputs:[{name:`color`,type:`vec3`},{name:`exposure`,type:`float`}]}),iT=R(([e,t])=>{e=e.mul(t),e=e.sub(.004).max(0);let n=e.mul(e.mul(6.2).add(.5)),r=e.mul(e.mul(6.2).add(1.7)).add(.06);return n.div(r).pow(2.2)}).setLayout({name:`cineonToneMapping`,type:`vec3`,inputs:[{name:`color`,type:`vec3`},{name:`exposure`,type:`float`}]}),aT=R(([e])=>{let t=e.mul(e.add(.0245786)).sub(90537e-9),n=e.mul(e.add(.432951).mul(.983729)).add(.238081);return t.div(n)}),oT=R(([e,t])=>{let n=bl(.59719,.35458,.04823,.076,.90834,.01566,.0284,.13383,.83777),r=bl(1.60475,-.53108,-.07367,-.10208,1.10813,-.00605,-.00327,-.07276,1.07602);return e=e.mul(t).div(.6),e=n.mul(e),e=aT(e),e=r.mul(e),e.clamp()}).setLayout({name:`acesFilmicToneMapping`,type:`vec3`,inputs:[{name:`color`,type:`vec3`},{name:`exposure`,type:`float`}]}),sT=bl(W(1.6605,-.1246,-.0182),W(-.5876,1.1329,-.1006),W(-.0728,-.0083,1.1187)),cT=bl(W(.6274,.0691,.0164),W(.3293,.9195,.088),W(.0433,.0113,.8956)),lT=R(([e])=>{let t=W(e).toVar(),n=W(t.mul(t)).toVar(),r=W(n.mul(n)).toVar();return B(15.5).mul(r.mul(n)).sub(J(40.14,r.mul(t))).add(J(31.96,r).sub(J(6.868,n.mul(t))).add(J(.4298,n).add(J(.1191,t).sub(.00232))))}),uT=R(([e,t])=>{let n=W(e).toVar(),r=bl(W(.856627153315983,.137318972929847,.11189821299995),W(.0951212405381588,.761241990602591,.0767994186031903),W(.0482516061458583,.101439036467562,.811302368396859)),i=bl(W(1.1271005818144368,-.1413297634984383,-.14132976349843826),W(-.11060664309660323,1.157823702216272,-.11060664309660294),W(-.016493938717834573,-.016493938717834257,1.2519364065950405)),a=B(-12.47393),o=B(4.026069);return n.mulAssign(t),n.assign(cT.mul(n)),n.assign(r.mul(n)),n.assign(Id(n,1e-10)),n.assign(nd(n)),n.assign(n.sub(a).div(o.sub(a))),n.assign($d(n,0,1)),n.assign(lT(n)),n.assign(i.mul(n)),n.assign(Ud(Id(W(0),n),W(2.2))),n.assign(sT.mul(n)),n.assign($d(n,0,1)),n}).setLayout({name:`agxToneMapping`,type:`vec3`,inputs:[{name:`color`,type:`vec3`},{name:`exposure`,type:`float`}]}),dT=R(([e,t])=>{let n=B(.76),r=B(.15);e=e.mul(t);let i=Fd(e.r,Fd(e.g,e.b)),a=df(i.lessThan(.08),i.sub(J(6.25,i.mul(i))),.04);e.subAssign(a);let o=Id(e.r,Id(e.g,e.b));z(o.lessThan(n),()=>e);let s=bu(1,n),c=bu(1,s.mul(s).div(o.add(s.sub(n))));e.mulAssign(c.div(o));let l=bu(1,xu(1,r.mul(o.sub(c)).add(1)));return Qd(e,W(c),l)}).setLayout({name:`neutralToneMapping`,type:`vec3`,inputs:[{name:`color`,type:`vec3`},{name:`exposure`,type:`float`}]}),fT=class extends N{static get type(){return`CodeNode`}constructor(e=``,t=[],n=``){super(`code`),this.isCodeNode=!0,this.global=!0,this.code=e,this.includes=t,this.language=n}setIncludes(e){return this.includes=e,this}getIncludes(){return this.includes}generate(e){let t=this.getIncludes(e);for(let n of t)n.build(e);let n=e.getCodeFromNode(this,this.getNodeType(e));return n.code=this.code,n.code}serialize(e){super.serialize(e),e.code=this.code,e.language=this.language}deserialize(e){super.deserialize(e),this.code=e.code,this.language=e.language}},pT=el(fT).setParameterLength(1,3),mT=(e,t)=>pT(e,t,`js`),hT=(e,t)=>pT(e,t,`wgsl`),gT=(e,t)=>pT(e,t,`glsl`),_T=class extends fT{static get type(){return`FunctionNode`}constructor(e=``,t=[],n=``){super(e,t,n)}generateNodeType(e){return this.getNodeFunction(e).type}getMemberType(e,t){let n=this.getNodeType(e);return e.getStructTypeNode(n).getMemberType(e,t)}getInputs(e){return this.getNodeFunction(e).inputs}getNodeFunction(e){let t=e.getDataFromNode(this),n=t.nodeFunction;return n===void 0&&(n=e.parser.parseFunction(this.code),t.nodeFunction=n),n}generate(e,t){super.generate(e);let n=this.getNodeFunction(e),r=n.name,i=n.type,a=e.getCodeFromNode(this,i);r!==``&&(a.name=r);let o=e.getPropertyName(a);return a.code=this.getNodeFunction(e).getCode(o)+` -`,t===`property`?o:e.format(`${o}()`,i,t)}},vT=(e,t=[],n=``)=>{let r=new _T(e,t,n);return tl((...e)=>r.call(...e),r)},yT=(e,t)=>vT(e,t,`glsl`),bT=(e,t)=>vT(e,t,`wgsl`);function xT(e){let t,n=e.context.getViewZ;return n!==void 0&&(t=n(this)),(t||ih.z).negate()}var ST=R(([e,t],n)=>nf(e,t,xT(n))),CT=R(([e],t)=>{let n=xT(t);return e.mul(e,n,n).negate().exp().oneMinus()}),wT=R(([e,t],n)=>{let r=xT(n),i=t.sub(nh.y).max(0).toConst().mul(r).toConst();return e.mul(e,i,i).negate().exp().oneMinus()}),TT=R(([e,t])=>G(t.toFloat().mix(Yl.rgb,e.toVec3()),Yl.a)),ET=null,DT=null,OT=el(class extends N{static get type(){return`RangeNode`}constructor(e=B(),t=B()){super(),this.minNode=e,this.maxNode=t}getVectorLength(e){let t=this.getConstNode(this.minNode),n=this.getConstNode(this.maxNode),r=e.getTypeLength(Gs(t.value)),i=e.getTypeLength(Gs(n.value));return r>i?r:i}generateNodeType(e){return e.object.count>1?e.getTypeFromLength(this.getVectorLength(e)):`float`}getConstNode(e){let t=null;if(e.traverse(e=>{e.isConstNode===!0&&(t=e)}),t===null)throw new Np(`THREE.TSL: No "ConstNode" found in node graph.`,this.stackTrace);return t}setup(e){let t=e.object,n=null;if(t.count>1){let r=this.getConstNode(this.minNode),i=this.getConstNode(this.maxNode),a=r.value,o=i.value,s=e.getTypeLength(Gs(a)),c=e.getTypeLength(Gs(o));ET||=new xn,DT||=new xn,ET.setScalar(0),DT.setScalar(0),s===1?ET.setScalar(a):a.isColor?ET.set(a.r,a.g,a.b,1):ET.set(a.x,a.y,a.z||0,a.w||0),c===1?DT.setScalar(o):o.isColor?DT.set(o.r,o.g,o.b,1):DT.set(o.x,o.y,o.z||0,o.w||0);let l=4*t.count,u=new Float32Array(l);for(let e=0;enew kT(e,t),jT=AT(`numWorkgroups`,`uvec3`),MT=AT(`workgroupId`,`uvec3`),NT=AT(`globalId`,`uvec3`),PT=AT(`localId`,`uvec3`),FT=AT(`subgroupSize`,`uint`),IT=el(class extends N{constructor(e){super(),this.scope=e,this.isBarrierNode=!0}setup(e){e.allowEarlyReturns=!1,e.allowGlobalVariables=!1}generate(e){let{scope:t}=this,{renderer:n}=e;n.backend.isWebGLBackend===!0?e.addFlowCode(`\t// ${t}Barrier \n`):e.addLineFlowCode(`${t}Barrier()`,this)}}),LT=()=>IT(`workgroup`).toStack(),RT=()=>IT(`storage`).toStack(),zT=()=>IT(`texture`).toStack(),BT=class extends ac{constructor(e,t){super(e,t),this.isWorkgroupInfoElementNode=!0}generate(e,t){let n,r=e.isContextAssign();if(n=super.generate(e),r!==!0){let r=this.getNodeType(e);n=e.format(n,r,t)}return n}},VT=class extends N{constructor(e,t,n=0){super(t),this.bufferType=t,this.bufferCount=n,this.isWorkgroupInfoNode=!0,this.elementType=t,this.scope=e,this.name=``}setName(e){return this.name=e,this}label(e){return T(`TSL: "label()" has been deprecated. Use "setName()" instead.`,new Ns),this.setName(e)}setScope(e){return this.scope=e,this}getElementType(){return this.elementType}getInputType(){return`${this.scope}Array`}element(e){return new BT(this,e)}generate(e){let t=this.name===``?`${this.scope}Array_${this.id}`:this.name;return e.getScopedArray(t,this.scope.toLowerCase(),this.bufferType,this.bufferCount)}},HT=(e,t)=>new VT(`Workgroup`,e,t),UT=class extends N{static get type(){return`AtomicFunctionNode`}constructor(e,t,n){super(`uint`),this.method=e,this.pointerNode=t,this.valueNode=n,this.parents=!0}getInputType(e){return this.pointerNode.getNodeType(e)}generateNodeType(e){return this.getInputType(e)}generate(e){let t=e.getNodeProperties(this),n=t.parents,r=this.method,i=this.getNodeType(e),a=this.getInputType(e),o=this.pointerNode,s=this.valueNode,c=[];c.push(`&${o.build(e,a)}`),s!==null&&c.push(s.build(e,a));let l=`${e.getMethod(r,i)}( ${c.join(`, `)} )`;if(n&&n.length===1&&n[0].isStackNode===!0)e.addLineFlowCode(l,this);else return t.constNode===void 0&&(t.constNode=hp(l,i).toConst()),t.constNode.build(e)}};UT.ATOMIC_LOAD=`atomicLoad`,UT.ATOMIC_STORE=`atomicStore`,UT.ATOMIC_ADD=`atomicAdd`,UT.ATOMIC_SUB=`atomicSub`,UT.ATOMIC_MAX=`atomicMax`,UT.ATOMIC_MIN=`atomicMin`,UT.ATOMIC_AND=`atomicAnd`,UT.ATOMIC_OR=`atomicOr`,UT.ATOMIC_XOR=`atomicXor`;var WT=el(UT),GT=(e,t,n)=>WT(e,t,n).toStack(),KT=e=>GT(UT.ATOMIC_LOAD,e,null),qT=(e,t)=>GT(UT.ATOMIC_STORE,e,t),JT=(e,t)=>GT(UT.ATOMIC_ADD,e,t),YT=(e,t)=>GT(UT.ATOMIC_SUB,e,t),XT=(e,t)=>GT(UT.ATOMIC_MAX,e,t),ZT=(e,t)=>GT(UT.ATOMIC_MIN,e,t),QT=(e,t)=>GT(UT.ATOMIC_AND,e,t),$T=(e,t)=>GT(UT.ATOMIC_OR,e,t),eE=(e,t)=>GT(UT.ATOMIC_XOR,e,t),Z=class e extends sc{static get type(){return`SubgroupFunctionNode`}constructor(e,t=null,n=null){super(),this.method=e,this.aNode=t,this.bNode=n}getInputType(e){let t=this.aNode?this.aNode.getNodeType(e):null,n=this.bNode?this.bNode.getNodeType(e):null;return(e.isMatrix(t)?0:e.getTypeLength(t))>(e.isMatrix(n)?0:e.getTypeLength(n))?t:n}generateNodeType(t){let n=this.method;return n===e.SUBGROUP_ELECT?`bool`:n===e.SUBGROUP_BALLOT?`uvec4`:this.getInputType(t)}generate(t,n){let r=this.method,i=this.getNodeType(t),a=this.getInputType(t),o=this.aNode,s=this.bNode,c=[];if(r===e.SUBGROUP_BROADCAST||r===e.SUBGROUP_SHUFFLE||r===e.QUAD_BROADCAST){let e=s.getNodeType(t);c.push(o.build(t,i),s.build(t,e===`float`?`int`:i))}else r===e.SUBGROUP_SHUFFLE_XOR||r===e.SUBGROUP_SHUFFLE_DOWN||r===e.SUBGROUP_SHUFFLE_UP?c.push(o.build(t,i),s.build(t,`uint`)):(o!==null&&c.push(o.build(t,a)),s!==null&&c.push(s.build(t,a)));let l=c.length===0?`()`:`( ${c.join(`, `)} )`;return t.format(`${t.getMethod(r,i)}${l}`,i,n)}serialize(e){super.serialize(e),e.method=this.method}deserialize(e){super.deserialize(e),this.method=e.method}};Z.SUBGROUP_ELECT=`subgroupElect`,Z.SUBGROUP_BALLOT=`subgroupBallot`,Z.SUBGROUP_ADD=`subgroupAdd`,Z.SUBGROUP_INCLUSIVE_ADD=`subgroupInclusiveAdd`,Z.SUBGROUP_EXCLUSIVE_AND=`subgroupExclusiveAdd`,Z.SUBGROUP_MUL=`subgroupMul`,Z.SUBGROUP_INCLUSIVE_MUL=`subgroupInclusiveMul`,Z.SUBGROUP_EXCLUSIVE_MUL=`subgroupExclusiveMul`,Z.SUBGROUP_AND=`subgroupAnd`,Z.SUBGROUP_OR=`subgroupOr`,Z.SUBGROUP_XOR=`subgroupXor`,Z.SUBGROUP_MIN=`subgroupMin`,Z.SUBGROUP_MAX=`subgroupMax`,Z.SUBGROUP_ALL=`subgroupAll`,Z.SUBGROUP_ANY=`subgroupAny`,Z.SUBGROUP_BROADCAST_FIRST=`subgroupBroadcastFirst`,Z.QUAD_SWAP_X=`quadSwapX`,Z.QUAD_SWAP_Y=`quadSwapY`,Z.QUAD_SWAP_DIAGONAL=`quadSwapDiagonal`,Z.SUBGROUP_BROADCAST=`subgroupBroadcast`,Z.SUBGROUP_SHUFFLE=`subgroupShuffle`,Z.SUBGROUP_SHUFFLE_XOR=`subgroupShuffleXor`,Z.SUBGROUP_SHUFFLE_UP=`subgroupShuffleUp`,Z.SUBGROUP_SHUFFLE_DOWN=`subgroupShuffleDown`,Z.QUAD_BROADCAST=`quadBroadcast`;var tE=L(Z,Z.SUBGROUP_ELECT).setParameterLength(0),nE=L(Z,Z.SUBGROUP_BALLOT).setParameterLength(1),rE=L(Z,Z.SUBGROUP_ADD).setParameterLength(1),iE=L(Z,Z.SUBGROUP_INCLUSIVE_ADD).setParameterLength(1),aE=L(Z,Z.SUBGROUP_EXCLUSIVE_AND).setParameterLength(1),oE=L(Z,Z.SUBGROUP_MUL).setParameterLength(1),sE=L(Z,Z.SUBGROUP_INCLUSIVE_MUL).setParameterLength(1),cE=L(Z,Z.SUBGROUP_EXCLUSIVE_MUL).setParameterLength(1),lE=L(Z,Z.SUBGROUP_AND).setParameterLength(1),uE=L(Z,Z.SUBGROUP_OR).setParameterLength(1),dE=L(Z,Z.SUBGROUP_XOR).setParameterLength(1),fE=L(Z,Z.SUBGROUP_MIN).setParameterLength(1),pE=L(Z,Z.SUBGROUP_MAX).setParameterLength(1),mE=L(Z,Z.SUBGROUP_ALL).setParameterLength(0),hE=L(Z,Z.SUBGROUP_ANY).setParameterLength(0),gE=L(Z,Z.SUBGROUP_BROADCAST_FIRST).setParameterLength(2),_E=L(Z,Z.QUAD_SWAP_X).setParameterLength(1),vE=L(Z,Z.QUAD_SWAP_Y).setParameterLength(1),yE=L(Z,Z.QUAD_SWAP_DIAGONAL).setParameterLength(1),bE=L(Z,Z.SUBGROUP_BROADCAST).setParameterLength(2),xE=L(Z,Z.SUBGROUP_SHUFFLE).setParameterLength(2),SE=L(Z,Z.SUBGROUP_SHUFFLE_XOR).setParameterLength(2),CE=L(Z,Z.SUBGROUP_SHUFFLE_UP).setParameterLength(2),wE=L(Z,Z.SUBGROUP_SHUFFLE_DOWN).setParameterLength(2),TE=L(Z,Z.QUAD_BROADCAST).setParameterLength(1),EE;function DE(e){EE||=new WeakMap;let t=EE.get(e);return t===void 0&&EE.set(e,t={}),t}function OE(e){let t=DE(e);return t.shadowMatrix||=q(`mat4`).setGroup(K).onRenderUpdate(t=>((e.castShadow!==!0||t.renderer.shadowMap.enabled===!1)&&(e.shadow.camera.coordinateSystem!==t.camera.coordinateSystem&&(e.shadow.camera.coordinateSystem=t.camera.coordinateSystem,e.shadow.camera.updateProjectionMatrix()),e.shadow.updateMatrices(e)),e.shadow.matrix))}function kE(e,t=nh){let n=OE(e).mul(t);return n.xyz.div(n.w)}function AE(e){let t=DE(e);return t.position||=q(new k).setGroup(K).onRenderUpdate((t,n)=>n.value.setFromMatrixPosition(e.matrixWorld))}function jE(e){let t=DE(e);return t.targetPosition||=q(new k).setGroup(K).onRenderUpdate((t,n)=>n.value.setFromMatrixPosition(e.target.matrixWorld))}function ME(e){let t=DE(e);return t.viewPosition||=q(new k).setGroup(K).onRenderUpdate(({camera:t},n)=>{n.value=n.value||new k,n.value.setFromMatrixPosition(e.matrixWorld),n.value.applyMatrix4(t.matrixWorldInverse)})}var NE=e=>Em.transformDirection(AE(e).sub(jE(e))),PE=Dl(`vec3`,`totalDiffuse`),FE=Dl(`vec3`,`totalSpecular`),IE=Dl(`vec3`,`outgoingLight`),LE=e=>e.sort((e,t)=>e.id-t.id),RE=(e,t)=>{for(let n of t)if(n.isAnalyticLightNode&&n.light.id===e)return n;return null},zE=new WeakMap,BE=[],VE=class extends N{static get type(){return`LightsNode`}constructor(){super(`vec3`),this.totalDiffuseNode=PE,this.totalSpecularNode=FE,this.outgoingLightNode=IE,this._lights=[],this.global=!0}customCacheKey(){let e=this._lights;for(let t=0;t0}},HE=(e=[])=>new VE().setLights(e),UE=class extends N{static get type(){return`ShadowBaseNode`}constructor(e){super(),this.light=e,this.updateBeforeType=M.RENDER,this.isShadowBaseNode=!0}setupShadowPosition({context:e,material:t}){WE.assign(t.receivedShadowPositionNode||e.shadowPositionWorld||nh)}},WE=Dl(`vec3`,`shadowPositionWorld`);function GE(e,t={}){return t.toneMapping=e.toneMapping,t.toneMappingExposure=e.toneMappingExposure,t.outputColorSpace=e.outputColorSpace,t.renderTarget=e.getRenderTarget(),t.activeCubeFace=e.getActiveCubeFace(),t.activeMipmapLevel=e.getActiveMipmapLevel(),t.renderObjectFunction=e.getRenderObjectFunction(),t.pixelRatio=e.getPixelRatio(),t.mrt=e.getMRT(),t.clearColor=e.getClearColor(t.clearColor||new j),t.clearAlpha=e.getClearAlpha(),t.autoClear=e.autoClear,t.scissorTest=e.getScissorTest(),t}function KE(e,t){return t=GE(e,t),e.setMRT(null),e.setRenderObjectFunction(null),e.setClearColor(0,1),e.autoClear=!0,t}function qE(e,t){e.toneMapping=t.toneMapping,e.toneMappingExposure=t.toneMappingExposure,e.outputColorSpace=t.outputColorSpace,e.setRenderTarget(t.renderTarget,t.activeCubeFace,t.activeMipmapLevel),e.setRenderObjectFunction(t.renderObjectFunction),e.setPixelRatio(t.pixelRatio),e.setMRT(t.mrt),e.setClearColor(t.clearColor,t.clearAlpha),e.autoClear=t.autoClear,e.setScissorTest(t.scissorTest)}function JE(e,t={}){return t.background=e.background,t.backgroundNode=e.backgroundNode,t.overrideMaterial=e.overrideMaterial,t}function YE(e,t){return t=JE(e,t),e.background=null,e.backgroundNode=null,e.overrideMaterial=null,t}function XE(e,t){e.background=t.background,e.backgroundNode=t.backgroundNode,e.overrideMaterial=t.overrideMaterial}function ZE(e,t,n){return n=KE(e,n),n=YE(t,n),n}function QE(e,t,n){qE(e,n),XE(t,n)}var $E=new WeakMap,eD=R(({depthTexture:e,shadowCoord:t,depthLayer:n})=>{let r=Lp(e,t.xy).setName(`t_basic`);return e.isArrayTexture&&(r=r.depth(n)),r.compare(t.z)}),tD=R(({depthTexture:e,shadowCoord:t,shadow:n,depthLayer:r})=>{let i=(t,n)=>{let i=Lp(e,t);return e.isArrayTexture&&(i=i.depth(r)),i.compare(n)},a=Lh(`mapSize`,`vec2`,n).setGroup(K),o=Lh(`radius`,`float`,n).setGroup(K),s=U(1).div(a),c=o.mul(s.x),l=aw(tm.xy).mul(6.28318530718);return yu(i(t.xy.add(ow(0,5,l).mul(c)),t.z),i(t.xy.add(ow(1,5,l).mul(c)),t.z),i(t.xy.add(ow(2,5,l).mul(c)),t.z),i(t.xy.add(ow(3,5,l).mul(c)),t.z),i(t.xy.add(ow(4,5,l).mul(c)),t.z)).mul(1/5)}),nD=R(({depthTexture:e,shadowCoord:t,shadow:n,depthLayer:r})=>{let i=Lh(`mapSize`,`vec2`,n).setGroup(K),a=U(1).div(i),o=t.xy,s=cd(o.mul(i).add(.5)).toConst();o.subAssign(s.sub(.5).mul(a));let c=n=>{let i=Lp(e,o).offset(n).gather();return e.isArrayTexture&&(i=i.depth(r)),i.compare(t.z)},l=c(ul(-1,1)).toConst(),u=c(ul(1,1)).toConst(),d=c(ul(-1,-1)).toConst(),f=c(ul(1,-1)).toConst();return yu(Qd(l.x,u.y,s.x).add(l.y).add(u.x).mul(s.y),Qd(l.w,u.z,s.x).add(l.z).add(u.w),Qd(d.x,f.y,s.x).add(d.y).add(f.x),Qd(d.w,f.z,s.x).add(d.z).add(f.w).mul(s.y.oneMinus())).mul(1/9)}),rD=R(({depthTexture:e,shadowCoord:t,depthLayer:n},r)=>{let i=Lp(e).sample(t.xy);e.isArrayTexture&&(i=i.depth(n)),i=i.rg;let a=i.x,o=Id(1e-7,i.y.mul(i.y)),s=r.renderer.reversedDepthBuffer?Ld(a,t.z):Ld(t.z,a),c=B(1).toVar();return z(s.notEqual(1),()=>{let e=t.z.sub(a),n=o.div(o.add(e.mul(e)));n=$d(bu(n,.3).div(.65)),c.assign(Id(s,n))}),c}),iD=e=>{let t=$E.get(e);return t===void 0&&(t=new Av,t.colorNode=G(0,0,0,1),t.isShadowPassMaterial=!0,t.name=`ShadowMaterial`,t.blending=0,t.fog=!1,$E.set(e,t)),t},aD=e=>{let t=$E.get(e);t!==void 0&&(t.dispose(),$E.delete(e))},oD=new Bx,sD=[],cD=(e,t,n,r)=>{sD[0]=e,sD[1]=t;let i=oD.get(sD);return(i===void 0||i.shadowType!==n||i.useVelocity!==r)&&(i=(i,a,o,s,c,l,u,d,f)=>{(i.castShadow===!0||i.receiveShadow&&n===3)&&(r&&(qs(i).useVelocity=!0),i.onBeforeShadow(e,i,o,t.camera,s,a.overrideMaterial,l),e.renderObject(i,a,o,s,c,l,u,d,f),i.onAfterShadow(e,i,o,t.camera,s,a.overrideMaterial,l))},i.shadowType=n,i.useVelocity=r,oD.set(sD,i)),sD[0]=null,sD[1]=null,i},lD=R(({samples:e,radius:t,size:n,shadowPass:r,depthLayer:i})=>{let a=B(0).toVar(`meanVertical`),o=B(0).toVar(`squareMeanVertical`),s=e.lessThanEqual(B(1)).select(B(0),B(2).div(e.sub(1))),c=e.lessThanEqual(B(1)).select(B(0),B(-1));return B_({start:V(0),end:V(e),type:`int`,condition:`<`},({i:e})=>{let l=c.add(B(e).mul(s)),u=r.sample(yu(tm.xy,U(0,l).mul(t)).div(n));r.value.isArrayTexture&&(u=u.depth(i)),u=u.x,a.addAssign(u),o.addAssign(u.mul(u))}),a.divAssign(e),o.divAssign(e),U(a,rd(o.sub(a.mul(a)).max(0)))}),uD=R(({samples:e,radius:t,size:n,shadowPass:r,depthLayer:i})=>{let a=B(0).toVar(`meanHorizontal`),o=B(0).toVar(`squareMeanHorizontal`),s=e.lessThanEqual(B(1)).select(B(0),B(2).div(e.sub(1))),c=e.lessThanEqual(B(1)).select(B(0),B(-1));return B_({start:V(0),end:V(e),type:`int`,condition:`<`},({i:e})=>{let l=c.add(B(e).mul(s)),u=r.sample(yu(tm.xy,U(l,0).mul(t)).div(n));r.value.isArrayTexture&&(u=u.depth(i)),a.addAssign(u.x),o.addAssign(yu(u.y.mul(u.y),u.x.mul(u.x)))}),a.divAssign(e),o.divAssign(e),U(a,rd(o.sub(a.mul(a)).max(0)))}),dD=[eD,tD,nD,rD],fD,pD=new ZC,mD=class extends UE{static get type(){return`ShadowNode`}constructor(e,t=null){super(e),this.shadow=t||e.shadow,this.shadowMap=null,this.vsmShadowMapVertical=null,this.vsmShadowMapHorizontal=null,this.vsmMaterialVertical=null,this.vsmMaterialHorizontal=null,this._node=null,this._currentShadowType=null,this._cameraFrameId=new WeakMap,this.isShadowNode=!0,this.depthLayer=0}setupShadowFilter(e,{filterFn:t,depthTexture:n,shadowCoord:r,shadow:i,depthLayer:a}){let o=r.x.greaterThanEqual(0).and(r.x.lessThanEqual(1)).and(r.y.greaterThanEqual(0)).and(r.y.lessThanEqual(1)).and(r.z.lessThanEqual(1)),s=t({depthTexture:n,shadowCoord:r,shadow:i,depthLayer:a});return o.select(s,B(1))}setupShadowCoord(e,t){let{shadow:n}=this,{renderer:r}=e,i=n.biasNode||Lh(`bias`,`float`,n).setGroup(K),a=t,o;if(n.camera.isOrthographicCamera||r.logarithmicDepthBuffer!==!0)a=a.xyz.div(a.w),o=a.z;else{let e=a.w;a=a.xy.div(e);let t=Lh(`near`,`float`,n.camera).setGroup(K),r=Lh(`far`,`float`,n.camera).setGroup(K);o=mv(e.negate(),t,r)}return a=W(a.x,a.y.oneMinus(),r.reversedDepthBuffer?o.sub(i):o.add(i)),a}getShadowFilterFn(e){return dD[e]}setupRenderTarget(e,t){let n=new ia(e.mapSize.width,e.mapSize.height);n.name=`ShadowDepthTexture`,n.compareFunction=t.renderer.reversedDepthBuffer?518:515;let r=t.createRenderTarget(e.mapSize.width,e.mapSize.height);return r.texture.name=`ShadowMap`,r.texture.type=e.mapType,r.depthTexture=n,{shadowMap:r,depthTexture:n}}setupShadow(e){let{renderer:t,camera:n}=e,{light:r,shadow:i}=this,{depthTexture:a,shadowMap:s}=this.setupRenderTarget(i,e),c=t.shadowMap.type,u=t.hasCompatibility(_t.TEXTURE_COMPARE);if((c===1||c===2)&&u?(a.minFilter=l,a.magFilter=l):(a.minFilter=o,a.magFilter=o),i.camera.coordinateSystem=n.coordinateSystem,i.camera.updateProjectionMatrix(),c===3&&i.isPointLightShadow!==!0){a.compareFunction=null,s.depth>1?(s._vsmShadowMapVertical||(s._vsmShadowMapVertical=e.createRenderTarget(i.mapSize.width,i.mapSize.height,{format:ce,type:b,depth:s.depth,depthBuffer:!1}),s._vsmShadowMapVertical.texture.name=`VSMVertical`),this.vsmShadowMapVertical=s._vsmShadowMapVertical,s._vsmShadowMapHorizontal||(s._vsmShadowMapHorizontal=e.createRenderTarget(i.mapSize.width,i.mapSize.height,{format:ce,type:b,depth:s.depth,depthBuffer:!1}),s._vsmShadowMapHorizontal.texture.name=`VSMHorizontal`),this.vsmShadowMapHorizontal=s._vsmShadowMapHorizontal):(this.vsmShadowMapVertical=e.createRenderTarget(i.mapSize.width,i.mapSize.height,{format:ce,type:b,depthBuffer:!1}),this.vsmShadowMapHorizontal=e.createRenderTarget(i.mapSize.width,i.mapSize.height,{format:ce,type:b,depthBuffer:!1}));let t=Lp(a);a.isArrayTexture&&(t=t.depth(this.depthLayer));let n=Lp(this.vsmShadowMapVertical.texture);a.isArrayTexture&&(n=n.depth(this.depthLayer));let r=Lh(`blurSamples`,`float`,i).setGroup(K),o=Lh(`radius`,`float`,i).setGroup(K),c=Lh(`mapSize`,`vec2`,i).setGroup(K),l=this.vsmMaterialVertical||=new Av;l.fragmentNode=lD({samples:r,radius:o,size:c,shadowPass:t,depthLayer:this.depthLayer}).context(e.getSharedContext()),l.name=`VSMVertical`,l=this.vsmMaterialHorizontal||=new Av,l.fragmentNode=uD({samples:r,radius:o,size:c,shadowPass:n,depthLayer:this.depthLayer}).context(e.getSharedContext()),l.name=`VSMHorizontal`}let d=Lh(`intensity`,`float`,i).setGroup(K),f=Lh(`normalBias`,`float`,i).setGroup(K),p=OE(r),m=gh.mul(f),h;h=!t.highPrecision||e.material.receivedShadowPositionNode||e.context.shadowPositionWorld?p.mul(WE.add(m)):q(`mat4`).onObjectUpdate(({object:e},t)=>t.value.multiplyMatrices(p.value,e.matrixWorld)).mul(eh).add(p.mul(G(m,0)));let g=this.setupShadowCoord(e,h),_=i.filterNode||this.getShadowFilterFn(t.shadowMap.type)||null;if(_===null)throw Error(`THREE.WebGPURenderer: Shadow map type not supported yet.`);let v=c===3&&i.isPointLightShadow!==!0?this.vsmShadowMapHorizontal.texture:a,y=this.setupShadowFilter(e,{filterFn:_,shadowTexture:s.texture,depthTexture:v,shadowCoord:g,shadow:i,depthLayer:this.depthLayer}),x;t.shadowMap.transmitted===!0&&(s.texture.isCubeTexture?x=Nh(s.texture,g.xyz):(x=Lp(s.texture,g),a.isArrayTexture&&(x=x.depth(this.depthLayer))));let S;S=x?Qd(1,y.rgb.mix(x,1),d.mul(x.a)).toVar():Qd(1,y,d).toVar(),this.shadowMap=s,this.shadow.map=s;let C=`${this.light.type} Shadow [ ${this.light.name||`ID: `+this.light.id} ]`;return x&&S.toInspector(`${C} / Color`,()=>this.shadowMap.texture.isCubeTexture?Nh(this.shadowMap.texture,Jv()):Lp(this.shadowMap.texture)),S.toInspector(`${C} / Depth`,()=>{let e=Lh(`near`,`float`,this.shadow.camera),t=Lh(`far`,`float`,this.shadow.camera),n;n=this.shadowMap.texture.isCubeTexture?Nh(this.shadowMap.depthTexture,Jv()).r:Lp(this.shadowMap.depthTexture).r;let r;return r=this.shadow.camera.isPerspectiveCamera?pv(n,e,t):uv(n,e,t),r=cv(r,e,t),r.oneMinus()})}setup(e){if(e.renderer.shadowMap.enabled!==!1)return R(()=>{let t=e.renderer.shadowMap.type;this._currentShadowType!==t&&(this._reset(),this._node=null);let n=this._node;return this.setupShadowPosition(e),n===null&&(this._node=n=this.setupShadow(e),this._currentShadowType=t),e.material.receivedShadowNode&&(n=e.material.receivedShadowNode(n)),n})()}renderShadow(e){let{shadow:t,shadowMap:n,light:r}=this,{renderer:i,scene:a}=e;t.updateMatrices(r),n.setSize(t.mapSize.width,t.mapSize.height,n.depth);let o=a.name;a.name=`Shadow Map [ ${r.name||`ID: `+r.id} ]`,i.render(a,t.camera),a.name=o}updateShadow(e){let{shadowMap:t,light:n,shadow:r}=this,{renderer:i,scene:a,camera:o}=e,s=i.shadowMap.type,c=t.depthTexture.version;this._depthVersionCached=c;let l=r.camera.layers.mask;r.camera.layers.mask&4294967294||(r.camera.layers.mask=o.layers.mask);let u=i.getRenderObjectFunction(),d=i.getMRT(),f=d?d.has(`velocity`):!1;fD=ZE(i,a,fD),a.overrideMaterial=iD(n),i.setRenderObjectFunction(cD(i,r,s,f)),i.setClearColor(0,0),i.setRenderTarget(t),this.renderShadow(e),i.setRenderObjectFunction(u),s===3&&r.isPointLightShadow!==!0&&this.vsmPass(i),r.camera.layers.mask=l,QE(i,a,fD)}vsmPass(e){let{shadow:t}=this,n=this.shadowMap.depth;this.vsmShadowMapVertical.setSize(t.mapSize.width,t.mapSize.height,n),this.vsmShadowMapHorizontal.setSize(t.mapSize.width,t.mapSize.height,n),e.setRenderTarget(this.vsmShadowMapVertical),pD.material=this.vsmMaterialVertical,pD.render(e),e.setRenderTarget(this.vsmShadowMapHorizontal),pD.material=this.vsmMaterialHorizontal,pD.render(e)}dispose(){this._reset(),super.dispose()}_reset(){this._currentShadowType=null,aD(this.light),this.shadowMap&&=(this.shadowMap.dispose(),null),this.vsmShadowMapVertical!==null&&(this.vsmShadowMapVertical.dispose(),this.vsmShadowMapVertical=null,this.vsmMaterialVertical.dispose(),this.vsmMaterialVertical=null),this.vsmShadowMapHorizontal!==null&&(this.vsmShadowMapHorizontal.dispose(),this.vsmShadowMapHorizontal=null,this.vsmMaterialHorizontal.dispose(),this.vsmMaterialHorizontal=null)}updateBefore(e){let{shadow:t}=this,n=t.needsUpdate||t.autoUpdate;n&&(this._cameraFrameId[e.camera]===e.frameId&&(n=!1),this._cameraFrameId[e.camera]=e.frameId),n&&(this.updateShadow(e),this.shadowMap.depthTexture.version===this._depthVersionCached&&(t.needsUpdate=!1))}},hD=(e,t)=>new mD(e,t),gD=new j,_D=new A,vD=new k,yD=new k,bD=[new k(1,0,0),new k(-1,0,0),new k(0,-1,0),new k(0,1,0),new k(0,0,1),new k(0,0,-1)],xD=[new k(0,-1,0),new k(0,-1,0),new k(0,0,-1),new k(0,0,1),new k(0,-1,0),new k(0,-1,0)],SD=[new k(1,0,0),new k(-1,0,0),new k(0,1,0),new k(0,-1,0),new k(0,0,1),new k(0,0,-1)],CD=[new k(0,-1,0),new k(0,-1,0),new k(0,0,1),new k(0,0,-1),new k(0,-1,0),new k(0,-1,0)],wD=R(({depthTexture:e,bd3D:t,dp:n})=>Nh(e,t).compare(n)),TD=R(({depthTexture:e,bd3D:t,dp:n,shadow:r})=>{let i=Lh(`radius`,`float`,r).setGroup(K),a=Lh(`mapSize`,`vec2`,r).setGroup(K),o=i.div(a.x),s=xd(t),c=sd(Hd(t,s.x.greaterThan(s.z).select(W(0,1,0),W(1,0,0)))),l=Hd(t,c),u=aw(tm.xy).mul(6.28318530718),d=ow(0,5,u),f=ow(1,5,u),p=ow(2,5,u),m=ow(3,5,u),h=ow(4,5,u);return Nh(e,t.add(c.mul(d.x).add(l.mul(d.y)).mul(o))).compare(n).add(Nh(e,t.add(c.mul(f.x).add(l.mul(f.y)).mul(o))).compare(n)).add(Nh(e,t.add(c.mul(p.x).add(l.mul(p.y)).mul(o))).compare(n)).add(Nh(e,t.add(c.mul(m.x).add(l.mul(m.y)).mul(o))).compare(n)).add(Nh(e,t.add(c.mul(h.x).add(l.mul(h.y)).mul(o))).compare(n)).mul(1/5)}),ED=R(({filterFn:e,depthTexture:t,shadowCoord:n,shadow:r},i)=>{let a=n.xyz.toConst(),o=a.abs().toConst(),s=o.x.max(o.y).max(o.z),c=q(`float`).setGroup(K).onRenderUpdate(()=>r.camera.near),l=q(`float`).setGroup(K).onRenderUpdate(()=>r.camera.far),u=Lh(`bias`,`float`,r).setGroup(K),d=B(1).toVar();return z(s.sub(l).lessThanEqual(0).and(s.sub(c).greaterThanEqual(0)),()=>{let n;i.renderer.reversedDepthBuffer?(n=fv(s.negate(),c,l),n.subAssign(u)):i.renderer.logarithmicDepthBuffer?(n=mv(s.negate(),c,l),n.addAssign(u)):(n=dv(s.negate(),c,l),n.addAssign(u));let o=a.normalize();d.assign(e({depthTexture:t,bd3D:o,dp:n,shadow:r}))}),d}),DD=class extends mD{static get type(){return`PointShadowNode`}constructor(e,t=null){super(e,t)}getShadowFilterFn(e){return e===0?wD:TD}setupShadowCoord(e,t){return t}setupShadowFilter(e,{filterFn:t,depthTexture:n,shadowCoord:r,shadow:i}){return ED({filterFn:t,depthTexture:n,shadowCoord:r,shadow:i})}setupRenderTarget(e,t){let n=new aa(e.mapSize.width);n.name=`PointShadowDepthTexture`,n.compareFunction=t.renderer.reversedDepthBuffer?518:515;let r=t.createCubeRenderTarget(e.mapSize.width);return r.texture.name=`PointShadowMap`,r.depthTexture=n,{shadowMap:r,depthTexture:n}}renderShadow(e){let{shadow:t,shadowMap:n,light:r}=this,{renderer:i,scene:a}=e,o=t.camera,s=t.matrix,c=i.coordinateSystem===ht,l=c?bD:SD,u=c?xD:CD;n.setSize(t.mapSize.width,t.mapSize.width);let d=i.autoClear,f=i.getClearColor(gD),p=i.getClearAlpha();i.autoClear=!1,i.setClearColor(t.clearColor,t.clearAlpha);for(let e=0;e<6;e++){i.setRenderTarget(n,e),i.clear();let c=r.distance||o.far;c!==o.far&&(o.far=c,o.updateProjectionMatrix()),vD.setFromMatrixPosition(r.matrixWorld),o.position.copy(vD),yD.copy(o.position),yD.add(l[e]),o.up.copy(u[e]),o.lookAt(yD),o.updateMatrixWorld(),s.makeTranslation(-vD.x,-vD.y,-vD.z),_D.multiplyMatrices(o.projectionMatrix,o.matrixWorldInverse),t._frustum.setFromProjectionMatrix(_D,o.coordinateSystem,o.reversedDepth);let d=a.name;a.name=`Point Light Shadow [ ${r.name||`ID: `+r.id} ] - Face ${e+1}`,i.render(a,o),a.name=d}i.autoClear=d,i.setClearColor(f,p)}},OD=(e,t)=>new DD(e,t),kD=class extends Y_{static get type(){return`AnalyticLightNode`}constructor(e=null){super(),this.light=e,this.color=new j,this.colorNode=e&&e.colorNode||q(this.color).setGroup(K),this.baseColorNode=null,this.shadowNode=null,this.shadowColorNode=null,this.isAnalyticLightNode=!0,this.updateType=M.FRAME,e&&e.shadow&&(this._shadowDisposeListener=()=>{this.disposeShadow()},e.addEventListener(`dispose`,this._shadowDisposeListener))}dispose(){this._shadowDisposeListener&&this.light.removeEventListener(`dispose`,this._shadowDisposeListener),super.dispose()}disposeShadow(){this.shadowNode!==null&&(this.shadowNode.dispose(),this.shadowNode=null),this.shadowColorNode=null,this.baseColorNode!==null&&(this.colorNode=this.baseColorNode,this.baseColorNode=null)}getHash(){return this.light.uuid}getLightVector(e){return ME(this.light).sub(e.context.positionView||ih)}setupDirect(){}setupDirectRectArea(){}setupShadowNode(){return hD(this.light)}setupShadow(e){let{renderer:t}=e;if(t.shadowMap.enabled===!1)return;let n=this.shadowColorNode;if(n===null){let e=this.light.shadow.shadowNode,t;t=e===void 0?this.setupShadowNode():F(e),this.shadowNode=t,this.shadowColorNode=n=this.colorNode.mul(t),this.baseColorNode=this.colorNode}e.context.getShadow&&(n=e.context.getShadow(this,e)),this.colorNode=n}setup(e){this.colorNode=this.baseColorNode||this.colorNode,this.light.castShadow?e.object.receiveShadow&&this.setupShadow(e):this.shadowNode!==null&&(this.shadowNode.dispose(),this.shadowNode=null,this.shadowColorNode=null);let t=this.setupDirect(e),n=this.setupDirectRectArea(e);t&&e.lightsNode.setupDirectLight(e,this,t),n&&e.lightsNode.setupDirectRectAreaLight(e,this,n)}update(){let{light:e}=this;this.color.copy(e.color).multiplyScalar(e.intensity)}},AD=R(({lightDistance:e,cutoffDistance:t,decayExponent:n})=>{let r=e.pow(n).max(.01).reciprocal();return t.greaterThan(0).select(r.mul(e.div(t).pow4().oneMinus().clamp().pow2()),r)}),jD=({color:e,lightVector:t,cutoffDistance:n,decayExponent:r})=>{let i=t.normalize(),a=AD({lightDistance:t.length(),cutoffDistance:n,decayExponent:r});return{lightDirection:i,lightColor:e.mul(a)}},MD=class extends kD{static get type(){return`PointLightNode`}constructor(e=null){super(e),this.cutoffDistanceNode=q(0).setGroup(K),this.decayExponentNode=q(2).setGroup(K)}update(e){let{light:t}=this;super.update(e),this.cutoffDistanceNode.value=t.distance,this.decayExponentNode.value=t.decay}setupShadowNode(){return OD(this.light)}setupDirect(e){return jD({color:this.colorNode,lightVector:this.getLightVector(e),cutoffDistance:this.cutoffDistanceNode,decayExponent:this.decayExponentNode})}},ND=R(([e=Ap()])=>{let t=e.mul(2),n=t.x.floor(),r=t.y.floor();return n.add(r).mod(2).sign()}),PD=R(([e=Ap()],{renderer:t,material:n})=>{let r=Zd(e.mul(2).sub(1)),i;if(n.alphaToCoverage&&t.currentSamples>0){let e=B(r.fwidth()).toVar();i=nf(e.oneMinus(),e.add(1),r).oneMinus()}else i=df(r.greaterThan(1),0,1);return i}),FD=R(([e,t,n])=>{let r=B(n).toVar(),i=B(t).toVar();return df(ll(e).toVar(),i,r).uniformFlow()}).setLayout({name:`mx_select`,type:`float`,inputs:[{name:`b`,type:`bool`},{name:`t`,type:`float`},{name:`f`,type:`float`}]}),ID=R(([e,t])=>{let n=ll(t).toVar(),r=B(e).toVar();return df(n,r.negate(),r).uniformFlow()}).setLayout({name:`mx_negate_if`,type:`float`,inputs:[{name:`val`,type:`float`},{name:`b`,type:`bool`}]}),LD=R(([e])=>V(ad(B(e).toVar()))).setLayout({name:`mx_floor`,type:`int`,inputs:[{name:`x`,type:`float`}]}),RD=R(([e,t])=>{let n=B(e).toVar();return t.assign(LD(n)),n.sub(B(t))}),zD=gC([R(([e,t,n,r,i,a])=>{let o=B(a).toVar(),s=B(i).toVar(),c=B(r).toVar(),l=B(n).toVar(),u=B(t).toVar(),d=B(e).toVar(),f=B(bu(1,s)).toVar();return bu(1,o).mul(d.mul(f).add(u.mul(s))).add(o.mul(l.mul(f).add(c.mul(s))))}).setLayout({name:`mx_bilerp_0`,type:`float`,inputs:[{name:`v0`,type:`float`},{name:`v1`,type:`float`},{name:`v2`,type:`float`},{name:`v3`,type:`float`},{name:`s`,type:`float`},{name:`t`,type:`float`}]}),R(([e,t,n,r,i,a])=>{let o=B(a).toVar(),s=B(i).toVar(),c=W(r).toVar(),l=W(n).toVar(),u=W(t).toVar(),d=W(e).toVar(),f=B(bu(1,s)).toVar();return bu(1,o).mul(d.mul(f).add(u.mul(s))).add(o.mul(l.mul(f).add(c.mul(s))))}).setLayout({name:`mx_bilerp_1`,type:`vec3`,inputs:[{name:`v0`,type:`vec3`},{name:`v1`,type:`vec3`},{name:`v2`,type:`vec3`},{name:`v3`,type:`vec3`},{name:`s`,type:`float`},{name:`t`,type:`float`}]})]),BD=gC([R(([e,t,n,r,i,a,o,s,c,l,u])=>{let d=B(u).toVar(),f=B(l).toVar(),p=B(c).toVar(),m=B(s).toVar(),h=B(o).toVar(),g=B(a).toVar(),_=B(i).toVar(),v=B(r).toVar(),y=B(n).toVar(),b=B(t).toVar(),x=B(e).toVar(),S=B(bu(1,p)).toVar(),C=B(bu(1,f)).toVar();return B(bu(1,d)).toVar().mul(C.mul(x.mul(S).add(b.mul(p))).add(f.mul(y.mul(S).add(v.mul(p))))).add(d.mul(C.mul(_.mul(S).add(g.mul(p))).add(f.mul(h.mul(S).add(m.mul(p))))))}).setLayout({name:`mx_trilerp_0`,type:`float`,inputs:[{name:`v0`,type:`float`},{name:`v1`,type:`float`},{name:`v2`,type:`float`},{name:`v3`,type:`float`},{name:`v4`,type:`float`},{name:`v5`,type:`float`},{name:`v6`,type:`float`},{name:`v7`,type:`float`},{name:`s`,type:`float`},{name:`t`,type:`float`},{name:`r`,type:`float`}]}),R(([e,t,n,r,i,a,o,s,c,l,u])=>{let d=B(u).toVar(),f=B(l).toVar(),p=B(c).toVar(),m=W(s).toVar(),h=W(o).toVar(),g=W(a).toVar(),_=W(i).toVar(),v=W(r).toVar(),y=W(n).toVar(),b=W(t).toVar(),x=W(e).toVar(),S=B(bu(1,p)).toVar(),C=B(bu(1,f)).toVar();return B(bu(1,d)).toVar().mul(C.mul(x.mul(S).add(b.mul(p))).add(f.mul(y.mul(S).add(v.mul(p))))).add(d.mul(C.mul(_.mul(S).add(g.mul(p))).add(f.mul(h.mul(S).add(m.mul(p))))))}).setLayout({name:`mx_trilerp_1`,type:`vec3`,inputs:[{name:`v0`,type:`vec3`},{name:`v1`,type:`vec3`},{name:`v2`,type:`vec3`},{name:`v3`,type:`vec3`},{name:`v4`,type:`vec3`},{name:`v5`,type:`vec3`},{name:`v6`,type:`vec3`},{name:`v7`,type:`vec3`},{name:`s`,type:`float`},{name:`t`,type:`float`},{name:`r`,type:`float`}]})]),VD=gC([R(([e,t,n])=>{let r=B(n).toVar(),i=B(t).toVar(),a=H(H(e).toVar().bitAnd(H(7))).toVar(),o=B(FD(a.lessThan(H(4)),i,r)).toVar(),s=B(J(2,FD(a.lessThan(H(4)),r,i))).toVar();return ID(o,ll(a.bitAnd(H(1)))).add(ID(s,ll(a.bitAnd(H(2)))))}).setLayout({name:`mx_gradient_float_0`,type:`float`,inputs:[{name:`hash`,type:`uint`},{name:`x`,type:`float`},{name:`y`,type:`float`}]}),R(([e,t,n,r])=>{let i=B(r).toVar(),a=B(n).toVar(),o=B(t).toVar(),s=H(H(e).toVar().bitAnd(H(15))).toVar(),c=B(FD(s.lessThan(H(8)),o,a)).toVar(),l=B(FD(s.lessThan(H(4)),a,FD(s.equal(H(12)).or(s.equal(H(14))),o,i))).toVar();return ID(c,ll(s.bitAnd(H(1)))).add(ID(l,ll(s.bitAnd(H(2)))))}).setLayout({name:`mx_gradient_float_1`,type:`float`,inputs:[{name:`hash`,type:`uint`},{name:`x`,type:`float`},{name:`y`,type:`float`},{name:`z`,type:`float`}]})]),HD=gC([R(([e,t,n])=>{let r=B(n).toVar(),i=B(t).toVar(),a=ml(e).toVar();return W(VD(a.x,i,r),VD(a.y,i,r),VD(a.z,i,r))}).setLayout({name:`mx_gradient_vec3_0`,type:`vec3`,inputs:[{name:`hash`,type:`uvec3`},{name:`x`,type:`float`},{name:`y`,type:`float`}]}),R(([e,t,n,r])=>{let i=B(r).toVar(),a=B(n).toVar(),o=B(t).toVar(),s=ml(e).toVar();return W(VD(s.x,o,a,i),VD(s.y,o,a,i),VD(s.z,o,a,i))}).setLayout({name:`mx_gradient_vec3_1`,type:`vec3`,inputs:[{name:`hash`,type:`uvec3`},{name:`x`,type:`float`},{name:`y`,type:`float`},{name:`z`,type:`float`}]})]),UD=R(([e])=>J(.6616,B(e).toVar())).setLayout({name:`mx_gradient_scale2d_0`,type:`float`,inputs:[{name:`v`,type:`float`}]}),WD=R(([e])=>J(.982,B(e).toVar())).setLayout({name:`mx_gradient_scale3d_0`,type:`float`,inputs:[{name:`v`,type:`float`}]}),GD=gC([UD,R(([e])=>J(.6616,W(e).toVar())).setLayout({name:`mx_gradient_scale2d_1`,type:`vec3`,inputs:[{name:`v`,type:`vec3`}]})]),KD=gC([WD,R(([e])=>J(.982,W(e).toVar())).setLayout({name:`mx_gradient_scale3d_1`,type:`vec3`,inputs:[{name:`v`,type:`vec3`}]})]),qD=R(([e,t])=>{let n=V(t).toVar(),r=H(e).toVar();return r.shiftLeft(n).bitOr(r.shiftRight(V(32).sub(n)))}).setLayout({name:`mx_rotl32`,type:`uint`,inputs:[{name:`x`,type:`uint`},{name:`k`,type:`int`}]}),JD=R(([e,t,n])=>{e.subAssign(n),e.bitXorAssign(qD(n,V(4))),n.addAssign(t),t.subAssign(e),t.bitXorAssign(qD(e,V(6))),e.addAssign(n),n.subAssign(t),n.bitXorAssign(qD(t,V(8))),t.addAssign(e),e.subAssign(n),e.bitXorAssign(qD(n,V(16))),n.addAssign(t),t.subAssign(e),t.bitXorAssign(qD(e,V(19))),e.addAssign(n),n.subAssign(t),n.bitXorAssign(qD(t,V(4))),t.addAssign(e)}),YD=R(([e,t,n])=>{let r=H(n).toVar(),i=H(t).toVar(),a=H(e).toVar();return r.bitXorAssign(i),r.subAssign(qD(i,V(14))),a.bitXorAssign(r),a.subAssign(qD(r,V(11))),i.bitXorAssign(a),i.subAssign(qD(a,V(25))),r.bitXorAssign(i),r.subAssign(qD(i,V(16))),a.bitXorAssign(r),a.subAssign(qD(r,V(4))),i.bitXorAssign(a),i.subAssign(qD(a,V(14))),r.bitXorAssign(i),r.subAssign(qD(i,V(24))),r}).setLayout({name:`mx_bjfinal`,type:`uint`,inputs:[{name:`a`,type:`uint`},{name:`b`,type:`uint`},{name:`c`,type:`uint`}]}),XD=R(([e])=>B(H(e).toVar()).div(B(H(V(4294967295))))).setLayout({name:`mx_bits_to_01`,type:`float`,inputs:[{name:`bits`,type:`uint`}]}),ZD=R(([e])=>{let t=B(e).toVar();return t.mul(t).mul(t).mul(t.mul(t.mul(6).sub(15)).add(10))}).setLayout({name:`mx_fade`,type:`float`,inputs:[{name:`t`,type:`float`}]}),QD=gC([R(([e])=>{let t=V(e).toVar(),n=H(H(1)).toVar(),r=H(H(V(3735928559)).add(n.shiftLeft(H(2))).add(H(13))).toVar();return YD(r.add(H(t)),r,r)}).setLayout({name:`mx_hash_int_0`,type:`uint`,inputs:[{name:`x`,type:`int`}]}),R(([e,t])=>{let n=V(t).toVar(),r=V(e).toVar(),i=H(H(2)).toVar(),a=H().toVar(),o=H().toVar(),s=H().toVar();return a.assign(o.assign(s.assign(H(V(3735928559)).add(i.shiftLeft(H(2))).add(H(13))))),a.addAssign(H(r)),o.addAssign(H(n)),YD(a,o,s)}).setLayout({name:`mx_hash_int_1`,type:`uint`,inputs:[{name:`x`,type:`int`},{name:`y`,type:`int`}]}),R(([e,t,n])=>{let r=V(n).toVar(),i=V(t).toVar(),a=V(e).toVar(),o=H(H(3)).toVar(),s=H().toVar(),c=H().toVar(),l=H().toVar();return s.assign(c.assign(l.assign(H(V(3735928559)).add(o.shiftLeft(H(2))).add(H(13))))),s.addAssign(H(a)),c.addAssign(H(i)),l.addAssign(H(r)),YD(s,c,l)}).setLayout({name:`mx_hash_int_2`,type:`uint`,inputs:[{name:`x`,type:`int`},{name:`y`,type:`int`},{name:`z`,type:`int`}]}),R(([e,t,n,r])=>{let i=V(r).toVar(),a=V(n).toVar(),o=V(t).toVar(),s=V(e).toVar(),c=H(H(4)).toVar(),l=H().toVar(),u=H().toVar(),d=H().toVar();return l.assign(u.assign(d.assign(H(V(3735928559)).add(c.shiftLeft(H(2))).add(H(13))))),l.addAssign(H(s)),u.addAssign(H(o)),d.addAssign(H(a)),JD(l,u,d),l.addAssign(H(i)),YD(l,u,d)}).setLayout({name:`mx_hash_int_3`,type:`uint`,inputs:[{name:`x`,type:`int`},{name:`y`,type:`int`},{name:`z`,type:`int`},{name:`xx`,type:`int`}]}),R(([e,t,n,r,i])=>{let a=V(i).toVar(),o=V(r).toVar(),s=V(n).toVar(),c=V(t).toVar(),l=V(e).toVar(),u=H(H(5)).toVar(),d=H().toVar(),f=H().toVar(),p=H().toVar();return d.assign(f.assign(p.assign(H(V(3735928559)).add(u.shiftLeft(H(2))).add(H(13))))),d.addAssign(H(l)),f.addAssign(H(c)),p.addAssign(H(s)),JD(d,f,p),d.addAssign(H(o)),f.addAssign(H(a)),YD(d,f,p)}).setLayout({name:`mx_hash_int_4`,type:`uint`,inputs:[{name:`x`,type:`int`},{name:`y`,type:`int`},{name:`z`,type:`int`},{name:`xx`,type:`int`},{name:`yy`,type:`int`}]})]),$D=gC([R(([e,t])=>{let n=V(t).toVar(),r=H(QD(V(e).toVar(),n)).toVar(),i=ml().toVar();return i.x.assign(r.bitAnd(V(255))),i.y.assign(r.shiftRight(V(8)).bitAnd(V(255))),i.z.assign(r.shiftRight(V(16)).bitAnd(V(255))),i}).setLayout({name:`mx_hash_vec3_0`,type:`uvec3`,inputs:[{name:`x`,type:`int`},{name:`y`,type:`int`}]}),R(([e,t,n])=>{let r=V(n).toVar(),i=V(t).toVar(),a=H(QD(V(e).toVar(),i,r)).toVar(),o=ml().toVar();return o.x.assign(a.bitAnd(V(255))),o.y.assign(a.shiftRight(V(8)).bitAnd(V(255))),o.z.assign(a.shiftRight(V(16)).bitAnd(V(255))),o}).setLayout({name:`mx_hash_vec3_1`,type:`uvec3`,inputs:[{name:`x`,type:`int`},{name:`y`,type:`int`},{name:`z`,type:`int`}]})]),eO=gC([R(([e])=>{let t=U(e).toVar(),n=V().toVar(),r=V().toVar(),i=B(RD(t.x,n)).toVar(),a=B(RD(t.y,r)).toVar(),o=B(ZD(i)).toVar(),s=B(ZD(a)).toVar();return GD(B(zD(VD(QD(n,r),i,a),VD(QD(n.add(V(1)),r),i.sub(1),a),VD(QD(n,r.add(V(1))),i,a.sub(1)),VD(QD(n.add(V(1)),r.add(V(1))),i.sub(1),a.sub(1)),o,s)).toVar())}).setLayout({name:`mx_perlin_noise_float_0`,type:`float`,inputs:[{name:`p`,type:`vec2`}]}),R(([e])=>{let t=W(e).toVar(),n=V().toVar(),r=V().toVar(),i=V().toVar(),a=B(RD(t.x,n)).toVar(),o=B(RD(t.y,r)).toVar(),s=B(RD(t.z,i)).toVar(),c=B(ZD(a)).toVar(),l=B(ZD(o)).toVar(),u=B(ZD(s)).toVar();return KD(B(BD(VD(QD(n,r,i),a,o,s),VD(QD(n.add(V(1)),r,i),a.sub(1),o,s),VD(QD(n,r.add(V(1)),i),a,o.sub(1),s),VD(QD(n.add(V(1)),r.add(V(1)),i),a.sub(1),o.sub(1),s),VD(QD(n,r,i.add(V(1))),a,o,s.sub(1)),VD(QD(n.add(V(1)),r,i.add(V(1))),a.sub(1),o,s.sub(1)),VD(QD(n,r.add(V(1)),i.add(V(1))),a,o.sub(1),s.sub(1)),VD(QD(n.add(V(1)),r.add(V(1)),i.add(V(1))),a.sub(1),o.sub(1),s.sub(1)),c,l,u)).toVar())}).setLayout({name:`mx_perlin_noise_float_1`,type:`float`,inputs:[{name:`p`,type:`vec3`}]})]),tO=gC([R(([e])=>{let t=U(e).toVar(),n=V().toVar(),r=V().toVar(),i=B(RD(t.x,n)).toVar(),a=B(RD(t.y,r)).toVar(),o=B(ZD(i)).toVar(),s=B(ZD(a)).toVar();return GD(W(zD(HD($D(n,r),i,a),HD($D(n.add(V(1)),r),i.sub(1),a),HD($D(n,r.add(V(1))),i,a.sub(1)),HD($D(n.add(V(1)),r.add(V(1))),i.sub(1),a.sub(1)),o,s)).toVar())}).setLayout({name:`mx_perlin_noise_vec3_0`,type:`vec3`,inputs:[{name:`p`,type:`vec2`}]}),R(([e])=>{let t=W(e).toVar(),n=V().toVar(),r=V().toVar(),i=V().toVar(),a=B(RD(t.x,n)).toVar(),o=B(RD(t.y,r)).toVar(),s=B(RD(t.z,i)).toVar(),c=B(ZD(a)).toVar(),l=B(ZD(o)).toVar(),u=B(ZD(s)).toVar();return KD(W(BD(HD($D(n,r,i),a,o,s),HD($D(n.add(V(1)),r,i),a.sub(1),o,s),HD($D(n,r.add(V(1)),i),a,o.sub(1),s),HD($D(n.add(V(1)),r.add(V(1)),i),a.sub(1),o.sub(1),s),HD($D(n,r,i.add(V(1))),a,o,s.sub(1)),HD($D(n.add(V(1)),r,i.add(V(1))),a.sub(1),o,s.sub(1)),HD($D(n,r.add(V(1)),i.add(V(1))),a,o.sub(1),s.sub(1)),HD($D(n.add(V(1)),r.add(V(1)),i.add(V(1))),a.sub(1),o.sub(1),s.sub(1)),c,l,u)).toVar())}).setLayout({name:`mx_perlin_noise_vec3_1`,type:`vec3`,inputs:[{name:`p`,type:`vec3`}]})]),nO=gC([R(([e])=>XD(QD(V(LD(B(e).toVar())).toVar()))).setLayout({name:`mx_cell_noise_float_0`,type:`float`,inputs:[{name:`p`,type:`float`}]}),R(([e])=>{let t=U(e).toVar();return XD(QD(V(LD(t.x)).toVar(),V(LD(t.y)).toVar()))}).setLayout({name:`mx_cell_noise_float_1`,type:`float`,inputs:[{name:`p`,type:`vec2`}]}),R(([e])=>{let t=W(e).toVar();return XD(QD(V(LD(t.x)).toVar(),V(LD(t.y)).toVar(),V(LD(t.z)).toVar()))}).setLayout({name:`mx_cell_noise_float_2`,type:`float`,inputs:[{name:`p`,type:`vec3`}]}),R(([e])=>{let t=G(e).toVar();return XD(QD(V(LD(t.x)).toVar(),V(LD(t.y)).toVar(),V(LD(t.z)).toVar(),V(LD(t.w)).toVar()))}).setLayout({name:`mx_cell_noise_float_3`,type:`float`,inputs:[{name:`p`,type:`vec4`}]})]),rO=gC([R(([e])=>{let t=V(LD(B(e).toVar())).toVar();return W(XD(QD(t,V(0))),XD(QD(t,V(1))),XD(QD(t,V(2))))}).setLayout({name:`mx_cell_noise_vec3_0`,type:`vec3`,inputs:[{name:`p`,type:`float`}]}),R(([e])=>{let t=U(e).toVar(),n=V(LD(t.x)).toVar(),r=V(LD(t.y)).toVar();return W(XD(QD(n,r,V(0))),XD(QD(n,r,V(1))),XD(QD(n,r,V(2))))}).setLayout({name:`mx_cell_noise_vec3_1`,type:`vec3`,inputs:[{name:`p`,type:`vec2`}]}),R(([e])=>{let t=W(e).toVar(),n=V(LD(t.x)).toVar(),r=V(LD(t.y)).toVar(),i=V(LD(t.z)).toVar();return W(XD(QD(n,r,i,V(0))),XD(QD(n,r,i,V(1))),XD(QD(n,r,i,V(2))))}).setLayout({name:`mx_cell_noise_vec3_2`,type:`vec3`,inputs:[{name:`p`,type:`vec3`}]}),R(([e])=>{let t=G(e).toVar(),n=V(LD(t.x)).toVar(),r=V(LD(t.y)).toVar(),i=V(LD(t.z)).toVar(),a=V(LD(t.w)).toVar();return W(XD(QD(n,r,i,a,V(0))),XD(QD(n,r,i,a,V(1))),XD(QD(n,r,i,a,V(2))))}).setLayout({name:`mx_cell_noise_vec3_3`,type:`vec3`,inputs:[{name:`p`,type:`vec4`}]})]),iO=R(([e,t,n,r])=>{let i=B(r).toVar(),a=B(n).toVar(),o=V(t).toVar(),s=W(e).toVar(),c=B(0).toVar(),l=B(1).toVar();return B_(o,()=>{c.addAssign(l.mul(eO(s))),l.mulAssign(i),s.mulAssign(a)}),c}).setLayout({name:`mx_fractal_noise_float`,type:`float`,inputs:[{name:`p`,type:`vec3`},{name:`octaves`,type:`int`},{name:`lacunarity`,type:`float`},{name:`diminish`,type:`float`}]}),aO=R(([e,t,n,r])=>{let i=B(r).toVar(),a=B(n).toVar(),o=V(t).toVar(),s=W(e).toVar(),c=W(0).toVar(),l=B(1).toVar();return B_(o,()=>{c.addAssign(l.mul(tO(s))),l.mulAssign(i),s.mulAssign(a)}),c}).setLayout({name:`mx_fractal_noise_vec3`,type:`vec3`,inputs:[{name:`p`,type:`vec3`},{name:`octaves`,type:`int`},{name:`lacunarity`,type:`float`},{name:`diminish`,type:`float`}]}),oO=R(([e,t,n,r])=>{let i=B(r).toVar(),a=B(n).toVar(),o=V(t).toVar(),s=W(e).toVar();return U(iO(s,o,a,i),iO(s.add(W(V(19),V(193),V(17))),o,a,i))}).setLayout({name:`mx_fractal_noise_vec2`,type:`vec2`,inputs:[{name:`p`,type:`vec3`},{name:`octaves`,type:`int`},{name:`lacunarity`,type:`float`},{name:`diminish`,type:`float`}]}),sO=R(([e,t,n,r])=>{let i=B(r).toVar(),a=B(n).toVar(),o=V(t).toVar(),s=W(e).toVar();return G(W(aO(s,o,a,i)).toVar(),B(iO(s.add(W(V(19),V(193),V(17))),o,a,i)).toVar())}).setLayout({name:`mx_fractal_noise_vec4`,type:`vec4`,inputs:[{name:`p`,type:`vec3`},{name:`octaves`,type:`int`},{name:`lacunarity`,type:`float`},{name:`diminish`,type:`float`}]}),cO=gC([R(([e,t,n,r,i,a,o])=>{let s=V(o).toVar(),c=B(a).toVar(),l=V(i).toVar(),u=V(r).toVar(),d=V(n).toVar(),f=V(t).toVar(),p=U(e).toVar(),m=W(rO(U(f.add(u),d.add(l)))).toVar(),h=U(m.x,m.y).toVar();h.subAssign(.5),h.mulAssign(c),h.addAssign(.5);let g=U(U(U(B(f),B(d)).add(h)).toVar().sub(p)).toVar();return z(s.equal(V(2)),()=>xd(g.x).add(xd(g.y))),z(s.equal(V(3)),()=>Id(xd(g.x),xd(g.y))),Vd(g,g)}).setLayout({name:`mx_worley_distance_0`,type:`float`,inputs:[{name:`p`,type:`vec2`},{name:`x`,type:`int`},{name:`y`,type:`int`},{name:`xoff`,type:`int`},{name:`yoff`,type:`int`},{name:`jitter`,type:`float`},{name:`metric`,type:`int`}]}),R(([e,t,n,r,i,a,o,s,c])=>{let l=V(c).toVar(),u=B(s).toVar(),d=V(o).toVar(),f=V(a).toVar(),p=V(i).toVar(),m=V(r).toVar(),h=V(n).toVar(),g=V(t).toVar(),_=W(e).toVar(),v=W(rO(W(g.add(p),h.add(f),m.add(d)))).toVar();v.subAssign(.5),v.mulAssign(u),v.addAssign(.5);let y=W(W(W(B(g),B(h),B(m)).add(v)).toVar().sub(_)).toVar();return z(l.equal(V(2)),()=>xd(y.x).add(xd(y.y)).add(xd(y.z))),z(l.equal(V(3)),()=>Id(xd(y.x),xd(y.y),xd(y.z))),Vd(y,y)}).setLayout({name:`mx_worley_distance_1`,type:`float`,inputs:[{name:`p`,type:`vec3`},{name:`x`,type:`int`},{name:`y`,type:`int`},{name:`z`,type:`int`},{name:`xoff`,type:`int`},{name:`yoff`,type:`int`},{name:`zoff`,type:`int`},{name:`jitter`,type:`float`},{name:`metric`,type:`int`}]})]),lO=R(([e,t,n])=>{let r=V(n).toVar(),i=B(t).toVar(),a=U(e).toVar(),o=V().toVar(),s=V().toVar(),c=U(RD(a.x,o),RD(a.y,s)).toVar(),l=B(1e6).toVar();return B_({start:-1,end:V(1),name:`x`,condition:`<=`},({x:e})=>{B_({start:-1,end:V(1),name:`y`,condition:`<=`},({y:t})=>{let n=B(cO(c,e,t,o,s,i,r)).toVar();l.assign(Fd(l,n))})}),z(r.equal(V(0)),()=>{l.assign(rd(l))}),l}).setLayout({name:`mx_worley_noise_float_0`,type:`float`,inputs:[{name:`p`,type:`vec2`},{name:`jitter`,type:`float`},{name:`metric`,type:`int`}]}),uO=R(([e,t,n])=>{let r=V(n).toVar(),i=B(t).toVar(),a=U(e).toVar(),o=V().toVar(),s=V().toVar(),c=U(RD(a.x,o),RD(a.y,s)).toVar(),l=U(1e6,1e6).toVar();return B_({start:-1,end:V(1),name:`x`,condition:`<=`},({x:e})=>{B_({start:-1,end:V(1),name:`y`,condition:`<=`},({y:t})=>{let n=B(cO(c,e,t,o,s,i,r)).toVar();z(n.lessThan(l.x),()=>{l.y.assign(l.x),l.x.assign(n)}).ElseIf(n.lessThan(l.y),()=>{l.y.assign(n)})})}),z(r.equal(V(0)),()=>{l.assign(rd(l))}),l}).setLayout({name:`mx_worley_noise_vec2_0`,type:`vec2`,inputs:[{name:`p`,type:`vec2`},{name:`jitter`,type:`float`},{name:`metric`,type:`int`}]}),dO=R(([e,t,n])=>{let r=V(n).toVar(),i=B(t).toVar(),a=U(e).toVar(),o=V().toVar(),s=V().toVar(),c=U(RD(a.x,o),RD(a.y,s)).toVar(),l=W(1e6,1e6,1e6).toVar();return B_({start:-1,end:V(1),name:`x`,condition:`<=`},({x:e})=>{B_({start:-1,end:V(1),name:`y`,condition:`<=`},({y:t})=>{let n=B(cO(c,e,t,o,s,i,r)).toVar();z(n.lessThan(l.x),()=>{l.z.assign(l.y),l.y.assign(l.x),l.x.assign(n)}).ElseIf(n.lessThan(l.y),()=>{l.z.assign(l.y),l.y.assign(n)}).ElseIf(n.lessThan(l.z),()=>{l.z.assign(n)})})}),z(r.equal(V(0)),()=>{l.assign(rd(l))}),l}).setLayout({name:`mx_worley_noise_vec3_0`,type:`vec3`,inputs:[{name:`p`,type:`vec2`},{name:`jitter`,type:`float`},{name:`metric`,type:`int`}]}),fO=gC([lO,R(([e,t,n])=>{let r=V(n).toVar(),i=B(t).toVar(),a=W(e).toVar(),o=V().toVar(),s=V().toVar(),c=V().toVar(),l=W(RD(a.x,o),RD(a.y,s),RD(a.z,c)).toVar(),u=B(1e6).toVar();return B_({start:-1,end:V(1),name:`x`,condition:`<=`},({x:e})=>{B_({start:-1,end:V(1),name:`y`,condition:`<=`},({y:t})=>{B_({start:-1,end:V(1),name:`z`,condition:`<=`},({z:n})=>{let a=B(cO(l,e,t,n,o,s,c,i,r)).toVar();u.assign(Fd(u,a))})})}),z(r.equal(V(0)),()=>{u.assign(rd(u))}),u}).setLayout({name:`mx_worley_noise_float_1`,type:`float`,inputs:[{name:`p`,type:`vec3`},{name:`jitter`,type:`float`},{name:`metric`,type:`int`}]})]),pO=gC([uO,R(([e,t,n])=>{let r=V(n).toVar(),i=B(t).toVar(),a=W(e).toVar(),o=V().toVar(),s=V().toVar(),c=V().toVar(),l=W(RD(a.x,o),RD(a.y,s),RD(a.z,c)).toVar(),u=U(1e6,1e6).toVar();return B_({start:-1,end:V(1),name:`x`,condition:`<=`},({x:e})=>{B_({start:-1,end:V(1),name:`y`,condition:`<=`},({y:t})=>{B_({start:-1,end:V(1),name:`z`,condition:`<=`},({z:n})=>{let a=B(cO(l,e,t,n,o,s,c,i,r)).toVar();z(a.lessThan(u.x),()=>{u.y.assign(u.x),u.x.assign(a)}).ElseIf(a.lessThan(u.y),()=>{u.y.assign(a)})})})}),z(r.equal(V(0)),()=>{u.assign(rd(u))}),u}).setLayout({name:`mx_worley_noise_vec2_1`,type:`vec2`,inputs:[{name:`p`,type:`vec3`},{name:`jitter`,type:`float`},{name:`metric`,type:`int`}]})]),mO=gC([dO,R(([e,t,n])=>{let r=V(n).toVar(),i=B(t).toVar(),a=W(e).toVar(),o=V().toVar(),s=V().toVar(),c=V().toVar(),l=W(RD(a.x,o),RD(a.y,s),RD(a.z,c)).toVar(),u=W(1e6,1e6,1e6).toVar();return B_({start:-1,end:V(1),name:`x`,condition:`<=`},({x:e})=>{B_({start:-1,end:V(1),name:`y`,condition:`<=`},({y:t})=>{B_({start:-1,end:V(1),name:`z`,condition:`<=`},({z:n})=>{let a=B(cO(l,e,t,n,o,s,c,i,r)).toVar();z(a.lessThan(u.x),()=>{u.z.assign(u.y),u.y.assign(u.x),u.x.assign(a)}).ElseIf(a.lessThan(u.y),()=>{u.z.assign(u.y),u.y.assign(a)}).ElseIf(a.lessThan(u.z),()=>{u.z.assign(a)})})})}),z(r.equal(V(0)),()=>{u.assign(rd(u))}),u}).setLayout({name:`mx_worley_noise_vec3_1`,type:`vec3`,inputs:[{name:`p`,type:`vec3`},{name:`jitter`,type:`float`},{name:`metric`,type:`int`}]})]),hO=R(([e,t,n,r,i,a,o,s,c,l,u])=>{let d=V(e).toVar(),f=U(t).toVar(),p=U(n).toVar(),m=U(r).toVar(),h=B(i).toVar(),g=B(a).toVar(),_=B(o).toVar(),v=ll(s).toVar(),y=V(c).toVar(),b=B(l).toVar(),x=B(u).toVar(),S=f.mul(p).add(m),C=B(0).toVar();return z(d.equal(V(0)),()=>{C.assign(tO(S))}),z(d.equal(V(1)),()=>{C.assign(rO(S))}),z(d.equal(V(2)),()=>{C.assign(mO(S,h,V(0)))}),z(d.equal(V(3)),()=>{C.assign(aO(W(S,0),y,b,x))}),C.assign(C.mul(_.sub(g)).add(g)),z(v,()=>{C.assign($d(C,g,_))}),C}).setLayout({name:`mx_unifiednoise2d`,type:`float`,inputs:[{name:`noiseType`,type:`int`},{name:`texcoord`,type:`vec2`},{name:`freq`,type:`vec2`},{name:`offset`,type:`vec2`},{name:`jitter`,type:`float`},{name:`outmin`,type:`float`},{name:`outmax`,type:`float`},{name:`clampoutput`,type:`bool`},{name:`octaves`,type:`int`},{name:`lacunarity`,type:`float`},{name:`diminish`,type:`float`}]}),gO=R(([e,t,n,r,i,a,o,s,c,l,u])=>{let d=V(e).toVar(),f=W(t).toVar(),p=W(n).toVar(),m=W(r).toVar(),h=B(i).toVar(),g=B(a).toVar(),_=B(o).toVar(),v=ll(s).toVar(),y=V(c).toVar(),b=B(l).toVar(),x=B(u).toVar(),S=f.mul(p).add(m),C=B(0).toVar();return z(d.equal(V(0)),()=>{C.assign(tO(S))}),z(d.equal(V(1)),()=>{C.assign(rO(S))}),z(d.equal(V(2)),()=>{C.assign(mO(S,h,V(0)))}),z(d.equal(V(3)),()=>{C.assign(aO(S,y,b,x))}),C.assign(C.mul(_.sub(g)).add(g)),z(v,()=>{C.assign($d(C,g,_))}),C}).setLayout({name:`mx_unifiednoise3d`,type:`float`,inputs:[{name:`noiseType`,type:`int`},{name:`position`,type:`vec3`},{name:`freq`,type:`vec3`},{name:`offset`,type:`vec3`},{name:`jitter`,type:`float`},{name:`outmin`,type:`float`},{name:`outmax`,type:`float`},{name:`clampoutput`,type:`bool`},{name:`octaves`,type:`int`},{name:`lacunarity`,type:`float`},{name:`diminish`,type:`float`}]}),_O=R(([e])=>{let t=e.y,n=e.z,r=W().toVar();return z(t.lessThan(1e-4),()=>{r.assign(W(n,n,n))}).Else(()=>{let i=e.x;i=i.sub(ad(i)).mul(6).toVar();let a=V(Ad(i)),o=i.sub(B(a)),s=n.mul(t.oneMinus()),c=n.mul(t.mul(o).oneMinus()),l=n.mul(t.mul(o.oneMinus()).oneMinus());z(a.equal(V(0)),()=>{r.assign(W(n,l,s))}).ElseIf(a.equal(V(1)),()=>{r.assign(W(c,n,s))}).ElseIf(a.equal(V(2)),()=>{r.assign(W(s,n,l))}).ElseIf(a.equal(V(3)),()=>{r.assign(W(s,c,n))}).ElseIf(a.equal(V(4)),()=>{r.assign(W(l,s,n))}).Else(()=>{r.assign(W(n,s,c))})}),r}).setLayout({name:`mx_hsvtorgb`,type:`vec3`,inputs:[{name:`hsv`,type:`vec3`}]}),vO=R(([e])=>{let t=W(e).toVar(),n=B(t.x).toVar(),r=B(t.y).toVar(),i=B(t.z).toVar(),a=B(Fd(n,Fd(r,i))).toVar(),o=B(Id(n,Id(r,i))).toVar(),s=B(o.sub(a)).toVar(),c=B().toVar(),l=B().toVar(),u=B().toVar();return u.assign(o),z(o.greaterThan(0),()=>{l.assign(s.div(o))}).Else(()=>{l.assign(0)}),z(l.lessThanEqual(0),()=>{c.assign(0)}).Else(()=>{z(n.greaterThanEqual(o),()=>{c.assign(r.sub(i).div(s))}).ElseIf(r.greaterThanEqual(o),()=>{c.assign(yu(2,i.sub(n).div(s)))}).Else(()=>{c.assign(yu(4,n.sub(r).div(s)))}),c.mulAssign(1/6),z(c.lessThan(0),()=>{c.addAssign(1)})}),W(c,l,u)}).setLayout({name:`mx_rgbtohsv`,type:`vec3`,inputs:[{name:`c`,type:`vec3`}]}),yO=R(([e])=>{let t=W(e).toVar(),n=hl(Eu(t,W(.04045))).toVar();return Qd(W(t.div(12.92)).toVar(),W(Ud(Id(t.add(W(.055)),W(0)).div(1.055),W(2.4))).toVar(),n)}).setLayout({name:`mx_srgb_texture_to_lin_rec709`,type:`vec3`,inputs:[{name:`color`,type:`vec3`}]}),bO=(e,t)=>{e=B(e),t=B(t);let n=U(t.dFdx(),t.dFdy()).length().mul(.7071067811865476);return nf(e.sub(n),e.add(n),t)},xO=(e,t,n,r)=>Qd(e,t,n[r].clamp()),SO=(e,t,n=Ap())=>xO(e,t,n,`x`),CO=(e,t,n=Ap())=>xO(e,t,n,`y`),wO=(e,t,n,r,i=Ap())=>{let a=i.x.clamp(),o=i.y.clamp();return Qd(Qd(e,t,a),Qd(n,r,a),o)},TO=(e,t,n,r,i)=>Qd(e,t,bO(n,r[i])),EO=(e,t,n,r=Ap())=>TO(e,t,n,r,`x`),DO=(e,t,n,r=Ap())=>TO(e,t,n,r,`y`),OO=(e=1,t=0,n=Ap())=>n.mul(e).add(t),kO=(e,t=1)=>(e=B(e),e.abs().pow(t).mul(e.sign())),AO=(e,t=1,n=.5)=>B(e).sub(n).mul(t).add(n),jO=(e=Ap(),t=1,n=0)=>eO(e.convert(`vec2|vec3`)).mul(t).add(n),MO=(e=Ap(),t=1,n=0)=>tO(e.convert(`vec2|vec3`)).mul(t).add(n),NO=(e=Ap(),t=1,n=0)=>(e=e.convert(`vec2|vec3`),G(tO(e),eO(e.add(U(19,73)))).mul(t).add(n)),PO=(e,t=Ap(),n=U(1,1),r=U(0,0),i=1,a=0,o=1,s=!1,c=1,l=2,u=.5)=>hO(e,t.convert(`vec2|vec3`),n,r,i,a,o,s,c,l,u),FO=(e,t=Ap(),n=U(1,1),r=U(0,0),i=1,a=0,o=1,s=!1,c=1,l=2,u=.5)=>gO(e,t.convert(`vec2|vec3`),n,r,i,a,o,s,c,l,u),IO=(e=Ap(),t=1)=>fO(e.convert(`vec2|vec3`),t,V(1)),LO=(e=Ap(),t=1)=>pO(e.convert(`vec2|vec3`),t,V(1)),RO=(e=Ap(),t=1)=>mO(e.convert(`vec2|vec3`),t,V(1)),zO=(e=Ap())=>nO(e.convert(`vec2|vec3`)),BO=(e=Ap(),t=3,n=2,r=.5,i=1)=>iO(e,V(t),n,r).mul(i),VO=(e=Ap(),t=3,n=2,r=.5,i=1)=>oO(e,V(t),n,r).mul(i),HO=(e=Ap(),t=3,n=2,r=.5,i=1)=>aO(e,V(t),n,r).mul(i),UO=(e=Ap(),t=3,n=2,r=.5,i=1)=>sO(e,V(t),n,r).mul(i),WO=(e,t=B(0))=>yu(e,t),GO=(e,t=B(0))=>bu(e,t),KO=(e,t=B(1))=>J(e,t),qO=(e,t=B(1))=>xu(e,t),JO=(e,t=B(1))=>Su(e,t),YO=(e,t=B(1))=>Ud(e,t),XO=(e=B(0),t=B(1))=>yd(e,t),ZO=()=>_C,QO=()=>yC,$O=(e,t=B(1))=>bu(t,e),ek=(e,t,n,r)=>e.greaterThan(t).mix(n,r),tk=(e,t,n,r)=>e.greaterThanEqual(t).mix(n,r),nk=(e,t,n,r)=>e.equal(t).mix(n,r),rk=(e,t=null)=>{if(typeof t==`string`){let n={x:0,r:0,y:1,g:1,z:2,b:2,w:3,a:3},r=t.replace(/^out/,``).toLowerCase();if(n[r]!==void 0)return e.element(n[r])}if(typeof t==`number`)return e.element(t);if(typeof t==`string`&&t.length===1){let n={x:0,r:0,y:1,g:1,z:2,b:2,w:3,a:3};if(n[t]!==void 0)return e.element(n[t])}return e},ik=(e,t=U(.5,.5),n=U(1,1),r=B(0),i=U(0,0))=>{let a=e;if(t&&(a=a.sub(t)),n&&(a=a.mul(n)),r){let e=r.mul(Math.PI/180),t=e.cos(),n=e.sin();a=U(a.x.mul(t).sub(a.y.mul(n)),a.x.mul(n).add(a.y.mul(t)))}return t&&(a=a.add(t)),i&&(a=a.add(i)),a},ak=(e,t)=>{e=U(e),t=B(t);let n=t.mul(Math.PI/180);return kx(e,n)},ok=(e,t,n)=>{e=W(e),t=B(t),n=W(n);let r=t.mul(Math.PI/180),i=n.normalize(),a=r.cos(),o=r.sin(),s=B(1).sub(a);return e.mul(a).add(i.cross(e).mul(o)).add(i.mul(i.dot(e)).mul(s))},sk=(e,t)=>(e=W(e),t=B(t),Sg(e,t)),ck=R(([e,t,n])=>{let r=sd(e).toVar(),i=bu(B(.5).mul(t.sub(n)),nh).div(r).toVar(),a=bu(B(-.5).mul(t.sub(n)),nh).div(r).toVar(),o=W().toVar();o.x=r.x.greaterThan(B(0)).select(i.x,a.x),o.y=r.y.greaterThan(B(0)).select(i.y,a.y),o.z=r.z.greaterThan(B(0)).select(i.z,a.z);let s=Fd(o.x,o.y,o.z).toVar();return nh.add(r.mul(s)).toVar().sub(n)}),lk=R(([e,t])=>{let n=e.x,r=e.y,i=e.z,a=t.element(0).mul(.886227);return a=a.add(t.element(1).mul(2*.511664).mul(r)),a=a.add(t.element(2).mul(2*.511664).mul(i)),a=a.add(t.element(3).mul(2*.511664).mul(n)),a=a.add(t.element(4).mul(2*.429043).mul(n).mul(r)),a=a.add(t.element(5).mul(2*.429043).mul(r).mul(i)),a=a.add(t.element(6).mul(i.mul(i).mul(.743125).sub(.247708))),a=a.add(t.element(7).mul(2*.429043).mul(n).mul(i)),a=a.add(t.element(8).mul(.429043).mul(J(n,n).sub(J(r,r)))),a}),Q=Object.freeze({__proto__:null,BRDF_GGX:Ty,BRDF_Lambert:ly,BasicPointShadowFilter:wD,BasicShadowFilter:eD,Break:H_,Const:Sf,Continue:V_,DFGLUT:Oy,D_GGX:Sy,Discard:gp,EPSILON:Uu,F_Schlick:cy,Fn:R,HALF_PI:Ju,INFINITY:Wu,If:z,Loop:B_,NodeAccess:Qs,NodeShaderStage:Xs,NodeType:Zs,NodeUpdateType:M,OnBeforeFrameUpdate:g_,OnBeforeMaterialUpdate:h_,OnBeforeObjectUpdate:m_,OnFrameUpdate:p_,OnMaterialUpdate:f_,OnObjectUpdate:d_,PCFShadowFilter:tD,PCFSoftShadowFilter:nD,PI:Gu,PI2:Ku,PointShadowFilter:TD,Return:_p,Schlick_to_F0:jy,ShaderNode:Xc,Stack:sl,Switch:ol,TBNViewMatrix:ug,TWO_PI:qu,VSMShadowFilter:rD,V_GGX_SmithCorrelated:by,Var:xf,VarIntent:Cf,abs:xd,acesFilmicToneMapping:oT,acos:_d,acosh:vd,add:yu,addMethodChaining:P,addNodeElement:Dp,agxToneMapping:uT,all:Yu,alphaT:Vl,ambientOcclusion:au,and:ku,anisotropy:Hl,anisotropyB:Wl,anisotropyT:Ul,any:Xu,append:Tl,array:pu,asin:hd,asinh:gd,assign:mu,atan:yd,atanh:bd,atomicAdd:JT,atomicAnd:QT,atomicFunc:GT,atomicLoad:KT,atomicMax:XT,atomicMin:ZT,atomicOr:$T,atomicStore:qT,atomicSub:YT,atomicXor:eE,attenuationColor:ru,attenuationDistance:nu,attribute:kp,attributeArray:dw,backgroundBlurriness:hw,backgroundIntensity:gw,backgroundRotation:_w,batch:j_,batchColor:A_,bentNormalView:pg,billboarding:DC,bitAnd:Nu,bitNot:Pu,bitOr:Fu,bitXor:Iu,bitangentGeometry:og,bitangentLocal:sg,bitangentView:cg,bitangentWorld:lg,bitcast:US,blendBurn:Nw,blendColor:Lw,blendDodge:Pw,blendOverlay:Iw,blendScreen:Fw,blur:Mb,bool:ll,buffer:Wp,bufferAttribute:Jf,builtin:Jp,builtinAOContext:_f,builtinShadowContext:gf,bumpMap:Sg,bvec2:fl,bvec3:hl,bvec4:vl,bypass:dp,cache:up,call:gu,cameraFar:Cm,cameraIndex:xm,cameraNear:Sm,cameraNormalMatrix:Om,cameraPosition:km,cameraProjectionMatrix:wm,cameraProjectionMatrixInverse:Tm,cameraViewMatrix:Em,cameraViewport:Am,cameraWorldMatrix:Dm,cbrt:Xd,cdl:Uw,ceil:od,checker:ND,cineonToneMapping:iT,clamp:$d,clearcoat:Pl,clearcoatNormalView:_h,clearcoatRoughness:Fl,clipSpace:Qm,code:pT,color:cl,colorSpaceToWorking:Pf,colorToDirection:vg,compute:sp,computeKernel:op,computeSkinning:R_,context:pf,convert:Cl,convertColorSpace:Ff,convertToTexture:tw,cos:dd,cosh:fd,countLeadingZeros:ZS,countOneBits:QS,countTrailingZeros:XS,cross:Hd,cubeTexture:Nh,cubeTextureBase:Mh,dFdx:Ed,dFdy:Dd,dashSize:Xl,debug:Cp,decrement:Hu,decrementBefore:Bu,defaultBuildStages:ec,defaultShaderStages:$s,defined:Jc,degrees:Qu,deltaTime:vC,densityFogFactor:CT,depth:_v,depthPass:$w,determinant:Nd,difference:Bd,diffuseColor:kl,diffuseContribution:Al,directPointLight:jD,directionToColor:_g,directionToFaceDirection:lh,dispersion:iu,disposeShadowMaterial:aD,distance:zd,div:xu,dot:Vd,drawIndex:ip,dynamicBufferAttribute:Yf,element:Sl,emissive:jl,equal:Cu,equirectDirection:Jv,equirectUV:qv,exp:$u,exp2:ed,exponentialHeightFogFactor:wT,expression:hp,faceDirection:sh,faceForward:rf,faceforward:lf,float:B,floatBitsToInt:WS,floatBitsToUint:GS,floor:ad,fog:TT,fract:cd,frameGroup:lu,frameId:yC,frontFacing:oh,fwidth:jd,gain:tC,gapSize:Zl,getConstNodeType:Yc,getCurrentStack:al,getDirection:Ob,getDistanceAttenuation:AD,getGeometryRoughness:vy,getNormalFromDepth:iw,getParallaxCorrectNormal:ck,getRoughness:yy,getScreenPosition:rw,getShIrradianceAt:lk,getShadowMaterial:iD,getShadowRenderObjectFunction:cD,getTextureIndex:BS,getViewPosition:nw,ggxConvolution:Ib,globalId:NT,glsl:gT,glslFn:yT,grayscale:Rw,greaterThan:Eu,greaterThanEqual:Ou,hash:$S,highpModelNormalViewMatrix:Zm,highpModelViewMatrix:Xm,hue:Vw,increment:Vu,incrementBefore:zu,inspector:Ep,instance:E_,instanceColor:T_,instanceIndex:ep,instancedArray:fw,instancedBufferAttribute:Xf,instancedDynamicBufferAttribute:Zf,instancedMesh:D_,int:V,intBitsToFloat:KS,interleavedGradientNoise:aw,inverse:Pd,inverseSqrt:id,inversesqrt:uf,invocationLocalIndex:rp,invocationSubgroupIndex:np,ior:$l,iridescence:Rl,iridescenceIOR:zl,iridescenceThickness:Bl,isolate:lp,ivec2:ul,ivec3:pl,ivec4:gl,js:mT,label:vf,length:Cd,lengthSq:Zd,lessThan:Tu,lessThanEqual:Du,lightPosition:AE,lightProjectionUV:kE,lightShadowMatrix:OE,lightTargetDirection:NE,lightTargetPosition:jE,lightViewPosition:ME,lightingContext:Z_,lights:HE,linearDepth:vv,linearToneMapping:nT,localId:PT,log:td,log2:nd,logarithmicDepthToViewZ:hv,luminance:Hw,mat2:yl,mat3:bl,mat4:xl,matcapUV:Ex,materialAO:o_,materialAlphaTest:wg,materialAnisotropy:Ug,materialAnisotropyVector:s_,materialAttenuationColor:Zg,materialAttenuationDistance:Xg,materialClearcoat:Lg,materialClearcoatNormal:zg,materialClearcoatRoughness:Rg,materialColor:Tg,materialDispersion:i_,materialEmissive:Dg,materialEnvIntensity:Th,materialEnvRotation:Eh,materialIOR:Yg,materialIridescence:Wg,materialIridescenceIOR:Gg,materialIridescenceThickness:Kg,materialLightMap:a_,materialLineDashOffset:n_,materialLineDashSize:$g,materialLineGapSize:e_,materialLineScale:Qg,materialLineWidth:t_,materialMetalness:Fg,materialNormal:Ig,materialOpacity:Og,materialPointSize:r_,materialReference:Bh,materialReflectivity:Ng,materialRefractionRatio:wh,materialRotation:Bg,materialRoughness:Pg,materialSheen:Vg,materialSheenRoughness:Hg,materialShininess:Eg,materialSpecular:kg,materialSpecularColor:jg,materialSpecularIntensity:Ag,materialSpecularStrength:Mg,materialThickness:Jg,materialTransmission:qg,max:Id,maxMipLevel:Mp,mediumpModelViewMatrix:Ym,metalness:Nl,min:Fd,mix:Qd,mixElement:of,mod:Su,modelDirection:Bm,modelNormalMatrix:Km,modelPosition:Hm,modelRadius:Gm,modelScale:Um,modelViewMatrix:Jm,modelViewPosition:Wm,modelViewProjection:c_,modelWorldMatrix:Vm,modelWorldMatrixInverse:qm,morphReference:J_,mrt:VS,mul:J,mx_aastep:bO,mx_add:WO,mx_atan2:XO,mx_cell_noise_float:zO,mx_contrast:AO,mx_divide:qO,mx_fractal_noise_float:BO,mx_fractal_noise_vec2:VO,mx_fractal_noise_vec3:HO,mx_fractal_noise_vec4:UO,mx_frame:QO,mx_heighttonormal:sk,mx_hsvtorgb:_O,mx_ifequal:nk,mx_ifgreater:ek,mx_ifgreatereq:tk,mx_invert:$O,mx_modulo:JO,mx_multiply:KO,mx_noise_float:jO,mx_noise_vec3:MO,mx_noise_vec4:NO,mx_place2d:ik,mx_power:YO,mx_ramp4:wO,mx_ramplr:SO,mx_ramptb:CO,mx_rgbtohsv:vO,mx_rotate2d:ak,mx_rotate3d:ok,mx_safepower:kO,mx_separate:rk,mx_splitlr:EO,mx_splittb:DO,mx_srgb_texture_to_lin_rec709:yO,mx_subtract:GO,mx_timer:ZO,mx_transform_uv:OO,mx_unifiednoise2d:PO,mx_unifiednoise3d:FO,mx_worley_noise_float:IO,mx_worley_noise_vec2:LO,mx_worley_noise_vec3:RO,negate:wd,negateOnBackSide:ch,neutralToneMapping:dT,nodeArray:$c,nodeImmutable:I,nodeObject:F,nodeObjectIntent:Zc,nodeObjects:Qc,nodeProxy:el,nodeProxyConstructor:tl,nodeProxyIntent:L,normalFlat:fh,normalGeometry:uh,normalLocal:dh,normalMap:yg,normalView:hh,normalViewGeometry:ph,normalWorld:gh,normalWorldGeometry:mh,normalize:sd,not:ju,notEqual:wu,numWorkgroups:jT,objectDirection:Nm,objectGroup:uu,objectPosition:Fm,objectRadius:Rm,objectScale:Im,objectViewPosition:Lm,objectWorldMatrix:Pm,oneMinus:Td,or:Au,orthographicDepthToViewZ:uv,oscSawtooth:CC,oscSine:bC,oscSquare:xC,oscTriangle:SC,output:Yl,outputStruct:IS,overloadingFn:gC,overrideNode:ES,overrideNodes:DS,packHalf2x16:sC,packNormalToRGB:mg,packSnorm2x16:aC,packUnorm2x16:oC,parabola:eC,parallaxDirection:dg,parallaxUV:fg,parameter:kS,pass:Zw,passTexture:Qw,pcurve:nC,perspectiveDepthToViewZ:pv,pmremTexture:px,pointShadow:OD,pointUV:pw,pointWidth:Ql,positionGeometry:$m,positionLocal:eh,positionPrevious:th,positionView:ih,positionViewDirection:ah,positionWorld:nh,positionWorldDirection:rh,posterize:Ww,pow:Ud,pow2:Wd,pow3:Gd,pow4:Kd,premultiplyAlpha:vp,property:Dl,quadBroadcast:TE,quadSwapDiagonal:yE,quadSwapX:_E,quadSwapY:vE,radians:Zu,rand:af,range:OT,rangeFogFactor:ST,reciprocal:kd,reference:Lh,referenceBuffer:Rh,reflect:Rd,reflectVector:kh,reflectView:Dh,reflector:JC,refract:tf,refractVector:Ah,refractView:Oh,reinhardToneMapping:rT,remap:fp,remapClamp:pp,renderGroup:K,renderOutput:xp,rendererReference:Bf,replaceDefaultUV:wC,rotate:kx,rotateUV:TC,roughness:Ml,round:Od,rtt:ew,sRGBTransferEOTF:Of,sRGBTransferOETF:kf,sample:cw,sampler:Vp,samplerComparison:Hp,saturate:ef,saturation:zw,screenCoordinate:tm,screenDPR:Qp,screenSize:em,screenUV:$p,select:df,setCurrentStack:il,setName:hf,shaderStages:tc,shadow:hD,shadowPositionWorld:WE,shapeCircle:PD,sharedUniformGroup:cu,sheen:Il,sheenRoughness:Ll,shiftLeft:Lu,shiftRight:Ru,shininess:Jl,sign:Sd,sin:ld,sinc:rC,sinh:ud,skinning:L_,smoothstep:nf,smoothstepElement:sf,specularColor:Gl,specularColorBlended:Kl,specularF90:ql,spherizeUV:EC,split:wl,spritesheetUV:kC,sqrt:rd,stack:AS,step:Ld,stepElement:cf,storage:y_,storageBarrier:RT,storageTexture:yw,storageTexture3D:xw,struct:PS,sub:bu,subBuild:Tf,subgroupAdd:rE,subgroupAll:mE,subgroupAnd:lE,subgroupAny:hE,subgroupBallot:nE,subgroupBroadcast:bE,subgroupBroadcastFirst:gE,subgroupElect:tE,subgroupExclusiveAdd:aE,subgroupExclusiveMul:cE,subgroupInclusiveAdd:iE,subgroupInclusiveMul:sE,subgroupIndex:tp,subgroupMax:pE,subgroupMin:fE,subgroupMul:oE,subgroupOr:uE,subgroupShuffle:xE,subgroupShuffleDown:wE,subgroupShuffleUp:CE,subgroupShuffleXor:SE,subgroupSize:FT,subgroupXor:dE,tan:pd,tangentGeometry:tg,tangentLocal:ng,tangentView:rg,tangentWorld:ig,tanh:md,texture:Lp,texture3D:Cw,texture3DLevel:Tw,texture3DLoad:ww,textureBarrier:zT,textureBicubic:Xy,textureBicubicLevel:Yy,textureCubeUV:kb,textureLevel:Bp,textureLoad:zp,textureSize:jp,textureStore:bw,thickness:tu,time:_C,toneMapping:Hf,toneMappingExposure:Uf,toonOutlinePass:tT,transformDirection:qd,transformNormal:vh,transformNormalByInverseViewMatrix:Yd,transformNormalByViewMatrix:Jd,transformNormalToView:yh,transformedClearcoatNormalView:Sh,transformedNormalView:bh,transformedNormalWorld:xh,transmission:eu,transpose:Md,triNoise3D:mC,triplanarTexture:jC,triplanarTextures:AC,trunc:Ad,uint:H,uintBitsToFloat:qS,uniform:q,uniformArray:qp,uniformCubeTexture:Ph,uniformFlow:mf,uniformGroup:su,uniformTexture:Rp,unpackHalf2x16:dC,unpackNormal:gg,unpackRGBToNormal:hg,unpackSnorm2x16:lC,unpackUnorm2x16:uC,unpremultiplyAlpha:yp,userData:Dw,uv:Ap,uvec2:dl,uvec3:ml,uvec4:_l,varying:Ef,varyingProperty:Ol,vec2:U,vec3:W,vec4:G,vectorComponents:nc,velocity:Mw,vertexColor:kv,vertexIndex:$f,vertexStage:Df,vibrance:Bw,viewZToLogarithmicDepth:mv,viewZToOrthographicDepth:cv,viewZToPerspectiveDepth:dv,viewZToReversedOrthographicDepth:lv,viewZToReversedPerspectiveDepth:fv,viewport:nm,viewportCoordinate:im,viewportDepthTexture:ov,viewportLinearDepth:yv,viewportMipTexture:nv,viewportOpaqueMipTexture:iv,viewportResolution:om,viewportSafeUV:OC,viewportSharedTexture:Kw,viewportSize:rm,viewportTexture:tv,viewportUV:am,vogelDiskSample:ow,wgsl:hT,wgslFn:bT,workgroupArray:HT,workgroupBarrier:LT,workgroupId:MT,workingToColorSpace:Nf,xor:Mu}),uk=new wS,dk=class extends qx{constructor(e,t){super(),this.renderer=e,this.nodes=t}update(e,t,n){let r=this.renderer,i=this.nodes.getBackgroundNode(e)||e.background,a=!1;if(i===null)r._clearColor.getRGB(uk),uk.a=r._clearColor.a;else if(i.isColor===!0)i.getRGB(uk),uk.a=1,a=!0;else if(i.isNode===!0){let n=this.get(e),a=i;uk.copy(r._clearColor);let o=n.backgroundMesh;if(o===void 0){let e=G(a).mul(gw).context({getUV:()=>_w.mul(mh),getTextureLevel:()=>hw}),t=wm.element(3).element(3).equal(1),r=xu(1,wm.element(1).element(1)).mul(3),s=t.select(eh.mul(r),eh),c=Jm.mul(G(s,0)),l=wm.mul(G(c.xyz,1));l=l.setZ(l.w);let u=new Av;u.name=`Background.material`,u.side=1,u.depthTest=!1,u.depthWrite=!1,u.allowOverride=!1,u.fog=!1,u.lights=!1,u.vertexNode=l,u.colorNode=e,n.backgroundMeshNode=e,n.backgroundMesh=o=new ji(new la(1,32,32),u),o.frustumCulled=!1,o.name=`Background.mesh`;function d(){i.removeEventListener(`dispose`,d),o.material.dispose(),o.geometry.dispose()}i.addEventListener(`dispose`,d)}let s=a.getCacheKey();n.backgroundCacheKey!==s&&(n.backgroundMeshNode.node=G(a).mul(gw),n.backgroundMeshNode.needsUpdate=!0,o.material.needsUpdate=!0,n.backgroundCacheKey=s),t.unshift(o,o.geometry,o.material,0,0,null,null)}else E(`Renderer: Unsupported background configuration.`,i);let o=r.xr.getEnvironmentBlendMode();if(o===`additive`?uk.set(0,0,0,1):o===`alpha-blend`&&uk.set(0,0,0,0),r.autoClear===!0||a===!0){let e=n.clearColorValue;e.r=uk.r,e.g=uk.g,e.b=uk.b,e.a=uk.a,(r.backend.isWebGLBackend===!0||r.alpha===!0)&&(e.r*=e.a,e.g*=e.a,e.b*=e.a),n.depthClearValue=r.getClearDepth(),n.stencilClearValue=r.getClearStencil(),n.clearColor=r.autoClearColor===!0,n.clearDepth=r.autoClearDepth===!0,n.clearStencil=r.autoClearStencil===!0}else n.clearColor=!1,n.clearDepth=!1,n.clearStencil=!1}},fk=0,pk=class{constructor(e=``,t=[]){this.name=e,this.bindings=t,this.id=fk++}},mk=class{constructor(e,t,n,r,i,a,o,s,c,l,u=[]){this.vertexShader=e,this.fragmentShader=t,this.computeShader=n,this.transforms=u,this.nodeAttributes=r,this.bindings=i,this.updateNodes=a,this.updateBeforeNodes=o,this.updateAfterNodes=s,this.observer=c,this.hardwareClipping=l,this.usedTimes=0}createBindings(){let e=[];for(let t of this.bindings)if(t.bindings[0].groupNode.shared!==!0){let n=new pk(t.name,[]);e.push(n);for(let e of t.bindings)n.bindings.push(e.clone())}else e.push(t);return e}},hk=class{constructor(e,t,n=null){this.isNodeAttribute=!0,this.name=e,this.type=t,this.node=n}},gk=class{constructor(e,t,n){this.isNodeUniform=!0,this.name=e,this.type=t,this.node=n}get value(){return this.node.value}set value(e){this.node.value=e}get id(){return this.node.id}get groupNode(){return this.node.groupNode}},_k=class{constructor(e,t,n=!1,r=null){this.isNodeVar=!0,this.name=e,this.type=t,this.readOnly=n,this.count=r}},vk=class extends _k{constructor(e,t,n=null,r=null){super(e,t),this.needsInterpolation=!1,this.isNodeVarying=!0,this.interpolationType=n,this.interpolationSampling=r}},yk=class{constructor(e,t,n=``){this.name=e,this.type=t,this.code=n,Object.defineProperty(this,"isNodeCode",{value:!0})}},bk=0,xk=class{constructor(e=null){this.id=bk++,this.nodesData=new WeakMap,this.parent=e}getData(e){let t=this.nodesData.get(e);return t===void 0&&this.parent!==null&&(t=this.parent.getData(e)),t}setData(e,t){this.nodesData.set(e,t)}},Sk=class{constructor(e,t){this.name=e,this.members=t,this.output=!1}},Ck=class{constructor(e,t){this.name=e,this.value=t,this.boundary=0,this.itemSize=0,this.offset=0,this.index=-1}setValue(e){this.value=e}getValue(){return this.value}},wk=class extends Ck{constructor(e,t=0){super(e,t),this.isNumberUniform=!0,this.boundary=4,this.itemSize=1}},Tk=class extends Ck{constructor(e,t=new O){super(e,t),this.isVector2Uniform=!0,this.boundary=8,this.itemSize=2}},Ek=class extends Ck{constructor(e,t=new k){super(e,t),this.isVector3Uniform=!0,this.boundary=16,this.itemSize=3}},Dk=class extends Ck{constructor(e,t=new xn){super(e,t),this.isVector4Uniform=!0,this.boundary=16,this.itemSize=4}},Ok=class extends Ck{constructor(e,t=new j){super(e,t),this.isColorUniform=!0,this.boundary=16,this.itemSize=3}},kk=class extends Ck{constructor(e,t=new Ro){super(e,t),this.isMatrix2Uniform=!0,this.boundary=8,this.itemSize=4}},Ak=class extends Ck{constructor(e,t=new an){super(e,t),this.isMatrix3Uniform=!0,this.boundary=48,this.itemSize=12}},jk=class extends Ck{constructor(e,t=new A){super(e,t),this.isMatrix4Uniform=!0,this.boundary=64,this.itemSize=16}},Mk=class extends wk{constructor(e){super(e.name,e.value),this.nodeUniform=e}getValue(){return this.nodeUniform.value}getType(){return this.nodeUniform.type}},Nk=class extends Tk{constructor(e){super(e.name,e.value),this.nodeUniform=e}getValue(){return this.nodeUniform.value}getType(){return this.nodeUniform.type}},Pk=class extends Ek{constructor(e){super(e.name,e.value),this.nodeUniform=e}getValue(){return this.nodeUniform.value}getType(){return this.nodeUniform.type}},Fk=class extends Dk{constructor(e){super(e.name,e.value),this.nodeUniform=e}getValue(){return this.nodeUniform.value}getType(){return this.nodeUniform.type}},Ik=class extends Ok{constructor(e){super(e.name,e.value),this.nodeUniform=e}getValue(){return this.nodeUniform.value}getType(){return this.nodeUniform.type}},Lk=class extends kk{constructor(e){super(e.name,e.value),this.nodeUniform=e}getValue(){return this.nodeUniform.value}getType(){return this.nodeUniform.type}},Rk=class extends Ak{constructor(e){super(e.name,e.value),this.nodeUniform=e}getValue(){return this.nodeUniform.value}getType(){return this.nodeUniform.type}},zk=class extends jk{constructor(e){super(e.name,e.value),this.nodeUniform=e}getValue(){return this.nodeUniform.value}getType(){return this.nodeUniform.type}},Bk=0,Vk=new WeakMap,Hk=new WeakMap,Uk=new WeakMap,Wk=new Map([[Int8Array,`int`],[Int16Array,`int`],[Int32Array,`int`],[Uint8Array,`uint`],[Uint16Array,`uint`],[Uint32Array,`uint`],[Float32Array,`float`]]),Gk=e=>/e/g.test(e)?String(e).replace(/\+/g,``):(e=Number(e),e+(e%1?``:`.0`)),Kk=e=>{if(e.writeUsageCount>0)return!0;if(e.subBuildsCache!==void 0){for(let t in e.subBuildsCache)if(Kk(e.subBuildsCache[t]))return!0}return!1},qk=class{constructor(e,t,n){this.object=e,this.material=e&&e.material||null,this.geometry=e&&e.geometry||null,this.renderer=t,this.parser=n,this.scene=null,this.camera=null,this.nodes=new Set,this.sequentialNodes=new Set,this.updateNodes=[],this.updateBeforeNodes=[],this.updateAfterNodes=[],this.hashNodes={},this.observer=null,this.lightsNode=null,this.environmentNode=null,this.fogNode=null,this.clippingContext=null,this.hardwareClipping=!1,this.vertexShader=null,this.fragmentShader=null,this.computeShader=null,this.flowNodes={vertex:[],fragment:[],compute:[]},this.flowCode={vertex:``,fragment:``,compute:``},this.uniforms={vertex:[],fragment:[],compute:[],index:0},this.structs={vertex:[],fragment:[],compute:[],index:0},this.types={vertex:[],fragment:[],compute:[],index:0},this.bindings={vertex:{},fragment:{},compute:{}},this.bindingsIndexes={},this.bindGroups=null,this.attributes=[],this.bufferAttributes=[],this.varyings=[],this.codes={},this.vars={},this.declarations={},this.flow={code:``},this.chaining=[],this.stack=AS(),this.stacks=[],this.tab=` `,this.currentFunctionNode=null,this.context={material:this.material},this.cache=new xk,this.globalCache=this.cache,this.flowsData=new WeakMap,this.shaderStage=null,this.buildStage=null,this.subBuildLayers=[],this.activeStacks=[],this.subBuildFn=null,this.fnCall=null,Object.defineProperty(this,"id",{value:Bk++})}isFlatShading(){return this.material.flatShading===!0||this.geometry.hasAttribute(`normal`)===!1}isOpaque(){let e=this.material;return e.transparent===!1&&e.blending===1&&e.alphaToCoverage===!1}createRenderTarget(e,t,n){return new Sn(e,t,n)}createCubeRenderTarget(e,t){return new Yv(e,t)}includes(e){return this.nodes.has(e)}getOutputType(e=0){let t=`vec4`,n=this.renderer.getRenderTarget();if(n!==null){let r=n.textures[e].type,i=n.textures[e].format,a=`vec`;r===1013?a=`ivec`:r===1014&&(a=`uvec`),t=i===1028||i===1029?r===1013?`int`:r===1014?`uint`:`float`:i===1030||i===1031?`${a}2`:i===1022||i===1032?`${a}3`:`${a}4`}return t}getOutputStructName(){}_getBindGroup(e,t){let n=t[0].groupNode,r=n.shared;if(r)for(let e=1;ee.nodeUniform.node.id-t.nodeUniform.node.id);for(let t of e.uniforms)n+=t.nodeUniform.node.id}else n+=e.nodeUniform.id;let r=this.renderer._currentRenderContext||this.renderer,a=Vk.get(r);a===void 0&&(a=new Map,Vk.set(r,a));let o=Fs(n);i=a.get(o),i===void 0&&(i=new pk(e,t),a.set(o,i))}else i=new pk(e,t);return i}getBindGroupArray(e,t){let n=this.bindings[t],r=n[e];return r===void 0&&(this.bindingsIndexes[e]===void 0&&(this.bindingsIndexes[e]={binding:0,group:Object.keys(this.bindingsIndexes).length}),n[e]=r=[]),r}getBindings(){let e=this.bindGroups;if(e===null){let t={},n=this.bindings;for(let e of tc)for(let r in n[e]){let i=n[e][r],a=t[r]||(t[r]=[]);for(let e of i)a.includes(e)===!1&&a.push(e)}e=[];for(let n in t){let r=t[n],i=this._getBindGroup(n,r);e.push(i)}this.bindGroups=e}return e}sortBindingGroups(){let e=this.getBindings();e.sort((e,t)=>e.bindings[0].groupNode.order-t.bindings[0].groupNode.order);for(let t=0;t=0?`${Math.round(t)}u`:`0u`;if(e===`bool`)return t?`true`:`false`;if(e===`color`)return`${this.getType(`vec3`)}( ${Gk(t.r)}, ${Gk(t.g)}, ${Gk(t.b)} )`;let n=this.getTypeLength(e),r=this.getComponentType(e),i=e=>this.generateConst(r,e);if(n===2)return`${this.getType(e)}( ${i(t.x)}, ${i(t.y)} )`;if(n===3)return`${this.getType(e)}( ${i(t.x)}, ${i(t.y)}, ${i(t.z)} )`;if(n===4&&e!==`mat2`)return`${this.getType(e)}( ${i(t.x)}, ${i(t.y)}, ${i(t.z)}, ${i(t.w)} )`;if(n>=4&&t&&(t.isMatrix2||t.isMatrix3||t.isMatrix4))return`${this.getType(e)}( ${t.elements.map(i).join(`, `)} )`;if(n>4)return`${this.getType(e)}()`;throw Error(`THREE.NodeBuilder: Type '${e}' not found in generate constant attempt.`)}getType(e){return e===`color`?`vec3`:e}hasGeometryAttribute(e){return this.geometry&&this.geometry.getAttribute(e)!==void 0}getAttribute(e,t){let n=this.attributes;for(let t of n)if(t.name===e)return t;let r=new hk(e,t);return this.registerDeclaration(r),n.push(r),r}getPropertyName(e){return e.name}isVector(e){return/vec\d/.test(e)}isMatrix(e){return/mat\d/.test(e)}isReference(e){return e===`void`||e===`property`||e===`sampler`||e===`samplerComparison`||e===`texture`||e===`cubeTexture`||e===`storageTexture`||e===`depthTexture`||e===`texture3D`}needsToWorkingColorSpace(){return!1}getComponentTypeFromTexture(e){let t=e.type;return e.isDepthTexture===!0?`float`:t===1013?`int`:t===1014?`uint`:`float`}getElementType(e){return e===`mat2`?`vec2`:e===`mat3`?`vec3`:e===`mat4`?`vec4`:this.getComponentType(e)}getComponentType(e){if(e=this.getVectorType(e),e===`float`||e===`bool`||e===`int`||e===`uint`)return e;let t=/(b|i|u|)(vec|mat)([2-4])/.exec(e);return t===null?null:t[1]===`b`?`bool`:t[1]===`i`?`int`:t[1]===`u`?`uint`:`float`}getVectorType(e){return e===`color`?`vec3`:e===`texture`||e===`cubeTexture`||e===`storageTexture`||e===`texture3D`?`vec4`:e}getTypeFromLength(e,t=`float`){if(e===1)return t;let n=Bs(e),r=t===`float`?``:t[0];return/mat2/.test(t)===!0&&(n=n.replace(`vec`,`mat`)),r+n}getTypeFromArray(e){return Wk.get(e.constructor)}isInteger(e){return/int|uint|(i|u)vec/.test(e)}getTypeFromAttribute(e){let t=e;e.isInterleavedBufferAttribute&&(t=e.data);let n=t.array,r=e.itemSize,i=e.normalized,a;return!(e instanceof Gr)&&i!==!0&&(a=this.getTypeFromArray(n)),this.getTypeFromLength(r,a)}getTypeLength(e){let t=this.getVectorType(e),n=/vec([2-4])/.exec(t);return n===null?t===`float`||t===`bool`||t===`int`||t===`uint`?1:/mat2/.test(e)===!0?4:/mat3/.test(e)===!0?9:/mat4/.test(e)===!0?16:0:Number(n[1])}getVectorFromMatrix(e){return e.replace(`mat`,`vec`)}changeComponentType(e,t){return this.getTypeFromLength(this.getTypeLength(e),t)}getIntegerType(e){let t=this.getComponentType(e);return t===`int`||t===`uint`?e:this.changeComponentType(e,`int`)}setActiveStack(e){this.activeStacks.push(e)}removeActiveStack(e){if(this.activeStacks[this.activeStacks.length-1]===e)this.activeStacks.pop();else throw Error(`THREE.NodeBuilder: Invalid active stack removal.`)}getActiveStack(){return this.activeStacks[this.activeStacks.length-1]}getBaseStack(){return this.activeStacks[0]}addStack(){this.stack=AS(this.stack);let e=al();return this.stacks.push(e),il(this.stack),this.stack}removeStack(){let e=this.stack;for(let t of e.nodes){let n=this.getDataFromNode(t);n.stack=e}return this.stack=e.parent,il(this.stacks.pop()),e}getDataFromNode(e,t=this.shaderStage,n=null){n=n===null?e.isGlobal(this)?this.globalCache:this.cache:n;let r=n.getData(e);r===void 0&&(r={},n.setData(e,r)),r[t]===void 0&&(r[t]={});let i=r[t];if(this.subBuildLayers.length===0)return i;let a=r.any?r.any.subBuilds:null,o=this.getClosestSubBuild(a);return o&&(i.subBuildsCache===void 0&&(i.subBuildsCache={}),i=i.subBuildsCache[o]||(i.subBuildsCache[o]={}),i.subBuilds=a),i}getNodeProperties(e,t=`any`){let n=this.getDataFromNode(e,t);return n.properties||={outputNode:null}}getBufferAttributeFromNode(e,t,n=null){let r=this.getDataFromNode(e,`vertex`),i=r.bufferAttribute;if(i===void 0){let a=this.uniforms.index++;n===null&&(n=`nodeAttribute`+a),i=new hk(n,t,e),this.bufferAttributes.push(i),r.bufferAttribute=i}return i}getStructTypeNode(e,t=this.shaderStage){return this.types[t][e]||null}getStructTypeFromNode(e,t,n=null,r=this.shaderStage){let i=this.getDataFromNode(e,r,this.globalCache),a=i.structType;if(a===void 0){let o=this.structs.index++;n===null&&(n=`StructType`+o),a=new Sk(n,t),this.structs[r].push(a),this.types[r][n]=e,i.structType=a}return a}getOutputStructTypeFromNode(e,t){let n=this.getStructTypeFromNode(e,t,`OutputType`,`fragment`);return n.output=!0,n}getUniformFromNode(e,t,n=this.shaderStage,r=null){let i=this.getDataFromNode(e,n,this.globalCache),a=i.uniform;if(a===void 0){let o=this.uniforms.index++;a=new gk(r||`nodeUniform`+o,t,e),this.uniforms[n].push(a),this.registerDeclaration(a),i.uniform=a}return a}getVarFromNode(e,t=null,n=e.getNodeType(this),r=this.shaderStage,i=!1){let a=this.getDataFromNode(e,r),o=this.getSubBuildProperty(`variable`,a.subBuilds),s=a[o];if(s===void 0){let c=i?`_const`:`_var`,l=this.vars[r]||(this.vars[r]=[]),u=this.vars[c]||(this.vars[c]=0);t===null&&(t=(i?`nodeConst`:`nodeVar`)+u,this.vars[c]++),o!==`variable`&&(t=this.getSubBuildProperty(t,a.subBuilds));let d=e.getArrayCount(this);s=new _k(t,n,i,d),i||l.push(s),this.registerDeclaration(s),a[o]=s}return s}isDeterministic(e){if(e.isMathNode)return this.isDeterministic(e.aNode)&&(!e.bNode||this.isDeterministic(e.bNode))&&(!e.cNode||this.isDeterministic(e.cNode));if(e.isOperatorNode)return this.isDeterministic(e.aNode)&&(!e.bNode||this.isDeterministic(e.bNode));if(e.isArrayNode){if(e.values!==null){for(let t of e.values)if(!this.isDeterministic(t))return!1}return!0}else if(e.isConstNode)return!0;return!1}getVaryingFromNode(e,t=null,n=e.getNodeType(this),r=null,i=null){let a=this.getDataFromNode(e,`any`),o=this.getSubBuildProperty(`varying`,a.subBuilds),s=a[o];if(s===void 0){let e=this.varyings,c=e.length;t===null&&(t=`nodeVarying`+c),o!==`varying`&&(t=this.getSubBuildProperty(t,a.subBuilds)),s=new vk(t,n,r,i),e.push(s),this.registerDeclaration(s),a[o]=s}return s}registerDeclaration(e){let t=this.shaderStage,n=this.declarations[t]||(this.declarations[t]={}),r=e.name,i=r,a=this.getPropertyName(e),o=1;for(;n[a]!==void 0;)i=r+`_`+o++,e.name=i,a=this.getPropertyName(e);i!==r&&T(`TSL: Declaration name '${r}' of '${e.type}' already in use. Renamed to '${i}'.`),n[a]=e}getCodeFromNode(e,t,n=this.shaderStage){let r=this.getDataFromNode(e),i=r.code;if(i===void 0){let e=this.codes[n]||(this.codes[n]=[]),a=e.length;i=new yk(`nodeCode`+a,t),e.push(i),r.code=i}return i}addFlowCodeHierarchy(e,t){let{flowCodes:n,flowCodeBlock:r}=this.getDataFromNode(e),i=!0,a=t;for(;a;){if(r.get(a)===!0){i=!1;break}a=this.getDataFromNode(a).parentNodeBlock}if(i)for(let e of n)this.addLineFlowCode(e)}addLineFlowCodeBlock(e,t,n){let r=this.getDataFromNode(e),i=r.flowCodes||=[],a=r.flowCodeBlock||=new WeakMap;i.push(t),a.set(n,!0)}addLineFlowCode(e,t=null){return e===``?this:(t!==null&&this.context.nodeBlock&&this.addLineFlowCodeBlock(t,e,this.context.nodeBlock),e=this.tab+e,/;\s*$/.test(e)||(e+=`; -`),this.flow.code+=e,this)}addFlowCode(e){return this.flow.code+=e,this}addFlowTab(){return this.tab+=` `,this}removeFlowTab(){return this.tab=this.tab.slice(0,-1),this}getFlowData(e){return this.flowsData.get(e)}flowNode(e){let t=e.getNodeType(this),n=this.flowChildNode(e,t);return this.flowsData.set(e,n),n}addInclude(e){this.currentFunctionNode!==null&&this.currentFunctionNode.includes.push(e)}buildFunctionNode(e){let t=this.renderer.backend,n=Hk.get(t);n===void 0&&(n=new WeakMap,Hk.set(t,n));let r=n.get(e);if(r===void 0){r=new _T;let t=this.currentFunctionNode;this.currentFunctionNode=r,r.code=this.buildFunctionCode(e),this.currentFunctionNode=t,n.set(e,r)}return r}flowShaderNode(e){let t=e.layout,n={[Symbol.iterator](){let e=0,t=Object.values(this);return{next:()=>({value:t[e],done:e++>=t.length})}}};for(let e of t.inputs)n[e.name]=new OS(e.type,e.name);e.layout=null;let r=e.call(n),i=this.flowStagesNode(r,t.type);return e.layout=t,i}flowBuildStage(e,t,n=null){let r=this.getBuildStage();this.setBuildStage(t);let i=e.build(this,n);return this.setBuildStage(r),i}flowStagesNode(e,t=null){let n=this.flow,r=this.vars,i=this.declarations,a=this.cache,o=this.buildStage,s=this.stack,c={code:``};this.flow=c,this.vars={},this.declarations={},this.cache=new xk,this.stack=AS();for(let n of ec)this.setBuildStage(n),c.result=e.build(this,t);return c.vars=this.getVars(this.shaderStage),this.flow=n,this.vars=r,this.declarations=i,this.cache=a,this.stack=s,this.setBuildStage(o),c}getFunctionOperator(){return null}buildFunctionCode(){T(`Abstract function.`)}flowChildNode(e,t=null){let n=this.flow,r={code:``};return this.flow=r,r.result=e.build(this,t),this.flow=n,r}flowNodeFromShaderStage(e,t,n=null,r=null){let i=this.tab,a=this.cache,o=this.shaderStage,s=this.context;this.setShaderStage(e);let c={...this.context};delete c.nodeBlock,this.cache=this.globalCache,this.tab=` `,this.context=c;let l=null;if(this.buildStage===`generate`){let i=this.flowChildNode(t,n);r!==null&&(i.code+=`${this.tab+r} = ${i.result};\n`),this.flowCode[e]=this.flowCode[e]+i.code,l=i}else l=t.build(this);return this.setShaderStage(o),this.cache=a,this.tab=i,this.context=s,l}getAttributesArray(){return this.attributes.concat(this.bufferAttributes)}getAttributes(){T(`Abstract function.`)}getVaryings(){T(`Abstract function.`)}getVar(e,t,n=null){return`${n===null?this.getType(e):this.generateArrayDeclaration(e,n)} ${t}`}getVars(e,t=!1){let n=[],r=this.vars[e];if(r!==void 0)for(let e of r)n.push(`${this.getVar(e.type,e.name,e.count)};`);return n.join(t?` -`:` - `)}getUniforms(){T(`Abstract function.`)}getCodes(e){let t=this.codes[e],n=``;if(t!==void 0)for(let e of t)n+=e.code+` -`;return n}getHash(){return this.vertexShader+this.fragmentShader+this.computeShader}setShaderStage(e){this.shaderStage=e}getShaderStage(){return this.shaderStage}setBuildStage(e){this.buildStage=e}getBuildStage(){return this.buildStage}buildCode(){T(`Abstract function.`)}get subBuild(){return this.subBuildLayers[this.subBuildLayers.length-1]||null}addSubBuild(e){this.subBuildLayers.push(e)}removeSubBuild(){return this.subBuildLayers.pop()}getClosestSubBuild(e){let t;if(t=e&&e.isNode?e.isShaderCallNodeInternal?e.shaderNode.subBuilds:e.isStackNode?[e.subBuild]:this.getDataFromNode(e,`any`).subBuilds:e instanceof Set?[...e]:e,!t)return null;let n=this.subBuildLayers;for(let e=t.length-1;e>=0;e--){let r=t[e];if(n.includes(r))return r}return null}getSubBuildOutput(e){return this.getSubBuildProperty(`outputNode`,e)}getSubBuildProperty(e=``,t=null){let n;n=t===null?this.subBuildFn:this.getClosestSubBuild(t);let r;return r=n?e?n+`_`+e:n:e,r}prebuild(){let{object:e,renderer:t,material:n}=this;if(t.contextNode.isContextNode===!0?this.context={...this.context,...t.contextNode.getFlowContextData()}:E('NodeBuilder: "renderer.contextNode" must be an instance of `context()`.'),n&&n.contextNode&&(n.contextNode.isContextNode===!0?this.context={...this.context,...n.contextNode.getFlowContextData()}:E('NodeBuilder: "material.contextNode" must be an instance of `context()`.')),n!==null){let e=t.library.fromMaterial(n);e===null&&(E(`NodeBuilder: Material "${n.type}" is not compatible.`),e=new Av),e.build(this)}else this.addFlow(`compute`,e)}build(){this.prebuild();for(let e of ec){this.setBuildStage(e),this.context.position&&this.context.position.isNode&&this.flowNodeFromShaderStage(`vertex`,this.context.position);for(let t of tc){this.setShaderStage(t);let n=this.flowNodes[t];for(let t of n)e===`generate`?this.flowNode(t):t.build(this)}}return this.setBuildStage(null),this.setShaderStage(null),this.buildCode(),this.buildUpdateNodes(),this}async buildAsync(){this.prebuild();for(let e of ec){this.setBuildStage(e),this.context.position&&this.context.position.isNode&&this.flowNodeFromShaderStage(`vertex`,this.context.position);for(let t of tc){this.setShaderStage(t);let n=this.flowNodes[t];for(let t of n)e===`generate`?this.flowNode(t):t.build(this);await Et()}}return this.setBuildStage(null),this.setShaderStage(null),this.buildCode(),this.buildUpdateNodes(),this}getSharedDataFromNode(e){let t=Uk.get(e);return t===void 0&&(t={}),t}getNodeUniform(e,t){let n=this.getSharedDataFromNode(e),r=n.cache;if(r===void 0){if(t===`float`||t===`int`||t===`uint`)r=new Mk(e);else if(t===`vec2`||t===`ivec2`||t===`uvec2`)r=new Nk(e);else if(t===`vec3`||t===`ivec3`||t===`uvec3`)r=new Pk(e);else if(t===`vec4`||t===`ivec4`||t===`uvec4`)r=new Fk(e);else if(t===`color`)r=new Ik(e);else if(t===`mat2`)r=new Lk(e);else if(t===`mat3`)r=new Rk(e);else if(t===`mat4`)r=new zk(e);else throw Error(`THREE.NodeBuilder: Uniform "${t}" not implemented.`);n.cache=r}return r}format(e,t,n){if(t=this.getVectorType(t),n=this.getVectorType(n),t===n||n===null||this.isReference(n))return e;let r=this.getTypeLength(t),i=this.getTypeLength(n);return r===16&&i===9?`${this.getType(n)}( ${e}[ 0 ].xyz, ${e}[ 1 ].xyz, ${e}[ 2 ].xyz )`:r===9&&i===4?`${this.getType(n)}( ${e}[ 0 ].xy, ${e}[ 1 ].xy )`:r>4||i>4||i===0?e:r===i?`${this.getType(n)}( ${e} )`:r>i?(e=n===`bool`?`all( ${e} )`:`${e}.${`xyz`.slice(0,i)}`,this.format(e,this.getTypeFromLength(i,this.getComponentType(t)),n)):i===4&&r>1?`${this.getType(n)}( ${this.format(e,t,`vec3`)}, 1.0 )`:r===2?`${this.getType(n)}( ${this.format(e,t,`vec2`)}, 0.0 )`:(r===1&&i>1&&t!==this.getComponentType(n)&&(e=`${this.getType(this.getComponentType(n))}( ${e} )`),`${this.getType(n)}( ${e} )`)}getSignature(){return`// Three.js r185 - Node System -`}needsPreviousData(){let e=this.renderer.getMRT();return e&&e.has(`velocity`)||qs(this.object).useVelocity===!0}},Jk=class{constructor(){this.time=0,this.deltaTime=0,this.frameId=0,this.renderId=0,this.updateMap=new WeakMap,this.updateBeforeMap=new WeakMap,this.updateAfterMap=new WeakMap,this.renderer=null,this.material=null,this.camera=null,this.object=null,this.scene=null}_getMaps(e,t){let n=e.get(t);return n===void 0&&(n={renderId:0,frameId:0},e.set(t,n)),n}updateBeforeNode(e){let t=e.getUpdateBeforeType(),n=e.updateReference(this);if(t===M.FRAME){let t=this._getMaps(this.updateBeforeMap,n);if(t.frameId!==this.frameId){let n=t.frameId;t.frameId=this.frameId,e.updateBefore(this)===!1&&(t.frameId=n)}}else if(t===M.RENDER){let t=this._getMaps(this.updateBeforeMap,n);if(t.renderId!==this.renderId){let n=t.renderId;t.renderId=this.renderId,e.updateBefore(this)===!1&&(t.renderId=n)}}else t===M.OBJECT&&e.updateBefore(this)}updateAfterNode(e){let t=e.getUpdateAfterType(),n=e.updateReference(this);if(t===M.FRAME){let t=this._getMaps(this.updateAfterMap,n);t.frameId!==this.frameId&&e.updateAfter(this)!==!1&&(t.frameId=this.frameId)}else if(t===M.RENDER){let t=this._getMaps(this.updateAfterMap,n);t.renderId!==this.renderId&&e.updateAfter(this)!==!1&&(t.renderId=this.renderId)}else t===M.OBJECT&&e.updateAfter(this)}updateNode(e){let t=e.getUpdateType(),n=e.updateReference(this);if(t===M.FRAME){let t=this._getMaps(this.updateMap,n);t.frameId!==this.frameId&&e.update(this)!==!1&&(t.frameId=this.frameId)}else if(t===M.RENDER){let t=this._getMaps(this.updateMap,n);t.renderId!==this.renderId&&e.update(this)!==!1&&(t.renderId=this.renderId)}else t===M.OBJECT&&e.update(this)}update(){this.frameId++,this.lastTime===void 0&&(this.lastTime=performance.now()),this.deltaTime=(performance.now()-this.lastTime)/1e3,this.lastTime=performance.now(),this.time+=this.deltaTime}},Yk=class{constructor(e,t,n=null,r=``,i=!1){this.type=e,this.name=t,this.count=n,this.qualifier=r,this.isConst=i}};Yk.isNodeFunctionInput=!0;var Xk=class extends kD{static get type(){return`AmbientLightNode`}constructor(e=null){super(e)}setup({context:e}){e.irradiance.addAssign(this.colorNode)}},Zk=class extends kD{static get type(){return`DirectionalLightNode`}constructor(e=null){super(e)}setupDirect(){let e=this.colorNode;return{lightDirection:NE(this.light),lightColor:e}}},Qk=class extends kD{static get type(){return`HemisphereLightNode`}constructor(e=null){super(e),this.lightPositionNode=AE(e),this.lightDirectionNode=this.lightPositionNode.normalize(),this.groundColorNode=q(new j).setGroup(K)}update(e){let{light:t}=this;super.update(e),this.lightPositionNode.object3d=t,this.groundColorNode.value.copy(t.groundColor).multiplyScalar(t.intensity)}setup(e){let{colorNode:t,groundColorNode:n,lightDirectionNode:r}=this,i=Qd(n,t,gh.dot(r).mul(.5).add(.5));e.context.irradiance.addAssign(i)}},$k=class extends kD{static get type(){return`SpotLightNode`}constructor(e=null){super(e),this.coneCosNode=q(0).setGroup(K),this.penumbraCosNode=q(0).setGroup(K),this.cutoffDistanceNode=q(0).setGroup(K),this.decayExponentNode=q(0).setGroup(K),this.colorNode=q(this.color).setGroup(K)}update(e){super.update(e);let{light:t}=this;this.coneCosNode.value=Math.cos(t.angle),this.penumbraCosNode.value=Math.cos(t.angle*(1-t.penumbra)),this.cutoffDistanceNode.value=t.distance,this.decayExponentNode.value=t.decay}getSpotAttenuation(e,t){let{coneCosNode:n,penumbraCosNode:r}=this;return nf(n,r,t)}getLightCoord(e){let t=e.getNodeProperties(this),n=t.projectionUV;return n===void 0&&(n=kE(this.light,e.context.positionWorld),t.projectionUV=n),n}setupDirect(e){let{colorNode:t,cutoffDistanceNode:n,decayExponentNode:r,light:i}=this,a=this.getLightVector(e),o=a.normalize(),s=o.dot(NE(i)),c=this.getSpotAttenuation(e,s),l=AD({lightDistance:a.length(),cutoffDistance:n,decayExponent:r}),u=t.mul(c).mul(l),d,f;return i.colorNode?(f=this.getLightCoord(e),d=i.colorNode(f)):i.map&&(f=this.getLightCoord(e),d=Lp(i.map,f.xy).onRenderUpdate(()=>i.map)),d&&(u=f.mul(2).sub(1).abs().lessThan(1).all().select(u.mul(d),u)),{lightColor:u,lightDirection:o}}},eA=class extends $k{static get type(){return`IESSpotLightNode`}constructor(e=null){super(e),this._iesTextureNode=null}getSpotAttenuation(e,t){let n=this.light.iesMap,r=null;if(n&&n.isTexture===!0){let e=t.acos().mul(1/Math.PI);this._iesTextureNode=Lp(n,U(e,0),0),r=this._iesTextureNode.r}else r=super.getSpotAttenuation(e,t);return r}update(e){super.update(e),this._iesTextureNode!==null&&this.light.iesMap&&(this._iesTextureNode.value=this.light.iesMap)}},tA=class extends kD{static get type(){return`LightProbeNode`}constructor(e=null){super(e);let t=[];for(let e=0;e<9;e++)t.push(new k);this.lightProbe=qp(t)}update(e){let{light:t}=this;super.update(e);for(let e=0;e<9;e++)this.lightProbe.array[e].copy(t.sh.coefficients[e]).multiplyScalar(t.intensity)}setup(e){let t=lk(gh,this.lightProbe);e.context.irradiance.addAssign(t)}},nA=R(([e,t])=>{let n=e.abs().sub(t);return Cd(Id(n,0)).add(Fd(Id(n.x,n.y),0))}),rA=class extends $k{static get type(){return`ProjectorLightNode`}update(e){super.update(e);let t=this.light;if(this.penumbraCosNode.value=Math.min(Math.cos(t.angle*(1-t.penumbra)),.99999),t.aspect===null){let e=1;t.map!==null&&(e=t.map.width/t.map.height),t.shadow.aspect=e}else t.shadow.aspect=t.aspect}getSpotAttenuation(e){let t=B(0),n=this.penumbraCosNode,r=OE(this.light).mul(e.context.positionWorld||nh);return z(r.w.greaterThan(0),()=>{let e=nA(r.xyz.div(r.w).xy.sub(U(.5)),U(.5)),i=xu(-1,bu(1,_d(n)).sub(1));t.assign(ef(e.mul(-2).mul(i)))}),t}},iA=new A,aA=new A,oA=null,sA=class extends kD{static get type(){return`RectAreaLightNode`}constructor(e=null){super(e),this.halfHeight=q(new k).setGroup(K),this.halfWidth=q(new k).setGroup(K),this.updateType=M.RENDER}update(e){super.update(e);let{light:t}=this,n=e.camera.matrixWorldInverse;aA.identity(),iA.copy(t.matrixWorld),iA.premultiply(n),aA.extractRotation(iA),this.halfWidth.value.set(t.width*.5,0,0),this.halfHeight.value.set(0,t.height*.5,0),this.halfWidth.value.applyMatrix4(aA),this.halfHeight.value.applyMatrix4(aA)}setupDirectRectArea(e){let t,n;e.isAvailable(`float32Filterable`)?(t=Lp(oA.LTC_FLOAT_1),n=Lp(oA.LTC_FLOAT_2)):(t=Lp(oA.LTC_HALF_1),n=Lp(oA.LTC_HALF_2));let{colorNode:r,light:i}=this;return{lightColor:r,lightPosition:ME(i),halfWidth:this.halfWidth,halfHeight:this.halfHeight,ltc_1:t,ltc_2:n}}static setLTC(e){oA=e}},cA=class{parseFunction(){T(`Abstract function.`)}},lA=class{constructor(e,t,n=``,r=``){this.type=e,this.inputs=t,this.name=n,this.precision=r}getCode(){T(`Abstract function.`)}};lA.isNodeFunction=!0;var uA=/^\s*(highp|mediump|lowp)?\s*([a-z_0-9]+)\s*([a-z_0-9]+)?\s*\(([\s\S]*?)\)/i,dA=/[a-z_0-9]+/gi,fA=`#pragma main`,pA=e=>{e=e.trim();let t=e.indexOf(fA),n=t===-1?e:e.slice(t+12),r=n.match(uA);if(r!==null&&r.length===5){let i=r[4],a=[],o=null;for(;(o=dA.exec(i))!==null;)a.push(o);let s=[],c=0;for(;c{let n=this._createNodeBuilder(e,e.material);try{t?await n.buildAsync():n.build()}catch(r){n=this._createNodeBuilder(e,new Av),t?await n.buildAsync():n.build(),E(`TSL: `+r)}return n};if(t)return o().then(e=>(r=this._createNodeBuilderState(e),i.set(a,r),r.usedTimes++,n.nodeBuilderState=r,r));{let t=this._createNodeBuilder(e,e.material);try{t.build()}catch(n){t=this._createNodeBuilder(e,new Av),t.build();let r=n.stackTrace;!r&&n.stack&&(r=new Ns(n.stack)),E(`TSL: `+n,r)}r=this._createNodeBuilderState(t),i.set(a,r)}}r.usedTimes++,n.nodeBuilderState=r}return r}getForRenderAsync(e){let t=this.getForRender(e,!0);return t.then?t:Promise.resolve(t)}getForRenderDeferred(e){let t=this.get(e);if(t.nodeBuilderState!==void 0)return t.nodeBuilderState;let n=this.getForRenderCacheKey(e),r=this.nodeBuilderCache.get(n);return r===void 0?(t.pendingBuild!==!0&&(t.pendingBuild=!0,this._buildQueue.push(()=>this.getForRenderAsync(e).then(()=>{t.pendingBuild=!1})),this._processBuildQueue()),null):(r.usedTimes++,t.nodeBuilderState=r,r)}_processBuildQueue(){this._buildInProgress||this._buildQueue.length===0||(this._buildInProgress=!0,this._buildQueue.shift()().then(()=>{this._buildInProgress=!1,this._processBuildQueue()}))}delete(e){if(e.isRenderObject){let t=this.get(e).nodeBuilderState;t!==void 0&&(t.usedTimes--,t.usedTimes===0&&this.nodeBuilderCache.delete(this.getForRenderCacheKey(e)))}return super.delete(e)}getForCompute(e){let t=this.get(e),n=t.nodeBuilderState;if(n===void 0||t.version!==e.version){let r=this.backend.createNodeBuilder(e,this.renderer);r.build(),n=this._createNodeBuilderState(r),t.nodeBuilderState=n,t.version=e.version}return n}_createNodeBuilderState(e){return new mk(e.vertexShader,e.fragmentShader,e.computeShader,e.getAttributesArray(),e.getBindings(),e.updateNodes,e.updateBeforeNodes,e.updateAfterNodes,e.observer,e.hardwareClipping,e.transforms)}getEnvironmentNode(e){if(this.renderer.lighting.enabled===!1)return null;this.updateEnvironment(e);let t=null;if(e.environmentNode&&e.environmentNode.isNode)t=e.environmentNode;else{let n=this.get(e);n.environmentNode&&(t=n.environmentNode)}return t}getBackgroundNode(e){this.updateBackground(e);let t=null;if(e.backgroundNode&&e.backgroundNode.isNode)t=e.backgroundNode;else{let n=this.get(e);n.backgroundNode&&(t=n.backgroundNode)}return t}getFogNode(e){return this.updateFog(e),e.fogNode||this.get(e).fogNode||null}getCacheKey(e,t){gA[0]=e,gA[1]=t;let n=this.renderer.info.calls,r=this.callHashCache.get(gA)||{};if(r.callId!==n){if(_A.push(this.renderer.getOutputRenderTarget()&&this.renderer.getOutputRenderTarget().multiview?1:0),_A.push(+!!this.renderer.lighting.enabled),this.renderer.lighting.enabled){_A.push(t.getCacheKey(!0)),_A.push(+!!this.renderer.shadowMap.enabled),_A.push(this.renderer.shadowMap.type);let n=this.getEnvironmentNode(e);n&&_A.push(n.getCacheKey())}let i=this.getFogNode(e);i&&_A.push(i.getCacheKey()),r.callId=n,r.cacheKey=Is(_A),this.callHashCache.set(gA,r),_A.length=0}return gA[0]=null,gA[1]=null,r.cacheKey}get isToneMappingState(){return!this.renderer.getRenderTarget()}updateBackground(e){let t=this.get(e),n=e.background;if(n){let r=e.backgroundBlurriness===0&&t.backgroundBlurriness>0||e.backgroundBlurriness>0&&t.backgroundBlurriness===0;(t.background!==n||r)&&(t.backgroundNode=this.getCacheNode(`background`,n,()=>{if(n.isCubeTexture===!0||n.mapping===303||n.mapping===304||n.mapping===306){if(e.backgroundBlurriness>0||n.mapping===306)return px(n);{let e;return e=n.isCubeTexture===!0?Nh(n):Lp(n),ty(e)}}else if(n.isTexture===!0)return Lp(n,$p.flipY()).setUpdateMatrix(!0);else n.isColor!==!0&&E(`WebGPUNodes: Unsupported background configuration.`,n)},r),t.background=n,t.backgroundBlurriness=e.backgroundBlurriness)}else t.backgroundNode&&(delete t.backgroundNode,delete t.background)}getCacheNode(e,t,n,r=!1){let i=this.cacheLib[e]||(this.cacheLib[e]=new WeakMap),a=i.get(t);return(a===void 0||r)&&(a=n(),i.set(t,a)),a}updateFog(e){let t=this.get(e),n=e.fog;n?t.fog!==n&&(t.fogNode=this.getCacheNode(`fog`,n,()=>{if(n.isFogExp2)return TT(Lh(`color`,`color`,n).setGroup(K),CT(Lh(`density`,`float`,n).setGroup(K)));if(n.isFog)return TT(Lh(`color`,`color`,n).setGroup(K),ST(Lh(`near`,`float`,n).setGroup(K),Lh(`far`,`float`,n).setGroup(K)));E(`Renderer: Unsupported fog configuration.`,n)}),t.fog=n):(delete t.fogNode,delete t.fog)}updateEnvironment(e){let t=this.get(e),n=e.environment;n?t.environment!==n&&(t.environmentNode=this.getCacheNode(`environment`,n,()=>{if(n.isCubeTexture===!0)return Nh(n);if(n.isTexture===!0)return Lp(n);E(`Nodes: Unsupported environment configuration.`,n)}),t.environment=n):t.environmentNode&&(delete t.environmentNode,delete t.environment)}getNodeFrame(e=this.renderer,t=null,n=null,r=null,i=null){let a=this.nodeFrame;return a.renderer=e,a.scene=t,a.object=n,a.camera=r,a.material=i,a}getNodeFrameForRender(e){return this.getNodeFrame(e.renderer,e.scene,e.object,e.camera,e.material)}getOutputCacheKey(){let e=this.renderer;return e.toneMapping+`,`+e.currentColorSpace+`,`+e.xr.isPresenting}getOutputNode(e){let t=this.renderer,n;return n=e.isArrayTexture?this.backend.isWebGLBackend?Lp(e,$p).depth(Jp(`gl_ViewID_OVR`)).renderOutput(t.toneMapping,t.currentColorSpace):Lp(e,$p).depth(vA).renderOutput(t.toneMapping,t.currentColorSpace):Lp(e,$p).renderOutput(t.toneMapping,t.currentColorSpace),n}setOutputLayerIndex(e){vA.value=e}updateBefore(e){let t=e.getNodeBuilderState();for(let n of t.updateBeforeNodes)this.getNodeFrameForRender(e).updateBeforeNode(n)}updateAfter(e){let t=e.getNodeBuilderState();for(let n of t.updateAfterNodes)this.getNodeFrameForRender(e).updateAfterNode(n)}updateForCompute(e){let t=this.getNodeFrame(),n=this.getForCompute(e);for(let e of n.updateNodes)t.updateNode(e)}updateForRender(e){let t=this.getNodeFrameForRender(e),n=e.getNodeBuilderState();for(let e of n.updateNodes)t.updateNode(e)}needsRefresh(e){let t=this.getNodeFrameForRender(e);return e.getMonitor().needsRefresh(e,t)}dispose(){super.dispose(),this.nodeFrame=new Jk,this.nodeBuilderCache=new Map,this.cacheLib={}}},bA=new qi,xA=class e{constructor(e=null){this.version=0,this.clipIntersection=null,this.cacheKey=``,this.shadowPass=!1,this.viewMatrix=new A,this.viewNormalMatrix=new an,this.clippingGroupContexts=new WeakMap,this.intersectionPlanes=[],this.unionPlanes=[],this.parentVersion=null,e!==null&&(this.viewMatrix=e.viewMatrix,this.viewNormalMatrix=e.viewNormalMatrix,this.clippingGroupContexts=e.clippingGroupContexts,this.shadowPass=e.shadowPass)}projectPlanes(e,t,n){let r=e.length;for(let i=0;i0&&(Tt(`THREE.XRManager: WebGPU XR does not support MSAA yet. Disabling MSAA for this XR session.`),this._currentSamples===null&&(this._currentSamples=e.samples),e._samples=0)}}async _initWebGPUSession(e){let t=this.getWebGPUBinding(),n=t.createProjectionLayer({colorFormat:t.getPreferredColorFormat(),depthStencilFormat:`depth24plus`});this._glProjLayer=n,e.updateRenderState({layers:[n]}),this._referenceSpace=await e.requestReferenceSpace(this.getReferenceSpaceType()),this._xrRenderTarget=new Sn(n.textureWidth,n.textureHeight,{depth:2,minFilter:l,magFilter:l,depthBuffer:!0,multiview:!1,useArrayDepthTexture:!0,samples:0}),this._xrRenderTarget.texture.isArrayTexture=!0,this._useMultiviewIfPossible===!0&&Tt(`THREE.XRManager: WebGPU XR does not support multiview yet. Disabling multiview for this XR session.`),this._useMultiview=!1}_disposeWebGPUSession(){let e=this._renderer,t=this._xrRenderTarget;if(t===null||e.backend.isWebGPUBackend!==!0)return;let n=e.backend,r=e._textures,i=n.get?n.get(t):null;i&&(i.descriptors=void 0);let a=e=>{e!=null&&(n.delete&&n.delete(e),r.delete&&r.delete(e))};for(let e=0;exp(e,n.toneMapping,n.outputColorSpace)}),MA.set(i,a))}else a=i;n.contextNode=a,n.setRenderTarget(r.renderTarget),r.rendercall(),n.contextNode=i}n.setRenderTarget(a),n._setXRLayerSize(i.x,i.y),this.isPresenting=r}getSession(){return this._session}async setSession(e){let t=this._renderer;t.initialized===!1&&await t.init(),this._gl=t.getContext();let n=this._gl;if(this._session=e,e!==null){if(e.addEventListener(`select`,this._onSessionEvent),e.addEventListener(`selectstart`,this._onSessionEvent),e.addEventListener(`selectend`,this._onSessionEvent),e.addEventListener(`squeeze`,this._onSessionEvent),e.addEventListener(`squeezestart`,this._onSessionEvent),e.addEventListener(`squeezeend`,this._onSessionEvent),e.addEventListener(`end`,this._onSessionEnd),e.addEventListener(`inputsourceschange`,this._onInputSourcesChange),this._validateWebGPUSession(),this._currentPixelRatio=t.getPixelRatio(),t.getSize(this._currentSize),this._currentAnimationContext=t._animation.getContext(),this._currentAnimationLoop=t._animation.getAnimationLoop(),t._animation.stop(),this._isWebGPUSession())await this._initWebGPUSession(e);else if(this._supportsLayers===!0){let r=null,i=null,a=null,o=n.getContextAttributes();await t.backend.makeXRCompatible(),this.setFoveation(this.getFoveation()),t.depth&&(a=t.stencil?n.DEPTH24_STENCIL8:n.DEPTH_COMPONENT24,r=t.stencil?ae:ie,i=t.stencil?C:v);let s={colorFormat:n.RGBA8,depthFormat:a,scaleFactor:this._framebufferScaleFactor,clearOnAccess:!1};this._useMultiviewIfPossible&&t.hasFeature(`OVR_multiview2`)&&(s.textureType=`texture-array`,this._useMultiview=!0),this._glBinding=this.getBinding();let c=this._glBinding.createProjectionLayer(s),l=[c];this._glProjLayer=c,t.setPixelRatio(1),t._setXRLayerSize(c.textureWidth,c.textureHeight);let u=this._useMultiview?2:1,d=new ia(c.textureWidth,c.textureHeight,i,void 0,void 0,void 0,void 0,void 0,void 0,r,u);if(this._xrRenderTarget=new kA(c.textureWidth,c.textureHeight,{format:re,type:p,colorSpace:t.outputColorSpace,depthTexture:d,stencilBuffer:t.stencil,samples:o.antialias?4:0,resolveDepthBuffer:c.ignoreDepthValues===!1,resolveStencilBuffer:c.ignoreDepthValues===!1,depth:this._useMultiview?2:1,multiview:this._useMultiview}),this._xrRenderTarget._hasExternalTextures=!0,this._xrRenderTarget.depth=this._useMultiview?2:1,this._sessionUsesLayers=e.enabledFeatures.includes(`layers`),this._referenceSpace=await e.requestReferenceSpace(this.getReferenceSpaceType()),this._sessionUsesLayers)for(let e of this._layers)e.plane.material=new yi({color:16777215,side:+(e.type===`cylinder`)}),e.plane.material.blending=5,e.plane.material.blendEquation=100,e.plane.material.blendSrc=200,e.plane.material.blendDst=200,e.xrlayer=this._createXRLayer(e),l.unshift(e.xrlayer);e.updateRenderState({layers:l})}else{await t.backend.makeXRCompatible(),this.setFoveation(this.getFoveation());let r={antialias:t.currentSamples>0,alpha:!0,depth:t.depth,stencil:t.stencil,framebufferScaleFactor:this.getFramebufferScaleFactor()},i=new XRWebGLLayer(e,n,r);this._glBaseLayer=i,e.updateRenderState({baseLayer:i}),t.setPixelRatio(1),t._setXRLayerSize(i.framebufferWidth,i.framebufferHeight),this._xrRenderTarget=new kA(i.framebufferWidth,i.framebufferHeight,{format:re,type:p,colorSpace:t.outputColorSpace,stencilBuffer:t.stencil,resolveDepthBuffer:i.ignoreDepthValues===!1,resolveStencilBuffer:i.ignoreDepthValues===!1}),this._xrRenderTarget._isOpaqueFramebuffer=!0,this._referenceSpace=await e.requestReferenceSpace(this.getReferenceSpaceType())}t._animation.setAnimationLoop(this._onAnimationFrame),t._animation.setContext(e),t._animation.start(),this.isPresenting=!0,this.dispatchEvent({type:`sessionstart`})}}updateCamera(e){let t=this._session;if(t===null)return;let n=e.near,r=e.far,i=this._cameraXR,a=this._cameraL,o=this._cameraR;i.near=o.near=a.near=n,i.far=o.far=a.far=r,i.isMultiViewCamera=this._useMultiview,(this._currentDepthNear!==i.near||this._currentDepthFar!==i.far)&&(t.updateRenderState({depthNear:i.near,depthFar:i.far}),this._currentDepthNear=i.near,this._currentDepthFar=i.far),i.layers.mask=e.layers.mask|6,a.layers.mask=i.layers.mask&-5,o.layers.mask=i.layers.mask&-3;let s=e.parent,c=i.cameras;FA(i,s);for(let e=0;e=0&&(n[a]=null,t[a].disconnect(i))}for(let r=0;r=n.length){n.push(i),a=e;break}else if(n[e]===null){n[e]=i,a=e;break}if(a===-1)break}let o=t[a];o&&o.connect(i)}}function BA(e){return e.type===`quad`?this._glBinding.createQuadLayer({transform:new XRRigidTransform(e.translation,e.quaternion),width:e.width/2,height:e.height/2,space:this._referenceSpace,viewPixelWidth:e.pixelwidth,viewPixelHeight:e.pixelheight,clearOnAccess:!1}):this._glBinding.createCylinderLayer({transform:new XRRigidTransform(e.translation,e.quaternion),radius:e.radius,centralAngle:e.centralAngle,aspectRatio:e.aspectRatio,space:this._referenceSpace,viewPixelWidth:e.pixelwidth,viewPixelHeight:e.pixelheight,clearOnAccess:!1})}function VA(e,t){if(t===void 0)return;let n=this._cameraXR,r=this._renderer,i=r.backend,a=this._glBaseLayer,o=this.getReferenceSpace(),s=t.getViewerPose(o);if(this._xrFrame=t,s!==null){let e=s.views,t=this._isWebGPUSession()?this._getWebGPUViewData(e):null;this._glBaseLayer!==null&&t===null&&i.setXRTarget(a.framebuffer);let o=!1;e.length!==n.cameras.length&&(n.cameras.length=0,o=!0);for(let r=0;r{await this.compileAsync(n,t,e);let r=this.needsFrameBufferTarget&&this._renderTarget===null?this._getFrameBufferTarget():this._renderTarget||this._outputRenderTarget,i=this._renderLists.get(e,t),a=this._renderContexts.get(r,this._mrt),o=e.overrideMaterial||n.material,{fragmentShader:s,vertexShader:c}=this._objects.get(n,o,e,t,i.lightsNode,a,a.clippingContext).getNodeBuilderState();return{fragmentShader:s,vertexShader:c}}}}async init(){return this._initPromise===null&&(this._initPromise=new Promise(async(e,t)=>{let n=this.backend;try{await n.init(this)}catch(e){if(this._getFallback!==null)try{this.backend=n=this._getFallback(e),await n.init(this)}catch(e){t(e);return}else{t(e);return}}this._nodes=new yA(this,n),this._animation=new zx(this,this._nodes,this.info),this._attributes=new Qx(n,this.info),this._background=new dk(this,this._nodes),this._geometries=new nS(this._attributes,this.info),this._textures=new CS(this,n,this.info),this._pipelines=new lS(n,this._nodes,this.info),this._bindings=new uS(n,this._nodes,this._textures,this._attributes,this._pipelines,this.info),this._objects=new Kx(this,this._nodes,this._geometries,this._pipelines,this._bindings,this.info),this._renderLists=new _S(this.lighting),this._bundles=new wA,this._renderContexts=new xS(this),this._animation.start(),this._initialized=!0,this._inspector.init(),e(this)})),this._initPromise}get domElement(){return this._canvasTarget.domElement}get coordinateSystem(){return this.backend.coordinateSystem}async compileAsync(e,t,n=null){if(this._isDeviceLost===!0)return;this._initialized===!1&&await this.init();let r=this._nodes.nodeFrame,i=r.renderId,a=this._currentRenderContext,o=this._currentRenderObjectFunction,s=this._handleObjectFunction,c=this._compilationPromises;n===null&&(n=e);let l=e.isScene===!0?e:n.isScene===!0?n:UA,u=this.needsFrameBufferTarget&&this._renderTarget===null?this._getFrameBufferTarget():this._renderTarget||this._outputRenderTarget,d=this._renderContexts.get(u,this._mrt),f=this._activeMipmapLevel,p=[];this._currentRenderContext=d,this._currentRenderObjectFunction=this.renderObject,this._handleObjectFunction=this._createObjectPipeline,this._compilationPromises=p,r.renderId++,r.update(),d.depth=this.depth,d.stencil=this.stencil,d.clippingContext||=new xA,d.clippingContext.updateGlobal(l,t),e.matrixWorldAutoUpdate===!0&&e.updateMatrixWorld(),t=this._updateCamera(t),l.onBeforeRender(this,e,t,u);let m=t.isArrayCamera?qA:KA;t.isArrayCamera?m.setFromArrayCamera(t):(JA.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),m.setFromProjectionMatrix(JA,t.coordinateSystem,t.reversedDepth));let h=this._renderLists.get(l,t);if(h.begin(),this._projectObject(e,t,0,h,d.clippingContext),n!==e&&n.traverseVisible(function(e){e.isLight&&e.layers.test(t.layers)&&h.pushLight(e)}),h.finish(),u!==null){this._textures.updateRenderTarget(u,f);let e=this._textures.get(u);d.textures=e.textures,d.depthTexture=e.depthTexture}else d.textures=null,d.depthTexture=null;n===e?this._background.update(l,h,d):this._background.update(n,h,d);let g=h.opaque,_=h.transparent,v=h.transparentDoublePass,y=h.lightsNode;this.opaque===!0&&g.length>0&&this._renderObjects(g,t,l,y),this.transparent===!0&&_.length>0&&this._renderTransparents(_,v,t,l,y),r.renderId=i,this._currentRenderContext=a,this._currentRenderObjectFunction=o,this._handleObjectFunction=s,this._compilationPromises=c;for(let e of p){let t=this._objects.get(e.object,e.material,e.scene,e.camera,e.lightsNode,e.renderContext,e.clippingContext,e.passId);t.drawRange=e.object.geometry.drawRange,t.group=e.group,await this._nodes.getForRenderAsync(t),this._nodes.updateBefore(t),this._geometries.updateForRender(t),this._nodes.updateForRender(t),this._bindings.updateForRender(t);let n=[];this._pipelines.getForRender(t,n),n.length>0&&await Promise.all(n),this._nodes.updateAfter(t),await Et()}}async renderAsync(e,t){Tt(`Renderer: "renderAsync()" has been deprecated. Use "render()" and "await renderer.init();" when creating the renderer.`),await this.init(),this.render(e,t)}async waitForGPU(){E(`Renderer: waitForGPU() has been removed. Read https://github.com/mrdoob/three.js/issues/32012 for more information.`)}set inspector(e){this._inspector!==null&&this._inspector.setRenderer(null),this._inspector=e,this._inspector.setRenderer(this)}get inspector(){return this._inspector}set highPrecision(e){let t=this.contextNode.value;e===!0?(t.modelViewMatrix=Xm,t.modelNormalViewMatrix=Zm):this.highPrecision&&(delete t.modelViewMatrix,delete t.modelNormalViewMatrix)}get highPrecision(){let e=this.contextNode.value;return e.modelViewMatrix===Xm&&e.modelNormalViewMatrix===Zm}setMRT(e){return this._mrt=e,this}getMRT(){return this._mrt}getOutputBufferType(){return this._outputBufferType}getColorBufferType(){return Tt(`Renderer: ".getColorBufferType()" has been renamed to ".getOutputBufferType()".`),this.getOutputBufferType()}_onDeviceLost(e){let t=`THREE.WebGPURenderer: ${e.api} Device Lost:\n\nMessage: ${e.message}`;e.reason&&(t+=`\nReason: ${e.reason}`),E(t),this._isDeviceLost=!0}_onError(e){let t=`WebGPURenderer: Uncaptured ${e.api} ${e.type}`;e.message&&(t+=`: ${e.message}`),E(t)}_bundleNeedsUpdate(e,t){return t.bundleGPU===void 0||e.version!==t.version}_renderBundle(e,t,n){let{bundleGroup:r,camera:i,renderList:a}=e,o=this._currentRenderContext,s=this._bundles.get(r,i,o),c=this.backend.get(s);if(this._bundleNeedsUpdate(r,c)){this.backend.beginBundle(o),this._currentRenderBundle=s;let{transparentDoublePass:e,transparent:l,opaque:u}=a;this.opaque===!0&&u.length>0&&this._renderObjects(u,i,t,n),this.transparent===!0&&l.length>0&&this._renderTransparents(l,e,i,t,n),this._currentRenderBundle=null,this.backend.finishBundle(o,s),c.version=r.version}else{let{renderObjects:e}=c;for(let t=0,n=e.length;t{c.removeEventListener(`dispose`,e),u.dispose(),this._frameBufferTargets.delete(c)};c.addEventListener(`dispose`,e),this._frameBufferTargets.set(c,u)}let d=this.getOutputRenderTarget();u.depthBuffer=o,u.stencilBuffer=s,d===null?u.setSize(i,a,1):u.setSize(d.width,d.height,d.depth);let f=this._outputRenderTarget?this._outputRenderTarget.viewport:c._viewport,p=this._outputRenderTarget?this._outputRenderTarget.scissor:c._scissor,m=this._outputRenderTarget?1:c._pixelRatio,h=this._outputRenderTarget?this._outputRenderTarget.scissorTest:c._scissorTest;return u.viewport.copy(f),u.scissor.copy(p),u.viewport.multiplyScalar(m),u.scissor.multiplyScalar(m),u.scissorTest=h,u.multiview=d!==null&&d.multiview,u.useArrayDepthTexture=d!==null&&d.useArrayDepthTexture,u.resolveDepthBuffer=d===null||d.resolveDepthBuffer,u._autoAllocateDepthBuffer=d!==null&&d._autoAllocateDepthBuffer,u}_renderScene(e,t,n=!0){if(this._isDeviceLost===!0)return;let r=n?this._getFrameBufferTarget():null,i=this._nodes.nodeFrame,a=i.renderId,o=this._currentRenderContext,s=this._currentRenderObjectFunction,c=this._handleObjectFunction;this.lighting.beginRender(e),this._callDepth++;let l=e.isScene===!0?e:UA,u=this._renderTarget||this._outputRenderTarget,d=this._activeCubeFace,f=this._activeMipmapLevel,p;if(r===null?p=u:(p=r,this.setRenderTarget(p)),p!==null&&p.depthBuffer===!0){let e=this._textures.get(p);e.depthInitialized!==!0&&((this.autoClear===!1||this.autoClear===!0&&this.autoClearDepth===!1)&&this.clearDepth(),e.depthInitialized=!0)}let m=this._renderContexts.get(p,this._mrt,this._callDepth);this._currentRenderContext=m,this._currentRenderObjectFunction=this._renderObjectFunction||this.renderObject,this._handleObjectFunction=this._renderObjectDirect,this.info.calls++,this.info.render.calls++,this.info.render.frameCalls++,i.renderId=this.info.calls,this.backend.updateTimeStampUID(m),this.inspector.beginRender(this.backend.getTimestampUID(m),e,t,p),e.matrixWorldAutoUpdate===!0&&e.updateMatrixWorld(),t=this._updateCamera(t);let h=this._canvasTarget,g=h._viewport,_=h._scissor,v=h._pixelRatio;p!==null&&(g=p.viewport,_=p.scissor,v=1),this.getDrawingBufferSize(WA),GA.set(0,0,WA.width,WA.height);let y=g.minDepth===void 0?0:g.minDepth,b=g.maxDepth===void 0?1:g.maxDepth;m.viewportValue.copy(g).multiplyScalar(v).floor(),m.viewportValue.width>>=f,m.viewportValue.height>>=f,m.viewportValue.minDepth=y,m.viewportValue.maxDepth=b,m.viewport=m.viewportValue.equals(GA)===!1,m.scissorValue.copy(_).multiplyScalar(v).floor(),m.scissor=h._scissorTest&&m.scissorValue.equals(GA)===!1,m.scissorValue.width>>=f,m.scissorValue.height>>=f,m.clippingContext||=new xA,m.clippingContext.updateGlobal(l,t),l.onBeforeRender(this,e,t,p);let x=t.isArrayCamera?qA:KA;t.isArrayCamera?x.setFromArrayCamera(t):(JA.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),x.setFromProjectionMatrix(JA,t.coordinateSystem,t.reversedDepth));let S=this._renderLists.get(e,t);if(S.begin(),this._projectObject(e,t,0,S,m.clippingContext),S.finish(),this.sortObjects===!0&&S.sort(this._opaqueSort,this._transparentSort,t.reversedDepth),p!==null){this._textures.updateRenderTarget(p,f);let e=this._textures.get(p);m.textures=e.textures,m.depthTexture=e.depthTexture,m.width=e.width,m.height=e.height,m.renderTarget=p,m.depth=p.depthBuffer,m.stencil=p.stencilBuffer}else m.textures=null,m.depthTexture=null,m.width=WA.width,m.height=WA.height,m.depth=this.depth,m.stencil=this.stencil;m.width>>=f,m.height>>=f,m.activeCubeFace=d,m.activeMipmapLevel=f,m.occlusionQueryCount=S.occlusionQueryCount,m.scissorValue.max(YA.set(0,0,0,0)),m.scissorValue.x+m.scissorValue.width>m.width&&(m.scissorValue.width=Math.max(m.width-m.scissorValue.x,0)),m.scissorValue.y+m.scissorValue.height>m.height&&(m.scissorValue.height=Math.max(m.height-m.scissorValue.y,0)),this._background.update(l,S,m),m.camera=t,this.backend.beginRender(m);let{bundles:C,lightsNode:ee,transparentDoublePass:te,transparent:w,opaque:ne}=S;return C.length>0&&this._renderBundles(C,l,ee),this.opaque===!0&&ne.length>0&&this._renderObjects(ne,t,l,ee),this.transparent===!0&&w.length>0&&this._renderTransparents(w,te,t,l,ee),this.backend.finishRender(m),i.renderId=a,this._currentRenderContext=o,this._currentRenderObjectFunction=s,this._handleObjectFunction=c,this.lighting.finishRender(e),this._callDepth--,r!==null&&(this.setRenderTarget(u,d,f),this._renderOutput(p)),l.onAfterRender(this,e,t,p),this.inspector.finishRender(this.backend.getTimestampUID(m)),m}_setXRLayerSize(e,t){this._canvasTarget._width=e,this._canvasTarget._height=t,this.setViewport(0,0,e,t)}_renderOutput(e){let t=this._nodes.getOutputCacheKey(),n=this._quadCache.get(e.texture),r;if(n===void 0){r=new ZC(new Av),r.name=`Output Color Transform`,r.material.name=`outputColorTransform`,r.material.fragmentNode=this._nodes.getOutputNode(e.texture),n={quad:r,cacheKey:t},this._quadCache.set(e.texture,n);let i=()=>{r.material.dispose(),this._quadCache.delete(e.texture),e.texture.removeEventListener(`dispose`,i)};e.texture.addEventListener(`dispose`,i)}else r=n.quad,n.cacheKey!==t&&(r.material.fragmentNode=this._nodes.getOutputNode(e.texture),r.material.needsUpdate=!0,n.cacheKey=t);let i=this.autoClear,a=this.xr.enabled;this.autoClear=!1,this.xr.enabled=!1,this._renderOutputLayers(r,e),this.autoClear=i,this.xr.enabled=a}getMaxAnisotropy(){return this.backend.capabilities.getMaxAnisotropy()}getActiveCubeFace(){return this._activeCubeFace}getActiveMipmapLevel(){return this._activeMipmapLevel}async setAnimationLoop(e){this._initialized===!1&&await this.init(),this._animation.setAnimationLoop(e)}getAnimationLoop(){return this._animation.getAnimationLoop()}async getArrayBufferAsync(e,t=null,n=0,r=-1){if(t!==null&&t.isReadbackBuffer&&this.info.memoryMap.has(t)===!1){this.info.createReadbackBuffer(t);let e=()=>{t.removeEventListener(`dispose`,e),this.info.destroyReadbackBuffer(t)};t.addEventListener(`dispose`,e)}if(n%4!=0||r>0&&r%4!=0)throw Error(`THREE.Renderer: "getArrayBufferAsync()" offset and count must be a multiple of 4.`);return await this.backend.getArrayBufferAsync(e,t,n,r)}getContext(){return this.backend.getContext()}getPixelRatio(){return this._canvasTarget.getPixelRatio()}getDrawingBufferSize(e){return this._canvasTarget.getDrawingBufferSize(e)}getSize(e){return this._canvasTarget.getSize(e)}setPixelRatio(e=1){this._canvasTarget.setPixelRatio(e)}setDrawingBufferSize(e,t,n){this.xr&&this.xr.isPresenting||this._canvasTarget.setDrawingBufferSize(e,t,n)}setSize(e,t,n=!0){this.xr&&this.xr.isPresenting||this._canvasTarget.setSize(e,t,n)}setOpaqueSort(e){this._opaqueSort=e}setTransparentSort(e){this._transparentSort=e}getScissor(e){return this._canvasTarget.getScissor(e)}setScissor(e,t,n,r){this._canvasTarget.setScissor(e,t,n,r)}getScissorTest(){return this._canvasTarget.getScissorTest()}setScissorTest(e){this._canvasTarget.setScissorTest(e),this.backend.setScissorTest(e)}getViewport(e){return this._canvasTarget.getViewport(e)}setViewport(e,t,n,r,i=0,a=1){this._canvasTarget.setViewport(e,t,n,r,i,a)}getClearColor(e){return e.copy(this._clearColor)}setClearColor(e,t=1){this._clearColor.set(e),this._clearColor.a=t}getClearAlpha(){return this._clearColor.a}setClearAlpha(e){this._clearColor.a=e}getClearDepth(){return this.reversedDepthBuffer===!0?1-this._clearDepth:this._clearDepth}setClearDepth(e){this._clearDepth=e}getClearStencil(){return this._clearStencil}setClearStencil(e){this._clearStencil=e}isOccluded(e){let t=this._currentRenderContext;return t&&this.backend.isOccluded(t,e)}clear(e=!0,t=!0,n=!0){if(this._initialized===!1)throw Error(`THREE.Renderer: .clear() called before the backend is initialized. Use "await renderer.init();" before using this method.`);let r=this._renderTarget||this._getFrameBufferTarget(),i=null;if(r!==null){this._textures.updateRenderTarget(r);let e=this._textures.get(r);i=this._renderContexts.get(r,null,-1),i.textures=e.textures,i.depthTexture=e.depthTexture,i.width=e.width,i.height=e.height,i.renderTarget=r,i.depth=r.depthBuffer,i.stencil=r.stencilBuffer;let t=this.backend.getClearColor();i.clearColorValue.r=t.r,i.clearColorValue.g=t.g,i.clearColorValue.b=t.b,i.clearColorValue.a=t.a,i.clearDepthValue=this.getClearDepth(),i.clearStencilValue=this.getClearStencil(),i.activeCubeFace=this.getActiveCubeFace(),i.activeMipmapLevel=this.getActiveMipmapLevel(),r.depthBuffer===!0&&(e.depthInitialized=!0)}this.backend.clear(e,t,n,i),r!==null&&this._renderTarget===null&&this._renderOutput(r)}clearColor(){this.clear(!0,!1,!1)}clearDepth(){this.clear(!1,!0,!1)}clearStencil(){this.clear(!1,!1,!0)}async clearAsync(e=!0,t=!0,n=!0){Tt(`Renderer: "clearAsync()" has been deprecated. Use "clear()" and "await renderer.init();" when creating the renderer.`),await this.init(),this.clear(e,t,n)}async clearColorAsync(){Tt(`Renderer: "clearColorAsync()" has been deprecated. Use "clearColor()" and "await renderer.init();" when creating the renderer.`),this.clear(!0,!1,!1)}async clearDepthAsync(){Tt(`Renderer: "clearDepthAsync()" has been deprecated. Use "clearDepth()" and "await renderer.init();" when creating the renderer.`),this.clear(!1,!0,!1)}async clearStencilAsync(){Tt(`Renderer: "clearStencilAsync()" has been deprecated. Use "clearStencil()" and "await renderer.init();" when creating the renderer.`),this.clear(!1,!1,!0)}get needsFrameBufferTarget(){let e=this.currentToneMapping!==0,t=this.currentColorSpace!==un.workingColorSpace;return e||t}get samples(){return this._samples}get currentSamples(){let e=this._samples;return this._renderTarget===null?this.needsFrameBufferTarget&&(e=0):e=this._renderTarget.samples,e}get currentToneMapping(){return this.isOutputTarget?this.toneMapping:0}get currentColorSpace(){return this.isOutputTarget?this.outputColorSpace:un.workingColorSpace}get isOutputTarget(){return this._renderTarget===this._outputRenderTarget||this._renderTarget===null}dispose(){if(this._initialized===!0){this.info.dispose(),this.backend.dispose(),this._animation.dispose(),this._objects.dispose(),this._geometries.dispose(),this._pipelines.dispose(),this._nodes.dispose(),this._bindings.dispose(),this._renderLists.dispose(),this._renderContexts.dispose(),this._textures.dispose();for(let e of this._frameBufferTargets.keys())e.dispose();Object.values(this.backend.timestampQueryPool).forEach(e=>{e!==null&&e.dispose()})}this.setRenderTarget(null),this.setAnimationLoop(null)}setRenderTarget(e,t=0,n=0){this._renderTarget=e,this._activeCubeFace=t,this._activeMipmapLevel=n}getRenderTarget(){return this._renderTarget}setOutputRenderTarget(e){this._outputRenderTarget=e}getOutputRenderTarget(){return this._outputRenderTarget}setCanvasTarget(e){this._canvasTarget.removeEventListener(`resize`,this._onCanvasTargetResize),this._canvasTarget=e,this._canvasTarget.addEventListener(`resize`,this._onCanvasTargetResize)}getCanvasTarget(){return this._canvasTarget}_resetXRState(){this.backend.setXRTarget(null),this.setOutputRenderTarget(null),this.setRenderTarget(null);for(let e of this._frameBufferTargets.keys())e.dispose()}setRenderObjectFunction(e){this._renderObjectFunction=e}getRenderObjectFunction(){return this._renderObjectFunction}compute(e,t=null){if(this._isDeviceLost===!0)return;if(this._initialized===!1)return T(`Renderer: .compute() called before the backend is initialized. Try using .computeAsync() instead.`),this.computeAsync(e,t);let n=this._nodes.nodeFrame,r=n.renderId;this.info.calls++,this.info.compute.calls++,this.info.compute.frameCalls++,n.renderId=this.info.calls,this.backend.updateTimeStampUID(e),this.inspector.beginCompute(this.backend.getTimestampUID(e),e);let i=this.backend,a=this._pipelines,o=this._bindings,s=this._nodes,c=Array.isArray(e)?e:[e];if(c[0]===void 0||c[0].isComputeNode!==!0)throw Error(`THREE.Renderer: .compute() expects a ComputeNode.`);i.beginCompute(e);for(let n of c){if(a.has(n)===!1){let e=()=>{n.removeEventListener(`dispose`,e),a.delete(n),o.deleteForCompute(n),s.delete(n)};n.addEventListener(`dispose`,e);let t=n.onInitFunction;t!==null&&t.call(n,{renderer:this})}s.updateForCompute(n),o.updateForCompute(n);let r=o.getForCompute(n),c=a.getForCompute(n,r);i.compute(e,n,r,c,t)}i.finishCompute(e),n.renderId=r,this.inspector.finishCompute(this.backend.getTimestampUID(e))}async computeAsync(e,t=null){this._initialized===!1&&await this.init(),this.compute(e,t)}async hasFeatureAsync(e){return Tt(`Renderer: "hasFeatureAsync()" has been deprecated. Use "hasFeature()" and "await renderer.init();" when creating the renderer.`),await this.init(),this.hasFeature(e)}async resolveTimestampsAsync(e=`render`){return this._initialized===!1&&await this.init(),this.backend.resolveTimestampsAsync(e)}hasFeature(e){if(this._initialized===!1)throw Error(`THREE.Renderer: .hasFeature() called before the backend is initialized. Use "await renderer.init();" before using this method.`);return this.backend.hasFeature(e)}hasInitialized(){return this._initialized}async initTextureAsync(e){Tt(`Renderer: "initTextureAsync()" has been deprecated. Use "initTexture()" and "await renderer.init();" when creating the renderer.`),await this.init(),this.initTexture(e)}initTexture(e){if(this._initialized===!1)throw Error(`THREE.Renderer: .initTexture() called before the backend is initialized. Use "await renderer.init();" before using this method.`);this._textures.updateTexture(e)}initRenderTarget(e){if(this._initialized===!1)throw Error(`THREE.Renderer: .initRenderTarget() called before the backend is initialized. Use "await renderer.init();" before using this method.`);this._textures.updateRenderTarget(e);let t=this._textures.get(e),n=this._renderContexts.get(e);n.textures=t.textures,n.depthTexture=t.depthTexture,n.width=t.width,n.height=t.height,n.renderTarget=e,n.depth=e.depthBuffer,n.stencil=e.stencilBuffer,this.backend.initRenderTarget(n)}copyFramebufferToTexture(e,t=null){if(t!==null)if(t.isVector2)t=YA.set(t.x,t.y,e.image.width,e.image.height).floor();else if(t.isVector4)t=YA.copy(t).floor();else{E(`Renderer.copyFramebufferToTexture: Invalid rectangle.`);return}else t=YA.set(0,0,e.image.width,e.image.height);let n=this._currentRenderContext,r;n===null?(r=this._renderTarget||this._getFrameBufferTarget(),r!==null&&(this._textures.updateRenderTarget(r),n=this._textures.get(r))):r=n.renderTarget,this._textures.updateTexture(e,{renderTarget:r}),this.backend.copyFramebufferToTexture(e,n,t),this._inspector.copyFramebufferToTexture(e)}copyTextureToTexture(e,t,n=null,r=null,i=0,a=0){this._textures.updateTexture(e),this._textures.updateTexture(t),this.backend.copyTextureToTexture(e,t,n,r,i,a),this._inspector.copyTextureToTexture(e,t)}async readRenderTargetPixelsAsync(e,t,n,r,i,a=0,o=0){return this.backend.copyTextureToBuffer(e.textures[a],t,n,r,i,o)}_projectObject(e,t,n,r,i){if(e.visible===!1)return;if(e.layers.test(t.layers)){if(e.isGroup)n=e.renderOrder,e.isClippingGroup&&e.enabled&&(i=i.getGroupContext(e));else if(e.isLOD)e.autoUpdate===!0&&e.update(t);else if(e.isLight)r.pushLight(e);else if(e.isSprite){let a=t.isArrayCamera?qA:KA;if(!e.frustumCulled||a.intersectsSprite(e)){this.sortObjects===!0&&YA.setFromMatrixPosition(e.matrixWorld).applyMatrix4(JA);let{geometry:t,material:a}=e;a.visible&&r.push(e,t,a,n,YA.z,null,i)}}else if(e.isLineLoop)E(`Renderer: Objects of type THREE.LineLoop are not supported. Please use THREE.Line or THREE.LineSegments.`);else if(e.isMesh||e.isLine||e.isPoints){let a=t.isArrayCamera?qA:KA;if(!e.frustumCulled||a.intersectsObject(e)){let{geometry:t,material:a}=e;if(this.sortObjects===!0&&(t.boundingSphere===null&&t.computeBoundingSphere(),YA.copy(t.boundingSphere.center).applyMatrix4(e.matrixWorld).applyMatrix4(JA)),Array.isArray(a)){let o=t.groups;for(let s=0,c=o.length;s0){for(let{material:e}of t)e.side=1;this._renderObjects(t,n,r,i,`backSide`);for(let{material:e}of t)e.side=0;this._renderObjects(e,n,r,i);for(let{material:e}of t)e.side=2}else this._renderObjects(e,n,r,i)}_renderObjects(e,t,n,r,i=null){for(let a=0,o=e.length;a(t.not().discard(),e))(c)}}e.depthNode&&e.depthNode.isNode&&(l=e.depthNode),e.castShadowPositionNode&&e.castShadowPositionNode.isNode?s=e.castShadowPositionNode:e.positionNode&&e.positionNode.isNode&&(s=e.positionNode),n={version:t,colorNode:c,depthNode:l,positionNode:s},this._cacheShadowNodes.set(e,n)}return n}_updateCamera(e){let t=this.xr;if(t.isPresenting===!1){let t=!1;if(this.reversedDepthBuffer===!0&&e.reversedDepth!==!0){if(e._reversedDepth=!0,e.isArrayCamera)for(let t of e.cameras)t._reversedDepth=!0;t=!0}let n=this.coordinateSystem;if(e.coordinateSystem!==n){if(e.coordinateSystem=n,e.isArrayCamera)for(let t of e.cameras)t.coordinateSystem=n;t=!0}if(t===!0&&(e.updateProjectionMatrix(),e.isArrayCamera))for(let t of e.cameras)t.updateProjectionMatrix()}return e.parent===null&&e.matrixWorldAutoUpdate===!0&&e.updateMatrixWorld(),t.enabled===!0&&t.isPresenting===!0&&(t.cameraAutoUpdate===!0&&t.updateCamera(e),e=t.getCamera()),e}renderObject(e,t,n,r,i,a,o,s=null,c=null){let l=!1,u,d,f,p,m,h,g,_=this._currentSourceMaterial;if(e.onBeforeRender(this,t,n,r,i,a),i.allowOverride===!0&&t.overrideMaterial!==null){this._currentSourceMaterial=i;let e=t.overrideMaterial;if(l=!0,u=e.isNodeMaterial?e.colorNode:null,d=e.isNodeMaterial?e.depthNode:null,f=e.isNodeMaterial?e.positionNode:null,p=t.overrideMaterial.side,m=e.displacementMap,h=e.displacementScale,g=e.displacementBias,i.positionNode&&i.positionNode.isNode&&(e.positionNode=i.positionNode),e.alphaTest=i.alphaTest,e.alphaMap=i.alphaMap,e.displacementMap=i.displacementMap,e.displacementScale=i.displacementScale,e.displacementBias=i.displacementBias,e.transparent=i.transparent||i.transmission>0||i.transmissionNode&&i.transmissionNode.isNode||i.backdropNode&&i.backdropNode.isNode,e.isShadowPassMaterial){let{colorNode:t,depthNode:n,positionNode:r}=this._getShadowNodes(i);this.shadowMap.type===3?e.side=i.shadowSide===null?i.side:i.shadowSide:e.side=i.shadowSide===null?XA[i.side]:i.shadowSide,t!==null&&(e.colorNode=t),n!==null&&(e.depthNode=n),r!==null&&(e.positionNode=r)}i=e}i.transparent===!0&&i.side===2&&i.forceSinglePass===!1?(i.side=1,this._handleObjectFunction(e,i,t,n,o,a,s,`backSide`),i.side=0,this._handleObjectFunction(e,i,t,n,o,a,s,c),i.side=2):this._handleObjectFunction(e,i,t,n,o,a,s,c),l&&(t.overrideMaterial.colorNode=u,t.overrideMaterial.depthNode=d,t.overrideMaterial.positionNode=f,t.overrideMaterial.side=p,t.overrideMaterial.displacementMap=m,t.overrideMaterial.displacementScale=h,t.overrideMaterial.displacementBias=g),this._currentSourceMaterial=_,e.onAfterRender(this,t,n,r,i,a)}hasCompatibility(e){if(this._initialized===!1)throw Error(`THREE.Renderer: .hasCompatibility() called before the backend is initialized. Use "await renderer.init();" before using this method.`);return this.backend.hasCompatibility(e)}_renderObjectDirect(e,t,n,r,i,a,o,s){let c=this._objects.get(e,t,n,r,i,this._currentRenderContext,o,s);c.drawRange=e.geometry.drawRange,c.group=a,this._currentRenderBundle!==null&&(this.backend.get(this._currentRenderBundle).renderObjects.push(c),c.bundle=this._currentRenderBundle.bundleGroup);let l=this._nodes.needsRefresh(c);l&&(this._nodes.updateBefore(c),this._geometries.updateForRender(c),this._nodes.updateForRender(c),this._bindings.updateForRender(c)),this._pipelines.updateForRender(c),this._pipelines.isReady(c)&&(this.backend.draw(c,this.info),l&&this._nodes.updateAfter(c))}_createObjectPipeline(e,t,n,r,i,a,o,s){if(this._compilationPromises!==null){this._compilationPromises.push({object:e,material:t,scene:n,camera:r,lightsNode:i,group:a,clippingContext:o,passId:s,renderContext:this._currentRenderContext});return}let c=this._objects.get(e,t,n,r,i,this._currentRenderContext,o,s);c.drawRange=e.geometry.drawRange,c.group=a,this._nodes.updateBefore(c),this._geometries.updateForRender(c),this._nodes.updateForRender(c),this._bindings.updateForRender(c),this._pipelines.getForRender(c,this._compilationPromises),this._nodes.updateAfter(c)}_onCanvasTargetResize(){this._initialized&&this.backend.updateSize()}get compile(){return this.compileAsync}},QA=class{constructor(e=``){this.name=e,this.visibility=0}setVisibility(e){this.visibility|=e}getVisibility(){return this.visibility}clone(){return Object.assign(new this.constructor,this)}};function $A(e){return e+(Yx-e%Yx)%Yx}var ej=class extends QA{constructor(e,t=null){super(e),this.isBuffer=!0,this.bytesPerElement=Float32Array.BYTES_PER_ELEMENT,this._buffer=t,this._updateRanges=[]}get updateRanges(){return this._updateRanges}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}get byteLength(){return $A(this._buffer.byteLength)}get buffer(){return this._buffer}update(){return!0}release(){this._buffer=null}},tj=class extends ej{constructor(e,t=null){super(e,t),this.isUniformBuffer=!0}},nj=0,rj=class extends tj{constructor(e,t){super(`UniformBuffer_`+nj++,e?e.value:null),this.nodeUniform=e,this.groupNode=t,this.isNodeUniformBuffer=!0}set updateRanges(e){this.nodeUniform.updateRanges=e}get updateRanges(){return this.nodeUniform.updateRanges}addUpdateRange(e,t){this.nodeUniform.addUpdateRange(e,t)}clearUpdateRanges(){this.nodeUniform.clearUpdateRanges()}get byteLength(){return $A(this.buffer.byteLength)}get buffer(){return this.nodeUniform.value}},ij=class extends tj{constructor(e){super(e),this.isUniformsGroup=!0,this._values=null,this.uniforms=[],this._updateRangeCache=new Map,this._addedIndices=new Set}addUniformUpdateRange(e){let t=e.index;if(this._addedIndices.has(t))return;let n=this._updateRangeCache.get(t);n===void 0&&(n={start:0,count:0},this._updateRangeCache.set(t,n)),n.start=e.offset,n.count=e.itemSize,this._addedIndices.add(t),this.updateRanges.push(n)}clearUpdateRanges(){this._addedIndices.clear(),super.clearUpdateRanges()}addUniform(e){return this.uniforms.push(e),this}removeUniform(e){let t=this.uniforms.indexOf(e);return t!==-1&&this.uniforms.splice(t,1),this}get values(){return this._values===null&&(this._values=Array.from(this.buffer)),this._values}get buffer(){let e=this._buffer;if(e===null){let t=this.byteLength;e=new Float32Array(new ArrayBuffer(t)),this._buffer=e}return e}get byteLength(){let e=this.bytesPerElement,t=0;for(let n=0,r=this.uniforms.length;n0?i:``;t=`${n.name} {\n\t${r} ${e.name}[${a}];\n};\n`}else{let t=e.groupNode.name;if(r[t]===void 0){let e=this.uniformGroups[t];if(e!==void 0){let n=[];for(let t of e.uniforms){let e=t.getType(),r=this.getVectorType(e),i=t.nodeUniform.node.precision,a=`${r} ${t.name};`;i!==null&&(a=_j[i]+` `+a),n.push(` `+a)}r[t]=n}}i=!0}if(!i){let r=e.node.precision;r!==null&&(t=_j[r]+` `+t),t=`uniform `+t,n.push(t)}}let i=``;for(let e in r){let t=r[e];i+=this._getGLSLUniformStruct(e,t.join(` -`))+` -`}return i+=n.join(` -`),i}getTypeFromAttribute(e){let t=super.getTypeFromAttribute(e);if(/^[iu]/.test(t)&&e.gpuType!==1013){let n=e;e.isInterleavedBufferAttribute&&(n=e.data);let r=n.array;r instanceof Uint32Array||r instanceof Int32Array||(t=t.slice(1))}return t}getAttributes(e){let t=``;if(e===`vertex`||e===`compute`){let e=this.getAttributesArray(),n=0;for(let r of e)t+=`layout( location = ${n++} ) in ${r.type} ${r.name};\n`}return t}getStructMembers(e){let t=[];for(let n of e.members)t.push(`\t${n.type} ${n.name};`);return t.join(` -`)}getStructs(e){let t=[],n=this.structs[e],r=[];for(let e of n)if(e.output)for(let t of e.members)r.push(`layout( location = ${t.index} ) out ${t.type} ${t.name};`);else{let n=`struct `+e.name+` { -`;n+=this.getStructMembers(e),n+=` -}; -`,t.push(n)}return e===`fragment`&&r.length===0&&r.push(`layout( location = 0 ) out ${this.getOutputType()} fragColor;`),` -`+r.join(` -`)+` - -`+t.join(` -`)}getVaryings(e){let t=``,n=this.varyings;if(e===`vertex`||e===`compute`)for(let r of n){e===`compute`&&(r.needsInterpolation=!0);let n=this.getType(r.type);if(r.needsInterpolation)if(r.interpolationType){let e=yj[r.interpolationType]||r.interpolationType,i=bj[r.interpolationSampling]||``;t+=`${e} ${i} out ${n} ${r.name};\n`}else{let e=n.includes(`int`)||n.includes(`uv`)||n.includes(`iv`)?`flat `:``;t+=`${e}out ${n} ${r.name};\n`}else t+=`${n} ${r.name};\n`}else if(e===`fragment`){for(let e of n)if(e.needsInterpolation){let n=this.getType(e.type);if(e.interpolationType){let r=yj[e.interpolationType]||e.interpolationType,i=bj[e.interpolationSampling]||``;t+=`${r} ${i} in ${n} ${e.name};\n`}else{let r=n.includes(`int`)||n.includes(`uv`)||n.includes(`iv`)?`flat `:``;t+=`${r}in ${n} ${e.name};\n`}}}for(let n of this.builtins[e])t+=`${n};\n`;return t}getVertexIndex(){return`uint( gl_VertexID )`}getInstanceIndex(){return`uint( gl_InstanceID )`}getInvocationLocalIndex(){return`uint( gl_InstanceID ) % ${this.object.workgroupSize.reduce((e,t)=>e*t,1)}u`}getSubgroupSize(){E(`GLSLNodeBuilder: WebGLBackend does not support the subgroupSize node`)}getInvocationSubgroupIndex(){E(`GLSLNodeBuilder: WebGLBackend does not support the invocationSubgroupIndex node`)}getSubgroupIndex(){E(`GLSLNodeBuilder: WebGLBackend does not support the subgroupIndex node`)}getDrawIndex(){return this.renderer.backend.extensions.has(`WEBGL_multi_draw`)?`uint( gl_DrawID )`:`nodeUniformDrawId`}getFrontFacing(){return`gl_FrontFacing`}getFragCoord(){return`gl_FragCoord.xy`}getFragDepth(){return`gl_FragDepth`}enableExtension(e,t,n=this.shaderStage){let r=this.extensions[n]||(this.extensions[n]=new Map);r.has(e)===!1&&r.set(e,{name:e,behavior:t})}getExtensions(e){let t=[];if(e===`vertex`){let t=this.renderer.backend.extensions;this.object.isBatchedMesh&&t.has(`WEBGL_multi_draw`)&&this.enableExtension(`GL_ANGLE_multi_draw`,`require`,e)}let n=this.extensions[e];if(n!==void 0)for(let{name:e,behavior:r}of n.values())t.push(`#extension ${e} : ${r}`);return t.join(` -`)}getClipDistance(){return`gl_ClipDistance`}isAvailable(e){let t=vj[e];if(t===void 0){let n;switch(t=!1,e){case`float32Filterable`:n=`OES_texture_float_linear`;break;case`clipDistance`:n=`WEBGL_clip_cull_distance`;break}if(n!==void 0){let e=this.renderer.backend.extensions;e.has(n)&&(e.get(n),t=!0)}vj[e]=t}return t}isFlipY(){return!0}enableHardwareClipping(e){this.enableExtension(`GL_ANGLE_clip_cull_distance`,`require`),this.builtins.vertex.push(`out float gl_ClipDistance[ ${e} ]`)}enableMultiview(){this.enableExtension(`GL_OVR_multiview2`,`require`,`fragment`),this.enableExtension(`GL_OVR_multiview2`,`require`,`vertex`),this.builtins.vertex.push(`layout(num_views = 2) in`)}registerTransform(e,t){this.transforms.push({varyingName:e,attributeNode:t})}getTransforms(){let e=this.transforms,t=``;for(let n=0;n0&&(n+=` -`),n+=`\t// flow -> ${a}\n\t`),n+=`${r.code}\n\t`,e===i&&t!==`compute`&&(n+=`// result - `,t===`vertex`?(n+=`gl_Position = `,n+=`${this.format(r.result,i.getNodeType(this),`vec4`)};`):t===`fragment`&&(e.outputNode.isOutputStructNode||(n+=`fragColor = `,n+=`${this.format(r.result,i.getNodeType(this),this.getOutputType())};`)))}let a=e[t];if(a.extensions=this.getExtensions(t),a.uniforms=this.getUniforms(t),a.attributes=this.getAttributes(t),a.varyings=this.getVaryings(t),a.vars=this.getVars(t,!0),a.structs=this.getStructs(t),a.codes=this.getCodes(t),a.transforms=this.getTransforms(t),a.flow=n,t===`vertex`){let e=this.renderer.backend.extensions;this.object.isBatchedMesh&&e.has(`WEBGL_multi_draw`)===!1&&(a.uniforms+=` -uniform uint nodeUniformDrawId; -`)}}this.material===null?this.computeShader=this._getGLSLVertexCode(e.compute):(this.vertexShader=this._getGLSLVertexCode(e.vertex),this.fragmentShader=this._getGLSLFragmentCode(e.fragment))}getUniformFromNode(e,t,n,r=null){let i=super.getUniformFromNode(e,t,n,r),a=this.getDataFromNode(e,n,this.globalCache),o=a.uniformGPU;if(o===void 0){let r=e.groupNode,s=r.name,c=this.getBindGroupArray(s,n);if(t===`texture`)o=new fj(i.name,i.node,r),c.push(o);else if(t===`cubeTexture`||t===`cubeDepthTexture`)o=new pj(i.name,i.node,r),c.push(o);else if(t===`texture3D`)o=new mj(i.name,i.node,r),c.push(o);else if(t===`buffer`){i.name=`buffer${e.id}`;let t=this.getSharedDataFromNode(e),n=t.buffer;n===void 0&&(e.name=`NodeBuffer_${e.id}`,n=new rj(e,r),n.name=e.name,t.buffer=n),c.push(n),o=n}else{let e=this.uniformGroups[s];e===void 0?(e=new cj(s,r),this.uniformGroups[s]=e,c.push(e)):c.indexOf(e)===-1&&c.push(e),o=this.getNodeUniform(i,t);let n=o.name;e.uniforms.some(e=>e.name===n)||e.addUniform(o)}a.uniformGPU=o}return i}},Cj=null,wj=null,Tj=class{constructor(e={}){this.parameters=Object.assign({},e),this.data=new WeakMap,this.renderer=null,this.domElement=null,this.timestampQueryPool={[gt.RENDER]:null,[gt.COMPUTE]:null},this.trackTimestamp=e.trackTimestamp===!0}async init(e){this.renderer=e}get coordinateSystem(){}beginRender(){}finishRender(){}setXRTarget(){}beginCompute(){}finishCompute(){}draw(){}compute(){}createProgram(){}destroyProgram(){}createBindings(){}updateBindings(){}updateBinding(){}createRenderPipeline(){}createComputePipeline(){}needsRenderUpdate(){}getRenderCacheKey(){}createNodeBuilder(){}updateSampler(){}destroySampler(){}createDefaultTexture(){}createTexture(){}updateTexture(){}generateMipmaps(){}destroyTexture(){}async copyTextureToBuffer(){}copyTextureToTexture(){}copyFramebufferToTexture(){}createAttribute(){}createIndexAttribute(){}createStorageAttribute(){}createUniformBuffer(){}destroyUniformBuffer(){}updateAttribute(){}destroyAttribute(){}getContext(){}updateSize(){}updateViewport(){}updateTimeStampUID(e){let t=this.get(e),n=this.renderer.info.frame,r;r=e.isComputeNode===!0?`c:`+this.renderer.info.compute.frameCalls:`r:`+this.renderer.info.render.frameCalls,t.timestampUID=r+`:`+e.id+`:f`+n}getTimestampUID(e){return this.get(e).timestampUID}getTimestampFrames(e){let t=this.timestampQueryPool[e];return t?t.getTimestampFrames():[]}_getQueryPool(e){let t=e.startsWith(`c:`)?gt.COMPUTE:gt.RENDER;return this.timestampQueryPool[t]}getTimestamp(e){return this._getQueryPool(e).getTimestamp(e)}get hasTimestamp(){return!1}hasTimestampQuery(e){return this._getQueryPool(e).hasTimestampQuery(e)}isOccluded(){}async resolveTimestampsAsync(e=`render`){if(!this.trackTimestamp){Tt(`WebGPURenderer: Timestamp tracking is disabled.`);return}let t=this.timestampQueryPool[e];if(!t)return;let n=await t.resolveQueriesAsync();return this.renderer.info[e].timestamp=n,n}async getArrayBufferAsync(){}async hasFeatureAsync(){}hasFeature(){}getDrawingBufferSize(){return Cj||=new O,this.renderer.getDrawingBufferSize(Cj)}setScissorTest(){}getClearColor(){let e=this.renderer;return wj||=new wS,e.getClearColor(wj),wj.getRGB(wj),wj}getDomElement(){let e=this.domElement;return e===null&&(e=this.parameters.canvas===void 0?xt():this.parameters.canvas,`setAttribute`in e&&e.setAttribute(`data-engine`,`three.js r185 webgpu`),this.domElement=e),e}hasCompatibility(){return!1}initRenderTarget(){}set(e,t){this.data.set(e,t)}get(e){let t=this.data.get(e);return t===void 0&&(t={},this.data.set(e,t)),t}has(e){return this.data.has(e)}delete(e){this.data.delete(e)}deleteBindGroupData(){}dispose(){}},Ej=0,Dj=class{constructor(e,t){this.buffers=[e.bufferGPU,t],this.type=e.type,this.bufferType=e.bufferType,this.pbo=e.pbo,this.byteLength=e.byteLength,this.bytesPerElement=e.BYTES_PER_ELEMENT,this.version=e.version,this.isInteger=e.isInteger,this.activeBufferIndex=0,this.baseId=e.id}get id(){return`${this.baseId}|${this.activeBufferIndex}`}get bufferGPU(){return this.buffers[this.activeBufferIndex]}get transformBuffer(){return this.buffers[this.activeBufferIndex^1]}switchBuffers(){this.activeBufferIndex^=1}},Oj=class{constructor(e){this.backend=e}createAttribute(e,t){let n=this.backend,{gl:r}=n,i=e.array,a=e.usage||r.STATIC_DRAW,o=e.isInterleavedBufferAttribute?e.data:e,s=n.get(o),c=s.bufferGPU;c===void 0&&(c=this._createBuffer(r,t,i,a),s.bufferGPU=c,s.bufferType=t,s.version=o.version);let l;if(i instanceof Float32Array)l=r.FLOAT;else if(typeof Float16Array<`u`&&i instanceof Float16Array)l=r.HALF_FLOAT;else if(i instanceof Uint16Array)l=e.isFloat16BufferAttribute?r.HALF_FLOAT:r.UNSIGNED_SHORT;else if(i instanceof Int16Array)l=r.SHORT;else if(i instanceof Uint32Array)l=r.UNSIGNED_INT;else if(i instanceof Int32Array)l=r.INT;else if(i instanceof Int8Array)l=r.BYTE;else if(i instanceof Uint8Array)l=r.UNSIGNED_BYTE;else if(i instanceof Uint8ClampedArray)l=r.UNSIGNED_BYTE;else throw Error(`THREE.WebGLBackend: Unsupported buffer data format: `+i);let u={bufferGPU:c,bufferType:t,type:l,byteLength:i.byteLength,bytesPerElement:i.BYTES_PER_ELEMENT,version:e.version,pbo:e.pbo,isInteger:l===r.INT||l===r.UNSIGNED_INT||e.gpuType===1013,id:Ej++};if(e.isStorageBufferAttribute||e.isStorageInstancedBufferAttribute){let e=this._createBuffer(r,t,i,a);u=new Dj(u,e)}n.set(e,u)}updateAttribute(e){let t=this.backend,{gl:n}=t,r=e.array,i=e.isInterleavedBufferAttribute?e.data:e,a=t.get(i),o=a.bufferType,s=e.isInterleavedBufferAttribute?e.data.updateRanges:e.updateRanges;if(n.bindBuffer(o,a.bufferGPU),s.length===0)n.bufferSubData(o,0,r);else{for(let e=0,t=s.length;e{t.buffer=null,t._mapped=!1,t.removeEventListener(`release`,e),t.removeEventListener(`dispose`,e)};t.addEventListener(`release`,e),t.addEventListener(`dispose`,e),u=new Uint8Array(new ArrayBuffer(l)),t.buffer=u.buffer}else u=new Uint8Array(t);return a.bindBuffer(a.COPY_READ_BUFFER,c),a.getBufferSubData(a.COPY_READ_BUFFER,n,u),a.bindBuffer(a.COPY_READ_BUFFER,null),a.bindBuffer(a.COPY_WRITE_BUFFER,null),t&&t.isReadbackBuffer?t:u.buffer}_createBuffer(e,t,n,r){let i=e.createBuffer();return e.bindBuffer(t,i),e.bufferData(t,n,r),e.bindBuffer(t,null),i}},kj,Aj,jj=class{constructor(e){this.backend=e,this.gl=this.backend.gl,this.enabled={},this.parameters={},this.currentFlipSided=null,this.currentCullFace=null,this.currentProgram=null,this.currentBlendingEnabled=!1,this.currentBlending=null,this.currentBlendSrc=null,this.currentBlendDst=null,this.currentBlendSrcAlpha=null,this.currentBlendDstAlpha=null,this.currentPremultipledAlpha=null,this.currentPolygonOffsetFactor=null,this.currentPolygonOffsetUnits=null,this.currentColorMask=null,this.currentDepthReversed=!1,this.currentDepthFunc=null,this.currentDepthMask=null,this.currentStencilFunc=null,this.currentStencilRef=null,this.currentStencilFuncMask=null,this.currentStencilFail=null,this.currentStencilZFail=null,this.currentStencilZPass=null,this.currentStencilMask=null,this.currentLineWidth=null,this.currentClippingPlanes=0,this.currentVAO=null,this.currentIndex=null,this.currentBoundFramebuffers={},this.currentDrawbuffers=new WeakMap,this.maxTextures=this.gl.getParameter(this.gl.MAX_TEXTURE_IMAGE_UNITS),this.currentTextureSlot=null,this.currentBoundTextures={},this.currentBoundBufferBases={},this._init()}_init(){let e=this.gl;kj={100:e.FUNC_ADD,101:e.FUNC_SUBTRACT,102:e.FUNC_REVERSE_SUBTRACT},Aj={200:e.ZERO,201:e.ONE,202:e.SRC_COLOR,204:e.SRC_ALPHA,210:e.SRC_ALPHA_SATURATE,208:e.DST_COLOR,206:e.DST_ALPHA,203:e.ONE_MINUS_SRC_COLOR,205:e.ONE_MINUS_SRC_ALPHA,209:e.ONE_MINUS_DST_COLOR,207:e.ONE_MINUS_DST_ALPHA};let t=e.getParameter(e.SCISSOR_BOX),n=e.getParameter(e.VIEWPORT);this.currentScissor=new xn().fromArray(t),this.currentViewport=new xn().fromArray(n),this._tempVec4=new xn}enable(e){let{enabled:t}=this;t[e]!==!0&&(this.gl.enable(e),t[e]=!0)}disable(e){let{enabled:t}=this;t[e]!==!1&&(this.gl.disable(e),t[e]=!1)}setFlipSided(e){if(this.currentFlipSided!==e){let{gl:t}=this;e?t.frontFace(t.CW):t.frontFace(t.CCW),this.currentFlipSided=e}}setCullFace(e){let{gl:t}=this;e===0?this.disable(t.CULL_FACE):(this.enable(t.CULL_FACE),e!==this.currentCullFace&&(e===1?t.cullFace(t.BACK):e===2?t.cullFace(t.FRONT):t.cullFace(t.FRONT_AND_BACK))),this.currentCullFace=e}setLineWidth(e){let{currentLineWidth:t,gl:n}=this;e!==t&&(n.lineWidth(e),this.currentLineWidth=e)}setMRTBlending(e,t,n){let r=this.gl,i=this.backend.drawBuffersIndexedExt;if(!i){Tt(`WebGPURenderer: Multiple Render Targets (MRT) blending configuration is not fully supported in compatibility mode. The material blending will be used for all render targets.`);return}for(let a=0;a0?this.enable(r.SAMPLE_ALPHA_TO_COVERAGE):this.disable(r.SAMPLE_ALPHA_TO_COVERAGE),n>0&&this.currentClippingPlanes!==n){let e=12288;for(let t=0;t<8;t++)t{function i(){let a=e.clientWaitSync(t,e.SYNC_FLUSH_COMMANDS_BIT,0);if(a===e.WAIT_FAILED){e.deleteSync(t),r();return}if(a===e.TIMEOUT_EXPIRED){requestAnimationFrame(i);return}e.deleteSync(t),n()}i()})}},Nj=!1,Pj,Fj,Ij,Lj=class{constructor(e){this.backend=e,this.gl=e.gl,this.extensions=e.extensions,this.defaultTextures={},this._srcFramebuffer=null,this._dstFramebuffer=null,Nj===!1&&(this._init(),Nj=!0)}_init(){let e=this.gl;Pj={[r]:e.REPEAT,[i]:e.CLAMP_TO_EDGE,[a]:e.MIRRORED_REPEAT},Fj={[o]:e.NEAREST,[s]:e.NEAREST_MIPMAP_NEAREST,[c]:e.NEAREST_MIPMAP_LINEAR,[l]:e.LINEAR,[u]:e.LINEAR_MIPMAP_NEAREST,[d]:e.LINEAR_MIPMAP_LINEAR},Ij={512:e.NEVER,519:e.ALWAYS,513:e.LESS,515:e.LEQUAL,514:e.EQUAL,518:e.GEQUAL,516:e.GREATER,517:e.NOTEQUAL}}getGLTextureType(e){let{gl:t}=this,n;return n=e.isCubeTexture===!0?t.TEXTURE_CUBE_MAP:e.isArrayTexture===!0||e.isDataArrayTexture===!0||e.isCompressedArrayTexture===!0?t.TEXTURE_2D_ARRAY:e.isData3DTexture===!0?t.TEXTURE_3D:t.TEXTURE_2D,n}getInternalFormat(e,t,n,r,i,a=!1){let{gl:o,extensions:s}=this;if(e!==null){if(o[e]!==void 0)return o[e];T(`WebGLBackend: Attempt to use non-existing WebGL internal format '`+e+`'`)}let c=null;r&&(c=s.get(`EXT_texture_norm16`),c||T(`WebGLRenderer: Unable to use normalized textures without EXT_texture_norm16 extension`));let l=t;if(t===o.RED&&(n===o.FLOAT&&(l=o.R32F),n===o.HALF_FLOAT&&(l=o.R16F),n===o.UNSIGNED_BYTE&&(l=o.R8),n===o.BYTE&&(l=o.R8_SNORM),n===o.UNSIGNED_SHORT&&c&&(l=c.R16_EXT),n===o.SHORT&&c&&(l=c.R16_SNORM_EXT)),t===o.RED_INTEGER&&(n===o.UNSIGNED_BYTE&&(l=o.R8UI),n===o.UNSIGNED_SHORT&&(l=o.R16UI),n===o.UNSIGNED_INT&&(l=o.R32UI),n===o.BYTE&&(l=o.R8I),n===o.SHORT&&(l=o.R16I),n===o.INT&&(l=o.R32I)),t===o.RG&&(n===o.FLOAT&&(l=o.RG32F),n===o.HALF_FLOAT&&(l=o.RG16F),n===o.UNSIGNED_BYTE&&(l=o.RG8),n===o.BYTE&&(l=o.RG8_SNORM),n===o.UNSIGNED_SHORT&&c&&(l=c.RG16_EXT),n===o.SHORT&&c&&(l=c.RG16_SNORM_EXT)),t===o.RG_INTEGER&&(n===o.UNSIGNED_BYTE&&(l=o.RG8UI),n===o.UNSIGNED_SHORT&&(l=o.RG16UI),n===o.UNSIGNED_INT&&(l=o.RG32UI),n===o.BYTE&&(l=o.RG8I),n===o.SHORT&&(l=o.RG16I),n===o.INT&&(l=o.RG32I)),t===o.RGB){let e=a?rt:un.getTransfer(i);n===o.FLOAT&&(l=o.RGB32F),n===o.HALF_FLOAT&&(l=o.RGB16F),n===o.UNSIGNED_BYTE&&(l=e===`srgb`?o.SRGB8:o.RGB8),n===o.BYTE&&(l=o.RGB8_SNORM),n===o.UNSIGNED_SHORT&&c&&(l=c.RGB16_EXT),n===o.SHORT&&c&&(l=c.RGB16_SNORM_EXT),n===o.UNSIGNED_SHORT_5_6_5&&(l=o.RGB565),n===o.UNSIGNED_SHORT_5_5_5_1&&(l=o.RGB5_A1),n===o.UNSIGNED_SHORT_4_4_4_4&&(l=o.RGB4),n===o.UNSIGNED_INT_5_9_9_9_REV&&(l=o.RGB9_E5),n===o.UNSIGNED_INT_10F_11F_11F_REV&&(l=o.R11F_G11F_B10F)}if(t===o.RGB_INTEGER&&(n===o.UNSIGNED_BYTE&&(l=o.RGB8UI),n===o.UNSIGNED_SHORT&&(l=o.RGB16UI),n===o.UNSIGNED_INT&&(l=o.RGB32UI),n===o.BYTE&&(l=o.RGB8I),n===o.SHORT&&(l=o.RGB16I),n===o.INT&&(l=o.RGB32I)),t===o.RGBA){let e=a?rt:un.getTransfer(i);n===o.FLOAT&&(l=o.RGBA32F),n===o.HALF_FLOAT&&(l=o.RGBA16F),n===o.UNSIGNED_BYTE&&(l=e===`srgb`?o.SRGB8_ALPHA8:o.RGBA8),n===o.BYTE&&(l=o.RGBA8_SNORM),n===o.UNSIGNED_SHORT&&c&&(l=c.RGBA16_EXT),n===o.SHORT&&c&&(l=c.RGBA16_SNORM_EXT),n===o.UNSIGNED_SHORT_4_4_4_4&&(l=o.RGBA4),n===o.UNSIGNED_SHORT_5_5_5_1&&(l=o.RGB5_A1)}return t===o.RGBA_INTEGER&&(n===o.UNSIGNED_BYTE&&(l=o.RGBA8UI),n===o.UNSIGNED_SHORT&&(l=o.RGBA16UI),n===o.UNSIGNED_INT&&(l=o.RGBA32UI),n===o.BYTE&&(l=o.RGBA8I),n===o.SHORT&&(l=o.RGBA16I),n===o.INT&&(l=o.RGBA32I)),t===o.DEPTH_COMPONENT&&(n===o.UNSIGNED_SHORT&&(l=o.DEPTH_COMPONENT16),n===o.UNSIGNED_INT&&(l=o.DEPTH_COMPONENT24),n===o.FLOAT&&(l=o.DEPTH_COMPONENT32F)),t===o.DEPTH_STENCIL&&n===o.UNSIGNED_INT_24_8&&(l=o.DEPTH24_STENCIL8),(l===o.R16F||l===o.R32F||l===o.RG16F||l===o.RG32F||l===o.RGBA16F||l===o.RGBA32F)&&s.get(`EXT_color_buffer_float`),l}setTextureParameters(e,t){let{gl:n,extensions:r,backend:i}=this,{state:a}=this.backend,o=un.getPrimaries(un.workingColorSpace),s=t.colorSpace===``?null:un.getPrimaries(t.colorSpace),c=t.colorSpace===``||o===s?n.NONE:n.BROWSER_DEFAULT_WEBGL;a.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,t.flipY),a.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t.premultiplyAlpha),a.pixelStorei(n.UNPACK_ALIGNMENT,t.unpackAlignment),a.pixelStorei(n.UNPACK_COLORSPACE_CONVERSION_WEBGL,c),n.texParameteri(e,n.TEXTURE_WRAP_S,Pj[t.wrapS]),n.texParameteri(e,n.TEXTURE_WRAP_T,Pj[t.wrapT]),(e===n.TEXTURE_3D||e===n.TEXTURE_2D_ARRAY)&&(t.isArrayTexture||n.texParameteri(e,n.TEXTURE_WRAP_R,Pj[t.wrapR])),n.texParameteri(e,n.TEXTURE_MAG_FILTER,Fj[t.magFilter]);let l=t.mipmaps!==void 0&&t.mipmaps.length>0,u=t.minFilter===1006&&l?d:t.minFilter;if(n.texParameteri(e,n.TEXTURE_MIN_FILTER,Fj[u]),t.compareFunction&&(n.texParameteri(e,n.TEXTURE_COMPARE_MODE,n.COMPARE_REF_TO_TEXTURE),n.texParameteri(e,n.TEXTURE_COMPARE_FUNC,Ij[t.compareFunction])),r.has(`EXT_texture_filter_anisotropic`)===!0){if(t.magFilter===1003||t.minFilter!==1005&&t.minFilter!==1008||t.type===1015&&r.has(`OES_texture_float_linear`)===!1)return;if(t.anisotropy>1){let a=r.get(`EXT_texture_filter_anisotropic`);n.texParameterf(e,a.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(t.anisotropy,i.capabilities.getMaxAnisotropy()))}}}createDefaultTexture(e){let{gl:t,backend:n,defaultTextures:r}=this,i=this.getGLTextureType(e),a=r[i];a===void 0&&(a=t.createTexture(),n.state.bindTexture(i,a),t.texParameteri(i,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(i,t.TEXTURE_MAG_FILTER,t.NEAREST),r[i]=a),n.set(e,{textureGPU:a,glTextureType:i})}createTexture(e,t){let{gl:n,backend:r}=this,i,a,o,s,c;if(e.isExternalTexture===!0)i=e.sourceTexture,a=this.getGLTextureType(e);else{let{levels:l,width:u,height:d,depth:f}=t;o=r.utils.convert(e.format,e.colorSpace),s=r.utils.convert(e.type),c=this.getInternalFormat(e.internalFormat,o,s,e.normalized,e.colorSpace,e.isVideoTexture),i=n.createTexture(),a=this.getGLTextureType(e),r.state.bindTexture(a,i),this.setTextureParameters(a,e),e.isArrayTexture||e.isDataArrayTexture||e.isCompressedArrayTexture?n.texStorage3D(n.TEXTURE_2D_ARRAY,l,c,u,d,f):e.isData3DTexture?n.texStorage3D(n.TEXTURE_3D,l,c,u,d,f):e.isVideoTexture||n.texStorage2D(a,l,c,u,d)}r.set(e,{textureGPU:i,glTextureType:a,glFormat:o,glType:s,glInternalFormat:c})}copyBufferToTexture(e,t){let{gl:n,backend:r}=this,{state:i}=r,{textureGPU:a,glTextureType:o,glFormat:s,glType:c}=r.get(t),{width:l,height:u}=t.source.data;n.bindBuffer(n.PIXEL_UNPACK_BUFFER,e),r.state.bindTexture(o,a),i.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!1),i.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),n.texSubImage2D(o,0,0,0,l,u,s,c,0),n.bindBuffer(n.PIXEL_UNPACK_BUFFER,null),r.state.unbindTexture()}updateTexture(e,t){let{gl:n}=this,{width:r,height:i}=t,{textureGPU:a,glTextureType:o,glFormat:s,glType:c,glInternalFormat:l}=this.backend.get(e);if(!(e.isRenderTargetTexture||a===void 0))if(this.backend.state.bindTexture(o,a),this.setTextureParameters(o,e),e.isCompressedTexture){let r=e.mipmaps,i=t.image;for(let t=0;t0){let t=Jo(r.width,r.height,e.format,e.type);for(let i of e.layerUpdates){let e=r.data.subarray(i*t/r.data.BYTES_PER_ELEMENT,(i+1)*t/r.data.BYTES_PER_ELEMENT);n.texSubImage3D(n.TEXTURE_2D_ARRAY,0,0,0,i,r.width,r.height,1,s,c,e)}e.clearLayerUpdates()}else n.texSubImage3D(n.TEXTURE_2D_ARRAY,0,0,0,0,r.width,r.height,r.depth,s,c,r.data)}else if(e.isData3DTexture){let e=t.image;n.texSubImage3D(n.TEXTURE_3D,0,0,0,0,e.width,e.height,e.depth,s,c,e.data)}else if(e.isVideoTexture)e.update(),n.texImage2D(o,0,l,s,c,t.image);else if(e.isHTMLTexture)typeof n.texElementImage2D==`function`&&(n.texElementImage2D.length===3?n.texElementImage2D(n.TEXTURE_2D,n.RGBA8,t.image):n.texElementImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,t.image));else{let a=e.mipmaps;if(a.length>0)for(let e=0,t=a.length;e0,d=t.renderTarget?t.renderTarget.height:this.backend.getDrawingBufferSize().y;if(u){let n=o!==0||s!==0,u,f;if(e.isDepthTexture===!0?(u=r.DEPTH_BUFFER_BIT,f=r.DEPTH_ATTACHMENT,t.stencil&&(u|=r.STENCIL_BUFFER_BIT)):(u=r.COLOR_BUFFER_BIT,f=r.COLOR_ATTACHMENT0),n){let e=this.backend.get(t.renderTarget),n=e.framebuffers[t.getCacheKey()],f=e.msaaFrameBuffer;i.bindFramebuffer(r.DRAW_FRAMEBUFFER,n),i.bindFramebuffer(r.READ_FRAMEBUFFER,f);let p=d-s-l;r.blitFramebuffer(o,p,o+c,p+l,o,p,o+c,p+l,u,r.NEAREST),i.bindFramebuffer(r.READ_FRAMEBUFFER,n),i.bindTexture(r.TEXTURE_2D,a),r.copyTexSubImage2D(r.TEXTURE_2D,0,0,0,o,p,c,l),i.unbindTexture()}else{let e=r.createFramebuffer();i.bindFramebuffer(r.DRAW_FRAMEBUFFER,e),r.framebufferTexture2D(r.DRAW_FRAMEBUFFER,f,r.TEXTURE_2D,a,0),r.blitFramebuffer(0,0,c,l,0,0,c,l,u,r.NEAREST),r.deleteFramebuffer(e)}}else i.bindTexture(r.TEXTURE_2D,a),r.copyTexSubImage2D(r.TEXTURE_2D,0,0,0,o,d-l-s,c,l),i.unbindTexture();e.generateMipmaps&&this.generateMipmaps(e),this.backend._setFramebuffer(t)}setupRenderBufferStorage(e,t,n,r=!1){let{gl:i}=this,a=t.renderTarget,{depthTexture:o,depthBuffer:s,stencilBuffer:c,width:l,height:u}=a;if(i.bindRenderbuffer(i.RENDERBUFFER,e),s&&!c){let t=i.DEPTH_COMPONENT24;r===!0?this.extensions.get(`WEBGL_multisampled_render_to_texture`).renderbufferStorageMultisampleEXT(i.RENDERBUFFER,a.samples,t,l,u):n>0?(o&&o.isDepthTexture&&o.type===i.FLOAT&&(t=i.DEPTH_COMPONENT32F),i.renderbufferStorageMultisample(i.RENDERBUFFER,n,t,l,u)):i.renderbufferStorage(i.RENDERBUFFER,t,l,u),i.framebufferRenderbuffer(i.FRAMEBUFFER,i.DEPTH_ATTACHMENT,i.RENDERBUFFER,e)}else s&&c&&(n>0?i.renderbufferStorageMultisample(i.RENDERBUFFER,n,i.DEPTH24_STENCIL8,l,u):i.renderbufferStorage(i.RENDERBUFFER,i.DEPTH_STENCIL,l,u),i.framebufferRenderbuffer(i.FRAMEBUFFER,i.DEPTH_STENCIL_ATTACHMENT,i.RENDERBUFFER,e));i.bindRenderbuffer(i.RENDERBUFFER,null)}async copyTextureToBuffer(e,t,n,r,i,a){let{backend:o,gl:s}=this,{textureGPU:c,glFormat:l,glType:u}=this.backend.get(e),d=s.createFramebuffer();o.state.bindFramebuffer(s.READ_FRAMEBUFFER,d);let f=e.isCubeTexture?s.TEXTURE_CUBE_MAP_POSITIVE_X+a:s.TEXTURE_2D;s.framebufferTexture2D(s.READ_FRAMEBUFFER,s.COLOR_ATTACHMENT0,f,c,0);let p=this._getTypedArrayType(u),m=this._getBytesPerTexel(u,l),h=r*i*m,g=s.createBuffer();s.bindBuffer(s.PIXEL_PACK_BUFFER,g),s.bufferData(s.PIXEL_PACK_BUFFER,h,s.STREAM_READ),s.readPixels(t,n,r,i,l,u,0),s.bindBuffer(s.PIXEL_PACK_BUFFER,null),await o.utils._clientWaitAsync();let _=new p(h/p.BYTES_PER_ELEMENT);return s.bindBuffer(s.PIXEL_PACK_BUFFER,g),s.getBufferSubData(s.PIXEL_PACK_BUFFER,0,_),s.bindBuffer(s.PIXEL_PACK_BUFFER,null),o.state.bindFramebuffer(s.READ_FRAMEBUFFER,null),s.deleteFramebuffer(d),_}_getTypedArrayType(e){let{gl:t}=this;if(e===t.UNSIGNED_BYTE)return Uint8Array;if(e===t.UNSIGNED_SHORT_4_4_4_4||e===t.UNSIGNED_SHORT_5_5_5_1||e===t.UNSIGNED_SHORT_5_6_5||e===t.UNSIGNED_SHORT)return Uint16Array;if(e===t.UNSIGNED_INT)return Uint32Array;if(e===t.HALF_FLOAT)return Uint16Array;if(e===t.FLOAT)return Float32Array;throw Error(`THREE.WebGLTextureUtils: Unsupported WebGL type: ${e}`)}_getBytesPerTexel(e,t){let{gl:n}=this,r=0;if(e===n.UNSIGNED_BYTE&&(r=1),(e===n.UNSIGNED_SHORT_4_4_4_4||e===n.UNSIGNED_SHORT_5_5_5_1||e===n.UNSIGNED_SHORT_5_6_5||e===n.UNSIGNED_SHORT||e===n.HALF_FLOAT)&&(r=2),(e===n.UNSIGNED_INT||e===n.FLOAT)&&(r=4),t===n.RGBA)return r*4;if(t===n.RGB)return r*3;if(t===n.ALPHA)return r}dispose(){let{gl:e}=this;this._srcFramebuffer!==null&&e.deleteFramebuffer(this._srcFramebuffer),this._dstFramebuffer!==null&&e.deleteFramebuffer(this._dstFramebuffer)}};function Rj(e){return e.isDataTexture?e.image.data:typeof HTMLImageElement<`u`&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<`u`&&e instanceof HTMLCanvasElement||typeof ImageBitmap<`u`&&e instanceof ImageBitmap||typeof OffscreenCanvas<`u`&&e instanceof OffscreenCanvas?e:e.data}var zj=class{constructor(e){this.backend=e,this.gl=this.backend.gl,this.availableExtensions=this.gl.getSupportedExtensions(),this.extensions={}}get(e){let t=this.extensions[e];return t===void 0&&(t=this.gl.getExtension(e),this.extensions[e]=t),t}has(e){return this.availableExtensions.includes(e)}},Bj=class{constructor(e){this.backend=e,this.maxAnisotropy=null,this.maxUniformBlockSize=null}getMaxAnisotropy(){if(this.maxAnisotropy!==null)return this.maxAnisotropy;let e=this.backend.gl,t=this.backend.extensions;if(t.has(`EXT_texture_filter_anisotropic`)===!0){let n=t.get(`EXT_texture_filter_anisotropic`);this.maxAnisotropy=e.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else this.maxAnisotropy=0;return this.maxAnisotropy}getUniformBufferLimit(){if(this.maxUniformBlockSize!==null)return this.maxUniformBlockSize;let e=this.backend.gl;return this.maxUniformBlockSize=e.getParameter(e.MAX_UNIFORM_BLOCK_SIZE),this.maxUniformBlockSize}},Vj={WEBGL_multi_draw:`WEBGL_multi_draw`,WEBGL_compressed_texture_astc:`texture-compression-astc`,WEBGL_compressed_texture_etc:`texture-compression-etc2`,WEBGL_compressed_texture_etc1:`texture-compression-etc1`,WEBGL_compressed_texture_pvrtc:`texture-compression-pvrtc`,WEBGL_compressed_texture_s3tc:`texture-compression-s3tc`,EXT_texture_compression_bptc:`texture-compression-bc`,EXT_disjoint_timer_query_webgl2:`timestamp-query`,OVR_multiview2:`OVR_multiview2`},Hj=class{constructor(e){this.gl=e.gl,this.extensions=e.extensions,this.info=e.renderer.info,this.mode=null,this.index=0,this.type=null,this.object=null}render(e,t){let{gl:n,mode:r,object:i,type:a,info:o,index:s}=this;s===0?n.drawArrays(r,e,t):n.drawElements(r,t,a,e),o.update(i,t,1)}renderInstances(e,t,n){let{gl:r,mode:i,type:a,index:o,object:s,info:c}=this;n!==0&&(o===0?r.drawArraysInstanced(i,e,t,n):r.drawElementsInstanced(i,t,a,e,n),c.update(s,t,n))}renderMultiDraw(e,t,n){let{extensions:r,mode:i,object:a,info:o}=this;if(n===0)return;let s=r.get(`WEBGL_multi_draw`);if(s===null)for(let r=0;rthis.maxQueries)return Tt(`WebGLTimestampQueryPool [${this.type}]: Maximum number of queries exceeded, when using trackTimestamp it is necessary to resolves the queries via renderer.resolveTimestampsAsync( THREE.TimestampQuery.${this.type.toUpperCase()} ).`),null;let t=this.currentQueryIndex;return this.currentQueryIndex+=2,this.queryStates.set(t,`inactive`),this.queryOffsets.set(e,t),t}beginQuery(e){if(!this.trackTimestamp||this.isDisposed)return;let t=this.queryOffsets.get(e);if(t==null||this.activeQuery!==null)return;let n=this.queries[t];if(n)try{this.queryStates.get(t)===`inactive`&&(this.gl.beginQuery(this.ext.TIME_ELAPSED_EXT,n),this.activeQuery=t,this.queryStates.set(t,`started`))}catch(e){E(`Error in beginQuery:`,e),this.activeQuery=null,this.queryStates.set(t,`inactive`)}}endQuery(e){if(!this.trackTimestamp||this.isDisposed)return;let t=this.queryOffsets.get(e);if(t!=null&&this.activeQuery===t)try{this.gl.endQuery(this.ext.TIME_ELAPSED_EXT),this.queryStates.set(t,`ended`),this.activeQuery=null}catch(e){E(`Error in endQuery:`,e),this.queryStates.set(t,`inactive`),this.activeQuery=null}}async resolveQueriesAsync(){if(!this.trackTimestamp||this.pendingResolve)return this.lastValue;this.pendingResolve=!0;try{let e=new Map;for(let[t,n]of this.queryOffsets)if(this.queryStates.get(n)===`ended`){let r=this.queries[n];e.set(t,this.resolveQuery(r))}if(e.size===0)return this.lastValue;let t={},n=[];for(let[r,i]of e){let e=r.match(/^(.*):f(\d+)$/),a=parseInt(e[2]);n.includes(a)===!1&&n.push(a),t[a]===void 0&&(t[a]=0);let o=await i;this.timestamps.set(r,o),t[a]+=o}let r=t[n[n.length-1]];return this.lastValue=r,this.frames=n,this.currentQueryIndex=0,this.queryOffsets.clear(),this.queryStates.clear(),this.activeQuery=null,r}catch(e){return E(`Error resolving queries:`,e),this.lastValue}finally{this.pendingResolve=!1}}async resolveQuery(e){return new Promise(t=>{if(this.isDisposed){t(this.lastValue);return}let n,r=!1,i=()=>{n&&=(clearTimeout(n),null)},a=e=>{r||(r=!0,i(),t(e))},o=()=>{if(this.isDisposed){a(this.lastValue);return}try{if(this.gl.getParameter(this.ext.GPU_DISJOINT_EXT)){a(this.lastValue);return}if(!this.gl.getQueryParameter(e,this.gl.QUERY_RESULT_AVAILABLE)){n=setTimeout(o,1);return}let r=this.gl.getQueryParameter(e,this.gl.QUERY_RESULT);t(Number(r)/1e6)}catch(e){E(`Error checking query:`,e),t(this.lastValue)}};o()})}dispose(){if(!this.isDisposed&&(this.isDisposed=!0,this.trackTimestamp)){for(let e of this.queries)this.gl.deleteQuery(e);this.queries=[],this.queryStates.clear(),this.queryOffsets.clear(),this.lastValue=0,this.activeQuery=null}}},Gj=class extends Tj{constructor(e={}){super(e),this.isWebGLBackend=!0,this.attributeUtils=null,this.extensions=null,this.capabilities=null,this.textureUtils=null,this.bufferRenderer=null,this.gl=null,this.state=null,this.utils=null,this.vaoCache={},this.transformFeedbackCache={},this.discard=!1,this.disjoint=null,this.parallel=null,this._currentContext=null,this._knownBindings=new WeakSet,this._supportsInvalidateFramebuffer=typeof navigator>`u`?!1:/OculusBrowser/g.test(navigator.userAgent),this._xrFramebuffer=null}init(e){super.init(e);let t=this.parameters,n={antialias:e.currentSamples>0,alpha:!0,depth:e.depth,stencil:e.stencil},r=t.context===void 0?e.domElement.getContext(`webgl2`,n):t.context;function i(t){t.preventDefault();let n={api:`WebGL`,message:t.statusMessage||`Unknown reason`,reason:null,originalEvent:t};e.onDeviceLost(n)}this._onContextLost=i,e.domElement.addEventListener(`webglcontextlost`,i,!1),this.gl=r,this.extensions=new zj(this),this.capabilities=new Bj(this),this.attributeUtils=new Oj(this),this.textureUtils=new Lj(this),this.bufferRenderer=new Hj(this),this.state=new jj(this),this.utils=new Mj(this),this.extensions.get(`EXT_color_buffer_float`),this.extensions.get(`WEBGL_clip_cull_distance`),this.extensions.get(`OES_texture_float_linear`),this.extensions.get(`EXT_color_buffer_half_float`),this.extensions.get(`WEBGL_multisampled_render_to_texture`),this.extensions.get(`WEBGL_render_shared_exponent`),this.extensions.get(`WEBGL_multi_draw`),this.extensions.get(`OVR_multiview2`),this.extensions.get(`EXT_clip_control`),this.disjoint=this.extensions.get(`EXT_disjoint_timer_query_webgl2`),this.parallel=this.extensions.get(`KHR_parallel_shader_compile`),this.drawBuffersIndexedExt=this.extensions.get(`OES_draw_buffers_indexed`),t.reversedDepthBuffer&&(this.extensions.has(`EXT_clip_control`)?e.reversedDepthBuffer=!0:(T(`WebGPURenderer: Unable to use reversed depth buffer due to missing EXT_clip_control extension. Fallback to default depth buffer.`),e.reversedDepthBuffer=!1)),e.reversedDepthBuffer&&this.state.setReversedDepth(!0)}get coordinateSystem(){return mt}get hasTimestamp(){return this.disjoint!==null}async getArrayBufferAsync(e,t=null,n=0,r=-1){return await this.attributeUtils.getArrayBufferAsync(e,t,n,r)}async makeXRCompatible(){this.gl.getContextAttributes().xrCompatible!==!0&&await this.gl.makeXRCompatible()}setXRTarget(e){this._xrFramebuffer=e}setXRRenderTargetTextures(e,t,n=null){let r=this.gl;if(this.set(e.texture,{textureGPU:t,glInternalFormat:r.RGBA8}),n!==null){let t=e.stencilBuffer?r.DEPTH24_STENCIL8:r.DEPTH_COMPONENT24;this.set(e.depthTexture,{textureGPU:n,glInternalFormat:t}),this.extensions.has(`WEBGL_multisampled_render_to_texture`)===!0&&e._autoAllocateDepthBuffer===!0&&e.multiview===!1&&T(`WebGLBackend: Render-to-texture extension was disabled because an external texture was provided`),e._autoAllocateDepthBuffer=!1}}initTimestampQuery(e,t){if(!this.disjoint||!this.trackTimestamp)return;this.timestampQueryPool[e]||(this.timestampQueryPool[e]=new Wj(this.gl,e,2048));let n=this.timestampQueryPool[e];n.allocateQueriesForContext(t)!==null&&n.beginQuery(t)}prepareTimestampBuffer(e,t){!this.disjoint||!this.trackTimestamp||this.timestampQueryPool[e].endQuery(t)}getContext(){return this.gl}beginRender(e){let{state:t}=this,n=this.get(e);if(e.viewport)this.updateViewport(e);else{let{width:e,height:n}=this.getDrawingBufferSize();t.viewport(0,0,e,n)}if(e.scissor)this.updateScissor(e);else{let{width:e,height:n}=this.getDrawingBufferSize();t.scissor(0,0,e,n)}this.initTimestampQuery(gt.RENDER,this.getTimestampUID(e)),n.previousContext=this._currentContext,this._currentContext=e,this._setFramebuffer(e),this.clear(e.clearColor,e.clearDepth,e.clearStencil,e,!1);let r=e.occlusionQueryCount;r>0&&(n.currentOcclusionQueries=n.occlusionQueries,n.currentOcclusionQueryObjects=n.occlusionQueryObjects,n.lastOcclusionObject=null,n.occlusionQueries=Array(r),n.occlusionQueryObjects=Array(r),n.occlusionQueryIndex=0)}finishRender(e){let{gl:t,state:n}=this,r=this.get(e),i=r.previousContext;n.resetVertexState();let a=e.occlusionQueryCount;a>0&&(a>r.occlusionQueryIndex&&t.endQuery(t.ANY_SAMPLES_PASSED),this.resolveOccludedAsync(e));let o=e.textures;if(o!==null)for(let e=0;e{let o=0;for(let t=0;t1?t.renderInstances(n,r,i):t.render(n,r)}draw(e){let{object:t,pipeline:n,material:r,context:i,hardwareClippingPlanes:a}=e,{programGPU:o}=this.get(n),{gl:s,state:c}=this,l=this.get(i),u=e.getDrawParameters();if(u===null)return;this._bindUniforms(e.getBindings());let d=t.isMesh&&t.matrixWorld.determinantAffine()<0;c.setMaterial(r,d,a),i.mrt!==null&&i.textures!==null&&c.setMRTBlending(i.textures,i.mrt,r),c.useProgram(o);let f=e.getAttributes(),p=this.get(f),m=p.vaoGPU;if(m===void 0){let e=this._getVaoKey(f);m=this.vaoCache[e],m===void 0&&(m=this._createVao(f),this.vaoCache[e]=m,p.vaoGPU=m)}let h=e.getIndex(),g=h===null?null:this.get(h).bufferGPU;c.setVertexState(m,g);let _=l.lastOcclusionObject;if(_!==t&&_!==void 0){if(_!==null&&_.occlusionTest===!0&&(s.endQuery(s.ANY_SAMPLES_PASSED),l.occlusionQueryIndex++),t.occlusionTest===!0){let e=s.createQuery();s.beginQuery(s.ANY_SAMPLES_PASSED,e),l.occlusionQueries[l.occlusionQueryIndex]=e,l.occlusionQueryObjects[l.occlusionQueryIndex]=t}l.lastOcclusionObject=t}let v=this.bufferRenderer;t.isPoints?v.mode=s.POINTS:t.isLineSegments?v.mode=s.LINES:t.isLine?v.mode=s.LINE_STRIP:t.isLineLoop?v.mode=s.LINE_LOOP:r.wireframe===!0?(c.setLineWidth(r.wireframeLinewidth*this.renderer.getPixelRatio()),v.mode=s.LINES):v.mode=s.TRIANGLES;let{vertexCount:y,instanceCount:b}=u,{firstVertex:x}=u;if(v.object=t,h!==null){x*=h.array.BYTES_PER_ELEMENT;let e=this.get(h);v.index=h.count,v.type=e.type}else v.index=0;if(e.camera.isArrayCamera===!0&&e.camera.cameras.length>0&&e.camera.isMultiViewCamera===!1){let n=this.get(e.camera),r=e.camera.cameras,i=e.getBindingGroup(`cameraIndex`).bindings[0];if(n.indexesGPU===void 0||n.indexesGPU.length!==r.length){let e=new Uint32Array([0,0,0,0]),t=[];for(let n=0,i=r.length;n{let i=this.parallel,a=()=>{n.getProgramParameter(o,i.COMPLETION_STATUS_KHR)?(this._completeCompile(e,r),t()):requestAnimationFrame(a)};a()});t.push(i);return}this._completeCompile(e,r)}_handleSource(e,t){let n=e.split(` -`),r=[],i=Math.max(t-6,0),a=Math.min(t+6,n.length);for(let e=i;e`:` `} ${i}: ${n[e]}`)}return r.join(` -`)}_getShaderErrors(e,t,n){let r=e.getShaderParameter(t,e.COMPILE_STATUS),i=(e.getShaderInfoLog(t)||``).trim();if(r&&i===``)return``;let a=/ERROR: 0:(\d+)/.exec(i);if(a){let r=parseInt(a[1]);return n.toUpperCase()+` - -`+i+` - -`+this._handleSource(e.getShaderSource(t),r)}else return i}_logProgramError(e,t,n){if(this.renderer.debug.checkShaderErrors){let r=this.gl,i=(r.getProgramInfoLog(e)||``).trim();if(r.getProgramParameter(e,r.LINK_STATUS)===!1)if(typeof this.renderer.debug.onShaderError==`function`)this.renderer.debug.onShaderError(r,e,n,t);else{let a=this._getShaderErrors(r,n,`vertex`),o=this._getShaderErrors(r,t,`fragment`);E(`WebGLProgram: Shader Error `+r.getError()+` - VALIDATE_STATUS `+r.getProgramParameter(e,r.VALIDATE_STATUS)+` - -Program Info Log: `+i+` -`+a+` -`+o)}else i!==``&&T(`WebGLProgram: Program Info Log:`,i)}}_completeCompile(e,t){let{state:n,gl:r}=this,{programGPU:i,fragmentShader:a,vertexShader:o}=this.get(t);r.getProgramParameter(i,r.LINK_STATUS)===!1&&this._logProgramError(i,a,o),n.useProgram(i);let s=e.getBindings();this._setupBindings(s,i),this.set(t,{programGPU:i,pipeline:i})}createComputePipeline(e,t){let{state:n,gl:r}=this,i={stage:`fragment`,code:`#version 300 es -precision highp float; -void main() {}`};this.createProgram(i);let{computeProgram:a}=e,o=r.createProgram(),s=this.get(i).shaderGPU,c=this.get(a).shaderGPU,l=a.transforms,u=[],d=[];for(let e=0;eVj[t]===e),n=this.extensions;for(let e=0;e1,f=i.isXRRenderTarget===!0,p=f===!0&&i._hasExternalTextures===!0,m=a.msaaFrameBuffer,h=a.depthRenderbuffer,g=this.extensions.get(`WEBGL_multisampled_render_to_texture`),_=this.extensions.get(`OVR_multiview2`),v=this._useMultisampledExtension(i),y=bS(e),b;if(l?(a.cubeFramebuffers||={},b=a.cubeFramebuffers[y]):f&&p===!1?b=this._xrFramebuffer:(a.framebuffers||={},b=a.framebuffers[y]),b===void 0){b=t.createFramebuffer(),n.bindFramebuffer(t.FRAMEBUFFER,b);let r=e.textures,s=[];if(l){a.cubeFramebuffers[y]=b;let{textureGPU:e}=this.get(r[0]),n=this.renderer._activeCubeFace,i=this.renderer._activeMipmapLevel;t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_CUBE_MAP_POSITIVE_X+n,e,i)}else{a.framebuffers[y]=b;for(let n=0;n0&&v===!1&&!i.multiview){if(m===void 0){let r=[];m=t.createFramebuffer(),n.bindFramebuffer(t.FRAMEBUFFER,m);let i=[],l=e.textures;for(let n=0;n0&&this._useMultisampledExtension(r)===!1){let a=i.framebuffers[e.getCacheKey()],o=t.COLOR_BUFFER_BIT;r.resolveDepthBuffer&&(r.depthBuffer&&(o|=t.DEPTH_BUFFER_BIT),r.stencilBuffer&&r.resolveStencilBuffer&&(o|=t.STENCIL_BUFFER_BIT));let s=i.msaaFrameBuffer,c=i.msaaRenderbuffers,l=e.textures,u=l.length>1;if(n.bindFramebuffer(t.READ_FRAMEBUFFER,s),n.bindFramebuffer(t.DRAW_FRAMEBUFFER,a),u)for(let e=0;e0&&this.extensions.has(`WEBGL_multisampled_render_to_texture`)===!0&&e._autoAllocateDepthBuffer!==!1}dispose(){this.textureUtils!==null&&this.textureUtils.dispose();let e=this.extensions.get(`WEBGL_lose_context`);e&&e.loseContext(),this.renderer.domElement.removeEventListener(`webglcontextlost`,this._onContextLost)}},Kj={PointList:`point-list`,LineList:`line-list`,LineStrip:`line-strip`,TriangleList:`triangle-list`},qj=typeof self<`u`&&self.GPUShaderStage?self.GPUShaderStage:{VERTEX:1,FRAGMENT:2,COMPUTE:4},Jj={Never:`never`,Less:`less`,Equal:`equal`,LessEqual:`less-equal`,Greater:`greater`,NotEqual:`not-equal`,GreaterEqual:`greater-equal`,Always:`always`},Yj={Store:`store`},Xj={Load:`load`,Clear:`clear`},Zj={CCW:`ccw`,CW:`cw`},Qj={None:`none`,Back:`back`},$j={Uint16:`uint16`,Uint32:`uint32`},$={R8Unorm:`r8unorm`,R8Snorm:`r8snorm`,R8Uint:`r8uint`,R8Sint:`r8sint`,R16Uint:`r16uint`,R16Sint:`r16sint`,R16Float:`r16float`,RG8Unorm:`rg8unorm`,RG8Snorm:`rg8snorm`,RG8Uint:`rg8uint`,RG8Sint:`rg8sint`,R16Unorm:`r16unorm`,R16Snorm:`r16snorm`,R32Uint:`r32uint`,R32Sint:`r32sint`,R32Float:`r32float`,RG16Uint:`rg16uint`,RG16Sint:`rg16sint`,RG16Float:`rg16float`,RGBA8Unorm:`rgba8unorm`,RGBA8UnormSRGB:`rgba8unorm-srgb`,RGBA8Snorm:`rgba8snorm`,RGBA8Uint:`rgba8uint`,RGBA8Sint:`rgba8sint`,BGRA8Unorm:`bgra8unorm`,BGRA8UnormSRGB:`bgra8unorm-srgb`,RG16Unorm:`rg16unorm`,RG16Snorm:`rg16snorm`,RGB9E5UFloat:`rgb9e5ufloat`,RGB10A2Unorm:`rgb10a2unorm`,RG11B10UFloat:`rg11b10ufloat`,RG32Uint:`rg32uint`,RG32Sint:`rg32sint`,RG32Float:`rg32float`,RGBA16Uint:`rgba16uint`,RGBA16Sint:`rgba16sint`,RGBA16Float:`rgba16float`,RGBA16Unorm:`rgba16unorm`,RGBA16Snorm:`rgba16snorm`,RGBA32Uint:`rgba32uint`,RGBA32Sint:`rgba32sint`,RGBA32Float:`rgba32float`,Depth16Unorm:`depth16unorm`,Depth24Plus:`depth24plus`,Depth24PlusStencil8:`depth24plus-stencil8`,Depth32Float:`depth32float`,Depth32FloatStencil8:`depth32float-stencil8`,BC1RGBAUnorm:`bc1-rgba-unorm`,BC1RGBAUnormSRGB:`bc1-rgba-unorm-srgb`,BC2RGBAUnorm:`bc2-rgba-unorm`,BC2RGBAUnormSRGB:`bc2-rgba-unorm-srgb`,BC3RGBAUnorm:`bc3-rgba-unorm`,BC3RGBAUnormSRGB:`bc3-rgba-unorm-srgb`,BC4RUnorm:`bc4-r-unorm`,BC4RSnorm:`bc4-r-snorm`,BC5RGUnorm:`bc5-rg-unorm`,BC5RGSnorm:`bc5-rg-snorm`,BC6HRGBUFloat:`bc6h-rgb-ufloat`,BC6HRGBFloat:`bc6h-rgb-float`,BC7RGBAUnorm:`bc7-rgba-unorm`,BC7RGBAUnormSRGB:`bc7-rgba-unorm-srgb`,ETC2RGB8Unorm:`etc2-rgb8unorm`,ETC2RGB8UnormSRGB:`etc2-rgb8unorm-srgb`,ETC2RGB8A1Unorm:`etc2-rgb8a1unorm`,ETC2RGB8A1UnormSRGB:`etc2-rgb8a1unorm-srgb`,ETC2RGBA8Unorm:`etc2-rgba8unorm`,ETC2RGBA8UnormSRGB:`etc2-rgba8unorm-srgb`,EACR11Unorm:`eac-r11unorm`,EACR11Snorm:`eac-r11snorm`,EACRG11Unorm:`eac-rg11unorm`,EACRG11Snorm:`eac-rg11snorm`,ASTC4x4Unorm:`astc-4x4-unorm`,ASTC4x4UnormSRGB:`astc-4x4-unorm-srgb`,ASTC5x4Unorm:`astc-5x4-unorm`,ASTC5x4UnormSRGB:`astc-5x4-unorm-srgb`,ASTC5x5Unorm:`astc-5x5-unorm`,ASTC5x5UnormSRGB:`astc-5x5-unorm-srgb`,ASTC6x5Unorm:`astc-6x5-unorm`,ASTC6x5UnormSRGB:`astc-6x5-unorm-srgb`,ASTC6x6Unorm:`astc-6x6-unorm`,ASTC6x6UnormSRGB:`astc-6x6-unorm-srgb`,ASTC8x5Unorm:`astc-8x5-unorm`,ASTC8x5UnormSRGB:`astc-8x5-unorm-srgb`,ASTC8x6Unorm:`astc-8x6-unorm`,ASTC8x6UnormSRGB:`astc-8x6-unorm-srgb`,ASTC8x8Unorm:`astc-8x8-unorm`,ASTC8x8UnormSRGB:`astc-8x8-unorm-srgb`,ASTC10x5Unorm:`astc-10x5-unorm`,ASTC10x5UnormSRGB:`astc-10x5-unorm-srgb`,ASTC10x6Unorm:`astc-10x6-unorm`,ASTC10x6UnormSRGB:`astc-10x6-unorm-srgb`,ASTC10x8Unorm:`astc-10x8-unorm`,ASTC10x8UnormSRGB:`astc-10x8-unorm-srgb`,ASTC10x10Unorm:`astc-10x10-unorm`,ASTC10x10UnormSRGB:`astc-10x10-unorm-srgb`,ASTC12x10Unorm:`astc-12x10-unorm`,ASTC12x10UnormSRGB:`astc-12x10-unorm-srgb`,ASTC12x12Unorm:`astc-12x12-unorm`,ASTC12x12UnormSRGB:`astc-12x12-unorm-srgb`},eM={ClampToEdge:`clamp-to-edge`,Repeat:`repeat`,MirrorRepeat:`mirror-repeat`},tM={Linear:`linear`,Nearest:`nearest`},nM={Zero:`zero`,One:`one`,Src:`src`,OneMinusSrc:`one-minus-src`,SrcAlpha:`src-alpha`,OneMinusSrcAlpha:`one-minus-src-alpha`,Dst:`dst`,OneMinusDst:`one-minus-dst`,DstAlpha:`dst-alpha`,OneMinusDstAlpha:`one-minus-dst-alpha`,SrcAlphaSaturated:`src-alpha-saturated`,Constant:`constant`,OneMinusConstant:`one-minus-constant`},rM={Add:`add`,Subtract:`subtract`,ReverseSubtract:`reverse-subtract`,Min:`min`,Max:`max`},iM={None:0,All:15},aM={Keep:`keep`,Zero:`zero`,Replace:`replace`,Invert:`invert`,IncrementClamp:`increment-clamp`,DecrementClamp:`decrement-clamp`,IncrementWrap:`increment-wrap`,DecrementWrap:`decrement-wrap`},oM={Storage:`storage`,ReadOnlyStorage:`read-only-storage`},sM={WriteOnly:`write-only`,ReadOnly:`read-only`,ReadWrite:`read-write`},cM={NonFiltering:`non-filtering`,Comparison:`comparison`},lM={Float:`float`,UnfilterableFloat:`unfilterable-float`,Depth:`depth`,SInt:`sint`,UInt:`uint`},uM={TwoD:`2d`,ThreeD:`3d`},dM={TwoD:`2d`,TwoDArray:`2d-array`,Cube:`cube`,ThreeD:`3d`},fM={All:`all`},pM={Vertex:`vertex`,Instance:`instance`},mM={CoreFeaturesAndLimits:`core-features-and-limits`,DepthClipControl:`depth-clip-control`,Depth32FloatStencil8:`depth32float-stencil8`,TextureCompressionBC:`texture-compression-bc`,TextureCompressionBCSliced3D:`texture-compression-bc-sliced-3d`,TextureCompressionETC2:`texture-compression-etc2`,TextureCompressionASTC:`texture-compression-astc`,TextureCompressionASTCSliced3D:`texture-compression-astc-sliced-3d`,TimestampQuery:`timestamp-query`,IndirectFirstInstance:`indirect-first-instance`,ShaderF16:`shader-f16`,RG11B10UFloat:`rg11b10ufloat-renderable`,BGRA8UNormStorage:`bgra8unorm-storage`,Float32Filterable:`float32-filterable`,Float32Blendable:`float32-blendable`,ClipDistances:`clip-distances`,DualSourceBlending:`dual-source-blending`,Subgroups:`subgroups`,TextureFormatsTier1:`texture-formats-tier1`,TextureFormatsTier2:`texture-formats-tier2`},hM={"texture-compression-s3tc":`texture-compression-bc`,"texture-compression-etc1":`texture-compression-etc2`},gM=class extends lj{constructor(e,t,n){super(e,t?t.value:null),this.textureNode=t,this.groupNode=n}update(){let{textureNode:e}=this;return this.texture===e.value?super.update():(this.texture=e.value,!0)}},_M=class extends ej{constructor(e,t){super(e,t?t.array:null),this._attribute=t,this.isStorageBuffer=!0}get attribute(){return this._attribute}},vM=0,yM=class extends _M{constructor(e,t){super(`StorageBuffer_`+vM++,e?e.value:null),this.nodeUniform=e,this.access=e?e.access:Qs.READ_WRITE,this.groupNode=t}get attribute(){return this.nodeUniform.value}get buffer(){return this.nodeUniform.value.array}},bM=[null],xM=class{constructor(e){this.backend=e,this._preferredCanvasFormat=null}getCurrentDepthStencilFormat(e){let t;return e.depth&&(t=e.depthTexture===null?e.stencil?this.backend.renderer.reversedDepthBuffer===!0?$.Depth32FloatStencil8:$.Depth24PlusStencil8:this.backend.renderer.reversedDepthBuffer===!0?$.Depth32Float:$.Depth24Plus:this.getTextureFormatGPU(e.depthTexture)),t}getTextureFormatGPU(e){return this.backend.get(e).format}getTextureSampleData(e){let t;if(e.isFramebufferTexture)t=1;else if(e.isDepthTexture&&!e.renderTarget){let e=this.backend.renderer,n=e.getRenderTarget();t=n?n.samples:e.currentSamples}else e.renderTarget&&(t=e.renderTarget.samples);t=this.getSampleCount(t||1);let n=t>1&&e.renderTarget!==null&&e.isDepthTexture!==!0&&e.isFramebufferTexture!==!0;return{samples:t,primarySamples:n?1:t,isMSAA:n}}getCurrentColorFormat(e){let t;return t=e.textures===null?this.getPreferredCanvasFormat():this.getTextureFormatGPU(e.textures[0]),t}getCurrentColorFormats(e){return e.textures===null?[this.getPreferredCanvasFormat()]:e.textures.map(e=>this.getTextureFormatGPU(e))}getCurrentColorSpace(e){return e.textures===null?this.backend.renderer.outputColorSpace:e.textures[0].colorSpace}getPrimitiveTopology(e,t){if(e.isPoints)return Kj.PointList;if(e.isLineSegments||e.isMesh&&t.wireframe===!0)return Kj.LineList;if(e.isLine)return Kj.LineStrip;if(e.isMesh)return Kj.TriangleList}getSampleCount(e){return e>=4?4:1}getSampleCountRenderContext(e){return e.textures===null?this.getSampleCount(this.backend.renderer.currentSamples):this.getSampleCount(e.sampleCount)}getPreferredCanvasFormat(){let e=this.backend.parameters.outputType;if(e===void 0)return this._preferredCanvasFormat===null&&(this._preferredCanvasFormat=navigator.gpu.getPreferredCanvasFormat()),this._preferredCanvasFormat;if(e===1009)return $.BGRA8Unorm;if(e===1016)return $.RGBA16Float;throw Error(`THREE.WebGPUUtils: Unsupported output buffer type.`)}};function SM(e,t){bM[0]=t,e.queue.submit(bM),bM[0]=null}var CM=class{constructor(){this.label=``,this.layout=null,this.entries=[]}reset(){this.label=``,this.layout=null,this.entries.length=0}},wM=class{constructor(){this.label=``,this.size=0,this.usage=0,this.mappedAtCreation=!1}reset(){this.label=``,this.size=0,this.usage=0,this.mappedAtCreation=!1}},TM=class{constructor(){this.label=``}reset(){this.label=``}},EM=class{constructor(){this.label=``,this.colorFormats=null,this.depthStencilFormat=void 0,this.sampleCount=1,this.depthReadOnly=!1,this.stencilReadOnly=!1}reset(){this.label=``,this.colorFormats=null,this.depthStencilFormat=void 0,this.sampleCount=1,this.depthReadOnly=!1,this.stencilReadOnly=!1}},DM=class{constructor(){this.view=null,this.depthSlice=void 0,this.resolveTarget=void 0,this.clearValue=void 0,this.loadOp=void 0,this.storeOp=void 0}reset(){this.view=null,this.depthSlice=void 0,this.resolveTarget=void 0,this.clearValue=void 0,this.loadOp=void 0,this.storeOp=void 0}},OM=class{constructor(){this.label=``,this.colorAttachments=[],this.depthStencilAttachment=void 0,this.occlusionQuerySet=void 0,this.timestampWrites=void 0,this.maxDrawCount=5e7}reset(){this.label=``,this.colorAttachments.length=0,this.depthStencilAttachment=void 0,this.occlusionQuerySet=void 0,this.timestampWrites=void 0,this.maxDrawCount=5e7}},kM=class{constructor(){this.label=``,this.layout=null,this.vertex=null,this.primitive={},this.depthStencil=void 0,this.multisample=new AM,this.fragment=null}reset(){this.label=``,this.layout=null,this.vertex=null,this.primitive={},this.depthStencil=void 0,this.multisample.reset(),this.fragment=null}},AM=class{constructor(){this.count=1,this.mask=4294967295,this.alphaToCoverageEnabled=!1}reset(){this.count=1,this.mask=4294967295,this.alphaToCoverageEnabled=!1}},jM=class{constructor(){this.label=``,this.code=``,this.compilationHints=[]}reset(){this.label=``,this.code=``,this.compilationHints.length=0}},MM=class{constructor(){this.label=``,this.size={width:0,height:1,depthOrArrayLayers:1},this.mipLevelCount=1,this.sampleCount=1,this.dimension=`2d`,this.format=void 0,this.usage=void 0,this.viewFormats=[],this.textureBindingViewDimension=void 0}reset(){this.label=``,this.size.width=0,this.size.height=1,this.size.depthOrArrayLayers=1,this.mipLevelCount=1,this.sampleCount=1,this.dimension=`2d`,this.format=void 0,this.usage=void 0,this.viewFormats.length=0,this.textureBindingViewDimension=void 0}},NM=class{constructor(){this.label=``,this.format=void 0,this.dimension=void 0,this.usage=0,this.aspect=`all`,this.baseMipLevel=0,this.mipLevelCount=void 0,this.baseArrayLayer=0,this.arrayLayerCount=void 0,this.swizzle=`rgba`}reset(){this.label=``,this.format=void 0,this.dimension=void 0,this.usage=0,this.aspect=`all`,this.baseMipLevel=0,this.mipLevelCount=void 0,this.baseArrayLayer=0,this.arrayLayerCount=void 0,this.swizzle=`rgba`}},PM=new CM,FM=new wM,IM=new TM,LM=new EM,RM=new OM,zM=new kM,BM=new DM,VM=new jM,HM=new MM,UM=new NM,WM=class extends qx{constructor(e){super(),this.device=e,this.mipmapSampler=e.createSampler({minFilter:tM.Linear}),this.flipYSampler=e.createSampler({minFilter:tM.Nearest}),FM.size=4,FM.usage=GPUBufferUsage.UNIFORM|GPUBufferUsage.COPY_DST,this.flipUniformBuffer=e.createBuffer(FM),FM.reset(),e.queue.writeBuffer(this.flipUniformBuffer,0,new Uint32Array([1])),FM.size=4,FM.usage=GPUBufferUsage.UNIFORM,this.noFlipUniformBuffer=e.createBuffer(FM),FM.reset(),this.transferPipelines={},VM.label=`mipmap`,VM.code=` -struct VarysStruct { - @builtin( position ) Position: vec4f, - @location( 0 ) vTex : vec2f, - @location( 1 ) @interpolate(flat, either) vBaseArrayLayer: u32, -}; - -@group( 0 ) @binding ( 2 ) -var flipY: u32; - -@vertex -fn mainVS( - @builtin( vertex_index ) vertexIndex : u32, - @builtin( instance_index ) instanceIndex : u32 ) -> VarysStruct { - - var Varys : VarysStruct; - - var pos = array( - vec2f( -1, -1 ), - vec2f( -1, 3 ), - vec2f( 3, -1 ), - ); - - let p = pos[ vertexIndex ]; - let mult = select( vec2f( 0.5, -0.5 ), vec2f( 0.5, 0.5 ), flipY != 0 ); - Varys.vTex = p * mult + vec2f( 0.5 ); - Varys.Position = vec4f( p, 0, 1 ); - Varys.vBaseArrayLayer = instanceIndex; - - return Varys; - -} - -@group( 0 ) @binding( 0 ) -var imgSampler : sampler; - -@group( 0 ) @binding( 1 ) -var img2d : texture_2d; - -@fragment -fn main_2d( Varys: VarysStruct ) -> @location( 0 ) vec4 { - - return textureSample( img2d, imgSampler, Varys.vTex ); - -} - -@group( 0 ) @binding( 1 ) -var img2dArray : texture_2d_array; - -@fragment -fn main_2d_array( Varys: VarysStruct ) -> @location( 0 ) vec4 { - - return textureSample( img2dArray, imgSampler, Varys.vTex, Varys.vBaseArrayLayer ); - -} - -const faceMat = array( - mat3x3f( 0, 0, -2, 0, -2, 0, 1, 1, 1 ), // pos-x - mat3x3f( 0, 0, 2, 0, -2, 0, -1, 1, -1 ), // neg-x - mat3x3f( 2, 0, 0, 0, 0, 2, -1, 1, -1 ), // pos-y - mat3x3f( 2, 0, 0, 0, 0, -2, -1, -1, 1 ), // neg-y - mat3x3f( 2, 0, 0, 0, -2, 0, -1, 1, 1 ), // pos-z - mat3x3f( -2, 0, 0, 0, -2, 0, 1, 1, -1 ), // neg-z -); - -@group( 0 ) @binding( 1 ) -var imgCube : texture_cube; - -@fragment -fn main_cube( Varys: VarysStruct ) -> @location( 0 ) vec4 { - - return textureSample( imgCube, imgSampler, faceMat[ Varys.vBaseArrayLayer ] * vec3f( fract( Varys.vTex ), 1 ) ); - -} -`,this.mipmapShaderModule=e.createShaderModule(VM),VM.reset()}getTransferPipeline(e,t){t||=`2d-array`;let n=`${e}-${t}`,r=this.transferPipelines[n];return r===void 0&&(zM.label=`mipmap-${e}-${t}`,zM.vertex={module:this.mipmapShaderModule},zM.fragment={module:this.mipmapShaderModule,entryPoint:`main_${t.replace(`-`,`_`)}`,targets:[{format:e}]},zM.layout=`auto`,r=this.device.createRenderPipeline(zM),zM.reset(),this.transferPipelines[n]=r),r}flipY(e,t,n=0){let r=t.format,{width:i,height:a}=t.size;HM.size.width=i,HM.size.height=a,HM.format=r,HM.usage=GPUTextureUsage.RENDER_ATTACHMENT|GPUTextureUsage.TEXTURE_BINDING;let o=this.device.createTexture(HM);HM.reset();let s=this.getTransferPipeline(r,e.textureBindingViewDimension),c=this.getTransferPipeline(r,o.textureBindingViewDimension),l=this.device.createCommandEncoder(IM),u=(e,t,n,r,i,a)=>{let o=e.getBindGroupLayout(0);UM.dimension=t.textureBindingViewDimension||`2d-array`,UM.mipLevelCount=1;let s=t.createView(UM);UM.reset(),PM.layout=o,PM.entries.push({binding:0,resource:this.flipYSampler},{binding:1,resource:s},{binding:2,resource:{buffer:a?this.flipUniformBuffer:this.noFlipUniformBuffer}});let c=this.device.createBindGroup(PM);PM.reset(),UM.dimension=`2d`,UM.mipLevelCount=1,UM.baseArrayLayer=i,UM.arrayLayerCount=1;let u=r.createView(UM);UM.reset(),BM.view=u,BM.loadOp=Xj.Clear,BM.storeOp=Yj.Store,RM.colorAttachments.push(BM);let d=l.beginRenderPass(RM);RM.reset(),BM.reset(),d.setPipeline(e),d.setBindGroup(0,c),d.draw(3,1,0,n),d.end()};u(s,e,n,o,0,!1),u(c,o,0,e,n,!0),SM(this.device,l.finish()),o.destroy()}generateMipmaps(e,t=null){let n=this.get(e),r=n.layers||this._mipmapCreateBundles(e),i=t;i===null&&(IM.label=`mipmapEncoder`,i=this.device.createCommandEncoder(IM),IM.reset()),this._mipmapRunBundles(i,r),t===null&&SM(this.device,i.finish()),n.layers=r}_mipmapCreateBundles(e){let t=e.textureBindingViewDimension||`2d-array`,n=this.getTransferPipeline(e.format,t),r=n.getBindGroupLayout(0),i=[];for(let a=1;a0)for(let t=0,a=r.length;t0){for(let r of e.layerUpdates)this._copyBufferToTexture(t.image,n.texture,i,r,e.flipY,r);e.clearLayerUpdates()}else for(let r=0;r0?(this._copyCompressedBufferToTexture(e.mipmaps,n.texture,i,e.layerUpdates),e.clearLayerUpdates()):this._copyCompressedBufferToTexture(e.mipmaps,n.texture,i);else if(e.isCubeTexture)this._copyCubeMapToTexture(e,n.texture,i);else if(e.isHTMLTexture){let t=this.backend.device,r=this.backend.renderer.domElement,a=e.image;if(typeof t.queue.copyElementImageToTexture!=`function`)return;if(!n.hasPaintCallback){n.hasPaintCallback=!0,r.requestPaint();return}let o=i.size.width,s=i.size.height;t.queue.copyElementImageToTexture.length===2?t.queue.copyElementImageToTexture({source:a},{destination:{texture:n.texture},width:o,height:s}):t.queue.copyElementImageToTexture(a,o,s,{texture:n.texture}),e.flipY&&this._flipY(n.texture,i)}else if(r.length>0)for(let t=0,a=r.length;t0?e.width:n.size.width,l=o>0?e.height:n.size.height;iN.source=e,iN.flipY=i,aN.texture=t,aN.mipLevel=o,aN.origin.z=r,aN.premultipliedAlpha=a,sN.width=c,sN.height=l;try{s.queue.copyExternalImageToTexture(iN,aN,sN)}catch{}finally{iN.reset(),aN.reset(),sN.reset()}}_getPassUtils(){let e=this._passUtils;return e===null&&(this._passUtils=e=new WM(this.backend.device)),e}_generateMipmaps(e,t=null){this._getPassUtils().generateMipmaps(e,t)}_flipY(e,t,n=0){this._getPassUtils().flipY(e,t,n)}_copyBufferToTexture(e,t,n,r,i,a=0,o=0){let s=this.backend.device,c=e.data,l=this._getBytesPerTexel(n.format),u=e.width*l;tN.texture=t,tN.mipLevel=o,tN.origin.z=r,rN.offset=e.width*e.height*l*a,rN.bytesPerRow=u,sN.width=e.width,sN.height=e.height,s.queue.writeTexture(tN,c,rN,sN),tN.reset(),rN.reset(),sN.reset(),i===!0&&this._flipY(t,n,r)}_copyCompressedBufferToTexture(e,t,n,r=null){let i=this.backend.device,a=this._getBlockData(n.format),o=n.size.depthOrArrayLayers>1,s=r&&r.size>0?r:null;for(let r=0;r]*\s*([a-z_0-9]+(?:<[\s\S]+?>)?)/i,mN=/([a-z_0-9]+)\s*:\s*([a-z_0-9]+(?:<[\s\S]+?>)?)/gi,hN={f32:`float`,i32:`int`,u32:`uint`,bool:`bool`,"vec2":`vec2`,"vec2":`ivec2`,"vec2":`uvec2`,"vec2":`bvec2`,vec2f:`vec2`,vec2i:`ivec2`,vec2u:`uvec2`,vec2b:`bvec2`,"vec3":`vec3`,"vec3":`ivec3`,"vec3":`uvec3`,"vec3":`bvec3`,vec3f:`vec3`,vec3i:`ivec3`,vec3u:`uvec3`,vec3b:`bvec3`,"vec4":`vec4`,"vec4":`ivec4`,"vec4":`uvec4`,"vec4":`bvec4`,vec4f:`vec4`,vec4i:`ivec4`,vec4u:`uvec4`,vec4b:`bvec4`,"mat2x2":`mat2`,mat2x2f:`mat2`,"mat3x3":`mat3`,mat3x3f:`mat3`,"mat4x4":`mat4`,mat4x4f:`mat4`,sampler:`sampler`,texture_1d:`texture`,texture_2d:`texture`,texture_2d_array:`texture`,texture_multisampled_2d:`cubeTexture`,texture_depth_2d:`depthTexture`,texture_depth_2d_array:`depthTexture`,texture_depth_multisampled_2d:`depthTexture`,texture_depth_cube:`depthTexture`,texture_depth_cube_array:`depthTexture`,texture_3d:`texture3D`,texture_cube:`cubeTexture`,texture_cube_array:`cubeTexture`,texture_storage_1d:`storageTexture`,texture_storage_2d:`storageTexture`,texture_storage_2d_array:`storageTexture`,texture_storage_3d:`storageTexture`},gN=e=>{e=e.trim();let t=e.match(pN);if(t!==null&&t.length===4){let n=t[2],r=[],i=null;for(;(i=mN.exec(n))!==null;)r.push({name:i[1],type:i[2]});let a=[];for(let e=0;e `+this.outputType;return`fn ${e} ( ${this.inputsCode.trim()} ) ${t}`+this.blockCode}},vN=class extends cA{parseFunction(e){return new _N(e)}},yN={[Qs.READ_ONLY]:`read`,[Qs.WRITE_ONLY]:`write`,[Qs.READ_WRITE]:`read_write`},bN={[r]:`repeat`,[i]:`clamp`,[a]:`mirror`},xN={vertex:qj.VERTEX,fragment:qj.FRAGMENT,compute:qj.COMPUTE},SN={instance:!0,swizzleAssign:!1,storageBuffer:!0},CN={"^^":`tsl_xor`},wN={float:`f32`,int:`i32`,uint:`u32`,bool:`bool`,color:`vec3`,vec2:`vec2`,ivec2:`vec2`,uvec2:`vec2`,bvec2:`vec2`,vec3:`vec3`,ivec3:`vec3`,uvec3:`vec3`,bvec3:`vec3`,vec4:`vec4`,ivec4:`vec4`,uvec4:`vec4`,bvec4:`vec4`,mat2:`mat2x2`,mat3:`mat3x3`,mat4:`mat4x4`},TN={},EN={tsl_xor:new fT(`fn tsl_xor( a : bool, b : bool ) -> bool { return ( a || b ) && !( a && b ); }`),mod_float:new fT(`fn tsl_mod_float( x : f32, y : f32 ) -> f32 { return x - y * floor( x / y ); }`),mod_vec2:new fT(`fn tsl_mod_vec2( x : vec2f, y : vec2f ) -> vec2f { return x - y * floor( x / y ); }`),mod_vec3:new fT(`fn tsl_mod_vec3( x : vec3f, y : vec3f ) -> vec3f { return x - y * floor( x / y ); }`),mod_vec4:new fT(`fn tsl_mod_vec4( x : vec4f, y : vec4f ) -> vec4f { return x - y * floor( x / y ); }`),equals_bool:new fT(`fn tsl_equals_bool( a : bool, b : bool ) -> bool { return a == b; }`),equals_bvec2:new fT(`fn tsl_equals_bvec2( a : vec2f, b : vec2f ) -> vec2 { return vec2( a.x == b.x, a.y == b.y ); }`),equals_bvec3:new fT(`fn tsl_equals_bvec3( a : vec3f, b : vec3f ) -> vec3 { return vec3( a.x == b.x, a.y == b.y, a.z == b.z ); }`),equals_bvec4:new fT(`fn tsl_equals_bvec4( a : vec4f, b : vec4f ) -> vec4 { return vec4( a.x == b.x, a.y == b.y, a.z == b.z, a.w == b.w ); }`),repeatWrapping_float:new fT(`fn tsl_repeatWrapping_float( coord: f32 ) -> f32 { return fract( coord ); }`),mirrorWrapping_float:new fT(`fn tsl_mirrorWrapping_float( coord: f32 ) -> f32 { let mirrored = fract( coord * 0.5 ) * 2.0; return 1.0 - abs( 1.0 - mirrored ); }`),clampWrapping_float:new fT(`fn tsl_clampWrapping_float( coord: f32 ) -> f32 { return clamp( coord, 0.0, 1.0 ); }`),inverse_mat2:new fT(` -fn tsl_inverse_mat2( m : mat2x2 ) -> mat2x2 { - - let det = m[ 0 ][ 0 ] * m[ 1 ][ 1 ] - m[ 0 ][ 1 ] * m[ 1 ][ 0 ]; - - return mat2x2( - m[ 1 ][ 1 ], - m[ 0 ][ 1 ], - - m[ 1 ][ 0 ], m[ 0 ][ 0 ] - ) * ( 1.0 / det ); - -} -`),inverse_mat3:new fT(` -fn tsl_inverse_mat3( m : mat3x3 ) -> mat3x3 { - - let a00 = m[ 0 ][ 0 ]; let a01 = m[ 0 ][ 1 ]; let a02 = m[ 0 ][ 2 ]; - let a10 = m[ 1 ][ 0 ]; let a11 = m[ 1 ][ 1 ]; let a12 = m[ 1 ][ 2 ]; - let a20 = m[ 2 ][ 0 ]; let a21 = m[ 2 ][ 1 ]; let a22 = m[ 2 ][ 2 ]; - - let b01 = a22 * a11 - a12 * a21; - let b11 = - a22 * a10 + a12 * a20; - let b21 = a21 * a10 - a11 * a20; - - let det = a00 * b01 + a01 * b11 + a02 * b21; - - return mat3x3( - b01, ( - a22 * a01 + a02 * a21 ), ( a12 * a01 - a02 * a11 ), - b11, ( a22 * a00 - a02 * a20 ), ( - a12 * a00 + a02 * a10 ), - b21, ( - a21 * a00 + a01 * a20 ), ( a11 * a00 - a01 * a10 ) - ) * ( 1.0 / det ); - -} -`),inverse_mat4:new fT(` -fn tsl_inverse_mat4( m : mat4x4 ) -> mat4x4 { - - let a00 = m[ 0 ][ 0 ]; let a01 = m[ 0 ][ 1 ]; let a02 = m[ 0 ][ 2 ]; let a03 = m[ 0 ][ 3 ]; - let a10 = m[ 1 ][ 0 ]; let a11 = m[ 1 ][ 1 ]; let a12 = m[ 1 ][ 2 ]; let a13 = m[ 1 ][ 3 ]; - let a20 = m[ 2 ][ 0 ]; let a21 = m[ 2 ][ 1 ]; let a22 = m[ 2 ][ 2 ]; let a23 = m[ 2 ][ 3 ]; - let a30 = m[ 3 ][ 0 ]; let a31 = m[ 3 ][ 1 ]; let a32 = m[ 3 ][ 2 ]; let a33 = m[ 3 ][ 3 ]; - - let b00 = a00 * a11 - a01 * a10; - let b01 = a00 * a12 - a02 * a10; - let b02 = a00 * a13 - a03 * a10; - let b03 = a01 * a12 - a02 * a11; - let b04 = a01 * a13 - a03 * a11; - let b05 = a02 * a13 - a03 * a12; - let b06 = a20 * a31 - a21 * a30; - let b07 = a20 * a32 - a22 * a30; - let b08 = a20 * a33 - a23 * a30; - let b09 = a21 * a32 - a22 * a31; - let b10 = a21 * a33 - a23 * a31; - let b11 = a22 * a33 - a23 * a32; - - let det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06; - - return mat4x4( - a11 * b11 - a12 * b10 + a13 * b09, - a02 * b10 - a01 * b11 - a03 * b09, - a31 * b05 - a32 * b04 + a33 * b03, - a22 * b04 - a21 * b05 - a23 * b03, - a12 * b08 - a10 * b11 - a13 * b07, - a00 * b11 - a02 * b08 + a03 * b07, - a32 * b02 - a30 * b05 - a33 * b01, - a20 * b05 - a22 * b02 + a23 * b01, - a10 * b10 - a11 * b08 + a13 * b06, - a01 * b08 - a00 * b10 - a03 * b06, - a30 * b04 - a31 * b02 + a33 * b00, - a21 * b02 - a20 * b04 - a23 * b00, - a11 * b07 - a10 * b09 - a12 * b06, - a00 * b09 - a01 * b07 + a02 * b06, - a31 * b01 - a30 * b03 - a32 * b00, - a20 * b03 - a21 * b01 + a22 * b00 - ) * ( 1.0 / det ); - -} -`),biquadraticTexture:new fT(` -fn tsl_biquadraticTexture( map : texture_2d, coord : vec2f, iRes : vec2u, level : u32 ) -> vec4f { - - let res = vec2f( iRes ); - - let uvScaled = coord * res; - let uvWrapping = ( ( uvScaled % res ) + res ) % res; - - // https://www.shadertoy.com/view/WtyXRy - - let uv = uvWrapping - 0.5; - let iuv = floor( uv ); - let f = fract( uv ); - - let rg1 = textureLoad( map, vec2u( iuv + vec2( 0.5, 0.5 ) ) % iRes, level ); - let rg2 = textureLoad( map, vec2u( iuv + vec2( 1.5, 0.5 ) ) % iRes, level ); - let rg3 = textureLoad( map, vec2u( iuv + vec2( 0.5, 1.5 ) ) % iRes, level ); - let rg4 = textureLoad( map, vec2u( iuv + vec2( 1.5, 1.5 ) ) % iRes, level ); - - return mix( mix( rg1, rg2, f.x ), mix( rg3, rg4, f.x ), f.y ); - -} -`),biquadraticTextureArray:new fT(` -fn tsl_biquadraticTexture_array( map : texture_2d_array, coord : vec2f, iRes : vec2u, layer : u32, level : u32 ) -> vec4f { - - let res = vec2f( iRes ); - - let uvScaled = coord * res; - let uvWrapping = ( ( uvScaled % res ) + res ) % res; - - // https://www.shadertoy.com/view/WtyXRy - - let uv = uvWrapping - 0.5; - let iuv = floor( uv ); - let f = fract( uv ); - - let rg1 = textureLoad( map, vec2u( iuv + vec2( 0.5, 0.5 ) ) % iRes, layer, level ); - let rg2 = textureLoad( map, vec2u( iuv + vec2( 1.5, 0.5 ) ) % iRes, layer, level ); - let rg3 = textureLoad( map, vec2u( iuv + vec2( 0.5, 1.5 ) ) % iRes, layer, level ); - let rg4 = textureLoad( map, vec2u( iuv + vec2( 1.5, 1.5 ) ) % iRes, layer, level ); - - return mix( mix( rg1, rg2, f.x ), mix( rg3, rg4, f.x ), f.y ); - -} -`)},DN={dFdx:`dpdx`,dFdy:`- dpdy`,mod_float:`tsl_mod_float`,mod_vec2:`tsl_mod_vec2`,mod_vec3:`tsl_mod_vec3`,mod_vec4:`tsl_mod_vec4`,equals_bool:`tsl_equals_bool`,equals_bvec2:`tsl_equals_bvec2`,equals_bvec3:`tsl_equals_bvec3`,equals_bvec4:`tsl_equals_bvec4`,inverse_mat2:`tsl_inverse_mat2`,inverse_mat3:`tsl_inverse_mat3`,inverse_mat4:`tsl_inverse_mat4`,inversesqrt:`inverseSqrt`,bitcast:`bitcast`,floatpack_snorm_2x16:`pack2x16snorm`,floatpack_unorm_2x16:`pack2x16unorm`,floatpack_float16_2x16:`pack2x16float`,floatunpack_snorm_2x16:`unpack2x16snorm`,floatunpack_unorm_2x16:`unpack2x16unorm`,floatunpack_float16_2x16:`unpack2x16float`},ON=``;(typeof navigator<`u`&&/Firefox|Deno/g.test(navigator.userAgent))!==!0&&(ON+=`diagnostic( off, derivative_uniformity ); -`);var kN=class extends qk{constructor(e,t){super(e,t,new vN),this.uniformGroups={},this.uniformGroupsBindings={},this.builtins={},this.directives={},this.scopedArrays=new Map,this.allowEarlyReturns=!0,this.allowGlobalVariables=!0}_generateTextureSample(e,t,n,r,i,a=this.shaderStage){return a===`fragment`?r?i?`textureSample( ${t}, ${t}_sampler, ${n}, ${r}, ${i} )`:`textureSample( ${t}, ${t}_sampler, ${n}, ${r} )`:i?`textureSample( ${t}, ${t}_sampler, ${n}, ${i} )`:`textureSample( ${t}, ${t}_sampler, ${n} )`:this.generateTextureSampleLevel(e,t,n,`0`,r)}generateTextureSampleLevel(e,t,n,r,i,a){return this.isUnfilterable(e)===!1?i?a?`textureSampleLevel( ${t}, ${t}_sampler, ${n}, ${i}, ${r}, ${a} )`:`textureSampleLevel( ${t}, ${t}_sampler, ${n}, ${i}, ${r} )`:a?`textureSampleLevel( ${t}, ${t}_sampler, ${n}, ${r}, ${a} )`:`textureSampleLevel( ${t}, ${t}_sampler, ${n}, ${r} )`:this.isFilteredTexture(e)?this.generateFilteredTexture(e,t,n,a,r,i):this.generateTextureLod(e,t,n,i,a,r)}generateWrapFunction(e){let t=`tsl_coord_${bN[e.wrapS]}S_${bN[e.wrapT]}T_${e.is3DTexture||e.isData3DTexture?`3d`:`2d`}`,n=TN[t];if(n===void 0){let r=[],i=e.is3DTexture||e.isData3DTexture?`vec3f`:`vec2f`,a=`fn ${t}( coord : ${i} ) -> ${i} {\n\n\treturn ${i}(\n`,o=(e,t)=>{e===1e3?(r.push(EN.repeatWrapping_float),a+=`\t\ttsl_repeatWrapping_float( coord.${t} )`):e===1001?(r.push(EN.clampWrapping_float),a+=`\t\ttsl_clampWrapping_float( coord.${t} )`):e===1002?(r.push(EN.mirrorWrapping_float),a+=`\t\ttsl_mirrorWrapping_float( coord.${t} )`):(a+=`\t\tcoord.${t}`,T(`WebGPURenderer: Unsupported texture wrap type "${e}" for vertex shader.`))};o(e.wrapS,`x`),a+=`, -`,o(e.wrapT,`y`),(e.is3DTexture||e.isData3DTexture)&&(a+=`, -`,o(e.wrapR,`z`)),a+=` - ); - -} -`,TN[t]=n=new fT(a,r)}return n.build(this),t}generateArrayDeclaration(e,t){return`array< ${this.getType(e)}, ${t} >`}generateTextureDimension(e,t,n){let r=this.getDataFromNode(e,this.shaderStage,this.cache);r.dimensionsSnippet===void 0&&(r.dimensionsSnippet={});let i=r.dimensionsSnippet[n];if(r.dimensionsSnippet[n]===void 0){let a,o,{primarySamples:s}=this.renderer.backend.utils.getTextureSampleData(e),c=s>1;o=e.is3DTexture||e.isData3DTexture?`vec3`:`vec2`,a=c||e.isStorageTexture?t:`${t}${n?`, u32( ${n} )`:``}`,i=new yf(new mp(`textureDimensions( ${a} )`,o)),r.dimensionsSnippet[n]=i,(e.isArrayTexture||e.isDataArrayTexture||e.is3DTexture||e.isData3DTexture)&&(r.arrayLayerCount=new yf(new mp(`textureNumLayers(${t})`,`u32`))),e.isTextureCube&&(r.cubeFaceCount=new yf(new mp(`6u`,`u32`)))}return i.build(this)}generateFilteredTexture(e,t,n,r,i=`0u`,a){let o=this.generateWrapFunction(e),s=this.generateTextureDimension(e,t,i);return r&&(n=`${n} + vec2(${r}) / ${s}`),a?(this._include(`biquadraticTextureArray`),`tsl_biquadraticTexture_array( ${t}, ${o}( ${n} ), ${s}, u32( ${a} ), u32( ${i} ) )`):(this._include(`biquadraticTexture`),`tsl_biquadraticTexture( ${t}, ${o}( ${n} ), ${s}, u32( ${i} ) )`)}generateTextureLod(e,t,n,r,i,a=`0u`){if(e.isCubeTexture===!0){i&&(n=`${n} + vec3(${i})`);let r=e.isDepthTexture?`u32`:`f32`;return`textureSampleLevel( ${t}, ${t}_sampler, ${n}, ${r}( ${a} ) )`}let o=this.generateWrapFunction(e),s=this.generateTextureDimension(e,t,a),c=e.is3DTexture||e.isData3DTexture?`vec3`:`vec2`,l=c===`vec3`?`vec3( 1, 1, 1 )`:`vec2( 1, 1 )`;i&&(n=`${n} + ${c}(${i}) / ${c}( ${s} )`);let u=`${c}( 0 )`,d=`${c}( ${s} - ${l} )`;return n=`${c}( clamp( floor( ${o}( ${n} ) * ${c}( ${s} ) ), ${u}, ${d} ) )`,this.generateTextureLoad(e,t,n,a,r,null)}generateStorageTextureLoad(e,t,n,r,i,a){a&&(n=`${n} + ${a}`);let o;return o=i?`textureLoad( ${t}, ${n}, ${i} )`:`textureLoad( ${t}, ${n} )`,o}generateTextureLoad(e,t,n,r,i,a){r===null&&(r=`0u`),a&&(n=`${n} + ${a}`);let o;return i?o=`textureLoad( ${t}, ${n}, ${i}, u32( ${r} ) )`:(o=`textureLoad( ${t}, ${n}, u32( ${r} ) )`,this.renderer.backend.compatibilityMode&&e.isDepthTexture&&(o+=`.x`)),o}generateTextureStore(e,t,n,r,i){let a;return a=r?`textureStore( ${t}, ${n}, ${r}, ${i} )`:`textureStore( ${t}, ${n}, ${i} )`,a}isSampleCompare(e){return e.isDepthTexture===!0&&e.compareFunction!==null&&this.renderer.hasCompatibility(_t.TEXTURE_COMPARE)}isUnfilterable(e){return this.getComponentTypeFromTexture(e)!==`float`||!this.isAvailable(`float32Filterable`)&&e.type===1015||this.isSampleCompare(e)===!1&&e.minFilter===1003&&e.magFilter===1003||this.renderer.backend.utils.getTextureSampleData(e).primarySamples>1}generateTexture(e,t,n,r,i,a=this.shaderStage){let o=null;return o=this.isUnfilterable(e)?this.generateTextureLod(e,t,n,r,i,`0`,a):this._generateTextureSample(e,t,n,r,i,a),o}generateTextureGrad(e,t,n,r,i,a,o=this.shaderStage){if(o===`fragment`)return i?a?`textureSampleGrad( ${t}, ${t}_sampler, ${n}, ${i}, ${r[0]}, ${r[1]}, ${a} )`:`textureSampleGrad( ${t}, ${t}_sampler, ${n}, ${i}, ${r[0]}, ${r[1]} )`:a?`textureSampleGrad( ${t}, ${t}_sampler, ${n}, ${r[0]}, ${r[1]}, ${a} )`:`textureSampleGrad( ${t}, ${t}_sampler, ${n}, ${r[0]}, ${r[1]} )`;E(`WebGPURenderer: THREE.TextureNode.gradient() does not support ${o} shader.`)}generateTextureCompare(e,t,n,r,i,a,o=this.shaderStage){if(o===`fragment`)return e.isDepthTexture===!0&&e.isArrayTexture===!0?a?`textureSampleCompare( ${t}, ${t}_sampler, ${n}, ${i}, ${r}, ${a} )`:`textureSampleCompare( ${t}, ${t}_sampler, ${n}, ${i}, ${r} )`:a?`textureSampleCompare( ${t}, ${t}_sampler, ${n}, ${r}, ${a} )`:`textureSampleCompare( ${t}, ${t}_sampler, ${n}, ${r} )`;E(`WebGPURenderer: THREE.DepthTexture.compareFunction() does not support ${o} shader.`)}generateTextureGather(e,t,n,r,i,a){let o=e.isDepthTexture===!0?``:`${r}, `;return i?a?`textureGather( ${o}${t}, ${t}_sampler, ${n}, ${i}, ${a} )`:`textureGather( ${o}${t}, ${t}_sampler, ${n}, ${i} )`:a?`textureGather( ${o}${t}, ${t}_sampler, ${n}, ${a} )`:`textureGather( ${o}${t}, ${t}_sampler, ${n})`}generateTextureGatherCompare(e,t,n,r,i,a){return i?a?`textureGatherCompare( ${t}, ${t}_sampler, ${n}, ${i}, ${r}, ${a} )`:`textureGatherCompare( ${t}, ${t}_sampler, ${n}, ${i}, ${r})`:a?`textureGatherCompare( ${t}, ${t}_sampler, ${n}, ${r}, ${a} )`:`textureGatherCompare( ${t}, ${t}_sampler, ${n}, ${r})`}generateTextureLevel(e,t,n,r,i,a){return this.isUnfilterable(e)===!1?i?a?`textureSampleLevel( ${t}, ${t}_sampler, ${n}, ${i}, ${r}, ${a} )`:`textureSampleLevel( ${t}, ${t}_sampler, ${n}, ${i}, ${r} )`:a?`textureSampleLevel( ${t}, ${t}_sampler, ${n}, ${r}, ${a} )`:`textureSampleLevel( ${t}, ${t}_sampler, ${n}, ${r} )`:this.isFilteredTexture(e)?this.generateFilteredTexture(e,t,n,a,r,i):this.generateTextureLod(e,t,n,i,a,r)}generateTextureBias(e,t,n,r,i,a,o=this.shaderStage){if(o===`fragment`)return i?a?`textureSampleBias( ${t}, ${t}_sampler, ${n}, ${i}, ${r}, ${a} )`:`textureSampleBias( ${t}, ${t}_sampler, ${n}, ${i}, ${r} )`:a?`textureSampleBias( ${t}, ${t}_sampler, ${n}, ${r}, ${a} )`:`textureSampleBias( ${t}, ${t}_sampler, ${n}, ${r} )`;E(`WebGPURenderer: THREE.TextureNode.biasNode does not support ${o} shader.`)}getPropertyName(e,t=this.shaderStage){if(e.isNodeVarying===!0&&e.needsInterpolation===!0){if(t===`vertex`)return`varyings.${e.name}`}else if(e.isNodeUniform===!0){let t=e.name,n=e.type;return n===`texture`||n===`cubeTexture`||n===`cubeDepthTexture`||n===`storageTexture`||n===`texture3D`?t:n===`buffer`||n===`storageBuffer`||n===`indirectStorageBuffer`?this.isCustomStruct(e)?t:t+`.value`:e.groupNode.name+`.`+t}return super.getPropertyName(e)}getOutputStructName(){return`output`}getFunctionOperator(e){let t=CN[e];return t===void 0?null:(this._include(t),t)}getNodeAccess(e,t){return t===`compute`?e.access:e.isAtomic===!0?(T(`WebGPURenderer: Atomic operations are only supported in compute shaders.`),Qs.READ_WRITE):Qs.READ_ONLY}getStorageAccess(e,t){return yN[this.getNodeAccess(e,t)]}getUniformFromNode(e,t,n,r=null){let i=super.getUniformFromNode(e,t,n,r),a=this.getDataFromNode(e,n,this.globalCache);if(a.uniformGPU===void 0){let o,s=e.groupNode,c=s.name,l=this.getBindGroupArray(c,n);if(t===`texture`||t===`cubeTexture`||t===`cubeDepthTexture`||t===`storageTexture`||t===`texture3D`){let r=null,a=this.getNodeAccess(e,n);if(t===`texture`||t===`storageTexture`?r=e.value.is3DTexture===!0?new mj(i.name,i.node,s,a):new fj(i.name,i.node,s,a):t===`cubeTexture`||t===`cubeDepthTexture`?r=new pj(i.name,i.node,s,a):t===`texture3D`&&(r=new mj(i.name,i.node,s,a)),r.store=e.isStorageTextureNode===!0,r.mipLevel=r.store?e.mipLevel:0,r.setVisibility(xN[n]),e.value.isCubeTexture===!0||this.isUnfilterable(e.value)===!1&&r.store===!1||e.gatherNode!==null){let e=new gM(`${i.name}_sampler`,i.node,s);e.setVisibility(xN[n]),l.push(e,r),o=[e,r]}else l.push(r),o=[r]}else if(t===`buffer`||t===`storageBuffer`||t===`indirectStorageBuffer`){let a=this.getSharedDataFromNode(e),c=a.buffer;c===void 0&&(c=new(t===`buffer`?rj:yM)(e,s),a.buffer=c),c.setVisibility(c.getVisibility()|xN[n]),l.push(c),o=c,i.name=r||`NodeBuffer_`+i.id}else{let e=this.uniformGroups[c];e===void 0&&(e=new cj(c,s),e.setVisibility(qj.VERTEX|qj.FRAGMENT|qj.COMPUTE),this.uniformGroups[c]=e),l.indexOf(e)===-1&&l.push(e),o=this.getNodeUniform(i,t);let n=o.name;e.uniforms.some(e=>e.name===n)||e.addUniform(o)}a.uniformGPU=o}return i}getBuiltin(e,t,n,r=this.shaderStage){let i=this.builtins[r]||(this.builtins[r]=new Map);return i.has(e)===!1&&i.set(e,{name:e,property:t,type:n}),t}hasBuiltin(e,t=this.shaderStage){return this.builtins[t]!==void 0&&this.builtins[t].has(e)}getVertexIndex(){return this.shaderStage===`vertex`?this.getBuiltin(`vertex_index`,`vertexIndex`,`u32`,`attribute`):`vertexIndex`}buildFunctionCode(e){let t=e.layout,n=this.flowShaderNode(e),r=[];for(let e of t.inputs)r.push(e.name+` : `+this.getType(e.type));let i=`fn ${t.name}( ${r.join(`, `)} ) -> ${this.getType(t.type)} { -${n.vars} -${n.code} -`;return n.result&&(i+=`\treturn ${n.result};\n`),i+=` -} -`,i}getInstanceIndex(){return this.shaderStage===`vertex`?this.getBuiltin(`instance_index`,`instanceIndex`,`u32`,`attribute`):`instanceIndex`}getInvocationLocalIndex(){return this.getBuiltin(`local_invocation_index`,`invocationLocalIndex`,`u32`,`attribute`)}getSubgroupSize(){return this.enableSubGroups(),this.getBuiltin(`subgroup_size`,`subgroupSize`,`u32`,`attribute`)}getInvocationSubgroupIndex(){return this.enableSubGroups(),this.getBuiltin(`subgroup_invocation_id`,`invocationSubgroupIndex`,`u32`,`attribute`)}getSubgroupIndex(){return this.enableSubGroups(),this.getBuiltin(`subgroup_id`,`subgroupIndex`,`u32`,`attribute`)}getDrawIndex(){return null}getFrontFacing(){return this.getBuiltin(`front_facing`,`isFront`,`bool`)}getFragCoord(){return this.getBuiltin(`position`,`fragCoord`,`vec4`)+`.xy`}getFragDepth(){return`output.`+this.getBuiltin(`frag_depth`,`depth`,`f32`,`output`)}getClipDistance(){return`varyings.hw_clip_distances`}isFlipY(){return!1}enableDirective(e,t=this.shaderStage){(this.directives[t]||(this.directives[t]=new Set)).add(e)}getDirectives(e){let t=[],n=this.directives[e];if(n!==void 0)for(let e of n)t.push(`enable ${e};`);return t.join(` -`)}enableSubGroups(){this.enableDirective(`subgroups`)}enableSubgroupsF16(){this.enableDirective(`subgroups-f16`)}enableClipDistances(){this.enableDirective(`clip_distances`)}enableShaderF16(){this.enableDirective(`f16`)}enableDualSourceBlending(){this.enableDirective(`dual_source_blending`)}enableHardwareClipping(e){this.enableClipDistances(),this.getBuiltin(`clip_distances`,`hw_clip_distances`,`array`,`vertex`)}getBuiltins(e){let t=[],n=this.builtins[e];if(n!==void 0)for(let{name:e,property:r,type:i}of n.values())t.push(`@builtin( ${e} ) ${r} : ${i}`);return t.join(`, - `)}getScopedArray(e,t,n,r){return this.scopedArrays.has(e)===!1&&this.scopedArrays.set(e,{name:e,scope:t,bufferType:n,bufferCount:r}),e}getScopedArrays(e){if(e!==`compute`)return;let t=[];for(let{name:e,scope:n,bufferType:r,bufferCount:i}of this.scopedArrays.values()){let a=this.getType(r);t.push(`var<${n}> ${e}: array< ${a}, ${i} >;`)}return t.join(` -`)}getAttributes(e){let t=[];if(e===`compute`&&(this.getBuiltin(`global_invocation_id`,`globalId`,`vec3`,`attribute`),this.getBuiltin(`workgroup_id`,`workgroupId`,`vec3`,`attribute`),this.getBuiltin(`local_invocation_id`,`localId`,`vec3`,`attribute`),this.getBuiltin(`num_workgroups`,`numWorkgroups`,`vec3`,`attribute`),this.renderer.hasFeature(`subgroups`)&&(this.enableDirective(`subgroups`,e),this.getBuiltin(`subgroup_size`,`subgroupSize`,`u32`,`attribute`))),e===`vertex`||e===`compute`){let e=this.getBuiltins(`attribute`);e&&t.push(e);let n=this.getAttributesArray();for(let e=0,r=n.length;e`),t.push(`\t${r+n.name} : ${i}`)}return e.output&&t.push(`\t${this.getBuiltins(`output`)}`),t.join(`, -`)}getStructs(e){let t=``,n=this.structs[e];if(n.length>0){let e=[];for(let t of n){let n=`struct ${t.name} {\n`;n+=this.getStructMembers(t),n+=` -};`,e.push(n)}t=` -`+e.join(` - -`)+` -`}return t}getVar(e,t,n=null,r=``){let i=`var${r} ${t} : `;return n===null?i+=this.getType(e):i+=this.generateArrayDeclaration(e,n),i}getVars(e,t=!1){let n=``;t&&(n=``);let r=[],i=this.vars[e];if(i!==void 0)for(let e of i)r.push(`${this.getVar(e.type,e.name,e.count,n)};`);return t?r.join(` -`):`\n\t${r.join(` - `)}\n`}getVaryings(e){let t=[];if(e===`vertex`&&this.getBuiltin(`position`,`builtinClipSpace`,`vec4`,`vertex`),e===`vertex`||e===`fragment`){let n=this.varyings,r=this.vars[e],i=0;for(let a=0;an.value.itemSize;return r&&!i}getUniforms(e){let t=this.renderer.backend,n=this.uniforms[e],r=[],i=[],a=[],o={};for(let a of n){let n=a.groupNode.name,s=this.bindingsIndexes[n];if(a.type===`texture`||a.type===`cubeTexture`||a.type===`cubeDepthTexture`||a.type===`storageTexture`||a.type===`texture3D`){let n=a.node,i=n.value;(i.isCubeTexture===!0||this.isUnfilterable(i)===!1&&n.isStorageTextureNode!==!0||n.gatherNode!==null)&&(this.isSampleCompare(i)&&n.compareNode!==null?r.push(`@binding( ${s.binding++} ) @group( ${s.group} ) var ${a.name}_sampler : sampler_comparison;`):r.push(`@binding( ${s.binding++} ) @group( ${s.group} ) var ${a.name}_sampler : sampler;`));let o,c=``,{primarySamples:l}=t.utils.getTextureSampleData(i);if(l>1&&(c=`_multisampled`),i.isCubeTexture===!0&&i.isDepthTexture===!0)o=`texture_depth_cube`;else if(i.isCubeTexture===!0)o=`texture_cube`;else if(i.isDepthTexture===!0)o=t.compatibilityMode&&i.compareFunction===null?`texture${c}_2d`:`texture_depth${c}_2d${i.isArrayTexture===!0?`_array`:``}`;else if(a.node.isStorageTextureNode===!0){let n=fN(i,t.device),r=this.getStorageAccess(a.node,e),s=a.node.value.is3DTexture,c=a.node.value.isArrayTexture;o=`texture_storage_${s?`3d`:`2d${c?`_array`:``}`}<${n}, ${r}>`}else if(i.isArrayTexture===!0||i.isDataArrayTexture===!0||i.isCompressedArrayTexture===!0)o=`texture_2d_array`;else if(i.is3DTexture===!0||i.isData3DTexture===!0)o=`texture_3d`;else{let e=this.getComponentTypeFromTexture(i).charAt(0);o=`texture${c}_2d<${e}32>`}r.push(`@binding( ${s.binding++} ) @group( ${s.group} ) var ${a.name} : ${o};`)}else if(a.type===`buffer`||a.type===`storageBuffer`||a.type===`indirectStorageBuffer`){let t=a.node,n=this.getType(t.getNodeType(this)),r=t.bufferCount,o=r>0&&a.type===`buffer`?`, `+r:``,c=t.isStorageBufferNode?`storage, ${this.getStorageAccess(t,e)}`:`uniform`;if(this.isCustomStruct(a))i.push(`@binding( ${s.binding++} ) @group( ${s.group} ) var<${c}> ${a.name} : ${n};`);else{let e=`\tvalue : array< ${t.isAtomic?`atomic<${n}>`:`${n}`}${o} >`;i.push(this._getWGSLStructBinding(a.name,e,c,s.binding++,s.group))}}else{let e=a.groupNode.name;if(o[e]===void 0){let t=this.uniformGroups[e];if(t!==void 0){let n=[];for(let e of t.uniforms){let t=e.getType(),r=this.getType(this.getVectorType(t));n.push(`\t${e.name} : ${r}`)}let r=this.uniformGroupsBindings[e];r===void 0&&(r={index:s.binding++,id:s.group},this.uniformGroupsBindings[e]=r),o[e]={index:r.index,id:r.id,snippets:n}}}}}for(let e in o){let t=o[e];a.push(this._getWGSLStructBinding(e,t.snippets.join(`, -`),`uniform`,t.index,t.id))}return[...r,...i,...a].join(` -`)}buildCode(){let e=this.material===null?{compute:{}}:{fragment:{},vertex:{}};this.sortBindingGroups();for(let t in e){this.shaderStage=t;let n=this.allowGlobalVariables,r=e[t];r.uniforms=this.getUniforms(t),r.attributes=this.getAttributes(t),r.varyings=this.getVaryings(t),r.structs=this.getStructs(t),r.vars=this.getVars(t,n),r.codes=this.getCodes(t),r.directives=this.getDirectives(t),r.scopedArrays=this.getScopedArrays(t);let i=`// code - -`;i+=this.flowCode[t];let a=this.flowNodes[t],o=a[a.length-1],s=o.outputNode,c=s!==void 0&&s.isOutputStructNode===!0;for(let e of a){let n=this.getFlowData(e),a=e.name;if(a&&(i.length>0&&(i+=` -`),i+=`\t// flow -> ${a}\n`),i+=`${n.code}\n\t`,e===o&&t!==`compute`){if(i+=`// result - - `,t===`vertex`)i+=`varyings.builtinClipSpace = ${n.result};`;else if(t===`fragment`)if(c)r.returnType=s.getNodeType(this),r.structs+=`var output : `+r.returnType+`;`,i+=`return ${n.result};`;else{let e=`\t@location( 0 ) color: ${this.getType(this.getOutputType())}`,t=this.getBuiltins(`output`);t&&(e+=`, - `+t),r.returnType=`OutputStruct`,r.structs+=this._getWGSLStruct(`OutputStruct`,e),r.structs+=` -var output : OutputStruct;`,i+=`output.color = ${this.format(n.result,o.getNodeType(this),this.getOutputType())};\n\n\treturn output;`}}}r.flow=i}if(this.shaderStage=null,this.material!==null)this.vertexShader=this._getWGSLVertexCode(e.vertex),this.fragmentShader=this._getWGSLFragmentCode(e.fragment);else{let t=this.object.workgroupSize;this.computeShader=this._getWGSLComputeCode(e.compute,t)}}getMethod(e,t=null){let n;return t!==null&&(n=this._getWGSLMethod(e+`_`+t)),n===void 0&&(n=this._getWGSLMethod(e)),n||e}getBitcastMethod(e){return`bitcast<${this.getType(e)}>`}getFloatPackingMethod(e){return this.getMethod(`floatpack_${e}_2x16`)}getFloatUnpackingMethod(e){return this.getMethod(`floatunpack_${e}_2x16`)}getTernary(e,t,n){return`select( ${n}, ${t}, ${e} )`}getType(e){return wN[e]||e}isAvailable(e){let t=SN[e];return t===void 0&&(e===`float32Filterable`?t=this.renderer.hasFeature(`float32-filterable`):e===`clipDistance`&&(t=this.renderer.hasFeature(`clip-distances`)),SN[e]=t),t}_getWGSLMethod(e){return EN[e]!==void 0&&this._include(e),DN[e]}_include(e){let t=EN[e];return t.build(this),this.addInclude(t),t}_getWGSLVertexCode(e){return`${this.getSignature()} -// directives -${e.directives} - -// structs -${e.structs} - -// uniforms -${e.uniforms} - -// varyings -${e.varyings} -var varyings : VaryingsStruct; - -// vars -${e.vars} - -// codes -${e.codes} - -@vertex -fn main( ${e.attributes} ) -> VaryingsStruct { - - // flow - ${e.flow} - - return varyings; - -} -`}_getWGSLFragmentCode(e){return`${this.getSignature()} -// global -${ON} - -// structs -${e.structs} - -// uniforms -${e.uniforms} - -// vars -${e.vars} - -// codes -${e.codes} - -@fragment -fn main( ${e.varyings} ) -> ${e.returnType} { - - // flow - ${e.flow} - -} -`}_getWGSLComputeCode(e,t){let[n,r,i]=t;return`${this.getSignature()} -// directives -${e.directives} - -// system -var instanceIndex : u32; - -// locals -${e.scopedArrays} - -// structs -${e.structs} - -// uniforms -${e.uniforms} - -// vars -${this.allowGlobalVariables?e.vars:``} - -// codes -${e.codes} - -@compute @workgroup_size( ${n}, ${r}, ${i} ) -fn main( ${e.attributes} ) { - - // local vars - ${this.allowGlobalVariables?``:e.vars} - - // system - instanceIndex = globalId.x - + globalId.y * ( ${n} * numWorkgroups.x ) - + globalId.z * ( ${n} * numWorkgroups.x ) * ( ${r} * numWorkgroups.y ); - - // flow - ${e.flow} - -} -`}_getWGSLStruct(e,t){return` -struct ${e} { -${t} -};`}_getWGSLStructBinding(e,t,n,r=0,i=0){let a=e+`Struct`;return`${this._getWGSLStruct(a,t)} -@binding( ${r} ) @group( ${i} ) -var<${n}> ${e} : ${a};`}},AN=new wM,jN=new TM,MN=new Map([[Int8Array,[`sint8`,`snorm8`]],[Uint8Array,[`uint8`,`unorm8`]],[Int16Array,[`sint16`,`snorm16`]],[Uint16Array,[`uint16`,`unorm16`]],[Int32Array,[`sint32`,`snorm32`]],[Uint32Array,[`uint32`,`unorm32`]],[Float32Array,[`float32`]]]);typeof Float16Array<`u`&&MN.set(Float16Array,[`float16`]);var NN=new Map([[Gr,[`float16`]]]),PN=new Map([[Int32Array,`sint32`],[Int16Array,`sint32`],[Uint32Array,`uint32`],[Uint16Array,`uint32`],[Float32Array,`float32`]]),FN=class{constructor(e){this.backend=e}createAttribute(e,t){let n=this._getBufferAttribute(e),r=this.backend,i=r.get(n),a=i.buffer;if(a===void 0){let o=r.device,s=n.array;if(e.normalized===!1){if(s.constructor===Int16Array||s.constructor===Int8Array)s=new Int32Array(s);else if((s.constructor===Uint16Array||s.constructor===Uint8Array)&&(s=new Uint32Array(s),t&GPUBufferUsage.INDEX))for(let e=0;e1&&n.itemSize*s.BYTES_PER_ELEMENT%4!=0){let e=n.itemSize*s.BYTES_PER_ELEMENT;c=Math.floor((e+3)/4)*4/s.BYTES_PER_ELEMENT}if(c!==void 0){let e=n.itemSize,t=new s.constructor(n.count*c);for(let r=0;r1&&e%4!=0&&(e=Math.floor((e+3)/4)*4)),r.normalized===!1&&(r.array.constructor===Int16Array||r.array.constructor===Uint16Array)&&(e=4),o={arrayStride:e,attributes:[],stepMode:t},n.set(a,o)}let s=this._getVertexFormat(r),c=r.isInterleavedBufferAttribute===!0?r.offset*i:0;o.attributes.push({shaderLocation:e,offset:c,format:s})}return Array.from(n.values())}destroyAttribute(e){let t=this.backend;t.get(this._getBufferAttribute(e)).buffer.destroy(),t.delete(e)}async getArrayBufferAsync(e,t=null,n=0,r=-1){let i=this.backend,a=i.device,o=i.get(this._getBufferAttribute(e)).buffer,s=r===-1?o.size-n:r,c;if(t!==null&&t.isReadbackBuffer){let e=i.get(t);if(t._mapped===!0)throw Error(`THREE.WebGPUAttributeUtils: ReadbackBuffer must be released before being used again.`);if(t._mapped=!0,e.readBufferGPU===void 0){AN.label=`${t.name}_readback`,AN.size=t.maxByteLength,AN.usage=GPUBufferUsage.COPY_DST|GPUBufferUsage.MAP_READ,c=a.createBuffer(AN),AN.reset();let n=()=>{t.buffer=null,t._mapped=!1,c.unmap()},r=()=>{t.buffer=null,t._mapped=!1,c.destroy(),i.delete(t),t.removeEventListener(`release`,n),t.removeEventListener(`dispose`,r)};t.addEventListener(`release`,n),t.addEventListener(`dispose`,r),e.readBufferGPU=c}else c=e.readBufferGPU}else AN.label=`${e.name}_readback`,AN.size=s,AN.usage=GPUBufferUsage.COPY_DST|GPUBufferUsage.MAP_READ,c=a.createBuffer(AN),AN.reset();jN.label=`readback_encoder_${e.name}`;let l=a.createCommandEncoder(jN);if(jN.reset(),l.copyBufferToBuffer(o,n,c,0,s),SM(a,l.finish()),await c.mapAsync(GPUMapMode.READ,0,s),t===null){let e=c.getMappedRange(0,s).slice();return c.destroy(),e}else if(t.isReadbackBuffer)return t.buffer=c.getMappedRange(0,s),t;else{let e=c.getMappedRange(0,s);return new Uint8Array(t).set(new Uint8Array(e)),c.destroy(),t}}_getVertexFormat(e){let{itemSize:t,normalized:n}=e,r=e.array.constructor,i=e.constructor,a;if(t===1)a=PN.get(r);else{let e=(NN.get(i)||MN.get(r))[+!!n];if(e){let n=r.BYTES_PER_ELEMENT*t,i=Math.floor((n+3)/4)*4/r.BYTES_PER_ELEMENT;if(i%1)throw Error(`THREE.WebGPUAttributeUtils: Bad vertex format item size.`);a=`${e}x${i}`}}return a||E(`WebGPUAttributeUtils: Vertex format not supported yet.`),a}_getBufferAttribute(e){return e.isInterleavedBufferAttribute&&(e=e.data),e}},IN=new CM,LN=new wM,RN=new NM,zN=class{constructor(e){this.layoutGPU=e,this.usedTimes=0}},BN=class{constructor(e){this.backend=e,this._bindGroupLayoutCache=new Map}createBindingsLayout(e){let t=this.backend,n=t.device,r=t.get(e);if(r.layout)return r.layout.layoutGPU;let i=this._createLayoutEntries(e),a=Fs(JSON.stringify(i)),o=this._bindGroupLayoutCache.get(a);return o===void 0&&(o=new zN(n.createBindGroupLayout({entries:i})),this._bindGroupLayoutCache.set(a,o)),o.usedTimes++,r.layout=o,r.layoutKey=a,o.layoutGPU}createBindings(e,t,n,r=0){let{backend:i}=this,a=i.get(e),o=this.createBindingsLayout(e),s;n>0&&(a.groups===void 0&&(a.groups=[],a.versions=[]),a.versions[n]===r&&(s=a.groups[n])),s===void 0&&(s=this.createBindGroup(e,o),n>0&&(a.groups[n]=s,a.versions[n]=r)),a.group=s}updateBinding(e){let t=this.backend,n=t.device,r=e.buffer,i=t.get(e).buffer,a=e.updateRanges;if(a.length===0)n.queue.writeBuffer(i,0,r,0);else{let e=yt(r),t=e?1:r.BYTES_PER_ELEMENT,o=a[0].start;for(let s=0,c=a.length;s1&&(i+=`-${e.texture.depthOrArrayLayers}`),i+=`-${n}-${r}`,a=e[i],a===void 0){let o=fM.All,s;s=t.isSampledCubeTexture?dM.Cube:t.texture.isArrayTexture||t.texture.isDataArrayTexture||t.texture.isCompressedArrayTexture?dM.TwoDArray:t.isSampledTexture3D?dM.ThreeD:dM.TwoD,RN.aspect=o,RN.dimension=s,RN.mipLevelCount=n,RN.baseMipLevel=r,a=e[i]=e.texture.createView(RN),RN.reset()}}IN.entries.push({binding:i,resource:a})}else if(t.isSampler){let e=n.get(t);IN.entries.push({binding:i,resource:e.sampler})}i++}let a=r.createBindGroup(IN);return IN.reset(),a}_createLayoutEntries(e){let t=[],n=0;for(let r of e.bindings){let e=this.backend,i={binding:n,visibility:r.visibility};if(r.isUniformBuffer||r.isStorageBuffer){let e={};r.isStorageBuffer&&(r.visibility&qj.COMPUTE&&(r.access===Qs.READ_WRITE||r.access===Qs.WRITE_ONLY)?e.type=oM.Storage:e.type=oM.ReadOnlyStorage),i.buffer=e}else if(r.isSampledTexture&&r.store){let e={};e.format=this.backend.get(r.texture).texture.format;let t=r.access;t===Qs.READ_WRITE?e.access=sM.ReadWrite:t===Qs.WRITE_ONLY?e.access=sM.WriteOnly:e.access=sM.ReadOnly,r.texture.isArrayTexture?e.viewDimension=dM.TwoDArray:r.texture.is3DTexture&&(e.viewDimension=dM.ThreeD),i.storageTexture=e}else if(r.isSampledTexture){let t={},{primarySamples:n}=e.utils.getTextureSampleData(r.texture);if(n>1&&(t.multisampled=!0,r.texture.isDepthTexture||(t.sampleType=lM.UnfilterableFloat)),r.texture.isDepthTexture)e.compatibilityMode&&r.texture.compareFunction===null?t.sampleType=lM.UnfilterableFloat:t.sampleType=lM.Depth;else{let e=r.texture.type;e===1013?t.sampleType=lM.SInt:e===1014?t.sampleType=lM.UInt:e===1015&&(this.backend.hasFeature(`float32-filterable`)?t.sampleType=lM.Float:t.sampleType=lM.UnfilterableFloat)}r.isSampledCubeTexture?t.viewDimension=dM.Cube:r.texture.isArrayTexture||r.texture.isDataArrayTexture||r.texture.isCompressedArrayTexture?t.viewDimension=dM.TwoDArray:r.isSampledTexture3D&&(t.viewDimension=dM.ThreeD),i.texture=t}else if(r.isSampler){let t={};r.texture.isDepthTexture&&(r.texture.compareFunction!==null&&r.textureNode.compareNode!==null&&e.hasCompatibility(_t.TEXTURE_COMPARE)?t.type=cM.Comparison:t.type=cM.NonFiltering),i.sampler=t}else E(`WebGPUBindingUtils: Unsupported binding "${r}".`);t.push(i),n++}return t}deleteBindGroupData(e){let{backend:t}=this,n=t.get(e);n.layout&&(n.layout.usedTimes--,n.layout.usedTimes===0&&this._bindGroupLayoutCache.delete(n.layoutKey),n.layout=void 0,n.layoutKey=void 0)}dispose(){this._bindGroupLayoutCache.clear()}},VN=class{constructor(e){this.backend=e}getMaxAnisotropy(){return 16}getUniformBufferLimit(){return this.backend.device.limits.maxUniformBufferBindingSize}},HN=class{constructor(){this.label=``,this.layout=null,this.compute=null}reset(){this.label=``,this.layout=null,this.compute=null}},UN=class{constructor(){this.label=``,this.bindGroupLayouts=null}reset(){this.label=``,this.bindGroupLayouts=null}},WN=new HN,GN=new UN,KN=new EM,qN=new kM,JN=class{constructor(e){this.backend=e}_getSampleCount(e){return this.backend.utils.getSampleCountRenderContext(e)}createRenderPipeline(e,t){let{object:n,material:r,geometry:i,pipeline:a}=e,{vertexProgram:o,fragmentProgram:s}=a,c=this.backend,l=c.device,u=c.utils,d=c.get(a),f=[];for(let t of e.getBindings()){let{layoutGPU:e}=c.get(t).layout;f.push(e)}let p=c.attributeUtils.createShaderVertexBuffers(e),m;r.blending!==0&&(r.blending!==1||r.transparent!==!1)&&(m=this._getBlending(r));let h={};r.stencilWrite===!0&&(h={compare:this._getStencilCompare(r),failOp:this._getStencilOperation(r.stencilFail),depthFailOp:this._getStencilOperation(r.stencilZFail),passOp:this._getStencilOperation(r.stencilZPass)});let g=this._getColorWriteMask(r),_=[];if(e.context.textures!==null){let t=e.context.textures,n=e.context.mrt;for(let e=0;e1,qN.layout=ee;let te={},w=e.context.depth,ne=e.context.stencil;(w===!0||ne===!0)&&(w===!0&&(te.format=S,te.depthWriteEnabled=r.depthWrite,te.depthCompare=x),ne===!0&&(te.stencilFront=h,te.stencilBack=h,te.stencilReadMask=r.stencilFuncMask,te.stencilWriteMask=r.stencilWriteMask),r.polygonOffset===!0&&b.topology===Kj.TriangleList&&(te.depthBias=r.polygonOffsetUnits,te.depthBiasSlopeScale=r.polygonOffsetFactor,te.depthBiasClamp=0),qN.depthStencil=te),l.pushErrorScope(`validation`);let re=[{program:o,module:v.module},{program:s,module:y.module}],ie=qN.label;if(t===null)d.pipeline=l.createRenderPipeline(qN),qN.reset(),l.popErrorScope().then(e=>{e!==null&&(d.error=!0,E(`WebGPURenderer: Render pipeline creation failed (${ie}): ${e.message}`),this._reportShaderDiagnostics(re,ie))});else{let e=new Promise(async e=>{try{let e=null,t=null;try{t=l.createRenderPipelineAsync(qN)}catch(t){e=t}if(qN.reset(),t!==null)try{d.pipeline=await t}catch(t){e=t}let n=await l.popErrorScope();if(n!==null||e!==null){d.error=!0;let t=n&&n.message||e&&e.message||`unknown`;E(`WebGPURenderer: Async render pipeline creation failed (${ie}): ${t}`),await this._reportShaderDiagnostics(re,ie)}}finally{e()}});t.push(e)}}createBundleEncoder(e,t=`renderBundleEncoder`){let{utils:n,device:r}=this.backend,i=n.getCurrentDepthStencilFormat(e),a=n.getCurrentColorFormats(e),o=this._getSampleCount(e);KN.label=t,KN.colorFormats=a,KN.depthStencilFormat=i,KN.sampleCount=o;let s=r.createRenderBundleEncoder(KN);return KN.reset(),s}createComputePipeline(e,t){let n=this.backend,r=n.device,i=n.get(e.computeProgram).module,a=n.get(e),o=[];for(let e of t){let{layoutGPU:t}=n.get(e).layout;o.push(t)}let s=e.computeProgram,c=`computePipeline_${s.stage}${s.name?`_${s.name}`:``}`;r.pushErrorScope(`validation`),GN.bindGroupLayouts=o;let l=r.createPipelineLayout(GN);GN.reset(),WN.label=c,WN.compute=i,WN.layout=l,a.pipeline=r.createComputePipeline(WN),WN.reset(),r.popErrorScope().then(e=>{e!==null&&(a.error=!0,E(`WebGPURenderer: Compute pipeline creation failed (${c}): ${e.message}`),this._reportShaderDiagnostics([{program:s,module:i.module}],c))})}async _reportShaderDiagnostics(e,t){for(let{program:n,module:r}of e){let e=await r.getCompilationInfo();if(e.messages.length===0)continue;let i=n.code.split(` -`);for(let r of e.messages){let e=r.lineNum>0?` at line ${r.lineNum}${r.linePos>0?`:${r.linePos}`:``}`:``,a=`WebGPURenderer [${t} / ${n.stage} ${r.type}]${e}: ${r.message}`,o=``;r.lineNum>0&&r.lineNum<=i.length&&(o=`\n ${i[r.lineNum-1]}`,r.linePos>0&&(o+=`\n ${` `.repeat(r.linePos-1)}^`)),(r.type===`error`?E:T)(a+o)}}}_getBlending(e){let t,n,r=e.blending,i=e.blendSrc,a=e.blendDst,o=e.blendEquation;if(r===5){let r=e.blendSrcAlpha===null?i:e.blendSrcAlpha,s=e.blendDstAlpha===null?a:e.blendDstAlpha,c=e.blendEquationAlpha===null?o:e.blendEquationAlpha;t={srcFactor:this._getBlendFactor(i),dstFactor:this._getBlendFactor(a),operation:this._getBlendOperation(o)},n={srcFactor:this._getBlendFactor(r),dstFactor:this._getBlendFactor(s),operation:this._getBlendOperation(c)}}else{let i=e.premultipliedAlpha,a=(e,r,i,a)=>{t={srcFactor:e,dstFactor:r,operation:rM.Add},n={srcFactor:i,dstFactor:a,operation:rM.Add}};if(i)switch(r){case 1:a(nM.One,nM.OneMinusSrcAlpha,nM.One,nM.OneMinusSrcAlpha);break;case 2:a(nM.One,nM.One,nM.One,nM.One);break;case 3:a(nM.Zero,nM.OneMinusSrc,nM.Zero,nM.One);break;case 4:a(nM.Dst,nM.OneMinusSrcAlpha,nM.Zero,nM.One);break}else switch(r){case 1:a(nM.SrcAlpha,nM.OneMinusSrcAlpha,nM.One,nM.OneMinusSrcAlpha);break;case 2:a(nM.SrcAlpha,nM.One,nM.One,nM.One);break;case 3:E(`WebGPURenderer: "SubtractiveBlending" requires "${e.isMaterial?`material`:`blendMode`}.premultipliedAlpha = true".`);break;case 4:E(`WebGPURenderer: "MultiplyBlending" requires "${e.isMaterial?`material`:`blendMode`}.premultipliedAlpha = true".`);break}}if(t!==void 0&&n!==void 0)return{color:t,alpha:n};E(`WebGPURenderer: Invalid blending: `,r)}_getBlendFactor(e){let t;switch(e){case 200:t=nM.Zero;break;case 201:t=nM.One;break;case 202:t=nM.Src;break;case 203:t=nM.OneMinusSrc;break;case 204:t=nM.SrcAlpha;break;case 205:t=nM.OneMinusSrcAlpha;break;case 208:t=nM.Dst;break;case 209:t=nM.OneMinusDst;break;case 206:t=nM.DstAlpha;break;case 207:t=nM.OneMinusDstAlpha;break;case 210:t=nM.SrcAlphaSaturated;break;case Xx:t=nM.Constant;break;case Zx:t=nM.OneMinusConstant;break;default:E(`WebGPURenderer: Blend factor not supported.`,e)}return t}_getStencilCompare(e){let t,n=e.stencilFunc;switch(n){case 512:t=Jj.Never;break;case 519:t=Jj.Always;break;case 513:t=Jj.Less;break;case 515:t=Jj.LessEqual;break;case 514:t=Jj.Equal;break;case 518:t=Jj.GreaterEqual;break;case 516:t=Jj.Greater;break;case 517:t=Jj.NotEqual;break;default:E(`WebGPURenderer: Invalid stencil function.`,n)}return t}_getStencilOperation(e){let t;switch(e){case at:t=aM.Keep;break;case 0:t=aM.Zero;break;case ot:t=aM.Replace;break;case dt:t=aM.Invert;break;case st:t=aM.IncrementClamp;break;case ct:t=aM.DecrementClamp;break;case lt:t=aM.IncrementWrap;break;case ut:t=aM.DecrementWrap;break;default:E(`WebGPURenderer: Invalid stencil operation.`,t)}return t}_getBlendOperation(e){let t;switch(e){case 100:t=rM.Add;break;case 101:t=rM.Subtract;break;case 102:t=rM.ReverseSubtract;break;case 103:t=rM.Min;break;case 104:t=rM.Max;break;default:E(`WebGPUPipelineUtils: Blend equation not supported.`,e)}return t}_getPrimitiveState(e,t,n){let r={};r.topology=this.backend.utils.getPrimitiveTopology(e,n),t.index!==null&&e.isLine===!0&&e.isLineSegments!==!0&&(r.stripIndexFormat=t.index.array instanceof Uint16Array?$j.Uint16:$j.Uint32);let i=n.side===1;return e.isMesh&&e.matrixWorld.determinantAffine()<0&&(i=!i),r.frontFace=i===!0?Zj.CW:Zj.CCW,r.cullMode=n.side===2?Qj.None:Qj.Back,r}_getColorWriteMask(e){return e.colorWrite===!0?iM.All:iM.None}_getDepthCompare(e){let t;if(e.depthTest===!1)t=Jj.Always;else{let n=this.backend.parameters.reversedDepthBuffer?Dt[e.depthFunc]:e.depthFunc;switch(n){case 0:t=Jj.Never;break;case 1:t=Jj.Always;break;case 2:t=Jj.Less;break;case 3:t=Jj.LessEqual;break;case 4:t=Jj.Equal;break;case 5:t=Jj.GreaterEqual;break;case 6:t=Jj.Greater;break;case 7:t=Jj.NotEqual;break;default:E(`WebGPUPipelineUtils: Invalid depth function.`,n)}}return t}},YN=class{constructor(){this.label=``,this.type=void 0,this.count=0}reset(){this.label=``,this.type=void 0,this.count=0}},XN=new wM,ZN=new TM,QN=new YN,$N=class extends Uj{constructor(e,t,n=2048){super(n),this.device=e,this.type=t,QN.label=`queryset_global_timestamp_${t}`,QN.type=`timestamp`,QN.count=this.maxQueries,this.querySet=this.device.createQuerySet(QN),QN.reset();let r=this.maxQueries*8;XN.label=`buffer_timestamp_resolve_${t}`,XN.size=r,XN.usage=GPUBufferUsage.QUERY_RESOLVE|GPUBufferUsage.COPY_SRC,this.resolveBuffer=this.device.createBuffer(XN),XN.reset(),XN.label=`buffer_timestamp_result_${t}`,XN.size=r,XN.usage=GPUBufferUsage.COPY_DST|GPUBufferUsage.MAP_READ,this.resultBuffer=this.device.createBuffer(XN),XN.reset()}allocateQueriesForContext(e){if(!this.trackTimestamp||this.isDisposed)return null;if(this.currentQueryIndex+2>this.maxQueries)return Tt(`WebGPUTimestampQueryPool [${this.type}]: Maximum number of queries exceeded, when using trackTimestamp it is necessary to resolves the queries via renderer.resolveTimestampsAsync( THREE.TimestampQuery.${this.type.toUpperCase()} ).`),null;let t=this.currentQueryIndex;return this.currentQueryIndex+=2,this.queryOffsets.set(e,t),t}async resolveQueriesAsync(){if(!this.trackTimestamp||this.currentQueryIndex===0||this.isDisposed)return this.lastValue;if(this.pendingResolve)return this.pendingResolve;this.pendingResolve=this._resolveQueries();try{return await this.pendingResolve}finally{this.pendingResolve=null}}async _resolveQueries(){if(this.isDisposed)return this.lastValue;try{if(this.resultBuffer.mapState!==`unmapped`)return this.lastValue;let e=new Map(this.queryOffsets),t=this.currentQueryIndex,n=t*8;this.currentQueryIndex=0,this.queryOffsets.clear();let r=this.device.createCommandEncoder(ZN);r.resolveQuerySet(this.querySet,0,t,this.resolveBuffer,0),r.copyBufferToBuffer(this.resolveBuffer,0,this.resultBuffer,0,n);let i=r.finish();if(SM(this.device,i),this.resultBuffer.mapState!==`unmapped`)return this.lastValue;if(await this.resultBuffer.mapAsync(GPUMapMode.READ,0,n),this.isDisposed)return this.resultBuffer.mapState===`mapped`&&this.resultBuffer.unmap(),this.lastValue;let a=new BigUint64Array(this.resultBuffer.getMappedRange(0,n)),o={},s=[];for(let[t,n]of e){let e=t.match(/^(.*):f(\d+)$/),r=parseInt(e[2]);s.includes(r)===!1&&s.push(r),o[r]===void 0&&(o[r]=0);let i=a[n],c=a[n+1],l=Number(c-i)/1e6;this.timestamps.set(t,l),o[r]+=l}let c=o[s[s.length-1]];return this.resultBuffer.unmap(),this.lastValue=c,this.frames=s,c}catch(e){return E(`Error resolving queries:`,e),this.resultBuffer.mapState===`mapped`&&this.resultBuffer.unmap(),this.lastValue}}async dispose(){if(!this.isDisposed){if(this.isDisposed=!0,this.pendingResolve)try{await this.pendingResolve}catch(e){E(`Error waiting for pending resolve:`,e)}if(this.resultBuffer&&this.resultBuffer.mapState===`mapped`)try{this.resultBuffer.unmap()}catch(e){E(`Error unmapping buffer:`,e)}this.querySet&&=(this.querySet.destroy(),null),this.resolveBuffer&&=(this.resolveBuffer.destroy(),null),this.resultBuffer&&=(this.resultBuffer.destroy(),null),this.queryOffsets.clear(),this.pendingResolve=null}}},eP=class{constructor(){this.label=``,this.timestampWrites=void 0}reset(){this.label=``,this.timestampWrites=void 0}},tP=class{constructor(){this.view=null,this.depthLoadOp=void 0,this.depthStoreOp=void 0,this.depthClearValue=void 0,this.depthReadOnly=!1,this.stencilLoadOp=void 0,this.stencilStoreOp=void 0,this.stencilClearValue=0,this.stencilReadOnly=!1}reset(){this.view=null,this.depthLoadOp=void 0,this.depthStoreOp=void 0,this.depthClearValue=void 0,this.depthReadOnly=!1,this.stencilLoadOp=void 0,this.stencilStoreOp=void 0,this.stencilClearValue=0,this.stencilReadOnly=!1}},nP=class{constructor(){this.querySet=null,this.beginningOfPassWriteIndex=void 0,this.endOfPassWriteIndex=void 0}reset(){this.querySet=null,this.beginningOfPassWriteIndex=void 0,this.endOfPassWriteIndex=void 0}},rP={r:0,g:0,b:0,a:1},iP=new wM,aP=new TM,oP=new eP,sP=new YN,cP=new jM,lP=new nP,uP=new KM,dP=new KM,fP=new NM,pP=new ZM,mP=class extends Tj{constructor(e={}){super(e),this.isWebGPUBackend=!0,this.parameters.alpha=e.alpha===void 0||e.alpha,this.parameters.requiredLimits=e.requiredLimits===void 0?{}:e.requiredLimits,this.compatibilityMode=null,this.device=null,this.defaultRenderPassdescriptor=null,this.utils=new xM(this),this.attributeUtils=new FN(this),this.bindingUtils=new BN(this),this.capabilities=new VN(this),this.pipelineUtils=new JN(this),this.textureUtils=new dN(this),this.occludedResolveCache=new Map;let t=typeof navigator>`u`||/Android/.test(navigator.userAgent)===!1;this._compatibility={[_t.TEXTURE_COMPARE]:t}}async init(e){await super.init(e);let t=this.parameters,n;if(t.device===void 0){let r={powerPreference:t.powerPreference,featureLevel:`compatibility`,xrCompatible:e.xr.enabled},i=typeof navigator<`u`?await navigator.gpu.requestAdapter(r):null;if(i===null)throw Error(`THREE.WebGPUBackend: Unable to create WebGPU adapter.`);let a=Object.values(mM),o=[];for(let e of a)i.features.has(e)&&o.push(e);let s={requiredFeatures:o,requiredLimits:t.requiredLimits};n=await i.requestDevice(s)}else n=t.device;this.compatibilityMode=!n.features.has(`core-features-and-limits`),this.compatibilityMode&&(e._samples=0),n.lost.then(t=>{if(t.reason===`destroyed`)return;let n={api:`WebGPU`,message:t.message||`Unknown reason`,reason:t.reason||null,originalEvent:t};e.onDeviceLost(n)}),n.onuncapturederror=t=>{let n=t.error,r=n&&n.constructor?n.constructor.name:`GPUError`,i=n&&n.message||`Unknown uncaptured GPU error`;e.onError({api:`WebGPU`,type:r,message:i,originalEvent:t})},this.device=n,this.trackTimestamp=this.trackTimestamp&&this.hasFeature(mM.TimestampQuery),this.updateSize()}setXRRenderTargetTextures(e,t,n=null){this.set(e.texture,{texture:t,format:t.format,externalTexture:!0,xrViewDescriptors:n,initialized:!0})}get context(){let e=this.renderer.getCanvasTarget(),t=this.get(e),n=t.context;if(n===void 0){let r=this.parameters;n=e.isDefaultCanvasTarget===!0&&r.context!==void 0?r.context:e.domElement.getContext(`webgpu`),`setAttribute`in e.domElement&&e.domElement.setAttribute(`data-engine`,`three.js r185 webgpu`);let i=r.alpha?`premultiplied`:`opaque`,a=r.outputType===1016?`extended`:`standard`;n.configure({device:this.device,format:this.utils.getPreferredCanvasFormat(),usage:GPUTextureUsage.RENDER_ATTACHMENT|GPUTextureUsage.COPY_SRC,alphaMode:i,toneMapping:{mode:a}}),t.context=n}return n}get coordinateSystem(){return ht}get hasTimestamp(){return!0}async getArrayBufferAsync(e,t=null,n=0,r=-1){return await this.attributeUtils.getArrayBufferAsync(e,t,n,r)}getContext(){return this.context}_getDefaultRenderPassDescriptor(){let e=this.renderer,t=e.getCanvasTarget(),n=this.get(t),r=e.currentSamples,i=n.descriptor;if(i===void 0||n.samples!==r){if(i=new OM,i.colorAttachments.push(new DM),e.depth===!0||e.stencil===!0){let t=new tP;t.view=this.textureUtils.getDepthBuffer(e.depth,e.stencil).createView(),i.depthStencilAttachment=t}let t=i.colorAttachments[0];r>0?t.view=this.textureUtils.getColorBuffer().createView():t.resolveTarget=void 0,n.descriptor=i,n.samples=r}let a=i.colorAttachments[0];return r>0?a.resolveTarget=this.context.getCurrentTexture().createView():a.view=this.context.getCurrentTexture().createView(),i}_isRenderCameraDepthArray(e){let t=e.camera;return e.depthTexture&&e.depthTexture.isArrayTexture===!0&&t!==null&&t.isArrayCamera===!0}_hasExternalTexture(e){let t=e.textures;if(t===null)return!1;for(let e=0;e1)if(l===!0){let t=e.camera.cameras;for(let e=0;e0&&(t.currentOcclusionQuerySet&&t.currentOcclusionQuerySet.destroy(),t.currentOcclusionQueryBuffer&&t.currentOcclusionQueryBuffer.destroy(),t.currentOcclusionQuerySet=t.occlusionQuerySet,t.currentOcclusionQueryBuffer=t.occlusionQueryBuffer,t.currentOcclusionQueryObjects=t.occlusionQueryObjects,sP.label=`occlusionQuerySet_${e.id}`,sP.type=`occlusion`,sP.count=r,i=n.createQuerySet(sP),sP.reset(),t.occlusionQuerySet=i,t.occlusionQueryIndex=0,t.occlusionQueryObjects=Array(r),t.lastOcclusionObject=null);let a;a=e.textures===null?this._getDefaultRenderPassDescriptor():this._getRenderPassDescriptor(e,{loadOp:Xj.Load}),this.initTimestampQuery(gt.RENDER,this.getTimestampUID(e),a),a.occlusionQuerySet=i;let o=a.depthStencilAttachment;if(e.textures!==null){let t=a.colorAttachments;for(let n=0;n0&&t.currentPass.executeBundles(t.renderBundles),n>t.occlusionQueryIndex&&t.currentPass.endOcclusionQuery();let r=t.encoder;if(this._isRenderCameraDepthArray(e)===!0){let n=[];for(let e=0;e0){let r=n*8,i=this.occludedResolveCache.get(r);i===void 0&&(iP.size=r,iP.usage=GPUBufferUsage.QUERY_RESOLVE|GPUBufferUsage.COPY_SRC,i=this.device.createBuffer(iP),iP.reset(),this.occludedResolveCache.set(r,i)),iP.size=r,iP.usage=GPUBufferUsage.COPY_DST|GPUBufferUsage.MAP_READ;let a=this.device.createBuffer(iP);iP.reset(),t.encoder.resolveQuerySet(t.occlusionQuerySet,0,n,i,0),t.encoder.copyBufferToBuffer(i,0,a,0,r),t.occlusionQueryBuffer=a,this.resolveOccludedAsync(e)}if(SM(this.device,t.encoder.finish()),e.textures!==null){let t=e.textures;for(let e=0;es&&(i[0]=Math.min(o,s),i[1]=Math.ceil(o/s)),a.dispatchSize=i}i=a.dispatchSize}s.dispatchWorkgroups(i[0],i[1]||1,i[2]||1)}finishCompute(e){let t=this.get(e);t.passEncoderGPU.end(),SM(this.device,t.cmdEncoderGPU.finish())}_draw(e,t,n,r,i,a,o,s,c){let{object:l,material:u,context:d}=e,f=e.getIndex(),p=f!==null;c.pipeline!==r&&(s.setPipeline(r),c.pipeline=r);let m=c.bindingGroups;for(let e=0,t=i.length;e65535?4:2);for(let a=0;a0){let i=this.get(e.camera),o=e.camera.cameras,d=e.getBindingGroup(`cameraIndex`);if(i.indexesGPU===void 0||i.indexesGPU.length!==o.length){let e=this.get(d),t=[],n=new Uint32Array([0,0,0,0]);for(let r=0,i=o.length;r(T(`WebGPURenderer: WebGPU is not available, running under WebGL2 backend.`),new Gj(e)));let n=new t(e);super(n,e),this.library=new _P,this.isWebGPURenderer=!0,typeof __THREE_DEVTOOLS__<`u`&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent(`observe`,{detail:this}))}},yP=`pointer-events-none whitespace-nowrap rounded-md bg-base-100/80 px-1.5 py-1 text-[10px] font-semibold leading-none text-base-content shadow-sm backdrop-blur-sm`,bP=4,xP=3,SP=64,CP=5500,wP=18,TP=e=>{let{camera:t,controls:n,parent:r,labelRenderer:i}=e,a=new Zn;r.add(a);let o=new Map,s=[],c=e.view,l=!1,u=new k,d=new k,f=new k,p=new k,m=new k,h=new k,g=e=>12+Array.from(e).reduce((e,t)=>e+(t.codePointAt(0)>255?10:6),0),_=(e,t)=>e.leftt.left&&e.topt.top,v=()=>{let e=new Set;for(let t of s){let n=t.city.trim();if(!n)continue;e.add(t.key);let r=o.get(t.key);if(!r){let e=document.createElement(`div`);e.className=yP,r=new ys(e),r.center.set(.5,1.5),r.renderOrder=7,o.set(t.key,r),a.add(r)}r.element.textContent=n,r.position.copy(t.position)}for(let[t,n]of o)e.has(t)||(a.remove(n),o.delete(t))};return{setEndpoints(e){l||(s=e,v())},setView(e){l||(c=e,v())},setVisible(e){l||(a.visible=e)},updateVisibility:()=>{if(l)return;t.updateWorldMatrix(!0,!1),r.updateWorldMatrix(!0,!0),t.getWorldPosition(u),r.getWorldPosition(d);let e=i.domElement.clientWidth,a=i.domElement.clientHeight,v=[];for(let n of s){let r=o.get(n.key);if(!r||(r.visible=!1,r.getWorldPosition(f),c.projection===`3d`&&(p.subVectors(f,d).normalize(),m.subVectors(u,f),p.dot(m)<=0))||(h.copy(f).project(t),h.z<-1||h.z>1||h.x<-1||h.x>1||h.y<-1||h.y>1))continue;let i=(h.x*.5+.5)*e,s=(-h.y*.5+.5)*a,l=r.element.getBoundingClientRect(),_=l.width||g(n.city),y=l.height||wP;v.push({endpoint:n,label:r,left:i-_*r.center.x,right:i+_*(1-r.center.x),top:s-y*r.center.y,bottom:s+y*(1-r.center.y)})}v.sort((e,t)=>Number(t.endpoint.role===`origin`)-Number(e.endpoint.role===`origin`)||t.endpoint.connections-e.endpoint.connections||e.endpoint.key.localeCompare(t.endpoint.key));let y=t.position.distanceTo(n.target),b=1-en.clamp((y-n.minDistance)/(n.maxDistance-n.minDistance),0,1),x=en.clamp(Math.floor(e*a/CP),xP,SP),S=Math.round(en.lerp(xP,x,b*b)),C=[];for(let e of v){if(C.length>=S)break;C.some(t=>_(e,t))||(e.label.visible=!0,C.push(e))}},dispose(){l||(l=!0,r.remove(a),a.clear(),o.clear(),s=[])}}},EP=1.005,DP=({latitude:e,longitude:t},n=new k)=>{let r=en.degToRad(e),i=en.degToRad(t),a=Math.cos(r);return n.set(a*Math.cos(i),Math.sin(r),-a*Math.sin(i))},OP=(e=new Date,t=new k,n=0)=>{let r=e.getUTCFullYear(),i=Date.UTC(r,0,1),a=Date.UTC(r,e.getUTCMonth(),e.getUTCDate()),o=Math.floor((a-i)/864e5)+1,s=(Date.UTC(r+1,0,1)-i)/864e5,c=e.getUTCHours()*60+e.getUTCMinutes()+e.getUTCSeconds()/60,l=c/60,u=2*Math.PI*(o-1+(l-12)/24)/s,d=229.18*(75e-6+.001868*Math.cos(u)-.032077*Math.sin(u)-.014615*Math.cos(2*u)-.040849*Math.sin(2*u)),f=.006918-.399912*Math.cos(u)+.070257*Math.sin(u)-.006758*Math.cos(2*u)+907e-6*Math.sin(2*u)-.002697*Math.cos(3*u)+.00148*Math.sin(3*u),p=en.degToRad((720-c-d)/4-n),m=Math.cos(f);return t.set(m*Math.cos(p),Math.sin(f),-m*Math.sin(p)).normalize()},kP=(e,t)=>{let n=DP(e).normalize(),r=DP(t).normalize(),i=new tn().setFromUnitVectors(n,r),a=new tn,o=Math.acos(en.clamp(n.dot(r),-1,1)),s=.075+Math.min(.22,o*.095),c=[];for(let e=0;e<=36;e+=1){let t=e/36,r=new tn().slerpQuaternions(a,i,t),o=1+Math.sin(Math.PI*t)*s;c.push(n.clone().applyQuaternion(r).normalize().multiplyScalar(o))}return c},AP=(e,t,n)=>{if(e.length===0)return n.set(0,0,0);if(e.length===1)return n.copy(e[0]);let r=en.clamp(t,0,1)*(e.length-1),i=Math.min(e.length-2,Math.floor(r));return n.lerpVectors(e[i],e[i+1],r-i)};Q.BRDF_GGX,Q.BRDF_Lambert,Q.BasicPointShadowFilter,Q.BasicShadowFilter,Q.Break,Q.Const,Q.Continue,Q.DFGLUT,Q.D_GGX,Q.Discard,Q.EPSILON,Q.F_Schlick,Q.Fn,Q.INFINITY,Q.If,Q.Loop,Q.NodeAccess,Q.NodeShaderStage,Q.NodeType,Q.NodeUpdateType,Q.PCFShadowFilter,Q.PCFSoftShadowFilter,Q.PI,Q.PI2,Q.TWO_PI,Q.HALF_PI,Q.PointShadowFilter,Q.Return,Q.Schlick_to_F0,Q.ShaderNode,Q.Stack,Q.Switch,Q.TBNViewMatrix,Q.VSMShadowFilter,Q.V_GGX_SmithCorrelated,Q.Var,Q.VarIntent,Q.abs,Q.acesFilmicToneMapping,Q.acos,Q.acosh,Q.add,Q.addMethodChaining,Q.addNodeElement,Q.agxToneMapping,Q.all,Q.alphaT,Q.ambientOcclusion,Q.and,Q.anisotropy,Q.anisotropyB,Q.anisotropyT,Q.any,Q.append,Q.array,Q.asin,Q.asinh,Q.assign,Q.atan,Q.atanh,Q.atomicAdd,Q.atomicAnd,Q.atomicFunc,Q.atomicLoad,Q.atomicMax,Q.atomicMin,Q.atomicOr,Q.atomicStore,Q.atomicSub,Q.atomicXor,Q.attenuationColor,Q.attenuationDistance,Q.attribute,Q.attributeArray,Q.backgroundBlurriness,Q.backgroundIntensity,Q.backgroundRotation,Q.batch,Q.bentNormalView,Q.billboarding,Q.bitAnd,Q.bitNot,Q.bitOr,Q.bitXor,Q.bitangentGeometry,Q.bitangentLocal,Q.bitangentView,Q.bitangentWorld,Q.bitcast,Q.blendBurn,Q.blendColor,Q.blendDodge,Q.blendOverlay,Q.blendScreen,Q.blur,Q.bool,Q.buffer,Q.bufferAttribute;var jP=Q.bumpMap;Q.builtin,Q.builtinAOContext,Q.builtinShadowContext,Q.bvec2,Q.bvec3,Q.bvec4,Q.bypass,Q.cache,Q.call,Q.cameraFar,Q.cameraIndex,Q.cameraNear,Q.cameraNormalMatrix;var MP=Q.cameraPosition;Q.cameraProjectionMatrix,Q.cameraProjectionMatrixInverse,Q.cameraViewMatrix,Q.cameraViewport,Q.cameraWorldMatrix,Q.cbrt,Q.cdl,Q.ceil,Q.checker,Q.cineonToneMapping,Q.clamp,Q.clearcoat,Q.clearcoatNormalView,Q.clearcoatRoughness,Q.clipSpace,Q.code;var NP=Q.color;Q.colorSpaceToWorking,Q.colorToDirection,Q.compute,Q.computeKernel,Q.computeSkinning,Q.context,Q.convert,Q.convertColorSpace,Q.convertToTexture,Q.countLeadingZeros,Q.countOneBits,Q.countTrailingZeros,Q.cos,Q.cosh,Q.cross,Q.cubeTexture,Q.cubeTextureBase,Q.dFdx,Q.dFdy,Q.dashSize,Q.debug,Q.decrement,Q.decrementBefore,Q.defaultBuildStages,Q.defaultShaderStages,Q.defined,Q.degrees,Q.deltaTime,Q.densityFog,Q.densityFogFactor,Q.depth,Q.depthPass,Q.determinant,Q.difference,Q.diffuseColor,Q.directPointLight,Q.directionToColor,Q.directionToFaceDirection,Q.dispersion,Q.distance,Q.div,Q.dot,Q.drawIndex,Q.dynamicBufferAttribute,Q.element,Q.emissive,Q.equal,Q.equirectDirection,Q.equirectUV,Q.exp,Q.exp2,Q.exponentialHeightFogFactor,Q.expression,Q.faceDirection,Q.faceForward,Q.faceforward;var PP=Q.float;Q.floatBitsToInt,Q.floatBitsToUint,Q.floor,Q.fog,Q.fract,Q.frameGroup,Q.frameId,Q.frontFacing,Q.fwidth,Q.gain,Q.gapSize,Q.getConstNodeType,Q.getCurrentStack,Q.getDirection,Q.getDistanceAttenuation,Q.getGeometryRoughness,Q.getNormalFromDepth,Q.interleavedGradientNoise,Q.vogelDiskSample,Q.getParallaxCorrectNormal,Q.getRoughness,Q.getScreenPosition,Q.getShIrradianceAt,Q.getShadowMaterial,Q.getShadowRenderObjectFunction,Q.getTextureIndex,Q.getViewPosition,Q.globalId,Q.glsl,Q.glslFn,Q.grayscale,Q.greaterThan,Q.greaterThanEqual,Q.hash,Q.highpModelNormalViewMatrix,Q.highpModelViewMatrix,Q.hue,Q.increment,Q.incrementBefore,Q.instance,Q.instanceIndex,Q.instancedArray,Q.instancedBufferAttribute,Q.instancedDynamicBufferAttribute,Q.instancedMesh,Q.int,Q.intBitsToFloat,Q.inverse,Q.inverseSqrt,Q.inversesqrt,Q.invocationLocalIndex,Q.invocationSubgroupIndex,Q.ior,Q.iridescence,Q.iridescenceIOR,Q.iridescenceThickness,Q.ivec2,Q.ivec3,Q.ivec4,Q.js,Q.label,Q.length,Q.lengthSq,Q.lessThan,Q.lessThanEqual,Q.lightPosition,Q.lightProjectionUV,Q.lightShadowMatrix,Q.lightTargetDirection,Q.lightTargetPosition,Q.lightViewPosition,Q.lightingContext,Q.lights,Q.linearDepth,Q.linearToneMapping,Q.localId,Q.log,Q.log2,Q.logarithmicDepthToViewZ,Q.luminance,Q.mat2,Q.mat3,Q.mat4,Q.matcapUV,Q.materialAO,Q.materialAlphaTest,Q.materialAnisotropy,Q.materialAnisotropyVector,Q.materialAttenuationColor,Q.materialAttenuationDistance,Q.materialClearcoat,Q.materialClearcoatNormal,Q.materialClearcoatRoughness,Q.materialColor,Q.materialDispersion,Q.materialEmissive,Q.materialEnvIntensity,Q.materialEnvRotation,Q.materialIOR,Q.materialIridescence,Q.materialIridescenceIOR,Q.materialIridescenceThickness,Q.materialLightMap,Q.materialLineDashOffset,Q.materialLineDashSize,Q.materialLineGapSize,Q.materialLineScale,Q.materialLineWidth,Q.materialMetalness,Q.materialNormal,Q.materialOpacity,Q.materialPointSize,Q.materialReference,Q.materialReflectivity,Q.materialRefractionRatio,Q.materialRotation,Q.materialRoughness,Q.materialSheen,Q.materialSheenRoughness,Q.materialShininess,Q.materialSpecular,Q.materialSpecularColor,Q.materialSpecularIntensity,Q.materialSpecularStrength,Q.materialThickness,Q.materialTransmission;var FP=Q.max;Q.maxMipLevel,Q.mediumpModelViewMatrix,Q.metalness,Q.min;var IP=Q.mix;Q.mixElement,Q.mod,Q.modelDirection,Q.modelNormalMatrix,Q.modelPosition,Q.modelRadius,Q.modelScale,Q.modelViewMatrix,Q.modelViewPosition,Q.modelViewProjection,Q.modelWorldMatrix,Q.modelWorldMatrixInverse,Q.morphReference,Q.mrt,Q.mul,Q.mx_aastep,Q.mx_add,Q.mx_atan2,Q.mx_cell_noise_float,Q.mx_contrast,Q.mx_divide,Q.mx_fractal_noise_float,Q.mx_fractal_noise_vec2,Q.mx_fractal_noise_vec3,Q.mx_fractal_noise_vec4,Q.mx_frame,Q.mx_heighttonormal,Q.mx_hsvtorgb,Q.mx_ifequal,Q.mx_ifgreater,Q.mx_ifgreatereq,Q.mx_invert,Q.mx_modulo,Q.mx_multiply,Q.mx_noise_float,Q.mx_noise_vec3,Q.mx_noise_vec4,Q.mx_place2d,Q.mx_power,Q.mx_ramp4,Q.mx_ramplr,Q.mx_ramptb,Q.mx_rgbtohsv,Q.mx_rotate2d,Q.mx_rotate3d,Q.mx_safepower,Q.mx_separate,Q.mx_splitlr,Q.mx_splittb,Q.mx_srgb_texture_to_lin_rec709,Q.mx_subtract,Q.mx_timer,Q.mx_transform_uv,Q.mx_unifiednoise2d,Q.mx_unifiednoise3d,Q.mx_worley_noise_float,Q.mx_worley_noise_vec2,Q.mx_worley_noise_vec3,Q.negate,Q.negateOnBackSide,Q.neutralToneMapping,Q.nodeArray,Q.nodeImmutable,Q.nodeObject,Q.nodeObjectIntent,Q.nodeObjects,Q.nodeProxy,Q.nodeProxyIntent,Q.normalFlat,Q.normalGeometry;var LP=Q.normalLocal;Q.normalMap,Q.normalView,Q.normalViewGeometry,Q.normalWorld;var RP=Q.normalWorldGeometry,zP=Q.normalize;Q.not,Q.notEqual,Q.numWorkgroups,Q.objectDirection,Q.objectGroup,Q.objectPosition,Q.objectRadius,Q.objectScale,Q.objectViewPosition,Q.objectWorldMatrix,Q.OnBeforeObjectUpdate,Q.OnBeforeMaterialUpdate,Q.OnObjectUpdate,Q.OnMaterialUpdate,Q.oneMinus,Q.or,Q.orthographicDepthToViewZ,Q.oscSawtooth,Q.oscSine,Q.oscSquare,Q.oscTriangle;var BP=Q.output;Q.outputStruct,Q.overloadingFn,Q.overrideNode,Q.overrideNodes,Q.packHalf2x16,Q.packSnorm2x16,Q.packUnorm2x16,Q.packNormalToRGB,Q.parabola,Q.parallaxDirection,Q.parallaxUV,Q.parameter,Q.pass,Q.passTexture,Q.pcurve,Q.perspectiveDepthToViewZ,Q.pmremTexture,Q.pointShadow,Q.pointUV,Q.pointWidth,Q.positionGeometry;var VP=Q.positionLocal;Q.positionPrevious,Q.positionView,Q.positionViewDirection;var HP=Q.positionWorld;Q.positionWorldDirection,Q.posterize,Q.pow,Q.pow2,Q.pow3,Q.pow4,Q.premultiplyAlpha,Q.property,Q.radians,Q.rand,Q.range,Q.rangeFog,Q.rangeFogFactor,Q.reciprocal,Q.reference,Q.referenceBuffer,Q.reflect,Q.reflectVector,Q.reflectView,Q.reflector,Q.refract,Q.refractVector,Q.refractView,Q.reinhardToneMapping,Q.remap,Q.remapClamp,Q.renderGroup,Q.renderOutput,Q.rendererReference,Q.replaceDefaultUV,Q.rotate,Q.rotateUV,Q.roughness,Q.round,Q.rtt,Q.sRGBTransferEOTF,Q.sRGBTransferOETF,Q.sample,Q.sampler,Q.samplerComparison,Q.saturate,Q.saturation,Q.screen,Q.screenCoordinate,Q.screenDPR,Q.screenSize,Q.screenUV,Q.select,Q.setCurrentStack,Q.setName,Q.shaderStages,Q.shadow,Q.shadowPositionWorld,Q.shapeCircle,Q.sharedUniformGroup,Q.sheen,Q.sheenRoughness,Q.shiftLeft,Q.shiftRight,Q.shininess,Q.sign,Q.sin,Q.sinh,Q.sinc,Q.skinning,Q.smoothstep,Q.smoothstepElement,Q.specularColor,Q.specularF90,Q.spherizeUV,Q.split,Q.spritesheetUV,Q.sqrt,Q.stack;var UP=Q.step;Q.stepElement,Q.storage,Q.storageBarrier,Q.storageTexture,Q.storageTexture3D,Q.struct,Q.sub,Q.subgroupAdd,Q.subgroupAll,Q.subgroupAnd,Q.subgroupAny,Q.subgroupBallot,Q.subgroupBroadcast,Q.subgroupBroadcastFirst,Q.subBuild,Q.subgroupElect,Q.subgroupExclusiveAdd,Q.subgroupExclusiveMul,Q.subgroupInclusiveAdd,Q.subgroupInclusiveMul,Q.subgroupIndex,Q.subgroupMax,Q.subgroupMin,Q.subgroupMul,Q.subgroupOr,Q.subgroupShuffle,Q.subgroupShuffleDown,Q.subgroupShuffleUp,Q.subgroupShuffleXor,Q.subgroupSize,Q.subgroupXor,Q.tan,Q.tanh,Q.tangentGeometry,Q.tangentLocal,Q.tangentView,Q.tangentWorld;var WP=Q.texture;Q.texture3D,Q.textureBarrier,Q.textureBicubic,Q.textureBicubicLevel,Q.textureCubeUV,Q.textureLoad,Q.textureSize,Q.textureLevel,Q.textureStore,Q.thickness,Q.time,Q.toneMapping,Q.toneMappingExposure,Q.toonOutlinePass,Q.transformDirection,Q.transformNormal,Q.transformNormalByInverseViewMatrix,Q.transformNormalByViewMatrix,Q.transformNormalToView,Q.transformedClearcoatNormalView,Q.transformedNormalView,Q.transformedNormalWorld,Q.transmission,Q.transpose,Q.triNoise3D,Q.triplanarTexture,Q.triplanarTextures,Q.trunc,Q.uint,Q.uintBitsToFloat;var GP=Q.uniform;Q.uniformArray,Q.uniformCubeTexture,Q.uniformGroup,Q.uniformFlow,Q.uniformTexture,Q.unpackHalf2x16,Q.unpackSnorm2x16,Q.unpackUnorm2x16,Q.unpackRGBToNormal,Q.unpremultiplyAlpha,Q.userData;var KP=Q.uv;Q.uvec2,Q.uvec3,Q.uvec4,Q.varying,Q.varyingProperty;var qP=Q.vec2,JP=Q.vec3,YP=Q.vec4;Q.vectorComponents,Q.velocity,Q.vertexColor,Q.vertexIndex,Q.vertexStage,Q.vibrance,Q.viewZToLogarithmicDepth,Q.viewZToOrthographicDepth,Q.viewZToPerspectiveDepth,Q.viewZToReversedOrthographicDepth,Q.viewZToReversedPerspectiveDepth,Q.viewport,Q.viewportCoordinate,Q.viewportDepthTexture,Q.viewportLinearDepth,Q.viewportMipTexture,Q.viewportOpaqueMipTexture,Q.viewportResolution,Q.viewportSafeUV,Q.viewportSharedTexture,Q.viewportSize,Q.viewportTexture,Q.viewportUV,Q.wgsl,Q.wgslFn,Q.workgroupArray,Q.workgroupBarrier,Q.workgroupId,Q.workingToColorSpace,Q.xor;var XP=e=>((e+180)%360+360)%360-180,ZP=2.5,QP=.14,$P=.45,eF=.006,tF=.02,nF=new k,rF=new k,iF=(e,t,n=new k)=>(nF.copy(DP(e)).multiplyScalar(e.altitude),t<=0?n.copy(nF):(rF.set(e.longitude/180*2,e.latitude/90*1,(e.altitude-1)*ZP),t>=1?n.copy(rF):n.lerpVectors(nF,rF,t))),aF=e=>+(e===`2d`),oF=(e,t,n)=>({latitude:e.latitude,longitude:XP(e.longitude-n.centerLongitude),altitude:t}),sF=(e,t)=>{let n=iF(e,1),r=iF(t,1),i=r.x-n.x,a=r.y-n.y,o=Math.hypot(i,a),s=Math.min($P,o*QP),c=o||1,l=-a/c,u=i/c,d=u<0?-1:1,f=(n.x+r.x)/2+l*d*s,p=(n.y+r.y)/2+u*d*s,m=[];for(let e=0;e<=36;e+=1){let t=e/36,i=1-t,a=i*i,o=2*i*t,s=t*t;m.push(new k(a*n.x+o*f+s*r.x,a*n.y+o*p+s*r.y,eF+Math.sin(Math.PI*t)*tF))}return m},cF=(e,t,n)=>{let r=oF(e,1,n),i=oF(t,1,n);return n.projection===`2d`?sF(r,i):kP(r,i)},lF=e=>{let t=en.clamp(e,0,1);return t<.5?4*t*t*t:1-(-2*t+2)**3/2},uF=.011,dF=.032,fF={origin:new j(e.origin),destination:new j(e.destination)},pF={origin:new j(`#a9e9ff`),destination:new j(`#3fa8ff`)},mF=new j(e.direct),hF=new j(`#ff7a1a`),gF={origin:1.18,destination:1},_F=e=>{let{camera:t,parent:n}=e,r=GP(1),i=HP.sub(MP).normalize().dot(RP).abs().toVar(),a=GP(e.sunDirection.clone()),o=LP.dot(zP(a)),s=PP(.7).add(o.smoothstep(-.7,.9).mul(.5)),c=i.oneMinus().pow(2.6).mul(.85),l=i.pow(8).mul(.5),u=new la(uF,12,8),d=new sy,f=new sy;d.outputNode=YP(BP.rgb.mul(s.add(c)).add(IP(BP.rgb,JP(1),.65).mul(l)),BP.a);let p=new la(dF,16,12),m=new sy({transparent:!0,blending:2,depthWrite:!1});m.outputNode=YP(BP.rgb,i.pow(2.4).mul(.34).add(i.pow(9).mul(.5)).mul(r).clamp(0,1));let h=null,g=null,_=[],v=e.view,y=e.visualMode,b=0,x=!1,S=new A,C=new tn,ee=new k,te=new No,w=new O,ne=e=>({...e,position:e.position.clone(),topHosts:e.topHosts.map(e=>({...e}))}),re=()=>{let e=aF(v.projection);for(let t of _)iF(oF(t,EP,v),e,t.position)},ie=()=>y===`flat`||v.projection===`2d`,ae=()=>{h&&(n.remove(h),h.dispose()),g&&(n.remove(g),g.dispose());let e=Math.max(1,_.length);h=new Ui(u,ie()?f:d,e),g=new Ui(p,m,e),h.count=_.length,g.count=_.length,g.visible=!ie(),C.identity();for(let e=0;e<_.length;e+=1){let t=_[e],n=gF[t.role];S.compose(t.position,C,ee.setScalar(n)),h.setMatrixAt(e,S),g.setMatrixAt(e,S),h.setColorAt(e,t.direct?mF:fF[t.role]),g.setColorAt(e,t.direct?hF:pF[t.role])}h.instanceMatrix.needsUpdate=!0,g.instanceMatrix.needsUpdate=!0,h.instanceColor&&(h.instanceColor.needsUpdate=!0),g.instanceColor&&(g.instanceColor.needsUpdate=!0),h.renderOrder=5,g.renderOrder=6,n.add(h,g)};return{setSnapshot(e,t){if(x)return _;if(t)_=e.endpoints.map(ne),re(),ae();else{let t=new Map(e.endpoints.map(e=>[e.key,e]));for(let e of _){let n=t.get(e.key);n&&(e.city=n.city,e.country=n.country,e.direct=n.direct,e.connections=n.connections,e.topHosts=n.topHosts.map(e=>({...e})))}}return _},setView(e){x||v.projection===e.projection&&v.centerLongitude===e.centerLongitude||(v=e,re(),ae())},setVisualMode(e){x||y===e||(y=e,h&&(h.material=ie()?f:d),g&&(g.visible=!ie()))},setSunDirection(e){x||a.value.copy(e)},update(e){x||(b+=e,r.value=.82+Math.sin(b*2.1)*.18)},hitTest(e,n,r){if(x||!g||_.length===0)return null;w.x=(e-r.left)/r.width*2-1,w.y=-((n-r.top)/r.height)*2+1,te.setFromCamera(w,t);let i=te.intersectObject(g,!1)[0];return i?.instanceId==null?null:_[i.instanceId]??null},dispose(){x||(x=!0,h&&=(n.remove(h),h.dispose(),null),g&&=(n.remove(g),g.dispose(),null),_=[],u.dispose(),p.dispose(),d.dispose(),f.dispose(),m.dispose())}}},vF=``+new URL(`background-DTLDDGUj.jpg`,import.meta.url).href,yF=``+new URL(`earth-day-O5DYyPrv.webp`,import.meta.url).href,bF=``+new URL(`earth-night-DiMNTAKM.webp`,import.meta.url).href,xF=``+new URL(`earth-surface-DQPefyI6.webp`,import.meta.url).href,SF={light:{ocean:`#dce6f0`,land:`#65788d`},dark:{ocean:`#243241`,land:`#8ca2b8`}},CF=async()=>{let e=new Va,t=await Promise.allSettled([e.loadAsync(vF),e.loadAsync(yF),e.loadAsync(bF),e.loadAsync(xF)]),n=[],r=!1,i;for(let e of t)e.status===`fulfilled`?n.push(e.value):(r||(i=e.reason),r=!0);if(r)throw n.forEach(e=>e.dispose()),i;return n},wF=async e=>{let{scene:t,earthGroup:n,renderer:i}=e,a=await CF(),[o,s,c,l]=a;o.mapping=303,o.colorSpace=tt,s.colorSpace=tt,c.colorSpace=tt,s.anisotropy=8,c.anisotropy=8,l.anisotropy=8,s.wrapS=r,c.wrapS=r,l.wrapS=r;let u=new co(`#ffffff`,2);u.position.set(0,.25,3),t.add(u);let d=GP(NP(`#4db2ff`)),f=GP(NP(`#bc490b`)),p=GP(.25),m=GP(.38),h=GP(e.sunDirection.clone()),g=HP.sub(MP).normalize().dot(RP).abs().oneMinus().toVar(),_=LP.dot(zP(h)).toVar(),v=IP(f,d,_.smoothstep(-.25,.75)),y=GP(0),b=qP(KP().x.add(y),KP().y),x=WP(l,b).b.smoothstep(.2,1),S=new yx;S.colorNode=IP(WP(s,b),JP(1),x.mul(2)),S.roughnessNode=FP(WP(l,b).g,UP(.01,x)).remap(0,1,p,m);let C=WP(c,b),ee=_.smoothstep(-.25,.5),te=_.smoothstep(-.5,1).mul(g.pow(2)).clamp(0,1),w=IP(C.rgb,BP.rgb,ee);w=IP(w,v,te),S.outputNode=YP(w,BP.a),S.normalNode=jP(FP(WP(l,b).r,x));let ne=GP(new j),re=GP(new j),ie=WP(l,b),ae=ie.g.sub(ie.b).smoothstep(.02,.16),oe=new sy({side:2});oe.colorNode=IP(ne,re,ae),oe.toneMapped=!1;let se=GP(0);oe.positionNode=IP(VP,JP(KP().x.sub(.5).mul(4),KP().y.sub(.5).mul(2),0),se);let ce=new la(1,128,128),le=new ji(ce,S);n.add(le);let ue=new ca(8,2),de=new sy,fe=WP(l,qP(KP().x.mul(2).add(.5-2/2).add(y),KP().y));de.colorNode=IP(ne,re,fe.g.sub(fe.b).smoothstep(.02,.16)),de.toneMapped=!1;let pe=new ji(ue,de);pe.visible=!1,n.add(pe);let me=new sy({side:1,transparent:!0,depthWrite:!1}),he=g.remap(.73,1,1,0).pow(3);he=he.mul(_.smoothstep(-.5,1)),me.outputNode=YP(v,he);let ge=new ji(ce,me);ge.scale.setScalar(1.045),n.add(ge);let _e=e.visualMode,ve=e.colorScheme,ye=0,be=!1,xe=()=>{let e=SF[ve];ne.value.set(e.ocean),re.value.set(e.land)},Se=()=>{let e=_e===`flat`||ye>0,n=ye>=1;t.background=e?null:o,i.toneMapping=e?0:4,le.material=e?oe:S,le.visible=!n,pe.visible=n,u.visible=!e,ge.visible=!e},Ce=()=>{be||u.position.copy(h.value).applyQuaternion(n.quaternion).multiplyScalar(3)};return xe(),Se(),Ce(),{setMorph(e){if(be||ye===e)return;let t=ye>0,n=ye>=1;ye=e,se.value=e,(t!==e>0||n!==e>=1)&&Se()},setCenterLongitude(e){be||(y.value=e/360)},setVisualMode(e){be||_e===e||(_e=e,Se())},setColorScheme(e){be||ve===e||(ve=e,xe())},setSunDirection(e){be||(h.value.copy(e),Ce())},syncSunLight:Ce,dispose(){be||(be=!0,t.background===o&&(t.background=null),t.remove(u),n.remove(le,ge,pe),ce.dispose(),ue.dispose(),S.dispose(),oe.dispose(),de.dispose(),me.dispose(),a.forEach(e=>e.dispose()))}}},TF=(...e)=>e.flat().sort((e,t)=>t.downloaded-e.downloaded).slice(0,5),EF=e=>({...e,path:e.path.map(e=>({...e})),topHosts:e.topHosts.map(e=>({...e}))}),DF=e=>{let t=e.map(EF).sort((e,t)=>e.key.localeCompare(t.key)),n=t.map(({direct:e,key:t})=>`${t}:${e?`direct`:`proxy`}`).sort().join(`|`),r=new Map;for(let e of t)for(let t of e.path){let n=`${t.role}:${t.latitude.toFixed(4)},${t.longitude.toFixed(4)}`,i=r.get(n);i?(i.direct&&=e.direct,i.connections+=e.connections,t.role===`destination`&&(i.topHosts=TF(i.topHosts,e.topHosts))):r.set(n,{key:n,direct:e.direct,city:t.city,country:t.country,role:t.role,connections:e.connections,topHosts:t.role===`destination`?[...e.topHosts]:[],latitude:t.latitude,longitude:t.longitude,position:new k})}return{signature:n,routes:t,endpoints:[...r.values()]}},OF=new br,kF=new k,AF=class extends mo{constructor(){super(),this.isLineSegmentsGeometry=!0,this.type=`LineSegmentsGeometry`,this.setIndex([0,2,1,2,3,1,2,4,3,4,5,3,4,6,5,6,7,5]),this.setAttribute(`position`,new Kr([-1,2,0,1,2,0,-1,1,0,1,1,0,-1,0,0,1,0,0,-1,-1,0,1,-1,0],3)),this.setAttribute(`uv`,new Kr([-1,2,1,2,-1,1,1,1,-1,-1,1,-1,-1,-2,1,-2],2))}applyMatrix4(e){let t=this.attributes.instanceStart,n=this.attributes.instanceEnd;return t!==void 0&&(t.applyMatrix4(e),n.applyMatrix4(e),t.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}setPositions(e){let t;e instanceof Float32Array?t=e:Array.isArray(e)&&(t=new Float32Array(e));let n=new jo(t,6,1);return this.setAttribute(`instanceStart`,new si(n,3,0)),this.setAttribute(`instanceEnd`,new si(n,3,3)),this.instanceCount=this.attributes.instanceStart.count,this.computeBoundingBox(),this.computeBoundingSphere(),this}setColors(e){let t;e instanceof Float32Array?t=e:Array.isArray(e)&&(t=new Float32Array(e));let n=new jo(t,6,1);return this.setAttribute(`instanceColorStart`,new si(n,3,0)),this.setAttribute(`instanceColorEnd`,new si(n,3,3)),this}fromWireframeGeometry(e){return this.setPositions(e.attributes.position.array),this}fromEdgesGeometry(e){return this.setPositions(e.attributes.position.array),this}fromMesh(e){return this.fromWireframeGeometry(new ua(e.geometry)),this}fromLineSegments(e){let t=e.geometry;return this.setPositions(t.attributes.position.array),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new br);let e=this.attributes.instanceStart,t=this.attributes.instanceEnd;e!==void 0&&t!==void 0&&(this.boundingBox.setFromBufferAttribute(e),OF.setFromBufferAttribute(t),this.boundingBox.union(OF))}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new Xr),this.boundingBox===null&&this.computeBoundingBox();let e=this.attributes.instanceStart,t=this.attributes.instanceEnd;if(e!==void 0&&t!==void 0){let n=this.boundingSphere.center;this.boundingBox.getCenter(n);let r=0;for(let i=0,a=e.count;iu&&PF.z>u)continue;if(NF.z>u){let e=NF.z-PF.z,t=(NF.z-u)/e;NF.lerp(PF,t)}else if(PF.z>u){let e=PF.z-NF.z,t=(PF.z-u)/e;PF.lerp(NF,t)}NF.applyMatrix4(r),PF.applyMatrix4(r),NF.multiplyScalar(1/NF.w),PF.multiplyScalar(1/PF.w),NF.x*=a.x/2,NF.y*=a.y/2,PF.x*=a.x/2,PF.y*=a.y/2,RF.start.copy(NF),RF.start.z=0,RF.end.copy(PF),RF.end.z=0;let o=RF.closestPointToPointParameter(IF,!0);RF.at(o,zF);let l=en.lerp(NF.z,PF.z,o),d=l>=-1&&l<=1,f=IF.distanceTo(zF){let{parent:t}=e,n=new AF,r=new Wv({color:`#ffffff`,linewidth:5.5,transparent:!0,opacity:.26,vertexColors:!0,blending:2,depthWrite:!1}),i=new Wv({color:`#ffffff`,linewidth:1.45,transparent:!0,opacity:.96,vertexColors:!0,depthWrite:!1}),a=new YF(n,r),o=new YF(n,i);a.frustumCulled=!1,o.frustumCulled=!1,a.visible=!1,o.visible=!1,a.renderOrder=1,o.renderOrder=2,t.add(a,o);let s=new AF,c=new Wv({color:`#ffffff`,linewidth:9,transparent:!0,opacity:.3,vertexColors:!0,blending:2,depthWrite:!1}),l=new Wv({color:`#ffffff`,linewidth:2.6,transparent:!0,opacity:.96,vertexColors:!0,blending:2,depthWrite:!1}),u=new YF(s,c),d=new YF(s,l);u.frustumCulled=!1,d.frustumCulled=!1,u.visible=!1,d.visible=!1,u.renderOrder=3,d.renderOrder=4,t.add(u,d);let f=[],p=[],m=e.view,h=e.visualMode,g=e.colorScheme,_=!1,v=new Map,y=new Float32Array,b=new Float32Array,x=null,S=null,C=new k,ee=new k,te=()=>h===`flat`||m.projection===`2d`,w=()=>{let e=te();a.visible=!e&&o.visible,u.visible=!e&&d.visible,l.blending=e?1:2,l.needsUpdate=!0},ne=(e,t)=>{if(_||y.length===0)return;let n=0;for(let r of f){let i=r.route.direct?tI:te()&&g===`light`?eI:$F;for(let a of[`upload`,`download`]){let o=r.route[a],s=`${r.route.key}:${a}`,c=v.get(s)??0;if(o<=0)continue;t&&(c=Math.min(1.1400000000000001,c+e*1.1400000000000001/XF)),v.set(s,c);let l=Math.max(0,c-ZF),u=Math.min(1,c),d=u-l;if(d<=0)continue;let f=Math.max(1,Math.ceil(d/ZF*QF));for(let e=0;e0,d.visible=n>0,x&&(x.needsUpdate=!0),S&&(S.needsUpdate=!0)},re=e=>{let t=[],r=[];f=[];for(let n of e){let e=[];for(let t=0;t0?r.slice(1):r)}let i=e.length-1,a=n.direct?iI:nI,o=n.direct?aI:rI;for(let n=0;n0?(n.setPositions(t),n.setColors(r),a.visible=!te(),o.visible=!0):(a.visible=!1,o.visible=!1),a.geometry=n,o.geometry=n,i.dispose();let c=s,l=Math.max(1,f.length*2*QF);y=new Float32Array(l*6),b=new Float32Array(l*6),s=new AF,s.setPositions(y),s.setColors(b),x=s.getAttribute(`instanceStart`).data,S=s.getAttribute(`instanceColorStart`).data,x.setUsage(pt),S.setUsage(pt),s.instanceCount=0,u.geometry=s,d.geometry=s,c.dispose()};return w(),{setSnapshot(e,t){if(!_){if(p=e.routes,t)re(e.routes);else{let t=new Map(e.routes.map(e=>[e.key,e]));for(let e of f){let n=t.get(e.route.key);n&&(e.route=n)}}v.clear();for(let t of e.routes)t.upload>0&&v.set(`${t.key}:upload`,0),t.download>0&&v.set(`${t.key}:download`,0);ne(0,!1)}},setView(e){_||m.projection===e.projection&&m.centerLongitude===e.centerLongitude||(m=e,re(p),w(),ne(0,!1))},setVisualMode(e){_||h===e||(h=e,w(),ne(0,!1))},setColorScheme(e){_||g===e||(g=e,ne(0,!1))},update(e){ne(e,!0)},dispose(){_||(_=!0,t.remove(a,o,u,d),n.dispose(),r.dispose(),i.dispose(),s.dispose(),c.dispose(),l.dispose(),f=[],v.clear())}}},sI=15,cI=2.65,lI=7.5,uI=.8,dI=1.05,fI=1.2,pI=e=>{let t;for(;e.length>0;)try{e.pop()()}catch(e){t??=e}if(t)throw t},mI=async(e,r)=>{let i=[],a=!1,o=e=>i.push(e),s=()=>{a||(a=!0,pI(i))},c=new ar,l=new to(28,1,.1,100);l.position.set(3.7,1.55,3.2);let u=new vP({alpha:!0,antialias:!0});u.setPixelRatio(Math.min(window.devicePixelRatio,2)),u.toneMapping=4,u.toneMappingExposure=1.05,u.domElement.className=`h-full w-full cursor-grab active:cursor-grabbing`,u.domElement.style.display=`block`;try{e.appendChild(u.domElement),o(()=>{u.setAnimationLoop(null);try{u.dispose()}finally{u.domElement.remove()}}),await u.init();let i=new Ts;i.sortObjects=!1,i.domElement.className=`pointer-events-none absolute inset-0 overflow-hidden`,i.domElement.setAttribute(`aria-hidden`,`true`),e.appendChild(i.domElement),o(()=>i.domElement.remove());let d=new os(l,u.domElement);d.enableDamping=!0,d.rotateSpeed=.55,d.zoomSpeed=.75,u.domElement.style.touchAction=`none`,o(()=>d.dispose());let f=new Zn;c.add(f),o(()=>c.remove(f));let p=new Zn;f.add(p),o(()=>f.remove(p));let m=r.reducedMotion,h=r.projection,g={projection:h,centerLongitude:0},_=r.visualMode,v=r.colorScheme,y=!0,b=!1,x=null,S=!document.hidden,C=!0,ee=!1,te=``,w=aF(h),ne=w,re=w,ie=0,ae=!1,oe=0,se=0,ce=0,le=new k,ue=new k,de=new k,fe=l.position.clone(),pe=new Io,me=OP(),he=await wF({scene:c,earthGroup:f,renderer:u,visualMode:_,colorScheme:v,sunDirection:me});o(()=>he.dispose());let ge=oI({parent:p,view:g,visualMode:_,colorScheme:v});o(()=>ge.dispose());let _e=_F({parent:p,camera:l,view:g,visualMode:_,sunDirection:me});o(()=>_e.dispose());let ve=TP({parent:p,camera:l,controls:d,labelRenderer:i,view:g});o(()=>ve.dispose());let ye=()=>{let e=en.degToRad(l.fov)/2,t=1/Math.tan(e),n=2/(Math.tan(e)*l.aspect);return Math.max(t,n)*dI},be=()=>ye()/fI,xe=()=>{if(h===`2d`){let e=ye();d.enableRotate=!1,d.enablePan=!0,d.screenSpacePanning=!0,d.mouseButtons.LEFT=t.PAN,d.touches.ONE=n.PAN,d.touches.TWO=n.DOLLY_PAN,d.minDistance=e*.35,d.maxDistance=e*1.15}else d.enableRotate=!0,d.enablePan=!1,d.screenSpacePanning=!1,d.mouseButtons.LEFT=t.ROTATE,d.touches.ONE=n.ROTATE,d.touches.TWO=n.DOLLY_ROTATE,d.minDistance=cI,d.maxDistance=lI},Se=()=>{ge.setView(g),_e.setView(g),ve.setView(g)},Ce=e=>{let t=l.position.distanceTo(d.target),n=oF(e,1,g),r=DP({latitude:en.clamp(n.latitude,-15,sI),longitude:n.longitude}).applyQuaternion(f.quaternion).normalize();l.position.copy(d.target).addScaledVector(r,t),d.update()},we=()=>{!a&&S&&C&&(ve.updateVisibility(),u.render(c,l),i.render(c,l))},Te=()=>{if(ae=!1,w=re,ie=0,he.setMorph(w),f.rotation.y=se,Se(),d.target.set(0,0,0),xe(),l.position.copy(ue),l.lookAt(d.target),d.enabled=!0,d.update(),p.visible=!0,h===`3d`&&x){let e=x;x=null,Ce(e)}},Ee=e=>{ie+=e;let t=Math.min(1,ie/uI),n=lF(t);w=en.lerp(ne,re,n),he.setMorph(w),f.rotation.y=en.lerp(oe,se,n),d.target.copy(de).multiplyScalar(1-n),l.position.lerpVectors(le,ue,n),l.lookAt(d.target),t>=1&&Te()},De=()=>{if(a)return;let e=pe.getDelta(),t=Math.min(.05,e);ae?Ee(t):(y&&h===`3d`&&(f.rotation.y+=t*.025),d.update(t)),_e.update(t),_===`space`&&w===0&&he.syncSunLight(),ge.update(e),we()},Oe=()=>{OP(new Date,me,g.centerLongitude),he.setSunDirection(me),_e.setSunDirection(me)},ke=()=>{a||(u.setAnimationLoop(null),pe.stop(),ae&&(m||!S||!C)&&Te(),!(!S||!C)&&(_===`space`&&w===0&&Oe(),m?(d.enableDamping=!1,we()):(d.enableDamping=!0,pe.start(),u.setAnimationLoop(De))))},Ae=e=>{h===`3d`&&!ae&&(fe.copy(l.position),ce=f.rotation.y),h=e,g={...g,projection:e},ne=w,re=aF(e),ie=0,ae=!0,oe=f.rotation.y,se=e===`2d`?0:ce,le.copy(l.position),de.copy(d.target),e===`2d`?ue.set(0,0,be()):ue.copy(fe),d.enabled=!1,p.visible=!1,ke()},je=(e,t=!1)=>{let n=u.domElement.getBoundingClientRect(),i=_e.hitTest(e.clientX,e.clientY,n);i?(ee=t,r.onEndpointHover(i,e.clientX,e.clientY),u.domElement.style.cursor=`pointer`):(!ee||t)&&(ee=!1,r.onEndpointHover(null),u.domElement.style.cursor=``)},Me=e=>{!ee&&e.pointerType!==`touch`&&je(e)},Ne=e=>je(e,!0),Pe=()=>{ee||r.onEndpointHover(null)};u.domElement.addEventListener(`pointermove`,Me),u.domElement.addEventListener(`click`,Ne),u.domElement.addEventListener(`pointerleave`,Pe),o(()=>{u.domElement.removeEventListener(`pointermove`,Me),u.domElement.removeEventListener(`click`,Ne),u.domElement.removeEventListener(`pointerleave`,Pe)});let Fe=new ResizeObserver(([e])=>{let t=Math.max(1,e.contentRect.width),n=Math.max(1,e.contentRect.height),r=h===`2d`&&!ae?l.position.distanceTo(d.target)/ye():0;l.aspect=t/n,l.updateProjectionMatrix(),u.setSize(t,n,!1),i.setSize(t,n),h===`2d`&&(xe(),ae?ue.set(0,0,be()):(l.position.z=ye()*r,d.update())),we()});Fe.observe(e),o(()=>Fe.disconnect());let Ie=new IntersectionObserver(([e])=>{C=e.isIntersecting,ke()},{threshold:.01});Ie.observe(e),o(()=>Ie.disconnect());let Le=()=>{S=!document.hidden,ke()};document.addEventListener(`visibilitychange`,Le),o(()=>document.removeEventListener(`visibilitychange`,Le));let Re=window.setInterval(()=>{_===`space`&&w===0&&Oe(),m&&we()},6e4);o(()=>window.clearInterval(Re));let ze=()=>{m&&we()};return d.addEventListener(`change`,ze),o(()=>d.removeEventListener(`change`,ze)),he.setMorph(w),xe(),h===`2d`&&(l.position.set(0,0,be()),d.update()),ke(),{setRoutes(e){if(a)return;let t=DF(e),n=t.signature!==te;te=t.signature,ge.setSnapshot(t,n);let r=_e.setSnapshot(t,n);ve.setEndpoints(r),m&&we()},setInitialLocation(e){a||b||!Number.isFinite(e.latitude)||!Number.isFinite(e.longitude)||(b=!0,g={...g,centerLongitude:e.longitude},he.setCenterLongitude(g.centerLongitude),Oe(),Se(),h===`2d`||ae?x=e:Ce(e),we())},setReducedMotion(e){a||(m=e,ke())},setAutoRotation(e){a||(y=e)},setCityLabelsVisible(e){a||(ve.setVisible(e),we())},setProjection(e){a||h===e||Ae(e)},setVisualMode(e){a||_===e||(_=e,he.setVisualMode(e),ge.setVisualMode(e),_e.setVisualMode(e),we())},setColorScheme(e){a||v===e||(v=e,he.setColorScheme(e),ge.setColorScheme(e),(_===`flat`||h===`2d`)&&we())},dispose:s}}catch(e){try{s()}catch{}throw e}};export{mI as createEarthRenderer}; \ No newline at end of file diff --git a/luci-app-ssr-plus/root/usr/share/shadowsocksr/ui/zashboard/assets/earth-surface-DQPefyI6.webp b/luci-app-ssr-plus/root/usr/share/shadowsocksr/ui/zashboard/assets/earth-surface-DQPefyI6.webp deleted file mode 100644 index e07afb98..00000000 Binary files a/luci-app-ssr-plus/root/usr/share/shadowsocksr/ui/zashboard/assets/earth-surface-DQPefyI6.webp and /dev/null differ diff --git a/luci-app-ssr-plus/root/usr/share/shadowsocksr/ui/zashboard/assets/geoip.worker-CYCCgy29.js b/luci-app-ssr-plus/root/usr/share/shadowsocksr/ui/zashboard/assets/geoip.worker-CYCCgy29.js deleted file mode 100644 index 0241338a..00000000 --- a/luci-app-ssr-plus/root/usr/share/shadowsocksr/ui/zashboard/assets/geoip.worker-CYCCgy29.js +++ /dev/null @@ -1 +0,0 @@ -(function(){var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;li[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let l=`manifests`,u=`chunks`,d=256*1024,f;var p=class extends Error{code;constructor(e,t){super(`GeoIP chunk store ${e} error`,t),this.code=e}};let m=()=>{if(f)return f;let e=new Promise((t,n)=>{let r=indexedDB.open(`zashboard-geoip`,2),i=!1;r.onupgradeneeded=()=>{r.result.objectStoreNames.contains(`mmdb`)&&r.result.deleteObjectStore(`mmdb`),r.result.objectStoreNames.contains(l)||r.result.createObjectStore(l),r.result.objectStoreNames.contains(u)||r.result.createObjectStore(u)},r.onsuccess=()=>{let n=r.result;if(i){n.close();return}i=!0;let a=()=>{f===e&&(f=void 0)};n.onversionchange=()=>{n.close(),a()},n.onclose=a,t(n)},r.onerror=()=>{i||(i=!0,f===e&&(f=void 0),n(r.error))},r.onblocked=()=>{i||(i=!0,f===e&&(f=void 0),n(new p(`storage`)))}});return f=e,e},h=e=>{if(!e||typeof e!=`object`)return!1;let t=e;return Number.isSafeInteger(t.chunkCount)&&t.chunkCount>0&&t.chunkSize===262144&&typeof t.generation==`string`&&t.generation.length>0&&Number.isSafeInteger(t.size)&&t.size>0&&Math.ceil(t.size/t.chunkSize)===t.chunkCount&&Number.isFinite(t.updatedAt)},g=new Set,_=new Set,v=async e=>{let t=await m(),n=await new Promise((n,r)=>{let i=t.transaction(l,`readonly`).objectStore(l).get(e);i.onsuccess=()=>n(h(i.result)?i.result:void 0),i.onerror=()=>r(i.error)});return n&&!_.has(e)&&(_.add(e),x(e,n.generation,n.previousGeneration).catch(()=>_.delete(e))),n},y=async(e,t,n,r)=>{let i=await m();return new Promise((a,o)=>{let s=i.transaction(u,`readwrite`),c=s.objectStore(u);r.forEach((r,i)=>{c.put(r.buffer,[e,t,n+i])}),s.oncomplete=()=>a(),s.onerror=()=>o(s.error),s.onabort=()=>o(s.error)})},ee=async(e,t,n)=>{let r=await m();return new Promise((i,a)=>{let o=r.transaction(u,`readonly`).objectStore(u).get([e,t,n]);o.onsuccess=()=>{let e=o.result;if(!(e instanceof ArrayBuffer)){a(Error(`Missing GeoIP database chunk ${n}`));return}i(new Uint8Array(e))},o.onerror=()=>a(o.error)})},b=async(e,t)=>{let n=await m();return new Promise((r,i)=>{let a=n.transaction(u,`readwrite`),o=IDBKeyRange.bound([e,t,0],[e,t,2**53-1]);a.objectStore(u).delete(o),a.oncomplete=()=>r(),a.onerror=()=>i(a.error),a.onabort=()=>i(a.error)})},x=async(e,t,n)=>{let r=await m();return new Promise((i,a)=>{let o=r.transaction(u,`readwrite`),s=o.objectStore(u).openKeyCursor(IDBKeyRange.bound([e,``],[e,`￿`]));s.onsuccess=()=>{let e=s.result;if(!e)return;let r=e.primaryKey;r[1]!==t&&r[1]!==n&&!g.has(r[1])&&e.delete(),e.continue()},o.oncomplete=()=>i(),o.onerror=()=>a(o.error),o.onabort=()=>a(o.error)})};var S=class{key;manifest;memoryChunkCacheMax;size;chunks=new Map;constructor(e,t,n){this.key=e,this.manifest=t,this.memoryChunkCacheMax=n,this.size=t.size}async read(e,t){if(!Number.isSafeInteger(e)||!Number.isSafeInteger(t)||e<0||t<0)throw Error(`Invalid GeoIP database byte range`);if(e+t>this.size)throw Error(`GeoIP database byte range is out of bounds`);if(t===0)return new Uint8Array;let n=Math.floor(e/this.manifest.chunkSize),r=Math.floor((e+t-1)/this.manifest.chunkSize);if(n===r){let r=await this.loadChunk(n),i=e-n*this.manifest.chunkSize;return r.subarray(i,i+t)}let i=new Uint8Array(t),a=0;for(let o=n;o<=r;o++){let n=await this.loadChunk(o),r=o*this.manifest.chunkSize,s=Math.max(e,r)-r,c=Math.min(e+t,r+n.length)-r;i.set(n.subarray(s,c),a),a+=c-s}if(a!==t)throw Error(`Incomplete GeoIP database byte range`);return i}loadChunk(e){if(e<0||e>=this.manifest.chunkCount)return Promise.reject(Error(`Invalid GeoIP database chunk ${e}`));let t=this.chunks.get(e);if(t)return this.chunks.delete(e),this.chunks.set(e,t),t;let n=ee(this.key,this.manifest.generation,e).catch(t=>{throw this.chunks.delete(e),t});for(this.chunks.set(e,n);this.chunks.size>this.memoryChunkCacheMax;){let e=this.chunks.keys().next().value;if(e===void 0)break;this.chunks.delete(e)}return n}};let C={getManifest:v,createSource(e,t,n=8){return new S(e,t,n)},async stageStream(e,t,n={}){let r=globalThis.crypto?.randomUUID?.()??`${Date.now()}-${Math.random().toString(36).slice(2)}`;g.add(r);let i=t.getReader(),a=new Uint8Array(d),o=0,s=0,c=0,l=[],u=0,f=async()=>{if(l.length!==0){try{await y(e,r,u,l)}catch(e){throw new p(`storage`,{cause:e})}l=[]}},m=async e=>{l.length===0&&(u=s),l.push(e),s++,l.length>=8&&await f()};try{for(;;){let e;try{e=await i.read()}catch(e){throw new p(`stream`,{cause:e})}if(e.done)break;c+=e.value.byteLength;let t=0;for(;t0&&await m(a.slice(0,o)),await f(),c===0||s===0)throw new p(`stream`);return{chunkCount:s,chunkSize:d,generation:r,size:c,updatedAt:n.updatedAt??Date.now()}}catch(t){throw await i.cancel().catch(()=>{}),await b(e,r).catch(()=>{}),g.delete(r),t}},async activate(e,t,n={}){let r=await m(),i;try{await new Promise((a,o)=>{let s=r.transaction(l,`readwrite`),c=s.objectStore(l),u=c.get(e);u.onsuccess=()=>{let r=h(u.result)?u.result:void 0;i={...t,previousGeneration:n.retainPrevious?r?.generation:void 0},c.put(i,e)},s.oncomplete=()=>a(),s.onerror=()=>o(s.error),s.onabort=()=>o(s.error)})}catch(e){throw new p(`storage`,{cause:e})}if(!i)throw new p(`storage`);return g.delete(i.generation),_.add(e),x(e,i.generation,i.previousGeneration).catch(()=>{}),i},async discard(e,t){try{await b(e,t)}finally{g.delete(t)}},async invalidate(e,t){let n=await m();return new Promise((r,i)=>{let a=n.transaction([l,u],`readwrite`),o=a.objectStore(l),s=o.get(e),c=IDBKeyRange.bound([e,t,0],[e,t,2**53-1]);s.onsuccess=()=>{(h(s.result)?s.result:void 0)?.generation===t&&o.delete(e)},a.objectStore(u).delete(c),a.oncomplete=()=>r(),a.onerror=()=>i(a.error),a.onabort=()=>i(a.error)})}};var w=c(o(((e,t)=>{(function(e){"use strict";let n=`(0?\\d+|0x[a-f0-9]+)`,r={fourOctet:RegExp(`^${n}\\.${n}\\.${n}\\.${n}$`,`i`),threeOctet:RegExp(`^${n}\\.${n}\\.${n}$`,`i`),twoOctet:RegExp(`^${n}\\.${n}$`,`i`),longValue:RegExp(`^${n}$`,`i`)},i=RegExp(`^0[0-7]+$`,`i`),a=RegExp(`^0x[a-f0-9]+$`,`i`),o=`%[0-9a-z]{1,}`,s=`(?:[0-9a-f]+::?)+`,c={zoneIndex:RegExp(o,`i`),native:RegExp(`^(::)?(${s})?([0-9a-f]+)?(::)?(${o})?$`,`i`),deprecatedTransitional:RegExp(`^(?:::)(${n}\\.${n}\\.${n}\\.${n}(${o})?)$`,`i`),transitional:RegExp(`^((?:${s})|(?:::)(?:${s})?)${n}\\.${n}\\.${n}\\.${n}(${o})?$`,`i`)};function l(e,t){if(e.indexOf(`::`)!==e.lastIndexOf(`::`))return null;let n=0,r=-1,i=(e.match(c.zoneIndex)||[])[0],a,o;for(i&&(i=i.substring(1),e=e.replace(/%.+$/,``));(r=e.indexOf(`:`,r+1))>=0;)n++;if(e.substr(0,2)===`::`&&n--,e.substr(-2,2)===`::`&&n--,n>t)return null;for(o=t-n,a=`:`;o--;)a+=`0:`;return e=e.replace(`::`,a),e[0]===`:`&&(e=e.slice(1)),e[e.length-1]===`:`&&(e=e.slice(0,-1)),t=(function(){let t=e.split(`:`),n=[];for(let e=0;e0;){if(a=n-r,a<0&&(a=0),e[i]>>a!==t[i]>>a)return!1;r-=n,i+=1}return!0}function d(e){if(a.test(e))return parseInt(e,16);if(e[0]===`0`&&!isNaN(parseInt(e[1],10))){if(i.test(e))return parseInt(e,8);throw Error(`ipaddr: cannot parse ${e} as octal`)}return parseInt(e,10)}function f(e,t){for(;e.length=0;--r)if(i=this.octets[r],i in n){if(a=n[i],t&&a!==0)return null;a!==8&&(t=!0),e+=a}else return null;return 32-e},e.prototype.range=function(){return p.subnetMatch(this,this.SpecialRanges)},e.prototype.toByteArray=function(){return this.octets.slice(0)},e.prototype.toIPv4MappedAddress=function(){return p.IPv6.parse(`::ffff:${this.toString()}`)},e.prototype.toNormalizedString=function(){return this.toString()},e.prototype.toString=function(){return this.octets.join(`.`)},e})(),p.IPv4.broadcastAddressFromCIDR=function(e){try{let t=this.parseCIDR(e),n=t[0].toByteArray(),r=this.subnetMaskFromPrefixLength(t[1]).toByteArray(),i=[],a=0;for(;a<4;)i.push(parseInt(n[a],10)|parseInt(r[a],10)^255),a++;return new this(i)}catch{throw Error(`ipaddr: the address does not have IPv4 CIDR format`)}},p.IPv4.isIPv4=function(e){return this.parser(e)!==null},p.IPv4.isValid=function(e){try{return new this(this.parser(e)),!0}catch{return!1}},p.IPv4.isValidCIDR=function(e){try{return this.parseCIDR(e),!0}catch{return!1}},p.IPv4.isValidFourPartDecimal=function(e){return!!(p.IPv4.isValid(e)&&e.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},p.IPv4.isValidCIDRFourPartDecimal=function(e){let t=e.match(/^(.+)\/(\d+)$/);return!p.IPv4.isValidCIDR(e)||!t?!1:p.IPv4.isValidFourPartDecimal(t[1])},p.IPv4.networkAddressFromCIDR=function(e){let t,n,r,i,a;try{for(t=this.parseCIDR(e),r=t[0].toByteArray(),a=this.subnetMaskFromPrefixLength(t[1]).toByteArray(),i=[],n=0;n<4;)i.push(parseInt(r[n],10)&parseInt(a[n],10)),n++;return new this(i)}catch{throw Error(`ipaddr: the address does not have IPv4 CIDR format`)}},p.IPv4.parse=function(e){let t=this.parser(e);if(t===null)throw Error(`ipaddr: string is not formatted like an IPv4 Address`);return new this(t)},p.IPv4.parseCIDR=function(e){let t;if(t=e.match(/^(.+)\/(\d+)$/)){let e=parseInt(t[2]);if(e>=0&&e<=32){let n=[this.parse(t[1]),e];return Object.defineProperty(n,"toString",{value:function(){return this.join(`/`)}}),n}}throw Error(`ipaddr: string is not formatted like an IPv4 CIDR range`)},p.IPv4.parser=function(e){let t,n,i;if(t=e.match(r.fourOctet))return(function(){let e=t.slice(1,6),r=[];for(let t=0;t4294967295||i<0)throw Error(`ipaddr: address outside defined range`);return(function(){let e=[],t;for(t=0;t<=24;t+=8)e.push(i>>t&255);return e})().reverse()}else if(t=e.match(r.twoOctet))return(function(){let e=t.slice(1,4),n=[];if(i=d(e[1]),i>16777215||i<0)throw Error(`ipaddr: address outside defined range`);return n.push(d(e[0])),n.push(i>>16&255),n.push(i>>8&255),n.push(i&255),n})();else if(t=e.match(r.threeOctet))return(function(){let e=t.slice(1,5),n=[];if(i=d(e[2]),i>65535||i<0)throw Error(`ipaddr: address outside defined range`);return n.push(d(e[0])),n.push(d(e[1])),n.push(i>>8&255),n.push(i&255),n})();else return null},p.IPv4.subnetMaskFromPrefixLength=function(e){if(e=parseInt(e),e<0||e>32)throw Error(`ipaddr: invalid IPv4 prefix length`);let t=[0,0,0,0],n=0,r=Math.floor(e/8);for(;n=0;--a)if(r=this.parts[a],r in n){if(i=n[r],t&&i!==0)return null;i!==16&&(t=!0),e+=i}else return null;return 128-e},e.prototype.range=function(){return p.subnetMatch(this,this.SpecialRanges)},e.prototype.toByteArray=function(){let e,t=[],n=this.parts;for(let r=0;r>8),t.push(e&255);return t},e.prototype.toFixedLengthString=function(){let e=(function(){let e=[];for(let t=0;t>8,t&255,n>>8,n&255])},e.prototype.toNormalizedString=function(){let e=(function(){let e=[];for(let t=0;tr&&(n=i.index,r=i[0].length);return r<0?t:`${t.substring(0,n)}::${t.substring(n+r)}`},e.prototype.toString=function(){return this.toRFC5952String()},e})(),p.IPv6.broadcastAddressFromCIDR=function(e){try{let t=this.parseCIDR(e),n=t[0].toByteArray(),r=this.subnetMaskFromPrefixLength(t[1]).toByteArray(),i=[],a=0;for(;a<16;)i.push(parseInt(n[a],10)|parseInt(r[a],10)^255),a++;return new this(i)}catch(e){throw Error(`ipaddr: the address does not have IPv6 CIDR format (${e})`)}},p.IPv6.isIPv6=function(e){return this.parser(e)!==null},p.IPv6.isValid=function(e){if(typeof e==`string`&&e.indexOf(`:`)===-1)return!1;try{let t=this.parser(e);return new this(t.parts,t.zoneId),!0}catch{return!1}},p.IPv6.isValidCIDR=function(e){if(typeof e==`string`&&e.indexOf(`:`)===-1)return!1;try{return this.parseCIDR(e),!0}catch{return!1}},p.IPv6.networkAddressFromCIDR=function(e){let t,n,r,i,a;try{for(t=this.parseCIDR(e),r=t[0].toByteArray(),a=this.subnetMaskFromPrefixLength(t[1]).toByteArray(),i=[],n=0;n<16;)i.push(parseInt(r[n],10)&parseInt(a[n],10)),n++;return new this(i)}catch(e){throw Error(`ipaddr: the address does not have IPv6 CIDR format (${e})`)}},p.IPv6.parse=function(e){let t=this.parser(e);if(t.parts===null)throw Error(`ipaddr: string is not formatted like an IPv6 Address`);return new this(t.parts,t.zoneId)},p.IPv6.parseCIDR=function(e){let t,n,r;if((n=e.match(/^(.+)\/(\d+)$/))&&(t=parseInt(n[2]),t>=0&&t<=128))return r=[this.parse(n[1]),t],Object.defineProperty(r,"toString",{value:function(){return this.join(`/`)}}),r;throw Error(`ipaddr: string is not formatted like an IPv6 CIDR range`)},p.IPv6.parser=function(e){let t,n,r,i,a,o;if(r=e.match(c.deprecatedTransitional))return this.parser(`::ffff:${r[1]}`);if(c.native.test(e))return l(e,8);if((r=e.match(c.transitional))&&(o=r[6]||``,t=r[1],r[1].endsWith(`::`)||(t=t.slice(0,-1)),t=l(t+o,6),t.parts)){for(a=[parseInt(r[2]),parseInt(r[3]),parseInt(r[4]),parseInt(r[5])],n=0;n128)throw Error(`ipaddr: invalid IPv6 prefix length`);let t=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],n=0,r=Math.floor(e/8);for(;n{let r=0;for(let i=0;i{let n=typeof e==`bigint`?Number(e):e;if(typeof n!=`number`||!Number.isFinite(n))throw Error(`Invalid MMDB metadata field: ${t}`);return n};var A=class{source;baseOffset;constructor(e,t){this.source=e,this.baseOffset=t}async decode(e){let t=(await this.source.read(e,1))[0],n=t>>5,r=e+1;if(n===1){let e=await this.decodePointer(t,r);return{value:(await this.decode(e.value)).value,offset:e.offset}}if(n===0&&(n=(await this.source.read(r,1))[0]+7,r++,n<8))throw Error(`Invalid extended MMDB type at offset ${e}`);let i=await this.sizeFromControlByte(t,r);return this.decodeByType(n,i.offset,i.value)}async sizeFromControlByte(e,t){let n=e&31;return n<29?{value:n,offset:t}:n===29?{value:29+(await this.source.read(t,1))[0],offset:t+1}:n===30?{value:285+O(await this.source.read(t,2)),offset:t+2}:{value:65821+O(await this.source.read(t,3)),offset:t+3}}async decodePointer(e,t){let n=e>>3&3,r=await this.source.read(t,n+1),i;switch(n){case 0:i=(e&7)<<8|r[0];break;case 1:i=(e&7)*65536+O(r);break;case 2:i=(e&7)*16777216+O(r);break;default:i=O(r)}return{value:this.baseOffset+E[n]+i,offset:t+n+1}}async decodeByType(e,t,n){switch(e){case 2:{let e=await this.source.read(t,n);return{value:D.decode(e),offset:t+n}}case 3:{let e=await this.source.read(t,8);return{value:new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat64(0),offset:t+8}}case 4:return{value:await this.source.read(t,n),offset:t+n};case 5:case 6:return{value:await this.decodeUint(t,n),offset:t+n};case 7:return this.decodeMap(n,t);case 8:return{value:await this.decodeInt32(t,n),offset:t+n};case 9:case 10:return{value:await this.decodeBigUint(t,n),offset:t+n};case 11:return this.decodeArray(n,t);case 14:return{value:n!==0,offset:t};case 15:{let e=await this.source.read(t,4);return{value:new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat32(0),offset:t+4}}default:throw Error(`Unknown MMDB type ${e} at offset ${t}`)}}async decodeMap(e,t){let n={};for(let r=0;r4)throw Error(`Invalid MMDB unsigned integer size: ${t}`);return O(await this.source.read(e,t))}async decodeInt32(e,t){if(t===0)return 0;if(t>4)throw Error(`Invalid MMDB signed integer size: ${t}`);let n=await this.source.read(e,t);return t<4?O(n):new DataView(n.buffer,n.byteOffset,n.byteLength).getInt32(0)}async decodeBigUint(e,t){if(t>16)throw Error(`Invalid MMDB large integer size: ${t}`);let n=await this.source.read(e,t),r=0n;for(let e of n)r=r<<8n|BigInt(e);return r}};let j=async e=>{let t=Math.min(e.size,131072),n=e.size-t,r=await e.read(n,t);for(let e=r.length-T.length;e>=0;e--){let t=!0;for(let n=0;n{let t=await j(e),n=(await new A(e,t).decode(t)).value,r=k(n.node_count,`node_count`),i=k(n.record_size,`record_size`),a=k(n.ip_version,`ip_version`);if(![24,28,32].includes(i))throw Error(`Unsupported MMDB record size`);if(![4,6].includes(a))throw Error(`Unsupported MMDB IP version`);if(!Number.isSafeInteger(r)||r<=0)throw Error(`Invalid MMDB node count`);let o=i/4,s=r*o;if(s+16>=t)throw Error(`Invalid MMDB search tree size`);return{databaseType:typeof n.database_type==`string`?n.database_type:``,ipVersion:a,nodeByteSize:o,nodeCount:r,recordSize:i,searchTreeSize:s}};var te=class e{source;metadata;decoder;decodedRecords=new Map;ipv4StartNodeNumber=0;constructor(e,t){this.source=e,this.metadata=t,this.decoder=new A(e,t.searchTreeSize+16)}static async open(t){let n=new e(t,await M(t));return n.ipv4StartNodeNumber=await n.findIPv4Start(),n}async get(e){if(!w.isValid(e))return null;let t=w.parse(e).toByteArray(),n=this.metadata.nodeCount,r=t.length===4?this.ipv4StartNodeNumber:0;for(let e=0;e>3]>>(7^e&7)&1,[i,a]=await this.readNode(r);r=n?a:i}if(r<=n)return null;let i=r-n+this.metadata.searchTreeSize,a=this.decodedRecords.get(i);if(a)return this.decodedRecords.delete(i),this.decodedRecords.set(i,a),a;let o=this.decoder.decode(i).then(e=>e.value);for(this.decodedRecords.set(i,o);this.decodedRecords.size>512;){let e=this.decodedRecords.keys().next().value;if(e===void 0)break;this.decodedRecords.delete(e)}try{return await o}catch(e){throw this.decodedRecords.delete(i),e}}async findIPv4Start(){if(this.metadata.ipVersion===4)return 0;let e=0;for(let t=0;t<96&&eself.postMessage(e),W=()=>new Promise((e,t)=>{let n=indexedDB.open(I,1);n.onupgradeneeded=()=>{n.result.objectStoreNames.contains(L)||n.result.createObjectStore(L)},n.onsuccess=()=>e(n.result),n.onerror=()=>t(n.error)}),G=async()=>{let e=await W();return new Promise((t,n)=>{let r=e.transaction(L,`readonly`).objectStore(L).getAll();r.onsuccess=()=>{let e=r.result.filter(e=>e?.blob instanceof Blob).sort((e,t)=>(t.storedAt||0)-(e.storedAt||0))[0];t(e)},r.onerror=()=>n(r.error)}).finally(()=>e.close())},K=()=>new Promise(e=>{let t=indexedDB.deleteDatabase(I);t.onsuccess=()=>e(),t.onerror=()=>e(),t.onblocked=()=>e()}),q=async e=>{let t=await te.open(C.createSource(P,e,64));if(!t.metadata.databaseType||t.metadata.nodeCount<=0)throw new R(`invalid`);return t},J=(e,t)=>{z=e,B=t.generation},Y=async e=>{let t=await C.stageStream(P,e.blob.stream(),{updatedAt:Number.isFinite(e.storedAt)?e.storedAt:0});try{let e=await q(t),n=await C.activate(P,t);return J(e,n),await K(),n}catch(e){throw await C.discard(P,t.generation).catch(()=>{}),e}},X=async()=>{U({type:`status`,status:`checking`});try{let e=await C.getManifest(P);if(e){U({type:`status`,status:`loading-cache`});try{J(await q(e),e),K(),U({type:`status`,status:`ready`}),Date.now()-e.updatedAt>F&&Q(!0);return}catch{z=null,B=null,await C.invalidate(P,e.generation).catch(()=>{})}}let t=await G();if(t){U({type:`status`,status:`loading-cache`});try{let e=await Y(t);U({type:`status`,status:`ready`}),Date.now()-e.updatedAt>F&&Q(!0);return}catch{z=null,B=null,await K(),U({type:`status`,status:`idle`,recoveredCorruptCache:!0});return}}K(),U({type:`status`,status:`idle`,recoveredCorruptCache:!!e})}catch{U({type:`status`,status:`error`,error:`storage`})}},Z=async()=>{try{let e=await navigator.storage?.estimate();if(e?.quota!=null&&e.usage!=null&&e.quota-e.usage<146977216)throw new R(`space`)}catch(e){if(e instanceof R)throw e}},Q=async(e=!1)=>{if(H)return;if(typeof DecompressionStream>`u`){e||U({type:`status`,status:`error`,error:`unsupported`});return}try{await Z()}catch(t){e||U({type:`status`,status:`error`,error:t instanceof R?t.code:`space`});return}let t=new AbortController;H=t,e||(z=null,B=null,U({type:`status`,status:`downloading`,received:0}));try{let n=await fetch(N,{signal:t.signal});if(!n.ok||!n.body)throw new R(`network`);let r=Number(n.headers.get(`content-length`))||void 0,i=0,a=new TransformStream({transform(t,n){i+=t.byteLength,e||U({type:`status`,status:`downloading`,received:i,total:r}),n.enqueue(t)}}),o;try{let e=new DecompressionStream(`gzip`);o=n.body.pipeThrough(a).pipeThrough(e)}catch{throw new R(`decompress`)}let s;try{s=await C.stageStream(P,o)}catch(e){throw t.signal.aborted?e:e instanceof p&&e.code===`storage`?new R(`storage`):new R(`decompress`)}if(t.signal.aborted)throw await C.discard(P,s.generation).catch(()=>{}),Error(`GeoIP database download was cancelled`);let c;try{c=await q(s)}catch{throw await C.discard(P,s.generation).catch(()=>{}),new R(`invalid`)}if(t.signal.aborted)throw await C.discard(P,s.generation).catch(()=>{}),Error(`GeoIP database download was cancelled`);let l;try{l=await C.activate(P,s)}catch{throw await C.discard(P,s.generation).catch(()=>{}),new R(`storage`)}J(c,l),U({type:`status`,status:`ready`})}catch(n){e||(t.signal.aborted?U({type:`status`,status:`idle`}):U({type:`status`,status:`error`,error:n instanceof R?n.code:`network`}))}finally{H===t&&(H=null)}},$=(e,t)=>{if(!e||typeof e!=`object`)return``;let n=e,r=t.toLowerCase();return r.startsWith(`zh`)?n[`zh-CN`]??n.zh??n.en??``:r.startsWith(`ru`)?n.ru??n.en??``:n[t]??n[r.split(`-`)[0]]??n.en??``},ne=e=>e.replace(/\s*(?:(?:\([^()]*\)|([^()]*))\s*)+$/u,``).trim(),re=(e,t)=>z&&z!==e?Promise.resolve(z):V||(V=(async()=>{let e=await C.getManifest(P);if(!e||e.generation===t)return null;let n=await q(e);return J(n,e),n})().catch(()=>null).finally(()=>{V=null}),V),ie=async(e,t)=>{let n=z,r=B;if(!n)return null;let i;try{i=await n.get(e)}catch{let t=await re(n,r);if(!t)return null;try{i=await t.get(e)}catch{return null}}let a=i?.location?.latitude,o=i?.location?.longitude;return a==null||o==null?null:{ip:e,latitude:a,longitude:o,city:ne($(i?.city?.names,t)),country:$(i?.country?.names,t)}},ae=async(e,t,n)=>{let r={},i=0,a=Array.from({length:Math.min(16,t.length)},async()=>{for(;i{switch(e.type){case`init`:X();break;case`download`:Q();break;case`cancel`:H?.abort();break;case`lookup`:ae(e.id,e.ips,e.locale);break}}})(); \ No newline at end of file diff --git a/luci-app-ssr-plus/root/usr/share/shadowsocksr/ui/zashboard/assets/index-DC9m9n9t.js b/luci-app-ssr-plus/root/usr/share/shadowsocksr/ui/zashboard/assets/index-DC9m9n9t.js deleted file mode 100644 index 2e167e51..00000000 --- a/luci-app-ssr-plus/root/usr/share/shadowsocksr/ui/zashboard/assets/index-DC9m9n9t.js +++ /dev/null @@ -1,165 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./EarthGlobeCard-DhFkBz8U.js","./palette-DPyxzM37.js","./EarthGlobeCard-DQPfbIzt.css"])))=>i.map(i=>d[i]); -var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},s=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),c=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},l=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;li[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},u=(n,r,a)=>(a=n==null?{}:e(i(n)),l(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),d=e=>a.call(e,`module.exports`)?e[`module.exports`]:l(t({},`__esModule`,{value:!0}),e);(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var f=c({EMPTY_ARR:()=>ee,EMPTY_OBJ:()=>M,NO:()=>ne,NOOP:()=>te,PatchFlagNames:()=>Be,PatchFlags:()=>ze,ShapeFlags:()=>Ve,SlotFlags:()=>He,camelize:()=>Ee,capitalize:()=>ke,cssVarNameEscapeSymbolsRE:()=>ht,def:()=>Ne,escapeHtml:()=>T,escapeHtmlComment:()=>E,extend:()=>ie,genCacheKey:()=>h,genPropsAccessExp:()=>m,generateCodeFrame:()=>g,getEscapedCssVarName:()=>D,getGlobalThis:()=>Le,hasChanged:()=>je,hasOwn:()=>se,hyphenate:()=>Oe,includeBooleanAttr:()=>S,invokeArrayFns:()=>Me,isArray:()=>P,isBooleanAttr:()=>ot,isBuiltInDirective:()=>Ce,isDate:()=>ue,isFunction:()=>fe,isGloballyAllowed:()=>We,isGloballyWhitelisted:()=>Ge,isHTMLTag:()=>et,isIntegerKey:()=>xe,isKnownHtmlAttr:()=>ut,isKnownMathMLAttr:()=>ft,isKnownSvgAttr:()=>dt,isMap:()=>ce,isMathMLTag:()=>nt,isModelListener:()=>re,isObject:()=>he,isOn:()=>N,isPlainObject:()=>be,isPromise:()=>ge,isRegExp:()=>de,isRenderableAttrValue:()=>w,isReservedProp:()=>Se,isSSRSafeAttrName:()=>C,isSVGTag:()=>tt,isSet:()=>le,isSpecialBooleanAttr:()=>at,isString:()=>pe,isSymbol:()=>me,isVoidTag:()=>rt,looseEqual:()=>k,looseIndexOf:()=>A,looseToNumber:()=>Pe,makeMap:()=>p,normalizeClass:()=>b,normalizeCssVarValue:()=>j,normalizeProps:()=>x,normalizeStyle:()=>_,objectToString:()=>_e,parseStringStyle:()=>v,propsToAttrMap:()=>lt,remove:()=>ae,slotFlagsText:()=>Ue,stringifyStyle:()=>y,toDisplayString:()=>F,toHandlerKey:()=>Ae,toNumber:()=>Fe,toRawType:()=>ye,toTypeString:()=>ve});function p(e){let t=Object.create(null);for(let n of e.split(`,`))t[n]=1;return e=>e in t}function m(e){return Re.test(e)?`__props.${e}`:`__props[${JSON.stringify(e)}]`}function h(e,t){return e+JSON.stringify(t,(e,t)=>typeof t==`function`?t.toString():t)}function g(e,t=0,n=e.length){if(t=Math.max(0,Math.min(t,e.length)),n=Math.max(0,Math.min(n,e.length)),t>n)return``;let r=e.split(/(\r?\n)/),i=r.filter((e,t)=>t%2==1);r=r.filter((e,t)=>t%2==0);let a=0,o=[];for(let e=0;e=t){for(let s=e-Ke;s<=e+Ke||n>a;s++){if(s<0||s>=r.length)continue;let c=s+1;o.push(`${c}${` `.repeat(Math.max(3-String(c).length,0))}| ${r[s]}`);let l=r[s].length,u=i[s]&&i[s].length||0;if(s===e){let e=t-(a-(l+u)),r=Math.max(1,n>a?l-e:n-t);o.push(` | `+` `.repeat(e)+`^`.repeat(r))}else if(s>e){if(n>a){let e=Math.max(Math.min(n-a,l),1);o.push(` | `+`^`.repeat(e))}a+=l+u}}break}return o.join(` -`)}function _(e){if(P(e)){let t={};for(let n=0;n{if(e){let n=e.split(Je);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function y(e){if(!e)return``;if(pe(e))return e;let t=``;for(let n in e){let r=e[n];if(pe(r)||typeof r==`number`){let e=n.startsWith(`--`)?n:Oe(n);t+=`${e}:${r};`}}return t}function b(e){let t=``;if(pe(e))t=e;else if(P(e))for(let n=0;nt?e===`"`?`\\\\\\"`:`\\\\${e}`:`\\${e}`)}function O(e,t){if(e.length!==t.length)return!1;let n=!0;for(let r=0;n&&rk(e,t))}function j(e){return e==null?`initial`:typeof e==`string`?e===``?` `:e:String(e)}var M,ee,te,ne,N,re,ie,ae,oe,se,P,ce,le,ue,de,fe,pe,me,he,ge,_e,ve,ye,be,xe,Se,Ce,we,Te,Ee,De,Oe,ke,Ae,je,Me,Ne,Pe,Fe,Ie,Le,Re,ze,Be,Ve,He,Ue,We,Ge,Ke,qe,Je,Ye,Xe,Ze,Qe,$e,et,tt,nt,rt,it,at,ot,st,ct,lt,ut,dt,ft,pt,mt,ht,gt,F,_t,vt,yt=o((()=>{M={},ee=[],te=()=>{},ne=()=>!1,N=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),re=e=>e.startsWith(`onUpdate:`),ie=Object.assign,ae=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},oe=Object.prototype.hasOwnProperty,se=(e,t)=>oe.call(e,t),P=Array.isArray,ce=e=>ve(e)===`[object Map]`,le=e=>ve(e)===`[object Set]`,ue=e=>ve(e)===`[object Date]`,de=e=>ve(e)===`[object RegExp]`,fe=e=>typeof e==`function`,pe=e=>typeof e==`string`,me=e=>typeof e==`symbol`,he=e=>typeof e==`object`&&!!e,ge=e=>(he(e)||fe(e))&&fe(e.then)&&fe(e.catch),_e=Object.prototype.toString,ve=e=>_e.call(e),ye=e=>ve(e).slice(8,-1),be=e=>ve(e)===`[object Object]`,xe=e=>pe(e)&&e!==`NaN`&&e[0]!==`-`&&``+parseInt(e,10)===e,Se=p(`,key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted`),Ce=p(`bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo`),we=e=>{let t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},Te=/-\w/g,Ee=we(e=>e.replace(Te,e=>e.slice(1).toUpperCase())),De=/\B([A-Z])/g,Oe=we(e=>e.replace(De,`-$1`).toLowerCase()),ke=we(e=>e.charAt(0).toUpperCase()+e.slice(1)),Ae=we(e=>e?`on${ke(e)}`:``),je=(e,t)=>!Object.is(e,t),Me=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},Pe=e=>{let t=parseFloat(e);return isNaN(t)?e:t},Fe=e=>{let t=pe(e)?Number(e):NaN;return isNaN(t)?e:t},Le=()=>Ie||=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{},Re=/^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/,ze={TEXT:1,1:`TEXT`,CLASS:2,2:`CLASS`,STYLE:4,4:`STYLE`,PROPS:8,8:`PROPS`,FULL_PROPS:16,16:`FULL_PROPS`,NEED_HYDRATION:32,32:`NEED_HYDRATION`,STABLE_FRAGMENT:64,64:`STABLE_FRAGMENT`,KEYED_FRAGMENT:128,128:`KEYED_FRAGMENT`,UNKEYED_FRAGMENT:256,256:`UNKEYED_FRAGMENT`,NEED_PATCH:512,512:`NEED_PATCH`,DYNAMIC_SLOTS:1024,1024:`DYNAMIC_SLOTS`,DEV_ROOT_FRAGMENT:2048,2048:`DEV_ROOT_FRAGMENT`,CACHED:-1,"-1":`CACHED`,BAIL:-2,"-2":`BAIL`},Be={1:`TEXT`,2:`CLASS`,4:`STYLE`,8:`PROPS`,16:`FULL_PROPS`,32:`NEED_HYDRATION`,64:`STABLE_FRAGMENT`,128:`KEYED_FRAGMENT`,256:`UNKEYED_FRAGMENT`,512:`NEED_PATCH`,1024:`DYNAMIC_SLOTS`,2048:`DEV_ROOT_FRAGMENT`,[-1]:`CACHED`,[-2]:`BAIL`},Ve={ELEMENT:1,1:`ELEMENT`,FUNCTIONAL_COMPONENT:2,2:`FUNCTIONAL_COMPONENT`,STATEFUL_COMPONENT:4,4:`STATEFUL_COMPONENT`,TEXT_CHILDREN:8,8:`TEXT_CHILDREN`,ARRAY_CHILDREN:16,16:`ARRAY_CHILDREN`,SLOTS_CHILDREN:32,32:`SLOTS_CHILDREN`,TELEPORT:64,64:`TELEPORT`,SUSPENSE:128,128:`SUSPENSE`,COMPONENT_SHOULD_KEEP_ALIVE:256,256:`COMPONENT_SHOULD_KEEP_ALIVE`,COMPONENT_KEPT_ALIVE:512,512:`COMPONENT_KEPT_ALIVE`,COMPONENT:6,6:`COMPONENT`},He={STABLE:1,1:`STABLE`,DYNAMIC:2,2:`DYNAMIC`,FORWARDED:3,3:`FORWARDED`},Ue={1:`STABLE`,2:`DYNAMIC`,3:`FORWARDED`},We=p(`Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol`),Ge=We,Ke=2,qe=/;(?![^(]*\))/g,Je=/:([^]+)/,Ye=/\/\*[^]*?\*\//g,Xe=`html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot`,Ze=`svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view`,Qe=`annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics`,$e=`area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr`,et=p(Xe),tt=p(Ze),nt=p(Qe),rt=p($e),it=`itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`,at=p(it),ot=p(it+`,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`),st=/[>/="'\u0009\u000a\u000c\u0020]/,ct={},lt={acceptCharset:`accept-charset`,className:`class`,htmlFor:`for`,httpEquiv:`http-equiv`},ut=p(`accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap`),dt=p(`xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan`),ft=p(`accent,accentunder,actiontype,align,alignmentscope,altimg,altimg-height,altimg-valign,altimg-width,alttext,bevelled,close,columnsalign,columnlines,columnspan,denomalign,depth,dir,display,displaystyle,encoding,equalcolumns,equalrows,fence,fontstyle,fontweight,form,frame,framespacing,groupalign,height,href,id,indentalign,indentalignfirst,indentalignlast,indentshift,indentshiftfirst,indentshiftlast,indextype,justify,largetop,largeop,lquote,lspace,mathbackground,mathcolor,mathsize,mathvariant,maxsize,minlabelspacing,mode,other,overflow,position,rowalign,rowlines,rowspan,rquote,rspace,scriptlevel,scriptminsize,scriptsizemultiplier,selection,separator,separators,shift,side,src,stackalign,stretchy,subscriptshift,superscriptshift,symmetric,voffset,width,widths,xlink:href,xlink:show,xlink:type,xmlns`),pt=/["'&<>]/,mt=/^(?:-?>)+||--!>|?@[\\\]^`{|}~]/g,gt=e=>!!(e&&e.__v_isRef===!0),F=e=>pe(e)?e:e==null?``:P(e)||he(e)&&(e.toString===_e||!fe(e.toString))?gt(e)?F(e.value):JSON.stringify(e,_t,2):String(e),_t=(e,t)=>gt(t)?_t(e,t.value):ce(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],r)=>(e[vt(t,r)+` =>`]=n,e),{})}:le(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>vt(e))}:me(t)?vt(t):he(t)&&!P(t)&&!be(t)?String(t):t,vt=(e,t=``)=>me(e)?`Symbol(${e.description??t})`:e}));function bt(e){return new kn(e)}function xt(){return On}function St(e,t=!1){On&&On.cleanups.push(e)}function Ct(e,t=!1){if(e.flags|=8,t){e.next=Fn,Fn=e;return}e.next=Pn,Pn=e}function wt(){Nn++}function Tt(){if(--Nn>0)return;if(Fn){let e=Fn;for(Fn=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}let e;for(;Pn;){let t=Pn;for(Pn=void 0;t;){let n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(t){e||=t}t=n}}if(e)throw e}function Et(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Dt(e){let t,n=e.depsTail,r=n;for(;r;){let e=r.prevDep;r.version===-1?(r===n&&(n=e),At(r),jt(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=e}e.deps=t,e.depsTail=n}function Ot(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(kt(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function kt(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Rn)||(e.globalVersion=Rn,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Ot(e))))return;e.flags|=2;let t=e.dep,n=An,r=In;An=e,In=!0;try{Et(e);let n=e.fn(e._value);(t.version===0||je(n,e._value))&&(e.flags|=128,e._value=n,t.version++)}catch(e){throw t.version++,e}finally{An=n,In=r,Dt(e),e.flags&=-3}}function At(e,t=!1){let{dep:n,prevSub:r,nextSub:i}=e;if(r&&(r.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)At(e,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function jt(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}function Mt(e,t){e.effect instanceof Mn&&(e=e.effect.fn);let n=new Mn(e);t&&ie(n,t);try{n.run()}catch(e){throw n.stop(),e}let r=n.run.bind(n);return r.effect=n,r}function Nt(e){e.effect.stop()}function Pt(){Ln.push(In),In=!1}function Ft(){let e=Ln.pop();In=e===void 0||e}function It(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let e=An;An=void 0;try{t()}finally{An=e}}}function Lt(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let e=t.deps;e;e=e.nextDep)Lt(e)}let n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}function Rt(e,t,n){if(In&&An){let t=Vn.get(e);t||Vn.set(e,t=new Map);let r=t.get(n);r||(t.set(n,r=new Bn),r.map=t,r.key=n),r.track()}}function zt(e,t,n,r,i,a){let o=Vn.get(e);if(!o){Rn++;return}let s=e=>{e&&e.trigger()};if(wt(),t===`clear`)o.forEach(s);else{let i=P(e),a=i&&xe(n);if(i&&n===`length`){let e=Number(r);o.forEach((t,n)=>{(n===`length`||n===Wn||!me(n)&&n>=e)&&s(t)})}else switch((n!==void 0||o.has(void 0))&&s(o.get(n)),a&&s(o.get(Wn)),t){case`add`:i?a&&s(o.get(`length`)):(s(o.get(Hn)),ce(e)&&s(o.get(Un)));break;case`delete`:i||(s(o.get(Hn)),ce(e)&&s(o.get(Un)));break;case`set`:ce(e)&&s(o.get(Hn));break}}Tt()}function Bt(e,t){let n=Vn.get(e);return n&&n.get(t)}function Vt(e){let t=dn(e);return t===e?t:(Rt(t,`iterate`,Wn),ln(e)?t:t.map(fr))}function Ht(e){return Rt(e=dn(e),`iterate`,Wn),e}function Ut(e,t){return cn(e)?pr(sn(e)?fr(t):t):fr(t)}function Wt(e,t,n){let r=Ht(e),i=r[t]();return r!==e&&!ln(e)&&(i._next=i.next,i.next=()=>{let e=i._next();return e.done||(e.value=n(e.value)),e}),i}function Gt(e,t,n,r,i,a){let o=Ht(e),s=o!==e&&!ln(e),c=o[t];if(c!==Kn[t]){let t=c.apply(e,a);return s?fr(t):t}let l=n;o!==e&&(s?l=function(t,r){return n.call(this,Ut(e,t),r,e)}:n.length>2&&(l=function(t,r){return n.call(this,t,r,e)}));let u=c.call(o,l,r);return s&&i?i(u):u}function Kt(e,t,n,r){let i=Ht(e),a=i!==e&&!ln(e),o=n,s=!1;i!==e&&(a?(s=r.length===0,o=function(t,r,i){return s&&(s=!1,t=Ut(e,t)),n.call(this,t,Ut(e,r),i,e)}):n.length>3&&(o=function(t,r,i){return n.call(this,t,r,i,e)}));let c=i[t](o,...r);return s?Ut(e,c):c}function qt(e,t,n){let r=dn(e);Rt(r,`iterate`,Wn);let i=r[t](...n);return(i===-1||i===!1)&&un(n[0])?(n[0]=dn(n[0]),r[t](...n)):i}function Jt(e,t,n=[]){Pt(),wt();let r=dn(e)[t].apply(e,n);return Tt(),Ft(),r}function Yt(e){me(e)||(e=String(e));let t=dn(this);return Rt(t,`has`,e),t.hasOwnProperty(e)}function Xt(e,t,n){return function(...r){let i=this.__v_raw,a=dn(i),o=ce(a),s=e===`entries`||e===Symbol.iterator&&o,c=e===`keys`&&o,l=i[e](...r),u=n?nr:t?pr:fr;return!t&&Rt(a,`iterate`,c?Un:Hn),ie(Object.create(l),{next(){let{value:e,done:t}=l.next();return t?{value:e,done:t}:{value:s?[u(e[0]),u(e[1])]:u(e),done:t}}})}}function Zt(e){return function(...t){return e===`delete`?!1:e===`clear`?void 0:this}}function Qt(e,t){let n={get(n){let r=this.__v_raw,i=dn(r),a=dn(n);e||(je(n,a)&&Rt(i,`get`,n),Rt(i,`get`,a));let{has:o}=rr(i),s=t?nr:e?pr:fr;if(o.call(i,n))return s(r.get(n));if(o.call(i,a))return s(r.get(a));r!==i&&r.get(n)},get size(){let t=this.__v_raw;return!e&&Rt(dn(t),`iterate`,Hn),t.size},has(t){let n=this.__v_raw,r=dn(n),i=dn(t);return e||(je(t,i)&&Rt(r,`has`,t),Rt(r,`has`,i)),t===i?n.has(t):n.has(t)||n.has(i)},forEach(n,r){let i=this,a=i.__v_raw,o=dn(a),s=t?nr:e?pr:fr;return!e&&Rt(o,`iterate`,Hn),a.forEach((e,t)=>n.call(r,s(e),s(t),i))}};return ie(n,e?{add:Zt(`add`),set:Zt(`set`),delete:Zt(`delete`),clear:Zt(`clear`)}:{add(e){let n=dn(this),r=rr(n),i=dn(e),a=!t&&!ln(e)&&!cn(e)?i:e;return r.has.call(n,a)||je(e,a)&&r.has.call(n,e)||je(i,a)&&r.has.call(n,i)||(n.add(a),zt(n,`add`,a,a)),this},set(e,n){!t&&!ln(n)&&!cn(n)&&(n=dn(n));let r=dn(this),{has:i,get:a}=rr(r),o=i.call(r,e);o||=(e=dn(e),i.call(r,e));let s=a.call(r,e);return r.set(e,n),o?je(n,s)&&zt(r,`set`,e,n,s):zt(r,`add`,e,n),this},delete(e){let t=dn(this),{has:n,get:r}=rr(t),i=n.call(t,e);i||=(e=dn(e),n.call(t,e));let a=r?r.call(t,e):void 0,o=t.delete(e);return i&&zt(t,`delete`,e,void 0,a),o},clear(){let e=dn(this),t=e.size!==0,n=e.clear();return t&&zt(e,`clear`,void 0,void 0,void 0),n}}),[`keys`,`values`,`entries`,Symbol.iterator].forEach(r=>{n[r]=Xt(r,e,t)}),n}function $t(e,t){let n=Qt(e,t);return(t,r,i)=>r===`__v_isReactive`?!e:r===`__v_isReadonly`?e:r===`__v_raw`?t:Reflect.get(se(n,r)&&r in t?n:t,r,i)}function en(e){switch(e){case`Object`:case`Array`:return 1;case`Map`:case`Set`:case`WeakMap`:case`WeakSet`:return 2;default:return 0}}function tn(e){return cn(e)?e:on(e,!1,Qn,ir,cr)}function nn(e){return on(e,!1,er,ar,lr)}function rn(e){return on(e,!0,$n,or,ur)}function an(e){return on(e,!0,tr,sr,dr)}function on(e,t,n,r,i){if(!he(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;let a=i.get(e);if(a)return a;let o=en(ye(e));if(o===0)return e;let s=new Proxy(e,o===2?r:n);return i.set(e,s),s}function sn(e){return cn(e)?sn(e.__v_raw):!!(e&&e.__v_isReactive)}function cn(e){return!!(e&&e.__v_isReadonly)}function ln(e){return!!(e&&e.__v_isShallow)}function un(e){return e?!!e.__v_raw:!1}function dn(e){let t=e&&e.__v_raw;return t?dn(t):e}function fn(e){return!se(e,`__v_skip`)&&Object.isExtensible(e)&&Ne(e,`__v_skip`,!0),e}function pn(e){return e?e.__v_isRef===!0:!1}function I(e){return hn(e,!1)}function mn(e){return hn(e,!0)}function hn(e,t){return pn(e)?e:new mr(e,t)}function gn(e){e.dep&&e.dep.trigger()}function L(e){return pn(e)?e.value:e}function _n(e){return fe(e)?e():L(e)}function vn(e){return sn(e)?e:new Proxy(e,hr)}function yn(e){return new gr(e)}function bn(e){let t=P(e)?Array(e.length):{};for(let n in e)t[n]=Sn(e,n);return t}function xn(e,t,n){return pn(e)?e:fe(e)?new vr(e):he(e)&&arguments.length>1?Sn(e,t,n):I(e)}function Sn(e,t,n){return new _r(e,t,n)}function Cn(e,t,n=!1){let r,i;return fe(e)?r=e:(r=e.get,i=e.set),new yr(r,i,n)}function wn(){return Cr}function Tn(e,t=!1,n=Cr){if(n){let t=Sr.get(n);t||Sr.set(n,t=[]),t.push(e)}}function En(e,t,n=M){let{immediate:r,deep:i,once:a,scheduler:o,augmentJob:s,call:c}=n,l=e=>i?e:ln(e)||i===!1||i===0?Dn(e,1):Dn(e),u,d,f,p,m=!1,h=!1;if(pn(e)?(d=()=>e.value,m=ln(e)):sn(e)?(d=()=>l(e),m=!0):P(e)?(h=!0,m=e.some(e=>sn(e)||ln(e)),d=()=>e.map(e=>{if(pn(e))return e.value;if(sn(e))return l(e);if(fe(e))return c?c(e,2):e()})):d=fe(e)?t?c?()=>c(e,2):e:()=>{if(f){Pt();try{f()}finally{Ft()}}let t=Cr;Cr=u;try{return c?c(e,3,[p]):e(p)}finally{Cr=t}}:te,t&&i){let e=d,t=i===!0?1/0:i;d=()=>Dn(e(),t)}let g=xt(),_=()=>{u.stop(),g&&g.active&&ae(g.effects,u)};if(a&&t){let e=t;t=(...t)=>{let n=e(...t);return _(),n}}let v=h?Array(e.length).fill(xr):xr,y=e=>{if(!(!(u.flags&1)||!u.dirty&&!e))if(t){let n=u.run();if(e||i||m||(h?n.some((e,t)=>je(e,v[t])):je(n,v))){f&&f();let e=Cr;Cr=u;try{let e=[n,v===xr?void 0:h&&v[0]===xr?[]:v,p];v=n,c?c(t,3,e):t(...e)}finally{Cr=e}}}else u.run()};return s&&s(y),u=new Mn(d),u.scheduler=o?()=>o(y,!1):y,p=e=>Tn(e,!1,u),f=u.onStop=()=>{let e=Sr.get(u);if(e){if(c)c(e,4);else for(let t of e)t();Sr.delete(u)}},t?r?y(!0):v=u.run():o?o(y.bind(null,!0),!0):u.run(),_.pause=u.pause.bind(u),_.resume=u.resume.bind(u),_.stop=_,_}function Dn(e,t=1/0,n){if(t<=0||!he(e)||e.__v_skip||(n||=new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,pn(e))Dn(e.value,t,n);else if(P(e))for(let r=0;r{Dn(e,t,n)});else if(be(e)){for(let r in e)Dn(e[r],t,n);for(let r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&Dn(e[r],t,n)}return e}var On,kn,An,jn,Mn,Nn,Pn,Fn,In,Ln,Rn,zn,Bn,Vn,Hn,Un,Wn,Gn,Kn,qn,Jn,Yn,Xn,Zn,Qn,$n,er,tr,nr,rr,ir,ar,or,sr,cr,lr,ur,dr,fr,pr,mr,hr,gr,_r,vr,yr,R,br,xr,Sr,Cr,wr=o((()=>{yt(),kn=class{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!e&&On&&(On.active?(this.parent=On,this.index=(On.scopes||=[]).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes){let n=this.scopes.slice();for(e=0,t=n.length;e0&&--this._on===0){if(On===this)On=this.prevScope;else{let e=On;for(;e;){if(e.prevScope===this){e.prevScope=this.prevScope;break}e=e.prevScope}}this.prevScope=void 0}}stop(e){if(this._active){this._active=!1;let t,n;for(t=0,n=this.effects.length;tUt(this,e))},concat(...e){return Vt(this).concat(...e.map(e=>P(e)?Vt(e):e))},entries(){return Wt(this,`entries`,e=>(e[1]=Ut(this,e[1]),e))},every(e,t){return Gt(this,`every`,e,t,void 0,arguments)},filter(e,t){return Gt(this,`filter`,e,t,e=>e.map(e=>Ut(this,e)),arguments)},find(e,t){return Gt(this,`find`,e,t,e=>Ut(this,e),arguments)},findIndex(e,t){return Gt(this,`findIndex`,e,t,void 0,arguments)},findLast(e,t){return Gt(this,`findLast`,e,t,e=>Ut(this,e),arguments)},findLastIndex(e,t){return Gt(this,`findLastIndex`,e,t,void 0,arguments)},forEach(e,t){return Gt(this,`forEach`,e,t,void 0,arguments)},includes(...e){return qt(this,`includes`,e)},indexOf(...e){return qt(this,`indexOf`,e)},join(e){return Vt(this).join(e)},lastIndexOf(...e){return qt(this,`lastIndexOf`,e)},map(e,t){return Gt(this,`map`,e,t,void 0,arguments)},pop(){return Jt(this,`pop`)},push(...e){return Jt(this,`push`,e)},reduce(e,...t){return Kt(this,`reduce`,e,t)},reduceRight(e,...t){return Kt(this,`reduceRight`,e,t)},shift(){return Jt(this,`shift`)},some(e,t){return Gt(this,`some`,e,t,void 0,arguments)},splice(...e){return Jt(this,`splice`,e)},toReversed(){return Vt(this).toReversed()},toSorted(e){return Vt(this).toSorted(e)},toSpliced(...e){return Vt(this).toSpliced(...e)},unshift(...e){return Jt(this,`unshift`,e)},values(){return Wt(this,`values`,e=>Ut(this,e))}},Kn=Array.prototype,qn=p(`__proto__,__v_isRef,__isVue`),Jn=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!==`arguments`&&e!==`caller`).map(e=>Symbol[e]).filter(me)),Yn=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if(t===`__v_skip`)return e.__v_skip;let r=this._isReadonly,i=this._isShallow;if(t===`__v_isReactive`)return!r;if(t===`__v_isReadonly`)return r;if(t===`__v_isShallow`)return i;if(t===`__v_raw`)return n===(r?i?dr:ur:i?lr:cr).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;let a=P(e);if(!r){let e;if(a&&(e=Gn[t]))return e;if(t===`hasOwnProperty`)return Yt}let o=Reflect.get(e,t,pn(e)?e:n);if((me(t)?Jn.has(t):qn(t))||(r||Rt(e,`get`,t),i))return o;if(pn(o)){let e=a&&xe(t)?o:o.value;return r&&he(e)?rn(e):e}return he(o)?r?rn(o):tn(o):o}},Xn=class extends Yn{constructor(e=!1){super(!1,e)}set(e,t,n,r){let i=e[t],a=P(e)&&xe(t);if(!this._isShallow){let e=cn(i);if(!ln(n)&&!cn(n)&&(i=dn(i),n=dn(n)),!a&&pn(i)&&!pn(n))return e||(i.value=n),!0}let o=a?Number(t)e,rr=e=>Reflect.getPrototypeOf(e),ir={get:$t(!1,!1)},ar={get:$t(!1,!0)},or={get:$t(!0,!1)},sr={get:$t(!0,!0)},cr=new WeakMap,lr=new WeakMap,ur=new WeakMap,dr=new WeakMap,fr=e=>he(e)?tn(e):e,pr=e=>he(e)?rn(e):e,mr=class{constructor(e,t){this.dep=new Bn,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:dn(e),this._value=t?e:fr(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||ln(e)||cn(e);e=n?e:dn(e),je(e,t)&&(this._rawValue=e,this._value=n?e:fr(e),this.dep.trigger())}},hr={get:(e,t,n)=>t===`__v_raw`?e:L(Reflect.get(e,t,n)),set:(e,t,n,r)=>{let i=e[t];return pn(i)&&!pn(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}},gr=class{constructor(e){this.__v_isRef=!0,this._value=void 0;let t=this.dep=new Bn,{get:n,set:r}=e(t.track.bind(t),t.trigger.bind(t));this._get=n,this._set=r}get value(){return this._value=this._get()}set value(e){this._set(e)}},_r=class{constructor(e,t,n){this._object=e,this._defaultValue=n,this.__v_isRef=!0,this._value=void 0,this._key=me(t)?t:String(t),this._raw=dn(e);let r=!0,i=e;if(!P(e)||me(this._key)||!xe(this._key))do r=!un(i)||ln(i);while(r&&(i=i.__v_raw));this._shallow=r}get value(){let e=this._object[this._key];return this._shallow&&(e=L(e)),this._value=e===void 0?this._defaultValue:e}set value(e){if(this._shallow&&pn(this._raw[this._key])){let t=this._object[this._key];if(pn(t)){t.value=e;return}}this._object[this._key]=e}get dep(){return Bt(this._raw,this._key)}},vr=class{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}},yr=class{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new Bn(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Rn-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&An!==this)return Ct(this,!0),!0}get value(){let e=this.dep.track();return kt(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}},R={GET:`get`,HAS:`has`,ITERATE:`iterate`},br={SET:`set`,ADD:`add`,DELETE:`delete`,CLEAR:`clear`},xr={},Sr=new WeakMap,Cr=void 0}));function Tr(e){zo.push(e)}function Er(){zo.pop()}function Dr(e,t){}function Or(e,t,n,r){try{return r?e(...r):e()}catch(e){Ar(e,t,n)}}function kr(e,t,n,r){if(fe(e)){let i=Or(e,t,n,r);return i&&ge(i)&&i.catch(e=>{Ar(e,t,n)}),i}if(P(e)){let i=[];for(let a=0;a>>1,i=Ho[r],a=Yo(i);a=Yo(n)?Ho.push(e):Ho.splice(Nr(t),0,e),e.flags|=1,Fr()}}function Fr(){Jo||=qo.then(zr)}function Ir(e){P(e)?Wo.push(...e):Go&&e.id===-1?Go.splice(Ko+1,0,e):e.flags&1||(Wo.push(e),e.flags|=1),Fr()}function Lr(e,t,n=Uo+1){for(;nYo(e)-Yo(t));if(Wo.length=0,Go){Go.push(...e);return}for(Go=e,Ko=0;KoXo.emit(e,...t)),Zo=[]):typeof window<`u`&&window.HTMLElement&&!(window.navigator?.userAgent)?.includes(`jsdom`)?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(e=>{Br(e,t)}),setTimeout(()=>{Xo||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Zo=[])},3e3)):Zo=[]}function Vr(e){let t=Qo;return Qo=e,$o=e&&e.type.__scopeId||null,t}function Hr(e){$o=e}function Ur(){$o=null}function z(e,t=Qo,n){if(!t||e._n)return e;let r=(...n)=>{r._d&&co(-1);let i=Vr(t),a=kc.length,o;try{o=e(...n)}finally{for(let e=kc.length;e>a;e--)so();Vr(i),r._d&&co(1)}return o};return r._n=!0,r._c=!0,r._d=!0,r}function Wr(e,t){if(Qo===null)return e;let n=Mo(Qo),r=e.dirs||=[];for(let e=0;e1)return n&&fe(t)?t.call(r&&r.proxy):t}}function Jr(){return!!(Lc()||ac)}function Yr(e,t){return Qr(e,null,t)}function Xr(e,t){return Qr(e,null,{flush:`post`})}function Zr(e,t){return Qr(e,null,{flush:`sync`})}function B(e,t,n){return Qr(e,t,n)}function Qr(e,t,n=M){let{immediate:r,deep:i,flush:a,once:o}=n,s=ie({},n),c=t&&r||!t&&a!==`post`,l;if(Hc){if(a===`sync`){let e=ns();l=e.__watcherHandles||=[]}else if(!c){let e=()=>{};return e.stop=te,e.resume=te,e.pause=te,e}}let u=Ic;s.call=(e,t,n)=>kr(e,u,t,n);let d=!1;a===`post`?s.scheduler=e=>{Sc(e,u&&u.suspense)}:a!==`sync`&&(d=!0,s.scheduler=(e,t)=>{t?e():Pr(e)}),s.augmentJob=e=>{t&&(e.flags|=4),d&&(e.flags|=2,u&&(e.id=u.uid,e.i=u))};let f=En(e,t,s);return Hc&&(l?l.push(f):c&&f()),f}function $r(e,t,n){let r=this.proxy,i=pe(e)?e.includes(`.`)?ei(r,e):()=>r[e]:e.bind(r,r),a;fe(t)?a=t:(a=t.handler,n=t);let o=Bc(this),s=Qr(i,a.bind(r),n);return o(),s}function ei(e,t){let n=t.split(`.`);return()=>{let t=e;for(let e=0;e{e.isMounted=!0}),Us(()=>{e.isUnmounting=!0}),e}function oi(e){let t=e[0];if(e.length>1){for(let n of e)if(n.type!==Dc){t=n;break}}return t}function si(e,t){let{leavingVNodes:n}=e,r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function ci(e,t,n,r,i){let{appear:a,mode:o,persisted:s=!1,onBeforeEnter:c,onEnter:l,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:f,onLeave:p,onAfterLeave:m,onLeaveCancelled:h,onBeforeAppear:g,onAppear:_,onAfterAppear:v,onAppearCancelled:y}=t,b=String(e.key),x=si(n,e),S=(e,t)=>{e&&kr(e,r,9,t)},C=(e,t)=>{let n=t[1];S(e,t),P(e)?e.every(e=>e.length<=1)&&n():e.length<=1&&n()},w={mode:o,persisted:s,beforeEnter(t){let r=c;if(!n.isMounted)if(a)r=g||c;else return;t[ps]&&t[ps](!0);let i=x[b];i&&fo(e,i)&&i.el[ps]&&i.el[ps](),S(r,[t])},enter(t){if(x[b]===e)return;let r=l,i=u,o=d;if(!n.isMounted)if(a)r=_||l,i=v||u,o=y||d;else return;let s=!1;t[ms]=e=>{s||(s=!0,S(e?o:i,[t]),w.delayedLeave&&w.delayedLeave(),t[ms]=void 0)};let c=t[ms].bind(null,!1);r?C(r,[t,c]):c()},leave(t,r){let i=String(e.key);if(t[ms]&&t[ms](!0),n.isUnmounting)return r();S(f,[t]);let a=!1;t[ps]=n=>{a||(a=!0,r(),S(n?h:m,[t]),t[ps]=void 0,x[i]===e&&delete x[i])};let o=t[ps].bind(null,!1);x[i]=e,p?C(p,[t,o]):o()},clone(e){let a=ci(e,t,n,r,i);return i&&i(a),a}};return w}function li(e){if(Is(e))return e=go(e),e.children=null,e}function ui(e){if(!Is(e))return as(e.type)&&e.children?oi(e.children):e;if(e.component)return e.component.subTree;let{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&fe(n.default))return n.default()}}function di(e,t){e.shapeFlag&6&&e.component?(e.transition=t,di(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function fi(e,t=!1,n){let r=[],i=0;for(let a=0;a1)for(let e=0;en.value,set:e=>n.value=e})}return n}function gi(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}function _i(e,t,n,r,i=!1){if(P(e)){e.forEach((e,a)=>_i(e,t&&(P(t)?t[a]:t),n,r,i));return}if(Fs(r)&&!i){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&_i(e,t,n,r.component.subTree);return}let a=r.shapeFlag&4?Mo(r.component):r.el,o=i?null:a,{i:s,r:c}=e,l=t&&t.r,u=s.refs===M?s.refs={}:s.refs,d=s.setupState,f=dn(d),p=d===M?ne:e=>!gi(u,e)&&se(f,e),m=(e,t)=>!(t&&gi(u,t));if(l!=null&&l!==c){if(vi(t),pe(l))u[l]=null,p(l)&&(d[l]=null);else if(pn(l)){let e=t;m(l,e.k)&&(l.value=null),e.k&&(u[e.k]=null)}}if(fe(c))Or(c,s,12,[o,u]);else{let t=pe(c),r=pn(c);if(t||r){let s=()=>{if(e.f){let n=t?p(c)?d[c]:u[c]:m(c)||!e.k?c.value:u[e.k];if(i)P(n)&&ae(n,a);else if(P(n))n.includes(a)||n.push(a);else if(t)u[c]=[a],p(c)&&(d[c]=u[c]);else{let t=[a];m(c,e.k)&&(c.value=t),e.k&&(u[e.k]=t)}}else t?(u[c]=o,p(c)&&(d[c]=o)):r&&(m(c,e.k)&&(c.value=o),e.k&&(u[e.k]=o))};if(o){let t=()=>{s(),bs.delete(e)};t.id=-1,bs.set(e,t),Sc(t,n)}else vi(e),s()}}}function vi(e){let t=bs.get(e);t&&(t.flags|=8,bs.delete(e))}function yi(e){let{mt:t,p:n,o:{patchProp:r,createText:i,nextSibling:a,parentNode:o,remove:s,insert:c,createComment:l}}=e,u=(e,t)=>{if(!t.hasChildNodes()){n(null,e,t),Rr(),t._vnode=e;return}d(t.firstChild,e,null,null,null),Rr(),t._vnode=e},d=(n,r,s,l,u,y=!1)=>{y||=!!r.dynamicChildren;let b=Es(n)&&n.data===`[`,x=()=>h(n,r,s,l,u,b),{type:S,ref:C,shapeFlag:w,patchFlag:T}=r,E=n.nodeType;r.el=n,T===-2&&(y=!1,r.dynamicChildren=null);let D=null;switch(S){case Ec:E===3?(n.data!==r.children&&(Ss(),n.data=r.children),D=a(n)):r.children===``?(c(r.el=i(``),o(n),n),D=n):D=x();break;case Dc:v(n)?(D=a(n),_(r.el=n.content.firstChild,n,s)):D=E!==8||b?x():a(n);break;case Oc:if(b&&(n=a(n),E=n.nodeType),E===1||E===3){D=n;let e=!r.children.length;for(let t=0;t{o||=!!t.dynamicChildren;let{type:c,dynamicProps:l,props:u,patchFlag:d,shapeFlag:f,dirs:m,transition:h}=t,g=c===`input`||c===`option`,y=!!l;if(g||y||d!==-1){m&&Gr(t,null,n,`created`);let c=!1;if(v(e)){c=Ga(null,h)&&n&&n.vnode.props&&n.vnode.props.appear;let r=e.content.firstChild;if(c){let e=r.getAttribute(`class`);e&&(r.$cls=e),h.beforeEnter(r)}_(r,e,n),t.el=e=r}if(f&16&&!(u&&(u.innerHTML||u.textContent))){let r=p(e.firstChild,t,e,n,i,a,o);for(r&&!bi(e,1)&&Ss();r;){let e=r;r=r.nextSibling,s(e)}}else if(f&8){let n=t.children;n[0]===` -`&&(e.tagName===`PRE`||e.tagName===`TEXTAREA`)&&(n=n.slice(1));let{textContent:r}=e;r!==n&&r!==n.replace(/\r\n|\r/g,` -`)&&(bi(e,0)||Ss(),e.textContent=t.children)}if(u){if(g||y||!o||d&48){let t=e.tagName.includes(`-`),i=e.namespaceURI.includes(`svg`)?`svg`:e.namespaceURI.includes(`MathML`)?`mathml`:void 0;for(let a in u)(g&&(a.endsWith(`value`)||a===`indeterminate`)||N(a)&&!Se(a)||a[0]===`.`||t&&!Se(a)||l&&l.includes(a))&&r(e,a,null,u[a],i,n)}else if(u.onClick)r(e,`onClick`,null,u.onClick,void 0,n);else if(d&4&&sn(u.style))for(let e in u.style)u.style[e]}let b;(b=u&&u.onVnodeBeforeMount)&&Co(b,n,t),m&&Gr(t,null,n,`beforeMount`),((b=u&&u.onVnodeMounted)||m||c)&&io(()=>{b&&Co(b,n,t),c&&h.enter(e),m&&Gr(t,null,n,`mounted`)},i)}return e.nextSibling},p=(e,t,r,o,s,l,u)=>{u||=!!t.dynamicChildren;let f=t.children,p=f.length,m=!1;for(let t=0;t{let{slotScopeIds:u}=t;u&&(i=i?i.concat(u):u);let d=o(e),f=p(a(e),t,d,n,r,i,s);return f&&Es(f)&&f.data===`]`?a(t.anchor=f):(Ss(),c(t.anchor=l(`]`),d,f),f)},h=(e,t,r,i,c,l)=>{if(Si(e,t)||Ss(),t.el=null,l){let t=g(e);for(;;){let n=a(e);if(n&&n!==t)s(n);else break}}let u=a(e),d=o(e);return s(e),n(null,t,d,u,r,i,Ts(d),c),r&&(r.vnode.el=t.el,Na(r,t.el)),u},g=(e,t=`[`,n=`]`)=>{let r=0;for(;e;)if(e=a(e),e&&Es(e)&&(e.data===t&&r++,e.data===n)){if(r===0)return a(e);r--}return e},_=(e,t,n)=>{let r=t.parentNode;r&&r.replaceChild(e,t);let i=n;for(;i;)i.vnode.el===t&&(i.vnode.el=i.subTree.el=e),i=i.parent},v=e=>e.nodeType===1&&e.tagName===`TEMPLATE`;return[u,d]}function bi(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(Ds);)e=e.parentElement;return xi(e&&e.getAttribute(Ds),t)}function xi(e,t){if(e==null)return!1;if(e===``)return!0;{let n=e.split(`,`);return t===0&&n.includes(`children`)?!0:n.includes(Os[t])}}function Si(e,t){return bi(e.parentElement,1)||Ci(e)||wi(t)}function Ci(e){return e.nodeType===1&&xi(e.getAttribute(Ds),1)}function wi({props:e}){let t=e&&e[Ds];return typeof t==`string`&&xi(t,1)}function Ti(e){let{top:t,left:n,bottom:r,right:i}=e.getBoundingClientRect(),{innerHeight:a,innerWidth:o}=window;return(t>0&&t0&&r0&&n0&&i(d++,l=null,p()),p=()=>{let e;return l||(e=l=t().catch(e=>{if(e=e instanceof Error?e:Error(String(e)),c)return new Promise((t,n)=>{c(e,()=>t(f()),()=>n(e),d+1)});throw e}).then(t=>e!==l&&l?l:(t&&(t.__esModule||t[Symbol.toStringTag]===`Module`)&&(t=t.default),u=t,t)))};return V({name:`AsyncComponentWrapper`,__asyncLoader:p,__asyncHydrate(e,t,n){let r=e.isConnected,i=!1;(t.bu||=[]).push(()=>i=!0);let o=()=>{i||!e.parentNode||r&&!e.isConnected||n()},s=a?()=>{let n=a(o,t=>Ei(e,t));n&&(t.bum||=[]).push(n)}:o;u?s():p().then(()=>!t.isUnmounted&&s())},get __asyncResolved(){return u},setup(){let e=Ic;if(mi(e),u)return()=>Oi(u,e);let t=t=>{l=null,Ar(t,e,13,!r)};if(s&&e.suspense||Hc)return p().then(t=>()=>Oi(t,e)).catch(e=>(t(e),()=>r?J(r,{error:e}):null));let a=I(!1),c=I(),d=I(!!i),f,m;return Ws(()=>{f!=null&&clearTimeout(f),m!=null&&clearTimeout(m)}),i&&(m=setTimeout(()=>{e.isUnmounted||(d.value=!1)},i)),o!=null&&(f=setTimeout(()=>{if(!e.isUnmounted&&!a.value&&!c.value){let e=Error(`Async component timed out after ${o}ms.`);t(e),c.value=e}},o)),p().then(()=>{e.isUnmounted||(a.value=!0,e.parent&&Is(e.parent.vnode)&&e.parent.update())}).catch(n=>{if(e.isUnmounted){l=null;return}t(n),c.value=n}),()=>{if(a.value&&u)return Oi(u,e);if(c.value&&r)return J(r,{error:c.value});if(n&&!d.value)return Oi(n,e)}}})}function Oi(e,t){let{ref:n,props:r,children:i,ce:a}=t.vnode,o=J(e,r,i);return o.ref=n,o.ce=a,delete t.vnode.ce,o}function ki(e,t){return P(e)?e.some(e=>ki(e,t)):pe(e)?e.split(`,`).includes(t):de(e)?(e.lastIndex=0,e.test(t)):!1}function Ai(e,t){Mi(e,`a`,t)}function ji(e,t){Mi(e,`da`,t)}function Mi(e,t,n=Ic){let r=e.__wdc||=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()};if(Ii(t,r,n),n){let e=n.parent;for(;e&&e.parent;)Is(e.parent.vnode)&&Ni(r,t,n,e),e=e.parent}}function Ni(e,t,n,r){let i=Ii(t,e,r,!0);Ws(()=>{ae(r[t],i)},n)}function Pi(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function Fi(e){return e.shapeFlag&128?e.ssContent:e}function Ii(e,t,n=Ic,r=!1){if(n){let i=n[e]||(n[e]=[]),a=t.__weh||=(...r)=>{Pt();let i=Bc(n),a=kr(t,n,e,r);return i(),Ft(),a};return r?i.unshift(a):i.push(a),a}}function Li(e,t=Ic){Ii(`ec`,e,t)}function Ri(e,t){return Vi(Js,e,!0,t)||e}function zi(e){return pe(e)?Vi(Js,e,!1)||e:e||Xs}function Bi(e){return Vi(Ys,e)}function Vi(e,t,n=!0,r=!1){let i=Qo||Ic;if(i){let n=i.type;if(e===Js){let e=No(n,!1);if(e&&(e===t||e===Ee(t)||e===ke(Ee(t))))return n}let a=Hi(i[e]||n[e],t)||Hi(i.appContext[e],t);return!a&&r?n:a}}function Hi(e,t){return e&&(e[t]||e[Ee(t)]||e[ke(Ee(t))])}function Ui(e,t,n,r){let i,a=n&&n[r],o=P(e);if(o||pe(e)){let n=o&&sn(e),r=!1,s=!1;n&&(r=!ln(e),s=cn(e),e=Ht(e)),i=Array(e.length);for(let n=0,o=e.length;nt(e,n,void 0,a&&a[n]));else{let n=Object.keys(e);i=Array(n.length);for(let r=0,o=n.length;r{let t=r.fn(...e);return t&&(t.key=r.key),t}:r.fn)}return e}function Gi(e,t,n={},r,i,a){if(Qo.ce||Qo.parent&&Fs(Qo.parent)&&Qo.parent.ce){let e=a!=null&&n.key==null?ie({},n,{key:a}):n,i=Object.keys(e).length>0;return t!=="default"&&(e.name=t),H(),W(q,null,[J(`slot`,e,r&&r())],i?-2:64)}let o=e[t];o&&o._c&&(o._d=!1);let s=kc.length;H();let c;try{let i=o&&Ki(o(n)),s=n.key||a||i&&i.key;c=W(q,{key:(s&&!me(s)?s:`_${t}`)+(!i&&r?`_fb`:``)},i||(r?r():[]),i&&e._===1?64:-2)}catch(e){for(let e=kc.length;e>s;e--)so();throw e}finally{o&&o._c&&(o._d=!0)}return!i&&c.scopeId&&(c.slotScopeIds=[c.scopeId+`-s`]),c}function Ki(e){return e.some(e=>!uo(e)||!(e.type===Dc||e.type===q&&!Ki(e.children)))?e:null}function qi(e,t){let n={};for(let r in e)n[t&&/[A-Z]/.test(r)?`on:${r}`:Ae(r)]=e[r];return n}function Ji(){return null}function Yi(){return null}function Xi(e){}function Zi(e){}function Qi(){return null}function $i(){}function ea(e,t){return null}function ta(){return ra(`useSlots`).slots}function na(){return ra(`useAttrs`).attrs}function ra(e){let t=Lc();return t.setupContext||=jo(t)}function ia(e){return P(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}function aa(e,t){let n=ia(e);for(let e in t){if(e.startsWith(`__skip`))continue;let r=n[e];r?P(r)||fe(r)?r=n[e]={type:r,default:t[e]}:r.default=t[e]:r===null&&(r=n[e]={default:t[e]}),r&&t[`__skip_${e}`]&&(r.skipFactory=!0)}return n}function oa(e,t){return!e||!t?e||t:P(e)&&P(t)?e.concat(t):ie({},ia(e),ia(t))}function sa(e,t){let n={};for(let r in e)t.includes(r)||Object.defineProperty(n,r,{enumerable:!0,get:()=>e[r]});return n}function ca(e){let t=Lc(),n=Hc,r=e();Vc(),n&&zc(!1);let i=()=>{Bc(t),n&&zc(!0)},a=()=>{Lc()!==t&&t.scope.off(),Vc(),n&&zc(!1)};return ge(r)&&(r=r.catch(e=>{throw i(),Promise.resolve().then(()=>Promise.resolve().then(a)),e})),[r,()=>{i(),Promise.resolve().then(a)}]}function la(e){let t=pa(e),n=e.proxy,r=e.ctx;nc=!1,t.beforeCreate&&da(t.beforeCreate,e,`bc`);let{data:i,computed:a,methods:o,watch:s,provide:c,inject:l,created:u,beforeMount:d,mounted:f,beforeUpdate:p,updated:m,activated:h,deactivated:g,beforeDestroy:_,beforeUnmount:v,destroyed:y,unmounted:b,render:x,renderTracked:S,renderTriggered:C,errorCaptured:w,serverPrefetch:T,expose:E,inheritAttrs:D,components:O,directives:k,filters:A}=t;if(l&&ua(l,r,null),o)for(let e in o){let t=o[e];fe(t)&&(r[e]=t.bind(n))}if(i){let t=i.call(n,n);he(t)&&(e.data=tn(t))}if(nc=!0,a)for(let e in a){let t=a[e],i=fe(t)?t.bind(n,n):fe(t.get)?t.get.bind(n,n):te,o=!fe(t)&&fe(t.set)?t.set.bind(n):te,s=Y({get:i,set:o});Object.defineProperty(r,e,{enumerable:!0,configurable:!0,get:()=>s.value,set:e=>s.value=e})}if(s)for(let e in s)fa(s[e],r,n,e);if(c){let e=fe(c)?c.call(n):c;Reflect.ownKeys(e).forEach(t=>{Kr(t,e[t])})}u&&da(u,e,`c`);function j(e,t){P(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(j(zs,d),j(Bs,f),j(Vs,p),j(Hs,m),j(Ai,h),j(ji,g),j(Li,w),j(qs,S),j(Ks,C),j(Us,v),j(Ws,b),j(Gs,T),P(E))if(E.length){let t=e.exposed||={};E.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t,enumerable:!0})})}else e.exposed||={};x&&e.render===te&&(e.render=x),D!=null&&(e.inheritAttrs=D),O&&(e.components=O),k&&(e.directives=k),T&&mi(e)}function ua(e,t,n=te){P(e)&&(e=_a(e));for(let n in e){let r=e[n],i;i=he(r)?`default`in r?qr(r.from||n,r.default,!0):qr(r.from||n):qr(r),pn(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e}):t[n]=i}}function da(e,t,n){kr(P(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function fa(e,t,n,r){let i=r.includes(`.`)?ei(n,r):()=>n[r];if(pe(e)){let n=t[e];fe(n)&&B(i,n)}else if(fe(e))B(i,e.bind(n));else if(he(e))if(P(e))e.forEach(e=>fa(e,t,n,r));else{let r=fe(e.handler)?e.handler.bind(n):t[e.handler];fe(r)&&B(i,r,e)}}function pa(e){let t=e.type,{mixins:n,extends:r}=t,{mixins:i,optionsCache:a,config:{optionMergeStrategies:o}}=e.appContext,s=a.get(t),c;return s?c=s:!i.length&&!n&&!r?c=t:(c={},i.length&&i.forEach(e=>ma(c,e,o,!0)),ma(c,t,o)),he(t)&&a.set(t,c),c}function ma(e,t,n,r=!1){let{mixins:i,extends:a}=t;a&&ma(e,a,n,!0),i&&i.forEach(t=>ma(e,t,n,!0));for(let i in t)if(!(r&&i===`expose`)){let r=rc[i]||n&&n[i];e[i]=r?r(e[i],t[i]):t[i]}return e}function ha(e,t){return t?e?function(){return ie(fe(e)?e.call(this,this):e,fe(t)?t.call(this,this):t)}:t:e}function ga(e,t){return ya(_a(e),_a(t))}function _a(e){if(P(e)){let t={};for(let n=0;n{let c,l=M,u;return Zr(()=>{let t=e[i];je(c,t)&&(c=t,s())}),{get(){return o(),n.get?n.get(c):c},set(e){let o=n.set?n.set(e):e;if(!je(o,c)&&!(l!==M&&je(e,l)))return;let d=r.vnode.props,f=!!(d&&(t in d||i in d||a in d)&&(`onUpdate:${t}`in d||`onUpdate:${i}`in d||`onUpdate:${a}`in d));f||(c=e,s()),r.emit(`update:${t}`,o),je(e,l)&&(je(e,o)&&!je(o,u)||f&&l!==M&&!je(o,c))&&s(),l=e,u=o}}});return s[Symbol.iterator]=()=>{let e=0;return{next(){return e<2?{value:e++?o||M:s,done:!1}:{done:!0}}}},s}function Ta(e,t,...n){if(e.isUnmounted)return;let r=e.vnode.props||M,i=n,a=t.startsWith(`update:`),o=a&&oc(r,t.slice(7));o&&(o.trim&&(i=n.map(e=>pe(e)?e.trim():e)),o.number&&(i=n.map(Pe)));let s,c=r[s=Ae(t)]||r[s=Ae(Ee(t))];!c&&a&&(c=r[s=Ae(Oe(t))]),c&&kr(c,e,6,i);let l=r[s+`Once`];if(l){if(!e.emitted)e.emitted={};else if(e.emitted[s])return;e.emitted[s]=!0,kr(l,e,6,i)}}function Ea(e,t,n=!1){let r=n?sc:t.emitsCache,i=r.get(e);if(i!==void 0)return i;let a=e.emits,o={},s=!1;if(!fe(e)){let r=e=>{let n=Ea(e,t,!0);n&&(s=!0,ie(o,n))};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}return!a&&!s?(he(e)&&r.set(e,null),null):(P(a)?a.forEach(e=>o[e]=null):ie(o,a),he(e)&&r.set(e,o),o)}function Da(e,t){return!e||!N(t)?!1:(t=t.slice(2),t=t===`Once`?t:t.replace(/Once$/,``),se(e,t[0].toLowerCase()+t.slice(1))||se(e,Oe(t))||se(e,t))}function Oa(e){let{type:t,vnode:n,proxy:r,withProxy:i,propsOptions:[a],slots:o,attrs:s,emit:c,render:l,renderCache:u,props:d,data:f,setupState:p,ctx:m,inheritAttrs:h}=e,g=Vr(e),_,v;try{if(n.shapeFlag&4){let e=i||r,t=e;_=yo(l.call(t,e,u,d,p,f,m)),v=s}else{let e=t;_=yo(e.length>1?e(d,{attrs:s,slots:o,emit:c}):e(d,null)),v=t.props?s:cc(s)}}catch(t){kc.length=0,Ar(t,e,1),_=J(Dc)}let y=_;if(v&&h!==!1){let e=Object.keys(v),{shapeFlag:t}=y;e.length&&t&7&&(a&&e.some(re)&&(v=lc(v,a)),y=go(y,v,!1,!0))}return n.dirs&&(y=go(y,null,!1,!0),y.dirs=y.dirs?y.dirs.concat(n.dirs):n.dirs),n.transition&&di(y,n.transition),_=y,Vr(g),_}function ka(e,t=!0){let n;for(let t=0;t=0){if(c&1024)return!0;if(c&16)return r?ja(r,o,l):!!o;if(c&8){let e=t.dynamicProps;for(let t=0;t0)&&!(o&16)){if(o&8){let n=e.vnode.dynamicProps;for(let r=0;r{c=!0;let[n,r]=Ra(e,t,!0);ie(o,n),r&&s.push(...r)};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}if(!a&&!c)return he(e)&&r.set(e,ee),ee;if(P(a))for(let e=0;e{if(e===t)return;e&&!fo(e,t)&&(r=de(e),se(e,i,a,!0),e=null),t.patchFlag===-2&&(c=!1,t.dynamicChildren=null);let{type:l,ref:u,shapeFlag:d}=t;switch(l){case Ec:g(e,t,n,r);break;case Dc:_(e,t,n,r);break;case Oc:e??v(t,n,r,o);break;case q:O(e,t,n,r,i,a,o,s,c);break;default:d&1?x(e,t,n,r,i,a,o,s,c):d&6?k(e,t,n,r,i,a,o,s,c):(d&64||d&128)&&l.process(e,t,n,r,i,a,o,s,c,me)}u!=null&&i?_i(u,e&&e.ref,a,t||e,!t):u==null&&e&&e.ref!=null&&_i(e.ref,null,a,e,!0)},g=(e,t,n,i)=>{if(e==null)r(t.el=s(t.children),n,i);else{let n=t.el=e.el;t.children!==e.children&&l(n,t.children)}},_=(e,t,n,i)=>{e==null?r(t.el=c(t.children||``),n,i):t.el=e.el},v=(e,t,n,r)=>{[e.el,e.anchor]=m(e.children,t,n,r,e.el,e.anchor)},y=({el:e,anchor:t},n,i)=>{let a;for(;e&&e!==t;)a=f(e),r(e,n,i),e=a;r(t,n,i)},b=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=f(e),i(e),e=n;i(t)},x=(e,t,n,r,i,a,o,s,c)=>{if(t.type===`svg`?o=`svg`:t.type===`math`&&(o=`mathml`),e==null)S(t,n,r,i,a,o,s,c);else{let n=e.el&&e.el._isVueCE?e.el:null;try{n&&n._beginPatch(),T(e,t,i,a,o,s,c)}finally{n&&n._endPatch()}}},S=(e,t,n,i,s,c,l,d)=>{let f,p,{props:m,shapeFlag:h,transition:g,dirs:_}=e;if(f=e.el=o(e.type,c,m&&m.is,m),h&8?u(f,e.children):h&16&&w(e.children,f,null,i,s,Ua(e,c),l,d),_&&Gr(e,null,i,`created`),C(f,e,e.scopeId,l,i),m){for(let e in m)e!==`value`&&!Se(e)&&a(f,e,null,m[e],c,i);`value`in m&&a(f,`value`,null,m.value,c),(p=m.onVnodeBeforeMount)&&Co(p,i,e)}_&&Gr(e,null,i,`beforeMount`);let v=Ga(s,g);v&&g.beforeEnter(f),r(f,t,n),((p=m&&m.onVnodeMounted)||v||_)&&Sc(()=>{try{p&&Co(p,i,e),v&&g.enter(f),_&&Gr(e,null,i,`mounted`)}finally{}},s)},C=(e,t,n,r,i)=>{if(n&&p(e,n),r)for(let t=0;t{for(let l=c;l{let c=t.el=e.el,{patchFlag:l,dynamicChildren:d,dirs:f}=t;l|=e.patchFlag&16;let p=e.props||M,m=t.props||M,h;if(n&&Wa(n,!1),(h=m.onVnodeBeforeUpdate)&&Co(h,n,t,e),f&&Gr(t,e,n,`beforeUpdate`),n&&Wa(n,!0),d&&(!e.dynamicChildren||e.dynamicChildren.length!==d.length)&&(l=0,s=!1,d=null),(p.innerHTML&&m.innerHTML==null||p.textContent&&m.textContent==null)&&u(c,``),d?E(e.dynamicChildren,d,c,n,r,Ua(t,i),o):s||re(e,t,c,null,n,r,Ua(t,i),o,!1),l>0){if(l&16)D(c,p,m,n,i);else if(l&2&&p.class!==m.class&&a(c,`class`,null,m.class,i),l&4&&a(c,`style`,p.style,m.style,i),l&8){let e=t.dynamicProps;for(let t=0;t{h&&Co(h,n,t,e),f&&Gr(t,e,n,`updated`)},r)},E=(e,t,n,r,i,a,o)=>{for(let s=0;s{if(t!==n){if(t!==M)for(let o in t)!Se(o)&&!(o in n)&&a(e,o,t[o],null,i,r);for(let o in n){if(Se(o))continue;let s=n[o],c=t[o];s!==c&&o!==`value`&&a(e,o,c,s,i,r)}`value`in n&&a(e,`value`,t.value,n.value,i)}},O=(e,t,n,i,a,o,c,l,u)=>{let d=t.el=e?e.el:s(``),f=t.anchor=e?e.anchor:s(``),{patchFlag:p,dynamicChildren:m,slotScopeIds:h}=t;h&&(l=l?l.concat(h):h),e==null?(r(d,n,i),r(f,n,i),w(t.children||[],n,f,a,o,c,l,u)):p>0&&p&64&&m&&e.dynamicChildren&&e.dynamicChildren.length===m.length?(E(e.dynamicChildren,m,n,a,o,c,l),(t.key!=null||a&&t===a.subTree)&&Ka(e,t,!0)):re(e,t,n,f,a,o,c,l,u)},k=(e,t,n,r,i,a,o,s,c)=>{t.slotScopeIds=s,e==null?t.shapeFlag&512?i.ctx.activate(t,n,r,o,c):A(t,n,r,i,a,o,c):j(e,t,c)},A=(e,t,n,r,i,a,o)=>{let s=e.component=wo(e,r,i);if(Is(e)&&(s.ctx.renderer=me),Eo(s,!1,o),s.asyncDep){if(i&&i.registerDep(s,ne,o),!e.el){let r=s.subTree=J(Dc);_(null,r,t,n),e.placeholder=r.el}}else ne(s,e,t,n,i,a,o)},j=(e,t,n)=>{let r=t.component=e.component;if(Aa(e,t,n))if(r.asyncDep&&!r.asyncResolved){N(r,t,n);return}else r.next=t,r.update();else t.el=e.el,r.vnode=t},ne=(e,t,n,r,i,a,o)=>{let s=()=>{if(e.isMounted){let{next:t,bu:n,u:r,parent:s,vnode:c}=e;{let n=Ja(e);if(n){t&&(t.el=c.el,N(e,t,o)),n.asyncDep.then(()=>{Sc(()=>{e.isUnmounted||l()},i)});return}}let u=t,f;Wa(e,!1),t?(t.el=c.el,N(e,t,o)):t=c,n&&Me(n),(f=t.props&&t.props.onVnodeBeforeUpdate)&&Co(f,s,t,c),Wa(e,!0);let p=Oa(e),m=e.subTree;e.subTree=p,h(m,p,d(m.el),de(m),e,i,a),t.el=p.el,u===null&&Na(e,p.el),r&&Sc(r,i),(f=t.props&&t.props.onVnodeUpdated)&&Sc(()=>Co(f,s,t,c),i)}else{let o,{el:s,props:c}=t,{bm:l,m:u,parent:d,root:f,type:p}=e,m=Fs(t);if(Wa(e,!1),l&&Me(l),!m&&(o=c&&c.onVnodeBeforeMount)&&Co(o,d,t),Wa(e,!0),s&&ge){let t=()=>{e.subTree=Oa(e),ge(s,e.subTree,e,i,null)};m&&p.__asyncHydrate?p.__asyncHydrate(s,e,t):t()}else{f.ce&&f.ce._hasShadowRoot()&&f.ce._injectChildStyle(p,e.parent?e.parent.type:void 0);let o=e.subTree=Oa(e);h(null,o,n,r,e,i,a),t.el=o.el}if(u&&Sc(u,i),!m&&(o=c&&c.onVnodeMounted)){let e=t;Sc(()=>Co(o,d,e),i)}(t.shapeFlag&256||d&&Fs(d.vnode)&&d.vnode.shapeFlag&256)&&e.a&&Sc(e.a,i),e.isMounted=!0,t=n=r=null}};e.scope.on();let c=e.effect=new Mn(s);e.scope.off();let l=e.update=c.run.bind(c),u=e.job=c.runIfDirty.bind(c);u.i=e,u.id=e.uid,c.scheduler=()=>Pr(u),Wa(e,!0),l()},N=(e,t,n)=>{t.component=e;let r=e.vnode.props;e.vnode=t,e.next=null,Fa(e,t.props,r,n),xc(e,t.children,n),Pt(),Lr(e),Ft()},re=(e,t,n,r,i,a,o,s,c=!1)=>{let l=e&&e.children,d=e?e.shapeFlag:0,f=t.children,{patchFlag:p,shapeFlag:m}=t;if(p>0){if(p&128){ae(l,f,n,r,i,a,o,s,c);return}else if(p&256){ie(l,f,n,r,i,a,o,s,c);return}}m&8?(d&16&&ue(l,i,a),f!==l&&u(n,f)):d&16?m&16?ae(l,f,n,r,i,a,o,s,c):ue(l,i,a,!0):(d&8&&u(n,``),m&16&&w(f,n,r,i,a,o,s,c))},ie=(e,t,n,r,i,a,o,s,c)=>{e||=ee,t||=ee;let l=e.length,u=t.length,d=Math.min(l,u),f;for(f=0;fu?ue(e,i,a,!0,!1,d):w(t,n,r,i,a,o,s,c,d)},ae=(e,t,n,r,i,a,o,s,c)=>{let l=0,u=t.length,d=e.length-1,f=u-1;for(;l<=d&&l<=f;){let r=e[l],u=t[l]=c?bo(t[l]):yo(t[l]);if(fo(r,u))h(r,u,n,null,i,a,o,s,c);else break;l++}for(;l<=d&&l<=f;){let r=e[d],l=t[f]=c?bo(t[f]):yo(t[f]);if(fo(r,l))h(r,l,n,null,i,a,o,s,c);else break;d--,f--}if(l>d){if(l<=f){let e=f+1,d=ef)for(;l<=d;)se(e[l],i,a,!0),l++;else{let p=l,m=l,g=new Map;for(l=m;l<=f;l++){let e=t[l]=c?bo(t[l]):yo(t[l]);e.key!=null&&g.set(e.key,l)}let _,v=0,y=f-m+1,b=!1,x=0,S=Array(y);for(l=0;l=y){se(r,i,a,!0);continue}let u;if(r.key!=null)u=g.get(r.key);else for(_=m;_<=f;_++)if(S[_-m]===0&&fo(r,t[_])){u=_;break}u===void 0?se(r,i,a,!0):(S[u-m]=l+1,u>=x?x=u:b=!0,h(r,t[u],n,null,i,a,o,s,c),v++)}let C=b?qa(S):ee;for(_=C.length-1,l=y-1;l>=0;l--){let e=m+l,d=t[e],f=t[e+1],p=e+1{let{el:s,type:c,transition:l,children:u,shapeFlag:d}=e;if(d&6){oe(e.component.subTree,t,n,a);return}if(d&128){e.suspense.move(t,n,a);return}if(d&64){c.move(e,t,n,me);return}if(c===q){r(s,t,n);for(let e=0;el.enter(s),o));else{let{leave:a,delayLeave:o,afterLeave:c}=l,u=()=>{e.ctx.isUnmounted?i(s):r(s,t,n)},d=()=>{let e=s._isLeaving||!!s[ps];s._isLeaving&&s[ps](!0),l.persisted&&!e?u():a(s,()=>{u(),c&&c()})};o?o(s,u,d):d()}else r(s,t,n)},se=(e,t,n,r=!1,i=!1)=>{let{type:a,props:o,ref:s,children:c,dynamicChildren:l,shapeFlag:u,patchFlag:d,dirs:f,cacheIndex:p,memo:m}=e;if(d===-2&&(i=!1),s!=null&&(Pt(),_i(s,null,n,e,!0),Ft()),p!=null&&(t.renderCache[p]=void 0),u&256){t.ctx.deactivate(e);return}let h=u&1&&f,g=!Fs(e),_;if(g&&(_=o&&o.onVnodeBeforeUnmount)&&Co(_,t,e),u&6)le(e.component,n,r);else{if(u&128){e.suspense.unmount(n,r);return}h&&Gr(e,null,t,`beforeUnmount`),u&64?e.type.remove(e,t,n,me,r):l&&!l.hasOnce&&(a!==q||d>0&&d&64)?ue(l,t,n,!1,!0):(a===q&&d&384||!i&&u&16)&&ue(c,t,n),r&&P(e)}let v=m!=null&&p==null;(g&&(_=o&&o.onVnodeUnmounted)||h||v)&&Sc(()=>{_&&Co(_,t,e),h&&Gr(e,null,t,`unmounted`),v&&(e.el=null)},n)},P=e=>{let{type:t,el:n,anchor:r,transition:a}=e;if(t===q){ce(n,r);return}if(t===Oc){b(e);return}let o=()=>{i(n),a&&!a.persisted&&a.afterLeave&&a.afterLeave()};if(e.shapeFlag&1&&a&&!a.persisted){let{leave:t,delayLeave:r}=a,i=()=>t(n,o);r?r(e.el,o,i):i()}else o()},ce=(e,t)=>{let n;for(;e!==t;)n=f(e),i(e),e=n;i(t)},le=(e,t,n)=>{let{bum:r,scope:i,job:a,subTree:o,um:s,m:c,a:l}=e;Ya(c),Ya(l),r&&Me(r),i.stop(),a&&(a.flags|=8,se(o,e,t,n)),s&&Sc(s,t),Sc(()=>{e.isUnmounted=!0},t)},ue=(e,t,n,r=!1,i=!1,a=0)=>{for(let o=a;o{if(e.shapeFlag&6)return de(e.component.subTree);if(e.shapeFlag&128)return e.suspense.next();let t=f(e.anchor||e.el),n=t&&t[is];return n?f(n):t},fe=!1,pe=(e,t,n)=>{let r;e==null?t._vnode&&(se(t._vnode,null,null,!0),r=t._vnode.component):h(t._vnode||null,e,t,null,null,null,n),t._vnode=e,fe||=(fe=!0,Lr(r),Rr(),!1)},me={p:h,um:se,m:oe,r:P,mt:A,mc:w,pc:re,pbc:E,n:de,o:e},he,ge;return t&&([he,ge]=t(me)),{render:pe,hydrate:he,createApp:Ca(pe,he)}}function Ua({type:e,props:t},n){return n===`svg`&&e===`foreignObject`||n===`mathml`&&e===`annotation-xml`&&t&&t.encoding&&t.encoding.includes(`html`)?void 0:n}function Wa({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Ga(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Ka(e,t,n=!1){let r=e.children,i=t.children;if(P(r)&&P(i))for(let e=0;e>1,e[n[s]]0&&(t[r]=n[a-1]),n[a]=r)}}for(a=n.length,o=n[a-1];a-->0;)n[a]=o,o=t[o];return n}function Ja(e){let t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Ja(t)}function Ya(e){if(e)for(let t=0;t0?(Za(e,`onPending`),Za(e,`onFallback`),l(null,e.ssFallback,t,n,r,null,a,o),ao(f,e.ssFallback)):f.resolve(!1,!0)}function $a(e,t,n,r,i,a,o,s,{p:c,um:l,o:{createElement:u}}){let d=t.suspense=e.suspense;d.vnode=t,t.el=e.el;let f=t.ssContent,p=t.ssFallback,{activeBranch:m,pendingBranch:h,isInFallback:g,isHydrating:_}=d;if(h)d.pendingBranch=f,fo(h,f)?(c(h,f,d.hiddenContainer,null,i,d,a,o,s),d.deps<=0?d.resolve():g&&(_||(c(m,p,n,r,i,null,a,o,s),ao(d,p)))):(d.pendingId=wc++,_?(d.isHydrating=!1,d.activeBranch=h):l(h,i,d),d.deps=0,d.effects.length=0,d.hiddenContainer=u(`div`),g?(c(null,f,d.hiddenContainer,null,i,d,a,o,s),d.deps<=0?d.resolve():(c(m,p,n,r,i,null,a,o,s),ao(d,p))):m&&fo(m,f)?(c(m,f,n,r,i,d,a,o,s),d.resolve(!0)):(c(null,f,d.hiddenContainer,null,i,d,a,o,s),d.deps<=0&&d.resolve()));else if(m&&fo(m,f))c(m,f,n,r,i,d,a,o,s),ao(d,f);else if(Za(t,`onPending`),d.pendingBranch=f,f.shapeFlag&512?d.pendingId=f.component.suspenseId:d.pendingId=wc++,c(null,f,d.hiddenContainer,null,i,d,a,o,s),d.deps<=0)d.resolve();else{let{timeout:e,pendingId:t}=d;e>0?setTimeout(()=>{d.pendingId===t&&d.fallback(p)},e):e===0&&d.fallback(p)}}function eo(e,t,n,r,i,a,o,s,c,l,u=!1){let{p:d,m:f,um:p,n:m,o:{parentNode:h,remove:g}}=l,_,v=oo(e);v&&t&&t.pendingBranch&&(_=t.pendingId,t.deps++);let y=e.props?Fe(e.props.timeout):void 0,b=a,x={vnode:e,parent:t,parentComponent:n,namespace:o,container:r,hiddenContainer:i,deps:0,pendingId:wc++,timeout:typeof y==`number`?y:-1,activeBranch:null,isFallbackMountPending:!1,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve(e=!1,n=!1){let{vnode:r,activeBranch:i,pendingBranch:o,pendingId:s,effects:c,parentComponent:l,container:u,isInFallback:d}=x,g=!1;if(x.isHydrating)x.isHydrating=!1;else if(!e){g=i&&o.transition&&o.transition.mode===`out-in`;let e=!1;g&&(i.transition.afterLeave=()=>{s===x.pendingId&&(f(o,u,a===b&&!e?m(i):a,0),Ir(c),d&&r.ssFallback&&(r.ssFallback.el=null))}),i&&!x.isFallbackMountPending&&(h(i.el)===u&&(a=m(i),e=!0),p(i,l,x,!0),!g&&d&&r.ssFallback&&Sc(()=>r.ssFallback.el=null,x)),g||f(o,u,a,0)}x.isFallbackMountPending=!1,ao(x,o),x.pendingBranch=null,x.isInFallback=!1;let y=x.parent,S=!1;for(;y;){if(y.pendingBranch){y.effects.push(...c),S=!0;break}y=y.parent}!S&&!g&&Ir(c),x.effects=[],v&&t&&t.pendingBranch&&_===t.pendingId&&(t.deps--,t.deps===0&&!n&&t.resolve()),Za(r,`onResolve`)},fallback(e){if(!x.pendingBranch)return;let{vnode:t,activeBranch:n,parentComponent:r,container:i,namespace:a}=x;Za(t,`onFallback`);let o=m(n),l=()=>{x.isFallbackMountPending=!1,x.isInFallback&&(d(null,e,i,o,r,null,a,s,c),ao(x,e))},u=e.transition&&e.transition.mode===`out-in`;u&&(x.isFallbackMountPending=!0,n.transition.afterLeave=l),x.isInFallback=!0,p(n,r,null,!0),u||l()},move(e,t,n){x.activeBranch&&f(x.activeBranch,e,t,n),x.container=e},next(){return x.activeBranch&&m(x.activeBranch)},registerDep(e,t,n){let r=!!x.pendingBranch;r&&x.deps++;let i=e.vnode.el;e.asyncDep.catch(t=>{Ar(t,e,0)}).then(a=>{if(e.isUnmounted||x.isUnmounted||x.pendingId!==e.suspenseId)return;Vc(),e.asyncResolved=!0;let{vnode:s}=e;Oo(e,a,!1),i&&(s.el=i);let c=!i&&e.subTree.el;t(e,s,h(i||e.subTree.el),i?null:m(e.subTree),x,o,n),c&&(s.placeholder=null,g(c)),Na(e,s.el),r&&--x.deps===0&&x.resolve()})},unmount(e,t){x.isUnmounted=!0,x.activeBranch&&p(x.activeBranch,n,e,t),x.pendingBranch&&p(x.pendingBranch,n,e,t)}};return x}function to(e,t,n,r,i,a,o,s,c){let l=t.suspense=eo(t,r,n,e.parentNode,document.createElement(`div`),null,i,a,o,s,!0),u=c(e,l.pendingBranch=t.ssContent,n,l,a,o);return l.deps===0&&l.resolve(!1,!0),u}function no(e){let{shapeFlag:t,children:n}=e,r=t&32;e.ssContent=ro(r?n.default:n),e.ssFallback=r?ro(n.fallback):J(Dc)}function ro(e){let t;if(fe(e)){let n=jc&&e._c;n&&(e._d=!1,H()),e=e(),n&&(e._d=!0,t=Ac,so())}return P(e)&&(e=ka(e)),e=yo(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(t=>t!==e)),e}function io(e,t){t&&t.pendingBranch?P(e)?t.effects.push(...e):t.effects.push(e):Ir(e)}function ao(e,t){e.activeBranch=t;let{vnode:n,parentComponent:r}=e,i=t.el;for(;!i&&t.component;)t=t.component.subTree,i=t.el;n.el=i,r&&r.subTree===n&&(r.vnode.el=i,Na(r,i))}function oo(e){let t=e.props&&e.props.suspensible;return t!=null&&t!==!1}function H(e=!1){kc.push(Ac=e?null:[])}function so(){kc.pop(),Ac=kc[kc.length-1]||null}function co(e,t=!1){jc+=e,e<0&&Ac&&t&&(Ac.hasOnce=!0)}function lo(e){return e.dynamicChildren=jc>0?Ac||ee:null,so(),jc>0&&Ac&&Ac.push(e),e}function U(e,t,n,r,i,a){return lo(G(e,t,n,r,i,a,!0))}function W(e,t,n,r,i){return lo(J(e,t,n,r,i,!0))}function uo(e){return e?e.__v_isVNode===!0:!1}function fo(e,t){return e.type===t.type&&e.key===t.key}function po(e){}function G(e,t=null,n=null,r=0,i=null,a=e===q?0:1,o=!1,s=!1){let c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Mc(t),ref:t&&Nc(t),scopeId:$o,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:a,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:Qo};return s?(xo(c,n),a&128&&e.normalize(c)):n&&(c.shapeFlag|=pe(n)?8:16),jc>0&&!o&&Ac&&(c.patchFlag>0||a&6)&&c.patchFlag!==32&&Ac.push(c),c}function mo(e,t=null,n=null,r=0,i=null,a=!1){if((!e||e===Xs)&&(e=Dc),uo(e)){let r=go(e,t,!0);return n&&xo(r,n),jc>0&&!a&&Ac&&(r.shapeFlag&6?Ac[Ac.indexOf(e)]=r:Ac.push(r)),r.patchFlag=-2,r}if(Po(e)&&(e=e.__vccOpts),t){t=ho(t);let{class:e,style:n}=t;e&&!pe(e)&&(t.class=b(e)),he(n)&&(un(n)&&!P(n)&&(n=ie({},n)),t.style=_(n))}let o=pe(e)?1:Cc(e)?128:as(e)?64:he(e)?4:fe(e)?2:0;return G(e,t,n,r,i,o,a,!0)}function ho(e){return e?un(e)||fc(e)?ie({},e):e:null}function go(e,t,n=!1,r=!1){let{props:i,ref:a,patchFlag:o,children:s,transition:c}=e,l=t?So(i||{},t):i,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&Mc(l),ref:t&&t.ref?n&&a?P(a)?a.concat(Nc(t)):[a,Nc(t)]:Nc(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==q?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&go(e.ssContent),ssFallback:e.ssFallback&&go(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&r&&di(u,c.clone(u)),u}function _o(e=` `,t=0){return J(Ec,null,e,t)}function vo(e,t){let n=J(Oc,null,e);return n.staticCount=t,n}function K(e=``,t=!1){return t?(H(),W(Dc,null,e)):J(Dc,null,e)}function yo(e){return e==null||typeof e==`boolean`?J(Dc):P(e)?J(q,null,e.slice()):uo(e)?bo(e):J(Ec,null,String(e))}function bo(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:go(e)}function xo(e,t){let n=0,{shapeFlag:r}=e;if(t==null)t=null;else if(P(t))n=16;else if(typeof t==`object`)if(r&65){let n=t.default;n&&(n._c&&(n._d=!1),xo(e,n()),n._c&&(n._d=!0));return}else{n=32;let r=t._;!r&&!fc(t)?t._ctx=Qo:r===3&&Qo&&(Qo.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(fe(t)){if(r&65){xo(e,{default:t});return}t={default:t,_ctx:Qo},n=32}else t=String(t),r&64?(n=16,t=[_o(t)]):n=8;e.children=t,e.shapeFlag|=n}function So(...e){let t={};for(let n=0;n1?jo(e):null,i=Bc(e),a=Or(r,e,0,[e.props,n]),o=ge(a);if(Ft(),i(),(o||e.sp)&&!Fs(e)&&mi(e),o){if(a.then(Vc,Vc),t)return a.then(n=>{Oo(e,n,t)}).catch(t=>{Ar(t,e,0)});e.asyncDep=a}else Oo(e,a,t)}else Ao(e,t)}function Oo(e,t,n){fe(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:he(t)&&(e.setupState=vn(t)),Ao(e,n)}function ko(e){Uc=e,Wc=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,tc))}}function Ao(e,t,n){let r=e.type;if(!e.render){if(!t&&Uc&&!r.render){let t=r.template||pa(e).template;if(t){let{isCustomElement:n,compilerOptions:i}=e.appContext.config,{delimiters:a,compilerOptions:o}=r,s=ie(ie({isCustomElement:n,delimiters:a},i),o);r.render=Uc(t,s)}}e.render=r.render||te,Wc&&Wc(e)}{let t=Bc(e);Pt();try{la(e)}finally{Ft(),t()}}}function jo(e){return{attrs:new Proxy(e.attrs,Kc),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}function Mo(e){return e.exposed?e.exposeProxy||=new Proxy(vn(fn(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Qs)return Qs[n](e)},has(e,t){return t in e||t in Qs}}):e.proxy}function No(e,t=!0){return fe(e)?e.displayName||e.name:e.name||t&&e.__name}function Po(e){return fe(e)&&`__vccOpts`in e}function Fo(e,t,n){try{co(-1);let r=arguments.length;return r===2?he(t)&&!P(t)?uo(t)?J(e,null,[t]):J(e,t):J(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&uo(n)&&(n=[n]),J(e,t,n))}finally{co(1)}}function Io(){return;function e(t,n,r){let i=t[r];if(P(i)&&i.includes(n)||he(i)&&n in i||t.extends&&e(t.extends,n,r)||t.mixins&&t.mixins.some(t=>e(t,n,r)))return!0}}function Lo(e,t,n,r){let i=n[r];if(i&&Ro(i,e))return i;let a=t();return a.memo=e.slice(),a.cacheIndex=r,n[r]=a}function Ro(e,t){let n=e.memo;if(n.length!=t.length)return!1;for(let e=0;e0&&Ac&&Ac.push(e),!0}var zo,Bo,Vo,Ho,Uo,Wo,Go,Ko,qo,Jo,Yo,Xo,Zo,Qo,$o,es,ts,ns,rs,is,as,os,ss,cs,ls,us,ds,fs,ps,ms,hs,gs,_s,vs,ys,bs,xs,Ss,Cs,ws,Ts,Es,Ds,Os,ks,As,js,Ms,Ns,Ps,Fs,Is,Ls,Rs,zs,Bs,Vs,Hs,Us,Ws,Gs,Ks,qs,Js,Ys,Xs,Zs,Qs,$s,ec,tc,nc,rc,ic,ac,oc,sc,cc,lc,uc,dc,fc,pc,mc,hc,gc,_c,vc,yc,bc,xc,Sc,Cc,wc,Tc,q,Ec,Dc,Oc,kc,Ac,jc,Mc,Nc,J,Pc,Fc,Ic,Lc,Rc,zc,Bc,Vc,Hc,Uc,Wc,Gc,Kc,Y,qc,Jc,Yc,Xc,Zc,Qc,$c=o((()=>{wr(),yt(),zo=[],Bo={SETUP_FUNCTION:0,0:`SETUP_FUNCTION`,RENDER_FUNCTION:1,1:`RENDER_FUNCTION`,NATIVE_EVENT_HANDLER:5,5:`NATIVE_EVENT_HANDLER`,COMPONENT_EVENT_HANDLER:6,6:`COMPONENT_EVENT_HANDLER`,VNODE_HOOK:7,7:`VNODE_HOOK`,DIRECTIVE_HOOK:8,8:`DIRECTIVE_HOOK`,TRANSITION_HOOK:9,9:`TRANSITION_HOOK`,APP_ERROR_HANDLER:10,10:`APP_ERROR_HANDLER`,APP_WARN_HANDLER:11,11:`APP_WARN_HANDLER`,FUNCTION_REF:12,12:`FUNCTION_REF`,ASYNC_COMPONENT_LOADER:13,13:`ASYNC_COMPONENT_LOADER`,SCHEDULER:14,14:`SCHEDULER`,COMPONENT_UPDATE:15,15:`COMPONENT_UPDATE`,APP_UNMOUNT_CLEANUP:16,16:`APP_UNMOUNT_CLEANUP`},Vo={sp:`serverPrefetch hook`,bc:`beforeCreate hook`,c:`created hook`,bm:`beforeMount hook`,m:`mounted hook`,bu:`beforeUpdate hook`,u:`updated`,bum:`beforeUnmount hook`,um:`unmounted hook`,a:`activated hook`,da:`deactivated hook`,ec:`errorCaptured hook`,rtc:`renderTracked hook`,rtg:`renderTriggered hook`,0:`setup function`,1:`render function`,2:`watcher getter`,3:`watcher callback`,4:`watcher cleanup function`,5:`native event handler`,6:`component event handler`,7:`vnode hook`,8:`directive hook`,9:`transition hook`,10:`app errorHandler`,11:`app warnHandler`,12:`ref function`,13:`async component loader`,14:`scheduler flush`,15:`component update`,16:`app unmount cleanup function`},Ho=[],Uo=-1,Wo=[],Go=null,Ko=0,qo=Promise.resolve(),Jo=null,Yo=e=>e.id==null?e.flags&2?-1:1/0:e.id,Zo=[],Qo=null,$o=null,es=e=>z,ts=Symbol.for(`v-scx`),ns=()=>qr(ts),rs=new WeakMap,is=Symbol(`_vte`),as=e=>e.__isTeleport,os=e=>e&&(e.disabled||e.disabled===``),ss=e=>e&&(e.defer||e.defer===``),cs=e=>typeof SVGElement<`u`&&e instanceof SVGElement,ls=e=>typeof MathMLElement==`function`&&e instanceof MathMLElement,us=(e,t)=>{let n=e&&e.to;return pe(n)?t?t(n):null:n},ds={name:`Teleport`,__isTeleport:!0,process(e,t,n,r,i,a,o,s,c,l){let{mc:u,pc:d,pbc:f,o:{insert:p,querySelector:m,createText:h,createComment:g,parentNode:_}}=l,v=os(t.props),{dynamicChildren:y}=t,b=(e,t,n)=>{e.shapeFlag&16&&u(e.children,t,n,i,a,o,s,c)},x=(e=t)=>{let n=os(e.props),r=e.target=us(e.props,m),a=ii(r,e,h,p);r&&(o!==`svg`&&cs(r)?o=`svg`:o!==`mathml`&&ls(r)&&(o=`mathml`),i&&i.isCE&&(i.ce._teleportTargets||(i.ce._teleportTargets=new Set)).add(r),n||(b(e,r,a),ri(e,!1)))},S=e=>{let t=()=>{if(rs.get(e)===t){if(rs.delete(e),os(e.props)){let t=_(e.el)||n;b(e,t,e.anchor),ri(e,!0)}x(e)}};rs.set(e,t),Sc(t,a)};if(e==null){let e=t.el=h(``),i=t.anchor=h(``);if(p(e,n,r),p(i,n,r),ss(t.props)||a&&a.pendingBranch){S(t);return}v&&(b(t,n,i),ri(t,!0)),x()}else{t.el=e.el;let r=t.anchor=e.anchor,u=rs.get(e);if(u){u.flags|=8,rs.delete(e),S(t);return}t.targetStart=e.targetStart;let p=t.target=e.target,h=t.targetAnchor=e.targetAnchor,g=os(e.props),_=g?n:p,b=g?r:h;if(o===`svg`||cs(p)?o=`svg`:(o===`mathml`||ls(p))&&(o=`mathml`),y?(f(e.dynamicChildren,y,_,i,a,o,s),Ka(e,t,!0)):c||d(e,t,_,b,i,a,o,s,!1),v)g?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):ti(t,n,r,l,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){let e=us(t.props,m);e&&(t.target=e,ti(t,e,null,l,0))}else g&&ti(t,p,h,l,1);ri(t,v)}},remove(e,t,n,{um:r,o:{remove:i}},a){let{shapeFlag:o,children:s,anchor:c,targetStart:l,targetAnchor:u,target:d,props:f}=e,p=os(f),m=a||!p,h=rs.get(e);if(h&&(h.flags|=8,rs.delete(e)),d&&(i(l),i(u)),a&&i(c),!h&&(p||d)&&o&16)for(let e=0;e{let t=e.subTree;return t.component?_s(t.component):t},vs={name:`BaseTransition`,props:gs,setup(e,{slots:t}){let n=Lc(),r=ai();return()=>{let i=t.default&&fi(t.default(),!0),a=i&&i.length?oi(i):n.subTree?K():void 0;if(!a)return;let o=dn(e),{mode:s}=o;if(r.isLeaving)return li(a);let c=ui(a);if(!c)return li(a);let l=ci(c,o,r,n,e=>l=e);c.type!==Dc&&di(c,l);let u=n.subTree&&ui(n.subTree);if(u&&u.type!==Dc&&!fo(u,c)&&_s(n).type!==Dc){let e=ci(u,o,r,n);if(di(u,e),s===`out-in`&&c.type!==Dc)return r.isLeaving=!0,e.afterLeave=()=>{r.isLeaving=!1,n.job.flags&8||n.update(),delete e.afterLeave,u=void 0},li(a);s===`in-out`&&c.type!==Dc?e.delayLeave=(e,t,n)=>{let i=si(r,u);i[String(u.key)]=u,e[ps]=()=>{t(),e[ps]=void 0,delete l.delayedLeave,u=void 0},l.delayedLeave=()=>{n(),delete l.delayedLeave,u=void 0}}:u=void 0}else u&&=void 0;return a}}},ys=vs,bs=new WeakMap,xs=!1,Ss=()=>{xs||=(console.error(`Hydration completed but contains mismatches.`),!0)},Cs=e=>e.namespaceURI.includes(`svg`)&&e.tagName!==`foreignObject`,ws=e=>e.namespaceURI.includes(`MathML`),Ts=e=>{if(e.nodeType===1){if(Cs(e))return`svg`;if(ws(e))return`mathml`}},Es=e=>e.nodeType===8,Ds=`data-allow-mismatch`,Os={0:`text`,1:`children`,2:`class`,3:`style`,4:`attribute`},ks=Le().requestIdleCallback||(e=>setTimeout(e,1)),As=Le().cancelIdleCallback||(e=>clearTimeout(e)),js=(e=1e4)=>t=>{let n=ks(t,{timeout:e});return()=>As(n)},Ms=e=>(t,n)=>{let r=new IntersectionObserver(e=>{for(let n of e)if(n.isIntersecting){r.disconnect(),t();break}},e);return n(e=>{if(e instanceof Element){if(Ti(e))return t(),r.disconnect(),!1;r.observe(e)}}),()=>r.disconnect()},Ns=e=>t=>{if(e){let n=matchMedia(e);if(n.matches)t();else return n.addEventListener(`change`,t,{once:!0}),()=>n.removeEventListener(`change`,t)}},Ps=(e=[])=>(t,n)=>{pe(e)&&(e=[e]);let r=!1,i=e=>{r||(r=!0,a(),t(),e.target.dispatchEvent(new e.constructor(e.type,e)))},a=()=>{n(t=>{for(let n of e)t.removeEventListener(n,i)})};return n(t=>{for(let n of e)t.addEventListener(n,i,{once:!0})}),a},Fs=e=>!!e.type.__asyncLoader,Is=e=>e.type.__isKeepAlive,Ls={name:`KeepAlive`,__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){let n=Lc(),r=n.ctx;if(!r.renderer)return()=>{let e=t.default&&t.default();return e&&e.length===1?e[0]:e};let i=new Map,a=new Set,o=null,s=n.suspense,{renderer:{p:c,m:l,um:u,o:{createElement:d}}}=r,f=d(`div`);r.activate=(e,t,n,r,i)=>{let a=e.component;l(e,t,n,0,s),c(a.vnode,e,t,n,a,s,r,e.slotScopeIds,i),Sc(()=>{a.isDeactivated=!1,a.a&&Me(a.a);let t=e.props&&e.props.onVnodeMounted;t&&Co(t,a.parent,e)},s)},r.deactivate=e=>{let t=e.component;Ya(t.m),Ya(t.a),l(e,f,null,1,s),Sc(()=>{t.da&&Me(t.da);let n=e.props&&e.props.onVnodeUnmounted;n&&Co(n,t.parent,e),t.isDeactivated=!0},s)};function p(e){Pi(e),u(e,n,s,!0)}function m(e){i.forEach((t,n)=>{let r=No(Fs(t)?t.type.__asyncResolved||{}:t.type);r&&!e(r)&&h(n)})}function h(e){let t=i.get(e);t&&(!o||!fo(t,o))?p(t):o&&Pi(o),i.delete(e),a.delete(e)}B(()=>[e.include,e.exclude],([e,t])=>{e&&m(t=>ki(e,t)),t&&m(e=>!ki(t,e))},{flush:`post`,deep:!0});let g=null,_=()=>{g!=null&&(Cc(n.subTree.type)?Sc(()=>{i.set(g,Fi(n.subTree))},n.subTree.suspense):i.set(g,Fi(n.subTree)))};return Bs(_),Hs(_),Us(()=>{i.forEach(e=>{let{subTree:t,suspense:r}=n,i=Fi(t);if(e.type===i.type&&e.key===i.key){Pi(i);let e=i.component.da;e&&Sc(e,r);return}p(e)})}),()=>{if(g=null,!t.default)return o=null;let n=t.default(),r=n[0];if(n.length>1)return o=null,n;if(!uo(r)||!(r.shapeFlag&4)&&!(r.shapeFlag&128))return o=null,r;let s=Fi(r);if(s.type===Dc)return o=null,s;let c=s.type,l=No(Fs(s)?s.type.__asyncResolved||{}:c),{include:u,exclude:d,max:f}=e;if(u&&(!l||!ki(u,l))||d&&l&&ki(d,l))return s.shapeFlag&=-257,o=s,r;let p=s.key==null?c:s.key,m=i.get(p);return s.el&&(s=go(s),r.shapeFlag&128&&(r.ssContent=s)),g=p,m?(s.el=m.el,s.component=m.component,s.transition&&di(s,s.transition),s.shapeFlag|=512,a.delete(p),a.add(p)):(a.add(p),f&&a.size>parseInt(f,10)&&h(a.values().next().value)),s.shapeFlag|=256,o=s,Cc(r.type)?r:s}}},Rs=e=>(t,n=Ic)=>{(!Hc||e===`sp`)&&Ii(e,(...e)=>t(...e),n)},zs=Rs(`bm`),Bs=Rs(`m`),Vs=Rs(`bu`),Hs=Rs(`u`),Us=Rs(`bum`),Ws=Rs(`um`),Gs=Rs(`sp`),Ks=Rs(`rtg`),qs=Rs(`rtc`),Js=`components`,Ys=`directives`,Xs=Symbol.for(`v-ndc`),Zs=e=>e?To(e)?Mo(e):Zs(e.parent):null,Qs=ie(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Zs(e.parent),$root:e=>Zs(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>pa(e),$forceUpdate:e=>e.f||=()=>{Pr(e.update)},$nextTick:e=>e.n||=Mr.bind(e.proxy),$watch:e=>$r.bind(e)}),$s=(e,t)=>e!==M&&!e.__isScriptSetup&&se(e,t),ec={get({_:e},t){if(t===`__v_skip`)return!0;let{ctx:n,setupState:r,data:i,props:a,accessCache:o,type:s,appContext:c}=e;if(t[0]!==`$`){let e=o[t];if(e!==void 0)switch(e){case 1:return r[t];case 2:return i[t];case 4:return n[t];case 3:return a[t]}else if($s(r,t))return o[t]=1,r[t];else if(i!==M&&se(i,t))return o[t]=2,i[t];else if(se(a,t))return o[t]=3,a[t];else if(n!==M&&se(n,t))return o[t]=4,n[t];else nc&&(o[t]=0)}let l=Qs[t],u,d;if(l)return t===`$attrs`&&Rt(e.attrs,`get`,``),l(e);if((u=s.__cssModules)&&(u=u[t]))return u;if(n!==M&&se(n,t))return o[t]=4,n[t];if(d=c.config.globalProperties,se(d,t))return d[t]},set({_:e},t,n){let{data:r,setupState:i,ctx:a}=e;return $s(i,t)?(i[t]=n,!0):r!==M&&se(r,t)?(r[t]=n,!0):se(e.props,t)||t[0]===`$`&&t.slice(1)in e?!1:(a[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:i,props:a,type:o}},s){let c;return!!(n[s]||e!==M&&s[0]!==`$`&&se(e,s)||$s(t,s)||se(a,s)||se(r,s)||se(Qs,s)||se(i.config.globalProperties,s)||(c=o.__cssModules)&&c[s])},defineProperty(e,t,n){return n.get==null?se(n,`value`)&&this.set(e,t,n.value,null):e._.accessCache[t]=0,Reflect.defineProperty(e,t,n)}},tc=ie({},ec,{get(e,t){if(t!==Symbol.unscopables)return ec.get(e,t,e)},has(e,t){return t[0]!==`_`&&!We(t)}}),nc=!0,rc={data:ha,props:ba,emits:ba,methods:ya,computed:ya,beforeCreate:va,created:va,beforeMount:va,mounted:va,beforeUpdate:va,updated:va,beforeDestroy:va,beforeUnmount:va,destroyed:va,unmounted:va,activated:va,deactivated:va,errorCaptured:va,serverPrefetch:va,components:ya,directives:ya,watch:xa,provide:ha,inject:ga},ic=0,ac=null,oc=(e,t)=>t===`modelValue`||t===`model-value`?e.modelModifiers:e[`${t}Modifiers`]||e[`${Ee(t)}Modifiers`]||e[`${Oe(t)}Modifiers`],sc=new WeakMap,cc=e=>{let t;for(let n in e)(n===`class`||n===`style`||N(n))&&((t||={})[n]=e[n]);return t},lc=(e,t)=>{let n={};for(let r in e)(!re(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n},uc={},dc=()=>Object.create(uc),fc=e=>Object.getPrototypeOf(e)===uc,pc=new WeakMap,mc=e=>e===`_`||e===`_ctx`||e===`$stable`,hc=e=>P(e)?e.map(yo):[yo(e)],gc=(e,t,n)=>{if(t._n)return t;let r=z((...e)=>hc(t(...e)),n);return r._c=!1,r},_c=(e,t,n)=>{let r=e._ctx;for(let n in e){if(mc(n))continue;let i=e[n];if(fe(i))t[n]=gc(n,i,r);else if(i!=null){let e=hc(i);t[n]=()=>e}}},vc=(e,t)=>{let n=hc(t);e.slots.default=()=>n},yc=(e,t,n)=>{for(let r in t)(n||!mc(r))&&(e[r]=t[r])},bc=(e,t,n)=>{let r=e.slots=dc();if(e.vnode.shapeFlag&32){let e=t._;e?(yc(r,t,n),n&&Ne(r,`_`,e,!0)):_c(t,r)}else t&&vc(e,t)},xc=(e,t,n)=>{let{vnode:r,slots:i}=e,a=!0,o=M;if(r.shapeFlag&32){let e=t._;e?n&&e===1?a=!1:yc(i,t,n):(a=!t.$stable,_c(t,i)),o=t}else t&&(vc(e,t),o={default:1});if(a)for(let e in i)!mc(e)&&o[e]==null&&delete i[e]},Sc=io,Cc=e=>e.__isSuspense,wc=0,Tc={name:`Suspense`,__isSuspense:!0,process(e,t,n,r,i,a,o,s,c,l){if(e==null)Qa(t,n,r,i,a,o,s,c,l);else{if(a&&a.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}$a(e,t,n,r,i,o,s,c,l)}},hydrate:to,normalize:no},q=Symbol.for(`v-fgt`),Ec=Symbol.for(`v-txt`),Dc=Symbol.for(`v-cmt`),Oc=Symbol.for(`v-stc`),kc=[],Ac=null,jc=1,Mc=({key:e})=>e??null,Nc=({ref:e,ref_key:t,ref_for:n})=>(typeof e==`number`&&(e=``+e),e==null?null:pe(e)||pn(e)||fe(e)?{i:Qo,r:e,k:t,f:!!n}:e),J=mo,Pc=Sa(),Fc=0,Ic=null,Lc=()=>Ic||Qo;{let e=Le(),t=(t,n)=>{let r;return(r=e[t])||(r=e[t]=[]),r.push(n),e=>{r.length>1?r.forEach(t=>t(e)):r[0](e)}};Rc=t(`__VUE_INSTANCE_SETTERS__`,e=>Ic=e),zc=t(`__VUE_SSR_SETTERS__`,e=>Hc=e)}Bc=e=>{let t=Ic;return Rc(e),e.scope.on(),()=>{e.scope.off(),Rc(t)}},Vc=()=>{Ic&&Ic.scope.off(),Rc(null)},Hc=!1,Gc=()=>!Uc,Kc={get(e,t){return Rt(e,`get`,``),e[t]}},Y=(e,t)=>Cn(e,t,Hc),qc=`3.5.40`,Jc=te,Yc=Vo,Xc=Xo,Zc=Br,Qc={createComponentInstance:wo,setupComponent:Eo,renderComponentRoot:Oa,setCurrentRenderingInstance:Vr,isVNode:uo,normalizeVNode:yo,getComponentPublicInstance:Mo,ensureValidVNode:Ki,pushWarningContext:Tr,popWarningContext:Er}})),el=c({BaseTransition:()=>ys,BaseTransitionPropsValidators:()=>gs,Comment:()=>Dc,DeprecationTypes:()=>null,EffectScope:()=>kn,ErrorCodes:()=>Bo,ErrorTypeStrings:()=>Yc,Fragment:()=>q,KeepAlive:()=>Ls,ReactiveEffect:()=>Mn,Static:()=>Oc,Suspense:()=>Tc,Teleport:()=>fs,Text:()=>Ec,TrackOpTypes:()=>R,Transition:()=>mu,TransitionGroup:()=>Wu,TriggerOpTypes:()=>br,VueElement:()=>Ru,assertNumber:()=>Dr,callWithAsyncErrorHandling:()=>kr,callWithErrorHandling:()=>Or,camelize:()=>Ee,capitalize:()=>ke,cloneVNode:()=>go,compatUtils:()=>null,computed:()=>Y,createApp:()=>cd,createBlock:()=>W,createCommentVNode:()=>K,createElementBlock:()=>U,createElementVNode:()=>G,createHydrationRenderer:()=>Va,createPropsRestProxy:()=>sa,createRenderer:()=>Ba,createSSRApp:()=>ld,createSlots:()=>Wi,createStaticVNode:()=>vo,createTextVNode:()=>_o,createVNode:()=>J,customRef:()=>yn,defineAsyncComponent:()=>Di,defineComponent:()=>V,defineCustomElement:()=>jl,defineEmits:()=>Yi,defineExpose:()=>Xi,defineModel:()=>$i,defineOptions:()=>Zi,defineProps:()=>Ji,defineSSRCustomElement:()=>Iu,defineSlots:()=>Qi,devtools:()=>Xc,effect:()=>Mt,effectScope:()=>bt,getCurrentInstance:()=>Lc,getCurrentScope:()=>xt,getCurrentWatcher:()=>wn,getTransitionRawChildren:()=>fi,guardReactiveProps:()=>ho,h:()=>Fo,handleError:()=>Ar,hasInjectionContext:()=>Jr,hydrate:()=>sd,hydrateOnIdle:()=>js,hydrateOnInteraction:()=>Ps,hydrateOnMediaQuery:()=>Ns,hydrateOnVisible:()=>Ms,initCustomFormatter:()=>Io,initDirectivesForSSR:()=>dd,inject:()=>qr,isMemoSame:()=>Ro,isProxy:()=>un,isReactive:()=>sn,isReadonly:()=>cn,isRef:()=>pn,isRuntimeOnly:()=>Gc,isShallow:()=>ln,isVNode:()=>uo,markRaw:()=>fn,mergeDefaults:()=>aa,mergeModels:()=>oa,mergeProps:()=>So,nextTick:()=>Mr,nodeOps:()=>su,normalizeClass:()=>b,normalizeProps:()=>x,normalizeStyle:()=>_,onActivated:()=>Ai,onBeforeMount:()=>zs,onBeforeUnmount:()=>Us,onBeforeUpdate:()=>Vs,onDeactivated:()=>ji,onErrorCaptured:()=>Li,onMounted:()=>Bs,onRenderTracked:()=>qs,onRenderTriggered:()=>Ks,onScopeDispose:()=>St,onServerPrefetch:()=>Gs,onUnmounted:()=>Ws,onUpdated:()=>Hs,onWatcherCleanup:()=>Tn,openBlock:()=>H,patchProp:()=>Pu,popScopeId:()=>Ur,provide:()=>Kr,proxyRefs:()=>vn,pushScopeId:()=>Hr,queuePostFlushCb:()=>Ir,reactive:()=>tn,readonly:()=>rn,ref:()=>I,registerRuntimeCompiler:()=>ko,render:()=>od,renderList:()=>Ui,renderSlot:()=>Gi,resolveComponent:()=>Ri,resolveDirective:()=>Bi,resolveDynamicComponent:()=>zi,resolveFilter:()=>null,resolveTransitionHooks:()=>ci,setBlockTracking:()=>co,setDevtoolsHook:()=>Zc,setTransitionHooks:()=>di,shallowReactive:()=>nn,shallowReadonly:()=>an,shallowRef:()=>mn,ssrContextKey:()=>ts,ssrUtils:()=>Qc,stop:()=>Nt,toDisplayString:()=>F,toHandlerKey:()=>Ae,toHandlers:()=>qi,toRaw:()=>dn,toRef:()=>xn,toRefs:()=>bn,toValue:()=>_n,transformVNodeArgs:()=>po,triggerRef:()=>gn,unref:()=>L,useAttrs:()=>na,useCssModule:()=>Pl,useCssVars:()=>hl,useHost:()=>Ml,useId:()=>pi,useModel:()=>wa,useSSRContext:()=>ns,useShadowRoot:()=>Nl,useSlots:()=>ta,useTemplateRef:()=>hi,useTransitionState:()=>ai,vModelCheckbox:()=>Ju,vModelDynamic:()=>Zu,vModelRadio:()=>Yu,vModelSelect:()=>Xu,vModelText:()=>qu,vShow:()=>bu,version:()=>qc,warn:()=>Jc,watch:()=>B,watchEffect:()=>Yr,watchPostEffect:()=>Xr,watchSyncEffect:()=>Zr,withAsyncContext:()=>ca,withCtx:()=>z,withDefaults:()=>ea,withDirectives:()=>Wr,withKeys:()=>nd,withMemo:()=>Lo,withModifiers:()=>ed,withScopeId:()=>es});function tl(e){let t={};for(let n in e)n in du||(t[n]=e[n]);if(e.css===!1)return t;let{name:n=`v`,type:r,duration:i,enterFromClass:a=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:s=`${n}-enter-to`,appearFromClass:c=a,appearActiveClass:l=o,appearToClass:u=s,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:p=`${n}-leave-to`}=e,m=nl(i),h=m&&m[0],g=m&&m[1],{onBeforeEnter:_,onEnter:v,onEnterCancelled:y,onLeave:b,onLeaveCancelled:x,onBeforeAppear:S=_,onAppear:C=v,onAppearCancelled:w=y}=t,T=(e,t,n,r)=>{e._enterCancelled=r,al(e,t?u:s),al(e,t?l:o),n&&n()},E=(e,t)=>{e._isLeaving=!1,al(e,d),al(e,p),al(e,f),t&&t()},D=e=>(t,n)=>{let i=e?C:v,o=()=>T(t,e,n);hu(i,[t,o]),ol(()=>{al(t,e?c:a),il(t,e?u:s),gu(i)||sl(t,r,h,o)})};return ie(t,{onBeforeEnter(e){hu(_,[e]),il(e,a),il(e,o)},onBeforeAppear(e){hu(S,[e]),il(e,c),il(e,l)},onEnter:D(!1),onAppear:D(!0),onLeave(e,t){e._isLeaving=!0;let n=()=>E(e,t);il(e,d),e._enterCancelled?(il(e,f),dl(e)):(dl(e),il(e,f)),ol(()=>{e._isLeaving&&(al(e,d),il(e,p),gu(b)||sl(e,r,g,n))}),hu(b,[e,n])},onEnterCancelled(e){T(e,!1,void 0,!0),hu(y,[e])},onAppearCancelled(e){T(e,!0,void 0,!0),hu(w,[e])},onLeaveCancelled(e){E(e),hu(x,[e])}})}function nl(e){if(e==null)return null;if(he(e))return[rl(e.enter),rl(e.leave)];{let t=rl(e);return[t,t]}}function rl(e){return Fe(e)}function il(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.add(t)),(e[uu]||(e[uu]=new Set)).add(t)}function al(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.remove(t));let n=e[uu];n&&(n.delete(t),n.size||(e[uu]=void 0))}function ol(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}function sl(e,t,n,r){let i=e._endId=++_u,a=()=>{i===e._endId&&r()};if(n!=null)return setTimeout(a,n);let{type:o,timeout:s,propCount:c}=cl(e,t);if(!o)return r();let l=o+`end`,u=0,d=()=>{e.removeEventListener(l,f),a()},f=t=>{t.target===e&&++u>=c&&d()};setTimeout(()=>{u(n[e]||``).split(`, `),i=r(`${cu}Delay`),a=r(`${cu}Duration`),o=ll(i,a),s=r(`${lu}Delay`),c=r(`${lu}Duration`),l=ll(s,c),u=null,d=0,f=0;t===cu?o>0&&(u=cu,d=o,f=a.length):t===lu?l>0&&(u=lu,d=l,f=c.length):(d=Math.max(o,l),u=d>0?o>l?cu:lu:null,f=u?u===cu?a.length:c.length:0);let p=u===cu&&/\b(?:transform|all)(?:,|$)/.test(r(`${cu}Property`).toString());return{type:u,timeout:d,propCount:f,hasTransform:p}}function ll(e,t){for(;e.lengthul(t)+ul(e[n])))}function ul(e){return e===`auto`?0:Number(e.slice(0,-1).replace(`,`,`.`))*1e3}function dl(e){return(e?e.ownerDocument:document).body.offsetHeight}function fl(e,t,n){let r=e[uu];r&&(t=(t?[t,...r]:[...r]).join(` `)),t==null?e.removeAttribute(`class`):n?e.setAttribute(`class`,t):e.className=t}function pl(e,t){e.style.display=t?e[vu]:`none`,e[yu]=!t}function ml(){bu.getSSRProps=({value:e})=>{if(!e)return{style:{display:`none`}}}}function hl(e){let t=Lc();if(!t)return;let n=t.ut=(n=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(e=>_l(e,n))},r=()=>{let r=e(t.proxy);t.ce?_l(t.ce,r):gl(t.subTree,r),n(r)};Vs(()=>{Ir(r)}),Bs(()=>{B(r,te,{flush:`post`});let e=new MutationObserver(r);e.observe(t.subTree.el.parentNode,{childList:!0}),Ws(()=>e.disconnect())})}function gl(e,t){if(e.shapeFlag&128){let n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{gl(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)_l(e.el,t);else if(e.type===q)e.children.forEach(e=>gl(e,t));else if(e.type===Oc){let{el:n,anchor:r}=e;for(;n&&(_l(n,t),n!==r);)n=n.nextSibling}}function _l(e,t){if(e.nodeType===1){let n=e.style,r=``;for(let e in t){let i=j(t[e]);n.setProperty(`--${e}`,i),r+=`--${e}: ${i};`}n[xu]=r}}function vl(e,t,n){let r=e.style,i=pe(n),a=!1;if(n&&!i){if(t)if(pe(t))for(let e of t.split(`;`)){let t=e.slice(0,e.indexOf(`:`)).trim();n[t]??yl(r,t,``)}else for(let e in t)n[e]??yl(r,e,``);for(let i in n){i===`display`&&(a=!0);let o=n[i];o==null?yl(r,i,``):xl(e,i,!pe(t)&&t?t[i]:void 0,o)||yl(r,i,o)}}else if(i){if(t!==n){let e=r[xu];e&&(n+=`;`+e),r.cssText=n,a=Su.test(n)}}else t&&e.removeAttribute(`style`);vu in e&&(e[vu]=a?r.display:``,e[yu]&&(r.display=`none`))}function yl(e,t,n){if(P(n))n.forEach(n=>yl(e,t,n));else if(n??=``,t.startsWith(`--`))e.setProperty(t,n);else{let r=bl(e,t);Cu.test(n)?e.setProperty(Oe(r),n.replace(Cu,``),`important`):e[r]=n}}function bl(e,t){let n=Tu[t];if(n)return n;let r=Ee(t);if(r!==`filter`&&r in e)return Tu[t]=r;r=ke(r);for(let n=0;n{if(!e._vts)e._vts=Date.now();else if(e._vts<=n.attached)return;let r=n.value;if(P(r)){let n=e.stopImmediatePropagation;e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0};let i=r.slice(),a=[e];for(let n=0;nEe(e)===r):Object.keys(n).some(e=>Ee(e)===r)}function jl(e,t,n){let r=V(e,t);be(r)&&(r=ie({},r,t));class i extends Ru{constructor(e){super(r,e,n)}}return i.def=r,i}function Ml(e){let t=Lc();return t&&t.ce||null}function Nl(){let e=Ml();return e&&e.shadowRoot}function Pl(e=`$style`){{let t=Lc();if(!t)return M;let n=t.type.__cssModules;return n&&n[e]||M}}function Fl(e){let t=e.el;t[Vu]&&t[Vu](),t[Hu]&&t[Hu]()}function Il(e){Bu.set(e,Rl(e.el))}function Ll(e){let t=zu.get(e),n=Bu.get(e),r=t.left-n.left,i=t.top-n.top;if(r||i){let t=e.el,n=t.style,a=t.getBoundingClientRect(),o=1,s=1;return t.offsetWidth&&(o=a.width/t.offsetWidth),t.offsetHeight&&(s=a.height/t.offsetHeight),(!Number.isFinite(o)||o===0)&&(o=1),(!Number.isFinite(s)||s===0)&&(s=1),Math.abs(o-1)<.01&&(o=1),Math.abs(s-1)<.01&&(s=1),n.transform=n.webkitTransform=`translate(${r/o}px,${i/s}px)`,n.transitionDuration=`0s`,e}}function Rl(e){let t=e.getBoundingClientRect();return{left:t.left,top:t.top}}function zl(e,t,n){let r=e.cloneNode(),i=e[uu];i&&i.forEach(e=>{e.split(/\s+/).forEach(e=>e&&r.classList.remove(e))}),n.split(/\s+/).forEach(e=>e&&r.classList.add(e)),r.style.display=`none`;let a=t.nodeType===1?t:t.parentNode;a.appendChild(r);let{hasTransform:o}=cl(r);return a.removeChild(r),o}function Bl(e){e.target.composing=!0}function Vl(e){let t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event(`input`)))}function Hl(e,t,n){return t&&(e=e.trim()),n&&(e=Pe(e)),e}function Ul(e,{value:t,oldValue:n},r){e._modelValue=t;let i;if(P(t))i=A(t,r.props.value)>-1;else if(le(t))i=t.has(r.props.value);else{if(t===n)return;i=k(t,Kl(e,!0))}e.checked!==i&&(e.checked=i)}function Wl(e,t){let n=e.multiple,r=P(t);if(!(n&&!r&&!le(t))){for(let i=0,a=e.options.length;iString(e)===String(o)):a.selected=A(t,o)>-1}else a.selected=t.has(o);else if(k(Gl(a),t)){e.selectedIndex!==i&&(e.selectedIndex=i);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Gl(e){return`_value`in e?e._value:e.value}function Kl(e,t){let n=t?`_trueValue`:`_falseValue`;return n in e?e[n]:t}function ql(e,t){switch(e){case`SELECT`:return Xu;case`TEXTAREA`:return qu;default:switch(t){case`checkbox`:return Ju;case`radio`:return Yu;default:return qu}}}function Jl(e,t,n,r,i){let a=ql(e.tagName,n.props&&n.props.type)[i];a&&a(e,t,n,r)}function Yl(){qu.getSSRProps=({value:e})=>({value:e}),Yu.getSSRProps=({value:e},t)=>{if(t.props&&k(t.props.value,e))return{checked:!0}},Ju.getSSRProps=({value:e},t)=>{if(P(e)){if(t.props&&A(e,t.props.value)>-1)return{checked:!0}}else if(le(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},Zu.getSSRProps=(e,t)=>{if(typeof t.type!=`string`)return;let n=ql(t.type.toUpperCase(),t.props&&t.props.type);if(n.getSSRProps)return n.getSSRProps(e,t)}}function Xl(){return id||=Ba(rd)}function Zl(){return id=ad?id:Va(rd),ad=!0,id}function Ql(e){if(e instanceof SVGElement)return`svg`;if(typeof MathMLElement==`function`&&e instanceof MathMLElement)return`mathml`}function $l(e){return pe(e)?document.querySelector(e):e}var eu,tu,nu,ru,iu,au,ou,su,cu,lu,uu,du,fu,pu,mu,hu,gu,_u,vu,yu,bu,xu,Su,Cu,wu,Tu,Eu,Du,Ou,ku,Au,ju,Mu,Nu,Pu,Fu,Iu,Lu,Ru,zu,Bu,Vu,Hu,Uu,Wu,Gu,Ku,qu,Ju,Yu,Xu,Zu,Qu,$u,ed,td,nd,rd,id,ad,od,sd,cd,ld,ud,dd,fd=o((()=>{if($c(),$c(),yt(),eu=void 0,tu=typeof window<`u`&&window.trustedTypes,tu)try{eu=tu.createPolicy(`vue`,{createHTML:e=>e})}catch{}nu=eu?e=>eu.createHTML(e):e=>e,ru=`http://www.w3.org/2000/svg`,iu=`http://www.w3.org/1998/Math/MathML`,au=typeof document<`u`?document:null,ou=au&&au.createElement(`template`),su={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{let i=t===`svg`?au.createElementNS(ru,e):t===`mathml`?au.createElementNS(iu,e):n?au.createElement(e,{is:n}):au.createElement(e);return e===`select`&&r&&r.multiple!=null&&i.setAttribute(`multiple`,r.multiple),i},createText:e=>au.createTextNode(e),createComment:e=>au.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>au.querySelector(e),setScopeId(e,t){e.setAttribute(t,``)},insertStaticContent(e,t,n,r,i,a){let o=n?n.previousSibling:t.lastChild;if(i&&(i===a||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===a||!(i=i.nextSibling)););else{ou.innerHTML=nu(r===`svg`?`${e}`:r===`mathml`?`${e}`:e);let i=ou.content;if(r===`svg`||r===`mathml`){let e=i.firstChild;for(;e.firstChild;)i.appendChild(e.firstChild);i.removeChild(e)}t.insertBefore(i,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},cu=`transition`,lu=`animation`,uu=Symbol(`_vtc`),du={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},fu=ie({},gs,du),pu=e=>(e.displayName=`Transition`,e.props=fu,e),mu=pu((e,{slots:t})=>Fo(ys,tl(e),t)),hu=(e,t=[])=>{P(e)?e.forEach(e=>e(...t)):e&&e(...t)},gu=e=>e?P(e)?e.some(e=>e.length>1):e.length>1:!1,_u=0,vu=Symbol(`_vod`),yu=Symbol(`_vsh`),bu={name:`show`,beforeMount(e,{value:t},{transition:n}){e[vu]=e.style.display===`none`?``:e.style.display,n&&t?n.beforeEnter(e):pl(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),pl(e,!0),r.enter(e)):r.leave(e,()=>{pl(e,!1)}):pl(e,t))},beforeUnmount(e,{value:t}){pl(e,t)}},xu=Symbol(``),Su=/(?:^|;)\s*display\s*:/,Cu=/\s*!important$/,wu=[`Webkit`,`Moz`,`ms`],Tu={},Eu=`http://www.w3.org/1999/xlink`,Du=Symbol(`_vei`),Ou=/(Once|Passive|Capture)$/,ku=/^on:?(?:Once|Passive|Capture)$/,Au=0,ju=Promise.resolve(),Mu=()=>Au||=(ju.then(()=>Au=0),Date.now()),Nu=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Pu=(e,t,n,r,i,a)=>{let o=i===`svg`;t===`class`?fl(e,r,o):t===`style`?vl(e,n,r):N(t)?re(t)||El(e,t,n,r,a):(t[0]===`.`?(t=t.slice(1),!0):t[0]===`^`?(t=t.slice(1),!1):kl(e,t,r,o))?(Cl(e,t,r),!e.tagName.includes(`-`)&&(t===`value`||t===`checked`||t===`selected`)&&Sl(e,t,r,o,a,t!==`value`)):e._isVueCE&&(Al(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!pe(r)))?Cl(e,Ee(t),r,a,t):(t===`true-value`?e._trueValue=r:t===`false-value`&&(e._falseValue=r),Sl(e,t,r,o))},Fu={},Iu=((e,t)=>jl(e,t,ld)),Lu=typeof HTMLElement<`u`?HTMLElement:class{},Ru=class e extends Lu{constructor(e,t={},n=cd){super(),this._def=e,this._props=t,this._createApp=n,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._patching=!1,this._dirty=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._styleAnchors=new WeakMap,this._ob=null,this.shadowRoot&&n!==cd?this._root=this.shadowRoot:e.shadowRoot===!1?this._root=this:(this.attachShadow(ie({},e.shadowRootOptions,{mode:`open`})),this._root=this.shadowRoot)}connectedCallback(){if(!this.isConnected)return;!this.shadowRoot&&!this._resolved&&this._parseSlots(),this._connected=!0;let t=this;for(;t&&=t.assignedSlot||t.parentNode||t.host;)if(t instanceof e){this._parent=t;break}this._instance||(this._resolved?this._mount(this._def):t&&t._pendingResolve?this._pendingResolve=t._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(e=this._parent){e&&(this._instance.parent=e._instance,this._inheritParentContext(e))}_inheritParentContext(e=this._parent){e&&this._app&&Object.setPrototypeOf(this._app._context.provides,e._instance.provides)}disconnectedCallback(){this._connected=!1,Mr(()=>{this._connected||(this._ob&&=(this._ob.disconnect(),null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null,this._teleportTargets&&=(this._teleportTargets.clear(),void 0))})}_processMutations(e){for(let t of e)this._setAttr(t.attributeName)}_resolveDef(){if(this._pendingResolve)return;for(let e=0;e{this._resolved=!0,this._pendingResolve=void 0;let{props:n,styles:r}=e,i;if(n&&!P(n))for(let e in n){let t=n[e];(t===Number||t&&t.type===Number)&&(e in this._props&&(this._props[e]=Fe(this._props[e])),(i||=Object.create(null))[Ee(e)]=!0)}this._numberProps=i,this._resolveProps(e),this.shadowRoot&&this._applyStyles(r),this._mount(e)},t=this._def.__asyncLoader;t?this._pendingResolve=t().then(t=>{t.configureApp=this._def.configureApp,e(this._def=t,!0)}):e(this._def)}_mount(e){this._app=this._createApp(e),this._inheritParentContext(),e.configureApp&&e.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);let t=this._instance&&this._instance.exposed;if(t)for(let e in t)se(this,e)||Object.defineProperty(this,e,{get:()=>L(t[e])})}_resolveProps(e){let{props:t}=e,n=P(t)?t:Object.keys(t||{});for(let e of Object.keys(this))e[0]!==`_`&&n.includes(e)&&this._setProp(e,this[e]);for(let e of n.map(Ee))Object.defineProperty(this,e,{get(){return this._getProp(e)},set(t){this._setProp(e,t,!0,!this._patching)}})}_setAttr(e){if(e.startsWith(`data-v-`))return;let t=this.hasAttribute(e),n=t?this.getAttribute(e):Fu,r=Ee(e);t&&this._numberProps&&this._numberProps[r]&&(n=Fe(n)),this._setProp(r,n,!1,!0)}_getProp(e){return this._props[e]}_setProp(e,t,n=!0,r=!1){if(t!==this._props[e]&&(this._dirty=!0,t===Fu?delete this._props[e]:(this._props[e]=t,e===`key`&&this._app&&(this._app._ceVNode.key=t)),r&&this._instance&&this._update(),n)){let n=this._ob;n&&(this._processMutations(n.takeRecords()),n.disconnect()),t===!0?this.setAttribute(Oe(e),``):typeof t==`string`||typeof t==`number`?this.setAttribute(Oe(e),t+``):t||this.removeAttribute(Oe(e)),n&&n.observe(this,{attributes:!0})}}_update(){let e=this._createVNode();this._app&&(e.appContext=this._app._context),od(e,this._root)}_createVNode(){let e={};this.shadowRoot||(e.onVnodeMounted=e.onVnodeUpdated=this._renderSlots.bind(this));let t=J(this._def,ie(e,this._props));return this._instance||(t.ce=e=>{this._instance=e,e.ce=this,e.isCE=!0;let t=(e,t)=>{this.dispatchEvent(new CustomEvent(e,be(t[0])?ie({detail:t},t[0]):{detail:t}))};e.emit=(e,...n)=>{t(e,n),Oe(e)!==e&&t(Oe(e),n)},this._setParent()}),t}_applyStyles(e,t,n){if(!e)return;if(t){if(t===this._def||this._styleChildren.has(t))return;this._styleChildren.add(t)}let r=this._nonce,i=this.shadowRoot,a=n?this._getStyleAnchor(n)||this._getStyleAnchor(this._def):this._getRootStyleInsertionAnchor(i),o=null;for(let s=e.length-1;s>=0;s--){let c=document.createElement(`style`);r&&c.setAttribute(`nonce`,r),c.textContent=e[s],i.insertBefore(c,o||a),o=c,s===0&&(n||this._styleAnchors.set(this._def,c),t&&this._styleAnchors.set(t,c))}}_getStyleAnchor(e){if(!e)return null;let t=this._styleAnchors.get(e);return t&&t.parentNode===this.shadowRoot?t:(t&&this._styleAnchors.delete(e),null)}_getRootStyleInsertionAnchor(e){for(let t=0;t(delete e.props.mode,e),Wu=Uu({name:`TransitionGroup`,props:ie({},fu,{tag:String,moveClass:String}),setup(e,{slots:t}){let n=Lc(),r=ai(),i,a;return Hs(()=>{if(!i.length)return;let t=e.moveClass||`${e.name||`v`}-move`;if(!zl(i[0].el,n.vnode.el,t)){i=[];return}i.forEach(Fl),i.forEach(Il);let r=i.filter(Ll);dl(n.vnode.el),r.forEach(e=>{let n=e.el,r=n.style;il(n,t),r.transform=r.webkitTransform=r.transitionDuration=``;let i=n[Vu]=e=>{e&&e.target!==n||(!e||e.propertyName.endsWith(`transform`))&&(n.removeEventListener(`transitionend`,i),n[Vu]=null,al(n,t))};n.addEventListener(`transitionend`,i)}),i=[]}),()=>{let o=dn(e),s=tl(o),c=o.tag||q;if(i=[],a)for(let e=0;e{let t=e.props[`onUpdate:modelValue`]||!1;return P(t)?e=>Me(t,e):t},Ku=Symbol(`_assign`),qu={created(e,{modifiers:{lazy:t,trim:n,number:r}},i){e[Ku]=Gu(i);let a=r||i.props&&i.props.type===`number`;wl(e,t?`change`:`input`,t=>{t.target.composing||e[Ku](Hl(e.value,n,a))}),(n||a)&&wl(e,`change`,()=>{e.value=Hl(e.value,n,a)}),t||(wl(e,`compositionstart`,Bl),wl(e,`compositionend`,Vl),wl(e,`change`,Vl))},mounted(e,{value:t}){e.value=t??``},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:i,number:a}},o){if(e[Ku]=Gu(o),e.composing)return;let s=(a||e.type===`number`)&&!/^0\d/.test(e.value)?Pe(e.value):e.value,c=t??``;if(s===c)return;let l=e.getRootNode();(l instanceof Document||l instanceof ShadowRoot)&&l.activeElement===e&&e.type!==`range`&&(r&&t===n||i&&e.value.trim()===c)||(e.value=c)}},Ju={deep:!0,created(e,t,n){e[Ku]=Gu(n),wl(e,`change`,()=>{let t=e._modelValue,n=Gl(e),r=e.checked,i=e[Ku];if(P(t)){let e=A(t,n),a=e!==-1;if(r&&!a)i(t.concat(n));else if(!r&&a){let n=[...t];n.splice(e,1),i(n)}}else if(le(t)){let e=new Set(t);r?e.add(n):e.delete(n),i(e)}else i(Kl(e,r))})},mounted:Ul,beforeUpdate(e,t,n){e[Ku]=Gu(n),Ul(e,t,n)}},Yu={created(e,{value:t},n){e.checked=k(t,n.props.value),e[Ku]=Gu(n),wl(e,`change`,()=>{e[Ku](Gl(e))})},beforeUpdate(e,{value:t,oldValue:n},r){e[Ku]=Gu(r),t!==n&&(e.checked=k(t,r.props.value))}},Xu={deep:!0,created(e,{value:t,modifiers:{number:n}},r){e._modelValue=t,wl(e,`change`,()=>{let t=Array.prototype.filter.call(e.options,e=>e.selected).map(e=>n?Pe(Gl(e)):Gl(e));e[Ku](e.multiple?le(e._modelValue)?new Set(t):t:t[0]),e._assigning=!0,Mr(()=>{e._assigning=!1})}),e[Ku]=Gu(r)},mounted(e,{value:t}){Wl(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[Ku]=Gu(n)},updated(e,{value:t}){e._assigning||Wl(e,t)}},Zu={created(e,t,n){Jl(e,t,n,null,`created`)},mounted(e,t,n){Jl(e,t,n,null,`mounted`)},beforeUpdate(e,t,n,r){Jl(e,t,n,r,`beforeUpdate`)},updated(e,t,n,r){Jl(e,t,n,r,`updated`)}},Qu=[`ctrl`,`shift`,`alt`,`meta`],$u={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>`button`in e&&e.button!==0,middle:e=>`button`in e&&e.button!==1,right:e=>`button`in e&&e.button!==2,exact:(e,t)=>Qu.some(n=>e[`${n}Key`]&&!t.includes(n))},ed=(e,t)=>{if(!e)return e;let n=e._withMods||={},r=t.join(`.`);return n[r]||(n[r]=((n,...r)=>{for(let e=0;e{let n=e._withKeys||={},r=t.join(`.`);return n[r]||(n[r]=(n=>{if(!(`key`in n))return;let r=Oe(n.key);if(t.some(e=>e===r||td[e]===r))return e(n)}))},rd=ie({patchProp:Pu},su),ad=!1,od=((...e)=>{Xl().render(...e)}),sd=((...e)=>{Zl().hydrate(...e)}),cd=((...e)=>{let t=Xl().createApp(...e),{mount:n}=t;return t.mount=e=>{let r=$l(e);if(!r)return;let i=t._component;!fe(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent=``);let a=n(r,!1,Ql(r));return r instanceof Element&&(r.removeAttribute(`v-cloak`),r.setAttribute(`data-v-app`,``)),a},t}),ld=((...e)=>{let t=Zl().createApp(...e),{mount:n}=t;return t.mount=e=>{let t=$l(e);if(t)return n(t,!0,Ql(t))},t}),ud=!1,dd=()=>{ud||(ud=!0,Yl(),ml())}})),pd=c({BaseTransition:()=>ys,BaseTransitionPropsValidators:()=>gs,Comment:()=>Dc,DeprecationTypes:()=>null,EffectScope:()=>kn,ErrorCodes:()=>Bo,ErrorTypeStrings:()=>Yc,Fragment:()=>q,KeepAlive:()=>Ls,ReactiveEffect:()=>Mn,Static:()=>Oc,Suspense:()=>Tc,Teleport:()=>fs,Text:()=>Ec,TrackOpTypes:()=>R,Transition:()=>mu,TransitionGroup:()=>Wu,TriggerOpTypes:()=>br,VueElement:()=>Ru,assertNumber:()=>Dr,callWithAsyncErrorHandling:()=>kr,callWithErrorHandling:()=>Or,camelize:()=>Ee,capitalize:()=>ke,cloneVNode:()=>go,compatUtils:()=>null,compile:()=>md,computed:()=>Y,createApp:()=>cd,createBlock:()=>W,createCommentVNode:()=>K,createElementBlock:()=>U,createElementVNode:()=>G,createHydrationRenderer:()=>Va,createPropsRestProxy:()=>sa,createRenderer:()=>Ba,createSSRApp:()=>ld,createSlots:()=>Wi,createStaticVNode:()=>vo,createTextVNode:()=>_o,createVNode:()=>J,customRef:()=>yn,defineAsyncComponent:()=>Di,defineComponent:()=>V,defineCustomElement:()=>jl,defineEmits:()=>Yi,defineExpose:()=>Xi,defineModel:()=>$i,defineOptions:()=>Zi,defineProps:()=>Ji,defineSSRCustomElement:()=>Iu,defineSlots:()=>Qi,devtools:()=>Xc,effect:()=>Mt,effectScope:()=>bt,getCurrentInstance:()=>Lc,getCurrentScope:()=>xt,getCurrentWatcher:()=>wn,getTransitionRawChildren:()=>fi,guardReactiveProps:()=>ho,h:()=>Fo,handleError:()=>Ar,hasInjectionContext:()=>Jr,hydrate:()=>sd,hydrateOnIdle:()=>js,hydrateOnInteraction:()=>Ps,hydrateOnMediaQuery:()=>Ns,hydrateOnVisible:()=>Ms,initCustomFormatter:()=>Io,initDirectivesForSSR:()=>dd,inject:()=>qr,isMemoSame:()=>Ro,isProxy:()=>un,isReactive:()=>sn,isReadonly:()=>cn,isRef:()=>pn,isRuntimeOnly:()=>Gc,isShallow:()=>ln,isVNode:()=>uo,markRaw:()=>fn,mergeDefaults:()=>aa,mergeModels:()=>oa,mergeProps:()=>So,nextTick:()=>Mr,nodeOps:()=>su,normalizeClass:()=>b,normalizeProps:()=>x,normalizeStyle:()=>_,onActivated:()=>Ai,onBeforeMount:()=>zs,onBeforeUnmount:()=>Us,onBeforeUpdate:()=>Vs,onDeactivated:()=>ji,onErrorCaptured:()=>Li,onMounted:()=>Bs,onRenderTracked:()=>qs,onRenderTriggered:()=>Ks,onScopeDispose:()=>St,onServerPrefetch:()=>Gs,onUnmounted:()=>Ws,onUpdated:()=>Hs,onWatcherCleanup:()=>Tn,openBlock:()=>H,patchProp:()=>Pu,popScopeId:()=>Ur,provide:()=>Kr,proxyRefs:()=>vn,pushScopeId:()=>Hr,queuePostFlushCb:()=>Ir,reactive:()=>tn,readonly:()=>rn,ref:()=>I,registerRuntimeCompiler:()=>ko,render:()=>od,renderList:()=>Ui,renderSlot:()=>Gi,resolveComponent:()=>Ri,resolveDirective:()=>Bi,resolveDynamicComponent:()=>zi,resolveFilter:()=>null,resolveTransitionHooks:()=>ci,setBlockTracking:()=>co,setDevtoolsHook:()=>Zc,setTransitionHooks:()=>di,shallowReactive:()=>nn,shallowReadonly:()=>an,shallowRef:()=>mn,ssrContextKey:()=>ts,ssrUtils:()=>Qc,stop:()=>Nt,toDisplayString:()=>F,toHandlerKey:()=>Ae,toHandlers:()=>qi,toRaw:()=>dn,toRef:()=>xn,toRefs:()=>bn,toValue:()=>_n,transformVNodeArgs:()=>po,triggerRef:()=>gn,unref:()=>L,useAttrs:()=>na,useCssModule:()=>Pl,useCssVars:()=>hl,useHost:()=>Ml,useId:()=>pi,useModel:()=>wa,useSSRContext:()=>ns,useShadowRoot:()=>Nl,useSlots:()=>ta,useTemplateRef:()=>hi,useTransitionState:()=>ai,vModelCheckbox:()=>Ju,vModelDynamic:()=>Zu,vModelRadio:()=>Yu,vModelSelect:()=>Xu,vModelText:()=>qu,vShow:()=>bu,version:()=>qc,warn:()=>Jc,watch:()=>B,watchEffect:()=>Yr,watchPostEffect:()=>Xr,watchSyncEffect:()=>Zr,withAsyncContext:()=>ca,withCtx:()=>z,withDefaults:()=>ea,withDirectives:()=>Wr,withKeys:()=>nd,withMemo:()=>Lo,withModifiers:()=>ed,withScopeId:()=>es});fd();var md=()=>{};function hd(e,t,n={}){let r,i,a,o=!0,s=()=>{o=!0,a()};B(e,s,{flush:`sync`,...n});let c=typeof t==`function`?t:t.get,l=typeof t==`function`?void 0:t.set,u=yn((e,t)=>(i=e,a=t,{get(){return o&&=(r=c(r),!1),i(),r},set(e){l?.(e)}}));return u.trigger=s,u}function gd(e,t){return xt()?(St(e,t),!0):!1}var _d=new WeakMap,vd=(...e)=>{let t=e[0],n=Lc()?.proxy??xt();if(n==null&&!Jr())throw Error(`injectLocal must be called in setup`);return n&&_d.has(n)&&t in _d.get(n)?_d.get(n)[t]:qr(...e)},yd=typeof window<`u`&&typeof document<`u`;typeof WorkerGlobalScope<`u`&&globalThis instanceof WorkerGlobalScope;var bd=e=>e!=null,xd=Object.prototype.toString,Sd=e=>xd.call(e)===`[object Object]`,Cd=()=>{};function wd(...e){if(e.length!==1)return xn(...e);let t=e[0];return typeof t==`function`?rn(yn(()=>({get:t,set:Cd}))):I(t)}function Td(e,t){function n(...n){return new Promise((r,i)=>{Promise.resolve(e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(r).catch(i)})}return`cancel`in e&&Object.assign(n,{cancel:e.cancel,flush:e.flush,isPending:e.isPending}),n}var Ed=e=>e();function Dd(e,t={}){let n,r,i=Cd,a=Cd,o=mn(!1),s=e=>{clearTimeout(e),i(),i=Cd},c;return Object.assign(l=>{let u=_n(e),d=_n(t.maxWait);return n&&s(n),u<=0||d!==void 0&&d<=0?(r&&=(s(r),void 0),o.value=!1,Promise.resolve(l())):(o.value=!0,new Promise((e,f)=>{i=t.rejectOnCancel?f:e,a=e,c=l,d&&!r&&(r=setTimeout(()=>{n&&s(n),r=void 0,o.value=!1,e(c())},d)),n=setTimeout(()=>{r&&s(r),r=void 0,o.value=!1,e(l())},u)}))},{cancel:()=>{n&&=(s(n),void 0),r&&=(s(r),void 0),o.value=!1,a=Cd},flush:()=>{if(o.value){n&&=(clearTimeout(n),void 0),r&&=(clearTimeout(r),void 0),o.value=!1;let e=a;i=Cd,a=Cd,e(c())}},isPending:an(o)})}function Od(e=Ed,t={}){let{initialState:n=`active`}=t,r=wd(n===`active`);function i(){r.value=!1}function a(){r.value=!0}return{isActive:an(r),pause:i,resume:a,eventFilter:(...t)=>{r.value&&e(...t)}}}function kd(e){return e.endsWith(`rem`)?Number.parseFloat(e)*16:Number.parseFloat(e)}function Ad(e){return Array.isArray(e)?e:[e]}function jd(e){return e||Lc()}function Md(e,t,n={}){let{eventFilter:r=Ed,...i}=n;return B(e,Td(r,t),i)}function Nd(e,t,n={}){let{eventFilter:r,initialState:i=`active`,...a}=n,{eventFilter:o,pause:s,resume:c,isActive:l}=Od(r,{initialState:i});return{stop:Md(e,t,{...a,eventFilter:o}),pause:s,resume:c,isActive:l}}function Pd(e,t=!0,n){jd(n)?Bs(e,n):t?e():Mr(e)}function Fd(e,t,n={}){let{debounce:r=0,maxWait:i=void 0,...a}=n;return Md(e,t,{...a,eventFilter:Dd(r,{maxWait:i})})}function Id(e,t,n){return B(e,t,{...n,immediate:!0})}function Ld(e,t,n){return B(e,t,{...n,once:!0})}var Rd=yd?window:void 0,zd=yd?window.document:void 0;yd&&window.navigator,yd&&window.location;function Bd(e){let t=_n(e);return t?.$el??t}function Vd(...e){let t=(e,t,n,r)=>(e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)),n=Y(()=>{let t=Ad(_n(e[0])).filter(e=>e!=null);return t.every(e=>typeof e!=`string`)?t:void 0});return Id(()=>[n.value?.map(e=>Bd(e))??[Rd].filter(e=>e!=null),Ad(_n(n.value?e[1]:e[0])),Ad(L(n.value?e[2]:e[1])),_n(n.value?e[3]:e[2])],([e,n,r,i],a,o)=>{if(!e?.length||!n?.length||!r?.length)return;let s=Sd(i)?{...i}:i,c=e.flatMap(e=>n.flatMap(n=>r.map(r=>t(e,n,r,s))));o(()=>{c.forEach(e=>e())})},{flush:`post`})}function Hd(){let e=mn(!1),t=Lc();return t&&Bs(()=>{e.value=!0},t),e}function Ud(e){let t=Hd();return Y(()=>(t.value,!!e()))}function Wd(e,t,n={}){let{window:r=Rd,...i}=n,a,o=Ud(()=>r&&`MutationObserver`in r),s=()=>{a&&=(a.disconnect(),void 0)},c=B(Y(()=>{let t=Ad(_n(e)).map(Bd).filter(bd);return new Set(t)}),e=>{s(),o.value&&e.size&&(a=new MutationObserver(t),e.forEach(e=>a.observe(e,i)))},{immediate:!0,flush:`post`}),l=()=>a?.takeRecords(),u=()=>{c(),s()};return gd(u),{isSupported:o,stop:u,takeRecords:l}}var Gd=Symbol(`vueuse-ssr-width`);function Kd(){let e=Jr()?vd(Gd,null):null;return typeof e==`number`?e:void 0}function qd(e,t={}){let{window:n=Rd,ssrWidth:r=Kd()}=t,i=Ud(()=>n&&`matchMedia`in n&&typeof n.matchMedia==`function`),a=mn(typeof r==`number`),o=mn(),s=mn(!1);return Yr(()=>{if(a.value){a.value=!i.value;let t=_n(e).split(`,`);s.value=t.some(e=>{let t=e.includes(`not all`),n=e.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),i=e.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),a=!!(n||i);return n&&a&&(a=r>=kd(n[1])),i&&a&&(a=r<=kd(i[1])),t?!a:a});return}i.value&&(o.value=n.matchMedia(_n(e)),s.value=o.value.matches)}),Vd(o,`change`,e=>{s.value=e.matches},{passive:!0}),Y(()=>s.value)}var Jd=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{},Yd=`__vueuse_ssr_handlers__`,Xd=Zd();function Zd(){return Yd in Jd||(Jd[Yd]=Jd[Yd]||{}),Jd[Yd]}function Qd(e,t){return Xd[e]||t}function $d(e){return e==null?`any`:e instanceof Set?`set`:e instanceof Map?`map`:e instanceof Date?`date`:typeof e==`boolean`?`boolean`:typeof e==`string`?`string`:typeof e==`object`?`object`:Number.isNaN(e)?`any`:`number`}var ef={boolean:{read:e=>e===`true`,write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},tf=`vueuse-storage`;function nf(e,t,n,r={}){let{flush:i=`pre`,deep:a=!0,listenToStorageChanges:o=!0,writeDefaults:s=!0,mergeDefaults:c=!1,shallow:l,window:u=Rd,eventFilter:d,onError:f=e=>{console.error(e)},initOnMounted:p}=r,m=(l?mn:I)(typeof t==`function`?t():t),h=Y(()=>_n(e));if(!n)try{n=Qd(`getDefaultStorage`,()=>Rd?.localStorage)()}catch(e){f(e)}if(!n)return m;let g=_n(t),_=$d(g),v=r.serializer??ef[_],{pause:y,resume:b}=Nd(m,e=>C(e),{flush:i,deep:a,eventFilter:d});B(h,()=>T(),{flush:i});let x=!1;u&&o&&(n instanceof Storage?Vd(u,`storage`,e=>{p&&!x||T(e)},{passive:!0}):Vd(u,tf,e=>{p&&!x||E(e)})),p?Pd(()=>{x=!0,T()}):T();function S(e,t){if(u){let r={key:h.value,oldValue:e,newValue:t,storageArea:n};u.dispatchEvent(n instanceof Storage?new StorageEvent(`storage`,r):new CustomEvent(tf,{detail:r}))}}function C(e){try{let t=n.getItem(h.value);if(e==null)S(t,null),n.removeItem(h.value);else{let r=v.write(e);t!==r&&(n.setItem(h.value,r),S(t,r))}}catch(e){f(e)}}function w(e){let t=e?e.newValue:n.getItem(h.value);if(t==null)return s&&g!=null&&n.setItem(h.value,v.write(g)),g;if(!e&&c){let e=v.read(t);return typeof c==`function`?c(e,g):_===`object`&&!Array.isArray(e)?{...g,...e}:e}else if(typeof t!=`string`)return t;else return v.read(t)}function T(e){if(!(e&&e.storageArea!==n)){if(e&&e.key==null){m.value=g;return}if(!(e&&e.key!==h.value)){y();try{let t=v.write(m.value);(e===void 0||e?.newValue!==t)&&(m.value=w(e))}catch(e){f(e)}finally{e?Mr(b):b()}}}}function E(e){T(e.detail)}return m}function rf(e){let t=Lc(),n=hd(()=>null,()=>e?Bd(e):t.proxy.$el);return Hs(n.trigger),Bs(n.trigger),n}function af(e={}){let{document:t=zd}=e;if(!t)return mn(`visible`);let n=mn(t.visibilityState);return Vd(t,`visibilitychange`,()=>{n.value=t.visibilityState},{passive:!0}),n}function of(e,t,n={}){let{window:r=Rd,...i}=n,a,o=Ud(()=>r&&`ResizeObserver`in r),s=()=>{a&&=(a.disconnect(),void 0)},c=B(Y(()=>{let t=_n(e);return Array.isArray(t)?t.map(e=>Bd(e)):[Bd(t)]}),e=>{if(s(),o.value&&r){a=new ResizeObserver(t);for(let t of e)t&&a.observe(t,i)}},{immediate:!0,flush:`post`}),l=()=>{s(),c()};return gd(l),{isSupported:o,stop:l}}function sf(e,t={}){let{reset:n=!0,windowResize:r=!0,windowScroll:i=!0,immediate:a=!0,updateTiming:o=`sync`}=t,s=mn(0),c=mn(0),l=mn(0),u=mn(0),d=mn(0),f=mn(0),p=mn(0),m=mn(0);function h(){let t=Bd(e);if(!t){n&&(s.value=0,c.value=0,l.value=0,u.value=0,d.value=0,f.value=0,p.value=0,m.value=0);return}let r=t.getBoundingClientRect();s.value=r.height,c.value=r.bottom,l.value=r.left,u.value=r.right,d.value=r.top,f.value=r.width,p.value=r.x,m.value=r.y}function g(){o===`sync`?h():o===`next-frame`&&requestAnimationFrame(()=>h())}return of(e,g),B(()=>Bd(e),e=>!e&&g()),Wd(e,g,{attributeFilter:[`style`,`class`]}),i&&Vd(`scroll`,g,{capture:!0,passive:!0}),r&&Vd(`resize`,g,{passive:!0}),Pd(()=>{a&&g()}),{height:s,bottom:c,left:l,right:u,top:d,width:f,x:p,y:m,update:g}}function cf(e,t={width:0,height:0},n={}){let{window:r=Rd,box:i=`content-box`}=n,a=Y(()=>{var t;return(t=Bd(e))==null||(t=t.namespaceURI)==null?void 0:t.includes(`svg`)}),o=mn(t.width),s=mn(t.height),{stop:c}=of(e,([t])=>{let n=i===`border-box`?t.borderBoxSize:i===`content-box`?t.contentBoxSize:t.devicePixelContentBoxSize;if(r&&a.value){let t=Bd(e);if(t){let e=t.getBoundingClientRect();o.value=e.width,s.value=e.height}}else if(n){let e=Ad(n);o.value=e.reduce((e,{inlineSize:t})=>e+t,0),s.value=e.reduce((e,{blockSize:t})=>e+t,0)}else o.value=t.contentRect.width,s.value=t.contentRect.height},n);Pd(()=>{let n=Bd(e);if(n&&`offsetWidth`in n)if(i===`content-box`&&r){let e=r.getComputedStyle(n),t=Number.parseFloat(e.paddingLeft)+Number.parseFloat(e.paddingRight),i=Number.parseFloat(e.paddingTop)+Number.parseFloat(e.paddingBottom),a=Number.parseFloat(e.borderLeftWidth)+Number.parseFloat(e.borderRightWidth),c=Number.parseFloat(e.borderTopWidth)+Number.parseFloat(e.borderBottomWidth);o.value=n.offsetWidth-t-a,s.value=n.offsetHeight-i-c}else o.value=n.offsetWidth,s.value=n.offsetHeight;else n&&(o.value=t.width,s.value=t.height)});let l=B(()=>Bd(e),e=>{o.value=e?t.width:0,s.value=e?t.height:0});function u(){c(),l()}return{width:o,height:s,stop:u}}function lf(e,t,n={}){let{root:r,rootMargin:i,threshold:a=0,window:o=Rd,immediate:s=!0}=n,c=Ud(()=>o&&`IntersectionObserver`in o),l=Y(()=>Ad(_n(e)).map(Bd).filter(bd)),u=Cd,d=mn(s),f=c.value?B(()=>[l.value,Bd(r),_n(i),d.value],([e,n,r])=>{if(u(),!d.value||!e.length)return;let i=new IntersectionObserver(t,{root:Bd(n),rootMargin:r,threshold:a});e.forEach(e=>e&&i.observe(e)),u=()=>{i.disconnect(),u=Cd}},{immediate:s,flush:`post`}):Cd,p=()=>{u(),f(),d.value=!1};return gd(p),{isSupported:c,isActive:d,pause(){u(),d.value=!1},resume(){d.value=!0},stop:p}}function uf(e,t={}){let{window:n=Rd,scrollTarget:r,threshold:i=0,rootMargin:a,once:o=!1,initialValue:s=!1}=t,c=mn(s),l=lf(e,e=>{let t=c.value,n=0;for(let r of e)r.time>=n&&(n=r.time,t=r.isIntersecting);c.value=t,o&&Ld(c,()=>{l.stop()})},{root:r,window:n,threshold:i,rootMargin:a});return t.controls?{...l,isVisible:c}:c}function df(e,t,n={}){let{window:r=Rd}=n;return nf(e,t,r?.sessionStorage,n)}function ff(e=null,t={}){let{document:n=zd,restoreOnUnmount:r=e=>e}=t,i=n?.title??``,a=wd(e??n?.title??null),o=!!(e&&typeof e==`function`);function s(e){if(!(`titleTemplate`in t))return e;let n=t.titleTemplate||`%s`;return typeof n==`function`?n(e):_n(n).replace(/%s/g,e)}return B(a,(e,t)=>{e!==t&&n&&(n.title=s(e??``))},{immediate:!0}),t.observe&&!t.titleTemplate&&n&&!o&&Wd(n.head?.querySelector(`title`),()=>{n&&n.title!==a.value&&(a.value=s(n.title))},{childList:!0}),gd(()=>{if(r){let e=r(i,a.value||``);e!=null&&n&&(n.title=e)}}),a}function pf(e={}){let{window:t=Rd,initialWidth:n=1/0,initialHeight:r=1/0,listenOrientation:i=!0,includeScrollbar:a=!0,type:o=`inner`}=e,s=mn(n),c=mn(r),l=()=>{if(t)if(o===`outer`)s.value=t.outerWidth,c.value=t.outerHeight;else if(o===`visual`&&t.visualViewport){let{width:e,height:n,scale:r}=t.visualViewport;s.value=Math.round(e*r),c.value=Math.round(n*r)}else a?(s.value=t.innerWidth,c.value=t.innerHeight):(s.value=t.document.documentElement.clientWidth,c.value=t.document.documentElement.clientHeight)};l(),Pd(l);let u={passive:!0};return Vd(`resize`,l,u),t&&o===`visual`&&t.visualViewport&&Vd(t.visualViewport,`resize`,l,u),i&&B(qd(`(orientation: portrait)`),()=>l()),{width:s,height:c}}function X(e,t,n,r){return nf(e,t,n,{writeDefaults:!1,...r})}function mf(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M10.5 6h9.75M10.5 6a1.5 1.5 0 1 1-3 0m3 0a1.5 1.5 0 1 0-3 0M3.75 6H7.5m3 12h9.75m-9.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-3.75 0H7.5m9-6h3.75m-3.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-9.75 0h9.75`})])}function hf(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`m9 12.75 3 3m0 0 3-3m-3 3v-7.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z`})])}function gf(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5M16.5 12 12 16.5m0 0L7.5 12m4.5 4.5V3`})])}function _f(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M19.5 13.5 12 21m0 0-7.5-7.5M12 21V3`})])}function vf(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`m11.25 9-3 3m0 0 3 3m-3-3h7.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z`})])}function yf(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M10.5 19.5 3 12m0 0 7.5-7.5M3 12h18`})])}function bf(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M19.5 12c0-1.232-.046-2.453-.138-3.662a4.006 4.006 0 0 0-3.7-3.7 48.678 48.678 0 0 0-7.324 0 4.006 4.006 0 0 0-3.7 3.7c-.017.22-.032.441-.046.662M19.5 12l3-3m-3 3-3-3m-12 3c0 1.232.046 2.453.138 3.662a4.006 4.006 0 0 0 3.7 3.7 48.656 48.656 0 0 0 7.324 0 4.006 4.006 0 0 0 3.7-3.7c.017-.22.032-.441.046-.662M4.5 12l3 3m-3-3-3 3`})])}function xf(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99`})])}function Sf(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`m12.75 15 3-3m0 0-3-3m3 3h-7.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z`})])}function Cf(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`m15 11.25-3-3m0 0-3 3m3-3v7.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z`})])}function wf(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5m-13.5-9L12 3m0 0 4.5 4.5M12 3v13.5`})])}function Tf(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M4.5 10.5 12 3m0 0 7.5 7.5M12 3v18`})])}function Ef(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M9 9V4.5M9 9H4.5M9 9 3.75 3.75M9 15v4.5M9 15H4.5M9 15l-5.25 5.25M15 9h4.5M15 9V4.5M15 9l5.25-5.25M15 15h4.5M15 15v4.5m0-4.5 5.25 5.25`})])}function Df(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15`})])}function Of(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M7.5 21 3 16.5m0 0L7.5 12M3 16.5h13.5m0-13.5L21 7.5m0 0L16.5 12M21 7.5H7.5`})])}function kf(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M3.75 9h16.5m-16.5 6.75h16.5`})])}function Af(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5`})])}function jf(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M3 4.5h14.25M3 9h9.75M3 13.5h9.75m4.5-4.5v12m0 0-3.75-3.75M17.25 21 21 17.25`})])}function Mf(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M3 4.5h14.25M3 9h9.75M3 13.5h5.25m5.25-.75L17.25 9m0 0L21 12.75M17.25 9v12`})])}function Nf(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`m3.75 13.5 10.5-11.25L12 10.5h8.25L9.75 21.75 12 13.5H3.75Z`})])}function Pf(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 0 1 3 19.875v-6.75ZM9.75 8.625c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V8.625ZM16.5 4.125c0-.621.504-1.125 1.125-1.125h2.25C20.496 3 21 3.504 21 4.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V4.125Z`})])}function Ff(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z`})])}function If(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`m4.5 12.75 6 6 9-13.5`})])}function Lf(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`m19.5 8.25-7.5 7.5-7.5-7.5`})])}function Rf(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M15.75 19.5 8.25 12l7.5-7.5`})])}function zf(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`m8.25 4.5 7.5 7.5-7.5 7.5`})])}function Bf(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M8.25 15 12 18.75 15.75 15m-7.5-6L12 5.25 15.75 9`})])}function Vf(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`m4.5 15.75 7.5-7.5 7.5 7.5`})])}function Hf(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M20.25 6.375c0 2.278-3.694 4.125-8.25 4.125S3.75 8.653 3.75 6.375m16.5 0c0-2.278-3.694-4.125-8.25-4.125S3.75 4.097 3.75 6.375m16.5 0v11.25c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125V6.375m16.5 0v3.75m-16.5-3.75v3.75m16.5 0v3.75C20.25 16.153 16.556 18 12 18s-8.25-1.847-8.25-4.125v-3.75m16.5 0c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125`})])}function Uf(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z`}),G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z`})])}function Wf(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M8.25 3v1.5M4.5 8.25H3m18 0h-1.5M4.5 12H3m18 0h-1.5m-15 3.75H3m18 0h-1.5M8.25 19.5V21M12 3v1.5m0 15V21m3.75-18v1.5m0 15V21m-9-1.5h10.5a2.25 2.25 0 0 0 2.25-2.25V6.75a2.25 2.25 0 0 0-2.25-2.25H6.75A2.25 2.25 0 0 0 4.5 6.75v10.5a2.25 2.25 0 0 0 2.25 2.25Zm.75-12h9v9h-9v-9Z`})])}function Gf(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`m21 7.5-2.25-1.313M21 7.5v2.25m0-2.25-2.25 1.313M3 7.5l2.25-1.313M3 7.5l2.25 1.313M3 7.5v2.25m9 3 2.25-1.313M12 12.75l-2.25-1.313M12 12.75V15m0 6.75 2.25-1.313M12 21.75V19.5m0 2.25-2.25-1.313m0-16.875L12 2.25l2.25 1.313M21 14.25v2.25l-2.25 1.313m-13.5 0L3 16.5v-2.25`})])}function Kf(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z`})])}function qf(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z`})])}function Jf(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M3.98 8.223A10.477 10.477 0 0 0 1.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.451 10.451 0 0 1 12 4.5c4.756 0 8.773 3.162 10.065 7.498a10.522 10.522 0 0 1-4.293 5.774M6.228 6.228 3 3m3.228 3.228 3.65 3.65m7.894 7.894L21 21m-3.228-3.228-3.65-3.65m0 0a3 3 0 1 0-4.243-4.243m4.242 4.242L9.88 9.88`})])}function Yf(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z`}),G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z`})])}function Xf(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M3.75 9.776c.112-.017.227-.026.344-.026h15.812c.117 0 .232.009.344.026m-16.5 0a2.25 2.25 0 0 0-1.883 2.542l.857 6a2.25 2.25 0 0 0 2.227 1.932H19.05a2.25 2.25 0 0 0 2.227-1.932l.857-6a2.25 2.25 0 0 0-1.883-2.542m-16.5 0V6A2.25 2.25 0 0 1 6 3.75h3.879a1.5 1.5 0 0 1 1.06.44l2.122 2.12a1.5 1.5 0 0 0 1.06.44H18A2.25 2.25 0 0 1 20.25 9v.776`})])}function Zf(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M2.25 12.75V12A2.25 2.25 0 0 1 4.5 9.75h15A2.25 2.25 0 0 1 21.75 12v.75m-8.69-6.44-2.12-2.12a1.5 1.5 0 0 0-1.061-.44H4.5A2.25 2.25 0 0 0 2.25 6v12a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18V9a2.25 2.25 0 0 0-2.25-2.25h-5.379a1.5 1.5 0 0 1-1.06-.44Z`})])}function Qf(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M12 3c2.755 0 5.455.232 8.083.678.533.09.917.556.917 1.096v1.044a2.25 2.25 0 0 1-.659 1.591l-5.432 5.432a2.25 2.25 0 0 0-.659 1.591v2.927a2.25 2.25 0 0 1-1.244 2.013L9.75 21v-6.568a2.25 2.25 0 0 0-.659-1.591L3.659 7.409A2.25 2.25 0 0 1 3 5.818V4.774c0-.54.384-1.006.917-1.096A48.32 48.32 0 0 1 12 3Z`})])}function $f(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M12 21a9.004 9.004 0 0 0 8.716-6.747M12 21a9.004 9.004 0 0 1-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 0 1 7.843 4.582M12 3a8.997 8.997 0 0 0-7.843 4.582m15.686 0A11.953 11.953 0 0 1 12 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0 1 21 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0 1 12 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 0 1 3 12c0-1.605.42-3.113 1.157-4.418`})])}function ep(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`m2.25 12 8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25`})])}function eee(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M2.25 13.5h3.86a2.25 2.25 0 0 1 2.012 1.244l.256.512a2.25 2.25 0 0 0 2.013 1.244h3.218a2.25 2.25 0 0 0 2.013-1.244l.256-.512a2.25 2.25 0 0 1 2.013-1.244h3.859m-19.5.338V18a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18v-4.162c0-.224-.034-.447-.1-.661L19.24 5.338a2.25 2.25 0 0 0-2.15-1.588H6.911a2.25 2.25 0 0 0-2.15 1.588L2.35 13.177a2.25 2.25 0 0 0-.1.661Z`})])}function tee(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z`})])}function tp(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M13.181 8.68a4.503 4.503 0 0 1 1.903 6.405m-9.768-2.782L3.56 14.06a4.5 4.5 0 0 0 6.364 6.365l3.129-3.129m5.614-5.615 1.757-1.757a4.5 4.5 0 0 0-6.364-6.365l-4.5 4.5c-.258.26-.479.541-.661.84m1.903 6.405a4.495 4.495 0 0 1-1.242-.88 4.483 4.483 0 0 1-1.062-1.683m6.587 2.345 5.907 5.907m-5.907-5.907L8.898 8.898M2.991 2.99 8.898 8.9`})])}function np(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.622 1.757-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244`})])}function rp(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M16.5 10.5V6.75a4.5 4.5 0 1 0-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 0 0 2.25-2.25v-6.75a2.25 2.25 0 0 0-2.25-2.25H6.75a2.25 2.25 0 0 0-2.25 2.25v6.75a2.25 2.25 0 0 0 2.25 2.25Z`})])}function ip(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M13.5 10.5V6.75a4.5 4.5 0 1 1 9 0v3.75M3.75 21.75h10.5a2.25 2.25 0 0 0 2.25-2.25v-6.75a2.25 2.25 0 0 0-2.25-2.25H3.75a2.25 2.25 0 0 0-2.25 2.25v6.75a2.25 2.25 0 0 0 2.25 2.25Z`})])}function ap(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607ZM13.5 10.5h-6`})])}function op(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607ZM10.5 7.5v6m3-3h-6`})])}function sp(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z`})])}function cp(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M15 10.5a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z`}),G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M19.5 10.5c0 7.142-7.5 11.25-7.5 11.25S4.5 17.642 4.5 10.5a7.5 7.5 0 1 1 15 0Z`})])}function lp(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M18.364 18.364A9 9 0 0 0 5.636 5.636m12.728 12.728A9 9 0 0 1 5.636 5.636m12.728 12.728L5.636 5.636`})])}function up(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M14.25 9v6m-4.5 0V9M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z`})])}function dp(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M15.75 5.25v13.5m-7.5-13.5v13.5`})])}function fp(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L10.582 16.07a4.5 4.5 0 0 1-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 0 1 1.13-1.897l8.932-8.931Zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0 1 15.75 21H5.25A2.25 2.25 0 0 1 3 18.75V8.25A2.25 2.25 0 0 1 5.25 6H10`})])}function nee(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`m2.25 15.75 5.159-5.159a2.25 2.25 0 0 1 3.182 0l5.159 5.159m-1.5-1.5 1.409-1.409a2.25 2.25 0 0 1 3.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 0 0 1.5-1.5V6a1.5 1.5 0 0 0-1.5-1.5H3.75A1.5 1.5 0 0 0 2.25 6v12a1.5 1.5 0 0 0 1.5 1.5Zm10.5-11.25h.008v.008h-.008V8.25Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z`})])}function pp(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z`}),G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M15.91 11.672a.375.375 0 0 1 0 .656l-5.603 3.113a.375.375 0 0 1-.557-.328V8.887c0-.286.307-.466.557-.327l5.603 3.112Z`})])}function mp(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M5.25 5.653c0-.856.917-1.398 1.667-.986l11.54 6.347a1.125 1.125 0 0 1 0 1.972l-11.54 6.347a1.125 1.125 0 0 1-1.667-.986V5.653Z`})])}function hp(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M12 4.5v15m7.5-7.5h-15`})])}function gp(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 5.25h.008v.008H12v-.008Z`})])}function ree(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M2.25 7.125C2.25 6.504 2.754 6 3.375 6h6c.621 0 1.125.504 1.125 1.125v3.75c0 .621-.504 1.125-1.125 1.125h-6a1.125 1.125 0 0 1-1.125-1.125v-3.75ZM14.25 8.625c0-.621.504-1.125 1.125-1.125h5.25c.621 0 1.125.504 1.125 1.125v8.25c0 .621-.504 1.125-1.125 1.125h-5.25a1.125 1.125 0 0 1-1.125-1.125v-8.25ZM3.75 16.125c0-.621.504-1.125 1.125-1.125h5.25c.621 0 1.125.504 1.125 1.125v2.25c0 .621-.504 1.125-1.125 1.125h-5.25a1.125 1.125 0 0 1-1.125-1.125v-2.25Z`})])}function _p(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M21.75 17.25v-.228a4.5 4.5 0 0 0-.12-1.03l-2.268-9.64a3.375 3.375 0 0 0-3.285-2.602H7.923a3.375 3.375 0 0 0-3.285 2.602l-2.268 9.64a4.5 4.5 0 0 0-.12 1.03v.228m19.5 0a3 3 0 0 1-3 3H5.25a3 3 0 0 1-3-3m19.5 0a3 3 0 0 0-3-3H5.25a3 3 0 0 0-3 3m16.5 0h.008v.008h-.008v-.008Zm-3 0h.008v.008h-.008v-.008Z`})])}function iee(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M3.75 6A2.25 2.25 0 0 1 6 3.75h2.25A2.25 2.25 0 0 1 10.5 6v2.25a2.25 2.25 0 0 1-2.25 2.25H6a2.25 2.25 0 0 1-2.25-2.25V6ZM3.75 15.75A2.25 2.25 0 0 1 6 13.5h2.25a2.25 2.25 0 0 1 2.25 2.25V18a2.25 2.25 0 0 1-2.25 2.25H6A2.25 2.25 0 0 1 3.75 18v-2.25ZM13.5 6a2.25 2.25 0 0 1 2.25-2.25H18A2.25 2.25 0 0 1 20.25 6v2.25A2.25 2.25 0 0 1 18 10.5h-2.25a2.25 2.25 0 0 1-2.25-2.25V6ZM13.5 15.75a2.25 2.25 0 0 1 2.25-2.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-2.25A2.25 2.25 0 0 1 13.5 18v-2.25Z`})])}function aee(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M4.098 19.902a3.75 3.75 0 0 0 5.304 0l6.401-6.402M6.75 21A3.75 3.75 0 0 1 3 17.25V4.125C3 3.504 3.504 3 4.125 3h5.25c.621 0 1.125.504 1.125 1.125v4.072M6.75 21a3.75 3.75 0 0 0 3.75-3.75V8.197M6.75 21h13.125c.621 0 1.125-.504 1.125-1.125v-5.25c0-.621-.504-1.125-1.125-1.125h-4.072M10.5 8.197l2.88-2.88c.438-.439 1.15-.439 1.59 0l3.712 3.713c.44.44.44 1.152 0 1.59l-2.879 2.88M6.75 17.25h.008v.008H6.75v-.008Z`})])}function oee(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M9.568 3H5.25A2.25 2.25 0 0 0 3 5.25v4.318c0 .597.237 1.17.659 1.591l9.581 9.581c.699.699 1.78.872 2.607.33a18.095 18.095 0 0 0 5.223-5.223c.542-.827.369-1.908-.33-2.607L11.16 3.66A2.25 2.25 0 0 0 9.568 3Z`}),G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M6 6h.008v.008H6V6Z`})])}function vp(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0`})])}function yp(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M11.42 15.17 17.25 21A2.652 2.652 0 0 0 21 17.25l-5.877-5.877M11.42 15.17l2.496-3.03c.317-.384.74-.626 1.208-.766M11.42 15.17l-4.655 5.653a2.548 2.548 0 1 1-3.586-3.586l6.837-5.63m5.108-.233c.55-.164 1.163-.188 1.743-.14a4.5 4.5 0 0 0 4.486-6.336l-3.276 3.277a3.004 3.004 0 0 1-2.25-2.25l3.276-3.276a4.5 4.5 0 0 0-6.336 4.486c.091 1.076-.071 2.264-.904 2.95l-.102.085m-1.745 1.437L5.909 7.5H4.5L2.25 3.75l1.5-1.5L7.5 4.5v1.409l4.26 4.26m-1.745 1.437 1.745-1.437m6.615 8.206L15.75 15.75M4.867 19.125h.008v.008h-.008v-.008Z`})])}function bp(e,t){return H(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[G(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M6 18 18 6M6 6l12 12`})])}var see=/Mac|iPod|iPhone|iPad/.test(navigator.platform),xp=`GLOBAL`,cee=`https://www.gstatic.com/generate_204`,Sp=`https://ipv6.google.com/generate_204`,Cp=function(e){return e.EN_US=`en-US`,e.ZH_CN=`zh-CN`,e.ZH_TW=`zh-TW`,e.RU_RU=`ru-RU`,e}({}),wp=function(e){return e.MI_SANS=`MiSans`,e.SARASA_UI=`SarasaUi`,e.PING_FANG=`PingFang`,e.FIRA_SANS=`FiraSans`,e.SYSTEM_UI=`SystemUI`,e}({}),Tp=function(e){return e.TWEMOJI=`twemoji`,e.NOTO_COLOR_EMOJI=`noto-color-emoji`,e}({}),Z=function(e){return e.Close=`close`,e.Type=`type`,e.Process=`process`,e.Host=`host`,e.Rule=`rule`,e.Chains=`chains`,e.Outbound=`outbound`,e.DlSpeed=`dlSpeed`,e.UlSpeed=`ulSpeed`,e.Download=`dl`,e.Upload=`ul`,e.ConnectTime=`connectTime`,e.SourceIP=`sourceIP`,e.SourcePort=`sourcePort`,e.SniffHost=`sniffHost`,e.Destination=`destination`,e.DestinationType=`destinationType`,e.GeoIP=`geoip`,e.RemoteAddress=`remoteAddress`,e.InboundUser=`inboundUser`,e}({}),Ep=Object.values(Z).filter(e=>e!==`close`),Dp=[`type`,`process`,`host`,`sniffHost`,`rule`,`chains`,`outbound`,`sourceIP`,`sourcePort`,`destination`,`destinationType`,`geoip`,`remoteAddress`,`inboundUser`],lee=e=>Dp.includes(e),Op=function(e){return e.AUTO=`auto`,e.MANUAL=`manual`,e}({}),kp=function(e){return e.DEFAULT=`defaultsort`,e.NAME_ASC=`nameasc`,e.NAME_DESC=`namedesc`,e.LATENCY_ASC=`latencyasc`,e.LATENCY_DESC=`latencydesc`,e}({}),Ap=function(e){return e.AUTO=`auto`,e.DOTS=`dots`,e.BAR=`bar`,e}({}),jp=function(e){return e.GLOBAL=`global`,e.GROUP=`group`,e}({}),Mp=function(e){return e.CORE=`core`,e.DASHBOARD=`dashboard`,e}({}),Np=function(e){return e.AUTO=`auto`,e.ON=`on`,e.OFF=`off`,e}({}),Pp=function(e){return e.AUTO=`auto`,e.CARD=`card`,e.TABLE=`table`,e}({}),Fp=function(e){return e.CARD=`card`,e.TABLE=`table`,e}({}),Ip=function(e){return e.RULES=`rules`,e.PROVIDER=`ruleProvider`,e}({}),Lp=function(e){return e.PROXIES=`proxies`,e.PROVIDER=`proxyProvider`,e}({}),Rp=function(e){return e.HOST=`host`,e.CHAINS=`chains`,e.RULE=`rule`,e.TYPE=`type`,e.CONNECT_TIME=`connectTime`,e.DOWNLOAD=`download`,e.DOWNLOAD_SPEED=`downloadSpeed`,e.UPLOAD=`upload`,e.UPLOAD_SPEED=`uploadSpeed`,e.SOURCE_IP=`sourceIP`,e.INBOUND_USER=`inboundUser`,e}({}),zp=function(e){return e.ASC=`asc`,e.DESC=`desc`,e}({}),Bp={host:`text`,chains:`text`,rule:`text`,type:`text`,sourceIP:`text`,inboundUser:`text`,connectTime:`time`,download:`number`,downloadSpeed:`number`,upload:`number`,uploadSpeed:`number`},uee=e=>Bp[e]===`text`?`asc`:`desc`,dee={text:{asc:`sortAToZ`,desc:`sortZToA`},number:{asc:`sortSmallestFirst`,desc:`sortLargestFirst`},time:{asc:`sortOldestFirst`,desc:`sortNewestFirst`}},fee=[{labelKey:`basic`,types:[`host`,`type`,`rule`,`chains`,`connectTime`]},{labelKey:`traffic`,types:[`downloadSpeed`,`uploadSpeed`,`download`,`upload`]},{labelKey:`sourceAndDestination`,types:[`sourceIP`,`inboundUser`]}],Vp=function(e){return e.ACTIVE=`activeConnections`,e.CLOSED=`closedConnections`,e.ALL=`allConnections`,e}({}),Hp=function(e){return e.Trace=`trace`,e.Debug=`debug`,e.Info=`info`,e.Warning=`warning`,e.Error=`error`,e.Fatal=`fatal`,e.Panic=`panic`,e.Silent=`silent`,e}({}),pee=function(e){return e.gVisor=`gVisor`,e.System=`System`,e.Mixed=`Mixed`,e.Mips=`Mips`,e}({}),Up=function(e){return e.overview=`overview`,e.proxies=`proxies`,e.connections=`connections`,e.logs=`logs`,e.rules=`rules`,e.settings=`settings`,e.setup=`setup`,e}({}),Wp={overview:Pf,proxies:$f,connections:Of,rules:aee,logs:Kf,settings:Uf,setup:Gf},Gp=function(e){return e.SMALL=`small`,e.LARGE=`large`,e}({}),Kp=function(e){return e.SMALL=`small`,e.LARGE=`large`,e}({}),qp=function(e){return e[e.SMALL=130]=`SMALL`,e[e.LARGE=145]=`LARGE`,e}({}),Jp=function(e){return e.NORMAL=`normal`,e.REVERSE=`reverse`,e}({}),Yp=function(e){return e.Direct=`direct`,e.Reject=`reject`,e.RejectDrop=`rejectdrop`,e.Block=`block`,e.Compatible=`compatible`,e.Pass=`pass`,e.PassRule=`passrule`,e.Rematch=`rematch`,e.Dns=`dns`,e.Relay=`relay`,e.Selector=`selector`,e.Fallback=`fallback`,e.URLTest=`urltest`,e.Smart=`smart`,e.LoadBalance=`loadbalance`,e}({}),mee=[[`host`,`connectTime`],[`chains`,`dlSpeed`,`close`]],Xp=[[`host`,`connectTime`],[`type`,`dl`,`ul`],[`chains`,`dlSpeed`,`close`]],Zp=[`light`,`dark`,`light-neutral`,`dark-neutral`,...window.ksu?[`light-monet`,`dark-monet`]:[],`halloween`,`forest`,`dracula`,`night`,`dim`,`nord`,`sunset`,`abyss`,`cupcake`,`dark-daisyui5`],Qp={name:`custom`,id:``,"--border":`1px`,"--color-base-100":`#ffffff`,"--color-base-200":`#fcfcfc`,"--color-base-300":`#f2f2f2`,"--color-base-content":`#2d2d33`,"--color-primary":`#5a3cd2`,"--color-primary-content":`#f3efff`,"--color-secondary":`#ea4c5a`,"--color-secondary-content":`#fff1f2`,"--color-accent":`#49c6c1`,"--color-accent-content":`#285e66`,"--color-neutral":`#1e1e1f`,"--color-neutral-content":`#ececec`,"--color-info":`#5b90ff`,"--color-info-content":`#273c66`,"--color-success":`#44c07a`,"--color-success-content":`#1d472f`,"--color-warning":`#e5a300`,"--color-warning-content":`#705322`,"--color-error":`#d13a30`,"--color-error-content":`#551d1d`,"--depth":`0`,"--noise":`0`,"--radius-box":`1rem`,"--radius-field":`0.5rem`,"--radius-selector":`1rem`,"--size-field":`0.25rem`,"--size-selector":`0.25rem`,"color-scheme":`dark`,default:!1,prefersdark:!1},$p=function(e){return e.IPIP=`ipip.net`,e.IPSB=`ip.sb`,e.IPWHOIS=`ipwho.is`,e.IPAPI=`ipapi.is`,e}({}),hee=`https://testingcf.jsdelivr.net/gh/P3TERX/GeoLite.mmdb@download/GeoLite2-Country.mmdb`,gee=`https://testingcf.jsdelivr.net/gh/P3TERX/GeoLite.mmdb@download/GeoLite2-ASN.mmdb`,em=function(e){return e.general=`generalSettings`,e.backend=`backendSettings`,e.proxies=`proxySettings`,e.connections=`connectionSettings`,e.overview=`overviewSettings`,e}({}),tm=function(e){return e.ChartsCard=`ChartsCard`,e.NetworkCard=`NetworkCard`,e.ProviderTrafficOverview=`ProviderTrafficOverview`,e.TopologyCharts=`TopologyCharts`,e.EarthGlobeCard=`EarthGlobeCard`,e.ConnectionHistory=`ConnectionHistory`,e.RuleHitCountCard=`RuleHitCountCard`,e.HonkStatsCard=`HonkStatsCard`,e}({}),nm=function(e){return e.Meta=`meta`,e.Alpha=`alpha`,e.Smart=`smart`,e}({}),rm={meta:{url:`https://github.com/metacubex/mihomo`,check_update_url:`https://api.github.com/repos/MetaCubeX/mihomo/releases/latest`},alpha:{url:`https://github.com/metacubex/mihomo`,check_update_url:`https://api.github.com/repos/MetaCubeX/mihomo/releases/tags/Prerelease-Alpha`},smart:{url:`https://github.com/vernesong/mihomo`,check_update_url:`https://api.github.com/repos/vernesong/mihomo/releases/tags/Prerelease-Alpha`}},im=[em.backend,em.general,em.overview,em.proxies,em.connections],am={[em.general]:`settingsMenuGeneral`,[em.backend]:`settingsMenuBackend`,[em.proxies]:`settingsMenuProxies`,[em.connections]:`settingsMenuConnections`,[em.overview]:`settingsMenuOverview`},om=[{key:em.backend,label:`backendSettings`,description:`settingsDescriptionBackend`,icon:_p,items:[{key:`${em.backend}.backendSwitch`,label:`backend`,section:`settingsSectionCurrentBackend`},{key:`${em.backend}.upgradeCore`,label:`upgradeCore`,section:`settingsSectionCoreOperations`},{key:`${em.backend}.restartCore`,label:`restartCore`,section:`settingsSectionCoreOperations`},{key:`${em.backend}.reloadConfigs`,label:`reloadConfigs`,section:`settingsSectionCoreOperations`},{key:`${em.backend}.updateConfigs`,label:`updateConfigs`,section:`settingsSectionCoreOperations`},{key:`${em.backend}.updateGeoDatabase`,label:`updateGeoDatabase`,section:`settingsSectionCoreOperations`},{key:`${em.backend}.flushDNSCache`,label:`flushDNSCache`,section:`settingsSectionCoreOperations`},{key:`${em.backend}.flushFakeIP`,label:`flushFakeIP`,section:`settingsSectionCoreOperations`},{key:`${em.backend}.flushSmartWeights`,label:`flushSmartWeights`,section:`settingsSectionCoreOperations`},{key:`${em.backend}.dnsQuery`,label:`DNSQuery`,section:`settingsSectionDiagnostics`,keywords:[`dns`]},{key:`${em.backend}.ports`,label:`ports`,section:`settingsSectionNetworkListening`},{key:`${em.backend}.tunMode`,label:`tunMode`,section:`settingsSectionNetworkListening`},{key:`${em.backend}.tunStack`,label:`tunStack`,section:`settingsSectionNetworkListening`,keywords:[`tun`,`stack`,`gvisor`,`system`,`mixed`,`mips`]},{key:`${em.backend}.allowLan`,label:`allowLan`,section:`settingsSectionNetworkListening`},{key:`${em.backend}.checkCoreUpgrade`,label:`checkCoreUpgrade`,section:`settingsSectionCoreUpdates`},{key:`${em.backend}.autoUpgradeCore`,label:`autoUpgradeCore`,section:`settingsSectionCoreUpdates`}]},{key:em.general,label:`zashboardSettings`,description:`settingsDescriptionGeneral`,icon:ep,items:[{key:`${em.general}.zashboardSettings.actions`,label:`actions`,section:`settingsSectionApplication`,searchEntries:[{anchorKey:`${em.general}.zashboardSettings.actions.upgradeDashboard`,label:`upgradeDashboard`},{anchorKey:`${em.general}.zashboardSettings.actions`,label:`dashboardSettings`}]},{key:`${em.general}.zashboardSettings.autoSwitchTheme`,label:`autoSwitchTheme`,section:`appearance`},{key:`${em.general}.zashboardSettings.defaultTheme`,label:`defaultTheme`,section:`appearance`},{key:`${em.general}.zashboardSettings.darkTheme`,label:`darkTheme`,section:`appearance`},{key:`${em.general}.zashboardSettings.customBackgroundURL`,label:`customBackgroundURL`,section:`appearance`},{key:`${em.general}.zashboardSettings.transparent`,label:`transparent`,section:`appearance`},{key:`${em.general}.zashboardSettings.blurIntensity`,label:`blurIntensity`,section:`appearance`},{key:`${em.general}.zashboardSettings.fonts`,label:`fonts`,section:`appearance`},{key:`${em.general}.zashboardSettings.emoji`,label:`emoji`,section:`appearance`},{key:`${em.general}.zashboardSettings.customCSS`,label:`customCSS`,section:`appearance`,keywords:[`css`,`style`]},{key:`${em.general}.zashboardSettings.language`,label:`language`,section:`settingsSectionApplication`},{key:`${em.general}.zashboardSettings.autoUpgradeDashboard`,label:`autoUpgradeDashboard`,section:`settingsSectionApplication`},{key:`${em.general}.autoDisconnectIdleUDP`,label:`autoDisconnectIdleUDP`,section:`settingsSectionNetworkData`},{key:`${em.general}.autoDisconnectIdleUDPTime`,label:`autoDisconnectIdleUDPTime`,section:`settingsSectionNetworkData`},{key:`${em.general}.IPInfoAPI`,label:`IPInfoAPI`,section:`settingsSectionNetworkData`},{key:`${em.general}.geoipCountryDatabaseURL`,label:`geoipCountryDatabaseURL`,section:`settingsSectionNetworkData`},{key:`${em.general}.geoipASNDatabaseURL`,label:`geoipASNDatabaseURL`,section:`settingsSectionNetworkData`},{key:`${em.general}.scrollAnimationEffect`,label:`scrollAnimationEffect`,section:`settingsSectionInteraction`},{key:`${em.general}.swipeInPages`,label:`swipeInPages`,section:`settingsSectionInteraction`},{key:`${em.general}.swipeInTabs`,label:`swipeInTabs`,section:`settingsSectionInteraction`},{key:`${em.general}.disablePullToRefresh`,label:`disablePullToRefresh`,section:`settingsSectionInteraction`},{key:`${em.general}.shortcuts`,label:`keyboardShortcuts`,section:`settingsSectionInteraction`},{key:`${em.general}.displayAllFeatures`,label:`displayAllFeatures`,section:`settingsSectionInteraction`}]},{key:em.overview,label:`overviewSettings`,description:`settingsDescriptionOverview`,icon:Wp[Up.overview],items:[{key:`${em.overview}.splitOverviewPage`,label:`splitOverviewPage`,section:`settingsSectionCardsLayout`},{key:`${em.overview}.autoIPCheckWhenStart`,label:`autoIPCheckWhenStart`,section:`settingsSectionStartupChecks`},{key:`${em.overview}.autoConnectionCheckWhenStart`,label:`autoConnectionCheckWhenStart`,section:`settingsSectionStartupChecks`},{key:`${em.overview}.showStatisticsWhenSidebarCollapsed`,label:`showStatisticsWhenSidebarCollapsed`,section:`settingsSectionDesktopSidebar`},{key:`${em.overview}.numberOfChartsInSidebar`,label:`numberOfChartsInSidebar`,section:`settingsSectionDesktopSidebar`}]},{key:em.proxies,label:`proxySettings`,description:`settingsDescriptionProxies`,icon:Wp[Up.proxies],items:[{key:`${em.proxies}.speedtestMode`,label:`speedtestMode`,section:`latency`},{key:`${em.proxies}.speedtestUrl`,label:`speedtestUrl`,section:`latency`},{key:`${em.proxies}.speedtestTimeout`,label:`speedtestTimeout`,section:`latency`},{key:`${em.proxies}.lowLatency`,label:`lowLatencyDesc`,section:`latency`},{key:`${em.proxies}.mediumLatency`,label:`mediumLatencyDesc`,section:`latency`},{key:`${em.proxies}.ipv6Test`,label:`ipv6Test`,section:`latency`},{key:`${em.proxies}.independentLatencyTest`,label:`independentLatencyTest`,section:`latency`},{key:`${em.proxies}.groupTestUrls`,label:`groupTestUrls`,section:`latency`},{key:`${em.proxies}.proxyFolderMode`,label:`proxyFolderMode`,section:`settingsSectionProxyDisplay`},{key:`${em.proxies}.twoColumnProxyGroup`,label:`twoColumnProxyGroup`,section:`settingsSectionProxyDisplay`},{key:`${em.proxies}.truncateProxyName`,label:`truncateProxyName`,section:`settingsSectionProxyDisplay`},{key:`${em.proxies}.displayGlobalByMode`,label:`displayGlobalByMode`,section:`settingsSectionProxyDisplay`},{key:`${em.proxies}.proxyPreviewType`,label:`proxyPreviewType`,section:`settingsSectionProxyDisplay`},{key:`${em.proxies}.proxyCardSize`,label:`proxyCardSize`,section:`settingsSectionProxyDisplay`},{key:`${em.proxies}.proxyGroupIconSize`,label:`proxyGroupIconSize`,section:`settingsSectionProxyAdvanced`},{key:`${em.proxies}.proxyGroupIconMargin`,label:`proxyGroupIconMargin`,section:`settingsSectionProxyAdvanced`},{key:`${em.proxies}.iconSettings`,label:`icon`,section:`settingsSectionProxyAdvanced`}]},{key:em.connections,label:`connectionSettings`,description:`settingsDescriptionConnections`,icon:Wp[Up.connections],items:[{key:`${em.connections}.connectionStyle`,label:`connectionStyle`,section:`settingsSectionConnectionDisplay`},{key:`${em.connections}.proxyChainDirection`,label:`proxyChainDirection`,section:`settingsSectionConnectionDisplay`},{key:`${em.connections}.tableWidthMode`,label:`tableWidthMode`,section:`settingsSectionConnectionDisplay`},{key:`${em.connections}.tableSize`,label:`tableSize`,section:`settingsSectionConnectionDisplay`},{key:`${em.connections}.resolveClientHostname`,label:`resolveClientHostname`,section:`settingsSectionClientIdentity`},{key:`${em.connections}.sourceIPLabels`,label:`sourceIPLabels`,section:`settingsSectionClientIdentity`}]}];function _ee(e){let t=om.find(t=>t.key===e);return t?[t.key,...t.items.map(e=>e.key)]:[]}function vee(){return om.flatMap(e=>_ee(e.key))}var sm=um(em.general),yee=um(em.overview),cm=um(em.backend),lm=um(em.proxies),bee=um(em.connections);function um(e){let t=om.find(t=>t.key===e);return Object.fromEntries((t?.items??[]).map(e=>[e.label,e.key]))}var dm=s(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs=r()})(e,(function(){var e=1e3,t=6e4,n=36e5,r=`millisecond`,i=`second`,a=`minute`,o=`hour`,s=`day`,c=`week`,l=`month`,u=`quarter`,d=`year`,f=`date`,p=`Invalid Date`,m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:`en`,weekdays:`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),months:`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),ordinal:function(e){var t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}},_=function(e,t,n){var r=String(e);return!r||r.length>=t?e:``+Array(t+1-r.length).join(n)+e},v={s:_,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?`+`:`-`)+_(r,2,`0`)+`:`+_(i,2,`0`)},m:function e(t,n){if(t.date()1)return e(o[0])}else{var s=t.name;b[s]=t,i=s}return!r&&i&&(y=i),i||!r&&y},w=function(e,t){if(S(e))return e.clone();var n=typeof t==`object`?t:{};return n.date=e,n.args=arguments,new E(n)},T=v;T.l=C,T.i=S,T.w=function(e,t){return w(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function g(e){this.$L=C(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var _=g.prototype;return _.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(t===null)return new Date(NaN);if(T.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t==`string`&&!/Z$/i.test(t)){var r=t.match(m);if(r){var i=r[2]-1||0,a=(r[7]||`0`).substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},_.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},_.$utils=function(){return T},_.isValid=function(){return this.$d.toString()!==p},_.isSame=function(e,t){var n=w(e);return this.startOf(t)<=n&&n<=this.endOf(t)},_.isAfter=function(e,t){return w(e){let r=e;return typeof t==`string`||Array.isArray(t)?r=e.toLocaleString(t,n):(t===!0||n!==void 0)&&(r=e.toLocaleString(void 0,n)),r},gm=e=>{if(typeof e==`number`)return Math.log10(e);let t=e.toString(10);return t.length+Math.log10(`0.${t.slice(0,15)}`)},Cee=e=>typeof e==`number`?Math.log(e):gm(e)*Math.log(10),wee=(e,t)=>{if(typeof e==`number`)return e/t;let n=e/BigInt(t),r=e%BigInt(t);return Number(n)+Number(r)/t},_m=(e,t)=>{if(t===void 0)return e;if(typeof t!=`number`||!Number.isSafeInteger(t)||t<0)throw TypeError(`Expected fixedWidth to be a non-negative integer, got ${typeof t}: ${t}`);return t===0?e:e.length{let{minimumFractionDigits:t,maximumFractionDigits:n}=e;if(!(t===void 0&&n===void 0))return{...t!==void 0&&{minimumFractionDigits:t},...n!==void 0&&{maximumFractionDigits:n},roundingMode:`trunc`}};function Eee(e,t){if(typeof e!=`bigint`&&!Number.isFinite(e))throw TypeError(`Expected a finite number, got ${typeof e}: ${e}`);t={bits:!1,binary:!1,space:!0,nonBreakingSpace:!1,...t};let n=t.bits?t.binary?xee:hm:t.binary?mm:pm,r=t.space?t.nonBreakingSpace?`\xA0`:` `:``,i=typeof e==`number`?e===0:e===0n;if(t.signed&&i)return _m(` 0${r}${n[0]}`,t.fixedWidth);let a=e<0,o=a?`-`:t.signed?`+`:``;a&&(e=-e);let s=Tee(t),c=0;if(e>=1&&(c=Math.min(Math.floor(t.binary?Cee(e)/Math.log(1024):gm(e)/3),n.length-1)),e=wee(e,(t.binary?1024:1e3)**c),!s){let t=Math.max(3,Math.floor(e).toString().length);e=Number(e.toPrecision(t))}return _m(o+See(e,t.locale,s)+r+n[c],t.fixedWidth)}var vm=qd(`(prefers-color-scheme: dark)`),ym=qd(`(max-width: 768px)`),bm=window.matchMedia(`(display-mode: standalone)`).matches||navigator.standalone,xm=(e,t)=>Eee(Number.isFinite(e)?e:0,{binary:!1,...t}),Dee=(e,t)=>{let n=Number.isFinite(e)?e:0,r=t?.maximumFractionDigits??1;return n<1e3?`${(n/1e3).toFixed(r)} kB`:xm(n,{maximumFractionDigits:r,...t})},Sm=e=>(0,fm.default)(e).fromNow(),Cm=()=>{let e={};for(let t in localStorage)t.startsWith(`config/`)&&(e[t]=localStorage.getItem(t));return e},wm=e=>{for(let t in e)t.startsWith(`config/`)&&localStorage.setItem(t,e[t])},Tm=()=>{let e=Cm(),t=new Blob([JSON.stringify(e,null,2)],{type:`application/json`}),n=URL.createObjectURL(t),r=document.createElement(`a`);r.href=n,r.download=`zashboard-settings`,r.click(),URL.revokeObjectURL(n)},Oee=()=>{Object.keys(localStorage).filter(e=>e.startsWith(`config/`)).forEach(e=>localStorage.removeItem(e)),window.location.reload()},Em=e=>`${e.protocol}://${e.host}:${e.port}${e.secondaryPath||``}`,Dm=e=>Em(e),Om=e=>e.label||`${e.host}:${e.port}`,km=e=>e===Kp.LARGE?qp.LARGE:qp.SMALL,Am=`proxies-scrollable-parent`,kee=e=>{let t=e.get(`protocol`);return t===`http`||t===`https`?t:e.get(`http`)?`http`:e.get(`https`)?`https`:window.location.protocol.replace(`:`,``)},jm=()=>{let e=new URLSearchParams(window.location.search||location.hash.match(/\?.*$/)?.[0]?.replace(`?`,``));return e.has(`hostname`)?{type:`clash`,protocol:kee(e),secondaryPath:e.get(`secondaryPath`)||``,host:e.get(`hostname`),port:e.get(`port`),password:e.get(`secret`)||``,label:e.get(`label`)||``,disableUpgradeCore:e.get(`disableUpgradeCore`)===`1`||e.get(`disableUpgradeCore`)===`core`,disableTunMode:e.get(`disableTunMode`)===`1`||e.get(`disableTunMode`)===`tun`}:null},Mm=(e,t)=>{if(typeof window>`u`)return;let n=localStorage.getItem(e),r=localStorage.getItem(t);n!==null&&r===null&&localStorage.setItem(t,n),localStorage.removeItem(e)};Mm(`config/show-seleted-for-now-node`,`config/show-selected-for-now-node`),Mm(`config/use-connecticon-card`,`config/use-connection-card`),Mm(`config/connecticon-table-size`,`config/connection-table-size`),Mm(`config/ipv6-map`,`cache/ipv6-map`),Mm(`config/collapse-group-map`,`cache/collapse-group-map`),Mm(`config/log-search-history`,`cache/log-search-history`),(()=>{if(typeof window>`u`)return;let e=`config/connection-display-style`,t=localStorage.getItem(e),n=`config/use-connection-card`;if(t!==null)return;let r=localStorage.getItem(n);(r===`true`||r===`false`)&&localStorage.setItem(e,r===`true`?Pp.CARD:Pp.TABLE),localStorage.removeItem(n)})(),(()=>{if(typeof window>`u`)return;let e=localStorage.getItem(`config/geoip-info-api`),t=`config/ip-check-secondary-api`;localStorage.getItem(t)===null&&e!==$p.IPIP&&Object.values($p).includes(e)&&localStorage.setItem(t,e);let n=`config/earth-origin-source`,r=`config/earth-ip-info-api`,i=localStorage.getItem(n);localStorage.getItem(r)===null&&(i===`china`?localStorage.setItem(r,$p.IPIP):i===`global`&&localStorage.setItem(r,$p.IPSB)),localStorage.removeItem(n)})();var Nm=X(`config/default-theme`,`light`),Pm=X(`config/dark-theme`,`dark`),Fm=X(`config/auto-theme`,!0),Im=Y(()=>Fm.value&&vm.value?Pm.value:Nm.value),Lm=X(`config/custom-themes`,[]),Rm=(e,t)=>{let n={"dark-apple":`dark`,lofi:`light`,wireframe:`light`,black:`dark-neutral`,business:`dark-neutral`};return e in n?n[e]:[...Zp,...Lm.value.map(e=>e.name)].includes(e)?e:t},zm=Rm(Nm.value,`light`);zm!==Nm.value&&(Nm.value=zm);var Bm=Rm(Pm.value,`dark`);Bm!==Pm.value&&(Pm.value=Bm);var Vm=X(`config/language`,Object.values(Cp).includes(navigator.language)?navigator.language:Cp.EN_US),Hm=X(`config/is-sidebar-collapsed`,!0),Um=Y({get:()=>ym.value?!0:Hm.value,set:e=>{Hm.value=e}}),Wm=X(`config/font`,wp.MI_SANS),Gm=Y({get:()=>{let e=`production`;return Object.values(wp).includes(e)?e:Wm.value},set:e=>{Wm.value=e}}),Km=X(`config/emoji`,see?Tp.TWEMOJI:Tp.NOTO_COLOR_EMOJI),qm=X(`config/custom-background-image`,``),Jm=X(`config/custom-css`,``),Ym=X(`config/dashboard-transparent`,90),Xm=X(`config/auto-upgrade`,!1),Zm=X(`config/check-upgrade-core`,!0),Qm=X(`config/auto-upgrade-core`,!1),$m=X(`config/swipe-in-pages`,!0),eh=X(`config/swipe-in-tabs`,!1),th=X(`config/disable-pull-to-refresh`,!0),nh=X(`config/display-all-features`,!1),rh=X(`config/blur-intensity`,10),ih=X(`config/scroll-animation-effect`,!0),ah=X(`config/geoip-info-api`,$p.IPSB);ah.value===$p.IPIP&&(ah.value=$p.IPSB);var oh=X(`config/geoip-country-database-url`,hee),sh=X(`config/geoip-asn-database-url`,gee),ch=X(`config/auto-disconnect-idle-udp`,!1),lh=X(`config/auto-disconnect-idle-udp-time`,300),uh=X(`config/keyboard-shortcuts`,{}),dh=X(`config/split-overview-page`,!1),fh=X(`config/auto-ip-check`,!0),ph=X(`config/ip-check-primary-api`,$p.IPIP),mh=X(`config/ip-check-secondary-api`,$p.IPSB),hh=X(`config/auto-connection-check`,!0),gh=X(`config/show-statistics-when-sidebar-collapsed`,!0),_h=X(`config/number-of-charts-in-sidebar`,1),vh=X(`config/overview-card-order`,[{card:tm.ChartsCard,visible:!0},{card:tm.NetworkCard,visible:!0},{card:tm.EarthGlobeCard,visible:!0},{card:tm.TopologyCharts,visible:!0},{card:tm.ProviderTrafficOverview,visible:!0},{card:tm.ConnectionHistory,visible:!0},{card:tm.RuleHitCountCard,visible:!0},{card:tm.HonkStatsCard,visible:!0}]),Aee=Object.values(tm),jee=new Set(vh.value.map(e=>e.card)),yh=Aee.filter(e=>!jee.has(e));if(yh.length>0){let e=[...vh.value];for(let t of yh){let n={card:t,visible:!0};if(t===tm.EarthGlobeCard){let t=e.findIndex(({card:e})=>e===tm.TopologyCharts);e.splice(t===-1?e.length:t,0,n)}else e.push(n)}vh.value=e}var Mee=X(`config/earth-ip-info-api`,$p.IPIP),Nee=X(`config/earth-visual-mode`,`flat`),Pee=X(`config/earth-projection`,`3d`),bh=X(`config/topology-apply-connection-filter`,!0),xh=X(`cache/collapse-group-map`,{}),Sh=X(`cache/proxy-group-filter-map`,{}),Ch=X(`config/show-selected-for-now-node`,!1),wh=X(`config/two-columns`,!0),Th=X(`config/proxy-folder-mode-setting`,Np.AUTO),Eh=X(`config/speedtest-url`,cee),Dh=X(`config/independent-latency-test`,!1),Oh=X(`config/speedtest-timeout`,5e3),kh=X(`config/speedtest-mode`,Mp.DASHBOARD),Fee=X(`config/proxy-search-mode`,jp.GROUP),Iee=X(`config/proxy-provider-search-mode`,jp.GLOBAL),Ah=X(`config/proxy-sort-type`,kp.DEFAULT),jh=X(`config/automatic-disconnection`,!0),Mh=X(`config/truncate-proxy-name`,!0),Nh=X(`config/disable-proxies-page-text-select`,!0),Ph=X(`config/proxy-preview-type`,Ap.AUTO),Fh=X(`config/hide-unavailable-proxies`,!1),Ih=X(`config/low-latency`,400),Lh=X(`config/medium-latency`,800),Rh=X(`config/ipv6-test`,!1),zh=X(`config/proxy-card-size`,Kp.LARGE),Bh=X(`config/min-proxy-card-width`,km(zh.value)),Vh=X(`config/manage-hidden-group-mode`,!1),Hh=X(`config/display-global-by-mode`,!1),Uh=X(`config/proxy-group-icon-size`,24),Wh=X(`config/proxy-group-icon-margin`,6),Gh=X(`config/icon-reflect-list`,[]),Kh=X(`config/group-proxies-by-provider`,!1),qh=X(`config/use-smart-group-sort`,!1),Jh=X(`config/group-test-urls`,[]),Yh=X(`config/connection-display-style`,Pp.AUTO),Xh=Y(()=>Yh.value===Pp.CARD||Yh.value!==Pp.TABLE&&ym.value),Zh=X(`config/proxy-chain-direction`,Jp.NORMAL),Qh=X(`config/show-full-proxy-chain`,!0),$h=X(`config/connection-table-size`,Gp.LARGE),eg=X(`config/table-width-mode`,Op.AUTO),tg=X(`config/connection-table-columns`,[Z.Close,Z.Host,Z.Type,Z.Rule,Z.Chains,Z.DlSpeed,Z.UlSpeed,Z.Download,Z.Upload,Z.ConnectTime]),ng=X(`config/connection-card-lines`,Xp),rg=X(`config/source-ip-label-list`,[]),ig=X(`config/resolve-client-hostname`,!1),ag=X(`config/display-now-node-in-rule`,!0),og=X(`config/display-latency-in-rule`,!0),sg=X(`config/disconnect-on-rule-disable`,!0),cg=X(`config/rule-display-style`,Fp.CARD),lg=X(`config/log-retention-limit`,1e3),ug=X(`config/log-display-style`,Fp.CARD),dg=X(`cache/log-search-history`,[]),fg=X(`config/hidden-settings-items`,{}),pg=X(`config/settings-menu-order`,im),Lee=s(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r(dm()):typeof define==`function`&&define.amd?define([`dayjs`],r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_locale_ru=r(n.dayjs)})(e,(function(e){function t(e){return e&&typeof e==`object`&&`default`in e?e:{default:e}}var n=t(e),r=`января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря`.split(`_`),i=`январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь`.split(`_`),a=`янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.`.split(`_`),o=`янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.`.split(`_`),s=/D[oD]?(\[[^[\]]*\]|\s)+MMMM?/;function c(e,t,n){var r,i;return n===`m`?t?`минута`:`минуту`:e+` `+(r=+e,i={mm:t?`минута_минуты_минут`:`минуту_минуты_минут`,hh:`час_часа_часов`,dd:`день_дня_дней`,MM:`месяц_месяца_месяцев`,yy:`год_года_лет`}[n].split(`_`),r%10==1&&r%100!=11?i[0]:r%10>=2&&r%10<=4&&(r%100<10||r%100>=20)?i[1]:i[2])}var l=function(e,t){return s.test(t)?r[e.month()]:i[e.month()]};l.s=i,l.f=r;var u=function(e,t){return s.test(t)?a[e.month()]:o[e.month()]};u.s=o,u.f=a;var d={name:`ru`,weekdays:`воскресенье_понедельник_вторник_среда_четверг_пятница_суббота`.split(`_`),weekdaysShort:`вск_пнд_втр_срд_чтв_птн_сбт`.split(`_`),weekdaysMin:`вс_пн_вт_ср_чт_пт_сб`.split(`_`),months:l,monthsShort:u,weekStart:1,yearStart:4,formats:{LT:`H:mm`,LTS:`H:mm:ss`,L:`DD.MM.YYYY`,LL:`D MMMM YYYY г.`,LLL:`D MMMM YYYY г., H:mm`,LLLL:`dddd, D MMMM YYYY г., H:mm`},relativeTime:{future:`через %s`,past:`%s назад`,s:`несколько секунд`,m:c,mm:c,h:`час`,hh:c,d:`день`,dd:c,M:`месяц`,MM:c,y:`год`,yy:c},ordinal:function(e){return e},meridiem:function(e){return e<4?`ночи`:e<12?`утра`:e<17?`дня`:`вечера`}};return n.default.locale(d,null,!0),d}))})),Ree=s(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r(dm()):typeof define==`function`&&define.amd?define([`dayjs`],r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_locale_zh_cn=r(n.dayjs)})(e,(function(e){function t(e){return e&&typeof e==`object`&&`default`in e?e:{default:e}}var n=t(e),r={name:`zh-cn`,weekdays:`星期日_星期一_星期二_星期三_星期四_星期五_星期六`.split(`_`),weekdaysShort:`周日_周一_周二_周三_周四_周五_周六`.split(`_`),weekdaysMin:`日_一_二_三_四_五_六`.split(`_`),months:`一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月`.split(`_`),monthsShort:`1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月`.split(`_`),ordinal:function(e,t){return t===`W`?e+`周`:e+`日`},weekStart:1,yearStart:4,formats:{LT:`HH:mm`,LTS:`HH:mm:ss`,L:`YYYY/MM/DD`,LL:`YYYY年M月D日`,LLL:`YYYY年M月D日Ah点mm分`,LLLL:`YYYY年M月D日ddddAh点mm分`,l:`YYYY/M/D`,ll:`YYYY年M月D日`,lll:`YYYY年M月D日 HH:mm`,llll:`YYYY年M月D日dddd HH:mm`},relativeTime:{future:`%s内`,past:`%s前`,s:`几秒`,m:`1 分钟`,mm:`%d 分钟`,h:`1 小时`,hh:`%d 小时`,d:`1 天`,dd:`%d 天`,M:`1 个月`,MM:`%d 个月`,y:`1 年`,yy:`%d 年`},meridiem:function(e,t){var n=100*e+t;return n<600?`凌晨`:n<900?`早上`:n<1100?`上午`:n<1300?`中午`:n<1800?`下午`:`晚上`}};return n.default.locale(r,null,!0),r}))})),zee=s(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r(dm()):typeof define==`function`&&define.amd?define([`dayjs`],r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_locale_zh_tw=r(n.dayjs)})(e,(function(e){function t(e){return e&&typeof e==`object`&&`default`in e?e:{default:e}}var n=t(e),r={name:`zh-tw`,weekdays:`星期日_星期一_星期二_星期三_星期四_星期五_星期六`.split(`_`),weekdaysShort:`週日_週一_週二_週三_週四_週五_週六`.split(`_`),weekdaysMin:`日_一_二_三_四_五_六`.split(`_`),months:`一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月`.split(`_`),monthsShort:`1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月`.split(`_`),ordinal:function(e,t){return t===`W`?e+`週`:e+`日`},formats:{LT:`HH:mm`,LTS:`HH:mm:ss`,L:`YYYY/MM/DD`,LL:`YYYY年M月D日`,LLL:`YYYY年M月D日 HH:mm`,LLLL:`YYYY年M月D日dddd HH:mm`,l:`YYYY/M/D`,ll:`YYYY年M月D日`,lll:`YYYY年M月D日 HH:mm`,llll:`YYYY年M月D日dddd HH:mm`},relativeTime:{future:`%s內`,past:`%s前`,s:`幾秒`,m:`1 分鐘`,mm:`%d 分鐘`,h:`1 小時`,hh:`%d 小時`,d:`1 天`,dd:`%d 天`,M:`1 個月`,MM:`%d 個月`,y:`1 年`,yy:`%d 年`},meridiem:function(e,t){var n=100*e+t;return n<600?`凌晨`:n<900?`早上`:n<1100?`上午`:n<1300?`中午`:n<1800?`下午`:`晚上`}};return n.default.locale(r,null,!0),r}))})),Bee=s(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_relativeTime=r()})(e,(function(){return function(e,t,n){e||={};var r=t.prototype,i={future:`in %s`,past:`%s ago`,s:`a few seconds`,m:`a minute`,mm:`%d minutes`,h:`an hour`,hh:`%d hours`,d:`a day`,dd:`%d days`,M:`a month`,MM:`%d months`,y:`a year`,yy:`%d years`};function a(e,t,n,i){return r.fromToBase(e,t,n,i)}n.en.relativeTime=i,r.fromToBase=function(t,r,a,o,s){for(var c,l,u,d=a.$locale().relativeTime||i,f=e.thresholds||[{l:`s`,r:44,d:`second`},{l:`m`,r:89},{l:`mm`,r:44,d:`minute`},{l:`h`,r:89},{l:`hh`,r:21,d:`hour`},{l:`d`,r:35},{l:`dd`,r:25,d:`day`},{l:`M`,r:45},{l:`MM`,r:10,d:`month`},{l:`y`,r:17},{l:`yy`,d:`year`}],p=f.length,m=0;m0,g<=h.r||!h.r){g<=1&&m>0&&(h=f[m-1]);var _=d[h.l];s&&(g=s(``+g)),l=typeof _==`string`?_.replace(`%d`,g):_(g,r,h.l,u);break}}if(r)return l;var v=u?d.future:d.past;return typeof v==`function`?v(l):v.replace(`%s`,l)},r.to=function(e,t){return a(e,t,this,!0)},r.from=function(e,t){return a(e,t,this)};var o=function(e){return e.$u?n.utc():n()};r.toNow=function(e){return this.to(o(this),e)},r.fromNow=function(e){return this.from(o(this),e)}}}))})),Vee=s(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_updateLocale=r()})(e,(function(){function e(){return e=Object.assign||function(e){for(var t=1;tVm.value,()=>{fm.default.locale(Vm.value)},{immediate:!0});var Wee=s(((e,t)=>{(function(){var n,r=`Expected a function`,i=`__lodash_hash_undefined__`,a=`__lodash_placeholder__`,o=1,s=2,c=8,l=16,u=32,d=64,f=128,p=256,m=512,h=1/0,g=9007199254740991,_=NaN,v=4294967295,y=v-1,b=v>>>1,x=[[`ary`,f],[`bind`,o],[`bindKey`,s],[`curry`,c],[`curryRight`,l],[`flip`,m],[`partial`,u],[`partialRight`,d],[`rearg`,p]],S=`[object Arguments]`,C=`[object Array]`,w=`[object AsyncFunction]`,T=`[object Boolean]`,E=`[object Date]`,D=`[object DOMException]`,O=`[object Error]`,k=`[object Function]`,A=`[object GeneratorFunction]`,j=`[object Map]`,M=`[object Number]`,ee=`[object Null]`,te=`[object Object]`,ne=`[object Promise]`,N=`[object Proxy]`,re=`[object RegExp]`,ie=`[object Set]`,ae=`[object String]`,oe=`[object Symbol]`,se=`[object Undefined]`,P=`[object WeakMap]`,ce=`[object WeakSet]`,le=`[object ArrayBuffer]`,ue=`[object DataView]`,de=`[object Float32Array]`,fe=`[object Float64Array]`,pe=`[object Int8Array]`,me=`[object Int16Array]`,he=`[object Int32Array]`,ge=`[object Uint8Array]`,_e=`[object Uint8ClampedArray]`,ve=`[object Uint16Array]`,ye=`[object Uint32Array]`,be=/\b__p \+= '';/g,xe=/\b(__p \+=) '' \+/g,Se=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ce=/&(?:amp|lt|gt|quot|#39);/g,we=/[&<>"']/g,Te=RegExp(Ce.source),Ee=RegExp(we.source),De=/<%-([\s\S]+?)%>/g,Oe=/<%([\s\S]+?)%>/g,ke=/<%=([\s\S]+?)%>/g,Ae=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,je=/^\w*$/,Me=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ne=/[\\^$.*+?()[\]{}|]/g,Pe=RegExp(Ne.source),Fe=/^\s+/,Ie=/\s/,Le=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Re=/\{\n\/\* \[wrapped with (.+)\] \*/,ze=/,? & /,Be=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ve=/[()=,{}\[\]\/\s]/,He=/\\(\\)?/g,Ue=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,We=/\w*$/,Ge=/^[-+]0x[0-9a-f]+$/i,Ke=/^0b[01]+$/i,qe=/^\[object .+?Constructor\]$/,Je=/^0o[0-7]+$/i,Ye=/^(?:0|[1-9]\d*)$/,Xe=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ze=/($^)/,Qe=/['\n\r\u2028\u2029\\]/g,$e=`\\ud800-\\udfff`,et=`\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff`,tt=`\\u2700-\\u27bf`,nt=`a-z\\xdf-\\xf6\\xf8-\\xff`,rt=`\\xac\\xb1\\xd7\\xf7`,it=`\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf`,at=`\\u2000-\\u206f`,ot=` \\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`,st=`A-Z\\xc0-\\xd6\\xd8-\\xde`,ct=`\\ufe0e\\ufe0f`,lt=rt+it+at+ot,ut=`['’]`,dt=`[`+$e+`]`,ft=`[`+lt+`]`,pt=`[`+et+`]`,mt=`\\d+`,ht=`[`+tt+`]`,gt=`[`+nt+`]`,F=`[^`+$e+lt+mt+tt+nt+st+`]`,_t=`\\ud83c[\\udffb-\\udfff]`,vt=`(?:`+pt+`|`+_t+`)`,yt=`[^`+$e+`]`,bt=`(?:\\ud83c[\\udde6-\\uddff]){2}`,xt=`[\\ud800-\\udbff][\\udc00-\\udfff]`,St=`[`+st+`]`,Ct=`\\u200d`,wt=`(?:`+gt+`|`+F+`)`,Tt=`(?:`+St+`|`+F+`)`,Et=`(?:`+ut+`(?:d|ll|m|re|s|t|ve))?`,Dt=`(?:`+ut+`(?:D|LL|M|RE|S|T|VE))?`,Ot=vt+`?`,kt=`[`+ct+`]?`,At=`(?:`+Ct+`(?:`+[yt,bt,xt].join(`|`)+`)`+kt+Ot+`)*`,jt=`\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])`,Mt=`\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])`,Nt=kt+Ot+At,Pt=`(?:`+[ht,bt,xt].join(`|`)+`)`+Nt,Ft=`(?:`+[yt+pt+`?`,pt,bt,xt,dt].join(`|`)+`)`,It=RegExp(ut,`g`),Lt=RegExp(pt,`g`),Rt=RegExp(_t+`(?=`+_t+`)|`+Ft+Nt,`g`),zt=RegExp([St+`?`+gt+`+`+Et+`(?=`+[ft,St,`$`].join(`|`)+`)`,Tt+`+`+Dt+`(?=`+[ft,St+wt,`$`].join(`|`)+`)`,St+`?`+wt+`+`+Et,St+`+`+Dt,Mt,jt,mt,Pt].join(`|`),`g`),Bt=RegExp(`[`+Ct+$e+et+ct+`]`),Vt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ht=`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`.split(`.`),Ut=-1,Wt={};Wt[de]=Wt[fe]=Wt[pe]=Wt[me]=Wt[he]=Wt[ge]=Wt[_e]=Wt[ve]=Wt[ye]=!0,Wt[S]=Wt[C]=Wt[le]=Wt[T]=Wt[ue]=Wt[E]=Wt[O]=Wt[k]=Wt[j]=Wt[M]=Wt[te]=Wt[re]=Wt[ie]=Wt[ae]=Wt[P]=!1;var Gt={};Gt[S]=Gt[C]=Gt[le]=Gt[ue]=Gt[T]=Gt[E]=Gt[de]=Gt[fe]=Gt[pe]=Gt[me]=Gt[he]=Gt[j]=Gt[M]=Gt[te]=Gt[re]=Gt[ie]=Gt[ae]=Gt[oe]=Gt[ge]=Gt[_e]=Gt[ve]=Gt[ye]=!0,Gt[O]=Gt[k]=Gt[P]=!1;var Kt={À:`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`},qt={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`},Jt={"&":`&`,"<":`<`,">":`>`,""":`"`,"'":`'`},Yt={"\\":`\\`,"'":`'`,"\n":`n`,"\r":`r`,"\u2028":`u2028`,"\u2029":`u2029`},Xt=parseFloat,Zt=parseInt,Qt=typeof global==`object`&&global&&global.Object===Object&&global,$t=typeof self==`object`&&self&&self.Object===Object&&self,en=Qt||$t||Function(`return this`)(),tn=typeof e==`object`&&e&&!e.nodeType&&e,nn=tn&&typeof t==`object`&&t&&!t.nodeType&&t,rn=nn&&nn.exports===tn,an=rn&&Qt.process,on=function(){try{return nn&&nn.require&&nn.require(`util`).types||an&&an.binding&&an.binding(`util`)}catch{}}(),sn=on&&on.isArrayBuffer,cn=on&&on.isDate,ln=on&&on.isMap,un=on&&on.isRegExp,dn=on&&on.isSet,fn=on&&on.isTypedArray;function pn(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function I(e,t,n,r){for(var i=-1,a=e==null?0:e.length;++i-1}function vn(e,t,n){for(var r=-1,i=e==null?0:e.length;++r-1;);return n}function Gn(e,t){for(var n=e.length;n--&&kn(t,e[n],0)>-1;);return n}function Kn(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var qn=Pn(Kt),Jn=Pn(qt);function Yn(e){return`\\`+Yt[e]}function Xn(e,t){return e==null?n:e[t]}function Zn(e){return Bt.test(e)}function Qn(e){return Vt.test(e)}function $n(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function er(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function tr(e,t){return function(n){return e(t(n))}}function nr(e,t){for(var n=-1,r=e.length,i=0,o=[];++n-1}function Rr(e,t){var n=this.__data__,r=ii(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}Nr.prototype.clear=Pr,Nr.prototype.delete=Fr,Nr.prototype.get=Ir,Nr.prototype.has=Lr,Nr.prototype.set=Rr;function zr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t=t?e:t)),e}function di(e,t,r,i,a,o){var s,c=t&1,l=t&2,u=t&4;if(r&&(s=a?r(e,i,a,o):r(e)),s!==n)return s;if(!lu(e))return e;var d=ql(e);if(d){if(s=Uo(e),!c)return Xa(e,s)}else{var f=zo(e),p=f==k||f==A;if(Ql(e))return Ba(e,c);if(f==te||f==S||p&&!a){if(s=l||p?{}:Wo(e),!c)return l?$a(e,si(s,e)):Qa(e,oi(s,e))}else{if(!Gt[f])return a?e:{};s=Go(e,f,c)}}o||=new qr;var m=o.get(e);if(m)return m;o.set(e,s),Su(e)?e.forEach(function(n){s.add(di(n,t,r,n,e,o))}):du(e)&&e.forEach(function(n,i){s.set(i,di(n,t,r,i,e,o))});var h=d?n:(u?l?Oo:Do:l?cd:sd)(e);return mn(h||e,function(n,i){h&&(i=n,n=e[i]),ri(s,i,di(n,t,r,i,e,o))}),s}function fi(e){var t=sd(e);return function(n){return V(n,e,t)}}function V(e,t,r){var i=r.length;if(e==null)return!i;for(e=nt(e);i--;){var a=r[i],o=t[a],s=e[a];if(s===n&&!(a in e)||!o(s))return!1}return!0}function pi(e,t,i){if(typeof e!=`function`)throw new at(r);return ps(function(){e.apply(n,i)},t)}function mi(e,t,n,r){var i=-1,a=_n,o=!0,s=e.length,c=[],l=t.length;if(!s)return c;n&&(t=yn(t,Vn(n))),r?(a=vn,o=!1):t.length>=200&&(a=Un,o=!1,t=new Wr(t));outer:for(;++ia?0:a+r),i=i===n||i>a?a:Nu(i),i<0&&(i+=a),i=r>i?0:Pu(i);r0&&n(s)?t>1?xi(s,t-1,n,r,i):bn(i,s):r||(i[i.length]=s)}return i}var Si=ro(),Ci=ro(!0);function wi(e,t){return e&&Si(e,t,sd)}function Ti(e,t){return e&&Ci(e,t,sd)}function Ei(e,t){return L(t,function(t){return ou(e[t])})}function Di(e,t){t=Ia(t,e);for(var r=0,i=t.length;e!=null&&rt}function ji(e,t){return e!=null&&dt.call(e,t)}function Mi(e,t){return e!=null&&t in nt(e)}function Ni(e,t,n){return e>=Kt(t,n)&&e=120&&d.length>=120)?new Wr(s&&d):n}d=e[0];var f=-1,p=c[0];outer:for(;++f-1;)s!==e&&wt.call(s,c,1),wt.call(e,c,1);return e}function la(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==a){var a=i;Jo(i)?wt.call(e,i,1):Oa(e,i)}}return e}function ua(e,t){return e+Nt(Yt()*(t-e+1))}function da(e,t,n,r){for(var i=-1,a=Vt(Mt((t-e)/(n||1)),0),o=Ie(a);a--;)o[r?a:++i]=e,e+=n;return o}function fa(e,t){var n=``;if(!e||t<1||t>g)return n;do t%2&&(n+=e),t=Nt(t/2),t&&(e+=e);while(t);return n}function pa(e,t){return ms(cs(e,t,hf),e+``)}function ma(e){return $r(Ed(e))}function ha(e,t){var n=Ed(e);return _s(n,ui(t,0,n.length))}function ga(e,t,r,i){if(!lu(e))return e;t=Ia(t,e);for(var a=-1,o=t.length,s=o-1,c=e;c!=null&&++ai?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Ie(i);++r>>1,o=e[a];o!==null&&!wu(o)&&(n?o<=t:o=200){var l=t?null:vo(e);if(l)return rr(l);o=!1,i=Un,c=new Wr}else c=t?[]:s;outer:for(;++r=i?e:ba(e,t,r)}var za=kt||function(e){return en.clearTimeout(e)};function Ba(e,t){if(t)return e.slice();var n=e.length,r=bt?bt(n):new e.constructor(n);return e.copy(r),r}function Va(e){var t=new e.constructor(e.byteLength);return new yt(t).set(new yt(e)),t}function Ha(e,t){var n=t?Va(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}function Ua(e){var t=new e.constructor(e.source,We.exec(e));return t.lastIndex=e.lastIndex,t}function Wa(e){return vr?nt(vr.call(e)):{}}function Ga(e,t){var n=t?Va(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Ka(e,t){if(e!==t){var r=e!==n,i=e===null,a=e===e,o=wu(e),s=t!==n,c=t===null,l=t===t,u=wu(t);if(!c&&!u&&!o&&e>t||o&&s&&l&&!c&&!u||i&&s&&l||!r&&l||!a)return 1;if(!i&&!o&&!u&&e=s?c:c*(n[r]==`desc`?-1:1)}return e.index-t.index}function Ja(e,t,n,r){for(var i=-1,a=e.length,o=n.length,s=-1,c=t.length,l=Vt(a-o,0),u=Ie(c+l),d=!r;++s1?r[a-1]:n,s=a>2?r[2]:n;for(o=e.length>3&&typeof o==`function`?(a--,o):n,s&&Yo(r[0],r[1],s)&&(o=a<3?n:o,a=1),t=nt(t);++i-1?a[o?t[s]:s]:n}}function lo(e){return Eo(function(t){var i=t.length,a=i,o=Sr.prototype.thru;for(e&&t.reverse();a--;){var s=t[a];if(typeof s!=`function`)throw new at(r);if(o&&!l&&Ao(s)==`wrapper`)var l=new Sr([],!0)}for(a=l?a:i;++a1&&o.reverse(),_&&hc))return!1;var u=o.get(e),d=o.get(t);if(u&&d)return u==t&&d==e;var f=-1,p=!0,m=r&2?new Wr:n;for(o.set(e,t),o.set(t,e);++f1?`& `:``)+t[r],t=t.join(n>2?`, `:` `),e.replace(Le,`{ -/* [wrapped with `+t+`] */ -`)}function qo(e){return ql(e)||Kl(e)||!!(Tt&&e&&e[Tt])}function Jo(e,t){var n=typeof e;return t??=g,!!t&&(n==`number`||n!=`symbol`&&Ye.test(e))&&e>-1&&e%1==0&&e0){if(++t>=800)return arguments[0]}else t=0;return e.apply(n,arguments)}}function _s(e,t){var r=-1,i=e.length,a=i-1;for(t=t===n?i:t;++r1?e[t-1]:n;return r=typeof r==`function`?(e.pop(),r):n,wc(e,r)});function Mc(e){var t=R(e);return t.__chain__=!0,t}function Nc(e,t){return t(e),e}function J(e,t){return t(e)}var Pc=Eo(function(e){var t=e.length,r=t?e[0]:0,i=this.__wrapped__,a=function(t){return li(t,e)};return t>1||this.__actions__.length||!(i instanceof Cr)||!Jo(r)?this.thru(a):(i=i.slice(r,+r+ +!!t),i.__actions__.push({func:J,args:[a],thisArg:n}),new Sr(i,this.__chain__).thru(function(e){return t&&!e.length&&e.push(n),e}))});function Fc(){return Mc(this)}function Ic(){return new Sr(this.value(),this.__chain__)}function Lc(){this.__values__===n&&(this.__values__=ju(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?n:this.__values__[this.__index__++]}}function Rc(){return this}function zc(e){for(var t,r=this;r instanceof xr;){var i=Ss(r);i.__index__=0,i.__values__=n,t?a.__wrapped__=i:t=i;var a=i;r=r.__wrapped__}return a.__wrapped__=e,t}function Bc(){var e=this.__wrapped__;if(e instanceof Cr){var t=e;return this.__actions__.length&&(t=new Cr(this)),t=t.reverse(),t.__actions__.push({func:J,args:[nc],thisArg:n}),new Sr(t,this.__chain__)}return this.thru(nc)}function Vc(){return ja(this.__wrapped__,this.__actions__)}var Hc=eo(function(e,t,n){dt.call(e,n)?++e[n]:ci(e,n,1)});function Uc(e,t,r){var i=ql(e)?gn:_i;return r&&Yo(e,t,r)&&(t=n),i(e,Mo(t,3))}function Wc(e,t){return(ql(e)?L:bi)(e,Mo(t,3))}var Gc=co(Ps),Kc=co(Fs);function Y(e,t){return xi(tl(e,t),1)}function qc(e,t){return xi(tl(e,t),h)}function Jc(e,t,r){return r=r===n?1:Nu(r),xi(tl(e,t),r)}function Yc(e,t){return(ql(e)?mn:hi)(e,Mo(t,3))}function Xc(e,t){return(ql(e)?hn:gi)(e,Mo(t,3))}var Zc=eo(function(e,t,n){dt.call(e,n)?e[n].push(t):ci(e,n,[t])});function Qc(e,t,n,r){e=Yl(e)?e:Ed(e),n=n&&!r?Nu(n):0;var i=e.length;return n<0&&(n=Vt(i+n,0)),Cu(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&kn(e,t,n)>-1}var $c=pa(function(e,t,n){var r=-1,i=typeof t==`function`,a=Yl(e)?Ie(e.length):[];return hi(e,function(e){a[++r]=i?pn(t,e,n):Ii(e,t,n)}),a}),el=eo(function(e,t,n){ci(e,n,t)});function tl(e,t){return(ql(e)?yn:Qi)(e,Mo(t,3))}function nl(e,t,r,i){return e==null?[]:(ql(t)||(t=t==null?[]:[t]),r=i?n:r,ql(r)||(r=r==null?[]:[r]),ia(e,t,r))}var rl=eo(function(e,t,n){e[+!n].push(t)},function(){return[[],[]]});function il(e,t,n){var r=ql(e)?xn:Fn,i=arguments.length<3;return r(e,Mo(t,4),n,i,hi)}function al(e,t,n){var r=ql(e)?Sn:Fn,i=arguments.length<3;return r(e,Mo(t,4),n,i,gi)}function ol(e,t){return(ql(e)?L:bi)(e,El(Mo(t,3)))}function sl(e){return(ql(e)?$r:ma)(e)}function cl(e,t,r){return t=(r?Yo(e,t,r):t===n)?1:Nu(t),(ql(e)?ei:ha)(e,t)}function ll(e){return(ql(e)?ti:ya)(e)}function ul(e){if(e==null)return 0;if(Yl(e))return Cu(e)?sr(e):e.length;var t=zo(e);return t==j||t==ie?e.size:Yi(e).length}function dl(e,t,r){var i=ql(e)?Cn:xa;return r&&Yo(e,t,r)&&(t=n),i(e,Mo(t,3))}var fl=pa(function(e,t){if(e==null)return[];var n=t.length;return n>1&&Yo(e,t[0],t[1])?t=[]:n>2&&Yo(t[0],t[1],t[2])&&(t=[t[0]]),ia(e,xi(t,1),[])}),pl=At||function(){return en.Date.now()};function ml(e,t){if(typeof t!=`function`)throw new at(r);return e=Nu(e),function(){if(--e<1)return t.apply(this,arguments)}}function hl(e,t,r){return t=r?n:t,t=e&&t==null?e.length:t,yo(e,f,n,n,n,n,t)}function gl(e,t){var i;if(typeof t!=`function`)throw new at(r);return e=Nu(e),function(){return--e>0&&(i=t.apply(this,arguments)),e<=1&&(t=n),i}}var _l=pa(function(e,t,n){var r=o;if(n.length){var i=nr(n,jo(_l));r|=u}return yo(e,r,t,n,i)}),vl=pa(function(e,t,n){var r=o|s;if(n.length){var i=nr(n,jo(vl));r|=u}return yo(t,r,e,n,i)});function yl(e,t,r){t=r?n:t;var i=yo(e,c,n,n,n,n,n,t);return i.placeholder=yl.placeholder,i}function bl(e,t,r){t=r?n:t;var i=yo(e,l,n,n,n,n,n,t);return i.placeholder=bl.placeholder,i}function xl(e,t,i){var a,o,s,c,l,u,d=0,f=!1,p=!1,m=!0;if(typeof e!=`function`)throw new at(r);t=Fu(t)||0,lu(i)&&(f=!!i.leading,p=`maxWait`in i,s=p?Vt(Fu(i.maxWait)||0,t):s,m=`trailing`in i?!!i.trailing:m);function h(t){var r=a,i=o;return a=o=n,d=t,c=e.apply(i,r),c}function g(e){return d=e,l=ps(y,t),f?h(e):c}function _(e){var n=e-u,r=e-d,i=t-n;return p?Kt(i,s-r):i}function v(e){var r=e-u,i=e-d;return u===n||r>=t||r<0||p&&i>=s}function y(){var e=pl();if(v(e))return b(e);l=ps(y,_(e))}function b(e){return l=n,m&&a?h(e):(a=o=n,c)}function x(){l!==n&&za(l),d=0,a=u=o=l=n}function S(){return l===n?c:b(pl())}function C(){var e=pl(),r=v(e);if(a=arguments,o=this,u=e,r){if(l===n)return g(u);if(p)return za(l),l=ps(y,t),h(u)}return l===n&&(l=ps(y,t)),c}return C.cancel=x,C.flush=S,C}var Sl=pa(function(e,t){return pi(e,1,t)}),Cl=pa(function(e,t,n){return pi(e,Fu(t)||0,n)});function wl(e){return yo(e,m)}function Tl(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw new at(r);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(Tl.Cache||zr),n}Tl.Cache=zr;function El(e){if(typeof e!=`function`)throw new at(r);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function Dl(e){return gl(2,e)}var Ol=La(function(e,t){t=t.length==1&&ql(t[0])?yn(t[0],Vn(Mo())):yn(xi(t,1),Vn(Mo()));var n=t.length;return pa(function(r){for(var i=-1,a=Kt(r.length,n);++i=t}),Kl=Li(function(){return arguments}())?Li:function(e){return uu(e)&&dt.call(e,`callee`)&&!Ct.call(e,`callee`)},ql=Ie.isArray,Jl=sn?Vn(sn):Ri;function Yl(e){return e!=null&&cu(e.length)&&!ou(e)}function Xl(e){return uu(e)&&Yl(e)}function Zl(e){return e===!0||e===!1||uu(e)&&ki(e)==T}var Ql=Ft||Nf,$l=cn?Vn(cn):zi;function eu(e){return uu(e)&&e.nodeType===1&&!yu(e)}function tu(e){if(e==null)return!0;if(Yl(e)&&(ql(e)||typeof e==`string`||typeof e.splice==`function`||Ql(e)||Tu(e)||Kl(e)))return!e.length;var t=zo(e);if(t==j||t==ie)return!e.size;if(ts(e))return!Yi(e).length;for(var n in e)if(dt.call(e,n))return!1;return!0}function nu(e,t){return Bi(e,t)}function ru(e,t,r){r=typeof r==`function`?r:n;var i=r?r(e,t):n;return i===n?Bi(e,t,n,r):!!i}function iu(e){if(!uu(e))return!1;var t=ki(e);return t==O||t==D||typeof e.message==`string`&&typeof e.name==`string`&&!yu(e)}function au(e){return typeof e==`number`&&Rt(e)}function ou(e){if(!lu(e))return!1;var t=ki(e);return t==k||t==A||t==w||t==N}function su(e){return typeof e==`number`&&e==Nu(e)}function cu(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=g}function lu(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}function uu(e){return typeof e==`object`&&!!e}var du=ln?Vn(ln):Hi;function fu(e,t){return e===t||Ui(e,t,Po(t))}function pu(e,t,r){return r=typeof r==`function`?r:n,Ui(e,t,Po(t),r)}function mu(e){return vu(e)&&e!=+e}function hu(e){if(es(e))throw new $e(`Unsupported core-js use. Try https://npms.io/search?q=ponyfill.`);return Wi(e)}function gu(e){return e===null}function _u(e){return e==null}function vu(e){return typeof e==`number`||uu(e)&&ki(e)==M}function yu(e){if(!uu(e)||ki(e)!=te)return!1;var t=xt(e);if(t===null)return!0;var n=dt.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&ut.call(n)==ht}var bu=un?Vn(un):Gi;function xu(e){return su(e)&&e>=-9007199254740991&&e<=g}var Su=dn?Vn(dn):Ki;function Cu(e){return typeof e==`string`||!ql(e)&&uu(e)&&ki(e)==ae}function wu(e){return typeof e==`symbol`||uu(e)&&ki(e)==oe}var Tu=fn?Vn(fn):qi;function Eu(e){return e===n}function Du(e){return uu(e)&&zo(e)==P}function Ou(e){return uu(e)&&ki(e)==ce}var ku=ho(Zi),Au=ho(function(e,t){return e<=t});function ju(e){if(!e)return[];if(Yl(e))return Cu(e)?cr(e):Xa(e);if(Et&&e[Et])return $n(e[Et]());var t=zo(e);return(t==j?er:t==ie?rr:Ed)(e)}function Mu(e){return e?(e=Fu(e),e===h||e===-1/0?(e<0?-1:1)*17976931348623157e292:e===e?e:0):e===0?e:0}function Nu(e){var t=Mu(e),n=t%1;return t===t?n?t-n:t:0}function Pu(e){return e?ui(Nu(e),0,v):0}function Fu(e){if(typeof e==`number`)return e;if(wu(e))return _;if(lu(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=lu(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=Bn(e);var n=Ke.test(e);return n||Je.test(e)?Zt(e.slice(2),n?2:8):Ge.test(e)?_:+e}function Iu(e){return Za(e,cd(e))}function Lu(e){return e?ui(Nu(e),-9007199254740991,g):e===0?e:0}function Ru(e){return e==null?``:Ea(e)}var zu=to(function(e,t){if(ts(t)||Yl(t)){Za(t,sd(t),e);return}for(var n in t)dt.call(t,n)&&ri(e,n,t[n])}),Bu=to(function(e,t){Za(t,cd(t),e)}),Vu=to(function(e,t,n,r){Za(t,cd(t),e,r)}),Hu=to(function(e,t,n,r){Za(t,sd(t),e,r)}),Uu=Eo(li);function Wu(e,t){var n=br(e);return t==null?n:oi(n,t)}var Gu=pa(function(e,t){e=nt(e);var r=-1,i=t.length,a=i>2?t[2]:n;for(a&&Yo(t[0],t[1],a)&&(i=1);++r1,t}),Za(e,Oo(e),n),r&&(n=di(n,7,So));for(var i=t.length;i--;)Oa(n,t[i]);return n});function md(e,t){return gd(e,El(Mo(t)))}var hd=Eo(function(e,t){return e==null?{}:aa(e,t)});function gd(e,t){if(e==null)return{};var n=yn(Oo(e),function(e){return[e]});return t=Mo(t),oa(e,n,function(e,n){return t(e,n[0])})}function _d(e,t,r){t=Ia(t,e);var i=-1,a=t.length;for(a||(a=1,e=n);++it){var i=e;e=t,t=i}if(r||e%1||t%1){var a=Yt();return Kt(e+a*(t-e+Xt(`1e-`+((a+``).length-1))),t)}return ua(e,t)}var jd=oo(function(e,t,n){return t=t.toLowerCase(),e+(n?Md(t):t)});function Md(e){return of(Ru(e).toLowerCase())}function Nd(e){return e=Ru(e),e&&e.replace(Xe,qn).replace(Lt,``)}function Pd(e,t,r){e=Ru(e),t=Ea(t);var i=e.length;r=r===n?i:ui(Nu(r),0,i);var a=r;return r-=t.length,r>=0&&e.slice(r,a)==t}function Fd(e){return e=Ru(e),e&&Ee.test(e)?e.replace(we,Jn):e}function Id(e){return e=Ru(e),e&&Pe.test(e)?e.replace(Ne,`\\$&`):e}var Ld=oo(function(e,t,n){return e+(n?`-`:``)+t.toLowerCase()}),Rd=oo(function(e,t,n){return e+(n?` `:``)+t.toLowerCase()}),zd=ao(`toLowerCase`);function Bd(e,t,n){e=Ru(e),t=Nu(t);var r=t?sr(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return po(Nt(i),n)+e+po(Mt(i),n)}function Vd(e,t,n){e=Ru(e),t=Nu(t);var r=t?sr(e):0;return t&&r>>0,r?(e=Ru(e),e&&(typeof t==`string`||t!=null&&!bu(t))&&(t=Ea(t),!t&&Zn(e))?Ra(cr(e),0,r):e.split(t,r)):[]}var Jd=oo(function(e,t,n){return e+(n?` `:``)+of(t)});function Yd(e,t,n){return e=Ru(e),n=n==null?0:ui(Nu(n),0,e.length),t=Ea(t),e.slice(n,n+t.length)==t}function Xd(e,t,r){var i=R.templateSettings;r&&Yo(e,t,r)&&(t=n),e=Ru(e),t=Hu({},t,i,bo);var a=Hu({},t.imports,i.imports,bo),o=sd(a),s=Hn(a,o);mn(o,function(e){if(Ve.test(e))throw new $e("Invalid `imports` option passed into `_.template`")});var c,l,u=0,d=t.interpolate||Ze,f=`__p += '`,p=rt((t.escape||Ze).source+`|`+d.source+`|`+(d===ke?Ue:Ze).source+`|`+(t.evaluate||Ze).source+`|$`,`g`),m=`//# sourceURL=`+(dt.call(t,`sourceURL`)?(t.sourceURL+``).replace(/\s/g,` `):`lodash.templateSources[`+ ++Ut+`]`)+` -`;e.replace(p,function(t,n,r,i,a,o){return r||=i,f+=e.slice(u,o).replace(Qe,Yn),n&&(c=!0,f+=`' + -__e(`+n+`) + -'`),a&&(l=!0,f+=`'; -`+a+`; -__p += '`),r&&(f+=`' + -((__t = (`+r+`)) == null ? '' : __t) + -'`),u=o+t.length,t}),f+=`'; -`;var h=dt.call(t,`variable`)&&t.variable;if(!h)f=`with (obj) { -`+f+` -} -`;else if(Ve.test(h))throw new $e("Invalid `variable` option passed into `_.template`");f=(l?f.replace(be,``):f).replace(xe,`$1`).replace(Se,`$1;`),f=`function(`+(h||`obj`)+`) { -`+(h?``:`obj || (obj = {}); -`)+`var __t, __p = ''`+(c?`, __e = _.escape`:``)+(l?`, __j = Array.prototype.join; -function print() { __p += __j.call(arguments, '') } -`:`; -`)+f+`return __p -}`;var g=cf(function(){return et(o,m+`return `+f).apply(n,s)});if(g.source=f,iu(g))throw g;return g}function Zd(e){return Ru(e).toLowerCase()}function Qd(e){return Ru(e).toUpperCase()}function $d(e,t,r){if(e=Ru(e),e&&(r||t===n))return Bn(e);if(!e||!(t=Ea(t)))return e;var i=cr(e),a=cr(t);return Ra(i,Wn(i,a),Gn(i,a)+1).join(``)}function ef(e,t,r){if(e=Ru(e),e&&(r||t===n))return e.slice(0,lr(e)+1);if(!e||!(t=Ea(t)))return e;var i=cr(e);return Ra(i,0,Gn(i,cr(t))+1).join(``)}function tf(e,t,r){if(e=Ru(e),e&&(r||t===n))return e.replace(Fe,``);if(!e||!(t=Ea(t)))return e;var i=cr(e);return Ra(i,Wn(i,cr(t))).join(``)}function nf(e,t){var r=30,i=`...`;if(lu(t)){var a=`separator`in t?t.separator:a;r=`length`in t?Nu(t.length):r,i=`omission`in t?Ea(t.omission):i}e=Ru(e);var o=e.length;if(Zn(e)){var s=cr(e);o=s.length}if(r>=o)return e;var c=r-sr(i);if(c<1)return i;var l=s?Ra(s,0,c).join(``):e.slice(0,c);if(a===n)return l+i;if(s&&(c+=l.length-c),bu(a)){if(e.slice(c).search(a)){var u,d=l;for(a.global||(a=rt(a.source,Ru(We.exec(a))+`g`)),a.lastIndex=0;u=a.exec(d);)var f=u.index;l=l.slice(0,f===n?c:f)}}else if(e.indexOf(Ea(a),c)!=c){var p=l.lastIndexOf(a);p>-1&&(l=l.slice(0,p))}return l+i}function rf(e){return e=Ru(e),e&&Te.test(e)?e.replace(Ce,ur):e}var af=oo(function(e,t,n){return e+(n?` `:``)+t.toUpperCase()}),of=ao(`toUpperCase`);function sf(e,t,r){return e=Ru(e),t=r?n:t,t===n?Qn(e)?pr(e):En(e):e.match(t)||[]}var cf=pa(function(e,t){try{return pn(e,n,t)}catch(e){return iu(e)?e:new $e(e)}}),lf=Eo(function(e,t){return mn(t,function(t){t=ys(t),ci(e,t,_l(e[t],e))}),e});function uf(e){var t=e==null?0:e.length,n=Mo();return e=t?yn(e,function(e){if(typeof e[1]!=`function`)throw new at(r);return[n(e[0]),e[1]]}):[],pa(function(n){for(var r=-1;++rg)return[];var n=v,r=Kt(e,v);t=Mo(t),e-=v;for(var i=Rn(r,t);++n0||t<0)?new Cr(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==n&&(t=Nu(t),r=t<0?r.dropRight(-t):r.take(t-e)),r)},Cr.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Cr.prototype.toArray=function(){return this.take(v)},wi(Cr.prototype,function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),a=R[i?`take`+(t==`last`?`Right`:``):t],o=i||/^find/.test(t);a&&(R.prototype[t]=function(){var t=this.__wrapped__,s=i?[1]:arguments,c=t instanceof Cr,l=s[0],u=c||ql(t),d=function(e){var t=a.apply(R,bn([e],s));return i&&f?t[0]:t};u&&r&&typeof l==`function`&&l.length!=1&&(c=u=!1);var f=this.__chain__,p=!!this.__actions__.length,m=o&&!f,h=c&&!p;if(!o&&u){t=h?t:new Cr(this);var g=e.apply(t,s);return g.__actions__.push({func:J,args:[d],thisArg:n}),new Sr(g,f)}return m&&h?e.apply(this,s):(g=this.thru(d),m?i?g.value()[0]:g.value():g)})}),mn([`pop`,`push`,`shift`,`sort`,`splice`,`unshift`],function(e){var t=ot[e],n=/^(?:push|sort|unshift)$/.test(e)?`tap`:`thru`,r=/^(?:pop|shift)$/.test(e);R.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(ql(i)?i:[],e)}return this[n](function(n){return t.apply(ql(n)?n:[],e)})}}),wi(Cr.prototype,function(e,t){var n=R[t];if(n){var r=n.name+``;dt.call(Pn,r)||(Pn[r]=[]),Pn[r].push({name:t,func:n})}}),Pn[U(n,s).name]=[{name:`wrapper`,func:n}],Cr.prototype.clone=wr,Cr.prototype.reverse=Tr,Cr.prototype.value=Er,R.prototype.at=Pc,R.prototype.chain=Fc,R.prototype.commit=Ic,R.prototype.next=Lc,R.prototype.plant=zc,R.prototype.reverse=Bc,R.prototype.toJSON=R.prototype.valueOf=R.prototype.value=Vc,R.prototype.first=R.prototype.head,Et&&(R.prototype[Et]=Rc),R})();typeof define==`function`&&typeof define.amd==`object`&&define.amd?(en._=mr,define(function(){return mr})):nn?((nn.exports=mr)._=mr,tn._=mr):en._=mr}).call(e)})),mg=[];for(let e=0;e<256;++e)mg.push((e+256).toString(16).slice(1));function Gee(e,t=0){return(mg[e[t+0]]+mg[e[t+1]]+mg[e[t+2]]+mg[e[t+3]]+`-`+mg[e[t+4]]+mg[e[t+5]]+`-`+mg[e[t+6]]+mg[e[t+7]]+`-`+mg[e[t+8]]+mg[e[t+9]]+`-`+mg[e[t+10]]+mg[e[t+11]]+mg[e[t+12]]+mg[e[t+13]]+mg[e[t+14]]+mg[e[t+15]]).toLowerCase()}var Kee=new Uint8Array(16);function hg(){return crypto.getRandomValues(Kee)}function gg(e,t,n){return!t&&!e&&crypto.randomUUID?crypto.randomUUID():_g(e,t,n)}function _g(e,t,n){e||={};let r=e.random??e.rng?.()??hg();if(r.length<16)throw Error(`Random bytes length must be >= 16`);if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){if(n||=0,n<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=r[e];return t}return Gee(r)}var vg=Wee(),yg=e=>!e.type||`singboxChannel`in e||e.type===`singbox`,bg=e=>e.filter(e=>e.type!==`singbox`).map(e=>({...(0,vg.omit)(e,`singboxChannel`),type:`clash`})),xg=X(`setup/api-list`,[]);xg.value.some(yg)&&(xg.value=bg(xg.value));var Sg=X(`setup/active-uuid`,``);Sg.value&&!xg.value.some(e=>e.uuid===Sg.value)&&(Sg.value=``);var Cg=Y(()=>xg.value.find(e=>e.uuid===Sg.value)),wg=e=>{Sg.value=e},Tg=I(null),Eg=(e={mode:`list`})=>{Tg.value=e},Dg=()=>{Tg.value=null},qee=e=>{if(xg.value.length<2)return null;let t=xg.value.findIndex(e=>e.uuid===Sg.value),n=((t>=0?t:0)+e+xg.value.length)%xg.value.length,r=xg.value[n];return r?(wg(r.uuid),r):null},Og=e=>{let t=xg.value.find(t=>(0,vg.isEqual)((0,vg.omit)(t,`uuid`),e));if(t)return wg(t.uuid),t.uuid;let n=gg();return xg.value.push({...e,uuid:n}),wg(n),n},Jee=(e,t)=>{let n=xg.value.findIndex(t=>t.uuid===e);n!==-1&&(xg.value[n]={...t,uuid:e})},Yee=e=>{let t=Sg.value===e;xg.value=xg.value.filter(t=>t.uuid!==e),t&&wg(xg.value[0]?.uuid??``),rg.value.forEach(t=>{t.scope&&t.scope.includes(e)&&(t.scope=t.scope.filter(t=>t!==e),t.scope.length||delete t.scope)})};function kg(e,t){return function(){return e.apply(t,arguments)}}var{toString:Xee}=Object.prototype,{getPrototypeOf:Ag}=Object,{iterator:jg,toStringTag:Mg}=Symbol,Ng=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Pg=(e,t)=>{let n=e,r=[];for(;n!=null&&n!==Object.prototype;){if(r.indexOf(n)!==-1)return!1;if(r.push(n),Ng(n,t))return!0;n=Ag(n)}return!1},Zee=(e,t)=>e!=null&&Pg(e,t)?e[t]:void 0,Fg=(e=>t=>{let n=Xee.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ig=e=>(e=e.toLowerCase(),t=>Fg(t)===e),Lg=e=>t=>typeof t===e,{isArray:Rg}=Array,zg=Lg(`undefined`);function Bg(e){return e!==null&&!zg(e)&&e.constructor!==null&&!zg(e.constructor)&&Hg(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var Vg=Ig(`ArrayBuffer`);function Qee(e){let t;return t=typeof ArrayBuffer<`u`&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&Vg(e.buffer),t}var $ee=Lg(`string`),Hg=Lg(`function`),Ug=Lg(`number`),Wg=e=>typeof e==`object`&&!!e,ete=e=>e===!0||e===!1,Gg=e=>{if(!Wg(e))return!1;let t=Ag(e);return(t===null||t===Object.prototype||Ag(t)===null)&&!Pg(e,Mg)&&!Pg(e,jg)},tte=e=>{if(!Wg(e)||Bg(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},nte=Ig(`Date`),rte=Ig(`File`),ite=e=>!!(e&&e.uri!==void 0),ate=e=>e&&e.getParts!==void 0,ote=Ig(`Blob`),ste=Ig(`FileList`),cte=Ig(`Set`),lte=e=>Wg(e)&&Hg(e.pipe);function ute(){return typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{}}var Kg=ute(),qg=Kg.FormData===void 0?void 0:Kg.FormData,dte=e=>{if(!e)return!1;if(qg&&e instanceof qg)return!0;let t=Ag(e);if(!t||t===Object.prototype||!Hg(e.append))return!1;let n=Fg(e);return n===`formdata`||n===`object`&&Hg(e.toString)&&e.toString()===`[object FormData]`},fte=Ig(`URLSearchParams`),[pte,mte,hte,gte]=[`ReadableStream`,`Request`,`Response`,`Headers`].map(Ig),_te=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``);function Jg(e,t,{allOwnKeys:n=!1}={}){if(e==null)return;let r,i;if(typeof e!=`object`&&(e=[e]),Rg(e))for(r=0,i=e.length;r0;)if(i=n[r],t===i.toLowerCase())return i;return null}var Xg=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:global,Zg=e=>!zg(e)&&e!==Xg;function Qg(...e){let{caseless:t,skipUndefined:n}=Zg(this)&&this||{},r={},i=(e,i)=>{if(i===`__proto__`||i===`constructor`||i===`prototype`)return;let a=t&&typeof i==`string`&&Yg(r,i)||i,o=Ng(r,a)?r[a]:void 0;Gg(o)&&Gg(e)?r[a]=Qg(o,e):Gg(e)?r[a]=Qg({},e):Rg(e)?r[a]=e.slice():(!n||!zg(e))&&(r[a]=e)};for(let t=0,n=e.length;t(Jg(t,(t,r)=>{n&&Hg(t)?Object.defineProperty(e,r,{__proto__:null,value:kg(t,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,r,{__proto__:null,value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),yte=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),bte=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},xte=(e,t,n,r)=>{let i,a,o,s={};if(t||={},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-->0;)o=i[a],(!r||r(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=n!==!1&&Ag(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Ste=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;let r=e.indexOf(t,n);return r!==-1&&r===n},Cte=e=>{if(!e)return null;if(Rg(e))return e;let t=e.length;if(!Ug(t))return null;let n=Array(t);for(;t-->0;)n[t]=e[t];return n},wte=(e=>t=>e&&t instanceof e)(typeof Uint8Array<`u`&&Ag(Uint8Array)),Tte=(e,t)=>{let n=(e&&e[jg]).call(e),r;for(;(r=n.next())&&!r.done;){let n=r.value;t.call(e,n[0],n[1])}},Ete=(e,t)=>{let n,r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Dte=Ig(`HTMLFormElement`),Ote=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),{propertyIsEnumerable:kte}=Object.prototype,Ate=Ig(`RegExp`),$g=(e,t)=>{let n=Object.getOwnPropertyDescriptors(e),r={};Jg(n,(n,i)=>{let a;(a=t(n,i,e))!==!1&&(r[i]=a||n)}),Object.defineProperties(e,r)},jte=e=>{$g(e,(t,n)=>{if(Hg(e)&&[`arguments`,`caller`,`callee`].includes(n))return!1;let r=e[n];if(Hg(r)){if(t.enumerable=!1,`writable`in t){t.writable=!1;return}t.set||=()=>{throw Error(`Can not rewrite read-only method '`+n+`'`)}}})},Mte=(e,t)=>{let n={},r=e=>{e.forEach(e=>{n[e]=!0})};return Rg(e)?r(e):r(String(e).split(t)),n},Nte=()=>{},Pte=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Fte(e){return!!(e&&Hg(e.append)&&e[Mg]===`FormData`&&e[jg])}var Ite=e=>{let t=new WeakSet,n=e=>{if(Wg(e)){if(t.has(e))return;if(Bg(e))return e;if(!(`toJSON`in e)){t.add(e);let r;if(cte(e)){r=[];for(let t of e){let e=n(t);!zg(e)&&r.push(e)}}else r=Rg(e)?[]:{},Jg(e,(e,t)=>{let i=n(e);!zg(i)&&(r[t]=i)});return t.delete(e),r}}return e};return n(e)},Lte=Ig(`AsyncFunction`),Rte=e=>e&&(Wg(e)||Hg(e))&&Hg(e.then)&&Hg(e.catch),e_=((e,t)=>e?setImmediate:t?((e,t)=>(Xg.addEventListener(`message`,({source:n,data:r})=>{n===Xg&&r===e&&t.length&&t.shift()()},!1),n=>{t.push(n),Xg.postMessage(e,`*`)}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate==`function`,Hg(Xg.postMessage)),zte=typeof queueMicrotask<`u`?queueMicrotask.bind(Xg):typeof process<`u`&&process.nextTick||e_,t_=e=>e!=null&&Hg(e[jg]),Q={isArray:Rg,isArrayBuffer:Vg,isBuffer:Bg,isFormData:dte,isArrayBufferView:Qee,isString:$ee,isNumber:Ug,isBoolean:ete,isObject:Wg,isPlainObject:Gg,isEmptyObject:tte,isReadableStream:pte,isRequest:mte,isResponse:hte,isHeaders:gte,isUndefined:zg,isDate:nte,isFile:rte,isReactNativeBlob:ite,isReactNative:ate,isBlob:ote,isRegExp:Ate,isFunction:Hg,isStream:lte,isURLSearchParams:fte,isTypedArray:wte,isFileList:ste,forEach:Jg,merge:Qg,extend:vte,trim:_te,stripBOM:yte,inherits:bte,toFlatObject:xte,kindOf:Fg,kindOfTest:Ig,endsWith:Ste,toArray:Cte,forEachEntry:Tte,matchAll:Ete,isHTMLForm:Dte,hasOwnProperty:Ng,hasOwnProp:Ng,hasOwnInPrototypeChain:Pg,getSafeProp:Zee,reduceDescriptors:$g,freezeMethods:jte,toObjectSet:Mte,toCamelCase:Ote,noop:Nte,toFiniteNumber:Pte,findKey:Yg,global:Xg,isContextDefined:Zg,isSpecCompliantForm:Fte,toJSONObject:Ite,isAsyncFn:Lte,isThenable:Rte,setImmediate:e_,asap:zte,isIterable:t_,isSafeIterable:e=>e!=null&&Pg(e,jg)&&t_(e)},Bte=Q.toObjectSet([`age`,`authorization`,`content-length`,`content-type`,`etag`,`expires`,`from`,`host`,`if-modified-since`,`if-unmodified-since`,`last-modified`,`location`,`max-forwards`,`proxy-authorization`,`referer`,`retry-after`,`user-agent`]),Vte=e=>{let t={},n,r,i;return e&&e.split(` -`).forEach(function(e){i=e.indexOf(`:`),n=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim();let a=Q.hasOwnProp(t,n);!n||a&&Q.hasOwnProp(Bte,n)||(n===`set-cookie`?a?t[n].push(r):t[n]=[r]:t[n]=a?t[n]+`, `+r:r)}),t};function Hte(e){let t=0,n=e.length;for(;tt;){let t=e.charCodeAt(n-1);if(t!==9&&t!==32)break;--n}return t===0&&n===e.length?e:e.slice(t,n)}var Ute=RegExp(`[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+`,`g`),Wte=RegExp(`[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+`,`g`);function n_(e,t){return Q.isArray(e)?e.map(e=>n_(e,t)):Hte(String(e).replace(t,``))}var Gte=e=>n_(e,Ute),Kte=e=>n_(e,Wte);function r_(e){let t=Object.create(null);return Q.forEach(e.toJSON(),(e,n)=>{t[n]=Kte(e)}),t}var i_=Symbol(`internals`);function a_(e){return e&&String(e).trim().toLowerCase()}function o_(e){return e===!1||e==null?e:Q.isArray(e)?e.map(o_):Gte(String(e))}function qte(e){let t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}var Jte=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function s_(e){let t=0,n=e.length;for(;tt;){let t=e.charCodeAt(n-1);if(t!==9&&t!==32)break;--n}return t===0&&n===e.length?e:e.slice(t,n)}function Yte(e){let t=e.length-1;if(t<1||e.charCodeAt(0)!==34||e.charCodeAt(t)!==34)return e;let n=``;for(let r=1;r=t))return e;n+=e[r]}return n}function c_(e){let t=Object.create(null),n=String(e),r=0,i=!1,a=!1;function o(e){let i=s_(n.slice(r,e)),a=i.indexOf(`=`);if(a<1)return;let o=s_(i.slice(0,a));if(!Jte.test(o))return;let s=o.toLowerCase();if(s===`__proto__`||s===`constructor`||s===`prototype`)return;let c=s_(i.slice(a+1));t[s]=Yte(c)}for(let e=0;e/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function u_(e,t,n,r,i){if(Q.isFunction(r))return r.call(this,t,n);if(i&&(t=n),Q.isString(t)){if(Q.isString(r))return t.indexOf(r)!==-1;if(Q.isRegExp(r))return r.test(t)}}function d_(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}function f_(e,t){let n=Q.toCamelCase(` `+t);[`get`,`set`,`has`].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})})}var p_=class{constructor(e){e&&this.set(e)}set(e,t,n){let r=this;function i(e,t,n){let i=a_(t);if(!i)return;let a=Q.findKey(r,i);(!a||r[a]===void 0||n===!0||n===void 0&&r[a]!==!1)&&(r[a||t]=o_(e))}let a=(e,t)=>Q.forEach(e,(e,n)=>i(e,n,t));if(Q.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(Q.isString(e)&&(e=e.trim())&&!l_(e))a(Vte(e),t);else if(Q.isObject(e)&&Q.isSafeIterable(e)){let n=Object.create(null),r,i;for(let t of e){if(!Q.isArray(t))throw TypeError(`Object iterator must return a key-value pair`);i=t[0],Q.hasOwnProp(n,i)?(r=n[i],n[i]=Q.isArray(r)?[...r,t[1]]:[r,t[1]]):n[i]=t[1]}a(n,t)}else e!=null&&i(t,e,n);return this}get(e,t){if(e=a_(e),e){let n=Q.findKey(this,e);if(n){let e=this[n];if(!t)return e;if(t===!0)return qte(e);if(Q.isFunction(t))return t.call(this,e,n);if(Q.isRegExp(t))return t.exec(e);throw TypeError(`parser must be boolean|regexp|function`)}}}has(e,t){if(e=a_(e),e){let n=Q.findKey(this,e);return!!(n&&this[n]!==void 0&&(!t||u_(this,this[n],n,t)))}return!1}delete(e,t){let n=this,r=!1;function i(e){if(e=a_(e),e){let i=Q.findKey(n,e);i&&(!t||u_(n,n[i],i,t))&&(delete n[i],r=!0)}}return Q.isArray(e)?e.forEach(i):i(e),r}clear(e){let t=Object.keys(this),n=t.length,r=!1;for(;n--;){let i=t[n];(!e||u_(this,this[i],i,e,!0))&&(delete this[i],r=!0)}return r}normalize(e){let t=this,n={};return Q.forEach(this,(r,i)=>{let a=Q.findKey(n,i);if(a){t[a]=o_(r),delete t[i];return}let o=e?d_(i):String(i).trim();o!==i&&delete t[i],t[o]=o_(r),n[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return Q.forEach(this,(n,r)=>{n!=null&&n!==!1&&(t[r]=e&&Q.isArray(n)?n.join(`, `):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+`: `+t).join(` -`)}getSetCookie(){let e=this.get(`set-cookie`);return Q.isArray(e)?e:e==null||e===!1?[]:[e]}get[Symbol.toStringTag](){return`AxiosHeaders`}static from(e){return e instanceof this?e:new this(e)}static parseParameters(e){return c_(e)}static concat(e,...t){let n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){let t=(this[i_]=this[i_]={accessors:{}}).accessors,n=this.prototype;function r(e){let r=a_(e);t[r]||(f_(n,e),t[r]=!0)}return Q.isArray(e)?e.forEach(r):r(e),this}};p_.accessor([`Content-Type`,`Content-Length`,`Accept`,`Accept-Encoding`,`User-Agent`,`Authorization`]),Q.reduceDescriptors(p_.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),Q.freezeMethods(p_);var m_=`[REDACTED ****]`;function h_(e){if(Q.hasOwnProp(e,`toJSON`))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(Q.hasOwnProp(t,`toJSON`))return!0;t=Object.getPrototypeOf(t)}return!1}function g_(e,t){let n=new Set(t.map(e=>String(e).toLowerCase())),r=[],i=e=>{if(typeof e!=`object`||!e||Q.isBuffer(e))return e;if(r.indexOf(e)!==-1)return;e instanceof p_&&(e=e.toJSON()),r.push(e);let t;if(Q.isArray(e))t=[],e.forEach((e,n)=>{let r=i(e);Q.isUndefined(r)||(t[n]=r)});else{if(!Q.isPlainObject(e)&&h_(e))return r.pop(),e;t=Object.create(null);for(let[r,a]of Object.entries(e)){let e=n.has(r.toLowerCase())?m_:i(a);Q.isUndefined(e)||(t[r]=e)}}return r.pop(),t};return i(e)}function __(e){try{return String(e)}catch{return``}}function v_(e){return e.errors.map(e=>{try{return e&&e.message?__(e.message):__(e)}catch{return``}}).filter(Boolean).join(`; `)||e.name||`AggregateError`}var y_=class e extends Error{static from(t,n,r,i,a,o){let s=t.message;!s&&Q.isArray(t.errors)&&t.errors.length&&(s=v_(t));let c=new e(s,n||t.code,r,i,a);return Object.defineProperty(c,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),c.name=t.name,t.status!=null&&c.status==null&&(c.status=t.status),o&&Object.assign(c,o),c}constructor(e,t,n,r,i){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name=`AxiosError`,this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status)}toJSON(){let e=this.config,t=e&&Q.hasOwnProp(e,`redact`)?e.redact:void 0,n=Q.isArray(t)&&t.length>0?g_(e,t):Q.toJSONObject(e);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:n,code:this.code,status:this.status}}};y_.ERR_BAD_OPTION_VALUE=`ERR_BAD_OPTION_VALUE`,y_.ERR_BAD_OPTION=`ERR_BAD_OPTION`,y_.ECONNABORTED=`ECONNABORTED`,y_.ETIMEDOUT=`ETIMEDOUT`,y_.ECONNREFUSED=`ECONNREFUSED`,y_.ERR_NETWORK=`ERR_NETWORK`,y_.ERR_FR_TOO_MANY_REDIRECTS=`ERR_FR_TOO_MANY_REDIRECTS`,y_.ERR_DEPRECATED=`ERR_DEPRECATED`,y_.ERR_BAD_RESPONSE=`ERR_BAD_RESPONSE`,y_.ERR_BAD_REQUEST=`ERR_BAD_REQUEST`,y_.ERR_CANCELED=`ERR_CANCELED`,y_.ERR_NOT_SUPPORT=`ERR_NOT_SUPPORT`,y_.ERR_INVALID_URL=`ERR_INVALID_URL`,y_.ERR_FORM_DATA_DEPTH_EXCEEDED=`ERR_FORM_DATA_DEPTH_EXCEEDED`;function b_(e){return Q.isPlainObject(e)||Q.isArray(e)}function x_(e){return Q.endsWith(e,`[]`)?e.slice(0,-2):e}function S_(e,t,n){return e?e.concat(t).map(function(e,t){return e=x_(e),!n&&t?`[`+e+`]`:e}).join(n?`.`:``):t}function C_(e){return Q.isArray(e)&&!e.some(b_)}var w_=Q.toFlatObject(Q,{},null,function(e){return/^is[A-Z]/.test(e)});function T_(e,t,n){if(!Q.isObject(e))throw TypeError(`target must be an object`);t||=new FormData,n=Q.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!Q.isUndefined(t[e])});let r=n.metaTokens,i=n.visitor||m,a=n.dots,o=n.indexes,s=n.Blob||typeof Blob<`u`&&Blob,c=n.maxDepth===void 0?100:n.maxDepth,l=s&&Q.isSpecCompliantForm(t),u=[];if(!Q.isFunction(i))throw TypeError(`visitor must be a function`);function d(e){if(e===null)return``;if(Q.isDate(e))return e.toISOString();if(Q.isBoolean(e))return e.toString();if(!l&&Q.isBlob(e))throw new y_(`Blob is not supported. Use a Buffer instead.`);if(Q.isArrayBuffer(e)||Q.isTypedArray(e)){if(l&&typeof s==`function`)return new s([e]);throw new y_(`Blob is not supported. Use a Buffer instead.`,y_.ERR_NOT_SUPPORT)}return e}function f(e){if(e>c)throw new y_(`Object is too deeply nested (`+e+` levels). Max depth: `+c,y_.ERR_FORM_DATA_DEPTH_EXCEEDED)}function p(e,t){if(c===1/0)return JSON.stringify(e);let n=[];return JSON.stringify(e,function(e,r){if(!Q.isObject(r))return r;for(;n.length&&n[n.length-1]!==this;)n.pop();return n.push(r),f(t+n.length-1),r})}function m(e,n,i){let s=e;if(Q.isReactNative(t)&&Q.isReactNativeBlob(e))return t.append(S_(i,n,a),d(e)),!1;if(e&&!i&&typeof e==`object`){if(Q.endsWith(n,`{}`))n=r?n:n.slice(0,-2),e=p(e,1);else if(Q.isArray(e)&&C_(e)||(Q.isFileList(e)||Q.endsWith(n,`[]`))&&(s=Q.toArray(e)))return n=x_(n),s.forEach(function(e,r){!(Q.isUndefined(e)||e===null)&&t.append(o===!0?S_([n],r,a):o===null?n:n+`[]`,d(e))}),!1}return b_(e)?!0:(t.append(S_(i,n,a),d(e)),!1)}let h=Object.assign(w_,{defaultVisitor:m,convertValue:d,isVisitable:b_});function g(e,n,r=0){if(!Q.isUndefined(e)){if(f(r),u.indexOf(e)!==-1)throw Error(`Circular reference detected in `+n.join(`.`));u.push(e),Q.forEach(e,function(e,a){(!(Q.isUndefined(e)||e===null)&&i.call(t,e,Q.isString(a)?a.trim():a,n,h))===!0&&g(e,n?n.concat(a):[a],r+1)}),u.pop()}}if(!Q.isObject(e))throw TypeError(`data must be an object`);return g(e),t}function E_(e){let t={"!":`%21`,"'":`%27`,"(":`%28`,")":`%29`,"~":`%7E`,"%20":`+`};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(e){return t[e]})}function D_(e,t){this._pairs=[],e&&T_(e,this,t)}var O_=D_.prototype;O_.append=function(e,t){this._pairs.push([e,t])},O_.toString=function(e){let t=e?t=>e.call(this,t,E_):E_;return this._pairs.map(function(e){return t(e[0])+`=`+t(e[1])},``).join(`&`)};function Xte(e){return encodeURIComponent(e).replace(/%3A/gi,`:`).replace(/%24/g,`$`).replace(/%2C/gi,`,`).replace(/%20/g,`+`)}function k_(e,t,n){if(!t)return e;e||=``;let r=Q.isFunction(n)?{serialize:n}:n,i=Q.getSafeProp(r,`encode`)||Xte,a=Q.getSafeProp(r,`serialize`),o;if(o=a?a(t,r):Q.isURLSearchParams(t)?t.toString():new D_(t,r).toString(i),o){let t=e.indexOf(`#`);t!==-1&&(e=e.slice(0,t)),e+=(e.indexOf(`?`)===-1?`?`:`&`)+o}return e}var A_=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&=[]}forEach(e){Q.forEach(this.handlers,function(t){t!==null&&e(t)})}},j_={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},Zte={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<`u`?URLSearchParams:D_,FormData:typeof FormData<`u`?FormData:null,Blob:typeof Blob<`u`?Blob:null},protocols:[`http`,`https`,`file`,`blob`,`url`,`data`]},Qte=c({hasBrowserEnv:()=>M_,hasStandardBrowserEnv:()=>$te,hasStandardBrowserWebWorkerEnv:()=>ene,navigator:()=>N_,origin:()=>tne}),M_=typeof window<`u`&&typeof document<`u`,N_=typeof navigator==`object`&&navigator||void 0,$te=M_&&(!N_||[`ReactNative`,`NativeScript`,`NS`].indexOf(N_.product)<0),ene=typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope&&typeof self.importScripts==`function`,tne=M_&&window.location.href||`http://localhost`,P_={...Qte,...Zte};function nne(e,t){return T_(e,new P_.classes.URLSearchParams,{visitor:function(e,t,n,r){return P_.isNode&&Q.isBuffer(e)?(this.append(t,e.toString(`base64`)),!1):r.defaultVisitor.apply(this,arguments)},...t})}var F_=100;function I_(e){if(e>F_)throw new y_(`FormData field is too deeply nested (`+e+` levels). Max depth: `+F_,y_.ERR_FORM_DATA_DEPTH_EXCEEDED)}function rne(e){let t=[],n=/[^.[\]]+|\[([^.[\]]*)]/g,r;for(;(r=n.exec(e))!==null;)I_(t.length),t.push(r[0]===`[]`?``:r[1]||r[0]);return t}function ine(e){let t={},n=Object.keys(e),r,i=n.length,a;for(r=0;r=e.length;return a=!a&&Q.isArray(r)?r.length:a,s?(Q.hasOwnProp(r,a)?r[a]=Q.isArray(r[a])?r[a].concat(n):[r[a],n]:r[a]=n,!o):((!Q.hasOwnProp(r,a)||!Q.isObject(r[a]))&&(r[a]=[]),t(e,n,r[a],i)&&Q.isArray(r[a])&&(r[a]=ine(r[a])),!o)}if(Q.isFormData(e)&&Q.isFunction(e.entries)){let n={};return Q.forEachEntry(e,(e,r)=>{t(rne(e),r,n,0)}),n}return null}var R_=(e,t)=>e!=null&&Q.hasOwnProp(e,t)?e[t]:void 0;function ane(e,t,n){if(Q.isString(e))try{return(t||JSON.parse)(e),Q.trim(e)}catch(e){if(e.name!==`SyntaxError`)throw e}return(n||JSON.stringify)(e)}var z_={transitional:j_,adapter:[`xhr`,`http`,`fetch`],transformRequest:[function(e,t){let n=t.getContentType()||``,r=n.indexOf(`application/json`)>-1,i=Q.isObject(e);if(i&&Q.isHTMLForm(e)&&(e=new FormData(e)),Q.isFormData(e))return r?JSON.stringify(L_(e)):e;if(Q.isArrayBuffer(e)||Q.isBuffer(e)||Q.isStream(e)||Q.isFile(e)||Q.isBlob(e)||Q.isReadableStream(e))return e;if(Q.isArrayBufferView(e))return e.buffer;if(Q.isURLSearchParams(e))return t.setContentType(`application/x-www-form-urlencoded;charset=utf-8`,!1),e.toString();let a;if(i){let t=R_(this,`formSerializer`);if(n.indexOf(`application/x-www-form-urlencoded`)>-1)return nne(e,t).toString();if((a=Q.isFileList(e))||n.indexOf(`multipart/form-data`)>-1){let n=R_(this,`env`),r=n&&n.FormData;return T_(a?{"files[]":e}:e,r&&new r,t)}}return i||r?(t.setContentType(`application/json`,!1),ane(e)):e}],transformResponse:[function(e){let t=R_(this,`transitional`)||z_.transitional,n=t&&t.forcedJSONParsing,r=R_(this,`responseType`),i=r===`json`;if(Q.isResponse(e)||Q.isReadableStream(e))return e;if(e&&Q.isString(e)&&(n&&!r||i)){let n=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e,R_(this,`parseReviver`))}catch(e){if(n)throw e.name===`SyntaxError`?y_.from(e,y_.ERR_BAD_RESPONSE,this,null,R_(this,`response`)):e}}return e}],timeout:0,xsrfCookieName:`XSRF-TOKEN`,xsrfHeaderName:`X-XSRF-TOKEN`,maxContentLength:-1,maxBodyLength:-1,env:{FormData:P_.classes.FormData,Blob:P_.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:`application/json, text/plain, */*`,"Content-Type":void 0}}};Q.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`,`query`],e=>{z_.headers[e]={}});function B_(e,t){let n=this||z_,r=t||n,i=p_.from(r.headers),a=r.data;return Q.forEach(e,function(e){a=e.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function V_(e){return!!(e&&e.__CANCEL__)}var H_=class extends y_{constructor(e,t,n){super(e??`canceled`,y_.ERR_CANCELED,t,n),this.name=`CanceledError`,this.__CANCEL__=!0}};function U_(e,t,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new y_(`Request failed with status code `+n.status,n.status>=400&&n.status<500?y_.ERR_BAD_REQUEST:y_.ERR_BAD_RESPONSE,n.config,n.request,n))}function one(e){let t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||``}function sne(e,t){e||=10;let n=Array(e),r=Array(e),i=0,a=0,o;return t=t===void 0?1e3:t,function(s){let c=Date.now(),l=r[a];o||=c,n[i]=s,r[i]=c;let u=a,d=0;for(;u!==i;)d+=n[u++],u%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),c-o{n=r,i=null,a&&=(clearTimeout(a),null),e(...t)};return[(...e)=>{let t=Date.now(),s=t-n;s>=r?o(e,t):(i=e,a||=setTimeout(()=>{a=null,o(i)},r-s))},()=>i&&o(i)]}var W_=(e,t,n=3)=>{let r=0,i=sne(50,250);return cne(n=>{if(!n||typeof n.loaded!=`number`)return;let a=n.loaded,o=n.lengthComputable?n.total:void 0,s=Math.max(0,o==null?a:Math.min(a,o)),c=Math.max(0,s-r),l=i(c);r=Math.max(r,s),e({loaded:s,total:o,progress:o?s/o:void 0,bytes:c,rate:l||void 0,estimated:l&&o?(o-s)/l:void 0,event:n,lengthComputable:o!=null,[t?`download`:`upload`]:!0})},n)},G_=(e,t)=>{let n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},K_=(e,t=Q.asap)=>(...n)=>t(()=>e(...n)),lne=P_.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,P_.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(P_.origin),P_.navigator&&/(msie|trident)/i.test(P_.navigator.userAgent)):()=>!0,une=P_.hasStandardBrowserEnv?{write(e,t,n,r,i,a,o){if(typeof document>`u`)return;let s=[`${e}=${encodeURIComponent(t)}`];Q.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),Q.isString(r)&&s.push(`path=${r}`),Q.isString(i)&&s.push(`domain=${i}`),a===!0&&s.push(`secure`),Q.isString(o)&&s.push(`SameSite=${o}`),document.cookie=s.join(`; `)},read(e){if(typeof document>`u`)return null;let t=document.cookie.split(`;`);for(let n=0;n0&&e.charCodeAt(n-1)===47;)n--;return e.slice(0,n)+`/`+t.replace(/^\/+/,``)}var pne=/^https?:(?!\/\/)/i,mne=/[\t\n\r]/g;function hne(e){let t=0;for(;t`${t}${n}${m_}`)}function vne(e){let t=e.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${m_}@`),n=t.indexOf(`#`),r=(n===-1?t:t.slice(0,n)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${m_}`);return n===-1?r:`${r}#${_ne(t.slice(n+1))}`}function q_(e,t){if(typeof e==`string`){let n=gne(e);if(pne.test(n))throw new y_(`Invalid URL ${JSON.stringify(vne(n))}: missing "//" after protocol`,y_.ERR_INVALID_URL,t)}}function J_(e,t,n,r){q_(t,r);let i=!dne(t);return e&&(i||n===!1)?(q_(e,r),fne(e,t)):t}var Y_=e=>e instanceof p_?{...e}:e,yne=e=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t).enumerable)):Object.keys(e);function X_(e,t){e||={},t||={};let n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(e,t,n,r){return Q.isPlainObject(e)&&Q.isPlainObject(t)?Q.merge.call({caseless:r},e,t):Q.isPlainObject(t)?Q.merge({},t):Q.isArray(t)?t.slice():t}function i(e,t,n,i){if(!Q.isUndefined(t))return r(e,t,n,i);if(!Q.isUndefined(e))return r(void 0,e,n,i)}function a(e,t){if(!Q.isUndefined(t))return r(void 0,t)}function o(e,t){if(!Q.isUndefined(t))return r(void 0,t);if(!Q.isUndefined(e))return r(void 0,e)}function s(n){let r=Q.hasOwnProp(t,`transitional`)?t.transitional:void 0;if(!Q.isUndefined(r))if(Q.isPlainObject(r)){if(Q.hasOwnProp(r,n))return r[n]}else return;let i=Q.hasOwnProp(e,`transitional`)?e.transitional:void 0;if(Q.isPlainObject(i)&&Q.hasOwnProp(i,n))return i[n]}function c(n,i,a){if(Q.hasOwnProp(t,a))return r(n,i);if(Q.hasOwnProp(e,a))return r(void 0,n)}let l={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,allowedSocketPaths:o,responseEncoding:o,validateStatus:c,headers:(e,t,n)=>i(Y_(e),Y_(t),n,!0)};return Q.forEach(yne({...e,...t}),function(r){if(r===`__proto__`||r===`constructor`||r===`prototype`)return;let a=Q.hasOwnProp(l,r)?l[r]:i,o=a(Q.hasOwnProp(e,r)?e[r]:void 0,Q.hasOwnProp(t,r)?t[r]:void 0,r);Q.isUndefined(o)&&a!==c||(n[r]=o)}),Q.hasOwnProp(t,`validateStatus`)&&Q.isUndefined(t.validateStatus)&&s(`validateStatusUndefinedResolves`)===!1&&(Q.hasOwnProp(e,`validateStatus`)?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}var bne=[`content-type`,`content-length`];function xne(e,t,n){if(n!==`content-only`){e.set(t);return}Object.entries(t||{}).forEach(([t,n])=>{bne.includes(t.toLowerCase())&&e.set(t,n)})}var Sne=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16)));function Z_(e){let t=X_({},e),n=e=>Q.hasOwnProp(t,e)?t[e]:void 0,r=n(`data`),i=n(`withXSRFToken`),a=n(`xsrfHeaderName`),o=n(`xsrfCookieName`),s=n(`headers`),c=n(`auth`),l=n(`baseURL`),u=n(`allowAbsoluteUrls`),d=n(`url`);if(t.headers=s=p_.from(s),t.url=k_(J_(l,d,u,t),n(`params`),n(`paramsSerializer`)),c){let t=Q.getSafeProp(c,`username`)||``,n=Q.getSafeProp(c,`password`)||``;try{s.set(`Authorization`,`Basic `+btoa(t+`:`+(n?Sne(n):``)))}catch(t){throw y_.from(t,y_.ERR_BAD_OPTION_VALUE,e)}}if(Q.isFormData(r)&&(P_.hasStandardBrowserEnv||P_.hasStandardBrowserWebWorkerEnv||Q.isReactNative(r)?s.setContentType(void 0):Q.isFunction(r.getHeaders)&&xne(s,r.getHeaders(),n(`formDataHeaderPolicy`))),P_.hasStandardBrowserEnv&&(Q.isFunction(i)&&(i=i(t)),i===!0||i==null&&lne(t.url))){let e=a&&o&&une.read(o);e&&s.set(a,e)}return t}var Cne=typeof XMLHttpRequest<`u`&&function(e){return new Promise(function(t,n){let r=Z_(e),i=r.data,a=p_.from(r.headers).normalize(),{responseType:o,onUploadProgress:s,onDownloadProgress:c}=r,l,u,d,f,p;function m(){f&&f(),p&&p(),r.cancelToken&&r.cancelToken.unsubscribe(l),r.signal&&r.signal.removeEventListener(`abort`,l)}let h=new XMLHttpRequest;h.open(r.method.toUpperCase(),r.url,!0),h.timeout=r.timeout;function g(){if(!h)return;let r=p_.from(`getAllResponseHeaders`in h&&h.getAllResponseHeaders());U_(function(e){t(e),m()},function(e){n(e),m()},{data:!o||o===`text`||o===`json`?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:r,config:e,request:h}),h=null}`onloadend`in h?h.onloadend=g:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.startsWith(`file:`))||setTimeout(g)},h.onabort=function(){h&&=(n(new y_(`Request aborted`,y_.ECONNABORTED,e,h)),m(),null)},h.onerror=function(t){let r=new y_(t&&t.message?t.message:`Network Error`,y_.ERR_NETWORK,e,h);r.event=t||null,n(r),m(),h=null},h.ontimeout=function(){let t=r.timeout?`timeout of `+r.timeout+`ms exceeded`:`timeout exceeded`,i=r.transitional||j_;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new y_(t,i.clarifyTimeoutError?y_.ETIMEDOUT:y_.ECONNABORTED,e,h)),m(),h=null},i===void 0&&a.setContentType(null),`setRequestHeader`in h&&Q.forEach(r_(a),function(e,t){h.setRequestHeader(t,e)}),Q.isUndefined(r.withCredentials)||(h.withCredentials=!!r.withCredentials),o&&o!==`json`&&(h.responseType=r.responseType),c&&([d,p]=W_(c,!0),h.addEventListener(`progress`,d)),s&&h.upload&&([u,f]=W_(s),h.upload.addEventListener(`progress`,u),h.upload.addEventListener(`loadend`,f)),(r.cancelToken||r.signal)&&(l=t=>{h&&=(n(!t||t.type?new H_(null,e,h):t),h.abort(),m(),null)},r.cancelToken&&r.cancelToken.subscribe(l),r.signal&&(r.signal.aborted?l():r.signal.addEventListener(`abort`,l)));let _=one(r.url);if(_&&!P_.protocols.includes(_)){n(new y_(`Unsupported protocol `+_+`:`,y_.ERR_BAD_REQUEST,e)),m();return}h.send(i||null)})},wne=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;let n=new AbortController,r=!1,i=function(e){if(!r){r=!0,o();let t=e instanceof Error?e:this.reason;n.abort(t instanceof y_?t:new H_(t instanceof Error?t.message:t))}},a=t&&setTimeout(()=>{a=null,i(new y_(`timeout of ${t}ms exceeded`,y_.ETIMEDOUT))},t),o=()=>{e&&=(a&&clearTimeout(a),a=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener(`abort`,i)}),null)};e.forEach(e=>{if(!r){if(e.aborted){i.call(e);return}e.addEventListener(`abort`,i,{once:!0})}});let{signal:s}=n;return s.unsubscribe=()=>Q.asap(o),s},Tne=function*(e,t){let n=e.byteLength;if(!t||n{let i=Ene(e,t),a=0,o,s=e=>{o||(o=!0,r&&r(e))};return new ReadableStream({async pull(e){try{let{done:t,value:r}=await i.next();if(t){s(),e.close();return}let o=r.byteLength;n&&n(a+=o),e.enqueue(new Uint8Array(r))}catch(e){throw s(e),e}},cancel(e){return s(e),i.return()}},{highWaterMark:2})},$_=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,ev=(e,t,n)=>t+2e<=57?e-48:(e&223)-55,One=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===47||e===45||e===95,kne=e=>e===9||e===10||e===12||e===13||e===32,Ane=e=>{let t=Math.floor(e/4),n=e%4;return t*3+(n===2?1:n===3?2:0)},jne=e=>{let t=e.length,n=0;return t>0&&e.charCodeAt(t-1)===61&&(n++,t>1&&e.charCodeAt(t-2)===61&&n++),Math.floor((t-n)*3/4)},Mne=e=>{let t=e.length,n=0,r=0,i=!1;for(let a=0;a0){i=!0;continue}n++}}return i||r>2||r>0&&(n+r)%4!=0||n%4==1?jne(e):Ane(n)},Nne=(e,t)=>{if(!e||typeof e!=`string`||!e.startsWith(`data:`))return 0;let n=e.indexOf(`,`);if(n<0)return 0;let r=e.slice(5,n),i=e.slice(n+1);if(/;base64/i.test(r))return t(i);let a=0;for(let e=0,t=i.length;e=55296&&n<=56319&&e+1=56320&&t<=57343?(a+=4,e++):a+=3}else a+=3}return a};function Pne(e){let t=typeof e==`string`?e.indexOf(`#`):-1;return Nne(t===-1?e:e.slice(0,t),Mne)}var nv=`1.19.0`,rv=64*1024,{isFunction:iv}=Q,Fne=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16))),av=e=>{if(!Q.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},ov=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Ine=e=>{let t=e.indexOf(`://`),n=e;return t!==-1&&(n=n.slice(t+3)),n.includes(`@`)||n.includes(`:`)},Lne=e=>{let t=Q.global!==void 0&&Q.global!==null?Q.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=Q.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);let{fetch:i,Request:a,Response:o}=e,s=i?iv(i):typeof fetch==`function`,c=iv(a),l=iv(o);if(!s)return!1;let u=s&&iv(n),d=s&&(typeof r==`function`?(e=>t=>e.encode(t))(new r):async e=>new Uint8Array(await new a(e).arrayBuffer())),f=c&&u&&ov(()=>{let e=!1,t=new a(P_.origin,{body:new n,method:`POST`,get duplex(){return e=!0,`half`}}),r=t.headers.has(`Content-Type`);return t.body!=null&&t.body.cancel(),e&&!r}),p=l&&u&&ov(()=>Q.isReadableStream(new o(``).body)),m={stream:p&&(e=>e.body)};s&&[`text`,`arrayBuffer`,`blob`,`formData`,`stream`].forEach(e=>{!m[e]&&(m[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new y_(`Response type '${e}' is not supported`,y_.ERR_NOT_SUPPORT,n)})});let h=async e=>{if(e==null)return 0;if(Q.isBlob(e))return e.size;if(Q.isSpecCompliantForm(e))return(await new a(P_.origin,{method:`POST`,body:e}).arrayBuffer()).byteLength;if(Q.isArrayBufferView(e)||Q.isArrayBuffer(e))return e.byteLength;if(Q.isURLSearchParams(e)&&(e+=``),Q.isString(e))return(await d(e)).byteLength},g=async(e,t)=>Q.toFiniteNumber(e.getContentLength())??h(t);return async e=>{let{url:t,method:n,data:s,signal:l,cancelToken:d,timeout:_,onDownloadProgress:v,onUploadProgress:y,responseType:b,headers:x,withCredentials:S=`same-origin`,fetchOptions:C,maxContentLength:w,maxBodyLength:T}=Z_(e),E=Q.isNumber(w)&&w>-1,D=Q.isNumber(T)&&T>-1,O=t=>Q.hasOwnProp(e,t)?e[t]:void 0,k=i||fetch;b=b?(b+``).toLowerCase():`text`;let A=wne([l,d&&d.toAbortSignal()],_),j=null,M=A&&A.unsubscribe&&(()=>{A.unsubscribe()}),ee,te=null,ne=()=>new y_(`Request body larger than maxBodyLength limit`,y_.ERR_BAD_REQUEST,e,j);try{let i,l=O(`auth`);if(l&&(i={username:Q.getSafeProp(l,`username`)||``,password:Q.getSafeProp(l,`password`)||``}),Ine(t)){let e=new URL(t,P_.origin);!i&&(e.username||e.password)&&(i={username:av(e.username),password:av(e.password)}),(e.username||e.password)&&(e.username=``,e.password=``,t=e.href)}if(i&&(x.delete(`authorization`),x.set(`Authorization`,`Basic `+btoa(Fne((i.username||``)+`:`+(i.password||``))))),E&&typeof t==`string`&&t.startsWith(`data:`)&&Pne(t)>w)throw new y_(`maxContentLength size of `+w+` exceeded`,y_.ERR_BAD_RESPONSE,e,j);if(D&&n!==`get`&&n!==`head`){let e=await h(s);if(typeof e==`number`&&isFinite(e)&&(ee=e,e>T))throw ne()}let d=D&&(Q.isReadableStream(s)||Q.isStream(s)),_=(e,t,n)=>Q_(e,rv,e=>{if(D&&e>T)throw te=ne();t&&t(e)},n);if(f&&n!==`get`&&n!==`head`&&(y||d)){if(ee??=await g(x,s),ee!==0||d){let e=new a(t,{method:`POST`,body:s,duplex:`half`}),n;if(Q.isFormData(s)&&(n=e.headers.get(`content-type`))&&x.setContentType(n),e.body){let[t,n]=y&&G_(ee,W_(K_(y)))||[];s=_(e.body,t,n)}}}else if(d&&!c&&u&&n!==`get`&&n!==`head`)s=_(s);else if(d&&c&&!f&&n!==`get`&&n!==`head`)throw new y_(`Stream request bodies are not supported by the current fetch implementation`,y_.ERR_NOT_SUPPORT,e,j);Q.isString(S)||(S=S?`include`:`omit`);let N=c&&`credentials`in a.prototype;if(Q.isFormData(s)){let e=x.getContentType();e&&/^multipart\/form-data/i.test(e)&&!/boundary=/i.test(e)&&x.delete(`content-type`)}x.set(`User-Agent`,`axios/`+nv,!1);let re={...C,signal:A,method:n.toUpperCase(),headers:r_(x.normalize()),body:s,duplex:`half`,credentials:N?S:void 0};j=c&&new a(t,re);let ie=await(c?k(j,C):k(t,re)),ae=p_.from(ie.headers);if(E){let t=Q.toFiniteNumber(ae.getContentLength());if(t!=null&&t>w)throw new y_(`maxContentLength size of `+w+` exceeded`,y_.ERR_BAD_RESPONSE,e,j)}let oe=p&&(b===`stream`||b===`response`);if(p&&ie.body&&(v||E||oe&&M)){let t={};[`status`,`statusText`,`headers`].forEach(e=>{t[e]=ie[e]});let n=Q.toFiniteNumber(ae.getContentLength()),[r,i]=v&&G_(n,W_(K_(v),!0))||[],a=0;ie=new o(Q_(ie.body,rv,t=>{if(E&&(a=t,a>w))throw new y_(`maxContentLength size of `+w+` exceeded`,y_.ERR_BAD_RESPONSE,e,j);r&&r(t)},()=>{i&&i(),M&&M()}),t)}b||=`text`;let se=await m[Q.findKey(m,b)||`text`](ie,e);if(E&&!p&&!oe){let t;if(se!=null&&(typeof se.byteLength==`number`?t=se.byteLength:typeof se.size==`number`?t=se.size:typeof se==`string`&&(t=typeof r==`function`?new r().encode(se).byteLength:se.length)),typeof t==`number`&&t>w)throw new y_(`maxContentLength size of `+w+` exceeded`,y_.ERR_BAD_RESPONSE,e,j)}return!oe&&M&&M(),await new Promise((t,n)=>{U_(t,n,{data:se,headers:p_.from(ie.headers),status:ie.status,statusText:ie.statusText,config:e,request:j})})}catch(t){if(M&&M(),A&&A.aborted&&A.reason instanceof y_){let n=A.reason;throw n.config=e,j&&(n.request=j),t!==n&&Object.defineProperty(n,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),n}if(te)throw j&&!te.request&&(te.request=j),te;if(t instanceof y_)throw j&&!t.request&&(t.request=j),t;if(t&&t.name===`TypeError`&&/Load failed|fetch/i.test(t.message)){let n=new y_(`Network Error`,y_.ERR_NETWORK,e,j,t&&t.response);throw Object.defineProperty(n,"cause",{__proto__:null,value:t.cause||t,writable:!0,enumerable:!1,configurable:!0}),n}throw y_.from(t,t&&t.code,e,j,t&&t.response)}}},Rne=new Map,sv=e=>{let t=e&&e.env||{},{fetch:n,Request:r,Response:i}=t,a=[r,i,n],o=a.length,s,c,l=Rne;for(;o--;)s=a[o],c=l.get(s),c===void 0&&l.set(s,c=o?new Map:Lne(t)),l=c;return c};sv();var cv={http:null,xhr:Cne,fetch:{get:sv}};Q.forEach(cv,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});var lv=e=>`- ${e}`,zne=e=>Q.isFunction(e)||e===null||e===!1;function Bne(e,t){e=Q.isArray(e)?e:[e];let{length:n}=e,r,i,a={};for(let o=0;o`adapter ${e} `+(t===!1?`is not supported by the environment`:`is not available in the build`));throw new y_(`There is no suitable adapter to dispatch the request `+(n?e.length>1?`since : -`+e.map(lv).join(` -`):` `+lv(e[0]):`as no adapter specified`),y_.ERR_NOT_SUPPORT)}return i}var uv={getAdapter:Bne,adapters:cv};function dv(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new H_(null,e)}function fv(e){return dv(e),e.headers=p_.from(e.headers),e.data=B_.call(e,e.transformRequest),[`post`,`put`,`patch`].indexOf(e.method)!==-1&&e.headers.setContentType(`application/x-www-form-urlencoded`,!1),uv.getAdapter(e.adapter||z_.adapter,e)(e).then(function(t){dv(e),e.response=t;try{t.data=B_.call(e,e.transformResponse,t)}finally{delete e.response}return t.headers=p_.from(t.headers),t},function(t){if(!V_(t)&&(dv(e),t&&t.response)){e.response=t.response;try{t.response.data=B_.call(e,e.transformResponse,t.response)}finally{delete e.response}t.response.headers=p_.from(t.response.headers)}return Promise.reject(t)})}var pv={};[`object`,`boolean`,`number`,`function`,`string`,`symbol`].forEach((e,t)=>{pv[e]=function(n){return typeof n===e||`a`+(t<1?`n `:` `)+e}});var mv={};pv.transitional=function(e,t,n){function r(e,t){return`[Axios v`+nv+`] Transitional option '`+e+`'`+t+(n?`. `+n:``)}return(n,i,a)=>{if(e===!1)throw new y_(r(i,` has been removed`+(t?` in `+t:``)),y_.ERR_DEPRECATED);return t&&!mv[i]&&(mv[i]=!0,console.warn(r(i,` has been deprecated since v`+t+` and will be removed in the near future`))),!e||e(n,i,a)}},pv.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function Vne(e,t,n){if(typeof e!=`object`||!e)throw new y_(`options must be an object`,y_.ERR_BAD_OPTION_VALUE);let r=Object.keys(e),i=r.length;for(;i-->0;){let a=r[i],o=Object.prototype.hasOwnProperty.call(t,a)?t[a]:void 0;if(o){let t=e[a],n=t===void 0||o(t,a,e);if(n!==!0)throw new y_(`option `+a+` must be `+n,y_.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new y_(`Unknown option `+a,y_.ERR_BAD_OPTION)}}var hv={assertOptions:Vne,validators:pv},gv=hv.validators,_v=class{constructor(e){this.defaults=e||{},this.interceptors={request:new A_,response:new A_}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=Error();let n=(()=>{if(!t.stack)return``;let e=t.stack.indexOf(` -`);return e===-1?``:t.stack.slice(e+1)})();try{if(!e.stack)e.stack=n;else if(n){let t=n.indexOf(` -`),r=t===-1?-1:n.indexOf(` -`,t+1),i=r===-1?``:n.slice(r+1);String(e.stack).endsWith(i)||(e.stack+=` -`+n)}}catch{}}throw e}}_request(e,t){typeof e==`string`?(t||={},t.url=e):t=e||{},t=X_(this.defaults,t);let{transitional:n,paramsSerializer:r,headers:i}=t;n!==void 0&&hv.assertOptions(n,{silentJSONParsing:gv.transitional(gv.boolean),forcedJSONParsing:gv.transitional(gv.boolean),clarifyTimeoutError:gv.transitional(gv.boolean),legacyInterceptorReqResOrdering:gv.transitional(gv.boolean),advertiseZstdAcceptEncoding:gv.transitional(gv.boolean),validateStatusUndefinedResolves:gv.transitional(gv.boolean)},!1),r!=null&&(Q.isFunction(r)?t.paramsSerializer={serialize:r}:hv.assertOptions(r,{encode:gv.function,serialize:gv.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls===void 0?t.allowAbsoluteUrls=!0:t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls),hv.assertOptions(t,{baseUrl:gv.spelling(`baseURL`),withXsrfToken:gv.spelling(`withXSRFToken`)},!0),t.method=(t.method||this.defaults.method||`get`).toLowerCase();let a=i&&Q.merge(i.common,i[t.method]);i&&Q.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`,`query`,`common`],e=>{delete i[e]}),t.headers=p_.concat(a,i);let o=[],s=!0;this.interceptors.request.forEach(function(e){if(typeof e.runWhen==`function`&&e.runWhen(t)===!1)return;s&&=e.synchronous;let n=t.transitional||j_;n&&n.legacyInterceptorReqResOrdering?o.unshift(e.fulfilled,e.rejected):o.push(e.fulfilled,e.rejected)});let c=[];this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let l,u=0,d;if(!s){let e=[fv.bind(this),void 0];for(e.unshift(...o),e.push(...c),d=e.length,l=Promise.resolve(t);ufv.call(this,f)))}catch(e){l=Promise.reject(e)}break}}if(!l)try{l=fv.call(this,f)}catch(e){l=Promise.reject(e)}for(u=0,d=c.length;u{if(!n._listeners)return;let t=n._listeners.length;for(;t-->0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t,r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,i){n.reason||(n.reason=new H_(e,r,i),t(n.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;let t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}};function Une(e){return function(t){return e.apply(null,t)}}function Wne(e){return Q.isObject(e)&&e.isAxiosError===!0}var vv={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,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(vv).forEach(([e,t])=>{vv[t]=e});function yv(e){let t=new _v(e),n=kg(_v.prototype.request,t);return Q.extend(n,_v.prototype,t,{allOwnKeys:!0}),Q.extend(n,t,null,{allOwnKeys:!0}),n.create=function(t){return yv(X_(e,t))},n}var bv=yv(z_);bv.Axios=_v,bv.CanceledError=H_,bv.CancelToken=Hne,bv.isCancel=V_,bv.VERSION=nv,bv.toFormData=T_,bv.AxiosError=y_,bv.Cancel=bv.CanceledError,bv.all=function(e){return Promise.all(e)},bv.spread=Une,bv.isAxiosError=Wne,bv.mergeConfig=X_,bv.AxiosHeaders=p_,bv.formToJSON=e=>L_(Q.isHTMLForm(e)?new FormData(e):e),bv.getAdapter=uv.getAdapter,bv.HttpStatusCode=vv,bv.default=bv;var Gne=u(s(((e,t)=>{(function(e,n){typeof define==`function`&&define.amd?define([],n):t!==void 0&&t.exports?t.exports=n():e.ReconnectingWebSocket=n()})(e,function(){if(!(`WebSocket`in window))return;function e(t,n,r){var i={debug:!1,automaticOpen:!0,reconnectInterval:1e3,maxReconnectInterval:3e4,reconnectDecay:1.5,timeoutInterval:2e3,maxReconnectAttempts:null};for(var a in r||={},i)r[a]===void 0?this[a]=i[a]:this[a]=r[a];this.url=t,this.reconnectAttempts=0,this.readyState=WebSocket.CONNECTING,this.protocol=null;var o=this,s,c=!1,l=!1,u=document.createElement(`div`);u.addEventListener(`open`,function(e){o.onopen(e)}),u.addEventListener(`close`,function(e){o.onclose(e)}),u.addEventListener(`connecting`,function(e){o.onconnecting(e)}),u.addEventListener(`message`,function(e){o.onmessage(e)}),u.addEventListener(`error`,function(e){o.onerror(e)}),this.addEventListener=u.addEventListener.bind(u),this.removeEventListener=u.removeEventListener.bind(u),this.dispatchEvent=u.dispatchEvent.bind(u);function d(e,t){var n=document.createEvent(`CustomEvent`);return n.initCustomEvent(e,!1,!1,t),n}this.open=function(t){if(s=new WebSocket(o.url,n||[]),t){if(this.maxReconnectAttempts&&this.reconnectAttempts>this.maxReconnectAttempts)return}else u.dispatchEvent(d(`connecting`)),this.reconnectAttempts=0;(o.debug||e.debugAll)&&console.debug(`ReconnectingWebSocket`,`attempt-connect`,o.url);var r=s,i=setTimeout(function(){(o.debug||e.debugAll)&&console.debug(`ReconnectingWebSocket`,`connection-timeout`,o.url),l=!0,r.close(),l=!1},o.timeoutInterval);s.onopen=function(n){clearTimeout(i),(o.debug||e.debugAll)&&console.debug(`ReconnectingWebSocket`,`onopen`,o.url),o.protocol=s.protocol,o.readyState=WebSocket.OPEN,o.reconnectAttempts=0;var r=d(`open`);r.isReconnect=t,t=!1,u.dispatchEvent(r)},s.onclose=function(n){if(clearTimeout(i),s=null,c)o.readyState=WebSocket.CLOSED,u.dispatchEvent(d(`close`));else{o.readyState=WebSocket.CONNECTING;var r=d(`connecting`);r.code=n.code,r.reason=n.reason,r.wasClean=n.wasClean,u.dispatchEvent(r),!t&&!l&&((o.debug||e.debugAll)&&console.debug(`ReconnectingWebSocket`,`onclose`,o.url),u.dispatchEvent(d(`close`)));var i=o.reconnectInterval*o.reconnectDecay**+o.reconnectAttempts;setTimeout(function(){o.reconnectAttempts++,o.open(!0)},i>o.maxReconnectInterval?o.maxReconnectInterval:i)}},s.onmessage=function(t){(o.debug||e.debugAll)&&console.debug(`ReconnectingWebSocket`,`onmessage`,o.url,t.data);var n=d(`message`);n.data=t.data,u.dispatchEvent(n)},s.onerror=function(t){(o.debug||e.debugAll)&&console.debug(`ReconnectingWebSocket`,`onerror`,o.url,t),u.dispatchEvent(d(`error`))}},this.automaticOpen==1&&this.open(!1),this.send=function(t){if(s)return(o.debug||e.debugAll)&&console.debug(`ReconnectingWebSocket`,`send`,o.url,t),s.send(t);throw`INVALID_STATE_ERR : Pausing to reconnect websocket`},this.close=function(e,t){e===void 0&&(e=1e3),c=!0,s&&s.close(e,t)},this.refresh=function(){s&&s.close()}}return e.prototype.onopen=function(e){},e.prototype.onclose=function(e){},e.prototype.onconnecting=function(e){},e.prototype.onmessage=function(e){},e.prototype.onerror=function(e){},e.debugAll=!1,e.CONNECTING=WebSocket.CONNECTING,e.OPEN=WebSocket.OPEN,e.CLOSING=WebSocket.CLOSING,e.CLOSED=WebSocket.CLOSED,e})}))(),1),xv=typeof window<`u`,Sv=(e,t=!1)=>t?Symbol.for(e):Symbol(e),Kne=(e,t,n)=>qne({l:e,k:t,s:n}),qne=e=>JSON.stringify(e).replace(/\u2028/g,`\\u2028`).replace(/\u2029/g,`\\u2029`).replace(/\u0027/g,`\\u0027`),Cv=e=>typeof e==`number`&&isFinite(e),wv=e=>Lv(e)===`[object Date]`,Tv=e=>Lv(e)===`[object RegExp]`,Ev=e=>Rv(e)&&Object.keys(e).length===0,Dv=Object.assign,Jne=Object.create,Ov=(e=null)=>Jne(e),Yne,kv=()=>Yne||=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:Ov(),Xne=Object.prototype.hasOwnProperty;function Av(e,t){return Xne.call(e,t)}var jv=Array.isArray,Mv=e=>typeof e==`function`,Nv=e=>typeof e==`string`,Pv=e=>typeof e==`boolean`,Fv=e=>typeof e==`object`&&!!e,Zne=e=>Fv(e)&&Mv(e.then)&&Mv(e.catch),Iv=Object.prototype.toString,Lv=e=>Iv.call(e),Rv=e=>Lv(e)===`[object Object]`,Qne=e=>e==null?``:jv(e)||Rv(e)&&e.toString===Iv?JSON.stringify(e,null,2):String(e);function zv(e,t=``){return e.reduce((e,n,r)=>r===0?e+n:e+t+n,``)}function $ne(e,t){typeof console<`u`&&(console.warn(`[intlify] `+e),t&&console.warn(t.stack))}function Bv(e){return e.replace(/&/g,`&`).replace(//g,`>`).replace(/"/g,`"`).replace(/'/g,`'`).replace(/\//g,`/`).replace(/=/g,`=`)}function ere(e){return e.replace(/&(?![a-z0-9#]{2,6};)/gi,`&`).replace(/"/g,`"`).replace(/'/g,`'`).replace(//g,`>`)}var tre=/^javascript:/i,nre=/^(?:href|src|action|formaction)$/i,rre=/&#(?:x([0-9a-f]+)|(\d+));?/gi,ire=/&(?:Tab|NewLine);/g,are=/:?/gi,ore=/[\u0000-\u0020\u007f-\u009f]/g,sre=/(?:^|[\s"'<>/])on\w+\s*=\s*["']?[^"'>]+["']?/i,cre=/(^|[\s"'<>/])on(\w+\s*=)/gi,lre=/(^|[\s"'<>/])((?:href|src|action|formaction)\s*=\s*)([^\s"'=<>`]+)/gi;function ure(e,t,n){let r=t||n;if(!r)return e;let i=Number.parseInt(r,t?16:10);return i<=127?String.fromCharCode(i):e}function Vv(e){let t=e.replace(rre,ure).replace(ire,``).replace(are,`:`).replace(ore,``);return tre.test(t)}function dre(e){let t=/url\s*\(/gi,n=``,r=0,i;for(;(i=t.exec(e))!==null;){let a=i.index,o=t.lastIndex-1,s=o+1,c=1,l=null;for(;s`${t}="${Hv(t,n)}"`),e=e.replace(/([\w:-]+)\s*=\s*'([^']*)'/g,(e,t,n)=>`${t}='${Hv(t,n)}'`),sre.test(e)&&(e=e.replace(cre,`$1on$2`)),e=e.replace(lre,(e,t,n,r)=>Vv(r)?`${t}${n}about:blank`:e),e}var Uv=e=>!Fv(e)||jv(e);function Wv(e,t){if(Uv(e)||Uv(t))throw Error(`Invalid value`);let n=[{src:e,des:t}];for(;n.length;){let{src:e,des:t}=n.pop();Object.keys(e).forEach(r=>{r!==`__proto__`&&(Fv(e[r])&&!Fv(t[r])&&(t[r]=Array.isArray(e[r])?[]:Ov()),Uv(t[r])||Uv(e[r])?t[r]=e[r]:n.push({src:e[r],des:t[r]}))})}}function pre(e,t,n){return{line:e,column:t,offset:n}}function Gv(e,t,n){let r={start:e,end:t};return n!=null&&(r.source=n),r}var Kv={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,UNHANDLED_CODEGEN_NODE_TYPE:15,UNHANDLED_MINIFIER_NODE_TYPE:16};Kv.EXPECTED_TOKEN,Kv.INVALID_TOKEN_IN_PLACEHOLDER,Kv.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,Kv.UNKNOWN_ESCAPE_SEQUENCE,Kv.INVALID_UNICODE_ESCAPE_SEQUENCE,Kv.UNBALANCED_CLOSING_BRACE,Kv.UNTERMINATED_CLOSING_BRACE,Kv.EMPTY_PLACEHOLDER,Kv.NOT_ALLOW_NEST_PLACEHOLDER,Kv.INVALID_LINKED_FORMAT,Kv.MUST_HAVE_MESSAGES_IN_PLURAL,Kv.UNEXPECTED_EMPTY_LINKED_MODIFIER,Kv.UNEXPECTED_EMPTY_LINKED_KEY,Kv.UNEXPECTED_LEXICAL_ANALYSIS,Kv.UNHANDLED_CODEGEN_NODE_TYPE,Kv.UNHANDLED_MINIFIER_NODE_TYPE;function qv(e,t,n={}){let{domain:r,messages:i,args:a}=n,o=SyntaxError(String(e));return o.code=e,t&&(o.location=t),o.domain=r,o}function mre(e){throw e}var Jv=` `,hre=`\r`,Yv=` -`,gre=`\u2028`,_re=`\u2029`;function vre(e){let t=e,n=0,r=1,i=1,a=0,o=e=>t[e]===hre&&t[e+1]===Yv,s=e=>t[e]===Yv,c=e=>t[e]===_re,l=e=>t[e]===gre,u=e=>o(e)||s(e)||c(e)||l(e),d=()=>n,f=()=>r,p=()=>i,m=()=>a,h=e=>o(e)||c(e)||l(e)?Yv:t[e],g=()=>h(n),_=()=>h(n+a);function v(){return a=0,u(n)&&(r++,i=0),o(n)&&n++,n++,i++,t[n]}function y(){return o(n+a)&&a++,a++,t[n+a]}function b(){n=0,r=1,i=1,a=0}function x(e=0){a=e}function S(){let e=n+a;for(;e!==n;)v();a=0}return{index:d,line:f,column:p,peekOffset:m,charAt:h,currentChar:g,currentPeek:_,next:v,peek:y,reset:b,resetPeek:x,skipToPeek:S}}var Xv=void 0,Zv=`'`,yre=`tokenizer`;function bre(e,t={}){let n=t.location!==!1,r=vre(e),i=()=>r.index(),a=()=>pre(r.line(),r.column(),r.index()),o=a(),s=i(),c={currentType:13,offset:s,startLoc:o,endLoc:o,lastType:13,lastOffset:s,lastStartLoc:o,lastEndLoc:o,braceNest:0,inLinked:!1,text:``},l=()=>c,{onError:u}=t;function d(e,t,r,...i){let a=l();if(t.column+=r,t.offset+=r,u){let r=qv(e,n?Gv(a.startLoc,t):null,{domain:yre,args:i});u(r)}}function f(e,t,r){e.endLoc=a(),e.currentType=t;let i={type:t};return n&&(i.loc=Gv(e.startLoc,e.endLoc)),r!=null&&(i.value=r),i}let p=e=>f(e,13);function m(e,t){return e.currentChar()===t?(e.next(),t):(d(Kv.EXPECTED_TOKEN,a(),0,t),``)}function h(e){let t=``;for(;e.currentPeek()===Jv||e.currentPeek()===Yv;)t+=e.currentPeek(),e.peek();return t}function g(e){let t=h(e);return e.skipToPeek(),t}function _(e){if(e===Xv)return!1;let t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||t===95}function v(e){if(e===Xv)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57}function y(e,t){let{currentType:n}=t;if(n!==2)return!1;h(e);let r=_(e.currentPeek());return e.resetPeek(),r}function b(e,t){let{currentType:n}=t;if(n!==2)return!1;h(e);let r=v(e.currentPeek()===`-`?e.peek():e.currentPeek());return e.resetPeek(),r}function x(e,t){let{currentType:n}=t;if(n!==2)return!1;h(e);let r=e.currentPeek()===Zv;return e.resetPeek(),r}function S(e,t){let{currentType:n}=t;if(n!==7)return!1;h(e);let r=e.currentPeek()===`.`;return e.resetPeek(),r}function C(e,t){let{currentType:n}=t;if(n!==8)return!1;h(e);let r=_(e.currentPeek());return e.resetPeek(),r}function w(e,t){let{currentType:n}=t;if(!(n===7||n===11))return!1;h(e);let r=e.currentPeek()===`:`;return e.resetPeek(),r}function T(e,t){let{currentType:n}=t;if(n!==9)return!1;let r=()=>{let t=e.currentPeek();return t===`{`?_(e.peek()):t===`@`||t===`|`||t===`:`||t===`.`||t===Jv||!t?!1:t===Yv?(e.peek(),r()):D(e,!1)},i=r();return e.resetPeek(),i}function E(e){h(e);let t=e.currentPeek()===`|`;return e.resetPeek(),t}function D(e,t=!0){let n=(t=!1,r=``)=>{let i=e.currentPeek();return i===`{`||i===`@`||!i?t:i===`|`?!(r===Jv||r===Yv):i===Jv?(e.peek(),n(!0,Jv)):i===Yv?(e.peek(),n(!0,Yv)):!0},r=n();return t&&e.resetPeek(),r}function O(e,t){let n=e.currentChar();if(n!==Xv)return t(n)?(e.next(),n):null}function k(e){let t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57||t===95||t===36}function A(e){return O(e,k)}function j(e){let t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57||t===95||t===36||t===45}function M(e){return O(e,j)}function ee(e){let t=e.charCodeAt(0);return t>=48&&t<=57}function te(e){return O(e,ee)}function ne(e){let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function N(e){return O(e,ne)}function re(e){let t=``,n=``;for(;t=te(e);)n+=t;return n}function ie(e){let t=``;for(;;){let n=e.currentChar();if(n===`\\`){let r=e.peek();r===`{`||r===`}`||r===`@`||r===`|`||r===`\\`?(t+=n+r,e.next(),e.next()):(e.resetPeek(),t+=n,e.next())}else if(n===`{`||n===`}`||n===`@`||n===`|`||!n)break;else if(n===Jv||n===Yv)if(D(e))t+=n,e.next();else if(E(e))break;else t+=n,e.next();else t+=n,e.next()}return t}function ae(e){g(e);let t=``,n=``;for(;t=M(e);)n+=t;let r=e.currentChar();if(r&&r!==`}`&&r!==Xv&&r!==Jv&&r!==Yv&&r!==` `){let t=de(e);return d(Kv.INVALID_TOKEN_IN_PLACEHOLDER,a(),0,n+t),n+t}return e.currentChar()===Xv&&d(Kv.UNTERMINATED_CLOSING_BRACE,a(),0),n}function oe(e){g(e);let t=``;return e.currentChar()===`-`?(e.next(),t+=`-${re(e)}`):t+=re(e),e.currentChar()===Xv&&d(Kv.UNTERMINATED_CLOSING_BRACE,a(),0),t}function se(e){return e!==Zv&&e!==Yv}function P(e){g(e),m(e,`'`);let t=``,n=``;for(;t=O(e,se);)t===`\\`?n+=ce(e):n+=t;let r=e.currentChar();return r===Yv||r===Xv?(d(Kv.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,a(),0),r===Yv&&(e.next(),m(e,`'`)),n):(m(e,`'`),n)}function ce(e){let t=e.currentChar();switch(t){case`\\`:case`'`:return e.next(),`\\${t}`;case`u`:return le(e,t,4);case`U`:return le(e,t,6);default:return d(Kv.UNKNOWN_ESCAPE_SEQUENCE,a(),0,t),``}}function le(e,t,n){m(e,t);let r=``;for(let i=0;i{let r=e.currentChar();return r===`{`||r===`@`||r===`|`||r===`(`||r===`)`||!r||r===Jv?n:(n+=r,e.next(),t(n))};return t(``)}function me(e){g(e);let t=m(e,`|`);return g(e),t}function he(e,t){let n=null;switch(e.currentChar()){case`{`:return t.braceNest>=1&&d(Kv.NOT_ALLOW_NEST_PLACEHOLDER,a(),0),e.next(),n=f(t,2,`{`),g(e),t.braceNest++,n;case`}`:return t.braceNest>0&&t.currentType===2&&d(Kv.EMPTY_PLACEHOLDER,a(),0),e.next(),n=f(t,3,`}`),t.braceNest--,t.braceNest>0&&g(e),t.inLinked&&t.braceNest===0&&(t.inLinked=!1),n;case`@`:return t.braceNest>0&&d(Kv.UNTERMINATED_CLOSING_BRACE,a(),0),n=ge(e,t)||p(t),t.braceNest=0,n;default:{let r=!0,i=!0,o=!0;if(E(e))return t.braceNest>0&&d(Kv.UNTERMINATED_CLOSING_BRACE,a(),0),n=f(t,1,me(e)),t.braceNest=0,t.inLinked=!1,n;if(t.braceNest>0&&(t.currentType===4||t.currentType===5||t.currentType===6))return d(Kv.UNTERMINATED_CLOSING_BRACE,a(),0),t.braceNest=0,_e(e,t);if(r=y(e,t))return n=f(t,4,ae(e)),g(e),n;if(i=b(e,t))return n=f(t,5,oe(e)),g(e),n;if(o=x(e,t))return n=f(t,6,P(e)),g(e),n;if(!r&&!i&&!o)return n=f(t,12,de(e)),d(Kv.INVALID_TOKEN_IN_PLACEHOLDER,a(),0,n.value),g(e),n;break}}return n}function ge(e,t){let{currentType:n}=t,r=null,i=e.currentChar();switch((n===7||n===8||n===11||n===9)&&(i===Yv||i===Jv)&&d(Kv.INVALID_LINKED_FORMAT,a(),0),i){case`@`:return e.next(),r=f(t,7,`@`),t.inLinked=!0,r;case`.`:return g(e),e.next(),f(t,8,`.`);case`:`:return g(e),e.next(),f(t,9,`:`);default:return E(e)?(r=f(t,1,me(e)),t.braceNest=0,t.inLinked=!1,r):S(e,t)||w(e,t)?(g(e),ge(e,t)):C(e,t)?(g(e),f(t,11,fe(e))):T(e,t)?(g(e),i===`{`?he(e,t)||r:f(t,10,pe(e))):(n===7&&d(Kv.INVALID_LINKED_FORMAT,a(),0),t.braceNest=0,t.inLinked=!1,_e(e,t))}}function _e(e,t){let n={type:13};if(t.braceNest>0)return he(e,t)||p(t);if(t.inLinked)return ge(e,t)||p(t);switch(e.currentChar()){case`{`:return he(e,t)||p(t);case`}`:return d(Kv.UNBALANCED_CLOSING_BRACE,a(),0),e.next(),f(t,3,`}`);case`@`:return ge(e,t)||p(t);default:if(E(e))return n=f(t,1,me(e)),t.braceNest=0,t.inLinked=!1,n;if(D(e))return f(t,0,ie(e));break}return n}function ve(){let{currentType:e,offset:t,startLoc:n,endLoc:o}=c;return c.lastType=e,c.lastOffset=t,c.lastStartLoc=n,c.lastEndLoc=o,c.offset=i(),c.startLoc=a(),r.currentChar()===Xv?f(c,13):_e(r,c)}return{nextToken:ve,currentOffset:i,currentPosition:a,context:l}}var xre=`parser`,Sre=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g,Cre=/\\([\\@{}|])/g;function wre(e,t){return t}function Tre(e,t,n){switch(e){case`\\\\`:return`\\`;case`\\'`:return`'`;default:{let e=parseInt(t||n,16);return e<=55295||e>=57344?String.fromCodePoint(e):`�`}}}function Ere(e={}){let t=e.location!==!1,{onError:n}=e;function r(e,r,i,a,...o){let s=e.currentPosition();if(s.offset+=a,s.column+=a,n){let e=qv(r,t?Gv(i,s):null,{domain:xre,args:o});n(e)}}function i(e,n,r){let i={type:e};return t&&(i.start=n,i.end=n,i.loc={start:r,end:r}),i}function a(e,n,r,i){t&&(e.end=n,e.loc&&(e.loc.end=r))}function o(e,t){let n=e.context(),r=i(3,n.offset,n.startLoc);return r.value=t.replace(Cre,wre),a(r,e.currentOffset(),e.currentPosition()),r}function s(e,t){let{lastOffset:n,lastStartLoc:r}=e.context(),o=i(5,n,r);return o.index=parseInt(t,10),e.nextToken(),a(o,e.currentOffset(),e.currentPosition()),o}function c(e,t){let{lastOffset:n,lastStartLoc:r}=e.context(),o=i(4,n,r);return o.key=t,e.nextToken(),a(o,e.currentOffset(),e.currentPosition()),o}function l(e,t){let{lastOffset:n,lastStartLoc:r}=e.context(),o=i(9,n,r);return o.value=t.replace(Sre,Tre),e.nextToken(),a(o,e.currentOffset(),e.currentPosition()),o}function u(e){let t=e.nextToken(),n=e.context(),{lastOffset:o,lastStartLoc:s}=n,c=i(8,o,s);return t.type===11?(t.value??r(e,Kv.UNEXPECTED_LEXICAL_ANALYSIS,n.lastStartLoc,0,Qv(t)),c.value=t.value||``,a(c,e.currentOffset(),e.currentPosition()),{node:c}):(r(e,Kv.UNEXPECTED_EMPTY_LINKED_MODIFIER,n.lastStartLoc,0),c.value=``,a(c,o,s),{nextConsumeToken:t,node:c})}function d(e,t){let n=e.context(),r=i(7,n.offset,n.startLoc);return r.value=t,a(r,e.currentOffset(),e.currentPosition()),r}function f(e){let t=e.context(),n=i(6,t.offset,t.startLoc),o=e.nextToken();if(o.type===8){let t=u(e);n.modifier=t.node,o=t.nextConsumeToken||e.nextToken()}switch(o.type!==9&&r(e,Kv.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,Qv(o)),o=e.nextToken(),o.type===2&&(o=e.nextToken()),o.type){case 10:o.value??r(e,Kv.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,Qv(o)),n.key=d(e,o.value||``);break;case 4:o.value??r(e,Kv.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,Qv(o)),n.key=c(e,o.value||``);break;case 5:o.value??r(e,Kv.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,Qv(o)),n.key=s(e,o.value||``);break;case 6:o.value??r(e,Kv.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,Qv(o)),n.key=l(e,o.value||``);break;default:{r(e,Kv.UNEXPECTED_EMPTY_LINKED_KEY,t.lastStartLoc,0);let s=e.context(),c=i(7,s.offset,s.startLoc);return c.value=``,a(c,s.offset,s.startLoc),n.key=c,a(n,s.offset,s.startLoc),{nextConsumeToken:o,node:n}}}return a(n,e.currentOffset(),e.currentPosition()),{node:n}}function p(e){let t=e.context(),n=i(2,t.currentType===1?e.currentOffset():t.offset,t.currentType===1?t.endLoc:t.startLoc);n.items=[];let u=null;do{let i=u||e.nextToken();switch(u=null,i.type){case 0:i.value??r(e,Kv.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,Qv(i)),n.items.push(o(e,i.value||``));break;case 5:i.value??r(e,Kv.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,Qv(i)),n.items.push(s(e,i.value||``));break;case 4:i.value??r(e,Kv.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,Qv(i)),n.items.push(c(e,i.value||``));break;case 6:i.value??r(e,Kv.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,Qv(i)),n.items.push(l(e,i.value||``));break;case 7:{let t=f(e);n.items.push(t.node),u=t.nextConsumeToken||null;break}}}while(t.currentType!==13&&t.currentType!==1);return a(n,t.currentType===1?t.lastOffset:e.currentOffset(),t.currentType===1?t.lastEndLoc:e.currentPosition()),n}function m(e,t,n,o){let s=e.context(),c=o.items.length===0,l=i(1,t,n);l.cases=[],l.cases.push(o);do{let t=p(e);c||=t.items.length===0,l.cases.push(t)}while(s.currentType!==13);return c&&r(e,Kv.MUST_HAVE_MESSAGES_IN_PLURAL,n,0),a(l,e.currentOffset(),e.currentPosition()),l}function h(e){let t=e.context(),{offset:n,startLoc:r}=t,i=p(e);return t.currentType===13?i:m(e,n,r,i)}function g(n){let o=bre(n,Dv({},e)),s=o.context(),c=i(0,s.offset,s.startLoc);return t&&c.loc&&(c.loc.source=n),c.body=h(o),e.onCacheKey&&(c.cacheKey=e.onCacheKey(n)),s.currentType!==13&&r(o,Kv.UNEXPECTED_LEXICAL_ANALYSIS,s.lastStartLoc,0,n[s.offset]||``),a(c,o.currentOffset(),o.currentPosition()),c}return{parse:g}}function Qv(e){if(e.type===13)return`EOF`;let t=(e.value||``).replace(/\r?\n/gu,`\\n`);return t.length>10?t.slice(0,9)+`…`:t}function Dre(e,t={}){let n={ast:e,helpers:new Set};return{context:()=>n,helper:e=>(n.helpers.add(e),e)}}function $v(e,t){for(let n=0;nty(e)),e}function ty(e){if(e.items.length===1){let t=e.items[0];(t.type===3||t.type===9)&&(e.static=t.value,delete t.value)}else{let t=[];for(let n=0;no;function c(e,t){o.code+=e}function l(e,t=!0){let n=t?r:``;c(i?n+` `.repeat(e):n)}function u(e=!0){let t=++o.indentLevel;e&&l(t)}function d(e=!0){let t=--o.indentLevel;e&&l(t)}function f(){l(o.indentLevel)}return{context:s,push:c,indent:u,deindent:d,newline:f,helper:e=>`_${e}`,needIndent:()=>o.needIndent}}function jre(e,t){let{helper:n}=e;e.push(`${n(`linked`)}(`),ry(e,t.key),t.modifier?(e.push(`, `),ry(e,t.modifier),e.push(`, _type`)):e.push(`, undefined, _type`),e.push(`)`)}function Mre(e,t){let{helper:n,needIndent:r}=e;e.push(`${n(`normalize`)}([`),e.indent(r());let i=t.items.length;for(let n=0;n1){e.push(`${n(`plural`)}([`),e.indent(r());let i=t.cases.length;for(let n=0;n{let n=Nv(t.mode)?t.mode:`normal`,r=Nv(t.filename)?t.filename:`message.intl`;t.sourceMap;let i=t.breakLineCode==null?n===`arrow`?`;`:` -`:t.breakLineCode,a=t.needIndent?t.needIndent:n!==`arrow`,o=e.helpers||[],s=Are(e,{filename:r,breakLineCode:i,needIndent:a});s.push(n===`normal`?`function __msg__ (ctx) {`:`(ctx) => {`),s.indent(a),o.length>0&&(s.push(`const { ${zv(o.map(e=>`${e}: _${e}`),`, `)} } = ctx`),s.newline()),s.push(`return `),ry(s,e),s.deindent(a),s.push(`}`),delete e.helpers;let{code:c,map:l}=s.context();return{ast:e,code:c,map:l?l.toJSON():void 0}};function Ire(e,t={}){let n=Dv({},t),r=!!n.jit,i=!!n.minify,a=n.optimize==null||n.optimize,o=Ere(n).parse(e);return r?(a&&kre(o),i&&ny(o),{ast:o,code:``}):(Ore(o,n),Fre(o,n))}function Lre(){typeof __INTLIFY_PROD_DEVTOOLS__!=`boolean`&&(kv().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!=`boolean`&&(kv().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function iy(e){return Fv(e)&&uy(e)===0&&(Av(e,`b`)||Av(e,`body`))}var ay=[`b`,`body`];function Rre(e){return hy(e,ay)}var oy=[`c`,`cases`];function zre(e){return hy(e,oy,[])}var sy=[`s`,`static`];function Bre(e){return hy(e,sy)}var cy=[`i`,`items`];function Vre(e){return hy(e,cy,[])}var ly=[`t`,`type`];function uy(e){return hy(e,ly)}var dy=[`v`,`value`];function fy(e,t){let n=hy(e,dy);if(n!=null)return n;throw _y(t)}var py=[`m`,`modifier`];function Hre(e){return hy(e,py)}var my=[`k`,`key`];function Ure(e){let t=hy(e,my);if(t)return t;throw _y(6)}function hy(e,t,n){for(let n=0;nWre(t,e)}function Wre(e,t){let n=Rre(t);if(n==null)throw _y(0);if(uy(n)===1){let t=zre(n);return e.plural(t.reduce((t,n)=>[...t,yy(e,n)],[]))}else return yy(e,n)}function yy(e,t){let n=Bre(t);if(n!=null)return e.type===`text`?n:e.normalize([n]);{let n=Vre(t).reduce((t,n)=>[...t,by(e,n)],[]);return e.normalize(n)}}function by(e,t){let n=uy(t);switch(n){case 3:return fy(t,n);case 9:return fy(t,n);case 4:{let r=t;if(Av(r,`k`)&&r.k)return e.interpolate(e.named(r.k));if(Av(r,`key`)&&r.key)return e.interpolate(e.named(r.key));throw _y(n)}case 5:{let r=t;if(Av(r,`i`)&&Cv(r.i))return e.interpolate(e.list(r.i));if(Av(r,`index`)&&Cv(r.index))return e.interpolate(e.list(r.index));throw _y(n)}case 6:{let n=t,r=Hre(n),i=Ure(n);return e.linked(by(e,i),r?by(e,r):void 0,e.type)}case 7:return fy(t,n);case 8:return fy(t,n);default:throw Error(`unhandled node on format message part: ${n}`)}}var Gre=e=>e,xy=Ov();function Kre(e,t={}){let n=!1,r=t.onError||mre;return t.onError=e=>{n=!0,r(e)},{...Ire(e,t),detectError:n}}function qre(e,t){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&Nv(e)){Pv(t.warnHtmlMessage)&&t.warnHtmlMessage;let n=(t.onCacheKey||Gre)(e),r=xy[n];if(r)return r;let{ast:i,detectError:a}=Kre(e,{...t,location:!1,jit:!0}),o=vy(i);return a?o:xy[n]=o}else{let t=e.cacheKey;return t?xy[t]||(xy[t]=vy(e)):vy(e)}}var Sy=null;function Jre(e){Sy=e}function Yre(e,t,n){Sy&&Sy.emit(`i18n:init`,{timestamp:Date.now(),i18n:e,version:t,meta:n})}var Xre=Zre(`function:translate`);function Zre(e){return t=>Sy&&Sy.emit(e,t)}var Cy={INVALID_ARGUMENT:17,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_NON_STRING_MESSAGE:20,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23};function wy(e){return qv(e,null,void 0)}Cy.INVALID_ARGUMENT,Cy.INVALID_DATE_ARGUMENT,Cy.INVALID_ISO_DATE_ARGUMENT,Cy.NOT_SUPPORT_NON_STRING_MESSAGE,Cy.NOT_SUPPORT_LOCALE_PROMISE_VALUE,Cy.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION,Cy.NOT_SUPPORT_LOCALE_TYPE;function Ty(e,t){return t.locale==null?Dy(e.locale):Dy(t.locale)}var Ey;function Dy(e){if(Nv(e))return e;if(Mv(e)){if(e.resolvedOnce&&Ey!=null)return Ey;if(e.constructor.name===`Function`){let t=e();if(Zne(t))throw wy(Cy.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return Ey=t}else throw wy(Cy.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw wy(Cy.NOT_SUPPORT_LOCALE_TYPE)}function Qre(e,t,n){return[...new Set([n,...jv(t)?t:Fv(t)?Object.keys(t):Nv(t)?[t]:[n]])]}function Oy(e,t,n){let r=Nv(n)?n:Ly,i=e;i.__localeChainCache||=new Map;let a=i.__localeChainCache.get(r);if(!a){a=[];let e=[n];for(;jv(e);)e=ky(a,e,t);let o=jv(t)||!Rv(t)?t:t.default?t.default:null;e=Nv(o)?[o]:o,jv(e)&&ky(a,e,!1),i.__localeChainCache.set(r,a)}return a}function ky(e,t,n){let r=!0;for(let i=0;i{o===void 0?o=s:o+=s},f[1]=()=>{o!==void 0&&(t.push(o),o=void 0)},f[2]=()=>{f[0](),i++},f[3]=()=>{if(i>0)i--,r=4,f[0]();else{if(i=0,o===void 0||(o=Ny(o),o===!1))return!1;f[1]()}};function p(){let t=e[n+1];if(r===5&&t===`'`||r===6&&t===`"`)return n++,s=`\\`+t,f[0](),!0}for(;r!==null;)if(n++,a=e[n],!(a===`\\`&&p())){if(c=My(a),d=Ay[r],l=d[c]||d.l||8,l===8||(r=l[0],l[1]!==void 0&&(u=f[l[1]],u&&(s=a,u()===!1))))return;if(r===7)return t}}var Fy=new Map;function rie(e,t){return Fv(e)?e[t]:null}function iie(e,t){if(!Fv(e))return null;let n=Fy.get(t);if(n||(n=Py(t),n&&Fy.set(t,n)),!n)return null;let r=n.length,i=e,a=0;for(;a`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function oie(){return{upper:(e,t)=>t===`text`&&Nv(e)?e.toUpperCase():t===`vnode`&&Fv(e)&&`__v_isVNode`in e?e.children.toUpperCase():e,lower:(e,t)=>t===`text`&&Nv(e)?e.toLowerCase():t===`vnode`&&Fv(e)&&`__v_isVNode`in e?e.children.toLowerCase():e,capitalize:(e,t)=>t===`text`&&Nv(e)?Ry(e):t===`vnode`&&Fv(e)&&`__v_isVNode`in e?Ry(e.children):e}}var zy;function sie(e){zy=e}var By;function cie(e){By=e}var Vy;function lie(e){Vy=e}var uie=null,die=()=>uie,Hy=null,Uy=e=>{Hy=e},fie=()=>Hy,Wy=0;function pie(e={}){let t=Mv(e.onWarn)?e.onWarn:$ne,n=Nv(e.version)?e.version:aie,r=Nv(e.locale)||Mv(e.locale)?e.locale:Ly,i=Mv(r)?Ly:r,a=jv(e.fallbackLocale)||Rv(e.fallbackLocale)||Nv(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:i,o=Rv(e.messages)?e.messages:Gy(i),s=Rv(e.datetimeFormats)?e.datetimeFormats:Gy(i),c=Rv(e.numberFormats)?e.numberFormats:Gy(i),l=Dv(Ov(),e.modifiers,oie()),u=e.pluralRules||Ov(),d=Mv(e.missing)?e.missing:null,f=Pv(e.missingWarn)||Tv(e.missingWarn)?e.missingWarn:!0,p=Pv(e.fallbackWarn)||Tv(e.fallbackWarn)?e.fallbackWarn:!0,m=!!e.fallbackFormat,h=!!e.unresolving,g=Mv(e.postTranslation)?e.postTranslation:null,_=Rv(e.processor)?e.processor:null,v=!Pv(e.warnHtmlMessage)||e.warnHtmlMessage,y=!!e.escapeParameter,b=Mv(e.messageCompiler)?e.messageCompiler:zy,x=Mv(e.messageResolver)?e.messageResolver:By||rie,S=Mv(e.localeFallbacker)?e.localeFallbacker:Vy||Qre,C=Fv(e.fallbackContext)?e.fallbackContext:void 0,w=e,T=Fv(w.__datetimeFormatters)?w.__datetimeFormatters:new Map,E=Fv(w.__numberFormatters)?w.__numberFormatters:new Map,D=Fv(w.__meta)?w.__meta:{};Wy++;let O={version:n,cid:Wy,locale:r,fallbackLocale:a,messages:o,modifiers:l,pluralRules:u,missing:d,missingWarn:f,fallbackWarn:p,fallbackFormat:m,unresolving:h,postTranslation:g,processor:_,warnHtmlMessage:v,escapeParameter:y,messageCompiler:b,messageResolver:x,localeFallbacker:S,fallbackContext:C,onWarn:t,__meta:D};return O.datetimeFormats=s,O.numberFormats=c,O.__datetimeFormatters=T,O.__numberFormatters=E,__INTLIFY_PROD_DEVTOOLS__&&Yre(O,n,D),O}var Gy=e=>({[e]:Ov()});function Ky(e,t,n,r,i){let{missing:a,onWarn:o}=e;if(a!==null){let r=a(e,n,t,i);return Nv(r)?r:t}else return t}function qy(e,t,n){let r=e;r.__localeChainCache=new Map,e.localeFallbacker(e,n,t)}function mie(e,t){return e!==t&&e.split(`-`)[0]===t.split(`-`)[0]}function hie(e,t){let n=t.indexOf(e);if(n===-1)return!1;for(let r=n+1;r{r.includes(e)?s[e]=i[e]:t[e]=i[e]}),Nv(a)?t.locale=a:Rv(a)&&(s=a),Rv(o)&&(s=o),s}var Qy=typeof Intl<`u`;Qy&&Intl.DateTimeFormat,Qy&&Intl.NumberFormat;function $y(e,...t){let{datetimeFormats:n,unresolving:r,onWarn:i}=e,{__datetimeFormatters:a}=e;if(!Nv(t[0])&&!wv(t[0])&&!Cv(t[0]))return``;let[o,s,c,l]=tb(...t),u=Pv(c.missingWarn)?c.missingWarn:e.missingWarn,d=Pv(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn,f=!!c.part,p=Ty(e,c);if(!Nv(o)||o===``){let e=new Intl.DateTimeFormat(p.replace(/!/g,``),l);return f?e.formatToParts(s):e.format(s)}let m=Jy(e,o,p,n,u,d,`datetime format`);if(!Nv(m))return r?-1:o;let h=n[m][o],g=Yy(m,o,l),_=a.get(g);return _||(_=new Intl.DateTimeFormat(m,Dv({},h,l)),a.set(g,_)),f?_.formatToParts(s):_.format(s)}var eb=[`localeMatcher`,`weekday`,`era`,`year`,`month`,`day`,`hour`,`minute`,`second`,`timeZoneName`,`formatMatcher`,`hour12`,`timeZone`,`dateStyle`,`timeStyle`,`calendar`,`dayPeriod`,`numberingSystem`,`hourCycle`,`fractionalSecondDigits`];function tb(...e){let[t]=e,n=Ov(),r=Ov(),i;if(Nv(t)){let e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw wy(Cy.INVALID_ISO_DATE_ARGUMENT);let n=e[3]?e[3].trim().startsWith(`T`)?`${e[1].trim()}${e[3].trim()}`:`${e[1].trim()}T${e[3].trim()}`:e[1].trim();i=new Date(n);try{i.toISOString()}catch{throw wy(Cy.INVALID_ISO_DATE_ARGUMENT)}}else if(wv(t)){if(isNaN(t.getTime()))throw wy(Cy.INVALID_DATE_ARGUMENT);i=t}else if(Cv(t))i=t;else throw wy(Cy.INVALID_ARGUMENT);let a=Zy(e,n,r,eb);return[n.key||``,i,n,a]}function nb(e,t,n){Xy(e.__datetimeFormatters,t,n)}function rb(e,...t){let{numberFormats:n,unresolving:r,onWarn:i}=e,{__numberFormatters:a}=e;if(!Cv(t[0]))return``;let[o,s,c,l]=ab(...t),u=Pv(c.missingWarn)?c.missingWarn:e.missingWarn,d=Pv(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn,f=!!c.part,p=Ty(e,c);if(!Nv(o)||o===``){let e=new Intl.NumberFormat(p.replace(/!/g,``),l);return f?e.formatToParts(s):e.format(s)}let m=Jy(e,o,p,n,u,d,`number format`);if(!Nv(m))return r?-1:o;let h=n[m][o],g=Yy(m,o,l),_=a.get(g);return _||(_=new Intl.NumberFormat(m,Dv({},h,l)),a.set(g,_)),f?_.formatToParts(s):_.format(s)}var ib=[`localeMatcher`,`style`,`currency`,`currencyDisplay`,`currencySign`,`useGrouping`,`minimumIntegerDigits`,`minimumFractionDigits`,`maximumFractionDigits`,`minimumSignificantDigits`,`maximumSignificantDigits`,`compactDisplay`,`notation`,`signDisplay`,`unit`,`unitDisplay`,`roundingMode`,`roundingPriority`,`roundingIncrement`,`trailingZeroDisplay`];function ab(...e){let[t]=e,n=Ov(),r=Ov();if(!Cv(t))throw wy(Cy.INVALID_ARGUMENT);let i=t,a=Zy(e,n,r,ib);return[n.key||``,i,n,a]}function ob(e,t,n){Xy(e.__numberFormatters,t,n)}var gie=e=>e,_ie=e=>``,vie=`text`,yie=e=>e.length===0?``:zv(e),bie=Qne;function sb(e,t){return e=Math.abs(e),t===2?e===1?0:1:Math.min(e,2)}function xie(e){let t=Cv(e.pluralIndex)?e.pluralIndex:-1;return Cv(e.named?.count)?e.named.count:Cv(e.named?.n)?e.named.n:t}function Sie(e={}){let t=e.locale,n=xie(e),r=Nv(t)&&Mv(e.pluralRules?.[t])?e.pluralRules[t]:sb,i=r===sb?void 0:sb,a=e=>e[r(n,e.length,i)],o=e.list||[],s=e=>o[e],c=e.named||Ov();Cv(e.pluralIndex)&&(c.count||=e.pluralIndex,c.n||=e.pluralIndex);let l=e=>c[e];function u(t,n){return(Mv(e.messages)?e.messages(t,!!n):Fv(e.messages)?e.messages[t]:!1)||(e.parent?e.parent.message(t):_ie)}let d=t=>e.modifiers?e.modifiers[t]:gie,f=Mv(e.processor?.normalize)?e.processor.normalize:yie,p=Mv(e.processor?.interpolate)?e.processor.interpolate:bie,m={list:s,named:l,plural:a,linked:(e,...t)=>{let[n,r]=t,i=`text`,a=``;t.length===1?Fv(n)?(a=n.modifier||a,i=n.type||i):Nv(n)&&(a=n||a):t.length===2&&(Nv(n)&&(a=n||a),Nv(r)&&(i=r||i));let o=u(e,!0)(m),s=o===``||o===void 0?e:o,c=i===`vnode`&&jv(s)&&a?s[0]:s;return a?d(a)(c,i):c},message:u,type:Nv(e.processor?.type)?e.processor.type:vie,interpolate:p,normalize:f,values:Dv(Ov(),o,c)};return m}var cb=()=>``,lb=e=>Mv(e);function ub(e,...t){let{fallbackFormat:n,postTranslation:r,unresolving:i,messageCompiler:a,fallbackLocale:o,messages:s}=e,[c,l]=hb(...t),u=Pv(l.missingWarn)?l.missingWarn:e.missingWarn,d=Pv(l.fallbackWarn)?l.fallbackWarn:e.fallbackWarn,f=Pv(l.escapeParameter)?l.escapeParameter:e.escapeParameter,p=!!l.resolvedMessage,m=Nv(l.default)||Pv(l.default)?Pv(l.default)?a?c:()=>c:l.default:n?a?c:()=>c:null,h=n||m!=null&&(Nv(m)||Mv(m)),g=Ty(e,l);f&&db(l);let[_,v,y]=p?[c,g,s[g]||Ov()]:fb(e,c,g,o,d,u),b=_,x=c;if(!p&&!(Nv(b)||iy(b)||lb(b))&&h&&(b=m,x=b),!p&&(!(Nv(b)||iy(b)||lb(b))||!Nv(v)))return i?-1:c;let S=!1,C=lb(b)?b:pb(e,c,v,b,x,()=>{S=!0});if(S)return b;let w=mb(e,C,Sie(Cie(e,v,y,l))),T=r?r(w,c):w;if(f&&Nv(T)&&(T=fre(T)),__INTLIFY_PROD_DEVTOOLS__){let t={timestamp:Date.now(),key:Nv(c)?c:lb(b)?b.key:``,locale:v||(lb(b)?b.locale:``),format:Nv(b)?b:lb(b)?b.source:``,message:T};t.meta=Dv({},e.__meta,die()||{}),Xre(t)}return T}function db(e){jv(e.list)?e.list=e.list.map(e=>Nv(e)?Bv(e):e):Fv(e.named)&&Object.keys(e.named).forEach(t=>{Nv(e.named[t])&&(e.named[t]=Bv(e.named[t]))})}function fb(e,t,n,r,i,a){let{messages:o,onWarn:s,messageResolver:c,localeFallbacker:l}=e,u=l(e,r,n),d=Ov(),f,p=null;for(let n=0;nr);return e.locale=n,e.key=t,e}let c=o(r,gb(e,n,i,r,s,a));return c.locale=n,c.key=t,c.source=r,c}function mb(e,t,n){return t(n)}function hb(...e){let[t,n,r]=e,i=Ov();if(!Nv(t)&&!Cv(t)&&!lb(t)&&!iy(t))throw wy(Cy.INVALID_ARGUMENT);let a=Cv(t)?String(t):(lb(t),t);return Cv(n)?i.plural=n:Nv(n)?i.default=n:Rv(n)&&!Ev(n)?i.named=n:jv(n)&&(i.list=n),Cv(r)?i.plural=r:Nv(r)?i.default=r:Rv(r)&&Dv(i,r),[a,i]}function gb(e,t,n,r,i,a){return{locale:t,key:n,warnHtmlMessage:i,onError:e=>{throw a&&a(e),e},onCacheKey:e=>Kne(t,n,e)}}function Cie(e,t,n,r){let{modifiers:i,pluralRules:a,messageResolver:o,fallbackLocale:s,fallbackWarn:c,missingWarn:l,fallbackContext:u}=e,d={locale:t,modifiers:i,pluralRules:a,messages:(r,i)=>{let a=o(n,r);if(a==null&&(u||i)){let[n,,i]=fb(u||e,r,t,s,c,l);a=n??o(i,r)}if(Nv(a)||iy(a)){let n=!1,i=pb(e,r,t,a,r,()=>{n=!0});return n?cb:i}else if(lb(a))return a;else return cb}};return e.processor&&(d.processor=e.processor),r.list&&(d.list=r.list),r.named&&(d.named=r.named),Cv(r.plural)&&(d.pluralIndex=r.plural),d}Lre();var wie=`11.4.8`;function Tie(){typeof __VUE_I18N_FULL_INSTALL__!=`boolean`&&(kv().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!=`boolean`&&(kv().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!=`boolean`&&(kv().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!=`boolean`&&(kv().__INTLIFY_PROD_DEVTOOLS__=!1)}var _b={UNEXPECTED_RETURN_TYPE:24,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:30,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32,NOT_COMPATIBLE_LEGACY_VUE_I18N:33,NOT_AVAILABLE_COMPOSITION_IN_LEGACY:34};function vb(e,...t){return qv(e,null,void 0)}_b.UNEXPECTED_RETURN_TYPE,_b.INVALID_ARGUMENT,_b.MUST_BE_CALL_SETUP_TOP,_b.NOT_INSTALLED,_b.UNEXPECTED_ERROR,_b.REQUIRED_VALUE,_b.INVALID_VALUE,_b.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN,_b.NOT_INSTALLED_WITH_PROVIDE,_b.NOT_COMPATIBLE_LEGACY_VUE_I18N,_b.NOT_AVAILABLE_COMPOSITION_IN_LEGACY;var yb=Sv(`__translateVNode`),bb=Sv(`__datetimeParts`),xb=Sv(`__numberParts`),Sb=Sv(`__setPluralRules`);Sv(`__intlifyMeta`);var Cb=Sv(`__injectWithOption`),wb=Sv(`__dispose`),Tb={FALLBACK_TO_ROOT:10,NOT_FOUND_PARENT_SCOPE:11,IGNORE_OBJ_FLATTEN:12,DEPRECATE_LEGACY_MODE:13,DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE:14,DUPLICATE_USE_I18N_CALLING:15};Tb.FALLBACK_TO_ROOT,Tb.NOT_FOUND_PARENT_SCOPE,Tb.IGNORE_OBJ_FLATTEN,Tb.DEPRECATE_LEGACY_MODE,Tb.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE,Tb.DUPLICATE_USE_I18N_CALLING;function Eb(e){if(!Fv(e)||iy(e))return e;for(let t in e)if(Av(e,t))if(!t.includes(`.`))Fv(e[t])&&Eb(e[t]);else{let n=t.split(`.`),r=n.length-1,i=e,a=!1;for(let e=0;e{if(`locale`in e&&`resource`in e){let{locale:t,resource:n}=e;t?(o[t]=o[t]||Ov(),Wv(n,o[t])):Wv(n,o)}else Nv(e)&&Wv(JSON.parse(e),o)}),i==null&&a)for(let e in o)Av(o,e)&&Eb(o[e]);return o}function Eie(e){return e.type}function Ob(e,t,n){let r=Fv(t.messages)?t.messages:Ov();`__i18nGlobal`in n&&(r=Db(e.locale.value,{messages:r,__i18n:n.__i18nGlobal}));let i=Object.keys(r);if(i.length&&i.forEach(t=>{e.mergeLocaleMessage(t,r[t])}),Fv(t.datetimeFormats)){let n=Object.keys(t.datetimeFormats);n.length&&n.forEach(n=>{e.mergeDateTimeFormat(n,t.datetimeFormats[n])})}if(Fv(t.numberFormats)){let n=Object.keys(t.numberFormats);n.length&&n.forEach(n=>{e.mergeNumberFormat(n,t.numberFormats[n])})}}function kb(e){return J(Ec,null,e,0)}function Ab(){let e=`currentInstance`;return e in pd?pd[e]:Lc()}var jb=()=>[],Die=()=>!1,Mb=0;function Nb(e){return((t,n,r,i)=>e(n,r,Ab()||void 0,i))}function Pb(e={}){let{__root:t,__injectWithOption:n}=e,r=t===void 0,i=e.flatJson,a=xv?I:mn,o=!Pv(e.inheritLocale)||e.inheritLocale,s=a(t&&o?t.locale.value:Nv(e.locale)?e.locale:Ly),c=a(t&&o?t.fallbackLocale.value:Nv(e.fallbackLocale)||jv(e.fallbackLocale)||Rv(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:s.value),l=a(Db(s.value,e)),u=a(Rv(e.datetimeFormats)?e.datetimeFormats:{[s.value]:{}}),d=a(Rv(e.numberFormats)?e.numberFormats:{[s.value]:{}}),f=t?t.missingWarn:Pv(e.missingWarn)||Tv(e.missingWarn)?e.missingWarn:!0,p=t?t.fallbackWarn:Pv(e.fallbackWarn)||Tv(e.fallbackWarn)?e.fallbackWarn:!0,m=t?t.fallbackRoot:!Pv(e.fallbackRoot)||e.fallbackRoot,h=!!e.fallbackFormat,g=Mv(e.missing)?e.missing:null,_=Mv(e.missing)?Nb(e.missing):null,v=Mv(e.postTranslation)?e.postTranslation:null,y=t?t.warnHtmlMessage:!Pv(e.warnHtmlMessage)||e.warnHtmlMessage,b=!!e.escapeParameter,x=t?t.modifiers:Rv(e.modifiers)?e.modifiers:{},S=e.pluralRules||t&&t.pluralRules,C;C=(()=>{r&&Uy(null);let t={version:wie,locale:s.value,fallbackLocale:c.value,messages:l.value,modifiers:x,pluralRules:S,missing:_===null?void 0:_,missingWarn:f,fallbackWarn:p,fallbackFormat:h,unresolving:!0,postTranslation:v===null?void 0:v,warnHtmlMessage:y,escapeParameter:b,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:`vue`}};t.datetimeFormats=u.value,t.numberFormats=d.value,t.__datetimeFormatters=Rv(C)?C.__datetimeFormatters:void 0,t.__numberFormatters=Rv(C)?C.__numberFormatters:void 0;let n=pie(t);return r&&Uy(n),n})(),qy(C,s.value,c.value);function w(){return[s.value,c.value,l.value,u.value,d.value]}let T=Y({get:()=>s.value,set:e=>{C.locale=e,s.value=e}}),E=Y({get:()=>c.value,set:e=>{C.fallbackLocale=e,c.value=e,qy(C,s.value,e)}}),D=Y(()=>l.value),O=Y(()=>u.value),k=Y(()=>d.value);function A(){return Mv(v)?v:null}function j(e){v=e,C.postTranslation=e}function M(){return g}function ee(e){e!==null&&(_=Nb(e)),g=e,C.missing=_}let te=(e,n,i,a,o,s)=>{w();let c;try{__INTLIFY_PROD_DEVTOOLS__,r||(C.fallbackContext=t?fie():void 0),c=e(C)}finally{__INTLIFY_PROD_DEVTOOLS__,r||(C.fallbackContext=void 0)}if(i!==`translate exists`&&Cv(c)&&c===-1||i===`translate exists`&&!c){let[e,r]=n();return t&&m?a(t):o(e)}else if(s(c))return c;else throw vb(_b.UNEXPECTED_RETURN_TYPE)};function ne(...e){return te(t=>Reflect.apply(ub,null,[t,...e]),()=>hb(...e),`translate`,t=>Reflect.apply(t.t,t,[...e]),e=>e,e=>Nv(e))}function N(...e){let[t,n,r]=e;if(r&&!Fv(r))throw vb(_b.INVALID_ARGUMENT);return ne(t,n,Dv({resolvedMessage:!0},r||{}))}function re(...e){return te(t=>Reflect.apply($y,null,[t,...e]),()=>tb(...e),`datetime format`,t=>Reflect.apply(t.d,t,[...e]),()=>``,e=>Nv(e)||jv(e))}function ie(...e){return te(t=>Reflect.apply(rb,null,[t,...e]),()=>ab(...e),`number format`,t=>Reflect.apply(t.n,t,[...e]),()=>``,e=>Nv(e)||jv(e))}function ae(e){return e.map(e=>Nv(e)||Cv(e)||Pv(e)?kb(String(e)):e)}let oe={normalize:ae,interpolate:e=>e,type:`vnode`};function se(...e){return te(t=>{let n,r=t;try{r.processor=oe,n=Reflect.apply(ub,null,[r,...e])}finally{r.processor=null}return n},()=>hb(...e),`translate`,t=>t[yb](...e),e=>[kb(e)],e=>jv(e))}function P(...e){return te(t=>Reflect.apply(rb,null,[t,...e]),()=>ab(...e),`number format`,t=>t[xb](...e),jb,e=>Nv(e)||jv(e))}function ce(...e){return te(t=>Reflect.apply($y,null,[t,...e]),()=>tb(...e),`datetime format`,t=>t[bb](...e),jb,e=>Nv(e)||jv(e))}function le(e){S=e,C.pluralRules=S}function ue(e,t){return te(()=>{if(!e)return!1;let n=Nv(t)?t:s.value,r=Nv(t)?[n]:Oy(C,c.value,n);for(let t=0;t[e],`translate exists`,n=>Reflect.apply(n.te,n,[e,t]),Die,e=>Pv(e))}function de(e){let t=null,n=Oy(C,c.value,s.value);for(let r=0;r{o&&(s.value=e,C.locale=e,qy(C,s.value,c.value))}),B(t.fallbackLocale,e=>{o&&(c.value=e,C.fallbackLocale=e,qy(C,s.value,c.value))}));let Se={id:Mb,locale:T,fallbackLocale:E,get inheritLocale(){return o},set inheritLocale(e){o=e,e&&t&&(s.value=t.locale.value,c.value=t.fallbackLocale.value,qy(C,s.value,c.value))},get availableLocales(){return Object.keys(l.value).sort()},messages:D,get modifiers(){return x},get pluralRules(){return S||{}},get isGlobal(){return r},get missingWarn(){return f},set missingWarn(e){f=e,C.missingWarn=f},get fallbackWarn(){return p},set fallbackWarn(e){p=e,C.fallbackWarn=p},get fallbackRoot(){return m},set fallbackRoot(e){m=e},get fallbackFormat(){return h},set fallbackFormat(e){h=e,C.fallbackFormat=h},get warnHtmlMessage(){return y},set warnHtmlMessage(e){y=e,C.warnHtmlMessage=e},get escapeParameter(){return b},set escapeParameter(e){b=e,C.escapeParameter=e},t:ne,getLocaleMessage:pe,setLocaleMessage:me,mergeLocaleMessage:he,getPostTranslationHandler:A,setPostTranslationHandler:j,getMissingHandler:M,setMissingHandler:ee,[Sb]:le};return Se.datetimeFormats=O,Se.numberFormats=k,Se.rt=N,Se.te=ue,Se.tm=fe,Se.d=re,Se.n=ie,Se.getDateTimeFormat=ge,Se.setDateTimeFormat=_e,Se.mergeDateTimeFormat=ve,Se.getNumberFormat=ye,Se.setNumberFormat=be,Se.mergeNumberFormat=xe,Se[Cb]=n,Se[yb]=se,Se[bb]=ce,Se[xb]=P,Se}function Oie(e){let t=Nv(e.locale)?e.locale:Ly,n=Nv(e.fallbackLocale)||jv(e.fallbackLocale)||Rv(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,r=Mv(e.missing)?e.missing:void 0,i=Pv(e.silentTranslationWarn)||Tv(e.silentTranslationWarn)?!e.silentTranslationWarn:!0,a=Pv(e.silentFallbackWarn)||Tv(e.silentFallbackWarn)?!e.silentFallbackWarn:!0,o=!Pv(e.fallbackRoot)||e.fallbackRoot,s=!!e.formatFallbackMessages,c=Rv(e.modifiers)?e.modifiers:{},l=e.pluralizationRules,u=Mv(e.postTranslation)?e.postTranslation:void 0,d=!Nv(e.warnHtmlInMessage)||e.warnHtmlInMessage!==`off`,f=!!e.escapeParameterHtml,p=!Pv(e.sync)||e.sync,m=e.messages;if(Rv(e.sharedMessages)){let t=e.sharedMessages;m=Object.keys(t).reduce((e,n)=>(Dv(e[n]||(e[n]={}),t[n]),e),m||{})}let{__i18n:h,__root:g,__injectWithOption:_}=e,v=e.datetimeFormats,y=e.numberFormats,b=e.flatJson;return{locale:t,fallbackLocale:n,messages:m,flatJson:b,datetimeFormats:v,numberFormats:y,missing:r,missingWarn:i,fallbackWarn:a,fallbackRoot:o,fallbackFormat:s,modifiers:c,pluralRules:l,postTranslation:u,warnHtmlMessage:d,escapeParameter:f,messageResolver:e.messageResolver,inheritLocale:p,__i18n:h,__root:g,__injectWithOption:_}}function Fb(e={}){let t=Pb(Oie(e)),{__extender:n}=e,r={id:t.id,get locale(){return t.locale.value},set locale(e){t.locale.value=e},get fallbackLocale(){return t.fallbackLocale.value},set fallbackLocale(e){t.fallbackLocale.value=e},get messages(){return t.messages.value},get datetimeFormats(){return t.datetimeFormats.value},get numberFormats(){return t.numberFormats.value},get availableLocales(){return t.availableLocales},get missing(){return t.getMissingHandler()},set missing(e){t.setMissingHandler(e)},get silentTranslationWarn(){return Pv(t.missingWarn)?!t.missingWarn:t.missingWarn},set silentTranslationWarn(e){t.missingWarn=Pv(e)?!e:e},get silentFallbackWarn(){return Pv(t.fallbackWarn)?!t.fallbackWarn:t.fallbackWarn},set silentFallbackWarn(e){t.fallbackWarn=Pv(e)?!e:e},get modifiers(){return t.modifiers},get formatFallbackMessages(){return t.fallbackFormat},set formatFallbackMessages(e){t.fallbackFormat=e},get postTranslation(){return t.getPostTranslationHandler()},set postTranslation(e){t.setPostTranslationHandler(e)},get sync(){return t.inheritLocale},set sync(e){t.inheritLocale=e},get warnHtmlInMessage(){return t.warnHtmlMessage?`warn`:`off`},set warnHtmlInMessage(e){t.warnHtmlMessage=e!==`off`},get escapeParameterHtml(){return t.escapeParameter},set escapeParameterHtml(e){t.escapeParameter=e},get pluralizationRules(){return t.pluralRules||{}},__composer:t,t(...e){return Reflect.apply(t.t,t,[...e])},rt(...e){return Reflect.apply(t.rt,t,[...e])},te(e,n){return t.te(e,n)},tm(e){return t.tm(e)},getLocaleMessage(e){return t.getLocaleMessage(e)},setLocaleMessage(e,n){t.setLocaleMessage(e,n)},mergeLocaleMessage(e,n){t.mergeLocaleMessage(e,n)},d(...e){return Reflect.apply(t.d,t,[...e])},getDateTimeFormat(e){return t.getDateTimeFormat(e)},setDateTimeFormat(e,n){t.setDateTimeFormat(e,n)},mergeDateTimeFormat(e,n){t.mergeDateTimeFormat(e,n)},n(...e){return Reflect.apply(t.n,t,[...e])},getNumberFormat(e){return t.getNumberFormat(e)},setNumberFormat(e,n){t.setNumberFormat(e,n)},mergeNumberFormat(e,n){t.mergeNumberFormat(e,n)}};return r.__extender=n,r}function kie(e,t,n){return{beforeCreate(){let r=Ab();if(!r)throw vb(_b.UNEXPECTED_ERROR);let i=this.$options;if(i.i18n){let r=i.i18n;if(i.__i18n&&(r.__i18n=i.__i18n),r.__root=t,this===this.$root)this.$i18n=Ib(e,r);else{r.__injectWithOption=!0,r.__extender=n.__vueI18nExtend,this.$i18n=Fb(r);let e=this.$i18n;e.__extender&&(e.__disposer=e.__extender(this.$i18n))}}else if(i.__i18n)if(this===this.$root)this.$i18n=Ib(e,i);else{this.$i18n=Fb({__i18n:i.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:t});let e=this.$i18n;e.__extender&&(e.__disposer=e.__extender(this.$i18n))}else this.$i18n=e;i.__i18nGlobal&&Ob(t,i,i),this.$t=(...e)=>this.$i18n.t(...e),this.$rt=(...e)=>this.$i18n.rt(...e),this.$te=(e,t)=>this.$i18n.te(e,t),this.$d=(...e)=>this.$i18n.d(...e),this.$n=(...e)=>this.$i18n.n(...e),this.$tm=e=>this.$i18n.tm(e),n.__setInstance(r,this.$i18n)},mounted(){},unmounted(){let e=Ab();if(!e)throw vb(_b.UNEXPECTED_ERROR);let t=this.$i18n;t&&(delete this.$t,delete this.$rt,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,t?.__disposer&&(t.__disposer(),delete t.__disposer,delete t.__extender),n.__deleteInstance(e),delete this.$i18n)}}}function Ib(e,t){e.locale=t.locale||e.locale,e.fallbackLocale=t.fallbackLocale||e.fallbackLocale,e.missing=t.missing||e.missing,e.silentTranslationWarn=t.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=t.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=t.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=t.postTranslation||e.postTranslation,e.warnHtmlInMessage=t.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=t.escapeParameterHtml||e.escapeParameterHtml,e.sync=t.sync||e.sync,e.__composer[Sb](t.pluralizationRules||e.pluralizationRules);let n=Db(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(n).forEach(t=>e.mergeLocaleMessage(t,n[t])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(n=>e.mergeDateTimeFormat(n,t.datetimeFormats[n])),t.numberFormats&&Object.keys(t.numberFormats).forEach(n=>e.mergeNumberFormat(n,t.numberFormats[n])),e}var Lb={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e===`parent`||e===`global`,default:`parent`},i18n:{type:Object}};function Aie({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((e,t)=>[...e,...t.type===q?t.children:[t]],[]):t.reduce((t,n)=>{let r=e[n];return r&&(t[n]=r()),t},Ov())}function Rb(){return q}var zb=V({name:`i18n-t`,props:Dv({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>Cv(e)||!isNaN(e)}},Lb),setup(e,t){let{slots:n,attrs:r}=t,i=e.i18n||Wb({useScope:e.scope,__useComponent:!0});return()=>{let a=()=>{let r=Object.keys(n).filter(e=>e[0]!==`_`),a=Ov();e.locale&&(a.locale=e.locale),e.plural!==void 0&&(a.plural=Nv(e.plural)?+e.plural:e.plural);let o=Aie(t,r);return i[yb](e.keypath,o,a)},o=Dv(Ov(),r),s=Nv(e.tag)||Fv(e.tag)?e.tag:Rb();return Fv(s)?Fo(s,o,{default:a}):Fo(s,o,a())}}});function jie(e){return jv(e)&&!Nv(e[0])}function Bb(e,t,n,r){let{slots:i,attrs:a}=t;return()=>{let t=()=>{let t={part:!0},a=Ov();e.locale&&(t.locale=e.locale),Nv(e.format)?t.key=e.format:Fv(e.format)&&(Nv(e.format.key)&&(t.key=e.format.key),a=Object.keys(e.format).reduce((t,r)=>n.includes(r)?Dv(Ov(),t,{[r]:e.format[r]}):t,Ov()));let o=r(e.value,t,a),s=[t.key];return jv(o)?s=o.map((e,t)=>{let n=i[e.type],r=n?n({[e.type]:e.value,index:t,parts:o}):[e.value];return jie(r)&&(r[0].key=`${e.type}-${t}`),r}):Nv(o)&&(s=[o]),s},o=Dv(Ov(),a),s=Nv(e.tag)||Fv(e.tag)?e.tag:Rb();return Fv(s)?Fo(s,o,{default:t}):Fo(s,o,t())}}var Vb=V({name:`i18n-n`,props:Dv({value:{type:Number,required:!0},format:{type:[String,Object]}},Lb),setup(e,t){let n=e.i18n||Wb({useScope:e.scope,__useComponent:!0});return Bb(e,t,ib,(...e)=>n[xb](...e))}});function Mie(e,t){let n=e;if(e.mode===`composition`)return n.__getInstance(t)||e.global;{let r=n.__getInstance(t);return r==null?e.global.__composer:r.__composer}}function Nie(e){let t=t=>{let{instance:n,value:r}=t;if(!n||!n.$)throw vb(_b.UNEXPECTED_ERROR);let i=Mie(e,n.$),a=Hb(r);return[Reflect.apply(i.t,i,[...Ub(a)]),i]};return{created:(e,n)=>{let[r,i]=t(n);xv&&(e.__i18nWatcher=B(i.locale,()=>{n.instance&&n.instance.$forceUpdate()})),e.__composer=i,e.textContent=r},unmounted:e=>{xv&&e.__i18nWatcher&&(e.__i18nWatcher(),e.__i18nWatcher=void 0,delete e.__i18nWatcher),e.__composer&&(e.__composer=void 0,delete e.__composer)},beforeUpdate:(e,{value:t})=>{if(e.__composer){let n=e.__composer,r=Hb(t);e.textContent=Reflect.apply(n.t,n,[...Ub(r)])}},getSSRProps:e=>{let[n]=t(e);return{textContent:n}}}}function Hb(e){if(Nv(e))return{path:e};if(Rv(e)){if(!(`path`in e))throw vb(_b.REQUIRED_VALUE,`path`);return e}else throw vb(_b.INVALID_VALUE)}function Ub(e){let{path:t,locale:n,args:r,choice:i,plural:a}=e,o={},s=r||{};return Nv(n)&&(o.locale=n),Cv(i)&&(o.plural=i),Cv(a)&&(o.plural=a),[t,s,o]}function Pie(e,t,...n){let r=Rv(n[0])?n[0]:{};(!Pv(r.globalInstall)||r.globalInstall)&&([zb.name,`I18nT`].forEach(t=>e.component(t,zb)),[Vb.name,`I18nN`].forEach(t=>e.component(t,Vb)),[qb.name,`I18nD`].forEach(t=>e.component(t,qb))),e.directive(`t`,Nie(t))}var Fie=Sv(`global-vue-i18n`);function Iie(e={}){let t=__VUE_I18N_LEGACY_API__&&Pv(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__,n=!Pv(e.globalInjection)||e.globalInjection,r=new Map,[i,a]=Lie(e,t),o=Sv(``);function s(e){return r.get(e)||null}function c(e,t){r.set(e,t)}function l(e){r.delete(e)}let u={get mode(){return __VUE_I18N_LEGACY_API__&&t?`legacy`:`composition`},async install(e,...r){if(e.__VUE_I18N_SYMBOL__=o,e.provide(e.__VUE_I18N_SYMBOL__,u),Rv(r[0])){let e=r[0];u.__composerExtend=e.__composerExtend,u.__vueI18nExtend=e.__vueI18nExtend}let i=null;!t&&n&&(i=Wie(e,u.global)),__VUE_I18N_FULL_INSTALL__&&Pie(e,u,...r),__VUE_I18N_LEGACY_API__&&t&&e.mixin(kie(a,a.__composer,u));let s=e.unmount;e.unmount=()=>{i&&i(),u.dispose(),s()}},get global(){return a},dispose(){i.stop()},__instances:r,__getInstance:s,__setInstance:c,__deleteInstance:l};return u}function Wb(e={}){let t=Ab();if(t==null)throw vb(_b.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw vb(_b.NOT_INSTALLED);let n=Rie(t),r=Bie(n),i=Eie(t),a=zie(e,i);if(a===`global`)return Ob(r,e,i),r;if(a===`parent`){let i=Gb(n,t,e.__useComponent);return i??=r,i}if(a===`isolated`){if(n.mode!==`composition`)throw vb(_b.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);let i=n,a=Dv({},e);a.__root=Gb(n,t)||r;let o=Pb(a);return i.__composerExtend&&(o[wb]=i.__composerExtend(o)),xt()&&St(()=>{let e=o[wb];e&&(e(),delete o[wb])}),o}let o=n,s=o.__getInstance(t);if(s==null){let n=Dv({},e);`__i18n`in i&&(n.__i18n=i.__i18n),r&&(n.__root=r),s=Pb(n),o.__composerExtend&&(s[wb]=o.__composerExtend(s)),Hie(o,t,s),o.__setInstance(t,s)}return s}function Lie(e,t){let n=bt(),r=__VUE_I18N_LEGACY_API__&&t?n.run(()=>Fb(e)):n.run(()=>Pb(e));if(r==null)throw vb(_b.UNEXPECTED_ERROR);return[n,r]}function Rie(e){let t=qr(e.isCE?Fie:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw vb(e.isCE?_b.NOT_INSTALLED_WITH_PROVIDE:_b.UNEXPECTED_ERROR);return t}function zie(e,t){return Ev(e)?`__i18n`in t?`local`:`global`:e.useScope?e.useScope:`local`}function Bie(e){return e.mode===`composition`?e.global:e.global.__composer}function Gb(e,t,n=!1){let r=null,i=t.root,a=Vie(t,n);for(;a!=null;){let t=e;if(e.mode===`composition`)r=t.__getInstance(a);else if(__VUE_I18N_LEGACY_API__){let e=t.__getInstance(a);e!=null&&(r=e.__composer,n&&r&&!r[Cb]&&(r=null))}if(r!=null||i===a)break;a=a.parent}return r}function Vie(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function Hie(e,t,n){Bs(()=>{},t),Ws(()=>{let r=n;e.__deleteInstance(t);let i=r[wb];i&&(i(),delete r[wb])},t)}var Uie=[`locale`,`fallbackLocale`,`availableLocales`],Kb=[`t`,`rt`,`d`,`n`,`tm`,`te`];function Wie(e,t){let n=Object.create(null);return Uie.forEach(e=>{let r=Object.getOwnPropertyDescriptor(t,e);if(!r)throw vb(_b.UNEXPECTED_ERROR);let i=pn(r.value)?{get(){return r.value.value},set(e){r.value.value=e}}:{get(){return r.get&&r.get()}};Object.defineProperty(n,e,i)}),e.config.globalProperties.$i18n=n,Kb.forEach(n=>{let r=Object.getOwnPropertyDescriptor(t,n);if(!r||!r.value)throw vb(_b.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${n}`,r)}),()=>{delete e.config.globalProperties.$i18n,Kb.forEach(t=>{delete e.config.globalProperties[`$${t}`]})}}var qb=V({name:`i18n-d`,props:Dv({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},Lb),setup(e,t){let n=e.i18n||Wb({useScope:e.scope,__useComponent:!0});return Bb(e,t,eb,(...e)=>n[bb](...e))}});if(Tie(),sie(qre),cie(iie),lie(Oy),__INTLIFY_PROD_DEVTOOLS__){let e=kv();e.__INTLIFY__=!0,Jre(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}var Gie={setup:`Setup`,overview:`Overview`,proxies:`Proxies`,rules:`Rules`,connections:`Connections`,logs:`Logs`,default:`Default`,skip:`Skip`,online:`Online`,offline:`Offline`,statusLabel:`Status`,activeLabel:`Active`,availableLabel:`Available`,dragOrClickToAdd:`Drag or click to add`,addRow:`Add row`,connected:`Connected`,copy:`Copy`,protocol:`Protocol`,host:`Host`,port:`Port`,password:`Password`,submit:`Submit`,cancel:`Cancel`,delete:`Delete`,download:`Download`,upload:`Upload`,downloadSpeed:`Download speed`,uploadSpeed:`Upload speed`,memoryUsage:`Memory usage`,noData:`No data`,flushFakeIP:`Flush fake IP`,flushDNSCache:`Flush DNS cache`,flushDNSCacheSuccess:`DNS cache flushed successfully`,flushFakeIPSuccess:`Fake IP flushed successfully`,flushSmartWeightsSuccess:`Smart weights flushed successfully`,restartCoreSuccess:`Core restarted successfully`,reloadConfigsSuccess:`Configs reloaded successfully`,updateGeoSuccess:`Geo database updated successfully`,actionRunning:`{action}...`,chains:`Chains`,outbound:`Outbound`,proxyGroup:`Proxy group`,sortBy:`Sort by`,sortAToZ:`A → Z`,sortZToA:`Z → A`,sortLargestFirst:`Largest first`,sortSmallestFirst:`Smallest first`,sortNewestFirst:`Newest first`,sortOldestFirst:`Oldest first`,groupBy:`Group by`,noGrouping:`No grouping`,expandAllGroups:`Expand all groups`,collapseAllGroups:`Collapse all groups`,rule:`Rule`,sourceIP:`Source IP`,activeConnections:`Active`,closedConnections:`Closed`,allConnections:`All`,logLevel:`Log level`,logType:`Log type`,twoColumnProxyGroup:`Two-column proxy groups`,type:`Type`,process:`Process`,connectTime:`Connect time`,sourcePort:`Source port`,destination:`Resolved address`,destinationType:`Resolved type`,geoip:`GeoIP`,geoipCountryDatabaseURL:`GeoIP country database URL`,geoipASNDatabaseURL:`GeoIP ASN database URL`,geoipDatabaseURLTip:`Used to resolve the GeoIP info (country / ASN) of connection IPs locally. The mmdb is loaded from this URL and cached in the browser. Leave empty to use the default.`,inboundUser:`Inbound user`,basic:`Basic`,traffic:`Traffic`,sourceAndDestination:`Source & destination`,rawData:`Raw`,geoInfo:`GeoIP`,dl:`DL`,ul:`UL`,dlSpeed:`DL speed`,ulSpeed:`UL speed`,settings:`Settings`,speedtestUrl:`Speedtest URL`,speedtestTimeout:`Speedtest timeout`,speedtestMode:`Speedtest mode`,speedtestModeDashboard:`Dashboard controlled`,speedtestModeCore:`Core controlled`,speedtestModeTip:`Dashboard controlled keeps Selector, LoadBalance, and Smart groups on the dashboard-driven per-node test flow and shows per-node progress. Core controlled calls the core group latency API and lets the core test the whole group at once.`,connectionStyle:`Connection style`,logStyle:`Log style`,ruleStyle:`Rule style`,card:`Card`,table:`Table`,time:`Time`,content:`Content`,name:`Name`,ruleCount:`Rule count`,hitCount:`Hits`,missCount:`Misses`,hitMissCount:`Hits / Misses`,behavior:`Behavior`,vehicleType:`Vehicle type`,customTableColumns:`Custom table columns`,customCardLines:`Custom card lines`,close:`Close`,appearance:`Appearance`,defaultTheme:`Default theme`,darkTheme:`Dark theme`,proxyProvider:`Proxy provider`,ruleProvider:`Rule provider`,expire:`Expires`,noExpire:`No expiry`,updated:`Updated`,upgradeDashboard:`Upgrade dashboard`,reloadConfigs:`Reload configs`,updateConfigs:`Update configs`,updateConfigsSuccess:`Configs updated successfully`,configFilePath:`Config file path`,configFilePathPlaceholder:`Absolute path, e.g. /etc/mihomo/config.yaml`,configPayload:`Config content`,configPayloadPlaceholder:`Paste YAML config content here...`,forceUpdate:`Force update`,or:`or`,defaultsort:`Config order`,nameasc:`Name ascending`,namedesc:`Name descending`,latencydesc:`Latency descending`,latencyasc:`Latency ascending`,language:`Language`,automaticDisconnection:`Auto disconnect on node switch`,backend:`Backend`,tunMode:`TUN mode`,tunStack:`TUN stack`,upgradeCore:`Upgrade core`,upgradeCoreConfirm:`Upgrade the core now? The core will restart and the proxy service will be briefly interrupted.`,upgradeToRelease:`Upgrade to stable release`,upgradeToAlpha:`Upgrade to alpha release`,updateGeoDatabase:`Update GEO database`,truncateProxyName:`Truncate proxy name`,disableProxiesPageTextSelect:`Disable text selection on proxies page`,sourceIPLabels:`Source IP labels`,resolveClientHostname:`Resolve source IP hostnames`,proxyPreviewType:`Proxy preview type`,auto:`Auto`,dots:`Dots`,bar:`Bar`,exportSettings:`Export settings`,importSettings:`Import settings`,dashboardSettings:`Dashboard settings`,dashboardSettingsCore:`Core`,dashboardSettingsJsonFile:`JSON file`,dashboardSettingsUrl:`URL`,autoSyncSettings:`Auto-sync settings`,uploadSettings:`Upload settings to core`,syncSettings:`Sync settings from core`,deleteUploadedSettings:`Delete uploaded settings from core`,connectionSettings:`Connection settings`,proxySettings:`Proxy settings`,logSettings:`Log settings`,ruleSettings:`Rule settings`,connectionDetails:`Connection details`,customTheme:`Custom theme`,customCSS:`Custom CSS`,customCSSTip:`The styles below are injected into the page as-is. Invalid rules may break the layout.`,unavailableProxy:`Hide unavailable proxies`,protocolTips:`You are trying to connect to an HTTP backend, but zashboard is provided via HTTPS. This may cause connection errors. Please allow insecure content in your browser settings or use the HTTP version of zashboard, such as http://board.zash.run.place.`,global:`Global`,direct:`Direct`,lowLatencyDesc:`Yellow threshold`,mediumLatencyDesc:`Red threshold`,fonts:`Fonts`,emoji:`Emoji`,unauthorizedTip:`Unauthorized, please log in again.`,restartCore:`Restart core`,restartCoreConfirm:`Restart the core now? The proxy service will be briefly interrupted and existing connections will be dropped.`,checkCoreUpgrade:`Check for core upgrades`,autoUpgradeDashboard:`Auto-upgrade dashboard`,autoUpgradeCore:`Auto-upgrade core`,secondaryPath:`Secondary path`,secondaryPathTip:`If present, start with "/", otherwise leave empty.`,logRetentionLimit:`Log retention limit`,DNSQuery:`DNS query`,confirm:`Confirm`,backendSwitched:`Backend switched`,backendConnecting:`Connecting...`,backendReachable:`Connected`,backendUnreachable:`Connection failed`,switchToAnotherBackend:`Switch to another backend`,autoSwitchBackend:`Switch to the first reachable backend`,noReachableBackend:`None of the other backends are reachable.`,diagnosisUnauthorized:`Wrong password: the backend rejected the credentials.`,diagnosisTimeout:`The backend did not respond in time.`,diagnosisBadEndpoint:`the address is reachable but is not this API, or the path is wrong.`,diagnosisOffline:`The browser is offline; check your network connection.`,diagnosisCorsBlocked:`The backend is reachable, but the browser blocked the response: the backend does not allow this origin (CORS). Set external-controller-cors in the core config.`,diagnosisMixedContent:`The browser blocked the request: an HTTPS page cannot access an HTTP backend. Open the dashboard over HTTP, or serve the API over HTTPS.`,diagnosisMixedContentOrUnreachable:`The backend is unreachable — or, if it is running, the browser blocked this HTTPS page from accessing the HTTP backend; try opening the dashboard over HTTP.`,diagnosisUnreachable:`The backend is unreachable; check that the address and port are correct and that the core is running.`,ipv6Test:`IPv6 test`,socksPort:`SOCKS port`,httpPort:`HTTP port`,mixedPort:`Mixed port`,redirPort:`Redir port`,tproxyPort:`TProxy port`,tableSize:`Table size`,proxyCardSize:`Proxy card size`,small:`Small`,normal:`Normal`,large:`Large`,autoIPCheckWhenStart:`Auto-check IP on startup`,autoConnectionCheckWhenStart:`Auto-check connections on startup`,networkInfo:`Network info`,autoSwitchTheme:`Auto-switch theme`,customBackgroundURL:`Background`,splitOverviewPage:`Split overview page`,manageHiddenGroup:`Manage hidden groups`,showProxyGroup:`Show proxy group`,hideProxyGroup:`Hide proxy group`,manageHiddenGroupShortcutTip:`Press {shortcut} to toggle hidden group management`,transparent:`Transparency`,proxyGroupIconSize:`Proxy group icon size`,proxyGroupIconMargin:`Proxy group icon margin`,allowLan:`Allow LAN`,proxyChainDirection:`Proxy chain direction`,showFullProxyChain:`Show full proxy chain`,reverse:`Reverse`,sniffHost:`Sniff host`,ipScreenshotTip:`Please hide the IP when taking screenshots.`,showStatisticsWhenSidebarCollapsed:`Show statistics when the sidebar is collapsed`,totalConnections:`Connection statistics`,totalConnectionsTip:`Only connections opened while the dashboard is open are counted. -Tracking started at: {statsStartTime}`,manual:`Manual`,tableWidthMode:`Table width mode`,testFailed:`Test failed`,testFinishedTip:`{name} -{number}/{total} tests completed`,testFinishedResultTip:`{name} -Test completed: {success} succeeded, {failed} timed out`,testFailedTip:`{name} -Test failed`,updateFinishedTip:`{number} update(s) finished`,independentLatencyTest:`Independent latency test`,independentLatencyTestTip:`When enabled, the latency test will use URLs specified in the configuration file instead of zashboard's URL settings. Latency will be displayed independently based on the URLs set in policy groups.`,search:`Search`,searchVisibleColumns:`Search displayed columns`,searchHiddenColumns:`Search hidden columns too`,searchProxyGroup:`Search proxy groups`,searchProxyNode:`Search proxy nodes`,proxySearchModeGlobal:`Node search`,proxySearchModeGroup:`Policy group search`,importing:`Importing...`,hideConnection:`Hide connection`,showConnection:`Show connection`,hideConnectionRegex:`Hide connection regex`,hideConnectionTip:`You can use case-insensitive regular expressions to match and hide unwanted connections.`,hideLog:`Hide log`,showLog:`Show log`,hideLogRegex:`Hide log regex`,hideLogTip:`You can use case-insensitive regular expressions to match and hide unwanted logs.`,loadBalance:`Load balancing`,label:`Label`,optional:`Optional`,swipeInTabs:`Swipe to switch between tabs`,swipeInPages:`Swipe to switch between pages`,simpleCardPreset:`Simple preset`,detailedCardPreset:`Detailed preset`,refresh:`Refresh`,reset:`Reset`,resetSettings:`Reset settings`,resetSettingsConfirm:`Are you sure you want to reset all dashboard settings to default values? This action cannot be undone.`,backgroundToneSwitchConfirm:`This background looks better with the {theme}. Do you want to switch?`,backgroundToneLightThemeLabel:`light theme`,backgroundToneDarkThemeLabel:`dark theme`,minProxyCardWidth:`Minimum proxy card width`,displayGlobalByMode:`Show GLOBAL based on mode`,displaySelectedNode:`Show selected node`,displayLatencyNumber:`Show latency numbers`,disconnectOnRuleDisable:`Disconnect matching connections when a rule is disabled`,tipForFixed:`The current policy group is locked to the current node. Run a speed test to restore {type} behavior.`,remoteAddress:`Remote address`,save:`Save`,moreDetails:`More details`,moreSettings:`More settings`,customIcon:`Custom icon`,dropOrClickUpload:`Drop an image or paste a URL`,disablePullToRefresh:`Disable pull to refresh`,disablePullToRefreshTip:`Pull-to-refresh and virtual scrolling components may conflict. If you experience lag or accidentally trigger pull-to-refresh while scrolling, try disabling this feature.`,keyboardShortcuts:`Keyboard shortcuts`,keyboardShortcutsTip:`Click the input and press a key or key combination to set a shortcut. Press Backspace or Delete to clear it.`,keyboardShortcutPageName:`{name} page`,toggleSidebar:`Toggle sidebar`,switchToPreviousBackend:`Switch to previous backend`,switchToNextBackend:`Switch to next backend`,keyboardShortcutsConflict:`Duplicate shortcuts detected: {keys}. Only the first one will take effect.`,resetKeyboardShortcuts:`Reset shortcuts`,pressAnyKey:`Press a key`,displayAllFeatures:`Show all features`,displayAllFeaturesTip:`Show all features, including those not supported by the official build of the current core (honk). If you're using a fork that supports some of these features, you can try enabling them.`,blurIntensity:`Blur intensity`,scrollAnimationEffect:`Scroll animation effect`,importFromFile:`Import from file`,importFromUrl:`Import from URL`,uploadSettingsSuccess:`Settings uploaded successfully`,uploadSettingsIconReflectListRemoved:`Custom icon data was too large and has been removed during upload. Please reduce it and try again.`,syncSettingsSuccess:`Settings synced successfully`,syncSettingsConfirm:`The backend has stored settings that will override the following local settings: - -{keys} - -Do you want to apply them?`,importSettingsConfirm:`The imported settings will override the following local settings: - -{keys} - -Do you want to apply them?`,dontAskAgainAlwaysApply:`Don't ask again, always apply`,confirmBeforeOverride:`Confirm before overriding local settings`,deleteUploadedSettingsSuccess:`Uploaded settings deleted successfully`,deleteUploadedSettingsConfirm:`Are you sure you want to delete the uploaded settings on the backend? This action cannot be undone.`,upgradeSuccess:`Upgrade successful`,numberOfChartsInSidebar:`Number of charts in the sidebar`,flushSmartWeights:`Clear smart weights`,IPInfoAPI:`IP info API`,IPInfoAPITip:`This API is used for IP geolocation lookups in connection details and zashboard's DNS query feature. IP Check and Earth use their own API selections.`,general:`General`,groupProxiesByProvider:`Group proxies by provider`,useSmartGroupSort:`Sort smart groups by usage frequency`,all:`All`,autoDisconnectIdleUDP:`Auto-disconnect idle UDP connections`,autoDisconnectIdleUDPTime:`UDP idle time`,autoDisconnectIdleUDPTip:`When enabled, opening zashboard will close UDP connections that have been idle longer than the configured time. This can help with UDP connections that don't disconnect automatically.`,connectionTopology:`Connection topology`,applyConnectionFilter:`Apply connection filters`,topologyPause:`Pause topology updates`,topologyResume:`Resume topology updates`,topologyExpand:`Expand topology view`,topologyCollapse:`Restore topology view`,editBackend:`Edit backend`,editBackendTitle:`Edit backend configuration`,addBackend:`Add backend`,manageBackends:`Manage backends`,noBackendYet:`No backend yet`,backendConnectionFailed:`Backend connection failed. Please check your configuration.`,backendConfigSaved:`Backend configuration saved successfully`,saveFailed:`Save failed`,checking:`Checking...`,copySuccess:`Copied successfully`,importFromBackendTip:`The default ./zashboard-settings.json is located in the ui folder. Please ensure the ui folder exists and contains the configuration file.`,importFailed:`Import failed, please check the URL: {url}`,autoImportFromUrl:`Auto-import`,autoImportFromUrlTip:`When enabled, settings will be automatically imported from the URL when opening zashboard. If the hash differs from the last imported hash, settings will be re-imported and the page will be refreshed.`,getting:`Getting...`,mmdbSizeTip:`If you are using MMDB-format GEO files, this number will be 0.`,displayFinalOutbound:`Show final outbound node`,groupTestUrls:`Group test URLs`,groupTestUrlsTip:`For manual tests triggered from the dashboard, URL priority is: URLs set here > URLs in configuration > global test URLs. For groups like UrlTest/Fallback, you still need to modify URLs in the configuration, so this is mainly recommended for Selector scenarios.`,groupName:`Group name`,unknown:`Unknown`,sourceIPAddress:`Source IP address`,ruleMatch:`Rule match`,proxyChainEntry:`Proxy chain entry`,proxyChainExit:`Proxy chain exit`,nodeType:`Node type`,connectionCount:`Connection count`,zashboardSettings:`Dashboard settings`,backendSettings:`Backend settings`,generalSettings:`General settings`,overviewSettings:`Overview settings`,overviewCardSettings:`Card settings`,chartsCard:`Charts card`,networkCard:`Network card`,providerTrafficOverview:`Provider traffic overview`,topologyCharts:`Topology charts`,earthGlobeCard:`Global connections`,earthGlobeTitle:`Global connections`,earthProjection:`Projection`,earthVisualStyle:`Globe style`,earthVisualStyle_space:`Space`,earthVisualStyle_flat:`Flat`,earthOriginAPI:`Public IP service`,earthLocalIP:`Local IP`,earthToggleIP:`Show or hide local IP`,earthHideCityLabels:`Hide city names`,earthShowCityLabels:`Show city names`,earthPauseRotation:`Pause globe rotation`,earthResumeRotation:`Resume globe rotation`,earthExpand:`Expand globe view`,earthCollapse:`Restore globe view`,earthConnectionLine:`Connection route`,earthLegend:`Endpoint legend`,earthLegendProxied:`Via proxy`,earthDatabaseChecking:`Checking the local city database…`,earthDatabaseLoading:`Loading the cached city database…`,earthDatabaseConsentTitle:`Download the local city database?`,earthDatabaseConsent:`Connection endpoints stay in this browser. DB-IP City Lite requires about {download} to download and {stored} of local storage after extraction.`,earthDatabaseCacheRecovered:`A damaged cached database was removed. Download a clean copy to restore location lookup.`,earthDatabaseDownload:`Download database`,earthDatabaseLearnMore:`About DB-IP City Lite`,earthDatabaseDownloading:`Downloading city database`,earthDatabaseError_space:`There is not enough browser storage for the city database.`,earthDatabaseError_network:`The city database could not be downloaded.`,earthDatabaseError_decompress:`The city database could not be decompressed.`,earthDatabaseError_invalid:`The downloaded city database is invalid.`,earthDatabaseError_storage:`The city database could not be saved in browser storage.`,earthDatabaseError_unsupported:`This browser cannot decompress the city database.`,earthDatabaseError_unknown:`The city database could not be loaded.`,earthOriginError:`The local public IP could not be detected. Retry to locate connections.`,earthNoConnections:`No active connections`,earthNoLocatedConnections:`No active connection endpoints could be located`,earthEndpointRole:`Role`,earthTopDownloadedHosts:`Top 5 hosts by download`,earthRole_origin:`Local device`,earthRole_destination:`Destination`,earthRendererError:`3D rendering is unavailable in this browser.`,retry:`Retry`,connectionHistory:`Connection history`,ruleHitCountCard:`Rule hit/miss statistics`,honkStatsCard:`honk runtime statistics`,honkStatsOutbounds:`Outbounds`,honkStatsActiveConns:`Active`,honkStatsErrors:`Errors`,latency:`Latency`,icon:`Icon`,settingsMenuGeneral:`General`,settingsMenuBackend:`Backend`,settingsMenuProxies:`Proxies`,settingsMenuConnections:`Connections`,settingsMenuOverview:`Overview`,settingsDescriptionGeneral:`Themes, app updates, data sources, and interaction preferences`,settingsDescriptionOverview:`Overview cards, startup checks, and the desktop sidebar`,settingsDescriptionBackend:`Active backend, core maintenance, and network listeners`,settingsDescriptionProxies:`Latency tests, proxy group display, and icons`,settingsDescriptionConnections:`Connection display, table options, and client identification`,settingsCategory:`Settings category`,searchSettings:`Search settings`,noSettingsFound:`No matching settings found`,hiddenSearchResults:`{count} matching hidden settings`,noVisibleSettingsCategories:`No categories are visible. Restore them from Customize settings.`,customize:`Customize`,customizeSettingsPage:`Customize settings`,customizeSettingsDescription:`Choose which categories and settings are shown, and reorder categories.`,back:`Back`,clear:`Clear`,settingsSectionApplication:`App and updates`,settingsSectionNetworkData:`Network and data sources`,settingsSectionInteraction:`Interaction and shortcuts`,settingsSectionCardsLayout:`Cards and layout`,settingsSectionStartupChecks:`Startup checks`,settingsSectionDesktopSidebar:`Desktop sidebar`,settingsSectionCurrentBackend:`Current backend`,settingsSectionCoreOperations:`Core maintenance`,settingsSectionNetworkListening:`Network listeners`,settingsSectionCoreUpdates:`Core updates`,settingsSectionDiagnostics:`Diagnostics`,settingsSectionProxyDisplay:`Groups and display`,settingsSectionProxyAdvanced:`Icons and advanced settings`,settingsSectionConnectionDisplay:`Display`,settingsSectionClientIdentity:`Client identification and labels`,ports:`Ports`,actions:`Actions`,showAllPreset:`Show all`,minimalPreset:`Minimal view`,moveUp:`Move up`,moveDown:`Move down`,aggregateBy:`Aggregate by`,aggregateBySourceIP:`By source IP`,aggregateByDestination:`By destination`,aggregateByProcess:`By process`,aggregateByOutbound:`By outbound`,aggregateByProxyGroup:`By proxy group`,totalTraffic:`Total traffic`,total:`Total`,clearConnectionHistory:`Clear connection history`,clearConnectionHistoryConfirm:`Are you sure you want to clear all connection history data? This action cannot be undone.`,clearConnectionHistorySuccess:`Connection history data cleared successfully`,autoCleanupInterval:`Auto cleanup interval`,autoCleanupIntervalWeek:`Weekly`,autoCleanupIntervalMonth:`Monthly`,autoCleanupIntervalQuarter:`Quarterly`,autoCleanupIntervalNever:`Never`,remainingTraffic:`Remaining`,ruleHitCount:`Hit: {count} times`,ruleLastHit:`Last hit: {time}`,ruleMissCount:`Miss: {count} times`,ruleLastMiss:`Last miss: {time}`,RarelyUsed:`Rarely used`,OccasionalUsed:`Occasionally used`,MostUsed:`Most used`,proxyFolderMode:`Proxy folder mode`,folderModeAuto:`Auto`,folderModeOn:`On`,folderModeOff:`Off`,folder_all:`All`,folder_uncategorized:`Uncategorized`,folder_manage:`Manage folders`,folder_builtin_strategy:`Strategy`,folder_builtin_nodes:`Nodes`,folder_name:`Folder name`,folder_new_placeholder:`New folder name`,folder_rules:`Auto rules`,folder_rule_auto:`Auto`,folder_rule_regex:`Regex`,folder_rule_exclude_regex:`Exclude regex`,folder_auto_hasGroup:`Contains sub-group`,folder_auto_nodeOnly:`Nodes only`,folder_add_rule:`Add rule`,folder_manual_includes:`Manually included`,folder_filter_placeholder:`Filter proxy groups`,folder_preview:`Auto-matched groups`,folder_no_matches:`No matched groups`,folder_delete_confirm:`Delete folder "{name}"?`},Kie={setup:`Настройка`,overview:`Обзор`,proxies:`Прокси`,rules:`Правила`,connections:`Подключения`,logs:`Журнал`,default:`По умолчанию`,skip:`Пропустить`,online:`В сети`,offline:`Не в сети`,statusLabel:`Состояние`,activeLabel:`Активен`,availableLabel:`Доступен`,dragOrClickToAdd:`Перетащите или нажмите, чтобы добавить`,addRow:`Добавить строку`,connected:`Подключено`,copy:`Копировать`,protocol:`Протокол`,host:`Хост`,port:`Порт`,password:`Пароль`,submit:`Отправить`,cancel:`Отмена`,delete:`Удалить`,download:`Загружено`,upload:`Отправлено`,downloadSpeed:`Скорость загрузки`,uploadSpeed:`Скорость отдачи`,memoryUsage:`Память`,noData:`Нет данных`,flushFakeIP:`Очистить Fake IP`,flushDNSCache:`Очистить DNS кэш`,flushDNSCacheSuccess:`DNS кэш успешно очищен`,flushFakeIPSuccess:`Fake IP успешно очищен`,flushSmartWeightsSuccess:`Smart веса успешно очищены`,restartCoreSuccess:`Ядро успешно перезапущено`,reloadConfigsSuccess:`Конфигурации успешно перезагружены`,updateGeoSuccess:`Geo база данных успешно обновлена`,actionRunning:`{action}: выполняется…`,chains:`Цепочки`,outbound:`Исходящий`,proxyGroup:`Группа прокси`,sortBy:`Сортировать по`,sortAToZ:`А → Я`,sortZToA:`Я → А`,sortLargestFirst:`Сначала большие`,sortSmallestFirst:`Сначала малые`,sortNewestFirst:`Сначала новые`,sortOldestFirst:`Сначала старые`,groupBy:`Группировать по`,noGrouping:`Без группировки`,expandAllGroups:`Развернуть все группы`,collapseAllGroups:`Свернуть все группы`,rule:`Правило`,sourceIP:`Исходный IP`,activeConnections:`Активные`,closedConnections:`Закрытые`,allConnections:`Все`,logLevel:`Уровень`,logType:`Тип журнала`,twoColumnProxyGroup:`Группа прокси в два столбца`,type:`Тип`,process:`Процесс`,connectTime:`Время`,sourcePort:`Исходный порт`,destination:`Разрешенный адрес`,destinationType:`Тип разрешения`,geoip:`GeoIP`,geoipCountryDatabaseURL:`URL базы стран GeoIP`,geoipASNDatabaseURL:`URL базы ASN GeoIP`,geoipDatabaseURLTip:`Используется для локального определения информации GeoIP (страна / ASN) для IP-адресов соединений. Файл mmdb загружается по этому адресу и кэшируется в браузере. Оставьте пустым для значения по умолчанию.`,inboundUser:`Входящий пользователь`,basic:`Основное`,traffic:`Трафик`,sourceAndDestination:`Источник и назначение`,rawData:`Исходные данные`,geoInfo:`GeoIP`,dl:`Загр`,ul:`Отдч`,dlSpeed:`Загрузка`,ulSpeed:`Отдача`,settings:`Настройки`,speedtestUrl:`URL теста скорости`,speedtestTimeout:`Таймаут теста скорости`,speedtestMode:`Режим теста скорости`,speedtestModeDashboard:`Управление панелью`,speedtestModeCore:`Управление ядром`,speedtestModeTip:`Управление панелью оставляет группы Selector, LoadBalance и Smart на тестировании отдельных узлов из панели и показывает прогресс по узлам. Управление ядром вызывает API группового теста ядра, чтобы ядро проверило всю группу сразу.`,connectionStyle:`Стиль подключения`,logStyle:`Стиль логов`,ruleStyle:`Стиль правил`,card:`Карточка`,table:`Таблица`,time:`Время`,content:`Содержимое`,name:`Название`,ruleCount:`Количество правил`,hitCount:`Совпадения`,missCount:`Промахи`,hitMissCount:`Совпадения / Промахи`,behavior:`Поведение`,vehicleType:`Тип источника`,customTableColumns:`Пользовательские столбцы таблицы`,customCardLines:`Пользовательские строчки карточки`,close:`Закрыть`,appearance:`Внешний вид`,defaultTheme:`Тема по умолчанию`,darkTheme:`Темная тема`,proxyProvider:`Провайдер прокси`,ruleProvider:`Провайдер правил`,expire:`Истекает`,noExpire:`Нет`,updated:`Обновлено`,upgradeDashboard:`Обновить панель до новой версии`,reloadConfigs:`Перезагрузить конфигурации`,updateConfigs:`Обновить конфигурации`,updateConfigsSuccess:`Конфигурации успешно обновлены`,configFilePath:`Путь к файлу конфигурации`,configFilePathPlaceholder:`Абсолютный путь, например /etc/mihomo/config.yaml`,configPayload:`Содержимое конфигурации`,configPayloadPlaceholder:`Вставьте YAML содержимое конфигурации здесь...`,forceUpdate:`Принудительное обновление`,or:`ИЛИ`,defaultsort:`По конфигурациям`,nameasc:`Имя по возрастанию`,namedesc:`Имя по убыванию`,latencydesc:`Задержка по убыванию`,latencyasc:`Задержка по возрастанию`,language:`Язык`,automaticDisconnection:`Автоматическое отключение`,backend:`Бэкенд`,tunMode:`Режим Tun`,tunStack:`Стек Tun`,upgradeCore:`Обновить ядро до новой версии`,upgradeCoreConfirm:`Обновить ядро сейчас? Ядро будет перезапущено, работа прокси ненадолго прервётся.`,upgradeToRelease:`Обновить ядро до Release`,upgradeToAlpha:`Обновить ядро до Alpha`,updateGeoDatabase:`Обновить GEO`,truncateProxyName:`Усечение имени прокси`,disableProxiesPageTextSelect:`Запретить выделение текста на странице прокси`,sourceIPLabels:`Метки исходного IP`,resolveClientHostname:`Разрешать имена исходных IP`,proxyPreviewType:`Тип предварительного просмотра прокси`,auto:`Авто`,dots:`Точки`,bar:`Полоса`,exportSettings:`Экспорт настроек`,importSettings:`Импорт настроек`,dashboardSettings:`Настройки панели`,dashboardSettingsCore:`Ядро`,dashboardSettingsJsonFile:`JSON файл`,dashboardSettingsUrl:`URL`,autoSyncSettings:`Автосинхронизация настроек`,uploadSettings:`Загрузить настройки в ядро`,syncSettings:`Синхронизировать настройки из ядра`,deleteUploadedSettings:`Удалить загруженные настройки из ядра`,connectionSettings:`Настройки подключения`,proxySettings:`Настройки прокси`,logSettings:`Настройки журнала`,ruleSettings:`Настройки правил`,connectionDetails:`Детали подключения`,customTheme:`Пользовательская тема`,customCSS:`Пользовательский CSS`,customCSSTip:`Указанные стили встраиваются в страницу как есть. Некорректные правила могут сломать вёрстку.`,unavailableProxy:`Скрыть недоступное`,protocolTips:`Вы пытаетесь подключиться к HTTP-бэкенду, но zashboard предоставляется через HTTPS. Это может вызвать ошибки подключения. Разрешите небезопасный контент в настройках браузера или используйте HTTP-версию панели, например, http://board.zash.run.place.`,global:`Глобальный`,direct:`Прямой`,lowLatencyDesc:`Желтый порог`,mediumLatencyDesc:`Красный порог`,fonts:`Шрифты`,emoji:`Emoji`,unauthorizedTip:`Не авторизован, пожалуйста, войдите снова.`,restartCore:`Перезапустить ядро`,restartCoreConfirm:`Перезапустить ядро сейчас? Работа прокси ненадолго прервётся, существующие соединения будут разорваны.`,checkCoreUpgrade:`Проверить доступность обновления ядра`,autoUpgradeDashboard:`Автоматически обновлять панель до новой версии`,autoUpgradeCore:`Автоматически обновлять ядро до новой версии`,secondaryPath:`Дополнительный путь`,secondaryPathTip:`Если присутствует, начните с "/", в противном случае оставьте пустым.`,logRetentionLimit:`Лимит хранения журнала`,DNSQuery:`DNS-запрос`,confirm:`Подтвердить`,backendSwitched:`Бэкенд переключён`,backendConnecting:`Подключение...`,backendReachable:`Подключено`,backendUnreachable:`Ошибка подключения`,switchToAnotherBackend:`Переключиться на другой бэкенд`,autoSwitchBackend:`Переключиться на первый доступный бэкенд`,noReachableBackend:`Ни один из других бэкендов недоступен.`,diagnosisUnauthorized:`Неверный пароль: бэкенд отклонил учётные данные.`,diagnosisTimeout:`Бэкенд не ответил вовремя.`,diagnosisBadEndpoint:`адрес доступен, но это не тот API, либо путь указан неверно.`,diagnosisOffline:`Браузер офлайн; проверьте сетевое подключение.`,diagnosisCorsBlocked:`Бэкенд доступен, но браузер заблокировал ответ: бэкенд не разрешает этот источник (CORS). Задайте external-controller-cors в конфигурации ядра.`,diagnosisMixedContent:`Браузер заблокировал запрос: HTTPS-страница не может обращаться к HTTP-бэкенду. Откройте панель по HTTP или настройте HTTPS для API.`,diagnosisMixedContentOrUnreachable:`Бэкенд недоступен — либо он работает, но браузер запретил HTTPS-странице обращаться к HTTP-бэкенду; попробуйте открыть панель по HTTP.`,diagnosisUnreachable:`Бэкенд недоступен; проверьте правильность адреса и порта, а также запущено ли ядро.`,ipv6Test:`IPv6-тест`,socksPort:`Порт Socks`,httpPort:`Порт HTTP`,mixedPort:`Порт Mixed`,redirPort:`Порт Redir`,tproxyPort:`Порт TProxy`,tableSize:`Размер таблицы`,proxyCardSize:`Размер карточки прокси`,small:`Маленький`,normal:`Нормальный`,large:`Большой`,autoIPCheckWhenStart:`Автоматическая проверка IP при запуске`,autoConnectionCheckWhenStart:`Автоматическая проверка соединений при запуске`,networkInfo:`Информация о сети`,autoSwitchTheme:`Автоматический темы`,customBackgroundURL:`URL фона`,splitOverviewPage:`Разделить страницу с обзором`,manageHiddenGroup:`Управление скрытыми группами`,showProxyGroup:`Показать группу прокси`,hideProxyGroup:`Скрыть группу прокси`,manageHiddenGroupShortcutTip:`Нажмите {shortcut}, чтобы переключить управление скрытыми группами`,transparent:`Прозрачность`,proxyGroupIconSize:`Размер иконки группы прокси`,proxyGroupIconMargin:`Отступ иконки группы прокси`,allowLan:`Разрешить локальную сеть`,proxyChainDirection:`Направление цепочки прокси`,showFullProxyChain:`Показать полную цепочку прокси`,reverse:`Обратное`,sniffHost:`Захватывать хост`,ipScreenshotTip:`Пожалуйста, убедитесь, что реальный IP скрыт при создании скриншотов.`,showStatisticsWhenSidebarCollapsed:`Показать статистику при сворачивании панели`,totalConnections:`Статистика соединений`,totalConnectionsTip:`Учитываются только соединения, открытые во время работы панели. -Время начала записи: {statsStartTime}`,manual:`Ручной`,tableWidthMode:`Режим ширины таблицы`,testFailed:`Тест задержки таймаут`,testFinishedTip:`{name} -{number}/{total} Тест завершен`,testFinishedResultTip:`{name} -Тест завершен: {success} Успешно, {failed} Таймаут`,testFailedTip:`{name} -Тест задержки таймаут`,updateFinishedTip:`{number} Обновление завершено`,independentLatencyTest:`Независимый тест задержки`,independentLatencyTestTip:`Включение независимого тестирования задержки попытается использовать URL-адреса, указанные в конфигурационном файле, вместо настроек URL-адресов в панели управления во время теста задержки. Задержка будет отображаться отдельно на основе URL-адресов, установленных в группах политик.`,search:`Поиск`,searchVisibleColumns:`Поиск по отображаемым столбцам`,searchHiddenColumns:`Поиск и по скрытым столбцам`,searchProxyGroup:`Поиск групп прокси`,searchProxyNode:`Поиск узлов прокси`,proxySearchModeGlobal:`Поиск узлов`,proxySearchModeGroup:`Поиск групп политик`,importing:`Импортируется`,hideConnection:`Скрыть соединение`,showConnection:`Показать соединение`,hideConnectionRegex:`Скрыть соединение Regex`,hideConnectionTip:`Используйте регистронезависимое регулярное выражение, чтобы найти и скрыть нежелательные соединения.`,hideLog:`Скрыть журнал`,showLog:`Показать журнал`,hideLogRegex:`Скрыть журнал Regex`,hideLogTip:`Используйте регистронезависимое регулярное выражение, чтобы найти и скрыть нежелательные записи журнала.`,loadBalance:`Балансировка нагрузки`,label:`Метка`,optional:`Необязательно`,swipeInTabs:`Провести для переключения вкладок`,swipeInPages:`Провести для переключения страниц`,simpleCardPreset:`Простой`,detailedCardPreset:`Подробный`,refresh:`Обновить`,reset:`Сбросить`,resetSettings:`Сбросить настройки`,resetSettingsConfirm:`Вы уверены, что хотите сбросить все настройки панели к значениям по умолчанию? Это действие нельзя отменить.`,backgroundToneSwitchConfirm:`Для этого фона лучше подходит {theme}. Переключить тему?`,backgroundToneLightThemeLabel:`светлая тема`,backgroundToneDarkThemeLabel:`темная тема`,minProxyCardWidth:`Минимальная ширина карточки прокси`,displayGlobalByMode:`Отображать GLOBAL по режиму`,displaySelectedNode:`Отображать выбранный узел`,displayLatencyNumber:`Отображать задержку`,disconnectOnRuleDisable:`Разрывать соединения при отключении правила`,tipForFixed:`Текущая стратегическая группа закреплена за текущим узлом. Нажмите «Тест скорости», чтобы восстановить поведение {type}.`,remoteAddress:`удалённый адрес`,save:`Сохранить`,moreDetails:`Подробнее`,moreSettings:`Дополнительные настройки`,customIcon:`Пользовательская иконка`,dropOrClickUpload:`Перетащите изображение или вставьте URL`,disablePullToRefresh:`Отключить свойство обновления`,disablePullToRefreshTip:`Компоненты Pull-to-refresh и виртуальной прокрутки иногда могут конфликтовать. Если при прокрутке вверх-вниз у вас часто возникают задержки или случайные срабатывания Pull-to-refresh, попробуйте отключить Pull-to-refresh.`,keyboardShortcuts:`Горячие клавиши`,keyboardShortcutsTip:`Нажмите на поле и затем нужную клавишу или сочетание клавиш. Для очистки используйте Backspace или Delete.`,keyboardShortcutPageName:`Страница {name}`,toggleSidebar:`Переключить боковую панель`,switchToPreviousBackend:`Переключиться на предыдущий бэкенд`,switchToNextBackend:`Переключиться на следующий бэкенд`,keyboardShortcutsConflict:`Обнаружены повторяющиеся горячие клавиши: {keys}. Сработает только первое совпадение.`,resetKeyboardShortcuts:`Сбросить горячие клавиши`,pressAnyKey:`Нажмите клавишу`,displayAllFeatures:`Показать все функции`,displayAllFeaturesTip:`Показать все функции, включая те, которые не поддерживаются официальной сборкой текущего ядра (honk). Если вы используете форк, поддерживающий некоторые из этих функций, вы можете попробовать их включить.`,blurIntensity:`Интенсивность размытия`,scrollAnimationEffect:`Эффект анимации прокрутки`,importFromFile:`Импортировать из файла`,importFromUrl:`Импортировать из URL`,uploadSettingsSuccess:`Настройки успешно загружены`,uploadSettingsIconReflectListRemoved:`Данные пользовательских иконок слишком велики и были удалены при загрузке. Уменьшите их размер и попробуйте снова.`,syncSettingsSuccess:`Настройки успешно синхронизированы`,syncSettingsConfirm:`В бэкенде сохранены настройки, которые перезапишут следующие локальные настройки: - -{keys} - -Применить их?`,importSettingsConfirm:`Импортированные настройки перезапишут следующие локальные настройки: - -{keys} - -Применить их?`,dontAskAgainAlwaysApply:`Больше не спрашивать, применять автоматически`,confirmBeforeOverride:`Подтверждать перезапись локальных настроек`,deleteUploadedSettingsSuccess:`Загруженные настройки успешно удалены`,deleteUploadedSettingsConfirm:`Вы уверены, что хотите удалить загруженные на бэкенд настройки? Это действие нельзя отменить.`,upgradeSuccess:`Обновление до новой версии выполнено успешно`,numberOfChartsInSidebar:`Количество графиков в боковой панели`,flushSmartWeights:`Очистить Smart веса`,IPInfoAPI:`API информации о IP`,IPInfoAPITip:`Этот API используется для определения геолокации IP-адресов в деталях соединения и DNS-запросах панели. Проверка IP и глобус используют собственные настройки API.`,general:`Универсальный`,groupProxiesByProvider:`Группировать прокси по провайдеру`,useSmartGroupSort:`Сортировать Smart группы по частоте использования`,all:`Все`,autoDisconnectIdleUDP:`Автоматически отключить UDP-идле`,autoDisconnectIdleUDPTime:`Время UDP-идле`,autoDisconnectIdleUDPTip:`При включении открытие zashboard приведёт к закрытию UDP-соединений, продолжительность которых превышает заданное количество минут. Это может помочь в случае с некоторыми UDP-соединениями, которые не разрываются автоматически, как ожидается.`,connectionTopology:`Топология соединений`,applyConnectionFilter:`Применять фильтры соединений`,topologyPause:`Приостановить обновление топологии`,topologyResume:`Возобновить обновление топологии`,topologyExpand:`Развернуть топологию`,topologyCollapse:`Восстановить размер топологии`,editBackend:`Редактировать бэкенд`,editBackendTitle:`Редактировать конфигурацию бэкенда`,addBackend:`Добавить бэкенд`,manageBackends:`Управление бэкендами`,noBackendYet:`Бэкендов пока нет`,backendConnectionFailed:`Не удалось подключиться к бэкенду, проверьте конфигурацию`,backendConfigSaved:`Конфигурация бэкенда успешно сохранена`,saveFailed:`Не удалось сохранить`,checking:`Проверка...`,copySuccess:`Копирование успешно`,importFromBackendTip:`По умолчанию ./zashboard-settings.json находится в папке ui. Пожалуйста, убедитесь, что папка ui существует и содержит файл конфигурации.`,importFailed:`Импорт не выполнен, проверьте url {url}`,autoImportFromUrl:`Автоматический импорт`,autoImportFromUrlTip:`При включении настройки будут автоматически импортироваться из url при открытии zashboard. Если хэш отличается от последнего импортированного хэша, настройки будут импортированы заново и страница будет обновлена.`,getting:`Получение...`,mmdbSizeTip:`Если вы используете mmdb-формат файлов geo, то количество будет равно 0`,displayFinalOutbound:`Показать конечный исходящий узел`,groupTestUrls:`Группа тестовых URL`,groupTestUrlsTip:`Для ручных тестов, запущенных из панели, установите тестовые URL > URL в конфигурации > Глобальные тестовые URL, но для групп с UrlTest/Fallback и т.д., URL в конфигурации все равно нужно изменить, поэтому это рекомендуется только для Selector и т.д. `,groupName:`Группа имени`,unknown:`Неизвестно`,sourceIPAddress:`Исходный IP-адрес`,ruleMatch:`Совпадение правила`,proxyChainEntry:`Вход в цепочку прокси`,proxyChainExit:`Выход из цепочки прокси`,nodeType:`Тип узла`,connectionCount:`Количество соединений`,zashboardSettings:`Настройки панели`,backendSettings:`Настройки бэкенда`,generalSettings:`Общие настройки`,overviewSettings:`Настройки обзора`,overviewCardSettings:`Настройки карточек`,chartsCard:`Карточка графиков`,networkCard:`Сетевая карточка`,providerTrafficOverview:`Обзор трафика провайдера`,topologyCharts:`Топологические графики`,earthGlobeCard:`Глобальные подключения`,earthGlobeTitle:`Глобальные подключения`,earthProjection:`Проекция`,earthVisualStyle:`Стиль глобуса`,earthVisualStyle_space:`Космос`,earthVisualStyle_flat:`Плоский`,earthOriginAPI:`Сервис публичного IP`,earthLocalIP:`Локальный IP`,earthToggleIP:`Показать или скрыть локальный IP`,earthHideCityLabels:`Скрыть названия городов`,earthShowCityLabels:`Показать названия городов`,earthPauseRotation:`Остановить вращение Земли`,earthResumeRotation:`Продолжить вращение Земли`,earthExpand:`Развернуть глобус`,earthCollapse:`Восстановить размер глобуса`,earthConnectionLine:`Маршрут подключения`,earthLegend:`Легенда точек`,earthLegendProxied:`Через прокси`,earthDatabaseChecking:`Проверка локальной базы городов…`,earthDatabaseLoading:`Загрузка базы городов из кэша…`,earthDatabaseConsentTitle:`Скачать локальную базу городов?`,earthDatabaseConsent:`Конечные точки подключений остаются в этом браузере. Для DB-IP City Lite требуется около {download} для загрузки и {stored} локального хранилища после распаковки.`,earthDatabaseCacheRecovered:`Повреждённая база удалена из кэша. Скачайте чистую копию для восстановления геолокации.`,earthDatabaseDownload:`Скачать базу`,earthDatabaseLearnMore:`О DB-IP City Lite`,earthDatabaseDownloading:`Загрузка базы городов`,earthDatabaseError_space:`Недостаточно места в хранилище браузера для базы городов.`,earthDatabaseError_network:`Не удалось скачать базу городов.`,earthDatabaseError_decompress:`Не удалось распаковать базу городов.`,earthDatabaseError_invalid:`Скачанная база городов повреждена.`,earthDatabaseError_storage:`Не удалось сохранить базу городов в браузере.`,earthDatabaseError_unsupported:`Этот браузер не может распаковать базу городов.`,earthDatabaseError_unknown:`Не удалось загрузить базу городов.`,earthOriginError:`Не удалось определить публичный IP. Повторите попытку.`,earthNoConnections:`Нет активных подключений`,earthNoLocatedConnections:`Не удалось определить конечные точки активных подключений`,earthEndpointRole:`Роль`,earthTopDownloadedHosts:`Топ-5 хостов по загрузке`,earthRole_origin:`Локальное устройство`,earthRole_destination:`Назначение`,earthRendererError:`3D-рендеринг недоступен в этом браузере.`,retry:`Повторить`,connectionHistory:`История подключений`,ruleHitCountCard:`Статистика попаданий/промахов правил`,honkStatsCard:`Статистика выполнения honk`,honkStatsOutbounds:`Исходящие`,honkStatsActiveConns:`Активные`,honkStatsErrors:`Ошибки`,latency:`Задержка`,icon:`Иконка`,settingsMenuGeneral:`Общие`,settingsMenuBackend:`Бэкенд`,settingsMenuProxies:`Прокси`,settingsMenuConnections:`Подключения`,settingsMenuOverview:`Обзор`,settingsDescriptionGeneral:`Темы, обновления, источники данных и управление`,settingsDescriptionOverview:`Карточки обзора, проверки запуска и боковая панель`,settingsDescriptionBackend:`Активный бэкенд, обслуживание ядра и сетевые порты`,settingsDescriptionProxies:`Тесты задержки, отображение групп и иконки`,settingsDescriptionConnections:`Отображение соединений, таблица и клиенты`,settingsCategory:`Категория настроек`,searchSettings:`Поиск настроек`,noSettingsFound:`Подходящие настройки не найдены`,hiddenSearchResults:`Совпадений в скрытых настройках: {count}`,noVisibleSettingsCategories:`Нет видимых категорий. Восстановите их в настройке страницы.`,customize:`Настроить`,customizeSettingsPage:`Настроить страницу`,customizeSettingsDescription:`Выберите видимые категории и настройки и измените их порядок.`,back:`Назад`,clear:`Очистить`,settingsSectionApplication:`Приложение и обновления`,settingsSectionNetworkData:`Сеть и источники данных`,settingsSectionInteraction:`Управление и сочетания клавиш`,settingsSectionCardsLayout:`Карточки и макет`,settingsSectionStartupChecks:`Проверки при запуске`,settingsSectionDesktopSidebar:`Боковая панель`,settingsSectionCurrentBackend:`Текущий бэкенд`,settingsSectionCoreOperations:`Обслуживание ядра`,settingsSectionNetworkListening:`Сетевые порты`,settingsSectionCoreUpdates:`Обновления ядра`,settingsSectionDiagnostics:`Диагностика`,settingsSectionProxyDisplay:`Группы и отображение`,settingsSectionProxyAdvanced:`Иконки и расширенные настройки`,settingsSectionConnectionDisplay:`Отображение`,settingsSectionClientIdentity:`Идентификация и метки клиентов`,ports:`Порты`,actions:`Действия`,showAllPreset:`Показать все`,minimalPreset:`Минимальный вид`,moveUp:`Вверх`,moveDown:`Вниз`,aggregateBy:`Агрегация по`,aggregateBySourceIP:`По исходному IP`,aggregateByDestination:`По назначению`,aggregateByProcess:`По процессу`,aggregateByOutbound:`По исходящему`,aggregateByProxyGroup:`По группе прокси`,totalTraffic:`Общий трафик`,total:`Итого`,clearConnectionHistory:`Очистить историю соединений`,clearConnectionHistoryConfirm:`Вы уверены, что хотите очистить все данные истории соединений? Это действие нельзя отменить.`,clearConnectionHistorySuccess:`История соединений успешно очищена`,autoCleanupInterval:`Интервал автоматической очистки`,autoCleanupIntervalWeek:`Еженедельно`,autoCleanupIntervalMonth:`Ежемесячно`,autoCleanupIntervalQuarter:`Ежеквартально`,autoCleanupIntervalNever:`Никогда`,remainingTraffic:`Осталось`,ruleHitCount:`Попадание: {count} раз`,ruleLastHit:`Последнее попадание: {time}`,ruleMissCount:`Промах: {count} раз`,ruleLastMiss:`Последний промах: {time}`,RarelyUsed:`Редко используется`,OccasionalUsed:`Иногда используется`,MostUsed:`Часто используется`,proxyFolderMode:`Режим папок`,folderModeAuto:`Авто`,folderModeOn:`Вкл`,folderModeOff:`Выкл`,folder_all:`Все`,folder_uncategorized:`Без категории`,folder_manage:`Управление папками`,folder_builtin_strategy:`Группы стратегий`,folder_builtin_nodes:`Группы узлов`,folder_name:`Имя папки`,folder_new_placeholder:`Имя новой папки`,folder_rules:`Авто-правила`,folder_rule_auto:`Авто`,folder_rule_regex:`Regex`,folder_rule_exclude_regex:`Exclude regex`,folder_auto_hasGroup:`Содержит под-группы`,folder_auto_nodeOnly:`Только узлы`,folder_add_rule:`Добавить правило`,folder_manual_includes:`Включено вручную`,folder_filter_placeholder:`Поиск групп`,folder_preview:`Автоматически подобранные группы`,folder_no_matches:`Нет подходящих групп`,folder_delete_confirm:`Удалить папку «{name}»?`},qie={setup:`配置`,overview:`概览`,proxies:`代理`,rules:`规则`,connections:`连接`,logs:`日志`,default:`默认`,skip:`跳过`,online:`在线`,offline:`离线`,statusLabel:`状态`,activeLabel:`已启用`,availableLabel:`可用`,dragOrClickToAdd:`拖拽或点击添加`,addRow:`添加行`,connected:`已连接`,copy:`复制`,protocol:`协议`,host:`主机`,port:`端口`,password:`密码`,submit:`提交`,cancel:`取消`,delete:`删除`,download:`下载`,upload:`上传`,downloadSpeed:`下载速度`,uploadSpeed:`上传速度`,memoryUsage:`内存使用`,noData:`暂无数据`,flushFakeIP:`清空Fake IP`,flushDNSCache:`清空DNS缓存`,flushDNSCacheSuccess:`DNS缓存清空成功`,flushFakeIPSuccess:`Fake IP清空成功`,flushSmartWeightsSuccess:`Smart权重清空成功`,restartCoreSuccess:`核心重启成功`,reloadConfigsSuccess:`配置重载成功`,updateGeoSuccess:`GEO数据库更新成功`,actionRunning:`{action}执行中…`,chains:`代理链`,outbound:`出站节点`,proxyGroup:`策略组`,sortBy:`排序方式`,sortAToZ:`A → Z`,sortZToA:`Z → A`,sortLargestFirst:`从大到小`,sortSmallestFirst:`从小到大`,sortNewestFirst:`最新在前`,sortOldestFirst:`最早在前`,groupBy:`分组方式`,noGrouping:`不分组`,expandAllGroups:`展开全部分组`,collapseAllGroups:`折叠全部分组`,rule:`规则`,sourceIP:`源IP`,activeConnections:`活跃`,closedConnections:`已关闭`,allConnections:`全部`,logLevel:`日志等级`,logType:`日志类型`,twoColumnProxyGroup:`双列显示代理组`,type:`类型`,process:`进程`,connectTime:`连接时间`,sourcePort:`源端口`,destination:`解析地址`,destinationType:`解析类型`,geoip:`归属信息`,geoipCountryDatabaseURL:`GeoIP 国家库地址`,geoipASNDatabaseURL:`GeoIP ASN 库地址`,geoipDatabaseURLTip:`用于本地解析连接 IP 的归属信息(国家 / ASN),从该地址加载 mmdb 并缓存在浏览器中。留空则使用默认地址。`,inboundUser:`入站用户`,basic:`基本`,traffic:`流量`,sourceAndDestination:`来源与目的`,rawData:`原始数据`,geoInfo:`归属信息`,dl:`下载`,ul:`上传`,dlSpeed:`下载速度`,ulSpeed:`上传速度`,settings:`设置`,speedtestUrl:`测速地址`,speedtestTimeout:`测速超时`,speedtestMode:`测速方式`,speedtestModeDashboard:`面板控制`,speedtestModeCore:`核心控制`,speedtestModeTip:`面板控制会让 Selector、LoadBalance、Smart 组沿用面板逐个测试节点的逻辑,并展示每个节点的测试进度。核心控制会调用核心的组测速接口,由核心一次性完成整组测速。`,connectionStyle:`连接样式`,logStyle:`日志样式`,ruleStyle:`规则样式`,card:`卡片`,table:`表格`,time:`时间`,content:`内容`,name:`名称`,ruleCount:`规则数`,hitCount:`命中`,missCount:`未命中`,hitMissCount:`命中 / 未命中`,behavior:`行为`,vehicleType:`来源类型`,customTableColumns:`自定义表格列`,customCardLines:`自定义卡片行`,close:`关闭`,appearance:`外观`,defaultTheme:`默认主题`,darkTheme:`深色主题`,proxyProvider:`代理提供商`,ruleProvider:`规则提供商`,expire:`到期时间`,noExpire:`不限时`,updated:`更新于`,upgradeDashboard:`升级面板`,reloadConfigs:`重载配置`,updateConfigs:`更新配置`,updateConfigsSuccess:`配置更新成功`,configFilePath:`配置文件路径`,configFilePathPlaceholder:`绝对路径,例如 /etc/mihomo/config.yaml`,configPayload:`配置内容`,configPayloadPlaceholder:`在此粘贴 YAML 配置内容...`,forceUpdate:`强制更新`,or:`或`,defaultsort:`按配置排序`,nameasc:`按名称升序`,namedesc:`按名称降序`,latencydesc:`按延迟降序`,latencyasc:`按延迟升序`,language:`面板语言`,automaticDisconnection:`切换节点时自动断开连接`,backend:`后端`,upgradeCore:`升级核心`,upgradeCoreConfirm:`确定要升级核心吗?核心会重启,代理服务将短暂中断。`,upgradeToRelease:`升级到 Release`,upgradeToAlpha:`升级到 Alpha`,updateGeoDatabase:`更新GEO`,tunMode:`Tun 模式`,tunStack:`Tun 堆栈`,truncateProxyName:`截断节点名称`,disableProxiesPageTextSelect:`禁用代理页文字选中`,sourceIPLabels:`源IP标签`,resolveClientHostname:`反向解析源 IP 主机名`,proxyPreviewType:`节点预览类型`,auto:`自动`,dots:`点`,bar:`条`,exportSettings:`导出设置`,importSettings:`导入设置`,dashboardSettings:`面板配置`,dashboardSettingsCore:`核心`,dashboardSettingsJsonFile:`JSON 文件`,dashboardSettingsUrl:`URL`,autoSyncSettings:`自动同步设置`,uploadSettings:`上传设置到核心`,syncSettings:`从核心同步设置`,deleteUploadedSettings:`从核心删除已上传设置`,connectionSettings:`连接设置`,proxySettings:`代理设置`,logSettings:`日志设置`,ruleSettings:`规则设置`,connectionDetails:`连接详情`,customTheme:`自定义主题`,customCSS:`自定义 CSS`,customCSSTip:`以下样式会原样注入页面,无效的规则可能导致界面显示异常。`,unavailableProxy:`隐藏不可用节点`,protocolTips:`您正在尝试连接一个http后端但zashboard是通过https提供的,这可能会导致连接错误,请在浏览器设置中允许不安全的内容,或者使用http版本面板例如http://board.zash.run.place`,global:`全局`,direct:`直连`,lowLatencyDesc:`黄色的阈值`,mediumLatencyDesc:`红色的阈值`,fonts:`面板字体`,emoji:`Emoji`,unauthorizedTip:`未授权,请重新登录`,restartCore:`重启核心`,restartCoreConfirm:`确定要重启核心吗?代理服务将短暂中断,现有连接会被断开。`,checkCoreUpgrade:`检查核心升级`,autoUpgradeDashboard:`自动升级面板`,autoUpgradeCore:`自动升级核心`,secondaryPath:`二级路径`,secondaryPathTip:`如果有的话以/开头,没有则留空不填`,logRetentionLimit:`日志保留条数`,DNSQuery:`DNS 查询`,confirm:`确定`,backendSwitched:`已切换后端`,backendConnecting:`正在连接...`,backendReachable:`连接正常`,backendUnreachable:`连接失败`,switchToAnotherBackend:`切换到其他后端`,autoSwitchBackend:`切换到第一个可用的后端`,noReachableBackend:`其他后端也都连不上`,diagnosisUnauthorized:`密码不对,后端拒绝了这次请求`,diagnosisTimeout:`后端没有在规定时间内响应`,diagnosisBadEndpoint:`地址能连上,但对面不是这个 API,或者路径写错了`,diagnosisOffline:`浏览器当前处于离线状态,请检查网络连接`,diagnosisCorsBlocked:`后端能连上,但浏览器按同源策略拦下了响应:后端没有放行当前来源(CORS)。请在内核配置里设置 external-controller-cors`,diagnosisMixedContent:`浏览器拦下了这次请求:HTTPS 页面不能访问 HTTP 后端。请用 HTTP 打开面板,或者给 API 配上 HTTPS`,diagnosisMixedContentOrUnreachable:`后端连不上 —— 也可能后端是好的,只是浏览器不允许 HTTPS 页面访问 HTTP 后端;可以试着用 HTTP 打开面板`,diagnosisUnreachable:`后端连不上,请检查地址与端口是否正确、内核是否在运行`,ipv6Test:`IPv6 测试`,socksPort:`Socks 端口`,httpPort:`HTTP 端口`,mixedPort:`Mixed 端口`,redirPort:`Redir 端口`,tproxyPort:`TProxy 端口`,tableSize:`表格尺寸`,proxyCardSize:`节点卡片尺寸`,small:`小`,normal:`正常`,large:`大`,autoIPCheckWhenStart:`自动检查 IP`,autoConnectionCheckWhenStart:`自动检查连接`,networkInfo:`网络信息`,autoSwitchTheme:`自动切换主题`,customBackgroundURL:`面板背景`,splitOverviewPage:`分离概览页`,manageHiddenGroup:`管理隐藏代理组`,showProxyGroup:`显示代理组`,hideProxyGroup:`隐藏代理组`,manageHiddenGroupShortcutTip:`按 {shortcut} 可切换隐藏代理组管理模式`,transparent:`透明度`,proxyGroupIconSize:`策略组图标尺寸`,proxyGroupIconMargin:`策略组图标间距`,allowLan:`允许局域网`,proxyChainDirection:`代理链方向`,showFullProxyChain:`完整显示代理链`,reverse:`反向`,sniffHost:`嗅探主机`,ipScreenshotTip:`截图时请确保隐藏IP`,showStatisticsWhenSidebarCollapsed:`侧边栏折叠时显示统计`,totalConnections:`连接统计`,totalConnectionsTip:`只能统计面板打开期间的连接。 -记录开始时间:{statsStartTime}`,manual:`手动`,tableWidthMode:`表格宽度模式`,testFailed:`测速超时`,testFinishedTip:`{name} -{number}/{total} 测试完成`,testFinishedResultTip:`{name} -测试完成: {success} 成功,{failed} 超时`,testFailedTip:`{name} -测速超时`,updateFinishedTip:`{number} 更新完成`,independentLatencyTest:`独立延迟测试`,independentLatencyTestTip:`开启独立延迟测试会在测速中尽可能的使用配置文件中的url覆盖面板设置的url,并展示根据策略组设置的url获取的延迟。`,search:`搜索`,searchVisibleColumns:`仅搜索展示的列`,searchHiddenColumns:`搜索包含隐藏的列`,searchProxyGroup:`搜索代理组`,searchProxyNode:`搜索节点`,proxySearchModeGlobal:`节点搜索`,proxySearchModeGroup:`策略组搜索`,importing:`正在导入`,hideConnection:`隐藏连接`,showConnection:`显示连接`,hideConnectionRegex:`隐藏连接正则`,hideConnectionTip:`可通过不区分大小写的正则表达式来匹配并隐藏不需要看到的连接`,hideLog:`隐藏日志`,showLog:`显示日志`,hideLogRegex:`隐藏日志正则`,hideLogTip:`可通过不区分大小写的正则表达式来匹配并隐藏不需要看到的日志`,loadBalance:`负载均衡`,label:`标签`,optional:`可选`,swipeInTabs:`滑动切换页面二级标签`,swipeInPages:`滑动切换页面`,simpleCardPreset:`简洁预设`,detailedCardPreset:`详细预设`,refresh:`刷新`,reset:`重置`,resetSettings:`恢复默认设置`,resetSettingsConfirm:`确定要将面板设置恢复为默认值吗?此操作不可撤销。`,backgroundToneSwitchConfirm:`检测到这张背景图更适合使用{theme},是否切换?`,backgroundToneLightThemeLabel:`浅色主题`,backgroundToneDarkThemeLabel:`深色主题`,minProxyCardWidth:`节点卡片最小宽度`,displayGlobalByMode:`根据模式显示 GLOBAL`,displaySelectedNode:`显示选中节点`,displayLatencyNumber:`显示延迟数字`,disconnectOnRuleDisable:`禁用规则时打断连接`,tipForFixed:`当前策略组被固定在了当前节点,点击测速来恢复{type}行为`,remoteAddress:`远端地址`,save:`保存`,moreDetails:`更多详情`,moreSettings:`更多设置`,customIcon:`自定义图标`,dropOrClickUpload:`拖拽图片或输入 URL`,disablePullToRefresh:`禁用下拉刷新`,disablePullToRefreshTip:`下拉刷新和虚拟滚动的组件有时会有冲突,如果你在上下滚动的时候经常卡顿或者误触发下拉刷新,可以尝试禁用下拉刷新`,keyboardShortcuts:`快捷键设置`,keyboardShortcutsTip:`点击输入框后可直接按单键或组合键设置快捷键,按 Backspace 或 Delete 可清空。`,keyboardShortcutPageName:`{name}页`,toggleSidebar:`展开/收起侧边栏`,switchToPreviousBackend:`切换到上一个后端`,switchToNextBackend:`切换到下一个后端`,keyboardShortcutsConflict:`检测到重复快捷键:{keys}。只有第一项会生效。`,resetKeyboardShortcuts:`重置快捷键`,pressAnyKey:`按下任意键`,displayAllFeatures:`显示所有功能`,displayAllFeaturesTip:`显示所有功能,包括当前内核(honk)官方版本不支持的功能,如果您使用的 fork 版本支持其中的某些功能,可以尝试启用`,blurIntensity:`毛玻璃强度`,scrollAnimationEffect:`滚动动画效果`,importFromFile:`从文件导入`,importFromUrl:`从 URL 导入`,uploadSettingsSuccess:`设置上传成功`,uploadSettingsIconReflectListRemoved:`自定义图标数据过长,上传时已自动移除这部分内容,请精简后重试。`,syncSettingsSuccess:`设置同步成功`,syncSettingsConfirm:`后端存储的设置将覆盖以下本地设置: - -{keys} - -是否应用?`,importSettingsConfirm:`导入的设置将覆盖以下本地设置: - -{keys} - -是否应用?`,dontAskAgainAlwaysApply:`不再提示,以后自动应用`,confirmBeforeOverride:`覆盖本地设置前确认`,deleteUploadedSettingsSuccess:`已上传设置删除成功`,deleteUploadedSettingsConfirm:`确定要删除后端上已上传的设置吗?此操作不可撤销。`,upgradeSuccess:`升级成功`,numberOfChartsInSidebar:`侧边栏图表数量`,flushSmartWeights:`清空Smart权重`,IPInfoAPI:`IP信息API`,IPInfoAPITip:`此API仅用于连接详情与面板DNS查询中的IP地理信息查询;IP检查与地球组件使用各自的API选项。`,general:`通用`,groupProxiesByProvider:`节点根据提供商分组`,useSmartGroupSort:`Smart组根据使用频率排序`,all:`全部`,autoDisconnectIdleUDP:`自动断开空闲UDP`,autoDisconnectIdleUDPTime:`UDP空闲时间`,autoDisconnectIdleUDPTip:`启用后,打开zashboard时将关闭持续时间超过配置分钟数的UDP连接,这可能对某些无法正常自动断开的UDP连接带来帮助。(这是作者自己的私货,你大概率不需要打开它)`,connectionTopology:`连接拓扑`,applyConnectionFilter:`应用连接筛选`,topologyPause:`暂停拓扑更新`,topologyResume:`继续拓扑更新`,topologyExpand:`扩展拓扑画面`,topologyCollapse:`还原拓扑画面`,editBackend:`编辑后端`,editBackendTitle:`修改后端配置`,addBackend:`添加后端`,manageBackends:`管理后端`,noBackendYet:`还没有后端`,backendConnectionFailed:`后端连接失败,请检查配置信息`,backendConfigSaved:`后端配置保存成功`,saveFailed:`保存失败`,checking:`检查中...`,copySuccess:`复制成功`,importFromBackendTip:`默认的./zashboard-settings.json位于ui文件夹下,导入前请确保ui文件夹下存在配置文件。`,importFailed:`导入失败,请检查url {url}`,autoImportFromUrl:`自动导入`,autoImportFromUrlTip:`启用后,每次打开zashboard时会自动从url设置导入并计算hash,如果hash与上次导入的hash不同,则重新导入并刷新页面。`,getting:`获取中...`,mmdbSizeTip:`mmdb等格式的geo文件无法统计数量,因此数量为0`,displayFinalOutbound:`显示最终出口节点`,groupTestUrls:`组测试链接`,groupTestUrlsTip:`对于从面板手动触发的测试,此处设置测试链接 > 配置中的链接 > 面板全局测试链接,但是对于UrlTest/Fallback等具有核心内部的定时测速逻辑的组,仍然需要修改配置中的链接,此处仅推荐Selector等场景`,groupName:`组名`,unknown:`未知`,sourceIPAddress:`源IP地址`,ruleMatch:`规则匹配`,proxyChainEntry:`代理链入口`,proxyChainExit:`代理链出口`,nodeType:`节点类型`,connectionCount:`连接数`,zashboardSettings:`面板设置`,backendSettings:`后端设置`,generalSettings:`常规设置`,overviewSettings:`概览设置`,overviewCardSettings:`卡片设置`,chartsCard:`图表卡片`,networkCard:`网络卡片`,providerTrafficOverview:`提供商流量概览`,topologyCharts:`拓扑图表`,earthGlobeCard:`全球连接`,earthGlobeTitle:`全球连接`,earthProjection:`投影方式`,earthVisualStyle:`地球样式`,earthVisualStyle_space:`星空`,earthVisualStyle_flat:`扁平`,earthOriginAPI:`公网 IP 服务`,earthLocalIP:`本机 IP`,earthToggleIP:`显示或隐藏本机 IP`,earthHideCityLabels:`隐藏城市名称`,earthShowCityLabels:`显示城市名称`,earthPauseRotation:`停止地球自转`,earthResumeRotation:`继续地球自转`,earthExpand:`扩展地球画面`,earthCollapse:`还原地球画面`,earthConnectionLine:`连接线路`,earthLegend:`端点图例`,earthLegendProxied:`经代理`,earthDatabaseChecking:`正在检查本地城市数据库…`,earthDatabaseLoading:`正在加载缓存的城市数据库…`,earthDatabaseConsentTitle:`下载本地城市数据库?`,earthDatabaseConsent:`所有连接端点都只在此浏览器中查询。DB-IP City Lite 下载约需 {download},解压后约占 {stored} 本地存储空间。`,earthDatabaseCacheRecovered:`已移除损坏的数据库缓存,请下载完整副本以恢复定位。`,earthDatabaseDownload:`下载数据库`,earthDatabaseLearnMore:`了解 DB-IP City Lite`,earthDatabaseDownloading:`正在下载城市数据库`,earthDatabaseError_space:`浏览器可用存储空间不足,无法保存城市数据库。`,earthDatabaseError_network:`城市数据库下载失败。`,earthDatabaseError_decompress:`城市数据库解压失败。`,earthDatabaseError_invalid:`下载的城市数据库无效。`,earthDatabaseError_storage:`无法将城市数据库保存到浏览器存储。`,earthDatabaseError_unsupported:`当前浏览器无法解压城市数据库。`,earthDatabaseError_unknown:`无法加载城市数据库。`,earthOriginError:`无法探测本机公网 IP,请重试后再定位连接。`,earthNoConnections:`暂无活跃连接`,earthNoLocatedConnections:`无法定位当前活跃连接的端点`,earthEndpointRole:`角色`,earthTopDownloadedHosts:`下载量 Top 5 Host`,earthRole_origin:`本机`,earthRole_destination:`目的地`,earthRendererError:`当前浏览器无法使用 3D 渲染。`,retry:`重试`,connectionHistory:`连接历史`,ruleHitCountCard:`规则命中统计`,honkStatsCard:`honk 运行时统计`,honkStatsOutbounds:`出站`,honkStatsActiveConns:`活跃`,honkStatsErrors:`错误`,latency:`延迟`,icon:`图标`,settingsMenuGeneral:`面板`,settingsMenuBackend:`后端`,settingsMenuProxies:`代理`,settingsMenuConnections:`连接`,settingsMenuOverview:`概览`,settingsDescriptionGeneral:`主题、应用更新、数据源与交互偏好`,settingsDescriptionOverview:`概览卡片、启动检查与桌面侧栏`,settingsDescriptionBackend:`当前后端、内核运维与网络监听`,settingsDescriptionProxies:`测速、代理组展示与图标`,settingsDescriptionConnections:`连接展示、表格参数与客户端识别`,settingsCategory:`设置类别`,searchSettings:`搜索设置`,noSettingsFound:`没有找到匹配的设置`,hiddenSearchResults:`在已隐藏设置中找到 {count} 项`,noVisibleSettingsCategories:`当前没有可见类别,可在自定义设置页中恢复。`,customize:`自定义`,customizeSettingsPage:`自定义设置页`,customizeSettingsDescription:`选择需要显示的类别和设置项,并调整类别顺序。`,back:`返回`,clear:`清除`,settingsSectionApplication:`应用与更新`,settingsSectionNetworkData:`网络与数据源`,settingsSectionInteraction:`交互与快捷键`,settingsSectionCardsLayout:`卡片与布局`,settingsSectionStartupChecks:`启动检查`,settingsSectionDesktopSidebar:`桌面侧栏`,settingsSectionCurrentBackend:`当前后端`,settingsSectionCoreOperations:`内核运维`,settingsSectionNetworkListening:`网络监听`,settingsSectionCoreUpdates:`内核更新`,settingsSectionDiagnostics:`诊断工具`,settingsSectionProxyDisplay:`分组与显示`,settingsSectionProxyAdvanced:`图标与高级设置`,settingsSectionConnectionDisplay:`展示方式`,settingsSectionClientIdentity:`客户端识别与标注`,ports:`端口`,actions:`操作`,showAllPreset:`全部显示`,minimalPreset:`精简显示`,moveUp:`上移`,moveDown:`下移`,aggregateBy:`聚合方式`,aggregateBySourceIP:`按源IP`,aggregateByDestination:`按目标地址`,aggregateByProcess:`按进程`,aggregateByOutbound:`按出站节点`,aggregateByProxyGroup:`按策略组`,totalTraffic:`总流量`,total:`总计`,clearConnectionHistory:`清空连接历史`,clearConnectionHistoryConfirm:`确定要清空所有连接历史数据吗?此操作不可恢复。`,clearConnectionHistorySuccess:`连接历史数据清空成功`,autoCleanupInterval:`自动清理间隔`,autoCleanupIntervalWeek:`每周`,autoCleanupIntervalMonth:`每月`,autoCleanupIntervalQuarter:`每季度`,autoCleanupIntervalNever:`永不`,remainingTraffic:`剩余流量`,ruleHitCount:`命中: {count} 次`,ruleLastHit:`最后命中: {time}`,ruleMissCount:`未命中: {count} 次`,ruleLastMiss:`最后未命中: {time}`,RarelyUsed:`很少使用`,OccasionalUsed:`偶尔使用`,MostUsed:`经常使用`,proxyFolderMode:`文件夹模式`,folderModeAuto:`自动`,folderModeOn:`开启`,folderModeOff:`关闭`,folder_all:`全部`,folder_uncategorized:`未分类`,folder_manage:`管理文件夹`,folder_builtin_strategy:`策略组`,folder_builtin_nodes:`节点组`,folder_name:`文件夹名称`,folder_new_placeholder:`新文件夹名称`,folder_rules:`自动规则`,folder_rule_auto:`自动`,folder_rule_regex:`正则`,folder_rule_exclude_regex:`排除正则`,folder_auto_hasGroup:`包含子组`,folder_auto_nodeOnly:`仅含节点`,folder_add_rule:`添加规则`,folder_manual_includes:`手动加入`,folder_filter_placeholder:`搜索代理组`,folder_preview:`自动匹配的代理组`,folder_no_matches:`没有匹配的代理组`,folder_delete_confirm:`确认删除文件夹「{name}」?`},Jie={setup:`配置`,overview:`概覽`,proxies:`代理`,rules:`規則`,connections:`連接`,logs:`日誌`,default:`預設`,skip:`跳過`,online:`線上`,offline:`離線`,statusLabel:`狀態`,activeLabel:`已啟用`,availableLabel:`可用`,dragOrClickToAdd:`拖曳或點擊新增`,addRow:`新增行`,connected:`已連線`,copy:`複製`,protocol:`協議`,host:`主機`,port:`端口`,password:`密碼`,submit:`提交`,cancel:`取消`,delete:`刪除`,download:`下載`,upload:`上傳`,downloadSpeed:`下載速度`,uploadSpeed:`上傳速度`,memoryUsage:`記憶體使用`,noData:`暫無資料`,flushFakeIP:`清空Fake IP`,flushDNSCache:`清空DNS快取`,flushDNSCacheSuccess:`DNS快取清空成功`,flushFakeIPSuccess:`Fake IP清空成功`,flushSmartWeightsSuccess:`Smart權重清空成功`,restartCoreSuccess:`核心重啟成功`,reloadConfigsSuccess:`配置重載成功`,updateGeoSuccess:`GEO資料庫更新成功`,actionRunning:`{action}執行中…`,chains:`代理鏈`,outbound:`出站節點`,proxyGroup:`策略組`,sortBy:`排序方式`,sortAToZ:`A → Z`,sortZToA:`Z → A`,sortLargestFirst:`由大到小`,sortSmallestFirst:`由小到大`,sortNewestFirst:`最新在前`,sortOldestFirst:`最早在前`,groupBy:`分組方式`,noGrouping:`不分組`,expandAllGroups:`展開全部分組`,collapseAllGroups:`摺疊全部分組`,rule:`規則`,sourceIP:`源IP`,activeConnections:`活躍`,closedConnections:`已關閉`,allConnections:`全部`,logLevel:`日誌等級`,logType:`日誌類型`,twoColumnProxyGroup:`雙列顯示代理組`,type:`類型`,process:`進程`,connectTime:`連接時間`,sourcePort:`源端口`,destination:`解析地址`,destinationType:`解析類型`,geoip:`歸屬資訊`,geoipCountryDatabaseURL:`GeoIP 國家庫地址`,geoipASNDatabaseURL:`GeoIP ASN 庫地址`,geoipDatabaseURLTip:`用於本地解析連線 IP 的歸屬資訊(國家 / ASN),從該地址載入 mmdb 並快取在瀏覽器中。留空則使用預設地址。`,inboundUser:`入站用戶`,basic:`基本`,traffic:`流量`,sourceAndDestination:`來源與目的`,rawData:`原始資料`,geoInfo:`歸屬資訊`,dl:`下載`,ul:`上傳`,dlSpeed:`下載速度`,ulSpeed:`上傳速度`,settings:`設定`,speedtestUrl:`測速地址`,speedtestTimeout:`測速超時`,speedtestMode:`測速方式`,speedtestModeDashboard:`面板控制`,speedtestModeCore:`核心控制`,speedtestModeTip:`面板控制會讓 Selector、LoadBalance、Smart 組沿用面板逐個測試節點的邏輯,並顯示每個節點的測試進度。核心控制會呼叫核心的組測速介面,由核心一次完成整組測速。`,connectionStyle:`連接樣式`,logStyle:`日誌樣式`,ruleStyle:`規則樣式`,card:`卡片`,table:`表格`,time:`時間`,content:`內容`,name:`名稱`,ruleCount:`規則數`,hitCount:`命中`,missCount:`未命中`,hitMissCount:`命中 / 未命中`,behavior:`行為`,vehicleType:`來源類型`,customTableColumns:`自訂表格列`,customCardLines:`自訂卡片行`,close:`關閉`,appearance:`外觀`,defaultTheme:`預設主題`,darkTheme:`深色主題`,proxyProvider:`代理提供商`,ruleProvider:`規則提供商`,expire:`到期時間`,noExpire:`不限時`,updated:`更新於`,upgradeDashboard:`升級面板`,reloadConfigs:`重載配置`,updateConfigs:`更新配置`,updateConfigsSuccess:`配置更新成功`,configFilePath:`配置檔案路徑`,configFilePathPlaceholder:`絕對路徑,例如 /etc/mihomo/config.yaml`,configPayload:`配置內容`,configPayloadPlaceholder:`在此貼上 YAML 配置內容...`,forceUpdate:`強制更新`,or:`或`,defaultsort:`按配置排序`,nameasc:`按名稱升序`,namedesc:`按名稱降序`,latencydesc:`按延遲降序`,latencyasc:`按延遲升序`,language:`面板語言`,automaticDisconnection:`切換節點時自動斷開連接`,backend:`後端`,upgradeCore:`升級核心`,upgradeCoreConfirm:`確定要升級核心嗎?核心會重啟,代理服務將短暫中斷。`,upgradeToRelease:`升級到 Release`,upgradeToAlpha:`升級到 Alpha`,updateGeoDatabase:`更新GEO`,tunMode:`Tun 模式`,tunStack:`Tun 堆疊`,truncateProxyName:`截斷節點名稱`,disableProxiesPageTextSelect:`禁用代理頁文字選取`,sourceIPLabels:`源IP標籤`,resolveClientHostname:`反向解析來源 IP 主機名稱`,proxyPreviewType:`節點預覽類型`,auto:`自動`,dots:`點`,bar:`條`,exportSettings:`匯出設定`,importSettings:`匯入設定`,dashboardSettings:`面板設定`,dashboardSettingsCore:`核心`,dashboardSettingsJsonFile:`JSON 檔案`,dashboardSettingsUrl:`URL`,autoSyncSettings:`自動同步設定`,uploadSettings:`上傳設定到核心`,syncSettings:`從核心同步設定`,deleteUploadedSettings:`從核心刪除已上傳設定`,connectionSettings:`連接設定`,proxySettings:`代理設定`,logSettings:`日誌設定`,ruleSettings:`規則設定`,connectionDetails:`連接詳情`,customTheme:`自訂主題`,customCSS:`自訂 CSS`,customCSSTip:`以下樣式會原樣注入頁面,無效的規則可能導致介面顯示異常。`,unavailableProxy:`隱藏不可用節點`,protocolTips:`您正在嘗試連接一個http後端但zashboard是通過https提供的,這可能會導致連接錯誤,請在瀏覽器設定中允許不安全的內容,或者使用http版本面板例如http://board.zash.run.place`,global:`全域`,direct:`直連`,lowLatencyDesc:`黃色的閾值`,mediumLatencyDesc:`紅色的閾值`,fonts:`面板字體`,emoji:`Emoji`,unauthorizedTip:`未授權,請重新登入`,restartCore:`重啟核心`,restartCoreConfirm:`確定要重啟核心嗎?代理服務將短暫中斷,現有連接會被斷開。`,checkCoreUpgrade:`檢查核心升級`,autoUpgradeDashboard:`自動升級面板`,autoUpgradeCore:`自動升級核心`,secondaryPath:`二級路徑`,secondaryPathTip:`如果有的話以/開頭,沒有則留空不填`,logRetentionLimit:`日誌保留條數`,DNSQuery:`DNS 查詢`,confirm:`確定`,backendSwitched:`已切換後端`,backendConnecting:`正在連線...`,backendReachable:`連線正常`,backendUnreachable:`連線失敗`,switchToAnotherBackend:`切換到其他後端`,autoSwitchBackend:`切換到第一個可用的後端`,noReachableBackend:`其他後端也都連不上`,diagnosisUnauthorized:`密碼不對,後端拒絕了這次請求`,diagnosisTimeout:`後端沒有在規定時間內回應`,diagnosisBadEndpoint:`位址能連上,但對面不是這個 API,或者路徑寫錯了`,diagnosisOffline:`瀏覽器目前處於離線狀態,請檢查網路連線`,diagnosisCorsBlocked:`後端能連上,但瀏覽器按同源策略攔下了回應:後端沒有放行當前來源(CORS)。請在核心設定裡設置 external-controller-cors`,diagnosisMixedContent:`瀏覽器攔下了這次請求:HTTPS 頁面不能存取 HTTP 後端。請用 HTTP 開啟面板,或者給 API 配上 HTTPS`,diagnosisMixedContentOrUnreachable:`後端連不上 —— 也可能後端是好的,只是瀏覽器不允許 HTTPS 頁面存取 HTTP 後端;可以試著用 HTTP 開啟面板`,diagnosisUnreachable:`後端連不上,請檢查位址與連接埠是否正確、核心是否在執行`,ipv6Test:`IPv6 測試`,socksPort:`Socks 端口`,httpPort:`HTTP 端口`,mixedPort:`Mixed 端口`,redirPort:`Redir 端口`,tproxyPort:`TProxy 端口`,tableSize:`表格尺寸`,proxyCardSize:`節點卡片尺寸`,small:`小`,normal:`正常`,large:`大`,autoIPCheckWhenStart:`自動檢查 IP`,autoConnectionCheckWhenStart:`自動檢查連接`,networkInfo:`網路資訊`,autoSwitchTheme:`自動切換主題`,customBackgroundURL:`面板背景`,splitOverviewPage:`分離概覽頁`,manageHiddenGroup:`管理隱藏代理組`,showProxyGroup:`顯示代理組`,hideProxyGroup:`隱藏代理組`,manageHiddenGroupShortcutTip:`按 {shortcut} 可切換隱藏代理組管理模式`,transparent:`透明度`,proxyGroupIconSize:`策略組圖示尺寸`,proxyGroupIconMargin:`策略組圖示間距`,allowLan:`允許區域網路`,proxyChainDirection:`代理鏈方向`,showFullProxyChain:`完整顯示代理鏈`,reverse:`反向`,sniffHost:`嗅探主機`,ipScreenshotTip:`截圖時請確保隱藏IP`,showStatisticsWhenSidebarCollapsed:`側邊欄摺疊時顯示統計`,totalConnections:`連接統計`,totalConnectionsTip:`只能統計面板開啟期間的連接。 -記錄開始時間:{statsStartTime}`,manual:`手動`,tableWidthMode:`表格寬度模式`,testFailed:`測速超時`,testFinishedTip:`{name} -{number}/{total} 測試完成`,testFinishedResultTip:`{name} -測試完成: {success} 成功,{failed} 超時`,testFailedTip:`{name} -測速超時`,updateFinishedTip:`{number} 更新完成`,independentLatencyTest:`獨立延遲測試`,independentLatencyTestTip:`開啟獨立延遲測試會在測速中盡可能的使用配置檔案中的url覆蓋面板設定的url,並展示根據策略組設定的url獲取的延遲。`,search:`搜尋`,searchVisibleColumns:`僅搜尋展示的欄位`,searchHiddenColumns:`搜尋包含隱藏的欄位`,searchProxyGroup:`搜尋代理組`,searchProxyNode:`搜尋節點`,proxySearchModeGlobal:`節點搜尋`,proxySearchModeGroup:`策略組搜尋`,importing:`正在匯入`,hideConnection:`隱藏連接`,showConnection:`顯示連接`,hideConnectionRegex:`隱藏連接正則`,hideConnectionTip:`可通過不區分大小寫的正則表達式來匹配並隱藏不需要看到的連接`,hideLog:`隱藏日誌`,showLog:`顯示日誌`,hideLogRegex:`隱藏日誌正則`,hideLogTip:`可通過不區分大小寫的正則表達式來匹配並隱藏不需要看到的日誌`,loadBalance:`負載均衡`,label:`標籤`,optional:`可選`,swipeInTabs:`滑動切換頁面二級標籤`,swipeInPages:`滑動切換頁面`,simpleCardPreset:`簡潔預設`,detailedCardPreset:`詳細預設`,refresh:`重新整理`,reset:`重設`,resetSettings:`恢復預設設定`,resetSettingsConfirm:`確定要將面板設定恢復為預設值嗎?此操作無法復原。`,backgroundToneSwitchConfirm:`檢測到這張背景圖更適合使用{theme},是否切換?`,backgroundToneLightThemeLabel:`淺色主題`,backgroundToneDarkThemeLabel:`深色主題`,minProxyCardWidth:`節點卡片最小寬度`,displayGlobalByMode:`根據模式顯示 GLOBAL`,displaySelectedNode:`顯示選中節點`,displayLatencyNumber:`顯示延遲數字`,disconnectOnRuleDisable:`禁用規則時打斷連接`,tipForFixed:`當前策略組被固定在了當前節點,點擊測速來恢復{type}行為`,remoteAddress:`遠端地址`,save:`儲存`,moreDetails:`更多詳情`,moreSettings:`更多設定`,customIcon:`自訂圖示`,dropOrClickUpload:`拖曳圖片或輸入 URL`,disablePullToRefresh:`禁用下拉重新整理`,disablePullToRefreshTip:`下拉重新整理和虛擬滾動的組件有時會有衝突,如果你在上下滾動的時候經常卡頓或者誤觸發下拉重新整理,可以嘗試禁用下拉重新整理`,keyboardShortcuts:`快捷鍵設定`,keyboardShortcutsTip:`點擊輸入框後可直接按單鍵或組合鍵設定快捷鍵,按 Backspace 或 Delete 可清空。`,keyboardShortcutPageName:`{name}頁`,toggleSidebar:`展開/收起側邊欄`,switchToPreviousBackend:`切換到上一個後端`,switchToNextBackend:`切換到下一個後端`,keyboardShortcutsConflict:`偵測到重複快捷鍵:{keys}。只有第一項會生效。`,resetKeyboardShortcuts:`重設快捷鍵`,pressAnyKey:`按下任意鍵`,displayAllFeatures:`顯示所有功能`,displayAllFeaturesTip:`顯示所有功能,包括目前核心(honk)官方版本不支援的功能,如果您使用的 fork 版本支援其中的某些功能,可以嘗試啟用`,blurIntensity:`毛玻璃強度`,scrollAnimationEffect:`滾動動畫效果`,importFromFile:`從檔案匯入`,importFromUrl:`從 URL 匯入`,uploadSettingsSuccess:`設定上傳成功`,uploadSettingsIconReflectListRemoved:`自訂圖示資料過長,上傳時已自動移除這部分內容,請精簡後再試。`,syncSettingsSuccess:`設定同步成功`,syncSettingsConfirm:`後端儲存的設定將覆蓋以下本地設定: - -{keys} - -是否套用?`,importSettingsConfirm:`匯入的設定將覆蓋以下本地設定: - -{keys} - -是否套用?`,dontAskAgainAlwaysApply:`不再提示,以後自動套用`,confirmBeforeOverride:`覆蓋本地設定前確認`,deleteUploadedSettingsSuccess:`已上傳設定刪除成功`,deleteUploadedSettingsConfirm:`確定要刪除後端上已上傳的設定嗎?此操作無法復原。`,upgradeSuccess:`升級成功`,numberOfChartsInSidebar:`側邊欄圖表數量`,flushSmartWeights:`清空Smart權重`,IPInfoAPI:`IP資訊API`,IPInfoAPITip:`此API僅用於連接詳情與面板DNS查詢中的IP地理資訊查詢;IP檢查與地球元件使用各自的API選項。`,general:`通用`,groupProxiesByProvider:`節點根據提供商分組`,useSmartGroupSort:`Smart組根據使用頻率排序`,all:`全部`,autoDisconnectIdleUDP:`自動斷開空閒UDP`,autoDisconnectIdleUDPTime:`UDP空閒時間`,autoDisconnectIdleUDPTip:`啟用後,開啟zashboard時將關閉持續時間超過配置分鐘數的UDP連接,這可能對某些無法正常自動斷開的UDP連接帶來幫助。(這是作者自己的私貨,你大概率不需要開啟它)`,connectionTopology:`連接拓撲`,applyConnectionFilter:`套用連接篩選`,topologyPause:`暫停拓撲更新`,topologyResume:`繼續拓撲更新`,topologyExpand:`展開拓撲畫面`,topologyCollapse:`還原拓撲畫面`,editBackend:`編輯後端`,editBackendTitle:`修改後端配置`,addBackend:`新增後端`,manageBackends:`管理後端`,noBackendYet:`還沒有後端`,backendConnectionFailed:`後端連接失敗,請檢查配置資訊`,backendConfigSaved:`後端配置儲存成功`,saveFailed:`儲存失敗`,checking:`檢查中...`,copySuccess:`複製成功`,importFromBackendTip:`預設的./zashboard-settings.json位於ui資料夾下,匯入前請確保ui資料夾下存在配置檔案。`,importFailed:`匯入失敗,請檢查url {url}`,autoImportFromUrl:`自動匯入`,autoImportFromUrlTip:`啟用後,每次開啟zashboard時會自動從url設定匯入並計算hash,如果hash與上次匯入的hash不同,則重新匯入並重新整理頁面。`,getting:`獲取中...`,mmdbSizeTip:`mmdb等格式的geo檔案無法統計數量,因此數量為0`,displayFinalOutbound:`顯示最終出口節點`,groupTestUrls:`組測試連結`,groupTestUrlsTip:`對於從面板手動觸發的測試,此處設定測試連結 > 配置中的連結 > 面板全域測試連結,但是對於UrlTest/Fallback等具有核心內部的定時測速邏輯的組,仍然需要修改配置中的連結,此處僅推薦Selector等場景`,groupName:`組名`,unknown:`未知`,sourceIPAddress:`源IP地址`,ruleMatch:`規則匹配`,proxyChainEntry:`代理鏈入口`,proxyChainExit:`代理鏈出口`,nodeType:`節點類型`,connectionCount:`連接數`,zashboardSettings:`面板設置`,backendSettings:`後端設置`,generalSettings:`常規設置`,overviewSettings:`概覽設置`,overviewCardSettings:`卡片設置`,chartsCard:`圖表卡片`,networkCard:`網絡卡片`,providerTrafficOverview:`提供商流量概覽`,topologyCharts:`拓撲圖表`,earthGlobeCard:`全球連接`,earthGlobeTitle:`全球連接`,earthProjection:`投影方式`,earthVisualStyle:`地球樣式`,earthVisualStyle_space:`星空`,earthVisualStyle_flat:`扁平`,earthOriginAPI:`公網 IP 服務`,earthLocalIP:`本機 IP`,earthToggleIP:`顯示或隱藏本機 IP`,earthHideCityLabels:`隱藏城市名稱`,earthShowCityLabels:`顯示城市名稱`,earthPauseRotation:`停止地球自轉`,earthResumeRotation:`繼續地球自轉`,earthExpand:`展開地球畫面`,earthCollapse:`還原地球畫面`,earthConnectionLine:`連接線路`,earthLegend:`端點圖例`,earthLegendProxied:`經代理`,earthDatabaseChecking:`正在檢查本機城市資料庫…`,earthDatabaseLoading:`正在載入快取的城市資料庫…`,earthDatabaseConsentTitle:`下載本機城市資料庫?`,earthDatabaseConsent:`所有連接端點都只在此瀏覽器中查詢。DB-IP City Lite 下載約需 {download},解壓後約占 {stored} 本機儲存空間。`,earthDatabaseCacheRecovered:`已移除損壞的資料庫快取,請下載完整副本以恢復定位。`,earthDatabaseDownload:`下載資料庫`,earthDatabaseLearnMore:`瞭解 DB-IP City Lite`,earthDatabaseDownloading:`正在下載城市資料庫`,earthDatabaseError_space:`瀏覽器可用儲存空間不足,無法儲存城市資料庫。`,earthDatabaseError_network:`城市資料庫下載失敗。`,earthDatabaseError_decompress:`城市資料庫解壓失敗。`,earthDatabaseError_invalid:`下載的城市資料庫無效。`,earthDatabaseError_storage:`無法將城市資料庫儲存到瀏覽器。`,earthDatabaseError_unsupported:`目前瀏覽器無法解壓城市資料庫。`,earthDatabaseError_unknown:`無法載入城市資料庫。`,earthOriginError:`無法偵測本機公網 IP,請重試後再定位連接。`,earthNoConnections:`暫無作用中的連接`,earthNoLocatedConnections:`無法定位目前作用中連接的端點`,earthEndpointRole:`角色`,earthTopDownloadedHosts:`下載量 Top 5 Host`,earthRole_origin:`本機`,earthRole_destination:`目的地`,earthRendererError:`目前瀏覽器無法使用 3D 渲染。`,retry:`重試`,connectionHistory:`連接歷史`,ruleHitCountCard:`規則命中統計`,honkStatsCard:`honk 執行時統計`,honkStatsOutbounds:`出站`,honkStatsActiveConns:`活躍`,honkStatsErrors:`錯誤`,latency:`延遲`,icon:`圖示`,settingsMenuGeneral:`面板`,settingsMenuBackend:`後端`,settingsMenuProxies:`代理`,settingsMenuConnections:`連接`,settingsMenuOverview:`概覽`,settingsDescriptionGeneral:`主題、應用更新、資料來源與互動偏好`,settingsDescriptionOverview:`概覽卡片、啟動檢查與桌面側欄`,settingsDescriptionBackend:`目前後端、核心維護與網路監聽`,settingsDescriptionProxies:`測速、代理群組顯示與圖示`,settingsDescriptionConnections:`連接顯示、表格參數與用戶端識別`,settingsCategory:`設定類別`,searchSettings:`搜尋設定`,noSettingsFound:`找不到符合的設定`,hiddenSearchResults:`在已隱藏設定中找到 {count} 項`,noVisibleSettingsCategories:`目前沒有可見類別,可在自訂設定頁中恢復。`,customize:`自訂`,customizeSettingsPage:`自訂設定頁`,customizeSettingsDescription:`選擇需要顯示的類別和設定項,並調整類別順序。`,back:`返回`,clear:`清除`,settingsSectionApplication:`應用與更新`,settingsSectionNetworkData:`網路與資料來源`,settingsSectionInteraction:`互動與快速鍵`,settingsSectionCardsLayout:`卡片與佈局`,settingsSectionStartupChecks:`啟動檢查`,settingsSectionDesktopSidebar:`桌面側欄`,settingsSectionCurrentBackend:`目前後端`,settingsSectionCoreOperations:`核心維護`,settingsSectionNetworkListening:`網路監聽`,settingsSectionCoreUpdates:`核心更新`,settingsSectionDiagnostics:`診斷工具`,settingsSectionProxyDisplay:`群組與顯示`,settingsSectionProxyAdvanced:`圖示與進階設定`,settingsSectionConnectionDisplay:`顯示方式`,settingsSectionClientIdentity:`用戶端識別與標註`,ports:`端口`,actions:`操作`,showAllPreset:`全部顯示`,minimalPreset:`精簡顯示`,moveUp:`上移`,moveDown:`下移`,aggregateBy:`聚合方式`,aggregateBySourceIP:`按源IP`,aggregateByDestination:`按目標地址`,aggregateByProcess:`按進程`,aggregateByOutbound:`按出站節點`,aggregateByProxyGroup:`按策略組`,totalTraffic:`總流量`,total:`總計`,clearConnectionHistory:`清空連接歷史`,clearConnectionHistoryConfirm:`確定要清空所有連接歷史資料嗎?此操作不可恢復。`,clearConnectionHistorySuccess:`連接歷史資料清空成功`,autoCleanupInterval:`自動清理間隔`,autoCleanupIntervalWeek:`每週`,autoCleanupIntervalMonth:`每月`,autoCleanupIntervalQuarter:`每季度`,autoCleanupIntervalNever:`永不`,remainingTraffic:`剩餘流量`,ruleHitCount:`命中: {count} 次`,ruleLastHit:`最後命中: {time}`,ruleMissCount:`未命中: {count} 次`,ruleLastMiss:`最後未命中: {time}`,RarelyUsed:`很少使用`,OccasionalUsed:`偶爾使用`,MostUsed:`經常使用`,proxyFolderMode:`資料夾模式`,folderModeAuto:`自動`,folderModeOn:`開啟`,folderModeOff:`關閉`,folder_all:`全部`,folder_uncategorized:`未分類`,folder_manage:`管理資料夾`,folder_builtin_strategy:`策略組`,folder_builtin_nodes:`節點組`,folder_name:`資料夾名稱`,folder_new_placeholder:`新資料夾名稱`,folder_rules:`自動規則`,folder_rule_auto:`自動`,folder_rule_regex:`正則`,folder_rule_exclude_regex:`排除正則`,folder_auto_hasGroup:`包含子組`,folder_auto_nodeOnly:`僅含節點`,folder_add_rule:`新增規則`,folder_manual_includes:`手動加入`,folder_filter_placeholder:`搜尋代理組`,folder_preview:`自動匹配的代理組`,folder_no_matches:`沒有符合的代理組`,folder_delete_confirm:`確認刪除資料夾「{name}」?`},Jb=Iie({legacy:!1,locale:Vm.value,fallbackLocale:Cp.EN_US,messages:{[Cp.EN_US]:Gie,[Cp.ZH_CN]:qie,[Cp.ZH_TW]:Jie,[Cp.RU_RU]:Kie}}),Yb=Jb.global.t,Yie={success:` - - - - `,error:` - - - - `,warning:` - - - - `,info:` - - - - `,neutral:` - - - - `},Xie=`app-toast border-base-border bg-base-100/95 pointer-events-auto relative grid w-full items-start gap-x-3 overflow-hidden rounded-xl border p-3 shadow-lg backdrop-blur origin-top-right`,Zie=e=>e?e.replace(`alert-`,``):`neutral`,Xb=new Map,Zb=null,Qie=e=>{Zb=e},$ie=e=>{let t=Xb.get(e);t&&t.timer!==-1&&!t.isPaused&&(clearTimeout(t.timer),t.isPaused=!0,t.remainingTime-=Date.now()-t.startTime,t.progressBar.style.animationPlayState=`paused`)},eae=e=>{let t=Xb.get(e);t&&t.timer!==-1&&t.isPaused&&(t.isPaused=!1,t.startTime=Date.now(),t.timer=setTimeout(()=>{Xb.delete(e),$b(t.alert)},t.remainingTime),t.progressBar.style.animationPlayState=`running`)},Qb=(e,t,n,r)=>{let i=-1;r?.parentElement?.toggleAttribute(`hidden`,t===0),t!==0&&(r&&(r.style.animation=`none`,r.offsetWidth,r.style.animation=`progressBar ${t}ms linear forwards`),i=setTimeout(()=>{n&&Xb.delete(n),$b(e)},t)),n&&r&&Xb.set(n,{alert:e,timer:i,progressBar:r,startTime:Date.now(),remainingTime:t,isPaused:!1})},$b=e=>{e.classList.contains(`is-leaving`)||(e.classList.add(`is-leaving`),window.setTimeout(()=>e.remove(),160))},ex=(e,t)=>{if(t){let e=Xb.get(t);e&&(clearTimeout(e.timer),Xb.delete(t))}$b(e)},tx=(e,t,n,r,i)=>{let a=Zie(r);e.className=Xie,e.dataset.toastType=a,e.setAttribute(`role`,a===`error`?`alert`:`status`),e.setAttribute(`aria-live`,a===`error`?`assertive`:`polite`);let o=document.createElement(`div`);o.className=`bg-(--toast-accent) h-full min-h-7 w-1 rounded-full`,o.setAttribute(`aria-hidden`,`true`);let s=document.createElement(`div`);s.className=`bg-(--toast-accent)/12 text-(--toast-accent) grid size-7 place-items-center rounded-lg`,s.setAttribute(`aria-hidden`,`true`),s.innerHTML=Yie[a];let c=document.createElement(`div`);c.className=`app-toast__content`,c.innerHTML=Yb(t,n);let l=document.createElement(`button`);l.type=`button`,l.className=`btn btn-circle btn-ghost btn-xs text-base-content/48 hover:bg-base-content/8 hover:text-base-content size-6 min-h-6 p-0`,l.setAttribute(`aria-label`,Yb(`close`)),l.innerHTML=` - - `,l.addEventListener(`click`,()=>ex(e,i));let u=document.createElement(`div`);u.className=`bg-base-content/6 absolute right-3 bottom-1 left-3 h-0.5 overflow-hidden rounded-full`;let d=document.createElement(`div`);return d.className=`bg-(--toast-accent)/55 h-full w-full origin-left rounded-[inherit]`,u.appendChild(d),e.replaceChildren(o,s,c,l,u),e.onmouseenter=()=>$ie(i),e.onmouseleave=()=>eae(i),d},tae=e=>{let t=Xb.get(e);t&&ex(t.alert,e)},nx=e=>{let t=`action:${e}`;return rx({key:t,content:`actionRunning`,params:{action:Yb(e)},type:`alert-info`,timeout:0}),t},rx=({content:e,params:t={},key:n,type:r=`alert-warning`,timeout:i=3e3})=>{let a=n||e;if(a&&Xb.has(a)){let{alert:n,timer:o}=Xb.get(a);clearTimeout(o),Qb(n,i,a,tx(n,e,t,r,a));return}let o=document.createElement(`div`),s=tx(o,e,t,r,a);Zb?.value?.insertBefore(o,Zb?.value?.firstChild),Qb(o,i,a,s)};bv.interceptors.request.use(e=>(Cg.value&&(e.baseURL=Em(Cg.value),e.headers.Authorization=`Bearer `+Cg.value.password),e)),bv.interceptors.response.use(null,e=>{if(e.status===401&&Sg.value){let e=Sg.value;Tg.value?.mode===`edit`&&Tg.value.uuid===e||(Eg({mode:`edit`,uuid:e}),Mr(()=>{rx({content:`unauthorizedTip`})}))}return Promise.reject(e)});var nae=()=>bv.get(`/version`),rae=()=>bv.get(`/proxies`),iae=(e,t)=>bv.put(`/proxies/${encodeURIComponent(e)}`,{name:t}),aae=e=>bv.delete(`/proxies/${encodeURIComponent(e)}`),oae=(e,t,n)=>bv.get(`/proxies/${encodeURIComponent(e)}/delay`,{params:{url:t,timeout:n}}),sae=(e,t,n,r)=>bv.get(`/providers/proxies/${encodeURIComponent(e)}/${encodeURIComponent(t)}/healthcheck`,{params:{url:n,timeout:r}}),cae=(e,t,n)=>bv.get(`/group/${encodeURIComponent(e)}/delay`,{params:{url:t,timeout:n}}),lae=()=>bv.get(`/providers/proxies`),uae=e=>bv.put(`/providers/proxies/${encodeURIComponent(e)}`),dae=e=>bv.get(`/providers/proxies/${encodeURIComponent(e)}/healthcheck`,{timeout:15e3}),fae=()=>bv.get(`/rules`),pae=()=>bv.get(`/providers/rules`),mae=e=>bv.put(`/providers/rules/${encodeURIComponent(e)}`),hae=e=>bv.delete(`/connections/${e}`),gae=()=>bv.delete(`/connections`),_ae=()=>bv.get(`/configs`),vae=e=>bv.patch(`/configs`,e),yae=()=>bv.post(`/cache/fakeip/flush`),bae=()=>bv.post(`/cache/dns/flush`),xae=e=>bv.get(`/dns/query`,{params:e}),ix=(e,t)=>{let n=Cg.value,r=new URL(`${Em(n).replace(`http`,`ws`)}/${e}`);r.searchParams.append(`token`,n.password||``),t&&Object.entries(t).forEach(([e,t])=>{r.searchParams.append(e,t)});let i=mn(),a=new Gne.default(r.toString()),o=()=>{a.close()},s=({data:e})=>{i.value=JSON.parse(e)};return a.onmessage=e===`logs`?s:(0,vg.debounce)(s,100),{data:i,close:o}},Sae=async(e,t,n)=>{let r=new AbortController,i=setTimeout(()=>r.abort(),t),a=()=>r.abort();n?.addEventListener(`abort`,a,{once:!0});let o=Date.now(),s=()=>Date.now()-o;try{let t=await fetch(`${Em(e)}/version`,{method:`GET`,headers:{Authorization:`Bearer ${e.password}`},signal:r.signal});return t.ok?{ok:!0,latency:s()}:{ok:!1,latency:s(),kind:t.status===401?`unauthorized`:`http`,message:`HTTP ${t.status}`}}catch(e){return{ok:!1,latency:s(),kind:r.signal.aborted?`timeout`:`network`,message:e instanceof Error?e.message:String(e)}}finally{clearTimeout(i),n?.removeEventListener(`abort`,a)}},Cae=e=>bv.patch(`/rules/disable`,e),wae=()=>bv.put(`/configs?reload=true`,{path:``,payload:``}),Tae=(e,t=!1)=>bv.put(`/configs${t?`?force=true`:``}`,{path:e.path||``,payload:e.payload||``}),Eae=()=>bv.post(`/configs/geo`),Dae=e=>{let t=e===`auto`?`/upgrade`:`/upgrade?channel=${e}`;return bv.post(t)},Oae=()=>bv.post(`/restart`),kae=()=>bv.post(`/upgrade/ui`),Aae=()=>bv.get(`/storage/zashboard`),jae=e=>bv.put(`/storage/zashboard`,e),Mae=()=>bv.delete(`/storage/zashboard`),Nae=()=>bv.get(`/group/weights`),Pae=()=>bv.post(`/cache/smart/flush`),Fae=e=>bv.delete(`/connections/smart/${e}`),Iae=()=>bv.get(`/stats`),Lae=e=>bv.put(`/rules/${encodeURIComponent(e)}`),ax=function(e){return e.Mihomo=`mihomo`,e.Honk=`honk`,e.Unknown=`unknown`,e}({}),ox=I(`unknown`),sx=()=>{ox.value=`unknown`},cx=Y(()=>ox.value===`honk`),lx=Y(()=>cx.value&&nh.value),ux=Y(()=>!!Cg.value&&cx.value),dx=Y(()=>{let e=ox.value===`mihomo`,t=ox.value===`honk`,n=e||lx.value;return{coreUpgrade:n,coreRestart:n,dashboardUpgrade:n,reloadConfigs:n,updateConfigs:n,updateGeoDatabase:n,syncSettings:n,independentLatency:n,coreUpdateCheck:e,configPatch:e,traceLogLevel:t,silentLogLevel:e,runtimeStats:t}}),fx=e=>Cg.value?dx.value[e]:!1,px=I([]),mx=I({}),hx=X(`cache/ipv6-map`,{}),gx=I([]),_x=Y(()=>Eh.value||`https://www.gstatic.com/generate_204`),vx=e=>{if(!e||!Dh.value)return _x.value;let t=Jh.value.find(t=>t.name===e);return t?t.url:(mx.value[e]||gx.value.find(t=>t.name===e))?.testUrl||_x.value},Rae=e=>(0,vg.last)(e)?.delay??0,yx=``,bx=new Map,zae=(e,t)=>{let n=mx.value[e];if(t!==yx){if(!n)return;if(n.extra)return n.extra[t]?.history}return mx.value[Dx(e)]?.history},Bae=bt(!0),xx=e=>{let t=bx.get(e);return t||(t=Bae.run(()=>Y(()=>{let t=new Map;for(let n of Object.keys(mx.value))t.set(n,Rae(zae(n,e)));return t})),bx.set(e,t)),t},Sx=e=>e&&Dh.value&&fx(`independentLatency`)?vx(e):yx,Cx=e=>Y(()=>xx(Sx(_n(e))).value),Tx=(e,t)=>xx(Sx(t)).value.get(e)??0,Ex=(e,t)=>{if(t&&Dh.value&&fx(`independentLatency`)){let n=mx.value[e],r=vx(t);return n?n?.extra?(n.extra?.[r]||(n.extra[r]={history:[],alive:!0}),n?.extra?.[r]?.history):mx.value[Dx(e)]?.history:[]}return mx.value[Dx(e)]?.history},Vae=e=>hx.value[Dx(e)],Dx=e=>{let t=mx.value[e];if(!e||!t)return e;for(;t.now&&t.now!==t.name;){let e=mx.value[t.now];if(!e)return t.name;t=e}return t.name},Ox=e=>{let t=mx.value[e];if(!t)return[];let n=[e];for(;t.now&&t.now!==t.name&&px.value.includes(t.now);)n.push(t.now),t=mx.value[t.now];return n},kx=Y(()=>Object.values(mx.value).some(e=>e.type.toLowerCase()===Yp.Smart)),Hae=new Set([Yp.Reject,Yp.RejectDrop,Yp.Block]),Ax=e=>{let t=mx.value[e]?.type.toLowerCase();return!t||!Hae.has(t)},Uae=e=>{let t=mx.value[e]?.[`provider-name`];return t?gx.value.some(e=>e.name===t)?t:``:gx.value.find(t=>t.proxies.some(t=>t.name===e))?.name??``},jx=e=>e.then(()=>void 0),Mx=e=>e,Nx=e=>{let{destinationPort:t,sniffHost:n,network:r}=e.metadata;return(t===`443`||n)&&r===`udp`?`quic`:r},Px=e=>e.metadata.host||e.metadata.sniffHost||e.metadata.destinationIP,Fx=e=>mx.value[(0,vg.head)(e.chains)||``]?.type.toLowerCase(),Ix={type:`clash`,system:{probe:(e,t,n)=>Sae(e,t,n),fetchVersion:async()=>(await nae()).data?.version||``,upgradeCore:e=>jx(Dae(e)),restartCore:()=>jx(Oae()),upgradeUI:()=>jx(kae()),getStorage:async()=>(await Aae()).data,setStorage:e=>jx(jae(e)),deleteStorage:()=>jx(Mae())},metrics:{traffic:()=>ix(`traffic`),memory:()=>ix(`memory`),fetchRuntimeStats:async()=>(await Iae()).data},proxies:{fetch:async()=>{let[e,t]=await Promise.all([rae(),lae()]);return{proxies:e.data.proxies,providers:Object.values(t.data.providers).filter(e=>e.name!=="default"&&e.vehicleType!==`Compatible`)}},select:(e,t)=>jx(iae(e,t)),clearFixed:e=>jx(aae(e)),testNode:async(e,t,n)=>(await oae(e,t,n)).data.delay,testProviderNode:async(e,t,n,r)=>(await sae(e,t,n,r)).data.delay,testGroup:async(e,t,n)=>(await cae(e,t,n)).data,updateProvider:e=>jx(uae(e)),healthCheckProvider:e=>jx(dae(e)),fetchSmartWeights:async()=>(await Nae()).data.weights,flushSmartWeights:()=>jx(Pae())},rules:{fetch:async()=>{let[e,t]=await Promise.all([fae(),pae()]);return{rules:e.data.rules.map(e=>{let t=e.proxy;return{...e,proxy:t.startsWith(`route(`)?t.slice(6,-1):t}}),providers:Object.values(t.data.providers)}},updateProvider:e=>jx(mae(e)),toggleDisabled:async(e,t)=>{if(e.uuid){await Lae(e.uuid);return}await Cae({[e.index]:t})}},config:{fetch:async()=>(await _ae()).data,patch:e=>jx(vae(e)),reload:()=>jx(wae()),load:(e,t)=>jx(Tae(e,t)),updateGeoData:()=>jx(Eae()),flushFakeIP:()=>jx(yae()),flushDNSCache:()=>jx(bae()),queryDNS:async e=>(await xae(e)).data},logs:{subscribe:(e,t)=>{let n=ix(`logs`,{level:e}),r=B(n.data,e=>{e&&t([e])});return{close:()=>{r(),n.close()}}}},connections:{accessor:{chains:e=>Mx(e).chains,download:e=>Mx(e).download,upload:e=>Mx(e).upload,start:e=>Mx(e).start,rule:e=>{let t=Mx(e);return t.rulePayload?`${t.rule}: ${t.rulePayload}`:t.rule},rulePayload:e=>Mx(e).rulePayload,sourceIP:e=>Mx(e).metadata.sourceIP,sourcePort:e=>Mx(e).metadata.sourcePort,network:e=>Nx(Mx(e)),networkType:e=>{let t=Mx(e);return`${t.metadata.type} | ${Nx(t)}`},hostname:e=>Px(Mx(e)),host:e=>{let t=Mx(e),n=Px(t);return n.includes(`:`)?`[${n}]:${t.metadata.destinationPort}`:`${n}:${t.metadata.destinationPort}`},process:e=>{let{metadata:t}=Mx(e);return t.process||t.processPath?.replace(/^.*[/\\](.*)$/,`$1`)||`-`},destination:e=>{let t=Mx(e);return Fx(t)===Yp.Direct&&t.metadata.remoteDestination?t.metadata.remoteDestination:t.metadata.destinationIP||t.metadata.host},inboundUser:e=>{let{metadata:t}=Mx(e);return t.inboundUser||t.inboundName||t.inboundPort||`-`},sniffHost:e=>Mx(e).metadata.sniffHost,remoteAddress:e=>Mx(e).metadata.remoteDestination,isDirect:e=>Fx(Mx(e))===Yp.Direct,smartBlock:e=>Mx(e).metadata.smartBlock},subscribe:()=>{let e=ix(`connections`),t=mn(),n=B(e.data,e=>{e&&(t.value={connections:e.connections??[],downloadTotal:e.downloadTotal,uploadTotal:e.uploadTotal})});return{data:t,close:()=>{n(),e.close()}}},disconnect:e=>jx(hae(e)),disconnectAll:()=>jx(gae()),block:e=>jx(Fae(e))}},Wae={clash:Ix},Lx=e=>Wae[e?.type]??Ix,Rx=()=>Lx(Cg.value),zx=I({port:0,"socks-port":0,"redir-port":0,"tproxy-port":0,"mixed-port":0,"allow-lan":!1,"bind-address":``,mode:``,"mode-list":[],modes:[],"log-level":``,ipv6:!1,tun:{enable:!1,stack:``}}),Bx=async()=>{zx.value=await Rx().config.fetch()},Vx=async e=>{await Rx().config.patch(e),Bx()},Gae=()=>Rx().config.reload(),Kae=(e,t)=>Rx().config.load(e,t),qae=()=>Rx().config.updateGeoData(),Jae=()=>Rx().config.flushFakeIP(),Yae=()=>Rx().config.flushDNSCache(),Hx=e=>Rx().config.queryDNS(e),Xae=`modulepreload`,Zae=function(e,t){return new URL(e,t).href},Ux={},Wx=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=Zae(t,n),t=s(t),t in Ux)return;Ux[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:Xae,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},Qae={ip:``,country:``,region:``,city:``,asn:``,organization:``,latitude:null,longitude:null},Gx=I(!1),Kx=mn(),qx,$ae=()=>{if(Kx.value||qx)return;let e=Wx(()=>import(`./connection-geoip-database-NH8WGZdk.js`).then(e=>{Kx.value=e.getConnectionGeoIPInfoSync}),[],import.meta.url).catch(()=>{qx===e&&(qx=void 0)});qx=e},Jx=e=>{Gx.value=e,e&&$ae()},eoe=e=>!Gx.value||!Kx.value?Qae:Kx.value(e),Yx=s(((e,t)=>{(function(e){let n=`(0?\\d+|0x[a-f0-9]+)`,r={fourOctet:RegExp(`^${n}\\.${n}\\.${n}\\.${n}$`,`i`),threeOctet:RegExp(`^${n}\\.${n}\\.${n}$`,`i`),twoOctet:RegExp(`^${n}\\.${n}$`,`i`),longValue:RegExp(`^${n}$`,`i`)},i=RegExp(`^0[0-7]+$`,`i`),a=RegExp(`^0x[a-f0-9]+$`,`i`),o=`%[0-9a-z]{1,}`,s=`(?:[0-9a-f]+::?)+`,c={zoneIndex:RegExp(o,`i`),native:RegExp(`^(::)?(${s})?([0-9a-f]+)?(::)?(${o})?$`,`i`),deprecatedTransitional:RegExp(`^(?:::)(${n}\\.${n}\\.${n}\\.${n}(${o})?)$`,`i`),transitional:RegExp(`^((?:${s})|(?:::)(?:${s})?)${n}\\.${n}\\.${n}\\.${n}(${o})?$`,`i`)};function l(e,t){if(e.indexOf(`::`)!==e.lastIndexOf(`::`))return null;let n=0,r=-1,i=(e.match(c.zoneIndex)||[])[0],a,o;for(i&&(i=i.substring(1),e=e.replace(/%.+$/,``));(r=e.indexOf(`:`,r+1))>=0;)n++;if(e.substr(0,2)===`::`&&n--,e.substr(-2,2)===`::`&&n--,n>t)return null;for(o=t-n,a=`:`;o--;)a+=`0:`;return e=e.replace(`::`,a),e[0]===`:`&&(e=e.slice(1)),e[e.length-1]===`:`&&(e=e.slice(0,-1)),t=(function(){let t=e.split(`:`),n=[];for(let e=0;e0;){if(a=n-r,a<0&&(a=0),e[i]>>a!==t[i]>>a)return!1;r-=n,i+=1}return!0}function d(e){if(a.test(e))return parseInt(e,16);if(e[0]===`0`&&!isNaN(parseInt(e[1],10))){if(i.test(e))return parseInt(e,8);throw Error(`ipaddr: cannot parse ${e} as octal`)}return parseInt(e,10)}function f(e,t){for(;e.length=0;--r)if(i=this.octets[r],i in n){if(a=n[i],t&&a!==0)return null;a!==8&&(t=!0),e+=a}else return null;return 32-e},e.prototype.range=function(){return p.subnetMatch(this,this.SpecialRanges)},e.prototype.toByteArray=function(){return this.octets.slice(0)},e.prototype.toIPv4MappedAddress=function(){return p.IPv6.parse(`::ffff:${this.toString()}`)},e.prototype.toNormalizedString=function(){return this.toString()},e.prototype.toString=function(){return this.octets.join(`.`)},e})(),p.IPv4.broadcastAddressFromCIDR=function(e){try{let t=this.parseCIDR(e),n=t[0].toByteArray(),r=this.subnetMaskFromPrefixLength(t[1]).toByteArray(),i=[],a=0;for(;a<4;)i.push(parseInt(n[a],10)|parseInt(r[a],10)^255),a++;return new this(i)}catch{throw Error(`ipaddr: the address does not have IPv4 CIDR format`)}},p.IPv4.isIPv4=function(e){return this.parser(e)!==null},p.IPv4.isValid=function(e){try{return new this(this.parser(e)),!0}catch{return!1}},p.IPv4.isValidCIDR=function(e){try{return this.parseCIDR(e),!0}catch{return!1}},p.IPv4.isValidFourPartDecimal=function(e){return!!(p.IPv4.isValid(e)&&e.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},p.IPv4.isValidCIDRFourPartDecimal=function(e){let t=e.match(/^(.+)\/(\d+)$/);return!p.IPv4.isValidCIDR(e)||!t?!1:p.IPv4.isValidFourPartDecimal(t[1])},p.IPv4.networkAddressFromCIDR=function(e){let t,n,r,i,a;try{for(t=this.parseCIDR(e),r=t[0].toByteArray(),a=this.subnetMaskFromPrefixLength(t[1]).toByteArray(),i=[],n=0;n<4;)i.push(parseInt(r[n],10)&parseInt(a[n],10)),n++;return new this(i)}catch{throw Error(`ipaddr: the address does not have IPv4 CIDR format`)}},p.IPv4.parse=function(e){let t=this.parser(e);if(t===null)throw Error(`ipaddr: string is not formatted like an IPv4 Address`);return new this(t)},p.IPv4.parseCIDR=function(e){let t;if(t=e.match(/^(.+)\/(\d+)$/)){let e=parseInt(t[2]);if(e>=0&&e<=32){let n=[this.parse(t[1]),e];return Object.defineProperty(n,"toString",{value:function(){return this.join(`/`)}}),n}}throw Error(`ipaddr: string is not formatted like an IPv4 CIDR range`)},p.IPv4.parser=function(e){let t,n,i;if(t=e.match(r.fourOctet))return(function(){let e=t.slice(1,6),r=[];for(let t=0;t4294967295||i<0)throw Error(`ipaddr: address outside defined range`);return(function(){let e=[],t;for(t=0;t<=24;t+=8)e.push(i>>t&255);return e})().reverse()}else if(t=e.match(r.twoOctet))return(function(){let e=t.slice(1,4),n=[];if(i=d(e[1]),i>16777215||i<0)throw Error(`ipaddr: address outside defined range`);return n.push(d(e[0])),n.push(i>>16&255),n.push(i>>8&255),n.push(i&255),n})();else if(t=e.match(r.threeOctet))return(function(){let e=t.slice(1,5),n=[];if(i=d(e[2]),i>65535||i<0)throw Error(`ipaddr: address outside defined range`);return n.push(d(e[0])),n.push(d(e[1])),n.push(i>>8&255),n.push(i&255),n})();else return null},p.IPv4.subnetMaskFromPrefixLength=function(e){if(e=parseInt(e),e<0||e>32)throw Error(`ipaddr: invalid IPv4 prefix length`);let t=[0,0,0,0],n=0,r=Math.floor(e/8);for(;n=0;--a)if(r=this.parts[a],r in n){if(i=n[r],t&&i!==0)return null;i!==16&&(t=!0),e+=i}else return null;return 128-e},e.prototype.range=function(){return p.subnetMatch(this,this.SpecialRanges)},e.prototype.toByteArray=function(){let e,t=[],n=this.parts;for(let r=0;r>8),t.push(e&255);return t},e.prototype.toFixedLengthString=function(){let e=(function(){let e=[];for(let t=0;t>8,t&255,n>>8,n&255])},e.prototype.toNormalizedString=function(){let e=(function(){let e=[];for(let t=0;tr&&(n=i.index,r=i[0].length);return r<0?t:`${t.substring(0,n)}::${t.substring(n+r)}`},e.prototype.toString=function(){return this.toRFC5952String()},e})(),p.IPv6.broadcastAddressFromCIDR=function(e){try{let t=this.parseCIDR(e),n=t[0].toByteArray(),r=this.subnetMaskFromPrefixLength(t[1]).toByteArray(),i=[],a=0;for(;a<16;)i.push(parseInt(n[a],10)|parseInt(r[a],10)^255),a++;return new this(i)}catch(e){throw Error(`ipaddr: the address does not have IPv6 CIDR format (${e})`)}},p.IPv6.isIPv6=function(e){return this.parser(e)!==null},p.IPv6.isValid=function(e){if(typeof e==`string`&&e.indexOf(`:`)===-1)return!1;try{let t=this.parser(e);return new this(t.parts,t.zoneId),!0}catch{return!1}},p.IPv6.isValidCIDR=function(e){if(typeof e==`string`&&e.indexOf(`:`)===-1)return!1;try{return this.parseCIDR(e),!0}catch{return!1}},p.IPv6.networkAddressFromCIDR=function(e){let t,n,r,i,a;try{for(t=this.parseCIDR(e),r=t[0].toByteArray(),a=this.subnetMaskFromPrefixLength(t[1]).toByteArray(),i=[],n=0;n<16;)i.push(parseInt(r[n],10)&parseInt(a[n],10)),n++;return new this(i)}catch(e){throw Error(`ipaddr: the address does not have IPv6 CIDR format (${e})`)}},p.IPv6.parse=function(e){let t=this.parser(e);if(t.parts===null)throw Error(`ipaddr: string is not formatted like an IPv6 Address`);return new this(t.parts,t.zoneId)},p.IPv6.parseCIDR=function(e){let t,n,r;if((n=e.match(/^(.+)\/(\d+)$/))&&(t=parseInt(n[2]),t>=0&&t<=128))return r=[this.parse(n[1]),t],Object.defineProperty(r,"toString",{value:function(){return this.join(`/`)}}),r;throw Error(`ipaddr: string is not formatted like an IPv6 CIDR range`)},p.IPv6.parser=function(e){let t,n,r,i,a,o;if(r=e.match(c.deprecatedTransitional))return this.parser(`::ffff:${r[1]}`);if(c.native.test(e))return l(e,8);if((r=e.match(c.transitional))&&(o=r[6]||``,t=r[1],r[1].endsWith(`::`)||(t=t.slice(0,-1)),t=l(t+o,6),t.parts)){for(a=[parseInt(r[2]),parseInt(r[3]),parseInt(r[4]),parseInt(r[5])],n=0;n128)throw Error(`ipaddr: invalid IPv6 prefix length`);let t=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],n=0,r=Math.floor(e/8);for(;n{try{let t=Xx.parse(e.split(`%`)[0]);if(t.kind()===`ipv6`){let e=t;if(e.isIPv4MappedAddress())return e.toIPv4Address()}return t}catch{return null}};function roe(e){if(!e)return!1;let t=nS(e);return t?![`unspecified`,`loopback`,`linkLocal`].includes(t.range()):!1}function ioe(e){let t=nS(e);return t?t.kind()===`ipv4`?`${[...t.octets].reverse().join(`.`)}.in-addr.arpa`:`${t.toByteArray().map(e=>e.toString(16).padStart(2,`0`)).join(``).split(``).reverse().join(`.`)}.ip6.arpa`:null}var rS=(e,t)=>{let n=e.name===null?noe:toe;return t-e.ts>n};function iS(){try{let e=localStorage.getItem(Zx);if(!e)return{};let t=JSON.parse(e);if(!t||typeof t!=`object`||Array.isArray(t))return{};let n={};for(let[e,r]of Object.entries(t))r&&typeof r==`object`&&typeof r.name==`string`&&typeof r.ts==`number`&&(n[e]=r);return n}catch{return{}}}function aoe(e){try{let t=Object.entries(e).sort(([,e],[,t])=>e.ts-t.ts).slice(-200);localStorage.setItem(Zx,JSON.stringify(Object.fromEntries(t)))}catch{}}function ooe(e,t){let n=iS();delete n[e],n[e]=t,aoe(n)}function soe(){let e=Date.now();for(let[t,n]of Object.entries(iS()))rS(n,e)||Qx.set(t,n)}soe();var aS=new Set;function oS(e,t){eS[e]===t||aS.has(e)||(aS.add(e),queueMicrotask(()=>{aS.delete(e),eS[e]!==t&&(eS[e]=t,tS.value++)}))}function coe(e){e in eS&&queueMicrotask(()=>{e in eS&&(delete eS[e],tS.value++)})}async function loe(e){let t=ioe(e);if(!t)return null;try{let e=await Hx({name:t,type:`PTR`});if(!e)return null;let n=e.Answer?.find(({type:e})=>e===12)?.data;if(!n)return null;let r=n.trim();return r?r.endsWith(`.`)?r.slice(0,-1):r:null}catch{return null}}function uoe(e){if(!ig.value||!roe(e))return;let t=Cg.value?.uuid;if(!t)return;let n=`${t}\u0000${e}`,r=Qx.get(n),i=Date.now();if(r){if(!rS(r,i))return r.name&&oS(n,r.name),eS[n];Qx.delete(n),coe(n)}if(!$x.has(n)){let t=loe(e);$x.set(n,t),t.then(e=>{let t={name:e,ts:Date.now()};Qx.set(n,t),e&&(oS(n,e),ooe(n,t))}).finally(()=>$x.delete(n))}return eS[n]}var doe=e=>{if(e)return uoe(e)},foe=256,sS=new Map,cS=new Map,lS=[],uS=[],poe=()=>{sS.clear(),cS.clear(),lS.length=0,uS.length=0;for(let{key:e,label:t,scope:n}of rg.value)if(!(n&&!n.includes(Cg.value?.uuid))){if(e.startsWith(`/`)){lS.push({regex:new RegExp(e.slice(1),`i`),label:t});continue}if(e.includes(`/`))try{let n=Xx.parseCIDR(e);uS.push({cidr:n,label:t});continue}catch{}cS.set(e,t)}},dS=(e,t)=>{if(sS.set(e,t),sS.size>foe){let e=sS.keys().next().value;e&&sS.delete(e)}return t};B(()=>[rg.value,Cg.value],poe,{immediate:!0,deep:!0});var moe=e=>{if(sS.has(e))return sS.get(e);let t=Xx.isValid(e)?Xx.parse(e):null;if(t?.kind()===`ipv6`){for(let[t,n]of cS.entries())if(e.endsWith(t))return dS(e,n)}if(cS.has(e))return dS(e,cS.get(e));for(let{regex:t,label:n}of lS)if(t.test(e))return dS(e,n);if(t){for(let{cidr:n,label:r}of uS)if(t.match(n))return dS(e,r)}return dS(e,null)},fS=e=>{if(!e)return e===``?`Inner`:``;let t=moe(e);return t===null?doe(e)??e:t},pS=mn([]),mS=mn([]),hS=mn([]),gS=I(0),_S=I(0),vS=I(!1),yS=()=>Rx().connections.accessor,bS=e=>Rx().connections.disconnect(e),hoe=()=>Rx().connections.disconnectAll(),xS=e=>Rx().connections.block(e),SS,goe=()=>{CS();let e=yS(),t=Rx().connections.subscribe(),n=new Map,r=B(t.data,t=>{if(!t)return;t.downloadTotal!=null&&t.uploadTotal!=null&&(gS.value=t.downloadTotal,_S.value=t.uploadTotal);let r=new Map,i=t.connections.map(t=>{let i=t,a=n.get(i.id);return i.downloadSpeed=a?e.download(i)-e.download(a):0,i.uploadSpeed=a?e.upload(i)-e.upload(a):0,n.delete(i.id),r.set(i.id,i),i}),a=Array.from(n.values());n=r,!vS.value&&(pS.value=i,a.length>0&&(mS.value=mS.value.concat(a).slice(-500),hS.value=a))});ch.value&&Ld(pS,()=>{pS.value.filter(t=>e.network(t)!==`tcp`).forEach(t=>{let n=(0,fm.default)(),r=(0,fm.default)(e.start(t));n.diff(r,`minute`)>lh.value&&bS(t.id).catch(()=>{})})}),SS=()=>{r(),t.close()}},CS=()=>{SS?.(),SS=void 0,pS.value=[],mS.value=[],hS.value=[],gS.value=0,_S.value=0},_oe=e=>Xx.IPv4.isIPv4(e)?`IPv4`:Xx.IPv6.isIPv6(e)?`IPv6`:`FQDN`,voe=(e,t)=>{let n=yS().chains(e);return(t.mode===`card`||!t.showFullProxyChain)&&n.length>2&&(n=[n[0],n[n.length-1]]),t.proxyChainDirection===Jp.REVERSE?n:[...n].reverse()},wS=(e,t,n)=>{let r=yS();switch(t){case Z.Type:return r.networkType(e);case Z.Process:return r.process(e);case Z.Host:return r.host(e);case Z.Rule:return r.rule(e);case Z.Chains:return voe(e,n).join(` → `);case Z.Outbound:return r.chains(e)[0]||``;case Z.DlSpeed:return`${xm(e.downloadSpeed)}/s`;case Z.UlSpeed:return`${xm(e.uploadSpeed)}/s`;case Z.Download:return xm(r.download(e));case Z.Upload:return xm(r.upload(e));case Z.ConnectTime:return Sm(r.start(e));case Z.SourceIP:return fS(r.sourceIP(e));case Z.SourcePort:return r.sourcePort(e);case Z.SniffHost:return r.sniffHost(e)||`-`;case Z.Destination:return r.destination(e);case Z.DestinationType:return _oe(r.destination(e));case Z.GeoIP:{let{country:t,organization:n}=eoe(r.destination(e));return[t,n].filter(Boolean).join(` / `)}case Z.RemoteAddress:return r.remoteAddress(e)||`-`;case Z.InboundUser:return r.inboundUser(e);case Z.Close:return``}},TS=new WeakMap,ES=(e,t,n)=>{let r=TS.get(t);return r||(r=t.filter(e=>e!==Z.Close),TS.set(t,r)),r.map(t=>wS(e,t,n))},DS=mn([]),OS=I(!1),kS=X(`config/log-level`,Hp.Info),AS=Y(()=>{let e=[Hp.Debug,Hp.Info,Hp.Warning,Hp.Error];return fx(`traceLogLevel`)&&e.unshift(Hp.Trace),fx(`silentLogLevel`)&&e.push(Hp.Silent),e});B(AS,e=>{!Cg.value||ox.value===ax.Unknown||e.includes(kS.value)||(kS.value=Hp.Info,MS&&NS())});var jS=()=>{let e=[];for(let{key:t,label:n,scope:r}of rg.value)r&&!r.includes(Cg.value?.uuid)||t.startsWith(`/`)||(t.includes(`:`)?e.push([RegExp(`${t}]:`,`ig`),`${t}] (${n}) :`]):e.push([RegExp(`${t}:`,`ig`),`${t} (${n}) :`]));return e},MS,NS=()=>{PS();let e=1,t=[],n=jS(),r=(0,vg.throttle)(()=>{DS.value=t.concat(DS.value).slice(0,lg.value),t=[]},500),i=B(()=>[rg.value,Cg.value],()=>n=jS(),{deep:!0}),a=Rx().logs.subscribe(kS.value,i=>{for(let r of i){if(OS.value){e++;continue}let i=r.payload;for(let[e,t]of n)i=i.replace(e,t);t.unshift({...r,payload:i,time:(0,fm.default)().format(`HH:mm:ss`),seq:e++})}r()});MS=()=>{i(),r.cancel(),a.close()}},PS=()=>{MS?.(),MS=void 0,DS.value=[]},yoe=()=>Rx().metrics.traffic(),boe=()=>Rx().metrics.memory(),FS=62,IS=()=>{let e=Date.now();return Array(FS).fill(0).map((t,n)=>{let r=e-(FS-1-n)*1e3;return{name:r,value:[r,0],init:!0}})},LS=I(0),RS=I(IS()),zS=I(IS()),BS=I(0),VS=I(0),HS=I(IS()),US=I(IS()),WS,xoe=()=>{GS();let{data:e,close:t}=boe(),n=B(()=>e.value,e=>{if(!e)return;let t=Date.now().valueOf();e.inuse!==0&&(LS.value=e.inuse,RS.value.push({value:[t,e.inuse],name:t}),zS.value.push({value:[t,pS.value.length],name:t}),RS.value=RS.value.slice(-1*FS),zS.value=zS.value.slice(-1*FS))}),{data:r,close:i}=yoe(),a=B(()=>r.value,e=>{if(!e)return;let t=Date.now().valueOf();BS.value=e.down,VS.value=e.up,e.downTotal!=null&&e.upTotal!=null&&(gS.value=e.downTotal,_S.value=e.upTotal),HS.value.push({value:[t,e.down],name:t}),US.value.push({value:[t,e.up],name:t}),HS.value=HS.value.slice(-1*FS),US.value=US.value.slice(-1*FS)});WS=()=>{t(),i(),n(),a()}},GS=()=>{WS?.(),WS=void 0,LS.value=0,BS.value=0,VS.value=0,HS.value=IS(),US.value=IS(),RS.value=IS(),zS.value=IS()},KS=mn(),Soe=5e3,qS,JS=async()=>{if(!fx(`runtimeStats`)){KS.value=void 0;return}try{KS.value=await Rx().metrics.fetchRuntimeStats()}catch{KS.value=void 0}},Coe=()=>{qS||=(JS(),setInterval(JS,Soe))},woe=()=>{qS&&=(clearInterval(qS),void 0),KS.value=void 0},YS=e=>bv.isAxiosError(e)?e.response?.data?.message||e.message:e instanceof Error?e.message:String(e),XS=(e,t)=>{let n=YS(e),r=bv.isAxiosError(e)?decodeURIComponent(e.config?.url||``):``;rx({key:t||n,content:r?`${r} \n${n}`:n,type:`alert-error`})},ZS=I({}),QS=I({}),Toe=(e,t)=>{let n={},r={};t.forEach((e,t)=>{n[e.Name]=e.Rank,r[e.Name]=t}),ZS.value[e]=n,QS.value[e]=r},Eoe=async()=>{let e=null;try{e=await Rx().proxies.fetchSmartWeights()}catch{e=null}if(ZS.value={},QS.value={},e)for(let[t,n]of Object.entries(e))n?.length&&Toe(t,n)},Doe=e=>{let t=e.extra?.[Sp]?.history;return((0,vg.last)(t)?.delay??0)>0},$S=0,eC=async()=>{let e=Date.now();$S=e;let{proxies:t,providers:n}=await Rx().proxies.fetch();if($S!==e)return;let r=t.GLOBAL?.all??[],i={};for(let e of n)for(let t of e.proxies)t[`provider-name`]||=e.name,i[t.name]=t;mx.value={...i,...t},px.value=Object.values(t).filter(e=>e.all?.length&&e.name!==`GLOBAL`).sort((e,t)=>{let n=r.indexOf(e.name),i=r.indexOf(t.name);return n===-1&&i===-1?0:n===-1?1:i===-1?-1:n-i}).map(e=>e.name),gx.value=n;let a=!1;Object.entries(mx.value).forEach(([e,t])=>{let n=Gh.value.find(t=>t.name===e);n&&(mx.value[e].icon=n.icon),Rh.value&&Doe(t)&&(hx.value[e]=!0),t.type.toLowerCase()===Yp.Smart&&(a=!0)}),a&&Eoe()},tC=async(e,t)=>{try{let n=mx.value[e];if(n.type.toLowerCase()===Yp.LoadBalance||n.now===t&&(await eC(),n.now===t))return;await Rx().proxies.select(e,t),mx.value[e].now=t,jh.value&&pS.value.filter(t=>yS().chains(t).includes(e)).forEach(e=>bS(e.id).catch(()=>{})),eC()}catch(e){XS(e)}},nC=e=>Rx().proxies.updateProvider(e),Ooe=e=>Rx().proxies.healthCheckProvider(e),koe=()=>Rx().proxies.flushSmartWeights(),rC=I(``),iC=I(Lp.PROXIES),aC=X(`config/hidden-group-map`,{});B(Cg,e=>{e&&(iC.value=Lp.PROXIES)});var Aoe=new Set(Object.values(Yp)),oC=e=>{let t=mx.value[e];return t?t.all?.length?!0:Aoe.has(t.type.toLowerCase()):!1},sC=e=>yS().chains(e),cC=e=>yS().download(e),lC=e=>yS().upload(e),uC=e=>yS().start(e),dC=e=>yS().rule(e),joe=e=>yS().rulePayload(e),fC=e=>yS().sourceIP(e),pC=e=>yS().smartBlock(e),Moe=e=>yS().hostname(e),Noe=e=>yS().host(e),Poe=e=>yS().process(e),Foe=e=>yS().destination(e),Ioe=e=>yS().networkType(e),Loe=e=>yS().inboundUser(e),Roe=e=>{let t=[...sC(e)];return Zh.value===Jp.NORMAL&&t.reverse(),t.join(``)},mC=e=>e===0?``:eObject.values(Up).filter(e=>!(e===Up.setup||!dh.value&&e===Up.overview))),gC=()=>{document.querySelectorAll(`.custom-theme`).forEach(e=>{e.remove()}),Lm.value.forEach(e=>{let t=document.createElement(`style`),n=Object.entries(e).filter(([e])=>![`prefersdark`,`default`,`name`,`type`,`id`].includes(e)).map(([e,t])=>`${e}:${t}`).join(`;`);t.innerHTML=`[data-theme="${e.name}"] { - ${n} - }`,t.className=`custom-theme ${e.name}`,document.head.appendChild(t)})},_C=()=>{let e=`custom-css`,t=Jm.value.trim(),n=document.getElementById(e);if(!t){n?.remove();return}n||(n=document.createElement(`style`),n.id=e,document.head.appendChild(n)),n.textContent=t},zoe=()=>{if(window.ksu){let e=document.createElement(`link`);e.rel=`stylesheet`,e.href=`https://mui.kernelsu.org/internal/colors.css`,document.head.appendChild(e)}},vC=e=>Reflect.has(aC.value,e)?aC.value[e]:mx.value[e]?.hidden,yC=e=>{rx({key:e,content:`upgradeSuccess`,type:`alert-success`})},Boe=class{value;next;constructor(e){this.value=e}},Voe=class{#e;#t;#n;constructor(){this.clear()}enqueue(e){let t=new Boe(e);this.#e?(this.#t.next=t,this.#t=t):(this.#e=t,this.#t=t),this.#n++}dequeue(){let e=this.#e;if(e)return this.#e=this.#e.next,this.#n--,this.#e||(this.#t=void 0),e.value}peek(){if(this.#e)return this.#e.value}clear(){this.#e=void 0,this.#t=void 0,this.#n=0}get size(){return this.#n}*[Symbol.iterator](){let e=this.#e;for(;e;)yield e.value,e=e.next}*drain(){for(;this.#e;)yield this.dequeue()}};function bC(e){let t=!1;if(typeof e==`object`&&({concurrency:e,rejectOnClear:t=!1}=e),xC(e),typeof t!=`boolean`)throw TypeError("Expected `rejectOnClear` to be a boolean");let n=new Voe,r=0,i=()=>{r0&&(r++,n.dequeue().run())},a=()=>{r--,i()},o=async(e,t,n)=>{let r=(async()=>e(...n))();t(r);try{await r}catch{}a()},s=(t,a,s,c)=>{let l={reject:s};new Promise(e=>{l.run=e,n.enqueue(l)}).then(o.bind(void 0,t,a,c)),rnew Promise((n,r)=>{s(e,n,r,t)});return Object.defineProperties(c,{activeCount:{get:()=>r},pendingCount:{get:()=>n.size},clearQueue:{value(){if(!t){n.clear();return}let e=AbortSignal.abort().reason;for(;n.size>0;)n.dequeue().reject(e)}},concurrency:{get:()=>e,set(t){xC(t),e=t,queueMicrotask(()=>{for(;r0;)i()})}},map:{async value(e,t){let n=Array.from(e,(e,n)=>c(t,e,n));return Promise.all(n)}}}),c}function xC(e){if(!((Number.isInteger(e)||e===1/0)&&e>0))throw TypeError("Expected `concurrency` to be a number from 1 and up")}var SC=(e,t,n)=>{let r=Uae(e);return r?Rx().proxies.testProviderNode(r,e,t,n):Rx().proxies.testNode(e,t,n)},CC=async(e,t,n)=>{let r=Dx(e);if(Rh.value)try{hx.value[r]=await SC(r,Sp,2e3)>0}catch{hx.value[r]=!1}return await SC(Dh.value?e:r,t,n)},wC=(e,t)=>Dh.value?`${e}\n@${t}`:e,Hoe=async(e,t=_x.value,n=Oh.value)=>{try{await CC(e,t,n)}catch{rx({content:`testFailedTip`,params:{name:wC(e,t)},type:`alert-error`})}finally{await eC()}},TC=(e,t,n)=>{Ex(e,n).push({time:new Date().toISOString(),delay:t})},EC=`testLatencyOneByOneWithTip`,Uoe=bC(5),DC=async(e,t,n=_x.value,r)=>{let i=t.length,a=0,o=0;await Promise.allSettled(t.map(t=>Uoe(async()=>{try{TC(t,await CC(t,n,Math.min(2e3,Oh.value)),r)}catch{o++,TC(t,0,r)}finally{a++,rx({content:`testFinishedTip`,key:EC+e,params:{name:wC(e,n),total:i.toString(),number:a.toString()},type:`alert-info`,timeout:0})}}))),await eC().catch(()=>{}),rx({content:`testFinishedResultTip`,key:EC+e,params:{name:wC(e,n),total:i.toString(),success:`${i-o}`,failed:`${o}`},type:o?`alert-warning`:`alert-success`,timeout:3e3})},OC=async e=>{let t=mx.value[e],n=(t.all??[]).filter(Ax),r=vx(e);if(kh.value===Mp.DASHBOARD&&[Yp.Selector,Yp.LoadBalance,Yp.Smart].includes(t.type.toLowerCase()))return t.fixed&&Rx().proxies.clearFixed(e).catch(()=>{}),DC(e,n,r,e);let i=Math.max(5e3,Oh.value);if(Rh.value)try{let t=await Rx().proxies.testGroup(e,Sp,i);n?.forEach(e=>{hx.value[Dx(e)]=t[e]>0})}catch{n?.forEach(e=>{hx.value[Dx(e)]=!1})}try{await Rx().proxies.testGroup(e,r,i)}catch(e){XS(e);return}finally{await eC()}let a=n.length,o=n.filter(t=>Tx(t,e)===0).length;rx({content:`testFinishedResultTip`,key:EC+e,params:{name:wC(e,r),total:a.toString(),success:`${a-o}`,failed:`${o}`},type:o?`alert-warning`:`alert-success`,timeout:3e3})},Woe=async()=>{if(Dh.value){let e=bC(3);return await Promise.all(px.value.map(t=>e(async()=>{await OC(t)})))}let e=Object.keys(mx.value).filter(e=>!oC(e)&&Ax(e));return DC(Jb.global.t(`all`),e)},kC=I([]),AC=I([]),jC=async()=>{let e=await Rx().rules.fetch();kC.value=e.rules,AC.value=e.providers},Goe=(e,t)=>Rx().rules.toggleDisabled(e,t),MC=e=>Rx().rules.updateProvider(e),Koe=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%20width='64'%20height='64'%3e%3crect%20width='64'%20height='64'%20rx='14'%20fill='%23111827'%20/%3e%3cpath%20d='M30%2024C30%2036%2032%2044%2038%2052'%20fill='none'%20stroke='%23f9fafb'%20stroke-width='11'%20stroke-linecap='round'%20/%3e%3ccircle%20cx='27'%20cy='21'%20r='11'%20fill='%23f9fafb'%20/%3e%3cpath%20d='M36%2016%20L54%2021%20L36%2027%20Z'%20fill='%23f59e0b'%20/%3e%3ccircle%20cx='25'%20cy='18'%20r='2.4'%20fill='%23111827'%20/%3e%3c/svg%3e`,qoe=``+new URL(`metacubex-BlQkOUXT.jpg`,import.meta.url).href,Joe=1e3*60*60,NC=async(e,t)=>{let n=`cache/`+e,r=localStorage.getItem(n);if(r)try{let e=JSON.parse(r);if(Date.now()-e.timestampe?/\bhonk\b/i.test(e)?ax.Honk:ax.Mihomo:ax.Unknown,zC=Y(()=>{switch(ox.value){case ax.Honk:return{logo:Koe,url:`https://github.com/Glassyiris/honk`};default:return{logo:qoe,url:rm[BC.value?.[0]??nm.Meta].url}}}),BC=Y(()=>{if(ox.value!==ax.Mihomo)return;let e=/(alpha-smart|alpha|beta|meta)-?(\w+)/.exec(PC.value);switch(e?.[1]){case`alpha`:return[nm.Alpha,e[2]??PC.value];case`alpha-smart`:return[nm.Smart,e[2]??PC.value];case`meta`:return[nm.Meta,e[2]??PC.value];default:return[nm.Meta,PC.value]}}),Xoe=()=>Rx().system.restartCore(),VC=e=>Rx().system.upgradeCore(e),HC=()=>Rx().system.upgradeUI(),Zoe=async e=>{let t=Date.now(),n;try{n=await Rx().system.fetchVersion()}catch(t){throw Cg.value?.uuid===e.uuid&&(RC.value={uuid:e.uuid,status:`failed`,latency:0,message:YS(t)}),t}Cg.value?.uuid===e.uuid&&(PC.value=n,ox.value=Yoe(PC.value),RC.value={uuid:e.uuid,status:`connected`,latency:Date.now()-t,message:``},!(!fx(`coreUpdateCheck`)||!Zm.value||e.disableUpgradeCore)&&(FC.value=await $oe(),FC.value&&Qm.value&&VC(`auto`).catch(()=>{})))},UC=Promise.resolve(),WC=async()=>{await Mr(),await UC},Qoe=()=>{let e=Cg.value;return sx(),PC.value=``,FC.value=!1,RC.value=e?{uuid:e.uuid,status:`probing`,latency:0,message:``}:void 0,UC=e?Zoe(e).catch(()=>{}):Promise.resolve(),UC},$oe=async()=>{let e=BC.value?.[1]??PC.value,{assets:t}=await NC(rm[BC.value?.[0]??nm.Meta].check_update_url,e);return!t.some(({name:t})=>t.includes(e))},ese=async()=>{let{tag_name:e}=await NC(`https://api.github.com/repos/Zephyruso/zashboard/releases/latest`,LC.value);IC.value=!!(e&&e!==`v${LC.value}`),IC.value&&Xm.value&&HC().catch(()=>{})},GC=()=>{Qoe(),CS(),PS(),GS(),Cg.value&&(Bx(),eC(),jC(),goe(),NS(),xoe())};B(Cg,GC,{immediate:!0});var KC=e=>{let t=new Map,n=new Promise((n,r)=>{let i=indexedDB.open(e,1);i.onupgradeneeded=()=>{let t=i.result;t.objectStoreNames.contains(e)||t.createObjectStore(e,{keyPath:`key`})},i.onsuccess=()=>{let a=i.result.transaction(e,`readonly`).objectStore(e).openCursor();a.onsuccess=e=>{let r=e.target.result;r?(t.set(r.key,r.value.value),r.continue()):n(i.result)},a.onerror=()=>r(a.error)},i.onerror=()=>r(i.error)}),r=async(t,r)=>{let i=await n;return new Promise((n,a)=>{let o=r(i.transaction(e,t).objectStore(e));o.onsuccess=()=>n(o.result),o.onerror=()=>a(o.error)})};return{put:async(e,i)=>(await n,t.set(e,i),r(`readwrite`,t=>t.put({key:e,value:i}))),get:async e=>(await n,t.get(e)),del:async e=>(await n,t.delete(e),r(`readwrite`,t=>t.delete(e))),getAllKeys:async()=>(await n,Array.from(t.keys())),isExists:async e=>(await n,t.has(e)),clear:async()=>(await n,t.clear(),r(`readwrite`,e=>e.clear()))}},qC=KC(`base64`),JC=`background-image`,tse=e=>qC.put(JC,e),nse=()=>qC.get(JC),rse=()=>qC.clear(),ise=`local-image`,YC=(0,fm.default)().format(`YYYY-MM-DD`),XC=I(``),ase=async()=>{XC.value=await nse()||``};B(()=>qm.value,()=>{qm.value.includes(`local-image`)&&ase()},{immediate:!0});var ZC=Y(()=>{if(!qm.value)return``;if(qm.value.includes(`local-image`))return XC.value;let e=qm.value.includes(`?`)?`&`:`?`;return`${qm.value}${e}v=${YC}`}),QC=I(!1),$C=X(`cache/custom-background-image-load-status`,{}),ose=e=>$C.value[e]?.date===YC||void 0,sse=e=>{$C.value[e]={date:YC}},ew=0;B(ZC,e=>{let t=++ew;if(QC.value=!1,!e)return;let n=qm.value,r=ose(n);if(r!==void 0){QC.value=r;return}let i=new Image;i.onload=()=>{t===ew&&(QC.value=!0,sse(n))},i.onerror=()=>{t===ew&&(QC.value=!1)},i.src=e},{immediate:!0});var tw=Y(()=>QC.value?`background-image: url('${ZC.value}');`:``),nw=function(e){return e.SourceIP=`sourceIP`,e.Destination=`destination`,e.Process=`process`,e.Outbound=`outbound`,e.ProxyGroup=`proxyGroup`,e}({}),rw=KC(`connection-history`),iw=async(e,t,n)=>{let r=JSON.stringify(n);return rw.put(`${e}-${t}`,r)},cse=async(e,t)=>{let n=await rw.get(`${e}-${t}`);if(!n)return[];try{return JSON.parse(n)}catch{return[]}},lse=async()=>rw.clear(),aw=()=>Cg.value?.uuid||``,ow=[nw.SourceIP,nw.Destination,nw.Process,nw.Outbound,nw.ProxyGroup],sw=()=>({[nw.SourceIP]:new Map,[nw.Destination]:new Map,[nw.Process]:new Map,[nw.Outbound]:new Map,[nw.ProxyGroup]:new Map}),cw=sw(),lw=()=>({[nw.SourceIP]:[],[nw.Destination]:[],[nw.Process]:[],[nw.Outbound]:[],[nw.ProxyGroup]:[]}),uw=mn(lw()),use=5e3,dse=6,dw=2e3,fw=1500,pw=!1,mw=``,hw=0,gw=0,_w=0,vw=!1,yw=new Set,bw,xw=Promise.resolve(),Sw=e=>{let t=xw.then(e);return xw=t.then(()=>void 0,()=>void 0),t},Cw=()=>{yw.clear();for(let e of ow)yw.add(e)},ww=()=>{if(!yw.size)return;let e={...uw.value};for(let t of yw)e[t]=Array.from(cw[t].values());yw.clear(),uw.value=e},Tw=(e,t)=>{let n=e[t];if(n.size<=dw)return!1;let r=Array.from(n.values()).sort((e,t)=>t.download-e.download).slice(0,fw);n.clear();for(let e of r)n.set(e.key,e);return!0},Ew=e=>Object.fromEntries(ow.map(t=>[t,Array.from(e[t].values(),e=>({...e}))])),Dw=async(e,t)=>{let n=!0;for(let r of ow)try{await iw(e,r,t[r])}catch(e){n=!1,console.error(`Failed to save connection history for ${r}:`,e)}return n},Ow=()=>{if(!mw||!vw)return Promise.resolve();for(let e of ow)Tw(cw,e)&&yw.add(e);let e=mw,t=hw,n=Ew(cw);return vw=!1,Sw(async()=>{!await Dw(e,n)&&mw===e&&hw===t&&(vw=!0)})},kw=(e,t)=>{for(let n of ow){let r=e[n];for(let e of Lw(t,n)){let t=r.get(e.key);t?(t.download+=e.download,t.upload+=e.upload,t.count+=e.count):r.set(e.key,e)}}},Aw=e=>{kw(cw,e),Cw(),vw=!0},jw=async e=>{let t=sw();for(let n of ow){let r=await cse(e,n);r.length>dw&&(r=r.sort((e,t)=>t.download-e.download).slice(0,fw),await iw(e,n,r));for(let e of r)t[n].set(e.key,e)}return t},Mw=e=>{pw=!1,mw=e,hw++,cw=sw(),vw=!1,Pw=0,Cw(),uw.value=lw()},Nw=async(e,t)=>{if(!e.pending.length||e.epoch<_w)return;let n=e.pending.splice(0);if(bw&&bw!==e&&bw.uuid===e.uuid){bw.pending.push(...n);return}kw(t,n);let r=Ew(t);await Sw(()=>Dw(e.uuid,r).then(()=>void 0))},Pw=0;setInterval(()=>{!pw||document.hidden||(ww(),++Pw>=dse&&(Pw=0,Ow()))},use),document.addEventListener(`visibilitychange`,()=>{document.hidden&&pw&&Ow()}),window.addEventListener(`pagehide`,()=>{pw&&Ow()});var Fw=async()=>{Ow();let e={epoch:++gw,uuid:aw(),pending:[]};bw=e,Mw(e.uuid);let t=await Sw(()=>jw(e.uuid));if(e.epoch!==gw){await Nw(e,t);return}cw=t,pw=!0,e.pending.length&&Aw(e.pending.splice(0)),bw===e&&(bw=void 0),Cw(),ww()},Iw=async()=>{let e={epoch:++gw,uuid:aw(),pending:[]};if(_w=e.epoch,bw=e,Mw(e.uuid),await Sw(()=>lse()),e.epoch!==gw){await Nw(e,sw());return}pw=!0,e.pending.length&&Aw(e.pending.splice(0)),bw===e&&(bw=void 0),ww()},Lw=(e,t)=>{let n=new Map;return e.forEach(e=>{let r=``;if(t===nw.SourceIP)r=fC(e);else if(t===nw.Destination){let t=Moe(e);r=Xx.default.IPv4.isValid(t)||Xx.default.IPv6.isValid(t)?t:t.split(`.`).slice(-2).join(`.`)}else if(t===nw.Process)r=Poe(e);else if(t===nw.Outbound)r=sC(e)[0]||`-`;else if(t===nw.ProxyGroup){let t=sC(e);r=t[t.length-1]||`-`}if(n.has(r)){let t=n.get(r);t.download+=cC(e),t.upload+=lC(e),t.count+=1}else n.set(r,{key:r,download:cC(e),upload:lC(e),count:1})}),Array.from(n.values())},Rw=(e,t)=>{let n=new Map;for(let t of e)n.set(t.key,t);for(let e of t){let t=n.get(e.key);t?n.set(e.key,{key:t.key,download:t.download+e.download,upload:t.upload+e.upload,count:t.count+e.count}):n.set(e.key,{...e})}return Array.from(n.values())},zw=e=>{if(e.length===0)return;let t=aw();if(!pw||t!==mw){bw?.uuid===t&&bw.pending.push(...e);return}Aw(e)};B(Cg,e=>{e&&Fw()},{immediate:!0}),B(hS,e=>zw(e));function Bw(e){return typeof e==`object`||`displayName`in e||`props`in e||`__vccOpts`in e}function Vw(e){return e.__esModule||e[Symbol.toStringTag]===`Module`||e.default&&Bw(e.default)}var Hw=Object.assign;function Uw(e,t){let n={};for(let r in t){let i=t[r];n[r]=Gw(i)?i.map(e):e(i)}return n}var Ww=()=>{},Gw=Array.isArray;function Kw(e,t){let n={};for(let r in e)n[r]=r in t?t[r]:e[r];return n}var qw=Symbol(``);function Jw(e,t){return Hw(Error(),{type:e,[qw]:!0},t)}function Yw(e,t){return e instanceof Error&&qw in e&&(t==null||!!(e.type&t))}var fse=Symbol(``),Xw=Symbol(``),Zw=Symbol(``),Qw=Symbol(``),$w=Symbol(``);function eT(){return qr(Zw)}function tT(e){return qr(Qw)}var nT=typeof document<`u`,rT=/#/g,pse=/&/g,mse=/\//g,hse=/=/g,gse=/\?/g,iT=/\+/g,_se=/%5B/g,vse=/%5D/g,aT=/%5E/g,yse=/%60/g,oT=/%7B/g,bse=/%7C/g,sT=/%7D/g,xse=/%20/g;function cT(e){return e==null?``:encodeURI(``+e).replace(bse,`|`).replace(_se,`[`).replace(vse,`]`)}function Sse(e){return cT(e).replace(oT,`{`).replace(sT,`}`).replace(aT,`^`)}function lT(e){return cT(e).replace(iT,`%2B`).replace(xse,`+`).replace(rT,`%23`).replace(pse,`%26`).replace(yse,"`").replace(oT,`{`).replace(sT,`}`).replace(aT,`^`)}function Cse(e){return lT(e).replace(hse,`%3D`)}function wse(e){return cT(e).replace(rT,`%23`).replace(gse,`%3F`)}function Tse(e){return wse(e).replace(mse,`%2F`)}function uT(e){if(e==null)return null;try{return decodeURIComponent(``+e)}catch{}return``+e}var Ese=/\/$/,Dse=e=>e.replace(Ese,``);function dT(e,t,n=`/`){let r,i={},a=``,o=``,s=t.indexOf(`#`),c=t.indexOf(`?`);return c=s>=0&&c>s?-1:c,c>=0&&(r=t.slice(0,c),a=t.slice(c,s>0?s:t.length),i=e(a.slice(1))),s>=0&&(r||=t.slice(0,s),o=t.slice(s,t.length)),r=jse(r??t,n),{fullPath:r+a+o,path:r,query:i,hash:uT(o)}}function Ose(e,t){let n=t.query?e(t.query):``;return t.path+(n&&`?`)+n+(t.hash||``)}function fT(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||`/`}function kse(e,t,n){let r=t.matched.length-1,i=n.matched.length-1;return r>-1&&r===i&&pT(t.matched[r],n.matched[i])&&mT(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function pT(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function mT(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!Ase(e[n],t[n]))return!1;return!0}function Ase(e,t){return Gw(e)?hT(e,t):Gw(t)?hT(t,e):(e&&e.valueOf())===(t&&t.valueOf())}function hT(e,t){return Gw(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e.length===1&&e[0]===t}function jse(e,t){if(e.startsWith(`/`))return e;if(!e)return t;let n=t.split(`/`),r=e.split(`/`),i=r[r.length-1];(i===`..`||i===`.`)&&r.push(``);let a=n.length-1,o,s;for(o=0;o1&&a--;else break;return n.slice(0,a).join(`/`)+`/`+r.slice(o).join(`/`)}var gT={path:`/`,name:void 0,params:{},query:{},hash:``,fullPath:`/`,matched:[],meta:{},redirectedFrom:void 0};function Mse(e){if(!e)if(nT){let t=document.querySelector(`base`);e=t&&t.getAttribute(`href`)||`/`,e=e.replace(/^\w+:\/\/[^/]+/,``)}else e=`/`;return e[0]!==`/`&&e[0]!==`#`&&(e=`/`+e),Dse(e)}var Nse=/^[^#]+#/;function Pse(e,t){return e.replace(Nse,`#`)+t}function Fse(e,t){let n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}var _T=()=>({left:window.scrollX,top:window.scrollY});function Ise(e){let t;if(`el`in e){let n=e.el,r=typeof n==`string`&&n.startsWith(`#`),i=typeof n==`string`?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!i)return;t=Fse(i,e)}else t=e;`scrollBehavior`in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left==null?window.scrollX:t.left,t.top==null?window.scrollY:t.top)}function vT(e,t){return(history.state?history.state.position-t:-1)+e}var yT=new Map;function Lse(e,t){yT.set(e,t)}function Rse(e){let t=yT.get(e);return yT.delete(e),t}function zse(e){return typeof e==`string`||e&&typeof e==`object`}function bT(e){return typeof e==`string`||typeof e==`symbol`}function Bse(e){let t={};if(e===``||e===`?`)return t;let n=(e[0]===`?`?e.slice(1):e).split(`&`);for(let e=0;ee&&lT(e)):[r&&lT(r)]).forEach(e=>{e!==void 0&&(t+=(t.length?`&`:``)+n,e!=null&&(t+=`=`+e))})}return t}function Vse(e){let t={};for(let n in e){let r=e[n];r!==void 0&&(t[n]=Gw(r)?r.map(e=>e==null?null:``+e):r==null?r:``+r)}return t}function ST(){let e=[];function t(t){return e.push(t),()=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function CT(e,t,n,r,i,a=e=>e()){let o=r&&(r.enterCallbacks[i]=r.enterCallbacks[i]||[]);return()=>new Promise((s,c)=>{let l=e=>{e===!1?c(Jw(4,{from:n,to:t})):e instanceof Error?c(e):zse(e)?c(Jw(2,{from:t,to:e})):(o&&r.enterCallbacks[i]===o&&typeof e==`function`&&o.push(e),s())},u=a(()=>e.call(r&&r.instances[i],t,n,l)),d=Promise.resolve(u);e.length<3&&(d=d.then(l)),d.catch(e=>c(e))})}function wT(e,t,n,r,i=e=>e()){let a=[];for(let o of e)for(let e in o.components){let s=o.components[e];if(!(t!==`beforeRouteEnter`&&!o.instances[e]))if(Bw(s)){let c=(s.__vccOpts||s)[t];c&&a.push(CT(c,n,r,o,e,i))}else{let c=s();a.push(()=>c.then(a=>{if(!a)throw Error(`Couldn't resolve component "${e}" at "${o.path}"`);let s=Vw(a)?a.default:a;o.mods[e]=a,o.components[e]=s;let c=(s.__vccOpts||s)[t];return c&&CT(c,n,r,o,e,i)()}))}}return a}function Hse(e,t){let n=[],r=[],i=[],a=Math.max(t.matched.length,e.matched.length);for(let o=0;opT(e,a))?r.push(a):n.push(a));let s=e.matched[o];s&&(t.matched.find(e=>pT(e,s))||i.push(s))}return[n,r,i]}var Use=()=>location.protocol+`//`+location.host;function TT(e,t){let{pathname:n,search:r,hash:i}=t,a=e.indexOf(`#`);if(a>-1){let t=i.includes(e.slice(a))?e.slice(a).length:1,n=i.slice(t);return n[0]!==`/`&&(n=`/`+n),fT(n,``)}return fT(n,e)+r+i}function Wse(e,t,n,r){let i=[],a=[],o=null,s=({state:a})=>{let s=TT(e,location),c=n.value,l=t.value,u=0;if(a){if(n.value=s,t.value=a,o&&o===c){o=null;return}u=l?a.position-l.position:0}else r(s);i.forEach(e=>{e(n.value,c,{delta:u,type:`pop`,direction:u?u>0?`forward`:`back`:``})})};function c(){o=n.value}function l(e){i.push(e);let t=()=>{let t=i.indexOf(e);t>-1&&i.splice(t,1)};return a.push(t),t}function u(){if(document.visibilityState===`hidden`){let{history:e}=window;if(!e.state)return;e.replaceState(Hw({},e.state,{scroll:_T()}),``)}}function d(){for(let e of a)e();a=[],window.removeEventListener(`popstate`,s),window.removeEventListener(`pagehide`,u),document.removeEventListener(`visibilitychange`,u)}return window.addEventListener(`popstate`,s),window.addEventListener(`pagehide`,u),document.addEventListener(`visibilitychange`,u),{pauseListeners:c,listen:l,destroy:d}}function ET(e,t,n,r=!1,i=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:i?_T():null}}function Gse(e){let{history:t,location:n}=window,r={value:TT(e,n)},i={value:t.state};i.value||a(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function a(r,a,o){let s=e.indexOf(`#`),c=s>-1?(n.host&&document.querySelector(`base`)?e:e.slice(s))+r:Use()+e+r;try{t[o?`replaceState`:`pushState`](a,``,c),i.value=a}catch(e){console.error(e),n[o?`replace`:`assign`](c)}}function o(e,n){a(e,Hw({},t.state,ET(i.value.back,e,i.value.forward,!0),n,{position:i.value.position}),!0),r.value=e}function s(e,n){let o=Hw({},i.value,t.state,{forward:e,scroll:_T()});a(o.current,o,!0),a(e,Hw({},ET(r.value,e,null),{position:o.position+1},n),!1),r.value=e}return{location:r,state:i,push:s,replace:o}}function Kse(e){e=Mse(e);let t=Gse(e),n=Wse(e,t.state,t.location,t.replace);function r(e,t=!0){t||n.pauseListeners(),history.go(e)}let i=Hw({location:``,base:e,go:r,createHref:Pse.bind(null,e)},t,n);return Object.defineProperty(i,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(i,"state",{enumerable:!0,get:()=>t.state.value}),i}function qse(e){return e=location.host?e||location.pathname+location.search:``,e.includes(`#`)||(e+=`#`),Kse(e)}var Jse={type:0,value:``},Yse=/[a-zA-Z0-9_]/;function Xse(e){if(!e)return[[]];if(e===`/`)return[[Jse]];if(!e.startsWith(`/`))throw Error(`Invalid path "${e}"`);function t(e){throw Error(`ERR (${n})/"${l}": ${e}`)}let n=0,r=n,i=[],a;function o(){a&&i.push(a),a=[]}let s=0,c,l=``,u=``;function d(){l&&=(n===0?a.push({type:0,value:l}):n===1||n===2||n===3?(a.length>1&&(c===`*`||c===`+`)&&t(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),a.push({type:1,value:l,regexp:u,repeatable:c===`*`||c===`+`,optional:c===`*`||c===`?`})):t(`Invalid state to consume buffer`),``)}function f(){l+=c}for(;st.length?t.length===1&&t[0]===80?1:-1:0}function OT(e,t){let n=0,r=e.score,i=t.score;for(;n0&&t[t.length-1]<0}var tce={strict:!1,end:!0,sensitive:!1};function nce(e,t,n){let r=Hw($se(Xse(e.path),n),{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function rce(e,t){let n=[],r=new Map;t=Kw(tce,t);function i(e){return r.get(e)}function a(e,n,r){let i=!r,s=jT(e);s.aliasOf=r&&r.record;let l=Kw(t,e),u=[s];if(`alias`in e){let t=typeof e.alias==`string`?[e.alias]:e.alias;for(let e of t)u.push(jT(Hw({},s,{components:r?r.record.components:s.components,path:e,aliasOf:r?r.record:s})))}let d,f;for(let t of u){let{path:u}=t;if(n&&u[0]!==`/`){let e=n.record.path,r=e[e.length-1]===`/`?``:`/`;t.path=n.record.path+(u&&r+u)}if(d=nce(t,n,l),r?r.alias.push(d):(f||=d,f!==d&&f.alias.push(d),i&&e.name&&!MT(d)&&o(e.name)),NT(d)&&c(d),s.children){let e=s.children;for(let t=0;t{o(f)}:Ww}function o(e){if(bT(e)){let t=r.get(e);t&&(r.delete(e),n.splice(n.indexOf(t),1),t.children.forEach(o),t.alias.forEach(o))}else{let t=n.indexOf(e);t>-1&&(n.splice(t,1),e.record.name&&r.delete(e.record.name),e.children.forEach(o),e.alias.forEach(o))}}function s(){return n}function c(e){let t=oce(e,n);n.splice(t,0,e),e.record.name&&!MT(e)&&r.set(e.record.name,e)}function l(e,t){let i,a={},o,s;if(`name`in e&&e.name){if(i=r.get(e.name),!i)throw Jw(1,{location:e});s=i.record.name,a=Hw(AT(t.params,i.keys.filter(e=>!e.optional).concat(i.parent?i.parent.keys.filter(e=>e.optional):[]).map(e=>e.name)),e.params&&AT(e.params,i.keys.map(e=>e.name))),o=i.stringify(a)}else if(e.path!=null)o=e.path,i=n.find(e=>e.re.test(o)),i&&(a=i.parse(o),s=i.record.name,i.keys.forEach(e=>{e.optional&&!a[e.name]&&delete a[e.name]}));else{if(i=t.name?r.get(t.name):n.find(e=>e.re.test(t.path)),!i)throw Jw(1,{location:e,currentLocation:t});s=i.record.name,a=Hw({},t.params,e.params),o=i.stringify(a)}let c=[],l=i;for(;l;)c.unshift(l.record),l=l.parent;return{name:s,path:o,params:a,matched:c,meta:ace(c)}}e.forEach(e=>a(e));function u(){n.length=0,r.clear()}return{addRoute:a,resolve:l,removeRoute:o,clearRoutes:u,getRoutes:s,getRecordMatcher:i}}function AT(e,t){let n={};for(let r of t)r in e&&(n[r]=e[r]);return n}function jT(e){let t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:ice(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:`components`in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function ice(e){let t={},n=e.props||!1;if(`component`in e)t.default=n;else for(let r in e.components)t[r]=typeof n==`object`?n[r]:n;return t}function MT(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function ace(e){return e.reduce((e,t)=>Hw(e,t.meta),{})}function oce(e,t){let n=0,r=t.length;for(;n!==r;){let i=n+r>>1;OT(e,t[i])<0?r=i:n=i+1}let i=sce(e);return i&&(r=t.lastIndexOf(i,r-1)),r}function sce(e){let t=e;for(;t=t.parent;)if(NT(t)&&OT(e,t)===0)return t}function NT({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function PT(e){let t=qr(Zw),n=qr(Qw),r=Y(()=>{let n=L(e.to);return t.resolve(n)}),i=Y(()=>{let{matched:e}=r.value,{length:t}=e,i=e[t-1],a=n.matched;if(!i||!a.length)return-1;let o=a.findIndex(pT.bind(null,i));if(o>-1)return o;let s=IT(e[t-2]);return t>1&&IT(i)===s&&a[a.length-1].path!==s?a.findIndex(pT.bind(null,e[t-2])):o}),a=Y(()=>i.value>-1&&uce(n.params,r.value.params)),o=Y(()=>i.value>-1&&i.value===n.matched.length-1&&mT(n.params,r.value.params));function s(n={}){if(lce(n)){let n=t[L(e.replace)?`replace`:`push`](L(e.to)).catch(Ww);return e.viewTransition&&typeof document<`u`&&`startViewTransition`in document&&document.startViewTransition(()=>n),n}return Promise.resolve()}return{route:r,href:Y(()=>r.value.href),isActive:a,isExactActive:o,navigate:s}}function cce(e){return e.length===1?e[0]:e}var FT=V({name:`RouterLink`,compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:`page`},viewTransition:Boolean},useLink:PT,setup(e,{slots:t}){let n=tn(PT(e)),{options:r}=qr(Zw),i=Y(()=>({[LT(e.activeClass,r.linkActiveClass,`router-link-active`)]:n.isActive,[LT(e.exactActiveClass,r.linkExactActiveClass,`router-link-exact-active`)]:n.isExactActive}));return()=>{let r=t.default&&cce(t.default(n));return e.custom?r:Fo(`a`,{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:i.value},r)}}});function lce(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){let t=e.currentTarget.getAttribute(`target`);if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function uce(e,t){for(let n in t){let r=t[n],i=e[n];if(typeof r==`string`){if(r!==i)return!1}else if(!Gw(i)||i.length!==r.length||r.some((e,t)=>e.valueOf()!==i[t].valueOf()))return!1}return!0}function IT(e){return e?e.aliasOf?e.aliasOf.path:e.path:``}var LT=(e,t,n)=>e??t??n,dce=V({name:`RouterView`,inheritAttrs:!1,props:{name:{type:String,default:`default`},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){let r=qr($w),i=Y(()=>e.route||r.value),a=qr(Xw,0),o=Y(()=>{let e=L(a),{matched:t}=i.value,n;for(;(n=t[e])&&!n.components;)e++;return e}),s=Y(()=>i.value.matched[o.value]);Kr(Xw,Y(()=>o.value+1)),Kr(fse,s),Kr($w,i);let c=I();return B(()=>[c.value,s.value,e.name],([e,t,n],[r,i,a])=>{t&&(t.instances[n]=e,i&&i!==t&&e&&e===r&&(t.leaveGuards.size||(t.leaveGuards=i.leaveGuards),t.updateGuards.size||(t.updateGuards=i.updateGuards))),e&&t&&(!i||!pT(t,i)||!r)&&(t.enterCallbacks[n]||[]).forEach(t=>t(e))},{flush:`post`}),()=>{let r=i.value,a=e.name,o=s.value,l=o&&o.components[a];if(!l)return RT(n.default,{Component:l,route:r});let u=o.props[a],d=Fo(l,Hw({},u?u===!0?r.params:typeof u==`function`?u(r):u:null,t,{onVnodeUnmounted:e=>{e.component.isUnmounted&&(o.instances[a]=null)},ref:c}));return RT(n.default,{Component:d,route:r})||d}}});function RT(e,t){if(!e)return null;let n=e(t);return n.length===1?n[0]:n}var zT=dce;function fce(e){let t=rce(e.routes,e),n=e.parseQuery||Bse,r=e.stringifyQuery||xT,i=e.history,a=ST(),o=ST(),s=ST(),c=mn(gT),l=gT;nT&&e.scrollBehavior&&`scrollRestoration`in history&&(history.scrollRestoration=`manual`);let u=Uw.bind(null,e=>``+e),d=Uw.bind(null,Tse),f=Uw.bind(null,uT);function p(e,n){let r,i;return bT(e)?(r=t.getRecordMatcher(e),i=n):i=e,t.addRoute(i,r)}function m(e){let n=t.getRecordMatcher(e);n&&t.removeRoute(n)}function h(){return t.getRoutes().map(e=>e.record)}function g(e){return!!t.getRecordMatcher(e)}function _(e,a){if(a=Hw({},a||c.value),typeof e==`string`){let r=dT(n,e,a.path),o=t.resolve({path:r.path},a),s=i.createHref(r.fullPath);return Hw(r,o,{params:f(o.params),redirectedFrom:void 0,href:s})}let o;if(e.path!=null)o=Hw({},e,{path:dT(n,e.path,a.path).path});else{let t=Hw({},e.params);for(let e in t)t[e]??delete t[e];o=Hw({},e,{params:d(t)}),a.params=d(a.params)}let s=t.resolve(o,a),l=e.hash||``;s.params=u(f(s.params));let p=Ose(r,Hw({},e,{hash:Sse(l),path:s.path})),m=i.createHref(p);return Hw({fullPath:p,hash:l,query:r===xT?Vse(e.query):e.query||{}},s,{redirectedFrom:void 0,href:m})}function v(e){return typeof e==`string`?dT(n,e,c.value.path):Hw({},e)}function y(e,t){if(l!==e)return Jw(8,{from:t,to:e})}function b(e){return C(e)}function x(e){return b(Hw(v(e),{replace:!0}))}function S(e,t){let n=e.matched[e.matched.length-1];if(n&&n.redirect){let{redirect:r}=n,i=typeof r==`function`?r(e,t):r;return typeof i==`string`&&(i=i.includes(`?`)||i.includes(`#`)?i=v(i):{path:i},i.params={}),Hw({query:e.query,hash:e.hash,params:i.path==null?e.params:{}},i)}}function C(e,t){let n=l=_(e),i=c.value,a=e.state,o=e.force,s=e.replace===!0,u=S(n,i);if(u)return C(Hw(v(u),{state:typeof u==`object`?Hw({},a,u.state):a,force:o,replace:s}),t||n);let d=n;d.redirectedFrom=t;let f;return!o&&kse(r,i,n)&&(f=Jw(16,{to:d,from:i}),re(i,i,!0,!1)),(f?Promise.resolve(f):E(d,i)).catch(e=>Yw(e)?Yw(e,2)?e:N(e):te(e,d,i)).then(e=>{if(e){if(Yw(e,2))return C(Hw({replace:s},v(e.to),{state:typeof e.to==`object`?Hw({},a,e.to.state):a,force:o}),t||d)}else e=O(d,i,!0,s,a);return D(d,i,e),e})}function w(e,t){let n=y(e,t);return n?Promise.reject(n):Promise.resolve()}function T(e){let t=oe.values().next().value;return t&&typeof t.runWithContext==`function`?t.runWithContext(e):e()}function E(e,t){let n,[r,i,s]=Hse(e,t);n=wT(r.reverse(),`beforeRouteLeave`,e,t);for(let i of r)i.leaveGuards.forEach(r=>{n.push(CT(r,e,t))});let c=w.bind(null,e,t);return n.push(c),P(n).then(()=>{n=[];for(let r of a.list())n.push(CT(r,e,t));return n.push(c),P(n)}).then(()=>{n=wT(i,`beforeRouteUpdate`,e,t);for(let r of i)r.updateGuards.forEach(r=>{n.push(CT(r,e,t))});return n.push(c),P(n)}).then(()=>{n=[];for(let r of s)if(r.beforeEnter)if(Gw(r.beforeEnter))for(let i of r.beforeEnter)n.push(CT(i,e,t));else n.push(CT(r.beforeEnter,e,t));return n.push(c),P(n)}).then(()=>(e.matched.forEach(e=>e.enterCallbacks={}),n=wT(s,`beforeRouteEnter`,e,t,T),n.push(c),P(n))).then(()=>{n=[];for(let r of o.list())n.push(CT(r,e,t));return n.push(c),P(n)}).catch(e=>Yw(e,8)?e:Promise.reject(e))}function D(e,t,n){s.list().forEach(r=>T(()=>r(e,t,n)))}function O(e,t,n,r,a){let o=y(e,t);if(o)return o;let s=t===gT,l=nT?history.state:{};n&&(r||s?i.replace(e.fullPath,Hw({scroll:s&&l&&l.scroll},a)):i.push(e.fullPath,a)),c.value=e,re(e,t,n,s),N()}let k;function A(){k||=i.listen((e,t,n)=>{if(!se.listening)return;let r=_(e),a=S(r,se.currentRoute.value);if(a){C(Hw(a,{replace:!0,force:!0}),r).catch(Ww);return}l=r;let o=c.value;nT&&Lse(vT(o.fullPath,n.delta),_T()),E(r,o).catch(e=>Yw(e,12)?e:Yw(e,2)?(C(Hw(v(e.to),{force:!0}),r).then(e=>{Yw(e,20)&&!n.delta&&n.type===`pop`&&i.go(-1,!1)}).catch(Ww),Promise.reject()):(n.delta&&i.go(-n.delta,!1),te(e,r,o))).then(e=>{e||=O(r,o,!1),e&&(n.delta&&!Yw(e,8)?i.go(-n.delta,!1):n.type===`pop`&&Yw(e,20)&&i.go(-1,!1)),D(r,o,e)}).catch(Ww)})}let j=ST(),M=ST(),ee;function te(e,t,n){N(e);let r=M.list();return r.length?r.forEach(r=>r(e,t,n)):console.error(e),Promise.reject(e)}function ne(){return ee&&c.value!==gT?Promise.resolve():new Promise((e,t)=>{j.add([e,t])})}function N(e){return ee||(ee=!e,A(),j.list().forEach(([t,n])=>e?n(e):t()),j.reset()),e}function re(t,n,r,i){let{scrollBehavior:a}=e;if(!nT||!a)return Promise.resolve();let o=!r&&Rse(vT(t.fullPath,0))||(i||!r)&&history.state&&history.state.scroll||null;return Mr().then(()=>a(t,n,o)).then(e=>t===c.value&&e&&Ise(e)).catch(e=>t===c.value&&te(e,t,n))}let ie=e=>i.go(e),ae,oe=new Set,se={currentRoute:c,listening:!0,addRoute:p,removeRoute:m,clearRoutes:t.clearRoutes,hasRoute:g,getRoutes:h,resolve:_,options:e,push:b,replace:x,go:ie,back:()=>ie(-1),forward:()=>ie(1),beforeEach:a.add,beforeResolve:o.add,afterEach:s.add,onError:M.add,isReady:ne,install(e){e.component(`RouterLink`,FT),e.component(`RouterView`,zT),e.config.globalProperties.$router=se,Object.defineProperty(e.config.globalProperties,"$route",{enumerable:!0,get:()=>L(c)}),nT&&!ae&&c.value===gT&&(ae=!0,b(i.location).catch(e=>{}));let t={};for(let e in gT)Object.defineProperty(t,e,{get:()=>c.value[e],enumerable:!0});e.provide(Zw,se),e.provide(Qw,nn(t)),e.provide($w,c);let n=e.unmount;oe.add(e),e.unmount=function(){oe.delete(e),oe.size<1&&(l=gT,k&&k(),k=null,c.value=gT,ae=!1,ee=!1),n()}}};function P(e){return e.reduce((e,t)=>e.then(()=>T(t)),Promise.resolve())}return se}var BT=(e,t=1e4,n)=>Lx(e).system.probe(e,t,n),pce=(e,t=1e4)=>BT(e,t).then(e=>e.ok),VT={offline:`diagnosisOffline`,corsBlocked:`diagnosisCorsBlocked`,mixedContent:`diagnosisMixedContent`,mixedContentOrUnreachable:`diagnosisMixedContentOrUnreachable`,unreachable:`diagnosisUnreachable`},mce=e=>e.includes(`Failed to fetch`)||e.includes(`Load failed`)||e.includes(`NetworkError`)||e.includes(`Network Error`),hce=e=>e===`localhost`||e.endsWith(`.localhost`)||e===`[::1]`||e===`::1`||/^127(\.\d{1,3}){3}$/.test(e),gce=5e3,HT=async(e,t)=>{if(!navigator.onLine)return`offline`;let n=new AbortController,r=setTimeout(()=>n.abort(),gce),i=()=>n.abort();t?.addEventListener(`abort`,i,{once:!0});try{return await fetch(e,{mode:`no-cors`,cache:`no-store`,signal:n.signal}),`corsBlocked`}catch{if(location.protocol===`https:`&&e.startsWith(`http:`))try{return hce(new URL(e).hostname)?`mixedContentOrUnreachable`:`mixedContent`}catch{return`mixedContent`}return`unreachable`}finally{clearTimeout(r),t?.removeEventListener(`abort`,i)}},UT=async(e,t,n)=>{let r=Jb.global.t;switch(e.kind){case`unauthorized`:return r(`diagnosisUnauthorized`);case`http`:return`${e.message} — ${r(`diagnosisBadEndpoint`)}`;case`timeout`:return r(`diagnosisTimeout`);default:return r(VT[await HT(t,n)])}},_ce=async(e,t,n)=>{if(!mce(e))return e;let r=await HT(t,n);return Jb.global.t(VT[r])},vce={key:0,class:`bg-base-200/80 fixed inset-0 z-[100000] flex items-center justify-center overflow-auto p-4 backdrop-blur-sm`},yce={class:`border-base-border bg-base-100 flex w-96 max-w-full flex-col gap-3 rounded-xl border px-6 py-5 shadow-lg`},bce={class:`flex items-start gap-3`},xce={class:`bg-error/10 text-error flex h-10 w-10 flex-none items-center justify-center rounded-lg`},Sce={class:`min-w-0 flex-1`},Cce={class:`text-base font-medium`},wce={class:`text-base-content/60 truncate text-sm`},Tce={key:0,class:`text-base-content/40 truncate text-xs`},Ece={class:`bg-error/10 text-error rounded-lg px-3 py-2 text-xs leading-5 break-all`},Dce={class:`flex gap-2`},Oce=[`disabled`],kce={key:0,class:`loading loading-spinner loading-xs`},Ace={class:`divider my-0 text-xs`},jce={class:`-mr-2 flex max-h-48 flex-col gap-1 overflow-y-auto pr-2`},Mce=[`onClick`],Nce={class:`min-w-0 flex-1 truncate text-sm`},Pce=[`disabled`],Fce={key:0,class:`loading loading-spinner loading-sm`},Ice=8e3,Lce=V({__name:`BackendConnectionError`,setup(e){let t=I(!1),n=I(``),r=Y(()=>RC.value?.uuid===Sg.value?RC.value:void 0),i=Y(()=>r.value?.status===`probing`),a=I(!1);B(()=>r.value?.status,e=>{e===`failed`&&(a.value=!0),(e===`connected`||e===void 0)&&(a.value=!1)},{immediate:!0});let o=tT(),s=Y(()=>a.value&&Tg.value===null&&o.name!==Up.setup),c=Y(()=>Cg.value?Om(Cg.value):``),l=Y(()=>Cg.value?Dm(Cg.value):``),u=Y(()=>xg.value.filter(e=>e.uuid!==Sg.value));B(r,async e=>{if(!e||e.status===`connected`){n.value=``;return}if(e.status!==`failed`)return;let t=e.uuid,r=await _ce(e.message,l.value);Sg.value===t&&(n.value=r)},{immediate:!0});let d=()=>GC(),f=()=>{Sg.value&&Eg({mode:`edit`,uuid:Sg.value})},p=async()=>{if(!t.value){t.value=!0;try{let e=await Promise.any(u.value.map(async e=>{if(!(await BT(e,Ice)).ok)throw Error(e.uuid);return e})).catch(()=>null);e?wg(e.uuid):rx({content:`noReachableBackend`,type:`alert-error`})}finally{t.value=!1}}};return(e,r)=>(H(),W(mu,{name:`connection-error`},{default:z(()=>[s.value&&L(Cg)?(H(),U(`div`,vce,[G(`div`,yce,[G(`div`,bce,[G(`span`,xce,[J(L(qf),{class:`h-5 w-5`})]),G(`div`,Sce,[G(`h1`,Cce,F(e.$t(`backendUnreachable`)),1),G(`div`,wce,F(c.value),1),l.value===c.value?K(``,!0):(H(),U(`div`,Tce,F(l.value),1))])]),G(`div`,Ece,F(n.value||e.$t(`backendConnectionFailed`)),1),G(`div`,Dce,[G(`button`,{class:`btn btn-primary btn-sm flex-1`,disabled:i.value,onClick:d},[i.value?(H(),U(`span`,kce)):K(``,!0),_o(` `+F(i.value?e.$t(`backendConnecting`):e.$t(`retry`)),1)],8,Oce),G(`button`,{class:`btn btn-sm flex-1`,onClick:f},F(e.$t(`editBackendTitle`)),1)]),u.value.length?(H(),U(q,{key:0},[G(`div`,Ace,F(e.$t(`switchToAnotherBackend`)),1),G(`div`,jce,[(H(!0),U(q,null,Ui(u.value,e=>(H(),U(`button`,{key:e.uuid,class:`hover:bg-base-200 flex items-center gap-2 rounded-lg px-2 py-1.5 text-left transition-colors`,onClick:t=>L(wg)(e.uuid)},[J(L(_p),{class:`text-base-content/40 h-4 w-4 flex-none`}),G(`span`,Nce,F(L(Om)(e)),1),J(L(zf),{class:`text-base-content/30 h-4 w-4 flex-none`})],8,Mce))),128))]),G(`button`,{class:`btn btn-ghost btn-sm`,disabled:t.value,onClick:p},[t.value?(H(),U(`span`,Fce)):K(``,!0),_o(` `+F(e.$t(`autoSwitchBackend`)),1)],8,Pce)],64)):K(``,!0),G(`button`,{class:`btn btn-ghost btn-sm`,onClick:r[0]||=e=>L(Eg)()},F(e.$t(`manageBackends`)),1)])])):K(``,!0)]),_:1}))}}),WT=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},Rce=WT(Lce,[[`__scopeId`,`data-v-b201b620`]]),GT=`bottom`,KT=`right`,qT=`left`,zce=`auto`,JT=[`top`,GT,KT,qT],YT=`start`,Bce=`clippingParents`,Vce=`viewport`,XT=`popper`,Hce=`reference`,ZT=JT.reduce(function(e,t){return e.concat([t+`-`+YT,t+`-end`])},[]),QT=[].concat(JT,[zce]).reduce(function(e,t){return e.concat([t,t+`-`+YT,t+`-end`])},[]),Uce=[`beforeRead`,`read`,`afterRead`,`beforeMain`,`main`,`afterMain`,`beforeWrite`,`write`,`afterWrite`];function $T(e){return e?(e.nodeName||``).toLowerCase():null}function eE(e){if(e==null)return window;if(e.toString()!==`[object Window]`){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function tE(e){return e instanceof eE(e).Element||e instanceof Element}function nE(e){return e instanceof eE(e).HTMLElement||e instanceof HTMLElement}function rE(e){return typeof ShadowRoot>`u`?!1:e instanceof eE(e).ShadowRoot||e instanceof ShadowRoot}function Wce(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];!nE(i)||!$T(i)||(Object.assign(i.style,n),Object.keys(r).forEach(function(e){var t=r[e];t===!1?i.removeAttribute(e):i.setAttribute(e,t===!0?``:t)}))})}function Gce(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(e){var r=t.elements[e],i=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce(function(e,t){return e[t]=``,e},{});!nE(r)||!$T(r)||(Object.assign(r.style,a),Object.keys(i).forEach(function(e){r.removeAttribute(e)}))})}}var iE={name:`applyStyles`,enabled:!0,phase:`write`,fn:Wce,effect:Gce,requires:[`computeStyles`]};function aE(e){return e.split(`-`)[0]}var oE=Math.max,sE=Math.min,cE=Math.round;function lE(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+`/`+e.version}).join(` `):navigator.userAgent}function uE(){return!/^((?!chrome|android).)*safari/i.test(lE())}function dE(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,a=1;t&&nE(e)&&(i=e.offsetWidth>0&&cE(r.width)/e.offsetWidth||1,a=e.offsetHeight>0&&cE(r.height)/e.offsetHeight||1);var o=(tE(e)?eE(e):window).visualViewport,s=!uE()&&n,c=(r.left+(s&&o?o.offsetLeft:0))/i,l=(r.top+(s&&o?o.offsetTop:0))/a,u=r.width/i,d=r.height/a;return{width:u,height:d,top:l,right:c+u,bottom:l+d,left:c,x:c,y:l}}function fE(e){var t=dE(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 pE(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&rE(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function mE(e){return eE(e).getComputedStyle(e)}function Kce(e){return[`table`,`td`,`th`].indexOf($T(e))>=0}function hE(e){return((tE(e)?e.ownerDocument:e.document)||window.document).documentElement}function gE(e){return $T(e)===`html`?e:e.assignedSlot||e.parentNode||(rE(e)?e.host:null)||hE(e)}function _E(e){return!nE(e)||mE(e).position===`fixed`?null:e.offsetParent}function qce(e){var t=/firefox/i.test(lE());if(/Trident/i.test(lE())&&nE(e)&&mE(e).position===`fixed`)return null;var n=gE(e);for(rE(n)&&(n=n.host);nE(n)&&[`html`,`body`].indexOf($T(n))<0;){var r=mE(n);if(r.transform!==`none`||r.perspective!==`none`||r.contain===`paint`||[`transform`,`perspective`].indexOf(r.willChange)!==-1||t&&r.willChange===`filter`||t&&r.filter&&r.filter!==`none`)return n;n=n.parentNode}return null}function vE(e){for(var t=eE(e),n=_E(e);n&&Kce(n)&&mE(n).position===`static`;)n=_E(n);return n&&($T(n)===`html`||$T(n)===`body`&&mE(n).position===`static`)?t:n||qce(e)||t}function yE(e){return[`top`,`bottom`].indexOf(e)>=0?`x`:`y`}function bE(e,t,n){return oE(e,sE(t,n))}function Jce(e,t,n){var r=bE(e,t,n);return r>n?n:r}function xE(){return{top:0,right:0,bottom:0,left:0}}function SE(e){return Object.assign({},xE(),e)}function CE(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}var Yce=function(e,t){return e=typeof e==`function`?e(Object.assign({},t.rects,{placement:t.placement})):e,SE(typeof e==`number`?CE(e,JT):e)};function Xce(e){var t,n=e.state,r=e.name,i=e.options,a=n.elements.arrow,o=n.modifiersData.popperOffsets,s=aE(n.placement),c=yE(s),l=[`left`,`right`].indexOf(s)>=0?`height`:`width`;if(!(!a||!o)){var u=Yce(i.padding,n),d=fE(a),f=c===`y`?`top`:qT,p=c===`y`?GT:KT,m=n.rects.reference[l]+n.rects.reference[c]-o[c]-n.rects.popper[l],h=o[c]-n.rects.reference[c],g=vE(a),_=g?c===`y`?g.clientHeight||0:g.clientWidth||0:0,v=m/2-h/2,y=u[f],b=_-d[l]-u[p],x=_/2-d[l]/2+v,S=bE(y,x,b),C=c;n.modifiersData[r]=(t={},t[C]=S,t.centerOffset=S-x,t)}}function Zce(e){var t=e.state,n=e.options.element,r=n===void 0?`[data-popper-arrow]`:n;r!=null&&(typeof r==`string`&&(r=t.elements.popper.querySelector(r),!r)||pE(t.elements.popper,r)&&(t.elements.arrow=r))}var Qce={name:`arrow`,enabled:!0,phase:`main`,fn:Xce,effect:Zce,requires:[`popperOffsets`],requiresIfExists:[`preventOverflow`]};function wE(e){return e.split(`-`)[1]}var $ce={top:`auto`,right:`auto`,bottom:`auto`,left:`auto`};function ele(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:cE(n*i)/i||0,y:cE(r*i)/i||0}}function TE(e){var t,n=e.popper,r=e.popperRect,i=e.placement,a=e.variation,o=e.offsets,s=e.position,c=e.gpuAcceleration,l=e.adaptive,u=e.roundOffsets,d=e.isFixed,f=o.x,p=f===void 0?0:f,m=o.y,h=m===void 0?0:m,g=typeof u==`function`?u({x:p,y:h}):{x:p,y:h};p=g.x,h=g.y;var _=o.hasOwnProperty(`x`),v=o.hasOwnProperty(`y`),y=qT,b=`top`,x=window;if(l){var S=vE(n),C=`clientHeight`,w=`clientWidth`;if(S===eE(n)&&(S=hE(n),mE(S).position!==`static`&&s===`absolute`&&(C=`scrollHeight`,w=`scrollWidth`)),S=S,i===`top`||(i===`left`||i===`right`)&&a===`end`){b=GT;var T=d&&S===x&&x.visualViewport?x.visualViewport.height:S[C];h-=T-r.height,h*=c?1:-1}if(i===`left`||(i===`top`||i===`bottom`)&&a===`end`){y=KT;var E=d&&S===x&&x.visualViewport?x.visualViewport.width:S[w];p-=E-r.width,p*=c?1:-1}}var D=Object.assign({position:s},l&&$ce),O=u===!0?ele({x:p,y:h},eE(n)):{x:p,y:h};if(p=O.x,h=O.y,c){var k;return Object.assign({},D,(k={},k[b]=v?`0`:``,k[y]=_?`0`:``,k.transform=(x.devicePixelRatio||1)<=1?`translate(`+p+`px, `+h+`px)`:`translate3d(`+p+`px, `+h+`px, 0)`,k))}return Object.assign({},D,(t={},t[b]=v?h+`px`:``,t[y]=_?p+`px`:``,t.transform=``,t))}function tle(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0||r,a=n.adaptive,o=a===void 0||a,s=n.roundOffsets,c=s===void 0||s,l={placement:aE(t.placement),variation:wE(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy===`fixed`};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,TE(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,TE(Object.assign({},l,{offsets:t.modifiersData.arrow,position:`absolute`,adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var nle={name:`computeStyles`,enabled:!0,phase:`beforeWrite`,fn:tle,data:{}},EE={passive:!0};function rle(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,a=i===void 0||i,o=r.resize,s=o===void 0||o,c=eE(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&l.forEach(function(e){e.addEventListener(`scroll`,n.update,EE)}),s&&c.addEventListener(`resize`,n.update,EE),function(){a&&l.forEach(function(e){e.removeEventListener(`scroll`,n.update,EE)}),s&&c.removeEventListener(`resize`,n.update,EE)}}var ile={name:`eventListeners`,enabled:!0,phase:`write`,fn:function(){},effect:rle,data:{}},ale={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function DE(e){return e.replace(/left|right|bottom|top/g,function(e){return ale[e]})}var ole={start:`end`,end:`start`};function OE(e){return e.replace(/start|end/g,function(e){return ole[e]})}function kE(e){var t=eE(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function AE(e){return dE(hE(e)).left+kE(e).scrollLeft}function sle(e,t){var n=eE(e),r=hE(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;var l=uE();(l||!l&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}return{width:a,height:o,x:s+AE(e),y:c}}function cle(e){var t=hE(e),n=kE(e),r=e.ownerDocument?.body,i=oE(t.scrollWidth,t.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=oE(t.scrollHeight,t.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),o=-n.scrollLeft+AE(e),s=-n.scrollTop;return mE(r||t).direction===`rtl`&&(o+=oE(t.clientWidth,r?r.clientWidth:0)-i),{width:i,height:a,x:o,y:s}}function jE(e){var t=mE(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function ME(e){return[`html`,`body`,`#document`].indexOf($T(e))>=0?e.ownerDocument.body:nE(e)&&jE(e)?e:ME(gE(e))}function NE(e,t){t===void 0&&(t=[]);var n=ME(e),r=n===e.ownerDocument?.body,i=eE(n),a=r?[i].concat(i.visualViewport||[],jE(n)?n:[]):n,o=t.concat(a);return r?o:o.concat(NE(gE(a)))}function PE(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function lle(e,t){var n=dE(e,!1,t===`fixed`);return n.top+=e.clientTop,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 FE(e,t,n){return t===`viewport`?PE(sle(e,n)):tE(t)?lle(t,n):PE(cle(hE(e)))}function ule(e){var t=NE(gE(e)),n=[`absolute`,`fixed`].indexOf(mE(e).position)>=0&&nE(e)?vE(e):e;return tE(n)?t.filter(function(e){return tE(e)&&pE(e,n)&&$T(e)!==`body`}):[]}function dle(e,t,n,r){var i=t===`clippingParents`?ule(e):[].concat(t),a=[].concat(i,[n]),o=a[0],s=a.reduce(function(t,n){var i=FE(e,n,r);return t.top=oE(i.top,t.top),t.right=sE(i.right,t.right),t.bottom=sE(i.bottom,t.bottom),t.left=oE(i.left,t.left),t},FE(e,o,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function IE(e){var t=e.reference,n=e.element,r=e.placement,i=r?aE(r):null,a=r?wE(r):null,o=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,c;switch(i){case`top`:c={x:o,y:t.y-n.height};break;case GT:c={x:o,y:t.y+t.height};break;case KT:c={x:t.x+t.width,y:s};break;case qT:c={x:t.x-n.width,y:s};break;default:c={x:t.x,y:t.y}}var l=i?yE(i):null;if(l!=null){var u=l===`y`?`height`:`width`;switch(a){case YT:c[l]=c[l]-(t[u]/2-n[u]/2);break;case`end`:c[l]=c[l]+(t[u]/2-n[u]/2);break;default:}}return c}function LE(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,a=n.strategy,o=a===void 0?e.strategy:a,s=n.boundary,c=s===void 0?Bce:s,l=n.rootBoundary,u=l===void 0?Vce:l,d=n.elementContext,f=d===void 0?XT:d,p=n.altBoundary,m=p!==void 0&&p,h=n.padding,g=h===void 0?0:h,_=SE(typeof g==`number`?CE(g,JT):g),v=f===`popper`?Hce:XT,y=e.rects.popper,b=e.elements[m?v:f],x=dle(tE(b)?b:b.contextElement||hE(e.elements.popper),c,u,o),S=dE(e.elements.reference),C=IE({reference:S,element:y,strategy:`absolute`,placement:i}),w=PE(Object.assign({},y,C)),T=f===`popper`?w:S,E={top:x.top-T.top+_.top,bottom:T.bottom-x.bottom+_.bottom,left:x.left-T.left+_.left,right:T.right-x.right+_.right},D=e.modifiersData.offset;if(f===`popper`&&D){var O=D[i];Object.keys(E).forEach(function(e){var t=[`right`,`bottom`].indexOf(e)>=0?1:-1,n=[`top`,`bottom`].indexOf(e)>=0?`y`:`x`;E[e]+=O[n]*t})}return E}function fle(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,a=n.rootBoundary,o=n.padding,s=n.flipVariations,c=n.allowedAutoPlacements,l=c===void 0?QT:c,u=wE(r),d=u?s?ZT:ZT.filter(function(e){return wE(e)===u}):JT,f=d.filter(function(e){return l.indexOf(e)>=0});f.length===0&&(f=d);var p=f.reduce(function(t,n){return t[n]=LE(e,{placement:n,boundary:i,rootBoundary:a,padding:o})[aE(n)],t},{});return Object.keys(p).sort(function(e,t){return p[e]-p[t]})}function ple(e){if(aE(e)===`auto`)return[];var t=DE(e);return[OE(e),t,OE(t)]}function mle(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,a=i===void 0||i,o=n.altAxis,s=o===void 0||o,c=n.fallbackPlacements,l=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,m=p===void 0||p,h=n.allowedAutoPlacements,g=t.options.placement,_=aE(g)===g,v=c||(_||!m?[DE(g)]:ple(g)),y=[g].concat(v).reduce(function(e,n){return e.concat(aE(n)===`auto`?fle(t,{placement:n,boundary:u,rootBoundary:d,padding:l,flipVariations:m,allowedAutoPlacements:h}):n)},[]),b=t.rects.reference,x=t.rects.popper,S=new Map,C=!0,w=y[0],T=0;T=0,A=k?`width`:`height`,j=LE(t,{placement:E,boundary:u,rootBoundary:d,altBoundary:f,padding:l}),M=k?O?KT:qT:O?GT:`top`;b[A]>x[A]&&(M=DE(M));var ee=DE(M),te=[];if(a&&te.push(j[D]<=0),s&&te.push(j[M]<=0,j[ee]<=0),te.every(function(e){return e})){w=E,C=!1;break}S.set(E,te)}if(C)for(var ne=m?3:1,N=function(e){var t=y.find(function(t){var n=S.get(t);if(n)return n.slice(0,e).every(function(e){return e})});if(t)return w=t,`break`},re=ne;re>0&&N(re)!==`break`;re--);t.placement!==w&&(t.modifiersData[r]._skip=!0,t.placement=w,t.reset=!0)}}var hle={name:`flip`,enabled:!0,phase:`main`,fn:mle,requiresIfExists:[`offset`],data:{_skip:!1}};function RE(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 zE(e){return[`top`,KT,GT,qT].some(function(t){return e[t]>=0})}function gle(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,a=t.modifiersData.preventOverflow,o=LE(t,{elementContext:`reference`}),s=LE(t,{altBoundary:!0}),c=RE(o,r),l=RE(s,i,a),u=zE(c),d=zE(l);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:l,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}var _le={name:`hide`,enabled:!0,phase:`main`,requiresIfExists:[`preventOverflow`],fn:gle};function vle(e,t,n){var r=aE(e),i=[`left`,`top`].indexOf(r)>=0?-1:1,a=typeof n==`function`?n(Object.assign({},t,{placement:e})):n,o=a[0],s=a[1];return o||=0,s=(s||0)*i,[`left`,`right`].indexOf(r)>=0?{x:s,y:o}:{x:o,y:s}}function yle(e){var t=e.state,n=e.options,r=e.name,i=n.offset,a=i===void 0?[0,0]:i,o=QT.reduce(function(e,n){return e[n]=vle(n,t.rects,a),e},{}),s=o[t.placement],c=s.x,l=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=l),t.modifiersData[r]=o}var ble={name:`offset`,enabled:!0,phase:`main`,requires:[`popperOffsets`],fn:yle};function xle(e){var t=e.state,n=e.name;t.modifiersData[n]=IE({reference:t.rects.reference,element:t.rects.popper,strategy:`absolute`,placement:t.placement})}var Sle={name:`popperOffsets`,enabled:!0,phase:`read`,fn:xle,data:{}};function Cle(e){return e===`x`?`y`:`x`}function wle(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,a=i===void 0||i,o=n.altAxis,s=o!==void 0&&o,c=n.boundary,l=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,p=f===void 0||f,m=n.tetherOffset,h=m===void 0?0:m,g=LE(t,{boundary:c,rootBoundary:l,padding:d,altBoundary:u}),_=aE(t.placement),v=wE(t.placement),y=!v,b=yE(_),x=Cle(b),S=t.modifiersData.popperOffsets,C=t.rects.reference,w=t.rects.popper,T=typeof h==`function`?h(Object.assign({},t.rects,{placement:t.placement})):h,E=typeof T==`number`?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),D=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,O={x:0,y:0};if(S){if(a){var k=b===`y`?`top`:qT,A=b===`y`?GT:KT,j=b===`y`?`height`:`width`,M=S[b],ee=M+g[k],te=M-g[A],ne=p?-w[j]/2:0,N=v===`start`?C[j]:w[j],re=v===`start`?-w[j]:-C[j],ie=t.elements.arrow,ae=p&&ie?fE(ie):{width:0,height:0},oe=t.modifiersData[`arrow#persistent`]?t.modifiersData[`arrow#persistent`].padding:xE(),se=oe[k],P=oe[A],ce=bE(0,C[j],ae[j]),le=y?C[j]/2-ne-ce-se-E.mainAxis:N-ce-se-E.mainAxis,ue=y?-C[j]/2+ne+ce+P+E.mainAxis:re+ce+P+E.mainAxis,de=t.elements.arrow&&vE(t.elements.arrow),fe=de?b===`y`?de.clientTop||0:de.clientLeft||0:0,pe=D?.[b]??0,me=M+le-pe-fe,he=M+ue-pe,ge=bE(p?sE(ee,me):ee,M,p?oE(te,he):te);S[b]=ge,O[b]=ge-M}if(s){var _e=b===`x`?`top`:qT,ve=b===`x`?GT:KT,ye=S[x],be=x===`y`?`height`:`width`,xe=ye+g[_e],Se=ye-g[ve],Ce=[`top`,qT].indexOf(_)!==-1,we=D?.[x]??0,Te=Ce?xe:ye-C[be]-w[be]-we+E.altAxis,Ee=Ce?ye+C[be]+w[be]-we-E.altAxis:Se,De=p&&Ce?Jce(Te,ye,Ee):bE(p?Te:xe,ye,p?Ee:Se);S[x]=De,O[x]=De-ye}t.modifiersData[r]=O}}var Tle={name:`preventOverflow`,enabled:!0,phase:`main`,fn:wle,requiresIfExists:[`offset`]};function Ele(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Dle(e){return e===eE(e)||!nE(e)?kE(e):Ele(e)}function Ole(e){var t=e.getBoundingClientRect(),n=cE(t.width)/e.offsetWidth||1,r=cE(t.height)/e.offsetHeight||1;return n!==1||r!==1}function kle(e,t,n){n===void 0&&(n=!1);var r=nE(t),i=nE(t)&&Ole(t),a=hE(t),o=dE(e,i,n),s={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&(($T(t)!==`body`||jE(a))&&(s=Dle(t)),nE(t)?(c=dE(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):a&&(c.x=AE(a))),{x:o.left+s.scrollLeft-c.x,y:o.top+s.scrollTop-c.y,width:o.width,height:o.height}}function Ale(e){var t=new Map,n=new Set,r=[];e.forEach(function(e){t.set(e.name,e)});function i(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!n.has(e)){var r=t.get(e);r&&i(r)}}),r.push(e)}return e.forEach(function(e){n.has(e.name)||i(e)}),r}function jle(e){var t=Ale(e);return Uce.reduce(function(e,n){return e.concat(t.filter(function(e){return e.phase===n}))},[])}function Mle(e){var t;return function(){return t||=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})}),t}}function Nle(e){var t=e.reduce(function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e},{});return Object.keys(t).map(function(e){return t[e]})}var BE={placement:`bottom`,modifiers:[],strategy:`absolute`};function VE(){return![...arguments].some(function(e){return!(e&&typeof e.getBoundingClientRect==`function`)})}function Ple(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,a=i===void 0?BE:i;return function(e,t,n){n===void 0&&(n=a);var i={placement:`bottom`,orderedModifiers:[],options:Object.assign({},BE,a),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},o=[],s=!1,c={state:i,setOptions:function(n){var o=typeof n==`function`?n(i.options):n;u(),i.options=Object.assign({},a,i.options,o),i.scrollParents={reference:tE(e)?NE(e):e.contextElement?NE(e.contextElement):[],popper:NE(t)};var s=jle(Nle([].concat(r,i.options.modifiers)));return i.orderedModifiers=s.filter(function(e){return e.enabled}),l(),c.update()},forceUpdate:function(){if(!s){var e=i.elements,t=e.reference,n=e.popper;if(VE(t,n)){i.rects={reference:kle(t,vE(n),i.options.strategy===`fixed`),popper:fE(n)},i.reset=!1,i.placement=i.options.placement,i.orderedModifiers.forEach(function(e){return i.modifiersData[e.name]=Object.assign({},e.data)});for(var r=0;r-1}function YE(e,t){return typeof e==`function`?e.apply(void 0,t):e}function XE(e,t){if(t===0)return e;var n;return function(r){clearTimeout(n),n=setTimeout(function(){e(r)},t)}}function Rle(e){return e.split(/\s+/).filter(Boolean)}function ZE(e){return[].concat(e)}function QE(e,t){e.indexOf(t)===-1&&e.push(t)}function zle(e){return e.filter(function(t,n){return e.indexOf(t)===n})}function Ble(e){return e.split(`-`)[0]}function $E(e){return[].slice.call(e)}function eD(e){return Object.keys(e).reduce(function(t,n){return e[n]!==void 0&&(t[n]=e[n]),t},{})}function tD(){return document.createElement(`div`)}function nD(e){return[`Element`,`Fragment`].some(function(t){return JE(e,t)})}function Vle(e){return JE(e,`NodeList`)}function Hle(e){return JE(e,`MouseEvent`)}function Ule(e){return!!(e&&e._tippy&&e._tippy.reference===e)}function Wle(e){return nD(e)?[e]:Vle(e)?$E(e):Array.isArray(e)?e:$E(document.querySelectorAll(e))}function rD(e,t){e.forEach(function(e){e&&(e.style.transitionDuration=t+`ms`)})}function iD(e,t){e.forEach(function(e){e&&e.setAttribute(`data-state`,t)})}function Gle(e){var t,n=ZE(e)[0];return n!=null&&(t=n.ownerDocument)!=null&&t.body?n.ownerDocument:document}function Kle(e,t){var n=t.clientX,r=t.clientY;return e.every(function(e){var t=e.popperRect,i=e.popperState,a=e.props.interactiveBorder,o=Ble(i.placement),s=i.modifiersData.offset;if(!s)return!0;var c=o===`bottom`?s.top.y:0,l=o===`top`?s.bottom.y:0,u=o===`right`?s.left.x:0,d=o===`left`?s.right.x:0,f=t.top-r+c>a,p=r-t.bottom-l>a,m=t.left-n+u>a,h=n-t.right-d>a;return f||p||m||h})}function aD(e,t,n){var r=t+`EventListener`;[`transitionend`,`webkitTransitionEnd`].forEach(function(t){e[r](t,n)})}function oD(e,t){for(var n=t;n;){if(e.contains(n))return!0;n=n.getRootNode==null?void 0:n.getRootNode()?.host}return!1}var sD={isTouch:!1},cD=0;function qle(){sD.isTouch||(sD.isTouch=!0,window.performance&&document.addEventListener(`mousemove`,lD))}function lD(){var e=performance.now();e-cD<20&&(sD.isTouch=!1,document.removeEventListener(`mousemove`,lD)),cD=e}function Jle(){var e=document.activeElement;if(Ule(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}function Yle(){document.addEventListener(`touchstart`,qle,GE),window.addEventListener(`blur`,Jle)}var Xle=typeof window<`u`&&typeof document<`u`&&!!window.msCrypto,uD=Object.assign({appendTo:KE,aria:{content:`auto`,expanded:`auto`},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:``,offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:`top`,plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:`mouseenter focus`,triggerTarget:null},{animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},{allowHTML:!1,animation:`fade`,arrow:!0,content:``,inertia:!1,maxWidth:350,role:`tooltip`,theme:``,zIndex:9999}),Zle=Object.keys(uD),Qle=function(e){Object.keys(e).forEach(function(t){uD[t]=e[t]})};function dD(e){var t=(e.plugins||[]).reduce(function(t,n){var r=n.name,i=n.defaultValue;return r&&(t[r]=e[r]===void 0?uD[r]??i:e[r]),t},{});return Object.assign({},e,t)}function $le(e,t){return(t?Object.keys(dD(Object.assign({},uD,{plugins:t}))):Zle).reduce(function(t,n){var r=(e.getAttribute(`data-tippy-`+n)||``).trim();if(!r)return t;if(n===`content`)t[n]=r;else try{t[n]=JSON.parse(r)}catch{t[n]=r}return t},{})}function fD(e,t){var n=Object.assign({},t,{content:YE(t.content,[e])},t.ignoreAttributes?{}:$le(e,t.plugins));return n.aria=Object.assign({},uD.aria,n.aria),n.aria={expanded:n.aria.expanded===`auto`?t.interactive:n.aria.expanded,content:n.aria.content===`auto`?t.interactive?null:`describedby`:n.aria.content},n}var eue=function(){return`innerHTML`};function pD(e,t){e[eue()]=t}function mD(e){var t=tD();return e===!0?t.className=UE:(t.className=WE,nD(e)?t.appendChild(e):pD(t,e)),t}function hD(e,t){nD(t.content)?(pD(e,``),e.appendChild(t.content)):typeof t.content!=`function`&&(t.allowHTML?pD(e,t.content):e.textContent=t.content)}function gD(e){var t=e.firstElementChild,n=$E(t.children);return{box:t,content:n.find(function(e){return e.classList.contains(HE)}),arrow:n.find(function(e){return e.classList.contains(UE)||e.classList.contains(WE)}),backdrop:n.find(function(e){return e.classList.contains(Lle)})}}function _D(e){var t=tD(),n=tD();n.className=Ile,n.setAttribute(`data-state`,`hidden`),n.setAttribute(`tabindex`,`-1`);var r=tD();r.className=HE,r.setAttribute(`data-state`,`hidden`),hD(r,e.props),t.appendChild(n),n.appendChild(r),i(e.props,e.props);function i(n,r){var i=gD(t),a=i.box,o=i.content,s=i.arrow;r.theme?a.setAttribute(`data-theme`,r.theme):a.removeAttribute(`data-theme`),typeof r.animation==`string`?a.setAttribute(`data-animation`,r.animation):a.removeAttribute(`data-animation`),r.inertia?a.setAttribute(`data-inertia`,``):a.removeAttribute(`data-inertia`),a.style.maxWidth=typeof r.maxWidth==`number`?r.maxWidth+`px`:r.maxWidth,r.role?a.setAttribute(`role`,r.role):a.removeAttribute(`role`),(n.content!==r.content||n.allowHTML!==r.allowHTML)&&hD(o,e.props),r.arrow?s?n.arrow!==r.arrow&&(a.removeChild(s),a.appendChild(mD(r.arrow))):a.appendChild(mD(r.arrow)):s&&a.removeChild(s)}return{popper:t,onUpdate:i}}_D.$$tippy=!0;var tue=1,vD=[],yD=[];function nue(e,t){var n=fD(e,Object.assign({},uD,dD(eD(t)))),r,i,a,o=!1,s=!1,c=!1,l=!1,u,d,f,p=[],m=XE(me,n.interactiveDebounce),h,g=tue++,_=null,v=zle(n.plugins),y={id:g,reference:e,popper:tD(),popperInstance:_,props:n,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:v,clearDelayTimeouts:Ee,setProps:De,setContent:Oe,show:ke,hide:Ae,hideWithInteractivity:je,enable:we,disable:Te,unmount:Me,destroy:Ne};if(!n.render)return y;var b=n.render(y),x=b.popper,S=b.onUpdate;x.setAttribute(`data-tippy-root`,``),x.id=`tippy-`+y.id,y.popper=x,e._tippy=y,x._tippy=y;var C=v.map(function(e){return e.fn(y)}),w=e.hasAttribute(`aria-expanded`);return de(),ne(),M(),ee(`onCreate`,[y]),n.showOnCreate&&Se(),x.addEventListener(`mouseenter`,function(){y.props.interactive&&y.state.isVisible&&y.clearDelayTimeouts()}),x.addEventListener(`mouseleave`,function(){y.props.interactive&&y.props.trigger.indexOf(`mouseenter`)>=0&&k().addEventListener(`mousemove`,m)}),y;function T(){var e=y.props.touch;return Array.isArray(e)?e:[e,0]}function E(){return T()[0]===`hold`}function D(){var e;return!!((e=y.props.render)!=null&&e.$$tippy)}function O(){return h||e}function k(){var e=O().parentNode;return e?Gle(e):document}function A(){return gD(x)}function j(e){return y.state.isMounted&&!y.state.isVisible||sD.isTouch||u&&u.type===`focus`?0:qE(y.props.delay,+!e,uD.delay)}function M(e){e===void 0&&(e=!1),x.style.pointerEvents=y.props.interactive&&!e?``:`none`,x.style.zIndex=``+y.props.zIndex}function ee(e,t,n){if(n===void 0&&(n=!0),C.forEach(function(n){n[e]&&n[e].apply(n,t)}),n){var r;(r=y.props)[e].apply(r,t)}}function te(){var t=y.props.aria;if(t.content){var n=`aria-`+t.content,r=x.id;ZE(y.props.triggerTarget||e).forEach(function(e){var t=e.getAttribute(n);if(y.state.isVisible)e.setAttribute(n,t?t+` `+r:r);else{var i=t&&t.replace(r,``).trim();i?e.setAttribute(n,i):e.removeAttribute(n)}})}}function ne(){w||!y.props.aria.expanded||ZE(y.props.triggerTarget||e).forEach(function(e){y.props.interactive?e.setAttribute(`aria-expanded`,y.state.isVisible&&e===O()?`true`:`false`):e.removeAttribute(`aria-expanded`)})}function N(){k().removeEventListener(`mousemove`,m),vD=vD.filter(function(e){return e!==m})}function re(t){if(!(sD.isTouch&&(c||t.type===`mousedown`))){var n=t.composedPath&&t.composedPath()[0]||t.target;if(!(y.props.interactive&&oD(x,n))){if(ZE(y.props.triggerTarget||e).some(function(e){return oD(e,n)})){if(sD.isTouch||y.state.isVisible&&y.props.trigger.indexOf(`click`)>=0)return}else ee(`onClickOutside`,[y,t]);y.props.hideOnClick===!0&&(y.clearDelayTimeouts(),y.hide(),s=!0,setTimeout(function(){s=!1}),y.state.isMounted||se())}}}function ie(){c=!0}function ae(){c=!1}function oe(){var e=k();e.addEventListener(`mousedown`,re,!0),e.addEventListener(`touchend`,re,GE),e.addEventListener(`touchstart`,ae,GE),e.addEventListener(`touchmove`,ie,GE)}function se(){var e=k();e.removeEventListener(`mousedown`,re,!0),e.removeEventListener(`touchend`,re,GE),e.removeEventListener(`touchstart`,ae,GE),e.removeEventListener(`touchmove`,ie,GE)}function P(e,t){le(e,function(){!y.state.isVisible&&x.parentNode&&x.parentNode.contains(x)&&t()})}function ce(e,t){le(e,t)}function le(e,t){var n=A().box;function r(e){e.target===n&&(aD(n,`remove`,r),t())}if(e===0)return t();aD(n,`remove`,d),aD(n,`add`,r),d=r}function ue(t,n,r){r===void 0&&(r=!1),ZE(y.props.triggerTarget||e).forEach(function(e){e.addEventListener(t,n,r),p.push({node:e,eventType:t,handler:n,options:r})})}function de(){E()&&(ue(`touchstart`,pe,{passive:!0}),ue(`touchend`,he,{passive:!0})),Rle(y.props.trigger).forEach(function(e){if(e!==`manual`)switch(ue(e,pe),e){case`mouseenter`:ue(`mouseleave`,he);break;case`focus`:ue(Xle?`focusout`:`blur`,ge);break;case`focusin`:ue(`focusout`,ge);break}})}function fe(){p.forEach(function(e){var t=e.node,n=e.eventType,r=e.handler,i=e.options;t.removeEventListener(n,r,i)}),p=[]}function pe(e){var t=!1;if(!(!y.state.isEnabled||_e(e)||s)){var n=u?.type===`focus`;u=e,h=e.currentTarget,ne(),!y.state.isVisible&&Hle(e)&&vD.forEach(function(t){return t(e)}),e.type===`click`&&(y.props.trigger.indexOf(`mouseenter`)<0||o)&&y.props.hideOnClick!==!1&&y.state.isVisible?t=!0:Se(e),e.type===`click`&&(o=!t),t&&!n&&Ce(e)}}function me(e){var t=e.target,r=O().contains(t)||x.contains(t);e.type===`mousemove`&&r||Kle(xe().concat(x).map(function(e){var t=e._tippy.popperInstance?.state;return t?{popperRect:e.getBoundingClientRect(),popperState:t,props:n}:null}).filter(Boolean),e)&&(N(),Ce(e))}function he(e){if(!(_e(e)||y.props.trigger.indexOf(`click`)>=0&&o)){if(y.props.interactive){y.hideWithInteractivity(e);return}Ce(e)}}function ge(e){y.props.trigger.indexOf(`focusin`)<0&&e.target!==O()||y.props.interactive&&e.relatedTarget&&x.contains(e.relatedTarget)||Ce(e)}function _e(e){return sD.isTouch?E()!==e.type.indexOf(`touch`)>=0:!1}function ve(){ye();var t=y.props,n=t.popperOptions,r=t.placement,i=t.offset,a=t.getReferenceClientRect,o=t.moveTransition,s=D()?gD(x).arrow:null,c=a?{getBoundingClientRect:a,contextElement:a.contextElement||O()}:e,l=[{name:`offset`,options:{offset:i}},{name:`preventOverflow`,options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:`flip`,options:{padding:5}},{name:`computeStyles`,options:{adaptive:!o}},{name:`$$tippy`,enabled:!0,phase:`beforeWrite`,requires:[`computeStyles`],fn:function(e){var t=e.state;if(D()){var n=A().box;[`placement`,`reference-hidden`,`escaped`].forEach(function(e){e===`placement`?n.setAttribute(`data-placement`,t.placement):t.attributes.popper[`data-popper-`+e]?n.setAttribute(`data-`+e,``):n.removeAttribute(`data-`+e)}),t.attributes.popper={}}}}];D()&&s&&l.push({name:`arrow`,options:{element:s,padding:3}}),l.push.apply(l,n?.modifiers||[]),y.popperInstance=Fle(c,x,Object.assign({},n,{placement:r,onFirstUpdate:f,modifiers:l}))}function ye(){y.popperInstance&&=(y.popperInstance.destroy(),null)}function be(){var e=y.props.appendTo,t,n=O();t=y.props.interactive&&e===KE||e===`parent`?n.parentNode:YE(e,[n]),t.contains(x)||t.appendChild(x),y.state.isMounted=!0,ve()}function xe(){return $E(x.querySelectorAll(`[data-tippy-root]`))}function Se(e){y.clearDelayTimeouts(),e&&ee(`onTrigger`,[y,e]),oe();var t=j(!0),n=T(),i=n[0],a=n[1];sD.isTouch&&i===`hold`&&a&&(t=a),t?r=setTimeout(function(){y.show()},t):y.show()}function Ce(e){if(y.clearDelayTimeouts(),ee(`onUntrigger`,[y,e]),!y.state.isVisible){se();return}if(!(y.props.trigger.indexOf(`mouseenter`)>=0&&y.props.trigger.indexOf(`click`)>=0&&[`mouseleave`,`mousemove`].indexOf(e.type)>=0&&o)){var t=j(!1);t?i=setTimeout(function(){y.state.isVisible&&y.hide()},t):a=requestAnimationFrame(function(){y.hide()})}}function we(){y.state.isEnabled=!0}function Te(){y.hide(),y.state.isEnabled=!1}function Ee(){clearTimeout(r),clearTimeout(i),cancelAnimationFrame(a)}function De(t){if(!y.state.isDestroyed){ee(`onBeforeUpdate`,[y,t]),fe();var n=y.props,r=fD(e,Object.assign({},n,eD(t),{ignoreAttributes:!0}));y.props=r,de(),n.interactiveDebounce!==r.interactiveDebounce&&(N(),m=XE(me,r.interactiveDebounce)),n.triggerTarget&&!r.triggerTarget?ZE(n.triggerTarget).forEach(function(e){e.removeAttribute(`aria-expanded`)}):r.triggerTarget&&e.removeAttribute(`aria-expanded`),ne(),M(),S&&S(n,r),y.popperInstance&&(ve(),xe().forEach(function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)})),ee(`onAfterUpdate`,[y,t])}}function Oe(e){y.setProps({content:e})}function ke(){var e=y.state.isVisible,t=y.state.isDestroyed,n=!y.state.isEnabled,r=sD.isTouch&&!y.props.touch,i=qE(y.props.duration,0,uD.duration);if(!(e||t||n||r)&&!O().hasAttribute(`disabled`)&&(ee(`onShow`,[y],!1),y.props.onShow(y)!==!1)){if(y.state.isVisible=!0,D()&&(x.style.visibility=`visible`),M(),oe(),y.state.isMounted||(x.style.transition=`none`),D()){var a=A(),o=a.box,s=a.content;rD([o,s],0)}f=function(){var e;if(!(!y.state.isVisible||l)){if(l=!0,x.offsetHeight,x.style.transition=y.props.moveTransition,D()&&y.props.animation){var t=A(),n=t.box,r=t.content;rD([n,r],i),iD([n,r],`visible`)}te(),ne(),QE(yD,y),(e=y.popperInstance)==null||e.forceUpdate(),ee(`onMount`,[y]),y.props.animation&&D()&&ce(i,function(){y.state.isShown=!0,ee(`onShown`,[y])})}},be()}}function Ae(){var e=!y.state.isVisible,t=y.state.isDestroyed,n=!y.state.isEnabled,r=qE(y.props.duration,1,uD.duration);if(!(e||t||n)&&(ee(`onHide`,[y],!1),y.props.onHide(y)!==!1)){if(y.state.isVisible=!1,y.state.isShown=!1,l=!1,o=!1,D()&&(x.style.visibility=`hidden`),N(),se(),M(!0),D()){var i=A(),a=i.box,s=i.content;y.props.animation&&(rD([a,s],r),iD([a,s],`hidden`))}te(),ne(),y.props.animation?D()&&P(r,y.unmount):y.unmount()}}function je(e){k().addEventListener(`mousemove`,m),QE(vD,m),m(e)}function Me(){y.state.isVisible&&y.hide(),y.state.isMounted&&(ye(),xe().forEach(function(e){e._tippy.unmount()}),x.parentNode&&x.parentNode.removeChild(x),yD=yD.filter(function(e){return e!==y}),y.state.isMounted=!1,ee(`onHidden`,[y]))}function Ne(){y.state.isDestroyed||(y.clearDelayTimeouts(),y.unmount(),fe(),delete e._tippy,y.state.isDestroyed=!0,ee(`onDestroy`,[y]))}}function bD(e,t){t===void 0&&(t={});var n=uD.plugins.concat(t.plugins||[]);Yle();var r=Object.assign({},t,{plugins:n}),i=Wle(e).reduce(function(e,t){var n=t&&nue(t,r);return n&&e.push(n),e},[]);return nD(e)?i[0]:i}bD.defaultProps=uD,bD.setDefaultProps=Qle,bD.currentInput=sD,Object.assign({},iE,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:`0`,top:`0`,margin:`0`},arrow:{position:`absolute`},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}}),bD.setDefaultProps({render:_D}),bD([]);var xD,SD=null,CD=null,wD=()=>(xD||=document.getElementById(`app-content`),{showTip:(e,t,n={})=>{CD!==e.currentTarget&&(SD?.destroy(),SD=bD(e.currentTarget,{content:t,placement:`top`,animation:`scale`,appendTo:xD,allowHTML:!0,showOnCreate:!0,onHidden:()=>{SD?.destroy(),SD=null,CD=null},popperOptions:{modifiers:[{name:`preventOverflow`,options:{boundary:`clippingParents`,padding:8}},{name:`flip`,options:{fallbackPlacements:[`top`,`bottom`,`right`,`left`]}}]},...n}),CD=e.currentTarget)},hideTip:()=>{SD?.hide()},updateTip:e=>{SD?.setContent(e)}}),{showTip:rue}=wD(),TD=e=>{let t=e.target,{scrollWidth:n,clientWidth:r}=t;n>r&&rue(e,t.innerText,{delay:[700,0],trigger:`mouseenter`,touch:[`hold`,500]})},iue={class:`flex items-center gap-1 overflow-hidden`},aue=[`src`],ED=V({__name:`BackendVersion`,setup(e){return(e,t)=>(H(),U(`div`,iue,[G(`img`,{src:L(zC).logo,class:`h-4 w-4 rounded-xs`},null,8,aue),G(`span`,{class:`text-base-content/60 truncate`,onMouseenter:t[0]||=(...e)=>L(TD)&&L(TD)(...e)},F(L(PC)),33)]))}}),oue={key:0,class:`pointer-events-none fixed inset-x-0 top-0 z-[100001] flex justify-end pt-[calc(0.75rem+env(safe-area-inset-top,0px))] pr-[calc(0.75rem+env(safe-area-inset-right,0px))] pl-3`},sue={key:0,class:`bg-base-100/95 border-base-border pointer-events-auto flex w-full items-center gap-2 rounded-full border py-2 pr-2 pl-3 shadow-lg backdrop-blur`},cue={key:0,class:`loading loading-spinner loading-xs text-primary flex-none`},lue={class:`min-w-0 flex-1 truncate text-sm font-medium`},uue={key:2,class:`text-base-content/50 flex-none text-xs`},due={key:1,class:`bg-base-100/95 border-base-border pointer-events-auto flex w-full max-w-sm gap-3 rounded-xl border p-3 shadow-lg backdrop-blur`},fue={class:`flex min-w-0 flex-1 flex-col gap-1`},pue={class:`flex items-center gap-2`},mue={class:`text-base-content/50 flex-1 truncate text-xs`},hue={class:`truncate text-sm font-medium`},gue={key:0,class:`text-base-content/50 truncate text-xs`},_ue={class:`mt-1 flex items-center gap-2 text-xs`},vue={class:`text-base-content/70`},yue={class:`text-success`},bue={class:`text-base-content/50`},xue=2500,Sue=WT(V({__name:`BackendSwitchToast`,setup(e){let t=I(!1),n=-1,r=()=>{clearTimeout(n),t.value=!1};B(Sg,e=>{clearTimeout(n),t.value=!!e});let i=Y(()=>RC.value?.uuid===Sg.value?RC.value:void 0),a=Y(()=>i.value?.status??`probing`),o=Y(()=>i.value?.latency??0),s=Y(()=>Cg.value?Om(Cg.value):``),c=Y(()=>Cg.value?Dm(Cg.value):``);return B(a,e=>{t.value&&(clearTimeout(n),e===`connected`?n=setTimeout(r,xue):e===`failed`&&r())}),(e,n)=>(H(),W(mu,{name:`backend-switch`},{default:z(()=>[t.value&&L(Cg)?(H(),U(`div`,oue,[L(ym)?(H(),U(`div`,sue,[a.value===`probing`?(H(),U(`span`,cue)):(H(),W(L(Ff),{key:1,class:`text-success h-4 w-4 flex-none`})),G(`span`,lue,F(s.value),1),G(`span`,{class:b([`flex-none text-xs`,a.value===`connected`?`text-success`:`text-base-content/70`])},F(a.value===`connected`?e.$t(`backendReachable`):e.$t(`backendConnecting`)),3),a.value===`connected`?(H(),U(`span`,uue,F(o.value)+` ms `,1)):K(``,!0),G(`button`,{class:`btn btn-circle btn-ghost btn-xs flex-none`,onClick:r},[J(L(bp),{class:`h-3.5 w-3.5`})])])):(H(),U(`div`,due,[G(`div`,{class:b([`w-1 flex-none rounded-full transition-colors`,a.value===`connected`?`bg-success`:`bg-primary`])},null,2),G(`div`,fue,[G(`div`,pue,[J(L(Of),{class:`text-base-content/50 h-4 w-4 flex-none`}),G(`span`,mue,F(e.$t(`backendSwitched`)),1),G(`button`,{class:`btn btn-circle btn-ghost btn-xs -mt-1 -mr-1`,onClick:r},[J(L(bp),{class:`h-3.5 w-3.5`})])]),G(`div`,hue,F(s.value),1),c.value===s.value?K(``,!0):(H(),U(`div`,gue,F(c.value),1)),G(`div`,_ue,[a.value===`probing`?(H(),U(q,{key:0},[n[0]||=G(`span`,{class:`loading loading-spinner loading-xs text-primary flex-none`},null,-1),G(`span`,vue,F(e.$t(`backendConnecting`)),1)],64)):(H(),U(q,{key:1},[J(L(Ff),{class:`text-success h-4 w-4 flex-none`}),G(`span`,yue,F(e.$t(`backendReachable`)),1),G(`span`,bue,F(o.value)+` ms`,1),L(PC)?(H(),W(ED,{key:0,class:`ml-auto min-w-0 text-xs`})):K(``,!0)],64))])])]))])):K(``,!0)]),_:1}))}}),[[`__scopeId`,`data-v-1110788d`]]),Cue={class:`flex flex-none items-center gap-1.5`},wue={key:0,class:`loading loading-spinner loading-xs opacity-50`},Tue={key:2,class:`text-base-content/50 text-xs tabular-nums`},DD=V({__name:`BackendStatusDot`,props:{status:{},latency:{default:0},showLatency:{type:Boolean,default:!0}},setup(e){let t=e,n=Y(()=>{switch(t.status){case`online`:return`bg-backend-online`;case`offline`:return`bg-error`;default:return`bg-base-content/25`}});return(t,r)=>(H(),U(`span`,Cue,[e.status===`checking`?(H(),U(`span`,wue)):(H(),U(`span`,{key:1,class:b([`h-2 w-2 rounded-full`,n.value])},null,2)),e.showLatency&&e.status===`online`&&e.latency?(H(),U(`span`,Tue,F(e.latency)+` ms `,1)):K(``,!0)]))}}),OD=I(0),kD=I(0),AD=(e,t)=>{let n=!1,r=()=>{n||(n=!0,e.value++)},i=()=>{n&&(n=!1,e.value--)};B(t,e=>e?r():i(),{immediate:!0}),Ws(i)},Eue=e=>{AD(OD,e),AD(kD,e)},Due=e=>{AD(kD,e)},Oue=[`aria-labelledby`],kue=[`onKeydown`],Aue={key:0,id:`dialog-title`,class:`border-base-content/10 relative shrink-0 border-b px-4 py-2 text-base font-bold`},jue=`(width < 48rem)`,Mue=10,jD=1.2,Nue=48,Pue=.5,Fue=`transform 0.35s cubic-bezier(0.32, 0.72, 0, 1)`,Iue=450,MD=WT(V({__name:`DialogWrapper`,props:oa({noPadding:{type:Boolean},boxClass:{},title:{}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:oa([`enter`],[`update:modelValue`]),setup(e,{emit:t}){let n=wa(e,`modelValue`),r=t,i=I(void 0),a=I(`idle`),o=I(0),s=I(!1),c=0,l=0,u=0,d=0,f,p=Y(()=>{let e=i.value?.offsetHeight||1;return Math.min(o.value/e,1)}),m=Y(()=>{if(!(a.value!==`dragging`&&a.value!==`settling`&&a.value!==`dismissing`))return{transform:`translate3d(0, ${o.value}px, 0)`,transition:s.value?Fue:`none`,willChange:`transform`}}),h=Y(()=>{if(!(a.value!==`dragging`&&a.value!==`settling`&&a.value!==`dismissing`))return{opacity:1-p.value,transition:s.value?`opacity 0.25s ease-out`:`none`}});Eue(n);let g=I(!!n.value),v=()=>{g.value=!1,k()};B(n,e=>{e?(g.value=!0,k(),requestAnimationFrame(()=>{i.value?.focus()})):a.value!==`dismissing`&&k()});function y(e){let t=i.value,n=e instanceof Element?e:null;for(;n&&n!==t;){if(n instanceof HTMLElement){let{overflowY:e}=getComputedStyle(n);if((e===`auto`||e===`scroll`)&&n.scrollHeight>n.clientHeight&&n.scrollTop>0)return!1}n=n.parentElement}return!0}function x(e){if(a.value===`dragging`){D();return}if(a.value===`settling`&&k(),a.value!==`idle`)return;if(!n.value||!window.matchMedia(jue).matches||e.touches.length!==1){a.value=`rejected`;return}let t=e.touches[0];c=t.clientX,l=t.clientY,d=l,u=performance.now(),a.value=y(e.target)?`pending`:`rejected`}function S(e){if(a.value!==`pending`&&a.value!==`dragging`)return;if(e.touches.length!==1){E();return}let t=e.touches[0],n=t.clientX-c,r=t.clientY-l;if(d=t.clientY,a.value===`pending`){if(Math.max(Math.abs(n),Math.abs(r))0&&r>=Math.abs(n)*jD)a.value=`dragging`;else if(r<0||Math.abs(n)>=Math.abs(r)*jD){a.value=`rejected`;return}else return}a.value===`dragging`&&(e.preventDefault(),o.value=Math.max(r,0))}function C(){let e=i.value?.offsetHeight||0;return Math.min(120,Math.max(72,e*.2))}function w(){return window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function T(e){if(a.value===`settling`||a.value===`dismissing`)return;if(a.value!==`dragging`){k();return}let t=e.changedTouches[0];t&&(d=t.clientY);let n=Math.max(d-l,0),r=Math.max(performance.now()-u,1),c=n>=Nue&&n/r>=Pue;if(n>=C()||c){if(w()){k(),A();return}a.value=`dismissing`,s.value=!0,o.value=i.value?.offsetHeight||window.innerHeight,A();return}D()}function E(){a.value===`dragging`?D():k()}function D(){if(w()||o.value===0){k();return}a.value=`settling`,s.value=!0,o.value=0,f=setTimeout(k,Iue)}function O(e){e.propertyName===`transform`&&a.value===`settling`&&k()}function k(){clearTimeout(f),f=void 0,a.value=`idle`,o.value=0,s.value=!1,c=0,l=0,u=0,d=0}function A(){n.value=!1}function j(){r(`enter`)}return(t,r)=>(H(),W(fs,{to:`#app-content`},[J(mu,{name:`modal`,duration:350,onAfterLeave:v},{default:z(()=>[Wr(G(`div`,{ref:`backdropRef`,class:b([`modal`,{"modal-open":g.value}]),role:`dialog`,"aria-modal":`true`,"aria-labelledby":e.title?`dialog-title`:void 0,onKeydown:nd(A,[`escape`])},[G(`div`,{class:`modal-backdrop w-screen`,"aria-hidden":`true`,style:_(h.value),onClick:A},null,4),G(`div`,{ref_key:`modalBoxRef`,ref:i,class:b([`modal-box bg-base-100 relative flex flex-col overflow-hidden p-0 outline-none max-md:max-h-[85dvh] max-md:min-h-[40dvh]`,[L(rh)<5&&`backdrop-blur-sm!`,e.boxClass]]),style:_(m.value),tabindex:`-1`,onClick:r[0]||=ed(()=>{},[`stop`]),onKeydown:nd(ed(j,[`self`]),[`enter`]),onTouchstart:x,onTouchmove:S,onTouchend:T,onTouchcancel:E,onTransitionend:ed(O,[`self`])},[e.title&&n.value?(H(),U(`div`,Aue,[_o(F(e.title)+` `,1),Gi(t.$slots,`title-right`,{},void 0,!0),G(`button`,{type:`button`,class:`btn btn-circle btn-ghost btn-xs absolute top-2 right-2`,"aria-label":`close`,onClick:A},[J(L(bp),{class:`h-4 w-4`})])])):K(``,!0),n.value?(H(),U(`div`,{key:1,class:b([`min-h-0 overflow-y-auto max-md:flex-1 md:max-h-[90dvh]`,e.noPadding?`p-0 max-md:pb-[env(safe-area-inset-bottom)]`:`p-4 max-md:pb-[calc(1rem+env(safe-area-inset-bottom))]`])},[Gi(t.$slots,`default`,{},void 0,!0)],2)):K(``,!0)],46,kue)],42,Oue),[[bu,n.value]])]),_:3})]))}}),[[`__scopeId`,`data-v-42b15ed8`]]),Lue={key:0,class:`loading loading-spinner loading-xs mt-0.5 flex-none`},Rue={class:`min-w-0 flex-1`},zue={class:`text-base-content/50`},ND=V({__name:`ReachabilityIndicator`,props:{status:{},latency:{},message:{}},emits:[`retry`],setup(e){let t=e,n=Y(()=>{switch(t.status){case`online`:return`text-success`;case`offline`:return`text-error`;default:return`text-base-content/60`}});return(t,r)=>e.status===`idle`?K(``,!0):(H(),U(`div`,{key:0,class:b([`flex items-start gap-2 text-xs leading-5`,n.value])},[e.status===`checking`?(H(),U(`span`,Lue)):e.status===`online`?(H(),W(L(Ff),{key:1,class:`mt-px h-4 w-4 flex-none`})):(H(),W(L(qf),{key:2,class:`mt-px h-4 w-4 flex-none`})),G(`span`,Rue,[e.status===`checking`?(H(),U(q,{key:0},[_o(F(t.$t(`checking`)),1)],64)):e.status===`online`?(H(),U(q,{key:1},[_o(F(t.$t(`backendReachable`))+` `,1),G(`span`,zue,`· `+F(e.latency)+` ms`,1)],64)):(H(),U(q,{key:2},[_o(F(e.message||t.$t(`backendUnreachable`)),1)],64))]),e.status===`offline`?(H(),U(`button`,{key:3,class:`btn btn-ghost btn-xs flex-none`,onClick:r[0]||=e=>t.$emit(`retry`)},F(t.$t(`retry`)),1)):K(``,!0)],2))}}),Bue=8e3,PD=e=>{let t=I({}),n=null,r=0,i=()=>{n?.abort(),n=null},a=()=>{i();let e=++r;n=new AbortController;let a=n.signal,o=xg.value;t.value=Object.fromEntries(o.map(e=>[e.uuid,{status:`checking`,latency:0}])),o.forEach(async n=>{let i=await BT(n,Bue,a);e===r&&(t.value[n.uuid]=i.ok?{status:`online`,latency:i.latency}:{status:`offline`,latency:0})})};return B(e,e=>{e?a():(i(),r++)},{immediate:!0}),St(i),{stateOf:Y(()=>e=>{let n=RC.value;return n?.uuid===e?n.status===`connected`?{status:`online`,latency:n.latency}:n.status===`failed`?{status:`offline`,latency:0}:{status:`checking`,latency:0}:t.value[e]??{status:`idle`,latency:0}}),refresh:a}},Vue=400,Hue=8e3,FD=e=>{let t=I(`idle`),n=I(0),r=I(``),i=Y(()=>{let t=e.value;return!t?.protocol||!t.host||!t.port?null:t}),a=Y(()=>{let e=i.value;return e?[e.type,e.protocol,e.host,e.port,e.secondaryPath||``,e.password||``].join(`|`):``}),o=null,s=-1,c=0,l=()=>{clearTimeout(s),o?.abort(),o=null},u=async()=>{let e=i.value;if(!e)return;let a=++c;o=new AbortController;let s=o.signal,l=await BT({uuid:``,...e},Hue,s);if(a!==c)return;if(l.ok){t.value=`online`,n.value=l.latency,r.value=``;return}let u=await UT(l,Dm(e),s);a===c&&(t.value=`offline`,n.value=0,r.value=u)},d=(e=!1)=>{if(l(),!i.value){c++,t.value=`idle`,n.value=0,r.value=``;return}t.value=`checking`,r.value=``,s=setTimeout(u,e?0:Vue)};return B(a,()=>d(),{immediate:!1}),d(!0),St(l),{status:t,latency:n,message:r,retry:()=>d(!0)}},ID=e=>e.name===Up.settings&&e.query.section?1:0,LD=I(``),RD=I(``),Uue=Y(()=>ym.value?LD.value:`page`),Wue=Y(()=>ym.value?void 0:`out-in`),Gue=(e,t)=>{let n=hC.value,r=n.findIndex(t=>t===e.name),i=n.findIndex(e=>e===t.name);if(r===-1||i===-1)return``;let a=n.length-1;return r===0&&i===a?`slide-left`:r===a&&i===0||r{if(e.name!==t.name){LD.value=Gue(e,t),RD.value=``;return}let n=ym.value?ID(e)-ID(t):0;LD.value=``,RD.value=n>0?`push`:n<0?`pop`:``},zD=I([]),BD=I(new Set),que=Y(()=>BD.value),VD=Y(()=>zD.value.some(e=>BD.value.has(e))),Jue=Y(()=>zD.value.length>0),Yue=e=>{let t=new Set(BD.value);t.has(e)?t.delete(e):t.add(e),BD.value=t},Xue=()=>{BD.value=VD.value?new Set:new Set(zD.value)},Zue=()=>{BD.value=new Set},Que=e=>{zD.value=e;let t=new Set(e),n=[...BD.value].filter(e=>t.has(e));n.length!==BD.value.size&&(BD.value=new Set(n))},HD=e=>{let t=e.trim();if(!t)return null;let n=t.split(/\s+/).filter(Boolean),r=[];for(let e of n)try{r.push(new RegExp(e,`i`))}catch{return null}return r.length?r:null},UD=e=>{let t=HD(e);return t?{test:e=>t.every(t=>t.test(e)),testAny:e=>t.every(t=>e.some(e=>t.test(e)))}:null},$ue=(e,t)=>{let n=HD(t);if(!n||!e)return[{text:e,matched:!1}];let r=[];if(n.forEach(t=>{let n=t.flags.includes(`g`)?t.flags:`${t.flags}g`,i=new RegExp(t.source,n),a;for(;a=i.exec(e);){let e=a.index,t=e+a[0].length;t>e&&r.push([e,t]),a[0].length===0&&(i.lastIndex+=1)}}),!r.length)return[{text:e,matched:!1}];r.sort((e,t)=>e[0]-t[0]||e[1]-t[1]);let i=r.reduce((e,t)=>{let n=e.at(-1);return!n||t[0]>n[1]?e.push([...t]):n[1]=Math.max(n[1],t[1]),e},[]),a=[],o=0;return i.forEach(([t,n])=>{t>o&&a.push({text:e.slice(o,t),matched:!1}),a.push({text:e.slice(t,n),matched:!0}),o=n}),oKD.value===zp.DESC),tde={[Rp.HOST]:Noe,[Rp.RULE]:dC,[Rp.CHAINS]:Roe,[Rp.DOWNLOAD]:cC,[Rp.DOWNLOAD_SPEED]:e=>e.downloadSpeed,[Rp.UPLOAD]:lC,[Rp.UPLOAD_SPEED]:e=>e.uploadSpeed,[Rp.SOURCE_IP]:fC,[Rp.TYPE]:Ioe,[Rp.CONNECT_TIME]:e=>{let t=uC(e);if(typeof t==`number`)return t;let n=Date.parse(t);return Number.isNaN(n)?0:n},[Rp.INBOUND_USER]:Loe},$D=Y(()=>{switch(WD.value){case Vp.ACTIVE:return pS.value;case Vp.CLOSED:return mS.value;default:return mS.value.concat(pS.value)}}),nde=Y(()=>new Set(mS.value.map(e=>e.id))),eO=e=>nde.value.has(e.id),tO=e=>{let t=UD(XD.value),n=YD.value?UD(JD.value):null,r=QD.value,i=!!(t||n),a={mode:Xh.value?`card`:`table`,proxyChainDirection:Zh.value,showFullProxyChain:Qh.value},o=Xh.value?ng.value.flat():tg.value,s=ZD.value?Ep:o;return e.filter(e=>{if(r!==null&&r.every(t=>t!==fC(e)))return!1;if(!i)return!0;let o=n?ES(e,Ep,a):null;return o&&n?.testAny(o)?!1:!t||t.testAny(s===Ep&&o?o:ES(e,s,a))})},rde=Y(()=>tO(pS.value)),nO=Y(()=>{let e=tO($D.value),t=tde[Xh.value?GD.value:Rp.HOST],n=Xh.value&&ede.value,r=e.map(e=>[t(e),e.id,e]);return r.sort((e,t)=>{let r=n?t:e,i=n?e:t,a=r[0],o=i[0],s=0;return s=typeof a==`number`?a-o:a.localeCompare(o),s===0&&(s=r[1].localeCompare(i[1])),s}),r.map(e=>e[2])}),rO=I(0),iO=I(0),aO=(e={offsetTop:8,offsetBottom:8})=>{let{offsetTop:t,offsetBottom:n}=e,r=Y(()=>ym.value?rO.value+t:0),i=Y(()=>ym.value?iO.value+n:0);return{padding:Y(()=>ym.value?{paddingTop:`${r.value}px`,paddingBottom:`${i.value}px`}:{}),paddingTop:r,paddingBottom:i}};function ide(e,t,n){let r=Array(e);return new Proxy(r,{get(r,i,a){if(typeof i==`string`){let a=i.charCodeAt(0);if(a>=48&&a<=57){let a=+i;if(Number.isInteger(a)&&a>=0&&ar[t]!==e)?(r=o,i=t(...o),n?.onChange&&!(a&&n.skipInitialOnChange)&&n.onChange(i),a=!1,i):i}return o.updateDeps=e=>{r=e},o}function sO(e,t){if(e===void 0)throw Error(`Unexpected undefined${t?`: ${t}`:``}`);return e}var ade=(e,t)=>Math.abs(e-t)<1.01,ode=(e,t,n)=>{let r;return function(...i){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,i),n)}},cO,lO=()=>{if(cO!==void 0)return cO;if(typeof navigator>`u`)return cO=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return cO=!0;let e=navigator.maxTouchPoints;return cO=navigator.platform===`MacIntel`&&e!==void 0&&e>0},uO=e=>{let{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},sde=e=>e,cde=e=>{let t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1)-t+1,r=Array(n);for(let e=0;e{let n=e.scrollElement;if(!n)return;let r=e.targetWindow;if(!r)return;let i=e=>{let{width:n,height:r}=e;t({width:Math.round(n),height:Math.round(r)})};if(i(uO(n)),!r.ResizeObserver)return()=>{};let a=new r.ResizeObserver(t=>{let r=()=>{let e=t[0];if(e?.borderBoxSize){let t=e.borderBoxSize[0];if(t){i({width:t.inlineSize,height:t.blockSize});return}}i(uO(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()});return a.observe(n,{box:`border-box`}),()=>{a.unobserve(n)}},dO={passive:!0},ude=typeof window>`u`||`onscrollend`in window,dde=(e,t,n)=>{let r=e.scrollElement;if(!r)return;let i=e.targetWindow;if(!i)return;let a=e.options.useScrollendEvent&&ude,o=0,s=a?null:ode(i,()=>t(o,!1),e.options.isScrollingResetDelay),c=e=>()=>{o=n(r),s?.(),t(o,e)},l=c(!0),u=c(!1);return r.addEventListener(`scroll`,l,dO),a&&r.addEventListener(`scrollend`,u,dO),()=>{r.removeEventListener(`scroll`,l),a&&r.removeEventListener(`scrollend`,u)}},fde=(e,t)=>dde(e,t,t=>{let{horizontal:n,isRtl:r}=e.options;return n?t.scrollLeft*(r&&-1||1):t.scrollTop}),pde=(e,t,n)=>{if(n.options.useCachedMeasurements){let t=n.indexFromElement(e),r=n.options.getItemKey(t);return n.itemSizeCache.get(r)??n.options.estimateSize(t)}if(t?.borderBoxSize){let e=t.borderBoxSize[0];if(e)return Math.round(e[n.options.horizontal?`inlineSize`:`blockSize`])}if(!t){let t=n.indexFromElement(e),r=n.options.getItemKey(t),i=n.itemSizeCache.get(r);if(i!==void 0)return i}return e[n.options.horizontal?`offsetWidth`:`offsetHeight`]},mde=(e,{adjustments:t=0,behavior:n},r)=>{var i,a;(a=(i=r.scrollElement)?.scrollTo)==null||a.call(i,{[r.options.horizontal?`left`:`top`]:e+t,behavior:n})},hde=class{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._flatMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this.elementsCache=new Map,this.now=()=>{var e;return((e=this.targetWindow?.performance)?.now)?.call(e)??Date.now()},this.observer=(()=>{let e=null,t=()=>e||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:e=new this.targetWindow.ResizeObserver(e=>{e.forEach(e=>{let t=()=>{let t=e.target,n=this.indexFromElement(t);if(!t.isConnected){this.observer.unobserve(t);for(let[e,n]of this.elementsCache)if(n===t){this.elementsCache.delete(e);break}return}this.shouldMeasureDuringScroll(n)&&this.resizeItem(n,this.options.measureElement(t,e,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(t):t()})}));return{disconnect:()=>{var n;(n=t())==null||n.disconnect(),e=null},observe:e=>t()?.observe(e,{box:`border-box`}),unobserve:e=>t()?.unobserve(e)}})(),this.range=null,this.setOptions=e=>{let t={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:sde,rangeExtractor:cde,onChange:()=>{},measureElement:pde,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:`data-index`,initialMeasurementsCache:[],lanes:1,anchorTo:`start`,followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:`estimate`,useCachedMeasurements:!1};for(let n in e){let r=e[n];r!==void 0&&(t[n]=r)}let n=this.options,r=null,i=null,a=!1;if(n!==void 0&&n.enabled&&t.enabled&&t.anchorTo===`end`&&this.scrollElement!==null){let e=n.count,o=t.count,s=this.getMeasurements(),c=e>0?s[0]?.key??n.getItemKey(0):null,l=e>0?s[e-1]?.key??n.getItemKey(e-1):null;if(o!==e||e>0&&o>0&&(t.getItemKey(0)!==c||t.getItemKey(o-1)!==l)){a=!0;let c=e>0?this.getVirtualItemForOffset(this.getScrollOffset())??s[0]:null;c&&(r=[c.key,this.getScrollOffset()-c.start]);let u=t.followOnAppend===!0?`auto`:t.followOnAppend||null;u&&o>e&&this.isAtEnd(n.scrollEndThreshold)&&(e===0||t.getItemKey(o-1)!==l)&&(i=u)}}this.options=t,a&&(this.pendingMin=0,this.itemSizeCacheVersion++);let o=!1,s=0;if(r&&this.scrollOffset!==null){let[e,t]=r,n=this.getMeasurements(),{count:i,getItemKey:a}=this.options,c=0;for(;c{var t,n;(n=(t=this.options).onChange)==null||n.call(t,this,e)},this.maybeNotify=oO(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{let e=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==e){if(this.cleanup(),!e){this.maybeNotify();return}if(this.scrollElement=e,this.scrollElement&&`ownerDocument`in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=this.scrollElement?.window??null,this.elementsCache.forEach(e=>{this.observer.observe(e)}),this.unsubs.push(this.options.observeElementRect(this,e=>{this.scrollRect=e,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(e,t)=>{if(t&&this._intendedScrollOffset===null&&e===this.scrollOffset)return;this._intendedScrollOffset!==null&&Math.abs(e-this._intendedScrollOffset)<1.5&&(e=this._intendedScrollOffset),this._intendedScrollOffset=null,this.scrollAdjustments=0;let n=this.getScrollOffset();this.scrollDirection=t?n===e?this.scrollDirection:n{this._iosTouching=!0,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},n=()=>{this._iosTouching=!1,!(!lO()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};e.addEventListener(`touchstart`,t,dO),e.addEventListener(`touchend`,n,dO),this.unsubs.push(()=>{e.removeEventListener(`touchstart`,t),e.removeEventListener(`touchend`,n),this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}let t=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,t&&this.scrollElement&&this.options.enabled){let[e,n,r,i]=t;e!==null&&!r&&(lO()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?i!==0&&(this._iosDeferredAdjustment+=i):this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),r&&this.scrollToEnd({behavior:r})}},this._flushIosDeferredIfReady=()=>{if(this._iosDeferredAdjustment===0||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;let e=this.getScrollOffset(),t=this.getMaxScrollOffset();if(e<0||e>t)return;if(this._iosDeferredAdjustment<0&&e>=t-1){this._iosDeferredAdjustment=0;return}let n=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(e,{adjustments:this.scrollAdjustments+=n,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?`width`:`height`]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset==`function`?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getMeasurementOptions=oO(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode,this.options.gap],(e,t,n,r,i,a,o,s)=>(this.prevLanes!==void 0&&this.prevLanes!==a&&(this.lanesChangedFlag=!0),this.prevLanes=a,this.pendingMin=null,{count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a,laneAssignmentMode:o,gap:s}),{key:!1}),this.getMeasurements=oO(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a,laneAssignmentMode:o,gap:s},c)=>{let l=this.itemSizeCache;if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>e)for(let t of this.laneAssignments.keys())t>=e&&this.laneAssignments.delete(t);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));let u=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1),a===1){let i=e*2,a=this._flatMeasurements;if(!a||a.length0&&e.set(a.subarray(0,u*2)),a=e,this._flatMeasurements=a}let o;if(u===0)o=t+n;else{let e=u-1;o=a[e*2]+a[e*2+1]+s}for(let t=u;t1){u=c;let e=f[u],r=e===void 0?void 0:d[e];h=r?r.end+s:t+n}else if(m===a){let e=0,t=p[0],n=f[0];for(let r=1;rthis.options.debug}),this.calculateRange=oO(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,n,r)=>e.length===0||t===0?(this.range=null,null):(this.range=_de(e,t,n,r,r===1&&this._flatMeasurements!=null?this._flatMeasurements:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=oO(()=>{let e=null,t=null,n=this.calculateRange();return n&&(e=n.startIndex,t=n.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]},(e,t,n,r,i)=>r===null||i===null?[]:e({startIndex:r,endIndex:i,overscan:t,count:n}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{let t=this.options.indexAttribute,n=e.getAttribute(t);return n?parseInt(n,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=e=>{if(!this.scrollState||this.scrollState.behavior!==`smooth`)return!0;let t=this.scrollState.index??this.getVirtualItemForOffset(this.scrollState.lastTargetOffset)?.index;if(t!==void 0&&this.range){let n=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),r=Math.max(0,t-n),i=Math.min(this.options.count-1,t+n);return e>=r&&e<=i}return!0},this.measureElement=e=>{if(!e){this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))});return}let t=this.indexFromElement(e),n=this.options.getItemKey(t),r=this.elementsCache.get(n);r!==e&&(r&&this.observer.unobserve(r),this.observer.observe(e),this.elementsCache.set(n,e)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(t)&&this.resizeItem(t,this.options.measureElement(e,void 0,this))},this.resizeItem=(e,t)=>{if(e<0||e>=this.options.count)return;let n,r,i,a=this._flatMeasurements;if(this.options.lanes===1&&a!==null)i=this.options.getItemKey(e),r=a[e*2],n=a[e*2+1];else{let t=this.measurementsCache[e];if(!t)return;i=t.key,r=t.start,n=t.size}let o=this.itemSizeCache.get(i)??n,s=t-o;if(s!==0){let a=this.options.anchorTo===`end`&&this.scrollState?.behavior!==`smooth`&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,c=a?this.getTotalSize():0,l=this.getScrollOffset()+this.scrollAdjustments,u=this.itemSizeCache.has(i)?r+o<=l&&this.scrollDirection!==`backward`:r[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{let n=[];for(let r=0,i=e.length;rthis.options.debug}),this.getVirtualItemForOffset=e=>{let t=this.getMeasurements();if(t.length===0)return;let n=this._flatMeasurements,r=this.options.lanes===1&&n!=null;return sO(t[fO(0,t.length-1,r?e=>n[e*2]:e=>sO(t[e]).start,e)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if(`scrollHeight`in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{let e=this.scrollElement.document.documentElement;return this.options.horizontal?e.scrollWidth-this.scrollElement.innerWidth:e.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(e=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=e,this.getOffsetForAlignment=(e,t,n=0)=>{if(!this.scrollElement)return 0;let r=this.getSize(),i=this.getScrollOffset();t===`auto`&&(t=e>=i+r?`end`:`start`),t===`center`?e+=(n-r)/2:t===`end`&&(e-=r);let a=this.getMaxScrollOffset();return Math.max(Math.min(a,e),0)},this.getOffsetForIndex=(e,t=`auto`)=>{e=Math.max(0,Math.min(e,this.options.count-1));let n=this.getSize(),r=this.getScrollOffset(),i=this.measurementsCache[e];if(!i)return;if(t===`auto`)if(i.end>=r+n-this.options.scrollPaddingEnd)t=`end`;else if(i.start<=r+this.options.scrollPaddingStart)t=`start`;else return[r,t];if(t===`end`&&e===this.options.count-1)return[this.getMaxScrollOffset(),t];let a=t===`end`?i.end+this.options.scrollPaddingEnd:i.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,t,i.size),t]},this.scrollToOffset=(e,{align:t=`start`,behavior:n=`auto`}={})=>{this._iosDeferredAdjustment=0;let r=this.getOffsetForAlignment(e,t),i=this.now();this.scrollState={index:null,align:t,behavior:n,startedAt:i,lastTargetOffset:r,stableFrames:0},this._scrollToOffset(r,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollToIndex=(e,{align:t=`auto`,behavior:n=`auto`}={})=>{this._iosDeferredAdjustment=0,e=Math.max(0,Math.min(e,this.options.count-1));let r=this.getOffsetForIndex(e,t);if(!r)return;let[i,a]=r,o=this.now();this.scrollState={index:e,align:a,behavior:n,startedAt:o,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollBy=(e,{behavior:t=`auto`}={})=>{let n=this.getScrollOffset()+e,r=this.now();this.scrollState={index:null,align:`start`,behavior:t,startedAt:r,lastTargetOffset:n,stableFrames:0},this._scrollToOffset(n,{adjustments:void 0,behavior:t}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:e=`auto`}={})=>{if(this.options.count>0){this.scrollToIndex(this.options.count-1,{align:`end`,behavior:e});return}this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:e})},this.getTotalSize=()=>{let e=this.getMeasurements(),t;if(e.length===0)t=this.options.paddingStart;else if(this.options.lanes===1){let n=e.length-1,r=this._flatMeasurements;t=r==null?e[n]?.end??0:r[n*2]+r[n*2+1]}else{let n=Array(this.options.lanes).fill(null),r=e.length-1;for(;r>=0&&n.some(e=>e===null);){let t=e[r];n[t.lane]===null&&(n[t.lane]=t.end),r--}t=Math.max(...n.filter(e=>e!==null))}return Math.max(t-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{let e=[];if(this.itemSizeCache.size===0)return e;let t=this.getMeasurements();for(let n of t)n&&this.itemSizeCache.has(n.key)&&e.push({index:n.index,key:n.key,start:n.start,size:n.size,end:n.end,lane:n.lane});return e},this._scrollToOffset=(e,{adjustments:t,behavior:n})=>{this._intendedScrollOffset=e+(t??0),this.options.scrollToFn(e,{behavior:n,adjustments:t},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(e)}applyScrollAdjustment(e,t){return e===0?!1:lO()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?(this._iosDeferredAdjustment+=e,!1):(this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=e,behavior:t}),this.scrollOffset!==null&&(this.scrollOffset+=this.scrollAdjustments,this.scrollOffset<0&&(this.scrollOffset=0),this.scrollAdjustments=0),!0)}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId??=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()})}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}let e=this.scrollState.index==null?void 0:this.getOffsetForIndex(this.scrollState.index,this.scrollState.align),t=e?e[0]:this.scrollState.lastTargetOffset,n=t!==this.scrollState.lastTargetOffset;if(!n&&ade(t,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=1){this.getScrollOffset()!==t&&this._scrollToOffset(t,{adjustments:void 0,behavior:`auto`}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,n){let e=this.getSize()||600,n=Math.abs(t-this.getScrollOffset()),r=this.scrollState.behavior===`smooth`&&n>e;this.scrollState.lastTargetOffset=t,r||(this.scrollState.behavior=`auto`),this._scrollToOffset(t,{adjustments:void 0,behavior:r?`smooth`:`auto`})}this.scheduleScrollReconcile()}},fO=(e,t,n,r)=>{for(;e<=t;){let i=(e+t)/2|0,a=n(i);if(ar)t=i-1;else return i}return e>0?e-1:0};function gde(e,t,n){let r=0;for(;r<=t;){let i=(r+t)/2|0,a=e[i*2];if(an)t=i-1;else return i}return r>0?r-1:0}function _de(e,t,n,r,i){let a=e.length-1;if(e.length<=r)return{startIndex:0,endIndex:a};if(r===1&&i!==null){let e=gde(i,a,n),r=e,o=n+t;for(;re[t].start,n),s=o;if(r===1)for(;s1){let i=Array(r).fill(0);for(;se=0&&c.some(e=>e>=n);){let t=e[o];c[t.lane]=t.start,o--}o=Math.max(0,o-o%r),s=Math.min(a,s+(r-1-s%r))}return{startIndex:o,endIndex:s}}function vde(e){let t=new hde(L(e)),n=mn(t),r=t._didMount();return B(()=>L(e).getScrollElement(),e=>{e&&t._willUpdate()},{immediate:!0}),B(()=>L(e),e=>{t.setOptions({...e,onChange:(t,r)=>{var i;gn(n),(i=e.onChange)==null||i.call(e,t,r)}}),t._willUpdate(),gn(n)},{immediate:!0}),St(r),n}function pO(e){return vde(Y(()=>({observeElementRect:lde,observeElementOffset:fde,scrollToFn:mde,...L(e)})))}var yde=[`data-index`],bde={class:`base-container`},mO=V({__name:`VirtualScroller`,props:{data:{default:()=>[]},size:{default:64},overscan:{default:24},contentClass:{default:``},getItemKey:{}},setup(e){let{paddingTop:t,paddingBottom:n}=aO({offsetTop:0,offsetBottom:0}),r=I(null),i=e,a=pO(Y(()=>({count:i.data.length,getScrollElement:()=>r.value,estimateSize:()=>i.size,getItemKey:e=>i.getItemKey?.(i.data[e],e)??e,overscan:i.overscan,paddingStart:t.value,paddingEnd:n.value+24}))),o=Y(()=>a.value.getVirtualItems()),s=Y(()=>a.value.getTotalSize()),c=e=>{e&&Mr(()=>{a.value.measureElement(e)})};return(i,a)=>(H(),U(`div`,{ref_key:`parentRef`,ref:r,class:`flex h-full w-full flex-col overflow-y-auto`},[Gi(i.$slots,`before`),e.data.length>0?(H(),U(`div`,{key:0,style:_({height:`${s.value}px`}),class:`relative w-full shrink-0`},[G(`div`,{class:b([`absolute top-3 right-3 left-3`,e.contentClass]),style:_({transform:`translateY(${o.value[0]?.start??0}px)`})},[(H(!0),U(q,null,Ui(o.value,t=>(H(),U(`div`,{key:t.key.toString(),"data-index":t.index,ref_for:!0,ref:e=>c(e),class:`pb-2`},[G(`div`,bde,[Gi(i.$slots,`default`,{item:e.data[t.index],index:t.index})])],8,yde))),128))],6)],4)):(H(),U(`div`,{key:1,class:`base-container m-3 flex-row p-3 text-sm`,style:_({marginTop:`${L(t)+12}px`,marginBottom:`${L(n)}px`})},F(i.$t(`noData`)),5))],512))}});function hO(e=720){let{width:t}=cf(rf());return{isLargeCtrlsBar:Y(()=>t.value>_n(e))}}var gO=V({__name:`CtrlsBar`,props:{solid:{type:Boolean}},setup(e){let t=I(null),{bottom:n}=sf(t);return B(n,()=>{rO.value=n.value},{immediate:!0}),Ws(()=>{rO.value=0}),(n,r)=>(H(),U(`div`,{class:b([`bg-base-100 fixed top-0 right-0 left-0 z-30 shadow-xs backdrop-blur-xl`,[L(ym)?`fixed`:`sticky`,{"md:bg-base-100/50":!e.solid}]]),ref_key:`ctrlsBarRef`,ref:t},[Gi(n.$slots,`default`)],2))}}),_O=(e,t,n,r={})=>{let{gap:i=4,minimumWidth:a=96,minimumVisibleHeight:o=80,maximumHeight:s=1/0,viewportPadding:c=8}=r,l=I({}),u=!1,d=()=>{let n=e.value;if(!n)return;let r=n.getBoundingClientRect(),u=Math.max(window.innerWidth-c*2,a),d=Math.min(Math.max(r.width,a),u),f=t.value?.getBoundingClientRect().width,p=Math.min(Math.max(f??d,d),u),m=Math.min(Math.max(r.left,c),window.innerWidth-p-c),h=window.innerHeight-r.bottom-i-c,g=r.top-i-c,_=h<160&&g>h,v=Math.min(Math.max(_?g:h,o),s);l.value={left:`${m}px`,width:f?`${p}px`:`max-content`,minWidth:`${d}px`,maxWidth:`${u}px`,maxHeight:`${v}px`,..._?{bottom:`${window.innerHeight-r.top+i}px`,top:void 0}:{top:`${r.bottom+i}px`,bottom:void 0}}},f=()=>{n.value&&(l.value={...l.value,width:`max-content`},Mr(d))},p=()=>{n.value=!1},m=n=>{let r=n.target;r&&(e.value?.contains(r)||t.value?.contains(r)||p())},h=e=>{e.key===`Escape`&&p()},g=e=>{if(e===u)return;u=e;let t=e?window.addEventListener:window.removeEventListener;t(`scroll`,d,!0),t(`resize`,d),t(`pointerdown`,m,!0),t(`keydown`,h)};return B(n,e=>{g(e),e&&(d(),Mr(d))},{flush:`sync`}),Us(()=>g(!1)),{close:p,panelStyle:l,remeasure:f,updatePosition:d}},xde=[`disabled`,`aria-expanded`,`aria-activedescendant`],Sde=[`aria-label`],Cde={key:0,class:`text-base-content/45 px-2 pt-2 pb-1 text-xs font-medium`},wde=[`id`,`aria-selected`,`aria-disabled`,`data-theme`,`onPointermove`,`onClick`],Tde={class:`min-w-0 flex-1 truncate`},vO=V({inheritAttrs:!1,__name:`SelectInput`,props:oa({options:{},placeholder:{default:``},disabled:{type:Boolean,default:!1},panelClass:{default:``},optionClass:{default:``}},{modelValue:{required:!0},modelModifiers:{}}),emits:oa([`change`],[`update:modelValue`]),setup(e,{emit:t}){let n=e,r=t,i=wa(e,`modelValue`),a=na(),o=I(),s=I(),c=I(!1),l=I(!1),u=I(-1),d=`select-listbox-${pi().replace(/[^\w-]/g,``)}`,f=``,p,{panelStyle:m,remeasure:h}=_O(o,s,l),g=()=>{let e={...a};return delete e.class,delete e.style,e},v=()=>a[`aria-label`]?.toString(),y=(e,t)=>Object.is(e,t)||typeof e==`object`&&!!e&&typeof t==`object`&&!!t&&(0,vg.isEqual)(e,t),x=Y(()=>n.options.findIndex(e=>y(e.value,i.value))),S=Y(()=>n.options[x.value]),C=e=>`${d}-option-${e}`,w=e=>y(e.value,i.value),T=()=>n.options.findIndex(e=>!e.disabled),E=()=>{for(let e=n.options.length-1;e>=0;e--)if(!n.options[e].disabled)return e;return-1},D=e=>{if(!n.options.length)return;let t=u.value;for(let r=0;r{n.options[e]?.disabled||(u.value=e)},k=()=>{Mr(()=>{s.value?.querySelector(`#${C(u.value)}`)?.scrollIntoView({block:`nearest`})})},A=()=>{n.disabled||l.value||(u.value=x.value>=0?x.value:T(),l.value=!0,k())},j=()=>{l.value&&(l.value=!1,f=``,p&&clearTimeout(p))},M=()=>l.value?j():A(),ee=e=>{e.disabled||(w(e)||(i.value=e.value,r(`change`,e.value)),j(),o.value?.focus())},te=()=>{let e=n.options[u.value];e&&ee(e)},ne=e=>{f+=e.toLocaleLowerCase(),p&&clearTimeout(p),p=setTimeout(()=>f=``,500);let t=Math.max(u.value,-1);for(let e=1;e<=n.options.length;e++){let r=(t+e)%n.options.length,i=n.options[r];if(!i.disabled&&i.label.toLocaleLowerCase().startsWith(f)){u.value=r,k();return}}},N=e=>{switch(e.key){case`ArrowDown`:e.preventDefault(),l.value?D(1):A();break;case`ArrowUp`:e.preventDefault(),l.value?D(-1):A();break;case`Home`:if(!l.value)return;e.preventDefault(),u.value=T(),k();break;case`End`:if(!l.value)return;e.preventDefault(),u.value=E(),k();break;case`Enter`:case` `:e.preventDefault(),l.value?te():A();break;case`Escape`:if(!l.value)return;e.preventDefault(),j();break;case`Tab`:j();break;default:e.key.length===1&&!e.ctrlKey&&!e.metaKey&&!e.altKey&&(l.value||A(),ne(e.key))}};return B(()=>n.disabled,e=>{e&&j()}),B(l,e=>{e||(f=``,p&&clearTimeout(p))}),B(()=>[i.value,n.options],()=>{l.value&&(u.value=x.value,h())},{deep:!0}),Bs(()=>c.value=!0),Us(()=>{p&&clearTimeout(p)}),(t,n)=>(H(),U(q,null,[G(`button`,So({ref_key:`triggerRef`,ref:o},g(),{type:`button`,role:`combobox`,class:[`select custom-select cursor-pointer text-left`,L(a).class],style:L(a).style,disabled:e.disabled,"aria-expanded":l.value,"aria-haspopup":`listbox`,"aria-controls":d,"aria-activedescendant":l.value&&u.value>=0?C(u.value):void 0,onClick:M,onKeydown:N}),[G(`span`,{class:b([`min-w-0 flex-1 truncate`,S.value?``:`text-base-content/50`])},[Gi(t.$slots,`value`,{option:S.value},()=>[_o(F(S.value?.label??e.placeholder??``),1)])],2)],16,xde),c.value?(H(),W(fs,{key:0,to:`#app-content`},[J(mu,{name:`floating-menu`},{default:z(()=>[l.value?(H(),U(`div`,{key:0,id:d,ref_key:`panelRef`,ref:s,role:`listbox`,class:b([`floating-menu-panel`,e.panelClass]),style:_(L(m)),"aria-label":v()},[(H(!0),U(q,null,Ui(e.options,(r,i)=>(H(),U(q,{key:C(i)},[r.group&&r.group!==e.options[i-1]?.group?(H(),U(`div`,Cde,F(r.group),1)):K(``,!0),G(`div`,{id:C(i),role:`option`,"aria-selected":w(r),"aria-disabled":r.disabled||void 0,"data-theme":r.theme,class:b([`floating-menu-option`,[r.theme?`bg-base-100 text-base-content`:``,i===u.value&&!r.disabled?`bg-base-200`:``,w(r)?[r.theme?``:`text-primary`,`font-medium`]:``,r.disabled?`text-base-content/30 cursor-not-allowed`:``,e.optionClass]]),onPointermove:e=>O(i),onPointerdown:n[0]||=ed(()=>{},[`prevent`]),onClick:e=>ee(r)},[G(`span`,Tde,[Gi(t.$slots,`option`,{option:r},()=>[_o(F(r.label),1)])]),w(r)?(H(),W(L(If),{key:0,class:`ml-2 h-4 w-4 flex-none`})):K(``,!0)],42,wde)],64))),128))],14,Sde)):K(``,!0)]),_:3})])):K(``,!0)],64))}}),Ede=[`placeholder`,`name`,`autocomplete`,`role`,`aria-expanded`,`aria-controls`,`aria-activedescendant`],Dde=[`id`,`aria-selected`,`onPointermove`,`onClick`],Ode={class:`min-w-0 flex-1 truncate`},kde=[`aria-label`,`onClick`],yO=V({__name:`TextInput`,props:oa({placeholder:{},name:{},autocomplete:{},clearable:{type:Boolean},inputClass:{},menus:{},menusDeleteable:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:oa([`input`,`change`,`update:menus`],[`update:modelValue`]),setup(e,{emit:t}){let n=t,r=e,i=wa(e,`modelValue`),a=I(),o=I(),s=I(),c=I(!1),l=I(!1),u=I(-1),d=`text-input-listbox-${pi().replace(/[^\w-]/g,``)}`,{close:f,panelStyle:p,remeasure:m}=_O(a,s,l,{maximumHeight:256}),h=e=>`${d}-option-${e}`,g=()=>{if(!r.menus?.length||l.value)return;let e=r.menus.indexOf(i.value||``);u.value=e>=0?e:0,l.value=!0,Mr(()=>{s.value?.querySelector(`#${h(u.value)}`)?.scrollIntoView({block:`nearest`})})},v=()=>l.value?f():g(),y=e=>{let t=r.menus?.length??0;t&&(u.value=(u.value+e+t)%t,Mr(()=>{s.value?.querySelector(`#${h(u.value)}`)?.scrollIntoView({block:`nearest`})}))},x=e=>{i.value=e,f(),o.value?.focus()},S=e=>{let t=(r.menus??[]).filter(t=>t!==e);if(n(`update:menus`,t),!t.length){f();return}u.value=Math.min(u.value,t.length-1),m()},C=e=>{if(r.menus?.length)switch(e.key){case`ArrowDown`:e.preventDefault(),l.value?y(1):g();break;case`ArrowUp`:e.preventDefault(),l.value?y(-1):g();break;case`Enter`:{if(!l.value)return;let t=r.menus?.[u.value];if(!t)return;e.preventDefault(),e.stopPropagation(),x(t);break}case`Escape`:if(!l.value)return;e.preventDefault(),e.stopPropagation(),f();break;case`Tab`:f()}},w=()=>{n(`input`,i.value||``),f()},T=()=>{i.value=``,f()};return B(()=>r.menus,e=>{e?.length?l.value&&m():f()},{deep:!0}),Bs(()=>c.value=!0),(t,r)=>(H(),U(`label`,{ref_key:`anchorRef`,ref:a,class:b([`input input-sm`,{"pe-1":e.clearable}])},[Wr(G(`input`,{"onUpdate:modelValue":r[0]||=e=>i.value=e,ref_key:`inputRef`,ref:o,type:`text`,class:b(e.inputClass),placeholder:e.placeholder||``,name:e.name||``,autocomplete:e.autocomplete||``,role:e.menus?.length?`combobox`:void 0,"aria-expanded":e.menus?.length?l.value:void 0,"aria-controls":e.menus?.length?d:void 0,"aria-activedescendant":l.value&&u.value>=0?h(u.value):void 0,"aria-autocomplete":`list`,onClick:v,onKeydown:C,onInput:w,onChange:r[1]||=e=>n(`change`,i.value||``)},null,42,Ede),[[qu,i.value]]),e.clearable?(H(),U(`button`,{key:0,type:`button`,class:`btn btn-ghost btn-circle btn-xs h-5 min-h-5 w-5 shrink-0 p-0`,onClick:T},[J(L(bp),{class:`h-3 w-3`})])):K(``,!0),c.value?(H(),W(fs,{key:1,to:`#app-content`},[J(mu,{name:`floating-menu`},{default:z(()=>[l.value?(H(),U(`div`,{key:0,id:d,ref_key:`menuRef`,ref:s,role:`listbox`,class:`floating-menu-panel`,style:_(L(p))},[(H(!0),U(q,null,Ui(e.menus,(n,a)=>(H(),U(`div`,{id:h(a),key:n,role:`option`,"aria-selected":i.value===n,class:b([`floating-menu-option`,[a===u.value?`bg-base-200`:``,i.value===n?`text-primary font-medium`:``]]),onPointermove:e=>u.value=a,onPointerdown:r[3]||=ed(()=>{},[`prevent`]),onClick:e=>x(n)},[G(`span`,Ode,F(n),1),i.value===n?(H(),W(L(If),{key:0,class:`ml-2 h-4 w-4 flex-none`})):K(``,!0),e.menusDeleteable?(H(),U(`button`,{key:1,type:`button`,class:`btn btn-ghost btn-circle btn-xs ml-2 h-5 min-h-5 w-5 flex-none p-0`,"aria-label":`${t.$t(`delete`)}: ${n}`,onPointerdown:r[2]||=ed(()=>{},[`prevent`]),onClick:ed(e=>S(n),[`stop`])},[J(L(bp),{class:`h-3 w-3`})],40,kde)):K(``,!0)],42,Dde))),128))],4)):K(``,!0)]),_:1})])):K(``,!0)],2))}});function bO(e){Object.getOwnPropertySymbols(e).forEach(t=>{ej[t]=e[t]})}function xO(e,t=``){return{type:0,source:t,children:e,helpers:new Set,components:[],directives:[],hoists:[],imports:[],cached:[],temps:0,codegenNode:void 0,loc:aj}}function SO(e,t,n,r,i,a,o,s=!1,c=!1,l=!1,u=aj){return e&&(s?(e.helper(bA),e.helper(PO(e.inSSR,l))):e.helper(NO(e.inSSR,l)),o&&e.helper(MA)),{type:13,tag:t,props:n,children:r,patchFlag:i,dynamicProps:a,directives:o,isBlock:s,disableTracking:c,isComponent:l,loc:u}}function CO(e,t=aj){return{type:17,loc:t,elements:e}}function wO(e,t=aj){return{type:15,loc:t,properties:e}}function TO(e,t){return{type:16,loc:aj,key:pe(e)?EO(e,!0):e,value:t}}function EO(e,t=!1,n=aj,r=0){return{type:4,loc:n,content:e,isStatic:t,constType:t?3:r}}function Ade(e,t){return{type:5,loc:t,content:pe(e)?EO(e,!1,t):e}}function DO(e,t=aj){return{type:8,loc:t,children:e}}function OO(e,t=[],n=aj){return{type:14,loc:n,callee:e,arguments:t}}function kO(e,t=void 0,n=!1,r=!1,i=aj){return{type:18,params:e,returns:t,newline:n,isSlot:r,loc:i}}function AO(e,t,n,r=!0){return{type:19,test:e,consequent:t,alternate:n,newline:r,loc:aj}}function jO(e,t,n=!1,r=!1){return{type:20,index:e,value:t,needPauseTracking:n,inVOnce:r,needArraySpread:!1,loc:aj}}function MO(e){return{type:21,body:e,loc:aj}}function jde(e){return{type:22,elements:e,loc:aj}}function Mde(e,t,n){return{type:23,test:e,consequent:t,alternate:n,loc:aj}}function Nde(e,t){return{type:24,left:e,right:t,loc:aj}}function Pde(e){return{type:25,expressions:e,loc:aj}}function Fde(e){return{type:26,returns:e,loc:aj}}function NO(e,t){return e||t?CA:wA}function PO(e,t){return e||t?xA:SA}function FO(e,{helper:t,removeHelper:n,inSSR:r}){e.isBlock||(e.isBlock=!0,n(NO(r,e.isComponent)),t(bA),t(PO(r,e.isComponent)))}function IO(e){return e>=97&&e<=122||e>=65&&e<=90}function LO(e){return e===32||e===10||e===9||e===12||e===13}function RO(e){return e===47||e===62||LO(e)}function zO(e){let t=new Uint8Array(e.length);for(let n=0;n{e&&qO(e,t)});break;case`RestElement`:qO(e.argument,t);break;case`AssignmentPattern`:qO(e.left,t);break}return t}function JO(e){return _j.includes(e.type)?JO(e.expression):e}function YO(e){switch(e){case`Teleport`:case`teleport`:return gA;case`Suspense`:case`suspense`:return _A;case`KeepAlive`:case`keep-alive`:return vA;case`BaseTransition`:case`base-transition`:return yA}}function Gde(e,t,n=t.length){return XO({offset:e.offset,line:e.line,column:e.column},t,n)}function XO(e,t,n=t.length){let r=0,i=-1;for(let e=0;ee.type===7&&e.name===`bind`&&(!e.arg||e.arg.type!==4||!e.arg.isStatic))}function tk(e){return e.type===5||e.type===2}function nk(e){return e.type===7&&e.name===`pre`}function rk(e){return e.type===7&&e.name===`slot`}function ik(e){return e.type===1&&e.tagType===3}function ak(e){return e.type===1&&e.tagType===2}function ok(e,t=[]){if(e&&!pe(e)&&e.type===14){let n=e.callee;if(!pe(n)&&Mj.has(n))return ok(e.arguments[0],t.concat(e))}return[e,t]}function sk(e,t,n){if(e.type!==13&&qde(e,t))return;let r,i=e.type===13?e.props:e.arguments[2],a=[],o;if(i&&!pe(i)&&i.type===14){let e=ok(i);i=e[0],a=e[1],o=a[a.length-1]}if(i==null||pe(i))r=wO([t]);else if(i.type===14){let e=i.arguments[0];!pe(e)&&e.type===15?ck(t,e)||e.properties.unshift(t):i.callee===HA?r=OO(n.helper(LA),[wO([t]),i]):i.arguments.unshift(wO([t])),!r&&(r=i)}else i.type===15?(ck(t,i)||i.properties.unshift(t),r=i):(r=OO(n.helper(LA),[wO([t]),i]),o&&o.callee===VA&&(o=a[a.length-2]));e.type===13?o?o.arguments[0]=r:e.props=r:o?o.arguments[0]=r:e.arguments[2]=r}function qde(e,t){var n,r,i;if(t.key.type!==4||t.key.content!==`key`)return!1;let a=e.arguments[2];if(a&&!pe(a)){let[e]=ok(a);if(e&&!pe(e)&&e.type===15&&ck(t,e))return!0}return(n=e.arguments)[2]||(n[2]=`{}`),(r=e.arguments)[3]||(r[3]=`undefined`),(i=e.arguments)[4]||(i[4]=`undefined`),e.arguments[5]=t.value,!0}function ck(e,t){let n=!1;if(e.key.type===4){let r=e.key.content;n=t.properties.some(e=>e.key.type===4&&e.key.content===r)}return n}function lk(e,t){return`_${t}_${e.replace(/[^\w]/g,(t,n)=>t===`-`?`_`:e.charCodeAt(n).toString())}`}function uk(e,t){if(!e||Object.keys(t).length===0)return!1;switch(e.type){case 1:for(let n=0;nuk(e,t));case 11:return uk(e.source,t)?!0:e.children.some(e=>uk(e,t));case 9:return e.branches.some(e=>uk(e,t));case 10:return uk(e.condition,t)?!0:e.children.some(e=>uk(e,t));case 4:return!e.isStatic&&bj(e.content)&&!!t[e.content];case 8:return e.children.some(e=>he(e)&&uk(e,t));case 5:case 12:return uk(e.content,t);case 2:case 3:case 20:return!1;default:return!1}}function dk(e){return e.type===14&&e.callee===QA?e.arguments[1].returns:e}function fk(e){for(let t=0;t{let i=t.start.offset+n;return Ek(e,!1,wk(i,i+e.length),0,+!!r)},s={source:o(a.trim(),n.indexOf(a,i.length)),value:void 0,key:void 0,index:void 0,finalized:!1},c=i.trim().replace(Yj,``).trim(),l=i.indexOf(c),u=c.match(Jj);if(u){c=c.replace(Jj,``).trim();let e=u[1].trim(),t;if(e&&(t=n.indexOf(e,l+c.length),s.key=o(e,t,!0)),u[2]){let r=u[2].trim();r&&(s.index=o(r,n.indexOf(r,s.key?t+e.length:l+c.length),!0))}}return c&&(s.value=o(c,l,!0)),s}function hk(e,t){return Lj.slice(e,t)}function gk(e){qj.inSFCRoot&&(Rj.innerLoc=wk(e+1,e+1)),Ck(Rj);let{tag:t,ns:n}=Rj;n===0&&Fj.isPreTag(t)&&Uj++,Fj.isVoidTag(t)?vk(Rj,e):(Kj.unshift(Rj),(n===1||n===2)&&(qj.inXML=!0)),Rj=null}function _k(e,t,n){{let t=Kj[0]&&Kj[0].tag;t!==`script`&&t!==`style`&&e.includes(`&`)&&(e=Fj.decodeEntities(e,!1))}let r=Kj[0]||Ij,i=r.children[r.children.length-1];i&&i.type===2?(i.content+=e,Tk(i.loc,n)):r.children.push({type:2,content:e,loc:wk(t,n)})}function vk(e,t,n=!1){n?Tk(e.loc,yk(t,60)):Tk(e.loc,Yde(t,62)+1),qj.inSFCRoot&&(e.children.length?e.innerLoc.end=ie({},e.children[e.children.length-1].loc.end):e.innerLoc.end=ie({},e.innerLoc.start),e.innerLoc.source=hk(e.innerLoc.start.offset,e.innerLoc.end.offset));let{tag:r,ns:i,children:a}=e;if(Wj||(r===`slot`?e.tagType=2:bk(e)?e.tagType=3:Xde(e)&&(e.tagType=1)),qj.inRCDATA||(e.children=xk(a)),i===0&&Fj.isIgnoreNewlineTag(r)){let e=a[0];e&&e.type===2&&(e.content=e.content.replace(/^\r?\n/,``))}i===0&&Fj.isPreTag(r)&&Uj--,Gj===e&&(Wj=qj.inVPre=!1,Gj=null),qj.inXML&&(Kj[0]?Kj[0].ns:Fj.ns)===0&&(qj.inXML=!1);{let t=e.props;if(!qj.inSFCRoot&&VO(`COMPILER_NATIVE_TEMPLATE`,Fj)&&e.tag===`template`&&!bk(e)){let t=Kj[0]||Ij,n=t.children.indexOf(e);t.children.splice(n,1,...e.children)}let n=t.find(e=>e.type===6&&e.name===`inline-template`);n&&HO(`COMPILER_INLINE_TEMPLATE`,Fj,n.loc)&&e.children.length&&(n.value={type:2,content:hk(e.children[0].loc.start.offset,e.children[e.children.length-1].loc.end.offset),loc:n.loc})}}function Yde(e,t){let n=e;for(;Lj.charCodeAt(n)!==t&&n=0;)n--;return n}function bk({tag:e,props:t}){if(e===`template`){for(let e=0;e64&&e<91}function xk(e){let t=Fj.whitespace!==`preserve`,n=!1;for(let r=0;re.type!==3);return t.length===1&&t[0].type===1&&!ak(t[0])?t[0]:null}function Ak(e,t,n,r=!1,i=!1){let{children:a}=e,o=[];for(let t=0;t0){if(e>=2){s.codegenNode.patchFlag=-1,o.push(s);continue}}else{let e=s.codegenNode;if(e.type===13){let t=e.patchFlag;if((t===void 0||t===512||t===1)&&Nk(s,n)>=2){let t=Pk(s);t&&(e.props=n.hoist(t))}e.dynamicProps&&=n.hoist(e.dynamicProps)}}}else if(s.type===12&&(r?0:jk(s,n))>=2){s.codegenNode.type===14&&s.codegenNode.arguments.length>0&&s.codegenNode.arguments.push(`-1`),o.push(s);continue}if(s.type===1){let t=s.tagType===1;t&&n.scopes.vSlot++,Ak(s,e,n,!1,i),t&&n.scopes.vSlot--}else if(s.type===11)Ak(s,e,n,s.children.length===1,!0);else if(s.type===9)for(let t=0;te.key===t||e.key.content===t);return n&&n.value}}o.length&&n.transformHoist&&n.transformHoist(a,n,e)}function jk(e,t){let{constantCache:n}=t;switch(e.type){case 1:if(e.tagType!==0)return 0;let r=n.get(e);if(r!==void 0)return r;let i=e.codegenNode;if(i.type!==13||i.isBlock&&e.tag!==`svg`&&e.tag!==`foreignObject`&&e.tag!==`math`)return 0;if(i.patchFlag===void 0){let r=3,a=Nk(e,t);if(a===0)return n.set(e,0),0;a1)for(let i=0;in&&(w.childIndex--,w.onNodeRemoved()),w.parent.children.splice(n,1)},onNodeRemoved:te,addIdentifiers(e){},removeIdentifiers(e){},hoist(e){pe(e)&&(e=EO(e)),w.hoists.push(e);let t=EO(`_hoisted_${w.hoists.length}`,!1,e.loc,2);return t.hoisted=e,t},cache(e,t=!1,n=!1){let r=jO(w.cached.length,e,t,n);return w.cached.push(r),r}};return w.filters=new Set,w}function Ik(e,t){let n=Fk(e,t);Lk(e,n),t.hoistStatic&&nfe(e,n),t.ssr||rfe(e,n),e.helpers=new Set([...n.helpers.keys()]),e.components=[...n.components],e.directives=[...n.directives],e.imports=n.imports,e.hoists=n.hoists,e.temps=n.temps,e.cached=n.cached,e.transformed=!0,e.filters=[...n.filters]}function rfe(e,t){let{helper:n}=t,{children:r}=e;if(r.length===1){let n=kk(e);if(n&&n.codegenNode){let r=n.codegenNode;r.type===13&&FO(r,t),e.codegenNode=r}else e.codegenNode=r[0]}else r.length>1&&(e.codegenNode=SO(t,n(hA),void 0,e.children,64,void 0,void 0,!0,void 0,!1))}function ife(e,t){let n=0,r=()=>{n--};for(;nt===e:t=>e.test(t);return(e,r)=>{if(e.type===1){let{props:i}=e;if(e.tagType===3&&i.some(rk))return;let a=[];for(let o=0;o0,p=!a&&r!==`module`;if(ofe(e,n),i(`function ${u?`ssrRender`:`render`}(${(u?[`_ctx`,`_push`,`_parent`,`_attrs`]:[`_ctx`,`_cache`]).join(`, `)}) {`),o(),p&&(i(`with (_ctx) {`),o(),f&&(i(`const { ${d.map(eM).join(`, `)} } = _Vue -`,-1),c())),e.components.length&&(Bk(e.components,`component`,n),(e.directives.length||e.temps>0)&&c()),e.directives.length&&(Bk(e.directives,`directive`,n),e.temps>0&&c()),e.filters&&e.filters.length&&(c(),Bk(e.filters,`filter`,n),c()),e.temps>0){i(`let `);for(let t=0;t0?`, `:``}_temp${t}`)}return(e.components.length||e.directives.length||e.temps)&&(i(` -`,0),c()),u||i(`return `),e.codegenNode?Uk(e.codegenNode,n):i(`null`),p&&(s(),i(`}`)),s(),i(`}`),{ast:e,code:n.code,preamble:``,map:n.map?n.map.toJSON():void 0}}function ofe(e,t){let{ssr:n,prefixIdentifiers:r,push:i,newline:a,runtimeModuleName:o,runtimeGlobalName:s,ssrRuntimeModuleName:c}=t,l=s,u=Array.from(e.helpers);u.length>0&&(i(`const _Vue = ${l} -`,-1),e.hoists.length&&i(`const { ${[CA,wA,TA,EA,DA].filter(e=>u.includes(e)).map(eM).join(`, `)} } = _Vue -`,-1)),sfe(e.hoists,t),a(),i(`return `)}function Bk(e,t,{helper:n,push:r,newline:i,isTS:a}){let o=n(t===`filter`?jA:t===`component`?OA:AA);for(let n=0;n3||!1;t.push(`[`),n&&t.indent(),Hk(e,t,n),n&&t.deindent(),t.push(`]`)}function Hk(e,t,n=!1,r=!0){let{push:i,newline:a}=t;for(let o=0;oe||`null`)}function mfe(e,t){let{push:n,helper:r,pure:i}=t,a=pe(e.callee)?e.callee:r(e.callee);i&&n($j),n(a+`(`,-2,e),Hk(e.arguments,t),n(`)`)}function hfe(e,t){let{push:n,indent:r,deindent:i,newline:a}=t,{properties:o}=e;if(!o.length){n(`{}`,-2,e);return}let s=o.length>1||!1;n(s?`{`:`{ `),s&&r();for(let e=0;e `),(c||s)&&(n(`{`),r()),o?(c&&n(`return `),P(o)?Vk(o,t):Uk(o,t)):s&&Uk(s,t),(c||s)&&(i(),n(`}`)),l&&(e.isNonScopedSlot&&n(`, undefined, true`),n(`)`))}function vfe(e,t){let{test:n,consequent:r,alternate:i,newline:a}=e,{push:o,indent:s,deindent:c,newline:l}=t;if(n.type===4){let e=!bj(n.content);e&&o(`(`),Wk(n,t),e&&o(`)`)}else o(`(`),Uk(n,t),o(`)`);a&&s(),t.indentLevel++,a||o(` `),o(`? `),Uk(r,t),t.indentLevel--,a&&l(),a||o(` `),o(`: `);let u=i.type===19;u||t.indentLevel++,Uk(i,t),u||t.indentLevel--,a&&c(!0)}function yfe(e,t){let{push:n,helper:r,indent:i,deindent:a,newline:o}=t,{needPauseTracking:s,needArraySpread:c}=e;c&&n(`[...(`),n(`_cache[${e.index}] || (`),s&&(i(),n(`${r(KA)}(-1`),e.inVOnce&&n(`, true`),n(`),`),o(),n(`(`)),n(`_cache[${e.index}] = `),Uk(e.value,t),s&&(n(`).cacheIndex = ${e.index},`),o(),n(`${r(KA)}(1),`),o(),n(`_cache[${e.index}]`),a()),n(`)`),c&&n(`)]`)}function Kk(e,t,n=!1,r=!1,i=Object.create(t.identifiers)){return e}function qk(e){return pe(e)?e:e.type===4?e.content:e.children.map(qk).join(``)}function Jk(e,t,n,r){if(t.name!==`else`&&(!t.exp||!t.exp.content.trim())){let r=t.exp?t.exp.loc:e.loc;n.onError(GO(28,t.loc)),t.exp=EO(`true`,!1,r)}if(t.name===`if`){let i=Yk(e,t),a={type:9,loc:$de(e.loc),branches:[i]};if(n.replaceNode(a),r)return r(a,i,!0)}else{let i=n.parent.children,a=i.indexOf(e);for(;a-->=-1;){let o=i[a];if(o&&mk(o)){n.removeNode(o);continue}if(o&&o.type===9){(t.name===`else-if`||t.name===`else`)&&o.branches[o.branches.length-1].condition===void 0&&n.onError(GO(30,e.loc)),n.removeNode();let i=Yk(e,t);o.branches.push(i);let a=r&&r(o,i,!1);Lk(i,n),a&&a(),n.currentNode=null}else n.onError(GO(30,e.loc));break}}}function Yk(e,t){let n=e.tagType===3;return{type:10,loc:e.loc,condition:t.name===`else`?void 0:t.exp,children:n&&!ZO(e,`for`)?e.children:[e],userKey:QO(e,`key`),isTemplateIf:n}}function Xk(e,t,n){return e.condition?AO(e.condition,Zk(e,t,n),OO(n.helper(TA),[`""`,`true`])):Zk(e,t,n)}function Zk(e,t,n){let{helper:r}=n,i=TO(`key`,EO(`${t}`,!1,aj,2)),{children:a}=e,o=a[0];if(a.length!==1||o.type!==1)if(a.length===1&&o.type===11){let e=o.codegenNode;return sk(e,i,n),e}else return SO(n,r(hA),wO([i]),a,64,void 0,void 0,!0,!1,!1,e.loc);else{let e=o.codegenNode,t=dk(e);return t.type===13&&FO(t,n),sk(t,i,n),e}}function bfe(e){for(;;)if(e.type===19)if(e.alternate.type===19)e=e.alternate;else return e;else e.type===20&&(e=e.value)}function Qk(e,t,n,r){if(!t.exp){n.onError(GO(31,t.loc));return}let i=t.forParseResult;if(!i){n.onError(GO(32,t.loc));return}$k(i,n);let{addIdentifiers:a,removeIdentifiers:o,scopes:s}=n,{source:c,value:l,key:u,index:d}=i,f={type:11,loc:t.loc,source:c,valueAlias:l,keyAlias:u,objectIndexAlias:d,parseResult:i,children:ik(e)?e.children:[e]};n.replaceNode(f),s.vFor++;let p=r&&r(f);return()=>{s.vFor--,p&&p()}}function $k(e,t){e.finalized||=!0}function eA({value:e,key:t,index:n},r=[]){return xfe([e,t,n,...r])}function xfe(e){let t=e.length;for(;t--&&!e[t];);return e.slice(0,t+1).map((e,t)=>e||EO(`_`.repeat(t+1),!1))}function tA(e,t,n=sM){t.helper(YA);let{children:r,loc:i}=e,a=[],o=[],s=t.scopes.vSlot>0||t.scopes.vFor>0,c=ZO(e,`slot`,!0);if(c){let{arg:e,exp:t}=c;e&&!vj(e)&&(s=!0),a.push(TO(e||EO(`default`,!0),n(t,void 0,r,i)))}let l=!1,u=!1,d=[],f=new Set,p=0;for(let e=0;e{let a=n(e,void 0,r,i);return t.compatConfig&&(a.isNonScopedSlot=!0),TO(`default`,a)};l?d.length&&!d.every(pk)&&(u?t.onError(GO(39,d[0].loc)):a.push(e(void 0,d))):a.push(e(void 0,r))}let m=s?2:rA(e.children)?3:1,h=wO(a.concat(TO(`_`,EO(m+``,!1))),i);return o.length&&(h=OO(t.helper(FA),[h,CO(o)])),{slots:h,hasDynamicSlots:s}}function nA(e,t,n){let r=[TO(`name`,e),TO(`fn`,t)];return n!=null&&r.push(TO(`key`,EO(String(n),!0))),wO(r)}function rA(e){for(let t=0;t0,p=!1,m=0,h=!1,g=!1,_=!1,v=!1,y=!1,b=!1,x=[],S=e=>{l.length&&(u.push(wO(oA(l),s)),l=[]),e&&u.push(e)},C=()=>{t.scopes.vFor>0&&l.push(TO(EO(`ref_for`,!0),EO(`true`)))},w=({key:e,value:n})=>{if(vj(e)){let a=e.content,o=N(a);if(o&&(!r||i)&&a.toLowerCase()!==`onclick`&&a!==`onUpdate:modelValue`&&!Se(a)&&(v=!0),o&&Se(a)&&(b=!0),o&&n.type===14&&(n=n.arguments[0]),n.type===20||(n.type===4||n.type===8)&&jk(n,t)>0)return;a===`ref`?h=!0:a===`class`?g=!0:a===`style`?_=!0:a!==`key`&&!x.includes(a)&&x.push(a),r&&(a===`class`||a===`style`)&&!x.includes(a)&&x.push(a)}else y=!0};for(let i=0;ie.content===`prop`)&&(m|=32);let x=t.directiveTransforms[n];if(x){let{props:n,needRuntime:r}=x(c,e,t);!a&&n.forEach(w),b&&i&&!vj(i)?S(wO(n,s)):l.push(...n),r&&(d.push(c),me(r)&&cM.set(c,r))}else Ce(n)||(d.push(c),f&&(p=!0))}}let T;if(u.length?(S(),T=u.length>1?OO(t.helper(LA),u,s):u[0]):l.length&&(T=wO(oA(l),s)),y?m|=16:(g&&!r&&(m|=2),_&&!r&&(m|=4),x.length&&(m|=8),v&&(m|=32)),!p&&(m===0||m===32)&&(h||b||d.length>0)&&(m|=512),!t.inSSR&&T)switch(T.type){case 15:let e=-1,n=-1,r=!1;for(let t=0;tTO(e,t)),i))}return CO(n,e.loc)}function Cfe(e){let t=`[`;for(let n=0,r=e.length;n0){let{props:n,directives:a}=aA(e,t,i,!1,!1);r=n,a.length&&t.onError(GO(36,a[0].loc))}return{slotName:n,slotProps:r}}function uA(e=[]){return{props:e}}function dA(e,t){if(e.type===4)fA(e,t);else for(let n=0;n=0&&(t=n.charAt(e),t===` `);e--);(!t||!vM.test(t))&&(o=!0)}}m===void 0?m=n.slice(0,p).trim():u!==0&&g();function g(){h.push(n.slice(u,p).trim()),u=p+1}if(h.length){for(p=0;p{yt(),hA=Symbol(``),gA=Symbol(``),_A=Symbol(``),vA=Symbol(``),yA=Symbol(``),bA=Symbol(``),xA=Symbol(``),SA=Symbol(``),CA=Symbol(``),wA=Symbol(``),TA=Symbol(``),EA=Symbol(``),DA=Symbol(``),OA=Symbol(``),kA=Symbol(``),AA=Symbol(``),jA=Symbol(``),MA=Symbol(``),NA=Symbol(``),PA=Symbol(``),FA=Symbol(``),IA=Symbol(``),LA=Symbol(``),RA=Symbol(``),zA=Symbol(``),BA=Symbol(``),VA=Symbol(``),HA=Symbol(``),UA=Symbol(``),WA=Symbol(``),GA=Symbol(``),KA=Symbol(``),qA=Symbol(``),JA=Symbol(``),YA=Symbol(``),XA=Symbol(``),ZA=Symbol(``),QA=Symbol(``),$A=Symbol(``),ej={[hA]:`Fragment`,[gA]:`Teleport`,[_A]:`Suspense`,[vA]:`KeepAlive`,[yA]:`BaseTransition`,[bA]:`openBlock`,[xA]:`createBlock`,[SA]:`createElementBlock`,[CA]:`createVNode`,[wA]:`createElementVNode`,[TA]:`createCommentVNode`,[EA]:`createTextVNode`,[DA]:`createStaticVNode`,[OA]:`resolveComponent`,[kA]:`resolveDynamicComponent`,[AA]:`resolveDirective`,[jA]:`resolveFilter`,[MA]:`withDirectives`,[NA]:`renderList`,[PA]:`renderSlot`,[FA]:`createSlots`,[IA]:`toDisplayString`,[LA]:`mergeProps`,[RA]:`normalizeClass`,[zA]:`normalizeStyle`,[BA]:`normalizeProps`,[VA]:`guardReactiveProps`,[HA]:`toHandlers`,[UA]:`camelize`,[WA]:`capitalize`,[GA]:`toHandlerKey`,[KA]:`setBlockTracking`,[qA]:`pushScopeId`,[JA]:`popScopeId`,[YA]:`withCtx`,[XA]:`unref`,[ZA]:`isRef`,[QA]:`withMemo`,[$A]:`isMemoSame`},tj={HTML:0,0:`HTML`,SVG:1,1:`SVG`,MATH_ML:2,2:`MATH_ML`},nj={ROOT:0,0:`ROOT`,ELEMENT:1,1:`ELEMENT`,TEXT:2,2:`TEXT`,COMMENT:3,3:`COMMENT`,SIMPLE_EXPRESSION:4,4:`SIMPLE_EXPRESSION`,INTERPOLATION:5,5:`INTERPOLATION`,ATTRIBUTE:6,6:`ATTRIBUTE`,DIRECTIVE:7,7:`DIRECTIVE`,COMPOUND_EXPRESSION:8,8:`COMPOUND_EXPRESSION`,IF:9,9:`IF`,IF_BRANCH:10,10:`IF_BRANCH`,FOR:11,11:`FOR`,TEXT_CALL:12,12:`TEXT_CALL`,VNODE_CALL:13,13:`VNODE_CALL`,JS_CALL_EXPRESSION:14,14:`JS_CALL_EXPRESSION`,JS_OBJECT_EXPRESSION:15,15:`JS_OBJECT_EXPRESSION`,JS_PROPERTY:16,16:`JS_PROPERTY`,JS_ARRAY_EXPRESSION:17,17:`JS_ARRAY_EXPRESSION`,JS_FUNCTION_EXPRESSION:18,18:`JS_FUNCTION_EXPRESSION`,JS_CONDITIONAL_EXPRESSION:19,19:`JS_CONDITIONAL_EXPRESSION`,JS_CACHE_EXPRESSION:20,20:`JS_CACHE_EXPRESSION`,JS_BLOCK_STATEMENT:21,21:`JS_BLOCK_STATEMENT`,JS_TEMPLATE_LITERAL:22,22:`JS_TEMPLATE_LITERAL`,JS_IF_STATEMENT:23,23:`JS_IF_STATEMENT`,JS_ASSIGNMENT_EXPRESSION:24,24:`JS_ASSIGNMENT_EXPRESSION`,JS_SEQUENCE_EXPRESSION:25,25:`JS_SEQUENCE_EXPRESSION`,JS_RETURN_STATEMENT:26,26:`JS_RETURN_STATEMENT`},rj={ELEMENT:0,0:`ELEMENT`,COMPONENT:1,1:`COMPONENT`,SLOT:2,2:`SLOT`,TEMPLATE:3,3:`TEMPLATE`},ij={NOT_CONSTANT:0,0:`NOT_CONSTANT`,CAN_SKIP_PATCH:1,1:`CAN_SKIP_PATCH`,CAN_CACHE:2,2:`CAN_CACHE`,CAN_STRINGIFY:3,3:`CAN_STRINGIFY`},aj={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:``},oj=new Uint8Array([123,123]),sj=new Uint8Array([125,125]),cj={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97])},lj=class{constructor(e,t){this.stack=e,this.cbs=t,this.state=1,this.buffer=``,this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=1,this.inRCDATA=!1,this.inXML=!1,this.inVPre=!1,this.newlines=[],this.mode=0,this.delimiterOpen=oj,this.delimiterClose=sj,this.delimiterIndex=-1,this.currentSequence=void 0,this.sequenceIndex=0}get inSFCRoot(){return this.mode===2&&this.stack.length===0}reset(){this.state=1,this.mode=0,this.buffer=``,this.sectionStart=0,this.index=0,this.baseState=1,this.inRCDATA=!1,this.currentSequence=void 0,this.newlines.length=0,this.delimiterOpen=oj,this.delimiterClose=sj}getPos(e){let t=1,n=e+1,r=this.newlines.length,i=-1;if(r>100){let t=-1,n=r;for(;t+1>>1;this.newlines[r]=0;t--)if(e>this.newlines[t]){i=t;break}return i>=0&&(t=i+2,n=e-this.newlines[i]),{column:n,line:t,offset:e}}peek(){return this.buffer.charCodeAt(this.index+1)}stateText(e){e===60?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=5,this.sectionStart=this.index):!this.inVPre&&e===this.delimiterOpen[0]&&(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(e))}stateInterpolationOpen(e){if(e===this.delimiterOpen[this.delimiterIndex])if(this.delimiterIndex===this.delimiterOpen.length-1){let e=this.index+1-this.delimiterOpen.length;e>this.sectionStart&&this.cbs.ontext(this.sectionStart,e),this.state=3,this.sectionStart=e}else this.delimiterIndex++;else this.inRCDATA?(this.state=32,this.stateInRCDATA(e)):(this.state=1,this.stateText(e))}stateInterpolation(e){e===this.delimiterClose[0]&&(this.state=4,this.delimiterIndex=0,this.stateInterpolationClose(e))}stateInterpolationClose(e){e===this.delimiterClose[this.delimiterIndex]?this.delimiterIndex===this.delimiterClose.length-1?(this.cbs.oninterpolation(this.sectionStart,this.index+1),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):this.delimiterIndex++:(this.state=3,this.stateInterpolation(e))}stateSpecialStartSequence(e){let t=this.sequenceIndex===this.currentSequence.length;if(!(t?RO(e):(e|32)===this.currentSequence[this.sequenceIndex]))this.inRCDATA=!1;else if(!t){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=6,this.stateInTagName(e)}stateInRCDATA(e){if(this.sequenceIndex===this.currentSequence.length){if(e===62||LO(e)){let t=this.index-this.currentSequence.length;if(this.sectionStart=e||(this.state===28?this.currentSequence===cj.CdataEnd?this.cbs.oncdata(this.sectionStart,e):this.cbs.oncomment(this.sectionStart,e):this.state===6||this.state===11||this.state===18||this.state===17||this.state===12||this.state===13||this.state===14||this.state===15||this.state===16||this.state===20||this.state===19||this.state===21||this.state===9||this.cbs.ontext(this.sectionStart,e))}emitCodePoint(e,t){}},uj={COMPILER_IS_ON_ELEMENT:`COMPILER_IS_ON_ELEMENT`,COMPILER_V_BIND_SYNC:`COMPILER_V_BIND_SYNC`,COMPILER_V_BIND_OBJECT_ORDER:`COMPILER_V_BIND_OBJECT_ORDER`,COMPILER_V_ON_NATIVE:`COMPILER_V_ON_NATIVE`,COMPILER_V_IF_V_FOR_PRECEDENCE:`COMPILER_V_IF_V_FOR_PRECEDENCE`,COMPILER_NATIVE_TEMPLATE:`COMPILER_NATIVE_TEMPLATE`,COMPILER_INLINE_TEMPLATE:`COMPILER_INLINE_TEMPLATE`,COMPILER_FILTERS:`COMPILER_FILTERS`},dj={COMPILER_IS_ON_ELEMENT:{message:`Platform-native elements with "is" prop will no longer be treated as components in Vue 3 unless the "is" value is explicitly prefixed with "vue:".`,link:`https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html`},COMPILER_V_BIND_SYNC:{message:e=>`.sync modifier for v-bind has been removed. Use v-model with argument instead. \`v-bind:${e}.sync\` should be changed to \`v-model:${e}\`.`,link:`https://v3-migration.vuejs.org/breaking-changes/v-model.html`},COMPILER_V_BIND_OBJECT_ORDER:{message:`v-bind="obj" usage is now order sensitive and behaves like JavaScript object spread: it will now overwrite an existing non-mergeable attribute that appears before v-bind in the case of conflict. To retain 2.x behavior, move v-bind to make it the first attribute. You can also suppress this warning if the usage is intended.`,link:`https://v3-migration.vuejs.org/breaking-changes/v-bind.html`},COMPILER_V_ON_NATIVE:{message:`.native modifier for v-on has been removed as is no longer necessary.`,link:`https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html`},COMPILER_V_IF_V_FOR_PRECEDENCE:{message:`v-if / v-for precedence when used on the same element has changed in Vue 3: v-if now takes higher precedence and will no longer have access to v-for scope variables. It is best to avoid the ambiguity with