@2api-store/activate 0.9.0 → 0.9.1
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/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 -1
- 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 +1 -1
package/dist/lib/device.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function _0x1063(_0x2d71b3,_0x1a6801){_0x2d71b3=_0x2d71b3-0x138;const _0x382dbe=_0x382d();let _0x10632e=_0x382dbe[_0x2d71b3];return _0x10632e;}const _0x5e5c17=_0x1063;(function(_0x1e4644,_0x27f240){const _0x5d9362=_0x1063,_0x386224=_0x1e4644();while(!![]){try{const _0x2bffdc=parseInt(_0x5d9362(0x14e))/0x1+parseInt(_0x5d9362(0x15d))/0x2*(parseInt(_0x5d9362(0x13d))/0x3)+-parseInt(_0x5d9362(0x154))/0x4+-parseInt(_0x5d9362(0x13b))/0x5+-parseInt(_0x5d9362(0x13a))/0x6+parseInt(_0x5d9362(0x13c))/0x7+-parseInt(_0x5d9362(0x141))/0x8*(parseInt(_0x5d9362(0x152))/0x9);if(_0x2bffdc===_0x27f240)break;else _0x386224['push'](_0x386224['shift']());}catch(_0x2568ad){_0x386224['push'](_0x386224['shift']());}}}(_0x382d,0x3c2b3));import _0x58dd2e from'node:crypto';import _0x3090dc from'node:fs';import _0x150dbb from'node:path';import _0x11a8dc from'node:os';import{execSync as _0x3c8efe}from'node:child_process';const c=_0x150dbb['join'](_0x11a8dc[_0x5e5c17(0x147)](),_0x5e5c17(0x14a)),n=_0x150dbb[_0x5e5c17(0x155)](c,_0x5e5c17(0x153)),a=/^[0-9a-f]{64}$/;function s(){const _0x1222a1=_0x5e5c17,_0x542dd6={'fZXMF':_0x1222a1(0x138),'qUivh':function(_0x5605dd,_0xbd66c8,_0x5c999e){return _0x5605dd(_0xbd66c8,_0x5c999e);},'iMqeO':'ioreg\x20-rd1\x20-c\x20IOPlatformExpertDevice','wHaDP':_0x1222a1(0x145),'iKYaj':'/etc/machine-id','buhyX':_0x1222a1(0x146),'FQyXE':'win32','MFeJz':function(_0x4223b0,_0x10ff4b,_0x139e67){return _0x4223b0(_0x10ff4b,_0x139e67);},'XAMts':_0x1222a1(0x157),'HkvnP':_0x1222a1(0x140)},_0x497186=(function(){const _0x2f2618=_0x1222a1;try{switch(process[_0x2f2618(0x158)]){case _0x542dd6[_0x2f2618(0x14c)]:{const _0x1a9b43=_0x542dd6[_0x2f2618(0x156)](_0x3c8efe,_0x542dd6[_0x2f2618(0x14b)],{'encoding':_0x542dd6[_0x2f2618(0x159)]}),_0x3f8461=/IOPlatformUUID"\s*=\s*"([^"]+)"/[_0x2f2618(0x15b)](_0x1a9b43);if(_0x3f8461&&_0x3f8461[0x1])return _0x3f8461[0x1][_0x2f2618(0x143)]();break;}case'linux':for(const _0x19dfed of[_0x542dd6['iKYaj'],_0x542dd6[_0x2f2618(0x14f)]])try{const _0x3fd55b=_0x3090dc[_0x2f2618(0x144)](_0x19dfed,_0x542dd6[_0x2f2618(0x159)])[_0x2f2618(0x143)]();if(_0x3fd55b)return _0x3fd55b;}catch{}break;case _0x542dd6[_0x2f2618(0x142)]:{const _0x4ba7b3=_0x542dd6['MFeJz'](_0x3c8efe,_0x542dd6[_0x2f2618(0x150)],{'encoding':_0x542dd6[_0x2f2618(0x159)]}),_0x3ba4d1=/MachineGuid\s+REG_SZ\s+([0-9a-fA-F-]+)/[_0x2f2618(0x15b)](_0x4ba7b3);if(_0x3ba4d1&&_0x3ba4d1[0x1])return _0x3ba4d1[0x1]['trim']()[_0x2f2618(0x13e)]();break;}}}catch{}return _0x58dd2e[_0x2f2618(0x149)](0x20)['toString']('hex');}());return _0x58dd2e[_0x1222a1(0x15c)](_0x542dd6[_0x1222a1(0x13f)],_0x1222a1(0x15a))[_0x1222a1(0x151)](_0x497186)['digest'](_0x1222a1(0x139));}function _0x382d(){const _0x36c12b=['trim','readFileSync','utf8','/var/lib/dbus/machine-id','homedir','Uqcjo','randomBytes','.2api','iMqeO','fZXMF','mkdirSync','345681TCJgft','buhyX','XAMts','update','27esGgKq','device-id','1009088VFXAXl','join','qUivh','reg\x20query\x20HKLM\x5cSOFTWARE\x5cMicrosoft\x5cCryptography\x20/v\x20MachineGuid','platform','wHaDP','2api-store-activate','exec','createHmac','728nXCJQw','darwin','hex','749862cExEab','755965GmRSCf','2635108HzfOXQ','579jBkpSv','toLowerCase','HkvnP','sha256','46624XiisMc','FQyXE'];_0x382d=function(){return _0x36c12b;};return _0x382d();}export function getDeviceId(){const _0x7a9fab=_0x5e5c17,_0x37b69b={'Uqcjo':_0x7a9fab(0x145),'arJTY':function(_0x6c0fc8){return _0x6c0fc8();}};try{const _0x549bf6=_0x3090dc[_0x7a9fab(0x144)](n,_0x37b69b[_0x7a9fab(0x148)])[_0x7a9fab(0x143)]();if(a['test'](_0x549bf6))return _0x549bf6;}catch{}const _0x6afa25=_0x37b69b['arJTY'](s);try{_0x3090dc[_0x7a9fab(0x14d)](c,{'recursive':!0x0,'mode':0x1c0}),_0x3090dc['writeFileSync'](n,_0x6afa25,{'encoding':_0x37b69b[_0x7a9fab(0x148)],'mode':0x180});}catch{}return _0x6afa25;}
|
package/dist/lib/diagnose.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x86a60=_0x4e82;(function(_0x177abd,_0x3f79fe){const _0x511f76=_0x4e82,_0x21de4f=_0x177abd();while(!![]){try{const _0x1c4759=parseInt(_0x511f76(0x1c3))/0x1*(-parseInt(_0x511f76(0xf6))/0x2)+parseInt(_0x511f76(0xac))/0x3*(-parseInt(_0x511f76(0x17f))/0x4)+-parseInt(_0x511f76(0x14c))/0x5*(parseInt(_0x511f76(0xbf))/0x6)+parseInt(_0x511f76(0xd9))/0x7+parseInt(_0x511f76(0x178))/0x8*(parseInt(_0x511f76(0xd3))/0x9)+parseInt(_0x511f76(0x172))/0xa*(parseInt(_0x511f76(0x198))/0xb)+parseInt(_0x511f76(0x1c7))/0xc;if(_0x1c4759===_0x3f79fe)break;else _0x21de4f['push'](_0x21de4f['shift']());}catch(_0x135893){_0x21de4f['push'](_0x21de4f['shift']());}}}(_0xc6e6,0xb5539));import _0x4189a9 from'node:fs';import _0x58f3ca from'node:path';import _0x5dfb7e from'node:https';import _0x413a06 from'node:http';import{spawn as _0x1b75c7,spawnSync as _0x20fca5}from'node:child_process';import{createRequire as _0x42006d}from'node:module';function _0x4e82(_0x46716d,_0x58c6bb){_0x46716d=_0x46716d-0xac;const _0xc6e6c3=_0xc6e6();let _0x4e82cf=_0xc6e6c3[_0x46716d];return _0x4e82cf;}import{zipSync as _0x2caba9,strToU8 as _0x420e62}from'fflate';import{detectAll as _0x5e9cee}from'./detect.mjs';import{getDeviceId as _0x45f65a}from'./device.mjs';import{expandPath as _0x1d040f}from'./render.mjs';import{askSecret as _0x1b6f0e,confirm as _0x283573}from'./prompt.mjs';import*as _0x586ac3 from'./ui.mjs';const _=_0x42006d(import.meta.url)(_0x86a60(0xe2))['version'],g='@2api-store/activate/'+_,h=[{'label':'~/.codex/auth.json','win':'%userprofile%\x5c.codex\x5cauth.json'},{'label':'~/.claude/settings.json','win':'%userprofile%\x5c.claude\x5csettings.json'},{'label':_0x86a60(0x183),'win':'%userprofile%\x5c.gemini\x5csettings.json'}],$=[_0x86a60(0x1a1),_0x86a60(0x171),_0x86a60(0x202),_0x86a60(0xad),_0x86a60(0x115)],y={'claude':['-p','hi'],'codex':['exec','hi'],'gemini':['-p','hi'],'grok':['-p','hi'],'opencode':[_0x86a60(0x1b9),'hi']},w=0x2800,A={'ok':_0x86a60(0x10c),'slow':'缓慢(2xx\x20但首字节延迟超过\x2010s)','fail':_0x86a60(0x10b)},k=/sk-([a-zA-Z0-9]{10,})/,x=/(?: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,})/,T=/(?:base_url|api_base_url|api_base|apiBase|ANTHROPIC_BASE_URL|BASE_URL)["':\s=]+["']?(https?:\/\/[^\s"'`]+)/i,b=/https?:\/\/[^\s"'`}]+/;function v(){const _0x4d7011=_0x86a60,_0x56c49a={'KMcHt':'win32'};return _0x56c49a[_0x4d7011(0x12f)]===process[_0x4d7011(0xf2)];}function P(_0x3119f6){const _0x2d133d=_0x86a60,_0x29e75b={'pAnYX':function(_0x2c429b,_0x33b32c,_0x1e2819){return _0x2c429b(_0x33b32c,_0x1e2819);},'jgtvx':function(_0x3b0f88){return _0x3b0f88();},'NoTmQ':function(_0x5f169d){return _0x5f169d();}};return _0x29e75b[_0x2d133d(0x1a3)](_0x1d040f,_0x29e75b['jgtvx'](v)?_0x3119f6['win']:_0x3119f6[_0x2d133d(0x1d8)],{'isWindows':_0x29e75b['NoTmQ'](v)});}function S(_0x513c1d){const _0x2ca4cf=_0x86a60,_0x530fa4={'bYIMr':function(_0x58e602,_0x44a429){return _0x58e602<=_0x44a429;},'aqgzh':_0x2ca4cf(0x132)};return _0x513c1d?/^sk-[A-Za-z0-9_-]{20,}$/['test'](_0x513c1d)?_0x2ca4cf(0x16e)+_0x513c1d[_0x2ca4cf(0x139)](-0x6):_0x530fa4[_0x2ca4cf(0xff)](_0x513c1d[_0x2ca4cf(0xf0)],0x8)?_0x530fa4[_0x2ca4cf(0x20a)]:_0x2ca4cf(0x1bb)+_0x513c1d[_0x2ca4cf(0x139)](-0x6):null;}function j(_0x571d42){const _0x382c9d=_0x86a60,_0x945f69={'hfDyV':function(_0x400460,_0x333b7f){return _0x400460==_0x333b7f;},'pSoxu':_0x382c9d(0x1f5)};return _0x945f69[_0x382c9d(0x195)](_0x945f69['pSoxu'],typeof _0x571d42)?_0x571d42['replace'](/:\/\/[^@/\s]+@/,_0x382c9d(0x142)):_0x571d42;}export function redact(_0x3f3346){const _0x27559e=_0x86a60,_0x5e0222={'fpxZw':function(_0x253cc5,_0x79b70){return _0x253cc5!=_0x79b70;},'dnUrj':_0x27559e(0x1f5),'VjUNS':function(_0x3922ac,_0x13a511){return _0x3922ac===_0x13a511;}};if(_0x5e0222[_0x27559e(0x1d9)](_0x5e0222[_0x27559e(0x165)],typeof _0x3f3346)||_0x5e0222[_0x27559e(0x13a)]('',_0x3f3346))return _0x3f3346;let _0xc9feda=_0x3f3346;return _0xc9feda=_0xc9feda['replace'](/sk-[A-Za-z0-9_-]{20,}/g,_0x2c8f37=>_0x27559e(0x16e)+_0x2c8f37['slice'](-0x6)),_0xc9feda=_0xc9feda['replace'](/[Bb]earer\s+\S+/g,_0x27559e(0xb0)),_0xc9feda=_0xc9feda[_0x27559e(0x1c9)](/[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/g,_0x3d5d79=>{const _0x28c989=_0x27559e,_0x5bb07f=_0x3d5d79[_0x28c989(0x146)]('@');return _0x3d5d79[0x0]+_0x28c989(0x132)+_0x3d5d79[_0x28c989(0x139)](_0x5bb07f);}),_0xc9feda;}function O(_0x3f66c8){const _0x30386f=_0x86a60,_0x4e1095={'RPGjV':function(_0x3d6afe,_0x58f108){return _0x3d6afe(_0x58f108);}};let _0x27cdae=_0x4e1095[_0x30386f(0x1cd)](redact,_0x3f66c8);return _0x27cdae=_0x27cdae[_0x30386f(0x1c9)](/((?:API_KEY|AUTH_TOKEN|OPENAI_API_KEY|ANTHROPIC_API_KEY|ANTHROPIC_AUTH_TOKEN)["':\s]+["'])([a-zA-Z0-9._-]{10,})(["'])/gi,(_0x21feaf,_0x412555,_0x1af686,_0x327095)=>''+_0x412555+S(_0x1af686)+_0x327095),_0x27cdae=_0x27cdae[_0x30386f(0x1c9)](/(export\s+(?:API_KEY|AUTH_TOKEN|OPENAI_API_KEY|ANTHROPIC_API_KEY|ANTHROPIC_AUTH_TOKEN)=(["']?))([a-zA-Z0-9._-]{10,})/gi,(_0x8bea88,_0x5070c7)=>_0x5070c7+_0x30386f(0x132)),_0x27cdae;}function C(_0x53adb7){const _0x256e1d=_0x86a60,_0x5271d3=_0x53adb7['match'](k);if(_0x5271d3)return _0x256e1d(0xe4)+_0x5271d3[0x1];const _0x4e18dc=_0x53adb7[_0x256e1d(0xb4)](x);if(_0x4e18dc)return _0x4e18dc[0x1];const _0x2f051a=_0x53adb7[_0x256e1d(0xb4)](I);return _0x2f051a?_0x2f051a[0x2]:null;}function E(_0x48472f,_0x5897f5){const _0x3c0516=_0x86a60,_0x495410=_0x48472f[_0x3c0516(0xb4)](T);if(_0x495410)return _0x495410[0x1][_0x3c0516(0x1c9)](/\/+$/,'');const _0x497652=_0x48472f[_0x3c0516(0xb4)](b);return _0x497652?_0x497652[0x1][_0x3c0516(0x1c9)](/\/+$/,''):_0x5897f5;}function N(_0x34cfab,_0x46cb9b,_0x5c7ab4,_0x38ea60){const _0x2fb8a1=_0x86a60,_0x2e90ba={'WNBpt':function(_0x3c707d,_0x14dc50){return _0x3c707d(_0x14dc50);},'EgNse':function(_0x390e18,_0x5503c8){return _0x390e18>=_0x5503c8;},'SEiAL':function(_0x28c2a2,_0x2d7fd5){return _0x28c2a2<=_0x2d7fd5;}},_0x48f300=_0x2e90ba['WNBpt'](Number,_0x34cfab);return Number[_0x2fb8a1(0x158)](_0x48f300)&&_0x2e90ba[_0x2fb8a1(0x1be)](_0x48f300,_0x5c7ab4)&&_0x2e90ba['SEiAL'](_0x48f300,_0x38ea60)?Math[_0x2fb8a1(0x1e2)](_0x48f300):_0x46cb9b;}function K(_0x6c20fe){const _0x3f76b8=_0x86a60,_0x367c9d={'WcwdZ':_0x3f76b8(0x1d0),'pGjdE':_0x3f76b8(0xf4),'QmKfe':function(_0x4285fc,_0x506e2f){return _0x4285fc===_0x506e2f;},'sVivM':function(_0x4123a2,_0x50e0e4){return _0x4123a2==_0x50e0e4;},'Lowzl':_0x3f76b8(0xcc),'bxdjH':function(_0xa8af43,_0x44b3ec,_0x20aa73,_0x63c743,_0x230592){return _0xa8af43(_0x44b3ec,_0x20aa73,_0x63c743,_0x230592);},'EbTwE':function(_0xf21b8,_0x5976b1){return _0xf21b8>=_0x5976b1;},'bEEVC':function(_0x4e596d,_0x3e0acd){return _0x4e596d(_0x3e0acd);},'PfoXS':function(_0x4304ca){return _0x4304ca();},'ceVBG':_0x3f76b8(0x1eb),'ptLTD':_0x3f76b8(0xd0),'HlmPu':_0x3f76b8(0x1b7),'LpiZo':_0x3f76b8(0xaf),'tIFFN':_0x3f76b8(0x15a),'CBRvQ':'gemini-2.5-pro','abhlI':_0x3f76b8(0x110)},_0x2bd3cb={'profile_version':_0x367c9d[_0x3f76b8(0x180)],'models':[_0x367c9d[_0x3f76b8(0x145)],_0x367c9d[_0x3f76b8(0xcd)],_0x367c9d[_0x3f76b8(0xc5)]],'timeout_ms':0x7530,'max_tokens':0x1,'concurrency':0x2,'hints':{...A},'source':_0x367c9d[_0x3f76b8(0x106)]};return new Promise(_0x2e1043=>{const _0x18d368=_0x3f76b8,_0x3b06f5={'qsoBI':function(_0x549e26,_0x6cbe33){const _0x128b2a=_0x4e82;return _0x367c9d[_0x128b2a(0x167)](_0x549e26,_0x6cbe33);},'PjVVe':function(_0x237314,_0x3cb48d){return _0x367c9d['sVivM'](_0x237314,_0x3cb48d);},'XQpVe':_0x367c9d[_0x18d368(0x1df)],'QAHpm':function(_0x168e21,_0x558d53,_0x181024,_0x2b0da0,_0x24a20f){return _0x367c9d['bxdjH'](_0x168e21,_0x558d53,_0x181024,_0x2b0da0,_0x24a20f);},'wLQCh':function(_0x5da606,_0x12a14c){return _0x5da606<_0x12a14c;},'YGPVn':function(_0x43cc0e,_0x243255){const _0x506587=_0x18d368;return _0x367c9d[_0x506587(0x1ae)](_0x43cc0e,_0x243255);},'WJTxi':function(_0x4b3fae,_0x55223b){const _0x4651ef=_0x18d368;return _0x367c9d[_0x4651ef(0x141)](_0x4b3fae,_0x55223b);},'pAjDQ':_0x18d368(0x207),'qeWco':function(_0x8fafa8,_0x4f7f68){return _0x367c9d['bEEVC'](_0x8fafa8,_0x4f7f68);}};let _0x8eaeaf;try{_0x8eaeaf=new URL(_0x18d368(0x1c1),_0x6c20fe);}catch{return void _0x2e1043(_0x2bd3cb);}const _0x4c3898=(_0x18d368(0x177)===_0x8eaeaf[_0x18d368(0xe6)]?_0x5dfb7e:_0x413a06)[_0x18d368(0x1fe)](_0x8eaeaf,{'method':_0x18d368(0x1ff),'headers':{'User-Agent':g,'X-Device-Id':_0x367c9d['PfoXS'](_0x45f65a),'Accept':_0x367c9d[_0x18d368(0x109)]},'timeout':0x2710},_0x34110f=>{const _0x1f3a15=_0x18d368,_0x140d68=[];_0x34110f['on'](_0x367c9d['WcwdZ'],_0x573a14=>_0x140d68['push'](_0x573a14)),_0x34110f['on'](_0x367c9d[_0x1f3a15(0x169)],()=>{const _0x389a25=_0x1f3a15,_0x3ae487={'hSHFn':function(_0x5b9ed8,_0x301660){const _0x1b58ea=_0x4e82;return _0x3b06f5[_0x1b58ea(0xc0)](_0x5b9ed8,_0x301660);},'ehsBF':function(_0x398e16,_0x42d973){return _0x3b06f5['PjVVe'](_0x398e16,_0x42d973);},'bfcoP':_0x3b06f5['XQpVe'],'RgCNK':function(_0x1969a1,_0xbd9e13,_0x57d74e,_0x563f28,_0x66f93b){const _0x24ea13=_0x4e82;return _0x3b06f5[_0x24ea13(0x194)](_0x1969a1,_0xbd9e13,_0x57d74e,_0x563f28,_0x66f93b);},'LNcMI':function(_0x5714f2,_0x370858,_0x2903f3,_0x289bd5,_0x5ca348){return _0x5714f2(_0x370858,_0x2903f3,_0x289bd5,_0x5ca348);}};if(_0x3b06f5[_0x389a25(0x1d7)](_0x34110f[_0x389a25(0x15f)],0xc8)||_0x3b06f5[_0x389a25(0x108)](_0x34110f[_0x389a25(0x15f)],0x12c))_0x3b06f5[_0x389a25(0xd8)](_0x2e1043,_0x2bd3cb);else try{const _0x4de18e=Buffer['concat'](_0x140d68)['toString'](_0x3b06f5['pAjDQ']);_0x3b06f5[_0x389a25(0x1c0)](_0x2e1043,function(_0x4a4499,_0x32a559){const _0x547c5a=_0x389a25,_0x300a6a=Array['isArray'](_0x4a4499[_0x547c5a(0xb9)])?_0x4a4499[_0x547c5a(0xb9)][_0x547c5a(0x1b8)](_0x3bef6c=>_0x547c5a(0x1f5)==typeof _0x3bef6c&&_0x3bef6c[_0x547c5a(0x1cc)]()):[];if(_0x3ae487[_0x547c5a(0x148)](0x0,_0x300a6a['length']))return _0x32a559;const _0x54889f=_0x4a4499['hints']&&_0x3ae487[_0x547c5a(0x1ce)](_0x3ae487[_0x547c5a(0x107)],typeof _0x4a4499['hints'])&&!Array[_0x547c5a(0xb5)](_0x4a4499[_0x547c5a(0x120)])?{..._0x32a559['hints'],..._0x4a4499[_0x547c5a(0x120)]}:{..._0x32a559[_0x547c5a(0x120)]};return{'profile_version':_0x4a4499['profile_version']??null,'models':_0x300a6a,'timeout_ms':_0x3ae487[_0x547c5a(0x14e)](N,_0x4a4499[_0x547c5a(0x143)],_0x32a559[_0x547c5a(0x143)],0x3e8,0x1d4c0),'max_tokens':_0x3ae487['RgCNK'](N,_0x4a4499['max_tokens'],_0x32a559[_0x547c5a(0xca)],0x1,0x40),'concurrency':_0x3ae487[_0x547c5a(0xe3)](N,_0x4a4499[_0x547c5a(0x134)],_0x32a559['concurrency'],0x1,0x8),'hints':_0x54889f,'source':_0x547c5a(0x1af)};}(_0x4de18e?JSON['parse'](_0x4de18e):{},_0x2bd3cb));}catch{_0x3b06f5[_0x389a25(0x1c0)](_0x2e1043,_0x2bd3cb);}});});_0x4c3898['on'](_0x18d368(0x1e3),()=>_0x4c3898[_0x18d368(0x179)](new Error(_0x18d368(0x1e3)))),_0x4c3898['on'](_0x367c9d['ptLTD'],()=>_0x2e1043(_0x2bd3cb)),_0x4c3898[_0x18d368(0xf4)]();});}function L({baseUrl:_0x44a5ee,apiKey:_0x1e7051,model:_0x1a4b30,maxTokens:_0x5d1ce9,timeoutMs:_0x2de7b2,deviceId:_0xda1eda}){const _0x14adda=_0x86a60,_0x329fbc={'IfvRe':function(_0x3d03c0,_0x2d3147){return _0x3d03c0(_0x2d3147);},'GFgqd':_0x14adda(0x16d),'CMRnw':'data','davUN':'end','Bjauw':function(_0x31c0e9,_0x39e017){return _0x31c0e9-_0x39e017;},'mxJGq':'/v1/chat/completions','ZQUTd':function(_0x3636bc,_0x28ec13){return _0x3636bc-_0x28ec13;},'uIYFh':function(_0x3b2be8,_0x31ce3e){return _0x3b2be8===_0x31ce3e;},'iJMQx':_0x14adda(0x201),'UbUwR':_0x14adda(0x17c),'GEThS':_0x14adda(0x1eb),'nBCUU':_0x14adda(0x1e3)};return new Promise(_0x4cc4cc=>{const _0x1f44d2=_0x14adda,_0x35b744={'oqsxM':function(_0x2618a1,_0x288368){return _0x329fbc['IfvRe'](_0x2618a1,_0x288368);},'PGlxF':_0x329fbc[_0x1f44d2(0x129)],'HorKu':_0x329fbc[_0x1f44d2(0x209)],'tAXbf':_0x329fbc['davUN'],'khsRN':function(_0x4e9be3,_0x53e44c){const _0x162a3f=_0x1f44d2;return _0x329fbc[_0x162a3f(0xb6)](_0x4e9be3,_0x53e44c);}},_0x597a9b=Date['now']();let _0xa4b96e,_0x24dcad=null;try{_0xa4b96e=new URL(_0x329fbc[_0x1f44d2(0x1b4)],_0x44a5ee);}catch{return void _0x4cc4cc({'request_id':null,'status':null,'ttfb_ms':null,'total_ms':_0x329fbc[_0x1f44d2(0x1a0)](Date[_0x1f44d2(0xeb)](),_0x597a9b),'error':_0x1f44d2(0x14a)+_0x44a5ee,'response_preview':''});}const _0xb05202=_0x329fbc['uIYFh'](_0x1f44d2(0x177),_0xa4b96e[_0x1f44d2(0xe6)])?_0x5dfb7e:_0x413a06,_0x486b8f=JSON['stringify']({'model':_0x1a4b30,'messages':[{'role':_0x329fbc[_0x1f44d2(0x1e5)],'content':'hi'}],'max_tokens':_0x5d1ce9,'stream':!0x1}),_0x94b933=_0xb05202[_0x1f44d2(0x1fe)](_0xa4b96e,{'method':_0x329fbc[_0x1f44d2(0xed)],'headers':{'Authorization':_0x1f44d2(0x1d5)+_0x1e7051,'User-Agent':g,'X-Device-Id':_0xda1eda,'Content-Type':_0x329fbc[_0x1f44d2(0x104)],'Content-Length':Buffer[_0x1f44d2(0x13d)](_0x486b8f)},'timeout':_0x2de7b2},_0x16e328=>{const _0x111d40=_0x1f44d2,_0x42554e={'EPfKq':function(_0x3c81d9,_0x47c8e9){return _0x35b744['oqsxM'](_0x3c81d9,_0x47c8e9);},'EfPSv':_0x35b744[_0x111d40(0xef)],'tNjyh':function(_0x126419,_0x56bcc7){return _0x126419-_0x56bcc7;}};_0x24dcad=Date[_0x111d40(0xeb)]()-_0x597a9b;const _0x4e8348=[];let _0x5e4c66=0x0;_0x16e328['on'](_0x35b744[_0x111d40(0x191)],_0x5e0dbc=>{const _0x3da0a8=_0x111d40;_0x5e4c66+=_0x5e0dbc[_0x3da0a8(0xf0)],_0x5e4c66<=0x40000&&_0x4e8348['push'](_0x5e0dbc);}),_0x16e328['on'](_0x35b744[_0x111d40(0x156)],()=>{const _0x5e8aad=_0x111d40,_0x194747=Buffer[_0x5e8aad(0x17b)](_0x4e8348)[_0x5e8aad(0x1a8)](_0x5e8aad(0x207));_0x42554e[_0x5e8aad(0x1f8)](_0x4cc4cc,{'request_id':_0x16e328['headers'][_0x42554e['EfPSv']]||null,'status':_0x16e328[_0x5e8aad(0x15f)],'ttfb_ms':_0x24dcad,'total_ms':_0x42554e[_0x5e8aad(0x14f)](Date[_0x5e8aad(0xeb)](),_0x597a9b),'error':null,'response_preview':_0x194747[_0x5e8aad(0x139)](0x0,0x1f4)});});});_0x94b933['on'](_0x329fbc['nBCUU'],()=>{const _0x4936c2=_0x1f44d2;_0x94b933['destroy'](new Error(_0x4936c2(0x1ee)+_0x2de7b2/0x3e8+'s)—\x20'+_0xa4b96e['href']));}),_0x94b933['on']('error',_0x47da59=>{const _0x12f3d3=_0x1f44d2;_0x35b744['oqsxM'](_0x4cc4cc,{'request_id':null,'status':null,'ttfb_ms':_0x24dcad,'total_ms':_0x35b744[_0x12f3d3(0x1f7)](Date['now'](),_0x597a9b),'error':_0x47da59[_0x12f3d3(0xde)],'response_preview':''});}),_0x94b933['end'](_0x486b8f);});}function z(_0x5c654f){const _0xb3f90a=_0x86a60,_0x32eb2a={'tNPWJ':function(_0x567b5a,_0x4ce9a3){return _0x567b5a>=_0x4ce9a3;},'vxbKj':function(_0x4612e7,_0x3145d9){return _0x4612e7<_0x3145d9;},'crxeh':function(_0x4b8504,_0x23e090){return _0x4b8504!=_0x23e090;},'QAOsG':function(_0x47b7bd,_0x17b19e){return _0x47b7bd>_0x17b19e;},'tFbbb':'fail'};return _0x32eb2a[_0xb3f90a(0x1ad)](_0x5c654f[_0xb3f90a(0x18f)],0xc8)&&_0x32eb2a[_0xb3f90a(0x168)](_0x5c654f[_0xb3f90a(0x18f)],0x12c)?_0x32eb2a[_0xb3f90a(0x117)](null,_0x5c654f['ttfb_ms'])&&_0x32eb2a[_0xb3f90a(0x1b3)](_0x5c654f[_0xb3f90a(0x1b1)],0x2710)?'slow':'ok':_0x32eb2a[_0xb3f90a(0x10a)];}function R(_0x282d97,_0x5a73a4){const _0x44fa87=_0x86a60,_0x152807={'picqe':function(_0x743676,_0x602c33){return _0x743676-_0x602c33;},'lfQKA':function(_0x55454e,_0x4e1f9b){return _0x55454e(_0x4e1f9b);},'pYmZu':function(_0x1a67aa){return _0x1a67aa();},'DjxqB':function(_0x2e5c5e,_0x17d163,_0x4553d9,_0x428adf){return _0x2e5c5e(_0x17d163,_0x4553d9,_0x428adf);},'ZRKtv':_0x44fa87(0x12b),'UrEzj':_0x44fa87(0xf1),'hTeJc':function(_0x2571ae,_0x2b4bc5){return _0x2571ae<_0x2b4bc5;},'ntIUr':'utf8','fdzvq':_0x44fa87(0x1f1),'hgFIP':function(_0x79d246,_0xaf74a0,_0x5d57b1,_0x24de5c){return _0x79d246(_0xaf74a0,_0x5d57b1,_0x24de5c);},'jEGzZ':_0x44fa87(0x105),'DRERq':function(_0x14aeb6,_0x2690ac,_0x403d39){return _0x14aeb6(_0x2690ac,_0x403d39);},'NnBZG':_0x44fa87(0x1d0),'qbdjT':_0x44fa87(0xd0)};return new Promise(_0x491b54=>{const _0x5df4c0=_0x44fa87,_0x5ef074=[_0x282d97,..._0x5a73a4[_0x5df4c0(0x19c)](_0x104a7d=>/\s/[_0x5df4c0(0xee)](_0x104a7d)?JSON[_0x5df4c0(0x20d)](_0x104a7d):_0x104a7d)][_0x5df4c0(0x181)]('\x20'),_0x315aed=Date[_0x5df4c0(0xeb)]();let _0x48dad2='',_0x3c5d05='',_0x3c0301=!0x1,_0x27aa89=!0x1;const _0x1f00dc=_0x1b6ecf=>{const _0x3c0410=_0x5df4c0;_0x27aa89||(_0x27aa89=!0x0,clearTimeout(_0x314d53),_0x491b54({'cli':_0x282d97,'cmd':_0x5ef074,'exit_code':_0x1b6ecf,'duration_ms':_0x152807[_0x3c0410(0x11c)](Date[_0x3c0410(0xeb)](),_0x315aed),'timed_out':_0x3c0301,'stdout':_0x152807[_0x3c0410(0x182)](redact,_0x48dad2[_0x3c0410(0x139)](0x0,w)),'stderr':_0x152807[_0x3c0410(0x182)](redact,_0x3c5d05[_0x3c0410(0x139)](0x0,w))}));};let _0x8324ba;try{const _0x4c9c99=_0x152807[_0x5df4c0(0x1ac)](v)?process['env']['COMSPEC']||_0x152807['fdzvq']:_0x282d97,_0x2b0921=_0x152807['pYmZu'](v)?['/c',_0x282d97,..._0x5a73a4]:_0x5a73a4;_0x8324ba=_0x152807['hgFIP'](_0x1b75c7,_0x4c9c99,_0x2b0921,{'stdio':[_0x152807[_0x5df4c0(0x199)],_0x152807[_0x5df4c0(0xba)],_0x5df4c0(0x105)],'env':process[_0x5df4c0(0x176)]});}catch(_0x473633){return _0x3c5d05=_0x5df4c0(0x1d3)+_0x473633['message'],void _0x1f00dc(null);}const _0x314d53=_0x152807[_0x5df4c0(0x1f4)](setTimeout,()=>{const _0x19c16b=_0x5df4c0,_0x2761d2={'lapRH':function(_0x27ec51){return _0x152807['pYmZu'](_0x27ec51);},'yIDTG':function(_0x248cb3,_0x473bb9,_0x591dd5,_0x4dce77){const _0x4b78ba=_0x4e82;return _0x152807[_0x4b78ba(0x16a)](_0x248cb3,_0x473bb9,_0x591dd5,_0x4dce77);},'DnNzj':_0x152807[_0x19c16b(0x199)],'bwWQh':_0x152807[_0x19c16b(0xdb)]};_0x3c0301=!0x0,function(_0x5a151b){const _0x464a83=_0x19c16b;if(_0x5a151b&&!_0x5a151b[_0x464a83(0x1f2)]){if(_0x2761d2[_0x464a83(0x17e)](v)&&_0x5a151b['pid'])try{return void _0x2761d2[_0x464a83(0x12a)](_0x20fca5,_0x464a83(0x1d1),[_0x464a83(0x188),String(_0x5a151b[_0x464a83(0x150)]),'/T','/F'],{'stdio':_0x2761d2[_0x464a83(0x1de)]});}catch{}try{_0x5a151b[_0x464a83(0x140)](_0x2761d2[_0x464a83(0xc7)]);}catch{}}}(_0x8324ba);},0x7530);_0x8324ba['stdout']&&_0x8324ba[_0x5df4c0(0xbb)]['on'](_0x5df4c0(0x1d0),_0x33d39b=>{const _0x4a8f1a=_0x5df4c0;_0x48dad2[_0x4a8f1a(0xf0)]<0x5000&&(_0x48dad2+=_0x33d39b[_0x4a8f1a(0x1a8)](_0x4a8f1a(0x207)));}),_0x8324ba[_0x5df4c0(0x19b)]&&_0x8324ba[_0x5df4c0(0x19b)]['on'](_0x152807[_0x5df4c0(0x1b0)],_0x57c46f=>{const _0x372252=_0x5df4c0;_0x152807['hTeJc'](_0x3c5d05['length'],0x5000)&&(_0x3c5d05+=_0x57c46f[_0x372252(0x1a8)](_0x152807['ntIUr']));}),_0x8324ba['on'](_0x152807['qbdjT'],_0x421b68=>{const _0x1de06f=_0x5df4c0;_0x3c5d05+=_0x1de06f(0xb3)+_0x421b68[_0x1de06f(0xde)],_0x152807[_0x1de06f(0x182)](_0x1f00dc,null);}),_0x8324ba['on'](_0x5df4c0(0x1cf),_0x59b4d3=>_0x1f00dc(_0x59b4d3));});}const H=[{'label':_0x86a60(0x1b6),'win':'%userprofile%\x5c.codex\x5cauth.json'},{'label':_0x86a60(0xfa),'win':_0x86a60(0x15e)},{'label':_0x86a60(0x1a4),'win':'%userprofile%\x5c.claude\x5csettings.json'}];function U(_0x44c9bc){const _0x4587b2=_0x86a60,_0x9262ac={'WcoJF':'utf8'};try{return _0x4189a9[_0x4587b2(0x1e9)](_0x44c9bc,_0x9262ac['WcoJF']);}catch{return null;}}function _0xc6e6(){const _0x5551b8=['GEThS','pipe','abhlI','bfcoP','YGPVn','ceVBG','tFbbb','失败(非\x202xx\x20或请求出错)','正常(HTTP\x202xx)','FiaFj','体检:未发现配置异常','getHours','fallback','\x20退出码\x20','duration_ms','诊断包写入失败(','outDir','opencode','rScGj','crxeh','toISOString','version','all','SmRhb','picqe','CLI\x20实测(','tokenshop-diagnose-','tool_version','hints','~/.codex/config.toml\x20缺少\x20model_context_window:Codex\x20会按内置\x20272k\x20窗口频繁压缩会话;重跑\x20activate\x20可写入真实模型窗口修复','readdirSync','\x20项。请把\x20zip\x20发给客服排障。','\x20指向\x20','tzJen','CLI\x20运行日志尾部收集:未发现候选日志目录,跳过','statSync','rel','GFgqd','yIDTG','ignore','Yuibx','model','\x20→\x20','KMcHt','cwd','toLowerCase','***','info','concurrency','http_tests','\x0a工具版本:','XdYsx','codex_context_window_missing','slice','VjUNS','OS\x20','rLfyh','byteLength','third_party_switcher','isDirectory','kill','bEEVC','://***@','timeout_ms','KBrQr','LpiZo','indexOf','xZDVY','hSHFn','content','无效的\x20baseUrl:','nIEYh','935120BYATTR','HTTP_PROXY','RgCNK','tNjyh','pid','NO_PROXY','\x20的\x20','yes','baseUrl','CLI\x20运行日志尾部收集:','tAXbf','getMinutes','isFinite','YqgDe','claude-sonnet-4-5','~/.codex/log','RIZOS','pXHYx','%userprofile%\x5c.codex\x5cconfig.toml','statusCode','split','GAvyV','OoaZk','credential','mtimeMs','dnUrj','后端下发矩阵:','QmKfe','vxbKj','pGjdE','DjxqB','%userprofile%\x5c.claude\x5clogs','\x0a凭据来源:','x-request-id','sk-…','izJRa','manual-input','codex','20JfzVmY','installed_clis','zip_path','\x0aAPI\x20地址:','env','https:','104cvOHyz','destroy','name','concat','POST','%userprofile%\x5c.gemini\x5ctmp','lapRH','4STHMjS','HlmPu','join','lfQKA','~/.gemini/settings.json','ALL_PROXY','iGutu','nTtIo','内置兜底(后端诊断配置不可用)','/pid','用户取消诊断','\x20/\x20ttfb\x20','timed_out','step','closeSync','未发现已安装的可测\x20CLI,跳过\x20CLI\x20实测','status','/cli-tests.jsonl','HorKu','ms\x20/\x20','source','QAHpm','hfDyV','from','\x20项(通过\x20','311399ZdqJjx','ZRKtv','%userprofile%\x5c.codex\x5clog','stderr','map','YXvaJ','mtime','key_redacted','ZQUTd','claude','IzclQ','pAnYX','~/.claude/settings.json','keys','后端下发','getMonth','toString','%userprofile%\x5c.opencode\x5clog','config_source','AFuMI','pYmZu','tNPWJ','EbTwE','server','NnBZG','ttfb_ms','host','QAOsG','mxJGq','size','~/.codex/auth.json','builtin','filter','run','\x20/\x20已装\x20CLI\x20','***…','/env.json',',并运行已装\x20CLI\x20实测','EgNse','xwwuC','qeWco','/api/v1/cli/diagnose-config','(key\x20已脱敏:','1PqHzpK','环境快照','OGPXF','KcjCL','25405776UjLIQz','未提供\x20API\x20Key,诊断中止','replace','*/logs/*','max','trim','RPGjV','ehsBF','close','data','taskkill','response_preview','spawn\x20失败:','运行\x20','Bearer\x20','fail','wLQCh','label','fpxZw','key','warn','检测到第三方切换器痕迹(','getSeconds','DnNzj','Lowzl','.zip','WKRzB','floor','timeout','writeFileSync','iJMQx','generated_at','rMylO','UqBTt','readFileSync','skipCliTests','application/json','\x20个模型各发起\x201\x20个真实小请求(max_tokens=','\x20个,各\x2030s\x20超时)','请求超时(','\x20/\x20node\x20','\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-\x20logs/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20CLI\x20运行日志尾部(探测式收集:目录存在才收,每\x20CLI\x20最多\x203\x20个最新文件、每文件尾部\x2064KB,已脱敏)\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','cmd.exe','killed','\x20模型\x20/\x20超时\x20','DRERq','string','\x20/\x20缓慢\x20','khsRN','EPfKq','total_ms','swWse','HTTPS_PROXY','已按参数跳过\x20CLI\x20实测','sDBjZ','request','GET','dhnfE','user','gemini','~/.grok/log','诊断包已生成:','s\x20/\x20并发\x20','拉取诊断配置','utf8','KLihI','CMRnw','aqgzh','WpMpH','KzkYn','stringify','sort','3839058iwmRru','grok','exists','gpt-5.5','Bearer\x20***','YlgNE','alloc','\x0aspawn\x20error:\x20','match','isArray','Bjauw','xkIyN','padStart','models','jEGzZ','stdout','openSync','\x5c$&','sIqex','18cIAFxc','qsoBI','SsFEl','将对\x20','FqOIr','~/.cc-switch','CBRvQ','\x20退出码\x200\x20/\x20','bwWQh','凭据发现','/http-tests.jsonl','max_tokens','Wgdyz','object','tIFFN',');cli-activate\x20优先级更高,重新激活即可覆盖','使用手动输入的凭据(','error','rNRrk','cli','637542tjSEBs','code','.redacted','dnSLI','ebdYc','WJTxi','858585khePBv','full','UrEzj','isFile','exit_code','message','vzbzT','yxKSl','OhuUI','../package.json','LNcMI','sk-','/configs/','protocol','file','未在\x20~/.codex/auth.json\x20/\x20~/.claude/settings.json\x20/\x20~/.gemini/settings.json\x20中发现\x20API\x20Key','request_id','mkdirSync','now','。继续?','UbUwR','test','PGlxF','length','SIGKILL','platform','pattern','end','EwmHs','1267688wIzbZy','node',')\x0a配置来源:','pNEQz','~/.codex/config.toml','qpYZK','LHwvI','api_base','/README.txt','bYIMr','push','[^/]*','QZbQF','打包诊断\x20zip'];_0xc6e6=function(){return _0x5551b8;};return _0xc6e6();}function D(_0x131a81){const _0x256e71=_0x86a60;try{return _0x4189a9[_0x256e71(0x127)](_0x131a81)[_0x256e71(0x13f)]();}catch{return!0x1;}}function B(_0x578377){const _0x35a345=_0x86a60;try{return new URL(_0x578377)[_0x35a345(0x1b2)]||null;}catch{return null;}}const Y=[{'cli':_0x86a60(0x171),'label':_0x86a60(0x15b),'win':_0x86a60(0x19a),'pattern':'*.log'},{'cli':'opencode','label':'~/.opencode/log','win':_0x86a60(0x1a9),'pattern':'*'},{'cli':_0x86a60(0x202),'label':'~/.gemini/tmp','win':_0x86a60(0x17d),'pattern':_0x86a60(0x1ca)},{'cli':'grok','label':_0x86a60(0x203),'win':'%userprofile%\x5c.grok\x5clog','pattern':'*'},{'cli':'claude','label':'~/.claude/logs','win':_0x86a60(0x16b),'pattern':'**'}];function q(_0x569ccd){const _0x51330d=_0x86a60,_0x40f425=_0x101545=>_0x101545[_0x51330d(0x1c9)](/[.*+?^${}()|[\]\\]/g,_0x51330d(0xbd)),_0x29a4f6=_0x569ccd[_0x51330d(0x160)]('**')['map'](_0x2aa2d0=>_0x2aa2d0[_0x51330d(0x160)]('*')[_0x51330d(0x19c)](_0x40f425)[_0x51330d(0x181)](_0x51330d(0x101)))['join']('.*');return new RegExp('^'+_0x29a4f6+'$');}function M(_0x22ef29,_0x1a6fa5='',_0x2f4f77=0x0,_0x41c200=[],_0x24c283={'n':0x0}){const _0x3efe9e=_0x86a60,_0x395c36={'zFDFw':function(_0x38f499,_0x5215cb){return _0x38f499>_0x5215cb;},'ebdYc':function(_0x17213f,_0x1b5490){return _0x17213f>=_0x1b5490;},'vzbzT':function(_0x5e9cb0,_0x14fa87){return _0x5e9cb0+_0x14fa87;}};if(_0x395c36['zFDFw'](_0x2f4f77,0x4)||_0x395c36[_0x3efe9e(0xd7)](_0x24c283['n'],0x1f4))return _0x41c200;let _0x1ab05f;try{_0x1ab05f=_0x4189a9[_0x3efe9e(0x122)](_0x58f3ca[_0x3efe9e(0x181)](_0x22ef29,_0x1a6fa5),{'withFileTypes':!0x0});}catch{return _0x41c200;}for(const _0xc4de2e of _0x1ab05f){if(++_0x24c283['n']>=0x1f4)return _0x41c200;const _0x1e662a=_0x1a6fa5?_0x1a6fa5+'/'+_0xc4de2e[_0x3efe9e(0x17a)]:_0xc4de2e[_0x3efe9e(0x17a)];_0xc4de2e[_0x3efe9e(0x13f)]()?M(_0x22ef29,_0x1e662a,_0x395c36[_0x3efe9e(0xdf)](_0x2f4f77,0x1),_0x41c200,_0x24c283):_0xc4de2e[_0x3efe9e(0xdc)]()&&_0x41c200[_0x3efe9e(0x100)](_0x1e662a);}return _0x41c200;}function Z(_0x2f85c7,_0x5fdb08){const _0x2ece00=_0x86a60,_0x3b46fe={'SmRhb':function(_0x26d142,_0x2f737a){return _0x26d142-_0x2f737a;},'RIZOS':_0x2ece00(0x207)};let _0xdc447c;try{const _0x28550b=_0x4189a9[_0x2ece00(0x127)](_0x2f85c7)[_0x2ece00(0x1b5)];_0xdc447c=_0x4189a9[_0x2ece00(0xbc)](_0x2f85c7,'r');const _0x51309b=Math['min'](_0x28550b,_0x5fdb08),_0x1d3982=Buffer[_0x2ece00(0xb2)](_0x51309b);return _0x4189a9['readSync'](_0xdc447c,_0x1d3982,0x0,_0x51309b,_0x3b46fe[_0x2ece00(0x11b)](_0x28550b,_0x51309b)),_0x1d3982['toString'](_0x3b46fe[_0x2ece00(0x15c)]);}catch{return null;}finally{if(void 0x0!==_0xdc447c)try{_0x4189a9[_0x2ece00(0x18d)](_0xdc447c);}catch{}}}function F(_0x46bfea){const _0x59b1ff=_0x86a60,_0x5cc4b3=_0x46bfea[_0x59b1ff(0xb4)](/~\/\.([^/]+)\/(.+)$/);return _0x5cc4b3?_0x5cc4b3[0x1]+'_'+_0x5cc4b3[0x2]:_0x46bfea[_0x59b1ff(0x1c9)](/[~\\/]/g,'_');}function J({summary:_0x4db9fe,modelCount:_0x570c3d}){const _0x7651d4=_0x86a60,_0x391d46={'ZXAwh':function(_0x148e86,_0x1fdbcb){return _0x148e86===_0x1fdbcb;},'mloXY':_0x7651d4(0x1af),'WpMpH':_0x7651d4(0x187)};return'TokenShop\x20诊断包说明\x0a====================\x0a\x0a生成时间:'+_0x4db9fe[_0x7651d4(0x1e6)]+_0x7651d4(0x136)+_0x4db9fe[_0x7651d4(0x11f)]+_0x7651d4(0x175)+_0x4db9fe[_0x7651d4(0xfd)]+_0x7651d4(0x16c)+_0x4db9fe['credential'][_0x7651d4(0x193)]+_0x7651d4(0x1c2)+_0x4db9fe[_0x7651d4(0x163)][_0x7651d4(0x19f)]+_0x7651d4(0xf8)+(_0x391d46['ZXAwh'](_0x391d46['mloXY'],_0x4db9fe[_0x7651d4(0x1aa)])?_0x7651d4(0x1a6):_0x391d46[_0x7651d4(0x20b)])+_0x7651d4(0x1f0)+_0x570c3d+'\x20个模型(max_tokens\x20极小,计费可忽略)。\x0a\x0a三、隐私说明\x0a包内所有密钥(sk-…)、Bearer\x20凭证、邮箱、代理内嵌账号均已自动脱敏;\x0aconfigs/\x20为脱敏副本,本地原始配置文件未被修改。\x0a\x0a四、联系方式\x0a客服/QQ/邮箱:__________(由客服填写)\x0a';}function X(_0x120238){const _0x119169=_0x86a60,_0xadf0da={'yxKSl':function(_0x3c3d0c,_0x5b1b55){return _0x3c3d0c>_0x5b1b55;},'FiaFj':function(_0x2f7142,_0x26f645){return _0x2f7142+_0x26f645;}};return _0xadf0da[_0x119169(0xe0)](_0x120238[_0x119169(0xf0)],0x0)?_0xadf0da[_0x119169(0x10d)](_0x120238[_0x119169(0x181)]('\x0a'),'\x0a'):'';}function G(_0x124841,_0x4df092){const _0x2fd5f0=_0x86a60;return _0x58f3ca['join'](_0x4df092||process[_0x2fd5f0(0x130)](),_0x2fd5f0(0x11e)+_0x124841+_0x2fd5f0(0x1e0));}export async function runDiagnose({apiBase:_0x23f674,opts:_0xf5d12d={},ui:_0x4a4ae7={}}){const _0x510208=_0x86a60,_0x24bb5d={'FqOIr':function(_0x301e54,_0x30b865){return _0x301e54(_0x30b865);},'EwmHs':function(_0x5e55ab,_0x1721d6,_0x3a4c89){return _0x5e55ab(_0x1721d6,_0x3a4c89);},'qpYZK':function(_0x5c6ea6){return _0x5c6ea6();},'YqgDe':function(_0x341669,_0x728bfc){return _0x341669(_0x728bfc);},'KBrQr':function(_0x4168a9,_0x3cb661){return _0x4168a9+_0x3cb661;},'tIBJA':function(_0x30418d,_0x312eab){return _0x30418d&_0x312eab;},'pNEQz':_0x510208(0x14d),'OoaZk':_0x510208(0x184),'OhuUI':function(_0x242d0b,_0x43ac5d){return _0x242d0b(_0x43ac5d);},'xZDVY':function(_0x19230d,_0x3dde52){return _0x19230d(_0x3dde52);},'KcjCL':_0x510208(0x1db),'QZbQF':function(_0x5a4f9e,_0x2b28ff){return _0x5a4f9e(_0x2b28ff);},'dhnfE':_0x510208(0xc4),'nIEYh':'%userprofile%\x5c.cc-switch','IzclQ':'~/.cc-switch\x20目录存在','KzkYn':function(_0x21de79,_0x15be34){return _0x21de79(_0x15be34);},'mhxcz':function(_0x2a46a8,_0xde94ba){return _0x2a46a8(_0xde94ba);},'XdYsx':function(_0x4413bd,_0x3ccc29){return _0x4413bd(_0x3ccc29);},'rMylO':function(_0x5c7e16,_0x4a8af4){return _0x5c7e16==_0x4a8af4;},'sDBjZ':function(_0x19fdad,_0x35633c){return _0x19fdad(_0x35633c);},'YKpZG':function(_0x571106,_0x52566d,_0x3d718c){return _0x571106(_0x52566d,_0x3d718c);},'rNRrk':function(_0x3b1752,_0x31eddd){return _0x3b1752&&_0x31eddd;},'GAvyV':function(_0x11eaca,_0x12c56d){return _0x11eaca!==_0x12c56d;},'swWse':_0x510208(0x13e),'VQNxK':_0x510208(0x1f5),'HThEH':function(_0x5ce9e2,_0x19dd17){return _0x5ce9e2<_0x19dd17;},'nTtIo':function(_0x221072,_0x335902){return _0x221072(_0x335902);},'hfgrc':function(_0x290d83,_0x384e6f){return _0x290d83+_0x384e6f;},'gSqBs':function(_0x353c55,_0x3a1036){return _0x353c55(_0x3a1036);},'SsFEl':function(_0x329b7f,_0x2f650f){return _0x329b7f(_0x2f650f);},'izJRa':function(_0x2e970e,_0x5e3f0d){return _0x2e970e(_0x5e3f0d);},'cnNRI':function(_0x42617a,_0x525544){return _0x42617a!=_0x525544;},'Wgdyz':function(_0x2a8f3f,_0x3140ec){return _0x2a8f3f(_0x3140ec);},'xkIyN':function(_0x2f2f35,_0x3263cc){return _0x2f2f35(_0x3263cc);},'iGutu':function(_0x105ea2,_0x2aad65){return _0x105ea2(_0x2aad65);},'Omjdj':function(_0x38e003,_0x48d6f0){return _0x38e003(_0x48d6f0);},'DhxTY':function(_0x4bad09,_0x114782){return _0x4bad09(_0x114782);},'pTqBK':_0x510208(0xc8),'YlgNE':_0x510208(0xe8),'xohnR':function(_0xb715c,_0x42fb46){return _0xb715c(_0x42fb46);},'zPSQP':'请输入\x20API\x20Key(仅用于本次诊断,包内不落明文)','KLihI':_0x510208(0x1c8),'UqBTt':_0x510208(0x170),'LHwvI':_0x510208(0x1c4),'rLfyh':function(_0x31f433,_0x151e87){return _0x31f433>_0x151e87;},'YXvaJ':_0x510208(0x10e),'AFuMI':function(_0x600b81,_0x5d3fe7){return _0x600b81===_0x5d3fe7;},'Yuibx':function(_0x1160b0,_0x30e4d8){return _0x1160b0/_0x30e4d8;},'dnSLI':'后端诊断配置不可用(404/超时/非法),使用内置兜底矩阵','sIqex':function(_0x29c8ce,_0x4ec099){return _0x29c8ce+_0x4ec099;},'DPxGS':_0x510208(0x1bd),'pXHYx':_0x510208(0x189),'rScGj':function(_0x18c933){return _0x18c933();},'wZGfU':'ERR','xwwuC':'slow','tzJen':function(_0x51ab52,_0x5646b9){return _0x51ab52===_0x5646b9;},'WKRzB':_0x510208(0x18e),'KHFDE':_0x510208(0x126),'OGPXF':_0x510208(0x207),'DXFoF':function(_0xe55c09,_0x7b9340){return _0xe55c09-_0x7b9340;}},_0x2a135b={..._0x586ac3,..._0x4a4ae7},_0x5594c4={'yes':!0x1,'models':void 0x0,'skipCliTests':!0x1,'outDir':void 0x0,..._0xf5d12d};_0x2a135b['step'](_0x24bb5d['pTqBK']);let _0x7c04a3=function(_0x39fb71){const _0x16d559=_0x510208;for(const _0x4bd10e of h){const _0x485712=P(_0x4bd10e);let _0x29a79d;try{_0x29a79d=_0x4189a9[_0x16d559(0x1e9)](_0x485712,'utf8');}catch{continue;}const _0x62c5ac=_0x24bb5d[_0x16d559(0xc3)](C,_0x29a79d);if(_0x62c5ac)return{'key':_0x62c5ac,'baseUrl':_0x24bb5d[_0x16d559(0xf5)](E,_0x29a79d,_0x39fb71),'source':_0x4bd10e[_0x16d559(0x1d8)]};}return null;}(_0x23f674);if(_0x7c04a3)_0x2a135b['ok']('发现凭据:'+_0x7c04a3[_0x510208(0x193)]+'('+_0x24bb5d[_0x510208(0x16f)](S,_0x7c04a3[_0x510208(0x1da)])+_0x510208(0x12e)+_0x7c04a3['baseUrl']+')');else{_0x2a135b[_0x510208(0x1db)](_0x24bb5d[_0x510208(0xb1)]);const _0x23b8fe=(await _0x24bb5d['xohnR'](_0x1b6f0e,_0x24bb5d['zPSQP']))[_0x510208(0x1cc)]();if(!_0x23b8fe)throw new Error(_0x24bb5d[_0x510208(0x208)]);_0x7c04a3={'key':_0x23b8fe,'baseUrl':_0x23f674,'source':_0x24bb5d[_0x510208(0x1e8)]},_0x2a135b['ok'](_0x510208(0xcf)+S(_0x23b8fe)+_0x510208(0x12e)+_0x7c04a3[_0x510208(0x154)]+')');}_0x2a135b[_0x510208(0x18c)](_0x24bb5d[_0x510208(0xfc)]);const _0x3ef6e6=(function(){const _0x2c65c1=_0x510208,_0xc2fc3c=_0x24bb5d[_0x2c65c1(0xfb)](_0x5e9cee),_0xdd6b0={};for(const _0x2b8dff of h){const _0x2a6c7c=_0x24bb5d[_0x2c65c1(0x159)](P,_0x2b8dff),_0x126770={'path':_0x2a6c7c,'exists':!0x1};try{const _0x329b50=_0x4189a9[_0x2c65c1(0x127)](_0x2a6c7c);_0x126770[_0x2c65c1(0xae)]=!0x0,_0x126770[_0x2c65c1(0x1b5)]=_0x329b50[_0x2c65c1(0x1b5)],_0x126770[_0x2c65c1(0x19e)]=_0x329b50['mtime'][_0x2c65c1(0x118)](),_0x126770['mode']=_0x24bb5d[_0x2c65c1(0x144)]('0',_0x24bb5d['tIBJA'](0x1ff,_0x329b50['mode'])[_0x2c65c1(0x1a8)](0x8));}catch{}_0xdd6b0[_0x2b8dff[_0x2c65c1(0x1d8)]]=_0x126770;}const _0x1dcdc0={};for(const _0x5f4998 of[_0x24bb5d[_0x2c65c1(0xf9)],_0x2c65c1(0x1fb),_0x24bb5d[_0x2c65c1(0x162)],_0x2c65c1(0x151)]){const _0x40f079=process['env'][_0x5f4998]??process[_0x2c65c1(0x176)][_0x5f4998[_0x2c65c1(0x131)]()]??null;_0x1dcdc0[_0x5f4998]=_0x24bb5d['OhuUI'](j,_0x40f079);}return{'os':_0xc2fc3c['os'],'node':_0xc2fc3c[_0x2c65c1(0xf7)],'installed_clis':_0xc2fc3c['installed'],'config_files':_0xdd6b0,'proxy_env':_0x1dcdc0};}());_0x2a135b[_0x510208(0x133)](_0x510208(0x13b)+_0x3ef6e6['os'][_0x510208(0xf2)]+_0x510208(0x1ef)+_0x3ef6e6[_0x510208(0xf7)][_0x510208(0x119)]+_0x510208(0x1ba)+Object[_0x510208(0x1a5)](_0x3ef6e6[_0x510208(0x173)])[_0x510208(0xf0)]+'\x20个');const _0x132703=function(_0x301f2a){const _0x380498=_0x510208,_0x3ef855=[],_0x29b730=U(_0x24bb5d[_0x380498(0x147)](P,H[0x1]));null==_0x29b730||/^\s*model_context_window\s*=/m['test'](_0x29b730)||_0x3ef855[_0x380498(0x100)]({'code':_0x380498(0x138),'level':_0x24bb5d['KcjCL'],'message':_0x380498(0x121)});const _0x328c21=[];_0x24bb5d[_0x380498(0x159)](D,_0x24bb5d[_0x380498(0x102)](P,{'label':_0x24bb5d[_0x380498(0x200)],'win':_0x24bb5d[_0x380498(0x14b)]}))&&_0x328c21[_0x380498(0x100)](_0x24bb5d[_0x380498(0x1a2)]);const _0x4197b0=_0x24bb5d[_0x380498(0x20c)](B,_0x301f2a);for(const _0x497350 of H){const _0x4c5b51=_0x24bb5d['mhxcz'](U,_0x24bb5d[_0x380498(0x137)](P,_0x497350));if(_0x24bb5d[_0x380498(0x1e7)](null,_0x4c5b51))continue;const _0x314d85=_0x24bb5d['sDBjZ'](B,_0x24bb5d['YKpZG'](E,_0x4c5b51,''));_0x24bb5d[_0x380498(0xd1)](_0x314d85,_0x4197b0)&&_0x24bb5d[_0x380498(0x161)](_0x314d85,_0x4197b0)&&_0x328c21['push'](_0x497350[_0x380498(0x1d8)]+_0x380498(0x124)+_0x314d85);}return _0x328c21[_0x380498(0xf0)]>0x0&&_0x3ef855[_0x380498(0x100)]({'code':_0x24bb5d[_0x380498(0x1fa)],'level':_0x24bb5d[_0x380498(0x1c6)],'message':_0x380498(0x1dc)+_0x328c21[_0x380498(0x181)](';')+_0x380498(0xce)}),_0x3ef855;}(_0x23f674);if(_0x24bb5d[_0x510208(0x13c)](_0x132703[_0x510208(0xf0)],0x0)){for(const _0x5b2c22 of _0x132703)_0x2a135b[_0x510208(0x1db)]('体检:'+_0x5b2c22[_0x510208(0xde)]);}else _0x2a135b['ok'](_0x24bb5d[_0x510208(0x19d)]);_0x2a135b[_0x510208(0x18c)](_0x510208(0x206));const _0x54928a=await _0x24bb5d[_0x510208(0x20c)](K,_0x23f674);_0x24bb5d[_0x510208(0x1ab)](_0x510208(0x1af),_0x54928a[_0x510208(0x193)])?_0x2a135b['ok'](_0x510208(0x166)+_0x54928a[_0x510208(0xb9)][_0x510208(0xf0)]+_0x510208(0x1f3)+_0x24bb5d[_0x510208(0x12c)](_0x54928a['timeout_ms'],0x3e8)+_0x510208(0x205)+_0x54928a[_0x510208(0x134)]):_0x2a135b[_0x510208(0x1db)](_0x24bb5d[_0x510208(0xd6)]);const _0x449a48=function(_0x4dedb4,_0x2948b6){const _0x5d423c=_0x510208;let _0x425a7c=_0x4dedb4;return _0x24bb5d[_0x5d423c(0x1e7)](_0x24bb5d['VQNxK'],typeof _0x425a7c)&&(_0x425a7c=_0x425a7c[_0x5d423c(0x160)](',')),Array[_0x5d423c(0xb5)](_0x425a7c)&&(_0x425a7c=_0x425a7c[_0x5d423c(0x19c)](_0xb16ba9=>String(_0xb16ba9)[_0x5d423c(0x1cc)]())['filter'](Boolean),_0x425a7c[_0x5d423c(0xf0)]>0x0)?[...new Set(_0x425a7c)]:_0x2948b6;}(_0x5594c4[_0x510208(0xb9)],_0x54928a[_0x510208(0xb9)]);if(!_0x5594c4[_0x510208(0x153)]){if(!await _0x283573(_0x24bb5d[_0x510208(0xbe)](_0x510208(0xc2)+_0x7c04a3['baseUrl']+_0x510208(0x152)+_0x449a48[_0x510208(0xf0)]+_0x510208(0x1ec)+_0x54928a[_0x510208(0xca)]+',正常计费)',_0x5594c4[_0x510208(0x1ea)]?'':_0x24bb5d['DPxGS'])+_0x510208(0xec)))throw new Error(_0x24bb5d[_0x510208(0x15d)]);}_0x2a135b[_0x510208(0x18c)]('HTTP\x20直测('+_0x449a48[_0x510208(0xf0)]+'\x20个模型,并发\x20'+_0x54928a[_0x510208(0x134)]+')');const _0x2ae818=await async function({cred:_0x2b5691,models:_0x3d149f,cfg:_0x3a16da,deviceId:_0x51b3ca}){const _0x589c0c=_0x510208,_0xecb903={'gwlDD':function(_0x599114,_0x240e57){return _0x599114(_0x240e57);}},_0x419caf=Math[_0x589c0c(0x1cb)](0x1,_0x3a16da['concurrency']),_0x50f325=[];for(let _0x3310b2=0x0;_0x24bb5d['HThEH'](_0x3310b2,_0x3d149f[_0x589c0c(0xf0)]);_0x3310b2+=_0x419caf){const _0x5da377=_0x3d149f[_0x589c0c(0x139)](_0x3310b2,_0x3310b2+_0x419caf),_0x281bc4=await Promise[_0x589c0c(0x11a)](_0x5da377['map'](async _0x573af8=>{const _0x18ebba=_0x589c0c,_0x5bf15c=await _0xecb903['gwlDD'](L,{'baseUrl':_0x2b5691[_0x18ebba(0x154)],'apiKey':_0x2b5691[_0x18ebba(0x1da)],'model':_0x573af8,'maxTokens':_0x3a16da[_0x18ebba(0xca)],'timeoutMs':_0x3a16da[_0x18ebba(0x143)],'deviceId':_0x51b3ca});return{'model':_0x573af8,..._0x5bf15c,'code':_0xecb903['gwlDD'](z,_0x5bf15c)};}));_0x50f325[_0x589c0c(0x100)](..._0x281bc4);}return _0x50f325;}({'cred':_0x7c04a3,'models':_0x449a48,'cfg':_0x54928a,'deviceId':_0x24bb5d[_0x510208(0x116)](_0x45f65a)});for(const _0x275cac of _0x2ae818){const _0x4d962f=_0x275cac[_0x510208(0x12d)]+'\x20—\x20HTTP\x20'+(_0x275cac[_0x510208(0x18f)]??_0x24bb5d['wZGfU'])+_0x510208(0x18a)+(_0x275cac['ttfb_ms']??'-')+_0x510208(0x192)+_0x54928a[_0x510208(0x120)][_0x275cac['code']];_0x24bb5d[_0x510208(0x1ab)]('ok',_0x275cac['code'])?_0x2a135b['ok'](_0x4d962f):_0x24bb5d[_0x510208(0x1ab)](_0x24bb5d[_0x510208(0x1bf)],_0x275cac['code'])?_0x2a135b[_0x510208(0x1db)](_0x4d962f):_0x2a135b[_0x510208(0x1d6)](_0x4d962f);}const _0x3ae9ac=[];if(_0x5594c4['skipCliTests'])_0x2a135b[_0x510208(0x133)](_0x510208(0x1fc));else{const _0x31a7fc=$[_0x510208(0x1b8)](_0x10e5fc=>_0x3ef6e6[_0x510208(0x173)][_0x10e5fc]);if(_0x24bb5d[_0x510208(0x125)](0x0,_0x31a7fc[_0x510208(0xf0)]))_0x2a135b[_0x510208(0x1db)](_0x24bb5d[_0x510208(0x1e1)]);else{_0x2a135b['step'](_0x510208(0x11d)+_0x31a7fc[_0x510208(0xf0)]+_0x510208(0x1ed));for(const _0x10a698 of _0x31a7fc){_0x2a135b[_0x510208(0x133)](_0x510208(0x1d4)+_0x10a698+'\x20'+y[_0x10a698][_0x510208(0x181)]('\x20')+'\x20…');const _0x34af0d=await R(_0x10a698,y[_0x10a698]);_0x3ae9ac['push'](_0x34af0d),_0x34af0d[_0x510208(0x18b)]?_0x2a135b[_0x510208(0x1db)](_0x10a698+'\x20超时(30s)已终止'):_0x24bb5d['AFuMI'](0x0,_0x34af0d[_0x510208(0xdd)])?_0x2a135b['ok'](_0x10a698+_0x510208(0xc6)+_0x34af0d[_0x510208(0x112)]+'ms'):_0x2a135b[_0x510208(0x1d6)](_0x10a698+_0x510208(0x111)+(_0x34af0d['exit_code']??'ERR')+'\x20/\x20'+_0x34af0d[_0x510208(0x112)]+'ms');}}}_0x2a135b['step'](_0x510208(0x103));const _0x41e035=(function(){const _0x336ab1=_0x510208,_0x2aa4f8=new Date(),_0x314cee=_0xedbcf6=>String(_0xedbcf6)[_0x336ab1(0xb8)](0x2,'0');return''+_0x2aa4f8['getFullYear']()+_0x24bb5d[_0x336ab1(0x186)](_0x314cee,_0x24bb5d['hfgrc'](_0x2aa4f8[_0x336ab1(0x1a7)](),0x1))+_0x24bb5d[_0x336ab1(0x147)](_0x314cee,_0x2aa4f8['getDate']())+'T'+_0x24bb5d[_0x336ab1(0x1fd)](_0x314cee,_0x2aa4f8[_0x336ab1(0x10f)]())+_0x24bb5d[_0x336ab1(0x102)](_0x314cee,_0x2aa4f8[_0x336ab1(0x157)]())+_0x314cee(_0x2aa4f8[_0x336ab1(0x1dd)]());}()),_0x1ee621=(function(){const _0xbfc33b=_0x510208,_0x256cdc=[];for(const _0x4da2db of Y){const _0x29cbad=P(_0x4da2db);if(!_0x24bb5d['gSqBs'](D,_0x29cbad))continue;const _0x32fd12=_0x24bb5d[_0xbfc33b(0xc1)](q,_0x4da2db[_0xbfc33b(0xf3)]),_0x3fe8b1=_0x24bb5d[_0xbfc33b(0x16f)](M,_0x29cbad)['filter'](_0xbcce60=>_0x32fd12[_0xbfc33b(0xee)](_0xbcce60))[_0xbfc33b(0x19c)](_0x2790d9=>{const _0x3c0e14=_0xbfc33b,_0x483438=_0x58f3ca[_0x3c0e14(0x181)](_0x29cbad,_0x2790d9);let _0x111584=0x0;try{_0x111584=_0x4189a9['statSync'](_0x483438)[_0x3c0e14(0x164)];}catch{return null;}return{'rel':_0x2790d9,'full':_0x483438,'mtimeMs':_0x111584};})[_0xbfc33b(0x1b8)](Boolean)[_0xbfc33b(0x20e)]((_0x4c40f1,_0x4a9e0c)=>_0x4a9e0c[_0xbfc33b(0x164)]-_0x4c40f1[_0xbfc33b(0x164)]);for(const _0xbb1813 of _0x3fe8b1['slice'](0x0,0x3)){const _0x598837=Z(_0xbb1813[_0xbfc33b(0xda)],0x10000);_0x24bb5d['cnNRI'](null,_0x598837)&&_0x256cdc['push']({'cli':_0x4da2db['cli'],'file':_0xbb1813[_0xbfc33b(0x128)],'name':_0x4da2db[_0xbfc33b(0xd2)]+'/'+_0xbb1813[_0xbfc33b(0x128)],'content':redact(_0x598837),'size':_0x598837[_0xbfc33b(0xf0)]});}}return _0x256cdc;}());_0x2a135b[_0x510208(0x133)](_0x24bb5d[_0x510208(0x13c)](_0x1ee621[_0x510208(0xf0)],0x0)?_0x510208(0x155)+_0x1ee621[_0x510208(0xf0)]+'\x20个文件(每文件尾部\x2064KB,已脱敏)':_0x24bb5d['KHFDE']);const _0x16fd36=_0x2ae818[_0x510208(0x19c)](_0x5b2dd0=>JSON[_0x510208(0x20d)]({'model':_0x5b2dd0[_0x510208(0x12d)],'request_id':_0x5b2dd0[_0x510208(0xe9)]??null,'status':_0x5b2dd0[_0x510208(0x18f)]??null,'ttfb_ms':_0x5b2dd0[_0x510208(0x1b1)]??null,'total_ms':_0x5b2dd0[_0x510208(0x1f9)]??null,'error':_0x5b2dd0[_0x510208(0xd0)]?redact(_0x5b2dd0[_0x510208(0xd0)]):null,'response_preview':_0x5b2dd0[_0x510208(0x1d2)]?redact(_0x5b2dd0['response_preview']):''})),_0x244237=_0x3ae9ac[_0x510208(0x19c)](_0x39c69d=>JSON[_0x510208(0x20d)](_0x39c69d)),_0x2a7e47=[];for(const _0x5a19bf of h){let _0x4ecb48;try{_0x4ecb48=_0x4189a9[_0x510208(0x1e9)](_0x24bb5d[_0x510208(0x185)](P,_0x5a19bf),_0x24bb5d[_0x510208(0x1c5)]);}catch{continue;}_0x2a7e47[_0x510208(0x100)]({'name':F(_0x5a19bf[_0x510208(0x1d8)])+_0x510208(0xd5),'content':O(_0x4ecb48)});}const _0x1bad69={'tool_version':_,'generated_at':new Date()[_0x510208(0x118)](),'api_base':_0x23f674,'credential':{'source':_0x7c04a3['source'],'key_redacted':_0x24bb5d[_0x510208(0xe1)](S,_0x7c04a3[_0x510208(0x1da)])},'config_source':_0x54928a[_0x510208(0x193)],'http_tests':_0x2ae818[_0x510208(0x19c)](_0x21ba56=>({'model':_0x21ba56[_0x510208(0x12d)],'status':_0x21ba56['status']??null,'verdict':_0x54928a[_0x510208(0x120)][_0x21ba56[_0x510208(0xd4)]],'ttfb_ms':_0x21ba56['ttfb_ms']??null,'total_ms':_0x21ba56[_0x510208(0x1f9)]??null,'request_id':_0x21ba56[_0x510208(0xe9)]??null})),'cli_tests':_0x3ae9ac[_0x510208(0x19c)](_0x17c935=>({'cli':_0x17c935[_0x510208(0xd2)],'exit_code':_0x17c935[_0x510208(0xdd)],'verdict':0x0!==_0x17c935[_0x510208(0xdd)]||_0x17c935[_0x510208(0x18b)]?_0x510208(0x1d6):'ok'})),'findings':_0x132703,'log_files':_0x1ee621[_0x510208(0x19c)](_0x3e9c38=>({'cli':_0x3e9c38[_0x510208(0xd2)],'file':_0x3e9c38[_0x510208(0xe7)],'size':_0x3e9c38[_0x510208(0x1b5)]})),'zip_path':''},_0xf738e7={'generated_at':_0x1bad69[_0x510208(0x1e6)],'tool_version':_,..._0x3ef6e6},_0x3156d7=function({stamp:_0x54acd0,summary:_0x1468a1,envJson:_0x36c913,httpLines:_0x3cf4d2,cliLines:_0x1dde13,configCopies:_0x2c7ea2,logTails:_0x5cde02,outDir:_0x3a784f}){const _0x2469f2=_0x510208,_0x27de38=_0x2469f2(0x11e)+_0x54acd0,_0xda12ba=_0x27de38+_0x2469f2(0x1e0),_0x122087={[_0x27de38+'/summary.json']:_0x420e62(JSON['stringify'](_0x1468a1,null,0x2)),[_0x27de38+_0x2469f2(0x1bc)]:_0x24bb5d[_0x2469f2(0xc1)](_0x420e62,JSON[_0x2469f2(0x20d)](_0x36c913,null,0x2)),[_0x27de38+_0x2469f2(0xc9)]:_0x24bb5d[_0x2469f2(0x186)](_0x420e62,_0x24bb5d[_0x2469f2(0xcb)](X,_0x3cf4d2)),[_0x27de38+_0x2469f2(0x190)]:_0x24bb5d[_0x2469f2(0xb7)](_0x420e62,_0x24bb5d['iGutu'](X,_0x1dde13)),[_0x27de38+_0x2469f2(0xfe)]:_0x24bb5d['Omjdj'](_0x420e62,_0x24bb5d[_0x2469f2(0x186)](J,{'summary':_0x1468a1,'modelCount':_0x1468a1[_0x2469f2(0x135)][_0x2469f2(0xf0)]}))};for(const _0x203145 of _0x2c7ea2)_0x122087[_0x27de38+_0x2469f2(0xe5)+_0x203145['name']]=_0x420e62(_0x203145[_0x2469f2(0x149)]);for(const _0x2aa623 of _0x5cde02)_0x122087[_0x27de38+'/logs/'+_0x2aa623[_0x2469f2(0x17a)]]=_0x24bb5d['DhxTY'](_0x420e62,_0x2aa623[_0x2469f2(0x149)]);const _0x21bf58=_0x3a784f||process['cwd'](),_0x705a13=_0x58f3ca['join'](_0x21bf58,_0xda12ba);try{_0x4189a9[_0x2469f2(0xea)](_0x21bf58,{'recursive':!0x0}),_0x4189a9[_0x2469f2(0x1e4)](_0x705a13,Buffer[_0x2469f2(0x196)](_0x2caba9(_0x122087)));}catch(_0x5c0b47){throw new Error(_0x2469f2(0x113)+_0x705a13+'):'+_0x5c0b47['message']);}return _0x705a13;}({'stamp':_0x41e035,'summary':{..._0x1bad69,'zip_path':G(_0x41e035,_0x5594c4[_0x510208(0x114)])},'envJson':_0xf738e7,'httpLines':_0x16fd36,'cliLines':_0x244237,'configCopies':_0x2a7e47,'logTails':_0x1ee621,'outDir':_0x5594c4[_0x510208(0x114)]});_0x1bad69[_0x510208(0x174)]=_0x3156d7;const _0x5eaa72=_0x2ae818['filter'](_0x82ea14=>'ok'===_0x82ea14[_0x510208(0xd4)])[_0x510208(0xf0)],_0x5d6a7=_0x2ae818[_0x510208(0x1b8)](_0x189b7f=>'fail'===_0x189b7f['code'])[_0x510208(0xf0)];return _0x2a135b['ok'](_0x510208(0x204)+_0x3156d7),_0x2a135b[_0x510208(0x133)]('HTTP\x20直测\x20'+_0x2ae818[_0x510208(0xf0)]+_0x510208(0x197)+_0x5eaa72+_0x510208(0x1f6)+_0x24bb5d['DXFoF'](_0x24bb5d['DXFoF'](_0x2ae818['length'],_0x5eaa72),_0x5d6a7)+'\x20/\x20失败\x20'+_0x5d6a7+');CLI\x20实测\x20'+_0x3ae9ac['length']+_0x510208(0x123)),{'zipPath':_0x3156d7,'summary':_0x1bad69};}
|
|
1
|
+
function _0x1f6d(){const _0x1dbb80=['dmSIf','\x20个模型(max_tokens\x20极小,计费可忽略)。\x0a\x0a三、隐私说明\x0a包内所有密钥(sk-…)、Bearer\x20凭证、邮箱、代理内嵌账号均已自动脱敏;\x0aconfigs/\x20为脱敏副本,本地原始配置文件未被修改。\x0a\x0a四、联系方式\x0a客服/QQ/邮箱:__________(由客服填写)\x0a','拉取诊断配置','内置兜底(后端诊断配置不可用)','iGbnS','\x0a凭据来源:','model','iUrFI','bseEs','getHours',');CLI\x20实测\x20','体检:未发现配置异常','isFinite','1145127rkWLay','statusCode','Bjrmh','HMdVv','writeFileSync','ErVtr','filter','oWUaX','rkwIr','\x20/\x20缓慢\x20','status','39vmPmMH','TokenShop\x20诊断包说明\x0a====================\x0a\x0a生成时间:','/http-tests.jsonl','Tqcyq','omKBW','~/.claude/settings.json','\x20个模型各发起\x201\x20个真实小请求(max_tokens=','209706CzKKWj','push','levEk','parse','now','GOHJQ','Guldk','total_ms','UpnzJ','RbwyA','mqbPz','/env.json','win32','max_tokens','codex','hulKh','%userprofile%\x5c.claude\x5csettings.json','\x20/\x20ttfb\x20','HrGek','warn','TvtEu','killed','join','replace','LKRkL','api_base','凭据发现','toString','~/.claude/logs','体检:','VQdkB','mode','\x20指向\x20','destroy','PpJmm','使用手动输入的凭据(',')\x0a配置来源:','end','outDir','FQZRp','FBUyX','cLLfU','HTTP_PROXY','~/.cc-switch\x20目录存在','dONMZ','sort','stderr','CLI\x20运行日志尾部收集:','timed_out','gMRJG','platform','1953856jasdKF','Juzlo','\x20个文件(每文件尾部\x2064KB,已脱敏)','version','IciIp','exit_code','xhOrt','isDirectory','slice','node','irzXn','qwukP','info','server','yes','fjxKO','OsCfQ','\x20个模型,并发\x20','utf8','rjKTL','bLsPT','manual-input','closeSync','getFullYear','~/.gemini/settings.json','\x20项(通过\x20','object','error','请输入\x20API\x20Key(仅用于本次诊断,包内不落明文)','/configs/','from','Bearer\x20***','rel','://***@','cmd.exe','source','发现凭据:','%userprofile%\x5c.grok\x5clog','umTry','EQFgG','models','%userprofile%\x5c.gemini\x5ctmp','***…','%userprofile%\x5c.codex\x5cconfig.toml','[^/]*','KfpPU','/logs/','MEhWp','GzbVC','IWPtX','QXGUr','content','ntRkL','MCYDX','~/.codex/config.toml\x20缺少\x20model_context_window:Codex\x20会按内置\x20272k\x20窗口频繁压缩会话;重跑\x20activate\x20可写入真实模型窗口修复','statSync','ZJwqV','hints','jJeQl','lUYnC','***','split','baseUrl','\x20/\x20已装\x20CLI\x20','rAwAA','iIVaF','/summary.json','\x20超时(30s)已终止','codex_context_window_missing','GET','LzKQL','EOpCt','WTDdn','wvDuY','slow','ignore','\x20项。请把\x20zip\x20发给客服排障。','run','vTXPQ','awWuI','fallback','LQwxb','step','将对\x20','vahdO','ueHfO','mtime','OS\x20','\x20→\x20','x-request-id','close','mtimeMs','qhJVe','NWZtr','GQKjQ','fPLqx','cGGsm','SIGKILL','pid','无效的\x20baseUrl:','host','readFileSync','jkbvf','XEwyG','KpnOH','UFBph','WQtzR','isFile','COMSPEC','fsymx','QOoBV','/v1/chat/completions','wzuGK','ERR','SItee','~/.codex/log','\x0a工具版本:','%userprofile%\x5c.codex\x5clog','用户取消诊断','4055145fgnAIz','installed_clis','getDate','\x5c$&','%userprofile%\x5c.gemini\x5csettings.json','../package.json','mMgzC','size','trim','kmhGl','openSync','.redacted','bjRwE','\x20的\x20',');cli-activate\x20优先级更高,重新激活即可覆盖','chDBv','message','\x0aAPI\x20地址:','BRxAs','\x20/\x20node\x20','KFhUz','uyzTc','zip_path','VdNWV','length','cwd','wZSFo','tokenshop-diagnose-','已按参数跳过\x20CLI\x20实测','protocol','readdirSync','缓慢(2xx\x20但首字节延迟超过\x2010s)','正常(HTTP\x202xx)','AWBMq','wYmpf','gVncg','test','claude-sonnet-4-5','/README.txt','ALL_PROXY','ULLVZ','third_party_switcher','swsJN','\x20退出码\x20','VcaSZ','qSmWx','profile_version','czbXV','CLI\x20运行日志尾部收集:未发现候选日志目录,跳过','sLsyD','ZSDGW','grok','kCvbo','key_redacted','pipe','generated_at','未发现已安装的可测\x20CLI,跳过\x20CLI\x20实测','headers','znvTw','label','Wsrog','YgXRG','请求超时(','~/.codex/auth.json','WjAhn','mkdirSync','EaeMZ','FGcSC','zWQai','@2api-store/activate/','bfvzj','后端下发矩阵:','CYqqC','诊断包写入失败(','失败(非\x202xx\x20或请求出错)','%userprofile%\x5c.codex\x5cauth.json','qrhXz','*.log','data','clpuI','gICiS','exists','诊断包已生成:','fail','duration_ms','hahoq','\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-\x20logs/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20CLI\x20运行日志尾部(探测式收集:目录存在才收,每\x20CLI\x20最多\x203\x20个最新文件、每文件尾部\x2064KB,已脱敏)\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','concat','.zip','code','file','stringify','DFbcM','toLowerCase','gemini','(key\x20已脱敏:','spawn\x20失败:','lFRXO','gGxnV','RBxtY','Cfmho','ZlSCI','isArray','alloc','%userprofile%\x5c.opencode\x5clog','liYdk','KlhMq','PoWKz','\x20个,各\x2030s\x20超时)','\x20/\x20','bMHZk','zUzJj','47858RJNjbn','tSwqd','byteLength','toISOString','KTGYV','name','dNyeo','AjUvZ','http_tests','VrVrN','claude','tool_version','PwUFO','2521148iCVhFd','key','vboSo','all','打包诊断\x20zip','KOPIV','RExxr','string','stdout','chooV','rZgOm','KRxav','map','cli','FGDKq','config_source','env','request_id','后端下发','检测到第三方切换器痕迹(','未在\x20~/.codex/auth.json\x20/\x20~/.claude/settings.json\x20/\x20~/.gemini/settings.json\x20中发现\x20API\x20Key','kRrsT','deuEM','skipCliTests','22097628HBqfuz','未提供\x20API\x20Key,诊断中止','RUNuf','CYOvK','opencode','request','FGNjn','后端诊断配置不可用(404/超时/非法),使用内置兜底矩阵','NlpEJ','186ezmULf','keys','Beknh','sk-','timeout','indexOf','application/json','gpt-5.5','getMinutes','getSeconds','exec','EEPLG','cNkkQ','uJSdR','JrupQ','ttfb_ms','hIHyW','~/.cc-switch','\x20模型\x20/\x20超时\x20','s\x20/\x20并发\x20','concurrency','PpVQd','\x20/\x20失败\x20','match','timeout_ms','PAUlT'];_0x1f6d=function(){return _0x1dbb80;};return _0x1f6d();}const _0x507a08=_0x5eee;(function(_0x350323,_0x509823){const _0x391628=_0x5eee,_0x21a326=_0x350323();while(!![]){try{const _0x1cae68=-parseInt(_0x391628(0x1ef))/0x1+-parseInt(_0x391628(0x19a))/0x2*(-parseInt(_0x391628(0x1fa))/0x3)+-parseInt(_0x391628(0x1a7))/0x4+parseInt(_0x391628(0x2ab))/0x5+parseInt(_0x391628(0x1c8))/0x6*(-parseInt(_0x391628(0x201))/0x7)+-parseInt(_0x391628(0x234))/0x8+parseInt(_0x391628(0x1bf))/0x9;if(_0x1cae68===_0x509823)break;else _0x21a326['push'](_0x21a326['shift']());}catch(_0x58ea5f){_0x21a326['push'](_0x21a326['shift']());}}}(_0x1f6d,0x9993e));import _0x42700e from'node:fs';import _0x5e7506 from'node:path';import _0x458612 from'node:https';import _0x2e078f from'node:http';import{spawn as _0x34fa39,spawnSync as _0xc293c4}from'node:child_process';import{createRequire as _0x558054}from'node:module';import{zipSync as _0x29af47,strToU8 as _0x2075d8}from'fflate';import{detectAll as _0x2a4781}from'./detect.mjs';import{getDeviceId as _0xef012}from'./device.mjs';import{expandPath as _0x464e78}from'./render.mjs';import{askSecret as _0x4e61e8,confirm as _0x5a59fd}from'./prompt.mjs';import*as _0x3d9da3 from'./ui.mjs';const _=_0x558054(import.meta.url)(_0x507a08(0x2b0))[_0x507a08(0x237)],g=_0x507a08(0x2f0)+_,h=[{'label':'~/.codex/auth.json','win':_0x507a08(0x2f6)},{'label':'~/.claude/settings.json','win':_0x507a08(0x211)},{'label':_0x507a08(0x24c),'win':_0x507a08(0x2af)}],$=[_0x507a08(0x1a4),_0x507a08(0x20f),_0x507a08(0x309),'grok',_0x507a08(0x1c3)],y={'claude':['-p','hi'],'codex':[_0x507a08(0x1d2),'hi'],'gemini':['-p','hi'],'grok':['-p','hi'],'opencode':[_0x507a08(0x281),'hi']},w=0x2800,A={'ok':_0x507a08(0x2cb),'slow':_0x507a08(0x2ca),'fail':_0x507a08(0x2f5)},k=/sk-([a-zA-Z0-9]{10,})/,x=/(?: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,})/,T=/(?:base_url|api_base_url|api_base|apiBase|ANTHROPIC_BASE_URL|BASE_URL)["':\s=]+["']?(https?:\/\/[^\s"'`]+)/i,b=/https?:\/\/[^\s"'`}]+/;function v(){const _0xfafd02=_0x507a08,_0x3862b1={'liYdk':function(_0x56355e,_0x35099f){return _0x56355e===_0x35099f;},'uNpUZ':_0xfafd02(0x20d)};return _0x3862b1[_0xfafd02(0x314)](_0x3862b1['uNpUZ'],process[_0xfafd02(0x233)]);}function P(_0x8732c8){const _0xd200fe=_0x507a08,_0x47875d={'EOpCt':function(_0x1fa865,_0x25e055,_0x298039){return _0x1fa865(_0x25e055,_0x298039);},'IciIp':function(_0x278443){return _0x278443();}};return _0x47875d[_0xd200fe(0x27b)](_0x464e78,_0x47875d['IciIp'](v)?_0x8732c8['win']:_0x8732c8[_0xd200fe(0x2e6)],{'isWindows':_0x47875d[_0xd200fe(0x238)](v)});}function S(_0xebc929){const _0x4a8d12=_0x507a08,_0x339aa9={'FGNjn':function(_0x1205bf,_0x4e7446){return _0x1205bf<=_0x4e7446;},'fjxKO':'***'};return _0xebc929?/^sk-[A-Za-z0-9_-]{20,}$/[_0x4a8d12(0x2cf)](_0xebc929)?'sk-…'+_0xebc929[_0x4a8d12(0x23c)](-0x6):_0x339aa9[_0x4a8d12(0x1c5)](_0xebc929['length'],0x8)?_0x339aa9[_0x4a8d12(0x243)]:_0x4a8d12(0x25e)+_0xebc929[_0x4a8d12(0x23c)](-0x6):null;}function j(_0x4ce992){const _0xf998a6=_0x507a08,_0x83b145={'ueHfO':_0xf998a6(0x1ae),'CYOvK':_0xf998a6(0x255)};return _0x83b145[_0xf998a6(0x289)]==typeof _0x4ce992?_0x4ce992['replace'](/:\/\/[^@/\s]+@/,_0x83b145[_0xf998a6(0x1c2)]):_0x4ce992;}export function redact(_0x534c8a){const _0x5deec8=_0x507a08,_0x113806={'FGDKq':function(_0x1d9e13,_0x34c2b9){return _0x1d9e13!=_0x34c2b9;},'hmqzH':_0x5deec8(0x1ae),'ZJwqV':function(_0x32b38c,_0x21f854){return _0x32b38c===_0x21f854;}};if(_0x113806[_0x5deec8(0x1b5)](_0x113806['hmqzH'],typeof _0x534c8a)||_0x113806[_0x5deec8(0x26c)]('',_0x534c8a))return _0x534c8a;let _0x1cd86b=_0x534c8a;return _0x1cd86b=_0x1cd86b[_0x5deec8(0x218)](/sk-[A-Za-z0-9_-]{20,}/g,_0x17bf37=>'sk-…'+_0x17bf37['slice'](-0x6)),_0x1cd86b=_0x1cd86b[_0x5deec8(0x218)](/[Bb]earer\s+\S+/g,_0x5deec8(0x253)),_0x1cd86b=_0x1cd86b[_0x5deec8(0x218)](/[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/g,_0x54eb1a=>{const _0x35d786=_0x5deec8,_0x5c1e54=_0x54eb1a[_0x35d786(0x1cd)]('@');return _0x54eb1a[0x0]+_0x35d786(0x270)+_0x54eb1a[_0x35d786(0x23c)](_0x5c1e54);}),_0x1cd86b;}function O(_0x3870f4){const _0x1f2575=_0x507a08,_0x252d3c={'bseEs':function(_0x5513ed,_0x1265a1){return _0x5513ed(_0x1265a1);}};let _0x101660=_0x252d3c[_0x1f2575(0x1ea)](redact,_0x3870f4);return _0x101660=_0x101660[_0x1f2575(0x218)](/((?:API_KEY|AUTH_TOKEN|OPENAI_API_KEY|ANTHROPIC_API_KEY|ANTHROPIC_AUTH_TOKEN)["':\s]+["'])([a-zA-Z0-9._-]{10,})(["'])/gi,(_0x3a4999,_0x188d8a,_0x396b46,_0x3f4818)=>''+_0x188d8a+S(_0x396b46)+_0x3f4818),_0x101660=_0x101660[_0x1f2575(0x218)](/(export\s+(?:API_KEY|AUTH_TOKEN|OPENAI_API_KEY|ANTHROPIC_API_KEY|ANTHROPIC_AUTH_TOKEN)=(["']?))([a-zA-Z0-9._-]{10,})/gi,(_0x2205ba,_0x2cbec6)=>_0x2cbec6+'***'),_0x101660;}function C(_0x49f3cb){const _0x32d4de=_0x507a08,_0x30504f=_0x49f3cb[_0x32d4de(0x1df)](k);if(_0x30504f)return _0x32d4de(0x1cb)+_0x30504f[0x1];const _0x1059d8=_0x49f3cb['match'](x);if(_0x1059d8)return _0x1059d8[0x1];const _0x212177=_0x49f3cb[_0x32d4de(0x1df)](I);return _0x212177?_0x212177[0x2]:null;}function _0x5eee(_0x108cfd,_0x2725d2){_0x108cfd=_0x108cfd-0x195;const _0x1f6d49=_0x1f6d();let _0x5eee2f=_0x1f6d49[_0x108cfd];return _0x5eee2f;}function E(_0x1d323c,_0x5786dd){const _0x549352=_0x507a08,_0x554a50=_0x1d323c[_0x549352(0x1df)](T);if(_0x554a50)return _0x554a50[0x1][_0x549352(0x218)](/\/+$/,'');const _0x10b6b0=_0x1d323c[_0x549352(0x1df)](b);return _0x10b6b0?_0x10b6b0[0x1][_0x549352(0x218)](/\/+$/,''):_0x5786dd;}function N(_0x3d8947,_0x3f3486,_0x26ddcd,_0x46b3ac){const _0x161fce=_0x507a08,_0x2578c4={'iGbnS':function(_0x411d79,_0x4115f3){return _0x411d79<=_0x4115f3;}},_0x50117e=Number(_0x3d8947);return Number[_0x161fce(0x1ee)](_0x50117e)&&_0x50117e>=_0x26ddcd&&_0x2578c4[_0x161fce(0x1e6)](_0x50117e,_0x46b3ac)?Math['floor'](_0x50117e):_0x3f3486;}function K(_0x4e623b){const _0x4f6cc2=_0x507a08,_0x4a5ade={'mqbPz':function(_0x384462,_0x29499e){return _0x384462==_0x29499e;},'WQtzR':function(_0x49faba,_0x1e130d,_0x4badb2,_0x37f864,_0x105781){return _0x49faba(_0x1e130d,_0x4badb2,_0x37f864,_0x105781);},'NWZtr':'server','KinOq':function(_0x546474,_0x56f243){return _0x546474<_0x56f243;},'bMHZk':function(_0x3e7498,_0x771108){return _0x3e7498(_0x771108);},'zWQai':'utf8','swsJN':_0x4f6cc2(0x2f9),'kRrsT':_0x4f6cc2(0x226),'RBxtY':'/api/v1/cli/diagnose-config','KJoUv':function(_0x3d0a86,_0x4f5882){return _0x3d0a86(_0x4f5882);},'WTDdn':function(_0x5e3073,_0x10896f){return _0x5e3073===_0x10896f;},'EaeMZ':'https:','uDtaO':function(_0x3add1c){return _0x3add1c();},'fsymx':_0x4f6cc2(0x1ce),'GzbVC':'timeout','Bjrmh':'builtin','wYmpf':_0x4f6cc2(0x1cf),'bfvzj':_0x4f6cc2(0x2d0),'hulKh':'gemini-2.5-pro'},_0x5dcb68={'profile_version':_0x4a5ade[_0x4f6cc2(0x1f1)],'models':[_0x4a5ade[_0x4f6cc2(0x2cd)],_0x4a5ade[_0x4f6cc2(0x2f1)],_0x4a5ade[_0x4f6cc2(0x210)]],'timeout_ms':0x7530,'max_tokens':0x1,'concurrency':0x2,'hints':{...A},'source':_0x4f6cc2(0x284)};return new Promise(_0x399f94=>{const _0x1b7864=_0x4f6cc2,_0x503898={'PpJmm':function(_0x59b0ba,_0x1eaa2a){return _0x59b0ba===_0x1eaa2a;},'MFZJq':function(_0x10eff3,_0x281238){const _0x10e501=_0x5eee;return _0x4a5ade[_0x10e501(0x20b)](_0x10eff3,_0x281238);},'LKRkL':function(_0x165e32,_0x558f72,_0x82cad3,_0x27dfb3,_0x7dbef2){const _0x2d412e=_0x5eee;return _0x4a5ade[_0x2d412e(0x29e)](_0x165e32,_0x558f72,_0x82cad3,_0x27dfb3,_0x7dbef2);},'dNyeo':function(_0x46bce7,_0x1bcee8,_0x10317e,_0x14f624,_0x4ec6e2){const _0x509717=_0x5eee;return _0x4a5ade[_0x509717(0x29e)](_0x46bce7,_0x1bcee8,_0x10317e,_0x14f624,_0x4ec6e2);},'KFhUz':_0x4a5ade[_0x1b7864(0x291)],'cLLfU':function(_0x35ab9b,_0x4f20dc){return _0x4a5ade['KinOq'](_0x35ab9b,_0x4f20dc);},'rjKTL':function(_0x17e9c5,_0x225a1c){const _0x4cc98b=_0x1b7864;return _0x4a5ade[_0x4cc98b(0x198)](_0x17e9c5,_0x225a1c);},'cNkkQ':_0x4a5ade[_0x1b7864(0x2ef)],'CYqqC':_0x4a5ade[_0x1b7864(0x2d5)],'QOoBV':_0x4a5ade[_0x1b7864(0x1bc)]};let _0x49d796;try{_0x49d796=new URL(_0x4a5ade[_0x1b7864(0x30e)],_0x4e623b);}catch{return void _0x4a5ade['KJoUv'](_0x399f94,_0x5dcb68);}const _0x2169e7=(_0x4a5ade[_0x1b7864(0x27c)](_0x4a5ade[_0x1b7864(0x2ed)],_0x49d796[_0x1b7864(0x2c8)])?_0x458612:_0x2e078f)[_0x1b7864(0x1c4)](_0x49d796,{'method':_0x1b7864(0x279),'headers':{'User-Agent':g,'X-Device-Id':_0x4a5ade['uDtaO'](_0xef012),'Accept':_0x4a5ade[_0x1b7864(0x2a1)]},'timeout':0x2710},_0x38bed9=>{const _0x3c9459=_0x1b7864,_0x4458f1={'ZSDGW':function(_0x1118ee,_0x22344a){const _0x5bb861=_0x5eee;return _0x503898[_0x5bb861(0x223)](_0x1118ee,_0x22344a);},'cZLdJ':function(_0x2bbb00,_0x2e5385){return _0x503898['MFZJq'](_0x2bbb00,_0x2e5385);},'UZDCW':function(_0x5922a7,_0x1cf834,_0x2b66d7,_0x539a4d,_0x239f5d){const _0x3220d4=_0x5eee;return _0x503898[_0x3220d4(0x219)](_0x5922a7,_0x1cf834,_0x2b66d7,_0x539a4d,_0x239f5d);},'HrGek':function(_0x1cf269,_0x49c7ce,_0x2b7889,_0x380240,_0xb250f){const _0x4b9195=_0x5eee;return _0x503898[_0x4b9195(0x219)](_0x1cf269,_0x49c7ce,_0x2b7889,_0x380240,_0xb250f);},'qSmWx':function(_0x51e46c,_0x13da91,_0x36e780,_0x4bda04,_0x4386d){const _0x452afc=_0x5eee;return _0x503898[_0x452afc(0x1a0)](_0x51e46c,_0x13da91,_0x36e780,_0x4bda04,_0x4386d);},'VcaSZ':_0x503898[_0x3c9459(0x2bf)],'stueV':function(_0xad184b,_0x1a2aaf){const _0x41a535=_0x3c9459;return _0x503898[_0x41a535(0x22a)](_0xad184b,_0x1a2aaf);},'rrNwZ':function(_0x2e7314,_0x3ab640){return _0x2e7314>=_0x3ab640;},'ZlSCI':function(_0x5d7138,_0x1eccdf){const _0x4ad616=_0x3c9459;return _0x503898[_0x4ad616(0x247)](_0x5d7138,_0x1eccdf);},'vTXPQ':_0x503898[_0x3c9459(0x1d4)]},_0x40a08e=[];_0x38bed9['on'](_0x503898[_0x3c9459(0x2f3)],_0x29e551=>_0x40a08e[_0x3c9459(0x202)](_0x29e551)),_0x38bed9['on'](_0x503898[_0x3c9459(0x2a2)],()=>{const _0x558737=_0x3c9459;if(_0x4458f1['stueV'](_0x38bed9[_0x558737(0x1f0)],0xc8)||_0x4458f1['rrNwZ'](_0x38bed9[_0x558737(0x1f0)],0x12c))_0x4458f1['ZlSCI'](_0x399f94,_0x5dcb68);else try{const _0x261699=Buffer[_0x558737(0x302)](_0x40a08e)[_0x558737(0x21c)](_0x4458f1[_0x558737(0x282)]);_0x4458f1['ZlSCI'](_0x399f94,function(_0x4c40d7,_0x6a5dcb){const _0x2e6d23=_0x558737,_0x9165a7=Array['isArray'](_0x4c40d7[_0x2e6d23(0x25c)])?_0x4c40d7[_0x2e6d23(0x25c)]['filter'](_0x5b92b4=>_0x2e6d23(0x1ae)==typeof _0x5b92b4&&_0x5b92b4[_0x2e6d23(0x2b3)]()):[];if(_0x4458f1[_0x2e6d23(0x2dd)](0x0,_0x9165a7['length']))return _0x6a5dcb;const _0x2f5075=_0x4c40d7[_0x2e6d23(0x26d)]&&_0x4458f1['cZLdJ'](_0x2e6d23(0x24e),typeof _0x4c40d7[_0x2e6d23(0x26d)])&&!Array['isArray'](_0x4c40d7[_0x2e6d23(0x26d)])?{..._0x6a5dcb[_0x2e6d23(0x26d)],..._0x4c40d7['hints']}:{..._0x6a5dcb['hints']};return{'profile_version':_0x4c40d7[_0x2e6d23(0x2d9)]??null,'models':_0x9165a7,'timeout_ms':_0x4458f1['UZDCW'](N,_0x4c40d7[_0x2e6d23(0x1e0)],_0x6a5dcb['timeout_ms'],0x3e8,0x1d4c0),'max_tokens':_0x4458f1[_0x2e6d23(0x213)](N,_0x4c40d7[_0x2e6d23(0x20e)],_0x6a5dcb[_0x2e6d23(0x20e)],0x1,0x40),'concurrency':_0x4458f1[_0x2e6d23(0x2d8)](N,_0x4c40d7[_0x2e6d23(0x1dc)],_0x6a5dcb[_0x2e6d23(0x1dc)],0x1,0x8),'hints':_0x2f5075,'source':_0x4458f1[_0x2e6d23(0x2d7)]};}(_0x261699?JSON[_0x558737(0x204)](_0x261699):{},_0x5dcb68));}catch{_0x4458f1[_0x558737(0x310)](_0x399f94,_0x5dcb68);}});});_0x2169e7['on'](_0x4a5ade[_0x1b7864(0x264)],()=>_0x2169e7[_0x1b7864(0x222)](new Error(_0x1b7864(0x1cc)))),_0x2169e7['on'](_0x1b7864(0x24f),()=>_0x399f94(_0x5dcb68)),_0x2169e7[_0x1b7864(0x226)]();});}function L({baseUrl:_0x4555f1,apiKey:_0x4ded71,model:_0xf0214a,maxTokens:_0x40b21b,timeoutMs:_0x20b321,deviceId:_0x3f0019}){const _0x185b06=_0x507a08,_0x1c7c09={'NlpEJ':function(_0x9853ec,_0x527b4c){return _0x9853ec/_0x527b4c;},'RbwyA':function(_0x280ec0,_0x3212df){return _0x280ec0<=_0x3212df;},'PdCKP':function(_0x4cfac7,_0x1645d7){return _0x4cfac7(_0x1645d7);},'bcfMW':_0x185b06(0x28d),'IaJyH':function(_0x58a602,_0x45bb32){return _0x58a602-_0x45bb32;},'HMdVv':_0x185b06(0x226),'xhOrt':function(_0x46c3fb,_0x22b382){return _0x46c3fb-_0x22b382;},'VdNWV':_0x185b06(0x2a3),'wZSFo':function(_0x57e2ec,_0x1b79ff){return _0x57e2ec-_0x1b79ff;},'gICiS':function(_0x221aa5,_0x1f4946){return _0x221aa5===_0x1f4946;},'wzuGK':'https:','dmSIf':'user','GQKjQ':'POST','irzXn':_0x185b06(0x1ce),'Juzlo':_0x185b06(0x1cc),'qrhXz':_0x185b06(0x24f)};return new Promise(_0x2cebad=>{const _0x598e0b=_0x185b06,_0x4c51ce={'onNMt':function(_0x322271,_0x587a01){const _0x479ad4=_0x5eee;return _0x1c7c09[_0x479ad4(0x20a)](_0x322271,_0x587a01);},'PpVQd':function(_0x4a3591,_0x113be8){return _0x1c7c09['PdCKP'](_0x4a3591,_0x113be8);},'FQZRp':_0x1c7c09['bcfMW'],'AWBMq':function(_0x2580d5,_0x266b2d){return _0x1c7c09['IaJyH'](_0x2580d5,_0x266b2d);},'czbXV':_0x598e0b(0x2f9),'clpuI':_0x1c7c09[_0x598e0b(0x1f2)],'PoWKz':function(_0x387f2e,_0x391994){const _0xefe429=_0x598e0b;return _0x1c7c09[_0xefe429(0x23a)](_0x387f2e,_0x391994);}},_0x37306d=Date['now']();let _0x32c4bd,_0x231676=null;try{_0x32c4bd=new URL(_0x1c7c09[_0x598e0b(0x2c2)],_0x4555f1);}catch{return void _0x2cebad({'request_id':null,'status':null,'ttfb_ms':null,'total_ms':_0x1c7c09[_0x598e0b(0x2c5)](Date[_0x598e0b(0x205)](),_0x37306d),'error':_0x598e0b(0x297)+_0x4555f1,'response_preview':''});}const _0x355678=_0x1c7c09[_0x598e0b(0x2fb)](_0x1c7c09[_0x598e0b(0x2a4)],_0x32c4bd['protocol'])?_0x458612:_0x2e078f,_0x3565e9=JSON[_0x598e0b(0x306)]({'model':_0xf0214a,'messages':[{'role':_0x1c7c09[_0x598e0b(0x1e2)],'content':'hi'}],'max_tokens':_0x40b21b,'stream':!0x1}),_0x3dd58c=_0x355678[_0x598e0b(0x1c4)](_0x32c4bd,{'method':_0x1c7c09[_0x598e0b(0x292)],'headers':{'Authorization':'Bearer\x20'+_0x4ded71,'User-Agent':g,'X-Device-Id':_0x3f0019,'Content-Type':_0x1c7c09[_0x598e0b(0x23e)],'Content-Length':Buffer[_0x598e0b(0x19c)](_0x3565e9)},'timeout':_0x20b321},_0xf18c71=>{const _0x5a8563=_0x598e0b,_0x2f5680={'hahoq':function(_0x177923,_0x42fd7a){const _0x47553f=_0x5eee;return _0x4c51ce[_0x47553f(0x1dd)](_0x177923,_0x42fd7a);},'GOHJQ':_0x4c51ce[_0x5a8563(0x228)],'lUYnC':function(_0x1bdfc6,_0xae614b){const _0x2e0bc5=_0x5a8563;return _0x4c51ce[_0x2e0bc5(0x2cc)](_0x1bdfc6,_0xae614b);}};_0x231676=Date[_0x5a8563(0x205)]()-_0x37306d;const _0x5b7340=[];let _0x4cd737=0x0;_0xf18c71['on'](_0x4c51ce[_0x5a8563(0x2da)],_0x366cfa=>{const _0x50dcb1=_0x5a8563;_0x4cd737+=_0x366cfa['length'],_0x4c51ce['onNMt'](_0x4cd737,0x40000)&&_0x5b7340[_0x50dcb1(0x202)](_0x366cfa);}),_0xf18c71['on'](_0x4c51ce[_0x5a8563(0x2fa)],()=>{const _0x26ed4f=_0x5a8563,_0xc0f07d=Buffer[_0x26ed4f(0x302)](_0x5b7340)['toString']('utf8');_0x2f5680[_0x26ed4f(0x300)](_0x2cebad,{'request_id':_0xf18c71[_0x26ed4f(0x2e4)][_0x2f5680[_0x26ed4f(0x206)]]||null,'status':_0xf18c71[_0x26ed4f(0x1f0)],'ttfb_ms':_0x231676,'total_ms':_0x2f5680[_0x26ed4f(0x26f)](Date[_0x26ed4f(0x205)](),_0x37306d),'error':null,'response_preview':_0xc0f07d['slice'](0x0,0x1f4)});});});_0x3dd58c['on'](_0x1c7c09[_0x598e0b(0x235)],()=>{const _0x6db45e=_0x598e0b;_0x3dd58c[_0x6db45e(0x222)](new Error(_0x6db45e(0x2e9)+_0x1c7c09[_0x6db45e(0x1c7)](_0x20b321,0x3e8)+'s)—\x20'+_0x32c4bd['href']));}),_0x3dd58c['on'](_0x1c7c09[_0x598e0b(0x2f7)],_0x38d340=>{const _0x447d60=_0x598e0b;_0x4c51ce[_0x447d60(0x1dd)](_0x2cebad,{'request_id':null,'status':null,'ttfb_ms':_0x231676,'total_ms':_0x4c51ce[_0x447d60(0x195)](Date['now'](),_0x37306d),'error':_0x38d340[_0x447d60(0x2bb)],'response_preview':''});}),_0x3dd58c['end'](_0x3565e9);});}function z(_0x1c654b){const _0x57360a=_0x507a08,_0x3e8365={'TvtEu':function(_0x522808,_0x140c76){return _0x522808>=_0x140c76;},'LzKQL':function(_0x3d7c48,_0x17097d){return _0x3d7c48<_0x17097d;},'cGGsm':function(_0x10bb19,_0x42540c){return _0x10bb19!=_0x42540c;}};return _0x3e8365[_0x57360a(0x215)](_0x1c654b[_0x57360a(0x1f9)],0xc8)&&_0x3e8365[_0x57360a(0x27a)](_0x1c654b['status'],0x12c)?_0x3e8365[_0x57360a(0x294)](null,_0x1c654b[_0x57360a(0x1d7)])&&_0x1c654b[_0x57360a(0x1d7)]>0x2710?_0x57360a(0x27e):'ok':'fail';}function R(_0x3fbb28,_0x10f1e6){const _0x2cc0e8=_0x507a08,_0xa16bf4={'deuEM':function(_0x5ba407,_0x57ff7e){return _0x5ba407<_0x57ff7e;},'awWuI':_0x2cc0e8(0x246),'dONMZ':function(_0x58949f,_0x3d3519){return _0x58949f(_0x3d3519);},'deifd':function(_0x35a550,_0x5aca3b){return _0x35a550(_0x5aca3b);},'mMgzC':function(_0x236c77,_0x4772a2,_0x10b33b,_0x341575){return _0x236c77(_0x4772a2,_0x10b33b,_0x341575);},'gapIv':'taskkill','bLsPT':'/pid','EEPLG':_0x2cc0e8(0x27f),'BRxAs':_0x2cc0e8(0x295),'xXUkF':function(_0xa97247,_0x1c8853){return _0xa97247<_0x1c8853;},'DFbcM':function(_0x160b77){return _0x160b77();},'XEwyG':_0x2cc0e8(0x2e1),'FXclT':function(_0x40d8b7,_0x32c618,_0x21b264){return _0x40d8b7(_0x32c618,_0x21b264);},'bjRwE':_0x2cc0e8(0x2f9),'qHQWr':'error'};return new Promise(_0xc043dd=>{const _0x341c6d=_0x2cc0e8,_0xe00c25={'lFRXO':function(_0x3d6529,_0xb45c9){return _0xa16bf4['deifd'](_0x3d6529,_0xb45c9);},'tSwqd':function(_0x375e2b,_0x4f784f){const _0x46cb62=_0x5eee;return _0xa16bf4[_0x46cb62(0x22d)](_0x375e2b,_0x4f784f);},'SGAlW':function(_0x5b6a75,_0x3bf272){return _0x5b6a75(_0x3bf272);},'FjWdB':function(_0xb56e68){return _0xb56e68();},'mmUyQ':function(_0x3e6c1e,_0x144219,_0x198266,_0x5f56fc){const _0x3413de=_0x5eee;return _0xa16bf4[_0x3413de(0x2b1)](_0x3e6c1e,_0x144219,_0x198266,_0x5f56fc);},'omKBW':_0xa16bf4['gapIv'],'UFBph':_0xa16bf4[_0x341c6d(0x248)],'RExxr':function(_0x11680d,_0x2e4c88){return _0x11680d(_0x2e4c88);},'MCYDX':_0xa16bf4[_0x341c6d(0x1d3)],'bVYkP':_0xa16bf4[_0x341c6d(0x2bd)],'KRxav':function(_0x5573a9,_0x541b45){return _0xa16bf4['xXUkF'](_0x5573a9,_0x541b45);},'vboSo':_0xa16bf4['awWuI']},_0x2863dc=[_0x3fbb28,..._0x10f1e6['map'](_0xee999b=>/\s/[_0x341c6d(0x2cf)](_0xee999b)?JSON[_0x341c6d(0x306)](_0xee999b):_0xee999b)]['join']('\x20'),_0x3e3a84=Date[_0x341c6d(0x205)]();let _0x325611='',_0x1e69fa='',_0x3b592f=!0x1,_0x1c8ec5=!0x1;const _0x2ec8ad=_0x24ffb5=>{const _0x161e5c=_0x341c6d;_0x1c8ec5||(_0x1c8ec5=!0x0,_0xe00c25[_0x161e5c(0x30c)](clearTimeout,_0x1f75bb),_0xe00c25[_0x161e5c(0x19b)](_0xc043dd,{'cli':_0x3fbb28,'cmd':_0x2863dc,'exit_code':_0x24ffb5,'duration_ms':Date['now']()-_0x3e3a84,'timed_out':_0x3b592f,'stdout':_0xe00c25[_0x161e5c(0x19b)](redact,_0x325611[_0x161e5c(0x23c)](0x0,w)),'stderr':_0xe00c25['SGAlW'](redact,_0x1e69fa[_0x161e5c(0x23c)](0x0,w))}));};let _0x2d9025;try{const _0x185c2d=_0xa16bf4[_0x341c6d(0x307)](v)?process['env'][_0x341c6d(0x2a0)]||_0x341c6d(0x256):_0x3fbb28,_0xa3908f=_0xa16bf4['DFbcM'](v)?['/c',_0x3fbb28,..._0x10f1e6]:_0x10f1e6;_0x2d9025=_0xa16bf4[_0x341c6d(0x2b1)](_0x34fa39,_0x185c2d,_0xa3908f,{'stdio':['ignore',_0xa16bf4[_0x341c6d(0x29b)],_0xa16bf4[_0x341c6d(0x29b)]],'env':process[_0x341c6d(0x1b7)]});}catch(_0x4fc6aa){return _0x1e69fa=_0x341c6d(0x30b)+_0x4fc6aa[_0x341c6d(0x2bb)],void _0x2ec8ad(null);}const _0x1f75bb=_0xa16bf4['FXclT'](setTimeout,()=>{_0x3b592f=!0x0,function(_0x2e099d){const _0x2faa54=_0x5eee;if(_0x2e099d&&!_0x2e099d[_0x2faa54(0x216)]){if(_0xe00c25['FjWdB'](v)&&_0x2e099d[_0x2faa54(0x296)])try{return void _0xe00c25['mmUyQ'](_0xc293c4,_0xe00c25[_0x2faa54(0x1fe)],[_0xe00c25[_0x2faa54(0x29d)],_0xe00c25[_0x2faa54(0x1ad)](String,_0x2e099d[_0x2faa54(0x296)]),'/T','/F'],{'stdio':_0xe00c25[_0x2faa54(0x269)]});}catch{}try{_0x2e099d['kill'](_0xe00c25['bVYkP']);}catch{}}}(_0x2d9025);},0x7530);_0x2d9025['stdout']&&_0x2d9025[_0x341c6d(0x1af)]['on'](_0xa16bf4[_0x341c6d(0x2b7)],_0x35ba12=>{const _0x25e04c=_0x341c6d;_0xe00c25[_0x25e04c(0x1b2)](_0x325611[_0x25e04c(0x2c3)],0x5000)&&(_0x325611+=_0x35ba12[_0x25e04c(0x21c)](_0xe00c25[_0x25e04c(0x1a9)]));}),_0x2d9025[_0x341c6d(0x22f)]&&_0x2d9025[_0x341c6d(0x22f)]['on'](_0xa16bf4['bjRwE'],_0x3dede6=>{const _0x5d2fb9=_0x341c6d;_0xa16bf4[_0x5d2fb9(0x1bd)](_0x1e69fa[_0x5d2fb9(0x2c3)],0x5000)&&(_0x1e69fa+=_0x3dede6['toString'](_0xa16bf4[_0x5d2fb9(0x283)]));}),_0x2d9025['on'](_0xa16bf4['qHQWr'],_0x51f78a=>{const _0x5e4aff=_0x341c6d;_0x1e69fa+='\x0aspawn\x20error:\x20'+_0x51f78a[_0x5e4aff(0x2bb)],_0xa16bf4[_0x5e4aff(0x22d)](_0x2ec8ad,null);}),_0x2d9025['on'](_0x341c6d(0x28e),_0x127c62=>_0x2ec8ad(_0x127c62));});}const H=[{'label':_0x507a08(0x2ea),'win':_0x507a08(0x2f6)},{'label':'~/.codex/config.toml','win':_0x507a08(0x25f)},{'label':_0x507a08(0x1ff),'win':_0x507a08(0x211)}];function U(_0x4706b3){try{return _0x42700e['readFileSync'](_0x4706b3,'utf8');}catch{return null;}}function D(_0x4cf619){const _0x4d7584=_0x507a08;try{return _0x42700e[_0x4d7584(0x26b)](_0x4cf619)[_0x4d7584(0x23b)]();}catch{return!0x1;}}function B(_0x2c948d){const _0x11afd1=_0x507a08;try{return new URL(_0x2c948d)[_0x11afd1(0x298)]||null;}catch{return null;}}const Y=[{'cli':_0x507a08(0x20f),'label':_0x507a08(0x2a7),'win':_0x507a08(0x2a9),'pattern':_0x507a08(0x2f8)},{'cli':_0x507a08(0x1c3),'label':'~/.opencode/log','win':_0x507a08(0x313),'pattern':'*'},{'cli':_0x507a08(0x309),'label':'~/.gemini/tmp','win':_0x507a08(0x25d),'pattern':'*/logs/*'},{'cli':_0x507a08(0x2de),'label':'~/.grok/log','win':_0x507a08(0x259),'pattern':'*'},{'cli':'claude','label':_0x507a08(0x21d),'win':'%userprofile%\x5c.claude\x5clogs','pattern':'**'}];function q(_0x3a355d){const _0x2fcea1=_0x507a08,_0x5f5732=_0x38a048=>_0x38a048['replace'](/[.*+?^${}()|[\]\\]/g,_0x2fcea1(0x2ae)),_0x4def00=_0x3a355d[_0x2fcea1(0x271)]('**')[_0x2fcea1(0x1b3)](_0x2caccc=>_0x2caccc[_0x2fcea1(0x271)]('*')[_0x2fcea1(0x1b3)](_0x5f5732)[_0x2fcea1(0x217)](_0x2fcea1(0x260)))[_0x2fcea1(0x217)]('.*');return new RegExp('^'+_0x4def00+'$');}function M(_0x376164,_0x1678ea='',_0x24a18b=0x0,_0x4e7cc6=[],_0x4f4626={'n':0x0}){const _0x3aa8e8=_0x507a08,_0x27eaba={'uJSdR':function(_0x213c81,_0x1e177c){return _0x213c81>_0x1e177c;},'kCvbo':function(_0x5372ee,_0x2dbff0){return _0x5372ee>=_0x2dbff0;},'FGcSC':function(_0x2c5694,_0x8eb5cd,_0x2fb96d,_0x350797,_0x13be54,_0x5d0160){return _0x2c5694(_0x8eb5cd,_0x2fb96d,_0x350797,_0x13be54,_0x5d0160);},'RdiDV':function(_0x45b70f,_0x2e5f75){return _0x45b70f+_0x2e5f75;}};if(_0x27eaba[_0x3aa8e8(0x1d5)](_0x24a18b,0x4)||_0x27eaba[_0x3aa8e8(0x2df)](_0x4f4626['n'],0x1f4))return _0x4e7cc6;let _0x226100;try{_0x226100=_0x42700e[_0x3aa8e8(0x2c9)](_0x5e7506[_0x3aa8e8(0x217)](_0x376164,_0x1678ea),{'withFileTypes':!0x0});}catch{return _0x4e7cc6;}for(const _0x9eceb of _0x226100){if(_0x27eaba[_0x3aa8e8(0x2df)](++_0x4f4626['n'],0x1f4))return _0x4e7cc6;const _0x483bd6=_0x1678ea?_0x1678ea+'/'+_0x9eceb[_0x3aa8e8(0x19f)]:_0x9eceb[_0x3aa8e8(0x19f)];_0x9eceb[_0x3aa8e8(0x23b)]()?_0x27eaba[_0x3aa8e8(0x2ee)](M,_0x376164,_0x483bd6,_0x27eaba['RdiDV'](_0x24a18b,0x1),_0x4e7cc6,_0x4f4626):_0x9eceb[_0x3aa8e8(0x29f)]()&&_0x4e7cc6[_0x3aa8e8(0x202)](_0x483bd6);}return _0x4e7cc6;}function Z(_0x1d01ff,_0x300904){const _0x5bcfd1=_0x507a08,_0x5aedfa={'VrVrN':function(_0x21e2b0,_0x4094ad){return _0x21e2b0-_0x4094ad;},'chooV':_0x5bcfd1(0x246)};let _0x6c06c;try{const _0x565215=_0x42700e[_0x5bcfd1(0x26b)](_0x1d01ff)[_0x5bcfd1(0x2b2)];_0x6c06c=_0x42700e[_0x5bcfd1(0x2b5)](_0x1d01ff,'r');const _0x58f337=Math['min'](_0x565215,_0x300904),_0x5928d3=Buffer[_0x5bcfd1(0x312)](_0x58f337);return _0x42700e['readSync'](_0x6c06c,_0x5928d3,0x0,_0x58f337,_0x5aedfa[_0x5bcfd1(0x1a3)](_0x565215,_0x58f337)),_0x5928d3[_0x5bcfd1(0x21c)](_0x5aedfa[_0x5bcfd1(0x1b0)]);}catch{return null;}finally{if(void 0x0!==_0x6c06c)try{_0x42700e[_0x5bcfd1(0x24a)](_0x6c06c);}catch{}}}function F(_0x1c5207){const _0x3f01d2=_0x507a08,_0x536ffd=_0x1c5207[_0x3f01d2(0x1df)](/~\/\.([^/]+)\/(.+)$/);return _0x536ffd?_0x536ffd[0x1]+'_'+_0x536ffd[0x2]:_0x1c5207[_0x3f01d2(0x218)](/[~\\/]/g,'_');}function J({summary:_0x71709c,modelCount:_0x402f2f}){const _0x46dac3=_0x507a08,_0x5aa0ea={'icZjZ':function(_0x55e623,_0x5531a1){return _0x55e623===_0x5531a1;},'WjAhn':_0x46dac3(0x241),'LyQVb':_0x46dac3(0x1b9),'KlhMq':_0x46dac3(0x1e5)};return _0x46dac3(0x1fb)+_0x71709c[_0x46dac3(0x2e2)]+_0x46dac3(0x2a8)+_0x71709c[_0x46dac3(0x1a5)]+_0x46dac3(0x2bc)+_0x71709c[_0x46dac3(0x21a)]+_0x46dac3(0x1e7)+_0x71709c['credential']['source']+_0x46dac3(0x30a)+_0x71709c['credential'][_0x46dac3(0x2e0)]+_0x46dac3(0x225)+(_0x5aa0ea['icZjZ'](_0x5aa0ea[_0x46dac3(0x2eb)],_0x71709c[_0x46dac3(0x1b6)])?_0x5aa0ea['LyQVb']:_0x5aa0ea[_0x46dac3(0x315)])+_0x46dac3(0x301)+_0x402f2f+_0x46dac3(0x1e3);}function X(_0xe624da){const _0xeb2548=_0x507a08,_0x3b0ba0={'KOPIV':function(_0x21602a,_0xf9008d){return _0x21602a>_0xf9008d;},'OsCfQ':function(_0x3beba4,_0x2c3d2e){return _0x3beba4+_0x2c3d2e;}};return _0x3b0ba0[_0xeb2548(0x1ac)](_0xe624da[_0xeb2548(0x2c3)],0x0)?_0x3b0ba0[_0xeb2548(0x244)](_0xe624da[_0xeb2548(0x217)]('\x0a'),'\x0a'):'';}function G(_0x5ae3ae,_0xf9d37c){const _0x11c912=_0x507a08;return _0x5e7506[_0x11c912(0x217)](_0xf9d37c||process[_0x11c912(0x2c4)](),_0x11c912(0x2c6)+_0x5ae3ae+_0x11c912(0x303));}export async function runDiagnose({apiBase:_0x37975d,opts:_0x441d30={},ui:_0x16ed9c={}}){const _0x4d5b1e=_0x507a08,_0x356151={'FBUyX':_0x4d5b1e(0x246),'rAwAA':function(_0x104ebb,_0x558e6a){return _0x104ebb(_0x558e6a);},'LQwxb':function(_0x42d530,_0x35937d,_0x2ef0d4){return _0x42d530(_0x35937d,_0x2ef0d4);},'QXGUr':function(_0x59bf4c){return _0x59bf4c();},'umTry':function(_0x36c09c,_0xf5f2a2){return _0x36c09c&_0xf5f2a2;},'wvDuY':_0x4d5b1e(0x22b),'Wsrog':'HTTPS_PROXY','VQdkB':_0x4d5b1e(0x2d2),'ejfGU':'NO_PROXY','kmhGl':_0x4d5b1e(0x278),'ZbPbo':_0x4d5b1e(0x214),'gMRJG':_0x4d5b1e(0x26a),'zUzJj':function(_0x2bd857,_0x23fc6d){return _0x2bd857(_0x23fc6d);},'qwukP':_0x4d5b1e(0x1d9),'szXWH':function(_0x219742,_0x18428b){return _0x219742(_0x18428b);},'UpnzJ':function(_0x2e8d48,_0x40481c){return _0x2e8d48==_0x40481c;},'Tqcyq':function(_0x53b11b,_0x2df8f8){return _0x53b11b(_0x2df8f8);},'FspBo':function(_0x42fb9e,_0x2ed0cd){return _0x42fb9e!==_0x2ed0cd;},'IWPtX':function(_0x2893ff,_0xa08ffa){return _0x2893ff>_0xa08ffa;},'MatYa':_0x4d5b1e(0x2d4),'PAUlT':function(_0x3fc008,_0x4cf029){return _0x3fc008==_0x4cf029;},'chDBv':'string','iUrFI':function(_0x92e63c,_0x44b491){return _0x92e63c>_0x44b491;},'jAmVM':function(_0x25bcb7,_0x1a677c){return _0x25bcb7(_0x1a677c);},'SItee':function(_0x5b6126,_0x39596e){return _0x5b6126<_0x39596e;},'rZgOm':function(_0xac174c,_0x219898){return _0xac174c+_0x219898;},'AjUvZ':function(_0x5d0bf8,_0x1034df){return _0x5d0bf8+_0x1034df;},'oWUaX':function(_0x241ba6,_0x293063){return _0x241ba6(_0x293063);},'hIHyW':function(_0x3e968f,_0x3f2e2a){return _0x3e968f(_0x3f2e2a);},'Beknh':function(_0x108fc9,_0x33ad5d){return _0x108fc9(_0x33ad5d);},'gVncg':function(_0x60ad27,_0x20a6b7,_0x3754ee){return _0x60ad27(_0x20a6b7,_0x3754ee);},'ePWiC':function(_0xb4f95,_0x19e52b){return _0xb4f95!=_0x19e52b;},'uyzTc':function(_0x4412de,_0x2bb56e){return _0x4412de(_0x2bb56e);},'MEhWp':function(_0x5119cb,_0x4abbf8){return _0x5119cb(_0x4abbf8);},'rkwIr':function(_0xf4962e,_0x23a979){return _0xf4962e(_0x23a979);},'ULLVZ':function(_0x1e44da,_0x4de7e2){return _0x1e44da(_0x4de7e2);},'KpnOH':function(_0x502873,_0x46dd5c){return _0x502873(_0x46dd5c);},'Cfmho':_0x4d5b1e(0x21b),'gGxnV':function(_0x3fa2eb,_0x257f3c){return _0x3fa2eb(_0x257f3c);},'RUNuf':_0x4d5b1e(0x1bb),'EQFgG':function(_0x355357,_0x270aec){return _0x355357(_0x270aec);},'Guldk':_0x4d5b1e(0x250),'PNvrj':_0x4d5b1e(0x1c0),'fPLqx':_0x4d5b1e(0x249),'vahdO':_0x4d5b1e(0x1ed),'DGDfj':function(_0x3b3faf,_0x5b4c8a){return _0x3b3faf(_0x5b4c8a);},'iIVaF':_0x4d5b1e(0x241),'qhJVe':function(_0x2f7e42,_0x2cfe44){return _0x2f7e42/_0x2cfe44;},'sLsyD':_0x4d5b1e(0x1c6),'KTGYV':',并运行已装\x20CLI\x20实测','ntRkL':_0x4d5b1e(0x2aa),'hjIYA':_0x4d5b1e(0x2a5),'KrpjO':function(_0x1f9c3e,_0x114926){return _0x1f9c3e===_0x114926;},'ErVtr':'slow','jJeQl':function(_0x5b5ac3,_0x1a0ed4){return _0x5b5ac3===_0x1a0ed4;},'PwUFO':_0x4d5b1e(0x2e3),'YgXRG':function(_0x2f501d,_0x125bf0){return _0x2f501d===_0x125bf0;},'jkbvf':_0x4d5b1e(0x1ab),'GPQbj':function(_0x46cd8e,_0x37eadf){return _0x46cd8e>_0x37eadf;},'WtMds':_0x4d5b1e(0x2db),'levEk':function(_0xfc9c55,_0x393fe8){return _0xfc9c55(_0x393fe8);},'znvTw':function(_0x19812e,_0x440f74){return _0x19812e(_0x440f74);},'AhxPQ':function(_0x5e2c51,_0x9afbcc){return _0x5e2c51(_0x9afbcc);},'JrupQ':function(_0x16bad5,_0x1fe87d){return _0x16bad5-_0x1fe87d;},'pMAgo':function(_0x855f60,_0x57bf46){return _0x855f60-_0x57bf46;}},_0x19ebca={..._0x3d9da3,..._0x16ed9c},_0xf4a1c4={'yes':!0x1,'models':void 0x0,'skipCliTests':!0x1,'outDir':void 0x0,..._0x441d30};_0x19ebca['step'](_0x356151[_0x4d5b1e(0x30f)]);let _0xaabf6b=function(_0x5187be){const _0xf9891e=_0x4d5b1e;for(const _0xd82a55 of h){const _0x6587ab=P(_0xd82a55);let _0x19973c;try{_0x19973c=_0x42700e[_0xf9891e(0x299)](_0x6587ab,_0x356151[_0xf9891e(0x229)]);}catch{continue;}const _0x38681b=_0x356151['rAwAA'](C,_0x19973c);if(_0x38681b)return{'key':_0x38681b,'baseUrl':_0x356151[_0xf9891e(0x285)](E,_0x19973c,_0x5187be),'source':_0xd82a55[_0xf9891e(0x2e6)]};}return null;}(_0x37975d);if(_0xaabf6b)_0x19ebca['ok'](_0x4d5b1e(0x258)+_0xaabf6b['source']+'('+_0x356151[_0x4d5b1e(0x30d)](S,_0xaabf6b['key'])+_0x4d5b1e(0x28c)+_0xaabf6b['baseUrl']+')');else{_0x19ebca[_0x4d5b1e(0x214)](_0x356151[_0x4d5b1e(0x1c1)]);const _0x3de88b=(await _0x356151[_0x4d5b1e(0x25b)](_0x4e61e8,_0x356151[_0x4d5b1e(0x207)]))[_0x4d5b1e(0x2b3)]();if(!_0x3de88b)throw new Error(_0x356151['PNvrj']);_0xaabf6b={'key':_0x3de88b,'baseUrl':_0x37975d,'source':_0x356151[_0x4d5b1e(0x293)]},_0x19ebca['ok'](_0x4d5b1e(0x224)+_0x356151[_0x4d5b1e(0x1f6)](S,_0x3de88b)+_0x4d5b1e(0x28c)+_0xaabf6b['baseUrl']+')');}_0x19ebca[_0x4d5b1e(0x286)]('环境快照');const _0x3d04d5=(function(){const _0x41ac28=_0x4d5b1e,_0x1bee88=_0x356151[_0x41ac28(0x266)](_0x2a4781),_0xde0bd9={};for(const _0x5e690b of h){const _0x40176b=P(_0x5e690b),_0x3b953d={'path':_0x40176b,'exists':!0x1};try{const _0x315126=_0x42700e['statSync'](_0x40176b);_0x3b953d[_0x41ac28(0x2fc)]=!0x0,_0x3b953d[_0x41ac28(0x2b2)]=_0x315126[_0x41ac28(0x2b2)],_0x3b953d[_0x41ac28(0x28a)]=_0x315126[_0x41ac28(0x28a)][_0x41ac28(0x19d)](),_0x3b953d['mode']='0'+_0x356151[_0x41ac28(0x25a)](0x1ff,_0x315126[_0x41ac28(0x220)])[_0x41ac28(0x21c)](0x8);}catch{}_0xde0bd9[_0x5e690b[_0x41ac28(0x2e6)]]=_0x3b953d;}const _0x8b9697={};for(const _0x51fcca of[_0x356151[_0x41ac28(0x27d)],_0x356151[_0x41ac28(0x2e7)],_0x356151[_0x41ac28(0x21f)],_0x356151['ejfGU']]){const _0xec074d=process['env'][_0x51fcca]??process[_0x41ac28(0x1b7)][_0x51fcca[_0x41ac28(0x308)]()]??null;_0x8b9697[_0x51fcca]=j(_0xec074d);}return{'os':_0x1bee88['os'],'node':_0x1bee88[_0x41ac28(0x23d)],'installed_clis':_0x1bee88['installed'],'config_files':_0xde0bd9,'proxy_env':_0x8b9697};}());_0x19ebca['info'](_0x4d5b1e(0x28b)+_0x3d04d5['os']['platform']+_0x4d5b1e(0x2be)+_0x3d04d5[_0x4d5b1e(0x23d)][_0x4d5b1e(0x237)]+_0x4d5b1e(0x273)+Object[_0x4d5b1e(0x1c9)](_0x3d04d5[_0x4d5b1e(0x2ac)])[_0x4d5b1e(0x2c3)]+'\x20个');const _0x30a3e2=function(_0x18ea05){const _0x420f6c=_0x4d5b1e,_0x2187c3=[],_0xf4f34b=_0x356151[_0x420f6c(0x274)](U,P(H[0x1]));null==_0xf4f34b||/^\s*model_context_window\s*=/m[_0x420f6c(0x2cf)](_0xf4f34b)||_0x2187c3[_0x420f6c(0x202)]({'code':_0x356151[_0x420f6c(0x2b4)],'level':_0x356151['ZbPbo'],'message':_0x356151[_0x420f6c(0x232)]});const _0x13d147=[];_0x356151[_0x420f6c(0x274)](D,_0x356151[_0x420f6c(0x199)](P,{'label':_0x356151[_0x420f6c(0x23f)],'win':'%userprofile%\x5c.cc-switch'}))&&_0x13d147[_0x420f6c(0x202)](_0x420f6c(0x22c));const _0x1b1db4=_0x356151['szXWH'](B,_0x18ea05);for(const _0x4f496c of H){const _0x30ab98=U(_0x356151[_0x420f6c(0x274)](P,_0x4f496c));if(_0x356151[_0x420f6c(0x209)](null,_0x30ab98))continue;const _0x3b0a69=_0x356151['Tqcyq'](B,_0x356151[_0x420f6c(0x285)](E,_0x30ab98,''));_0x3b0a69&&_0x1b1db4&&_0x356151['FspBo'](_0x3b0a69,_0x1b1db4)&&_0x13d147[_0x420f6c(0x202)](_0x4f496c[_0x420f6c(0x2e6)]+_0x420f6c(0x221)+_0x3b0a69);}return _0x356151[_0x420f6c(0x265)](_0x13d147['length'],0x0)&&_0x2187c3[_0x420f6c(0x202)]({'code':_0x356151['MatYa'],'level':_0x420f6c(0x214),'message':_0x420f6c(0x1ba)+_0x13d147['join'](';')+_0x420f6c(0x2b9)}),_0x2187c3;}(_0x37975d);if(_0x30a3e2[_0x4d5b1e(0x2c3)]>0x0){for(const _0xd6d157 of _0x30a3e2)_0x19ebca[_0x4d5b1e(0x214)](_0x4d5b1e(0x21e)+_0xd6d157[_0x4d5b1e(0x2bb)]);}else _0x19ebca['ok'](_0x356151[_0x4d5b1e(0x288)]);_0x19ebca[_0x4d5b1e(0x286)](_0x4d5b1e(0x1e4));const _0x5a244b=await _0x356151['DGDfj'](K,_0x37975d);_0x356151[_0x4d5b1e(0x275)]===_0x5a244b['source']?_0x19ebca['ok'](_0x4d5b1e(0x2f2)+_0x5a244b[_0x4d5b1e(0x25c)][_0x4d5b1e(0x2c3)]+_0x4d5b1e(0x1da)+_0x356151[_0x4d5b1e(0x290)](_0x5a244b[_0x4d5b1e(0x1e0)],0x3e8)+_0x4d5b1e(0x1db)+_0x5a244b['concurrency']):_0x19ebca[_0x4d5b1e(0x214)](_0x356151[_0x4d5b1e(0x2dc)]);const _0x2de7f5=function(_0x5a1d52,_0x51648f){const _0x354564=_0x4d5b1e;let _0x1df7e0=_0x5a1d52;return _0x356151[_0x354564(0x1e1)](_0x356151[_0x354564(0x2ba)],typeof _0x1df7e0)&&(_0x1df7e0=_0x1df7e0[_0x354564(0x271)](',')),Array[_0x354564(0x311)](_0x1df7e0)&&(_0x1df7e0=_0x1df7e0[_0x354564(0x1b3)](_0x19a5da=>String(_0x19a5da)[_0x354564(0x2b3)]())[_0x354564(0x1f5)](Boolean),_0x356151[_0x354564(0x1e9)](_0x1df7e0['length'],0x0))?[...new Set(_0x1df7e0)]:_0x51648f;}(_0xf4a1c4[_0x4d5b1e(0x25c)],_0x5a244b[_0x4d5b1e(0x25c)]);if(!_0xf4a1c4[_0x4d5b1e(0x242)]){if(!await _0x5a59fd(_0x4d5b1e(0x287)+_0xaabf6b[_0x4d5b1e(0x272)]+_0x4d5b1e(0x2b8)+_0x2de7f5[_0x4d5b1e(0x2c3)]+_0x4d5b1e(0x200)+_0x5a244b[_0x4d5b1e(0x20e)]+',正常计费)'+(_0xf4a1c4[_0x4d5b1e(0x1be)]?'':_0x356151[_0x4d5b1e(0x19e)])+'。继续?'))throw new Error(_0x356151[_0x4d5b1e(0x268)]);}_0x19ebca[_0x4d5b1e(0x286)]('HTTP\x20直测('+_0x2de7f5[_0x4d5b1e(0x2c3)]+_0x4d5b1e(0x245)+_0x5a244b[_0x4d5b1e(0x1dc)]+')');const _0x19cd40=await async function({cred:_0x19dbbb,models:_0x5a3e63,cfg:_0x2b4656,deviceId:_0x39ae5f}){const _0xff9975=_0x4d5b1e,_0x8acd1c={'SzvZR':function(_0x508e0a,_0x3f26d9){const _0x31b5c4=_0x5eee;return _0x356151[_0x31b5c4(0x1fd)](_0x508e0a,_0x3f26d9);},'KfpPU':function(_0xcf0279,_0x286c3b){return _0x356151['jAmVM'](_0xcf0279,_0x286c3b);}},_0x53f75f=Math['max'](0x1,_0x2b4656[_0xff9975(0x1dc)]),_0x52900c=[];for(let _0x1575f5=0x0;_0x356151[_0xff9975(0x2a6)](_0x1575f5,_0x5a3e63[_0xff9975(0x2c3)]);_0x1575f5+=_0x53f75f){const _0xf9f914=_0x5a3e63[_0xff9975(0x23c)](_0x1575f5,_0x356151[_0xff9975(0x1b1)](_0x1575f5,_0x53f75f)),_0x5e534e=await Promise[_0xff9975(0x1aa)](_0xf9f914['map'](async _0x5db0f3=>{const _0x8ef982=_0xff9975,_0x6f9222=await _0x8acd1c['SzvZR'](L,{'baseUrl':_0x19dbbb[_0x8ef982(0x272)],'apiKey':_0x19dbbb[_0x8ef982(0x1a8)],'model':_0x5db0f3,'maxTokens':_0x2b4656[_0x8ef982(0x20e)],'timeoutMs':_0x2b4656['timeout_ms'],'deviceId':_0x39ae5f});return{'model':_0x5db0f3,..._0x6f9222,'code':_0x8acd1c[_0x8ef982(0x261)](z,_0x6f9222)};}));_0x52900c['push'](..._0x5e534e);}return _0x52900c;}({'cred':_0xaabf6b,'models':_0x2de7f5,'cfg':_0x5a244b,'deviceId':_0x356151[_0x4d5b1e(0x266)](_0xef012)});for(const _0x39e78a of _0x19cd40){const _0x511728=_0x39e78a['model']+'\x20—\x20HTTP\x20'+(_0x39e78a[_0x4d5b1e(0x1f9)]??_0x356151['hjIYA'])+_0x4d5b1e(0x212)+(_0x39e78a[_0x4d5b1e(0x1d7)]??'-')+'ms\x20/\x20'+_0x5a244b[_0x4d5b1e(0x26d)][_0x39e78a[_0x4d5b1e(0x304)]];_0x356151['KrpjO']('ok',_0x39e78a[_0x4d5b1e(0x304)])?_0x19ebca['ok'](_0x511728):_0x356151[_0x4d5b1e(0x1f4)]===_0x39e78a[_0x4d5b1e(0x304)]?_0x19ebca[_0x4d5b1e(0x214)](_0x511728):_0x19ebca[_0x4d5b1e(0x2fe)](_0x511728);}const _0x4c044b=[];if(_0xf4a1c4[_0x4d5b1e(0x1be)])_0x19ebca[_0x4d5b1e(0x240)](_0x4d5b1e(0x2c7));else{const _0x488bd7=$[_0x4d5b1e(0x1f5)](_0x1c5786=>_0x3d04d5['installed_clis'][_0x1c5786]);if(_0x356151[_0x4d5b1e(0x26e)](0x0,_0x488bd7[_0x4d5b1e(0x2c3)]))_0x19ebca[_0x4d5b1e(0x214)](_0x356151[_0x4d5b1e(0x1a6)]);else{_0x19ebca[_0x4d5b1e(0x286)]('CLI\x20实测('+_0x488bd7[_0x4d5b1e(0x2c3)]+_0x4d5b1e(0x196));for(const _0x428c74 of _0x488bd7){_0x19ebca[_0x4d5b1e(0x240)]('运行\x20'+_0x428c74+'\x20'+y[_0x428c74][_0x4d5b1e(0x217)]('\x20')+'\x20…');const _0x30f8db=await _0x356151[_0x4d5b1e(0x285)](R,_0x428c74,y[_0x428c74]);_0x4c044b[_0x4d5b1e(0x202)](_0x30f8db),_0x30f8db[_0x4d5b1e(0x231)]?_0x19ebca[_0x4d5b1e(0x214)](_0x428c74+_0x4d5b1e(0x277)):_0x356151[_0x4d5b1e(0x2e8)](0x0,_0x30f8db[_0x4d5b1e(0x239)])?_0x19ebca['ok'](_0x428c74+'\x20退出码\x200\x20/\x20'+_0x30f8db['duration_ms']+'ms'):_0x19ebca[_0x4d5b1e(0x2fe)](_0x428c74+_0x4d5b1e(0x2d6)+(_0x30f8db['exit_code']??'ERR')+_0x4d5b1e(0x197)+_0x30f8db[_0x4d5b1e(0x2ff)]+'ms');}}}_0x19ebca[_0x4d5b1e(0x286)](_0x356151[_0x4d5b1e(0x29a)]);const _0x2b08d2=(function(){const _0x4867ae=_0x4d5b1e,_0x5991f7=new Date(),_0x368b4f=_0x552564=>String(_0x552564)['padStart'](0x2,'0');return''+_0x5991f7[_0x4867ae(0x24b)]()+_0x368b4f(_0x356151[_0x4867ae(0x1a1)](_0x5991f7['getMonth'](),0x1))+_0x368b4f(_0x5991f7[_0x4867ae(0x2ad)]())+'T'+_0x356151[_0x4867ae(0x1f6)](_0x368b4f,_0x5991f7[_0x4867ae(0x1eb)]())+_0x368b4f(_0x5991f7[_0x4867ae(0x1d0)]())+_0x368b4f(_0x5991f7[_0x4867ae(0x1d1)]());}()),_0x172538=(function(){const _0x5076fb=_0x4d5b1e,_0x5ea94e=[];for(const _0x5db2bd of Y){const _0x19e3ef=P(_0x5db2bd);if(!_0x356151[_0x5076fb(0x1d8)](D,_0x19e3ef))continue;const _0x51cabe=q(_0x5db2bd['pattern']),_0x2feddc=_0x356151[_0x5076fb(0x1ca)](M,_0x19e3ef)['filter'](_0x47a755=>_0x51cabe[_0x5076fb(0x2cf)](_0x47a755))[_0x5076fb(0x1b3)](_0x1b0bf8=>{const _0x879ca4=_0x5076fb,_0x54e210=_0x5e7506['join'](_0x19e3ef,_0x1b0bf8);let _0x2b5657=0x0;try{_0x2b5657=_0x42700e[_0x879ca4(0x26b)](_0x54e210)[_0x879ca4(0x28f)];}catch{return null;}return{'rel':_0x1b0bf8,'full':_0x54e210,'mtimeMs':_0x2b5657};})['filter'](Boolean)[_0x5076fb(0x22e)]((_0x3fbd90,_0x3ff83e)=>_0x3ff83e[_0x5076fb(0x28f)]-_0x3fbd90[_0x5076fb(0x28f)]);for(const _0x1e1fca of _0x2feddc[_0x5076fb(0x23c)](0x0,0x3)){const _0x1dcd93=_0x356151[_0x5076fb(0x2ce)](Z,_0x1e1fca['full'],0x10000);_0x356151['ePWiC'](null,_0x1dcd93)&&_0x5ea94e[_0x5076fb(0x202)]({'cli':_0x5db2bd[_0x5076fb(0x1b4)],'file':_0x1e1fca[_0x5076fb(0x254)],'name':_0x5db2bd[_0x5076fb(0x1b4)]+'/'+_0x1e1fca[_0x5076fb(0x254)],'content':_0x356151[_0x5076fb(0x2c0)](redact,_0x1dcd93),'size':_0x1dcd93[_0x5076fb(0x2c3)]});}}return _0x5ea94e;}());_0x19ebca['info'](_0x356151['GPQbj'](_0x172538[_0x4d5b1e(0x2c3)],0x0)?_0x4d5b1e(0x230)+_0x172538[_0x4d5b1e(0x2c3)]+_0x4d5b1e(0x236):_0x356151['WtMds']);const _0x453e6f=_0x19cd40[_0x4d5b1e(0x1b3)](_0x2ffaef=>JSON[_0x4d5b1e(0x306)]({'model':_0x2ffaef[_0x4d5b1e(0x1e8)],'request_id':_0x2ffaef[_0x4d5b1e(0x1b8)]??null,'status':_0x2ffaef[_0x4d5b1e(0x1f9)]??null,'ttfb_ms':_0x2ffaef['ttfb_ms']??null,'total_ms':_0x2ffaef[_0x4d5b1e(0x208)]??null,'error':_0x2ffaef[_0x4d5b1e(0x24f)]?redact(_0x2ffaef[_0x4d5b1e(0x24f)]):null,'response_preview':_0x2ffaef['response_preview']?redact(_0x2ffaef['response_preview']):''})),_0x5596dc=_0x4c044b['map'](_0x2c010b=>JSON[_0x4d5b1e(0x306)](_0x2c010b)),_0x493af=[];for(const _0x1f9f3e of h){let _0x5d5067;try{_0x5d5067=_0x42700e[_0x4d5b1e(0x299)](_0x356151[_0x4d5b1e(0x203)](P,_0x1f9f3e),_0x4d5b1e(0x246));}catch{continue;}_0x493af[_0x4d5b1e(0x202)]({'name':_0x356151[_0x4d5b1e(0x2e5)](F,_0x1f9f3e[_0x4d5b1e(0x2e6)])+_0x4d5b1e(0x2b6),'content':O(_0x5d5067)});}const _0x1e8e7c={'tool_version':_,'generated_at':new Date()[_0x4d5b1e(0x19d)](),'api_base':_0x37975d,'credential':{'source':_0xaabf6b[_0x4d5b1e(0x257)],'key_redacted':_0x356151['AhxPQ'](S,_0xaabf6b['key'])},'config_source':_0x5a244b[_0x4d5b1e(0x257)],'http_tests':_0x19cd40[_0x4d5b1e(0x1b3)](_0x1d4c5f=>({'model':_0x1d4c5f[_0x4d5b1e(0x1e8)],'status':_0x1d4c5f[_0x4d5b1e(0x1f9)]??null,'verdict':_0x5a244b[_0x4d5b1e(0x26d)][_0x1d4c5f[_0x4d5b1e(0x304)]],'ttfb_ms':_0x1d4c5f[_0x4d5b1e(0x1d7)]??null,'total_ms':_0x1d4c5f['total_ms']??null,'request_id':_0x1d4c5f[_0x4d5b1e(0x1b8)]??null})),'cli_tests':_0x4c044b[_0x4d5b1e(0x1b3)](_0x55542b=>({'cli':_0x55542b[_0x4d5b1e(0x1b4)],'exit_code':_0x55542b[_0x4d5b1e(0x239)],'verdict':0x0!==_0x55542b[_0x4d5b1e(0x239)]||_0x55542b[_0x4d5b1e(0x231)]?_0x4d5b1e(0x2fe):'ok'})),'findings':_0x30a3e2,'log_files':_0x172538[_0x4d5b1e(0x1b3)](_0x4737f9=>({'cli':_0x4737f9[_0x4d5b1e(0x1b4)],'file':_0x4737f9[_0x4d5b1e(0x305)],'size':_0x4737f9[_0x4d5b1e(0x2b2)]})),'zip_path':''},_0x40adaf={'generated_at':_0x1e8e7c[_0x4d5b1e(0x2e2)],'tool_version':_,..._0x3d04d5},_0x20086d=function({stamp:_0x34ceea,summary:_0x3775d7,envJson:_0x79949e,httpLines:_0x224f34,cliLines:_0x43b239,configCopies:_0x204b3b,logTails:_0x555c37,outDir:_0x49d62d}){const _0x766536=_0x4d5b1e,_0x57da6c=_0x766536(0x2c6)+_0x34ceea,_0x2af3d4=_0x57da6c+_0x766536(0x303),_0x586270={[_0x57da6c+_0x766536(0x276)]:_0x356151[_0x766536(0x263)](_0x2075d8,JSON['stringify'](_0x3775d7,null,0x2)),[_0x57da6c+_0x766536(0x20c)]:_0x2075d8(JSON[_0x766536(0x306)](_0x79949e,null,0x2)),[_0x57da6c+_0x766536(0x1fc)]:_0x356151[_0x766536(0x1f7)](_0x2075d8,_0x356151[_0x766536(0x263)](X,_0x224f34)),[_0x57da6c+'/cli-tests.jsonl']:_0x356151[_0x766536(0x2d3)](_0x2075d8,_0x356151[_0x766536(0x29c)](X,_0x43b239)),[_0x57da6c+_0x766536(0x2d1)]:_0x2075d8(J({'summary':_0x3775d7,'modelCount':_0x3775d7[_0x766536(0x1a2)]['length']}))};for(const _0x46a80 of _0x204b3b)_0x586270[_0x57da6c+_0x766536(0x251)+_0x46a80[_0x766536(0x19f)]]=_0x356151[_0x766536(0x1f7)](_0x2075d8,_0x46a80[_0x766536(0x267)]);for(const _0x275c5a of _0x555c37)_0x586270[_0x57da6c+_0x766536(0x262)+_0x275c5a['name']]=_0x2075d8(_0x275c5a[_0x766536(0x267)]);const _0x1ad035=_0x49d62d||process[_0x766536(0x2c4)](),_0xd6cd5a=_0x5e7506[_0x766536(0x217)](_0x1ad035,_0x2af3d4);try{_0x42700e[_0x766536(0x2ec)](_0x1ad035,{'recursive':!0x0}),_0x42700e[_0x766536(0x1f3)](_0xd6cd5a,Buffer[_0x766536(0x252)](_0x356151[_0x766536(0x274)](_0x29af47,_0x586270)));}catch(_0xe9b9d7){throw new Error(_0x766536(0x2f4)+_0xd6cd5a+'):'+_0xe9b9d7[_0x766536(0x2bb)]);}return _0xd6cd5a;}({'stamp':_0x2b08d2,'summary':{..._0x1e8e7c,'zip_path':G(_0x2b08d2,_0xf4a1c4[_0x4d5b1e(0x227)])},'envJson':_0x40adaf,'httpLines':_0x453e6f,'cliLines':_0x5596dc,'configCopies':_0x493af,'logTails':_0x172538,'outDir':_0xf4a1c4[_0x4d5b1e(0x227)]});_0x1e8e7c[_0x4d5b1e(0x2c1)]=_0x20086d;const _0x49aae0=_0x19cd40[_0x4d5b1e(0x1f5)](_0x4c6d5d=>'ok'===_0x4c6d5d[_0x4d5b1e(0x304)])['length'],_0x533f07=_0x19cd40[_0x4d5b1e(0x1f5)](_0x20c219=>'fail'===_0x20c219[_0x4d5b1e(0x304)])[_0x4d5b1e(0x2c3)];return _0x19ebca['ok'](_0x4d5b1e(0x2fd)+_0x20086d),_0x19ebca[_0x4d5b1e(0x240)]('HTTP\x20直测\x20'+_0x19cd40[_0x4d5b1e(0x2c3)]+_0x4d5b1e(0x24d)+_0x49aae0+_0x4d5b1e(0x1f8)+_0x356151[_0x4d5b1e(0x1d6)](_0x356151['pMAgo'](_0x19cd40[_0x4d5b1e(0x2c3)],_0x49aae0),_0x533f07)+_0x4d5b1e(0x1de)+_0x533f07+_0x4d5b1e(0x1ec)+_0x4c044b[_0x4d5b1e(0x2c3)]+_0x4d5b1e(0x280)),{'zipPath':_0x20086d,'summary':_0x1e8e7c};}
|
package/dist/lib/install.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x467504,_0x1c7104){const _0x580233=_0x3f64,_0x4541bd=_0x467504();while(!![]){try{const _0x390cd7=parseInt(_0x580233(0x18a))/0x1+parseInt(_0x580233(0x16b))/0x2*(parseInt(_0x580233(0x162))/0x3)+parseInt(_0x580233(0x16e))/0x4+-parseInt(_0x580233(0x183))/0x5+-parseInt(_0x580233(0x16f))/0x6*(parseInt(_0x580233(0x185))/0x7)+-parseInt(_0x580233(0x17b))/0x8+parseInt(_0x580233(0x182))/0x9;if(_0x390cd7===_0x1c7104)break;else _0x4541bd['push'](_0x4541bd['shift']());}catch(_0x81b6c2){_0x4541bd['push'](_0x4541bd['shift']());}}}(_0x3fab,0x5d76f));import{spawnSync as _0x103000}from'node:child_process';import{detectInstalled as _0x381775}from'./detect.mjs';import{confirm as _0x50f9b2}from'./prompt.mjs';export function installCLI(_0x34656e,_0x424581={}){const _0x1c9018=_0x3f64,_0x518f74={'uvZhg':function(_0x2a847d,_0x37fbfb){return _0x2a847d===_0x37fbfb;},'MoAfh':_0x1c9018(0x17e),'bVRAn':'npm','pDnzE':function(_0x723e41,_0x1ba866,_0x905a3,_0x35b498){return _0x723e41(_0x1ba866,_0x905a3,_0x35b498);},'IWYID':'install','bWbar':function(_0x10f5c3,_0x87e549){return _0x10f5c3===_0x87e549;}};if(!_0x34656e||!_0x34656e['installPackage'])return{'ok':!0x1,'skipped':!0x0,'reason':_0x1c9018(0x17f)};const _0x51875c=_0x34656e['installPackage'],_0x439ffd=_0x1c9018(0x187)+_0x51875c;if(_0x424581[_0x1c9018(0x178)])return console[_0x1c9018(0x180)]('\x20\x20[试运行]\x20将运行:'+_0x439ffd+_0x1c9018(0x174)),{'ok':!0x0,'skipped':!0x0,'reason':_0x1c9018(0x177)};console[_0x1c9018(0x180)]('\x20\x20正在执行:'+_0x439ffd+'…');try{const _0x3e7dee=_0x518f74['uvZhg'](_0x518f74[_0x1c9018(0x184)],process['platform']),_0x15a0d4=_0x3e7dee?process[_0x1c9018(0x16c)][_0x1c9018(0x167)]||_0x1c9018(0x18c):_0x518f74[_0x1c9018(0x163)],_0x400565=_0x518f74[_0x1c9018(0x175)](_0x103000,_0x15a0d4,_0x3e7dee?['/c','npm',_0x518f74['IWYID'],'-g',_0x51875c]:[_0x518f74['IWYID'],'-g',_0x51875c],{'stdio':_0x1c9018(0x171)});return _0x400565[_0x1c9018(0x179)]?{'ok':!0x1,'error':_0x400565[_0x1c9018(0x179)]['message']}:_0x518f74[_0x1c9018(0x169)](0x0,_0x400565[_0x1c9018(0x170)])?{'ok':!0x0}:{'ok':!0x1,'error':_0x1c9018(0x18e)+_0x400565[_0x1c9018(0x170)]};}catch(_0x333b60){return{'ok':!0x1,'error':_0x333b60[_0x1c9018(0x173)]};}}function _0x3f64(_0x290523,_0x10f44a){_0x290523=_0x290523-0x162;const _0x3fab27=_0x3fab();let _0x3f6411=_0x3fab27[_0x290523];return _0x3f6411;}export async function ensureInstalled(_0x5d9311,_0x46f25b={}){const _0x927bd=_0x3f64,_0x42c94a={'vhdsD':_0x927bd(0x188),'laLWa':function(_0x127f1a,_0x375004){return _0x127f1a(_0x375004);},'xXmzd':function(_0x572811,_0x306eed,_0xa2ec5d){return _0x572811(_0x306eed,_0xa2ec5d);},'zHbAs':'dry-run','lJgDI':_0x927bd(0x16a),'jbiPC':function(_0x3599ac,_0x1db541){return _0x3599ac(_0x1db541);}};if(!_0x5d9311||!_0x5d9311[_0x927bd(0x186)])return{'installed':!0x1,'skipped':!0x0,'reason':_0x42c94a[_0x927bd(0x168)]};const _0x5d9f72=_0x5d9311[_0x927bd(0x18b)]||_0x5d9311['installPackage'][_0x927bd(0x172)]('/')[_0x927bd(0x181)](),_0x1566db=_0x42c94a[_0x927bd(0x16d)](_0x381775,_0x5d9f72);if(_0x1566db[_0x927bd(0x164)])return{'installed':!0x0,'version':_0x1566db[_0x927bd(0x17a)]};const {dryRun:_0x1e1872,autoInstall:_0x517d36}=_0x46f25b;if(_0x1e1872)return{'installed':!0x1,'skipped':!0x0,'reason':_0x42c94a['xXmzd'](installCLI,_0x5d9311,{'dryRun':!0x0})[_0x927bd(0x176)]||_0x42c94a['zHbAs']};let _0xb7c3e8=!0x0===_0x517d36;if(_0xb7c3e8||(_0xb7c3e8=await _0x42c94a['xXmzd'](_0x50f9b2,_0x927bd(0x166)+(_0x5d9311[_0x927bd(0x17d)]||_0x5d9f72)+_0x927bd(0x17c)+_0x5d9f72+_0x927bd(0x18d)+(_0x5d9311[_0x927bd(0x18f)]||_0x927bd(0x187)+_0x5d9311['installPackage']),{'defaultValue':!0x0})),!_0xb7c3e8)return{'installed':!0x1,'skipped':!0x0,'reason':_0x42c94a[_0x927bd(0x165)]};const _0x4d9e62=installCLI(_0x5d9311,{'dryRun':!0x1});if(_0x4d9e62['ok']){const _0x389ebe=_0x42c94a[_0x927bd(0x189)](_0x381775,_0x5d9f72);return{'installed':_0x389ebe[_0x927bd(0x164)],'version':_0x389ebe[_0x927bd(0x17a)],'justInstalled':!0x0};}return{'installed':!0x1,'error':_0x4d9e62['error']};}function _0x3fab(){const _0x4f505f=['2xTXQhp','env','laLWa','2038232coGCtX','36ucjlRK','status','inherit','split','message','(不真实安装)','pDnzE','reason','dry-run','dryRun','error','version','5347248TcHiCE','(命令\x20','name','win32','no-install-package','log','pop','10815678gvLKRq','3730680VjxvJp','MoAfh','833126HJQaaM','installPackage','npm\x20install\x20-g\x20','no-meta','jbiPC','210395uiWEPo','detectBin','cmd.exe','),是否现在安装?\x0a\x20\x20运行:','npm\x20exit\x20','installCmd','1769358fGJUWl','bVRAn','installed','lJgDI','未检测到\x20','COMSPEC','vhdsD','bWbar','user-declined'];_0x3fab=function(){return _0x4f505f;};return _0x3fab();}
|
package/dist/lib/platforms.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0xb29436=_0x1ecf;(function(_0xcb35f1,_0x11dff3){const _0x135357=_0x1ecf,_0x253c2d=_0xcb35f1();while(!![]){try{const _0x5032fc=-parseInt(_0x135357(0x112))/0x1*(-parseInt(_0x135357(0x128))/0x2)+-parseInt(_0x135357(0x130))/0x3+parseInt(_0x135357(0x135))/0x4*(-parseInt(_0x135357(0x138))/0x5)+parseInt(_0x135357(0x11a))/0x6+parseInt(_0x135357(0x123))/0x7+parseInt(_0x135357(0x121))/0x8+parseInt(_0x135357(0x10b))/0x9*(-parseInt(_0x135357(0x120))/0xa);if(_0x5032fc===_0x11dff3)break;else _0x253c2d['push'](_0x253c2d['shift']());}catch(_0x5bf164){_0x253c2d['push'](_0x253c2d['shift']());}}}(_0x48d2,0x72dfa));export const CLI_META={'codex':{'name':_0xb29436(0x13a),'installPackage':_0xb29436(0x127),'installCmd':_0xb29436(0x13b),'startCmd':_0xb29436(0x115),'detectBin':_0xb29436(0x115),'configFiles':[_0xb29436(0x129),_0xb29436(0x136)],'usage':[_0xb29436(0x117),'\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内自动批准,推荐)',_0xb29436(0x11e),_0xb29436(0x137),_0xb29436(0x113),_0xb29436(0x10e)][_0xb29436(0x12c)]('\x0a'),'isPrimary':!0x0},'codex-ws':{'name':_0xb29436(0x125),'installPackage':_0xb29436(0x127),'installCmd':'npm\x20install\x20-g\x20@openai/codex','startCmd':'codex','detectBin':'codex','configFiles':[_0xb29436(0x129),_0xb29436(0x136)],'usage':[_0xb29436(0x10d),_0xb29436(0x111),'\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,仅信任仓库)',_0xb29436(0x137),_0xb29436(0x113)][_0xb29436(0x12c)]('\x0a'),'isPrimary':!0x1},'claude':{'name':'Claude\x20Code','installPackage':'@anthropic-ai/claude-code','installCmd':_0xb29436(0x139),'startCmd':_0xb29436(0x11b),'detectBin':'claude','configFiles':['~/.claude/',_0xb29436(0x10a)],'usage':[_0xb29436(0x122),_0xb29436(0x132),_0xb29436(0x116),_0xb29436(0x12f),_0xb29436(0x12a),_0xb29436(0x134),_0xb29436(0x114),_0xb29436(0x13d),_0xb29436(0x13c),_0xb29436(0x12d),_0xb29436(0x10c),'\x20\x20claude\x20--dangerously-skip-permissions\x20\x20\x20\x20\x20\x20\x20\x20跳过所有权限提示(=bypassPermissions,谨慎用)',_0xb29436(0x10f)][_0xb29436(0x12c)]('\x0a'),'isPrimary':!0x0},'gemini-cli':{'name':_0xb29436(0x119),'installPackage':_0xb29436(0x110),'installCmd':_0xb29436(0x124),'startCmd':_0xb29436(0x12b),'detectBin':'gemini','configFiles':[_0xb29436(0x11f)],'usage':_0xb29436(0x11c),'isPrimary':!0x1},'opencode':{'name':_0xb29436(0x126),'installPackage':_0xb29436(0x11d),'installCmd':_0xb29436(0x133),'startCmd':_0xb29436(0x13e),'detectBin':_0xb29436(0x13e),'configFiles':[_0xb29436(0x118),_0xb29436(0x131)],'usage':'运行\x20`opencode`\x20开始;`opencode\x20--help`\x20查看选项;在项目根放\x20AGENTS.md\x20让\x20OpenCode\x20了解你的代码库','isPrimary':!0x1}};export function getCliMeta(_0x45bb48){return CLI_META[_0x45bb48]||null;}function _0x1ecf(_0x3605d1,_0x27a875){_0x3605d1=_0x3605d1-0x10a;const _0x48d2a5=_0x48d2();let _0x1ecfc7=_0x48d2a5[_0x3605d1];return _0x1ecfc7;}export function isDefaultSelected(_0x185545){const _0x3eeb79=_0xb29436,_0x1f55f5=CLI_META[_0x185545];return!!_0x1f55f5&&_0x1f55f5[_0x3eeb79(0x12e)];}function _0x48d2(){const _0x33cbd1=['项目根放\x20CLAUDE.md\x20让\x20Claude\x20了解你的代码库','@google/gemini-cli','\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内自动批准,推荐)','181cbQBuk','\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查看所有选项','\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)','codex','\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带初始问题启动','权限模式(默认每步确认):','~/.config/opencode/opencode.json','Gemini\x20CLI','4579872QtKMwx','claude','运行\x20`gemini`\x20开始;`gemini\x20--help`\x20查看选项;在项目根放\x20GEMINI.md\x20让\x20Gemini\x20了解你的代码库','opencode-ai','\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,仅信任仓库)','~/.gemini/settings.json','13666910TrdIIU','5116168keSXRV','常用命令:','5748596eeGmZA','npm\x20install\x20-g\x20@google/gemini-cli','Codex\x20CLI\x20(WebSocket)','OpenCode','@openai/codex','7418pUFjls','~/.codex/config.toml','\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继续最近会话','gemini','join','\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更新到最新版','isPrimary','\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非交互模式(输出后退出,适合脚本)','1627011NmeLve','opencode.json','\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交互模式','npm\x20install\x20-g\x20opencode-ai','\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恢复历史会话(选择器)','16120iKbyag','~/.codex/auth.json','\x20\x20codex\x20--sandbox\x20read-only\x20--ask-for-approval\x20never\x20只读(最安全)','640FEFenm','npm\x20install\x20-g\x20@anthropic-ai/claude-code','Codex\x20CLI','npm\x20install\x20-g\x20@openai/codex','\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诊断安装/配置','\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服务器','opencode','~/.claude.json','9inHLTM','权限模式(Shift+Tab\x20切换):default\x20/\x20acceptEdits\x20/\x20plan\x20/\x20auto\x20/\x20bypassPermissions','权限模式(WebSocket\x20模式由服务端配置激活,默认每步确认):','项目根放\x20AGENTS.md\x20让\x20Codex\x20了解你的代码库'];_0x48d2=function(){return _0x33cbd1;};return _0x48d2();}
|
package/dist/lib/pow.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1c7ee6,_0x152cb5){const _0x439201=_0x57e8,_0x5c92d3=_0x1c7ee6();while(!![]){try{const _0x59ef97=-parseInt(_0x439201(0x151))/0x1+parseInt(_0x439201(0x160))/0x2*(-parseInt(_0x439201(0x138))/0x3)+parseInt(_0x439201(0x162))/0x4*(parseInt(_0x439201(0x137))/0x5)+parseInt(_0x439201(0x13e))/0x6*(parseInt(_0x439201(0x14a))/0x7)+parseInt(_0x439201(0x158))/0x8+parseInt(_0x439201(0x12f))/0x9+-parseInt(_0x439201(0x13f))/0xa*(-parseInt(_0x439201(0x154))/0xb);if(_0x59ef97===_0x152cb5)break;else _0x5c92d3['push'](_0x5c92d3['shift']());}catch(_0x36b489){_0x5c92d3['push'](_0x5c92d3['shift']());}}}(_0x5d63,0x68a96));import _0x2af0d7 from'node:https';import _0x43856d from'node:http';import _0x1eb72b from'node:crypto';export function getChallenge({apiBase:_0xa9c770,deviceId:_0x563cd9}){const _0x5d0aba=_0x57e8,_0x2cc7f2={'ccuBX':_0x5d0aba(0x15b),'DlrLJ':_0x5d0aba(0x146),'nLSxC':function(_0x3461f7,_0x3d4a15){return _0x3461f7>=_0x3d4a15;},'xBKyi':function(_0x42429e,_0x4f9d5d){return _0x42429e<_0x4f9d5d;},'mrDCi':function(_0xe10b9c,_0x2ec7a5){return _0xe10b9c==_0x2ec7a5;},'QhYbB':_0x5d0aba(0x163),'WIUJU':_0x5d0aba(0x12e),'jLseB':_0x5d0aba(0x133),'nRYdI':_0x5d0aba(0x135)};return new Promise((_0x3ef11c,_0x514ecd)=>{const _0x585de3=_0x5d0aba,_0x128241={'iLJUv':_0x2cc7f2[_0x585de3(0x152)],'ZsQmL':function(_0x399f7d,_0x4fe571){return _0x2cc7f2['nLSxC'](_0x399f7d,_0x4fe571);},'lbKxl':function(_0x47f001,_0x592940){const _0x3f77f8=_0x585de3;return _0x2cc7f2[_0x3f77f8(0x144)](_0x47f001,_0x592940);},'LkTlK':function(_0x1b950b,_0x295fc2){return _0x1b950b(_0x295fc2);},'QfOBQ':function(_0x3d24ef,_0xc34c95){const _0x3544ca=_0x585de3;return _0x2cc7f2[_0x3544ca(0x14d)](_0x3d24ef,_0xc34c95);},'ajoVv':_0x2cc7f2[_0x585de3(0x132)]};let _0x319832;try{_0x319832=new URL('/api/v1/cli/pow/challenge',_0xa9c770);}catch(_0x49b673){return void _0x514ecd(new Error(_0x585de3(0x131)+_0xa9c770+'('+_0x49b673[_0x585de3(0x149)]+')'));}const _0x15c00d=(_0x585de3(0x142)===_0x319832[_0x585de3(0x15f)]?_0x2af0d7:_0x43856d)[_0x585de3(0x141)](_0x319832,{'method':_0x2cc7f2[_0x585de3(0x148)],'headers':{'X-Device-Id':_0x563cd9,'Accept':_0x2cc7f2[_0x585de3(0x139)]},'timeout':0x7530},_0x449c94=>{const _0x2e6d2c=_0x585de3,_0x3d4a6c=[];_0x449c94['on'](_0x2cc7f2['ccuBX'],_0x24365b=>_0x3d4a6c[_0x2e6d2c(0x134)](_0x24365b)),_0x449c94['on'](_0x2e6d2c(0x153),()=>{const _0x5ce0be=_0x2e6d2c,_0x178fb2=Buffer['concat'](_0x3d4a6c)[_0x5ce0be(0x156)](_0x128241[_0x5ce0be(0x136)]);let _0x5a97d8;try{_0x5a97d8=_0x178fb2?JSON[_0x5ce0be(0x14c)](_0x178fb2):{};}catch{const _0x2bede2=new Error(_0x5ce0be(0x140)+_0x449c94['statusCode']+'):'+_0x178fb2[_0x5ce0be(0x13d)](0x0,0xc8));return _0x2bede2[_0x5ce0be(0x155)]=_0x449c94[_0x5ce0be(0x155)],_0x2bede2[_0x5ce0be(0x14e)]=_0x178fb2,void _0x514ecd(_0x2bede2);}if(_0x128241[_0x5ce0be(0x159)](_0x449c94[_0x5ce0be(0x155)],0xc8)&&_0x128241['lbKxl'](_0x449c94[_0x5ce0be(0x155)],0x12c))_0x128241[_0x5ce0be(0x15d)](_0x3ef11c,{'challenge':_0x5a97d8['challenge'],'difficulty':_0x5a97d8['difficulty'],'expiresAt':_0x5a97d8[_0x5ce0be(0x13c)]||_0x5a97d8[_0x5ce0be(0x13a)]});else{const _0x94f53f=_0x5a97d8?.[_0x5ce0be(0x135)],_0x1339cc=(_0x94f53f&&_0x128241['QfOBQ'](_0x128241[_0x5ce0be(0x147)],typeof _0x94f53f)?_0x94f53f[_0x5ce0be(0x149)]:_0x94f53f)||_0x5a97d8?.[_0x5ce0be(0x149)]||_0x5ce0be(0x130)+_0x449c94[_0x5ce0be(0x155)],_0x2cff7c=new Error(_0x1339cc);_0x2cff7c[_0x5ce0be(0x155)]=_0x449c94[_0x5ce0be(0x155)],_0x2cff7c[_0x5ce0be(0x164)]=_0x5a97d8,_0x128241[_0x5ce0be(0x15d)](_0x514ecd,_0x2cff7c);}});});_0x15c00d['on'](_0x585de3(0x14b),()=>{const _0x371f4d=_0x585de3;_0x15c00d[_0x371f4d(0x14f)](new Error(_0x371f4d(0x13b)+_0x319832[_0x371f4d(0x145)]));}),_0x15c00d['on'](_0x2cc7f2['nRYdI'],_0x514ecd),_0x15c00d[_0x585de3(0x153)]();});}function _0x57e8(_0x298739,_0x2f7980){_0x298739=_0x298739-0x12d;const _0x5d63c5=_0x5d63();let _0x57e897=_0x5d63c5[_0x298739];return _0x57e897;}function _0x5d63(){const _0x2e434c=['145vbQDgn','732wVElHl','jLseB','expiresAt','PoW\x20challenge\x20请求超时(30s)—\x20','expires_at','slice','35202QfaTOh','4750uOhjpl','PoW\x20challenge\x20响应非\x20JSON(HTTP\x20','request','https:','update','xBKyi','href','utf8','ajoVv','WIUJU','message','14oxRjRH','timeout','parse','mrDCi','raw','destroy','digest','312707Ogvlic','DlrLJ','end','6798oXhXBi','statusCode','toString','XeFWS','5410840eYdJMI','ZsQmL','npQiP','data','repeat','LkTlK','startsWith','protocol','4754ayqSFA','sha256','41476uNhqil','object','body','hex','GET','351441dmhRHa','HTTP\x20','无效的\x20apiBase:','QhYbB','application/json','push','error','iLJUv'];_0x5d63=function(){return _0x2e434c;};return _0x5d63();}export function solvePoW(_0x302cf8,_0x4a1f6f){const _0x1f5eaf=_0x57e8,_0x2a8bbe={'npQiP':_0x1f5eaf(0x161),'XeFWS':_0x1f5eaf(0x12d)},_0x39b176='0'[_0x1f5eaf(0x15c)](_0x4a1f6f);let _0x4cba04=0x0;for(;;){if(_0x1eb72b['createHash'](_0x2a8bbe[_0x1f5eaf(0x15a)])[_0x1f5eaf(0x143)](_0x302cf8+':'+_0x4cba04)[_0x1f5eaf(0x150)](_0x2a8bbe[_0x1f5eaf(0x157)])[_0x1f5eaf(0x15e)](_0x39b176))return String(_0x4cba04);_0x4cba04++;}}
|
package/dist/lib/prompt.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x130e87,_0x406060){const _0x512ff8=_0x272e,_0x4f307f=_0x130e87();while(!![]){try{const _0x24f988=-parseInt(_0x512ff8(0xed))/0x1*(parseInt(_0x512ff8(0xdb))/0x2)+parseInt(_0x512ff8(0xf3))/0x3+-parseInt(_0x512ff8(0xfb))/0x4*(-parseInt(_0x512ff8(0x10e))/0x5)+parseInt(_0x512ff8(0x109))/0x6+parseInt(_0x512ff8(0x112))/0x7+parseInt(_0x512ff8(0xe2))/0x8*(parseInt(_0x512ff8(0xfe))/0x9)+-parseInt(_0x512ff8(0xfc))/0xa;if(_0x24f988===_0x406060)break;else _0x4f307f['push'](_0x4f307f['shift']());}catch(_0x5d2d2d){_0x4f307f['push'](_0x4f307f['shift']());}}}(_0xcf14,0xadd11));import _0x594dbe from'node:readline';let t=null;async function n(){const _0xf1af43=_0x272e,_0xea79b1={'fBUDZ':'@inquirer/prompts'};return t||(t=await import(_0xea79b1[_0xf1af43(0xfa)])),t;}function _0x272e(_0x5454b4,_0x1f9612){_0x5454b4=_0x5454b4-0xd4;const _0xcf148d=_0xcf14();let _0x272ed3=_0xcf148d[_0x5454b4];return _0x272ed3;}let a=null,s=null,o=null;function r(){const _0x241da1=_0x272e,_0xd056fa={'qigaw':function(_0x58985b,_0x16a269){return _0x58985b===_0x16a269;}};return _0xd056fa[_0x241da1(0xd8)](!0x0,process[_0x241da1(0xdd)][_0x241da1(0xe9)]);}export function closePrompt(){a&&!a['closed']&&a['close'](),a=null;}function _0xcf14(){const _0x29731d=['setEncoding','utf8','write','\x20\x20[','QtQXA','label','isTTY','YspbI','shift','length','244qAZoRM','includes','pXnmg','QyAXg','RNlPR','all','173853Fmqlgb','\x20(默认)','AINNj','vqObf','dqkSc','map','filter','fBUDZ','26212EXXfTi','7539130MQbHRn','toLowerCase','3726hLiPML','log','ZAHHQ','password','HgaWS','MuKds','yes','\x20\x20(输入序号,逗号/空格分隔;回车=默认;a=全选;n=全不选)','split','UuBZZ','ZomAn','2742534ZCxpPS','end','WaBfu','trim','AnvqP','385MnFBZQ','stdout','bGsfM','FibVu','7712873nLKwHb','Y/n','rRzsa','forEach','Fgpjm','none','选择序号','data','select','WiSyU','QrGJg','MmoBy','BnVeq','qigaw','checkbox','y/N','7610Cvgqfx','DpawX','stdin','push','pVyYa','OmplG','confirm','5272qyoUjg'];_0xcf14=function(){return _0x29731d;};return _0xcf14();}export async function ask(_0x488c83,{defaultValue:_0x3ef612}={}){const _0x9de287=_0x272e,_0x3e87b1={'MRmuB':function(_0x23be8e,_0x15d976){return _0x23be8e>_0x15d976;},'OmplG':function(_0x422b69){return _0x422b69();},'FRPIM':_0x9de287(0xe4),'AnvqP':_0x9de287(0x119),'rRzsa':_0x9de287(0x10a),'dTGMo':function(_0x40904d){return _0x40904d();},'ZAHHQ':function(_0x5d85ee,_0x566275){return _0x5d85ee??_0x566275;},'RNlPR':function(_0x29fe9d,_0x346f94){return _0x29fe9d??_0x346f94;},'bGsfM':function(_0x34a897,_0x5951ad){return _0x34a897??_0x5951ad;}},_0x174df1=_0x3ef612?'\x20['+_0x3ef612+']':'';if(_0x3e87b1['dTGMo'](r)){const _0x3dc6cb=await _0x3e87b1['dTGMo'](n);return await _0x3dc6cb['input']({'message':''+_0x488c83+_0x174df1,'default':_0x3e87b1[_0x9de287(0x100)](_0x3ef612,'')})||_0x3e87b1[_0x9de287(0xf1)](_0x3ef612,'');}await(s||(s=[],o=new Promise(_0x54531a=>{const _0xa13c1d=_0x9de287;let _0x3c8756='';process[_0xa13c1d(0xdd)][_0xa13c1d(0xe3)](_0x3e87b1['FRPIM']),process[_0xa13c1d(0xdd)]['on'](_0x3e87b1[_0xa13c1d(0x10d)],_0x202dc9=>{_0x3c8756+=_0x202dc9;}),process['stdin']['on'](_0x3e87b1[_0xa13c1d(0x114)],()=>{const _0x2a5d61=_0xa13c1d,_0x53d529=_0x3c8756['split'](/\r?\n/);_0x3e87b1['MRmuB'](_0x53d529[_0x2a5d61(0xec)],0x0)&&''===_0x53d529[_0x53d529[_0x2a5d61(0xec)]-0x1]&&_0x53d529['pop'](),s[_0x2a5d61(0xde)](..._0x53d529),_0x3e87b1[_0x2a5d61(0xe0)](_0x54531a);}),process[_0xa13c1d(0xdd)]['destroyed']&&_0x3e87b1['OmplG'](_0x54531a);})),o);const _0x1ccf86=s[_0x9de287(0xeb)]()??'';return process[_0x9de287(0x10f)][_0x9de287(0xe5)](''+_0x488c83+_0x174df1+':\x20'+_0x1ccf86+'\x0a'),_0x1ccf86[_0x9de287(0x10c)]()||_0x3e87b1[_0x9de287(0x110)](_0x3ef612,'');}export async function askSecret(_0x4732e4){const _0x276107=_0x272e,_0x44be4b={'bxvsu':function(_0x473e6c){return _0x473e6c();}};if(r())return(await _0x44be4b['bxvsu'](n))[_0x276107(0x101)]({'message':_0x4732e4,'mask':'*'});return ask(_0x4732e4);}export async function multiSelect(_0x4a8b36,_0x5078fe,{defaultSelected:_0x109f9f=[]}={}){const _0x2cd850=_0x272e,_0x33026b={'UuBZZ':function(_0x1861f0,_0x1e5b9d){return _0x1861f0+_0x1e5b9d;},'QyAXg':function(_0x386a3f,_0x5378a2){return _0x386a3f===_0x5378a2;},'dqkSc':function(_0x2a9d2e){return _0x2a9d2e();},'HgaWS':_0x2cd850(0x105),'MmoBy':function(_0x38bbc7,_0xc583e3,_0x3d21fe){return _0x38bbc7(_0xc583e3,_0x3d21fe);},'jLdKl':_0x2cd850(0xf2),'MuKds':function(_0x52af9e,_0x171aa8){return _0x52af9e===_0x171aa8;},'USGKO':function(_0x50ce35,_0x3d1b5e){return _0x50ce35===_0x3d1b5e;},'BnVeq':_0x2cd850(0x117)};if(_0x33026b[_0x2cd850(0xf0)](0x0,_0x5078fe['length']))return[];if(_0x33026b[_0x2cd850(0xf7)](r)){const _0xaa904b=await _0x33026b[_0x2cd850(0xf7)](n),_0x4d2dbb=_0x5078fe[_0x2cd850(0xf8)]((_0x3bf738,_0x29cea7)=>({'name':_0x3bf738[_0x2cd850(0xe8)],'value':_0x29cea7,'checked':_0x109f9f[_0x2cd850(0xee)](_0x29cea7)}));return await _0xaa904b[_0x2cd850(0xd9)]({'message':_0x4a8b36,'choices':_0x4d2dbb,'loop':!0x1,'required':!0x1});}console[_0x2cd850(0xff)](_0x4a8b36),_0x5078fe[_0x2cd850(0x115)]((_0x2a1039,_0x318a34)=>{const _0x4e7abb=_0x2cd850,_0x4a7e83=_0x109f9f[_0x4e7abb(0xee)](_0x318a34);console['log'](_0x4e7abb(0xe6)+(_0x4a7e83?'x':'\x20')+']\x20'+_0x33026b[_0x4e7abb(0x107)](_0x318a34,0x1)+'.\x20'+_0x2a1039[_0x4e7abb(0xe8)]);}),console[_0x2cd850(0xff)](_0x33026b[_0x2cd850(0x102)]);const _0x3b4953=_0x109f9f['map'](_0xeb073e=>_0xeb073e+0x1)['join'](','),_0x470613=await _0x33026b[_0x2cd850(0xd6)](ask,'选择',{'defaultValue':_0x3b4953}),_0x56c816=_0x470613['trim']()[_0x2cd850(0xfd)]();if('a'===_0x56c816||_0x33026b[_0x2cd850(0xf0)](_0x33026b['jLdKl'],_0x56c816))return _0x5078fe['map']((_0x42ad3a,_0x5e73ed)=>_0x5e73ed);if(_0x33026b[_0x2cd850(0x103)]('n',_0x56c816)||_0x33026b['USGKO'](_0x33026b[_0x2cd850(0xd7)],_0x56c816))return[];const _0x467140=_0x470613[_0x2cd850(0x106)](/[,\s]+/)['map'](_0x12b4bc=>parseInt(_0x12b4bc,0xa))[_0x2cd850(0xf9)](_0x7995bc=>!isNaN(_0x7995bc)&&_0x7995bc>=0x1&&_0x7995bc<=_0x5078fe['length'])[_0x2cd850(0xf8)](_0x3a6e0b=>_0x3a6e0b-0x1);return[...new Set(_0x467140)];}export async function select(_0x5690bd,_0x42d4a9,{defaultIndex:_0x22290e=0x0}={}){const _0x1e22af=_0x272e,_0x2e185c={'FibVu':function(_0x41f4fe,_0x49ee15){return _0x41f4fe===_0x49ee15;},'DpawX':_0x1e22af(0xf4),'ZomAn':function(_0x9ac368,_0x37d4e8){return _0x9ac368+_0x37d4e8;},'Fgpjm':function(_0x510cec,_0x6182e5){return _0x510cec===_0x6182e5;},'zSzgN':function(_0x19db56){return _0x19db56();},'WaBfu':function(_0x2e5e4e){return _0x2e5e4e();},'pXnmg':function(_0x119466,_0xc4f7e4,_0x2d5713){return _0x119466(_0xc4f7e4,_0x2d5713);},'vDMBi':_0x1e22af(0x118),'gRCTl':function(_0x395bb0,_0x47ca7e){return _0x395bb0(_0x47ca7e);},'QtQXA':function(_0x4d869d,_0x5dedd8){return _0x4d869d<_0x5dedd8;},'vqObf':function(_0x3429df,_0x725fbd){return _0x3429df>_0x725fbd;},'YspbI':function(_0xe08052,_0x3b7eae){return _0xe08052-_0x3b7eae;}};if(_0x2e185c[_0x1e22af(0x111)](0x0,_0x42d4a9[_0x1e22af(0xec)]))return-0x1;if(_0x2e185c[_0x1e22af(0x116)](0x1,_0x42d4a9[_0x1e22af(0xec)]))return 0x0;if(_0x2e185c['zSzgN'](r)){const _0x257cf2=await _0x2e185c[_0x1e22af(0x10b)](n),_0x5098e1=_0x42d4a9[_0x1e22af(0xf8)]((_0x535a92,_0x4ebd12)=>({'name':_0x535a92[_0x1e22af(0xe8)],'value':_0x4ebd12}));return _0x257cf2[_0x1e22af(0x11a)]({'message':_0x5690bd,'choices':_0x5098e1,'default':_0x22290e,'loop':!0x1});}console[_0x1e22af(0xff)](_0x5690bd),_0x42d4a9['forEach']((_0x593bca,_0x34f8f5)=>{const _0x219143=_0x1e22af,_0x1626a2=_0x2e185c[_0x219143(0x111)](_0x34f8f5,_0x22290e)?_0x2e185c[_0x219143(0xdc)]:'';console[_0x219143(0xff)]('\x20\x20'+_0x2e185c[_0x219143(0x108)](_0x34f8f5,0x1)+'.\x20'+_0x593bca[_0x219143(0xe8)]+_0x1626a2);});const _0x40fa91=await _0x2e185c['pXnmg'](ask,_0x2e185c['vDMBi'],{'defaultValue':_0x2e185c['gRCTl'](String,_0x22290e+0x1)}),_0x3d5187=_0x2e185c[_0x1e22af(0xef)](parseInt,_0x40fa91,0xa);return isNaN(_0x3d5187)||_0x2e185c[_0x1e22af(0xe7)](_0x3d5187,0x1)||_0x2e185c[_0x1e22af(0xf6)](_0x3d5187,_0x42d4a9[_0x1e22af(0xec)])?_0x22290e:_0x2e185c[_0x1e22af(0xea)](_0x3d5187,0x1);}export async function confirm(_0x541e8,{defaultValue:_0x4a15cb=!0x0}={}){const _0x1621f9=_0x272e,_0xa4502f={'AINNj':function(_0x34d3d1){return _0x34d3d1();},'QrGJg':function(_0x477063){return _0x477063();},'WiSyU':_0x1621f9(0x113),'pVyYa':function(_0x186241,_0x3dd6f5){return _0x186241===_0x3dd6f5;},'pkmWz':_0x1621f9(0x104)};if(_0xa4502f[_0x1621f9(0xf5)](r))return(await _0xa4502f[_0x1621f9(0xd5)](n))[_0x1621f9(0xe1)]({'message':_0x541e8,'default':_0x4a15cb});const _0x1bc7c0=_0x4a15cb?_0xa4502f[_0x1621f9(0xd4)]:_0x1621f9(0xda),_0x299cbe=(await ask(_0x541e8+'\x20('+_0x1bc7c0+')',{'defaultValue':_0x4a15cb?'y':'n'}))['trim']()[_0x1621f9(0xfd)]();return _0x299cbe?_0xa4502f[_0x1621f9(0xdf)]('y',_0x299cbe)||_0xa4502f['pkmWz']===_0x299cbe:_0x4a15cb;}
|