feat: Establish WebUI build process, update frontend assets, and add CI workflow.
This commit is contained in:
1 parent
ce0538fcd9
commit
1a842c28d1
12 files changed
+3477
-277
No files matched your search
@@ -17,4 +17,8 @@
|
||||
|
||||
#### 📝 补充信息 | Additional Information
|
||||
|
||||
<!-- Add any other context about the Pull Request here. -->
|
||||
<!-- Add any other context about the Pull Request here. -->
|
||||
|
||||
---
|
||||
|
||||
> 💡 **提示**:如果修改了 `webui/` 目录下的文件,PR 合并后 CI 会自动构建并提交产物,无需手动构建。
|
||||
@@ -0,0 +1,76 @@
|
||||
# 自动构建 WebUI 并提交构建产物
|
||||
# 触发条件:webui 目录下的文件变更
|
||||
|
||||
name: Build WebUI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'webui/**'
|
||||
- '.github/workflows/build-webui.yml'
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'webui/**'
|
||||
# 允许手动触发
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
# 只在主仓库运行,避免 fork 仓库运行
|
||||
if: github.repository == 'CJackHwang/ds2api'
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
cache: 'npm'
|
||||
cache-dependency-path: webui/package-lock.json
|
||||
|
||||
- name: Install dependencies
|
||||
working-directory: webui
|
||||
run: npm ci
|
||||
|
||||
- name: Build WebUI
|
||||
working-directory: webui
|
||||
run: npm run build
|
||||
|
||||
- name: Check for changes
|
||||
id: check_changes
|
||||
run: |
|
||||
git add static/admin
|
||||
if git diff --staged --quiet; then
|
||||
echo "changed=false" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "changed=true" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Commit and push changes
|
||||
if: steps.check_changes.outputs.changed == 'true' && github.event_name == 'push'
|
||||
run: |
|
||||
git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git config --local user.name "github-actions[bot]"
|
||||
git commit -m "chore: auto-build WebUI [skip ci]"
|
||||
git push
|
||||
|
||||
- name: Upload build artifacts (for PR review)
|
||||
if: github.event_name == 'pull_request'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: webui-build
|
||||
path: static/admin
|
||||
retention-days: 7
|
||||
+2
-1
@@ -55,7 +55,8 @@ webui/node_modules/
|
||||
webui/dist/
|
||||
.npm
|
||||
.pnpm-store/
|
||||
package-lock.json
|
||||
# 保留 webui/package-lock.json 用于 CI 缓存
|
||||
# package-lock.json # 如果有根目录的可以忽略
|
||||
yarn.lock
|
||||
pnpm-lock.yaml
|
||||
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
# 贡献指南
|
||||
|
||||
感谢你对 DS2API 的贡献!
|
||||
|
||||
## 开发环境设置
|
||||
|
||||
### 后端
|
||||
|
||||
```bash
|
||||
# 1. 克隆仓库
|
||||
git clone https://github.com/CJackHwang/ds2api.git
|
||||
cd ds2api
|
||||
|
||||
# 2. 创建虚拟环境(推荐)
|
||||
python -m venv venv
|
||||
source venv/bin/activate # Windows: venv\Scripts\activate
|
||||
|
||||
# 3. 安装依赖
|
||||
pip install -r requirements.txt
|
||||
|
||||
# 4. 配置
|
||||
cp config.example.json config.json
|
||||
# 编辑 config.json
|
||||
|
||||
# 5. 启动
|
||||
python dev.py
|
||||
```
|
||||
|
||||
### 前端 (WebUI)
|
||||
|
||||
```bash
|
||||
cd webui
|
||||
npm install
|
||||
npm run dev
|
||||
```
|
||||
|
||||
## 代码规范
|
||||
|
||||
- **Python**: 遵循 PEP 8,使用 4 空格缩进
|
||||
- **JavaScript/React**: 使用 4 空格缩进,使用函数组件
|
||||
- **提交信息**: 使用语义化提交格式(如 `feat:`, `fix:`, `docs:`)
|
||||
|
||||
## 提交 PR
|
||||
|
||||
1. Fork 本仓库
|
||||
2. 创建功能分支 (`git checkout -b feature/xxx`)
|
||||
3. 提交更改 (`git commit -m 'feat: 添加xxx功能'`)
|
||||
4. 推送分支 (`git push origin feature/xxx`)
|
||||
5. 创建 Pull Request
|
||||
|
||||
## WebUI 构建
|
||||
|
||||
> **重要**: 修改 `webui/` 目录后 **无需手动构建**!
|
||||
|
||||
当 PR 合并到 `main` 分支后,GitHub Actions 会自动:
|
||||
1. 构建 WebUI
|
||||
2. 提交构建产物到 `static/admin/`
|
||||
|
||||
如果需要本地构建(测试用):
|
||||
```bash
|
||||
./scripts/build-webui.sh
|
||||
```
|
||||
|
||||
## 项目结构
|
||||
|
||||
```
|
||||
ds2api/
|
||||
├── app.py # FastAPI 应用入口
|
||||
├── dev.py # 开发服务器
|
||||
├── core/ # 核心模块
|
||||
│ ├── auth.py # 账号认证与轮询
|
||||
│ ├── config.py # 配置管理
|
||||
│ ├── deepseek.py # DeepSeek API 调用
|
||||
│ ├── models.py # 模型定义
|
||||
│ ├── pow.py # PoW 计算
|
||||
│ └── sse_parser.py # SSE 解析
|
||||
├── routes/ # API 路由
|
||||
│ ├── openai.py # OpenAI 兼容接口
|
||||
│ ├── claude.py # Claude 兼容接口
|
||||
│ ├── home.py # 首页路由
|
||||
│ └── admin/ # 管理接口
|
||||
├── webui/ # React WebUI 源码
|
||||
├── static/admin/ # WebUI 构建产物(自动生成)
|
||||
└── scripts/ # 辅助脚本
|
||||
```
|
||||
|
||||
## 问题反馈
|
||||
|
||||
- 使用 [GitHub Issues](https://github.com/CJackHwang/ds2api/issues) 报告问题
|
||||
- 提供详细的复现步骤和日志信息
|
||||
@@ -125,6 +125,27 @@ npm run dev
|
||||
|
||||
WebUI 开发服务器会启动在 `http://localhost:5173`,并自动代理 API 请求到后端 `http://localhost:5001`。
|
||||
|
||||
### WebUI 构建
|
||||
|
||||
WebUI 构建产物位于 `static/admin/` 目录。
|
||||
|
||||
**自动构建(推荐)**:
|
||||
- 当 `webui/` 目录下的文件变更并推送到 `main` 分支时,GitHub Actions 会自动构建并提交产物
|
||||
- PR 合并时会自动触发构建
|
||||
|
||||
**手动构建**:
|
||||
```bash
|
||||
# 方式1:使用脚本
|
||||
./scripts/build-webui.sh
|
||||
|
||||
# 方式2:直接执行
|
||||
cd webui
|
||||
npm install
|
||||
npm run build
|
||||
```
|
||||
|
||||
> **贡献者注意**:修改 WebUI 后无需手动构建,CI 会自动处理。
|
||||
|
||||
---
|
||||
|
||||
## 生产环境部署
|
||||
|
||||
Executable
+22
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
# WebUI 构建脚本
|
||||
# 用法: ./scripts/build-webui.sh
|
||||
|
||||
set -e
|
||||
|
||||
echo "🔨 Building WebUI..."
|
||||
|
||||
cd "$(dirname "$0")/../webui"
|
||||
|
||||
# 检查 node_modules
|
||||
if [ ! -d "node_modules" ]; then
|
||||
echo "📦 Installing dependencies..."
|
||||
npm install
|
||||
fi
|
||||
|
||||
# 构建
|
||||
echo "🏗️ Running build..."
|
||||
npm run build
|
||||
|
||||
echo "✅ WebUI built successfully!"
|
||||
echo "📁 Output: static/admin/"
|
||||
@@ -1 +0,0 @@
|
||||
*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.fixed{position:fixed}.absolute{position:absolute}.relLine truncated
|
||||
@@ -0,0 +1,272 @@
|
||||
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const o of l)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerPolicy&&(o.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?o.credentials="include":l.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(l){if(l.ep)return;l.ep=!0;const o=n(l);fetch(l.href,o)}})();function $d(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var eu={exports:{}},bl={},tu={exports:{}},D={};/**
|
||||
* @license React
|
||||
* react.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var Nr=Symbol.for("react.element"),Fd=Symbol.for("react.portal"),Ad=Symbol.for("react.fragment"),Ud=Symbol.for("react.strict_mode"),Bd=Symbol.for("react.profiler"),Vd=Symbol.for("react.provider"),Hd=Symbol.for("react.context"),Wd=Symbol.for("react.forward_ref"),Qd=Symbol.for("react.suspense"),Kd=Symbol.for("react.memo"),Jd=Symbol.for("react.lazy"),Ti=Symbol.iterator;function Yd(e){return e===null||typeof e!="object"?null:(e=Ti&&e[Ti]||e["@@iterator"],typeof e=="function"?e:null)}var nu={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ru=Object.assign,lu={};function Ln(e,t,n){this.props=e,this.context=t,this.refs=lu,this.updater=n||nu}Ln.prototype.isReactComponent={};Ln.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ln.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function ou(){}ou.prototype=Ln.prototype;function Rs(e,t,n){this.props=e,this.context=t,this.refs=lu,this.updater=n||nu}var Ls=Rs.prototype=new ou;Ls.constructor=Rs;ru(Ls,Ln.prototype);Ls.isPureReactComponent=!0;var zi=Array.isArray,su=Object.prototype.hasOwnProperty,Ts={current:null},iu={key:!0,ref:!0,__self:!0,__source:!0};function au(e,t,n){var r,l={},o=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)su.call(t,r)&&!iu.hasOwnProperty(r)&&(l[r]=t[r]);var i=arguments.length-2;if(i===1)l.children=n;else if(1<i){for(var u=Array(i),c=0;c<i;c++)u[c]=arguments[c+2];l.children=u}if(e&&e.defaultProps)for(r in i=e.defaultProps,i)l[r]===void 0&&(l[r]=i[r]);return{$$typeof:Nr,type:e,key:o,ref:s,props:l,_owner:Ts.current}}function Gd(e,t){return{$$typeof:Nr,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function zs(e){return typeof e=="object"&&e!==null&&e.$$typeof===Nr}function Xd(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Oi=/\/+/g;function to(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Xd(""+e.key):t.toString(36)}function Yr(e,t,n,r,l){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(o){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case Nr:case Fd:s=!0}}if(s)return s=e,l=l(s),e=r===""?"."+to(s,0):r,zi(l)?(n="",e!=null&&(n=e.replace(Oi,"$&/")+"/"),Yr(l,t,n,"",function(c){return c})):l!=null&&(zs(l)&&(l=Gd(l,n+(!l.key||s&&s.key===l.key?"":(""+l.key).replace(Oi,"$&/")+"/")+e)),t.push(l)),1;if(s=0,r=r===""?".":r+":",zi(e))for(var i=0;i<e.length;i++){o=e[i];var u=r+to(o,i);s+=Yr(o,t,n,u,l)}else if(u=Yd(e),typeof u=="function")for(e=u.call(e),i=0;!(o=e.next()).done;)o=o.value,u=r+to(o,i++),s+=Yr(o,t,n,u,l);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function Tr(e,t,n){if(e==null)return e;var r=[],l=0;return Yr(e,r,"","",function(o){return t.call(n,o,l++)}),r}function Zd(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var ge={current:null},Gr={transition:null},qd={ReactCurrentDispatcher:ge,ReactCurrentBatchConfig:Gr,ReactCurrentOwner:Ts};function uu(){throw Error("act(...) is not supported in production builds of React.")}D.Children={map:Tr,forEach:function(e,t,n){Tr(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Tr(e,function(){t++}),t},toArray:function(e){return Tr(e,function(t){return t})||[]},only:function(e){if(!zs(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};D.Component=Ln;D.Fragment=Ad;D.Profiler=Bd;D.PureComponent=Rs;D.StrictMode=Ud;D.Suspense=Qd;D.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=qd;D.act=uu;D.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=ru({},e.props),l=e.key,o=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,s=Ts.current),t.key!==void 0&&(l=""+t.key),e.type&&e.type.defaultProps)var i=e.type.defaultProps;for(u in t)su.call(t,u)&&!iu.hasOwnProperty(u)&&(r[u]=t[u]===void 0&&i!==void 0?i[u]:t[u])}var u=arguments.length-2;if(u===1)r.children=n;else if(1<u){i=Array(u);for(var c=0;c<u;c++)i[c]=arguments[c+2];r.children=i}return{$$typeof:Nr,type:e.type,key:l,ref:o,props:r,_owner:s}};D.createContext=function(e){return e={$$typeof:Hd,_currentValue:e,_currentValue2:e,_threadCount:0,ProviderLine truncated
|
||||
* @license React
|
||||
* react-jsx-runtime.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var tf=g,nf=Symbol.for("react.element"),rf=Symbol.for("react.fragment"),lf=Object.prototype.hasOwnProperty,of=tf.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,sf={key:!0,ref:!0,__self:!0,__source:!0};function cu(e,t,n){var r,l={},o=null,s=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)lf.call(t,r)&&!sf.hasOwnProperty(r)&&(l[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)l[r]===void 0&&(l[r]=t[r]);return{$$typeof:nf,type:e,key:o,ref:s,props:l,_owner:of.current}}bl.Fragment=rf;bl.jsx=cu;bl.jsxs=cu;eu.exports=bl;var a=eu.exports,zo={},du={exports:{}},Re={},fu={exports:{}},pu={};/**
|
||||
* @license React
|
||||
* scheduler.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/(function(e){function t(L,E){var z=L.length;L.push(E);e:for(;0<z;){var U=z-1>>>1,W=L[U];if(0<l(W,E))L[U]=E,L[z]=W,z=U;else break e}}function n(L){return L.length===0?null:L[0]}function r(L){if(L.length===0)return null;var E=L[0],z=L.pop();if(z!==E){L[0]=z;e:for(var U=0,W=L.length,xe=W>>>1;U<xe;){var me=2*(U+1)-1,vt=L[me],C=me+1,I=L[C];if(0>l(vt,z))C<W&&0>l(I,vt)?(L[U]=I,L[C]=z,U=C):(L[U]=vt,L[me]=z,U=me);else if(C<W&&0>l(I,z))L[U]=I,L[C]=z,U=C;else break e}}return E}function l(L,E){var z=L.sortIndex-E.sortIndex;return z!==0?z:L.id-E.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,i=s.now();e.unstable_now=function(){return s.now()-i}}var u=[],c=[],y=1,p=null,h=3,v=!1,x=!1,w=!1,N=typeof setTimeout=="function"?setTimeout:null,f=typeof clearTimeout=="function"?clearTimeout:null,d=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function m(L){for(var E=n(c);E!==null;){if(E.callback===null)r(c);else if(E.startTime<=L)r(c),E.sortIndex=E.expirationTime,t(u,E);else break;E=n(c)}}function k(L){if(w=!1,m(L),!x)if(n(u)!==null)x=!0,yt(S);else{var E=n(c);E!==null&>(k,E.startTime-L)}}function S(L,E){x=!1,w&&(w=!1,f(P),P=-1),v=!0;var z=h;try{for(m(E),p=n(u);p!==null&&(!(p.expirationTime>E)||L&&!pe());){var U=p.callback;if(typeof U=="function"){p.callback=null,h=p.priorityLevel;var W=U(p.expirationTime<=E);E=e.unstable_now(),typeof W=="function"?p.callback=W:p===n(u)&&r(u),m(E)}else r(u);p=n(u)}if(p!==null)var xe=!0;else{var me=n(c);me!==null&>(k,me.startTime-E),xe=!1}return xe}finally{p=null,h=z,v=!1}}var _=!1,R=null,P=-1,b=5,O=-1;function pe(){return!(e.unstable_now()-O<b)}function oe(){if(R!==null){var L=e.unstable_now();O=L;var E=!0;try{E=R(!0,L)}finally{E?Je():(_=!1,R=null)}}else _=!1}var Je;if(typeof d=="function")Je=function(){d(oe)};else if(typeof MessageChannel<"u"){var At=new MessageChannel,tn=At.port2;At.port1.onmessage=oe,Je=function(){tn.postMessage(null)}}else Je=function(){N(oe,0)};function yt(L){R=L,_||(_=!0,Je())}function gt(L,E){P=N(function(){L(e.unstable_now())},E)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(L){L.callback=null},e.unstable_continueExecution=function(){x||v||(x=!0,yt(S))},e.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):b=0<L?Math.floor(1e3/L):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(L){switch(h){case 1:case 2:case 3:var E=3;break;default:E=h}var z=h;h=E;try{return L()}finally{h=z}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(L,E){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var z=h;h=L;try{return E()}finally{h=z}},e.unstable_scheduleCallback=function(L,E,z){var U=e.unstable_now();switch(typeof z=="object"&&z!==null?(z=z.delay,z=typeof z=="number"&&0<z?U+z:U):z=U,L){case 1:var W=-1;break;case 2:W=250;break;case 5:W=1073741823;break;case 4:W=1e4;break;default:W=5e3}return W=z+W,L={id:y++,callback:E,priorityLevel:L,startTime:z,expirationTime:W,sortIndex:-1},z>U?(L.sortIndex=z,t(c,L),n(u)===null&&L===n(c)&&(w?(f(P),P=-1):w=!0,gt(k,z-U))):(L.sortIndex=W,t(u,L),x||v||(x=!0,yt(S))),L},e.unstable_shouldYield=pe,e.unstable_wrapCallback=function(L){var E=h;return function(){var z=h;h=E;try{return L.apply(this,arguments)}finally{h=z}}}})(pu);fu.exports=pu;var af=fu.exports;/**
|
||||
* @license React
|
||||
* react-dom.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var uf=g,Pe=af;function j(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var mu=new Set,lr={};function qt(e,t){Sn(e,t),Sn(e+"Capture",t)}function Sn(e,t){for(lr[e]=t,e=0;e<t.length;e++)mu.add(t[e])}var ut=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Oo=Object.prototype.hasOwnProperty,cf=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Ii={},Di={};function df(e){return Oo.call(Di,e)?!0:Oo.call(Ii,e)?!1:cf.test(e)?Di[e]=!0:(Ii[e]=!0,!1)}function ff(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function pf(e,t,n,r){if(t===null||typeof t>"u"||ff(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ve(e,t,n,r,l,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var ae={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ae[e]=new ve(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ae[t]=new ve(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ae[e]=new ve(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ae[e]=new ve(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ae[e]=new ve(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ae[e]=new ve(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ae[e]=new ve(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ae[e]=new ve(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ae[e]=new ve(e,5,!1,e.toLowerCase(),null,!1,!1)});var Os=/[\-:]([a-z])/g;function Is(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Os,Is);ae[t]=new ve(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Os,Is);ae[t]=new ve(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Os,Is);ae[t]=new ve(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ae[e]=new ve(e,1,!1,e.toLowerCase(),null,!1,!1)});ae.xlinkHref=new ve("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ae[e]=new ve(e,1,!1,e.toLowerCase(),null,!0,!0)});function Ds(e,t,n,r){var l=ae.hasOwnProperty(t)?ae[t]:null;(l!==null?l.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="
Line truncated
|
||||
`+no+e}var ro=!1;function lo(e,t){if(!e||ro)return"";ro=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var l=c.stack.split(`
|
||||
`),o=r.stack.split(`
|
||||
`),s=l.length-1,i=o.length-1;1<=s&&0<=i&&l[s]!==o[i];)i--;for(;1<=s&&0<=i;s--,i--)if(l[s]!==o[i]){if(s!==1||i!==1)do if(s--,i--,0>i||l[s]!==o[i]){var u=`
|
||||
`+l[s].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=s&&0<=i);break}}}finally{ro=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Wn(e):""}function mf(e){switch(e.tag){case 5:return Wn(e.type);case 16:return Wn("Lazy");case 13:return Wn("Suspense");case 19:return Wn("SuspenseList");case 0:case 2:case 15:return e=lo(e.type,!1),e;case 11:return e=lo(e.type.render,!1),e;case 1:return e=lo(e.type,!0),e;default:return""}}function Mo(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case on:return"Fragment";case ln:return"Portal";case Io:return"Profiler";case bs:return"StrictMode";case Do:return"Suspense";case bo:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case yu:return(e.displayName||"Context")+".Consumer";case hu:return(e._context.displayName||"Context")+".Provider";case Ms:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case $s:return t=e.displayName||null,t!==null?t:Mo(e.type)||"Memo";case kt:t=e._payload,e=e._init;try{return Mo(e(t))}catch{}}return null}function hf(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Mo(t);case 8:return t===bs?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Dt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function vu(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function yf(e){var t=vu(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Or(e){e._valueTracker||(e._valueTracker=yf(e))}function xu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=vu(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function ul(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function $o(e,t){var n=t.checked;return G({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Mi(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Dt(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function wu(e,t){t=t.checked,t!=null&&Ds(e,"checked",t,!1)}function Fo(e,t){wu(e,t);var n=Dt(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Ao(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ao(e,t.type,Dt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function $i(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Ao(e,t,n){(t!=="number"||ul(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Qn=Array.isArray;function gn(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l<n.length;l++)t["$"+n[l]]=!0;for(n=0;n<e.length;n++)l=t.hasOwnProperty("$"+e[n].value),e[n].selected!==l&&(e[n].selected=l),l&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Dt(n),t=null,l=0;l<e.length;l++){if(e[l].value===n){e[l].selected=!0,r&&(e[l].defaultSelected=!0);return}t!==null||e[l].disabled||(t=e[l])}t!==null&&(t.selected=!0)}}function Uo(e,t){if(t.dang
Line truncated
|
||||
`).replace(Cp,"")}function Ur(e,t,n){if(t=ia(t),ia(e)!==t&&n)throw Error(j(425))}function gl(){}var es=null,ts=null;function ns(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var rs=typeof setTimeout=="function"?setTimeout:void 0,_p=typeof clearTimeout=="function"?clearTimeout:void 0,aa=typeof Promise=="function"?Promise:void 0,Pp=typeof queueMicrotask=="function"?queueMicrotask:typeof aa<"u"?function(e){return aa.resolve(null).then(e).catch(Rp)}:rs;function Rp(e){setTimeout(function(){throw e})}function vo(e,t){var n=t,r=0;do{var l=n.nextSibling;if(e.removeChild(n),l&&l.nodeType===8)if(n=l.data,n==="/$"){if(r===0){e.removeChild(l),ur(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=l}while(n);ur(t)}function Lt(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function ua(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var zn=Math.random().toString(36).slice(2),Xe="__reactFiber$"+zn,mr="__reactProps$"+zn,ct="__reactContainer$"+zn,ls="__reactEvents$"+zn,Lp="__reactListeners$"+zn,Tp="__reactHandles$"+zn;function Vt(e){var t=e[Xe];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ct]||n[Xe]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=ua(e);e!==null;){if(n=e[Xe])return n;e=ua(e)}return t}e=n,n=e.parentNode}return null}function Er(e){return e=e[Xe]||e[ct],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function cn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(j(33))}function Ul(e){return e[mr]||null}var os=[],dn=-1;function $t(e){return{current:e}}function H(e){0>dn||(e.current=os[dn],os[dn]=null,dn--)}function B(e,t){dn++,os[dn]=e.current,e.current=t}var bt={},fe=$t(bt),Ne=$t(!1),Jt=bt;function jn(e,t){var n=e.type.contextTypes;if(!n)return bt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},o;for(o in n)l[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function Se(e){return e=e.childContextTypes,e!=null}function vl(){H(Ne),H(fe)}function ca(e,t,n){if(fe.current!==bt)throw Error(j(168));B(fe,t),B(Ne,n)}function ac(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(j(108,hf(e)||"Unknown",l));return G({},n,r)}function xl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||bt,Jt=fe.current,B(fe,e),B(Ne,Ne.current),!0}function da(e,t,n){var r=e.stateNode;if(!r)throw Error(j(169));n?(e=ac(e,t,Jt),r.__reactInternalMemoizedMergedChildContext=e,H(Ne),H(fe),B(fe,e)):H(Ne),B(Ne,n)}var lt=null,Bl=!1,xo=!1;function uc(e){lt===null?lt=[e]:lt.push(e)}function zp(e){Bl=!0,uc(e)}function Ft(){if(!xo&<!==null){xo=!0;var e=0,t=A;try{var n=lt;for(A=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}lt=null,Bl=!1}catch(l){throw lt!==null&&(lt=lt.slice(e+1)),Iu(As,Ft),l}finally{A=t,xo=!1}}return null}var fn=[],pn=0,wl=null,kl=0,Oe=[],Ie=0,Yt=null,ot=1,st="";function Ut(e,t){fn[pn++]=kl,fn[pn++]=wl,wl=e,kl=t}function cc(e,t,n){Oe[Ie++]=ot,Oe[Ie++]=st,Oe[Ie++]=Yt,Yt=e;var r=ot;e=st;var l=32-He(r)-1;r&=~(1<<l),n+=1;var o=32-He(t)+l;if(30<o){var s=l-l%5;o=(r&(1<<s)-1).toString(32),r>>=s,l-=s,ot=1<<32-He(t)+l|n<<l|r,st=o+e}else ot=1<<o|n<<l|r,st=e}function Ys(e){e.return!==null&&(Ut(e,1),cc(e,1,0))}function Gs(e){for(;e===wl;)wl=fn[--pn],fn[pn]=null,kl=fn[--pn],fn[pn]=null;for(;e===Yt;)Yt=Oe[--Ie],Oe[Ie]=null,st=Oe[--Ie],Oe[Ie]=null,ot=Oe[--Ie],Oe[Ie]=null}var _e=null,Ce=null,Q=!1,Ve=null;function dc(e,t){var n=De(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function fa(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,_e=e,Ce=Lt(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,_e=e,Ce=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Yt!==null?{id:ot,overflow:st}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=De(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,_e=e,Ce=null,!0):!1;default:return!1}}function ss(e){return(e.mode&1)!==0&&(e.flags&128)===0}function is(e){if(Q){var t=Ce;if(t){var n=t;if(!fa(e,t)){if(ss(e))throw Error(j(418));t=Lt(n.nextSibling);var r=_e;t&&fa(e,t)?dc(r,n):(e.flags=e.flags&-4097|2,Q=!1,_e=e)}}else{if(ss(e))throw Error(j(418));e.flags=e.flags&-4097|2,Q=!1,_e=e}}}function pa(e){for(e=e.return;e!==null&&e.t
Line truncated
|
||||
Error generating stack: `+o.message+`
|
||||
`+o.stack}return{value:e,source:t,stack:l,digest:null}}function jo(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function ds(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Up=typeof WeakMap=="function"?WeakMap:Map;function $c(e,t,n){n=it(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Rl||(Rl=!0,ks=r),ds(e,t)},n}function Fc(e,t,n){n=it(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var l=t.value;n.payload=function(){return r(l)},n.callback=function(){ds(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){ds(e,t),typeof r!="function"&&(zt===null?zt=new Set([this]):zt.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function ka(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Up;var l=new Set;r.set(t,l)}else l=r.get(t),l===void 0&&(l=new Set,r.set(t,l));l.has(n)||(l.add(n),e=tm.bind(null,e,t,n),t.then(e,e))}function Na(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Sa(e,t,n,r,l){return e.mode&1?(e.flags|=65536,e.lanes=l,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=it(-1,1),t.tag=2,Tt(n,t,1))),n.lanes|=1),e)}var Bp=mt.ReactCurrentOwner,ke=!1;function he(e,t,n,r){t.child=e===null?mc(t,null,n,r):Cn(t,e.child,n,r)}function ja(e,t,n,r,l){n=n.render;var o=t.ref;return kn(t,l),r=ii(e,t,n,r,o,l),n=ai(),e!==null&&!ke?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,ft(e,t,l)):(Q&&n&&Ys(t),t.flags|=1,he(e,t,r,l),t.child)}function Ea(e,t,n,r,l){if(e===null){var o=n.type;return typeof o=="function"&&!vi(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,Ac(e,t,o,r,l)):(e=sl(n.type,null,r,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&l)){var s=o.memoizedProps;if(n=n.compare,n=n!==null?n:dr,n(s,r)&&e.ref===t.ref)return ft(e,t,l)}return t.flags|=1,e=It(o,r),e.ref=t.ref,e.return=t,t.child=e}function Ac(e,t,n,r,l){if(e!==null){var o=e.memoizedProps;if(dr(o,r)&&e.ref===t.ref)if(ke=!1,t.pendingProps=r=o,(e.lanes&l)!==0)e.flags&131072&&(ke=!0);else return t.lanes=e.lanes,ft(e,t,l)}return fs(e,t,n,r,l)}function Uc(e,t,n){var r=t.pendingProps,l=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},B(yn,Ee),Ee|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,B(yn,Ee),Ee|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,B(yn,Ee),Ee|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,B(yn,Ee),Ee|=r;return he(e,t,l,n),t.child}function Bc(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function fs(e,t,n,r,l){var o=Se(n)?Jt:fe.current;return o=jn(t,o),kn(t,l),n=ii(e,t,n,r,o,l),r=ai(),e!==null&&!ke?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,ft(e,t,l)):(Q&&r&&Ys(t),t.flags|=1,he(e,t,n,l),t.child)}function Ca(e,t,n,r,l){if(Se(n)){var o=!0;xl(t)}else o=!1;if(kn(t,l),t.stateNode===null)rl(e,t),Mc(t,n,r),cs(t,n,r,l),r=!0;else if(e===null){var s=t.stateNode,i=t.memoizedProps;s.props=i;var u=s.context,c=n.contextType;typeof c=="object"&&c!==null?c=Me(c):(c=Se(n)?Jt:fe.current,c=jn(t,c));var y=n.getDerivedStateFromProps,p=typeof y=="function"||typeof s.getSnapshotBeforeUpdate=="function";p||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(i!==r||u!==c)&&wa(t,s,r,c),Nt=!1;var h=t.memoizedState;s.state=h,jl(t,r,s,l),u=t.memoizedState,i!==r||h!==u||Ne.current||Nt?(typeof y=="function"&&(us(t,n,y,r),u=t.memoizedState),(i=Nt||xa(t,n,i,r,h,u,c))?(p||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),s.props=r,s.state=u,s.context=c,r=i):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,yc(e,t),i=t.memoizedProps,c=t.type===t.elementType?i:Ue(t.type,i),s.props=c,p=t.pendingProps,h=s.context,u=n.contextType,typeof u=="object"&&u!==null?u=Me(u):(u=Se(n)?Jt:fe.current,u=jn(t,u));var v=n.getDerivedStateFromProps;(y=typeof v=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(i!==p||h!==u)&&wa(t,s,r,u),Nt=!1,h=t.memoizedState,s.state=h,jl(t,r,s,l);var x=t.memoizedState;i
Line truncated
|
||||
* react-router v7.13.0
|
||||
*
|
||||
* Copyright (c) Remix Software Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE.md file in the root directory of this source tree.
|
||||
*
|
||||
* @license MIT
|
||||
*/var Aa="popstate";function pm(e={}){function t(r,l){let{pathname:o,search:s,hash:i}=r.location;return Es("",{pathname:o,search:s,hash:i},l.state&&l.state.usr||null,l.state&&l.state.key||"default")}function n(r,l){return typeof l=="string"?l:kr(l)}return hm(t,n,null,e)}function K(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Ke(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function mm(){return Math.random().toString(36).substring(2,10)}function Ua(e,t){return{usr:e.state,key:e.key,idx:t}}function Es(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?On(t):t,state:n,key:t&&t.key||r||mm()}}function kr({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function On(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function hm(e,t,n,r={}){let{window:l=document.defaultView,v5Compat:o=!1}=r,s=l.history,i="POP",u=null,c=y();c==null&&(c=0,s.replaceState({...s.state,idx:c},""));function y(){return(s.state||{idx:null}).idx}function p(){i="POP";let N=y(),f=N==null?null:N-c;c=N,u&&u({action:i,location:w.location,delta:f})}function h(N,f){i="PUSH";let d=Es(w.location,N,f);c=y()+1;let m=Ua(d,c),k=w.createHref(d);try{s.pushState(m,"",k)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;l.location.assign(k)}o&&u&&u({action:i,location:w.location,delta:1})}function v(N,f){i="REPLACE";let d=Es(w.location,N,f);c=y();let m=Ua(d,c),k=w.createHref(d);s.replaceState(m,"",k),o&&u&&u({action:i,location:w.location,delta:0})}function x(N){return ym(N)}let w={get action(){return i},get location(){return e(l,s)},listen(N){if(u)throw new Error("A history only accepts one active listener");return l.addEventListener(Aa,p),u=N,()=>{l.removeEventListener(Aa,p),u=null}},createHref(N){return t(l,N)},createURL:x,encodeLocation(N){let f=x(N);return{pathname:f.pathname,search:f.search,hash:f.hash}},push:h,replace:v,go(N){return s.go(N)}};return w}function ym(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),K(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:kr(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function fd(e,t,n="/"){return gm(e,t,n,!1)}function gm(e,t,n,r){let l=typeof t=="string"?On(t):t,o=pt(l.pathname||"/",n);if(o==null)return null;let s=pd(e);vm(s);let i=null;for(let u=0;i==null&&u<s.length;++u){let c=Rm(o);i=_m(s[u],c,r)}return i}function pd(e,t=[],n=[],r="",l=!1){let o=(s,i,u=l,c)=>{let y={relativePath:c===void 0?s.path||"":c,caseSensitive:s.caseSensitive===!0,childrenIndex:i,route:s};if(y.relativePath.startsWith("/")){if(!y.relativePath.startsWith(r)&&u)return;K(y.relativePath.startsWith(r),`Absolute route path "${y.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),y.relativePath=y.relativePath.slice(r.length)}let p=at([r,y.relativePath]),h=n.concat(y);s.children&&s.children.length>0&&(K(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${p}".`),pd(s.children,t,h,p,u)),!(s.path==null&&!s.index)&&t.push({path:p,score:Em(p,s.index),routesMeta:h})};return e.forEach((s,i)=>{var u;if(s.path===""||!((u=s.path)!=null&&u.includes("?")))o(s,i);else for(let c of md(s.path))o(s,i,!0,c)}),t}function md(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,l=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return l?[o,""]:[o];let s=md(r.join("/")),i=[];return i.push(...s.map(u=>u===""?o:[o,u].join("/"))),l&&i.push(...s),i.map(u=>e.startsWith("/")&&u===""?"/":u)}function vm(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Cm(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var xm=/^:[\w-]+$/,wm=3,km=2,Nm=1,Sm=10,jm=-2,Ba=e=>e==="*";function Em(e,t){let n=e.split("/"),r=n.length;return n.some(Ba)&&(r+=jm),t&&(r+=km),n.filter(l=>!Ba(l)).reduce((l,o)=>l+(xm.test(o)?wm:o===""?Nm:Sm),r)}function Cm(e,t){return e.length===t.length&&e.slice(0,-1).every((r,l)=>r===t[l])?e[e.length-1]-t[t.length-1]:0}function _m(e,t,n=!1){let{routesMeta:r}=e,l={},o="/",s=[];for(let i=0;i<r.length;++i){let u=r[i],c=i===r.length-1,y=o==="/"?t:t.slice(o.length)||"/",p=Ol({path:u.relativePath,caseSensitive:u.caseSensitive,end:c},y),h=u.route;if(!p&&c&&n&&!r[r.length-1].route.index&&(p=Ol({path:u.relativePath,caseSensitive:u.caseSensitive,end:!1},y)),!p)return null;Object.assign(l,p.params),s.push({params:l,pathname:at([o,p.pathname]),pathnameBase:Om(at([o,p.pathnameBase])),route:h}),p.pathnameBase!=="/"&&(o=at([o,p.pathnameBase]))}return s}function Ol(e,t){typeof e=="string"&&(e={path:e,c
Line truncated
|
||||
|
||||
Please change the parent <Route path="${m}"> to <Route path="${m==="/"?"*":`${m}/*`}">.`)}let h=ht(),v;if(t){let m=typeof t=="string"?On(t):t;K(y==="/"||((d=m.pathname)==null?void 0:d.startsWith(y)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${y}" but pathname "${m.pathname}" was given in the \`location\` prop.`),v=m}else v=h;let x=v.pathname||"/",w=x;if(y!=="/"){let m=y.replace(/^\//,"").split("/");w="/"+x.replace(/^\//,"").split("/").slice(m.length).join("/")}let N=fd(e,{pathname:w});Ke(p||N!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),Ke(N==null||N[N.length-1].route.element!==void 0||N[N.length-1].route.Component!==void 0||N[N.length-1].route.lazy!==void 0,`Matched leaf route at location "${v.pathname}${v.search}${v.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let f=eh(N&&N.map(m=>Object.assign({},m,{params:Object.assign({},u,m.params),pathname:at([y,o.encodeLocation?o.encodeLocation(m.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:m.pathname]),pathnameBase:m.pathnameBase==="/"?y:at([y,o.encodeLocation?o.encodeLocation(m.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:m.pathnameBase])})),s,n,r,l);return t&&f?g.createElement(_r.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...v},navigationType:"POP"}},f):f}function Gm(){let e=oh(),t=Mm(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",l={padding:"0.5rem",backgroundColor:r},o={padding:"2px 4px",backgroundColor:r},s=null;return console.error("Error handled by React Router default ErrorBoundary:",e),s=g.createElement(g.Fragment,null,g.createElement("p",null,"💿 Hey developer 👋"),g.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",g.createElement("code",{style:o},"ErrorBoundary")," or"," ",g.createElement("code",{style:o},"errorElement")," prop on your route.")),g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},t),n?g.createElement("pre",{style:l},n):null,s)}var Xm=g.createElement(Gm,null),Sd=class extends g.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=Qm(e.digest);n&&(e=n)}let t=e!==void 0?g.createElement(et.Provider,{value:this.props.routeContext},g.createElement(Ei.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?g.createElement(Zm,{error:e},t):t}};Sd.contextType=Am;var Ro=new WeakMap;function Zm({children:e,error:t}){let{basename:n}=g.useContext(Te);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=Wm(t.digest);if(r){let l=Ro.get(t);if(l)throw l;let o=yd(r.location,n);if(hd&&!Ro.get(t))if(o.isExternal||r.reloadDocument)window.location.href=o.absoluteURL||o.to;else{const s=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:r.replace}));throw Ro.set(t,s),s}return g.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function qm({routeContext:e,match:t,children:n}){let r=g.useContext(In);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),g.createElement(et.Provider,{value:e},n)}function eh(e,t=[],n=null,r=null,l=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,s=n==null?void 0:n.errors;if(s!=null){let y=o.findIndex(p=>p.route.id&&(s==null?void 0:s[p.route.id])!==void 0);K(y>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),o=o.slice(0,Math.min(o.length,y+1))}let i=!1,u=-1;if(n)for(let y=0;y<o.length;y++){let p=o[y];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(u=y),p.route.id){let{loaderData:h,errors:v}=n,x=p.route.loader&&!h.hasOwnProperty(p.route.id)&&(!v||v[p.route.id]===void 0);if(p.route.lazy||Line truncated
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Ld=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Hh=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Wh=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Qa=e=>{const t=Wh(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/var Qh={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Kh=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Jh=g.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:l="",children:o,iconNode:s,...i},u)=>g.createElement("svg",{ref:u,...Qh,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Ld("lucide",l),...!o&&!Kh(i)&&{"aria-hidden":"true"},...i},[...s.map(([c,y])=>g.createElement(c,y)),...Array.isArray(o)?o:[o]]));/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const M=(e,t)=>{const n=g.forwardRef(({className:r,...l},o)=>g.createElement(Jh,{ref:o,iconNode:t,className:Ld(`lucide-${Hh(Qa(e))}`,`lucide-${e}`,r),...l}));return n.displayName=Qa(e),n};/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Yh=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Td=M("arrow-right",Yh);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Gh=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],Xh=M("bot",Gh);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Zh=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Il=M("check",Zh);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const qh=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Ka=M("chevron-down",qh);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const ey=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Dl=M("circle-check",ey);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const ty=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],ny=M("circle-x",ty);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const ry=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],zd=M("cloud",ry);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const ly=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Od=M("copy",ly);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const oy=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],sy=M("cpu",oy);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const iy=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],ay=M("download",iy);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const uy=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Ja=M("external-link",uy);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const cy=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]],dy=M("file-code",cy);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const fy=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],py=M("info",fy);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const my=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],hy=M("key",my);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const yy=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],Ya=M("layout-dashboard",yy);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const gy=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],vy=M("loader-circle",gy);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const xy=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],wy=M("lock",xy);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const ky=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],Ny=M("log-out",ky);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Sy=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],jy=M("menu",Sy);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Ey=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],Cy=M("message-square",Ey);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const _y=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],Py=M("play",_y);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Ry=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Ga=M("plus",Ry);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Ly=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Xa=M("search",Ly);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Ty=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],zy=M("send",Ty);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Oy=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],Id=M("server",Oy);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Iy=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Dd=M("shield-check",Iy);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Dy=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],by=M("square",Dy);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const My=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],$y=M("terminal",My);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Fy=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Za=M("trash-2",Fy);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Ay=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Uy=M("triangle-alert",Ay);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const By=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],bd=M("upload",By);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Vy=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],Hy=M("user",Vy);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Wy=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],Qy=M("users",Wy);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Ky=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ps=M("x",Ky);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Jy=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],Yy=M("zap",Jy);function Md(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var l=e.length;for(t=0;t<l;t++)e[t]&&(n=Md(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ee(){for(var e,t,n=0,r="",l=arguments.length;n<l;n++)(e=arguments[n])&&(t=Md(e))&&(r&&(r+=" "),r+=t);return r}function Gy({config:e,onRefresh:t,onMessage:n,authFetch:r}){var W,xe,me,vt;const[l,o]=g.useState(!1),[s,i]=g.useState(!1),[u,c]=g.useState(""),[y,p]=g.useState(null),[h,v]=g.useState({email:"",mobile:"",password:""}),[x,w]=g.useState(!1),[N,f]=g.useState({}),[d,m]=g.useState(!1),[k,S]=g.useState({}),[_,R]=g.useState(!1),[P,b]=g.useState({current:0,total:0,results:[]}),[O,pe]=g.useState(null),oe=r||fetch,Je=async()=>{try{const C=await oe("/admin/queue/status");if(C.ok){const I=await C.json();pe(I)}}catch(C){console.error("Failed to fetch queue status:",C)}};g.useEffect(()=>{Je();const C=setInterval(Je,5e3);return()=>clearInterval(C)},[]);const At=async()=>{if(u.trim()){w(!0);try{const C=await oe("/admin/keys",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:u.trim()})});if(C.ok)n("success","API 密钥添加成功"),c(""),o(!1),t();else{const I=await C.json();n("error",I.detail||"Failed to add")}}catch{n("error","网络错误")}finally{w(!1)}}},tn=async C=>{if(confirm("确定要删除此 API 密钥吗?"))try{(await oe(`/admin/keys/${encodeURIComponent(C)}`,{method:"DELETE"})).ok?(n("success","Deleted successfully"),t()):n("error","Delete failed")}catch{n("error","Network error")}},yt=async()=>{if(!h.password||!h.email&&!h.mobile){n("error","Password and Email/Mobile are required");return}w(!0);try{const C=await oe("/admin/accounts",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(h)});if(C.ok)n("success","账号添加成功"),v({email:"",mobile:"",password:""}),i(!1),t();else{const I=await C.json();n("error",I.detail||"Failed to add")}}catch{n("error","网络错误")}finally{w(!1)}},gt=async C=>{if(confirm("确定要删除此账号吗?"))try{(await oe(`/admin/accounts/${encodeURIComponent(C)}`,{method:"DELETE"})).ok?(n("success","Deleted successfully"),t()):n("error","Delete failed")}catch{n("error","Network error")}},L=async C=>{f(I=>({...I,[C]:!0}));try{const F=await(await oe("/admin/accounts/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({identifier:C})})).json();n(F.valid?"success":"error",`${C}: ${F.message}`),t()}catch(I){n("error","Validation failed: "+I.message)}finally{f(I=>({...I,[C]:!1}))}},E=async()=>{if(!confirm("校验所有账号?这可能需要一些时间。"))return;const C=e.accounts||[];if(C.length===0)return;m(!0),b({current:0,total:C.length,results:[]});let I=0;const F=[];for(let Fe=0;Fe<C.length;Fe++){const xt=C[Fe],tt=xt.email||xt.mobile;try{const ze=await(await oe("/admin/accounts/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({identifier:tt})})).json();F.push({id:tt,success:ze.valid,message:ze.message}),ze.valid&&I++}catch(nt){F.push({id:tt,success:!1,message:nt.message})}b({current:Fe+1,total:C.length,results:[...F]})}n("success",`Completed: ${I}/${C.length} valid`),t(),m(!1)},z=async C=>{S(I=>({...I,[C]:!0}));try{const F=await(await oe("/admin/accounts/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({identifier:C})})).json();n(F.success?"success":"error",`${C}: ${F.success?`Success (${F.response_time}ms)`:F.message}`),t()}catch(I){n("error","Test failed: "+I.message)}finally{S(I=>({...I,[C]:!1}))}},U=async()=>{if(!confirm("测试所有账号的 API 连通性?"))return;const C=e.accounts||[];if(C.length===0)return;R(!0),b({current:0,total:C.length,results:[]});let I=0;const F=[];for(let Fe=0;Fe<C.length;Fe++){const xt=C[Fe],tt=xt.email||xt.mobile;try{const ze=await(await oe("/admin/accounts/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({identifier:tt})})).json();F.push({id:tt,success:ze.success,message:ze.message,time:ze.response_time}),ze.success&&I++}catch(nt){F.push({id:tt,success:!1,message:nt.message})}b({current:Fe+1,total:C.length,results:[...F]})}n("success",`Completed: ${I}/${C.length} available`),t(),R(!1)};return a.jsxs("div",{className:"space-y-6",children:[O&&a.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[a.jsxs("div",{className:"bg-card border border-border rounded-xl p-4 flex flex-col justify-between shadow-sm relative overflow-hidden group",children:[a.jsx("div",{className:"absolute right-0 top-0 p-4 opacity-5 group-hover:opacity-10 transition-opacity",children:a.jsx(Dl,{className:"w-16 h-16"})}),a.jsx("p",{className:"text-xs font-medium text-muteLine truncated
|
||||
`);I=xt.pop()||"";for(const tt of xt){const nt=tt.trim();if(!nt||!nt.startsWith("data: "))continue;const ze=nt.slice(6);if(ze!=="[DONE]")try{const Rr=JSON.parse(ze);console.log("[ApiTester] Parsed JSON:",Rr);const Lr=(W=Rr.choices)==null?void 0:W[0];if(Lr!=null&&Lr.delta){const nn=Lr.delta;console.log("[ApiTester] Delta:",nn),nn.reasoning_content&&d(eo=>eo+nn.reasoning_content),nn.content&&(console.log("[ApiTester] Content:",nn.content),N(eo=>eo+nn.content))}}catch(Rr){console.error("Invalid JSON hunk:",ze,Rr)}}}}catch(xe){xe.name==="AbortError"?t("info","已停止生成"):(t("error","网络错误: "+xe.message),h({error:xe.message,success:!1}))}finally{x(!1),k(!1),S.current=null}}},At=async()=>{if(c){x(!0),h(null);try{const E=await O("/admin/accounts/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({identifier:c,model:r,message:o})}),z=await E.json();h({success:z.success,status_code:E.status,response:z,account:c}),z.success?t("success",`${c}: 测试成功 (${z.response_time}ms)`):t("error",`${c}: ${z.message}`)}catch(E){t("error","网络错误: "+E.message),h({error:E.message})}finally{x(!1)}return}Je()};return a.jsxs("div",{className:"flex flex-col lg:grid lg:grid-cols-12 gap-6 h-[calc(100vh-140px)]",children:[a.jsx("div",{className:ee("lg:col-span-3 flex flex-col transition-all duration-300 ease-in-out z-20",P?"h-auto":"h-14 lg:h-full"),children:a.jsxs("div",{className:"bg-card border border-border rounded-xl flex flex-col h-full shadow-sm",children:[a.jsxs("button",{onClick:()=>b(!P),className:"lg:hidden flex items-center justify-between p-4 w-full bg-muted/20 hover:bg-muted/30 transition-colors",children:[a.jsxs("div",{className:"flex items-center gap-2.5 font-medium text-sm text-foreground",children:[a.jsx("div",{className:"p-1.5 rounded-md bg-transparent text-foreground",children:a.jsx($y,{className:"w-4 h-4"})}),a.jsx("span",{children:"配置"})]}),a.jsx("div",{className:ee("transition-transform duration-300 text-muted-foreground",P?"rotate-180":""),children:a.jsx(Ka,{className:"w-4 h-4"})})]}),a.jsxs("div",{className:ee("p-4 space-y-6 overflow-y-auto custom-scrollbar flex-1",!P&&"hidden lg:block"),children:[a.jsxs("div",{className:"space-y-3",children:[a.jsx("label",{className:"text-[11px] font-semibold text-muted-foreground uppercase tracking-wider ml-0.5",children:"模型"}),a.jsx("div",{className:"grid grid-cols-1 gap-2",children:Xy.map(E=>{const z=E.icon;return a.jsxs("button",{onClick:()=>l(E.id),className:ee("group relative flex items-start gap-3 p-3 rounded-lg border text-left transition-all duration-200",r===E.id?"bg-secondary border-primary/50 shadow-sm":"bg-transparent border-transparent hover:bg-muted"),children:[a.jsx("div",{className:ee("p-1.5 rounded-md shrink-0 transition-colors",r===E.id?E.color:"text-muted-foreground group-hover:text-foreground"),children:a.jsx(z,{className:"w-4 h-4"})}),a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("div",{className:ee("font-medium text-sm",r===E.id?"text-foreground":"text-foreground/80"),children:E.name}),a.jsx("div",{className:"text-[11px] text-muted-foreground mt-0.5",children:E.desc})]}),r===E.id&&a.jsx("div",{className:ee("absolute top-3 right-3",E.color),children:a.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-current"})})]},E.id)})})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx("label",{className:"text-[11px] font-semibold text-muted-foreground uppercase tracking-wider ml-0.5",children:"账号策略"}),a.jsxs("div",{className:"relative",children:[a.jsxs("select",{className:"w-full h-10 pl-3 pr-8 bg-secondary border border-border rounded-lg text-sm appearance-none focus:outline-none focus:ring-1 focus:ring-ring focus:border-ring transition-all cursor-pointer hover:bg-muted",value:c,onChange:E=>y(E.target.value),children:[a.jsx("option",{value:"",className:"bg-popover text-popover-foreground",children:"🎲 随机切换 (支持流式预览)"}),pe.map((E,z)=>a.jsxs("option",{value:E.email||E.mobile,className:"bg-popover text-popover-foreground",children:["👤 ",E.email||E.mobile]},z))]}),a.jsx(Ka,{className:"absolute right-2.5 top-3 w-4 h-4 text-muted-foreground pointer-events-none"})]})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx("label",{className:"text-[11px] font-semibold text-muted-foreground uppercase tracking-wider ml-0.5",children:"API 密钥 (可选)"}),a.jsx("input",{type:"password",className:"w-full h-10 px-3 bg-muted/30 border border-border rounded-lg text-sm font-mono placeholder:text-muted-foreground/40 focus:outline-none focus:ring-1 focus:ring-ring focus:border-ring transition-all",placeholder:(tn=e.keys)!=null&&tn[0]?`默认: ...${e.keys[0].slice(-6)}`:"输入自定义密钥",value:i,onChange:E=>u(E.target.value)})]})]})]})}),a.jsxs("div",{className:"lg:col-span-9 flex flex-col bg-card border border-border rounded-xl shadow-sm overflow-hidden min-h-0 flex-1 relative",children:[a.jsxs("div",{className:"flex-1 overflow-y-auto p-4 lg:p-6 space-y-8 custom-scr
Line truncated
|
||||
"keys": ["your-api-key"],
|
||||
"accounts": [
|
||||
{"email": "...", "password": "...", "token": ""}
|
||||
]
|
||||
}`,spellCheck:!1})}),i&&a.jsx("div",{className:ee("p-4 border-t",i.imported_keys||i.imported_accounts?"bg-emerald-500/10 border-emerald-500/20":"bg-destructive/10 border-destructive/20"),children:a.jsxs("div",{className:"flex items-start gap-3",children:[i.imported_keys||i.imported_accounts?a.jsx(Il,{className:"w-5 h-5 text-emerald-500 mt-0.5"}):a.jsx(Uy,{className:"w-5 h-5 text-destructive mt-0.5"}),a.jsxs("div",{children:[a.jsx("h4",{className:ee("font-medium",i.imported_keys||i.imported_accounts?"text-emerald-500":"text-destructive"),children:"导入操作已完成"}),a.jsxs("p",{className:"text-sm opacity-80 mt-1",children:["成功导入了 ",i.imported_keys," 个 API 密钥,并更新了 ",i.imported_accounts," 个账号。"]})]})]})})]})]})}function eg({onMessage:e,authFetch:t}){const[n,r]=g.useState(""),[l,o]=g.useState(""),[s,i]=g.useState(""),[u,c]=g.useState(!1),[y,p]=g.useState(null),[h,v]=g.useState(null),x=t||fetch;g.useEffect(()=>{(async()=>{try{const f=await x("/admin/vercel/config");if(f.ok){const d=await f.json();v(d),d.project_id&&o(d.project_id),d.team_id&&i(d.team_id)}}catch(f){console.error("Failed to load preconfig:",f)}})()},[]);const w=async()=>{if(!(h!=null&&h.has_token&&!n?"__USE_PRECONFIG__":n)&&!(h!=null&&h.has_token)){e("error","需要 Vercel 访问令牌");return}if(!l){e("error","需要项目 ID");return}c(!0),p(null);try{const f=await x("/admin/vercel/sync",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({vercel_token:n,project_id:l,team_id:s||void 0})}),d=await f.json();f.ok?(p({...d,success:!0}),e("success",d.message)):(p({...d,success:!1}),e("error",d.detail||"同步失败"))}catch{e("error","网络错误")}finally{c(!1)}};return a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-8 max-w-5xl mx-auto h-[calc(100vh-140px)]",children:[a.jsxs("div",{className:"bg-card border border-border rounded-xl shadow-sm p-6 space-y-6",children:[a.jsxs("div",{className:"border-b border-border pb-6",children:[a.jsxs("h2",{className:"text-xl font-semibold flex items-center gap-2",children:[a.jsx(zd,{className:"w-6 h-6 text-primary"}),"Vercel 部署"]}),a.jsx("p",{className:"text-muted-foreground text-sm mt-1",children:"将当前密钥和账号配置直接同步到 Vercel 环境变量中。"})]}),a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"space-y-2",children:[a.jsxs("label",{className:"text-sm font-medium flex items-center justify-between",children:["Vercel 访问令牌",a.jsxs("a",{href:"https://vercel.com/account/tokens",target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline flex items-center gap-1",children:["获取令牌 ",a.jsx(Ja,{className:"w-3 h-3"})]})]}),a.jsxs("div",{className:"relative",children:[a.jsx("input",{type:"password",className:"w-full h-10 px-3 bg-background border border-border rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-ring focus:border-ring transition-all pr-10",placeholder:h!=null&&h.has_token?"正在使用预配置的令牌":"输入 Vercel 访问令牌",value:n,onChange:N=>r(N.target.value)}),(h==null?void 0:h.has_token)&&!n&&a.jsx("div",{className:"absolute right-3 top-2.5 text-emerald-500",children:a.jsx(Dl,{className:"w-5 h-5"})})]})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx("label",{className:"text-sm font-medium",children:"项目 ID"}),a.jsx("input",{type:"text",className:"w-full h-10 px-3 bg-background border border-border rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-ring focus:border-ring transition-all",placeholder:"prj_xxxxxxxxxxxx or Project Name",value:l,onChange:N=>o(N.target.value)}),a.jsx("p",{className:"text-xs text-muted-foreground",children:"可在项目设置 (Project Settings) → 常规 (General) 中找到"})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsxs("label",{className:"text-sm font-medium flex items-center gap-2",children:["团队 ID ",a.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"(可选)"})]}),a.jsx("input",{type:"text",className:"w-full h-10 px-3 bg-background border border-border rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-ring focus:border-ring transition-all",placeholder:"team_xxxxxxxxxxxx",value:s,onChange:N=>i(N.target.value)})]})]}),a.jsxs("div",{className:"pt-4",children:[a.jsx("button",{onClick:w,disabled:u,className:"w-full flex items-center justify-center gap-2 py-3 bg-primary text-primary-foreground rounded-lg hover:bg-primary/90 transition-all font-medium text-sm shadow-sm hover:shadow-md disabled:opacity-50 disabled:shadow-none",children:u?a.jsxs("span",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"w-4 h-4 border-2 border-current border-t-transparent rounded-full animate-spin"}),"正在同步..."]}):a.jsxs("span",{className:"flex items-center gap-2",children:["同步并重新部署 ",a.jsx(Td,{className:"w-4 h-4"})]})}),a.jsx("p",{className:"text-xs text-center text-muted-foreground mt-4"
Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.fixed{position:fixed}.absolute{position:absolute}.relLine truncated
|
||||
@@ -1,272 +0,0 @@
|
||||
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const o of l)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerPolicy&&(o.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?o.credentials="include":l.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(l){if(l.ep)return;l.ep=!0;const o=n(l);fetch(l.href,o)}})();function bd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var eu={exports:{}},Ol={},tu={exports:{}},D={};/**
|
||||
* @license React
|
||||
* react.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var wr=Symbol.for("react.element"),$d=Symbol.for("react.portal"),Fd=Symbol.for("react.fragment"),Ad=Symbol.for("react.strict_mode"),Ud=Symbol.for("react.profiler"),Bd=Symbol.for("react.provider"),Vd=Symbol.for("react.context"),Hd=Symbol.for("react.forward_ref"),Wd=Symbol.for("react.suspense"),Qd=Symbol.for("react.memo"),Kd=Symbol.for("react.lazy"),Ti=Symbol.iterator;function Jd(e){return e===null||typeof e!="object"?null:(e=Ti&&e[Ti]||e["@@iterator"],typeof e=="function"?e:null)}var nu={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ru=Object.assign,lu={};function Pn(e,t,n){this.props=e,this.context=t,this.refs=lu,this.updater=n||nu}Pn.prototype.isReactComponent={};Pn.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Pn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function ou(){}ou.prototype=Pn.prototype;function Rs(e,t,n){this.props=e,this.context=t,this.refs=lu,this.updater=n||nu}var Ls=Rs.prototype=new ou;Ls.constructor=Rs;ru(Ls,Pn.prototype);Ls.isPureReactComponent=!0;var zi=Array.isArray,su=Object.prototype.hasOwnProperty,Ts={current:null},iu={key:!0,ref:!0,__self:!0,__source:!0};function au(e,t,n){var r,l={},o=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)su.call(t,r)&&!iu.hasOwnProperty(r)&&(l[r]=t[r]);var i=arguments.length-2;if(i===1)l.children=n;else if(1<i){for(var a=Array(i),c=0;c<i;c++)a[c]=arguments[c+2];l.children=a}if(e&&e.defaultProps)for(r in i=e.defaultProps,i)l[r]===void 0&&(l[r]=i[r]);return{$$typeof:wr,type:e,key:o,ref:s,props:l,_owner:Ts.current}}function Yd(e,t){return{$$typeof:wr,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function zs(e){return typeof e=="object"&&e!==null&&e.$$typeof===wr}function Gd(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Oi=/\/+/g;function eo(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Gd(""+e.key):t.toString(36)}function Kr(e,t,n,r,l){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(o){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case wr:case $d:s=!0}}if(s)return s=e,l=l(s),e=r===""?"."+eo(s,0):r,zi(l)?(n="",e!=null&&(n=e.replace(Oi,"$&/")+"/"),Kr(l,t,n,"",function(c){return c})):l!=null&&(zs(l)&&(l=Yd(l,n+(!l.key||s&&s.key===l.key?"":(""+l.key).replace(Oi,"$&/")+"/")+e)),t.push(l)),1;if(s=0,r=r===""?".":r+":",zi(e))for(var i=0;i<e.length;i++){o=e[i];var a=r+eo(o,i);s+=Kr(o,t,n,a,l)}else if(a=Jd(e),typeof a=="function")for(e=a.call(e),i=0;!(o=e.next()).done;)o=o.value,a=r+eo(o,i++),s+=Kr(o,t,n,a,l);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function Rr(e,t,n){if(e==null)return e;var r=[],l=0;return Kr(e,r,"","",function(o){return t.call(n,o,l++)}),r}function Xd(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var ye={current:null},Jr={transition:null},Zd={ReactCurrentDispatcher:ye,ReactCurrentBatchConfig:Jr,ReactCurrentOwner:Ts};function uu(){throw Error("act(...) is not supported in production builds of React.")}D.Children={map:Rr,forEach:function(e,t,n){Rr(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Rr(e,function(){t++}),t},toArray:function(e){return Rr(e,function(t){return t})||[]},only:function(e){if(!zs(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};D.Component=Pn;D.Fragment=Fd;D.Profiler=Ud;D.PureComponent=Rs;D.StrictMode=Ad;D.Suspense=Wd;D.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Zd;D.act=uu;D.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=ru({},e.props),l=e.key,o=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,s=Ts.current),t.key!==void 0&&(l=""+t.key),e.type&&e.type.defaultProps)var i=e.type.defaultProps;for(a in t)su.call(t,a)&&!iu.hasOwnProperty(a)&&(r[a]=t[a]===void 0&&i!==void 0?i[a]:t[a])}var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){i=Array(a);for(var c=0;c<a;c++)i[c]=arguments[c+2];r.children=i}return{$$typeof:wr,type:e.type,key:l,ref:o,props:r,_owner:s}};D.createContext=function(e){return e={$$typeof:Vd,_currentValue:e,_currentValue2:e,_threadCount:0,ProviderLine truncated
|
||||
* @license React
|
||||
* react-jsx-runtime.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var ef=g,tf=Symbol.for("react.element"),nf=Symbol.for("react.fragment"),rf=Object.prototype.hasOwnProperty,lf=ef.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,of={key:!0,ref:!0,__self:!0,__source:!0};function cu(e,t,n){var r,l={},o=null,s=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)rf.call(t,r)&&!of.hasOwnProperty(r)&&(l[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)l[r]===void 0&&(l[r]=t[r]);return{$$typeof:tf,type:e,key:o,ref:s,props:l,_owner:lf.current}}Ol.Fragment=nf;Ol.jsx=cu;Ol.jsxs=cu;eu.exports=Ol;var u=eu.exports,To={},du={exports:{}},Pe={},fu={exports:{}},pu={};/**
|
||||
* @license React
|
||||
* scheduler.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/(function(e){function t(L,E){var z=L.length;L.push(E);e:for(;0<z;){var U=z-1>>>1,W=L[U];if(0<l(W,E))L[U]=E,L[z]=W,z=U;else break e}}function n(L){return L.length===0?null:L[0]}function r(L){if(L.length===0)return null;var E=L[0],z=L.pop();if(z!==E){L[0]=z;e:for(var U=0,W=L.length,ve=W>>>1;U<ve;){var C=2*(U+1)-1,I=L[C],b=C+1,re=L[b];if(0>l(I,z))b<W&&0>l(re,I)?(L[U]=re,L[b]=z,U=b):(L[U]=I,L[C]=z,U=C);else if(b<W&&0>l(re,z))L[U]=re,L[b]=z,U=b;else break e}}return E}function l(L,E){var z=L.sortIndex-E.sortIndex;return z!==0?z:L.id-E.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,i=s.now();e.unstable_now=function(){return s.now()-i}}var a=[],c=[],h=1,p=null,y=3,v=!1,x=!1,k=!1,N=typeof setTimeout=="function"?setTimeout:null,f=typeof clearTimeout=="function"?clearTimeout:null,d=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function m(L){for(var E=n(c);E!==null;){if(E.callback===null)r(c);else if(E.startTime<=L)r(c),E.sortIndex=E.expirationTime,t(a,E);else break;E=n(c)}}function w(L){if(k=!1,m(L),!x)if(n(a)!==null)x=!0,ht(S);else{var E=n(c);E!==null&&yt(w,E.startTime-L)}}function S(L,E){x=!1,k&&(k=!1,f(R),R=-1),v=!0;var z=y;try{for(m(E),p=n(a);p!==null&&(!(p.expirationTime>E)||L&&!ue());){var U=p.callback;if(typeof U=="function"){p.callback=null,y=p.priorityLevel;var W=U(p.expirationTime<=E);E=e.unstable_now(),typeof W=="function"?p.callback=W:p===n(a)&&r(a),m(E)}else r(a);p=n(a)}if(p!==null)var ve=!0;else{var C=n(c);C!==null&&yt(w,C.startTime-E),ve=!1}return ve}finally{p=null,y=z,v=!1}}var _=!1,P=null,R=-1,F=5,O=-1;function ue(){return!(e.unstable_now()-O<F)}function qe(){if(P!==null){var L=e.unstable_now();O=L;var E=!0;try{E=P(!0,L)}finally{E?et():(_=!1,P=null)}}else _=!1}var et;if(typeof d=="function")et=function(){d(qe)};else if(typeof MessageChannel<"u"){var $t=new MessageChannel,qt=$t.port2;$t.port1.onmessage=qe,et=function(){qt.postMessage(null)}}else et=function(){N(qe,0)};function ht(L){P=L,_||(_=!0,et())}function yt(L,E){R=N(function(){L(e.unstable_now())},E)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(L){L.callback=null},e.unstable_continueExecution=function(){x||v||(x=!0,ht(S))},e.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):F=0<L?Math.floor(1e3/L):5},e.unstable_getCurrentPriorityLevel=function(){return y},e.unstable_getFirstCallbackNode=function(){return n(a)},e.unstable_next=function(L){switch(y){case 1:case 2:case 3:var E=3;break;default:E=y}var z=y;y=E;try{return L()}finally{y=z}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(L,E){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var z=y;y=L;try{return E()}finally{y=z}},e.unstable_scheduleCallback=function(L,E,z){var U=e.unstable_now();switch(typeof z=="object"&&z!==null?(z=z.delay,z=typeof z=="number"&&0<z?U+z:U):z=U,L){case 1:var W=-1;break;case 2:W=250;break;case 5:W=1073741823;break;case 4:W=1e4;break;default:W=5e3}return W=z+W,L={id:h++,callback:E,priorityLevel:L,startTime:z,expirationTime:W,sortIndex:-1},z>U?(L.sortIndex=z,t(c,L),n(a)===null&&L===n(c)&&(k?(f(R),R=-1):k=!0,yt(w,z-U))):(L.sortIndex=W,t(a,L),x||v||(x=!0,ht(S))),L},e.unstable_shouldYield=ue,e.unstable_wrapCallback=function(L){var E=y;return function(){var z=y;y=E;try{return L.apply(this,arguments)}finally{y=z}}}})(pu);fu.exports=pu;var sf=fu.exports;/**
|
||||
* @license React
|
||||
* react-dom.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var af=g,_e=sf;function j(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var mu=new Set,nr={};function Xt(e,t){kn(e,t),kn(e+"Capture",t)}function kn(e,t){for(nr[e]=t,e=0;e<t.length;e++)mu.add(t[e])}var at=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),zo=Object.prototype.hasOwnProperty,uf=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Ii={},Di={};function cf(e){return zo.call(Di,e)?!0:zo.call(Ii,e)?!1:uf.test(e)?Di[e]=!0:(Ii[e]=!0,!1)}function df(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function ff(e,t,n,r){if(t===null||typeof t>"u"||df(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ge(e,t,n,r,l,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var ae={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ae[e]=new ge(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ae[t]=new ge(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ae[e]=new ge(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ae[e]=new ge(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ae[e]=new ge(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ae[e]=new ge(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ae[e]=new ge(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ae[e]=new ge(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ae[e]=new ge(e,5,!1,e.toLowerCase(),null,!1,!1)});var Os=/[\-:]([a-z])/g;function Is(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Os,Is);ae[t]=new ge(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Os,Is);ae[t]=new ge(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Os,Is);ae[t]=new ge(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ae[e]=new ge(e,1,!1,e.toLowerCase(),null,!1,!1)});ae.xlinkHref=new ge("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ae[e]=new ge(e,1,!1,e.toLowerCase(),null,!0,!0)});function Ds(e,t,n,r){var l=ae.hasOwnProperty(t)?ae[t]:null;(l!==null?l.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="
Line truncated
|
||||
`+to+e}var no=!1;function ro(e,t){if(!e||no)return"";no=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var l=c.stack.split(`
|
||||
`),o=r.stack.split(`
|
||||
`),s=l.length-1,i=o.length-1;1<=s&&0<=i&&l[s]!==o[i];)i--;for(;1<=s&&0<=i;s--,i--)if(l[s]!==o[i]){if(s!==1||i!==1)do if(s--,i--,0>i||l[s]!==o[i]){var a=`
|
||||
`+l[s].replace(" at new "," at ");return e.displayName&&a.includes("<anonymous>")&&(a=a.replace("<anonymous>",e.displayName)),a}while(1<=s&&0<=i);break}}}finally{no=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Vn(e):""}function pf(e){switch(e.tag){case 5:return Vn(e.type);case 16:return Vn("Lazy");case 13:return Vn("Suspense");case 19:return Vn("SuspenseList");case 0:case 2:case 15:return e=ro(e.type,!1),e;case 11:return e=ro(e.type.render,!1),e;case 1:return e=ro(e.type,!0),e;default:return""}}function Mo(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case rn:return"Fragment";case nn:return"Portal";case Oo:return"Profiler";case Ms:return"StrictMode";case Io:return"Suspense";case Do:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case yu:return(e.displayName||"Context")+".Consumer";case hu:return(e._context.displayName||"Context")+".Provider";case bs:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case $s:return t=e.displayName||null,t!==null?t:Mo(e.type)||"Memo";case xt:t=e._payload,e=e._init;try{return Mo(e(t))}catch{}}return null}function mf(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Mo(t);case 8:return t===Ms?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Ot(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function vu(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function hf(e){var t=vu(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Tr(e){e._valueTracker||(e._valueTracker=hf(e))}function xu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=vu(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function il(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function bo(e,t){var n=t.checked;return G({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function bi(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Ot(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function wu(e,t){t=t.checked,t!=null&&Ds(e,"checked",t,!1)}function $o(e,t){wu(e,t);var n=Ot(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Fo(e,t.type,n):t.hasOwnProperty("defaultValue")&&Fo(e,t.type,Ot(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function $i(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Fo(e,t,n){(t!=="number"||il(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Hn=Array.isArray;function hn(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l<n.length;l++)t["$"+n[l]]=!0;for(n=0;n<e.length;n++)l=t.hasOwnProperty("$"+e[n].value),e[n].selected!==l&&(e[n].selected=l),l&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Ot(n),t=null,l=0;l<e.length;l++){if(e[l].value===n){e[l].selected=!0,r&&(e[l].defaultSelected=!0);return}t!==null||e[l].disabled||(t=e[l])}t!==null&&(t.selected=!0)}}function Ao(e,t){if(t.dang
Line truncated
|
||||
`).replace(Ep,"")}function Fr(e,t,n){if(t=ia(t),ia(e)!==t&&n)throw Error(j(425))}function hl(){}var qo=null,es=null;function ts(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var ns=typeof setTimeout=="function"?setTimeout:void 0,Cp=typeof clearTimeout=="function"?clearTimeout:void 0,aa=typeof Promise=="function"?Promise:void 0,_p=typeof queueMicrotask=="function"?queueMicrotask:typeof aa<"u"?function(e){return aa.resolve(null).then(e).catch(Pp)}:ns;function Pp(e){setTimeout(function(){throw e})}function go(e,t){var n=t,r=0;do{var l=n.nextSibling;if(e.removeChild(n),l&&l.nodeType===8)if(n=l.data,n==="/$"){if(r===0){e.removeChild(l),ir(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=l}while(n);ir(t)}function Pt(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function ua(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Ln=Math.random().toString(36).slice(2),Ye="__reactFiber$"+Ln,fr="__reactProps$"+Ln,ut="__reactContainer$"+Ln,rs="__reactEvents$"+Ln,Rp="__reactListeners$"+Ln,Lp="__reactHandles$"+Ln;function Ut(e){var t=e[Ye];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ut]||n[Ye]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=ua(e);e!==null;){if(n=e[Ye])return n;e=ua(e)}return t}e=n,n=e.parentNode}return null}function Sr(e){return e=e[Ye]||e[ut],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function an(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(j(33))}function $l(e){return e[fr]||null}var ls=[],un=-1;function Mt(e){return{current:e}}function H(e){0>un||(e.current=ls[un],ls[un]=null,un--)}function B(e,t){un++,ls[un]=e.current,e.current=t}var It={},pe=Mt(It),ke=Mt(!1),Qt=It;function Nn(e,t){var n=e.type.contextTypes;if(!n)return It;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},o;for(o in n)l[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function Ne(e){return e=e.childContextTypes,e!=null}function yl(){H(ke),H(pe)}function ca(e,t,n){if(pe.current!==It)throw Error(j(168));B(pe,t),B(ke,n)}function ac(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(j(108,mf(e)||"Unknown",l));return G({},n,r)}function gl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||It,Qt=pe.current,B(pe,e),B(ke,ke.current),!0}function da(e,t,n){var r=e.stateNode;if(!r)throw Error(j(169));n?(e=ac(e,t,Qt),r.__reactInternalMemoizedMergedChildContext=e,H(ke),H(pe),B(pe,e)):H(ke),B(ke,n)}var rt=null,Fl=!1,vo=!1;function uc(e){rt===null?rt=[e]:rt.push(e)}function Tp(e){Fl=!0,uc(e)}function bt(){if(!vo&&rt!==null){vo=!0;var e=0,t=A;try{var n=rt;for(A=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}rt=null,Fl=!1}catch(l){throw rt!==null&&(rt=rt.slice(e+1)),Iu(As,bt),l}finally{A=t,vo=!1}}return null}var cn=[],dn=0,vl=null,xl=0,Te=[],ze=0,Kt=null,lt=1,ot="";function Ft(e,t){cn[dn++]=xl,cn[dn++]=vl,vl=e,xl=t}function cc(e,t,n){Te[ze++]=lt,Te[ze++]=ot,Te[ze++]=Kt,Kt=e;var r=lt;e=ot;var l=32-Ue(r)-1;r&=~(1<<l),n+=1;var o=32-Ue(t)+l;if(30<o){var s=l-l%5;o=(r&(1<<s)-1).toString(32),r>>=s,l-=s,lt=1<<32-Ue(t)+l|n<<l|r,ot=o+e}else lt=1<<o|n<<l|r,ot=e}function Ys(e){e.return!==null&&(Ft(e,1),cc(e,1,0))}function Gs(e){for(;e===vl;)vl=cn[--dn],cn[dn]=null,xl=cn[--dn],cn[dn]=null;for(;e===Kt;)Kt=Te[--ze],Te[ze]=null,ot=Te[--ze],Te[ze]=null,lt=Te[--ze],Te[ze]=null}var Ce=null,Ee=null,Q=!1,Ae=null;function dc(e,t){var n=Oe(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function fa(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Ce=e,Ee=Pt(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ce=e,Ee=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Kt!==null?{id:lt,overflow:ot}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Oe(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Ce=e,Ee=null,!0):!1;default:return!1}}function os(e){return(e.mode&1)!==0&&(e.flags&128)===0}function ss(e){if(Q){var t=Ee;if(t){var n=t;if(!fa(e,t)){if(os(e))throw Error(j(418));t=Pt(n.nextSibling);var r=Ce;t&&fa(e,t)?dc(r,n):(e.flags=e.flags&-4097|2,Q=!1,Ce=e)}}else{if(os(e))throw Error(j(418));e.flags=e.flags&-4097|2,Q=!1,Ce=e}}}function pa(e){for(e=e.return;e!==null&&e.t
Line truncated
|
||||
Error generating stack: `+o.message+`
|
||||
`+o.stack}return{value:e,source:t,stack:l,digest:null}}function So(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function cs(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Ap=typeof WeakMap=="function"?WeakMap:Map;function $c(e,t,n){n=st(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){_l||(_l=!0,ws=r),cs(e,t)},n}function Fc(e,t,n){n=st(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var l=t.value;n.payload=function(){return r(l)},n.callback=function(){cs(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){cs(e,t),typeof r!="function"&&(Lt===null?Lt=new Set([this]):Lt.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function ka(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Ap;var l=new Set;r.set(t,l)}else l=r.get(t),l===void 0&&(l=new Set,r.set(t,l));l.has(n)||(l.add(n),e=em.bind(null,e,t,n),t.then(e,e))}function Na(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Sa(e,t,n,r,l){return e.mode&1?(e.flags|=65536,e.lanes=l,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=st(-1,1),t.tag=2,Rt(n,t,1))),n.lanes|=1),e)}var Up=pt.ReactCurrentOwner,we=!1;function me(e,t,n,r){t.child=e===null?mc(t,null,n,r):jn(t,e.child,n,r)}function ja(e,t,n,r,l){n=n.render;var o=t.ref;return xn(t,l),r=ii(e,t,n,r,o,l),n=ai(),e!==null&&!we?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,dt(e,t,l)):(Q&&n&&Ys(t),t.flags|=1,me(e,t,r,l),t.child)}function Ea(e,t,n,r,l){if(e===null){var o=n.type;return typeof o=="function"&&!vi(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,Ac(e,t,o,r,l)):(e=ll(n.type,null,r,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&l)){var s=o.memoizedProps;if(n=n.compare,n=n!==null?n:ur,n(s,r)&&e.ref===t.ref)return dt(e,t,l)}return t.flags|=1,e=zt(o,r),e.ref=t.ref,e.return=t,t.child=e}function Ac(e,t,n,r,l){if(e!==null){var o=e.memoizedProps;if(ur(o,r)&&e.ref===t.ref)if(we=!1,t.pendingProps=r=o,(e.lanes&l)!==0)e.flags&131072&&(we=!0);else return t.lanes=e.lanes,dt(e,t,l)}return ds(e,t,n,r,l)}function Uc(e,t,n){var r=t.pendingProps,l=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},B(mn,je),je|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,B(mn,je),je|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,B(mn,je),je|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,B(mn,je),je|=r;return me(e,t,l,n),t.child}function Bc(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function ds(e,t,n,r,l){var o=Ne(n)?Qt:pe.current;return o=Nn(t,o),xn(t,l),n=ii(e,t,n,r,o,l),r=ai(),e!==null&&!we?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,dt(e,t,l)):(Q&&r&&Ys(t),t.flags|=1,me(e,t,n,l),t.child)}function Ca(e,t,n,r,l){if(Ne(n)){var o=!0;gl(t)}else o=!1;if(xn(t,l),t.stateNode===null)tl(e,t),bc(t,n,r),us(t,n,r,l),r=!0;else if(e===null){var s=t.stateNode,i=t.memoizedProps;s.props=i;var a=s.context,c=n.contextType;typeof c=="object"&&c!==null?c=De(c):(c=Ne(n)?Qt:pe.current,c=Nn(t,c));var h=n.getDerivedStateFromProps,p=typeof h=="function"||typeof s.getSnapshotBeforeUpdate=="function";p||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(i!==r||a!==c)&&wa(t,s,r,c),wt=!1;var y=t.memoizedState;s.state=y,Nl(t,r,s,l),a=t.memoizedState,i!==r||y!==a||ke.current||wt?(typeof h=="function"&&(as(t,n,h,r),a=t.memoizedState),(i=wt||xa(t,n,i,r,y,a,c))?(p||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=a),s.props=r,s.state=a,s.context=c,r=i):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,yc(e,t),i=t.memoizedProps,c=t.type===t.elementType?i:$e(t.type,i),s.props=c,p=t.pendingProps,y=s.context,a=n.contextType,typeof a=="object"&&a!==null?a=De(a):(a=Ne(n)?Qt:pe.current,a=Nn(t,a));var v=n.getDerivedStateFromProps;(h=typeof v=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(i!==p||y!==a)&&wa(t,s,r,a),wt=!1,y=t.memoizedState,s.state=y,Nl(t,r,s,l);var x=t.memoizedState;i
Line truncated
|
||||
* react-router v7.13.0
|
||||
*
|
||||
* Copyright (c) Remix Software Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE.md file in the root directory of this source tree.
|
||||
*
|
||||
* @license MIT
|
||||
*/var Aa="popstate";function fm(e={}){function t(r,l){let{pathname:o,search:s,hash:i}=r.location;return js("",{pathname:o,search:s,hash:i},l.state&&l.state.usr||null,l.state&&l.state.key||"default")}function n(r,l){return typeof l=="string"?l:xr(l)}return mm(t,n,null,e)}function K(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function He(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function pm(){return Math.random().toString(36).substring(2,10)}function Ua(e,t){return{usr:e.state,key:e.key,idx:t}}function js(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Tn(t):t,state:n,key:t&&t.key||r||pm()}}function xr({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Tn(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function mm(e,t,n,r={}){let{window:l=document.defaultView,v5Compat:o=!1}=r,s=l.history,i="POP",a=null,c=h();c==null&&(c=0,s.replaceState({...s.state,idx:c},""));function h(){return(s.state||{idx:null}).idx}function p(){i="POP";let N=h(),f=N==null?null:N-c;c=N,a&&a({action:i,location:k.location,delta:f})}function y(N,f){i="PUSH";let d=js(k.location,N,f);c=h()+1;let m=Ua(d,c),w=k.createHref(d);try{s.pushState(m,"",w)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;l.location.assign(w)}o&&a&&a({action:i,location:k.location,delta:1})}function v(N,f){i="REPLACE";let d=js(k.location,N,f);c=h();let m=Ua(d,c),w=k.createHref(d);s.replaceState(m,"",w),o&&a&&a({action:i,location:k.location,delta:0})}function x(N){return hm(N)}let k={get action(){return i},get location(){return e(l,s)},listen(N){if(a)throw new Error("A history only accepts one active listener");return l.addEventListener(Aa,p),a=N,()=>{l.removeEventListener(Aa,p),a=null}},createHref(N){return t(l,N)},createURL:x,encodeLocation(N){let f=x(N);return{pathname:f.pathname,search:f.search,hash:f.hash}},push:y,replace:v,go(N){return s.go(N)}};return k}function hm(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),K(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:xr(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function fd(e,t,n="/"){return ym(e,t,n,!1)}function ym(e,t,n,r){let l=typeof t=="string"?Tn(t):t,o=ft(l.pathname||"/",n);if(o==null)return null;let s=pd(e);gm(s);let i=null;for(let a=0;i==null&&a<s.length;++a){let c=Pm(o);i=Cm(s[a],c,r)}return i}function pd(e,t=[],n=[],r="",l=!1){let o=(s,i,a=l,c)=>{let h={relativePath:c===void 0?s.path||"":c,caseSensitive:s.caseSensitive===!0,childrenIndex:i,route:s};if(h.relativePath.startsWith("/")){if(!h.relativePath.startsWith(r)&&a)return;K(h.relativePath.startsWith(r),`Absolute route path "${h.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),h.relativePath=h.relativePath.slice(r.length)}let p=it([r,h.relativePath]),y=n.concat(h);s.children&&s.children.length>0&&(K(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${p}".`),pd(s.children,t,y,p,a)),!(s.path==null&&!s.index)&&t.push({path:p,score:jm(p,s.index),routesMeta:y})};return e.forEach((s,i)=>{var a;if(s.path===""||!((a=s.path)!=null&&a.includes("?")))o(s,i);else for(let c of md(s.path))o(s,i,!0,c)}),t}function md(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,l=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return l?[o,""]:[o];let s=md(r.join("/")),i=[];return i.push(...s.map(a=>a===""?o:[o,a].join("/"))),l&&i.push(...s),i.map(a=>e.startsWith("/")&&a===""?"/":a)}function gm(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Em(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var vm=/^:[\w-]+$/,xm=3,wm=2,km=1,Nm=10,Sm=-2,Ba=e=>e==="*";function jm(e,t){let n=e.split("/"),r=n.length;return n.some(Ba)&&(r+=Sm),t&&(r+=wm),n.filter(l=>!Ba(l)).reduce((l,o)=>l+(vm.test(o)?xm:o===""?km:Nm),r)}function Em(e,t){return e.length===t.length&&e.slice(0,-1).every((r,l)=>r===t[l])?e[e.length-1]-t[t.length-1]:0}function Cm(e,t,n=!1){let{routesMeta:r}=e,l={},o="/",s=[];for(let i=0;i<r.length;++i){let a=r[i],c=i===r.length-1,h=o==="/"?t:t.slice(o.length)||"/",p=Tl({path:a.relativePath,caseSensitive:a.caseSensitive,end:c},h),y=a.route;if(!p&&c&&n&&!r[r.length-1].route.index&&(p=Tl({path:a.relativePath,caseSensitive:a.caseSensitive,end:!1},h)),!p)return null;Object.assign(l,p.params),s.push({params:l,pathname:it([o,p.pathname]),pathnameBase:zm(it([o,p.pathnameBase])),route:y}),p.pathnameBase!=="/"&&(o=it([o,p.pathnameBase]))}return s}function Tl(e,t){typeof e=="string"&&(e={path:e,c
Line truncated
|
||||
|
||||
Please change the parent <Route path="${m}"> to <Route path="${m==="/"?"*":`${m}/*`}">.`)}let y=mt(),v;if(t){let m=typeof t=="string"?Tn(t):t;K(h==="/"||((d=m.pathname)==null?void 0:d.startsWith(h)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${h}" but pathname "${m.pathname}" was given in the \`location\` prop.`),v=m}else v=y;let x=v.pathname||"/",k=x;if(h!=="/"){let m=h.replace(/^\//,"").split("/");k="/"+x.replace(/^\//,"").split("/").slice(m.length).join("/")}let N=fd(e,{pathname:k});He(p||N!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),He(N==null||N[N.length-1].route.element!==void 0||N[N.length-1].route.Component!==void 0||N[N.length-1].route.lazy!==void 0,`Matched leaf route at location "${v.pathname}${v.search}${v.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let f=qm(N&&N.map(m=>Object.assign({},m,{params:Object.assign({},a,m.params),pathname:it([h,o.encodeLocation?o.encodeLocation(m.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:m.pathname]),pathnameBase:m.pathnameBase==="/"?h:it([h,o.encodeLocation?o.encodeLocation(m.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:m.pathnameBase])})),s,n,r,l);return t&&f?g.createElement(Er.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...v},navigationType:"POP"}},f):f}function Ym(){let e=lh(),t=Mm(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",l={padding:"0.5rem",backgroundColor:r},o={padding:"2px 4px",backgroundColor:r},s=null;return console.error("Error handled by React Router default ErrorBoundary:",e),s=g.createElement(g.Fragment,null,g.createElement("p",null,"💿 Hey developer 👋"),g.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",g.createElement("code",{style:o},"ErrorBoundary")," or"," ",g.createElement("code",{style:o},"errorElement")," prop on your route.")),g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},t),n?g.createElement("pre",{style:l},n):null,s)}var Gm=g.createElement(Ym,null),Sd=class extends g.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=Wm(e.digest);n&&(e=n)}let t=e!==void 0?g.createElement(Ze.Provider,{value:this.props.routeContext},g.createElement(Ei.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?g.createElement(Xm,{error:e},t):t}};Sd.contextType=Fm;var Po=new WeakMap;function Xm({children:e,error:t}){let{basename:n}=g.useContext(Le);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=Hm(t.digest);if(r){let l=Po.get(t);if(l)throw l;let o=yd(r.location,n);if(hd&&!Po.get(t))if(o.isExternal||r.reloadDocument)window.location.href=o.absoluteURL||o.to;else{const s=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:r.replace}));throw Po.set(t,s),s}return g.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function Zm({routeContext:e,match:t,children:n}){let r=g.useContext(zn);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),g.createElement(Ze.Provider,{value:e},n)}function qm(e,t=[],n=null,r=null,l=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,s=n==null?void 0:n.errors;if(s!=null){let h=o.findIndex(p=>p.route.id&&(s==null?void 0:s[p.route.id])!==void 0);K(h>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),o=o.slice(0,Math.min(o.length,h+1))}let i=!1,a=-1;if(n)for(let h=0;h<o.length;h++){let p=o[h];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(a=h),p.route.id){let{loaderData:y,errors:v}=n,x=p.route.loader&&!y.hasOwnProperty(p.route.id)&&(!v||v[p.route.id]===void 0);if(p.route.lazy||Line truncated
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Ld=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Vh=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Hh=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Qa=e=>{const t=Hh(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/var Wh={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Qh=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Kh=g.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:l="",children:o,iconNode:s,...i},a)=>g.createElement("svg",{ref:a,...Wh,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Ld("lucide",l),...!o&&!Qh(i)&&{"aria-hidden":"true"},...i},[...s.map(([c,h])=>g.createElement(c,h)),...Array.isArray(o)?o:[o]]));/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const M=(e,t)=>{const n=g.forwardRef(({className:r,...l},o)=>g.createElement(Kh,{ref:o,iconNode:t,className:Ld(`lucide-${Vh(Qa(e))}`,`lucide-${e}`,r),...l}));return n.displayName=Qa(e),n};/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Jh=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Td=M("arrow-right",Jh);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Yh=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],Gh=M("bot",Yh);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Xh=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],_s=M("check",Xh);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Zh=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Ka=M("chevron-down",Zh);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const qh=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],zl=M("circle-check",qh);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const ey=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],ty=M("circle-x",ey);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const ny=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],zd=M("cloud",ny);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const ry=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],ly=M("copy",ry);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const oy=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],sy=M("cpu",oy);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const iy=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],ay=M("download",iy);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const uy=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Ja=M("external-link",uy);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const cy=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]],dy=M("file-code",cy);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const fy=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],py=M("info",fy);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const my=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],hy=M("key",my);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const yy=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],Ya=M("layout-dashboard",yy);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const gy=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],vy=M("loader-circle",gy);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const xy=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],wy=M("lock",xy);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const ky=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],Ny=M("log-out",ky);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Sy=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],jy=M("menu",Sy);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Ey=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],Cy=M("message-square",Ey);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const _y=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],Py=M("play",_y);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Ry=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Ga=M("plus",Ry);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Ly=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Xa=M("search",Ly);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Ty=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],zy=M("send",Ty);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Oy=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],Od=M("server",Oy);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Iy=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Id=M("shield-check",Iy);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Dy=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],My=M("square",Dy);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const by=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],$y=M("terminal",by);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Fy=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Za=M("trash-2",Fy);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Ay=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Uy=M("triangle-alert",Ay);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const By=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],Dd=M("upload",By);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Vy=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],Hy=M("user",Vy);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Wy=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],Qy=M("users",Wy);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Ky=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ps=M("x",Ky);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Jy=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],Yy=M("zap",Jy);function Md(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var l=e.length;for(t=0;t<l;t++)e[t]&&(n=Md(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ee(){for(var e,t,n=0,r="",l=arguments.length;n<l;n++)(e=arguments[n])&&(t=Md(e))&&(r&&(r+=" "),r+=t);return r}function Gy({config:e,onRefresh:t,onMessage:n,authFetch:r}){var z,U,W,ve;const[l,o]=g.useState(!1),[s,i]=g.useState(!1),[a,c]=g.useState(""),[h,p]=g.useState({email:"",mobile:"",password:""}),[y,v]=g.useState(!1),[x,k]=g.useState({}),[N,f]=g.useState(!1),[d,m]=g.useState({}),[w,S]=g.useState(!1),[_,P]=g.useState({current:0,total:0,results:[]}),[R,F]=g.useState(null),O=r||fetch,ue=async()=>{try{const C=await O("/admin/queue/status");if(C.ok){const I=await C.json();F(I)}}catch(C){console.error("Failed to fetch queue status:",C)}};g.useEffect(()=>{ue();const C=setInterval(ue,5e3);return()=>clearInterval(C)},[]);const qe=async()=>{if(a.trim()){v(!0);try{const C=await O("/admin/keys",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:a.trim()})});if(C.ok)n("success","API 密钥添加成功"),c(""),o(!1),t();else{const I=await C.json();n("error",I.detail||"Failed to add")}}catch{n("error","网络错误")}finally{v(!1)}}},et=async C=>{if(confirm("确定要删除此 API 密钥吗?"))try{(await O(`/admin/keys/${encodeURIComponent(C)}`,{method:"DELETE"})).ok?(n("success","Deleted successfully"),t()):n("error","Delete failed")}catch{n("error","Network error")}},$t=async()=>{if(!h.password||!h.email&&!h.mobile){n("error","Password and Email/Mobile are required");return}v(!0);try{const C=await O("/admin/accounts",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(h)});if(C.ok)n("success","账号添加成功"),p({email:"",mobile:"",password:""}),i(!1),t();else{const I=await C.json();n("error",I.detail||"Failed to add")}}catch{n("error","网络错误")}finally{v(!1)}},qt=async C=>{if(confirm("确定要删除此账号吗?"))try{(await O(`/admin/accounts/${encodeURIComponent(C)}`,{method:"DELETE"})).ok?(n("success","Deleted successfully"),t()):n("error","Delete failed")}catch{n("error","Network error")}},ht=async C=>{k(I=>({...I,[C]:!0}));try{const b=await(await O("/admin/accounts/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({identifier:C})})).json();n(b.valid?"success":"error",`${C}: ${b.message}`),t()}catch(I){n("error","Validation failed: "+I.message)}finally{k(I=>({...I,[C]:!1}))}},yt=async()=>{if(!confirm("校验所有账号?这可能需要一些时间。"))return;const C=e.accounts||[];if(C.length===0)return;f(!0),P({current:0,total:C.length,results:[]});let I=0;const b=[];for(let re=0;re<C.length;re++){const We=C[re],tt=We.email||We.mobile;try{const Qe=await(await O("/admin/accounts/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({identifier:tt})})).json();b.push({id:tt,success:Qe.valid,message:Qe.message}),Qe.valid&&I++}catch(gt){b.push({id:tt,success:!1,message:gt.message})}P({current:re+1,total:C.length,results:[...b]})}n("success",`Completed: ${I}/${C.length} valid`),t(),f(!1)},L=async C=>{m(I=>({...I,[C]:!0}));try{const b=await(await O("/admin/accounts/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({identifier:C})})).json();n(b.success?"success":"error",`${C}: ${b.success?`Success (${b.response_time}ms)`:b.message}`),t()}catch(I){n("error","Test failed: "+I.message)}finally{m(I=>({...I,[C]:!1}))}},E=async()=>{if(!confirm("测试所有账号的 API 连通性?"))return;const C=e.accounts||[];if(C.length===0)return;S(!0),P({current:0,total:C.length,results:[]});let I=0;const b=[];for(let re=0;re<C.length;re++){const We=C[re],tt=We.email||We.mobile;try{const Qe=await(await O("/admin/accounts/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({identifier:tt})})).json();b.push({id:tt,success:Qe.success,message:Qe.message,time:Qe.response_time}),Qe.success&&I++}catch(gt){b.push({id:tt,success:!1,message:gt.message})}P({current:re+1,total:C.length,results:[...b]})}n("success",`Completed: ${I}/${C.length} available`),t(),S(!1)};return u.jsxs("div",{className:"space-y-6",children:[R&&u.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[u.jsxs("div",{className:"bg-card border border-border rounded-xl p-4 flex flex-col justify-between shadow-sm relative overflow-hidden group",children:[u.jsx("div",{className:"absolute right-0 top-0 p-4 opacity-5 group-hover:opacity-10 transition-opacity",children:u.jsx(zl,{className:"w-16 h-16"})}),u.jsx("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-widLine truncated
|
||||
`);re=gt.pop()||"";for(const Qe of gt){const Xl=Qe.trim();if(!Xl||!Xl.startsWith("data: "))continue;const Zl=Xl.slice(6);if(Zl!=="[DONE]")try{const _r=JSON.parse(Zl);console.log("[ApiTester] Parsed JSON:",_r);const Pr=(W=_r.choices)==null?void 0:W[0];if(Pr!=null&&Pr.delta){const en=Pr.delta;console.log("[ApiTester] Delta:",en),en.reasoning_content&&d(ql=>ql+en.reasoning_content),en.content&&(console.log("[ApiTester] Content:",en.content),N(ql=>ql+en.content))}}catch(_r){console.error("Invalid JSON hunk:",Zl,_r)}}}}catch(ve){ve.name==="AbortError"?t("info","已停止生成"):(t("error","网络错误: "+ve.message),y({error:ve.message,success:!1}))}finally{x(!1),w(!1),S.current=null}}},$t=async()=>{if(c){x(!0),y(null);try{const E=await O("/admin/accounts/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({identifier:c,model:r,message:o})}),z=await E.json();y({success:z.success,status_code:E.status,response:z,account:c}),z.success?t("success",`${c}: 测试成功 (${z.response_time}ms)`):t("error",`${c}: ${z.message}`)}catch(E){t("error","网络错误: "+E.message),y({error:E.message})}finally{x(!1)}return}et()};return u.jsxs("div",{className:"flex flex-col lg:grid lg:grid-cols-12 gap-6 h-[calc(100vh-140px)]",children:[u.jsx("div",{className:ee("lg:col-span-3 flex flex-col transition-all duration-300 ease-in-out z-20",R?"h-auto":"h-14 lg:h-full"),children:u.jsxs("div",{className:"bg-card border border-border rounded-xl flex flex-col h-full shadow-sm",children:[u.jsxs("button",{onClick:()=>F(!R),className:"lg:hidden flex items-center justify-between p-4 w-full bg-muted/20 hover:bg-muted/30 transition-colors",children:[u.jsxs("div",{className:"flex items-center gap-2.5 font-medium text-sm text-foreground",children:[u.jsx("div",{className:"p-1.5 rounded-md bg-transparent text-foreground",children:u.jsx($y,{className:"w-4 h-4"})}),u.jsx("span",{children:"配置"})]}),u.jsx("div",{className:ee("transition-transform duration-300 text-muted-foreground",R?"rotate-180":""),children:u.jsx(Ka,{className:"w-4 h-4"})})]}),u.jsxs("div",{className:ee("p-4 space-y-6 overflow-y-auto custom-scrollbar flex-1",!R&&"hidden lg:block"),children:[u.jsxs("div",{className:"space-y-3",children:[u.jsx("label",{className:"text-[11px] font-semibold text-muted-foreground uppercase tracking-wider ml-0.5",children:"模型"}),u.jsx("div",{className:"grid grid-cols-1 gap-2",children:Xy.map(E=>{const z=E.icon;return u.jsxs("button",{onClick:()=>l(E.id),className:ee("group relative flex items-start gap-3 p-3 rounded-lg border text-left transition-all duration-200",r===E.id?"bg-secondary border-primary/50 shadow-sm":"bg-transparent border-transparent hover:bg-muted"),children:[u.jsx("div",{className:ee("p-1.5 rounded-md shrink-0 transition-colors",r===E.id?E.color:"text-muted-foreground group-hover:text-foreground"),children:u.jsx(z,{className:"w-4 h-4"})}),u.jsxs("div",{className:"min-w-0 flex-1",children:[u.jsx("div",{className:ee("font-medium text-sm",r===E.id?"text-foreground":"text-foreground/80"),children:E.name}),u.jsx("div",{className:"text-[11px] text-muted-foreground mt-0.5",children:E.desc})]}),r===E.id&&u.jsx("div",{className:ee("absolute top-3 right-3",E.color),children:u.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-current"})})]},E.id)})})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx("label",{className:"text-[11px] font-semibold text-muted-foreground uppercase tracking-wider ml-0.5",children:"账号策略"}),u.jsxs("div",{className:"relative",children:[u.jsxs("select",{className:"w-full h-10 pl-3 pr-8 bg-secondary border border-border rounded-lg text-sm appearance-none focus:outline-none focus:ring-1 focus:ring-ring focus:border-ring transition-all cursor-pointer hover:bg-muted",value:c,onChange:E=>h(E.target.value),children:[u.jsx("option",{value:"",className:"bg-popover text-popover-foreground",children:"🎲 随机切换 (支持流式预览)"}),ue.map((E,z)=>u.jsxs("option",{value:E.email||E.mobile,className:"bg-popover text-popover-foreground",children:["👤 ",E.email||E.mobile]},z))]}),u.jsx(Ka,{className:"absolute right-2.5 top-3 w-4 h-4 text-muted-foreground pointer-events-none"})]})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx("label",{className:"text-[11px] font-semibold text-muted-foreground uppercase tracking-wider ml-0.5",children:"API 密钥 (可选)"}),u.jsx("input",{type:"password",className:"w-full h-10 px-3 bg-muted/30 border border-border rounded-lg text-sm font-mono placeholder:text-muted-foreground/40 focus:outline-none focus:ring-1 focus:ring-ring focus:border-ring transition-all",placeholder:(qt=e.keys)!=null&&qt[0]?`默认: ...${e.keys[0].slice(-6)}`:"输入自定义密钥",value:i,onChange:E=>a(E.target.value)})]})]})]})}),u.jsxs("div",{className:"lg:col-span-9 flex flex-col bg-card border border-border rounded-xl shadow-sm overflow-hidden min-h-0 flex-1 relative",children:[u.jsxs("div",{className:"flex-1 overflow-y-auto p-4 lg:p-6 space-y-8 custom-sc
Line truncated
|
||||
"keys": ["your-api-key"],
|
||||
"accounts": [
|
||||
{"email": "...", "password": "...", "token": ""}
|
||||
]
|
||||
}`,spellCheck:!1})}),i&&u.jsx("div",{className:ee("p-4 border-t",i.imported_keys||i.imported_accounts?"bg-emerald-500/10 border-emerald-500/20":"bg-destructive/10 border-destructive/20"),children:u.jsxs("div",{className:"flex items-start gap-3",children:[i.imported_keys||i.imported_accounts?u.jsx(_s,{className:"w-5 h-5 text-emerald-500 mt-0.5"}):u.jsx(Uy,{className:"w-5 h-5 text-destructive mt-0.5"}),u.jsxs("div",{children:[u.jsx("h4",{className:ee("font-medium",i.imported_keys||i.imported_accounts?"text-emerald-500":"text-destructive"),children:"导入操作已完成"}),u.jsxs("p",{className:"text-sm opacity-80 mt-1",children:["成功导入了 ",i.imported_keys," 个 API 密钥,并更新了 ",i.imported_accounts," 个账号。"]})]})]})})]})]})}function eg({onMessage:e,authFetch:t}){const[n,r]=g.useState(""),[l,o]=g.useState(""),[s,i]=g.useState(""),[a,c]=g.useState(!1),[h,p]=g.useState(null),[y,v]=g.useState(null),x=t||fetch;g.useEffect(()=>{(async()=>{try{const f=await x("/admin/vercel/config");if(f.ok){const d=await f.json();v(d),d.project_id&&o(d.project_id),d.team_id&&i(d.team_id)}}catch(f){console.error("Failed to load preconfig:",f)}})()},[]);const k=async()=>{if(!(y!=null&&y.has_token&&!n?"__USE_PRECONFIG__":n)&&!(y!=null&&y.has_token)){e("error","需要 Vercel 访问令牌");return}if(!l){e("error","需要项目 ID");return}c(!0),p(null);try{const f=await x("/admin/vercel/sync",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({vercel_token:n,project_id:l,team_id:s||void 0})}),d=await f.json();f.ok?(p({...d,success:!0}),e("success",d.message)):(p({...d,success:!1}),e("error",d.detail||"同步失败"))}catch{e("error","网络错误")}finally{c(!1)}};return u.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-8 max-w-5xl mx-auto h-[calc(100vh-140px)]",children:[u.jsxs("div",{className:"bg-card border border-border rounded-xl shadow-sm p-6 space-y-6",children:[u.jsxs("div",{className:"border-b border-border pb-6",children:[u.jsxs("h2",{className:"text-xl font-semibold flex items-center gap-2",children:[u.jsx(zd,{className:"w-6 h-6 text-primary"}),"Vercel 部署"]}),u.jsx("p",{className:"text-muted-foreground text-sm mt-1",children:"将当前密钥和账号配置直接同步到 Vercel 环境变量中。"})]}),u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsxs("label",{className:"text-sm font-medium flex items-center justify-between",children:["Vercel 访问令牌",u.jsxs("a",{href:"https://vercel.com/account/tokens",target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline flex items-center gap-1",children:["获取令牌 ",u.jsx(Ja,{className:"w-3 h-3"})]})]}),u.jsxs("div",{className:"relative",children:[u.jsx("input",{type:"password",className:"w-full h-10 px-3 bg-background border border-border rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-ring focus:border-ring transition-all pr-10",placeholder:y!=null&&y.has_token?"正在使用预配置的令牌":"输入 Vercel 访问令牌",value:n,onChange:N=>r(N.target.value)}),(y==null?void 0:y.has_token)&&!n&&u.jsx("div",{className:"absolute right-3 top-2.5 text-emerald-500",children:u.jsx(zl,{className:"w-5 h-5"})})]})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx("label",{className:"text-sm font-medium",children:"项目 ID"}),u.jsx("input",{type:"text",className:"w-full h-10 px-3 bg-background border border-border rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-ring focus:border-ring transition-all",placeholder:"prj_xxxxxxxxxxxx or Project Name",value:l,onChange:N=>o(N.target.value)}),u.jsx("p",{className:"text-xs text-muted-foreground",children:"可在项目设置 (Project Settings) → 常规 (General) 中找到"})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsxs("label",{className:"text-sm font-medium flex items-center gap-2",children:["团队 ID ",u.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"(可选)"})]}),u.jsx("input",{type:"text",className:"w-full h-10 px-3 bg-background border border-border rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-ring focus:border-ring transition-all",placeholder:"team_xxxxxxxxxxxx",value:s,onChange:N=>i(N.target.value)})]})]}),u.jsxs("div",{className:"pt-4",children:[u.jsx("button",{onClick:k,disabled:a,className:"w-full flex items-center justify-center gap-2 py-3 bg-primary text-primary-foreground rounded-lg hover:bg-primary/90 transition-all font-medium text-sm shadow-sm hover:shadow-md disabled:opacity-50 disabled:shadow-none",children:a?u.jsxs("span",{className:"flex items-center gap-2",children:[u.jsx("span",{className:"w-4 h-4 border-2 border-current border-t-transparent rounded-full animate-spin"}),"正在同步..."]}):u.jsxs("span",{className:"flex items-center gap-2",children:["同步并重新部署 ",u.jsx(Td,{className:"w-4 h-4"})]})}),u.jsx("p",{className:"text-xs text-center text-muted-foreground mt-4"
Line truncated
|
||||
@@ -32,8 +32,8 @@
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap" rel="stylesheet">
|
||||
<script type="module" crossorigin src="/admin/assets/index-Da8PBvaf.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/admin/assets/index-BzdNSWuo.css">
|
||||
<script type="module" crossorigin src="/admin/assets/index-C7aw1GYL.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/admin/assets/index-D9_KYhGM.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
Generated
+2986
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user