@2api-store/activate 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -1
- package/dist/activate.mjs +1 -1
- package/dist/lib/api.mjs +1 -1
- package/dist/lib/backup.mjs +1 -1
- package/dist/lib/cmds.mjs +1 -1
- package/dist/lib/detect.mjs +1 -1
- package/dist/lib/device.mjs +1 -1
- package/dist/lib/diagnose.mjs +1 -0
- package/dist/lib/install.mjs +1 -1
- package/dist/lib/platforms.mjs +1 -1
- package/dist/lib/pow.mjs +1 -1
- package/dist/lib/prompt.mjs +1 -1
- package/dist/lib/render.mjs +1 -1
- package/dist/lib/ui.mjs +1 -1
- package/dist/lib/write.mjs +1 -1
- package/dist/package.json +1 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@ npx @2api-store/activate
|
|
|
27
27
|
|
|
28
28
|
## 子命令
|
|
29
29
|
|
|
30
|
-
除了默认激活流程,还提供
|
|
30
|
+
除了默认激活流程,还提供 5 个子命令用于后续维护:
|
|
31
31
|
|
|
32
32
|
```bash
|
|
33
33
|
npx @2api-store/activate <subcommand> [options]
|
|
@@ -38,6 +38,7 @@ npx @2api-store/activate <subcommand> [options]
|
|
|
38
38
|
| `restore` | 从备份恢复:扫描 `~/.codex/`、`~/.claude/`、`~/.gemini/` 下的 `.bak.*` 文件,选择一个恢复(覆盖当前) |
|
|
39
39
|
| `reset` | 恢复官方默认:删除 2api.store 写入的配置文件(`~/.codex/config.toml`、`~/.codex/auth.json`、`~/.claude/settings.json`、`~/.gemini/settings.json`),并尝试从最新备份恢复。**破坏性操作,需确认** |
|
|
40
40
|
| `refresh-groups` | 查看可用分组:`GET /cli/groups` → 彩色表格展示。只读,不改 key/配置 |
|
|
41
|
+
| `diagnose` | 一键诊断连接并生成日志压缩包:环境收集 + 渠道 HTTP 实测(真实小请求)+ 已装 CLI 实测,zip 已脱敏,发给客服排障 |
|
|
41
42
|
|
|
42
43
|
|
|
43
44
|
### restore — 从备份恢复
|
|
@@ -82,6 +83,38 @@ npx @2api-store/activate refresh-groups
|
|
|
82
83
|
- 只读,不改 key/配置
|
|
83
84
|
- 如需切组:已有 API Key 走管理后台,或重新激活(兑换码可重选分组)
|
|
84
85
|
|
|
86
|
+
### diagnose — 连接诊断与日志收集
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
npx @2api-store/activate diagnose # 一键诊断(执行前有确认)
|
|
90
|
+
npx @2api-store/activate diagnose --yes # 免确认(客服远程指导可直接贴这条命令)
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
连接不通 / 时快时慢 / 想让客服排查时使用。自动完成:凭据发现(按序扫 `~/.codex/auth.json` → `~/.claude/settings.json` → `~/.gemini/settings.json`,找不到会提示输入)→ 环境快照(OS / Node / 已装 CLI / 配置文件元信息 / 代理环境变量)→ 拉后端诊断矩阵(不可用时走内置兜底)→ 对每个测试模型发真实小请求实测 → 已装 CLI 非交互实测(各 30s 超时)→ 脱敏打包 zip + 打印摘要表。
|
|
94
|
+
|
|
95
|
+
| 参数 | 说明 |
|
|
96
|
+
|------|------|
|
|
97
|
+
| `--yes, -y` | 免确认直接执行(真实小请求,正常计费) |
|
|
98
|
+
| `--model <m1,m2>` | 覆盖测试模型(逗号分隔;默认用后端下发矩阵 / 内置兜底) |
|
|
99
|
+
| `--skip-cli-tests` | 只测 HTTP,不运行本地 CLI |
|
|
100
|
+
| `--out <dir>` | 诊断包输出目录(默认当前目录) |
|
|
101
|
+
| `--api-base <url>` | 覆盖 API 端点(同其他子命令) |
|
|
102
|
+
|
|
103
|
+
**zip 包内文件**(顶层目录 `tokenshop-diagnose-<时间戳>/`):
|
|
104
|
+
|
|
105
|
+
| 文件 | 内容 |
|
|
106
|
+
|------|------|
|
|
107
|
+
| `summary.json` | 环境 + 测试结果汇总(客服先看这个) |
|
|
108
|
+
| `env.json` | OS / Node 版本 / 已装 CLI / 配置文件元信息 / 代理环境变量 |
|
|
109
|
+
| `http-tests.jsonl` | 每个模型一行:request_id / 状态码 / ttfb / 总延迟 / 错误 / 响应片段 |
|
|
110
|
+
| `cli-tests.jsonl` | 每个已装 CLI 一行:命令 / 退出码 / 耗时 / 是否超时 / stdout+stderr(截断 10KB) |
|
|
111
|
+
| `configs/` | 本地配置文件的**脱敏副本**(不存在的文件跳过) |
|
|
112
|
+
| `README.txt` | 给客服的说明(含 request_id 对账用法) |
|
|
113
|
+
|
|
114
|
+
**隐私说明**:包内所有密钥全程掩码(`sk-…尾6` 形态,绝不落明文);Bearer 凭证、邮箱、代理 URL 内嵌的账号密码均自动脱敏;`configs/` 是脱敏副本,本地原始配置文件不会被修改。
|
|
115
|
+
|
|
116
|
+
**计费提示**:HTTP 实测会对每个测试模型发送**真实计费**的小请求(`max_tokens=1`,每模型约几分钱)。每条 HTTP 记录的 `request_id` 取自响应头 `X-Request-Id`,客服凭它可在生产后台 usage_logs / 网关日志中精确对账该次请求。
|
|
117
|
+
|
|
85
118
|
## 命令行选项
|
|
86
119
|
|
|
87
120
|
```
|
package/dist/activate.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const _0x58a7dd=_0x5701;(function(_0x10edb9,_0x545c6a){const _0x4130f2=_0x5701,_0x1f0ad2=_0x10edb9();while(!![]){try{const _0x571c1a=-parseInt(_0x4130f2(0xe9))/0x1+parseInt(_0x4130f2(0x133))/0x2+-parseInt(_0x4130f2(0xe3))/0x3+-parseInt(_0x4130f2(0x9d))/0x4*(parseInt(_0x4130f2(0x12e))/0x5)+-parseInt(_0x4130f2(0x175))/0x6+-parseInt(_0x4130f2(0xfb))/0x7*(-parseInt(_0x4130f2(0xb1))/0x8)+parseInt(_0x4130f2(0x130))/0x9;if(_0x571c1a===_0x545c6a)break;else _0x1f0ad2['push'](_0x1f0ad2['shift']());}catch(_0x2c1a07){_0x1f0ad2['push'](_0x1f0ad2['shift']());}}}(_0x2229,0x25d79),(process['removeAllListeners'](_0x58a7dd(0x96)),process[_0x58a7dd(0xdf)][_0x58a7dd(0x16f)]='1'));import{detectAll as _0x103be4}from'./lib/detect.mjs';import{cliActivate as _0x466535,listGroups as _0x4f50b6,verifyApiKey as _0x4ae18c,probeModels as _0x4f257e}from'./lib/api.mjs';import{renderContent as _0x3b1af8,expandPath as _0x2533f6,listModels as _0x54e5a6}from'./lib/render.mjs';import{backupFile as _0x329013}from'./lib/backup.mjs';import{writeFileWithPermission as _0x156b24,PermissionDeniedError as _0x201849}from'./lib/write.mjs';import{ask as _0x5e4d8b,askSecret as _0x133bf8,multiSelect as _0x4c7c18,select as _0x51256f,confirm as _0x473d56,closePrompt as _0x344df9}from'./lib/prompt.mjs';import{banner as _0x4d68ce,ok as _0x8590fc,fail as _0x1741b1,warn as _0x341987,info as _0x20c68f,step as _0xbc579a,guide as _0x25d5ab,plain as _0x20fe6c,chalk as _0x381be6}from'./lib/ui.mjs';import{getCliMeta as _0x38d96c,isDefaultSelected as _0x1c2215}from'./lib/platforms.mjs';import{ensureInstalled as _0x1ebe17}from'./lib/install.mjs';function _0x2229(){const _0x107a8a=['wRxEX','warning','LfZxV','\x20·\x20node\x20v','邮箱格式不正确','test','tIall','jkQhi','5820IZOcRW','dNpyJ','NemoP','backup','sHkZo','检查\x20CLI\x20安装状态','XJGYy','gemini','\x20/\x20','模式:','(配置仍会写入,但请手动安装后使用)','QDYeU','installed','meta','备份失败:','需手动执行的\x20shell\x20命令:','stack','──\x20','join','已写入','8QbiVyM','green','dZAzJ','YJTTp','detectBin','NQLfe','激活失败:','FyTRh','qJXrj','includes','\x20无可自动安装的\x20npm\x20包,请手动安装后重跑(配置仍会写入)','请输入\x20API\x20Key(sk-...)或兑换码','未选择分组','--api-base','windows','Vrccr','ODpVT','dry-run','group','bRchL','lmpWz','CRnmP','API\x20Key','https://2api.store','TUubR','push','环境:','usage','sXaip','HHouk','\x20项(见上方输出)','NrHcY','files','平台过滤:','KjrFF','\x20\x20\x20\x20...(共\x20','trim','其他(手动输入模型\x20ID)','iFfzy','error','EKPCT','MdNip','redeem','zWbaG','then','kGkCw','env','新账号:','选择绑定的分组','replace','378561krnrOS','mode','msYwn','is_new','available','log','219560DAYQro','path','olYwM','ydPJQ','unknown','IIweJ','isWindows','pLkDt','PowerShell','configs','help','user','\x20异常:','filter','skipped','reason','写入失败:','\x20个文件','1619415RTLoPQ','请求激活服务','pDJyS','NUrXJ','(仍会写入配置;如需更换请重跑激活选择其他模型)','PJgrH','key','\x20平台,ID\x20','message','Linux','apiBase','vdUZm','api_key','(跳过模型可用性探测:服务端暂不支持或网络不可达)','未检测到\x20codex/claude/gemini/grok/opencode(可在后续步骤按需自动安装)','\x20\x20内容预览:','platform','LMDuZ','hwVfu','string','vKRMN','ceXTR','选择默认模型','client_type','ItACd','toLowerCase','Vxjqn','all','NfOSo','version','未选择任何\x20CLI,退出。','email','dim','模型可用性探测:','备份并写入配置','jRUDI','\x20(未装)','LlZIh','未检测到\x20','可能是分组不匹配或账号临时不可用,使用时会报\x20404/429','display_name','WWCyU','--help','imhqO','(命令\x20','get','keys','建议换用:','\x20已创建,请查收邮件获取初始密码,登录后尽快修改。','OsCRb','base_url','895udoSLN','lEegQ','3385476fKCrEC','\x20\x20备份:','displayName','344982KeazMG','验证\x20API\x20Key','pHonl','\x20安装(','vLvbp','sk-','验证未通过:','WNQzO','qCNjg','(ID\x20','openai','BjNws','选择\x20CLI','服务端未返回模型列表,{{defaultModel}}\x20将留空','/antigravity','shell-only','\x20\x20目标:','(跳过此文件避免无备份覆盖)','claude','已跳过\x20','\x20安装失败:','--dry-run','split','\x20\x20\x20\x20','dvyMq','SClCK','argv','forEach','name','WTLwN','JrKXL','Windows','unix','凭据格式无法识别(应为\x20sk-\x20前缀的\x20API\x20Key\x20或兑换码)','anthropic','\x20\x20[试运行]\x20不真实写入','ouXrU','UJaVz','LSXqV','服务端未返回适配当前系统的配置模板','action','installPackage','iLKoH','UVzPl','\x20行)','fgZJe','OCdLo','\x20个文件(未真实写入)','未知错误','gray','nZwbj','SaOlK','Yquxx','兑换码','./package.json','UtvpH','dxbZQ','\x20\x20[shell\x20命令,请手动执行]','slice','failed','NODE_NO_WARNINGS','选择默认模型(最新优先)','\x20\x20-\x20','xsUqu','written','zGnAb','112842Hbdjau','label','XsIBc','ACTIVATE_API_BASE','macOS','获取可用分组','backup-failed','ohunn','\x20\x20sudo\x20npx\x20-y\x20@2api-store/activate','statusCode','\x20──','(独立\x20CLI)','exit','\x20个模型当前无可用账号(标注\x20⚠,可能是分组不匹配或账号临时不可用)','hGFmC','fnykl','\x20已安装','激活报告','node','nksKY','dryRun','model','zhGis','toPaS','\x0a\x0a环境变量:\x0a\x20\x20ACTIVATE_API_BASE\x20\x20\x20\x20\x20\x20覆盖\x20API\x20端点(同\x20--api-base)\x0a\x0a示例:\x0a\x20\x20npx\x20@2api-store/activate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20默认激活\x0a\x20\x20npx\x20@2api-store/activate\x20--dry-run\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20试运行\x0a\x20\x20npx\x20@2api-store/activate\x20--platform\x20openai\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20只激活\x20openai\x0a\x20\x20npx\x20@2api-store/activate\x20restore\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20从备份恢复\x0a\x20\x20npx\x20@2api-store/activate\x20reset\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20恢复官方默认\x0a\x20\x20npx\x20@2api-store/activate\x20refresh-groups\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20查看可用分组\x0a\x20\x20ACTIVATE_API_BASE=http://127.0.0.1:5566\x20npx\x20@2api-store/activate\x0a\x0a退出码:\x0a\x20\x200\x20\x20成功\x0a\x20\x201\x20\x20输入错误\x20/\x20网络失败\x20/\x20致命错误\x0a\x20\x202\x20\x20部分文件权限不足(请按提示用\x20sudo\x20/\x20管理员\x20PowerShell\x20重跑)\x0a\x20\x203\x20\x20其他写入失败\x0a','cli','\x20当前无可用账号','supported','hpoZt','--version','config','JzxXE','hELHA','vBEou','NtBSn','zPqcz','BZVdH','输入模型\x20ID(如\x20gpt-5.6-terra)','\x20\x20HTTP\x20','map','models','add','os_type','hnSOi','xslnc','LKyvu','\x20安装(配置仍会写入,但请手动安装后使用)','length','--platform','Terminal','clientType','iaRtg','permission-denied','NmuwZ','【试运行模式\x20--dry-run】不会真写文件、不会真装\x20CLI','\x20安装成功','CAxpW','KLagj','ogxWr','部分文件权限不足,请按提示用\x20sudo\x20/\x20管理员\x20PowerShell\x20重跑:','备份位置:','startsWith','未输入凭据','未查询到可用分组。请联系管理员开通分组后再激活。'];_0x2229=function(){return _0x107a8a;};return _0x2229();}import{SUBCOMMANDS as _0x4cc630,SUBCOMMAND_NAMES as _0x1980a6,SUB_HELP as _0x2a9365}from'./lib/cmds.mjs';import{createRequire as _0x96721}from'node:module';function _0x5701(_0x4158a2,_0x3e66f1){_0x4158a2=_0x4158a2-0x6e;const _0x22296b=_0x2229();let _0x5701cf=_0x22296b[_0x4158a2];return _0x5701cf;}const L=_0x96721(import.meta.url)(_0x58a7dd(0x169))[_0x58a7dd(0x118)],E=_0x58a7dd(0xc8);(async function(){const _0x775733=_0x58a7dd,_0x4c2269={'dvyMq':function(_0x45b0c2,_0x22bf77){return _0x45b0c2<_0x22bf77;},'XsIBc':function(_0x51c01e,_0x1ec2ab){return _0x51c01e===_0x1ec2ab;},'nZwbj':function(_0x17ac26,_0x34bda7){return _0x17ac26===_0x34bda7;},'LKyvu':_0x775733(0x85),'KLagj':function(_0x2ee785,_0x3e77bb){return _0x2ee785===_0x3e77bb;},'zWbaG':_0x775733(0x72),'WWCyU':function(_0x5d0e76,_0x333a8c){return _0x5d0e76==_0x333a8c;},'bRchL':_0x775733(0x10e),'IIweJ':_0x775733(0x13d),'HHouk':_0x775733(0x145),'CRnmP':_0x775733(0x155),'MdNip':_0x775733(0xa4),'NrHcY':function(_0x37e6cd){return _0x37e6cd();},'TUubR':_0x775733(0x104),'XtSvq':_0x775733(0x152),'fnykl':function(_0x509434,_0x23e581){return _0x509434(_0x23e581);},'kGkCw':function(_0x1415ee,_0x4e6edd){return _0x1415ee>_0x4e6edd;},'NmuwZ':function(_0x232e04,_0x4de39e){return _0x232e04(_0x4de39e);},'ceXTR':function(_0x2b1454,_0xedd16c){return _0x2b1454(_0xedd16c);},'DmikK':_0x775733(0x109),'hnSOi':function(_0x44dac0,_0x49070c){return _0x44dac0(_0x49070c);},'LfZxV':_0x775733(0x8b),'UtvpH':function(_0x2c0cea,_0x3f379c){return _0x2c0cea(_0x3f379c);},'ouXrU':_0x775733(0xbc),'zGnAb':function(_0x38e545,_0xd49a70){return _0x38e545(_0xd49a70);},'toPaS':_0x775733(0x93),'WTLwN':_0x775733(0x101),'ODpVT':_0x775733(0xdb),'DSKTb':'empty','NQLfe':function(_0x31b002,_0x3dcb39){return _0x31b002===_0x3dcb39;},'iFfzy':function(_0x4ffb00,_0x5cd206){return _0x4ffb00(_0x5cd206);},'NfOSo':_0x775733(0x154),'UVzPl':_0x775733(0x168),'wtsSK':function(_0x36c72b,_0x210e64){return _0x36c72b===_0x210e64;},'dZAzJ':function(_0x365a99,_0x3c6612){return _0x365a99(_0x3c6612);},'OsCRb':'请输入邮箱(用于兑换码绑定\x20/\x20新账号创建)','hELHA':_0x775733(0x99),'qEPtI':_0x775733(0x17a),'hwVfu':function(_0x51963a,_0xbf3681){return _0x51963a===_0xbf3681;},'CAxpW':function(_0x205462,_0x52a7eb){return _0x205462(_0x52a7eb);},'dxbZQ':_0x775733(0x94),'CuGRY':function(_0x15adb3,_0x514146,_0x46d1ae,_0x2bb509){return _0x15adb3(_0x514146,_0x46d1ae,_0x2bb509);},'QDYeU':_0x775733(0xe1),'xslnc':_0x775733(0xbd),'YJTTp':_0x775733(0xfc),'ItACd':function(_0x5a2e14,_0x3b0e5c){return _0x5a2e14(_0x3b0e5c);},'NUrXJ':function(_0x47abea,_0x3e0eaf){return _0x47abea(_0x3e0eaf);},'imhqO':function(_0x4c5363,_0x4d5fcf){return _0x4c5363===_0x4d5fcf;},'ydPJQ':_0x775733(0x15a),'zPqcz':function(_0x21469a,_0x478ed5){return _0x21469a(_0x478ed5);},'fgZJe':function(_0x58435f,_0x18f4ed){return _0x58435f(_0x18f4ed);},'icAJg':_0x775733(0x180),'sXaip':function(_0x1ad8c4,_0x2d7220){return _0x1ad8c4(_0x2d7220);},'OjvBh':_0x775733(0x119),'gtldB':_0x775733(0xa2),'vKRMN':function(_0x3b2344,_0x1040f8){return _0x3b2344(_0x1040f8);},'esrQe':function(_0xd4993e,_0xf49541){return _0xd4993e(_0xf49541);},'AdVYK':function(_0x3c79df,_0xd243a0,_0x26b0d5){return _0x3c79df(_0xd243a0,_0x26b0d5);},'kpPiy':'user-declined','jRUDI':_0x775733(0x163),'LlZIh':function(_0x5c1ecc,_0x367666){return _0x5c1ecc(_0x367666);},'JBudQ':function(_0xb7c85,_0xc7debf){return _0xb7c85(_0xc7debf);},'vdUZm':_0x775733(0x170),'olYwM':_0x775733(0x138),'GCSQo':function(_0xd89670,_0x3a886d){return _0xd89670(_0x3a886d);},'qCNjg':_0x775733(0x108),'NemoP':function(_0x20041d,_0x2cf8b6){return _0x20041d(_0x2cf8b6);},'OczOe':_0x775733(0xd6),'WNQzO':function(_0x3acb86,_0x1291c2,_0x541329,_0x16652f){return _0x3acb86(_0x1291c2,_0x541329,_0x16652f);},'CHAha':_0x775733(0x111),'EKPCT':function(_0x3d6b14,_0x34c842){return _0x3d6b14(_0x34c842);},'ohunn':_0x775733(0x7a),'PJgrH':function(_0x1bfd27,_0x112cd4){return _0x1bfd27(_0x112cd4);},'FyTRh':function(_0x1ef046,_0x4f077b){return _0x1ef046===_0x4f077b;},'BjNws':function(_0x20d110,_0x5b64d0){return _0x20d110(_0x5b64d0);},'wUXlu':_0x775733(0x122),'msYwn':function(_0x592012,_0x4bbf86){return _0x592012>_0x4bbf86;},'lEegQ':function(_0x386f2d,_0x10f238){return _0x386f2d(_0x10f238);},'pHonl':_0x775733(0xff),'hGFmC':_0x775733(0x140),'lmpWz':function(_0x269785,_0x3aad4b){return _0x269785(_0x3aad4b);},'Vxjqn':_0x775733(0x11d),'UJaVz':function(_0x11f323,_0x3b2231){return _0x11f323(_0x3b2231);},'pDJyS':_0x775733(0x86),'Vrccr':function(_0x445bd9,_0x78ce4b){return _0x445bd9===_0x78ce4b;},'Dndwq':_0x775733(0xf1),'pLkDt':function(_0x437b40,_0x4ca5fc,_0x2f4bd3){return _0x437b40(_0x4ca5fc,_0x2f4bd3);},'XJGYy':function(_0x302040,_0x2cbe0e,_0x32daf0){return _0x302040(_0x2cbe0e,_0x32daf0);},'NtBSn':_0x775733(0x16c),'jkQhi':function(_0x41b260,_0x39f0a6){return _0x41b260(_0x39f0a6);},'LSXqV':_0x775733(0x142),'BZVdH':_0x775733(0x10a),'nksKY':_0x775733(0xc2),'diyIn':function(_0x1d88ee,_0x514f61){return _0x1d88ee(_0x514f61);},'tZGNo':_0x775733(0x17b),'hpoZt':function(_0x5964b3,_0xaf6776,_0x4551df,_0x39c288){return _0x5964b3(_0xaf6776,_0x4551df,_0x39c288);},'tIall':_0x775733(0xb0),'xsUqu':_0x775733(0x173),'vLvbp':_0x775733(0x89),'iLKoH':function(_0x4877cd){return _0x4877cd();},'dNpyJ':function(_0x104a48,_0x1ec3a2){return _0x104a48(_0x1ec3a2);},'LMDuZ':_0x775733(0x134),'JrKXL':function(_0x5d4a2b,_0x328a6e){return _0x5d4a2b(_0x328a6e);},'ogxWr':'请求\x20GET\x20/v1/models…','wppoC':'API\x20Key\x20验证通过(GET\x20/v1/models\x20→\x20200)','sHkZo':function(_0x2aaa62,_0x5d2be3){return _0x2aaa62(_0x5d2be3);},'Yquxx':function(_0x384970,_0xbbfa96){return _0x384970>_0xbbfa96;},'KjrFF':_0x775733(0x91),'JzxXE':function(_0x4f90ec,_0x25f4b8){return _0x4f90ec(_0x25f4b8);},'SClCK':function(_0x460ce2,_0xb1dc68){return _0x460ce2(_0xb1dc68);},'vBEou':_0x775733(0x90),'slZKj':function(_0x1ee36b,_0xc7542f){return _0x1ee36b(_0xc7542f);},'wRxEX':_0x775733(0x17d),'OCdLo':function(_0x435b3b,_0x306562){return _0x435b3b>_0x306562;}},_0x48e42d=process['argv'][0x2];if(_0x48e42d&&!_0x48e42d[_0x775733(0x92)]('-')&&_0x1980a6['has'](_0x48e42d)){const _0x3b3e2c=process['argv'][_0x775733(0x16d)](0x3),_0x2086a5=_0x4cc630[_0x48e42d];try{return await _0x2086a5['handler'](_0x3b3e2c)||0x0;}catch(_0x3b2e82){return _0x1741b1('子命令\x20'+_0x48e42d+_0x775733(0xf5)+(_0x3b2e82?.[_0x775733(0x103)]||_0x3b2e82)),_0x3b2e82?.[_0x775733(0xad)]&&console[_0x775733(0xd8)](_0x3b2e82['stack']),0x1;}}const _0x1a4c22=function(_0x201828){const _0x453cd3=_0x775733,_0x3be76c={'dryRun':!0x1,'platform':null,'_':[]};for(let _0x33193b=0x0;_0x4c2269[_0x453cd3(0x14b)](_0x33193b,_0x201828[_0x453cd3(0x84)]);_0x33193b++){const _0x338f37=_0x201828[_0x33193b];if(_0x4c2269[_0x453cd3(0x177)](_0x453cd3(0x148),_0x338f37)||'-n'===_0x338f37)_0x3be76c[_0x453cd3(0x189)]=!0x0;else{if(_0x4c2269[_0x453cd3(0x165)](_0x4c2269[_0x453cd3(0x82)],_0x338f37)||_0x4c2269[_0x453cd3(0x177)]('-p',_0x338f37))_0x3be76c[_0x453cd3(0x10b)]=_0x201828[++_0x33193b];else{if(_0x4c2269[_0x453cd3(0x165)](_0x453cd3(0xbe),_0x338f37))_0x3be76c[_0x453cd3(0x105)]=_0x201828[++_0x33193b];else{if(_0x4c2269[_0x453cd3(0x177)](_0x453cd3(0x125),_0x338f37)||'-h'===_0x338f37)_0x3be76c[_0x453cd3(0xf3)]=!0x0;else{if(_0x4c2269[_0x453cd3(0x8e)](_0x4c2269[_0x453cd3(0xdc)],_0x338f37)||_0x4c2269[_0x453cd3(0x177)]('-v',_0x338f37))_0x3be76c['version']=!0x0;else{if(_0x338f37['startsWith']('--')&&_0x338f37[_0x453cd3(0xba)]('=')){const [_0x579c39,_0x2e4186]=_0x338f37['slice'](0x2)[_0x453cd3(0x149)](/=(.*)/,0x2);_0x3be76c[_0x579c39]=_0x2e4186;}else _0x338f37[_0x453cd3(0x92)]('--')?_0x3be76c[_0x338f37[_0x453cd3(0xe2)](/^--/,'')]=_0x201828[++_0x33193b]:_0x3be76c['_']['push'](_0x338f37);}}}}}}return _0x3be76c;}(process[_0x775733(0x14d)]['slice'](0x2));if(_0x1a4c22[_0x775733(0xf3)])return console['log'](('\x0a@2api-store/activate\x20v'+L+'\x20—\x20TokenShop\x20CLI\x20一键激活\x0a\x0a用法:\x0a\x20\x20npx\x20@2api-store/activate\x20[options]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20默认激活流程\x0a\x20\x20npx\x20@2api-store/activate\x20<subcommand>\x20[options]\x20\x20\x20运行子命令\x0a\x0a选项(默认激活流程):\x0a\x20\x20--dry-run,\x20-n\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20不真写配置/不真装\x20CLI,只展示将做什么\x0a\x20\x20--platform\x20<name>\x20\x20\x20\x20\x20\x20只激活指定平台(openai/anthropic/gemini/grok/antigravity)\x0a\x20\x20--api-base\x20<url>\x20\x20\x20\x20\x20\x20\x20覆盖\x20API\x20端点(默认\x20$ACTIVATE_API_BASE\x20或\x20'+E+')\x0a\x20\x20-h,\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20显示帮助\x0a\x20\x20-v,\x20--version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20显示版本\x0a\x0a'+_0x2a9365+_0x775733(0x18d))[_0x775733(0xd5)]()),0x0;if(_0x1a4c22[_0x775733(0x118)])return console['log'](L),0x0;_0x4c2269[_0x775733(0xd0)](_0x4d68ce);const _0x34bad3=_0x4c2269[_0x775733(0xd0)](_0x103be4),_0x46cb8f=_0x34bad3['os']['isMac']?_0x775733(0x179):_0x34bad3['os']['isLinux']?_0x4c2269[_0x775733(0xc9)]:_0x34bad3['os'][_0x775733(0xef)]?_0x4c2269['XtSvq']:_0x34bad3['os'][_0x775733(0x10b)];if(_0x20c68f(_0x775733(0xcb)+_0x46cb8f+_0x775733(0x98)+_0x34bad3['node']['version']),!_0x34bad3[_0x775733(0x187)][_0x775733(0x70)])return _0x4c2269[_0x775733(0x184)](_0x1741b1,'需要\x20node\x20>=\x2018,当前\x20'+_0x34bad3[_0x775733(0x187)][_0x775733(0x118)]),0x1;const _0x130aa3=Object[_0x775733(0x129)](_0x34bad3[_0x775733(0xa9)]),_0x32232f=_0x130aa3[_0x775733(0x7c)](_0x37ea6a=>{const _0x322f52=_0x775733,_0xe529ac=_0x34bad3[_0x322f52(0xa9)][_0x37ea6a]?.[_0x322f52(0x118)];return _0xe529ac?_0x37ea6a+'@'+_0xe529ac:_0x37ea6a;});_0x4c2269[_0x775733(0xde)](_0x130aa3[_0x775733(0x84)],0x0)?_0x4c2269['NmuwZ'](_0x8590fc,'已检测到\x20CLI:'+_0x32232f[_0x775733(0xaf)](',\x20')):_0x4c2269[_0x775733(0x110)](_0x20c68f,_0x4c2269['DmikK']);const _0x171fa7=_0x1a4c22[_0x775733(0x105)]||process['env'][_0x775733(0x178)]||E;_0x4c2269[_0x775733(0x8a)](_0x20c68f,'API\x20端点:'+_0x171fa7),_0x1a4c22[_0x775733(0x189)]&&_0x4c2269[_0x775733(0x80)](_0x341987,_0x4c2269[_0x775733(0x97)]),_0x1a4c22['platform']&&_0x4c2269['UtvpH'](_0x20c68f,_0x775733(0xd2)+_0x1a4c22[_0x775733(0x10b)]),console[_0x775733(0xe8)]();const _0xb70271=(await _0x133bf8(_0x4c2269[_0x775733(0x157)]))['trim']();if(!_0xb70271)return _0x4c2269[_0x775733(0x174)](_0x1741b1,_0x4c2269[_0x775733(0x18c)]),0x1;const _0x37eab4=(_0x5d2387=_0xb70271)?_0x5d2387[_0x775733(0x92)](_0x775733(0x138))?_0x4c2269[_0x775733(0x150)]:/^[a-zA-Z0-9]{16,64}$/[_0x775733(0x9a)](_0x5d2387)?_0x4c2269[_0x775733(0xc1)]:_0x775733(0xed):_0x4c2269['DSKTb'];var _0x5d2387;if(_0x4c2269[_0x775733(0xb6)]('unknown',_0x37eab4))return _0x4c2269[_0x775733(0xd7)](_0x1741b1,_0x4c2269[_0x775733(0x117)]),0x1;_0x20c68f('识别为:'+(_0x775733(0x101)===_0x37eab4?_0x775733(0xc7):_0x4c2269[_0x775733(0x15e)])+'模式');let _0x3b6022,_0x2f25cb='',_0xf0adfa=null;if(_0x4c2269['wtsSK']('redeem',_0x37eab4)){if(_0x2f25cb=(await _0x4c2269[_0x775733(0xb3)](_0x5e4d8b,_0x4c2269[_0x775733(0x12c)]))['trim'](),!_0x2f25cb||!/^[^\s@]+@[^\s@]+\.[^\s@]+$/[_0x775733(0x9a)](_0x2f25cb))return _0x4c2269[_0x775733(0x8a)](_0x1741b1,_0x4c2269[_0x775733(0x75)]),0x1;_0xbc579a(_0x4c2269['qEPtI']);const _0x44afbe=await _0x4f50b6({'apiBase':_0x171fa7});if(_0x4c2269[_0x775733(0x10d)](0x0,_0x44afbe[_0x775733(0x84)]))return _0x4c2269[_0x775733(0x8d)](_0x1741b1,_0x4c2269[_0x775733(0x16b)]),0x1;const _0x6244b1=_0x44afbe[_0x775733(0x7c)](_0x4faa01=>({'label':''+_0x4faa01['name'],'value':_0x4faa01['id']})),_0x162f49=await _0x4c2269['CuGRY'](_0x51256f,_0x4c2269[_0x775733(0xa8)],_0x6244b1,{'defaultIndex':0x0});if(_0xf0adfa=_0x44afbe[_0x162f49]?.['id'],!_0xf0adfa)return _0x4c2269[_0x775733(0x80)](_0x1741b1,_0x4c2269[_0x775733(0x81)]),0x1;_0x8590fc('已选分组:'+_0x44afbe[_0x162f49][_0x775733(0x14f)]+_0x775733(0x13c)+_0xf0adfa+')'),console[_0x775733(0xe8)]();}_0xbc579a(_0x4c2269[_0x775733(0xb4)]);try{_0x3b6022=await _0x4c2269[_0x775733(0x16a)](_0x466535,{'credential':_0xb70271,'email':_0x2f25cb,'platform':_0x1a4c22[_0x775733(0x10b)],'groupId':_0xf0adfa,'apiBase':_0x171fa7});}catch(_0x4967e9){return _0x1741b1(_0x775733(0xb7)+_0x4967e9[_0x775733(0x103)]),_0x4967e9['statusCode']&&_0x4c2269[_0x775733(0x113)](_0x1741b1,_0x775733(0x7b)+_0x4967e9[_0x775733(0x17e)]),0x1;}_0x3b6022[_0x775733(0xc3)]?.['name']&&_0x20c68f('你的\x20key\x20所属分组:'+_0x3b6022['group'][_0x775733(0x14f)]+'('+(_0x3b6022[_0x775733(0xc3)]['platform']||'未知')+_0x775733(0x102)+_0x3b6022[_0x775733(0xc3)]['id']+')'),_0x4c2269[_0x775733(0xfe)](_0x8590fc,_0x775733(0xa6)+_0x3b6022[_0x775733(0xe4)]+(_0x3b6022['user']?.[_0x775733(0xe6)]?'(新用户已创建)':'')),_0x3b6022[_0x775733(0xf4)]?.[_0x775733(0xe6)]&&_0x3b6022[_0x775733(0xf4)]?.[_0x775733(0x11a)]&&(_0x4c2269['dZAzJ'](_0x20c68f,_0x775733(0xe0)+_0x3b6022[_0x775733(0xf4)][_0x775733(0x11a)]),_0x3b6022['user']['message']&&_0x4c2269[_0x775733(0x80)](_0x20c68f,_0x3b6022[_0x775733(0xf4)]['message'])),console['log']();const _0x1ef5e1=function(_0x4dc98c){const _0x42e779=_0x775733,_0x1f910e=new Set();for(const _0x3a3e92 of _0x4dc98c||[]){const _0x5f3705=(_0x4c2269[_0x42e779(0x124)](_0x4c2269[_0x42e779(0xc4)],typeof _0x3a3e92)?_0x3a3e92:_0x3a3e92?.['id']||'')[_0x42e779(0x114)]();/^(gpt|o1|o3|codex|glm|minimax|deepseek)/[_0x42e779(0x9a)](_0x5f3705)?_0x1f910e[_0x42e779(0x7e)](_0x4c2269[_0x42e779(0xee)]):_0x5f3705['startsWith'](_0x4c2269[_0x42e779(0xce)])?_0x1f910e[_0x42e779(0x7e)](_0x4c2269[_0x42e779(0xc6)]):_0x5f3705[_0x42e779(0x92)](_0x42e779(0xa4))?_0x1f910e[_0x42e779(0x7e)](_0x4c2269[_0x42e779(0xda)]):_0x5f3705[_0x42e779(0x92)]('grok')&&_0x1f910e[_0x42e779(0x7e)]('grok');}return[..._0x1f910e];}(_0x3b6022[_0x775733(0x7d)]||[]);_0x1a4c22[_0x775733(0x10b)]&&!_0x1ef5e1[_0x775733(0xba)](_0x1a4c22['platform'])&&_0x1ef5e1['push'](_0x1a4c22['platform']);const _0x103444=(_0x3b6022[_0x775733(0xf2)]||[])[_0x775733(0xf6)](_0x5501d3=>!!_0x5501d3&&(!(_0x1ef5e1[_0x775733(0x84)]>0x0&&!_0x1ef5e1[_0x775733(0xba)](_0x5501d3[_0x775733(0x10b)]))&&((!_0x1a4c22['platform']||_0x5501d3[_0x775733(0x10b)]===_0x1a4c22['platform'])&&(_0x34bad3['os'][_0x775733(0xef)]?_0x775733(0xbf)===_0x5501d3['os_type']||_0x775733(0x116)===_0x5501d3[_0x775733(0x7f)]:_0x775733(0x153)===_0x5501d3['os_type']||_0x775733(0x116)===_0x5501d3['os_type']))));if(_0x4c2269[_0x775733(0x126)](0x0,_0x103444[_0x775733(0x84)]))return _0x1741b1(_0x4c2269[_0x775733(0xec)]),0x1;const _0x5cbda8=new Set(),_0x3aa9ab=[];for(const _0x1c939a of _0x103444){const _0x4f328d=_0x1c939a['platform']+'/'+_0x1c939a['client_type'];if(_0x5cbda8['has'](_0x4f328d))continue;_0x5cbda8['add'](_0x4f328d);const _0x3f451c=_0x4c2269[_0x775733(0x78)](_0x38d96c,_0x1c939a[_0x775733(0x112)]),_0x3a2662=_0x1c939a[_0x775733(0x123)]||_0x1c939a[_0x775733(0x132)]||_0x3f451c?.[_0x775733(0x14f)]||_0x1c939a[_0x775733(0x10b)]+'\x20'+_0x1c939a[_0x775733(0x112)],_0x529fdb=_0x34bad3[_0x775733(0xa9)][_0x1c939a[_0x775733(0x112)]]?.[_0x775733(0xea)]||_0x3f451c&&_0x34bad3['installed'][_0x3f451c['detectBin']]?.[_0x775733(0xea)],_0xc9cf4e=_0x4c2269[_0x775733(0x160)](_0x1c2215,_0x1c939a[_0x775733(0x112)])?'':_0x4c2269['icAJg'],_0x39fcac=_0x529fdb?_0x381be6[_0x775733(0xb2)](_0x3a2662):_0x381be6[_0x775733(0x164)](_0x3a2662+_0x775733(0x11f));_0x3aa9ab['push']({'label':_0x39fcac+'\x20'+_0x381be6[_0x775733(0x11b)]('['+_0x1c939a[_0x775733(0x10b)]+'/'+_0x1c939a[_0x775733(0x112)]+']')+_0xc9cf4e,'config':_0x1c939a,'clientType':_0x1c939a[_0x775733(0x112)],'meta':_0x3f451c,'alreadyInstalled':!!_0x529fdb});}const _0xcb2a01=_0x3aa9ab[_0x775733(0x7c)]((_0x5f3ebf,_0x255fa9)=>({'item':_0x5f3ebf,'i':_0x255fa9}))['filter'](({item:_0x123630})=>_0x1c2215(_0x123630['clientType']))[_0x775733(0x7c)](({i:_0x4a9a8d})=>_0x4a9a8d);_0x4c2269['sXaip'](_0xbc579a,_0x775733(0x13f));const _0x27fd5a=await _0x4c7c18('选择要激活的\x20CLI(绿色=已装,灰色=未装;默认选主\x20CLI,独立\x20CLI\x20默认不选)',_0x3aa9ab,{'defaultSelected':_0xcb2a01});if(_0x4c2269[_0x775733(0x165)](0x0,_0x27fd5a['length']))return _0x20fe6c(_0x4c2269['OjvBh']),0x0;const _0x17f846=_0x27fd5a[_0x775733(0x7c)](_0x21c05d=>_0x3aa9ab[_0x21c05d]);if(console['log'](),!_0x1a4c22[_0x775733(0x189)]){_0x4c2269[_0x775733(0x110)](_0xbc579a,_0x4c2269['gtldB']);for(const _0x30a03d of _0x17f846){if(_0x30a03d['alreadyInstalled']){const _0x562f21=_0x34bad3[_0x775733(0xa9)][_0x30a03d[_0x775733(0x87)]]?.[_0x775733(0x118)]||_0x34bad3[_0x775733(0xa9)][_0x30a03d[_0x775733(0xaa)]?.[_0x775733(0xb5)]]?.['version'];_0x4c2269[_0x775733(0xcd)](_0x8590fc,(_0x30a03d[_0x775733(0xaa)]?.['name']||_0x30a03d[_0x775733(0x87)])+_0x775733(0x185)+(_0x562f21?'(v'+_0x562f21+')':''));continue;}if(!_0x30a03d[_0x775733(0xaa)]||!_0x30a03d['meta'][_0x775733(0x15c)]){_0x4c2269[_0x775733(0x10f)](_0x341987,_0x30a03d[_0x775733(0x87)]+_0x775733(0xbb));continue;}_0x4c2269['esrQe'](_0x20c68f,_0x775733(0x121)+_0x30a03d[_0x775733(0xaa)][_0x775733(0x14f)]+_0x775733(0x127)+_0x30a03d['meta']['detectBin']+')');const _0x2ae23e=await _0x4c2269['AdVYK'](_0x1ebe17,_0x30a03d[_0x775733(0xaa)],{'dryRun':_0x1a4c22[_0x775733(0x189)]});_0x2ae23e[_0x775733(0xa9)]?_0x8590fc(_0x30a03d[_0x775733(0xaa)][_0x775733(0x14f)]+_0x775733(0x8c)+(_0x2ae23e[_0x775733(0x118)]?'(v'+_0x2ae23e[_0x775733(0x118)]+')':'')):_0x2ae23e['skipped']&&_0x4c2269[_0x775733(0xb6)](_0x4c2269['kpPiy'],_0x2ae23e[_0x775733(0xf8)])?_0x341987('已跳过\x20'+_0x30a03d[_0x775733(0xaa)][_0x775733(0x14f)]+_0x775733(0x83)):_0x2ae23e[_0x775733(0xf7)]?_0x4c2269[_0x775733(0xfe)](_0x20c68f,_0x775733(0x146)+_0x30a03d['meta'][_0x775733(0x14f)]+_0x775733(0x136)+_0x2ae23e[_0x775733(0xf8)]+')'):_0x4c2269[_0x775733(0x10f)](_0x1741b1,_0x30a03d[_0x775733(0xaa)][_0x775733(0x14f)]+_0x775733(0x147)+(_0x2ae23e[_0x775733(0xd8)]||_0x4c2269[_0x775733(0x11e)])+_0x775733(0xa7));}console[_0x775733(0xe8)]();}const _0x356d36=_0x4c2269[_0x775733(0x120)](_0x54e5a6,_0x3b6022[_0x775733(0x7d)]||[]);let _0x5f08e2='';if(_0x356d36[_0x775733(0x84)]>0x0){_0x4c2269['JBudQ'](_0xbc579a,_0x4c2269[_0x775733(0x106)]);let _0x4bdac9=null;if(_0xb70271[_0x775733(0x92)](_0x4c2269[_0x775733(0xeb)]))try{const _0x25dfab=await _0x4c2269['GCSQo'](_0x4f257e,{'credential':_0xb70271,'apiBase':_0x171fa7});_0x25dfab&&Array['isArray'](_0x25dfab[_0x775733(0x7d)])&&(_0x4bdac9=new Map(_0x25dfab[_0x775733(0x7d)][_0x775733(0x7c)](_0x41eece=>[_0x41eece[_0x775733(0x18a)],!!_0x41eece[_0x775733(0xe7)]])));}catch{_0x4c2269[_0x775733(0x174)](_0x20c68f,_0x4c2269[_0x775733(0x13b)]);}let _0x3e0a56=_0x356d36;if(_0x4bdac9){_0x3e0a56=[..._0x356d36[_0x775733(0xf6)](_0xd97e79=>!0x1!==_0x4bdac9[_0x775733(0x128)](_0xd97e79['id'])),..._0x356d36[_0x775733(0xf6)](_0x14c469=>!0x1===_0x4bdac9['get'](_0x14c469['id']))];const _0x1c37ae=_0x3e0a56[_0x775733(0xf6)](_0x1dc2c6=>!0x1===_0x4bdac9[_0x775733(0x128)](_0x1dc2c6['id']))[_0x775733(0x84)];_0x1c37ae>0x0&&_0x4c2269[_0x775733(0x9f)](_0x20c68f,'⚠\x20'+_0x1c37ae+_0x775733(0x182));}const _0x6d5c65=0xa,_0x47958e=_0x3e0a56[_0x775733(0x16d)](0x0,_0x6d5c65),_0x4c3e24=_0x4c2269[_0x775733(0xde)](_0x3e0a56['length'],_0x6d5c65),_0x3ec72e=_0x1497b9=>_0x4bdac9?!0x1===_0x4bdac9[_0x775733(0x128)](_0x1497b9['id'])?'⚠\x20':'✓\x20':'',_0x208cb9=[..._0x47958e[_0x775733(0x7c)](_0x325e70=>({'label':''+_0x3ec72e(_0x325e70)+_0x325e70[_0x775733(0x176)]+'\x20('+_0x325e70['id']+')'})),..._0x4c3e24?[{'label':_0x381be6['dim'](_0x4c2269['OczOe'])}]:[]],_0x449edc=await _0x4c2269[_0x775733(0x13a)](_0x51256f,_0x4c2269['CHAha'],_0x208cb9,{'defaultIndex':0x0});if(_0x4c3e24&&_0x449edc===_0x47958e['length']?(_0x5f08e2=(await _0x4c2269[_0x775733(0xd9)](_0x5e4d8b,_0x4c2269[_0x775733(0x17c)]))[_0x775733(0xd5)](),_0x5f08e2||(_0x5f08e2=_0x47958e[0x0]['id'])):_0x5f08e2=_0x47958e[_0x449edc]['id'],_0x4c2269[_0x775733(0x100)](_0x8590fc,'已选默认模型:'+_0x5f08e2),_0x4bdac9&&_0x4c2269[_0x775733(0xb8)](!0x1,_0x4bdac9[_0x775733(0x128)](_0x5f08e2))){const _0x3982fa=_0x3e0a56['filter'](_0x185b91=>!0x1!==_0x4bdac9[_0x775733(0x128)](_0x185b91['id']))['slice'](0x0,0x3)[_0x775733(0x7c)](_0x12ac73=>_0x12ac73['id']);_0x341987(_0x775733(0x11c)+_0x5f08e2+_0x775733(0x6f)),_0x4c2269[_0x775733(0x13e)](_0x341987,_0x4c2269['wUXlu']),_0x4c2269[_0x775733(0xe5)](_0x3982fa[_0x775733(0x84)],0x0)&&_0x4c2269['EKPCT'](_0x341987,_0x775733(0x12a)+_0x3982fa[_0x775733(0xaf)](_0x775733(0xa5))),_0x4c2269[_0x775733(0x12f)](_0x341987,_0x4c2269[_0x775733(0x135)]);}}else _0x341987(_0x4c2269[_0x775733(0x183)]);console[_0x775733(0xe8)]();const _0x37eb7f=_0x3b6022['base_url']||'',_0x55c789=_0x3b6022['base_url_beta']||_0x37eb7f,_0x52d64b={'apiKey':_0x3b6022['api_key']||'','baseUrl':_0x37eb7f,'apiBase':_0x37eb7f,'apiBaseBeta':_0x55c789,'antigravityApiBase':_0x37eb7f+_0x775733(0x141),'antigravityApiBaseBeta':_0x55c789+_0x775733(0x141),'defaultModel':_0x5f08e2};_0x4c2269[_0x775733(0xc5)](_0xbc579a,_0x4c2269[_0x775733(0x115)]);const _0x1dedab=[];let _0x127a94=null;for(const _0x1c958e of _0x17f846){const _0x5414df=_0x1c958e['config'][_0x775733(0x123)]||_0x1c958e[_0x775733(0x73)][_0x775733(0x132)]||_0x1c958e[_0x775733(0xaa)]?.['name']||_0x1c958e[_0x775733(0x87)];_0x4c2269[_0x775733(0x158)](_0x20fe6c,_0x775733(0xae)+_0x5414df+_0x775733(0x17f));const _0x36b3bb=_0x1c958e[_0x775733(0x73)][_0x775733(0xd1)]||[];for(const _0x4aa90f of _0x36b3bb){const _0x337930=_0x4aa90f['path']||'',_0x2a57fa=_0x4c2269[_0x775733(0xfd)]===_0x337930||_0x4c2269[_0x775733(0xc0)](_0x4c2269['Dndwq'],_0x337930),_0x5dedaa=_0x2a57fa?_0x337930:_0x4c2269[_0x775733(0xf0)](_0x2533f6,_0x337930,{'isWindows':_0x34bad3['os'][_0x775733(0xef)]}),_0x23d326=_0x4c2269[_0x775733(0xa3)](_0x3b1af8,_0x4aa90f['content']||'',_0x52d64b);if(_0x2a57fa){_0x4c2269[_0x775733(0x78)](_0x20fe6c,_0x4c2269[_0x775733(0x77)]),_0x4c2269['jkQhi'](_0x20fe6c,_0x23d326[_0x775733(0x149)]('\x0a')[_0x775733(0x7c)](_0x3d3a1d=>_0x775733(0x14a)+_0x3d3a1d)['join']('\x0a')),_0x1dedab['push']({'cli':_0x5414df,'path':_0x337930,'action':_0x4c2269[_0x775733(0x159)]});continue;}if(_0x20fe6c(_0x775733(0x143)+_0x5dedaa),_0x1a4c22[_0x775733(0x189)]){_0x4c2269[_0x775733(0x9c)](_0x341987,_0x775733(0x156));const _0x4167c7=_0x23d326['split']('\x0a'),_0x22fe75=_0x4167c7[_0x775733(0x16d)](0x0,0x8)[_0x775733(0xaf)]('\x0a');_0x20fe6c(_0x4c2269[_0x775733(0x79)]),_0x20fe6c(_0x22fe75['split']('\x0a')['map'](_0x43c34d=>'\x20\x20\x20\x20'+_0x43c34d)[_0x775733(0xaf)]('\x0a')),_0x4167c7[_0x775733(0x84)]>0x8&&_0x4c2269[_0x775733(0x120)](_0x20fe6c,_0x775733(0xd4)+_0x4167c7[_0x775733(0x84)]+_0x775733(0x15f)),_0x1dedab['push']({'cli':_0x5414df,'path':_0x5dedaa,'action':_0x4c2269[_0x775733(0x188)]}),console['log']();continue;}let _0x38271a=null;try{_0x38271a=_0x329013(_0x5dedaa),_0x38271a&&_0x4c2269[_0x775733(0xc5)](_0x20fe6c,_0x775733(0x131)+_0x38271a);}catch(_0x386dc9){_0x4c2269['diyIn'](_0x1741b1,_0x775733(0xab)+_0x386dc9[_0x775733(0x103)]+_0x775733(0x144)),_0x1dedab[_0x775733(0xca)]({'cli':_0x5414df,'path':_0x5dedaa,'action':_0x4c2269['tZGNo'],'error':_0x386dc9[_0x775733(0x103)]});continue;}try{_0x4c2269[_0x775733(0x71)](_0x156b24,_0x5dedaa,_0x23d326,{'isWindows':_0x34bad3['os'][_0x775733(0xef)]}),_0x4c2269['vKRMN'](_0x8590fc,_0x4c2269[_0x775733(0x9b)]),_0x1dedab['push']({'cli':_0x5414df,'path':_0x5dedaa,'action':_0x4c2269[_0x775733(0x172)],'backup':_0x38271a});}catch(_0x1a970e){_0x1a970e instanceof _0x201849?(_0x127a94||(_0x127a94=_0x1a970e),_0x1741b1(_0x1a970e[_0x775733(0x103)]),_0x1dedab[_0x775733(0xca)]({'cli':_0x5414df,'path':_0x5dedaa,'action':_0x4c2269[_0x775733(0x137)],'error':_0x1a970e['message']})):(_0x4c2269[_0x775733(0x113)](_0x1741b1,_0x775733(0xf9)+_0x1a970e['message']),_0x1dedab['push']({'cli':_0x5414df,'path':_0x5dedaa,'action':_0x775733(0x16e),'error':_0x1a970e[_0x775733(0x103)]}));}}console[_0x775733(0xe8)]();}if(_0x4c2269[_0x775733(0x15d)](_0x344df9),!_0x1a4c22[_0x775733(0x189)]&&_0x3b6022[_0x775733(0x107)]&&_0x3b6022[_0x775733(0x12d)]){_0x4c2269[_0x775733(0x9e)](_0xbc579a,_0x4c2269[_0x775733(0x10c)]),_0x4c2269[_0x775733(0x151)](_0x20c68f,_0x4c2269[_0x775733(0x8f)]);const _0x212836=await _0x4ae18c({'apiKey':_0x3b6022['api_key'],'baseUrl':_0x3b6022[_0x775733(0x12d)]});_0x212836['ok']?_0x4c2269[_0x775733(0x12f)](_0x8590fc,_0x4c2269['wppoC']):_0x341987(_0x775733(0x139)+(_0x212836[_0x775733(0xd8)]||'HTTP\x20'+_0x212836[_0x775733(0x17e)])+'(配置已写入,请手动检查)'),console[_0x775733(0xe8)]();}_0xbc579a(_0x775733(0x186));const _0x3fa72a=_0x1dedab[_0x775733(0xf6)](_0x48ca88=>'written'===_0x48ca88['action']),_0x45abf=_0x1dedab[_0x775733(0xf6)](_0x137d5b=>_0x775733(0x16e)===_0x137d5b[_0x775733(0x15b)]||_0x775733(0x89)===_0x137d5b['action']||_0x775733(0x17b)===_0x137d5b[_0x775733(0x15b)]),_0x34868d=_0x1dedab[_0x775733(0xf6)](_0x3ff27b=>_0x775733(0x142)===_0x3ff27b[_0x775733(0x15b)]),_0x2f1570=_0x1dedab[_0x775733(0xf6)](_0x17061a=>_0x775733(0xc2)===_0x17061a[_0x775733(0x15b)]);_0x1a4c22[_0x775733(0x189)]?_0x4c2269['CAxpW'](_0x20fe6c,'[试运行]\x20将写入\x20'+_0x2f1570[_0x775733(0x84)]+_0x775733(0x162)):_0x8590fc('已写入\x20'+_0x3fa72a[_0x775733(0x84)]+_0x775733(0xfa)),_0x4c2269[_0x775733(0xe5)](_0x34868d[_0x775733(0x84)],0x0)&&_0x4c2269[_0x775733(0xa1)](_0x20c68f,_0x775733(0xac)+_0x34868d[_0x775733(0x84)]+_0x775733(0xcf)),_0x45abf[_0x775733(0x84)]>0x0&&(_0x4c2269[_0x775733(0x174)](_0x341987,'失败\x20'+_0x45abf[_0x775733(0x84)]+'\x20项:'),_0x45abf[_0x775733(0x14e)](_0x21b870=>_0x341987(_0x775733(0x171)+_0x21b870[_0x775733(0x6e)]+'\x20'+_0x21b870[_0x775733(0xea)])));const _0x25f3e3=_0x1dedab[_0x775733(0xf6)](_0x5ee866=>_0x5ee866['backup'])[_0x775733(0x7c)](_0x2ce34d=>_0x2ce34d[_0x775733(0xa0)]);if(_0x4c2269[_0x775733(0x167)](_0x25f3e3['length'],0x0)&&(_0x20c68f(_0x4c2269[_0x775733(0xd3)]),_0x25f3e3[_0x775733(0x14e)](_0x3ce8ba=>_0x20fe6c('\x20\x20-\x20'+_0x3ce8ba))),_0x3b6022[_0x775733(0xf4)]?.[_0x775733(0xe6)]&&(console[_0x775733(0xe8)](),_0x4c2269[_0x775733(0x74)](_0x20c68f,'📧\x20新账号\x20'+(_0x3b6022[_0x775733(0xf4)][_0x775733(0x11a)]||'')+_0x775733(0x12b))),!_0x1a4c22[_0x775733(0x189)]){const _0x9b3e66=_0x17f846['map'](_0x2aa566=>_0x2aa566[_0x775733(0xaa)])[_0x775733(0xf6)](Boolean)[_0x775733(0x7c)](_0xee89b8=>({'name':_0xee89b8[_0x775733(0x14f)],'startCmd':_0xee89b8['startCmd'],'usage':_0xee89b8[_0x775733(0xcc)]}));_0x4c2269[_0x775733(0x14c)](_0x25d5ab,_0x9b3e66);}return _0x127a94?(console[_0x775733(0xe8)](),_0x1741b1(_0x4c2269[_0x775733(0x76)]),_0x4c2269['slZKj'](_0x1741b1,_0x4c2269[_0x775733(0x95)]),0x2):_0x4c2269[_0x775733(0x161)](_0x45abf['length'],0x0)?0x3:0x0;}()[_0x58a7dd(0xdd)](_0x346d8c=>{const _0x54ccfc=_0x58a7dd,_0x337537={'zhGis':function(_0x4a5016){return _0x4a5016();},'iaRtg':function(_0x1665cb,_0x3658e9){return _0x1665cb||_0x3658e9;}};_0x337537[_0x54ccfc(0x18b)](_0x344df9),process['exit'](_0x337537[_0x54ccfc(0x88)](_0x346d8c,0x0));})['catch'](_0x56556e=>{const _0x37d26f=_0x58a7dd,_0x28a980={'SaOlK':function(_0xa166b4,_0x3f844a){return _0xa166b4(_0x3f844a);},'qJXrj':function(_0x56ae37){return _0x56ae37();}};_0x28a980[_0x37d26f(0x166)](_0x1741b1,'未捕获错误:'+(_0x56556e?.[_0x37d26f(0x103)]||_0x56556e)),_0x56556e?.['stack']&&console['error'](_0x56556e[_0x37d26f(0xad)]),_0x28a980[_0x37d26f(0xb9)](_0x344df9),process[_0x37d26f(0x181)](0x1);}));
|
|
2
|
+
function _0xa4cb(_0xc50c4b,_0x21c29e){_0xc50c4b=_0xc50c4b-0x186;const _0x22920a=_0x2292();let _0xa4cbf3=_0x22920a[_0xc50c4b];return _0xa4cbf3;}const _0x3700ab=_0xa4cb;(function(_0x40907b,_0x3220fa){const _0x49b935=_0xa4cb,_0x408abf=_0x40907b();while(!![]){try{const _0x37d3ba=-parseInt(_0x49b935(0x260))/0x1+parseInt(_0x49b935(0x1fc))/0x2*(parseInt(_0x49b935(0x275))/0x3)+-parseInt(_0x49b935(0x262))/0x4+-parseInt(_0x49b935(0x222))/0x5+-parseInt(_0x49b935(0x1da))/0x6+-parseInt(_0x49b935(0x237))/0x7*(-parseInt(_0x49b935(0x24e))/0x8)+parseInt(_0x49b935(0x26a))/0x9*(parseInt(_0x49b935(0x243))/0xa);if(_0x37d3ba===_0x3220fa)break;else _0x408abf['push'](_0x408abf['shift']());}catch(_0x25d9d6){_0x408abf['push'](_0x408abf['shift']());}}}(_0x2292,0x2c6ad),(process[_0x3700ab(0x24c)](_0x3700ab(0x24a)),process[_0x3700ab(0x20d)][_0x3700ab(0x1db)]='1'));import{detectAll as _0x5e3a08}from'./lib/detect.mjs';function _0x2292(){const _0x2adc78=['MydyO','KmUMD','选择\x20CLI','usage','\x20(未装)','available','GqvXS','exit','length','grok','(新用户已创建)','\x0a@2api-store/activate\x20v','qoqrQ','backup-failed','model','请求\x20GET\x20/v1/models…','label','Mzokc','has','isMac','可能是分组不匹配或账号临时不可用,使用时会报\x20404/429','[试运行]\x20将写入\x20','group','rfUMy','未捕获错误:','key','备份失败:','shell-only','失败\x20','FArdr','UkJXT','content','zDYvA','pDcKd','handler','NNCpW','base_url','请求激活服务','1053120QEdljd','NODE_NO_WARNINGS','ibhsA','bLSnm','GwFbs','LRkvT','node','兑换码','XMSpq','ckQzY','MUzmb','VMrrc','dryRun','dim','未查询到可用分组。请联系管理员开通分组后再激活。','configs','dFSQO','\x20\x20[shell\x20命令,请手动执行]','client_type','isLinux','(跳过此文件避免无备份覆盖)','\x20已安装','pTUTA','RNMyj','未选择任何\x20CLI,退出。','email','gxleF','YbLsu','isWindows','gemini','unknown','kUvPK','CECgw','path','910aFbqxu','检查\x20CLI\x20安装状态','验证未通过:','PowerShell','\x20异常:','stack','alreadyInstalled','yTGGf','qWNJB','action','未知错误','MxSsd','未检测到\x20','\x20\x20备份:','error','version','split','env','获取可用分组','inIyQ','【试运行模式\x20--dry-run】不会真写文件、不会真装\x20CLI','permission-denied','clientType','Linux','config','argv','\x20/\x20','\x20安装(','\x20项(见上方输出)','\x20\x20目标:','环境:','(仍会写入配置;如需更换请重跑激活选择其他模型)','邮箱格式不正确','--api-base','haeuO','凭据格式无法识别(应为\x20sk-\x20前缀的\x20API\x20Key\x20或兑换码)','files','TPjFS','1677470dEVwVY','macOS','rBaty','wfayt','installed','rLMgJ','map','YqMVK','sk-','📧\x20新账号\x20','displayName','models','help','(ID\x20','log','\x20\x20\x20\x20','doBKu','cVkOs','oVodu','https://2api.store','\x20个模型当前无可用账号(标注\x20⚠,可能是分组不匹配或账号临时不可用)','7DbJKFU','lcEOv','yZAoC','meta','LljLk','\x20·\x20node\x20v','wxRzw','push','Windows','已写入','zCkgD','add','80YsLLxj','startsWith',')\x0a\x20\x20-h,\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20显示帮助\x0a\x20\x20-v,\x20--version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20显示版本\x0a\x0a','已写入\x20','fewYZ','backup','base_url_beta','warning','message','removeAllListeners','XonrU','120016rOxxwy','lvEVn','reason','mBKuX','\x20\x20[试运行]\x20不真实写入','未输入凭据','UoJtm','你的\x20key\x20所属分组:','GPDsy','user','statusCode','选择绑定的分组','\x20项:','\x20\x20\x20\x20...(共\x20','zWfhe','string','FBYwc','claude','91684rDfvNM','HTTP\x20','386188iRbUrx','YWUMc','JFMNx','detectBin','failed','ACTIVATE_API_BASE','iNfHU','redeem','683703WufMgb','JndXg','apiBase','all','平台过滤:','test','KHUnJ','replace','(配置已写入,请手动检查)','kbjFe','green','1704ADxmMm','get','选择默认模型(最新优先)','已检测到\x20CLI:','\x20安装失败:','catch','vnYfr','选择默认模型','\x20平台,ID\x20','name','display_name','cli','uoAHB','(配置仍会写入,但请手动安装后使用)','/antigravity','written','sSQAD','备份并写入配置','isArray','rdLUI','trim','UexZs','(跳过模型可用性探测:服务端暂不支持或网络不可达)','\x20个文件','dSGwu','BkXOH','os_type','\x20\x20内容预览:','platform','rHXea','fiqfl','需要\x20node\x20>=\x2018,当前\x20','激活报告','AknMY','服务端未返回模型列表,{{defaultModel}}\x20将留空','join','keys','aFyNv','需手动执行的\x20shell\x20命令:','is_new','dry-run','备份位置:','\x0a\x0a环境变量:\x0a\x20\x20ACTIVATE_API_BASE\x20\x20\x20\x20\x20\x20覆盖\x20API\x20端点(同\x20--api-base)\x0a\x0a示例:\x0a\x20\x20npx\x20@2api-store/activate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20默认激活\x0a\x20\x20npx\x20@2api-store/activate\x20--dry-run\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20试运行\x0a\x20\x20npx\x20@2api-store/activate\x20--platform\x20openai\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20只激活\x20openai\x0a\x20\x20npx\x20@2api-store/activate\x20restore\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20从备份恢复\x0a\x20\x20npx\x20@2api-store/activate\x20reset\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20恢复官方默认\x0a\x20\x20npx\x20@2api-store/activate\x20refresh-groups\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20查看可用分组\x0a\x20\x20ACTIVATE_API_BASE=http://127.0.0.1:5566\x20npx\x20@2api-store/activate\x0a\x0a退出码:\x0a\x20\x200\x20\x20成功\x0a\x20\x201\x20\x20输入错误\x20/\x20网络失败\x20/\x20致命错误\x0a\x20\x202\x20\x20部分文件权限不足(请按提示用\x20sudo\x20/\x20管理员\x20PowerShell\x20重跑)\x0a\x20\x203\x20\x20其他写入失败\x0a','filter','slice','windows','ZGLyI','请输入邮箱(用于兑换码绑定\x20/\x20新账号创建)','\x20个文件(未真实写入)','EUCEd','TAnsl','includes','YPtHS','YcmIo','toLowerCase','anthropic','api_key','CxRrl','Ezlpj','未选择分组','startCmd','mDXxK','Tmafq','\x20\x20-\x20','输入模型\x20ID(如\x20gpt-5.6-terra)','KulHW','fCBKG','写入失败:','JPimb','──\x20','模式:','\x20──','YiXHQ','已选分组:','sSYmb','新账号:','pnmbr'];_0x2292=function(){return _0x2adc78;};return _0x2292();}import{cliActivate as _0x5ef493,listGroups as _0x403a67,verifyApiKey as _0x56a247,probeModels as _0x505e25}from'./lib/api.mjs';import{renderContent as _0x31fc6a,expandPath as _0x5ada4f,listModels as _0x336686}from'./lib/render.mjs';import{backupFile as _0x167607}from'./lib/backup.mjs';import{writeFileWithPermission as _0x2896fa,PermissionDeniedError as _0x188d82}from'./lib/write.mjs';import{ask as _0x1bda94,askSecret as _0x217568,multiSelect as _0x46af81,select as _0x1395c7,confirm as _0x57e916,closePrompt as _0x436960}from'./lib/prompt.mjs';import{banner as _0x3fb386,ok as _0x14dad2,fail as _0x5e2d7e,warn as _0x3a2d60,info as _0x698c48,step as _0x5ebcd4,guide as _0x4de158,plain as _0x32db3f,chalk as _0x4d25a8}from'./lib/ui.mjs';import{getCliMeta as _0x19419e,isDefaultSelected as _0x21a56d}from'./lib/platforms.mjs';import{ensureInstalled as _0x2db027}from'./lib/install.mjs';import{SUBCOMMANDS as _0x30a335,SUBCOMMAND_NAMES as _0x1d9840,SUB_HELP as _0x15490d}from'./lib/cmds.mjs';import{createRequire as _0x278540}from'node:module';const L=_0x278540(import.meta.url)('./package.json')[_0x3700ab(0x20b)],E=_0x3700ab(0x235);(async function(){const _0x17f543=_0x3700ab,_0x283394={'sSQAD':function(_0x19b15a,_0x216ee6){return _0x19b15a===_0x216ee6;},'ZybhU':'--dry-run','mBKuX':function(_0x483fb3,_0x1f5c1b){return _0x483fb3===_0x1f5c1b;},'ibhsA':'--platform','Hysri':_0x17f543(0x21d),'iNfHU':'--version','YiXHQ':function(_0x4752c6,_0x40b1f8){return _0x4752c6==_0x40b1f8;},'EUCEd':_0x17f543(0x25d),'wfayt':_0x17f543(0x25f),'EUHUS':_0x17f543(0x19e),'YcmIo':_0x17f543(0x1f7),'cVkOs':_0x17f543(0x1bd),'Mzokc':function(_0x24593f,_0xfa7d4e){return _0x24593f(_0xfa7d4e);},'rfUMy':function(_0x3d4b8b){return _0x3d4b8b();},'haeuO':_0x17f543(0x223),'yZAoC':_0x17f543(0x23f),'KulHW':function(_0x221626,_0x920008){return _0x221626(_0x920008);},'rLMgJ':function(_0x1b05f2,_0x26fe9a){return _0x1b05f2>_0x26fe9a;},'zWfhe':function(_0x70cb42,_0x558a66){return _0x70cb42(_0x558a66);},'pnmbr':function(_0x44879b,_0x4d5dd2){return _0x44879b(_0x4d5dd2);},'JndXg':'未检测到\x20codex/claude/gemini/grok/opencode(可在后续步骤按需自动安装)','wxRzw':function(_0xa92d7b,_0x4bab2b){return _0xa92d7b(_0x4bab2b);},'gxleF':_0x17f543(0x210),'JFMNx':function(_0x43f4b0,_0x1a3d7e){return _0x43f4b0(_0x1a3d7e);},'Tmafq':function(_0x24ca8a,_0x1312eb){return _0x24ca8a(_0x1312eb);},'vadMj':'请输入\x20API\x20Key(sk-...)或兑换码','kbjFe':function(_0x1d06c2,_0x28a8ec){return _0x1d06c2(_0x28a8ec);},'sSYmb':_0x17f543(0x253),'pTUTA':_0x17f543(0x22a),'MUzmb':_0x17f543(0x1cd),'inIyQ':_0x17f543(0x269),'zDYvA':_0x17f543(0x1f8),'Ezlpj':'empty','LljLk':_0x17f543(0x21f),'NNCpW':'API\x20Key','lcEOv':_0x17f543(0x21c),'zCkgD':function(_0x1ce554,_0x1544e2){return _0x1ce554(_0x1544e2);},'GqvXS':function(_0x4787f8,_0x291cb2){return _0x4787f8===_0x291cb2;},'qoqrQ':_0x17f543(0x1e8),'kUvPK':function(_0xbc8929,_0x31f5da){return _0xbc8929(_0x31f5da);},'bLSnm':function(_0x7e4d3a,_0x4ba843){return _0x7e4d3a(_0x4ba843);},'BkXOH':function(_0x4bea26,_0x15c1c3){return _0x4bea26(_0x15c1c3);},'rBaty':_0x17f543(0x1be),'GwFbs':function(_0x1df5ea,_0x5339b5){return _0x1df5ea(_0x5339b5);},'fCBKG':function(_0x3bf64e,_0x43c711){return _0x3bf64e===_0x43c711;},'fewYZ':'服务端未返回适配当前系统的配置模板','AknMY':function(_0x2cd333,_0xc011de){return _0x2cd333(_0xc011de);},'eGoZD':'(独立\x20CLI)','MxSsd':function(_0x5a0ffe,_0x5d9ea1){return _0x5a0ffe(_0x5d9ea1);},'qWNJB':_0x17f543(0x1b6),'lvEVn':function(_0x37eb57,_0x28cb83,_0x4c10c0,_0x24a1e8){return _0x37eb57(_0x28cb83,_0x4c10c0,_0x24a1e8);},'UkJXT':'选择要激活的\x20CLI(绿色=已装,灰色=未装;默认选主\x20CLI,独立\x20CLI\x20默认不选)','ckQzY':function(_0x7873cf,_0x570ae2){return _0x7873cf===_0x570ae2;},'MydyO':function(_0x6f7256,_0xc827ea){return _0x6f7256(_0xc827ea);},'bDPsY':_0x17f543(0x1f2),'RNMyj':_0x17f543(0x1fd),'GPDsy':function(_0x55fdbd,_0x270243,_0x30a0a4){return _0x55fdbd(_0x270243,_0x30a0a4);},'aFyNv':function(_0x3e3d5b,_0x1f8e92){return _0x3e3d5b===_0x1f8e92;},'TAnsl':_0x17f543(0x206),'LRkvT':function(_0x4489af,_0x2873ad){return _0x4489af(_0x2873ad);},'jcafQ':_0x17f543(0x277),'VMrrc':_0x17f543(0x28b),'THHvk':function(_0x3dea43,_0x172bfa){return _0x3dea43>_0x172bfa;},'VthcO':'其他(手动输入模型\x20ID)','KHUnJ':function(_0x4053ea,_0x44ed8e,_0x546a16,_0x524085){return _0x4053ea(_0x44ed8e,_0x546a16,_0x524085);},'UoJtm':_0x17f543(0x1a7),'UexZs':function(_0x274404,_0xc402c8){return _0x274404(_0xc402c8);},'doBKu':function(_0x2658a2,_0x2e54e9){return _0x2658a2(_0x2e54e9);},'sFUBw':_0x17f543(0x1c8),'dSGwu':_0x17f543(0x216),'XMSpq':function(_0x58b27f,_0x1c1ffe){return _0x58b27f(_0x1c1ffe);},'wOPTk':_0x17f543(0x189),'hmCMl':_0x17f543(0x286),'YbLsu':function(_0x32f463,_0x2463e8){return _0x32f463(_0x2463e8);},'vnYfr':'Terminal','rdLUI':_0x17f543(0x1ff),'jPXBA':_0x17f543(0x1eb),'YPtHS':function(_0xba2519,_0x5eb73c){return _0xba2519(_0x5eb73c);},'TPjFS':_0x17f543(0x252),'KPtCe':_0x17f543(0x290),'rHXea':'dry-run','FooeG':function(_0x5ed25e,_0x573bbf){return _0x5ed25e(_0x573bbf);},'KmUMD':function(_0x44a2dc,_0x20651b){return _0x44a2dc(_0x20651b);},'yTGGf':_0x17f543(0x240),'FArdr':_0x17f543(0x284),'NRGfF':function(_0x43ff27,_0x16cd77){return _0x43ff27 instanceof _0x16cd77;},'pDcKd':_0x17f543(0x211),'YqMVK':'failed','CECgw':'验证\x20API\x20Key','NBTMt':function(_0x360c0d,_0x185139){return _0x360c0d(_0x185139);},'YWUMc':_0x17f543(0x1c3),'oVodu':'API\x20Key\x20验证通过(GET\x20/v1/models\x20→\x20200)','dFSQO':function(_0x31be10,_0x297ccd){return _0x31be10(_0x297ccd);},'fiqfl':function(_0x1d3b69,_0x372f14){return _0x1d3b69(_0x372f14);},'JPimb':_0x17f543(0x187),'uoAHB':function(_0xaa65ee,_0x3233ea){return _0xaa65ee(_0x3233ea);},'CxRrl':function(_0x4294e8,_0x2a6a6e){return _0x4294e8>_0x2a6a6e;},'FBYwc':function(_0x3a47c5,_0x199249){return _0x3a47c5(_0x199249);},'mDXxK':'部分文件权限不足,请按提示用\x20sudo\x20/\x20管理员\x20PowerShell\x20重跑:','FPIbb':function(_0x2823b0,_0x446d63){return _0x2823b0(_0x446d63);},'XonrU':'\x20\x20sudo\x20npx\x20-y\x20@2api-store/activate'},_0x1b72cf=process[_0x17f543(0x215)][0x2];if(_0x1b72cf&&!_0x1b72cf[_0x17f543(0x244)]('-')&&_0x1d9840[_0x17f543(0x1c6)](_0x1b72cf)){const _0x314cea=process['argv']['slice'](0x3),_0x3e3f74=_0x30a335[_0x1b72cf];try{return await _0x3e3f74[_0x17f543(0x1d6)](_0x314cea)||0x0;}catch(_0x213b21){return _0x283394[_0x17f543(0x1c5)](_0x5e2d7e,'子命令\x20'+_0x1b72cf+_0x17f543(0x200)+(_0x213b21?.[_0x17f543(0x24b)]||_0x213b21)),_0x213b21?.[_0x17f543(0x201)]&&console[_0x17f543(0x20a)](_0x213b21['stack']),0x1;}}const _0x2b5f59=function(_0x235a6a){const _0x53f2e6=_0x17f543,_0x157f05={'dryRun':!0x1,'platform':null,'_':[]};for(let _0x2914ec=0x0;_0x2914ec<_0x235a6a[_0x53f2e6(0x1bc)];_0x2914ec++){const _0x5b30df=_0x235a6a[_0x2914ec];if(_0x283394[_0x53f2e6(0x285)](_0x283394['ZybhU'],_0x5b30df)||_0x283394[_0x53f2e6(0x251)]('-n',_0x5b30df))_0x157f05[_0x53f2e6(0x1e6)]=!0x0;else{if(_0x283394[_0x53f2e6(0x251)](_0x283394[_0x53f2e6(0x1dc)],_0x5b30df)||_0x283394[_0x53f2e6(0x285)]('-p',_0x5b30df))_0x157f05[_0x53f2e6(0x291)]=_0x235a6a[++_0x2914ec];else{if(_0x283394[_0x53f2e6(0x251)](_0x283394['Hysri'],_0x5b30df))_0x157f05[_0x53f2e6(0x26c)]=_0x235a6a[++_0x2914ec];else{if('--help'===_0x5b30df||_0x283394['mBKuX']('-h',_0x5b30df))_0x157f05[_0x53f2e6(0x22e)]=!0x0;else{if(_0x283394[_0x53f2e6(0x268)]===_0x5b30df||_0x283394[_0x53f2e6(0x251)]('-v',_0x5b30df))_0x157f05[_0x53f2e6(0x20b)]=!0x0;else{if(_0x5b30df[_0x53f2e6(0x244)]('--')&&_0x5b30df['includes']('=')){const [_0x399f9f,_0x12aec8]=_0x5b30df[_0x53f2e6(0x193)](0x2)[_0x53f2e6(0x20c)](/=(.*)/,0x2);_0x157f05[_0x399f9f]=_0x12aec8;}else _0x5b30df[_0x53f2e6(0x244)]('--')?_0x157f05[_0x5b30df[_0x53f2e6(0x271)](/^--/,'')]=_0x235a6a[++_0x2914ec]:_0x157f05['_'][_0x53f2e6(0x23e)](_0x5b30df);}}}}}}return _0x157f05;}(process[_0x17f543(0x215)][_0x17f543(0x193)](0x2));if(_0x2b5f59[_0x17f543(0x22e)])return console[_0x17f543(0x230)]((_0x17f543(0x1bf)+L+'\x20—\x20TokenShop\x20CLI\x20一键激活\x0a\x0a用法:\x0a\x20\x20npx\x20@2api-store/activate\x20[options]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20默认激活流程\x0a\x20\x20npx\x20@2api-store/activate\x20<subcommand>\x20[options]\x20\x20\x20运行子命令\x0a\x0a选项(默认激活流程):\x0a\x20\x20--dry-run,\x20-n\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20不真写配置/不真装\x20CLI,只展示将做什么\x0a\x20\x20--platform\x20<name>\x20\x20\x20\x20\x20\x20只激活指定平台(openai/anthropic/gemini/grok/antigravity)\x0a\x20\x20--api-base\x20<url>\x20\x20\x20\x20\x20\x20\x20覆盖\x20API\x20端点(默认\x20$ACTIVATE_API_BASE\x20或\x20'+E+_0x17f543(0x245)+_0x15490d+_0x17f543(0x191))['trim']()),0x0;if(_0x2b5f59[_0x17f543(0x20b)])return console[_0x17f543(0x230)](L),0x0;_0x283394[_0x17f543(0x1cb)](_0x3fb386);const _0xcf590e=_0x283394[_0x17f543(0x1cb)](_0x5e3a08),_0xdbe859=_0xcf590e['os'][_0x17f543(0x1c7)]?_0x283394[_0x17f543(0x21e)]:_0xcf590e['os'][_0x17f543(0x1ed)]?_0x17f543(0x213):_0xcf590e['os'][_0x17f543(0x1f6)]?_0x283394[_0x17f543(0x239)]:_0xcf590e['os'][_0x17f543(0x291)];if(_0x283394[_0x17f543(0x1c5)](_0x698c48,_0x17f543(0x21a)+_0xdbe859+_0x17f543(0x23c)+_0xcf590e[_0x17f543(0x1e0)]['version']),!_0xcf590e['node']['supported'])return _0x283394[_0x17f543(0x1a8)](_0x5e2d7e,_0x17f543(0x186)+_0xcf590e[_0x17f543(0x1e0)]['version']),0x1;const _0x2d3fe5=Object[_0x17f543(0x18b)](_0xcf590e[_0x17f543(0x226)]),_0x5dc7ee=_0x2d3fe5[_0x17f543(0x228)](_0x37dd71=>{const _0x3f2c08=_0x17f543,_0x2fddae=_0xcf590e[_0x3f2c08(0x226)][_0x37dd71]?.[_0x3f2c08(0x20b)];return _0x2fddae?_0x37dd71+'@'+_0x2fddae:_0x37dd71;});_0x283394[_0x17f543(0x227)](_0x2d3fe5[_0x17f543(0x1bc)],0x0)?_0x283394[_0x17f543(0x25c)](_0x14dad2,_0x17f543(0x278)+_0x5dc7ee[_0x17f543(0x18a)](',\x20')):_0x283394[_0x17f543(0x1b3)](_0x698c48,_0x283394[_0x17f543(0x26b)]);const _0x2325e7=_0x2b5f59[_0x17f543(0x26c)]||process[_0x17f543(0x20d)][_0x17f543(0x267)]||E;_0x283394[_0x17f543(0x23d)](_0x698c48,'API\x20端点:'+_0x2325e7),_0x2b5f59[_0x17f543(0x1e6)]&&_0x283394['Mzokc'](_0x3a2d60,_0x283394[_0x17f543(0x1f4)]),_0x2b5f59[_0x17f543(0x291)]&&_0x283394['JFMNx'](_0x698c48,_0x17f543(0x26e)+_0x2b5f59['platform']),console[_0x17f543(0x230)]();const _0x597548=(await _0x283394[_0x17f543(0x1a5)](_0x217568,_0x283394['vadMj']))['trim']();if(!_0x597548)return _0x283394[_0x17f543(0x273)](_0x5e2d7e,_0x283394[_0x17f543(0x1b1)]),0x1;const _0x5f1289=(_0x3d40ae=_0x597548)?_0x3d40ae['startsWith'](_0x283394[_0x17f543(0x1f0)])?_0x283394[_0x17f543(0x1e4)]:/^[a-zA-Z0-9]{16,64}$/[_0x17f543(0x26f)](_0x3d40ae)?_0x283394[_0x17f543(0x20f)]:_0x283394[_0x17f543(0x1d4)]:_0x283394[_0x17f543(0x1a1)];var _0x3d40ae;if(_0x283394[_0x17f543(0x1d4)]===_0x5f1289)return _0x5e2d7e(_0x283394[_0x17f543(0x23b)]),0x1;_0x698c48('识别为:'+(_0x283394[_0x17f543(0x251)](_0x283394['MUzmb'],_0x5f1289)?_0x283394[_0x17f543(0x1d7)]:_0x17f543(0x1e1))+'模式');let _0x4bf03a,_0x3ddd2d='',_0x18cdfe=null;if(_0x283394[_0x17f543(0x20f)]===_0x5f1289){if(_0x3ddd2d=(await _0x283394['KulHW'](_0x1bda94,_0x17f543(0x196)))['trim'](),!_0x3ddd2d||!/^[^\s@]+@[^\s@]+\.[^\s@]+$/[_0x17f543(0x26f)](_0x3ddd2d))return _0x5e2d7e(_0x283394[_0x17f543(0x238)]),0x1;_0x283394[_0x17f543(0x241)](_0x5ebcd4,_0x17f543(0x20e));const _0x44bf9d=await _0x283394[_0x17f543(0x1a8)](_0x403a67,{'apiBase':_0x2325e7});if(_0x283394[_0x17f543(0x1ba)](0x0,_0x44bf9d[_0x17f543(0x1bc)]))return _0x283394[_0x17f543(0x25c)](_0x5e2d7e,_0x283394[_0x17f543(0x1c0)]),0x1;const _0x256c08=_0x44bf9d['map'](_0x21522a=>({'label':''+_0x21522a[_0x17f543(0x27e)],'value':_0x21522a['id']})),_0x478689=await _0x1395c7(_0x17f543(0x259),_0x256c08,{'defaultIndex':0x0});if(_0x18cdfe=_0x44bf9d[_0x478689]?.['id'],!_0x18cdfe)return _0x283394[_0x17f543(0x1a8)](_0x5e2d7e,_0x17f543(0x1a2)),0x1;_0x14dad2(_0x17f543(0x1b0)+_0x44bf9d[_0x478689][_0x17f543(0x27e)]+_0x17f543(0x22f)+_0x18cdfe+')'),console['log']();}_0x283394[_0x17f543(0x1f9)](_0x5ebcd4,_0x17f543(0x1d9));try{_0x4bf03a=await _0x283394[_0x17f543(0x1dd)](_0x5ef493,{'credential':_0x597548,'email':_0x3ddd2d,'platform':_0x2b5f59[_0x17f543(0x291)],'groupId':_0x18cdfe,'apiBase':_0x2325e7});}catch(_0x2f830e){return _0x283394['kbjFe'](_0x5e2d7e,'激活失败:'+_0x2f830e[_0x17f543(0x24b)]),_0x2f830e[_0x17f543(0x258)]&&_0x283394[_0x17f543(0x28e)](_0x5e2d7e,'\x20\x20HTTP\x20'+_0x2f830e[_0x17f543(0x258)]),0x1;}_0x4bf03a[_0x17f543(0x1ca)]?.['name']&&_0x283394[_0x17f543(0x273)](_0x698c48,_0x17f543(0x255)+_0x4bf03a['group'][_0x17f543(0x27e)]+'('+(_0x4bf03a['group'][_0x17f543(0x291)]||'未知')+_0x17f543(0x27d)+_0x4bf03a['group']['id']+')'),_0x283394[_0x17f543(0x23d)](_0x14dad2,_0x17f543(0x1ad)+_0x4bf03a['mode']+(_0x4bf03a[_0x17f543(0x257)]?.['is_new']?_0x283394[_0x17f543(0x224)]:'')),_0x4bf03a[_0x17f543(0x257)]?.[_0x17f543(0x18e)]&&_0x4bf03a['user']?.[_0x17f543(0x1f3)]&&(_0x283394[_0x17f543(0x1a8)](_0x698c48,_0x17f543(0x1b2)+_0x4bf03a[_0x17f543(0x257)][_0x17f543(0x1f3)]),_0x4bf03a[_0x17f543(0x257)][_0x17f543(0x24b)]&&_0x283394['GwFbs'](_0x698c48,_0x4bf03a[_0x17f543(0x257)][_0x17f543(0x24b)])),console[_0x17f543(0x230)]();const _0x2a1bae=function(_0x458869){const _0x570638=_0x17f543,_0x123629=new Set();for(const _0x47332b of _0x458869||[]){const _0x2333b2=(_0x283394[_0x570638(0x1af)](_0x283394[_0x570638(0x198)],typeof _0x47332b)?_0x47332b:_0x47332b?.['id']||'')[_0x570638(0x19d)]();/^(gpt|o1|o3|codex|glm|minimax|deepseek)/['test'](_0x2333b2)?_0x123629[_0x570638(0x242)]('openai'):_0x2333b2[_0x570638(0x244)](_0x283394[_0x570638(0x225)])?_0x123629['add'](_0x283394['EUHUS']):_0x2333b2[_0x570638(0x244)](_0x283394['YcmIo'])?_0x123629[_0x570638(0x242)](_0x283394[_0x570638(0x19c)]):_0x2333b2[_0x570638(0x244)](_0x283394[_0x570638(0x233)])&&_0x123629['add'](_0x283394[_0x570638(0x233)]);}return[..._0x123629];}(_0x4bf03a[_0x17f543(0x22d)]||[]);_0x2b5f59[_0x17f543(0x291)]&&!_0x2a1bae[_0x17f543(0x19a)](_0x2b5f59[_0x17f543(0x291)])&&_0x2a1bae['push'](_0x2b5f59[_0x17f543(0x291)]);const _0x241880=(_0x4bf03a[_0x17f543(0x1e9)]||[])[_0x17f543(0x192)](_0xab48a2=>!!_0xab48a2&&(!(_0x2a1bae['length']>0x0&&!_0x2a1bae[_0x17f543(0x19a)](_0xab48a2[_0x17f543(0x291)]))&&((!_0x2b5f59[_0x17f543(0x291)]||_0xab48a2[_0x17f543(0x291)]===_0x2b5f59['platform'])&&(_0xcf590e['os'][_0x17f543(0x1f6)]?_0x17f543(0x194)===_0xab48a2['os_type']||'all'===_0xab48a2[_0x17f543(0x28f)]:'unix'===_0xab48a2[_0x17f543(0x28f)]||_0x17f543(0x26d)===_0xab48a2[_0x17f543(0x28f)]))));if(_0x283394['fCBKG'](0x0,_0x241880[_0x17f543(0x1bc)]))return _0x5e2d7e(_0x283394[_0x17f543(0x247)]),0x1;const _0x13e740=new Set(),_0x4c9212=[];for(const _0x7307d3 of _0x241880){const _0x2b58af=_0x7307d3[_0x17f543(0x291)]+'/'+_0x7307d3[_0x17f543(0x1ec)];if(_0x13e740[_0x17f543(0x1c6)](_0x2b58af))continue;_0x13e740[_0x17f543(0x242)](_0x2b58af);const _0x58fb99=_0x283394['AknMY'](_0x19419e,_0x7307d3['client_type']),_0x302f79=_0x7307d3[_0x17f543(0x27f)]||_0x7307d3[_0x17f543(0x22c)]||_0x58fb99?.['name']||_0x7307d3['platform']+'\x20'+_0x7307d3['client_type'],_0x160bb7=_0xcf590e[_0x17f543(0x226)][_0x7307d3[_0x17f543(0x1ec)]]?.[_0x17f543(0x1fb)]||_0x58fb99&&_0xcf590e[_0x17f543(0x226)][_0x58fb99['detectBin']]?.[_0x17f543(0x1fb)],_0x37e9b2=_0x21a56d(_0x7307d3[_0x17f543(0x1ec)])?'':_0x283394['eGoZD'],_0x481568=_0x160bb7?_0x4d25a8[_0x17f543(0x274)](_0x302f79):_0x4d25a8['gray'](_0x302f79+_0x17f543(0x1b8));_0x4c9212[_0x17f543(0x23e)]({'label':_0x481568+'\x20'+_0x4d25a8[_0x17f543(0x1e7)]('['+_0x7307d3['platform']+'/'+_0x7307d3[_0x17f543(0x1ec)]+']')+_0x37e9b2,'config':_0x7307d3,'clientType':_0x7307d3[_0x17f543(0x1ec)],'meta':_0x58fb99,'alreadyInstalled':!!_0x160bb7});}const _0x443d34=_0x4c9212[_0x17f543(0x228)]((_0x51bb8b,_0x47cbf5)=>({'item':_0x51bb8b,'i':_0x47cbf5}))[_0x17f543(0x192)](({item:_0xd27ce})=>_0x21a56d(_0xd27ce[_0x17f543(0x212)]))[_0x17f543(0x228)](({i:_0x535e08})=>_0x535e08);_0x283394[_0x17f543(0x207)](_0x5ebcd4,_0x283394[_0x17f543(0x204)]);const _0x1dfdd5=await _0x283394[_0x17f543(0x24f)](_0x46af81,_0x283394[_0x17f543(0x1d2)],_0x4c9212,{'defaultSelected':_0x443d34});if(_0x283394[_0x17f543(0x1e3)](0x0,_0x1dfdd5[_0x17f543(0x1bc)]))return _0x283394[_0x17f543(0x1b4)](_0x32db3f,_0x283394['bDPsY']),0x0;const _0x4c469b=_0x1dfdd5['map'](_0x253569=>_0x4c9212[_0x253569]);if(console[_0x17f543(0x230)](),!_0x2b5f59[_0x17f543(0x1e6)]){_0x5ebcd4(_0x283394[_0x17f543(0x1f1)]);for(const _0x3cc90e of _0x4c469b){if(_0x3cc90e[_0x17f543(0x202)]){const _0x3bbc1a=_0xcf590e[_0x17f543(0x226)][_0x3cc90e[_0x17f543(0x212)]]?.['version']||_0xcf590e[_0x17f543(0x226)][_0x3cc90e[_0x17f543(0x23a)]?.[_0x17f543(0x265)]]?.[_0x17f543(0x20b)];_0x283394[_0x17f543(0x264)](_0x14dad2,(_0x3cc90e[_0x17f543(0x23a)]?.['name']||_0x3cc90e[_0x17f543(0x212)])+_0x17f543(0x1ef)+(_0x3bbc1a?'(v'+_0x3bbc1a+')':''));continue;}if(!_0x3cc90e[_0x17f543(0x23a)]||!_0x3cc90e[_0x17f543(0x23a)]['installPackage']){_0x283394[_0x17f543(0x1de)](_0x3a2d60,_0x3cc90e['clientType']+'\x20无可自动安装的\x20npm\x20包,请手动安装后重跑(配置仍会写入)');continue;}_0x698c48(_0x17f543(0x208)+_0x3cc90e[_0x17f543(0x23a)][_0x17f543(0x27e)]+'(命令\x20'+_0x3cc90e[_0x17f543(0x23a)][_0x17f543(0x265)]+')');const _0x5413e2=await _0x283394[_0x17f543(0x256)](_0x2db027,_0x3cc90e[_0x17f543(0x23a)],{'dryRun':_0x2b5f59[_0x17f543(0x1e6)]});_0x5413e2['installed']?_0x283394[_0x17f543(0x23d)](_0x14dad2,_0x3cc90e[_0x17f543(0x23a)]['name']+'\x20安装成功'+(_0x5413e2[_0x17f543(0x20b)]?'(v'+_0x5413e2['version']+')':'')):_0x5413e2['skipped']&&_0x283394[_0x17f543(0x18c)]('user-declined',_0x5413e2[_0x17f543(0x250)])?_0x3a2d60('已跳过\x20'+_0x3cc90e['meta'][_0x17f543(0x27e)]+'\x20安装(配置仍会写入,但请手动安装后使用)'):_0x5413e2['skipped']?_0x283394[_0x17f543(0x188)](_0x698c48,'已跳过\x20'+_0x3cc90e['meta']['name']+_0x17f543(0x217)+_0x5413e2[_0x17f543(0x250)]+')'):_0x5e2d7e(_0x3cc90e[_0x17f543(0x23a)]['name']+_0x17f543(0x279)+(_0x5413e2[_0x17f543(0x20a)]||_0x283394[_0x17f543(0x199)])+_0x17f543(0x282));}console[_0x17f543(0x230)]();}const _0x3e1ab7=_0x283394[_0x17f543(0x1df)](_0x336686,_0x4bf03a[_0x17f543(0x22d)]||[]);let _0x62a04b='';if(_0x3e1ab7['length']>0x0){_0x283394['MydyO'](_0x5ebcd4,_0x283394['jcafQ']);let _0xf73fcf=null;if(_0x597548[_0x17f543(0x244)](_0x283394[_0x17f543(0x1f0)]))try{const _0x1e0980=await _0x505e25({'credential':_0x597548,'apiBase':_0x2325e7});_0x1e0980&&Array[_0x17f543(0x287)](_0x1e0980[_0x17f543(0x22d)])&&(_0xf73fcf=new Map(_0x1e0980[_0x17f543(0x22d)]['map'](_0x113ab7=>[_0x113ab7[_0x17f543(0x1c2)],!!_0x113ab7[_0x17f543(0x1b9)]])));}catch{_0x698c48(_0x283394[_0x17f543(0x1e5)]);}let _0x495b4b=_0x3e1ab7;if(_0xf73fcf){_0x495b4b=[..._0x3e1ab7[_0x17f543(0x192)](_0x4f6f18=>!0x1!==_0xf73fcf[_0x17f543(0x276)](_0x4f6f18['id'])),..._0x3e1ab7[_0x17f543(0x192)](_0xcefe8e=>!0x1===_0xf73fcf['get'](_0xcefe8e['id']))];const _0x14e4db=_0x495b4b[_0x17f543(0x192)](_0x32dc1c=>!0x1===_0xf73fcf['get'](_0x32dc1c['id']))['length'];_0x283394['rLMgJ'](_0x14e4db,0x0)&&_0x283394[_0x17f543(0x273)](_0x698c48,'⚠\x20'+_0x14e4db+_0x17f543(0x236));}const _0x2267d9=0xa,_0x3fd29c=_0x495b4b[_0x17f543(0x193)](0x0,_0x2267d9),_0x8212ae=_0x283394['THHvk'](_0x495b4b['length'],_0x2267d9),_0x41c7c9=_0x49263e=>_0xf73fcf?!0x1===_0xf73fcf[_0x17f543(0x276)](_0x49263e['id'])?'⚠\x20':'✓\x20':'',_0x5909a9=[..._0x3fd29c[_0x17f543(0x228)](_0x56e3bc=>({'label':''+_0x41c7c9(_0x56e3bc)+_0x56e3bc[_0x17f543(0x1c4)]+'\x20('+_0x56e3bc['id']+')'})),..._0x8212ae?[{'label':_0x4d25a8[_0x17f543(0x1e7)](_0x283394['VthcO'])}]:[]],_0x4f6c0f=await _0x283394[_0x17f543(0x270)](_0x1395c7,_0x17f543(0x27c),_0x5909a9,{'defaultIndex':0x0});if(_0x8212ae&&_0x283394[_0x17f543(0x1e3)](_0x4f6c0f,_0x3fd29c[_0x17f543(0x1bc)])?(_0x62a04b=(await _0x283394[_0x17f543(0x1de)](_0x1bda94,_0x283394[_0x17f543(0x254)]))[_0x17f543(0x289)](),_0x62a04b||(_0x62a04b=_0x3fd29c[0x0]['id'])):_0x62a04b=_0x3fd29c[_0x4f6c0f]['id'],_0x283394[_0x17f543(0x1df)](_0x14dad2,'已选默认模型:'+_0x62a04b),_0xf73fcf&&!0x1===_0xf73fcf[_0x17f543(0x276)](_0x62a04b)){const _0x47b238=_0x495b4b[_0x17f543(0x192)](_0x3b25cd=>!0x1!==_0xf73fcf['get'](_0x3b25cd['id']))['slice'](0x0,0x3)[_0x17f543(0x228)](_0x21dfe5=>_0x21dfe5['id']);_0x283394[_0x17f543(0x28a)](_0x3a2d60,'模型可用性探测:'+_0x62a04b+'\x20当前无可用账号'),_0x283394['doBKu'](_0x3a2d60,_0x283394['sFUBw']),_0x47b238[_0x17f543(0x1bc)]>0x0&&_0x283394[_0x17f543(0x1f9)](_0x3a2d60,'建议换用:'+_0x47b238[_0x17f543(0x18a)](_0x283394[_0x17f543(0x28d)])),_0x283394[_0x17f543(0x1e2)](_0x3a2d60,_0x17f543(0x21b));}}else _0x3a2d60(_0x283394['wOPTk']);console[_0x17f543(0x230)]();const _0x26d2fd=_0x4bf03a[_0x17f543(0x1d8)]||'',_0x4426b7=_0x4bf03a[_0x17f543(0x249)]||_0x26d2fd,_0x32a228={'apiKey':_0x4bf03a[_0x17f543(0x19f)]||'','baseUrl':_0x26d2fd,'apiBase':_0x26d2fd,'apiBaseBeta':_0x4426b7,'antigravityApiBase':_0x26d2fd+'/antigravity','antigravityApiBaseBeta':_0x4426b7+_0x17f543(0x283),'defaultModel':_0x62a04b};_0x5ebcd4(_0x283394['hmCMl']);const _0x39b9ec=[];let _0xa517b8=null;for(const _0x1aac8e of _0x4c469b){const _0x272ce1=_0x1aac8e[_0x17f543(0x214)][_0x17f543(0x27f)]||_0x1aac8e[_0x17f543(0x214)][_0x17f543(0x22c)]||_0x1aac8e[_0x17f543(0x23a)]?.['name']||_0x1aac8e['clientType'];_0x283394[_0x17f543(0x1f5)](_0x32db3f,_0x17f543(0x1ac)+_0x272ce1+_0x17f543(0x1ae));const _0x1440e8=_0x1aac8e[_0x17f543(0x214)][_0x17f543(0x220)]||[];for(const _0x125e2f of _0x1440e8){const _0xa87c5e=_0x125e2f[_0x17f543(0x1fb)]||'',_0x42ed3d=_0x283394[_0x17f543(0x1a9)](_0x283394[_0x17f543(0x27b)],_0xa87c5e)||_0x283394[_0x17f543(0x285)](_0x283394[_0x17f543(0x288)],_0xa87c5e),_0x26ab9d=_0x42ed3d?_0xa87c5e:_0x5ada4f(_0xa87c5e,{'isWindows':_0xcf590e['os']['isWindows']}),_0x77f75c=_0x31fc6a(_0x125e2f[_0x17f543(0x1d3)]||'',_0x32a228);if(_0x42ed3d){_0x283394[_0x17f543(0x232)](_0x32db3f,_0x283394['jPXBA']),_0x32db3f(_0x77f75c[_0x17f543(0x20c)]('\x0a')[_0x17f543(0x228)](_0x279434=>'\x20\x20\x20\x20'+_0x279434)[_0x17f543(0x18a)]('\x0a')),_0x39b9ec[_0x17f543(0x23e)]({'cli':_0x272ce1,'path':_0xa87c5e,'action':_0x17f543(0x1cf)});continue;}if(_0x283394[_0x17f543(0x19b)](_0x32db3f,_0x17f543(0x219)+_0x26ab9d),_0x2b5f59[_0x17f543(0x1e6)]){_0x3a2d60(_0x283394[_0x17f543(0x221)]);const _0x2275c9=_0x77f75c[_0x17f543(0x20c)]('\x0a'),_0x41c684=_0x2275c9[_0x17f543(0x193)](0x0,0x8)['join']('\x0a');_0x283394[_0x17f543(0x19b)](_0x32db3f,_0x283394['KPtCe']),_0x283394['doBKu'](_0x32db3f,_0x41c684[_0x17f543(0x20c)]('\x0a')[_0x17f543(0x228)](_0x4d30e5=>_0x17f543(0x231)+_0x4d30e5)[_0x17f543(0x18a)]('\x0a')),_0x2275c9['length']>0x8&&_0x283394[_0x17f543(0x1b3)](_0x32db3f,_0x17f543(0x25b)+_0x2275c9[_0x17f543(0x1bc)]+'\x20行)'),_0x39b9ec[_0x17f543(0x23e)]({'cli':_0x272ce1,'path':_0x26ab9d,'action':_0x283394[_0x17f543(0x292)]}),console[_0x17f543(0x230)]();continue;}let _0x27be4e=null;try{_0x27be4e=_0x167607(_0x26ab9d),_0x27be4e&&_0x283394['kbjFe'](_0x32db3f,_0x17f543(0x209)+_0x27be4e);}catch(_0x29b5e5){_0x283394['FooeG'](_0x5e2d7e,_0x17f543(0x1ce)+_0x29b5e5['message']+_0x17f543(0x1ee)),_0x39b9ec['push']({'cli':_0x272ce1,'path':_0x26ab9d,'action':_0x17f543(0x1c1),'error':_0x29b5e5[_0x17f543(0x24b)]});continue;}try{_0x2896fa(_0x26ab9d,_0x77f75c,{'isWindows':_0xcf590e['os'][_0x17f543(0x1f6)]}),_0x283394[_0x17f543(0x1b5)](_0x14dad2,_0x283394[_0x17f543(0x203)]),_0x39b9ec[_0x17f543(0x23e)]({'cli':_0x272ce1,'path':_0x26ab9d,'action':_0x283394[_0x17f543(0x1d1)],'backup':_0x27be4e});}catch(_0x6eb284){_0x283394['NRGfF'](_0x6eb284,_0x188d82)?(_0xa517b8||(_0xa517b8=_0x6eb284),_0x5e2d7e(_0x6eb284[_0x17f543(0x24b)]),_0x39b9ec[_0x17f543(0x23e)]({'cli':_0x272ce1,'path':_0x26ab9d,'action':_0x283394[_0x17f543(0x1d5)],'error':_0x6eb284[_0x17f543(0x24b)]})):(_0x5e2d7e(_0x17f543(0x1aa)+_0x6eb284[_0x17f543(0x24b)]),_0x39b9ec[_0x17f543(0x23e)]({'cli':_0x272ce1,'path':_0x26ab9d,'action':_0x283394[_0x17f543(0x229)],'error':_0x6eb284[_0x17f543(0x24b)]}));}}console[_0x17f543(0x230)]();}if(_0x436960(),!_0x2b5f59[_0x17f543(0x1e6)]&&_0x4bf03a['api_key']&&_0x4bf03a[_0x17f543(0x1d8)]){_0x283394[_0x17f543(0x19b)](_0x5ebcd4,_0x283394[_0x17f543(0x1fa)]),_0x283394['NBTMt'](_0x698c48,_0x283394[_0x17f543(0x263)]);const _0x550899=await _0x283394[_0x17f543(0x28a)](_0x56a247,{'apiKey':_0x4bf03a[_0x17f543(0x19f)],'baseUrl':_0x4bf03a[_0x17f543(0x1d8)]});_0x550899['ok']?_0x283394[_0x17f543(0x207)](_0x14dad2,_0x283394[_0x17f543(0x234)]):_0x283394[_0x17f543(0x1ea)](_0x3a2d60,_0x17f543(0x1fe)+(_0x550899[_0x17f543(0x20a)]||_0x17f543(0x261)+_0x550899[_0x17f543(0x258)])+_0x17f543(0x272)),console[_0x17f543(0x230)]();}_0x283394[_0x17f543(0x293)](_0x5ebcd4,_0x283394[_0x17f543(0x1ab)]);const _0x1202cf=_0x39b9ec[_0x17f543(0x192)](_0x206c42=>_0x17f543(0x284)===_0x206c42[_0x17f543(0x205)]),_0x439c91=_0x39b9ec[_0x17f543(0x192)](_0x25ffa1=>_0x17f543(0x266)===_0x25ffa1[_0x17f543(0x205)]||'permission-denied'===_0x25ffa1[_0x17f543(0x205)]||_0x17f543(0x1c1)===_0x25ffa1[_0x17f543(0x205)]),_0x42d3eb=_0x39b9ec[_0x17f543(0x192)](_0x19f88b=>_0x17f543(0x1cf)===_0x19f88b[_0x17f543(0x205)]),_0x39f722=_0x39b9ec[_0x17f543(0x192)](_0x579911=>_0x17f543(0x18f)===_0x579911[_0x17f543(0x205)]);_0x2b5f59[_0x17f543(0x1e6)]?_0x283394['FooeG'](_0x32db3f,_0x17f543(0x1c9)+_0x39f722['length']+_0x17f543(0x197)):_0x14dad2(_0x17f543(0x246)+_0x1202cf[_0x17f543(0x1bc)]+_0x17f543(0x28c)),_0x283394[_0x17f543(0x227)](_0x42d3eb[_0x17f543(0x1bc)],0x0)&&_0x698c48(_0x17f543(0x18d)+_0x42d3eb[_0x17f543(0x1bc)]+_0x17f543(0x218)),_0x439c91[_0x17f543(0x1bc)]>0x0&&(_0x283394[_0x17f543(0x281)](_0x3a2d60,_0x17f543(0x1d0)+_0x439c91[_0x17f543(0x1bc)]+_0x17f543(0x25a)),_0x439c91['forEach'](_0x5d8c19=>_0x3a2d60('\x20\x20-\x20'+_0x5d8c19[_0x17f543(0x280)]+'\x20'+_0x5d8c19[_0x17f543(0x1fb)])));const _0x22ec17=_0x39b9ec[_0x17f543(0x192)](_0x5c989b=>_0x5c989b['backup'])[_0x17f543(0x228)](_0x3f8484=>_0x3f8484[_0x17f543(0x248)]);if(_0x283394[_0x17f543(0x1a0)](_0x22ec17[_0x17f543(0x1bc)],0x0)&&(_0x283394[_0x17f543(0x1ea)](_0x698c48,_0x17f543(0x190)),_0x22ec17['forEach'](_0x115504=>_0x32db3f(_0x17f543(0x1a6)+_0x115504))),_0x4bf03a[_0x17f543(0x257)]?.['is_new']&&(console[_0x17f543(0x230)](),_0x283394[_0x17f543(0x188)](_0x698c48,_0x17f543(0x22b)+(_0x4bf03a['user'][_0x17f543(0x1f3)]||'')+'\x20已创建,请查收邮件获取初始密码,登录后尽快修改。')),!_0x2b5f59[_0x17f543(0x1e6)]){const _0x524d07=_0x4c469b[_0x17f543(0x228)](_0x58e8b4=>_0x58e8b4['meta'])[_0x17f543(0x192)](Boolean)[_0x17f543(0x228)](_0x1a4737=>({'name':_0x1a4737[_0x17f543(0x27e)],'startCmd':_0x1a4737[_0x17f543(0x1a3)],'usage':_0x1a4737[_0x17f543(0x1b7)]}));_0x283394[_0x17f543(0x25e)](_0x4de158,_0x524d07);}return _0xa517b8?(console[_0x17f543(0x230)](),_0x283394['wxRzw'](_0x5e2d7e,_0x283394[_0x17f543(0x1a4)]),_0x283394['FPIbb'](_0x5e2d7e,_0x283394[_0x17f543(0x24d)]),0x2):_0x283394[_0x17f543(0x227)](_0x439c91['length'],0x0)?0x3:0x0;}()['then'](_0x395193=>{const _0x393dc2=_0x3700ab,_0x24078b={'ZGLyI':function(_0x4805d2){return _0x4805d2();}};_0x24078b[_0x393dc2(0x195)](_0x436960),process[_0x393dc2(0x1bb)](_0x395193||0x0);})[_0x3700ab(0x27a)](_0x883d4e=>{const _0x5ec43b=_0x3700ab,_0x2ca743={'xxoSj':function(_0x1e2ccf,_0xe9b1de){return _0x1e2ccf(_0xe9b1de);}};_0x2ca743['xxoSj'](_0x5e2d7e,_0x5ec43b(0x1cc)+(_0x883d4e?.[_0x5ec43b(0x24b)]||_0x883d4e)),_0x883d4e?.[_0x5ec43b(0x201)]&&console[_0x5ec43b(0x20a)](_0x883d4e['stack']),_0x436960(),process[_0x5ec43b(0x1bb)](0x1);}));
|
package/dist/lib/api.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x1a20d6=_0xaced;(function(_0x3733fb,_0x2a794c){const _0x81809=_0xaced,_0x4aed4b=_0x3733fb();while(!![]){try{const _0x695e6=-parseInt(_0x81809(0x14b))/0x1+parseInt(_0x81809(0x10a))/0x2*(-parseInt(_0x81809(0x107))/0x3)+parseInt(_0x81809(0xeb))/0x4*(parseInt(_0x81809(0x14f))/0x5)+parseInt(_0x81809(0xe6))/0x6*(parseInt(_0x81809(0x117))/0x7)+parseInt(_0x81809(0x102))/0x8+-parseInt(_0x81809(0x131))/0x9+parseInt(_0x81809(0x122))/0xa*(parseInt(_0x81809(0x109))/0xb);if(_0x695e6===_0x2a794c)break;else _0x4aed4b['push'](_0x4aed4b['shift']());}catch(_0x4a84db){_0x4aed4b['push'](_0x4aed4b['shift']());}}}(_0x3d37,0x78d76));import _0x2c76e4 from'node:https';import _0x95ff1a from'node:http';function _0x3d37(){const _0x1f56de=['33rCnhMl','411258pIIgTE','请求超时(','TgNBc','body','vqRyA','CLvhN','statusCode','KgGgq','TWsHh','parse','NkKgX','Dxgcx','YRebu','228501DVCoBN','destroy','无效的\x20apiBase:','GET','VdhMJ','write','href','byteLength','HTTP\x20','application/json','NQvxF','3357280XjhliX','toString','ZRXAc','tVuFb','otXXI','POST','NNKrl','cXdwP','验证请求超时(15s)','sRZqe','data','pbvHW','STnCC','DSEhQ','Pmtnx','5773491BnPjEq','message','FFgYB','NlGwu','rKKqw','/api/v1/cli/activate','TUFNE','AKWML','vaOph','jhOOT','KLZxw','utf8','GNBRZ','/v1/models','ssePk','WiXTS','@2api-store/activate/0.1.0','EGPbA','uWxSa','groups','/api/v1/cli/probe-models','s)—\x20','QZLsT','isArray','cyrTR','IVmri','391719xLdXyG','lcjjk','vlLSs','NDvHJ','224360UpZkhv','zaXDv','end','Dfevg','joldY','PoW\x20challenge\x20获取失败:','error','raw','6klKBvL','响应非\x20JSON(HTTP\x20','xvfdt','timeout','cRNdQ','68hbXDcv','push','请求超时(30s)—\x20','stringify','/api/v1/cli/groups','vpXtW','mrHCS','paxyc','响应非\x20JSON','xikea','Ivukj','slice','https:','JAsxp','EQMCI','KoRuj','vfHzp','NVCRF','yczLh','WhlUD','qIAwo','Bearer\x20','ACxOx','4384392iqlbgI','protocol','无效的\x20baseUrl:','mvqax','request','12IMbqzX','KAkkF'];_0x3d37=function(){return _0x1f56de;};return _0x3d37();}function _0xaced(_0x528f2b,_0x80a5d1){_0x528f2b=_0x528f2b-0xe2;const _0x3d378d=_0x3d37();let _0xacedd7=_0x3d378d[_0x528f2b];return _0xacedd7;}import{getDeviceId as _0x48f6ba}from'./device.mjs';import{getChallenge as _0x1866b3,solvePoW as _0x58064e}from'./pow.mjs';const n=_0x1a20d6(0x141),a=0x7530;function i(_0x1f6945,_0x5e35e0={}){return{'User-Agent':n,'X-Device-Id':_0x1f6945,..._0x5e35e0};}export async function cliActivate({credential:_0x2ded55,email:_0x296f62,platform:_0x4e6352,groupId:_0x461bcb,apiBase:_0x4afb14}){const _0x540f23=_0x1a20d6,_0x5a0e12={'WhlUD':'utf8','WiXTS':function(_0xeb6684,_0x346940){return _0xeb6684(_0x346940);},'KLZxw':function(_0x54ae49,_0x1d2b03){return _0x54ae49>=_0x1d2b03;},'eaqes':function(_0x4617be,_0x58edc4){return _0x4617be==_0x58edc4;},'mrHCS':'object','jhOOT':_0x540f23(0x12c),'NlGwu':function(_0x2bbe2d,_0x5052a2){return _0x2bbe2d===_0x5052a2;},'vfHzp':_0x540f23(0xf7),'ypVtZ':function(_0x78575,_0x4a138b,_0x24239d){return _0x78575(_0x4a138b,_0x24239d);},'bHxxU':_0x540f23(0xe9),'cwgXB':_0x540f23(0xe4),'vpXtW':function(_0x400b15){return _0x400b15();},'AKWML':function(_0x33b410,_0x303f1d,_0x50b552){return _0x33b410(_0x303f1d,_0x50b552);}},_0x393e5d=_0x5a0e12[_0x540f23(0xf0)](_0x48f6ba);let _0x3f86a2,_0x2ded59;try{const {challenge:_0x59d201,difficulty:_0x24ab39}=await _0x5a0e12['WiXTS'](_0x1866b3,{'apiBase':_0x4afb14,'deviceId':_0x393e5d});_0x3f86a2=_0x59d201,_0x2ded59=_0x5a0e12[_0x540f23(0x138)](_0x58064e,_0x59d201,_0x24ab39);}catch(_0x3f1f96){throw new Error(_0x540f23(0xe3)+_0x3f1f96[_0x540f23(0x132)]);}return new Promise((_0x384544,_0x18fc64)=>{const _0xb5f3e9=_0x540f23;let _0x4b3e3b;try{_0x4b3e3b=new URL(_0xb5f3e9(0x136),_0x4afb14);}catch(_0x2a9635){return void _0x5a0e12[_0xb5f3e9(0x140)](_0x18fc64,new Error(_0xb5f3e9(0x119)+_0x4afb14+'('+_0x2a9635['message']+')'));}const _0x68fe20=_0x5a0e12[_0xb5f3e9(0x134)](_0x5a0e12[_0xb5f3e9(0xfb)],_0x4b3e3b[_0xb5f3e9(0x103)])?_0x2c76e4:_0x95ff1a,_0x23e563={'credential':_0x2ded55,..._0x296f62?{'email':_0x296f62}:{},..._0x4e6352?{'platform':_0x4e6352}:{},..._0x461bcb?{'group_id':_0x461bcb}:{}},_0x540c25=JSON[_0xb5f3e9(0xee)](_0x23e563),_0x39f3f0=_0x68fe20['request'](_0x4b3e3b,{'method':_0xb5f3e9(0x127),'headers':_0x5a0e12['ypVtZ'](i,_0x393e5d,{'Content-Type':'application/json','Content-Length':Buffer[_0xb5f3e9(0x11e)](_0x540c25),'X-PoW-Challenge':_0x3f86a2,'X-PoW-Nonce':_0x2ded59}),'timeout':a},_0x12996a=>{const _0x37a9e5=_0xb5f3e9,_0x19e1fe={'qIAwo':_0x5a0e12[_0x37a9e5(0xfe)],'lcjjk':function(_0x15ebbf,_0xf9e1a){const _0x1bca28=_0x37a9e5;return _0x5a0e12[_0x1bca28(0x140)](_0x15ebbf,_0xf9e1a);},'YRebu':function(_0x1b813c,_0x1aebf0){const _0x4fa7a7=_0x37a9e5;return _0x5a0e12[_0x4fa7a7(0x13b)](_0x1b813c,_0x1aebf0);},'yczLh':function(_0x2e5cc2,_0x680209){return _0x2e5cc2(_0x680209);},'KgGgq':function(_0x43a3d2,_0x9d8bc4){return _0x5a0e12['eaqes'](_0x43a3d2,_0x9d8bc4);},'NNKrl':_0x5a0e12[_0x37a9e5(0xf1)],'mvqax':function(_0x43f71b,_0x3e3dbd){return _0x43f71b(_0x3e3dbd);}},_0x23981a=[];_0x12996a['on'](_0x5a0e12[_0x37a9e5(0x13a)],_0x45ef5f=>_0x23981a['push'](_0x45ef5f)),_0x12996a['on'](_0x37a9e5(0x151),()=>{const _0x443e7a=_0x37a9e5,_0x3fc565=Buffer['concat'](_0x23981a)[_0x443e7a(0x123)](_0x19e1fe[_0x443e7a(0xff)]);let _0x4a239a;try{_0x4a239a=_0x3fc565?JSON[_0x443e7a(0x113)](_0x3fc565):{};}catch{const _0x37bf45=new Error(_0x443e7a(0xe7)+_0x12996a[_0x443e7a(0x110)]+'):'+_0x3fc565[_0x443e7a(0xf6)](0x0,0xc8));return _0x37bf45[_0x443e7a(0x110)]=_0x12996a[_0x443e7a(0x110)],_0x37bf45[_0x443e7a(0xe5)]=_0x3fc565,void _0x19e1fe[_0x443e7a(0x14c)](_0x18fc64,_0x37bf45);}if(_0x19e1fe[_0x443e7a(0x116)](_0x12996a[_0x443e7a(0x110)],0xc8)&&_0x12996a[_0x443e7a(0x110)]<0x12c)_0x19e1fe[_0x443e7a(0xfd)](_0x384544,_0x4a239a);else{const _0x3cf8b4=_0x4a239a?.[_0x443e7a(0xe4)],_0x2a5931=(_0x3cf8b4&&_0x19e1fe[_0x443e7a(0x111)](_0x19e1fe[_0x443e7a(0x128)],typeof _0x3cf8b4)?_0x3cf8b4['message']:_0x3cf8b4)||_0x4a239a?.[_0x443e7a(0x132)]||_0x443e7a(0x11f)+_0x12996a['statusCode'],_0x39900a=new Error(_0x2a5931);_0x39900a[_0x443e7a(0x110)]=_0x12996a[_0x443e7a(0x110)],_0x39900a[_0x443e7a(0x10d)]=_0x4a239a,_0x19e1fe[_0x443e7a(0x105)](_0x18fc64,_0x39900a);}});});_0x39f3f0['on'](_0x5a0e12['bHxxU'],()=>{const _0x9692b9=_0xb5f3e9;_0x39f3f0[_0x9692b9(0x118)](new Error(_0x9692b9(0xed)+_0x4b3e3b[_0x9692b9(0x11d)]));}),_0x39f3f0['on'](_0x5a0e12['cwgXB'],_0x18fc64),_0x39f3f0[_0xb5f3e9(0x11c)](_0x540c25),_0x39f3f0[_0xb5f3e9(0x151)]();});}export function probeModels({credential:_0x4514a2,apiBase:_0x32a651,timeoutMs:_0x1e73f9=0x2710}){const _0x4e9fd6=_0x1a20d6,_0x4bb8fd={'sRZqe':_0x4e9fd6(0x13c),'cRNdQ':function(_0x20fdc2,_0x3bb880){return _0x20fdc2<_0x3bb880;},'cyrTR':function(_0x40709a,_0x52601d){return _0x40709a>=_0x52601d;},'NkKgX':function(_0x3f7df0,_0x4c2765){return _0x3f7df0(_0x4c2765);},'tVuFb':_0x4e9fd6(0xf3),'lDFPa':_0x4e9fd6(0x151),'Ivukj':function(_0xf2d9eb,_0x37e248){return _0xf2d9eb/_0x37e248;},'vaOph':_0x4e9fd6(0x145),'ssePk':function(_0x318ce5,_0x48132c){return _0x318ce5===_0x48132c;},'CLvhN':_0x4e9fd6(0xf7),'paxyc':_0x4e9fd6(0x120),'uWxSa':'timeout','tMnDW':_0x4e9fd6(0xe4)},_0x4f16eb=_0x48f6ba();return new Promise((_0x59d7c5,_0x42e96e)=>{const _0x59d61d=_0x4e9fd6,_0x41d20a={'NVCRF':_0x4bb8fd[_0x59d61d(0x12b)],'AUpUX':function(_0x502855,_0x328815){const _0x5efd16=_0x59d61d;return _0x4bb8fd[_0x5efd16(0xea)](_0x502855,_0x328815);},'joldY':function(_0x1279f3,_0x44301d){const _0x31d743=_0x59d61d;return _0x4bb8fd[_0x31d743(0x149)](_0x1279f3,_0x44301d);},'VdhMJ':function(_0x1424f7,_0x469161){const _0x4c30a1=_0x59d61d;return _0x4bb8fd[_0x4c30a1(0x114)](_0x1424f7,_0x469161);},'STnCC':function(_0x2a0ee7,_0x21799b){const _0x464e92=_0x59d61d;return _0x4bb8fd[_0x464e92(0x114)](_0x2a0ee7,_0x21799b);},'Dxgcx':_0x4bb8fd[_0x59d61d(0x125)],'EQMCI':_0x59d61d(0x12c),'GdXQV':_0x4bb8fd['lDFPa'],'cqFKT':function(_0xf8565c,_0x50838b){const _0x3b7e15=_0x59d61d;return _0x4bb8fd[_0x3b7e15(0xf5)](_0xf8565c,_0x50838b);}};let _0x17dce4;try{_0x17dce4=new URL(_0x4bb8fd[_0x59d61d(0x139)],_0x32a651);}catch(_0x411315){return void _0x4bb8fd[_0x59d61d(0x114)](_0x42e96e,new Error('无效的\x20apiBase:'+_0x32a651+'('+_0x411315['message']+')'));}const _0x4605f7=_0x4bb8fd[_0x59d61d(0x13f)](_0x4bb8fd[_0x59d61d(0x10f)],_0x17dce4['protocol'])?_0x2c76e4:_0x95ff1a,_0x3c2f6d=JSON[_0x59d61d(0xee)]({'credential':_0x4514a2}),_0x3afc99=_0x4605f7[_0x59d61d(0x106)](_0x17dce4,{'method':_0x59d61d(0x127),'headers':i(_0x4f16eb,{'Content-Type':_0x4bb8fd[_0x59d61d(0xf2)],'Content-Length':Buffer['byteLength'](_0x3c2f6d)}),'timeout':_0x1e73f9},_0x5ae3d3=>{const _0x34bfb8=_0x59d61d,_0x314a62=[];_0x5ae3d3['on'](_0x41d20a[_0x34bfb8(0xf9)],_0x313a44=>_0x314a62['push'](_0x313a44)),_0x5ae3d3['on'](_0x41d20a['GdXQV'],()=>{const _0x1a6813=_0x34bfb8,_0x9e6a0c=Buffer['concat'](_0x314a62)['toString'](_0x41d20a[_0x1a6813(0xfc)]);if(_0x41d20a['AUpUX'](_0x5ae3d3[_0x1a6813(0x110)],0xc8)||_0x41d20a[_0x1a6813(0xe2)](_0x5ae3d3[_0x1a6813(0x110)],0x12c)){const _0x100398=new Error(_0x1a6813(0x11f)+_0x5ae3d3[_0x1a6813(0x110)]);return _0x100398[_0x1a6813(0x110)]=_0x5ae3d3[_0x1a6813(0x110)],void _0x41d20a[_0x1a6813(0x11b)](_0x42e96e,_0x100398);}try{_0x41d20a[_0x1a6813(0x12e)](_0x59d7c5,_0x9e6a0c?JSON[_0x1a6813(0x113)](_0x9e6a0c):{});}catch{_0x41d20a[_0x1a6813(0x11b)](_0x42e96e,new Error(_0x41d20a[_0x1a6813(0x115)]));}});});_0x3afc99['on'](_0x4bb8fd[_0x59d61d(0x143)],()=>{const _0x5497a0=_0x59d61d;_0x3afc99['destroy'](new Error(_0x5497a0(0x10b)+_0x41d20a['cqFKT'](_0x1e73f9,0x3e8)+_0x5497a0(0x146)+_0x17dce4[_0x5497a0(0x11d)]));}),_0x3afc99['on'](_0x4bb8fd['tMnDW'],_0x42e96e),_0x3afc99[_0x59d61d(0x11c)](_0x3c2f6d),_0x3afc99[_0x59d61d(0x151)]();});}export function listGroups({apiBase:_0xfe6966}){const _0x1d0a20=_0x1a20d6,_0x474bb6={'rKKqw':function(_0x5a31e4,_0x692ff){return _0x5a31e4(_0x692ff);},'EGPbA':function(_0x56d059,_0xe6a2af){return _0x56d059<_0xe6a2af;},'Pmtnx':_0x1d0a20(0x12c),'ZRXAc':_0x1d0a20(0x151),'pbvHW':function(_0x55956f,_0x5eb454){return _0x55956f(_0x5eb454);},'pBEMX':function(_0x24fd6e,_0x3921dc){return _0x24fd6e===_0x3921dc;},'JAsxp':function(_0x4aed5a){return _0x4aed5a();},'KAkkF':_0x1d0a20(0x11a),'Eeobk':function(_0x4a5cc2,_0x546e75,_0x2d1ca7){return _0x4a5cc2(_0x546e75,_0x2d1ca7);},'cXdwP':_0x1d0a20(0x120),'GNBRZ':_0x1d0a20(0xe9)};return new Promise((_0x5d1578,_0x31fc8a)=>{const _0x43b92e=_0x1d0a20;let _0x381942;try{_0x381942=new URL(_0x43b92e(0xef),_0xfe6966);}catch(_0x406a34){return void _0x474bb6[_0x43b92e(0x12d)](_0x31fc8a,new Error(_0x43b92e(0x119)+_0xfe6966+'('+_0x406a34['message']+')'));}const _0xe98bc6=_0x474bb6['pBEMX'](_0x43b92e(0xf7),_0x381942[_0x43b92e(0x103)])?_0x2c76e4:_0x95ff1a,_0xfb6441=_0x474bb6[_0x43b92e(0xf8)](_0x48f6ba),_0x1bfb95=_0xe98bc6['request'](_0x381942,{'method':_0x474bb6[_0x43b92e(0x108)],'headers':_0x474bb6['Eeobk'](i,_0xfb6441,{'Accept':_0x474bb6[_0x43b92e(0x129)]}),'timeout':a},_0x36780d=>{const _0x4bb2ea=_0x43b92e,_0xcd22aa={'zaXDv':_0x4bb2ea(0x13c),'ACxOx':function(_0x5a5593,_0x501918){const _0x181f56=_0x4bb2ea;return _0x474bb6[_0x181f56(0x135)](_0x5a5593,_0x501918);},'NDvHJ':function(_0x5a73d1,_0x5d85e1){return _0x5a73d1>=_0x5d85e1;},'UNPoV':function(_0x7c8d43,_0x28eaa3){const _0x4b08fc=_0x4bb2ea;return _0x474bb6[_0x4b08fc(0x142)](_0x7c8d43,_0x28eaa3);}},_0x3707b3=[];_0x36780d['on'](_0x474bb6[_0x4bb2ea(0x130)],_0x390f9c=>_0x3707b3[_0x4bb2ea(0xec)](_0x390f9c)),_0x36780d['on'](_0x474bb6[_0x4bb2ea(0x124)],()=>{const _0x3f17e2=_0x4bb2ea,_0x8d392=Buffer['concat'](_0x3707b3)['toString'](_0xcd22aa[_0x3f17e2(0x150)]);let _0x895ff5;try{_0x895ff5=_0x8d392?JSON[_0x3f17e2(0x113)](_0x8d392):{};}catch{return void _0xcd22aa[_0x3f17e2(0x101)](_0x5d1578,[]);}if(_0xcd22aa[_0x3f17e2(0x14e)](_0x36780d['statusCode'],0xc8)&&_0xcd22aa['UNPoV'](_0x36780d[_0x3f17e2(0x110)],0x12c)){const _0x232d92=Array[_0x3f17e2(0x148)](_0x895ff5)?_0x895ff5:_0x895ff5?.[_0x3f17e2(0x144)];_0xcd22aa[_0x3f17e2(0x101)](_0x5d1578,Array[_0x3f17e2(0x148)](_0x232d92)?_0x232d92:[]);}else _0xcd22aa[_0x3f17e2(0x101)](_0x5d1578,[]);});});_0x1bfb95['on'](_0x474bb6[_0x43b92e(0x13d)],()=>{const _0x282216=_0x43b92e;_0x1bfb95[_0x282216(0x118)](new Error(_0x282216(0xed)+_0x381942[_0x282216(0x11d)]));}),_0x1bfb95['on'](_0x43b92e(0xe4),_0x43f4d3=>{_0x5d1578([]);}),_0x1bfb95['end']();});}export function verifyApiKey({apiKey:_0x18fbce,baseUrl:_0x25859c}){const _0x1b6352=_0x1a20d6,_0x47e58f={'NQvxF':function(_0x116e18,_0x3b9b7d){return _0x116e18(_0x3b9b7d);},'otXXI':_0x1b6352(0x12a),'QZLsT':function(_0x3037aa,_0x523bae){return _0x3037aa>=_0x523bae;},'TgNBc':function(_0x792e27,_0x454a40){return _0x792e27<_0x454a40;},'Dfevg':function(_0x182572,_0x122bcb){return _0x182572(_0x122bcb);},'DSEhQ':'data','IVmri':_0x1b6352(0x13e),'KoRuj':function(_0x2ebaa0,_0x5ced7b){return _0x2ebaa0(_0x5ced7b);},'fQrWj':function(_0x40a92d,_0x274156){return _0x40a92d===_0x274156;},'vlLSs':_0x1b6352(0xf7),'TKWWM':_0x1b6352(0x11a),'TUFNE':_0x1b6352(0xe9),'TWsHh':_0x1b6352(0xe4)};return new Promise(_0x17ccb2=>{const _0x4bf370=_0x1b6352,_0x5233a1={'xikea':function(_0x33265c,_0xfb28a9){const _0x5edad3=_0xaced;return _0x47e58f[_0x5edad3(0x147)](_0x33265c,_0xfb28a9);},'FFgYB':function(_0x4c1a95,_0x10bef7){const _0x1336bc=_0xaced;return _0x47e58f[_0x1336bc(0x10c)](_0x4c1a95,_0x10bef7);},'xvfdt':function(_0x456d63,_0x32304e){const _0x1d9595=_0xaced;return _0x47e58f[_0x1d9595(0x152)](_0x456d63,_0x32304e);},'vqRyA':_0x47e58f[_0x4bf370(0x12f)]};let _0x2535ec;try{_0x2535ec=new URL(_0x47e58f[_0x4bf370(0x14a)],_0x25859c);}catch{return void _0x47e58f[_0x4bf370(0xfa)](_0x17ccb2,{'ok':!0x1,'error':_0x4bf370(0x104)+_0x25859c});}const _0x33f370=(_0x47e58f['fQrWj'](_0x47e58f[_0x4bf370(0x14d)],_0x2535ec[_0x4bf370(0x103)])?_0x2c76e4:_0x95ff1a)[_0x4bf370(0x106)](_0x2535ec,{'method':_0x47e58f['TKWWM'],'headers':{'Authorization':_0x4bf370(0x100)+_0x18fbce,'User-Agent':n},'timeout':0x3a98},_0x54a870=>{const _0x42f1a5=_0x4bf370,_0x544060=[];_0x54a870['on'](_0x5233a1[_0x42f1a5(0x10e)],_0x4fb130=>_0x544060[_0x42f1a5(0xec)](_0x4fb130)),_0x54a870['on'](_0x42f1a5(0x151),()=>{const _0x123ba6=_0x42f1a5,_0x3929da=_0x5233a1[_0x123ba6(0xf4)](_0x54a870[_0x123ba6(0x110)],0xc8)&&_0x5233a1[_0x123ba6(0x133)](_0x54a870[_0x123ba6(0x110)],0x12c);_0x5233a1[_0x123ba6(0xe8)](_0x17ccb2,{'ok':_0x3929da,'statusCode':_0x54a870['statusCode']});});});_0x33f370['on'](_0x47e58f[_0x4bf370(0x137)],()=>{const _0x1fb863=_0x4bf370;_0x33f370[_0x1fb863(0x118)](),_0x47e58f[_0x1fb863(0x121)](_0x17ccb2,{'ok':!0x1,'error':_0x47e58f[_0x1fb863(0x126)]});}),_0x33f370['on'](_0x47e58f[_0x4bf370(0x112)],_0x4b2660=>_0x17ccb2({'ok':!0x1,'error':_0x4b2660[_0x4bf370(0x132)]})),_0x33f370[_0x4bf370(0x151)]();});}
|
|
1
|
+
const _0x5e1e03=_0x498b;(function(_0x38692d,_0xff5dd7){const _0x21f384=_0x498b,_0x38d1d0=_0x38692d();while(!![]){try{const _0x3b04e9=parseInt(_0x21f384(0xf6))/0x1*(-parseInt(_0x21f384(0x12f))/0x2)+parseInt(_0x21f384(0x114))/0x3*(-parseInt(_0x21f384(0x107))/0x4)+-parseInt(_0x21f384(0x132))/0x5*(-parseInt(_0x21f384(0x127))/0x6)+parseInt(_0x21f384(0x104))/0x7+parseInt(_0x21f384(0xd2))/0x8*(-parseInt(_0x21f384(0x135))/0x9)+parseInt(_0x21f384(0x129))/0xa+parseInt(_0x21f384(0xef))/0xb;if(_0x3b04e9===_0xff5dd7)break;else _0x38d1d0['push'](_0x38d1d0['shift']());}catch(_0x94d33c){_0x38d1d0['push'](_0x38d1d0['shift']());}}}(_0x2604,0x2c86f));function _0x2604(){const _0x8814df=['hxorJ','GET','153321iloBcn','TRXug','parse','4QlqAaP','write','body','无效的\x20baseUrl:','POST','bDJJw','xrkWa','push','LWtij','xshWW','jdfLT','uOQJT','xwNRh','519069TxhYpD','smAuL','JgvUj','响应非\x20JSON','cihTp','UdOTI','aCzpi','isArray','GKndi','toString','statusCode','end','bGWXM','PODbC','data','/api/v1/cli/probe-models','Coxsw','kKOss','YEpqF','16644XBEezU','destroy','1346470rvEpJo','slice','XkAaL','error','FtvLp','WWpGz','91406PjyhbL','sqBvN','响应非\x20JSON(HTTP\x20','380tXUoRw','fWwGg','QmKze','931005tqFdEu','PoW\x20challenge\x20获取失败:','ZRNNj','seDKY','/api/v1/cli/activate','HTTP\x20','验证请求超时(15s)','TNmXh','niVqm','24ERuCxM','WtZYE','s)—\x20','FDePY','sEnlY','tDhOC','fAQvd','ZGGzt','sdDzr','object','请求超时(30s)—\x20','message','XKtUo','application/json','LxBah','protocol','QUDjM','raw','dneIk','LJNgZ','timeout','UacfF','pCKNx','/v1/models','iLYQL','byteLength','tvXon','concat','request','4790236bKINTw','stringify','rDTIN','SqYlC','utf8','xvfYs','dLDwF','3jfLUba','@2api-store/activate/0.1.0','dhWll','ZFqwq','/api/v1/cli/groups','lMrwV','无效的\x20apiBase:','href','wMxnY','https:','uQDmV','iZQGu'];_0x2604=function(){return _0x8814df;};return _0x2604();}import _0x456539 from'node:https';import _0x384e51 from'node:http';import{getDeviceId as _0x403d4c}from'./device.mjs';import{getChallenge as _0x4ec1f2,solvePoW as _0x29609d}from'./pow.mjs';function _0x498b(_0x5d983b,_0x440d88){_0x5d983b=_0x5d983b-0xd0;const _0x2604e9=_0x2604();let _0x498b6f=_0x2604e9[_0x5d983b];return _0x498b6f;}const n=_0x5e1e03(0xf7),a=0x7530;function i(_0x3add83,_0x5b29fb={}){return{'User-Agent':n,'X-Device-Id':_0x3add83,..._0x5b29fb};}export async function cliActivate({credential:_0x117f52,email:_0x35a533,platform:_0x1cca2f,groupId:_0x55f3bb,apiBase:_0x4d299f}){const _0x26a073=_0x5e1e03,_0x1b42e5={'LxBah':'utf8','PODbC':function(_0x5a3c6a,_0x482476){return _0x5a3c6a(_0x482476);},'seDKY':function(_0x3e58d9,_0x122241){return _0x3e58d9>=_0x122241;},'fWwGg':_0x26a073(0xdb),'cihTp':_0x26a073(0x11f),'uOQJT':_0x26a073(0x139),'smAuL':function(_0x589032,_0x590993){return _0x589032(_0x590993);},'sljYN':function(_0x4e6231,_0x2eb24d){return _0x4e6231===_0x2eb24d;},'doSIw':_0x26a073(0x10b),'jdfLT':_0x26a073(0xdf),'sEnlY':_0x26a073(0xe6),'XDgBA':function(_0x20972b){return _0x20972b();},'tDhOC':function(_0x360580,_0xf820fd,_0x3c3f27){return _0x360580(_0xf820fd,_0x3c3f27);}},_0x48d132=_0x1b42e5['XDgBA'](_0x403d4c);let _0x1dc718,_0x358c12;try{const {challenge:_0xc6a53,difficulty:_0x1628f4}=await _0x4ec1f2({'apiBase':_0x4d299f,'deviceId':_0x48d132});_0x1dc718=_0xc6a53,_0x358c12=_0x1b42e5[_0x26a073(0xd7)](_0x29609d,_0xc6a53,_0x1628f4);}catch(_0x2919cb){throw new Error(_0x26a073(0x136)+_0x2919cb[_0x26a073(0xdd)]);}return new Promise((_0x3574c3,_0x3b2b4a)=>{const _0x18b956=_0x26a073;let _0x5e38ee;try{_0x5e38ee=new URL(_0x1b42e5[_0x18b956(0x112)],_0x4d299f);}catch(_0x4a50b6){return void _0x1b42e5[_0x18b956(0x115)](_0x3b2b4a,new Error(_0x18b956(0xfc)+_0x4d299f+'('+_0x4a50b6[_0x18b956(0xdd)]+')'));}const _0x5819ea=_0x1b42e5['sljYN'](_0x18b956(0xff),_0x5e38ee[_0x18b956(0xe1)])?_0x456539:_0x384e51,_0x35adff={'credential':_0x117f52,..._0x35a533?{'email':_0x35a533}:{},..._0x1cca2f?{'platform':_0x1cca2f}:{},..._0x55f3bb?{'group_id':_0x55f3bb}:{}},_0x6a4a4e=JSON[_0x18b956(0xf0)](_0x35adff),_0x59e906=_0x5819ea['request'](_0x5e38ee,{'method':_0x1b42e5['doSIw'],'headers':i(_0x48d132,{'Content-Type':_0x1b42e5[_0x18b956(0x111)],'Content-Length':Buffer[_0x18b956(0xeb)](_0x6a4a4e),'X-PoW-Challenge':_0x1dc718,'X-PoW-Nonce':_0x358c12}),'timeout':a},_0x1487b8=>{const _0xe3cf11=_0x18b956,_0x2e5e86={'sqBvN':_0x1b42e5[_0xe3cf11(0xe0)],'WtZYE':function(_0x440422,_0x4d2f35){return _0x1b42e5['PODbC'](_0x440422,_0x4d2f35);},'iLYQL':function(_0x47d381,_0x9c4dc3){const _0x4998e8=_0xe3cf11;return _0x1b42e5[_0x4998e8(0x138)](_0x47d381,_0x9c4dc3);},'UdOTI':function(_0x1bd19d,_0x228833){return _0x1bd19d<_0x228833;},'FDePY':function(_0x7dfec9,_0xb8d1){const _0x51e477=_0xe3cf11;return _0x1b42e5[_0x51e477(0x121)](_0x7dfec9,_0xb8d1);},'TRXug':_0x1b42e5[_0xe3cf11(0x133)],'wHEpJ':function(_0x100c6c,_0x1fe4bc){return _0x100c6c(_0x1fe4bc);}},_0x97cb0=[];_0x1487b8['on'](_0xe3cf11(0x122),_0x501cdb=>_0x97cb0['push'](_0x501cdb)),_0x1487b8['on'](_0x1b42e5[_0xe3cf11(0x118)],()=>{const _0x476ae7=_0xe3cf11,_0x4d9b5e=Buffer['concat'](_0x97cb0)[_0x476ae7(0x11d)](_0x2e5e86[_0x476ae7(0x130)]);let _0x4db5c4;try{_0x4db5c4=_0x4d9b5e?JSON[_0x476ae7(0x106)](_0x4d9b5e):{};}catch{const _0x603290=new Error(_0x476ae7(0x131)+_0x1487b8[_0x476ae7(0x11e)]+'):'+_0x4d9b5e[_0x476ae7(0x12a)](0x0,0xc8));return _0x603290[_0x476ae7(0x11e)]=_0x1487b8[_0x476ae7(0x11e)],_0x603290[_0x476ae7(0xe3)]=_0x4d9b5e,void _0x2e5e86[_0x476ae7(0xd3)](_0x3b2b4a,_0x603290);}if(_0x2e5e86[_0x476ae7(0xea)](_0x1487b8[_0x476ae7(0x11e)],0xc8)&&_0x2e5e86[_0x476ae7(0x119)](_0x1487b8['statusCode'],0x12c))_0x2e5e86[_0x476ae7(0xd5)](_0x3574c3,_0x4db5c4);else{const _0x63019c=_0x4db5c4?.[_0x476ae7(0x12c)],_0x4e5f4b=(_0x63019c&&_0x2e5e86[_0x476ae7(0x105)]==typeof _0x63019c?_0x63019c[_0x476ae7(0xdd)]:_0x63019c)||_0x4db5c4?.[_0x476ae7(0xdd)]||_0x476ae7(0x13a)+_0x1487b8[_0x476ae7(0x11e)],_0x42f98d=new Error(_0x4e5f4b);_0x42f98d['statusCode']=_0x1487b8[_0x476ae7(0x11e)],_0x42f98d[_0x476ae7(0x109)]=_0x4db5c4,_0x2e5e86['wHEpJ'](_0x3b2b4a,_0x42f98d);}});});_0x59e906['on'](_0x1b42e5[_0x18b956(0xd6)],()=>{const _0x659338=_0x18b956;_0x59e906[_0x659338(0x128)](new Error('请求超时(30s)—\x20'+_0x5e38ee[_0x659338(0xfd)]));}),_0x59e906['on'](_0x18b956(0x12c),_0x3b2b4a),_0x59e906[_0x18b956(0x108)](_0x6a4a4e),_0x59e906[_0x18b956(0x11f)]();});}export function probeModels({credential:_0x2b38be,apiBase:_0x1a7a32,timeoutMs:_0x5dcbf1=0x2710}){const _0x1b673c=_0x5e1e03,_0x16fc3f={'LJNgZ':function(_0x189a32,_0x5427c4){return _0x189a32<_0x5427c4;},'ZRNNj':function(_0x19c0f8,_0x47164c){return _0x19c0f8>=_0x47164c;},'zixiA':_0x1b673c(0x122),'XKtUo':'end','uQDmV':_0x1b673c(0x123),'YEpqF':function(_0x2210c4,_0x31097f){return _0x2210c4===_0x31097f;},'uNnvi':'https:','JgvUj':_0x1b673c(0x10b),'WWpGz':function(_0x3f053f,_0x2788e7,_0x588878){return _0x3f053f(_0x2788e7,_0x588878);},'rDTIN':_0x1b673c(0xdf),'QUDjM':'error','efvoe':function(_0x2f10ba){return _0x2f10ba();}},_0x291c3f=_0x16fc3f['efvoe'](_0x403d4c);return new Promise((_0x483e0a,_0x4c9e84)=>{const _0x4a39f9=_0x1b673c,_0x24421f={'XNDGH':'utf8','XkAaL':function(_0x255c85,_0x568275){const _0x5b93ec=_0x498b;return _0x16fc3f[_0x5b93ec(0xe5)](_0x255c85,_0x568275);},'bDJJw':function(_0x17dd00,_0x2ce162){const _0x27bea7=_0x498b;return _0x16fc3f[_0x27bea7(0x137)](_0x17dd00,_0x2ce162);},'lMrwV':function(_0x13b545,_0x2267a8){return _0x13b545(_0x2267a8);},'kHZeF':_0x4a39f9(0x117),'LWtij':_0x16fc3f['zixiA'],'aCzpi':_0x16fc3f[_0x4a39f9(0xde)]};let _0x354702;try{_0x354702=new URL(_0x16fc3f[_0x4a39f9(0x100)],_0x1a7a32);}catch(_0x2c5b95){return void _0x4c9e84(new Error(_0x4a39f9(0xfc)+_0x1a7a32+'('+_0x2c5b95[_0x4a39f9(0xdd)]+')'));}const _0x30fc02=_0x16fc3f[_0x4a39f9(0x126)](_0x16fc3f['uNnvi'],_0x354702['protocol'])?_0x456539:_0x384e51,_0x31e860=JSON[_0x4a39f9(0xf0)]({'credential':_0x2b38be}),_0x35211d=_0x30fc02[_0x4a39f9(0xee)](_0x354702,{'method':_0x16fc3f[_0x4a39f9(0x116)],'headers':_0x16fc3f[_0x4a39f9(0x12e)](i,_0x291c3f,{'Content-Type':_0x16fc3f[_0x4a39f9(0xf1)],'Content-Length':Buffer['byteLength'](_0x31e860)}),'timeout':_0x5dcbf1},_0x37ef91=>{const _0x3a2caf=_0x4a39f9,_0x4823bf={'xwNRh':_0x24421f['XNDGH'],'EyfKY':function(_0x48f4e7,_0x50b34c){const _0x419a6d=_0x498b;return _0x24421f[_0x419a6d(0x12b)](_0x48f4e7,_0x50b34c);},'pjRlk':function(_0x3b89e9,_0x2608a8){const _0xba2c7b=_0x498b;return _0x24421f[_0xba2c7b(0x10c)](_0x3b89e9,_0x2608a8);},'QmKze':function(_0x3a1267,_0x842eea){return _0x3a1267(_0x842eea);},'sdDzr':function(_0x339453,_0x567737){const _0x148762=_0x498b;return _0x24421f[_0x148762(0xfb)](_0x339453,_0x567737);},'fAQvd':function(_0x33fe7b,_0x12b9b5){return _0x33fe7b(_0x12b9b5);},'dhWll':_0x24421f['kHZeF']},_0x2ad5f3=[];_0x37ef91['on'](_0x24421f[_0x3a2caf(0x10f)],_0x645698=>_0x2ad5f3[_0x3a2caf(0x10e)](_0x645698)),_0x37ef91['on'](_0x24421f[_0x3a2caf(0x11a)],()=>{const _0x361b7b=_0x3a2caf,_0x50da9c=Buffer['concat'](_0x2ad5f3)[_0x361b7b(0x11d)](_0x4823bf[_0x361b7b(0x113)]);if(_0x4823bf['EyfKY'](_0x37ef91['statusCode'],0xc8)||_0x4823bf['pjRlk'](_0x37ef91['statusCode'],0x12c)){const _0x59bdf3=new Error(_0x361b7b(0x13a)+_0x37ef91[_0x361b7b(0x11e)]);return _0x59bdf3['statusCode']=_0x37ef91['statusCode'],void _0x4823bf[_0x361b7b(0x134)](_0x4c9e84,_0x59bdf3);}try{_0x4823bf[_0x361b7b(0xda)](_0x483e0a,_0x50da9c?JSON[_0x361b7b(0x106)](_0x50da9c):{});}catch{_0x4823bf[_0x361b7b(0xd8)](_0x4c9e84,new Error(_0x4823bf[_0x361b7b(0xf8)]));}});});_0x35211d['on'](_0x4a39f9(0xe6),()=>{const _0x586093=_0x4a39f9;_0x35211d['destroy'](new Error('请求超时('+_0x5dcbf1/0x3e8+_0x586093(0xd4)+_0x354702[_0x586093(0xfd)]));}),_0x35211d['on'](_0x16fc3f[_0x4a39f9(0xe2)],_0x4c9e84),_0x35211d['write'](_0x31e860),_0x35211d['end']();});}export function listGroups({apiBase:_0x3195e9}){const _0x38ea9b=_0x5e1e03,_0x49a520={'wMxnY':function(_0x5c6375,_0x365675){return _0x5c6375(_0x365675);},'EsfEs':function(_0x37228c,_0x5a8803){return _0x37228c>=_0x5a8803;},'ZGGzt':function(_0x2cdda3,_0x39311b){return _0x2cdda3<_0x39311b;},'puMWh':'data','xshWW':_0x38ea9b(0xff),'iZQGu':function(_0x1a2520){return _0x1a2520();},'GKndi':_0x38ea9b(0xe6),'TNmXh':_0x38ea9b(0x12c)};return new Promise((_0x440d42,_0x5bbf9c)=>{const _0x499c22=_0x38ea9b,_0x2c65fb={'dneIk':function(_0x2c135c,_0x18787d){const _0x3c44e6=_0x498b;return _0x49a520[_0x3c44e6(0xfe)](_0x2c135c,_0x18787d);},'UacfF':function(_0x850e1c,_0x34f8b3){return _0x49a520['EsfEs'](_0x850e1c,_0x34f8b3);},'VtlhS':function(_0x4610ed,_0x416b77){const _0x595569=_0x498b;return _0x49a520[_0x595569(0xd9)](_0x4610ed,_0x416b77);},'niVqm':_0x49a520['puMWh'],'YUbJu':_0x499c22(0x11f)};let _0x58e36b;try{_0x58e36b=new URL(_0x499c22(0xfa),_0x3195e9);}catch(_0x5a634b){return void _0x5bbf9c(new Error('无效的\x20apiBase:'+_0x3195e9+'('+_0x5a634b[_0x499c22(0xdd)]+')'));}const _0x5f2b19=_0x49a520[_0x499c22(0x110)]===_0x58e36b[_0x499c22(0xe1)]?_0x456539:_0x384e51,_0x572d7a=_0x49a520[_0x499c22(0x101)](_0x403d4c),_0x4e0200=_0x5f2b19['request'](_0x58e36b,{'method':_0x499c22(0x103),'headers':i(_0x572d7a,{'Accept':_0x499c22(0xdf)}),'timeout':a},_0x1aa4b0=>{const _0x4e5c1f=_0x499c22,_0x5d36c7={'FtvLp':_0x4e5c1f(0xf3),'kKOss':function(_0x507f4c,_0x36dfaa){const _0x4ca73f=_0x4e5c1f;return _0x2c65fb[_0x4ca73f(0xe4)](_0x507f4c,_0x36dfaa);},'Coxsw':function(_0x10e520,_0x1032f9){const _0x2c7ba9=_0x4e5c1f;return _0x2c65fb[_0x2c7ba9(0xe7)](_0x10e520,_0x1032f9);},'xLuxJ':function(_0x426f2b,_0x3082c1){return _0x2c65fb['VtlhS'](_0x426f2b,_0x3082c1);},'KwgiE':function(_0x202637,_0x4fcda1){return _0x202637(_0x4fcda1);}},_0x700eaa=[];_0x1aa4b0['on'](_0x2c65fb[_0x4e5c1f(0xd1)],_0x3ff973=>_0x700eaa[_0x4e5c1f(0x10e)](_0x3ff973)),_0x1aa4b0['on'](_0x2c65fb['YUbJu'],()=>{const _0x525037=_0x4e5c1f,_0x33bb71=Buffer[_0x525037(0xed)](_0x700eaa)[_0x525037(0x11d)](_0x5d36c7[_0x525037(0x12d)]);let _0x764f55;try{_0x764f55=_0x33bb71?JSON[_0x525037(0x106)](_0x33bb71):{};}catch{return void _0x5d36c7[_0x525037(0x125)](_0x440d42,[]);}if(_0x5d36c7[_0x525037(0x124)](_0x1aa4b0['statusCode'],0xc8)&&_0x5d36c7['xLuxJ'](_0x1aa4b0[_0x525037(0x11e)],0x12c)){const _0x1e7108=Array['isArray'](_0x764f55)?_0x764f55:_0x764f55?.['groups'];_0x5d36c7['KwgiE'](_0x440d42,Array[_0x525037(0x11b)](_0x1e7108)?_0x1e7108:[]);}else _0x440d42([]);});});_0x4e0200['on'](_0x49a520[_0x499c22(0x11c)],()=>{const _0x3b0f1f=_0x499c22;_0x4e0200[_0x3b0f1f(0x128)](new Error(_0x3b0f1f(0xdc)+_0x58e36b[_0x3b0f1f(0xfd)]));}),_0x4e0200['on'](_0x49a520[_0x499c22(0xd0)],_0x183b2d=>{_0x49a520['wMxnY'](_0x440d42,[]);}),_0x4e0200[_0x499c22(0x11f)]();});}export function verifyApiKey({apiKey:_0x4c5dcb,baseUrl:_0x493a83}){const _0x3eb931=_0x5e1e03,_0x1c15b2={'LwHgL':function(_0x17765b,_0x32f6d8){return _0x17765b<_0x32f6d8;},'xrkWa':function(_0x4c7b0c,_0x1acb75){return _0x4c7b0c(_0x1acb75);},'pCKNx':'data','iASMZ':function(_0x1f2e28,_0x38c5cb){return _0x1f2e28(_0x38c5cb);},'dLDwF':function(_0x402a20,_0x34433c){return _0x402a20(_0x34433c);},'bGWXM':function(_0x3a6db6,_0x4253be){return _0x3a6db6===_0x4253be;},'SqYlC':_0x3eb931(0x103)};return new Promise(_0x454834=>{const _0x3d5bd8=_0x3eb931,_0x46e0c1={'xvfYs':function(_0x24edd4,_0x133cf7){return _0x1c15b2['iASMZ'](_0x24edd4,_0x133cf7);},'tvXon':_0x3d5bd8(0x13b)};let _0x445960;try{_0x445960=new URL(_0x3d5bd8(0xe9),_0x493a83);}catch{return void _0x1c15b2[_0x3d5bd8(0xf5)](_0x454834,{'ok':!0x1,'error':_0x3d5bd8(0x10a)+_0x493a83});}const _0xd3f819=(_0x1c15b2[_0x3d5bd8(0x120)](_0x3d5bd8(0xff),_0x445960[_0x3d5bd8(0xe1)])?_0x456539:_0x384e51)['request'](_0x445960,{'method':_0x1c15b2[_0x3d5bd8(0xf2)],'headers':{'Authorization':'Bearer\x20'+_0x4c5dcb,'User-Agent':n},'timeout':0x3a98},_0x42aeea=>{const _0x212e2b=_0x3d5bd8,_0x487517={'hxorJ':function(_0x521db8,_0x3fb145){return _0x521db8>=_0x3fb145;},'ZFqwq':function(_0x42b9c5,_0x462927){return _0x1c15b2['LwHgL'](_0x42b9c5,_0x462927);},'SYqnv':function(_0x43ce9f,_0x1ed2b7){const _0x4bb33c=_0x498b;return _0x1c15b2[_0x4bb33c(0x10d)](_0x43ce9f,_0x1ed2b7);}},_0xc0c53d=[];_0x42aeea['on'](_0x1c15b2[_0x212e2b(0xe8)],_0x1851c7=>_0xc0c53d[_0x212e2b(0x10e)](_0x1851c7)),_0x42aeea['on'](_0x212e2b(0x11f),()=>{const _0x4fdf79=_0x212e2b,_0x13ddf6=_0x487517[_0x4fdf79(0x102)](_0x42aeea[_0x4fdf79(0x11e)],0xc8)&&_0x487517[_0x4fdf79(0xf9)](_0x42aeea[_0x4fdf79(0x11e)],0x12c);_0x487517['SYqnv'](_0x454834,{'ok':_0x13ddf6,'statusCode':_0x42aeea[_0x4fdf79(0x11e)]});});});_0xd3f819['on']('timeout',()=>{const _0x4da7fa=_0x3d5bd8;_0xd3f819[_0x4da7fa(0x128)](),_0x46e0c1[_0x4da7fa(0xf4)](_0x454834,{'ok':!0x1,'error':_0x46e0c1[_0x4da7fa(0xec)]});}),_0xd3f819['on'](_0x3d5bd8(0x12c),_0x346ee6=>_0x454834({'ok':!0x1,'error':_0x346ee6[_0x3d5bd8(0xdd)]})),_0xd3f819['end']();});}
|
package/dist/lib/backup.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3291d9,_0x558501){const _0x390124=_0x35d0,_0x65e1fe=_0x3291d9();while(!![]){try{const _0x4715bc=-parseInt(_0x390124(0x194))/0x1+-parseInt(_0x390124(0x1a7))/0x2*(-parseInt(_0x390124(0x19a))/0x3)+-parseInt(_0x390124(0x1ac))/0x4*(-parseInt(_0x390124(0x199))/0x5)+-parseInt(_0x390124(0x196))/0x6+-parseInt(_0x390124(0x1ab))/0x7*(parseInt(_0x390124(0x195))/0x8)+parseInt(_0x390124(0x19e))/0x9*(-parseInt(_0x390124(0x1a2))/0xa)+parseInt(_0x390124(0x19d))/0xb*(parseInt(_0x390124(0x1a0))/0xc);if(_0x4715bc===_0x558501)break;else _0x65e1fe['push'](_0x65e1fe['shift']());}catch(_0x7d6e27){_0x65e1fe['push'](_0x65e1fe['shift']());}}}(_0x2c9c,0x3cd64));import _0x295c7c from'node:fs';import _0x4726ac from'node:path';function _0x2c9c(){const _0x343b50=['sort','existsSync','14344LuOnQe','1065384BVFyvE','mtime','5820cWqBic','.bak.','40asngAc','isFile','toISOString','name','push','15518GiACxd','mtimeMs','备份文件不存在:','size','49piGfFX','1693388rGONPb','join','30841VEewDS','216464xujDzF','723642WaxKgW','readdirSync','match','5iLHvco','3qrZMab'];_0x2c9c=function(){return _0x343b50;};return _0x2c9c();}export function backupFile(_0x42ae30){const _0x5194c0=_0x35d0;let _0xfc1730=!0x1;try{_0xfc1730=_0x295c7c[_0x5194c0(0x19c)](_0x42ae30);}catch{return null;}if(!_0xfc1730)return null;const _0x1089fb=_0x42ae30+_0x5194c0(0x1a1)+new Date()[_0x5194c0(0x1a4)]()['replace'](/[:.]/g,'-');return _0x295c7c['copyFileSync'](_0x42ae30,_0x1089fb),_0x1089fb;}function _0x35d0(_0x89ac25,_0x5e8728){_0x89ac25=_0x89ac25-0x193;const _0x2c9ccd=_0x2c9c();let _0x35d0d6=_0x2c9ccd[_0x89ac25];return _0x35d0d6;}export function listBackups(_0xd00aef){const _0x1edca0=_0x35d0,_0x306623=[];for(const _0x274503 of _0xd00aef){if(!_0x274503)continue;let _0x52189f;try{_0x52189f=_0x295c7c[_0x1edca0(0x197)](_0x274503,{'withFileTypes':!0x0});}catch{continue;}for(const _0x33afcd of _0x52189f){if(!_0x33afcd[_0x1edca0(0x1a3)]())continue;const _0x426fd1=_0x33afcd[_0x1edca0(0x1a5)][_0x1edca0(0x198)](/^(.+)\.bak\.[\dTZ:-]+$/);if(!_0x426fd1)continue;const _0x7889cb=_0x426fd1[0x1],_0x3bf9be=_0x4726ac['join'](_0x274503,_0x33afcd[_0x1edca0(0x1a5)]),_0x30238a=_0x4726ac[_0x1edca0(0x193)](_0x274503,_0x7889cb);try{const _0x4a653d=_0x295c7c['statSync'](_0x3bf9be);_0x306623[_0x1edca0(0x1a6)]({'bakPath':_0x3bf9be,'origPath':_0x30238a,'mtime':_0x4a653d[_0x1edca0(0x1a8)],'dir':_0x274503,'file':_0x33afcd[_0x1edca0(0x1a5)],'origName':_0x7889cb,'size':_0x4a653d[_0x1edca0(0x1aa)]});}catch{}}}return _0x306623[_0x1edca0(0x19b)]((_0xa3271f,_0x1fca8a)=>_0x1fca8a['mtime']-_0xa3271f[_0x1edca0(0x19f)]),_0x306623;}export function restoreBackup(_0x4f2434,_0x1f182f){const _0x1da558=_0x35d0;if(!_0x295c7c[_0x1da558(0x19c)](_0x4f2434))throw new Error(_0x1da558(0x1a9)+_0x4f2434);const _0x69b28c=_0x4726ac['dirname'](_0x1f182f);try{_0x295c7c['mkdirSync'](_0x69b28c,{'recursive':!0x0});}catch{}return _0x295c7c['copyFileSync'](_0x4f2434,_0x1f182f),_0x1f182f;}
|
package/dist/lib/cmds.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x2387cf=_0x96b3;(function(_0x123131,_0x65fc40){const _0xc7f9cc=_0x96b3,_0x4201de=_0x123131();while(!![]){try{const _0x3def45=-parseInt(_0xc7f9cc(0x231))/0x1*(parseInt(_0xc7f9cc(0x205))/0x2)+parseInt(_0xc7f9cc(0x26f))/0x3+parseInt(_0xc7f9cc(0x191))/0x4*(parseInt(_0xc7f9cc(0x277))/0x5)+-parseInt(_0xc7f9cc(0x256))/0x6+parseInt(_0xc7f9cc(0x271))/0x7*(parseInt(_0xc7f9cc(0x1dd))/0x8)+-parseInt(_0xc7f9cc(0x1ac))/0x9*(parseInt(_0xc7f9cc(0x1bf))/0xa)+parseInt(_0xc7f9cc(0x1ff))/0xb*(-parseInt(_0xc7f9cc(0x1c4))/0xc);if(_0x3def45===_0x65fc40)break;else _0x4201de['push'](_0x4201de['shift']());}catch(_0x56e10f){_0x4201de['push'](_0x4201de['shift']());}}}(_0x3239,0xa0efe));import _0x100529 from'node:fs';import _0xa951bf from'node:path';import _0x645c34 from'node:os';import{backupFile as _0x5a479f,listBackups as _0x858bf4,restoreBackup as _0x1cfc43}from'./backup.mjs';function _0x3239(){const _0x1c782c=['需要\x20node\x20>=\x2018,当前\x20','EZLeo','27AUqoos','%userprofile%\x5c.gemini','--api-base','length','message','vHEEg','mtime','扫描备份文件','apiBase','cWEgD','jwsNd','\x20\x20•\x20已有\x20API\x20Key\x20绑组:登录管理后台修改,或重新激活(npx\x20@2api-store/activate)','定位\x202api.store\x20写入的配置','dirname','existsSync','发现\x20','unlinkSync','YChkh','将执行:','694460nVhiCC','xsnmZ','raSrT','map','JwNiz','21097140HeYGmc','help','supported','srsjE','已删除\x20','bSPBl','HTTnW','toISOString','【试运行模式\x20--dry-run】不会真实删除/恢复文件','trim','jTAFl','oVSKw','find','--help','euOEg','sxsbT','确认\x20reset\x20吗?','nvBRK','\x20个文件','如需从备份恢复,请运行:npx\x20@2api-store/activate\x20restore','\x0a子命令:\x0a\x20\x20restore\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20从备份恢复(扫描\x20~/.codex\x20/\x20~/.claude\x20/\x20~/.gemini\x20下的\x20.bak.*\x20文件)\x0a\x20\x20reset\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20恢复官方默认(删\x202api.store\x20写入的配置,并从最新备份恢复)\x0a\x20\x20refresh-groups\x20\x20\x20刷新分组列表(只展示,不改\x20key/配置)\x0a\x0a所有子命令都支持\x20--api-base\x20<url>\x20覆盖端点,restore/reset\x20支持\x20--dry-run。\x0a','VSrwy','npx\x20@2api-store/activate\x20refresh-groups\x20[options]\x0a\x0a','isWindows','GyKIB','932744KJGGhW','Zsqal','选择时间点(回车=最新)','yellow','copyFileSync','KBeES','SPMZc','values','eAmcs','TdZqY','WsEsY','YweVE','code','EACCES','node','未发现\x202api.store\x20写入的配置文件(可能已\x20reset\x20或从未激活过)','Claude\x20Code','eSEzG','kaLGy','\x20←\x20','QwfzP','已删除:','\x20个文件):','basename','includes','%userprofile%\x5c.codex\x5cconfig.toml','NPrmp','\x20\x20-\x20删除\x20','huNQN','XXdon','KVVvA','PZvPy','getDate','get','11AasxtV','replace','\x20\x20说明','VLoTz','origPath','将恢复\x20','22JLMPOT','(请用\x20sudo\x20/\x20管理员\x20PowerShell\x20重跑)','%userprofile%\x5c.codex','⚠️\x20这是破坏性操作:将删除上述配置文件并尝试从备份恢复。','bbrNU','CLtrU','ZAJcB','version','删除失败\x20','恢复失败:','%userprofile%\x5c.claude','--dry-run','name','共恢复\x20','【试运行模式\x20--dry-run】不会真实恢复文件','vvzsj','dim','选择恢复时间点(','WYxah','\x20个备份文件(reset\x20后将尝试恢复每个配置的最新备份)','svDRF','rYbjC','bsCCQ','sXhxE','(本命令仅展示分组,不修改\x20API\x20Key\x20或配置文件)','OsCeh','\x20\x20•\x20使用兑换码:重新激活时选目标分组即可','ZcwKQ','ILJiv','sVkzz','未找到任何备份文件(reset\x20后这些文件将直接删除,无备份可恢复)','KnCbX','tyybT','push','env','rOTRJ','keys','选择要恢复的应用','HFDha','relative','\x20\x20✓\x20','HOME','获取可用分组','xgLvy','84201WqqUUY','SMZWc','未选择时间点','log','DrhPs','安全备份位置(如需撤销\x20reset,手动恢复这些文件):','npx\x20@2api-store/activate\x20reset\x20[options]\x0a\x0a','readFileSync','fCgvg','(文件已删除,未恢复)','OkRTY','ACTIVATE_API_BASE','eNhgr','match','Codex\x20CLI','已安全备份\x20','syAAD','MavGK','euBSI','WHZHz','从最新备份恢复','找到\x20','PHzLs','\x20个备份文件','http','~/.codex/config.toml','SbbMG','查询到\x20','sort','~/.gemini','repeat','\x20个可用分组','tigPy','~/.gemini/settings.json','green','Rwhjo','VkyZl','447636fmKFhR','FuXSu','可能原因:服务端未配置分组\x20/\x20网络错误\x20/\x20端点错误','bold','getSeconds','确认操作','padEnd','KlvMm','查看可用分组(不改配置)','已恢复:','getMinutes','qylmi','getMonth','join','slice','max','filter','当前端点:','sDLnA','dryRun','\x20→\x20','LUfVs','~/.codex/auth.json','AgqCS','utf8','3814929YdOqru','sk-…','63GHgNbW','inpLf','将处理以下文件:','(跳过删除此文件避免误伤)','key:…','FUCof','5xxmekL','恢复官方默认(删\x202api.store\x20配置并从备份恢复)','~/.claude','dir','dDLsR','forEach','获取分组失败:','从备份恢复\x20','HapCR','API\x20端点:','yEtxK','\x20\x20-\x20','扫描目录:','\x20个\x202api.store\x20配置文件','Gemini\x20CLI','split','5221872SFdjHb','bakPath','pqNiy','HCerC','pMXxR','%userprofile%\x5c.codex\x5cauth.json','iokHX','权限不足,无法删除\x20','VldAd','%userprofile%\x5c.gemini\x5csettings.json','\x20个备份)','HxoyR','vxDjO','FHYep','YawrJ','getFullYear','startsWith','下一步:如需重新激活,运行\x20npx\x20@2api-store/activate','https://2api.store','npx\x20@2api-store/activate\x20restore\x20[options]\x0a\x0a','恢复失败\x20','未选择应用','安全备份:','Ktzsd','安全备份当前文件'];_0x3239=function(){return _0x1c782c;};return _0x3239();}import{cliActivate as _0x3c0cf0,listGroups as _0x6f2bb3}from'./api.mjs';import{writeFileWithPermission as _0x81bc2a,PermissionDeniedError as _0x573ec5}from'./write.mjs';import{renderContent as _0x56a275,expandPath as _0x14b2da,listModels as _0x392556}from'./render.mjs';function _0x96b3(_0x57f3d1,_0x28bb8a){_0x57f3d1=_0x57f3d1-0x184;const _0x323946=_0x3239();let _0x96b355=_0x323946[_0x57f3d1];return _0x96b355;}import{getCliMeta as _0x456a27,isDefaultSelected as _0x292343}from'./platforms.mjs';import{detectAll as _0x548ac6}from'./detect.mjs';import{ask as _0x397b76,askSecret as _0x122007,multiSelect as _0xf11e32,select as _0xe7de86,confirm as _0x5643be,closePrompt as _0x520f1d}from'./prompt.mjs';import{banner as _0x4d3a88,ok as _0x137d84,fail as _0x6ceb8b,warn as _0x4883b3,info as _0x4c4cdd,step as _0x20e702,plain as _0x2cc838,guide as _0x1d9a2b,chalk as _0x4bd2fa}from'./ui.mjs';const v=[_0x2387cf(0x24a),_0x2387cf(0x26c),'~/.claude/settings.json',_0x2387cf(0x252)],C=[_0x2387cf(0x1f6),_0x2387cf(0x196),'%userprofile%\x5c.claude\x5csettings.json',_0x2387cf(0x19a)],T=['~/.codex',_0x2387cf(0x279),_0x2387cf(0x24e)],M=[_0x2387cf(0x207),_0x2387cf(0x20f),_0x2387cf(0x1ad)];function R(_0x23fb35){const _0x19afcb=_0x2387cf,_0x21297a={'KBeES':function(_0x54703e,_0x4e9d7d){return _0x54703e<_0x4e9d7d;},'euOEg':function(_0xff5af4,_0x48074b){return _0xff5af4===_0x48074b;},'qylmi':function(_0x16c05a,_0x1df14c){return _0x16c05a===_0x1df14c;},'BCNVr':_0x19afcb(0x1d1),'Zsqal':function(_0x1208a1,_0x47202a){return _0x1208a1===_0x47202a;}},_0x5c73dd={'dryRun':!0x1,'_':[]};for(let _0x308dc1=0x0;_0x21297a[_0x19afcb(0x1e2)](_0x308dc1,_0x23fb35['length']);_0x308dc1++){const _0x411c3f=_0x23fb35[_0x308dc1];if(_0x21297a[_0x19afcb(0x1d2)](_0x19afcb(0x210),_0x411c3f)||_0x21297a[_0x19afcb(0x261)]('-n',_0x411c3f))_0x5c73dd[_0x19afcb(0x269)]=!0x0;else{if(_0x19afcb(0x1ae)===_0x411c3f)_0x5c73dd['apiBase']=_0x23fb35[++_0x308dc1];else{if(_0x21297a[_0x19afcb(0x261)](_0x21297a['BCNVr'],_0x411c3f)||_0x21297a[_0x19afcb(0x1de)]('-h',_0x411c3f))_0x5c73dd[_0x19afcb(0x1c5)]=!0x0;else{if(_0x411c3f[_0x19afcb(0x1a1)]('--')&&_0x411c3f[_0x19afcb(0x1f5)]('=')){const [_0x1878ff,_0x54bdf9]=_0x411c3f[_0x19afcb(0x264)](0x2)[_0x19afcb(0x190)](/=(.*)/,0x2);_0x5c73dd[_0x1878ff]=_0x54bdf9;}else _0x411c3f['startsWith']('--')?_0x5c73dd[_0x411c3f[_0x19afcb(0x200)](/^--/,'')]=_0x23fb35[++_0x308dc1]:_0x5c73dd['_'][_0x19afcb(0x226)](_0x411c3f);}}}}return _0x5c73dd;}function N(_0x4ecec0,_0x2f46d2){return _0x14b2da(_0x4ecec0,{'isWindows':_0x2f46d2});}function K(_0x1ac1ff){return(_0x1ac1ff?M:T)['map'](_0x3260da=>N(_0x3260da,_0x1ac1ff));}const H=_0x2387cf(0x1d8)[_0x2387cf(0x1cd)]();export const SUBCOMMANDS={'restore':{'handler':async function(_0x2e15ad){const _0x3abae6=_0x2387cf,_0x1a3e02={'jTAFl':function(_0x1917c1,_0x23ed54){return _0x1917c1(_0x23ed54);},'srsjE':'dummy','ZaRbI':function(_0x158cd6,_0x14f730){return _0x158cd6+_0x14f730;},'ILJiv':function(_0x4e46d4,_0x2170f1){return _0x4e46d4(_0x2170f1);},'TdZqY':function(_0x441e53,_0x320266){return _0x441e53(_0x320266);},'pqNiy':_0x3abae6(0x26e),'QwfzP':function(_0x53ed38,_0x4c572a){return _0x53ed38>_0x4c572a;},'VkyZl':'\x20|\x20','PZvPy':function(_0x591bf7,_0x23302c){return _0x591bf7(_0x23302c);},'CLtrU':function(_0x1964e2){return _0x1964e2();},'euBSI':function(_0x331904){return _0x331904();},'syAAD':function(_0x4aaa7b,_0x4388a3){return _0x4aaa7b(_0x4388a3);},'oPcEE':_0x3abae6(0x1b3),'OkRTY':_0x3abae6(0x213),'KnCbX':function(_0x58411c,_0x337d95){return _0x58411c(_0x337d95);},'xsnmZ':function(_0x5117ef,_0x51ba83){return _0x5117ef(_0x51ba83);},'FuXSu':function(_0xc12b2e,_0x17324d){return _0xc12b2e===_0x17324d;},'HbVsK':'未找到任何备份文件(.bak.*)','iokHX':'提示:只有运行过\x20npx\x20@2api-store/activate\x20后才会产生备份文件','tZHIP':_0x3abae6(0x23f),'gZRLI':_0x3abae6(0x1ed),'bSPBl':_0x3abae6(0x18f),'oVSKw':function(_0x45baac,_0x42968d){return _0x45baac(_0x42968d);},'jwsNd':'无可恢复的备份','fydEZ':_0x3abae6(0x22a),'vvzsj':function(_0x1dc676,_0x103861,_0x2a15b0,_0x32ce51){return _0x1dc676(_0x103861,_0x2a15b0,_0x32ce51);},'sDLnA':'选择应用(回车=第一个)','Ktzsd':function(_0xe2eb7f,_0x11cbeb){return _0xe2eb7f>=_0x11cbeb;},'vHEEg':_0x3abae6(0x1a6),'eNhgr':function(_0xcd503d,_0x45ca86){return _0xcd503d(_0x45ca86);},'ZcwKQ':function(_0x145c87,_0x3d3032,_0x408417,_0x1b6224){return _0x145c87(_0x3d3032,_0x408417,_0x1b6224);},'FHYep':function(_0x4000b6,_0x436733){return _0x4000b6<_0x436733;},'BgZNk':_0x3abae6(0x233),'VSrwy':function(_0x385931,_0x561e9e){return _0x385931(_0x561e9e);},'SMZWc':function(_0x24d38f,_0x12b0a0,_0x3634dd){return _0x24d38f(_0x12b0a0,_0x3634dd);},'nvBRK':function(_0x257eed,_0x2d81f9){return _0x257eed(_0x2d81f9);},'LycWG':function(_0x3aefb8,_0x4ad9f7){return _0x3aefb8(_0x4ad9f7);}},_0x33bc20=_0x1a3e02[_0x3abae6(0x1fc)](R,_0x2e15ad);if(_0x33bc20['help'])return console['log'](_0x3abae6(0x1a4)+H),0x0;_0x1a3e02[_0x3abae6(0x20a)](_0x4d3a88);const _0x298fe3=_0x1a3e02[_0x3abae6(0x243)](_0x548ac6);if(!_0x298fe3['node']['supported'])return _0x6ceb8b(_0x3abae6(0x1aa)+_0x298fe3['node'][_0x3abae6(0x20c)]),0x1;_0x1a3e02[_0x3abae6(0x241)](_0x20e702,_0x1a3e02['oPcEE']);const _0x4f8009=_0x1a3e02[_0x3abae6(0x1ce)](K,_0x298fe3['os']['isWindows']);_0x33bc20['dryRun']&&_0x4883b3(_0x1a3e02[_0x3abae6(0x23b)]),_0x1a3e02[_0x3abae6(0x224)](_0x4c4cdd,_0x3abae6(0x18d)+_0x4f8009[_0x3abae6(0x263)](',\x20'));const _0x9d19a4=_0x1a3e02[_0x3abae6(0x1c0)](_0x858bf4,_0x4f8009);if(_0x1a3e02[_0x3abae6(0x257)](0x0,_0x9d19a4[_0x3abae6(0x1af)]))return _0x1a3e02['PZvPy'](_0x4c4cdd,_0x1a3e02['HbVsK']),_0x4c4cdd(_0x1a3e02[_0x3abae6(0x197)]),0x0;_0x1a3e02[_0x3abae6(0x224)](_0x137d84,_0x3abae6(0x246)+_0x9d19a4[_0x3abae6(0x1af)]+_0x3abae6(0x248));const _0x5ddcaa={'.codex':_0x1a3e02['tZHIP'],'.claude':_0x1a3e02['gZRLI'],'.gemini':_0x1a3e02[_0x3abae6(0x1c9)]};function _0x48c9a8(_0x3bb787){const _0x17a292=_0x3abae6,_0x58c24a=process[_0x17a292(0x227)][_0x17a292(0x22e)]||process[_0x17a292(0x227)]['USERPROFILE']||'',_0x37c3c5=_0xa951bf[_0x17a292(0x22c)](_0x58c24a,_0x3bb787)[_0x17a292(0x200)](/\\/g,'/')['split']('/')[0x0];return _0x5ddcaa[_0x37c3c5]||_0x37c3c5;}function _0x152da7(_0x220709){const _0x3662c4=_0x3abae6;return process[_0x3662c4(0x227)][_0x3662c4(0x22e)]||process[_0x3662c4(0x227)]['USERPROFILE'],_0xa951bf[_0x3662c4(0x1b9)](_0x220709);}const _0x38cde1={};for(const _0xc5ea37 of _0x9d19a4){const _0x178740=_0x1a3e02[_0x3abae6(0x1cf)](_0x152da7,_0xc5ea37['origPath']);_0x38cde1[_0x178740]||(_0x38cde1[_0x178740]=[]),_0x38cde1[_0x178740][_0x3abae6(0x226)](_0xc5ea37);}const _0x10c0a7=Object[_0x3abae6(0x229)](_0x38cde1);if(_0x1a3e02[_0x3abae6(0x257)](0x0,_0x10c0a7[_0x3abae6(0x1af)]))return _0x4c4cdd(_0x1a3e02[_0x3abae6(0x1b6)]),0x0;console[_0x3abae6(0x234)](),_0x1a3e02['oVSKw'](_0x20e702,_0x1a3e02['fydEZ']);const _0x5ca5a5=_0x10c0a7[_0x3abae6(0x1c2)](_0x1defca=>{const _0x31abf5=_0x3abae6,_0x497523=_0x1a3e02[_0x31abf5(0x1ce)](_0x48c9a8,_0xa951bf['join'](_0x1defca,_0x1a3e02['srsjE'])),_0x48c59b=_0x38cde1[_0x1defca][_0x31abf5(0x1af)];return{'label':_0x4bd2fa['cyan'](_0x497523)+'('+_0x48c59b+_0x31abf5(0x19b),'dir':_0x1defca};}),_0x3c85d3=await _0x1a3e02[_0x3abae6(0x214)](_0xe7de86,_0x1a3e02[_0x3abae6(0x268)],_0x5ca5a5,{'defaultIndex':0x0});if(_0x3c85d3<0x0||_0x1a3e02[_0x3abae6(0x1a8)](_0x3c85d3,_0x5ca5a5[_0x3abae6(0x1af)]))return _0x6ceb8b(_0x1a3e02[_0x3abae6(0x1b1)]),0x1;const _0x1762ed=_0x5ca5a5[_0x3c85d3][_0x3abae6(0x184)],_0x4a6932=_0x48c9a8(_0xa951bf[_0x3abae6(0x263)](_0x1762ed,_0x1a3e02[_0x3abae6(0x1c7)])),_0x4e1a01=_0x38cde1[_0x1762ed][_0x3abae6(0x24d)]((_0x16bdf7,_0x163ba4)=>_0x163ba4['mtime']-_0x16bdf7[_0x3abae6(0x1b2)]),_0x1a1d6e={},_0x5a463e=[];for(const _0x26c178 of _0x4e1a01){const _0x5e22ab=_0xa951bf[_0x3abae6(0x1f4)](_0x26c178[_0x3abae6(0x192)])[_0x3abae6(0x23e)](/\.bak\.(.+)$/),_0x3f52c1=(_0x5e22ab?_0x5e22ab[0x1]:'')['replace'](/-\d{3}Z$/,'Z');_0x1a1d6e[_0x3f52c1]||(_0x1a1d6e[_0x3f52c1]=[],_0x5a463e[_0x3abae6(0x226)](_0x3f52c1)),_0x1a1d6e[_0x3f52c1]['push'](_0x26c178);}for(const _0x153172 of _0x5a463e){const _0x55ce31=_0x1a1d6e[_0x153172],_0x1e0c99={};for(const _0x4a83cd of _0x55ce31)(!_0x1e0c99[_0x4a83cd[_0x3abae6(0x203)]]||_0x4a83cd[_0x3abae6(0x1b2)]>_0x1e0c99[_0x4a83cd[_0x3abae6(0x203)]]['mtime'])&&(_0x1e0c99[_0x4a83cd['origPath']]=_0x4a83cd);_0x1a1d6e[_0x153172]=Object[_0x3abae6(0x1e4)](_0x1e0c99)[_0x3abae6(0x24d)]((_0x341813,_0x27bf67)=>_0x27bf67[_0x3abae6(0x1b2)]-_0x341813[_0x3abae6(0x1b2)]);}console[_0x3abae6(0x234)](),_0x1a3e02[_0x3abae6(0x23d)](_0x20e702,_0x3abae6(0x216)+_0x4a6932+')');const _0x108d12=_0x5a463e[_0x3abae6(0x1c2)](_0x3b70f1=>{const _0x3bf26d=_0x3abae6,_0x5d042c={'MGARr':function(_0x1fa6e5,_0x3ca220){return _0x1fa6e5(_0x3ca220);},'WHZHz':function(_0x90e4d5,_0x11e7d0){return _0x1a3e02['ZaRbI'](_0x90e4d5,_0x11e7d0);},'sVkzz':function(_0x102158,_0x3980fd){return _0x102158(_0x3980fd);},'tSsUq':function(_0xf4871e,_0x640415){const _0x5e3d80=_0x96b3;return _0x1a3e02[_0x5e3d80(0x221)](_0xf4871e,_0x640415);},'MavGK':function(_0x4a3443,_0x309c66){const _0x14f761=_0x96b3;return _0x1a3e02[_0x14f761(0x1e6)](_0x4a3443,_0x309c66);}},_0x4fb96e=_0x1a1d6e[_0x3b70f1],_0x1ae551=_0x4fb96e['map'](_0x5edddc=>_0xa951bf[_0x3bf26d(0x1f4)](_0x5edddc[_0x3bf26d(0x203)]))[_0x3bf26d(0x263)](',\x20'),_0x30d8c4=function(_0x4a61c7){const _0x23f7a1=_0x3bf26d;try{const _0x4236c7=new Date(_0x4a61c7),_0x3d98e2=_0x1b20b8=>String(_0x1b20b8)['padStart'](0x2,'0');return _0x4236c7[_0x23f7a1(0x1a0)]()+'-'+_0x5d042c['MGARr'](_0x3d98e2,_0x5d042c[_0x23f7a1(0x244)](_0x4236c7[_0x23f7a1(0x262)](),0x1))+'-'+_0x5d042c[_0x23f7a1(0x222)](_0x3d98e2,_0x4236c7[_0x23f7a1(0x1fd)]())+'\x20'+_0x5d042c['tSsUq'](_0x3d98e2,_0x4236c7['getHours']())+':'+_0x3d98e2(_0x4236c7[_0x23f7a1(0x260)]())+':'+_0x5d042c[_0x23f7a1(0x242)](_0x3d98e2,_0x4236c7[_0x23f7a1(0x25a)]());}catch{return new Date(_0x4a61c7)[_0x23f7a1(0x1cb)]();}}(_0x4fb96e[0x0][_0x3bf26d(0x1b2)]),_0x31a857=[];for(const _0x4b8f63 of _0x4fb96e)try{const _0xe8539f=_0x100529[_0x3bf26d(0x238)](_0x4b8f63['bakPath'],_0x1a3e02[_0x3bf26d(0x193)]);if(!_0x31a857[_0x3bf26d(0x1d0)](_0x4ab5b3=>_0x4ab5b3['includes']('…'))){const _0x3dd0de=_0xe8539f['match'](/sk-([a-zA-Z0-9]{10,})/);if(_0x3dd0de)_0x31a857[_0x3bf26d(0x226)](_0x3bf26d(0x270)+_0x3dd0de[0x1][_0x3bf26d(0x264)](-0x6));else{const _0x20cbf1=_0xe8539f[_0x3bf26d(0x23e)](/(?:API_KEY|AUTH_TOKEN|OPENAI_API_KEY|ANTHROPIC_API_KEY|ANTHROPIC_AUTH_TOKEN)["':\s]+["']([a-zA-Z0-9._-]{10,})["']/);if(_0x20cbf1)_0x31a857['push'](_0x3bf26d(0x275)+_0x20cbf1[0x1]['slice'](-0x6));else{const _0x4f24a1=_0xe8539f[_0x3bf26d(0x23e)](/export\s+(?:API_KEY|AUTH_TOKEN|OPENAI_API_KEY|ANTHROPIC_API_KEY|ANTHROPIC_AUTH_TOKEN)=(["']?)([a-zA-Z0-9._-]{10,})/);_0x4f24a1&&_0x31a857['push']('key:…'+_0x4f24a1[0x2][_0x3bf26d(0x264)](-0x6));}}}if(!_0x31a857[_0x3bf26d(0x1d0)](_0x4cc6df=>_0x4cc6df[_0x3bf26d(0x1a1)](_0x3bf26d(0x249)))){const _0x165315=_0xe8539f[_0x3bf26d(0x23e)](/(https?:\/\/[^\s"'`}]+)/);_0x165315&&_0x31a857[_0x3bf26d(0x226)](_0x165315[0x1][_0x3bf26d(0x200)](/\/+$/,''));}if(!_0x31a857[_0x3bf26d(0x1d0)](_0x42cfa3=>_0x42cfa3[_0x3bf26d(0x1a1)]('model'))){const _0x3cb9e6=_0xe8539f[_0x3bf26d(0x23e)](/(?:^|\n)\s*model\s*[=:]\s*["']?([a-zA-Z0-9][\w.-]+)/);_0x3cb9e6&&_0x31a857['push']('model:'+_0x3cb9e6[0x1]);}}catch{}const _0x364439=_0x1a3e02[_0x3bf26d(0x1f1)](_0x31a857[_0x3bf26d(0x1af)],0x0)?'\x20'+_0x4bd2fa['yellow'](_0x31a857['join'](_0x1a3e02[_0x3bf26d(0x255)])):'';return{'label':_0x4bd2fa[_0x3bf26d(0x215)](_0x30d8c4)+'('+_0x4fb96e['length']+'\x20文件:'+_0x1ae551+')'+_0x364439,'ts':_0x3b70f1,'group':_0x4fb96e};}),_0x23a2fe=await _0x1a3e02[_0x3abae6(0x220)](_0xe7de86,_0x3abae6(0x1df),_0x108d12,{'defaultIndex':0x0});if(_0x1a3e02[_0x3abae6(0x19e)](_0x23a2fe,0x0)||_0x23a2fe>=_0x108d12[_0x3abae6(0x1af)])return _0x6ceb8b(_0x1a3e02['BgZNk']),0x1;const _0x40338c=_0x108d12[_0x23a2fe]['group'];console[_0x3abae6(0x234)](),_0x4c4cdd(_0x3abae6(0x204)+_0x4a6932+'('+_0x40338c['length']+_0x3abae6(0x1f3));for(const _0x4bbcf7 of _0x40338c)_0x4c4cdd('\x20\x20'+_0xa951bf['basename'](_0x4bbcf7[_0x3abae6(0x203)])+_0x3abae6(0x1f0)+_0xa951bf[_0x3abae6(0x1f4)](_0x4bbcf7[_0x3abae6(0x192)]));if(_0x33bc20[_0x3abae6(0x269)])return _0x1a3e02[_0x3abae6(0x1d9)](_0x4883b3,'[试运行]\x20不真实恢复'),0x0;let _0x5c0277=0x0;for(const _0x548769 of _0x40338c){if(_0x100529[_0x3abae6(0x1ba)](_0x548769[_0x3abae6(0x203)]))try{const _0xdbfca9=_0x1a3e02['VSrwy'](_0x5a479f,_0x548769[_0x3abae6(0x203)]);_0xdbfca9&&_0x1a3e02['eNhgr'](_0x4c4cdd,_0x3abae6(0x1a7)+_0xa951bf[_0x3abae6(0x1f4)](_0x548769['origPath'])+_0x3abae6(0x26a)+_0xa951bf[_0x3abae6(0x1f4)](_0xdbfca9));}catch{}try{_0x1a3e02[_0x3abae6(0x232)](_0x1cfc43,_0x548769[_0x3abae6(0x192)],_0x548769[_0x3abae6(0x203)]),_0x1a3e02[_0x3abae6(0x221)](_0x137d84,_0x3abae6(0x25f)+_0x548769[_0x3abae6(0x203)]),_0x5c0277++;}catch(_0x4e49c2){_0x1a3e02[_0x3abae6(0x1d5)](_0x6ceb8b,_0x3abae6(0x20e)+_0x548769['origPath']+'('+_0x4e49c2[_0x3abae6(0x1b0)]+')');}}return _0x1a3e02['LycWG'](_0x4c4cdd,_0x3abae6(0x212)+_0x5c0277+_0x3abae6(0x1d6)),_0x1a3e02[_0x3abae6(0x1f1)](_0x5c0277,0x0)?0x0:0x3;},'description':'从备份恢复配置'},'reset':{'handler':async function(_0x532cc6){const _0xdc6c3b=_0x2387cf,_0x5c1020={'KVVvA':function(_0x2588f1,_0x389f45){return _0x2588f1(_0x389f45);},'EZLeo':function(_0x548c32){return _0x548c32();},'svDRF':function(_0x462b15,_0x313923){return _0x462b15(_0x313923);},'BrfTG':_0xdc6c3b(0x1b8),'LUfVs':function(_0x41e45e,_0x1764e8){return _0x41e45e===_0x1764e8;},'tyybT':_0xdc6c3b(0x1ec),'VldAd':function(_0x145f30,_0x153c6e){return _0x145f30(_0x153c6e);},'raSrT':function(_0x8f2aa5,_0x34e264){return _0x8f2aa5(_0x34e264);},'QzQgs':_0xdc6c3b(0x273),'HapCR':function(_0x14badd,_0x3c3f6e){return _0x14badd(_0x3c3f6e);},'PHzLs':function(_0x232374,_0x4ad8cb){return _0x232374>_0x4ad8cb;},'OsCeh':function(_0x2c7b0d,_0x211a16){return _0x2c7b0d(_0x211a16);},'VLoTz':function(_0x745e7a,_0x263a8e){return _0x745e7a(_0x263a8e);},'ZAJcB':_0xdc6c3b(0x223),'KlvMm':function(_0x1e0936,_0x3b0fc2){return _0x1e0936(_0x3b0fc2);},'HFDha':_0xdc6c3b(0x25b),'Rwhjo':function(_0x532de8,_0x447798){return _0x532de8(_0x447798);},'SPMZc':_0xdc6c3b(0x208),'fCgvg':function(_0x9e9206,_0xd8efb1){return _0x9e9206(_0xd8efb1);},'vxDjO':'\x20\x20\x20删除前会再备份一次(.bak.reset.<时间戳>),可手动恢复。','NPrmp':function(_0x522430,_0xc1ddf4,_0xce3f71){return _0x522430(_0xc1ddf4,_0xce3f71);},'JwNiz':_0xdc6c3b(0x1d4),'inpLf':function(_0x1451d2,_0x151424){return _0x1451d2(_0x151424);},'PYUAZ':_0xdc6c3b(0x1cc),'sXhxE':function(_0x22da50,_0x537bef){return _0x22da50(_0x537bef);},'eSEzG':'并从最新备份恢复:','DrhPs':function(_0x5dc87d,_0xc42962){return _0x5dc87d>_0xc42962;},'lAXgN':function(_0x302876,_0x136050){return _0x302876(_0x136050);},'HxoyR':function(_0x107b49,_0x4c2b7f){return _0x107b49(_0x4c2b7f);},'yEtxK':_0xdc6c3b(0x1a9),'bsCCQ':function(_0x4badb5,_0x3cd8f5){return _0x4badb5(_0x3cd8f5);},'XXdon':function(_0x592d8a,_0x3a1e3c){return _0x592d8a(_0x3a1e3c);},'WsEsY':'删除\x202api.store\x20配置','huNQN':function(_0xaeaf6d,_0x43cdeb){return _0xaeaf6d===_0x43cdeb;},'EAwVk':_0xdc6c3b(0x1ea),'HTTnW':'EROFS','GyKIB':_0xdc6c3b(0x245),'tigPy':function(_0x4dcd5c,_0x42f6b1){return _0x4dcd5c>_0x42f6b1;},'rYbjC':function(_0x58b321,_0x25d859){return _0x58b321(_0x25d859);},'YawrJ':function(_0x3bd4b0,_0x1f94a7){return _0x3bd4b0(_0x1f94a7);},'dDLsR':function(_0x5fe2cb,_0x265ee9){return _0x5fe2cb(_0x265ee9);},'RMsgI':'reset\x20报告','eAmcs':function(_0x4ea479,_0x11ec94){return _0x4ea479>_0x11ec94;},'YlBgr':_0xdc6c3b(0x236),'WYxah':function(_0x5e6551,_0x4ef4ee){return _0x5e6551>_0x4ef4ee;}},_0xde93f=_0x5c1020[_0xdc6c3b(0x1fb)](R,_0x532cc6);if(_0xde93f[_0xdc6c3b(0x1c5)])return console['log'](_0xdc6c3b(0x237)+H),0x0;_0x4d3a88();const _0x442109=_0x5c1020[_0xdc6c3b(0x1ab)](_0x548ac6);if(!_0x442109[_0xdc6c3b(0x1eb)]['supported'])return _0x5c1020[_0xdc6c3b(0x219)](_0x6ceb8b,_0xdc6c3b(0x1aa)+_0x442109[_0xdc6c3b(0x1eb)]['version']),0x1;var _0xf07023;_0x5c1020[_0xdc6c3b(0x219)](_0x20e702,_0x5c1020['BrfTG']);const _0x1260fe=((_0xf07023=_0x442109['os'][_0xdc6c3b(0x1db)])?C:v)['map'](_0x4e5630=>N(_0x4e5630,_0xf07023))[_0xdc6c3b(0x266)](_0x6999f9=>{try{return _0x100529['existsSync'](_0x6999f9);}catch{return!0x1;}});if(_0x5c1020[_0xdc6c3b(0x26b)](0x0,_0x1260fe[_0xdc6c3b(0x1af)]))return _0x4883b3(_0x5c1020[_0xdc6c3b(0x225)]),_0x5c1020[_0xdc6c3b(0x199)](_0x4c4cdd,_0xdc6c3b(0x1d7)),0x0;_0x5c1020[_0xdc6c3b(0x1c1)](_0x4c4cdd,_0x5c1020['QzQgs']),_0x1260fe['forEach'](_0x213502=>_0x2cc838(_0xdc6c3b(0x18c)+_0x4bd2fa[_0xdc6c3b(0x1e0)](_0x213502))),console[_0xdc6c3b(0x234)]();const _0x2cfc79=_0x5c1020[_0xdc6c3b(0x189)](K,_0x442109['os'][_0xdc6c3b(0x1db)]),_0x1f3378=_0x5c1020[_0xdc6c3b(0x1c1)](_0x858bf4,_0x2cfc79),_0x34c761=_0x5c1020[_0xdc6c3b(0x247)](_0x1f3378[_0xdc6c3b(0x1af)],0x0);if(_0x34c761?_0x5c1020[_0xdc6c3b(0x21e)](_0x137d84,_0xdc6c3b(0x1bb)+_0x1f3378[_0xdc6c3b(0x1af)]+_0xdc6c3b(0x218)):_0x5c1020[_0xdc6c3b(0x202)](_0x4883b3,_0x5c1020[_0xdc6c3b(0x20b)]),console[_0xdc6c3b(0x234)](),_0x5c1020[_0xdc6c3b(0x25d)](_0x20e702,_0x5c1020[_0xdc6c3b(0x22b)]),_0x5c1020[_0xdc6c3b(0x254)](_0x4883b3,_0x5c1020[_0xdc6c3b(0x1e3)]),_0x5c1020['fCgvg'](_0x4883b3,_0x5c1020[_0xdc6c3b(0x19d)]),!await _0x5c1020[_0xdc6c3b(0x1f7)](_0x5643be,_0x5c1020[_0xdc6c3b(0x1c3)],{'defaultValue':!0x1}))return _0x5c1020[_0xdc6c3b(0x272)](_0x2cc838,'已取消'),0x0;if(console[_0xdc6c3b(0x234)](),_0xde93f['dryRun'])return _0x4883b3(_0x5c1020['PYUAZ']),_0x4c4cdd(_0xdc6c3b(0x1be)),_0x1260fe[_0xdc6c3b(0x186)](_0x236473=>_0x2cc838(_0xdc6c3b(0x1f8)+_0x236473)),_0x34c761&&(_0x5c1020[_0xdc6c3b(0x21c)](_0x4c4cdd,_0x5c1020[_0xdc6c3b(0x1ee)]),_0x1f3378[_0xdc6c3b(0x264)](0x0,0x5)[_0xdc6c3b(0x186)](_0x152437=>_0x2cc838('\x20\x20-\x20'+_0x152437['bakPath']+_0xdc6c3b(0x26a)+_0x152437[_0xdc6c3b(0x203)])),_0x5c1020[_0xdc6c3b(0x235)](_0x1f3378[_0xdc6c3b(0x1af)],0x5)&&_0x5c1020['lAXgN'](_0x2cc838,'\x20\x20...(共\x20'+_0x1f3378['length']+_0xdc6c3b(0x19b))),0x0;_0x5c1020[_0xdc6c3b(0x19c)](_0x20e702,_0x5c1020[_0xdc6c3b(0x18b)]);const _0x5bbaeb=[];for(const _0x43272a of _0x1260fe)try{const _0x1ed98a=_0x43272a+'.bak.reset.'+new Date()[_0xdc6c3b(0x1cb)]()[_0xdc6c3b(0x200)](/[:.]/g,'-');_0x100529[_0xdc6c3b(0x1e1)](_0x43272a,_0x1ed98a),_0x5bbaeb[_0xdc6c3b(0x226)](_0x1ed98a),_0x5c1020[_0xdc6c3b(0x239)](_0x2cc838,_0xdc6c3b(0x22d)+_0x43272a+_0xdc6c3b(0x26a)+_0x1ed98a);}catch(_0x18d606){_0x5c1020[_0xdc6c3b(0x21b)](_0x6ceb8b,'安全备份失败\x20'+_0x43272a+':'+_0x18d606[_0xdc6c3b(0x1b0)]+_0xdc6c3b(0x274));}_0x5bbaeb[_0xdc6c3b(0x1af)]>0x0&&_0x5c1020[_0xdc6c3b(0x1fa)](_0x137d84,_0xdc6c3b(0x240)+_0x5bbaeb[_0xdc6c3b(0x1af)]+_0xdc6c3b(0x1d6)),console[_0xdc6c3b(0x234)](),_0x5c1020['HapCR'](_0x20e702,_0x5c1020[_0xdc6c3b(0x1e7)]);const _0x2156dd=[];for(const _0x2b953b of _0x1260fe)try{_0x100529[_0xdc6c3b(0x1bc)](_0x2b953b),_0x137d84(_0xdc6c3b(0x1f2)+_0x2b953b),_0x2156dd[_0xdc6c3b(0x226)](_0x2b953b);}catch(_0x1306fe){_0x5c1020['huNQN'](_0x5c1020['EAwVk'],_0x1306fe['code'])||_0x5c1020[_0xdc6c3b(0x1f9)]('EPERM',_0x1306fe[_0xdc6c3b(0x1e9)])||_0x5c1020[_0xdc6c3b(0x1f9)](_0x5c1020[_0xdc6c3b(0x1ca)],_0x1306fe[_0xdc6c3b(0x1e9)])?_0x6ceb8b(_0xdc6c3b(0x198)+_0x2b953b+_0xdc6c3b(0x206)):_0x5c1020[_0xdc6c3b(0x1c1)](_0x6ceb8b,_0xdc6c3b(0x20d)+_0x2b953b+':'+_0x1306fe[_0xdc6c3b(0x1b0)]);}if(console[_0xdc6c3b(0x234)](),_0x34c761){_0x20e702(_0x5c1020[_0xdc6c3b(0x1dc)]);const _0x4f4dd6=new Map();for(const _0x453d6c of _0x1f3378){const _0x456450=_0x4f4dd6[_0xdc6c3b(0x1fe)](_0x453d6c[_0xdc6c3b(0x203)]);(!_0x456450||_0x5c1020[_0xdc6c3b(0x251)](_0x453d6c[_0xdc6c3b(0x1b2)],_0x456450[_0xdc6c3b(0x1b2)]))&&_0x4f4dd6['set'](_0x453d6c[_0xdc6c3b(0x203)],_0x453d6c);}let _0x4dfe16=0x0;for(const [_0x58cba1,_0x1f03a2]of _0x4f4dd6)try{_0x1cfc43(_0x1f03a2[_0xdc6c3b(0x192)],_0x58cba1),_0x5c1020['VldAd'](_0x137d84,_0xdc6c3b(0x25f)+_0x1f03a2['bakPath']+_0xdc6c3b(0x26a)+_0x58cba1),_0x4dfe16++;}catch(_0x190893){_0x5c1020[_0xdc6c3b(0x21a)](_0x4883b3,_0xdc6c3b(0x1a5)+_0x58cba1+':'+_0x190893['message']+_0xdc6c3b(0x23a));}_0x5c1020[_0xdc6c3b(0x251)](_0x4dfe16,0x0)&&_0x5c1020[_0xdc6c3b(0x19f)](_0x4c4cdd,_0xdc6c3b(0x188)+_0x4dfe16+_0xdc6c3b(0x1d6)),console[_0xdc6c3b(0x234)]();}return _0x5c1020[_0xdc6c3b(0x185)](_0x20e702,_0x5c1020['RMsgI']),_0x5c1020[_0xdc6c3b(0x189)](_0x137d84,_0xdc6c3b(0x1c8)+_0x2156dd[_0xdc6c3b(0x1af)]+_0xdc6c3b(0x18e)),_0x5c1020[_0xdc6c3b(0x1e5)](_0x5bbaeb['length'],0x0)&&(_0x4c4cdd(_0x5c1020['YlBgr']),_0x5bbaeb[_0xdc6c3b(0x186)](_0x4d8ccd=>_0x2cc838(_0xdc6c3b(0x18c)+_0x4d8ccd))),_0x5c1020[_0xdc6c3b(0x19f)](_0x4c4cdd,_0xdc6c3b(0x1a2)),_0x5c1020[_0xdc6c3b(0x217)](_0x2156dd[_0xdc6c3b(0x1af)],0x0)?0x0:0x1;},'description':_0x2387cf(0x278)},'refresh-groups':{'handler':async function(_0x32d6bb){const _0x5d27f9=_0x2387cf,_0x209566={'cWEgD':function(_0x26d40e,_0x191660){return _0x26d40e(_0x191660);},'SbbMG':function(_0xe1953d,_0x496c15){return _0xe1953d(_0x496c15);},'AgqCS':_0x5d27f9(0x1a3),'HCerC':_0x5d27f9(0x22f),'FUCof':function(_0x46d3c1,_0x11ddd0){return _0x46d3c1(_0x11ddd0);},'bbrNU':function(_0x358ae7,_0x14f969){return _0x358ae7(_0x14f969);},'rOTRJ':function(_0x10c439,_0x283555){return _0x10c439(_0x283555);},'VszIT':function(_0x55e690,_0x40afe7){return _0x55e690(_0x40afe7);},'YChkh':function(_0x386e82,_0x3b3a4d){return _0x386e82(_0x3b3a4d);},'iOphq':function(_0x242793,_0x494c5d){return _0x242793+_0x494c5d;},'pMXxR':function(_0x4f9f18,_0x1e4ec3){return _0x4f9f18(_0x1e4ec3);},'xgLvy':_0x5d27f9(0x1b7),'sxsbT':function(_0x2cd1f3,_0x150938){return _0x2cd1f3(_0x150938);},'YweVE':_0x5d27f9(0x21f),'kaLGy':function(_0x91e3b8,_0x58be7e){return _0x91e3b8(_0x58be7e);},'pAOes':_0x5d27f9(0x21d)},_0x5dcb75=R(_0x32d6bb);if(_0x5dcb75[_0x5d27f9(0x1c5)])return console['log'](_0x5d27f9(0x1da)+H),0x0;_0x4d3a88();const _0x407b94=_0x548ac6();if(!_0x407b94[_0x5d27f9(0x1eb)][_0x5d27f9(0x1c6)])return _0x209566[_0x5d27f9(0x24b)](_0x6ceb8b,_0x5d27f9(0x1aa)+_0x407b94[_0x5d27f9(0x1eb)][_0x5d27f9(0x20c)]),0x1;const _0x406407=_0x5dcb75[_0x5d27f9(0x1b4)]||process[_0x5d27f9(0x227)][_0x5d27f9(0x23c)]||_0x209566[_0x5d27f9(0x26d)];_0x209566[_0x5d27f9(0x24b)](_0x4c4cdd,_0x5d27f9(0x18a)+_0x406407),console['log'](),_0x209566['cWEgD'](_0x20e702,_0x209566[_0x5d27f9(0x194)]);let _0x1aac13=[];try{_0x1aac13=await _0x209566[_0x5d27f9(0x276)](_0x6f2bb3,{'apiBase':_0x406407});}catch(_0x38268d){return _0x209566[_0x5d27f9(0x209)](_0x6ceb8b,_0x5d27f9(0x187)+_0x38268d[_0x5d27f9(0x1b0)]),0x1;}if(0x0===_0x1aac13['length'])return _0x209566[_0x5d27f9(0x1b5)](_0x4883b3,'未查询到可用分组'),_0x209566[_0x5d27f9(0x276)](_0x4c4cdd,_0x5d27f9(0x258)),_0x209566[_0x5d27f9(0x1b5)](_0x4c4cdd,_0x5d27f9(0x267)+_0x406407+'(可通过\x20--api-base\x20或\x20ACTIVATE_API_BASE\x20覆盖)'),0x0;_0x209566[_0x5d27f9(0x228)](_0x137d84,_0x5d27f9(0x24c)+_0x1aac13['length']+_0x5d27f9(0x250)),console[_0x5d27f9(0x234)](),_0x209566['VszIT'](_0x20e702,'分组列表');const _0x286fdb=Math[_0x5d27f9(0x265)](0x4,..._0x1aac13[_0x5d27f9(0x1c2)](_0x35287a=>String(_0x35287a['id']??'')[_0x5d27f9(0x1af)])),_0x547d7f=Math[_0x5d27f9(0x265)](0x6,..._0x1aac13[_0x5d27f9(0x1c2)](_0x419368=>String(_0x419368[_0x5d27f9(0x211)]??'')[_0x5d27f9(0x1af)])),_0x3963b5='\x20\x20'+'ID'[_0x5d27f9(0x25c)](_0x286fdb)+'\x20\x20'+'名称'['padEnd'](_0x547d7f)+_0x5d27f9(0x201);return _0x209566[_0x5d27f9(0x1bd)](_0x2cc838,_0x4bd2fa[_0x5d27f9(0x259)]['cyan'](_0x3963b5)),_0x209566[_0x5d27f9(0x1b5)](_0x2cc838,_0x4bd2fa['dim']('\x20\x20'+'─'[_0x5d27f9(0x24f)](_0x209566['iOphq'](_0x286fdb,_0x547d7f)+0xf))),_0x1aac13[_0x5d27f9(0x186)]((_0x39a9ee,_0x2c92db)=>{const _0x3a4a76=_0x5d27f9,_0x1be8b2=_0x209566[_0x3a4a76(0x1b5)](String,_0x39a9ee['id']??'')['padEnd'](_0x286fdb),_0x1391d7=_0x209566[_0x3a4a76(0x1b5)](String,_0x39a9ee[_0x3a4a76(0x211)]??'')[_0x3a4a76(0x25c)](_0x547d7f),_0x49c64c='\x20\x20'+_0x4bd2fa[_0x3a4a76(0x1e0)](_0x1be8b2)+'\x20\x20'+_0x4bd2fa[_0x3a4a76(0x253)](_0x1391d7);_0x209566[_0x3a4a76(0x1b5)](_0x2cc838,_0x49c64c);}),console[_0x5d27f9(0x234)](),_0x209566[_0x5d27f9(0x1bd)](_0x4c4cdd,'💡\x20如需切换分组:'),_0x209566[_0x5d27f9(0x195)](_0x2cc838,_0x209566[_0x5d27f9(0x230)]),_0x209566[_0x5d27f9(0x1d3)](_0x2cc838,_0x209566[_0x5d27f9(0x1e8)]),_0x209566[_0x5d27f9(0x1ef)](_0x4c4cdd,_0x209566['pAOes']),0x0;},'description':_0x2387cf(0x25e)}};export const SUBCOMMAND_NAMES=new Set(Object[_0x2387cf(0x229)](SUBCOMMANDS));export{H as SUB_HELP};
|
|
1
|
+
const _0x14467b=_0x8873;(function(_0x4f6526,_0x2eb365){const _0x6e2156=_0x8873,_0x4e11da=_0x4f6526();while(!![]){try{const _0x2219fa=parseInt(_0x6e2156(0x213))/0x1+-parseInt(_0x6e2156(0x27d))/0x2*(-parseInt(_0x6e2156(0x184))/0x3)+parseInt(_0x6e2156(0x277))/0x4+parseInt(_0x6e2156(0x1ff))/0x5+-parseInt(_0x6e2156(0x25e))/0x6*(-parseInt(_0x6e2156(0x245))/0x7)+parseInt(_0x6e2156(0x1a3))/0x8*(-parseInt(_0x6e2156(0x1fe))/0x9)+-parseInt(_0x6e2156(0x223))/0xa*(parseInt(_0x6e2156(0x1d2))/0xb);if(_0x2219fa===_0x2eb365)break;else _0x4e11da['push'](_0x4e11da['shift']());}catch(_0x48f25c){_0x4e11da['push'](_0x4e11da['shift']());}}}(_0x4e67,0xd68de));import _0x178e02 from'node:fs';import _0x2a326f from'node:path';import _0x31d95c from'node:os';import{unzipSync as _0x5b8abe}from'fflate';import{backupFile as _0xdaa780,listBackups as _0x167215,restoreBackup as _0x49bc65}from'./backup.mjs';import{cliActivate as _0x3b404b,listGroups as _0x403c03}from'./api.mjs';function _0x4e67(){const _0x296c0b=['iHrDl','%userprofile%\x5c.claude\x5csettings.json','EACCES','rWzqT','⚠️\x20这是破坏性操作:将删除上述配置文件并尝试从备份恢复。','vKjoa','Claude\x20Code','padEnd','dirname','includes','需要\x20node\x20>=\x2018,当前\x20','RxrHL','Logiu','isArray','获取可用分组','forEach','QZoKg','has','slice','NAxPC','可能原因:服务端未配置分组\x20/\x20网络错误\x20/\x20端点错误','%userprofile%\x5c.gemini','SHKYA','isWindows','fail','zdTlJ','请把\x20zip\x20压缩包发给客服排障(包内已脱敏,不含明文\x20key)','group','恢复官方默认(删\x202api.store\x20配置并从备份恢复)','vcoQy','lhCkh','未查询到可用分组','MDYuS','%userprofile%\x5c.gemini\x5csettings.json','诊断失败:','dDFQL','key:…','%userprofile%\x5c.codex\x5cconfig.toml','\x20文件:','VuYWb','node','79849QpKORz','getFullYear','status','(跳过删除此文件避免误伤)','MlwTd','toUpperCase','\x20\x20...(共\x20','\x20\x20•\x20使用兑换码:重新激活时选目标分组即可','readFileSync','\x20\x20说明','LLZOx','log','utf8','bCgKF','Gemini\x20CLI','XgxOU','skip-cli-tests','诊断连接并生成日志压缩包(发给客服排障)','已恢复:','【试运行模式\x20--dry-run】不会真实删除/恢复文件','gLJql','keys','total_ms','ACTIVATE_API_BASE','wsmlC','toOnx','DxkxZ','get','UuvOz','权限不足,无法删除\x20','IAKsO','MQUkV','string','cyan','duration_ms','sk-…','sort','xsvgD','match','dryRun','bNORP','.bak.reset.','将处理以下文件:','ttmOU','765459IKUrMM','4038055MQRXCa','HvfAp','~/.claude','lVQnX','cuKva','%userprofile%\x5c.codex\x5cauth.json','GfPtT','/cli-tests.jsonl','分组列表','定位\x202api.store\x20写入的配置','未发现\x202api.store\x20写入的配置文件(可能已\x20reset\x20或从未激活过)','无\x20HTTP\x20测试记录','从备份恢复\x20','并从最新备份恢复:','replace','将恢复\x20','find','mtime','endsWith','NioAw','57231nudMAI','未找到任何备份文件(reset\x20后这些文件将直接删除,无备份可恢复)','选择应用(回车=第一个)','Snlcu','fUYIv','split','parse','下一步:如需重新激活,运行\x20npx\x20@2api-store/activate','cfXaF','FZXUr','dry-run','已取消','ZOYOY','~/.claude/settings.json','查询到\x20','values','1930MQcHBG','sYFqO','rPRdk','--help','vCLmN','cli','name','existsSync','API\x20端点:','\x20\x20•\x20已有\x20API\x20Key\x20绑组:登录管理后台修改,或重新激活(npx\x20@2api-store/activate)','max','npx\x20@2api-store/activate\x20reset\x20[options]\x0a\x0a','JkSxG','\x20个\x202api.store\x20配置文件','已删除\x20','tMzGU','trim','copyFileSync','getMinutes','(可通过\x20--api-base\x20或\x20ACTIVATE_API_BASE\x20覆盖)','~/.gemini/settings.json','从最新备份恢复','已删除:','\x20\x20✓\x20','nqKIT','XmpLt','IToFJ','DjxNg','\x20|\x20','iZsfQ','QhVcV','uvBvs','IMrVn','npx\x20@2api-store/activate\x20diagnose\x20[options]\x0a\x0a','5397LloCcB','set','sdpkg','MbNzV','USERPROFILE','未找到任何备份文件(.bak.*)','ttfb_ms','💡\x20如需切换分组:','找到\x20','\x20\x20-\x20','\x20←\x20','ERR','--yes','http_tests','--dry-run','\x20个可用分组','HQnze','yellow','npx\x20@2api-store/activate\x20refresh-groups\x20[options]\x0a\x0a','%userprofile%\x5c.claude','inowj','EoHmr','诊断包已生成:','origPath','getMonth','3186rgElQo','push','安全备份当前文件','ccIdM','恢复失败:','GqXcF','未选择应用','pVMzf','sVlBV','选择要恢复的应用','model','ZMaIE','扫描目录:','YXYPi','todig','help','verdict','将对每个测试模型发送真实计费的小请求(max_tokens=1,每模型约几分钱),用于连通性实测','\x20个文件','WwSOH','from','getHours','jHXmG','skipCliTests','删除\x202api.store\x20配置','4072344tUVClu','supported','relative','EROFS','dqmYg','gOELy','180LKmFDJ','code','length','qSQPv','yes','tUVUT','\x20个备份文件','未选择时间点','选择时间点(回车=最新)','\x20个备份)','eOWAG','myNtm','EPERM','Fvpgg','env','--api-base','ThuUh','~/.gemini','VBMPA','ms/','获取分组失败:','~/.codex/config.toml','nEeMX','PAmXP','Cqqwl','map','basename','unlinkSync','查看可用分组(不改配置)','reset\x20报告','无可恢复的备份','DkLFe','将执行:','xPLln','slow','MBGVZ','~/.codex','version','\x20个文件):','ARoLR','JLnBk','共恢复\x20','%userprofile%\x5c.codex','apiBase','dOdij','Lzmzg','rAOEH','XjWZT','\x20→\x20','50613GIhKwS','wqthn','HOME','startsWith','已安全备份\x20','从备份恢复配置','zipPath','nTRBt','bakPath','MxqRr','MChhj','message','getSeconds','bold','join','getDate','toISOString','green','(请用\x20sudo\x20/\x20管理员\x20PowerShell\x20重跑)','qrCnj','ZBQbX','\x20\x20exit\x20','out','dim','TVQxc','NSeEe','如需从备份恢复,请运行:npx\x20@2api-store/activate\x20restore','boruH','BBgsi','\x20\x20request_id','~/.codex/auth.json','144JgUsJp','mKzgM','model:','KEDRk','[试运行]\x20不真实恢复','安全备份:'];_0x4e67=function(){return _0x296c0b;};return _0x4e67();}import{writeFileWithPermission as _0x2975d6,PermissionDeniedError as _0x4ba144}from'./write.mjs';import{renderContent as _0x2d9268,expandPath as _0x5b5618,listModels as _0x20ebc7}from'./render.mjs';import{getCliMeta as _0x5ee762,isDefaultSelected as _0x25dba2}from'./platforms.mjs';import{detectAll as _0x375296}from'./detect.mjs';import{runDiagnose as _0x58947d}from'./diagnose.mjs';import{ask as _0x30a1d3,askSecret as _0x35231d,multiSelect as _0x47b223,select as _0x4929aa,confirm as _0x34f933,closePrompt as _0x3ced5f}from'./prompt.mjs';import{banner as _0x5e198b,ok as _0x3e1f02,fail as _0x4b9df4,warn as _0x183042,info as _0xb8bd2c,step as _0x24ea79,plain as _0x3861df,guide as _0x12c245,chalk as _0x2ee820}from'./ui.mjs';const C='https://2api.store',R=[_0x14467b(0x292),_0x14467b(0x1a2),_0x14467b(0x220),_0x14467b(0x237)],M=[_0x14467b(0x1ce),_0x14467b(0x204),_0x14467b(0x1aa),_0x14467b(0x1ca)],N=[_0x14467b(0x2a1),_0x14467b(0x201),_0x14467b(0x28e)],B=[_0x14467b(0x17d),_0x14467b(0x258),_0x14467b(0x1be)],H=new Set([_0x14467b(0x21d),_0x14467b(0x1e2)]);function K(_0x374a23){const _0x348009=_0x14467b;return _0x374a23[_0x348009(0x20d)](/-([a-z])/g,(_0x61f4d3,_0x56356e)=>_0x56356e[_0x348009(0x1d7)]());}function U(_0x24d0c9){const _0x42b780=_0x14467b,_0x5bf107={'qrCnj':function(_0x242569,_0x1fc1c4){return _0x242569<_0x1fc1c4;},'uvBvs':function(_0x3186f8,_0x46d51e){return _0x3186f8===_0x46d51e;},'XmpLt':_0x42b780(0x253),'QhVcV':function(_0x4e1fff,_0x31e7d9){return _0x4e1fff===_0x31e7d9;},'wqthn':_0x42b780(0x251),'boruH':function(_0x4f9cd8,_0x4e11f7){return _0x4f9cd8===_0x4e11f7;},'tmyIt':_0x42b780(0x28c),'inowj':function(_0x593c03,_0x14864f){return _0x593c03(_0x14864f);}},_0xa5e7a4={'dryRun':!0x1,'_':[]};for(let _0x2c4c0e=0x0;_0x5bf107[_0x42b780(0x197)](_0x2c4c0e,_0x24d0c9[_0x42b780(0x27f)]);_0x2c4c0e++){const _0x3d96c2=_0x24d0c9[_0x2c4c0e];if(_0x5bf107['uvBvs'](_0x5bf107[_0x42b780(0x23c)],_0x3d96c2)||_0x5bf107[_0x42b780(0x241)]('-n',_0x3d96c2))_0xa5e7a4[_0x42b780(0x1f9)]=!0x0;else{if(_0x5bf107['QhVcV'](_0x5bf107[_0x42b780(0x185)],_0x3d96c2)||_0x5bf107[_0x42b780(0x19f)]('-y',_0x3d96c2))_0xa5e7a4['yes']=!0x0;else{if(_0x5bf107[_0x42b780(0x241)](_0x5bf107['tmyIt'],_0x3d96c2))_0xa5e7a4[_0x42b780(0x17e)]=_0x24d0c9[++_0x2c4c0e];else{if(_0x5bf107[_0x42b780(0x242)](_0x42b780(0x226),_0x3d96c2)||_0x5bf107[_0x42b780(0x19f)]('-h',_0x3d96c2))_0xa5e7a4[_0x42b780(0x26d)]=!0x0;else{if(_0x3d96c2[_0x42b780(0x187)]('--')&&_0x3d96c2['includes']('=')){const [_0x51ff97,_0x145864]=_0x3d96c2[_0x42b780(0x1bb)](0x2)[_0x42b780(0x218)](/=(.*)/,0x2);H[_0x42b780(0x1ba)](_0x51ff97)?_0xa5e7a4[_0x5bf107[_0x42b780(0x259)](K,_0x51ff97)]=!0x0:_0xa5e7a4[_0x51ff97]=_0x145864;}else{if(_0x3d96c2[_0x42b780(0x187)]('--')){const _0x337dfc=_0x3d96c2[_0x42b780(0x20d)](/^--/,'');H[_0x42b780(0x1ba)](_0x337dfc)?_0xa5e7a4[_0x5bf107[_0x42b780(0x259)](K,_0x337dfc)]=!0x0:_0xa5e7a4[_0x337dfc]=_0x24d0c9[++_0x2c4c0e];}else _0xa5e7a4['_'][_0x42b780(0x25f)](_0x3d96c2);}}}}}}return _0xa5e7a4;}function D(_0x5f0ff1,_0x3e8ac7){const _0x5cc410=_0x14467b,_0x3cf1cb={'bCgKF':function(_0x3e83f3,_0x44e407,_0x5a14d4){return _0x3e83f3(_0x44e407,_0x5a14d4);}};return _0x3cf1cb[_0x5cc410(0x1df)](_0x5b5618,_0x5f0ff1,{'isWindows':_0x3e8ac7});}function W(_0x3a7e23){const _0x425da3=_0x14467b;return(_0x3a7e23?B:N)[_0x425da3(0x296)](_0x33cd68=>D(_0x33cd68,_0x3a7e23));}const z='\x0a子命令:\x0a\x20\x20restore\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20从备份恢复(扫描\x20~/.codex\x20/\x20~/.claude\x20/\x20~/.gemini\x20下的\x20.bak.*\x20文件)\x0a\x20\x20reset\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20恢复官方默认(删\x202api.store\x20写入的配置,并从最新备份恢复)\x0a\x20\x20refresh-groups\x20\x20\x20刷新分组列表(只展示,不改\x20key/配置)\x0a\x20\x20diagnose\x20\x20\x20\x20\x20\x20\x20\x20\x20诊断连接并生成日志压缩包(环境收集+渠道实测+CLI实测,发给客服排障)\x0a\x0a所有子命令都支持\x20--api-base\x20<url>\x20覆盖端点,restore/reset\x20支持\x20--dry-run。\x0a'[_0x14467b(0x233)]();function F(_0x39af14){const _0xd3add6=_0x14467b,_0x2638dc={'yWKkr':function(_0x5e3cf9,_0x5cd2fe){return _0x5e3cf9<_0x5cd2fe;},'xAiMB':function(_0x397160,_0x4f4289){return _0x397160!=_0x4f4289;},'MQOgg':function(_0x19d537,_0x463e21){return _0x19d537>_0x463e21;},'sdpkg':'slow','EoHmr':_0xd3add6(0x1c1)};return _0x39af14[_0xd3add6(0x1d4)]>=0xc8&&_0x2638dc['yWKkr'](_0x39af14['status'],0x12c)?_0x2638dc['xAiMB'](null,_0x39af14[_0xd3add6(0x24b)])&&_0x2638dc['MQOgg'](_0x39af14[_0xd3add6(0x24b)],0x2710)?_0x2638dc[_0xd3add6(0x247)]:'ok':_0x2638dc[_0xd3add6(0x25a)];}function _0x8873(_0x31e5bc,_0x4890f0){_0x31e5bc=_0x31e5bc-0x178;const _0x4e67c8=_0x4e67();let _0x887319=_0x4e67c8[_0x31e5bc];return _0x887319;}function Y({zipPath:_0x317faa,summary:_0x33315c}){const _0x4cff57=_0x14467b,_0x109134={'DkLFe':function(_0x20be85,_0x14d0f1){return _0x20be85(_0x14d0f1);},'JLnBk':function(_0x4f252c,_0x244b51){return _0x4f252c(_0x244b51);},'GfPtT':function(_0x2d5239,_0x1f4f13){return _0x2d5239>_0x1f4f13;},'Asjtw':'ttfb/总延迟','jHXmG':function(_0x234aec,_0x22c237){return _0x234aec(_0x22c237);},'RxrHL':function(_0x41e532,_0x181b1c){return _0x41e532===_0x181b1c;},'QZoKg':function(_0x242476,_0x2a5e22){return _0x242476===_0x2a5e22;},'TVQxc':_0x4cff57(0x29f),'KEDRk':function(_0x3fccd6,_0xda621a){return _0x3fccd6(_0xda621a);},'HQnze':_0x4cff57(0x250),'GqXcF':_0x4cff57(0x20a),'NAxPC':function(_0x292e06,_0x78940c){return _0x292e06(_0x78940c);},'FZXUr':function(_0x28b5d7,_0x4b147d){return _0x28b5d7!=_0x4b147d;}};console[_0x4cff57(0x1dd)](),_0x109134[_0x4cff57(0x17b)](_0x24ea79,'诊断摘要');const _0x11164c=Array[_0x4cff57(0x1b6)](_0x33315c[_0x4cff57(0x252)])?_0x33315c[_0x4cff57(0x252)]:[];if(_0x109134[_0x4cff57(0x205)](_0x11164c[_0x4cff57(0x27f)],0x0)){const _0x16ab8d=Math['max'](0x6,..._0x11164c[_0x4cff57(0x296)](_0x3947fb=>String(_0x3947fb['model'])[_0x4cff57(0x27f)])),_0x320e72=Math['max'](0x6,..._0x11164c[_0x4cff57(0x296)](_0x14492c=>String(_0x14492c[_0x4cff57(0x26e)]??'-')[_0x4cff57(0x27f)]));_0x109134[_0x4cff57(0x17b)](_0x3861df,_0x2ee820['bold']['cyan']('\x20\x20'+'模型'[_0x4cff57(0x1b0)](_0x16ab8d)+'\x20\x20'+'判定'['padEnd'](_0x320e72)+'\x20\x20'+'状态'[_0x4cff57(0x1b0)](0x6)+'\x20\x20'+_0x109134['Asjtw'][_0x4cff57(0x1b0)](0x12)+_0x4cff57(0x1a1)));for(const _0x199ece of _0x11164c){const _0xb65fa3=_0x109134[_0x4cff57(0x274)](F,_0x199ece),_0x1309b9=String(_0x199ece['verdict']??'-')[_0x4cff57(0x1b0)](_0x320e72),_0x350aee=_0x109134[_0x4cff57(0x1b4)]('ok',_0xb65fa3)?_0x2ee820[_0x4cff57(0x195)](_0x1309b9):_0x109134[_0x4cff57(0x1b9)](_0x109134[_0x4cff57(0x19c)],_0xb65fa3)?_0x2ee820[_0x4cff57(0x256)](_0x1309b9):_0x2ee820['red'](_0x1309b9),_0x5c641a=(_0x199ece['ttfb_ms']??'-')+_0x4cff57(0x290)+(_0x199ece[_0x4cff57(0x1e8)]??'-')+'ms';_0x109134[_0x4cff57(0x1a6)](_0x3861df,'\x20\x20'+_0x109134[_0x4cff57(0x17b)](String,_0x199ece['model'])['padEnd'](_0x16ab8d)+'\x20\x20'+_0x350aee+'\x20\x20'+String(_0x199ece[_0x4cff57(0x1d4)]??_0x109134[_0x4cff57(0x255)])[_0x4cff57(0x1b0)](0x6)+'\x20\x20'+_0x5c641a[_0x4cff57(0x1b0)](0x12)+'\x20\x20'+(_0x199ece['request_id']??'-'));}}else _0x109134[_0x4cff57(0x17b)](_0xb8bd2c,_0x109134[_0x4cff57(0x263)]);const _0x52ee79=Array[_0x4cff57(0x1b6)](_0x33315c['cli_tests'])?_0x33315c['cli_tests']:[];if(_0x109134[_0x4cff57(0x205)](_0x52ee79[_0x4cff57(0x27f)],0x0)){const _0x3b5085=function(_0x4dfabe){const _0x3e0376=_0x4cff57,_0x46691a={};try{const _0x84abf0=_0x109134[_0x3e0376(0x29c)](_0x5b8abe,new Uint8Array(_0x178e02[_0x3e0376(0x1da)](_0x4dfabe))),_0x5b7cae=Object[_0x3e0376(0x1e7)](_0x84abf0)[_0x3e0376(0x20f)](_0x41601a=>_0x41601a[_0x3e0376(0x211)](_0x3e0376(0x206)));if(!_0x5b7cae)return _0x46691a;for(const _0x18decc of Buffer[_0x3e0376(0x272)](_0x84abf0[_0x5b7cae])['toString'](_0x3e0376(0x1de))['split']('\x0a'))if(_0x18decc[_0x3e0376(0x233)]())try{const _0x174a22=JSON[_0x3e0376(0x219)](_0x18decc);_0x174a22&&_0x174a22['cli']&&(_0x46691a[_0x174a22[_0x3e0376(0x228)]]=_0x174a22[_0x3e0376(0x1f4)]);}catch{}}catch{}return _0x46691a;}(_0x317faa),_0x1090d0=Math[_0x4cff57(0x22d)](0x6,..._0x52ee79[_0x4cff57(0x296)](_0x5a9a97=>String(_0x5a9a97['cli'])[_0x4cff57(0x27f)]));for(const _0x204c2e of _0x52ee79){const _0x2c3f57=_0x109134[_0x4cff57(0x1bc)](String,_0x204c2e[_0x4cff57(0x26e)]??'-'),_0x405b9b=_0x109134[_0x4cff57(0x1b4)]('ok',_0x2c3f57)?_0x2ee820[_0x4cff57(0x195)](_0x2c3f57):_0x2ee820['red'](_0x2c3f57),_0x5c39de=_0x109134[_0x4cff57(0x21c)](null,_0x3b5085[_0x204c2e[_0x4cff57(0x228)]])?_0x3b5085[_0x204c2e[_0x4cff57(0x228)]]+'ms':'-';_0x109134['KEDRk'](_0x3861df,'\x20\x20'+_0x109134[_0x4cff57(0x274)](String,_0x204c2e[_0x4cff57(0x228)])[_0x4cff57(0x1b0)](_0x1090d0)+'\x20\x20'+_0x405b9b[_0x4cff57(0x1b0)](0x6)+_0x4cff57(0x199)+(_0x204c2e['exit_code']??_0x4cff57(0x250))+'\x20\x20'+_0x5c39de);}}}export const SUBCOMMANDS={'restore':{'handler':async function(_0x5793c3){const _0x488961=_0x14467b,_0x3cd903={'pVMzf':function(_0x2f715a,_0x32de2b){return _0x2f715a(_0x32de2b);},'fUYIv':'dummy','rAOEH':function(_0x4a8f63,_0x14e2fb){return _0x4a8f63(_0x14e2fb);},'UuvOz':function(_0x5c778a,_0x499c9f){return _0x5c778a>_0x499c9f;},'jxmSW':_0x488961(0x23f),'ccIdM':function(_0x16601d){return _0x16601d();},'DjxNg':function(_0x3872eb,_0x19a9b5){return _0x3872eb(_0x19a9b5);},'JkSxG':function(_0x431d5a,_0x4a7347){return _0x431d5a(_0x4a7347);},'rPRdk':'扫描备份文件','qSQPv':function(_0x24d6f9,_0x1a2c9b){return _0x24d6f9(_0x1a2c9b);},'HhsKh':'【试运行模式\x20--dry-run】不会真实恢复文件','tMzGU':function(_0x353e04,_0x563f92){return _0x353e04===_0x563f92;},'LLZOx':function(_0x33f90b,_0x487db8){return _0x33f90b(_0x487db8);},'gcmtQ':_0x488961(0x1e0),'ZOYOY':function(_0x41cd41,_0x320737){return _0x41cd41(_0x320737);},'CwRMb':function(_0x240d2a,_0x336abf){return _0x240d2a(_0x336abf);},'vKjoa':_0x488961(0x29b),'GHRMt':function(_0x2258b3,_0xcf8611){return _0x2258b3(_0xcf8611);},'NioAw':_0x488961(0x267),'IToFJ':function(_0x2691d5,_0x2d02ef,_0x435bba,_0x3850d3){return _0x2691d5(_0x2d02ef,_0x435bba,_0x3850d3);},'ThuUh':_0x488961(0x215),'mKzgM':function(_0x4d7d5c,_0x3550a2){return _0x4d7d5c>=_0x3550a2;},'NSeEe':_0x488961(0x264),'MDYuS':function(_0x4270d8,_0x4b04d4){return _0x4270d8<_0x4b04d4;},'IAKsO':function(_0x9f793c,_0x2453bf){return _0x9f793c>=_0x2453bf;},'vcoQy':function(_0x3efe94,_0x110d07){return _0x3efe94(_0x110d07);},'Cqqwl':_0x488961(0x284),'VuYWb':_0x488961(0x1a7),'Logiu':function(_0x17b454,_0xe1a508){return _0x17b454(_0xe1a508);},'ARoLR':function(_0x342420,_0x187d51){return _0x342420(_0x187d51);}},_0x1c19a8=_0x3cd903['pVMzf'](U,_0x5793c3);if(_0x1c19a8['help'])return console['log']('npx\x20@2api-store/activate\x20restore\x20[options]\x0a\x0a'+z),0x0;_0x5e198b();const _0x501cf3=_0x3cd903[_0x488961(0x261)](_0x375296);if(!_0x501cf3[_0x488961(0x1d1)][_0x488961(0x278)])return _0x3cd903[_0x488961(0x23e)](_0x4b9df4,_0x488961(0x1b3)+_0x501cf3[_0x488961(0x1d1)][_0x488961(0x178)]),0x1;_0x3cd903[_0x488961(0x22f)](_0x24ea79,_0x3cd903[_0x488961(0x225)]);const _0x4777fa=_0x3cd903['pVMzf'](W,_0x501cf3['os'][_0x488961(0x1c0)]);_0x1c19a8[_0x488961(0x1f9)]&&_0x3cd903['qSQPv'](_0x183042,_0x3cd903['HhsKh']),_0x3cd903[_0x488961(0x280)](_0xb8bd2c,_0x488961(0x26a)+_0x4777fa[_0x488961(0x192)](',\x20'));const _0x13eab6=_0x3cd903[_0x488961(0x181)](_0x167215,_0x4777fa);if(_0x3cd903['tMzGU'](0x0,_0x13eab6[_0x488961(0x27f)]))return _0x3cd903['qSQPv'](_0xb8bd2c,_0x488961(0x24a)),_0x3cd903[_0x488961(0x22f)](_0xb8bd2c,'提示:只有运行过\x20npx\x20@2api-store/activate\x20后才会产生备份文件'),0x0;_0x3cd903['LLZOx'](_0x3e1f02,_0x488961(0x24d)+_0x13eab6[_0x488961(0x27f)]+_0x488961(0x283));const _0x14fed5={'.codex':'Codex\x20CLI','.claude':_0x488961(0x1af),'.gemini':_0x3cd903['gcmtQ']};function _0x5692fe(_0x14a4d3){const _0x3adbe2=_0x488961,_0xd88c69=process[_0x3adbe2(0x28b)][_0x3adbe2(0x186)]||process[_0x3adbe2(0x28b)][_0x3adbe2(0x249)]||'',_0x4fc9af=_0x2a326f[_0x3adbe2(0x279)](_0xd88c69,_0x14a4d3)['replace'](/\\/g,'/')[_0x3adbe2(0x218)]('/')[0x0];return _0x14fed5[_0x4fc9af]||_0x4fc9af;}function _0x44aec7(_0x32ac83){const _0x2395ba=_0x488961;return process[_0x2395ba(0x28b)][_0x2395ba(0x186)]||process[_0x2395ba(0x28b)][_0x2395ba(0x249)],_0x2a326f[_0x2395ba(0x1b1)](_0x32ac83);}const _0x12c22a={};for(const _0x2f0531 of _0x13eab6){const _0x345114=_0x3cd903[_0x488961(0x21f)](_0x44aec7,_0x2f0531[_0x488961(0x25c)]);_0x12c22a[_0x345114]||(_0x12c22a[_0x345114]=[]),_0x12c22a[_0x345114]['push'](_0x2f0531);}const _0x23072b=Object['keys'](_0x12c22a);if(_0x3cd903[_0x488961(0x232)](0x0,_0x23072b[_0x488961(0x27f)]))return _0x3cd903['CwRMb'](_0xb8bd2c,_0x3cd903[_0x488961(0x1ae)]),0x0;console['log'](),_0x3cd903['GHRMt'](_0x24ea79,_0x3cd903[_0x488961(0x212)]);const _0x1ec464=_0x23072b[_0x488961(0x296)](_0x379045=>{const _0x6c0073=_0x488961,_0x7381e3=_0x3cd903[_0x6c0073(0x265)](_0x5692fe,_0x2a326f['join'](_0x379045,_0x3cd903[_0x6c0073(0x217)])),_0x4fd3d3=_0x12c22a[_0x379045][_0x6c0073(0x27f)];return{'label':_0x2ee820[_0x6c0073(0x1f3)](_0x7381e3)+'('+_0x4fd3d3+_0x6c0073(0x286),'dir':_0x379045};}),_0x5469ad=await _0x3cd903[_0x488961(0x23d)](_0x4929aa,_0x3cd903[_0x488961(0x28d)],_0x1ec464,{'defaultIndex':0x0});if(_0x5469ad<0x0||_0x3cd903[_0x488961(0x1a4)](_0x5469ad,_0x1ec464[_0x488961(0x27f)]))return _0x4b9df4(_0x3cd903[_0x488961(0x19d)]),0x1;const _0x50cc00=_0x1ec464[_0x5469ad]['dir'],_0xa7efe7=_0x5692fe(_0x2a326f['join'](_0x50cc00,_0x3cd903[_0x488961(0x217)])),_0x36013d=_0x12c22a[_0x50cc00][_0x488961(0x1f6)]((_0x1dea72,_0x347868)=>_0x347868['mtime']-_0x1dea72[_0x488961(0x210)]),_0x2a0e1b={},_0x2ec879=[];for(const _0x5f0079 of _0x36013d){const _0x1dca6b=_0x2a326f['basename'](_0x5f0079[_0x488961(0x18c)])['match'](/\.bak\.(.+)$/),_0x5adeba=(_0x1dca6b?_0x1dca6b[0x1]:'')[_0x488961(0x20d)](/-\d{3}Z$/,'Z');_0x2a0e1b[_0x5adeba]||(_0x2a0e1b[_0x5adeba]=[],_0x2ec879['push'](_0x5adeba)),_0x2a0e1b[_0x5adeba]['push'](_0x5f0079);}for(const _0x5787eb of _0x2ec879){const _0x569a51=_0x2a0e1b[_0x5787eb],_0x59da8c={};for(const _0x23fcdc of _0x569a51)(!_0x59da8c[_0x23fcdc['origPath']]||_0x3cd903[_0x488961(0x1ee)](_0x23fcdc[_0x488961(0x210)],_0x59da8c[_0x23fcdc[_0x488961(0x25c)]][_0x488961(0x210)]))&&(_0x59da8c[_0x23fcdc[_0x488961(0x25c)]]=_0x23fcdc);_0x2a0e1b[_0x5787eb]=Object[_0x488961(0x222)](_0x59da8c)['sort']((_0x517991,_0x3fd60b)=>_0x3fd60b[_0x488961(0x210)]-_0x517991[_0x488961(0x210)]);}console[_0x488961(0x1dd)](),_0x24ea79('选择恢复时间点('+_0xa7efe7+')');const _0x30d97d=_0x2ec879['map'](_0x2ce40e=>{const _0x20473f=_0x488961,_0x2803b7=_0x2a0e1b[_0x2ce40e],_0x4db038=_0x2803b7[_0x20473f(0x296)](_0x2c8b08=>_0x2a326f[_0x20473f(0x297)](_0x2c8b08[_0x20473f(0x25c)]))[_0x20473f(0x192)](',\x20'),_0xda0d3f=function(_0x1aae5a){const _0x1c9ffd=_0x20473f;try{const _0x5b8cd6=new Date(_0x1aae5a),_0x2f4b2d=_0x46c710=>String(_0x46c710)['padStart'](0x2,'0');return _0x5b8cd6[_0x1c9ffd(0x1d3)]()+'-'+_0x3cd903['pVMzf'](_0x2f4b2d,_0x5b8cd6[_0x1c9ffd(0x25d)]()+0x1)+'-'+_0x2f4b2d(_0x5b8cd6[_0x1c9ffd(0x193)]())+'\x20'+_0x3cd903[_0x1c9ffd(0x181)](_0x2f4b2d,_0x5b8cd6[_0x1c9ffd(0x273)]())+':'+_0x2f4b2d(_0x5b8cd6[_0x1c9ffd(0x235)]())+':'+_0x2f4b2d(_0x5b8cd6[_0x1c9ffd(0x190)]());}catch{return new Date(_0x1aae5a)[_0x1c9ffd(0x194)]();}}(_0x2803b7[0x0][_0x20473f(0x210)]),_0xf31900=[];for(const _0xae94b1 of _0x2803b7)try{const _0x5198da=_0x178e02[_0x20473f(0x1da)](_0xae94b1[_0x20473f(0x18c)],_0x20473f(0x1de));if(!_0xf31900['find'](_0x7a6038=>_0x7a6038[_0x20473f(0x1b2)]('…'))){const _0x9190fe=_0x5198da[_0x20473f(0x1f8)](/sk-([a-zA-Z0-9]{10,})/);if(_0x9190fe)_0xf31900[_0x20473f(0x25f)](_0x20473f(0x1f5)+_0x9190fe[0x1][_0x20473f(0x1bb)](-0x6));else{const _0x19539d=_0x5198da[_0x20473f(0x1f8)](/(?:API_KEY|AUTH_TOKEN|OPENAI_API_KEY|ANTHROPIC_API_KEY|ANTHROPIC_AUTH_TOKEN)["':\s]+["']([a-zA-Z0-9._-]{10,})["']/);if(_0x19539d)_0xf31900['push'](_0x20473f(0x1cd)+_0x19539d[0x1][_0x20473f(0x1bb)](-0x6));else{const _0x27ff6f=_0x5198da[_0x20473f(0x1f8)](/export\s+(?:API_KEY|AUTH_TOKEN|OPENAI_API_KEY|ANTHROPIC_API_KEY|ANTHROPIC_AUTH_TOKEN)=(["']?)([a-zA-Z0-9._-]{10,})/);_0x27ff6f&&_0xf31900[_0x20473f(0x25f)](_0x20473f(0x1cd)+_0x27ff6f[0x2][_0x20473f(0x1bb)](-0x6));}}}if(!_0xf31900[_0x20473f(0x20f)](_0x2d5154=>_0x2d5154[_0x20473f(0x187)]('http'))){const _0x1877cf=_0x5198da[_0x20473f(0x1f8)](/(https?:\/\/[^\s"'`}]+)/);_0x1877cf&&_0xf31900[_0x20473f(0x25f)](_0x1877cf[0x1][_0x20473f(0x20d)](/\/+$/,''));}if(!_0xf31900[_0x20473f(0x20f)](_0x8d2d02=>_0x8d2d02[_0x20473f(0x187)](_0x20473f(0x268)))){const _0x521440=_0x5198da[_0x20473f(0x1f8)](/(?:^|\n)\s*model\s*[=:]\s*["']?([a-zA-Z0-9][\w.-]+)/);_0x521440&&_0xf31900[_0x20473f(0x25f)](_0x20473f(0x1a5)+_0x521440[0x1]);}}catch{}const _0x5c19f5=_0x3cd903[_0x20473f(0x1ee)](_0xf31900[_0x20473f(0x27f)],0x0)?'\x20'+_0x2ee820['yellow'](_0xf31900[_0x20473f(0x192)](_0x3cd903['jxmSW'])):'';return{'label':_0x2ee820[_0x20473f(0x19b)](_0xda0d3f)+'('+_0x2803b7[_0x20473f(0x27f)]+_0x20473f(0x1cf)+_0x4db038+')'+_0x5c19f5,'ts':_0x2ce40e,'group':_0x2803b7};}),_0x523eb0=await _0x3cd903[_0x488961(0x23d)](_0x4929aa,_0x488961(0x285),_0x30d97d,{'defaultIndex':0x0});if(_0x3cd903[_0x488961(0x1c9)](_0x523eb0,0x0)||_0x3cd903[_0x488961(0x1f0)](_0x523eb0,_0x30d97d[_0x488961(0x27f)]))return _0x3cd903[_0x488961(0x1c6)](_0x4b9df4,_0x3cd903[_0x488961(0x295)]),0x1;const _0x1c72c6=_0x30d97d[_0x523eb0][_0x488961(0x1c4)];console['log'](),_0xb8bd2c(_0x488961(0x20e)+_0xa7efe7+'('+_0x1c72c6[_0x488961(0x27f)]+_0x488961(0x179));for(const _0x248119 of _0x1c72c6)_0x3cd903[_0x488961(0x22f)](_0xb8bd2c,'\x20\x20'+_0x2a326f[_0x488961(0x297)](_0x248119[_0x488961(0x25c)])+_0x488961(0x24f)+_0x2a326f[_0x488961(0x297)](_0x248119[_0x488961(0x18c)]));if(_0x1c19a8[_0x488961(0x1f9)])return _0x3cd903['DjxNg'](_0x183042,_0x3cd903[_0x488961(0x1d0)]),0x0;let _0x594706=0x0;for(const _0x32e7ca of _0x1c72c6){if(_0x178e02[_0x488961(0x22a)](_0x32e7ca['origPath']))try{const _0x5db09a=_0x3cd903[_0x488961(0x1b5)](_0xdaa780,_0x32e7ca[_0x488961(0x25c)]);_0x5db09a&&_0x3cd903[_0x488961(0x17a)](_0xb8bd2c,_0x488961(0x1a8)+_0x2a326f[_0x488961(0x297)](_0x32e7ca['origPath'])+_0x488961(0x183)+_0x2a326f['basename'](_0x5db09a));}catch{}try{_0x49bc65(_0x32e7ca[_0x488961(0x18c)],_0x32e7ca[_0x488961(0x25c)]),_0x3cd903[_0x488961(0x1dc)](_0x3e1f02,_0x488961(0x1e4)+_0x32e7ca[_0x488961(0x25c)]),_0x594706++;}catch(_0x366df1){_0x3cd903[_0x488961(0x23e)](_0x4b9df4,_0x488961(0x262)+_0x32e7ca[_0x488961(0x25c)]+'('+_0x366df1[_0x488961(0x18f)]+')');}}return _0xb8bd2c(_0x488961(0x17c)+_0x594706+_0x488961(0x270)),_0x594706>0x0?0x0:0x3;},'description':_0x14467b(0x189)},'reset':{'handler':async function(_0x321110){const _0x180588=_0x14467b,_0x1d5056={'dOdij':function(_0x8b08aa){return _0x8b08aa();},'xPLln':function(_0x4fc72a,_0x439f17){return _0x4fc72a(_0x439f17);},'YXYPi':_0x180588(0x208),'lVQnX':function(_0x4e1952,_0x278717){return _0x4e1952===_0x278717;},'xsvgD':function(_0x40d866,_0x567a9e){return _0x40d866(_0x567a9e);},'vCLmN':_0x180588(0x209),'SBztY':_0x180588(0x19e),'nqKIT':_0x180588(0x1fc),'gLJql':function(_0x466eff,_0x48e5a8){return _0x466eff>_0x48e5a8;},'PAmXP':_0x180588(0x214),'MChhj':'确认操作','toOnx':_0x180588(0x1ad),'ttmOU':'\x20\x20\x20删除前会再备份一次(.bak.reset.<时间戳>),可手动恢复。','bNORP':function(_0x1d483f,_0x5264ef,_0x5999bb){return _0x1d483f(_0x5264ef,_0x5999bb);},'tUVUT':'确认\x20reset\x20吗?','wleBX':function(_0x225b8a,_0x43a60e){return _0x225b8a(_0x43a60e);},'lguyK':_0x180588(0x1e5),'IMrVn':function(_0x1132e6,_0x300b18){return _0x1132e6(_0x300b18);},'MBGVZ':_0x180588(0x29d),'nTRBt':function(_0x1fb877,_0x39f1ba){return _0x1fb877(_0x39f1ba);},'rpdfi':function(_0x507fd9,_0x196cc6){return _0x507fd9>_0x196cc6;},'cejBd':function(_0x5b7ead,_0x4ee541){return _0x5b7ead(_0x4ee541);},'XgxOU':_0x180588(0x260),'cuKva':function(_0xdd602b,_0x22486b){return _0xdd602b(_0x22486b);},'WwSOH':function(_0x15681c,_0xf76bbc){return _0x15681c(_0xf76bbc);},'eOWAG':function(_0x4eb90f,_0x24aed4){return _0x4eb90f>_0x24aed4;},'MxqRr':_0x180588(0x276),'UPoTW':function(_0x1d3d70,_0x5909df){return _0x1d3d70(_0x5909df);},'BBgsi':_0x180588(0x1ab),'Lzmzg':function(_0x1d4866,_0x1b9bc1){return _0x1d4866===_0x1b9bc1;},'VBMPA':_0x180588(0x289),'iPPAa':function(_0x370c8c,_0x5c582c){return _0x370c8c===_0x5c582c;},'sYFqO':function(_0x191388,_0x3d6fa5){return _0x191388(_0x3d6fa5);},'nEeMX':_0x180588(0x238),'dqmYg':function(_0x1f6aa7,_0x173bb4){return _0x1f6aa7(_0x173bb4);},'ZBQbX':_0x180588(0x29a),'iHrDl':'安全备份位置(如需撤销\x20reset,手动恢复这些文件):','todig':_0x180588(0x21a)},_0xefe07c=U(_0x321110);if(_0xefe07c[_0x180588(0x26d)])return console[_0x180588(0x1dd)](_0x180588(0x22e)+z),0x0;_0x1d5056[_0x180588(0x17f)](_0x5e198b);const _0x426773=_0x375296();if(!_0x426773[_0x180588(0x1d1)][_0x180588(0x278)])return _0x1d5056['xPLln'](_0x4b9df4,'需要\x20node\x20>=\x2018,当前\x20'+_0x426773[_0x180588(0x1d1)]['version']),0x1;var _0x3f82b2;_0x24ea79(_0x1d5056[_0x180588(0x26b)]);const _0x2fc239=((_0x3f82b2=_0x426773['os']['isWindows'])?M:R)[_0x180588(0x296)](_0x6d051f=>D(_0x6d051f,_0x3f82b2))['filter'](_0x3b227f=>{const _0x319eda=_0x180588;try{return _0x178e02[_0x319eda(0x22a)](_0x3b227f);}catch{return!0x1;}});if(_0x1d5056[_0x180588(0x202)](0x0,_0x2fc239[_0x180588(0x27f)]))return _0x1d5056[_0x180588(0x1f7)](_0x183042,_0x1d5056[_0x180588(0x227)]),_0x1d5056['xPLln'](_0xb8bd2c,_0x1d5056['SBztY']),0x0;_0xb8bd2c(_0x1d5056[_0x180588(0x23b)]),_0x2fc239[_0x180588(0x1b8)](_0x2699da=>_0x3861df(_0x180588(0x24e)+_0x2ee820[_0x180588(0x256)](_0x2699da))),console[_0x180588(0x1dd)]();const _0x2cc13a=W(_0x426773['os'][_0x180588(0x1c0)]),_0xce75b5=_0x1d5056[_0x180588(0x29e)](_0x167215,_0x2cc13a),_0x17192a=_0x1d5056['gLJql'](_0xce75b5[_0x180588(0x27f)],0x0);if(_0x17192a?_0x3e1f02('发现\x20'+_0xce75b5[_0x180588(0x27f)]+'\x20个备份文件(reset\x20后将尝试恢复每个配置的最新备份)'):_0x183042(_0x1d5056[_0x180588(0x294)]),console[_0x180588(0x1dd)](),_0x24ea79(_0x1d5056[_0x180588(0x18e)]),_0x1d5056[_0x180588(0x29e)](_0x183042,_0x1d5056[_0x180588(0x1eb)]),_0x183042(_0x1d5056[_0x180588(0x1fd)]),!await _0x1d5056[_0x180588(0x1fa)](_0x34f933,_0x1d5056[_0x180588(0x282)],{'defaultValue':!0x1}))return _0x3861df(_0x180588(0x21e)),0x0;if(console['log'](),_0xefe07c[_0x180588(0x1f9)])return _0x1d5056['wleBX'](_0x183042,_0x1d5056['lguyK']),_0x1d5056[_0x180588(0x243)](_0xb8bd2c,_0x1d5056[_0x180588(0x2a0)]),_0x2fc239[_0x180588(0x1b8)](_0x7a7b85=>_0x3861df('\x20\x20-\x20删除\x20'+_0x7a7b85)),_0x17192a&&(_0x1d5056[_0x180588(0x18b)](_0xb8bd2c,_0x180588(0x20c)),_0xce75b5[_0x180588(0x1bb)](0x0,0x5)[_0x180588(0x1b8)](_0x4d345a=>_0x3861df(_0x180588(0x24e)+_0x4d345a[_0x180588(0x18c)]+_0x180588(0x183)+_0x4d345a[_0x180588(0x25c)])),_0x1d5056['rpdfi'](_0xce75b5[_0x180588(0x27f)],0x5)&&_0x3861df(_0x180588(0x1d8)+_0xce75b5[_0x180588(0x27f)]+_0x180588(0x286))),0x0;_0x1d5056['cejBd'](_0x24ea79,_0x1d5056[_0x180588(0x1e1)]);const _0x37b151=[];for(const _0x41ad42 of _0x2fc239)try{const _0x99eac6=_0x41ad42+_0x180588(0x1fb)+new Date()[_0x180588(0x194)]()[_0x180588(0x20d)](/[:.]/g,'-');_0x178e02[_0x180588(0x234)](_0x41ad42,_0x99eac6),_0x37b151['push'](_0x99eac6),_0x1d5056['cuKva'](_0x3861df,_0x180588(0x23a)+_0x41ad42+_0x180588(0x183)+_0x99eac6);}catch(_0x3fb554){_0x1d5056[_0x180588(0x271)](_0x4b9df4,'安全备份失败\x20'+_0x41ad42+':'+_0x3fb554[_0x180588(0x18f)]+_0x180588(0x1d5));}_0x1d5056[_0x180588(0x287)](_0x37b151['length'],0x0)&&_0x1d5056['cejBd'](_0x3e1f02,_0x180588(0x188)+_0x37b151['length']+_0x180588(0x270)),console[_0x180588(0x1dd)](),_0x24ea79(_0x1d5056[_0x180588(0x18d)]);const _0x52a2e2=[];for(const _0x533e15 of _0x2fc239)try{_0x178e02[_0x180588(0x298)](_0x533e15),_0x1d5056['UPoTW'](_0x3e1f02,_0x180588(0x239)+_0x533e15),_0x52a2e2[_0x180588(0x25f)](_0x533e15);}catch(_0x1c91ca){_0x1d5056['lVQnX'](_0x1d5056[_0x180588(0x1a0)],_0x1c91ca[_0x180588(0x27e)])||_0x1d5056[_0x180588(0x180)](_0x1d5056[_0x180588(0x28f)],_0x1c91ca['code'])||_0x1d5056['iPPAa'](_0x180588(0x27a),_0x1c91ca[_0x180588(0x27e)])?_0x4b9df4(_0x180588(0x1ef)+_0x533e15+_0x180588(0x196)):_0x1d5056[_0x180588(0x224)](_0x4b9df4,'删除失败\x20'+_0x533e15+':'+_0x1c91ca[_0x180588(0x18f)]);}if(console[_0x180588(0x1dd)](),_0x17192a){_0x1d5056[_0x180588(0x203)](_0x24ea79,_0x1d5056[_0x180588(0x293)]);const _0x59c641=new Map();for(const _0x2b47a1 of _0xce75b5){const _0x46bbaa=_0x59c641[_0x180588(0x1ed)](_0x2b47a1[_0x180588(0x25c)]);(!_0x46bbaa||_0x1d5056[_0x180588(0x1e6)](_0x2b47a1[_0x180588(0x210)],_0x46bbaa[_0x180588(0x210)]))&&_0x59c641[_0x180588(0x246)](_0x2b47a1['origPath'],_0x2b47a1);}let _0x418a28=0x0;for(const [_0x4ffa0f,_0x57ecd1]of _0x59c641)try{_0x1d5056[_0x180588(0x1fa)](_0x49bc65,_0x57ecd1[_0x180588(0x18c)],_0x4ffa0f),_0x1d5056[_0x180588(0x27b)](_0x3e1f02,'已恢复:'+_0x57ecd1[_0x180588(0x18c)]+'\x20→\x20'+_0x4ffa0f),_0x418a28++;}catch(_0x1bbec1){_0x183042('恢复失败\x20'+_0x4ffa0f+':'+_0x1bbec1['message']+'(文件已删除,未恢复)');}_0x418a28>0x0&&_0xb8bd2c(_0x180588(0x20b)+_0x418a28+_0x180588(0x270)),console[_0x180588(0x1dd)]();}return _0x1d5056[_0x180588(0x271)](_0x24ea79,_0x1d5056[_0x180588(0x198)]),_0x3e1f02(_0x180588(0x231)+_0x52a2e2[_0x180588(0x27f)]+_0x180588(0x230)),_0x1d5056[_0x180588(0x287)](_0x37b151['length'],0x0)&&(_0x1d5056['IMrVn'](_0xb8bd2c,_0x1d5056[_0x180588(0x1a9)]),_0x37b151[_0x180588(0x1b8)](_0x52dac6=>_0x3861df('\x20\x20-\x20'+_0x52dac6))),_0x1d5056[_0x180588(0x271)](_0xb8bd2c,_0x1d5056[_0x180588(0x26c)]),_0x1d5056[_0x180588(0x287)](_0x52a2e2[_0x180588(0x27f)],0x0)?0x0:0x1;},'description':_0x14467b(0x1c5)},'refresh-groups':{'handler':async function(_0x4ddde9){const _0x418fd6=_0x14467b,_0x3315cf={'MbNzV':function(_0x4eae88,_0x580865){return _0x4eae88(_0x580865);},'MQUkV':function(_0x1c9ac7){return _0x1c9ac7();},'SHKYA':function(_0x3d38fa){return _0x3d38fa();},'iZsfQ':function(_0x50b578,_0x14015b){return _0x50b578===_0x14015b;},'vqZcN':function(_0x34056d,_0x270657){return _0x34056d(_0x270657);},'yLyqy':_0x418fd6(0x1c8),'sVlBV':function(_0x378804,_0x1b4201){return _0x378804(_0x1b4201);},'HvfAp':_0x418fd6(0x1bd),'Fvpgg':function(_0x11bdba,_0x376f12){return _0x11bdba(_0x376f12);},'gOELy':function(_0xc6f22c,_0x1f36c4){return _0xc6f22c+_0x1f36c4;},'XjWZT':function(_0x13bb7e,_0x367223){return _0x13bb7e(_0x367223);},'mRJvp':_0x418fd6(0x24c),'zdTlJ':_0x418fd6(0x22c),'WpBDC':function(_0x40d73f,_0x4edf33){return _0x40d73f(_0x4edf33);},'myNtm':_0x418fd6(0x1d9),'Snlcu':'(本命令仅展示分组,不修改\x20API\x20Key\x20或配置文件)'},_0x3e1178=_0x3315cf[_0x418fd6(0x248)](U,_0x4ddde9);if(_0x3e1178['help'])return console[_0x418fd6(0x1dd)](_0x418fd6(0x257)+z),0x0;_0x3315cf[_0x418fd6(0x1f1)](_0x5e198b);const _0x3fec42=_0x3315cf[_0x418fd6(0x1bf)](_0x375296);if(!_0x3fec42[_0x418fd6(0x1d1)]['supported'])return _0x4b9df4('需要\x20node\x20>=\x2018,当前\x20'+_0x3fec42[_0x418fd6(0x1d1)]['version']),0x1;const _0x379392=_0x3e1178['apiBase']||process[_0x418fd6(0x28b)][_0x418fd6(0x1e9)]||C;_0x3315cf[_0x418fd6(0x248)](_0xb8bd2c,'API\x20端点:'+_0x379392),console[_0x418fd6(0x1dd)](),_0x24ea79(_0x418fd6(0x1b7));let _0x53899f=[];try{_0x53899f=await _0x3315cf['MbNzV'](_0x403c03,{'apiBase':_0x379392});}catch(_0x411b6e){return _0x3315cf[_0x418fd6(0x248)](_0x4b9df4,_0x418fd6(0x291)+_0x411b6e['message']),0x1;}if(_0x3315cf[_0x418fd6(0x240)](0x0,_0x53899f['length']))return _0x3315cf['vqZcN'](_0x183042,_0x3315cf['yLyqy']),_0x3315cf[_0x418fd6(0x266)](_0xb8bd2c,_0x3315cf[_0x418fd6(0x200)]),_0xb8bd2c('当前端点:'+_0x379392+_0x418fd6(0x236)),0x0;_0x3315cf[_0x418fd6(0x28a)](_0x3e1f02,_0x418fd6(0x221)+_0x53899f[_0x418fd6(0x27f)]+_0x418fd6(0x254)),console[_0x418fd6(0x1dd)](),_0x3315cf[_0x418fd6(0x248)](_0x24ea79,_0x418fd6(0x207));const _0x58e355=Math['max'](0x4,..._0x53899f[_0x418fd6(0x296)](_0x500cc8=>String(_0x500cc8['id']??'')[_0x418fd6(0x27f)])),_0x45ce62=Math[_0x418fd6(0x22d)](0x6,..._0x53899f[_0x418fd6(0x296)](_0xa311e=>String(_0xa311e[_0x418fd6(0x229)]??'')[_0x418fd6(0x27f)])),_0x426c53='\x20\x20'+'ID'[_0x418fd6(0x1b0)](_0x58e355)+'\x20\x20'+'名称'['padEnd'](_0x45ce62)+_0x418fd6(0x1db);return _0x3861df(_0x2ee820[_0x418fd6(0x191)][_0x418fd6(0x1f3)](_0x426c53)),_0x3861df(_0x2ee820['dim'](_0x3315cf[_0x418fd6(0x27c)]('\x20\x20','─'['repeat'](_0x3315cf[_0x418fd6(0x27c)](_0x3315cf[_0x418fd6(0x27c)](_0x58e355,_0x45ce62),0xf))))),_0x53899f[_0x418fd6(0x1b8)]((_0x22db99,_0x539f47)=>{const _0x2378df=_0x418fd6,_0x4bec47=String(_0x22db99['id']??'')[_0x2378df(0x1b0)](_0x58e355),_0x7bdb67=String(_0x22db99['name']??'')[_0x2378df(0x1b0)](_0x45ce62),_0x82e833='\x20\x20'+_0x2ee820[_0x2378df(0x256)](_0x4bec47)+'\x20\x20'+_0x2ee820[_0x2378df(0x195)](_0x7bdb67);_0x3315cf[_0x2378df(0x248)](_0x3861df,_0x82e833);}),console[_0x418fd6(0x1dd)](),_0x3315cf[_0x418fd6(0x182)](_0xb8bd2c,_0x3315cf['mRJvp']),_0x3861df(_0x3315cf[_0x418fd6(0x1c2)]),_0x3315cf['WpBDC'](_0x3861df,_0x3315cf[_0x418fd6(0x288)]),_0xb8bd2c(_0x3315cf[_0x418fd6(0x216)]),0x0;},'description':_0x14467b(0x299)},'diagnose':{'handler':async function(_0x4799b7){const _0x5ac178=_0x14467b,_0x4aa2e1={'cfXaF':function(_0x2ec8b0,_0x93d39a){return _0x2ec8b0(_0x93d39a);},'MlwTd':function(_0x3c5bea){return _0x3c5bea();},'dDFQL':function(_0xa67a10,_0x308a2f){return _0xa67a10===_0x308a2f;},'wsmlC':_0x5ac178(0x1f2),'Sroxv':_0x5ac178(0x26f),'ZMaIE':function(_0x14e016,_0x13986b){return _0x14e016(_0x13986b);},'lhCkh':function(_0x406914,_0x495628){return _0x406914(_0x495628);},'DxkxZ':function(_0x28288b,_0x2f87e0){return _0x28288b(_0x2f87e0);},'rWzqT':_0x5ac178(0x1c3)},_0x2926f9=_0x4aa2e1['cfXaF'](U,_0x4799b7);if(_0x2926f9[_0x5ac178(0x26d)])return console[_0x5ac178(0x1dd)](_0x5ac178(0x244)+z),0x0;_0x4aa2e1[_0x5ac178(0x1d6)](_0x5e198b);const _0x1862e8=_0x375296();if(!_0x1862e8[_0x5ac178(0x1d1)][_0x5ac178(0x278)])return _0x4b9df4(_0x5ac178(0x1b3)+_0x1862e8['node'][_0x5ac178(0x178)]),0x1;const _0x2849ce=_0x2926f9[_0x5ac178(0x17e)]||process['env'][_0x5ac178(0x1e9)]||C;_0x4aa2e1['cfXaF'](_0xb8bd2c,_0x5ac178(0x22b)+_0x2849ce);const _0x2d9725={'yes':_0x4aa2e1['dDFQL'](!0x0,_0x2926f9[_0x5ac178(0x281)]),'models':_0x4aa2e1[_0x5ac178(0x1ea)]==typeof _0x2926f9['model']?_0x2926f9[_0x5ac178(0x268)]:void 0x0,'skipCliTests':_0x4aa2e1[_0x5ac178(0x1cc)](!0x0,_0x2926f9[_0x5ac178(0x275)]),'outDir':_0x2926f9[_0x5ac178(0x19a)]};let _0x2f30cf;_0x2d9725['yes']||_0x4aa2e1[_0x5ac178(0x21b)](_0xb8bd2c,_0x4aa2e1['Sroxv']);try{_0x2f30cf=await _0x58947d({'apiBase':_0x2849ce,'opts':_0x2d9725,'ui':{'banner':_0x5e198b,'ok':_0x3e1f02,'fail':_0x4b9df4,'warn':_0x183042,'info':_0xb8bd2c,'step':_0x24ea79,'plain':_0x3861df,'guide':_0x12c245,'chalk':_0x2ee820}});}catch(_0x4b39f5){return _0x4b9df4(_0x5ac178(0x1cb)+(_0x4b39f5?.[_0x5ac178(0x18f)]||_0x4b39f5)),0x1;}return _0x4aa2e1[_0x5ac178(0x269)](Y,_0x2f30cf),_0x4aa2e1[_0x5ac178(0x1c7)](_0x3e1f02,_0x5ac178(0x25b)+_0x2f30cf[_0x5ac178(0x18a)]),_0x4aa2e1[_0x5ac178(0x1ec)](_0xb8bd2c,_0x4aa2e1[_0x5ac178(0x1ac)]),0x0;},'description':_0x14467b(0x1e3)}};export const SUBCOMMAND_NAMES=new Set(Object[_0x14467b(0x1e7)](SUBCOMMANDS));export{z as SUB_HELP};
|
package/dist/lib/detect.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x4a7e99=_0x1772;(function(_0x55c9cc,_0x8c02b2){const _0xe377c3=_0x1772,_0x4eaf5e=_0x55c9cc();while(!![]){try{const _0x18935=parseInt(_0xe377c3(0x1be))/0x1*(-parseInt(_0xe377c3(0x1bd))/0x2)+parseInt(_0xe377c3(0x1bf))/0x3*(parseInt(_0xe377c3(0x1ca))/0x4)+parseInt(_0xe377c3(0x1de))/0x5+parseInt(_0xe377c3(0x1cd))/0x6*(-parseInt(_0xe377c3(0x1b4))/0x7)+-parseInt(_0xe377c3(0x1dc))/0x8*(-parseInt(_0xe377c3(0x1dd))/0x9)+parseInt(_0xe377c3(0x1b9))/0xa+-parseInt(_0xe377c3(0x1b5))/0xb;if(_0x18935===_0x8c02b2)break;else _0x4eaf5e['push'](_0x4eaf5e['shift']());}catch(_0x3313b7){_0x4eaf5e['push'](_0x4eaf5e['shift']());}}}(_0x33ff,0x75c6e));import{spawnSync as _0x1e5246}from'node:child_process';function _0x1772(_0x3fb75e,_0x283796){_0x3fb75e=_0x3fb75e-0x1b2;const _0x33ffa3=_0x33ff();let _0x177254=_0x33ffa3[_0x3fb75e];return _0x177254;}export function detectOS(){const _0x14a5cb=_0x1772,_0x54a9be={'uXFpN':function(_0x3c09c4,_0x50970d){return _0x3c09c4===_0x50970d;},'RelsE':_0x14a5cb(0x1e3),'FOwlW':_0x14a5cb(0x1db),'fHIYt':function(_0x329ce2,_0x1b1ec3){return _0x329ce2===_0x1b1ec3;},'VNBYm':_0x14a5cb(0x1d0),'UMOMN':_0x14a5cb(0x1da)},_0x1e2373=process[_0x14a5cb(0x1d3)],_0x84742e=_0x54a9be[_0x14a5cb(0x1e2)](_0x54a9be[_0x14a5cb(0x1cc)],_0x1e2373);return{'platform':_0x1e2373,'isWindows':_0x84742e,'isMac':_0x54a9be[_0x14a5cb(0x1cb)]===_0x1e2373,'isLinux':_0x54a9be['fHIYt'](_0x54a9be[_0x14a5cb(0x1d8)],_0x1e2373),'osType':_0x84742e?'windows':_0x54a9be[_0x14a5cb(0x1cf)]};}export function detectNode(){const _0x552e12=_0x1772,_0x44cc6e=process['versions']['node'],_0x5628cf=parseInt(_0x44cc6e[_0x552e12(0x1b8)]('.')[0x0],0xa);return{'version':_0x44cc6e,'major':_0x5628cf,'supported':_0x5628cf>=0x12};}const e=[_0x4a7e99(0x1c5),_0x4a7e99(0x1d1),_0x4a7e99(0x1d7),_0x4a7e99(0x1c1),_0x4a7e99(0x1bc)];function n(_0x41a4e5,_0x10b8f6){const _0x6bae3f=_0x4a7e99,_0x3d1ed0={'XzdYK':'which','CvNVt':function(_0x51e353,_0x35563f,_0x34eef9,_0x563370){return _0x51e353(_0x35563f,_0x34eef9,_0x563370);},'nLNVO':_0x6bae3f(0x1e0),'SpvSp':_0x6bae3f(0x1b2),'ZvRws':_0x6bae3f(0x1b6),'JzwMy':function(_0x3b84e4,_0x1eac8c){return _0x3b84e4===_0x1eac8c;}},_0x42613c=_0x10b8f6?'where':_0x3d1ed0[_0x6bae3f(0x1b3)];try{const _0x4c5d9f=_0x3d1ed0[_0x6bae3f(0x1bb)](_0x1e5246,_0x42613c,[_0x41a4e5],{'encoding':_0x3d1ed0['nLNVO'],'stdio':[_0x3d1ed0[_0x6bae3f(0x1e1)],_0x3d1ed0[_0x6bae3f(0x1d2)],_0x3d1ed0['SpvSp']],'timeout':0xbb8});if(_0x3d1ed0[_0x6bae3f(0x1c0)](0x0,_0x4c5d9f[_0x6bae3f(0x1b7)])&&_0x4c5d9f[_0x6bae3f(0x1c4)])return _0x4c5d9f[_0x6bae3f(0x1c4)][_0x6bae3f(0x1c7)]()[_0x6bae3f(0x1b8)](/\r?\n/)[0x0]||null;}catch{}return null;}function _0x33ff(){const _0xd03501=['codex','wzNNM','trim','COMSPEC','KfaHE','16XZzbte','FOwlW','RelsE','475644OcbqSK','UfEGy','UMOMN','linux','claude','ZvRws','platform','QHcJN','VeEJI','slice','gemini','VNBYm','XjgRq','unix','darwin','8LeqFkA','398421QloziL','3403930Midser','--version','utf8','SpvSp','uXFpN','win32','ignore','XzdYK','21lWmNnW','3954005weBvbi','pipe','status','split','6252400EXyBWC','cmd.exe','CvNVt','opencode','692768jXysPQ','2ypCMCR','316623ZVNtDs','JzwMy','grok','isWindows','match','stdout'];_0x33ff=function(){return _0xd03501;};return _0x33ff();}function o(_0x58ff2c,_0xb7dcec){const _0x4145e3=_0x4a7e99,_0x71a128={'oXtRx':_0x4145e3(0x1ba),'wzNNM':function(_0x3b80f6,_0x5c49f9,_0x42c0cc,_0x30ec70){return _0x3b80f6(_0x5c49f9,_0x42c0cc,_0x30ec70);},'XjgRq':_0x4145e3(0x1df),'KfaHE':'ignore','QHcJN':function(_0xc37724,_0x3efaeb){return _0xc37724===_0x3efaeb;}};try{const _0x31c4da=_0xb7dcec?process['env'][_0x4145e3(0x1c8)]||_0x71a128['oXtRx']:_0x58ff2c,_0x407547=_0x71a128[_0x4145e3(0x1c6)](_0x1e5246,_0x31c4da,_0xb7dcec?['/c',_0x58ff2c,_0x71a128[_0x4145e3(0x1d9)]]:[_0x71a128['XjgRq']],{'encoding':'utf8','stdio':[_0x71a128[_0x4145e3(0x1c9)],'pipe','pipe'],'timeout':0x1388});if(_0x71a128[_0x4145e3(0x1d4)](0x0,_0x407547[_0x4145e3(0x1b7)])&&_0x407547['stdout']){const _0x17061b=_0x407547['stdout'][_0x4145e3(0x1c7)]()[_0x4145e3(0x1b8)](/\r?\n/)[0x0],_0x407649=_0x17061b[_0x4145e3(0x1c3)](/(\d+\.\d+(?:\.\d+)?(?:[-.\w]*)?)/);return _0x407649?_0x407649[0x1]:_0x17061b[_0x4145e3(0x1d6)](0x0,0x28);}}catch{}return null;}export function detectInstalled(_0x33b15e){const _0x1399bc=_0x4a7e99,_0x1a993d={'fjdQV':function(_0x10f475){return _0x10f475();},'xTsRB':function(_0x4510b0,_0x2d0162,_0xee6e3d){return _0x4510b0(_0x2d0162,_0xee6e3d);}},_0x104955=_0x1a993d['fjdQV'](detectOS),_0x264372=_0x1a993d['xTsRB'](n,_0x33b15e,_0x104955[_0x1399bc(0x1c2)]);if(!_0x264372)return{'installed':!0x1,'path':null,'version':null};return{'installed':!0x0,'path':_0x264372,'version':o(_0x33b15e,_0x104955['isWindows'])};}export function detectInstalledCLIs(_0x38ff42){const _0x11f594=_0x4a7e99,_0xedb058={'VeEJI':function(_0x275514,_0x14994b,_0x1c326b){return _0x275514(_0x14994b,_0x1c326b);}},_0xb5a321={};for(const _0x3e5e05 of e){const _0x77056b=_0xedb058[_0x11f594(0x1d5)](n,_0x3e5e05,_0x38ff42);_0x77056b&&(_0xb5a321[_0x3e5e05]={'path':_0x77056b,'version':o(_0x3e5e05,_0x38ff42)});}return _0xb5a321;}export function detectAll(){const _0x5efeee=_0x4a7e99,_0x58f6cd={'UfEGy':function(_0x1e29b3,_0x12de63){return _0x1e29b3(_0x12de63);}},_0x5e7d1a=detectOS();return{'os':_0x5e7d1a,'node':detectNode(),'installed':_0x58f6cd[_0x5efeee(0x1ce)](detectInstalledCLIs,_0x5e7d1a[_0x5efeee(0x1c2)])};}
|
package/dist/lib/device.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x5ebf8d=_0x211a;(function(_0x2e779d,_0x3177a2){const _0x3274c0=_0x211a,_0x1a9aea=_0x2e779d();while(!![]){try{const _0x524e8f=parseInt(_0x3274c0(0x11c))/0x1+parseInt(_0x3274c0(0x110))/0x2*(parseInt(_0x3274c0(0x109))/0x3)+parseInt(_0x3274c0(0x129))/0x4*(parseInt(_0x3274c0(0x119))/0x5)+-parseInt(_0x3274c0(0x11a))/0x6*(parseInt(_0x3274c0(0x125))/0x7)+parseInt(_0x3274c0(0x12a))/0x8*(parseInt(_0x3274c0(0x106))/0x9)+parseInt(_0x3274c0(0x113))/0xa+-parseInt(_0x3274c0(0x121))/0xb;if(_0x524e8f===_0x3177a2)break;else _0x1a9aea['push'](_0x1a9aea['shift']());}catch(_0xb73b30){_0x1a9aea['push'](_0x1a9aea['shift']());}}}(_0x533f,0x67db8));import _0x445179 from'node:crypto';import _0x32c891 from'node:fs';function _0x533f(){const _0x1fbe8b=['linux','2194083noLkqu','join','utf8','867UgMTfC','sha256','mkdirSync','win32','darwin','trim','MbicJ','4438axwTMY','randomBytes','2api-store-activate','3789070ZHjotJ','toLowerCase','exec','zryWm','device-id','readFileSync','230gqfRNJ','150mbYpwk','yPMYo','326930ASefUj','ioreg\x20-rd1\x20-c\x20IOPlatformExpertDevice','hex','homedir','hqXAh','15976587eBORXN','WHuij','MWDuM','KgNgJ','136850idVQgi','JQUTQ','digest','wDSVK','67448lTPhui','8EsoZTq','test','/var/lib/dbus/machine-id','DvVlr','createHmac','toString'];_0x533f=function(){return _0x1fbe8b;};return _0x533f();}import _0x2b019c from'node:path';import _0x2af9ea from'node:os';import{execSync as _0x3a0b3}from'node:child_process';const c=_0x2b019c[_0x5ebf8d(0x107)](_0x2af9ea[_0x5ebf8d(0x11f)](),'.2api'),n=_0x2b019c[_0x5ebf8d(0x107)](c,_0x5ebf8d(0x117)),a=/^[0-9a-f]{64}$/;function s(){const _0x33f72e=_0x5ebf8d,_0x143f73={'DvVlr':_0x33f72e(0x10d),'yPMYo':_0x33f72e(0x11d),'hqXAh':_0x33f72e(0x108),'sDrkF':_0x33f72e(0x105),'JQUTQ':_0x33f72e(0x12c),'vfrYm':_0x33f72e(0x10c),'MbicJ':function(_0x16e9bf,_0x57d531,_0x27e271){return _0x16e9bf(_0x57d531,_0x27e271);},'KgNgJ':'reg\x20query\x20HKLM\x5cSOFTWARE\x5cMicrosoft\x5cCryptography\x20/v\x20MachineGuid','zryWm':_0x33f72e(0x11e),'MWDuM':_0x33f72e(0x112)},_0x374844=(function(){const _0x403cfe=_0x33f72e;try{switch(process['platform']){case _0x143f73[_0x403cfe(0x12d)]:{const _0xb394ca=_0x3a0b3(_0x143f73[_0x403cfe(0x11b)],{'encoding':_0x143f73['hqXAh']}),_0x5858d1=/IOPlatformUUID"\s*=\s*"([^"]+)"/[_0x403cfe(0x115)](_0xb394ca);if(_0x5858d1&&_0x5858d1[0x1])return _0x5858d1[0x1][_0x403cfe(0x10e)]();break;}case _0x143f73['sDrkF']:for(const _0x1f3c03 of['/etc/machine-id',_0x143f73[_0x403cfe(0x126)]])try{const _0x1d5e93=_0x32c891[_0x403cfe(0x118)](_0x1f3c03,_0x143f73[_0x403cfe(0x120)])[_0x403cfe(0x10e)]();if(_0x1d5e93)return _0x1d5e93;}catch{}break;case _0x143f73['vfrYm']:{const _0x5d3485=_0x143f73[_0x403cfe(0x10f)](_0x3a0b3,_0x143f73[_0x403cfe(0x124)],{'encoding':_0x143f73[_0x403cfe(0x120)]}),_0x138a95=/MachineGuid\s+REG_SZ\s+([0-9a-fA-F-]+)/[_0x403cfe(0x115)](_0x5d3485);if(_0x138a95&&_0x138a95[0x1])return _0x138a95[0x1]['trim']()[_0x403cfe(0x114)]();break;}}}catch{}return _0x445179[_0x403cfe(0x111)](0x20)[_0x403cfe(0x12f)](_0x143f73[_0x403cfe(0x116)]);}());return _0x445179[_0x33f72e(0x12e)](_0x33f72e(0x10a),_0x143f73[_0x33f72e(0x123)])['update'](_0x374844)[_0x33f72e(0x127)](_0x143f73[_0x33f72e(0x116)]);}function _0x211a(_0x242f3c,_0x3320b3){_0x242f3c=_0x242f3c-0x105;const _0x533f2a=_0x533f();let _0x211a8f=_0x533f2a[_0x242f3c];return _0x211a8f;}export function getDeviceId(){const _0x3ea787=_0x5ebf8d,_0x3b078d={'wDSVK':function(_0x3d79ff){return _0x3d79ff();},'WHuij':_0x3ea787(0x108)};try{const _0x114df1=_0x32c891['readFileSync'](n,_0x3ea787(0x108))[_0x3ea787(0x10e)]();if(a[_0x3ea787(0x12b)](_0x114df1))return _0x114df1;}catch{}const _0x178c00=_0x3b078d[_0x3ea787(0x128)](s);try{_0x32c891[_0x3ea787(0x10b)](c,{'recursive':!0x0,'mode':0x1c0}),_0x32c891['writeFileSync'](n,_0x178c00,{'encoding':_0x3b078d[_0x3ea787(0x122)],'mode':0x180});}catch{}return _0x178c00;}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const _0x47433b=_0x1c64;(function(_0x2e91bb,_0x1cdaf1){const _0x1ddcb0=_0x1c64,_0x45fd66=_0x2e91bb();while(!![]){try{const _0x4b904e=-parseInt(_0x1ddcb0(0xe2))/0x1*(-parseInt(_0x1ddcb0(0x163))/0x2)+parseInt(_0x1ddcb0(0x17c))/0x3+-parseInt(_0x1ddcb0(0x1bc))/0x4*(parseInt(_0x1ddcb0(0x10f))/0x5)+parseInt(_0x1ddcb0(0x119))/0x6+-parseInt(_0x1ddcb0(0x1ac))/0x7*(parseInt(_0x1ddcb0(0x1aa))/0x8)+-parseInt(_0x1ddcb0(0xf9))/0x9*(parseInt(_0x1ddcb0(0x169))/0xa)+-parseInt(_0x1ddcb0(0x14f))/0xb*(-parseInt(_0x1ddcb0(0x143))/0xc);if(_0x4b904e===_0x1cdaf1)break;else _0x45fd66['push'](_0x45fd66['shift']());}catch(_0x45de38){_0x45fd66['push'](_0x45fd66['shift']());}}}(_0x2770,0xa2e71));import _0x218346 from'node:fs';import _0x705772 from'node:path';function _0x2770(){const _0x222b5f=['ZdsGg','server','gpfUG','22941poiLKG','pjkro','gdaKz','\x0a工具版本:','CskIq','TRQNj','https:','lfaAI','OcNlK','utf8','end','KzKJG','claude-sonnet-4-5','fallback','fecqj','PnVNy','s)—\x20','凭据发现','YDFIu','cWvcG','rvnlv','wnZvC','519900IkFPqa','/v1/chat/completions','gemini','destroy','gTlyO','SIGKILL','vietp','OCcNO','split','\x20/\x20失败\x20','4927848osHdga','无效的\x20baseUrl:','join','readFileSync','win32','~/.codex/auth.json','yAgcg','message','headers','发现凭据:','后端下发矩阵:','ttfb_ms','环境快照','timed_out','xOTpg','mtime','lLLGv','YnnET','诊断包已生成:','rUVBg','label','请输入\x20API\x20Key(仅用于本次诊断,包内不落明文)','kmakj','stderr','\x20/\x20ttfb\x20','BWKCD','zip_path','skipCliTests','失败(非\x202xx\x20或请求出错)','OMbpd','EHaBF','../package.json','slow','HTTP_PROXY','(key\x20已脱敏:','RigDd','DQkxE','gxfxi','.redacted','size','toLowerCase','GMlmb','47748vbzaeF','JdwGb','isFinite','indexOf','object','打包诊断\x20zip','\x0a凭据来源:','gemini-2.5-pro','XVoUJ','TUdke','getSeconds','Shndt','1738qziYea','\x20项。请把\x20zip\x20发给客服排障。','\x20→\x20','lTGHT','spawn\x20失败:','tqdwL','timeout_ms','\x0a\x0a一、包内文件\x0a-\x20summary.json\x20\x20\x20\x20\x20环境\x20+\x20测试结果汇总(请先看这个)\x0a-\x20env.json\x20\x20\x20\x20\x20\x20\x20\x20\x20操作系统\x20/\x20Node\x20版本\x20/\x20已装\x20CLI\x20/\x20配置文件元信息\x20/\x20代理环境变量\x0a-\x20http-tests.jsonl\x20每个模型一行:模型\x20/\x20request_id\x20/\x20状态码\x20/\x20首字节延迟(ttfb_ms)\x20/\x20总延迟(total_ms)\x20/\x20错误\x20/\x20响应片段\x0a-\x20cli-tests.jsonl\x20\x20每个已装\x20CLI\x20一行:命令\x20/\x20退出码\x20/\x20耗时\x20/\x20是否超时\x20/\x20stdout+stderr(截断\x2010KB)\x0a-\x20configs/\x20\x20\x20\x20\x20\x20\x20\x20\x20本地配置文件脱敏副本(key\x20已掩码,不存在的文件跳过)\x0a\x0a二、request_id\x20的用法\x0ahttp-tests.jsonl\x20每条记录的\x20request_id\x20对应服务端网关该次请求的标识(响应头\x20X-Request-Id)。\x0a客服凭\x20request_id\x20可在生产后台\x20usage_logs\x20/\x20网关日志中精确对账:该请求走了哪个账号、\x0a哪个模型、计费多少、错误详情。本次共测\x20','QfQUt','xANjR','MOOIn','duration_ms','slice','manual-input','tool_version','push','SFJgY','request_id','内置兜底(后端诊断配置不可用)','generated_at','22zMkqYY','未发现已安装的可测\x20CLI,跳过\x20CLI\x20实测','ms\x20/\x20','JFYzp','HTTP\x20直测\x20','rKafi','3730eMcLoo','stringify','/configs/','XnKxe','installed_clis','OS\x20','***','YpyII','platform','/summary.json','seUfP','HBJSu','HlxDE','application/json','statusCode','wTASr','trim','\x20/\x20node\x20','byteLength','1952976KHFRMW','uSMUu','\x20模型\x20/\x20超时\x20','kill','model',',正常计费)','wViGo','FUrWm','imXog','lbOPt','vlFsj','hints','SBius',',并运行已装\x20CLI\x20实测','data','win','***…','://***@','%userprofile%\x5c.codex\x5cauth.json','ERR','@2api-store/activate/','缓慢(2xx\x20但首字节延迟超过\x2010s)','error','key','vRnNM','\x20退出码\x20','info','models','CLI\x20实测(','cQgDG','max_tokens','wWAZj','\x20—\x20HTTP\x20','status','s\x20/\x20并发\x20','qxmMq','request','xboEI','padStart','已按参数跳过\x20CLI\x20实测','dehMf','\x20退出码\x200\x20/\x20','from','XYovh','href','source','16AElvWI','exit_code','857661DwWIpc','SgOOX','WxXIE','UfVIK','floor','code','test','qJYtT','BHcfI','all','zishI','HvTSz','拉取诊断配置','cmd.exe','%userprofile%\x5c.claude\x5csettings.json','LEsXA','12NYTJUD','mode','fvMpI','WGZiy','map','sLmKp','node','cli','sk-…','writeFileSync','未在\x20~/.codex/auth.json\x20/\x20~/.claude/settings.json\x20/\x20~/.gemini/settings.json\x20中发现\x20API\x20Key','tkBIc','env','未提供\x20API\x20Key,诊断中止','/http-tests.jsonl','ignore','credential','close','jmovC','\x0aspawn\x20error:\x20','http_tests','timeout','lJsps','api_base','WxxVh','XHoMV','yes','getHours','qOTUy','concurrency','\x20个模型,并发\x20','mkWSY','\x20个模型各发起\x201\x20个真实小请求(max_tokens=','~/.gemini/settings.json','PAqeE','COMSPEC','woMoV','FYZyv','opencode','cwd','QCsDR','warn','UlhAX','rkULO','wboCS','pid','mkdirSync',');CLI\x20实测\x20','KsoQw','filter','.zip','isArray','tMauL','使用手动输入的凭据(','MZGqd','hKGpi','response_preview','QHlOK','DxbTq','brvEO','content','BAaRJ','~/.claude/settings.json','gcofe','\x20超时(30s)已终止','ZKjXt','replace','Bearer\x20***','vwhHG','\x20个模型(max_tokens\x20极小,计费可忽略)。\x0a\x0a三、隐私说明\x0a包内所有密钥(sk-…)、Bearer\x20凭证、邮箱、代理内嵌账号均已自动脱敏;\x0aconfigs/\x20为脱敏副本,本地原始配置文件未被修改。\x0a\x0a四、联系方式\x0a客服/QQ/邮箱:__________(由客服填写)\x0a','tWMSP','RmapU','stdout','/cli-tests.jsonl','/api/v1/cli/diagnose-config','\x20项(通过\x20','step','aIMzs','\x0aAPI\x20地址:','length','key_redacted','exists','string','baseUrl','pipe','xPFPW','version','6730iifypb','ZlJEF','\x20/\x20已装\x20CLI\x20','\x20的\x20','now','keys','toString','fail','EGkmV','installed','TokenShop\x20诊断包说明\x0a====================\x0a\x0a生成时间:','gNUoZ','sk-','total_ms','match','exec','oYofx','outDir','LwOaF','ePIry'];_0x2770=function(){return _0x222b5f;};return _0x2770();}import _0x11d069 from'node:https';import _0x411298 from'node:http';function _0x1c64(_0x4cf086,_0x3d7ed2){_0x4cf086=_0x4cf086-0xc2;const _0x27701a=_0x2770();let _0x1c6454=_0x27701a[_0x4cf086];return _0x1c6454;}import{spawn as _0x341d9f,spawnSync as _0x35ecae}from'node:child_process';import{createRequire as _0x39797b}from'node:module';import{zipSync as _0x254954,strToU8 as _0x49ae04}from'fflate';import{detectAll as _0x1190f2}from'./detect.mjs';import{getDeviceId as _0x348855}from'./device.mjs';import{expandPath as _0x4ca98b}from'./render.mjs';import{askSecret as _0x1e410f,confirm as _0x18edf9}from'./prompt.mjs';import*as _0x29b0ad from'./ui.mjs';const f=_0x39797b(import.meta.url)(_0x47433b(0x138))[_0x47433b(0xe1)],g=_0x47433b(0x190)+f,h=[{'label':_0x47433b(0x11e),'win':_0x47433b(0x18e)},{'label':_0x47433b(0xc9),'win':_0x47433b(0x1ba)},{'label':_0x47433b(0x1dd),'win':'%userprofile%\x5c.gemini\x5csettings.json'}],$=['claude','codex',_0x47433b(0x111),'grok',_0x47433b(0x1e2)],y={'claude':['-p','hi'],'codex':[_0x47433b(0xf1),'hi'],'gemini':['-p','hi'],'grok':['-p','hi'],'opencode':['run','hi']},A=0x2800,w={'ok':'正常(HTTP\x202xx)','slow':_0x47433b(0x191),'fail':_0x47433b(0x135)},k=/sk-([a-zA-Z0-9]{10,})/,T=/(?:API_KEY|AUTH_TOKEN|OPENAI_API_KEY|ANTHROPIC_API_KEY|ANTHROPIC_AUTH_TOKEN)["':\s]+["']([a-zA-Z0-9._-]{10,})["']/,I=/export\s+(?:API_KEY|AUTH_TOKEN|OPENAI_API_KEY|ANTHROPIC_API_KEY|ANTHROPIC_AUTH_TOKEN)=(["']?)([a-zA-Z0-9._-]{10,})/,v=/(?:base_url|api_base_url|api_base|apiBase|ANTHROPIC_BASE_URL|BASE_URL)["':\s=]+["']?(https?:\/\/[^\s"'`]+)/i,P=/https?:\/\/[^\s"'`}]+/;function b(){const _0x29aef8=_0x47433b,_0x2075ed={'ZKjXt':_0x29aef8(0x11d)};return _0x2075ed[_0x29aef8(0xcc)]===process[_0x29aef8(0x171)];}function x(_0xa0b3c7){const _0x16eaa1=_0x47433b,_0x45de93={'xboEI':function(_0x4a2e45){return _0x4a2e45();}};return _0x4ca98b(_0x45de93[_0x16eaa1(0x1a1)](b)?_0xa0b3c7[_0x16eaa1(0x18b)]:_0xa0b3c7[_0x16eaa1(0x12d)],{'isWindows':b()});}function O(_0x2a4bd8){const _0x8771a7=_0x47433b,_0xcaed92={'pjkro':_0x8771a7(0x16f)};return _0x2a4bd8?/^sk-[A-Za-z0-9_-]{20,}$/[_0x8771a7(0x1b2)](_0x2a4bd8)?_0x8771a7(0x1c4)+_0x2a4bd8[_0x8771a7(0x15b)](-0x6):_0x2a4bd8[_0x8771a7(0xda)]<=0x8?_0xcaed92[_0x8771a7(0xfa)]:_0x8771a7(0x18c)+_0x2a4bd8[_0x8771a7(0x15b)](-0x6):null;}function E(_0x29aa5e){const _0x198341=_0x47433b,_0x472dbe={'wboCS':function(_0x4b05b7,_0x2b542b){return _0x4b05b7==_0x2b542b;},'HvTSz':_0x198341(0xdd),'SBius':_0x198341(0x18d)};return _0x472dbe[_0x198341(0x1e8)](_0x472dbe[_0x198341(0x1b7)],typeof _0x29aa5e)?_0x29aa5e[_0x198341(0xcd)](/:\/\/[^@/\s]+@/,_0x472dbe[_0x198341(0x188)]):_0x29aa5e;}export function redact(_0x4a00a1){const _0x2b6d45=_0x47433b,_0x492eb2={'qPFwX':function(_0x3e3e50,_0x176256){return _0x3e3e50!=_0x176256;},'LkQQl':'string','jmovC':function(_0x362410,_0x44664c){return _0x362410===_0x44664c;}};if(_0x492eb2['qPFwX'](_0x492eb2['LkQQl'],typeof _0x4a00a1)||_0x492eb2[_0x2b6d45(0x1ce)]('',_0x4a00a1))return _0x4a00a1;let _0x24edf0=_0x4a00a1;return _0x24edf0=_0x24edf0[_0x2b6d45(0xcd)](/sk-[A-Za-z0-9_-]{20,}/g,_0x4b34ce=>_0x2b6d45(0x1c4)+_0x4b34ce[_0x2b6d45(0x15b)](-0x6)),_0x24edf0=_0x24edf0['replace'](/[Bb]earer\s+\S+/g,_0x2b6d45(0xce)),_0x24edf0=_0x24edf0[_0x2b6d45(0xcd)](/[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/g,_0x30718d=>{const _0x3b6e71=_0x2b6d45,_0x115262=_0x30718d[_0x3b6e71(0x146)]('@');return _0x30718d[0x0]+_0x3b6e71(0x16f)+_0x30718d[_0x3b6e71(0x15b)](_0x115262);}),_0x24edf0;}function S(_0xf6297f){const _0x80cce0=_0x47433b,_0x1d7adf={'LwOaF':function(_0x4bde93,_0xfcc4eb){return _0x4bde93(_0xfcc4eb);}};let _0x98c3ac=_0x1d7adf[_0x80cce0(0xf4)](redact,_0xf6297f);return _0x98c3ac=_0x98c3ac[_0x80cce0(0xcd)](/((?:API_KEY|AUTH_TOKEN|OPENAI_API_KEY|ANTHROPIC_API_KEY|ANTHROPIC_AUTH_TOKEN)["':\s]+["'])([a-zA-Z0-9._-]{10,})(["'])/gi,(_0x2b80d2,_0x164cbd,_0x61c90f,_0x95d8d9)=>''+_0x164cbd+O(_0x61c90f)+_0x95d8d9),_0x98c3ac=_0x98c3ac['replace'](/(export\s+(?:API_KEY|AUTH_TOKEN|OPENAI_API_KEY|ANTHROPIC_API_KEY|ANTHROPIC_AUTH_TOKEN)=(["']?))([a-zA-Z0-9._-]{10,})/gi,(_0x464fc8,_0x52a7c7)=>_0x52a7c7+_0x80cce0(0x16f)),_0x98c3ac;}function j(_0x47aed5){const _0x1f5627=_0x47433b,_0x3893b6=_0x47aed5[_0x1f5627(0xf0)](k);if(_0x3893b6)return _0x1f5627(0xee)+_0x3893b6[0x1];const _0x2fd114=_0x47aed5['match'](T);if(_0x2fd114)return _0x2fd114[0x1];const _0x46e202=_0x47aed5['match'](I);return _0x46e202?_0x46e202[0x2]:null;}function C(_0x30dc76,_0x54431b){const _0x1540cd=_0x47433b,_0xb0deb2=_0x30dc76[_0x1540cd(0xf0)](v);if(_0xb0deb2)return _0xb0deb2[0x1]['replace'](/\/+$/,'');const _0x51fbdc=_0x30dc76[_0x1540cd(0xf0)](P);return _0x51fbdc?_0x51fbdc[0x1][_0x1540cd(0xcd)](/\/+$/,''):_0x54431b;}function N(_0x110aba,_0x42ea5e,_0x481d06,_0xe20eef){const _0xba8fea=_0x47433b,_0x2a0b93={'qvZxY':function(_0x42236d,_0x147d72){return _0x42236d(_0x147d72);},'MiZLk':function(_0x362987,_0x303e4b){return _0x362987>=_0x303e4b;},'lJsps':function(_0x26b436,_0x5d8557){return _0x26b436<=_0x5d8557;}},_0x6f9837=_0x2a0b93['qvZxY'](Number,_0x110aba);return Number[_0xba8fea(0x145)](_0x6f9837)&&_0x2a0b93['MiZLk'](_0x6f9837,_0x481d06)&&_0x2a0b93[_0xba8fea(0x1d2)](_0x6f9837,_0xe20eef)?Math[_0xba8fea(0x1b0)](_0x6f9837):_0x42ea5e;}function K(_0xfcef67){const _0x2f3427=_0x47433b,_0x3edd21={'seUfP':function(_0x4cbf5d,_0x210c65){return _0x4cbf5d===_0x210c65;},'SFJgY':_0x2f3427(0x147),'NHZAG':function(_0xef0308,_0x5da618){return _0xef0308>=_0x5da618;},'gcofe':function(_0x5f0153,_0x514cb0){return _0x5f0153(_0x514cb0);},'jrEEd':_0x2f3427(0x18a),'KzKJG':_0x2f3427(0x103),'brvEO':_0x2f3427(0xd5),'tqdwL':'https:','Dlqmc':'GET','uSMUu':function(_0x56dec7){return _0x56dec7();},'EgjHl':_0x2f3427(0x176),'YDFIu':_0x2f3427(0x1d1),'NNYVs':'error','OCcNO':'builtin','PnVNy':'gpt-5.5','aIMzs':_0x2f3427(0x105),'wTASr':_0x2f3427(0x106)},_0x55e8fa={'profile_version':_0x3edd21[_0x2f3427(0x116)],'models':[_0x3edd21[_0x2f3427(0x108)],_0x3edd21[_0x2f3427(0xd8)],_0x2f3427(0x14a)],'timeout_ms':0x7530,'max_tokens':0x1,'concurrency':0x2,'hints':{...w},'source':_0x3edd21[_0x2f3427(0x178)]};return new Promise(_0x3e4356=>{const _0x4a5901=_0x2f3427,_0x5b20be={'HlxDE':function(_0x310baa,_0x20db25){const _0x13932e=_0x1c64;return _0x3edd21[_0x13932e(0x173)](_0x310baa,_0x20db25);},'xPFPW':_0x3edd21[_0x4a5901(0x15f)],'rkULO':function(_0x4c8d8e,_0x38f88d,_0x50aab5,_0x369885,_0x429daf){return _0x4c8d8e(_0x38f88d,_0x50aab5,_0x369885,_0x429daf);},'Ajdce':_0x4a5901(0xf7),'JFYzp':function(_0x479b30,_0x46e44c){return _0x3edd21['NHZAG'](_0x479b30,_0x46e44c);},'ZlJEF':function(_0x546063,_0x5202ce){const _0x1500c1=_0x4a5901;return _0x3edd21[_0x1500c1(0xca)](_0x546063,_0x5202ce);},'oMgiE':_0x3edd21['jrEEd'],'faRNx':_0x3edd21[_0x4a5901(0x104)]};let _0x5afbef;try{_0x5afbef=new URL(_0x3edd21[_0x4a5901(0xc6)],_0xfcef67);}catch{return void _0x3edd21[_0x4a5901(0xca)](_0x3e4356,_0x55e8fa);}const _0x1af3b5=(_0x3edd21[_0x4a5901(0x173)](_0x3edd21[_0x4a5901(0x154)],_0x5afbef['protocol'])?_0x11d069:_0x411298)[_0x4a5901(0x1a0)](_0x5afbef,{'method':_0x3edd21['Dlqmc'],'headers':{'User-Agent':g,'X-Device-Id':_0x3edd21[_0x4a5901(0x17d)](_0x348855),'Accept':_0x3edd21['EgjHl']},'timeout':0x2710},_0x2af0a4=>{const _0xc4b28=_0x4a5901,_0x1b0772={'Ywzzd':function(_0x144ca2,_0x20fa08){const _0x16c7e9=_0x1c64;return _0x5b20be[_0x16c7e9(0x175)](_0x144ca2,_0x20fa08);},'hUMPx':_0x5b20be[_0xc4b28(0xe0)],'OMbpd':function(_0x1b37f9,_0x24f168,_0x571191,_0x236223,_0x56f8e2){const _0x4b63cf=_0xc4b28;return _0x5b20be[_0x4b63cf(0x1e7)](_0x1b37f9,_0x24f168,_0x571191,_0x236223,_0x56f8e2);},'RmapU':_0x5b20be['Ajdce'],'UlhAX':function(_0x31c129,_0x306a6e){const _0x4bc2c2=_0xc4b28;return _0x5b20be[_0x4bc2c2(0x166)](_0x31c129,_0x306a6e);},'BWKCD':function(_0x42c596,_0x4a0dc6){const _0x326c20=_0xc4b28;return _0x5b20be[_0x326c20(0xe3)](_0x42c596,_0x4a0dc6);},'EGkmV':_0xc4b28(0x102)},_0x489931=[];_0x2af0a4['on'](_0x5b20be['oMgiE'],_0x1faad6=>_0x489931[_0xc4b28(0x15e)](_0x1faad6)),_0x2af0a4['on'](_0x5b20be['faRNx'],()=>{const _0x45ff81=_0xc4b28;if(_0x2af0a4[_0x45ff81(0x177)]<0xc8||_0x1b0772[_0x45ff81(0x1e6)](_0x2af0a4[_0x45ff81(0x177)],0x12c))_0x1b0772['BWKCD'](_0x3e4356,_0x55e8fa);else try{const _0x34758e=Buffer['concat'](_0x489931)[_0x45ff81(0xe8)](_0x1b0772[_0x45ff81(0xea)]);_0x1b0772[_0x45ff81(0x132)](_0x3e4356,function(_0x3b4762,_0x35a208){const _0x2c7d83=_0x45ff81,_0x29f353=Array[_0x2c7d83(0x1ef)](_0x3b4762[_0x2c7d83(0x197)])?_0x3b4762[_0x2c7d83(0x197)][_0x2c7d83(0x1ed)](_0x4c7a49=>_0x2c7d83(0xdd)==typeof _0x4c7a49&&_0x4c7a49[_0x2c7d83(0x179)]()):[];if(_0x1b0772['Ywzzd'](0x0,_0x29f353[_0x2c7d83(0xda)]))return _0x35a208;const _0x428165=_0x3b4762[_0x2c7d83(0x187)]&&_0x1b0772['hUMPx']==typeof _0x3b4762[_0x2c7d83(0x187)]&&!Array['isArray'](_0x3b4762[_0x2c7d83(0x187)])?{..._0x35a208[_0x2c7d83(0x187)],..._0x3b4762[_0x2c7d83(0x187)]}:{..._0x35a208[_0x2c7d83(0x187)]};return{'profile_version':_0x3b4762['profile_version']??null,'models':_0x29f353,'timeout_ms':_0x1b0772[_0x2c7d83(0x136)](N,_0x3b4762[_0x2c7d83(0x155)],_0x35a208[_0x2c7d83(0x155)],0x3e8,0x1d4c0),'max_tokens':N(_0x3b4762[_0x2c7d83(0x19a)],_0x35a208[_0x2c7d83(0x19a)],0x1,0x40),'concurrency':_0x1b0772[_0x2c7d83(0x136)](N,_0x3b4762[_0x2c7d83(0x1d9)],_0x35a208[_0x2c7d83(0x1d9)],0x1,0x8),'hints':_0x428165,'source':_0x1b0772[_0x2c7d83(0xd2)]};}(_0x34758e?JSON['parse'](_0x34758e):{},_0x55e8fa));}catch{_0x3e4356(_0x55e8fa);}});});_0x1af3b5['on'](_0x3edd21[_0x4a5901(0x10b)],()=>_0x1af3b5['destroy'](new Error(_0x4a5901(0x1d1)))),_0x1af3b5['on'](_0x3edd21['NNYVs'],()=>_0x3e4356(_0x55e8fa)),_0x1af3b5['end']();});}function H({baseUrl:_0x363849,apiKey:_0x3e0e26,model:_0x2acd43,maxTokens:_0x45e202,timeoutMs:_0x329d54,deviceId:_0x39767e}){const _0x3cf10d=_0x47433b,_0x152baf={'lCFrq':function(_0x5b8340,_0x160fe3){return _0x5b8340<=_0x160fe3;},'LeZIF':'utf8','wWAZj':function(_0x53b98c,_0x4bada2){return _0x53b98c-_0x4bada2;},'lLLGv':function(_0x170766,_0x562863){return _0x170766-_0x562863;},'imXog':_0x3cf10d(0x18a),'BHcfI':_0x3cf10d(0x103),'gpfUG':function(_0x37eb1c,_0x11f79a){return _0x37eb1c/_0x11f79a;},'YnnET':function(_0x40729f,_0x1e0d28){return _0x40729f(_0x1e0d28);},'XbGpU':function(_0x14fcac,_0xd15ab1){return _0x14fcac(_0xd15ab1);},'lfaAI':function(_0x361391,_0x2e14e5){return _0x361391===_0x2e14e5;},'RFlIO':_0x3cf10d(0xff),'EawyD':'user','rKafi':'POST','DQkxE':_0x3cf10d(0x176),'wnZvC':_0x3cf10d(0x192)};return new Promise(_0x14d741=>{const _0x158ed6=_0x3cf10d,_0xf17cf={'qOTUy':function(_0x42b5fb,_0xe80b6){const _0x415db5=_0x1c64;return _0x152baf[_0x415db5(0x12a)](_0x42b5fb,_0xe80b6);}},_0x20a547=Date[_0x158ed6(0xe6)]();let _0x222cd0,_0x5dfecb=null;try{_0x222cd0=new URL(_0x158ed6(0x110),_0x363849);}catch{return void _0x152baf['XbGpU'](_0x14d741,{'request_id':null,'status':null,'ttfb_ms':null,'total_ms':Date['now']()-_0x20a547,'error':_0x158ed6(0x11a)+_0x363849,'response_preview':''});}const _0x3181f6=_0x152baf[_0x158ed6(0x100)](_0x152baf['RFlIO'],_0x222cd0['protocol'])?_0x11d069:_0x411298,_0x59ef3c=JSON[_0x158ed6(0x16a)]({'model':_0x2acd43,'messages':[{'role':_0x152baf['EawyD'],'content':'hi'}],'max_tokens':_0x45e202,'stream':!0x1}),_0x5a2341=_0x3181f6[_0x158ed6(0x1a0)](_0x222cd0,{'method':_0x152baf[_0x158ed6(0x168)],'headers':{'Authorization':'Bearer\x20'+_0x3e0e26,'User-Agent':g,'X-Device-Id':_0x39767e,'Content-Type':_0x152baf[_0x158ed6(0x13d)],'Content-Length':Buffer[_0x158ed6(0x17b)](_0x59ef3c)},'timeout':_0x329d54},_0x5e0264=>{const _0x2dedc5=_0x158ed6,_0x11acaa={'jJJUW':function(_0x1bbb7b,_0x2186f4){return _0x152baf['lCFrq'](_0x1bbb7b,_0x2186f4);},'YpyII':_0x152baf['LeZIF'],'QHlOK':'x-request-id','rvnlv':function(_0x563f7a,_0x1b818a){const _0x213c06=_0x1c64;return _0x152baf[_0x213c06(0x19b)](_0x563f7a,_0x1b818a);}};_0x5dfecb=_0x152baf[_0x2dedc5(0x129)](Date[_0x2dedc5(0xe6)](),_0x20a547);const _0x10639c=[];let _0x5186d4=0x0;_0x5e0264['on'](_0x152baf[_0x2dedc5(0x184)],_0x41054b=>{const _0x3e9e1f=_0x2dedc5;_0x5186d4+=_0x41054b[_0x3e9e1f(0xda)],_0x11acaa['jJJUW'](_0x5186d4,0x40000)&&_0x10639c['push'](_0x41054b);}),_0x5e0264['on'](_0x152baf[_0x2dedc5(0x1b4)],()=>{const _0x617295=_0x2dedc5,_0x42a3b0=Buffer['concat'](_0x10639c)[_0x617295(0xe8)](_0x11acaa[_0x617295(0x170)]);_0x14d741({'request_id':_0x5e0264[_0x617295(0x121)][_0x11acaa[_0x617295(0xc4)]]||null,'status':_0x5e0264[_0x617295(0x177)],'ttfb_ms':_0x5dfecb,'total_ms':_0x11acaa[_0x617295(0x10d)](Date[_0x617295(0xe6)](),_0x20a547),'error':null,'response_preview':_0x42a3b0[_0x617295(0x15b)](0x0,0x1f4)});});});_0x5a2341['on'](_0x158ed6(0x1d1),()=>{const _0x11476d=_0x158ed6;_0x5a2341[_0x11476d(0x112)](new Error('请求超时('+_0x152baf[_0x11476d(0xf8)](_0x329d54,0x3e8)+_0x11476d(0x109)+_0x222cd0[_0x11476d(0x1a8)]));}),_0x5a2341['on'](_0x152baf[_0x158ed6(0x10e)],_0x5a04b4=>{const _0x2ce279=_0x158ed6;_0xf17cf[_0x2ce279(0x1d8)](_0x14d741,{'request_id':null,'status':null,'ttfb_ms':_0x5dfecb,'total_ms':Date[_0x2ce279(0xe6)]()-_0x20a547,'error':_0x5a04b4[_0x2ce279(0x120)],'response_preview':''});}),_0x5a2341[_0x158ed6(0x103)](_0x59ef3c);});}function L(_0x571137){const _0x11f501=_0x47433b,_0x45c8ee={'ePIry':function(_0xf2c80e,_0x21554a){return _0xf2c80e>=_0x21554a;},'qRqjF':function(_0x544955,_0x51c9db){return _0x544955<_0x51c9db;},'wViGo':function(_0x1c2746,_0x1562f1){return _0x1c2746>_0x1562f1;},'sLmKp':_0x11f501(0x139),'WxxVh':'fail'};return _0x45c8ee[_0x11f501(0xf5)](_0x571137['status'],0xc8)&&_0x45c8ee['qRqjF'](_0x571137[_0x11f501(0x19d)],0x12c)?null!=_0x571137[_0x11f501(0x124)]&&_0x45c8ee[_0x11f501(0x182)](_0x571137[_0x11f501(0x124)],0x2710)?_0x45c8ee[_0x11f501(0x1c1)]:'ok':_0x45c8ee[_0x11f501(0x1d4)];}function R(_0x388dcf,_0x3874a8){const _0x237c32=_0x47433b,_0x581ba5={'vwhHG':function(_0x11a5e9,_0x83f4da){return _0x11a5e9(_0x83f4da);},'FUrWm':function(_0x12be0e,_0x2abbb0){return _0x12be0e(_0x2abbb0);},'MZGqd':function(_0x4b03bd,_0xbfb459){return _0x4b03bd-_0xbfb459;},'DnMBK':function(_0x128175,_0x3d6f18,_0x5cd856,_0x3818ad){return _0x128175(_0x3d6f18,_0x5cd856,_0x3818ad);},'vRnNM':'taskkill','cQgDG':_0x237c32(0x1cb),'tWMSP':_0x237c32(0x114),'gdaKz':function(_0x432929,_0x545aea){return _0x432929<_0x545aea;},'mQKvw':_0x237c32(0x102),'yAgcg':_0x237c32(0xdf),'tPDFi':function(_0x4ba17a,_0x44ce46){return _0x4ba17a(_0x44ce46);},'xOTpg':function(_0x2b9251,_0x3006d4,_0x17322a){return _0x2b9251(_0x3006d4,_0x17322a);},'JdwGb':_0x237c32(0x18a),'FdPjA':_0x237c32(0x192),'WGZiy':_0x237c32(0x1cd)};return new Promise(_0x12d34d=>{const _0x455f1b=_0x237c32,_0x24e098={'gTlyO':function(_0x29fac9){return _0x29fac9();},'vietp':function(_0x83fd75,_0x41e2a6,_0x31958b,_0xa19d9b){return _0x581ba5['DnMBK'](_0x83fd75,_0x41e2a6,_0x31958b,_0xa19d9b);},'TRQNj':_0x581ba5[_0x455f1b(0x194)],'GMlmb':'/pid','JiPzg':function(_0x1b9b81,_0x499572){const _0x3944d3=_0x455f1b;return _0x581ba5[_0x3944d3(0xcf)](_0x1b9b81,_0x499572);},'DxbTq':_0x581ba5[_0x455f1b(0x199)],'DxrSx':_0x581ba5[_0x455f1b(0xd1)],'qxmMq':function(_0x263c84,_0x3cb076){const _0x155b7a=_0x455f1b;return _0x581ba5[_0x155b7a(0xfb)](_0x263c84,_0x3cb076);},'qJYtT':_0x581ba5['mQKvw'],'mkWSY':function(_0x1038ca,_0x17e0c5){return _0x1038ca(_0x17e0c5);}},_0xe49d0a=[_0x388dcf,..._0x3874a8[_0x455f1b(0x1c0)](_0x430f66=>/\s/[_0x455f1b(0x1b2)](_0x430f66)?JSON[_0x455f1b(0x16a)](_0x430f66):_0x430f66)][_0x455f1b(0x11b)]('\x20'),_0x6e4b50=Date[_0x455f1b(0xe6)]();let _0x4c997f='',_0x4d9d22='',_0x1e8c6f=!0x1,_0x2be2d0=!0x1;const _0x475a7a=_0x265742=>{const _0x29819e=_0x455f1b;_0x2be2d0||(_0x2be2d0=!0x0,_0x581ba5[_0x29819e(0xcf)](clearTimeout,_0x560211),_0x581ba5['FUrWm'](_0x12d34d,{'cli':_0x388dcf,'cmd':_0xe49d0a,'exit_code':_0x265742,'duration_ms':_0x581ba5[_0x29819e(0x1f2)](Date['now'](),_0x6e4b50),'timed_out':_0x1e8c6f,'stdout':redact(_0x4c997f[_0x29819e(0x15b)](0x0,A)),'stderr':_0x581ba5[_0x29819e(0x183)](redact,_0x4d9d22[_0x29819e(0x15b)](0x0,A))}));};let _0x2c1f1c;try{const _0x334f25=b()?process[_0x455f1b(0x1c8)][_0x455f1b(0x1df)]||_0x455f1b(0x1b9):_0x388dcf,_0x1efc13=b()?['/c',_0x388dcf,..._0x3874a8]:_0x3874a8;_0x2c1f1c=_0x341d9f(_0x334f25,_0x1efc13,{'stdio':[_0x581ba5[_0x455f1b(0x199)],_0x455f1b(0xdf),_0x581ba5[_0x455f1b(0x11f)]],'env':process['env']});}catch(_0x29d67b){return _0x4d9d22=_0x455f1b(0x153)+_0x29d67b[_0x455f1b(0x120)],void _0x581ba5['tPDFi'](_0x475a7a,null);}const _0x560211=_0x581ba5[_0x455f1b(0x127)](setTimeout,()=>{_0x1e8c6f=!0x0,function(_0x54c59d){const _0x142375=_0x1c64;if(_0x54c59d&&!_0x54c59d['killed']){if(_0x24e098[_0x142375(0x113)](b)&&_0x54c59d[_0x142375(0x1e9)])try{return void _0x24e098[_0x142375(0x115)](_0x35ecae,_0x24e098[_0x142375(0xfe)],[_0x24e098[_0x142375(0x142)],_0x24e098['JiPzg'](String,_0x54c59d[_0x142375(0x1e9)]),'/T','/F'],{'stdio':_0x24e098[_0x142375(0xc5)]});}catch{}try{_0x54c59d[_0x142375(0x17f)](_0x24e098['DxrSx']);}catch{}}}(_0x2c1f1c);},0x7530);_0x2c1f1c[_0x455f1b(0xd3)]&&_0x2c1f1c[_0x455f1b(0xd3)]['on'](_0x581ba5['JdwGb'],_0x10cc98=>{const _0x3b297d=_0x455f1b;_0x24e098[_0x3b297d(0x19f)](_0x4c997f[_0x3b297d(0xda)],0x5000)&&(_0x4c997f+=_0x10cc98[_0x3b297d(0xe8)](_0x24e098[_0x3b297d(0x1b3)]));}),_0x2c1f1c[_0x455f1b(0x130)]&&_0x2c1f1c[_0x455f1b(0x130)]['on'](_0x581ba5[_0x455f1b(0x144)],_0x57dc76=>{const _0x2e0d3f=_0x455f1b;_0x24e098[_0x2e0d3f(0x19f)](_0x4d9d22[_0x2e0d3f(0xda)],0x5000)&&(_0x4d9d22+=_0x57dc76[_0x2e0d3f(0xe8)]('utf8'));}),_0x2c1f1c['on'](_0x581ba5['FdPjA'],_0x2e900f=>{const _0x47ea1a=_0x455f1b;_0x4d9d22+=_0x47ea1a(0x1cf)+_0x2e900f[_0x47ea1a(0x120)],_0x24e098[_0x47ea1a(0x1db)](_0x475a7a,null);}),_0x2c1f1c['on'](_0x581ba5[_0x455f1b(0x1bf)],_0x3b6857=>_0x475a7a(_0x3b6857));});}function U(_0x4f4979){const _0x1e8bf1=_0x47433b,_0x535d2a=_0x4f4979[_0x1e8bf1(0xf0)](/~\/\.([^/]+)\/(.+)$/);return _0x535d2a?_0x535d2a[0x1]+'_'+_0x535d2a[0x2]:_0x4f4979[_0x1e8bf1(0xcd)](/[~\\/]/g,'_');}function z({summary:_0x3fe9a5,modelCount:_0x13d9c6}){const _0xc2a2da=_0x47433b,_0x5cf365={'tMauL':_0xc2a2da(0xf7),'woMoV':'后端下发'};return _0xc2a2da(0xec)+_0x3fe9a5['generated_at']+_0xc2a2da(0xfc)+_0x3fe9a5[_0xc2a2da(0x15d)]+_0xc2a2da(0xd9)+_0x3fe9a5[_0xc2a2da(0x1d3)]+_0xc2a2da(0x149)+_0x3fe9a5[_0xc2a2da(0x1cc)][_0xc2a2da(0x1a9)]+_0xc2a2da(0x13b)+_0x3fe9a5[_0xc2a2da(0x1cc)][_0xc2a2da(0xdb)]+')\x0a配置来源:'+(_0x5cf365[_0xc2a2da(0x1f0)]===_0x3fe9a5['config_source']?_0x5cf365[_0xc2a2da(0x1e0)]:_0xc2a2da(0x161))+_0xc2a2da(0x156)+_0x13d9c6+_0xc2a2da(0xd0);}function D(_0x177942){const _0xade40f=_0x47433b,_0x172e14={'fecqj':function(_0x5838e5,_0x352dbe){return _0x5838e5>_0x352dbe;},'FCkhi':function(_0x1dcb69,_0xb9c55b){return _0x1dcb69+_0xb9c55b;}};return _0x172e14[_0xade40f(0x107)](_0x177942[_0xade40f(0xda)],0x0)?_0x172e14['FCkhi'](_0x177942[_0xade40f(0x11b)]('\x0a'),'\x0a'):'';}function Y(_0x7b6e69,_0x2cbb28){const _0x38c685=_0x47433b;return _0x705772[_0x38c685(0x11b)](_0x2cbb28||process[_0x38c685(0x1e3)](),'tokenshop-diagnose-'+_0x7b6e69+_0x38c685(0x1ee));}export async function runDiagnose({apiBase:_0x49dac8,opts:_0x293594={},ui:_0x385d3b={}}){const _0x7a1689=_0x47433b,_0x2f75d1={'CskIq':function(_0x2bfaae,_0x4f3dea){return _0x2bfaae(_0x4f3dea);},'Shndt':_0x7a1689(0x102),'XnKxe':function(_0x3f680d){return _0x3f680d();},'BAaRJ':function(_0x341d50,_0x1f0d0e){return _0x341d50+_0x1f0d0e;},'TUdke':function(_0x510c86,_0x420167){return _0x510c86&_0x420167;},'zishI':_0x7a1689(0x13a),'cWvcG':'ALL_PROXY','vlFsj':function(_0x59f208,_0x4ac49e){return _0x59f208(_0x4ac49e);},'PAqeE':function(_0x2d7089,_0x3ec536){return _0x2d7089==_0x3ec536;},'xANjR':_0x7a1689(0xdd),'QCsDR':function(_0x555bb1,_0x1aa05a){return _0x555bb1>_0x1aa05a;},'QfQUt':function(_0x49f0e8,_0x5a21bc){return _0x49f0e8(_0x5a21bc);},'zdlpp':function(_0xeeaf38,_0x35e378){return _0xeeaf38<_0x35e378;},'WxXIE':function(_0xf58eee,_0x356221){return _0xf58eee+_0x356221;},'KsoQw':function(_0x286ff7,_0x5f179a){return _0x286ff7(_0x5f179a);},'ZdsGg':function(_0x42bd20,_0x1f3c0b){return _0x42bd20(_0x1f3c0b);},'UhBys':function(_0x2ee48a,_0x90d6b8){return _0x2ee48a(_0x90d6b8);},'dehMf':function(_0xb2135,_0x2aa83d){return _0xb2135(_0x2aa83d);},'BLVth':function(_0x4be4ae,_0x105049){return _0x4be4ae(_0x105049);},'MOOIn':_0x7a1689(0x10a),'kmakj':_0x7a1689(0x1c6),'tkBIc':function(_0x13af95,_0x51cfa5){return _0x13af95(_0x51cfa5);},'scJYW':_0x7a1689(0x12e),'MTBAd':_0x7a1689(0x1c9),'FYZyv':_0x7a1689(0x15c),'hKGpi':function(_0x3fedc9,_0x4bedb4){return _0x3fedc9(_0x4bedb4);},'rUVBg':_0x7a1689(0x125),'XYovh':_0x7a1689(0x1b8),'oYofx':function(_0x1afaed,_0x17ba14){return _0x1afaed(_0x17ba14);},'lbOPt':function(_0x3736d2,_0x20a966){return _0x3736d2===_0x20a966;},'lTGHT':_0x7a1689(0xf7),'RigDd':function(_0x5b3513,_0xb52795){return _0x5b3513/_0xb52795;},'EHaBF':function(_0x14fa40,_0x18d0bd){return _0x14fa40(_0x18d0bd);},'XVoUJ':function(_0x477c0f,_0x256805){return _0x477c0f+_0x256805;},'OcNlK':'。继续?','OvPwW':'用户取消诊断','gxfxi':function(_0x1ff30a,_0x24c1e9){return _0x1ff30a===_0x24c1e9;},'gNUoZ':_0x7a1689(0x139),'FaLEc':_0x7a1689(0x1a3),'fvMpI':_0x7a1689(0x164),'LEsXA':function(_0x171bba,_0x223fc6,_0x21a2e0){return _0x171bba(_0x223fc6,_0x21a2e0);},'UfVIK':function(_0x219084,_0x50648a){return _0x219084===_0x50648a;},'HBJSu':_0x7a1689(0x18f),'AALiY':_0x7a1689(0x148),'SgOOX':function(_0xfa60e7,_0x4f34c8){return _0xfa60e7(_0x4f34c8);},'XHoMV':function(_0x5973ef,_0x5d3abd){return _0x5973ef(_0x5d3abd);}},_0x4873eb={..._0x29b0ad,..._0x385d3b},_0x2d305b={'yes':!0x1,'models':void 0x0,'skipCliTests':!0x1,'outDir':void 0x0,..._0x293594};_0x4873eb[_0x7a1689(0xd7)](_0x2f75d1[_0x7a1689(0x159)]);let _0x3a1829=function(_0xb10a57){const _0x32bea9=_0x7a1689;for(const _0x5ea08e of h){const _0x3e5e02=_0x2f75d1[_0x32bea9(0xfd)](x,_0x5ea08e);let _0x4fee44;try{_0x4fee44=_0x218346[_0x32bea9(0x11c)](_0x3e5e02,_0x2f75d1[_0x32bea9(0x14e)]);}catch{continue;}const _0x2633ae=_0x2f75d1[_0x32bea9(0xfd)](j,_0x4fee44);if(_0x2633ae)return{'key':_0x2633ae,'baseUrl':C(_0x4fee44,_0xb10a57),'source':_0x5ea08e[_0x32bea9(0x12d)]};}return null;}(_0x49dac8);if(_0x3a1829)_0x4873eb['ok'](_0x7a1689(0x122)+_0x3a1829[_0x7a1689(0x1a9)]+'('+_0x2f75d1[_0x7a1689(0x1ec)](O,_0x3a1829[_0x7a1689(0x193)])+_0x7a1689(0x151)+_0x3a1829[_0x7a1689(0xde)]+')');else{_0x4873eb[_0x7a1689(0x1e5)](_0x2f75d1[_0x7a1689(0x12f)]);const _0x5c05aa=(await _0x2f75d1[_0x7a1689(0x1c7)](_0x1e410f,_0x2f75d1['scJYW']))[_0x7a1689(0x179)]();if(!_0x5c05aa)throw new Error(_0x2f75d1['MTBAd']);_0x3a1829={'key':_0x5c05aa,'baseUrl':_0x49dac8,'source':_0x2f75d1[_0x7a1689(0x1e1)]},_0x4873eb['ok'](_0x7a1689(0x1f1)+_0x2f75d1[_0x7a1689(0xc2)](O,_0x5c05aa)+_0x7a1689(0x151)+_0x3a1829[_0x7a1689(0xde)]+')');}_0x4873eb['step'](_0x2f75d1[_0x7a1689(0x12c)]);const _0x3a0ee0=(function(){const _0x4051e8=_0x7a1689,_0x4ab745=_0x2f75d1[_0x4051e8(0x16c)](_0x1190f2),_0x1c36a6={};for(const _0x3b8f67 of h){const _0x1da996=x(_0x3b8f67),_0x12252a={'path':_0x1da996,'exists':!0x1};try{const _0x1d1476=_0x218346['statSync'](_0x1da996);_0x12252a[_0x4051e8(0xdc)]=!0x0,_0x12252a[_0x4051e8(0x140)]=_0x1d1476[_0x4051e8(0x140)],_0x12252a[_0x4051e8(0x128)]=_0x1d1476[_0x4051e8(0x128)]['toISOString'](),_0x12252a[_0x4051e8(0x1bd)]=_0x2f75d1[_0x4051e8(0xc8)]('0',_0x2f75d1[_0x4051e8(0x14c)](0x1ff,_0x1d1476[_0x4051e8(0x1bd)])[_0x4051e8(0xe8)](0x8));}catch{}_0x1c36a6[_0x3b8f67['label']]=_0x12252a;}const _0xdd76b1={};for(const _0x335393 of[_0x2f75d1[_0x4051e8(0x1b6)],'HTTPS_PROXY',_0x2f75d1[_0x4051e8(0x10c)],'NO_PROXY']){const _0x435b05=process['env'][_0x335393]??process[_0x4051e8(0x1c8)][_0x335393[_0x4051e8(0x141)]()]??null;_0xdd76b1[_0x335393]=_0x2f75d1[_0x4051e8(0x186)](E,_0x435b05);}return{'os':_0x4ab745['os'],'node':_0x4ab745[_0x4051e8(0x1c2)],'installed_clis':_0x4ab745[_0x4051e8(0xeb)],'config_files':_0x1c36a6,'proxy_env':_0xdd76b1};}());_0x4873eb[_0x7a1689(0x196)](_0x7a1689(0x16e)+_0x3a0ee0['os'][_0x7a1689(0x171)]+_0x7a1689(0x17a)+_0x3a0ee0[_0x7a1689(0x1c2)]['version']+_0x7a1689(0xe4)+Object[_0x7a1689(0xe7)](_0x3a0ee0[_0x7a1689(0x16d)])[_0x7a1689(0xda)]+'\x20个'),_0x4873eb['step'](_0x2f75d1[_0x7a1689(0x1a7)]);const _0x552d93=await _0x2f75d1[_0x7a1689(0xf2)](K,_0x49dac8);_0x2f75d1[_0x7a1689(0x185)](_0x2f75d1[_0x7a1689(0x152)],_0x552d93[_0x7a1689(0x1a9)])?_0x4873eb['ok'](_0x7a1689(0x123)+_0x552d93['models']['length']+_0x7a1689(0x17e)+_0x2f75d1[_0x7a1689(0x13c)](_0x552d93[_0x7a1689(0x155)],0x3e8)+_0x7a1689(0x19e)+_0x552d93[_0x7a1689(0x1d9)]):_0x4873eb[_0x7a1689(0x1e5)]('后端诊断配置不可用(404/超时/非法),使用内置兜底矩阵');const _0x52d7f0=function(_0x3b13f4,_0x150743){const _0x442e29=_0x7a1689;let _0x4b19a0=_0x3b13f4;return _0x2f75d1[_0x442e29(0x1de)](_0x2f75d1[_0x442e29(0x158)],typeof _0x4b19a0)&&(_0x4b19a0=_0x4b19a0[_0x442e29(0x117)](',')),Array[_0x442e29(0x1ef)](_0x4b19a0)&&(_0x4b19a0=_0x4b19a0['map'](_0x367d49=>String(_0x367d49)[_0x442e29(0x179)]())['filter'](Boolean),_0x2f75d1[_0x442e29(0x1e4)](_0x4b19a0[_0x442e29(0xda)],0x0))?[...new Set(_0x4b19a0)]:_0x150743;}(_0x2d305b[_0x7a1689(0x197)],_0x552d93[_0x7a1689(0x197)]);if(!_0x2d305b[_0x7a1689(0x1d6)]){if(!await _0x2f75d1[_0x7a1689(0x137)](_0x18edf9,_0x2f75d1[_0x7a1689(0x14b)](_0x2f75d1['BAaRJ']('将对\x20'+_0x3a1829['baseUrl']+_0x7a1689(0xe5)+_0x52d7f0['length']+_0x7a1689(0x1dc)+_0x552d93[_0x7a1689(0x19a)]+_0x7a1689(0x181),_0x2d305b['skipCliTests']?'':_0x7a1689(0x189)),_0x2f75d1[_0x7a1689(0x101)])))throw new Error(_0x2f75d1['OvPwW']);}_0x4873eb[_0x7a1689(0xd7)]('HTTP\x20直测('+_0x52d7f0[_0x7a1689(0xda)]+_0x7a1689(0x1da)+_0x552d93[_0x7a1689(0x1d9)]+')');const _0x127f61=await async function({cred:_0x292254,models:_0x31f840,cfg:_0x14206f,deviceId:_0x2b4dc7}){const _0x707183=_0x7a1689,_0x4fc4c8=Math['max'](0x1,_0x14206f[_0x707183(0x1d9)]),_0x291b83=[];for(let _0x591afb=0x0;_0x2f75d1['zdlpp'](_0x591afb,_0x31f840['length']);_0x591afb+=_0x4fc4c8){const _0x486a76=_0x31f840[_0x707183(0x15b)](_0x591afb,_0x2f75d1[_0x707183(0x1ae)](_0x591afb,_0x4fc4c8)),_0x5c765d=await Promise[_0x707183(0x1b5)](_0x486a76['map'](async _0xd6fcdb=>{const _0x295b8f=_0x707183,_0x319c31=await _0x2f75d1['vlFsj'](H,{'baseUrl':_0x292254[_0x295b8f(0xde)],'apiKey':_0x292254['key'],'model':_0xd6fcdb,'maxTokens':_0x14206f[_0x295b8f(0x19a)],'timeoutMs':_0x14206f['timeout_ms'],'deviceId':_0x2b4dc7});return{'model':_0xd6fcdb,..._0x319c31,'code':_0x2f75d1[_0x295b8f(0x157)](L,_0x319c31)};}));_0x291b83['push'](..._0x5c765d);}return _0x291b83;}({'cred':_0x3a1829,'models':_0x52d7f0,'cfg':_0x552d93,'deviceId':_0x2f75d1[_0x7a1689(0x16c)](_0x348855)});for(const _0x35d70 of _0x127f61){const _0x4701e1=_0x35d70['model']+_0x7a1689(0x19c)+(_0x35d70[_0x7a1689(0x19d)]??'ERR')+_0x7a1689(0x131)+(_0x35d70[_0x7a1689(0x124)]??'-')+_0x7a1689(0x165)+_0x552d93['hints'][_0x35d70[_0x7a1689(0x1b1)]];'ok'===_0x35d70['code']?_0x4873eb['ok'](_0x4701e1):_0x2f75d1['gxfxi'](_0x2f75d1[_0x7a1689(0xed)],_0x35d70[_0x7a1689(0x1b1)])?_0x4873eb[_0x7a1689(0x1e5)](_0x4701e1):_0x4873eb[_0x7a1689(0xe9)](_0x4701e1);}const _0x25823e=[];if(_0x2d305b[_0x7a1689(0x134)])_0x4873eb[_0x7a1689(0x196)](_0x2f75d1['FaLEc']);else{const _0x3d9a2f=$[_0x7a1689(0x1ed)](_0x17c5c5=>_0x3a0ee0['installed_clis'][_0x17c5c5]);if(_0x2f75d1[_0x7a1689(0x13e)](0x0,_0x3d9a2f[_0x7a1689(0xda)]))_0x4873eb[_0x7a1689(0x1e5)](_0x2f75d1[_0x7a1689(0x1be)]);else{_0x4873eb[_0x7a1689(0xd7)](_0x7a1689(0x198)+_0x3d9a2f[_0x7a1689(0xda)]+'\x20个,各\x2030s\x20超时)');for(const _0x372ba7 of _0x3d9a2f){_0x4873eb['info']('运行\x20'+_0x372ba7+'\x20'+y[_0x372ba7][_0x7a1689(0x11b)]('\x20')+'\x20…');const _0x233280=await _0x2f75d1[_0x7a1689(0x1bb)](R,_0x372ba7,y[_0x372ba7]);_0x25823e[_0x7a1689(0x15e)](_0x233280),_0x233280[_0x7a1689(0x126)]?_0x4873eb[_0x7a1689(0x1e5)](_0x372ba7+_0x7a1689(0xcb)):_0x2f75d1[_0x7a1689(0x1af)](0x0,_0x233280['exit_code'])?_0x4873eb['ok'](_0x372ba7+_0x7a1689(0x1a5)+_0x233280[_0x7a1689(0x15a)]+'ms'):_0x4873eb[_0x7a1689(0xe9)](_0x372ba7+_0x7a1689(0x195)+(_0x233280[_0x7a1689(0x1ab)]??_0x2f75d1[_0x7a1689(0x174)])+'\x20/\x20'+_0x233280[_0x7a1689(0x15a)]+'ms');}}}_0x4873eb[_0x7a1689(0xd7)](_0x2f75d1['AALiY']);const _0x5742cc=(function(){const _0xe5a68d=_0x7a1689,_0x97d6d4=new Date(),_0x49747e=_0x252ff0=>String(_0x252ff0)[_0xe5a68d(0x1a2)](0x2,'0');return''+_0x97d6d4['getFullYear']()+_0x49747e(_0x97d6d4['getMonth']()+0x1)+_0x2f75d1[_0xe5a68d(0x1ec)](_0x49747e,_0x97d6d4['getDate']())+'T'+_0x49747e(_0x97d6d4[_0xe5a68d(0x1d7)]())+_0x2f75d1[_0xe5a68d(0xf6)](_0x49747e,_0x97d6d4['getMinutes']())+_0x49747e(_0x97d6d4[_0xe5a68d(0x14d)]());}()),_0x160b12=_0x127f61[_0x7a1689(0x1c0)](_0x1ec21f=>JSON[_0x7a1689(0x16a)]({'model':_0x1ec21f[_0x7a1689(0x180)],'request_id':_0x1ec21f[_0x7a1689(0x160)]??null,'status':_0x1ec21f[_0x7a1689(0x19d)]??null,'ttfb_ms':_0x1ec21f[_0x7a1689(0x124)]??null,'total_ms':_0x1ec21f[_0x7a1689(0xef)]??null,'error':_0x1ec21f[_0x7a1689(0x192)]?redact(_0x1ec21f['error']):null,'response_preview':_0x1ec21f[_0x7a1689(0xc3)]?redact(_0x1ec21f['response_preview']):''})),_0x480fed=_0x25823e[_0x7a1689(0x1c0)](_0x4aeae1=>JSON[_0x7a1689(0x16a)](_0x4aeae1)),_0x2ae133=[];for(const _0x36557a of h){let _0x25405f;try{_0x25405f=_0x218346[_0x7a1689(0x11c)](_0x2f75d1['BLVth'](x,_0x36557a),_0x2f75d1[_0x7a1689(0x14e)]);}catch{continue;}_0x2ae133['push']({'name':_0x2f75d1[_0x7a1689(0x1ad)](U,_0x36557a[_0x7a1689(0x12d)])+_0x7a1689(0x13f),'content':_0x2f75d1[_0x7a1689(0x1d5)](S,_0x25405f)});}const _0x44a277={'tool_version':f,'generated_at':new Date()['toISOString'](),'api_base':_0x49dac8,'credential':{'source':_0x3a1829[_0x7a1689(0x1a9)],'key_redacted':_0x2f75d1[_0x7a1689(0xfd)](O,_0x3a1829['key'])},'config_source':_0x552d93[_0x7a1689(0x1a9)],'http_tests':_0x127f61[_0x7a1689(0x1c0)](_0x4a07cf=>({'model':_0x4a07cf[_0x7a1689(0x180)],'status':_0x4a07cf[_0x7a1689(0x19d)]??null,'verdict':_0x552d93[_0x7a1689(0x187)][_0x4a07cf[_0x7a1689(0x1b1)]],'ttfb_ms':_0x4a07cf[_0x7a1689(0x124)]??null,'total_ms':_0x4a07cf['total_ms']??null,'request_id':_0x4a07cf[_0x7a1689(0x160)]??null})),'cli_tests':_0x25823e[_0x7a1689(0x1c0)](_0xf1d085=>({'cli':_0xf1d085[_0x7a1689(0x1c3)],'exit_code':_0xf1d085['exit_code'],'verdict':0x0!==_0xf1d085['exit_code']||_0xf1d085[_0x7a1689(0x126)]?_0x7a1689(0xe9):'ok'})),'zip_path':''},_0x10d23d={'generated_at':_0x44a277[_0x7a1689(0x162)],'tool_version':f,..._0x3a0ee0},_0x3ec1e8=function({stamp:_0x214306,summary:_0x2ab6c6,envJson:_0x489bfd,httpLines:_0x11dea0,cliLines:_0x1640b6,configCopies:_0x510b92,outDir:_0x121245}){const _0x4df23c=_0x7a1689,_0x29eda7='tokenshop-diagnose-'+_0x214306,_0x4d96b1=_0x29eda7+_0x4df23c(0x1ee),_0x5cbf7b={[_0x29eda7+_0x4df23c(0x172)]:_0x2f75d1[_0x4df23c(0x157)](_0x49ae04,JSON['stringify'](_0x2ab6c6,null,0x2)),[_0x29eda7+'/env.json']:_0x2f75d1['UhBys'](_0x49ae04,JSON[_0x4df23c(0x16a)](_0x489bfd,null,0x2)),[_0x29eda7+_0x4df23c(0x1ca)]:_0x49ae04(_0x2f75d1[_0x4df23c(0x186)](D,_0x11dea0)),[_0x29eda7+_0x4df23c(0xd4)]:_0x2f75d1[_0x4df23c(0x1a4)](_0x49ae04,D(_0x1640b6)),[_0x29eda7+'/README.txt']:_0x49ae04(z({'summary':_0x2ab6c6,'modelCount':_0x2ab6c6[_0x4df23c(0x1d0)][_0x4df23c(0xda)]}))};for(const _0x1d7c91 of _0x510b92)_0x5cbf7b[_0x29eda7+_0x4df23c(0x16b)+_0x1d7c91['name']]=_0x2f75d1['BLVth'](_0x49ae04,_0x1d7c91[_0x4df23c(0xc7)]);const _0x171818=_0x121245||process[_0x4df23c(0x1e3)](),_0x17753d=_0x705772[_0x4df23c(0x11b)](_0x171818,_0x4d96b1);try{_0x218346[_0x4df23c(0x1ea)](_0x171818,{'recursive':!0x0}),_0x218346[_0x4df23c(0x1c5)](_0x17753d,Buffer[_0x4df23c(0x1a6)](_0x2f75d1['ZdsGg'](_0x254954,_0x5cbf7b)));}catch(_0x3c2f44){throw new Error('诊断包写入失败('+_0x17753d+'):'+_0x3c2f44[_0x4df23c(0x120)]);}return _0x17753d;}({'stamp':_0x5742cc,'summary':{..._0x44a277,'zip_path':_0x2f75d1['LEsXA'](Y,_0x5742cc,_0x2d305b[_0x7a1689(0xf3)])},'envJson':_0x10d23d,'httpLines':_0x160b12,'cliLines':_0x480fed,'configCopies':_0x2ae133,'outDir':_0x2d305b[_0x7a1689(0xf3)]});_0x44a277[_0x7a1689(0x133)]=_0x3ec1e8;const _0x1bb75b=_0x127f61[_0x7a1689(0x1ed)](_0x1dc630=>'ok'===_0x1dc630['code'])[_0x7a1689(0xda)],_0x215711=_0x127f61['filter'](_0x5f3ac6=>_0x7a1689(0xe9)===_0x5f3ac6['code'])['length'];return _0x4873eb['ok'](_0x7a1689(0x12b)+_0x3ec1e8),_0x4873eb['info'](_0x7a1689(0x167)+_0x127f61['length']+_0x7a1689(0xd6)+_0x1bb75b+'\x20/\x20缓慢\x20'+(_0x127f61[_0x7a1689(0xda)]-_0x1bb75b-_0x215711)+_0x7a1689(0x118)+_0x215711+_0x7a1689(0x1eb)+_0x25823e[_0x7a1689(0xda)]+_0x7a1689(0x150)),{'zipPath':_0x3ec1e8,'summary':_0x44a277};}
|
package/dist/lib/install.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4344f0,_0x2c047b){const _0x2f5e43=_0x7858,_0x473e6e=_0x4344f0();while(!![]){try{const _0x1e4bfc=parseInt(_0x2f5e43(0x190))/0x1+parseInt(_0x2f5e43(0x196))/0x2+-parseInt(_0x2f5e43(0x1ab))/0x3*(parseInt(_0x2f5e43(0x192))/0x4)+-parseInt(_0x2f5e43(0x1ad))/0x5+-parseInt(_0x2f5e43(0x18a))/0x6*(parseInt(_0x2f5e43(0x191))/0x7)+parseInt(_0x2f5e43(0x1b1))/0x8+parseInt(_0x2f5e43(0x1a2))/0x9;if(_0x1e4bfc===_0x2c047b)break;else _0x473e6e['push'](_0x473e6e['shift']());}catch(_0x14d516){_0x473e6e['push'](_0x473e6e['shift']());}}}(_0x3b49,0x46e81));import{spawnSync as _0x3be955}from'node:child_process';import{detectInstalled as _0x24d0cf}from'./detect.mjs';import{confirm as _0xa18aa5}from'./prompt.mjs';export function installCLI(_0x28f9f0,_0x288182={}){const _0x3e56f7=_0x7858,_0x58f140={'RGZzs':_0x3e56f7(0x1a8),'aiBIG':_0x3e56f7(0x1af),'oybMp':'win32','OPpko':_0x3e56f7(0x1a3),'GhXku':function(_0x4bc7b5,_0x23c8dd,_0x343cbd,_0x5677c7){return _0x4bc7b5(_0x23c8dd,_0x343cbd,_0x5677c7);},'QyCfB':_0x3e56f7(0x193),'uhEDC':_0x3e56f7(0x1aa),'zBGhC':function(_0x54123e,_0x4d436e){return _0x54123e===_0x4d436e;}};if(!_0x28f9f0||!_0x28f9f0['installPackage'])return{'ok':!0x1,'skipped':!0x0,'reason':_0x58f140[_0x3e56f7(0x19a)]};const _0x521f39=_0x28f9f0[_0x3e56f7(0x19f)],_0x4dfcde=_0x3e56f7(0x186)+_0x521f39;if(_0x288182[_0x3e56f7(0x187)])return console[_0x3e56f7(0x1b0)](_0x3e56f7(0x198)+_0x4dfcde+_0x3e56f7(0x185)),{'ok':!0x0,'skipped':!0x0,'reason':_0x58f140['aiBIG']};console[_0x3e56f7(0x1b0)](_0x3e56f7(0x18d)+_0x4dfcde+'…');try{const _0x4e2aac=_0x58f140[_0x3e56f7(0x19e)]===process[_0x3e56f7(0x1a1)],_0x519168=_0x4e2aac?process['env'][_0x3e56f7(0x19c)]||'cmd.exe':_0x58f140[_0x3e56f7(0x18e)],_0x47702f=_0x58f140[_0x3e56f7(0x195)](_0x3be955,_0x519168,_0x4e2aac?['/c',_0x3e56f7(0x1a3),_0x58f140[_0x3e56f7(0x1a9)],'-g',_0x521f39]:[_0x58f140[_0x3e56f7(0x1a9)],'-g',_0x521f39],{'stdio':_0x58f140[_0x3e56f7(0x182)]});return _0x47702f[_0x3e56f7(0x188)]?{'ok':!0x1,'error':_0x47702f[_0x3e56f7(0x188)][_0x3e56f7(0x1ae)]}:_0x58f140['zBGhC'](0x0,_0x47702f[_0x3e56f7(0x181)])?{'ok':!0x0}:{'ok':!0x1,'error':_0x3e56f7(0x1a6)+_0x47702f[_0x3e56f7(0x181)]};}catch(_0x5b3b59){return{'ok':!0x1,'error':_0x5b3b59[_0x3e56f7(0x1ae)]};}}export async function ensureInstalled(_0x58d98f,_0x7b68f4={}){const _0x51d5c9=_0x7858,_0xba03f1={'BkqIf':_0x51d5c9(0x189),'hXhZc':function(_0x3be68a,_0x2b3217,_0x4c13a9){return _0x3be68a(_0x2b3217,_0x4c13a9);},'QkKqA':_0x51d5c9(0x1af),'Fiutu':function(_0x27975f,_0x409f00){return _0x27975f===_0x409f00;},'rkHlG':function(_0x553cc3,_0x511cb5,_0x436655){return _0x553cc3(_0x511cb5,_0x436655);},'uGrnS':_0x51d5c9(0x184),'cgOCW':function(_0x5c4cb8,_0x39c2ba,_0x5a9be8){return _0x5c4cb8(_0x39c2ba,_0x5a9be8);},'Wanzy':function(_0x432873,_0x4c0626){return _0x432873(_0x4c0626);}};if(!_0x58d98f||!_0x58d98f[_0x51d5c9(0x19f)])return{'installed':!0x1,'skipped':!0x0,'reason':_0xba03f1[_0x51d5c9(0x18f)]};const _0x170070=_0x58d98f[_0x51d5c9(0x199)]||_0x58d98f[_0x51d5c9(0x19f)][_0x51d5c9(0x1a4)]('/')[_0x51d5c9(0x1a7)](),_0x1eaa70=_0x24d0cf(_0x170070);if(_0x1eaa70[_0x51d5c9(0x197)])return{'installed':!0x0,'version':_0x1eaa70['version']};const {dryRun:_0xe1f67c,autoInstall:_0x4cb68e}=_0x7b68f4;if(_0xe1f67c)return{'installed':!0x1,'skipped':!0x0,'reason':_0xba03f1['hXhZc'](installCLI,_0x58d98f,{'dryRun':!0x0})[_0x51d5c9(0x19b)]||_0xba03f1['QkKqA']};let _0x4987bd=_0xba03f1[_0x51d5c9(0x1ac)](!0x0,_0x4cb68e);if(_0x4987bd||(_0x4987bd=await _0xba03f1[_0x51d5c9(0x183)](_0xa18aa5,_0x51d5c9(0x19d)+(_0x58d98f['name']||_0x170070)+_0x51d5c9(0x194)+_0x170070+'),是否现在安装?\x0a\x20\x20运行:'+(_0x58d98f[_0x51d5c9(0x18b)]||_0x51d5c9(0x186)+_0x58d98f[_0x51d5c9(0x19f)]),{'defaultValue':!0x0})),!_0x4987bd)return{'installed':!0x1,'skipped':!0x0,'reason':_0xba03f1[_0x51d5c9(0x18c)]};const _0x1e7762=_0xba03f1['cgOCW'](installCLI,_0x58d98f,{'dryRun':!0x1});if(_0x1e7762['ok']){const _0x233b21=_0xba03f1[_0x51d5c9(0x1a0)](_0x24d0cf,_0x170070);return{'installed':_0x233b21[_0x51d5c9(0x197)],'version':_0x233b21[_0x51d5c9(0x1a5)],'justInstalled':!0x0};}return{'installed':!0x1,'error':_0x1e7762['error']};}function _0x7858(_0x5d3fea,_0x2a8887){_0x5d3fea=_0x5d3fea-0x181;const _0x3b495d=_0x3b49();let _0x785861=_0x3b495d[_0x5d3fea];return _0x785861;}function _0x3b49(){const _0x474bb0=['npm\x20install\x20-g\x20','dryRun','error','no-meta','272664EJOSHv','installCmd','uGrnS','\x20\x20正在执行:','OPpko','BkqIf','410597PhsgCc','28fkmIAI','278996TjkicY','install','(命令\x20','GhXku','326880HLhPQR','installed','\x20\x20[试运行]\x20将运行:','detectBin','RGZzs','reason','COMSPEC','未检测到\x20','oybMp','installPackage','Wanzy','platform','6441831BPNaSV','npm','split','version','npm\x20exit\x20','pop','no-install-package','QyCfB','inherit','21RmjUVT','Fiutu','2676005cQaIhy','message','dry-run','log','1646856FRNgYv','status','uhEDC','rkHlG','user-declined','(不真实安装)'];_0x3b49=function(){return _0x474bb0;};return _0x3b49();}
|
package/dist/lib/platforms.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const _0x1b1bf7=_0x8d99;(function(_0xed01c6,_0xd2b01){const _0x52b7e0=_0x8d99,_0xa37778=_0xed01c6();while(!![]){try{const _0x1a53da=-parseInt(_0x52b7e0(0x109))/0x1+parseInt(_0x52b7e0(0x101))/0x2+-parseInt(_0x52b7e0(0x104))/0x3+parseInt(_0x52b7e0(0xfb))/0x4*(-parseInt(_0x52b7e0(0x100))/0x5)+parseInt(_0x52b7e0(0x110))/0x6+parseInt(_0x52b7e0(0x122))/0x7*(parseInt(_0x52b7e0(0xf9))/0x8)+parseInt(_0x52b7e0(0x114))/0x9;if(_0x1a53da===_0xd2b01)break;else _0xa37778['push'](_0xa37778['shift']());}catch(_0x1dc891){_0xa37778['push'](_0xa37778['shift']());}}}(_0x279e,0xeb9c9));function _0x279e(){const _0x47cf56=['Codex\x20CLI\x20(WebSocket)','~/.codex/auth.json','~/.gemini/settings.json','项目根放\x20CLAUDE.md\x20让\x20Claude\x20了解你的代码库','Claude\x20Code','gemini','OpenCode','\x20\x20claude\x20mcp\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20管理\x20MCP\x20服务器','@google/gemini-cli','Codex\x20CLI','@openai/codex','opencode','join','173894gsAHqG','\x20\x20claude\x20-c\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20继续最近会话','claude','运行\x20`gemini`\x20开始;`gemini\x20--help`\x20查看选项;在项目根放\x20GEMINI.md\x20让\x20Gemini\x20了解你的代码库','8LtPogy','\x20\x20claude\x20--dangerously-skip-permissions\x20\x20\x20\x20\x20\x20\x20\x20跳过所有权限提示(=bypassPermissions,谨慎用)','2346140GWrmCK','\x20\x20claude\x20-p\x20\x22问题\x22\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20非交互模式(输出后退出,适合脚本)','权限模式(Shift+Tab\x20切换):default\x20/\x20acceptEdits\x20/\x20plan\x20/\x20auto\x20/\x20bypassPermissions','\x20\x20codex\x20--yolo\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20全跳过(无\x20sandbox\x20无\x20approval,仅信任仓库)','\x20\x20codex\x20--full-auto\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20全自动(sandbox\x20内自动批准,推荐)','5ZKGacU','1888294namWCn','codex','npm\x20install\x20-g\x20@google/gemini-cli','1531398FIcpcp','\x20\x20claude\x20\x22你的问题\x22\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20带初始问题启动','\x20\x20claude\x20--model\x20sonnet\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20指定模型(sonnet/opus/haiku/fable)','运行\x20`opencode`\x20开始;`opencode\x20--help`\x20查看选项;在项目根放\x20AGENTS.md\x20让\x20OpenCode\x20了解你的代码库','\x20\x20codex\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20查看所有选项','1563165SXokcm','\x20\x20claude\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20交互模式','~/.config/opencode/opencode.json','~/.claude.json','@anthropic-ai/claude-code','\x20\x20codex\x20--sandbox\x20read-only\x20--ask-for-approval\x20never\x20只读(最安全)','\x20\x20claude\x20update\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20更新到最新版','9205806NXMMEU','权限模式(默认每步确认):','npm\x20install\x20-g\x20opencode-ai','npm\x20install\x20-g\x20@openai/codex','10097469yenRoR'];_0x279e=function(){return _0x47cf56;};return _0x279e();}function _0x8d99(_0x20c9ae,_0x32bcd3){_0x20c9ae=_0x20c9ae-0xf8;const _0x279e34=_0x279e();let _0x8d995e=_0x279e34[_0x20c9ae];return _0x8d995e;}export const CLI_META={'codex':{'name':_0x1b1bf7(0x11e),'installPackage':'@openai/codex','installCmd':'npm\x20install\x20-g\x20@openai/codex','startCmd':_0x1b1bf7(0x102),'detectBin':'codex','configFiles':['~/.codex/config.toml','~/.codex/auth.json'],'usage':[_0x1b1bf7(0x111),_0x1b1bf7(0xff),'\x20\x20codex\x20--yolo\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20全跳过(无\x20sandbox\x20无\x20approval,仅信任仓库)',_0x1b1bf7(0x10e),_0x1b1bf7(0x108),'项目根放\x20AGENTS.md\x20让\x20Codex\x20了解你的代码库'][_0x1b1bf7(0x121)]('\x0a'),'isPrimary':!0x0},'codex-ws':{'name':_0x1b1bf7(0x115),'installPackage':_0x1b1bf7(0x11f),'installCmd':_0x1b1bf7(0x113),'startCmd':_0x1b1bf7(0x102),'detectBin':_0x1b1bf7(0x102),'configFiles':['~/.codex/config.toml',_0x1b1bf7(0x116)],'usage':['权限模式(WebSocket\x20模式由服务端配置激活,默认每步确认):',_0x1b1bf7(0xff),_0x1b1bf7(0xfe),_0x1b1bf7(0x10e),_0x1b1bf7(0x108)][_0x1b1bf7(0x121)]('\x0a'),'isPrimary':!0x1},'claude':{'name':_0x1b1bf7(0x119),'installPackage':_0x1b1bf7(0x10d),'installCmd':'npm\x20install\x20-g\x20@anthropic-ai/claude-code','startCmd':_0x1b1bf7(0x124),'detectBin':_0x1b1bf7(0x124),'configFiles':['~/.claude/',_0x1b1bf7(0x10c)],'usage':['常用命令:',_0x1b1bf7(0x10a),_0x1b1bf7(0x105),_0x1b1bf7(0xfc),_0x1b1bf7(0x123),'\x20\x20claude\x20-r\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20恢复历史会话(选择器)',_0x1b1bf7(0x106),_0x1b1bf7(0x11c),'\x20\x20claude\x20doctor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20诊断安装/配置',_0x1b1bf7(0x10f),_0x1b1bf7(0xfd),_0x1b1bf7(0xfa),_0x1b1bf7(0x118)][_0x1b1bf7(0x121)]('\x0a'),'isPrimary':!0x0},'gemini-cli':{'name':'Gemini\x20CLI','installPackage':_0x1b1bf7(0x11d),'installCmd':_0x1b1bf7(0x103),'startCmd':_0x1b1bf7(0x11a),'detectBin':_0x1b1bf7(0x11a),'configFiles':[_0x1b1bf7(0x117)],'usage':_0x1b1bf7(0xf8),'isPrimary':!0x0},'opencode':{'name':_0x1b1bf7(0x11b),'installPackage':'opencode-ai','installCmd':_0x1b1bf7(0x112),'startCmd':'opencode','detectBin':_0x1b1bf7(0x120),'configFiles':[_0x1b1bf7(0x10b),'opencode.json'],'usage':_0x1b1bf7(0x107),'isPrimary':!0x1}};export function getCliMeta(_0x58cfef){return CLI_META[_0x58cfef]||null;}export function isDefaultSelected(_0x3ea92c){const _0xca1d7e=CLI_META[_0x3ea92c];return!_0xca1d7e||_0xca1d7e['isPrimary'];}
|
package/dist/lib/pow.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x19a565,_0x11441e){const _0x34bffd=_0x3ea6,_0x5223f7=_0x19a565();while(!![]){try{const _0x514938=-parseInt(_0x34bffd(0x202))/0x1+-parseInt(_0x34bffd(0x1eb))/0x2*(-parseInt(_0x34bffd(0x1ec))/0x3)+parseInt(_0x34bffd(0x1ed))/0x4+-parseInt(_0x34bffd(0x206))/0x5+-parseInt(_0x34bffd(0x1e5))/0x6+parseInt(_0x34bffd(0x1db))/0x7*(-parseInt(_0x34bffd(0x207))/0x8)+parseInt(_0x34bffd(0x1e1))/0x9;if(_0x514938===_0x11441e)break;else _0x5223f7['push'](_0x5223f7['shift']());}catch(_0x451677){_0x5223f7['push'](_0x5223f7['shift']());}}}(_0x3935,0xbbced));function _0x3ea6(_0x217995,_0x1580ea){_0x217995=_0x217995-0x1db;const _0x3935a5=_0x3935();let _0x3ea6c7=_0x3935a5[_0x217995];return _0x3ea6c7;}import _0x5d47bd from'node:https';import _0x11010a from'node:http';function _0x3935(){const _0x5b09a5=['update','sEcQt','startsWith','30ksogEJ','105612PHOeNS','3815716QviZoM','https:','body','request','object','无效的\x20apiBase:','raw','hex','sha256','sgHbI','expires_at','jCzbe','PKRLA','data','jBgEH','xLtjJ','qGsEY','error','href','ykWLO','statusCode','1198185TgyDPD','dtSca','expiresAt','fTbHs','1641845vqZcOx','56Hqaqmk','RLqsT','concat','parse','application/json','XPKkZ','179767bpQTHY','protocol','PoW\x20challenge\x20响应非\x20JSON(HTTP\x20','push','timeout','end','15501852gAzVat','GET','message','repeat','4373010JJGRuN','digest','UloEn'];_0x3935=function(){return _0x5b09a5;};return _0x3935();}import _0x4c2f54 from'node:crypto';export function getChallenge({apiBase:_0x333148,deviceId:_0x293ca6}){const _0x49c099=_0x3ea6,_0x42fc7e={'gmVYI':_0x49c099(0x1fa),'jBgEH':'utf8','dtSca':function(_0x5e8a68,_0x39371c){return _0x5e8a68(_0x39371c);},'XPKkZ':function(_0x332e0c,_0x15c5f4){return _0x332e0c>=_0x15c5f4;},'dySuJ':function(_0x46293b,_0x3db277){return _0x46293b==_0x3db277;},'qGsEY':_0x49c099(0x1f1),'aJiuP':'/api/v1/cli/pow/challenge','TvHmA':function(_0x584082,_0x26057e){return _0x584082(_0x26057e);},'ukFsS':function(_0x14fa2d,_0x35ec41){return _0x14fa2d===_0x35ec41;},'jCzbe':_0x49c099(0x20b),'sgHbI':_0x49c099(0x1df)};return new Promise((_0x3f9293,_0x2b4035)=>{const _0x10d877=_0x49c099,_0x97c78e={'ykWLO':_0x42fc7e[_0x10d877(0x1fb)],'RLqsT':function(_0x4e9b9e,_0x17a4d7){const _0x595850=_0x10d877;return _0x42fc7e[_0x595850(0x203)](_0x4e9b9e,_0x17a4d7);},'sEcQt':function(_0x258d5c,_0x5c7137){const _0xa4a746=_0x10d877;return _0x42fc7e[_0xa4a746(0x20c)](_0x258d5c,_0x5c7137);},'fTbHs':function(_0x1f4d7f,_0x7646c1){return _0x42fc7e['dtSca'](_0x1f4d7f,_0x7646c1);},'UloEn':function(_0x501646,_0x2aed37){return _0x42fc7e['dySuJ'](_0x501646,_0x2aed37);},'xLtjJ':_0x42fc7e[_0x10d877(0x1fd)]};let _0x1d1be7;try{_0x1d1be7=new URL(_0x42fc7e['aJiuP'],_0x333148);}catch(_0x5b6e92){return void _0x42fc7e['TvHmA'](_0x2b4035,new Error(_0x10d877(0x1f2)+_0x333148+'('+_0x5b6e92['message']+')'));}const _0x23ee47=(_0x42fc7e['ukFsS'](_0x10d877(0x1ee),_0x1d1be7[_0x10d877(0x1dc)])?_0x5d47bd:_0x11010a)[_0x10d877(0x1f0)](_0x1d1be7,{'method':_0x10d877(0x1e2),'headers':{'X-Device-Id':_0x293ca6,'Accept':_0x42fc7e[_0x10d877(0x1f8)]},'timeout':0x7530},_0x4a3590=>{const _0x3b0dbe=_0x10d877,_0x45688a=[];_0x4a3590['on'](_0x42fc7e['gmVYI'],_0x4157bf=>_0x45688a[_0x3b0dbe(0x1de)](_0x4157bf)),_0x4a3590['on'](_0x3b0dbe(0x1e0),()=>{const _0x1b143f=_0x3b0dbe,_0x8ef12a=Buffer[_0x1b143f(0x209)](_0x45688a)['toString'](_0x97c78e[_0x1b143f(0x200)]);let _0x2a0c24;try{_0x2a0c24=_0x8ef12a?JSON[_0x1b143f(0x20a)](_0x8ef12a):{};}catch{const _0x5ba7b5=new Error(_0x1b143f(0x1dd)+_0x4a3590[_0x1b143f(0x201)]+'):'+_0x8ef12a['slice'](0x0,0xc8));return _0x5ba7b5['statusCode']=_0x4a3590[_0x1b143f(0x201)],_0x5ba7b5[_0x1b143f(0x1f3)]=_0x8ef12a,void _0x97c78e[_0x1b143f(0x208)](_0x2b4035,_0x5ba7b5);}if(_0x97c78e[_0x1b143f(0x1e9)](_0x4a3590['statusCode'],0xc8)&&_0x4a3590['statusCode']<0x12c)_0x97c78e[_0x1b143f(0x205)](_0x3f9293,{'challenge':_0x2a0c24['challenge'],'difficulty':_0x2a0c24['difficulty'],'expiresAt':_0x2a0c24[_0x1b143f(0x1f7)]||_0x2a0c24[_0x1b143f(0x204)]});else{const _0x131484=_0x2a0c24?.[_0x1b143f(0x1fe)],_0x4e2ffb=(_0x131484&&_0x97c78e[_0x1b143f(0x1e7)](_0x97c78e[_0x1b143f(0x1fc)],typeof _0x131484)?_0x131484[_0x1b143f(0x1e3)]:_0x131484)||_0x2a0c24?.[_0x1b143f(0x1e3)]||'HTTP\x20'+_0x4a3590[_0x1b143f(0x201)],_0x260807=new Error(_0x4e2ffb);_0x260807[_0x1b143f(0x201)]=_0x4a3590[_0x1b143f(0x201)],_0x260807[_0x1b143f(0x1ef)]=_0x2a0c24,_0x2b4035(_0x260807);}});});_0x23ee47['on'](_0x42fc7e[_0x10d877(0x1f6)],()=>{const _0x495c9d=_0x10d877;_0x23ee47['destroy'](new Error('PoW\x20challenge\x20请求超时(30s)—\x20'+_0x1d1be7[_0x495c9d(0x1ff)]));}),_0x23ee47['on'](_0x10d877(0x1fe),_0x2b4035),_0x23ee47['end']();});}export function solvePoW(_0x3875ba,_0x5cb5a8){const _0x59b38b=_0x3ea6,_0x220f9b={'PKRLA':_0x59b38b(0x1f5)},_0x116822='0'[_0x59b38b(0x1e4)](_0x5cb5a8);let _0x59e661=0x0;for(;;){if(_0x4c2f54['createHash'](_0x220f9b[_0x59b38b(0x1f9)])[_0x59b38b(0x1e8)](_0x3875ba+':'+_0x59e661)[_0x59b38b(0x1e6)](_0x59b38b(0x1f4))[_0x59b38b(0x1ea)](_0x116822))return String(_0x59e661);_0x59e661++;}}
|
package/dist/lib/prompt.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x7cb54a,_0x4a77a8){const _0x493764=_0x5c1c,_0x2d0445=_0x7cb54a();while(!![]){try{const _0x1fa8bf=-parseInt(_0x493764(0x170))/0x1*(-parseInt(_0x493764(0x168))/0x2)+parseInt(_0x493764(0x187))/0x3+-parseInt(_0x493764(0x185))/0x4+parseInt(_0x493764(0x179))/0x5+-parseInt(_0x493764(0x174))/0x6+parseInt(_0x493764(0x16a))/0x7+parseInt(_0x493764(0x195))/0x8;if(_0x1fa8bf===_0x4a77a8)break;else _0x2d0445['push'](_0x2d0445['shift']());}catch(_0x56974b){_0x2d0445['push'](_0x2d0445['shift']());}}}(_0x6d34,0x2e542));import _0x4d751d from'node:readline';let t=null;async function n(){const _0x59331f=_0x5c1c,_0x2719a8={'QNcWC':'@inquirer/prompts'};return t||(t=await import(_0x2719a8[_0x59331f(0x152)])),t;}let a=null,s=null,o=null;function _0x5c1c(_0x4b0fc4,_0x35c396){_0x4b0fc4=_0x4b0fc4-0x151;const _0x6d349d=_0x6d34();let _0x5c1c89=_0x6d349d[_0x4b0fc4];return _0x5c1c89;}function r(){const _0x5c0acb=_0x5c1c,_0x31b98c={'vOPen':function(_0x3b0db5,_0x346179){return _0x3b0db5===_0x346179;}};return _0x31b98c[_0x5c0acb(0x173)](!0x0,process[_0x5c0acb(0x16e)][_0x5c0acb(0x163)]);}export function closePrompt(){const _0x3c3fbb=_0x5c1c;a&&!a[_0x3c3fbb(0x18f)]&&a[_0x3c3fbb(0x181)](),a=null;}export async function ask(_0x39bdb6,{defaultValue:_0x575a5d}={}){const _0x1ec5d1=_0x5c1c,_0x4d6e35={'ndRaq':function(_0x279a08,_0x111914){return _0x279a08>_0x111914;},'gxLNz':function(_0x47d14e){return _0x47d14e();},'OhAiC':_0x1ec5d1(0x193),'EytwH':_0x1ec5d1(0x154),'dJKbC':function(_0x4863f7){return _0x4863f7();},'HXNKl':function(_0x1e9cda,_0x469be2){return _0x1e9cda??_0x469be2;},'PPFCH':function(_0x1d5b46,_0x1f082a){return _0x1d5b46??_0x1f082a;},'TaSbA':function(_0x31cbb8,_0x1bffb7){return _0x31cbb8??_0x1bffb7;}},_0x4c01b4=_0x575a5d?'\x20['+_0x575a5d+']':'';if(r()){const _0x46bd89=await _0x4d6e35[_0x1ec5d1(0x15f)](n);return await _0x46bd89[_0x1ec5d1(0x18e)]({'message':''+_0x39bdb6+_0x4c01b4,'default':_0x4d6e35['HXNKl'](_0x575a5d,'')})||_0x4d6e35[_0x1ec5d1(0x18d)](_0x575a5d,'');}await(s||(s=[],o=new Promise(_0x206635=>{const _0x23c1fb=_0x1ec5d1,_0x5929ef={'ZVZGH':function(_0x1e0d7b,_0x12354f){return _0x4d6e35['ndRaq'](_0x1e0d7b,_0x12354f);},'NFUDb':function(_0x5be2cf,_0x41e06c){return _0x5be2cf-_0x41e06c;},'zhmQF':function(_0x1f3071){const _0x5cdf55=_0x5c1c;return _0x4d6e35[_0x5cdf55(0x164)](_0x1f3071);}};let _0x568a43='';process[_0x23c1fb(0x16e)][_0x23c1fb(0x186)](_0x4d6e35['OhAiC']),process[_0x23c1fb(0x16e)]['on'](_0x4d6e35['EytwH'],_0x5ba9f6=>{_0x568a43+=_0x5ba9f6;}),process['stdin']['on'](_0x23c1fb(0x17b),()=>{const _0x2769db=_0x23c1fb,_0x4779ce=_0x568a43[_0x2769db(0x158)](/\r?\n/);_0x5929ef[_0x2769db(0x16f)](_0x4779ce['length'],0x0)&&''===_0x4779ce[_0x5929ef[_0x2769db(0x171)](_0x4779ce[_0x2769db(0x17f)],0x1)]&&_0x4779ce[_0x2769db(0x190)](),s[_0x2769db(0x176)](..._0x4779ce),_0x5929ef[_0x2769db(0x162)](_0x206635);}),process[_0x23c1fb(0x16e)][_0x23c1fb(0x15b)]&&_0x4d6e35[_0x23c1fb(0x15f)](_0x206635);})),o);const _0x2dc5bf=s['shift']()??'';return process[_0x1ec5d1(0x178)][_0x1ec5d1(0x189)](''+_0x39bdb6+_0x4c01b4+':\x20'+_0x2dc5bf+'\x0a'),_0x2dc5bf[_0x1ec5d1(0x17c)]()||_0x4d6e35[_0x1ec5d1(0x18c)](_0x575a5d,'');}export async function askSecret(_0x5ebd8c){const _0x4c11b4=_0x5c1c,_0x4d20ff={'vYkzD':function(_0x491e33){return _0x491e33();},'GxUef':function(_0x87b0c0,_0x3ac090){return _0x87b0c0(_0x3ac090);}};if(_0x4d20ff[_0x4c11b4(0x16c)](r))return(await _0x4d20ff['vYkzD'](n))[_0x4c11b4(0x160)]({'message':_0x5ebd8c,'mask':'*'});return _0x4d20ff['GxUef'](ask,_0x5ebd8c);}function _0x6d34(){const _0x182118=['gGDjM','zhmQF','isTTY','gxLNz','Y/n','nHMfB','dvKcW','2498WMSKDH','SCmUG','1931797CfOWwB','XfqDu','vYkzD','yes','stdin','ZVZGH','259Crdyqx','NFUDb','tBWRP','vOPen','1749138dTTsga','log','push','all','stdout','304460CMBKjV','ntHHI','end','trim','label','map','length','\x20(默认)','close','confirm','forEach','KUOMg','1438524MrBkTi','setEncoding','309675VgHsjR','PuNdN','write','xTpJk','FTUTk','TaSbA','PPFCH','input','closed','pop','XoulI','shtKs','utf8','exsio','618696qNJACE','选择序号','iXfzM','QNcWC','filter','data','VpqFr','rhoKp','y/N','split','jPoFT','includes','destroyed','bsmmX','toLowerCase','select','dJKbC','password'];_0x6d34=function(){return _0x182118;};return _0x6d34();}export async function multiSelect(_0x5c4e86,_0x191e86,{defaultSelected:_0x26898a=[]}={}){const _0x1f00af=_0x5c1c,_0x299bf9={'tBWRP':function(_0x2dea91,_0xfd704){return _0x2dea91+_0xfd704;},'XfqDu':function(_0x3d3de1,_0x4a7ad1){return _0x3d3de1===_0x4a7ad1;},'bsmmX':function(_0x421568){return _0x421568();},'jPoFT':'\x20\x20(输入序号,逗号/空格分隔;回车=默认;a=全选;n=全不选)','VpqFr':function(_0x19d9fa,_0x176352,_0x5aed09){return _0x19d9fa(_0x176352,_0x5aed09);},'Gjwzj':_0x1f00af(0x177),'PuNdN':function(_0x1339bd,_0x1f013){return _0x1339bd===_0x1f013;},'ZbMvb':'none'};if(_0x299bf9[_0x1f00af(0x16b)](0x0,_0x191e86[_0x1f00af(0x17f)]))return[];if(_0x299bf9[_0x1f00af(0x15c)](r)){const _0xe8d66f=await n(),_0x19c800=_0x191e86['map']((_0x146b0e,_0x42827a)=>({'name':_0x146b0e['label'],'value':_0x42827a,'checked':_0x26898a[_0x1f00af(0x15a)](_0x42827a)}));return await _0xe8d66f['checkbox']({'message':_0x5c4e86,'choices':_0x19c800,'loop':!0x1,'required':!0x1});}console[_0x1f00af(0x175)](_0x5c4e86),_0x191e86[_0x1f00af(0x183)]((_0x20e496,_0x4696ce)=>{const _0x639f9c=_0x1f00af,_0x18f73f=_0x26898a[_0x639f9c(0x15a)](_0x4696ce);console['log']('\x20\x20['+(_0x18f73f?'x':'\x20')+']\x20'+_0x299bf9[_0x639f9c(0x172)](_0x4696ce,0x1)+'.\x20'+_0x20e496[_0x639f9c(0x17d)]);}),console[_0x1f00af(0x175)](_0x299bf9[_0x1f00af(0x159)]);const _0x474a95=_0x26898a['map'](_0x29e007=>_0x29e007+0x1)['join'](','),_0x407425=await _0x299bf9[_0x1f00af(0x155)](ask,'选择',{'defaultValue':_0x474a95}),_0xa21064=_0x407425['trim']()['toLowerCase']();if('a'===_0xa21064||_0x299bf9['Gjwzj']===_0xa21064)return _0x191e86[_0x1f00af(0x17e)]((_0x1b11f6,_0xbdc429)=>_0xbdc429);if(_0x299bf9[_0x1f00af(0x188)]('n',_0xa21064)||_0x299bf9['ZbMvb']===_0xa21064)return[];const _0x5e8ea2=_0x407425[_0x1f00af(0x158)](/[,\s]+/)[_0x1f00af(0x17e)](_0x5d9e32=>parseInt(_0x5d9e32,0xa))[_0x1f00af(0x153)](_0x31cdf6=>!isNaN(_0x31cdf6)&&_0x31cdf6>=0x1&&_0x31cdf6<=_0x191e86[_0x1f00af(0x17f)])[_0x1f00af(0x17e)](_0x39ee23=>_0x39ee23-0x1);return[...new Set(_0x5e8ea2)];}export async function select(_0x128b00,_0x313057,{defaultIndex:_0x46f3a1=0x0}={}){const _0x13dbdc=_0x5c1c,_0x4bdd76={'nHMfB':function(_0x5362ad,_0x50a299){return _0x5362ad===_0x50a299;},'ntHHI':function(_0x3c9298,_0x63472f){return _0x3c9298+_0x63472f;},'dvKcW':function(_0x1eaf91,_0x23f1d2){return _0x1eaf91===_0x23f1d2;},'wtUDC':function(_0x1dd51e){return _0x1dd51e();},'WNXlz':function(_0x35c0d5){return _0x35c0d5();},'gGDjM':function(_0x2b1d7d,_0x194788,_0x22827e){return _0x2b1d7d(_0x194788,_0x22827e);},'XoulI':_0x13dbdc(0x196),'shtKs':function(_0x3e7d2c,_0x329228){return _0x3e7d2c(_0x329228);},'KUOMg':function(_0x12af8c,_0x345b2d,_0x3c6271){return _0x12af8c(_0x345b2d,_0x3c6271);},'eZUBU':function(_0x4271a4,_0x292dd6){return _0x4271a4<_0x292dd6;},'FTUTk':function(_0x277f92,_0x1cf51e){return _0x277f92-_0x1cf51e;}};if(_0x4bdd76[_0x13dbdc(0x167)](0x0,_0x313057[_0x13dbdc(0x17f)]))return-0x1;if(0x1===_0x313057['length'])return 0x0;if(_0x4bdd76['wtUDC'](r)){const _0x2516bf=await _0x4bdd76['WNXlz'](n),_0x3fc7ab=_0x313057[_0x13dbdc(0x17e)]((_0x379011,_0x519454)=>({'name':_0x379011[_0x13dbdc(0x17d)],'value':_0x519454}));return _0x2516bf[_0x13dbdc(0x15e)]({'message':_0x128b00,'choices':_0x3fc7ab,'default':_0x46f3a1,'loop':!0x1});}console[_0x13dbdc(0x175)](_0x128b00),_0x313057[_0x13dbdc(0x183)]((_0x5bad7b,_0x4ac55b)=>{const _0xd7ce39=_0x13dbdc,_0x103f13=_0x4bdd76[_0xd7ce39(0x166)](_0x4ac55b,_0x46f3a1)?_0xd7ce39(0x180):'';console[_0xd7ce39(0x175)]('\x20\x20'+_0x4bdd76[_0xd7ce39(0x17a)](_0x4ac55b,0x1)+'.\x20'+_0x5bad7b[_0xd7ce39(0x17d)]+_0x103f13);});const _0x397dca=await _0x4bdd76[_0x13dbdc(0x161)](ask,_0x4bdd76[_0x13dbdc(0x191)],{'defaultValue':_0x4bdd76[_0x13dbdc(0x192)](String,_0x4bdd76['ntHHI'](_0x46f3a1,0x1))}),_0x2b9b58=_0x4bdd76[_0x13dbdc(0x184)](parseInt,_0x397dca,0xa);return isNaN(_0x2b9b58)||_0x4bdd76['eZUBU'](_0x2b9b58,0x1)||_0x2b9b58>_0x313057[_0x13dbdc(0x17f)]?_0x46f3a1:_0x4bdd76[_0x13dbdc(0x18b)](_0x2b9b58,0x1);}export async function confirm(_0x4c383f,{defaultValue:_0x20668e=!0x0}={}){const _0x4dfc14=_0x5c1c,_0x263552={'SCmUG':function(_0x182dd3){return _0x182dd3();},'iXfzM':_0x4dfc14(0x165),'xTpJk':function(_0x28d495,_0x793195){return _0x28d495===_0x793195;},'rhoKp':function(_0x1ba1ac,_0x260550){return _0x1ba1ac===_0x260550;},'exsio':_0x4dfc14(0x16d)};if(_0x263552[_0x4dfc14(0x169)](r))return(await n())[_0x4dfc14(0x182)]({'message':_0x4c383f,'default':_0x20668e});const _0x4e3a7a=_0x20668e?_0x263552[_0x4dfc14(0x151)]:_0x4dfc14(0x157),_0x353924=(await ask(_0x4c383f+'\x20('+_0x4e3a7a+')',{'defaultValue':_0x20668e?'y':'n'}))[_0x4dfc14(0x17c)]()[_0x4dfc14(0x15d)]();return _0x353924?_0x263552[_0x4dfc14(0x18a)]('y',_0x353924)||_0x263552[_0x4dfc14(0x156)](_0x263552[_0x4dfc14(0x194)],_0x353924):_0x20668e;}
|
package/dist/lib/render.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x4fae9c=_0x3832;(function(_0x195a19,_0x4ee062){const _0x3f48ea=_0x3832,_0x325d20=_0x195a19();while(!![]){try{const _0x244eb5=parseInt(_0x3f48ea(0x1c2))/0x1+-parseInt(_0x3f48ea(0x19d))/0x2*(parseInt(_0x3f48ea(0x1b1))/0x3)+-parseInt(_0x3f48ea(0x1a9))/0x4*(-parseInt(_0x3f48ea(0x1c3))/0x5)+parseInt(_0x3f48ea(0x1a6))/0x6*(-parseInt(_0x3f48ea(0x19f))/0x7)+parseInt(_0x3f48ea(0x19e))/0x8*(parseInt(_0x3f48ea(0x1b3))/0x9)+parseInt(_0x3f48ea(0x1b0))/0xa*(-parseInt(_0x3f48ea(0x1a7))/0xb)+-parseInt(_0x3f48ea(0x1b6))/0xc*(-parseInt(_0x3f48ea(0x1ae))/0xd);if(_0x244eb5===_0x4ee062)break;else _0x325d20['push'](_0x325d20['shift']());}catch(_0x39c5cc){_0x325d20['push'](_0x325d20['shift']());}}}(_0x366b,0x1d0c1));export const PLACEHOLDERS=[_0x4fae9c(0x19c),_0x4fae9c(0x1a0),_0x4fae9c(0x1ad),_0x4fae9c(0x1a5),_0x4fae9c(0x1b5),_0x4fae9c(0x1a3),_0x4fae9c(0x1bc)];export function renderContent(_0xd77a08,_0x222d2d){const _0x42edbf=_0x4fae9c,_0x54ebd0={'ZetIv':function(_0x179475,_0x496885){return _0x179475(_0x496885);}};if(!_0xd77a08)return'';let _0x2d95a0=_0xd77a08;for(const _0x5c1b4e of PLACEHOLDERS){const _0x292794=_0x222d2d[_0x5c1b4e];null!=_0x292794&&(_0x2d95a0=_0x2d95a0[_0x42edbf(0x1a8)]('{{'+_0x5c1b4e+'}}')[_0x42edbf(0x1ab)](_0x54ebd0[_0x42edbf(0x1aa)](String,_0x292794)));}return _0x2d95a0;}export function expandPath(_0x36d014,{isWindows:_0x4c493c}={}){const _0x3a0645=_0x4fae9c,_0xc65830={'JWcEH':function(_0x1236f0,_0x2bc540){return _0x1236f0===_0x2bc540;},'ZgcNU':function(_0x2fa6c7,_0x5b09bc){return _0x2fa6c7+_0x5b09bc;}};if(!_0x36d014)return _0x36d014;if(_0x4c493c){const _0x2b838e=process[_0x3a0645(0x1be)][_0x3a0645(0x1bd)]||'';return _0x36d014[_0x3a0645(0x1c4)](/^%userprofile%/i,_0x2b838e)[_0x3a0645(0x1c4)](/^~/,_0x2b838e);}const _0x485f59=process[_0x3a0645(0x1be)][_0x3a0645(0x1b8)]||'';return _0xc65830[_0x3a0645(0x1c1)]('~',_0x36d014)?_0x485f59:_0x36d014[_0x3a0645(0x1c0)]('~/')?_0xc65830[_0x3a0645(0x1ac)](_0x485f59,_0x36d014[_0x3a0645(0x1bf)](0x1)):_0x36d014;}function t(_0x25df59){const _0x4bf073=_0x4fae9c,_0x2b71f9={'SpZkb':function(_0x32f448,_0x5c60b2){return _0x32f448||_0x5c60b2;},'cCCXt':function(_0x57dcfc,_0x9c8e3a,_0x55d211){return _0x57dcfc(_0x9c8e3a,_0x55d211);}},_0x1bff79=String(_0x2b71f9[_0x4bf073(0x1a2)](_0x25df59,''))['toLowerCase']()['match'](/(\d+)\.(\d+)/);return _0x1bff79?[parseInt(_0x1bff79[0x1],0xa),_0x2b71f9[_0x4bf073(0x1a1)](parseInt,_0x1bff79[0x2],0xa)]:[0x0,0x0];}function _0x3832(_0x36124b,_0x4fd7a9){_0x36124b=_0x36124b-0x19b;const _0x366b5f=_0x366b();let _0x3832c7=_0x366b5f[_0x36124b];return _0x3832c7;}function _0x366b(){const _0x115347=['startsWith','JWcEH','189283hAKRtn','181970tvXJlN','replace','length','apiKey','218JRPkiY','8zEOjmV','48727QamEpK','baseUrl','cCCXt','SpZkb','antigravityApiBaseBeta','string','apiBaseBeta','150HjSlAX','1708333RRflPg','split','4ESXVdK','ZetIv','join','ZgcNU','apiBase','1183uyFCtW','RNlPC','10YtMHyI','6471OXZpQY','isArray','986994RziDau','name','antigravityApiBase','45900hAWExa','sort','HOME','HxgWM','fIMZP','oVODU','defaultModel','USERPROFILE','env','slice'];_0x366b=function(){return _0x115347;};return _0x366b();}export function listModels(_0x1c8306){const _0x309de9=_0x4fae9c,_0x4a6807={'eCOWa':function(_0x243fcd,_0x284327){return _0x243fcd==_0x284327;},'Dyldm':function(_0x50a8f5,_0x5218e3){return _0x50a8f5(_0x5218e3);},'oVODU':function(_0x1f84bd,_0x225572){return _0x1f84bd-_0x225572;},'HxgWM':function(_0x5157ba,_0x2a17bc){return _0x5157ba(_0x2a17bc);},'fIMZP':function(_0x46f373,_0x200606){return _0x46f373(_0x200606);},'RNlPC':function(_0x231def,_0x51b59d){return _0x231def===_0x51b59d;}};if(!Array[_0x309de9(0x1b2)](_0x1c8306)||_0x4a6807[_0x309de9(0x1af)](0x0,_0x1c8306[_0x309de9(0x19b)]))return[];const _0xc1639b=_0x1c8306['map']((_0x32a6a5,_0x47db5c)=>{const _0x2564f6=_0x309de9;if(_0x4a6807['eCOWa'](_0x2564f6(0x1a4),typeof _0x32a6a5))return{'index':_0x47db5c,'id':_0x32a6a5,'label':_0x32a6a5,'raw':_0x32a6a5};const _0x8c92d9=_0x32a6a5['id']||_0x32a6a5['name']||_0x4a6807['Dyldm'](String,_0x32a6a5);return{'index':_0x47db5c,'id':_0x8c92d9,'label':_0x32a6a5[_0x2564f6(0x1b4)]||_0x32a6a5['id']||_0x8c92d9,'raw':_0x32a6a5};});return _0xc1639b[_0x309de9(0x1b7)]((_0x9b7dcd,_0x600217)=>{const _0x1b0226=_0x309de9,_0x253bc7=_0x4a6807['Dyldm'](t,_0x9b7dcd['id']),_0x3b5a71=t(_0x600217['id']);return _0x3b5a71[0x0]-_0x253bc7[0x0]||_0x4a6807[_0x1b0226(0x1bb)](_0x3b5a71[0x1],_0x253bc7[0x1])||_0x4a6807[_0x1b0226(0x1b9)](String,_0x9b7dcd['id'])['localeCompare'](_0x4a6807[_0x1b0226(0x1ba)](String,_0x600217['id']));}),_0xc1639b;}
|
package/dist/lib/ui.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x405db5=_0x27f6;(function(_0xbca597,_0x3bd7fd){const _0x2600fa=_0x27f6,_0x9aaf8b=_0xbca597();while(!![]){try{const _0x3e8fc0=parseInt(_0x2600fa(0x14c))/0x1*(-parseInt(_0x2600fa(0x15d))/0x2)+-parseInt(_0x2600fa(0x155))/0x3*(-parseInt(_0x2600fa(0x156))/0x4)+parseInt(_0x2600fa(0x154))/0x5*(-parseInt(_0x2600fa(0x161))/0x6)+-parseInt(_0x2600fa(0x163))/0x7*(parseInt(_0x2600fa(0x164))/0x8)+parseInt(_0x2600fa(0x157))/0x9+-parseInt(_0x2600fa(0x162))/0xa*(-parseInt(_0x2600fa(0x165))/0xb)+parseInt(_0x2600fa(0x14e))/0xc;if(_0x3e8fc0===_0x3bd7fd)break;else _0x9aaf8b['push'](_0x9aaf8b['shift']());}catch(_0x260254){_0x9aaf8b['push'](_0x9aaf8b['shift']());}}}(_0x7709,0x744f5));import _0x44cfeb from'chalk';import{createRequire as _0x15fcbe}from'node:module';const n=_0x405db5(0x15a)+_0x15fcbe(import.meta.url)(_0x405db5(0x14d))[_0x405db5(0x14b)];export function banner(){const _0x565953=_0x405db5;console[_0x565953(0x15f)](_0x44cfeb[_0x565953(0x14a)][_0x565953(0x166)](n['replace'](/^\n/,'')[_0x565953(0x15e)]()));}export function ok(_0x1f25b5){const _0x5574eb=_0x405db5;console[_0x5574eb(0x15f)](_0x44cfeb['green']('✓\x20'+_0x1f25b5));}export function fail(_0xa2dda9){const _0x1fbdab=_0x405db5;console['error'](_0x44cfeb[_0x1fbdab(0x14f)]('✗\x20'+_0xa2dda9));}function _0x27f6(_0x30059a,_0xcd63ab){_0x30059a=_0x30059a-0x14a;const _0x7709ed=_0x7709();let _0x27f673=_0x7709ed[_0x30059a];return _0x27f673;}export function warn(_0x30e5e6){const _0x18dedc=_0x405db5;console['warn'](_0x44cfeb[_0x18dedc(0x169)]('⚠\x20'+_0x30e5e6));}export function info(_0x279df0){const _0x19f230=_0x405db5;console['log'](_0x44cfeb[_0x19f230(0x15b)]('ℹ\x20'+_0x279df0));}export function step(_0x31d5d3){const _0x1886de=_0x405db5;console['log'](),console[_0x1886de(0x15f)](_0x44cfeb[_0x1886de(0x14a)][_0x1886de(0x166)]('■\x20'+_0x31d5d3));}export function guide(_0x55b498){const _0xe3ffb9=_0x405db5,_0xba05e6={'JDDrs':function(_0x355388,_0x2683ba){return _0x355388!==_0x2683ba;},'cEuYM':function(_0x453de5,_0x75757a){return _0x453de5(_0x75757a);},'Hfarn':_0xe3ffb9(0x158)};if(_0x55b498&&_0xba05e6[_0xe3ffb9(0x168)](0x0,_0x55b498[_0xe3ffb9(0x151)])){_0xba05e6[_0xe3ffb9(0x167)](step,_0xba05e6[_0xe3ffb9(0x150)]);for(const _0x1dcf30 of _0x55b498){const _0x124bad=_0x44cfeb[_0xe3ffb9(0x14a)]['green'](_0xe3ffb9(0x152)+_0x1dcf30[_0xe3ffb9(0x159)]),_0x4cb5e6=_0x44cfeb['green'](_0xe3ffb9(0x153)+_0x1dcf30[_0xe3ffb9(0x15c)]),_0x42e2ca=_0x44cfeb['dim'](_0x1dcf30[_0xe3ffb9(0x160)]||'');console[_0xe3ffb9(0x15f)](_0x124bad),console[_0xe3ffb9(0x15f)](_0x4cb5e6),_0x42e2ca&&console[_0xe3ffb9(0x15f)](_0x42e2ca),console[_0xe3ffb9(0x15f)]();}}}export function plain(_0x9d3ae8){const _0x2de509=_0x405db5;console[_0x2de509(0x15f)](_0x9d3ae8);}function _0x7709(){const _0x29340a=['49VcRgmx','875848dfwtTQ','1199tHMSXo','cyan','cEuYM','JDDrs','yellow','bold','version','5SDFHWG','../package.json','15281724KZDvwX','red','Hfarn','length','\x20\x20▶\x20','\x20\x20\x20\x20启动:','170xBUMGh','3qdVxUE','689764wUMjRV','772164XgXbVi','启动\x20/\x20使用指南','name','\x20\x20____\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20_\x20\x20\x20\x20\x20\x20\x20_\x0a\x20|___\x20\x5c\x20__\x20_\x20_\x20__\x20(_)\x20\x20___|\x20|_\x20___\x20\x20_\x20__\x20___\x0a\x20\x20\x20__)\x20/\x20_`\x20|\x20\x27_\x20\x5c|\x20|\x20/\x20__|\x20__/\x20_\x20\x5c|\x20\x27__/\x20_\x20\x5c\x0a\x20\x20/\x20__/\x20(_|\x20|\x20|_)\x20|\x20|_\x5c__\x20\x5c\x20||\x20(_)\x20|\x20|\x20|\x20\x20__/\x0a\x20|_____\x5c__,_|\x20.__/|_(_)___/\x5c__\x5c___/|_|\x20\x20\x5c___|\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20|_|\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20v','blue','startCmd','142970dBYjIv','trimEnd','log','usage','36330OrmXZs','25170bQMThF'];_0x7709=function(){return _0x29340a;};return _0x7709();}export{_0x44cfeb as chalk};
|
package/dist/lib/write.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x4cc8d4=_0x29f4;(function(_0x7c2320,_0x5c2ffd){const _0x3a3576=_0x29f4,_0x50b5a2=_0x7c2320();while(!![]){try{const _0x5a5d32=-parseInt(_0x3a3576(0x137))/0x1+-parseInt(_0x3a3576(0x133))/0x2*(-parseInt(_0x3a3576(0x13a))/0x3)+-parseInt(_0x3a3576(0x134))/0x4*(-parseInt(_0x3a3576(0x123))/0x5)+-parseInt(_0x3a3576(0x13b))/0x6+parseInt(_0x3a3576(0x12a))/0x7+parseInt(_0x3a3576(0x135))/0x8*(parseInt(_0x3a3576(0x132))/0x9)+parseInt(_0x3a3576(0x136))/0xa*(-parseInt(_0x3a3576(0x128))/0xb);if(_0x5a5d32===_0x5c2ffd)break;else _0x50b5a2['push'](_0x50b5a2['shift']());}catch(_0x3ffabe){_0x50b5a2['push'](_0x50b5a2['shift']());}}}(_0xee76,0x8f3d5));function _0xee76(){const _0x295ce3=['20361WeIgbE',')\x0a\x20\x20','59871pPgPMy','EACCES','YnjUS','code','name','message','EROFS','writeFileSync','9NXGWpD','68tVcmrF','1157896amfYGq','7324456zQJsaY','1220yFKcUl','886495tzchEf','has','AGKiN','87999ZyFJFV','6544968rRqhuv','EPERM','写入失败:','mkdirSync','path','15CXbphO','请用「管理员\x20PowerShell」重跑:\x0a\x20\x20\x20\x20Start-Process\x20powershell\x20-Verb\x20RunAs\x20-ArgumentList\x20\x22npx,-y,@2api-store/activate\x22','请用\x20sudo\x20重跑:\x0a\x20\x20\x20\x20sudo\x20npx\x20-y\x20@2api-store/activate','utf8','PermissionDeniedError'];_0xee76=function(){return _0x295ce3;};return _0xee76();}function _0x29f4(_0x4d082e,_0x2c7eb7){_0x4d082e=_0x4d082e-0x120;const _0xee7640=_0xee76();let _0x29f454=_0xee7640[_0x4d082e];return _0x29f454;}import _0xf8b27c from'node:fs';import _0x43ae6f from'node:path';const o=new Set([_0x4cc8d4(0x12b),_0x4cc8d4(0x13c),_0x4cc8d4(0x130)]);export class PermissionDeniedError extends Error{constructor(_0x413630,_0x773db4,_0x35b3f7){const _0x38f1a1=_0x4cc8d4,_0x176331={'AGKiN':_0x38f1a1(0x124),'YnjUS':_0x38f1a1(0x127)},_0x369e83=_0x35b3f7?_0x176331[_0x38f1a1(0x139)]:_0x38f1a1(0x125);super(_0x38f1a1(0x120)+_0x413630+'('+(_0x773db4[_0x38f1a1(0x12d)]||_0x773db4[_0x38f1a1(0x12f)])+_0x38f1a1(0x129)+_0x369e83),this[_0x38f1a1(0x12e)]=_0x176331[_0x38f1a1(0x12c)],this[_0x38f1a1(0x12d)]=_0x773db4[_0x38f1a1(0x12d)],this[_0x38f1a1(0x122)]=_0x413630,this['cause']=_0x773db4;}}export function writeFileWithPermission(_0x5daac0,_0x527e4b,{isWindows:_0x594fb2=!0x1}={}){const _0x5211a3=_0x4cc8d4,_0xdfb923={'KMqyW':_0x5211a3(0x126)},_0x847262=_0x43ae6f['dirname'](_0x5daac0);try{_0xf8b27c[_0x5211a3(0x121)](_0x847262,{'recursive':!0x0});}catch(_0x1cd7c4){if(o[_0x5211a3(0x138)](_0x1cd7c4[_0x5211a3(0x12d)]))throw new PermissionDeniedError(_0x5daac0,_0x1cd7c4,_0x594fb2);throw _0x1cd7c4;}try{_0xf8b27c[_0x5211a3(0x131)](_0x5daac0,_0x527e4b,{'encoding':_0xdfb923['KMqyW'],'mode':0x180});}catch(_0x4c051f){if(o['has'](_0x4c051f['code']))throw new PermissionDeniedError(_0x5daac0,_0x4c051f,_0x594fb2);throw _0x4c051f;}return _0x5daac0;}
|
package/dist/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@2api-store/activate",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "TokenShop CLI 一键激活:配置本地 codex/claude/gemini/grok/opencode 指向 2api.store 中转(彩色输出 + 自动安装 CLI)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -34,7 +34,8 @@
|
|
|
34
34
|
"author": "TokenShop",
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@inquirer/prompts": "^7.0.0",
|
|
37
|
-
"chalk": "^5.4.0"
|
|
37
|
+
"chalk": "^5.4.0",
|
|
38
|
+
"fflate": "^0.8.3"
|
|
38
39
|
},
|
|
39
40
|
"devDependencies": {
|
|
40
41
|
"javascript-obfuscator": "^4.1.0",
|