@ranger-testing/ranger-cli 2.4.0 → 2.4.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.
Files changed (70) hide show
  1. package/build/cli.js +1 -1
  2. package/build/commands/addEnv.js +1 -1
  3. package/build/commands/authEncrypt.js +1 -1
  4. package/build/commands/clean.js +1 -1
  5. package/build/commands/config.js +1 -1
  6. package/build/commands/env.js +1 -1
  7. package/build/commands/feature.js +1 -1
  8. package/build/commands/hook.js +1 -1
  9. package/build/commands/hooks/autoPrompt.js +1 -1
  10. package/build/commands/hooks/disable.js +1 -1
  11. package/build/commands/hooks/enable.js +1 -1
  12. package/build/commands/hooks/exitPlanMode.js +1 -1
  13. package/build/commands/hooks/index.js +1 -1
  14. package/build/commands/hooks/output.js +1 -1
  15. package/build/commands/hooks/planReminder.js +1 -1
  16. package/build/commands/hooks/planStart.js +1 -1
  17. package/build/commands/hooks/postEdit.js +1 -1
  18. package/build/commands/hooks/preCompact.js +1 -1
  19. package/build/commands/hooks/sessionEnd.js +1 -1
  20. package/build/commands/hooks/sessionStart.js +1 -1
  21. package/build/commands/hooks/stopHook.js +1 -1
  22. package/build/commands/index.js +1 -1
  23. package/build/commands/login.js +1 -1
  24. package/build/commands/setup/claude.js +1 -1
  25. package/build/commands/setup/opencode.js +1 -1
  26. package/build/commands/setupCi.js +1 -1
  27. package/build/commands/skillup.js +1 -1
  28. package/build/commands/start.js +1 -1
  29. package/build/commands/status.js +1 -1
  30. package/build/commands/update.js +1 -1
  31. package/build/commands/updateEnv.js +1 -1
  32. package/build/commands/useEnv.js +1 -1
  33. package/build/commands/utils/activeProfile.js +1 -1
  34. package/build/commands/utils/agentEnv.js +1 -1
  35. package/build/commands/utils/browserSessionsApi.js +1 -1
  36. package/build/commands/utils/claudeConfig.js +1 -1
  37. package/build/commands/utils/claudePlugin.js +1 -1
  38. package/build/commands/utils/crypto.js +1 -1
  39. package/build/commands/utils/desirePathLog.js +1 -1
  40. package/build/commands/utils/deviceAuth.js +1 -1
  41. package/build/commands/utils/environment.js +1 -1
  42. package/build/commands/utils/featureApi.js +1 -1
  43. package/build/commands/utils/featureReportGenerator.js +1 -1
  44. package/build/commands/utils/fixWebmDuration.js +1 -1
  45. package/build/commands/utils/git.js +1 -1
  46. package/build/commands/utils/keychain.js +1 -1
  47. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  48. package/build/commands/utils/mcpImageBase64.js +1 -1
  49. package/build/commands/utils/model.js +1 -1
  50. package/build/commands/utils/opencodeConfig.js +1 -1
  51. package/build/commands/utils/playwrightCli.js +1 -1
  52. package/build/commands/utils/profileMessages.js +1 -1
  53. package/build/commands/utils/profileSetupBanner.js +1 -1
  54. package/build/commands/utils/rangerConfig.js +1 -1
  55. package/build/commands/utils/rangerRoot.js +1 -1
  56. package/build/commands/utils/reportGenerator.js +1 -1
  57. package/build/commands/utils/retry.js +1 -1
  58. package/build/commands/utils/sessionCache.js +1 -1
  59. package/build/commands/utils/settings.js +1 -1
  60. package/build/commands/utils/skillContent.js +1 -1
  61. package/build/commands/utils/skills.js +1 -1
  62. package/build/commands/utils/stitchWebmFiles.js +1 -1
  63. package/build/commands/utils/telemetry.js +1 -1
  64. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  65. package/build/commands/utils/userApi.js +1 -1
  66. package/build/commands/utils/version.js +1 -1
  67. package/build/commands/verifyFeature.js +1 -1
  68. package/build/commands/verifyFeatureCli.js +1 -1
  69. package/build/commands/verifyInBrowser.js +1 -1
  70. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x263138,_0x4be758){const _0x549f02=_0x3392,_0x422359=_0x263138();while(!![]){try{const _0x3a78d9=parseInt(_0x549f02(0x160))/0x1+parseInt(_0x549f02(0x147))/0x2+parseInt(_0x549f02(0x142))/0x3*(-parseInt(_0x549f02(0x13d))/0x4)+-parseInt(_0x549f02(0x162))/0x5+-parseInt(_0x549f02(0x146))/0x6*(parseInt(_0x549f02(0x135))/0x7)+parseInt(_0x549f02(0x15a))/0x8*(parseInt(_0x549f02(0x131))/0x9)+parseInt(_0x549f02(0x14a))/0xa;if(_0x3a78d9===_0x4be758)break;else _0x422359['push'](_0x422359['shift']());}catch(_0x3da7a5){_0x422359['push'](_0x422359['shift']());}}}(_0x3bb5,0x8698f));function _0x3392(_0x281333,_0xd9c009){_0x281333=_0x281333-0x12c;const _0x3bb52d=_0x3bb5();let _0x3392e3=_0x3bb52d[_0x281333];return _0x3392e3;}import{spawn}from'child_process';import{existsSync}from'fs';import{readFile,writeFile}from'fs/promises';import{installSkill,removeSkill,RANGER_MANAGED_SKILLS,DEPRECATED_SKILLS}from'./utils/skills.js';import{PACKAGE_NAME,getCurrentVersion,getLatestVersion,compareVersions}from'./utils/version.js';import{getSkillsDir}from'./utils/claudeConfig.js';import{getOpencodeSkillsDir}from'./utils/opencodeConfig.js';import{join}from'path';import{migrateActiveProfileFile}from'./utils/activeProfile.js';import{getRangerDir}from'./utils/rangerRoot.js';import{isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';async function runInstall(){const _0x39e327=_0x3392,_0x472d2b={'yLtbI':function(_0xdaed99,_0x1c76a3){return _0xdaed99(_0x1c76a3);},'EUXAK':function(_0x4bb294,_0x293290,_0x1f56ad,_0x1393e6){return _0x4bb294(_0x293290,_0x1f56ad,_0x1393e6);},'ipqAg':'npm','XqsIR':'install','aXDJS':_0x39e327(0x12c)};return new Promise(_0x52e2a5=>{const _0x4ed937=_0x39e327,_0x3014b1={'sXKim':function(_0xdcce95,_0x207004){return _0x472d2b['yLtbI'](_0xdcce95,_0x207004);}};console['log'](_0x4ed937(0x16a)+PACKAGE_NAME+_0x4ed937(0x139));const _0x4cf571=_0x472d2b['EUXAK'](spawn,_0x472d2b[_0x4ed937(0x145)],[_0x472d2b['XqsIR'],'-g',PACKAGE_NAME+'@latest'],{'stdio':'inherit','shell':process['platform']===_0x4ed937(0x15b)});_0x4cf571['on'](_0x4ed937(0x137),_0x2024d9=>{_0x52e2a5(_0x2024d9===0x0);}),_0x4cf571['on'](_0x472d2b['aXDJS'],()=>{const _0x3c567a=_0x4ed937;_0x3014b1[_0x3c567a(0x13a)](_0x52e2a5,![]);});});}async function updateClaudeMarketplace(){const _0x4dc349=_0x3392,_0x357d93={'aSReW':function(_0x5d69b1,_0xe24d26){return _0x5d69b1(_0xe24d26);},'XvVeR':'marketplace','aPxaI':_0x4dc349(0x13f),'lKaUa':function(_0x9b5e15,_0x367791){return _0x9b5e15===_0x367791;}};return new Promise(_0x4d9507=>{const _0x5abf33=_0x4dc349,_0x5225cc={'McMQY':function(_0x287a66,_0x4ff5a3){const _0x1b4cd6=_0x3392;return _0x357d93[_0x1b4cd6(0x16e)](_0x287a66,_0x4ff5a3);}},_0x4a415c=spawn(_0x5abf33(0x149),['plugin',_0x357d93[_0x5abf33(0x169)],'update',_0x357d93[_0x5abf33(0x134)]],{'stdio':'pipe','shell':_0x357d93[_0x5abf33(0x14c)](process[_0x5abf33(0x138)],_0x5abf33(0x15b))});_0x4a415c['on']('close',_0x2ef7f2=>{const _0x16a5f2=_0x5abf33;_0x5225cc[_0x16a5f2(0x12e)](_0x4d9507,_0x2ef7f2===0x0);}),_0x4a415c['on']('error',()=>{_0x4d9507(![]);});});}async function updateClaudePlugin(_0x4809ae){const _0x209221=_0x3392,_0x4baeb7={'edwGX':_0x209221(0x140),'mBaop':'--scope','gZbeA':function(_0x5b5e85,_0x5c8c19,_0x3c7866,_0x20670f){return _0x5b5e85(_0x5c8c19,_0x3c7866,_0x20670f);},'uuaxe':function(_0xbcd7d0,_0x38a786){return _0xbcd7d0===_0x38a786;},'WLixC':'win32','CVMKt':_0x209221(0x137),'uIztS':'error'};return new Promise(_0xd0d977=>{const _0x86f31a=_0x209221,_0x372fdb={'tMFWc':function(_0x5e3136,_0xe212ab){return _0x5e3136(_0xe212ab);}},_0x2a8d61=[_0x86f31a(0x14d),_0x86f31a(0x148),_0x4baeb7[_0x86f31a(0x150)]];_0x4809ae&&_0x2a8d61[_0x86f31a(0x167)](_0x4baeb7['mBaop'],_0x4809ae);const _0x858aa5=_0x4baeb7['gZbeA'](spawn,'claude',_0x2a8d61,{'stdio':'pipe','shell':_0x4baeb7['uuaxe'](process[_0x86f31a(0x138)],_0x4baeb7[_0x86f31a(0x143)])});_0x858aa5['on'](_0x4baeb7[_0x86f31a(0x153)],_0x13dc9f=>{const _0x30bbb3=_0x86f31a;_0x372fdb[_0x30bbb3(0x154)](_0xd0d977,_0x13dc9f===0x0);}),_0x858aa5['on'](_0x4baeb7[_0x86f31a(0x168)],()=>{_0xd0d977(![]);});});}function isSkillInstalled(_0x31a3ad,_0x113ff0,_0xab85bd){const _0x5819cf={'dEqXe':'opencode','wKNPO':function(_0x151ef8,_0x25830d){return _0x151ef8(_0x25830d);}},_0x3c0c11=_0xab85bd===_0x5819cf['dEqXe']?getOpencodeSkillsDir(_0x113ff0):getSkillsDir(_0x113ff0),_0x5620b4=join(_0x3c0c11,_0x31a3ad);return _0x5819cf['wKNPO'](existsSync,_0x5620b4);}function _0x3bb5(){const _0x2fecf4=['CVMKt','tMFWc','sJzdx','\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.','eOVLv','Claude\x20plugin\x20updated\x20(project\x20scope).','Checking\x20for\x20updates...','56856JgKShR','win32','length','lHbUB','zLrBO','FDlnS','508034wlxGkn','lQUTl','5310550zBGCgw','\x0aSuccessfully\x20updated\x20to\x20version\x20','warn','active-feature.txt','nZdep','push','uIztS','XvVeR','\x0aInstalling\x20','trim','MubKc','Latest\x20version:\x20\x20','aSReW','error','.gitignore','McMQY','EpxJH','project','603IaDlMx','version','FUisZ','aPxaI','203MBOtWv','Update\x20failed:\x20','close','platform','@latest...\x0a','sXKim','DhtlI','opencode','1832DwBNZn','AIyyR','trailhead','ranger@trailhead','utf-8','3777bZpzDi','WLixC','\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','ipqAg','84810nQXxtQ','525604qYlgPO','update','claude','13529530QyYVTD','\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.','lKaUa','plugin','eawfq','cTCWL','edwGX','log','rnmhk'];_0x3bb5=function(){return _0x2fecf4;};return _0x3bb5();}async function reinstallSkills(_0xc5adfe){const _0x4b979d=_0x3392,_0x5b981d={'MubKc':'user','EpxJH':function(_0x170317,_0x376a41,_0x41e970,_0x3bb07b){return _0x170317(_0x376a41,_0x41e970,_0x3bb07b);},'EMAey':'opencode','PfXgF':function(_0x41579c,_0x5be68d,_0x2de601){return _0x41579c(_0x5be68d,_0x2de601);},'DhtlI':_0x4b979d(0x14b)},_0x2f63a6=['project',_0x5b981d[_0x4b979d(0x16c)]],_0x51b3f8=[];for(const _0x58b36b of _0x2f63a6){for(const _0x34d286 of RANGER_MANAGED_SKILLS){_0x5b981d[_0x4b979d(0x12f)](isSkillInstalled,_0x34d286,_0x58b36b,_0x4b979d(0x149))&&_0x51b3f8['push']({'skillName':_0x34d286,'level':_0x58b36b,'platform':_0x4b979d(0x149)}),_0x5b981d['EpxJH'](isSkillInstalled,_0x34d286,_0x58b36b,_0x4b979d(0x13c))&&_0x51b3f8['push']({'skillName':_0x34d286,'level':_0x58b36b,'platform':_0x5b981d['EMAey']});}}for(const _0x130d8a of _0x2f63a6){for(const _0xd49ce6 of DEPRECATED_SKILLS){await _0x5b981d['PfXgF'](removeSkill,_0xd49ce6,_0x130d8a);}}if(_0x51b3f8['length']===0x0){console['log'](_0x5b981d[_0x4b979d(0x13b)]);return;}console[_0x4b979d(0x151)]('\x0aReinstalling\x20'+_0x51b3f8['length']+'\x20ranger-managed\x20skill(s)...');for(const {skillName:_0x3d77fb,level:_0x590d4a,platform:_0x22ee58}of _0x51b3f8){try{await _0x5b981d['PfXgF'](installSkill,_0x3d77fb,{'level':_0x590d4a,'cliVersion':_0xc5adfe,'platform':_0x22ee58});}catch(_0x4837b5){console[_0x4b979d(0x164)]('\x20\x20Failed\x20to\x20reinstall\x20'+_0x22ee58+'\x20'+_0x590d4a+'\x20skill\x20'+_0x3d77fb+':',_0x4837b5);}}}async function ensureActiveProfileGitignored(){const _0x3209f7=_0x3392,_0x2ce22d={'zffCf':function(_0x3865dd,_0x2d2eb9,_0x1ef00a){return _0x3865dd(_0x2d2eb9,_0x1ef00a);},'nZdep':function(_0x4d31a0,_0x5a5903){return _0x4d31a0(_0x5a5903);},'cTCWL':function(_0x168091,_0x8fbed,_0x11f3cf){return _0x168091(_0x8fbed,_0x11f3cf);},'AIyyR':function(_0x5a8c5c,_0x908685){return _0x5a8c5c===_0x908685;},'lHbUB':function(_0x25e5fa,_0x4a6c13,_0x53c827,_0x1b8f87){return _0x25e5fa(_0x4a6c13,_0x53c827,_0x1b8f87);}},_0x16b5ab=_0x2ce22d['zffCf'](join,getRangerDir(),_0x3209f7(0x12d));if(!_0x2ce22d[_0x3209f7(0x166)](existsSync,_0x16b5ab))return![];let _0x4f9bbb='';try{_0x4f9bbb=await _0x2ce22d[_0x3209f7(0x14f)](readFile,_0x16b5ab,_0x3209f7(0x141));}catch{return![];}const _0x55a299=_0x4f9bbb['split'](/\r?\n/);if(_0x55a299['some'](_0x2d3da7=>_0x2d3da7['trim']()==='active-profile.txt'))return![];let _0x1808d7=_0x55a299['findIndex'](_0x51ca6d=>_0x51ca6d[_0x3209f7(0x16b)]()===_0x3209f7(0x165));_0x2ce22d[_0x3209f7(0x13e)](_0x1808d7,-0x1)&&(_0x1808d7=_0x55a299[_0x3209f7(0x15c)]);_0x55a299['splice'](_0x1808d7,0x0,'active-profile.txt');let _0x2414be=_0x55a299['join']('\x0a');!_0x2414be['endsWith']('\x0a')&&(_0x2414be+='\x0a');try{await _0x2ce22d[_0x3209f7(0x15d)](writeFile,_0x16b5ab,_0x2414be,'utf-8');}catch{return![];}return!![];}export async function update(){const _0x54f452=_0x3392,_0x4ebb81={'GvXZe':_0x54f452(0x159),'lQUTl':function(_0x418438){return _0x418438();},'sJzdx':function(_0x239071){return _0x239071();},'xKEpS':function(_0x33d2fc,_0x2108f5,_0x2e58d3){return _0x33d2fc(_0x2108f5,_0x2e58d3);},'eawfq':function(_0x238ea2,_0x1ce4ad){return _0x238ea2===_0x1ce4ad;},'zfxyH':function(_0x2628c5,_0x456bcc){return _0x2628c5<_0x456bcc;},'eOVLv':function(_0xa0276d){return _0xa0276d();},'FDlnS':'Update\x20failed.','FUisZ':function(_0x17d0be,_0x462eb8){return _0x17d0be(_0x462eb8);},'eoDFu':_0x54f452(0x13f),'zLrBO':'ranger@trailhead','ctiHo':function(_0x24502){return _0x24502();},'dSiZT':_0x54f452(0x130),'rnmhk':function(_0x23630f){return _0x23630f();},'QCRYI':'\x0a✅\x20Update\x20complete!'},_0x49baff=getCurrentVersion();console['log']('\x0aCurrent\x20version:\x20'+_0x49baff),console['log'](_0x4ebb81['GvXZe']);const _0x57fb54=_0x4ebb81['lQUTl'](getLatestVersion);let _0xb53f55=_0x49baff;if(!_0x57fb54['version']){console['warn']('\x0aCould\x20not\x20check\x20latest\x20version:\x20'+_0x57fb54[_0x54f452(0x12c)]),console['log']('Attempting\x20install\x20anyway...');const _0x2fbb6c=await _0x4ebb81[_0x54f452(0x161)](runInstall);if(_0x2fbb6c)console[_0x54f452(0x151)]('\x0aSuccessfully\x20installed\x20latest\x20version.'),_0xb53f55=_0x4ebb81[_0x54f452(0x155)](getCurrentVersion);else throw new Error(_0x54f452(0x136)+_0x57fb54[_0x54f452(0x12c)]);}else{const _0x1d90dd=_0x57fb54[_0x54f452(0x132)];console['log'](_0x54f452(0x16d)+_0x1d90dd);const _0x4fc8da=_0x4ebb81['xKEpS'](compareVersions,_0x49baff,_0x1d90dd);if(_0x4ebb81[_0x54f452(0x14e)](_0x4fc8da,0x0))console[_0x54f452(0x151)](_0x54f452(0x156));else{if(_0x4ebb81['zfxyH'](_0x4fc8da,0x0))console['log']('\x0aYour\x20version\x20('+_0x49baff+')\x20is\x20newer\x20than\x20the\x20published\x20version\x20('+_0x1d90dd+').');else{const _0x45c78b=await _0x4ebb81[_0x54f452(0x157)](runInstall);if(_0x45c78b)console[_0x54f452(0x151)](_0x54f452(0x163)+_0x1d90dd),_0xb53f55=_0x1d90dd;else throw new Error(_0x4ebb81[_0x54f452(0x15f)]);}}}await _0x4ebb81[_0x54f452(0x133)](reinstallSkills,_0xb53f55);const _0x2bbbee=await isMarketplaceAdded(_0x4ebb81['eoDFu']),_0x4f8115=await isPluginInstalled(_0x4ebb81[_0x54f452(0x15e)]);if(_0x2bbbee){const _0x3bfaf3=await updateClaudeMarketplace();_0x3bfaf3&&console[_0x54f452(0x151)]('\x0aClaude\x20marketplace\x20updated\x20(trailhead).');}if(_0x4f8115){const _0x248cf4=await _0x4ebb81['ctiHo'](updateClaudePlugin);_0x248cf4&&console['log'](_0x54f452(0x144));const _0x2025a1=await updateClaudePlugin(_0x4ebb81['dSiZT']);_0x2025a1&&console[_0x54f452(0x151)]((_0x248cf4?'':'\x0a')+_0x54f452(0x158));}const _0x43148c=await _0x4ebb81[_0x54f452(0x152)](migrateActiveProfileFile);_0x43148c&&console['log']('✓\x20Migrated\x20active\x20profile\x20file');const _0x4c0722=await ensureActiveProfileGitignored();console[_0x54f452(0x151)](_0x4ebb81['QCRYI']);}
1
+ (function(_0x2ba9e2,_0x51f195){const _0x10c2af=_0x1894,_0x5dc7e1=_0x2ba9e2();while(!![]){try{const _0x44e2b4=-parseInt(_0x10c2af(0x93))/0x1+-parseInt(_0x10c2af(0xbb))/0x2*(-parseInt(_0x10c2af(0x8f))/0x3)+-parseInt(_0x10c2af(0x9d))/0x4*(parseInt(_0x10c2af(0xa1))/0x5)+parseInt(_0x10c2af(0xb9))/0x6*(-parseInt(_0x10c2af(0xa8))/0x7)+-parseInt(_0x10c2af(0x99))/0x8*(-parseInt(_0x10c2af(0x8c))/0x9)+-parseInt(_0x10c2af(0xa6))/0xa+-parseInt(_0x10c2af(0xb7))/0xb*(-parseInt(_0x10c2af(0x9f))/0xc);if(_0x44e2b4===_0x51f195)break;else _0x5dc7e1['push'](_0x5dc7e1['shift']());}catch(_0x38b46d){_0x5dc7e1['push'](_0x5dc7e1['shift']());}}}(_0x3898,0x3c32c));import{spawn}from'child_process';import{existsSync}from'fs';import{readFile,writeFile}from'fs/promises';import{installSkill,removeSkill,RANGER_MANAGED_SKILLS,DEPRECATED_SKILLS}from'./utils/skills.js';import{PACKAGE_NAME,getCurrentVersion,getLatestVersion,compareVersions}from'./utils/version.js';import{getSkillsDir}from'./utils/claudeConfig.js';import{getOpencodeSkillsDir}from'./utils/opencodeConfig.js';import{join}from'path';import{migrateActiveProfileFile}from'./utils/activeProfile.js';import{getRangerDir}from'./utils/rangerRoot.js';function _0x1894(_0x5acfc4,_0x27ea8d){_0x5acfc4=_0x5acfc4-0x8a;const _0x38988f=_0x3898();let _0x189430=_0x38988f[_0x5acfc4];return _0x189430;}import{isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';async function runInstall(){const _0x562ed3=_0x1894,_0x2d65ca={'yuHHM':function(_0xef605f,_0x50c5c8){return _0xef605f(_0x50c5c8);},'Xdsyj':'npm','wsZnL':_0x562ed3(0x96),'PATGQ':'inherit','ijFvw':function(_0x5129e2,_0x14537f){return _0x5129e2===_0x14537f;},'IeLBt':'close'};return new Promise(_0x115984=>{const _0x642119=_0x562ed3,_0x178a08={'NIFZW':function(_0x29d0ed,_0x96dd4c){return _0x29d0ed(_0x96dd4c);}};console[_0x642119(0xae)](_0x642119(0xc6)+PACKAGE_NAME+_0x642119(0x9e));const _0x58e24f=spawn(_0x2d65ca[_0x642119(0xa0)],[_0x2d65ca['wsZnL'],'-g',PACKAGE_NAME+'@latest'],{'stdio':_0x2d65ca['PATGQ'],'shell':_0x2d65ca[_0x642119(0xaf)](process['platform'],'win32')});_0x58e24f['on'](_0x2d65ca[_0x642119(0x90)],_0x1ecd34=>{_0x2d65ca['yuHHM'](_0x115984,_0x1ecd34===0x0);}),_0x58e24f['on']('error',()=>{const _0x589be8=_0x642119;_0x178a08[_0x589be8(0x95)](_0x115984,![]);});});}async function updateClaudeMarketplace(){const _0xbc0065=_0x1894,_0x4bc317={'yEtvM':function(_0x1d2dd7,_0x456454){return _0x1d2dd7(_0x456454);},'eJdKp':function(_0x447182,_0x157d06,_0x2fec8e,_0x5cb156){return _0x447182(_0x157d06,_0x2fec8e,_0x5cb156);},'TjuHg':'claude','bGvwy':'marketplace','lAklP':'update','XrJnc':_0xbc0065(0xce),'FPxOE':'win32'};return new Promise(_0x3c97fe=>{const _0x429580=_0xbc0065,_0x4274f5=_0x4bc317[_0x429580(0x91)](spawn,_0x4bc317[_0x429580(0xc0)],['plugin',_0x4bc317[_0x429580(0x98)],_0x4bc317['lAklP'],_0x4bc317[_0x429580(0xb6)]],{'stdio':_0x429580(0xc2),'shell':process[_0x429580(0xad)]===_0x4bc317[_0x429580(0xcc)]});_0x4274f5['on']('close',_0x28019d=>{_0x4bc317['yEtvM'](_0x3c97fe,_0x28019d===0x0);}),_0x4274f5['on'](_0x429580(0x92),()=>{_0x3c97fe(![]);});});}async function updateClaudePlugin(_0x498baf){const _0x293b77=_0x1894,_0x29aef1={'Oxaty':function(_0x32ed18,_0x10c732){return _0x32ed18(_0x10c732);},'ctgWa':_0x293b77(0xab),'FgnKH':'update','aTQlt':_0x293b77(0xa7),'uJXcY':'--scope','suBfA':'pipe','JHWuS':function(_0x147d2c,_0x42f537){return _0x147d2c===_0x42f537;},'rnBSl':_0x293b77(0xcd),'qWuxd':_0x293b77(0x92)};return new Promise(_0x3d19c4=>{const _0x5427f4=_0x293b77,_0x2f7d4f=[_0x29aef1['ctgWa'],_0x29aef1[_0x5427f4(0xc1)],_0x29aef1[_0x5427f4(0xbe)]];_0x498baf&&_0x2f7d4f['push'](_0x29aef1['uJXcY'],_0x498baf);const _0x103b01=spawn(_0x5427f4(0xbf),_0x2f7d4f,{'stdio':_0x29aef1['suBfA'],'shell':_0x29aef1['JHWuS'](process[_0x5427f4(0xad)],_0x29aef1[_0x5427f4(0xaa)])});_0x103b01['on']('close',_0x2782a4=>{const _0x57a983=_0x5427f4;_0x29aef1[_0x57a983(0xca)](_0x3d19c4,_0x2782a4===0x0);}),_0x103b01['on'](_0x29aef1['qWuxd'],()=>{_0x29aef1['Oxaty'](_0x3d19c4,![]);});});}function _0x3898(){const _0x3508dd=['SrmwX','bGvwy','33752ENwIEt','project','\x0aReinstalling\x20','utf-8','51028ApTKgP','@latest...\x0a','535764KIqHxE','Xdsyj','85nRBooz','join','trim','\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','EvMZx','464380lEsurd','ranger@trailhead','27601qXDahM','\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.','rnBSl','plugin','.gitignore','platform','log','ijFvw',')\x20is\x20newer\x20than\x20the\x20published\x20version\x20(','version','\x0aClaude\x20marketplace\x20updated\x20(trailhead).','\x0aCould\x20not\x20check\x20latest\x20version:\x20','IUEPZ','fExTC','XrJnc','99OrNEvq','\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.','738qUwySG','opencode','20zBWznL','IdhTm','\x0a✅\x20Update\x20complete!','aTQlt','claude','TjuHg','FgnKH','pipe','Attempting\x20install\x20anyway...','\x0aCurrent\x20version:\x20','\x20skill\x20','\x0aInstalling\x20','\x20ranger-managed\x20skill(s)...','ojCNG','tImGT','Oxaty','wqFSE','FPxOE','win32','trailhead','findIndex','HYyPM','length','738nSDPMA','ahaAh','endsWith','100140NPzFFt','IeLBt','eJdKp','error','86713JCFqMY','Update\x20failed:\x20','NIFZW','install'];_0x3898=function(){return _0x3508dd;};return _0x3898();}function isSkillInstalled(_0x1ccecf,_0x2f875e,_0x5db455){const _0x11448a=_0x1894,_0x584c05={'fExTC':function(_0x50fe01,_0x11c927,_0x444bcc){return _0x50fe01(_0x11c927,_0x444bcc);}},_0x28284d=_0x5db455==='opencode'?getOpencodeSkillsDir(_0x2f875e):getSkillsDir(_0x2f875e),_0x5ded94=_0x584c05[_0x11448a(0xb5)](join,_0x28284d,_0x1ccecf);return existsSync(_0x5ded94);}async function reinstallSkills(_0x2e2961){const _0xbde658=_0x1894,_0x43ec91={'adQdM':'claude','ojCNG':function(_0x3aad01,_0x1edad1,_0x33b305,_0xc50c38){return _0x3aad01(_0x1edad1,_0x33b305,_0xc50c38);},'tImGT':_0xbde658(0xba),'vbcoJ':function(_0x366286,_0x30b429,_0x30640f){return _0x366286(_0x30b429,_0x30640f);},'ahaAh':_0xbde658(0xa9)},_0x1d5fcb=['project','user'],_0x5721bf=[];for(const _0x2a6903 of _0x1d5fcb){for(const _0x51140a of RANGER_MANAGED_SKILLS){isSkillInstalled(_0x51140a,_0x2a6903,_0x43ec91['adQdM'])&&_0x5721bf['push']({'skillName':_0x51140a,'level':_0x2a6903,'platform':_0xbde658(0xbf)}),_0x43ec91[_0xbde658(0xc8)](isSkillInstalled,_0x51140a,_0x2a6903,_0xbde658(0xba))&&_0x5721bf['push']({'skillName':_0x51140a,'level':_0x2a6903,'platform':_0x43ec91[_0xbde658(0xc9)]});}}for(const _0x223515 of _0x1d5fcb){for(const _0xb77445 of DEPRECATED_SKILLS){await _0x43ec91['vbcoJ'](removeSkill,_0xb77445,_0x223515);}}if(_0x5721bf['length']===0x0){console['log'](_0x43ec91[_0xbde658(0x8d)]);return;}console['log'](_0xbde658(0x9b)+_0x5721bf[_0xbde658(0x8b)]+_0xbde658(0xc7));for(const {skillName:_0x41fa54,level:_0x452c7c,platform:_0x7dede8}of _0x5721bf){try{await _0x43ec91['vbcoJ'](installSkill,_0x41fa54,{'level':_0x452c7c,'cliVersion':_0x2e2961,'platform':_0x7dede8});}catch(_0x5e65d9){console['warn']('\x20\x20Failed\x20to\x20reinstall\x20'+_0x7dede8+'\x20'+_0x452c7c+_0xbde658(0xc5)+_0x41fa54+':',_0x5e65d9);}}}async function ensureActiveProfileGitignored(){const _0x57d4f4=_0x1894,_0x3ecc4a={'IUEPZ':function(_0x2fb330,_0x3cf8cb,_0x372dbf){return _0x2fb330(_0x3cf8cb,_0x372dbf);},'EvMZx':function(_0x401d00){return _0x401d00();},'ZHWgB':_0x57d4f4(0xac),'GnaJL':function(_0x4ce48c,_0x8a41aa){return _0x4ce48c(_0x8a41aa);},'wqFSE':_0x57d4f4(0x9c)},_0xfa3e5=_0x3ecc4a[_0x57d4f4(0xb4)](join,_0x3ecc4a[_0x57d4f4(0xa5)](getRangerDir),_0x3ecc4a['ZHWgB']);if(!_0x3ecc4a['GnaJL'](existsSync,_0xfa3e5))return![];let _0x52c552='';try{_0x52c552=await readFile(_0xfa3e5,_0x57d4f4(0x9c));}catch{return![];}const _0x3c3605=_0x52c552['split'](/\r?\n/);if(_0x3c3605['some'](_0x4bdd1f=>_0x4bdd1f['trim']()==='active-profile.txt'))return![];let _0x324f91=_0x3c3605[_0x57d4f4(0xcf)](_0x6cd7e9=>_0x6cd7e9[_0x57d4f4(0xa3)]()==='active-feature.txt');_0x324f91===-0x1&&(_0x324f91=_0x3c3605['length']);_0x3c3605['splice'](_0x324f91,0x0,'active-profile.txt');let _0x5dead8=_0x3c3605[_0x57d4f4(0xa2)]('\x0a');!_0x5dead8[_0x57d4f4(0x8e)]('\x0a')&&(_0x5dead8+='\x0a');try{await writeFile(_0xfa3e5,_0x5dead8,_0x3ecc4a[_0x57d4f4(0xcb)]);}catch{return![];}return!![];}export async function update(){const _0x4642c2=_0x1894,_0x1693ed={'SrmwX':function(_0x3c86c6){return _0x3c86c6();},'cCjGK':'\x0aSuccessfully\x20installed\x20latest\x20version.','HYyPM':function(_0x4f4c6b,_0x4982e0){return _0x4f4c6b(_0x4982e0);},'UiYRm':function(_0x598c6a,_0x4f8941){return _0x598c6a(_0x4f8941);},'CeItz':_0x4642c2(0xb2),'KbMYZ':_0x4642c2(0xa4),'IdhTm':_0x4642c2(0xbd)},_0x50cdc5=_0x1693ed[_0x4642c2(0x97)](getCurrentVersion);console[_0x4642c2(0xae)](_0x4642c2(0xc4)+_0x50cdc5),console['log']('Checking\x20for\x20updates...');const _0x25e99f=getLatestVersion();let _0x30beca=_0x50cdc5;if(!_0x25e99f[_0x4642c2(0xb1)]){console['warn'](_0x4642c2(0xb3)+_0x25e99f['error']),console[_0x4642c2(0xae)](_0x4642c2(0xc3));const _0x45fffe=await runInstall();if(_0x45fffe)console[_0x4642c2(0xae)](_0x1693ed['cCjGK']),_0x30beca=_0x1693ed[_0x4642c2(0x97)](getCurrentVersion);else throw new Error(_0x4642c2(0x94)+_0x25e99f['error']);}else{const _0x4ba3fa=_0x25e99f[_0x4642c2(0xb1)];console[_0x4642c2(0xae)]('Latest\x20version:\x20\x20'+_0x4ba3fa);const _0x5282d0=compareVersions(_0x50cdc5,_0x4ba3fa);if(_0x5282d0===0x0)console[_0x4642c2(0xae)](_0x4642c2(0xb8));else{if(_0x5282d0<0x0)console[_0x4642c2(0xae)]('\x0aYour\x20version\x20('+_0x50cdc5+_0x4642c2(0xb0)+_0x4ba3fa+').');else{const _0x33ebee=await _0x1693ed[_0x4642c2(0x97)](runInstall);if(_0x33ebee)console['log']('\x0aSuccessfully\x20updated\x20to\x20version\x20'+_0x4ba3fa),_0x30beca=_0x4ba3fa;else throw new Error('Update\x20failed.');}}}await _0x1693ed[_0x4642c2(0x8a)](reinstallSkills,_0x30beca);const _0x15327b=await _0x1693ed[_0x4642c2(0x8a)](isMarketplaceAdded,_0x4642c2(0xce)),_0x245c09=await _0x1693ed['UiYRm'](isPluginInstalled,'ranger@trailhead');if(_0x15327b){const _0x49bbda=await updateClaudeMarketplace();_0x49bbda&&console['log'](_0x1693ed['CeItz']);}if(_0x245c09){const _0x3f3f08=await _0x1693ed[_0x4642c2(0x97)](updateClaudePlugin);_0x3f3f08&&console[_0x4642c2(0xae)](_0x1693ed['KbMYZ']);const _0x4ab628=await updateClaudePlugin(_0x4642c2(0x9a));_0x4ab628&&console['log']((_0x3f3f08?'':'\x0a')+'Claude\x20plugin\x20updated\x20(project\x20scope).');}const _0x1eacac=await _0x1693ed[_0x4642c2(0x97)](migrateActiveProfileFile);_0x1eacac&&console[_0x4642c2(0xae)]('✓\x20Migrated\x20active\x20profile\x20file');const _0x4e6270=await _0x1693ed['SrmwX'](ensureActiveProfileGitignored);console[_0x4642c2(0xae)](_0x1693ed[_0x4642c2(0xbc)]);}
@@ -1 +1 @@
1
- (function(_0x375dcb,_0x388161){const _0x39a4a3=_0x91d2,_0x4eca5a=_0x375dcb();while(!![]){try{const _0x1fc88c=-parseInt(_0x39a4a3(0x105))/0x1*(-parseInt(_0x39a4a3(0x103))/0x2)+-parseInt(_0x39a4a3(0xfb))/0x3+-parseInt(_0x39a4a3(0x119))/0x4+parseInt(_0x39a4a3(0x115))/0x5*(parseInt(_0x39a4a3(0x114))/0x6)+parseInt(_0x39a4a3(0x116))/0x7*(-parseInt(_0x39a4a3(0x10a))/0x8)+-parseInt(_0x39a4a3(0x104))/0x9*(parseInt(_0x39a4a3(0x11b))/0xa)+parseInt(_0x39a4a3(0x11c))/0xb;if(_0x1fc88c===_0x388161)break;else _0x4eca5a['push'](_0x4eca5a['shift']());}catch(_0x5411db){_0x4eca5a['push'](_0x4eca5a['shift']());}}}(_0x4f02,0xa5d71));import{writeFile,readFile,unlink}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{chromium}from'playwright';import{encrypt}from'./utils/crypto.js';import{getToken}from'./utils/keychain.js';import{buildBrowserOptionsFromSettings,getEnvDir,isEnvCi,resolveEnvVars}from'./utils/settings.js';function _0x91d2(_0x45f212,_0x2ee5d9){_0x45f212=_0x45f212-0xf1;const _0x4f02ed=_0x4f02();let _0x91d2a4=_0x4f02ed[_0x45f212];return _0x91d2a4;}import{addProfileSetupBanner}from'./utils/profileSetupBanner.js';export async function updateEnv(_0xea8bda,_0x2f4035,_0x1192dc){const _0x1927aa=_0x91d2,_0x20e8c5={'YcAru':_0x1927aa(0xf3),'lMkTi':function(_0x40a9e7){return _0x40a9e7();},'IJZAb':function(_0x151553,_0x455492,_0x236121){return _0x151553(_0x455492,_0x236121);},'fqQAZ':_0x1927aa(0x11e),'ILyru':function(_0x2b95a1,_0x548906){return _0x2b95a1(_0x548906);},'XGemR':function(_0x4e704a,_0x562ac1){return _0x4e704a===_0x562ac1;},'dXGCO':'string','XMKiV':_0x1927aa(0x10c),'dczFN':_0x1927aa(0x122),'esmlW':'\x20\x20\x20Update\x20your\x20authentication\x20as\x20needed.','eoyvc':function(_0x3f7f56,_0xdf7716){return _0x3f7f56||_0xdf7716;},'XBkmG':'\x0aThe\x20browser\x20closed\x20unexpectedly\x20before\x20authentication\x20could\x20be\x20saved.','rOJKF':_0x1927aa(0xfe),'OlfxU':_0x1927aa(0xf5),'XVVVA':'\x20\x20You\x20can\x20safely\x20commit\x20this\x20file\x20to\x20git.','TEyxK':_0x1927aa(0x10f),'gXvcl':_0x1927aa(0x111)},_0x51f700=getEnvDir(_0xea8bda),_0x46d595=_0x20e8c5[_0x1927aa(0x101)](join,_0x51f700,_0x1927aa(0xf1)),_0x30f7da=join(_0x51f700,'auth.json'),_0x48b617=_0x30f7da+_0x20e8c5['fqQAZ'],_0x11cd7d=process[_0x1927aa(0x100)][_0x1927aa(0x121)]&&process['stdout'][_0x1927aa(0x121)];if(!_0x11cd7d)throw new Error('Non-interactive\x20mode\x20detected.\x0aThe\x20\x22ranger\x20profile\x20update\x22\x20command\x20requires\x20interactive\x20browser\x20authentication\x20and\x20cannot\x20be\x20run\x20in\x20non-TTY\x20environments\x20(CI,\x20scripts,\x20Claude\x20Code).\x0aTo\x20update\x20profile\x20authentication:\x0a\x20\x201.\x20Run\x20\x22ranger\x20profile\x20update\x20<name>\x22\x20in\x20an\x20interactive\x20terminal\x0a\x20\x202.\x20Commit\x20the\x20updated\x20encrypted\x20auth\x20file\x20to\x20git');if(!existsSync(_0x51f700))throw new Error('Profile\x20\x22'+_0xea8bda+'\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0xea8bda);if(!_0x20e8c5['ILyru'](existsSync,_0x46d595))throw new Error('Config\x20not\x20found\x20at\x20'+_0x46d595+'.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0xea8bda);const _0x5d9b11=await readFile(_0x46d595,_0x1927aa(0xf5)),_0x431c77=JSON['parse'](_0x5d9b11),_0x8410b2=resolveEnvVars(_0x431c77),_0x230fb3=_0x20e8c5[_0x1927aa(0x11d)](typeof _0x8410b2[_0x1927aa(0xf6)],_0x20e8c5[_0x1927aa(0x113)])?_0x8410b2[_0x1927aa(0xf6)]:undefined,_0x223749=_0x20e8c5['ILyru'](existsSync,_0x30f7da),_0xc00b9a=isEnvCi(_0xea8bda);_0x2f4035?.['trackPhaseStart'](_0x20e8c5['XMKiV']),console[_0x1927aa(0x107)](_0x20e8c5['dczFN']),console['log']('\x20\x20\x20A\x20browser\x20will\x20open\x20with\x20your\x20existing\x20session\x20(if\x20any).'),console[_0x1927aa(0x107)](_0x20e8c5[_0x1927aa(0x117)]),console['log']('\x20\x20\x20When\x20you\x20are\x20done,\x20close\x20the\x20browser.\x0a');const {launchOptions:_0x1cb1f6,contextOptions:_0x2f0a3c}=_0x20e8c5['IJZAb'](buildBrowserOptionsFromSettings,_0x8410b2,{'headless':![],'storageStatePath':_0x223749?_0x30f7da:undefined}),_0x23ee43=await chromium[_0x1927aa(0x10e)](_0x1cb1f6);let _0x2587bf=null;try{_0x2587bf=await _0x23ee43[_0x1927aa(0x11f)](_0x2f0a3c),await _0x20e8c5[_0x1927aa(0xf4)](addProfileSetupBanner,_0x2587bf);const _0x1c9fe7=await _0x2587bf['newPage']();await _0x1c9fe7['goto'](_0x20e8c5[_0x1927aa(0xf9)](_0x230fb3,_0x1927aa(0x10d)));let _0x5ad3a6=![];await new Promise(_0x34d6eb=>{_0x1c9fe7['on']('close',async()=>{const _0x59fc77=_0x91d2;try{console[_0x59fc77(0x107)](_0x20e8c5['YcAru']),await _0x2587bf?.['storageState']({'path':_0x30f7da}),_0x5ad3a6=!![];}catch{}_0x20e8c5[_0x59fc77(0x112)](_0x34d6eb);});});if(!_0x5ad3a6){console['log'](_0x20e8c5[_0x1927aa(0xf7)]);!_0x8410b2[_0x1927aa(0x106)]&&(console[_0x1927aa(0x107)](_0x20e8c5['rOJKF']),console['log'](_0x1927aa(0xfc)+_0xea8bda+'\x20safeMode\x20true\x0a'));throw new Error(_0x1927aa(0x118));}}finally{_0x2587bf&&await _0x2587bf[_0x1927aa(0xfd)]()['catch'](()=>{}),await _0x23ee43[_0x1927aa(0xfd)]()['catch'](()=>{});}if(_0xc00b9a){const _0x2bbd1b=await _0x20e8c5[_0x1927aa(0x101)](readFile,_0x30f7da,_0x20e8c5[_0x1927aa(0x11a)]),_0x39d93c=await getToken();if(!_0x39d93c)console[_0x1927aa(0xfa)]('\x20\x20Could\x20not\x20encrypt:\x20No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]'),console[_0x1927aa(0x107)]('✓\x20Auth\x20state\x20saved\x20to:\x20'+_0x30f7da);else{const _0x293a09=encrypt(_0x2bbd1b,_0x39d93c);await writeFile(_0x48b617,_0x293a09),await _0x20e8c5['ILyru'](unlink,_0x30f7da),console['log'](_0x1927aa(0x123)+_0x48b617),console['log'](_0x20e8c5[_0x1927aa(0x102)]),console['log'](_0x20e8c5['TEyxK']);}}else console['log'](_0x1927aa(0x120)+_0x30f7da);_0x2f4035?.['trackPhaseEnd']('browser_auth'),_0x2f4035?.['trackPhaseStart'](_0x20e8c5[_0x1927aa(0x108)]),_0x431c77['browser']=_0x431c77['browser']||{},_0x431c77['browser'][_0x1927aa(0x10b)]=_0x431c77[_0x1927aa(0xff)][_0x1927aa(0x10b)]||{},_0x431c77['browser']['contextOptions'][_0x1927aa(0xf8)]=_0x30f7da,_0x20e8c5[_0x1927aa(0x11d)](_0x1192dc?.['allowInsecureLocalhost'],!![])&&(_0x431c77['allowInsecureLocalhost']=!![]),await writeFile(_0x46d595,JSON[_0x1927aa(0xf2)](_0x431c77,null,0x2)),console['log'](_0x1927aa(0x110)+_0x46d595),_0x2f4035?.[_0x1927aa(0x109)](_0x1927aa(0x111)),console[_0x1927aa(0x107)]('\x0a✅\x20Profile\x20\x22'+_0xea8bda+'\x22\x20authentication\x20updated');}function _0x4f02(){const _0x1286cf=['XGemR','.enc','newContext','✓\x20Auth\x20state\x20saved\x20to:\x20','isTTY','\x0a📋\x20Authentication\x20Update','✓\x20Encrypted\x20auth\x20saved\x20to:\x20','settings.json','stringify','Saving\x20authentication\x20state...','ILyru','utf-8','baseUrl','XBkmG','storageState','eoyvc','error','3545355aSPczj','Enable\x20safe\x20mode\x20and\x20try\x20again:\x20ranger\x20profile\x20config\x20set\x20','close','This\x20can\x20happen\x20due\x20to\x20a\x20browser\x20compatibility\x20issue\x20on\x20some\x20systems.\x0a','browser','stdin','IJZAb','XVVVA','2IxakNK','531IGigbX','963513pzVDzM','safeMode','log','gXvcl','trackPhaseEnd','56eFfIvx','contextOptions','browser_auth','about:blank','launch','\x20\x20Run\x20ranger\x20setup\x20in\x20CI\x20to\x20decrypt\x20at\x20runtime.','✓\x20Updated\x20config:\x20','config_write','lMkTi','dXGCO','1275054errbdG','25TCCpPY','1100813utHLWG','esmlW','Browser\x20closed\x20before\x20authentication\x20was\x20saved.','4067944vDWsEa','OlfxU','172570EVFhPW','32680670QhwrFE'];_0x4f02=function(){return _0x1286cf;};return _0x4f02();}
1
+ (function(_0x103633,_0x5c39cf){const _0xa92198=_0x808f,_0x3e6fac=_0x103633();while(!![]){try{const _0x3dc957=parseInt(_0xa92198(0x157))/0x1*(parseInt(_0xa92198(0x134))/0x2)+-parseInt(_0xa92198(0x147))/0x3*(parseInt(_0xa92198(0x12d))/0x4)+parseInt(_0xa92198(0x13e))/0x5*(parseInt(_0xa92198(0x155))/0x6)+-parseInt(_0xa92198(0x13c))/0x7*(-parseInt(_0xa92198(0x14d))/0x8)+-parseInt(_0xa92198(0x150))/0x9*(-parseInt(_0xa92198(0x148))/0xa)+parseInt(_0xa92198(0x13d))/0xb*(parseInt(_0xa92198(0x14b))/0xc)+-parseInt(_0xa92198(0x139))/0xd;if(_0x3dc957===_0x5c39cf)break;else _0x3e6fac['push'](_0x3e6fac['shift']());}catch(_0x530012){_0x3e6fac['push'](_0x3e6fac['shift']());}}}(_0x1152,0x6f9cf));import{writeFile,readFile,unlink}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{chromium}from'playwright';function _0x808f(_0x244220,_0x12225f){_0x244220=_0x244220-0x129;const _0x1152a4=_0x1152();let _0x808f67=_0x1152a4[_0x244220];return _0x808f67;}import{encrypt}from'./utils/crypto.js';import{getToken}from'./utils/keychain.js';import{buildBrowserOptionsFromSettings,getEnvDir,isEnvCi,resolveEnvVars}from'./utils/settings.js';import{addProfileSetupBanner}from'./utils/profileSetupBanner.js';export async function updateEnv(_0x1d7609,_0x3eceda,_0x33c797){const _0x558eab=_0x808f,_0x7d81fe={'xLyYW':function(_0x48ee84,_0x49024b){return _0x48ee84(_0x49024b);},'AESwW':'settings.json','XstTY':_0x558eab(0x132),'JCEXE':function(_0x399f44,_0x1c5096,_0x322b50){return _0x399f44(_0x1c5096,_0x322b50);},'xvoeK':'utf-8','VvLfF':function(_0x51d290,_0x2314b7){return _0x51d290===_0x2314b7;},'CzHny':_0x558eab(0x137),'mNFrO':'\x20\x20\x20A\x20browser\x20will\x20open\x20with\x20your\x20existing\x20session\x20(if\x20any).','QQKTA':_0x558eab(0x12a),'NNbQu':_0x558eab(0x130),'ABEwH':'Browser\x20closed\x20before\x20authentication\x20was\x20saved.','cgVYT':'\x20\x20Could\x20not\x20encrypt:\x20No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','jZUjh':function(_0x21e9e3,_0x588d7b,_0xdc1fbe){return _0x21e9e3(_0x588d7b,_0xdc1fbe);},'RGHmL':_0x558eab(0x14e),'ZdvFJ':'\x20\x20Run\x20ranger\x20setup\x20in\x20CI\x20to\x20decrypt\x20at\x20runtime.','DzubI':'config_write','eLdLx':function(_0x292a58,_0x4dba6f){return _0x292a58===_0x4dba6f;},'mVZKx':function(_0x179f8a,_0x2bfc5d,_0xee9339){return _0x179f8a(_0x2bfc5d,_0xee9339);}},_0x5da9fb=_0x7d81fe[_0x558eab(0x12b)](getEnvDir,_0x1d7609),_0x3985db=join(_0x5da9fb,_0x7d81fe['AESwW']),_0x4115d7=join(_0x5da9fb,_0x7d81fe['XstTY']),_0x2e3e97=_0x4115d7+'.enc',_0x4ee966=process['stdin'][_0x558eab(0x159)]&&process[_0x558eab(0x144)][_0x558eab(0x159)];if(!_0x4ee966)throw new Error('Non-interactive\x20mode\x20detected.\x0aThe\x20\x22ranger\x20profile\x20update\x22\x20command\x20requires\x20interactive\x20browser\x20authentication\x20and\x20cannot\x20be\x20run\x20in\x20non-TTY\x20environments\x20(CI,\x20scripts,\x20Claude\x20Code).\x0aTo\x20update\x20profile\x20authentication:\x0a\x20\x201.\x20Run\x20\x22ranger\x20profile\x20update\x20<name>\x22\x20in\x20an\x20interactive\x20terminal\x0a\x20\x202.\x20Commit\x20the\x20updated\x20encrypted\x20auth\x20file\x20to\x20git');if(!existsSync(_0x5da9fb))throw new Error('Profile\x20\x22'+_0x1d7609+_0x558eab(0x133)+_0x1d7609);if(!existsSync(_0x3985db))throw new Error('Config\x20not\x20found\x20at\x20'+_0x3985db+'.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x1d7609);const _0x182982=await _0x7d81fe[_0x558eab(0x149)](readFile,_0x3985db,_0x7d81fe['xvoeK']),_0x1cdd59=JSON[_0x558eab(0x131)](_0x182982),_0xe086bf=resolveEnvVars(_0x1cdd59),_0x4499cb=_0x7d81fe[_0x558eab(0x12f)](typeof _0xe086bf['baseUrl'],'string')?_0xe086bf[_0x558eab(0x142)]:undefined,_0x3285e7=existsSync(_0x4115d7),_0x2e5b67=_0x7d81fe[_0x558eab(0x12b)](isEnvCi,_0x1d7609);_0x3eceda?.[_0x558eab(0x13f)](_0x558eab(0x136)),console['log'](_0x7d81fe[_0x558eab(0x12c)]),console['log'](_0x7d81fe['mNFrO']),console[_0x558eab(0x129)](_0x7d81fe['QQKTA']),console['log']('\x20\x20\x20When\x20you\x20are\x20done,\x20close\x20the\x20browser.\x0a');const {launchOptions:_0x3668e3,contextOptions:_0x363c14}=buildBrowserOptionsFromSettings(_0xe086bf,{'headless':![],'storageStatePath':_0x3285e7?_0x4115d7:undefined}),_0xf504e8=await chromium[_0x558eab(0x146)](_0x3668e3);let _0x3df0e7=null;try{_0x3df0e7=await _0xf504e8['newContext'](_0x363c14),await _0x7d81fe[_0x558eab(0x12b)](addProfileSetupBanner,_0x3df0e7);const _0x34d891=await _0x3df0e7['newPage']();await _0x34d891[_0x558eab(0x14f)](_0x4499cb||_0x558eab(0x12e));let _0x410125=![];await new Promise(_0x2b178c=>{const _0xf81483=_0x558eab;_0x34d891['on'](_0xf81483(0x143),async()=>{const _0x3059a0=_0xf81483;try{console[_0x3059a0(0x129)]('Saving\x20authentication\x20state...'),await _0x3df0e7?.[_0x3059a0(0x135)]({'path':_0x4115d7}),_0x410125=!![];}catch{}_0x2b178c();});});if(!_0x410125){console[_0x558eab(0x129)](_0x7d81fe[_0x558eab(0x138)]);!_0xe086bf['safeMode']&&(console[_0x558eab(0x129)](_0x558eab(0x140)),console['log']('Enable\x20safe\x20mode\x20and\x20try\x20again:\x20ranger\x20profile\x20config\x20set\x20'+_0x1d7609+'\x20safeMode\x20true\x0a'));throw new Error(_0x7d81fe[_0x558eab(0x14a)]);}}finally{_0x3df0e7&&await _0x3df0e7['close']()['catch'](()=>{}),await _0xf504e8[_0x558eab(0x143)]()['catch'](()=>{});}if(_0x2e5b67){const _0x4945a4=await _0x7d81fe[_0x558eab(0x149)](readFile,_0x4115d7,'utf-8'),_0x580391=await getToken();if(!_0x580391)console[_0x558eab(0x141)](_0x7d81fe['cgVYT']),console['log']('✓\x20Auth\x20state\x20saved\x20to:\x20'+_0x4115d7);else{const _0x3df7c6=encrypt(_0x4945a4,_0x580391);await _0x7d81fe[_0x558eab(0x13b)](writeFile,_0x2e3e97,_0x3df7c6),await _0x7d81fe['xLyYW'](unlink,_0x4115d7),console['log']('✓\x20Encrypted\x20auth\x20saved\x20to:\x20'+_0x2e3e97),console[_0x558eab(0x129)](_0x7d81fe[_0x558eab(0x158)]),console[_0x558eab(0x129)](_0x7d81fe['ZdvFJ']);}}else console[_0x558eab(0x129)]('✓\x20Auth\x20state\x20saved\x20to:\x20'+_0x4115d7);_0x3eceda?.['trackPhaseEnd']('browser_auth'),_0x3eceda?.['trackPhaseStart'](_0x7d81fe[_0x558eab(0x145)]),_0x1cdd59[_0x558eab(0x14c)]=_0x1cdd59[_0x558eab(0x14c)]||{},_0x1cdd59[_0x558eab(0x14c)][_0x558eab(0x156)]=_0x1cdd59[_0x558eab(0x14c)][_0x558eab(0x156)]||{},_0x1cdd59['browser']['contextOptions'][_0x558eab(0x135)]=_0x4115d7,_0x7d81fe['eLdLx'](_0x33c797?.['allowInsecureLocalhost'],!![])&&(_0x1cdd59[_0x558eab(0x154)]=!![]),await _0x7d81fe[_0x558eab(0x152)](writeFile,_0x3985db,JSON[_0x558eab(0x13a)](_0x1cdd59,null,0x2)),console['log']('✓\x20Updated\x20config:\x20'+_0x3985db),_0x3eceda?.[_0x558eab(0x153)](_0x7d81fe[_0x558eab(0x145)]),console[_0x558eab(0x129)]('\x0a✅\x20Profile\x20\x22'+_0x1d7609+_0x558eab(0x151));}function _0x1152(){const _0x4eec1e=['VvLfF','\x0aThe\x20browser\x20closed\x20unexpectedly\x20before\x20authentication\x20could\x20be\x20saved.','parse','auth.json','\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20','26yAqOmV','storageState','browser_auth','\x0a📋\x20Authentication\x20Update','NNbQu','19579911lclGVR','stringify','jZUjh','391769rtotkL','88GEfgbN','407975kKmGii','trackPhaseStart','This\x20can\x20happen\x20due\x20to\x20a\x20browser\x20compatibility\x20issue\x20on\x20some\x20systems.\x0a','error','baseUrl','close','stdout','DzubI','launch','23169CDuiFg','1170nrDVXj','JCEXE','ABEwH','194328NvWzJJ','browser','88nugnjI','\x20\x20You\x20can\x20safely\x20commit\x20this\x20file\x20to\x20git.','goto','57663SabWVA','\x22\x20authentication\x20updated','mVZKx','trackPhaseEnd','allowInsecureLocalhost','12orCwUh','contextOptions','24674hPgtwx','RGHmL','isTTY','log','\x20\x20\x20Update\x20your\x20authentication\x20as\x20needed.','xLyYW','CzHny','8qpZZqv','about:blank'];_0x1152=function(){return _0x4eec1e;};return _0x1152();}
@@ -1 +1 @@
1
- function _0x4c4d(){const _0x12ae37=['800152PIJszx','30YULYPG','99gCoNcz','1kRvhdI','log','ZCoCp','\x0a✓\x20Now\x20using\x20profile\x20\x22','ZbnNd','14948220FAXQpC','1609680rneyur','.\x20Run\x20first:\x20ranger\x20profile\x20add\x20','settings.json','589432NccWiS','Config\x20not\x20found\x20at\x20','5705110brYgWm','Profile\x20\x22','535028pFIdnI','1131515HeAEJa'];_0x4c4d=function(){return _0x12ae37;};return _0x4c4d();}(function(_0x254686,_0x40e42a){const _0x5d54eb=_0x2f80,_0x590eb8=_0x254686();while(!![]){try{const _0x2d4d1e=-parseInt(_0x5d54eb(0xad))/0x1*(parseInt(_0x5d54eb(0xb6))/0x2)+-parseInt(_0x5d54eb(0xb3))/0x3+-parseInt(_0x5d54eb(0xa8))/0x4+parseInt(_0x5d54eb(0xa6))/0x5+-parseInt(_0x5d54eb(0xab))/0x6*(-parseInt(_0x5d54eb(0xa9))/0x7)+parseInt(_0x5d54eb(0xaa))/0x8*(parseInt(_0x5d54eb(0xac))/0x9)+-parseInt(_0x5d54eb(0xb2))/0xa;if(_0x2d4d1e===_0x40e42a)break;else _0x590eb8['push'](_0x590eb8['shift']());}catch(_0x13ae12){_0x590eb8['push'](_0x590eb8['shift']());}}}(_0x4c4d,0x8ff21));import{join}from'path';function _0x2f80(_0x1d9df0,_0x25043d){_0x1d9df0=_0x1d9df0-0xa5;const _0x4c4d9c=_0x4c4d();let _0x2f80a9=_0x4c4d9c[_0x1d9df0];return _0x2f80a9;}import{existsSync}from'fs';import{getEnvDir}from'./utils/settings.js';import{writeActiveProfileName}from'./utils/activeProfile.js';export async function useEnv(_0x41e647){const _0x557289=_0x2f80,_0x11e053={'ZCoCp':_0x557289(0xb5),'ZbnNd':function(_0x323616,_0x15edb2){return _0x323616(_0x15edb2);}},_0x4160a7=getEnvDir(_0x41e647),_0x2717d5=join(_0x4160a7,_0x11e053[_0x557289(0xaf)]);if(!existsSync(_0x4160a7))throw new Error(_0x557289(0xa7)+_0x41e647+'\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x41e647);if(!_0x11e053[_0x557289(0xb1)](existsSync,_0x2717d5))throw new Error(_0x557289(0xa5)+_0x2717d5+_0x557289(0xb4)+_0x41e647);await _0x11e053[_0x557289(0xb1)](writeActiveProfileName,_0x41e647),console[_0x557289(0xae)](_0x557289(0xb0)+_0x41e647+'\x22');}
1
+ function _0x2bc0(_0x4b99f0,_0x443cbb){_0x4b99f0=_0x4b99f0-0xea;const _0x2fd371=_0x2fd3();let _0x2bc0d8=_0x2fd371[_0x4b99f0];return _0x2bc0d8;}(function(_0x56dbac,_0x33c571){const _0x521c4d=_0x2bc0,_0x3db2ae=_0x56dbac();while(!![]){try{const _0x1006c0=-parseInt(_0x521c4d(0xea))/0x1+-parseInt(_0x521c4d(0xf5))/0x2*(-parseInt(_0x521c4d(0xec))/0x3)+parseInt(_0x521c4d(0xeb))/0x4+-parseInt(_0x521c4d(0xee))/0x5+parseInt(_0x521c4d(0xf4))/0x6+parseInt(_0x521c4d(0xf2))/0x7+parseInt(_0x521c4d(0xf3))/0x8*(parseInt(_0x521c4d(0xed))/0x9);if(_0x1006c0===_0x33c571)break;else _0x3db2ae['push'](_0x3db2ae['shift']());}catch(_0x684350){_0x3db2ae['push'](_0x3db2ae['shift']());}}}(_0x2fd3,0x31d83));import{join}from'path';import{existsSync}from'fs';import{getEnvDir}from'./utils/settings.js';import{writeActiveProfileName}from'./utils/activeProfile.js';function _0x2fd3(){const _0x5590c0=['46wVeCKJ','266062oWOITz','550748cHwlUu','24597KzPCol','4662VDLpHo','1159025qZmbNL','Profile\x20\x22','settings.json','Config\x20not\x20found\x20at\x20','387968nQecnf','280OIWgEF','1813272VkktPc'];_0x2fd3=function(){return _0x5590c0;};return _0x2fd3();}export async function useEnv(_0x1abb42){const _0x24348f=_0x2bc0,_0x2ff786={'HOytQ':function(_0x93847f,_0x35eba7){return _0x93847f(_0x35eba7);},'XZiQZ':function(_0x2ba2fe,_0x8101e1,_0xe76234){return _0x2ba2fe(_0x8101e1,_0xe76234);},'vAbOo':function(_0x56c43e,_0x5e2d49){return _0x56c43e(_0x5e2d49);}},_0x5a826b=_0x2ff786['HOytQ'](getEnvDir,_0x1abb42),_0x422c1a=_0x2ff786['XZiQZ'](join,_0x5a826b,_0x24348f(0xf0));if(!existsSync(_0x5a826b))throw new Error(_0x24348f(0xef)+_0x1abb42+'\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x1abb42);if(!_0x2ff786['vAbOo'](existsSync,_0x422c1a))throw new Error(_0x24348f(0xf1)+_0x422c1a+'.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x1abb42);await writeActiveProfileName(_0x1abb42),console['log']('\x0a✓\x20Now\x20using\x20profile\x20\x22'+_0x1abb42+'\x22');}
@@ -1 +1 @@
1
- (function(_0x2481ee,_0x1f7a27){const _0x329d7f=_0x52f6,_0x3cef56=_0x2481ee();while(!![]){try{const _0x4e7afe=parseInt(_0x329d7f(0x12b))/0x1+-parseInt(_0x329d7f(0x127))/0x2+parseInt(_0x329d7f(0x12d))/0x3*(parseInt(_0x329d7f(0x134))/0x4)+-parseInt(_0x329d7f(0x126))/0x5*(parseInt(_0x329d7f(0x12c))/0x6)+parseInt(_0x329d7f(0x129))/0x7+parseInt(_0x329d7f(0x12e))/0x8+parseInt(_0x329d7f(0x130))/0x9*(parseInt(_0x329d7f(0x128))/0xa);if(_0x4e7afe===_0x1f7a27)break;else _0x3cef56['push'](_0x3cef56['shift']());}catch(_0x260f98){_0x3cef56['push'](_0x3cef56['shift']());}}}(_0x4c7c,0xf144b));import{existsSync}from'fs';import{mkdir,readFile,rename,unlink,writeFile}from'fs/promises';import{join}from'path';import{getRangerDir}from'./rangerRoot.js';function _0x4c7c(){const _0x364c06=['3ZycXLC','1804528hvTHUU','GyDWV','9hSpmML','gQGdy','yGwUI','utf-8','2613188tRHVyd','nQZmy','uifNA','eNtKT','trim','kgmjx','aBNfi','285Pomezz','1519726PXgoxN','5834310yeNudI','5593112ZXcPqg','WwSyN','346975vWrNtJ','90546NbMztv'];_0x4c7c=function(){return _0x364c06;};return _0x4c7c();}const ACTIVE_PROFILE_FILE='active-profile.txt',LEGACY_ACTIVE_ENV_FILE='active-env.txt';function getActiveProfilePath(){const _0x53f0ea=_0x52f6,_0x3f33f2={'gQGdy':function(_0xdde2e3){return _0xdde2e3();}};return join(_0x3f33f2[_0x53f0ea(0x131)](getRangerDir),ACTIVE_PROFILE_FILE);}function getLegacyActiveEnvPath(){const _0x311fe5={'auZqO':function(_0x39fb6f,_0x377376,_0x4a50b0){return _0x39fb6f(_0x377376,_0x4a50b0);},'rMbBO':function(_0x38ac7c){return _0x38ac7c();}};return _0x311fe5['auZqO'](join,_0x311fe5['rMbBO'](getRangerDir),LEGACY_ACTIVE_ENV_FILE);}async function migrateLegacyActiveEnv(){const _0x1594f0=_0x52f6,_0x357589={'qRrla':function(_0x39791c,_0x3483ea){return _0x39791c(_0x3483ea);},'aBNfi':function(_0x5c80a6,_0x4e7556,_0x124d7b){return _0x5c80a6(_0x4e7556,_0x124d7b);},'nQZmy':_0x1594f0(0x133),'FIThC':function(_0x24c3a0,_0x230844,_0x4cfaee,_0x47ded8){return _0x24c3a0(_0x230844,_0x4cfaee,_0x47ded8);}},_0x308129=getLegacyActiveEnvPath();if(!_0x357589['qRrla'](existsSync,_0x308129))return null;let _0x384e23=null;try{_0x384e23=(await _0x357589[_0x1594f0(0x125)](readFile,_0x308129,_0x357589[_0x1594f0(0x135)]))[_0x1594f0(0x123)]()||null;}catch{_0x384e23=null;}if(!_0x384e23)return null;const _0x31ce54=getActiveProfilePath();try{await rename(_0x308129,_0x31ce54);}catch{try{const _0x3e7693=getRangerDir();await _0x357589['aBNfi'](mkdir,_0x3e7693,{'recursive':!![]}),await _0x357589['FIThC'](writeFile,_0x31ce54,_0x384e23,_0x1594f0(0x133)),await unlink(_0x308129);}catch{}}return _0x384e23;}export async function readActiveProfileName(){const _0xed0634=_0x52f6,_0x40a4a2={'GyDWV':function(_0x20ac86){return _0x20ac86();},'yGwUI':function(_0x2acb0d,_0x1c1d2e){return _0x2acb0d(_0x1c1d2e);},'eNtKT':function(_0x4be443,_0x468912,_0x51085b){return _0x4be443(_0x468912,_0x51085b);},'FadnJ':'utf-8'},_0x3402c8=_0x40a4a2[_0xed0634(0x12f)](getActiveProfilePath);if(_0x40a4a2[_0xed0634(0x132)](existsSync,_0x3402c8))try{return(await _0x40a4a2[_0xed0634(0x137)](readFile,_0x3402c8,_0x40a4a2['FadnJ']))['trim']()||null;}catch{return null;}return await migrateLegacyActiveEnv();}export async function writeActiveProfileName(_0x166af6){const _0x3a4d6a=_0x52f6,_0x4b885f={'uifNA':function(_0x5e2e4b){return _0x5e2e4b();},'dblTQ':function(_0x5e673d){return _0x5e673d();},'FwNPQ':function(_0x50bd3c,_0x444f40,_0x5354e1,_0x37dec6){return _0x50bd3c(_0x444f40,_0x5354e1,_0x37dec6);},'GHOYO':function(_0x2f7da4,_0x3315ac){return _0x2f7da4(_0x3315ac);}},_0x31489e=_0x4b885f[_0x3a4d6a(0x136)](getRangerDir);await mkdir(_0x31489e,{'recursive':!![]});const _0x326fbf=_0x4b885f['dblTQ'](getActiveProfilePath);await _0x4b885f['FwNPQ'](writeFile,_0x326fbf,_0x166af6,_0x3a4d6a(0x133));const _0x2ae301=getLegacyActiveEnvPath();if(existsSync(_0x2ae301))try{await _0x4b885f['GHOYO'](unlink,_0x2ae301);}catch{}}function _0x52f6(_0x224e5c,_0x374197){_0x224e5c=_0x224e5c-0x123;const _0x4c7c4e=_0x4c7c();let _0x52f634=_0x4c7c4e[_0x224e5c];return _0x52f634;}export async function migrateActiveProfileFile(){const _0xefafe8=_0x52f6,_0x4c3b1c={'WwSyN':function(_0x23b831){return _0x23b831();},'kgmjx':function(_0x1a1e1d,_0x2e0077){return _0x1a1e1d!==_0x2e0077;}},_0x32d560=await _0x4c3b1c[_0xefafe8(0x12a)](migrateLegacyActiveEnv);return _0x4c3b1c[_0xefafe8(0x124)](_0x32d560,null);}
1
+ const _0x141b90=_0x53ac;(function(_0x725016,_0x437daa){const _0x500bd1=_0x53ac,_0x5c3976=_0x725016();while(!![]){try{const _0x31aac5=parseInt(_0x500bd1(0x19b))/0x1+-parseInt(_0x500bd1(0x199))/0x2*(parseInt(_0x500bd1(0x18f))/0x3)+-parseInt(_0x500bd1(0x18e))/0x4+-parseInt(_0x500bd1(0x192))/0x5+parseInt(_0x500bd1(0x190))/0x6*(parseInt(_0x500bd1(0x197))/0x7)+parseInt(_0x500bd1(0x18b))/0x8+-parseInt(_0x500bd1(0x189))/0x9;if(_0x31aac5===_0x437daa)break;else _0x5c3976['push'](_0x5c3976['shift']());}catch(_0x4c8ac4){_0x5c3976['push'](_0x5c3976['shift']());}}}(_0x2353,0x36bdd));import{existsSync}from'fs';function _0x53ac(_0x18a47b,_0x110499){_0x18a47b=_0x18a47b-0x189;const _0x23533a=_0x2353();let _0x53ac47=_0x23533a[_0x18a47b];return _0x53ac47;}import{mkdir,readFile,rename,unlink,writeFile}from'fs/promises';import{join}from'path';import{getRangerDir}from'./rangerRoot.js';const ACTIVE_PROFILE_FILE='active-profile.txt',LEGACY_ACTIVE_ENV_FILE=_0x141b90(0x196);function getActiveProfilePath(){return join(getRangerDir(),ACTIVE_PROFILE_FILE);}function getLegacyActiveEnvPath(){const _0x28c3e5={'LKemo':function(_0x36623e){return _0x36623e();}};return join(_0x28c3e5['LKemo'](getRangerDir),LEGACY_ACTIVE_ENV_FILE);}async function migrateLegacyActiveEnv(){const _0x1947e0=_0x141b90,_0xeac425={'ShBhU':function(_0xc35e1b,_0xb4c4a1,_0x4a5bc3){return _0xc35e1b(_0xb4c4a1,_0x4a5bc3);},'xpEJF':function(_0x30f1c6){return _0x30f1c6();}},_0x52375e=getLegacyActiveEnvPath();if(!existsSync(_0x52375e))return null;let _0xf02d=null;try{_0xf02d=(await readFile(_0x52375e,'utf-8'))[_0x1947e0(0x19a)]()||null;}catch{_0xf02d=null;}if(!_0xf02d)return null;const _0x20d71e=getActiveProfilePath();try{await _0xeac425[_0x1947e0(0x191)](rename,_0x52375e,_0x20d71e);}catch{try{const _0x5bb0c5=_0xeac425[_0x1947e0(0x193)](getRangerDir);await mkdir(_0x5bb0c5,{'recursive':!![]}),await writeFile(_0x20d71e,_0xf02d,_0x1947e0(0x18d)),await unlink(_0x52375e);}catch{}}return _0xf02d;}function _0x2353(){const _0x2d003a=['1720719cgaOsf','hhFKs','46dHSglo','trim','369321fpdLqM','4400154JqaiKW','mcwZy','3287272SzGsnX','mTWey','utf-8','567096ExfRbk','4857PjBxmn','6TpYxkv','ShBhU','669545svjopj','xpEJF','lmxnS','cBVTm','active-env.txt'];_0x2353=function(){return _0x2d003a;};return _0x2353();}export async function readActiveProfileName(){const _0x1cc090=_0x141b90,_0x58e829={'mTWey':'utf-8','vQzJy':function(_0x461701){return _0x461701();}},_0x4db13b=getActiveProfilePath();if(existsSync(_0x4db13b))try{return(await readFile(_0x4db13b,_0x58e829[_0x1cc090(0x18c)]))['trim']()||null;}catch{return null;}return await _0x58e829['vQzJy'](migrateLegacyActiveEnv);}export async function writeActiveProfileName(_0x354643){const _0x1bb507=_0x141b90,_0x588edb={'mcwZy':function(_0x5df369,_0x3df9ce,_0x2e284b){return _0x5df369(_0x3df9ce,_0x2e284b);},'XEEdT':function(_0x3c4955,_0x5e496b,_0x4b7092,_0x25207a){return _0x3c4955(_0x5e496b,_0x4b7092,_0x25207a);},'hhFKs':_0x1bb507(0x18d),'cBVTm':function(_0x153771){return _0x153771();},'lmxnS':function(_0x27afc7,_0x3e03a7){return _0x27afc7(_0x3e03a7);}},_0x50fe3a=getRangerDir();await _0x588edb[_0x1bb507(0x18a)](mkdir,_0x50fe3a,{'recursive':!![]});const _0x32cc21=getActiveProfilePath();await _0x588edb['XEEdT'](writeFile,_0x32cc21,_0x354643,_0x588edb[_0x1bb507(0x198)]);const _0x3c1ccb=_0x588edb[_0x1bb507(0x195)](getLegacyActiveEnvPath);if(existsSync(_0x3c1ccb))try{await _0x588edb[_0x1bb507(0x194)](unlink,_0x3c1ccb);}catch{}}export async function migrateActiveProfileFile(){const _0x2433ea={'ItrMb':function(_0x5a8aa5){return _0x5a8aa5();}},_0x5a712f=await _0x2433ea['ItrMb'](migrateLegacyActiveEnv);return _0x5a712f!==null;}
@@ -1 +1 @@
1
- const _0x5151c9=_0x46c6;(function(_0x41283f,_0x5de2c5){const _0x1dfdb8=_0x46c6,_0x7d1c90=_0x41283f();while(!![]){try{const _0x17a2dd=-parseInt(_0x1dfdb8(0xe6))/0x1+parseInt(_0x1dfdb8(0xe4))/0x2*(-parseInt(_0x1dfdb8(0xea))/0x3)+parseInt(_0x1dfdb8(0xf5))/0x4*(parseInt(_0x1dfdb8(0xf4))/0x5)+-parseInt(_0x1dfdb8(0xf3))/0x6*(parseInt(_0x1dfdb8(0xe1))/0x7)+parseInt(_0x1dfdb8(0xf2))/0x8+-parseInt(_0x1dfdb8(0xe2))/0x9+parseInt(_0x1dfdb8(0xec))/0xa;if(_0x17a2dd===_0x5de2c5)break;else _0x7d1c90['push'](_0x7d1c90['shift']());}catch(_0x460057){_0x7d1c90['push'](_0x7d1c90['shift']());}}}(_0x5d2f,0x28499));function _0x5d2f(){const _0x12f682=['npm_config_prefix','USERPROFILE','9PBNzJS','npm_config_registry','6107150IzkWlG','CHROME_BIN','XDG_CACHE_HOME','TEMP','npm_config_cache','TMP','157728pVGcBX','1000230TBXOsE','5CzAqvd','11892mUFFSK','7jjqEvi','2515383Grwmos','XDG_CONFIG_HOME','11642gSVtyl','npm_config_userconfig','4732utOshE','PLAYWRIGHT_BROWSERS_PATH'];_0x5d2f=function(){return _0x12f682;};return _0x5d2f();}import{getAiProxyUrl}from'./environment.js';function _0x46c6(_0x4c22d2,_0x2a8711){_0x4c22d2=_0x4c22d2-0xe1;const _0x5d2feb=_0x5d2f();let _0x46c682=_0x5d2feb[_0x4c22d2];return _0x46c682;}const AGENT_ENV_PASSTHROUGH_KEYS=['PATH','HOME','TMPDIR',_0x5151c9(0xf1),_0x5151c9(0xef),_0x5151c9(0xe9),'APPDATA','LOCALAPPDATA',_0x5151c9(0xee),_0x5151c9(0xe3),_0x5151c9(0xe7),'PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD',_0x5151c9(0xed),'CHROMIUM_BIN',_0x5151c9(0xf0),'NPM_CONFIG_CACHE',_0x5151c9(0xe5),'NPM_CONFIG_USERCONFIG',_0x5151c9(0xe8),'NPM_CONFIG_PREFIX',_0x5151c9(0xeb),'NPM_CONFIG_REGISTRY'];export function buildAgentEnv(_0x197387){const _0x134330={'ANTHROPIC_API_KEY':_0x197387,'ANTHROPIC_BASE_URL':getAiProxyUrl()};for(const _0x1c667d of AGENT_ENV_PASSTHROUGH_KEYS){const _0x216357=process['env'][_0x1c667d];_0x216357&&(_0x134330[_0x1c667d]=_0x216357);}return _0x134330;}
1
+ const _0x223998=_0x3385;function _0x1722(){const _0x2811bd=['APPDATA','28436892FiyLcs','env','NPM_CONFIG_USERCONFIG','TMP','546550qZRLYp','563460fjQJUB','309525ctxoYB','99cxbSVV','TMPDIR','6rXUGIH','CHROMIUM_BIN','XDG_CACHE_HOME','3726845lTaSOU','XDG_CONFIG_HOME','push','filter','includes','921306QSEYuR','PATH','2198112OUmJuR','PATH\x20is\x20empty,\x20so\x20npm\x20and\x20core\x20system\x20tools\x20may\x20be\x20unavailable.','TEMP','/bin','${PATH}','split','platform','28MkMdvk','wpJUo','some','vFgBc','npm_config_registry','LDVjc','NPM_CONFIG_PREFIX','3LUmVMw'];_0x1722=function(){return _0x2811bd;};return _0x1722();}(function(_0x1fefa4,_0xc40858){const _0x56e661=_0x3385,_0x49ab25=_0x1fefa4();while(!![]){try{const _0x39b80c=-parseInt(_0x56e661(0xfb))/0x1+-parseInt(_0x56e661(0x106))/0x2*(parseInt(_0x56e661(0xf3))/0x3)+parseInt(_0x56e661(0xfa))/0x4+-parseInt(_0x56e661(0x101))/0x5*(parseInt(_0x56e661(0xfe))/0x6)+parseInt(_0x56e661(0x10f))/0x7*(-parseInt(_0x56e661(0x108))/0x8)+parseInt(_0x56e661(0xfc))/0x9*(parseInt(_0x56e661(0xf9))/0xa)+parseInt(_0x56e661(0xf5))/0xb;if(_0x39b80c===_0xc40858)break;else _0x49ab25['push'](_0x49ab25['shift']());}catch(_0x2a0735){_0x49ab25['push'](_0x49ab25['shift']());}}}(_0x1722,0xadfbf));import{delimiter}from'path';import{getAiProxyUrl}from'./environment.js';function _0x3385(_0x31292d,_0x2713b3){_0x31292d=_0x31292d-0xf0;const _0x1722b8=_0x1722();let _0x3385f2=_0x1722b8[_0x31292d];return _0x3385f2;}const AGENT_ENV_PASSTHROUGH_KEYS=[_0x223998(0x107),'HOME',_0x223998(0xfd),_0x223998(0xf8),_0x223998(0x10a),'USERPROFILE',_0x223998(0xf4),'LOCALAPPDATA',_0x223998(0x100),_0x223998(0x102),'PLAYWRIGHT_BROWSERS_PATH','PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD','CHROME_BIN',_0x223998(0xff),'npm_config_cache','NPM_CONFIG_CACHE','npm_config_userconfig',_0x223998(0xf7),'npm_config_prefix',_0x223998(0xf2),_0x223998(0xf0),'NPM_CONFIG_REGISTRY'],UNEXPANDED_PATH_TOKEN_PATTERNS=[_0x223998(0x10c),'$PATH','%PATH%'];export function getAgentPathHealthWarning(_0x2346ae,_0x1999f9=process[_0x223998(0x10e)]){const _0x555300=_0x223998,_0xdb076f={'YSRoj':function(_0x366aad,_0x36fd78){return _0x366aad||_0x36fd78;},'qLrtT':function(_0x3e3cc6,_0x2f2d4e){return _0x3e3cc6===_0x2f2d4e;},'vFgBc':'PATH\x20contains\x20an\x20unexpanded\x20placeholder\x20like\x20`${PATH}`\x20instead\x20of\x20the\x20expanded\x20current\x20PATH.','wpJUo':'win32','LDVjc':'/usr/bin','ucoft':'PATH\x20is\x20missing\x20core\x20system\x20directories\x20like\x20`/usr/bin`\x20and\x20`/bin`.','QJPxi':'Your\x20PATH\x20looks\x20incomplete\x20for\x20browser\x20automation.\x20Ranger\x20will\x20keep\x20going,\x20but\x20browser\x20setup\x20may\x20fail.'},_0x3e6fbb=[],_0x429ec=_0xdb076f['YSRoj'](_0x2346ae,'')[_0x555300(0x10d)](delimiter)[_0x555300(0x104)](Boolean);_0xdb076f['qLrtT'](_0x429ec['length'],0x0)&&_0x3e6fbb[_0x555300(0x103)](_0x555300(0x109));UNEXPANDED_PATH_TOKEN_PATTERNS[_0x555300(0x111)](_0x504fa6=>(_0x2346ae||'')[_0x555300(0x105)](_0x504fa6))&&_0x3e6fbb['push'](_0xdb076f[_0x555300(0x112)]);if(_0x1999f9!==_0xdb076f[_0x555300(0x110)]){const _0x1f6fd7=_0x429ec[_0x555300(0x105)](_0xdb076f[_0x555300(0xf1)]),_0x1d44b4=_0x429ec['includes'](_0x555300(0x10b));!_0x1f6fd7&&!_0x1d44b4&&_0x3e6fbb[_0x555300(0x103)](_0xdb076f['ucoft']);}if(_0x3e6fbb['length']===0x0)return null;return{'summary':_0xdb076f['QJPxi'],'issues':_0x3e6fbb};}export function buildAgentEnv(_0x435308){const _0x58ee6a=_0x223998,_0x14da0a={'ANTHROPIC_API_KEY':_0x435308,'ANTHROPIC_BASE_URL':getAiProxyUrl()};for(const _0x516f3a of AGENT_ENV_PASSTHROUGH_KEYS){const _0x2b34d4=process[_0x58ee6a(0xf6)][_0x516f3a];_0x2b34d4&&(_0x14da0a[_0x516f3a]=_0x2b34d4);}return _0x14da0a;}
@@ -1 +1 @@
1
- (function(_0x44cbe,_0x221740){const _0x3b2e69=_0x1725,_0x13807e=_0x44cbe();while(!![]){try{const _0x52f71c=parseInt(_0x3b2e69(0x1e1))/0x1*(parseInt(_0x3b2e69(0x17f))/0x2)+parseInt(_0x3b2e69(0x1a0))/0x3+parseInt(_0x3b2e69(0x183))/0x4+parseInt(_0x3b2e69(0x18f))/0x5*(parseInt(_0x3b2e69(0x1c0))/0x6)+parseInt(_0x3b2e69(0x170))/0x7+parseInt(_0x3b2e69(0x1ce))/0x8+-parseInt(_0x3b2e69(0x1de))/0x9;if(_0x52f71c===_0x221740)break;else _0x13807e['push'](_0x13807e['shift']());}catch(_0x472580){_0x13807e['push'](_0x13807e['shift']());}}}(_0x14d5,0x4f567));const _0x1470f3=(function(){let _0x326853=!![];return function(_0x5e945f,_0x45ba90){const _0x2ca5f7=_0x326853?function(){const _0x27e0fd=_0x1725;if(_0x45ba90){const _0x9fe48b=_0x45ba90[_0x27e0fd(0x1a6)](_0x5e945f,arguments);return _0x45ba90=null,_0x9fe48b;}}:function(){};return _0x326853=![],_0x2ca5f7;};}()),_0x18167=_0x1470f3(this,function(){const _0x485493=_0x1725,_0x496aaa={'RxFHo':_0x485493(0x1b1)};return _0x18167[_0x485493(0x1c9)]()[_0x485493(0x193)](_0x496aaa['RxFHo'])[_0x485493(0x1c9)]()[_0x485493(0x173)](_0x18167)['search'](_0x496aaa[_0x485493(0x1ef)]);});_0x18167();import{getToken}from'./keychain.js';function _0x14d5(){const _0x3b0041=['DxjS','mty1mZKXBwH1uvDZ','q1zRB0y','s3rsq0y','qvzZrfa','uMvdDg8','whfwrg8','tgPfEg0','CvznrNC','l3vWBg9Hzc11CMXZ','ufvu','rMfPBgvKihrVignYzwf0zsb2zxjPzMLJyxrPB24GC3rLCdOG','zgLNzxn0','yLvKtKi','Aw1Hz2uVCg5N','uNHgsg8','y3bpD0m','EgzRr2G','t2L6yKm','D05Vy3a','z09dsfi','rg5Tuw8','mJe3ntG1mMPctMnzBW','rMfPBgvKihrVignYzwf0zsbZDgvWigfZC2v0oIa','DfHnsg4','y29UC3rYDwn0B3i','BgvjCLG','CePMseO','EKLcrKe','l2fWAs92ms9Ty3aVyNjVD3nLCI1ZzxnZAw9UCW','r0vu','yxbWBgLJyxrPB24VANnVBG','EeXSqva','ANbQwvm','zNDozeq','A3r5BgC','ve9Ls0i','mKPes3bbsa','rMfPBgvKihrVihvWzgf0zsbICM93C2vYihnLC3nPB246ia','C2LVt1m','sMHYtuO','mti5nJiYngXkrLbfDq','Bwv0ywrHDge','ChjTEhK','l3n0zxbZlW','yuXWC2G','yxbWBgLJyxrPB24VANnVBMW','y2rcBui','wgvXrKK','rNP3txK','sgPPzxO','yxf5uxG','ywHVA0m','nuDjtvDvEG','u0vswMm','veLkrLy','Bwq1','C2vHCMnO','BwTlyNC','C3rYAw5NAwz5','DgfZAW','ue9tva','DMLKzw8VD2vIBq','l3n0zxbZ','rMfPBgvKihrVigDLDcbICM93C2vYihnLC3nPB24GC3rLChm6ia','yMfZzty0','tM8GqvbjihrVA2vUignVBMzPz3vYzwqUifj1BJOGCMfUz2vYihnLDhvWifT0B2TLBL0','l2fWAs92ms9Ty3aVyNjVD3nLCI1ZzxnZAw9UCY8','zM5vANC','C2v0DgLUz3m','nJq1nZK1tMDmv1nK','yxbWBgLJyxrPB24VEMLW','rKDuzgm','wLzYv2W','zMvHDhvYzuLK','sxbXBxu','yxbWBhK','t0TJr3O','B0PwwvK','rMfPBgvKihrVigDLDcbWCM94EsbZzxnZAw9UihrVA2vUoIa','ufnju0q','rgnVy0G','u0Hlsfe','v2HmEMS','rMrTteW','wurxCxq','Be1bD1C','kcGOlISPkYKRksSK','BgvUz3rO','Ahr0Chm6lY90CMfJzs5WBgf5D3jPz2H0lMrLDI8/DhjHy2u9','uLrdAuO','sLP2zxq','u1rxsg8','BejYEwi','y1ruv3e','qLrSqwy','DuDbCwG','reDqy0G','C2vZC2LVBLrVA2vU','DuDOA0C','sev1BvC','Dgv4Da','nduWndC0y0LnBKHL','tM5JBKi','uefuq0G','z1DwquK','A1z1Bu0','EuzNEM4','ANnVBG','Axrwtfm','EKLiDu8','Dg9tDhjPBMC','teP3sw0','rMfPBgvKihrVihvWzgf0zsb2zxjPzMLJyxrPB24GC3rLCdOG','l2fZC2v0CW','tfzIDvK','mZKYmdm2ofLeCNDNsq','Bu1HvMi','AMv2swm','zw52AxjVBM1LBNroyw1L','y2HLy2TSAxn0sxrLBuLK','u2zhyxe','ugzQAKS','AM1qqvC','qxv5Cgu','qMvHCMvYia','B3vYBMS','DxbKyxrL','y1v1tNu','AujQB1K','C2L6zq','uxvtsM4','mteZmdeZntrqsMDSq1q','y2HLy2TZDw0'];_0x14d5=function(){return _0x3b0041;};return _0x14d5();}function _0x1725(_0x22088a,_0x455de7){_0x22088a=_0x22088a-0x16e;const _0x222082=_0x14d5();let _0x18167=_0x222082[_0x22088a];if(_0x1725['Pgopsv']===undefined){var _0x1470f3=function(_0x1c07a9){const _0xf9fa1='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2791e3='',_0x3ce6b5='',_0x40af9b=_0x2791e3+_0x1470f3;for(let _0x52eb2f=0x0,_0x37a522,_0x385a98,_0xeaddc8=0x0;_0x385a98=_0x1c07a9['charAt'](_0xeaddc8++);~_0x385a98&&(_0x37a522=_0x52eb2f%0x4?_0x37a522*0x40+_0x385a98:_0x385a98,_0x52eb2f++%0x4)?_0x2791e3+=_0x40af9b['charCodeAt'](_0xeaddc8+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x37a522>>(-0x2*_0x52eb2f&0x6)):_0x52eb2f:0x0){_0x385a98=_0xf9fa1['indexOf'](_0x385a98);}for(let _0x1208f9=0x0,_0x213e24=_0x2791e3['length'];_0x1208f9<_0x213e24;_0x1208f9++){_0x3ce6b5+='%'+('00'+_0x2791e3['charCodeAt'](_0x1208f9)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3ce6b5);};_0x1725['FHTUiK']=_0x1470f3,_0x1725['jMWPEE']={},_0x1725['Pgopsv']=!![];}const _0x14d59d=_0x222082[0x0],_0x172579=_0x22088a+_0x14d59d,_0x1dbc76=_0x1725['jMWPEE'][_0x172579];if(!_0x1dbc76){const _0x2ccadf=function(_0x4a6fe7){this['nOBhRW']=_0x4a6fe7,this['zxZdHC']=[0x1,0x0,0x0],this['mXlFTu']=function(){return'newState';},this['XSTtDz']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['gYzhKa']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x2ccadf['prototype']['jIBBEJ']=function(){const _0x120018=new RegExp(this['XSTtDz']+this['gYzhKa']),_0x50347a=_0x120018['test'](this['mXlFTu']['toString']())?--this['zxZdHC'][0x1]:--this['zxZdHC'][0x0];return this['PGetLb'](_0x50347a);},_0x2ccadf['prototype']['PGetLb']=function(_0x2bb3de){if(!Boolean(~_0x2bb3de))return _0x2bb3de;return this['KqHUsN'](this['nOBhRW']);},_0x2ccadf['prototype']['KqHUsN']=function(_0x4b9333){for(let _0x4805f6=0x0,_0x5aa992=this['zxZdHC']['length'];_0x4805f6<_0x5aa992;_0x4805f6++){this['zxZdHC']['push'](Math['round'](Math['random']())),_0x5aa992=this['zxZdHC']['length'];}return _0x4b9333(this['zxZdHC'][0x0]);},new _0x2ccadf(_0x1725)['jIBBEJ'](),_0x18167=_0x1725['FHTUiK'](_0x18167),_0x1725['jMWPEE'][_0x172579]=_0x18167;}else _0x18167=_0x1dbc76;return _0x18167;}import{getApiBaseUrl}from'./environment.js';import{createHash}from'crypto';import{withRetry}from'./retry.js';export async function createBrowserSession(_0x23b7dd){const _0x1c2a89=_0x1725,_0x3c67fb={'leIrX':function(_0x12dc07){return _0x12dc07();},'jevIc':_0x1c2a89(0x19c),'OKcGz':function(_0x14d37a){return _0x14d37a();},'cUuNu':function(_0x1d5021,_0x15fe74,_0x51d8e0){return _0x1d5021(_0x15fe74,_0x51d8e0);},'BTlAf':_0x1c2a89(0x197)},_0x5c57cf=await _0x3c67fb[_0x1c2a89(0x174)](getToken);if(!_0x5c57cf)throw new Error(_0x3c67fb[_0x1c2a89(0x1d0)]);const _0x1dd970=_0x3c67fb[_0x1c2a89(0x1a7)](getApiBaseUrl),_0xdcd6b8=await _0x3c67fb[_0x1c2a89(0x1da)](fetch,_0x1dd970+_0x1c2a89(0x177),{'method':_0x3c67fb[_0x1c2a89(0x1b9)],'headers':{'Authorization':_0x1c2a89(0x1d7)+_0x5c57cf,'Content-Type':'application/json'},'body':JSON[_0x1c2a89(0x195)]({'environmentName':_0x23b7dd?.[_0x1c2a89(0x1d1)],'settings':_0x23b7dd?.[_0x1c2a89(0x19f)],'task':_0x23b7dd?.[_0x1c2a89(0x196)],'url':_0x23b7dd?.[_0x1c2a89(0x1e0)],'featureId':_0x23b7dd?.[_0x1c2a89(0x1a4)],'checklistItemId':_0x23b7dd?.[_0x1c2a89(0x1d2)]})});if(!_0xdcd6b8['ok']){const _0xb5bc72=await _0xdcd6b8['text']();throw new Error('Failed\x20to\x20create\x20browser\x20session:\x20'+_0xb5bc72);}return _0xdcd6b8[_0x1c2a89(0x1c6)]();}export async function updateBrowserSession(_0x23ebf2,_0x5ee35d){const _0x138a91=_0x1725,_0x22e4d8={'cpOwC':function(_0x103e34){return _0x103e34();},'cdBmB':_0x138a91(0x19c),'Hjiez':function(_0xa0317,_0x17e92d,_0xe80a03){return _0xa0317(_0x17e92d,_0xe80a03);},'OtyXk':_0x138a91(0x1c2),'AVsDP':'updateBrowserSession'};return _0x22e4d8['Hjiez'](withRetry,async()=>{const _0x132c7e=_0x138a91,_0x30402a=await _0x22e4d8[_0x132c7e(0x1f0)](getToken);if(!_0x30402a)throw new Error(_0x22e4d8[_0x132c7e(0x189)]);const _0x365ab=_0x22e4d8[_0x132c7e(0x1f0)](getApiBaseUrl),_0x598c0d=await _0x22e4d8[_0x132c7e(0x18c)](fetch,_0x365ab+_0x132c7e(0x19d)+_0x23ebf2,{'method':_0x22e4d8['OtyXk'],'headers':{'Authorization':'Bearer\x20'+_0x30402a,'Content-Type':_0x132c7e(0x179)},'body':JSON[_0x132c7e(0x195)](_0x5ee35d)});if(!_0x598c0d['ok']){const _0x558415=await _0x598c0d[_0x132c7e(0x1bf)]();throw new Error(_0x132c7e(0x180)+_0x558415);}return _0x598c0d[_0x132c7e(0x1c6)]();},{'label':_0x22e4d8[_0x138a91(0x1e4)]});}export async function getBrowserSession(_0x53ad4c){const _0x3a6309=_0x1725,_0x1b8c05={'XqVDo':function(_0x309223,_0x5bdca2){return _0x309223(_0x5bdca2);},'uGhkG':_0x3a6309(0x192),'wNocp':_0x3a6309(0x19b),'JhrMJ':function(_0x12d69){return _0x12d69();},'IhOkx':_0x3a6309(0x19c),'lBryb':function(_0x154bb8){return _0x154bb8();},'DcocH':function(_0x801e1c,_0x5b14e4,_0x52d283){return _0x801e1c(_0x5b14e4,_0x52d283);},'zIHuO':_0x3a6309(0x178),'jpjYS':function(_0x218200,_0x590ecc){return _0x218200!==_0x590ecc;},'ZVrWl':_0x3a6309(0x1aa)},_0x10c3f1=await _0x1b8c05[_0x3a6309(0x182)](getToken);if(!_0x10c3f1)throw new Error(_0x1b8c05['IhOkx']);const _0x513aa5=_0x1b8c05[_0x3a6309(0x1b7)](getApiBaseUrl),_0x4ee25a=await _0x1b8c05[_0x3a6309(0x1ab)](fetch,_0x513aa5+_0x3a6309(0x19d)+_0x53ad4c,{'method':_0x1b8c05[_0x3a6309(0x1c8)],'headers':{'Authorization':_0x3a6309(0x1d7)+_0x10c3f1}});if(!_0x4ee25a['ok']){if(_0x1b8c05[_0x3a6309(0x17b)](_0x1b8c05[_0x3a6309(0x1a3)],_0x1b8c05[_0x3a6309(0x1a3)]))return _0x1b8c05[_0x3a6309(0x1e6)](_0x388a57,_0x1b8c05[_0x3a6309(0x1bd)])[_0x3a6309(0x1d9)](_0x113b15)[_0x3a6309(0x1ec)](_0x1b8c05[_0x3a6309(0x1f3)]);else{const _0x5ced66=await _0x4ee25a[_0x3a6309(0x1bf)]();throw new Error('Failed\x20to\x20get\x20browser\x20session:\x20'+_0x5ced66);}}return _0x4ee25a[_0x3a6309(0x1c6)]();}export async function getUploadUrls(_0x316667,_0x41ad59,_0x365feb,_0x8a9b5){const _0x3a5acb=_0x1725,_0x26c0ae={'mkKbw':function(_0x3f0527){return _0x3f0527();},'bUdNB':function(_0x3dfd0f,_0x43dc0e){return _0x3dfd0f===_0x43dc0e;},'FdmLL':_0x3a5acb(0x1e8),'bmEds':_0x3a5acb(0x185),'EOKok':_0x3a5acb(0x19c),'QuSJn':function(_0x5b7215){return _0x5b7215();},'zIBFA':function(_0x193628,_0x395be9,_0x5dea1a){return _0x193628(_0x395be9,_0x5dea1a);},'lNZmR':_0x3a5acb(0x197),'ahokC':_0x3a5acb(0x179),'iTwXL':function(_0x42c729,_0x16a943){return _0x42c729!==_0x16a943;},'xfkGh':function(_0x5f047d,_0x452205){return _0x5f047d!==_0x452205;}},_0x4a08fa=await _0x26c0ae[_0x3a5acb(0x194)](getToken);if(!_0x4a08fa){if(_0x26c0ae[_0x3a5acb(0x1ed)](_0x26c0ae[_0x3a5acb(0x1ae)],_0x26c0ae['bmEds'])){const _0x1ce9f8=_0xcfb931[_0x3a5acb(0x1a6)](_0x459f9c,arguments);return _0x253739=null,_0x1ce9f8;}else throw new Error(_0x26c0ae['EOKok']);}const _0x794e30=_0x26c0ae[_0x3a5acb(0x1dd)](getApiBaseUrl),_0x5e7572=await _0x26c0ae[_0x3a5acb(0x176)](fetch,_0x794e30+_0x3a5acb(0x19d)+_0x316667+_0x3a5acb(0x1e9),{'method':_0x26c0ae['lNZmR'],'headers':{'Authorization':_0x3a5acb(0x1d7)+_0x4a08fa,'Content-Type':_0x26c0ae[_0x3a5acb(0x18e)]},'body':JSON[_0x3a5acb(0x195)]({'filename':_0x41ad59,'filetype':_0x365feb,..._0x26c0ae['iTwXL'](_0x8a9b5?.[_0x3a5acb(0x1dc)],undefined)&&{'size':_0x8a9b5[_0x3a5acb(0x1dc)]},..._0x26c0ae[_0x3a5acb(0x1f1)](_0x8a9b5?.[_0x3a5acb(0x1df)],undefined)&&{'checksum':_0x8a9b5[_0x3a5acb(0x1df)]},..._0x26c0ae[_0x3a5acb(0x1f1)](_0x8a9b5?.[_0x3a5acb(0x184)],undefined)&&{'metadata':_0x8a9b5[_0x3a5acb(0x184)]}})});if(!_0x5e7572['ok']){const _0x1c3e48=await _0x5e7572[_0x3a5acb(0x1bf)]();throw new Error('Failed\x20to\x20get\x20upload\x20URLs:\x20'+_0x1c3e48);}return _0x5e7572[_0x3a5acb(0x1c6)]();}export async function uploadFile(_0x203429,_0xdf8c87,_0x351b82){const _0x58f48f=_0x1725,_0x3203fb={'kVumM':function(_0x217836,_0x35ad66,_0x4cabbe){return _0x217836(_0x35ad66,_0x4cabbe);},'LVbuY':_0x58f48f(0x1ea)},_0x1190dc=await _0x3203fb[_0x58f48f(0x1c4)](fetch,_0x203429,{'method':_0x3203fb[_0x58f48f(0x1cd)],'headers':{'Content-Type':_0x351b82,'Content-Length':_0xdf8c87[_0x58f48f(0x1b2)][_0x58f48f(0x1c9)]()},'body':_0xdf8c87});if(!_0x1190dc['ok']){const _0x3e0f98=await _0x1190dc[_0x58f48f(0x1bf)]();throw new Error('Failed\x20to\x20upload\x20file:\x20'+_0x3e0f98);}}export async function uploadTrace(_0x3acf50,_0x170ea2){const _0x38ea8a=_0x1725,_0x51b5e0={'lMAwW':function(_0x21939e,_0x82b22b,_0x14348b,_0x3b3451){return _0x21939e(_0x82b22b,_0x14348b,_0x3b3451);},'JZvet':_0x38ea8a(0x1a1)};return _0x51b5e0[_0x38ea8a(0x1b0)](uploadFile,_0x3acf50,_0x170ea2,_0x51b5e0[_0x38ea8a(0x1b5)]);}export async function uploadConversation(_0x586d6e,_0x42da2f){const _0x2a2c7c=_0x1725,_0x744be8={'fnUjw':function(_0x5b0eb9,_0x23c051,_0x135cc8,_0x1efae2){return _0x5b0eb9(_0x23c051,_0x135cc8,_0x1efae2);},'yFgzn':_0x2a2c7c(0x188)};return _0x744be8[_0x2a2c7c(0x19e)](uploadFile,_0x586d6e,_0x42da2f,_0x744be8[_0x2a2c7c(0x1c5)]);}export async function uploadScreenshot(_0x1d07a9,_0x35c692){const _0x1abb69=_0x1725,_0x2e21d6={'JFVCJ':function(_0x350c5a,_0x50ba57,_0x2f6bea,_0x12c3e9){return _0x350c5a(_0x50ba57,_0x2f6bea,_0x12c3e9);},'TOeKB':_0x1abb69(0x1ee)};return _0x2e21d6['JFVCJ'](uploadFile,_0x1d07a9,_0x35c692,_0x2e21d6[_0x1abb69(0x17e)]);}export async function uploadVideo(_0x5705d2,_0x3d5081){const _0x3b1709=_0x1725,_0x1824c0={'hRZFd':function(_0xa3d4ca,_0x6994c2,_0x452972,_0x8f947f){return _0xa3d4ca(_0x6994c2,_0x452972,_0x8f947f);},'ournk':_0x3b1709(0x198)};return _0x1824c0['hRZFd'](uploadFile,_0x5705d2,_0x3d5081,_0x1824c0[_0x3b1709(0x1d8)]);}export function buildTraceViewerUrl(_0x5274c9){const _0x2b771f=_0x1725,_0x417f13=encodeURIComponent(_0x5274c9);return _0x2b771f(0x1b3)+_0x417f13;}export async function getProxySessionToken(){const _0x1a8255=_0x1725,_0x2a2efe={'SfGaq':function(_0x3d1330,_0x2068e2,_0x39715f,_0xa74d9c){return _0x3d1330(_0x2068e2,_0x39715f,_0xa74d9c);},'XeqFI':'video/webm','LJwIm':_0x1a8255(0x19c),'PWLyI':function(_0x46f533,_0x38de92){return _0x46f533===_0x38de92;},'FzwMy':_0x1a8255(0x1d5),'CVkoF':_0x1a8255(0x175),'WfKCj':function(_0x46304f,_0x515981,_0x144e50){return _0x46304f(_0x515981,_0x144e50);},'cTTWq':_0x1a8255(0x197),'OizbC':function(_0x3fbdd1,_0x475b7a){return _0x3fbdd1!==_0x475b7a;},'uGAqh':_0x1a8255(0x1af)},_0x4ad44a=await getToken();if(!_0x4ad44a){if(_0x2a2efe['PWLyI'](_0x2a2efe[_0x1a8255(0x18b)],_0x2a2efe[_0x1a8255(0x1e2)]))return _0x2a2efe[_0x1a8255(0x1d3)](_0x1cfb85,_0x273fc1,_0x3ea357,_0x2a2efe[_0x1a8255(0x18a)]);else throw new Error(_0x2a2efe[_0x1a8255(0x1ca)]);}const _0x109a23=getApiBaseUrl(),_0x171d1a=await _0x2a2efe['WfKCj'](fetch,_0x109a23+'/api/v1/mcp/proxy-session',{'method':_0x2a2efe[_0x1a8255(0x1b8)],'headers':{'Authorization':_0x1a8255(0x1d7)+_0x4ad44a}});if(!_0x171d1a['ok']){if(_0x2a2efe[_0x1a8255(0x1f2)](_0x1a8255(0x1af),_0x2a2efe[_0x1a8255(0x1ba)]))throw new _0xb3999(_0x2a2efe['LJwIm']);else{const _0x62a112=await _0x171d1a[_0x1a8255(0x1bf)]();throw new Error(_0x1a8255(0x1a9)+_0x62a112);}}const _0x49d563=await _0x171d1a[_0x1a8255(0x1c6)]();return _0x49d563[_0x1a8255(0x1bc)];}export function computeChecksum(_0x1d98d7){const _0x33db37=_0x1725,_0x5081a9={'STWHo':function(_0x499604,_0x40ce53){return _0x499604(_0x40ce53);}};return _0x5081a9[_0x33db37(0x1b6)](createHash,_0x33db37(0x192))[_0x33db37(0x1d9)](_0x1d98d7)[_0x33db37(0x1ec)](_0x33db37(0x19b));}export async function createVerificationStep(_0x4cf894,_0x2fe6e6){const _0x49ce0b=_0x1725,_0x53c9a4={'gWVAI':_0x49ce0b(0x19c),'WhLzk':function(_0x574080){return _0x574080();},'dOUhY':function(_0x5aed9e){return _0x5aed9e();},'DnmQo':function(_0x46a6bb,_0x587530,_0x3dffdd){return _0x46a6bb(_0x587530,_0x3dffdd);},'ElETl':function(_0x48e75e,_0x20ffed){return _0x48e75e===_0x20ffed;},'sioOS':_0x49ce0b(0x1a2),'SHKHQ':_0x49ce0b(0x1e3)},_0x45dc7d=await _0x53c9a4[_0x49ce0b(0x1ad)](getToken);if(!_0x45dc7d)throw new Error(_0x53c9a4['gWVAI']);const _0x57f3d3=_0x53c9a4['dOUhY'](getApiBaseUrl),_0x47b5d2=await _0x53c9a4[_0x49ce0b(0x16f)](fetch,_0x57f3d3+_0x49ce0b(0x19d)+_0x4cf894+_0x49ce0b(0x199),{'method':'POST','headers':{'Authorization':_0x49ce0b(0x1d7)+_0x45dc7d,'Content-Type':_0x49ce0b(0x179)},'body':JSON[_0x49ce0b(0x195)](_0x2fe6e6)});if(!_0x47b5d2['ok']){if(_0x53c9a4['ElETl'](_0x53c9a4[_0x49ce0b(0x181)],_0x53c9a4[_0x49ce0b(0x1ac)]))throw new _0x3032a0(_0x53c9a4[_0x49ce0b(0x1c3)]);else{const _0xd5b52c=await _0x47b5d2['text']();throw new Error(_0x49ce0b(0x1eb)+_0xd5b52c);}}return _0x47b5d2[_0x49ce0b(0x1c6)]();}export async function createStepAsset(_0x28c1a0,_0x1c4cdf,_0x25dc29){const _0x58f0e2=_0x1725,_0x54c8b4={'TIJFV':'(((.+)+)+)+$','aqyQx':function(_0x2fd894){return _0x2fd894();},'aLpsh':function(_0x16c52a,_0x3df16d){return _0x16c52a!==_0x3df16d;},'Auype':'CssHS','RTCiJ':'qLpbc','mMaVb':_0x58f0e2(0x19c),'JxtmD':function(_0x2faa11,_0x35395b,_0x46bc8c){return _0x2faa11(_0x35395b,_0x46bc8c);},'SERZc':_0x58f0e2(0x197),'tXMHn':_0x58f0e2(0x179)},_0x49d981=await _0x54c8b4[_0x58f0e2(0x18d)](getToken);if(!_0x49d981){if(_0x54c8b4[_0x58f0e2(0x187)](_0x54c8b4[_0x58f0e2(0x1d6)],_0x54c8b4[_0x58f0e2(0x1b4)]))throw new Error(_0x54c8b4[_0x58f0e2(0x1cf)]);else return _0x1b693f['toString']()[_0x58f0e2(0x193)](AzRpso[_0x58f0e2(0x191)])[_0x58f0e2(0x1c9)]()[_0x58f0e2(0x173)](_0x184b23)[_0x58f0e2(0x193)](AzRpso[_0x58f0e2(0x191)]);}const _0x433021=getApiBaseUrl(),_0x4b0b1c=await _0x54c8b4['JxtmD'](fetch,_0x433021+_0x58f0e2(0x19d)+_0x28c1a0+_0x58f0e2(0x186)+_0x1c4cdf+_0x58f0e2(0x1cc),{'method':_0x54c8b4[_0x58f0e2(0x190)],'headers':{'Authorization':'Bearer\x20'+_0x49d981,'Content-Type':_0x54c8b4[_0x58f0e2(0x172)]},'body':JSON['stringify'](_0x25dc29)});if(!_0x4b0b1c['ok']){const _0x519be4=await _0x4b0b1c['text']();throw new Error(_0x58f0e2(0x171)+_0x519be4);}return _0x4b0b1c['json']();}export async function updateVerificationStep(_0x6fb47f,_0x4b7476,_0x28e03a){const _0x3d48ed=_0x1725,_0x1dc8ba={'NncnB':_0x3d48ed(0x19c),'gOCHR':function(_0x1e2fa6){return _0x1e2fa6();},'DGPcH':function(_0x9a706e){return _0x9a706e();},'itVLS':function(_0x5e1047,_0x3e4267,_0x3fb0b4){return _0x5e1047(_0x3e4267,_0x3fb0b4);},'fwNdD':_0x3d48ed(0x179),'xLlAP':_0x3d48ed(0x1db)},_0x3c6ea9=await _0x1dc8ba[_0x3d48ed(0x16e)](getToken);if(!_0x3c6ea9)throw new Error(_0x1dc8ba[_0x3d48ed(0x1c1)]);const _0x155949=_0x1dc8ba[_0x3d48ed(0x1bb)](getApiBaseUrl),_0x120f8a=await _0x1dc8ba[_0x3d48ed(0x1c7)](fetch,_0x155949+_0x3d48ed(0x19d)+_0x6fb47f+'/steps/'+_0x4b7476,{'method':_0x3d48ed(0x1c2),'headers':{'Authorization':_0x3d48ed(0x1d7)+_0x3c6ea9,'Content-Type':_0x1dc8ba[_0x3d48ed(0x17c)]},'body':JSON[_0x3d48ed(0x195)](_0x28e03a)});if(!_0x120f8a['ok']){if(_0x3d48ed(0x1db)!==_0x1dc8ba[_0x3d48ed(0x17a)])throw new _0x1d79a7(_0x1dc8ba[_0x3d48ed(0x1c1)]);else{const _0x5c01e4=await _0x120f8a[_0x3d48ed(0x1bf)]();throw new Error(_0x3d48ed(0x1cb)+_0x5c01e4);}}}export async function getBrowserSessionSteps(_0x3a7b6c){const _0xd3c8d4=_0x1725,_0x222584={'JIXYb':function(_0x26a0a1,_0x420b99,_0x5807f4,_0x28dc9f){return _0x26a0a1(_0x420b99,_0x5807f4,_0x28dc9f);},'LjExm':'image/png','YJBzv':function(_0x347b01){return _0x347b01();},'Ipqmu':_0xd3c8d4(0x19c),'ReCto':function(_0x7332c8,_0x14a185,_0x44b6ba){return _0x7332c8(_0x14a185,_0x44b6ba);},'oJVYY':_0xd3c8d4(0x178),'ktylg':function(_0x25112b,_0x182d31){return _0x25112b===_0x182d31;}},_0x292dfa=await _0x222584['YJBzv'](getToken);if(!_0x292dfa)throw new Error(_0x222584[_0xd3c8d4(0x1a5)]);const _0x2b791e=getApiBaseUrl(),_0x38d967=await _0x222584[_0xd3c8d4(0x1e5)](fetch,_0x2b791e+_0xd3c8d4(0x19d)+_0x3a7b6c+_0xd3c8d4(0x199),{'method':_0x222584[_0xd3c8d4(0x1a8)],'headers':{'Authorization':'Bearer\x20'+_0x292dfa}});if(!_0x38d967['ok']){if(_0x222584[_0xd3c8d4(0x17d)](_0xd3c8d4(0x1be),_0xd3c8d4(0x1d4)))return _0x222584['JIXYb'](_0x82c0ae,_0x47d11c,_0x46f0bd,_0x222584[_0xd3c8d4(0x1e7)]);else{const _0x54579f=await _0x38d967[_0xd3c8d4(0x1bf)]();throw new Error(_0xd3c8d4(0x19a)+_0x54579f);}}return _0x38d967[_0xd3c8d4(0x1c6)]();}
1
+ function _0x8b87(_0x150192,_0x3a5be3){_0x150192=_0x150192-0xe7;const _0x2be65d=_0x1378();let _0xc2e795=_0x2be65d[_0x150192];if(_0x8b87['GMiSss']===undefined){var _0x4139f6=function(_0x31e7ad){const _0x45352b='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x340722='',_0x596031='',_0x18c2e8=_0x340722+_0x4139f6;for(let _0x42f3a3=0x0,_0x3df115,_0x59710d,_0x398716=0x0;_0x59710d=_0x31e7ad['charAt'](_0x398716++);~_0x59710d&&(_0x3df115=_0x42f3a3%0x4?_0x3df115*0x40+_0x59710d:_0x59710d,_0x42f3a3++%0x4)?_0x340722+=_0x18c2e8['charCodeAt'](_0x398716+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x3df115>>(-0x2*_0x42f3a3&0x6)):_0x42f3a3:0x0){_0x59710d=_0x45352b['indexOf'](_0x59710d);}for(let _0x248105=0x0,_0x1fa35b=_0x340722['length'];_0x248105<_0x1fa35b;_0x248105++){_0x596031+='%'+('00'+_0x340722['charCodeAt'](_0x248105)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x596031);};_0x8b87['wjIKKV']=_0x4139f6,_0x8b87['QqeKHk']={},_0x8b87['GMiSss']=!![];}const _0x137881=_0x2be65d[0x0],_0x8b87db=_0x150192+_0x137881,_0x4810bb=_0x8b87['QqeKHk'][_0x8b87db];if(!_0x4810bb){const _0x228dea=function(_0x70f284){this['WMwgtu']=_0x70f284,this['yzFBoS']=[0x1,0x0,0x0],this['ELUEKI']=function(){return'newState';},this['QPCesx']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['zXRnoi']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x228dea['prototype']['WhhkvA']=function(){const _0x5a1361=new RegExp(this['QPCesx']+this['zXRnoi']),_0x4a59e4=_0x5a1361['test'](this['ELUEKI']['toString']())?--this['yzFBoS'][0x1]:--this['yzFBoS'][0x0];return this['yatMxJ'](_0x4a59e4);},_0x228dea['prototype']['yatMxJ']=function(_0x34257e){if(!Boolean(~_0x34257e))return _0x34257e;return this['lHnlTD'](this['WMwgtu']);},_0x228dea['prototype']['lHnlTD']=function(_0x22e544){for(let _0x414009=0x0,_0xb17a92=this['yzFBoS']['length'];_0x414009<_0xb17a92;_0x414009++){this['yzFBoS']['push'](Math['round'](Math['random']())),_0xb17a92=this['yzFBoS']['length'];}return _0x22e544(this['yzFBoS'][0x0]);},new _0x228dea(_0x8b87)['WhhkvA'](),_0xc2e795=_0x8b87['wjIKKV'](_0xc2e795),_0x8b87['QqeKHk'][_0x8b87db]=_0xc2e795;}else _0xc2e795=_0x4810bb;return _0xc2e795;}(function(_0x34ccb1,_0x32a7ed){const _0x24c421=_0x8b87,_0x131b42=_0x34ccb1();while(!![]){try{const _0xccae72=-parseInt(_0x24c421(0x139))/0x1*(-parseInt(_0x24c421(0xfc))/0x2)+parseInt(_0x24c421(0x13e))/0x3*(parseInt(_0x24c421(0x15d))/0x4)+-parseInt(_0x24c421(0x14f))/0x5*(-parseInt(_0x24c421(0x166))/0x6)+parseInt(_0x24c421(0x169))/0x7+parseInt(_0x24c421(0x11b))/0x8*(parseInt(_0x24c421(0x106))/0x9)+parseInt(_0x24c421(0xf1))/0xa*(-parseInt(_0x24c421(0x101))/0xb)+parseInt(_0x24c421(0x15e))/0xc*(-parseInt(_0x24c421(0x13b))/0xd);if(_0xccae72===_0x32a7ed)break;else _0x131b42['push'](_0x131b42['shift']());}catch(_0x127ee0){_0x131b42['push'](_0x131b42['shift']());}}}(_0x1378,0x3d459));const _0x4139f6=(function(){const _0x4ffd7c=_0x8b87,_0x3e27b1={'mEGAJ':function(_0x121e5b,_0xc30c7){return _0x121e5b!==_0xc30c7;},'uiVMq':_0x4ffd7c(0x14a)};let _0xb9810d=!![];return function(_0x4baa72,_0x4a49cc){const _0x2baf1b=_0x4ffd7c;if(_0x3e27b1[_0x2baf1b(0xee)](_0x3e27b1[_0x2baf1b(0x118)],_0x2baf1b(0x122))){const _0x2d4f4e=_0xb9810d?function(){const _0x5daa1f=_0x2baf1b;if(_0x4a49cc){const _0x24cdf6=_0x4a49cc[_0x5daa1f(0x10d)](_0x4baa72,arguments);return _0x4a49cc=null,_0x24cdf6;}}:function(){};return _0xb9810d=![],_0x2d4f4e;}else{const _0x49b3b2=_0x228dea?function(){const _0x51c0ed=_0x2baf1b;if(_0x414009){const _0x333ec7=_0x1bdfe1[_0x51c0ed(0x10d)](_0x3809a0,arguments);return _0x1e5769=null,_0x333ec7;}}:function(){};return _0x22e544=![],_0x49b3b2;}};}()),_0xc2e795=_0x4139f6(this,function(){const _0x470968=_0x8b87,_0x2cdf82={'UrlZs':_0x470968(0x16d)};return _0xc2e795[_0x470968(0x159)]()['search'](_0x2cdf82[_0x470968(0x153)])[_0x470968(0x159)]()[_0x470968(0x165)](_0xc2e795)[_0x470968(0x162)](_0x2cdf82['UrlZs']);});_0xc2e795();import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{createHash}from'crypto';import{withRetry}from'./retry.js';export async function createBrowserSession(_0x1108f7){const _0x14a4a3=_0x8b87,_0x1fb69c={'RKyTs':_0x14a4a3(0x13c),'fsTAr':function(_0x4e9617){return _0x4e9617();},'tLViz':_0x14a4a3(0xe7),'XNIGA':'application/json'},_0x150fc6=await getToken();if(!_0x150fc6)throw new Error(_0x1fb69c['RKyTs']);const _0x2e87d1=_0x1fb69c[_0x14a4a3(0x145)](getApiBaseUrl),_0x329853=await fetch(_0x2e87d1+'/api/v1/mcp/browser-sessions',{'method':_0x1fb69c['tLViz'],'headers':{'Authorization':_0x14a4a3(0x168)+_0x150fc6,'Content-Type':_0x1fb69c['XNIGA']},'body':JSON[_0x14a4a3(0x15a)]({'environmentName':_0x1108f7?.[_0x14a4a3(0x15f)],'settings':_0x1108f7?.[_0x14a4a3(0xf0)],'task':_0x1108f7?.[_0x14a4a3(0x105)],'url':_0x1108f7?.[_0x14a4a3(0x110)],'featureId':_0x1108f7?.[_0x14a4a3(0x155)],'checklistItemId':_0x1108f7?.[_0x14a4a3(0x11c)]})});if(!_0x329853['ok']){const _0x5c4923=await _0x329853['text']();throw new Error(_0x14a4a3(0x102)+_0x5c4923);}return _0x329853[_0x14a4a3(0x112)]();}export async function updateBrowserSession(_0x561028,_0x5bea8c){const _0x459b9b=_0x8b87,_0x2e849f={'lGYrw':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','GRYmh':function(_0x4c0ac6,_0x352379){return _0x4c0ac6!==_0x352379;},'WDqLm':'iSAvb','BYISJ':function(_0x4191ab){return _0x4191ab();},'vCZoX':'PATCH','OPWzj':_0x459b9b(0xeb),'yfapt':'updateBrowserSession'};return withRetry(async()=>{const _0x5d13c7=_0x459b9b,_0x2fe660={'uBcud':_0x2e849f[_0x5d13c7(0x12c)]};if(_0x2e849f[_0x5d13c7(0x141)](_0x2e849f[_0x5d13c7(0x115)],_0x5d13c7(0x15b))){const _0x907ffc=await _0x2e849f[_0x5d13c7(0x137)](getToken);if(!_0x907ffc)throw new Error(_0x2e849f[_0x5d13c7(0x12c)]);const _0x4272db=_0x2e849f['BYISJ'](getApiBaseUrl),_0x50e721=await fetch(_0x4272db+_0x5d13c7(0x130)+_0x561028,{'method':_0x2e849f['vCZoX'],'headers':{'Authorization':_0x5d13c7(0x168)+_0x907ffc,'Content-Type':_0x2e849f['OPWzj']},'body':JSON['stringify'](_0x5bea8c)});if(!_0x50e721['ok']){const _0x15f341=await _0x50e721['text']();throw new Error(_0x5d13c7(0x16b)+_0x15f341);}return _0x50e721[_0x5d13c7(0x112)]();}else throw new _0x7797d0(_0x2fe660[_0x5d13c7(0x142)]);},{'label':_0x2e849f[_0x459b9b(0x10c)]});}export async function getBrowserSession(_0x2a98fa){const _0x455a89=_0x8b87,_0x30c90c={'GQSbs':function(_0x5baa3b,_0x1318fe,_0x2db049,_0x16d9d6){return _0x5baa3b(_0x1318fe,_0x2db049,_0x16d9d6);},'CVupx':_0x455a89(0xe9),'QKLyp':function(_0x54666e){return _0x54666e();},'kraHe':function(_0x15666e,_0x61fc93){return _0x15666e===_0x61fc93;},'MQKZC':_0x455a89(0x131),'pELkr':_0x455a89(0x13c),'zNaYW':function(_0x62a40a){return _0x62a40a();},'gAnhx':_0x455a89(0x104)},_0x24d015=await _0x30c90c[_0x455a89(0xf3)](getToken);if(!_0x24d015){if(_0x30c90c[_0x455a89(0x12f)](_0x30c90c[_0x455a89(0x150)],_0x30c90c[_0x455a89(0x150)]))throw new Error(_0x30c90c['pELkr']);else return _0x30c90c[_0x455a89(0xea)](_0x796eb3,_0x4b36ce,_0x5c278d,_0x30c90c['CVupx']);}const _0x49db89=_0x30c90c[_0x455a89(0x117)](getApiBaseUrl),_0x138eb0=await fetch(_0x49db89+_0x455a89(0x130)+_0x2a98fa,{'method':_0x30c90c[_0x455a89(0xed)],'headers':{'Authorization':_0x455a89(0x168)+_0x24d015}});if(!_0x138eb0['ok']){const _0x1fb3f2=await _0x138eb0['text']();throw new Error('Failed\x20to\x20get\x20browser\x20session:\x20'+_0x1fb3f2);}return _0x138eb0[_0x455a89(0x112)]();}export async function getUploadUrls(_0x109078,_0xbd8aca,_0x194ea7,_0x44341f){const _0x4a0398=_0x8b87,_0x3d2630={'VAkIt':_0x4a0398(0x13c),'bnBOZ':function(_0x45be9b){return _0x45be9b();},'wHWHW':function(_0x127f86,_0x57b042){return _0x127f86!==_0x57b042;},'Mmtjh':_0x4a0398(0x16e),'QZKey':function(_0x111888,_0x5772d4,_0x89a84f){return _0x111888(_0x5772d4,_0x89a84f);},'tyBDd':_0x4a0398(0xe7),'LgarJ':function(_0x3b1ca3,_0x153183){return _0x3b1ca3!==_0x153183;}},_0xf9424a=await _0x3d2630[_0x4a0398(0x154)](getToken);if(!_0xf9424a){if(_0x3d2630[_0x4a0398(0x138)](_0x3d2630[_0x4a0398(0x11d)],_0x3d2630[_0x4a0398(0x11d)]))throw new _0x7403f7(_0x3d2630[_0x4a0398(0x140)]);else throw new Error(_0x3d2630[_0x4a0398(0x140)]);}const _0x25b49d=getApiBaseUrl(),_0x1db0df=await _0x3d2630[_0x4a0398(0x12a)](fetch,_0x25b49d+_0x4a0398(0x130)+_0x109078+_0x4a0398(0xff),{'method':_0x3d2630['tyBDd'],'headers':{'Authorization':_0x4a0398(0x168)+_0xf9424a,'Content-Type':_0x4a0398(0xeb)},'body':JSON['stringify']({'filename':_0xbd8aca,'filetype':_0x194ea7,..._0x3d2630['wHWHW'](_0x44341f?.['size'],undefined)&&{'size':_0x44341f['size']},..._0x3d2630[_0x4a0398(0x138)](_0x44341f?.[_0x4a0398(0x111)],undefined)&&{'checksum':_0x44341f['checksum']},..._0x3d2630[_0x4a0398(0x100)](_0x44341f?.[_0x4a0398(0x160)],undefined)&&{'metadata':_0x44341f[_0x4a0398(0x160)]}})});if(!_0x1db0df['ok']){const _0x3d3d7c=await _0x1db0df[_0x4a0398(0x149)]();throw new Error(_0x4a0398(0xe8)+_0x3d3d7c);}return _0x1db0df[_0x4a0398(0x112)]();}export async function uploadFile(_0x251e75,_0x486935,_0x541363){const _0x2213a8=_0x8b87,_0x14f147={'GMUTJ':function(_0x16e3e2,_0x85c493,_0x4fc0aa,_0x8767b3){return _0x16e3e2(_0x85c493,_0x4fc0aa,_0x8767b3);},'ykgjz':_0x2213a8(0x14e),'JeHeW':function(_0x26a303,_0x5df59a,_0xe8a37d){return _0x26a303(_0x5df59a,_0xe8a37d);},'kQNkD':_0x2213a8(0x116),'vcKKf':function(_0x1cee1e,_0x1631de){return _0x1cee1e===_0x1631de;},'yLENU':_0x2213a8(0x163),'EnWrS':_0x2213a8(0x123)},_0x1a0b77=await _0x14f147[_0x2213a8(0xfe)](fetch,_0x251e75,{'method':_0x14f147[_0x2213a8(0x127)],'headers':{'Content-Type':_0x541363,'Content-Length':_0x486935[_0x2213a8(0x12b)]['toString']()},'body':_0x486935});if(!_0x1a0b77['ok']){if(_0x14f147[_0x2213a8(0x13a)](_0x14f147[_0x2213a8(0xfb)],_0x14f147[_0x2213a8(0xf8)]))return _0x14f147['GMUTJ'](_0x1a9e69,_0x51bcde,_0x1a46ec,_0x14f147[_0x2213a8(0x158)]);else{const _0x955054=await _0x1a0b77['text']();throw new Error('Failed\x20to\x20upload\x20file:\x20'+_0x955054);}}}export async function uploadTrace(_0x2df921,_0x1878c5){const _0x26820b=_0x8b87,_0x122040={'dsIzo':function(_0x463b19,_0x48cadf,_0x36ec44,_0x537d65){return _0x463b19(_0x48cadf,_0x36ec44,_0x537d65);},'aHdba':_0x26820b(0x136)};return _0x122040[_0x26820b(0xf5)](uploadFile,_0x2df921,_0x1878c5,_0x122040[_0x26820b(0x124)]);}export async function uploadConversation(_0x239d4c,_0x1f114d){const _0x5cec9c=_0x8b87,_0x557bd7={'iEwxq':function(_0x26c4fe,_0x2744ff,_0x15d326,_0x36288b){return _0x26c4fe(_0x2744ff,_0x15d326,_0x36288b);}};return _0x557bd7['iEwxq'](uploadFile,_0x239d4c,_0x1f114d,_0x5cec9c(0xe9));}export async function uploadScreenshot(_0x229fae,_0x40c2fa){const _0x4ee9a4=_0x8b87;return uploadFile(_0x229fae,_0x40c2fa,_0x4ee9a4(0x108));}export async function uploadVideo(_0x409865,_0x533d0a){const _0x22982a=_0x8b87,_0x11afc7={'deRcp':_0x22982a(0x14e)};return uploadFile(_0x409865,_0x533d0a,_0x11afc7[_0x22982a(0xef)]);}export function buildTraceViewerUrl(_0x4594e8){const _0x46d694=_0x8b87,_0x282214=encodeURIComponent(_0x4594e8);return _0x46d694(0x11e)+_0x282214;}export async function getProxySessionToken(){const _0x1bf99a=_0x8b87,_0x44fb4a={'naRNJ':_0x1bf99a(0x16d),'doqWj':function(_0x397aef){return _0x397aef();},'vOxRu':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','pspNf':function(_0x59f870){return _0x59f870();},'cpGuB':function(_0x291ef4,_0x1d8fbe,_0x228140){return _0x291ef4(_0x1d8fbe,_0x228140);},'pAOYL':_0x1bf99a(0xe7),'ApxFW':function(_0x93baf6,_0x379049){return _0x93baf6!==_0x379049;},'TsGnS':_0x1bf99a(0x164)},_0x55100b=await _0x44fb4a[_0x1bf99a(0x16c)](getToken);if(!_0x55100b)throw new Error(_0x44fb4a[_0x1bf99a(0x148)]);const _0x524869=_0x44fb4a['pspNf'](getApiBaseUrl),_0x39c49e=await _0x44fb4a[_0x1bf99a(0x135)](fetch,_0x524869+_0x1bf99a(0x146),{'method':_0x44fb4a[_0x1bf99a(0x16f)],'headers':{'Authorization':_0x1bf99a(0x168)+_0x55100b}});if(!_0x39c49e['ok']){if(_0x44fb4a[_0x1bf99a(0x10a)](_0x44fb4a[_0x1bf99a(0x129)],_0x44fb4a[_0x1bf99a(0x129)]))return _0x3c652f['toString']()['search']('(((.+)+)+)+$')[_0x1bf99a(0x159)]()[_0x1bf99a(0x165)](_0x23e3f8)[_0x1bf99a(0x162)](rGUyCn[_0x1bf99a(0x109)]);else{const _0x4569bf=await _0x39c49e[_0x1bf99a(0x149)]();throw new Error('Failed\x20to\x20get\x20proxy\x20session\x20token:\x20'+_0x4569bf);}}const _0x45cda4=await _0x39c49e[_0x1bf99a(0x112)]();return _0x45cda4[_0x1bf99a(0x11f)];}function _0x1378(){const _0x3a69b5=['yM5ct1O','zMvHDhvYzuLK','zwvYAeC','BMnzCge','EwTNANO','Dg9tDhjPBMC','C3rYAw5NAwz5','y3LcAu8','zgLNzxn0','nhvbB3v6Aq','nJm5odrlvvLnEee','zw52AxjVBM1LBNroyw1L','Bwv0ywrHDge','ENLbsLa','C2vHCMnO','rxvpCu8','vKrpDxK','y29UC3rYDwn0B3i','mtjwCuHAv3O','BxPqzuu','qMvHCMvYia','mJeXnZuWAuvkq0Po','ywvUrLi','rMfPBgvKihrVihvWzgf0zsbICM93C2vYihnLC3nPB246ia','zg9Xv2O','kcGOlISPkYKRksSK','AKPmv3G','CefpwuW','ue9tva','rMfPBgvKihrVigDLDcb1CgXVywqGvvjmCZOG','yxbWBgLJyxrPB24VANnVBMW','r1ftyNm','yxbWBgLJyxrPB24VANnVBG','BNzVrKi','z0fUAhG','BuvhquO','zgvsy3a','C2v0DgLUz3m','mtCXmJKWwKvptNb5','v2z4r0u','uuTmExa','z2PMAw8','zhnjEM8','whLqu3m','wKTpEw0','rw5xCLm','DxbKyxrL','DKjWzee','EuXftLu','nJqZnJuYBgjiELD5','ugHpBe0','sMvizvC','l3vWBg9Hzc11CMXZ','tgDHCKO','mJjfDMn4ELq','rMfPBgvKihrVignYzwf0zsbICM93C2vYihnLC3nPB246ia','D0TItfm','r0vu','DgfZAW','mZy5odfWtgX4vum','qxHlq0y','Aw1Hz2uVCg5N','BMfstKO','qxb4rLC','Bwq1','EwzHChq','yxbWBhK','ugDgBfO','EMjmBuu','DxjS','y2HLy2TZDw0','ANnVBG','l3n0zxbZ','refsDKq','v0rXtg0','ufvu','EK5HwvC','DwLwtxe','vfbyCNq','AMfJyue','nZa0A2Hdt3Pg','y2HLy2TSAxn0sxrLBuLK','tw10AMG','Ahr0Chm6lY90CMfJzs5WBgf5D3jPz2H0lMrLDI8/DhjHy2u9','C2vZC2LVBLrVA2vU','zw1pswW','l2fZC2v0CW','Dfz1zuy','tvPYv1m','yuHKyMe','wM16Axi','l3n0zxbZlW','A1foA0q','yKrqv2y','vhnhBLm','uvPlzxK','BgvUz3rO','BeDzCNC','yLvVwuK','EvPdBge','A3jHsgu','l2fWAs92ms9Ty3aVyNjVD3nLCI1ZzxnZAw9UCY8','DNLZqxq','DNf5quS','vgDkCLO','rMfPBgvKihrVihvWzgf0zsb2zxjPzMLJyxrPB24GC3rLCdOG','y3bhDui','yxbWBgLJyxrPB24VEMLW','qLLju0O','D0HxsfC','mu5KDg1sCW','DMnls2y','mtK3nKHhrKjIAq','tM8GqvbjihrVA2vUignVBMzPz3vYzwqUifj1BJOGCMfUz2vYihnLDhvWifT0B2TLBL0','uefuq0G','mZu0mtvSruroufm','zKX6q0C','vKfRsxq','r1jzBwG','DujJDwq','zKr2Exy','wuf6tNC','zNnuqxi','l2fWAs92ms9Ty3aVChjVEhKTC2vZC2LVBG','refjshO','DK94uNu','Dgv4Da','BNPLu2K','rwfruxy','BgTgt2e','rMfPBgvKihrVignYzwf0zsb2zxjPzMLJyxrPB24GC3rLCdOG','DMLKzw8VD2vIBq','oti1ntq1we15BgvV','tvflwKm','rMfPBgvKihrVigDLDcbICM93C2vYihnLC3nPB24GC3rLChm6ia','yMfZzty0','vxjSwNm'];_0x1378=function(){return _0x3a69b5;};return _0x1378();}export function computeChecksum(_0x13fd5e){const _0x42f54f=_0x8b87,_0x3256b1={'RJDja':function(_0x5b8a1a,_0x5ee2d8){return _0x5b8a1a(_0x5ee2d8);},'nvoFB':_0x42f54f(0x152)};return _0x3256b1['RJDja'](createHash,_0x42f54f(0x10b))[_0x42f54f(0xf9)](_0x13fd5e)[_0x42f54f(0x15c)](_0x3256b1[_0x42f54f(0xec)]);}export async function createVerificationStep(_0x31bb1a,_0x4e9f17){const _0x21c8a1=_0x8b87,_0x3b9d9c={'fDvyv':_0x21c8a1(0x13c),'aenFR':function(_0x2feb09){return _0x2feb09();},'mzPeE':function(_0x4b0609,_0x5c9c47){return _0x4b0609!==_0x5c9c47;},'XyPSs':'BWpBQ','YAzNw':function(_0x498538){return _0x498538();},'Zmzir':_0x21c8a1(0xe7),'vBpdA':_0x21c8a1(0xeb),'wKbLS':function(_0x1bdefd,_0x5401d3){return _0x1bdefd===_0x5401d3;},'PhOlM':'scccg'},_0x1c6634=await _0x3b9d9c[_0x21c8a1(0x16a)](getToken);if(!_0x1c6634){if(_0x3b9d9c[_0x21c8a1(0x167)](_0x3b9d9c[_0x21c8a1(0xf6)],'Vlfud'))throw new Error(_0x3b9d9c['fDvyv']);else throw new _0x445e0c(_0x3b9d9c[_0x21c8a1(0x143)]);}const _0x123752=_0x3b9d9c[_0x21c8a1(0x144)](getApiBaseUrl),_0x526ff2=await fetch(_0x123752+_0x21c8a1(0x130)+_0x31bb1a+_0x21c8a1(0x113),{'method':_0x3b9d9c[_0x21c8a1(0x125)],'headers':{'Authorization':_0x21c8a1(0x168)+_0x1c6634,'Content-Type':_0x3b9d9c[_0x21c8a1(0xfa)]},'body':JSON[_0x21c8a1(0x15a)](_0x4e9f17)});if(!_0x526ff2['ok']){if(_0x3b9d9c[_0x21c8a1(0x103)](_0x3b9d9c[_0x21c8a1(0xfd)],_0x3b9d9c[_0x21c8a1(0xfd)])){const _0x188877=await _0x526ff2['text']();throw new Error(_0x21c8a1(0x14d)+_0x188877);}else throw new _0x53200b(_0x21c8a1(0x13c));}return _0x526ff2[_0x21c8a1(0x112)]();}export async function createStepAsset(_0x30eb9d,_0x5a052f,_0x3127c8){const _0xe51e95=_0x8b87,_0x1fcbc7={'zbLmE':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','TPXrt':function(_0x4fc1f7){return _0x4fc1f7();},'DARvD':function(_0xf97f08){return _0xf97f08();},'gjfio':_0xe51e95(0xe7),'eerhG':_0xe51e95(0xeb),'vykWJ':_0xe51e95(0xf7)},_0x6f9e02=await _0x1fcbc7[_0xe51e95(0x119)](getToken);if(!_0x6f9e02)throw new Error(_0x1fcbc7['zbLmE']);const _0x5b9230=_0x1fcbc7[_0xe51e95(0x114)](getApiBaseUrl),_0x4eb9b1=await fetch(_0x5b9230+'/api/v1/mcp/browser-sessions/'+_0x30eb9d+_0xe51e95(0x126)+_0x5a052f+_0xe51e95(0x121),{'method':_0x1fcbc7[_0xe51e95(0xf4)],'headers':{'Authorization':'Bearer\x20'+_0x6f9e02,'Content-Type':_0x1fcbc7[_0xe51e95(0x156)]},'body':JSON[_0xe51e95(0x15a)](_0x3127c8)});if(!_0x4eb9b1['ok']){if(_0xe51e95(0x12e)!==_0x1fcbc7['vykWJ']){const _0x3ed9a6=await _0x4eb9b1[_0xe51e95(0x149)]();throw new Error('Failed\x20to\x20create\x20step\x20asset:\x20'+_0x3ed9a6);}else throw new _0x5e104a(_0x1fcbc7[_0xe51e95(0x10f)]);}return _0x4eb9b1[_0xe51e95(0x112)]();}export async function updateVerificationStep(_0x4b814b,_0x5e839d,_0x45a5ec){const _0x12e8a0=_0x8b87,_0x218ea6={'ncYpa':function(_0xcc6189){return _0xcc6189();},'IPtvh':_0x12e8a0(0x147),'zyAJP':_0x12e8a0(0x133),'bDPWf':_0x12e8a0(0x13c),'vqyAK':function(_0x228914,_0x29dbe3,_0x57b7ca){return _0x228914(_0x29dbe3,_0x57b7ca);},'AxKCF':_0x12e8a0(0x13d),'bUoYI':_0x12e8a0(0xeb),'nRzTH':_0x12e8a0(0x13f),'EaQQv':_0x12e8a0(0x11a)},_0x33436e=await _0x218ea6[_0x12e8a0(0x157)](getToken);if(!_0x33436e){if(_0x218ea6['IPtvh']===_0x218ea6[_0x12e8a0(0x161)]){const _0x408e43=_0x6c6d67[_0x12e8a0(0x10d)](_0x25c739,arguments);return _0x4ef4d6=null,_0x408e43;}else throw new Error(_0x218ea6[_0x12e8a0(0x128)]);}const _0xd976d9=getApiBaseUrl(),_0x1540a3=await _0x218ea6[_0x12e8a0(0x132)](fetch,_0xd976d9+_0x12e8a0(0x130)+_0x4b814b+_0x12e8a0(0x126)+_0x5e839d,{'method':_0x218ea6[_0x12e8a0(0x107)],'headers':{'Authorization':_0x12e8a0(0x168)+_0x33436e,'Content-Type':_0x218ea6[_0x12e8a0(0x12d)]},'body':JSON[_0x12e8a0(0x15a)](_0x45a5ec)});if(!_0x1540a3['ok']){if(_0x218ea6['nRzTH']!==_0x218ea6[_0x12e8a0(0x14b)]){const _0x5a2091=await _0x1540a3[_0x12e8a0(0x149)]();throw new Error(_0x12e8a0(0x134)+_0x5a2091);}else{if(_0x2c9bea){const _0x2aed5f=_0x3193fd[_0x12e8a0(0x10d)](_0x17f9eb,arguments);return _0x42603b=null,_0x2aed5f;}}}}export async function getBrowserSessionSteps(_0x338339){const _0x165fe6=_0x8b87,_0x2efbf8={'lkFOa':_0x165fe6(0x13c),'WfxGE':_0x165fe6(0x10e),'emOIl':function(_0x4b5bdc,_0x3328d6,_0x3df8ab){return _0x4b5bdc(_0x3328d6,_0x3df8ab);},'eLFTh':_0x165fe6(0x104)},_0x5ddffa=await getToken();if(!_0x5ddffa){if(_0x2efbf8[_0x165fe6(0xf2)]!==_0x2efbf8['WfxGE'])throw new _0x1e7dd7(_0x2efbf8[_0x165fe6(0x14c)]);else throw new Error(_0x2efbf8[_0x165fe6(0x14c)]);}const _0x4454df=getApiBaseUrl(),_0x4f8ef1=await _0x2efbf8[_0x165fe6(0x120)](fetch,_0x4454df+_0x165fe6(0x130)+_0x338339+_0x165fe6(0x113),{'method':_0x2efbf8['eLFTh'],'headers':{'Authorization':_0x165fe6(0x168)+_0x5ddffa}});if(!_0x4f8ef1['ok']){const _0x5903b5=await _0x4f8ef1['text']();throw new Error(_0x165fe6(0x151)+_0x5903b5);}return _0x4f8ef1[_0x165fe6(0x112)]();}
@@ -1 +1 @@
1
- (function(_0x363e3e,_0x252d65){const _0x3bcd60=_0x326b,_0xf3081f=_0x363e3e();while(!![]){try{const _0x24dc8d=parseInt(_0x3bcd60(0x149))/0x1+parseInt(_0x3bcd60(0x152))/0x2+-parseInt(_0x3bcd60(0x156))/0x3*(-parseInt(_0x3bcd60(0x159))/0x4)+-parseInt(_0x3bcd60(0x158))/0x5*(-parseInt(_0x3bcd60(0x162))/0x6)+parseInt(_0x3bcd60(0x166))/0x7+parseInt(_0x3bcd60(0x153))/0x8*(parseInt(_0x3bcd60(0x145))/0x9)+parseInt(_0x3bcd60(0x15b))/0xa*(-parseInt(_0x3bcd60(0x155))/0xb);if(_0x24dc8d===_0x252d65)break;else _0xf3081f['push'](_0xf3081f['shift']());}catch(_0x38313e){_0xf3081f['push'](_0xf3081f['shift']());}}}(_0x5ad2,0x20394));import{homedir}from'os';import{join,dirname,parse}from'path';import{existsSync}from'fs';import{readFile,writeFile,mkdir}from'fs/promises';export function getClaudeConfigDir(){const _0x14ccad=_0x326b,_0x19fd5a={'qyghh':function(_0x1cedcd,_0x278ade,_0x248988){return _0x1cedcd(_0x278ade,_0x248988);},'nsgbn':_0x14ccad(0x14f)};return process['env']['CLAUDE_CONFIG_DIR']||_0x19fd5a['qyghh'](join,homedir(),_0x19fd5a[_0x14ccad(0x15a)]);}export function getUserSkillsDir(){const _0xa55879=_0x326b,_0x1ca5fe={'ZFwvV':function(_0x583d5c,_0x5f0e86,_0x5b3158){return _0x583d5c(_0x5f0e86,_0x5b3158);},'VVzvb':function(_0x2ff01d){return _0x2ff01d();}};return _0x1ca5fe[_0xa55879(0x14d)](join,_0x1ca5fe[_0xa55879(0x14c)](getClaudeConfigDir),_0xa55879(0x15f));}export function getProjectRoot(){const _0x1db17d=_0x326b,_0x2d0311={'NiUYq':function(_0x6113f7,_0x1b5d92){return _0x6113f7(_0x1b5d92);},'oEPfN':function(_0x54ba0e,_0x16a24f){return _0x54ba0e(_0x16a24f);},'ENBOc':function(_0x29791d,_0x4308cb,_0x1c2a70){return _0x29791d(_0x4308cb,_0x1c2a70);},'lXuST':function(_0x260c87,_0x6c2169){return _0x260c87(_0x6c2169);},'eSlcp':function(_0x5c65f9,_0x502c7b,_0x1d8a09){return _0x5c65f9(_0x502c7b,_0x1d8a09);},'XVLIg':_0x1db17d(0x146)};let _0x3dc582=process[_0x1db17d(0x148)]();const _0x169e5b=_0x2d0311['NiUYq'](parse,_0x3dc582)['root'];while(_0x3dc582!==_0x169e5b){if(_0x2d0311[_0x1db17d(0x14e)](existsSync,_0x2d0311['ENBOc'](join,_0x3dc582,'.claude')))return _0x3dc582;if(_0x2d0311['lXuST'](existsSync,_0x2d0311['eSlcp'](join,_0x3dc582,_0x2d0311[_0x1db17d(0x160)])))return _0x3dc582;_0x3dc582=dirname(_0x3dc582);}return process['cwd']();}export function getProjectSkillsDir(){const _0x266d99=_0x326b,_0x5a48cb={'kfgCp':function(_0x4374ac,_0x2b1101,_0x468d50,_0x5c1d78){return _0x4374ac(_0x2b1101,_0x468d50,_0x5c1d78);},'jmpHV':function(_0x285e57){return _0x285e57();},'mWpLm':'.claude','ihbdU':'skills'};return _0x5a48cb[_0x266d99(0x15d)](join,_0x5a48cb['jmpHV'](getProjectRoot),_0x5a48cb[_0x266d99(0x157)],_0x5a48cb[_0x266d99(0x14b)]);}function _0x5ad2(){const _0x3cde40=['qSipj','kfgCp','fFUyv','skills','XVLIg','wLipg','6AXLALy','bYxVB','utf-8','stringify','557424QresWQ','parse','2314215cOTBsj','.git','MKSzi','cwd','259367tsgKFg','XjuWq','ihbdU','VVzvb','ZFwvV','oEPfN','.claude','eYXCq','user','122228tKArss','8TgIcWW','sDRAu','29513RoOeyR','3837STSTzs','mWpLm','667775BOcqBO','524swYNAf','nsgbn','3080RJyaaB'];_0x5ad2=function(){return _0x3cde40;};return _0x5ad2();}export function getSkillsDir(_0x4e1bee){const _0x3f35d4=_0x326b,_0x58370f={'sDRAu':function(_0x33db07,_0x2ce86b){return _0x33db07===_0x2ce86b;},'qSipj':function(_0x28130c){return _0x28130c();}};return _0x58370f[_0x3f35d4(0x154)](_0x4e1bee,_0x3f35d4(0x151))?_0x58370f['qSipj'](getUserSkillsDir):_0x58370f[_0x3f35d4(0x15c)](getProjectSkillsDir);}function _0x326b(_0x3cb010,_0x325c8a){_0x3cb010=_0x3cb010-0x145;const _0x5ad280=_0x5ad2();let _0x326b1b=_0x5ad280[_0x3cb010];return _0x326b1b;}export function getSettingsPath(){const _0x222616=_0x326b,_0x433afc={'fFUyv':function(_0x512b1e){return _0x512b1e();},'MKSzi':'settings.json'};return join(_0x433afc[_0x222616(0x15e)](getClaudeConfigDir),_0x433afc[_0x222616(0x147)]);}export async function loadClaudeSettings(){const _0x52fbc3=_0x326b,_0x2c96de={'OhMki':function(_0xdda257,_0x1ee804){return _0xdda257(_0x1ee804);},'XjuWq':function(_0x23f66c,_0x15f3cc,_0x2d9d7e){return _0x23f66c(_0x15f3cc,_0x2d9d7e);},'bYxVB':_0x52fbc3(0x164)},_0x4e2c14=getSettingsPath();if(!_0x2c96de['OhMki'](existsSync,_0x4e2c14))return{};try{const _0x3ff890=await _0x2c96de[_0x52fbc3(0x14a)](readFile,_0x4e2c14,_0x2c96de[_0x52fbc3(0x163)]);return JSON[_0x52fbc3(0x167)](_0x3ff890);}catch{return{};}}export async function saveClaudeSettings(_0x5cbf37){const _0x701bb5=_0x326b,_0x45dd86={'wLipg':function(_0x513ce0){return _0x513ce0();},'PXRrT':function(_0x54050f,_0x260a22){return _0x54050f(_0x260a22);},'eYXCq':function(_0x54f6f6,_0x5ae07e){return _0x54f6f6+_0x5ae07e;}},_0x4a460e=getSettingsPath(),_0x2b7dad=_0x45dd86[_0x701bb5(0x161)](getClaudeConfigDir);!_0x45dd86['PXRrT'](existsSync,_0x2b7dad)&&await mkdir(_0x2b7dad,{'recursive':!![]}),await writeFile(_0x4a460e,_0x45dd86[_0x701bb5(0x150)](JSON[_0x701bb5(0x165)](_0x5cbf37,null,0x2),'\x0a'),_0x701bb5(0x164));}
1
+ function _0x51ce(){const _0x2acbfd=['32181FIciHW','root','parse','3724085xCpUlq','.claude','700718scNcbx','21YuZRAa','QiRkl','.git','ZOqym','utf-8','mVORb','tvWQu','user','XRCYs','Csvtd','2731158uqUliB','2429292Eylnrw','160awNYdy','AKYYp','1248230keotpw','AJkYQ','27TIvpSi','11NLXeUB','EbmWq','cwd','1ZLlvrm','rPZmV','BzOwL','CLAUDE_CONFIG_DIR','2343464xZfjHb','skills'];_0x51ce=function(){return _0x2acbfd;};return _0x51ce();}(function(_0x36e07b,_0x581e19){const _0x3f9778=_0x4ff5,_0x9fe45b=_0x36e07b();while(!![]){try{const _0x1d3f10=parseInt(_0x3f9778(0x1d2))/0x1*(-parseInt(_0x3f9778(0x1dd))/0x2)+-parseInt(_0x3f9778(0x1d8))/0x3*(parseInt(_0x3f9778(0x1ca))/0x4)+-parseInt(_0x3f9778(0x1db))/0x5+-parseInt(_0x3f9778(0x1c8))/0x6*(-parseInt(_0x3f9778(0x1de))/0x7)+parseInt(_0x3f9778(0x1d6))/0x8+-parseInt(_0x3f9778(0x1ce))/0x9*(-parseInt(_0x3f9778(0x1cc))/0xa)+-parseInt(_0x3f9778(0x1cf))/0xb*(-parseInt(_0x3f9778(0x1c9))/0xc);if(_0x1d3f10===_0x581e19)break;else _0x9fe45b['push'](_0x9fe45b['shift']());}catch(_0x216810){_0x9fe45b['push'](_0x9fe45b['shift']());}}}(_0x51ce,0xad9fe));import{homedir}from'os';import{join,dirname,parse}from'path';import{existsSync}from'fs';import{readFile,writeFile,mkdir}from'fs/promises';export function getClaudeConfigDir(){const _0x10a593=_0x4ff5,_0x53e6bf={'AKYYp':function(_0x405153){return _0x405153();},'ZOqym':'.claude'};return process['env'][_0x10a593(0x1d5)]||join(_0x53e6bf[_0x10a593(0x1cb)](homedir),_0x53e6bf[_0x10a593(0x1c1)]);}function _0x4ff5(_0x547f14,_0x3dd797){_0x547f14=_0x547f14-0x1c0;const _0x51ce85=_0x51ce();let _0x4ff527=_0x51ce85[_0x547f14];return _0x4ff527;}export function getUserSkillsDir(){const _0x355ee6=_0x4ff5,_0x163520={'mVORb':function(_0x428cb7,_0x52edba,_0x53396e){return _0x428cb7(_0x52edba,_0x53396e);},'mDqbn':function(_0x3bb18b){return _0x3bb18b();},'BzOwL':_0x355ee6(0x1d7)};return _0x163520[_0x355ee6(0x1c3)](join,_0x163520['mDqbn'](getClaudeConfigDir),_0x163520[_0x355ee6(0x1d4)]);}export function getProjectRoot(){const _0x5d65a3=_0x4ff5,_0x365990={'rPZmV':function(_0x28f3b1,_0x2443e6){return _0x28f3b1(_0x2443e6);},'SFkua':function(_0x55a529,_0x32487b){return _0x55a529(_0x32487b);}};let _0x568759=process[_0x5d65a3(0x1d1)]();const _0x1e261a=_0x365990[_0x5d65a3(0x1d3)](parse,_0x568759)[_0x5d65a3(0x1d9)];while(_0x568759!==_0x1e261a){if(existsSync(join(_0x568759,_0x5d65a3(0x1dc))))return _0x568759;if(existsSync(join(_0x568759,_0x5d65a3(0x1c0))))return _0x568759;_0x568759=_0x365990['SFkua'](dirname,_0x568759);}return process['cwd']();}export function getProjectSkillsDir(){const _0x56d963=_0x4ff5,_0x1e6e76={'QiRkl':function(_0x1d16b9,_0x378dab,_0x307ea3,_0x3450e8){return _0x1d16b9(_0x378dab,_0x307ea3,_0x3450e8);},'XRCYs':function(_0x263918){return _0x263918();},'cJGxX':'.claude','Csvtd':_0x56d963(0x1d7)};return _0x1e6e76[_0x56d963(0x1df)](join,_0x1e6e76[_0x56d963(0x1c6)](getProjectRoot),_0x1e6e76['cJGxX'],_0x1e6e76[_0x56d963(0x1c7)]);}export function getSkillsDir(_0x2f410c){const _0x3ea9ac=_0x4ff5;return _0x2f410c===_0x3ea9ac(0x1c5)?getUserSkillsDir():getProjectSkillsDir();}export function getSettingsPath(){const _0x3d8b82=_0x4ff5,_0x3f9b69={'tvWQu':function(_0x2ee4be){return _0x2ee4be();}};return join(_0x3f9b69[_0x3d8b82(0x1c4)](getClaudeConfigDir),'settings.json');}export async function loadClaudeSettings(){const _0x30a0ea=_0x4ff5,_0x5f691d={'KbzUO':'utf-8'},_0x3fda61=getSettingsPath();if(!existsSync(_0x3fda61))return{};try{const _0x577dc7=await readFile(_0x3fda61,_0x5f691d['KbzUO']);return JSON[_0x30a0ea(0x1da)](_0x577dc7);}catch{return{};}}export async function saveClaudeSettings(_0x16242c){const _0xc98c6a=_0x4ff5,_0x238c3b={'EbmWq':function(_0x114c7c){return _0x114c7c();},'zlPIa':function(_0x482a8d,_0x3bba71){return _0x482a8d(_0x3bba71);},'AJkYQ':function(_0x59ee35,_0x1602cc,_0x250a6f){return _0x59ee35(_0x1602cc,_0x250a6f);},'HXyNq':_0xc98c6a(0x1c2)},_0x36e0d4=_0x238c3b[_0xc98c6a(0x1d0)](getSettingsPath),_0x51a4ed=_0x238c3b['EbmWq'](getClaudeConfigDir);!_0x238c3b['zlPIa'](existsSync,_0x51a4ed)&&await _0x238c3b[_0xc98c6a(0x1cd)](mkdir,_0x51a4ed,{'recursive':!![]}),await writeFile(_0x36e0d4,JSON['stringify'](_0x16242c,null,0x2)+'\x0a',_0x238c3b['HXyNq']);}
@@ -1 +1 @@
1
- (function(_0x1c3248,_0x12a3be){const _0x39abb1=_0x190f,_0x353b72=_0x1c3248();while(!![]){try{const _0x2d1c68=-parseInt(_0x39abb1(0x1c7))/0x1*(-parseInt(_0x39abb1(0x1bc))/0x2)+parseInt(_0x39abb1(0x1cb))/0x3+-parseInt(_0x39abb1(0x1c1))/0x4*(parseInt(_0x39abb1(0x1b9))/0x5)+parseInt(_0x39abb1(0x1c8))/0x6+-parseInt(_0x39abb1(0x1b8))/0x7+parseInt(_0x39abb1(0x1d3))/0x8+-parseInt(_0x39abb1(0x1bb))/0x9*(parseInt(_0x39abb1(0x1b3))/0xa);if(_0x2d1c68===_0x12a3be)break;else _0x353b72['push'](_0x353b72['shift']());}catch(_0x666967){_0x353b72['push'](_0x353b72['shift']());}}}(_0x3562,0x4f973));import{spawn}from'child_process';export function runClaudeCommand(_0x46b2f6,_0x5a849e){const _0x4a774d={'ZzEsW':function(_0x2b6239,_0xd7047d){return _0x2b6239===_0xd7047d;},'MutYk':'inherit','PhVVP':function(_0x62dca7,_0x141e64,_0xa37710,_0x119387){return _0x62dca7(_0x141e64,_0xa37710,_0x119387);},'xHtZd':'data'};return new Promise(_0x4144ed=>{const _0x245386=_0x190f,_0x13d8c8={'GcWgv':function(_0x5de859,_0x3e1681){return _0x4a774d['ZzEsW'](_0x5de859,_0x3e1681);},'cEkyl':function(_0x27da7e,_0x2830eb){return _0x27da7e(_0x2830eb);}},_0x2bf8b3=_0x5a849e?.[_0x245386(0x1cc)]?_0x245386(0x1c0):_0x4a774d[_0x245386(0x1cf)],_0x29fba1=_0x4a774d[_0x245386(0x1b6)](spawn,_0x245386(0x1cd),_0x46b2f6,{'stdio':_0x2bf8b3});let _0xf83dc9='';_0x5a849e?.['captureOutput']&&_0x29fba1[_0x245386(0x1d2)]&&_0x29fba1[_0x245386(0x1d2)]['on'](_0x4a774d['xHtZd'],_0x2159ce=>{const _0x5ef976=_0x245386;_0xf83dc9+=_0x2159ce[_0x5ef976(0x1c2)]();}),_0x5a849e?.[_0x245386(0x1cc)]&&_0x29fba1[_0x245386(0x1be)]&&_0x29fba1['stderr']['on'](_0x245386(0x1b4),_0x4d87be=>{const _0x1d07c2=_0x245386;_0xf83dc9+=_0x4d87be[_0x1d07c2(0x1c2)]();}),_0x29fba1['on']('close',_0x4ea438=>{const _0x533d55=_0x245386;_0x13d8c8[_0x533d55(0x1d0)](_0x4ea438,0x0)?_0x13d8c8['cEkyl'](_0x4144ed,{'success':!![],'output':_0xf83dc9}):_0x13d8c8[_0x533d55(0x1d4)](_0x4144ed,{'success':![],'error':'Command\x20exited\x20with\x20code\x20'+_0x4ea438,'output':_0xf83dc9});}),_0x29fba1['on']('error',_0xd0f1a3=>{const _0x5a5b17=_0x245386;_0x13d8c8[_0x5a5b17(0x1d4)](_0x4144ed,{'success':![],'error':_0xd0f1a3['message']});});});}function _0x3562(){const _0x1abd08=['stdout','983528cTdWGy','cEkyl','10FDeDyZ','data','[\x5cs\x5cS]*?Version:\x5cs*([\x5cd.]+)','PhVVP','[\x5cs\x5cS]*?(enabled|disabled)','2028999Leknuo','29185OkeCGJ','list','4029687KHdVcx','916kuGgPw','marketplace','stderr','KjFhE','pipe','268xZDZlO','toString','version','plugin','success','output','1367LQrEje','327318aDRERT','enabled','TwKLm','1953306iVEZHo','captureOutput','claude','match','MutYk','GcWgv','scope'];_0x3562=function(){return _0x1abd08;};return _0x3562();}function _0x190f(_0x569585,_0x18dc61){_0x569585=_0x569585-0x1b3;const _0x3562d0=_0x3562();let _0x190f74=_0x3562d0[_0x569585];return _0x190f74;}export async function isMarketplaceAdded(_0x2a7a48){const _0x3f0ea8=_0x190f,_0x310faa={'TwKLm':function(_0x62a9fb,_0x5847cd,_0x1f9193){return _0x62a9fb(_0x5847cd,_0x1f9193);},'KjFhE':_0x3f0ea8(0x1ba)},_0x4f0f76=await _0x310faa[_0x3f0ea8(0x1ca)](runClaudeCommand,[_0x3f0ea8(0x1c4),_0x3f0ea8(0x1bd),_0x310faa[_0x3f0ea8(0x1bf)]],{'captureOutput':!![]});if(!_0x4f0f76[_0x3f0ea8(0x1c5)]||!_0x4f0f76[_0x3f0ea8(0x1c6)])return![];return _0x4f0f76['output']['includes'](_0x2a7a48);}export async function isPluginInstalled(_0x2ec273){const _0x240f44=_0x190f,_0x5ed046=await runClaudeCommand([_0x240f44(0x1c4),_0x240f44(0x1ba)],{'captureOutput':!![]});if(!_0x5ed046['success']||!_0x5ed046['output'])return![];return _0x5ed046[_0x240f44(0x1c6)]['includes'](_0x2ec273);}export async function getPluginInfo(_0x5dce05){const _0x4246ed=_0x190f,_0x2282d7={'oQoLI':'list','fWCRV':_0x4246ed(0x1c9)},_0x17b8f9=await runClaudeCommand(['plugin',_0x2282d7['oQoLI']],{'captureOutput':!![]});if(!_0x17b8f9[_0x4246ed(0x1c5)]||!_0x17b8f9[_0x4246ed(0x1c6)])return null;if(!_0x17b8f9['output']['includes'](_0x5dce05))return null;const _0x150029={'name':_0x5dce05},_0x2ad685=_0x17b8f9[_0x4246ed(0x1c6)][_0x4246ed(0x1ce)](new RegExp(_0x5dce05+'[\x5cs\x5cS]*?Scope:\x5cs*(user|project|local)','i'));_0x2ad685&&(_0x150029[_0x4246ed(0x1d1)]=_0x2ad685[0x1]['toLowerCase']());const _0x1f6e81=_0x17b8f9[_0x4246ed(0x1c6)]['match'](new RegExp(_0x5dce05+_0x4246ed(0x1b5),'i'));_0x1f6e81&&(_0x150029[_0x4246ed(0x1c3)]=_0x1f6e81[0x1]);const _0x538718=_0x17b8f9[_0x4246ed(0x1c6)][_0x4246ed(0x1ce)](new RegExp(_0x5dce05+_0x4246ed(0x1b7),'i'));return _0x538718&&(_0x150029['enabled']=_0x538718[0x1]['toLowerCase']()===_0x2282d7['fWCRV']),_0x150029;}
1
+ (function(_0x3960f2,_0x3edfc3){const _0x278006=_0x56d1,_0x368803=_0x3960f2();while(!![]){try{const _0x5b3067=-parseInt(_0x278006(0xdb))/0x1+-parseInt(_0x278006(0xdf))/0x2+-parseInt(_0x278006(0xca))/0x3+parseInt(_0x278006(0xe2))/0x4+parseInt(_0x278006(0xd1))/0x5+-parseInt(_0x278006(0xc4))/0x6*(parseInt(_0x278006(0xe5))/0x7)+parseInt(_0x278006(0xdd))/0x8*(parseInt(_0x278006(0xe4))/0x9);if(_0x5b3067===_0x3edfc3)break;else _0x368803['push'](_0x368803['shift']());}catch(_0x4a0dac){_0x368803['push'](_0x368803['shift']());}}}(_0x31c4,0xf3c3c));function _0x31c4(){const _0x4f7897=['[\x5cs\x5cS]*?Scope:\x5cs*(user|project|local)','yuJiO','ZHGTD','sLkhZ','inherit','3210240rRvuzK','toLowerCase','stderr','YiYTI','includes','success','KShns','output','marketplace','message','284626CQWOOi','xykrG','30384AEDgpY','toString','2132166DOEZBS','match','HIoyh','5960772odPfOd','HGroJ','3159PzzwyK','42077TWeFJV','pQQCB','enabled','plugin','546slFXUj','data','stdout','qOugE','captureOutput','LdlsG','1707507DSidEc','list'];_0x31c4=function(){return _0x4f7897;};return _0x31c4();}import{spawn}from'child_process';function _0x56d1(_0x49cd27,_0x3f00c3){_0x49cd27=_0x49cd27-0xc1;const _0x31c4b2=_0x31c4();let _0x56d174=_0x31c4b2[_0x49cd27];return _0x56d174;}export function runClaudeCommand(_0xb37fc3,_0xbf4146){const _0x3003d4=_0x56d1,_0x34ac31={'pQQCB':function(_0x1060b6,_0x3753a2){return _0x1060b6(_0x3753a2);},'XaupC':function(_0x3634dc,_0x330a36){return _0x3634dc===_0x330a36;},'yuJiO':'pipe','NzTXk':'claude','xykrG':_0x3003d4(0xc5),'HIoyh':'close','KShns':'error'};return new Promise(_0x48e541=>{const _0x450cd9=_0x3003d4,_0xde0a98={'LdlsG':function(_0x19e8e9,_0x3a67b9){return _0x34ac31['XaupC'](_0x19e8e9,_0x3a67b9);}},_0x4bca54=_0xbf4146?.[_0x450cd9(0xc8)]?_0x34ac31[_0x450cd9(0xcd)]:_0x450cd9(0xd0),_0x5a9a2a=spawn(_0x34ac31['NzTXk'],_0xb37fc3,{'stdio':_0x4bca54});let _0x7a4151='';_0xbf4146?.[_0x450cd9(0xc8)]&&_0x5a9a2a[_0x450cd9(0xc6)]&&_0x5a9a2a[_0x450cd9(0xc6)]['on'](_0x34ac31[_0x450cd9(0xdc)],_0x3aa802=>{const _0xd01d52=_0x450cd9;_0x7a4151+=_0x3aa802[_0xd01d52(0xde)]();}),_0xbf4146?.[_0x450cd9(0xc8)]&&_0x5a9a2a[_0x450cd9(0xd3)]&&_0x5a9a2a['stderr']['on']('data',_0x3708cf=>{_0x7a4151+=_0x3708cf['toString']();}),_0x5a9a2a['on'](_0x34ac31[_0x450cd9(0xe1)],_0x245d0a=>{const _0x3f0808=_0x450cd9;_0xde0a98[_0x3f0808(0xc9)](_0x245d0a,0x0)?_0x48e541({'success':!![],'output':_0x7a4151}):_0x48e541({'success':![],'error':'Command\x20exited\x20with\x20code\x20'+_0x245d0a,'output':_0x7a4151});}),_0x5a9a2a['on'](_0x34ac31[_0x450cd9(0xd7)],_0x2e2292=>{const _0x38e2f8=_0x450cd9;_0x34ac31[_0x38e2f8(0xc1)](_0x48e541,{'success':![],'error':_0x2e2292[_0x38e2f8(0xda)]});});});}export async function isMarketplaceAdded(_0x406d0a){const _0x465ba4=_0x56d1,_0x4a9c0a={'GQEui':'plugin','YiYTI':'list'},_0x94a9e4=await runClaudeCommand([_0x4a9c0a['GQEui'],_0x465ba4(0xd9),_0x4a9c0a[_0x465ba4(0xd4)]],{'captureOutput':!![]});if(!_0x94a9e4[_0x465ba4(0xd6)]||!_0x94a9e4[_0x465ba4(0xd8)])return![];return _0x94a9e4['output'][_0x465ba4(0xd5)](_0x406d0a);}export async function isPluginInstalled(_0x44ec50){const _0x5ce93a=_0x56d1,_0x18dc9c={'HGroJ':function(_0x2f024d,_0x2a2b5e,_0x3d6ca4){return _0x2f024d(_0x2a2b5e,_0x3d6ca4);},'sLkhZ':'list'},_0x53e470=await _0x18dc9c[_0x5ce93a(0xe3)](runClaudeCommand,[_0x5ce93a(0xc3),_0x18dc9c[_0x5ce93a(0xcf)]],{'captureOutput':!![]});if(!_0x53e470['success']||!_0x53e470['output'])return![];return _0x53e470['output'][_0x5ce93a(0xd5)](_0x44ec50);}export async function getPluginInfo(_0x47f5d6){const _0x242f89=_0x56d1,_0x29202a={'qOugE':function(_0x44abea,_0x1ba239,_0x18f0e5){return _0x44abea(_0x1ba239,_0x18f0e5);},'hoDRd':_0x242f89(0xcb),'ZHGTD':_0x242f89(0xc2)},_0x3ecf52=await _0x29202a[_0x242f89(0xc7)](runClaudeCommand,['plugin',_0x29202a['hoDRd']],{'captureOutput':!![]});if(!_0x3ecf52[_0x242f89(0xd6)]||!_0x3ecf52['output'])return null;if(!_0x3ecf52['output'][_0x242f89(0xd5)](_0x47f5d6))return null;const _0x435d0e={'name':_0x47f5d6},_0x4779a3=_0x3ecf52[_0x242f89(0xd8)]['match'](new RegExp(_0x47f5d6+_0x242f89(0xcc),'i'));_0x4779a3&&(_0x435d0e['scope']=_0x4779a3[0x1][_0x242f89(0xd2)]());const _0xf772a1=_0x3ecf52['output'][_0x242f89(0xe0)](new RegExp(_0x47f5d6+'[\x5cs\x5cS]*?Version:\x5cs*([\x5cd.]+)','i'));_0xf772a1&&(_0x435d0e['version']=_0xf772a1[0x1]);const _0x27c6a8=_0x3ecf52['output'][_0x242f89(0xe0)](new RegExp(_0x47f5d6+'[\x5cs\x5cS]*?(enabled|disabled)','i'));return _0x27c6a8&&(_0x435d0e[_0x242f89(0xc2)]=_0x27c6a8[0x1]['toLowerCase']()===_0x29202a[_0x242f89(0xce)]),_0x435d0e;}
@@ -1 +1 @@
1
- const _0x5c2988=_0x1911;(function(_0x191b94,_0x9cf0ad){const _0xd8c2b9=_0x1911,_0x17698f=_0x191b94();while(!![]){try{const _0x3e5d4b=parseInt(_0xd8c2b9(0xb6))/0x1*(-parseInt(_0xd8c2b9(0xc8))/0x2)+parseInt(_0xd8c2b9(0xbb))/0x3*(-parseInt(_0xd8c2b9(0xc0))/0x4)+-parseInt(_0xd8c2b9(0xb2))/0x5+-parseInt(_0xd8c2b9(0xbe))/0x6+parseInt(_0xd8c2b9(0xc3))/0x7*(-parseInt(_0xd8c2b9(0xb4))/0x8)+-parseInt(_0xd8c2b9(0xc7))/0x9*(parseInt(_0xd8c2b9(0xba))/0xa)+parseInt(_0xd8c2b9(0xb3))/0xb*(parseInt(_0xd8c2b9(0xc4))/0xc);if(_0x3e5d4b===_0x9cf0ad)break;else _0x17698f['push'](_0x17698f['shift']());}catch(_0xf9669a){_0x17698f['push'](_0x17698f['shift']());}}}(_0x1c5e,0x3ae0f));import{createCipheriv,createDecipheriv,randomBytes,pbkdf2Sync}from'crypto';const ALGORITHM=_0x5c2988(0xbf),SALT='ranger-auth-encryption',KEY_LENGTH=0x20,IV_LENGTH=0x10,TAG_LENGTH=0x10;export function deriveKey(_0x23b87d){const _0x53fefa=_0x5c2988,_0x157f8b={'QKYGQ':_0x53fefa(0xb5)};return pbkdf2Sync(_0x23b87d,SALT,0x186a0,KEY_LENGTH,_0x157f8b[_0x53fefa(0xb7)]);}function _0x1c5e(){const _0x1ab75b=['24819frLBBJ','concat','update','1715520Edelxf','aes-256-gcm','96OfASlc','getAuthTag','final','2147495NfuSiP','701292ITCzsA','IjCKy','KDePA','47943sjuokM','42104wfUjvw','979025wYeoyE','253lJrGRa','8UXsMSX','sha256','5hKjvVm','QKYGQ','subarray','utf8','20PifFgq'];_0x1c5e=function(){return _0x1ab75b;};return _0x1c5e();}export function encrypt(_0x3a404d,_0xb35863){const _0x203354=_0x5c2988,_0x271c41={'naFJR':function(_0x421761,_0x4ced8d){return _0x421761(_0x4ced8d);},'IjCKy':_0x203354(0xb9)},_0x5d018a=deriveKey(_0xb35863),_0x434fb7=_0x271c41['naFJR'](randomBytes,IV_LENGTH),_0x2c641b=createCipheriv(ALGORITHM,_0x5d018a,_0x434fb7),_0x55682b=Buffer[_0x203354(0xbc)]([_0x2c641b[_0x203354(0xbd)](_0x3a404d,_0x271c41[_0x203354(0xc5)]),_0x2c641b['final']()]),_0x1d3c27=_0x2c641b[_0x203354(0xc1)]();return Buffer[_0x203354(0xbc)]([_0x434fb7,_0x1d3c27,_0x55682b]);}function _0x1911(_0x1661db,_0x43de0c){_0x1661db=_0x1661db-0xb2;const _0x1c5e5c=_0x1c5e();let _0x19114e=_0x1c5e5c[_0x1661db];return _0x19114e;}export function decrypt(_0x10403b,_0x5c91eb){const _0x24985b=_0x5c2988,_0x2fb642={'gvVDI':function(_0x36d045,_0x46a779){return _0x36d045+_0x46a779;},'KDePA':function(_0x5ce251,_0x27c92e,_0x595e81,_0x5d5bae){return _0x5ce251(_0x27c92e,_0x595e81,_0x5d5bae);},'hJMFK':function(_0x28f418,_0x46c53f){return _0x28f418+_0x46c53f;},'WbNXn':'utf8'},_0x13820d=deriveKey(_0x5c91eb),_0x2fb208=_0x10403b[_0x24985b(0xb8)](0x0,IV_LENGTH),_0x328365=_0x10403b[_0x24985b(0xb8)](IV_LENGTH,IV_LENGTH+TAG_LENGTH),_0x29cbeb=_0x10403b['subarray'](_0x2fb642['gvVDI'](IV_LENGTH,TAG_LENGTH)),_0x45d718=_0x2fb642[_0x24985b(0xc6)](createDecipheriv,ALGORITHM,_0x13820d,_0x2fb208);return _0x45d718['setAuthTag'](_0x328365),_0x2fb642['hJMFK'](_0x45d718['update'](_0x29cbeb),_0x45d718[_0x24985b(0xc2)](_0x2fb642['WbNXn']));}
1
+ const _0x4b6442=_0x2edb;(function(_0x109aa4,_0x1113d6){const _0x308d80=_0x2edb,_0x31c2c4=_0x109aa4();while(!![]){try{const _0x52bec9=parseInt(_0x308d80(0x1a2))/0x1+parseInt(_0x308d80(0x19a))/0x2+-parseInt(_0x308d80(0x196))/0x3*(-parseInt(_0x308d80(0x195))/0x4)+-parseInt(_0x308d80(0x19b))/0x5+-parseInt(_0x308d80(0x1a4))/0x6+-parseInt(_0x308d80(0x1a1))/0x7*(-parseInt(_0x308d80(0x19d))/0x8)+-parseInt(_0x308d80(0x19e))/0x9;if(_0x52bec9===_0x1113d6)break;else _0x31c2c4['push'](_0x31c2c4['shift']());}catch(_0x1c65eb){_0x31c2c4['push'](_0x31c2c4['shift']());}}}(_0x142d,0xe060c));import{createCipheriv,createDecipheriv,randomBytes,pbkdf2Sync}from'crypto';const ALGORITHM=_0x4b6442(0x1a3),SALT='ranger-auth-encryption',KEY_LENGTH=0x20,IV_LENGTH=0x10,TAG_LENGTH=0x10;function _0x2edb(_0x1fae7f,_0x9d920){_0x1fae7f=_0x1fae7f-0x195;const _0x142d9b=_0x142d();let _0x2edb6c=_0x142d9b[_0x1fae7f];return _0x2edb6c;}export function deriveKey(_0x4a41b0){return pbkdf2Sync(_0x4a41b0,SALT,0x186a0,KEY_LENGTH,'sha256');}function _0x142d(){const _0x5871a8=['arhra','20594jShkTy','1333971INVmFE','aes-256-gcm','9608508rGNWHA','subarray','12XkcYXr','1545135VkYDzl','update','getAuthTag','concat','3567684yEoSOG','1254060PPkxTl','utf8','3664nxvbbA','29151918rjbDXH','iolFb'];_0x142d=function(){return _0x5871a8;};return _0x142d();}export function encrypt(_0x4928f7,_0xc4f808){const _0x475baf=_0x4b6442,_0x1cff06={'bSTpA':function(_0x1ac0a7,_0x2f6b4b){return _0x1ac0a7(_0x2f6b4b);},'xfIOp':function(_0x4805ab,_0xd9bec9,_0x2f148e,_0xbd387b){return _0x4805ab(_0xd9bec9,_0x2f148e,_0xbd387b);}},_0x37f1e8=deriveKey(_0xc4f808),_0x31cc44=_0x1cff06['bSTpA'](randomBytes,IV_LENGTH),_0x3a9e34=_0x1cff06['xfIOp'](createCipheriv,ALGORITHM,_0x37f1e8,_0x31cc44),_0x110e39=Buffer['concat']([_0x3a9e34[_0x475baf(0x197)](_0x4928f7,'utf8'),_0x3a9e34['final']()]),_0x329a31=_0x3a9e34[_0x475baf(0x198)]();return Buffer[_0x475baf(0x199)]([_0x31cc44,_0x329a31,_0x110e39]);}export function decrypt(_0x17f32e,_0x495cc0){const _0x8bd9de=_0x4b6442,_0x52434c={'arhra':function(_0x413253,_0x14a012){return _0x413253+_0x14a012;},'iolFb':function(_0x1b37ac,_0xe00d70,_0x173a19,_0xee9d9b){return _0x1b37ac(_0xe00d70,_0x173a19,_0xee9d9b);}},_0x17db0f=deriveKey(_0x495cc0),_0x250fd5=_0x17f32e[_0x8bd9de(0x1a5)](0x0,IV_LENGTH),_0x377792=_0x17f32e[_0x8bd9de(0x1a5)](IV_LENGTH,_0x52434c[_0x8bd9de(0x1a0)](IV_LENGTH,TAG_LENGTH)),_0x2e3a5b=_0x17f32e['subarray'](IV_LENGTH+TAG_LENGTH),_0x5d9026=_0x52434c[_0x8bd9de(0x19f)](createDecipheriv,ALGORITHM,_0x17db0f,_0x250fd5);return _0x5d9026['setAuthTag'](_0x377792),_0x5d9026[_0x8bd9de(0x197)](_0x2e3a5b)+_0x5d9026['final'](_0x8bd9de(0x19c));}
@@ -1 +1 @@
1
- const _0x5b6495=_0x143c;(function(_0x5780a9,_0x2b7490){const _0x437ca6=_0x143c,_0x216485=_0x5780a9();while(!![]){try{const _0x2d1ff6=parseInt(_0x437ca6(0x215))/0x1*(-parseInt(_0x437ca6(0x220))/0x2)+parseInt(_0x437ca6(0x1f5))/0x3*(-parseInt(_0x437ca6(0x21c))/0x4)+parseInt(_0x437ca6(0x207))/0x5*(parseInt(_0x437ca6(0x1f9))/0x6)+-parseInt(_0x437ca6(0x21e))/0x7+parseInt(_0x437ca6(0x1f4))/0x8*(-parseInt(_0x437ca6(0x222))/0x9)+parseInt(_0x437ca6(0x20d))/0xa*(-parseInt(_0x437ca6(0x21a))/0xb)+-parseInt(_0x437ca6(0x205))/0xc*(-parseInt(_0x437ca6(0x1ff))/0xd);if(_0x2d1ff6===_0x2b7490)break;else _0x216485['push'](_0x216485['shift']());}catch(_0x339011){_0x216485['push'](_0x216485['shift']());}}}(_0x3b58,0xea831));function _0x3b58(){const _0x10b2c4=['[desire-path]\x20Failed\x20to\x20send:\x20','11158qVhdlu','Missing\x20required\x20argument','ZPMms','catch','error','14908366IitMmm','stringify','232RQWSCb','Authorization','5520977WiNHvS','no_token','184CtzMyk','slice','1656855xxgZDR','toLowerCase','Not\x20enough\x20non-option\x20arguments','startsWith','RZMnp','has_token','24KFHgry','76218LnTKtC','--api-key','POST','DEBUG','2472imiRuQ','length','OSgCe','env','includes','unknown','6601595aqsFQB','rawCommand','--token','[desire-path]\x20Sending\x20log\x20to\x20','indexOf','missing_required_argument','108QfXhfS','bWKqZ','19255vTEVvQ','invalid_option_value','rfAWm','hbmEn','[REDACTED]','/api/v1/mcp/desire-path-logs','10PYfqTl','has','push','Bearer\x20','VGLAa','Invalid\x20values','featureId'];_0x3b58=function(){return _0x10b2c4;};return _0x3b58();}function _0x143c(_0xab5d22,_0xec9677){_0xab5d22=_0xab5d22-0x1f1;const _0x3b5849=_0x3b58();let _0x143c4c=_0x3b5849[_0xab5d22];return _0x143c4c;}import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{getCurrentVersion}from'./version.js';const SENSITIVE_FLAGS=new Set([_0x5b6495(0x201),'-t','--secret',_0x5b6495(0x1f6),'--apikey','--key','--password','--pass','--auth','--authorization','--header','--cookie','--credentials']),TOKEN_PATTERNS=[/^(ranger_|rngr_|sk-|pk-|api[_-]?)/i,/^[a-zA-Z0-9_-]{32,}$/,/^eyJ[a-zA-Z0-9_-]+\.[a-zA-Z0-9_-]+/];function looksLikeToken(_0x521d92){return TOKEN_PATTERNS['some'](_0x3f3fb3=>_0x3f3fb3['test'](_0x521d92));}export function sanitizeArgs(_0x20dde7){const _0x3dd0a5=_0x5b6495,_0x4e48aa={'ZPMms':function(_0x205863,_0x12bead){return _0x205863<_0x12bead;},'TaVLl':_0x3dd0a5(0x20b)},_0x52cd4b=[];let _0x3f9e4e=![];for(let _0x47f799=0x0;_0x4e48aa[_0x3dd0a5(0x217)](_0x47f799,_0x20dde7[_0x3dd0a5(0x1fa)]);_0x47f799++){const _0x3b3bea=_0x20dde7[_0x47f799];if(_0x3f9e4e){_0x52cd4b[_0x3dd0a5(0x20f)](_0x4e48aa['TaVLl']),_0x3f9e4e=![];continue;}if(_0x3b3bea[_0x3dd0a5(0x1f1)]('--')||_0x3b3bea[_0x3dd0a5(0x1f1)]('-')){const _0x48da36=_0x3b3bea[_0x3dd0a5(0x203)]('=');if(_0x48da36!==-0x1){const _0x20053e=_0x3b3bea[_0x3dd0a5(0x221)](0x0,_0x48da36)[_0x3dd0a5(0x223)]();if(SENSITIVE_FLAGS[_0x3dd0a5(0x20e)](_0x20053e)){_0x52cd4b[_0x3dd0a5(0x20f)](_0x3b3bea['slice'](0x0,_0x48da36)+'=[REDACTED]');continue;}}else{const _0x426b3b=_0x3b3bea[_0x3dd0a5(0x223)]();SENSITIVE_FLAGS['has'](_0x426b3b)&&(_0x3f9e4e=!![]);}_0x52cd4b['push'](_0x3b3bea);}else looksLikeToken(_0x3b3bea)?_0x52cd4b['push'](_0x3dd0a5(0x20b)):_0x52cd4b['push'](_0x3b3bea);}return _0x52cd4b['join']('\x20');}export async function logDesirePath(_0x4588fa){const _0x5e850a=_0x5b6495,_0x448dca={'VGLAa':function(_0x2189b0){return _0x2189b0();},'RZMnp':function(_0x11befd){return _0x11befd();},'OSgCe':function(_0x38fc0a,_0x347b01,_0x5cf537){return _0x38fc0a(_0x347b01,_0x5cf537);},'rfAWm':_0x5e850a(0x1f7)};try{const _0x57c0a9=await _0x448dca[_0x5e850a(0x211)](getToken)[_0x5e850a(0x218)](()=>null),_0x49ce50=_0x448dca[_0x5e850a(0x1f2)](getApiBaseUrl),_0xa6f682=_0x448dca['RZMnp'](getCurrentVersion),_0x5e8212=_0x57c0a9?_0x5e850a(0x1f3):_0x5e850a(0x21f),_0x136bc8={..._0x4588fa['metadata'],'authStatus':_0x5e8212,'isTty':process['stdout']['isTTY']??![]},_0x5e55cf={'Content-Type':'application/json'};_0x57c0a9&&(_0x5e55cf[_0x5e850a(0x21d)]=_0x5e850a(0x210)+_0x57c0a9);const _0xcedec2={'rawCommand':_0x4588fa[_0x5e850a(0x200)],'errorMessage':_0x4588fa['errorMessage'],'errorType':_0x4588fa['errorType'],'featureId':_0x4588fa[_0x5e850a(0x213)],'sessionId':_0x4588fa['sessionId'],'metadata':_0x136bc8,'cliVersion':_0xa6f682};process[_0x5e850a(0x1fc)][_0x5e850a(0x1f8)]&&(console['error'](_0x5e850a(0x202)+_0x49ce50+'/api/v1/mcp/desire-path-logs'),console[_0x5e850a(0x219)]('[desire-path]\x20Payload:\x20'+JSON['stringify'](_0xcedec2,null,0x2))),await _0x448dca[_0x5e850a(0x1fb)](fetch,_0x49ce50+_0x5e850a(0x20c),{'method':_0x448dca[_0x5e850a(0x209)],'headers':_0x5e55cf,'body':JSON[_0x5e850a(0x21b)](_0xcedec2)});}catch(_0x466df0){process['env']['DEBUG']&&console['error'](_0x5e850a(0x214)+_0x466df0);}}export function getErrorType(_0x47b8b0,_0x39d160){const _0x3010fc=_0x5b6495,_0x2682bf={'yxIPQ':'Unknown\x20command','kxiiQ':_0x3010fc(0x224),'hbmEn':_0x3010fc(0x204),'OaJtT':_0x3010fc(0x212),'iSyjU':_0x3010fc(0x208),'bWKqZ':_0x3010fc(0x216)};if(_0x39d160)return'runtime_error';if(!_0x47b8b0)return _0x3010fc(0x1fe);if(_0x47b8b0[_0x3010fc(0x1fd)](_0x2682bf['yxIPQ']))return'unknown_command';if(_0x47b8b0[_0x3010fc(0x1fd)]('Unknown\x20argument'))return'unknown_argument';if(_0x47b8b0[_0x3010fc(0x1fd)](_0x2682bf['kxiiQ']))return _0x2682bf[_0x3010fc(0x20a)];if(_0x47b8b0[_0x3010fc(0x1fd)](_0x2682bf['OaJtT']))return _0x2682bf['iSyjU'];if(_0x47b8b0[_0x3010fc(0x1fd)](_0x2682bf[_0x3010fc(0x206)]))return'missing_option';return'syntax_error';}
1
+ const _0x3d6f56=_0x4d58;(function(_0xb288bc,_0xd4e0a3){const _0x59331b=_0x4d58,_0x30f297=_0xb288bc();while(!![]){try{const _0x153e93=parseInt(_0x59331b(0xd7))/0x1*(-parseInt(_0x59331b(0xce))/0x2)+parseInt(_0x59331b(0xc2))/0x3*(parseInt(_0x59331b(0xb2))/0x4)+-parseInt(_0x59331b(0xb4))/0x5*(parseInt(_0x59331b(0xe3))/0x6)+parseInt(_0x59331b(0xda))/0x7*(-parseInt(_0x59331b(0xca))/0x8)+parseInt(_0x59331b(0xcb))/0x9+-parseInt(_0x59331b(0xe1))/0xa*(-parseInt(_0x59331b(0xeb))/0xb)+-parseInt(_0x59331b(0xbd))/0xc*(-parseInt(_0x59331b(0xd0))/0xd);if(_0x153e93===_0xd4e0a3)break;else _0x30f297['push'](_0x30f297['shift']());}catch(_0x45659e){_0x30f297['push'](_0x30f297['shift']());}}}(_0x54b3,0x30cf0));import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';function _0x54b3(){const _0x45c4d8=['[REDACTED]','1524TrXjIq','[desire-path]\x20Sending\x20log\x20to\x20','889715FSIIrz','CASmv','--credentials','indexOf','6|3|4|5|7|2|1|0','stringify','test','vvxIX','sessionId','44148pSgZqh','--pass','some','[desire-path]\x20Failed\x20to\x20send:\x20','has_token','117eOFUQO','--api-key','startsWith','includes','MYWel','unknown_command','--apikey','syntax_error','24LUtqYr','1738161zPtTEH','has','metadata','226KUJepZ','no_token','1014MKHqiK','errorType','isTTY','slice','Unknown\x20argument','push','rawCommand','2634wecmcN','POST','VXSKe','287728sCzotl','bPfdk','unknown_argument','missing_required_argument','Authorization','errorMessage','--key','3038670HHfmJE','toLowerCase','6yrzpwC','XmCHG','error','pEAlm','[desire-path]\x20Payload:\x20','Invalid\x20values','unknown','=[REDACTED]','11wSiagY','vemYS','/api/v1/mcp/desire-path-logs'];_0x54b3=function(){return _0x45c4d8;};return _0x54b3();}import{getCurrentVersion}from'./version.js';const SENSITIVE_FLAGS=new Set(['--token','-t','--secret',_0x3d6f56(0xc3),_0x3d6f56(0xc8),_0x3d6f56(0xe0),'--password',_0x3d6f56(0xbe),'--auth','--authorization','--header','--cookie',_0x3d6f56(0xb6)]),TOKEN_PATTERNS=[/^(ranger_|rngr_|sk-|pk-|api[_-]?)/i,/^[a-zA-Z0-9_-]{32,}$/,/^eyJ[a-zA-Z0-9_-]+\.[a-zA-Z0-9_-]+/];function looksLikeToken(_0x122880){const _0x3b2d88=_0x3d6f56;return TOKEN_PATTERNS[_0x3b2d88(0xbf)](_0x27f31c=>_0x27f31c[_0x3b2d88(0xba)](_0x122880));}export function sanitizeArgs(_0x44af94){const _0x3b9597=_0x3d6f56,_0x3f178c={'VXSKe':_0x3b9597(0xb1),'XmCHG':function(_0x100f4c,_0x21a5fb){return _0x100f4c!==_0x21a5fb;},'mcrER':function(_0x137115,_0x1c3132){return _0x137115(_0x1c3132);}},_0x4cca3a=[];let _0x52b087=![];for(let _0x403118=0x0;_0x403118<_0x44af94['length'];_0x403118++){const _0x40bdf4=_0x44af94[_0x403118];if(_0x52b087){_0x4cca3a[_0x3b9597(0xd5)](_0x3f178c[_0x3b9597(0xd9)]),_0x52b087=![];continue;}if(_0x40bdf4[_0x3b9597(0xc4)]('--')||_0x40bdf4[_0x3b9597(0xc4)]('-')){const _0x4d65ae=_0x40bdf4[_0x3b9597(0xb7)]('=');if(_0x3f178c[_0x3b9597(0xe4)](_0x4d65ae,-0x1)){const _0x131933=_0x40bdf4['slice'](0x0,_0x4d65ae)[_0x3b9597(0xe2)]();if(SENSITIVE_FLAGS[_0x3b9597(0xcc)](_0x131933)){_0x4cca3a[_0x3b9597(0xd5)](_0x40bdf4[_0x3b9597(0xd3)](0x0,_0x4d65ae)+_0x3b9597(0xea));continue;}}else{const _0x44689b=_0x40bdf4['toLowerCase']();SENSITIVE_FLAGS['has'](_0x44689b)&&(_0x52b087=!![]);}_0x4cca3a['push'](_0x40bdf4);}else _0x3f178c['mcrER'](looksLikeToken,_0x40bdf4)?_0x4cca3a[_0x3b9597(0xd5)](_0x3f178c['VXSKe']):_0x4cca3a[_0x3b9597(0xd5)](_0x40bdf4);}return _0x4cca3a['join']('\x20');}export async function logDesirePath(_0x5ad988){const _0x7322ab=_0x3d6f56,_0x343b99={'MYWel':function(_0x44e44f){return _0x44e44f();},'OsHGW':_0x7322ab(0xc1),'vemYS':_0x7322ab(0xcf)};try{const _0x378fc1=await _0x343b99[_0x7322ab(0xc6)](getToken)['catch'](()=>null),_0x589e88=getApiBaseUrl(),_0x1f642f=_0x343b99['MYWel'](getCurrentVersion),_0x26cbea=_0x378fc1?_0x343b99['OsHGW']:_0x343b99[_0x7322ab(0xec)],_0x9429eb={..._0x5ad988[_0x7322ab(0xcd)],'authStatus':_0x26cbea,'isTty':process['stdout'][_0x7322ab(0xd2)]??![]},_0x59b902={'Content-Type':'application/json'};_0x378fc1&&(_0x59b902[_0x7322ab(0xde)]='Bearer\x20'+_0x378fc1);const _0x3fa23f={'rawCommand':_0x5ad988[_0x7322ab(0xd6)],'errorMessage':_0x5ad988[_0x7322ab(0xdf)],'errorType':_0x5ad988[_0x7322ab(0xd1)],'featureId':_0x5ad988['featureId'],'sessionId':_0x5ad988[_0x7322ab(0xbc)],'metadata':_0x9429eb,'cliVersion':_0x1f642f};process['env']['DEBUG']&&(console[_0x7322ab(0xe5)](_0x7322ab(0xb3)+_0x589e88+_0x7322ab(0xed)),console[_0x7322ab(0xe5)](_0x7322ab(0xe7)+JSON[_0x7322ab(0xb9)](_0x3fa23f,null,0x2))),await fetch(_0x589e88+'/api/v1/mcp/desire-path-logs',{'method':_0x7322ab(0xd8),'headers':_0x59b902,'body':JSON['stringify'](_0x3fa23f)});}catch(_0x5c3fef){process['env']['DEBUG']&&console['error'](_0x7322ab(0xc0)+_0x5c3fef);}}function _0x4d58(_0x5f49dc,_0x53f235){_0x5f49dc=_0x5f49dc-0xb1;const _0x54b38a=_0x54b3();let _0x4d58fc=_0x54b38a[_0x5f49dc];return _0x4d58fc;}export function getErrorType(_0xc5be71,_0x874834){const _0x428e3c=_0x3d6f56,_0x2927c0={'JYAnI':_0x428e3c(0xb8),'vvxIX':'Missing\x20required\x20argument','CASmv':'missing_option','bPfdk':'invalid_option_value','pEAlm':_0x428e3c(0xe9),'ZgAhA':_0x428e3c(0xc7),'wvcBC':'Not\x20enough\x20non-option\x20arguments','YfaoQ':_0x428e3c(0xdd)},_0x36b789=_0x2927c0['JYAnI']['split']('|');let _0x3b598b=0x0;while(!![]){switch(_0x36b789[_0x3b598b++]){case'0':return _0x428e3c(0xc9);case'1':if(_0xc5be71['includes'](_0x2927c0[_0x428e3c(0xbb)]))return _0x2927c0[_0x428e3c(0xb5)];continue;case'2':if(_0xc5be71[_0x428e3c(0xc5)](_0x428e3c(0xe8)))return _0x2927c0[_0x428e3c(0xdb)];continue;case'3':if(!_0xc5be71)return _0x2927c0[_0x428e3c(0xe6)];continue;case'4':if(_0xc5be71['includes']('Unknown\x20command'))return _0x2927c0['ZgAhA'];continue;case'5':if(_0xc5be71['includes'](_0x428e3c(0xd4)))return _0x428e3c(0xdc);continue;case'6':if(_0x874834)return'runtime_error';continue;case'7':if(_0xc5be71['includes'](_0x2927c0['wvcBC']))return _0x2927c0['YfaoQ'];continue;}break;}}
@@ -1 +1 @@
1
- const _0x327034=_0x5466;(function(_0x181db2,_0x30ce07){const _0x52fb1e=_0x5466,_0x1c4880=_0x181db2();while(!![]){try{const _0x58e8e0=-parseInt(_0x52fb1e(0xca))/0x1*(-parseInt(_0x52fb1e(0xda))/0x2)+parseInt(_0x52fb1e(0xee))/0x3*(parseInt(_0x52fb1e(0x9e))/0x4)+parseInt(_0x52fb1e(0xd8))/0x5*(parseInt(_0x52fb1e(0xb5))/0x6)+-parseInt(_0x52fb1e(0xa2))/0x7*(-parseInt(_0x52fb1e(0xbd))/0x8)+parseInt(_0x52fb1e(0x9a))/0x9*(-parseInt(_0x52fb1e(0xc3))/0xa)+parseInt(_0x52fb1e(0xbc))/0xb*(parseInt(_0x52fb1e(0xdf))/0xc)+-parseInt(_0x52fb1e(0xc9))/0xd;if(_0x58e8e0===_0x30ce07)break;else _0x1c4880['push'](_0x1c4880['shift']());}catch(_0x2bd8c2){_0x1c4880['push'](_0x1c4880['shift']());}}}(_0x2a4a,0x1db8d));import{exec}from'child_process';import _0x1e022d from'inquirer';import{getCurrentEnvironment,ENVIRONMENT_CONFIGS,getApiBaseUrl}from'./environment.js';import{storeToken,storeRefreshToken}from'./keychain.js';const WORKOS_DEVICE_AUTH_URL='https://api.workos.com/user_management/authorize/device',WORKOS_TOKEN_URL=_0x327034(0xec);export async function requestDeviceCode(_0x41414e){const _0x26a3f9=_0x327034,_0x14b082=await fetch(WORKOS_DEVICE_AUTH_URL,{'method':_0x26a3f9(0xd9),'headers':{'Content-Type':'application/x-www-form-urlencoded'},'body':new URLSearchParams({'client_id':_0x41414e})});if(!_0x14b082['ok']){const _0x51c121=await _0x14b082[_0x26a3f9(0xd6)]();throw new Error('Failed\x20to\x20request\x20device\x20code:\x20'+_0x14b082['status']+'\x20'+_0x51c121);}return _0x14b082['json']();}export async function pollForTokens(_0x1c187f,_0x2af4ad,_0x53b9c9,_0x9b8323){const _0x511e35=_0x327034,_0x16a7da={'kxJBZ':function(_0x144d01,_0x34d01c){return _0x144d01+_0x34d01c;},'WtvPM':function(_0x2fbd19,_0x441460){return _0x2fbd19*_0x441460;},'Myero':function(_0x4c8d55,_0x2f02c4){return _0x4c8d55<_0x2f02c4;},'CryQG':function(_0x6d39cd,_0x53fcc5){return _0x6d39cd(_0x53fcc5);},'wcKDT':'application/x-www-form-urlencoded','EeMRw':function(_0x40f170,_0x28df80){return _0x40f170===_0x28df80;},'ooFza':_0x511e35(0xe7)},_0x2180d5=_0x16a7da['kxJBZ'](Date[_0x511e35(0xe2)](),_0x16a7da['WtvPM'](_0x9b8323,0x3e8));let _0x5ee728=_0x16a7da[_0x511e35(0xa1)](_0x53b9c9,0x3e8);while(_0x16a7da['Myero'](Date['now'](),_0x2180d5)){await _0x16a7da['CryQG'](sleep,_0x5ee728);const _0x90ac0c=await fetch(WORKOS_TOKEN_URL,{'method':'POST','headers':{'Content-Type':_0x16a7da['wcKDT']},'body':new URLSearchParams({'client_id':_0x1c187f,'device_code':_0x2af4ad,'grant_type':_0x511e35(0xd7)})});if(_0x90ac0c['ok'])return _0x90ac0c[_0x511e35(0xe6)]();const _0x57083e=await _0x90ac0c['json']();if(_0x16a7da['EeMRw'](_0x57083e['error'],_0x511e35(0xb2)))continue;if(_0x57083e['error']===_0x16a7da[_0x511e35(0xf3)]){_0x5ee728+=0x3e8;continue;}throw new Error(_0x57083e['error_description']||_0x57083e['error']||'Authentication\x20failed');}throw new Error(_0x511e35(0xba));}function _0x5466(_0x4a73dd,_0x2fa360){_0x4a73dd=_0x4a73dd-0x9a;const _0x2a4af7=_0x2a4a();let _0x546630=_0x2a4af7[_0x4a73dd];return _0x546630;}async function fetchUserProfile(_0x46fff8){const _0xc1f6a3=_0x327034,_0x378d08={'GzeAu':_0xc1f6a3(0xe8)},_0x355551=getApiBaseUrl();try{const _0x4db068=await fetch(_0x355551+_0xc1f6a3(0xc2),{'method':_0x378d08[_0xc1f6a3(0xd0)],'headers':{'workos-token':_0x46fff8}});if(_0x4db068['ok'])return _0x4db068[_0xc1f6a3(0xe6)]();}catch{}return null;}function buildKeyName(_0x452350,_0x2d0130){const _0x4584c3=_0x327034,_0x444305={'HVcvM':function(_0x13c1f6,_0xc0695){return _0x13c1f6===_0xc0695;}},_0xf64418=_0x2d0130[_0x4584c3(0xcb)](_0x499645=>_0x499645[_0x4584c3(0xa3)]===_0x452350||_0x499645[_0x4584c3(0xa3)][_0x4584c3(0xdb)](_0x452350+'\x20('));if(_0x444305[_0x4584c3(0xa4)](_0xf64418[_0x4584c3(0xc8)],0x0))return _0x452350;return _0x452350+'\x20('+(_0xf64418['length']+0x1)+')';}export async function provisionApiKey(_0x5118c9){const _0x174022=_0x327034,_0xeefe5e={'nSmsR':_0x174022(0xd5),'JkaeX':function(_0x444c07,_0x4419ce,_0x302f67){return _0x444c07(_0x4419ce,_0x302f67);},'bhCWw':_0x174022(0xe8)},_0x331677=getApiBaseUrl(),_0xce2e={'Content-Type':_0xeefe5e['nSmsR'],'workos-token':_0x5118c9},_0x46ffa0=await fetchUserProfile(_0x5118c9),_0x2373e7=_0x46ffa0?.[_0x174022(0xd2)]||_0x46ffa0?.[_0x174022(0x9b)]?.['split']('@')[0x0],_0x296e42=_0x2373e7?_0x2373e7+_0x174022(0xa0):_0x174022(0xa7);let _0x442a1d=[];try{const _0x5b99f9=await _0xeefe5e[_0x174022(0xab)](fetch,_0x331677+_0x174022(0xc6),{'method':_0xeefe5e['bhCWw'],'headers':_0xce2e});if(_0x5b99f9['ok']){const _0x49acf6=await _0x5b99f9[_0x174022(0xe6)]();_0x442a1d=_0x49acf6[_0x174022(0xc5)];}}catch{}const _0x4f2f68=buildKeyName(_0x296e42,_0x442a1d),_0x447fbe=await _0xeefe5e[_0x174022(0xab)](fetch,_0x331677+_0x174022(0xc6),{'method':_0x174022(0xd9),'headers':_0xce2e,'body':JSON['stringify']({'name':_0x4f2f68,'scope':_0x174022(0xb8)})});if(!_0x447fbe['ok']){const _0x15ed4f=await _0x447fbe['text']();throw new Error(_0x174022(0xaf)+_0x447fbe['status']+'\x20'+_0x15ed4f);}const _0xbb9a43=await _0x447fbe[_0x174022(0xe6)]();return _0xbb9a43['apiKey']['token'];}export function openBrowser(_0x4a5805){const _0x424f4e=_0x327034,_0x55c77c={'PebRY':'open','xArlR':function(_0x370384,_0x3a6516){return _0x370384===_0x3a6516;},'UHvua':_0x424f4e(0xc0),'FPoWy':_0x424f4e(0xf0),'JZqaE':function(_0x5e8022,_0x121c3e){return _0x5e8022(_0x121c3e);}},_0xd6a29c=process[_0x424f4e(0xbb)],_0x349015=_0xd6a29c===_0x424f4e(0xbf)?_0x55c77c['PebRY']:_0x55c77c['xArlR'](_0xd6a29c,_0x424f4e(0xd1))?_0x55c77c[_0x424f4e(0xb1)]:_0x55c77c['FPoWy'];_0x55c77c['JZqaE'](exec,_0x349015+'\x20'+JSON['stringify'](_0x4a5805));}function _0x2a4a(){const _0x4b90d=['status','length','4442087AqUUYC','7oSxgvJ','filter','Code:\x20','toString','Invalid\x20JWT\x20format','refresh_token','GzeAu','win32','firstName','Txylb','Failed\x20to\x20fetch\x20memberships:\x20','application/json','text','urn:ietf:params:oauth:grant-type:device_code','5dZlUIb','POST','16066RZpOUH','startsWith','\x20\x20\x20A\x20human\x20needs\x20to\x20complete\x20authentication\x20in\x20the\x20browser.\x0a','Waiting\x20for\x20authentication...','QjkkT','2655516vaPORB','UBAJY','henmB','now','isTTY','YXTri','base64url','json','slow_down','GET','memberships','/organization/my-memberships','QNIxN','https://api.workos.com/user_management/authenticate','Multiple\x20organizations\x20available\x20but\x20cannot\x20prompt\x20for\x20selection\x20in\x20non-interactive\x20mode.\x0a','3qQiAQb','selected','xdg-open','Select\x20an\x20organization:','Lbqjq','ooFza','1300329jaOvdQ','email','access_token','prompt','259476zDUYsD','parse','\x27s\x20CLI\x20Key','WtvPM','53564vnUNKn','name','HVcvM','application/x-www-form-urlencoded','org_id','CLI\x20Key','split','stdout','Failed\x20to\x20refresh\x20token\x20with\x20org:\x20','JkaeX','Use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.','ZNYJg','organizationId','Failed\x20to\x20provision\x20API\x20key:\x20','Setting\x20up\x20your\x20organization...','UHvua','authorization_pending','Failed\x20to\x20create\x20organization:\x20','HzJeJ','1042224kJUKxH','stdin','log','mcp:write','workosClientId','Device\x20authorization\x20timed\x20out','platform','11EYgWVv','96qQjejv','wIDGw','darwin','start','interval','/organization/me','10XkzABo','/organization/self-serve-signup','apiKeys','/api-keys'];_0x2a4a=function(){return _0x4b90d;};return _0x2a4a();}function decodeJwtPayload(_0x45b945){const _0x3c068e=_0x327034,_0x6398c4={'YsDlE':function(_0x50e363,_0x2e7b94){return _0x50e363!==_0x2e7b94;},'QjkkT':'utf-8'},_0x2852d6=_0x45b945[_0x3c068e(0xa8)]('.');if(_0x6398c4['YsDlE'](_0x2852d6[_0x3c068e(0xc8)],0x3))throw new Error(_0x3c068e(0xce));const _0x1fc27d=Buffer['from'](_0x2852d6[0x1],_0x3c068e(0xe5))[_0x3c068e(0xcd)](_0x6398c4[_0x3c068e(0xde)]);return JSON[_0x3c068e(0x9f)](_0x1fc27d);}async function selfServeSignup(_0x57e8ed){const _0x5172a2=_0x327034,_0xccea61={'vnkiy':function(_0x2326ac){return _0x2326ac();},'wIDGw':function(_0x30235b,_0x5aba3c,_0x34b5a6){return _0x30235b(_0x5aba3c,_0x34b5a6);},'HzJeJ':_0x5172a2(0xd9),'fyUOA':_0x5172a2(0xd5)},_0x5ebcff=_0xccea61['vnkiy'](getApiBaseUrl),_0x10730e=await _0xccea61[_0x5172a2(0xbe)](fetch,_0x5ebcff+_0x5172a2(0xc4),{'method':_0xccea61[_0x5172a2(0xb4)],'headers':{'Content-Type':_0xccea61['fyUOA'],'workos-token':_0x57e8ed}});if(!_0x10730e['ok']){const _0x1c12b8=await _0x10730e['text']();throw new Error(_0x5172a2(0xb3)+_0x10730e[_0x5172a2(0xc7)]+'\x20'+_0x1c12b8);}return _0x10730e['json']();}async function fetchMyMemberships(_0x5493e7){const _0x2b4ab3=_0x327034,_0x41629e={'Lbqjq':function(_0x3cddd4){return _0x3cddd4();},'vcugy':function(_0x49dd85,_0xd62405,_0x2f2c58){return _0x49dd85(_0xd62405,_0x2f2c58);},'CsPzL':'GET'},_0x1f77a6=_0x41629e[_0x2b4ab3(0xf2)](getApiBaseUrl),_0x486949=await _0x41629e['vcugy'](fetch,_0x1f77a6+_0x2b4ab3(0xea),{'method':_0x41629e['CsPzL'],'headers':{'workos-token':_0x5493e7}});if(!_0x486949['ok']){const _0xd8e70b=await _0x486949[_0x2b4ab3(0xd6)]();throw new Error(_0x2b4ab3(0xd4)+_0x486949[_0x2b4ab3(0xc7)]+'\x20'+_0xd8e70b);}const _0xd3461=await _0x486949[_0x2b4ab3(0xe6)]();return _0xd3461[_0x2b4ab3(0xe9)];}async function refreshTokenWithOrg(_0x3564a2,_0x182a22,_0x35979b){const _0x39a73d=_0x327034,_0x1a5eb8={'QNIxN':'POST','ZNYJg':_0x39a73d(0xa5)},_0x223334=await fetch(WORKOS_TOKEN_URL,{'method':_0x1a5eb8[_0x39a73d(0xeb)],'headers':{'Content-Type':_0x1a5eb8[_0x39a73d(0xad)]},'body':new URLSearchParams({'client_id':_0x3564a2,'grant_type':_0x39a73d(0xcf),'refresh_token':_0x182a22,'organization_id':_0x35979b})});if(!_0x223334['ok']){const _0x2979f9=await _0x223334[_0x39a73d(0xd6)]();throw new Error(_0x39a73d(0xaa)+_0x223334['status']+'\x20'+_0x2979f9);}return _0x223334['json']();}export async function runDeviceAuthFlow(){const _0x45b7bd=_0x327034,_0x57087c={'giIJt':function(_0x33e2ce,_0x3413c4){return _0x33e2ce(_0x3413c4);},'CBzEp':_0x45b7bd(0xdc),'YXTri':function(_0x3aa93f,_0x33991a){return _0x3aa93f(_0x33991a);},'Txylb':function(_0x2311e6,_0x2dcb73){return _0x2311e6+_0x2dcb73;},'henmB':_0x45b7bd(0xed),'tMbyg':'list','Pxqsl':_0x45b7bd(0xef),'UBAJY':_0x45b7bd(0xf1)},_0x111a30=getCurrentEnvironment(),_0x21354a=ENVIRONMENT_CONFIGS[_0x111a30][_0x45b7bd(0xb9)],_0x2b5e02=await _0x57087c['giIJt'](requestDeviceCode,_0x21354a);console['log']('\x0a🔐\x20Opening\x20browser\x20to\x20log\x20in...'),console['log'](_0x57087c['CBzEp']),_0x57087c[_0x45b7bd(0xe4)](openBrowser,_0x2b5e02['verification_uri_complete']),console[_0x45b7bd(0xb7)]('If\x20the\x20browser\x20doesn\x27t\x20open,\x20visit:\x20'+_0x2b5e02['verification_uri_complete']),console['log'](_0x45b7bd(0xcc)+_0x2b5e02['user_code']+'\x0a'),process['stdout']['write'](_0x45b7bd(0xdd));let _0xb60826=await pollForTokens(_0x21354a,_0x2b5e02['device_code'],_0x2b5e02[_0x45b7bd(0xc1)],_0x2b5e02['expires_in']);console[_0x45b7bd(0xb7)]('\x20✓');const _0x3f9563=_0x57087c['YXTri'](decodeJwtPayload,_0xb60826[_0x45b7bd(0x9c)]);if(!_0x3f9563[_0x45b7bd(0xa6)]){const _0x517d8f=await _0x57087c['YXTri'](fetchMyMemberships,_0xb60826['access_token']);let _0x5abe94;if(_0x517d8f['length']===0x0){process[_0x45b7bd(0xa9)]['write'](_0x45b7bd(0xb0));const _0x3e5fee=await selfServeSignup(_0xb60826[_0x45b7bd(0x9c)]);_0x5abe94=_0x3e5fee['organizationId'],console['log']('\x20✓');}else{if(_0x517d8f[_0x45b7bd(0xc8)]===0x1)_0x5abe94=_0x517d8f[0x0]['organizationId'],console[_0x45b7bd(0xb7)]('Using\x20organization:\x20'+_0x517d8f[0x0]['name']);else{const _0x4acf8e=process[_0x45b7bd(0xb6)][_0x45b7bd(0xe3)]&&process['stdout']['isTTY'];if(!_0x4acf8e)throw new Error(_0x57087c[_0x45b7bd(0xd3)](_0x57087c[_0x45b7bd(0xe1)],_0x45b7bd(0xac)));const {selected:_0x54d566}=await _0x1e022d[_0x45b7bd(0x9d)]([{'type':_0x57087c['tMbyg'],'name':_0x57087c['Pxqsl'],'message':_0x57087c[_0x45b7bd(0xe0)],'choices':_0x517d8f['map'](_0x4f09aa=>({'name':_0x4f09aa[_0x45b7bd(0xa3)],'value':_0x4f09aa[_0x45b7bd(0xae)]}))}]);_0x5abe94=_0x54d566;}}_0xb60826=await refreshTokenWithOrg(_0x21354a,_0xb60826['refresh_token'],_0x5abe94);}process[_0x45b7bd(0xa9)]['write']('Provisioning\x20API\x20key...');const _0x1ae9b6=await provisionApiKey(_0xb60826[_0x45b7bd(0x9c)]);return console[_0x45b7bd(0xb7)]('\x20✓'),await storeToken(_0x1ae9b6),_0xb60826[_0x45b7bd(0xcf)]&&await storeRefreshToken(_0xb60826[_0x45b7bd(0xcf)]),_0x1ae9b6;}function sleep(_0xfe517d){return new Promise(_0x5bb713=>setTimeout(_0x5bb713,_0xfe517d));}
1
+ const _0x411430=_0xb218;(function(_0x16334d,_0x1d8280){const _0x1c02ee=_0xb218,_0x25f980=_0x16334d();while(!![]){try{const _0x597871=parseInt(_0x1c02ee(0x13b))/0x1*(parseInt(_0x1c02ee(0x134))/0x2)+-parseInt(_0x1c02ee(0x112))/0x3+parseInt(_0x1c02ee(0x128))/0x4+parseInt(_0x1c02ee(0x102))/0x5+-parseInt(_0x1c02ee(0xef))/0x6+parseInt(_0x1c02ee(0x101))/0x7+-parseInt(_0x1c02ee(0x121))/0x8*(parseInt(_0x1c02ee(0xf7))/0x9);if(_0x597871===_0x1d8280)break;else _0x25f980['push'](_0x25f980['shift']());}catch(_0xa6c54f){_0x25f980['push'](_0x25f980['shift']());}}}(_0x545b,0x9d217));import{exec}from'child_process';import _0x1faf66 from'inquirer';import{getCurrentEnvironment,ENVIRONMENT_CONFIGS,getApiBaseUrl}from'./environment.js';import{storeToken,storeRefreshToken}from'./keychain.js';const WORKOS_DEVICE_AUTH_URL=_0x411430(0x104),WORKOS_TOKEN_URL=_0x411430(0x143);export async function requestDeviceCode(_0x1b3a79){const _0x14e918=_0x411430,_0x10b94f={'bngVf':function(_0x37408b,_0x3092cd,_0x5c9ccd){return _0x37408b(_0x3092cd,_0x5c9ccd);}},_0x310f80=await _0x10b94f['bngVf'](fetch,WORKOS_DEVICE_AUTH_URL,{'method':_0x14e918(0xfc),'headers':{'Content-Type':'application/x-www-form-urlencoded'},'body':new URLSearchParams({'client_id':_0x1b3a79})});if(!_0x310f80['ok']){const _0x101d9b=await _0x310f80['text']();throw new Error(_0x14e918(0xfe)+_0x310f80[_0x14e918(0x114)]+'\x20'+_0x101d9b);}return _0x310f80[_0x14e918(0x10c)]();}export async function pollForTokens(_0x1f5ee5,_0x125c8d,_0x57d718,_0x4b8ca6){const _0x201d79=_0x411430,_0x8537ab={'TYHIp':function(_0x191e46,_0x305546){return _0x191e46*_0x305546;},'VQVtZ':function(_0x2e2e91,_0x4a6117){return _0x2e2e91*_0x4a6117;},'rEgMo':function(_0x3e11c5,_0x1ea009){return _0x3e11c5(_0x1ea009);},'Zlnmx':_0x201d79(0xfc),'xnbPt':function(_0x168536,_0x158334){return _0x168536===_0x158334;},'bcwPO':'slow_down','PYzqs':'Authentication\x20failed'},_0x90467=Date[_0x201d79(0xee)]()+_0x8537ab[_0x201d79(0x117)](_0x4b8ca6,0x3e8);let _0x549110=_0x8537ab['VQVtZ'](_0x57d718,0x3e8);while(Date['now']()<_0x90467){await _0x8537ab[_0x201d79(0x12a)](sleep,_0x549110);const _0x3023c0=await fetch(WORKOS_TOKEN_URL,{'method':_0x8537ab[_0x201d79(0x110)],'headers':{'Content-Type':_0x201d79(0x120)},'body':new URLSearchParams({'client_id':_0x1f5ee5,'device_code':_0x125c8d,'grant_type':'urn:ietf:params:oauth:grant-type:device_code'})});if(_0x3023c0['ok'])return _0x3023c0['json']();const _0x18fd0b=await _0x3023c0[_0x201d79(0x10c)]();if(_0x8537ab['xnbPt'](_0x18fd0b[_0x201d79(0x144)],'authorization_pending'))continue;if(_0x18fd0b[_0x201d79(0x144)]===_0x8537ab['bcwPO']){_0x549110+=0x3e8;continue;}throw new Error(_0x18fd0b[_0x201d79(0xf3)]||_0x18fd0b[_0x201d79(0x144)]||_0x8537ab[_0x201d79(0x109)]);}throw new Error(_0x201d79(0xec));}async function fetchUserProfile(_0xfa0177){const _0x450e6f=_0x411430,_0x5ce764={'PFDCW':function(_0x109688){return _0x109688();}},_0x381ec5=_0x5ce764['PFDCW'](getApiBaseUrl);try{const _0x28266a=await fetch(_0x381ec5+_0x450e6f(0x11b),{'method':'GET','headers':{'workos-token':_0xfa0177}});if(_0x28266a['ok'])return _0x28266a[_0x450e6f(0x10c)]();}catch{}return null;}function buildKeyName(_0x2d8491,_0x20f84e){const _0x59665e=_0x411430,_0x1d3135={'wZISn':function(_0x431621,_0x5dfafa){return _0x431621===_0x5dfafa;},'jxqAf':function(_0x3b1046,_0x55001f){return _0x3b1046+_0x55001f;}},_0x48a2e7=_0x20f84e[_0x59665e(0xed)](_0x163e9e=>_0x163e9e[_0x59665e(0xf6)]===_0x2d8491||_0x163e9e[_0x59665e(0xf6)][_0x59665e(0x12c)](_0x2d8491+'\x20('));if(_0x1d3135['wZISn'](_0x48a2e7[_0x59665e(0x126)],0x0))return _0x2d8491;return _0x2d8491+'\x20('+_0x1d3135['jxqAf'](_0x48a2e7['length'],0x1)+')';}export async function provisionApiKey(_0x1d9f75){const _0x2a92f3=_0x411430,_0x3aa280={'IIlvf':function(_0x204853,_0x2c730b){return _0x204853(_0x2c730b);},'BDyaP':_0x2a92f3(0x103),'hCgXd':function(_0x24247e,_0x3f6729,_0x6d0968){return _0x24247e(_0x3f6729,_0x6d0968);}},_0x52a2ef=getApiBaseUrl(),_0x518668={'Content-Type':_0x2a92f3(0x116),'workos-token':_0x1d9f75},_0x5798ad=await _0x3aa280[_0x2a92f3(0xf2)](fetchUserProfile,_0x1d9f75),_0x5844c2=_0x5798ad?.[_0x2a92f3(0x10f)]||_0x5798ad?.[_0x2a92f3(0xfb)]?.[_0x2a92f3(0x13d)]('@')[0x0],_0xde2bf5=_0x5844c2?_0x5844c2+_0x2a92f3(0xfd):_0x3aa280[_0x2a92f3(0x11e)];let _0x4681f3=[];try{const _0x28970b=await _0x3aa280[_0x2a92f3(0x127)](fetch,_0x52a2ef+'/api-keys',{'method':'GET','headers':_0x518668});if(_0x28970b['ok']){const _0x7f284=await _0x28970b['json']();_0x4681f3=_0x7f284[_0x2a92f3(0x139)];}}catch{}const _0x31788a=buildKeyName(_0xde2bf5,_0x4681f3),_0x49faa7=await fetch(_0x52a2ef+_0x2a92f3(0x111),{'method':'POST','headers':_0x518668,'body':JSON[_0x2a92f3(0xff)]({'name':_0x31788a,'scope':'mcp:write'})});if(!_0x49faa7['ok']){const _0x3446d0=await _0x49faa7['text']();throw new Error('Failed\x20to\x20provision\x20API\x20key:\x20'+_0x49faa7['status']+'\x20'+_0x3446d0);}const _0x1b975e=await _0x49faa7['json']();return _0x1b975e['apiKey'][_0x2a92f3(0xfa)];}export function openBrowser(_0x1cde68){const _0x8a79be=_0x411430,_0x1baf7b={'MLARD':_0x8a79be(0x119),'BFoKp':'win32'},_0x272b39=process['platform'],_0x5a404a=_0x272b39===_0x8a79be(0x11a)?_0x1baf7b[_0x8a79be(0x122)]:_0x272b39===_0x1baf7b['BFoKp']?_0x8a79be(0xf5):_0x8a79be(0x11d);exec(_0x5a404a+'\x20'+JSON['stringify'](_0x1cde68));}function decodeJwtPayload(_0x2d3af7){const _0x4256b2=_0x411430,_0x5f5804=_0x2d3af7[_0x4256b2(0x13d)]('.');if(_0x5f5804[_0x4256b2(0x126)]!==0x3)throw new Error('Invalid\x20JWT\x20format');const _0x1af789=Buffer[_0x4256b2(0x10d)](_0x5f5804[0x1],'base64url')[_0x4256b2(0x118)](_0x4256b2(0xf0));return JSON[_0x4256b2(0x138)](_0x1af789);}async function selfServeSignup(_0x134107){const _0x45ad92=_0x411430,_0x549572={'YbPkM':function(_0x55e48d,_0x5b497a,_0x3e7d86){return _0x55e48d(_0x5b497a,_0x3e7d86);},'dGagD':_0x45ad92(0xfc)},_0x254d45=getApiBaseUrl(),_0xcc2ad2=await _0x549572['YbPkM'](fetch,_0x254d45+_0x45ad92(0x132),{'method':_0x549572[_0x45ad92(0x115)],'headers':{'Content-Type':_0x45ad92(0x116),'workos-token':_0x134107}});if(!_0xcc2ad2['ok']){const _0x5eaffa=await _0xcc2ad2[_0x45ad92(0x106)]();throw new Error(_0x45ad92(0x12e)+_0xcc2ad2[_0x45ad92(0x114)]+'\x20'+_0x5eaffa);}return _0xcc2ad2['json']();}async function fetchMyMemberships(_0xf485a2){const _0x255314=_0x411430,_0x3e773a={'aMKjD':function(_0x16b7a6){return _0x16b7a6();},'VqzYt':function(_0x405a94,_0x34461f,_0x12d985){return _0x405a94(_0x34461f,_0x12d985);}},_0x326a47=_0x3e773a['aMKjD'](getApiBaseUrl),_0x152851=await _0x3e773a[_0x255314(0x125)](fetch,_0x326a47+_0x255314(0x124),{'method':_0x255314(0x137),'headers':{'workos-token':_0xf485a2}});if(!_0x152851['ok']){const _0x39b7db=await _0x152851['text']();throw new Error('Failed\x20to\x20fetch\x20memberships:\x20'+_0x152851[_0x255314(0x114)]+'\x20'+_0x39b7db);}const _0xc778d3=await _0x152851[_0x255314(0x10c)]();return _0xc778d3['memberships'];}async function refreshTokenWithOrg(_0x40ac94,_0x39169f,_0x58cabf){const _0x229c12=_0x411430,_0x2caf1e={'rSDdo':function(_0x1bbf04,_0x21272b,_0x4270f1){return _0x1bbf04(_0x21272b,_0x4270f1);}},_0x33ea01=await _0x2caf1e['rSDdo'](fetch,WORKOS_TOKEN_URL,{'method':'POST','headers':{'Content-Type':_0x229c12(0x120)},'body':new URLSearchParams({'client_id':_0x40ac94,'grant_type':_0x229c12(0x141),'refresh_token':_0x39169f,'organization_id':_0x58cabf})});if(!_0x33ea01['ok']){const _0x40a77a=await _0x33ea01[_0x229c12(0x106)]();throw new Error('Failed\x20to\x20refresh\x20token\x20with\x20org:\x20'+_0x33ea01[_0x229c12(0x114)]+'\x20'+_0x40a77a);}return _0x33ea01[_0x229c12(0x10c)]();}function _0xb218(_0x1e1617,_0x4b3950){_0x1e1617=_0x1e1617-0xec;const _0x545b17=_0x545b();let _0xb21851=_0x545b17[_0x1e1617];return _0xb21851;}export async function runDeviceAuthFlow(){const _0x5542b3=_0x411430,_0x50d130={'pQHkp':function(_0x371797,_0x30b435){return _0x371797(_0x30b435);},'YRQwf':_0x5542b3(0x107),'oAlRT':'\x20\x20\x20A\x20human\x20needs\x20to\x20complete\x20authentication\x20in\x20the\x20browser.\x0a','ylyhe':'Waiting\x20for\x20authentication...','cHAtN':function(_0x506422,_0x5d55fc){return _0x506422(_0x5d55fc);},'lzMiv':_0x5542b3(0x113),'BkOKE':function(_0x2f5b0c,_0x5b89dd){return _0x2f5b0c===_0x5b89dd;},'WkZcz':function(_0x231955,_0x37fe68){return _0x231955+_0x37fe68;},'zpriZ':_0x5542b3(0x12b),'KXlXU':function(_0x245658,_0x3e47c0,_0x5aff5c,_0x157a93){return _0x245658(_0x3e47c0,_0x5aff5c,_0x157a93);}},_0x54ad5a=getCurrentEnvironment(),_0x512a32=ENVIRONMENT_CONFIGS[_0x54ad5a]['workosClientId'],_0x3771fa=await _0x50d130[_0x5542b3(0x13a)](requestDeviceCode,_0x512a32);console[_0x5542b3(0x13f)](_0x50d130[_0x5542b3(0xf1)]),console['log'](_0x50d130[_0x5542b3(0x136)]),_0x50d130[_0x5542b3(0x13a)](openBrowser,_0x3771fa['verification_uri_complete']),console[_0x5542b3(0x13f)](_0x5542b3(0x131)+_0x3771fa[_0x5542b3(0xf9)]),console['log'](_0x5542b3(0x13e)+_0x3771fa[_0x5542b3(0x129)]+'\x0a'),process[_0x5542b3(0xf4)]['write'](_0x50d130['ylyhe']);let _0x17828b=await pollForTokens(_0x512a32,_0x3771fa[_0x5542b3(0x11f)],_0x3771fa[_0x5542b3(0x12f)],_0x3771fa[_0x5542b3(0x130)]);console['log']('\x20✓');const _0x140c6c=_0x50d130[_0x5542b3(0x13a)](decodeJwtPayload,_0x17828b['access_token']);if(!_0x140c6c[_0x5542b3(0x13c)]){const _0x21ed43=await _0x50d130['cHAtN'](fetchMyMemberships,_0x17828b[_0x5542b3(0x10a)]);let _0x58a6b6;if(_0x21ed43[_0x5542b3(0x126)]===0x0){process[_0x5542b3(0xf4)][_0x5542b3(0x11c)](_0x50d130[_0x5542b3(0x105)]);const _0x2a563d=await selfServeSignup(_0x17828b[_0x5542b3(0x10a)]);_0x58a6b6=_0x2a563d[_0x5542b3(0xf8)],console['log']('\x20✓');}else{if(_0x50d130['BkOKE'](_0x21ed43[_0x5542b3(0x126)],0x1))_0x58a6b6=_0x21ed43[0x0][_0x5542b3(0xf8)],console['log'](_0x5542b3(0x10e)+_0x21ed43[0x0]['name']);else{const _0x36fcb6=process['stdin']['isTTY']&&process[_0x5542b3(0xf4)]['isTTY'];if(!_0x36fcb6)throw new Error(_0x50d130['WkZcz'](_0x5542b3(0x100),_0x5542b3(0x142)));const {selected:_0x1c8ad1}=await _0x1faf66[_0x5542b3(0x135)]([{'type':_0x50d130['zpriZ'],'name':_0x5542b3(0x10b),'message':_0x5542b3(0x12d),'choices':_0x21ed43[_0x5542b3(0x140)](_0x2d319f=>({'name':_0x2d319f[_0x5542b3(0xf6)],'value':_0x2d319f['organizationId']}))}]);_0x58a6b6=_0x1c8ad1;}}_0x17828b=await _0x50d130[_0x5542b3(0x123)](refreshTokenWithOrg,_0x512a32,_0x17828b[_0x5542b3(0x141)],_0x58a6b6);}process[_0x5542b3(0xf4)]['write'](_0x5542b3(0x133));const _0x39a795=await _0x50d130[_0x5542b3(0x108)](provisionApiKey,_0x17828b[_0x5542b3(0x10a)]);return console['log']('\x20✓'),await storeToken(_0x39a795),_0x17828b['refresh_token']&&await storeRefreshToken(_0x17828b['refresh_token']),_0x39a795;}function _0x545b(){const _0x1cb0cd=['Using\x20organization:\x20','firstName','Zlnmx','/api-keys','83034sTICHA','Setting\x20up\x20your\x20organization...','status','dGagD','application/json','TYHIp','toString','open','darwin','/organization/me','write','xdg-open','BDyaP','device_code','application/x-www-form-urlencoded','360niSyyT','MLARD','KXlXU','/organization/my-memberships','VqzYt','length','hCgXd','5021384kFJWZu','user_code','rEgMo','list','startsWith','Select\x20an\x20organization:','Failed\x20to\x20create\x20organization:\x20','interval','expires_in','If\x20the\x20browser\x20doesn\x27t\x20open,\x20visit:\x20','/organization/self-serve-signup','Provisioning\x20API\x20key...','4MoaEOY','prompt','oAlRT','GET','parse','apiKeys','pQHkp','491082nByVQz','org_id','split','Code:\x20','log','map','refresh_token','Use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.','https://api.workos.com/user_management/authenticate','error','Device\x20authorization\x20timed\x20out','filter','now','2287014uEUqdQ','utf-8','YRQwf','IIlvf','error_description','stdout','start','name','588519BPGEUu','organizationId','verification_uri_complete','token','email','POST','\x27s\x20CLI\x20Key','Failed\x20to\x20request\x20device\x20code:\x20','stringify','Multiple\x20organizations\x20available\x20but\x20cannot\x20prompt\x20for\x20selection\x20in\x20non-interactive\x20mode.\x0a','4437321wFJDfA','5618180QuoYMK','CLI\x20Key','https://api.workos.com/user_management/authorize/device','lzMiv','text','\x0a🔐\x20Opening\x20browser\x20to\x20log\x20in...','cHAtN','PYzqs','access_token','selected','json','from'];_0x545b=function(){return _0x1cb0cd;};return _0x545b();}function sleep(_0x43be84){return new Promise(_0x1903fb=>setTimeout(_0x1903fb,_0x43be84));}
@@ -1 +1 @@
1
- const _0x240c2a=_0x3373;(function(_0x25230f,_0x197d7d){const _0x54eac9=_0x3373,_0x16971d=_0x25230f();while(!![]){try{const _0x426fa8=parseInt(_0x54eac9(0x10e))/0x1+-parseInt(_0x54eac9(0x10f))/0x2+-parseInt(_0x54eac9(0x10b))/0x3*(parseInt(_0x54eac9(0x11c))/0x4)+-parseInt(_0x54eac9(0x106))/0x5+-parseInt(_0x54eac9(0x117))/0x6+-parseInt(_0x54eac9(0x114))/0x7*(parseInt(_0x54eac9(0x108))/0x8)+parseInt(_0x54eac9(0x107))/0x9*(parseInt(_0x54eac9(0x10c))/0xa);if(_0x426fa8===_0x197d7d)break;else _0x16971d['push'](_0x16971d['shift']());}catch(_0x2e1a0a){_0x16971d['push'](_0x16971d['shift']());}}}(_0x30e4,0x5f59e));export const ENVIRONMENT_CONFIGS={'prod':{'apiBaseUrl':'https://api.ranger.net','workosClientId':'client_01J9CBYM7M5ZETCF7G6614DXR2','aiProxyUrl':_0x240c2a(0x11e)},'staging':{'apiBaseUrl':_0x240c2a(0x10d),'workosClientId':'client_01J9CBYM2DKWV9HM17D95Z540K','aiProxyUrl':_0x240c2a(0x105)},'local':{'apiBaseUrl':_0x240c2a(0x112),'workosClientId':_0x240c2a(0x10a),'aiProxyUrl':'http://localhost:8090'}};function _0x30e4(){const _0x2a5560=['1378966NqGYWi','eMFeZ','xOVFm','http://localhost:8080','staging','2023686WVhzRJ','DqMaI','local','1812678KbeRKN','true','uyRZc','aiProxyUrl','apiBaseUrl','14856EiCENv','OKTYi','https://ai-proxy-716115358910.us-central1.run.app','playwright-cli','https://ai-proxy-301751771437.us-central1.run.app','244650HnoxXr','11133KjSNFL','8NXmEjW','PaxId','client_01J9CBYM2DKWV9HM17D95Z540K','54YRJknp','10130WgjurS','https://api.staging.ranger.net','533953MwYxvA'];_0x30e4=function(){return _0x2a5560;};return _0x30e4();}export const DEFAULT_ENVIRONMENT='prod';export function isValidEnvironment(_0x3262c0){const _0x13b6b8=_0x240c2a,_0x2e76ac={'aqbqx':function(_0x192d98,_0x5ee9c7){return _0x192d98===_0x5ee9c7;},'xOVFm':'prod','PaxId':function(_0x2992c9,_0x267e3d){return _0x2992c9===_0x267e3d;}};return _0x2e76ac['aqbqx'](_0x3262c0,_0x2e76ac[_0x13b6b8(0x111)])||_0x3262c0===_0x13b6b8(0x113)||_0x2e76ac[_0x13b6b8(0x109)](_0x3262c0,_0x13b6b8(0x116));}export function getCurrentEnvironment(){const _0xf4b1d3={'Nivfv':function(_0x4a7a06,_0x214e69){return _0x4a7a06(_0x214e69);}},_0x3dbb87=process['env']['RANGER_CLI_ENV'];if(_0x3dbb87&&_0xf4b1d3['Nivfv'](isValidEnvironment,_0x3dbb87))return _0x3dbb87;return DEFAULT_ENVIRONMENT;}export function getApiBaseUrl(){const _0x519b2e=_0x240c2a,_0x495f94={'uyRZc':function(_0x38d271){return _0x38d271();}};return ENVIRONMENT_CONFIGS[_0x495f94[_0x519b2e(0x119)](getCurrentEnvironment)][_0x519b2e(0x11b)];}export function getAiProxyUrl(){const _0x21aa07=_0x240c2a;return ENVIRONMENT_CONFIGS[getCurrentEnvironment()][_0x21aa07(0x11a)];}export function isMcpDisabled(){const _0x1a475f=_0x240c2a,_0x9d88d7={'eMFeZ':function(_0x4c7fe7,_0x396c99){return _0x4c7fe7===_0x396c99;}};return _0x9d88d7[_0x1a475f(0x110)](process['env']['RANGER_DISABLE_MCP'],_0x1a475f(0x118));}function _0x3373(_0x3b4242,_0x82ff6){_0x3b4242=_0x3b4242-0x105;const _0x30e472=_0x30e4();let _0x3373c3=_0x30e472[_0x3b4242];return _0x3373c3;}export function getVerificationTransport(){const _0x59994f=_0x240c2a,_0x400cfd={'OKTYi':function(_0x106f3f){return _0x106f3f();},'DIbEP':_0x59994f(0x11f),'DqMaI':'mcp'};return _0x400cfd[_0x59994f(0x11d)](isMcpDisabled)?_0x400cfd['DIbEP']:_0x400cfd[_0x59994f(0x115)];}
1
+ const _0x4e748e=_0x2838;(function(_0x4e8ef3,_0xde54d2){const _0x3b3940=_0x2838,_0x163ae1=_0x4e8ef3();while(!![]){try{const _0x4db36c=-parseInt(_0x3b3940(0x131))/0x1+-parseInt(_0x3b3940(0x122))/0x2+-parseInt(_0x3b3940(0x120))/0x3*(-parseInt(_0x3b3940(0x121))/0x4)+parseInt(_0x3b3940(0x132))/0x5+-parseInt(_0x3b3940(0x12a))/0x6+parseInt(_0x3b3940(0x126))/0x7*(-parseInt(_0x3b3940(0x133))/0x8)+parseInt(_0x3b3940(0x11e))/0x9;if(_0x4db36c===_0xde54d2)break;else _0x163ae1['push'](_0x163ae1['shift']());}catch(_0x2b87b){_0x163ae1['push'](_0x163ae1['shift']());}}}(_0x2daa,0xd3798));export const ENVIRONMENT_CONFIGS={'prod':{'apiBaseUrl':'https://api.ranger.net','workosClientId':'client_01J9CBYM7M5ZETCF7G6614DXR2','aiProxyUrl':'https://ai-proxy-716115358910.us-central1.run.app'},'staging':{'apiBaseUrl':_0x4e748e(0x123),'workosClientId':_0x4e748e(0x12c),'aiProxyUrl':'https://ai-proxy-301751771437.us-central1.run.app'},'local':{'apiBaseUrl':'http://localhost:8080','workosClientId':'client_01J9CBYM2DKWV9HM17D95Z540K','aiProxyUrl':_0x4e748e(0x130)}};export const DEFAULT_ENVIRONMENT=_0x4e748e(0x11f);function _0x2daa(){const _0x3539f2=['http://localhost:8090','564011CurflL','8097730rkIcUq','193704tZINjj','9603774TzxRfA','prod','321762BGGCMS','60CQTAwD','1428846nLImQH','https://api.staging.ranger.net','dKAXy','aiProxyUrl','441EePqsl','RANGER_CLI_ENV','apiBaseUrl','playwright-cli','3752334XKGfMO','true','client_01J9CBYM2DKWV9HM17D95Z540K','lznNz','RANGER_DISABLE_MCP','CAmyY'];_0x2daa=function(){return _0x3539f2;};return _0x2daa();}function _0x2838(_0x4f9ec1,_0x53e176){_0x4f9ec1=_0x4f9ec1-0x11e;const _0x2daa71=_0x2daa();let _0x283862=_0x2daa71[_0x4f9ec1];return _0x283862;}export function isValidEnvironment(_0xdb52b2){const _0x301afd=_0x4e748e,_0x14ae14={'dKAXy':'local'};return _0xdb52b2==='prod'||_0xdb52b2==='staging'||_0xdb52b2===_0x14ae14[_0x301afd(0x124)];}export function getCurrentEnvironment(){const _0x2565d0=_0x4e748e,_0x797382=process['env'][_0x2565d0(0x127)];if(_0x797382&&isValidEnvironment(_0x797382))return _0x797382;return DEFAULT_ENVIRONMENT;}export function getApiBaseUrl(){const _0x25b391=_0x4e748e,_0x539c1a={'CAmyY':function(_0x5a367e){return _0x5a367e();}};return ENVIRONMENT_CONFIGS[_0x539c1a[_0x25b391(0x12f)](getCurrentEnvironment)][_0x25b391(0x128)];}export function getAiProxyUrl(){const _0x30a550=_0x4e748e;return ENVIRONMENT_CONFIGS[getCurrentEnvironment()][_0x30a550(0x125)];}export function isMcpDisabled(){const _0x10d004=_0x4e748e,_0x1c3da6={'lznNz':function(_0x2ab430,_0x38b0a1){return _0x2ab430===_0x38b0a1;}};return _0x1c3da6[_0x10d004(0x12d)](process['env'][_0x10d004(0x12e)],_0x10d004(0x12b));}export function getVerificationTransport(){const _0x2175e3=_0x4e748e,_0x37b722={'ChLCw':function(_0x1e9a29){return _0x1e9a29();},'hyOcn':_0x2175e3(0x129)};return _0x37b722['ChLCw'](isMcpDisabled)?_0x37b722['hyOcn']:'mcp';}