diff --git a/CHANGELOG.md b/CHANGELOG.md index ded5814..044404f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,32 @@ --- +## 2026-11-16 · v3.6.11 + +### ✨ 新功能 + +- **同行热卖店铺页**(侧边栏新入口,位于「实时热卖榜」下方) + - 按您店铺的类型关键词,从闲鱼实时搜索聚合同类型**销量最好的 50 家店铺**(翻页提量 + 聚合去重) + - 每家显示:**销量、信用(等级★/搜索信号)、评论数、与您店铺的相似度、参考价值** + - **自定义排序**:按销量(默认)/ 按相似度 / 按信用 / 按评论数 + - **点击直达闲鱼**:店铺名与「店铺」按钮打开 `goofish.com/personal?userId=` 店铺主页(含全部商品),「商品」按钮打开代表商品 + - **AI 一键分析**:检测到模型 KEY 即由模型输出「最适合您店铺的同行 + 可借鉴打法 + 避坑」报告;未配 KEY 给出配置引导 + - 相似度 = 类型关键词命中率 50% + 词集重合 30% + 价格带 20%;参考价值 = 相似度 40% + 销量 25% + 信用 20% + 好评率 15% + - 抓取带进度条轮询(约 1 分钟)、命中风控给出明确等待提示、缓存落盘 `data/peer_shops_cache.json` + - 三个端点均挂登录鉴权(匿名 401 实测) +- **关于页文案调整** + - 「官网」标签改为 **「更多精品应用」**(链接仍指向 nav.88531.cn 导航页) + - 开源仓库地址改为 **`https://gitea.88531.cn/jinghui/tangzhuan-yu`**(显示 `jinghui/tangzhuan-yu`) + +### ✅ 验证 + +- 端到端真实抓取跑通:触发后约 40 秒完成,42 家店铺数据 + URL 格式全部正确 +- 关键词修复实测生效:类目数字 ID(如 50023914)与通用词不再进入搜索词 +- 浏览器实测:侧边栏导航、页面标题/排序按钮/AI 按钮/空态渲染正常;关于页三处断言全过(新标签、新仓库 URL、旧值消失) +- 仓库链接 `gitea.88531.cn/jinghui/tangzhuan-yu` 实测 200 + +--- + ## 2026-11-16 · v3.6.8 ### ✨ 新功能 diff --git a/app/reply_server.py b/app/reply_server.py index c69607f..ef9d472 100644 --- a/app/reply_server.py +++ b/app/reply_server.py @@ -42,6 +42,7 @@ from app.routers.ai_optimize import create_ai_optimize_router from app.routers.logistics_quote import create_logistics_quote_router from app.routers.logistics_agent import create_logistics_agent_router from app.routers.hotlist import create_hotlist_router +from app.routers.peer_shops import create_peer_shops_router from utils.qr_login import qr_login_manager from utils.xianyu_utils import trans_cookies from utils.image_utils import image_manager @@ -395,6 +396,7 @@ app.include_router(create_logistics_agent_router(get_current_user, db_manager)) logger.info("已注册物流 Agent 路由") app.include_router(create_hotlist_router(get_current_user, db_manager)) +app.include_router(create_peer_shops_router(get_current_user, db_manager)) logger.info("已注册实时热卖榜路由") from app.routers.pricewatch import create_pricewatch_router, start_scheduler as start_pricewatch_scheduler diff --git a/app/routers/peer_shops.py b/app/routers/peer_shops.py new file mode 100644 index 0000000..75e3bc1 --- /dev/null +++ b/app/routers/peer_shops.py @@ -0,0 +1,690 @@ +"""同行热卖店铺:按用户店铺类型抓取闲鱼同类型高销量店铺,给出相似度与参考价值。 + +流程: +1. 从该账号已同步商品的标题/类目提取类型关键词(型号 token + 中文高频词); +2. 关键词搜索闲鱼(pc.search),按加密 seller_id 聚合出候选店铺; +3. 按搜索成交量排序,逐店调 pc.detail 补齐明文 sellerId、销量、信用、好评率、 + 店铺标签,并拼出店铺主页 URL(goofish.com/personal?userId=); +4. 计算与用户店铺的相似度(词集 Jaccard + 价格带)与参考价值(加权分); +5. 缓存到 data/peer_shops_cache.json,前端轮询读取; +6. 用户配置了模型 KEY 时可一键 AI 分析最适合自己店铺的同行。 +""" + +from __future__ import annotations + +import asyncio +import json +import math +import os +import re +import statistics +import time +from collections import Counter +from typing import Any, Callable, Dict, List, Optional + +from fastapi import APIRouter, Depends, HTTPException +from loguru import logger +from pydantic import BaseModel, Field + +from utils.risk_control import is_risk_control_error +from utils.search_parse import extract_seller_signal, normalize_price, normalize_image, extract_want +from utils.xianyu_seller_api import SellerApiError, XianyuSellerAPI + +CACHE_FILE = os.getenv("PEER_SHOPS_CACHE", "data/peer_shops_cache.json") + +# 抓取参数 +MAX_KEYWORDS = 6 # 类型关键词数 +PAGES_PER_KEYWORD = 2 # 每关键词翻页数(单页只有 10 条,两页才够凑满 50 家) +SEARCH_GAP = 0.5 # 搜索间隔(风控友好) +DETAIL_GAP = 0.45 # 详情间隔 +CANDIDATE_TOP = 55 # 参与详情补齐的候选店铺数(保 50 个成片) +SHOPS_TOP = 50 # 最终展示店铺数 +REQUEST_TIMEOUT = 130.0 # AI 分析超时 + +# 不适合当搜索关键词的通用词(出现在商品标题里但搜了只会捞到无关同行) +_BAD_KEYWORDS = { + "合集", "全新", "二手", "包邮", "现货", "批发", "个人", "闲置", "转让", + "自用", "正常", "处理", "亏本", "清仓", "秒发", "当天", "低价", "急出", + "实拍", "现货", "优惠", "特价", "促销", "包退", "质保", "发货", "现货", + "2024", "2025", "2026", "2027", "精选", "推荐", "同款", "正品", +} + +# 分词停用词(碎片字) +_STOP = set("的了和与在有是我不你他她它们这那些个一二三四五六七八九十件全新二手闲置转让出售购买包邮可刀谢谢咨询请问什么怎么可以没有自己东西东西儿哦啊吧呢嘛~!!!,。、:;??()()【】[]\"'") + + +# --------------------------------------------------------------------------- # +# 关键词提取 +# --------------------------------------------------------------------------- # +def _extract_terms(text: str) -> List[str]: + """标题/标签 → 词列表:英文数字型号 token + 中文 2-4 字片段。""" + if not text: + return [] + lower = str(text).lower() + # 型号:字母开头(rtx4060/h310/m.2…)或带单位的数字(16g/1tb/15寸); + # 裸数字多半是价格、编号、日期,搜它只会白费请求。 + tokens = re.findall(r"[a-z][a-z0-9+./#-]{1,}|" + r"\d+(?:\.\d+)?(?:gb|tb|kg|g|t|w|寸|代)", lower) + zh_parts = re.findall(r"[\u4e00-\u9fa5]+", str(text)) + grams: List[str] = [] + for seg in zh_parts: + for n in (2, 3, 4): + for i in range(len(seg) - n + 1): + g = seg[i:i + n] + if g[0] in _STOP or g[-1] in _STOP or len(set(g)) == 1: + continue + grams.append(g) + return [t.strip() for t in tokens if len(t.strip()) >= 2] + grams + + +def _user_features(db_manager, cookie_id: str) -> Dict[str, Any]: + """用户店铺特征:商品标题分词、类目、价格中位数、搜索关键词。""" + rows = db_manager.get_items_by_cookie(cookie_id) or [] + titles = [str(r.get("item_title") or "") for r in rows if r.get("item_title")] + categories = [str(r.get("item_category") or "").strip() for r in rows if r.get("item_category")] + prices: List[float] = [] + for r in rows: + raw = str(r.get("item_price") or "").replace("¥", "").replace("¥", "").replace(",", "").strip() + try: + prices.append(float(raw)) + except ValueError: + pass + + term_counter: Counter = Counter() + for t in titles: + for term in set(_extract_terms(t)): + term_counter[term] += 1 + # 高频词优先,但型号类(英文/数字)权重加倍——型号是最强类型信号 + def _weight(term: str) -> float: + base = term_counter[term] + return base * (2.5 if re.search(r"[a-z0-9]", term) else 1.0) + + top_terms = sorted(term_counter, key=_weight, reverse=True) + + # 关键词:类目 + 型号 + 高频中文词,去重限量。 + # 类目字段可能是数字分类 ID(如 50023914),搜它只会白费请求,必须跳过。 + def _usable(w: str) -> bool: + w = w.strip() + if not w or len(w) > 12: + return False + if w.lower() in _BAD_KEYWORDS or w in _BAD_KEYWORDS: + return False + if w.isdigit() and len(w) >= 4: + return False + return len(w) >= 2 + + keywords: List[str] = [] + for c in categories: + if _usable(c) and c not in keywords: + keywords.append(c) + for term in top_terms: + if len(keywords) >= MAX_KEYWORDS: + break + if term in keywords or not _usable(term): + continue + # 太长的中文串(多为拼接碎片)与过短的词跳过 + if len(term) < 2 or len(term) > 10: + continue + keywords.append(term) + + med_price = statistics.median(prices) if prices else 0.0 + return { + "terms": top_terms[:400], + "term_set": set(top_terms[:400]), + "categories": categories, + "keywords": keywords, + "items_count": len(rows), + "med_price": med_price, + "titles": titles[:60], + } + + +# --------------------------------------------------------------------------- # +# 解析 +# --------------------------------------------------------------------------- # +def _parse_search(result: Dict[str, Any]) -> List[Dict[str, Any]]: + """pc.search → 商品列表(带加密 seller_id,用于按店铺聚合)。""" + out: List[Dict[str, Any]] = [] + for raw in (result.get("data") or {}).get("resultList") or []: + main = (((raw or {}).get("data") or {}).get("item") or {}).get("main") or {} + content = main.get("exContent") or {} + if not content: + continue + args = (main.get("clickParam") or {}).get("args") or {} + params = content.get("detailParams") or {} + item_id = str(content.get("itemId") or params.get("itemId") or args.get("item_id") or "").strip() + seller_id = str(args.get("seller_id") or "").strip() + if not item_id: + continue + credit, deals = extract_seller_signal(content) + title = str(content.get("title") or params.get("title") or "").strip() + out.append({ + "item_id": item_id, + "title": title, + "price": normalize_price(content), + "image": normalize_image(content.get("picUrl")), + "area": str(content.get("area") or ""), + "seller": str(content.get("userNickName") or params.get("userNick") or "").strip(), + "want_count": extract_want(content, args), + "seller_id": seller_id or (str(content.get("userActiveUrl") or "") or f"nick:{title[:0]}"), + "seller_credit": credit, + "seller_deals": deals, + "url": f"https://www.goofish.com/item?id={item_id}", + }) + return out + + +def _price_num(price: str) -> float: + try: + return float(str(price).replace("¥", "").replace("¥", "").replace(",", "").strip() or 0) + except ValueError: + return 0.0 + + +# --------------------------------------------------------------------------- # +# 打分 +# --------------------------------------------------------------------------- # +def _similarity( + shop_terms: set, + user_terms: set, + shop_price: float, + user_price: float, + hit_count: int, + total_keywords: int, +) -> int: + """相似度 0-100:类型关键词命中率 50% + 词集重合 30% + 价格带 20%。 + + - 命中率:该店出现在我几个类型关键词的搜索结果里(最直接的"同类"信号); + - 词集重合用 overlap 系数(交集/较小集合),大词集下 Jaccard 分母过大永远≈0; + - 价格带取对数距离,0.8 元软件店与实体同行会自然拉开。 + """ + if not user_terms: + return 0 + hit = (hit_count / total_keywords) if total_keywords else 0.0 + if shop_terms: + inter = len(shop_terms & user_terms) + overlap = inter / max(1, min(len(shop_terms), len(user_terms))) + else: + overlap = 0.0 + price_sim = 1.0 + if shop_price > 0 and user_price > 0: + ratio = math.log((shop_price + 1) / (user_price + 1)) + price_sim = math.exp(-abs(ratio) / 1.5) + score = 100 * (0.5 * hit + 0.3 * min(1.0, overlap * 3) + 0.2 * price_sim) + return max(0, min(100, round(score))) + + +# 信用文本 → 排序权重(detail 的 sellerLevel 缺失时用搜索信号兜底) +_CREDIT_TEXT_RANK = {"极好": 5, "优秀": 4, "良好": 3, "一般": 2, "较差": 1, "中等": 2} + + +def _credit_sort(level: int, text: str) -> int: + """信用排序键:等级优先(1-5→10-50),无等级时用搜索信号文本。""" + if level: + return level * 10 + return _CREDIT_TEXT_RANK.get((text or "").strip(), 0) + + +def _value_score(sim: int, sold: int, credit_level: int, good_rate: float) -> int: + """参考价值 0-100:相似度 40% + 销量 25% + 信用 20% + 好评率 15%。""" + sold_score = min(100.0, math.log10(max(sold, 0) + 1) / 4.3 * 100) + credit_score = max(0, min(100, (credit_level or 0) * 20)) + good_score = max(0.0, min(100.0, float(good_rate or 0))) + return round(0.4 * sim + 0.25 * sold_score + 0.2 * credit_score + 0.15 * good_score) + + +# --------------------------------------------------------------------------- # +# 缓存 / 状态 +# --------------------------------------------------------------------------- # +_cache: Dict[str, Any] = {} +_state_lock = asyncio.Lock() +# cookie_id -> {"state": idle|running|done|error, "done": n, "total": n, "stage": str, "error": str, "started_at": ts} +_progress: Dict[str, Dict[str, Any]] = {} +_last_refresh: Dict[str, float] = {} + + +def _load_cache() -> None: + global _cache + if os.path.exists(CACHE_FILE): + try: + with open(CACHE_FILE, "r", encoding="utf-8") as fh: + _cache = json.load(fh) or {} + except Exception as exc: + logger.warning(f"同行店铺缓存读取失败: {exc}") + _cache = {} + + +def _save_cache() -> None: + try: + directory = os.path.dirname(CACHE_FILE) + if directory: + os.makedirs(directory, exist_ok=True) + tmp = f"{CACHE_FILE}.tmp" + with open(tmp, "w", encoding="utf-8") as fh: + json.dump(_cache, fh, ensure_ascii=False) + os.replace(tmp, CACHE_FILE) + except Exception as exc: + logger.warning(f"同行店铺缓存写入失败: {exc}") + + +_load_cache() + + +# --------------------------------------------------------------------------- # +# 刷新 +# --------------------------------------------------------------------------- # +async def _refresh(cookie_id: str, cookies_str: str, db_manager) -> None: + """抓取并计算该账号的同行热卖店铺,写入缓存。""" + async with _state_lock: + _progress[cookie_id] = { + "state": "running", "done": 0, "total": MAX_KEYWORDS, + "stage": "提取店铺类型关键词", "error": "", "started_at": time.time(), + } + + try: + features = _user_features(db_manager, cookie_id) + keywords = features["keywords"] + if not keywords: + async with _state_lock: + _progress[cookie_id] = { + "state": "error", "done": 0, "total": 0, "stage": "", + "error": "没有可分析的商品,请先在商品管理同步商品。", "started_at": time.time(), + } + return + + client = XianyuSellerAPI(cookie_id, cookies_str) + risk_hit = "" + # 聚合:加密 seller_id -> 店铺 + shops: Dict[str, Dict[str, Any]] = {} + done = 0 + total = len(keywords) * PAGES_PER_KEYWORD + async with _state_lock: + _progress[cookie_id].update({"total": total, "stage": "搜索同类型商品"}) + + for keyword in keywords: + for page in range(1, PAGES_PER_KEYWORD + 1): + if risk_hit: + break + async with _state_lock: + _progress[cookie_id].update({"done": done, "stage": f"搜索:{keyword}"}) + try: + result = await client._call_buyer( + "mtop.taobao.idlemtopsearch.pc.search", + {"keyword": keyword, "page": page, "pageSize": 10}, + spm_cnt="a21ybx.search.0.0", + ) + except SellerApiError as exc: + message = str(exc) + if is_risk_control_error(message): + risk_hit = message + logger.warning(f"同行店铺 命中风控,中止搜索: {message}") + break + logger.warning(f"同行店铺 {keyword} p{page} 失败: {message}") + done += 1 + continue + except Exception as exc: + logger.warning(f"同行店铺 {keyword} p{page} 异常: {exc}") + done += 1 + continue + + for item in _parse_search(result): + sid = item["seller_id"] + if not sid: + continue + agg = shops.get(sid) + if agg is None: + agg = { + "seller_id": sid, + "nicks": set(), + "titles": [], + "item_ids": [], + "images": [], + "areas": set(), + "search_deals": -1, + "search_credit": "", + "keywords_hit": set(), + "prices": [], + } + shops[sid] = agg + if item["seller"]: + agg["nicks"].add(item["seller"]) + if len(agg["titles"]) < 6: + agg["titles"].append(item["title"]) + if len(agg["item_ids"]) < 4: + agg["item_ids"].append(item["item_id"]) + if item["image"] and len(agg["images"]) < 3: + agg["images"].append(item["image"]) + if item["area"]: + agg["areas"].add(item["area"]) + if item["seller_deals"] > agg["search_deals"]: + agg["search_deals"] = item["seller_deals"] + if not agg["search_credit"] and item["seller_credit"]: + agg["search_credit"] = item["seller_credit"] + agg["keywords_hit"].add(keyword) + p = _price_num(item["price"]) + if p > 0: + agg["prices"].append(p) + + done += 1 + await asyncio.sleep(SEARCH_GAP) + if risk_hit: + break + + if not shops: + async with _state_lock: + _progress[cookie_id] = { + "state": "error", "done": done, "total": total, "stage": "", + "error": "搜索未拿到任何同类型店铺" + ("(命中风控,稍后再试)" if risk_hit else ""), + "started_at": time.time(), + } + return + + # 按搜索成交量排序,取前 CANDIDATE_TOP 逐店补详情 + ordered = sorted( + shops.values(), + key=lambda s: (s["search_deals"], len(s["item_ids"])), + reverse=True, + )[:CANDIDATE_TOP] + + async with _state_lock: + _progress[cookie_id].update({ + "done": 0, "total": len(ordered), "stage": "补齐店铺详情(销量/信用/主页)", + }) + + enriched: List[Dict[str, Any]] = [] + user_terms = features["term_set"] + user_price = features["med_price"] + + for idx, agg in enumerate(ordered): + async with _state_lock: + _progress[cookie_id].update({"done": idx, "stage": "补齐店铺详情"}) + if not agg["item_ids"]: + continue + detail: Dict[str, Any] = {} + for item_id in agg["item_ids"]: + if risk_hit: + break + try: + resp = await client._call_buyer( + "mtop.taobao.idle.pc.detail", + {"itemId": str(item_id)}, + spm_cnt="a21ybx.detail.0.0", + ) + data = resp.get("data") or {} + seller_do = data.get("sellerDO") or {} + if seller_do.get("sellerId"): + detail = data + break + except SellerApiError as exc: + message = str(exc) + if is_risk_control_error(message): + risk_hit = message + logger.warning(f"同行店铺 详情命中风控,停止补齐: {message}") + break + await asyncio.sleep(DETAIL_GAP) + continue + except Exception as exc: + logger.debug(f"同行店铺 detail {item_id} 异常: {exc}") + await asyncio.sleep(DETAIL_GAP) + continue + await asyncio.sleep(DETAIL_GAP) + if risk_hit and not detail: + break + if not detail: + continue + + seller_do = detail.get("sellerDO") or {} + remark = detail.get("remarkDO") or {} + credit_tag = detail.get("idleFishCreditTag") or {} + tags = [str(t.get("text") or "") for t in (detail.get("sellerInfoTags") or []) if t.get("text")] + seller_id_plain = str(seller_do.get("sellerId") or "").strip() + if not seller_id_plain: + continue + + nick = str(seller_do.get("nick") or "").strip() or ( + sorted(agg["nicks"])[0] if agg["nicks"] else "未知店铺") + try: + sold = int(seller_do.get("hasSoldNumInteger") or 0) + except (TypeError, ValueError): + sold = 0 + try: + credit_level = int((credit_tag.get("trackParams") or {}).get("sellerLevel") or 0) + except (TypeError, ValueError): + credit_level = 0 + try: + good_rate = float(str(seller_do.get("newGoodRatioRate") or "0").replace("%", "") or 0) + except ValueError: + good_rate = 0.0 + try: + good = int(remark.get("praise") or 0) + bad = int(remark.get("poor") or 0) + mid = int(remark.get("middle") or 0) + except (TypeError, ValueError): + good = bad = mid = 0 + + # 店铺词集:命中商品标题 + 店铺标签 + shop_terms: set = set() + for t in agg["titles"]: + shop_terms.update(_extract_terms(t)) + for t in tags: + shop_terms.update(_extract_terms(t)) + + prices = agg["prices"] or ([user_price] if user_price else [0]) + shop_price = statistics.median([p for p in prices if p > 0] or [0]) + + sim = _similarity( + shop_terms, user_terms, shop_price, user_price, + len(agg.get("keywords_hit") or ()), len(keywords), + ) + value = _value_score(sim, sold or agg["search_deals"], credit_level, good_rate) + + enriched.append({ + "nick": nick, + "seller_id": seller_id_plain, + "url": f"https://www.goofish.com/personal?userId={seller_id_plain}", + "item_url": f"https://www.goofish.com/item?id={agg['item_ids'][0]}", + "avatar": str(seller_do.get("avatarUrl") or ""), + "items_seen": len(agg["item_ids"]), + "titles": agg["titles"][:3], + "images": agg["images"][:2], + "search_deals": agg["search_deals"], + "search_credit": agg["search_credit"], + "sold": sold, + "credit_level": credit_level, + "good": good, "mid": mid, "bad": bad, + "good_rate": good_rate, + "city": str(seller_do.get("city") or ""), + "signature": str(seller_do.get("signature") or ""), + "tags": tags[:6], + "area": sorted(agg["areas"])[0] if agg["areas"] else "", + "price_avg": round(shop_price, 1) if shop_price else 0, + "similarity": sim, + "value_score": value, + "credit_sort": _credit_sort(credit_level, agg.get("search_credit") or ""), + "keywords_hit": sorted(agg.get("keywords_hit") or ()), + }) + + if len(enriched) >= SHOPS_TOP and risk_hit: + break + + enriched.sort(key=lambda e: e["sold"], reverse=True) + enriched = enriched[:SHOPS_TOP] + for i, e in enumerate(enriched, 1): + e["rank"] = i + + fail_msg = "详情补齐失败,请稍后重试。" + if risk_hit: + fail_msg = "命中闲鱼风控(请求过于频繁),请稍等几分钟再点「重新抓取」。" + result_payload = { + "status": "ok" if enriched else "error", + "updated_at": time.time(), + "risk_hit": risk_hit, + "keywords": keywords, + "user": { + "items_count": features["items_count"], + "med_price": user_price, + "terms_preview": features["terms"][:20], + "categories": features["categories"][:5], + }, + "shops": enriched, + "error": "" if enriched else fail_msg, + } + async with _state_lock: + _cache[cookie_id] = result_payload + _progress[cookie_id] = { + "state": "done", "done": len(enriched), "total": len(enriched), + "stage": "", "error": "", "started_at": time.time(), + } + _last_refresh[cookie_id] = time.time() + _save_cache() + logger.info(f"同行热卖店铺[{cookie_id}] 刷新完成: {len(enriched)} 家,关键词={keywords}") + + except Exception as exc: # noqa: BLE001 —— 任何异常都要落进状态,供前端展示 + logger.exception(f"同行店铺刷新失败: {exc}") + async with _state_lock: + _progress[cookie_id] = { + "state": "error", "done": 0, "total": 0, "stage": "", + "error": f"刷新失败: {exc}", "started_at": time.time(), + } + + + +# --------------------------------------------------------------------------- # +# 路由 +# --------------------------------------------------------------------------- # +class AnalyzeRequest(BaseModel): + cookie_id: str = Field("", alias="cookie_id") + + class Config: + populate_by_name = True + + +class RefreshRequest(BaseModel): + cookie_id: str = Field("", alias="cookie_id") + + class Config: + populate_by_name = True + + +def create_peer_shops_router(get_current_user: Callable, db_manager) -> APIRouter: + router = APIRouter() + + @router.get("/peer-shops") + async def get_peer_shops( + cookie_id: str = "", + current_user: Dict[str, Any] = Depends(get_current_user), + ) -> Dict[str, Any]: + """读缓存;带 ?refresh=1 时触发后台刷新(单飞)。""" + if not cookie_id: + raise HTTPException(status_code=400, detail="cookie_id 不能为空") + async with _state_lock: + prog = dict(_progress.get(cookie_id) or {"state": "idle", "done": 0, "total": 0, "stage": "", "error": ""}) + cached = _cache.get(cookie_id) + return { + "status": "ok", + "progress": prog, + "refreshing": prog.get("state") == "running", + "data": cached, + } + + @router.post("/peer-shops/refresh") + async def refresh_peer_shops( + req: RefreshRequest, + current_user: Dict[str, Any] = Depends(get_current_user), + ) -> Dict[str, Any]: + cookie_id = (req.cookie_id or "").strip() + if not cookie_id: + raise HTTPException(status_code=400, detail="cookie_id 不能为空") + async with _state_lock: + prog = _progress.get(cookie_id) + if prog and prog.get("state") == "running": + return {"status": "running"} + cookies_str = db_manager.get_cookie(cookie_id) + if not cookies_str: + raise HTTPException(status_code=400, detail="该账号 Cookie 不可用,请先扫码登录") + asyncio.create_task(_refresh(cookie_id, cookies_str, db_manager)) + return {"status": "started"} + + @router.post("/peer-shops/ai-analyze") + async def ai_analyze( + req: AnalyzeRequest, + current_user: Dict[str, Any] = Depends(get_current_user), + ) -> Dict[str, Any]: + """AI 一键分析:哪家同行最适合自己店铺(需配置模型 KEY)。""" + cookie_id = (req.cookie_id or "").strip() + if not cookie_id: + raise HTTPException(status_code=400, detail="cookie_id 不能为空") + + settings = db_manager.get_ai_reply_settings(cookie_id) + api_key = (settings.get("api_key") or "").strip() + if not api_key: + return { + "status": "need_api_key", + "message": "尚未配置模型 KEY,请先在「AI 回复设置」填写模型 KEY 再使用 AI 分析。", + } + + data = _cache.get(cookie_id) + if not data or not data.get("shops"): + return {"status": "need_data", "message": "还没有同行店铺数据,请先点击「开始分析」抓取数据。"} + + user = data.get("user") or {} + shops = data.get("shops") or [] + top = sorted(shops, key=lambda s: s.get("value_score", 0), reverse=True)[:20] + + lines = [] + for s in top: + lines.append( + f"- {s.get('nick')}|销量{s.get('sold')}|信用{s.get('credit_level')}级" + f"|好评率{s.get('good_rate')}%|相似度{s.get('similarity')}" + f"|参考价值{s.get('value_score')}|城市{s.get('city') or '-'}" + f"|标签({'、'.join(s.get('tags') or []) or '-'})" + f"|主营线索: {';'.join(s.get('titles') or [])[:120]}" + ) + prompt = ( + "你是闲鱼店铺运营顾问。下面是我的店铺情况和同类型销量最好的同行店铺数据。" + "请分析哪几家同行最适合我参考(综合类型匹配度、销量、信用、好评率)," + "并给出 3 条可落地的行动建议(选品/定价/标题优化方向)。\n\n" + f"我的店铺:已同步商品 {user.get('items_count', 0)} 件,价格中位数 ¥{user.get('med_price', 0)}," + f"类目线索:{'、'.join(user.get('categories') or []) or '-'}," + f"商品关键词线索:{'、'.join((user.get('terms_preview') or [])[:12])}\n\n" + f"同类型同行(按参考价值排序前 {len(top)} 家):\n" + "\n".join(lines) + "\n\n" + "要求:先给出「最适合参考的 3 家店铺 +每家一句理由」,再给「3 条行动建议」。" + "用中文,直接输出面向店主的可读文本,不要 JSON。" + ) + + try: + from openai import OpenAI + client = OpenAI( + api_key=api_key, + base_url=(settings.get("base_url") or "").strip() or None, + timeout=REQUEST_TIMEOUT, + max_retries=0, + default_headers={ + "User-Agent": settings.get("user_agent") + or "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36" + }, + ) + model_name = ( + (settings.get("model_name") or settings.get("model") or "").strip() or "qwen-plus" + ) + extra = None + try: + extra = {"enable_thinking": False} + except Exception: + extra = None + response = client.chat.completions.create( + model=model_name, + messages=[{"role": "user", "content": prompt}], + temperature=0.4, + max_tokens=3000, + extra_body=extra, + ) + text = (response.choices[0].message.content or "").strip() + if not text: + return {"status": "error", "message": "模型没有返回内容,请重试。"} + return {"status": "ok", "analysis": text, "model": model_name} + except Exception as exc: # noqa: BLE001 + logger.exception("同行店铺 AI 分析失败") + return {"status": "error", "message": f"AI 分析失败: {exc}"} + + return router diff --git a/frontend/App.tsx b/frontend/App.tsx index db83500..ab4aeef 100644 --- a/frontend/App.tsx +++ b/frontend/App.tsx @@ -25,6 +25,7 @@ const About = lazy(() => import('./components/About')); const BuyerInteraction = lazy(() => import('./components/BuyerInteraction')); const Resell = lazy(() => import('./components/Resell')); const HotList = lazy(() => import('./components/HotList')); +const PeerShops = lazy(() => import('./components/PeerShops')); const PriceWatch = lazy(() => import('./components/PriceWatch')); const Help = lazy(() => import('./components/Help')); @@ -41,6 +42,7 @@ const pageLabels: Record = { items: '商品与发货', resell: '一键转卖', hotlist: '实时热卖榜', + peershops: '同行热卖店铺', pricewatch: '价格监控', orders: '订单管理', 'buyer-interaction': '买家互动', @@ -600,6 +602,9 @@ const App: React.FC = () => { + diff --git a/frontend/components/About.tsx b/frontend/components/About.tsx index d37128e..3c5a1e5 100644 --- a/frontend/components/About.tsx +++ b/frontend/components/About.tsx @@ -4,11 +4,11 @@ import { getAnnouncement } from '../services/api'; import { AnnouncementPayload } from '../types'; import { EmptyState, PageHeader } from './ui'; -// 对外入口统一指向自己的站点与仓库,不指向原作者的地址 +// 对外入口:更多精品应用导航页 + 自己的开源仓库(tangzhuan-yu) const SITE_URL = 'https://nav.88531.cn'; const SITE_LABEL = 'nav.88531.cn'; -const REPO_URL = 'https://gitea.88531.cn/jinghui/xianyu-auto-reply'; -const REPO_LABEL = 'jinghui/xianyu-auto-reply'; +const REPO_URL = 'https://gitea.88531.cn/jinghui/tangzhuan-yu'; +const REPO_LABEL = 'jinghui/tangzhuan-yu'; const CONTACT_EMAIL = '3970260761@qq.com'; const levelStyles: Record = { @@ -123,7 +123,7 @@ const About: React.FC = () => {
- 官网 + 更多精品应用 { + if (!n || n < 0) return '0'; + return n >= 10000 ? `${(n / 10000).toFixed(1).replace(/\.0$/, '')}万` : String(n); +}; + +/** 秒级时间戳 → "3天前" / "2小时前" */ +const formatAge = (ts: number): string => { + if (!ts) return '—'; + const diff = Date.now() - ts * 1000; + if (diff < 60_000) return '刚刚'; + if (diff < 3_600_000) return `${Math.floor(diff / 60_000)}分钟前`; + if (diff < 86_400_000) return `${Math.floor(diff / 3_600_000)}小时前`; + if (diff < 7 * 86_400_000) return `${Math.floor(diff / 86_400_000)}天前`; + const d = new Date(ts * 1000); + return `${d.getMonth() + 1}月${d.getDate()}日`; +}; + +/** 相似度/参考价值徽章:高分绿、中分蓝、低分灰 */ +const ScoreBadge: React.FC<{ value: number; max?: number; suffix?: string }> = ({ + value, + max = 100, + suffix = '', +}) => { + const pct = max > 0 ? value / max : 0; + const cls = + pct >= 0.7 + ? 'bg-emerald-100 text-emerald-700' + : pct >= 0.4 + ? 'bg-sky-100 text-sky-700' + : 'bg-[var(--surface-subtle)] text-[var(--text-soft)]'; + return ( + + {value} + {suffix} + + ); +}; + +/** 信用等级:5 星样式(level 1-5),无数据时显示搜索信号文案 */ +const CreditCell: React.FC<{ level: number; fallback: string }> = ({ level, fallback }) => { + if (!level) { + return ( + + {fallback || '—'} + + ); + } + return ( + + {'★'.repeat(level)} + {level}级 + + ); +}; + +const PeerShops: React.FC = () => { + const [loading, setLoading] = useState(true); + const [cookieId, setCookieId] = useState(''); + const [data, setData] = useState(null); + const [refreshing, setRefreshing] = useState(false); + const [progress, setProgress] = useState<{ done: number; total: number; stage: string } | null>(null); + const [sortKey, setSortKey] = useState('sold'); + const [notice, setNotice] = useState(null); + const [aiText, setAiText] = useState(''); + const [aiModel, setAiModel] = useState(''); + const [aiLoading, setAiLoading] = useState(false); + + const pollRef = useRef | null>(null); + + const stopPolling = useCallback(() => { + if (pollRef.current) { + clearInterval(pollRef.current); + pollRef.current = null; + } + setRefreshing(false); + setProgress(null); + }, []); + + const load = useCallback(async (id: string) => { + try { + const res = await getPeerShops(id); + if (res.data) setData(res.data); + if (res.refreshing) { + setRefreshing(true); + setProgress({ + done: res.progress?.done ?? 0, + total: res.progress?.total ?? 0, + stage: res.progress?.stage || '抓取中', + }); + } + if (res.progress?.state === 'error' && res.progress.error) { + setNotice({ type: 'error', message: res.progress.error }); + } + } catch (err) { + console.error('加载同行店铺失败:', err); + } + }, []); + + // 初始化:取第一个账号 + useEffect(() => { + let alive = true; + (async () => { + try { + const accounts = await getAccountDetails(); + const first = accounts[0]; + if (!alive) return; + if (!first) { + setNotice({ type: 'info', message: '请先在「账号管理」添加账号并同步商品,再回到本页。' }); + setLoading(false); + return; + } + setCookieId(first.id); + await load(first.id); + } catch (err) { + console.error('初始化同行店铺失败:', err); + } finally { + if (alive) setLoading(false); + } + })(); + return () => { + alive = false; + if (pollRef.current) clearInterval(pollRef.current); + }; + }, [load]); + + // 刷新轮询 + useEffect(() => { + if (!refreshing || !cookieId) return; + pollRef.current = setInterval(async () => { + try { + const res = await getPeerShops(cookieId); + setProgress({ + done: res.progress?.done ?? 0, + total: res.progress?.total ?? 0, + stage: res.progress?.stage || '抓取中', + }); + if (res.progress?.state === 'done') { + stopPolling(); + if (res.data) setData(res.data); + setNotice({ type: 'success', message: '同行店铺数据已更新。' }); + } else if (res.progress?.state === 'error') { + stopPolling(); + setNotice({ type: 'error', message: res.progress.error || '抓取失败,请稍后重试。' }); + } + } catch (err) { + console.error('轮询同行店铺失败:', err); + } + }, POLL_INTERVAL); + return () => { + if (pollRef.current) clearInterval(pollRef.current); + }; + }, [refreshing, cookieId, stopPolling]); + + const triggerRefresh = useCallback(async () => { + if (!cookieId || refreshing) return; + setNotice(null); + setAiText(''); + try { + const res = await refreshPeerShops(cookieId); + if (res.status === 'running') { + setRefreshing(true); + return; + } + setRefreshing(true); + setProgress({ done: 0, total: 0, stage: '准备抓取' }); + } catch (err: any) { + const msg = err?.response?.data?.detail || err?.message || '触发刷新失败'; + setNotice({ type: 'error', message: String(msg) }); + } + }, [cookieId, refreshing]); + + const runAiAnalyze = useCallback(async () => { + if (!cookieId || aiLoading) return; + setAiLoading(true); + setNotice(null); + try { + const res = await analyzePeerShops(cookieId); + if (res.status === 'ok' && res.analysis) { + setAiText(res.analysis); + setAiModel(res.model || ''); + } else if (res.status === 'need_api_key') { + setNotice({ + type: 'info', + message: res.message || '尚未配置模型 KEY,请先在「AI 回复设置」填写模型 KEY。', + }); + } else { + setNotice({ type: 'error', message: res.message || 'AI 分析失败,请稍后重试。' }); + } + } catch (err: any) { + const msg = err?.response?.data?.detail || err?.message || 'AI 分析失败'; + setNotice({ type: 'error', message: String(msg) }); + } finally { + setAiLoading(false); + } + }, [cookieId, aiLoading]); + + const shops = useMemo(() => { + const list = [...(data?.shops || [])]; + const bySort: Record number> = { + sold: (a, b) => b.sold - a.sold || b.search_deals - a.search_deals, + similarity: (a, b) => b.similarity - a.similarity || b.value_score - a.value_score, + credit: (a, b) => (b.credit_sort ?? b.credit_level) - (a.credit_sort ?? a.credit_level) || b.good_rate - a.good_rate, + reviews: (a, b) => b.good + b.mid + b.bad - (a.good + a.mid + a.bad) || b.good - a.good, + }; + return list.sort(bySort[sortKey]); + }, [data, sortKey]); + + if (loading) return ; + + const user = data?.user; + const updatedLabel = data?.updated_at ? formatAge(data.updated_at) : '尚未生成'; + + return ( +
+ + {data ? `更新于 ${updatedLabel}` : '待生成'} + + } + actions={ +
+ + +
+ } + /> + + {notice && ( + setNotice(null)} + /> + )} + + {refreshing && ( +
+
+ + + {progress?.stage || '抓取中…'} + {progress && progress.total > 0 ? `(${progress.done}/${progress.total})` : ''} + +
+ {progress && progress.total > 0 && ( +
+
+
+ )} +

+ 约需 1 分钟:按店铺类型搜索 → 聚合高销量店铺 → 逐店补齐销量/信用/主页。 +

+
+ )} + + {user && ( +
+ 您的店铺:已同步 {user.items_count} 件商品 + {user.med_price > 0 && 价格中位数 ¥{user.med_price}} + {user.categories?.length > 0 && 类目:{user.categories.slice(0, 3).join('、')}} + {data?.keywords?.length > 0 && 匹配关键词:{data.keywords.slice(0, 5).join('、')}} +
+ )} + + {aiText && ( +
+
+ + AI 分析结果 + {aiModel && ({aiModel})} +
+
{aiText}
+
+ )} + + {!data && !refreshing && ( + + )} + + {data && shops.length === 0 && !refreshing && ( + + )} + + {shops.length > 0 && ( +
+
+
+ {SORT_OPTIONS.map(opt => ( + + ))} +
+ + 共 {shops.length} 家 · 默认按销量排序 · 点击店铺名查看闲鱼店铺全部商品 + +
+ +
+ + + + + + + + + + + + + + + {shops.map(shop => { + const reviews = Math.max(0, shop.good) + Math.max(0, shop.mid) + Math.max(0, shop.bad); + return ( + + + + + + + + + + + ); + })} + +
排名店铺销量信用评论数相似度参考价值操作
+ + {shop.rank} + + + + {shop.nick} + + +
+ {shop.city && {shop.city}} + {shop.tags?.slice(0, 2).map(t => ( + + {t} + + ))} + {shop.price_avg > 0 && 均价 ¥{shop.price_avg}} + {!!shop.keywords_hit?.length && ( + + 命中{shop.keywords_hit.length}词 + + )} +
+
{formatNum(shop.sold)} + + + {formatNum(reviews)} + {shop.good_rate > 0 && ( + {shop.good_rate}% + )} + + + + + + +
+
+ +

+ 相似度 = 与您店铺商品词集的重合度(含价格带接近度);参考价值 = 相似度 40% + 销量 25% + 信用 20% + 好评率 15%。 + 数据来自闲鱼实时搜索,每次抓取约 1 分钟,可点「重新抓取」更新。 +

+
+ )} +
+ ); +}; + +export default PeerShops; diff --git a/frontend/components/Sidebar.tsx b/frontend/components/Sidebar.tsx index 91d499d..3f0ee65 100644 --- a/frontend/components/Sidebar.tsx +++ b/frontend/components/Sidebar.tsx @@ -6,6 +6,7 @@ import { Bot, Box, ChevronUp, + Building2, CreditCard, KeyRound, LayoutDashboard, @@ -80,6 +81,7 @@ const Sidebar: React.FC = ({ activeTab, setActiveTab, onLogout, mo { id: 'items', icon: Box, label: '商品与发货' }, { id: 'resell', icon: Store, label: '一键转卖' }, { id: 'hotlist', icon: Flame, label: '实时热卖榜' }, + { id: 'peershops', icon: Building2, label: '同行热卖店铺' }, { id: 'pricewatch', icon: TrendingDown, label: '价格监控' }, { id: 'orders', icon: ShoppingBag, label: '订单管理' }, { id: 'buyer-interaction', icon: Star, label: '买家互动' }, diff --git a/frontend/services/api.ts b/frontend/services/api.ts index 7c82c93..aeb42cd 100644 --- a/frontend/services/api.ts +++ b/frontend/services/api.ts @@ -1682,3 +1682,20 @@ export const getAiOptimizePreview = async (cookieId: string): Promise => // 后端单次模型调用 130s 超时 + 失败重试一次,最坏约 4.5 分钟,前端放宽到 6 分钟 post('/ai-optimize/suggest', { cookie_id: cookieId }, { timeout: 360000 }); + + +// ==================== 同行热卖店铺 ==================== + +/** 同行热卖店铺:读缓存与抓取进度(data 为 null 表示还没抓过)。 */ +export const getPeerShops = async (cookieId: string): Promise => + get('/peer-shops', { cookie_id: cookieId }); + +/** 触发后台抓取(搜索同类型商品 → 聚合店铺 → 补齐详情),前端轮询 getPeerShops 看进度。 */ +export const refreshPeerShops = async (cookieId: string): Promise<{ status: string }> => + post('/peer-shops/refresh', { cookie_id: cookieId }); + +/** AI 一键分析哪家同行最适合自己店铺(需已配置模型 KEY)。 */ +export const analyzePeerShops = async ( + cookieId: string, +): Promise<{ status: string; analysis?: string; message?: string; model?: string }> => + post('/peer-shops/ai-analyze', { cookie_id: cookieId }, { timeout: 360000 }); diff --git a/frontend/types.ts b/frontend/types.ts index 0ee82ea..815361b 100644 --- a/frontend/types.ts +++ b/frontend/types.ts @@ -916,3 +916,78 @@ export interface AiOptimizeResult { truncated?: boolean; model?: string; } + +// ==================== 同行热卖店铺 ==================== + +/** 同类型销量最好的同行店铺(后端 peer_shops 聚合 + 详情补齐) */ +export interface PeerShop { + rank: number; + nick: string; + /** 闲鱼明文卖家 ID(详情接口 sellerDO.sellerId) */ + seller_id: string; + /** 店铺主页(goofish.com/personal?userId=) */ + url: string; + /** 代表商品链接 */ + item_url: string; + avatar?: string; + /** 搜索命中的该店商品数 */ + items_seen: number; + /** 该店命中商品标题线索 */ + titles: string[]; + images: string[]; + /** 搜索信号:N 条评价(成交量)/ 信用标签 */ + search_deals: number; + search_credit: string; + /** 累计销量(详情接口) */ + sold: number; + /** 信用等级 1-5 */ + credit_level: number; + good: number; + mid: number; + bad: number; + /** 好评率百分比(97 = 97%) */ + good_rate: number; + city: string; + signature: string; + /** 店铺标签(主营线索) */ + tags: string[]; + area: string; + price_avg: number; + /** 与用户店铺的相似度 0-100 */ + similarity: number; + /** 参考价值 0-100(相似度/销量/信用/好评率加权) */ + value_score: number; + /** 信用排序键:等级×10,无等级时按搜索信号文本(极好=5…较差=1) */ + credit_sort?: number; + /** 该店命中的我的类型关键词 */ + keywords_hit?: string[]; +} + +export interface PeerShopsData { + status: string; + /** 秒级时间戳 */ + updated_at: number; + risk_hit: string; + keywords: string[]; + user: { + items_count: number; + med_price: number; + terms_preview: string[]; + categories: string[]; + }; + shops: PeerShop[]; + error: string; +} + +export interface PeerShopsResponse { + status: string; + progress: { + state: 'idle' | 'running' | 'done' | 'error'; + done: number; + total: number; + stage: string; + error: string; + }; + refreshing: boolean; + data: PeerShopsData | null; +} diff --git a/static/assets/AIReply-DjnHfMhY.js b/static/assets/AIReply-lg6NYQkE.js similarity index 97% rename from static/assets/AIReply-DjnHfMhY.js rename to static/assets/AIReply-lg6NYQkE.js index 957e494..51a9b11 100644 --- a/static/assets/AIReply-DjnHfMhY.js +++ b/static/assets/AIReply-lg6NYQkE.js @@ -1 +1 @@ -import{r as l,o as O,n as i,z as k,j as e,B as j,L as A,E as H,aE as q,S,K as z,aR as B}from"./index-BtyeumGM.js";import{P as F,a as U,E as D,S as o}from"./ui-Bucd7ZQW.js";import{S as $}from"./save-B_0bwRwJ.js";import{M as E}from"./message-square-text-s_nuv0lf.js";import{E as G}from"./eye-off-BfkVRJHJ.js";import{E as J}from"./eye-C6bcwqAG.js";import{P as C}from"./play-RrpCCHk6.js";const I="https://ai.88531.cn/v1",Q="https://ai.88531.cn",f={ai_enabled:!1,model_name:"qwen-plus",api_key:"",api_key_configured:!1,base_url:I,user_agent:"codex_cli_rs/0.0.0 (Hermes Agent)",max_discount_percent:10,max_discount_amount:100,max_bargain_rounds:3,context_enabled:!0,context_message_limit:12,context_expire_minutes:120,custom_prompts:""},ae=()=>{const[c,P]=l.useState([]),[t,y]=l.useState(""),[a,d]=l.useState(f),[R,x]=l.useState(!0),[p,N]=l.useState(!1),[u,_]=l.useState(!1),[g,w]=l.useState(!1),[h,K]=l.useState("你好,这个商品现在还能买吗?"),[v,b]=l.useState(""),r=l.useMemo(()=>c.find(s=>s.id===t),[c,t]);l.useEffect(()=>{O().then(s=>{var m;P(s),y(((m=s[0])==null?void 0:m.id)||"")}).catch(s=>i(s instanceof Error?s.message:"账号加载失败","error")).finally(()=>x(!1))},[]),l.useEffect(()=>{t&&(x(!0),b(""),w(!1),k(t).then(s=>d({...f,...s,api_key:""})).catch(s=>i(s instanceof Error?s.message:"AI配置加载失败","error")).finally(()=>x(!1)))},[t]);const n=(s,m)=>{d(M=>({...M,[s]:m}))},T=async()=>{if(!t){i("请先选择账号","warning");return}if(!a.model_name.trim()||!a.base_url.trim()){i("模型名称和接口地址不能为空","warning");return}N(!0);try{await z(t,a);const s=await k(t);d({...f,...s,api_key:""}),i("人工智能回复配置已保存","success")}catch(s){i(s instanceof Error?s.message:"AI配置保存失败","error")}finally{N(!1)}},L=async()=>{if(!t||!h.trim()){i("请选择账号并输入测试消息","warning");return}_(!0),b("");try{const s=await B(t,{message:h.trim(),item_title:"测试商品",item_price:100,item_desc:"仅用于测试人工智能回复,不会发送到闲鱼。"});b(s.reply||s.message||"测试完成"),i("AI回复测试完成","success")}catch(s){i(s instanceof Error?s.message:"AI回复测试失败","error")}finally{_(!1)}};return R&&c.length===0?e.jsx(F,{label:"正在加载 AI 回复配置"}):e.jsxs("div",{className:"page-stack animate-fade-in",children:[e.jsx(U,{title:"AI 回复",description:"按账号配置模型连接、上下文记忆、议价边界和业务回复规则。",icon:j,actions:e.jsxs("div",{className:"flex min-w-0 flex-wrap items-end gap-2",children:[e.jsxs("label",{className:"min-w-0 sm:w-72",children:[e.jsx("span",{className:"field-label",children:"当前账号"}),e.jsx("select",{value:t,onChange:s=>y(s.target.value),className:"ios-input w-full rounded-md px-3 py-2 text-sm font-semibold",children:c.map(s=>e.jsx("option",{value:s.id,children:s.nickname||s.remark||`账号 ${s.id.slice(0,8)}`},s.id))})]}),e.jsxs("button",{type:"button",onClick:T,disabled:p||!t,className:"ios-btn-primary flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm",children:[p?e.jsx(A,{className:"h-4 w-4 animate-spin"}):e.jsx($,{className:"h-4 w-4"}),p?"保存中":"保存配置"]})]})}),t?e.jsxs(e.Fragment,{children:[e.jsxs("section",{className:"section-panel grid gap-4 p-4 lg:grid-cols-[1fr_auto] lg:items-center",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 font-bold text-gray-900",children:[e.jsx(E,{className:"h-5 w-5"}),(r==null?void 0:r.nickname)||(r==null?void 0:r.remark)||t]}),e.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"回复优先级:关键词回复 → 人工智能回复 → 默认回复。AI失败时不会中断消息处理。"})]}),e.jsxs("label",{className:"flex cursor-pointer items-center gap-3",children:[e.jsx("span",{className:"text-sm font-bold text-gray-700",children:a.ai_enabled?"已启用":"已停用"}),e.jsx("input",{type:"checkbox",checked:a.ai_enabled,onChange:s=>n("ai_enabled",s.target.checked),className:"h-5 w-5 accent-yellow-400"})]})]}),e.jsxs("div",{className:"grid gap-6 xl:grid-cols-[minmax(0,1.35fr)_minmax(340px,0.65fr)]",children:[e.jsxs("div",{className:"space-y-6",children:[e.jsxs("section",{className:"section-panel",children:[e.jsx(o,{title:"模型连接",description:"支持 OpenAI 兼容接口;密钥留空时保留服务器中已有配置。",icon:j}),e.jsxs("div",{className:"grid gap-4 p-5 md:grid-cols-2",children:[e.jsxs("div",{className:"md:col-span-2 flex flex-wrap items-center justify-between gap-3 rounded-lg border border-brand-200 bg-brand-50 px-4 py-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"text-sm font-semibold text-gray-800",children:"没有 API Key?每天可免费领取额度"}),e.jsx("p",{className:"mt-0.5 text-xs text-gray-600",children:"兼容 OpenAI 接口,注册后把密钥填到下方即可直接用。"})]}),e.jsx("div",{className:"flex shrink-0 items-center gap-2",children:e.jsxs("a",{href:Q,target:"_blank",rel:"noreferrer noopener",className:"inline-flex items-center gap-1 rounded-md bg-brand-500 px-3 py-1.5 text-xs font-semibold text-brand-ink hover:bg-brand-600",children:["免费领取 token",e.jsx(H,{className:"h-3.5 w-3.5"})]})})]}),e.jsxs("label",{children:[e.jsx("span",{className:"mb-1.5 block text-sm font-semibold text-gray-700",children:"接口地址"}),e.jsx("input",{value:a.base_url,onChange:s=>n("base_url",s.target.value),className:"ios-input w-full rounded-md px-3 py-2.5 text-sm",placeholder:I})]}),e.jsxs("label",{children:[e.jsx("span",{className:"mb-1.5 block text-sm font-semibold text-gray-700",children:"模型名称"}),e.jsx("input",{value:a.model_name,onChange:s=>n("model_name",s.target.value),className:"ios-input w-full rounded-md px-3 py-2.5 text-sm",placeholder:"qwen-plus"})]}),e.jsxs("label",{className:"md:col-span-2",children:[e.jsxs("span",{className:"mb-1.5 flex items-center justify-between gap-3 text-sm font-semibold text-gray-700",children:["API Key",a.api_key_configured&&!a.api_key&&e.jsxs("span",{className:"flex items-center gap-1 text-xs font-medium text-emerald-700",children:[e.jsx(q,{className:"h-3.5 w-3.5"}),"已配置,留空保持不变"]})]}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{type:g?"text":"password",value:a.api_key,onChange:s=>n("api_key",s.target.value),className:"ios-input w-full rounded-md px-3 py-2.5 pr-10 text-sm",placeholder:a.api_key_configured?"输入新密钥以替换":"请输入 API Key",autoComplete:"new-password"}),e.jsx("button",{type:"button",onClick:()=>w(s=>!s),className:"absolute right-2 top-1/2 -translate-y-1/2 rounded p-1 text-gray-500 hover:bg-gray-100",title:g?"隐藏密钥":"显示密钥",children:g?e.jsx(G,{className:"h-4 w-4"}):e.jsx(J,{className:"h-4 w-4"})})]})]}),e.jsxs("label",{className:"md:col-span-2",children:[e.jsx("span",{className:"mb-1.5 block text-sm font-semibold text-gray-700",children:"User-Agent"}),e.jsx("input",{value:a.user_agent??"",onChange:s=>n("user_agent",s.target.value),className:"ios-input w-full rounded-md px-3 py-2.5 text-sm",placeholder:"codex_cli_rs/0.0.0 (Hermes Agent)"}),e.jsx("span",{className:"mt-1 block text-xs text-gray-500",children:"部分 API 中转站(如 AgentRouter)通过 User-Agent 白名单检测客户端,留空使用默认值。"})]})]})]}),e.jsxs("section",{className:"section-panel",children:[e.jsx(o,{title:"回复策略",description:"约束议价空间,并补充账号专属的语气、承诺和售后规则。",icon:E}),e.jsxs("div",{className:"grid gap-4 p-5 sm:grid-cols-3",children:[e.jsxs("label",{children:[e.jsx("span",{className:"mb-1.5 block text-sm font-semibold text-gray-700",children:"最大折扣比例"}),e.jsx("input",{type:"number",min:0,max:100,value:a.max_discount_percent,onChange:s=>n("max_discount_percent",Number(s.target.value)),className:"ios-input w-full rounded-md px-3 py-2.5 text-sm"})]}),e.jsxs("label",{children:[e.jsx("span",{className:"mb-1.5 block text-sm font-semibold text-gray-700",children:"最大折扣金额"}),e.jsx("input",{type:"number",min:0,value:a.max_discount_amount??0,onChange:s=>n("max_discount_amount",Number(s.target.value)),className:"ios-input w-full rounded-md px-3 py-2.5 text-sm"})]}),e.jsxs("label",{children:[e.jsx("span",{className:"mb-1.5 block text-sm font-semibold text-gray-700",children:"最大议价轮次"}),e.jsx("input",{type:"number",min:1,max:10,value:a.max_bargain_rounds,onChange:s=>n("max_bargain_rounds",Number(s.target.value)),className:"ios-input w-full rounded-md px-3 py-2.5 text-sm"})]}),e.jsxs("label",{className:"sm:col-span-3",children:[e.jsx("span",{className:"mb-1.5 block text-sm font-semibold text-gray-700",children:"回复风格与业务规则"}),e.jsx("textarea",{value:a.custom_prompts,onChange:s=>n("custom_prompts",s.target.value),className:"ios-input min-h-36 w-full resize-y rounded-md px-3 py-2.5 text-sm leading-6",placeholder:"例如:语气简洁,不承诺未确认的库存;涉及售后时引导买家说明订单号。"})]})]})]}),e.jsxs("section",{className:"section-panel",children:[e.jsx(o,{title:"上下文对话",description:"控制单个买家会话中可用于连续回复的近期消息范围。",icon:S}),e.jsxs("div",{className:"grid gap-4 p-5 sm:grid-cols-2",children:[e.jsxs("label",{className:"flex items-center justify-between gap-4 sm:col-span-2",children:[e.jsxs("span",{children:[e.jsx("span",{className:"block text-sm font-semibold text-gray-700",children:"记住近期对话"}),e.jsx("span",{className:"mt-1 block text-xs leading-5 text-gray-500",children:"上下文按账号、会话和商品隔离,切换商品不会混入旧商品内容。"})]}),e.jsx("input",{type:"checkbox",checked:a.context_enabled,onChange:s=>n("context_enabled",s.target.checked),className:"h-5 w-5 shrink-0 accent-yellow-400"})]}),e.jsxs("label",{children:[e.jsx("span",{className:"mb-1.5 block text-sm font-semibold text-gray-700",children:"记忆消息数"}),e.jsx("input",{type:"number",min:2,max:30,disabled:!a.context_enabled,value:a.context_message_limit,onChange:s=>n("context_message_limit",Number(s.target.value)),className:"ios-input w-full rounded-md px-3 py-2.5 text-sm disabled:bg-gray-100"})]}),e.jsxs("label",{children:[e.jsx("span",{className:"mb-1.5 block text-sm font-semibold text-gray-700",children:"上下文有效期(分钟)"}),e.jsx("input",{type:"number",min:5,max:1440,disabled:!a.context_enabled,value:a.context_expire_minutes,onChange:s=>n("context_expire_minutes",Number(s.target.value)),className:"ios-input w-full rounded-md px-3 py-2.5 text-sm disabled:bg-gray-100"})]}),e.jsx("p",{className:"text-xs leading-5 text-gray-500 sm:col-span-2",children:"付款、发货、退款、收货等系统事件不会交给大模型,将继续由订单状态和自动发货规则处理。"})]})]})]}),e.jsxs("aside",{className:"space-y-5",children:[e.jsxs("section",{className:"section-panel",children:[e.jsx(o,{title:"回复测试",description:"只生成文本,不会发送到闲鱼会话。",icon:C}),e.jsxs("div",{className:"p-5",children:[e.jsx("textarea",{value:h,onChange:s=>K(s.target.value),className:"ios-input min-h-24 w-full resize-y rounded-md px-3 py-2.5 text-sm"}),e.jsxs("button",{type:"button",onClick:L,disabled:u||!a.ai_enabled,className:"ios-btn-primary mt-3 flex w-full items-center justify-center gap-2 rounded-md px-4 py-2.5 text-sm",children:[u?e.jsx(A,{className:"h-4 w-4 animate-spin"}):e.jsx(C,{className:"h-4 w-4"}),u?"生成中":"测试回复"]}),v&&e.jsx("div",{className:"mt-4 border-l-4 border-yellow-400 bg-yellow-50 px-4 py-3 text-sm leading-6 text-gray-800",children:v})]})]}),e.jsx("section",{className:"section-panel p-5",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(S,{className:"mt-0.5 h-5 w-5 shrink-0 text-emerald-700"}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-sm font-bold text-gray-900",children:"运行保护"}),e.jsx("p",{className:"mt-1 text-xs leading-5 text-gray-500",children:"密钥不会回传到浏览器;接口超时、空回复或格式异常时,系统会自动继续使用默认回复。"})]})]})})]})]})]}):e.jsx(D,{icon:j,title:"暂无可配置账号",description:"请先在账号管理中添加并登录闲鱼账号。"})]})};export{ae as default}; +import{r as l,o as O,n as i,z as k,j as e,B as j,L as A,E as H,aE as q,S,K as z,aR as B}from"./index-IP-mmLlr.js";import{P as F,a as U,E as D,S as o}from"./ui-Fi8l9rTp.js";import{S as $}from"./save-CNiIU-3u.js";import{M as E}from"./message-square-text-ApwvxIVw.js";import{E as G}from"./eye-off-B2vwWUUu.js";import{E as J}from"./eye-BxUVYll7.js";import{P as C}from"./play-CYUspTVx.js";const I="https://ai.88531.cn/v1",Q="https://ai.88531.cn",f={ai_enabled:!1,model_name:"qwen-plus",api_key:"",api_key_configured:!1,base_url:I,user_agent:"codex_cli_rs/0.0.0 (Hermes Agent)",max_discount_percent:10,max_discount_amount:100,max_bargain_rounds:3,context_enabled:!0,context_message_limit:12,context_expire_minutes:120,custom_prompts:""},ae=()=>{const[c,P]=l.useState([]),[t,y]=l.useState(""),[a,d]=l.useState(f),[R,x]=l.useState(!0),[p,N]=l.useState(!1),[u,_]=l.useState(!1),[g,w]=l.useState(!1),[h,K]=l.useState("你好,这个商品现在还能买吗?"),[v,b]=l.useState(""),r=l.useMemo(()=>c.find(s=>s.id===t),[c,t]);l.useEffect(()=>{O().then(s=>{var m;P(s),y(((m=s[0])==null?void 0:m.id)||"")}).catch(s=>i(s instanceof Error?s.message:"账号加载失败","error")).finally(()=>x(!1))},[]),l.useEffect(()=>{t&&(x(!0),b(""),w(!1),k(t).then(s=>d({...f,...s,api_key:""})).catch(s=>i(s instanceof Error?s.message:"AI配置加载失败","error")).finally(()=>x(!1)))},[t]);const n=(s,m)=>{d(M=>({...M,[s]:m}))},T=async()=>{if(!t){i("请先选择账号","warning");return}if(!a.model_name.trim()||!a.base_url.trim()){i("模型名称和接口地址不能为空","warning");return}N(!0);try{await z(t,a);const s=await k(t);d({...f,...s,api_key:""}),i("人工智能回复配置已保存","success")}catch(s){i(s instanceof Error?s.message:"AI配置保存失败","error")}finally{N(!1)}},L=async()=>{if(!t||!h.trim()){i("请选择账号并输入测试消息","warning");return}_(!0),b("");try{const s=await B(t,{message:h.trim(),item_title:"测试商品",item_price:100,item_desc:"仅用于测试人工智能回复,不会发送到闲鱼。"});b(s.reply||s.message||"测试完成"),i("AI回复测试完成","success")}catch(s){i(s instanceof Error?s.message:"AI回复测试失败","error")}finally{_(!1)}};return R&&c.length===0?e.jsx(F,{label:"正在加载 AI 回复配置"}):e.jsxs("div",{className:"page-stack animate-fade-in",children:[e.jsx(U,{title:"AI 回复",description:"按账号配置模型连接、上下文记忆、议价边界和业务回复规则。",icon:j,actions:e.jsxs("div",{className:"flex min-w-0 flex-wrap items-end gap-2",children:[e.jsxs("label",{className:"min-w-0 sm:w-72",children:[e.jsx("span",{className:"field-label",children:"当前账号"}),e.jsx("select",{value:t,onChange:s=>y(s.target.value),className:"ios-input w-full rounded-md px-3 py-2 text-sm font-semibold",children:c.map(s=>e.jsx("option",{value:s.id,children:s.nickname||s.remark||`账号 ${s.id.slice(0,8)}`},s.id))})]}),e.jsxs("button",{type:"button",onClick:T,disabled:p||!t,className:"ios-btn-primary flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm",children:[p?e.jsx(A,{className:"h-4 w-4 animate-spin"}):e.jsx($,{className:"h-4 w-4"}),p?"保存中":"保存配置"]})]})}),t?e.jsxs(e.Fragment,{children:[e.jsxs("section",{className:"section-panel grid gap-4 p-4 lg:grid-cols-[1fr_auto] lg:items-center",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 font-bold text-gray-900",children:[e.jsx(E,{className:"h-5 w-5"}),(r==null?void 0:r.nickname)||(r==null?void 0:r.remark)||t]}),e.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"回复优先级:关键词回复 → 人工智能回复 → 默认回复。AI失败时不会中断消息处理。"})]}),e.jsxs("label",{className:"flex cursor-pointer items-center gap-3",children:[e.jsx("span",{className:"text-sm font-bold text-gray-700",children:a.ai_enabled?"已启用":"已停用"}),e.jsx("input",{type:"checkbox",checked:a.ai_enabled,onChange:s=>n("ai_enabled",s.target.checked),className:"h-5 w-5 accent-yellow-400"})]})]}),e.jsxs("div",{className:"grid gap-6 xl:grid-cols-[minmax(0,1.35fr)_minmax(340px,0.65fr)]",children:[e.jsxs("div",{className:"space-y-6",children:[e.jsxs("section",{className:"section-panel",children:[e.jsx(o,{title:"模型连接",description:"支持 OpenAI 兼容接口;密钥留空时保留服务器中已有配置。",icon:j}),e.jsxs("div",{className:"grid gap-4 p-5 md:grid-cols-2",children:[e.jsxs("div",{className:"md:col-span-2 flex flex-wrap items-center justify-between gap-3 rounded-lg border border-brand-200 bg-brand-50 px-4 py-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"text-sm font-semibold text-gray-800",children:"没有 API Key?每天可免费领取额度"}),e.jsx("p",{className:"mt-0.5 text-xs text-gray-600",children:"兼容 OpenAI 接口,注册后把密钥填到下方即可直接用。"})]}),e.jsx("div",{className:"flex shrink-0 items-center gap-2",children:e.jsxs("a",{href:Q,target:"_blank",rel:"noreferrer noopener",className:"inline-flex items-center gap-1 rounded-md bg-brand-500 px-3 py-1.5 text-xs font-semibold text-brand-ink hover:bg-brand-600",children:["免费领取 token",e.jsx(H,{className:"h-3.5 w-3.5"})]})})]}),e.jsxs("label",{children:[e.jsx("span",{className:"mb-1.5 block text-sm font-semibold text-gray-700",children:"接口地址"}),e.jsx("input",{value:a.base_url,onChange:s=>n("base_url",s.target.value),className:"ios-input w-full rounded-md px-3 py-2.5 text-sm",placeholder:I})]}),e.jsxs("label",{children:[e.jsx("span",{className:"mb-1.5 block text-sm font-semibold text-gray-700",children:"模型名称"}),e.jsx("input",{value:a.model_name,onChange:s=>n("model_name",s.target.value),className:"ios-input w-full rounded-md px-3 py-2.5 text-sm",placeholder:"qwen-plus"})]}),e.jsxs("label",{className:"md:col-span-2",children:[e.jsxs("span",{className:"mb-1.5 flex items-center justify-between gap-3 text-sm font-semibold text-gray-700",children:["API Key",a.api_key_configured&&!a.api_key&&e.jsxs("span",{className:"flex items-center gap-1 text-xs font-medium text-emerald-700",children:[e.jsx(q,{className:"h-3.5 w-3.5"}),"已配置,留空保持不变"]})]}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{type:g?"text":"password",value:a.api_key,onChange:s=>n("api_key",s.target.value),className:"ios-input w-full rounded-md px-3 py-2.5 pr-10 text-sm",placeholder:a.api_key_configured?"输入新密钥以替换":"请输入 API Key",autoComplete:"new-password"}),e.jsx("button",{type:"button",onClick:()=>w(s=>!s),className:"absolute right-2 top-1/2 -translate-y-1/2 rounded p-1 text-gray-500 hover:bg-gray-100",title:g?"隐藏密钥":"显示密钥",children:g?e.jsx(G,{className:"h-4 w-4"}):e.jsx(J,{className:"h-4 w-4"})})]})]}),e.jsxs("label",{className:"md:col-span-2",children:[e.jsx("span",{className:"mb-1.5 block text-sm font-semibold text-gray-700",children:"User-Agent"}),e.jsx("input",{value:a.user_agent??"",onChange:s=>n("user_agent",s.target.value),className:"ios-input w-full rounded-md px-3 py-2.5 text-sm",placeholder:"codex_cli_rs/0.0.0 (Hermes Agent)"}),e.jsx("span",{className:"mt-1 block text-xs text-gray-500",children:"部分 API 中转站(如 AgentRouter)通过 User-Agent 白名单检测客户端,留空使用默认值。"})]})]})]}),e.jsxs("section",{className:"section-panel",children:[e.jsx(o,{title:"回复策略",description:"约束议价空间,并补充账号专属的语气、承诺和售后规则。",icon:E}),e.jsxs("div",{className:"grid gap-4 p-5 sm:grid-cols-3",children:[e.jsxs("label",{children:[e.jsx("span",{className:"mb-1.5 block text-sm font-semibold text-gray-700",children:"最大折扣比例"}),e.jsx("input",{type:"number",min:0,max:100,value:a.max_discount_percent,onChange:s=>n("max_discount_percent",Number(s.target.value)),className:"ios-input w-full rounded-md px-3 py-2.5 text-sm"})]}),e.jsxs("label",{children:[e.jsx("span",{className:"mb-1.5 block text-sm font-semibold text-gray-700",children:"最大折扣金额"}),e.jsx("input",{type:"number",min:0,value:a.max_discount_amount??0,onChange:s=>n("max_discount_amount",Number(s.target.value)),className:"ios-input w-full rounded-md px-3 py-2.5 text-sm"})]}),e.jsxs("label",{children:[e.jsx("span",{className:"mb-1.5 block text-sm font-semibold text-gray-700",children:"最大议价轮次"}),e.jsx("input",{type:"number",min:1,max:10,value:a.max_bargain_rounds,onChange:s=>n("max_bargain_rounds",Number(s.target.value)),className:"ios-input w-full rounded-md px-3 py-2.5 text-sm"})]}),e.jsxs("label",{className:"sm:col-span-3",children:[e.jsx("span",{className:"mb-1.5 block text-sm font-semibold text-gray-700",children:"回复风格与业务规则"}),e.jsx("textarea",{value:a.custom_prompts,onChange:s=>n("custom_prompts",s.target.value),className:"ios-input min-h-36 w-full resize-y rounded-md px-3 py-2.5 text-sm leading-6",placeholder:"例如:语气简洁,不承诺未确认的库存;涉及售后时引导买家说明订单号。"})]})]})]}),e.jsxs("section",{className:"section-panel",children:[e.jsx(o,{title:"上下文对话",description:"控制单个买家会话中可用于连续回复的近期消息范围。",icon:S}),e.jsxs("div",{className:"grid gap-4 p-5 sm:grid-cols-2",children:[e.jsxs("label",{className:"flex items-center justify-between gap-4 sm:col-span-2",children:[e.jsxs("span",{children:[e.jsx("span",{className:"block text-sm font-semibold text-gray-700",children:"记住近期对话"}),e.jsx("span",{className:"mt-1 block text-xs leading-5 text-gray-500",children:"上下文按账号、会话和商品隔离,切换商品不会混入旧商品内容。"})]}),e.jsx("input",{type:"checkbox",checked:a.context_enabled,onChange:s=>n("context_enabled",s.target.checked),className:"h-5 w-5 shrink-0 accent-yellow-400"})]}),e.jsxs("label",{children:[e.jsx("span",{className:"mb-1.5 block text-sm font-semibold text-gray-700",children:"记忆消息数"}),e.jsx("input",{type:"number",min:2,max:30,disabled:!a.context_enabled,value:a.context_message_limit,onChange:s=>n("context_message_limit",Number(s.target.value)),className:"ios-input w-full rounded-md px-3 py-2.5 text-sm disabled:bg-gray-100"})]}),e.jsxs("label",{children:[e.jsx("span",{className:"mb-1.5 block text-sm font-semibold text-gray-700",children:"上下文有效期(分钟)"}),e.jsx("input",{type:"number",min:5,max:1440,disabled:!a.context_enabled,value:a.context_expire_minutes,onChange:s=>n("context_expire_minutes",Number(s.target.value)),className:"ios-input w-full rounded-md px-3 py-2.5 text-sm disabled:bg-gray-100"})]}),e.jsx("p",{className:"text-xs leading-5 text-gray-500 sm:col-span-2",children:"付款、发货、退款、收货等系统事件不会交给大模型,将继续由订单状态和自动发货规则处理。"})]})]})]}),e.jsxs("aside",{className:"space-y-5",children:[e.jsxs("section",{className:"section-panel",children:[e.jsx(o,{title:"回复测试",description:"只生成文本,不会发送到闲鱼会话。",icon:C}),e.jsxs("div",{className:"p-5",children:[e.jsx("textarea",{value:h,onChange:s=>K(s.target.value),className:"ios-input min-h-24 w-full resize-y rounded-md px-3 py-2.5 text-sm"}),e.jsxs("button",{type:"button",onClick:L,disabled:u||!a.ai_enabled,className:"ios-btn-primary mt-3 flex w-full items-center justify-center gap-2 rounded-md px-4 py-2.5 text-sm",children:[u?e.jsx(A,{className:"h-4 w-4 animate-spin"}):e.jsx(C,{className:"h-4 w-4"}),u?"生成中":"测试回复"]}),v&&e.jsx("div",{className:"mt-4 border-l-4 border-yellow-400 bg-yellow-50 px-4 py-3 text-sm leading-6 text-gray-800",children:v})]})]}),e.jsx("section",{className:"section-panel p-5",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(S,{className:"mt-0.5 h-5 w-5 shrink-0 text-emerald-700"}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-sm font-bold text-gray-900",children:"运行保护"}),e.jsx("p",{className:"mt-1 text-xs leading-5 text-gray-500",children:"密钥不会回传到浏览器;接口超时、空回复或格式异常时,系统会自动继续使用默认回复。"})]})]})})]})]})]}):e.jsx(D,{icon:j,title:"暂无可配置账号",description:"请先在账号管理中添加并登录闲鱼账号。"})]})};export{ae as default}; diff --git a/static/assets/About-Bnoqurmz.js b/static/assets/About-Bnoqurmz.js new file mode 100644 index 0000000..f2708cb --- /dev/null +++ b/static/assets/About-Bnoqurmz.js @@ -0,0 +1,11 @@ +import{c as m,r as n,j as e,bD as h,e as g,P as b,E as l,aE as j,aU as f,aV as o,bE as N}from"./index-IP-mmLlr.js";import{a as u,E as y}from"./ui-Fi8l9rTp.js";/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const w=[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]],v=m("github",w);/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const _=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],k=m("globe",_),E="https://nav.88531.cn",L="nav.88531.cn",A="https://gitea.88531.cn/jinghui/tangzhuan-yu",C="jinghui/tangzhuan-yu",d="3970260761@qq.com",x={info:"border-blue-200 bg-blue-50 text-blue-800",warning:"border-amber-200 bg-amber-50 text-amber-800",danger:"border-red-200 bg-red-50 text-red-700"},M={info:"通知",warning:"注意",danger:"重要"},I=()=>{const[s,p]=n.useState(null),[t,c]=n.useState(!1),i=async(a=!1)=>{c(!0);try{p(await N(a))}catch{}finally{c(!1)}};n.useEffect(()=>{i()},[]);const r=(s==null?void 0:s.announcements)||[];return e.jsxs("div",{className:"page-stack animate-fade-in",children:[e.jsx(u,{title:"关于",description:"查看当前版本、检查更新与历史公告。",icon:h,actions:e.jsxs("button",{type:"button",onClick:()=>i(!0),disabled:t,className:"ios-btn-secondary flex items-center gap-2 rounded-md px-4 py-2 text-sm disabled:opacity-50",children:[e.jsx(g,{className:`h-4 w-4 ${t?"animate-spin":""}`}),t?"正在检查":"检查更新"]})}),e.jsxs("section",{className:"section-panel p-4",children:[e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[e.jsxs("div",{className:"rounded-md border border-gray-200 p-4",children:[e.jsx("p",{className:"text-xs font-semibold text-gray-500",children:"当前版本"}),e.jsx("p",{className:"mt-1 text-2xl font-bold text-gray-900",children:(s==null?void 0:s.local_version)||"—"})]}),e.jsxs("div",{className:`rounded-md border p-4 ${s!=null&&s.has_update?"border-amber-200 bg-amber-50":"border-gray-200"}`,children:[e.jsx("p",{className:"text-xs font-semibold text-gray-500",children:"最新版本"}),s!=null&&s.has_update?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mt-1 text-2xl font-bold text-amber-700",children:s.latest_version}),s.release_notes&&e.jsx("p",{className:"mt-2 whitespace-pre-wrap text-xs text-amber-800",children:s.release_notes}),s.download_url&&e.jsxs("a",{href:s.download_url,target:"_blank",rel:"noopener noreferrer",className:"ios-btn-primary mt-3 inline-flex items-center gap-2 rounded-md px-3 py-2 text-xs",children:[e.jsx(b,{className:"h-4 w-4"}),"前往下载",e.jsx(l,{className:"h-3 w-3"})]})]}):e.jsxs("p",{className:"mt-1 flex items-center gap-2 text-sm font-bold text-green-700",children:[e.jsx(j,{className:"h-5 w-5"}),s!=null&&s.source_configured?"已是最新版本":"未配置更新源"]})]})]}),!(s!=null&&s.source_configured)&&e.jsx("p",{className:"mt-4 rounded-md border border-gray-200 bg-gray-50 px-3 py-2 text-xs text-gray-600",children:"公告与更新检查已关闭。在「系统设置 → 公告与更新」里开启后, 这里会显示公告并自动检查新版本。"}),(s==null?void 0:s.error)&&e.jsxs("p",{className:"mt-3 rounded-md border border-red-200 bg-red-50 px-3 py-2 text-xs text-red-700",children:["拉取公告失败:",s.error]}),e.jsxs("div",{className:"mt-4 grid gap-3 border-t border-gray-100 pt-4 sm:grid-cols-2 lg:grid-cols-3",children:[e.jsxs("div",{className:"flex min-w-0 flex-col gap-1.5",children:[e.jsx("span",{className:"text-xs font-semibold text-gray-500",children:"更多精品应用"}),e.jsxs("a",{href:E,target:"_blank",rel:"noopener noreferrer",className:"inline-flex min-w-0 items-center gap-1.5 text-xs font-bold text-[#8c7900] hover:underline",children:[e.jsx(k,{className:"h-3.5 w-3.5 shrink-0"}),e.jsx("span",{className:"truncate",children:L}),e.jsx(l,{className:"h-3 w-3 shrink-0"})]})]}),e.jsxs("div",{className:"flex min-w-0 flex-col gap-1.5",children:[e.jsx("span",{className:"text-xs font-semibold text-gray-500",children:"开源仓库"}),e.jsxs("a",{href:A,target:"_blank",rel:"noopener noreferrer",className:"inline-flex min-w-0 items-center gap-1.5 text-xs font-bold text-[#8c7900] hover:underline",children:[e.jsx(v,{className:"h-3.5 w-3.5 shrink-0"}),e.jsx("span",{className:"truncate",children:C}),e.jsx(l,{className:"h-3 w-3 shrink-0"})]})]}),e.jsxs("div",{className:"flex min-w-0 flex-col gap-1.5",children:[e.jsx("span",{className:"text-xs font-semibold text-gray-500",children:"联系邮箱"}),e.jsxs("a",{href:`mailto:${d}`,className:"inline-flex min-w-0 items-center gap-1.5 text-xs font-bold text-[#8c7900] hover:underline",children:[e.jsx(f,{className:"h-3.5 w-3.5 shrink-0"}),e.jsx("span",{className:"truncate",children:d})]})]})]})]}),e.jsxs("section",{className:"section-panel",children:[e.jsxs("div",{className:"flex items-center gap-2 border-b border-gray-200 px-4 py-3",children:[e.jsx(o,{className:"h-4 w-4 text-gray-500"}),e.jsx("span",{className:"text-sm font-bold text-gray-800",children:"历史公告"}),e.jsxs("span",{className:"text-xs text-gray-400",children:[r.length," 条"]})]}),r.length>0?e.jsx("div",{className:"divide-y divide-gray-100",children:r.map(a=>e.jsxs("article",{className:"px-4 py-3",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("span",{className:`rounded border px-2 py-0.5 text-[10px] font-bold ${x[a.level]||x.info}`,children:M[a.level]||"通知"}),a.title&&e.jsx("h3",{className:"text-sm font-bold text-gray-900",children:a.title}),a.published_at&&e.jsx("span",{className:"text-xs text-gray-400",children:a.published_at})]}),e.jsx("p",{className:"mt-1.5 whitespace-pre-wrap text-sm leading-relaxed text-gray-700",children:a.content})]},a.id))}):e.jsx(y,{title:"暂无公告",description:"公告由授权系统推送,发布后会显示在这里。",icon:o})]})]})};export{I as default}; diff --git a/static/assets/About-CfzyaDvI.js b/static/assets/About-CfzyaDvI.js deleted file mode 100644 index 60cf467..0000000 --- a/static/assets/About-CfzyaDvI.js +++ /dev/null @@ -1,11 +0,0 @@ -import{c as m,r as n,j as e,bD as h,e as g,P as b,E as l,aE as j,aU as f,aV as o,bE as N}from"./index-BtyeumGM.js";import{a as u,E as y}from"./ui-Bucd7ZQW.js";/** - * @license lucide-react v0.562.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const w=[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]],v=m("github",w);/** - * @license lucide-react v0.562.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const _=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],k=m("globe",_),E="https://nav.88531.cn",L="nav.88531.cn",A="https://gitea.88531.cn/jinghui/xianyu-auto-reply",C="jinghui/xianyu-auto-reply",x="3970260761@qq.com",d={info:"border-blue-200 bg-blue-50 text-blue-800",warning:"border-amber-200 bg-amber-50 text-amber-800",danger:"border-red-200 bg-red-50 text-red-700"},M={info:"通知",warning:"注意",danger:"重要"},I=()=>{const[s,p]=n.useState(null),[t,c]=n.useState(!1),i=async(a=!1)=>{c(!0);try{p(await N(a))}catch{}finally{c(!1)}};n.useEffect(()=>{i()},[]);const r=(s==null?void 0:s.announcements)||[];return e.jsxs("div",{className:"page-stack animate-fade-in",children:[e.jsx(u,{title:"关于",description:"查看当前版本、检查更新与历史公告。",icon:h,actions:e.jsxs("button",{type:"button",onClick:()=>i(!0),disabled:t,className:"ios-btn-secondary flex items-center gap-2 rounded-md px-4 py-2 text-sm disabled:opacity-50",children:[e.jsx(g,{className:`h-4 w-4 ${t?"animate-spin":""}`}),t?"正在检查":"检查更新"]})}),e.jsxs("section",{className:"section-panel p-4",children:[e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[e.jsxs("div",{className:"rounded-md border border-gray-200 p-4",children:[e.jsx("p",{className:"text-xs font-semibold text-gray-500",children:"当前版本"}),e.jsx("p",{className:"mt-1 text-2xl font-bold text-gray-900",children:(s==null?void 0:s.local_version)||"—"})]}),e.jsxs("div",{className:`rounded-md border p-4 ${s!=null&&s.has_update?"border-amber-200 bg-amber-50":"border-gray-200"}`,children:[e.jsx("p",{className:"text-xs font-semibold text-gray-500",children:"最新版本"}),s!=null&&s.has_update?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mt-1 text-2xl font-bold text-amber-700",children:s.latest_version}),s.release_notes&&e.jsx("p",{className:"mt-2 whitespace-pre-wrap text-xs text-amber-800",children:s.release_notes}),s.download_url&&e.jsxs("a",{href:s.download_url,target:"_blank",rel:"noopener noreferrer",className:"ios-btn-primary mt-3 inline-flex items-center gap-2 rounded-md px-3 py-2 text-xs",children:[e.jsx(b,{className:"h-4 w-4"}),"前往下载",e.jsx(l,{className:"h-3 w-3"})]})]}):e.jsxs("p",{className:"mt-1 flex items-center gap-2 text-sm font-bold text-green-700",children:[e.jsx(j,{className:"h-5 w-5"}),s!=null&&s.source_configured?"已是最新版本":"未配置更新源"]})]})]}),!(s!=null&&s.source_configured)&&e.jsx("p",{className:"mt-4 rounded-md border border-gray-200 bg-gray-50 px-3 py-2 text-xs text-gray-600",children:"公告与更新检查已关闭。在「系统设置 → 公告与更新」里开启后, 这里会显示公告并自动检查新版本。"}),(s==null?void 0:s.error)&&e.jsxs("p",{className:"mt-3 rounded-md border border-red-200 bg-red-50 px-3 py-2 text-xs text-red-700",children:["拉取公告失败:",s.error]}),e.jsxs("div",{className:"mt-4 grid gap-3 border-t border-gray-100 pt-4 sm:grid-cols-2 lg:grid-cols-3",children:[e.jsxs("div",{className:"flex min-w-0 flex-col gap-1.5",children:[e.jsx("span",{className:"text-xs font-semibold text-gray-500",children:"官网"}),e.jsxs("a",{href:E,target:"_blank",rel:"noopener noreferrer",className:"inline-flex min-w-0 items-center gap-1.5 text-xs font-bold text-[#8c7900] hover:underline",children:[e.jsx(k,{className:"h-3.5 w-3.5 shrink-0"}),e.jsx("span",{className:"truncate",children:L}),e.jsx(l,{className:"h-3 w-3 shrink-0"})]})]}),e.jsxs("div",{className:"flex min-w-0 flex-col gap-1.5",children:[e.jsx("span",{className:"text-xs font-semibold text-gray-500",children:"开源仓库"}),e.jsxs("a",{href:A,target:"_blank",rel:"noopener noreferrer",className:"inline-flex min-w-0 items-center gap-1.5 text-xs font-bold text-[#8c7900] hover:underline",children:[e.jsx(v,{className:"h-3.5 w-3.5 shrink-0"}),e.jsx("span",{className:"truncate",children:C}),e.jsx(l,{className:"h-3 w-3 shrink-0"})]})]}),e.jsxs("div",{className:"flex min-w-0 flex-col gap-1.5",children:[e.jsx("span",{className:"text-xs font-semibold text-gray-500",children:"联系邮箱"}),e.jsxs("a",{href:`mailto:${x}`,className:"inline-flex min-w-0 items-center gap-1.5 text-xs font-bold text-[#8c7900] hover:underline",children:[e.jsx(f,{className:"h-3.5 w-3.5 shrink-0"}),e.jsx("span",{className:"truncate",children:x})]})]})]})]}),e.jsxs("section",{className:"section-panel",children:[e.jsxs("div",{className:"flex items-center gap-2 border-b border-gray-200 px-4 py-3",children:[e.jsx(o,{className:"h-4 w-4 text-gray-500"}),e.jsx("span",{className:"text-sm font-bold text-gray-800",children:"历史公告"}),e.jsxs("span",{className:"text-xs text-gray-400",children:[r.length," 条"]})]}),r.length>0?e.jsx("div",{className:"divide-y divide-gray-100",children:r.map(a=>e.jsxs("article",{className:"px-4 py-3",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("span",{className:`rounded border px-2 py-0.5 text-[10px] font-bold ${d[a.level]||d.info}`,children:M[a.level]||"通知"}),a.title&&e.jsx("h3",{className:"text-sm font-bold text-gray-900",children:a.title}),a.published_at&&e.jsx("span",{className:"text-xs text-gray-400",children:a.published_at})]}),e.jsx("p",{className:"mt-1.5 whitespace-pre-wrap text-sm leading-relaxed text-gray-700",children:a.content})]},a.id))}):e.jsx(y,{title:"暂无公告",description:"公告由授权系统推送,发布后会显示在这里。",icon:o})]})]})};export{I as default}; diff --git a/static/assets/AccountList-BfQLeVfu.js b/static/assets/AccountList-DfgloUxg.js similarity index 99% rename from static/assets/AccountList-BfQLeVfu.js rename to static/assets/AccountList-DfgloUxg.js index a021929..d6072af 100644 --- a/static/assets/AccountList-BfQLeVfu.js +++ b/static/assets/AccountList-DfgloUxg.js @@ -1,4 +1,4 @@ -import{c as ee,r as i,j as e,U as Ce,B as Q,M as Ze,L as C,S as G,e as Ae,k as es,b as z,X as T,l as ss,m as O,o as ts,p as as,q as rs,s as ls,t as ns,n as m,u as Ie,v as Me,w as is,x as os,y as ds,z as cs,A as ms,D as xs,F as us,G as hs,H as ps,I as gs,J as fs,K as bs,N as ys}from"./index-BtyeumGM.js";import{P as js,a as Ns,E as _s}from"./ui-Bucd7ZQW.js";import{C as Z}from"./check-BL4ZPX5c.js";import{S as ws}from"./sparkles-CTC5UJ5I.js";import{P as vs,a as ks}from"./power-BzUM4Jxl.js";import{T as Ss}from"./trash-2-Cpz1crux.js";import{K as Cs}from"./key-DGAb9JNS.js";import{E as As}from"./eye-off-BfkVRJHJ.js";import{E as Is}from"./eye-C6bcwqAG.js";import{S as $e}from"./save-B_0bwRwJ.js";/** +import{c as ee,r as i,j as e,U as Ce,B as Q,M as Ze,L as C,S as G,e as Ae,k as es,b as z,X as T,l as ss,m as O,o as ts,p as as,q as rs,s as ls,t as ns,n as m,u as Ie,v as Me,w as is,x as os,y as ds,z as cs,A as ms,D as xs,F as us,G as hs,H as ps,I as gs,J as fs,K as bs,N as ys}from"./index-IP-mmLlr.js";import{P as js,a as Ns,E as _s}from"./ui-Fi8l9rTp.js";import{C as Z}from"./check-D50E5xnW.js";import{S as ws}from"./sparkles-CavN45fA.js";import{P as vs,a as ks}from"./power-Ucg7FCbo.js";import{T as Ss}from"./trash-2-BNPsgs2t.js";import{K as Cs}from"./key-ItWA3Cb3.js";import{E as As}from"./eye-off-B2vwWUUu.js";import{E as Is}from"./eye-BxUVYll7.js";import{S as $e}from"./save-CNiIU-3u.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/BuyerInteraction-tZgTn_6g.js b/static/assets/BuyerInteraction-BBBi7zM4.js similarity index 96% rename from static/assets/BuyerInteraction-tZgTn_6g.js rename to static/assets/BuyerInteraction-BBBi7zM4.js index 24297bc..572d9d9 100644 --- a/static/assets/BuyerInteraction-tZgTn_6g.js +++ b/static/assets/BuyerInteraction-BBBi7zM4.js @@ -1 +1 @@ -import{r as n,j as e,Q as C,e as A,aS as $,T as P,o as B,n as i,aX as H,bF as M}from"./index-BtyeumGM.js";import{P as D,a as R,N as z,S as d}from"./ui-Bucd7ZQW.js";import{S as O}from"./save-B_0bwRwJ.js";import{S as U}from"./shield-alert-Rn-eFcN-.js";import{F as X}from"./flower-2-f7YOZRab.js";import{M as q}from"./message-square-text-s_nuv0lf.js";const r=200,E="宝贝收到了,很满意,感谢老板,欢迎下次再来!",G="亲,感谢支持!有任何问题随时找我~",I={auto_rate_enabled:"评价买家",auto_flower_enabled:"索要小红花",auto_thanks_enabled:"收货致谢",auto_receive_flower_enabled:"自动收下小红花"},K=[{value:300,label:"5 分钟"},{value:900,label:"15 分钟"},{value:1800,label:"30 分钟"},{value:3600,label:"1 小时"},{value:7200,label:"2 小时(默认)"},{value:21600,label:"6 小时"},{value:86400,label:"24 小时"}],ee=()=>{const[l,c]=n.useState(null),[p,h]=n.useState(!1),[b,_]=n.useState(!1),[o,T]=n.useState([]),[f,x]=n.useState({}),j=()=>{h(!0),Promise.all([$(),P().catch(()=>null),B().catch(()=>[])]).then(([t,a,s])=>{c({...t,auto_rate_template:(t.auto_rate_template??"").trim()||(a==null?void 0:a.auto_rate_template)||E}),T(s),x((a==null?void 0:a.accounts)??{})}).finally(()=>h(!1))},F=async(t,a)=>{const s=f[t]??{auto_rate_enabled:!1,auto_flower_enabled:!1,auto_thanks_enabled:!1,auto_receive_flower_enabled:!1},w={...s,[a]:!s[a]};x(u=>({...u,[t]:w}));try{await M(t,{[a]:w[a]})}catch(u){x(k=>({...k,[t]:s})),i(`保存失败:${u.message}`)}};n.useEffect(()=>{j()},[]);const L=async()=>{if(!l)return;const t=(l.auto_rate_template||"").trim();if(!t){i("默认评价内容不能为空");return}if(t.length>r){i(`默认评价内容不能超过 ${r} 字`);return}_(!0);try{await H({auto_rate_template:t,auto_thanks_template:(l.auto_thanks_template||"").trim(),buyer_interaction_interval:String(S)}),i("买家互动配置已保存")}catch(a){i(`保存失败:${a.message}`)}finally{_(!1)}};if(!l)return e.jsx(D,{label:"正在加载买家互动配置"});const m=t=>f[t]??{auto_rate_enabled:!1,auto_flower_enabled:!1,auto_thanks_enabled:!1,auto_receive_flower_enabled:!1},g=o.some(t=>m(t.id).auto_rate_enabled),y=o.some(t=>m(t.id).auto_thanks_enabled),N=l.auto_rate_template??"",v=l.auto_thanks_template??"",S=Number(l.buyer_interaction_interval)||7200;return e.jsxs("div",{className:"page-stack animate-fade-in",children:[e.jsx(R,{title:"买家互动",description:"评价买家、索要小红花与自动收花。涉及平台实际操作,请按账号开启。",icon:C,actions:e.jsxs(e.Fragment,{children:[e.jsxs("button",{type:"button",onClick:j,disabled:p,className:"ios-btn-secondary flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm",children:[e.jsx(A,{className:`h-4 w-4 ${p?"animate-spin":""}`}),"刷新"]}),e.jsxs("button",{type:"button",onClick:()=>void L(),disabled:b,className:"ios-btn-primary flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm",children:[e.jsx(O,{className:"h-4 w-4"}),b?"保存中":"保存设置"]})]})}),e.jsx(z,{type:"warning",message:"评价提交后无法撤销,求花会向买家发送一条消息。建议先用测试订单验证效果。"}),e.jsxs("div",{className:"grid gap-4 xl:grid-cols-2",children:[e.jsxs("section",{className:"section-panel",children:[e.jsx(d,{title:"按账号开启",description:"逐个账号控制。关闭的账号不会自动执行,订单页也不显示入口、后端拒绝请求。",icon:U}),o.length===0?e.jsx("p",{className:"px-4 py-6 text-sm text-gray-500",children:"还没有账号,请先在账号管理里添加。"}):e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-gray-200 text-left text-xs text-gray-500",children:[e.jsx("th",{className:"px-4 py-2 font-semibold",children:"账号"}),e.jsx("th",{className:"px-4 py-2 text-center font-semibold",children:"评价买家"}),e.jsx("th",{className:"px-4 py-2 text-center font-semibold",children:"索要小红花"}),e.jsx("th",{className:"px-4 py-2 text-center font-semibold",children:"收货致谢"}),e.jsx("th",{className:"px-4 py-2 text-center font-semibold",children:"自动收下小红花"})]})}),e.jsx("tbody",{children:o.map(t=>{const a=m(t.id);return e.jsxs("tr",{className:"border-b border-gray-100 last:border-b-0",children:[e.jsxs("td",{className:"px-4 py-3",children:[e.jsx("p",{className:"font-semibold text-gray-900",children:t.nickname||t.id}),e.jsx("p",{className:"mt-0.5 font-mono text-xs text-gray-400",children:t.id})]}),["auto_rate_enabled","auto_flower_enabled","auto_thanks_enabled","auto_receive_flower_enabled"].map(s=>e.jsx("td",{className:"px-4 py-3 text-center",children:e.jsx("button",{type:"button",role:"switch","aria-checked":a[s],"aria-label":`${t.nickname||t.id} ${I[s]}`,onClick:()=>void F(t.id,s),className:`relative h-6 w-11 shrink-0 rounded-full transition-colors ${a[s]?"bg-[#ffe100]":"bg-gray-300"}`,children:e.jsx("span",{className:`absolute left-1 top-1 h-4 w-4 rounded-full bg-white transition-transform ${a[s]?"translate-x-5":""}`})})},s))]},t.id)})})]})}),e.jsxs("p",{className:"border-t border-gray-100 px-4 py-3 text-xs leading-5 text-gray-500",children:["三项都在",e.jsx("strong",{className:"font-semibold text-gray-700",children:"买家确认收货"}),"后触发。 致谢文本立即发送;评价和求花要等闲鱼把订单切到「交易成功」,通常几十秒内完成, 失败则由下面的兜底轮询稍后重试。"]})]}),e.jsxs("section",{className:"section-panel",children:[e.jsx(d,{title:"默认评价内容",description:"订单页打开评价框时自动填入,仍可逐单修改后再提交。",icon:X}),e.jsxs("div",{className:"px-4 py-3",children:[e.jsx("label",{className:"field-label",children:"评价文案"}),e.jsx("textarea",{value:N,onChange:t=>c({...l,auto_rate_template:t.target.value}),maxLength:r,placeholder:E,className:"ios-input mt-1 min-h-28 w-full resize-y rounded-md px-3 py-2.5 text-sm",disabled:!g}),e.jsxs("div",{className:"mt-1 flex items-center justify-between",children:[e.jsx("span",{className:"text-xs text-gray-500",children:g?"闲鱼对评价内容有长度和内容限制,过长可能被拒绝。":"为任一账号开启「评价买家」后可编辑。"}),e.jsxs("span",{className:"text-xs text-gray-400",children:[N.length,"/",r]})]})]})]}),e.jsxs("section",{className:"section-panel",children:[e.jsx(d,{title:"收货致谢文本",description:"买家确认收货后立即发送这条消息。留空则不发送。",icon:q}),e.jsxs("div",{className:"px-4 py-3",children:[e.jsx("label",{className:"field-label",children:"致谢文案"}),e.jsx("textarea",{value:v,onChange:t=>c({...l,auto_thanks_template:t.target.value}),maxLength:r,placeholder:G,className:"ios-input mt-1 min-h-28 w-full resize-y rounded-md px-3 py-2.5 text-sm",disabled:!y}),e.jsxs("div",{className:"mt-1 flex items-center justify-between",children:[e.jsx("span",{className:"text-xs text-gray-500",children:y?"同一笔交易只发一次,不会因多条系统消息重复打扰买家。":"为任一账号开启「收货致谢」后可编辑。"}),e.jsxs("span",{className:"text-xs text-gray-400",children:[v.length,"/",r]})]})]})]}),e.jsxs("section",{className:"section-panel",children:[e.jsx(d,{title:"兜底检查间隔",description:"确认收货已由消息事件即时触发,这里只在漏收消息或服务重启时补做。",icon:A}),e.jsxs("div",{className:"px-4 py-3",children:[e.jsx("label",{className:"field-label",children:"检查频率"}),e.jsx("select",{value:S,onChange:t=>c({...l,buyer_interaction_interval:t.target.value}),className:"ios-input mt-1 w-full rounded-md px-3 py-2.5 text-sm",children:K.map(t=>e.jsx("option",{value:t.value,children:t.label},t.value))}),e.jsx("p",{className:"mt-1 text-xs leading-5 text-gray-500",children:"每轮都会拉取一次卖出订单列表,设得太密容易触发平台风控。 正常情况下靠即时触发就够了,这里保持较长间隔即可。"})]})]})]})]})};export{ee as default}; +import{r as n,j as e,Q as C,e as A,aS as $,T as P,o as B,n as i,aX as H,bF as M}from"./index-IP-mmLlr.js";import{P as D,a as R,N as z,S as d}from"./ui-Fi8l9rTp.js";import{S as O}from"./save-CNiIU-3u.js";import{S as U}from"./shield-alert-B8_J0uYT.js";import{F as X}from"./flower-2-fqYsfuSn.js";import{M as q}from"./message-square-text-ApwvxIVw.js";const r=200,E="宝贝收到了,很满意,感谢老板,欢迎下次再来!",G="亲,感谢支持!有任何问题随时找我~",I={auto_rate_enabled:"评价买家",auto_flower_enabled:"索要小红花",auto_thanks_enabled:"收货致谢",auto_receive_flower_enabled:"自动收下小红花"},K=[{value:300,label:"5 分钟"},{value:900,label:"15 分钟"},{value:1800,label:"30 分钟"},{value:3600,label:"1 小时"},{value:7200,label:"2 小时(默认)"},{value:21600,label:"6 小时"},{value:86400,label:"24 小时"}],ee=()=>{const[l,c]=n.useState(null),[p,h]=n.useState(!1),[b,_]=n.useState(!1),[o,T]=n.useState([]),[f,x]=n.useState({}),j=()=>{h(!0),Promise.all([$(),P().catch(()=>null),B().catch(()=>[])]).then(([t,a,s])=>{c({...t,auto_rate_template:(t.auto_rate_template??"").trim()||(a==null?void 0:a.auto_rate_template)||E}),T(s),x((a==null?void 0:a.accounts)??{})}).finally(()=>h(!1))},F=async(t,a)=>{const s=f[t]??{auto_rate_enabled:!1,auto_flower_enabled:!1,auto_thanks_enabled:!1,auto_receive_flower_enabled:!1},w={...s,[a]:!s[a]};x(u=>({...u,[t]:w}));try{await M(t,{[a]:w[a]})}catch(u){x(k=>({...k,[t]:s})),i(`保存失败:${u.message}`)}};n.useEffect(()=>{j()},[]);const L=async()=>{if(!l)return;const t=(l.auto_rate_template||"").trim();if(!t){i("默认评价内容不能为空");return}if(t.length>r){i(`默认评价内容不能超过 ${r} 字`);return}_(!0);try{await H({auto_rate_template:t,auto_thanks_template:(l.auto_thanks_template||"").trim(),buyer_interaction_interval:String(S)}),i("买家互动配置已保存")}catch(a){i(`保存失败:${a.message}`)}finally{_(!1)}};if(!l)return e.jsx(D,{label:"正在加载买家互动配置"});const m=t=>f[t]??{auto_rate_enabled:!1,auto_flower_enabled:!1,auto_thanks_enabled:!1,auto_receive_flower_enabled:!1},g=o.some(t=>m(t.id).auto_rate_enabled),y=o.some(t=>m(t.id).auto_thanks_enabled),N=l.auto_rate_template??"",v=l.auto_thanks_template??"",S=Number(l.buyer_interaction_interval)||7200;return e.jsxs("div",{className:"page-stack animate-fade-in",children:[e.jsx(R,{title:"买家互动",description:"评价买家、索要小红花与自动收花。涉及平台实际操作,请按账号开启。",icon:C,actions:e.jsxs(e.Fragment,{children:[e.jsxs("button",{type:"button",onClick:j,disabled:p,className:"ios-btn-secondary flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm",children:[e.jsx(A,{className:`h-4 w-4 ${p?"animate-spin":""}`}),"刷新"]}),e.jsxs("button",{type:"button",onClick:()=>void L(),disabled:b,className:"ios-btn-primary flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm",children:[e.jsx(O,{className:"h-4 w-4"}),b?"保存中":"保存设置"]})]})}),e.jsx(z,{type:"warning",message:"评价提交后无法撤销,求花会向买家发送一条消息。建议先用测试订单验证效果。"}),e.jsxs("div",{className:"grid gap-4 xl:grid-cols-2",children:[e.jsxs("section",{className:"section-panel",children:[e.jsx(d,{title:"按账号开启",description:"逐个账号控制。关闭的账号不会自动执行,订单页也不显示入口、后端拒绝请求。",icon:U}),o.length===0?e.jsx("p",{className:"px-4 py-6 text-sm text-gray-500",children:"还没有账号,请先在账号管理里添加。"}):e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-gray-200 text-left text-xs text-gray-500",children:[e.jsx("th",{className:"px-4 py-2 font-semibold",children:"账号"}),e.jsx("th",{className:"px-4 py-2 text-center font-semibold",children:"评价买家"}),e.jsx("th",{className:"px-4 py-2 text-center font-semibold",children:"索要小红花"}),e.jsx("th",{className:"px-4 py-2 text-center font-semibold",children:"收货致谢"}),e.jsx("th",{className:"px-4 py-2 text-center font-semibold",children:"自动收下小红花"})]})}),e.jsx("tbody",{children:o.map(t=>{const a=m(t.id);return e.jsxs("tr",{className:"border-b border-gray-100 last:border-b-0",children:[e.jsxs("td",{className:"px-4 py-3",children:[e.jsx("p",{className:"font-semibold text-gray-900",children:t.nickname||t.id}),e.jsx("p",{className:"mt-0.5 font-mono text-xs text-gray-400",children:t.id})]}),["auto_rate_enabled","auto_flower_enabled","auto_thanks_enabled","auto_receive_flower_enabled"].map(s=>e.jsx("td",{className:"px-4 py-3 text-center",children:e.jsx("button",{type:"button",role:"switch","aria-checked":a[s],"aria-label":`${t.nickname||t.id} ${I[s]}`,onClick:()=>void F(t.id,s),className:`relative h-6 w-11 shrink-0 rounded-full transition-colors ${a[s]?"bg-[#ffe100]":"bg-gray-300"}`,children:e.jsx("span",{className:`absolute left-1 top-1 h-4 w-4 rounded-full bg-white transition-transform ${a[s]?"translate-x-5":""}`})})},s))]},t.id)})})]})}),e.jsxs("p",{className:"border-t border-gray-100 px-4 py-3 text-xs leading-5 text-gray-500",children:["三项都在",e.jsx("strong",{className:"font-semibold text-gray-700",children:"买家确认收货"}),"后触发。 致谢文本立即发送;评价和求花要等闲鱼把订单切到「交易成功」,通常几十秒内完成, 失败则由下面的兜底轮询稍后重试。"]})]}),e.jsxs("section",{className:"section-panel",children:[e.jsx(d,{title:"默认评价内容",description:"订单页打开评价框时自动填入,仍可逐单修改后再提交。",icon:X}),e.jsxs("div",{className:"px-4 py-3",children:[e.jsx("label",{className:"field-label",children:"评价文案"}),e.jsx("textarea",{value:N,onChange:t=>c({...l,auto_rate_template:t.target.value}),maxLength:r,placeholder:E,className:"ios-input mt-1 min-h-28 w-full resize-y rounded-md px-3 py-2.5 text-sm",disabled:!g}),e.jsxs("div",{className:"mt-1 flex items-center justify-between",children:[e.jsx("span",{className:"text-xs text-gray-500",children:g?"闲鱼对评价内容有长度和内容限制,过长可能被拒绝。":"为任一账号开启「评价买家」后可编辑。"}),e.jsxs("span",{className:"text-xs text-gray-400",children:[N.length,"/",r]})]})]})]}),e.jsxs("section",{className:"section-panel",children:[e.jsx(d,{title:"收货致谢文本",description:"买家确认收货后立即发送这条消息。留空则不发送。",icon:q}),e.jsxs("div",{className:"px-4 py-3",children:[e.jsx("label",{className:"field-label",children:"致谢文案"}),e.jsx("textarea",{value:v,onChange:t=>c({...l,auto_thanks_template:t.target.value}),maxLength:r,placeholder:G,className:"ios-input mt-1 min-h-28 w-full resize-y rounded-md px-3 py-2.5 text-sm",disabled:!y}),e.jsxs("div",{className:"mt-1 flex items-center justify-between",children:[e.jsx("span",{className:"text-xs text-gray-500",children:y?"同一笔交易只发一次,不会因多条系统消息重复打扰买家。":"为任一账号开启「收货致谢」后可编辑。"}),e.jsxs("span",{className:"text-xs text-gray-400",children:[v.length,"/",r]})]})]})]}),e.jsxs("section",{className:"section-panel",children:[e.jsx(d,{title:"兜底检查间隔",description:"确认收货已由消息事件即时触发,这里只在漏收消息或服务重启时补做。",icon:A}),e.jsxs("div",{className:"px-4 py-3",children:[e.jsx("label",{className:"field-label",children:"检查频率"}),e.jsx("select",{value:S,onChange:t=>c({...l,buyer_interaction_interval:t.target.value}),className:"ios-input mt-1 w-full rounded-md px-3 py-2.5 text-sm",children:K.map(t=>e.jsx("option",{value:t.value,children:t.label},t.value))}),e.jsx("p",{className:"mt-1 text-xs leading-5 text-gray-500",children:"每轮都会拉取一次卖出订单列表,设得太密容易触发平台风控。 正常情况下靠即时触发就够了,这里保持较长间隔即可。"})]})]})]})]})};export{ee as default}; diff --git a/static/assets/CardList-Dpxu25YO.js b/static/assets/CardList-CfOseTaj.js similarity index 98% rename from static/assets/CardList-Dpxu25YO.js rename to static/assets/CardList-CfOseTaj.js index 2b72102..233af90 100644 --- a/static/assets/CardList-Dpxu25YO.js +++ b/static/assets/CardList-CfOseTaj.js @@ -1,4 +1,4 @@ -import{c as P,r as m,j as e,X as D,a6 as re,n as j,a7 as de,a8 as M,a9 as G,b as z,aa as H,v as Y,ab as ce,ac as oe,ad as me}from"./index-BtyeumGM.js";import{a as pe,S as xe,E as B}from"./ui-Bucd7ZQW.js";import{P as U}from"./plus-D66LUkyr.js";import{S as he}from"./square-pen-C7b8tolk.js";import{T as ye}from"./trash-2-Cpz1crux.js";import{P as Z}from"./package-DRVL5sin.js";import{S as ue}from"./save-B_0bwRwJ.js";import{I as q}from"./image-BRbxtWrD.js";import{P as be}from"./package-check-OgTe2cXI.js";/** +import{c as P,r as m,j as e,X as D,a6 as re,n as j,a7 as de,a8 as M,a9 as G,b as z,aa as H,v as Y,ab as ce,ac as oe,ad as me}from"./index-IP-mmLlr.js";import{a as pe,S as xe,E as B}from"./ui-Fi8l9rTp.js";import{P as U}from"./plus-BbnHS2Zx.js";import{S as he}from"./square-pen-ZPivfDGR.js";import{T as ye}from"./trash-2-BNPsgs2t.js";import{P as Z}from"./package-C7ydMeAZ.js";import{S as ue}from"./save-CNiIU-3u.js";import{I as q}from"./image-hfWSlf8S.js";import{P as be}from"./package-check-OAWoRoy_.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/Dashboard-CAq3bjQ4.js b/static/assets/Dashboard-CeRTyM_j.js similarity index 99% rename from static/assets/Dashboard-CAq3bjQ4.js rename to static/assets/Dashboard-CeRTyM_j.js index 4837000..6bc3c5b 100644 --- a/static/assets/Dashboard-CAq3bjQ4.js +++ b/static/assets/Dashboard-CeRTyM_j.js @@ -1,4 +1,4 @@ -var Db=Object.defineProperty;var $b=(e,t,r)=>t in e?Db(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var _i=(e,t,r)=>$b(e,typeof t!="symbol"?t+"":t,r);import{c as gu,r as v,a as bu,b as xu,g as Nb,R as Rb,d as Lb,j as I,C as zb,e as Bb,U as Fb,E as Wb,f as Kb,h as Ub,n as Hb,i as Ac}from"./index-BtyeumGM.js";import{P as Yb,a as Gb,b as Vb,S as qb,E as Ii}from"./ui-Bucd7ZQW.js";import{P as Ro}from"./package-DRVL5sin.js";import{T as Lh}from"./trending-up-B0n4p6ZM.js";import{A as Xb}from"./activity-j8Ec2Exe.js";import{P as Zb}from"./package-check-OgTe2cXI.js";/** +var Db=Object.defineProperty;var $b=(e,t,r)=>t in e?Db(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var _i=(e,t,r)=>$b(e,typeof t!="symbol"?t+"":t,r);import{c as gu,r as v,a as bu,b as xu,g as Nb,R as Rb,d as Lb,j as I,C as zb,e as Bb,U as Fb,E as Wb,f as Kb,h as Ub,n as Hb,i as Ac}from"./index-IP-mmLlr.js";import{P as Yb,a as Gb,b as Vb,S as qb,E as Ii}from"./ui-Fi8l9rTp.js";import{P as Ro}from"./package-C7ydMeAZ.js";import{T as Lh}from"./trending-up-BcW73Gjl.js";import{A as Xb}from"./activity-Dmn-a3S9.js";import{P as Zb}from"./package-check-OAWoRoy_.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/Help-CcYy9cNP.js b/static/assets/Help-BhyISmfe.js similarity index 99% rename from static/assets/Help-CcYy9cNP.js rename to static/assets/Help-BhyISmfe.js index c509221..5efc5d9 100644 --- a/static/assets/Help-CcYy9cNP.js +++ b/static/assets/Help-BhyISmfe.js @@ -1 +1 @@ -import{r as o,j as e}from"./index-BtyeumGM.js";const r=[{group:"快速开始",items:[{id:"dashboard",label:"系统总览"},{id:"accounts",label:"账号管理"}]},{group:"闲鱼业务",items:[{id:"items",label:"商品与发货"},{id:"resell",label:"一键转卖"},{id:"hotlist",label:"实时热卖榜"},{id:"pricewatch",label:"价格监控"},{id:"orders",label:"订单管理"},{id:"buyer-interaction",label:"买家互动"},{id:"cards",label:"卡密库存"}]},{group:"消息与自动化",items:[{id:"messages",label:"消息中心"},{id:"auto-reply",label:"自动回复"},{id:"ai-reply",label:"AI 回复"},{id:"product-automation",label:"商品自动化"}]},{group:"系统",items:[{id:"notifications",label:"通知与日志"},{id:"settings",label:"系统设置"},{id:"users",label:"用户管理"},{id:"about",label:"关于本系统"}]}],p={dashboard:{title:"系统总览",intro:"登录后的首页,汇总账号、订单、营收和库存数据,一眼判断当前经营状态。",steps:["顶部时间筛选可切换统计周期:今天 / 昨天 / 三天内 / 7天内 / 一个月内 / 自定义。","「有效成交额」与「已到账」两张卡片展示所选周期内的资金数据。","「系统运行中」状态灯表示后端自动回复、定时任务正常运行。","左侧菜单点击任意功能即可切换页面,右上角可切换日间/夜间模式。"],tips:["新部署时没有订单记录,金额显示 ¥0.00 属正常,产生交易后自动累计。"]},accounts:{title:"账号管理",intro:"所有功能的入口:先把闲鱼账号接入系统,其他页面才能选择该账号操作。",steps:["点击「添加账号」,填入账号备注名与 Cookie(从浏览器登录闲鱼后在开发者工具 Network 里复制)。","保存后列表会显示该账号,可点击「检测」验证 Cookie 是否仍然有效。","失效的账号需要重新复制 Cookie 更新;不用的账号可「禁用」而不必删除。","启用状态的账号才会参与自动回复、订单同步、消息聚合等自动化。"],tips:["Cookie 等同账号登录态,请勿泄露;本系统只保存在自己的服务器数据库中。"]},items:{title:"商品与发货",intro:"同步闲鱼在售商品,为每个商品配置自动发货内容(卡密、网盘链接或文字说明)。",steps:["选择账号后点击同步,把该账号在闲鱼的在售商品拉取到列表。","给商品设置发货内容:虚拟商品可填卡密说明或网盘链接,实物商品可填物流备注。","买家付款后系统按这里配置的内容自动回复发货,无需手动复制粘贴。","商品价格、标题变化可通过刷新按钮同步最新状态。"],tips:["发货内容支持多行文本与链接,建议按「商品名称 + 提取码」格式写清楚。"]},resell:{title:"一键转卖",intro:"从收藏或搜索结果里挑商品,改好标题价格直接发布到自己账号,做无货源转卖。",steps:["右上角先选择要发布到的闲鱼账号。","点「我的收藏」→「加载收藏」读取该账号收藏的在售商品;或切到「搜索商品」按关键词找货。","在列表中勾选想转卖的商品,修改标题、价格、描述等发布信息。","点「一键转卖」发布,商品即挂到自己账号名下。"],tips:["发布前核对价格是否留足利润;同名商品重复转卖前先在商品列表确认未上架过。"]},hotlist:{title:"实时热卖榜",intro:"抓取闲鱼实时热卖数据,帮你判断什么好卖、该上什么货。",steps:["选择分类或直接查看综合热卖榜,列表按近期成交热度排序。","点击商品可查看详情与价格区间,作为自己定价的参考。","看中的品可直接跳「一键转卖」上架到自己账号。"],tips:["榜单数据为实时抓取,个别时段可能延迟,可点刷新重新拉取。"]},pricewatch:{title:"价格监控",intro:"设定关键词和目标价,系统定时搜索闲鱼,出现低于目标价的商品立即通知你捡漏。",steps:["点「新建规则」:填写关键词(如想蹲的商品名)、目标价、检测间隔,保存后立即执行一次检测。","检测结果展示匹配商品数、历史最低价与「最近一次」的完整商品信息(超长内容自动换行展示)。","低于目标价时触发通知——前提是已在「通知与日志」页配置好通知渠道并勾选「价格监控」事件(见下方章节)。","点「历史记录」查看每次检测的明细;不需要的规则可停用或删除。"],tips:["通知没发出来时,页面顶部的红色提示会写明去哪配置,按提示到「通知与日志」页补配即可。","关键词越具体匹配越准,避免太宽泛导致噪音过多。"]},orders:{title:"订单管理",intro:"汇总所选账号的闲鱼订单,查看状态、手动补发与核对发货记录。",steps:["选择账号与时间范围筛选订单,列表显示买家、商品、金额与状态。","自动发货成功的订单会标记发货内容;失败的可在这里点「重新发货」补发。","点订单行可展开详情,核对买家留言与发货回执。"],tips:["订单数据来自定时同步,新成交订单可能延迟几分钟出现。"]},"buyer-interaction":{title:"买家互动",intro:"评价买家、索要小红花与自动收花——和闲鱼平台实际操作绑定,需按账号开启。",steps:["先在「账号管理」添加账号(无账号时本页会提示先去添加)。","在「按账号开启」区域为需要的账号打开对应开关:评价买家 / 索要小红花 / 自动收花。","点「保存设置」生效;关闭的账号不会执行任何互动,订单页也不显示入口。","建议先用一笔测试订单验证效果,再放开到全部账号。"],tips:["⚠ 评价提交后无法撤销,索要小红花会给买家发一条消息——务必先小范围测试。"]},cards:{title:"卡密库存",intro:"导入与管理卡密,配合「商品与发货」实现虚拟商品自动发货、库存自动扣减。",steps:["新建卡密分组(对应某个商品),批量粘贴或上传卡密文本,一行一条。","在「商品与发货」把商品的发货方式关联到该卡密分组。","买家付款后系统自动取一条卡密发出并扣减库存,列表显示剩余数量。","库存告急时及时补充,发货失败的订单会记录原因便于排查。"],tips:["卡密只对管理员可见,普通用户页面不会展示明文。"]},messages:{title:"消息中心",intro:"把多个闲鱼账号的买家消息聚合到一处,集中查看与回复。",steps:["选择账号后加载未读/全部消息,按时间倒序展示。","点击会话查看上下文并可手动回复;已被自动回复接管的会话会标注规则来源。","新消息会实时提醒,避免漏掉买家咨询。"],tips:["消息聚合依赖账号 Cookie 有效,账号失效时先到「账号管理」更新。"]},"auto-reply":{title:"自动回复",intro:"配置关键词规则:买家消息命中触发词即自动回复,7×24 接待。",steps:["点「新建规则」,设置触发关键词(支持多个、精确/模糊匹配)与回复内容。","回复支持多行文本、链接与随机话术(多条回复轮流发送,避免重复感)。","保存即生效,无需重启;列表可停用、编辑、删除规则。","在规则上可指定仅对某账号生效,或全局所有账号共用。"],tips:["建议先配 3-5 条高频问题(价格、包邮、发货时间)再逐步扩充。"]},"ai-reply":{title:"AI 回复",intro:"接入大模型 API,让 AI 根据上下文智能回复买家消息、自动议价。",steps:["先到「系统设置 → AI 服务」填好 API 地址、Key 与模型名(本地 NewAPI 或任意兼容接口)。","在本页设置议价策略:最大优惠百分比/金额、议价轮数上限。","开启「上下文」后 AI 会携带最近若干条对话,回复更连贯。","系统先匹配关键词规则,未命中才走 AI;可在页面调整两者的优先级。"],tips:["AI 每次回复消耗 API 额度,量大时建议设置轮数与优惠上限兜底。"]},"product-automation":{title:"商品自动化",intro:"商品素材库与批量任务:筛选规则、删除计划、历史数据补偿集中管理。",steps:["「素材库」标签:按账号/关键词搜索已入库的商品素材,供批量任务取用。","「筛选规则」标签:定义商品筛选条件(标题、分类、价格区间),命中规则的素材进入处理流程。","「删除计划」标签:创建批量下架任务,按计划时间或条件执行删除。","「补偿任务」标签:对漏统计的历史数据发起回补;「刷新数据」同步最新任务状态。"],tips:["删除计划执行前请核对规则,批量下架不可自动撤销。"]},notifications:{title:"通知与日志",intro:"统一管理外部通知渠道、账号绑定、风控事件和系统运行日志。",steps:["「通知渠道」标签:点「新建渠道」创建发送通道——邮件渠道只需填接收邮箱(SMTP 自动复用系统设置)。","「账号通知」标签:新建规则时选择账号 + 渠道,并在「事件」里勾选要提醒的类型(价格监控、登录异常等)。","「风控日志」「系统日志」标签:查看平台风控事件与系统运行记录,便于排查问题。","顶部「刷新配置」可重新加载渠道与规则的最新状态。"],tips:["价格监控要发通知:渠道 + 账号通知规则 + 事件勾选「价格监控」三者缺一不可。","渠道里的密钥仅用于服务端发送,不要截图外发。"]},settings:{title:"系统设置",intro:"全局配置中心:邮件服务、AI 接口、公告与默认登录信息都在这里。",steps:["「邮件服务」:填 SMTP 服务器/端口/账号/授权码(QQ 邮箱 465 端口自动走 SSL),点「测试发送」验证。","「AI 服务」:配置模型 API 地址、Key 与模型名,供「AI 回复」使用。","「公告管理」:编辑系统顶部展示的公告与版本更新提示。","其余开关(默认登录信息展示、图形验证码等)按需调整,改动即时生效。"],tips:["改完 SMTP 务必点测试发送,收到邮件即配置成功。"]},users:{title:"用户管理",intro:"管理员专用:管理能登录本系统的用户,支持重置密码与启用禁用。",steps:["列表展示全部用户及其登录状态,可按启用/停用控制能否登录。","点「重置密码」为用户设置新密码(只有管理员能操作)。","停用的用户立即无法登录,历史数据保留。"],tips:["建议只给自己与必要协作者开账号,管理员账号保持一个即可。"]},about:{title:"关于本系统",intro:"版本信息、项目主页与联系方式。",steps:["查看当前版本号与更新日志,新版本发布后按提示升级。","页面上有项目开源地址与作者联系方式,问题反馈优先走这里。"]}},x=()=>{const[n,d]=o.useState("dashboard");o.useEffect(()=>{const l=new IntersectionObserver(t=>{const s=t.filter(i=>i.isIntersecting).sort((i,a)=>i.boundingClientRect.top-a.boundingClientRect.top);s[0]&&d(s[0].target.id.replace("help-",""))},{rootMargin:"0px 0px -70% 0px",threshold:0});return r.forEach(t=>t.items.forEach(s=>{const i=document.getElementById(`help-${s.id}`);i&&l.observe(i)})),()=>l.disconnect()},[]);const c=l=>{const t=document.getElementById(`help-${l}`);t&&(t.scrollIntoView({behavior:"smooth",block:"start"}),d(l))};return e.jsx("div",{className:"p-4 md:p-6",children:e.jsxs("div",{className:"flex flex-col lg:flex-row gap-6",children:[e.jsx("nav",{id:"help-nav",className:"lg:w-48 shrink-0",children:e.jsxs("div",{className:"lg:sticky lg:top-2 bg-white dark:bg-slate-800 border border-slate-200 dark:border-slate-700 rounded-xl p-3",children:[e.jsx("div",{className:"px-2 pb-2 text-xs font-semibold text-slate-400 uppercase tracking-wider",children:"功能导航"}),e.jsx("div",{className:"flex lg:block gap-2 lg:gap-0 overflow-x-auto lg:overflow-visible",children:r.map(l=>e.jsxs("div",{className:"lg:mb-3 shrink-0",children:[e.jsx("div",{className:"hidden lg:block px-2 pt-1 pb-1 text-[11px] font-medium text-slate-400",children:l.group}),l.items.map(t=>e.jsx("button",{onClick:()=>c(t.id),className:`w-auto lg:w-full text-left whitespace-nowrap px-2.5 py-1.5 rounded-lg text-sm transition-colors ${n===t.id?"bg-amber-500/15 text-amber-600 dark:text-amber-400 font-medium":"text-slate-600 dark:text-slate-300 hover:bg-slate-100 dark:hover:bg-slate-700/60"}`,children:t.label},t.id))]},l.group))})]})}),e.jsxs("div",{className:"min-w-0 flex-1 space-y-6",children:[e.jsxs("div",{className:"bg-white dark:bg-slate-800 border border-slate-200 dark:border-slate-700 rounded-xl p-5",children:[e.jsx("h1",{className:"text-xl font-bold text-slate-800 dark:text-slate-100",children:"躺赚鱼 使用说明"}),e.jsx("p",{className:"mt-1.5 text-sm text-slate-500 dark:text-slate-400",children:"每个功能的详细使用教程:左侧菜单点击可跳转定位,右侧为操作步骤与真实界面截图。 建议按「快速开始 → 闲鱼业务 → 消息与自动化」的顺序初次上手。"})]}),r.map(l=>l.items.map(t=>{const s=p[t.id];return s?e.jsxs("section",{id:`help-${t.id}`,className:"bg-white dark:bg-slate-800 border border-slate-200 dark:border-slate-700 rounded-xl p-5 scroll-mt-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"w-1.5 h-5 rounded-full bg-amber-500"}),e.jsx("h2",{className:"text-lg font-semibold text-slate-800 dark:text-slate-100",children:s.title})]}),e.jsx("p",{className:"mt-2 text-sm text-slate-600 dark:text-slate-300",children:s.intro}),e.jsxs("div",{className:"mt-4",children:[e.jsx("div",{className:"text-xs font-semibold text-slate-400 mb-2",children:"操作步骤"}),e.jsx("ol",{className:"space-y-1.5 text-sm text-slate-700 dark:text-slate-300 list-decimal list-inside",children:s.steps.map((i,a)=>e.jsx("li",{className:"leading-relaxed",children:i},a))})]}),s.tips&&s.tips.length>0&&e.jsxs("div",{className:"mt-4 rounded-lg bg-amber-50 dark:bg-amber-500/10 border border-amber-200 dark:border-amber-500/20 px-3.5 py-2.5",children:[e.jsx("div",{className:"text-xs font-semibold text-amber-700 dark:text-amber-400 mb-1",children:"小提示"}),e.jsx("ul",{className:"space-y-1 text-[13px] text-amber-800 dark:text-amber-300 list-disc list-inside",children:s.tips.map((i,a)=>e.jsx("li",{className:"leading-relaxed",children:i},a))})]}),e.jsxs("figure",{className:"mt-4",children:[e.jsx("img",{src:`/static/help/${t.id}.png`,alt:`${s.title} 页面界面截图`,loading:"lazy",className:"w-full rounded-lg border border-slate-200 dark:border-slate-700 shadow-sm"}),e.jsxs("figcaption",{className:"mt-1.5 text-xs text-slate-400",children:["▲ ",s.title," —— 实际界面截图"]})]})]},t.id):null}))]})]})})};export{x as default}; +import{r as o,j as e}from"./index-IP-mmLlr.js";const r=[{group:"快速开始",items:[{id:"dashboard",label:"系统总览"},{id:"accounts",label:"账号管理"}]},{group:"闲鱼业务",items:[{id:"items",label:"商品与发货"},{id:"resell",label:"一键转卖"},{id:"hotlist",label:"实时热卖榜"},{id:"pricewatch",label:"价格监控"},{id:"orders",label:"订单管理"},{id:"buyer-interaction",label:"买家互动"},{id:"cards",label:"卡密库存"}]},{group:"消息与自动化",items:[{id:"messages",label:"消息中心"},{id:"auto-reply",label:"自动回复"},{id:"ai-reply",label:"AI 回复"},{id:"product-automation",label:"商品自动化"}]},{group:"系统",items:[{id:"notifications",label:"通知与日志"},{id:"settings",label:"系统设置"},{id:"users",label:"用户管理"},{id:"about",label:"关于本系统"}]}],p={dashboard:{title:"系统总览",intro:"登录后的首页,汇总账号、订单、营收和库存数据,一眼判断当前经营状态。",steps:["顶部时间筛选可切换统计周期:今天 / 昨天 / 三天内 / 7天内 / 一个月内 / 自定义。","「有效成交额」与「已到账」两张卡片展示所选周期内的资金数据。","「系统运行中」状态灯表示后端自动回复、定时任务正常运行。","左侧菜单点击任意功能即可切换页面,右上角可切换日间/夜间模式。"],tips:["新部署时没有订单记录,金额显示 ¥0.00 属正常,产生交易后自动累计。"]},accounts:{title:"账号管理",intro:"所有功能的入口:先把闲鱼账号接入系统,其他页面才能选择该账号操作。",steps:["点击「添加账号」,填入账号备注名与 Cookie(从浏览器登录闲鱼后在开发者工具 Network 里复制)。","保存后列表会显示该账号,可点击「检测」验证 Cookie 是否仍然有效。","失效的账号需要重新复制 Cookie 更新;不用的账号可「禁用」而不必删除。","启用状态的账号才会参与自动回复、订单同步、消息聚合等自动化。"],tips:["Cookie 等同账号登录态,请勿泄露;本系统只保存在自己的服务器数据库中。"]},items:{title:"商品与发货",intro:"同步闲鱼在售商品,为每个商品配置自动发货内容(卡密、网盘链接或文字说明)。",steps:["选择账号后点击同步,把该账号在闲鱼的在售商品拉取到列表。","给商品设置发货内容:虚拟商品可填卡密说明或网盘链接,实物商品可填物流备注。","买家付款后系统按这里配置的内容自动回复发货,无需手动复制粘贴。","商品价格、标题变化可通过刷新按钮同步最新状态。"],tips:["发货内容支持多行文本与链接,建议按「商品名称 + 提取码」格式写清楚。"]},resell:{title:"一键转卖",intro:"从收藏或搜索结果里挑商品,改好标题价格直接发布到自己账号,做无货源转卖。",steps:["右上角先选择要发布到的闲鱼账号。","点「我的收藏」→「加载收藏」读取该账号收藏的在售商品;或切到「搜索商品」按关键词找货。","在列表中勾选想转卖的商品,修改标题、价格、描述等发布信息。","点「一键转卖」发布,商品即挂到自己账号名下。"],tips:["发布前核对价格是否留足利润;同名商品重复转卖前先在商品列表确认未上架过。"]},hotlist:{title:"实时热卖榜",intro:"抓取闲鱼实时热卖数据,帮你判断什么好卖、该上什么货。",steps:["选择分类或直接查看综合热卖榜,列表按近期成交热度排序。","点击商品可查看详情与价格区间,作为自己定价的参考。","看中的品可直接跳「一键转卖」上架到自己账号。"],tips:["榜单数据为实时抓取,个别时段可能延迟,可点刷新重新拉取。"]},pricewatch:{title:"价格监控",intro:"设定关键词和目标价,系统定时搜索闲鱼,出现低于目标价的商品立即通知你捡漏。",steps:["点「新建规则」:填写关键词(如想蹲的商品名)、目标价、检测间隔,保存后立即执行一次检测。","检测结果展示匹配商品数、历史最低价与「最近一次」的完整商品信息(超长内容自动换行展示)。","低于目标价时触发通知——前提是已在「通知与日志」页配置好通知渠道并勾选「价格监控」事件(见下方章节)。","点「历史记录」查看每次检测的明细;不需要的规则可停用或删除。"],tips:["通知没发出来时,页面顶部的红色提示会写明去哪配置,按提示到「通知与日志」页补配即可。","关键词越具体匹配越准,避免太宽泛导致噪音过多。"]},orders:{title:"订单管理",intro:"汇总所选账号的闲鱼订单,查看状态、手动补发与核对发货记录。",steps:["选择账号与时间范围筛选订单,列表显示买家、商品、金额与状态。","自动发货成功的订单会标记发货内容;失败的可在这里点「重新发货」补发。","点订单行可展开详情,核对买家留言与发货回执。"],tips:["订单数据来自定时同步,新成交订单可能延迟几分钟出现。"]},"buyer-interaction":{title:"买家互动",intro:"评价买家、索要小红花与自动收花——和闲鱼平台实际操作绑定,需按账号开启。",steps:["先在「账号管理」添加账号(无账号时本页会提示先去添加)。","在「按账号开启」区域为需要的账号打开对应开关:评价买家 / 索要小红花 / 自动收花。","点「保存设置」生效;关闭的账号不会执行任何互动,订单页也不显示入口。","建议先用一笔测试订单验证效果,再放开到全部账号。"],tips:["⚠ 评价提交后无法撤销,索要小红花会给买家发一条消息——务必先小范围测试。"]},cards:{title:"卡密库存",intro:"导入与管理卡密,配合「商品与发货」实现虚拟商品自动发货、库存自动扣减。",steps:["新建卡密分组(对应某个商品),批量粘贴或上传卡密文本,一行一条。","在「商品与发货」把商品的发货方式关联到该卡密分组。","买家付款后系统自动取一条卡密发出并扣减库存,列表显示剩余数量。","库存告急时及时补充,发货失败的订单会记录原因便于排查。"],tips:["卡密只对管理员可见,普通用户页面不会展示明文。"]},messages:{title:"消息中心",intro:"把多个闲鱼账号的买家消息聚合到一处,集中查看与回复。",steps:["选择账号后加载未读/全部消息,按时间倒序展示。","点击会话查看上下文并可手动回复;已被自动回复接管的会话会标注规则来源。","新消息会实时提醒,避免漏掉买家咨询。"],tips:["消息聚合依赖账号 Cookie 有效,账号失效时先到「账号管理」更新。"]},"auto-reply":{title:"自动回复",intro:"配置关键词规则:买家消息命中触发词即自动回复,7×24 接待。",steps:["点「新建规则」,设置触发关键词(支持多个、精确/模糊匹配)与回复内容。","回复支持多行文本、链接与随机话术(多条回复轮流发送,避免重复感)。","保存即生效,无需重启;列表可停用、编辑、删除规则。","在规则上可指定仅对某账号生效,或全局所有账号共用。"],tips:["建议先配 3-5 条高频问题(价格、包邮、发货时间)再逐步扩充。"]},"ai-reply":{title:"AI 回复",intro:"接入大模型 API,让 AI 根据上下文智能回复买家消息、自动议价。",steps:["先到「系统设置 → AI 服务」填好 API 地址、Key 与模型名(本地 NewAPI 或任意兼容接口)。","在本页设置议价策略:最大优惠百分比/金额、议价轮数上限。","开启「上下文」后 AI 会携带最近若干条对话,回复更连贯。","系统先匹配关键词规则,未命中才走 AI;可在页面调整两者的优先级。"],tips:["AI 每次回复消耗 API 额度,量大时建议设置轮数与优惠上限兜底。"]},"product-automation":{title:"商品自动化",intro:"商品素材库与批量任务:筛选规则、删除计划、历史数据补偿集中管理。",steps:["「素材库」标签:按账号/关键词搜索已入库的商品素材,供批量任务取用。","「筛选规则」标签:定义商品筛选条件(标题、分类、价格区间),命中规则的素材进入处理流程。","「删除计划」标签:创建批量下架任务,按计划时间或条件执行删除。","「补偿任务」标签:对漏统计的历史数据发起回补;「刷新数据」同步最新任务状态。"],tips:["删除计划执行前请核对规则,批量下架不可自动撤销。"]},notifications:{title:"通知与日志",intro:"统一管理外部通知渠道、账号绑定、风控事件和系统运行日志。",steps:["「通知渠道」标签:点「新建渠道」创建发送通道——邮件渠道只需填接收邮箱(SMTP 自动复用系统设置)。","「账号通知」标签:新建规则时选择账号 + 渠道,并在「事件」里勾选要提醒的类型(价格监控、登录异常等)。","「风控日志」「系统日志」标签:查看平台风控事件与系统运行记录,便于排查问题。","顶部「刷新配置」可重新加载渠道与规则的最新状态。"],tips:["价格监控要发通知:渠道 + 账号通知规则 + 事件勾选「价格监控」三者缺一不可。","渠道里的密钥仅用于服务端发送,不要截图外发。"]},settings:{title:"系统设置",intro:"全局配置中心:邮件服务、AI 接口、公告与默认登录信息都在这里。",steps:["「邮件服务」:填 SMTP 服务器/端口/账号/授权码(QQ 邮箱 465 端口自动走 SSL),点「测试发送」验证。","「AI 服务」:配置模型 API 地址、Key 与模型名,供「AI 回复」使用。","「公告管理」:编辑系统顶部展示的公告与版本更新提示。","其余开关(默认登录信息展示、图形验证码等)按需调整,改动即时生效。"],tips:["改完 SMTP 务必点测试发送,收到邮件即配置成功。"]},users:{title:"用户管理",intro:"管理员专用:管理能登录本系统的用户,支持重置密码与启用禁用。",steps:["列表展示全部用户及其登录状态,可按启用/停用控制能否登录。","点「重置密码」为用户设置新密码(只有管理员能操作)。","停用的用户立即无法登录,历史数据保留。"],tips:["建议只给自己与必要协作者开账号,管理员账号保持一个即可。"]},about:{title:"关于本系统",intro:"版本信息、项目主页与联系方式。",steps:["查看当前版本号与更新日志,新版本发布后按提示升级。","页面上有项目开源地址与作者联系方式,问题反馈优先走这里。"]}},x=()=>{const[n,d]=o.useState("dashboard");o.useEffect(()=>{const l=new IntersectionObserver(t=>{const s=t.filter(i=>i.isIntersecting).sort((i,a)=>i.boundingClientRect.top-a.boundingClientRect.top);s[0]&&d(s[0].target.id.replace("help-",""))},{rootMargin:"0px 0px -70% 0px",threshold:0});return r.forEach(t=>t.items.forEach(s=>{const i=document.getElementById(`help-${s.id}`);i&&l.observe(i)})),()=>l.disconnect()},[]);const c=l=>{const t=document.getElementById(`help-${l}`);t&&(t.scrollIntoView({behavior:"smooth",block:"start"}),d(l))};return e.jsx("div",{className:"p-4 md:p-6",children:e.jsxs("div",{className:"flex flex-col lg:flex-row gap-6",children:[e.jsx("nav",{id:"help-nav",className:"lg:w-48 shrink-0",children:e.jsxs("div",{className:"lg:sticky lg:top-2 bg-white dark:bg-slate-800 border border-slate-200 dark:border-slate-700 rounded-xl p-3",children:[e.jsx("div",{className:"px-2 pb-2 text-xs font-semibold text-slate-400 uppercase tracking-wider",children:"功能导航"}),e.jsx("div",{className:"flex lg:block gap-2 lg:gap-0 overflow-x-auto lg:overflow-visible",children:r.map(l=>e.jsxs("div",{className:"lg:mb-3 shrink-0",children:[e.jsx("div",{className:"hidden lg:block px-2 pt-1 pb-1 text-[11px] font-medium text-slate-400",children:l.group}),l.items.map(t=>e.jsx("button",{onClick:()=>c(t.id),className:`w-auto lg:w-full text-left whitespace-nowrap px-2.5 py-1.5 rounded-lg text-sm transition-colors ${n===t.id?"bg-amber-500/15 text-amber-600 dark:text-amber-400 font-medium":"text-slate-600 dark:text-slate-300 hover:bg-slate-100 dark:hover:bg-slate-700/60"}`,children:t.label},t.id))]},l.group))})]})}),e.jsxs("div",{className:"min-w-0 flex-1 space-y-6",children:[e.jsxs("div",{className:"bg-white dark:bg-slate-800 border border-slate-200 dark:border-slate-700 rounded-xl p-5",children:[e.jsx("h1",{className:"text-xl font-bold text-slate-800 dark:text-slate-100",children:"躺赚鱼 使用说明"}),e.jsx("p",{className:"mt-1.5 text-sm text-slate-500 dark:text-slate-400",children:"每个功能的详细使用教程:左侧菜单点击可跳转定位,右侧为操作步骤与真实界面截图。 建议按「快速开始 → 闲鱼业务 → 消息与自动化」的顺序初次上手。"})]}),r.map(l=>l.items.map(t=>{const s=p[t.id];return s?e.jsxs("section",{id:`help-${t.id}`,className:"bg-white dark:bg-slate-800 border border-slate-200 dark:border-slate-700 rounded-xl p-5 scroll-mt-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"w-1.5 h-5 rounded-full bg-amber-500"}),e.jsx("h2",{className:"text-lg font-semibold text-slate-800 dark:text-slate-100",children:s.title})]}),e.jsx("p",{className:"mt-2 text-sm text-slate-600 dark:text-slate-300",children:s.intro}),e.jsxs("div",{className:"mt-4",children:[e.jsx("div",{className:"text-xs font-semibold text-slate-400 mb-2",children:"操作步骤"}),e.jsx("ol",{className:"space-y-1.5 text-sm text-slate-700 dark:text-slate-300 list-decimal list-inside",children:s.steps.map((i,a)=>e.jsx("li",{className:"leading-relaxed",children:i},a))})]}),s.tips&&s.tips.length>0&&e.jsxs("div",{className:"mt-4 rounded-lg bg-amber-50 dark:bg-amber-500/10 border border-amber-200 dark:border-amber-500/20 px-3.5 py-2.5",children:[e.jsx("div",{className:"text-xs font-semibold text-amber-700 dark:text-amber-400 mb-1",children:"小提示"}),e.jsx("ul",{className:"space-y-1 text-[13px] text-amber-800 dark:text-amber-300 list-disc list-inside",children:s.tips.map((i,a)=>e.jsx("li",{className:"leading-relaxed",children:i},a))})]}),e.jsxs("figure",{className:"mt-4",children:[e.jsx("img",{src:`/static/help/${t.id}.png`,alt:`${s.title} 页面界面截图`,loading:"lazy",className:"w-full rounded-lg border border-slate-200 dark:border-slate-700 shadow-sm"}),e.jsxs("figcaption",{className:"mt-1.5 text-xs text-slate-400",children:["▲ ",s.title," —— 实际界面截图"]})]})]},t.id):null}))]})]})})};export{x as default}; diff --git a/static/assets/HotList-DLevJN_u.js b/static/assets/HotList-CmrhQsvX.js similarity index 98% rename from static/assets/HotList-DLevJN_u.js rename to static/assets/HotList-CmrhQsvX.js index 7346f32..34e89ec 100644 --- a/static/assets/HotList-DLevJN_u.js +++ b/static/assets/HotList-CmrhQsvX.js @@ -1 +1 @@ -import{r as n,bN as H,bO as O,j as e,bP as S,L as y,e as A,E as B}from"./index-BtyeumGM.js";import{P as F,a as U,N as q,b as z,E as V}from"./ui-Bucd7ZQW.js";import{T as R}from"./trending-up-B0n4p6ZM.js";import{P as W}from"./package-DRVL5sin.js";const Y=2500,L=r=>r?r>=1e4?`${(r/1e4).toFixed(1).replace(/\.0$/,"")}万`:String(r):"0",G=r=>{if(!r)return"—";const i=Date.now()-r;if(i<6e4)return"刚刚";if(i<36e5)return`${Math.floor(i/6e4)}分钟前`;if(i<864e5)return`${Math.floor(i/36e5)}小时前`;if(i<7*864e5)return`${Math.floor(i/864e5)}天前`;const o=new Date(r);return`${o.getMonth()+1}月${o.getDate()}日`},J=r=>{if(!r)return"—";const i=new Date(r),o=v=>String(v).padStart(2,"0");return`${i.getFullYear()}-${o(i.getMonth()+1)}-${o(i.getDate())}`},K=({rank:r})=>{const i=r===1?"bg-amber-400 text-white":r===2?"bg-gray-300 text-gray-700":r===3?"bg-orange-300 text-orange-900":"bg-[var(--surface-subtle)] text-[var(--text-soft)]";return e.jsx("span",{className:`inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-full text-sm font-bold ${i}`,children:r})},se=()=>{const[r,i]=n.useState(!0),[o,v]=n.useState({}),[$,P]=n.useState([]),[d,M]=n.useState("digital"),[j,f]=n.useState(null),[h,_]=n.useState(0),[u,k]=n.useState(!1),g=n.useRef(null),I=n.useRef(d);I.current=d;const w=n.useCallback(()=>{g.current&&(clearInterval(g.current),g.current=null)},[]),b=n.useCallback(async s=>{try{const a=await H();v(a.boards||{}),P(a.categories||[]),s!=null&&s.silent||i(!1),Object.values(a.boards||{}).some(x=>x.refreshing)?E():w()}catch(a){s!=null&&s.silent||(i(!1),f({type:"error",message:a.message||"榜单加载失败"}))}},[]),E=n.useCallback(()=>{g.current||(g.current=setInterval(()=>{b({silent:!0})},Y))},[b]);n.useEffect(()=>(b(),w),[b,w]),n.useEffect(()=>{if(h<=0)return;const s=setInterval(()=>_(a=>a<=1?0:a-1),1e3);return()=>clearInterval(s)},[h]);const t=o[d];n.useEffect(()=>{const s=o[d];!s||r||s.refreshing||s.items.length>0||s.cooldown_remaining>0||N(d)},[d,r,o]);const N=async s=>{if(!u){k(!0);try{const a=await O(s);a.started?(f({type:"info",message:a.categories&&a.categories.length>1?"已开始刷新全部类目,完成后自动更新。":"已开始抓取,十几秒后榜单自动刷新。"}),E()):a.reason==="cooldown"?f({type:"error",message:a.message||"刷新过于频繁,请稍后再试"}):f({type:"info",message:a.message||"已有刷新任务进行中"})}catch(a){f({type:"error",message:a.message||"刷新触发失败"})}finally{k(!1)}}};n.useEffect(()=>{t&&t.cooldown_remaining>0&&_(t.cooldown_remaining)},[t]);const T=n.useMemo(()=>$.map(s=>{var a;return{id:s.id,label:s.name,count:(a=o[s.id])==null?void 0:a.items.length}}),[$,o]),C=n.useMemo(()=>{if(!t)return[];const s={};return(t.items||[]).forEach(l=>{(l.keywords||[]).forEach(x=>{const p=s[x]||(s[x]={hits:0,want:0});p.hits+=1,p.want+=l.want_count||0})}),(t.keywords&&t.keywords.length?t.keywords:Object.keys(s)).map(l=>{var x,p;return{kw:l,hits:((x=s[l])==null?void 0:x.hits)||0,want:((p=s[l])==null?void 0:p.want)||0}}).sort((l,x)=>x.want-l.want)},[t]),m=!!(t!=null&&t.refreshing),c=t==null?void 0:t.progress,D=t!=null&&t.updated_at?G(t.updated_at*1e3):"尚未生成";return r?e.jsx(F,{label:"正在加载热卖榜"}):e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(U,{title:"实时热卖榜",description:"按「想要人数」排序的全网热卖商品,数据来自闲鱼实时搜索聚合。",icon:S,badge:e.jsx("span",{className:"rounded-full bg-[var(--surface-subtle)] px-2 py-0.5 text-xs text-[var(--text-soft)]",children:t?`更新于 ${D}`:"待生成"}),actions:e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsxs("button",{type:"button",className:"ios-btn-secondary flex items-center gap-1.5 rounded-md px-3 py-2 text-sm",onClick:()=>void N("all"),disabled:u||m||h>0,children:[u||m?e.jsx(y,{className:"h-4 w-4 animate-spin"}):e.jsx(A,{className:"h-4 w-4"}),"全部刷新"]}),e.jsxs("button",{type:"button",className:"ios-btn-primary flex items-center gap-1.5 rounded-md px-3 py-2 text-sm",onClick:()=>void N(d),disabled:u||m||h>0,children:[m?e.jsx(y,{className:"h-4 w-4 animate-spin"}):e.jsx(R,{className:"h-4 w-4"}),h>0?`${h}s 后可刷新`:"刷新本类目"]})]})}),j&&e.jsx(q,{type:j.type==="info"?"success":j.type,message:j.message,onClose:()=>f(null)}),e.jsx("div",{className:"toolbar",children:e.jsx(z,{value:d,onChange:M,items:T,ariaLabel:"热卖榜类目"})}),m&&e.jsx("div",{className:"section-panel",children:e.jsxs("div",{className:"flex items-center gap-3 text-sm text-[var(--text-soft)]",children:[e.jsx(y,{className:"h-4 w-4 animate-spin text-[#ff4400]"}),e.jsxs("span",{children:["正在抓取「",(c==null?void 0:c.keyword)||"…","」",c&&c.total>0?`(${Math.min(c.done+1,c.total)}/${c.total})`:""]}),c&&c.total>0&&e.jsx("span",{className:"h-1.5 flex-1 overflow-hidden rounded-full bg-[var(--surface-subtle)]",children:e.jsx("span",{className:"block h-full rounded-full bg-[#ff4400] transition-all",style:{width:`${Math.round(c.done/c.total*100)}%`}})})]})}),!t||t.items.length===0?e.jsx(V,{icon:S,title:m?"正在生成榜单":"榜单还没生成",description:m?"首次抓取需要十几个关键词、约 20 秒,完成后自动展示。":"点右上角「刷新本类目」开始抓取,按想要人数排出前 30 名。",action:m?void 0:e.jsx("button",{type:"button",className:"ios-btn-primary rounded-md px-4 py-2 text-sm",onClick:()=>void N(d),disabled:u||h>0,children:"生成榜单"})}):e.jsxs("section",{className:"section-panel",children:[e.jsx("div",{className:"section-panel__header",children:e.jsxs("div",{className:"flex min-w-0 items-start gap-3",children:[e.jsx("span",{className:"section-header__icon","aria-hidden":"true",children:e.jsx(R,{className:"h-4 w-4"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsxs("h2",{className:"section-title",children:[t.name,"热卖榜 · Top ",t.items.length]}),e.jsxs("p",{className:"section-description",children:["共 ",t.source_count," 个在售商品参与排序,按「想要人数」取前 ",t.items.length," 名"]}),C.length>0&&e.jsxs("div",{className:"mt-1.5 flex flex-wrap items-center gap-1.5",children:[e.jsx("span",{className:"text-xs text-[var(--text-soft)]",children:"热门搜索词:"}),C.map(({kw:s,hits:a,want:l})=>e.jsxs("a",{href:`https://www.goofish.com/search?q=${encodeURIComponent(s)}`,target:"_blank",rel:"noreferrer noopener",title:a>0?`点击搜索「${s}」· 命中 ${a} 个商品 · 合计 ${l} 人想要`:`点击搜索「${s}」(本轮未命中商品)`,className:"group inline-flex items-center gap-1 rounded-full bg-[var(--surface-subtle)] px-2 py-0.5 text-xs text-[var(--text)] transition-colors hover:bg-[#ff4400] hover:text-white",children:[e.jsx("span",{children:s}),a>0&&e.jsx("span",{className:"font-medium text-[#ff4400] group-hover:text-white",children:L(l)})]},s))]})]})]})}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"data-table responsive-data-table",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{className:"w-[6%]",children:"排名"}),e.jsx("th",{className:"w-[44%]",children:"商品"}),e.jsx("th",{className:"w-[11%]",children:"价格"}),e.jsx("th",{className:"w-[12%]",children:"想要人数"}),e.jsx("th",{className:"w-[12%]",children:"发布时间"}),e.jsx("th",{className:"w-[15%] text-right",children:"操作"})]})}),e.jsx("tbody",{children:t.items.map(s=>{var a;return e.jsxs("tr",{children:[e.jsx("td",{"data-label":"排名",children:e.jsx(K,{rank:s.rank})}),e.jsx("td",{"data-label":"商品",children:e.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[e.jsx("div",{className:"h-12 w-12 shrink-0 overflow-hidden rounded-lg bg-[var(--surface-subtle)]",children:s.image?e.jsx("img",{src:s.image,alt:"",loading:"lazy",className:"h-full w-full object-cover",onError:l=>{l.currentTarget.style.display="none"}}):e.jsx("div",{className:"flex h-full items-center justify-center text-gray-400",children:e.jsx(W,{className:"h-5 w-5"})})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("a",{href:s.url,target:"_blank",rel:"noreferrer noopener",className:"block text-sm text-[var(--text)] break-words hover:text-[#ff4400] hover:underline",title:s.title,children:s.title||"(无标题)"}),e.jsxs("p",{className:"mt-0.5 flex flex-wrap items-center gap-x-2 text-xs text-[var(--text-soft)]",children:[s.area&&e.jsx("span",{children:s.area}),(a=s.keywords)==null?void 0:a.slice(0,3).map(l=>e.jsx("span",{className:"rounded bg-[var(--surface-subtle)] px-1.5 py-0.5",children:l},l))]})]})]})}),e.jsx("td",{"data-label":"价格",children:e.jsx("span",{className:"font-bold text-[#ff4400]",children:s.price||"面议"})}),e.jsxs("td",{"data-label":"想要人数",children:[e.jsx("span",{className:"font-semibold text-[var(--text)]",children:L(s.want_count)}),e.jsx("span",{className:"ml-1 text-xs text-[var(--text-soft)]",children:"人想要"})]}),e.jsx("td",{"data-label":"发布时间",className:"whitespace-nowrap text-sm text-[var(--text-soft)]",children:J(s.publish_time)}),e.jsx("td",{"data-label":"操作",className:"text-right",children:e.jsxs("a",{href:s.url,target:"_blank",rel:"noreferrer noopener",className:"ios-btn-secondary inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-sm",children:[e.jsx(B,{className:"h-3.5 w-3.5"}),"查看商品"]})})]},s.item_id)})})]})}),e.jsx("p",{className:"px-4 py-3 text-xs text-[var(--text-soft)]",children:"口径说明:闲鱼不公开销量数据,本榜按商品「想要人数」降序排列,同分按发布时间取新; 数据为实时搜索快照,每 10 分钟可刷新一次。"})]})]})};export{se as default}; +import{r as n,bN as H,bO as O,j as e,bP as S,L as y,e as A,E as B}from"./index-IP-mmLlr.js";import{P as F,a as U,N as q,b as z,E as V}from"./ui-Fi8l9rTp.js";import{T as R}from"./trending-up-BcW73Gjl.js";import{P as W}from"./package-C7ydMeAZ.js";const Y=2500,L=r=>r?r>=1e4?`${(r/1e4).toFixed(1).replace(/\.0$/,"")}万`:String(r):"0",G=r=>{if(!r)return"—";const i=Date.now()-r;if(i<6e4)return"刚刚";if(i<36e5)return`${Math.floor(i/6e4)}分钟前`;if(i<864e5)return`${Math.floor(i/36e5)}小时前`;if(i<7*864e5)return`${Math.floor(i/864e5)}天前`;const o=new Date(r);return`${o.getMonth()+1}月${o.getDate()}日`},J=r=>{if(!r)return"—";const i=new Date(r),o=v=>String(v).padStart(2,"0");return`${i.getFullYear()}-${o(i.getMonth()+1)}-${o(i.getDate())}`},K=({rank:r})=>{const i=r===1?"bg-amber-400 text-white":r===2?"bg-gray-300 text-gray-700":r===3?"bg-orange-300 text-orange-900":"bg-[var(--surface-subtle)] text-[var(--text-soft)]";return e.jsx("span",{className:`inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-full text-sm font-bold ${i}`,children:r})},se=()=>{const[r,i]=n.useState(!0),[o,v]=n.useState({}),[$,P]=n.useState([]),[d,M]=n.useState("digital"),[j,f]=n.useState(null),[h,_]=n.useState(0),[u,k]=n.useState(!1),g=n.useRef(null),I=n.useRef(d);I.current=d;const w=n.useCallback(()=>{g.current&&(clearInterval(g.current),g.current=null)},[]),b=n.useCallback(async s=>{try{const a=await H();v(a.boards||{}),P(a.categories||[]),s!=null&&s.silent||i(!1),Object.values(a.boards||{}).some(x=>x.refreshing)?E():w()}catch(a){s!=null&&s.silent||(i(!1),f({type:"error",message:a.message||"榜单加载失败"}))}},[]),E=n.useCallback(()=>{g.current||(g.current=setInterval(()=>{b({silent:!0})},Y))},[b]);n.useEffect(()=>(b(),w),[b,w]),n.useEffect(()=>{if(h<=0)return;const s=setInterval(()=>_(a=>a<=1?0:a-1),1e3);return()=>clearInterval(s)},[h]);const t=o[d];n.useEffect(()=>{const s=o[d];!s||r||s.refreshing||s.items.length>0||s.cooldown_remaining>0||N(d)},[d,r,o]);const N=async s=>{if(!u){k(!0);try{const a=await O(s);a.started?(f({type:"info",message:a.categories&&a.categories.length>1?"已开始刷新全部类目,完成后自动更新。":"已开始抓取,十几秒后榜单自动刷新。"}),E()):a.reason==="cooldown"?f({type:"error",message:a.message||"刷新过于频繁,请稍后再试"}):f({type:"info",message:a.message||"已有刷新任务进行中"})}catch(a){f({type:"error",message:a.message||"刷新触发失败"})}finally{k(!1)}}};n.useEffect(()=>{t&&t.cooldown_remaining>0&&_(t.cooldown_remaining)},[t]);const T=n.useMemo(()=>$.map(s=>{var a;return{id:s.id,label:s.name,count:(a=o[s.id])==null?void 0:a.items.length}}),[$,o]),C=n.useMemo(()=>{if(!t)return[];const s={};return(t.items||[]).forEach(l=>{(l.keywords||[]).forEach(x=>{const p=s[x]||(s[x]={hits:0,want:0});p.hits+=1,p.want+=l.want_count||0})}),(t.keywords&&t.keywords.length?t.keywords:Object.keys(s)).map(l=>{var x,p;return{kw:l,hits:((x=s[l])==null?void 0:x.hits)||0,want:((p=s[l])==null?void 0:p.want)||0}}).sort((l,x)=>x.want-l.want)},[t]),m=!!(t!=null&&t.refreshing),c=t==null?void 0:t.progress,D=t!=null&&t.updated_at?G(t.updated_at*1e3):"尚未生成";return r?e.jsx(F,{label:"正在加载热卖榜"}):e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(U,{title:"实时热卖榜",description:"按「想要人数」排序的全网热卖商品,数据来自闲鱼实时搜索聚合。",icon:S,badge:e.jsx("span",{className:"rounded-full bg-[var(--surface-subtle)] px-2 py-0.5 text-xs text-[var(--text-soft)]",children:t?`更新于 ${D}`:"待生成"}),actions:e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsxs("button",{type:"button",className:"ios-btn-secondary flex items-center gap-1.5 rounded-md px-3 py-2 text-sm",onClick:()=>void N("all"),disabled:u||m||h>0,children:[u||m?e.jsx(y,{className:"h-4 w-4 animate-spin"}):e.jsx(A,{className:"h-4 w-4"}),"全部刷新"]}),e.jsxs("button",{type:"button",className:"ios-btn-primary flex items-center gap-1.5 rounded-md px-3 py-2 text-sm",onClick:()=>void N(d),disabled:u||m||h>0,children:[m?e.jsx(y,{className:"h-4 w-4 animate-spin"}):e.jsx(R,{className:"h-4 w-4"}),h>0?`${h}s 后可刷新`:"刷新本类目"]})]})}),j&&e.jsx(q,{type:j.type==="info"?"success":j.type,message:j.message,onClose:()=>f(null)}),e.jsx("div",{className:"toolbar",children:e.jsx(z,{value:d,onChange:M,items:T,ariaLabel:"热卖榜类目"})}),m&&e.jsx("div",{className:"section-panel",children:e.jsxs("div",{className:"flex items-center gap-3 text-sm text-[var(--text-soft)]",children:[e.jsx(y,{className:"h-4 w-4 animate-spin text-[#ff4400]"}),e.jsxs("span",{children:["正在抓取「",(c==null?void 0:c.keyword)||"…","」",c&&c.total>0?`(${Math.min(c.done+1,c.total)}/${c.total})`:""]}),c&&c.total>0&&e.jsx("span",{className:"h-1.5 flex-1 overflow-hidden rounded-full bg-[var(--surface-subtle)]",children:e.jsx("span",{className:"block h-full rounded-full bg-[#ff4400] transition-all",style:{width:`${Math.round(c.done/c.total*100)}%`}})})]})}),!t||t.items.length===0?e.jsx(V,{icon:S,title:m?"正在生成榜单":"榜单还没生成",description:m?"首次抓取需要十几个关键词、约 20 秒,完成后自动展示。":"点右上角「刷新本类目」开始抓取,按想要人数排出前 30 名。",action:m?void 0:e.jsx("button",{type:"button",className:"ios-btn-primary rounded-md px-4 py-2 text-sm",onClick:()=>void N(d),disabled:u||h>0,children:"生成榜单"})}):e.jsxs("section",{className:"section-panel",children:[e.jsx("div",{className:"section-panel__header",children:e.jsxs("div",{className:"flex min-w-0 items-start gap-3",children:[e.jsx("span",{className:"section-header__icon","aria-hidden":"true",children:e.jsx(R,{className:"h-4 w-4"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsxs("h2",{className:"section-title",children:[t.name,"热卖榜 · Top ",t.items.length]}),e.jsxs("p",{className:"section-description",children:["共 ",t.source_count," 个在售商品参与排序,按「想要人数」取前 ",t.items.length," 名"]}),C.length>0&&e.jsxs("div",{className:"mt-1.5 flex flex-wrap items-center gap-1.5",children:[e.jsx("span",{className:"text-xs text-[var(--text-soft)]",children:"热门搜索词:"}),C.map(({kw:s,hits:a,want:l})=>e.jsxs("a",{href:`https://www.goofish.com/search?q=${encodeURIComponent(s)}`,target:"_blank",rel:"noreferrer noopener",title:a>0?`点击搜索「${s}」· 命中 ${a} 个商品 · 合计 ${l} 人想要`:`点击搜索「${s}」(本轮未命中商品)`,className:"group inline-flex items-center gap-1 rounded-full bg-[var(--surface-subtle)] px-2 py-0.5 text-xs text-[var(--text)] transition-colors hover:bg-[#ff4400] hover:text-white",children:[e.jsx("span",{children:s}),a>0&&e.jsx("span",{className:"font-medium text-[#ff4400] group-hover:text-white",children:L(l)})]},s))]})]})]})}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"data-table responsive-data-table",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{className:"w-[6%]",children:"排名"}),e.jsx("th",{className:"w-[44%]",children:"商品"}),e.jsx("th",{className:"w-[11%]",children:"价格"}),e.jsx("th",{className:"w-[12%]",children:"想要人数"}),e.jsx("th",{className:"w-[12%]",children:"发布时间"}),e.jsx("th",{className:"w-[15%] text-right",children:"操作"})]})}),e.jsx("tbody",{children:t.items.map(s=>{var a;return e.jsxs("tr",{children:[e.jsx("td",{"data-label":"排名",children:e.jsx(K,{rank:s.rank})}),e.jsx("td",{"data-label":"商品",children:e.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[e.jsx("div",{className:"h-12 w-12 shrink-0 overflow-hidden rounded-lg bg-[var(--surface-subtle)]",children:s.image?e.jsx("img",{src:s.image,alt:"",loading:"lazy",className:"h-full w-full object-cover",onError:l=>{l.currentTarget.style.display="none"}}):e.jsx("div",{className:"flex h-full items-center justify-center text-gray-400",children:e.jsx(W,{className:"h-5 w-5"})})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("a",{href:s.url,target:"_blank",rel:"noreferrer noopener",className:"block text-sm text-[var(--text)] break-words hover:text-[#ff4400] hover:underline",title:s.title,children:s.title||"(无标题)"}),e.jsxs("p",{className:"mt-0.5 flex flex-wrap items-center gap-x-2 text-xs text-[var(--text-soft)]",children:[s.area&&e.jsx("span",{children:s.area}),(a=s.keywords)==null?void 0:a.slice(0,3).map(l=>e.jsx("span",{className:"rounded bg-[var(--surface-subtle)] px-1.5 py-0.5",children:l},l))]})]})]})}),e.jsx("td",{"data-label":"价格",children:e.jsx("span",{className:"font-bold text-[#ff4400]",children:s.price||"面议"})}),e.jsxs("td",{"data-label":"想要人数",children:[e.jsx("span",{className:"font-semibold text-[var(--text)]",children:L(s.want_count)}),e.jsx("span",{className:"ml-1 text-xs text-[var(--text-soft)]",children:"人想要"})]}),e.jsx("td",{"data-label":"发布时间",className:"whitespace-nowrap text-sm text-[var(--text-soft)]",children:J(s.publish_time)}),e.jsx("td",{"data-label":"操作",className:"text-right",children:e.jsxs("a",{href:s.url,target:"_blank",rel:"noreferrer noopener",className:"ios-btn-secondary inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-sm",children:[e.jsx(B,{className:"h-3.5 w-3.5"}),"查看商品"]})})]},s.item_id)})})]})}),e.jsx("p",{className:"px-4 py-3 text-xs text-[var(--text-soft)]",children:"口径说明:闲鱼不公开销量数据,本榜按商品「想要人数」降序排列,同分按发布时间取新; 数据为实时搜索快照,每 10 分钟可刷新一次。"})]})]})};export{se as default}; diff --git a/static/assets/ItemList-ZOic6eUK.js b/static/assets/ItemList-BcNZ279Z.js similarity index 98% rename from static/assets/ItemList-ZOic6eUK.js rename to static/assets/ItemList-BcNZ279Z.js index 0473ec8..43eecba 100644 --- a/static/assets/ItemList-ZOic6eUK.js +++ b/static/assets/ItemList-BcNZ279Z.js @@ -1,4 +1,4 @@ -import{c as _e,r,ae as fs,af as Ee,n as w,j as e,e as ve,X as ee,L as V,ag as js,ah as Ns,ai as _s,v as xe,aj as vs,ak as Be,b as re,al as fe,am as je,an as ws,ao as ks,ap as Qe,aq as Re,o as Te,h as ye,a8 as Le,ar as ze,as as be,w as Ss,at as Cs,au as Ue,av as Ke,aw as Is,ax as $s,ay as Ms,az as Ds}from"./index-BtyeumGM.js";import{E as se,S as Ne,P as qe,a as Fs,b as Ps,N as Es}from"./ui-Bucd7ZQW.js";import{S as de}from"./shield-alert-Rn-eFcN-.js";import{S as ce}from"./save-B_0bwRwJ.js";import{T as me}from"./trash-2-Cpz1crux.js";import{P as oe}from"./plus-D66LUkyr.js";import{P as Bs}from"./power-off-DC_j-T0K.js";import{a as Rs,P as Ts}from"./power-BzUM4Jxl.js";import{P as We}from"./package-check-OgTe2cXI.js";import{S as Oe}from"./sparkles-CTC5UJ5I.js";import{S as Ls}from"./settings-2-Dn9OYKhu.js";import{S as zs}from"./square-pen-C7b8tolk.js";/** +import{c as _e,r,ae as fs,af as Ee,n as w,j as e,e as ve,X as ee,L as V,ag as js,ah as Ns,ai as _s,v as xe,aj as vs,ak as Be,b as re,al as fe,am as je,an as ws,ao as ks,ap as Qe,aq as Re,o as Te,h as ye,a8 as Le,ar as ze,as as be,w as Ss,at as Cs,au as Ue,av as Ke,aw as Is,ax as $s,ay as Ms,az as Ds}from"./index-IP-mmLlr.js";import{E as se,S as Ne,P as qe,a as Fs,b as Ps,N as Es}from"./ui-Fi8l9rTp.js";import{S as de}from"./shield-alert-B8_J0uYT.js";import{S as ce}from"./save-CNiIU-3u.js";import{T as me}from"./trash-2-BNPsgs2t.js";import{P as oe}from"./plus-BbnHS2Zx.js";import{P as Bs}from"./power-off-D47FTQRk.js";import{a as Rs,P as Ts}from"./power-Ucg7FCbo.js";import{P as We}from"./package-check-OAWoRoy_.js";import{S as Oe}from"./sparkles-CavN45fA.js";import{S as Ls}from"./settings-2-DVRotgka.js";import{S as zs}from"./square-pen-ZPivfDGR.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/Keywords-DnsgE2cb.js b/static/assets/Keywords-BfjxZQp6.js similarity index 97% rename from static/assets/Keywords-DnsgE2cb.js rename to static/assets/Keywords-BfjxZQp6.js index 84d7a70..bb2522f 100644 --- a/static/assets/Keywords-DnsgE2cb.js +++ b/static/assets/Keywords-BfjxZQp6.js @@ -1 +1 @@ -import{r as i,o as J,b2 as fe,ar as Ne,a8 as ve,b3 as we,j as e,M as R,B as P,e as Q,b as E,X as F,v as k,b4 as _e,n as t,al as V,am as ke,b5 as Se,b6 as Ce,b7 as De,b8 as Re,b9 as Pe}from"./index-BtyeumGM.js";import{a as Ee,b as Fe,E as S,P as Me,S as M}from"./ui-Bucd7ZQW.js";import{T}from"./truck-DFAp5vTR.js";import{K as W}from"./key-DGAb9JNS.js";import{P as Te}from"./plus-D66LUkyr.js";import{P as $,a as $e}from"./power-BzUM4Jxl.js";import{T as A}from"./trash-2-Cpz1crux.js";import{P as Ae}from"./power-off-DC_j-T0K.js";import{S as K}from"./save-B_0bwRwJ.js";import{S as Ke}from"./sparkles-CTC5UJ5I.js";const Ve=({mode:l})=>{const[x,L]=i.useState([]),[d,B]=i.useState(""),[y,Y]=i.useState("reply"),[j,Z]=i.useState([]),[I,h]=i.useState(!1),[f,z]=i.useState(null),[c,N]=i.useState({keyword:"",reply_content:""}),[C,ee]=i.useState([]),[se,ae]=i.useState([]),[te,u]=i.useState(!1),[v,H]=i.useState(null),[r,o]=i.useState({keyword:"",cookie_id:"",card_id:"",description:"",enabled:!0}),[O,le]=i.useState({}),[ie,g]=i.useState(!1),[Le,q]=i.useState(null),[n,m]=i.useState({cookie_id:"",enabled:!1,reply_content:"",reply_once:!1,reply_image_url:""}),[re,U]=i.useState(!1);i.useEffect(()=>{if(l==="delivery"){b(),X(),J().then(L);return}J().then(s=>{L(s),s&&s.length>0&&B(a=>a||s[0].id)})},[l]),i.useEffect(()=>{l==="reply"&&d&&(_(),w())},[l,d]);const w=async()=>{try{const s=await fe();le(s)}catch(s){console.error("加载默认回复失败",s)}},b=async()=>{try{const s=await Ne();ee(s.filter(a=>!a.item_id))}catch(s){console.error("加载发货规则失败",s)}},X=async()=>{try{const s=await ve();ae(s)}catch(s){console.error("加载卡券失败",s)}},_=async()=>{if(d){U(!0);try{const s=await we(d);Z(s)}catch(s){console.error("加载关键词失败",s)}finally{U(!1)}}},ne=()=>{if(l==="delivery")H(null),o({keyword:"",cookie_id:"",card_id:"",description:"",enabled:!0}),u(!0);else if(y==="reply")z(null),N({keyword:"",reply_content:""}),h(!0);else{if(!d)return;G(d)}},G=async s=>{try{const a=await Se(s);q(a),m({cookie_id:s,enabled:a.enabled,reply_content:a.reply_content,reply_once:a.reply_once,reply_image_url:a.reply_image_url||""}),g(!0)}catch(a){console.error("加载默认回复失败",a),q(null),m({cookie_id:s,enabled:!1,reply_content:"",reply_once:!1,reply_image_url:""}),g(!0)}},de=s=>{y==="reply"&&(z(s),N({keyword:s.keyword,reply_content:s.reply_content}),h(!0))},ce=s=>{H(s),o({keyword:s.item_keyword,cookie_id:s.cookie_id||"",card_id:String(s.card_group_id),description:s.name,enabled:s.enabled}),u(!0)},oe=async()=>{if(!d){t("请先选择账号");return}if(!c.keyword.trim()||!c.reply_content.trim()){t("请填写关键词和回复内容");return}try{await Re({id:f==null?void 0:f.id,keyword:c.keyword,reply_content:c.reply_content,match_type:"exact",enabled:!0},d),h(!1),_(),t("保存成功!")}catch(s){t("保存失败:"+s.message)}},me=async()=>{if(!r.keyword.trim()){t("请填写触发关键词");return}if(!r.card_id){t("请选择卡券");return}try{await V({id:v==null?void 0:v.id,item_keyword:r.keyword,cookie_id:r.cookie_id||void 0,item_id:void 0,card_group_id:parseInt(r.card_id),name:r.description,priority:1,enabled:r.enabled}),u(!1),b(),t("保存成功!")}catch(s){t("保存失败:"+s.message)}},pe=async s=>{if(!(!d||!await k("确认删除该关键词吗?")))try{await _e(s,d),_(),t("删除成功!")}catch(a){t("删除失败:"+a.message)}},xe=async s=>{if(await k("确认删除该发货规则吗?"))try{await ke(s),b(),t("删除成功!")}catch(a){t("删除失败:"+a.message)}},ye=async s=>{try{await V({id:s.id,item_keyword:s.item_keyword,cookie_id:s.cookie_id,item_id:s.item_id,card_group_id:s.card_group_id,name:s.name,priority:s.priority,enabled:!s.enabled}),b()}catch(a){t("操作失败:"+a.message)}},he=async()=>{if(!n.cookie_id){t("请先选择账号");return}try{await Pe(n.cookie_id,{enabled:n.enabled,reply_content:n.reply_content,reply_once:n.reply_once,reply_image_url:n.reply_image_url}),g(!1),w(),t("保存成功!")}catch(s){t("保存失败:"+s.message)}},ue=async s=>{if(await k("确认删除该默认回复吗?"))try{await De(s),w(),t("删除成功!")}catch(a){t("删除失败:"+a.message)}},ge=async s=>{if(await k("确认清空该账号的回复记录吗?清空后可以重新对所有对话使用默认回复。"))try{await Ce(s),t("清空成功!")}catch(a){t("清空失败:"+a.message)}},be=Object.values(O).filter(s=>s.enabled).length,je=()=>{l==="delivery"?Promise.all([b(),X()]):y==="reply"?_():w()},D=(s,a,p)=>e.jsx("button",{type:"button",role:"switch","aria-checked":s,"aria-label":p,onClick:a,className:`relative h-6 w-11 shrink-0 rounded-full transition-colors ${s?"bg-[#ffe100]":"bg-gray-300"}`,children:e.jsx("span",{className:`absolute left-1 top-1 h-4 w-4 rounded-full bg-white transition-transform ${s?"translate-x-5":""}`})});return e.jsxs("div",{className:"page-stack animate-fade-in",children:[e.jsx(Ee,{title:l==="reply"?"自动回复":"通用自动发货",description:l==="reply"?"管理账号关键词回复和未命中规则时的默认回复。":"管理按账号或全部账号生效的关键词兜底发货规则。",icon:l==="reply"?R:T}),l==="reply"&&e.jsx(Fe,{value:y,onChange:Y,ariaLabel:"自动回复功能",items:[{id:"reply",label:"关键词回复",icon:W,count:j.length},{id:"default",label:"账号默认回复",icon:P,count:be}]}),e.jsxs("div",{className:"toolbar",children:[e.jsx("div",{className:"toolbar__group",children:l==="reply"?e.jsxs(e.Fragment,{children:[e.jsx("label",{htmlFor:"reply-account",className:"text-xs font-bold text-gray-600",children:"应用账号"}),e.jsxs("select",{id:"reply-account",className:"ios-input rounded-md px-3 py-2.5 text-sm sm:min-w-64",value:d,onChange:s=>B(s.target.value),children:[e.jsx("option",{value:"",children:"请选择账号"}),x.map(s=>e.jsx("option",{value:s.id,children:s.nickname||s.remark||s.id},s.id))]})]}):e.jsx("p",{className:"text-sm text-gray-600",children:"商品专属规则在“商品与发货”配置,此处仅处理关键词兜底。"})}),e.jsxs("div",{className:"toolbar__group",children:[e.jsxs("button",{type:"button",onClick:je,className:"ios-btn-secondary flex items-center justify-center gap-2 rounded-md px-4 py-2.5 text-sm",children:[e.jsx(Q,{className:"h-4 w-4"}),"刷新"]}),e.jsxs("button",{type:"button",onClick:ne,disabled:l==="reply"&&!d,className:"ios-btn-primary flex items-center justify-center gap-2 rounded-md px-4 py-2.5 text-sm",children:[e.jsx(Te,{className:"h-4 w-4"}),l==="delivery"?"添加通用规则":y==="reply"?"添加关键词":"编辑默认回复"]})]})]}),l==="reply"&&!d?e.jsx(S,{title:"请选择闲鱼账号",description:"选择账号后可查看和编辑该账号的自动回复配置。",icon:R}):l==="reply"&&y==="reply"?re?e.jsx(Me,{label:"正在加载关键词回复"}):e.jsxs("section",{className:"section-panel",children:[e.jsx(M,{title:"关键词回复规则",description:`当前账号共 ${j.length} 条规则`,icon:W}),e.jsxs("div",{className:"divide-y divide-gray-100",children:[j.map(s=>e.jsxs("article",{className:"grid gap-3 px-4 py-4 sm:grid-cols-[minmax(160px,0.7fr)_minmax(0,1.5fr)_auto] sm:items-center",children:[e.jsx("div",{className:"min-w-0",children:e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("h3",{className:"break-words text-sm font-bold text-gray-900",children:s.keyword}),e.jsx("span",{className:"status-badge status-badge-success",children:"精确匹配"})]})}),e.jsx("p",{className:"min-w-0 whitespace-pre-wrap break-words text-sm leading-6 text-gray-600",children:s.reply_content||"未填写回复内容"}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx("button",{type:"button",onClick:()=>de(s),className:"flex h-9 w-9 items-center justify-center rounded-md bg-gray-100 text-gray-700 hover:bg-gray-200",title:"编辑关键词",children:e.jsx($,{className:"h-4 w-4"})}),e.jsx("button",{type:"button",onClick:()=>void pe(s.id),className:"flex h-9 w-9 items-center justify-center rounded-md bg-red-50 text-red-600 hover:bg-red-100",title:"删除关键词",children:e.jsx(A,{className:"h-4 w-4"})})]})]},s.id)),j.length===0&&e.jsx(S,{compact:!0,title:"暂无关键词回复",description:"添加规则后,命中关键词的买家消息将使用指定内容回复。",icon:R})]})]}):l==="delivery"?e.jsxs("section",{className:"section-panel",children:[e.jsx(M,{title:"关键词兜底发货",description:`共 ${C.length} 条通用规则`,icon:T}),e.jsxs("div",{className:"divide-y divide-gray-100",children:[C.map(s=>{var a;return e.jsxs("article",{className:"grid gap-3 px-4 py-4 lg:grid-cols-[minmax(180px,0.7fr)_minmax(0,1.4fr)_auto] lg:items-center",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("h3",{className:"break-words text-sm font-bold text-gray-900",children:s.item_keyword}),e.jsx("span",{className:`status-badge ${s.enabled?"status-badge-success":"bg-gray-100 text-gray-600"}`,children:s.enabled?"已启用":"已停用"})]}),e.jsx("p",{className:"mt-1 text-xs text-gray-500",children:s.cookie_id?"指定账号":"全部账号"})]}),e.jsxs("div",{className:"min-w-0 text-sm text-gray-600",children:[e.jsxs("p",{className:"truncate",children:["发货内容:",s.card_group_name||`卡密 ${s.card_group_id}`]}),s.cookie_id&&e.jsxs("p",{className:"mt-1 truncate text-xs text-gray-500",children:["账号:",((a=x.find(p=>p.id===s.cookie_id))==null?void 0:a.nickname)||s.cookie_id]}),s.name&&e.jsx("p",{className:"mt-1 break-words text-xs text-gray-500",children:s.name})]}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx("button",{type:"button",onClick:()=>void ye(s),className:"flex h-9 w-9 items-center justify-center rounded-md bg-gray-100 text-gray-700 hover:bg-gray-200",title:s.enabled?"停用规则":"启用规则",children:s.enabled?e.jsx(Ae,{className:"h-4 w-4"}):e.jsx($e,{className:"h-4 w-4"})}),e.jsx("button",{type:"button",onClick:()=>ce(s),className:"flex h-9 w-9 items-center justify-center rounded-md bg-gray-100 text-gray-700 hover:bg-gray-200",title:"编辑规则",children:e.jsx($,{className:"h-4 w-4"})}),e.jsx("button",{type:"button",onClick:()=>void xe(s.id),className:"flex h-9 w-9 items-center justify-center rounded-md bg-red-50 text-red-600 hover:bg-red-100",title:"删除规则",children:e.jsx(A,{className:"h-4 w-4"})})]})]},s.id)}),C.length===0&&e.jsx(S,{compact:!0,title:"暂无通用发货规则",description:"商品专属发货请在“商品与发货”中配置。",icon:T})]})]}):e.jsxs("section",{className:"section-panel",children:[e.jsx(M,{title:"账号默认回复",description:"关键词规则未命中时使用对应账号的默认内容。",icon:P}),e.jsxs("div",{className:"divide-y divide-gray-100",children:[x.map(s=>{const a=O[s.id],p=!!(a!=null&&a.enabled);return e.jsxs("article",{className:"grid gap-3 px-4 py-4 sm:grid-cols-[minmax(180px,0.7fr)_minmax(0,1.4fr)_auto] sm:items-center",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("h3",{className:"truncate text-sm font-bold text-gray-900",children:s.nickname||s.remark||s.id}),e.jsx("span",{className:`status-badge ${p?"status-badge-success":"bg-gray-100 text-gray-600"}`,children:p?"已启用":"未启用"}),(a==null?void 0:a.reply_once)&&e.jsx("span",{className:"status-badge status-badge-info",children:"单会话一次"})]}),e.jsx("p",{className:"mt-1 break-all text-xs text-gray-500",children:s.id})]}),e.jsx("p",{className:"min-w-0 whitespace-pre-wrap break-words text-sm leading-6 text-gray-600",children:(a==null?void 0:a.reply_content)||"未设置默认回复内容"}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx("button",{type:"button",onClick:()=>void G(s.id),className:"flex h-9 w-9 items-center justify-center rounded-md bg-gray-100 text-gray-700 hover:bg-gray-200",title:"编辑默认回复",children:e.jsx($,{className:"h-4 w-4"})}),p&&e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",onClick:()=>void ge(s.id),className:"flex h-9 w-9 items-center justify-center rounded-md bg-blue-50 text-blue-700 hover:bg-blue-100",title:"清空回复记录",children:e.jsx(Q,{className:"h-4 w-4"})}),e.jsx("button",{type:"button",onClick:()=>void ue(s.id),className:"flex h-9 w-9 items-center justify-center rounded-md bg-red-50 text-red-600 hover:bg-red-100",title:"删除默认回复",children:e.jsx(A,{className:"h-4 w-4"})})]})]})]},s.id)}),x.length===0&&e.jsx(S,{compact:!0,title:"暂无闲鱼账号",description:"添加账号后可配置账号默认回复。",icon:P})]})]}),l==="reply"&&I&&E.createPortal(e.jsx("div",{className:"modal-overlay",children:e.jsxs("div",{className:"modal-container",children:[e.jsxs("div",{className:"modal-header flex items-start justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-bold text-gray-900",children:f?"编辑关键词回复":"添加关键词回复"}),e.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"当前规则使用精确匹配。"})]}),e.jsx("button",{type:"button",onClick:()=>h(!1),className:"rounded-md p-2 hover:bg-gray-100","aria-label":"关闭",children:e.jsx(F,{className:"h-5 w-5"})})]}),e.jsxs("div",{className:"modal-body space-y-4",children:[e.jsxs("label",{className:"block",children:[e.jsx("span",{className:"field-label",children:"触发关键词"}),e.jsx("input",{value:c.keyword,onChange:s=>N({...c,keyword:s.target.value}),placeholder:"例如:价格、包邮",className:"ios-input w-full rounded-md px-3 py-2.5"})]}),e.jsxs("label",{className:"block",children:[e.jsx("span",{className:"field-label",children:"回复内容"}),e.jsx("textarea",{value:c.reply_content,onChange:s=>N({...c,reply_content:s.target.value}),placeholder:"输入自动回复内容",rows:7,className:"ios-input w-full resize-y rounded-md px-3 py-2.5"})]})]}),e.jsxs("div",{className:"modal-footer flex justify-end gap-2",children:[e.jsx("button",{type:"button",onClick:()=>h(!1),className:"ios-btn-secondary rounded-md px-4 py-2.5",children:"取消"}),e.jsxs("button",{type:"button",onClick:()=>void oe(),className:"ios-btn-primary flex items-center gap-2 rounded-md px-4 py-2.5",children:[e.jsx(K,{className:"h-4 w-4"}),"保存"]})]})]})}),document.body),l==="delivery"&&te&&E.createPortal(e.jsx("div",{className:"modal-overlay",children:e.jsxs("div",{className:"modal-container",children:[e.jsxs("div",{className:"modal-header flex items-start justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-bold text-gray-900",children:v?"编辑通用发货规则":"添加通用发货规则"}),e.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"未指定账号时对全部闲鱼账号生效。"})]}),e.jsx("button",{type:"button",onClick:()=>u(!1),className:"rounded-md p-2 hover:bg-gray-100","aria-label":"关闭",children:e.jsx(F,{className:"h-5 w-5"})})]}),e.jsxs("div",{className:"modal-body grid gap-4 sm:grid-cols-2",children:[e.jsxs("label",{className:"block sm:col-span-2",children:[e.jsx("span",{className:"field-label",children:"适用账号"}),e.jsxs("select",{value:r.cookie_id,onChange:s=>o({...r,cookie_id:s.target.value}),className:"ios-input w-full rounded-md px-3 py-2.5",children:[e.jsx("option",{value:"",children:"全部账号"}),x.map(s=>e.jsx("option",{value:s.id,children:s.nickname||s.remark||s.id},s.id))]})]}),e.jsxs("label",{className:"block sm:col-span-2",children:[e.jsx("span",{className:"field-label",children:"商品关键词"}),e.jsx("input",{value:r.keyword,onChange:s=>o({...r,keyword:s.target.value}),placeholder:"例如:会员、周卡",className:"ios-input w-full rounded-md px-3 py-2.5"})]}),e.jsxs("label",{className:"block",children:[e.jsx("span",{className:"field-label",children:"发货卡密或内容"}),e.jsxs("select",{value:r.card_id,onChange:s=>o({...r,card_id:s.target.value}),className:"ios-input w-full rounded-md px-3 py-2.5",children:[e.jsx("option",{value:"",children:"请选择"}),se.map(s=>{var a;return e.jsx("option",{value:s.id,children:s.name||((a=s.text_content)==null?void 0:a.substring(0,30))||`卡券 ${s.id}`},s.id)})]})]}),e.jsxs("label",{className:"block",children:[e.jsx("span",{className:"field-label",children:"规则备注"}),e.jsx("input",{value:r.description,onChange:s=>o({...r,description:s.target.value}),placeholder:"便于识别此规则",className:"ios-input w-full rounded-md px-3 py-2.5"})]}),e.jsxs("div",{className:"flex items-center justify-between rounded-md border border-gray-200 bg-gray-50 p-4 sm:col-span-2",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-bold text-gray-800",children:"启用规则"}),e.jsx("p",{className:"mt-1 text-xs text-gray-500",children:"停用后保留配置但不参与匹配。"})]}),D(r.enabled,()=>o({...r,enabled:!r.enabled}),"启用通用发货规则")]})]}),e.jsxs("div",{className:"modal-footer flex justify-end gap-2",children:[e.jsx("button",{type:"button",onClick:()=>u(!1),className:"ios-btn-secondary rounded-md px-4 py-2.5",children:"取消"}),e.jsxs("button",{type:"button",onClick:()=>void me(),className:"ios-btn-primary flex items-center gap-2 rounded-md px-4 py-2.5",children:[e.jsx(K,{className:"h-4 w-4"}),"保存"]})]})]})}),document.body),l==="reply"&&ie&&E.createPortal(e.jsx("div",{className:"modal-overlay",children:e.jsxs("div",{className:"modal-container",children:[e.jsxs("div",{className:"modal-header flex items-start justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-bold text-gray-900",children:"账号默认回复"}),e.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"关键词规则未命中时使用此内容。"})]}),e.jsx("button",{type:"button",onClick:()=>g(!1),className:"rounded-md p-2 hover:bg-gray-100","aria-label":"关闭",children:e.jsx(F,{className:"h-5 w-5"})})]}),e.jsxs("div",{className:"modal-body space-y-4",children:[e.jsxs("label",{className:"block",children:[e.jsx("span",{className:"field-label",children:"应用账号"}),e.jsxs("select",{value:n.cookie_id,onChange:s=>m({...n,cookie_id:s.target.value}),className:"ios-input w-full rounded-md px-3 py-2.5",children:[e.jsx("option",{value:"",children:"请选择账号"}),x.map(s=>e.jsx("option",{value:s.id,children:s.nickname||s.remark||s.id},s.id))]})]}),e.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[e.jsxs("div",{className:"flex items-center justify-between rounded-md border border-gray-200 bg-gray-50 p-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-bold text-gray-800",children:"启用默认回复"}),e.jsx("p",{className:"mt-1 text-xs text-gray-500",children:"参与当前账号自动回复。"})]}),D(n.enabled,()=>m({...n,enabled:!n.enabled}),"启用默认回复")]}),e.jsxs("div",{className:"flex items-center justify-between rounded-md border border-gray-200 bg-gray-50 p-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-bold text-gray-800",children:"单会话一次"}),e.jsx("p",{className:"mt-1 text-xs text-gray-500",children:"每个对话仅触发一次。"})]}),D(n.reply_once,()=>m({...n,reply_once:!n.reply_once}),"每个会话只回复一次")]})]}),e.jsxs("label",{className:"block",children:[e.jsx("span",{className:"field-label",children:"回复内容"}),e.jsx("textarea",{value:n.reply_content,onChange:s=>m({...n,reply_content:s.target.value}),placeholder:"输入默认回复内容",rows:7,className:"ios-input w-full resize-y rounded-md px-3 py-2.5"})]}),e.jsxs("label",{className:"block",children:[e.jsx("span",{className:"field-label",children:"回复图片 URL(可选)"}),e.jsxs("div",{className:"relative",children:[e.jsx(Ke,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400"}),e.jsx("input",{value:n.reply_image_url,onChange:s=>m({...n,reply_image_url:s.target.value}),placeholder:"https://example.com/image.jpg",className:"ios-input w-full rounded-md py-2.5 pl-9 pr-3"})]})]})]}),e.jsxs("div",{className:"modal-footer flex justify-end gap-2",children:[e.jsx("button",{type:"button",onClick:()=>g(!1),className:"ios-btn-secondary rounded-md px-4 py-2.5",children:"取消"}),e.jsxs("button",{type:"button",onClick:()=>void he(),className:"ios-btn-primary flex items-center gap-2 rounded-md px-4 py-2.5",children:[e.jsx(K,{className:"h-4 w-4"}),"保存"]})]})]})}),document.body)]})};export{Ve as default}; +import{r as i,o as J,b2 as fe,ar as Ne,a8 as ve,b3 as we,j as e,M as R,B as P,e as Q,b as E,X as F,v as k,b4 as _e,n as t,al as V,am as ke,b5 as Se,b6 as Ce,b7 as De,b8 as Re,b9 as Pe}from"./index-IP-mmLlr.js";import{a as Ee,b as Fe,E as S,P as Me,S as M}from"./ui-Fi8l9rTp.js";import{T}from"./truck-CrexfDE5.js";import{K as W}from"./key-ItWA3Cb3.js";import{P as Te}from"./plus-BbnHS2Zx.js";import{P as $,a as $e}from"./power-Ucg7FCbo.js";import{T as A}from"./trash-2-BNPsgs2t.js";import{P as Ae}from"./power-off-D47FTQRk.js";import{S as K}from"./save-CNiIU-3u.js";import{S as Ke}from"./sparkles-CavN45fA.js";const Ve=({mode:l})=>{const[x,L]=i.useState([]),[d,B]=i.useState(""),[y,Y]=i.useState("reply"),[j,Z]=i.useState([]),[I,h]=i.useState(!1),[f,z]=i.useState(null),[c,N]=i.useState({keyword:"",reply_content:""}),[C,ee]=i.useState([]),[se,ae]=i.useState([]),[te,u]=i.useState(!1),[v,H]=i.useState(null),[r,o]=i.useState({keyword:"",cookie_id:"",card_id:"",description:"",enabled:!0}),[O,le]=i.useState({}),[ie,g]=i.useState(!1),[Le,q]=i.useState(null),[n,m]=i.useState({cookie_id:"",enabled:!1,reply_content:"",reply_once:!1,reply_image_url:""}),[re,U]=i.useState(!1);i.useEffect(()=>{if(l==="delivery"){b(),X(),J().then(L);return}J().then(s=>{L(s),s&&s.length>0&&B(a=>a||s[0].id)})},[l]),i.useEffect(()=>{l==="reply"&&d&&(_(),w())},[l,d]);const w=async()=>{try{const s=await fe();le(s)}catch(s){console.error("加载默认回复失败",s)}},b=async()=>{try{const s=await Ne();ee(s.filter(a=>!a.item_id))}catch(s){console.error("加载发货规则失败",s)}},X=async()=>{try{const s=await ve();ae(s)}catch(s){console.error("加载卡券失败",s)}},_=async()=>{if(d){U(!0);try{const s=await we(d);Z(s)}catch(s){console.error("加载关键词失败",s)}finally{U(!1)}}},ne=()=>{if(l==="delivery")H(null),o({keyword:"",cookie_id:"",card_id:"",description:"",enabled:!0}),u(!0);else if(y==="reply")z(null),N({keyword:"",reply_content:""}),h(!0);else{if(!d)return;G(d)}},G=async s=>{try{const a=await Se(s);q(a),m({cookie_id:s,enabled:a.enabled,reply_content:a.reply_content,reply_once:a.reply_once,reply_image_url:a.reply_image_url||""}),g(!0)}catch(a){console.error("加载默认回复失败",a),q(null),m({cookie_id:s,enabled:!1,reply_content:"",reply_once:!1,reply_image_url:""}),g(!0)}},de=s=>{y==="reply"&&(z(s),N({keyword:s.keyword,reply_content:s.reply_content}),h(!0))},ce=s=>{H(s),o({keyword:s.item_keyword,cookie_id:s.cookie_id||"",card_id:String(s.card_group_id),description:s.name,enabled:s.enabled}),u(!0)},oe=async()=>{if(!d){t("请先选择账号");return}if(!c.keyword.trim()||!c.reply_content.trim()){t("请填写关键词和回复内容");return}try{await Re({id:f==null?void 0:f.id,keyword:c.keyword,reply_content:c.reply_content,match_type:"exact",enabled:!0},d),h(!1),_(),t("保存成功!")}catch(s){t("保存失败:"+s.message)}},me=async()=>{if(!r.keyword.trim()){t("请填写触发关键词");return}if(!r.card_id){t("请选择卡券");return}try{await V({id:v==null?void 0:v.id,item_keyword:r.keyword,cookie_id:r.cookie_id||void 0,item_id:void 0,card_group_id:parseInt(r.card_id),name:r.description,priority:1,enabled:r.enabled}),u(!1),b(),t("保存成功!")}catch(s){t("保存失败:"+s.message)}},pe=async s=>{if(!(!d||!await k("确认删除该关键词吗?")))try{await _e(s,d),_(),t("删除成功!")}catch(a){t("删除失败:"+a.message)}},xe=async s=>{if(await k("确认删除该发货规则吗?"))try{await ke(s),b(),t("删除成功!")}catch(a){t("删除失败:"+a.message)}},ye=async s=>{try{await V({id:s.id,item_keyword:s.item_keyword,cookie_id:s.cookie_id,item_id:s.item_id,card_group_id:s.card_group_id,name:s.name,priority:s.priority,enabled:!s.enabled}),b()}catch(a){t("操作失败:"+a.message)}},he=async()=>{if(!n.cookie_id){t("请先选择账号");return}try{await Pe(n.cookie_id,{enabled:n.enabled,reply_content:n.reply_content,reply_once:n.reply_once,reply_image_url:n.reply_image_url}),g(!1),w(),t("保存成功!")}catch(s){t("保存失败:"+s.message)}},ue=async s=>{if(await k("确认删除该默认回复吗?"))try{await De(s),w(),t("删除成功!")}catch(a){t("删除失败:"+a.message)}},ge=async s=>{if(await k("确认清空该账号的回复记录吗?清空后可以重新对所有对话使用默认回复。"))try{await Ce(s),t("清空成功!")}catch(a){t("清空失败:"+a.message)}},be=Object.values(O).filter(s=>s.enabled).length,je=()=>{l==="delivery"?Promise.all([b(),X()]):y==="reply"?_():w()},D=(s,a,p)=>e.jsx("button",{type:"button",role:"switch","aria-checked":s,"aria-label":p,onClick:a,className:`relative h-6 w-11 shrink-0 rounded-full transition-colors ${s?"bg-[#ffe100]":"bg-gray-300"}`,children:e.jsx("span",{className:`absolute left-1 top-1 h-4 w-4 rounded-full bg-white transition-transform ${s?"translate-x-5":""}`})});return e.jsxs("div",{className:"page-stack animate-fade-in",children:[e.jsx(Ee,{title:l==="reply"?"自动回复":"通用自动发货",description:l==="reply"?"管理账号关键词回复和未命中规则时的默认回复。":"管理按账号或全部账号生效的关键词兜底发货规则。",icon:l==="reply"?R:T}),l==="reply"&&e.jsx(Fe,{value:y,onChange:Y,ariaLabel:"自动回复功能",items:[{id:"reply",label:"关键词回复",icon:W,count:j.length},{id:"default",label:"账号默认回复",icon:P,count:be}]}),e.jsxs("div",{className:"toolbar",children:[e.jsx("div",{className:"toolbar__group",children:l==="reply"?e.jsxs(e.Fragment,{children:[e.jsx("label",{htmlFor:"reply-account",className:"text-xs font-bold text-gray-600",children:"应用账号"}),e.jsxs("select",{id:"reply-account",className:"ios-input rounded-md px-3 py-2.5 text-sm sm:min-w-64",value:d,onChange:s=>B(s.target.value),children:[e.jsx("option",{value:"",children:"请选择账号"}),x.map(s=>e.jsx("option",{value:s.id,children:s.nickname||s.remark||s.id},s.id))]})]}):e.jsx("p",{className:"text-sm text-gray-600",children:"商品专属规则在“商品与发货”配置,此处仅处理关键词兜底。"})}),e.jsxs("div",{className:"toolbar__group",children:[e.jsxs("button",{type:"button",onClick:je,className:"ios-btn-secondary flex items-center justify-center gap-2 rounded-md px-4 py-2.5 text-sm",children:[e.jsx(Q,{className:"h-4 w-4"}),"刷新"]}),e.jsxs("button",{type:"button",onClick:ne,disabled:l==="reply"&&!d,className:"ios-btn-primary flex items-center justify-center gap-2 rounded-md px-4 py-2.5 text-sm",children:[e.jsx(Te,{className:"h-4 w-4"}),l==="delivery"?"添加通用规则":y==="reply"?"添加关键词":"编辑默认回复"]})]})]}),l==="reply"&&!d?e.jsx(S,{title:"请选择闲鱼账号",description:"选择账号后可查看和编辑该账号的自动回复配置。",icon:R}):l==="reply"&&y==="reply"?re?e.jsx(Me,{label:"正在加载关键词回复"}):e.jsxs("section",{className:"section-panel",children:[e.jsx(M,{title:"关键词回复规则",description:`当前账号共 ${j.length} 条规则`,icon:W}),e.jsxs("div",{className:"divide-y divide-gray-100",children:[j.map(s=>e.jsxs("article",{className:"grid gap-3 px-4 py-4 sm:grid-cols-[minmax(160px,0.7fr)_minmax(0,1.5fr)_auto] sm:items-center",children:[e.jsx("div",{className:"min-w-0",children:e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("h3",{className:"break-words text-sm font-bold text-gray-900",children:s.keyword}),e.jsx("span",{className:"status-badge status-badge-success",children:"精确匹配"})]})}),e.jsx("p",{className:"min-w-0 whitespace-pre-wrap break-words text-sm leading-6 text-gray-600",children:s.reply_content||"未填写回复内容"}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx("button",{type:"button",onClick:()=>de(s),className:"flex h-9 w-9 items-center justify-center rounded-md bg-gray-100 text-gray-700 hover:bg-gray-200",title:"编辑关键词",children:e.jsx($,{className:"h-4 w-4"})}),e.jsx("button",{type:"button",onClick:()=>void pe(s.id),className:"flex h-9 w-9 items-center justify-center rounded-md bg-red-50 text-red-600 hover:bg-red-100",title:"删除关键词",children:e.jsx(A,{className:"h-4 w-4"})})]})]},s.id)),j.length===0&&e.jsx(S,{compact:!0,title:"暂无关键词回复",description:"添加规则后,命中关键词的买家消息将使用指定内容回复。",icon:R})]})]}):l==="delivery"?e.jsxs("section",{className:"section-panel",children:[e.jsx(M,{title:"关键词兜底发货",description:`共 ${C.length} 条通用规则`,icon:T}),e.jsxs("div",{className:"divide-y divide-gray-100",children:[C.map(s=>{var a;return e.jsxs("article",{className:"grid gap-3 px-4 py-4 lg:grid-cols-[minmax(180px,0.7fr)_minmax(0,1.4fr)_auto] lg:items-center",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("h3",{className:"break-words text-sm font-bold text-gray-900",children:s.item_keyword}),e.jsx("span",{className:`status-badge ${s.enabled?"status-badge-success":"bg-gray-100 text-gray-600"}`,children:s.enabled?"已启用":"已停用"})]}),e.jsx("p",{className:"mt-1 text-xs text-gray-500",children:s.cookie_id?"指定账号":"全部账号"})]}),e.jsxs("div",{className:"min-w-0 text-sm text-gray-600",children:[e.jsxs("p",{className:"truncate",children:["发货内容:",s.card_group_name||`卡密 ${s.card_group_id}`]}),s.cookie_id&&e.jsxs("p",{className:"mt-1 truncate text-xs text-gray-500",children:["账号:",((a=x.find(p=>p.id===s.cookie_id))==null?void 0:a.nickname)||s.cookie_id]}),s.name&&e.jsx("p",{className:"mt-1 break-words text-xs text-gray-500",children:s.name})]}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx("button",{type:"button",onClick:()=>void ye(s),className:"flex h-9 w-9 items-center justify-center rounded-md bg-gray-100 text-gray-700 hover:bg-gray-200",title:s.enabled?"停用规则":"启用规则",children:s.enabled?e.jsx(Ae,{className:"h-4 w-4"}):e.jsx($e,{className:"h-4 w-4"})}),e.jsx("button",{type:"button",onClick:()=>ce(s),className:"flex h-9 w-9 items-center justify-center rounded-md bg-gray-100 text-gray-700 hover:bg-gray-200",title:"编辑规则",children:e.jsx($,{className:"h-4 w-4"})}),e.jsx("button",{type:"button",onClick:()=>void xe(s.id),className:"flex h-9 w-9 items-center justify-center rounded-md bg-red-50 text-red-600 hover:bg-red-100",title:"删除规则",children:e.jsx(A,{className:"h-4 w-4"})})]})]},s.id)}),C.length===0&&e.jsx(S,{compact:!0,title:"暂无通用发货规则",description:"商品专属发货请在“商品与发货”中配置。",icon:T})]})]}):e.jsxs("section",{className:"section-panel",children:[e.jsx(M,{title:"账号默认回复",description:"关键词规则未命中时使用对应账号的默认内容。",icon:P}),e.jsxs("div",{className:"divide-y divide-gray-100",children:[x.map(s=>{const a=O[s.id],p=!!(a!=null&&a.enabled);return e.jsxs("article",{className:"grid gap-3 px-4 py-4 sm:grid-cols-[minmax(180px,0.7fr)_minmax(0,1.4fr)_auto] sm:items-center",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("h3",{className:"truncate text-sm font-bold text-gray-900",children:s.nickname||s.remark||s.id}),e.jsx("span",{className:`status-badge ${p?"status-badge-success":"bg-gray-100 text-gray-600"}`,children:p?"已启用":"未启用"}),(a==null?void 0:a.reply_once)&&e.jsx("span",{className:"status-badge status-badge-info",children:"单会话一次"})]}),e.jsx("p",{className:"mt-1 break-all text-xs text-gray-500",children:s.id})]}),e.jsx("p",{className:"min-w-0 whitespace-pre-wrap break-words text-sm leading-6 text-gray-600",children:(a==null?void 0:a.reply_content)||"未设置默认回复内容"}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx("button",{type:"button",onClick:()=>void G(s.id),className:"flex h-9 w-9 items-center justify-center rounded-md bg-gray-100 text-gray-700 hover:bg-gray-200",title:"编辑默认回复",children:e.jsx($,{className:"h-4 w-4"})}),p&&e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",onClick:()=>void ge(s.id),className:"flex h-9 w-9 items-center justify-center rounded-md bg-blue-50 text-blue-700 hover:bg-blue-100",title:"清空回复记录",children:e.jsx(Q,{className:"h-4 w-4"})}),e.jsx("button",{type:"button",onClick:()=>void ue(s.id),className:"flex h-9 w-9 items-center justify-center rounded-md bg-red-50 text-red-600 hover:bg-red-100",title:"删除默认回复",children:e.jsx(A,{className:"h-4 w-4"})})]})]})]},s.id)}),x.length===0&&e.jsx(S,{compact:!0,title:"暂无闲鱼账号",description:"添加账号后可配置账号默认回复。",icon:P})]})]}),l==="reply"&&I&&E.createPortal(e.jsx("div",{className:"modal-overlay",children:e.jsxs("div",{className:"modal-container",children:[e.jsxs("div",{className:"modal-header flex items-start justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-bold text-gray-900",children:f?"编辑关键词回复":"添加关键词回复"}),e.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"当前规则使用精确匹配。"})]}),e.jsx("button",{type:"button",onClick:()=>h(!1),className:"rounded-md p-2 hover:bg-gray-100","aria-label":"关闭",children:e.jsx(F,{className:"h-5 w-5"})})]}),e.jsxs("div",{className:"modal-body space-y-4",children:[e.jsxs("label",{className:"block",children:[e.jsx("span",{className:"field-label",children:"触发关键词"}),e.jsx("input",{value:c.keyword,onChange:s=>N({...c,keyword:s.target.value}),placeholder:"例如:价格、包邮",className:"ios-input w-full rounded-md px-3 py-2.5"})]}),e.jsxs("label",{className:"block",children:[e.jsx("span",{className:"field-label",children:"回复内容"}),e.jsx("textarea",{value:c.reply_content,onChange:s=>N({...c,reply_content:s.target.value}),placeholder:"输入自动回复内容",rows:7,className:"ios-input w-full resize-y rounded-md px-3 py-2.5"})]})]}),e.jsxs("div",{className:"modal-footer flex justify-end gap-2",children:[e.jsx("button",{type:"button",onClick:()=>h(!1),className:"ios-btn-secondary rounded-md px-4 py-2.5",children:"取消"}),e.jsxs("button",{type:"button",onClick:()=>void oe(),className:"ios-btn-primary flex items-center gap-2 rounded-md px-4 py-2.5",children:[e.jsx(K,{className:"h-4 w-4"}),"保存"]})]})]})}),document.body),l==="delivery"&&te&&E.createPortal(e.jsx("div",{className:"modal-overlay",children:e.jsxs("div",{className:"modal-container",children:[e.jsxs("div",{className:"modal-header flex items-start justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-bold text-gray-900",children:v?"编辑通用发货规则":"添加通用发货规则"}),e.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"未指定账号时对全部闲鱼账号生效。"})]}),e.jsx("button",{type:"button",onClick:()=>u(!1),className:"rounded-md p-2 hover:bg-gray-100","aria-label":"关闭",children:e.jsx(F,{className:"h-5 w-5"})})]}),e.jsxs("div",{className:"modal-body grid gap-4 sm:grid-cols-2",children:[e.jsxs("label",{className:"block sm:col-span-2",children:[e.jsx("span",{className:"field-label",children:"适用账号"}),e.jsxs("select",{value:r.cookie_id,onChange:s=>o({...r,cookie_id:s.target.value}),className:"ios-input w-full rounded-md px-3 py-2.5",children:[e.jsx("option",{value:"",children:"全部账号"}),x.map(s=>e.jsx("option",{value:s.id,children:s.nickname||s.remark||s.id},s.id))]})]}),e.jsxs("label",{className:"block sm:col-span-2",children:[e.jsx("span",{className:"field-label",children:"商品关键词"}),e.jsx("input",{value:r.keyword,onChange:s=>o({...r,keyword:s.target.value}),placeholder:"例如:会员、周卡",className:"ios-input w-full rounded-md px-3 py-2.5"})]}),e.jsxs("label",{className:"block",children:[e.jsx("span",{className:"field-label",children:"发货卡密或内容"}),e.jsxs("select",{value:r.card_id,onChange:s=>o({...r,card_id:s.target.value}),className:"ios-input w-full rounded-md px-3 py-2.5",children:[e.jsx("option",{value:"",children:"请选择"}),se.map(s=>{var a;return e.jsx("option",{value:s.id,children:s.name||((a=s.text_content)==null?void 0:a.substring(0,30))||`卡券 ${s.id}`},s.id)})]})]}),e.jsxs("label",{className:"block",children:[e.jsx("span",{className:"field-label",children:"规则备注"}),e.jsx("input",{value:r.description,onChange:s=>o({...r,description:s.target.value}),placeholder:"便于识别此规则",className:"ios-input w-full rounded-md px-3 py-2.5"})]}),e.jsxs("div",{className:"flex items-center justify-between rounded-md border border-gray-200 bg-gray-50 p-4 sm:col-span-2",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-bold text-gray-800",children:"启用规则"}),e.jsx("p",{className:"mt-1 text-xs text-gray-500",children:"停用后保留配置但不参与匹配。"})]}),D(r.enabled,()=>o({...r,enabled:!r.enabled}),"启用通用发货规则")]})]}),e.jsxs("div",{className:"modal-footer flex justify-end gap-2",children:[e.jsx("button",{type:"button",onClick:()=>u(!1),className:"ios-btn-secondary rounded-md px-4 py-2.5",children:"取消"}),e.jsxs("button",{type:"button",onClick:()=>void me(),className:"ios-btn-primary flex items-center gap-2 rounded-md px-4 py-2.5",children:[e.jsx(K,{className:"h-4 w-4"}),"保存"]})]})]})}),document.body),l==="reply"&&ie&&E.createPortal(e.jsx("div",{className:"modal-overlay",children:e.jsxs("div",{className:"modal-container",children:[e.jsxs("div",{className:"modal-header flex items-start justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-bold text-gray-900",children:"账号默认回复"}),e.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"关键词规则未命中时使用此内容。"})]}),e.jsx("button",{type:"button",onClick:()=>g(!1),className:"rounded-md p-2 hover:bg-gray-100","aria-label":"关闭",children:e.jsx(F,{className:"h-5 w-5"})})]}),e.jsxs("div",{className:"modal-body space-y-4",children:[e.jsxs("label",{className:"block",children:[e.jsx("span",{className:"field-label",children:"应用账号"}),e.jsxs("select",{value:n.cookie_id,onChange:s=>m({...n,cookie_id:s.target.value}),className:"ios-input w-full rounded-md px-3 py-2.5",children:[e.jsx("option",{value:"",children:"请选择账号"}),x.map(s=>e.jsx("option",{value:s.id,children:s.nickname||s.remark||s.id},s.id))]})]}),e.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[e.jsxs("div",{className:"flex items-center justify-between rounded-md border border-gray-200 bg-gray-50 p-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-bold text-gray-800",children:"启用默认回复"}),e.jsx("p",{className:"mt-1 text-xs text-gray-500",children:"参与当前账号自动回复。"})]}),D(n.enabled,()=>m({...n,enabled:!n.enabled}),"启用默认回复")]}),e.jsxs("div",{className:"flex items-center justify-between rounded-md border border-gray-200 bg-gray-50 p-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-bold text-gray-800",children:"单会话一次"}),e.jsx("p",{className:"mt-1 text-xs text-gray-500",children:"每个对话仅触发一次。"})]}),D(n.reply_once,()=>m({...n,reply_once:!n.reply_once}),"每个会话只回复一次")]})]}),e.jsxs("label",{className:"block",children:[e.jsx("span",{className:"field-label",children:"回复内容"}),e.jsx("textarea",{value:n.reply_content,onChange:s=>m({...n,reply_content:s.target.value}),placeholder:"输入默认回复内容",rows:7,className:"ios-input w-full resize-y rounded-md px-3 py-2.5"})]}),e.jsxs("label",{className:"block",children:[e.jsx("span",{className:"field-label",children:"回复图片 URL(可选)"}),e.jsxs("div",{className:"relative",children:[e.jsx(Ke,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400"}),e.jsx("input",{value:n.reply_image_url,onChange:s=>m({...n,reply_image_url:s.target.value}),placeholder:"https://example.com/image.jpg",className:"ios-input w-full rounded-md py-2.5 pl-9 pr-3"})]})]})]}),e.jsxs("div",{className:"modal-footer flex justify-end gap-2",children:[e.jsx("button",{type:"button",onClick:()=>g(!1),className:"ios-btn-secondary rounded-md px-4 py-2.5",children:"取消"}),e.jsxs("button",{type:"button",onClick:()=>void he(),className:"ios-btn-primary flex items-center gap-2 rounded-md px-4 py-2.5",children:[e.jsx(K,{className:"h-4 w-4"}),"保存"]})]})]})}),document.body)]})};export{Ve as default}; diff --git a/static/assets/MessageManagement-BrI_glnU.js b/static/assets/MessageManagement-NPF-d8RM.js similarity index 98% rename from static/assets/MessageManagement-BrI_glnU.js rename to static/assets/MessageManagement-NPF-d8RM.js index d7f85ff..c829b6a 100644 --- a/static/assets/MessageManagement-BrI_glnU.js +++ b/static/assets/MessageManagement-NPF-d8RM.js @@ -1,4 +1,4 @@ -import{c as We,r as n,aW as mt,o as xt,n as u,h as ut,ba as ht,bb as ft,j as t,e as $e,L as U,bc as pt,X as gt,bd as bt,be as jt,bf as yt,aT as vt,bg as wt,bh as Nt,bi as kt,bj as St,v as Te,bk as Ct,bl as Mt}from"./index-BtyeumGM.js";import{I as Re,c as _t,S as Ee,E as It}from"./ui-Bucd7ZQW.js";import{S as Z}from"./settings-2-Dn9OYKhu.js";import{S as $t}from"./search-Dm0kd19J.js";import{P as Tt}from"./package-DRVL5sin.js";import{I as Rt}from"./image-BRbxtWrD.js";import{Z as Et}from"./zap-BAdVhmYa.js";import{S as Lt}from"./send-D9HISjuP.js";import{P as Le}from"./plus-D66LUkyr.js";import{T as Ue}from"./trash-2-Cpz1crux.js";/** +import{c as We,r as n,aW as mt,o as xt,n as u,h as ut,ba as ht,bb as ft,j as t,e as $e,L as U,bc as pt,X as gt,bd as bt,be as jt,bf as yt,aT as vt,bg as wt,bh as Nt,bi as kt,bj as St,v as Te,bk as Ct,bl as Mt}from"./index-IP-mmLlr.js";import{I as Re,c as _t,S as Ee,E as It}from"./ui-Fi8l9rTp.js";import{S as Z}from"./settings-2-DVRotgka.js";import{S as $t}from"./search-TGrYyOkD.js";import{P as Tt}from"./package-C7ydMeAZ.js";import{I as Rt}from"./image-hfWSlf8S.js";import{Z as Et}from"./zap-DljT2UQs.js";import{S as Lt}from"./send-CwI5w629.js";import{P as Le}from"./plus-BbnHS2Zx.js";import{T as Ue}from"./trash-2-BNPsgs2t.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/NotificationsAndLogs-ra-r3ESv.js b/static/assets/NotificationsAndLogs-FD8llMy1.js similarity index 97% rename from static/assets/NotificationsAndLogs-ra-r3ESv.js rename to static/assets/NotificationsAndLogs-FD8llMy1.js index ea9f823..9de8e03 100644 --- a/static/assets/NotificationsAndLogs-ra-r3ESv.js +++ b/static/assets/NotificationsAndLogs-FD8llMy1.js @@ -1 +1 @@ -import{r as l,j as t,bc as E,e as ee,L as te,aE as ot,C as ct,X as Se,o as dt,bm as mt,bn as xt,bo as pt,n as o,bp as ut,bq as ht,br as _e,v as se,bs as yt,bt as Re,bu as bt,bv as gt,bw as ft,bx as jt,by as Nt}from"./index-BtyeumGM.js";import{a as vt,b as wt,S as $,E as L}from"./ui-Bucd7ZQW.js";import{L as ae}from"./link-2-YAS_V1Cj.js";import{S as le}from"./shield-alert-Rn-eFcN-.js";import{A as ne}from"./activity-j8Ec2Exe.js";import{P as Ee}from"./plus-D66LUkyr.js";import{P as $e}from"./pen-line-Du-MX3r7.js";import{T as ie}from"./trash-2-Cpz1crux.js";import{S as kt}from"./send-D9HISjuP.js";import{C as Ct,a as St}from"./chevron-right-OUn6lLjt.js";import{S as Le}from"./save-B_0bwRwJ.js";import{C as _t}from"./check-BL4ZPX5c.js";const y={dingtalk:{label:"钉钉",fields:[{key:"webhook_url",label:"Webhook 地址",placeholder:"https://oapi.dingtalk.com/robot/send?..."},{key:"secret",label:"加签密钥",type:"password",optional:!0}],defaults:{}},feishu:{label:"飞书",fields:[{key:"webhook_url",label:"Webhook 地址",placeholder:"https://open.feishu.cn/open-apis/bot/v2/hook/..."},{key:"secret",label:"签名密钥",type:"password",optional:!0}],defaults:{}},bark:{label:"Bark",fields:[{key:"device_key",label:"Device Key",type:"password"},{key:"server_url",label:"服务器地址",placeholder:"https://api.day.app",optional:!0}],defaults:{server_url:"https://api.day.app"}},email:{label:"邮件",fields:[{key:"smtp_server",label:"SMTP 服务器",placeholder:"留空则使用「系统设置 → 邮件服务」",optional:!0},{key:"smtp_port",label:"SMTP 端口",type:"number",placeholder:"留空则使用系统设置(如 465)",optional:!0},{key:"email_user",label:"发件邮箱",placeholder:"留空则使用系统设置的发件邮箱",optional:!0},{key:"email_password",label:"邮箱密码或授权码",type:"password",placeholder:"留空则使用系统设置的授权码",optional:!0},{key:"recipient_email",label:"接收邮箱",placeholder:"必填,通知发到这个邮箱"}],defaults:{}},webhook:{label:"Webhook",fields:[{key:"webhook_url",label:"Webhook 地址"},{key:"http_method",label:"请求方法",type:"select",options:["POST","PUT"]},{key:"headers",label:"请求头 JSON",type:"textarea",placeholder:'{"Authorization":"Bearer ..."}',optional:!0}],defaults:{http_method:"POST",headers:"{}"}},wechat:{label:"企业微信",fields:[{key:"webhook_url",label:"机器人 Webhook 地址"}],defaults:{}},telegram:{label:"Telegram",fields:[{key:"bot_token",label:"Bot Token",type:"password"},{key:"chat_id",label:"Chat ID"}],defaults:{}}},re=20,Rt=i=>{var k,x;const r=(x=(k=i==null?void 0:i.response)==null?void 0:k.data)==null?void 0:x.detail;if(r&&typeof r=="object"&&"message"in r){const b=r.message;if(typeof b=="string"&&b.trim())return b.trim()}return typeof r=="string"&&r.trim()?r.trim():i instanceof Error&&i.message?i.message:"测试发送失败,请稍后重试"},oe=i=>i.nickname||i.remark||i.id,T=i=>{if(!i)return"-";const r=new Date(i.includes("T")?i:`${i.replace(" ","T")}Z`);return Number.isNaN(r.getTime())?i:r.toLocaleString("zh-CN")},Wt=({isAdmin:i})=>{const[r,k]=l.useState("channels"),[x,b]=l.useState([]),[A,ce]=l.useState([]),[de,D]=l.useState([]),[Te,g]=l.useState({}),[f,Ae]=l.useState([]),[me,De]=l.useState([]),[C,xe]=l.useState(!0),[Pe,j]=l.useState(!1),[N,pe]=l.useState(null),[P,B]=l.useState("dingtalk"),[O,I]=l.useState(""),[d,p]=l.useState({}),[ue,he]=l.useState(!1),[Be,u]=l.useState(!1),[v,ye]=l.useState(null),[M,q]=l.useState(""),[W,G]=l.useState(""),[z,F]=l.useState(""),[H,h]=l.useState([]),[be,S]=l.useState(!1),[ge,Oe]=l.useState([]),[fe,Ie]=l.useState(0),[U,Me]=l.useState(""),[Z,qe]=l.useState(""),[w,_]=l.useState(0),[J,je]=l.useState(!1),[Ne,We]=l.useState([]),[ve,Ge]=l.useState(""),[R,we]=l.useState(""),[K,ke]=l.useState(!1),m=async()=>{xe(!0);try{const[e,s,a,n]=await Promise.all([dt(),mt(),xt(),pt()]);b(e),ce(s.data),D(a.data),g(c=>{const rt=new Set(a.data.map(Y=>String(Y.id)));return Object.fromEntries(Object.entries(c).filter(([Y])=>rt.has(Y)))}),Ae(n.events),De(n.priorities)}catch(e){o(`加载通知配置失败:${e.message}`)}finally{xe(!1)}};l.useEffect(()=>{m()},[]);const ze=()=>{const e="dingtalk";pe(null),B(e),I(""),p({...y[e].defaults}),j(!0)},Fe=e=>{pe(e),B(e.type),I(e.name),p({...y[e.type].defaults,...e.config}),j(!0)},He=e=>{B(e),p({...y[e].defaults})},Ue=async()=>{he(!0);try{N?await _e(N.id,{name:O,config:d,enabled:N.enabled}):await jt({name:O,type:P,config:d}),j(!1),await m()}catch(e){o(`保存通知渠道失败:${e.message}`)}finally{he(!1)}},Ze=async e=>{try{await _e(e.id,{enabled:!e.enabled}),ce(s=>s.map(a=>a.id===e.id?{...a,enabled:!a.enabled}:a)),e.enabled?D(s=>s.filter(a=>a.channel_id!==Number(e.id))):await m()}catch(s){o(`更新渠道状态失败:${s.message}`)}},Je=async e=>{if(await se(`确认删除通知渠道“${e.name}”?相关账号绑定也会被删除。`))try{await yt(e.id),await m()}catch(s){o(`删除通知渠道失败:${s.message}`)}},Ke=e=>{var s;return((s=f.find(a=>a.id===e))==null?void 0:s.label)||e},Xe=e=>!e.event_types||e.event_types.length===0?"全部事件":e.event_types.map(Ke).join("、"),Qe=me.length>0?me:Array.from(new Set(f.map(e=>e.priority))).map(e=>({id:e,label:e==="critical"?"关键":e==="warning"?"重要":"一般"})),Ve=()=>{var e;ye(null),q(((e=x[0])==null?void 0:e.id)||""),G(""),F(""),h([]),u(!0)},Ye=e=>{ye(e),q(e.cookie_id),G(String(e.channel_id)),F(e.name||""),h(e.event_types||[]),u(!0)},et=e=>{h(s=>s.includes(e)?s.filter(a=>a!==e):[...s,e])},X=e=>{if(e==="all"){h(f.map(s=>s.id));return}if(e==="none"){h([]);return}h(f.filter(s=>s.priority===e).map(s=>s.id))},tt=async()=>{if(v){S(!0);try{await Re(v.id,{name:z.trim(),eventTypes:H}),u(!1),await m()}catch(e){o(`保存通知规则失败:${e.message}`)}finally{S(!1)}return}if(!M||!W){o("请选择账号和通知渠道");return}S(!0);try{await Nt(M,Number(W),!0,{name:z.trim(),eventTypes:H}),u(!1),await m()}catch(e){o(`创建通知规则失败:${e.message}`)}finally{S(!1)}},st=async e=>{try{await Re(e.id,{enabled:!e.enabled}),await m()}catch(s){o(`更新通知规则失败:${s.message}`)}},at=async e=>{const s=String(e.id);g(a=>({...a,[s]:{status:"sending",message:"发送中"}}));try{const a=await bt(e.id),n=`${a.message} · ${a.channel.name}`;g(c=>({...c,[s]:{status:"success",message:n,requestId:a.request_id,sentAt:a.sent_at}})),o(`${n}(请求 ID:${a.request_id})`,"success")}catch(a){const n=Rt(a);g(c=>({...c,[s]:{status:"error",message:n}})),o(`测试发送失败:${n}`,"error")}},lt=async e=>{const s=e.name||e.channel_name;if(await se(`确认删除通知规则“${s}”?`))try{await gt(e.id),D(a=>a.filter(n=>n.id!==e.id)),g(a=>{const n={...a};return delete n[String(e.id)],n})}catch(a){o(`删除通知规则失败:${a.message}`)}},Q=async(e=w)=>{je(!0);try{const s=await ut({cookie_id:U||void 0,processing_status:Z||void 0,limit:re,offset:e*re});Oe(s.data||[]),Ie(s.total||0)}catch(s){o(`加载风控日志失败:${s.message}`)}finally{je(!1)}};l.useEffect(()=>{r==="risk"&&Q()},[r,U,Z,w]);const nt=async e=>{if(await se("确认删除这条风控日志?"))try{const s=await ft(e.id);if(s.success===!1)throw new Error(s.message||"删除失败");await Q()}catch(s){o(`删除风控日志失败:${s.message}`)}},Ce=async()=>{if(i){ke(!0);try{const e=await ht({lines:300,level:ve||void 0,source:R.trim()||void 0});if(!e.success)throw new Error(e.message||"加载失败");We(e.logs||[])}catch(e){o(`加载系统日志失败:${e.message}`)}finally{ke(!1)}}};l.useEffect(()=>{r==="system"&&i&&Ce()},[r]);const V=Math.max(1,Math.ceil(fe/re)),it=[{id:"channels",label:"通知渠道",icon:E},{id:"bindings",label:"账号通知",icon:ae},{id:"risk",label:"风控日志",icon:le},...i?[{id:"system",label:"系统日志",icon:ne}]:[]];return t.jsxs("div",{className:"page-stack animate-fade-in",children:[t.jsx(vt,{title:"通知与日志",description:"统一管理外部通知渠道、账号绑定、风控事件和系统运行日志。",icon:E,actions:t.jsxs("button",{type:"button",onClick:()=>void m(),disabled:C,className:"ios-btn-secondary flex items-center justify-center gap-2 rounded-md px-4 py-2.5 text-sm disabled:opacity-50",children:[t.jsx(ee,{className:`h-4 w-4 ${C?"animate-spin":""}`}),"刷新配置"]})}),t.jsx(wt,{value:r,onChange:k,items:it,ariaLabel:"通知与日志功能"}),r==="channels"&&t.jsxs("section",{className:"section-panel",children:[t.jsx($,{title:"通知渠道",description:"密钥仅用于服务端发送通知,请避免在日志或截图中公开。",icon:E,actions:t.jsxs("button",{type:"button",onClick:ze,className:"ios-btn-primary flex items-center gap-2 rounded-md px-4 py-2.5 text-sm",children:[t.jsx(Ee,{className:"h-4 w-4"}),"新建渠道"]})}),t.jsxs("div",{className:"divide-y divide-gray-100 px-4",children:[A.map(e=>{var s;return t.jsxs("div",{className:"flex flex-col gap-3 py-4 sm:flex-row sm:items-center",children:[t.jsx("button",{type:"button",role:"switch","aria-checked":e.enabled,onClick:()=>void Ze(e),className:`relative h-6 w-11 shrink-0 rounded-full transition-colors ${e.enabled?"bg-[#ffe100]":"bg-gray-300"}`,title:e.enabled?"停用渠道":"启用渠道",children:t.jsx("span",{className:`absolute left-1 top-1 h-4 w-4 rounded-full bg-white transition-transform ${e.enabled?"translate-x-5":""}`})}),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[t.jsx("span",{className:"font-bold text-gray-900",children:e.name}),t.jsx("span",{className:"rounded bg-gray-100 px-2 py-0.5 text-xs font-bold text-gray-600",children:((s=y[e.type])==null?void 0:s.label)||e.type})]}),t.jsxs("p",{className:"mt-1 text-xs text-gray-500",children:[e.enabled?"可用于账号通知":"已停用",e.updated_at?` · 更新于 ${T(e.updated_at)}`:""]})]}),t.jsxs("div",{className:"flex gap-2",children:[t.jsx("button",{type:"button",onClick:()=>Fe(e),title:"编辑渠道",className:"flex h-9 w-9 items-center justify-center rounded-md bg-gray-100 text-gray-700 hover:bg-gray-200",children:t.jsx($e,{className:"h-4 w-4"})}),t.jsx("button",{type:"button",onClick:()=>void Je(e),title:"删除渠道",className:"flex h-9 w-9 items-center justify-center rounded-md bg-red-50 text-red-600 hover:bg-red-100",children:t.jsx(ie,{className:"h-4 w-4"})})]})]},e.id)}),!C&&A.length===0&&t.jsx(L,{compact:!0,title:"暂无通知渠道",description:"新建渠道后可绑定到指定闲鱼账号。",icon:E})]})]}),r==="bindings"&&t.jsxs("section",{className:"section-panel",children:[t.jsx($,{title:"账号通知规则",description:"同一账号可配置多条规则,按事件类型选择要通知的内容;测试发送会真实触达当前渠道。",icon:ae,actions:t.jsxs("button",{type:"button",onClick:Ve,className:"ios-btn-primary flex items-center gap-2 rounded-md px-4 py-2.5 text-sm",children:[t.jsx(Ee,{className:"h-4 w-4"}),"新建规则"]})}),t.jsxs("div",{className:"divide-y divide-gray-100 px-4",children:[de.map(e=>{const s=x.find(c=>c.id===e.cookie_id),a=Te[String(e.id)],n=(a==null?void 0:a.status)==="sending";return t.jsxs("div",{className:"flex flex-col gap-3 py-4 sm:flex-row sm:items-center","aria-busy":n||void 0,children:[t.jsx("button",{type:"button",role:"switch","aria-checked":e.enabled,"aria-label":`${e.name||e.channel_name}通知规则开关`,onClick:()=>void st(e),className:`relative h-6 w-11 shrink-0 rounded-full transition-colors ${e.enabled?"bg-[#ffe100]":"bg-gray-300"}`,title:e.enabled?"暂停规则":"启用规则",children:t.jsx("span",{className:`absolute left-1 top-1 h-4 w-4 rounded-full bg-white transition-transform ${e.enabled?"translate-x-5":""}`})}),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[t.jsx("p",{className:"font-bold text-gray-900",children:e.name||"默认规则"}),t.jsx("span",{className:"rounded bg-gray-100 px-2 py-0.5 text-xs font-bold text-gray-600",children:e.channel_name})]}),t.jsxs("p",{className:"mt-1 text-xs text-gray-500",children:[s?oe(s):e.cookie_id," · ",e.channel_enabled===!1?"渠道已停用":e.enabled?"接收通知":"已暂停"]}),t.jsxs("p",{className:"mt-1 break-words text-xs text-gray-500",children:["通知内容:",Xe(e)]})]}),t.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[t.jsxs("button",{type:"button",onClick:()=>void at(e),disabled:n,"aria-label":`测试发送规则${e.name||e.channel_name}`,title:e.enabled?"向该渠道真实发送一条测试消息":"规则已暂停,仅验证渠道配置",className:"ios-btn-secondary flex min-h-11 items-center gap-1.5 rounded-md px-3 text-xs disabled:cursor-wait disabled:opacity-60",children:[n?t.jsx(te,{className:"h-3.5 w-3.5 animate-spin"}):t.jsx(kt,{className:"h-3.5 w-3.5"}),n?"发送中":"测试发送"]}),t.jsx("button",{type:"button",onClick:()=>Ye(e),title:"编辑规则",className:"flex h-9 w-9 items-center justify-center rounded-md bg-gray-100 text-gray-700 hover:bg-gray-200",children:t.jsx($e,{className:"h-4 w-4"})}),t.jsx("button",{type:"button",onClick:()=>void lt(e),title:"删除规则",className:"flex h-9 w-9 items-center justify-center rounded-md bg-red-50 text-red-600 hover:bg-red-100",children:t.jsx(ie,{className:"h-4 w-4"})}),a&&a.status!=="sending"&&t.jsxs("span",{role:"status",className:`flex max-w-full items-center gap-1 text-xs ${a.status==="success"?"text-emerald-700":"text-red-700"}`,title:a.requestId?`请求 ID:${a.requestId}`:void 0,children:[a.status==="success"?t.jsx(ot,{className:"h-3.5 w-3.5 shrink-0"}):t.jsx(ct,{className:"h-3.5 w-3.5 shrink-0"}),t.jsxs("span",{className:"break-words",children:[a.message,a.sentAt?` · ${T(a.sentAt)}`:""]})]})]})]},e.id)}),!C&&de.length===0&&t.jsx(L,{compact:!0,title:"暂无账号通知规则",description:"先创建并启用通知渠道,再为账号添加通知规则。",icon:ae})]})]}),r==="risk"&&t.jsxs("section",{className:"section-panel",children:[t.jsx($,{title:"发货风控日志",description:"查看发货前拦截、关单、补偿和异常处理结果。",icon:le}),t.jsx("div",{className:"toolbar rounded-none border-x-0 border-t-0 shadow-none",children:t.jsxs("div",{className:"toolbar__group",children:[t.jsxs("select",{value:U,onChange:e=>{Me(e.target.value),_(0)},className:"ios-input rounded-md px-3 py-2.5 text-sm sm:min-w-56",children:[t.jsx("option",{value:"",children:"全部账号"}),x.map(e=>t.jsx("option",{value:e.id,children:oe(e)},e.id))]}),t.jsxs("select",{value:Z,onChange:e=>{qe(e.target.value),_(0)},className:"ios-input rounded-md px-3 py-2.5 text-sm sm:min-w-40",children:[t.jsx("option",{value:"",children:"全部状态"}),t.jsx("option",{value:"processing",children:"处理中"}),t.jsx("option",{value:"success",children:"成功"}),t.jsx("option",{value:"failed",children:"失败"})]}),t.jsxs("button",{type:"button",onClick:()=>void Q(),disabled:J,className:"ios-btn-secondary flex items-center justify-center gap-2 rounded-md px-4 py-2.5 text-sm",children:[t.jsx(ee,{className:`h-4 w-4 ${J?"animate-spin":""}`}),"刷新"]})]})}),t.jsxs("div",{className:"divide-y divide-gray-100 px-4",children:[ge.map(e=>t.jsxs("div",{className:"grid gap-3 py-4 lg:grid-cols-[180px_120px_minmax(0,1fr)_44px] lg:items-start",children:[t.jsxs("div",{children:[t.jsx("p",{className:"break-all text-sm font-bold text-gray-900",children:e.cookie_id}),t.jsx("p",{className:"mt-1 text-xs text-gray-500",children:T(e.created_at)})]}),t.jsxs("div",{children:[t.jsx("span",{className:`inline-flex rounded px-2 py-1 text-xs font-bold ${e.processing_status==="success"?"bg-emerald-50 text-emerald-700":e.processing_status==="failed"?"bg-red-50 text-red-700":"bg-amber-50 text-amber-700"}`,children:e.processing_status==="success"?"成功":e.processing_status==="failed"?"失败":"处理中"}),t.jsx("p",{className:"mt-2 text-xs text-gray-500",children:e.event_type})]}),t.jsxs("div",{className:"min-w-0 text-sm leading-6 text-gray-700",children:[t.jsx("p",{children:e.event_description||e.processing_result||"无详细描述"}),e.processing_result&&e.event_description&&t.jsx("p",{className:"mt-1 text-xs text-gray-500",children:e.processing_result}),e.error_message&&t.jsx("p",{className:"mt-1 break-words text-xs text-red-600",children:e.error_message})]}),t.jsx("button",{type:"button",onClick:()=>void nt(e),title:"删除日志",className:"flex h-9 w-9 items-center justify-center rounded-md bg-red-50 text-red-600 hover:bg-red-100",children:t.jsx(ie,{className:"h-4 w-4"})})]},e.id)),!J&&ge.length===0&&t.jsx(L,{compact:!0,title:"没有符合条件的风控日志",description:"调整账号或状态筛选条件后重新查询。",icon:le})]}),t.jsxs("div",{className:"flex items-center justify-between border-t border-gray-200 px-4 py-3",children:[t.jsxs("p",{className:"text-xs text-gray-500",children:["共 ",fe," 条"]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("button",{type:"button",onClick:()=>_(e=>Math.max(0,e-1)),disabled:w===0,title:"上一页",className:"flex h-9 w-9 items-center justify-center rounded-md bg-gray-100 disabled:opacity-40",children:t.jsx(Ct,{className:"h-4 w-4"})}),t.jsxs("span",{className:"min-w-20 text-center text-sm font-bold",children:[w+1," / ",V]}),t.jsx("button",{type:"button",onClick:()=>_(e=>Math.min(V-1,e+1)),disabled:w+1>=V,title:"下一页",className:"flex h-9 w-9 items-center justify-center rounded-md bg-gray-100 disabled:opacity-40",children:t.jsx(St,{className:"h-4 w-4"})})]})]})]}),r==="system"&&i&&t.jsxs("section",{className:"section-panel",children:[t.jsx($,{title:"系统运行日志",description:"最多读取最近 300 行,可按级别和来源快速定位运行异常。",icon:ne}),t.jsxs("div",{className:"grid gap-3 border-b border-gray-200 bg-gray-50/60 p-4 sm:grid-cols-[160px_minmax(0,1fr)_auto_auto]",children:[t.jsxs("select",{value:ve,onChange:e=>Ge(e.target.value),className:"ios-input rounded-md px-3 py-2.5 text-sm",children:[t.jsx("option",{value:"",children:"全部级别"}),t.jsx("option",{value:"DEBUG",children:"DEBUG"}),t.jsx("option",{value:"INFO",children:"INFO"}),t.jsx("option",{value:"WARNING",children:"WARNING"}),t.jsx("option",{value:"ERROR",children:"ERROR"})]}),t.jsx("input",{value:R,onChange:e=>we(e.target.value),placeholder:"按日志来源筛选",className:"ios-input rounded-md px-3 py-2.5 text-sm"}),t.jsx("button",{type:"button","aria-pressed":R==="logistics_quote",onClick:()=>we(e=>e==="logistics_quote"?"":"logistics_quote"),className:`rounded-md px-3 py-2.5 text-sm font-bold ${R==="logistics_quote"?"bg-[#ffe100] text-gray-900":"bg-white text-gray-700 ring-1 ring-gray-200 hover:bg-gray-100"}`,children:"物流报价"}),t.jsxs("button",{type:"button",onClick:()=>void Ce(),disabled:K,className:"ios-btn-secondary flex items-center justify-center gap-2 rounded-md px-4 py-2.5 text-sm",children:[t.jsx(ee,{className:`h-4 w-4 ${K?"animate-spin":""}`}),"查询"]})]}),t.jsxs("div",{className:"max-h-[620px] divide-y divide-gray-100 overflow-y-auto px-4 font-mono text-xs",children:[[...Ne].reverse().map((e,s)=>t.jsxs("div",{className:"grid gap-2 py-3 lg:grid-cols-[165px_80px_180px_minmax(0,1fr)]",children:[t.jsx("span",{className:"text-gray-500",children:T(e.timestamp)}),t.jsx("span",{className:`font-bold ${e.level==="ERROR"?"text-red-600":e.level==="WARNING"?"text-amber-700":"text-gray-700"}`,children:e.level}),t.jsx("span",{className:"truncate text-gray-500",title:e.source,children:e.source}),t.jsx("span",{className:"break-words text-gray-800",children:e.message})]},`${e.timestamp}-${s}`)),!K&&Ne.length===0&&t.jsx(L,{compact:!0,title:"暂无系统日志",description:"当前筛选条件没有返回运行记录。",icon:ne})]})]}),Pe&&t.jsx("div",{className:"modal-overlay",children:t.jsxs("div",{className:"modal-container max-w-xl",children:[t.jsxs("div",{className:"modal-header flex items-start justify-between gap-4",children:[t.jsxs("div",{children:[t.jsx("h3",{className:"text-lg font-bold text-gray-900",children:N?"编辑通知渠道":"新建通知渠道"}),t.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"配置服务端发送通知所需的连接信息。"})]}),t.jsx("button",{type:"button",onClick:()=>j(!1),title:"关闭",className:"flex h-9 w-9 items-center justify-center rounded-md hover:bg-gray-100",children:t.jsx(Se,{className:"h-5 w-5"})})]}),t.jsxs("div",{className:"modal-body space-y-4",children:[t.jsxs("label",{className:"block text-sm font-bold text-gray-700",children:["渠道名称",t.jsx("input",{value:O,onChange:e=>I(e.target.value),placeholder:"例如:订单告警群",className:"ios-input mt-2 w-full rounded-md px-3 py-2.5 font-normal"})]}),t.jsxs("label",{className:"block text-sm font-bold text-gray-700",children:["渠道类型",t.jsx("select",{value:P,disabled:!!N,onChange:e=>He(e.target.value),className:"ios-input mt-2 w-full rounded-md px-3 py-2.5 font-normal disabled:bg-gray-100",children:Object.entries(y).map(([e,s])=>t.jsx("option",{value:e,children:s.label},e))})]}),y[P].fields.map(e=>{var s;return t.jsxs("label",{className:"block text-sm font-bold text-gray-700",children:[e.label,e.optional?"(可选)":"",e.type==="textarea"?t.jsx("textarea",{value:String(d[e.key]??""),onChange:a=>p({...d,[e.key]:a.target.value}),placeholder:e.placeholder,rows:4,className:"ios-input mt-2 w-full resize-y rounded-md px-3 py-2.5 font-mono text-sm font-normal"}):e.type==="select"?t.jsx("select",{value:String(d[e.key]??""),onChange:a=>p({...d,[e.key]:a.target.value}),className:"ios-input mt-2 w-full rounded-md px-3 py-2.5 font-normal",children:(s=e.options)==null?void 0:s.map(a=>t.jsx("option",{children:a},a))}):t.jsx("input",{type:e.type||"text",value:String(d[e.key]??""),onChange:a=>p({...d,[e.key]:e.type==="number"?Number(a.target.value):a.target.value}),placeholder:e.placeholder,className:"ios-input mt-2 w-full rounded-md px-3 py-2.5 font-normal"})]},e.key)})]}),t.jsxs("div",{className:"modal-footer flex justify-end gap-3",children:[t.jsx("button",{type:"button",onClick:()=>j(!1),className:"ios-btn-secondary rounded-md px-4 py-2.5 text-sm",children:"取消"}),t.jsxs("button",{type:"button",onClick:()=>void Ue(),disabled:ue,className:"ios-btn-primary flex items-center gap-2 rounded-md px-4 py-2.5 text-sm disabled:opacity-50",children:[ue?t.jsx(te,{className:"h-4 w-4 animate-spin"}):t.jsx(Le,{className:"h-4 w-4"}),"保存"]})]})]})}),Be&&t.jsx("div",{className:"modal-overlay",children:t.jsxs("div",{className:"modal-container max-w-2xl",children:[t.jsxs("div",{className:"modal-header flex items-start justify-between gap-4",children:[t.jsxs("div",{children:[t.jsx("h3",{className:"text-lg font-bold text-gray-900",children:v?"编辑通知规则":"新建通知规则"}),t.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"选择这条规则要通知的内容,未勾选任何类型表示订阅全部事件。"})]}),t.jsx("button",{type:"button",onClick:()=>u(!1),title:"关闭",className:"flex h-9 w-9 items-center justify-center rounded-md hover:bg-gray-100",children:t.jsx(Se,{className:"h-5 w-5"})})]}),t.jsxs("div",{className:"modal-body space-y-4",children:[t.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[t.jsxs("label",{className:"block text-sm font-bold text-gray-700",children:["账号",t.jsxs("select",{value:M,disabled:!!v,onChange:e=>q(e.target.value),className:"ios-input mt-2 w-full rounded-md px-3 py-2.5 font-normal disabled:bg-gray-100",children:[t.jsx("option",{value:"",children:"选择账号"}),x.map(e=>t.jsx("option",{value:e.id,children:oe(e)},e.id))]})]}),t.jsxs("label",{className:"block text-sm font-bold text-gray-700",children:["通知渠道",t.jsxs("select",{value:W,disabled:!!v,onChange:e=>G(e.target.value),className:"ios-input mt-2 w-full rounded-md px-3 py-2.5 font-normal disabled:bg-gray-100",children:[t.jsx("option",{value:"",children:"选择已启用渠道"}),A.filter(e=>e.enabled).map(e=>t.jsx("option",{value:e.id,children:e.name},e.id))]})]})]}),t.jsxs("label",{className:"block text-sm font-bold text-gray-700",children:["规则名称(可选)",t.jsx("input",{value:z,onChange:e=>F(e.target.value),placeholder:"例如:仅关键提醒",className:"ios-input mt-2 w-full rounded-md px-3 py-2.5 font-normal"})]}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[t.jsx("span",{className:"text-sm font-bold text-gray-700",children:"通知内容"}),t.jsxs("div",{className:"flex gap-2",children:[t.jsx("button",{type:"button",onClick:()=>X("all"),className:"rounded-md bg-gray-100 px-3 py-1.5 text-xs font-bold text-gray-700 hover:bg-gray-200",children:"全选"}),t.jsx("button",{type:"button",onClick:()=>X("critical"),className:"rounded-md bg-red-50 px-3 py-1.5 text-xs font-bold text-red-700 hover:bg-red-100",children:"仅关键"}),t.jsx("button",{type:"button",onClick:()=>X("none"),className:"rounded-md bg-gray-100 px-3 py-1.5 text-xs font-bold text-gray-700 hover:bg-gray-200",children:"清空"})]})]}),t.jsx("div",{className:"mt-3 space-y-3",children:Qe.map(e=>{const s=f.filter(n=>n.priority===e.id);if(s.length===0)return null;const a=e.id==="critical"?"text-red-700":e.id==="warning"?"text-amber-700":"text-gray-600";return t.jsxs("div",{children:[t.jsx("p",{className:`text-xs font-bold ${a}`,children:e.label}),t.jsx("div",{className:"mt-2 grid gap-2 sm:grid-cols-2",children:s.map(n=>{const c=H.includes(n.id);return t.jsxs("button",{type:"button",onClick:()=>et(n.id),className:`flex items-start gap-2 rounded-md border p-3 text-left transition-colors ${c?"border-[#ffe100] bg-[#fffbe6]":"border-gray-200 bg-white hover:bg-gray-50"}`,children:[t.jsx("span",{className:`mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded border ${c?"border-[#ffe100] bg-[#ffe100]":"border-gray-300 bg-white"}`,children:c&&t.jsx(_t,{className:"h-3 w-3 text-gray-900"})}),t.jsxs("span",{className:"min-w-0",children:[t.jsx("span",{className:"block text-sm font-bold text-gray-900",children:n.label}),t.jsx("span",{className:"mt-0.5 block text-xs text-gray-500",children:n.description})]})]},n.id)})})]},e.id)})}),t.jsx("p",{className:"mt-3 text-xs text-gray-500",children:"未勾选任何类型时接收全部事件;只想收关键提醒可点“仅关键”。"})]})]}),t.jsxs("div",{className:"modal-footer flex justify-end gap-3",children:[t.jsx("button",{type:"button",onClick:()=>u(!1),className:"ios-btn-secondary rounded-md px-4 py-2.5 text-sm",children:"取消"}),t.jsxs("button",{type:"button",onClick:()=>void tt(),disabled:be,className:"ios-btn-primary flex items-center gap-2 rounded-md px-4 py-2.5 text-sm disabled:opacity-50",children:[be?t.jsx(te,{className:"h-4 w-4 animate-spin"}):t.jsx(Le,{className:"h-4 w-4"}),"保存"]})]})]})})]})};export{Wt as default}; +import{r as l,j as t,bc as E,e as ee,L as te,aE as ot,C as ct,X as Se,o as dt,bm as mt,bn as xt,bo as pt,n as o,bp as ut,bq as ht,br as _e,v as se,bs as yt,bt as Re,bu as bt,bv as gt,bw as ft,bx as jt,by as Nt}from"./index-IP-mmLlr.js";import{a as vt,b as wt,S as $,E as L}from"./ui-Fi8l9rTp.js";import{L as ae}from"./link-2-xKkzn7ZQ.js";import{S as le}from"./shield-alert-B8_J0uYT.js";import{A as ne}from"./activity-Dmn-a3S9.js";import{P as Ee}from"./plus-BbnHS2Zx.js";import{P as $e}from"./pen-line-D5rb4QS3.js";import{T as ie}from"./trash-2-BNPsgs2t.js";import{S as kt}from"./send-CwI5w629.js";import{C as Ct,a as St}from"./chevron-right-CbwGgzS_.js";import{S as Le}from"./save-CNiIU-3u.js";import{C as _t}from"./check-D50E5xnW.js";const y={dingtalk:{label:"钉钉",fields:[{key:"webhook_url",label:"Webhook 地址",placeholder:"https://oapi.dingtalk.com/robot/send?..."},{key:"secret",label:"加签密钥",type:"password",optional:!0}],defaults:{}},feishu:{label:"飞书",fields:[{key:"webhook_url",label:"Webhook 地址",placeholder:"https://open.feishu.cn/open-apis/bot/v2/hook/..."},{key:"secret",label:"签名密钥",type:"password",optional:!0}],defaults:{}},bark:{label:"Bark",fields:[{key:"device_key",label:"Device Key",type:"password"},{key:"server_url",label:"服务器地址",placeholder:"https://api.day.app",optional:!0}],defaults:{server_url:"https://api.day.app"}},email:{label:"邮件",fields:[{key:"smtp_server",label:"SMTP 服务器",placeholder:"留空则使用「系统设置 → 邮件服务」",optional:!0},{key:"smtp_port",label:"SMTP 端口",type:"number",placeholder:"留空则使用系统设置(如 465)",optional:!0},{key:"email_user",label:"发件邮箱",placeholder:"留空则使用系统设置的发件邮箱",optional:!0},{key:"email_password",label:"邮箱密码或授权码",type:"password",placeholder:"留空则使用系统设置的授权码",optional:!0},{key:"recipient_email",label:"接收邮箱",placeholder:"必填,通知发到这个邮箱"}],defaults:{}},webhook:{label:"Webhook",fields:[{key:"webhook_url",label:"Webhook 地址"},{key:"http_method",label:"请求方法",type:"select",options:["POST","PUT"]},{key:"headers",label:"请求头 JSON",type:"textarea",placeholder:'{"Authorization":"Bearer ..."}',optional:!0}],defaults:{http_method:"POST",headers:"{}"}},wechat:{label:"企业微信",fields:[{key:"webhook_url",label:"机器人 Webhook 地址"}],defaults:{}},telegram:{label:"Telegram",fields:[{key:"bot_token",label:"Bot Token",type:"password"},{key:"chat_id",label:"Chat ID"}],defaults:{}}},re=20,Rt=i=>{var k,x;const r=(x=(k=i==null?void 0:i.response)==null?void 0:k.data)==null?void 0:x.detail;if(r&&typeof r=="object"&&"message"in r){const b=r.message;if(typeof b=="string"&&b.trim())return b.trim()}return typeof r=="string"&&r.trim()?r.trim():i instanceof Error&&i.message?i.message:"测试发送失败,请稍后重试"},oe=i=>i.nickname||i.remark||i.id,T=i=>{if(!i)return"-";const r=new Date(i.includes("T")?i:`${i.replace(" ","T")}Z`);return Number.isNaN(r.getTime())?i:r.toLocaleString("zh-CN")},Wt=({isAdmin:i})=>{const[r,k]=l.useState("channels"),[x,b]=l.useState([]),[A,ce]=l.useState([]),[de,D]=l.useState([]),[Te,g]=l.useState({}),[f,Ae]=l.useState([]),[me,De]=l.useState([]),[C,xe]=l.useState(!0),[Pe,j]=l.useState(!1),[N,pe]=l.useState(null),[P,B]=l.useState("dingtalk"),[O,I]=l.useState(""),[d,p]=l.useState({}),[ue,he]=l.useState(!1),[Be,u]=l.useState(!1),[v,ye]=l.useState(null),[M,q]=l.useState(""),[W,G]=l.useState(""),[z,F]=l.useState(""),[H,h]=l.useState([]),[be,S]=l.useState(!1),[ge,Oe]=l.useState([]),[fe,Ie]=l.useState(0),[U,Me]=l.useState(""),[Z,qe]=l.useState(""),[w,_]=l.useState(0),[J,je]=l.useState(!1),[Ne,We]=l.useState([]),[ve,Ge]=l.useState(""),[R,we]=l.useState(""),[K,ke]=l.useState(!1),m=async()=>{xe(!0);try{const[e,s,a,n]=await Promise.all([dt(),mt(),xt(),pt()]);b(e),ce(s.data),D(a.data),g(c=>{const rt=new Set(a.data.map(Y=>String(Y.id)));return Object.fromEntries(Object.entries(c).filter(([Y])=>rt.has(Y)))}),Ae(n.events),De(n.priorities)}catch(e){o(`加载通知配置失败:${e.message}`)}finally{xe(!1)}};l.useEffect(()=>{m()},[]);const ze=()=>{const e="dingtalk";pe(null),B(e),I(""),p({...y[e].defaults}),j(!0)},Fe=e=>{pe(e),B(e.type),I(e.name),p({...y[e.type].defaults,...e.config}),j(!0)},He=e=>{B(e),p({...y[e].defaults})},Ue=async()=>{he(!0);try{N?await _e(N.id,{name:O,config:d,enabled:N.enabled}):await jt({name:O,type:P,config:d}),j(!1),await m()}catch(e){o(`保存通知渠道失败:${e.message}`)}finally{he(!1)}},Ze=async e=>{try{await _e(e.id,{enabled:!e.enabled}),ce(s=>s.map(a=>a.id===e.id?{...a,enabled:!a.enabled}:a)),e.enabled?D(s=>s.filter(a=>a.channel_id!==Number(e.id))):await m()}catch(s){o(`更新渠道状态失败:${s.message}`)}},Je=async e=>{if(await se(`确认删除通知渠道“${e.name}”?相关账号绑定也会被删除。`))try{await yt(e.id),await m()}catch(s){o(`删除通知渠道失败:${s.message}`)}},Ke=e=>{var s;return((s=f.find(a=>a.id===e))==null?void 0:s.label)||e},Xe=e=>!e.event_types||e.event_types.length===0?"全部事件":e.event_types.map(Ke).join("、"),Qe=me.length>0?me:Array.from(new Set(f.map(e=>e.priority))).map(e=>({id:e,label:e==="critical"?"关键":e==="warning"?"重要":"一般"})),Ve=()=>{var e;ye(null),q(((e=x[0])==null?void 0:e.id)||""),G(""),F(""),h([]),u(!0)},Ye=e=>{ye(e),q(e.cookie_id),G(String(e.channel_id)),F(e.name||""),h(e.event_types||[]),u(!0)},et=e=>{h(s=>s.includes(e)?s.filter(a=>a!==e):[...s,e])},X=e=>{if(e==="all"){h(f.map(s=>s.id));return}if(e==="none"){h([]);return}h(f.filter(s=>s.priority===e).map(s=>s.id))},tt=async()=>{if(v){S(!0);try{await Re(v.id,{name:z.trim(),eventTypes:H}),u(!1),await m()}catch(e){o(`保存通知规则失败:${e.message}`)}finally{S(!1)}return}if(!M||!W){o("请选择账号和通知渠道");return}S(!0);try{await Nt(M,Number(W),!0,{name:z.trim(),eventTypes:H}),u(!1),await m()}catch(e){o(`创建通知规则失败:${e.message}`)}finally{S(!1)}},st=async e=>{try{await Re(e.id,{enabled:!e.enabled}),await m()}catch(s){o(`更新通知规则失败:${s.message}`)}},at=async e=>{const s=String(e.id);g(a=>({...a,[s]:{status:"sending",message:"发送中"}}));try{const a=await bt(e.id),n=`${a.message} · ${a.channel.name}`;g(c=>({...c,[s]:{status:"success",message:n,requestId:a.request_id,sentAt:a.sent_at}})),o(`${n}(请求 ID:${a.request_id})`,"success")}catch(a){const n=Rt(a);g(c=>({...c,[s]:{status:"error",message:n}})),o(`测试发送失败:${n}`,"error")}},lt=async e=>{const s=e.name||e.channel_name;if(await se(`确认删除通知规则“${s}”?`))try{await gt(e.id),D(a=>a.filter(n=>n.id!==e.id)),g(a=>{const n={...a};return delete n[String(e.id)],n})}catch(a){o(`删除通知规则失败:${a.message}`)}},Q=async(e=w)=>{je(!0);try{const s=await ut({cookie_id:U||void 0,processing_status:Z||void 0,limit:re,offset:e*re});Oe(s.data||[]),Ie(s.total||0)}catch(s){o(`加载风控日志失败:${s.message}`)}finally{je(!1)}};l.useEffect(()=>{r==="risk"&&Q()},[r,U,Z,w]);const nt=async e=>{if(await se("确认删除这条风控日志?"))try{const s=await ft(e.id);if(s.success===!1)throw new Error(s.message||"删除失败");await Q()}catch(s){o(`删除风控日志失败:${s.message}`)}},Ce=async()=>{if(i){ke(!0);try{const e=await ht({lines:300,level:ve||void 0,source:R.trim()||void 0});if(!e.success)throw new Error(e.message||"加载失败");We(e.logs||[])}catch(e){o(`加载系统日志失败:${e.message}`)}finally{ke(!1)}}};l.useEffect(()=>{r==="system"&&i&&Ce()},[r]);const V=Math.max(1,Math.ceil(fe/re)),it=[{id:"channels",label:"通知渠道",icon:E},{id:"bindings",label:"账号通知",icon:ae},{id:"risk",label:"风控日志",icon:le},...i?[{id:"system",label:"系统日志",icon:ne}]:[]];return t.jsxs("div",{className:"page-stack animate-fade-in",children:[t.jsx(vt,{title:"通知与日志",description:"统一管理外部通知渠道、账号绑定、风控事件和系统运行日志。",icon:E,actions:t.jsxs("button",{type:"button",onClick:()=>void m(),disabled:C,className:"ios-btn-secondary flex items-center justify-center gap-2 rounded-md px-4 py-2.5 text-sm disabled:opacity-50",children:[t.jsx(ee,{className:`h-4 w-4 ${C?"animate-spin":""}`}),"刷新配置"]})}),t.jsx(wt,{value:r,onChange:k,items:it,ariaLabel:"通知与日志功能"}),r==="channels"&&t.jsxs("section",{className:"section-panel",children:[t.jsx($,{title:"通知渠道",description:"密钥仅用于服务端发送通知,请避免在日志或截图中公开。",icon:E,actions:t.jsxs("button",{type:"button",onClick:ze,className:"ios-btn-primary flex items-center gap-2 rounded-md px-4 py-2.5 text-sm",children:[t.jsx(Ee,{className:"h-4 w-4"}),"新建渠道"]})}),t.jsxs("div",{className:"divide-y divide-gray-100 px-4",children:[A.map(e=>{var s;return t.jsxs("div",{className:"flex flex-col gap-3 py-4 sm:flex-row sm:items-center",children:[t.jsx("button",{type:"button",role:"switch","aria-checked":e.enabled,onClick:()=>void Ze(e),className:`relative h-6 w-11 shrink-0 rounded-full transition-colors ${e.enabled?"bg-[#ffe100]":"bg-gray-300"}`,title:e.enabled?"停用渠道":"启用渠道",children:t.jsx("span",{className:`absolute left-1 top-1 h-4 w-4 rounded-full bg-white transition-transform ${e.enabled?"translate-x-5":""}`})}),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[t.jsx("span",{className:"font-bold text-gray-900",children:e.name}),t.jsx("span",{className:"rounded bg-gray-100 px-2 py-0.5 text-xs font-bold text-gray-600",children:((s=y[e.type])==null?void 0:s.label)||e.type})]}),t.jsxs("p",{className:"mt-1 text-xs text-gray-500",children:[e.enabled?"可用于账号通知":"已停用",e.updated_at?` · 更新于 ${T(e.updated_at)}`:""]})]}),t.jsxs("div",{className:"flex gap-2",children:[t.jsx("button",{type:"button",onClick:()=>Fe(e),title:"编辑渠道",className:"flex h-9 w-9 items-center justify-center rounded-md bg-gray-100 text-gray-700 hover:bg-gray-200",children:t.jsx($e,{className:"h-4 w-4"})}),t.jsx("button",{type:"button",onClick:()=>void Je(e),title:"删除渠道",className:"flex h-9 w-9 items-center justify-center rounded-md bg-red-50 text-red-600 hover:bg-red-100",children:t.jsx(ie,{className:"h-4 w-4"})})]})]},e.id)}),!C&&A.length===0&&t.jsx(L,{compact:!0,title:"暂无通知渠道",description:"新建渠道后可绑定到指定闲鱼账号。",icon:E})]})]}),r==="bindings"&&t.jsxs("section",{className:"section-panel",children:[t.jsx($,{title:"账号通知规则",description:"同一账号可配置多条规则,按事件类型选择要通知的内容;测试发送会真实触达当前渠道。",icon:ae,actions:t.jsxs("button",{type:"button",onClick:Ve,className:"ios-btn-primary flex items-center gap-2 rounded-md px-4 py-2.5 text-sm",children:[t.jsx(Ee,{className:"h-4 w-4"}),"新建规则"]})}),t.jsxs("div",{className:"divide-y divide-gray-100 px-4",children:[de.map(e=>{const s=x.find(c=>c.id===e.cookie_id),a=Te[String(e.id)],n=(a==null?void 0:a.status)==="sending";return t.jsxs("div",{className:"flex flex-col gap-3 py-4 sm:flex-row sm:items-center","aria-busy":n||void 0,children:[t.jsx("button",{type:"button",role:"switch","aria-checked":e.enabled,"aria-label":`${e.name||e.channel_name}通知规则开关`,onClick:()=>void st(e),className:`relative h-6 w-11 shrink-0 rounded-full transition-colors ${e.enabled?"bg-[#ffe100]":"bg-gray-300"}`,title:e.enabled?"暂停规则":"启用规则",children:t.jsx("span",{className:`absolute left-1 top-1 h-4 w-4 rounded-full bg-white transition-transform ${e.enabled?"translate-x-5":""}`})}),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[t.jsx("p",{className:"font-bold text-gray-900",children:e.name||"默认规则"}),t.jsx("span",{className:"rounded bg-gray-100 px-2 py-0.5 text-xs font-bold text-gray-600",children:e.channel_name})]}),t.jsxs("p",{className:"mt-1 text-xs text-gray-500",children:[s?oe(s):e.cookie_id," · ",e.channel_enabled===!1?"渠道已停用":e.enabled?"接收通知":"已暂停"]}),t.jsxs("p",{className:"mt-1 break-words text-xs text-gray-500",children:["通知内容:",Xe(e)]})]}),t.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[t.jsxs("button",{type:"button",onClick:()=>void at(e),disabled:n,"aria-label":`测试发送规则${e.name||e.channel_name}`,title:e.enabled?"向该渠道真实发送一条测试消息":"规则已暂停,仅验证渠道配置",className:"ios-btn-secondary flex min-h-11 items-center gap-1.5 rounded-md px-3 text-xs disabled:cursor-wait disabled:opacity-60",children:[n?t.jsx(te,{className:"h-3.5 w-3.5 animate-spin"}):t.jsx(kt,{className:"h-3.5 w-3.5"}),n?"发送中":"测试发送"]}),t.jsx("button",{type:"button",onClick:()=>Ye(e),title:"编辑规则",className:"flex h-9 w-9 items-center justify-center rounded-md bg-gray-100 text-gray-700 hover:bg-gray-200",children:t.jsx($e,{className:"h-4 w-4"})}),t.jsx("button",{type:"button",onClick:()=>void lt(e),title:"删除规则",className:"flex h-9 w-9 items-center justify-center rounded-md bg-red-50 text-red-600 hover:bg-red-100",children:t.jsx(ie,{className:"h-4 w-4"})}),a&&a.status!=="sending"&&t.jsxs("span",{role:"status",className:`flex max-w-full items-center gap-1 text-xs ${a.status==="success"?"text-emerald-700":"text-red-700"}`,title:a.requestId?`请求 ID:${a.requestId}`:void 0,children:[a.status==="success"?t.jsx(ot,{className:"h-3.5 w-3.5 shrink-0"}):t.jsx(ct,{className:"h-3.5 w-3.5 shrink-0"}),t.jsxs("span",{className:"break-words",children:[a.message,a.sentAt?` · ${T(a.sentAt)}`:""]})]})]})]},e.id)}),!C&&de.length===0&&t.jsx(L,{compact:!0,title:"暂无账号通知规则",description:"先创建并启用通知渠道,再为账号添加通知规则。",icon:ae})]})]}),r==="risk"&&t.jsxs("section",{className:"section-panel",children:[t.jsx($,{title:"发货风控日志",description:"查看发货前拦截、关单、补偿和异常处理结果。",icon:le}),t.jsx("div",{className:"toolbar rounded-none border-x-0 border-t-0 shadow-none",children:t.jsxs("div",{className:"toolbar__group",children:[t.jsxs("select",{value:U,onChange:e=>{Me(e.target.value),_(0)},className:"ios-input rounded-md px-3 py-2.5 text-sm sm:min-w-56",children:[t.jsx("option",{value:"",children:"全部账号"}),x.map(e=>t.jsx("option",{value:e.id,children:oe(e)},e.id))]}),t.jsxs("select",{value:Z,onChange:e=>{qe(e.target.value),_(0)},className:"ios-input rounded-md px-3 py-2.5 text-sm sm:min-w-40",children:[t.jsx("option",{value:"",children:"全部状态"}),t.jsx("option",{value:"processing",children:"处理中"}),t.jsx("option",{value:"success",children:"成功"}),t.jsx("option",{value:"failed",children:"失败"})]}),t.jsxs("button",{type:"button",onClick:()=>void Q(),disabled:J,className:"ios-btn-secondary flex items-center justify-center gap-2 rounded-md px-4 py-2.5 text-sm",children:[t.jsx(ee,{className:`h-4 w-4 ${J?"animate-spin":""}`}),"刷新"]})]})}),t.jsxs("div",{className:"divide-y divide-gray-100 px-4",children:[ge.map(e=>t.jsxs("div",{className:"grid gap-3 py-4 lg:grid-cols-[180px_120px_minmax(0,1fr)_44px] lg:items-start",children:[t.jsxs("div",{children:[t.jsx("p",{className:"break-all text-sm font-bold text-gray-900",children:e.cookie_id}),t.jsx("p",{className:"mt-1 text-xs text-gray-500",children:T(e.created_at)})]}),t.jsxs("div",{children:[t.jsx("span",{className:`inline-flex rounded px-2 py-1 text-xs font-bold ${e.processing_status==="success"?"bg-emerald-50 text-emerald-700":e.processing_status==="failed"?"bg-red-50 text-red-700":"bg-amber-50 text-amber-700"}`,children:e.processing_status==="success"?"成功":e.processing_status==="failed"?"失败":"处理中"}),t.jsx("p",{className:"mt-2 text-xs text-gray-500",children:e.event_type})]}),t.jsxs("div",{className:"min-w-0 text-sm leading-6 text-gray-700",children:[t.jsx("p",{children:e.event_description||e.processing_result||"无详细描述"}),e.processing_result&&e.event_description&&t.jsx("p",{className:"mt-1 text-xs text-gray-500",children:e.processing_result}),e.error_message&&t.jsx("p",{className:"mt-1 break-words text-xs text-red-600",children:e.error_message})]}),t.jsx("button",{type:"button",onClick:()=>void nt(e),title:"删除日志",className:"flex h-9 w-9 items-center justify-center rounded-md bg-red-50 text-red-600 hover:bg-red-100",children:t.jsx(ie,{className:"h-4 w-4"})})]},e.id)),!J&&ge.length===0&&t.jsx(L,{compact:!0,title:"没有符合条件的风控日志",description:"调整账号或状态筛选条件后重新查询。",icon:le})]}),t.jsxs("div",{className:"flex items-center justify-between border-t border-gray-200 px-4 py-3",children:[t.jsxs("p",{className:"text-xs text-gray-500",children:["共 ",fe," 条"]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("button",{type:"button",onClick:()=>_(e=>Math.max(0,e-1)),disabled:w===0,title:"上一页",className:"flex h-9 w-9 items-center justify-center rounded-md bg-gray-100 disabled:opacity-40",children:t.jsx(Ct,{className:"h-4 w-4"})}),t.jsxs("span",{className:"min-w-20 text-center text-sm font-bold",children:[w+1," / ",V]}),t.jsx("button",{type:"button",onClick:()=>_(e=>Math.min(V-1,e+1)),disabled:w+1>=V,title:"下一页",className:"flex h-9 w-9 items-center justify-center rounded-md bg-gray-100 disabled:opacity-40",children:t.jsx(St,{className:"h-4 w-4"})})]})]})]}),r==="system"&&i&&t.jsxs("section",{className:"section-panel",children:[t.jsx($,{title:"系统运行日志",description:"最多读取最近 300 行,可按级别和来源快速定位运行异常。",icon:ne}),t.jsxs("div",{className:"grid gap-3 border-b border-gray-200 bg-gray-50/60 p-4 sm:grid-cols-[160px_minmax(0,1fr)_auto_auto]",children:[t.jsxs("select",{value:ve,onChange:e=>Ge(e.target.value),className:"ios-input rounded-md px-3 py-2.5 text-sm",children:[t.jsx("option",{value:"",children:"全部级别"}),t.jsx("option",{value:"DEBUG",children:"DEBUG"}),t.jsx("option",{value:"INFO",children:"INFO"}),t.jsx("option",{value:"WARNING",children:"WARNING"}),t.jsx("option",{value:"ERROR",children:"ERROR"})]}),t.jsx("input",{value:R,onChange:e=>we(e.target.value),placeholder:"按日志来源筛选",className:"ios-input rounded-md px-3 py-2.5 text-sm"}),t.jsx("button",{type:"button","aria-pressed":R==="logistics_quote",onClick:()=>we(e=>e==="logistics_quote"?"":"logistics_quote"),className:`rounded-md px-3 py-2.5 text-sm font-bold ${R==="logistics_quote"?"bg-[#ffe100] text-gray-900":"bg-white text-gray-700 ring-1 ring-gray-200 hover:bg-gray-100"}`,children:"物流报价"}),t.jsxs("button",{type:"button",onClick:()=>void Ce(),disabled:K,className:"ios-btn-secondary flex items-center justify-center gap-2 rounded-md px-4 py-2.5 text-sm",children:[t.jsx(ee,{className:`h-4 w-4 ${K?"animate-spin":""}`}),"查询"]})]}),t.jsxs("div",{className:"max-h-[620px] divide-y divide-gray-100 overflow-y-auto px-4 font-mono text-xs",children:[[...Ne].reverse().map((e,s)=>t.jsxs("div",{className:"grid gap-2 py-3 lg:grid-cols-[165px_80px_180px_minmax(0,1fr)]",children:[t.jsx("span",{className:"text-gray-500",children:T(e.timestamp)}),t.jsx("span",{className:`font-bold ${e.level==="ERROR"?"text-red-600":e.level==="WARNING"?"text-amber-700":"text-gray-700"}`,children:e.level}),t.jsx("span",{className:"truncate text-gray-500",title:e.source,children:e.source}),t.jsx("span",{className:"break-words text-gray-800",children:e.message})]},`${e.timestamp}-${s}`)),!K&&Ne.length===0&&t.jsx(L,{compact:!0,title:"暂无系统日志",description:"当前筛选条件没有返回运行记录。",icon:ne})]})]}),Pe&&t.jsx("div",{className:"modal-overlay",children:t.jsxs("div",{className:"modal-container max-w-xl",children:[t.jsxs("div",{className:"modal-header flex items-start justify-between gap-4",children:[t.jsxs("div",{children:[t.jsx("h3",{className:"text-lg font-bold text-gray-900",children:N?"编辑通知渠道":"新建通知渠道"}),t.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"配置服务端发送通知所需的连接信息。"})]}),t.jsx("button",{type:"button",onClick:()=>j(!1),title:"关闭",className:"flex h-9 w-9 items-center justify-center rounded-md hover:bg-gray-100",children:t.jsx(Se,{className:"h-5 w-5"})})]}),t.jsxs("div",{className:"modal-body space-y-4",children:[t.jsxs("label",{className:"block text-sm font-bold text-gray-700",children:["渠道名称",t.jsx("input",{value:O,onChange:e=>I(e.target.value),placeholder:"例如:订单告警群",className:"ios-input mt-2 w-full rounded-md px-3 py-2.5 font-normal"})]}),t.jsxs("label",{className:"block text-sm font-bold text-gray-700",children:["渠道类型",t.jsx("select",{value:P,disabled:!!N,onChange:e=>He(e.target.value),className:"ios-input mt-2 w-full rounded-md px-3 py-2.5 font-normal disabled:bg-gray-100",children:Object.entries(y).map(([e,s])=>t.jsx("option",{value:e,children:s.label},e))})]}),y[P].fields.map(e=>{var s;return t.jsxs("label",{className:"block text-sm font-bold text-gray-700",children:[e.label,e.optional?"(可选)":"",e.type==="textarea"?t.jsx("textarea",{value:String(d[e.key]??""),onChange:a=>p({...d,[e.key]:a.target.value}),placeholder:e.placeholder,rows:4,className:"ios-input mt-2 w-full resize-y rounded-md px-3 py-2.5 font-mono text-sm font-normal"}):e.type==="select"?t.jsx("select",{value:String(d[e.key]??""),onChange:a=>p({...d,[e.key]:a.target.value}),className:"ios-input mt-2 w-full rounded-md px-3 py-2.5 font-normal",children:(s=e.options)==null?void 0:s.map(a=>t.jsx("option",{children:a},a))}):t.jsx("input",{type:e.type||"text",value:String(d[e.key]??""),onChange:a=>p({...d,[e.key]:e.type==="number"?Number(a.target.value):a.target.value}),placeholder:e.placeholder,className:"ios-input mt-2 w-full rounded-md px-3 py-2.5 font-normal"})]},e.key)})]}),t.jsxs("div",{className:"modal-footer flex justify-end gap-3",children:[t.jsx("button",{type:"button",onClick:()=>j(!1),className:"ios-btn-secondary rounded-md px-4 py-2.5 text-sm",children:"取消"}),t.jsxs("button",{type:"button",onClick:()=>void Ue(),disabled:ue,className:"ios-btn-primary flex items-center gap-2 rounded-md px-4 py-2.5 text-sm disabled:opacity-50",children:[ue?t.jsx(te,{className:"h-4 w-4 animate-spin"}):t.jsx(Le,{className:"h-4 w-4"}),"保存"]})]})]})}),Be&&t.jsx("div",{className:"modal-overlay",children:t.jsxs("div",{className:"modal-container max-w-2xl",children:[t.jsxs("div",{className:"modal-header flex items-start justify-between gap-4",children:[t.jsxs("div",{children:[t.jsx("h3",{className:"text-lg font-bold text-gray-900",children:v?"编辑通知规则":"新建通知规则"}),t.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"选择这条规则要通知的内容,未勾选任何类型表示订阅全部事件。"})]}),t.jsx("button",{type:"button",onClick:()=>u(!1),title:"关闭",className:"flex h-9 w-9 items-center justify-center rounded-md hover:bg-gray-100",children:t.jsx(Se,{className:"h-5 w-5"})})]}),t.jsxs("div",{className:"modal-body space-y-4",children:[t.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[t.jsxs("label",{className:"block text-sm font-bold text-gray-700",children:["账号",t.jsxs("select",{value:M,disabled:!!v,onChange:e=>q(e.target.value),className:"ios-input mt-2 w-full rounded-md px-3 py-2.5 font-normal disabled:bg-gray-100",children:[t.jsx("option",{value:"",children:"选择账号"}),x.map(e=>t.jsx("option",{value:e.id,children:oe(e)},e.id))]})]}),t.jsxs("label",{className:"block text-sm font-bold text-gray-700",children:["通知渠道",t.jsxs("select",{value:W,disabled:!!v,onChange:e=>G(e.target.value),className:"ios-input mt-2 w-full rounded-md px-3 py-2.5 font-normal disabled:bg-gray-100",children:[t.jsx("option",{value:"",children:"选择已启用渠道"}),A.filter(e=>e.enabled).map(e=>t.jsx("option",{value:e.id,children:e.name},e.id))]})]})]}),t.jsxs("label",{className:"block text-sm font-bold text-gray-700",children:["规则名称(可选)",t.jsx("input",{value:z,onChange:e=>F(e.target.value),placeholder:"例如:仅关键提醒",className:"ios-input mt-2 w-full rounded-md px-3 py-2.5 font-normal"})]}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[t.jsx("span",{className:"text-sm font-bold text-gray-700",children:"通知内容"}),t.jsxs("div",{className:"flex gap-2",children:[t.jsx("button",{type:"button",onClick:()=>X("all"),className:"rounded-md bg-gray-100 px-3 py-1.5 text-xs font-bold text-gray-700 hover:bg-gray-200",children:"全选"}),t.jsx("button",{type:"button",onClick:()=>X("critical"),className:"rounded-md bg-red-50 px-3 py-1.5 text-xs font-bold text-red-700 hover:bg-red-100",children:"仅关键"}),t.jsx("button",{type:"button",onClick:()=>X("none"),className:"rounded-md bg-gray-100 px-3 py-1.5 text-xs font-bold text-gray-700 hover:bg-gray-200",children:"清空"})]})]}),t.jsx("div",{className:"mt-3 space-y-3",children:Qe.map(e=>{const s=f.filter(n=>n.priority===e.id);if(s.length===0)return null;const a=e.id==="critical"?"text-red-700":e.id==="warning"?"text-amber-700":"text-gray-600";return t.jsxs("div",{children:[t.jsx("p",{className:`text-xs font-bold ${a}`,children:e.label}),t.jsx("div",{className:"mt-2 grid gap-2 sm:grid-cols-2",children:s.map(n=>{const c=H.includes(n.id);return t.jsxs("button",{type:"button",onClick:()=>et(n.id),className:`flex items-start gap-2 rounded-md border p-3 text-left transition-colors ${c?"border-[#ffe100] bg-[#fffbe6]":"border-gray-200 bg-white hover:bg-gray-50"}`,children:[t.jsx("span",{className:`mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded border ${c?"border-[#ffe100] bg-[#ffe100]":"border-gray-300 bg-white"}`,children:c&&t.jsx(_t,{className:"h-3 w-3 text-gray-900"})}),t.jsxs("span",{className:"min-w-0",children:[t.jsx("span",{className:"block text-sm font-bold text-gray-900",children:n.label}),t.jsx("span",{className:"mt-0.5 block text-xs text-gray-500",children:n.description})]})]},n.id)})})]},e.id)})}),t.jsx("p",{className:"mt-3 text-xs text-gray-500",children:"未勾选任何类型时接收全部事件;只想收关键提醒可点“仅关键”。"})]})]}),t.jsxs("div",{className:"modal-footer flex justify-end gap-3",children:[t.jsx("button",{type:"button",onClick:()=>u(!1),className:"ios-btn-secondary rounded-md px-4 py-2.5 text-sm",children:"取消"}),t.jsxs("button",{type:"button",onClick:()=>void tt(),disabled:be,className:"ios-btn-primary flex items-center gap-2 rounded-md px-4 py-2.5 text-sm disabled:opacity-50",children:[be?t.jsx(te,{className:"h-4 w-4 animate-spin"}):t.jsx(Le,{className:"h-4 w-4"}),"保存"]})]})]})})]})};export{Wt as default}; diff --git a/static/assets/OrderList-C360pT64.js b/static/assets/OrderList-CL0--ZMt.js similarity index 98% rename from static/assets/OrderList-C360pT64.js rename to static/assets/OrderList-CL0--ZMt.js index 3f7c562..c3e329a 100644 --- a/static/assets/OrderList-C360pT64.js +++ b/static/assets/OrderList-CL0--ZMt.js @@ -1,4 +1,4 @@ -import{c as Re,r as l,h as ys,O as js,j as e,e as $,P as fs,E as vs,Q as Ns,b as N,X as _,o as _s,T as ws,V as Me,W as ks,Y as Ss,n,Z as Cs,v as Pe,_ as Os,$ as Es,a0 as Ls,a1 as Is,a2 as Ms,a3 as Ps,a4 as Ds,a5 as Fs}from"./index-BtyeumGM.js";import{a as As,b as $s,E as Rs}from"./ui-Bucd7ZQW.js";import{P as qs}from"./plus-D66LUkyr.js";import{T as De}from"./truck-DFAp5vTR.js";import{S as Ts}from"./search-Dm0kd19J.js";import{P as Y}from"./package-check-OgTe2cXI.js";import{F as zs}from"./flower-2-f7YOZRab.js";import{E as Vs}from"./eye-C6bcwqAG.js";import{S as Hs}from"./square-pen-C7b8tolk.js";import{T as Js}from"./trash-2-Cpz1crux.js";import{C as Ws,a as Bs}from"./chevron-right-OUn6lLjt.js";import{S as Fe}from"./save-B_0bwRwJ.js";/** +import{c as Re,r as l,h as ys,O as js,j as e,e as $,P as fs,E as vs,Q as Ns,b as N,X as _,o as _s,T as ws,V as Me,W as ks,Y as Ss,n,Z as Cs,v as Pe,_ as Os,$ as Es,a0 as Ls,a1 as Is,a2 as Ms,a3 as Ps,a4 as Ds,a5 as Fs}from"./index-IP-mmLlr.js";import{a as As,b as $s,E as Rs}from"./ui-Fi8l9rTp.js";import{P as qs}from"./plus-BbnHS2Zx.js";import{T as De}from"./truck-CrexfDE5.js";import{S as Ts}from"./search-TGrYyOkD.js";import{P as Y}from"./package-check-OAWoRoy_.js";import{F as zs}from"./flower-2-fqYsfuSn.js";import{E as Vs}from"./eye-BxUVYll7.js";import{S as Hs}from"./square-pen-ZPivfDGR.js";import{T as Js}from"./trash-2-BNPsgs2t.js";import{C as Ws,a as Bs}from"./chevron-right-CbwGgzS_.js";import{S as Fe}from"./save-CNiIU-3u.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/PeerShops--FPB0l6-.js b/static/assets/PeerShops--FPB0l6-.js new file mode 100644 index 0000000..1b300e2 --- /dev/null +++ b/static/assets/PeerShops--FPB0l6-.js @@ -0,0 +1 @@ +import{r as c,bQ as T,o as V,bR as q,bS as G,j as e,bT as D,L as k,e as J,E as W}from"./index-IP-mmLlr.js";import{P as X,a as Z,N as ee,E as K}from"./ui-Fi8l9rTp.js";import{S as O}from"./sparkles-CavN45fA.js";import{T as te}from"./trending-up-BcW73Gjl.js";const se=2500,re=[{id:"sold",label:"按销量"},{id:"similarity",label:"按相似度"},{id:"credit",label:"按信用"},{id:"reviews",label:"按评论数"}],B=n=>!n||n<0?"0":n>=1e4?`${(n/1e4).toFixed(1).replace(/\.0$/,"")}万`:String(n),ae=n=>{if(!n)return"—";const o=Date.now()-n*1e3;if(o<6e4)return"刚刚";if(o<36e5)return`${Math.floor(o/6e4)}分钟前`;if(o<864e5)return`${Math.floor(o/36e5)}小时前`;if(o<7*864e5)return`${Math.floor(o/864e5)}天前`;const d=new Date(n*1e3);return`${d.getMonth()+1}月${d.getDate()}日`},Y=({value:n,max:o=100,suffix:d=""})=>{const j=o>0?n/o:0,r=j>=.7?"bg-emerald-100 text-emerald-700":j>=.4?"bg-sky-100 text-sky-700":"bg-[var(--surface-subtle)] text-[var(--text-soft)]";return e.jsxs("span",{className:`inline-flex min-w-[3rem] justify-center rounded-full px-2 py-0.5 text-xs font-semibold ${r}`,children:[n,d]})},le=({level:n,fallback:o})=>n?e.jsxs("span",{className:"inline-flex items-center gap-1 text-xs font-medium text-amber-600",title:`信用等级 ${n} 级`,children:["★".repeat(n),e.jsxs("span",{className:"text-[var(--text-soft)] font-normal",children:[n,"级"]})]}):e.jsx("span",{className:"text-xs text-[var(--text-soft)]",title:o,children:o||"—"}),de=()=>{var M,L,P,R;const[n,o]=c.useState(!0),[d,j]=c.useState(""),[r,S]=c.useState(null),[f,y]=c.useState(!1),[x,b]=c.useState(null),[w,z]=c.useState("sold"),[v,m]=c.useState(null),[$,A]=c.useState(""),[I,F]=c.useState(""),[h,C]=c.useState(!1),u=c.useRef(null),_=c.useCallback(()=>{u.current&&(clearInterval(u.current),u.current=null),y(!1),b(null)},[]),E=c.useCallback(async t=>{var i,s,a,g;try{const l=await T(t);l.data&&S(l.data),l.refreshing&&(y(!0),b({done:((i=l.progress)==null?void 0:i.done)??0,total:((s=l.progress)==null?void 0:s.total)??0,stage:((a=l.progress)==null?void 0:a.stage)||"抓取中"})),((g=l.progress)==null?void 0:g.state)==="error"&&l.progress.error&&m({type:"error",message:l.progress.error})}catch(l){console.error("加载同行店铺失败:",l)}},[]);c.useEffect(()=>{let t=!0;return(async()=>{try{const s=(await V())[0];if(!t)return;if(!s){m({type:"info",message:"请先在「账号管理」添加账号并同步商品,再回到本页。"}),o(!1);return}j(s.id),await E(s.id)}catch(i){console.error("初始化同行店铺失败:",i)}finally{t&&o(!1)}})(),()=>{t=!1,u.current&&clearInterval(u.current)}},[E]),c.useEffect(()=>{if(!(!f||!d))return u.current=setInterval(async()=>{var t,i,s,a,g;try{const l=await T(d);b({done:((t=l.progress)==null?void 0:t.done)??0,total:((i=l.progress)==null?void 0:i.total)??0,stage:((s=l.progress)==null?void 0:s.stage)||"抓取中"}),((a=l.progress)==null?void 0:a.state)==="done"?(_(),l.data&&S(l.data),m({type:"success",message:"同行店铺数据已更新。"})):((g=l.progress)==null?void 0:g.state)==="error"&&(_(),m({type:"error",message:l.progress.error||"抓取失败,请稍后重试。"}))}catch(l){console.error("轮询同行店铺失败:",l)}},se),()=>{u.current&&clearInterval(u.current)}},[f,d,_]);const H=c.useCallback(async()=>{var t,i;if(!(!d||f)){m(null),A("");try{if((await q(d)).status==="running"){y(!0);return}y(!0),b({done:0,total:0,stage:"准备抓取"})}catch(s){const a=((i=(t=s==null?void 0:s.response)==null?void 0:t.data)==null?void 0:i.detail)||(s==null?void 0:s.message)||"触发刷新失败";m({type:"error",message:String(a)})}}},[d,f]),Q=c.useCallback(async()=>{var t,i;if(!(!d||h)){C(!0),m(null);try{const s=await G(d);s.status==="ok"&&s.analysis?(A(s.analysis),F(s.model||"")):s.status==="need_api_key"?m({type:"info",message:s.message||"尚未配置模型 KEY,请先在「AI 回复设置」填写模型 KEY。"}):m({type:"error",message:s.message||"AI 分析失败,请稍后重试。"})}catch(s){const a=((i=(t=s==null?void 0:s.response)==null?void 0:t.data)==null?void 0:i.detail)||(s==null?void 0:s.message)||"AI 分析失败";m({type:"error",message:String(a)})}finally{C(!1)}}},[d,h]),N=c.useMemo(()=>{const t=[...(r==null?void 0:r.shops)||[]],i={sold:(s,a)=>a.sold-s.sold||a.search_deals-s.search_deals,similarity:(s,a)=>a.similarity-s.similarity||a.value_score-s.value_score,credit:(s,a)=>(a.credit_sort??a.credit_level)-(s.credit_sort??s.credit_level)||a.good_rate-s.good_rate,reviews:(s,a)=>a.good+a.mid+a.bad-(s.good+s.mid+s.bad)||a.good-s.good};return t.sort(i[w])},[r,w]);if(n)return e.jsx(X,{label:"正在加载同行店铺"});const p=r==null?void 0:r.user,U=r!=null&&r.updated_at?ae(r.updated_at):"尚未生成";return e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(Z,{title:"同行热卖店铺",description:"按您店铺的类型,从闲鱼实时搜索聚合同类型销量最好的 50 家店铺,给出与您店铺的相似度和参考价值。",icon:D,badge:e.jsx("span",{className:"rounded-full bg-[var(--surface-subtle)] px-2 py-0.5 text-xs text-[var(--text-soft)]",children:r?`更新于 ${U}`:"待生成"}),actions:e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsxs("button",{type:"button",className:"ios-btn-secondary flex items-center gap-1.5 rounded-md px-3 py-2 text-sm",onClick:()=>void Q(),disabled:h||!((M=r==null?void 0:r.shops)!=null&&M.length),title:(L=r==null?void 0:r.shops)!=null&&L.length?"用模型 KEY 一键分析最适合您店铺的同行":"先抓取数据后再分析",children:[h?e.jsx(k,{className:"h-4 w-4 animate-spin"}):e.jsx(O,{className:"h-4 w-4"}),h?"AI 分析中…":"AI 一键分析"]}),e.jsxs("button",{type:"button",className:"ios-btn-primary flex items-center gap-1.5 rounded-md px-3 py-2 text-sm",onClick:()=>void H(),disabled:f||!d,children:[f?e.jsx(k,{className:"h-4 w-4 animate-spin"}):e.jsx(J,{className:"h-4 w-4"}),f?"抓取中…":r?"重新抓取":"开始分析"]})]})}),v&&e.jsx(ee,{type:v.type==="info"?"success":v.type,message:v.message,onClose:()=>m(null)}),f&&e.jsxs("div",{className:"section-panel",children:[e.jsxs("div",{className:"flex items-center gap-3 text-sm text-[var(--text-soft)]",children:[e.jsx(k,{className:"h-4 w-4 animate-spin text-[#ff4400]"}),e.jsxs("span",{children:[(x==null?void 0:x.stage)||"抓取中…",x&&x.total>0?`(${x.done}/${x.total})`:""]})]}),x&&x.total>0&&e.jsx("div",{className:"mt-2 h-1.5 w-full overflow-hidden rounded-full bg-[var(--surface-subtle)]",children:e.jsx("div",{className:"h-full rounded-full bg-[#ff4400] transition-all",style:{width:`${Math.min(100,Math.round(x.done/x.total*100))}%`}})}),e.jsx("p",{className:"mt-2 text-xs text-[var(--text-soft)]",children:"约需 1 分钟:按店铺类型搜索 → 聚合高销量店铺 → 逐店补齐销量/信用/主页。"})]}),p&&e.jsxs("div",{className:"section-panel flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-[var(--text-soft)]",children:[e.jsxs("span",{children:["您的店铺:已同步 ",p.items_count," 件商品"]}),p.med_price>0&&e.jsxs("span",{children:["价格中位数 ¥",p.med_price]}),((P=p.categories)==null?void 0:P.length)>0&&e.jsxs("span",{children:["类目:",p.categories.slice(0,3).join("、")]}),((R=r==null?void 0:r.keywords)==null?void 0:R.length)>0&&e.jsxs("span",{children:["匹配关键词:",r.keywords.slice(0,5).join("、")]})]}),$&&e.jsxs("div",{className:"section-panel",children:[e.jsxs("div",{className:"mb-2 flex items-center gap-2 text-sm font-semibold",children:[e.jsx(O,{className:"h-4 w-4 text-amber-500"}),"AI 分析结果",I&&e.jsxs("span",{className:"text-xs font-normal text-[var(--text-soft)]",children:["(",I,")"]})]}),e.jsx("div",{className:"whitespace-pre-wrap text-sm leading-6 text-[var(--text)]",children:$})]}),!r&&!f&&e.jsx(K,{title:"还没有同行店铺数据",description:"点击右上角「开始分析」,将按您店铺的类型搜索闲鱼同类型高销量店铺,并计算相似度与参考价值。需要先在账号管理添加账号并同步商品。",icon:te}),r&&N.length===0&&!f&&e.jsx(K,{title:r.error||"没有拿到同类型店铺",description:"可能是搜索命中风控或关键词过窄,稍后点「重新抓取」再试。",icon:D}),N.length>0&&e.jsxs("div",{className:"section-panel",children:[e.jsxs("div",{className:"mb-3 flex flex-wrap items-center justify-between gap-2",children:[e.jsx("div",{className:"flex items-center gap-1 rounded-lg bg-[var(--surface-subtle)] p-1",children:re.map(t=>e.jsx("button",{type:"button",onClick:()=>z(t.id),className:`rounded-md px-3 py-1.5 text-xs font-medium transition ${w===t.id?"bg-white text-[var(--text)] shadow-sm":"text-[var(--text-soft)] hover:text-[var(--text)]"}`,children:t.label},t.id))}),e.jsxs("span",{className:"text-xs text-[var(--text-soft)]",children:["共 ",N.length," 家 · 默认按销量排序 · 点击店铺名查看闲鱼店铺全部商品"]})]}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full min-w-[860px] text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)] text-left text-xs text-[var(--text-soft)]",children:[e.jsx("th",{className:"py-2 pr-3 font-medium",children:"排名"}),e.jsx("th",{className:"py-2 pr-3 font-medium",children:"店铺"}),e.jsx("th",{className:"py-2 pr-3 text-right font-medium",children:"销量"}),e.jsx("th",{className:"py-2 pr-3 font-medium",children:"信用"}),e.jsx("th",{className:"py-2 pr-3 text-right font-medium",children:"评论数"}),e.jsx("th",{className:"py-2 pr-3 text-right font-medium",children:"相似度"}),e.jsx("th",{className:"py-2 pr-3 text-right font-medium",children:"参考价值"}),e.jsx("th",{className:"py-2 text-right font-medium",children:"操作"})]})}),e.jsx("tbody",{children:N.map(t=>{var s,a;const i=Math.max(0,t.good)+Math.max(0,t.mid)+Math.max(0,t.bad);return e.jsxs("tr",{className:"border-b border-[var(--border)] last:border-0 hover:bg-[var(--surface-subtle)]",children:[e.jsx("td",{className:"py-2.5 pr-3",children:e.jsx("span",{className:`inline-flex h-6 w-6 items-center justify-center rounded-full text-xs font-bold ${t.rank===1?"bg-amber-400 text-white":t.rank===2?"bg-gray-300 text-gray-700":t.rank===3?"bg-orange-300 text-orange-900":"bg-[var(--surface-subtle)] text-[var(--text-soft)]"}`,children:t.rank})}),e.jsxs("td",{className:"py-2.5 pr-3",children:[e.jsxs("a",{href:t.url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1.5 font-medium text-[var(--text)] hover:text-[#ff4400] hover:underline",title:`在闲鱼查看「${t.nick}」的店铺详情与全部商品`,children:[t.nick,e.jsx(W,{className:"h-3.5 w-3.5 shrink-0 text-[var(--text-soft)]"})]}),e.jsxs("div",{className:"mt-0.5 flex flex-wrap items-center gap-x-2 text-xs text-[var(--text-soft)]",children:[t.city&&e.jsx("span",{children:t.city}),(s=t.tags)==null?void 0:s.slice(0,2).map(g=>e.jsx("span",{className:"rounded bg-[var(--surface-subtle)] px-1.5 py-0.5",children:g},g)),t.price_avg>0&&e.jsxs("span",{children:["均价 ¥",t.price_avg]}),!!((a=t.keywords_hit)!=null&&a.length)&&e.jsxs("span",{className:"rounded bg-[var(--surface-subtle)] px-1.5 py-0.5 text-[var(--text-soft)]",title:`命中类型关键词:${t.keywords_hit.join("、")}`,children:["命中",t.keywords_hit.length,"词"]})]})]}),e.jsx("td",{className:"py-2.5 pr-3 text-right font-semibold",children:B(t.sold)}),e.jsx("td",{className:"py-2.5 pr-3",children:e.jsx(le,{level:t.credit_level,fallback:t.search_credit})}),e.jsxs("td",{className:"py-2.5 pr-3 text-right",title:`好评 ${t.good} / 中评 ${t.mid} / 差评 ${t.bad}`,children:[e.jsx("span",{className:"font-medium",children:B(i)}),t.good_rate>0&&e.jsxs("span",{className:"ml-1 text-xs text-emerald-600",children:[t.good_rate,"%"]})]}),e.jsx("td",{className:"py-2.5 pr-3 text-right",children:e.jsx(Y,{value:t.similarity})}),e.jsx("td",{className:"py-2.5 pr-3 text-right",children:e.jsx(Y,{value:t.value_score})}),e.jsx("td",{className:"py-2.5 text-right",children:e.jsxs("div",{className:"flex items-center justify-end gap-2",children:[e.jsx("a",{href:t.url,target:"_blank",rel:"noopener noreferrer",className:"rounded-md border border-[var(--border)] px-2 py-1 text-xs hover:border-[#ff4400] hover:text-[#ff4400]",children:"店铺"}),e.jsx("a",{href:t.item_url,target:"_blank",rel:"noopener noreferrer",className:"rounded-md border border-[var(--border)] px-2 py-1 text-xs hover:border-[#ff4400] hover:text-[#ff4400]",children:"商品"})]})})]},t.seller_id||t.url)})})]})}),e.jsx("p",{className:"mt-3 text-xs leading-5 text-[var(--text-soft)]",children:"相似度 = 与您店铺商品词集的重合度(含价格带接近度);参考价值 = 相似度 40% + 销量 25% + 信用 20% + 好评率 15%。 数据来自闲鱼实时搜索,每次抓取约 1 分钟,可点「重新抓取」更新。"})]})]})};export{de as default}; diff --git a/static/assets/PriceWatch-mbt9tO4Q.js b/static/assets/PriceWatch-D0ZYbUkf.js similarity index 94% rename from static/assets/PriceWatch-mbt9tO4Q.js rename to static/assets/PriceWatch-D0ZYbUkf.js index c1a9088..64d8b61 100644 --- a/static/assets/PriceWatch-mbt9tO4Q.js +++ b/static/assets/PriceWatch-D0ZYbUkf.js @@ -1,4 +1,4 @@ -import{c as A,r as n,bQ as oe,bR as me,j as e,bS as X,e as M,X as q,bT as xe,aE as pe,bU as he,bV as ue,bW as be,bX as je,bY as ge,bZ as ve}from"./index-BtyeumGM.js";import{P as Q,a as ye,N as E,E as U}from"./ui-Bucd7ZQW.js";import{P as Ne}from"./plus-D66LUkyr.js";import{P as _e}from"./play-RrpCCHk6.js";import{P as fe}from"./pen-line-Du-MX3r7.js";import{T as we}from"./trash-2-Cpz1crux.js";import{S as V}from"./search-Dm0kd19J.js";/** +import{c as A,r as n,bU as oe,bV as me,j as e,bW as X,e as M,X as q,bX as xe,aE as pe,bY as he,bZ as ue,b_ as be,b$ as je,c0 as ge,c1 as ve}from"./index-IP-mmLlr.js";import{P as U,a as ye,N as E,E as V}from"./ui-Fi8l9rTp.js";import{P as Ne}from"./plus-BbnHS2Zx.js";import{P as _e}from"./play-CYUspTVx.js";import{P as fe}from"./pen-line-D5rb4QS3.js";import{T as we}from"./trash-2-BNPsgs2t.js";import{S as Z}from"./search-TGrYyOkD.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. @@ -13,4 +13,4 @@ import{c as A,r as n,bQ as oe,bR as me,j as e,bS as X,e as M,X as q,bT as xe,aE * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const $e=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],Pe=A("history",$e),Me=2500,x=t=>t==null?"—":`¥${Number(t).toLocaleString("zh-CN",{maximumFractionDigits:2})}`,I=()=>Math.floor(Date.now()/1e3),L=t=>{if(!t||t<=0)return"—";const i=Math.floor(t);return i<60?`${i} 秒前`:i<3600?`${Math.floor(i/60)} 分钟前`:i<86400?`${Math.floor(i/3600)} 小时前`:`${Math.floor(i/86400)} 天前`},Ee=t=>t==null||t<0?"已停用":t<60?`${Math.max(0,Math.round(t))} 秒后`:t<3600?`${Math.floor(t/60)} 分钟后`:`${Math.floor(t/3600)} 小时后`,k=t=>{const i=t.trim();if(i==="")return null;const h=Number(i);return Number.isFinite(h)&&h>=0?h:null},Z={name:"",keyword:"",min_price:"",max_price:"",target_price:"",interval_minutes:"30",pages:"2",enabled:!0,cookie_id:"",min_seller_credit:"",min_seller_deals:"",ai_precise:!1},Re=t=>({name:t.name,keyword:t.keyword,min_price:t.min_price===null?"":String(t.min_price),max_price:t.max_price===null?"":String(t.max_price),target_price:t.target_price===null?"":String(t.target_price),interval_minutes:String(t.interval_minutes),pages:String(t.pages||2),enabled:t.enabled!==!1,cookie_id:t.cookie_id||"",min_seller_credit:t.min_seller_credit||"",min_seller_deals:t.min_seller_deals!=null?String(t.min_seller_deals):"",ai_precise:!!t.ai_precise}),J=t=>{const i=t.keyword.trim();if(!i)return{input:null,error:"请填写搜索关键词"};const h=t.name.trim()||i,v=k(t.min_price),m=k(t.max_price);if(v!==null&&m!==null&&v>m)return{input:null,error:"最低价不能大于最高价"};const g=k(t.target_price);if(g!==null&&m!==null&&g>m)return{input:null,error:"目标价不能高于最高价"};const u=Number(t.interval_minutes);if(!Number.isFinite(u)||u<5)return{input:null,error:"检查间隔至少 5 分钟"};const c=Number(t.pages);return!Number.isFinite(c)||c<1||c>5?{input:null,error:"每轮页数取 1~5"}:{input:{name:h,keyword:i,min_price:v,max_price:m,target_price:g,interval_minutes:Math.round(u),pages:Math.round(c),enabled:t.enabled,cookie_id:t.cookie_id||null,min_seller_credit:t.min_seller_credit||null,min_seller_deals:k(t.min_seller_deals),ai_precise:t.ai_precise}}};function Oe(){const[t,i]=n.useState([]),[h,v]=n.useState(!0),[m,g]=n.useState(""),[u,c]=n.useState(null),[ee,F]=n.useState([]),[se,y]=n.useState(!1),[N,T]=n.useState(null),[l,d]=n.useState(Z),[D,H]=n.useState(!1),[O,_]=n.useState(""),[C,Y]=n.useState(!1),[o,f]=n.useState(null),[B,b]=n.useState(""),[S,z]=n.useState(null),[G,$]=n.useState([]),[te,K]=n.useState(!1),w=n.useRef(new Set),p=n.useCallback(async()=>{try{const r=(await oe()).rules??[];i(r),g("");const a=new Set;for(const j of r)j.running&&a.add(j.id);const P=[...w.current].filter(j=>!a.has(j));w.current=a,P.length&&p()}catch(s){g(s instanceof Error?s.message:"加载失败")}finally{v(!1)}},[]);n.useEffect(()=>{p(),me().then(r=>F(r.cookies??[])).catch(()=>F([]));const s=setInterval(()=>void p(),Me);return()=>clearInterval(s)},[p]);const ae=()=>{T(null),d(Z),f(null),b(""),_(""),y(!0)},re=s=>{T(s.id),d(Re(s)),f(null),b(""),_(""),y(!0)},le=async()=>{const{input:s,error:r}=J(l);if(!s){b(r??"参数有误");return}Y(!0),b(""),f(null);try{const a=await he({keyword:s.keyword,min_price:s.min_price,max_price:s.max_price,pages:s.pages,cookie_id:s.cookie_id,min_seller_credit:s.min_seller_credit,min_seller_deals:s.min_seller_deals,ai_precise:s.ai_precise});f(a),a.error?b(a.error):a.lowest||b("没搜到符合条件的商品,换个关键词或放宽价格区间试试")}catch(a){b(a instanceof Error?a.message:"试搜失败")}finally{Y(!1)}},ne=async()=>{const{input:s,error:r}=J(l);if(!s){_(r??"参数有误");return}H(!0),_("");try{N===null?await ue(s):await be(N,s),y(!1),c({type:"info",message:N===null?"规则已创建,可以立即检查一次":"规则已保存"}),await p()}catch(a){_(a instanceof Error?a.message:"保存失败")}finally{H(!1)}},ie=async s=>{w.current.add(s.id),c(null);try{const r=await je(s.id);if(!r.started)c({type:"info",message:r.message??"任务未启动"});else if(r.record){const a=r.record.lowest_price;a==null?c({type:"warning",message:`「${s.name}」没搜到可比价的商品(已记录一次空结果)`}):r.notified?c({type:"success",message:`已找到最低价 ${x(a)},通知已发送(${r.notify_reason||"命中"})`}):c({type:"info",message:`本次最低价 ${x(a)}(${r.notify_reason||"未触发通知"})`}),r.notify_error&&c({type:"error",message:`通知发送失败:${r.notify_error}`})}}catch(r){c({type:"error",message:r instanceof Error?r.message:"检查失败"})}finally{w.current.delete(s.id),await p()}},ce=async s=>{if(window.confirm(`删除监控规则「${s.name}」?检查历史会一并删除。`))try{await ge(s.id),c({type:"info",message:"规则已删除"}),await p()}catch(r){c({type:"error",message:r instanceof Error?r.message:"删除失败"})}},de=async s=>{z(s),K(!0),$([]);try{const r=await ve(s.id,50);$(r.records??[])}catch{$([])}finally{K(!1)}};return h&&!t.length?e.jsx(Q,{}):e.jsxs("div",{className:"mx-auto max-w-[1600px] space-y-6 px-4 py-5 sm:px-6",children:[e.jsx(ye,{title:"价格监控",description:"填关键词和价格条件,实时搜出最低价并记录;命中目标价自动发通知。",icon:X,actions:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{type:"button",onClick:()=>void p(),className:"ios-btn-secondary rounded-md px-4 py-2","aria-label":"刷新",children:e.jsx(M,{className:"h-4 w-4"})}),e.jsxs("button",{type:"button",onClick:ae,className:"ios-btn-primary rounded-md px-4 py-2",children:[e.jsx(Ne,{className:"mr-1.5 inline h-4 w-4"}),"新建监控规则"]})]})}),e.jsx(E,{type:"info",message:"「最低价」按搜索结果本地排序得出(闲鱼搜索接口不返回销量)。为避免触发风控,所有规则共用串行队列、两次搜索固定间隔 1 秒,请把检查间隔设得宽松些,建议不低于 15 分钟。"}),u&&e.jsx(E,{type:u.type,message:u.message,onClose:()=>c(null)}),m&&e.jsx(E,{type:"error",message:`加载失败:${m}`}),!t.length&&!m?e.jsx(U,{title:"还没有监控规则",description:"点「新建监控规则」,填关键词与价格条件后即可实时搜到最低价。",icon:R}):e.jsx("div",{className:"overflow-hidden rounded-lg border border-[var(--border-light)] bg-[var(--surface)] shadow-sm",children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"data-table responsive-data-table min-w-[1100px]",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{className:"w-[20%]",children:"规则"}),e.jsx("th",{className:"w-[17%]",children:"条件"}),e.jsx("th",{className:"w-[22%]",children:"最近一次"}),e.jsx("th",{className:"w-[13%]",children:"下次检查"}),e.jsx("th",{className:"w-[11%]",children:"进度"}),e.jsx("th",{className:"w-[17%] text-right",children:"操作"})]})}),e.jsx("tbody",{children:t.map(s=>{var j,W;const r=s.running,a=s.last_record,P=a!=null&&a.lowest_price!==null&&a.lowest_price!==void 0;return e.jsxs("tr",{children:[e.jsx("td",{"data-label":"规则",children:e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"break-words font-medium text-[var(--text-primary)]",title:s.name,children:s.name}),e.jsxs("div",{className:"break-words text-xs text-[var(--text-muted)]",title:s.keyword,children:["关键词:",s.keyword]}),e.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-2 text-xs",children:[e.jsx("span",{className:`inline-flex items-center rounded px-1.5 py-0.5 ${s.enabled?"bg-emerald-50 text-emerald-700":"bg-slate-100 text-slate-500"}`,children:s.enabled?"运行中":"已停用"}),e.jsxs("span",{className:"text-[var(--text-muted)]",children:["每 ",s.interval_minutes," 分钟"]})]})]})}),e.jsx("td",{"data-label":"条件",children:e.jsxs("div",{className:"text-sm text-[var(--text-secondary)]",children:[e.jsxs("div",{children:[s.min_price===null?"不限":x(s.min_price)," ~ ",s.max_price===null?"不限":x(s.max_price)]}),e.jsx("div",{className:s.target_price!==null?"text-[var(--brand-primary)]":"text-[var(--text-muted)]",children:s.target_price!==null?`目标价 ${x(s.target_price)}`:"新低价即通知"}),(s.min_seller_credit||s.min_seller_deals!=null||s.ai_precise)&&e.jsxs("div",{className:"mt-1 flex flex-wrap gap-1",children:[s.min_seller_credit&&e.jsxs("span",{className:"rounded bg-slate-100 px-1.5 py-0.5 text-[11px] text-slate-600",children:["信用≥",s.min_seller_credit]}),s.min_seller_deals!=null&&e.jsxs("span",{className:"rounded bg-slate-100 px-1.5 py-0.5 text-[11px] text-slate-600",children:["销量≥",s.min_seller_deals]}),s.ai_precise&&e.jsx("span",{className:"rounded bg-indigo-100 px-1.5 py-0.5 text-[11px] text-indigo-700",children:"AI 精准"})]}),e.jsxs("div",{className:"text-xs text-[var(--text-muted)]",children:["每轮 ",s.pages," 页 · 历史 ",s.history_count," 条"]})]})}),e.jsx("td",{"data-label":"最近一次",children:a?a.error?e.jsxs("span",{className:"text-sm text-amber-600",title:a.error,children:["上次出错:",a.error.slice(0,24)]}):P?e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-1.5 font-semibold text-emerald-600",children:[e.jsx(X,{className:"h-3.5 w-3.5 shrink-0"}),x(a.lowest_price),a.notified?e.jsx(R,{className:"h-3 w-3 text-[var(--brand-primary)]","aria-label":"已通知"}):null]}),e.jsx("div",{className:"break-words text-xs text-[var(--text-muted)]",title:a.lowest_title??"",children:a.lowest_title}),e.jsxs("div",{className:"text-xs text-[var(--text-muted)]",children:[L(I()-a.checked_at)," · 比价 ",a.item_count," 件",a.source==="auto"?" · 自动":""]})]}):e.jsxs("span",{className:"text-sm text-[var(--text-muted)]",children:["没搜到可比价商品 · ",L(I()-a.checked_at)]}):e.jsx("span",{className:"text-sm text-[var(--text-muted)]",children:"还没检查过"})}),e.jsx("td",{"data-label":"下次检查",children:e.jsxs("div",{className:"text-sm text-[var(--text-secondary)]",children:[r?"检查中…":Ee(s.next_run_in),e.jsxs("div",{className:"text-xs text-[var(--text-muted)]",children:["上次"," ",s.last_run_at?L(I()-s.last_run_at):"—"]})]})}),e.jsx("td",{"data-label":"进度",children:r?e.jsxs("div",{className:"text-xs text-[var(--text-secondary)]",children:[e.jsxs("span",{className:"inline-flex items-center gap-1",children:[e.jsx(M,{className:"h-3 w-3 animate-spin"}),s.progress?`${s.progress.done}/${s.progress.total}`:"启动中"]}),((j=s.progress)==null?void 0:j.keyword)&&e.jsx("div",{className:"truncate text-[var(--text-muted)]",title:s.progress.keyword,children:s.progress.keyword}),((W=s.progress)==null?void 0:W.error)&&e.jsx("div",{className:"text-amber-600",children:s.progress.error.slice(0,20)})]}):e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:s.manual_cooldown_remaining>0?`手动冷却 ${Math.ceil(s.manual_cooldown_remaining)}s`:"空闲"})}),e.jsx("td",{"data-label":"操作",children:e.jsxs("div",{className:"flex flex-wrap justify-end gap-1.5",children:[e.jsxs("button",{type:"button",onClick:()=>void ie(s),disabled:r||s.manual_cooldown_remaining>0,className:"ios-btn-secondary inline-flex items-center gap-1 rounded-md px-2.5 py-1.5 text-xs disabled:opacity-50",title:s.manual_cooldown_remaining>0?"手动检查冷却中":"立即搜索一次",children:[e.jsx(_e,{className:"h-3.5 w-3.5"}),"立即检查"]}),e.jsxs("button",{type:"button",onClick:()=>void de(s),className:"ios-btn-secondary inline-flex items-center gap-1 rounded-md px-2.5 py-1.5 text-xs",children:[e.jsx(Pe,{className:"h-3.5 w-3.5"}),"历史"]}),e.jsxs("button",{type:"button",onClick:()=>re(s),className:"ios-btn-secondary inline-flex items-center gap-1 rounded-md px-2.5 py-1.5 text-xs",children:[e.jsx(fe,{className:"h-3.5 w-3.5"}),"编辑"]}),e.jsxs("button",{type:"button",onClick:()=>void ce(s),className:"ios-btn-secondary inline-flex items-center gap-1 rounded-md px-2.5 py-1.5 text-xs text-rose-600 hover:bg-rose-50",children:[e.jsx(we,{className:"h-3.5 w-3.5"}),"删除"]})]})})]},s.id)})})]})})}),t.some(s=>s.running)&&e.jsxs("div",{className:"flex items-center gap-2 text-sm text-[var(--text-muted)]",children:[e.jsx(M,{className:"h-4 w-4 animate-spin"}),"有规则正在检查,结果会自动刷新。"]}),se&&e.jsx("div",{className:"modal-overlay",role:"dialog","aria-modal":"true","aria-label":"监控规则",children:e.jsxs("div",{className:"modal-container max-h-[92vh] w-full max-w-[680px] overflow-y-auto",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border-light)] px-6 py-4",children:[e.jsx("h3",{className:"text-lg font-semibold text-[var(--text-primary)]",children:N===null?"新建监控规则":"编辑监控规则"}),e.jsx("button",{type:"button",onClick:()=>y(!1),className:"rounded-full p-1.5 text-[var(--text-muted)] hover:bg-slate-100","aria-label":"关闭",children:e.jsx(q,{className:"h-5 w-5"})})]}),e.jsxs("div",{className:"space-y-4 px-6 py-5",children:[e.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[e.jsxs("label",{className:"block text-sm",children:[e.jsx("span",{className:"mb-1.5 block font-medium text-[var(--text-secondary)]",children:"规则名称"}),e.jsx("input",{type:"text",value:l.name,onChange:s=>d({...l,name:s.target.value}),placeholder:"留空则用关键词",className:"ios-input w-full rounded-md px-3 py-2.5"})]}),e.jsxs("label",{className:"block text-sm",children:[e.jsx("span",{className:"mb-1.5 block font-medium text-[var(--text-secondary)]",children:"搜索关键词 *"}),e.jsx("input",{type:"text",value:l.keyword,onChange:s=>d({...l,keyword:s.target.value}),placeholder:"如 iPhone 15",className:"ios-input w-full rounded-md px-3 py-2.5"})]})]}),e.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-3",children:[e.jsxs("label",{className:"block text-sm",children:[e.jsx("span",{className:"mb-1.5 block font-medium text-[var(--text-secondary)]",children:"最低价(元)"}),e.jsx("input",{type:"number",min:"0",step:"1",inputMode:"decimal",value:l.min_price,onChange:s=>d({...l,min_price:s.target.value}),placeholder:"不限",className:"ios-input w-full rounded-md px-3 py-2.5"})]}),e.jsxs("label",{className:"block text-sm",children:[e.jsx("span",{className:"mb-1.5 block font-medium text-[var(--text-secondary)]",children:"最高价(元)"}),e.jsx("input",{type:"number",min:"0",step:"1",inputMode:"decimal",value:l.max_price,onChange:s=>d({...l,max_price:s.target.value}),placeholder:"不限",className:"ios-input w-full rounded-md px-3 py-2.5"})]}),e.jsxs("label",{className:"block text-sm",children:[e.jsx("span",{className:"mb-1.5 block font-medium text-[var(--text-secondary)]",children:"目标价(元)"}),e.jsx("input",{type:"number",min:"0",step:"1",inputMode:"decimal",value:l.target_price,onChange:s=>d({...l,target_price:s.target.value}),placeholder:"留空=新低价即通知",className:"ios-input w-full rounded-md px-3 py-2.5"})]})]}),e.jsx("p",{className:"-mt-2 text-xs text-[var(--text-muted)]",children:"目标价留空时,只要比上次低就通知;填了则要低于等于目标价才通知。"}),e.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[e.jsxs("label",{className:"block text-sm",children:[e.jsx("span",{className:"mb-1.5 block font-medium text-[var(--text-secondary)]",children:"卖家信用度"}),e.jsxs("select",{value:l.min_seller_credit,onChange:s=>d({...l,min_seller_credit:s.target.value}),className:"ios-input w-full rounded-md px-3 py-2.5",children:[e.jsx("option",{value:"",children:"不限(含未标注信用的卖家)"}),e.jsx("option",{value:"极好",children:"「极好」及以上"}),e.jsx("option",{value:"优秀",children:"「优秀」及以上"}),e.jsx("option",{value:"良好",children:"「良好」及以上"})]})]}),e.jsxs("label",{className:"block text-sm",children:[e.jsx("span",{className:"mb-1.5 block font-medium text-[var(--text-secondary)]",children:"卖家销量下限(条评价)"}),e.jsx("input",{type:"number",min:"0",step:"1",value:l.min_seller_deals,onChange:s=>d({...l,min_seller_deals:s.target.value}),placeholder:"不限",className:"ios-input w-full rounded-md px-3 py-2.5"})]})]}),e.jsxs("p",{className:"-mt-1 text-xs text-[var(--text-muted)]",children:[e.jsx("b",{children:"销量"}),":闲鱼是单件二手成交、没有商品级销量,这里按卖家的「N 条评价」 累计量筛(如「126 条评价」≈ 该卖家已成交 126 单,越大越靠谱)—— 实测每条商品",e.jsx("b",{children:"都能取到"}),",放心用。",e.jsx("br",{}),e.jsx("b",{children:"信用度"}),":取自搜索结果的「卖家信用极好 / 优秀」标签,",e.jsx("b",{children:"但闲鱼只给部分卖家显示该标签"}),"(实测同类商品可能 0~3 条有标注),",e.jsx("b",{children:"选了具体等级后,未标注的卖家会被排除"}),",结果可能明显变少甚至为空—— 这是数据本身的限制,不是故障;建议先点下方「实时试搜」确认数量再保存, 拿不准就选「不限」。"]}),e.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-3",children:[e.jsxs("label",{className:"block text-sm",children:[e.jsx("span",{className:"mb-1.5 block font-medium text-[var(--text-secondary)]",children:"检查间隔(分钟)"}),e.jsx("input",{type:"number",min:"5",step:"1",value:l.interval_minutes,onChange:s=>d({...l,interval_minutes:s.target.value}),className:"ios-input w-full rounded-md px-3 py-2.5"})]}),e.jsxs("label",{className:"block text-sm",children:[e.jsx("span",{className:"mb-1.5 block font-medium text-[var(--text-secondary)]",children:"每轮页数"}),e.jsx("input",{type:"number",min:"1",max:"5",step:"1",value:l.pages,onChange:s=>d({...l,pages:s.target.value}),className:"ios-input w-full rounded-md px-3 py-2.5"})]}),e.jsxs("label",{className:"block text-sm",children:[e.jsx("span",{className:"mb-1.5 block font-medium text-[var(--text-secondary)]",children:"搜索账号"}),e.jsxs("select",{value:l.cookie_id,onChange:s=>d({...l,cookie_id:s.target.value}),className:"ios-input w-full rounded-md px-3 py-2.5",children:[e.jsx("option",{value:"",children:"自动选择"}),ee.map(s=>e.jsxs("option",{value:s.id,children:["账号 ",s.id]},s.id))]})]})]}),e.jsxs("label",{className:"flex cursor-pointer items-center gap-2 text-sm text-[var(--text-secondary)]",children:[e.jsx("input",{type:"checkbox",checked:l.enabled,onChange:s=>d({...l,enabled:s.target.checked}),className:"h-4 w-4 rounded border-slate-300"}),"启用自动检查(按间隔后台运行)"]}),e.jsxs("label",{className:"flex cursor-pointer items-center gap-2 text-sm text-[var(--text-secondary)]",children:[e.jsx("input",{type:"checkbox",checked:l.ai_precise,onChange:s=>d({...l,ai_precise:s.target.checked}),className:"h-4 w-4 rounded border-slate-300"}),e.jsxs("span",{children:["启用 ",e.jsx("b",{className:"text-indigo-600",children:"AI 精准监控"}),e.jsx("span",{className:"ml-1 text-xs text-[var(--text-muted)]",children:"(大模型逐条判断商品是否真的匹配关键词)"})]})]}),l.ai_precise&&e.jsxs("div",{className:"rounded-lg border border-indigo-200 bg-indigo-50/70 p-3.5 text-xs leading-relaxed text-indigo-950",children:[e.jsx("div",{className:"mb-2 font-semibold text-indigo-700",children:"启用 AI 有什么好处?"}),e.jsxs("ul",{className:"list-disc space-y-1.5 pl-4",children:[e.jsxs("li",{children:[e.jsx("b",{children:"过滤标题党与无关商品"}),":关键词命中标题但实际不卖这个的直接剔除, 通知里不再混进一堆看似相关、点进去却对不上的结果。"]}),e.jsxs("li",{children:[e.jsx("b",{children:"识别真实规格与成色"}),":分清 128G / 256G、有锁 / 国行、全新 / 骗修, 避免「假低价」——便宜那台其实是另一个规格,比价才准。"]}),e.jsxs("li",{children:[e.jsx("b",{children:"排除风险商品"}),":描述前后矛盾、疑似引流或诈骗话术的商品不进入比价。"]}),e.jsxs("li",{children:[e.jsx("b",{children:"通知更精准、少打扰"}),":只有通过判断的商品参与「新低价」比较, 你收到的每条降价提醒都是真值得点的。"]})]}),e.jsxs("div",{className:"mt-2.5 border-t border-indigo-200 pt-2 text-[11px] text-indigo-800",children:[e.jsx("b",{children:"成本与兜底"}),":每轮对前 20 条商品",e.jsx("b",{children:"批量调用一次"}),"大模型 (走「AI 优化建议」里已配置的模型 KEY,约增加几秒延迟);",e.jsx("b",{children:"未配置 KEY 或调用失败会自动跳过并保留全部结果"}),"——AI 挂了监控照常跑, 宁可多报也不漏报。"]})]}),e.jsxs("div",{className:"rounded-lg border border-[var(--border-light)] bg-slate-50 p-4",children:[e.jsxs("div",{className:"mb-3 flex items-center justify-between gap-3",children:[e.jsxs("div",{className:"text-sm font-medium text-[var(--text-secondary)]",children:[e.jsx(V,{className:"mr-1.5 inline h-4 w-4"}),"实时试搜(不保存、不通知)"]}),e.jsxs("button",{type:"button",onClick:()=>void le(),disabled:C,className:"ios-btn-secondary inline-flex items-center gap-1.5 rounded-md px-3 py-2 text-sm disabled:opacity-50",children:[e.jsx(V,{className:`h-4 w-4 ${C?"animate-pulse":""}`}),C?"搜索中…":"搜索最低价"]})]}),B&&e.jsxs("div",{className:"mb-3 flex items-start gap-2 rounded-md bg-amber-50 px-3 py-2 text-sm text-amber-700",children:[e.jsx(xe,{className:"mt-0.5 h-4 w-4 shrink-0"}),e.jsx("span",{children:B})]}),(o==null?void 0:o.lowest)&&e.jsxs("div",{className:"mb-3 rounded-md border border-emerald-200 bg-emerald-50 p-3",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium text-emerald-700",children:[e.jsx(pe,{className:"h-4 w-4"}),"当前最低价 ",x(o.lowest.price_value)]}),e.jsx("a",{href:o.lowest.url,target:"_blank",rel:"noreferrer",className:"shrink-0 text-xs text-[var(--brand-primary)] hover:underline",children:"查看商品"})]}),e.jsx("div",{className:"mt-1 line-clamp-2 text-sm text-emerald-900/80",children:o.lowest.title}),e.jsxs("div",{className:"mt-1 text-xs text-emerald-700/70",children:["参与比价 ",o.matched," / ",o.count," 件",o.ai_note?` · ${o.ai_note}`:""]})]}),o&&o.items.length>0&&e.jsx("div",{className:"max-h-[220px] space-y-1.5 overflow-y-auto",children:o.items.slice(0,8).map((s,r)=>e.jsxs("a",{href:s.url,target:"_blank",rel:"noreferrer",className:"flex items-center justify-between gap-3 rounded-md bg-white px-3 py-2 text-sm hover:bg-slate-100",children:[e.jsx("span",{className:"min-w-0 flex-1 truncate text-[var(--text-secondary)]",children:s.title}),e.jsx("span",{className:"shrink-0 font-medium text-emerald-600",children:x(s.price_value)})]},s.item_id||r))})]}),O&&e.jsx("div",{className:"text-sm text-rose-600",children:O})]}),e.jsxs("div",{className:"modal-footer flex justify-end gap-3 border-t border-[var(--border-light)] px-6 py-4",children:[e.jsx("button",{type:"button",onClick:()=>y(!1),className:"ios-btn-secondary rounded-md px-4 py-2.5",children:"取消"}),e.jsx("button",{type:"button",onClick:()=>void ne(),disabled:D,className:"ios-btn-primary rounded-md px-4 py-2.5 disabled:opacity-50",children:D?"保存中…":N===null?"创建规则":"保存修改"})]})]})}),S&&e.jsx("div",{className:"modal-overlay",role:"dialog","aria-modal":"true","aria-label":"检查历史",children:e.jsxs("div",{className:"modal-container max-h-[90vh] w-full max-w-[980px] overflow-y-auto",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border-light)] px-6 py-4",children:[e.jsxs("div",{children:[e.jsxs("h3",{className:"text-lg font-semibold text-[var(--text-primary)]",children:["检查历史 · ",S.name]}),e.jsxs("p",{className:"mt-0.5 text-xs text-[var(--text-muted)]",children:["关键词「",S.keyword,"」,保留最近 100 次"]})]}),e.jsx("button",{type:"button",onClick:()=>z(null),className:"rounded-full p-1.5 text-[var(--text-muted)] hover:bg-slate-100","aria-label":"关闭",children:e.jsx(q,{className:"h-5 w-5"})})]}),e.jsx("div",{className:"px-6 py-5",children:te?e.jsx(Q,{}):G.length?e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"data-table responsive-data-table min-w-[760px]",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{className:"w-[18%]",children:"时间"}),e.jsx("th",{className:"w-[12%]",children:"最低价"}),e.jsx("th",{children:"商品"}),e.jsx("th",{className:"w-[10%]",children:"比价数"}),e.jsx("th",{className:"w-[16%]",children:"结果"})]})}),e.jsx("tbody",{children:G.map(s=>e.jsxs("tr",{children:[e.jsxs("td",{"data-label":"时间",children:[e.jsx("div",{className:"text-sm text-[var(--text-secondary)]",children:new Date(s.checked_at*1e3).toLocaleString("zh-CN",{hour12:!1})}),e.jsx("div",{className:"text-xs text-[var(--text-muted)]",children:s.source==="auto"?"自动":"手动"})]}),e.jsx("td",{"data-label":"最低价",children:s.lowest_price===null||s.lowest_price===void 0?e.jsx("span",{className:"text-sm text-[var(--text-muted)]",children:"—"}):e.jsx("span",{className:"font-semibold text-emerald-600",children:x(s.lowest_price)})}),e.jsx("td",{"data-label":"商品",children:s.lowest_url?e.jsx("a",{href:s.lowest_url,target:"_blank",rel:"noreferrer",className:"block max-w-[380px] break-words text-sm text-[var(--brand-primary)] hover:underline",title:s.lowest_title??"",children:s.lowest_title||"(无标题)"}):e.jsx("span",{className:"block max-w-[380px] break-words text-sm text-[var(--text-muted)]",children:s.lowest_title||"—"})}),e.jsx("td",{"data-label":"比价数",children:e.jsxs("span",{className:"text-sm text-[var(--text-secondary)]",children:[s.item_count," 件"]})}),e.jsx("td",{"data-label":"结果",children:s.error?e.jsxs("span",{className:"text-xs text-amber-600",title:s.error,children:["出错:",s.error.slice(0,18)]}):s.lowest_price===null||s.lowest_price===void 0?e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:"无可比价商品"}):e.jsx("span",{className:`inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-xs ${s.notified?"bg-emerald-50 text-emerald-700":"bg-slate-100 text-slate-500"}`,children:s.notified?e.jsxs(e.Fragment,{children:[e.jsx(R,{className:"h-3 w-3"}),"已通知"]}):"已记录"})})]},s.id))})]})}):e.jsx(U,{title:"还没有检查记录",description:"点规则右侧的「立即检查」跑一次。",icon:Se})})]})})]})}export{Oe as default}; + */const $e=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],Pe=A("history",$e),Me=2500,x=t=>t==null?"—":`¥${Number(t).toLocaleString("zh-CN",{maximumFractionDigits:2})}`,I=()=>Math.floor(Date.now()/1e3),L=t=>{if(!t||t<=0)return"—";const i=Math.floor(t);return i<60?`${i} 秒前`:i<3600?`${Math.floor(i/60)} 分钟前`:i<86400?`${Math.floor(i/3600)} 小时前`:`${Math.floor(i/86400)} 天前`},Ee=t=>t==null||t<0?"已停用":t<60?`${Math.max(0,Math.round(t))} 秒后`:t<3600?`${Math.floor(t/60)} 分钟后`:`${Math.floor(t/3600)} 小时后`,k=t=>{const i=t.trim();if(i==="")return null;const h=Number(i);return Number.isFinite(h)&&h>=0?h:null},J={name:"",keyword:"",min_price:"",max_price:"",target_price:"",interval_minutes:"30",pages:"2",enabled:!0,cookie_id:"",min_seller_credit:"",min_seller_deals:"",ai_precise:!1},Re=t=>({name:t.name,keyword:t.keyword,min_price:t.min_price===null?"":String(t.min_price),max_price:t.max_price===null?"":String(t.max_price),target_price:t.target_price===null?"":String(t.target_price),interval_minutes:String(t.interval_minutes),pages:String(t.pages||2),enabled:t.enabled!==!1,cookie_id:t.cookie_id||"",min_seller_credit:t.min_seller_credit||"",min_seller_deals:t.min_seller_deals!=null?String(t.min_seller_deals):"",ai_precise:!!t.ai_precise}),Q=t=>{const i=t.keyword.trim();if(!i)return{input:null,error:"请填写搜索关键词"};const h=t.name.trim()||i,v=k(t.min_price),m=k(t.max_price);if(v!==null&&m!==null&&v>m)return{input:null,error:"最低价不能大于最高价"};const g=k(t.target_price);if(g!==null&&m!==null&&g>m)return{input:null,error:"目标价不能高于最高价"};const u=Number(t.interval_minutes);if(!Number.isFinite(u)||u<5)return{input:null,error:"检查间隔至少 5 分钟"};const c=Number(t.pages);return!Number.isFinite(c)||c<1||c>5?{input:null,error:"每轮页数取 1~5"}:{input:{name:h,keyword:i,min_price:v,max_price:m,target_price:g,interval_minutes:Math.round(u),pages:Math.round(c),enabled:t.enabled,cookie_id:t.cookie_id||null,min_seller_credit:t.min_seller_credit||null,min_seller_deals:k(t.min_seller_deals),ai_precise:t.ai_precise}}};function Oe(){const[t,i]=n.useState([]),[h,v]=n.useState(!0),[m,g]=n.useState(""),[u,c]=n.useState(null),[ee,F]=n.useState([]),[se,y]=n.useState(!1),[N,D]=n.useState(null),[l,d]=n.useState(J),[T,H]=n.useState(!1),[O,_]=n.useState(""),[C,Y]=n.useState(!1),[o,f]=n.useState(null),[B,b]=n.useState(""),[S,z]=n.useState(null),[G,$]=n.useState([]),[te,K]=n.useState(!1),w=n.useRef(new Set),p=n.useCallback(async()=>{try{const r=(await oe()).rules??[];i(r),g("");const a=new Set;for(const j of r)j.running&&a.add(j.id);const P=[...w.current].filter(j=>!a.has(j));w.current=a,P.length&&p()}catch(s){g(s instanceof Error?s.message:"加载失败")}finally{v(!1)}},[]);n.useEffect(()=>{p(),me().then(r=>F(r.cookies??[])).catch(()=>F([]));const s=setInterval(()=>void p(),Me);return()=>clearInterval(s)},[p]);const ae=()=>{D(null),d(J),f(null),b(""),_(""),y(!0)},re=s=>{D(s.id),d(Re(s)),f(null),b(""),_(""),y(!0)},le=async()=>{const{input:s,error:r}=Q(l);if(!s){b(r??"参数有误");return}Y(!0),b(""),f(null);try{const a=await he({keyword:s.keyword,min_price:s.min_price,max_price:s.max_price,pages:s.pages,cookie_id:s.cookie_id,min_seller_credit:s.min_seller_credit,min_seller_deals:s.min_seller_deals,ai_precise:s.ai_precise});f(a),a.error?b(a.error):a.lowest||b("没搜到符合条件的商品,换个关键词或放宽价格区间试试")}catch(a){b(a instanceof Error?a.message:"试搜失败")}finally{Y(!1)}},ne=async()=>{const{input:s,error:r}=Q(l);if(!s){_(r??"参数有误");return}H(!0),_("");try{N===null?await ue(s):await be(N,s),y(!1),c({type:"info",message:N===null?"规则已创建,可以立即检查一次":"规则已保存"}),await p()}catch(a){_(a instanceof Error?a.message:"保存失败")}finally{H(!1)}},ie=async s=>{w.current.add(s.id),c(null);try{const r=await je(s.id);if(!r.started)c({type:"info",message:r.message??"任务未启动"});else if(r.record){const a=r.record.lowest_price;a==null?c({type:"warning",message:`「${s.name}」没搜到可比价的商品(已记录一次空结果)`}):r.notified?c({type:"success",message:`已找到最低价 ${x(a)},通知已发送(${r.notify_reason||"命中"})`}):c({type:"info",message:`本次最低价 ${x(a)}(${r.notify_reason||"未触发通知"})`}),r.notify_error&&c({type:"error",message:`通知发送失败:${r.notify_error}`})}}catch(r){c({type:"error",message:r instanceof Error?r.message:"检查失败"})}finally{w.current.delete(s.id),await p()}},ce=async s=>{if(window.confirm(`删除监控规则「${s.name}」?检查历史会一并删除。`))try{await ge(s.id),c({type:"info",message:"规则已删除"}),await p()}catch(r){c({type:"error",message:r instanceof Error?r.message:"删除失败"})}},de=async s=>{z(s),K(!0),$([]);try{const r=await ve(s.id,50);$(r.records??[])}catch{$([])}finally{K(!1)}};return h&&!t.length?e.jsx(U,{}):e.jsxs("div",{className:"mx-auto max-w-[1600px] space-y-6 px-4 py-5 sm:px-6",children:[e.jsx(ye,{title:"价格监控",description:"填关键词和价格条件,实时搜出最低价并记录;命中目标价自动发通知。",icon:X,actions:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{type:"button",onClick:()=>void p(),className:"ios-btn-secondary rounded-md px-4 py-2","aria-label":"刷新",children:e.jsx(M,{className:"h-4 w-4"})}),e.jsxs("button",{type:"button",onClick:ae,className:"ios-btn-primary rounded-md px-4 py-2",children:[e.jsx(Ne,{className:"mr-1.5 inline h-4 w-4"}),"新建监控规则"]})]})}),e.jsx(E,{type:"info",message:"「最低价」按搜索结果本地排序得出(闲鱼搜索接口不返回销量)。为避免触发风控,所有规则共用串行队列、两次搜索固定间隔 1 秒,请把检查间隔设得宽松些,建议不低于 15 分钟。"}),u&&e.jsx(E,{type:u.type,message:u.message,onClose:()=>c(null)}),m&&e.jsx(E,{type:"error",message:`加载失败:${m}`}),!t.length&&!m?e.jsx(V,{title:"还没有监控规则",description:"点「新建监控规则」,填关键词与价格条件后即可实时搜到最低价。",icon:R}):e.jsx("div",{className:"overflow-hidden rounded-lg border border-[var(--border-light)] bg-[var(--surface)] shadow-sm",children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"data-table responsive-data-table min-w-[1100px]",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{className:"w-[20%]",children:"规则"}),e.jsx("th",{className:"w-[17%]",children:"条件"}),e.jsx("th",{className:"w-[22%]",children:"最近一次"}),e.jsx("th",{className:"w-[13%]",children:"下次检查"}),e.jsx("th",{className:"w-[11%]",children:"进度"}),e.jsx("th",{className:"w-[17%] text-right",children:"操作"})]})}),e.jsx("tbody",{children:t.map(s=>{var j,W;const r=s.running,a=s.last_record,P=a!=null&&a.lowest_price!==null&&a.lowest_price!==void 0;return e.jsxs("tr",{children:[e.jsx("td",{"data-label":"规则",children:e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"break-words font-medium text-[var(--text-primary)]",title:s.name,children:s.name}),e.jsxs("div",{className:"break-words text-xs text-[var(--text-muted)]",title:s.keyword,children:["关键词:",s.keyword]}),e.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-2 text-xs",children:[e.jsx("span",{className:`inline-flex items-center rounded px-1.5 py-0.5 ${s.enabled?"bg-emerald-50 text-emerald-700":"bg-slate-100 text-slate-500"}`,children:s.enabled?"运行中":"已停用"}),e.jsxs("span",{className:"text-[var(--text-muted)]",children:["每 ",s.interval_minutes," 分钟"]})]})]})}),e.jsx("td",{"data-label":"条件",children:e.jsxs("div",{className:"text-sm text-[var(--text-secondary)]",children:[e.jsxs("div",{children:[s.min_price===null?"不限":x(s.min_price)," ~ ",s.max_price===null?"不限":x(s.max_price)]}),e.jsx("div",{className:s.target_price!==null?"text-[var(--brand-primary)]":"text-[var(--text-muted)]",children:s.target_price!==null?`目标价 ${x(s.target_price)}`:"新低价即通知"}),(s.min_seller_credit||s.min_seller_deals!=null||s.ai_precise)&&e.jsxs("div",{className:"mt-1 flex flex-wrap gap-1",children:[s.min_seller_credit&&e.jsxs("span",{className:"rounded bg-slate-100 px-1.5 py-0.5 text-[11px] text-slate-600",children:["信用≥",s.min_seller_credit]}),s.min_seller_deals!=null&&e.jsxs("span",{className:"rounded bg-slate-100 px-1.5 py-0.5 text-[11px] text-slate-600",children:["销量≥",s.min_seller_deals]}),s.ai_precise&&e.jsx("span",{className:"rounded bg-indigo-100 px-1.5 py-0.5 text-[11px] text-indigo-700",children:"AI 精准"})]}),e.jsxs("div",{className:"text-xs text-[var(--text-muted)]",children:["每轮 ",s.pages," 页 · 历史 ",s.history_count," 条"]})]})}),e.jsx("td",{"data-label":"最近一次",children:a?a.error?e.jsxs("span",{className:"text-sm text-amber-600",title:a.error,children:["上次出错:",a.error.slice(0,24)]}):P?e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-1.5 font-semibold text-emerald-600",children:[e.jsx(X,{className:"h-3.5 w-3.5 shrink-0"}),x(a.lowest_price),a.notified?e.jsx(R,{className:"h-3 w-3 text-[var(--brand-primary)]","aria-label":"已通知"}):null]}),e.jsx("div",{className:"break-words text-xs text-[var(--text-muted)]",title:a.lowest_title??"",children:a.lowest_title}),e.jsxs("div",{className:"text-xs text-[var(--text-muted)]",children:[L(I()-a.checked_at)," · 比价 ",a.item_count," 件",a.source==="auto"?" · 自动":""]})]}):e.jsxs("span",{className:"text-sm text-[var(--text-muted)]",children:["没搜到可比价商品 · ",L(I()-a.checked_at)]}):e.jsx("span",{className:"text-sm text-[var(--text-muted)]",children:"还没检查过"})}),e.jsx("td",{"data-label":"下次检查",children:e.jsxs("div",{className:"text-sm text-[var(--text-secondary)]",children:[r?"检查中…":Ee(s.next_run_in),e.jsxs("div",{className:"text-xs text-[var(--text-muted)]",children:["上次"," ",s.last_run_at?L(I()-s.last_run_at):"—"]})]})}),e.jsx("td",{"data-label":"进度",children:r?e.jsxs("div",{className:"text-xs text-[var(--text-secondary)]",children:[e.jsxs("span",{className:"inline-flex items-center gap-1",children:[e.jsx(M,{className:"h-3 w-3 animate-spin"}),s.progress?`${s.progress.done}/${s.progress.total}`:"启动中"]}),((j=s.progress)==null?void 0:j.keyword)&&e.jsx("div",{className:"truncate text-[var(--text-muted)]",title:s.progress.keyword,children:s.progress.keyword}),((W=s.progress)==null?void 0:W.error)&&e.jsx("div",{className:"text-amber-600",children:s.progress.error.slice(0,20)})]}):e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:s.manual_cooldown_remaining>0?`手动冷却 ${Math.ceil(s.manual_cooldown_remaining)}s`:"空闲"})}),e.jsx("td",{"data-label":"操作",children:e.jsxs("div",{className:"flex flex-wrap justify-end gap-1.5",children:[e.jsxs("button",{type:"button",onClick:()=>void ie(s),disabled:r||s.manual_cooldown_remaining>0,className:"ios-btn-secondary inline-flex items-center gap-1 rounded-md px-2.5 py-1.5 text-xs disabled:opacity-50",title:s.manual_cooldown_remaining>0?"手动检查冷却中":"立即搜索一次",children:[e.jsx(_e,{className:"h-3.5 w-3.5"}),"立即检查"]}),e.jsxs("button",{type:"button",onClick:()=>void de(s),className:"ios-btn-secondary inline-flex items-center gap-1 rounded-md px-2.5 py-1.5 text-xs",children:[e.jsx(Pe,{className:"h-3.5 w-3.5"}),"历史"]}),e.jsxs("button",{type:"button",onClick:()=>re(s),className:"ios-btn-secondary inline-flex items-center gap-1 rounded-md px-2.5 py-1.5 text-xs",children:[e.jsx(fe,{className:"h-3.5 w-3.5"}),"编辑"]}),e.jsxs("button",{type:"button",onClick:()=>void ce(s),className:"ios-btn-secondary inline-flex items-center gap-1 rounded-md px-2.5 py-1.5 text-xs text-rose-600 hover:bg-rose-50",children:[e.jsx(we,{className:"h-3.5 w-3.5"}),"删除"]})]})})]},s.id)})})]})})}),t.some(s=>s.running)&&e.jsxs("div",{className:"flex items-center gap-2 text-sm text-[var(--text-muted)]",children:[e.jsx(M,{className:"h-4 w-4 animate-spin"}),"有规则正在检查,结果会自动刷新。"]}),se&&e.jsx("div",{className:"modal-overlay",role:"dialog","aria-modal":"true","aria-label":"监控规则",children:e.jsxs("div",{className:"modal-container max-h-[92vh] w-full max-w-[680px] overflow-y-auto",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border-light)] px-6 py-4",children:[e.jsx("h3",{className:"text-lg font-semibold text-[var(--text-primary)]",children:N===null?"新建监控规则":"编辑监控规则"}),e.jsx("button",{type:"button",onClick:()=>y(!1),className:"rounded-full p-1.5 text-[var(--text-muted)] hover:bg-slate-100","aria-label":"关闭",children:e.jsx(q,{className:"h-5 w-5"})})]}),e.jsxs("div",{className:"space-y-4 px-6 py-5",children:[e.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[e.jsxs("label",{className:"block text-sm",children:[e.jsx("span",{className:"mb-1.5 block font-medium text-[var(--text-secondary)]",children:"规则名称"}),e.jsx("input",{type:"text",value:l.name,onChange:s=>d({...l,name:s.target.value}),placeholder:"留空则用关键词",className:"ios-input w-full rounded-md px-3 py-2.5"})]}),e.jsxs("label",{className:"block text-sm",children:[e.jsx("span",{className:"mb-1.5 block font-medium text-[var(--text-secondary)]",children:"搜索关键词 *"}),e.jsx("input",{type:"text",value:l.keyword,onChange:s=>d({...l,keyword:s.target.value}),placeholder:"如 iPhone 15",className:"ios-input w-full rounded-md px-3 py-2.5"})]})]}),e.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-3",children:[e.jsxs("label",{className:"block text-sm",children:[e.jsx("span",{className:"mb-1.5 block font-medium text-[var(--text-secondary)]",children:"最低价(元)"}),e.jsx("input",{type:"number",min:"0",step:"1",inputMode:"decimal",value:l.min_price,onChange:s=>d({...l,min_price:s.target.value}),placeholder:"不限",className:"ios-input w-full rounded-md px-3 py-2.5"})]}),e.jsxs("label",{className:"block text-sm",children:[e.jsx("span",{className:"mb-1.5 block font-medium text-[var(--text-secondary)]",children:"最高价(元)"}),e.jsx("input",{type:"number",min:"0",step:"1",inputMode:"decimal",value:l.max_price,onChange:s=>d({...l,max_price:s.target.value}),placeholder:"不限",className:"ios-input w-full rounded-md px-3 py-2.5"})]}),e.jsxs("label",{className:"block text-sm",children:[e.jsx("span",{className:"mb-1.5 block font-medium text-[var(--text-secondary)]",children:"目标价(元)"}),e.jsx("input",{type:"number",min:"0",step:"1",inputMode:"decimal",value:l.target_price,onChange:s=>d({...l,target_price:s.target.value}),placeholder:"留空=新低价即通知",className:"ios-input w-full rounded-md px-3 py-2.5"})]})]}),e.jsx("p",{className:"-mt-2 text-xs text-[var(--text-muted)]",children:"目标价留空时,只要比上次低就通知;填了则要低于等于目标价才通知。"}),e.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[e.jsxs("label",{className:"block text-sm",children:[e.jsx("span",{className:"mb-1.5 block font-medium text-[var(--text-secondary)]",children:"卖家信用度"}),e.jsxs("select",{value:l.min_seller_credit,onChange:s=>d({...l,min_seller_credit:s.target.value}),className:"ios-input w-full rounded-md px-3 py-2.5",children:[e.jsx("option",{value:"",children:"不限(含未标注信用的卖家)"}),e.jsx("option",{value:"极好",children:"「极好」及以上"}),e.jsx("option",{value:"优秀",children:"「优秀」及以上"}),e.jsx("option",{value:"良好",children:"「良好」及以上"})]})]}),e.jsxs("label",{className:"block text-sm",children:[e.jsx("span",{className:"mb-1.5 block font-medium text-[var(--text-secondary)]",children:"卖家销量下限(条评价)"}),e.jsx("input",{type:"number",min:"0",step:"1",value:l.min_seller_deals,onChange:s=>d({...l,min_seller_deals:s.target.value}),placeholder:"不限",className:"ios-input w-full rounded-md px-3 py-2.5"})]})]}),e.jsxs("p",{className:"-mt-1 text-xs text-[var(--text-muted)]",children:[e.jsx("b",{children:"销量"}),":闲鱼是单件二手成交、没有商品级销量,这里按卖家的「N 条评价」 累计量筛(如「126 条评价」≈ 该卖家已成交 126 单,越大越靠谱)—— 实测每条商品",e.jsx("b",{children:"都能取到"}),",放心用。",e.jsx("br",{}),e.jsx("b",{children:"信用度"}),":取自搜索结果的「卖家信用极好 / 优秀」标签,",e.jsx("b",{children:"但闲鱼只给部分卖家显示该标签"}),"(实测同类商品可能 0~3 条有标注),",e.jsx("b",{children:"选了具体等级后,未标注的卖家会被排除"}),",结果可能明显变少甚至为空—— 这是数据本身的限制,不是故障;建议先点下方「实时试搜」确认数量再保存, 拿不准就选「不限」。"]}),e.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-3",children:[e.jsxs("label",{className:"block text-sm",children:[e.jsx("span",{className:"mb-1.5 block font-medium text-[var(--text-secondary)]",children:"检查间隔(分钟)"}),e.jsx("input",{type:"number",min:"5",step:"1",value:l.interval_minutes,onChange:s=>d({...l,interval_minutes:s.target.value}),className:"ios-input w-full rounded-md px-3 py-2.5"})]}),e.jsxs("label",{className:"block text-sm",children:[e.jsx("span",{className:"mb-1.5 block font-medium text-[var(--text-secondary)]",children:"每轮页数"}),e.jsx("input",{type:"number",min:"1",max:"5",step:"1",value:l.pages,onChange:s=>d({...l,pages:s.target.value}),className:"ios-input w-full rounded-md px-3 py-2.5"})]}),e.jsxs("label",{className:"block text-sm",children:[e.jsx("span",{className:"mb-1.5 block font-medium text-[var(--text-secondary)]",children:"搜索账号"}),e.jsxs("select",{value:l.cookie_id,onChange:s=>d({...l,cookie_id:s.target.value}),className:"ios-input w-full rounded-md px-3 py-2.5",children:[e.jsx("option",{value:"",children:"自动选择"}),ee.map(s=>e.jsxs("option",{value:s.id,children:["账号 ",s.id]},s.id))]})]})]}),e.jsxs("label",{className:"flex cursor-pointer items-center gap-2 text-sm text-[var(--text-secondary)]",children:[e.jsx("input",{type:"checkbox",checked:l.enabled,onChange:s=>d({...l,enabled:s.target.checked}),className:"h-4 w-4 rounded border-slate-300"}),"启用自动检查(按间隔后台运行)"]}),e.jsxs("label",{className:"flex cursor-pointer items-center gap-2 text-sm text-[var(--text-secondary)]",children:[e.jsx("input",{type:"checkbox",checked:l.ai_precise,onChange:s=>d({...l,ai_precise:s.target.checked}),className:"h-4 w-4 rounded border-slate-300"}),e.jsxs("span",{children:["启用 ",e.jsx("b",{className:"text-indigo-600",children:"AI 精准监控"}),e.jsx("span",{className:"ml-1 text-xs text-[var(--text-muted)]",children:"(大模型逐条判断商品是否真的匹配关键词)"})]})]}),l.ai_precise&&e.jsxs("div",{className:"rounded-lg border border-indigo-200 bg-indigo-50/70 p-3.5 text-xs leading-relaxed text-indigo-950",children:[e.jsx("div",{className:"mb-2 font-semibold text-indigo-700",children:"启用 AI 有什么好处?"}),e.jsxs("ul",{className:"list-disc space-y-1.5 pl-4",children:[e.jsxs("li",{children:[e.jsx("b",{children:"过滤标题党与无关商品"}),":关键词命中标题但实际不卖这个的直接剔除, 通知里不再混进一堆看似相关、点进去却对不上的结果。"]}),e.jsxs("li",{children:[e.jsx("b",{children:"识别真实规格与成色"}),":分清 128G / 256G、有锁 / 国行、全新 / 骗修, 避免「假低价」——便宜那台其实是另一个规格,比价才准。"]}),e.jsxs("li",{children:[e.jsx("b",{children:"排除风险商品"}),":描述前后矛盾、疑似引流或诈骗话术的商品不进入比价。"]}),e.jsxs("li",{children:[e.jsx("b",{children:"通知更精准、少打扰"}),":只有通过判断的商品参与「新低价」比较, 你收到的每条降价提醒都是真值得点的。"]})]}),e.jsxs("div",{className:"mt-2.5 border-t border-indigo-200 pt-2 text-[11px] text-indigo-800",children:[e.jsx("b",{children:"成本与兜底"}),":每轮对前 20 条商品",e.jsx("b",{children:"批量调用一次"}),"大模型 (走「AI 优化建议」里已配置的模型 KEY,约增加几秒延迟);",e.jsx("b",{children:"未配置 KEY 或调用失败会自动跳过并保留全部结果"}),"——AI 挂了监控照常跑, 宁可多报也不漏报。"]})]}),e.jsxs("div",{className:"rounded-lg border border-[var(--border-light)] bg-slate-50 p-4",children:[e.jsxs("div",{className:"mb-3 flex items-center justify-between gap-3",children:[e.jsxs("div",{className:"text-sm font-medium text-[var(--text-secondary)]",children:[e.jsx(Z,{className:"mr-1.5 inline h-4 w-4"}),"实时试搜(不保存、不通知)"]}),e.jsxs("button",{type:"button",onClick:()=>void le(),disabled:C,className:"ios-btn-secondary inline-flex items-center gap-1.5 rounded-md px-3 py-2 text-sm disabled:opacity-50",children:[e.jsx(Z,{className:`h-4 w-4 ${C?"animate-pulse":""}`}),C?"搜索中…":"搜索最低价"]})]}),B&&e.jsxs("div",{className:"mb-3 flex items-start gap-2 rounded-md bg-amber-50 px-3 py-2 text-sm text-amber-700",children:[e.jsx(xe,{className:"mt-0.5 h-4 w-4 shrink-0"}),e.jsx("span",{children:B})]}),(o==null?void 0:o.lowest)&&e.jsxs("div",{className:"mb-3 rounded-md border border-emerald-200 bg-emerald-50 p-3",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium text-emerald-700",children:[e.jsx(pe,{className:"h-4 w-4"}),"当前最低价 ",x(o.lowest.price_value)]}),e.jsx("a",{href:o.lowest.url,target:"_blank",rel:"noreferrer",className:"shrink-0 text-xs text-[var(--brand-primary)] hover:underline",children:"查看商品"})]}),e.jsx("div",{className:"mt-1 line-clamp-2 text-sm text-emerald-900/80",children:o.lowest.title}),e.jsxs("div",{className:"mt-1 text-xs text-emerald-700/70",children:["参与比价 ",o.matched," / ",o.count," 件",o.ai_note?` · ${o.ai_note}`:""]})]}),o&&o.items.length>0&&e.jsx("div",{className:"max-h-[220px] space-y-1.5 overflow-y-auto",children:o.items.slice(0,8).map((s,r)=>e.jsxs("a",{href:s.url,target:"_blank",rel:"noreferrer",className:"flex items-center justify-between gap-3 rounded-md bg-white px-3 py-2 text-sm hover:bg-slate-100",children:[e.jsx("span",{className:"min-w-0 flex-1 truncate text-[var(--text-secondary)]",children:s.title}),e.jsx("span",{className:"shrink-0 font-medium text-emerald-600",children:x(s.price_value)})]},s.item_id||r))})]}),O&&e.jsx("div",{className:"text-sm text-rose-600",children:O})]}),e.jsxs("div",{className:"modal-footer flex justify-end gap-3 border-t border-[var(--border-light)] px-6 py-4",children:[e.jsx("button",{type:"button",onClick:()=>y(!1),className:"ios-btn-secondary rounded-md px-4 py-2.5",children:"取消"}),e.jsx("button",{type:"button",onClick:()=>void ne(),disabled:T,className:"ios-btn-primary rounded-md px-4 py-2.5 disabled:opacity-50",children:T?"保存中…":N===null?"创建规则":"保存修改"})]})]})}),S&&e.jsx("div",{className:"modal-overlay",role:"dialog","aria-modal":"true","aria-label":"检查历史",children:e.jsxs("div",{className:"modal-container max-h-[90vh] w-full max-w-[980px] overflow-y-auto",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border-light)] px-6 py-4",children:[e.jsxs("div",{children:[e.jsxs("h3",{className:"text-lg font-semibold text-[var(--text-primary)]",children:["检查历史 · ",S.name]}),e.jsxs("p",{className:"mt-0.5 text-xs text-[var(--text-muted)]",children:["关键词「",S.keyword,"」,保留最近 100 次"]})]}),e.jsx("button",{type:"button",onClick:()=>z(null),className:"rounded-full p-1.5 text-[var(--text-muted)] hover:bg-slate-100","aria-label":"关闭",children:e.jsx(q,{className:"h-5 w-5"})})]}),e.jsx("div",{className:"px-6 py-5",children:te?e.jsx(U,{}):G.length?e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"data-table responsive-data-table min-w-[760px]",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{className:"w-[18%]",children:"时间"}),e.jsx("th",{className:"w-[12%]",children:"最低价"}),e.jsx("th",{children:"商品"}),e.jsx("th",{className:"w-[10%]",children:"比价数"}),e.jsx("th",{className:"w-[16%]",children:"结果"})]})}),e.jsx("tbody",{children:G.map(s=>e.jsxs("tr",{children:[e.jsxs("td",{"data-label":"时间",children:[e.jsx("div",{className:"text-sm text-[var(--text-secondary)]",children:new Date(s.checked_at*1e3).toLocaleString("zh-CN",{hour12:!1})}),e.jsx("div",{className:"text-xs text-[var(--text-muted)]",children:s.source==="auto"?"自动":"手动"})]}),e.jsx("td",{"data-label":"最低价",children:s.lowest_price===null||s.lowest_price===void 0?e.jsx("span",{className:"text-sm text-[var(--text-muted)]",children:"—"}):e.jsx("span",{className:"font-semibold text-emerald-600",children:x(s.lowest_price)})}),e.jsx("td",{"data-label":"商品",children:s.lowest_url?e.jsx("a",{href:s.lowest_url,target:"_blank",rel:"noreferrer",className:"block max-w-[380px] break-words text-sm text-[var(--brand-primary)] hover:underline",title:s.lowest_title??"",children:s.lowest_title||"(无标题)"}):e.jsx("span",{className:"block max-w-[380px] break-words text-sm text-[var(--text-muted)]",children:s.lowest_title||"—"})}),e.jsx("td",{"data-label":"比价数",children:e.jsxs("span",{className:"text-sm text-[var(--text-secondary)]",children:[s.item_count," 件"]})}),e.jsx("td",{"data-label":"结果",children:s.error?e.jsxs("span",{className:"text-xs text-amber-600",title:s.error,children:["出错:",s.error.slice(0,18)]}):s.lowest_price===null||s.lowest_price===void 0?e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:"无可比价商品"}):e.jsx("span",{className:`inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-xs ${s.notified?"bg-emerald-50 text-emerald-700":"bg-slate-100 text-slate-500"}`,children:s.notified?e.jsxs(e.Fragment,{children:[e.jsx(R,{className:"h-3 w-3"}),"已通知"]}):"已记录"})})]},s.id))})]})}):e.jsx(V,{title:"还没有检查记录",description:"点规则右侧的「立即检查」跑一次。",icon:Se})})]})})]})}export{Oe as default}; diff --git a/static/assets/ProductAutomation-pKlYog5s.js b/static/assets/ProductAutomation-DCR1XEfL.js similarity index 98% rename from static/assets/ProductAutomation-pKlYog5s.js rename to static/assets/ProductAutomation-DCR1XEfL.js index 80291e1..96fea53 100644 --- a/static/assets/ProductAutomation-pKlYog5s.js +++ b/static/assets/ProductAutomation-DCR1XEfL.js @@ -1,4 +1,4 @@ -import{c as H,r as c,j as e,aA as J,e as ye,S as ge,E as be,L as j,aB as je,aC as _e,aD as Ne,aE as ve,X as O,o as fe,aF as we,aG as ke,aH as Ce,aI as U,n as r,v as E,aJ as $e,aK as Se,aL as Pe,aM as De,aN as Re,aO as Fe,aP as Me,aQ as Le}from"./index-BtyeumGM.js";import{P as Ie,a as Ae,b as Ee,S as _,E as N,N as ze}from"./ui-Bucd7ZQW.js";import{S as C}from"./search-Dm0kd19J.js";import{T as v}from"./trash-2-Cpz1crux.js";import{S as z}from"./save-B_0bwRwJ.js";import{P as X}from"./play-RrpCCHk6.js";import{P as Te}from"./package-check-OgTe2cXI.js";import{L as Be}from"./link-2-YAS_V1Cj.js";/** +import{c as H,r as c,j as e,aA as J,e as ye,S as ge,E as be,L as j,aB as je,aC as _e,aD as Ne,aE as ve,X as O,o as fe,aF as we,aG as ke,aH as Ce,aI as U,n as r,v as E,aJ as $e,aK as Se,aL as Pe,aM as De,aN as Re,aO as Fe,aP as Me,aQ as Le}from"./index-IP-mmLlr.js";import{P as Ie,a as Ae,b as Ee,S as _,E as N,N as ze}from"./ui-Fi8l9rTp.js";import{S as C}from"./search-TGrYyOkD.js";import{T as v}from"./trash-2-BNPsgs2t.js";import{S as z}from"./save-CNiIU-3u.js";import{P as X}from"./play-CYUspTVx.js";import{P as Te}from"./package-check-OAWoRoy_.js";import{L as Be}from"./link-2-xKkzn7ZQ.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/Resell-MelTfsde.js b/static/assets/Resell-CYFkAG_P.js similarity index 98% rename from static/assets/Resell-MelTfsde.js rename to static/assets/Resell-CYFkAG_P.js index c82a722..baa5888 100644 --- a/static/assets/Resell-MelTfsde.js +++ b/static/assets/Resell-CYFkAG_P.js @@ -1,4 +1,4 @@ -import{c as Fe,r,o as Ee,j as e,bG as le,L as g,b as Re,X as ie,E as Ae,bH as $e,bI as Ue,bJ as qe,bK as De,bL as Me,bM as Te}from"./index-BtyeumGM.js";import{a as ze,N as Be,b as He,E as ne}from"./ui-Bucd7ZQW.js";import{S as F}from"./search-Dm0kd19J.js";import{P as Oe}from"./plus-D66LUkyr.js";import{S as Ke}from"./sparkles-CTC5UJ5I.js";import{P as We}from"./package-DRVL5sin.js";/** +import{c as Fe,r,o as Ee,j as e,bG as le,L as g,b as Re,X as ie,E as Ae,bH as $e,bI as Ue,bJ as qe,bK as De,bL as Me,bM as Te}from"./index-IP-mmLlr.js";import{a as ze,N as Be,b as He,E as ne}from"./ui-Fi8l9rTp.js";import{S as F}from"./search-TGrYyOkD.js";import{P as Oe}from"./plus-BbnHS2Zx.js";import{S as Ke}from"./sparkles-CavN45fA.js";import{P as We}from"./package-C7ydMeAZ.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/Settings-MN37oq4U.js b/static/assets/Settings-6SylkBTn.js similarity index 98% rename from static/assets/Settings-MN37oq4U.js rename to static/assets/Settings-6SylkBTn.js index 9b5b7d9..b75c67d 100644 --- a/static/assets/Settings-MN37oq4U.js +++ b/static/assets/Settings-6SylkBTn.js @@ -1,4 +1,4 @@ -import{c as se,r as l,aS as ae,j as e,l as te,e as K,aT as ne,aU as v,aV as q,S as le,ak as O,aW as ie,aX as re,n as c,aY as ce,aZ as oe,a_ as de,a$ as pe,b0 as me,b1 as ue}from"./index-BtyeumGM.js";import{P as xe,a as he,b as ge,S as p,N as ye}from"./ui-Bucd7ZQW.js";import{S as je}from"./save-B_0bwRwJ.js";import{S as Q}from"./sparkles-CTC5UJ5I.js";import{Z as L}from"./zap-BAdVhmYa.js";import{E as w}from"./eye-off-BfkVRJHJ.js";import{E as C}from"./eye-C6bcwqAG.js";/** +import{c as se,r as l,aS as ae,j as e,l as te,e as K,aT as ne,aU as v,aV as q,S as le,ak as O,aW as ie,aX as re,n as c,aY as ce,aZ as oe,a_ as de,a$ as pe,b0 as me,b1 as ue}from"./index-IP-mmLlr.js";import{P as xe,a as he,b as ge,S as p,N as ye}from"./ui-Fi8l9rTp.js";import{S as je}from"./save-CNiIU-3u.js";import{S as Q}from"./sparkles-CavN45fA.js";import{Z as L}from"./zap-DljT2UQs.js";import{E as w}from"./eye-off-B2vwWUUu.js";import{E as C}from"./eye-BxUVYll7.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/UserManagement-DNkJBqM1.js b/static/assets/UserManagement-DkSfyiXx.js similarity index 98% rename from static/assets/UserManagement-DNkJBqM1.js rename to static/assets/UserManagement-DkSfyiXx.js index bc84804..a162091 100644 --- a/static/assets/UserManagement-DNkJBqM1.js +++ b/static/assets/UserManagement-DkSfyiXx.js @@ -1 +1 @@ -import{r as l,j as e,U as h,e as $,S as j,aT as A,L as f,ak as T,bz as L,n as i,v as y,bA as P,bB as R,aY as E,bC as _}from"./index-BtyeumGM.js";import{a as I,S as N,E as B}from"./ui-Bucd7ZQW.js";import{T as z}from"./trash-2-Cpz1crux.js";const D=n=>{if(!n)return"-";const c=new Date(n.includes("T")?n:`${n.replace(" ","T")}Z`);return Number.isNaN(c.getTime())?n:c.toLocaleString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})},Y=()=>{const[n,c]=l.useState([]),[u,g]=l.useState(!0),[o,d]=l.useState(null),[w,p]=l.useState(null),[b,m]=l.useState(""),x=async()=>{g(!0);try{c(await L())}catch(t){i(`加载用户列表失败:${t.message}`,"error")}finally{g(!1)}};l.useEffect(()=>{x()},[]);const U=async t=>{if(o!==null)return;const s=t.is_active!==!1;if(!(s&&!await y(`禁用用户「${t.username}」?其所有在线会话将立即下线,且无法再登录。`,{title:"禁用用户",confirmLabel:"禁用",danger:!0}))){d(t.id);try{const a=await P(t.id,!s);i(a.message||"状态已更新","success"),await x()}catch(a){i(`操作失败:${a.message}`,"error")}finally{d(null)}}},C=async t=>{const[s,a]=E(b);if(!s){i(a,"warning");return}if(o===null){d(t.id);try{const r=await _(t.id,b);i(r.message||"密码已重置","success"),p(null),m("")}catch(r){i(`重置失败:${r.message}`,"error")}finally{d(null)}}},k=async t=>{if(o===null&&await y(`删除用户「${t.username}」?其名下的闲鱼账号、卡密、回复规则等数据将一并删除,不可恢复。`,{title:"删除用户",confirmLabel:"删除",danger:!0})){d(t.id);try{const s=await R(t.id);i(s.message||"用户已删除","success"),await x()}catch(s){i(`删除失败:${s.message}`,"error")}finally{d(null)}}};return e.jsxs("div",{className:"page-stack",children:[e.jsx(I,{title:"用户管理",description:"管理注册用户与登录权限。普通用户仅能操作分配给其名下的账号数据。",icon:h,actions:e.jsxs("button",{type:"button",onClick:()=>void x(),className:"ios-btn-secondary flex items-center gap-2 rounded-md px-4 py-2.5 text-sm",children:[e.jsx($,{className:`h-4 w-4 ${u?"animate-spin":""}`}),"刷新"]})}),e.jsxs("section",{className:"section-panel",children:[e.jsx(N,{title:"权限说明",icon:j}),e.jsxs("div",{className:"grid gap-3 p-4 sm:grid-cols-2",children:[e.jsxs("div",{className:"rounded-lg border border-[var(--border)] bg-[var(--surface-subtle)] p-3.5",children:[e.jsxs("p",{className:"flex items-center gap-2 text-sm font-bold text-[var(--text)]",children:[e.jsx(j,{className:"h-4 w-4 text-[#8a6300]"}),"管理员(admin)"]}),e.jsx("p",{className:"mt-1.5 text-xs leading-5 text-[var(--text-muted)]",children:"拥有全部权限:系统设置、通知与系统日志、用户管理,以及所有闲鱼账号和数据。"})]}),e.jsxs("div",{className:"rounded-lg border border-[var(--border)] bg-[var(--surface-subtle)] p-3.5",children:[e.jsxs("p",{className:"flex items-center gap-2 text-sm font-bold text-[var(--text)]",children:[e.jsx(A,{className:"h-4 w-4 text-[var(--text-soft)]"}),"普通用户"]}),e.jsx("p",{className:"mt-1.5 text-xs leading-5 text-[var(--text-muted)]",children:"只能看到并操作自己名下的闲鱼账号、商品、订单与消息;侧栏不显示系统设置与用户管理,接口层也会拒绝其访问。"})]})]})]}),e.jsxs("section",{className:"section-panel",children:[e.jsx(N,{title:"用户列表",description:`共 ${n.length} 个用户`,icon:h}),e.jsxs("div",{className:"divide-y divide-[var(--border)]",children:[n.map(t=>{const s=t.username==="admin",a=t.is_active===!1,r=o===t.id,v=w===t.id;return e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-[var(--brand)] text-sm font-black text-[#2a2416]",children:t.username.slice(0,1).toUpperCase()}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("p",{className:"text-sm font-bold text-[var(--text)]",children:t.username}),s&&e.jsx("span",{className:"rounded-full bg-[var(--brand)] px-2 py-0.5 text-[10px] font-bold text-[#2a2416]",children:"内置管理员"}),e.jsx("span",{className:`rounded-full px-2 py-0.5 text-[10px] font-bold ${a?"bg-red-50 text-red-600":"bg-emerald-50 text-emerald-600"}`,children:a?"已禁用":"正常"})]}),e.jsx("p",{className:"mt-0.5 truncate text-xs text-[var(--text-muted)]",children:t.email}),e.jsxs("p",{className:"mt-1 text-[11px] text-[var(--text-soft)]",children:[t.cookie_count??0," 个闲鱼账号 · ",t.card_count??0," 张卡密 · 注册于 ",D(t.created_at)]})]}),!s&&e.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[e.jsx("button",{type:"button",onClick:()=>void U(t),disabled:r,className:a?"rounded-md bg-emerald-50 px-3 py-2 text-xs font-bold text-emerald-700 hover:bg-emerald-100 disabled:opacity-50":"rounded-md bg-amber-50 px-3 py-2 text-xs font-bold text-amber-700 hover:bg-amber-100 disabled:opacity-50",children:r?e.jsx(f,{className:"h-4 w-4 animate-spin"}):a?"启用":"禁用"}),e.jsx("button",{type:"button",onClick:()=>{p(v?null:t.id),m("")},disabled:r,title:"重置密码",className:"flex h-9 w-9 items-center justify-center rounded-md bg-[var(--surface-subtle)] text-[var(--text-muted)] hover:bg-[var(--surface-hover)] hover:text-[var(--text)] disabled:opacity-50",children:e.jsx(T,{className:"h-4 w-4"})}),e.jsx("button",{type:"button",onClick:()=>void k(t),disabled:r,title:"删除用户",className:"flex h-9 w-9 items-center justify-center rounded-md bg-red-50 text-red-600 hover:bg-red-100 disabled:opacity-50",children:e.jsx(z,{className:"h-4 w-4"})})]})]}),v&&!s&&e.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-2 rounded-lg border border-[var(--border)] bg-[var(--surface-subtle)] p-3",children:[e.jsx("input",{type:"password",value:b,onChange:S=>m(S.target.value),placeholder:"新密码:至少 8 位,含字母和数字",autoComplete:"new-password",className:"ios-input h-10 min-w-0 flex-1 rounded-md px-3 text-sm"}),e.jsx("button",{type:"button",onClick:()=>void C(t),disabled:r,className:"ios-btn-primary h-10 rounded-md px-4 text-sm disabled:opacity-50",children:r?e.jsx(f,{className:"h-4 w-4 animate-spin"}):"确认重置"}),e.jsx("button",{type:"button",onClick:()=>{p(null),m("")},className:"ios-btn-secondary h-10 rounded-md px-4 text-sm",children:"取消"})]})]},t.id)}),!u&&n.length===0&&e.jsx(B,{compact:!0,title:"暂无用户",description:"开放注册后,新注册的用户会出现在这里。",icon:h}),u&&e.jsx("div",{className:"flex justify-center py-12",children:e.jsx(f,{className:"h-6 w-6 animate-spin text-[#d6b600]"})})]})]})]})};export{Y as default}; +import{r as l,j as e,U as h,e as $,S as j,aT as A,L as f,ak as T,bz as L,n as i,v as y,bA as P,bB as R,aY as E,bC as _}from"./index-IP-mmLlr.js";import{a as I,S as N,E as B}from"./ui-Fi8l9rTp.js";import{T as z}from"./trash-2-BNPsgs2t.js";const D=n=>{if(!n)return"-";const c=new Date(n.includes("T")?n:`${n.replace(" ","T")}Z`);return Number.isNaN(c.getTime())?n:c.toLocaleString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})},Y=()=>{const[n,c]=l.useState([]),[u,g]=l.useState(!0),[o,d]=l.useState(null),[w,p]=l.useState(null),[b,m]=l.useState(""),x=async()=>{g(!0);try{c(await L())}catch(t){i(`加载用户列表失败:${t.message}`,"error")}finally{g(!1)}};l.useEffect(()=>{x()},[]);const U=async t=>{if(o!==null)return;const s=t.is_active!==!1;if(!(s&&!await y(`禁用用户「${t.username}」?其所有在线会话将立即下线,且无法再登录。`,{title:"禁用用户",confirmLabel:"禁用",danger:!0}))){d(t.id);try{const a=await P(t.id,!s);i(a.message||"状态已更新","success"),await x()}catch(a){i(`操作失败:${a.message}`,"error")}finally{d(null)}}},C=async t=>{const[s,a]=E(b);if(!s){i(a,"warning");return}if(o===null){d(t.id);try{const r=await _(t.id,b);i(r.message||"密码已重置","success"),p(null),m("")}catch(r){i(`重置失败:${r.message}`,"error")}finally{d(null)}}},k=async t=>{if(o===null&&await y(`删除用户「${t.username}」?其名下的闲鱼账号、卡密、回复规则等数据将一并删除,不可恢复。`,{title:"删除用户",confirmLabel:"删除",danger:!0})){d(t.id);try{const s=await R(t.id);i(s.message||"用户已删除","success"),await x()}catch(s){i(`删除失败:${s.message}`,"error")}finally{d(null)}}};return e.jsxs("div",{className:"page-stack",children:[e.jsx(I,{title:"用户管理",description:"管理注册用户与登录权限。普通用户仅能操作分配给其名下的账号数据。",icon:h,actions:e.jsxs("button",{type:"button",onClick:()=>void x(),className:"ios-btn-secondary flex items-center gap-2 rounded-md px-4 py-2.5 text-sm",children:[e.jsx($,{className:`h-4 w-4 ${u?"animate-spin":""}`}),"刷新"]})}),e.jsxs("section",{className:"section-panel",children:[e.jsx(N,{title:"权限说明",icon:j}),e.jsxs("div",{className:"grid gap-3 p-4 sm:grid-cols-2",children:[e.jsxs("div",{className:"rounded-lg border border-[var(--border)] bg-[var(--surface-subtle)] p-3.5",children:[e.jsxs("p",{className:"flex items-center gap-2 text-sm font-bold text-[var(--text)]",children:[e.jsx(j,{className:"h-4 w-4 text-[#8a6300]"}),"管理员(admin)"]}),e.jsx("p",{className:"mt-1.5 text-xs leading-5 text-[var(--text-muted)]",children:"拥有全部权限:系统设置、通知与系统日志、用户管理,以及所有闲鱼账号和数据。"})]}),e.jsxs("div",{className:"rounded-lg border border-[var(--border)] bg-[var(--surface-subtle)] p-3.5",children:[e.jsxs("p",{className:"flex items-center gap-2 text-sm font-bold text-[var(--text)]",children:[e.jsx(A,{className:"h-4 w-4 text-[var(--text-soft)]"}),"普通用户"]}),e.jsx("p",{className:"mt-1.5 text-xs leading-5 text-[var(--text-muted)]",children:"只能看到并操作自己名下的闲鱼账号、商品、订单与消息;侧栏不显示系统设置与用户管理,接口层也会拒绝其访问。"})]})]})]}),e.jsxs("section",{className:"section-panel",children:[e.jsx(N,{title:"用户列表",description:`共 ${n.length} 个用户`,icon:h}),e.jsxs("div",{className:"divide-y divide-[var(--border)]",children:[n.map(t=>{const s=t.username==="admin",a=t.is_active===!1,r=o===t.id,v=w===t.id;return e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-[var(--brand)] text-sm font-black text-[#2a2416]",children:t.username.slice(0,1).toUpperCase()}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("p",{className:"text-sm font-bold text-[var(--text)]",children:t.username}),s&&e.jsx("span",{className:"rounded-full bg-[var(--brand)] px-2 py-0.5 text-[10px] font-bold text-[#2a2416]",children:"内置管理员"}),e.jsx("span",{className:`rounded-full px-2 py-0.5 text-[10px] font-bold ${a?"bg-red-50 text-red-600":"bg-emerald-50 text-emerald-600"}`,children:a?"已禁用":"正常"})]}),e.jsx("p",{className:"mt-0.5 truncate text-xs text-[var(--text-muted)]",children:t.email}),e.jsxs("p",{className:"mt-1 text-[11px] text-[var(--text-soft)]",children:[t.cookie_count??0," 个闲鱼账号 · ",t.card_count??0," 张卡密 · 注册于 ",D(t.created_at)]})]}),!s&&e.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[e.jsx("button",{type:"button",onClick:()=>void U(t),disabled:r,className:a?"rounded-md bg-emerald-50 px-3 py-2 text-xs font-bold text-emerald-700 hover:bg-emerald-100 disabled:opacity-50":"rounded-md bg-amber-50 px-3 py-2 text-xs font-bold text-amber-700 hover:bg-amber-100 disabled:opacity-50",children:r?e.jsx(f,{className:"h-4 w-4 animate-spin"}):a?"启用":"禁用"}),e.jsx("button",{type:"button",onClick:()=>{p(v?null:t.id),m("")},disabled:r,title:"重置密码",className:"flex h-9 w-9 items-center justify-center rounded-md bg-[var(--surface-subtle)] text-[var(--text-muted)] hover:bg-[var(--surface-hover)] hover:text-[var(--text)] disabled:opacity-50",children:e.jsx(T,{className:"h-4 w-4"})}),e.jsx("button",{type:"button",onClick:()=>void k(t),disabled:r,title:"删除用户",className:"flex h-9 w-9 items-center justify-center rounded-md bg-red-50 text-red-600 hover:bg-red-100 disabled:opacity-50",children:e.jsx(z,{className:"h-4 w-4"})})]})]}),v&&!s&&e.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-2 rounded-lg border border-[var(--border)] bg-[var(--surface-subtle)] p-3",children:[e.jsx("input",{type:"password",value:b,onChange:S=>m(S.target.value),placeholder:"新密码:至少 8 位,含字母和数字",autoComplete:"new-password",className:"ios-input h-10 min-w-0 flex-1 rounded-md px-3 text-sm"}),e.jsx("button",{type:"button",onClick:()=>void C(t),disabled:r,className:"ios-btn-primary h-10 rounded-md px-4 text-sm disabled:opacity-50",children:r?e.jsx(f,{className:"h-4 w-4 animate-spin"}):"确认重置"}),e.jsx("button",{type:"button",onClick:()=>{p(null),m("")},className:"ios-btn-secondary h-10 rounded-md px-4 text-sm",children:"取消"})]})]},t.id)}),!u&&n.length===0&&e.jsx(B,{compact:!0,title:"暂无用户",description:"开放注册后,新注册的用户会出现在这里。",icon:h}),u&&e.jsx("div",{className:"flex justify-center py-12",children:e.jsx(f,{className:"h-6 w-6 animate-spin text-[#d6b600]"})})]})]})]})};export{Y as default}; diff --git a/static/assets/activity-j8Ec2Exe.js b/static/assets/activity-Dmn-a3S9.js similarity index 89% rename from static/assets/activity-j8Ec2Exe.js rename to static/assets/activity-Dmn-a3S9.js index 4cf7937..c69b70e 100644 --- a/static/assets/activity-j8Ec2Exe.js +++ b/static/assets/activity-Dmn-a3S9.js @@ -1,4 +1,4 @@ -import{c as t}from"./index-BtyeumGM.js";/** +import{c as t}from"./index-IP-mmLlr.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/check-BL4ZPX5c.js b/static/assets/check-D50E5xnW.js similarity index 86% rename from static/assets/check-BL4ZPX5c.js rename to static/assets/check-D50E5xnW.js index 853a202..c5fba8b 100644 --- a/static/assets/check-BL4ZPX5c.js +++ b/static/assets/check-D50E5xnW.js @@ -1,4 +1,4 @@ -import{c}from"./index-BtyeumGM.js";/** +import{c}from"./index-IP-mmLlr.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/chevron-right-OUn6lLjt.js b/static/assets/chevron-right-CbwGgzS_.js similarity index 92% rename from static/assets/chevron-right-OUn6lLjt.js rename to static/assets/chevron-right-CbwGgzS_.js index b864f64..afedb30 100644 --- a/static/assets/chevron-right-OUn6lLjt.js +++ b/static/assets/chevron-right-CbwGgzS_.js @@ -1,4 +1,4 @@ -import{c as o}from"./index-BtyeumGM.js";/** +import{c as o}from"./index-IP-mmLlr.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/eye-C6bcwqAG.js b/static/assets/eye-BxUVYll7.js similarity index 90% rename from static/assets/eye-C6bcwqAG.js rename to static/assets/eye-BxUVYll7.js index ac4fa45..2821ecf 100644 --- a/static/assets/eye-C6bcwqAG.js +++ b/static/assets/eye-BxUVYll7.js @@ -1,4 +1,4 @@ -import{c}from"./index-BtyeumGM.js";/** +import{c}from"./index-IP-mmLlr.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/eye-off-BfkVRJHJ.js b/static/assets/eye-off-B2vwWUUu.js similarity index 92% rename from static/assets/eye-off-BfkVRJHJ.js rename to static/assets/eye-off-B2vwWUUu.js index 171be73..a8031a0 100644 --- a/static/assets/eye-off-BfkVRJHJ.js +++ b/static/assets/eye-off-B2vwWUUu.js @@ -1,4 +1,4 @@ -import{c as e}from"./index-BtyeumGM.js";/** +import{c as e}from"./index-IP-mmLlr.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/flower-2-f7YOZRab.js b/static/assets/flower-2-fqYsfuSn.js similarity index 93% rename from static/assets/flower-2-f7YOZRab.js rename to static/assets/flower-2-fqYsfuSn.js index ddd620e..096b1a6 100644 --- a/static/assets/flower-2-f7YOZRab.js +++ b/static/assets/flower-2-fqYsfuSn.js @@ -1,4 +1,4 @@ -import{c}from"./index-BtyeumGM.js";/** +import{c}from"./index-IP-mmLlr.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/image-BRbxtWrD.js b/static/assets/image-hfWSlf8S.js similarity index 90% rename from static/assets/image-BRbxtWrD.js rename to static/assets/image-hfWSlf8S.js index 8c6d200..ff492be 100644 --- a/static/assets/image-BRbxtWrD.js +++ b/static/assets/image-hfWSlf8S.js @@ -1,4 +1,4 @@ -import{c as e}from"./index-BtyeumGM.js";/** +import{c as e}from"./index-IP-mmLlr.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/index-CFvjDKMG.css b/static/assets/index-CFvjDKMG.css deleted file mode 100644 index 800e687..0000000 --- a/static/assets/index-CFvjDKMG.css +++ /dev/null @@ -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:rgb(var(--gray-200) / 1)}: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:-apple-system,BlinkMacSystemFont,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Helvetica Neue,Helvetica,Arial,sans-serif;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:rgb(var(--gray-400) / 1)}input::placeholder,textarea::placeholder{opacity:1;color:rgb(var(--gray-400) / 1)}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}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-x-0{left:0;right:0}.inset-x-3{left:.75rem;right:.75rem}.-bottom-1{bottom:-.25rem}.-right-1{right:-.25rem}.-right-1\.5{right:-.375rem}.-top-1\.5{top:-.375rem}.bottom-0{bottom:0}.bottom-3{bottom:.75rem}.bottom-4{bottom:1rem}.bottom-8{bottom:2rem}.bottom-full{bottom:100%}.left-0{left:0}.left-1{left:.25rem}.left-2{left:.5rem}.left-2\.5{left:.625rem}.left-3{left:.75rem}.left-3\.5{left:.875rem}.left-4{left:1rem}.left-5{left:1.25rem}.right-0{right:0}.right-0\.5{right:.125rem}.right-2{right:.5rem}.right-3{right:.75rem}.right-4{right:1rem}.top-0{top:0}.top-0\.5{top:.125rem}.top-1{top:.25rem}.top-1\/2{top:50%}.top-2{top:.5rem}.top-4{top:1rem}.top-8{top:2rem}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-\[10000\]{z-index:10000}.col-span-2{grid-column:span 2 / span 2}.m-3{margin:.75rem}.mx-6{margin-left:1.5rem;margin-right:1.5rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.-ml-2{margin-left:-.5rem}.-mt-1{margin-top:-.25rem}.-mt-2{margin-top:-.5rem}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-8{margin-bottom:2rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mr-1\.5{margin-right:.375rem}.mr-2{margin-right:.5rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.mt-2\.5{margin-top:.625rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.mt-7{margin-top:1.75rem}.mt-auto{margin-top:auto}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-square{aspect-ratio:1 / 1}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-20{height:5rem}.h-28{height:7rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-36{height:9rem}.h-4{height:1rem}.h-44{height:11rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-60{height:15rem}.h-7{height:1.75rem}.h-72{height:18rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[18px\]{height:18px}.h-\[280px\]{height:280px}.h-\[300px\]{height:300px}.h-\[340px\]{height:340px}.h-\[68px\]{height:68px}.h-\[76px\]{height:76px}.h-\[calc\(100vh-3\.5rem\)\]{height:calc(100vh - 3.5rem)}.h-full{height:100%}.h-screen{height:100vh}.max-h-48{max-height:12rem}.max-h-72{max-height:18rem}.max-h-80{max-height:20rem}.max-h-\[220px\]{max-height:220px}.max-h-\[400px\]{max-height:400px}.max-h-\[460px\]{max-height:460px}.max-h-\[620px\]{max-height:620px}.max-h-\[90vh\]{max-height:90vh}.max-h-\[92vh\]{max-height:92vh}.min-h-0{min-height:0px}.min-h-10{min-height:2.5rem}.min-h-11{min-height:2.75rem}.min-h-20{min-height:5rem}.min-h-24{min-height:6rem}.min-h-28{min-height:7rem}.min-h-36{min-height:9rem}.min-h-64{min-height:16rem}.min-h-\[2\.5rem\]{min-height:2.5rem}.min-h-\[320px\]{min-height:320px}.min-h-\[42px\]{min-height:42px}.min-h-\[500px\]{min-height:500px}.min-h-\[560px\]{min-height:560px}.min-h-\[56px\]{min-height:56px}.min-h-\[84px\]{min-height:84px}.min-h-\[calc\(100vh-2rem\)\]{min-height:calc(100vh - 2rem)}.min-h-screen{min-height:100vh}.w-1\.5{width:.375rem}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-20{width:5rem}.w-28{width:7rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-4{width:1rem}.w-44{width:11rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-60{width:15rem}.w-7{width:1.75rem}.w-8{width:2rem}.w-80{width:20rem}.w-9{width:2.25rem}.w-\[10\%\]{width:10%}.w-\[11\%\]{width:11%}.w-\[12\%\]{width:12%}.w-\[13\%\]{width:13%}.w-\[15\%\]{width:15%}.w-\[16\%\]{width:16%}.w-\[17\%\]{width:17%}.w-\[18\%\]{width:18%}.w-\[18px\]{width:18px}.w-\[20\%\]{width:20%}.w-\[22\%\]{width:22%}.w-\[248px\]{width:248px}.w-\[25\%\]{width:25%}.w-\[44\%\]{width:44%}.w-\[6\%\]{width:6%}.w-\[min\(22rem\,calc\(100vw-3rem\)\)\]{width:min(22rem,calc(100vw - 3rem))}.w-\[min\(380px\,calc\(100vw-2rem\)\)\]{width:min(380px,calc(100vw - 2rem))}.w-auto{width:auto}.w-full{width:100%}.min-w-0{min-width:0px}.min-w-20{min-width:5rem}.min-w-5{min-width:1.25rem}.min-w-\[1040px\]{min-width:1040px}.min-w-\[1100px\]{min-width:1100px}.min-w-\[760px\]{min-width:760px}.min-w-\[820px\]{min-width:820px}.min-w-\[860px\]{min-width:860px}.min-w-\[980px\]{min-width:980px}.min-w-full{min-width:100%}.max-w-2xl{max-width:42rem}.max-w-3xl{max-width:48rem}.max-w-4xl{max-width:56rem}.max-w-52{max-width:13rem}.max-w-5xl{max-width:64rem}.max-w-72{max-width:18rem}.max-w-\[10rem\]{max-width:10rem}.max-w-\[1320px\]{max-width:1320px}.max-w-\[1600px\]{max-width:1600px}.max-w-\[220px\]{max-width:220px}.max-w-\[260px\]{max-width:260px}.max-w-\[380px\]{max-width:380px}.max-w-\[680px\]{max-width:680px}.max-w-\[76\%\]{max-width:76%}.max-w-\[86\%\]{max-width:86%}.max-w-\[980px\]{max-width:980px}.max-w-full{max-width:100%}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.flex-1{flex:1 1 0%}.flex-none{flex:none}.flex-shrink-0,.shrink-0{flex-shrink:0}.table-fixed{table-layout:fixed}.-translate-x-full{--tw-translate-x: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-1{--tw-translate-x: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-5{--tw-translate-x: 1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-6{--tw-translate-x: 1.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.cursor-crosshair{cursor:crosshair}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.resize-y{resize:vertical}.resize{resize:both}.scroll-mt-4{scroll-margin-top:1rem}.list-inside{list-style-position:inside}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-\[340px_140px_260px_210px_110px\]{grid-template-columns:340px 140px 260px 210px 110px}.grid-cols-\[48px_minmax\(0\,1fr\)_auto\]{grid-template-columns:48px minmax(0,1fr) auto}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-x-5{-moz-column-gap:1.25rem;column-gap:1.25rem}.gap-y-1{row-gap:.25rem}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-y-2>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(2px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(2px * var(--tw-divide-y-reverse))}.divide-\[\#eeeeee\]>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(238 238 238 / var(--tw-divide-opacity, 1))}.divide-\[var\(--border\)\]>:not([hidden])~:not([hidden]){border-color:var(--border)}.divide-gray-100>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(var(--gray-100) / var(--tw-divide-opacity, 1))}.divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(var(--gray-200) / var(--tw-divide-opacity, 1))}.self-end{align-self:flex-end}.self-center{align-self:center}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:8px}.rounded-2xl{border-radius:24px}.rounded-3xl{border-radius:32px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:16px}.rounded-md{border-radius:10px}.rounded-none{border-radius:0}.rounded-xl{border-radius:20px}.rounded-b-md{border-bottom-right-radius:10px;border-bottom-left-radius:10px}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-4{border-width:4px}.border-x-0{border-left-width:0px;border-right-width:0px}.border-y{border-top-width:1px;border-bottom-width:1px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l-4{border-left-width:4px}.border-t{border-top-width:1px}.border-t-0{border-top-width:0px}.border-dashed{border-style:dashed}.border-\[\#f5c800\]{--tw-border-opacity: 1;border-color:rgb(245 200 0 / var(--tw-border-opacity, 1))}.border-\[\#ffe100\]{--tw-border-opacity: 1;border-color:rgb(255 225 0 / var(--tw-border-opacity, 1))}.border-\[\#ffe566\]{--tw-border-opacity: 1;border-color:rgb(255 229 102 / var(--tw-border-opacity, 1))}.border-\[var\(--border\)\]{border-color:var(--border)}.border-\[var\(--border-light\)\]{border-color:var(--border-light)}.border-\[var\(--border-strong\)\]{border-color:var(--border-strong)}.border-amber-200{--tw-border-opacity: 1;border-color:rgb(253 230 138 / var(--tw-border-opacity, 1))}.border-amber-400{--tw-border-opacity: 1;border-color:rgb(251 191 36 / var(--tw-border-opacity, 1))}.border-amber-500{--tw-border-opacity: 1;border-color:rgb(245 158 11 / var(--tw-border-opacity, 1))}.border-blue-200{--tw-border-opacity: 1;border-color:rgb(191 219 254 / var(--tw-border-opacity, 1))}.border-brand-200{--tw-border-opacity: 1;border-color:rgb(255 239 163 / var(--tw-border-opacity, 1))}.border-cyan-100{--tw-border-opacity: 1;border-color:rgb(207 250 254 / var(--tw-border-opacity, 1))}.border-cyan-200{--tw-border-opacity: 1;border-color:rgb(165 243 252 / var(--tw-border-opacity, 1))}.border-cyan-300{--tw-border-opacity: 1;border-color:rgb(103 232 249 / var(--tw-border-opacity, 1))}.border-cyan-600{--tw-border-opacity: 1;border-color:rgb(8 145 178 / var(--tw-border-opacity, 1))}.border-emerald-200{--tw-border-opacity: 1;border-color:rgb(167 243 208 / var(--tw-border-opacity, 1))}.border-gray-100{--tw-border-opacity: 1;border-color:rgb(var(--gray-100) / var(--tw-border-opacity, 1))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(var(--gray-200) / var(--tw-border-opacity, 1))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(var(--gray-300) / var(--tw-border-opacity, 1))}.border-gray-50{--tw-border-opacity: 1;border-color:rgb(var(--gray-50) / var(--tw-border-opacity, 1))}.border-green-200{--tw-border-opacity: 1;border-color:rgb(187 247 208 / var(--tw-border-opacity, 1))}.border-indigo-200{--tw-border-opacity: 1;border-color:rgb(199 210 254 / var(--tw-border-opacity, 1))}.border-purple-500{--tw-border-opacity: 1;border-color:rgb(168 85 247 / var(--tw-border-opacity, 1))}.border-red-200{--tw-border-opacity: 1;border-color:rgb(254 202 202 / var(--tw-border-opacity, 1))}.border-slate-200{--tw-border-opacity: 1;border-color:rgb(226 232 240 / var(--tw-border-opacity, 1))}.border-slate-300{--tw-border-opacity: 1;border-color:rgb(203 213 225 / var(--tw-border-opacity, 1))}.border-violet-100{--tw-border-opacity: 1;border-color:rgb(237 233 254 / var(--tw-border-opacity, 1))}.border-white{--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity, 1))}.border-yellow-400{--tw-border-opacity: 1;border-color:rgb(250 204 21 / var(--tw-border-opacity, 1))}.bg-\[\#8fc7a8\]{--tw-bg-opacity: 1;background-color:rgb(143 199 168 / var(--tw-bg-opacity, 1))}.bg-\[\#b8ac8e\]{--tw-bg-opacity: 1;background-color:rgb(184 172 142 / var(--tw-bg-opacity, 1))}.bg-\[\#c9b8e8\]{--tw-bg-opacity: 1;background-color:rgb(201 184 232 / var(--tw-bg-opacity, 1))}.bg-\[\#e8a0a0\]{--tw-bg-opacity: 1;background-color:rgb(232 160 160 / var(--tw-bg-opacity, 1))}.bg-\[\#e8dcbc\]{--tw-bg-opacity: 1;background-color:rgb(232 220 188 / var(--tw-bg-opacity, 1))}.bg-\[\#eef4ff\]{--tw-bg-opacity: 1;background-color:rgb(238 244 255 / var(--tw-bg-opacity, 1))}.bg-\[\#f0f7f3\]{--tw-bg-opacity: 1;background-color:rgb(240 247 243 / var(--tw-bg-opacity, 1))}.bg-\[\#f5c800\]{--tw-bg-opacity: 1;background-color:rgb(245 200 0 / var(--tw-bg-opacity, 1))}.bg-\[\#f7f2fb\]{--tw-bg-opacity: 1;background-color:rgb(247 242 251 / var(--tw-bg-opacity, 1))}.bg-\[\#ff4400\]{--tw-bg-opacity: 1;background-color:rgb(255 68 0 / var(--tw-bg-opacity, 1))}.bg-\[\#ffd700\]{--tw-bg-opacity: 1;background-color:rgb(255 215 0 / var(--tw-bg-opacity, 1))}.bg-\[\#ffe100\]{--tw-bg-opacity: 1;background-color:rgb(255 225 0 / var(--tw-bg-opacity, 1))}.bg-\[\#fff7e6\]{--tw-bg-opacity: 1;background-color:rgb(255 247 230 / var(--tw-bg-opacity, 1))}.bg-\[\#fff8d1\]{--tw-bg-opacity: 1;background-color:rgb(255 248 209 / var(--tw-bg-opacity, 1))}.bg-\[\#fffbe6\]{--tw-bg-opacity: 1;background-color:rgb(255 251 230 / var(--tw-bg-opacity, 1))}.bg-\[\#fffdf0\]{--tw-bg-opacity: 1;background-color:rgb(255 253 240 / var(--tw-bg-opacity, 1))}.bg-\[var\(--app-bg\)\]{background-color:var(--app-bg)}.bg-\[var\(--brand\)\]{background-color:var(--brand)}.bg-\[var\(--brand-50\)\]{background-color:var(--brand-50)}.bg-\[var\(--surface\)\]{background-color:var(--surface)}.bg-\[var\(--surface-hover\)\]{background-color:var(--surface-hover)}.bg-\[var\(--surface-strong\)\]{background-color:var(--surface-strong)}.bg-\[var\(--surface-subtle\)\]{background-color:var(--surface-subtle)}.bg-\[var\(--unread-badge\)\]{background-color:var(--unread-badge)}.bg-amber-100{--tw-bg-opacity: 1;background-color:rgb(254 243 199 / var(--tw-bg-opacity, 1))}.bg-amber-400{--tw-bg-opacity: 1;background-color:rgb(251 191 36 / var(--tw-bg-opacity, 1))}.bg-amber-50{--tw-bg-opacity: 1;background-color:rgb(255 251 235 / var(--tw-bg-opacity, 1))}.bg-amber-500{--tw-bg-opacity: 1;background-color:rgb(245 158 11 / var(--tw-bg-opacity, 1))}.bg-amber-500\/15{background-color:#f59e0b26}.bg-black\/40{background-color:#0006}.bg-black\/55{background-color:#0000008c}.bg-black\/60{background-color:#0009}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.bg-brand-50{--tw-bg-opacity: 1;background-color:rgb(255 253 240 / var(--tw-bg-opacity, 1))}.bg-brand-500{--tw-bg-opacity: 1;background-color:rgb(255 215 0 / var(--tw-bg-opacity, 1))}.bg-cyan-50{--tw-bg-opacity: 1;background-color:rgb(236 254 255 / var(--tw-bg-opacity, 1))}.bg-cyan-50\/40{background-color:#ecfeff66}.bg-emerald-50{--tw-bg-opacity: 1;background-color:rgb(236 253 245 / var(--tw-bg-opacity, 1))}.bg-emerald-500{--tw-bg-opacity: 1;background-color:rgb(16 185 129 / var(--tw-bg-opacity, 1))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(var(--gray-100) / var(--tw-bg-opacity, 1))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(var(--gray-200) / var(--tw-bg-opacity, 1))}.bg-gray-300{--tw-bg-opacity: 1;background-color:rgb(var(--gray-300) / var(--tw-bg-opacity, 1))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(var(--gray-50) / var(--tw-bg-opacity, 1))}.bg-gray-50\/60{background-color:rgb(var(--gray-50) / .6)}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity, 1))}.bg-green-50{--tw-bg-opacity: 1;background-color:rgb(240 253 244 / var(--tw-bg-opacity, 1))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-green-600{--tw-bg-opacity: 1;background-color:rgb(22 163 74 / var(--tw-bg-opacity, 1))}.bg-indigo-100{--tw-bg-opacity: 1;background-color:rgb(224 231 255 / var(--tw-bg-opacity, 1))}.bg-indigo-50\/70{background-color:#eef2ffb3}.bg-orange-300{--tw-bg-opacity: 1;background-color:rgb(253 186 116 / var(--tw-bg-opacity, 1))}.bg-orange-50{--tw-bg-opacity: 1;background-color:rgb(255 247 237 / var(--tw-bg-opacity, 1))}.bg-purple-50{--tw-bg-opacity: 1;background-color:rgb(250 245 255 / var(--tw-bg-opacity, 1))}.bg-purple-500{--tw-bg-opacity: 1;background-color:rgb(168 85 247 / var(--tw-bg-opacity, 1))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1))}.bg-red-50{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity, 1))}.bg-sky-100{--tw-bg-opacity: 1;background-color:rgb(224 242 254 / var(--tw-bg-opacity, 1))}.bg-slate-100{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity, 1))}.bg-slate-50{--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity, 1))}.bg-violet-50{--tw-bg-opacity: 1;background-color:rgb(245 243 255 / var(--tw-bg-opacity, 1))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-white\/20{background-color:#fff3}.bg-white\/70{background-color:#ffffffb3}.bg-white\/95{background-color:#fffffff2}.bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity, 1))}.bg-yellow-400{--tw-bg-opacity: 1;background-color:rgb(250 204 21 / var(--tw-bg-opacity, 1))}.bg-yellow-50{--tw-bg-opacity: 1;background-color:rgb(254 252 232 / var(--tw-bg-opacity, 1))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-amber-50{--tw-gradient-from: #fffbeb var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 251 235 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-white{--tw-gradient-to: #fff var(--tw-gradient-to-position)}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:0}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-10{padding:2.5rem}.p-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-3\.5{padding:.875rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-7{padding:1.75rem}.px-0{padding-left:0;padding-right:0}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-3\.5{padding-left:.875rem;padding-right:.875rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-16{padding-top:4rem;padding-bottom:4rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-20{padding-top:5rem;padding-bottom:5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.pb-1{padding-bottom:.25rem}.pb-10{padding-bottom:2.5rem}.pb-2{padding-bottom:.5rem}.pb-4{padding-bottom:1rem}.pl-10{padding-left:2.5rem}.pl-2{padding-left:.5rem}.pl-2\.5{padding-left:.625rem}.pl-4{padding-left:1rem}.pl-8{padding-left:2rem}.pl-9{padding-left:2.25rem}.pr-1{padding-right:.25rem}.pr-10{padding-right:2.5rem}.pr-11{padding-right:2.75rem}.pr-3{padding-right:.75rem}.pr-4{padding-right:1rem}.pt-0\.5{padding-top:.125rem}.pt-1{padding-top:.25rem}.pt-1\.5{padding-top:.375rem}.pt-2{padding-top:.5rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.pt-5{padding-top:1.25rem}.pt-6{padding-top:1.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-sans{font-family:-apple-system,BlinkMacSystemFont,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Helvetica Neue,Helvetica,Arial,sans-serif}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[13px\]{font-size:13px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-black{font-weight:900}.font-bold{font-weight:700}.font-extrabold{font-weight:800}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.leading-4{line-height:1rem}.leading-5{line-height:1.25rem}.leading-6{line-height:1.5rem}.leading-7{line-height:1.75rem}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-tight{line-height:1.25}.tracking-\[0\.15em\]{letter-spacing:.15em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.tracking-widest{letter-spacing:.1em}.text-\[\#2a2416\]{--tw-text-opacity: 1;color:rgb(42 36 22 / var(--tw-text-opacity, 1))}.text-\[\#3f5f8f\]{--tw-text-opacity: 1;color:rgb(63 95 143 / var(--tw-text-opacity, 1))}.text-\[\#3f7a5c\]{--tw-text-opacity: 1;color:rgb(63 122 92 / var(--tw-text-opacity, 1))}.text-\[\#544c39\]{--tw-text-opacity: 1;color:rgb(84 76 57 / var(--tw-text-opacity, 1))}.text-\[\#6b5200\]{--tw-text-opacity: 1;color:rgb(107 82 0 / var(--tw-text-opacity, 1))}.text-\[\#6b5a8a\]{--tw-text-opacity: 1;color:rgb(107 90 138 / var(--tw-text-opacity, 1))}.text-\[\#8a6300\]{--tw-text-opacity: 1;color:rgb(138 99 0 / var(--tw-text-opacity, 1))}.text-\[\#8c7900\]{--tw-text-opacity: 1;color:rgb(140 121 0 / var(--tw-text-opacity, 1))}.text-\[\#999\]{--tw-text-opacity: 1;color:rgb(153 153 153 / var(--tw-text-opacity, 1))}.text-\[\#d6b600\]{--tw-text-opacity: 1;color:rgb(214 182 0 / var(--tw-text-opacity, 1))}.text-\[\#d92d20\]{--tw-text-opacity: 1;color:rgb(217 45 32 / var(--tw-text-opacity, 1))}.text-\[\#ff3b30\]{--tw-text-opacity: 1;color:rgb(255 59 48 / var(--tw-text-opacity, 1))}.text-\[\#ff4400\]{--tw-text-opacity: 1;color:rgb(255 68 0 / var(--tw-text-opacity, 1))}.text-\[var\(--brand-ink\)\]{color:var(--brand-ink)}.text-\[var\(--brand-primary\)\]{color:var(--brand-primary)}.text-\[var\(--brand-text\)\]{color:var(--brand-text)}.text-\[var\(--danger-ink\)\]{color:var(--danger-ink)}.text-\[var\(--text\)\]{color:var(--text)}.text-\[var\(--text-muted\)\]{color:var(--text-muted)}.text-\[var\(--text-primary\)\]{color:var(--text-primary)}.text-\[var\(--text-secondary\)\]{color:var(--text-secondary)}.text-\[var\(--text-soft\)\]{color:var(--text-soft)}.text-amber-500{--tw-text-opacity: 1;color:rgb(245 158 11 / var(--tw-text-opacity, 1))}.text-amber-600{--tw-text-opacity: 1;color:rgb(217 119 6 / var(--tw-text-opacity, 1))}.text-amber-700{--tw-text-opacity: 1;color:rgb(180 83 9 / var(--tw-text-opacity, 1))}.text-amber-800{--tw-text-opacity: 1;color:rgb(146 64 14 / var(--tw-text-opacity, 1))}.text-amber-900{--tw-text-opacity: 1;color:rgb(120 53 15 / var(--tw-text-opacity, 1))}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.text-blue-700{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity, 1))}.text-blue-800{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity, 1))}.text-blue-900{--tw-text-opacity: 1;color:rgb(30 58 138 / var(--tw-text-opacity, 1))}.text-brand-ink{--tw-text-opacity: 1;color:rgb(42 36 22 / var(--tw-text-opacity, 1))}.text-cyan-700{--tw-text-opacity: 1;color:rgb(14 116 144 / var(--tw-text-opacity, 1))}.text-cyan-800{--tw-text-opacity: 1;color:rgb(21 94 117 / var(--tw-text-opacity, 1))}.text-emerald-600{--tw-text-opacity: 1;color:rgb(5 150 105 / var(--tw-text-opacity, 1))}.text-emerald-700{--tw-text-opacity: 1;color:rgb(4 120 87 / var(--tw-text-opacity, 1))}.text-emerald-700\/70{color:#047857b3}.text-emerald-800{--tw-text-opacity: 1;color:rgb(6 95 70 / var(--tw-text-opacity, 1))}.text-emerald-900\/80{color:#064e3bcc}.text-gray-400{--tw-text-opacity: 1;color:rgb(var(--gray-400) / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(var(--gray-500) / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(var(--gray-600) / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(var(--gray-700) / var(--tw-text-opacity, 1))}.text-gray-800{--tw-text-opacity: 1;color:rgb(var(--gray-800) / var(--tw-text-opacity, 1))}.text-gray-900{--tw-text-opacity: 1;color:rgb(var(--gray-900) / var(--tw-text-opacity, 1))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity, 1))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity, 1))}.text-green-700{--tw-text-opacity: 1;color:rgb(21 128 61 / var(--tw-text-opacity, 1))}.text-green-800{--tw-text-opacity: 1;color:rgb(22 101 52 / var(--tw-text-opacity, 1))}.text-indigo-600{--tw-text-opacity: 1;color:rgb(79 70 229 / var(--tw-text-opacity, 1))}.text-indigo-700{--tw-text-opacity: 1;color:rgb(67 56 202 / var(--tw-text-opacity, 1))}.text-indigo-800{--tw-text-opacity: 1;color:rgb(55 48 163 / var(--tw-text-opacity, 1))}.text-indigo-950{--tw-text-opacity: 1;color:rgb(30 27 75 / var(--tw-text-opacity, 1))}.text-orange-500{--tw-text-opacity: 1;color:rgb(249 115 22 / var(--tw-text-opacity, 1))}.text-orange-700{--tw-text-opacity: 1;color:rgb(194 65 12 / var(--tw-text-opacity, 1))}.text-orange-900{--tw-text-opacity: 1;color:rgb(124 45 18 / var(--tw-text-opacity, 1))}.text-purple-500{--tw-text-opacity: 1;color:rgb(168 85 247 / var(--tw-text-opacity, 1))}.text-purple-600{--tw-text-opacity: 1;color:rgb(147 51 234 / var(--tw-text-opacity, 1))}.text-purple-700{--tw-text-opacity: 1;color:rgb(126 34 206 / var(--tw-text-opacity, 1))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity, 1))}.text-red-800{--tw-text-opacity: 1;color:rgb(153 27 27 / var(--tw-text-opacity, 1))}.text-rose-600{--tw-text-opacity: 1;color:rgb(225 29 72 / var(--tw-text-opacity, 1))}.text-sky-700{--tw-text-opacity: 1;color:rgb(3 105 161 / var(--tw-text-opacity, 1))}.text-slate-400{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.text-slate-500{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity, 1))}.text-slate-600{--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity, 1))}.text-slate-700{--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity, 1))}.text-slate-800{--tw-text-opacity: 1;color:rgb(30 41 59 / var(--tw-text-opacity, 1))}.text-violet-700{--tw-text-opacity: 1;color:rgb(109 40 217 / var(--tw-text-opacity, 1))}.text-violet-900{--tw-text-opacity: 1;color:rgb(76 29 149 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-700{--tw-text-opacity: 1;color:rgb(161 98 7 / var(--tw-text-opacity, 1))}.text-yellow-800{--tw-text-opacity: 1;color:rgb(133 77 14 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.line-through{text-decoration-line:line-through}.accent-\[\#f5c400\]{accent-color:#f5c400}.accent-brand-500{accent-color:#FFD700}.accent-yellow-400{accent-color:#facc15}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[0_12px_40px_rgba\(20\,24\,28\,0\.24\)\]{--tw-shadow: 0 12px 40px rgba(20,24,28,.24);--tw-shadow-colored: 0 12px 40px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[0_4px_16px_rgba\(20\,24\,28\,0\.10\)\]{--tw-shadow: 0 4px 16px rgba(20,24,28,.1);--tw-shadow-colored: 0 4px 16px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[var\(--shadow-card\,0_8px_24px_rgba\(20\,24\,28\,0\.16\)\)\]{--tw-shadow: var(--shadow-card,0 8px 24px rgba(20,24,28,.16));--tw-shadow-colored: 8px 24px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-none{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[var\(--shadow-brand\)\]{--tw-shadow-color: var(--shadow-brand);--tw-shadow: var(--tw-shadow-colored)}.shadow-\[var\(--shadow-sm\)\]{--tw-shadow-color: var(--shadow-sm);--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-gray-200{--tw-ring-opacity: 1;--tw-ring-color: rgb(var(--gray-200) / var(--tw-ring-opacity, 1))}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur{--tw-backdrop-blur: blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-150{transition-duration:.15s}*{box-sizing:border-box;margin:0;padding:0}:root,:root[data-theme=light]{color-scheme:light;--app-bg: #f7f6f3;--surface: #ffffff;--surface-subtle: #faf9f7;--surface-strong: #f2f1ed;--surface-hover: #faf9f6;--border: #e9e7e2;--border-strong: #d6d3cc;--border-brand: #ffd400;--text: #23211e;--text-muted: #6b6862;--text-soft: #76716a;--gray-50: 250 250 248;--gray-100: 245 244 240;--gray-200: 235 233 227;--gray-300: 221 217 208;--gray-400: 118 113 106;--gray-500: 107 104 98;--gray-600: 102 98 92;--gray-700: 74 71 66;--gray-800: 51 48 44;--gray-900: 34 32 29;--brand-50: #fffdf0;--brand-100: #fff8d1;--brand-200: #ffefa3;--brand-300: #ffe566;--brand: #ffe100;--brand-hover: #ffd700;--brand-active: #f5c800;--brand-ink: #2a2416;--brand-soft: #fff9c9;--brand-text: #806d00;--selection-bg: #fb923c;--selection-ink: var(--brand-ink);--focus-ring: #806d00;--unread-badge: #dc2626;--danger: #b42318;--danger-ink: #b42318;--danger-soft: #fff0f0;--success: #0f704b;--success-ink: #0f704b;--success-soft: #eefaf3;--warning: #945800;--warning-ink: #945800;--warning-soft: #fff7e6;--info: #2a5f92;--info-ink: #2a5f92;--info-soft: #f0f7ff;--radius-xs: 8px;--radius: 10px;--radius-lg: 16px;--radius-xl: 20px;--radius-pill: 999px;--shadow-sm: 0 1px 2px rgba(35, 33, 30, .05);--shadow-md: 0 6px 20px rgba(35, 33, 30, .08);--shadow-lg: 0 16px 40px rgba(35, 33, 30, .12);--shadow-brand: 0 6px 18px rgba(255, 214, 0, .35);--chart-grid: #ebe9e3;--chart-cursor: rgba(35, 33, 30, .06);--scrollbar-thumb: #d6d3cc;--scrollbar-thumb-hover: #b9b4aa}:root[data-theme=dark]{color-scheme:dark;--app-bg: #11110f;--surface: #191916;--surface-subtle: #20201c;--surface-strong: #292820;--surface-hover: #302e27;--border: #37362f;--border-strong: #504c40;--border-brand: #d9bd19;--text: #f5f2e8;--text-muted: #c2bcae;--text-soft: #aaa59b;--gray-50: 32 32 28;--gray-100: 41 40 34;--gray-200: 56 53 45;--gray-300: 77 72 60;--gray-400: 170 165 155;--gray-500: 174 167 153;--gray-600: 194 188 174;--gray-700: 215 210 198;--gray-800: 234 230 220;--gray-900: 245 242 232;--brand-50: #292617;--brand-100: #373116;--brand-200: #4b4015;--brand-soft: #393216;--brand-text: #f2d85c;--focus-ring: #f2d85c;--danger: #ff8c8c;--danger-ink: #ffaaaa;--danger-soft: #3a1e1e;--success: #75d9a3;--success-ink: #8fe0b5;--success-soft: #173528;--warning: #ffd170;--warning-ink: #f3d77c;--warning-soft: #3a2d16;--info: #91c9ff;--info-ink: #9dccff;--info-soft: #182e45;--shadow-sm: 0 1px 2px rgba(0, 0, 0, .28);--shadow-md: 0 10px 28px rgba(0, 0, 0, .32);--shadow-lg: 0 22px 60px rgba(0, 0, 0, .42);--shadow-brand: 0 7px 22px rgba(221, 187, 0, .18);--chart-grid: #403d36;--chart-cursor: rgba(255, 255, 255, .06);--scrollbar-thumb: #5b574e;--scrollbar-thumb-hover: #d2bd38}html,body,#root{height:100%;width:100%}html{background:var(--app-bg);scrollbar-color:var(--scrollbar-thumb) transparent}body{font-family:-apple-system,BlinkMacSystemFont,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Helvetica Neue,Helvetica,Arial,sans-serif;background-color:var(--app-bg);color:var(--text);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}button,input,select,textarea{font:inherit}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,a:focus-visible{outline:2px solid var(--focus-ring);outline-offset:2px}input:disabled,select:disabled,textarea:disabled,input[readonly]{color:var(--text-muted)}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,textarea:-webkit-autofill,select:-webkit-autofill{-webkit-text-fill-color:var(--text);caret-color:var(--text);box-shadow:0 0 0 1000px var(--surface) inset;-webkit-transition:background-color 9999s ease-out 0s;transition:background-color 9999s ease-out 0s}.theme-picker{min-width:0;color:var(--text-muted)}.theme-picker__heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:7px;padding:0 2px;font-size:11px;font-weight:700}.theme-picker__status{color:var(--text-soft);font-size:10px;font-weight:600}.theme-switcher{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px;border:1px solid var(--border);border-radius:12px;background:var(--surface-strong);padding:3px}.theme-switcher__option{display:inline-flex;min-width:0;min-height:36px;align-items:center;justify-content:center;gap:5px;border:1px solid transparent;border-radius:8px;color:var(--text-muted);font-size:11px;font-weight:650;transition:background-color .15s ease,border-color .15s ease,color .15s ease}.theme-switcher__option:hover{background:var(--surface-hover);color:var(--text)}.theme-switcher__option--active,.theme-switcher__option--active:hover{border-color:var(--border-brand);background:var(--brand-soft);color:var(--brand-text);font-weight:750}.theme-picker--compact .theme-switcher{grid-template-columns:repeat(3,36px);border-radius:11px}.theme-picker--compact .theme-switcher__option{width:36px;min-height:36px}.media-light-surface{color-scheme:light;background:#fff!important;color:#23211e!important}:root[data-theme=dark] .media-light-surface .bg-white,:root[data-theme=dark] .media-light-surface [class~="bg-white/95"]{background-color:#fffffff5!important}:root[data-theme=dark] .media-light-surface .bg-gray-50,:root[data-theme=dark] .media-light-surface .bg-green-50{background-color:#fafaf8!important}:root[data-theme=dark] .media-light-surface .text-gray-500{color:#6b6862!important}:root[data-theme=dark] .media-light-surface .text-gray-800{color:#33302c!important}:root[data-theme=dark] .media-light-surface .text-green-700{color:#0f704b!important}:root[data-theme=dark] .media-light-surface .text-amber-800{color:#7a5100!important}:root[data-theme=dark] .media-light-surface .text-blue-600{color:#245f9d!important}:root[data-theme=dark] .media-light-surface .text-red-600{color:#c92a2a!important}:root[data-theme=dark] .bg-white{background-color:var(--surface)}:root[data-theme=dark] [class~="bg-white/95"]{background-color:#191916f5}:root[data-theme=dark] [class~="bg-white/90"],:root[data-theme=dark] [class~="bg-white/80"]{background-color:#191916e6}:root[data-theme=dark] [class~="bg-[#fffdf5]"]{background-color:var(--app-bg)}:root[data-theme=dark] [class~="bg-[#fff9e8]"],:root[data-theme=dark] [class~="bg-[#fffdf0]"],:root[data-theme=dark] [class~="bg-[#f5edd6]"]{background-color:var(--surface-strong)}:root[data-theme=dark] [class~="hover:bg-[#fff9e8]"]:hover,:root[data-theme=dark] [class~="hover:bg-[#fffdf5]"]:hover,:root[data-theme=dark] [class~="hover:bg-[#fffdf0]"]:hover{background-color:var(--surface-hover)}:root[data-theme=dark] [class~="disabled:bg-white"]:disabled{background-color:var(--surface)}:root[data-theme=dark] [class~="border-[#f0e6c8]"],:root[data-theme=dark] [class~="border-[#e6d69a]"]{border-color:var(--border)}:root[data-theme=dark] [class~="text-[#111]"],:root[data-theme=dark] [class~="text-[#333]"],:root[data-theme=dark] [class~="text-[#555]"],:root[data-theme=dark] [class~="text-[#666]"]{color:var(--text)}:root[data-theme=dark] [class~="text-[#777]"],:root[data-theme=dark] [class~="text-[#888]"]{color:var(--text-muted)}:root[data-theme=dark] [class~="text-[#999]"],:root[data-theme=dark] [class~="text-[#aaa]"],:root[data-theme=dark] [class~="text-[#a89e83]"],:root[data-theme=dark] [class~="text-[#b8ac8e]"],:root[data-theme=dark] [class~="text-[#d0d0d0]"]{color:var(--text-soft)}:root[data-theme=dark] [class~="text-[#8c7900]"],:root[data-theme=dark] [class~="text-[#8a6300]"],:root[data-theme=dark] [class~="text-[#6b5200]"],:root[data-theme=dark] [class~="text-[#d6b600]"]{color:var(--brand-text)}:root[data-theme=dark] [class~="hover:text-black"]:hover,:root[data-theme=dark] [class~="hover:text-[#111]"]:hover{color:var(--text)}:root[data-theme=dark] button .rounded-full.bg-white{background-color:#f4f1e8}:root[data-theme=dark] .bg-red-50,:root[data-theme=dark] .bg-red-100{background-color:var(--danger-soft)}:root[data-theme=dark] .border-red-200{border-color:#744040}:root[data-theme=dark] .text-red-500,:root[data-theme=dark] .text-red-600,:root[data-theme=dark] .text-red-700,:root[data-theme=dark] .text-red-800,:root[data-theme=dark] .text-red-900{color:#faa}:root[data-theme=dark] .bg-green-50,:root[data-theme=dark] .bg-green-100,:root[data-theme=dark] .bg-emerald-50{background-color:var(--success-soft)}:root[data-theme=dark] .border-green-200,:root[data-theme=dark] .border-emerald-200{border-color:#356b50}:root[data-theme=dark] .text-green-600,:root[data-theme=dark] .text-green-700,:root[data-theme=dark] .text-green-800,:root[data-theme=dark] .text-emerald-600,:root[data-theme=dark] .text-emerald-700,:root[data-theme=dark] .text-emerald-800{color:#8fe0b5}:root[data-theme=dark] .bg-blue-50,:root[data-theme=dark] .bg-blue-100{background-color:var(--info-soft)}:root[data-theme=dark] .border-blue-200{border-color:#3c638c}:root[data-theme=dark] .text-blue-500,:root[data-theme=dark] .text-blue-600,:root[data-theme=dark] .text-blue-700,:root[data-theme=dark] .text-blue-800,:root[data-theme=dark] .text-blue-900{color:#9dccff}:root[data-theme=dark] .bg-yellow-50,:root[data-theme=dark] .bg-yellow-100,:root[data-theme=dark] .bg-amber-50,:root[data-theme=dark] .bg-amber-100,:root[data-theme=dark] .bg-amber-200{background-color:var(--warning-soft)}:root[data-theme=dark] .border-amber-200{border-color:#755f2d}:root[data-theme=dark] .text-yellow-600,:root[data-theme=dark] .text-yellow-700,:root[data-theme=dark] .text-yellow-800,:root[data-theme=dark] .text-amber-500,:root[data-theme=dark] .text-amber-600,:root[data-theme=dark] .text-amber-700,:root[data-theme=dark] .text-amber-800,:root[data-theme=dark] .text-amber-900{color:#f3d77c}:root[data-theme=dark] [class~="bg-[#fff8d1]"]{background-color:#393216}:root[data-theme=dark] [class~="bg-[#eef4ff]"]{background-color:#1c2d45}:root[data-theme=dark] [class~="bg-[#f0f7f3]"]{background-color:#193126}:root[data-theme=dark] [class~="bg-[#f7f2fb]"]{background-color:#2c2438}:root[data-theme=dark] [class~="text-[#3f5f8f]"]{color:#aacbff}:root[data-theme=dark] [class~="text-[#3f7a5c]"]{color:#9bd9b5}:root[data-theme=dark] [class~="text-[#6b5a8a]"]{color:#d1baf2}:root[data-theme=dark] [class~="hover:bg-red-50"]:hover,:root[data-theme=dark] [class~="hover:bg-red-100"]:hover{background-color:var(--danger-soft)}:root[data-theme=dark] [class~="hover:bg-green-50"]:hover,:root[data-theme=dark] [class~="hover:bg-green-100"]:hover,:root[data-theme=dark] [class~="hover:bg-emerald-50"]:hover{background-color:var(--success-soft)}:root[data-theme=dark] [class~="hover:bg-blue-50"]:hover,:root[data-theme=dark] [class~="hover:bg-blue-100"]:hover{background-color:var(--info-soft)}:root[data-theme=dark] [class~="hover:bg-yellow-50"]:hover,:root[data-theme=dark] [class~="hover:bg-yellow-100"]:hover,:root[data-theme=dark] [class~="hover:bg-amber-50"]:hover,:root[data-theme=dark] [class~="hover:bg-amber-100"]:hover{background-color:var(--warning-soft)}:root[data-theme=dark] [class~="hover:bg-black/5"]:hover{background-color:#ffffff14}:root[data-theme=dark] [class~="hover:text-red-600"]:hover,:root[data-theme=dark] [class~="hover:text-red-700"]:hover{color:#faa}:root[data-theme=dark] [class~="hover:text-green-600"]:hover,:root[data-theme=dark] [class~="hover:text-green-700"]:hover,:root[data-theme=dark] [class~="hover:text-emerald-600"]:hover{color:#8fe0b5}:root[data-theme=dark] [class~="hover:text-blue-600"]:hover,:root[data-theme=dark] [class~="hover:text-blue-700"]:hover{color:#9dccff}:root[data-theme=dark] [class~="hover:text-amber-600"]:hover,:root[data-theme=dark] [class~="hover:text-amber-700"]:hover{color:#f3d77c}:root[data-theme=dark] [class~="hover:bg-pink-50"]:hover,:root[data-theme=dark] [class~="hover:bg-pink-100"]:hover{background-color:var(--danger-soft)}:root[data-theme=dark] [class~="hover:text-pink-600"]:hover,:root[data-theme=dark] [class~="hover:text-pink-700"]:hover,:root[data-theme=dark] [class~="hover:text-yellow-600"]:hover{color:var(--warning-ink)}:root[data-theme=dark] [class~="hover:bg-amber-200"]:hover{background-color:var(--warning-soft)}:root[data-theme=dark] .theme-brand-panel [class~="text-[#8a6300]"]{color:#8a6300}:root[data-theme=dark] .theme-brand-panel [class~="text-[#6b5200]"]{color:#6b5200}:root[data-theme=dark] .page-tab:not(.page-tab--active) .page-tab__count{background:#ffffff14}.recharts-pie-label-text,.recharts-text{fill:var(--text-muted)}:root[data-theme=dark] .modal-overlay,:root[data-theme=dark] .modal-overlay-centered{background-color:#000000ad}.page-stack{display:flex;flex-direction:column;gap:20px}.page-header{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;min-height:62px;padding-bottom:16px;border-bottom:1px solid var(--border)}.page-header__identity{display:flex;min-width:0;align-items:flex-start;gap:12px}.page-header__icon{display:inline-flex;width:42px;height:42px;flex:0 0 42px;align-items:center;justify-content:center;border-radius:var(--radius-lg);background:linear-gradient(140deg,var(--brand-300),var(--brand));color:var(--brand-ink);box-shadow:var(--shadow-brand)}.page-title{color:var(--text);font-size:24px;font-weight:750;line-height:1.25}.page-description{margin-top:5px;max-width:760px;color:var(--text-muted);font-size:13px;line-height:1.6}.page-actions{display:flex;flex:0 0 auto;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:8px}.page-tabs{display:inline-flex;max-width:100%;gap:4px;overflow-x:auto;border-radius:var(--radius-pill);background:var(--surface-strong);padding:4px;scrollbar-width:none;-ms-overflow-style:none}.page-tabs::-webkit-scrollbar{display:none}.page-tab{display:inline-flex;min-height:38px;flex:0 0 auto;align-items:center;justify-content:center;gap:7px;border-radius:var(--radius-pill);padding:8px 16px;color:var(--text-muted);font-size:13px;font-weight:650;line-height:1.2;transition:background-color .15s ease,color .15s ease,box-shadow .15s ease}.page-tab:hover{background:var(--surface);color:var(--text)}.page-tab--active{background:var(--brand);color:var(--brand-ink);box-shadow:var(--shadow-brand)}.page-tab--active:hover{background:var(--brand)}.page-tab__count{min-width:20px;border-radius:var(--radius-pill);background:#ffffff8c;padding:2px 7px;color:inherit;font-size:11px;font-weight:700;text-align:center}.toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--surface);padding:14px;box-shadow:var(--shadow-sm)}.toolbar__group{display:flex;min-width:0;flex-wrap:wrap;align-items:center;gap:8px}.section-panel{overflow:hidden;border:1px solid var(--border);border-radius:var(--radius-xl);background:var(--surface);box-shadow:var(--shadow-sm)}.section-panel__header{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:58px;border-bottom:1px solid var(--border);padding:14px 18px}.section-header__icon{display:inline-flex;width:34px;height:34px;flex:0 0 34px;align-items:center;justify-content:center;border-radius:var(--radius);background:var(--surface-strong);color:var(--text-muted)}.section-header__actions{display:flex;flex:0 0 auto;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:8px}.section-title{color:var(--text);font-size:15px;font-weight:700}.section-description{margin-top:3px;color:var(--text-muted);font-size:12px;line-height:1.5}.notice-banner{display:flex;min-height:46px;align-items:center;gap:10px;border:1px solid var(--border);border-radius:var(--radius-lg);padding:11px 14px;font-size:13px;font-weight:600;line-height:1.5}.notice-banner button{display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center;border-radius:var(--radius-pill);padding:5px}.notice-banner--success{border-color:color-mix(in srgb,var(--success) 38%,var(--border));background:var(--success-soft);color:var(--success-ink)}.notice-banner--error{border-color:color-mix(in srgb,var(--danger) 38%,var(--border));background:var(--danger-soft);color:var(--danger-ink)}.notice-banner--warning{border-color:var(--border-strong);background:var(--warning-soft);color:var(--warning-ink)}.notice-banner--info{border-color:color-mix(in srgb,var(--info) 38%,var(--border));background:var(--info-soft);color:var(--info-ink)}.metric-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.metric-card{min-width:0;border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--surface);padding:18px;box-shadow:var(--shadow-sm);transition:box-shadow .16s ease,transform .16s ease}.metric-card:hover{box-shadow:var(--shadow-md);transform:translateY(-1px)}.metric-card__label{color:var(--text-muted);font-size:12px;font-weight:650}.metric-card__value{margin-top:7px;color:var(--text);font-size:24px;font-weight:750;line-height:1.2}.metric-card__meta{margin-top:6px;color:var(--text-soft);font-size:11px;line-height:1.5}.metric-grid--compact{grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}.metric-grid--compact .metric-card{padding:10px 12px;border-radius:var(--radius-md)}.metric-grid--compact .metric-card__label{font-size:11px}.metric-grid--compact .metric-card__value{margin-top:2px;font-size:20px}.metric-grid--compact .metric-card__meta{margin-top:1px;font-size:10px;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.content-grid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:16px}.field-label{display:block;margin-bottom:6px;color:var(--text-muted);font-size:12px;font-weight:700}.empty-state{display:flex;min-height:260px;flex-direction:column;align-items:center;justify-content:center;border:1px dashed var(--border-strong);border-radius:var(--radius-xl);background:var(--surface);padding:32px;text-align:center}.empty-state--compact{min-height:160px}.empty-state__icon{display:inline-flex;width:52px;height:52px;align-items:center;justify-content:center;border-radius:var(--radius-lg);background:var(--surface-strong);color:var(--text-soft)}.empty-state h3{margin-top:14px;color:var(--text);font-size:15px;font-weight:700}.empty-state p{margin-top:5px;max-width:520px;color:var(--text-muted);font-size:13px;line-height:1.6}.page-loading{display:flex;min-height:260px;align-items:center;justify-content:center;gap:9px;color:var(--text-muted);font-size:13px;font-weight:600}.ios-card{background:var(--surface);border-radius:var(--radius-lg);border:1px solid var(--border);box-shadow:var(--shadow-sm);transition:border-color .2s ease,box-shadow .2s ease,transform .2s ease}.ios-card:hover{border-color:var(--border-brand);box-shadow:var(--shadow-md)}.ios-input{min-height:42px;background:var(--surface);border:1px solid var(--border-strong);border-radius:var(--radius);color:var(--text);font-weight:500;transition:border-color .15s ease,box-shadow .15s ease,background-color .15s ease}.ios-input:hover:not(:disabled):not(:focus){border-color:var(--border-brand)}.ios-input:focus{background:var(--surface);border-color:var(--focus-ring);box-shadow:0 0 0 4px color-mix(in srgb,var(--focus-ring) 28%,transparent);outline:none}.ios-input::-moz-placeholder{color:var(--text-soft);font-weight:400}.ios-input::placeholder{color:var(--text-soft);font-weight:400}.ios-input:disabled,.ios-input[readonly]{border-color:var(--border);background:var(--surface-strong);color:var(--text-muted);cursor:not-allowed}.ios-btn-primary{min-height:42px;border-radius:var(--radius-pill);background:var(--brand);color:var(--brand-ink);font-weight:700;border:none;box-shadow:var(--shadow-brand);transition:background-color .15s ease,box-shadow .15s ease,transform .1s ease;cursor:pointer}.ios-btn-primary:hover:not(:disabled){background:var(--brand-hover);box-shadow:0 8px 22px #ffd60073}.ios-btn-primary:active:not(:disabled){background:var(--brand-active);transform:translateY(1px);box-shadow:var(--shadow-sm)}.ios-btn-primary:disabled{background:var(--surface-strong);color:var(--text-soft);box-shadow:none;cursor:not-allowed}.ios-btn-secondary{min-height:42px;border-radius:var(--radius-pill);background:var(--surface);color:var(--text);font-weight:600;border:1px solid var(--border-strong);transition:background-color .15s ease,border-color .15s ease;cursor:pointer}.ios-btn-secondary:hover:not(:disabled){background:var(--surface-hover);border-color:var(--brand)}.ios-btn-secondary:disabled{color:var(--text-soft);cursor:not-allowed}.ios-btn-danger{min-height:42px;border-radius:var(--radius-pill);background:var(--danger-soft);color:var(--danger);font-weight:600;border:1px solid color-mix(in srgb,var(--danger) 38%,var(--border));transition:background-color .15s ease,border-color .15s ease;cursor:pointer}.ios-btn-danger:hover:not(:disabled){background:color-mix(in srgb,var(--danger-soft) 82%,var(--danger));border-color:color-mix(in srgb,var(--danger) 62%,var(--border))}.data-table{width:100%;border-collapse:collapse;text-align:left}.data-table thead{background:var(--surface-subtle);color:var(--text-muted);font-size:11px;font-weight:700}.data-table th{height:46px;padding:0 16px;border-bottom:1px solid var(--border);letter-spacing:0}.data-table td{padding:13px 16px;border-bottom:1px solid var(--border);vertical-align:middle}.data-table tbody tr:last-child td{border-bottom:0}.data-table tbody tr:hover{background:var(--surface-hover)}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:var(--scrollbar-thumb);border-radius:var(--radius-pill)}::-webkit-scrollbar-thumb:hover{background:var(--scrollbar-thumb-hover)}aside nav::-webkit-scrollbar{width:4px}aside nav::-webkit-scrollbar-thumb{background:transparent}aside nav:hover::-webkit-scrollbar-thumb{background:var(--border-strong)}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.animate-fade-in{animation:fadeIn .18s ease-out forwards}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}::-moz-selection{background:var(--brand);color:#000}::selection{background:var(--brand);color:#000}.chat-self-bubble ::-moz-selection{background:var(--selection-bg);color:var(--selection-ink)}.chat-self-bubble ::selection{background:var(--selection-bg);color:var(--selection-ink)}.text-brand{color:#8c7900}.bg-brand{background-color:var(--brand)}.border-brand{border-color:var(--brand)}.status-badge{display:inline-flex;align-items:center;padding:4px 10px;border-radius:var(--radius-pill);font-size:12px;font-weight:650}.status-badge-success{background-color:var(--success-soft);color:var(--success-ink)}.status-badge-warning{background-color:var(--brand-100);color:var(--warning-ink)}.status-badge-error{background-color:var(--danger-soft);color:var(--danger-ink)}.status-badge-info{background-color:var(--surface-strong);color:var(--text-muted)}.modal-overlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:9999;display:flex;align-items:center;justify-content:center;background-color:#0006;padding:1rem;overflow-y:auto}.modal-container{position:relative;width:100%;max-width:42rem;max-height:85vh;margin:auto;display:flex;flex-direction:column;background-color:var(--surface);color:var(--text);border-radius:var(--radius-xl);border:1px solid var(--border);box-shadow:var(--shadow-lg);overflow:hidden}.modal-header{flex-shrink:0;padding:20px 22px;border-bottom:1px solid var(--border);background:var(--surface-subtle);z-index:10}.modal-body{flex:1 1 auto;overflow-y:auto;overflow-x:hidden;padding:22px;color:var(--text)}.modal-footer{flex-shrink:0;padding:16px 22px;border-top:1px solid var(--border);background:var(--surface-subtle);z-index:10}.modal-container-lg{max-width:64rem}.modal-overlay-centered{position:fixed;top:0;right:0;bottom:0;left:0;z-index:9999;display:flex;justify-content:center;background-color:#0006;padding:1rem;overflow-y:auto}@media(max-width:1023px){.metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.metric-grid--compact{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:639px){.page-stack{gap:16px}.page-header{min-height:0;align-items:flex-start;padding-bottom:14px}.page-header__icon{width:34px;height:34px;flex-basis:34px}.page-title{font-size:20px}.page-actions{width:100%;justify-content:stretch}.page-actions>*{flex:1 1 auto}.toolbar{align-items:stretch}.toolbar,.toolbar__group{flex-direction:column}.toolbar__group>input,.toolbar__group>select,.toolbar__group>button{width:100%}.section-panel__header{flex-direction:column;align-items:flex-start}.section-header__actions{width:100%;justify-content:stretch}.section-header__actions>*{flex:1 1 auto;justify-content:center}.metric-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.metric-grid--compact{grid-template-columns:repeat(2,minmax(0,1fr))}.metric-card{padding:12px 14px}.metric-card__label{font-size:11px}.metric-card__value,.metric-grid--compact .metric-card__value{font-size:18px}}.modal-overlay-centered .modal-container{position:relative;width:100%;max-width:42rem;max-height:85vh;margin:auto 0;display:flex;flex-direction:column;background-color:var(--surface);color:var(--text);border-radius:var(--radius);border:1px solid var(--border);box-shadow:var(--shadow-md);overflow:hidden}@media(max-width:768px){.page-stack{gap:16px}.page-header{min-height:0;flex-direction:column;align-items:stretch;gap:12px;padding-bottom:14px}.page-title{font-size:21px}.page-actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(132px,1fr));justify-content:stretch}.page-actions>*{min-width:0}.toolbar{flex-direction:column;align-items:stretch}.toolbar__group{display:grid;grid-template-columns:1fr}.page-tabs{display:grid;width:100%;grid-auto-flow:column;grid-auto-columns:minmax(128px,1fr)}.page-tab{min-width:0;white-space:normal}.responsive-data-table{min-width:0!important}.responsive-data-table,.responsive-data-table tbody,.responsive-data-table tr,.responsive-data-table td{display:block;width:100%}.responsive-data-table thead{display:none}.responsive-data-table tbody tr{border-bottom:1px solid var(--border);padding:12px 16px}.responsive-data-table tbody tr:last-child{border-bottom:0}.responsive-data-table td{display:grid;grid-template-columns:minmax(82px,30%) minmax(0,1fr);align-items:center;gap:12px;border:0;padding:7px 0;text-align:left}.responsive-data-table td:before{content:attr(data-label);color:var(--text-muted);font-size:11px;font-weight:700}.responsive-data-table td>*{min-width:0}.responsive-data-table td[data-label=订单信息],.responsive-data-table td[data-label=卡密名称]{align-items:start}.responsive-data-table td[data-label=操作]>div{flex-wrap:wrap;justify-content:flex-start}.responsive-data-table td>.status-badge{justify-self:start}.ios-card{border-radius:var(--radius)}.ios-input{font-size:16px}.modal-container{max-width:calc(100% - 2rem);max-height:90vh;border-radius:var(--radius)}.modal-header,.modal-body,.modal-footer{padding-left:1.5rem;padding-right:1.5rem}}.marquee{overflow:hidden}.marquee__track{display:inline-flex;align-items:center;white-space:nowrap;will-change:transform;animation:marquee-scroll 40s linear infinite}.marquee:hover .marquee__track{animation-play-state:paused}@keyframes marquee-scroll{0%{transform:translate(0)}to{transform:translate(-50%)}}@media(prefers-reduced-motion:reduce){.marquee__track{animation:none}.marquee{overflow-x:auto}}.placeholder\:text-\[var\(--text-soft\)\]::-moz-placeholder{color:var(--text-soft)}.placeholder\:text-\[var\(--text-soft\)\]::placeholder{color:var(--text-soft)}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:-inset-1\.5:after{content:var(--tw-content);top:-.375rem;right:-.375rem;bottom:-.375rem;left:-.375rem}.after\:content-\[\'\'\]:after{--tw-content: "";content:var(--tw-content)}.last\:mb-0:last-child{margin-bottom:0}.last\:border-b-0:last-child{border-bottom-width:0px}.hover\:border-\[var\(--border-strong\)\]:hover{border-color:var(--border-strong)}.hover\:border-amber-400:hover{--tw-border-opacity: 1;border-color:rgb(251 191 36 / var(--tw-border-opacity, 1))}.hover\:border-gray-400:hover{--tw-border-opacity: 1;border-color:rgb(var(--gray-400) / var(--tw-border-opacity, 1))}.hover\:border-purple-400:hover{--tw-border-opacity: 1;border-color:rgb(192 132 252 / var(--tw-border-opacity, 1))}.hover\:bg-\[\#ff4400\]:hover{--tw-bg-opacity: 1;background-color:rgb(255 68 0 / var(--tw-bg-opacity, 1))}.hover\:bg-\[\#ffd700\]:hover{--tw-bg-opacity: 1;background-color:rgb(255 215 0 / var(--tw-bg-opacity, 1))}.hover\:bg-\[\#fffdf0\]:hover{--tw-bg-opacity: 1;background-color:rgb(255 253 240 / var(--tw-bg-opacity, 1))}.hover\:bg-\[var\(--brand-hover\)\]:hover{background-color:var(--brand-hover)}.hover\:bg-\[var\(--danger-soft\)\]:hover{background-color:var(--danger-soft)}.hover\:bg-\[var\(--surface-hover\)\]:hover{background-color:var(--surface-hover)}.hover\:bg-amber-100:hover{--tw-bg-opacity: 1;background-color:rgb(254 243 199 / var(--tw-bg-opacity, 1))}.hover\:bg-amber-200:hover{--tw-bg-opacity: 1;background-color:rgb(253 230 138 / var(--tw-bg-opacity, 1))}.hover\:bg-amber-50:hover{--tw-bg-opacity: 1;background-color:rgb(255 251 235 / var(--tw-bg-opacity, 1))}.hover\:bg-black\/5:hover{background-color:#0000000d}.hover\:bg-black\/80:hover{background-color:#000c}.hover\:bg-blue-100:hover{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.hover\:bg-blue-50:hover{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.hover\:bg-brand-600:hover{--tw-bg-opacity: 1;background-color:rgb(245 200 0 / var(--tw-bg-opacity, 1))}.hover\:bg-cyan-100:hover{--tw-bg-opacity: 1;background-color:rgb(207 250 254 / var(--tw-bg-opacity, 1))}.hover\:bg-emerald-100:hover{--tw-bg-opacity: 1;background-color:rgb(209 250 229 / var(--tw-bg-opacity, 1))}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(var(--gray-100) / var(--tw-bg-opacity, 1))}.hover\:bg-gray-200:hover{--tw-bg-opacity: 1;background-color:rgb(var(--gray-200) / var(--tw-bg-opacity, 1))}.hover\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(var(--gray-50) / var(--tw-bg-opacity, 1))}.hover\:bg-green-100:hover{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity, 1))}.hover\:bg-green-50:hover{--tw-bg-opacity: 1;background-color:rgb(240 253 244 / var(--tw-bg-opacity, 1))}.hover\:bg-pink-50:hover{--tw-bg-opacity: 1;background-color:rgb(253 242 248 / var(--tw-bg-opacity, 1))}.hover\:bg-purple-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 232 255 / var(--tw-bg-opacity, 1))}.hover\:bg-purple-50:hover{--tw-bg-opacity: 1;background-color:rgb(250 245 255 / var(--tw-bg-opacity, 1))}.hover\:bg-red-100:hover{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1))}.hover\:bg-red-50:hover{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}.hover\:bg-rose-50:hover{--tw-bg-opacity: 1;background-color:rgb(255 241 242 / var(--tw-bg-opacity, 1))}.hover\:bg-slate-100:hover{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity, 1))}.hover\:bg-violet-100:hover{--tw-bg-opacity: 1;background-color:rgb(237 233 254 / var(--tw-bg-opacity, 1))}.hover\:bg-white\/40:hover{background-color:#fff6}.hover\:bg-yellow-50:hover{--tw-bg-opacity: 1;background-color:rgb(254 252 232 / var(--tw-bg-opacity, 1))}.hover\:text-\[\#ff4400\]:hover{--tw-text-opacity: 1;color:rgb(255 68 0 / var(--tw-text-opacity, 1))}.hover\:text-\[var\(--danger\)\]:hover{color:var(--danger)}.hover\:text-\[var\(--text\)\]:hover{color:var(--text)}.hover\:text-amber-600:hover{--tw-text-opacity: 1;color:rgb(217 119 6 / var(--tw-text-opacity, 1))}.hover\:text-amber-700:hover{--tw-text-opacity: 1;color:rgb(180 83 9 / var(--tw-text-opacity, 1))}.hover\:text-black:hover{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.hover\:text-blue-600:hover{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.hover\:text-gray-600:hover{--tw-text-opacity: 1;color:rgb(var(--gray-600) / var(--tw-text-opacity, 1))}.hover\:text-gray-800:hover{--tw-text-opacity: 1;color:rgb(var(--gray-800) / var(--tw-text-opacity, 1))}.hover\:text-gray-900:hover{--tw-text-opacity: 1;color:rgb(var(--gray-900) / var(--tw-text-opacity, 1))}.hover\:text-green-700:hover{--tw-text-opacity: 1;color:rgb(21 128 61 / var(--tw-text-opacity, 1))}.hover\:text-pink-600:hover{--tw-text-opacity: 1;color:rgb(219 39 119 / var(--tw-text-opacity, 1))}.hover\:text-purple-500:hover{--tw-text-opacity: 1;color:rgb(168 85 247 / var(--tw-text-opacity, 1))}.hover\:text-red-600:hover{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.hover\:text-yellow-600:hover{--tw-text-opacity: 1;color:rgb(202 138 4 / var(--tw-text-opacity, 1))}.hover\:underline:hover{text-decoration-line:underline}.focus\:border-\[\#ffe100\]:focus{--tw-border-opacity: 1;border-color:rgb(255 225 0 / var(--tw-border-opacity, 1))}.focus\:border-\[var\(--brand\)\]:focus{border-color:var(--brand)}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-\[var\(--brand\)\]:focus{--tw-ring-color: var(--brand)}.focus-visible\:outline-2:focus-visible{outline-width:2px}.focus-visible\:outline-offset-2:focus-visible{outline-offset:2px}.focus-visible\:outline-\[var\(--focus-ring\)\]:focus-visible{outline-color:var(--focus-ring)}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:cursor-wait:disabled{cursor:wait}.disabled\:bg-\[var\(--surface\)\]:disabled{background-color:var(--surface)}.disabled\:bg-\[var\(--surface-strong\)\]:disabled{background-color:var(--surface-strong)}.disabled\:bg-gray-100:disabled{--tw-bg-opacity: 1;background-color:rgb(var(--gray-100) / var(--tw-bg-opacity, 1))}.disabled\:text-\[var\(--text-soft\)\]:disabled{color:var(--text-soft)}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:opacity-60:disabled{opacity:.6}.disabled\:opacity-70:disabled{opacity:.7}.group:focus-within .group-focus-within\:text-\[\#ffe100\]{--tw-text-opacity: 1;color:rgb(255 225 0 / var(--tw-text-opacity, 1))}.group:focus-within .group-focus-within\:text-gray-700{--tw-text-opacity: 1;color:rgb(var(--gray-700) / var(--tw-text-opacity, 1))}.group:hover .group-hover\:flex{display:flex}.group:hover .group-hover\:text-\[var\(--text-muted\)\]{color:var(--text-muted)}.group:hover .group-hover\:text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}@media(prefers-reduced-motion:reduce){.motion-reduce\:transition-none{transition-property:none}}.dark\:border-amber-500\/20:is(.dark *){border-color:#f59e0b33}.dark\:border-slate-700:is(.dark *){--tw-border-opacity: 1;border-color:rgb(51 65 85 / var(--tw-border-opacity, 1))}.dark\:bg-amber-500\/10:is(.dark *){background-color:#f59e0b1a}.dark\:bg-slate-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity, 1))}.dark\:from-amber-950\/20:is(.dark *){--tw-gradient-from: rgb(69 26 3 / .2) var(--tw-gradient-from-position);--tw-gradient-to: rgb(69 26 3 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:to-\[var\(--surface\)\]:is(.dark *){--tw-gradient-to: var(--surface) var(--tw-gradient-to-position)}.dark\:text-amber-300:is(.dark *){--tw-text-opacity: 1;color:rgb(252 211 77 / var(--tw-text-opacity, 1))}.dark\:text-amber-400:is(.dark *){--tw-text-opacity: 1;color:rgb(251 191 36 / var(--tw-text-opacity, 1))}.dark\:text-slate-100:is(.dark *){--tw-text-opacity: 1;color:rgb(241 245 249 / var(--tw-text-opacity, 1))}.dark\:text-slate-300:is(.dark *){--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity, 1))}.dark\:text-slate-400:is(.dark *){--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.dark\:hover\:bg-slate-700\/60:hover:is(.dark *){background-color:#33415599}@media(min-width:640px){.sm\:right-6{right:1.5rem}.sm\:top-6{top:1.5rem}.sm\:col-span-2{grid-column:span 2 / span 2}.sm\:col-span-3{grid-column:span 3 / span 3}.sm\:inline-flex{display:inline-flex}.sm\:h-16{height:4rem}.sm\:min-h-\[72px\]{min-height:72px}.sm\:min-h-\[92px\]{min-height:92px}.sm\:min-h-\[calc\(100vh-3rem\)\]{min-height:calc(100vh - 3rem)}.sm\:w-16{width:4rem}.sm\:w-64{width:16rem}.sm\:w-72{width:18rem}.sm\:w-auto{width:auto}.sm\:min-w-40{min-width:10rem}.sm\:min-w-44{min-width:11rem}.sm\:min-w-52{min-width:13rem}.sm\:min-w-56{min-width:14rem}.sm\:min-w-64{min-width:16rem}.sm\:min-w-72{min-width:18rem}.sm\:max-w-xs{max-width:20rem}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:grid-cols-\[100px_1fr\]{grid-template-columns:100px 1fr}.sm\:grid-cols-\[140px_200px_1fr_auto\]{grid-template-columns:140px 200px 1fr auto}.sm\:grid-cols-\[160px_minmax\(0\,1fr\)_auto_auto\]{grid-template-columns:160px minmax(0,1fr) auto auto}.sm\:grid-cols-\[24px_52px_180px_minmax\(0\,1fr\)_44px\]{grid-template-columns:24px 52px 180px minmax(0,1fr) 44px}.sm\:grid-cols-\[minmax\(160px\,0\.7fr\)_minmax\(0\,1\.5fr\)_auto\]{grid-template-columns:minmax(160px,.7fr) minmax(0,1.5fr) auto}.sm\:grid-cols-\[minmax\(180px\,0\.7fr\)_minmax\(0\,1\.4fr\)_auto\]{grid-template-columns:minmax(180px,.7fr) minmax(0,1.4fr) auto}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:justify-end{justify-content:flex-end}.sm\:justify-between{justify-content:space-between}.sm\:gap-3{gap:.75rem}.sm\:gap-4{gap:1rem}.sm\:border-0{border-width:0px}.sm\:p-10{padding:2.5rem}.sm\:p-5{padding:1.25rem}.sm\:p-6{padding:1.5rem}.sm\:p-8{padding:2rem}.sm\:px-5{padding-left:1.25rem;padding-right:1.25rem}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:px-8{padding-left:2rem;padding-right:2rem}.sm\:pt-0{padding-top:0}.sm\:text-right{text-align:right}}@media(min-width:768px){.md\:col-span-2{grid-column:span 2 / span 2}.md\:min-h-\[360px\]{min-height:360px}.md\:w-44{width:11rem}.md\:w-72{width:18rem}.md\:w-auto{width:auto}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-\[minmax\(0\,1fr\)_150px_minmax\(0\,1\.4fr\)\]{grid-template-columns:minmax(0,1fr) 150px minmax(0,1.4fr)}.md\:grid-cols-\[minmax\(0\,1fr\)_minmax\(0\,1fr\)_auto_auto\]{grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto auto}.md\:flex-row{flex-direction:row}.md\:items-end{align-items:flex-end}.md\:items-center{align-items:center}.md\:p-6{padding:1.5rem}}@media(min-width:1024px){.lg\:sticky{position:sticky}.lg\:top-2{top:.5rem}.lg\:col-span-2{grid-column:span 2 / span 2}.lg\:mb-3{margin-bottom:.75rem}.lg\:ml-\[248px\]{margin-left:248px}.lg\:block{display:block}.lg\:flex{display:flex}.lg\:hidden{display:none}.lg\:h-screen{height:100vh}.lg\:w-48{width:12rem}.lg\:w-full{width:100%}.lg\:translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:grid-cols-\[1\.05fr_0\.95fr\]{grid-template-columns:1.05fr .95fr}.lg\:grid-cols-\[165px_80px_180px_minmax\(0\,1fr\)\]{grid-template-columns:165px 80px 180px minmax(0,1fr)}.lg\:grid-cols-\[180px_120px_minmax\(0\,1fr\)_44px\]{grid-template-columns:180px 120px minmax(0,1fr) 44px}.lg\:grid-cols-\[1fr_auto\]{grid-template-columns:1fr auto}.lg\:grid-cols-\[220px_180px_minmax\(240px\,1fr\)_auto\]{grid-template-columns:220px 180px minmax(240px,1fr) auto}.lg\:grid-cols-\[356px_minmax\(0\,1fr\)\]{grid-template-columns:356px minmax(0,1fr)}.lg\:grid-cols-\[minmax\(180px\,0\.7fr\)_minmax\(0\,1\.4fr\)_auto\]{grid-template-columns:minmax(180px,.7fr) minmax(0,1.4fr) auto}.lg\:grid-cols-\[minmax\(220px\,1\.2fr\)_minmax\(260px\,1\.5fr\)_180px_auto\]{grid-template-columns:minmax(220px,1.2fr) minmax(260px,1.5fr) 180px auto}.lg\:grid-cols-\[minmax\(220px\,1fr\)_1fr_180px_auto\]{grid-template-columns:minmax(220px,1fr) 1fr 180px auto}.lg\:flex-row{flex-direction:row}.lg\:items-start{align-items:flex-start}.lg\:items-center{align-items:center}.lg\:gap-0{gap:0px}.lg\:overflow-visible{overflow:visible}.lg\:border-b-0{border-bottom-width:0px}.lg\:border-r{border-right-width:1px}.lg\:p-8{padding:2rem}.lg\:px-8{padding-left:2rem;padding-right:2rem}}@media(min-width:1280px){.xl\:grid{display:grid}.xl\:min-w-\[1200px\]{min-width:1200px}.xl\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.xl\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.xl\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.xl\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.xl\:grid-cols-\[340px_140px_260px_210px_110px\]{grid-template-columns:340px 140px 260px 210px 110px}.xl\:grid-cols-\[minmax\(0\,1\.35fr\)_minmax\(340px\,0\.65fr\)\]{grid-template-columns:minmax(0,1.35fr) minmax(340px,.65fr)}.xl\:grid-cols-\[minmax\(230px\,1fr\)_minmax\(360px\,1\.5fr\)_44px\]{grid-template-columns:minmax(230px,1fr) minmax(360px,1.5fr) 44px}.xl\:\!flex-row{flex-direction:row!important}.xl\:items-start{align-items:flex-start}.xl\:items-center{align-items:center}.xl\:items-stretch{align-items:stretch}.xl\:justify-end{justify-content:flex-end}.xl\:gap-0{gap:0px}.xl\:gap-1\.5{gap:.375rem}.xl\:border-0{border-width:0px}.xl\:px-0{padding-left:0;padding-right:0}.xl\:px-2{padding-left:.5rem;padding-right:.5rem}.xl\:pt-0{padding-top:0}.xl\:\[\&\>\*\:first-child\]\:\!flex-row>*:first-child{flex-direction:row!important}.xl\:\[\&\>\*\:first-child\]\:items-center>*:first-child{align-items:center}.xl\:\[\&\>\*\:last-child\]\:border-r-0>*:last-child{border-right-width:0px}.xl\:\[\&\>\*\]\:flex>*{display:flex}.xl\:\[\&\>\*\]\:min-w-0>*{min-width:0px}.xl\:\[\&\>\*\]\:flex-col>*{flex-direction:column}.xl\:\[\&\>\*\]\:justify-center>*{justify-content:center}.xl\:\[\&\>\*\]\:border-r>*{border-right-width:1px}.xl\:\[\&\>\*\]\:border-gray-200>*{--tw-border-opacity: 1;border-color:rgb(var(--gray-200) / var(--tw-border-opacity, 1))}.xl\:\[\&\>\*\]\:px-4>*{padding-left:1rem;padding-right:1rem}.xl\:\[\&\>div\:last-child\]\:border-b-0>div:last-child{border-bottom-width:0px}.xl\:\[\&\>div\]\:border-b>div{border-bottom-width:1px}.xl\:\[\&\>div\]\:border-dashed>div{border-style:dashed}.xl\:\[\&\>div\]\:border-gray-200>div{--tw-border-opacity: 1;border-color:rgb(var(--gray-200) / var(--tw-border-opacity, 1))}.xl\:\[\&\>div\]\:py-1\.5>div{padding-top:.375rem;padding-bottom:.375rem}}.\[\&\>span\:last-child\]\:border-r-0>span:last-child{border-right-width:0px}.\[\&\>span\:nth-child\(2\)\]\:px-2>span:nth-child(2){padding-left:.5rem;padding-right:.5rem}.\[\&\>span\]\:border-r>span{border-right-width:1px}.\[\&\>span\]\:border-gray-300>span{--tw-border-opacity: 1;border-color:rgb(var(--gray-300) / var(--tw-border-opacity, 1))}.\[\&\>span\]\:px-4>span{padding-left:1rem;padding-right:1rem}.\[\&\>span\]\:py-3>span{padding-top:.75rem;padding-bottom:.75rem} diff --git a/static/assets/index-Dj620IsJ.css b/static/assets/index-Dj620IsJ.css new file mode 100644 index 0000000..abfcc5e --- /dev/null +++ b/static/assets/index-Dj620IsJ.css @@ -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:rgb(var(--gray-200) / 1)}: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:-apple-system,BlinkMacSystemFont,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Helvetica Neue,Helvetica,Arial,sans-serif;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:rgb(var(--gray-400) / 1)}input::placeholder,textarea::placeholder{opacity:1;color:rgb(var(--gray-400) / 1)}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}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-x-0{left:0;right:0}.inset-x-3{left:.75rem;right:.75rem}.-bottom-1{bottom:-.25rem}.-right-1{right:-.25rem}.-right-1\.5{right:-.375rem}.-top-1\.5{top:-.375rem}.bottom-0{bottom:0}.bottom-3{bottom:.75rem}.bottom-4{bottom:1rem}.bottom-8{bottom:2rem}.bottom-full{bottom:100%}.left-0{left:0}.left-1{left:.25rem}.left-2{left:.5rem}.left-2\.5{left:.625rem}.left-3{left:.75rem}.left-3\.5{left:.875rem}.left-4{left:1rem}.left-5{left:1.25rem}.right-0{right:0}.right-0\.5{right:.125rem}.right-2{right:.5rem}.right-3{right:.75rem}.right-4{right:1rem}.top-0{top:0}.top-0\.5{top:.125rem}.top-1{top:.25rem}.top-1\/2{top:50%}.top-2{top:.5rem}.top-4{top:1rem}.top-8{top:2rem}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-\[10000\]{z-index:10000}.col-span-2{grid-column:span 2 / span 2}.m-3{margin:.75rem}.mx-6{margin-left:1.5rem;margin-right:1.5rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.-ml-2{margin-left:-.5rem}.-mt-1{margin-top:-.25rem}.-mt-2{margin-top:-.5rem}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-8{margin-bottom:2rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mr-1\.5{margin-right:.375rem}.mr-2{margin-right:.5rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.mt-2\.5{margin-top:.625rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.mt-7{margin-top:1.75rem}.mt-auto{margin-top:auto}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-square{aspect-ratio:1 / 1}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-20{height:5rem}.h-28{height:7rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-36{height:9rem}.h-4{height:1rem}.h-44{height:11rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-60{height:15rem}.h-7{height:1.75rem}.h-72{height:18rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[18px\]{height:18px}.h-\[280px\]{height:280px}.h-\[300px\]{height:300px}.h-\[340px\]{height:340px}.h-\[68px\]{height:68px}.h-\[76px\]{height:76px}.h-\[calc\(100vh-3\.5rem\)\]{height:calc(100vh - 3.5rem)}.h-full{height:100%}.h-screen{height:100vh}.max-h-48{max-height:12rem}.max-h-72{max-height:18rem}.max-h-80{max-height:20rem}.max-h-\[220px\]{max-height:220px}.max-h-\[400px\]{max-height:400px}.max-h-\[460px\]{max-height:460px}.max-h-\[620px\]{max-height:620px}.max-h-\[90vh\]{max-height:90vh}.max-h-\[92vh\]{max-height:92vh}.min-h-0{min-height:0px}.min-h-10{min-height:2.5rem}.min-h-11{min-height:2.75rem}.min-h-20{min-height:5rem}.min-h-24{min-height:6rem}.min-h-28{min-height:7rem}.min-h-36{min-height:9rem}.min-h-64{min-height:16rem}.min-h-\[2\.5rem\]{min-height:2.5rem}.min-h-\[320px\]{min-height:320px}.min-h-\[42px\]{min-height:42px}.min-h-\[500px\]{min-height:500px}.min-h-\[560px\]{min-height:560px}.min-h-\[56px\]{min-height:56px}.min-h-\[84px\]{min-height:84px}.min-h-\[calc\(100vh-2rem\)\]{min-height:calc(100vh - 2rem)}.min-h-screen{min-height:100vh}.w-1\.5{width:.375rem}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-20{width:5rem}.w-28{width:7rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-4{width:1rem}.w-44{width:11rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-60{width:15rem}.w-7{width:1.75rem}.w-8{width:2rem}.w-80{width:20rem}.w-9{width:2.25rem}.w-\[10\%\]{width:10%}.w-\[11\%\]{width:11%}.w-\[12\%\]{width:12%}.w-\[13\%\]{width:13%}.w-\[15\%\]{width:15%}.w-\[16\%\]{width:16%}.w-\[17\%\]{width:17%}.w-\[18\%\]{width:18%}.w-\[18px\]{width:18px}.w-\[20\%\]{width:20%}.w-\[22\%\]{width:22%}.w-\[248px\]{width:248px}.w-\[25\%\]{width:25%}.w-\[44\%\]{width:44%}.w-\[6\%\]{width:6%}.w-\[min\(22rem\,calc\(100vw-3rem\)\)\]{width:min(22rem,calc(100vw - 3rem))}.w-\[min\(380px\,calc\(100vw-2rem\)\)\]{width:min(380px,calc(100vw - 2rem))}.w-auto{width:auto}.w-full{width:100%}.min-w-0{min-width:0px}.min-w-20{min-width:5rem}.min-w-5{min-width:1.25rem}.min-w-\[1040px\]{min-width:1040px}.min-w-\[1100px\]{min-width:1100px}.min-w-\[3rem\]{min-width:3rem}.min-w-\[760px\]{min-width:760px}.min-w-\[820px\]{min-width:820px}.min-w-\[860px\]{min-width:860px}.min-w-\[980px\]{min-width:980px}.min-w-full{min-width:100%}.max-w-2xl{max-width:42rem}.max-w-3xl{max-width:48rem}.max-w-4xl{max-width:56rem}.max-w-52{max-width:13rem}.max-w-5xl{max-width:64rem}.max-w-72{max-width:18rem}.max-w-\[10rem\]{max-width:10rem}.max-w-\[1320px\]{max-width:1320px}.max-w-\[1600px\]{max-width:1600px}.max-w-\[220px\]{max-width:220px}.max-w-\[260px\]{max-width:260px}.max-w-\[380px\]{max-width:380px}.max-w-\[680px\]{max-width:680px}.max-w-\[76\%\]{max-width:76%}.max-w-\[86\%\]{max-width:86%}.max-w-\[980px\]{max-width:980px}.max-w-full{max-width:100%}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.flex-1{flex:1 1 0%}.flex-none{flex:none}.flex-shrink-0,.shrink-0{flex-shrink:0}.table-fixed{table-layout:fixed}.-translate-x-full{--tw-translate-x: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-1{--tw-translate-x: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-5{--tw-translate-x: 1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-6{--tw-translate-x: 1.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.cursor-crosshair{cursor:crosshair}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.resize-y{resize:vertical}.resize{resize:both}.scroll-mt-4{scroll-margin-top:1rem}.list-inside{list-style-position:inside}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-\[340px_140px_260px_210px_110px\]{grid-template-columns:340px 140px 260px 210px 110px}.grid-cols-\[48px_minmax\(0\,1fr\)_auto\]{grid-template-columns:48px minmax(0,1fr) auto}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-x-5{-moz-column-gap:1.25rem;column-gap:1.25rem}.gap-y-1{row-gap:.25rem}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-y-2>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(2px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(2px * var(--tw-divide-y-reverse))}.divide-\[\#eeeeee\]>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(238 238 238 / var(--tw-divide-opacity, 1))}.divide-\[var\(--border\)\]>:not([hidden])~:not([hidden]){border-color:var(--border)}.divide-gray-100>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(var(--gray-100) / var(--tw-divide-opacity, 1))}.divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(var(--gray-200) / var(--tw-divide-opacity, 1))}.self-end{align-self:flex-end}.self-center{align-self:center}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:8px}.rounded-2xl{border-radius:24px}.rounded-3xl{border-radius:32px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:16px}.rounded-md{border-radius:10px}.rounded-none{border-radius:0}.rounded-xl{border-radius:20px}.rounded-b-md{border-bottom-right-radius:10px;border-bottom-left-radius:10px}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-4{border-width:4px}.border-x-0{border-left-width:0px;border-right-width:0px}.border-y{border-top-width:1px;border-bottom-width:1px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l-4{border-left-width:4px}.border-t{border-top-width:1px}.border-t-0{border-top-width:0px}.border-dashed{border-style:dashed}.border-\[\#f5c800\]{--tw-border-opacity: 1;border-color:rgb(245 200 0 / var(--tw-border-opacity, 1))}.border-\[\#ffe100\]{--tw-border-opacity: 1;border-color:rgb(255 225 0 / var(--tw-border-opacity, 1))}.border-\[\#ffe566\]{--tw-border-opacity: 1;border-color:rgb(255 229 102 / var(--tw-border-opacity, 1))}.border-\[var\(--border\)\]{border-color:var(--border)}.border-\[var\(--border-light\)\]{border-color:var(--border-light)}.border-\[var\(--border-strong\)\]{border-color:var(--border-strong)}.border-amber-200{--tw-border-opacity: 1;border-color:rgb(253 230 138 / var(--tw-border-opacity, 1))}.border-amber-400{--tw-border-opacity: 1;border-color:rgb(251 191 36 / var(--tw-border-opacity, 1))}.border-amber-500{--tw-border-opacity: 1;border-color:rgb(245 158 11 / var(--tw-border-opacity, 1))}.border-blue-200{--tw-border-opacity: 1;border-color:rgb(191 219 254 / var(--tw-border-opacity, 1))}.border-brand-200{--tw-border-opacity: 1;border-color:rgb(255 239 163 / var(--tw-border-opacity, 1))}.border-cyan-100{--tw-border-opacity: 1;border-color:rgb(207 250 254 / var(--tw-border-opacity, 1))}.border-cyan-200{--tw-border-opacity: 1;border-color:rgb(165 243 252 / var(--tw-border-opacity, 1))}.border-cyan-300{--tw-border-opacity: 1;border-color:rgb(103 232 249 / var(--tw-border-opacity, 1))}.border-cyan-600{--tw-border-opacity: 1;border-color:rgb(8 145 178 / var(--tw-border-opacity, 1))}.border-emerald-200{--tw-border-opacity: 1;border-color:rgb(167 243 208 / var(--tw-border-opacity, 1))}.border-gray-100{--tw-border-opacity: 1;border-color:rgb(var(--gray-100) / var(--tw-border-opacity, 1))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(var(--gray-200) / var(--tw-border-opacity, 1))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(var(--gray-300) / var(--tw-border-opacity, 1))}.border-gray-50{--tw-border-opacity: 1;border-color:rgb(var(--gray-50) / var(--tw-border-opacity, 1))}.border-green-200{--tw-border-opacity: 1;border-color:rgb(187 247 208 / var(--tw-border-opacity, 1))}.border-indigo-200{--tw-border-opacity: 1;border-color:rgb(199 210 254 / var(--tw-border-opacity, 1))}.border-purple-500{--tw-border-opacity: 1;border-color:rgb(168 85 247 / var(--tw-border-opacity, 1))}.border-red-200{--tw-border-opacity: 1;border-color:rgb(254 202 202 / var(--tw-border-opacity, 1))}.border-slate-200{--tw-border-opacity: 1;border-color:rgb(226 232 240 / var(--tw-border-opacity, 1))}.border-slate-300{--tw-border-opacity: 1;border-color:rgb(203 213 225 / var(--tw-border-opacity, 1))}.border-violet-100{--tw-border-opacity: 1;border-color:rgb(237 233 254 / var(--tw-border-opacity, 1))}.border-white{--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity, 1))}.border-yellow-400{--tw-border-opacity: 1;border-color:rgb(250 204 21 / var(--tw-border-opacity, 1))}.bg-\[\#8fc7a8\]{--tw-bg-opacity: 1;background-color:rgb(143 199 168 / var(--tw-bg-opacity, 1))}.bg-\[\#b8ac8e\]{--tw-bg-opacity: 1;background-color:rgb(184 172 142 / var(--tw-bg-opacity, 1))}.bg-\[\#c9b8e8\]{--tw-bg-opacity: 1;background-color:rgb(201 184 232 / var(--tw-bg-opacity, 1))}.bg-\[\#e8a0a0\]{--tw-bg-opacity: 1;background-color:rgb(232 160 160 / var(--tw-bg-opacity, 1))}.bg-\[\#e8dcbc\]{--tw-bg-opacity: 1;background-color:rgb(232 220 188 / var(--tw-bg-opacity, 1))}.bg-\[\#eef4ff\]{--tw-bg-opacity: 1;background-color:rgb(238 244 255 / var(--tw-bg-opacity, 1))}.bg-\[\#f0f7f3\]{--tw-bg-opacity: 1;background-color:rgb(240 247 243 / var(--tw-bg-opacity, 1))}.bg-\[\#f5c800\]{--tw-bg-opacity: 1;background-color:rgb(245 200 0 / var(--tw-bg-opacity, 1))}.bg-\[\#f7f2fb\]{--tw-bg-opacity: 1;background-color:rgb(247 242 251 / var(--tw-bg-opacity, 1))}.bg-\[\#ff4400\]{--tw-bg-opacity: 1;background-color:rgb(255 68 0 / var(--tw-bg-opacity, 1))}.bg-\[\#ffd700\]{--tw-bg-opacity: 1;background-color:rgb(255 215 0 / var(--tw-bg-opacity, 1))}.bg-\[\#ffe100\]{--tw-bg-opacity: 1;background-color:rgb(255 225 0 / var(--tw-bg-opacity, 1))}.bg-\[\#fff7e6\]{--tw-bg-opacity: 1;background-color:rgb(255 247 230 / var(--tw-bg-opacity, 1))}.bg-\[\#fff8d1\]{--tw-bg-opacity: 1;background-color:rgb(255 248 209 / var(--tw-bg-opacity, 1))}.bg-\[\#fffbe6\]{--tw-bg-opacity: 1;background-color:rgb(255 251 230 / var(--tw-bg-opacity, 1))}.bg-\[\#fffdf0\]{--tw-bg-opacity: 1;background-color:rgb(255 253 240 / var(--tw-bg-opacity, 1))}.bg-\[var\(--app-bg\)\]{background-color:var(--app-bg)}.bg-\[var\(--brand\)\]{background-color:var(--brand)}.bg-\[var\(--brand-50\)\]{background-color:var(--brand-50)}.bg-\[var\(--surface\)\]{background-color:var(--surface)}.bg-\[var\(--surface-hover\)\]{background-color:var(--surface-hover)}.bg-\[var\(--surface-strong\)\]{background-color:var(--surface-strong)}.bg-\[var\(--surface-subtle\)\]{background-color:var(--surface-subtle)}.bg-\[var\(--unread-badge\)\]{background-color:var(--unread-badge)}.bg-amber-100{--tw-bg-opacity: 1;background-color:rgb(254 243 199 / var(--tw-bg-opacity, 1))}.bg-amber-400{--tw-bg-opacity: 1;background-color:rgb(251 191 36 / var(--tw-bg-opacity, 1))}.bg-amber-50{--tw-bg-opacity: 1;background-color:rgb(255 251 235 / var(--tw-bg-opacity, 1))}.bg-amber-500{--tw-bg-opacity: 1;background-color:rgb(245 158 11 / var(--tw-bg-opacity, 1))}.bg-amber-500\/15{background-color:#f59e0b26}.bg-black\/40{background-color:#0006}.bg-black\/55{background-color:#0000008c}.bg-black\/60{background-color:#0009}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.bg-brand-50{--tw-bg-opacity: 1;background-color:rgb(255 253 240 / var(--tw-bg-opacity, 1))}.bg-brand-500{--tw-bg-opacity: 1;background-color:rgb(255 215 0 / var(--tw-bg-opacity, 1))}.bg-cyan-50{--tw-bg-opacity: 1;background-color:rgb(236 254 255 / var(--tw-bg-opacity, 1))}.bg-cyan-50\/40{background-color:#ecfeff66}.bg-emerald-100{--tw-bg-opacity: 1;background-color:rgb(209 250 229 / var(--tw-bg-opacity, 1))}.bg-emerald-50{--tw-bg-opacity: 1;background-color:rgb(236 253 245 / var(--tw-bg-opacity, 1))}.bg-emerald-500{--tw-bg-opacity: 1;background-color:rgb(16 185 129 / var(--tw-bg-opacity, 1))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(var(--gray-100) / var(--tw-bg-opacity, 1))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(var(--gray-200) / var(--tw-bg-opacity, 1))}.bg-gray-300{--tw-bg-opacity: 1;background-color:rgb(var(--gray-300) / var(--tw-bg-opacity, 1))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(var(--gray-50) / var(--tw-bg-opacity, 1))}.bg-gray-50\/60{background-color:rgb(var(--gray-50) / .6)}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity, 1))}.bg-green-50{--tw-bg-opacity: 1;background-color:rgb(240 253 244 / var(--tw-bg-opacity, 1))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-green-600{--tw-bg-opacity: 1;background-color:rgb(22 163 74 / var(--tw-bg-opacity, 1))}.bg-indigo-100{--tw-bg-opacity: 1;background-color:rgb(224 231 255 / var(--tw-bg-opacity, 1))}.bg-indigo-50\/70{background-color:#eef2ffb3}.bg-orange-300{--tw-bg-opacity: 1;background-color:rgb(253 186 116 / var(--tw-bg-opacity, 1))}.bg-orange-50{--tw-bg-opacity: 1;background-color:rgb(255 247 237 / var(--tw-bg-opacity, 1))}.bg-purple-50{--tw-bg-opacity: 1;background-color:rgb(250 245 255 / var(--tw-bg-opacity, 1))}.bg-purple-500{--tw-bg-opacity: 1;background-color:rgb(168 85 247 / var(--tw-bg-opacity, 1))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1))}.bg-red-50{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity, 1))}.bg-sky-100{--tw-bg-opacity: 1;background-color:rgb(224 242 254 / var(--tw-bg-opacity, 1))}.bg-slate-100{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity, 1))}.bg-slate-50{--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity, 1))}.bg-violet-50{--tw-bg-opacity: 1;background-color:rgb(245 243 255 / var(--tw-bg-opacity, 1))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-white\/20{background-color:#fff3}.bg-white\/70{background-color:#ffffffb3}.bg-white\/95{background-color:#fffffff2}.bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity, 1))}.bg-yellow-400{--tw-bg-opacity: 1;background-color:rgb(250 204 21 / var(--tw-bg-opacity, 1))}.bg-yellow-50{--tw-bg-opacity: 1;background-color:rgb(254 252 232 / var(--tw-bg-opacity, 1))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-amber-50{--tw-gradient-from: #fffbeb var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 251 235 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-white{--tw-gradient-to: #fff var(--tw-gradient-to-position)}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:0}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-10{padding:2.5rem}.p-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-3\.5{padding:.875rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-7{padding:1.75rem}.px-0{padding-left:0;padding-right:0}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-3\.5{padding-left:.875rem;padding-right:.875rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-16{padding-top:4rem;padding-bottom:4rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-20{padding-top:5rem;padding-bottom:5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.pb-1{padding-bottom:.25rem}.pb-10{padding-bottom:2.5rem}.pb-2{padding-bottom:.5rem}.pb-4{padding-bottom:1rem}.pl-10{padding-left:2.5rem}.pl-2{padding-left:.5rem}.pl-2\.5{padding-left:.625rem}.pl-4{padding-left:1rem}.pl-8{padding-left:2rem}.pl-9{padding-left:2.25rem}.pr-1{padding-right:.25rem}.pr-10{padding-right:2.5rem}.pr-11{padding-right:2.75rem}.pr-3{padding-right:.75rem}.pr-4{padding-right:1rem}.pt-0\.5{padding-top:.125rem}.pt-1{padding-top:.25rem}.pt-1\.5{padding-top:.375rem}.pt-2{padding-top:.5rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.pt-5{padding-top:1.25rem}.pt-6{padding-top:1.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-sans{font-family:-apple-system,BlinkMacSystemFont,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Helvetica Neue,Helvetica,Arial,sans-serif}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[13px\]{font-size:13px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-black{font-weight:900}.font-bold{font-weight:700}.font-extrabold{font-weight:800}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.leading-4{line-height:1rem}.leading-5{line-height:1.25rem}.leading-6{line-height:1.5rem}.leading-7{line-height:1.75rem}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-tight{line-height:1.25}.tracking-\[0\.15em\]{letter-spacing:.15em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.tracking-widest{letter-spacing:.1em}.text-\[\#2a2416\]{--tw-text-opacity: 1;color:rgb(42 36 22 / var(--tw-text-opacity, 1))}.text-\[\#3f5f8f\]{--tw-text-opacity: 1;color:rgb(63 95 143 / var(--tw-text-opacity, 1))}.text-\[\#3f7a5c\]{--tw-text-opacity: 1;color:rgb(63 122 92 / var(--tw-text-opacity, 1))}.text-\[\#544c39\]{--tw-text-opacity: 1;color:rgb(84 76 57 / var(--tw-text-opacity, 1))}.text-\[\#6b5200\]{--tw-text-opacity: 1;color:rgb(107 82 0 / var(--tw-text-opacity, 1))}.text-\[\#6b5a8a\]{--tw-text-opacity: 1;color:rgb(107 90 138 / var(--tw-text-opacity, 1))}.text-\[\#8a6300\]{--tw-text-opacity: 1;color:rgb(138 99 0 / var(--tw-text-opacity, 1))}.text-\[\#8c7900\]{--tw-text-opacity: 1;color:rgb(140 121 0 / var(--tw-text-opacity, 1))}.text-\[\#999\]{--tw-text-opacity: 1;color:rgb(153 153 153 / var(--tw-text-opacity, 1))}.text-\[\#d6b600\]{--tw-text-opacity: 1;color:rgb(214 182 0 / var(--tw-text-opacity, 1))}.text-\[\#d92d20\]{--tw-text-opacity: 1;color:rgb(217 45 32 / var(--tw-text-opacity, 1))}.text-\[\#ff3b30\]{--tw-text-opacity: 1;color:rgb(255 59 48 / var(--tw-text-opacity, 1))}.text-\[\#ff4400\]{--tw-text-opacity: 1;color:rgb(255 68 0 / var(--tw-text-opacity, 1))}.text-\[var\(--brand-ink\)\]{color:var(--brand-ink)}.text-\[var\(--brand-primary\)\]{color:var(--brand-primary)}.text-\[var\(--brand-text\)\]{color:var(--brand-text)}.text-\[var\(--danger-ink\)\]{color:var(--danger-ink)}.text-\[var\(--text\)\]{color:var(--text)}.text-\[var\(--text-muted\)\]{color:var(--text-muted)}.text-\[var\(--text-primary\)\]{color:var(--text-primary)}.text-\[var\(--text-secondary\)\]{color:var(--text-secondary)}.text-\[var\(--text-soft\)\]{color:var(--text-soft)}.text-amber-500{--tw-text-opacity: 1;color:rgb(245 158 11 / var(--tw-text-opacity, 1))}.text-amber-600{--tw-text-opacity: 1;color:rgb(217 119 6 / var(--tw-text-opacity, 1))}.text-amber-700{--tw-text-opacity: 1;color:rgb(180 83 9 / var(--tw-text-opacity, 1))}.text-amber-800{--tw-text-opacity: 1;color:rgb(146 64 14 / var(--tw-text-opacity, 1))}.text-amber-900{--tw-text-opacity: 1;color:rgb(120 53 15 / var(--tw-text-opacity, 1))}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.text-blue-700{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity, 1))}.text-blue-800{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity, 1))}.text-blue-900{--tw-text-opacity: 1;color:rgb(30 58 138 / var(--tw-text-opacity, 1))}.text-brand-ink{--tw-text-opacity: 1;color:rgb(42 36 22 / var(--tw-text-opacity, 1))}.text-cyan-700{--tw-text-opacity: 1;color:rgb(14 116 144 / var(--tw-text-opacity, 1))}.text-cyan-800{--tw-text-opacity: 1;color:rgb(21 94 117 / var(--tw-text-opacity, 1))}.text-emerald-600{--tw-text-opacity: 1;color:rgb(5 150 105 / var(--tw-text-opacity, 1))}.text-emerald-700{--tw-text-opacity: 1;color:rgb(4 120 87 / var(--tw-text-opacity, 1))}.text-emerald-700\/70{color:#047857b3}.text-emerald-800{--tw-text-opacity: 1;color:rgb(6 95 70 / var(--tw-text-opacity, 1))}.text-emerald-900\/80{color:#064e3bcc}.text-gray-400{--tw-text-opacity: 1;color:rgb(var(--gray-400) / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(var(--gray-500) / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(var(--gray-600) / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(var(--gray-700) / var(--tw-text-opacity, 1))}.text-gray-800{--tw-text-opacity: 1;color:rgb(var(--gray-800) / var(--tw-text-opacity, 1))}.text-gray-900{--tw-text-opacity: 1;color:rgb(var(--gray-900) / var(--tw-text-opacity, 1))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity, 1))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity, 1))}.text-green-700{--tw-text-opacity: 1;color:rgb(21 128 61 / var(--tw-text-opacity, 1))}.text-green-800{--tw-text-opacity: 1;color:rgb(22 101 52 / var(--tw-text-opacity, 1))}.text-indigo-600{--tw-text-opacity: 1;color:rgb(79 70 229 / var(--tw-text-opacity, 1))}.text-indigo-700{--tw-text-opacity: 1;color:rgb(67 56 202 / var(--tw-text-opacity, 1))}.text-indigo-800{--tw-text-opacity: 1;color:rgb(55 48 163 / var(--tw-text-opacity, 1))}.text-indigo-950{--tw-text-opacity: 1;color:rgb(30 27 75 / var(--tw-text-opacity, 1))}.text-orange-500{--tw-text-opacity: 1;color:rgb(249 115 22 / var(--tw-text-opacity, 1))}.text-orange-700{--tw-text-opacity: 1;color:rgb(194 65 12 / var(--tw-text-opacity, 1))}.text-orange-900{--tw-text-opacity: 1;color:rgb(124 45 18 / var(--tw-text-opacity, 1))}.text-purple-500{--tw-text-opacity: 1;color:rgb(168 85 247 / var(--tw-text-opacity, 1))}.text-purple-600{--tw-text-opacity: 1;color:rgb(147 51 234 / var(--tw-text-opacity, 1))}.text-purple-700{--tw-text-opacity: 1;color:rgb(126 34 206 / var(--tw-text-opacity, 1))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity, 1))}.text-red-800{--tw-text-opacity: 1;color:rgb(153 27 27 / var(--tw-text-opacity, 1))}.text-rose-600{--tw-text-opacity: 1;color:rgb(225 29 72 / var(--tw-text-opacity, 1))}.text-sky-700{--tw-text-opacity: 1;color:rgb(3 105 161 / var(--tw-text-opacity, 1))}.text-slate-400{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.text-slate-500{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity, 1))}.text-slate-600{--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity, 1))}.text-slate-700{--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity, 1))}.text-slate-800{--tw-text-opacity: 1;color:rgb(30 41 59 / var(--tw-text-opacity, 1))}.text-violet-700{--tw-text-opacity: 1;color:rgb(109 40 217 / var(--tw-text-opacity, 1))}.text-violet-900{--tw-text-opacity: 1;color:rgb(76 29 149 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-700{--tw-text-opacity: 1;color:rgb(161 98 7 / var(--tw-text-opacity, 1))}.text-yellow-800{--tw-text-opacity: 1;color:rgb(133 77 14 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.line-through{text-decoration-line:line-through}.accent-\[\#f5c400\]{accent-color:#f5c400}.accent-brand-500{accent-color:#FFD700}.accent-yellow-400{accent-color:#facc15}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[0_12px_40px_rgba\(20\,24\,28\,0\.24\)\]{--tw-shadow: 0 12px 40px rgba(20,24,28,.24);--tw-shadow-colored: 0 12px 40px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[0_4px_16px_rgba\(20\,24\,28\,0\.10\)\]{--tw-shadow: 0 4px 16px rgba(20,24,28,.1);--tw-shadow-colored: 0 4px 16px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[var\(--shadow-card\,0_8px_24px_rgba\(20\,24\,28\,0\.16\)\)\]{--tw-shadow: var(--shadow-card,0 8px 24px rgba(20,24,28,.16));--tw-shadow-colored: 8px 24px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-none{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[var\(--shadow-brand\)\]{--tw-shadow-color: var(--shadow-brand);--tw-shadow: var(--tw-shadow-colored)}.shadow-\[var\(--shadow-sm\)\]{--tw-shadow-color: var(--shadow-sm);--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-gray-200{--tw-ring-opacity: 1;--tw-ring-color: rgb(var(--gray-200) / var(--tw-ring-opacity, 1))}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur{--tw-backdrop-blur: blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-150{transition-duration:.15s}*{box-sizing:border-box;margin:0;padding:0}:root,:root[data-theme=light]{color-scheme:light;--app-bg: #f7f6f3;--surface: #ffffff;--surface-subtle: #faf9f7;--surface-strong: #f2f1ed;--surface-hover: #faf9f6;--border: #e9e7e2;--border-strong: #d6d3cc;--border-brand: #ffd400;--text: #23211e;--text-muted: #6b6862;--text-soft: #76716a;--gray-50: 250 250 248;--gray-100: 245 244 240;--gray-200: 235 233 227;--gray-300: 221 217 208;--gray-400: 118 113 106;--gray-500: 107 104 98;--gray-600: 102 98 92;--gray-700: 74 71 66;--gray-800: 51 48 44;--gray-900: 34 32 29;--brand-50: #fffdf0;--brand-100: #fff8d1;--brand-200: #ffefa3;--brand-300: #ffe566;--brand: #ffe100;--brand-hover: #ffd700;--brand-active: #f5c800;--brand-ink: #2a2416;--brand-soft: #fff9c9;--brand-text: #806d00;--selection-bg: #fb923c;--selection-ink: var(--brand-ink);--focus-ring: #806d00;--unread-badge: #dc2626;--danger: #b42318;--danger-ink: #b42318;--danger-soft: #fff0f0;--success: #0f704b;--success-ink: #0f704b;--success-soft: #eefaf3;--warning: #945800;--warning-ink: #945800;--warning-soft: #fff7e6;--info: #2a5f92;--info-ink: #2a5f92;--info-soft: #f0f7ff;--radius-xs: 8px;--radius: 10px;--radius-lg: 16px;--radius-xl: 20px;--radius-pill: 999px;--shadow-sm: 0 1px 2px rgba(35, 33, 30, .05);--shadow-md: 0 6px 20px rgba(35, 33, 30, .08);--shadow-lg: 0 16px 40px rgba(35, 33, 30, .12);--shadow-brand: 0 6px 18px rgba(255, 214, 0, .35);--chart-grid: #ebe9e3;--chart-cursor: rgba(35, 33, 30, .06);--scrollbar-thumb: #d6d3cc;--scrollbar-thumb-hover: #b9b4aa}:root[data-theme=dark]{color-scheme:dark;--app-bg: #11110f;--surface: #191916;--surface-subtle: #20201c;--surface-strong: #292820;--surface-hover: #302e27;--border: #37362f;--border-strong: #504c40;--border-brand: #d9bd19;--text: #f5f2e8;--text-muted: #c2bcae;--text-soft: #aaa59b;--gray-50: 32 32 28;--gray-100: 41 40 34;--gray-200: 56 53 45;--gray-300: 77 72 60;--gray-400: 170 165 155;--gray-500: 174 167 153;--gray-600: 194 188 174;--gray-700: 215 210 198;--gray-800: 234 230 220;--gray-900: 245 242 232;--brand-50: #292617;--brand-100: #373116;--brand-200: #4b4015;--brand-soft: #393216;--brand-text: #f2d85c;--focus-ring: #f2d85c;--danger: #ff8c8c;--danger-ink: #ffaaaa;--danger-soft: #3a1e1e;--success: #75d9a3;--success-ink: #8fe0b5;--success-soft: #173528;--warning: #ffd170;--warning-ink: #f3d77c;--warning-soft: #3a2d16;--info: #91c9ff;--info-ink: #9dccff;--info-soft: #182e45;--shadow-sm: 0 1px 2px rgba(0, 0, 0, .28);--shadow-md: 0 10px 28px rgba(0, 0, 0, .32);--shadow-lg: 0 22px 60px rgba(0, 0, 0, .42);--shadow-brand: 0 7px 22px rgba(221, 187, 0, .18);--chart-grid: #403d36;--chart-cursor: rgba(255, 255, 255, .06);--scrollbar-thumb: #5b574e;--scrollbar-thumb-hover: #d2bd38}html,body,#root{height:100%;width:100%}html{background:var(--app-bg);scrollbar-color:var(--scrollbar-thumb) transparent}body{font-family:-apple-system,BlinkMacSystemFont,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Helvetica Neue,Helvetica,Arial,sans-serif;background-color:var(--app-bg);color:var(--text);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}button,input,select,textarea{font:inherit}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,a:focus-visible{outline:2px solid var(--focus-ring);outline-offset:2px}input:disabled,select:disabled,textarea:disabled,input[readonly]{color:var(--text-muted)}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,textarea:-webkit-autofill,select:-webkit-autofill{-webkit-text-fill-color:var(--text);caret-color:var(--text);box-shadow:0 0 0 1000px var(--surface) inset;-webkit-transition:background-color 9999s ease-out 0s;transition:background-color 9999s ease-out 0s}.theme-picker{min-width:0;color:var(--text-muted)}.theme-picker__heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:7px;padding:0 2px;font-size:11px;font-weight:700}.theme-picker__status{color:var(--text-soft);font-size:10px;font-weight:600}.theme-switcher{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px;border:1px solid var(--border);border-radius:12px;background:var(--surface-strong);padding:3px}.theme-switcher__option{display:inline-flex;min-width:0;min-height:36px;align-items:center;justify-content:center;gap:5px;border:1px solid transparent;border-radius:8px;color:var(--text-muted);font-size:11px;font-weight:650;transition:background-color .15s ease,border-color .15s ease,color .15s ease}.theme-switcher__option:hover{background:var(--surface-hover);color:var(--text)}.theme-switcher__option--active,.theme-switcher__option--active:hover{border-color:var(--border-brand);background:var(--brand-soft);color:var(--brand-text);font-weight:750}.theme-picker--compact .theme-switcher{grid-template-columns:repeat(3,36px);border-radius:11px}.theme-picker--compact .theme-switcher__option{width:36px;min-height:36px}.media-light-surface{color-scheme:light;background:#fff!important;color:#23211e!important}:root[data-theme=dark] .media-light-surface .bg-white,:root[data-theme=dark] .media-light-surface [class~="bg-white/95"]{background-color:#fffffff5!important}:root[data-theme=dark] .media-light-surface .bg-gray-50,:root[data-theme=dark] .media-light-surface .bg-green-50{background-color:#fafaf8!important}:root[data-theme=dark] .media-light-surface .text-gray-500{color:#6b6862!important}:root[data-theme=dark] .media-light-surface .text-gray-800{color:#33302c!important}:root[data-theme=dark] .media-light-surface .text-green-700{color:#0f704b!important}:root[data-theme=dark] .media-light-surface .text-amber-800{color:#7a5100!important}:root[data-theme=dark] .media-light-surface .text-blue-600{color:#245f9d!important}:root[data-theme=dark] .media-light-surface .text-red-600{color:#c92a2a!important}:root[data-theme=dark] .bg-white{background-color:var(--surface)}:root[data-theme=dark] [class~="bg-white/95"]{background-color:#191916f5}:root[data-theme=dark] [class~="bg-white/90"],:root[data-theme=dark] [class~="bg-white/80"]{background-color:#191916e6}:root[data-theme=dark] [class~="bg-[#fffdf5]"]{background-color:var(--app-bg)}:root[data-theme=dark] [class~="bg-[#fff9e8]"],:root[data-theme=dark] [class~="bg-[#fffdf0]"],:root[data-theme=dark] [class~="bg-[#f5edd6]"]{background-color:var(--surface-strong)}:root[data-theme=dark] [class~="hover:bg-[#fff9e8]"]:hover,:root[data-theme=dark] [class~="hover:bg-[#fffdf5]"]:hover,:root[data-theme=dark] [class~="hover:bg-[#fffdf0]"]:hover{background-color:var(--surface-hover)}:root[data-theme=dark] [class~="disabled:bg-white"]:disabled{background-color:var(--surface)}:root[data-theme=dark] [class~="border-[#f0e6c8]"],:root[data-theme=dark] [class~="border-[#e6d69a]"]{border-color:var(--border)}:root[data-theme=dark] [class~="text-[#111]"],:root[data-theme=dark] [class~="text-[#333]"],:root[data-theme=dark] [class~="text-[#555]"],:root[data-theme=dark] [class~="text-[#666]"]{color:var(--text)}:root[data-theme=dark] [class~="text-[#777]"],:root[data-theme=dark] [class~="text-[#888]"]{color:var(--text-muted)}:root[data-theme=dark] [class~="text-[#999]"],:root[data-theme=dark] [class~="text-[#aaa]"],:root[data-theme=dark] [class~="text-[#a89e83]"],:root[data-theme=dark] [class~="text-[#b8ac8e]"],:root[data-theme=dark] [class~="text-[#d0d0d0]"]{color:var(--text-soft)}:root[data-theme=dark] [class~="text-[#8c7900]"],:root[data-theme=dark] [class~="text-[#8a6300]"],:root[data-theme=dark] [class~="text-[#6b5200]"],:root[data-theme=dark] [class~="text-[#d6b600]"]{color:var(--brand-text)}:root[data-theme=dark] [class~="hover:text-black"]:hover,:root[data-theme=dark] [class~="hover:text-[#111]"]:hover{color:var(--text)}:root[data-theme=dark] button .rounded-full.bg-white{background-color:#f4f1e8}:root[data-theme=dark] .bg-red-50,:root[data-theme=dark] .bg-red-100{background-color:var(--danger-soft)}:root[data-theme=dark] .border-red-200{border-color:#744040}:root[data-theme=dark] .text-red-500,:root[data-theme=dark] .text-red-600,:root[data-theme=dark] .text-red-700,:root[data-theme=dark] .text-red-800,:root[data-theme=dark] .text-red-900{color:#faa}:root[data-theme=dark] .bg-green-50,:root[data-theme=dark] .bg-green-100,:root[data-theme=dark] .bg-emerald-50{background-color:var(--success-soft)}:root[data-theme=dark] .border-green-200,:root[data-theme=dark] .border-emerald-200{border-color:#356b50}:root[data-theme=dark] .text-green-600,:root[data-theme=dark] .text-green-700,:root[data-theme=dark] .text-green-800,:root[data-theme=dark] .text-emerald-600,:root[data-theme=dark] .text-emerald-700,:root[data-theme=dark] .text-emerald-800{color:#8fe0b5}:root[data-theme=dark] .bg-blue-50,:root[data-theme=dark] .bg-blue-100{background-color:var(--info-soft)}:root[data-theme=dark] .border-blue-200{border-color:#3c638c}:root[data-theme=dark] .text-blue-500,:root[data-theme=dark] .text-blue-600,:root[data-theme=dark] .text-blue-700,:root[data-theme=dark] .text-blue-800,:root[data-theme=dark] .text-blue-900{color:#9dccff}:root[data-theme=dark] .bg-yellow-50,:root[data-theme=dark] .bg-yellow-100,:root[data-theme=dark] .bg-amber-50,:root[data-theme=dark] .bg-amber-100,:root[data-theme=dark] .bg-amber-200{background-color:var(--warning-soft)}:root[data-theme=dark] .border-amber-200{border-color:#755f2d}:root[data-theme=dark] .text-yellow-600,:root[data-theme=dark] .text-yellow-700,:root[data-theme=dark] .text-yellow-800,:root[data-theme=dark] .text-amber-500,:root[data-theme=dark] .text-amber-600,:root[data-theme=dark] .text-amber-700,:root[data-theme=dark] .text-amber-800,:root[data-theme=dark] .text-amber-900{color:#f3d77c}:root[data-theme=dark] [class~="bg-[#fff8d1]"]{background-color:#393216}:root[data-theme=dark] [class~="bg-[#eef4ff]"]{background-color:#1c2d45}:root[data-theme=dark] [class~="bg-[#f0f7f3]"]{background-color:#193126}:root[data-theme=dark] [class~="bg-[#f7f2fb]"]{background-color:#2c2438}:root[data-theme=dark] [class~="text-[#3f5f8f]"]{color:#aacbff}:root[data-theme=dark] [class~="text-[#3f7a5c]"]{color:#9bd9b5}:root[data-theme=dark] [class~="text-[#6b5a8a]"]{color:#d1baf2}:root[data-theme=dark] [class~="hover:bg-red-50"]:hover,:root[data-theme=dark] [class~="hover:bg-red-100"]:hover{background-color:var(--danger-soft)}:root[data-theme=dark] [class~="hover:bg-green-50"]:hover,:root[data-theme=dark] [class~="hover:bg-green-100"]:hover,:root[data-theme=dark] [class~="hover:bg-emerald-50"]:hover{background-color:var(--success-soft)}:root[data-theme=dark] [class~="hover:bg-blue-50"]:hover,:root[data-theme=dark] [class~="hover:bg-blue-100"]:hover{background-color:var(--info-soft)}:root[data-theme=dark] [class~="hover:bg-yellow-50"]:hover,:root[data-theme=dark] [class~="hover:bg-yellow-100"]:hover,:root[data-theme=dark] [class~="hover:bg-amber-50"]:hover,:root[data-theme=dark] [class~="hover:bg-amber-100"]:hover{background-color:var(--warning-soft)}:root[data-theme=dark] [class~="hover:bg-black/5"]:hover{background-color:#ffffff14}:root[data-theme=dark] [class~="hover:text-red-600"]:hover,:root[data-theme=dark] [class~="hover:text-red-700"]:hover{color:#faa}:root[data-theme=dark] [class~="hover:text-green-600"]:hover,:root[data-theme=dark] [class~="hover:text-green-700"]:hover,:root[data-theme=dark] [class~="hover:text-emerald-600"]:hover{color:#8fe0b5}:root[data-theme=dark] [class~="hover:text-blue-600"]:hover,:root[data-theme=dark] [class~="hover:text-blue-700"]:hover{color:#9dccff}:root[data-theme=dark] [class~="hover:text-amber-600"]:hover,:root[data-theme=dark] [class~="hover:text-amber-700"]:hover{color:#f3d77c}:root[data-theme=dark] [class~="hover:bg-pink-50"]:hover,:root[data-theme=dark] [class~="hover:bg-pink-100"]:hover{background-color:var(--danger-soft)}:root[data-theme=dark] [class~="hover:text-pink-600"]:hover,:root[data-theme=dark] [class~="hover:text-pink-700"]:hover,:root[data-theme=dark] [class~="hover:text-yellow-600"]:hover{color:var(--warning-ink)}:root[data-theme=dark] [class~="hover:bg-amber-200"]:hover{background-color:var(--warning-soft)}:root[data-theme=dark] .theme-brand-panel [class~="text-[#8a6300]"]{color:#8a6300}:root[data-theme=dark] .theme-brand-panel [class~="text-[#6b5200]"]{color:#6b5200}:root[data-theme=dark] .page-tab:not(.page-tab--active) .page-tab__count{background:#ffffff14}.recharts-pie-label-text,.recharts-text{fill:var(--text-muted)}:root[data-theme=dark] .modal-overlay,:root[data-theme=dark] .modal-overlay-centered{background-color:#000000ad}.page-stack{display:flex;flex-direction:column;gap:20px}.page-header{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;min-height:62px;padding-bottom:16px;border-bottom:1px solid var(--border)}.page-header__identity{display:flex;min-width:0;align-items:flex-start;gap:12px}.page-header__icon{display:inline-flex;width:42px;height:42px;flex:0 0 42px;align-items:center;justify-content:center;border-radius:var(--radius-lg);background:linear-gradient(140deg,var(--brand-300),var(--brand));color:var(--brand-ink);box-shadow:var(--shadow-brand)}.page-title{color:var(--text);font-size:24px;font-weight:750;line-height:1.25}.page-description{margin-top:5px;max-width:760px;color:var(--text-muted);font-size:13px;line-height:1.6}.page-actions{display:flex;flex:0 0 auto;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:8px}.page-tabs{display:inline-flex;max-width:100%;gap:4px;overflow-x:auto;border-radius:var(--radius-pill);background:var(--surface-strong);padding:4px;scrollbar-width:none;-ms-overflow-style:none}.page-tabs::-webkit-scrollbar{display:none}.page-tab{display:inline-flex;min-height:38px;flex:0 0 auto;align-items:center;justify-content:center;gap:7px;border-radius:var(--radius-pill);padding:8px 16px;color:var(--text-muted);font-size:13px;font-weight:650;line-height:1.2;transition:background-color .15s ease,color .15s ease,box-shadow .15s ease}.page-tab:hover{background:var(--surface);color:var(--text)}.page-tab--active{background:var(--brand);color:var(--brand-ink);box-shadow:var(--shadow-brand)}.page-tab--active:hover{background:var(--brand)}.page-tab__count{min-width:20px;border-radius:var(--radius-pill);background:#ffffff8c;padding:2px 7px;color:inherit;font-size:11px;font-weight:700;text-align:center}.toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--surface);padding:14px;box-shadow:var(--shadow-sm)}.toolbar__group{display:flex;min-width:0;flex-wrap:wrap;align-items:center;gap:8px}.section-panel{overflow:hidden;border:1px solid var(--border);border-radius:var(--radius-xl);background:var(--surface);box-shadow:var(--shadow-sm)}.section-panel__header{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:58px;border-bottom:1px solid var(--border);padding:14px 18px}.section-header__icon{display:inline-flex;width:34px;height:34px;flex:0 0 34px;align-items:center;justify-content:center;border-radius:var(--radius);background:var(--surface-strong);color:var(--text-muted)}.section-header__actions{display:flex;flex:0 0 auto;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:8px}.section-title{color:var(--text);font-size:15px;font-weight:700}.section-description{margin-top:3px;color:var(--text-muted);font-size:12px;line-height:1.5}.notice-banner{display:flex;min-height:46px;align-items:center;gap:10px;border:1px solid var(--border);border-radius:var(--radius-lg);padding:11px 14px;font-size:13px;font-weight:600;line-height:1.5}.notice-banner button{display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center;border-radius:var(--radius-pill);padding:5px}.notice-banner--success{border-color:color-mix(in srgb,var(--success) 38%,var(--border));background:var(--success-soft);color:var(--success-ink)}.notice-banner--error{border-color:color-mix(in srgb,var(--danger) 38%,var(--border));background:var(--danger-soft);color:var(--danger-ink)}.notice-banner--warning{border-color:var(--border-strong);background:var(--warning-soft);color:var(--warning-ink)}.notice-banner--info{border-color:color-mix(in srgb,var(--info) 38%,var(--border));background:var(--info-soft);color:var(--info-ink)}.metric-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.metric-card{min-width:0;border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--surface);padding:18px;box-shadow:var(--shadow-sm);transition:box-shadow .16s ease,transform .16s ease}.metric-card:hover{box-shadow:var(--shadow-md);transform:translateY(-1px)}.metric-card__label{color:var(--text-muted);font-size:12px;font-weight:650}.metric-card__value{margin-top:7px;color:var(--text);font-size:24px;font-weight:750;line-height:1.2}.metric-card__meta{margin-top:6px;color:var(--text-soft);font-size:11px;line-height:1.5}.metric-grid--compact{grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}.metric-grid--compact .metric-card{padding:10px 12px;border-radius:var(--radius-md)}.metric-grid--compact .metric-card__label{font-size:11px}.metric-grid--compact .metric-card__value{margin-top:2px;font-size:20px}.metric-grid--compact .metric-card__meta{margin-top:1px;font-size:10px;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.content-grid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:16px}.field-label{display:block;margin-bottom:6px;color:var(--text-muted);font-size:12px;font-weight:700}.empty-state{display:flex;min-height:260px;flex-direction:column;align-items:center;justify-content:center;border:1px dashed var(--border-strong);border-radius:var(--radius-xl);background:var(--surface);padding:32px;text-align:center}.empty-state--compact{min-height:160px}.empty-state__icon{display:inline-flex;width:52px;height:52px;align-items:center;justify-content:center;border-radius:var(--radius-lg);background:var(--surface-strong);color:var(--text-soft)}.empty-state h3{margin-top:14px;color:var(--text);font-size:15px;font-weight:700}.empty-state p{margin-top:5px;max-width:520px;color:var(--text-muted);font-size:13px;line-height:1.6}.page-loading{display:flex;min-height:260px;align-items:center;justify-content:center;gap:9px;color:var(--text-muted);font-size:13px;font-weight:600}.ios-card{background:var(--surface);border-radius:var(--radius-lg);border:1px solid var(--border);box-shadow:var(--shadow-sm);transition:border-color .2s ease,box-shadow .2s ease,transform .2s ease}.ios-card:hover{border-color:var(--border-brand);box-shadow:var(--shadow-md)}.ios-input{min-height:42px;background:var(--surface);border:1px solid var(--border-strong);border-radius:var(--radius);color:var(--text);font-weight:500;transition:border-color .15s ease,box-shadow .15s ease,background-color .15s ease}.ios-input:hover:not(:disabled):not(:focus){border-color:var(--border-brand)}.ios-input:focus{background:var(--surface);border-color:var(--focus-ring);box-shadow:0 0 0 4px color-mix(in srgb,var(--focus-ring) 28%,transparent);outline:none}.ios-input::-moz-placeholder{color:var(--text-soft);font-weight:400}.ios-input::placeholder{color:var(--text-soft);font-weight:400}.ios-input:disabled,.ios-input[readonly]{border-color:var(--border);background:var(--surface-strong);color:var(--text-muted);cursor:not-allowed}.ios-btn-primary{min-height:42px;border-radius:var(--radius-pill);background:var(--brand);color:var(--brand-ink);font-weight:700;border:none;box-shadow:var(--shadow-brand);transition:background-color .15s ease,box-shadow .15s ease,transform .1s ease;cursor:pointer}.ios-btn-primary:hover:not(:disabled){background:var(--brand-hover);box-shadow:0 8px 22px #ffd60073}.ios-btn-primary:active:not(:disabled){background:var(--brand-active);transform:translateY(1px);box-shadow:var(--shadow-sm)}.ios-btn-primary:disabled{background:var(--surface-strong);color:var(--text-soft);box-shadow:none;cursor:not-allowed}.ios-btn-secondary{min-height:42px;border-radius:var(--radius-pill);background:var(--surface);color:var(--text);font-weight:600;border:1px solid var(--border-strong);transition:background-color .15s ease,border-color .15s ease;cursor:pointer}.ios-btn-secondary:hover:not(:disabled){background:var(--surface-hover);border-color:var(--brand)}.ios-btn-secondary:disabled{color:var(--text-soft);cursor:not-allowed}.ios-btn-danger{min-height:42px;border-radius:var(--radius-pill);background:var(--danger-soft);color:var(--danger);font-weight:600;border:1px solid color-mix(in srgb,var(--danger) 38%,var(--border));transition:background-color .15s ease,border-color .15s ease;cursor:pointer}.ios-btn-danger:hover:not(:disabled){background:color-mix(in srgb,var(--danger-soft) 82%,var(--danger));border-color:color-mix(in srgb,var(--danger) 62%,var(--border))}.data-table{width:100%;border-collapse:collapse;text-align:left}.data-table thead{background:var(--surface-subtle);color:var(--text-muted);font-size:11px;font-weight:700}.data-table th{height:46px;padding:0 16px;border-bottom:1px solid var(--border);letter-spacing:0}.data-table td{padding:13px 16px;border-bottom:1px solid var(--border);vertical-align:middle}.data-table tbody tr:last-child td{border-bottom:0}.data-table tbody tr:hover{background:var(--surface-hover)}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:var(--scrollbar-thumb);border-radius:var(--radius-pill)}::-webkit-scrollbar-thumb:hover{background:var(--scrollbar-thumb-hover)}aside nav::-webkit-scrollbar{width:4px}aside nav::-webkit-scrollbar-thumb{background:transparent}aside nav:hover::-webkit-scrollbar-thumb{background:var(--border-strong)}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.animate-fade-in{animation:fadeIn .18s ease-out forwards}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}::-moz-selection{background:var(--brand);color:#000}::selection{background:var(--brand);color:#000}.chat-self-bubble ::-moz-selection{background:var(--selection-bg);color:var(--selection-ink)}.chat-self-bubble ::selection{background:var(--selection-bg);color:var(--selection-ink)}.text-brand{color:#8c7900}.bg-brand{background-color:var(--brand)}.border-brand{border-color:var(--brand)}.status-badge{display:inline-flex;align-items:center;padding:4px 10px;border-radius:var(--radius-pill);font-size:12px;font-weight:650}.status-badge-success{background-color:var(--success-soft);color:var(--success-ink)}.status-badge-warning{background-color:var(--brand-100);color:var(--warning-ink)}.status-badge-error{background-color:var(--danger-soft);color:var(--danger-ink)}.status-badge-info{background-color:var(--surface-strong);color:var(--text-muted)}.modal-overlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:9999;display:flex;align-items:center;justify-content:center;background-color:#0006;padding:1rem;overflow-y:auto}.modal-container{position:relative;width:100%;max-width:42rem;max-height:85vh;margin:auto;display:flex;flex-direction:column;background-color:var(--surface);color:var(--text);border-radius:var(--radius-xl);border:1px solid var(--border);box-shadow:var(--shadow-lg);overflow:hidden}.modal-header{flex-shrink:0;padding:20px 22px;border-bottom:1px solid var(--border);background:var(--surface-subtle);z-index:10}.modal-body{flex:1 1 auto;overflow-y:auto;overflow-x:hidden;padding:22px;color:var(--text)}.modal-footer{flex-shrink:0;padding:16px 22px;border-top:1px solid var(--border);background:var(--surface-subtle);z-index:10}.modal-container-lg{max-width:64rem}.modal-overlay-centered{position:fixed;top:0;right:0;bottom:0;left:0;z-index:9999;display:flex;justify-content:center;background-color:#0006;padding:1rem;overflow-y:auto}@media(max-width:1023px){.metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.metric-grid--compact{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:639px){.page-stack{gap:16px}.page-header{min-height:0;align-items:flex-start;padding-bottom:14px}.page-header__icon{width:34px;height:34px;flex-basis:34px}.page-title{font-size:20px}.page-actions{width:100%;justify-content:stretch}.page-actions>*{flex:1 1 auto}.toolbar{align-items:stretch}.toolbar,.toolbar__group{flex-direction:column}.toolbar__group>input,.toolbar__group>select,.toolbar__group>button{width:100%}.section-panel__header{flex-direction:column;align-items:flex-start}.section-header__actions{width:100%;justify-content:stretch}.section-header__actions>*{flex:1 1 auto;justify-content:center}.metric-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.metric-grid--compact{grid-template-columns:repeat(2,minmax(0,1fr))}.metric-card{padding:12px 14px}.metric-card__label{font-size:11px}.metric-card__value,.metric-grid--compact .metric-card__value{font-size:18px}}.modal-overlay-centered .modal-container{position:relative;width:100%;max-width:42rem;max-height:85vh;margin:auto 0;display:flex;flex-direction:column;background-color:var(--surface);color:var(--text);border-radius:var(--radius);border:1px solid var(--border);box-shadow:var(--shadow-md);overflow:hidden}@media(max-width:768px){.page-stack{gap:16px}.page-header{min-height:0;flex-direction:column;align-items:stretch;gap:12px;padding-bottom:14px}.page-title{font-size:21px}.page-actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(132px,1fr));justify-content:stretch}.page-actions>*{min-width:0}.toolbar{flex-direction:column;align-items:stretch}.toolbar__group{display:grid;grid-template-columns:1fr}.page-tabs{display:grid;width:100%;grid-auto-flow:column;grid-auto-columns:minmax(128px,1fr)}.page-tab{min-width:0;white-space:normal}.responsive-data-table{min-width:0!important}.responsive-data-table,.responsive-data-table tbody,.responsive-data-table tr,.responsive-data-table td{display:block;width:100%}.responsive-data-table thead{display:none}.responsive-data-table tbody tr{border-bottom:1px solid var(--border);padding:12px 16px}.responsive-data-table tbody tr:last-child{border-bottom:0}.responsive-data-table td{display:grid;grid-template-columns:minmax(82px,30%) minmax(0,1fr);align-items:center;gap:12px;border:0;padding:7px 0;text-align:left}.responsive-data-table td:before{content:attr(data-label);color:var(--text-muted);font-size:11px;font-weight:700}.responsive-data-table td>*{min-width:0}.responsive-data-table td[data-label=订单信息],.responsive-data-table td[data-label=卡密名称]{align-items:start}.responsive-data-table td[data-label=操作]>div{flex-wrap:wrap;justify-content:flex-start}.responsive-data-table td>.status-badge{justify-self:start}.ios-card{border-radius:var(--radius)}.ios-input{font-size:16px}.modal-container{max-width:calc(100% - 2rem);max-height:90vh;border-radius:var(--radius)}.modal-header,.modal-body,.modal-footer{padding-left:1.5rem;padding-right:1.5rem}}.marquee{overflow:hidden}.marquee__track{display:inline-flex;align-items:center;white-space:nowrap;will-change:transform;animation:marquee-scroll 40s linear infinite}.marquee:hover .marquee__track{animation-play-state:paused}@keyframes marquee-scroll{0%{transform:translate(0)}to{transform:translate(-50%)}}@media(prefers-reduced-motion:reduce){.marquee__track{animation:none}.marquee{overflow-x:auto}}.placeholder\:text-\[var\(--text-soft\)\]::-moz-placeholder{color:var(--text-soft)}.placeholder\:text-\[var\(--text-soft\)\]::placeholder{color:var(--text-soft)}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:-inset-1\.5:after{content:var(--tw-content);top:-.375rem;right:-.375rem;bottom:-.375rem;left:-.375rem}.after\:content-\[\'\'\]:after{--tw-content: "";content:var(--tw-content)}.last\:mb-0:last-child{margin-bottom:0}.last\:border-0:last-child{border-width:0px}.last\:border-b-0:last-child{border-bottom-width:0px}.hover\:border-\[\#ff4400\]:hover{--tw-border-opacity: 1;border-color:rgb(255 68 0 / var(--tw-border-opacity, 1))}.hover\:border-\[var\(--border-strong\)\]:hover{border-color:var(--border-strong)}.hover\:border-amber-400:hover{--tw-border-opacity: 1;border-color:rgb(251 191 36 / var(--tw-border-opacity, 1))}.hover\:border-gray-400:hover{--tw-border-opacity: 1;border-color:rgb(var(--gray-400) / var(--tw-border-opacity, 1))}.hover\:border-purple-400:hover{--tw-border-opacity: 1;border-color:rgb(192 132 252 / var(--tw-border-opacity, 1))}.hover\:bg-\[\#ff4400\]:hover{--tw-bg-opacity: 1;background-color:rgb(255 68 0 / var(--tw-bg-opacity, 1))}.hover\:bg-\[\#ffd700\]:hover{--tw-bg-opacity: 1;background-color:rgb(255 215 0 / var(--tw-bg-opacity, 1))}.hover\:bg-\[\#fffdf0\]:hover{--tw-bg-opacity: 1;background-color:rgb(255 253 240 / var(--tw-bg-opacity, 1))}.hover\:bg-\[var\(--brand-hover\)\]:hover{background-color:var(--brand-hover)}.hover\:bg-\[var\(--danger-soft\)\]:hover{background-color:var(--danger-soft)}.hover\:bg-\[var\(--surface-hover\)\]:hover{background-color:var(--surface-hover)}.hover\:bg-\[var\(--surface-subtle\)\]:hover{background-color:var(--surface-subtle)}.hover\:bg-amber-100:hover{--tw-bg-opacity: 1;background-color:rgb(254 243 199 / var(--tw-bg-opacity, 1))}.hover\:bg-amber-200:hover{--tw-bg-opacity: 1;background-color:rgb(253 230 138 / var(--tw-bg-opacity, 1))}.hover\:bg-amber-50:hover{--tw-bg-opacity: 1;background-color:rgb(255 251 235 / var(--tw-bg-opacity, 1))}.hover\:bg-black\/5:hover{background-color:#0000000d}.hover\:bg-black\/80:hover{background-color:#000c}.hover\:bg-blue-100:hover{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.hover\:bg-blue-50:hover{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.hover\:bg-brand-600:hover{--tw-bg-opacity: 1;background-color:rgb(245 200 0 / var(--tw-bg-opacity, 1))}.hover\:bg-cyan-100:hover{--tw-bg-opacity: 1;background-color:rgb(207 250 254 / var(--tw-bg-opacity, 1))}.hover\:bg-emerald-100:hover{--tw-bg-opacity: 1;background-color:rgb(209 250 229 / var(--tw-bg-opacity, 1))}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(var(--gray-100) / var(--tw-bg-opacity, 1))}.hover\:bg-gray-200:hover{--tw-bg-opacity: 1;background-color:rgb(var(--gray-200) / var(--tw-bg-opacity, 1))}.hover\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(var(--gray-50) / var(--tw-bg-opacity, 1))}.hover\:bg-green-100:hover{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity, 1))}.hover\:bg-green-50:hover{--tw-bg-opacity: 1;background-color:rgb(240 253 244 / var(--tw-bg-opacity, 1))}.hover\:bg-pink-50:hover{--tw-bg-opacity: 1;background-color:rgb(253 242 248 / var(--tw-bg-opacity, 1))}.hover\:bg-purple-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 232 255 / var(--tw-bg-opacity, 1))}.hover\:bg-purple-50:hover{--tw-bg-opacity: 1;background-color:rgb(250 245 255 / var(--tw-bg-opacity, 1))}.hover\:bg-red-100:hover{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1))}.hover\:bg-red-50:hover{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}.hover\:bg-rose-50:hover{--tw-bg-opacity: 1;background-color:rgb(255 241 242 / var(--tw-bg-opacity, 1))}.hover\:bg-slate-100:hover{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity, 1))}.hover\:bg-violet-100:hover{--tw-bg-opacity: 1;background-color:rgb(237 233 254 / var(--tw-bg-opacity, 1))}.hover\:bg-white\/40:hover{background-color:#fff6}.hover\:bg-yellow-50:hover{--tw-bg-opacity: 1;background-color:rgb(254 252 232 / var(--tw-bg-opacity, 1))}.hover\:text-\[\#ff4400\]:hover{--tw-text-opacity: 1;color:rgb(255 68 0 / var(--tw-text-opacity, 1))}.hover\:text-\[var\(--danger\)\]:hover{color:var(--danger)}.hover\:text-\[var\(--text\)\]:hover{color:var(--text)}.hover\:text-amber-600:hover{--tw-text-opacity: 1;color:rgb(217 119 6 / var(--tw-text-opacity, 1))}.hover\:text-amber-700:hover{--tw-text-opacity: 1;color:rgb(180 83 9 / var(--tw-text-opacity, 1))}.hover\:text-black:hover{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.hover\:text-blue-600:hover{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.hover\:text-gray-600:hover{--tw-text-opacity: 1;color:rgb(var(--gray-600) / var(--tw-text-opacity, 1))}.hover\:text-gray-800:hover{--tw-text-opacity: 1;color:rgb(var(--gray-800) / var(--tw-text-opacity, 1))}.hover\:text-gray-900:hover{--tw-text-opacity: 1;color:rgb(var(--gray-900) / var(--tw-text-opacity, 1))}.hover\:text-green-700:hover{--tw-text-opacity: 1;color:rgb(21 128 61 / var(--tw-text-opacity, 1))}.hover\:text-pink-600:hover{--tw-text-opacity: 1;color:rgb(219 39 119 / var(--tw-text-opacity, 1))}.hover\:text-purple-500:hover{--tw-text-opacity: 1;color:rgb(168 85 247 / var(--tw-text-opacity, 1))}.hover\:text-red-600:hover{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.hover\:text-yellow-600:hover{--tw-text-opacity: 1;color:rgb(202 138 4 / var(--tw-text-opacity, 1))}.hover\:underline:hover{text-decoration-line:underline}.focus\:border-\[\#ffe100\]:focus{--tw-border-opacity: 1;border-color:rgb(255 225 0 / var(--tw-border-opacity, 1))}.focus\:border-\[var\(--brand\)\]:focus{border-color:var(--brand)}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-\[var\(--brand\)\]:focus{--tw-ring-color: var(--brand)}.focus-visible\:outline-2:focus-visible{outline-width:2px}.focus-visible\:outline-offset-2:focus-visible{outline-offset:2px}.focus-visible\:outline-\[var\(--focus-ring\)\]:focus-visible{outline-color:var(--focus-ring)}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:cursor-wait:disabled{cursor:wait}.disabled\:bg-\[var\(--surface\)\]:disabled{background-color:var(--surface)}.disabled\:bg-\[var\(--surface-strong\)\]:disabled{background-color:var(--surface-strong)}.disabled\:bg-gray-100:disabled{--tw-bg-opacity: 1;background-color:rgb(var(--gray-100) / var(--tw-bg-opacity, 1))}.disabled\:text-\[var\(--text-soft\)\]:disabled{color:var(--text-soft)}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:opacity-60:disabled{opacity:.6}.disabled\:opacity-70:disabled{opacity:.7}.group:focus-within .group-focus-within\:text-\[\#ffe100\]{--tw-text-opacity: 1;color:rgb(255 225 0 / var(--tw-text-opacity, 1))}.group:focus-within .group-focus-within\:text-gray-700{--tw-text-opacity: 1;color:rgb(var(--gray-700) / var(--tw-text-opacity, 1))}.group:hover .group-hover\:flex{display:flex}.group:hover .group-hover\:text-\[var\(--text-muted\)\]{color:var(--text-muted)}.group:hover .group-hover\:text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}@media(prefers-reduced-motion:reduce){.motion-reduce\:transition-none{transition-property:none}}.dark\:border-amber-500\/20:is(.dark *){border-color:#f59e0b33}.dark\:border-slate-700:is(.dark *){--tw-border-opacity: 1;border-color:rgb(51 65 85 / var(--tw-border-opacity, 1))}.dark\:bg-amber-500\/10:is(.dark *){background-color:#f59e0b1a}.dark\:bg-slate-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity, 1))}.dark\:from-amber-950\/20:is(.dark *){--tw-gradient-from: rgb(69 26 3 / .2) var(--tw-gradient-from-position);--tw-gradient-to: rgb(69 26 3 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:to-\[var\(--surface\)\]:is(.dark *){--tw-gradient-to: var(--surface) var(--tw-gradient-to-position)}.dark\:text-amber-300:is(.dark *){--tw-text-opacity: 1;color:rgb(252 211 77 / var(--tw-text-opacity, 1))}.dark\:text-amber-400:is(.dark *){--tw-text-opacity: 1;color:rgb(251 191 36 / var(--tw-text-opacity, 1))}.dark\:text-slate-100:is(.dark *){--tw-text-opacity: 1;color:rgb(241 245 249 / var(--tw-text-opacity, 1))}.dark\:text-slate-300:is(.dark *){--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity, 1))}.dark\:text-slate-400:is(.dark *){--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.dark\:hover\:bg-slate-700\/60:hover:is(.dark *){background-color:#33415599}@media(min-width:640px){.sm\:right-6{right:1.5rem}.sm\:top-6{top:1.5rem}.sm\:col-span-2{grid-column:span 2 / span 2}.sm\:col-span-3{grid-column:span 3 / span 3}.sm\:inline-flex{display:inline-flex}.sm\:h-16{height:4rem}.sm\:min-h-\[72px\]{min-height:72px}.sm\:min-h-\[92px\]{min-height:92px}.sm\:min-h-\[calc\(100vh-3rem\)\]{min-height:calc(100vh - 3rem)}.sm\:w-16{width:4rem}.sm\:w-64{width:16rem}.sm\:w-72{width:18rem}.sm\:w-auto{width:auto}.sm\:min-w-40{min-width:10rem}.sm\:min-w-44{min-width:11rem}.sm\:min-w-52{min-width:13rem}.sm\:min-w-56{min-width:14rem}.sm\:min-w-64{min-width:16rem}.sm\:min-w-72{min-width:18rem}.sm\:max-w-xs{max-width:20rem}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:grid-cols-\[100px_1fr\]{grid-template-columns:100px 1fr}.sm\:grid-cols-\[140px_200px_1fr_auto\]{grid-template-columns:140px 200px 1fr auto}.sm\:grid-cols-\[160px_minmax\(0\,1fr\)_auto_auto\]{grid-template-columns:160px minmax(0,1fr) auto auto}.sm\:grid-cols-\[24px_52px_180px_minmax\(0\,1fr\)_44px\]{grid-template-columns:24px 52px 180px minmax(0,1fr) 44px}.sm\:grid-cols-\[minmax\(160px\,0\.7fr\)_minmax\(0\,1\.5fr\)_auto\]{grid-template-columns:minmax(160px,.7fr) minmax(0,1.5fr) auto}.sm\:grid-cols-\[minmax\(180px\,0\.7fr\)_minmax\(0\,1\.4fr\)_auto\]{grid-template-columns:minmax(180px,.7fr) minmax(0,1.4fr) auto}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:justify-end{justify-content:flex-end}.sm\:justify-between{justify-content:space-between}.sm\:gap-3{gap:.75rem}.sm\:gap-4{gap:1rem}.sm\:border-0{border-width:0px}.sm\:p-10{padding:2.5rem}.sm\:p-5{padding:1.25rem}.sm\:p-6{padding:1.5rem}.sm\:p-8{padding:2rem}.sm\:px-5{padding-left:1.25rem;padding-right:1.25rem}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:px-8{padding-left:2rem;padding-right:2rem}.sm\:pt-0{padding-top:0}.sm\:text-right{text-align:right}}@media(min-width:768px){.md\:col-span-2{grid-column:span 2 / span 2}.md\:min-h-\[360px\]{min-height:360px}.md\:w-44{width:11rem}.md\:w-72{width:18rem}.md\:w-auto{width:auto}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-\[minmax\(0\,1fr\)_150px_minmax\(0\,1\.4fr\)\]{grid-template-columns:minmax(0,1fr) 150px minmax(0,1.4fr)}.md\:grid-cols-\[minmax\(0\,1fr\)_minmax\(0\,1fr\)_auto_auto\]{grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto auto}.md\:flex-row{flex-direction:row}.md\:items-end{align-items:flex-end}.md\:items-center{align-items:center}.md\:p-6{padding:1.5rem}}@media(min-width:1024px){.lg\:sticky{position:sticky}.lg\:top-2{top:.5rem}.lg\:col-span-2{grid-column:span 2 / span 2}.lg\:mb-3{margin-bottom:.75rem}.lg\:ml-\[248px\]{margin-left:248px}.lg\:block{display:block}.lg\:flex{display:flex}.lg\:hidden{display:none}.lg\:h-screen{height:100vh}.lg\:w-48{width:12rem}.lg\:w-full{width:100%}.lg\:translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:grid-cols-\[1\.05fr_0\.95fr\]{grid-template-columns:1.05fr .95fr}.lg\:grid-cols-\[165px_80px_180px_minmax\(0\,1fr\)\]{grid-template-columns:165px 80px 180px minmax(0,1fr)}.lg\:grid-cols-\[180px_120px_minmax\(0\,1fr\)_44px\]{grid-template-columns:180px 120px minmax(0,1fr) 44px}.lg\:grid-cols-\[1fr_auto\]{grid-template-columns:1fr auto}.lg\:grid-cols-\[220px_180px_minmax\(240px\,1fr\)_auto\]{grid-template-columns:220px 180px minmax(240px,1fr) auto}.lg\:grid-cols-\[356px_minmax\(0\,1fr\)\]{grid-template-columns:356px minmax(0,1fr)}.lg\:grid-cols-\[minmax\(180px\,0\.7fr\)_minmax\(0\,1\.4fr\)_auto\]{grid-template-columns:minmax(180px,.7fr) minmax(0,1.4fr) auto}.lg\:grid-cols-\[minmax\(220px\,1\.2fr\)_minmax\(260px\,1\.5fr\)_180px_auto\]{grid-template-columns:minmax(220px,1.2fr) minmax(260px,1.5fr) 180px auto}.lg\:grid-cols-\[minmax\(220px\,1fr\)_1fr_180px_auto\]{grid-template-columns:minmax(220px,1fr) 1fr 180px auto}.lg\:flex-row{flex-direction:row}.lg\:items-start{align-items:flex-start}.lg\:items-center{align-items:center}.lg\:gap-0{gap:0px}.lg\:overflow-visible{overflow:visible}.lg\:border-b-0{border-bottom-width:0px}.lg\:border-r{border-right-width:1px}.lg\:p-8{padding:2rem}.lg\:px-8{padding-left:2rem;padding-right:2rem}}@media(min-width:1280px){.xl\:grid{display:grid}.xl\:min-w-\[1200px\]{min-width:1200px}.xl\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.xl\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.xl\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.xl\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.xl\:grid-cols-\[340px_140px_260px_210px_110px\]{grid-template-columns:340px 140px 260px 210px 110px}.xl\:grid-cols-\[minmax\(0\,1\.35fr\)_minmax\(340px\,0\.65fr\)\]{grid-template-columns:minmax(0,1.35fr) minmax(340px,.65fr)}.xl\:grid-cols-\[minmax\(230px\,1fr\)_minmax\(360px\,1\.5fr\)_44px\]{grid-template-columns:minmax(230px,1fr) minmax(360px,1.5fr) 44px}.xl\:\!flex-row{flex-direction:row!important}.xl\:items-start{align-items:flex-start}.xl\:items-center{align-items:center}.xl\:items-stretch{align-items:stretch}.xl\:justify-end{justify-content:flex-end}.xl\:gap-0{gap:0px}.xl\:gap-1\.5{gap:.375rem}.xl\:border-0{border-width:0px}.xl\:px-0{padding-left:0;padding-right:0}.xl\:px-2{padding-left:.5rem;padding-right:.5rem}.xl\:pt-0{padding-top:0}.xl\:\[\&\>\*\:first-child\]\:\!flex-row>*:first-child{flex-direction:row!important}.xl\:\[\&\>\*\:first-child\]\:items-center>*:first-child{align-items:center}.xl\:\[\&\>\*\:last-child\]\:border-r-0>*:last-child{border-right-width:0px}.xl\:\[\&\>\*\]\:flex>*{display:flex}.xl\:\[\&\>\*\]\:min-w-0>*{min-width:0px}.xl\:\[\&\>\*\]\:flex-col>*{flex-direction:column}.xl\:\[\&\>\*\]\:justify-center>*{justify-content:center}.xl\:\[\&\>\*\]\:border-r>*{border-right-width:1px}.xl\:\[\&\>\*\]\:border-gray-200>*{--tw-border-opacity: 1;border-color:rgb(var(--gray-200) / var(--tw-border-opacity, 1))}.xl\:\[\&\>\*\]\:px-4>*{padding-left:1rem;padding-right:1rem}.xl\:\[\&\>div\:last-child\]\:border-b-0>div:last-child{border-bottom-width:0px}.xl\:\[\&\>div\]\:border-b>div{border-bottom-width:1px}.xl\:\[\&\>div\]\:border-dashed>div{border-style:dashed}.xl\:\[\&\>div\]\:border-gray-200>div{--tw-border-opacity: 1;border-color:rgb(var(--gray-200) / var(--tw-border-opacity, 1))}.xl\:\[\&\>div\]\:py-1\.5>div{padding-top:.375rem;padding-bottom:.375rem}}.\[\&\>span\:last-child\]\:border-r-0>span:last-child{border-right-width:0px}.\[\&\>span\:nth-child\(2\)\]\:px-2>span:nth-child(2){padding-left:.5rem;padding-right:.5rem}.\[\&\>span\]\:border-r>span{border-right-width:1px}.\[\&\>span\]\:border-gray-300>span{--tw-border-opacity: 1;border-color:rgb(var(--gray-300) / var(--tw-border-opacity, 1))}.\[\&\>span\]\:px-4>span{padding-left:1rem;padding-right:1rem}.\[\&\>span\]\:py-3>span{padding-top:.75rem;padding-bottom:.75rem} diff --git a/static/assets/index-BtyeumGM.js b/static/assets/index-IP-mmLlr.js similarity index 66% rename from static/assets/index-BtyeumGM.js rename to static/assets/index-IP-mmLlr.js index 2692a39..d4cb469 100644 --- a/static/assets/index-BtyeumGM.js +++ b/static/assets/index-IP-mmLlr.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Dashboard-CAq3bjQ4.js","assets/ui-Bucd7ZQW.js","assets/package-DRVL5sin.js","assets/trending-up-B0n4p6ZM.js","assets/activity-j8Ec2Exe.js","assets/package-check-OgTe2cXI.js","assets/AccountList-BfQLeVfu.js","assets/check-BL4ZPX5c.js","assets/sparkles-CTC5UJ5I.js","assets/power-BzUM4Jxl.js","assets/trash-2-Cpz1crux.js","assets/key-DGAb9JNS.js","assets/eye-off-BfkVRJHJ.js","assets/eye-C6bcwqAG.js","assets/save-B_0bwRwJ.js","assets/OrderList-C360pT64.js","assets/plus-D66LUkyr.js","assets/truck-DFAp5vTR.js","assets/search-Dm0kd19J.js","assets/flower-2-f7YOZRab.js","assets/square-pen-C7b8tolk.js","assets/chevron-right-OUn6lLjt.js","assets/CardList-Dpxu25YO.js","assets/image-BRbxtWrD.js","assets/ItemList-ZOic6eUK.js","assets/shield-alert-Rn-eFcN-.js","assets/power-off-DC_j-T0K.js","assets/settings-2-Dn9OYKhu.js","assets/ProductAutomation-pKlYog5s.js","assets/play-RrpCCHk6.js","assets/link-2-YAS_V1Cj.js","assets/AIReply-DjnHfMhY.js","assets/message-square-text-s_nuv0lf.js","assets/Settings-MN37oq4U.js","assets/zap-BAdVhmYa.js","assets/Keywords-DnsgE2cb.js","assets/MessageManagement-BrI_glnU.js","assets/send-D9HISjuP.js","assets/NotificationsAndLogs-ra-r3ESv.js","assets/pen-line-Du-MX3r7.js","assets/UserManagement-DNkJBqM1.js","assets/About-CfzyaDvI.js","assets/BuyerInteraction-tZgTn_6g.js","assets/Resell-MelTfsde.js","assets/HotList-DLevJN_u.js","assets/PriceWatch-mbt9tO4Q.js"])))=>i.map(i=>d[i]); -function xp(l,s){for(var c=0;cr[f]})}}}return Object.freeze(Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}))}(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))r(f);new MutationObserver(f=>{for(const m of f)if(m.type==="childList")for(const h of m.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&r(h)}).observe(document,{childList:!0,subtree:!0});function c(f){const m={};return f.integrity&&(m.integrity=f.integrity),f.referrerPolicy&&(m.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?m.credentials="include":f.crossOrigin==="anonymous"?m.credentials="omit":m.credentials="same-origin",m}function r(f){if(f.ep)return;f.ep=!0;const m=c(f);fetch(f.href,m)}})();function hh(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var Ic={exports:{}},lu={};/** +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Dashboard-CeRTyM_j.js","assets/ui-Fi8l9rTp.js","assets/package-C7ydMeAZ.js","assets/trending-up-BcW73Gjl.js","assets/activity-Dmn-a3S9.js","assets/package-check-OAWoRoy_.js","assets/AccountList-DfgloUxg.js","assets/check-D50E5xnW.js","assets/sparkles-CavN45fA.js","assets/power-Ucg7FCbo.js","assets/trash-2-BNPsgs2t.js","assets/key-ItWA3Cb3.js","assets/eye-off-B2vwWUUu.js","assets/eye-BxUVYll7.js","assets/save-CNiIU-3u.js","assets/OrderList-CL0--ZMt.js","assets/plus-BbnHS2Zx.js","assets/truck-CrexfDE5.js","assets/search-TGrYyOkD.js","assets/flower-2-fqYsfuSn.js","assets/square-pen-ZPivfDGR.js","assets/chevron-right-CbwGgzS_.js","assets/CardList-CfOseTaj.js","assets/image-hfWSlf8S.js","assets/ItemList-BcNZ279Z.js","assets/shield-alert-B8_J0uYT.js","assets/power-off-D47FTQRk.js","assets/settings-2-DVRotgka.js","assets/ProductAutomation-DCR1XEfL.js","assets/play-CYUspTVx.js","assets/link-2-xKkzn7ZQ.js","assets/AIReply-lg6NYQkE.js","assets/message-square-text-ApwvxIVw.js","assets/Settings-6SylkBTn.js","assets/zap-DljT2UQs.js","assets/Keywords-BfjxZQp6.js","assets/MessageManagement-NPF-d8RM.js","assets/send-CwI5w629.js","assets/NotificationsAndLogs-FD8llMy1.js","assets/pen-line-D5rb4QS3.js","assets/UserManagement-DkSfyiXx.js","assets/About-Bnoqurmz.js","assets/BuyerInteraction-BBBi7zM4.js","assets/Resell-CYFkAG_P.js","assets/HotList-CmrhQsvX.js","assets/PeerShops--FPB0l6-.js","assets/PriceWatch-D0ZYbUkf.js"])))=>i.map(i=>d[i]); +function xp(l,s){for(var c=0;cr[f]})}}}return Object.freeze(Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}))}(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))r(f);new MutationObserver(f=>{for(const m of f)if(m.type==="childList")for(const y of m.addedNodes)y.tagName==="LINK"&&y.rel==="modulepreload"&&r(y)}).observe(document,{childList:!0,subtree:!0});function c(f){const m={};return f.integrity&&(m.integrity=f.integrity),f.referrerPolicy&&(m.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?m.credentials="include":f.crossOrigin==="anonymous"?m.credentials="omit":m.credentials="same-origin",m}function r(f){if(f.ep)return;f.ep=!0;const m=c(f);fetch(f.href,m)}})();function hh(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var Pc={exports:{}},lu={};/** * @license React * react-jsx-runtime.production.js * @@ -7,7 +7,7 @@ function xp(l,s){for(var c=0;c>>1,re=z[Se];if(0>>1;Sef(H,P))Gf(le,H)?(z[Se]=le,z[G]=P,Se=G):(z[Se]=H,z[j]=P,Se=j);else if(Gf(le,P))z[Se]=le,z[G]=P,Se=G;else break e}}return L}function f(z,L){var P=z.sortIndex-L.sortIndex;return P!==0?P:z.id-L.id}if(l.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var m=performance;l.unstable_now=function(){return m.now()}}else{var h=Date,p=h.now();l.unstable_now=function(){return h.now()-p}}var v=[],g=[],A=1,N=null,q=3,F=!1,W=!1,X=!1,Y=!1,C=typeof setTimeout=="function"?setTimeout:null,K=typeof clearTimeout=="function"?clearTimeout:null,Q=typeof setImmediate<"u"?setImmediate:null;function ee(z){for(var L=c(g);L!==null;){if(L.callback===null)r(g);else if(L.startTime<=z)r(g),L.sortIndex=L.expirationTime,s(v,L);else break;L=c(g)}}function Ee(z){if(X=!1,ee(z),!W)if(c(v)!==null)W=!0,me||(me=!0,ke());else{var L=c(g);L!==null&&Re(Ee,L.startTime-z)}}var me=!1,ne=-1,Le=5,ct=-1;function be(){return Y?!0:!(l.unstable_now()-ctz&&be());){var Se=N.callback;if(typeof Se=="function"){N.callback=null,q=N.priorityLevel;var re=Se(N.expirationTime<=z);if(z=l.unstable_now(),typeof re=="function"){N.callback=re,ee(z),L=!0;break t}N===c(v)&&r(v),ee(z)}else r(v);N=c(v)}if(N!==null)L=!0;else{var S=c(g);S!==null&&Re(Ee,S.startTime-z),L=!1}}break e}finally{N=null,q=P,F=!1}L=void 0}}finally{L?ke():me=!1}}}var ke;if(typeof Q=="function")ke=function(){Q(Me)};else if(typeof MessageChannel<"u"){var xt=new MessageChannel,He=xt.port2;xt.port1.onmessage=Me,ke=function(){He.postMessage(null)}}else ke=function(){C(Me,0)};function Re(z,L){ne=C(function(){z(l.unstable_now())},L)}l.unstable_IdlePriority=5,l.unstable_ImmediatePriority=1,l.unstable_LowPriority=4,l.unstable_NormalPriority=3,l.unstable_Profiling=null,l.unstable_UserBlockingPriority=2,l.unstable_cancelCallback=function(z){z.callback=null},l.unstable_forceFrameRate=function(z){0>z||125Se?(z.sortIndex=P,s(g,z),c(v)===null&&z===c(g)&&(X?(K(ne),ne=-1):X=!0,Re(Ee,P-Se))):(z.sortIndex=re,s(v,z),W||F||(W=!0,me||(me=!0,ke()))),z},l.unstable_shouldYield=be,l.unstable_wrapCallback=function(z){var L=q;return function(){var P=q;q=L;try{return z.apply(this,arguments)}finally{q=P}}}})(ar)),ar}var Mm;function Np(){return Mm||(Mm=1,tr.exports=Op()),tr.exports}var nr={exports:{}},rt={};/** + */var Mm;function Op(){return Mm||(Mm=1,(function(l){function s(z,L){var I=z.length;z.push(L);e:for(;0>>1,re=z[Se];if(0>>1;Sef(H,I))Gf(ue,H)?(z[Se]=ue,z[G]=I,Se=G):(z[Se]=H,z[j]=I,Se=j);else if(Gf(ue,I))z[Se]=ue,z[G]=I,Se=G;else break e}}return L}function f(z,L){var I=z.sortIndex-L.sortIndex;return I!==0?I:z.id-L.id}if(l.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var m=performance;l.unstable_now=function(){return m.now()}}else{var y=Date,p=y.now();l.unstable_now=function(){return y.now()-p}}var v=[],g=[],A=1,N=null,B=3,F=!1,W=!1,X=!1,Y=!1,M=typeof setTimeout=="function"?setTimeout:null,K=typeof clearTimeout=="function"?clearTimeout:null,Q=typeof setImmediate<"u"?setImmediate:null;function ee(z){for(var L=c(g);L!==null;){if(L.callback===null)r(g);else if(L.startTime<=z)r(g),L.sortIndex=L.expirationTime,s(v,L);else break;L=c(g)}}function Ee(z){if(X=!1,ee(z),!W)if(c(v)!==null)W=!0,me||(me=!0,ke());else{var L=c(g);L!==null&&Re(Ee,L.startTime-z)}}var me=!1,le=-1,Le=5,ct=-1;function be(){return Y?!0:!(l.unstable_now()-ctz&&be());){var Se=N.callback;if(typeof Se=="function"){N.callback=null,B=N.priorityLevel;var re=Se(N.expirationTime<=z);if(z=l.unstable_now(),typeof re=="function"){N.callback=re,ee(z),L=!0;break t}N===c(v)&&r(v),ee(z)}else r(v);N=c(v)}if(N!==null)L=!0;else{var S=c(g);S!==null&&Re(Ee,S.startTime-z),L=!1}}break e}finally{N=null,B=I,F=!1}L=void 0}}finally{L?ke():me=!1}}}var ke;if(typeof Q=="function")ke=function(){Q(Ce)};else if(typeof MessageChannel<"u"){var xt=new MessageChannel,He=xt.port2;xt.port1.onmessage=Ce,ke=function(){He.postMessage(null)}}else ke=function(){M(Ce,0)};function Re(z,L){le=M(function(){z(l.unstable_now())},L)}l.unstable_IdlePriority=5,l.unstable_ImmediatePriority=1,l.unstable_LowPriority=4,l.unstable_NormalPriority=3,l.unstable_Profiling=null,l.unstable_UserBlockingPriority=2,l.unstable_cancelCallback=function(z){z.callback=null},l.unstable_forceFrameRate=function(z){0>z||125Se?(z.sortIndex=I,s(g,z),c(v)===null&&z===c(g)&&(X?(K(le),le=-1):X=!0,Re(Ee,I-Se))):(z.sortIndex=re,s(v,z),W||F||(W=!0,me||(me=!0,ke()))),z},l.unstable_shouldYield=be,l.unstable_wrapCallback=function(z){var L=B;return function(){var I=B;B=L;try{return z.apply(this,arguments)}finally{B=I}}}})(ar)),ar}var Cm;function Np(){return Cm||(Cm=1,tr.exports=Op()),tr.exports}var nr={exports:{}},rt={};/** * @license React * react-dom.production.js * @@ -31,7 +31,7 @@ function xp(l,s){for(var c=0;c"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(s){console.error(s)}}return l(),nr.exports=Rp(),nr.exports}/** + */var Um;function Rp(){if(Um)return rt;Um=1;var l=vr();function s(v){var g="https://react.dev/errors/"+v;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(s){console.error(s)}}return l(),nr.exports=Rp(),nr.exports}/** * @license React * react-dom-client.production.js * @@ -39,15 +39,15 @@ function xp(l,s){for(var c=0;cre||(e.current=Se[re],Se[re]=null,re--)}function H(e,t){re++,Se[re]=e.current,e.current=t}var G=S(null),le=S(null),Z=S(null),k=S(null);function ue(e,t){switch(H(Z,t),H(le,e),H(G,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Id(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Id(t),e=Pd(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}j(G),H(G,e)}function Te(){j(G),j(le),j(Z)}function Za(e){e.memoizedState!==null&&H(k,e);var t=G.current,a=Pd(t,e.type);t!==a&&(H(le,e),H(G,a))}function Ka(e){le.current===e&&(j(G),j(le)),k.current===e&&(j(k),eu._currentValue=P)}var Et,ol;function Zt(e){if(Et===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Et=t&&t[1]||"",ol=-1re||(e.current=Se[re],Se[re]=null,re--)}function H(e,t){re++,Se[re]=e.current,e.current=t}var G=S(null),ue=S(null),Z=S(null),k=S(null);function ie(e,t){switch(H(Z,t),H(ue,e),H(G,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Pd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Pd(t),e=Id(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}j(G),H(G,e)}function Te(){j(G),j(ue),j(Z)}function Za(e){e.memoizedState!==null&&H(k,e);var t=G.current,a=Id(t,e.type);t!==a&&(H(ue,e),H(G,a))}function Ka(e){ue.current===e&&(j(G),j(ue)),k.current===e&&(j(k),eu._currentValue=I)}var Et,ol;function Zt(e){if(Et===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Et=t&&t[1]||"",ol=-1)":-1u||b[n]!==O[u]){var D=` `+b[n].replace(" at new "," at ");return e.displayName&&D.includes("")&&(D=D.replace("",e.displayName)),D}while(1<=n&&0<=u);break}}}finally{At=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Zt(a):""}function dt(e,t){switch(e.tag){case 26:case 27:case 5:return Zt(e.type);case 16:return Zt("Lazy");case 13:return e.child!==t&&t!==null?Zt("Suspense Fallback"):Zt("Suspense");case 19:return Zt("SuspenseList");case 0:case 15:return se(e.type,!1);case 11:return se(e.type.render,!1);case 1:return se(e.type,!0);case 31:return Zt("Activity");default:return""}}function Kt(e){try{var t="",a=null;do t+=dt(e,a),a=e,e=e.return;while(e);return t}catch(n){return` Error generating stack: `+n.message+` -`+n.stack}}var Jt=Object.prototype.hasOwnProperty,vn=l.unstable_scheduleCallback,fl=l.unstable_cancelCallback,Ja=l.unstable_shouldYield,ty=l.unstable_requestPaint,Tt=l.unstable_now,ay=l.unstable_getCurrentPriorityLevel,Rr=l.unstable_ImmediatePriority,wr=l.unstable_UserBlockingPriority,mu=l.unstable_NormalPriority,ny=l.unstable_LowPriority,zr=l.unstable_IdlePriority,ly=l.log,uy=l.unstable_setDisableYieldValue,dl=null,Ot=null;function Sa(e){if(typeof ly=="function"&&uy(e),Ot&&typeof Ot.setStrictMode=="function")try{Ot.setStrictMode(dl,e)}catch{}}var Nt=Math.clz32?Math.clz32:cy,iy=Math.log,sy=Math.LN2;function cy(e){return e>>>=0,e===0?32:31-(iy(e)/sy|0)|0}var hu=256,yu=262144,pu=4194304;function $a(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function gu(e,t,a){var n=e.pendingLanes;if(n===0)return 0;var u=0,i=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var d=n&134217727;return d!==0?(n=d&~i,n!==0?u=$a(n):(o&=d,o!==0?u=$a(o):a||(a=d&~e,a!==0&&(u=$a(a))))):(d=n&~i,d!==0?u=$a(d):o!==0?u=$a(o):a||(a=n&~e,a!==0&&(u=$a(a)))),u===0?0:t!==0&&t!==u&&(t&i)===0&&(i=u&-u,a=t&-t,i>=a||i===32&&(a&4194048)!==0)?t:u}function ml(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ry(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function jr(){var e=pu;return pu<<=1,(pu&62914560)===0&&(pu=4194304),e}function ki(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function hl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function oy(e,t,a,n,u,i){var o=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var d=e.entanglements,b=e.expirationTimes,O=e.hiddenUpdates;for(a=o&~a;0"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var py=/[\n"\\]/g;function qt(e){return e.replace(py,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Zi(e,t,a,n,u,i,o,d){e.name="",o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.type=o:e.removeAttribute("type"),t!=null?o==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Ut(t)):e.value!==""+Ut(t)&&(e.value=""+Ut(t)):o!=="submit"&&o!=="reset"||e.removeAttribute("value"),t!=null?Ki(e,o,Ut(t)):a!=null?Ki(e,o,Ut(a)):n!=null&&e.removeAttribute("value"),u==null&&i!=null&&(e.defaultChecked=!!i),u!=null&&(e.checked=u&&typeof u!="function"&&typeof u!="symbol"),d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"?e.name=""+Ut(d):e.removeAttribute("name")}function Gr(e,t,a,n,u,i,o,d){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||a!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){Qi(e);return}a=a!=null?""+Ut(a):"",t=t!=null?""+Ut(t):a,d||t===e.value||(e.value=t),e.defaultValue=t}n=n??u,n=typeof n!="function"&&typeof n!="symbol"&&!!n,e.checked=d?e.checked:!!n,e.defaultChecked=!!n,o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.name=o),Qi(e)}function Ki(e,t,a){t==="number"&&Su(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Tn(e,t,a,n){if(e=e.options,t){t={};for(var u=0;u"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ii=!1;if(la)try{var bl={};Object.defineProperty(bl,"passive",{get:function(){Ii=!0}}),window.addEventListener("test",bl,bl),window.removeEventListener("test",bl,bl)}catch{Ii=!1}var xa=null,Pi=null,xu=null;function Wr(){if(xu)return xu;var e,t=Pi,a=t.length,n,u="value"in xa?xa.value:xa.textContent,i=u.length;for(e=0;e=_l),no=" ",lo=!1;function uo(e,t){switch(e){case"keyup":return Gy.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function io(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var wn=!1;function Zy(e,t){switch(e){case"compositionend":return io(t);case"keypress":return t.which!==32?null:(lo=!0,no);case"textInput":return e=t.data,e===no&&lo?null:e;default:return null}}function Ky(e,t){if(wn)return e==="compositionend"||!ls&&uo(e,t)?(e=Wr(),xu=Pi=xa=null,wn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:a,offset:t-e};e=n}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=yo(a)}}function go(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?go(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function bo(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Su(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=Su(e.document)}return t}function ss(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var t0=la&&"documentMode"in document&&11>=document.documentMode,zn=null,cs=null,Tl=null,rs=!1;function vo(e,t,a){var n=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;rs||zn==null||zn!==Su(n)||(n=zn,"selectionStart"in n&&ss(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Tl&&Al(Tl,n)||(Tl=n,n=yi(cs,"onSelect"),0>=o,u-=o,It=1<<32-Nt(t)+u|a<fe?(ge=$,$=null):ge=$.sibling;var xe=R(E,$,T[fe],M);if(xe===null){$===null&&($=ge);break}e&&$&&xe.alternate===null&&t(E,$),_=i(xe,_,fe),_e===null?I=xe:_e.sibling=xe,_e=xe,$=ge}if(fe===T.length)return a(E,$),ve&&ia(E,fe),I;if($===null){for(;fefe?(ge=$,$=null):ge=$.sibling;var Ga=R(E,$,xe.value,M);if(Ga===null){$===null&&($=ge);break}e&&$&&Ga.alternate===null&&t(E,$),_=i(Ga,_,fe),_e===null?I=Ga:_e.sibling=Ga,_e=Ga,$=ge}if(xe.done)return a(E,$),ve&&ia(E,fe),I;if($===null){for(;!xe.done;fe++,xe=T.next())xe=U(E,xe.value,M),xe!==null&&(_=i(xe,_,fe),_e===null?I=xe:_e.sibling=xe,_e=xe);return ve&&ia(E,fe),I}for($=n($);!xe.done;fe++,xe=T.next())xe=w($,E,fe,xe.value,M),xe!==null&&(e&&xe.alternate!==null&&$.delete(xe.key===null?fe:xe.key),_=i(xe,_,fe),_e===null?I=xe:_e.sibling=xe,_e=xe);return e&&$.forEach(function(_p){return t(E,_p)}),ve&&ia(E,fe),I}function je(E,_,T,M){if(typeof T=="object"&&T!==null&&T.type===X&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case F:e:{for(var I=T.key;_!==null;){if(_.key===I){if(I=T.type,I===X){if(_.tag===7){a(E,_.sibling),M=u(_,T.props.children),M.return=E,E=M;break e}}else if(_.elementType===I||typeof I=="object"&&I!==null&&I.$$typeof===Le&&sn(I)===_.type){a(E,_.sibling),M=u(_,T.props),jl(M,T),M.return=E,E=M;break e}a(E,_);break}else t(E,_);_=_.sibling}T.type===X?(M=tn(T.props.children,E.mode,M,T.key),M.return=E,E=M):(M=Du(T.type,T.key,T.props,null,E.mode,M),jl(M,T),M.return=E,E=M)}return o(E);case W:e:{for(I=T.key;_!==null;){if(_.key===I)if(_.tag===4&&_.stateNode.containerInfo===T.containerInfo&&_.stateNode.implementation===T.implementation){a(E,_.sibling),M=u(_,T.children||[]),M.return=E,E=M;break e}else{a(E,_);break}else t(E,_);_=_.sibling}M=ps(T,E.mode,M),M.return=E,E=M}return o(E);case Le:return T=sn(T),je(E,_,T,M)}if(Re(T))return J(E,_,T,M);if(ke(T)){if(I=ke(T),typeof I!="function")throw Error(r(150));return T=I.call(T),te(E,_,T,M)}if(typeof T.then=="function")return je(E,_,Lu(T),M);if(T.$$typeof===Q)return je(E,_,Uu(E,T),M);ku(E,T)}return typeof T=="string"&&T!==""||typeof T=="number"||typeof T=="bigint"?(T=""+T,_!==null&&_.tag===6?(a(E,_.sibling),M=u(_,T),M.return=E,E=M):(a(E,_),M=ys(T,E.mode,M),M.return=E,E=M),o(E)):a(E,_)}return function(E,_,T,M){try{zl=0;var I=je(E,_,T,M);return Yn=null,I}catch($){if($===kn||$===Bu)throw $;var _e=wt(29,$,null,E.mode);return _e.lanes=M,_e.return=E,_e}finally{}}}var rn=Vo(!0),Xo=Vo(!1),Na=!1;function Rs(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ws(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ra(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function wa(e,t,a){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(Ae&2)!==0){var u=n.pending;return u===null?t.next=t:(t.next=u.next,u.next=t),n.pending=t,t=ju(e),Oo(e,null,a),t}return zu(e,n,t,a),ju(e)}function Dl(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,Cr(e,a)}}function zs(e,t){var a=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,a===n)){var u=null,i=null;if(a=a.firstBaseUpdate,a!==null){do{var o={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};i===null?u=i=o:i=i.next=o,a=a.next}while(a!==null);i===null?u=i=t:i=i.next=t}else u=i=t;a={baseState:n.baseState,firstBaseUpdate:u,lastBaseUpdate:i,shared:n.shared,callbacks:n.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var js=!1;function Cl(){if(js){var e=Ln;if(e!==null)throw e}}function Ml(e,t,a,n){js=!1;var u=e.updateQueue;Na=!1;var i=u.firstBaseUpdate,o=u.lastBaseUpdate,d=u.shared.pending;if(d!==null){u.shared.pending=null;var b=d,O=b.next;b.next=null,o===null?i=O:o.next=O,o=b;var D=e.alternate;D!==null&&(D=D.updateQueue,d=D.lastBaseUpdate,d!==o&&(d===null?D.firstBaseUpdate=O:d.next=O,D.lastBaseUpdate=b))}if(i!==null){var U=u.baseState;o=0,D=O=b=null,d=i;do{var R=d.lane&-536870913,w=R!==d.lane;if(w?(pe&R)===R:(n&R)===R){R!==0&&R===Hn&&(js=!0),D!==null&&(D=D.next={lane:0,tag:d.tag,payload:d.payload,callback:null,next:null});e:{var J=e,te=d;R=t;var je=a;switch(te.tag){case 1:if(J=te.payload,typeof J=="function"){U=J.call(je,U,R);break e}U=J;break e;case 3:J.flags=J.flags&-65537|128;case 0:if(J=te.payload,R=typeof J=="function"?J.call(je,U,R):J,R==null)break e;U=N({},U,R);break e;case 2:Na=!0}}R=d.callback,R!==null&&(e.flags|=64,w&&(e.flags|=8192),w=u.callbacks,w===null?u.callbacks=[R]:w.push(R))}else w={lane:R,tag:d.tag,payload:d.payload,callback:d.callback,next:null},D===null?(O=D=w,b=U):D=D.next=w,o|=R;if(d=d.next,d===null){if(d=u.shared.pending,d===null)break;w=d,d=w.next,w.next=null,u.lastBaseUpdate=w,u.shared.pending=null}}while(!0);D===null&&(b=U),u.baseState=b,u.firstBaseUpdate=O,u.lastBaseUpdate=D,i===null&&(u.shared.lanes=0),Ma|=o,e.lanes=o,e.memoizedState=U}}function Go(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function Qo(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;ei?i:8;var o=z.T,d={};z.T=d,Fs(e,!1,t,a);try{var b=u(),O=z.S;if(O!==null&&O(d,b),b!==null&&typeof b=="object"&&typeof b.then=="function"){var D=o0(b,n);Bl(e,t,D,Mt(e))}else Bl(e,t,n,Mt(e))}catch(U){Bl(e,t,{then:function(){},status:"rejected",reason:U},Mt())}finally{L.p=i,o!==null&&d.types!==null&&(o.types=d.types),z.T=o}}function p0(){}function Js(e,t,a,n){if(e.tag!==5)throw Error(r(476));var u=Af(e).queue;Ef(e,u,t,P,a===null?p0:function(){return Tf(e),a(n)})}function Af(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:P,baseState:P,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:oa,lastRenderedState:P},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:oa,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Tf(e){var t=Af(e);t.next===null&&(t=e.alternate.memoizedState),Bl(e,t.next.queue,{},Mt())}function $s(){return lt(eu)}function Of(){return Ge().memoizedState}function Nf(){return Ge().memoizedState}function g0(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Mt();e=Ra(a);var n=wa(t,e,a);n!==null&&(St(n,t,a),Dl(n,t,a)),t={cache:As()},e.payload=t;return}t=t.return}}function b0(e,t,a){var n=Mt();a={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Fu(e)?wf(t,a):(a=ms(e,t,a,n),a!==null&&(St(a,e,n),zf(a,t,n)))}function Rf(e,t,a){var n=Mt();Bl(e,t,a,n)}function Bl(e,t,a,n){var u={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Fu(e))wf(t,u);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,d=i(o,a);if(u.hasEagerState=!0,u.eagerState=d,Rt(d,o))return zu(e,t,u,0),Ce===null&&wu(),!1}catch{}finally{}if(a=ms(e,t,u,n),a!==null)return St(a,e,n),zf(a,t,n),!0}return!1}function Fs(e,t,a,n){if(n={lane:2,revertLane:Rc(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Fu(e)){if(t)throw Error(r(479))}else t=ms(e,a,n,2),t!==null&&St(t,e,2)}function Fu(e){var t=e.alternate;return e===oe||t!==null&&t===oe}function wf(e,t){Xn=Xu=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function zf(e,t,a){if((a&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,Cr(e,a)}}var Hl={readContext:lt,use:Zu,useCallback:Ye,useContext:Ye,useEffect:Ye,useImperativeHandle:Ye,useLayoutEffect:Ye,useInsertionEffect:Ye,useMemo:Ye,useReducer:Ye,useRef:Ye,useState:Ye,useDebugValue:Ye,useDeferredValue:Ye,useTransition:Ye,useSyncExternalStore:Ye,useId:Ye,useHostTransitionStatus:Ye,useFormState:Ye,useActionState:Ye,useOptimistic:Ye,useMemoCache:Ye,useCacheRefresh:Ye};Hl.useEffectEvent=Ye;var jf={readContext:lt,use:Zu,useCallback:function(e,t){return mt().memoizedState=[e,t===void 0?null:t],e},useContext:lt,useEffect:hf,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,Ju(4194308,4,bf.bind(null,t,e),a)},useLayoutEffect:function(e,t){return Ju(4194308,4,e,t)},useInsertionEffect:function(e,t){Ju(4,2,e,t)},useMemo:function(e,t){var a=mt();t=t===void 0?null:t;var n=e();if(on){Sa(!0);try{e()}finally{Sa(!1)}}return a.memoizedState=[n,t],n},useReducer:function(e,t,a){var n=mt();if(a!==void 0){var u=a(t);if(on){Sa(!0);try{a(t)}finally{Sa(!1)}}}else u=t;return n.memoizedState=n.baseState=u,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:u},n.queue=e,e=e.dispatch=b0.bind(null,oe,e),[n.memoizedState,e]},useRef:function(e){var t=mt();return e={current:e},t.memoizedState=e},useState:function(e){e=Xs(e);var t=e.queue,a=Rf.bind(null,oe,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:Zs,useDeferredValue:function(e,t){var a=mt();return Ks(a,e,t)},useTransition:function(){var e=Xs(!1);return e=Ef.bind(null,oe,e.queue,!0,!1),mt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var n=oe,u=mt();if(ve){if(a===void 0)throw Error(r(407));a=a()}else{if(a=t(),Ce===null)throw Error(r(349));(pe&127)!==0||Wo(n,t,a)}u.memoizedState=a;var i={value:a,getSnapshot:t};return u.queue=i,hf(Po.bind(null,n,i,e),[e]),n.flags|=2048,Qn(9,{destroy:void 0},Io.bind(null,n,i,a,t),null),a},useId:function(){var e=mt(),t=Ce.identifierPrefix;if(ve){var a=Pt,n=It;a=(n&~(1<<32-Nt(n)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Gu++,0<\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof n.is=="string"?o.createElement("select",{is:n.is}):o.createElement("select"),n.multiple?i.multiple=!0:n.size&&(i.size=n.size);break;default:i=typeof n.is=="string"?o.createElement(u,{is:n.is}):o.createElement(u)}}i[at]=t,i[ht]=n;e:for(o=t.child;o!==null;){if(o.tag===5||o.tag===6)i.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===t)break e;for(;o.sibling===null;){if(o.return===null||o.return===t)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}t.stateNode=i;e:switch(it(i,u,n),u){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}n&&da(t)}}return qe(t),oc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&da(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(r(166));if(e=Z.current,qn(t)){if(e=t.stateNode,a=t.memoizedProps,n=null,u=nt,u!==null)switch(u.tag){case 27:case 5:n=u.memoizedProps}e[at]=t,e=!!(e.nodeValue===a||n!==null&&n.suppressHydrationWarning===!0||Fd(e.nodeValue,a)),e||Ta(t,!0)}else e=pi(e).createTextNode(n),e[at]=t,t.stateNode=e}return qe(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(n=qn(t),a!==null){if(e===null){if(!n)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[at]=t}else an(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;qe(t),e=!1}else a=Ss(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(jt(t),t):(jt(t),null);if((t.flags&128)!==0)throw Error(r(558))}return qe(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=qn(t),n!==null&&n.dehydrated!==null){if(e===null){if(!u)throw Error(r(318));if(u=t.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(r(317));u[at]=t}else an(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;qe(t),u=!1}else u=Ss(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),u=!0;if(!u)return t.flags&256?(jt(t),t):(jt(t),null)}return jt(t),(t.flags&128)!==0?(t.lanes=a,t):(a=n!==null,e=e!==null&&e.memoizedState!==null,a&&(n=t.child,u=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(u=n.alternate.memoizedState.cachePool.pool),i=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(i=n.memoizedState.cachePool.pool),i!==u&&(n.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),ti(t,t.updateQueue),qe(t),null);case 4:return Te(),e===null&&Dc(t.stateNode.containerInfo),qe(t),null;case 10:return ca(t.type),qe(t),null;case 19:if(j(Xe),n=t.memoizedState,n===null)return qe(t),null;if(u=(t.flags&128)!==0,i=n.rendering,i===null)if(u)kl(n,!1);else{if(Ve!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=Vu(e),i!==null){for(t.flags|=128,kl(n,!1),e=i.updateQueue,t.updateQueue=e,ti(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)No(a,e),a=a.sibling;return H(Xe,Xe.current&1|2),ve&&ia(t,n.treeForkCount),t.child}e=e.sibling}n.tail!==null&&Tt()>ii&&(t.flags|=128,u=!0,kl(n,!1),t.lanes=4194304)}else{if(!u)if(e=Vu(i),e!==null){if(t.flags|=128,u=!0,e=e.updateQueue,t.updateQueue=e,ti(t,e),kl(n,!0),n.tail===null&&n.tailMode==="hidden"&&!i.alternate&&!ve)return qe(t),null}else 2*Tt()-n.renderingStartTime>ii&&a!==536870912&&(t.flags|=128,u=!0,kl(n,!1),t.lanes=4194304);n.isBackwards?(i.sibling=t.child,t.child=i):(e=n.last,e!==null?e.sibling=i:t.child=i,n.last=i)}return n.tail!==null?(e=n.tail,n.rendering=e,n.tail=e.sibling,n.renderingStartTime=Tt(),e.sibling=null,a=Xe.current,H(Xe,u?a&1|2:a&1),ve&&ia(t,n.treeForkCount),e):(qe(t),null);case 22:case 23:return jt(t),Cs(),n=t.memoizedState!==null,e!==null?e.memoizedState!==null!==n&&(t.flags|=8192):n&&(t.flags|=8192),n?(a&536870912)!==0&&(t.flags&128)===0&&(qe(t),t.subtreeFlags&6&&(t.flags|=8192)):qe(t),a=t.updateQueue,a!==null&&ti(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),n=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),n!==a&&(t.flags|=2048),e!==null&&j(un),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),ca(Ze),qe(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function E0(e,t){switch(bs(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ca(Ze),Te(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ka(t),null;case 31:if(t.memoizedState!==null){if(jt(t),t.alternate===null)throw Error(r(340));an()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(jt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));an()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return j(Xe),null;case 4:return Te(),null;case 10:return ca(t.type),null;case 22:case 23:return jt(t),Cs(),e!==null&&j(un),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ca(Ze),null;case 25:return null;default:return null}}function td(e,t){switch(bs(t),t.tag){case 3:ca(Ze),Te();break;case 26:case 27:case 5:Ka(t);break;case 4:Te();break;case 31:t.memoizedState!==null&&jt(t);break;case 13:jt(t);break;case 19:j(Xe);break;case 10:ca(t.type);break;case 22:case 23:jt(t),Cs(),e!==null&&j(un);break;case 24:ca(Ze)}}function Yl(e,t){try{var a=t.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var u=n.next;a=u;do{if((a.tag&e)===e){n=void 0;var i=a.create,o=a.inst;n=i(),o.destroy=n}a=a.next}while(a!==u)}}catch(d){Ne(t,t.return,d)}}function Da(e,t,a){try{var n=t.updateQueue,u=n!==null?n.lastEffect:null;if(u!==null){var i=u.next;n=i;do{if((n.tag&e)===e){var o=n.inst,d=o.destroy;if(d!==void 0){o.destroy=void 0,u=t;var b=a,O=d;try{O()}catch(D){Ne(u,b,D)}}}n=n.next}while(n!==i)}}catch(D){Ne(t,t.return,D)}}function ad(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{Qo(t,a)}catch(n){Ne(e,e.return,n)}}}function nd(e,t,a){a.props=fn(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(n){Ne(e,t,n)}}function Vl(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var n=e.stateNode;break;case 30:n=e.stateNode;break;default:n=e.stateNode}typeof a=="function"?e.refCleanup=a(n):a.current=n}}catch(u){Ne(e,t,u)}}function ea(e,t){var a=e.ref,n=e.refCleanup;if(a!==null)if(typeof n=="function")try{n()}catch(u){Ne(e,t,u)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(u){Ne(e,t,u)}else a.current=null}function ld(e){var t=e.type,a=e.memoizedProps,n=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break e;case"img":a.src?n.src=a.src:a.srcSet&&(n.srcset=a.srcSet)}}catch(u){Ne(e,e.return,u)}}function fc(e,t,a){try{var n=e.stateNode;Q0(n,e.type,a,t),n[ht]=t}catch(u){Ne(e,e.return,u)}}function ud(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&La(e.type)||e.tag===4}function dc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ud(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&La(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function mc(e,t,a){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=na));else if(n!==4&&(n===27&&La(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(mc(e,t,a),e=e.sibling;e!==null;)mc(e,t,a),e=e.sibling}function ai(e,t,a){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(n!==4&&(n===27&&La(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(ai(e,t,a),e=e.sibling;e!==null;)ai(e,t,a),e=e.sibling}function id(e){var t=e.stateNode,a=e.memoizedProps;try{for(var n=e.type,u=t.attributes;u.length;)t.removeAttributeNode(u[0]);it(t,n,a),t[at]=e,t[ht]=a}catch(i){Ne(e,e.return,i)}}var ma=!1,$e=!1,hc=!1,sd=typeof WeakSet=="function"?WeakSet:Set,Ie=null;function A0(e,t){if(e=e.containerInfo,Uc=Ei,e=bo(e),ss(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var n=a.getSelection&&a.getSelection();if(n&&n.rangeCount!==0){a=n.anchorNode;var u=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{a.nodeType,i.nodeType}catch{a=null;break e}var o=0,d=-1,b=-1,O=0,D=0,U=e,R=null;t:for(;;){for(var w;U!==a||u!==0&&U.nodeType!==3||(d=o+u),U!==i||n!==0&&U.nodeType!==3||(b=o+n),U.nodeType===3&&(o+=U.nodeValue.length),(w=U.firstChild)!==null;)R=U,U=w;for(;;){if(U===e)break t;if(R===a&&++O===u&&(d=o),R===i&&++D===n&&(b=o),(w=U.nextSibling)!==null)break;U=R,R=U.parentNode}U=w}a=d===-1||b===-1?null:{start:d,end:b}}else a=null}a=a||{start:0,end:0}}else a=null;for(qc={focusedElem:e,selectionRange:a},Ei=!1,Ie=t;Ie!==null;)if(t=Ie,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ie=e;else for(;Ie!==null;){switch(t=Ie,i=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a title"))),it(i,n,a),i[at]=e,We(i),n=i;break e;case"link":var o=mm("link","href",u).get(n+(a.href||""));if(o){for(var d=0;dje&&(o=je,je=te,te=o);var E=po(d,te),_=po(d,je);if(E&&_&&(w.rangeCount!==1||w.anchorNode!==E.node||w.anchorOffset!==E.offset||w.focusNode!==_.node||w.focusOffset!==_.offset)){var T=U.createRange();T.setStart(E.node,E.offset),w.removeAllRanges(),te>je?(w.addRange(T),w.extend(_.node,_.offset)):(T.setEnd(_.node,_.offset),w.addRange(T))}}}}for(U=[],w=d;w=w.parentNode;)w.nodeType===1&&U.push({element:w,left:w.scrollLeft,top:w.scrollTop});for(typeof d.focus=="function"&&d.focus(),d=0;da?32:a,z.T=null,a=_c,_c=null;var i=qa,o=ba;if(Fe=0,Fn=qa=null,ba=0,(Ae&6)!==0)throw Error(r(331));var d=Ae;if(Ae|=4,bd(i.current),yd(i,i.current,o,a),Ae=d,Jl(0,!1),Ot&&typeof Ot.onPostCommitFiberRoot=="function")try{Ot.onPostCommitFiberRoot(dl,i)}catch{}return!0}finally{L.p=u,z.T=n,qd(e,t)}}function Hd(e,t,a){t=Ht(a,t),t=ec(e.stateNode,t,2),e=wa(e,t,2),e!==null&&(hl(e,2),ta(e))}function Ne(e,t,a){if(e.tag===3)Hd(e,e,a);else for(;t!==null;){if(t.tag===3){Hd(t,e,a);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Ua===null||!Ua.has(n))){e=Ht(a,e),a=Lf(2),n=wa(t,a,2),n!==null&&(kf(a,n,t,e),hl(n,2),ta(n));break}}t=t.return}}function Tc(e,t,a){var n=e.pingCache;if(n===null){n=e.pingCache=new N0;var u=new Set;n.set(t,u)}else u=n.get(t),u===void 0&&(u=new Set,n.set(t,u));u.has(a)||(gc=!0,u.add(a),e=D0.bind(null,e,t,a),t.then(e,e))}function D0(e,t,a){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Ce===e&&(pe&a)===a&&(Ve===4||Ve===3&&(pe&62914560)===pe&&300>Tt()-ui?(Ae&2)===0&&Wn(e,0):bc|=a,$n===pe&&($n=0)),ta(e)}function Ld(e,t){t===0&&(t=jr()),e=en(e,t),e!==null&&(hl(e,t),ta(e))}function C0(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),Ld(e,a)}function M0(e,t){var a=0;switch(e.tag){case 31:case 13:var n=e.stateNode,u=e.memoizedState;u!==null&&(a=u.retryLane);break;case 19:n=e.stateNode;break;case 22:n=e.stateNode._retryCache;break;default:throw Error(r(314))}n!==null&&n.delete(t),Ld(e,a)}function U0(e,t){return vn(e,t)}var di=null,Pn=null,Oc=!1,mi=!1,Nc=!1,Ha=0;function ta(e){e!==Pn&&e.next===null&&(Pn===null?di=Pn=e:Pn=Pn.next=e),mi=!0,Oc||(Oc=!0,B0())}function Jl(e,t){if(!Nc&&mi){Nc=!0;do for(var a=!1,n=di;n!==null;){if(e!==0){var u=n.pendingLanes;if(u===0)var i=0;else{var o=n.suspendedLanes,d=n.pingedLanes;i=(1<<31-Nt(42|e)+1)-1,i&=u&~(o&~d),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(a=!0,Xd(n,i))}else i=pe,i=gu(n,n===Ce?i:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(i&3)===0||ml(n,i)||(a=!0,Xd(n,i));n=n.next}while(a);Nc=!1}}function q0(){kd()}function kd(){mi=Oc=!1;var e=0;Ha!==0&&K0()&&(e=Ha);for(var t=Tt(),a=null,n=di;n!==null;){var u=n.next,i=Yd(n,t);i===0?(n.next=null,a===null?di=u:a.next=u,u===null&&(Pn=a)):(a=n,(e!==0||(i&3)!==0)&&(mi=!0)),n=u}Fe!==0&&Fe!==5||Jl(e),Ha!==0&&(Ha=0)}function Yd(e,t){for(var a=e.suspendedLanes,n=e.pingedLanes,u=e.expirationTimes,i=e.pendingLanes&-62914561;0d)break;var D=b.transferSize,U=b.initiatorType;D&&Wd(U)&&(b=b.responseEnd,o+=D*(b"u"?null:document;function rm(e,t,a){var n=el;if(n&&typeof t=="string"&&t){var u=qt(t);u='link[rel="'+e+'"][href="'+u+'"]',typeof a=="string"&&(u+='[crossorigin="'+a+'"]'),cm.has(u)||(cm.add(u),e={rel:e,crossOrigin:a,href:t},n.querySelector(u)===null&&(t=n.createElement("link"),it(t,"link",e),We(t),n.head.appendChild(t)))}}function ap(e){va.D(e),rm("dns-prefetch",e,null)}function np(e,t){va.C(e,t),rm("preconnect",e,t)}function lp(e,t,a){va.L(e,t,a);var n=el;if(n&&e&&t){var u='link[rel="preload"][as="'+qt(t)+'"]';t==="image"&&a&&a.imageSrcSet?(u+='[imagesrcset="'+qt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(u+='[imagesizes="'+qt(a.imageSizes)+'"]')):u+='[href="'+qt(e)+'"]';var i=u;switch(t){case"style":i=tl(e);break;case"script":i=al(e)}Gt.has(i)||(e=N({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Gt.set(i,e),n.querySelector(u)!==null||t==="style"&&n.querySelector(Il(i))||t==="script"&&n.querySelector(Pl(i))||(t=n.createElement("link"),it(t,"link",e),We(t),n.head.appendChild(t)))}}function up(e,t){va.m(e,t);var a=el;if(a&&e){var n=t&&typeof t.as=="string"?t.as:"script",u='link[rel="modulepreload"][as="'+qt(n)+'"][href="'+qt(e)+'"]',i=u;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=al(e)}if(!Gt.has(i)&&(e=N({rel:"modulepreload",href:e},t),Gt.set(i,e),a.querySelector(u)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Pl(i)))return}n=a.createElement("link"),it(n,"link",e),We(n),a.head.appendChild(n)}}}function ip(e,t,a){va.S(e,t,a);var n=el;if(n&&e){var u=En(n).hoistableStyles,i=tl(e);t=t||"default";var o=u.get(i);if(!o){var d={loading:0,preload:null};if(o=n.querySelector(Il(i)))d.loading=5;else{e=N({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Gt.get(i))&&Xc(e,a);var b=o=n.createElement("link");We(b),it(b,"link",e),b._p=new Promise(function(O,D){b.onload=O,b.onerror=D}),b.addEventListener("load",function(){d.loading|=1}),b.addEventListener("error",function(){d.loading|=2}),d.loading|=4,bi(o,t,n)}o={type:"stylesheet",instance:o,count:1,state:d},u.set(i,o)}}}function sp(e,t){va.X(e,t);var a=el;if(a&&e){var n=En(a).hoistableScripts,u=al(e),i=n.get(u);i||(i=a.querySelector(Pl(u)),i||(e=N({src:e,async:!0},t),(t=Gt.get(u))&&Gc(e,t),i=a.createElement("script"),We(i),it(i,"link",e),a.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},n.set(u,i))}}function cp(e,t){va.M(e,t);var a=el;if(a&&e){var n=En(a).hoistableScripts,u=al(e),i=n.get(u);i||(i=a.querySelector(Pl(u)),i||(e=N({src:e,async:!0,type:"module"},t),(t=Gt.get(u))&&Gc(e,t),i=a.createElement("script"),We(i),it(i,"link",e),a.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},n.set(u,i))}}function om(e,t,a,n){var u=(u=Z.current)?gi(u):null;if(!u)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=tl(a.href),a=En(u).hoistableStyles,n=a.get(t),n||(n={type:"style",instance:null,count:0,state:null},a.set(t,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=tl(a.href);var i=En(u).hoistableStyles,o=i.get(e);if(o||(u=u.ownerDocument||u,o={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,o),(i=u.querySelector(Il(e)))&&!i._p&&(o.instance=i,o.state.loading=5),Gt.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Gt.set(e,a),i||rp(u,e,a,o.state))),t&&n===null)throw Error(r(528,""));return o}if(t&&n!==null)throw Error(r(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=al(a),a=En(u).hoistableScripts,n=a.get(t),n||(n={type:"script",instance:null,count:0,state:null},a.set(t,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function tl(e){return'href="'+qt(e)+'"'}function Il(e){return'link[rel="stylesheet"]['+e+"]"}function fm(e){return N({},e,{"data-precedence":e.precedence,precedence:null})}function rp(e,t,a,n){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?n.loading=1:(t=e.createElement("link"),n.preload=t,t.addEventListener("load",function(){return n.loading|=1}),t.addEventListener("error",function(){return n.loading|=2}),it(t,"link",a),We(t),e.head.appendChild(t))}function al(e){return'[src="'+qt(e)+'"]'}function Pl(e){return"script[async]"+e}function dm(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+qt(a.href)+'"]');if(n)return t.instance=n,We(n),n;var u=N({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),We(n),it(n,"style",u),bi(n,a.precedence,e),t.instance=n;case"stylesheet":u=tl(a.href);var i=e.querySelector(Il(u));if(i)return t.state.loading|=4,t.instance=i,We(i),i;n=fm(a),(u=Gt.get(u))&&Xc(n,u),i=(e.ownerDocument||e).createElement("link"),We(i);var o=i;return o._p=new Promise(function(d,b){o.onload=d,o.onerror=b}),it(i,"link",n),t.state.loading|=4,bi(i,a.precedence,e),t.instance=i;case"script":return i=al(a.src),(u=e.querySelector(Pl(i)))?(t.instance=u,We(u),u):(n=a,(u=Gt.get(i))&&(n=N({},a),Gc(n,u)),e=e.ownerDocument||e,u=e.createElement("script"),We(u),it(u,"link",n),e.head.appendChild(u),t.instance=u);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(n=t.instance,t.state.loading|=4,bi(n,a.precedence,e));return t.instance}function bi(e,t,a){for(var n=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=n.length?n[n.length-1]:null,i=u,o=0;o title"):null)}function op(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function ym(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function fp(e,t,a,n){if(a.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var u=tl(n.href),i=t.querySelector(Il(u));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Si.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=i,We(i);return}i=t.ownerDocument||t,n=fm(n),(u=Gt.get(u))&&Xc(n,u),i=i.createElement("link"),We(i);var o=i;o._p=new Promise(function(d,b){o.onload=d,o.onerror=b}),it(i,"link",n),a.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Si.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var Qc=0;function dp(e,t){return e.stylesheets&&e.count===0&&xi(e,e.stylesheets),0Qc?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(u)}}:null}function Si(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)xi(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var _i=null;function xi(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,_i=new Map,t.forEach(mp,e),_i=null,Si.call(e))}function mp(e,t){if(!(t.state.loading&4)){var a=_i.get(e);if(a)var n=a.get(null);else{a=new Map,_i.set(e,a);for(var u=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(s){console.error(s)}}return l(),er.exports=wp(),er.exports}var jp=zp();const Dp=hh(jp),Cp="modulepreload",Mp=function(l){return"/static/"+l},Lm={},et=function(s,c,r){let f=Promise.resolve();if(c&&c.length>0){let h=function(g){return Promise.all(g.map(A=>Promise.resolve(A).then(N=>({status:"fulfilled",value:N}),N=>({status:"rejected",reason:N}))))};document.getElementsByTagName("link");const p=document.querySelector("meta[property=csp-nonce]"),v=(p==null?void 0:p.nonce)||(p==null?void 0:p.getAttribute("nonce"));f=h(c.map(g=>{if(g=Mp(g),g in Lm)return;Lm[g]=!0;const A=g.endsWith(".css"),N=A?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${g}"]${N}`))return;const q=document.createElement("link");if(q.rel=A?"stylesheet":Cp,A||(q.as="script"),q.crossOrigin="",q.href=g,v&&q.setAttribute("nonce",v),document.head.appendChild(q),A)return new Promise((F,W)=>{q.addEventListener("load",F),q.addEventListener("error",()=>W(new Error(`Unable to preload CSS for ${g}`)))})}))}function m(h){const p=new Event("vite:preloadError",{cancelable:!0});if(p.payload=h,window.dispatchEvent(p),!p.defaultPrevented)throw h}return f.then(h=>{for(const p of h||[])p.status==="rejected"&&m(p.reason);return s().catch(m)})};var Up=ph();/** +`+n.stack}}var Jt=Object.prototype.hasOwnProperty,vn=l.unstable_scheduleCallback,fl=l.unstable_cancelCallback,Ja=l.unstable_shouldYield,ty=l.unstable_requestPaint,Tt=l.unstable_now,ay=l.unstable_getCurrentPriorityLevel,Rr=l.unstable_ImmediatePriority,wr=l.unstable_UserBlockingPriority,mu=l.unstable_NormalPriority,ny=l.unstable_LowPriority,zr=l.unstable_IdlePriority,ly=l.log,uy=l.unstable_setDisableYieldValue,dl=null,Ot=null;function Sa(e){if(typeof ly=="function"&&uy(e),Ot&&typeof Ot.setStrictMode=="function")try{Ot.setStrictMode(dl,e)}catch{}}var Nt=Math.clz32?Math.clz32:cy,iy=Math.log,sy=Math.LN2;function cy(e){return e>>>=0,e===0?32:31-(iy(e)/sy|0)|0}var hu=256,yu=262144,pu=4194304;function $a(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function gu(e,t,a){var n=e.pendingLanes;if(n===0)return 0;var u=0,i=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var d=n&134217727;return d!==0?(n=d&~i,n!==0?u=$a(n):(o&=d,o!==0?u=$a(o):a||(a=d&~e,a!==0&&(u=$a(a))))):(d=n&~i,d!==0?u=$a(d):o!==0?u=$a(o):a||(a=n&~e,a!==0&&(u=$a(a)))),u===0?0:t!==0&&t!==u&&(t&i)===0&&(i=u&-u,a=t&-t,i>=a||i===32&&(a&4194048)!==0)?t:u}function ml(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ry(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function jr(){var e=pu;return pu<<=1,(pu&62914560)===0&&(pu=4194304),e}function ki(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function hl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function oy(e,t,a,n,u,i){var o=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var d=e.entanglements,b=e.expirationTimes,O=e.hiddenUpdates;for(a=o&~a;0"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var py=/[\n"\\]/g;function qt(e){return e.replace(py,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Zi(e,t,a,n,u,i,o,d){e.name="",o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.type=o:e.removeAttribute("type"),t!=null?o==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Ut(t)):e.value!==""+Ut(t)&&(e.value=""+Ut(t)):o!=="submit"&&o!=="reset"||e.removeAttribute("value"),t!=null?Ki(e,o,Ut(t)):a!=null?Ki(e,o,Ut(a)):n!=null&&e.removeAttribute("value"),u==null&&i!=null&&(e.defaultChecked=!!i),u!=null&&(e.checked=u&&typeof u!="function"&&typeof u!="symbol"),d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"?e.name=""+Ut(d):e.removeAttribute("name")}function Gr(e,t,a,n,u,i,o,d){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||a!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){Qi(e);return}a=a!=null?""+Ut(a):"",t=t!=null?""+Ut(t):a,d||t===e.value||(e.value=t),e.defaultValue=t}n=n??u,n=typeof n!="function"&&typeof n!="symbol"&&!!n,e.checked=d?e.checked:!!n,e.defaultChecked=!!n,o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.name=o),Qi(e)}function Ki(e,t,a){t==="number"&&Su(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Tn(e,t,a,n){if(e=e.options,t){t={};for(var u=0;u"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Pi=!1;if(la)try{var bl={};Object.defineProperty(bl,"passive",{get:function(){Pi=!0}}),window.addEventListener("test",bl,bl),window.removeEventListener("test",bl,bl)}catch{Pi=!1}var xa=null,Ii=null,xu=null;function Wr(){if(xu)return xu;var e,t=Ii,a=t.length,n,u="value"in xa?xa.value:xa.textContent,i=u.length;for(e=0;e=_l),no=" ",lo=!1;function uo(e,t){switch(e){case"keyup":return Gy.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function io(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var wn=!1;function Zy(e,t){switch(e){case"compositionend":return io(t);case"keypress":return t.which!==32?null:(lo=!0,no);case"textInput":return e=t.data,e===no&&lo?null:e;default:return null}}function Ky(e,t){if(wn)return e==="compositionend"||!ls&&uo(e,t)?(e=Wr(),xu=Ii=xa=null,wn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:a,offset:t-e};e=n}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=yo(a)}}function go(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?go(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function bo(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Su(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=Su(e.document)}return t}function ss(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var t0=la&&"documentMode"in document&&11>=document.documentMode,zn=null,cs=null,Tl=null,rs=!1;function vo(e,t,a){var n=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;rs||zn==null||zn!==Su(n)||(n=zn,"selectionStart"in n&&ss(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Tl&&Al(Tl,n)||(Tl=n,n=yi(cs,"onSelect"),0>=o,u-=o,Pt=1<<32-Nt(t)+u|a<fe?(ge=$,$=null):ge=$.sibling;var xe=R(E,$,T[fe],C);if(xe===null){$===null&&($=ge);break}e&&$&&xe.alternate===null&&t(E,$),_=i(xe,_,fe),_e===null?P=xe:_e.sibling=xe,_e=xe,$=ge}if(fe===T.length)return a(E,$),ve&&ia(E,fe),P;if($===null){for(;fefe?(ge=$,$=null):ge=$.sibling;var Ga=R(E,$,xe.value,C);if(Ga===null){$===null&&($=ge);break}e&&$&&Ga.alternate===null&&t(E,$),_=i(Ga,_,fe),_e===null?P=Ga:_e.sibling=Ga,_e=Ga,$=ge}if(xe.done)return a(E,$),ve&&ia(E,fe),P;if($===null){for(;!xe.done;fe++,xe=T.next())xe=U(E,xe.value,C),xe!==null&&(_=i(xe,_,fe),_e===null?P=xe:_e.sibling=xe,_e=xe);return ve&&ia(E,fe),P}for($=n($);!xe.done;fe++,xe=T.next())xe=w($,E,fe,xe.value,C),xe!==null&&(e&&xe.alternate!==null&&$.delete(xe.key===null?fe:xe.key),_=i(xe,_,fe),_e===null?P=xe:_e.sibling=xe,_e=xe);return e&&$.forEach(function(_p){return t(E,_p)}),ve&&ia(E,fe),P}function je(E,_,T,C){if(typeof T=="object"&&T!==null&&T.type===X&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case F:e:{for(var P=T.key;_!==null;){if(_.key===P){if(P=T.type,P===X){if(_.tag===7){a(E,_.sibling),C=u(_,T.props.children),C.return=E,E=C;break e}}else if(_.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===Le&&sn(P)===_.type){a(E,_.sibling),C=u(_,T.props),jl(C,T),C.return=E,E=C;break e}a(E,_);break}else t(E,_);_=_.sibling}T.type===X?(C=tn(T.props.children,E.mode,C,T.key),C.return=E,E=C):(C=Du(T.type,T.key,T.props,null,E.mode,C),jl(C,T),C.return=E,E=C)}return o(E);case W:e:{for(P=T.key;_!==null;){if(_.key===P)if(_.tag===4&&_.stateNode.containerInfo===T.containerInfo&&_.stateNode.implementation===T.implementation){a(E,_.sibling),C=u(_,T.children||[]),C.return=E,E=C;break e}else{a(E,_);break}else t(E,_);_=_.sibling}C=ps(T,E.mode,C),C.return=E,E=C}return o(E);case Le:return T=sn(T),je(E,_,T,C)}if(Re(T))return J(E,_,T,C);if(ke(T)){if(P=ke(T),typeof P!="function")throw Error(r(150));return T=P.call(T),te(E,_,T,C)}if(typeof T.then=="function")return je(E,_,Lu(T),C);if(T.$$typeof===Q)return je(E,_,Uu(E,T),C);ku(E,T)}return typeof T=="string"&&T!==""||typeof T=="number"||typeof T=="bigint"?(T=""+T,_!==null&&_.tag===6?(a(E,_.sibling),C=u(_,T),C.return=E,E=C):(a(E,_),C=ys(T,E.mode,C),C.return=E,E=C),o(E)):a(E,_)}return function(E,_,T,C){try{zl=0;var P=je(E,_,T,C);return Yn=null,P}catch($){if($===kn||$===Bu)throw $;var _e=wt(29,$,null,E.mode);return _e.lanes=C,_e.return=E,_e}finally{}}}var rn=Vo(!0),Xo=Vo(!1),Na=!1;function Rs(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ws(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ra(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function wa(e,t,a){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(Ae&2)!==0){var u=n.pending;return u===null?t.next=t:(t.next=u.next,u.next=t),n.pending=t,t=ju(e),Oo(e,null,a),t}return zu(e,n,t,a),ju(e)}function Dl(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,Mr(e,a)}}function zs(e,t){var a=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,a===n)){var u=null,i=null;if(a=a.firstBaseUpdate,a!==null){do{var o={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};i===null?u=i=o:i=i.next=o,a=a.next}while(a!==null);i===null?u=i=t:i=i.next=t}else u=i=t;a={baseState:n.baseState,firstBaseUpdate:u,lastBaseUpdate:i,shared:n.shared,callbacks:n.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var js=!1;function Ml(){if(js){var e=Ln;if(e!==null)throw e}}function Cl(e,t,a,n){js=!1;var u=e.updateQueue;Na=!1;var i=u.firstBaseUpdate,o=u.lastBaseUpdate,d=u.shared.pending;if(d!==null){u.shared.pending=null;var b=d,O=b.next;b.next=null,o===null?i=O:o.next=O,o=b;var D=e.alternate;D!==null&&(D=D.updateQueue,d=D.lastBaseUpdate,d!==o&&(d===null?D.firstBaseUpdate=O:d.next=O,D.lastBaseUpdate=b))}if(i!==null){var U=u.baseState;o=0,D=O=b=null,d=i;do{var R=d.lane&-536870913,w=R!==d.lane;if(w?(pe&R)===R:(n&R)===R){R!==0&&R===Hn&&(js=!0),D!==null&&(D=D.next={lane:0,tag:d.tag,payload:d.payload,callback:null,next:null});e:{var J=e,te=d;R=t;var je=a;switch(te.tag){case 1:if(J=te.payload,typeof J=="function"){U=J.call(je,U,R);break e}U=J;break e;case 3:J.flags=J.flags&-65537|128;case 0:if(J=te.payload,R=typeof J=="function"?J.call(je,U,R):J,R==null)break e;U=N({},U,R);break e;case 2:Na=!0}}R=d.callback,R!==null&&(e.flags|=64,w&&(e.flags|=8192),w=u.callbacks,w===null?u.callbacks=[R]:w.push(R))}else w={lane:R,tag:d.tag,payload:d.payload,callback:d.callback,next:null},D===null?(O=D=w,b=U):D=D.next=w,o|=R;if(d=d.next,d===null){if(d=u.shared.pending,d===null)break;w=d,d=w.next,w.next=null,u.lastBaseUpdate=w,u.shared.pending=null}}while(!0);D===null&&(b=U),u.baseState=b,u.firstBaseUpdate=O,u.lastBaseUpdate=D,i===null&&(u.shared.lanes=0),Ca|=o,e.lanes=o,e.memoizedState=U}}function Go(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function Qo(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;ei?i:8;var o=z.T,d={};z.T=d,Fs(e,!1,t,a);try{var b=u(),O=z.S;if(O!==null&&O(d,b),b!==null&&typeof b=="object"&&typeof b.then=="function"){var D=o0(b,n);Bl(e,t,D,Ct(e))}else Bl(e,t,n,Ct(e))}catch(U){Bl(e,t,{then:function(){},status:"rejected",reason:U},Ct())}finally{L.p=i,o!==null&&d.types!==null&&(o.types=d.types),z.T=o}}function p0(){}function Js(e,t,a,n){if(e.tag!==5)throw Error(r(476));var u=Af(e).queue;Ef(e,u,t,I,a===null?p0:function(){return Tf(e),a(n)})}function Af(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:I,baseState:I,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:oa,lastRenderedState:I},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:oa,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Tf(e){var t=Af(e);t.next===null&&(t=e.alternate.memoizedState),Bl(e,t.next.queue,{},Ct())}function $s(){return lt(eu)}function Of(){return Ge().memoizedState}function Nf(){return Ge().memoizedState}function g0(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Ct();e=Ra(a);var n=wa(t,e,a);n!==null&&(St(n,t,a),Dl(n,t,a)),t={cache:As()},e.payload=t;return}t=t.return}}function b0(e,t,a){var n=Ct();a={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Fu(e)?wf(t,a):(a=ms(e,t,a,n),a!==null&&(St(a,e,n),zf(a,t,n)))}function Rf(e,t,a){var n=Ct();Bl(e,t,a,n)}function Bl(e,t,a,n){var u={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Fu(e))wf(t,u);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,d=i(o,a);if(u.hasEagerState=!0,u.eagerState=d,Rt(d,o))return zu(e,t,u,0),Me===null&&wu(),!1}catch{}finally{}if(a=ms(e,t,u,n),a!==null)return St(a,e,n),zf(a,t,n),!0}return!1}function Fs(e,t,a,n){if(n={lane:2,revertLane:Rc(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Fu(e)){if(t)throw Error(r(479))}else t=ms(e,a,n,2),t!==null&&St(t,e,2)}function Fu(e){var t=e.alternate;return e===oe||t!==null&&t===oe}function wf(e,t){Xn=Xu=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function zf(e,t,a){if((a&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,Mr(e,a)}}var Hl={readContext:lt,use:Zu,useCallback:Ye,useContext:Ye,useEffect:Ye,useImperativeHandle:Ye,useLayoutEffect:Ye,useInsertionEffect:Ye,useMemo:Ye,useReducer:Ye,useRef:Ye,useState:Ye,useDebugValue:Ye,useDeferredValue:Ye,useTransition:Ye,useSyncExternalStore:Ye,useId:Ye,useHostTransitionStatus:Ye,useFormState:Ye,useActionState:Ye,useOptimistic:Ye,useMemoCache:Ye,useCacheRefresh:Ye};Hl.useEffectEvent=Ye;var jf={readContext:lt,use:Zu,useCallback:function(e,t){return mt().memoizedState=[e,t===void 0?null:t],e},useContext:lt,useEffect:hf,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,Ju(4194308,4,bf.bind(null,t,e),a)},useLayoutEffect:function(e,t){return Ju(4194308,4,e,t)},useInsertionEffect:function(e,t){Ju(4,2,e,t)},useMemo:function(e,t){var a=mt();t=t===void 0?null:t;var n=e();if(on){Sa(!0);try{e()}finally{Sa(!1)}}return a.memoizedState=[n,t],n},useReducer:function(e,t,a){var n=mt();if(a!==void 0){var u=a(t);if(on){Sa(!0);try{a(t)}finally{Sa(!1)}}}else u=t;return n.memoizedState=n.baseState=u,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:u},n.queue=e,e=e.dispatch=b0.bind(null,oe,e),[n.memoizedState,e]},useRef:function(e){var t=mt();return e={current:e},t.memoizedState=e},useState:function(e){e=Xs(e);var t=e.queue,a=Rf.bind(null,oe,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:Zs,useDeferredValue:function(e,t){var a=mt();return Ks(a,e,t)},useTransition:function(){var e=Xs(!1);return e=Ef.bind(null,oe,e.queue,!0,!1),mt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var n=oe,u=mt();if(ve){if(a===void 0)throw Error(r(407));a=a()}else{if(a=t(),Me===null)throw Error(r(349));(pe&127)!==0||Wo(n,t,a)}u.memoizedState=a;var i={value:a,getSnapshot:t};return u.queue=i,hf(Io.bind(null,n,i,e),[e]),n.flags|=2048,Qn(9,{destroy:void 0},Po.bind(null,n,i,a,t),null),a},useId:function(){var e=mt(),t=Me.identifierPrefix;if(ve){var a=It,n=Pt;a=(n&~(1<<32-Nt(n)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Gu++,0<\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof n.is=="string"?o.createElement("select",{is:n.is}):o.createElement("select"),n.multiple?i.multiple=!0:n.size&&(i.size=n.size);break;default:i=typeof n.is=="string"?o.createElement(u,{is:n.is}):o.createElement(u)}}i[at]=t,i[ht]=n;e:for(o=t.child;o!==null;){if(o.tag===5||o.tag===6)i.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===t)break e;for(;o.sibling===null;){if(o.return===null||o.return===t)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}t.stateNode=i;e:switch(it(i,u,n),u){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}n&&da(t)}}return qe(t),oc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&da(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(r(166));if(e=Z.current,qn(t)){if(e=t.stateNode,a=t.memoizedProps,n=null,u=nt,u!==null)switch(u.tag){case 27:case 5:n=u.memoizedProps}e[at]=t,e=!!(e.nodeValue===a||n!==null&&n.suppressHydrationWarning===!0||Fd(e.nodeValue,a)),e||Ta(t,!0)}else e=pi(e).createTextNode(n),e[at]=t,t.stateNode=e}return qe(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(n=qn(t),a!==null){if(e===null){if(!n)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[at]=t}else an(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;qe(t),e=!1}else a=Ss(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(jt(t),t):(jt(t),null);if((t.flags&128)!==0)throw Error(r(558))}return qe(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=qn(t),n!==null&&n.dehydrated!==null){if(e===null){if(!u)throw Error(r(318));if(u=t.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(r(317));u[at]=t}else an(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;qe(t),u=!1}else u=Ss(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),u=!0;if(!u)return t.flags&256?(jt(t),t):(jt(t),null)}return jt(t),(t.flags&128)!==0?(t.lanes=a,t):(a=n!==null,e=e!==null&&e.memoizedState!==null,a&&(n=t.child,u=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(u=n.alternate.memoizedState.cachePool.pool),i=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(i=n.memoizedState.cachePool.pool),i!==u&&(n.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),ti(t,t.updateQueue),qe(t),null);case 4:return Te(),e===null&&Dc(t.stateNode.containerInfo),qe(t),null;case 10:return ca(t.type),qe(t),null;case 19:if(j(Xe),n=t.memoizedState,n===null)return qe(t),null;if(u=(t.flags&128)!==0,i=n.rendering,i===null)if(u)kl(n,!1);else{if(Ve!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=Vu(e),i!==null){for(t.flags|=128,kl(n,!1),e=i.updateQueue,t.updateQueue=e,ti(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)No(a,e),a=a.sibling;return H(Xe,Xe.current&1|2),ve&&ia(t,n.treeForkCount),t.child}e=e.sibling}n.tail!==null&&Tt()>ii&&(t.flags|=128,u=!0,kl(n,!1),t.lanes=4194304)}else{if(!u)if(e=Vu(i),e!==null){if(t.flags|=128,u=!0,e=e.updateQueue,t.updateQueue=e,ti(t,e),kl(n,!0),n.tail===null&&n.tailMode==="hidden"&&!i.alternate&&!ve)return qe(t),null}else 2*Tt()-n.renderingStartTime>ii&&a!==536870912&&(t.flags|=128,u=!0,kl(n,!1),t.lanes=4194304);n.isBackwards?(i.sibling=t.child,t.child=i):(e=n.last,e!==null?e.sibling=i:t.child=i,n.last=i)}return n.tail!==null?(e=n.tail,n.rendering=e,n.tail=e.sibling,n.renderingStartTime=Tt(),e.sibling=null,a=Xe.current,H(Xe,u?a&1|2:a&1),ve&&ia(t,n.treeForkCount),e):(qe(t),null);case 22:case 23:return jt(t),Ms(),n=t.memoizedState!==null,e!==null?e.memoizedState!==null!==n&&(t.flags|=8192):n&&(t.flags|=8192),n?(a&536870912)!==0&&(t.flags&128)===0&&(qe(t),t.subtreeFlags&6&&(t.flags|=8192)):qe(t),a=t.updateQueue,a!==null&&ti(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),n=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),n!==a&&(t.flags|=2048),e!==null&&j(un),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),ca(Ze),qe(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function E0(e,t){switch(bs(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ca(Ze),Te(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ka(t),null;case 31:if(t.memoizedState!==null){if(jt(t),t.alternate===null)throw Error(r(340));an()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(jt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));an()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return j(Xe),null;case 4:return Te(),null;case 10:return ca(t.type),null;case 22:case 23:return jt(t),Ms(),e!==null&&j(un),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ca(Ze),null;case 25:return null;default:return null}}function td(e,t){switch(bs(t),t.tag){case 3:ca(Ze),Te();break;case 26:case 27:case 5:Ka(t);break;case 4:Te();break;case 31:t.memoizedState!==null&&jt(t);break;case 13:jt(t);break;case 19:j(Xe);break;case 10:ca(t.type);break;case 22:case 23:jt(t),Ms(),e!==null&&j(un);break;case 24:ca(Ze)}}function Yl(e,t){try{var a=t.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var u=n.next;a=u;do{if((a.tag&e)===e){n=void 0;var i=a.create,o=a.inst;n=i(),o.destroy=n}a=a.next}while(a!==u)}}catch(d){Ne(t,t.return,d)}}function Da(e,t,a){try{var n=t.updateQueue,u=n!==null?n.lastEffect:null;if(u!==null){var i=u.next;n=i;do{if((n.tag&e)===e){var o=n.inst,d=o.destroy;if(d!==void 0){o.destroy=void 0,u=t;var b=a,O=d;try{O()}catch(D){Ne(u,b,D)}}}n=n.next}while(n!==i)}}catch(D){Ne(t,t.return,D)}}function ad(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{Qo(t,a)}catch(n){Ne(e,e.return,n)}}}function nd(e,t,a){a.props=fn(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(n){Ne(e,t,n)}}function Vl(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var n=e.stateNode;break;case 30:n=e.stateNode;break;default:n=e.stateNode}typeof a=="function"?e.refCleanup=a(n):a.current=n}}catch(u){Ne(e,t,u)}}function ea(e,t){var a=e.ref,n=e.refCleanup;if(a!==null)if(typeof n=="function")try{n()}catch(u){Ne(e,t,u)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(u){Ne(e,t,u)}else a.current=null}function ld(e){var t=e.type,a=e.memoizedProps,n=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break e;case"img":a.src?n.src=a.src:a.srcSet&&(n.srcset=a.srcSet)}}catch(u){Ne(e,e.return,u)}}function fc(e,t,a){try{var n=e.stateNode;Q0(n,e.type,a,t),n[ht]=t}catch(u){Ne(e,e.return,u)}}function ud(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&La(e.type)||e.tag===4}function dc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ud(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&La(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function mc(e,t,a){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=na));else if(n!==4&&(n===27&&La(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(mc(e,t,a),e=e.sibling;e!==null;)mc(e,t,a),e=e.sibling}function ai(e,t,a){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(n!==4&&(n===27&&La(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(ai(e,t,a),e=e.sibling;e!==null;)ai(e,t,a),e=e.sibling}function id(e){var t=e.stateNode,a=e.memoizedProps;try{for(var n=e.type,u=t.attributes;u.length;)t.removeAttributeNode(u[0]);it(t,n,a),t[at]=e,t[ht]=a}catch(i){Ne(e,e.return,i)}}var ma=!1,$e=!1,hc=!1,sd=typeof WeakSet=="function"?WeakSet:Set,et=null;function A0(e,t){if(e=e.containerInfo,Uc=Ei,e=bo(e),ss(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var n=a.getSelection&&a.getSelection();if(n&&n.rangeCount!==0){a=n.anchorNode;var u=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{a.nodeType,i.nodeType}catch{a=null;break e}var o=0,d=-1,b=-1,O=0,D=0,U=e,R=null;t:for(;;){for(var w;U!==a||u!==0&&U.nodeType!==3||(d=o+u),U!==i||n!==0&&U.nodeType!==3||(b=o+n),U.nodeType===3&&(o+=U.nodeValue.length),(w=U.firstChild)!==null;)R=U,U=w;for(;;){if(U===e)break t;if(R===a&&++O===u&&(d=o),R===i&&++D===n&&(b=o),(w=U.nextSibling)!==null)break;U=R,R=U.parentNode}U=w}a=d===-1||b===-1?null:{start:d,end:b}}else a=null}a=a||{start:0,end:0}}else a=null;for(qc={focusedElem:e,selectionRange:a},Ei=!1,et=t;et!==null;)if(t=et,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,et=e;else for(;et!==null;){switch(t=et,i=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a title"))),it(i,n,a),i[at]=e,Ie(i),n=i;break e;case"link":var o=mm("link","href",u).get(n+(a.href||""));if(o){for(var d=0;dje&&(o=je,je=te,te=o);var E=po(d,te),_=po(d,je);if(E&&_&&(w.rangeCount!==1||w.anchorNode!==E.node||w.anchorOffset!==E.offset||w.focusNode!==_.node||w.focusOffset!==_.offset)){var T=U.createRange();T.setStart(E.node,E.offset),w.removeAllRanges(),te>je?(w.addRange(T),w.extend(_.node,_.offset)):(T.setEnd(_.node,_.offset),w.addRange(T))}}}}for(U=[],w=d;w=w.parentNode;)w.nodeType===1&&U.push({element:w,left:w.scrollLeft,top:w.scrollTop});for(typeof d.focus=="function"&&d.focus(),d=0;da?32:a,z.T=null,a=_c,_c=null;var i=qa,o=ba;if(Fe=0,Fn=qa=null,ba=0,(Ae&6)!==0)throw Error(r(331));var d=Ae;if(Ae|=4,bd(i.current),yd(i,i.current,o,a),Ae=d,Jl(0,!1),Ot&&typeof Ot.onPostCommitFiberRoot=="function")try{Ot.onPostCommitFiberRoot(dl,i)}catch{}return!0}finally{L.p=u,z.T=n,qd(e,t)}}function Hd(e,t,a){t=Ht(a,t),t=ec(e.stateNode,t,2),e=wa(e,t,2),e!==null&&(hl(e,2),ta(e))}function Ne(e,t,a){if(e.tag===3)Hd(e,e,a);else for(;t!==null;){if(t.tag===3){Hd(t,e,a);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Ua===null||!Ua.has(n))){e=Ht(a,e),a=Lf(2),n=wa(t,a,2),n!==null&&(kf(a,n,t,e),hl(n,2),ta(n));break}}t=t.return}}function Tc(e,t,a){var n=e.pingCache;if(n===null){n=e.pingCache=new N0;var u=new Set;n.set(t,u)}else u=n.get(t),u===void 0&&(u=new Set,n.set(t,u));u.has(a)||(gc=!0,u.add(a),e=D0.bind(null,e,t,a),t.then(e,e))}function D0(e,t,a){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Me===e&&(pe&a)===a&&(Ve===4||Ve===3&&(pe&62914560)===pe&&300>Tt()-ui?(Ae&2)===0&&Wn(e,0):bc|=a,$n===pe&&($n=0)),ta(e)}function Ld(e,t){t===0&&(t=jr()),e=en(e,t),e!==null&&(hl(e,t),ta(e))}function M0(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),Ld(e,a)}function C0(e,t){var a=0;switch(e.tag){case 31:case 13:var n=e.stateNode,u=e.memoizedState;u!==null&&(a=u.retryLane);break;case 19:n=e.stateNode;break;case 22:n=e.stateNode._retryCache;break;default:throw Error(r(314))}n!==null&&n.delete(t),Ld(e,a)}function U0(e,t){return vn(e,t)}var di=null,In=null,Oc=!1,mi=!1,Nc=!1,Ha=0;function ta(e){e!==In&&e.next===null&&(In===null?di=In=e:In=In.next=e),mi=!0,Oc||(Oc=!0,B0())}function Jl(e,t){if(!Nc&&mi){Nc=!0;do for(var a=!1,n=di;n!==null;){if(e!==0){var u=n.pendingLanes;if(u===0)var i=0;else{var o=n.suspendedLanes,d=n.pingedLanes;i=(1<<31-Nt(42|e)+1)-1,i&=u&~(o&~d),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(a=!0,Xd(n,i))}else i=pe,i=gu(n,n===Me?i:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(i&3)===0||ml(n,i)||(a=!0,Xd(n,i));n=n.next}while(a);Nc=!1}}function q0(){kd()}function kd(){mi=Oc=!1;var e=0;Ha!==0&&K0()&&(e=Ha);for(var t=Tt(),a=null,n=di;n!==null;){var u=n.next,i=Yd(n,t);i===0?(n.next=null,a===null?di=u:a.next=u,u===null&&(In=a)):(a=n,(e!==0||(i&3)!==0)&&(mi=!0)),n=u}Fe!==0&&Fe!==5||Jl(e),Ha!==0&&(Ha=0)}function Yd(e,t){for(var a=e.suspendedLanes,n=e.pingedLanes,u=e.expirationTimes,i=e.pendingLanes&-62914561;0d)break;var D=b.transferSize,U=b.initiatorType;D&&Wd(U)&&(b=b.responseEnd,o+=D*(b"u"?null:document;function rm(e,t,a){var n=el;if(n&&typeof t=="string"&&t){var u=qt(t);u='link[rel="'+e+'"][href="'+u+'"]',typeof a=="string"&&(u+='[crossorigin="'+a+'"]'),cm.has(u)||(cm.add(u),e={rel:e,crossOrigin:a,href:t},n.querySelector(u)===null&&(t=n.createElement("link"),it(t,"link",e),Ie(t),n.head.appendChild(t)))}}function ap(e){va.D(e),rm("dns-prefetch",e,null)}function np(e,t){va.C(e,t),rm("preconnect",e,t)}function lp(e,t,a){va.L(e,t,a);var n=el;if(n&&e&&t){var u='link[rel="preload"][as="'+qt(t)+'"]';t==="image"&&a&&a.imageSrcSet?(u+='[imagesrcset="'+qt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(u+='[imagesizes="'+qt(a.imageSizes)+'"]')):u+='[href="'+qt(e)+'"]';var i=u;switch(t){case"style":i=tl(e);break;case"script":i=al(e)}Gt.has(i)||(e=N({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Gt.set(i,e),n.querySelector(u)!==null||t==="style"&&n.querySelector(Pl(i))||t==="script"&&n.querySelector(Il(i))||(t=n.createElement("link"),it(t,"link",e),Ie(t),n.head.appendChild(t)))}}function up(e,t){va.m(e,t);var a=el;if(a&&e){var n=t&&typeof t.as=="string"?t.as:"script",u='link[rel="modulepreload"][as="'+qt(n)+'"][href="'+qt(e)+'"]',i=u;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=al(e)}if(!Gt.has(i)&&(e=N({rel:"modulepreload",href:e},t),Gt.set(i,e),a.querySelector(u)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Il(i)))return}n=a.createElement("link"),it(n,"link",e),Ie(n),a.head.appendChild(n)}}}function ip(e,t,a){va.S(e,t,a);var n=el;if(n&&e){var u=En(n).hoistableStyles,i=tl(e);t=t||"default";var o=u.get(i);if(!o){var d={loading:0,preload:null};if(o=n.querySelector(Pl(i)))d.loading=5;else{e=N({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Gt.get(i))&&Xc(e,a);var b=o=n.createElement("link");Ie(b),it(b,"link",e),b._p=new Promise(function(O,D){b.onload=O,b.onerror=D}),b.addEventListener("load",function(){d.loading|=1}),b.addEventListener("error",function(){d.loading|=2}),d.loading|=4,bi(o,t,n)}o={type:"stylesheet",instance:o,count:1,state:d},u.set(i,o)}}}function sp(e,t){va.X(e,t);var a=el;if(a&&e){var n=En(a).hoistableScripts,u=al(e),i=n.get(u);i||(i=a.querySelector(Il(u)),i||(e=N({src:e,async:!0},t),(t=Gt.get(u))&&Gc(e,t),i=a.createElement("script"),Ie(i),it(i,"link",e),a.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},n.set(u,i))}}function cp(e,t){va.M(e,t);var a=el;if(a&&e){var n=En(a).hoistableScripts,u=al(e),i=n.get(u);i||(i=a.querySelector(Il(u)),i||(e=N({src:e,async:!0,type:"module"},t),(t=Gt.get(u))&&Gc(e,t),i=a.createElement("script"),Ie(i),it(i,"link",e),a.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},n.set(u,i))}}function om(e,t,a,n){var u=(u=Z.current)?gi(u):null;if(!u)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=tl(a.href),a=En(u).hoistableStyles,n=a.get(t),n||(n={type:"style",instance:null,count:0,state:null},a.set(t,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=tl(a.href);var i=En(u).hoistableStyles,o=i.get(e);if(o||(u=u.ownerDocument||u,o={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,o),(i=u.querySelector(Pl(e)))&&!i._p&&(o.instance=i,o.state.loading=5),Gt.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Gt.set(e,a),i||rp(u,e,a,o.state))),t&&n===null)throw Error(r(528,""));return o}if(t&&n!==null)throw Error(r(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=al(a),a=En(u).hoistableScripts,n=a.get(t),n||(n={type:"script",instance:null,count:0,state:null},a.set(t,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function tl(e){return'href="'+qt(e)+'"'}function Pl(e){return'link[rel="stylesheet"]['+e+"]"}function fm(e){return N({},e,{"data-precedence":e.precedence,precedence:null})}function rp(e,t,a,n){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?n.loading=1:(t=e.createElement("link"),n.preload=t,t.addEventListener("load",function(){return n.loading|=1}),t.addEventListener("error",function(){return n.loading|=2}),it(t,"link",a),Ie(t),e.head.appendChild(t))}function al(e){return'[src="'+qt(e)+'"]'}function Il(e){return"script[async]"+e}function dm(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+qt(a.href)+'"]');if(n)return t.instance=n,Ie(n),n;var u=N({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),Ie(n),it(n,"style",u),bi(n,a.precedence,e),t.instance=n;case"stylesheet":u=tl(a.href);var i=e.querySelector(Pl(u));if(i)return t.state.loading|=4,t.instance=i,Ie(i),i;n=fm(a),(u=Gt.get(u))&&Xc(n,u),i=(e.ownerDocument||e).createElement("link"),Ie(i);var o=i;return o._p=new Promise(function(d,b){o.onload=d,o.onerror=b}),it(i,"link",n),t.state.loading|=4,bi(i,a.precedence,e),t.instance=i;case"script":return i=al(a.src),(u=e.querySelector(Il(i)))?(t.instance=u,Ie(u),u):(n=a,(u=Gt.get(i))&&(n=N({},a),Gc(n,u)),e=e.ownerDocument||e,u=e.createElement("script"),Ie(u),it(u,"link",n),e.head.appendChild(u),t.instance=u);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(n=t.instance,t.state.loading|=4,bi(n,a.precedence,e));return t.instance}function bi(e,t,a){for(var n=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=n.length?n[n.length-1]:null,i=u,o=0;o title"):null)}function op(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function ym(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function fp(e,t,a,n){if(a.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var u=tl(n.href),i=t.querySelector(Pl(u));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Si.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=i,Ie(i);return}i=t.ownerDocument||t,n=fm(n),(u=Gt.get(u))&&Xc(n,u),i=i.createElement("link"),Ie(i);var o=i;o._p=new Promise(function(d,b){o.onload=d,o.onerror=b}),it(i,"link",n),a.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Si.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var Qc=0;function dp(e,t){return e.stylesheets&&e.count===0&&xi(e,e.stylesheets),0Qc?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(u)}}:null}function Si(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)xi(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var _i=null;function xi(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,_i=new Map,t.forEach(mp,e),_i=null,Si.call(e))}function mp(e,t){if(!(t.state.loading&4)){var a=_i.get(e);if(a)var n=a.get(null);else{a=new Map,_i.set(e,a);for(var u=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(s){console.error(s)}}return l(),er.exports=wp(),er.exports}var jp=zp();const Dp=hh(jp),Mp="modulepreload",Cp=function(l){return"/static/"+l},Lm={},Pe=function(s,c,r){let f=Promise.resolve();if(c&&c.length>0){let y=function(g){return Promise.all(g.map(A=>Promise.resolve(A).then(N=>({status:"fulfilled",value:N}),N=>({status:"rejected",reason:N}))))};document.getElementsByTagName("link");const p=document.querySelector("meta[property=csp-nonce]"),v=(p==null?void 0:p.nonce)||(p==null?void 0:p.getAttribute("nonce"));f=y(c.map(g=>{if(g=Cp(g),g in Lm)return;Lm[g]=!0;const A=g.endsWith(".css"),N=A?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${g}"]${N}`))return;const B=document.createElement("link");if(B.rel=A?"stylesheet":Mp,A||(B.as="script"),B.crossOrigin="",B.href=g,v&&B.setAttribute("nonce",v),document.head.appendChild(B),A)return new Promise((F,W)=>{B.addEventListener("load",F),B.addEventListener("error",()=>W(new Error(`Unable to preload CSS for ${g}`)))})}))}function m(y){const p=new Event("vite:preloadError",{cancelable:!0});if(p.payload=y,window.dispatchEvent(p),!p.defaultPrevented)throw y}return f.then(y=>{for(const p of y||[])p.status==="rejected"&&m(p.reason);return s().catch(m)})};var Up=ph();/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. @@ -62,12 +62,12 @@ Error generating stack: `+n.message+` * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const kp=B.forwardRef(({color:l="currentColor",size:s=24,strokeWidth:c=2,absoluteStrokeWidth:r,className:f="",children:m,iconNode:h,...p},v)=>B.createElement("svg",{ref:v,...Lp,width:s,height:s,stroke:l,strokeWidth:r?Number(c)*24/Number(s):c,className:gh("lucide",f),...!m&&!Hp(p)&&{"aria-hidden":"true"},...p},[...h.map(([g,A])=>B.createElement(g,A)),...Array.isArray(m)?m:[m]]));/** + */const kp=q.forwardRef(({color:l="currentColor",size:s=24,strokeWidth:c=2,absoluteStrokeWidth:r,className:f="",children:m,iconNode:y,...p},v)=>q.createElement("svg",{ref:v,...Lp,width:s,height:s,stroke:l,strokeWidth:r?Number(c)*24/Number(s):c,className:gh("lucide",f),...!m&&!Hp(p)&&{"aria-hidden":"true"},...p},[...y.map(([g,A])=>q.createElement(g,A)),...Array.isArray(m)?m:[m]]));/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const de=(l,s)=>{const c=B.forwardRef(({className:r,...f},m)=>B.createElement(kp,{ref:m,iconNode:s,className:gh(`lucide-${qp(km(l))}`,`lucide-${l}`,r),...f}));return c.displayName=km(l),c};/** + */const de=(l,s)=>{const c=q.forwardRef(({className:r,...f},m)=>q.createElement(kp,{ref:m,iconNode:s,className:gh(`lucide-${qp(km(l))}`,`lucide-${l}`,r),...f}));return c.displayName=km(l),c};/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. @@ -97,182 +97,187 @@ Error generating stack: `+n.message+` * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Fp=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Wp=de("chevron-up",Fp);/** + */const Fp=[["path",{d:"M10 12h4",key:"a56b0p"}],["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",key:"secmi2"}],["path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",key:"16ra0t"}]],Wp=de("building-2",Fp);/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Ip=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Pp=de("circle-alert",Ip);/** + */const Pp=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Ip=de("chevron-up",Pp);/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const e1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],or=de("circle-check",e1);/** + */const e1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],t1=de("circle-alert",e1);/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const t1=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],a1=de("credit-card",t1);/** + */const a1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],or=de("circle-check",a1);/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const n1=[["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"}]],l1=de("download",n1);/** + */const n1=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],l1=de("credit-card",n1);/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const u1=[["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"}]],i1=de("external-link",u1);/** + */const u1=[["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"}]],i1=de("download",u1);/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const s1=[["path",{d:"M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4",key:"1slcih"}]],c1=de("flame",s1);/** + */const s1=[["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"}]],c1=de("external-link",s1);/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const r1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],bh=de("info",r1);/** + */const r1=[["path",{d:"M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4",key:"1slcih"}]],o1=de("flame",r1);/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const o1=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],vh=de("key-round",o1);/** + */const f1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],bh=de("info",f1);/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const f1=[["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"}]],d1=de("layout-dashboard",f1);/** + */const d1=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],vh=de("key-round",d1);/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const m1=[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]],h1=de("list-filter",m1);/** + */const m1=[["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"}]],h1=de("layout-dashboard",m1);/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const y1=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],su=de("loader-circle",y1);/** + */const y1=[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]],p1=de("list-filter",y1);/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const p1=[["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"}]],Vm=de("lock",p1);/** + */const g1=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],su=de("loader-circle",g1);/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const g1=[["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"}]],b1=de("log-out",g1);/** + */const b1=[["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"}]],Vm=de("lock",b1);/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const v1=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],S1=de("mail",v1);/** + */const v1=[["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"}]],S1=de("log-out",v1);/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const _1=[["path",{d:"M11 6a13 13 0 0 0 8.4-2.8A1 1 0 0 1 21 4v12a1 1 0 0 1-1.6.8A13 13 0 0 0 11 14H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2z",key:"q8bfy3"}],["path",{d:"M6 14a12 12 0 0 0 2.4 7.2 2 2 0 0 0 3.2-2.4A8 8 0 0 1 10 14",key:"1853fq"}],["path",{d:"M8 6v8",key:"15ugcq"}]],x1=de("megaphone",_1);/** + */const _1=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],x1=de("mail",_1);/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const E1=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],A1=de("menu",E1);/** + */const E1=[["path",{d:"M11 6a13 13 0 0 0 8.4-2.8A1 1 0 0 1 21 4v12a1 1 0 0 1-1.6.8A13 13 0 0 0 11 14H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2z",key:"q8bfy3"}],["path",{d:"M6 14a12 12 0 0 0 2.4 7.2 2 2 0 0 0 3.2-2.4A8 8 0 0 1 10 14",key:"1853fq"}],["path",{d:"M8 6v8",key:"15ugcq"}]],A1=de("megaphone",E1);/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const T1=[["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"}]],O1=de("message-square",T1);/** + */const T1=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],O1=de("menu",T1);/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const N1=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],R1=de("monitor",N1);/** + */const N1=[["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"}]],R1=de("message-square",N1);/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const w1=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],z1=de("moon",w1);/** + */const w1=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],z1=de("monitor",w1);/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const j1=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],D1=de("refresh-cw",j1);/** + */const j1=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],D1=de("moon",j1);/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const C1=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],M1=de("settings",C1);/** + */const M1=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],C1=de("refresh-cw",M1);/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const U1=[["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"}]],Xm=de("shield-check",U1);/** + */const U1=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],q1=de("settings",U1);/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const q1=[["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}],["path",{d:"M3.103 6.034h17.794",key:"awc11p"}],["path",{d:"M3.4 5.467a2 2 0 0 0-.4 1.2V20a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6.667a2 2 0 0 0-.4-1.2l-2-2.667A2 2 0 0 0 17 2H7a2 2 0 0 0-1.6.8z",key:"o988cm"}]],B1=de("shopping-bag",q1);/** + */const B1=[["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"}]],Xm=de("shield-check",B1);/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const H1=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],L1=de("star",H1);/** + */const H1=[["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}],["path",{d:"M3.103 6.034h17.794",key:"awc11p"}],["path",{d:"M3.4 5.467a2 2 0 0 0-.4 1.2V20a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6.667a2 2 0 0 0-.4-1.2l-2-2.667A2 2 0 0 0 17 2H7a2 2 0 0 0-1.6.8z",key:"o988cm"}]],L1=de("shopping-bag",H1);/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const k1=[["path",{d:"M15 21v-5a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v5",key:"slp6dd"}],["path",{d:"M17.774 10.31a1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.451 0 1.12 1.12 0 0 0-1.548 0 2.5 2.5 0 0 1-3.452 0 1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.77-3.248l2.889-4.184A2 2 0 0 1 7 2h10a2 2 0 0 1 1.653.873l2.895 4.192a2.5 2.5 0 0 1-3.774 3.244",key:"o0xfot"}],["path",{d:"M4 10.95V19a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8.05",key:"wn3emo"}]],Y1=de("store",k1);/** + */const k1=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],Y1=de("star",k1);/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const V1=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],X1=de("sun",V1);/** + */const V1=[["path",{d:"M15 21v-5a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v5",key:"slp6dd"}],["path",{d:"M17.774 10.31a1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.451 0 1.12 1.12 0 0 0-1.548 0 2.5 2.5 0 0 1-3.452 0 1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.77-3.248l2.889-4.184A2 2 0 0 1 7 2h10a2 2 0 0 1 1.653.873l2.895 4.192a2.5 2.5 0 0 1-3.774 3.244",key:"o0xfot"}],["path",{d:"M4 10.95V19a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8.05",key:"wn3emo"}]],X1=de("store",V1);/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const G1=[["path",{d:"M16 17h6v-6",key:"t6n2it"}],["path",{d:"m22 17-8.5-8.5-5 5L2 7",key:"x473p"}]],Q1=de("trending-down",G1);/** + */const G1=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],Q1=de("sun",G1);/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Z1=[["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"}]],Sh=de("triangle-alert",Z1);/** + */const Z1=[["path",{d:"M16 17h6v-6",key:"t6n2it"}],["path",{d:"m22 17-8.5-8.5-5 5L2 7",key:"x473p"}]],K1=de("trending-down",Z1);/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const K1=[["path",{d:"M10 15H6a4 4 0 0 0-4 4v2",key:"1nfge6"}],["path",{d:"m14.305 16.53.923-.382",key:"1itpsq"}],["path",{d:"m15.228 13.852-.923-.383",key:"eplpkm"}],["path",{d:"m16.852 12.228-.383-.923",key:"13v3q0"}],["path",{d:"m16.852 17.772-.383.924",key:"1i8mnm"}],["path",{d:"m19.148 12.228.383-.923",key:"1q8j1v"}],["path",{d:"m19.53 18.696-.382-.924",key:"vk1qj3"}],["path",{d:"m20.772 13.852.924-.383",key:"n880s0"}],["path",{d:"m20.772 16.148.924.383",key:"1g6xey"}],["circle",{cx:"18",cy:"15",r:"3",key:"gjjjvw"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],J1=de("user-cog",K1);/** + */const J1=[["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"}]],Sh=de("triangle-alert",J1);/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const $1=[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]],F1=de("user-round",$1);/** + */const $1=[["path",{d:"M10 15H6a4 4 0 0 0-4 4v2",key:"1nfge6"}],["path",{d:"m14.305 16.53.923-.382",key:"1itpsq"}],["path",{d:"m15.228 13.852-.923-.383",key:"eplpkm"}],["path",{d:"m16.852 12.228-.383-.923",key:"13v3q0"}],["path",{d:"m16.852 17.772-.383.924",key:"1i8mnm"}],["path",{d:"m19.148 12.228.383-.923",key:"1q8j1v"}],["path",{d:"m19.53 18.696-.382-.924",key:"vk1qj3"}],["path",{d:"m20.772 13.852.924-.383",key:"n880s0"}],["path",{d:"m20.772 16.148.924.383",key:"1g6xey"}],["circle",{cx:"18",cy:"15",r:"3",key:"gjjjvw"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],F1=de("user-cog",$1);/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const W1=[["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"}]],Gm=de("user",W1);/** + */const W1=[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]],P1=de("user-round",W1);/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const I1=[["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"}]],P1=de("users",I1);/** + */const I1=[["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"}]],Gm=de("user",I1);/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const eg=[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]],tg=de("workflow",eg);/** + */const eg=[["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"}]],tg=de("users",eg);/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const ag=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],_h=de("x",ag),fr="xianyu-theme-preference",xh="(prefers-color-scheme: dark)",Eh=B.createContext(null),Ah=l=>l==="light"||l==="dark"||l==="system"?l:"system",ng=()=>{if(typeof window>"u")return"system";try{return Ah(window.localStorage.getItem(fr))}catch{return"system"}},lg=()=>typeof window>"u"?"light":window.matchMedia(xh).matches?"dark":"light",ug=({children:l})=>{const[s,c]=B.useState(ng),[r,f]=B.useState(lg);B.useEffect(()=>{const v=window.matchMedia(xh),g=A=>{f(A.matches?"dark":"light")};return f(v.matches?"dark":"light"),v.addEventListener("change",g),()=>v.removeEventListener("change",g)},[]),B.useEffect(()=>{const v=g=>{g.key===fr&&c(Ah(g.newValue))};return window.addEventListener("storage",v),()=>window.removeEventListener("storage",v)},[]);const m=s==="system"?r:s;B.useLayoutEffect(()=>{const v=document.documentElement;v.dataset.theme=m,v.dataset.themePreference=s,v.classList.toggle("dark",m==="dark"),v.style.colorScheme=m;try{window.localStorage.setItem(fr,s)}catch{}},[m,s]);const h=B.useCallback(v=>{c(v)},[]),p=B.useMemo(()=>({theme:s,resolvedTheme:m,setTheme:h}),[m,h,s]);return y.jsx(Eh.Provider,{value:p,children:l})},ig=()=>{const l=B.useContext(Eh);if(!l)throw new Error("useTheme must be used inside ThemeProvider");return l},ll=[{value:"light",label:"浅色",description:"使用浅色主题",icon:X1},{value:"dark",label:"深色",description:"使用深色主题",icon:z1},{value:"system",label:"自动",description:"跟随系统外观",icon:R1}],dr=({compact:l=!1,className:s=""})=>{const{theme:c,resolvedTheme:r,setTheme:f}=ig(),m=(h,p)=>{var A,N;let v=p;if(h.key==="ArrowRight"||h.key==="ArrowDown")v=(p+1)%ll.length;else if(h.key==="ArrowLeft"||h.key==="ArrowUp")v=(p-1+ll.length)%ll.length;else if(h.key==="Home")v=0;else if(h.key==="End")v=ll.length-1;else return;h.preventDefault();const g=ll[v].value;f(g),(N=(A=h.currentTarget.parentElement)==null?void 0:A.querySelector(`[data-theme-option="${g}"]`))==null||N.focus()};return y.jsxs("div",{className:`theme-picker ${l?"theme-picker--compact":""} ${s}`.trim(),"data-resolved-theme":r,children:[!l&&y.jsxs("div",{className:"theme-picker__heading",children:[y.jsx("span",{children:"显示主题"}),y.jsx("span",{className:"theme-picker__status",children:c==="system"?`自动 · ${r==="dark"?"深色":"浅色"}`:c==="dark"?"深色":"浅色"})]}),y.jsx("div",{className:"theme-switcher",role:"radiogroup","aria-label":"显示主题",children:ll.map((h,p)=>{const v=h.icon,g=c===h.value;return y.jsxs("button",{type:"button",role:"radio","aria-checked":g,"aria-label":h.description,title:h.description,tabIndex:g?0:-1,"data-theme-option":h.value,className:`theme-switcher__option ${g?"theme-switcher__option--active":""}`,onClick:()=>f(h.value),onKeyDown:A=>m(A,p),children:[y.jsx(v,{className:"h-3.5 w-3.5"}),!l&&y.jsx("span",{children:h.label})]},h.value)})})]})};function Th(l,s){return function(){return l.apply(s,arguments)}}const{toString:sg}=Object.prototype,{getPrototypeOf:sl}=Object,{iterator:ru,toStringTag:Oh}=Symbol,Mi=(({hasOwnProperty:l})=>(s,c)=>l.call(s,c))(Object.prototype),cu=(l,s)=>{let c=l;const r=[];for(;c!=null&&c!==Object.prototype;){if(r.indexOf(c)!==-1)return!1;if(r.push(c),Mi(c,s))return!0;c=sl(c)}return!1},cg=(l,s)=>l!=null&&cu(l,s)?l[s]:void 0,Sr=(l=>s=>{const c=sg.call(s);return l[c]||(l[c]=c.slice(8,-1).toLowerCase())})(Object.create(null)),Qt=l=>(l=l.toLowerCase(),s=>Sr(s)===l),Bi=l=>s=>typeof s===l,{isArray:pn}=Array,gn=Bi("undefined");function cl(l){return l!==null&&!gn(l)&&l.constructor!==null&&!gn(l.constructor)&&_t(l.constructor.isBuffer)&&l.constructor.isBuffer(l)}const Nh=Qt("ArrayBuffer");function rg(l){let s;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?s=ArrayBuffer.isView(l):s=l&&l.buffer&&Nh(l.buffer),s}const og=Bi("string"),_t=Bi("function"),Rh=Bi("number"),rl=l=>l!==null&&typeof l=="object",fg=l=>l===!0||l===!1,ji=l=>{if(!rl(l))return!1;const s=sl(l);return(s===null||s===Object.prototype||sl(s)===null)&&!cu(l,Oh)&&!cu(l,ru)},dg=l=>{if(!rl(l)||cl(l))return!1;try{return Object.keys(l).length===0&&Object.getPrototypeOf(l)===Object.prototype}catch{return!1}},mg=Qt("Date"),hg=Qt("File"),yg=l=>!!(l&&typeof l.uri<"u"),pg=l=>l&&typeof l.getParts<"u",gg=Qt("Blob"),bg=Qt("FileList"),vg=Qt("Set"),Sg=l=>rl(l)&&_t(l.pipe);function _g(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const Qm=_g(),Zm=typeof Qm.FormData<"u"?Qm.FormData:void 0,xg=l=>{if(!l)return!1;if(Zm&&l instanceof Zm)return!0;const s=sl(l);if(!s||s===Object.prototype||!_t(l.append))return!1;const c=Sr(l);return c==="formdata"||c==="object"&&_t(l.toString)&&l.toString()==="[object FormData]"},Eg=Qt("URLSearchParams"),[Ag,Tg,Og,Ng]=["ReadableStream","Request","Response","Headers"].map(Qt),Rg=l=>l.trim?l.trim():l.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ou(l,s,{allOwnKeys:c=!1}={}){if(l===null||typeof l>"u")return;let r,f;if(typeof l!="object"&&(l=[l]),pn(l))for(r=0,f=l.length;r0;)if(f=c[r],s===f.toLowerCase())return f;return null}const hn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,zh=l=>!gn(l)&&l!==hn;function mr(...l){const{caseless:s,skipUndefined:c}=zh(this)&&this||{},r={},f=(m,h)=>{if(h==="__proto__"||h==="constructor"||h==="prototype")return;const p=s&&typeof h=="string"&&wh(r,h)||h,v=Mi(r,p)?r[p]:void 0;ji(v)&&ji(m)?r[p]=mr(v,m):ji(m)?r[p]=mr({},m):pn(m)?r[p]=m.slice():(!c||!gn(m))&&(r[p]=m)};for(let m=0,h=l.length;m(ou(s,(f,m)=>{c&&_t(f)?Object.defineProperty(l,m,{__proto__:null,value:Th(f,c),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(l,m,{__proto__:null,value:f,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),l),zg=l=>(l.charCodeAt(0)===65279&&(l=l.slice(1)),l),jg=(l,s,c,r)=>{l.prototype=Object.create(s.prototype,r),Object.defineProperty(l.prototype,"constructor",{__proto__:null,value:l,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(l,"super",{__proto__:null,value:s.prototype}),c&&Object.assign(l.prototype,c)},Dg=(l,s,c,r)=>{let f,m,h;const p={};if(s=s||{},l==null)return s;do{for(f=Object.getOwnPropertyNames(l),m=f.length;m-- >0;)h=f[m],(!r||r(h,l,s))&&!p[h]&&(s[h]=l[h],p[h]=!0);l=c!==!1&&sl(l)}while(l&&(!c||c(l,s))&&l!==Object.prototype);return s},Cg=(l,s,c)=>{l=String(l),(c===void 0||c>l.length)&&(c=l.length),c-=s.length;const r=l.indexOf(s,c);return r!==-1&&r===c},Mg=l=>{if(!l)return null;if(pn(l))return l;let s=l.length;if(!Rh(s))return null;const c=new Array(s);for(;s-- >0;)c[s]=l[s];return c},Ug=(l=>s=>l&&s instanceof l)(typeof Uint8Array<"u"&&sl(Uint8Array)),qg=(l,s)=>{const r=(l&&l[ru]).call(l);let f;for(;(f=r.next())&&!f.done;){const m=f.value;s.call(l,m[0],m[1])}},Bg=(l,s)=>{let c;const r=[];for(;(c=l.exec(s))!==null;)r.push(c);return r},Hg=Qt("HTMLFormElement"),Lg=l=>l.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(c,r,f){return r.toUpperCase()+f}),{propertyIsEnumerable:kg}=Object.prototype,Yg=Qt("RegExp"),jh=(l,s)=>{const c=Object.getOwnPropertyDescriptors(l),r={};ou(c,(f,m)=>{let h;(h=s(f,m,l))!==!1&&(r[m]=h||f)}),Object.defineProperties(l,r)},Vg=l=>{jh(l,(s,c)=>{if(_t(l)&&["arguments","caller","callee"].includes(c))return!1;const r=l[c];if(_t(r)){if(s.enumerable=!1,"writable"in s){s.writable=!1;return}s.set||(s.set=()=>{throw Error("Can not rewrite read-only method '"+c+"'")})}})},Xg=(l,s)=>{const c={},r=f=>{f.forEach(m=>{c[m]=!0})};return pn(l)?r(l):r(String(l).split(s)),c},Gg=()=>{},Qg=(l,s)=>l!=null&&Number.isFinite(l=+l)?l:s;function Zg(l){return!!(l&&_t(l.append)&&l[Oh]==="FormData"&&l[ru])}const Kg=l=>{const s=new WeakSet,c=r=>{if(rl(r)){if(s.has(r))return;if(cl(r))return r;if(!("toJSON"in r)){s.add(r);let f;if(vg(r)){f=[];for(const m of r){const h=c(m);!gn(h)&&f.push(h)}}else f=pn(r)?[]:{},ou(r,(m,h)=>{const p=c(m);!gn(p)&&(f[h]=p)});return s.delete(r),f}}return r};return c(l)},Jg=Qt("AsyncFunction"),$g=l=>l&&(rl(l)||_t(l))&&_t(l.then)&&_t(l.catch),Dh=((l,s)=>l?setImmediate:s?((c,r)=>(hn.addEventListener("message",({source:f,data:m})=>{f===hn&&m===c&&r.length&&r.shift()()},!1),f=>{r.push(f),hn.postMessage(c,"*")}))(`axios@${Math.random()}`,[]):c=>setTimeout(c))(typeof setImmediate=="function",_t(hn.postMessage)),Fg=typeof queueMicrotask<"u"?queueMicrotask.bind(hn):typeof process<"u"&&process.nextTick||Dh,Ch=l=>l!=null&&_t(l[ru]),Wg=l=>l!=null&&cu(l,ru)&&Ch(l),x={isArray:pn,isArrayBuffer:Nh,isBuffer:cl,isFormData:xg,isArrayBufferView:rg,isString:og,isNumber:Rh,isBoolean:fg,isObject:rl,isPlainObject:ji,isEmptyObject:dg,isReadableStream:Ag,isRequest:Tg,isResponse:Og,isHeaders:Ng,isUndefined:gn,isDate:mg,isFile:hg,isReactNativeBlob:yg,isReactNative:pg,isBlob:gg,isRegExp:Yg,isFunction:_t,isStream:Sg,isURLSearchParams:Eg,isTypedArray:Ug,isFileList:bg,forEach:ou,merge:mr,extend:wg,trim:Rg,stripBOM:zg,inherits:jg,toFlatObject:Dg,kindOf:Sr,kindOfTest:Qt,endsWith:Cg,toArray:Mg,forEachEntry:qg,matchAll:Bg,isHTMLForm:Hg,hasOwnProperty:Mi,hasOwnProp:Mi,hasOwnInPrototypeChain:cu,getSafeProp:cg,reduceDescriptors:jh,freezeMethods:Vg,toObjectSet:Xg,toCamelCase:Lg,noop:Gg,toFiniteNumber:Qg,findKey:wh,global:hn,isContextDefined:zh,isSpecCompliantForm:Zg,toJSONObject:Kg,isAsyncFn:Jg,isThenable:$g,setImmediate:Dh,asap:Fg,isIterable:Ch,isSafeIterable:Wg},Ig=x.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Pg=l=>{const s={};let c,r,f;return l&&l.split(` -`).forEach(function(h){f=h.indexOf(":"),c=h.substring(0,f).trim().toLowerCase(),r=h.substring(f+1).trim();const p=x.hasOwnProp(s,c);!c||p&&x.hasOwnProp(Ig,c)||(c==="set-cookie"?p?s[c].push(r):s[c]=[r]:s[c]=p?s[c]+", "+r:r)}),s};function eb(l){let s=0,c=l.length;for(;ss;){const r=l.charCodeAt(c-1);if(r!==9&&r!==32)break;c-=1}return s===0&&c===l.length?l:l.slice(s,c)}const tb=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),ab=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function _r(l,s){return x.isArray(l)?l.map(c=>_r(c,s)):eb(String(l).replace(s,""))}const nb=l=>_r(l,tb),lb=l=>_r(l,ab);function Mh(l){const s=Object.create(null);return x.forEach(l.toJSON(),(c,r)=>{s[r]=lb(c)}),s}const Km=Symbol("internals");function iu(l){return l&&String(l).trim().toLowerCase()}function Di(l){return l===!1||l==null?l:x.isArray(l)?l.map(Di):nb(String(l))}function ub(l){const s=Object.create(null),c=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=c.exec(l);)s[r[1]]=r[2];return s}const ib=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function lr(l){let s=0,c=l.length;for(;ss;){const r=l.charCodeAt(c-1);if(r!==9&&r!==32)break;c-=1}return s===0&&c===l.length?l:l.slice(s,c)}function sb(l){const s=l.length-1;if(s<1||l.charCodeAt(0)!==34||l.charCodeAt(s)!==34)return l;let c="";for(let r=1;r=s))return l;c+=l[r]}return c}function cb(l){const s=Object.create(null),c=String(l);let r=0,f=!1,m=!1;function h(p){const v=lr(c.slice(r,p)),g=v.indexOf("=");if(g<1)return;const A=lr(v.slice(0,g));if(!ib.test(A))return;const N=A.toLowerCase();if(N==="__proto__"||N==="constructor"||N==="prototype")return;const q=lr(v.slice(g+1));s[N]=sb(q)}for(let p=0;p/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(l.trim());function ur(l,s,c,r,f){if(x.isFunction(r))return r.call(this,s,c);if(f&&(s=c),!!x.isString(s)){if(x.isString(r))return s.indexOf(r)!==-1;if(x.isRegExp(r))return r.test(s)}}function ob(l){return l.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(s,c,r)=>c.toUpperCase()+r)}function fb(l,s){const c=x.toCamelCase(" "+s);["get","set","has"].forEach(r=>{Object.defineProperty(l,r+c,{__proto__:null,value:function(f,m,h){return this[r].call(this,s,f,m,h)},configurable:!0})})}let ft=class{constructor(s){s&&this.set(s)}set(s,c,r){const f=this;function m(p,v,g){const A=iu(v);if(!A)return;const N=x.findKey(f,A);(!N||f[N]===void 0||g===!0||g===void 0&&f[N]!==!1)&&(f[N||v]=Di(p))}const h=(p,v)=>x.forEach(p,(g,A)=>m(g,A,v));if(x.isPlainObject(s)||s instanceof this.constructor)h(s,c);else if(x.isString(s)&&(s=s.trim())&&!rb(s))h(Pg(s),c);else if(x.isObject(s)&&x.isSafeIterable(s)){let p=Object.create(null),v,g;for(const A of s){if(!x.isArray(A))throw new TypeError("Object iterator must return a key-value pair");g=A[0],x.hasOwnProp(p,g)?(v=p[g],p[g]=x.isArray(v)?[...v,A[1]]:[v,A[1]]):p[g]=A[1]}h(p,c)}else s!=null&&m(c,s,r);return this}get(s,c){if(s=iu(s),s){const r=x.findKey(this,s);if(r){const f=this[r];if(!c)return f;if(c===!0)return ub(f);if(x.isFunction(c))return c.call(this,f,r);if(x.isRegExp(c))return c.exec(f);throw new TypeError("parser must be boolean|regexp|function")}}}has(s,c){if(s=iu(s),s){const r=x.findKey(this,s);return!!(r&&this[r]!==void 0&&(!c||ur(this,this[r],r,c)))}return!1}delete(s,c){const r=this;let f=!1;function m(h){if(h=iu(h),h){const p=x.findKey(r,h);p&&(!c||ur(r,r[p],p,c))&&(delete r[p],f=!0)}}return x.isArray(s)?s.forEach(m):m(s),f}clear(s){const c=Object.keys(this);let r=c.length,f=!1;for(;r--;){const m=c[r];(!s||ur(this,this[m],m,s,!0))&&(delete this[m],f=!0)}return f}normalize(s){const c=this,r={};return x.forEach(this,(f,m)=>{const h=x.findKey(r,m);if(h){c[h]=Di(f),delete c[m];return}const p=s?ob(m):String(m).trim();p!==m&&delete c[m],c[p]=Di(f),r[p]=!0}),this}concat(...s){return this.constructor.concat(this,...s)}toJSON(s){const c=Object.create(null);return x.forEach(this,(r,f)=>{r!=null&&r!==!1&&(c[f]=s&&x.isArray(r)?r.join(", "):r)}),c}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([s,c])=>s+": "+c).join(` -`)}getSetCookie(){const s=this.get("set-cookie");return x.isArray(s)?s:s==null||s===!1?[]:[s]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(s){return s instanceof this?s:new this(s)}static parseParameters(s){return cb(s)}static concat(s,...c){const r=new this(s);return c.forEach(f=>r.set(f)),r}static accessor(s){const r=(this[Km]=this[Km]={accessors:{}}).accessors,f=this.prototype;function m(h){const p=iu(h);r[p]||(fb(f,h),r[p]=!0)}return x.isArray(s)?s.forEach(m):m(s),this}};ft.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);x.reduceDescriptors(ft.prototype,({value:l},s)=>{let c=s[0].toUpperCase()+s.slice(1);return{get:()=>l,set(r){this[c]=r}}});x.freezeMethods(ft);const Ui="[REDACTED ****]";function db(l){if(x.hasOwnProp(l,"toJSON"))return!0;let s=Object.getPrototypeOf(l);for(;s&&s!==Object.prototype;){if(x.hasOwnProp(s,"toJSON"))return!0;s=Object.getPrototypeOf(s)}return!1}function mb(l,s){const c=new Set(s.map(m=>String(m).toLowerCase())),r=[],f=m=>{if(m===null||typeof m!="object"||x.isBuffer(m))return m;if(r.indexOf(m)!==-1)return;m instanceof ft&&(m=m.toJSON()),r.push(m);let h;if(x.isArray(m))h=[],m.forEach((p,v)=>{const g=f(p);x.isUndefined(g)||(h[v]=g)});else{if(!x.isPlainObject(m)&&db(m))return r.pop(),m;h=Object.create(null);for(const[p,v]of Object.entries(m)){const g=c.has(p.toLowerCase())?Ui:f(v);x.isUndefined(g)||(h[p]=g)}}return r.pop(),h};return f(l)}function Jm(l){try{return String(l)}catch{return""}}function hb(l){return l.errors.map(c=>{try{return c&&c.message?Jm(c.message):Jm(c)}catch{return""}}).filter(Boolean).join("; ")||l.name||"AggregateError"}let V=class Uh extends Error{static from(s,c,r,f,m,h){let p=s.message;!p&&x.isArray(s.errors)&&s.errors.length&&(p=hb(s));const v=new Uh(p,c||s.code,r,f,m);return Object.defineProperty(v,"cause",{__proto__:null,value:s,writable:!0,enumerable:!1,configurable:!0}),v.name=s.name,s.status!=null&&v.status==null&&(v.status=s.status),h&&Object.assign(v,h),v}constructor(s,c,r,f,m){super(s),Object.defineProperty(this,"message",{__proto__:null,value:s,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,c&&(this.code=c),r&&(this.config=r),f&&(this.request=f),m&&(this.response=m,this.status=m.status)}toJSON(){const s=this.config,c=s&&x.hasOwnProp(s,"redact")?s.redact:void 0,r=x.isArray(c)&&c.length>0?mb(s,c):x.toJSONObject(s);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};V.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";V.ERR_BAD_OPTION="ERR_BAD_OPTION";V.ECONNABORTED="ECONNABORTED";V.ETIMEDOUT="ETIMEDOUT";V.ECONNREFUSED="ECONNREFUSED";V.ERR_NETWORK="ERR_NETWORK";V.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";V.ERR_DEPRECATED="ERR_DEPRECATED";V.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";V.ERR_BAD_REQUEST="ERR_BAD_REQUEST";V.ERR_CANCELED="ERR_CANCELED";V.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";V.ERR_INVALID_URL="ERR_INVALID_URL";V.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const yb=null,qh=100;function hr(l){return x.isPlainObject(l)||x.isArray(l)}function Bh(l){return x.endsWith(l,"[]")?l.slice(0,-2):l}function ir(l,s,c){return l?l.concat(s).map(function(f,m){return f=Bh(f),!c&&m?"["+f+"]":f}).join(c?".":""):s}function pb(l){return x.isArray(l)&&!l.some(hr)}const gb=x.toFlatObject(x,{},null,function(s){return/^is[A-Z]/.test(s)});function Hi(l,s,c){if(!x.isObject(l))throw new TypeError("target must be an object");s=s||new FormData,c=x.toFlatObject(c,{metaTokens:!0,dots:!1,indexes:!1},!1,function(K,Q){return!x.isUndefined(Q[K])});const r=c.metaTokens,f=c.visitor||W,m=c.dots,h=c.indexes,p=c.Blob||typeof Blob<"u"&&Blob,v=c.maxDepth===void 0?qh:c.maxDepth,g=p&&x.isSpecCompliantForm(s),A=[];if(!x.isFunction(f))throw new TypeError("visitor must be a function");function N(C){if(C===null)return"";if(x.isDate(C))return C.toISOString();if(x.isBoolean(C))return C.toString();if(!g&&x.isBlob(C))throw new V("Blob is not supported. Use a Buffer instead.");if(x.isArrayBuffer(C)||x.isTypedArray(C)){if(g&&typeof p=="function")return new p([C]);throw new V("Blob is not supported. Use a Buffer instead.",V.ERR_NOT_SUPPORT)}return C}function q(C){if(C>v)throw new V("Object is too deeply nested ("+C+" levels). Max depth: "+v,V.ERR_FORM_DATA_DEPTH_EXCEEDED)}function F(C,K){if(v===1/0)return JSON.stringify(C);const Q=[];return JSON.stringify(C,function(Ee,me){if(!x.isObject(me))return me;for(;Q.length&&Q[Q.length-1]!==this;)Q.pop();return Q.push(me),q(K+Q.length-1),me})}function W(C,K,Q){let ee=C;if(x.isReactNative(s)&&x.isReactNativeBlob(C))return s.append(ir(Q,K,m),N(C)),!1;if(C&&!Q&&typeof C=="object"){if(x.endsWith(K,"{}"))K=r?K:K.slice(0,-2),C=F(C,1);else if(x.isArray(C)&&pb(C)||(x.isFileList(C)||x.endsWith(K,"[]"))&&(ee=x.toArray(C)))return K=Bh(K),ee.forEach(function(me,ne){!(x.isUndefined(me)||me===null)&&s.append(h===!0?ir([K],ne,m):h===null?K:K+"[]",N(me))}),!1}return hr(C)?!0:(s.append(ir(Q,K,m),N(C)),!1)}const X=Object.assign(gb,{defaultVisitor:W,convertValue:N,isVisitable:hr});function Y(C,K,Q=0){if(!x.isUndefined(C)){if(q(Q),A.indexOf(C)!==-1)throw new Error("Circular reference detected in "+K.join("."));A.push(C),x.forEach(C,function(Ee,me){(!(x.isUndefined(Ee)||Ee===null)&&f.call(s,Ee,x.isString(me)?me.trim():me,K,X))===!0&&Y(Ee,K?K.concat(me):[me],Q+1)}),A.pop()}}if(!x.isObject(l))throw new TypeError("data must be an object");return Y(l),s}function $m(l){const s={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(l).replace(/[!'()~]|%20/g,function(r){return s[r]})}function xr(l,s){this._pairs=[],l&&Hi(l,this,s)}const Hh=xr.prototype;Hh.append=function(s,c){this._pairs.push([s,c])};Hh.toString=function(s){const c=s?r=>s.call(this,r,$m):$m;return this._pairs.map(function(f){return c(f[0])+"="+c(f[1])},"").join("&")};function bb(l){return encodeURIComponent(l).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Lh(l,s,c){if(!s)return l;l=l||"";const r=x.isFunction(c)?{serialize:c}:c,f=x.getSafeProp(r,"encode")||bb,m=x.getSafeProp(r,"serialize");let h;if(m?h=m(s,r):h=x.isURLSearchParams(s)?s.toString():new xr(s,r).toString(f),h){const p=l.indexOf("#");p!==-1&&(l=l.slice(0,p)),l+=(l.indexOf("?")===-1?"?":"&")+h}return l}class Fm{constructor(){this.handlers=[]}use(s,c,r){return this.handlers.push({fulfilled:s,rejected:c,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(s){this.handlers[s]&&(this.handlers[s]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(s){x.forEach(this.handlers,function(r){r!==null&&s(r)})}}const Er={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},vb=typeof URLSearchParams<"u"?URLSearchParams:xr,Sb=typeof FormData<"u"?FormData:null,_b=typeof Blob<"u"?Blob:null,xb={isBrowser:!0,classes:{URLSearchParams:vb,FormData:Sb,Blob:_b},protocols:["http","https","file","blob","url","data"]},Ar=typeof window<"u"&&typeof document<"u",yr=typeof navigator=="object"&&navigator||void 0,Eb=Ar&&(!yr||["ReactNative","NativeScript","NS"].indexOf(yr.product)<0),Ab=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Tb=Ar&&window.location.href||"http://localhost",Ob=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ar,hasStandardBrowserEnv:Eb,hasStandardBrowserWebWorkerEnv:Ab,navigator:yr,origin:Tb},Symbol.toStringTag,{value:"Module"})),st={...Ob,...xb};function Nb(l,s){return Hi(l,new st.classes.URLSearchParams,{visitor:function(c,r,f,m){return st.isNode&&x.isBuffer(c)?(this.append(r,c.toString("base64")),!1):m.defaultVisitor.apply(this,arguments)},...s})}const Wm=qh;function kh(l){if(l>Wm)throw new V("FormData field is too deeply nested ("+l+" levels). Max depth: "+Wm,V.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Rb(l){const s=[],c=/[^.[\]]+|\[([^.[\]]*)]/g;let r;for(;(r=c.exec(l))!==null;)kh(s.length),s.push(r[0]==="[]"?"":r[1]||r[0]);return s}function wb(l){const s={},c=Object.keys(l);let r;const f=c.length;let m;for(r=0;r=c.length;return h=!h&&x.isArray(f)?f.length:h,v?(x.hasOwnProp(f,h)?f[h]=x.isArray(f[h])?f[h].concat(r):[f[h],r]:f[h]=r,!p):((!x.hasOwnProp(f,h)||!x.isObject(f[h]))&&(f[h]=[]),s(c,r,f[h],m)&&x.isArray(f[h])&&(f[h]=wb(f[h])),!p)}if(x.isFormData(l)&&x.isFunction(l.entries)){const c={};return x.forEachEntry(l,(r,f)=>{s(Rb(r),f,c,0)}),c}return null}const ul=(l,s)=>l!=null&&x.hasOwnProp(l,s)?l[s]:void 0;function zb(l,s,c){if(x.isString(l))try{return(s||JSON.parse)(l),x.trim(l)}catch(r){if(r.name!=="SyntaxError")throw r}return(c||JSON.stringify)(l)}const fu={transitional:Er,adapter:["xhr","http","fetch"],transformRequest:[function(s,c){const r=c.getContentType()||"",f=r.indexOf("application/json")>-1,m=x.isObject(s);if(m&&x.isHTMLForm(s)&&(s=new FormData(s)),x.isFormData(s))return f?JSON.stringify(Yh(s)):s;if(x.isArrayBuffer(s)||x.isBuffer(s)||x.isStream(s)||x.isFile(s)||x.isBlob(s)||x.isReadableStream(s))return s;if(x.isArrayBufferView(s))return s.buffer;if(x.isURLSearchParams(s))return c.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),s.toString();let p;if(m){const v=ul(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return Nb(s,v).toString();if((p=x.isFileList(s))||r.indexOf("multipart/form-data")>-1){const g=ul(this,"env"),A=g&&g.FormData;return Hi(p?{"files[]":s}:s,A&&new A,v)}}return m||f?(c.setContentType("application/json",!1),zb(s)):s}],transformResponse:[function(s){const c=ul(this,"transitional")||fu.transitional,r=c&&c.forcedJSONParsing,f=ul(this,"responseType"),m=f==="json";if(x.isResponse(s)||x.isReadableStream(s))return s;if(s&&x.isString(s)&&(r&&!f||m)){const p=!(c&&c.silentJSONParsing)&&m;try{return JSON.parse(s,ul(this,"parseReviver"))}catch(v){if(p)throw v.name==="SyntaxError"?V.from(v,V.ERR_BAD_RESPONSE,this,null,ul(this,"response")):v}}return s}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:st.classes.FormData,Blob:st.classes.Blob},validateStatus:function(s){return s>=200&&s<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};x.forEach(["delete","get","head","post","put","patch","query"],l=>{fu.headers[l]={}});function sr(l,s){const c=this||fu,r=s||c,f=ft.from(r.headers);let m=r.data;return x.forEach(l,function(p){m=p.call(c,m,f.normalize(),s?s.status:void 0)}),f.normalize(),m}function Vh(l){return!!(l&&l.__CANCEL__)}let du=class extends V{constructor(s,c,r){super(s??"canceled",V.ERR_CANCELED,c,r),this.name="CanceledError",this.__CANCEL__=!0}};function Xh(l,s,c){const r=c.config.validateStatus;!c.status||!r||r(c.status)?l(c):s(new V("Request failed with status code "+c.status,c.status>=400&&c.status<500?V.ERR_BAD_REQUEST:V.ERR_BAD_RESPONSE,c.config,c.request,c))}function jb(l){const s=/^([-+\w]{1,25}):(?:\/\/)?/.exec(l);return s&&s[1]||""}function Db(l,s){l=l||10;const c=new Array(l),r=new Array(l);let f=0,m=0,h;return s=s!==void 0?s:1e3,function(v){const g=Date.now(),A=r[m];h||(h=g),c[f]=v,r[f]=g;let N=m,q=0;for(;N!==f;)q+=c[N++],N=N%l;if(f=(f+1)%l,f===m&&(m=(m+1)%l),g-h{c=A,f=null,m&&(clearTimeout(m),m=null),l(...g)};return[(...g)=>{const A=Date.now(),N=A-c;N>=r?h(g,A):(f=g,m||(m=setTimeout(()=>{m=null,h(f)},r-N)))},()=>f&&h(f)]}const qi=(l,s,c=3)=>{let r=0;const f=Db(50,250);return Cb(m=>{if(!m||typeof m.loaded!="number")return;const h=m.loaded,p=m.lengthComputable?m.total:void 0,v=Math.max(0,p!=null?Math.min(h,p):h),g=Math.max(0,v-r),A=f(g);r=Math.max(r,v);const N={loaded:v,total:p,progress:p?v/p:void 0,bytes:g,rate:A||void 0,estimated:A&&p?(p-v)/A:void 0,event:m,lengthComputable:p!=null,[s?"download":"upload"]:!0};l(N)},c)},Im=(l,s)=>{const c=l!=null;return[r=>s[0]({lengthComputable:c,total:l,loaded:r}),s[1]]},Pm=(l,s=x.asap)=>(...c)=>s(()=>l(...c)),Mb=st.hasStandardBrowserEnv?((l,s)=>c=>(c=new URL(c,st.origin),l.protocol===c.protocol&&l.host===c.host&&(s||l.port===c.port)))(new URL(st.origin),st.navigator&&/(msie|trident)/i.test(st.navigator.userAgent)):()=>!0,Ub=st.hasStandardBrowserEnv?{write(l,s,c,r,f,m,h){if(typeof document>"u")return;const p=[`${l}=${encodeURIComponent(s)}`];x.isNumber(c)&&p.push(`expires=${new Date(c).toUTCString()}`),x.isString(r)&&p.push(`path=${r}`),x.isString(f)&&p.push(`domain=${f}`),m===!0&&p.push("secure"),x.isString(h)&&p.push(`SameSite=${h}`),document.cookie=p.join("; ")},read(l){if(typeof document>"u")return null;const s=document.cookie.split(";");for(let c=0;c0&&l.charCodeAt(c-1)===47;)c--;return l.slice(0,c)+"/"+s.replace(/^\/+/,"")}const Hb=/^https?:(?!\/\/)/i,Lb=/[\t\n\r]/g;function kb(l){let s=0;for(;s`${c}${r}${Ui}`)}function Xb(l){const s=l.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${Ui}@`),c=s.indexOf("#"),f=(c===-1?s:s.slice(0,c)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${Ui}`);return c===-1?f:`${f}#${Vb(s.slice(c+1))}`}function eh(l,s){if(typeof l=="string"){const c=Yb(l);if(Hb.test(c))throw new V(`Invalid URL ${JSON.stringify(Xb(c))}: missing "//" after protocol`,V.ERR_INVALID_URL,s)}}function Gh(l,s,c,r){eh(s,r);let f=!qb(s);return l&&(f||c===!1)?(eh(l,r),Bb(l,s)):s}const th=l=>l instanceof ft?{...l}:l,Gb=l=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(l).concat(Object.getOwnPropertySymbols(l).filter(s=>Object.getOwnPropertyDescriptor(l,s).enumerable)):Object.keys(l);function bn(l,s){l=l||{},s=s||{};const c=Object.create(null);Object.defineProperty(c,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(A,N,q,F){return x.isPlainObject(A)&&x.isPlainObject(N)?x.merge.call({caseless:F},A,N):x.isPlainObject(N)?x.merge({},N):x.isArray(N)?N.slice():N}function f(A,N,q,F){if(x.isUndefined(N)){if(!x.isUndefined(A))return r(void 0,A,q,F)}else return r(A,N,q,F)}function m(A,N){if(!x.isUndefined(N))return r(void 0,N)}function h(A,N){if(x.isUndefined(N)){if(!x.isUndefined(A))return r(void 0,A)}else return r(void 0,N)}function p(A){const N=x.hasOwnProp(s,"transitional")?s.transitional:void 0;if(!x.isUndefined(N))if(x.isPlainObject(N)){if(x.hasOwnProp(N,A))return N[A]}else return;const q=x.hasOwnProp(l,"transitional")?l.transitional:void 0;if(x.isPlainObject(q)&&x.hasOwnProp(q,A))return q[A]}function v(A,N,q){if(x.hasOwnProp(s,q))return r(A,N);if(x.hasOwnProp(l,q))return r(void 0,A)}const g={url:m,method:m,data:m,baseURL:h,transformRequest:h,transformResponse:h,paramsSerializer:h,timeout:h,timeoutMessage:h,withCredentials:h,withXSRFToken:h,adapter:h,responseType:h,xsrfCookieName:h,xsrfHeaderName:h,onUploadProgress:h,onDownloadProgress:h,decompress:h,maxContentLength:h,maxBodyLength:h,beforeRedirect:h,transport:h,httpAgent:h,httpsAgent:h,cancelToken:h,socketPath:h,allowedSocketPaths:h,responseEncoding:h,validateStatus:v,headers:(A,N,q)=>f(th(A),th(N),q,!0)};return x.forEach(Gb({...l,...s}),function(N){if(N==="__proto__"||N==="constructor"||N==="prototype")return;const q=x.hasOwnProp(g,N)?g[N]:f,F=x.hasOwnProp(l,N)?l[N]:void 0,W=x.hasOwnProp(s,N)?s[N]:void 0,X=q(F,W,N);x.isUndefined(X)&&q!==v||(c[N]=X)}),x.hasOwnProp(s,"validateStatus")&&x.isUndefined(s.validateStatus)&&p("validateStatusUndefinedResolves")===!1&&(x.hasOwnProp(l,"validateStatus")?c.validateStatus=r(void 0,l.validateStatus):delete c.validateStatus),c}const Qb=["content-type","content-length"];function Zb(l,s,c){if(c!=="content-only"){l.set(s);return}Object.entries(s||{}).forEach(([r,f])=>{Qb.includes(r.toLowerCase())&&l.set(r,f)})}const Kb=l=>encodeURIComponent(l).replace(/%([0-9A-F]{2})/gi,(s,c)=>String.fromCharCode(parseInt(c,16)));function Qh(l){const s=bn({},l),c=q=>x.hasOwnProp(s,q)?s[q]:void 0,r=c("data");let f=c("withXSRFToken");const m=c("xsrfHeaderName"),h=c("xsrfCookieName");let p=c("headers");const v=c("auth"),g=c("baseURL"),A=c("allowAbsoluteUrls"),N=c("url");if(s.headers=p=ft.from(p),s.url=Lh(Gh(g,N,A,s),c("params"),c("paramsSerializer")),v){const q=x.getSafeProp(v,"username")||"",F=x.getSafeProp(v,"password")||"";try{p.set("Authorization","Basic "+btoa(q+":"+(F?Kb(F):"")))}catch(W){throw V.from(W,V.ERR_BAD_OPTION_VALUE,l)}}if(x.isFormData(r)&&(st.hasStandardBrowserEnv||st.hasStandardBrowserWebWorkerEnv||x.isReactNative(r)?p.setContentType(void 0):x.isFunction(r.getHeaders)&&Zb(p,r.getHeaders(),c("formDataHeaderPolicy"))),st.hasStandardBrowserEnv&&(x.isFunction(f)&&(f=f(s)),f===!0||f==null&&Mb(s.url))){const F=m&&h&&Ub.read(h);F&&p.set(m,F)}return s}const Jb=typeof XMLHttpRequest<"u",$b=Jb&&function(l){return new Promise(function(c,r){const f=Qh(l);let m=f.data;const h=ft.from(f.headers).normalize();let{responseType:p,onUploadProgress:v,onDownloadProgress:g}=f,A,N,q,F,W;function X(){F&&F(),W&&W(),f.cancelToken&&f.cancelToken.unsubscribe(A),f.signal&&f.signal.removeEventListener("abort",A)}let Y=new XMLHttpRequest;Y.open(f.method.toUpperCase(),f.url,!0),Y.timeout=f.timeout;function C(){if(!Y)return;const Q=ft.from("getAllResponseHeaders"in Y&&Y.getAllResponseHeaders()),Ee={data:!p||p==="text"||p==="json"?Y.responseText:Y.response,status:Y.status,statusText:Y.statusText,headers:Q,config:l,request:Y};Xh(function(ne){c(ne),X()},function(ne){r(ne),X()},Ee),Y=null}"onloadend"in Y?Y.onloadend=C:Y.onreadystatechange=function(){!Y||Y.readyState!==4||Y.status===0&&!(Y.responseURL&&Y.responseURL.startsWith("file:"))||setTimeout(C)},Y.onabort=function(){Y&&(r(new V("Request aborted",V.ECONNABORTED,l,Y)),X(),Y=null)},Y.onerror=function(ee){const Ee=ee&&ee.message?ee.message:"Network Error",me=new V(Ee,V.ERR_NETWORK,l,Y);me.event=ee||null,r(me),X(),Y=null},Y.ontimeout=function(){let ee=f.timeout?"timeout of "+f.timeout+"ms exceeded":"timeout exceeded";const Ee=f.transitional||Er;f.timeoutErrorMessage&&(ee=f.timeoutErrorMessage),r(new V(ee,Ee.clarifyTimeoutError?V.ETIMEDOUT:V.ECONNABORTED,l,Y)),X(),Y=null},m===void 0&&h.setContentType(null),"setRequestHeader"in Y&&x.forEach(Mh(h),function(ee,Ee){Y.setRequestHeader(Ee,ee)}),x.isUndefined(f.withCredentials)||(Y.withCredentials=!!f.withCredentials),p&&p!=="json"&&(Y.responseType=f.responseType),g&&([q,W]=qi(g,!0),Y.addEventListener("progress",q)),v&&Y.upload&&([N,F]=qi(v),Y.upload.addEventListener("progress",N),Y.upload.addEventListener("loadend",F)),(f.cancelToken||f.signal)&&(A=Q=>{Y&&(r(!Q||Q.type?new du(null,l,Y):Q),Y.abort(),X(),Y=null)},f.cancelToken&&f.cancelToken.subscribe(A),f.signal&&(f.signal.aborted?A():f.signal.addEventListener("abort",A)));const K=jb(f.url);if(K&&!st.protocols.includes(K)){r(new V("Unsupported protocol "+K+":",V.ERR_BAD_REQUEST,l)),X();return}Y.send(m||null)})},Fb=(l,s)=>{if(l=l?l.filter(Boolean):[],!s&&!l.length)return;const c=new AbortController;let r=!1;const f=function(v){if(!r){r=!0,h();const g=v instanceof Error?v:this.reason;c.abort(g instanceof V?g:new du(g instanceof Error?g.message:g))}};let m=s&&setTimeout(()=>{m=null,f(new V(`timeout of ${s}ms exceeded`,V.ETIMEDOUT))},s);const h=()=>{l&&(m&&clearTimeout(m),m=null,l.forEach(v=>{v.unsubscribe?v.unsubscribe(f):v.removeEventListener("abort",f)}),l=null)};l.forEach(v=>{if(!r){if(v.aborted){f.call(v);return}v.addEventListener("abort",f,{once:!0})}});const{signal:p}=c;return p.unsubscribe=()=>x.asap(h),p},Wb=function*(l,s){let c=l.byteLength;if(c{const f=Ib(l,s);let m=0,h,p=v=>{h||(h=!0,r&&r(v))};return new ReadableStream({async pull(v){try{const{done:g,value:A}=await f.next();if(g){p(),v.close();return}let N=A.byteLength;if(c){let q=m+=N;c(q)}v.enqueue(new Uint8Array(A))}catch(g){throw p(g),g}},cancel(v){return p(v),f.return()}},{highWaterMark:2})},nh=l=>l>=48&&l<=57||l>=65&&l<=70||l>=97&&l<=102,Zh=(l,s,c)=>s+2l<=57?l-48:(l&223)-55,ev=l=>l>=65&&l<=90||l>=97&&l<=122||l>=48&&l<=57||l===43||l===47||l===45||l===95,tv=l=>l===9||l===10||l===12||l===13||l===32,av=l=>{const s=Math.floor(l/4),c=l%4;return s*3+(c===2?1:c===3?2:0)},nv=l=>{const s=l.length;let c=0;return s>0&&l.charCodeAt(s-1)===61&&(c++,s>1&&l.charCodeAt(s-2)===61&&c++),Math.floor((s-c)*3/4)},lv=l=>{const s=l.length;let c=0,r=0,f=!1;for(let m=0;m0){f=!0;continue}c++}}return f||r>2||r>0&&(c+r)%4!==0||c%4===1?nv(l):av(c)},uv=(l,s)=>{if(!l||typeof l!="string"||!l.startsWith("data:"))return 0;const c=l.indexOf(",");if(c<0)return 0;const r=l.slice(5,c),f=l.slice(c+1);if(/;base64/i.test(r))return s(f);let h=0;for(let p=0,v=f.length;p=55296&&g<=56319&&p+1=56320&&A<=57343?(h+=4,p++):h+=3}else h+=3}return h};function iv(l){const s=typeof l=="string"?l.indexOf("#"):-1;return uv(s===-1?l:l.slice(0,s),lv)}const Tr="1.19.0",uh=64*1024,{isFunction:zi}=x,sv=l=>encodeURIComponent(l).replace(/%([0-9A-F]{2})/gi,(s,c)=>String.fromCharCode(parseInt(c,16))),ih=l=>{if(!x.isString(l))return l;try{return decodeURIComponent(l)}catch{return l}},sh=(l,...s)=>{try{return!!l(...s)}catch{return!1}},cv=l=>{const s=l.indexOf("://");let c=l;return s!==-1&&(c=c.slice(s+3)),c.includes("@")||c.includes(":")},rv=l=>{const s=x.global!==void 0&&x.global!==null?x.global:globalThis,{ReadableStream:c,TextEncoder:r}=s;l=x.merge.call({skipUndefined:!0},{Request:s.Request,Response:s.Response},l);const{fetch:f,Request:m,Response:h}=l,p=f?zi(f):typeof fetch=="function",v=zi(m),g=zi(h);if(!p)return!1;const A=p&&zi(c),N=p&&(typeof r=="function"?(C=>K=>C.encode(K))(new r):async C=>new Uint8Array(await new m(C).arrayBuffer())),q=v&&A&&sh(()=>{let C=!1;const K=new m(st.origin,{body:new c,method:"POST",get duplex(){return C=!0,"half"}}),Q=K.headers.has("Content-Type");return K.body!=null&&K.body.cancel(),C&&!Q}),F=g&&A&&sh(()=>x.isReadableStream(new h("").body)),W={stream:F&&(C=>C.body)};p&&["text","arrayBuffer","blob","formData","stream"].forEach(C=>{!W[C]&&(W[C]=(K,Q)=>{let ee=K&&K[C];if(ee)return ee.call(K);throw new V(`Response type '${C}' is not supported`,V.ERR_NOT_SUPPORT,Q)})});const X=async C=>{if(C==null)return 0;if(x.isBlob(C))return C.size;if(x.isSpecCompliantForm(C))return(await new m(st.origin,{method:"POST",body:C}).arrayBuffer()).byteLength;if(x.isArrayBufferView(C)||x.isArrayBuffer(C))return C.byteLength;if(x.isURLSearchParams(C)&&(C=C+""),x.isString(C))return(await N(C)).byteLength},Y=async(C,K)=>{const Q=x.toFiniteNumber(C.getContentLength());return Q??X(K)};return async C=>{let{url:K,method:Q,data:ee,signal:Ee,cancelToken:me,timeout:ne,onDownloadProgress:Le,onUploadProgress:ct,responseType:be,headers:Me,withCredentials:ke="same-origin",fetchOptions:xt,maxContentLength:He,maxBodyLength:Re}=Qh(C);const z=x.isNumber(He)&&He>-1,L=x.isNumber(Re)&&Re>-1,P=Z=>x.hasOwnProp(C,Z)?C[Z]:void 0;let Se=f||fetch;be=be?(be+"").toLowerCase():"text";let re=Fb([Ee,me&&me.toAbortSignal()],ne),S=null;const j=re&&re.unsubscribe&&(()=>{re.unsubscribe()});let H,G=null;const le=()=>new V("Request body larger than maxBodyLength limit",V.ERR_BAD_REQUEST,C,S);try{let Z;const k=P("auth");if(k){const se=x.getSafeProp(k,"username")||"",dt=x.getSafeProp(k,"password")||"";Z={username:se,password:dt}}if(cv(K)){const se=new URL(K,st.origin);if(!Z&&(se.username||se.password)){const dt=ih(se.username),Kt=ih(se.password);Z={username:dt,password:Kt}}(se.username||se.password)&&(se.username="",se.password="",K=se.href)}if(Z&&(Me.delete("authorization"),Me.set("Authorization","Basic "+btoa(sv((Z.username||"")+":"+(Z.password||""))))),z&&typeof K=="string"&&K.startsWith("data:")&&iv(K)>He)throw new V("maxContentLength size of "+He+" exceeded",V.ERR_BAD_RESPONSE,C,S);if(L&&Q!=="get"&&Q!=="head"){const se=await X(ee);if(typeof se=="number"&&isFinite(se)&&(H=se,se>Re))throw le()}const ue=L&&(x.isReadableStream(ee)||x.isStream(ee)),Te=(se,dt,Kt)=>ah(se,uh,Jt=>{if(L&&Jt>Re)throw G=le();dt&&dt(Jt)},Kt);if(q&&Q!=="get"&&Q!=="head"&&(ct||ue)){if(H=H??await Y(Me,ee),H!==0||ue){let se=new m(K,{method:"POST",body:ee,duplex:"half"}),dt;if(x.isFormData(ee)&&(dt=se.headers.get("content-type"))&&Me.setContentType(dt),se.body){const[Kt,Jt]=ct&&Im(H,qi(Pm(ct)))||[];ee=Te(se.body,Kt,Jt)}}}else if(ue&&!v&&A&&Q!=="get"&&Q!=="head")ee=Te(ee);else if(ue&&v&&!q&&Q!=="get"&&Q!=="head")throw new V("Stream request bodies are not supported by the current fetch implementation",V.ERR_NOT_SUPPORT,C,S);x.isString(ke)||(ke=ke?"include":"omit");const Za=v&&"credentials"in m.prototype;if(x.isFormData(ee)){const se=Me.getContentType();se&&/^multipart\/form-data/i.test(se)&&!/boundary=/i.test(se)&&Me.delete("content-type")}Me.set("User-Agent","axios/"+Tr,!1);const Ka={...xt,signal:re,method:Q.toUpperCase(),headers:Mh(Me.normalize()),body:ee,duplex:"half",credentials:Za?ke:void 0};S=v&&new m(K,Ka);let Et=await(v?Se(S,xt):Se(K,Ka));const ol=ft.from(Et.headers);if(z){const se=x.toFiniteNumber(ol.getContentLength());if(se!=null&&se>He)throw new V("maxContentLength size of "+He+" exceeded",V.ERR_BAD_RESPONSE,C,S)}const Zt=F&&(be==="stream"||be==="response");if(F&&Et.body&&(Le||z||Zt&&j)){const se={};["status","statusText","headers"].forEach(Ja=>{se[Ja]=Et[Ja]});const dt=x.toFiniteNumber(ol.getContentLength()),[Kt,Jt]=Le&&Im(dt,qi(Pm(Le),!0))||[];let vn=0;const fl=Ja=>{if(z&&(vn=Ja,vn>He))throw new V("maxContentLength size of "+He+" exceeded",V.ERR_BAD_RESPONSE,C,S);Kt&&Kt(Ja)};Et=new h(ah(Et.body,uh,fl,()=>{Jt&&Jt(),j&&j()}),se)}be=be||"text";let At=await W[x.findKey(W,be)||"text"](Et,C);if(z&&!F&&!Zt){let se;if(At!=null&&(typeof At.byteLength=="number"?se=At.byteLength:typeof At.size=="number"?se=At.size:typeof At=="string"&&(se=typeof r=="function"?new r().encode(At).byteLength:At.length)),typeof se=="number"&&se>He)throw new V("maxContentLength size of "+He+" exceeded",V.ERR_BAD_RESPONSE,C,S)}return!Zt&&j&&j(),await new Promise((se,dt)=>{Xh(se,dt,{data:At,headers:ft.from(Et.headers),status:Et.status,statusText:Et.statusText,config:C,request:S})})}catch(Z){if(j&&j(),re&&re.aborted&&re.reason instanceof V){const k=re.reason;throw k.config=C,S&&(k.request=S),Z!==k&&Object.defineProperty(k,"cause",{__proto__:null,value:Z,writable:!0,enumerable:!1,configurable:!0}),k}if(G)throw S&&!G.request&&(G.request=S),G;if(Z instanceof V)throw S&&!Z.request&&(Z.request=S),Z;if(Z&&Z.name==="TypeError"&&/Load failed|fetch/i.test(Z.message)){const k=new V("Network Error",V.ERR_NETWORK,C,S,Z&&Z.response);throw Object.defineProperty(k,"cause",{__proto__:null,value:Z.cause||Z,writable:!0,enumerable:!1,configurable:!0}),k}throw V.from(Z,Z&&Z.code,C,S,Z&&Z.response)}}},ov=new Map,Kh=l=>{let s=l&&l.env||{};const{fetch:c,Request:r,Response:f}=s,m=[r,f,c];let h=m.length,p=h,v,g,A=ov;for(;p--;)v=m[p],g=A.get(v),g===void 0&&A.set(v,g=p?new Map:rv(s)),A=g;return g};Kh();const Or={http:yb,xhr:$b,fetch:{get:Kh}};x.forEach(Or,(l,s)=>{if(l){try{Object.defineProperty(l,"name",{__proto__:null,value:s})}catch{}Object.defineProperty(l,"adapterName",{__proto__:null,value:s})}});const ch=l=>`- ${l}`,fv=l=>x.isFunction(l)||l===null||l===!1;function dv(l,s){l=x.isArray(l)?l:[l];const{length:c}=l;let r,f;const m={};for(let h=0;h`adapter ${v} `+(g===!1?"is not supported by the environment":"is not available in the build"));let p=c?h.length>1?`since : -`+h.map(ch).join(` -`):" "+ch(h[0]):"as no adapter specified";throw new V("There is no suitable adapter to dispatch the request "+p,V.ERR_NOT_SUPPORT)}return f}const Jh={getAdapter:dv,adapters:Or};function cr(l){if(l.cancelToken&&l.cancelToken.throwIfRequested(),l.signal&&l.signal.aborted)throw new du(null,l)}function rr(l){return cr(l),l.headers=ft.from(l.headers),l.data=sr.call(l,l.transformRequest),["post","put","patch"].indexOf(l.method)!==-1&&l.headers.setContentType("application/x-www-form-urlencoded",!1),Jh.getAdapter(l.adapter||fu.adapter,l)(l).then(function(r){cr(l),l.response=r;try{r.data=sr.call(l,l.transformResponse,r)}finally{delete l.response}return r.headers=ft.from(r.headers),r},function(r){if(!Vh(r)&&(cr(l),r&&r.response)){l.response=r.response;try{r.response.data=sr.call(l,l.transformResponse,r.response)}finally{delete l.response}r.response.headers=ft.from(r.response.headers)}return Promise.reject(r)})}const Li={};["object","boolean","number","function","string","symbol"].forEach((l,s)=>{Li[l]=function(r){return typeof r===l||"a"+(s<1?"n ":" ")+l}});const rh={};Li.transitional=function(s,c,r){function f(m,h){return"[Axios v"+Tr+"] Transitional option '"+m+"'"+h+(r?". "+r:"")}return(m,h,p)=>{if(s===!1)throw new V(f(h," has been removed"+(c?" in "+c:"")),V.ERR_DEPRECATED);return c&&!rh[h]&&(rh[h]=!0,console.warn(f(h," has been deprecated since v"+c+" and will be removed in the near future"))),s?s(m,h,p):!0}};Li.spelling=function(s){return(c,r)=>(console.warn(`${r} is likely a misspelling of ${s}`),!0)};function mv(l,s,c){if(typeof l!="object"||l===null)throw new V("options must be an object",V.ERR_BAD_OPTION_VALUE);const r=Object.keys(l);let f=r.length;for(;f-- >0;){const m=r[f],h=Object.prototype.hasOwnProperty.call(s,m)?s[m]:void 0;if(h){const p=l[m],v=p===void 0||h(p,m,l);if(v!==!0)throw new V("option "+m+" must be "+v,V.ERR_BAD_OPTION_VALUE);continue}if(c!==!0)throw new V("Unknown option "+m,V.ERR_BAD_OPTION)}}const Ci={assertOptions:mv,validators:Li},ot=Ci.validators;let yn=class{constructor(s){this.defaults=s||{},this.interceptors={request:new Fm,response:new Fm}}async request(s,c){try{return await this._request(s,c)}catch(r){if(r instanceof Error){let f={};Error.captureStackTrace?Error.captureStackTrace(f):f=new Error;const m=(()=>{if(!f.stack)return"";const h=f.stack.indexOf(` -`);return h===-1?"":f.stack.slice(h+1)})();try{if(!r.stack)r.stack=m;else if(m){const h=m.indexOf(` -`),p=h===-1?-1:m.indexOf(` -`,h+1),v=p===-1?"":m.slice(p+1);String(r.stack).endsWith(v)||(r.stack+=` -`+m)}}catch{}}throw r}}_request(s,c){typeof s=="string"?(c=c||{},c.url=s):c=s||{},c=bn(this.defaults,c);const{transitional:r,paramsSerializer:f,headers:m}=c;r!==void 0&&Ci.assertOptions(r,{silentJSONParsing:ot.transitional(ot.boolean),forcedJSONParsing:ot.transitional(ot.boolean),clarifyTimeoutError:ot.transitional(ot.boolean),legacyInterceptorReqResOrdering:ot.transitional(ot.boolean),advertiseZstdAcceptEncoding:ot.transitional(ot.boolean),validateStatusUndefinedResolves:ot.transitional(ot.boolean)},!1),f!=null&&(x.isFunction(f)?c.paramsSerializer={serialize:f}:Ci.assertOptions(f,{encode:ot.function,serialize:ot.function},!0)),c.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?c.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:c.allowAbsoluteUrls=!0),Ci.assertOptions(c,{baseUrl:ot.spelling("baseURL"),withXsrfToken:ot.spelling("withXSRFToken")},!0),c.method=(c.method||this.defaults.method||"get").toLowerCase();let h=m&&x.merge(m.common,m[c.method]);m&&x.forEach(["delete","get","head","post","put","patch","query","common"],W=>{delete m[W]}),c.headers=ft.concat(h,m);const p=[];let v=!0;this.interceptors.request.forEach(function(X){if(typeof X.runWhen=="function"&&X.runWhen(c)===!1)return;v=v&&X.synchronous;const Y=c.transitional||Er;Y&&Y.legacyInterceptorReqResOrdering?p.unshift(X.fulfilled,X.rejected):p.push(X.fulfilled,X.rejected)});const g=[];this.interceptors.response.forEach(function(X){g.push(X.fulfilled,X.rejected)});let A,N=0,q;if(!v){const W=[rr.bind(this),void 0];for(W.unshift(...p),W.push(...g),q=W.length,A=Promise.resolve(c);Nrr.call(this,F)))}catch(C){A=Promise.reject(C)}break}}if(!A)try{A=rr.call(this,F)}catch(W){A=Promise.reject(W)}for(N=0,q=g.length;N{if(!r._listeners)return;let m=r._listeners.length;for(;m-- >0;)r._listeners[m](f);r._listeners=null}),this.promise.then=f=>{let m;const h=new Promise(p=>{r.subscribe(p),m=p}).then(f);return h.cancel=function(){r.unsubscribe(m)},h},s(function(m,h,p){r.reason||(r.reason=new du(m,h,p),c(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(s){if(this.reason){s(this.reason);return}this._listeners?this._listeners.push(s):this._listeners=[s]}unsubscribe(s){if(!this._listeners)return;const c=this._listeners.indexOf(s);c!==-1&&this._listeners.splice(c,1)}toAbortSignal(){const s=new AbortController,c=r=>{s.abort(r)};return this.subscribe(c),s.signal.unsubscribe=()=>this.unsubscribe(c),s.signal}static source(){let s;return{token:new $h(function(f){s=f}),cancel:s}}};function yv(l){return function(c){return l.apply(null,c)}}function pv(l){return x.isObject(l)&&l.isAxiosError===!0}const pr={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(pr).forEach(([l,s])=>{pr[s]=l});function Fh(l){const s=new yn(l),c=Th(yn.prototype.request,s);return x.extend(c,yn.prototype,s,{allOwnKeys:!0}),x.extend(c,s,null,{allOwnKeys:!0}),c.create=function(f){return Fh(bn(l,f))},c}const Qe=Fh(fu);Qe.Axios=yn;Qe.CanceledError=du;Qe.CancelToken=hv;Qe.isCancel=Vh;Qe.VERSION=Tr;Qe.toFormData=Hi;Qe.AxiosError=V;Qe.Cancel=Qe.CanceledError;Qe.all=function(s){return Promise.all(s)};Qe.spread=yv;Qe.isAxiosError=pv;Qe.mergeConfig=bn;Qe.AxiosHeaders=ft;Qe.formToJSON=l=>Yh(x.isHTMLForm(l)?new FormData(l):l);Qe.getAdapter=Jh.getAdapter;Qe.HttpStatusCode=pr;Qe.default=Qe;const{Axios:d2,AxiosError:m2,CanceledError:h2,isCancel:y2,CancelToken:p2,VERSION:g2,all:b2,Cancel:v2,isAxiosError:S2,spread:_2,toFormData:x2,AxiosHeaders:E2,HttpStatusCode:A2,formToJSON:T2,getAdapter:O2,mergeConfig:N2,create:R2}=Qe,Qa=Qe.create({baseURL:"",timeout:3e4,headers:{"Content-Type":"application/json"}});Qa.interceptors.request.use(l=>{const s=localStorage.getItem("auth_token");return s&&(l.headers.Authorization=`Bearer ${s}`),typeof FormData<"u"&&l.data instanceof FormData&&delete l.headers["Content-Type"],l},l=>Promise.reject(l));Qa.interceptors.response.use(l=>l,l=>{var s;if(((s=l.response)==null?void 0:s.status)===401){localStorage.removeItem("auth_token");try{window.dispatchEvent(new Event("auth:logout"))}catch{}}return Promise.reject(l)});const ae=async(l,s,c)=>(await Qa.get(l,{params:s,...c})).data,ie=async(l,s,c)=>(await Qa.post(l,s,c)).data,De=async(l,s,c)=>(await Qa.put(l,s,c)).data,gv=async(l,s,c)=>(await Qa.patch(l,s,c)).data,tt=async(l,s)=>(await Qa.delete(l,s)).data,bv=async l=>ie("/login",l),vv=async()=>ae("/system-settings/public"),Sv=async(l,s)=>De("/profile",{new_username:l,current_password:s}),_v=async l=>ie("/register",l),xv=async(l,s="register",c)=>ie("/send-verification-code",{email:l,type:s,captcha_session_id:c==null?void 0:c.session_id,captcha_code:c==null?void 0:c.code}),Ev=async l=>ie("/generate-captcha",{session_id:l}),Av=async()=>ae("/verify"),Tv=async(l,s)=>ie("/change-password",{current_password:l,new_password:s}),w2=async()=>(await ae("/cookies/details")).map(s=>({id:s.id,value:s.value,cookie:s.value,enabled:s.enabled,auto_confirm:s.auto_confirm,remark:s.remark,note:s.remark,pause_duration:s.pause_duration,username:s.username,login_password:s.login_password,show_browser:s.show_browser,nickname:s.nickname||s.remark||s.username||`账号 ${s.id.substring(0,6)}`,avatar_url:s.avatar_url,location:s.location,bio:s.bio,followers:s.followers,following:s.following,profile_updated_at:s.profile_updated_at,runtime_state:s.runtime_state,login_info:s.login_info,ai_enabled:!1})),z2=async l=>ie(`/cookies/${l}/refresh-profile`),j2=async()=>ie("/qr-login/generate"),D2=async l=>ae(`/qr-login/check/${l}`),C2=async(l,s)=>De(`/cookies/${l}/status`,{enabled:s}),M2=async l=>tt(`/cookies/${l}`),U2=async(l,s)=>De(`/cookies/${l}/remark`,{remark:s}),q2=async(l,s)=>De(`/cookies/${l}/auto-confirm`,{auto_confirm:s}),B2=async(l,s)=>De(`/cookies/${l}/pause-duration`,{pause_duration:s}),H2=async(l,s)=>De(`/cookies/${l}`,{id:l,value:s}),L2=async(l,s)=>De(`/cookies/${l}/login-info`,s),k2=async()=>ae("/ai-reply-settings"),Ov=l=>{const s=(l==null?void 0:l.order_status)||(l==null?void 0:l.status)||"processing";return{...l,status:s,order_status:s}},Y2=async(l,s,c=1,r=20)=>{const f={page:c,page_size:r};l&&(f.cookie_id=l),s&&s!=="all"&&(f.status=s);const m=await ae("/api/orders",f),h=(m.orders||m.data||[]).map(Ov);return{success:!0,data:h,total:m.total||h.length,page:m.page||c,page_size:m.page_size||r,total_pages:m.total_pages||1,status_counts:m.status_counts}},V2=async(l,s)=>De(`/api/orders/${l}`,s),X2=async(l,s)=>De(`/api/orders/${l}/note`,{note:s}),G2=async l=>tt(`/api/orders/${l}`),Q2=async(l,s)=>{const c=new FormData,r=localStorage.getItem("auth_token");return(await fetch("/api/orders/refresh",{method:"POST",headers:{Authorization:`Bearer ${r}`},body:c})).json()},Z2=async l=>ie(`/api/orders/${l}/refresh`),K2=async(l,s,c)=>ie("/api/orders/manual-ship",{order_ids:l,ship_mode:s,custom_content:c}),J2=async l=>{const s=l instanceof FormData;return(await fetch("/api/orders/import",{method:"POST",headers:{...s?{}:{"Content-Type":"application/json"},Authorization:`Bearer ${localStorage.getItem("auth_token")}`},body:s?l:JSON.stringify(l)})).json()},Nv=l=>{if(!l)return"";const s=l.match(/filename\*=UTF-8''([^;\s]+)/i);if(s)try{return decodeURIComponent(s[1])}catch{return s[1]}const c=l.match(/filename\s*=\s*"?([^";]+)"?/i);return c?c[1].trim():""},$2=async l=>{var v;const s={};l.cookie_id&&(s.cookie_id=l.cookie_id),l.status&&l.status!=="all"&&(s.status=l.status);const c=await Qa.get("/api/orders/export",{params:s,responseType:"blob"}),r=c.data;if(!(r instanceof Blob)||r.size===0)throw new Error("导出失败:服务器未返回有效文件");if(r.type.includes("application/json")){let g="导出失败";try{const A=JSON.parse(await r.text());g=(A==null?void 0:A.message)||g}catch{}throw new Error(g)}const f=Nv((v=c.headers)==null?void 0:v["content-disposition"]),m=/\.csv$/i.test(f)?f:`orders_${Date.now()}.csv`,h=URL.createObjectURL(r),p=document.createElement("a");return p.href=h,p.download=m,document.body.appendChild(p),p.click(),document.body.removeChild(p),URL.revokeObjectURL(h),m},F2=async(l,s=7)=>{const c=new FormData;return c.append("days",String(s)),(await fetch("/api/orders/sync-sold",{method:"POST",headers:{Authorization:`Bearer ${localStorage.getItem("auth_token")}`},body:c})).json()},W2=async(l=!1)=>(await ae("/quick-phrases",{include_disabled:l})).data||[],I2=async(l,s,c="默认",r=0)=>{const f=new FormData;return f.append("title",l),f.append("content",s),f.append("category",c),f.append("sort_order",String(r)),(await fetch("/quick-phrases",{method:"POST",headers:{Authorization:`Bearer ${localStorage.getItem("auth_token")}`},body:f})).json()},P2=async(l,s)=>{const c=new FormData;return Object.entries(s).forEach(([f,m])=>{m!=null&&c.append(f,String(m))}),(await fetch(`/quick-phrases/${l}`,{method:"PUT",headers:{Authorization:`Bearer ${localStorage.getItem("auth_token")}`},body:c})).json()},eS=async l=>tt(`/quick-phrases/${l}`),tS=async l=>ie(`/quick-phrases/${l}/use`),aS=async()=>ae("/api/risk-control/status"),nS=async l=>ie(`/api/risk-control/${encodeURIComponent(l)}/fresh-captcha-url`),lS=async(l,s=300)=>{const c=new FormData;return c.append("cookie_id",l),c.append("timeout",String(s)),ie("/api/captcha/manual-session",c,{timeout:(s+30)*1e3})},uS=async(l,s)=>{const c=new FormData;return l&&c.append("cookie_id",l),(await fetch("/api/items/polish",{method:"POST",headers:{Authorization:`Bearer ${localStorage.getItem("auth_token")}`},body:c})).json()},iS=async l=>ie(`/api/orders/${l}/require-flower`),sS=async()=>ae("/api/seller-features"),cS=async(l,s)=>De(`/api/seller-features/${l}`,s),rS=async(l,s,c=1,r=!1)=>{const f=new FormData;return f.append("order_ids",l.join(",")),f.append("feedback",s),f.append("rate",String(c)),f.append("anonymous",String(r)),(await fetch("/api/orders/rate",{method:"POST",headers:{Authorization:`Bearer ${localStorage.getItem("auth_token")}`},body:f})).json()},oS=async()=>ae("/admin/stats"),fS=async()=>(await ae("/admin/users")).users||[],dS=async(l,s)=>gv(`/admin/users/${l}/status`,{is_active:s}),mS=async(l,s)=>De(`/admin/users/${l}/password`,{new_password:s}),hS=async l=>tt(`/admin/users/${l}`),yS=async(l=7)=>{let s;if(typeof l=="number"){const c=new Date,r=new Date;r.setDate(r.getDate()-l),s={start_date:r.toISOString().split("T")[0],end_date:c.toISOString().split("T")[0]}}else s=l;return ae("/analytics/orders",s)},pS=async l=>(await ae("/analytics/orders/valid",{start_date:l.start_date,end_date:l.end_date})).orders||[],gS=async()=>{const l=await ae("/cards");return Array.isArray(l)?l:l.cards||[]},bS=async l=>ie("/cards",l),vS=async(l,s)=>De(`/cards/${l}`,s),SS=async l=>tt(`/cards/${l}`),_S=async(l=200)=>{const s=await ae("/cards/shipped",{limit:l});return{total:s.total||0,shipments:s.shipments||[]}},xS=async()=>tt("/cards/shipped"),ES=async l=>{const s=new FormData;return s.append("image",l),ie("/upload-image",s)},AS=async()=>{const l=await ae("/items");return Array.isArray(l)?l:l.items||[]},TS=async l=>ie("/items/get-all-from-account",{cookie_id:l}),OS=async l=>ie("/items",l),NS=async(l,s)=>tt(`/items/${l}/${s}`),RS=async(l,s,c)=>De(`/items/${l}/${s}`,{item_detail:c}),wS=async(l,s,c)=>De(`/items/${l}/${s}/multi-quantity-delivery`,{multi_quantity_delivery:c}),zS=async()=>(await ae("/item-delivery-configs")).configs||[],jS=async(l,s)=>ae(`/items/${encodeURIComponent(l)}/${encodeURIComponent(s)}/delivery-config`),DS=async(l,s,c)=>De(`/items/${encodeURIComponent(l)}/${encodeURIComponent(s)}/delivery-config`,c),Wh=l=>({options:l.options||[],detection_status:l.detection_status||"ok",retry_after_seconds:l.retry_after_seconds,warning:l.warning}),CS=async(l,s)=>{const c=await ae(`/api/anti-abuse/sku-options/${encodeURIComponent(s)}`,{cookie_id:l});return Wh(c)},MS=async(l,s)=>{const c=await ae(`/api/anti-abuse/sku-options/${encodeURIComponent(s)}/buyer-test`,{cookie_id:l});return Wh(c)},US=async l=>(await ae("/product-automation/materials",void 0)).data||[],qS=async(l,s)=>(await De(`/product-automation/materials/${l}`,s)).data,BS=async l=>{await tt(`/product-automation/materials/${l}`)},HS=async()=>(await ae("/product-automation/filter-rules")).data||[],LS=async l=>(l.id?await De(`/product-automation/filter-rules/${l.id}`,l):await ie("/product-automation/filter-rules",l)).data,kS=async l=>{await tt(`/product-automation/filter-rules/${l}`)},YS=async l=>(await ie(`/product-automation/filter-rules/${l}/run`,{})).data,VS=async()=>(await ae("/product-automation/delete-rules")).data||[],XS=async l=>(l.id?await De(`/product-automation/delete-rules/${l.id}`,l):await ie("/product-automation/delete-rules",l)).data,GS=async l=>{await tt(`/product-automation/delete-rules/${l}`)},QS=async l=>(await ie(`/product-automation/delete-rules/${l}/preview`,{})).data,ZS=async(l=50)=>(await ae("/product-automation/runs",{limit:l})).data||[],Nr=async l=>(await ie(l,{})).data,KS=()=>Nr("/product-automation/repairs/published-ids"),JS=()=>Nr("/product-automation/repairs/short-links"),$S=()=>Nr("/product-automation/repairs/cards"),FS=async()=>{const l=await ae("/delivery-rules");return(Array.isArray(l)?l:l.data||l.rules||[]).map(c=>({id:String(c.id),name:c.description||c.keyword||"",item_keyword:c.keyword||"",cookie_id:c.cookie_id||void 0,item_id:c.item_id||void 0,item_title:c.item_title||void 0,card_group_id:c.card_id||0,card_group_name:c.card_name||"",priority:c.delivery_count||1,enabled:!!c.enabled,delivery_times:c.delivery_times||0}))},WS=async l=>{const s={keyword:l.item_keyword,card_id:l.card_group_id,delivery_count:l.priority,enabled:l.enabled??!0,description:l.name,cookie_id:l.cookie_id||null,item_id:l.item_id||null};return l.id?De(`/delivery-rules/${l.id}`,s):ie("/delivery-rules",s)},IS=async l=>tt(`/delivery-rules/${l}`),PS=async l=>(await ae(`/delivery-block-rules/${l}`)).rules,e_=async(l,s,c)=>(await De(`/delivery-block-rules/${l}/${s}`,c)).rule,t_=async l=>(await ae("/blacklist",l?{cookie_id:l}:void 0)).entries,a_=async l=>(await ie("/blacklist",l)).entry,n_=async(l,s)=>(await De(`/blacklist/${l}`,s)).entry,l_=async l=>{await tt(`/blacklist/${l}`)},u_=async l=>{if(!l)return[];const s=await ae(`/keywords-with-item-id/${l}`);return(Array.isArray(s)?s:[]).map((r,f)=>({id:String(f),keyword:r.keyword||"",reply_content:r.reply||"",item_id:r.item_id||"",match_type:"exact",enabled:!0}))},i_=async(l,s)=>{const c=await ae(`/keywords-with-item-id/${s}`),r=Array.isArray(c)?c:[];if(l.id){const f=parseInt(l.id);f>=0&&f{const c=await ae(`/keywords-with-item-id/${s}`),r=Array.isArray(c)?c:[],f=parseInt(l);return f>=0&&f{const l=await ae("/system-settings");return l.data||l},r_=async l=>{const s=Object.entries(l).map(([c,r])=>De(`/system-settings/${c}`,{value:String(r)}));return await Promise.all(s),{success:!0,message:"Settings saved"}},o_=async l=>ie("/system-settings/email-test",l),f_=async l=>ae(`/ai-reply-settings/${l}`),d_=async(l,s)=>{const c={ai_enabled:s.ai_enabled??!1,model_name:s.model_name??"qwen-plus",api_key:s.api_key??"",base_url:s.base_url??"https://dashscope.aliyuncs.com/compatible-mode/v1",max_discount_percent:s.max_discount_percent??10,max_discount_amount:s.max_discount_amount??100,max_bargain_rounds:s.max_bargain_rounds??3,context_enabled:s.context_enabled??!0,context_message_limit:s.context_message_limit??12,context_expire_minutes:s.context_expire_minutes??120,custom_prompts:s.custom_prompts??""};return De(`/ai-reply-settings/${l}`,c)},m_=async(l,s={})=>{const c=await ie(`/ai-reply-test/${l}`,{message:"你好,这是一条测试消息",...s});return{success:c.success??!0,message:c.message||"AI 连接测试成功",reply:c.reply}},h_=async()=>({success:!0,data:(await ae("/notification-channels")||[]).map(c=>{let r;try{r=JSON.parse(c.config)}catch{r=void 0}return{id:String(c.id),name:c.name,type:c.type,config:r||{},enabled:c.enabled,created_at:c.created_at,updated_at:c.updated_at}})}),y_=async l=>ie("/notification-channels",{...l,config:JSON.stringify(l.config)}),p_=async(l,s)=>{const c={...s};return"config"in s&&(c.config=JSON.stringify(s.config)),De(`/notification-channels/${l}`,c)},g_=async l=>tt(`/notification-channels/${l}`),b_=async()=>{const l=await ae("/notification-events");return{success:!0,events:(l==null?void 0:l.events)||[],priorities:(l==null?void 0:l.priorities)||[]}},v_=async()=>{const l=await ae("/message-notifications"),s=[];for(const[c,r]of Object.entries(l||{}))if(Array.isArray(r))for(const f of r)s.push({id:String(f.id),cookie_id:c,channel_id:f.channel_id,channel_name:f.channel_name,channel_type:f.channel_type,channel_enabled:f.channel_enabled!==!1,name:f.name??null,event_types:f.event_types??null,enabled:f.enabled});return{success:!0,data:s}},S_=async(l,s,c,r)=>ie(`/message-notifications/${l}`,{channel_id:s,enabled:c,...r?{name:r.name??"",event_types:r.eventTypes??[]}:{}}),__=async(l,s)=>{const c={};return s.name!==void 0&&(c.name=s.name),s.eventTypes!==void 0&&(c.event_types=s.eventTypes),s.enabled!==void 0&&(c.enabled=s.enabled),De(`/message-notifications/rule/${l}`,c)},x_=async l=>tt(`/message-notifications/${l}`),E_=async l=>ie(`/message-notifications/rule/${l}/test`),A_=async(l={})=>ae("/risk-control-logs",l),T_=async l=>tt(`/risk-control-logs/${l}`),O_=async(l={})=>ae("/logs",l),N_=async(l={})=>(await ae("/message-filters",l)).data||[],R_=async l=>ie("/message-filters/batch-create",l),w_=async l=>(await De(`/message-filters/${l}/toggle`,{})).data,z_=async l=>{await tt(`/message-filters/${l}`)},j_=async l=>(await ie("/message-filters/batch-delete",{ids:l})).deleted,D_=async()=>(await ae("/chat/accounts")).data||[],C_=async(l,s,c=30)=>(await ae(`/chat/conversations/${encodeURIComponent(l)}`,{cursor:s,limit:c})).data,M_=async(l,s,c,r=50)=>(await ae(`/chat/messages/${encodeURIComponent(l)}/${encodeURIComponent(s)}`,{cursor:c,limit:r})).data,U_=async(l,s)=>ie(`/chat/send/${encodeURIComponent(l)}`,s),q_=async(l,s)=>{const c=new FormData;return c.append("cid",s.cid),c.append("to_user_id",s.to_user_id),c.append("image",s.file),ie(`/chat/send-image/${encodeURIComponent(l)}`,c)},B_=async()=>ae("/default-replies"),H_=async l=>{const s=await ae(`/default-replies/${l}`);return{cookie_id:l,enabled:s.enabled||!1,reply_content:s.reply_content||"",reply_once:s.reply_once||!1,reply_image_url:s.reply_image_url||""}},L_=async(l,s)=>De(`/default-replies/${l}`,{enabled:s.enabled??!1,reply_content:s.reply_content||"",reply_once:s.reply_once??!1,reply_image_url:s.reply_image_url||""}),k_=async l=>tt(`/default-replies/${l}`),Y_=async l=>ie(`/default-replies/${l}/clear-records`,{}),Rv=async(l=!1)=>ae("/api/announcement",l?{force:!0}:void 0),V_=async(l,s=1,c=20,r="VALID")=>ae("/resell/favorites",{cookie_id:l,page:s,page_size:c,type:r}),X_=async(l,s,c=1,r=20)=>ae("/resell/search",{cookie_id:l,keyword:s,page:c,page_size:r}),G_=async()=>ae("/hotlist"),Q_=async l=>ie("/hotlist/refresh",{category:l}),Z_=async l=>ie("/resell/preview",l),K_=async()=>ae("/pricewatch/rules"),J_=async l=>ie("/pricewatch/rules",l),$_=async(l,s)=>De(`/pricewatch/rules/${l}`,s),F_=async l=>tt(`/pricewatch/rules/${l}`),W_=async l=>ie("/pricewatch/preview",l),I_=async l=>ie(`/pricewatch/rules/${l}/run`),P_=async(l,s=50)=>ae(`/pricewatch/rules/${l}/records`,{limit:s}),ex=async()=>ae("/pricewatch/cookies"),tx=async l=>ie("/resell/publish",l),ax=async l=>{const s=new FormData;return s.append("file",l),ie("/resell/upload-image",s,{timeout:6e4})},nx=async l=>ie("/resell/ai-optimize",l,{timeout:15e4}),lx=async l=>ie("/ai-optimize/preview",{cookie_id:l},{timeout:15e3}),ux=async l=>ie("/ai-optimize/suggest",{cookie_id:l},{timeout:36e4}),gr="app:feedback",br="app:confirm",wv=l=>/失败|错误|异常|无法|error|fail/i.test(l)?"error":/警告|注意|请输入|请选择|warning/i.test(l)?"warning":/成功|完成|已新增|已保存|已删除|success/i.test(l)?"success":"info",il=(l,s)=>{const c=String(l??"").trim();c&&window.dispatchEvent(new CustomEvent(gr,{detail:{id:`${Date.now()}-${Math.random().toString(36).slice(2)}`,message:c,type:s||wv(c)}}))},ix=(l,s={})=>new Promise(c=>{window.dispatchEvent(new CustomEvent(br,{detail:{message:l,title:s.title||"确认操作",confirmLabel:s.confirmLabel||"确认",cancelLabel:s.cancelLabel||"取消",danger:s.danger??!0,resolve:c}}))}),zv=/^[A-Za-z0-9_-]{3,32}$/,jv=/^[^@\s]+@[^@\s]+\.[^@\s]+$/,Dv=72;function Ih(l){return l?zv.test(l)?[!0,""]:[!1,"用户名需为 3-32 位字母、数字、下划线或连字符"]:[!1,"用户名不能为空"]}function Cv(l){return l?l.length>254?[!1,"邮箱地址过长"]:jv.test(l)?[!0,""]:[!1,"邮箱格式不正确"]:[!1,"邮箱不能为空"]}function Ph(l){if(!l)return[!1,"密码不能为空"];if(l.length<8)return[!1,"密码至少 8 位,且需同时包含字母和数字"];if(l.length>64)return[!1,"密码最长 64 位"];if(new TextEncoder().encode(l).length>Dv)return[!1,"密码过长(超过 72 字节),请缩短后重试"];const s=/[a-zA-Z]/.test(l),c=/\d/.test(l);return!s||!c?[!1,"密码至少 8 位,且需同时包含字母和数字"]:[!0,""]}const Mv=({activeTab:l,setActiveTab:s,onLogout:c,mobileOpen:r,onMobileClose:f,isAdmin:m=!1,username:h,onUsernameChange:p})=>{const[v,g]=B.useState(!1),[A,N]=B.useState(null),q=B.useRef(null),F=X=>m||!["settings","users"].includes(X.id);B.useEffect(()=>{if(!v)return;const X=Y=>{q.current&&!q.current.contains(Y.target)&&g(!1)};return document.addEventListener("mousedown",X),()=>document.removeEventListener("mousedown",X)},[v]);const W=[{label:"经营概览",items:[{id:"dashboard",icon:d1,label:"总览"}]},{label:"闲鱼业务",items:[{id:"accounts",icon:P1,label:"账号管理"},{id:"items",icon:$p,label:"商品与发货"},{id:"resell",icon:Y1,label:"一键转卖"},{id:"hotlist",icon:c1,label:"实时热卖榜"},{id:"pricewatch",icon:Q1,label:"价格监控"},{id:"orders",icon:B1,label:"订单管理"},{id:"buyer-interaction",icon:L1,label:"买家互动"},{id:"cards",icon:a1,label:"卡密库存"}]},{label:"客户沟通",items:[{id:"messages",icon:h1,label:"消息中心"},{id:"auto-reply",icon:O1,label:"自动回复"},{id:"ai-reply",icon:Kp,label:"AI 回复"}]},{label:"自动化",items:[{id:"product-automation",icon:tg,label:"商品自动化"}]},{label:"系统",items:[{id:"help",icon:Qp,label:"使用说明"},{id:"users",icon:J1,label:"用户管理"},{id:"notifications",icon:Xp,label:"通知与日志"},{id:"settings",icon:M1,label:"系统设置"},{id:"about",icon:bh,label:"关于"}].filter(F)}];return y.jsxs(y.Fragment,{children:[r&&y.jsx("button",{type:"button",className:"fixed inset-0 z-30 bg-black/40 lg:hidden",onClick:f,"aria-label":"关闭导航"}),y.jsxs("aside",{className:`fixed left-0 top-0 z-40 flex h-screen w-[248px] flex-col bg-[var(--surface)] transition-transform lg:translate-x-0 ${r?"translate-x-0":"-translate-x-full"}`,style:{borderRight:"1px solid var(--border)"},children:[y.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[y.jsxs("div",{className:"flex h-[76px] shrink-0 items-center gap-3 px-5",children:[y.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-xl",style:{background:"linear-gradient(140deg, var(--brand-300), var(--brand))",boxShadow:"var(--shadow-brand)"},children:y.jsx("span",{className:"text-lg font-black text-[#2a2416]",children:"躺"})}),y.jsxs("div",{className:"min-w-0 flex-1",children:[y.jsx("p",{className:"truncate text-base font-extrabold text-[var(--text)]",children:"躺赚鱼"}),y.jsx("p",{className:"mt-0.5 text-[11px] font-medium text-[var(--text-soft)]",children:"运营工作台"})]}),y.jsx("button",{type:"button",onClick:f,className:"rounded-full p-2 hover:bg-[var(--surface-hover)] lg:hidden","aria-label":"关闭导航",children:y.jsx(_h,{className:"w-5 h-5"})})]}),y.jsx("nav",{className:"min-h-0 flex-1 overflow-y-auto px-3 pb-4",children:W.map((X,Y)=>y.jsxs("div",{className:Y===0?"":"mt-5",children:[y.jsx("p",{className:"mb-2 px-3 text-[11px] font-bold uppercase tracking-wide text-[var(--text-soft)]",children:X.label}),y.jsx("div",{className:"space-y-1",children:X.items.map(C=>{const K=C.icon,Q=l===C.id;return y.jsxs("button",{type:"button",onClick:()=>s(C.id),className:`group flex min-h-11 w-full items-center gap-3 rounded-xl px-3 text-left transition-all ${Q?"font-bold text-[#2a2416]":"font-medium text-[var(--text-muted)] hover:bg-[var(--surface-hover)] hover:text-[var(--text)]"}`,style:Q?{background:"linear-gradient(135deg, var(--brand-300), var(--brand))",boxShadow:"var(--shadow-brand)"}:void 0,children:[y.jsx(K,{className:`h-[18px] w-[18px] shrink-0 ${Q?"text-[#2a2416]":"text-[var(--text-soft)] group-hover:text-[var(--text-muted)]"}`}),y.jsx("span",{className:"truncate text-sm",children:C.label})]},C.id)})})]},X.label))})]}),y.jsxs("div",{className:"shrink-0 p-3",style:{borderTop:"1px solid var(--border)"},children:[y.jsx(dr,{className:"mb-2"}),y.jsxs("div",{className:"relative",ref:q,children:[y.jsxs("button",{type:"button",onClick:()=>g(X=>!X),"aria-expanded":v,"aria-haspopup":"menu",className:"flex min-h-11 w-full items-center gap-3 rounded-xl px-3 text-left transition-colors hover:bg-[var(--surface-hover)]",children:[y.jsx("span",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-full text-xs font-black text-[#2a2416]",style:{background:"linear-gradient(140deg, var(--brand-300), var(--brand))"},children:(h||"?").slice(0,1).toUpperCase()}),y.jsxs("span",{className:"min-w-0 flex-1",children:[y.jsx("span",{className:"block truncate text-sm font-semibold text-[var(--text)]",children:h||"未登录"}),y.jsx("span",{className:"block text-[11px] font-medium text-[var(--text-soft)]",children:m?"管理员":"用户"})]}),y.jsx(Wp,{className:`h-4 w-4 shrink-0 text-[var(--text-soft)] transition-transform ${v?"":"rotate-180"}`})]}),v&&y.jsxs("div",{role:"menu",className:"absolute bottom-full left-0 right-0 mb-2 space-y-0.5 rounded-xl border bg-[var(--surface)] p-1.5 shadow-[var(--shadow-card,0_8px_24px_rgba(20,24,28,0.16))]",style:{borderColor:"var(--border)"},children:[!m&&y.jsxs("button",{type:"button",role:"menuitem",onClick:()=>{g(!1),N("rename")},className:"flex min-h-10 w-full items-center gap-3 rounded-lg px-3 text-left text-sm font-medium text-[var(--text-muted)] transition-colors hover:bg-[var(--surface-hover)] hover:text-[var(--text)]",children:[y.jsx(F1,{className:"h-4 w-4 shrink-0"}),"修改用户名"]}),y.jsxs("button",{type:"button",role:"menuitem",onClick:()=>{g(!1),N("password")},className:"flex min-h-10 w-full items-center gap-3 rounded-lg px-3 text-left text-sm font-medium text-[var(--text-muted)] transition-colors hover:bg-[var(--surface-hover)] hover:text-[var(--text)]",children:[y.jsx(vh,{className:"h-4 w-4 shrink-0"}),"修改密码"]}),y.jsx("div",{className:"my-1",style:{borderTop:"1px solid var(--border)"}}),y.jsxs("button",{type:"button",role:"menuitem",onClick:c,className:"flex min-h-10 w-full items-center gap-3 rounded-lg px-3 text-left text-sm font-medium text-[var(--text-muted)] transition-colors hover:bg-[var(--danger-soft)] hover:text-[var(--danger)]",children:[y.jsx(b1,{className:"h-4 w-4 shrink-0"}),"退出登录"]})]})]})]}),A&&Up.createPortal(y.jsx(Uv,{mode:A,isAdmin:m,onClose:()=>N(null),onRenamed:X=>{N(null),p==null||p(X)}}),document.body)]})]})},Uv=({mode:l,isAdmin:s,onClose:c,onRenamed:r})=>{const[f,m]=B.useState(""),[h,p]=B.useState(""),[v,g]=B.useState(""),[A,N]=B.useState(!1),q=l==="rename",F=async X=>{X.preventDefault();const Y=h.trim();if(q){if(!Ih(Y)){il("用户名需 3-32 位,仅限字母、数字、下划线或短横线","warning");return}}else{if(!Ph(Y)){il("新密码至少 8 位,且同时包含字母和数字","warning");return}if(Y!==v){il("两次输入的新密码不一致","warning");return}}N(!0);try{const C=q?await Sv(Y,f):await Tv(f,Y);C.success?(il(q?"用户名修改成功":"密码修改成功,下次登录请使用新密码","success"),q?r(Y):c()):il(C.message||"修改失败,请稍后重试","error")}catch{il("网络异常,修改失败","error")}finally{N(!1)}},W="ios-input h-11 w-full rounded-md px-4 text-sm";return y.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40 p-4",onClick:A?void 0:c,children:y.jsxs("form",{className:"w-full max-w-sm rounded-2xl bg-[var(--surface)] p-6 shadow-[0_12px_40px_rgba(20,24,28,0.24)]",onClick:X=>X.stopPropagation(),onSubmit:X=>void F(X),children:[y.jsx("h3",{className:"text-base font-extrabold text-[var(--text)]",children:q?"修改用户名":"修改密码"}),y.jsx("p",{className:"mt-1 text-xs text-[var(--text-soft)]",children:q?"用户名是登录凭证,修改后请用新用户名登录":"修改成功后当前登录保持有效"}),y.jsxs("label",{className:"mt-4 block",children:[y.jsx("span",{className:"mb-1.5 block text-xs font-bold text-[var(--text-muted)]",children:"当前密码"}),y.jsx("input",{type:"password",autoComplete:"current-password",value:f,onChange:X=>m(X.target.value),className:W,placeholder:"请输入当前密码",disabled:A})]}),y.jsxs("label",{className:"mt-3 block",children:[y.jsx("span",{className:"mb-1.5 block text-xs font-bold text-[var(--text-muted)]",children:q?"新用户名":"新密码"}),y.jsx("input",{type:q?"text":"password",autoComplete:q?"username":"new-password",value:h,onChange:X=>p(X.target.value),className:W,placeholder:q?"3-32 位字母/数字/下划线/短横线":"至少 8 位,含字母和数字",disabled:A})]}),!q&&y.jsxs("label",{className:"mt-3 block",children:[y.jsx("span",{className:"mb-1.5 block text-xs font-bold text-[var(--text-muted)]",children:"确认新密码"}),y.jsx("input",{type:"password",autoComplete:"new-password",value:v,onChange:X=>g(X.target.value),className:W,placeholder:"再次输入新密码",disabled:A})]}),y.jsxs("div",{className:"mt-6 flex gap-3",children:[y.jsx("button",{type:"button",onClick:c,disabled:A,className:"ios-btn-secondary h-11 flex-1 rounded-md text-sm font-bold",children:"取消"}),y.jsx("button",{type:"submit",disabled:A||!f||!h.trim(),className:"ios-btn-primary h-11 flex-1 rounded-md text-sm font-bold disabled:opacity-60",children:A?y.jsx(su,{className:"mx-auto h-4 w-4 animate-spin"}):"确认修改"})]})]})})},qv={success:{icon:or,className:"border-emerald-200 bg-emerald-50 text-emerald-800"},error:{icon:Pp,className:"border-red-200 bg-red-50 text-red-800"},warning:{icon:Sh,className:"border-amber-200 bg-amber-50 text-amber-900"},info:{icon:bh,className:"border-gray-200 bg-white text-gray-800"}},Bv=()=>{const[l,s]=B.useState([]),[c,r]=B.useState(null);B.useEffect(()=>{const m=p=>{const v=p.detail;s(g=>[...g.slice(-3),v]),window.setTimeout(()=>{s(g=>g.filter(A=>A.id!==v.id))},v.type==="error"?6e3:3600)},h=p=>{r(p.detail)};return window.addEventListener(gr,m),window.addEventListener(br,h),()=>{window.removeEventListener(gr,m),window.removeEventListener(br,h)}},[]),B.useEffect(()=>{if(!c)return;const m=h=>{h.key==="Escape"&&(c.resolve(!1),r(null))};return window.addEventListener("keydown",m),()=>window.removeEventListener("keydown",m)},[c]);const f=m=>{c==null||c.resolve(m),r(null)};return y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"fixed right-4 top-4 z-[10000] flex w-[min(380px,calc(100vw-2rem))] flex-col gap-2","aria-live":"polite",children:l.map(m=>{const h=qv[m.type],p=h.icon;return y.jsxs("div",{role:m.type==="error"?"alert":"status",className:`flex items-start gap-3 rounded-md border px-4 py-3 shadow-[0_4px_16px_rgba(20,24,28,0.10)] ${h.className}`,children:[y.jsx(p,{className:"mt-0.5 h-5 w-5 shrink-0"}),y.jsx("span",{className:"min-w-0 flex-1 break-words text-sm font-medium",children:m.message}),y.jsx("button",{type:"button",className:"shrink-0 rounded p-0.5 hover:bg-black/5",onClick:()=>s(v=>v.filter(g=>g.id!==m.id)),"aria-label":"关闭提示",children:y.jsx(_h,{className:"h-4 w-4"})})]},m.id)})}),c&&y.jsx("div",{className:"modal-overlay",role:"presentation",onMouseDown:m=>{m.target===m.currentTarget&&f(!1)},children:y.jsxs("div",{role:"alertdialog","aria-modal":"true","aria-labelledby":"global-confirm-title","aria-describedby":"global-confirm-message",className:"modal-container max-w-md",children:[y.jsxs("div",{className:"modal-body flex items-start gap-3",children:[y.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-md bg-amber-50 text-amber-700",children:y.jsx(Sh,{className:"h-5 w-5"})}),y.jsxs("div",{className:"min-w-0",children:[y.jsx("h2",{id:"global-confirm-title",className:"text-base font-bold text-gray-900",children:c.title}),y.jsx("p",{id:"global-confirm-message",className:"mt-1 break-words text-sm leading-6 text-gray-600",children:c.message})]})]}),y.jsxs("div",{className:"modal-footer flex justify-end gap-2",children:[y.jsx("button",{type:"button",className:"ios-btn-secondary rounded-md px-4 py-2 text-sm",onClick:()=>f(!1),children:c.cancelLabel}),y.jsx("button",{type:"button",className:`${c.danger?"ios-btn-danger":"ios-btn-primary"} rounded-md px-4 py-2 text-sm`,onClick:()=>f(!0),autoFocus:!0,children:c.confirmLabel})]})]})})]})},Hv={info:"border-[#ffe566] bg-[#fffdf0] text-[#6b5200]",warning:"border-[#f5c800] bg-[#fff7e6] text-[#8a6300]",danger:"border-red-200 bg-red-50 text-red-700"},oh={info:"bg-[#ffe100] text-[#2a2416]",warning:"bg-[#f5c800] text-[#2a2416]",danger:"bg-red-600 text-white"},Lv=()=>{const[l,s]=B.useState(null);B.useEffect(()=>{const h=()=>{Rv().then(s).catch(()=>{})};h();const p=setInterval(h,3e5);return()=>clearInterval(p)},[]);const c=(l==null?void 0:l.announcements)||[],r=!!(l!=null&&l.has_update);if(!c.length&&!r)return null;const f=c.some(h=>h.level==="danger")?"danger":c.some(h=>h.level==="warning")?"warning":"info",m=c.map(h=>y.jsxs("span",{className:"inline-flex items-center gap-2 px-8",children:[y.jsx("span",{className:`rounded px-1.5 py-0.5 text-[10px] font-bold ${oh[h.level]||oh.info}`,children:h.level==="danger"?"重要":h.level==="warning"?"注意":"通知"}),h.title&&y.jsx("b",{className:"font-bold",children:h.title}),y.jsx("span",{children:h.content.replace(/\s*\n\s*/g," ")}),h.published_at&&y.jsx("span",{className:"text-[11px] opacity-60",children:h.published_at})]},h.id));return y.jsxs("div",{className:"mx-auto max-w-[1320px] space-y-2 px-4 pt-4 sm:px-6 lg:px-8",children:[r&&y.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 rounded-md border border-amber-200 bg-amber-50 px-4 py-3",children:[y.jsxs("div",{className:"min-w-0",children:[y.jsxs("p",{className:"text-sm font-bold text-amber-900",children:["发现新版本 ",l==null?void 0:l.latest_version,y.jsxs("span",{className:"ml-2 font-normal text-amber-700",children:["当前 ",l==null?void 0:l.local_version]})]}),(l==null?void 0:l.release_notes)&&y.jsx("p",{className:"mt-1 whitespace-pre-wrap text-xs leading-relaxed text-amber-800",children:l.release_notes})]}),(l==null?void 0:l.download_url)&&y.jsxs("a",{href:l.download_url,target:"_blank",rel:"noopener noreferrer",className:"ios-btn-primary inline-flex flex-none items-center gap-2 rounded-md px-3 py-2 text-xs",children:[y.jsx(l1,{className:"h-4 w-4"}),"前往下载",y.jsx(i1,{className:"h-3 w-3"})]})]}),c.length>0&&y.jsxs("div",{className:`flex items-center gap-3 overflow-hidden rounded-md border px-3 py-2 ${Hv[f]}`,children:[y.jsx(x1,{className:"h-4 w-4 flex-none"}),y.jsx("div",{className:"marquee min-w-0 flex-1",children:y.jsxs("div",{className:"marquee__track text-xs leading-relaxed",children:[m,y.jsx("span",{"aria-hidden":"true",children:m})]})})]})]})},fh=({image:l,code:s,onCodeChange:c,onRefresh:r,label:f="图形验证码"})=>y.jsxs("label",{className:"block",children:[y.jsx("span",{className:"mb-1.5 block text-xs font-bold text-gray-600",children:f}),y.jsxs("div",{className:"flex gap-2",children:[y.jsx("input",{type:"text",placeholder:"请输入图中字符",value:s,onChange:m=>c(m.target.value),maxLength:4,autoComplete:"off",className:"ios-input h-11 w-full rounded-md px-4 text-sm uppercase"}),l?y.jsx("img",{src:l,alt:"图形验证码,点击换一张",title:"看不清?点击换一张",onClick:r,className:"h-11 w-28 shrink-0 cursor-pointer rounded-md border border-gray-200 bg-white"}):y.jsx("button",{type:"button",onClick:r,className:"h-11 w-28 shrink-0 rounded-md border border-gray-200 bg-gray-50 text-xs text-gray-500",children:"点击获取"}),y.jsx("button",{type:"button",onClick:r,"aria-label":"刷新图形验证码",className:"ios-btn-secondary h-11 shrink-0 rounded-md px-2",children:y.jsx(D1,{className:"h-4 w-4"})})]})]});function dh(l=!1){const[s,c]=B.useState(()=>mh()),[r,f]=B.useState(""),[m,h]=B.useState(""),[p,v]=B.useState(!1),g=B.useCallback(async()=>{const A=mh();c(A),h("");try{const N=await Ev(A);N.success&&f(N.captcha_image)}catch{}},[]);return B.useEffect(()=>{l&&g()},[]),{sessionId:s,image:r,code:m,setCode:h,required:p,setRequired:v,refresh:g}}function mh(){return typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():`sess-${Date.now()}-${Math.random().toString(36).slice(2)}`}const kv=B.lazy(()=>et(()=>import("./Dashboard-CAq3bjQ4.js"),__vite__mapDeps([0,1,2,3,4,5]))),Yv=B.lazy(()=>et(()=>import("./AccountList-BfQLeVfu.js"),__vite__mapDeps([6,1,7,8,9,10,11,12,13,14]))),Vv=B.lazy(()=>et(()=>import("./OrderList-C360pT64.js"),__vite__mapDeps([15,1,16,17,18,5,19,13,20,10,21,14]))),Xv=B.lazy(()=>et(()=>import("./CardList-Dpxu25YO.js"),__vite__mapDeps([22,1,16,20,10,2,14,23,5]))),Gv=B.lazy(()=>et(()=>import("./ItemList-ZOic6eUK.js"),__vite__mapDeps([24,1,25,14,10,16,26,9,5,8,27,20]))),Qv=B.lazy(()=>et(()=>import("./ProductAutomation-pKlYog5s.js"),__vite__mapDeps([28,1,18,10,14,29,5,30]))),Zv=B.lazy(()=>et(()=>import("./AIReply-DjnHfMhY.js"),__vite__mapDeps([31,1,14,32,12,13,29]))),Kv=B.lazy(()=>et(()=>import("./Settings-MN37oq4U.js"),__vite__mapDeps([33,1,14,8,34,12,13]))),Jv=B.lazy(()=>et(()=>import("./Keywords-DnsgE2cb.js"),__vite__mapDeps([35,1,17,11,16,9,10,26,14,8]))),$v=B.lazy(()=>et(()=>import("./MessageManagement-BrI_glnU.js"),__vite__mapDeps([36,1,27,18,2,23,34,37,16,10]))),Fv=B.lazy(()=>et(()=>import("./NotificationsAndLogs-ra-r3ESv.js"),__vite__mapDeps([38,1,30,25,4,16,39,10,37,21,14,7]))),Wv=B.lazy(()=>et(()=>import("./UserManagement-DNkJBqM1.js"),__vite__mapDeps([40,1,10]))),Iv=B.lazy(()=>et(()=>import("./About-CfzyaDvI.js"),__vite__mapDeps([41,1]))),Pv=B.lazy(()=>et(()=>import("./BuyerInteraction-tZgTn_6g.js"),__vite__mapDeps([42,1,14,25,19,32]))),e2=B.lazy(()=>et(()=>import("./Resell-MelTfsde.js"),__vite__mapDeps([43,1,18,16,8,2]))),t2=B.lazy(()=>et(()=>import("./HotList-DLevJN_u.js"),__vite__mapDeps([44,1,3,2]))),a2=B.lazy(()=>et(()=>import("./PriceWatch-mbt9tO4Q.js"),__vite__mapDeps([45,1,16,29,39,10,18]))),n2=B.lazy(()=>et(()=>import("./Help-CcYy9cNP.js"),[])),Pe=()=>y.jsxs("div",{className:"page-loading",children:[y.jsx(su,{className:"h-5 w-5 animate-spin"}),y.jsx("span",{children:"正在加载页面"})]}),l2={dashboard:"总览",accounts:"账号管理",items:"商品与发货",resell:"一键转卖",hotlist:"实时热卖榜",pricewatch:"价格监控",orders:"订单管理","buyer-interaction":"买家互动",cards:"卡密库存",messages:"消息中心","auto-reply":"自动回复","ai-reply":"AI 回复","product-automation":"商品自动化",notifications:"通知与日志",settings:"系统设置",users:"用户管理",about:"关于",help:"使用说明"},u2=["settings","users"],i2=()=>{const[l,s]=B.useState(!1),[c,r]=B.useState(()=>localStorage.getItem("active_page")||"dashboard"),[f,m]=B.useState(!0),[h,p]=B.useState(""),[v,g]=B.useState(""),[A,N]=B.useState(!1),[q,F]=B.useState(""),[W,X]=B.useState(""),[Y,C]=B.useState(!1),[K,Q]=B.useState(!1),[ee,Ee]=B.useState("login"),[me,ne]=B.useState(!1),[Le,ct]=B.useState(!0),[be,Me]=B.useState({username:"",email:"",password:"",code:""}),[ke,xt]=B.useState(!1),[He,Re]=B.useState(""),[z,L]=B.useState(""),[P,Se]=B.useState(!1),[re,S]=B.useState(0),j=dh(),H=dh();B.useEffect(()=>{ee==="register"&&j.refresh()},[ee]),B.useEffect(()=>{vv().then(k=>{ne(String(k.registration_enabled)==="true"),ct(String(k.email_verification_enabled??"true")!=="false")}).catch(()=>ne(!1))},[]),B.useEffect(()=>{if(re<=0)return;const k=setTimeout(()=>S(re-1),1e3);return()=>clearTimeout(k)},[re]);const G=async()=>{if(!be.email.trim()){Re("请先填写邮箱");return}if(!j.code.trim()){Re("请先输入图形验证码");return}Se(!0),Re(""),L("");try{const k=await xv(be.email.trim(),"register",{session_id:j.sessionId,code:j.code.trim()});if((k==null?void 0:k.success)===!1){Re(k.message||"验证码发送失败,请确认邮件服务已配置"),j.refresh();return}L("验证码已发送,请查收邮箱"),S(60),j.refresh()}catch(k){Re(k instanceof Error?k.message:"验证码发送失败"),j.refresh()}finally{Se(!1)}},le=async k=>{k.preventDefault(),Re(""),L("");for(const[ue,Te]of[Ih(be.username.trim()),Cv(be.email.trim()),Ph(be.password)])if(!ue){Re(Te);return}if(Le&&!be.code.trim()){Re("请填写邮箱验证码");return}xt(!0);try{const ue=await _v({username:be.username.trim(),email:be.email.trim(),password:be.password,...Le?{verification_code:be.code.trim()}:{}});ue!=null&&ue.success?(p(be.username.trim()),g(""),Me({username:"",email:"",password:"",code:""}),Ee("login"),F(""),L(""),X("注册成功,请使用新账号登录")):Re((ue==null?void 0:ue.message)||"注册失败")}catch(ue){Re(ue instanceof Error?ue.message:"注册失败,请稍后重试")}finally{xt(!1)}};B.useEffect(()=>{localStorage.getItem("auth_token")?Av().then(Te=>{if(!Te.authenticated){localStorage.removeItem("auth_token");return}Q(!!Te.is_admin),p(Te.username||""),s(!0)}).catch(()=>localStorage.removeItem("auth_token")).finally(()=>m(!1)):m(!1);const ue=()=>s(!1);return window.addEventListener("auth:logout",ue),()=>window.removeEventListener("auth:logout",ue)},[]),B.useEffect(()=>{localStorage.setItem("active_page",c)},[c]),B.useEffect(()=>{!K&&u2.includes(c)&&r("dashboard")},[K]);const Z=async k=>{k.preventDefault(),N(!0),F("");try{const ue=await bv({username:h,password:v,...H.required?{captcha_session_id:H.sessionId,captcha_code:H.code.trim()}:{}});ue.success&&ue.token?(localStorage.setItem("auth_token",ue.token),Q(!!ue.is_admin),p(ue.username||h),s(!0)):(F(ue.message||"账号或密码错误"),ue.captcha_required&&(H.setRequired(!0),H.refresh()))}catch(ue){F(ue instanceof Error?ue.message:"登录失败,请稍后重试")}finally{N(!1)}};return f?y.jsx("div",{className:"min-h-screen flex items-center justify-center bg-[var(--app-bg)]",children:y.jsxs("div",{className:"flex items-center gap-3 text-sm font-semibold text-[var(--text-muted)]",children:[y.jsx(su,{className:"h-5 w-5 animate-spin text-[var(--brand-text)]"}),"正在验证登录状态"]})}):l?y.jsxs("div",{className:"flex min-h-screen bg-[var(--app-bg)] text-[var(--text)]",children:[y.jsx(Bv,{}),y.jsx(Mv,{activeTab:c,setActiveTab:k=>{r(k),C(!1)},mobileOpen:Y,onMobileClose:()=>C(!1),isAdmin:K,username:l?h:"",onUsernameChange:p,onLogout:()=>{localStorage.removeItem("auth_token"),Q(!1),s(!1)}}),y.jsxs("main",{className:"min-h-screen min-w-0 flex-1 overflow-y-auto lg:ml-[248px]",children:[y.jsxs("header",{className:"sticky top-0 z-20 flex h-14 items-center gap-3 border-b border-[var(--border)] bg-[var(--surface)] px-4 lg:hidden",children:[y.jsx("button",{type:"button",onClick:()=>C(!0),className:"p-2 -ml-2 rounded-md hover:bg-gray-100",title:"打开导航","aria-label":"打开导航",children:y.jsx(A1,{className:"w-5 h-5"})}),y.jsxs("div",{className:"min-w-0",children:[y.jsx("p",{className:"truncate text-sm font-bold",children:l2[c]||"躺赚鱼"}),y.jsx("p",{className:"text-[11px] text-gray-400",children:"躺赚鱼"})]}),y.jsx(dr,{compact:!0,className:"ml-auto"})]}),c!=="messages"&&y.jsx(Lv,{}),y.jsxs("div",{className:c==="messages"?"h-[calc(100vh-3.5rem)] lg:h-screen overflow-hidden":"mx-auto max-w-[1320px] p-4 pb-10 sm:p-6 lg:p-8",children:[y.jsx("section",{hidden:c!=="dashboard",children:y.jsx(B.Suspense,{fallback:c==="dashboard"?y.jsx(Pe,{}):null,children:y.jsx(kv,{})})}),y.jsx("section",{hidden:c!=="accounts",children:y.jsx(B.Suspense,{fallback:c==="accounts"?y.jsx(Pe,{}):null,children:y.jsx(Yv,{})})}),y.jsx("section",{hidden:c!=="items",children:y.jsx(B.Suspense,{fallback:c==="items"?y.jsx(Pe,{}):null,children:y.jsx(Gv,{})})}),y.jsx("section",{hidden:c!=="resell",children:y.jsx(B.Suspense,{fallback:c==="resell"?y.jsx(Pe,{}):null,children:y.jsx(e2,{})})}),y.jsx("section",{hidden:c!=="hotlist",children:y.jsx(B.Suspense,{fallback:c==="hotlist"?y.jsx(Pe,{}):null,children:y.jsx(t2,{})})}),y.jsx("section",{hidden:c!=="pricewatch",children:y.jsx(B.Suspense,{fallback:c==="pricewatch"?y.jsx(Pe,{}):null,children:y.jsx(a2,{})})}),y.jsx("section",{hidden:c!=="product-automation",children:y.jsx(B.Suspense,{fallback:c==="product-automation"?y.jsx(Pe,{}):null,children:y.jsx(Qv,{})})}),y.jsx("section",{hidden:c!=="orders",children:y.jsx(B.Suspense,{fallback:c==="orders"?y.jsx(Pe,{}):null,children:y.jsx(Vv,{})})}),y.jsx("section",{hidden:c!=="cards",children:y.jsx(B.Suspense,{fallback:c==="cards"?y.jsx(Pe,{}):null,children:y.jsx(Xv,{})})}),y.jsx("section",{hidden:c!=="auto-reply",children:y.jsx(B.Suspense,{fallback:c==="auto-reply"?y.jsx(Pe,{}):null,children:y.jsx(Jv,{mode:"reply"})})}),y.jsx("section",{hidden:c!=="ai-reply",children:y.jsx(B.Suspense,{fallback:c==="ai-reply"?y.jsx(Pe,{}):null,children:y.jsx(Zv,{})})}),y.jsx("section",{hidden:c!=="messages",className:"h-full min-h-0",children:y.jsx(B.Suspense,{fallback:c==="messages"?y.jsx(Pe,{}):null,children:y.jsx($v,{isActive:c==="messages"})})}),y.jsx("section",{hidden:c!=="notifications",children:y.jsx(B.Suspense,{fallback:c==="notifications"?y.jsx(Pe,{}):null,children:y.jsx(Fv,{isAdmin:K})})}),K&&y.jsx("section",{hidden:c!=="users",children:y.jsx(B.Suspense,{fallback:c==="users"?y.jsx(Pe,{}):null,children:y.jsx(Wv,{})})}),K&&y.jsx("section",{hidden:c!=="settings",children:y.jsx(B.Suspense,{fallback:c==="settings"?y.jsx(Pe,{}):null,children:y.jsx(Kv,{})})}),y.jsx("section",{hidden:c!=="buyer-interaction",children:y.jsx(B.Suspense,{fallback:c==="buyer-interaction"?y.jsx(Pe,{}):null,children:y.jsx(Pv,{})})}),y.jsx("section",{hidden:c!=="about",children:y.jsx(B.Suspense,{fallback:c==="about"?y.jsx(Pe,{}):null,children:y.jsx(Iv,{})})}),y.jsx("section",{hidden:c!=="help",children:y.jsx(B.Suspense,{fallback:c==="help"?y.jsx(Pe,{}):null,children:y.jsx(n2,{})})})]})]})]}):y.jsxs("div",{className:"relative min-h-screen bg-[var(--app-bg)] p-4 font-sans text-[var(--text)] sm:p-6",children:[y.jsx(dr,{compact:!0,className:"absolute right-4 top-4 z-10 sm:right-6 sm:top-6"}),y.jsx("div",{className:"mx-auto flex min-h-[calc(100vh-2rem)] max-w-5xl items-center justify-center sm:min-h-[calc(100vh-3rem)]",children:y.jsxs("div",{className:"grid w-full overflow-hidden rounded-3xl bg-[var(--surface)] lg:grid-cols-[1.05fr_0.95fr]",style:{border:"1px solid var(--border)",boxShadow:"var(--shadow-lg)"},children:[y.jsxs("div",{className:"theme-brand-panel hidden min-h-[560px] flex-col justify-between p-10 lg:flex",style:{background:"linear-gradient(155deg, #fff8d1 0%, #ffe566 55%, #ffe100 100%)"},children:[y.jsxs("div",{children:[y.jsx("div",{className:"flex h-14 w-14 items-center justify-center rounded-2xl bg-white/70 backdrop-blur",children:y.jsx("span",{className:"text-2xl font-black text-[#2a2416]",children:"躺"})}),y.jsx("p",{className:"mt-7 text-xs font-bold tracking-widest text-[#8a6300]",children:"TANGZHUAN YU"}),y.jsx("h1",{className:"mt-2 max-w-md text-3xl font-extrabold leading-tight text-[#2a2416]",children:"躺赚鱼"}),y.jsx("p",{className:"mt-4 max-w-md text-sm leading-7 text-[#6b5200]",children:"统一处理账号、商品、订单、消息、回复和自动发货。"})]}),y.jsx("div",{className:"grid grid-cols-2 gap-3",children:["账号与商品同步","订单与发货处理","消息与自动回复","通知与运行日志"].map(k=>y.jsx("div",{className:"rounded-2xl bg-white/70 px-4 py-3 text-xs font-bold text-[#544c39] backdrop-blur",children:k},k))})]}),y.jsx("div",{className:"flex min-h-[500px] items-center p-7 sm:p-10",children:y.jsxs("div",{className:"mx-auto w-full max-w-sm animate-fade-in",children:[y.jsxs("div",{className:"mb-8",children:[y.jsx("div",{className:"mb-5 flex h-14 w-14 items-center justify-center rounded-2xl lg:hidden",style:{background:"linear-gradient(140deg, var(--brand-300), var(--brand))",boxShadow:"var(--shadow-brand)"},children:y.jsx("span",{className:"text-xl font-black text-[#2a2416]",children:"躺"})}),y.jsx("h2",{className:"text-2xl font-extrabold text-gray-900",children:ee==="login"?"登录管理后台":"注册新账号"}),y.jsx("p",{className:"mt-2 text-sm text-gray-500",children:ee==="login"?"使用管理员账号进入工作台":"创建账号后即可登录工作台"})]}),ee==="login"&&y.jsxs("form",{onSubmit:Z,className:"space-y-5",children:[y.jsxs("div",{className:"space-y-4",children:[y.jsxs("label",{className:"block",children:[y.jsx("span",{className:"mb-1.5 block text-xs font-bold text-gray-600",children:"管理员账号"}),y.jsxs("div",{className:"relative group",children:[y.jsx(Gm,{className:"absolute left-3.5 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400 group-focus-within:text-gray-700"}),y.jsx("input",{type:"text",placeholder:"请输入账号",value:h,onChange:k=>p(k.target.value),autoComplete:"username",required:!0,className:"ios-input h-11 w-full rounded-md py-2.5 pl-10 pr-4 text-sm"})]})]}),y.jsxs("label",{className:"block",children:[y.jsx("span",{className:"mb-1.5 block text-xs font-bold text-gray-600",children:"密码"}),y.jsxs("div",{className:"relative group",children:[y.jsx(Vm,{className:"absolute left-3.5 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400 group-focus-within:text-gray-700"}),y.jsx("input",{type:"password",placeholder:"请输入密码",value:v,onChange:k=>g(k.target.value),autoComplete:"current-password",required:!0,className:"ios-input h-11 w-full rounded-md py-2.5 pl-10 pr-4 text-sm"})]})]}),H.required&&y.jsx(fh,{image:H.image,code:H.code,onCodeChange:H.setCode,onRefresh:()=>void H.refresh()})]}),W&&y.jsxs("div",{role:"status",className:"flex items-center gap-2 rounded-md border border-green-200 bg-green-50 p-3 text-sm font-semibold text-green-700",children:[y.jsx(or,{className:"h-4 w-4 shrink-0"})," ",W]}),q&&y.jsxs("div",{role:"alert",className:"flex items-center gap-2 rounded-md border border-red-200 bg-red-50 p-3 text-sm font-semibold text-red-700",children:[y.jsx(Xm,{className:"h-4 w-4 shrink-0"})," ",q]}),y.jsx("button",{type:"submit",disabled:A,className:"ios-btn-primary flex h-11 w-full items-center justify-center gap-2 rounded-md text-sm disabled:opacity-70",children:A?y.jsx(su,{className:"h-4 w-4 animate-spin"}):y.jsxs(y.Fragment,{children:["登录 ",y.jsx(Ym,{className:"h-4 w-4"})]})})]}),ee==="register"&&y.jsxs("form",{onSubmit:le,className:"space-y-5",children:[y.jsxs("div",{className:"space-y-4",children:[y.jsxs("label",{className:"block",children:[y.jsx("span",{className:"mb-1.5 block text-xs font-bold text-gray-600",children:"账号"}),y.jsxs("div",{className:"relative group",children:[y.jsx(Gm,{className:"absolute left-3.5 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400 group-focus-within:text-gray-700"}),y.jsx("input",{type:"text",placeholder:"设置登录账号",value:be.username,onChange:k=>Me({...be,username:k.target.value}),autoComplete:"username",required:!0,className:"ios-input h-11 w-full rounded-md py-2.5 pl-10 pr-4 text-sm"})]})]}),y.jsxs("label",{className:"block",children:[y.jsx("span",{className:"mb-1.5 block text-xs font-bold text-gray-600",children:"邮箱"}),y.jsxs("div",{className:"relative group",children:[y.jsx(S1,{className:"absolute left-3.5 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400 group-focus-within:text-gray-700"}),y.jsx("input",{type:"email",placeholder:"用于找回账号",value:be.email,onChange:k=>Me({...be,email:k.target.value}),autoComplete:"email",required:!0,className:"ios-input h-11 w-full rounded-md py-2.5 pl-10 pr-4 text-sm"})]})]}),y.jsxs("label",{className:"block",children:[y.jsx("span",{className:"mb-1.5 block text-xs font-bold text-gray-600",children:"密码"}),y.jsxs("div",{className:"relative group",children:[y.jsx(Vm,{className:"absolute left-3.5 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400 group-focus-within:text-gray-700"}),y.jsx("input",{type:"password",placeholder:"至少 8 位,含字母和数字",value:be.password,onChange:k=>Me({...be,password:k.target.value}),autoComplete:"new-password",required:!0,className:"ios-input h-11 w-full rounded-md py-2.5 pl-10 pr-4 text-sm"})]})]}),Le&&y.jsxs(y.Fragment,{children:[y.jsx(fh,{image:j.image,code:j.code,onCodeChange:j.setCode,onRefresh:()=>void j.refresh()}),y.jsxs("label",{className:"block",children:[y.jsx("span",{className:"mb-1.5 block text-xs font-bold text-gray-600",children:"邮箱验证码"}),y.jsxs("div",{className:"flex gap-2",children:[y.jsxs("div",{className:"relative group flex-1",children:[y.jsx(vh,{className:"absolute left-3.5 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400 group-focus-within:text-gray-700"}),y.jsx("input",{type:"text",placeholder:"请输入验证码",value:be.code,onChange:k=>Me({...be,code:k.target.value}),className:"ios-input h-11 w-full rounded-md py-2.5 pl-10 pr-4 text-sm"})]}),y.jsx("button",{type:"button",onClick:()=>void G(),disabled:P||re>0,className:"ios-btn-secondary h-11 shrink-0 rounded-md px-3 text-xs font-bold disabled:opacity-60",children:re>0?`${re}s`:P?"发送中":"获取验证码"})]})]})]})]}),z&&y.jsxs("div",{role:"status",className:"flex items-center gap-2 rounded-md border border-green-200 bg-green-50 p-3 text-sm font-semibold text-green-700",children:[y.jsx(or,{className:"h-4 w-4 shrink-0"})," ",z]}),He&&y.jsxs("div",{role:"alert",className:"flex items-center gap-2 rounded-md border border-red-200 bg-red-50 p-3 text-sm font-semibold text-red-700",children:[y.jsx(Xm,{className:"h-4 w-4 shrink-0"})," ",He]}),y.jsx("button",{type:"submit",disabled:ke,className:"ios-btn-primary flex h-11 w-full items-center justify-center gap-2 rounded-md text-sm disabled:opacity-70",children:ke?y.jsx(su,{className:"h-4 w-4 animate-spin"}):y.jsxs(y.Fragment,{children:["注册 ",y.jsx(Ym,{className:"h-4 w-4"})]})})]}),me&&y.jsx("div",{className:"mt-5 text-center text-xs text-gray-500",children:ee==="login"?y.jsxs(y.Fragment,{children:["还没有账号?",y.jsx("button",{type:"button",onClick:()=>{Ee("register"),F(""),X("")},className:"ml-1 font-bold text-[var(--brand-text)] hover:underline",children:"注册新账号"})]}):y.jsxs(y.Fragment,{children:["已有账号?",y.jsx("button",{type:"button",onClick:()=>{Ee("login"),Re(""),L("")},className:"ml-1 font-bold text-[var(--brand-text)] hover:underline",children:"返回登录"})]})}),y.jsxs("p",{className:"mt-7 border-t border-gray-100 pt-5 text-xs font-medium text-gray-400",children:["更多开源应用:",y.jsx("a",{href:"https://nav.88531.cn",target:"_blank",rel:"noopener noreferrer",className:"text-[var(--brand-text)] hover:underline",children:"https://nav.88531.cn"})]})]})})]})})]})},ey=document.getElementById("root");if(!ey)throw new Error("Could not find root element to mount to");const s2=Dp.createRoot(ey);s2.render(y.jsx(yh.StrictMode,{children:y.jsx(ug,{children:y.jsx(i2,{})})}));export{Z2 as $,C2 as A,Kp as B,Pp as C,M2 as D,i1 as E,U2 as F,H2 as G,q2 as H,B2 as I,L2 as J,d_ as K,su as L,O1 as M,lx as N,yh as O,l1 as P,L1 as Q,c2 as R,Xm as S,sS as T,P1 as U,Y2 as V,Q2 as W,_h as X,$2 as Y,F2 as Z,iS as _,vr as a,P2 as a$,G2 as a0,J2 as a1,K2 as a2,V2 as a3,X2 as a4,rS as a5,ES as a6,_S as a7,gS as a8,a1 as a9,tg as aA,KS as aB,JS as aC,$S as aD,or as aE,US as aF,HS as aG,VS as aH,ZS as aI,BS as aJ,LS as aK,YS as aL,kS as aM,XS as aN,QS as aO,GS as aP,qS as aQ,m_ as aR,c_ as aS,F1 as aT,S1 as aU,x1 as aV,W2 as aW,r_ as aX,Ph as aY,Tv as aZ,I2 as a_,vS as aa,SS as ab,bS as ac,xS as ad,PS as ae,t_ as af,e_ as ag,a_ as ah,n_ as ai,l_ as aj,vh as ak,WS as al,IS as am,CS as an,MS as ao,$p as ap,B1 as aq,FS as ar,zS as as,uS as at,jS as au,DS as av,wS as aw,NS as ax,RS as ay,OS as az,Up as b,eS as b0,o_ as b1,B_ as b2,u_ as b3,s_ as b4,H_ as b5,Y_ as b6,k_ as b7,i_ as b8,L_ as b9,dS as bA,hS as bB,mS as bC,bh as bD,Rv as bE,cS as bF,Y1 as bG,V_ as bH,X_ as bI,ax as bJ,nx as bK,tx as bL,Z_ as bM,G_ as bN,Q_ as bO,c1 as bP,K_ as bQ,ex as bR,Q1 as bS,Sh as bT,W_ as bU,J_ as bV,$_ as bW,I_ as bX,F_ as bY,P_ as bZ,C_ as ba,M_ as bb,Xp as bc,w_ as bd,D_ as be,N_ as bf,tS as bg,U_ as bh,q_ as bi,R_ as bj,j_ as bk,z_ as bl,h_ as bm,v_ as bn,b_ as bo,A_ as bp,O_ as bq,p_ as br,g_ as bs,__ as bt,E_ as bu,x_ as bv,T_ as bw,y_ as bx,S_ as by,fS as bz,de as c,pS as d,D1 as e,oS as f,hh as g,AS as h,yS as i,y as j,Gm as k,M1 as l,aS as m,il as n,w2 as o,k2 as p,j2 as q,B as r,D2 as s,nS as t,ux as u,ix as v,TS as w,lS as x,z2 as y,f_ as z}; + */const ag=[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]],ng=de("workflow",ag);/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const lg=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],_h=de("x",lg),fr="xianyu-theme-preference",xh="(prefers-color-scheme: dark)",Eh=q.createContext(null),Ah=l=>l==="light"||l==="dark"||l==="system"?l:"system",ug=()=>{if(typeof window>"u")return"system";try{return Ah(window.localStorage.getItem(fr))}catch{return"system"}},ig=()=>typeof window>"u"?"light":window.matchMedia(xh).matches?"dark":"light",sg=({children:l})=>{const[s,c]=q.useState(ug),[r,f]=q.useState(ig);q.useEffect(()=>{const v=window.matchMedia(xh),g=A=>{f(A.matches?"dark":"light")};return f(v.matches?"dark":"light"),v.addEventListener("change",g),()=>v.removeEventListener("change",g)},[]),q.useEffect(()=>{const v=g=>{g.key===fr&&c(Ah(g.newValue))};return window.addEventListener("storage",v),()=>window.removeEventListener("storage",v)},[]);const m=s==="system"?r:s;q.useLayoutEffect(()=>{const v=document.documentElement;v.dataset.theme=m,v.dataset.themePreference=s,v.classList.toggle("dark",m==="dark"),v.style.colorScheme=m;try{window.localStorage.setItem(fr,s)}catch{}},[m,s]);const y=q.useCallback(v=>{c(v)},[]),p=q.useMemo(()=>({theme:s,resolvedTheme:m,setTheme:y}),[m,y,s]);return h.jsx(Eh.Provider,{value:p,children:l})},cg=()=>{const l=q.useContext(Eh);if(!l)throw new Error("useTheme must be used inside ThemeProvider");return l},ll=[{value:"light",label:"浅色",description:"使用浅色主题",icon:Q1},{value:"dark",label:"深色",description:"使用深色主题",icon:D1},{value:"system",label:"自动",description:"跟随系统外观",icon:z1}],dr=({compact:l=!1,className:s=""})=>{const{theme:c,resolvedTheme:r,setTheme:f}=cg(),m=(y,p)=>{var A,N;let v=p;if(y.key==="ArrowRight"||y.key==="ArrowDown")v=(p+1)%ll.length;else if(y.key==="ArrowLeft"||y.key==="ArrowUp")v=(p-1+ll.length)%ll.length;else if(y.key==="Home")v=0;else if(y.key==="End")v=ll.length-1;else return;y.preventDefault();const g=ll[v].value;f(g),(N=(A=y.currentTarget.parentElement)==null?void 0:A.querySelector(`[data-theme-option="${g}"]`))==null||N.focus()};return h.jsxs("div",{className:`theme-picker ${l?"theme-picker--compact":""} ${s}`.trim(),"data-resolved-theme":r,children:[!l&&h.jsxs("div",{className:"theme-picker__heading",children:[h.jsx("span",{children:"显示主题"}),h.jsx("span",{className:"theme-picker__status",children:c==="system"?`自动 · ${r==="dark"?"深色":"浅色"}`:c==="dark"?"深色":"浅色"})]}),h.jsx("div",{className:"theme-switcher",role:"radiogroup","aria-label":"显示主题",children:ll.map((y,p)=>{const v=y.icon,g=c===y.value;return h.jsxs("button",{type:"button",role:"radio","aria-checked":g,"aria-label":y.description,title:y.description,tabIndex:g?0:-1,"data-theme-option":y.value,className:`theme-switcher__option ${g?"theme-switcher__option--active":""}`,onClick:()=>f(y.value),onKeyDown:A=>m(A,p),children:[h.jsx(v,{className:"h-3.5 w-3.5"}),!l&&h.jsx("span",{children:y.label})]},y.value)})})]})};function Th(l,s){return function(){return l.apply(s,arguments)}}const{toString:rg}=Object.prototype,{getPrototypeOf:sl}=Object,{iterator:ru,toStringTag:Oh}=Symbol,Ci=(({hasOwnProperty:l})=>(s,c)=>l.call(s,c))(Object.prototype),cu=(l,s)=>{let c=l;const r=[];for(;c!=null&&c!==Object.prototype;){if(r.indexOf(c)!==-1)return!1;if(r.push(c),Ci(c,s))return!0;c=sl(c)}return!1},og=(l,s)=>l!=null&&cu(l,s)?l[s]:void 0,Sr=(l=>s=>{const c=rg.call(s);return l[c]||(l[c]=c.slice(8,-1).toLowerCase())})(Object.create(null)),Qt=l=>(l=l.toLowerCase(),s=>Sr(s)===l),Bi=l=>s=>typeof s===l,{isArray:pn}=Array,gn=Bi("undefined");function cl(l){return l!==null&&!gn(l)&&l.constructor!==null&&!gn(l.constructor)&&_t(l.constructor.isBuffer)&&l.constructor.isBuffer(l)}const Nh=Qt("ArrayBuffer");function fg(l){let s;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?s=ArrayBuffer.isView(l):s=l&&l.buffer&&Nh(l.buffer),s}const dg=Bi("string"),_t=Bi("function"),Rh=Bi("number"),rl=l=>l!==null&&typeof l=="object",mg=l=>l===!0||l===!1,ji=l=>{if(!rl(l))return!1;const s=sl(l);return(s===null||s===Object.prototype||sl(s)===null)&&!cu(l,Oh)&&!cu(l,ru)},hg=l=>{if(!rl(l)||cl(l))return!1;try{return Object.keys(l).length===0&&Object.getPrototypeOf(l)===Object.prototype}catch{return!1}},yg=Qt("Date"),pg=Qt("File"),gg=l=>!!(l&&typeof l.uri<"u"),bg=l=>l&&typeof l.getParts<"u",vg=Qt("Blob"),Sg=Qt("FileList"),_g=Qt("Set"),xg=l=>rl(l)&&_t(l.pipe);function Eg(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const Qm=Eg(),Zm=typeof Qm.FormData<"u"?Qm.FormData:void 0,Ag=l=>{if(!l)return!1;if(Zm&&l instanceof Zm)return!0;const s=sl(l);if(!s||s===Object.prototype||!_t(l.append))return!1;const c=Sr(l);return c==="formdata"||c==="object"&&_t(l.toString)&&l.toString()==="[object FormData]"},Tg=Qt("URLSearchParams"),[Og,Ng,Rg,wg]=["ReadableStream","Request","Response","Headers"].map(Qt),zg=l=>l.trim?l.trim():l.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ou(l,s,{allOwnKeys:c=!1}={}){if(l===null||typeof l>"u")return;let r,f;if(typeof l!="object"&&(l=[l]),pn(l))for(r=0,f=l.length;r0;)if(f=c[r],s===f.toLowerCase())return f;return null}const hn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,zh=l=>!gn(l)&&l!==hn;function mr(...l){const{caseless:s,skipUndefined:c}=zh(this)&&this||{},r={},f=(m,y)=>{if(y==="__proto__"||y==="constructor"||y==="prototype")return;const p=s&&typeof y=="string"&&wh(r,y)||y,v=Ci(r,p)?r[p]:void 0;ji(v)&&ji(m)?r[p]=mr(v,m):ji(m)?r[p]=mr({},m):pn(m)?r[p]=m.slice():(!c||!gn(m))&&(r[p]=m)};for(let m=0,y=l.length;m(ou(s,(f,m)=>{c&&_t(f)?Object.defineProperty(l,m,{__proto__:null,value:Th(f,c),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(l,m,{__proto__:null,value:f,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),l),Dg=l=>(l.charCodeAt(0)===65279&&(l=l.slice(1)),l),Mg=(l,s,c,r)=>{l.prototype=Object.create(s.prototype,r),Object.defineProperty(l.prototype,"constructor",{__proto__:null,value:l,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(l,"super",{__proto__:null,value:s.prototype}),c&&Object.assign(l.prototype,c)},Cg=(l,s,c,r)=>{let f,m,y;const p={};if(s=s||{},l==null)return s;do{for(f=Object.getOwnPropertyNames(l),m=f.length;m-- >0;)y=f[m],(!r||r(y,l,s))&&!p[y]&&(s[y]=l[y],p[y]=!0);l=c!==!1&&sl(l)}while(l&&(!c||c(l,s))&&l!==Object.prototype);return s},Ug=(l,s,c)=>{l=String(l),(c===void 0||c>l.length)&&(c=l.length),c-=s.length;const r=l.indexOf(s,c);return r!==-1&&r===c},qg=l=>{if(!l)return null;if(pn(l))return l;let s=l.length;if(!Rh(s))return null;const c=new Array(s);for(;s-- >0;)c[s]=l[s];return c},Bg=(l=>s=>l&&s instanceof l)(typeof Uint8Array<"u"&&sl(Uint8Array)),Hg=(l,s)=>{const r=(l&&l[ru]).call(l);let f;for(;(f=r.next())&&!f.done;){const m=f.value;s.call(l,m[0],m[1])}},Lg=(l,s)=>{let c;const r=[];for(;(c=l.exec(s))!==null;)r.push(c);return r},kg=Qt("HTMLFormElement"),Yg=l=>l.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(c,r,f){return r.toUpperCase()+f}),{propertyIsEnumerable:Vg}=Object.prototype,Xg=Qt("RegExp"),jh=(l,s)=>{const c=Object.getOwnPropertyDescriptors(l),r={};ou(c,(f,m)=>{let y;(y=s(f,m,l))!==!1&&(r[m]=y||f)}),Object.defineProperties(l,r)},Gg=l=>{jh(l,(s,c)=>{if(_t(l)&&["arguments","caller","callee"].includes(c))return!1;const r=l[c];if(_t(r)){if(s.enumerable=!1,"writable"in s){s.writable=!1;return}s.set||(s.set=()=>{throw Error("Can not rewrite read-only method '"+c+"'")})}})},Qg=(l,s)=>{const c={},r=f=>{f.forEach(m=>{c[m]=!0})};return pn(l)?r(l):r(String(l).split(s)),c},Zg=()=>{},Kg=(l,s)=>l!=null&&Number.isFinite(l=+l)?l:s;function Jg(l){return!!(l&&_t(l.append)&&l[Oh]==="FormData"&&l[ru])}const $g=l=>{const s=new WeakSet,c=r=>{if(rl(r)){if(s.has(r))return;if(cl(r))return r;if(!("toJSON"in r)){s.add(r);let f;if(_g(r)){f=[];for(const m of r){const y=c(m);!gn(y)&&f.push(y)}}else f=pn(r)?[]:{},ou(r,(m,y)=>{const p=c(m);!gn(p)&&(f[y]=p)});return s.delete(r),f}}return r};return c(l)},Fg=Qt("AsyncFunction"),Wg=l=>l&&(rl(l)||_t(l))&&_t(l.then)&&_t(l.catch),Dh=((l,s)=>l?setImmediate:s?((c,r)=>(hn.addEventListener("message",({source:f,data:m})=>{f===hn&&m===c&&r.length&&r.shift()()},!1),f=>{r.push(f),hn.postMessage(c,"*")}))(`axios@${Math.random()}`,[]):c=>setTimeout(c))(typeof setImmediate=="function",_t(hn.postMessage)),Pg=typeof queueMicrotask<"u"?queueMicrotask.bind(hn):typeof process<"u"&&process.nextTick||Dh,Mh=l=>l!=null&&_t(l[ru]),Ig=l=>l!=null&&cu(l,ru)&&Mh(l),x={isArray:pn,isArrayBuffer:Nh,isBuffer:cl,isFormData:Ag,isArrayBufferView:fg,isString:dg,isNumber:Rh,isBoolean:mg,isObject:rl,isPlainObject:ji,isEmptyObject:hg,isReadableStream:Og,isRequest:Ng,isResponse:Rg,isHeaders:wg,isUndefined:gn,isDate:yg,isFile:pg,isReactNativeBlob:gg,isReactNative:bg,isBlob:vg,isRegExp:Xg,isFunction:_t,isStream:xg,isURLSearchParams:Tg,isTypedArray:Bg,isFileList:Sg,forEach:ou,merge:mr,extend:jg,trim:zg,stripBOM:Dg,inherits:Mg,toFlatObject:Cg,kindOf:Sr,kindOfTest:Qt,endsWith:Ug,toArray:qg,forEachEntry:Hg,matchAll:Lg,isHTMLForm:kg,hasOwnProperty:Ci,hasOwnProp:Ci,hasOwnInPrototypeChain:cu,getSafeProp:og,reduceDescriptors:jh,freezeMethods:Gg,toObjectSet:Qg,toCamelCase:Yg,noop:Zg,toFiniteNumber:Kg,findKey:wh,global:hn,isContextDefined:zh,isSpecCompliantForm:Jg,toJSONObject:$g,isAsyncFn:Fg,isThenable:Wg,setImmediate:Dh,asap:Pg,isIterable:Mh,isSafeIterable:Ig},eb=x.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),tb=l=>{const s={};let c,r,f;return l&&l.split(` +`).forEach(function(y){f=y.indexOf(":"),c=y.substring(0,f).trim().toLowerCase(),r=y.substring(f+1).trim();const p=x.hasOwnProp(s,c);!c||p&&x.hasOwnProp(eb,c)||(c==="set-cookie"?p?s[c].push(r):s[c]=[r]:s[c]=p?s[c]+", "+r:r)}),s};function ab(l){let s=0,c=l.length;for(;ss;){const r=l.charCodeAt(c-1);if(r!==9&&r!==32)break;c-=1}return s===0&&c===l.length?l:l.slice(s,c)}const nb=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),lb=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function _r(l,s){return x.isArray(l)?l.map(c=>_r(c,s)):ab(String(l).replace(s,""))}const ub=l=>_r(l,nb),ib=l=>_r(l,lb);function Ch(l){const s=Object.create(null);return x.forEach(l.toJSON(),(c,r)=>{s[r]=ib(c)}),s}const Km=Symbol("internals");function iu(l){return l&&String(l).trim().toLowerCase()}function Di(l){return l===!1||l==null?l:x.isArray(l)?l.map(Di):ub(String(l))}function sb(l){const s=Object.create(null),c=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=c.exec(l);)s[r[1]]=r[2];return s}const cb=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function lr(l){let s=0,c=l.length;for(;ss;){const r=l.charCodeAt(c-1);if(r!==9&&r!==32)break;c-=1}return s===0&&c===l.length?l:l.slice(s,c)}function rb(l){const s=l.length-1;if(s<1||l.charCodeAt(0)!==34||l.charCodeAt(s)!==34)return l;let c="";for(let r=1;r=s))return l;c+=l[r]}return c}function ob(l){const s=Object.create(null),c=String(l);let r=0,f=!1,m=!1;function y(p){const v=lr(c.slice(r,p)),g=v.indexOf("=");if(g<1)return;const A=lr(v.slice(0,g));if(!cb.test(A))return;const N=A.toLowerCase();if(N==="__proto__"||N==="constructor"||N==="prototype")return;const B=lr(v.slice(g+1));s[N]=rb(B)}for(let p=0;p/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(l.trim());function ur(l,s,c,r,f){if(x.isFunction(r))return r.call(this,s,c);if(f&&(s=c),!!x.isString(s)){if(x.isString(r))return s.indexOf(r)!==-1;if(x.isRegExp(r))return r.test(s)}}function db(l){return l.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(s,c,r)=>c.toUpperCase()+r)}function mb(l,s){const c=x.toCamelCase(" "+s);["get","set","has"].forEach(r=>{Object.defineProperty(l,r+c,{__proto__:null,value:function(f,m,y){return this[r].call(this,s,f,m,y)},configurable:!0})})}let ft=class{constructor(s){s&&this.set(s)}set(s,c,r){const f=this;function m(p,v,g){const A=iu(v);if(!A)return;const N=x.findKey(f,A);(!N||f[N]===void 0||g===!0||g===void 0&&f[N]!==!1)&&(f[N||v]=Di(p))}const y=(p,v)=>x.forEach(p,(g,A)=>m(g,A,v));if(x.isPlainObject(s)||s instanceof this.constructor)y(s,c);else if(x.isString(s)&&(s=s.trim())&&!fb(s))y(tb(s),c);else if(x.isObject(s)&&x.isSafeIterable(s)){let p=Object.create(null),v,g;for(const A of s){if(!x.isArray(A))throw new TypeError("Object iterator must return a key-value pair");g=A[0],x.hasOwnProp(p,g)?(v=p[g],p[g]=x.isArray(v)?[...v,A[1]]:[v,A[1]]):p[g]=A[1]}y(p,c)}else s!=null&&m(c,s,r);return this}get(s,c){if(s=iu(s),s){const r=x.findKey(this,s);if(r){const f=this[r];if(!c)return f;if(c===!0)return sb(f);if(x.isFunction(c))return c.call(this,f,r);if(x.isRegExp(c))return c.exec(f);throw new TypeError("parser must be boolean|regexp|function")}}}has(s,c){if(s=iu(s),s){const r=x.findKey(this,s);return!!(r&&this[r]!==void 0&&(!c||ur(this,this[r],r,c)))}return!1}delete(s,c){const r=this;let f=!1;function m(y){if(y=iu(y),y){const p=x.findKey(r,y);p&&(!c||ur(r,r[p],p,c))&&(delete r[p],f=!0)}}return x.isArray(s)?s.forEach(m):m(s),f}clear(s){const c=Object.keys(this);let r=c.length,f=!1;for(;r--;){const m=c[r];(!s||ur(this,this[m],m,s,!0))&&(delete this[m],f=!0)}return f}normalize(s){const c=this,r={};return x.forEach(this,(f,m)=>{const y=x.findKey(r,m);if(y){c[y]=Di(f),delete c[m];return}const p=s?db(m):String(m).trim();p!==m&&delete c[m],c[p]=Di(f),r[p]=!0}),this}concat(...s){return this.constructor.concat(this,...s)}toJSON(s){const c=Object.create(null);return x.forEach(this,(r,f)=>{r!=null&&r!==!1&&(c[f]=s&&x.isArray(r)?r.join(", "):r)}),c}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([s,c])=>s+": "+c).join(` +`)}getSetCookie(){const s=this.get("set-cookie");return x.isArray(s)?s:s==null||s===!1?[]:[s]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(s){return s instanceof this?s:new this(s)}static parseParameters(s){return ob(s)}static concat(s,...c){const r=new this(s);return c.forEach(f=>r.set(f)),r}static accessor(s){const r=(this[Km]=this[Km]={accessors:{}}).accessors,f=this.prototype;function m(y){const p=iu(y);r[p]||(mb(f,y),r[p]=!0)}return x.isArray(s)?s.forEach(m):m(s),this}};ft.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);x.reduceDescriptors(ft.prototype,({value:l},s)=>{let c=s[0].toUpperCase()+s.slice(1);return{get:()=>l,set(r){this[c]=r}}});x.freezeMethods(ft);const Ui="[REDACTED ****]";function hb(l){if(x.hasOwnProp(l,"toJSON"))return!0;let s=Object.getPrototypeOf(l);for(;s&&s!==Object.prototype;){if(x.hasOwnProp(s,"toJSON"))return!0;s=Object.getPrototypeOf(s)}return!1}function yb(l,s){const c=new Set(s.map(m=>String(m).toLowerCase())),r=[],f=m=>{if(m===null||typeof m!="object"||x.isBuffer(m))return m;if(r.indexOf(m)!==-1)return;m instanceof ft&&(m=m.toJSON()),r.push(m);let y;if(x.isArray(m))y=[],m.forEach((p,v)=>{const g=f(p);x.isUndefined(g)||(y[v]=g)});else{if(!x.isPlainObject(m)&&hb(m))return r.pop(),m;y=Object.create(null);for(const[p,v]of Object.entries(m)){const g=c.has(p.toLowerCase())?Ui:f(v);x.isUndefined(g)||(y[p]=g)}}return r.pop(),y};return f(l)}function Jm(l){try{return String(l)}catch{return""}}function pb(l){return l.errors.map(c=>{try{return c&&c.message?Jm(c.message):Jm(c)}catch{return""}}).filter(Boolean).join("; ")||l.name||"AggregateError"}let V=class Uh extends Error{static from(s,c,r,f,m,y){let p=s.message;!p&&x.isArray(s.errors)&&s.errors.length&&(p=pb(s));const v=new Uh(p,c||s.code,r,f,m);return Object.defineProperty(v,"cause",{__proto__:null,value:s,writable:!0,enumerable:!1,configurable:!0}),v.name=s.name,s.status!=null&&v.status==null&&(v.status=s.status),y&&Object.assign(v,y),v}constructor(s,c,r,f,m){super(s),Object.defineProperty(this,"message",{__proto__:null,value:s,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,c&&(this.code=c),r&&(this.config=r),f&&(this.request=f),m&&(this.response=m,this.status=m.status)}toJSON(){const s=this.config,c=s&&x.hasOwnProp(s,"redact")?s.redact:void 0,r=x.isArray(c)&&c.length>0?yb(s,c):x.toJSONObject(s);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};V.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";V.ERR_BAD_OPTION="ERR_BAD_OPTION";V.ECONNABORTED="ECONNABORTED";V.ETIMEDOUT="ETIMEDOUT";V.ECONNREFUSED="ECONNREFUSED";V.ERR_NETWORK="ERR_NETWORK";V.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";V.ERR_DEPRECATED="ERR_DEPRECATED";V.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";V.ERR_BAD_REQUEST="ERR_BAD_REQUEST";V.ERR_CANCELED="ERR_CANCELED";V.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";V.ERR_INVALID_URL="ERR_INVALID_URL";V.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const gb=null,qh=100;function hr(l){return x.isPlainObject(l)||x.isArray(l)}function Bh(l){return x.endsWith(l,"[]")?l.slice(0,-2):l}function ir(l,s,c){return l?l.concat(s).map(function(f,m){return f=Bh(f),!c&&m?"["+f+"]":f}).join(c?".":""):s}function bb(l){return x.isArray(l)&&!l.some(hr)}const vb=x.toFlatObject(x,{},null,function(s){return/^is[A-Z]/.test(s)});function Hi(l,s,c){if(!x.isObject(l))throw new TypeError("target must be an object");s=s||new FormData,c=x.toFlatObject(c,{metaTokens:!0,dots:!1,indexes:!1},!1,function(K,Q){return!x.isUndefined(Q[K])});const r=c.metaTokens,f=c.visitor||W,m=c.dots,y=c.indexes,p=c.Blob||typeof Blob<"u"&&Blob,v=c.maxDepth===void 0?qh:c.maxDepth,g=p&&x.isSpecCompliantForm(s),A=[];if(!x.isFunction(f))throw new TypeError("visitor must be a function");function N(M){if(M===null)return"";if(x.isDate(M))return M.toISOString();if(x.isBoolean(M))return M.toString();if(!g&&x.isBlob(M))throw new V("Blob is not supported. Use a Buffer instead.");if(x.isArrayBuffer(M)||x.isTypedArray(M)){if(g&&typeof p=="function")return new p([M]);throw new V("Blob is not supported. Use a Buffer instead.",V.ERR_NOT_SUPPORT)}return M}function B(M){if(M>v)throw new V("Object is too deeply nested ("+M+" levels). Max depth: "+v,V.ERR_FORM_DATA_DEPTH_EXCEEDED)}function F(M,K){if(v===1/0)return JSON.stringify(M);const Q=[];return JSON.stringify(M,function(Ee,me){if(!x.isObject(me))return me;for(;Q.length&&Q[Q.length-1]!==this;)Q.pop();return Q.push(me),B(K+Q.length-1),me})}function W(M,K,Q){let ee=M;if(x.isReactNative(s)&&x.isReactNativeBlob(M))return s.append(ir(Q,K,m),N(M)),!1;if(M&&!Q&&typeof M=="object"){if(x.endsWith(K,"{}"))K=r?K:K.slice(0,-2),M=F(M,1);else if(x.isArray(M)&&bb(M)||(x.isFileList(M)||x.endsWith(K,"[]"))&&(ee=x.toArray(M)))return K=Bh(K),ee.forEach(function(me,le){!(x.isUndefined(me)||me===null)&&s.append(y===!0?ir([K],le,m):y===null?K:K+"[]",N(me))}),!1}return hr(M)?!0:(s.append(ir(Q,K,m),N(M)),!1)}const X=Object.assign(vb,{defaultVisitor:W,convertValue:N,isVisitable:hr});function Y(M,K,Q=0){if(!x.isUndefined(M)){if(B(Q),A.indexOf(M)!==-1)throw new Error("Circular reference detected in "+K.join("."));A.push(M),x.forEach(M,function(Ee,me){(!(x.isUndefined(Ee)||Ee===null)&&f.call(s,Ee,x.isString(me)?me.trim():me,K,X))===!0&&Y(Ee,K?K.concat(me):[me],Q+1)}),A.pop()}}if(!x.isObject(l))throw new TypeError("data must be an object");return Y(l),s}function $m(l){const s={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(l).replace(/[!'()~]|%20/g,function(r){return s[r]})}function xr(l,s){this._pairs=[],l&&Hi(l,this,s)}const Hh=xr.prototype;Hh.append=function(s,c){this._pairs.push([s,c])};Hh.toString=function(s){const c=s?r=>s.call(this,r,$m):$m;return this._pairs.map(function(f){return c(f[0])+"="+c(f[1])},"").join("&")};function Sb(l){return encodeURIComponent(l).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Lh(l,s,c){if(!s)return l;l=l||"";const r=x.isFunction(c)?{serialize:c}:c,f=x.getSafeProp(r,"encode")||Sb,m=x.getSafeProp(r,"serialize");let y;if(m?y=m(s,r):y=x.isURLSearchParams(s)?s.toString():new xr(s,r).toString(f),y){const p=l.indexOf("#");p!==-1&&(l=l.slice(0,p)),l+=(l.indexOf("?")===-1?"?":"&")+y}return l}class Fm{constructor(){this.handlers=[]}use(s,c,r){return this.handlers.push({fulfilled:s,rejected:c,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(s){this.handlers[s]&&(this.handlers[s]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(s){x.forEach(this.handlers,function(r){r!==null&&s(r)})}}const Er={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},_b=typeof URLSearchParams<"u"?URLSearchParams:xr,xb=typeof FormData<"u"?FormData:null,Eb=typeof Blob<"u"?Blob:null,Ab={isBrowser:!0,classes:{URLSearchParams:_b,FormData:xb,Blob:Eb},protocols:["http","https","file","blob","url","data"]},Ar=typeof window<"u"&&typeof document<"u",yr=typeof navigator=="object"&&navigator||void 0,Tb=Ar&&(!yr||["ReactNative","NativeScript","NS"].indexOf(yr.product)<0),Ob=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Nb=Ar&&window.location.href||"http://localhost",Rb=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ar,hasStandardBrowserEnv:Tb,hasStandardBrowserWebWorkerEnv:Ob,navigator:yr,origin:Nb},Symbol.toStringTag,{value:"Module"})),st={...Rb,...Ab};function wb(l,s){return Hi(l,new st.classes.URLSearchParams,{visitor:function(c,r,f,m){return st.isNode&&x.isBuffer(c)?(this.append(r,c.toString("base64")),!1):m.defaultVisitor.apply(this,arguments)},...s})}const Wm=qh;function kh(l){if(l>Wm)throw new V("FormData field is too deeply nested ("+l+" levels). Max depth: "+Wm,V.ERR_FORM_DATA_DEPTH_EXCEEDED)}function zb(l){const s=[],c=/[^.[\]]+|\[([^.[\]]*)]/g;let r;for(;(r=c.exec(l))!==null;)kh(s.length),s.push(r[0]==="[]"?"":r[1]||r[0]);return s}function jb(l){const s={},c=Object.keys(l);let r;const f=c.length;let m;for(r=0;r=c.length;return y=!y&&x.isArray(f)?f.length:y,v?(x.hasOwnProp(f,y)?f[y]=x.isArray(f[y])?f[y].concat(r):[f[y],r]:f[y]=r,!p):((!x.hasOwnProp(f,y)||!x.isObject(f[y]))&&(f[y]=[]),s(c,r,f[y],m)&&x.isArray(f[y])&&(f[y]=jb(f[y])),!p)}if(x.isFormData(l)&&x.isFunction(l.entries)){const c={};return x.forEachEntry(l,(r,f)=>{s(zb(r),f,c,0)}),c}return null}const ul=(l,s)=>l!=null&&x.hasOwnProp(l,s)?l[s]:void 0;function Db(l,s,c){if(x.isString(l))try{return(s||JSON.parse)(l),x.trim(l)}catch(r){if(r.name!=="SyntaxError")throw r}return(c||JSON.stringify)(l)}const fu={transitional:Er,adapter:["xhr","http","fetch"],transformRequest:[function(s,c){const r=c.getContentType()||"",f=r.indexOf("application/json")>-1,m=x.isObject(s);if(m&&x.isHTMLForm(s)&&(s=new FormData(s)),x.isFormData(s))return f?JSON.stringify(Yh(s)):s;if(x.isArrayBuffer(s)||x.isBuffer(s)||x.isStream(s)||x.isFile(s)||x.isBlob(s)||x.isReadableStream(s))return s;if(x.isArrayBufferView(s))return s.buffer;if(x.isURLSearchParams(s))return c.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),s.toString();let p;if(m){const v=ul(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return wb(s,v).toString();if((p=x.isFileList(s))||r.indexOf("multipart/form-data")>-1){const g=ul(this,"env"),A=g&&g.FormData;return Hi(p?{"files[]":s}:s,A&&new A,v)}}return m||f?(c.setContentType("application/json",!1),Db(s)):s}],transformResponse:[function(s){const c=ul(this,"transitional")||fu.transitional,r=c&&c.forcedJSONParsing,f=ul(this,"responseType"),m=f==="json";if(x.isResponse(s)||x.isReadableStream(s))return s;if(s&&x.isString(s)&&(r&&!f||m)){const p=!(c&&c.silentJSONParsing)&&m;try{return JSON.parse(s,ul(this,"parseReviver"))}catch(v){if(p)throw v.name==="SyntaxError"?V.from(v,V.ERR_BAD_RESPONSE,this,null,ul(this,"response")):v}}return s}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:st.classes.FormData,Blob:st.classes.Blob},validateStatus:function(s){return s>=200&&s<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};x.forEach(["delete","get","head","post","put","patch","query"],l=>{fu.headers[l]={}});function sr(l,s){const c=this||fu,r=s||c,f=ft.from(r.headers);let m=r.data;return x.forEach(l,function(p){m=p.call(c,m,f.normalize(),s?s.status:void 0)}),f.normalize(),m}function Vh(l){return!!(l&&l.__CANCEL__)}let du=class extends V{constructor(s,c,r){super(s??"canceled",V.ERR_CANCELED,c,r),this.name="CanceledError",this.__CANCEL__=!0}};function Xh(l,s,c){const r=c.config.validateStatus;!c.status||!r||r(c.status)?l(c):s(new V("Request failed with status code "+c.status,c.status>=400&&c.status<500?V.ERR_BAD_REQUEST:V.ERR_BAD_RESPONSE,c.config,c.request,c))}function Mb(l){const s=/^([-+\w]{1,25}):(?:\/\/)?/.exec(l);return s&&s[1]||""}function Cb(l,s){l=l||10;const c=new Array(l),r=new Array(l);let f=0,m=0,y;return s=s!==void 0?s:1e3,function(v){const g=Date.now(),A=r[m];y||(y=g),c[f]=v,r[f]=g;let N=m,B=0;for(;N!==f;)B+=c[N++],N=N%l;if(f=(f+1)%l,f===m&&(m=(m+1)%l),g-y{c=A,f=null,m&&(clearTimeout(m),m=null),l(...g)};return[(...g)=>{const A=Date.now(),N=A-c;N>=r?y(g,A):(f=g,m||(m=setTimeout(()=>{m=null,y(f)},r-N)))},()=>f&&y(f)]}const qi=(l,s,c=3)=>{let r=0;const f=Cb(50,250);return Ub(m=>{if(!m||typeof m.loaded!="number")return;const y=m.loaded,p=m.lengthComputable?m.total:void 0,v=Math.max(0,p!=null?Math.min(y,p):y),g=Math.max(0,v-r),A=f(g);r=Math.max(r,v);const N={loaded:v,total:p,progress:p?v/p:void 0,bytes:g,rate:A||void 0,estimated:A&&p?(p-v)/A:void 0,event:m,lengthComputable:p!=null,[s?"download":"upload"]:!0};l(N)},c)},Pm=(l,s)=>{const c=l!=null;return[r=>s[0]({lengthComputable:c,total:l,loaded:r}),s[1]]},Im=(l,s=x.asap)=>(...c)=>s(()=>l(...c)),qb=st.hasStandardBrowserEnv?((l,s)=>c=>(c=new URL(c,st.origin),l.protocol===c.protocol&&l.host===c.host&&(s||l.port===c.port)))(new URL(st.origin),st.navigator&&/(msie|trident)/i.test(st.navigator.userAgent)):()=>!0,Bb=st.hasStandardBrowserEnv?{write(l,s,c,r,f,m,y){if(typeof document>"u")return;const p=[`${l}=${encodeURIComponent(s)}`];x.isNumber(c)&&p.push(`expires=${new Date(c).toUTCString()}`),x.isString(r)&&p.push(`path=${r}`),x.isString(f)&&p.push(`domain=${f}`),m===!0&&p.push("secure"),x.isString(y)&&p.push(`SameSite=${y}`),document.cookie=p.join("; ")},read(l){if(typeof document>"u")return null;const s=document.cookie.split(";");for(let c=0;c0&&l.charCodeAt(c-1)===47;)c--;return l.slice(0,c)+"/"+s.replace(/^\/+/,"")}const kb=/^https?:(?!\/\/)/i,Yb=/[\t\n\r]/g;function Vb(l){let s=0;for(;s`${c}${r}${Ui}`)}function Qb(l){const s=l.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${Ui}@`),c=s.indexOf("#"),f=(c===-1?s:s.slice(0,c)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${Ui}`);return c===-1?f:`${f}#${Gb(s.slice(c+1))}`}function eh(l,s){if(typeof l=="string"){const c=Xb(l);if(kb.test(c))throw new V(`Invalid URL ${JSON.stringify(Qb(c))}: missing "//" after protocol`,V.ERR_INVALID_URL,s)}}function Gh(l,s,c,r){eh(s,r);let f=!Hb(s);return l&&(f||c===!1)?(eh(l,r),Lb(l,s)):s}const th=l=>l instanceof ft?{...l}:l,Zb=l=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(l).concat(Object.getOwnPropertySymbols(l).filter(s=>Object.getOwnPropertyDescriptor(l,s).enumerable)):Object.keys(l);function bn(l,s){l=l||{},s=s||{};const c=Object.create(null);Object.defineProperty(c,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(A,N,B,F){return x.isPlainObject(A)&&x.isPlainObject(N)?x.merge.call({caseless:F},A,N):x.isPlainObject(N)?x.merge({},N):x.isArray(N)?N.slice():N}function f(A,N,B,F){if(x.isUndefined(N)){if(!x.isUndefined(A))return r(void 0,A,B,F)}else return r(A,N,B,F)}function m(A,N){if(!x.isUndefined(N))return r(void 0,N)}function y(A,N){if(x.isUndefined(N)){if(!x.isUndefined(A))return r(void 0,A)}else return r(void 0,N)}function p(A){const N=x.hasOwnProp(s,"transitional")?s.transitional:void 0;if(!x.isUndefined(N))if(x.isPlainObject(N)){if(x.hasOwnProp(N,A))return N[A]}else return;const B=x.hasOwnProp(l,"transitional")?l.transitional:void 0;if(x.isPlainObject(B)&&x.hasOwnProp(B,A))return B[A]}function v(A,N,B){if(x.hasOwnProp(s,B))return r(A,N);if(x.hasOwnProp(l,B))return r(void 0,A)}const g={url:m,method:m,data:m,baseURL:y,transformRequest:y,transformResponse:y,paramsSerializer:y,timeout:y,timeoutMessage:y,withCredentials:y,withXSRFToken:y,adapter:y,responseType:y,xsrfCookieName:y,xsrfHeaderName:y,onUploadProgress:y,onDownloadProgress:y,decompress:y,maxContentLength:y,maxBodyLength:y,beforeRedirect:y,transport:y,httpAgent:y,httpsAgent:y,cancelToken:y,socketPath:y,allowedSocketPaths:y,responseEncoding:y,validateStatus:v,headers:(A,N,B)=>f(th(A),th(N),B,!0)};return x.forEach(Zb({...l,...s}),function(N){if(N==="__proto__"||N==="constructor"||N==="prototype")return;const B=x.hasOwnProp(g,N)?g[N]:f,F=x.hasOwnProp(l,N)?l[N]:void 0,W=x.hasOwnProp(s,N)?s[N]:void 0,X=B(F,W,N);x.isUndefined(X)&&B!==v||(c[N]=X)}),x.hasOwnProp(s,"validateStatus")&&x.isUndefined(s.validateStatus)&&p("validateStatusUndefinedResolves")===!1&&(x.hasOwnProp(l,"validateStatus")?c.validateStatus=r(void 0,l.validateStatus):delete c.validateStatus),c}const Kb=["content-type","content-length"];function Jb(l,s,c){if(c!=="content-only"){l.set(s);return}Object.entries(s||{}).forEach(([r,f])=>{Kb.includes(r.toLowerCase())&&l.set(r,f)})}const $b=l=>encodeURIComponent(l).replace(/%([0-9A-F]{2})/gi,(s,c)=>String.fromCharCode(parseInt(c,16)));function Qh(l){const s=bn({},l),c=B=>x.hasOwnProp(s,B)?s[B]:void 0,r=c("data");let f=c("withXSRFToken");const m=c("xsrfHeaderName"),y=c("xsrfCookieName");let p=c("headers");const v=c("auth"),g=c("baseURL"),A=c("allowAbsoluteUrls"),N=c("url");if(s.headers=p=ft.from(p),s.url=Lh(Gh(g,N,A,s),c("params"),c("paramsSerializer")),v){const B=x.getSafeProp(v,"username")||"",F=x.getSafeProp(v,"password")||"";try{p.set("Authorization","Basic "+btoa(B+":"+(F?$b(F):"")))}catch(W){throw V.from(W,V.ERR_BAD_OPTION_VALUE,l)}}if(x.isFormData(r)&&(st.hasStandardBrowserEnv||st.hasStandardBrowserWebWorkerEnv||x.isReactNative(r)?p.setContentType(void 0):x.isFunction(r.getHeaders)&&Jb(p,r.getHeaders(),c("formDataHeaderPolicy"))),st.hasStandardBrowserEnv&&(x.isFunction(f)&&(f=f(s)),f===!0||f==null&&qb(s.url))){const F=m&&y&&Bb.read(y);F&&p.set(m,F)}return s}const Fb=typeof XMLHttpRequest<"u",Wb=Fb&&function(l){return new Promise(function(c,r){const f=Qh(l);let m=f.data;const y=ft.from(f.headers).normalize();let{responseType:p,onUploadProgress:v,onDownloadProgress:g}=f,A,N,B,F,W;function X(){F&&F(),W&&W(),f.cancelToken&&f.cancelToken.unsubscribe(A),f.signal&&f.signal.removeEventListener("abort",A)}let Y=new XMLHttpRequest;Y.open(f.method.toUpperCase(),f.url,!0),Y.timeout=f.timeout;function M(){if(!Y)return;const Q=ft.from("getAllResponseHeaders"in Y&&Y.getAllResponseHeaders()),Ee={data:!p||p==="text"||p==="json"?Y.responseText:Y.response,status:Y.status,statusText:Y.statusText,headers:Q,config:l,request:Y};Xh(function(le){c(le),X()},function(le){r(le),X()},Ee),Y=null}"onloadend"in Y?Y.onloadend=M:Y.onreadystatechange=function(){!Y||Y.readyState!==4||Y.status===0&&!(Y.responseURL&&Y.responseURL.startsWith("file:"))||setTimeout(M)},Y.onabort=function(){Y&&(r(new V("Request aborted",V.ECONNABORTED,l,Y)),X(),Y=null)},Y.onerror=function(ee){const Ee=ee&&ee.message?ee.message:"Network Error",me=new V(Ee,V.ERR_NETWORK,l,Y);me.event=ee||null,r(me),X(),Y=null},Y.ontimeout=function(){let ee=f.timeout?"timeout of "+f.timeout+"ms exceeded":"timeout exceeded";const Ee=f.transitional||Er;f.timeoutErrorMessage&&(ee=f.timeoutErrorMessage),r(new V(ee,Ee.clarifyTimeoutError?V.ETIMEDOUT:V.ECONNABORTED,l,Y)),X(),Y=null},m===void 0&&y.setContentType(null),"setRequestHeader"in Y&&x.forEach(Ch(y),function(ee,Ee){Y.setRequestHeader(Ee,ee)}),x.isUndefined(f.withCredentials)||(Y.withCredentials=!!f.withCredentials),p&&p!=="json"&&(Y.responseType=f.responseType),g&&([B,W]=qi(g,!0),Y.addEventListener("progress",B)),v&&Y.upload&&([N,F]=qi(v),Y.upload.addEventListener("progress",N),Y.upload.addEventListener("loadend",F)),(f.cancelToken||f.signal)&&(A=Q=>{Y&&(r(!Q||Q.type?new du(null,l,Y):Q),Y.abort(),X(),Y=null)},f.cancelToken&&f.cancelToken.subscribe(A),f.signal&&(f.signal.aborted?A():f.signal.addEventListener("abort",A)));const K=Mb(f.url);if(K&&!st.protocols.includes(K)){r(new V("Unsupported protocol "+K+":",V.ERR_BAD_REQUEST,l)),X();return}Y.send(m||null)})},Pb=(l,s)=>{if(l=l?l.filter(Boolean):[],!s&&!l.length)return;const c=new AbortController;let r=!1;const f=function(v){if(!r){r=!0,y();const g=v instanceof Error?v:this.reason;c.abort(g instanceof V?g:new du(g instanceof Error?g.message:g))}};let m=s&&setTimeout(()=>{m=null,f(new V(`timeout of ${s}ms exceeded`,V.ETIMEDOUT))},s);const y=()=>{l&&(m&&clearTimeout(m),m=null,l.forEach(v=>{v.unsubscribe?v.unsubscribe(f):v.removeEventListener("abort",f)}),l=null)};l.forEach(v=>{if(!r){if(v.aborted){f.call(v);return}v.addEventListener("abort",f,{once:!0})}});const{signal:p}=c;return p.unsubscribe=()=>x.asap(y),p},Ib=function*(l,s){let c=l.byteLength;if(c{const f=ev(l,s);let m=0,y,p=v=>{y||(y=!0,r&&r(v))};return new ReadableStream({async pull(v){try{const{done:g,value:A}=await f.next();if(g){p(),v.close();return}let N=A.byteLength;if(c){let B=m+=N;c(B)}v.enqueue(new Uint8Array(A))}catch(g){throw p(g),g}},cancel(v){return p(v),f.return()}},{highWaterMark:2})},nh=l=>l>=48&&l<=57||l>=65&&l<=70||l>=97&&l<=102,Zh=(l,s,c)=>s+2l<=57?l-48:(l&223)-55,av=l=>l>=65&&l<=90||l>=97&&l<=122||l>=48&&l<=57||l===43||l===47||l===45||l===95,nv=l=>l===9||l===10||l===12||l===13||l===32,lv=l=>{const s=Math.floor(l/4),c=l%4;return s*3+(c===2?1:c===3?2:0)},uv=l=>{const s=l.length;let c=0;return s>0&&l.charCodeAt(s-1)===61&&(c++,s>1&&l.charCodeAt(s-2)===61&&c++),Math.floor((s-c)*3/4)},iv=l=>{const s=l.length;let c=0,r=0,f=!1;for(let m=0;m0){f=!0;continue}c++}}return f||r>2||r>0&&(c+r)%4!==0||c%4===1?uv(l):lv(c)},sv=(l,s)=>{if(!l||typeof l!="string"||!l.startsWith("data:"))return 0;const c=l.indexOf(",");if(c<0)return 0;const r=l.slice(5,c),f=l.slice(c+1);if(/;base64/i.test(r))return s(f);let y=0;for(let p=0,v=f.length;p=55296&&g<=56319&&p+1=56320&&A<=57343?(y+=4,p++):y+=3}else y+=3}return y};function cv(l){const s=typeof l=="string"?l.indexOf("#"):-1;return sv(s===-1?l:l.slice(0,s),iv)}const Tr="1.19.0",uh=64*1024,{isFunction:zi}=x,rv=l=>encodeURIComponent(l).replace(/%([0-9A-F]{2})/gi,(s,c)=>String.fromCharCode(parseInt(c,16))),ih=l=>{if(!x.isString(l))return l;try{return decodeURIComponent(l)}catch{return l}},sh=(l,...s)=>{try{return!!l(...s)}catch{return!1}},ov=l=>{const s=l.indexOf("://");let c=l;return s!==-1&&(c=c.slice(s+3)),c.includes("@")||c.includes(":")},fv=l=>{const s=x.global!==void 0&&x.global!==null?x.global:globalThis,{ReadableStream:c,TextEncoder:r}=s;l=x.merge.call({skipUndefined:!0},{Request:s.Request,Response:s.Response},l);const{fetch:f,Request:m,Response:y}=l,p=f?zi(f):typeof fetch=="function",v=zi(m),g=zi(y);if(!p)return!1;const A=p&&zi(c),N=p&&(typeof r=="function"?(M=>K=>M.encode(K))(new r):async M=>new Uint8Array(await new m(M).arrayBuffer())),B=v&&A&&sh(()=>{let M=!1;const K=new m(st.origin,{body:new c,method:"POST",get duplex(){return M=!0,"half"}}),Q=K.headers.has("Content-Type");return K.body!=null&&K.body.cancel(),M&&!Q}),F=g&&A&&sh(()=>x.isReadableStream(new y("").body)),W={stream:F&&(M=>M.body)};p&&["text","arrayBuffer","blob","formData","stream"].forEach(M=>{!W[M]&&(W[M]=(K,Q)=>{let ee=K&&K[M];if(ee)return ee.call(K);throw new V(`Response type '${M}' is not supported`,V.ERR_NOT_SUPPORT,Q)})});const X=async M=>{if(M==null)return 0;if(x.isBlob(M))return M.size;if(x.isSpecCompliantForm(M))return(await new m(st.origin,{method:"POST",body:M}).arrayBuffer()).byteLength;if(x.isArrayBufferView(M)||x.isArrayBuffer(M))return M.byteLength;if(x.isURLSearchParams(M)&&(M=M+""),x.isString(M))return(await N(M)).byteLength},Y=async(M,K)=>{const Q=x.toFiniteNumber(M.getContentLength());return Q??X(K)};return async M=>{let{url:K,method:Q,data:ee,signal:Ee,cancelToken:me,timeout:le,onDownloadProgress:Le,onUploadProgress:ct,responseType:be,headers:Ce,withCredentials:ke="same-origin",fetchOptions:xt,maxContentLength:He,maxBodyLength:Re}=Qh(M);const z=x.isNumber(He)&&He>-1,L=x.isNumber(Re)&&Re>-1,I=Z=>x.hasOwnProp(M,Z)?M[Z]:void 0;let Se=f||fetch;be=be?(be+"").toLowerCase():"text";let re=Pb([Ee,me&&me.toAbortSignal()],le),S=null;const j=re&&re.unsubscribe&&(()=>{re.unsubscribe()});let H,G=null;const ue=()=>new V("Request body larger than maxBodyLength limit",V.ERR_BAD_REQUEST,M,S);try{let Z;const k=I("auth");if(k){const se=x.getSafeProp(k,"username")||"",dt=x.getSafeProp(k,"password")||"";Z={username:se,password:dt}}if(ov(K)){const se=new URL(K,st.origin);if(!Z&&(se.username||se.password)){const dt=ih(se.username),Kt=ih(se.password);Z={username:dt,password:Kt}}(se.username||se.password)&&(se.username="",se.password="",K=se.href)}if(Z&&(Ce.delete("authorization"),Ce.set("Authorization","Basic "+btoa(rv((Z.username||"")+":"+(Z.password||""))))),z&&typeof K=="string"&&K.startsWith("data:")&&cv(K)>He)throw new V("maxContentLength size of "+He+" exceeded",V.ERR_BAD_RESPONSE,M,S);if(L&&Q!=="get"&&Q!=="head"){const se=await X(ee);if(typeof se=="number"&&isFinite(se)&&(H=se,se>Re))throw ue()}const ie=L&&(x.isReadableStream(ee)||x.isStream(ee)),Te=(se,dt,Kt)=>ah(se,uh,Jt=>{if(L&&Jt>Re)throw G=ue();dt&&dt(Jt)},Kt);if(B&&Q!=="get"&&Q!=="head"&&(ct||ie)){if(H=H??await Y(Ce,ee),H!==0||ie){let se=new m(K,{method:"POST",body:ee,duplex:"half"}),dt;if(x.isFormData(ee)&&(dt=se.headers.get("content-type"))&&Ce.setContentType(dt),se.body){const[Kt,Jt]=ct&&Pm(H,qi(Im(ct)))||[];ee=Te(se.body,Kt,Jt)}}}else if(ie&&!v&&A&&Q!=="get"&&Q!=="head")ee=Te(ee);else if(ie&&v&&!B&&Q!=="get"&&Q!=="head")throw new V("Stream request bodies are not supported by the current fetch implementation",V.ERR_NOT_SUPPORT,M,S);x.isString(ke)||(ke=ke?"include":"omit");const Za=v&&"credentials"in m.prototype;if(x.isFormData(ee)){const se=Ce.getContentType();se&&/^multipart\/form-data/i.test(se)&&!/boundary=/i.test(se)&&Ce.delete("content-type")}Ce.set("User-Agent","axios/"+Tr,!1);const Ka={...xt,signal:re,method:Q.toUpperCase(),headers:Ch(Ce.normalize()),body:ee,duplex:"half",credentials:Za?ke:void 0};S=v&&new m(K,Ka);let Et=await(v?Se(S,xt):Se(K,Ka));const ol=ft.from(Et.headers);if(z){const se=x.toFiniteNumber(ol.getContentLength());if(se!=null&&se>He)throw new V("maxContentLength size of "+He+" exceeded",V.ERR_BAD_RESPONSE,M,S)}const Zt=F&&(be==="stream"||be==="response");if(F&&Et.body&&(Le||z||Zt&&j)){const se={};["status","statusText","headers"].forEach(Ja=>{se[Ja]=Et[Ja]});const dt=x.toFiniteNumber(ol.getContentLength()),[Kt,Jt]=Le&&Pm(dt,qi(Im(Le),!0))||[];let vn=0;const fl=Ja=>{if(z&&(vn=Ja,vn>He))throw new V("maxContentLength size of "+He+" exceeded",V.ERR_BAD_RESPONSE,M,S);Kt&&Kt(Ja)};Et=new y(ah(Et.body,uh,fl,()=>{Jt&&Jt(),j&&j()}),se)}be=be||"text";let At=await W[x.findKey(W,be)||"text"](Et,M);if(z&&!F&&!Zt){let se;if(At!=null&&(typeof At.byteLength=="number"?se=At.byteLength:typeof At.size=="number"?se=At.size:typeof At=="string"&&(se=typeof r=="function"?new r().encode(At).byteLength:At.length)),typeof se=="number"&&se>He)throw new V("maxContentLength size of "+He+" exceeded",V.ERR_BAD_RESPONSE,M,S)}return!Zt&&j&&j(),await new Promise((se,dt)=>{Xh(se,dt,{data:At,headers:ft.from(Et.headers),status:Et.status,statusText:Et.statusText,config:M,request:S})})}catch(Z){if(j&&j(),re&&re.aborted&&re.reason instanceof V){const k=re.reason;throw k.config=M,S&&(k.request=S),Z!==k&&Object.defineProperty(k,"cause",{__proto__:null,value:Z,writable:!0,enumerable:!1,configurable:!0}),k}if(G)throw S&&!G.request&&(G.request=S),G;if(Z instanceof V)throw S&&!Z.request&&(Z.request=S),Z;if(Z&&Z.name==="TypeError"&&/Load failed|fetch/i.test(Z.message)){const k=new V("Network Error",V.ERR_NETWORK,M,S,Z&&Z.response);throw Object.defineProperty(k,"cause",{__proto__:null,value:Z.cause||Z,writable:!0,enumerable:!1,configurable:!0}),k}throw V.from(Z,Z&&Z.code,M,S,Z&&Z.response)}}},dv=new Map,Kh=l=>{let s=l&&l.env||{};const{fetch:c,Request:r,Response:f}=s,m=[r,f,c];let y=m.length,p=y,v,g,A=dv;for(;p--;)v=m[p],g=A.get(v),g===void 0&&A.set(v,g=p?new Map:fv(s)),A=g;return g};Kh();const Or={http:gb,xhr:Wb,fetch:{get:Kh}};x.forEach(Or,(l,s)=>{if(l){try{Object.defineProperty(l,"name",{__proto__:null,value:s})}catch{}Object.defineProperty(l,"adapterName",{__proto__:null,value:s})}});const ch=l=>`- ${l}`,mv=l=>x.isFunction(l)||l===null||l===!1;function hv(l,s){l=x.isArray(l)?l:[l];const{length:c}=l;let r,f;const m={};for(let y=0;y`adapter ${v} `+(g===!1?"is not supported by the environment":"is not available in the build"));let p=c?y.length>1?`since : +`+y.map(ch).join(` +`):" "+ch(y[0]):"as no adapter specified";throw new V("There is no suitable adapter to dispatch the request "+p,V.ERR_NOT_SUPPORT)}return f}const Jh={getAdapter:hv,adapters:Or};function cr(l){if(l.cancelToken&&l.cancelToken.throwIfRequested(),l.signal&&l.signal.aborted)throw new du(null,l)}function rr(l){return cr(l),l.headers=ft.from(l.headers),l.data=sr.call(l,l.transformRequest),["post","put","patch"].indexOf(l.method)!==-1&&l.headers.setContentType("application/x-www-form-urlencoded",!1),Jh.getAdapter(l.adapter||fu.adapter,l)(l).then(function(r){cr(l),l.response=r;try{r.data=sr.call(l,l.transformResponse,r)}finally{delete l.response}return r.headers=ft.from(r.headers),r},function(r){if(!Vh(r)&&(cr(l),r&&r.response)){l.response=r.response;try{r.response.data=sr.call(l,l.transformResponse,r.response)}finally{delete l.response}r.response.headers=ft.from(r.response.headers)}return Promise.reject(r)})}const Li={};["object","boolean","number","function","string","symbol"].forEach((l,s)=>{Li[l]=function(r){return typeof r===l||"a"+(s<1?"n ":" ")+l}});const rh={};Li.transitional=function(s,c,r){function f(m,y){return"[Axios v"+Tr+"] Transitional option '"+m+"'"+y+(r?". "+r:"")}return(m,y,p)=>{if(s===!1)throw new V(f(y," has been removed"+(c?" in "+c:"")),V.ERR_DEPRECATED);return c&&!rh[y]&&(rh[y]=!0,console.warn(f(y," has been deprecated since v"+c+" and will be removed in the near future"))),s?s(m,y,p):!0}};Li.spelling=function(s){return(c,r)=>(console.warn(`${r} is likely a misspelling of ${s}`),!0)};function yv(l,s,c){if(typeof l!="object"||l===null)throw new V("options must be an object",V.ERR_BAD_OPTION_VALUE);const r=Object.keys(l);let f=r.length;for(;f-- >0;){const m=r[f],y=Object.prototype.hasOwnProperty.call(s,m)?s[m]:void 0;if(y){const p=l[m],v=p===void 0||y(p,m,l);if(v!==!0)throw new V("option "+m+" must be "+v,V.ERR_BAD_OPTION_VALUE);continue}if(c!==!0)throw new V("Unknown option "+m,V.ERR_BAD_OPTION)}}const Mi={assertOptions:yv,validators:Li},ot=Mi.validators;let yn=class{constructor(s){this.defaults=s||{},this.interceptors={request:new Fm,response:new Fm}}async request(s,c){try{return await this._request(s,c)}catch(r){if(r instanceof Error){let f={};Error.captureStackTrace?Error.captureStackTrace(f):f=new Error;const m=(()=>{if(!f.stack)return"";const y=f.stack.indexOf(` +`);return y===-1?"":f.stack.slice(y+1)})();try{if(!r.stack)r.stack=m;else if(m){const y=m.indexOf(` +`),p=y===-1?-1:m.indexOf(` +`,y+1),v=p===-1?"":m.slice(p+1);String(r.stack).endsWith(v)||(r.stack+=` +`+m)}}catch{}}throw r}}_request(s,c){typeof s=="string"?(c=c||{},c.url=s):c=s||{},c=bn(this.defaults,c);const{transitional:r,paramsSerializer:f,headers:m}=c;r!==void 0&&Mi.assertOptions(r,{silentJSONParsing:ot.transitional(ot.boolean),forcedJSONParsing:ot.transitional(ot.boolean),clarifyTimeoutError:ot.transitional(ot.boolean),legacyInterceptorReqResOrdering:ot.transitional(ot.boolean),advertiseZstdAcceptEncoding:ot.transitional(ot.boolean),validateStatusUndefinedResolves:ot.transitional(ot.boolean)},!1),f!=null&&(x.isFunction(f)?c.paramsSerializer={serialize:f}:Mi.assertOptions(f,{encode:ot.function,serialize:ot.function},!0)),c.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?c.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:c.allowAbsoluteUrls=!0),Mi.assertOptions(c,{baseUrl:ot.spelling("baseURL"),withXsrfToken:ot.spelling("withXSRFToken")},!0),c.method=(c.method||this.defaults.method||"get").toLowerCase();let y=m&&x.merge(m.common,m[c.method]);m&&x.forEach(["delete","get","head","post","put","patch","query","common"],W=>{delete m[W]}),c.headers=ft.concat(y,m);const p=[];let v=!0;this.interceptors.request.forEach(function(X){if(typeof X.runWhen=="function"&&X.runWhen(c)===!1)return;v=v&&X.synchronous;const Y=c.transitional||Er;Y&&Y.legacyInterceptorReqResOrdering?p.unshift(X.fulfilled,X.rejected):p.push(X.fulfilled,X.rejected)});const g=[];this.interceptors.response.forEach(function(X){g.push(X.fulfilled,X.rejected)});let A,N=0,B;if(!v){const W=[rr.bind(this),void 0];for(W.unshift(...p),W.push(...g),B=W.length,A=Promise.resolve(c);Nrr.call(this,F)))}catch(M){A=Promise.reject(M)}break}}if(!A)try{A=rr.call(this,F)}catch(W){A=Promise.reject(W)}for(N=0,B=g.length;N{if(!r._listeners)return;let m=r._listeners.length;for(;m-- >0;)r._listeners[m](f);r._listeners=null}),this.promise.then=f=>{let m;const y=new Promise(p=>{r.subscribe(p),m=p}).then(f);return y.cancel=function(){r.unsubscribe(m)},y},s(function(m,y,p){r.reason||(r.reason=new du(m,y,p),c(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(s){if(this.reason){s(this.reason);return}this._listeners?this._listeners.push(s):this._listeners=[s]}unsubscribe(s){if(!this._listeners)return;const c=this._listeners.indexOf(s);c!==-1&&this._listeners.splice(c,1)}toAbortSignal(){const s=new AbortController,c=r=>{s.abort(r)};return this.subscribe(c),s.signal.unsubscribe=()=>this.unsubscribe(c),s.signal}static source(){let s;return{token:new $h(function(f){s=f}),cancel:s}}};function gv(l){return function(c){return l.apply(null,c)}}function bv(l){return x.isObject(l)&&l.isAxiosError===!0}const pr={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(pr).forEach(([l,s])=>{pr[s]=l});function Fh(l){const s=new yn(l),c=Th(yn.prototype.request,s);return x.extend(c,yn.prototype,s,{allOwnKeys:!0}),x.extend(c,s,null,{allOwnKeys:!0}),c.create=function(f){return Fh(bn(l,f))},c}const Qe=Fh(fu);Qe.Axios=yn;Qe.CanceledError=du;Qe.CancelToken=pv;Qe.isCancel=Vh;Qe.VERSION=Tr;Qe.toFormData=Hi;Qe.AxiosError=V;Qe.Cancel=Qe.CanceledError;Qe.all=function(s){return Promise.all(s)};Qe.spread=gv;Qe.isAxiosError=bv;Qe.mergeConfig=bn;Qe.AxiosHeaders=ft;Qe.formToJSON=l=>Yh(x.isHTMLForm(l)?new FormData(l):l);Qe.getAdapter=Jh.getAdapter;Qe.HttpStatusCode=pr;Qe.default=Qe;const{Axios:y2,AxiosError:p2,CanceledError:g2,isCancel:b2,CancelToken:v2,VERSION:S2,all:_2,Cancel:x2,isAxiosError:E2,spread:A2,toFormData:T2,AxiosHeaders:O2,HttpStatusCode:N2,formToJSON:R2,getAdapter:w2,mergeConfig:z2,create:j2}=Qe,Qa=Qe.create({baseURL:"",timeout:3e4,headers:{"Content-Type":"application/json"}});Qa.interceptors.request.use(l=>{const s=localStorage.getItem("auth_token");return s&&(l.headers.Authorization=`Bearer ${s}`),typeof FormData<"u"&&l.data instanceof FormData&&delete l.headers["Content-Type"],l},l=>Promise.reject(l));Qa.interceptors.response.use(l=>l,l=>{var s;if(((s=l.response)==null?void 0:s.status)===401){localStorage.removeItem("auth_token");try{window.dispatchEvent(new Event("auth:logout"))}catch{}}return Promise.reject(l)});const ae=async(l,s,c)=>(await Qa.get(l,{params:s,...c})).data,ne=async(l,s,c)=>(await Qa.post(l,s,c)).data,De=async(l,s,c)=>(await Qa.put(l,s,c)).data,vv=async(l,s,c)=>(await Qa.patch(l,s,c)).data,tt=async(l,s)=>(await Qa.delete(l,s)).data,Sv=async l=>ne("/login",l),_v=async()=>ae("/system-settings/public"),xv=async(l,s)=>De("/profile",{new_username:l,current_password:s}),Ev=async l=>ne("/register",l),Av=async(l,s="register",c)=>ne("/send-verification-code",{email:l,type:s,captcha_session_id:c==null?void 0:c.session_id,captcha_code:c==null?void 0:c.code}),Tv=async l=>ne("/generate-captcha",{session_id:l}),Ov=async()=>ae("/verify"),Nv=async(l,s)=>ne("/change-password",{current_password:l,new_password:s}),D2=async()=>(await ae("/cookies/details")).map(s=>({id:s.id,value:s.value,cookie:s.value,enabled:s.enabled,auto_confirm:s.auto_confirm,remark:s.remark,note:s.remark,pause_duration:s.pause_duration,username:s.username,login_password:s.login_password,show_browser:s.show_browser,nickname:s.nickname||s.remark||s.username||`账号 ${s.id.substring(0,6)}`,avatar_url:s.avatar_url,location:s.location,bio:s.bio,followers:s.followers,following:s.following,profile_updated_at:s.profile_updated_at,runtime_state:s.runtime_state,login_info:s.login_info,ai_enabled:!1})),M2=async l=>ne(`/cookies/${l}/refresh-profile`),C2=async()=>ne("/qr-login/generate"),U2=async l=>ae(`/qr-login/check/${l}`),q2=async(l,s)=>De(`/cookies/${l}/status`,{enabled:s}),B2=async l=>tt(`/cookies/${l}`),H2=async(l,s)=>De(`/cookies/${l}/remark`,{remark:s}),L2=async(l,s)=>De(`/cookies/${l}/auto-confirm`,{auto_confirm:s}),k2=async(l,s)=>De(`/cookies/${l}/pause-duration`,{pause_duration:s}),Y2=async(l,s)=>De(`/cookies/${l}`,{id:l,value:s}),V2=async(l,s)=>De(`/cookies/${l}/login-info`,s),X2=async()=>ae("/ai-reply-settings"),Rv=l=>{const s=(l==null?void 0:l.order_status)||(l==null?void 0:l.status)||"processing";return{...l,status:s,order_status:s}},G2=async(l,s,c=1,r=20)=>{const f={page:c,page_size:r};l&&(f.cookie_id=l),s&&s!=="all"&&(f.status=s);const m=await ae("/api/orders",f),y=(m.orders||m.data||[]).map(Rv);return{success:!0,data:y,total:m.total||y.length,page:m.page||c,page_size:m.page_size||r,total_pages:m.total_pages||1,status_counts:m.status_counts}},Q2=async(l,s)=>De(`/api/orders/${l}`,s),Z2=async(l,s)=>De(`/api/orders/${l}/note`,{note:s}),K2=async l=>tt(`/api/orders/${l}`),J2=async(l,s)=>{const c=new FormData,r=localStorage.getItem("auth_token");return(await fetch("/api/orders/refresh",{method:"POST",headers:{Authorization:`Bearer ${r}`},body:c})).json()},$2=async l=>ne(`/api/orders/${l}/refresh`),F2=async(l,s,c)=>ne("/api/orders/manual-ship",{order_ids:l,ship_mode:s,custom_content:c}),W2=async l=>{const s=l instanceof FormData;return(await fetch("/api/orders/import",{method:"POST",headers:{...s?{}:{"Content-Type":"application/json"},Authorization:`Bearer ${localStorage.getItem("auth_token")}`},body:s?l:JSON.stringify(l)})).json()},wv=l=>{if(!l)return"";const s=l.match(/filename\*=UTF-8''([^;\s]+)/i);if(s)try{return decodeURIComponent(s[1])}catch{return s[1]}const c=l.match(/filename\s*=\s*"?([^";]+)"?/i);return c?c[1].trim():""},P2=async l=>{var v;const s={};l.cookie_id&&(s.cookie_id=l.cookie_id),l.status&&l.status!=="all"&&(s.status=l.status);const c=await Qa.get("/api/orders/export",{params:s,responseType:"blob"}),r=c.data;if(!(r instanceof Blob)||r.size===0)throw new Error("导出失败:服务器未返回有效文件");if(r.type.includes("application/json")){let g="导出失败";try{const A=JSON.parse(await r.text());g=(A==null?void 0:A.message)||g}catch{}throw new Error(g)}const f=wv((v=c.headers)==null?void 0:v["content-disposition"]),m=/\.csv$/i.test(f)?f:`orders_${Date.now()}.csv`,y=URL.createObjectURL(r),p=document.createElement("a");return p.href=y,p.download=m,document.body.appendChild(p),p.click(),document.body.removeChild(p),URL.revokeObjectURL(y),m},I2=async(l,s=7)=>{const c=new FormData;return c.append("days",String(s)),(await fetch("/api/orders/sync-sold",{method:"POST",headers:{Authorization:`Bearer ${localStorage.getItem("auth_token")}`},body:c})).json()},eS=async(l=!1)=>(await ae("/quick-phrases",{include_disabled:l})).data||[],tS=async(l,s,c="默认",r=0)=>{const f=new FormData;return f.append("title",l),f.append("content",s),f.append("category",c),f.append("sort_order",String(r)),(await fetch("/quick-phrases",{method:"POST",headers:{Authorization:`Bearer ${localStorage.getItem("auth_token")}`},body:f})).json()},aS=async(l,s)=>{const c=new FormData;return Object.entries(s).forEach(([f,m])=>{m!=null&&c.append(f,String(m))}),(await fetch(`/quick-phrases/${l}`,{method:"PUT",headers:{Authorization:`Bearer ${localStorage.getItem("auth_token")}`},body:c})).json()},nS=async l=>tt(`/quick-phrases/${l}`),lS=async l=>ne(`/quick-phrases/${l}/use`),uS=async()=>ae("/api/risk-control/status"),iS=async l=>ne(`/api/risk-control/${encodeURIComponent(l)}/fresh-captcha-url`),sS=async(l,s=300)=>{const c=new FormData;return c.append("cookie_id",l),c.append("timeout",String(s)),ne("/api/captcha/manual-session",c,{timeout:(s+30)*1e3})},cS=async(l,s)=>{const c=new FormData;return l&&c.append("cookie_id",l),(await fetch("/api/items/polish",{method:"POST",headers:{Authorization:`Bearer ${localStorage.getItem("auth_token")}`},body:c})).json()},rS=async l=>ne(`/api/orders/${l}/require-flower`),oS=async()=>ae("/api/seller-features"),fS=async(l,s)=>De(`/api/seller-features/${l}`,s),dS=async(l,s,c=1,r=!1)=>{const f=new FormData;return f.append("order_ids",l.join(",")),f.append("feedback",s),f.append("rate",String(c)),f.append("anonymous",String(r)),(await fetch("/api/orders/rate",{method:"POST",headers:{Authorization:`Bearer ${localStorage.getItem("auth_token")}`},body:f})).json()},mS=async()=>ae("/admin/stats"),hS=async()=>(await ae("/admin/users")).users||[],yS=async(l,s)=>vv(`/admin/users/${l}/status`,{is_active:s}),pS=async(l,s)=>De(`/admin/users/${l}/password`,{new_password:s}),gS=async l=>tt(`/admin/users/${l}`),bS=async(l=7)=>{let s;if(typeof l=="number"){const c=new Date,r=new Date;r.setDate(r.getDate()-l),s={start_date:r.toISOString().split("T")[0],end_date:c.toISOString().split("T")[0]}}else s=l;return ae("/analytics/orders",s)},vS=async l=>(await ae("/analytics/orders/valid",{start_date:l.start_date,end_date:l.end_date})).orders||[],SS=async()=>{const l=await ae("/cards");return Array.isArray(l)?l:l.cards||[]},_S=async l=>ne("/cards",l),xS=async(l,s)=>De(`/cards/${l}`,s),ES=async l=>tt(`/cards/${l}`),AS=async(l=200)=>{const s=await ae("/cards/shipped",{limit:l});return{total:s.total||0,shipments:s.shipments||[]}},TS=async()=>tt("/cards/shipped"),OS=async l=>{const s=new FormData;return s.append("image",l),ne("/upload-image",s)},NS=async()=>{const l=await ae("/items");return Array.isArray(l)?l:l.items||[]},RS=async l=>ne("/items/get-all-from-account",{cookie_id:l}),wS=async l=>ne("/items",l),zS=async(l,s)=>tt(`/items/${l}/${s}`),jS=async(l,s,c)=>De(`/items/${l}/${s}`,{item_detail:c}),DS=async(l,s,c)=>De(`/items/${l}/${s}/multi-quantity-delivery`,{multi_quantity_delivery:c}),MS=async()=>(await ae("/item-delivery-configs")).configs||[],CS=async(l,s)=>ae(`/items/${encodeURIComponent(l)}/${encodeURIComponent(s)}/delivery-config`),US=async(l,s,c)=>De(`/items/${encodeURIComponent(l)}/${encodeURIComponent(s)}/delivery-config`,c),Wh=l=>({options:l.options||[],detection_status:l.detection_status||"ok",retry_after_seconds:l.retry_after_seconds,warning:l.warning}),qS=async(l,s)=>{const c=await ae(`/api/anti-abuse/sku-options/${encodeURIComponent(s)}`,{cookie_id:l});return Wh(c)},BS=async(l,s)=>{const c=await ae(`/api/anti-abuse/sku-options/${encodeURIComponent(s)}/buyer-test`,{cookie_id:l});return Wh(c)},HS=async l=>(await ae("/product-automation/materials",void 0)).data||[],LS=async(l,s)=>(await De(`/product-automation/materials/${l}`,s)).data,kS=async l=>{await tt(`/product-automation/materials/${l}`)},YS=async()=>(await ae("/product-automation/filter-rules")).data||[],VS=async l=>(l.id?await De(`/product-automation/filter-rules/${l.id}`,l):await ne("/product-automation/filter-rules",l)).data,XS=async l=>{await tt(`/product-automation/filter-rules/${l}`)},GS=async l=>(await ne(`/product-automation/filter-rules/${l}/run`,{})).data,QS=async()=>(await ae("/product-automation/delete-rules")).data||[],ZS=async l=>(l.id?await De(`/product-automation/delete-rules/${l.id}`,l):await ne("/product-automation/delete-rules",l)).data,KS=async l=>{await tt(`/product-automation/delete-rules/${l}`)},JS=async l=>(await ne(`/product-automation/delete-rules/${l}/preview`,{})).data,$S=async(l=50)=>(await ae("/product-automation/runs",{limit:l})).data||[],Nr=async l=>(await ne(l,{})).data,FS=()=>Nr("/product-automation/repairs/published-ids"),WS=()=>Nr("/product-automation/repairs/short-links"),PS=()=>Nr("/product-automation/repairs/cards"),IS=async()=>{const l=await ae("/delivery-rules");return(Array.isArray(l)?l:l.data||l.rules||[]).map(c=>({id:String(c.id),name:c.description||c.keyword||"",item_keyword:c.keyword||"",cookie_id:c.cookie_id||void 0,item_id:c.item_id||void 0,item_title:c.item_title||void 0,card_group_id:c.card_id||0,card_group_name:c.card_name||"",priority:c.delivery_count||1,enabled:!!c.enabled,delivery_times:c.delivery_times||0}))},e_=async l=>{const s={keyword:l.item_keyword,card_id:l.card_group_id,delivery_count:l.priority,enabled:l.enabled??!0,description:l.name,cookie_id:l.cookie_id||null,item_id:l.item_id||null};return l.id?De(`/delivery-rules/${l.id}`,s):ne("/delivery-rules",s)},t_=async l=>tt(`/delivery-rules/${l}`),a_=async l=>(await ae(`/delivery-block-rules/${l}`)).rules,n_=async(l,s,c)=>(await De(`/delivery-block-rules/${l}/${s}`,c)).rule,l_=async l=>(await ae("/blacklist",l?{cookie_id:l}:void 0)).entries,u_=async l=>(await ne("/blacklist",l)).entry,i_=async(l,s)=>(await De(`/blacklist/${l}`,s)).entry,s_=async l=>{await tt(`/blacklist/${l}`)},c_=async l=>{if(!l)return[];const s=await ae(`/keywords-with-item-id/${l}`);return(Array.isArray(s)?s:[]).map((r,f)=>({id:String(f),keyword:r.keyword||"",reply_content:r.reply||"",item_id:r.item_id||"",match_type:"exact",enabled:!0}))},r_=async(l,s)=>{const c=await ae(`/keywords-with-item-id/${s}`),r=Array.isArray(c)?c:[];if(l.id){const f=parseInt(l.id);f>=0&&f{const c=await ae(`/keywords-with-item-id/${s}`),r=Array.isArray(c)?c:[],f=parseInt(l);return f>=0&&f{const l=await ae("/system-settings");return l.data||l},d_=async l=>{const s=Object.entries(l).map(([c,r])=>De(`/system-settings/${c}`,{value:String(r)}));return await Promise.all(s),{success:!0,message:"Settings saved"}},m_=async l=>ne("/system-settings/email-test",l),h_=async l=>ae(`/ai-reply-settings/${l}`),y_=async(l,s)=>{const c={ai_enabled:s.ai_enabled??!1,model_name:s.model_name??"qwen-plus",api_key:s.api_key??"",base_url:s.base_url??"https://dashscope.aliyuncs.com/compatible-mode/v1",max_discount_percent:s.max_discount_percent??10,max_discount_amount:s.max_discount_amount??100,max_bargain_rounds:s.max_bargain_rounds??3,context_enabled:s.context_enabled??!0,context_message_limit:s.context_message_limit??12,context_expire_minutes:s.context_expire_minutes??120,custom_prompts:s.custom_prompts??""};return De(`/ai-reply-settings/${l}`,c)},p_=async(l,s={})=>{const c=await ne(`/ai-reply-test/${l}`,{message:"你好,这是一条测试消息",...s});return{success:c.success??!0,message:c.message||"AI 连接测试成功",reply:c.reply}},g_=async()=>({success:!0,data:(await ae("/notification-channels")||[]).map(c=>{let r;try{r=JSON.parse(c.config)}catch{r=void 0}return{id:String(c.id),name:c.name,type:c.type,config:r||{},enabled:c.enabled,created_at:c.created_at,updated_at:c.updated_at}})}),b_=async l=>ne("/notification-channels",{...l,config:JSON.stringify(l.config)}),v_=async(l,s)=>{const c={...s};return"config"in s&&(c.config=JSON.stringify(s.config)),De(`/notification-channels/${l}`,c)},S_=async l=>tt(`/notification-channels/${l}`),__=async()=>{const l=await ae("/notification-events");return{success:!0,events:(l==null?void 0:l.events)||[],priorities:(l==null?void 0:l.priorities)||[]}},x_=async()=>{const l=await ae("/message-notifications"),s=[];for(const[c,r]of Object.entries(l||{}))if(Array.isArray(r))for(const f of r)s.push({id:String(f.id),cookie_id:c,channel_id:f.channel_id,channel_name:f.channel_name,channel_type:f.channel_type,channel_enabled:f.channel_enabled!==!1,name:f.name??null,event_types:f.event_types??null,enabled:f.enabled});return{success:!0,data:s}},E_=async(l,s,c,r)=>ne(`/message-notifications/${l}`,{channel_id:s,enabled:c,...r?{name:r.name??"",event_types:r.eventTypes??[]}:{}}),A_=async(l,s)=>{const c={};return s.name!==void 0&&(c.name=s.name),s.eventTypes!==void 0&&(c.event_types=s.eventTypes),s.enabled!==void 0&&(c.enabled=s.enabled),De(`/message-notifications/rule/${l}`,c)},T_=async l=>tt(`/message-notifications/${l}`),O_=async l=>ne(`/message-notifications/rule/${l}/test`),N_=async(l={})=>ae("/risk-control-logs",l),R_=async l=>tt(`/risk-control-logs/${l}`),w_=async(l={})=>ae("/logs",l),z_=async(l={})=>(await ae("/message-filters",l)).data||[],j_=async l=>ne("/message-filters/batch-create",l),D_=async l=>(await De(`/message-filters/${l}/toggle`,{})).data,M_=async l=>{await tt(`/message-filters/${l}`)},C_=async l=>(await ne("/message-filters/batch-delete",{ids:l})).deleted,U_=async()=>(await ae("/chat/accounts")).data||[],q_=async(l,s,c=30)=>(await ae(`/chat/conversations/${encodeURIComponent(l)}`,{cursor:s,limit:c})).data,B_=async(l,s,c,r=50)=>(await ae(`/chat/messages/${encodeURIComponent(l)}/${encodeURIComponent(s)}`,{cursor:c,limit:r})).data,H_=async(l,s)=>ne(`/chat/send/${encodeURIComponent(l)}`,s),L_=async(l,s)=>{const c=new FormData;return c.append("cid",s.cid),c.append("to_user_id",s.to_user_id),c.append("image",s.file),ne(`/chat/send-image/${encodeURIComponent(l)}`,c)},k_=async()=>ae("/default-replies"),Y_=async l=>{const s=await ae(`/default-replies/${l}`);return{cookie_id:l,enabled:s.enabled||!1,reply_content:s.reply_content||"",reply_once:s.reply_once||!1,reply_image_url:s.reply_image_url||""}},V_=async(l,s)=>De(`/default-replies/${l}`,{enabled:s.enabled??!1,reply_content:s.reply_content||"",reply_once:s.reply_once??!1,reply_image_url:s.reply_image_url||""}),X_=async l=>tt(`/default-replies/${l}`),G_=async l=>ne(`/default-replies/${l}/clear-records`,{}),zv=async(l=!1)=>ae("/api/announcement",l?{force:!0}:void 0),Q_=async(l,s=1,c=20,r="VALID")=>ae("/resell/favorites",{cookie_id:l,page:s,page_size:c,type:r}),Z_=async(l,s,c=1,r=20)=>ae("/resell/search",{cookie_id:l,keyword:s,page:c,page_size:r}),K_=async()=>ae("/hotlist"),J_=async l=>ne("/hotlist/refresh",{category:l}),$_=async l=>ne("/resell/preview",l),F_=async()=>ae("/pricewatch/rules"),W_=async l=>ne("/pricewatch/rules",l),P_=async(l,s)=>De(`/pricewatch/rules/${l}`,s),I_=async l=>tt(`/pricewatch/rules/${l}`),ex=async l=>ne("/pricewatch/preview",l),tx=async l=>ne(`/pricewatch/rules/${l}/run`),ax=async(l,s=50)=>ae(`/pricewatch/rules/${l}/records`,{limit:s}),nx=async()=>ae("/pricewatch/cookies"),lx=async l=>ne("/resell/publish",l),ux=async l=>{const s=new FormData;return s.append("file",l),ne("/resell/upload-image",s,{timeout:6e4})},ix=async l=>ne("/resell/ai-optimize",l,{timeout:15e4}),sx=async l=>ne("/ai-optimize/preview",{cookie_id:l},{timeout:15e3}),cx=async l=>ne("/ai-optimize/suggest",{cookie_id:l},{timeout:36e4}),rx=async l=>ae("/peer-shops",{cookie_id:l}),ox=async l=>ne("/peer-shops/refresh",{cookie_id:l}),fx=async l=>ne("/peer-shops/ai-analyze",{cookie_id:l},{timeout:36e4}),gr="app:feedback",br="app:confirm",jv=l=>/失败|错误|异常|无法|error|fail/i.test(l)?"error":/警告|注意|请输入|请选择|warning/i.test(l)?"warning":/成功|完成|已新增|已保存|已删除|success/i.test(l)?"success":"info",il=(l,s)=>{const c=String(l??"").trim();c&&window.dispatchEvent(new CustomEvent(gr,{detail:{id:`${Date.now()}-${Math.random().toString(36).slice(2)}`,message:c,type:s||jv(c)}}))},dx=(l,s={})=>new Promise(c=>{window.dispatchEvent(new CustomEvent(br,{detail:{message:l,title:s.title||"确认操作",confirmLabel:s.confirmLabel||"确认",cancelLabel:s.cancelLabel||"取消",danger:s.danger??!0,resolve:c}}))}),Dv=/^[A-Za-z0-9_-]{3,32}$/,Mv=/^[^@\s]+@[^@\s]+\.[^@\s]+$/,Cv=72;function Ph(l){return l?Dv.test(l)?[!0,""]:[!1,"用户名需为 3-32 位字母、数字、下划线或连字符"]:[!1,"用户名不能为空"]}function Uv(l){return l?l.length>254?[!1,"邮箱地址过长"]:Mv.test(l)?[!0,""]:[!1,"邮箱格式不正确"]:[!1,"邮箱不能为空"]}function Ih(l){if(!l)return[!1,"密码不能为空"];if(l.length<8)return[!1,"密码至少 8 位,且需同时包含字母和数字"];if(l.length>64)return[!1,"密码最长 64 位"];if(new TextEncoder().encode(l).length>Cv)return[!1,"密码过长(超过 72 字节),请缩短后重试"];const s=/[a-zA-Z]/.test(l),c=/\d/.test(l);return!s||!c?[!1,"密码至少 8 位,且需同时包含字母和数字"]:[!0,""]}const qv=({activeTab:l,setActiveTab:s,onLogout:c,mobileOpen:r,onMobileClose:f,isAdmin:m=!1,username:y,onUsernameChange:p})=>{const[v,g]=q.useState(!1),[A,N]=q.useState(null),B=q.useRef(null),F=X=>m||!["settings","users"].includes(X.id);q.useEffect(()=>{if(!v)return;const X=Y=>{B.current&&!B.current.contains(Y.target)&&g(!1)};return document.addEventListener("mousedown",X),()=>document.removeEventListener("mousedown",X)},[v]);const W=[{label:"经营概览",items:[{id:"dashboard",icon:h1,label:"总览"}]},{label:"闲鱼业务",items:[{id:"accounts",icon:tg,label:"账号管理"},{id:"items",icon:$p,label:"商品与发货"},{id:"resell",icon:X1,label:"一键转卖"},{id:"hotlist",icon:o1,label:"实时热卖榜"},{id:"peershops",icon:Wp,label:"同行热卖店铺"},{id:"pricewatch",icon:K1,label:"价格监控"},{id:"orders",icon:L1,label:"订单管理"},{id:"buyer-interaction",icon:Y1,label:"买家互动"},{id:"cards",icon:l1,label:"卡密库存"}]},{label:"客户沟通",items:[{id:"messages",icon:p1,label:"消息中心"},{id:"auto-reply",icon:R1,label:"自动回复"},{id:"ai-reply",icon:Kp,label:"AI 回复"}]},{label:"自动化",items:[{id:"product-automation",icon:ng,label:"商品自动化"}]},{label:"系统",items:[{id:"help",icon:Qp,label:"使用说明"},{id:"users",icon:F1,label:"用户管理"},{id:"notifications",icon:Xp,label:"通知与日志"},{id:"settings",icon:q1,label:"系统设置"},{id:"about",icon:bh,label:"关于"}].filter(F)}];return h.jsxs(h.Fragment,{children:[r&&h.jsx("button",{type:"button",className:"fixed inset-0 z-30 bg-black/40 lg:hidden",onClick:f,"aria-label":"关闭导航"}),h.jsxs("aside",{className:`fixed left-0 top-0 z-40 flex h-screen w-[248px] flex-col bg-[var(--surface)] transition-transform lg:translate-x-0 ${r?"translate-x-0":"-translate-x-full"}`,style:{borderRight:"1px solid var(--border)"},children:[h.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[h.jsxs("div",{className:"flex h-[76px] shrink-0 items-center gap-3 px-5",children:[h.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-xl",style:{background:"linear-gradient(140deg, var(--brand-300), var(--brand))",boxShadow:"var(--shadow-brand)"},children:h.jsx("span",{className:"text-lg font-black text-[#2a2416]",children:"躺"})}),h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsx("p",{className:"truncate text-base font-extrabold text-[var(--text)]",children:"躺赚鱼"}),h.jsx("p",{className:"mt-0.5 text-[11px] font-medium text-[var(--text-soft)]",children:"运营工作台"})]}),h.jsx("button",{type:"button",onClick:f,className:"rounded-full p-2 hover:bg-[var(--surface-hover)] lg:hidden","aria-label":"关闭导航",children:h.jsx(_h,{className:"w-5 h-5"})})]}),h.jsx("nav",{className:"min-h-0 flex-1 overflow-y-auto px-3 pb-4",children:W.map((X,Y)=>h.jsxs("div",{className:Y===0?"":"mt-5",children:[h.jsx("p",{className:"mb-2 px-3 text-[11px] font-bold uppercase tracking-wide text-[var(--text-soft)]",children:X.label}),h.jsx("div",{className:"space-y-1",children:X.items.map(M=>{const K=M.icon,Q=l===M.id;return h.jsxs("button",{type:"button",onClick:()=>s(M.id),className:`group flex min-h-11 w-full items-center gap-3 rounded-xl px-3 text-left transition-all ${Q?"font-bold text-[#2a2416]":"font-medium text-[var(--text-muted)] hover:bg-[var(--surface-hover)] hover:text-[var(--text)]"}`,style:Q?{background:"linear-gradient(135deg, var(--brand-300), var(--brand))",boxShadow:"var(--shadow-brand)"}:void 0,children:[h.jsx(K,{className:`h-[18px] w-[18px] shrink-0 ${Q?"text-[#2a2416]":"text-[var(--text-soft)] group-hover:text-[var(--text-muted)]"}`}),h.jsx("span",{className:"truncate text-sm",children:M.label})]},M.id)})})]},X.label))})]}),h.jsxs("div",{className:"shrink-0 p-3",style:{borderTop:"1px solid var(--border)"},children:[h.jsx(dr,{className:"mb-2"}),h.jsxs("div",{className:"relative",ref:B,children:[h.jsxs("button",{type:"button",onClick:()=>g(X=>!X),"aria-expanded":v,"aria-haspopup":"menu",className:"flex min-h-11 w-full items-center gap-3 rounded-xl px-3 text-left transition-colors hover:bg-[var(--surface-hover)]",children:[h.jsx("span",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-full text-xs font-black text-[#2a2416]",style:{background:"linear-gradient(140deg, var(--brand-300), var(--brand))"},children:(y||"?").slice(0,1).toUpperCase()}),h.jsxs("span",{className:"min-w-0 flex-1",children:[h.jsx("span",{className:"block truncate text-sm font-semibold text-[var(--text)]",children:y||"未登录"}),h.jsx("span",{className:"block text-[11px] font-medium text-[var(--text-soft)]",children:m?"管理员":"用户"})]}),h.jsx(Ip,{className:`h-4 w-4 shrink-0 text-[var(--text-soft)] transition-transform ${v?"":"rotate-180"}`})]}),v&&h.jsxs("div",{role:"menu",className:"absolute bottom-full left-0 right-0 mb-2 space-y-0.5 rounded-xl border bg-[var(--surface)] p-1.5 shadow-[var(--shadow-card,0_8px_24px_rgba(20,24,28,0.16))]",style:{borderColor:"var(--border)"},children:[!m&&h.jsxs("button",{type:"button",role:"menuitem",onClick:()=>{g(!1),N("rename")},className:"flex min-h-10 w-full items-center gap-3 rounded-lg px-3 text-left text-sm font-medium text-[var(--text-muted)] transition-colors hover:bg-[var(--surface-hover)] hover:text-[var(--text)]",children:[h.jsx(P1,{className:"h-4 w-4 shrink-0"}),"修改用户名"]}),h.jsxs("button",{type:"button",role:"menuitem",onClick:()=>{g(!1),N("password")},className:"flex min-h-10 w-full items-center gap-3 rounded-lg px-3 text-left text-sm font-medium text-[var(--text-muted)] transition-colors hover:bg-[var(--surface-hover)] hover:text-[var(--text)]",children:[h.jsx(vh,{className:"h-4 w-4 shrink-0"}),"修改密码"]}),h.jsx("div",{className:"my-1",style:{borderTop:"1px solid var(--border)"}}),h.jsxs("button",{type:"button",role:"menuitem",onClick:c,className:"flex min-h-10 w-full items-center gap-3 rounded-lg px-3 text-left text-sm font-medium text-[var(--text-muted)] transition-colors hover:bg-[var(--danger-soft)] hover:text-[var(--danger)]",children:[h.jsx(S1,{className:"h-4 w-4 shrink-0"}),"退出登录"]})]})]})]}),A&&Up.createPortal(h.jsx(Bv,{mode:A,isAdmin:m,onClose:()=>N(null),onRenamed:X=>{N(null),p==null||p(X)}}),document.body)]})]})},Bv=({mode:l,isAdmin:s,onClose:c,onRenamed:r})=>{const[f,m]=q.useState(""),[y,p]=q.useState(""),[v,g]=q.useState(""),[A,N]=q.useState(!1),B=l==="rename",F=async X=>{X.preventDefault();const Y=y.trim();if(B){if(!Ph(Y)){il("用户名需 3-32 位,仅限字母、数字、下划线或短横线","warning");return}}else{if(!Ih(Y)){il("新密码至少 8 位,且同时包含字母和数字","warning");return}if(Y!==v){il("两次输入的新密码不一致","warning");return}}N(!0);try{const M=B?await xv(Y,f):await Nv(f,Y);M.success?(il(B?"用户名修改成功":"密码修改成功,下次登录请使用新密码","success"),B?r(Y):c()):il(M.message||"修改失败,请稍后重试","error")}catch{il("网络异常,修改失败","error")}finally{N(!1)}},W="ios-input h-11 w-full rounded-md px-4 text-sm";return h.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40 p-4",onClick:A?void 0:c,children:h.jsxs("form",{className:"w-full max-w-sm rounded-2xl bg-[var(--surface)] p-6 shadow-[0_12px_40px_rgba(20,24,28,0.24)]",onClick:X=>X.stopPropagation(),onSubmit:X=>void F(X),children:[h.jsx("h3",{className:"text-base font-extrabold text-[var(--text)]",children:B?"修改用户名":"修改密码"}),h.jsx("p",{className:"mt-1 text-xs text-[var(--text-soft)]",children:B?"用户名是登录凭证,修改后请用新用户名登录":"修改成功后当前登录保持有效"}),h.jsxs("label",{className:"mt-4 block",children:[h.jsx("span",{className:"mb-1.5 block text-xs font-bold text-[var(--text-muted)]",children:"当前密码"}),h.jsx("input",{type:"password",autoComplete:"current-password",value:f,onChange:X=>m(X.target.value),className:W,placeholder:"请输入当前密码",disabled:A})]}),h.jsxs("label",{className:"mt-3 block",children:[h.jsx("span",{className:"mb-1.5 block text-xs font-bold text-[var(--text-muted)]",children:B?"新用户名":"新密码"}),h.jsx("input",{type:B?"text":"password",autoComplete:B?"username":"new-password",value:y,onChange:X=>p(X.target.value),className:W,placeholder:B?"3-32 位字母/数字/下划线/短横线":"至少 8 位,含字母和数字",disabled:A})]}),!B&&h.jsxs("label",{className:"mt-3 block",children:[h.jsx("span",{className:"mb-1.5 block text-xs font-bold text-[var(--text-muted)]",children:"确认新密码"}),h.jsx("input",{type:"password",autoComplete:"new-password",value:v,onChange:X=>g(X.target.value),className:W,placeholder:"再次输入新密码",disabled:A})]}),h.jsxs("div",{className:"mt-6 flex gap-3",children:[h.jsx("button",{type:"button",onClick:c,disabled:A,className:"ios-btn-secondary h-11 flex-1 rounded-md text-sm font-bold",children:"取消"}),h.jsx("button",{type:"submit",disabled:A||!f||!y.trim(),className:"ios-btn-primary h-11 flex-1 rounded-md text-sm font-bold disabled:opacity-60",children:A?h.jsx(su,{className:"mx-auto h-4 w-4 animate-spin"}):"确认修改"})]})]})})},Hv={success:{icon:or,className:"border-emerald-200 bg-emerald-50 text-emerald-800"},error:{icon:t1,className:"border-red-200 bg-red-50 text-red-800"},warning:{icon:Sh,className:"border-amber-200 bg-amber-50 text-amber-900"},info:{icon:bh,className:"border-gray-200 bg-white text-gray-800"}},Lv=()=>{const[l,s]=q.useState([]),[c,r]=q.useState(null);q.useEffect(()=>{const m=p=>{const v=p.detail;s(g=>[...g.slice(-3),v]),window.setTimeout(()=>{s(g=>g.filter(A=>A.id!==v.id))},v.type==="error"?6e3:3600)},y=p=>{r(p.detail)};return window.addEventListener(gr,m),window.addEventListener(br,y),()=>{window.removeEventListener(gr,m),window.removeEventListener(br,y)}},[]),q.useEffect(()=>{if(!c)return;const m=y=>{y.key==="Escape"&&(c.resolve(!1),r(null))};return window.addEventListener("keydown",m),()=>window.removeEventListener("keydown",m)},[c]);const f=m=>{c==null||c.resolve(m),r(null)};return h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"fixed right-4 top-4 z-[10000] flex w-[min(380px,calc(100vw-2rem))] flex-col gap-2","aria-live":"polite",children:l.map(m=>{const y=Hv[m.type],p=y.icon;return h.jsxs("div",{role:m.type==="error"?"alert":"status",className:`flex items-start gap-3 rounded-md border px-4 py-3 shadow-[0_4px_16px_rgba(20,24,28,0.10)] ${y.className}`,children:[h.jsx(p,{className:"mt-0.5 h-5 w-5 shrink-0"}),h.jsx("span",{className:"min-w-0 flex-1 break-words text-sm font-medium",children:m.message}),h.jsx("button",{type:"button",className:"shrink-0 rounded p-0.5 hover:bg-black/5",onClick:()=>s(v=>v.filter(g=>g.id!==m.id)),"aria-label":"关闭提示",children:h.jsx(_h,{className:"h-4 w-4"})})]},m.id)})}),c&&h.jsx("div",{className:"modal-overlay",role:"presentation",onMouseDown:m=>{m.target===m.currentTarget&&f(!1)},children:h.jsxs("div",{role:"alertdialog","aria-modal":"true","aria-labelledby":"global-confirm-title","aria-describedby":"global-confirm-message",className:"modal-container max-w-md",children:[h.jsxs("div",{className:"modal-body flex items-start gap-3",children:[h.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-md bg-amber-50 text-amber-700",children:h.jsx(Sh,{className:"h-5 w-5"})}),h.jsxs("div",{className:"min-w-0",children:[h.jsx("h2",{id:"global-confirm-title",className:"text-base font-bold text-gray-900",children:c.title}),h.jsx("p",{id:"global-confirm-message",className:"mt-1 break-words text-sm leading-6 text-gray-600",children:c.message})]})]}),h.jsxs("div",{className:"modal-footer flex justify-end gap-2",children:[h.jsx("button",{type:"button",className:"ios-btn-secondary rounded-md px-4 py-2 text-sm",onClick:()=>f(!1),children:c.cancelLabel}),h.jsx("button",{type:"button",className:`${c.danger?"ios-btn-danger":"ios-btn-primary"} rounded-md px-4 py-2 text-sm`,onClick:()=>f(!0),autoFocus:!0,children:c.confirmLabel})]})]})})]})},kv={info:"border-[#ffe566] bg-[#fffdf0] text-[#6b5200]",warning:"border-[#f5c800] bg-[#fff7e6] text-[#8a6300]",danger:"border-red-200 bg-red-50 text-red-700"},oh={info:"bg-[#ffe100] text-[#2a2416]",warning:"bg-[#f5c800] text-[#2a2416]",danger:"bg-red-600 text-white"},Yv=()=>{const[l,s]=q.useState(null);q.useEffect(()=>{const y=()=>{zv().then(s).catch(()=>{})};y();const p=setInterval(y,3e5);return()=>clearInterval(p)},[]);const c=(l==null?void 0:l.announcements)||[],r=!!(l!=null&&l.has_update);if(!c.length&&!r)return null;const f=c.some(y=>y.level==="danger")?"danger":c.some(y=>y.level==="warning")?"warning":"info",m=c.map(y=>h.jsxs("span",{className:"inline-flex items-center gap-2 px-8",children:[h.jsx("span",{className:`rounded px-1.5 py-0.5 text-[10px] font-bold ${oh[y.level]||oh.info}`,children:y.level==="danger"?"重要":y.level==="warning"?"注意":"通知"}),y.title&&h.jsx("b",{className:"font-bold",children:y.title}),h.jsx("span",{children:y.content.replace(/\s*\n\s*/g," ")}),y.published_at&&h.jsx("span",{className:"text-[11px] opacity-60",children:y.published_at})]},y.id));return h.jsxs("div",{className:"mx-auto max-w-[1320px] space-y-2 px-4 pt-4 sm:px-6 lg:px-8",children:[r&&h.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 rounded-md border border-amber-200 bg-amber-50 px-4 py-3",children:[h.jsxs("div",{className:"min-w-0",children:[h.jsxs("p",{className:"text-sm font-bold text-amber-900",children:["发现新版本 ",l==null?void 0:l.latest_version,h.jsxs("span",{className:"ml-2 font-normal text-amber-700",children:["当前 ",l==null?void 0:l.local_version]})]}),(l==null?void 0:l.release_notes)&&h.jsx("p",{className:"mt-1 whitespace-pre-wrap text-xs leading-relaxed text-amber-800",children:l.release_notes})]}),(l==null?void 0:l.download_url)&&h.jsxs("a",{href:l.download_url,target:"_blank",rel:"noopener noreferrer",className:"ios-btn-primary inline-flex flex-none items-center gap-2 rounded-md px-3 py-2 text-xs",children:[h.jsx(i1,{className:"h-4 w-4"}),"前往下载",h.jsx(c1,{className:"h-3 w-3"})]})]}),c.length>0&&h.jsxs("div",{className:`flex items-center gap-3 overflow-hidden rounded-md border px-3 py-2 ${kv[f]}`,children:[h.jsx(A1,{className:"h-4 w-4 flex-none"}),h.jsx("div",{className:"marquee min-w-0 flex-1",children:h.jsxs("div",{className:"marquee__track text-xs leading-relaxed",children:[m,h.jsx("span",{"aria-hidden":"true",children:m})]})})]})]})},fh=({image:l,code:s,onCodeChange:c,onRefresh:r,label:f="图形验证码"})=>h.jsxs("label",{className:"block",children:[h.jsx("span",{className:"mb-1.5 block text-xs font-bold text-gray-600",children:f}),h.jsxs("div",{className:"flex gap-2",children:[h.jsx("input",{type:"text",placeholder:"请输入图中字符",value:s,onChange:m=>c(m.target.value),maxLength:4,autoComplete:"off",className:"ios-input h-11 w-full rounded-md px-4 text-sm uppercase"}),l?h.jsx("img",{src:l,alt:"图形验证码,点击换一张",title:"看不清?点击换一张",onClick:r,className:"h-11 w-28 shrink-0 cursor-pointer rounded-md border border-gray-200 bg-white"}):h.jsx("button",{type:"button",onClick:r,className:"h-11 w-28 shrink-0 rounded-md border border-gray-200 bg-gray-50 text-xs text-gray-500",children:"点击获取"}),h.jsx("button",{type:"button",onClick:r,"aria-label":"刷新图形验证码",className:"ios-btn-secondary h-11 shrink-0 rounded-md px-2",children:h.jsx(C1,{className:"h-4 w-4"})})]})]});function dh(l=!1){const[s,c]=q.useState(()=>mh()),[r,f]=q.useState(""),[m,y]=q.useState(""),[p,v]=q.useState(!1),g=q.useCallback(async()=>{const A=mh();c(A),y("");try{const N=await Tv(A);N.success&&f(N.captcha_image)}catch{}},[]);return q.useEffect(()=>{l&&g()},[]),{sessionId:s,image:r,code:m,setCode:y,required:p,setRequired:v,refresh:g}}function mh(){return typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():`sess-${Date.now()}-${Math.random().toString(36).slice(2)}`}const Vv=q.lazy(()=>Pe(()=>import("./Dashboard-CeRTyM_j.js"),__vite__mapDeps([0,1,2,3,4,5]))),Xv=q.lazy(()=>Pe(()=>import("./AccountList-DfgloUxg.js"),__vite__mapDeps([6,1,7,8,9,10,11,12,13,14]))),Gv=q.lazy(()=>Pe(()=>import("./OrderList-CL0--ZMt.js"),__vite__mapDeps([15,1,16,17,18,5,19,13,20,10,21,14]))),Qv=q.lazy(()=>Pe(()=>import("./CardList-CfOseTaj.js"),__vite__mapDeps([22,1,16,20,10,2,14,23,5]))),Zv=q.lazy(()=>Pe(()=>import("./ItemList-BcNZ279Z.js"),__vite__mapDeps([24,1,25,14,10,16,26,9,5,8,27,20]))),Kv=q.lazy(()=>Pe(()=>import("./ProductAutomation-DCR1XEfL.js"),__vite__mapDeps([28,1,18,10,14,29,5,30]))),Jv=q.lazy(()=>Pe(()=>import("./AIReply-lg6NYQkE.js"),__vite__mapDeps([31,1,14,32,12,13,29]))),$v=q.lazy(()=>Pe(()=>import("./Settings-6SylkBTn.js"),__vite__mapDeps([33,1,14,8,34,12,13]))),Fv=q.lazy(()=>Pe(()=>import("./Keywords-BfjxZQp6.js"),__vite__mapDeps([35,1,17,11,16,9,10,26,14,8]))),Wv=q.lazy(()=>Pe(()=>import("./MessageManagement-NPF-d8RM.js"),__vite__mapDeps([36,1,27,18,2,23,34,37,16,10]))),Pv=q.lazy(()=>Pe(()=>import("./NotificationsAndLogs-FD8llMy1.js"),__vite__mapDeps([38,1,30,25,4,16,39,10,37,21,14,7]))),Iv=q.lazy(()=>Pe(()=>import("./UserManagement-DkSfyiXx.js"),__vite__mapDeps([40,1,10]))),e2=q.lazy(()=>Pe(()=>import("./About-Bnoqurmz.js"),__vite__mapDeps([41,1]))),t2=q.lazy(()=>Pe(()=>import("./BuyerInteraction-BBBi7zM4.js"),__vite__mapDeps([42,1,14,25,19,32]))),a2=q.lazy(()=>Pe(()=>import("./Resell-CYFkAG_P.js"),__vite__mapDeps([43,1,18,16,8,2]))),n2=q.lazy(()=>Pe(()=>import("./HotList-CmrhQsvX.js"),__vite__mapDeps([44,1,3,2]))),l2=q.lazy(()=>Pe(()=>import("./PeerShops--FPB0l6-.js"),__vite__mapDeps([45,1,8,3]))),u2=q.lazy(()=>Pe(()=>import("./PriceWatch-D0ZYbUkf.js"),__vite__mapDeps([46,1,16,29,39,10,18]))),i2=q.lazy(()=>Pe(()=>import("./Help-BhyISmfe.js"),[])),We=()=>h.jsxs("div",{className:"page-loading",children:[h.jsx(su,{className:"h-5 w-5 animate-spin"}),h.jsx("span",{children:"正在加载页面"})]}),s2={dashboard:"总览",accounts:"账号管理",items:"商品与发货",resell:"一键转卖",hotlist:"实时热卖榜",peershops:"同行热卖店铺",pricewatch:"价格监控",orders:"订单管理","buyer-interaction":"买家互动",cards:"卡密库存",messages:"消息中心","auto-reply":"自动回复","ai-reply":"AI 回复","product-automation":"商品自动化",notifications:"通知与日志",settings:"系统设置",users:"用户管理",about:"关于",help:"使用说明"},c2=["settings","users"],r2=()=>{const[l,s]=q.useState(!1),[c,r]=q.useState(()=>localStorage.getItem("active_page")||"dashboard"),[f,m]=q.useState(!0),[y,p]=q.useState(""),[v,g]=q.useState(""),[A,N]=q.useState(!1),[B,F]=q.useState(""),[W,X]=q.useState(""),[Y,M]=q.useState(!1),[K,Q]=q.useState(!1),[ee,Ee]=q.useState("login"),[me,le]=q.useState(!1),[Le,ct]=q.useState(!0),[be,Ce]=q.useState({username:"",email:"",password:"",code:""}),[ke,xt]=q.useState(!1),[He,Re]=q.useState(""),[z,L]=q.useState(""),[I,Se]=q.useState(!1),[re,S]=q.useState(0),j=dh(),H=dh();q.useEffect(()=>{ee==="register"&&j.refresh()},[ee]),q.useEffect(()=>{_v().then(k=>{le(String(k.registration_enabled)==="true"),ct(String(k.email_verification_enabled??"true")!=="false")}).catch(()=>le(!1))},[]),q.useEffect(()=>{if(re<=0)return;const k=setTimeout(()=>S(re-1),1e3);return()=>clearTimeout(k)},[re]);const G=async()=>{if(!be.email.trim()){Re("请先填写邮箱");return}if(!j.code.trim()){Re("请先输入图形验证码");return}Se(!0),Re(""),L("");try{const k=await Av(be.email.trim(),"register",{session_id:j.sessionId,code:j.code.trim()});if((k==null?void 0:k.success)===!1){Re(k.message||"验证码发送失败,请确认邮件服务已配置"),j.refresh();return}L("验证码已发送,请查收邮箱"),S(60),j.refresh()}catch(k){Re(k instanceof Error?k.message:"验证码发送失败"),j.refresh()}finally{Se(!1)}},ue=async k=>{k.preventDefault(),Re(""),L("");for(const[ie,Te]of[Ph(be.username.trim()),Uv(be.email.trim()),Ih(be.password)])if(!ie){Re(Te);return}if(Le&&!be.code.trim()){Re("请填写邮箱验证码");return}xt(!0);try{const ie=await Ev({username:be.username.trim(),email:be.email.trim(),password:be.password,...Le?{verification_code:be.code.trim()}:{}});ie!=null&&ie.success?(p(be.username.trim()),g(""),Ce({username:"",email:"",password:"",code:""}),Ee("login"),F(""),L(""),X("注册成功,请使用新账号登录")):Re((ie==null?void 0:ie.message)||"注册失败")}catch(ie){Re(ie instanceof Error?ie.message:"注册失败,请稍后重试")}finally{xt(!1)}};q.useEffect(()=>{localStorage.getItem("auth_token")?Ov().then(Te=>{if(!Te.authenticated){localStorage.removeItem("auth_token");return}Q(!!Te.is_admin),p(Te.username||""),s(!0)}).catch(()=>localStorage.removeItem("auth_token")).finally(()=>m(!1)):m(!1);const ie=()=>s(!1);return window.addEventListener("auth:logout",ie),()=>window.removeEventListener("auth:logout",ie)},[]),q.useEffect(()=>{localStorage.setItem("active_page",c)},[c]),q.useEffect(()=>{!K&&c2.includes(c)&&r("dashboard")},[K]);const Z=async k=>{k.preventDefault(),N(!0),F("");try{const ie=await Sv({username:y,password:v,...H.required?{captcha_session_id:H.sessionId,captcha_code:H.code.trim()}:{}});ie.success&&ie.token?(localStorage.setItem("auth_token",ie.token),Q(!!ie.is_admin),p(ie.username||y),s(!0)):(F(ie.message||"账号或密码错误"),ie.captcha_required&&(H.setRequired(!0),H.refresh()))}catch(ie){F(ie instanceof Error?ie.message:"登录失败,请稍后重试")}finally{N(!1)}};return f?h.jsx("div",{className:"min-h-screen flex items-center justify-center bg-[var(--app-bg)]",children:h.jsxs("div",{className:"flex items-center gap-3 text-sm font-semibold text-[var(--text-muted)]",children:[h.jsx(su,{className:"h-5 w-5 animate-spin text-[var(--brand-text)]"}),"正在验证登录状态"]})}):l?h.jsxs("div",{className:"flex min-h-screen bg-[var(--app-bg)] text-[var(--text)]",children:[h.jsx(Lv,{}),h.jsx(qv,{activeTab:c,setActiveTab:k=>{r(k),M(!1)},mobileOpen:Y,onMobileClose:()=>M(!1),isAdmin:K,username:l?y:"",onUsernameChange:p,onLogout:()=>{localStorage.removeItem("auth_token"),Q(!1),s(!1)}}),h.jsxs("main",{className:"min-h-screen min-w-0 flex-1 overflow-y-auto lg:ml-[248px]",children:[h.jsxs("header",{className:"sticky top-0 z-20 flex h-14 items-center gap-3 border-b border-[var(--border)] bg-[var(--surface)] px-4 lg:hidden",children:[h.jsx("button",{type:"button",onClick:()=>M(!0),className:"p-2 -ml-2 rounded-md hover:bg-gray-100",title:"打开导航","aria-label":"打开导航",children:h.jsx(O1,{className:"w-5 h-5"})}),h.jsxs("div",{className:"min-w-0",children:[h.jsx("p",{className:"truncate text-sm font-bold",children:s2[c]||"躺赚鱼"}),h.jsx("p",{className:"text-[11px] text-gray-400",children:"躺赚鱼"})]}),h.jsx(dr,{compact:!0,className:"ml-auto"})]}),c!=="messages"&&h.jsx(Yv,{}),h.jsxs("div",{className:c==="messages"?"h-[calc(100vh-3.5rem)] lg:h-screen overflow-hidden":"mx-auto max-w-[1320px] p-4 pb-10 sm:p-6 lg:p-8",children:[h.jsx("section",{hidden:c!=="dashboard",children:h.jsx(q.Suspense,{fallback:c==="dashboard"?h.jsx(We,{}):null,children:h.jsx(Vv,{})})}),h.jsx("section",{hidden:c!=="accounts",children:h.jsx(q.Suspense,{fallback:c==="accounts"?h.jsx(We,{}):null,children:h.jsx(Xv,{})})}),h.jsx("section",{hidden:c!=="items",children:h.jsx(q.Suspense,{fallback:c==="items"?h.jsx(We,{}):null,children:h.jsx(Zv,{})})}),h.jsx("section",{hidden:c!=="resell",children:h.jsx(q.Suspense,{fallback:c==="resell"?h.jsx(We,{}):null,children:h.jsx(a2,{})})}),h.jsx("section",{hidden:c!=="hotlist",children:h.jsx(q.Suspense,{fallback:c==="hotlist"?h.jsx(We,{}):null,children:h.jsx(n2,{})})}),h.jsx("section",{hidden:c!=="peershops",children:h.jsx(q.Suspense,{fallback:c==="peershops"?h.jsx(We,{}):null,children:h.jsx(l2,{})})}),h.jsx("section",{hidden:c!=="pricewatch",children:h.jsx(q.Suspense,{fallback:c==="pricewatch"?h.jsx(We,{}):null,children:h.jsx(u2,{})})}),h.jsx("section",{hidden:c!=="product-automation",children:h.jsx(q.Suspense,{fallback:c==="product-automation"?h.jsx(We,{}):null,children:h.jsx(Kv,{})})}),h.jsx("section",{hidden:c!=="orders",children:h.jsx(q.Suspense,{fallback:c==="orders"?h.jsx(We,{}):null,children:h.jsx(Gv,{})})}),h.jsx("section",{hidden:c!=="cards",children:h.jsx(q.Suspense,{fallback:c==="cards"?h.jsx(We,{}):null,children:h.jsx(Qv,{})})}),h.jsx("section",{hidden:c!=="auto-reply",children:h.jsx(q.Suspense,{fallback:c==="auto-reply"?h.jsx(We,{}):null,children:h.jsx(Fv,{mode:"reply"})})}),h.jsx("section",{hidden:c!=="ai-reply",children:h.jsx(q.Suspense,{fallback:c==="ai-reply"?h.jsx(We,{}):null,children:h.jsx(Jv,{})})}),h.jsx("section",{hidden:c!=="messages",className:"h-full min-h-0",children:h.jsx(q.Suspense,{fallback:c==="messages"?h.jsx(We,{}):null,children:h.jsx(Wv,{isActive:c==="messages"})})}),h.jsx("section",{hidden:c!=="notifications",children:h.jsx(q.Suspense,{fallback:c==="notifications"?h.jsx(We,{}):null,children:h.jsx(Pv,{isAdmin:K})})}),K&&h.jsx("section",{hidden:c!=="users",children:h.jsx(q.Suspense,{fallback:c==="users"?h.jsx(We,{}):null,children:h.jsx(Iv,{})})}),K&&h.jsx("section",{hidden:c!=="settings",children:h.jsx(q.Suspense,{fallback:c==="settings"?h.jsx(We,{}):null,children:h.jsx($v,{})})}),h.jsx("section",{hidden:c!=="buyer-interaction",children:h.jsx(q.Suspense,{fallback:c==="buyer-interaction"?h.jsx(We,{}):null,children:h.jsx(t2,{})})}),h.jsx("section",{hidden:c!=="about",children:h.jsx(q.Suspense,{fallback:c==="about"?h.jsx(We,{}):null,children:h.jsx(e2,{})})}),h.jsx("section",{hidden:c!=="help",children:h.jsx(q.Suspense,{fallback:c==="help"?h.jsx(We,{}):null,children:h.jsx(i2,{})})})]})]})]}):h.jsxs("div",{className:"relative min-h-screen bg-[var(--app-bg)] p-4 font-sans text-[var(--text)] sm:p-6",children:[h.jsx(dr,{compact:!0,className:"absolute right-4 top-4 z-10 sm:right-6 sm:top-6"}),h.jsx("div",{className:"mx-auto flex min-h-[calc(100vh-2rem)] max-w-5xl items-center justify-center sm:min-h-[calc(100vh-3rem)]",children:h.jsxs("div",{className:"grid w-full overflow-hidden rounded-3xl bg-[var(--surface)] lg:grid-cols-[1.05fr_0.95fr]",style:{border:"1px solid var(--border)",boxShadow:"var(--shadow-lg)"},children:[h.jsxs("div",{className:"theme-brand-panel hidden min-h-[560px] flex-col justify-between p-10 lg:flex",style:{background:"linear-gradient(155deg, #fff8d1 0%, #ffe566 55%, #ffe100 100%)"},children:[h.jsxs("div",{children:[h.jsx("div",{className:"flex h-14 w-14 items-center justify-center rounded-2xl bg-white/70 backdrop-blur",children:h.jsx("span",{className:"text-2xl font-black text-[#2a2416]",children:"躺"})}),h.jsx("p",{className:"mt-7 text-xs font-bold tracking-widest text-[#8a6300]",children:"TANGZHUAN YU"}),h.jsx("h1",{className:"mt-2 max-w-md text-3xl font-extrabold leading-tight text-[#2a2416]",children:"躺赚鱼"}),h.jsx("p",{className:"mt-4 max-w-md text-sm leading-7 text-[#6b5200]",children:"统一处理账号、商品、订单、消息、回复和自动发货。"})]}),h.jsx("div",{className:"grid grid-cols-2 gap-3",children:["账号与商品同步","订单与发货处理","消息与自动回复","通知与运行日志"].map(k=>h.jsx("div",{className:"rounded-2xl bg-white/70 px-4 py-3 text-xs font-bold text-[#544c39] backdrop-blur",children:k},k))})]}),h.jsx("div",{className:"flex min-h-[500px] items-center p-7 sm:p-10",children:h.jsxs("div",{className:"mx-auto w-full max-w-sm animate-fade-in",children:[h.jsxs("div",{className:"mb-8",children:[h.jsx("div",{className:"mb-5 flex h-14 w-14 items-center justify-center rounded-2xl lg:hidden",style:{background:"linear-gradient(140deg, var(--brand-300), var(--brand))",boxShadow:"var(--shadow-brand)"},children:h.jsx("span",{className:"text-xl font-black text-[#2a2416]",children:"躺"})}),h.jsx("h2",{className:"text-2xl font-extrabold text-gray-900",children:ee==="login"?"登录管理后台":"注册新账号"}),h.jsx("p",{className:"mt-2 text-sm text-gray-500",children:ee==="login"?"使用管理员账号进入工作台":"创建账号后即可登录工作台"})]}),ee==="login"&&h.jsxs("form",{onSubmit:Z,className:"space-y-5",children:[h.jsxs("div",{className:"space-y-4",children:[h.jsxs("label",{className:"block",children:[h.jsx("span",{className:"mb-1.5 block text-xs font-bold text-gray-600",children:"管理员账号"}),h.jsxs("div",{className:"relative group",children:[h.jsx(Gm,{className:"absolute left-3.5 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400 group-focus-within:text-gray-700"}),h.jsx("input",{type:"text",placeholder:"请输入账号",value:y,onChange:k=>p(k.target.value),autoComplete:"username",required:!0,className:"ios-input h-11 w-full rounded-md py-2.5 pl-10 pr-4 text-sm"})]})]}),h.jsxs("label",{className:"block",children:[h.jsx("span",{className:"mb-1.5 block text-xs font-bold text-gray-600",children:"密码"}),h.jsxs("div",{className:"relative group",children:[h.jsx(Vm,{className:"absolute left-3.5 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400 group-focus-within:text-gray-700"}),h.jsx("input",{type:"password",placeholder:"请输入密码",value:v,onChange:k=>g(k.target.value),autoComplete:"current-password",required:!0,className:"ios-input h-11 w-full rounded-md py-2.5 pl-10 pr-4 text-sm"})]})]}),H.required&&h.jsx(fh,{image:H.image,code:H.code,onCodeChange:H.setCode,onRefresh:()=>void H.refresh()})]}),W&&h.jsxs("div",{role:"status",className:"flex items-center gap-2 rounded-md border border-green-200 bg-green-50 p-3 text-sm font-semibold text-green-700",children:[h.jsx(or,{className:"h-4 w-4 shrink-0"})," ",W]}),B&&h.jsxs("div",{role:"alert",className:"flex items-center gap-2 rounded-md border border-red-200 bg-red-50 p-3 text-sm font-semibold text-red-700",children:[h.jsx(Xm,{className:"h-4 w-4 shrink-0"})," ",B]}),h.jsx("button",{type:"submit",disabled:A,className:"ios-btn-primary flex h-11 w-full items-center justify-center gap-2 rounded-md text-sm disabled:opacity-70",children:A?h.jsx(su,{className:"h-4 w-4 animate-spin"}):h.jsxs(h.Fragment,{children:["登录 ",h.jsx(Ym,{className:"h-4 w-4"})]})})]}),ee==="register"&&h.jsxs("form",{onSubmit:ue,className:"space-y-5",children:[h.jsxs("div",{className:"space-y-4",children:[h.jsxs("label",{className:"block",children:[h.jsx("span",{className:"mb-1.5 block text-xs font-bold text-gray-600",children:"账号"}),h.jsxs("div",{className:"relative group",children:[h.jsx(Gm,{className:"absolute left-3.5 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400 group-focus-within:text-gray-700"}),h.jsx("input",{type:"text",placeholder:"设置登录账号",value:be.username,onChange:k=>Ce({...be,username:k.target.value}),autoComplete:"username",required:!0,className:"ios-input h-11 w-full rounded-md py-2.5 pl-10 pr-4 text-sm"})]})]}),h.jsxs("label",{className:"block",children:[h.jsx("span",{className:"mb-1.5 block text-xs font-bold text-gray-600",children:"邮箱"}),h.jsxs("div",{className:"relative group",children:[h.jsx(x1,{className:"absolute left-3.5 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400 group-focus-within:text-gray-700"}),h.jsx("input",{type:"email",placeholder:"用于找回账号",value:be.email,onChange:k=>Ce({...be,email:k.target.value}),autoComplete:"email",required:!0,className:"ios-input h-11 w-full rounded-md py-2.5 pl-10 pr-4 text-sm"})]})]}),h.jsxs("label",{className:"block",children:[h.jsx("span",{className:"mb-1.5 block text-xs font-bold text-gray-600",children:"密码"}),h.jsxs("div",{className:"relative group",children:[h.jsx(Vm,{className:"absolute left-3.5 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400 group-focus-within:text-gray-700"}),h.jsx("input",{type:"password",placeholder:"至少 8 位,含字母和数字",value:be.password,onChange:k=>Ce({...be,password:k.target.value}),autoComplete:"new-password",required:!0,className:"ios-input h-11 w-full rounded-md py-2.5 pl-10 pr-4 text-sm"})]})]}),Le&&h.jsxs(h.Fragment,{children:[h.jsx(fh,{image:j.image,code:j.code,onCodeChange:j.setCode,onRefresh:()=>void j.refresh()}),h.jsxs("label",{className:"block",children:[h.jsx("span",{className:"mb-1.5 block text-xs font-bold text-gray-600",children:"邮箱验证码"}),h.jsxs("div",{className:"flex gap-2",children:[h.jsxs("div",{className:"relative group flex-1",children:[h.jsx(vh,{className:"absolute left-3.5 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400 group-focus-within:text-gray-700"}),h.jsx("input",{type:"text",placeholder:"请输入验证码",value:be.code,onChange:k=>Ce({...be,code:k.target.value}),className:"ios-input h-11 w-full rounded-md py-2.5 pl-10 pr-4 text-sm"})]}),h.jsx("button",{type:"button",onClick:()=>void G(),disabled:I||re>0,className:"ios-btn-secondary h-11 shrink-0 rounded-md px-3 text-xs font-bold disabled:opacity-60",children:re>0?`${re}s`:I?"发送中":"获取验证码"})]})]})]})]}),z&&h.jsxs("div",{role:"status",className:"flex items-center gap-2 rounded-md border border-green-200 bg-green-50 p-3 text-sm font-semibold text-green-700",children:[h.jsx(or,{className:"h-4 w-4 shrink-0"})," ",z]}),He&&h.jsxs("div",{role:"alert",className:"flex items-center gap-2 rounded-md border border-red-200 bg-red-50 p-3 text-sm font-semibold text-red-700",children:[h.jsx(Xm,{className:"h-4 w-4 shrink-0"})," ",He]}),h.jsx("button",{type:"submit",disabled:ke,className:"ios-btn-primary flex h-11 w-full items-center justify-center gap-2 rounded-md text-sm disabled:opacity-70",children:ke?h.jsx(su,{className:"h-4 w-4 animate-spin"}):h.jsxs(h.Fragment,{children:["注册 ",h.jsx(Ym,{className:"h-4 w-4"})]})})]}),me&&h.jsx("div",{className:"mt-5 text-center text-xs text-gray-500",children:ee==="login"?h.jsxs(h.Fragment,{children:["还没有账号?",h.jsx("button",{type:"button",onClick:()=>{Ee("register"),F(""),X("")},className:"ml-1 font-bold text-[var(--brand-text)] hover:underline",children:"注册新账号"})]}):h.jsxs(h.Fragment,{children:["已有账号?",h.jsx("button",{type:"button",onClick:()=>{Ee("login"),Re(""),L("")},className:"ml-1 font-bold text-[var(--brand-text)] hover:underline",children:"返回登录"})]})}),h.jsxs("p",{className:"mt-7 border-t border-gray-100 pt-5 text-xs font-medium text-gray-400",children:["更多开源应用:",h.jsx("a",{href:"https://nav.88531.cn",target:"_blank",rel:"noopener noreferrer",className:"text-[var(--brand-text)] hover:underline",children:"https://nav.88531.cn"})]})]})})]})})]})},ey=document.getElementById("root");if(!ey)throw new Error("Could not find root element to mount to");const o2=Dp.createRoot(ey);o2.render(h.jsx(yh.StrictMode,{children:h.jsx(sg,{children:h.jsx(r2,{})})}));export{$2 as $,q2 as A,Kp as B,t1 as C,B2 as D,c1 as E,H2 as F,Y2 as G,L2 as H,k2 as I,V2 as J,y_ as K,su as L,R1 as M,sx as N,yh as O,i1 as P,Y1 as Q,f2 as R,Xm as S,oS as T,tg as U,G2 as V,J2 as W,_h as X,P2 as Y,I2 as Z,rS as _,vr as a,aS as a$,K2 as a0,W2 as a1,F2 as a2,Q2 as a3,Z2 as a4,dS as a5,OS as a6,AS as a7,SS as a8,l1 as a9,ng as aA,FS as aB,WS as aC,PS as aD,or as aE,HS as aF,YS as aG,QS as aH,$S as aI,kS as aJ,VS as aK,GS as aL,XS as aM,ZS as aN,JS as aO,KS as aP,LS as aQ,p_ as aR,f_ as aS,P1 as aT,x1 as aU,A1 as aV,eS as aW,d_ as aX,Ih as aY,Nv as aZ,tS as a_,xS as aa,ES as ab,_S as ac,TS as ad,a_ as ae,l_ as af,n_ as ag,u_ as ah,i_ as ai,s_ as aj,vh as ak,e_ as al,t_ as am,qS as an,BS as ao,$p as ap,L1 as aq,IS as ar,MS as as,cS as at,CS as au,US as av,DS as aw,zS as ax,jS as ay,wS as az,Up as b,tx as b$,nS as b0,m_ as b1,k_ as b2,c_ as b3,o_ as b4,Y_ as b5,G_ as b6,X_ as b7,r_ as b8,V_ as b9,yS as bA,gS as bB,pS as bC,bh as bD,zv as bE,fS as bF,X1 as bG,Q_ as bH,Z_ as bI,ux as bJ,ix as bK,lx as bL,$_ as bM,K_ as bN,J_ as bO,o1 as bP,rx as bQ,ox as bR,fx as bS,Wp as bT,F_ as bU,nx as bV,K1 as bW,Sh as bX,ex as bY,W_ as bZ,P_ as b_,q_ as ba,B_ as bb,Xp as bc,D_ as bd,U_ as be,z_ as bf,lS as bg,H_ as bh,L_ as bi,j_ as bj,C_ as bk,M_ as bl,g_ as bm,x_ as bn,__ as bo,N_ as bp,w_ as bq,v_ as br,S_ as bs,A_ as bt,O_ as bu,T_ as bv,R_ as bw,b_ as bx,E_ as by,hS as bz,de as c,I_ as c0,ax as c1,vS as d,C1 as e,mS as f,hh as g,NS as h,bS as i,h as j,Gm as k,q1 as l,uS as m,il as n,D2 as o,X2 as p,C2 as q,q as r,U2 as s,iS as t,cx as u,dx as v,RS as w,sS as x,M2 as y,h_ as z}; diff --git a/static/assets/key-DGAb9JNS.js b/static/assets/key-ItWA3Cb3.js similarity index 90% rename from static/assets/key-DGAb9JNS.js rename to static/assets/key-ItWA3Cb3.js index 548d0f1..c82a353 100644 --- a/static/assets/key-DGAb9JNS.js +++ b/static/assets/key-ItWA3Cb3.js @@ -1,4 +1,4 @@ -import{c}from"./index-BtyeumGM.js";/** +import{c}from"./index-IP-mmLlr.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/link-2-YAS_V1Cj.js b/static/assets/link-2-xKkzn7ZQ.js similarity index 89% rename from static/assets/link-2-YAS_V1Cj.js rename to static/assets/link-2-xKkzn7ZQ.js index bb9e033..bc94272 100644 --- a/static/assets/link-2-YAS_V1Cj.js +++ b/static/assets/link-2-xKkzn7ZQ.js @@ -1,4 +1,4 @@ -import{c as e}from"./index-BtyeumGM.js";/** +import{c as e}from"./index-IP-mmLlr.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/message-square-text-s_nuv0lf.js b/static/assets/message-square-text-ApwvxIVw.js similarity index 91% rename from static/assets/message-square-text-s_nuv0lf.js rename to static/assets/message-square-text-ApwvxIVw.js index bf38c6c..1e469d4 100644 --- a/static/assets/message-square-text-s_nuv0lf.js +++ b/static/assets/message-square-text-ApwvxIVw.js @@ -1,4 +1,4 @@ -import{c as e}from"./index-BtyeumGM.js";/** +import{c as e}from"./index-IP-mmLlr.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/package-DRVL5sin.js b/static/assets/package-C7ydMeAZ.js similarity index 91% rename from static/assets/package-DRVL5sin.js rename to static/assets/package-C7ydMeAZ.js index b349c3a..0877e6d 100644 --- a/static/assets/package-DRVL5sin.js +++ b/static/assets/package-C7ydMeAZ.js @@ -1,4 +1,4 @@ -import{c as a}from"./index-BtyeumGM.js";/** +import{c as a}from"./index-IP-mmLlr.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/package-check-OgTe2cXI.js b/static/assets/package-check-OAWoRoy_.js similarity index 92% rename from static/assets/package-check-OgTe2cXI.js rename to static/assets/package-check-OAWoRoy_.js index 54b772a..f43b5bc 100644 --- a/static/assets/package-check-OgTe2cXI.js +++ b/static/assets/package-check-OAWoRoy_.js @@ -1,4 +1,4 @@ -import{c as e}from"./index-BtyeumGM.js";/** +import{c as e}from"./index-IP-mmLlr.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/pen-line-Du-MX3r7.js b/static/assets/pen-line-D5rb4QS3.js similarity index 90% rename from static/assets/pen-line-Du-MX3r7.js rename to static/assets/pen-line-D5rb4QS3.js index e4656ff..48931f9 100644 --- a/static/assets/pen-line-Du-MX3r7.js +++ b/static/assets/pen-line-D5rb4QS3.js @@ -1,4 +1,4 @@ -import{c as e}from"./index-BtyeumGM.js";/** +import{c as e}from"./index-IP-mmLlr.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/play-RrpCCHk6.js b/static/assets/play-CYUspTVx.js similarity index 87% rename from static/assets/play-RrpCCHk6.js rename to static/assets/play-CYUspTVx.js index e8e5690..48f43be 100644 --- a/static/assets/play-RrpCCHk6.js +++ b/static/assets/play-CYUspTVx.js @@ -1,4 +1,4 @@ -import{c as a}from"./index-BtyeumGM.js";/** +import{c as a}from"./index-IP-mmLlr.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/plus-D66LUkyr.js b/static/assets/plus-BbnHS2Zx.js similarity index 86% rename from static/assets/plus-D66LUkyr.js rename to static/assets/plus-BbnHS2Zx.js index 30bdcde..783ce2c 100644 --- a/static/assets/plus-D66LUkyr.js +++ b/static/assets/plus-BbnHS2Zx.js @@ -1,4 +1,4 @@ -import{c as e}from"./index-BtyeumGM.js";/** +import{c as e}from"./index-IP-mmLlr.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/power-BzUM4Jxl.js b/static/assets/power-Ucg7FCbo.js similarity index 93% rename from static/assets/power-BzUM4Jxl.js rename to static/assets/power-Ucg7FCbo.js index 41d6391..b1263cf 100644 --- a/static/assets/power-BzUM4Jxl.js +++ b/static/assets/power-Ucg7FCbo.js @@ -1,4 +1,4 @@ -import{c as o}from"./index-BtyeumGM.js";/** +import{c as o}from"./index-IP-mmLlr.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/power-off-DC_j-T0K.js b/static/assets/power-off-D47FTQRk.js similarity index 90% rename from static/assets/power-off-DC_j-T0K.js rename to static/assets/power-off-D47FTQRk.js index d2afe7f..f5a623f 100644 --- a/static/assets/power-off-DC_j-T0K.js +++ b/static/assets/power-off-D47FTQRk.js @@ -1,4 +1,4 @@ -import{c as o}from"./index-BtyeumGM.js";/** +import{c as o}from"./index-IP-mmLlr.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/save-B_0bwRwJ.js b/static/assets/save-CNiIU-3u.js similarity index 91% rename from static/assets/save-B_0bwRwJ.js rename to static/assets/save-CNiIU-3u.js index 52a9836..21289ec 100644 --- a/static/assets/save-B_0bwRwJ.js +++ b/static/assets/save-CNiIU-3u.js @@ -1,4 +1,4 @@ -import{c as a}from"./index-BtyeumGM.js";/** +import{c as a}from"./index-IP-mmLlr.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/search-Dm0kd19J.js b/static/assets/search-TGrYyOkD.js similarity index 88% rename from static/assets/search-Dm0kd19J.js rename to static/assets/search-TGrYyOkD.js index af01ee0..f5ce8b2 100644 --- a/static/assets/search-Dm0kd19J.js +++ b/static/assets/search-TGrYyOkD.js @@ -1,4 +1,4 @@ -import{c}from"./index-BtyeumGM.js";/** +import{c}from"./index-IP-mmLlr.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/send-D9HISjuP.js b/static/assets/send-CwI5w629.js similarity index 90% rename from static/assets/send-D9HISjuP.js rename to static/assets/send-CwI5w629.js index 9efa35b..f9eee80 100644 --- a/static/assets/send-D9HISjuP.js +++ b/static/assets/send-CwI5w629.js @@ -1,4 +1,4 @@ -import{c as a}from"./index-BtyeumGM.js";/** +import{c as a}from"./index-IP-mmLlr.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/settings-2-Dn9OYKhu.js b/static/assets/settings-2-DVRotgka.js similarity index 90% rename from static/assets/settings-2-Dn9OYKhu.js rename to static/assets/settings-2-DVRotgka.js index 64b16b1..ffa52be 100644 --- a/static/assets/settings-2-Dn9OYKhu.js +++ b/static/assets/settings-2-DVRotgka.js @@ -1,4 +1,4 @@ -import{c}from"./index-BtyeumGM.js";/** +import{c}from"./index-IP-mmLlr.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/shield-alert-Rn-eFcN-.js b/static/assets/shield-alert-B8_J0uYT.js similarity index 91% rename from static/assets/shield-alert-Rn-eFcN-.js rename to static/assets/shield-alert-B8_J0uYT.js index 1388366..59e05f2 100644 --- a/static/assets/shield-alert-Rn-eFcN-.js +++ b/static/assets/shield-alert-B8_J0uYT.js @@ -1,4 +1,4 @@ -import{c as e}from"./index-BtyeumGM.js";/** +import{c as e}from"./index-IP-mmLlr.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/sparkles-CTC5UJ5I.js b/static/assets/sparkles-CavN45fA.js similarity index 93% rename from static/assets/sparkles-CTC5UJ5I.js rename to static/assets/sparkles-CavN45fA.js index 30b4c06..c5743f6 100644 --- a/static/assets/sparkles-CTC5UJ5I.js +++ b/static/assets/sparkles-CavN45fA.js @@ -1,4 +1,4 @@ -import{c as a}from"./index-BtyeumGM.js";/** +import{c as a}from"./index-IP-mmLlr.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/square-pen-C7b8tolk.js b/static/assets/square-pen-ZPivfDGR.js similarity index 91% rename from static/assets/square-pen-C7b8tolk.js rename to static/assets/square-pen-ZPivfDGR.js index 618c459..bce94c4 100644 --- a/static/assets/square-pen-C7b8tolk.js +++ b/static/assets/square-pen-ZPivfDGR.js @@ -1,4 +1,4 @@ -import{c as a}from"./index-BtyeumGM.js";/** +import{c as a}from"./index-IP-mmLlr.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/trash-2-Cpz1crux.js b/static/assets/trash-2-BNPsgs2t.js similarity index 91% rename from static/assets/trash-2-Cpz1crux.js rename to static/assets/trash-2-BNPsgs2t.js index 2aaca54..c12195f 100644 --- a/static/assets/trash-2-Cpz1crux.js +++ b/static/assets/trash-2-BNPsgs2t.js @@ -1,4 +1,4 @@ -import{c as a}from"./index-BtyeumGM.js";/** +import{c as a}from"./index-IP-mmLlr.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/trending-up-B0n4p6ZM.js b/static/assets/trending-up-BcW73Gjl.js similarity index 87% rename from static/assets/trending-up-B0n4p6ZM.js rename to static/assets/trending-up-BcW73Gjl.js index 4d7584b..05e5973 100644 --- a/static/assets/trending-up-B0n4p6ZM.js +++ b/static/assets/trending-up-BcW73Gjl.js @@ -1,4 +1,4 @@ -import{c as e}from"./index-BtyeumGM.js";/** +import{c as e}from"./index-IP-mmLlr.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/truck-DFAp5vTR.js b/static/assets/truck-CrexfDE5.js similarity index 93% rename from static/assets/truck-DFAp5vTR.js rename to static/assets/truck-CrexfDE5.js index f9dec76..7492ef5 100644 --- a/static/assets/truck-DFAp5vTR.js +++ b/static/assets/truck-CrexfDE5.js @@ -1,4 +1,4 @@ -import{c}from"./index-BtyeumGM.js";/** +import{c}from"./index-IP-mmLlr.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/ui-Bucd7ZQW.js b/static/assets/ui-Fi8l9rTp.js similarity index 90% rename from static/assets/ui-Bucd7ZQW.js rename to static/assets/ui-Fi8l9rTp.js index f20a0d5..fc2bf74 100644 --- a/static/assets/ui-Bucd7ZQW.js +++ b/static/assets/ui-Fi8l9rTp.js @@ -1,6 +1,6 @@ -import{c as W,j as e,L as $,aE as A,bT as H,X as R,r as x,b as z}from"./index-BtyeumGM.js";/** +import{c as W,j as e,L as $,aE as A,bX as H,X as R,r as x,b as z}from"./index-IP-mmLlr.js";/** * @license lucide-react v0.562.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=[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]],C=W("inbox",M),D=({title:s,description:a,icon:c,badge:n,actions:t})=>e.jsxs("header",{className:"page-header",children:[e.jsxs("div",{className:"page-header__identity",children:[c&&e.jsx("span",{className:"page-header__icon","aria-hidden":"true",children:e.jsx(c,{className:"h-5 w-5"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("h1",{className:"page-title",children:s}),n]}),a&&e.jsx("p",{className:"page-description",children:a})]})]}),t&&e.jsx("div",{className:"page-actions",children:t})]}),F=({value:s,onChange:a,items:c,ariaLabel:n="页面分区"})=>e.jsx("div",{className:"page-tabs",role:"tablist","aria-label":n,children:c.map(t=>{const p=t.icon,m=s===t.id;return e.jsxs("button",{type:"button",role:"tab","aria-selected":m,onClick:()=>a(t.id),className:`page-tab ${m?"page-tab--active":""}`,children:[p&&e.jsx(p,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{children:t.label}),t.count!==void 0&&e.jsx("span",{className:"page-tab__count",children:t.count})]},t.id)})}),I=({title:s,description:a,icon:c,actions:n})=>e.jsxs("div",{className:"section-panel__header",children:[e.jsxs("div",{className:"flex min-w-0 items-start gap-3",children:[c&&e.jsx("span",{className:"section-header__icon","aria-hidden":"true",children:e.jsx(c,{className:"h-4 w-4"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h2",{className:"section-title",children:s}),a&&e.jsx("p",{className:"section-description",children:a})]})]}),n&&e.jsx("div",{className:"section-header__actions",children:n})]}),T=({type:s,message:a,onClose:c,children:n})=>{const t=s==="success"?A:H;return e.jsxs("div",{className:`notice-banner notice-banner--${s}`,role:"status",children:[e.jsx(t,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"min-w-0 flex-1",children:a??n}),c&&e.jsx("button",{type:"button",onClick:c,"aria-label":"关闭提示",children:e.jsx(R,{className:"h-4 w-4"})})]})},q=({title:s,description:a,icon:c=C,action:n,compact:t=!1})=>e.jsxs("div",{className:`empty-state ${t?"empty-state--compact":""}`,children:[e.jsx("span",{className:"empty-state__icon","aria-hidden":"true",children:e.jsx(c,{className:"h-6 w-6"})}),e.jsx("h3",{children:s}),a&&e.jsx("p",{children:a}),n&&e.jsx("div",{className:"mt-4",children:n})]}),K=({label:s="正在加载"})=>e.jsxs("div",{className:"page-loading",role:"status",children:[e.jsx($,{className:"h-5 w-5 animate-spin"}),e.jsx("span",{children:s})]}),U=({open:s,onClose:a,trigger:c,placement:n="bottom",align:t="left",panelClassName:p="max-h-72 w-80",children:m,portal:h=!1})=>{const f=x.useRef(null),v=x.useRef(null),[j,L]=x.useState(null);x.useEffect(()=>{if(!s)return;const u=o=>{var i,l;const r=o.target;(i=f.current)!=null&&i.contains(r)||(l=v.current)!=null&&l.contains(r)||a()},d=o=>{o.key==="Escape"&&a()};return document.addEventListener("mousedown",u),document.addEventListener("keydown",d),()=>{document.removeEventListener("mousedown",u),document.removeEventListener("keydown",d)}},[s,a]),x.useLayoutEffect(()=>{if(!s||!h)return;const u=()=>{var y,E,_;const r=(y=f.current)==null?void 0:y.getBoundingClientRect();if(!r)return;const i=8,l=((E=v.current)==null?void 0:E.offsetHeight)??0,w=((_=v.current)==null?void 0:_.offsetWidth)??0,N=window.innerHeight-r.bottom-i,b=r.top-i,k=(n==="top"?b>=l||b>=N?"top":"bottom":N>=l||N>=b?"bottom":"top")==="top"?r.top-l-i:r.bottom+i,P=t==="left"?Math.min(r.left,Math.max(i,window.innerWidth-w-i)):Math.max(i,Math.min(r.right-w,window.innerWidth-w-i));L({top:k,left:P,minWidth:r.width})};u();let d=0;const o=()=>{cancelAnimationFrame(d),d=requestAnimationFrame(u)};return window.addEventListener("resize",o),window.addEventListener("scroll",o,!0),()=>{cancelAnimationFrame(d),window.removeEventListener("resize",o),window.removeEventListener("scroll",o,!0)}},[s,h,n,t,m]);const g=e.jsx("div",{ref:v,className:`overflow-y-auto rounded-lg border border-[var(--border)] bg-[var(--surface)] p-2 shadow-lg ${h?"fixed z-50":`absolute z-20 ${n==="top"?"bottom-8":"top-8"} ${t==="left"?"left-0":"right-0"}`} ${p}`,style:h&&j?{top:j.top,left:j.left,minWidth:j.minWidth}:void 0,children:m});return e.jsxs("div",{ref:f,className:"relative",children:[c,s&&(h?z.createPortal(g,document.body):g)]})};export{q as E,C as I,T as N,K as P,I as S,D as a,F as b,U as c}; + */const M=[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]],C=W("inbox",M),D=({title:s,description:a,icon:c,badge:n,actions:t})=>e.jsxs("header",{className:"page-header",children:[e.jsxs("div",{className:"page-header__identity",children:[c&&e.jsx("span",{className:"page-header__icon","aria-hidden":"true",children:e.jsx(c,{className:"h-5 w-5"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("h1",{className:"page-title",children:s}),n]}),a&&e.jsx("p",{className:"page-description",children:a})]})]}),t&&e.jsx("div",{className:"page-actions",children:t})]}),F=({value:s,onChange:a,items:c,ariaLabel:n="页面分区"})=>e.jsx("div",{className:"page-tabs",role:"tablist","aria-label":n,children:c.map(t=>{const p=t.icon,m=s===t.id;return e.jsxs("button",{type:"button",role:"tab","aria-selected":m,onClick:()=>a(t.id),className:`page-tab ${m?"page-tab--active":""}`,children:[p&&e.jsx(p,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{children:t.label}),t.count!==void 0&&e.jsx("span",{className:"page-tab__count",children:t.count})]},t.id)})}),I=({title:s,description:a,icon:c,actions:n})=>e.jsxs("div",{className:"section-panel__header",children:[e.jsxs("div",{className:"flex min-w-0 items-start gap-3",children:[c&&e.jsx("span",{className:"section-header__icon","aria-hidden":"true",children:e.jsx(c,{className:"h-4 w-4"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h2",{className:"section-title",children:s}),a&&e.jsx("p",{className:"section-description",children:a})]})]}),n&&e.jsx("div",{className:"section-header__actions",children:n})]}),q=({type:s,message:a,onClose:c,children:n})=>{const t=s==="success"?A:H;return e.jsxs("div",{className:`notice-banner notice-banner--${s}`,role:"status",children:[e.jsx(t,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"min-w-0 flex-1",children:a??n}),c&&e.jsx("button",{type:"button",onClick:c,"aria-label":"关闭提示",children:e.jsx(R,{className:"h-4 w-4"})})]})},T=({title:s,description:a,icon:c=C,action:n,compact:t=!1})=>e.jsxs("div",{className:`empty-state ${t?"empty-state--compact":""}`,children:[e.jsx("span",{className:"empty-state__icon","aria-hidden":"true",children:e.jsx(c,{className:"h-6 w-6"})}),e.jsx("h3",{children:s}),a&&e.jsx("p",{children:a}),n&&e.jsx("div",{className:"mt-4",children:n})]}),X=({label:s="正在加载"})=>e.jsxs("div",{className:"page-loading",role:"status",children:[e.jsx($,{className:"h-5 w-5 animate-spin"}),e.jsx("span",{children:s})]}),K=({open:s,onClose:a,trigger:c,placement:n="bottom",align:t="left",panelClassName:p="max-h-72 w-80",children:m,portal:h=!1})=>{const f=x.useRef(null),v=x.useRef(null),[j,L]=x.useState(null);x.useEffect(()=>{if(!s)return;const u=o=>{var i,l;const r=o.target;(i=f.current)!=null&&i.contains(r)||(l=v.current)!=null&&l.contains(r)||a()},d=o=>{o.key==="Escape"&&a()};return document.addEventListener("mousedown",u),document.addEventListener("keydown",d),()=>{document.removeEventListener("mousedown",u),document.removeEventListener("keydown",d)}},[s,a]),x.useLayoutEffect(()=>{if(!s||!h)return;const u=()=>{var y,E,_;const r=(y=f.current)==null?void 0:y.getBoundingClientRect();if(!r)return;const i=8,l=((E=v.current)==null?void 0:E.offsetHeight)??0,w=((_=v.current)==null?void 0:_.offsetWidth)??0,N=window.innerHeight-r.bottom-i,b=r.top-i,k=(n==="top"?b>=l||b>=N?"top":"bottom":N>=l||N>=b?"bottom":"top")==="top"?r.top-l-i:r.bottom+i,P=t==="left"?Math.min(r.left,Math.max(i,window.innerWidth-w-i)):Math.max(i,Math.min(r.right-w,window.innerWidth-w-i));L({top:k,left:P,minWidth:r.width})};u();let d=0;const o=()=>{cancelAnimationFrame(d),d=requestAnimationFrame(u)};return window.addEventListener("resize",o),window.addEventListener("scroll",o,!0),()=>{cancelAnimationFrame(d),window.removeEventListener("resize",o),window.removeEventListener("scroll",o,!0)}},[s,h,n,t,m]);const g=e.jsx("div",{ref:v,className:`overflow-y-auto rounded-lg border border-[var(--border)] bg-[var(--surface)] p-2 shadow-lg ${h?"fixed z-50":`absolute z-20 ${n==="top"?"bottom-8":"top-8"} ${t==="left"?"left-0":"right-0"}`} ${p}`,style:h&&j?{top:j.top,left:j.left,minWidth:j.minWidth}:void 0,children:m});return e.jsxs("div",{ref:f,className:"relative",children:[c,s&&(h?z.createPortal(g,document.body):g)]})};export{T as E,C as I,q as N,X as P,I as S,D as a,F as b,K as c}; diff --git a/static/assets/zap-BAdVhmYa.js b/static/assets/zap-DljT2UQs.js similarity index 89% rename from static/assets/zap-BAdVhmYa.js rename to static/assets/zap-DljT2UQs.js index 3b1b7ff..8e9fd55 100644 --- a/static/assets/zap-BAdVhmYa.js +++ b/static/assets/zap-DljT2UQs.js @@ -1,4 +1,4 @@ -import{c as a}from"./index-BtyeumGM.js";/** +import{c as a}from"./index-IP-mmLlr.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/index.html b/static/index.html index 56cb6d3..ed27374 100644 --- a/static/index.html +++ b/static/index.html @@ -24,8 +24,8 @@ } })(); - - + +