@ranger-testing/ranger-cli 3.1.4-alpha.fb796e7-45 → 3.1.4

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 (86) 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/deleteProfile.js +1 -1
  7. package/build/commands/env.js +1 -1
  8. package/build/commands/feature.js +1 -1
  9. package/build/commands/hook.js +1 -1
  10. package/build/commands/hooks/autoPrompt.js +1 -1
  11. package/build/commands/hooks/disable.js +1 -1
  12. package/build/commands/hooks/enable.js +1 -1
  13. package/build/commands/hooks/exitPlanMode.js +1 -1
  14. package/build/commands/hooks/index.js +1 -1
  15. package/build/commands/hooks/output.js +1 -1
  16. package/build/commands/hooks/planReminder.js +1 -1
  17. package/build/commands/hooks/planStart.js +1 -1
  18. package/build/commands/hooks/postEdit.js +1 -1
  19. package/build/commands/hooks/preCompact.js +1 -1
  20. package/build/commands/hooks/sessionEnd.js +1 -1
  21. package/build/commands/hooks/sessionStart.js +1 -1
  22. package/build/commands/hooks/stopHook.js +1 -1
  23. package/build/commands/index.js +1 -1
  24. package/build/commands/login.js +1 -1
  25. package/build/commands/mcpBootstrap.js +1 -1
  26. package/build/commands/migrateProfile.js +1 -1
  27. package/build/commands/setup/claude.js +1 -1
  28. package/build/commands/setup/opencode.js +1 -1
  29. package/build/commands/setupCi.js +1 -1
  30. package/build/commands/skillup.js +1 -1
  31. package/build/commands/start.js +1 -1
  32. package/build/commands/status.js +1 -1
  33. package/build/commands/update.js +1 -1
  34. package/build/commands/updateEnv.js +1 -1
  35. package/build/commands/useEnv.js +1 -1
  36. package/build/commands/utils/activeProfile.js +1 -1
  37. package/build/commands/utils/agentEnv.js +1 -1
  38. package/build/commands/utils/browserSessionsApi.js +1 -1
  39. package/build/commands/utils/claudeConfig.js +1 -1
  40. package/build/commands/utils/claudeOverrideSettings.js +1 -1
  41. package/build/commands/utils/claudePlugin.js +1 -1
  42. package/build/commands/utils/cloudProfile.js +1 -1
  43. package/build/commands/utils/cloudProfileSession.js +1 -1
  44. package/build/commands/utils/crypto.js +1 -1
  45. package/build/commands/utils/desirePathLog.js +1 -1
  46. package/build/commands/utils/deviceAuth.js +1 -1
  47. package/build/commands/utils/environment.js +1 -1
  48. package/build/commands/utils/featureApi.js +1 -1
  49. package/build/commands/utils/fixWebmDuration.js +1 -1
  50. package/build/commands/utils/gitTracked.js +1 -1
  51. package/build/commands/utils/keychain.js +1 -1
  52. package/build/commands/utils/legacyWarning.js +1 -1
  53. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  54. package/build/commands/utils/matchAuthEnvironment.js +1 -1
  55. package/build/commands/utils/mcpImageBase64.js +1 -1
  56. package/build/commands/utils/model.js +1 -1
  57. package/build/commands/utils/novaActCli.js +1 -1
  58. package/build/commands/utils/opencodeConfig.js +1 -1
  59. package/build/commands/utils/organizationEnvApi.js +1 -1
  60. package/build/commands/utils/playwrightCli.js +1 -1
  61. package/build/commands/utils/profileMessages.js +1 -1
  62. package/build/commands/utils/profileSetupBanner.js +1 -1
  63. package/build/commands/utils/projectsConfig.js +1 -1
  64. package/build/commands/utils/rangerConfig.js +1 -1
  65. package/build/commands/utils/rangerRoot.js +1 -1
  66. package/build/commands/utils/rangerwrightCli.js +1 -1
  67. package/build/commands/utils/resolveProfileContext.js +1 -1
  68. package/build/commands/utils/resolveProfileUrl.js +1 -1
  69. package/build/commands/utils/retry.js +1 -1
  70. package/build/commands/utils/scenarioOriginCheck.js +1 -0
  71. package/build/commands/utils/sessionCache.js +1 -1
  72. package/build/commands/utils/settings.js +1 -1
  73. package/build/commands/utils/skillContent.js +1 -1
  74. package/build/commands/utils/skills.js +1 -1
  75. package/build/commands/utils/stitchWebmFiles.js +1 -1
  76. package/build/commands/utils/telemetry.js +1 -1
  77. package/build/commands/utils/tokenRefresh.js +1 -1
  78. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  79. package/build/commands/utils/tunnelClient.js +1 -1
  80. package/build/commands/utils/userApi.js +1 -1
  81. package/build/commands/utils/version.js +1 -1
  82. package/build/commands/verifyFeature.js +1 -1
  83. package/build/commands/verifyFeatureCli.js +1 -1
  84. package/build/commands/verifyFeatureNovaCli.js +1 -1
  85. package/build/commands/verifyFeatureRangerwrightCli.js +1 -1
  86. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0xdfe7f9,_0x4f726f){const _0x570ab7=_0x2ed3,_0x2719e5=_0xdfe7f9();while(!![]){try{const _0x22951e=-parseInt(_0x570ab7(0x178))/0x1+-parseInt(_0x570ab7(0x180))/0x2*(parseInt(_0x570ab7(0x170))/0x3)+parseInt(_0x570ab7(0x16d))/0x4*(parseInt(_0x570ab7(0x17d))/0x5)+-parseInt(_0x570ab7(0x175))/0x6+-parseInt(_0x570ab7(0x16f))/0x7*(-parseInt(_0x570ab7(0x17e))/0x8)+-parseInt(_0x570ab7(0x173))/0x9*(parseInt(_0x570ab7(0x174))/0xa)+parseInt(_0x570ab7(0x177))/0xb;if(_0x22951e===_0x4f726f)break;else _0x2719e5['push'](_0x2719e5['shift']());}catch(_0x20a575){_0x2719e5['push'](_0x2719e5['shift']());}}}(_0xcd81,0x202ad));function _0x2ed3(_0x15fae9,_0x5e18b0){_0x15fae9=_0x15fae9-0x16d;const _0xcd812d=_0xcd81();let _0x2ed368=_0xcd812d[_0x15fae9];return _0x2ed368;}function _0xcd81(){const _0x56d78f=['Login\x20requires\x20an\x20interactive\x20terminal.\x20In\x20CI,\x20use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.','10pBxTDC','776KBKNoo','spjUh','4942tvbaIu','484956Maflbt','user','7721HSHcig','51iTyQpg','\x0a✅\x20Logged\x20in\x20to\x20','JvHRA','9bWDKcg','2158310aPyOzD','1173276hxUSkl','organizationName','5313825lwCeNX','247403ImpanQ','Login\x20failed:\x20','log','message'];_0xcd81=function(){return _0x56d78f;};return _0xcd81();}import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{getCurrentUser}from'./utils/userApi.js';import{getMcpAuthOrigin,mcpBootstrap}from'./mcpBootstrap.js';import{isInteractive}from'./utils/cloudProfileSession.js';export async function login(){const _0xc281eb=_0x2ed3,_0x2f60d3={'YdBLg':function(_0x5f0843){return _0x5f0843();},'spjUh':function(_0x46e475){return _0x46e475();},'VdSIu':function(_0x479c87){return _0x479c87();},'JvHRA':function(_0x509d7b,_0x5a68a4){return _0x509d7b instanceof _0x5a68a4;}},_0x17091a=await _0x2f60d3['YdBLg'](getMcpAuthOrigin);if(_0x17091a){console[_0xc281eb(0x17a)]('Re-authenticating\x20via\x20MCP\x20bootstrap...'),await _0x2f60d3[_0xc281eb(0x17f)](mcpBootstrap);return;}if(!isInteractive())throw new Error(_0xc281eb(0x17c));try{const _0x119fe6=await _0x2f60d3['VdSIu'](runDeviceAuthFlow),_0x2dbc89=await getCurrentUser(_0x119fe6);_0x2dbc89['success']?console['log'](_0xc281eb(0x171)+_0x2dbc89[_0xc281eb(0x16e)][_0xc281eb(0x176)]):console['log']('\x0a✅\x20API\x20key\x20stored\x20successfully');}catch(_0x28af52){throw new Error(_0xc281eb(0x179)+(_0x2f60d3[_0xc281eb(0x172)](_0x28af52,Error)?_0x28af52[_0xc281eb(0x17b)]:_0x28af52));}}
1
+ (function(_0xa7e932,_0x3700ce){const _0x1dd8f9=_0x49cf,_0x549a03=_0xa7e932();while(!![]){try{const _0x48ddb0=parseInt(_0x1dd8f9(0x141))/0x1+parseInt(_0x1dd8f9(0x13f))/0x2*(-parseInt(_0x1dd8f9(0x13d))/0x3)+parseInt(_0x1dd8f9(0x13c))/0x4*(parseInt(_0x1dd8f9(0x145))/0x5)+-parseInt(_0x1dd8f9(0x144))/0x6+-parseInt(_0x1dd8f9(0x146))/0x7*(-parseInt(_0x1dd8f9(0x149))/0x8)+-parseInt(_0x1dd8f9(0x14a))/0x9*(-parseInt(_0x1dd8f9(0x147))/0xa)+parseInt(_0x1dd8f9(0x142))/0xb;if(_0x48ddb0===_0x3700ce)break;else _0x549a03['push'](_0x549a03['shift']());}catch(_0x116030){_0x549a03['push'](_0x549a03['shift']());}}}(_0xbd44,0x8672f));import{runDeviceAuthFlow}from'./utils/deviceAuth.js';function _0xbd44(){const _0x43f95e=['212vWzbMa','3ORnwaO','ODpUf','496826GjkElD','OyZQf','337568xGgFof','4430569RWYgKz','XLHrm','6562824PgUPLc','76605tpZlzW','1162546SkjZqz','872410IGZDYF','message','8dDzoOG','18HxEiqR','log','user','tWPUR','TJYbb','\x0a✅\x20Logged\x20in\x20to\x20'];_0xbd44=function(){return _0x43f95e;};return _0xbd44();}import{getCurrentUser}from'./utils/userApi.js';import{getMcpAuthOrigin,mcpBootstrap}from'./mcpBootstrap.js';function _0x49cf(_0x1f6072,_0x2f3f41){_0x1f6072=_0x1f6072-0x13b;const _0xbd44f0=_0xbd44();let _0x49cf5d=_0xbd44f0[_0x1f6072];return _0x49cf5d;}import{isInteractive}from'./utils/cloudProfileSession.js';export async function login(){const _0xbb3590=_0x49cf,_0x3068ff={'TJYbb':'Re-authenticating\x20via\x20MCP\x20bootstrap...','qdWgE':function(_0x2a77a6){return _0x2a77a6();},'tWPUR':function(_0x4b2439){return _0x4b2439();},'ODpUf':'Login\x20requires\x20an\x20interactive\x20terminal.\x20In\x20CI,\x20use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.','OyZQf':function(_0x270cd6,_0x8f33b7){return _0x270cd6(_0x8f33b7);},'XLHrm':'\x0a✅\x20API\x20key\x20stored\x20successfully'},_0x5ceee9=await getMcpAuthOrigin();if(_0x5ceee9){console['log'](_0x3068ff[_0xbb3590(0x14e)]),await _0x3068ff['qdWgE'](mcpBootstrap);return;}if(!_0x3068ff['tWPUR'](isInteractive))throw new Error(_0x3068ff[_0xbb3590(0x13e)]);try{const _0x2875ce=await _0x3068ff[_0xbb3590(0x14d)](runDeviceAuthFlow),_0x47961b=await _0x3068ff[_0xbb3590(0x140)](getCurrentUser,_0x2875ce);_0x47961b['success']?console['log'](_0xbb3590(0x13b)+_0x47961b[_0xbb3590(0x14c)]['organizationName']):console[_0xbb3590(0x14b)](_0x3068ff[_0xbb3590(0x143)]);}catch(_0x3388de){throw new Error('Login\x20failed:\x20'+(_0x3388de instanceof Error?_0x3388de[_0xbb3590(0x148)]:_0x3388de));}}
@@ -1 +1 @@
1
- const _0x21aab3=_0x2e24;(function(_0x59c40b,_0x1bc593){const _0x3b0b47=_0x2e24,_0x3fbd73=_0x59c40b();while(!![]){try{const _0x2aeb87=-parseInt(_0x3b0b47(0x12a))/0x1+parseInt(_0x3b0b47(0x11a))/0x2+parseInt(_0x3b0b47(0x131))/0x3*(parseInt(_0x3b0b47(0x100))/0x4)+-parseInt(_0x3b0b47(0x143))/0x5+parseInt(_0x3b0b47(0x15f))/0x6*(-parseInt(_0x3b0b47(0x12c))/0x7)+parseInt(_0x3b0b47(0x17b))/0x8*(-parseInt(_0x3b0b47(0x186))/0x9)+parseInt(_0x3b0b47(0x14f))/0xa*(parseInt(_0x3b0b47(0xfc))/0xb);if(_0x2aeb87===_0x1bc593)break;else _0x3fbd73['push'](_0x3fbd73['shift']());}catch(_0x47c308){_0x3fbd73['push'](_0x3fbd73['shift']());}}}(_0x42ae,0xade90));import{mkdir,writeFile,readFile}from'fs/promises';import{join}from'path';function _0x2e24(_0x59a764,_0x3ed83b){_0x59a764=_0x59a764-0xfa;const _0x42ae21=_0x42ae();let _0x2e24a9=_0x42ae21[_0x59a764];return _0x2e24a9;}import{homedir}from'os';import{createServer}from'http';import{randomBytes,createHash}from'crypto';import{exec}from'child_process';import{getMcpAuthUrl}from'./utils/environment.js';const CALLBACK_PORT=0x4d78,TOKEN_CACHE_PATH=join(homedir(),_0x21aab3(0x142),_0x21aab3(0x128)),AUTH_ORIGIN_PATH=join(homedir(),'.ranger',_0x21aab3(0x139));export async function getMcpAuthOrigin(){const _0x1df4a5=_0x21aab3,_0x3fe4a0={'fDLoe':function(_0x1e32c9,_0x343eef){return _0x1e32c9||_0x343eef;}};try{const _0x8f0643=(await readFile(AUTH_ORIGIN_PATH,'utf-8'))[_0x1df4a5(0x15b)]();return _0x3fe4a0[_0x1df4a5(0x136)](_0x8f0643,null);}catch{return null;}}export async function mcpBootstrap(){const _0x462569=_0x21aab3,_0x5a31c9={'ycbMc':function(_0x26adba,_0xec7275){return _0x26adba(_0xec7275);},'MzZbi':'proxied','lcBIh':function(_0x203c00){return _0x203c00();},'vxVTR':function(_0x54c22e,_0x5b6a90){return _0x54c22e+_0x5b6a90;}},_0x5221ad=getMcpAuthUrl();currentOrigin=_0x5221ad;const _0x21e9ee=process['stdout'][_0x462569(0x137)]??![];console[_0x462569(0x18b)](_0x462569(0xfd)+_0x5221ad+'\x0a');const _0x51ebe5=await _0x5a31c9['ycbMc'](tryUnauthenticated,_0x5221ad);let _0x5578ff=null;if(_0x51ebe5===_0x5a31c9[_0x462569(0xfa)])_0x5578ff='';else{_0x5578ff=await _0x5a31c9['lcBIh'](loadCachedToken);if(!_0x5578ff){if(!_0x21e9ee)throw new Error(_0x5a31c9['vxVTR'](_0x462569(0x161),_0x462569(0x16c)));_0x5578ff=await oauthFlow(_0x5221ad);}}await callGetCliToken(_0x5221ad,_0x5578ff);}async function tryUnauthenticated(_0x355a77){const _0x60650b=_0x21aab3,_0x50fa54={'ANEBG':function(_0x92d5fb,_0x5c99fb,_0x30d097){return _0x92d5fb(_0x5c99fb,_0x30d097);},'IvtJf':_0x60650b(0x149),'fSPej':'application/json','iltyH':'initialize','alHbU':_0x60650b(0x184),'BrzdZ':_0x60650b(0x16f),'DWRcu':function(_0x3bad1d,_0x546606){return _0x3bad1d===_0x546606;}},_0x34e615=await _0x50fa54[_0x60650b(0x116)](fetch,_0x355a77,{'method':_0x50fa54['IvtJf'],'headers':{'Content-Type':_0x50fa54[_0x60650b(0x152)],'Accept':_0x60650b(0x179)},'body':JSON['stringify']({'jsonrpc':'2.0','id':0x1,'method':_0x50fa54['iltyH'],'params':{'protocolVersion':_0x60650b(0x166),'capabilities':{},'clientInfo':{'name':_0x50fa54['alHbU'],'version':'1.0.0'}}})});if(_0x34e615['ok'])return await _0x34e615['text'](),_0x50fa54['BrzdZ'];if(_0x50fa54[_0x60650b(0x14a)](_0x34e615[_0x60650b(0x13c)],0x191))return await _0x34e615[_0x60650b(0x121)](),_0x60650b(0xfe);const _0x190f19=await _0x34e615[_0x60650b(0x121)]();throw new Error(_0x60650b(0x109)+_0x34e615[_0x60650b(0x13c)]+':\x20'+_0x190f19);}class OAuthTimeoutError extends Error{constructor(_0x3a98f7){const _0x419a96=_0x21aab3,_0x126c79={'yledk':_0x419a96(0x130)};super(_0x3a98f7),this['name']=_0x126c79['yledk'];}}async function oauthFlow(_0x58dce7){const _0x50166f=_0x21aab3,_0x177808={'goDpp':function(_0x1cf660,_0x10a749){return _0x1cf660 instanceof _0x10a749;},'Jzrub':_0x50166f(0x14c),'ieaTk':function(_0x3e9224,_0x1af3a6){return _0x3e9224(_0x1af3a6);}};try{return await oauthFlowAttempt(_0x58dce7);}catch(_0x4b5495){if(_0x177808['goDpp'](_0x4b5495,OAuthTimeoutError)&&await loadCachedClient())return console['log'](_0x177808['Jzrub']),await clearCachedClient(),await _0x177808[_0x50166f(0x169)](oauthFlowAttempt,_0x58dce7);throw _0x4b5495;}}async function oauthFlowAttempt(_0xf102ce){const _0x2f9d7b=_0x21aab3,_0x432014={'kwqXz':'Discovering\x20authorization\x20server...','wzyev':function(_0x45eb0e,_0xffefc6){return _0x45eb0e(_0xffefc6);},'nERkt':function(_0x20505d){return _0x20505d();},'USRJB':function(_0x3326e6,_0x46bdcd,_0x9db4b2){return _0x3326e6(_0x46bdcd,_0x9db4b2);},'LUhvR':_0x2f9d7b(0x154),'PfcGF':'Ranger\x20CLI','LByyp':_0x2f9d7b(0x164),'VvUab':_0x2f9d7b(0x174),'ljjwS':'base64url','ahFkd':'redirect_uri','zkwPU':_0x2f9d7b(0x151),'jtAXm':_0x2f9d7b(0x150),'KxwUP':'resource','dKVum':_0x2f9d7b(0x11f),'nhwMY':function(_0x382fa9,_0x143c15){return _0x382fa9(_0x143c15);},'ExTFC':'authorization_code','bpPIO':'client_secret','NeJsB':function(_0x2ab6fc,_0x95c3b5,_0x36ef6c){return _0x2ab6fc(_0x95c3b5,_0x36ef6c);},'qJJht':function(_0x119a9a,_0x3150d3,_0x3a6c29,_0x5c42f1){return _0x119a9a(_0x3150d3,_0x3a6c29,_0x5c42f1);}},_0x405b7d=_0xf102ce['replace'](/\/mcp$/,'');process[_0x2f9d7b(0x14e)]['write'](_0x432014['kwqXz']);const _0x52544a=await _0x432014['wzyev'](fetch,_0x405b7d+'/.well-known/oauth-protected-resource');if(!_0x52544a['ok'])throw new Error(_0x2f9d7b(0x187));const _0x599fbb=await _0x52544a[_0x2f9d7b(0x129)](),_0x16fe4b=_0x599fbb[_0x2f9d7b(0x125)]?.[0x0];if(!_0x16fe4b)throw new Error(_0x2f9d7b(0x177));console[_0x2f9d7b(0x18b)]('\x20'+_0x16fe4b);const _0x34251b=await fetchAuthServerMetadata(_0x16fe4b);let _0x22a69,_0x2a346f;const _0x505614=await _0x432014[_0x2f9d7b(0x133)](loadCachedClient);if(_0x505614)_0x22a69=_0x505614['clientId'],_0x2a346f=_0x505614['clientSecret'];else{if(_0x34251b[_0x2f9d7b(0x110)]){process[_0x2f9d7b(0x14e)]['write'](_0x2f9d7b(0x163));const _0x1b20ca=await _0x432014['USRJB'](fetch,_0x34251b['registration_endpoint'],{'method':'POST','headers':{'Content-Type':_0x432014['LUhvR']},'body':JSON[_0x2f9d7b(0x141)]({'client_name':_0x432014[_0x2f9d7b(0x159)],'redirect_uris':['http://localhost:'+CALLBACK_PORT+_0x2f9d7b(0x11e)],'grant_types':['authorization_code','refresh_token'],'response_types':[_0x2f9d7b(0x126)],'token_endpoint_auth_method':_0x432014[_0x2f9d7b(0x13d)]})});if(!_0x1b20ca['ok']){const _0x1ec779=await _0x1b20ca[_0x2f9d7b(0x121)]();throw new Error('Client\x20registration\x20failed:\x20'+_0x1ec779);}const _0x5ba1=await _0x1b20ca['json']();_0x22a69=_0x5ba1[_0x2f9d7b(0x12d)],_0x2a346f=_0x5ba1['client_secret'],await saveCachedClient(_0x22a69,_0x2a346f),console[_0x2f9d7b(0x18b)](_0x432014['VvUab']);}else throw new Error(_0x2f9d7b(0xff));}const _0x4234b3=_0x432014['wzyev'](randomBytes,0x20)['toString'](_0x432014['ljjwS']),_0x5aeb6f=createHash(_0x2f9d7b(0x178))[_0x2f9d7b(0x15a)](_0x4234b3)['digest'](_0x432014[_0x2f9d7b(0x123)]),_0x42ef6f=randomBytes(0x10)['toString'](_0x2f9d7b(0x127)),_0x517ff6=new URL(_0x34251b['authorization_endpoint']);_0x517ff6[_0x2f9d7b(0x107)]['set']('response_type',_0x2f9d7b(0x126)),_0x517ff6[_0x2f9d7b(0x107)][_0x2f9d7b(0x17d)](_0x2f9d7b(0x12d),_0x22a69),_0x517ff6['searchParams'][_0x2f9d7b(0x17d)](_0x432014[_0x2f9d7b(0x134)],'http://localhost:'+CALLBACK_PORT+_0x2f9d7b(0x11e)),_0x517ff6[_0x2f9d7b(0x107)]['set']('code_challenge',_0x5aeb6f),_0x517ff6[_0x2f9d7b(0x107)][_0x2f9d7b(0x17d)](_0x432014[_0x2f9d7b(0x162)],_0x432014['jtAXm']),_0x517ff6[_0x2f9d7b(0x107)][_0x2f9d7b(0x17d)]('state',_0x42ef6f);_0x599fbb['resource']&&_0x517ff6['searchParams']['set'](_0x432014[_0x2f9d7b(0x157)],_0x599fbb['resource']);console['log'](_0x432014['dKVum']),console['log'](_0x2f9d7b(0x12f)+_0x517ff6[_0x2f9d7b(0x16a)]()+'\x0a'),await _0x432014[_0x2f9d7b(0x15c)](openBrowser,_0x517ff6[_0x2f9d7b(0x16a)]());const _0x2733f4=await waitForCallback(_0x42ef6f);process['stdout']['write'](_0x2f9d7b(0x117));const _0x3cb8df=new URLSearchParams({'grant_type':_0x432014['ExTFC'],'code':_0x2733f4,'redirect_uri':'http://localhost:'+CALLBACK_PORT+'/callback','client_id':_0x22a69,'code_verifier':_0x4234b3});_0x2a346f&&_0x3cb8df['set'](_0x432014['bpPIO'],_0x2a346f);_0x599fbb['resource']&&_0x3cb8df[_0x2f9d7b(0x17d)](_0x2f9d7b(0x16d),_0x599fbb[_0x2f9d7b(0x16d)]);const _0x14ac94=await _0x432014['NeJsB'](fetch,_0x34251b['token_endpoint'],{'method':_0x2f9d7b(0x149),'headers':{'Content-Type':_0x2f9d7b(0x153)},'body':_0x3cb8df});if(!_0x14ac94['ok']){const _0x2c3fc3=await _0x14ac94['text']();throw new Error('Token\x20exchange\x20failed:\x20'+_0x2c3fc3);}const _0x5a2ec1=await _0x14ac94[_0x2f9d7b(0x129)]();return console['log'](_0x432014['VvUab']),await _0x432014[_0x2f9d7b(0x185)](saveCachedToken,_0x5a2ec1[_0x2f9d7b(0x173)],_0x5a2ec1[_0x2f9d7b(0x146)],_0x5a2ec1[_0x2f9d7b(0x147)]),_0x5a2ec1['access_token'];}async function callGetCliToken(_0x2b97d2,_0x32378b){const _0x3f4599=_0x21aab3,_0x14cb38={'ZViMV':_0x3f4599(0x149),'vzsUS':'application/json','vtNwq':_0x3f4599(0x179),'WvWbt':function(_0x5c90b8,_0x3a099b){return _0x5c90b8(_0x3a099b);},'AOvKf':'2.0','sJZSf':_0x3f4599(0x18c),'yKHNA':'2025-03-26','AYSPX':function(_0x5382fb,_0x538edf,_0x1f3eb4){return _0x5382fb(_0x538edf,_0x1f3eb4);},'VxkZt':'notifications/initialized','DRcsn':'Requesting\x20CLI\x20token...','WvyPI':function(_0x5f1800,_0x182e10){return _0x5f1800(_0x182e10);},'Nvdkt':'get_cli_token','OKOOD':function(_0x138745,_0x2c61d2){return _0x138745(_0x2c61d2);},'ITZla':_0x3f4599(0x155),'UZwYl':function(_0x12cc3a,_0x574348,_0x508706){return _0x12cc3a(_0x574348,_0x508706);},'LVNGs':function(_0x2cac3c,_0x4c1e9d,_0x5cecd0,_0x159903){return _0x2cac3c(_0x4c1e9d,_0x5cecd0,_0x159903);},'HCKhu':_0x3f4599(0xfb)},_0x1554fe={'Content-Type':_0x14cb38['vzsUS'],'Accept':_0x14cb38[_0x3f4599(0x105)]};_0x32378b&&(_0x1554fe[_0x3f4599(0x10b)]=_0x3f4599(0x138)+_0x32378b);const _0x27da6e=async _0x34cd20=>{const _0xb871b8=_0x3f4599,_0x18cbc0=await fetch(_0x2b97d2,{'method':_0x14cb38[_0xb871b8(0x113)],'headers':_0x1554fe,'body':JSON['stringify'](_0x34cd20)});if(!_0x18cbc0['ok']){const _0x502109=await _0x18cbc0[_0xb871b8(0x121)]();throw new Error(_0xb871b8(0x144)+_0x18cbc0['status']+':\x20'+_0x502109);}return parseResponse(_0x18cbc0);};process[_0x3f4599(0x14e)]['write'](_0x3f4599(0x189));const _0x495f13=await _0x14cb38['WvWbt'](_0x27da6e,{'jsonrpc':_0x14cb38[_0x3f4599(0x10a)],'id':0x1,'method':_0x14cb38['sJZSf'],'params':{'protocolVersion':_0x14cb38['yKHNA'],'capabilities':{},'clientInfo':{'name':'ranger-cli','version':_0x3f4599(0x165)}}});if(_0x495f13['error'])throw new Error('MCP\x20initialize\x20failed:\x20'+(_0x495f13['error'][_0x3f4599(0x16b)]??JSON[_0x3f4599(0x141)](_0x495f13[_0x3f4599(0x188)])));console[_0x3f4599(0x18b)](_0x3f4599(0x174)),await _0x14cb38['AYSPX'](fetch,_0x2b97d2,{'method':_0x3f4599(0x149),'headers':_0x1554fe,'body':JSON[_0x3f4599(0x141)]({'jsonrpc':'2.0','method':_0x14cb38['VxkZt']})})['then'](_0x566a75=>_0x566a75['text']()),process['stdout']['write'](_0x14cb38['DRcsn']);const _0x30ec74=await _0x14cb38[_0x3f4599(0x14b)](_0x27da6e,{'jsonrpc':_0x14cb38['AOvKf'],'id':0x2,'method':_0x3f4599(0x13f),'params':{'name':_0x14cb38['Nvdkt'],'arguments':{}}});if(_0x30ec74['error'])throw new Error('get_cli_token\x20failed:\x20'+(_0x30ec74[_0x3f4599(0x188)]['message']??JSON['stringify'](_0x30ec74['error'])));console[_0x3f4599(0x18b)]('\x20done');const _0xeeb545=_0x14cb38[_0x3f4599(0x132)](extractToken,_0x30ec74[_0x3f4599(0x171)]);if(!_0xeeb545){console[_0x3f4599(0x188)](_0x3f4599(0x17c)),console['error'](JSON['stringify'](_0x30ec74['result'],null,0x2));throw new Error(_0x14cb38[_0x3f4599(0x172)]);}const _0x2a91b4=_0x14cb38[_0x3f4599(0x10d)](join,homedir(),_0x3f4599(0x142)),_0x521d8e=_0x14cb38['AYSPX'](join,_0x2a91b4,_0x3f4599(0x145));await mkdir(_0x2a91b4,{'recursive':!![]}),await _0x14cb38['LVNGs'](writeFile,_0x521d8e,_0xeeb545,{'mode':0x180}),await writeFile(join(_0x2a91b4,'auth-origin.txt'),_0x2b97d2,{'mode':0x180}),console[_0x3f4599(0x18b)](_0x3f4599(0x176)+_0x521d8e),console[_0x3f4599(0x18b)](_0x14cb38['HCKhu']);}async function fetchAuthServerMetadata(_0x5bf344){const _0x57dc93=_0x21aab3,_0x1a6760=_0x5bf344+_0x57dc93(0x10c),_0x344a06=await fetch(_0x1a6760);if(!_0x344a06['ok'])throw new Error('Could\x20not\x20fetch\x20auth\x20server\x20metadata\x20from\x20'+_0x1a6760+':\x20'+_0x344a06['status']);return _0x344a06[_0x57dc93(0x129)]();}function waitForCallback(_0x5e8d9d){const _0x9fa653=_0x21aab3,_0xf83abe={'nLoin':function(_0x4bab97,_0x1b0bc4){return _0x4bab97!==_0x1b0bc4;},'LvShk':'error','NfqnY':function(_0x573a9b,_0x4aa071){return _0x573a9b(_0x4aa071);},'iPOMW':_0x9fa653(0x13b),'KsRoj':_0x9fa653(0x112),'OKdlw':'<html><body><h2>Authenticated!</h2><p>You\x20can\x20close\x20this\x20window\x20and\x20return\x20to\x20the\x20terminal.</p></body></html>','XeAge':'127.0.0.1'};return new Promise((_0x598a0d,_0x35d790)=>{const _0x55c716=_0x9fa653,_0x379316={'VilJo':function(_0x5ee373){return _0x5ee373();},'jVQVs':function(_0x5474e5,_0x1fcb05){const _0x28894b=_0x2e24;return _0xf83abe[_0x28894b(0x168)](_0x5474e5,_0x1fcb05);},'tWDHX':_0x55c716(0x101),'BbcRj':_0xf83abe['LvShk'],'VHaxQ':function(_0x57c456,_0x461d60){return _0xf83abe['NfqnY'](_0x57c456,_0x461d60);},'ndDWE':_0xf83abe[_0x55c716(0x122)],'zAqwj':_0xf83abe['KsRoj'],'fbwsJ':_0xf83abe['OKdlw']},_0x5cc4be=()=>{const _0x228579=_0x55c716;_0x1aeb13['closeAllConnections'](),_0x1aeb13[_0x228579(0x170)]();},_0x93f619=setTimeout(()=>{_0x379316['VilJo'](_0x5cc4be),_0x35d790(new OAuthTimeoutError('OAuth\x20callback\x20timed\x20out\x20after\x202\x20minutes'));},0x1d4c0),_0x1aeb13=createServer((_0xe7847,_0x4d8f78)=>{const _0x56d68f=_0x55c716,_0x53511e=new URL(_0xe7847[_0x56d68f(0x182)]??'/',_0x56d68f(0x175)+CALLBACK_PORT);if(_0x379316['jVQVs'](_0x53511e['pathname'],_0x56d68f(0x11e))){_0x4d8f78['writeHead'](0x194),_0x4d8f78[_0x56d68f(0x160)](_0x56d68f(0x115));return;}const _0x5b645f=_0x53511e[_0x56d68f(0x107)][_0x56d68f(0x15e)](_0x56d68f(0x126)),_0x3d42b9=_0x53511e['searchParams'][_0x56d68f(0x15e)](_0x379316[_0x56d68f(0x158)]),_0x1d8317=_0x53511e['searchParams']['get'](_0x379316['BbcRj']);if(_0x1d8317){const _0x5de629=_0x53511e['searchParams']['get']('error_description')??_0x1d8317;_0x4d8f78['writeHead'](0xc8,{'Content-Type':_0x56d68f(0x13b)}),_0x4d8f78['end'](_0x56d68f(0x13e)+_0x5de629+'</p><p>You\x20can\x20close\x20this\x20window.</p></body></html>'),clearTimeout(_0x93f619),_0x379316[_0x56d68f(0x148)](_0x5cc4be),_0x379316['VHaxQ'](_0x35d790,new Error('OAuth\x20error:\x20'+_0x5de629));return;}if(!_0x5b645f||_0x3d42b9!==_0x5e8d9d){_0x4d8f78['writeHead'](0x190,{'Content-Type':_0x379316[_0x56d68f(0x17a)]}),_0x4d8f78['end'](_0x379316[_0x56d68f(0x10e)]);return;}_0x4d8f78[_0x56d68f(0x156)](0xc8,{'Content-Type':_0x56d68f(0x13b)}),_0x4d8f78[_0x56d68f(0x160)](_0x379316[_0x56d68f(0x10f)]),_0x379316['VHaxQ'](clearTimeout,_0x93f619),_0x5cc4be(),_0x598a0d(_0x5b645f);});_0x1aeb13['listen'](CALLBACK_PORT,_0xf83abe[_0x55c716(0x111)]);});}async function openBrowser(_0x4fd159){const _0x4a96bc=_0x21aab3,_0x4b1918={'dVoBk':'darwin','MCiiP':function(_0x39ff46,_0x2a16b1){return _0x39ff46===_0x2a16b1;},'XCIpB':_0x4a96bc(0x167),'yIKGp':_0x4a96bc(0x120),'jJNKY':_0x4a96bc(0x183)},_0x4efc89=process[_0x4a96bc(0x180)]===_0x4b1918[_0x4a96bc(0x17f)]?'open':_0x4b1918['MCiiP'](process['platform'],_0x4b1918['XCIpB'])?_0x4b1918['yIKGp']:_0x4b1918['jJNKY'];exec(_0x4efc89+'\x20\x22'+_0x4fd159+'\x22');}let currentOrigin='';async function loadCachedToken(){const _0x258966=_0x21aab3,_0x20979d={'VcXOm':function(_0x540183,_0x10b1e2,_0x402e7f){return _0x540183(_0x10b1e2,_0x402e7f);},'dliJy':function(_0x2b0c9c,_0x38fbc6){return _0x2b0c9c>_0x38fbc6;}};try{const _0x14d685=JSON['parse'](await _0x20979d[_0x258966(0x12b)](readFile,TOKEN_CACHE_PATH,'utf-8'));if(_0x14d685['origin']&&_0x14d685[_0x258966(0x124)]!==currentOrigin)return null;if(_0x14d685['expiresAt']&&_0x20979d[_0x258966(0x181)](Date[_0x258966(0x14d)](),_0x14d685[_0x258966(0x102)]))return null;return _0x14d685['accessToken']??null;}catch{return null;}}function _0x42ae(){const _0x132e65=['start','text','iPOMW','ljjwS','origin','authorization_servers','code','hex','mcp-oauth-tokens.json','json','996488SqjnIT','VcXOm','7EtHQij','client_id','nNZyY','If\x20the\x20browser\x20doesn\x27t\x20open,\x20visit:\x0a','OAuthTimeoutError','3ogFsjh','OKOOD','nERkt','ahFkd','split','fDLoe','isTTY','Bearer\x20','auth-origin.txt','string','text/html','status','LByyp','<html><body><h2>Authentication\x20failed</h2><p>','tools/call','content','stringify','.ranger','432135NCycww','HTTP\x20','refresh.txt','refresh_token','expires_in','VilJo','POST','DWRcu','WvyPI','\x0aCached\x20OAuth\x20client\x20may\x20be\x20stale\x20—\x20clearing\x20and\x20retrying...\x0a','now','stdout','20142130jMZUYR','S256','code_challenge_method','fSPej','application/x-www-form-urlencoded','application/json','Could\x20not\x20extract\x20token\x20from\x20MCP\x20response','writeHead','KxwUP','tWDHX','PfcGF','update','trim','nhwMY','accessToken','get','7376988EgtLem','end','MCP\x20server\x20requires\x20authentication\x20but\x20running\x20in\x20non-interactive\x20mode.\x0a','zkwPU','Registering\x20OAuth\x20client...','none','1.0.0','2025-03-26','win32','nLoin','ieaTk','toString','message','Run\x20`ranger\x20setup\x20--mcp-bootstrap`\x20interactively\x20first.','resource','WWfTh','proxied','close','result','ITZla','access_token','\x20done','http://localhost:','\x0aToken\x20written\x20to\x20','No\x20authorization_servers\x20in\x20protected\x20resource\x20metadata','sha256','application/json,\x20text/event-stream','ndDWE','8gdBqxn','\x0aUnexpected\x20response\x20structure:','set','slice','dVoBk','platform','dliJy','url','xdg-open','ranger-cli','qJJht','1627749bqRYfa','Could\x20not\x20fetch\x20protected\x20resource\x20metadata\x20from\x20MCP\x20server','error','Initializing\x20MCP\x20session...','type','log','initialize','MzZbi','Run\x20`ranger\x20status`\x20to\x20verify\x20authentication.\x0a','11WjgJBa','\x0aConnecting\x20to\x20MCP\x20auth\x20server:\x20','needs-oauth','Authorization\x20server\x20does\x20not\x20support\x20dynamic\x20client\x20registration\x20and\x20no\x20cached\x20client\x20found','881868HOvLEA','state','expiresAt','isError','utf-8','vtNwq','Tjyhr','searchParams','REkXM','MCP\x20server\x20returned\x20HTTP\x20','AOvKf','Authorization','/.well-known/oauth-authorization-server','UZwYl','zAqwj','fbwsJ','registration_endpoint','XeAge','<html><body><h2>Invalid\x20callback</h2><p>Missing\x20code\x20or\x20state\x20mismatch.</p></body></html>','ZViMV','token','Not\x20found','ANEBG','Exchanging\x20authorization\x20code...','refreshToken','content-type','1941860UqpQZY','parse','ZmYsy','YHQci','/callback','\x0aOpening\x20browser\x20for\x20authentication...'];_0x42ae=function(){return _0x132e65;};return _0x42ae();}async function saveCachedToken(_0x520954,_0x2349a3,_0x2ea04d){const _0x20ecac=_0x21aab3,_0x14efcb={'tBrVr':function(_0x57b952,_0x5a598c){return _0x57b952*_0x5a598c;},'oTvoX':function(_0x3a73bd,_0x12e317,_0x26ba10){return _0x3a73bd(_0x12e317,_0x26ba10);},'YHQci':function(_0x4b0036){return _0x4b0036();},'VPfXu':function(_0x5d2560,_0x2edef1,_0x1cef39,_0x46f962){return _0x5d2560(_0x2edef1,_0x1cef39,_0x46f962);}},_0x284f6e=await loadCachedData(),_0xe623fe={..._0x284f6e,'origin':currentOrigin,'accessToken':_0x520954,'refreshToken':_0x2349a3??_0x284f6e?.[_0x20ecac(0x118)],'expiresAt':_0x2ea04d?Date['now']()+_0x14efcb['tBrVr'](_0x2ea04d,0x3e8):undefined};await mkdir(_0x14efcb['oTvoX'](join,_0x14efcb[_0x20ecac(0x11d)](homedir),_0x20ecac(0x142)),{'recursive':!![]}),await _0x14efcb['VPfXu'](writeFile,TOKEN_CACHE_PATH,JSON[_0x20ecac(0x141)](_0xe623fe),{'mode':0x180});}async function loadCachedClient(){const _0x3cb419=_0x21aab3,_0x11ceb8={'WWfTh':function(_0x4f8a9a){return _0x4f8a9a();},'nNZyY':function(_0x3ea3dc,_0x2279bb){return _0x3ea3dc!==_0x2279bb;}},_0x4d3dcc=await _0x11ceb8[_0x3cb419(0x16e)](loadCachedData);if(_0x4d3dcc?.[_0x3cb419(0x124)]&&_0x11ceb8[_0x3cb419(0x12e)](_0x4d3dcc['origin'],currentOrigin))return null;return _0x4d3dcc?.['clientId']?{'clientId':_0x4d3dcc['clientId'],'clientSecret':_0x4d3dcc['clientSecret']}:null;}async function clearCachedClient(){const _0x51feaa=await loadCachedData();if(!_0x51feaa)return;const {clientId:_0x1e6641,clientSecret:_0x5de1bd,..._0xc61518}=_0x51feaa;await writeFile(TOKEN_CACHE_PATH,JSON['stringify'](_0xc61518),{'mode':0x180});}async function saveCachedClient(_0x195698,_0x25fb96){const _0x276bf6=_0x21aab3,_0x272d52={'RyKhQ':function(_0x133896,_0x45bd5b,_0x92590c,_0x393b0e){return _0x133896(_0x45bd5b,_0x92590c,_0x393b0e);}},_0x553178=await loadCachedData(),_0x5138da={..._0x553178,'origin':currentOrigin,'accessToken':_0x553178?.[_0x276bf6(0x15d)]??'','clientId':_0x195698,'clientSecret':_0x25fb96};await mkdir(join(homedir(),_0x276bf6(0x142)),{'recursive':!![]}),await _0x272d52['RyKhQ'](writeFile,TOKEN_CACHE_PATH,JSON['stringify'](_0x5138da),{'mode':0x180});}async function loadCachedData(){const _0x214a4e=_0x21aab3;try{return JSON['parse'](await readFile(TOKEN_CACHE_PATH,_0x214a4e(0x104)));}catch{return null;}}async function parseResponse(_0x5bf8c4){const _0x1921ae=_0x21aab3,_0x559818={'Tjyhr':function(_0xee5bfa,_0x45706a){return _0xee5bfa!==_0x45706a;}},_0x592986=_0x5bf8c4['headers'][_0x1921ae(0x15e)](_0x1921ae(0x119))??'';if(_0x592986['includes']('text/event-stream')){const _0x42d78e=await _0x5bf8c4['text']();for(const _0x3b2e0b of _0x42d78e[_0x1921ae(0x135)]('\x0a')){const _0x5d5ab5=_0x3b2e0b[_0x1921ae(0x15b)]();if(_0x5d5ab5['startsWith']('data:')){const _0x21b8e1=_0x5d5ab5[_0x1921ae(0x17e)]('data:'['length'])['trim']();if(!_0x21b8e1)continue;try{const _0xc4aca=JSON['parse'](_0x21b8e1);if(_0x559818[_0x1921ae(0x106)](_0xc4aca['id'],undefined)||_0xc4aca['error'])return _0xc4aca;}catch{}}}throw new Error('No\x20JSON-RPC\x20response\x20found\x20in\x20SSE\x20stream');}return _0x5bf8c4['json']();}function extractToken(_0x241852){const _0x22100a=_0x21aab3,_0x9c98d7={'REkXM':function(_0x405a5b,_0x1dd3fc){return _0x405a5b===_0x1dd3fc;},'ZmYsy':'text','FEhTT':function(_0x4d8c5e,_0x265d0c){return _0x4d8c5e===_0x265d0c;}};if(!_0x241852)return null;const _0x1a0296=_0x241852['structuredContent'];if(_0x1a0296?.['token']&&_0x9c98d7[_0x22100a(0x108)](typeof _0x1a0296[_0x22100a(0x114)],'string'))return _0x1a0296['token'];if(_0x241852[_0x22100a(0x103)]){const _0x2f8d24=_0x241852[_0x22100a(0x140)];throw new Error('Server\x20returned\x20error:\x20'+(_0x2f8d24?.[0x0]?.[_0x22100a(0x121)]??'Unknown\x20error'));}const _0x4ff94c=_0x241852['content'];if(_0x4ff94c)for(const _0x194fc2 of _0x4ff94c){if(_0x194fc2[_0x22100a(0x18a)]===_0x9c98d7[_0x22100a(0x11c)]&&_0x194fc2[_0x22100a(0x121)]){try{const _0x5e2faf=JSON[_0x22100a(0x11b)](_0x194fc2[_0x22100a(0x121)]);if(_0x9c98d7['FEhTT'](typeof _0x5e2faf?.[_0x22100a(0x114)],_0x22100a(0x13a)))return _0x5e2faf['token'];}catch{}const _0x831873=_0x194fc2['text']['match'](/(rngr_[A-Za-z0-9_-]+)/);if(_0x831873)return _0x831873[0x1];}}return null;}
1
+ const _0x2462a9=_0x2883;(function(_0x3b9d71,_0x4012f6){const _0x5ba73d=_0x2883,_0x5ed297=_0x3b9d71();while(!![]){try{const _0x35e3df=-parseInt(_0x5ba73d(0x210))/0x1+parseInt(_0x5ba73d(0x228))/0x2*(-parseInt(_0x5ba73d(0x227))/0x3)+-parseInt(_0x5ba73d(0x257))/0x4+parseInt(_0x5ba73d(0x1ed))/0x5+parseInt(_0x5ba73d(0x1e0))/0x6*(-parseInt(_0x5ba73d(0x1d5))/0x7)+parseInt(_0x5ba73d(0x222))/0x8+-parseInt(_0x5ba73d(0x20d))/0x9*(-parseInt(_0x5ba73d(0x1e4))/0xa);if(_0x35e3df===_0x4012f6)break;else _0x5ed297['push'](_0x5ed297['shift']());}catch(_0x21300a){_0x5ed297['push'](_0x5ed297['shift']());}}}(_0x36c9,0xc1ab1));import{mkdir,writeFile,readFile}from'fs/promises';import{join}from'path';import{homedir}from'os';import{createServer}from'http';import{randomBytes,createHash}from'crypto';import{exec}from'child_process';import{getMcpAuthUrl}from'./utils/environment.js';const CALLBACK_PORT=0x4d78,TOKEN_CACHE_PATH=join(homedir(),_0x2462a9(0x220),'mcp-oauth-tokens.json'),AUTH_ORIGIN_PATH=join(homedir(),'.ranger',_0x2462a9(0x1dc));function _0x2883(_0x4b7d00,_0x11b843){_0x4b7d00=_0x4b7d00-0x1c9;const _0x36c951=_0x36c9();let _0x288381=_0x36c951[_0x4b7d00];return _0x288381;}export async function getMcpAuthOrigin(){const _0x1b04e5=_0x2462a9,_0x40a407={'JVPeD':'utf-8','vzXLq':function(_0xa4e625,_0x1c42cf){return _0xa4e625||_0x1c42cf;}};try{const _0xa1243e=(await readFile(AUTH_ORIGIN_PATH,_0x40a407['JVPeD']))['trim']();return _0x40a407[_0x1b04e5(0x23e)](_0xa1243e,null);}catch{return null;}}export async function mcpBootstrap(){const _0x22c573=_0x2462a9,_0xd797ef={'qRysI':function(_0x1324f5){return _0x1324f5();},'uBqdg':function(_0xdc53a7,_0x40b38c){return _0xdc53a7+_0x40b38c;},'wWpFz':'MCP\x20server\x20requires\x20authentication\x20but\x20running\x20in\x20non-interactive\x20mode.\x0a','xcwjd':'Run\x20`ranger\x20setup\x20--mcp-bootstrap`\x20interactively\x20first.','viRQJ':function(_0x10fd73,_0x302066){return _0x10fd73(_0x302066);}},_0x15fd0b=_0xd797ef['qRysI'](getMcpAuthUrl);currentOrigin=_0x15fd0b;const _0x253040=process[_0x22c573(0x211)][_0x22c573(0x1d3)]??![];console['log'](_0x22c573(0x1d6)+_0x15fd0b+'\x0a');const _0x255bae=await tryUnauthenticated(_0x15fd0b);let _0x31d040=null;if(_0x255bae===_0x22c573(0x22a))_0x31d040='';else{_0x31d040=await loadCachedToken();if(!_0x31d040){if(!_0x253040)throw new Error(_0xd797ef[_0x22c573(0x1f4)](_0xd797ef['wWpFz'],_0xd797ef[_0x22c573(0x1fb)]));_0x31d040=await _0xd797ef['viRQJ'](oauthFlow,_0x15fd0b);}}await callGetCliToken(_0x15fd0b,_0x31d040);}async function tryUnauthenticated(_0x6a065c){const _0x3e5c81=_0x2462a9,_0x1bb4c5={'zjBpx':_0x3e5c81(0x241),'NNucH':_0x3e5c81(0x1f1),'fiJyl':'initialize','zkMuw':_0x3e5c81(0x24d),'sPPDl':_0x3e5c81(0x1f8),'wKnsr':_0x3e5c81(0x22a)},_0x3419a7=await fetch(_0x6a065c,{'method':_0x1bb4c5[_0x3e5c81(0x1d7)],'headers':{'Content-Type':_0x3e5c81(0x1e1),'Accept':_0x1bb4c5[_0x3e5c81(0x23d)]},'body':JSON['stringify']({'jsonrpc':'2.0','id':0x1,'method':_0x1bb4c5['fiJyl'],'params':{'protocolVersion':'2025-03-26','capabilities':{},'clientInfo':{'name':_0x1bb4c5[_0x3e5c81(0x1f7)],'version':_0x1bb4c5['sPPDl']}}})});if(_0x3419a7['ok'])return await _0x3419a7[_0x3e5c81(0x1e2)](),_0x1bb4c5['wKnsr'];if(_0x3419a7[_0x3e5c81(0x207)]===0x191)return await _0x3419a7[_0x3e5c81(0x1e2)](),_0x3e5c81(0x242);const _0x4dfeca=await _0x3419a7[_0x3e5c81(0x1e2)]();throw new Error('MCP\x20server\x20returned\x20HTTP\x20'+_0x3419a7[_0x3e5c81(0x207)]+':\x20'+_0x4dfeca);}class OAuthTimeoutError extends Error{constructor(_0x4cbc0b){const _0x5ba445=_0x2462a9;super(_0x4cbc0b),this[_0x5ba445(0x219)]=_0x5ba445(0x218);}}async function oauthFlow(_0x217f7c){const _0x4dffa2=_0x2462a9,_0x20d3f5={'oRgGb':function(_0xa88388,_0x1694d0){return _0xa88388(_0x1694d0);},'uyPps':function(_0x135fd0,_0x1ed773){return _0x135fd0 instanceof _0x1ed773;},'GAzgU':function(_0x462f7d){return _0x462f7d();},'DExuU':'\x0aCached\x20OAuth\x20client\x20may\x20be\x20stale\x20—\x20clearing\x20and\x20retrying...\x0a'};try{return await _0x20d3f5['oRgGb'](oauthFlowAttempt,_0x217f7c);}catch(_0x53801a){if(_0x20d3f5[_0x4dffa2(0x244)](_0x53801a,OAuthTimeoutError)&&await _0x20d3f5['GAzgU'](loadCachedClient))return console['log'](_0x20d3f5[_0x4dffa2(0x1ee)]),await clearCachedClient(),await oauthFlowAttempt(_0x217f7c);throw _0x53801a;}}async function oauthFlowAttempt(_0x1c29cf){const _0x3904a3=_0x2462a9,_0x5e39b6={'xOcWL':'Discovering\x20authorization\x20server...','PYNcX':function(_0x5ca52e,_0x731df4){return _0x5ca52e(_0x731df4);},'dECTr':function(_0x4c1375){return _0x4c1375();},'iBPRB':_0x3904a3(0x255),'zxseW':'authorization_code','eFRqv':_0x3904a3(0x21e),'IKsyd':'Authorization\x20server\x20does\x20not\x20support\x20dynamic\x20client\x20registration\x20and\x20no\x20cached\x20client\x20found','mUamP':function(_0x53d102,_0x3e9e84){return _0x53d102(_0x3e9e84);},'AkYaD':_0x3904a3(0x23b),'OoMpi':'sha256','kOzvG':_0x3904a3(0x1e6),'VYVXm':'response_type','BAbLg':_0x3904a3(0x1e8),'HormO':'code_challenge','zeugw':'S256','MLnJV':'state','LNTbe':'resource','grKjp':'\x0aOpening\x20browser\x20for\x20authentication...','oPLfr':function(_0x17aa1e,_0x1a6922){return _0x17aa1e(_0x1a6922);},'LCEmr':'Exchanging\x20authorization\x20code...','tKHLt':function(_0x23e37b,_0x5eb72b,_0x508f89){return _0x23e37b(_0x5eb72b,_0x508f89);},'VeiQh':'POST','vkEAH':'application/x-www-form-urlencoded','eEBRG':'\x20done','UOtBk':function(_0x5815cf,_0x3254e6,_0x11b2e7,_0x215581){return _0x5815cf(_0x3254e6,_0x11b2e7,_0x215581);}},_0x5cbd0c=_0x1c29cf[_0x3904a3(0x24f)](/\/mcp$/,'');process['stdout'][_0x3904a3(0x1ec)](_0x5e39b6['xOcWL']);const _0x5dc01e=await _0x5e39b6['PYNcX'](fetch,_0x5cbd0c+_0x3904a3(0x247));if(!_0x5dc01e['ok'])throw new Error(_0x3904a3(0x208));const _0x256184=await _0x5dc01e[_0x3904a3(0x20e)](),_0x46363f=_0x256184['authorization_servers']?.[0x0];if(!_0x46363f)throw new Error('No\x20authorization_servers\x20in\x20protected\x20resource\x20metadata');console['log']('\x20'+_0x46363f);const _0x248220=await fetchAuthServerMetadata(_0x46363f);let _0x1113ab,_0x109e07;const _0x26504d=await _0x5e39b6[_0x3904a3(0x226)](loadCachedClient);if(_0x26504d)_0x1113ab=_0x26504d[_0x3904a3(0x1df)],_0x109e07=_0x26504d['clientSecret'];else{if(_0x248220['registration_endpoint']){process['stdout'][_0x3904a3(0x1ec)]('Registering\x20OAuth\x20client...');const _0x352be2=await fetch(_0x248220[_0x3904a3(0x1db)],{'method':_0x3904a3(0x241),'headers':{'Content-Type':_0x3904a3(0x1e1)},'body':JSON['stringify']({'client_name':_0x5e39b6[_0x3904a3(0x1cf)],'redirect_uris':[_0x3904a3(0x20c)+CALLBACK_PORT+'/callback'],'grant_types':[_0x5e39b6['zxseW'],_0x3904a3(0x223)],'response_types':[_0x5e39b6['eFRqv']],'token_endpoint_auth_method':'none'})});if(!_0x352be2['ok']){const _0x5e1173=await _0x352be2['text']();throw new Error('Client\x20registration\x20failed:\x20'+_0x5e1173);}const _0x580d1b=await _0x352be2[_0x3904a3(0x20e)]();_0x1113ab=_0x580d1b['client_id'],_0x109e07=_0x580d1b['client_secret'],await saveCachedClient(_0x1113ab,_0x109e07),console[_0x3904a3(0x1dd)]('\x20done');}else throw new Error(_0x5e39b6['IKsyd']);}const _0x2b8e7c=_0x5e39b6[_0x3904a3(0x209)](randomBytes,0x20)[_0x3904a3(0x22f)](_0x5e39b6['AkYaD']),_0x451956=_0x5e39b6[_0x3904a3(0x209)](createHash,_0x5e39b6['OoMpi'])['update'](_0x2b8e7c)['digest'](_0x5e39b6['AkYaD']),_0x5a51e8=_0x5e39b6[_0x3904a3(0x212)](randomBytes,0x10)['toString'](_0x5e39b6['kOzvG']),_0x186c3b=new URL(_0x248220['authorization_endpoint']);_0x186c3b['searchParams']['set'](_0x5e39b6[_0x3904a3(0x239)],'code'),_0x186c3b[_0x3904a3(0x1fc)]['set'](_0x3904a3(0x1fa),_0x1113ab),_0x186c3b['searchParams']['set'](_0x5e39b6[_0x3904a3(0x1ef)],'http://localhost:'+CALLBACK_PORT+_0x3904a3(0x202)),_0x186c3b[_0x3904a3(0x1fc)]['set'](_0x5e39b6[_0x3904a3(0x1f3)],_0x451956),_0x186c3b[_0x3904a3(0x1fc)][_0x3904a3(0x22c)](_0x3904a3(0x1d0),_0x5e39b6['zeugw']),_0x186c3b['searchParams']['set'](_0x5e39b6[_0x3904a3(0x216)],_0x5a51e8);_0x256184[_0x3904a3(0x23c)]&&_0x186c3b[_0x3904a3(0x1fc)]['set'](_0x5e39b6['LNTbe'],_0x256184[_0x3904a3(0x23c)]);console['log'](_0x5e39b6[_0x3904a3(0x23f)]),console['log'](_0x3904a3(0x1cc)+_0x186c3b['toString']()+'\x0a'),await _0x5e39b6[_0x3904a3(0x221)](openBrowser,_0x186c3b['toString']());const _0x3bf7c9=await _0x5e39b6['mUamP'](waitForCallback,_0x5a51e8);process['stdout']['write'](_0x5e39b6['LCEmr']);const _0x1cd623=new URLSearchParams({'grant_type':'authorization_code','code':_0x3bf7c9,'redirect_uri':_0x3904a3(0x20c)+CALLBACK_PORT+'/callback','client_id':_0x1113ab,'code_verifier':_0x2b8e7c});_0x109e07&&_0x1cd623['set'](_0x3904a3(0x229),_0x109e07);_0x256184['resource']&&_0x1cd623['set'](_0x3904a3(0x23c),_0x256184[_0x3904a3(0x23c)]);const _0x1b0180=await _0x5e39b6[_0x3904a3(0x1ce)](fetch,_0x248220['token_endpoint'],{'method':_0x5e39b6['VeiQh'],'headers':{'Content-Type':_0x5e39b6['vkEAH']},'body':_0x1cd623});if(!_0x1b0180['ok']){const _0x1bdc0a=await _0x1b0180[_0x3904a3(0x1e2)]();throw new Error('Token\x20exchange\x20failed:\x20'+_0x1bdc0a);}const _0x4e00ff=await _0x1b0180[_0x3904a3(0x20e)]();return console['log'](_0x5e39b6['eEBRG']),await _0x5e39b6['UOtBk'](saveCachedToken,_0x4e00ff[_0x3904a3(0x200)],_0x4e00ff[_0x3904a3(0x223)],_0x4e00ff['expires_in']),_0x4e00ff['access_token'];}async function callGetCliToken(_0x22148b,_0x50e225){const _0x33b489=_0x2462a9,_0x1e3dec={'BQJST':'POST','EhhOJ':'Authorization','NcjHd':'Initializing\x20MCP\x20session...','lgwCk':function(_0xf76ae5,_0xa44f19){return _0xf76ae5(_0xa44f19);},'bPsjN':'initialize','dJjHa':'2025-03-26','UpJjA':'ranger-cli','cxQma':'\x20done','fydCM':_0x33b489(0x24c),'qKgfN':_0x33b489(0x1d9),'PjlBa':'2.0','jIesM':_0x33b489(0x250),'mWYsc':'\x0aUnexpected\x20response\x20structure:','oHBbo':_0x33b489(0x1e7),'WWHBW':function(_0x59fe3d,_0x2aeb49,_0x5d3097,_0xc12547){return _0x59fe3d(_0x2aeb49,_0x5d3097,_0xc12547);},'tNhgy':_0x33b489(0x1dc),'jIUuB':_0x33b489(0x206)},_0x2216fc={'Content-Type':_0x33b489(0x1e1),'Accept':_0x33b489(0x1f1)};_0x50e225&&(_0x2216fc[_0x1e3dec[_0x33b489(0x225)]]='Bearer\x20'+_0x50e225);const _0x3bf971=async _0x23b6b9=>{const _0x39eedc=_0x33b489,_0x145f34=await fetch(_0x22148b,{'method':_0x1e3dec[_0x39eedc(0x20a)],'headers':_0x2216fc,'body':JSON['stringify'](_0x23b6b9)});if(!_0x145f34['ok']){const _0x209a87=await _0x145f34[_0x39eedc(0x1e2)]();throw new Error(_0x39eedc(0x236)+_0x145f34['status']+':\x20'+_0x209a87);}return parseResponse(_0x145f34);};process['stdout'][_0x33b489(0x1ec)](_0x1e3dec[_0x33b489(0x1ca)]);const _0x255be3=await _0x1e3dec['lgwCk'](_0x3bf971,{'jsonrpc':'2.0','id':0x1,'method':_0x1e3dec['bPsjN'],'params':{'protocolVersion':_0x1e3dec['dJjHa'],'capabilities':{},'clientInfo':{'name':_0x1e3dec['UpJjA'],'version':'1.0.0'}}});if(_0x255be3[_0x33b489(0x234)])throw new Error(_0x33b489(0x248)+(_0x255be3[_0x33b489(0x234)][_0x33b489(0x256)]??JSON['stringify'](_0x255be3['error'])));console[_0x33b489(0x1dd)](_0x1e3dec['cxQma']),await fetch(_0x22148b,{'method':_0x1e3dec[_0x33b489(0x20a)],'headers':_0x2216fc,'body':JSON['stringify']({'jsonrpc':_0x33b489(0x1e9),'method':_0x1e3dec['fydCM']})})['then'](_0x14d59d=>_0x14d59d[_0x33b489(0x1e2)]()),process[_0x33b489(0x211)][_0x33b489(0x1ec)](_0x1e3dec[_0x33b489(0x213)]);const _0x2366df=await _0x3bf971({'jsonrpc':_0x1e3dec[_0x33b489(0x21d)],'id':0x2,'method':_0x33b489(0x1da),'params':{'name':_0x1e3dec[_0x33b489(0x1e3)],'arguments':{}}});if(_0x2366df[_0x33b489(0x234)])throw new Error(_0x33b489(0x1de)+(_0x2366df[_0x33b489(0x234)][_0x33b489(0x256)]??JSON['stringify'](_0x2366df[_0x33b489(0x234)])));console['log'](_0x33b489(0x204));const _0x27c111=_0x1e3dec[_0x33b489(0x205)](extractToken,_0x2366df['result']);if(!_0x27c111){console['error'](_0x1e3dec['mWYsc']),console[_0x33b489(0x234)](JSON[_0x33b489(0x217)](_0x2366df['result'],null,0x2));throw new Error('Could\x20not\x20extract\x20token\x20from\x20MCP\x20response');}const _0x237617=join(homedir(),_0x33b489(0x220)),_0x890699=join(_0x237617,_0x1e3dec['oHBbo']);await mkdir(_0x237617,{'recursive':!![]}),await _0x1e3dec[_0x33b489(0x214)](writeFile,_0x890699,_0x27c111,{'mode':0x180}),await writeFile(join(_0x237617,_0x1e3dec[_0x33b489(0x24b)]),_0x22148b,{'mode':0x180}),console['log'](_0x33b489(0x231)+_0x890699),console[_0x33b489(0x1dd)](_0x1e3dec[_0x33b489(0x252)]);}async function fetchAuthServerMetadata(_0x503d94){const _0x1341c4=_0x2462a9,_0x1f7351=_0x503d94+_0x1341c4(0x235),_0x36b741=await fetch(_0x1f7351);if(!_0x36b741['ok'])throw new Error('Could\x20not\x20fetch\x20auth\x20server\x20metadata\x20from\x20'+_0x1f7351+':\x20'+_0x36b741['status']);return _0x36b741['json']();}function waitForCallback(_0x639ab7){const _0x395372=_0x2462a9,_0x134d8a={'IFMSZ':'/callback','DqVaZ':_0x395372(0x21e),'AFdVZ':_0x395372(0x251),'PRwjZ':function(_0x3acfbf,_0x30de35){return _0x3acfbf(_0x30de35);},'zSgaV':function(_0x1ac77e,_0x8e21ee){return _0x1ac77e(_0x8e21ee);},'QlisK':'127.0.0.1'};return new Promise((_0x348bf6,_0x59a0fc)=>{const _0x2aead1=_0x395372,_0xc526b9={'JLLsV':_0x134d8a['IFMSZ'],'VKOFc':_0x134d8a[_0x2aead1(0x1f2)],'WEkIT':_0x134d8a['AFdVZ'],'fxBXD':_0x2aead1(0x234),'Gcxqe':function(_0x5a79d6){return _0x5a79d6();},'LnUUF':function(_0x1abd9e,_0x47d683){return _0x134d8a['PRwjZ'](_0x1abd9e,_0x47d683);},'YPKkS':'<html><body><h2>Invalid\x20callback</h2><p>Missing\x20code\x20or\x20state\x20mismatch.</p></body></html>'},_0x50b2cc=()=>{_0x3c031f['closeAllConnections'](),_0x3c031f['close']();},_0x32c2fc=setTimeout(()=>{const _0x251f39=_0x2aead1;_0x50b2cc(),_0x59a0fc(new OAuthTimeoutError(_0x251f39(0x1c9)));},0x1d4c0),_0x3c031f=_0x134d8a['zSgaV'](createServer,(_0xce1ada,_0x2cb97e)=>{const _0x37bd88=_0x2aead1,_0x25d683=new URL(_0xce1ada['url']??'/',_0x37bd88(0x20c)+CALLBACK_PORT);if(_0x25d683['pathname']!==_0xc526b9[_0x37bd88(0x230)]){_0x2cb97e['writeHead'](0x194),_0x2cb97e['end'](_0x37bd88(0x1fe));return;}const _0x51c349=_0x25d683['searchParams'][_0x37bd88(0x233)](_0xc526b9[_0x37bd88(0x1ff)]),_0xf28484=_0x25d683['searchParams']['get'](_0xc526b9['WEkIT']),_0x23e400=_0x25d683[_0x37bd88(0x1fc)]['get'](_0xc526b9[_0x37bd88(0x245)]);if(_0x23e400){const _0x3b917c=_0x25d683['searchParams'][_0x37bd88(0x233)](_0x37bd88(0x224))??_0x23e400;_0x2cb97e[_0x37bd88(0x201)](0xc8,{'Content-Type':_0x37bd88(0x21a)}),_0x2cb97e['end'](_0x37bd88(0x237)+_0x3b917c+_0x37bd88(0x1eb)),clearTimeout(_0x32c2fc),_0xc526b9['Gcxqe'](_0x50b2cc),_0xc526b9['LnUUF'](_0x59a0fc,new Error('OAuth\x20error:\x20'+_0x3b917c));return;}if(!_0x51c349||_0xf28484!==_0x639ab7){_0x2cb97e['writeHead'](0x190,{'Content-Type':'text/html'}),_0x2cb97e['end'](_0xc526b9['YPKkS']);return;}_0x2cb97e[_0x37bd88(0x201)](0xc8,{'Content-Type':_0x37bd88(0x21a)}),_0x2cb97e[_0x37bd88(0x238)](_0x37bd88(0x22b)),clearTimeout(_0x32c2fc),_0x50b2cc(),_0xc526b9['LnUUF'](_0x348bf6,_0x51c349);});_0x3c031f[_0x2aead1(0x22e)](CALLBACK_PORT,_0x134d8a[_0x2aead1(0x240)]);});}async function openBrowser(_0x32ca42){const _0x5b1ca9=_0x2462a9,_0x1ebf5c={'pTBhf':_0x5b1ca9(0x1f5),'hRoDv':function(_0x4aaeaf,_0x161e07){return _0x4aaeaf(_0x161e07);}},_0x22af4a=process[_0x5b1ca9(0x243)]==='darwin'?'open':process[_0x5b1ca9(0x243)]==='win32'?_0x1ebf5c['pTBhf']:_0x5b1ca9(0x1d4);_0x1ebf5c[_0x5b1ca9(0x1fd)](exec,_0x22af4a+'\x20\x22'+_0x32ca42+'\x22');}let currentOrigin='';async function loadCachedToken(){const _0x2507c7=_0x2462a9,_0x26a735={'ugygn':function(_0xfe3472,_0x4b824b,_0x1a529d){return _0xfe3472(_0x4b824b,_0x1a529d);},'NsysF':_0x2507c7(0x24e)};try{const _0x134556=JSON['parse'](await _0x26a735[_0x2507c7(0x20b)](readFile,TOKEN_CACHE_PATH,_0x26a735[_0x2507c7(0x249)]));if(_0x134556[_0x2507c7(0x21c)]&&_0x134556['origin']!==currentOrigin)return null;if(_0x134556[_0x2507c7(0x1ea)]&&Date[_0x2507c7(0x1f9)]()>_0x134556[_0x2507c7(0x1ea)])return null;return _0x134556['accessToken']??null;}catch{return null;}}async function saveCachedToken(_0x40b274,_0x7e613,_0x2c7ac5){const _0x428ae2=_0x2462a9,_0x136fc2={'vAeCf':function(_0x2dcf5c){return _0x2dcf5c();},'NVhDC':function(_0x26bcfa,_0xe4f529){return _0x26bcfa*_0xe4f529;},'BVWID':_0x428ae2(0x220)},_0x4e98eb=await _0x136fc2[_0x428ae2(0x1d8)](loadCachedData),_0x16e171={..._0x4e98eb,'origin':currentOrigin,'accessToken':_0x40b274,'refreshToken':_0x7e613??_0x4e98eb?.['refreshToken'],'expiresAt':_0x2c7ac5?Date[_0x428ae2(0x1f9)]()+_0x136fc2[_0x428ae2(0x232)](_0x2c7ac5,0x3e8):undefined};await mkdir(join(_0x136fc2[_0x428ae2(0x1d8)](homedir),_0x136fc2[_0x428ae2(0x215)]),{'recursive':!![]}),await writeFile(TOKEN_CACHE_PATH,JSON['stringify'](_0x16e171),{'mode':0x180});}async function loadCachedClient(){const _0x20ef02=_0x2462a9,_0x753e79={'YdMpB':function(_0x3fa349){return _0x3fa349();},'frtWg':function(_0x10b3de,_0x3b95a7){return _0x10b3de!==_0x3b95a7;}},_0x20c397=await _0x753e79[_0x20ef02(0x1e5)](loadCachedData);if(_0x20c397?.[_0x20ef02(0x21c)]&&_0x753e79['frtWg'](_0x20c397[_0x20ef02(0x21c)],currentOrigin))return null;return _0x20c397?.[_0x20ef02(0x1df)]?{'clientId':_0x20c397['clientId'],'clientSecret':_0x20c397[_0x20ef02(0x21f)]}:null;}async function clearCachedClient(){const _0x113f33=_0x2462a9,_0xf2eafe={'vkmKu':function(_0x5c93cc,_0x1b4cde,_0x19e2bc,_0x3e6659){return _0x5c93cc(_0x1b4cde,_0x19e2bc,_0x3e6659);}},_0x4a6c3c=await loadCachedData();if(!_0x4a6c3c)return;const {clientId:_0x18dc6,clientSecret:_0x26c213,..._0x279eb2}=_0x4a6c3c;await _0xf2eafe[_0x113f33(0x254)](writeFile,TOKEN_CACHE_PATH,JSON[_0x113f33(0x217)](_0x279eb2),{'mode':0x180});}function _0x36c9(){const _0x45e083=['message','389024CgqQOj','OAuth\x20callback\x20timed\x20out\x20after\x202\x20minutes','NcjHd','headers','If\x20the\x20browser\x20doesn\x27t\x20open,\x20visit:\x0a','text/event-stream','tKHLt','iBPRB','code_challenge_method','hzYhE','structuredContent','isTTY','xdg-open','7YdDjbF','\x0aConnecting\x20to\x20MCP\x20auth\x20server:\x20','zjBpx','vAeCf','Requesting\x20CLI\x20token...','tools/call','registration_endpoint','auth-origin.txt','log','get_cli_token\x20failed:\x20','clientId','946800EZajjv','application/json','text','jIesM','14660BhDFsL','YdMpB','hex','refresh.txt','redirect_uri','2.0','expiresAt','</p><p>You\x20can\x20close\x20this\x20window.</p></body></html>','write','2973005Cuhyvb','DExuU','BAbLg','data:','application/json,\x20text/event-stream','DqVaZ','HormO','uBqdg','start','accessToken','zkMuw','1.0.0','now','client_id','xcwjd','searchParams','hRoDv','Not\x20found','VKOFc','access_token','writeHead','/callback','token','\x20done','lgwCk','Run\x20`ranger\x20status`\x20to\x20verify\x20authentication.\x0a','status','Could\x20not\x20fetch\x20protected\x20resource\x20metadata\x20from\x20MCP\x20server','mUamP','BQJST','ugygn','http://localhost:','16110hKGWHv','json','Server\x20returned\x20error:\x20','1495993EHaFXT','stdout','PYNcX','qKgfN','WWHBW','BVWID','MLnJV','stringify','OAuthTimeoutError','name','text/html','No\x20JSON-RPC\x20response\x20found\x20in\x20SSE\x20stream','origin','PjlBa','code','clientSecret','.ranger','oPLfr','6565128EXIIFn','refresh_token','error_description','EhhOJ','dECTr','2242602xVMpAJ','4FFnSFJ','client_secret','proxied','<html><body><h2>Authenticated!</h2><p>You\x20can\x20close\x20this\x20window\x20and\x20return\x20to\x20the\x20terminal.</p></body></html>','set','length','listen','toString','JLLsV','\x0aToken\x20written\x20to\x20','NVhDC','get','error','/.well-known/oauth-authorization-server','HTTP\x20','<html><body><h2>Authentication\x20failed</h2><p>','end','VYVXm','trim','base64url','resource','NNucH','vzXLq','grKjp','QlisK','POST','needs-oauth','platform','uyPps','fxBXD','type','/.well-known/oauth-protected-resource','MCP\x20initialize\x20failed:\x20','NsysF','includes','tNhgy','notifications/initialized','ranger-cli','utf-8','replace','get_cli_token','state','jIUuB','slice','vkmKu','Ranger\x20CLI'];_0x36c9=function(){return _0x45e083;};return _0x36c9();}async function saveCachedClient(_0x23882c,_0x35c42d){const _0x3ba67b=_0x2462a9,_0xab1f39={'QdHMM':function(_0x232295){return _0x232295();},'rXmyK':function(_0x31969e,_0x2fd2db,_0x2b443a,_0xa4920a){return _0x31969e(_0x2fd2db,_0x2b443a,_0xa4920a);}},_0x139dd0=await loadCachedData(),_0x2d420f={..._0x139dd0,'origin':currentOrigin,'accessToken':_0x139dd0?.[_0x3ba67b(0x1f6)]??'','clientId':_0x23882c,'clientSecret':_0x35c42d};await mkdir(join(_0xab1f39['QdHMM'](homedir),'.ranger'),{'recursive':!![]}),await _0xab1f39['rXmyK'](writeFile,TOKEN_CACHE_PATH,JSON['stringify'](_0x2d420f),{'mode':0x180});}async function loadCachedData(){const _0x5b6a62=_0x2462a9,_0x3d107b={'hzYhE':_0x5b6a62(0x24e)};try{return JSON['parse'](await readFile(TOKEN_CACHE_PATH,_0x3d107b[_0x5b6a62(0x1d1)]));}catch{return null;}}async function parseResponse(_0x2f1083){const _0x3f50b2=_0x2462a9,_0x5874ef={'wPeAx':'content-type','KUAwY':_0x3f50b2(0x1cd),'jxcAm':_0x3f50b2(0x21b)},_0x26de29=_0x2f1083[_0x3f50b2(0x1cb)]['get'](_0x5874ef['wPeAx'])??'';if(_0x26de29[_0x3f50b2(0x24a)](_0x5874ef['KUAwY'])){const _0x4b430d=await _0x2f1083[_0x3f50b2(0x1e2)]();for(const _0x28af01 of _0x4b430d['split']('\x0a')){const _0x4813e8=_0x28af01['trim']();if(_0x4813e8['startsWith']('data:')){const _0x3a84d3=_0x4813e8[_0x3f50b2(0x253)](_0x3f50b2(0x1f0)[_0x3f50b2(0x22d)])[_0x3f50b2(0x23a)]();if(!_0x3a84d3)continue;try{const _0x2f047b=JSON['parse'](_0x3a84d3);if(_0x2f047b['id']!==undefined||_0x2f047b['error'])return _0x2f047b;}catch{}}}throw new Error(_0x5874ef['jxcAm']);}return _0x2f1083['json']();}function extractToken(_0x4f4e3a){const _0x117a07=_0x2462a9,_0x542459={'CnKCd':function(_0x5ce2a6,_0x3f42a9){return _0x5ce2a6===_0x3f42a9;},'oCGzv':'Unknown\x20error','TIMVu':_0x117a07(0x1e2)};if(!_0x4f4e3a)return null;const _0x57c97b=_0x4f4e3a[_0x117a07(0x1d2)];if(_0x57c97b?.['token']&&_0x542459['CnKCd'](typeof _0x57c97b[_0x117a07(0x203)],'string'))return _0x57c97b['token'];if(_0x4f4e3a['isError']){const _0x700234=_0x4f4e3a['content'];throw new Error(_0x117a07(0x20f)+(_0x700234?.[0x0]?.[_0x117a07(0x1e2)]??_0x542459['oCGzv']));}const _0x521555=_0x4f4e3a['content'];if(_0x521555)for(const _0x4758a5 of _0x521555){if(_0x542459['CnKCd'](_0x4758a5[_0x117a07(0x246)],_0x542459['TIMVu'])&&_0x4758a5[_0x117a07(0x1e2)]){try{const _0x288b5d=JSON['parse'](_0x4758a5['text']);if(_0x542459['CnKCd'](typeof _0x288b5d?.['token'],'string'))return _0x288b5d['token'];}catch{}const _0x47b666=_0x4758a5[_0x117a07(0x1e2)]['match'](/(rngr_[A-Za-z0-9_-]+)/);if(_0x47b666)return _0x47b666[0x1];}}return null;}
@@ -1 +1 @@
1
- function _0x38f8(){var _0xad8b3f=['Existing\x20sessions\x20in\x20your\x20old\x20<project>/.ranger/\x20dirs\x20still\x20work\x20as\x20a\x0a','500252slvJIa','3997007DReTtd','WXkNx','tWWcu','19938670wMJDJX','2096274SuXQpn','\x20\x20https://docs.ranger.net/main/concepts/profiles\x0a','829191vICrNV','4549970EOYusk','DaFUW','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','6cKHLOg','2rnUifm','fallback;\x20you\x20can\x20delete\x20them\x20once\x20you\x20have\x20re-auth-ed.','oUvhe','303328xgTvul','279mKGOdM'];_0x38f8=function(){return _0xad8b3f;};return _0x38f8();}function _0x55a9(_0x1eb269,_0x38ccb5){_0x1eb269=_0x1eb269-0x106;var _0x38f840=_0x38f8();var _0x55a978=_0x38f840[_0x1eb269];return _0x55a978;}(function(_0x3c124d,_0x308c29){var _0x7f77da=_0x55a9,_0xd4ba23=_0x3c124d();while(!![]){try{var _0x14b4c0=parseInt(_0x7f77da(0x10a))/0x1+-parseInt(_0x7f77da(0x110))/0x2*(-parseInt(_0x7f77da(0x108))/0x3)+-parseInt(_0x7f77da(0x116))/0x4+-parseInt(_0x7f77da(0x10b))/0x5+parseInt(_0x7f77da(0x10f))/0x6*(-parseInt(_0x7f77da(0x117))/0x7)+-parseInt(_0x7f77da(0x113))/0x8*(parseInt(_0x7f77da(0x114))/0x9)+parseInt(_0x7f77da(0x107))/0xa;if(_0x14b4c0===_0x308c29)break;else _0xd4ba23['push'](_0xd4ba23['shift']());}catch(_0x2b60cf){_0xd4ba23['push'](_0xd4ba23['shift']());}}}(_0x38f8,0xb4c0a));export async function migrateProfile(_0x39ad99,_0x2ba022){var _0x2ea85e=_0x55a9,_0x305f6b={'oUvhe':function(_0x2c7678,_0x1faa88){return _0x2c7678+_0x1faa88;},'tWWcu':function(_0x4e714b,_0x3c0a33){return _0x4e714b+_0x3c0a33;},'Zhojr':function(_0x61a128,_0x12ff19){return _0x61a128+_0x12ff19;},'XEvHH':'ranger\x20profile\x20migrate\x20is\x20no\x20longer\x20supported.\x0a','jyWXj':_0x2ea85e(0x10e),'WXkNx':'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','FOLSO':_0x2ea85e(0x109),'DaFUW':_0x2ea85e(0x111)};console['error'](_0x305f6b['oUvhe'](_0x305f6b[_0x2ea85e(0x106)](_0x305f6b[_0x2ea85e(0x112)](_0x305f6b['Zhojr'](_0x305f6b[_0x2ea85e(0x112)](_0x305f6b['XEvHH']+'\x0a',_0x305f6b['jyWXj']),_0x2ea85e(0x10d)),'\x0a'),_0x305f6b[_0x2ea85e(0x118)])+_0x305f6b['FOLSO'],'\x0a')+_0x2ea85e(0x115)+_0x305f6b[_0x2ea85e(0x10c)]),process['exit'](0x1);}
1
+ function _0x412d(_0x2ce50f,_0x132510){_0x2ce50f=_0x2ce50f-0x134;var _0x2c963e=_0x2c96();var _0x412d9a=_0x2c963e[_0x2ce50f];return _0x412d9a;}(function(_0x47c508,_0x57230f){var _0x30239a=_0x412d,_0x4631b5=_0x47c508();while(!![]){try{var _0x1cbc36=-parseInt(_0x30239a(0x13a))/0x1*(-parseInt(_0x30239a(0x143))/0x2)+parseInt(_0x30239a(0x147))/0x3*(parseInt(_0x30239a(0x13e))/0x4)+parseInt(_0x30239a(0x144))/0x5*(-parseInt(_0x30239a(0x134))/0x6)+parseInt(_0x30239a(0x139))/0x7*(-parseInt(_0x30239a(0x140))/0x8)+parseInt(_0x30239a(0x145))/0x9+-parseInt(_0x30239a(0x137))/0xa+-parseInt(_0x30239a(0x142))/0xb*(-parseInt(_0x30239a(0x13f))/0xc);if(_0x1cbc36===_0x57230f)break;else _0x4631b5['push'](_0x4631b5['shift']());}catch(_0xf8690d){_0x4631b5['push'](_0x4631b5['shift']());}}}(_0x2c96,0xaacf7));function _0x2c96(){var _0x56beec=['9806140PqrJPW','mQBvB','7DiVXmH','180bJmaNu','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','QanHq','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','16rNuYCw','37004892TUHcyi','7503128ItMSZM','Existing\x20sessions\x20in\x20your\x20old\x20<project>/.ranger/\x20dirs\x20still\x20work\x20as\x20a\x0a','11cIbCUp','488xljNJf','27890QqmjnB','7498845HRWvQH','error','1182auaztL','EDcHT','1446LomdSV','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','ranger\x20profile\x20migrate\x20is\x20no\x20longer\x20supported.\x0a'];_0x2c96=function(){return _0x56beec;};return _0x2c96();}export async function migrateProfile(_0x30822b,_0x1fc4c2){var _0x3fa364=_0x412d,_0x2a1515={'psEzR':function(_0x466705,_0x2c3f6a){return _0x466705+_0x2c3f6a;},'QanHq':function(_0x1fa62e,_0x257a5a){return _0x1fa62e+_0x257a5a;},'JZBWJ':function(_0x6ed5c7,_0x1f0083){return _0x6ed5c7+_0x1f0083;},'QacDX':function(_0x3b3986,_0x3fb5b7){return _0x3b3986+_0x3fb5b7;},'mQBvB':function(_0x385a3e,_0x46091f){return _0x385a3e+_0x46091f;},'Tgpab':function(_0x4ee4bb,_0x1a97cd){return _0x4ee4bb+_0x1a97cd;},'FzOpT':_0x3fa364(0x136),'EDcHT':_0x3fa364(0x13b),'nkUan':_0x3fa364(0x141)};console[_0x3fa364(0x146)](_0x2a1515['psEzR'](_0x2a1515[_0x3fa364(0x13c)](_0x2a1515['JZBWJ'](_0x2a1515['QacDX'](_0x2a1515[_0x3fa364(0x138)](_0x2a1515['Tgpab'](_0x2a1515['FzOpT'],'\x0a'),_0x2a1515[_0x3fa364(0x148)]),_0x3fa364(0x13d))+'\x0a'+_0x3fa364(0x135),'\x20\x20https://docs.ranger.net/main/concepts/profiles\x0a')+'\x0a',_0x2a1515['nkUan']),'fallback;\x20you\x20can\x20delete\x20them\x20once\x20you\x20have\x20re-auth-ed.')),process['exit'](0x1);}
@@ -1 +1 @@
1
- (function(_0x3b3b67,_0x2d5da5){const _0x31e715=_0x39c3,_0x40c034=_0x3b3b67();while(!![]){try{const _0x5b8d0c=parseInt(_0x31e715(0x1ea))/0x1+parseInt(_0x31e715(0x1c4))/0x2+-parseInt(_0x31e715(0x1ce))/0x3+parseInt(_0x31e715(0x1e6))/0x4*(-parseInt(_0x31e715(0x1b6))/0x5)+parseInt(_0x31e715(0x1d5))/0x6*(-parseInt(_0x31e715(0x1cb))/0x7)+parseInt(_0x31e715(0x1eb))/0x8*(parseInt(_0x31e715(0x1d6))/0x9)+-parseInt(_0x31e715(0x1c3))/0xa*(-parseInt(_0x31e715(0x1dc))/0xb);if(_0x5b8d0c===_0x2d5da5)break;else _0x40c034['push'](_0x40c034['shift']());}catch(_0x48debe){_0x40c034['push'](_0x40c034['shift']());}}}(_0x1b04,0x203f3));import{join}from'path';import{existsSync}from'fs';import _0x13ca24 from'inquirer';import{skillup}from'../skillup.js';function _0x1b04(){const _0x4a8f86=['\x0a📦\x20Claude\x20Code\x20Plugin\x0a','user','kMVcz','ranger','YzvTW','XehVo','123070RyhcaJ','470296irOkEd','bkHsv','✓\x20Marketplace\x20already\x20added','--scope','❌\x20Failed\x20to\x20install\x20plugin:','enable','log','7djdjeS','pHxFH','\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','782433OeiOkc','marketplace','uRONk','EmOIG','User\x20(available\x20in\x20all\x20your\x20projects)','PuQtV','dHEBF','573894cCPwVK','4131cIltxy','pluginScope','\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20','Would\x20you\x20like\x20to\x20install\x20skills?','already\x20enabled','\x20level)...\x0a','143bJcsHE','WgexA','.claude','WANdM','btrPq','nRMkF','list','GzGpW','ranger@trailhead','error','292764XBKbJg','✓\x20Claude\x20Code\x20plugin\x20enabled','push','❌\x20Failed\x20to\x20add\x20marketplace:','51806pneTtN','4552lTZbCw','\x0aInstalling\x20Claude\x20Code\x20plugin\x20(','15FjJBCM','project','\x0aYou\x20can\x20install\x20manually\x20with:','ranger-testing/trailhead','⚠\x20Failed\x20to\x20enable\x20plugin:','DzLUi','SKILL.md'];_0x1b04=function(){return _0x4a8f86;};return _0x1b04();}function _0x39c3(_0x2ddd84,_0xd05a6c){_0x2ddd84=_0x2ddd84-0x1b6;const _0x1b043f=_0x1b04();let _0x39c353=_0x1b043f[_0x2ddd84];return _0x39c353;}import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'../utils/claudePlugin.js';import{getProjectRoot,getSkillsDir}from'../utils/claudeConfig.js';export async function ensureClaudePlugin(_0x266dd7){const _0x1a4069=_0x39c3,_0x5253ca={'BuJJk':'✓\x20Claude\x20Code\x20plugin\x20already\x20installed','EmOIG':function(_0x402b13,_0x584204){return _0x402b13(_0x584204);},'DzLUi':function(_0x493ec7,_0x55db94,_0x1c1fbb){return _0x493ec7(_0x55db94,_0x1c1fbb);},'PuQtV':function(_0x4ab5a9){return _0x4ab5a9();},'uRONk':'.claude','nRMkF':_0x1a4069(0x1b7),'dHEBF':_0x1a4069(0x1bd),'GzGpW':_0x1a4069(0x1be),'abmCF':'trailhead','pHxFH':_0x1a4069(0x1c6),'kYqKt':_0x1a4069(0x1cf),'WANdM':'add','YzvTW':_0x1a4069(0x1b9),'BKkAK':'install','btrPq':'ranger@trailhead','XehVo':_0x1a4069(0x1c7),'WgexA':function(_0x1a0ea0,_0x500801){return _0x1a0ea0===_0x500801;},'ZFnfd':_0x1a4069(0x1c8),'jsQkB':'✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully','BZJGG':'plugin','IAIaI':_0x1a4069(0x1ba)},_0x690234=await isPluginInstalled(_0x1a4069(0x1e4));if(_0x690234)return console['log'](_0x5253ca['BuJJk']),![];const _0x2da6b9=_0x5253ca[_0x1a4069(0x1d1)](existsSync,_0x5253ca[_0x1a4069(0x1bb)](join,_0x5253ca[_0x1a4069(0x1d3)](getProjectRoot),_0x5253ca[_0x1a4069(0x1d0)]));let _0x4165f8;if(_0x266dd7)_0x4165f8=_0x266dd7;else{if(_0x2da6b9)_0x4165f8=_0x5253ca[_0x1a4069(0x1e1)];else{console[_0x1a4069(0x1ca)](_0x5253ca[_0x1a4069(0x1d4)]);const _0x5450dd=await _0x13ca24['prompt']([{'type':_0x1a4069(0x1e2),'name':'pluginScope','message':'Where\x20should\x20the\x20plugin\x20be\x20installed?','choices':[{'name':_0x1a4069(0x1d2),'value':_0x5253ca['GzGpW']},{'name':'Project\x20(shared\x20with\x20team\x20via\x20git)','value':'project'}],'default':_0x5253ca[_0x1a4069(0x1e3)]}]);_0x4165f8=_0x5450dd[_0x1a4069(0x1d7)];}}console[_0x1a4069(0x1ca)](_0x1a4069(0x1ec)+_0x4165f8+_0x1a4069(0x1db));const _0x158bc6=await isMarketplaceAdded(_0x5253ca['abmCF']);let _0x3fe124=_0x158bc6;if(_0x158bc6)console[_0x1a4069(0x1ca)](_0x5253ca[_0x1a4069(0x1cc)]);else{const _0x49f2e8=await _0x5253ca['EmOIG'](runClaudeCommand,['plugin',_0x5253ca['kYqKt'],_0x5253ca[_0x1a4069(0x1df)],_0x5253ca[_0x1a4069(0x1c1)]]);!_0x49f2e8['success']?(console[_0x1a4069(0x1e5)](_0x1a4069(0x1e9),_0x49f2e8['error']),console[_0x1a4069(0x1ca)]('\x0aYou\x20can\x20install\x20manually\x20with:'),console['log'](_0x1a4069(0x1cd)),console[_0x1a4069(0x1ca)]('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0x4165f8)):_0x3fe124=!![];}if(_0x3fe124){const _0x4428d1=await _0x5253ca[_0x1a4069(0x1bb)](runClaudeCommand,['plugin',_0x5253ca['BKkAK'],_0x5253ca[_0x1a4069(0x1e0)],_0x5253ca[_0x1a4069(0x1c2)],_0x4165f8],{'cwd':_0x5253ca[_0x1a4069(0x1dd)](_0x4165f8,'project')?getProjectRoot():undefined});if(!_0x4428d1['success'])console[_0x1a4069(0x1e5)](_0x5253ca['ZFnfd'],_0x4428d1['error']),console['log'](_0x1a4069(0x1b8)),console[_0x1a4069(0x1ca)](_0x1a4069(0x1d8)+_0x4165f8);else{console[_0x1a4069(0x1ca)](_0x5253ca['jsQkB']);const _0x3e0545=[_0x5253ca['BZJGG'],_0x1a4069(0x1c9),_0x5253ca['btrPq']];_0x5253ca[_0x1a4069(0x1dd)](_0x4165f8,_0x5253ca[_0x1a4069(0x1e1)])&&_0x3e0545[_0x1a4069(0x1e8)](_0x1a4069(0x1c7),_0x1a4069(0x1b7));const _0x56d26e=await _0x5253ca[_0x1a4069(0x1bb)](runClaudeCommand,_0x3e0545,{'captureOutput':!![],'cwd':_0x4165f8===_0x5253ca[_0x1a4069(0x1e1)]?getProjectRoot():undefined}),_0xfe56a2=_0x56d26e['output']?.['includes'](_0x1a4069(0x1da));!_0x56d26e['success']&&!_0xfe56a2?console[_0x1a4069(0x1e5)](_0x5253ca['IAIaI'],_0x56d26e['error']):console['log'](_0x1a4069(0x1e7));}}return!![];}export async function ensureClaudeSkills(_0x134353){const _0x40af1e=_0x39c3,_0x511a0a={'vdsMo':function(_0x5abfd5,_0x130eb1,_0xb8c7fd,_0x31cf89){return _0x5abfd5(_0x130eb1,_0xb8c7fd,_0x31cf89);},'kMVcz':function(_0x1b2eec,_0x357de7){return _0x1b2eec(_0x357de7);},'dHaxu':_0x40af1e(0x1c0),'lwulF':function(_0x5b9274,_0x47b6f5){return _0x5b9274(_0x47b6f5);},'bkHsv':_0x40af1e(0x1b7),'HSdls':function(_0x4aa918,_0x424f5c){return _0x4aa918||_0x424f5c;},'ytckv':'✓\x20Ranger\x20skills\x20already\x20installed','AgTEc':_0x40af1e(0x1de),'XVgRQ':'wantsSkillup','fZOKH':function(_0x810f4a,_0x506373){return _0x810f4a(_0x506373);}},_0x6c8d65=existsSync(_0x511a0a['vdsMo'](join,_0x511a0a['kMVcz'](getSkillsDir,'user'),_0x511a0a['dHaxu'],_0x40af1e(0x1bc))),_0x15335d=_0x511a0a['lwulF'](existsSync,_0x511a0a['vdsMo'](join,getSkillsDir(_0x511a0a[_0x40af1e(0x1c5)]),'ranger',_0x40af1e(0x1bc)));if(_0x511a0a['HSdls'](_0x6c8d65,_0x15335d))return console[_0x40af1e(0x1ca)](_0x511a0a['ytckv']),![];const _0x475cba=existsSync(join(getProjectRoot(),_0x511a0a['AgTEc']));let _0x2619b1=!![];if(_0x134353)await _0x511a0a[_0x40af1e(0x1bf)](skillup,{'autoInstall':_0x134353,'suppressUsage':!![]});else{if(_0x475cba)await skillup({'autoInstall':_0x40af1e(0x1b7),'suppressUsage':!![]});else{const _0x5b3936=await _0x13ca24['prompt']([{'type':'confirm','name':_0x511a0a['XVgRQ'],'message':_0x40af1e(0x1d9),'default':!![]}]);_0x2619b1=_0x5b3936['wantsSkillup'],_0x2619b1&&await _0x511a0a['fZOKH'](skillup,{'suppressUsage':!![]});}}return _0x2619b1;}
1
+ (function(_0x4fd2e0,_0x5ce945){const _0x5c7578=_0x4f86,_0x49fd9b=_0x4fd2e0();while(!![]){try{const _0x3a40d1=parseInt(_0x5c7578(0x1bd))/0x1+-parseInt(_0x5c7578(0x1c2))/0x2+parseInt(_0x5c7578(0x1d3))/0x3*(-parseInt(_0x5c7578(0x1ab))/0x4)+parseInt(_0x5c7578(0x1d0))/0x5+parseInt(_0x5c7578(0x1c6))/0x6*(parseInt(_0x5c7578(0x1aa))/0x7)+-parseInt(_0x5c7578(0x1ba))/0x8+parseInt(_0x5c7578(0x1a7))/0x9;if(_0x3a40d1===_0x5ce945)break;else _0x49fd9b['push'](_0x49fd9b['shift']());}catch(_0x3858d7){_0x49fd9b['push'](_0x49fd9b['shift']());}}}(_0x49dd,0x8f34e));import{join}from'path';import{existsSync}from'fs';import _0x3c450f from'inquirer';import{skillup}from'../skillup.js';function _0x4f86(_0x20db23,_0x55c165){_0x20db23=_0x20db23-0x1a7;const _0x49dd1c=_0x49dd();let _0x4f86fc=_0x49dd1c[_0x20db23];return _0x4f86fc;}import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'../utils/claudePlugin.js';import{getProjectRoot,getSkillsDir}from'../utils/claudeConfig.js';export async function ensureClaudePlugin(_0xd133c3){const _0x5746c8=_0x4f86,_0x2592e8={'LUFdv':function(_0xc42228,_0x1895da,_0x467c2f){return _0xc42228(_0x1895da,_0x467c2f);},'iDCmJ':function(_0x44b491){return _0x44b491();},'bQwCn':'project','aLSVY':_0x5746c8(0x1b7),'fNLwm':_0x5746c8(0x1b4),'wnOvz':_0x5746c8(0x1cd),'lLYZe':_0x5746c8(0x1ac),'siZJk':_0x5746c8(0x1b8),'caCuf':'user','pPpxR':'Project\x20(shared\x20with\x20team\x20via\x20git)','nbYwv':function(_0x3ec112,_0x2b712f){return _0x3ec112(_0x2b712f);},'ByWXs':'trailhead','EjIwy':'✓\x20Marketplace\x20already\x20added','bqHbu':function(_0x115793,_0x3415d7){return _0x115793(_0x3415d7);},'YkPwF':'marketplace','xMGKX':_0x5746c8(0x1c7),'uxZgz':_0x5746c8(0x1c0),'wIZUj':'\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','sPhRb':'plugin','qhDHl':'ranger@trailhead','WCQYW':'--scope','MbaWo':function(_0x3e3080,_0x172dfe){return _0x3e3080===_0x172dfe;},'sPEAX':'enable','ltphN':'⚠\x20Failed\x20to\x20enable\x20plugin:'},_0x4511c2=await isPluginInstalled(_0x5746c8(0x1bb));if(_0x4511c2)return console['log'](_0x5746c8(0x1cc)),![];const _0x420c71=existsSync(_0x2592e8['LUFdv'](join,_0x2592e8['iDCmJ'](getProjectRoot),_0x5746c8(0x1c4)));let _0x1642e1;if(_0xd133c3)_0x1642e1=_0xd133c3;else{if(_0x420c71)_0x1642e1=_0x2592e8[_0x5746c8(0x1a9)];else{console[_0x5746c8(0x1ad)](_0x2592e8['aLSVY']);const _0x533250=await _0x3c450f['prompt']([{'type':_0x2592e8[_0x5746c8(0x1c1)],'name':_0x2592e8[_0x5746c8(0x1c3)],'message':_0x2592e8[_0x5746c8(0x1a8)],'choices':[{'name':_0x2592e8[_0x5746c8(0x1cf)],'value':_0x2592e8[_0x5746c8(0x1c9)]},{'name':_0x2592e8['pPpxR'],'value':_0x2592e8[_0x5746c8(0x1a9)]}],'default':_0x2592e8[_0x5746c8(0x1c9)]}]);_0x1642e1=_0x533250[_0x5746c8(0x1cd)];}}console['log']('\x0aInstalling\x20Claude\x20Code\x20plugin\x20('+_0x1642e1+'\x20level)...\x0a');const _0x5842ad=await _0x2592e8['nbYwv'](isMarketplaceAdded,_0x2592e8['ByWXs']);let _0x41c8f0=_0x5842ad;if(_0x5842ad)console[_0x5746c8(0x1ad)](_0x2592e8['EjIwy']);else{const _0x2f3233=await _0x2592e8[_0x5746c8(0x1d8)](runClaudeCommand,['plugin',_0x2592e8['YkPwF'],_0x2592e8[_0x5746c8(0x1ca)],'ranger-testing/trailhead']);!_0x2f3233[_0x5746c8(0x1d7)]?(console[_0x5746c8(0x1be)](_0x2592e8[_0x5746c8(0x1d1)],_0x2f3233[_0x5746c8(0x1be)]),console['log'](_0x5746c8(0x1d2)),console['log'](_0x2592e8['wIZUj']),console['log'](_0x5746c8(0x1b2)+_0x1642e1)):_0x41c8f0=!![];}if(_0x41c8f0){const _0x57ee79=await runClaudeCommand([_0x2592e8[_0x5746c8(0x1b6)],'install',_0x2592e8[_0x5746c8(0x1d5)],_0x2592e8[_0x5746c8(0x1af)],_0x1642e1],{'cwd':_0x2592e8[_0x5746c8(0x1cb)](_0x1642e1,_0x2592e8['bQwCn'])?_0x2592e8['iDCmJ'](getProjectRoot):undefined});if(!_0x57ee79[_0x5746c8(0x1d7)])console['error']('❌\x20Failed\x20to\x20install\x20plugin:',_0x57ee79['error']),console[_0x5746c8(0x1ad)](_0x5746c8(0x1d2)),console['log'](_0x5746c8(0x1b2)+_0x1642e1);else{console[_0x5746c8(0x1ad)]('✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully');const _0x345987=[_0x2592e8['sPhRb'],_0x2592e8[_0x5746c8(0x1bc)],_0x5746c8(0x1bb)];_0x2592e8[_0x5746c8(0x1cb)](_0x1642e1,_0x2592e8['bQwCn'])&&_0x345987[_0x5746c8(0x1bf)]('--scope','project');const _0x3e678d=await runClaudeCommand(_0x345987,{'captureOutput':!![],'cwd':_0x1642e1==='project'?_0x2592e8['iDCmJ'](getProjectRoot):undefined}),_0x156377=_0x3e678d[_0x5746c8(0x1ce)]?.['includes']('already\x20enabled');!_0x3e678d[_0x5746c8(0x1d7)]&&!_0x156377?console['error'](_0x2592e8[_0x5746c8(0x1d6)],_0x3e678d[_0x5746c8(0x1be)]):console[_0x5746c8(0x1ad)]('✓\x20Claude\x20Code\x20plugin\x20enabled');}}return!![];}export async function ensureClaudeSkills(_0xc760de){const _0x12e614=_0x4f86,_0x5b2aa9={'nCVdq':function(_0x4ef6c5,_0x3127e4){return _0x4ef6c5(_0x3127e4);},'tjGDj':function(_0x452dd4,_0x1fdd30){return _0x452dd4(_0x1fdd30);},'ctiDs':'ranger','GFmbl':_0x12e614(0x1b0),'vwxhy':function(_0x4388ce,_0x4194e4,_0x21565e,_0x598c9e){return _0x4388ce(_0x4194e4,_0x21565e,_0x598c9e);},'HDLUD':function(_0x25dd22,_0x1dc259){return _0x25dd22||_0x1dc259;},'GMyEm':_0x12e614(0x1d4),'Smsts':function(_0x225536,_0x2f297f){return _0x225536(_0x2f297f);},'dNTfp':function(_0x188001,_0x2a0181,_0x301294){return _0x188001(_0x2a0181,_0x301294);},'FBTWa':'.claude','BjXDY':function(_0x44bfee,_0x4b1239){return _0x44bfee(_0x4b1239);}},_0x76c51e=_0x5b2aa9['nCVdq'](existsSync,join(_0x5b2aa9[_0x12e614(0x1b5)](getSkillsDir,'user'),_0x5b2aa9[_0x12e614(0x1b1)],_0x5b2aa9['GFmbl'])),_0x11450d=existsSync(_0x5b2aa9[_0x12e614(0x1b3)](join,getSkillsDir(_0x12e614(0x1c8)),_0x5b2aa9['ctiDs'],_0x5b2aa9['GFmbl']));if(_0x5b2aa9[_0x12e614(0x1c5)](_0x76c51e,_0x11450d))return console['log'](_0x5b2aa9[_0x12e614(0x1b9)]),![];const _0x3cd828=_0x5b2aa9['Smsts'](existsSync,_0x5b2aa9['dNTfp'](join,getProjectRoot(),_0x5b2aa9['FBTWa']));let _0x594fa8=!![];if(_0xc760de)await skillup({'autoInstall':_0xc760de,'suppressUsage':!![]});else{if(_0x3cd828)await _0x5b2aa9['BjXDY'](skillup,{'autoInstall':_0x12e614(0x1c8),'suppressUsage':!![]});else{const _0x446241=await _0x3c450f['prompt']([{'type':'confirm','name':_0x12e614(0x1ae),'message':'Would\x20you\x20like\x20to\x20install\x20skills?','default':!![]}]);_0x594fa8=_0x446241['wantsSkillup'],_0x594fa8&&await _0x5b2aa9['nCVdq'](skillup,{'suppressUsage':!![]});}}return _0x594fa8;}function _0x49dd(){const _0x18f6a2=['vwxhy','list','tjGDj','sPhRb','\x0a📦\x20Claude\x20Code\x20Plugin\x0a','User\x20(available\x20in\x20all\x20your\x20projects)','GMyEm','9144152TUUYAc','ranger@trailhead','sPEAX','1167819wMWpxo','error','push','❌\x20Failed\x20to\x20add\x20marketplace:','fNLwm','349444tdgUyJ','wnOvz','.claude','HDLUD','3126deBdmV','add','project','caCuf','xMGKX','MbaWo','✓\x20Claude\x20Code\x20plugin\x20already\x20installed','pluginScope','output','siZJk','850465elnWah','uxZgz','\x0aYou\x20can\x20install\x20manually\x20with:','35409NpIEIc','✓\x20Ranger\x20skills\x20already\x20installed','qhDHl','ltphN','success','bqHbu','3241881gjRsTQ','lLYZe','bQwCn','12761QrBMiz','252kppmzU','Where\x20should\x20the\x20plugin\x20be\x20installed?','log','wantsSkillup','WCQYW','SKILL.md','ctiDs','\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'];_0x49dd=function(){return _0x18f6a2;};return _0x49dd();}
@@ -1 +1 @@
1
- (function(_0x17be11,_0x1b0e4d){const _0x326a55=_0x396f,_0x54a3cd=_0x17be11();while(!![]){try{const _0x435fee=parseInt(_0x326a55(0x1c5))/0x1+parseInt(_0x326a55(0x1c9))/0x2+parseInt(_0x326a55(0x1cc))/0x3+parseInt(_0x326a55(0x1c2))/0x4*(-parseInt(_0x326a55(0x1b8))/0x5)+parseInt(_0x326a55(0x1d4))/0x6*(-parseInt(_0x326a55(0x1d6))/0x7)+parseInt(_0x326a55(0x1c0))/0x8*(-parseInt(_0x326a55(0x1c6))/0x9)+parseInt(_0x326a55(0x1cf))/0xa;if(_0x435fee===_0x1b0e4d)break;else _0x54a3cd['push'](_0x54a3cd['shift']());}catch(_0x42ecb7){_0x54a3cd['push'](_0x54a3cd['shift']());}}}(_0x443c,0xbdc14));import{join}from'path';function _0x443c(){const _0x6b0390=['WWvik','user','406650VxNZNO','opencode.json','133fIDVBg','project','wBAKD','15FRmwMA','plugin','$schema','OljVw','list','log','sYKTj','UzIMZ','441776MOlbWq','oxMry','772764ntdDOk','Failed\x20to\x20read\x20opencode.json','cZFxm','878885VrBkza','117KPluLB','utf-8','https://opencode.ai/config.json','991188OTyPbV','✓\x20OpenCode\x20plugin\x20configured','isArray','3161253ilIsyH','pluginScope','parse','9341900OjVqez','ulbtW','JJNRr'];_0x443c=function(){return _0x6b0390;};return _0x443c();}function _0x396f(_0x2653f6,_0x1f6d1c){_0x2653f6=_0x2653f6-0x1b7;const _0x443cc9=_0x443c();let _0x396f45=_0x443cc9[_0x2653f6];return _0x396f45;}import{existsSync}from'fs';import{mkdir,readFile,writeFile}from'fs/promises';import _0x278dd7 from'inquirer';import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';export async function ensureOpencodePluginConfig(_0x1f2496){const _0x2bc089=_0x396f,_0x15ce26={'ulbtW':function(_0x30b236,_0x589d8a,_0x47948a){return _0x30b236(_0x589d8a,_0x47948a);},'JJNRr':function(_0x287b1b,_0x5368fb){return _0x287b1b(_0x5368fb);},'tIHvX':'opencode.json','Quvxm':_0x2bc089(0x1bc),'cZFxm':'pluginScope','ZWenV':'Where\x20should\x20the\x20plugin\x20be\x20installed?','oxMry':'User\x20(available\x20in\x20all\x20your\x20projects)','wtDHi':function(_0x2742d5,_0x5b0962,_0x402cb1){return _0x2742d5(_0x5b0962,_0x402cb1);},'wBAKD':'@ranger-testing/opencode-plugin','OljVw':_0x2bc089(0x1c8),'WWvik':_0x2bc089(0x1c7),'UzIMZ':'⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.','AODuJ':_0x2bc089(0x1c3),'sYKTj':_0x2bc089(0x1ca)},_0x1982d0=existsSync(_0x15ce26[_0x2bc089(0x1d0)](join,_0x15ce26[_0x2bc089(0x1d1)](getOpencodeConfigDir,_0x2bc089(0x1d7)),_0x15ce26['tIHvX']));let _0x35a9d8;if(_0x1f2496)_0x35a9d8=_0x1f2496;else{if(_0x1982d0)_0x35a9d8='project';else{console['log']('\x0a📦\x20OpenCode\x20Plugin\x0a');const _0x576bdf=await _0x278dd7['prompt']([{'type':_0x15ce26['Quvxm'],'name':_0x15ce26[_0x2bc089(0x1c4)],'message':_0x15ce26['ZWenV'],'choices':[{'name':_0x15ce26[_0x2bc089(0x1c1)],'value':_0x2bc089(0x1d3)},{'name':'Project\x20(shared\x20with\x20team\x20via\x20git)','value':_0x2bc089(0x1d7)}],'default':_0x2bc089(0x1d3)}]);_0x35a9d8=_0x576bdf[_0x2bc089(0x1cd)];}}const _0x405347=_0x15ce26['wtDHi'](join,_0x15ce26[_0x2bc089(0x1d1)](getOpencodeConfigDir,_0x35a9d8),_0x2bc089(0x1d5)),_0x525336=_0x15ce26[_0x2bc089(0x1b7)],_0x4a7b22=_0x15ce26[_0x2bc089(0x1bb)];let _0x7631ec={};if(_0x15ce26[_0x2bc089(0x1d1)](existsSync,_0x405347))try{const _0x2983dd=await _0x15ce26['ulbtW'](readFile,_0x405347,_0x15ce26[_0x2bc089(0x1d2)]);_0x7631ec=JSON[_0x2bc089(0x1ce)](_0x2983dd);}catch(_0x33b19d){return console['error'](_0x15ce26[_0x2bc089(0x1bf)]),{'configured':![],'scope':_0x35a9d8,'error':_0x15ce26['AODuJ'],'details':_0x33b19d};}const _0xdaeead=Array[_0x2bc089(0x1cb)](_0x7631ec['plugin'])?_0x7631ec[_0x2bc089(0x1b9)]:[];if(_0xdaeead['includes'](_0x525336))return console[_0x2bc089(0x1bd)]('✓\x20OpenCode\x20plugin\x20already\x20configured'),{'configured':![],'scope':_0x35a9d8};return _0x7631ec[_0x2bc089(0x1ba)]=_0x7631ec['$schema']||_0x4a7b22,_0x7631ec[_0x2bc089(0x1b9)]=[..._0xdaeead,_0x525336],await mkdir(getOpencodeConfigDir(_0x35a9d8),{'recursive':!![]}),await _0x15ce26['wtDHi'](writeFile,_0x405347,JSON['stringify'](_0x7631ec,null,0x2)+'\x0a'),console[_0x2bc089(0x1bd)](_0x15ce26[_0x2bc089(0x1be)]),{'configured':!![],'scope':_0x35a9d8};}
1
+ (function(_0x212b31,_0x4c81ed){const _0x599841=_0x4842,_0x5146c7=_0x212b31();while(!![]){try{const _0x2a54c3=-parseInt(_0x599841(0xb1))/0x1*(-parseInt(_0x599841(0x9c))/0x2)+-parseInt(_0x599841(0xa6))/0x3+-parseInt(_0x599841(0xac))/0x4+-parseInt(_0x599841(0xb7))/0x5*(parseInt(_0x599841(0xad))/0x6)+parseInt(_0x599841(0xa0))/0x7+-parseInt(_0x599841(0xa8))/0x8+parseInt(_0x599841(0xa5))/0x9;if(_0x2a54c3===_0x4c81ed)break;else _0x5146c7['push'](_0x5146c7['shift']());}catch(_0xb7f761){_0x5146c7['push'](_0x5146c7['shift']());}}}(_0x523b,0x6f93b));import{join}from'path';import{existsSync}from'fs';function _0x523b(){const _0x106e6a=['1804732IhJQyc','2407386oOyhZD','$schema','opencode.json','user','1NhxnXo','includes','list','abifU','✓\x20OpenCode\x20plugin\x20already\x20configured','VnRFx','5DdQsxn','pluginScope','prompt','log','KKadT','plugin','Failed\x20to\x20read\x20opencode.json','parse','https://opencode.ai/config.json','1269994dgTXBT','isArray','⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.','stringify','1386322OmVbOY','TlrHj','project','\x0a📦\x20OpenCode\x20Plugin\x0a','dIUZi','11583180BuYSEE','1630737JhWoOI','✓\x20OpenCode\x20plugin\x20configured','2136408ausevu','egOqO','@ranger-testing/opencode-plugin','phMxo'];_0x523b=function(){return _0x106e6a;};return _0x523b();}import{mkdir,readFile,writeFile}from'fs/promises';import _0x270e52 from'inquirer';function _0x4842(_0x14c31d,_0x5ce0b5){_0x14c31d=_0x14c31d-0x95;const _0x523b56=_0x523b();let _0x48428b=_0x523b56[_0x14c31d];return _0x48428b;}import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';export async function ensureOpencodePluginConfig(_0xa7e799){const _0x4b6197=_0x4842,_0x4bc5da={'egOqO':_0x4b6197(0xa2),'KKadT':_0x4b6197(0xa3),'TlrHj':_0x4b6197(0xb3),'dIUZi':'User\x20(available\x20in\x20all\x20your\x20projects)','VnRFx':_0x4b6197(0xb0),'EInyY':'Project\x20(shared\x20with\x20team\x20via\x20git)','phMxo':function(_0x18e37f,_0x57e8e0,_0x5427c7){return _0x18e37f(_0x57e8e0,_0x5427c7);},'abifU':function(_0x57a19c,_0x9a4d87){return _0x57a19c(_0x9a4d87);},'oHmCw':_0x4b6197(0x99),'XGJZi':_0x4b6197(0xb5),'hZkSi':function(_0x1e6ce5,_0x57e450){return _0x1e6ce5(_0x57e450);},'VYIua':function(_0x1f8280,_0x4ad18c){return _0x1f8280+_0x4ad18c;},'ggIHY':_0x4b6197(0xa7)},_0x4ac74d=existsSync(join(getOpencodeConfigDir(_0x4bc5da[_0x4b6197(0xa9)]),'opencode.json'));let _0xdfd507;if(_0xa7e799)_0xdfd507=_0xa7e799;else{if(_0x4ac74d)_0xdfd507=_0x4bc5da['egOqO'];else{console[_0x4b6197(0x96)](_0x4bc5da[_0x4b6197(0x97)]);const _0x2e920b=await _0x270e52[_0x4b6197(0x95)]([{'type':_0x4bc5da[_0x4b6197(0xa1)],'name':_0x4b6197(0xb8),'message':'Where\x20should\x20the\x20plugin\x20be\x20installed?','choices':[{'name':_0x4bc5da[_0x4b6197(0xa4)],'value':_0x4bc5da[_0x4b6197(0xb6)]},{'name':_0x4bc5da['EInyY'],'value':_0x4bc5da['egOqO']}],'default':'user'}]);_0xdfd507=_0x2e920b[_0x4b6197(0xb8)];}}const _0x5c2c7c=_0x4bc5da['phMxo'](join,getOpencodeConfigDir(_0xdfd507),_0x4b6197(0xaf)),_0x4dd878=_0x4b6197(0xaa),_0x54c2c5=_0x4b6197(0x9b);let _0x1c3803={};if(_0x4bc5da[_0x4b6197(0xb4)](existsSync,_0x5c2c7c))try{const _0x2c5c1b=await _0x4bc5da[_0x4b6197(0xab)](readFile,_0x5c2c7c,'utf-8');_0x1c3803=JSON[_0x4b6197(0x9a)](_0x2c5c1b);}catch(_0x55aa53){return console['error'](_0x4b6197(0x9e)),{'configured':![],'scope':_0xdfd507,'error':_0x4bc5da['oHmCw'],'details':_0x55aa53};}const _0x37f94c=Array[_0x4b6197(0x9d)](_0x1c3803[_0x4b6197(0x98)])?_0x1c3803['plugin']:[];if(_0x37f94c[_0x4b6197(0xb2)](_0x4dd878))return console['log'](_0x4bc5da['XGJZi']),{'configured':![],'scope':_0xdfd507};return _0x1c3803[_0x4b6197(0xae)]=_0x1c3803['$schema']||_0x54c2c5,_0x1c3803[_0x4b6197(0x98)]=[..._0x37f94c,_0x4dd878],await mkdir(_0x4bc5da['hZkSi'](getOpencodeConfigDir,_0xdfd507),{'recursive':!![]}),await writeFile(_0x5c2c7c,_0x4bc5da['VYIua'](JSON[_0x4b6197(0x9f)](_0x1c3803,null,0x2),'\x0a')),console['log'](_0x4bc5da['ggIHY']),{'configured':!![],'scope':_0xdfd507};}
@@ -1 +1 @@
1
- function _0x4a45(_0x35e11e,_0x3abd01){_0x35e11e=_0x35e11e-0x12a;var _0x3d62e6=_0x3d62();var _0x4a45e2=_0x3d62e6[_0x35e11e];return _0x4a45e2;}function _0x3d62(){var _0x3a55f4=['28Dcmolt','ranger\x20setup\x20--ci\x20writes\x20to\x20the\x20legacy\x20.ranger/ci/\x20tree\x20which\x20is\x20no\x20longer\x20supported.\x0a','175266nGQkbn','error','75126zjsFZs','24BSsLpY','1956376Qrrzwa','12461295YECWAB','\x20\x20https://docs.ranger.net/main/concepts/profiles','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','24eeVYye','635AfQZcb','50aKTbpD','189cvbUVh','EmxuV','40374sYxLFQ','642740WwbquA','exit','33869966upXrmC','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a'];_0x3d62=function(){return _0x3a55f4;};return _0x3d62();}(function(_0x5ab2bb,_0x159914){var _0x5dde48=_0x4a45,_0x1a4429=_0x5ab2bb();while(!![]){try{var _0x58377f=-parseInt(_0x5dde48(0x12b))/0x1*(-parseInt(_0x5dde48(0x13c))/0x2)+parseInt(_0x5dde48(0x132))/0x3*(-parseInt(_0x5dde48(0x13a))/0x4)+-parseInt(_0x5dde48(0x13b))/0x5*(parseInt(_0x5dde48(0x134))/0x6)+parseInt(_0x5dde48(0x130))/0x7*(-parseInt(_0x5dde48(0x136))/0x8)+-parseInt(_0x5dde48(0x13d))/0x9*(parseInt(_0x5dde48(0x12c))/0xa)+-parseInt(_0x5dde48(0x137))/0xb+-parseInt(_0x5dde48(0x135))/0xc*(-parseInt(_0x5dde48(0x12e))/0xd);if(_0x58377f===_0x159914)break;else _0x1a4429['push'](_0x1a4429['shift']());}catch(_0x33a089){_0x1a4429['push'](_0x1a4429['shift']());}}}(_0x3d62,0xc7dc4));export async function setupCi(_0x4dc5e7,_0xc280f4,_0x15f48c){var _0x171760=_0x4a45,_0x86f057={'EmxuV':function(_0x5445d5,_0xe6e416){return _0x5445d5+_0xe6e416;},'jEYKC':function(_0x1be99f,_0x5f49c0){return _0x1be99f+_0x5f49c0;},'HBrdM':_0x171760(0x12f),'SPwFf':'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','WENzX':_0x171760(0x138)};console[_0x171760(0x133)](_0x86f057['EmxuV'](_0x86f057[_0x171760(0x12a)](_0x86f057['jEYKC'](_0x171760(0x131)+'\x0a'+_0x86f057['HBrdM']+_0x86f057['SPwFf'],'\x0a'),_0x171760(0x139)),_0x86f057['WENzX'])),process[_0x171760(0x12d)](0x1);}
1
+ (function(_0x2ecff8,_0x1d2791){var _0x28fa2f=_0x50fb,_0x498979=_0x2ecff8();while(!![]){try{var _0x1c15e5=parseInt(_0x28fa2f(0xe4))/0x1*(parseInt(_0x28fa2f(0xdc))/0x2)+-parseInt(_0x28fa2f(0xde))/0x3+parseInt(_0x28fa2f(0xea))/0x4*(parseInt(_0x28fa2f(0xdf))/0x5)+parseInt(_0x28fa2f(0xec))/0x6+-parseInt(_0x28fa2f(0xeb))/0x7+-parseInt(_0x28fa2f(0xe5))/0x8*(-parseInt(_0x28fa2f(0xe3))/0x9)+-parseInt(_0x28fa2f(0xe6))/0xa;if(_0x1c15e5===_0x1d2791)break;else _0x498979['push'](_0x498979['shift']());}catch(_0x360902){_0x498979['push'](_0x498979['shift']());}}}(_0x4399,0x514ec));function _0x4399(){var _0x3a87c3=['2100366Ksgcuf','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','292eXQWpF','XtCJF','309462YvIzqO','155uoQTfK','exit','SdVRq','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','5058cERnxg','1009SrTddm','6208Abxubm','6548100zRKVkQ','QKtGR','\x20\x20https://docs.ranger.net/main/concepts/profiles','error','54508bFjprd','1854468bXLRMN'];_0x4399=function(){return _0x3a87c3;};return _0x4399();}function _0x50fb(_0x4e0901,_0x478699){_0x4e0901=_0x4e0901-0xdb;var _0x439917=_0x4399();var _0x50fbf0=_0x439917[_0x4e0901];return _0x50fbf0;}export async function setupCi(_0x34ca95,_0x31da5c,_0x141662){var _0x4aa386=_0x50fb,_0x70ce62={'XtCJF':function(_0xa0c097,_0x3bcfd6){return _0xa0c097+_0x3bcfd6;},'QKtGR':function(_0xb78b4f,_0x40d4d9){return _0xb78b4f+_0x40d4d9;},'SdVRq':_0x4aa386(0xe2)};console[_0x4aa386(0xe9)](_0x70ce62[_0x4aa386(0xdd)](_0x70ce62[_0x4aa386(0xdd)](_0x70ce62[_0x4aa386(0xe7)]('ranger\x20setup\x20--ci\x20writes\x20to\x20the\x20legacy\x20.ranger/ci/\x20tree\x20which\x20is\x20no\x20longer\x20supported.\x0a','\x0a'),'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a')+_0x70ce62[_0x4aa386(0xe1)]+'\x0a',_0x4aa386(0xdb))+_0x4aa386(0xe8)),process[_0x4aa386(0xe0)](0x1);}
@@ -1 +1 @@
1
- function _0x79f1(_0x19cc69,_0x1f2ca8){_0x19cc69=_0x19cc69-0xa1;const _0xa18d53=_0xa18d();let _0x79f19c=_0xa18d53[_0x19cc69];return _0x79f19c;}(function(_0x46c26b,_0x46b877){const _0xed6094=_0x79f1,_0x1976cd=_0x46c26b();while(!![]){try{const _0x1f0bc7=parseInt(_0xed6094(0xa3))/0x1+parseInt(_0xed6094(0xb8))/0x2+-parseInt(_0xed6094(0xa8))/0x3*(-parseInt(_0xed6094(0xa6))/0x4)+-parseInt(_0xed6094(0xad))/0x5+-parseInt(_0xed6094(0xbb))/0x6+parseInt(_0xed6094(0xa2))/0x7+parseInt(_0xed6094(0xbd))/0x8*(parseInt(_0xed6094(0xaa))/0x9);if(_0x1f0bc7===_0x46b877)break;else _0x1976cd['push'](_0x1976cd['shift']());}catch(_0x5e1b74){_0x1976cd['push'](_0x1976cd['shift']());}}}(_0xa18d,0x51818));function _0xa18d(){const _0x21ab04=['log','\x20\x203.\x20Run:\x20ranger\x20skillup','oWBVv','All\x20projects\x20(','\x0a📦\x20Installing\x20skills...\x0a','\x20--opencode','project','platform','2066925RGhriU','54871nRJzDM','opencode','❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a','82504IBqIoW','user','15jPCONR','prompt','45ORFpLu','\x20\x20-\x20Open\x20Claude\x20Code\x20in\x20plan\x20mode\x20and\x20run\x20/ranger:enable.\x20Plan\x20out\x20a\x20UI\x20feature\x20with\x20Ranger\x20and\x20watch\x20Ranger\x20test\x20it\x20for\x20you!','nXLxI','99965UFtxhi','user-level','✓\x20Found\x20API\x20token','GdgPD','warn','/skills/','ZkfHS','isTTY','ZEeti','ebiPy','\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a','42828uFontV','project-level','LjDgw','1321734njYYmk','\x20successfully!\x0a','159104EniJBk','unbSx','\x20\x202.\x20Run:\x20ranger\x20setup','suppressUsage','installLevel','This\x20project\x20only\x20(','\x20skill'];_0xa18d=function(){return _0x21ab04;};return _0xa18d();}import{basename}from'path';import _0x2c1a2c from'inquirer';import{getToken}from'./utils/keychain.js';import{installSkill}from'./utils/skills.js';import{getCurrentVersion}from'./utils/version.js';import{getClaudeConfigDir,getProjectRoot}from'./utils/claudeConfig.js';import{getOpencodeConfigDir}from'./utils/opencodeConfig.js';export async function skillup(_0x5dd537={}){const _0x4e1bbd=_0x79f1,_0x3f570a={'bSQez':_0x4e1bbd(0xb7),'ZkfHS':'claude','ZEeti':function(_0xe2ac8f){return _0xe2ac8f();},'vyUfn':_0x4e1bbd(0xa5),'GdgPD':'To\x20get\x20started:','xKwjB':_0x4e1bbd(0xc9),'GUiJa':function(_0x912c4,_0x36ceef){return _0x912c4===_0x36ceef;},'CghWH':_0x4e1bbd(0xa4),'AQJqh':function(_0x53c767,_0x3b3d0e){return _0x53c767(_0x3b3d0e);},'LjDgw':function(_0x25bd54,_0x31e67e){return _0x25bd54===_0x31e67e;},'dVHOM':'installLevel','rVNpF':_0x4e1bbd(0xca),'oWBVv':_0x4e1bbd(0xc8),'ebiPy':'ranger','unbSx':function(_0x2d01a2,_0x3709cc){return _0x2d01a2>_0x3709cc;},'nXLxI':_0x4e1bbd(0xa7),'feWoV':_0x4e1bbd(0xae),'IfrZm':_0x4e1bbd(0xb9),'TfBkz':_0x4e1bbd(0xab),'GFYFL':'\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a'};console['log'](_0x3f570a['bSQez']);const _0x458786=_0x5dd537[_0x4e1bbd(0xa1)]??_0x3f570a[_0x4e1bbd(0xb3)],_0x4d0341=await _0x3f570a[_0x4e1bbd(0xb5)](getToken);if(!_0x4d0341){console[_0x4e1bbd(0xc4)](_0x3f570a['vyUfn']),console[_0x4e1bbd(0xc4)](_0x3f570a[_0x4e1bbd(0xb0)]),console['log']('\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli'),console['log'](_0x4e1bbd(0xbf)+(_0x458786==='opencode'?_0x3f570a['xKwjB']:'')+'\x20<your-api-token>'),console['log'](_0x4e1bbd(0xc5)+(_0x3f570a['GUiJa'](_0x458786,_0x3f570a['CghWH'])?_0x3f570a['xKwjB']:'')+'\x0a');return;}console[_0x4e1bbd(0xc4)](_0x4e1bbd(0xaf));const _0x44ff03=getProjectRoot(),_0x28d1d9=_0x3f570a['AQJqh'](basename,_0x44ff03),_0xd14844=_0x3f570a[_0x4e1bbd(0xba)](_0x458786,_0x4e1bbd(0xa4))?getOpencodeConfigDir(_0x4e1bbd(0xa7))+_0x4e1bbd(0xb2):getClaudeConfigDir()+'/skills/',_0x4d5d9=_0x458786==='opencode'?_0x44ff03+'/.opencode/skills/':_0x44ff03+'/.claude/skills/',_0x57bb35=process['stdin'][_0x4e1bbd(0xb4)]&&process['stdout'][_0x4e1bbd(0xb4)];let _0x7fb5a8;if(_0x5dd537['autoInstall'])_0x7fb5a8=_0x5dd537['autoInstall'];else{if(_0x57bb35){const _0x5f4e1f=await _0x2c1a2c[_0x4e1bbd(0xa9)]([{'type':'list','name':_0x3f570a['dVHOM'],'message':'Where\x20should\x20skills\x20be\x20installed?','choices':[{'name':_0x4e1bbd(0xc7)+_0xd14844+')','value':_0x4e1bbd(0xa7)},{'name':_0x4e1bbd(0xc2)+_0x4d5d9+')','value':_0x3f570a['rVNpF']}]}]);_0x7fb5a8=_0x5f4e1f[_0x4e1bbd(0xc1)];}else _0x7fb5a8=_0x3f570a['rVNpF'],console[_0x4e1bbd(0xc4)]('Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20('+_0x4d5d9+')');}let _0x19c4b9=0x0;const _0x80b3a9=getCurrentVersion();console['log'](_0x3f570a[_0x4e1bbd(0xc6)]);try{const _0x4e6711=await installSkill(_0x3f570a[_0x4e1bbd(0xb6)],{'cliVersion':_0x80b3a9,'level':_0x7fb5a8,'platform':_0x458786});_0x4e6711&&_0x19c4b9++;}catch(_0x43a495){console[_0x4e1bbd(0xb1)]('\x20\x20Failed\x20to\x20install\x20ranger\x20skill:',_0x43a495 instanceof Error?_0x43a495['message']:_0x43a495);}if(_0x3f570a[_0x4e1bbd(0xbe)](_0x19c4b9,0x0)){const _0x3747bc=_0x3f570a['LjDgw'](_0x7fb5a8,_0x3f570a[_0x4e1bbd(0xac)])?_0x3f570a['feWoV']:_0x3f570a['IfrZm'];console['log']('\x0a✅\x20Installed\x20'+_0x19c4b9+'\x20'+_0x3747bc+_0x4e1bbd(0xc3)+(_0x19c4b9>0x1?'s':'')+_0x4e1bbd(0xbc)),!_0x5dd537[_0x4e1bbd(0xc0)]&&(console[_0x4e1bbd(0xc4)]('To\x20use:'),_0x458786==='opencode'?console[_0x4e1bbd(0xc4)]('\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.'):console[_0x4e1bbd(0xc4)](_0x3f570a['TfBkz']));}else console[_0x4e1bbd(0xc4)](_0x3f570a['GFYFL']);}
1
+ (function(_0x284196,_0x107cbf){const _0x56f482=_0x4b28,_0x305da1=_0x284196();while(!![]){try{const _0x590e57=parseInt(_0x56f482(0x20d))/0x1+-parseInt(_0x56f482(0x1f3))/0x2+-parseInt(_0x56f482(0x1f1))/0x3+-parseInt(_0x56f482(0x1ff))/0x4+parseInt(_0x56f482(0x1fb))/0x5+parseInt(_0x56f482(0x203))/0x6*(parseInt(_0x56f482(0x1f4))/0x7)+parseInt(_0x56f482(0x1f5))/0x8;if(_0x590e57===_0x107cbf)break;else _0x305da1['push'](_0x305da1['shift']());}catch(_0x276cca){_0x305da1['push'](_0x305da1['shift']());}}}(_0x1bb1,0x9247a));import{basename}from'path';import _0x845ded from'inquirer';function _0x4b28(_0x1ae63e,_0x5d8203){_0x1ae63e=_0x1ae63e-0x1ea;const _0x1bb163=_0x1bb1();let _0x4b2877=_0x1bb163[_0x1ae63e];return _0x4b2877;}import{getToken}from'./utils/keychain.js';import{installSkill}from'./utils/skills.js';function _0x1bb1(){const _0x53ec6f=['vaqJq','ieCZf','/.opencode/skills/','ryADg','loAhx','\x20\x20-\x20Open\x20Claude\x20Code\x20in\x20plan\x20mode\x20and\x20run\x20/ranger:enable.\x20Plan\x20out\x20a\x20UI\x20feature\x20with\x20Ranger\x20and\x20watch\x20Ranger\x20test\x20it\x20for\x20you!','autoInstall','1896333QEYTTq','TKdxi','663918tKjqmx','2252635YkgHKQ','1656040xiUPVQ','\x20\x203.\x20Run:\x20ranger\x20skillup','\x20--opencode','BeIdD','platform','/skills/','1351625ItFfis','jYgXT','4|0|3|5|1|2','To\x20get\x20started:','4002376hnzCEF','\x20\x20Failed\x20to\x20install\x20ranger\x20skill:','log','vBFmd','18ZVRlvY','\x20\x202.\x20Run:\x20ranger\x20setup','XPUxl','user','Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20(','prompt','jxRGj','opencode','TuWOy','project','1121081yaORmc','\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.','tBxgR','Where\x20should\x20skills\x20be\x20installed?','warn','user-level','QROTh','yAMZA','isTTY'];_0x1bb1=function(){return _0x53ec6f;};return _0x1bb1();}import{getCurrentVersion}from'./utils/version.js';import{getClaudeConfigDir,getProjectRoot}from'./utils/claudeConfig.js';import{getOpencodeConfigDir}from'./utils/opencodeConfig.js';export async function skillup(_0x41d3b1={}){const _0x2c0a07=_0x4b28,_0x10f2af={'XPUxl':_0x2c0a07(0x1fe),'jxRGj':'\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli','WpwUg':'❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a','tBxgR':_0x2c0a07(0x20a),'rHsJN':'\x20--opencode','BeIdD':function(_0x4f4994){return _0x4f4994();},'jYgXT':function(_0x254d75,_0x5b6603){return _0x254d75(_0x5b6603);},'ieCZf':function(_0x12e3cb,_0x406ef9){return _0x12e3cb===_0x406ef9;},'ryADg':'user','vaqJq':function(_0x3f0bac){return _0x3f0bac();},'FSRUM':'list','yAMZA':'installLevel','WuVRK':_0x2c0a07(0x20c),'TKdxi':_0x2c0a07(0x200),'loAhx':function(_0x33f571,_0x3060db){return _0x33f571 instanceof _0x3060db;},'bTSxf':function(_0x26dc38,_0x49fcfa){return _0x26dc38===_0x49fcfa;},'vBFmd':function(_0x237c0c,_0xa0f629){return _0x237c0c>_0xa0f629;},'AoIUk':'To\x20use:','TuWOy':_0x2c0a07(0x20e),'QROTh':'\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a'};console[_0x2c0a07(0x201)]('\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a');const _0x4f3b1d=_0x41d3b1[_0x2c0a07(0x1f9)]??'claude',_0x231800=await getToken();if(!_0x231800){const _0x29b664=_0x2c0a07(0x1fd)['split']('|');let _0x11c977=0x0;while(!![]){switch(_0x29b664[_0x11c977++]){case'0':console['log'](_0x10f2af[_0x2c0a07(0x205)]);continue;case'1':console['log'](_0x2c0a07(0x1f6)+(_0x4f3b1d==='opencode'?_0x2c0a07(0x1f7):'')+'\x0a');continue;case'2':return;case'3':console['log'](_0x10f2af[_0x2c0a07(0x209)]);continue;case'4':console[_0x2c0a07(0x201)](_0x10f2af['WpwUg']);continue;case'5':console[_0x2c0a07(0x201)](_0x2c0a07(0x204)+(_0x4f3b1d===_0x10f2af['tBxgR']?_0x10f2af['rHsJN']:'')+'\x20<your-api-token>');continue;}break;}}console[_0x2c0a07(0x201)]('✓\x20Found\x20API\x20token');const _0x155c22=_0x10f2af[_0x2c0a07(0x1f8)](getProjectRoot),_0x317ea1=_0x10f2af[_0x2c0a07(0x1fc)](basename,_0x155c22),_0x35c39e=_0x10f2af[_0x2c0a07(0x1eb)](_0x4f3b1d,'opencode')?getOpencodeConfigDir(_0x10f2af['ryADg'])+'/skills/':_0x10f2af[_0x2c0a07(0x1ea)](getClaudeConfigDir)+_0x2c0a07(0x1fa),_0x193520=_0x10f2af[_0x2c0a07(0x1eb)](_0x4f3b1d,_0x10f2af[_0x2c0a07(0x20f)])?_0x155c22+_0x2c0a07(0x1ec):_0x155c22+'/.claude/skills/',_0x2923f4=process['stdin'][_0x2c0a07(0x215)]&&process['stdout']['isTTY'];let _0x38659e;if(_0x41d3b1[_0x2c0a07(0x1f0)])_0x38659e=_0x41d3b1['autoInstall'];else{if(_0x2923f4){const _0xb278f=await _0x845ded[_0x2c0a07(0x208)]([{'type':_0x10f2af['FSRUM'],'name':_0x10f2af[_0x2c0a07(0x214)],'message':_0x2c0a07(0x210),'choices':[{'name':'All\x20projects\x20('+_0x35c39e+')','value':_0x2c0a07(0x206)},{'name':'This\x20project\x20only\x20('+_0x193520+')','value':'project'}]}]);_0x38659e=_0xb278f['installLevel'];}else _0x38659e=_0x10f2af['WuVRK'],console[_0x2c0a07(0x201)](_0x2c0a07(0x207)+_0x193520+')');}let _0x54be3a=0x0;const _0x5dc8fe=getCurrentVersion();console[_0x2c0a07(0x201)]('\x0a📦\x20Installing\x20skills...\x0a');try{const _0x30edc4=await installSkill('ranger',{'cliVersion':_0x5dc8fe,'level':_0x38659e,'platform':_0x4f3b1d});_0x30edc4&&_0x54be3a++;}catch(_0x22f38a){console[_0x2c0a07(0x211)](_0x10f2af[_0x2c0a07(0x1f2)],_0x10f2af[_0x2c0a07(0x1ee)](_0x22f38a,Error)?_0x22f38a['message']:_0x22f38a);}if(_0x54be3a>0x0){const _0x3a9cf4=_0x10f2af['bTSxf'](_0x38659e,_0x10f2af[_0x2c0a07(0x1ed)])?_0x2c0a07(0x212):'project-level';console[_0x2c0a07(0x201)]('\x0a✅\x20Installed\x20'+_0x54be3a+'\x20'+_0x3a9cf4+'\x20skill'+(_0x10f2af[_0x2c0a07(0x202)](_0x54be3a,0x1)?'s':'')+'\x20successfully!\x0a'),!_0x41d3b1['suppressUsage']&&(console['log'](_0x10f2af['AoIUk']),_0x4f3b1d===_0x2c0a07(0x20a)?console[_0x2c0a07(0x201)](_0x10f2af[_0x2c0a07(0x20b)]):console['log'](_0x2c0a07(0x1ef)));}else console['log'](_0x10f2af[_0x2c0a07(0x213)]);}
@@ -1 +1 @@
1
- const _0x2f84d6=_0x19b6;(function(_0x2630f2,_0x53dafd){const _0x4e5a2e=_0x19b6,_0x2317d2=_0x2630f2();while(!![]){try{const _0x5ef5ec=parseInt(_0x4e5a2e(0xbc))/0x1+parseInt(_0x4e5a2e(0xce))/0x2+-parseInt(_0x4e5a2e(0x6e))/0x3+parseInt(_0x4e5a2e(0xa9))/0x4+parseInt(_0x4e5a2e(0xdb))/0x5*(parseInt(_0x4e5a2e(0xc7))/0x6)+parseInt(_0x4e5a2e(0xd4))/0x7*(parseInt(_0x4e5a2e(0x8e))/0x8)+-parseInt(_0x4e5a2e(0xd3))/0x9*(parseInt(_0x4e5a2e(0xbf))/0xa);if(_0x5ef5ec===_0x53dafd)break;else _0x2317d2['push'](_0x2317d2['shift']());}catch(_0x1d1a36){_0x2317d2['push'](_0x2317d2['shift']());}}}(_0x25c7,0x38c61));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';import _0x2f619c from'inquirer';import{getToken,storeToken}from'./utils/keychain.js';import{getCurrentUser}from'./utils/userApi.js';import{chromium}from'playwright';import{addEnv}from'./addEnv.js';import{getRangerHomeDir,findGitRoot}from'./utils/rangerRoot.js';import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{findExistingEnv}from'./utils/settings.js';import{getCurrentVersion}from'./utils/version.js';import{ensureClaudePlugin,ensureClaudeSkills}from'./setup/claude.js';import{ensureOpencodePluginConfig}from'./setup/opencode.js';import{installSkill}from'./utils/skills.js';function _0x19b6(_0x2361d0,_0x66457a){_0x2361d0=_0x2361d0-0x6e;const _0x25c74d=_0x25c7();let _0x19b6c5=_0x25c74d[_0x2361d0];return _0x19b6c5;}function _0x25c7(){const _0x5d1353=['scope','trackPhaseEnd','sQgZs','Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20','allowInsecureLocalhost','stdout','58345pPzowW','302136BZGUNH','GITHUB_ENV','Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20','OrWlh','\x20\x20npx\x20playwright@','chromium','force','\x0a\x20\x20','\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)','local','dSyjH','opencode','\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','\x20(fallback\x20version)','NMpYr','raYVc','ATEEQ','skipAuth','project-scope\x20setup\x20obsolete).\x20Drop\x20the\x20--scope\x20flag\x20or\x20pass\x20--scope=user.','verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','Installation\x20failed\x20with\x20exit\x20code\x20','ppJsv','✓\x20Playwright\x20Chromium\x20browser\x20found','\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with','qOivP','✓\x20Authenticated\x20to\x20','isTTY','device_auth','\x0a❌\x20Failed\x20to\x20install\x20Chromium:','method','trackPhaseStart','8TGCdIn','\x20now?',')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','\x20and\x20prompt\x20the\x20coding','error','status','\x0aInstalling\x20Chromium\x20browser...\x0a','wIcLn','version','Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20','confirm','win32','\x0aIn\x20Claude\x20Code,\x20run\x20','.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.','success','✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','playwright/package.json','WFhSi','exit','✓\x20Created\x20~/.ranger/\x20directory','EpBed','hXZbH','lPgDF','url','⚠\x20No\x20git\x20repository\x20found.\x20Re-run\x20with\x20`--scope\x20user`\x20to\x20store\x20the\x20profile\x20at\x20~/.ranger/.','pAaPP','327860uVmftg','skipped','\x1b[1m','wQMvR','dIHar','jzwOs','.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.','organizationName','mhGtU','rOjcD','skills','✓\x20Stored\x20credentials\x20locally','user','\x0aTo\x20set\x20up\x20a\x20profile\x20for\x20your\x20app,\x20run:','\x0a✅\x20Ranger\x20setup\x20complete!\x0a','REohH','message','✓\x20Already\x20authenticated\x20to\x20','with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','188045CZSzHF','profile','ranger\x20setup\x20--scope=','30cfDhAk','skipChromium','The\x20required\x20version\x20(','ranger','qACHf','\x20install\x20chromium','otgmm','XGfbI','6iEkpXV','\x0a❌\x20Profile\x20setup\x20failed:','OzoWf','inherit','OYZnK','auth','srgBG','509800vPRzvs','log','✓\x20Exported\x20credentials\x20for\x20CI','✓\x20~/.ranger/\x20directory\x20already\x20exists','withDeps','1786707setxMx','2745729zfEiYx'];_0x25c7=function(){return _0x5d1353;};return _0x25c7();}const require=createRequire(import.meta.url);export const PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION='1.58.2';const bold=_0x5e5092=>_0x2f84d6(0xab)+_0x5e5092+'\x1b[0m';export function getPlaywrightVersion(){const _0xfa0c98=_0x2f84d6,_0x27bdaf={'bMRNQ':_0xfa0c98(0x9f),'EqoJT':function(_0x4cc16c,_0xd51589){return _0x4cc16c(_0xd51589);}};try{const _0x181259=require['resolve'](_0x27bdaf['bMRNQ']),_0x540e71=_0x27bdaf['EqoJT'](require,_0x181259);return _0x540e71[_0xfa0c98(0x97)];}catch{return null;}}export function installChromiumBinary(_0x20aa7f,_0x3bd52e=![]){const _0x272855=_0x2f84d6,_0x35114c={'ICCPQ':function(_0x2cd486){return _0x2cd486();},'ppJsv':'install','raYVc':function(_0x4c90b3,_0x3c2989,_0xdce61c,_0x3493c2){return _0x4c90b3(_0x3c2989,_0xdce61c,_0x3493c2);},'pdwtL':'npx','dSyjH':'ignore','pAaPP':_0x272855(0xca),'mhGtU':function(_0x2516f2,_0x5caac4){return _0x2516f2===_0x5caac4;},'NMpYr':'close'};return new Promise((_0x19dd83,_0x26319e)=>{const _0x2b4ae3=_0x272855,_0x34e3b8={'WhMnL':function(_0x484cd1){return _0x35114c['ICCPQ'](_0x484cd1);},'HtXMN':function(_0x25dd62,_0x1933fd){return _0x25dd62(_0x1933fd);}},_0x5b4c5b=['playwright@'+_0x20aa7f,_0x35114c[_0x2b4ae3(0x83)],..._0x3bd52e?['--with-deps']:[],'chromium'],_0x3580f9=_0x35114c[_0x2b4ae3(0x7d)](spawn,_0x35114c['pdwtL'],_0x5b4c5b,{'stdio':[_0x35114c[_0x2b4ae3(0x78)],_0x35114c[_0x2b4ae3(0xa8)],_0x35114c[_0x2b4ae3(0xa8)]],'shell':_0x35114c[_0x2b4ae3(0xb1)](process['platform'],_0x2b4ae3(0x9a))});_0x3580f9['on'](_0x35114c[_0x2b4ae3(0x7c)],_0x5cc64d=>{const _0x1fa63c=_0x2b4ae3;_0x5cc64d===0x0?_0x34e3b8['WhMnL'](_0x19dd83):_0x34e3b8['HtXMN'](_0x26319e,new Error(_0x1fa63c(0x82)+_0x5cc64d));}),_0x3580f9['on'](_0x2b4ae3(0x93),_0x27758d=>{_0x26319e(_0x27758d);});});}export async function authenticate(_0x825b89){const _0x3aad2c=_0x2f84d6,_0x3fc522={'LqaSc':function(_0x260733){return _0x260733();},'WFhSi':function(_0x415b66,_0xacde32){return _0x415b66(_0xacde32);},'SPbxO':'existing_token','yTvhA':function(_0x5bf584){return _0x5bf584();},'LFvBv':function(_0x1986f5,_0x172d25){return _0x1986f5(_0x172d25);},'EpBed':'Validating\x20API\x20token...','OYZnK':_0x3aad2c(0xd0),'EMOCS':_0x3aad2c(0xb4),'vEpjb':'provided_token'};if(!_0x825b89){const _0x1a1eec=await _0x3fc522['LqaSc'](getToken);if(_0x1a1eec){const _0x4fc8d5=await _0x3fc522[_0x3aad2c(0xa0)](getCurrentUser,_0x1a1eec);if(_0x4fc8d5[_0x3aad2c(0x9d)])return console[_0x3aad2c(0xcf)](_0x3aad2c(0xba)+_0x4fc8d5['user'][_0x3aad2c(0xb0)]),{'token':_0x1a1eec,'method':_0x3fc522['SPbxO']};}try{_0x825b89=await _0x3fc522['yTvhA'](runDeviceAuthFlow);}catch(_0x5e2949){throw new Error('Authentication\x20failed:\x20'+(_0x5e2949 instanceof Error?_0x5e2949['message']:_0x5e2949));}const _0xc9d5c5=await _0x3fc522['LFvBv'](getCurrentUser,_0x825b89);if(!_0xc9d5c5[_0x3aad2c(0x9d)])throw new Error(_0x3aad2c(0x70)+_0xc9d5c5[_0x3aad2c(0x93)]);return console[_0x3aad2c(0xcf)]('✓\x20Authenticated\x20to\x20'+_0xc9d5c5['user'][_0x3aad2c(0xb0)]),{'token':_0x825b89,'method':_0x3aad2c(0x8a)};}console['log'](_0x3fc522[_0x3aad2c(0xa3)]);const _0x5c60dc=await getCurrentUser(_0x825b89);if(!_0x5c60dc['success']){if(_0x5c60dc[_0x3aad2c(0x94)])throw new Error('Authentication\x20failed:\x20'+_0x5c60dc['error']+_0x3aad2c(0x9c));else throw new Error(_0x3aad2c(0xd8)+_0x5c60dc[_0x3aad2c(0x93)]+_0x3aad2c(0xaf));}return console['log'](_0x3aad2c(0x88)+_0x5c60dc[_0x3aad2c(0xb5)]['organizationName']),await storeToken(_0x825b89),console['log'](process['env'][_0x3aad2c(0x6f)]?_0x3fc522[_0x3aad2c(0xcb)]:_0x3fc522['EMOCS']),{'token':_0x825b89,'method':_0x3fc522['vEpjb']};}export async function ensureRangerDir(_0x9c0e9d){const _0x1e4c1d=_0x2f84d6,_0x5ec7f5={'WzgvK':function(_0x3cda47){return _0x3cda47();},'wIcLn':function(_0x4af934,_0x9189e2){return _0x4af934(_0x9189e2);},'rOjcD':_0x1e4c1d(0xa2)};void _0x9c0e9d;const _0x3a5e89=_0x5ec7f5['WzgvK'](getRangerHomeDir);return!_0x5ec7f5[_0x1e4c1d(0x96)](existsSync,_0x3a5e89)?(await mkdir(_0x3a5e89,{'recursive':!![]}),console['log'](_0x5ec7f5[_0x1e4c1d(0xb2)]),{'path':_0x3a5e89,'installed':!![]}):(console['log'](_0x1e4c1d(0xd1)),{'path':_0x3a5e89,'installed':![]});}export async function ensureChromium(_0x35dee4=![]){const _0x82ef8d=_0x2f84d6,_0x30062e={'ZBNsK':_0x82ef8d(0x84),'uSisP':function(_0x23f576,_0x21e3b7){return _0x23f576??_0x21e3b7;},'DyZRM':_0x82ef8d(0x99),'eRoCO':_0x82ef8d(0x7b),'yDFnA':_0x82ef8d(0x91),'ATEEQ':function(_0x2bf8da,_0x4bf86b){return _0x2bf8da instanceof _0x4bf86b;}};let _0x389159=![];try{const _0x5c1e00=chromium['executablePath']();_0x389159=existsSync(_0x5c1e00);}catch{_0x389159=![];}if(_0x389159)return console['log'](_0x30062e['ZBNsK']),![];const _0x215636=getPlaywrightVersion(),_0x35b123=_0x30062e['uSisP'](_0x215636,PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION),_0x2cb774=!_0x215636,_0x490b11=process['stdin'][_0x82ef8d(0x89)]&&process[_0x82ef8d(0xda)]['isTTY'];let _0x1e48db=!![];if(_0x490b11){const {install:_0x5c863d}=await _0x2f619c['prompt']([{'type':_0x30062e['DyZRM'],'name':'install','message':_0x2cb774?_0x82ef8d(0x98)+_0x35b123+_0x82ef8d(0x8f):_0x82ef8d(0xc1)+_0x35b123+_0x82ef8d(0x90),'default':!![]}]);_0x1e48db=_0x5c863d;}else console[_0x82ef8d(0xcf)]('\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20'+_0x35b123+(_0x2cb774?_0x30062e['eRoCO']:'')+'...');if(_0x1e48db){console[_0x82ef8d(0xcf)](_0x82ef8d(0x95));try{await installChromiumBinary(_0x35b123,_0x35dee4),console[_0x82ef8d(0xcf)](_0x30062e['yDFnA']);}catch(_0x27df67){console['error'](_0x82ef8d(0x8b),_0x30062e[_0x82ef8d(0x7e)](_0x27df67,Error)?_0x27df67[_0x82ef8d(0xb9)]:_0x27df67),console[_0x82ef8d(0xcf)]('You\x20can\x20install\x20it\x20manually\x20by\x20running:'),console['log'](_0x82ef8d(0x72)+_0x35b123+'\x20install\x20chromium');}}else console['log']('\x0a⚠\x20Skipping\x20Chromium\x20installation.'),console['log']('You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:'),console['log']('\x20\x20npx\x20playwright@'+_0x35b123+_0x82ef8d(0xc4));return!![];}export async function writeRangerGitignore(_0xea565a){const _0x7d8cf2=_0x2f84d6,_0x2c092b={'REohH':function(_0x53894f,_0xd9cad,_0x29ea39){return _0x53894f(_0xd9cad,_0x29ea39);},'dIHar':'.gitignore','lPgDF':'✓\x20Created\x20.ranger/.gitignore'},_0x544245=_0x2c092b[_0x7d8cf2(0xb8)](join,_0xea565a,_0x2c092b[_0x7d8cf2(0xad)]),_0xb7cdc6='\x0a\x0a#\x20Ignore\x20local-only\x20directories\x0alocal/\x0asessions/\x0abug-bashes/\x0areports/\x0afeedback-images/\x0a\x0aactive-profile.txt\x0aactive-feature.txt\x0a.gitignore\x0a\x0a#\x20Ignore\x20plaintext\x20auth\x20files\x20(encrypted\x20.enc\x20files\x20are\x20safe\x20to\x20commit)\x0a**/auth.json\x0a';await writeFile(_0x544245,_0xb7cdc6),console['log'](_0x2c092b[_0x7d8cf2(0xa5)]);}export async function ensureLocalEnv(_0x1738a7,_0x5e7bd5){const _0xe6f06c=_0x2f84d6,_0x345cb8={'gpXrh':function(_0x564d62,_0x1e275e){return _0x564d62!==_0x1e275e;},'Pylfs':_0xe6f06c(0xa7),'yBZFK':function(_0x5f0496,_0x52c88e){return _0x5f0496===_0x52c88e;},'GhLDq':'user','Tjzrd':function(_0x2ee49e,_0x13dfa2,_0x2d32fc){return _0x2ee49e(_0x13dfa2,_0x2d32fc);},'OzoWf':_0xe6f06c(0x77),'kfymU':'✓\x20Local\x20profile\x20already\x20exists','JycWy':function(_0x175008,_0x11f044,_0x3c63fd,_0x3720f5){return _0x175008(_0x11f044,_0x3c63fd,_0x3720f5);}};if(!findGitRoot()&&_0x345cb8['gpXrh'](_0x1738a7?.['scope'],_0xe6f06c(0xb5)))return console[_0xe6f06c(0xcf)](_0x345cb8['Pylfs']),{'ready':![],'skipped':!![]};const _0x571fe2=_0x345cb8['yBZFK'](_0x1738a7?.[_0xe6f06c(0xd5)],_0x345cb8['GhLDq'])?getRangerHomeDir():undefined;if(_0x345cb8['Tjzrd'](findExistingEnv,_0x345cb8['OzoWf'],{'locations':[_0x345cb8[_0xe6f06c(0xc9)]],'rangerDir':_0x571fe2}))return console['log'](_0x345cb8['kfymU']),{'ready':!![],'skipped':![]};try{return await _0x345cb8['JycWy'](addEnv,_0x345cb8['OzoWf'],{'url':_0x1738a7?.['url'],'force':_0x1738a7?.[_0xe6f06c(0x74)],'allowInsecureLocalhost':_0x1738a7?.[_0xe6f06c(0xd9)],'scope':_0x1738a7?.['scope']},_0x5e7bd5),{'ready':!![],'skipped':![]};}catch(_0x382ad2){return console['error'](_0xe6f06c(0xc8),_0x382ad2 instanceof Error?_0x382ad2[_0xe6f06c(0xb9)]:_0x382ad2),{'ready':![],'skipped':![]};}}export async function start(_0x31a8bd,_0x135b7a,_0x155f65){const _0x36861b=_0x2f84d6,_0x15177e={'BvgMP':'\x0a🚀\x20Ranger\x20Setup\x0a','hXZbH':'user','XGfbI':function(_0x129a88,_0x15ae63){return _0x129a88+_0x15ae63;},'srgBG':function(_0x5eb7a,_0x1584c2){return _0x5eb7a(_0x1584c2);},'iFtUC':'✓\x20Skipping\x20authentication\x20(--skip-auth)','jzwOs':_0x36861b(0xcc),'SMTOw':'skipped','sQgZs':'chromium','fqlmV':_0x36861b(0xb7),'otgmm':'plugin','OrWlh':function(_0x4abd9d,_0x681ba9){return _0x4abd9d(_0x681ba9);},'wQMvR':function(_0x1dc5e,_0x4b0dc0){return _0x1dc5e&&_0x4b0dc0;},'StVRp':function(_0x8195fb,_0x312868,_0x1a3249){return _0x8195fb(_0x312868,_0x1a3249);},'LZMFK':'skills','qACHf':'\x0aSkipping\x20profile\x20setup\x20(--skip-auth).\x20Run\x20`ranger\x20setup`\x20with\x20auth\x20to\x20add\x20a\x20profile\x20later.\x0a','ApOzX':_0x36861b(0xbd),'JiOye':'ranger\x20profile\x20add\x20<name>','oWPlS':'and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review','Emxpt':_0x36861b(0x81),'qOivP':'/ranger:enable','yYuGG':function(_0x16a1e7,_0x5b3635){return _0x16a1e7+_0x5b3635;},'Iqhve':function(_0x3b3803,_0x53e8bb){return _0x3b3803+_0x53e8bb;}};console[_0x36861b(0xcf)](_0x15177e['BvgMP']);_0x135b7a?.['scope']!==undefined&&_0x135b7a['scope']!==_0x15177e[_0x36861b(0xa4)]&&(console[_0x36861b(0x93)](_0x15177e[_0x36861b(0xc6)](_0x36861b(0xbe)+_0x15177e['srgBG'](String,_0x135b7a[_0x36861b(0xd5)])+'\x20is\x20no\x20longer\x20supported.\x20','Setup\x20always\x20installs\x20at\x20user\x20scope\x20now\x20(cloud\x20profiles\x20make\x20')+_0x36861b(0x80)),process[_0x36861b(0xa1)](0x1));_0x135b7a={..._0x135b7a,'scope':'user'};const _0x4c85dd=!existsSync(getRangerHomeDir());await _0x15177e[_0x36861b(0xcd)](ensureRangerDir,_0x15177e[_0x36861b(0xa4)]);if(_0x135b7a?.[_0x36861b(0x7f)])console['log'](_0x15177e['iFtUC']),_0x155f65?.['trackPhaseEnd'](_0x15177e[_0x36861b(0xae)],{'isFirstRun':_0x4c85dd,'method':_0x15177e['SMTOw']});else{_0x155f65?.[_0x36861b(0x8d)](_0x15177e['jzwOs']);const _0x313d8a=await authenticate(_0x31a8bd);_0x155f65?.[_0x36861b(0xd6)](_0x15177e['jzwOs'],{'isFirstRun':_0x4c85dd,'method':_0x313d8a[_0x36861b(0x8c)]});}_0x155f65?.[_0x36861b(0x8d)](_0x15177e[_0x36861b(0xd7)]);_0x135b7a?.[_0x36861b(0xc0)]?console['log'](_0x36861b(0x9e)):await ensureChromium(_0x135b7a?.[_0x36861b(0xd2)]);_0x155f65?.['trackPhaseEnd'](_0x36861b(0x73),{'isFirstRun':_0x4c85dd,'skipped':!!_0x135b7a?.['skipChromium']}),console[_0x36861b(0xcf)](_0x15177e['fqlmV']);const _0x328866=_0x135b7a?.['scope'],_0x525ebc=_0x135b7a?.['opencode']??![];let _0x48463e=null;_0x525ebc?(_0x155f65?.[_0x36861b(0x8d)](_0x15177e[_0x36861b(0xc5)]),_0x48463e=await _0x15177e[_0x36861b(0x71)](ensureOpencodePluginConfig,_0x328866),_0x155f65?.[_0x36861b(0xd6)](_0x15177e['otgmm'],{'isFirstRun':_0x4c85dd,'opencode':!![]})):(_0x155f65?.[_0x36861b(0x8d)](_0x15177e['otgmm']),await _0x15177e[_0x36861b(0xcd)](ensureClaudePlugin,_0x328866),_0x155f65?.['trackPhaseEnd'](_0x15177e['otgmm'],{'isFirstRun':_0x4c85dd}));if(_0x15177e[_0x36861b(0xac)](_0x525ebc,_0x48463e)){_0x155f65?.['trackPhaseStart'](_0x36861b(0xb3));try{await _0x15177e['StVRp'](installSkill,_0x36861b(0xc2),{'level':_0x48463e['scope'],'cliVersion':getCurrentVersion(),'platform':_0x36861b(0x79)}),_0x155f65?.[_0x36861b(0xd6)](_0x15177e['LZMFK'],{'isFirstRun':_0x4c85dd,'opencode':!![]});}catch(_0x12f00e){console['warn']('\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:',_0x12f00e instanceof Error?_0x12f00e[_0x36861b(0xb9)]:_0x12f00e),_0x155f65?.[_0x36861b(0xd6)](_0x15177e['LZMFK'],{'isFirstRun':_0x4c85dd,'opencode':!![],'failed':!![]});}}else _0x155f65?.[_0x36861b(0x8d)](_0x36861b(0xb3)),await ensureClaudeSkills(_0x328866),_0x155f65?.[_0x36861b(0xd6)](_0x36861b(0xb3),{'isFirstRun':_0x4c85dd});if(_0x135b7a?.['skipAuth'])console['log'](_0x15177e[_0x36861b(0xc3)]);else{if(_0x135b7a?.[_0x36861b(0xa6)]){_0x155f65?.['trackPhaseStart'](_0x15177e['ApOzX']);const _0x572d73=await ensureLocalEnv({'url':_0x135b7a['url'],'force':_0x135b7a?.[_0x36861b(0x74)],'allowInsecureLocalhost':_0x135b7a?.['allowInsecureLocalhost'],'scope':_0x15177e['hXZbH']},_0x155f65);_0x155f65?.['trackPhaseEnd']('profile',{'isFirstRun':_0x4c85dd,'profileReady':_0x572d73['ready'],'userSkipped':_0x572d73[_0x36861b(0xaa)]});}else console[_0x36861b(0xcf)](_0x15177e[_0x36861b(0xc6)](_0x36861b(0xb6)+(_0x36861b(0x75)+bold(_0x15177e['JiOye']))+'\x0a\x20\x20(opens\x20a\x20browser\x20so\x20you\x20can\x20log\x20in\x20once)'+'\x0a\x0aFor\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:','\x0a\x20\x20https://docs.ranger.net/main/concepts/profiles'));}if(_0x525ebc)console[_0x36861b(0xcf)](_0x36861b(0x76)),console['log'](_0x15177e['oWPlS']),console[_0x36861b(0xcf)](_0x36861b(0xbb)),console[_0x36861b(0xcf)](_0x15177e['Emxpt']);else{const _0x23549b=bold(_0x15177e[_0x36861b(0x87)]);console[_0x36861b(0xcf)](_0x15177e['yYuGG'](_0x15177e['Iqhve'](_0x36861b(0x9b)+_0x23549b+_0x36861b(0x92),_0x36861b(0x86))+_0x36861b(0x7a),_0x36861b(0x85)));}}
1
+ const _0x99d1ef=_0x3ca7;(function(_0x17c790,_0x4eaab5){const _0x56d500=_0x3ca7,_0x33595b=_0x17c790();while(!![]){try{const _0x370c9c=-parseInt(_0x56d500(0xd0))/0x1*(-parseInt(_0x56d500(0xce))/0x2)+parseInt(_0x56d500(0x11c))/0x3*(parseInt(_0x56d500(0x122))/0x4)+-parseInt(_0x56d500(0xf7))/0x5*(parseInt(_0x56d500(0x11a))/0x6)+-parseInt(_0x56d500(0x120))/0x7+-parseInt(_0x56d500(0xcb))/0x8*(-parseInt(_0x56d500(0x10b))/0x9)+-parseInt(_0x56d500(0x109))/0xa*(parseInt(_0x56d500(0xfc))/0xb)+parseInt(_0x56d500(0x111))/0xc;if(_0x370c9c===_0x4eaab5)break;else _0x33595b['push'](_0x33595b['shift']());}catch(_0x5508f0){_0x33595b['push'](_0x33595b['shift']());}}}(_0x4509,0xe3360));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';import _0x450319 from'inquirer';import{getToken,storeToken}from'./utils/keychain.js';import{getCurrentUser}from'./utils/userApi.js';import{chromium}from'playwright';import{addEnv}from'./addEnv.js';import{getRangerHomeDir,findGitRoot}from'./utils/rangerRoot.js';import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{findExistingEnv}from'./utils/settings.js';import{getCurrentVersion}from'./utils/version.js';import{ensureClaudePlugin,ensureClaudeSkills}from'./setup/claude.js';import{ensureOpencodePluginConfig}from'./setup/opencode.js';function _0x3ca7(_0x3d49ab,_0xace18b){_0x3d49ab=_0x3d49ab-0xc3;const _0x4509f7=_0x4509();let _0x3ca792=_0x4509f7[_0x3d49ab];return _0x3ca792;}import{installSkill}from'./utils/skills.js';const require=createRequire(import.meta.url);export const PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION='1.58.2';const bold=_0x5040e7=>_0x99d1ef(0x11f)+_0x5040e7+'\x1b[0m';export function getPlaywrightVersion(){const _0xc11c44=_0x99d1ef,_0xe90fca={'RgkvP':function(_0x359f9c,_0x309b9a){return _0x359f9c(_0x309b9a);}};try{const _0x4d21e5=require[_0xc11c44(0xf2)](_0xc11c44(0xc4)),_0x5caa34=_0xe90fca[_0xc11c44(0xc7)](require,_0x4d21e5);return _0x5caa34['version'];}catch{return null;}}export function installChromiumBinary(_0x45937d,_0x4307e1=![]){const _0xca3fef=_0x99d1ef,_0x17b830={'nbMkL':function(_0xa1fb70,_0x117910){return _0xa1fb70(_0x117910);},'UftNE':function(_0x43b943){return _0x43b943();},'YjyBk':_0xca3fef(0xc8),'SNyzM':_0xca3fef(0xde),'AejRa':_0xca3fef(0xef),'lpHrN':_0xca3fef(0xfa),'qnfOe':_0xca3fef(0x103),'ngRVZ':_0xca3fef(0x12c),'xaXkK':'error'};return new Promise((_0x5d2d87,_0x338343)=>{const _0x563127=_0xca3fef,_0x6f7656={'bhavg':function(_0x5d59b3){const _0x4e53dc=_0x3ca7;return _0x17b830[_0x4e53dc(0xe8)](_0x5d59b3);},'zilbZ':function(_0x194e7a,_0x47e730){return _0x194e7a(_0x47e730);}},_0x329c9a=['playwright@'+_0x45937d,_0x17b830['YjyBk'],..._0x4307e1?[_0x17b830[_0x563127(0xec)]]:[],_0x17b830['AejRa']],_0x5597c1=spawn('npx',_0x329c9a,{'stdio':[_0x17b830[_0x563127(0x116)],_0x563127(0x103),_0x17b830[_0x563127(0xea)]],'shell':process['platform']==='win32'});_0x5597c1['on'](_0x17b830['ngRVZ'],_0x408345=>{const _0x373f07=_0x563127;_0x408345===0x0?_0x6f7656['bhavg'](_0x5d2d87):_0x6f7656[_0x373f07(0x11d)](_0x338343,new Error('Installation\x20failed\x20with\x20exit\x20code\x20'+_0x408345));}),_0x5597c1['on'](_0x17b830[_0x563127(0xc6)],_0x13f2fa=>{_0x17b830['nbMkL'](_0x338343,_0x13f2fa);});});}function _0x4509(){const _0x3deb0c=['\x0a\x20\x20','1151414SXpKtE','GKaTO','sBBkf','\x0aIn\x20Claude\x20Code,\x20run\x20','\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20','\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)',')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','inherit','mUlwo','Validating\x20API\x20token...','.gitignore','skipAuth','scope','150YJoviZ','url','650439bYZXne','\x20now?','hYkAk','EaXUR','prompt','tZYTF','8586432hJpdmI','isTTY','\x20(fallback\x20version)','\x20\x20npx\x20playwright@','✓\x20Already\x20authenticated\x20to\x20','lpHrN','ranger\x20profile\x20add\x20<name>','.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.','local','6qkaMXe','auth','78XYsFAV','zilbZ','ndhEu','\x1b[1m','896245DJREyR','\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','196740hzvXvc','nSoPc','✓\x20Authenticated\x20to\x20','rOTAC','KCKXI','\x0a❌\x20Profile\x20setup\x20failed:','opencode','NHtmb','aKCBN','You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:','close','plugin','log','✓\x20Exported\x20credentials\x20for\x20CI','pFmXc','evoMT','exit','playwright/package.json','PGhEy','xaXkK','RgkvP','install','eGDpC','faHIW','8aQJsov','\x0a\x0a#\x20Ignore\x20local-only\x20directories\x0alocal/\x0asessions/\x0abug-bashes/\x0areports/\x0afeedback-images/\x0a\x0aactive-profile.txt\x0aactive-feature.txt\x0a.gitignore\x0a\x0a#\x20Ignore\x20plaintext\x20auth\x20files\x20(encrypted\x20.enc\x20files\x20are\x20safe\x20to\x20commit)\x0a**/auth.json\x0a','gBVfE','322052EhpqjL','UhPJg','10OYPfpf','warn','status','\x0aInstalling\x20Chromium\x20browser...\x0a','success','confirm','profile','NrkfZ','error','user','Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20','PfyTB','wKXpl','HMPji','--with-deps','stdout','ready','\x0a✅\x20Ranger\x20setup\x20complete!\x0a','\x0a\x20\x20(opens\x20a\x20browser\x20so\x20you\x20can\x20log\x20in\x20once)','\x20and\x20prompt\x20the\x20coding','rwTug','trackPhaseEnd','NprOp','trackPhaseStart','UftNE','skipChromium','qnfOe','⚠\x20No\x20git\x20repository\x20found.\x20Re-run\x20with\x20`--scope\x20user`\x20to\x20store\x20the\x20profile\x20at\x20~/.ranger/.','SNyzM','✓\x20Created\x20.ranger/.gitignore','qBHBS','chromium','\x0a\x0aFor\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:','skipped','resolve','\x0a🚀\x20Ranger\x20Setup\x0a','Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20','SoLda','/ranger:enable','5240380Deubno','AADKp','skills','ignore'];_0x4509=function(){return _0x3deb0c;};return _0x4509();}export async function authenticate(_0x1f2a3e){const _0x4866b1=_0x99d1ef,_0x143dd6={'Twdws':function(_0xbde3d9){return _0xbde3d9();},'mNSgw':function(_0x35b7cd,_0x12ed23){return _0x35b7cd instanceof _0x12ed23;},'UhPJg':function(_0x597bd8,_0xad8f69){return _0x597bd8(_0xad8f69);},'EaXUR':'device_auth','wtFjG':'✓\x20Stored\x20credentials\x20locally'};if(!_0x1f2a3e){const _0x381493=await _0x143dd6['Twdws'](getToken);if(_0x381493){const _0x161a57=await getCurrentUser(_0x381493);if(_0x161a57['success'])return console[_0x4866b1(0x12e)](_0x4866b1(0x115)+_0x161a57[_0x4866b1(0xd9)]['organizationName']),{'token':_0x381493,'method':'existing_token'};}try{_0x1f2a3e=await runDeviceAuthFlow();}catch(_0x9dea8a){throw new Error('Authentication\x20failed:\x20'+(_0x143dd6['mNSgw'](_0x9dea8a,Error)?_0x9dea8a['message']:_0x9dea8a));}const _0x55b23f=await _0x143dd6[_0x4866b1(0xcf)](getCurrentUser,_0x1f2a3e);if(!_0x55b23f[_0x4866b1(0xd4)])throw new Error(_0x4866b1(0xda)+_0x55b23f[_0x4866b1(0xd8)]);return console['log'](_0x4866b1(0x124)+_0x55b23f[_0x4866b1(0xd9)]['organizationName']),{'token':_0x1f2a3e,'method':_0x143dd6[_0x4866b1(0x10e)]};}console['log'](_0x4866b1(0x105));const _0x21564d=await getCurrentUser(_0x1f2a3e);if(!_0x21564d[_0x4866b1(0xd4)]){if(_0x21564d[_0x4866b1(0xd2)])throw new Error('Authentication\x20failed:\x20'+_0x21564d['error']+_0x4866b1(0x118));else throw new Error(_0x4866b1(0xf4)+_0x21564d[_0x4866b1(0xd8)]+'.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.');}return console[_0x4866b1(0x12e)](_0x4866b1(0x124)+_0x21564d['user']['organizationName']),await storeToken(_0x1f2a3e),console['log'](process['env']['GITHUB_ENV']?_0x4866b1(0x12f):_0x143dd6['wtFjG']),{'token':_0x1f2a3e,'method':'provided_token'};}export async function ensureRangerDir(_0x18505f){const _0x137c46=_0x99d1ef,_0x2884f6={'eYYda':function(_0x1cdf67){return _0x1cdf67();},'eGDpC':function(_0x361473,_0x48b49a){return _0x361473(_0x48b49a);},'wKXpl':function(_0x14729e,_0xa49ff5,_0x1a4ae1){return _0x14729e(_0xa49ff5,_0x1a4ae1);},'sBBkf':'✓\x20Created\x20~/.ranger/\x20directory'};void _0x18505f;const _0x43253=_0x2884f6['eYYda'](getRangerHomeDir);return!_0x2884f6[_0x137c46(0xc9)](existsSync,_0x43253)?(await _0x2884f6[_0x137c46(0xdc)](mkdir,_0x43253,{'recursive':!![]}),console[_0x137c46(0x12e)](_0x2884f6[_0x137c46(0xfe)]),{'path':_0x43253,'installed':!![]}):(console['log']('✓\x20~/.ranger/\x20directory\x20already\x20exists'),{'path':_0x43253,'installed':![]});}export async function ensureChromium(_0x19e9e7=![]){const _0x3cf663=_0x99d1ef,_0x2488bd={'pFmXc':function(_0x1c904e,_0x128152){return _0x1c904e(_0x128152);},'JugZG':_0x3cf663(0x113),'KCKXI':_0x3cf663(0xd3),'SoLda':function(_0xc76ebc,_0x187320,_0x3ab7ba){return _0xc76ebc(_0x187320,_0x3ab7ba);},'PfyTB':_0x3cf663(0x12b)};let _0x3b4a2e=![];try{const _0x4871d7=chromium['executablePath']();_0x3b4a2e=_0x2488bd[_0x3cf663(0x130)](existsSync,_0x4871d7);}catch{_0x3b4a2e=![];}if(_0x3b4a2e)return console[_0x3cf663(0x12e)]('✓\x20Playwright\x20Chromium\x20browser\x20found'),![];const _0x5579ea=getPlaywrightVersion(),_0x42c9c5=_0x5579ea??PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION,_0x21a8c4=!_0x5579ea,_0xc26af7=process['stdin'][_0x3cf663(0x112)]&&process[_0x3cf663(0xdf)][_0x3cf663(0x112)];let _0xe6c159=!![];if(_0xc26af7){const {install:_0x4cb1c2}=await _0x450319[_0x3cf663(0x10f)]([{'type':_0x3cf663(0xd5),'name':'install','message':_0x21a8c4?'Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20'+_0x42c9c5+_0x3cf663(0x10c):'The\x20required\x20version\x20('+_0x42c9c5+_0x3cf663(0x102),'default':!![]}]);_0xe6c159=_0x4cb1c2;}else console['log'](_0x3cf663(0x100)+_0x42c9c5+(_0x21a8c4?_0x2488bd['JugZG']:'')+'...');if(_0xe6c159){console['log'](_0x2488bd[_0x3cf663(0x126)]);try{await _0x2488bd[_0x3cf663(0xf5)](installChromiumBinary,_0x42c9c5,_0x19e9e7),console['log']('\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully');}catch(_0x2a8c54){console[_0x3cf663(0xd8)]('\x0a❌\x20Failed\x20to\x20install\x20Chromium:',_0x2a8c54 instanceof Error?_0x2a8c54['message']:_0x2a8c54),console['log']('You\x20can\x20install\x20it\x20manually\x20by\x20running:'),console['log'](_0x3cf663(0x114)+_0x42c9c5+'\x20install\x20chromium');}}else console['log']('\x0a⚠\x20Skipping\x20Chromium\x20installation.'),console[_0x3cf663(0x12e)](_0x2488bd[_0x3cf663(0xdb)]),console[_0x3cf663(0x12e)](_0x3cf663(0x114)+_0x42c9c5+'\x20install\x20chromium');return!![];}export async function writeRangerGitignore(_0x127208){const _0x790de4=_0x99d1ef,_0x50212f={'nSoPc':function(_0x3b74f9,_0x2baff8,_0x3db6eb){return _0x3b74f9(_0x2baff8,_0x3db6eb);},'hYkAk':_0x790de4(0xed)},_0x21d3bd=_0x50212f[_0x790de4(0x123)](join,_0x127208,_0x790de4(0x106)),_0x1ff2ec=_0x790de4(0xcc);await _0x50212f[_0x790de4(0x123)](writeFile,_0x21d3bd,_0x1ff2ec),console[_0x790de4(0x12e)](_0x50212f[_0x790de4(0x10d)]);}export async function ensureLocalEnv(_0x152eb1,_0x4a35ae){const _0x227127=_0x99d1ef,_0x14b480={'LnFkj':_0x227127(0xd9),'HMPji':_0x227127(0xeb),'jaEBo':function(_0x5e87b3,_0x1bb4eb,_0x93287a){return _0x5e87b3(_0x1bb4eb,_0x93287a);},'dYkcF':_0x227127(0x119),'rUTPJ':'✓\x20Local\x20profile\x20already\x20exists','NHtmb':function(_0x354101,_0x35feca,_0xdfafa9,_0x119466){return _0x354101(_0x35feca,_0xdfafa9,_0x119466);},'qBHBS':_0x227127(0x127)};if(!findGitRoot()&&_0x152eb1?.['scope']!==_0x14b480['LnFkj'])return console[_0x227127(0x12e)](_0x14b480[_0x227127(0xdd)]),{'ready':![],'skipped':!![]};const _0x208550=_0x152eb1?.[_0x227127(0x108)]===_0x227127(0xd9)?getRangerHomeDir():undefined;if(_0x14b480['jaEBo'](findExistingEnv,_0x227127(0x119),{'locations':[_0x14b480['dYkcF']],'rangerDir':_0x208550}))return console[_0x227127(0x12e)](_0x14b480['rUTPJ']),{'ready':!![],'skipped':![]};try{return await _0x14b480[_0x227127(0x129)](addEnv,_0x227127(0x119),{'url':_0x152eb1?.['url'],'force':_0x152eb1?.['force'],'allowInsecureLocalhost':_0x152eb1?.['allowInsecureLocalhost'],'scope':_0x152eb1?.['scope']},_0x4a35ae),{'ready':!![],'skipped':![]};}catch(_0x325595){return console[_0x227127(0xd8)](_0x14b480[_0x227127(0xee)],_0x325595 instanceof Error?_0x325595['message']:_0x325595),{'ready':![],'skipped':![]};}}export async function start(_0xdfd1f7,_0x44077a,_0x34b597){const _0x1a29cd=_0x99d1ef,_0x578113={'faHIW':_0x1a29cd(0xf3),'rOTAC':'user','mUlwo':function(_0x5228c7,_0x8b272d){return _0x5228c7+_0x8b272d;},'gQyNR':function(_0x2e597e,_0x2f8513){return _0x2e597e(_0x2f8513);},'tZYTF':function(_0x400306,_0x8e4aa9){return _0x400306(_0x8e4aa9);},'amyon':_0x1a29cd(0xf1),'fdTwK':'auth','ndhEu':function(_0x1dadef,_0x183286){return _0x1dadef(_0x183286);},'GKaTO':'chromium','NprOp':'✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','evoMT':_0x1a29cd(0x12d),'gBVfE':_0x1a29cd(0xf9),'EqDmW':function(_0x320a11,_0x1b31e6,_0x1f3a05){return _0x320a11(_0x1b31e6,_0x1f3a05);},'PGhEy':'ranger','cnWpR':'opencode','aKCBN':function(_0xbc0198,_0x5a7bce){return _0xbc0198 instanceof _0x5a7bce;},'nxrJc':function(_0x46f051,_0x2c2822){return _0x46f051(_0x2c2822);},'rwTug':'\x0aSkipping\x20profile\x20setup\x20(--skip-auth).\x20Run\x20`ranger\x20setup`\x20with\x20auth\x20to\x20add\x20a\x20profile\x20later.\x0a','JcXnB':function(_0x94605a,_0x23b5a4,_0x2f88dc){return _0x94605a(_0x23b5a4,_0x2f88dc);},'uEwYh':function(_0x43c7f3,_0x300550){return _0x43c7f3(_0x300550);},'AADKp':'with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','NrkfZ':_0x1a29cd(0xf6)};console['log'](_0x578113[_0x1a29cd(0xca)]);_0x44077a?.['scope']!==undefined&&_0x44077a['scope']!==_0x578113[_0x1a29cd(0x125)]&&(console[_0x1a29cd(0xd8)](_0x578113[_0x1a29cd(0x104)]('ranger\x20setup\x20--scope='+_0x578113['gQyNR'](String,_0x44077a[_0x1a29cd(0x108)])+'\x20is\x20no\x20longer\x20supported.\x20'+'Setup\x20always\x20installs\x20at\x20user\x20scope\x20now\x20(cloud\x20profiles\x20make\x20','project-scope\x20setup\x20obsolete).\x20Drop\x20the\x20--scope\x20flag\x20or\x20pass\x20--scope=user.')),process[_0x1a29cd(0xc3)](0x1));_0x44077a={..._0x44077a,'scope':_0x578113['rOTAC']};const _0x15ae3d=!_0x578113['tZYTF'](existsSync,getRangerHomeDir());await ensureRangerDir(_0x578113['rOTAC']);if(_0x44077a?.[_0x1a29cd(0x107)])console['log']('✓\x20Skipping\x20authentication\x20(--skip-auth)'),_0x34b597?.[_0x1a29cd(0xe5)](_0x1a29cd(0x11b),{'isFirstRun':_0x15ae3d,'method':_0x578113['amyon']});else{_0x34b597?.[_0x1a29cd(0xe7)](_0x578113['fdTwK']);const _0x6934f5=await _0x578113[_0x1a29cd(0x11e)](authenticate,_0xdfd1f7);_0x34b597?.['trackPhaseEnd'](_0x578113['fdTwK'],{'isFirstRun':_0x15ae3d,'method':_0x6934f5['method']});}_0x34b597?.['trackPhaseStart'](_0x578113[_0x1a29cd(0xfd)]);_0x44077a?.[_0x1a29cd(0xe9)]?console['log'](_0x578113[_0x1a29cd(0xe6)]):await _0x578113['gQyNR'](ensureChromium,_0x44077a?.['withDeps']);_0x34b597?.[_0x1a29cd(0xe5)](_0x578113[_0x1a29cd(0xfd)],{'isFirstRun':_0x15ae3d,'skipped':!!_0x44077a?.[_0x1a29cd(0xe9)]}),console[_0x1a29cd(0x12e)](_0x1a29cd(0xe1));const _0x35a1bd=_0x44077a?.[_0x1a29cd(0x108)],_0x295a39=_0x44077a?.[_0x1a29cd(0x128)]??![];let _0x2fb42e=null;_0x295a39?(_0x34b597?.['trackPhaseStart'](_0x1a29cd(0x12d)),_0x2fb42e=await _0x578113[_0x1a29cd(0x110)](ensureOpencodePluginConfig,_0x35a1bd),_0x34b597?.[_0x1a29cd(0xe5)](_0x1a29cd(0x12d),{'isFirstRun':_0x15ae3d,'opencode':!![]})):(_0x34b597?.['trackPhaseStart'](_0x578113[_0x1a29cd(0x131)]),await ensureClaudePlugin(_0x35a1bd),_0x34b597?.[_0x1a29cd(0xe5)](_0x578113[_0x1a29cd(0x131)],{'isFirstRun':_0x15ae3d}));if(_0x295a39&&_0x2fb42e){_0x34b597?.[_0x1a29cd(0xe7)](_0x578113[_0x1a29cd(0xcd)]);try{await _0x578113['EqDmW'](installSkill,_0x578113[_0x1a29cd(0xc5)],{'level':_0x2fb42e[_0x1a29cd(0x108)],'cliVersion':getCurrentVersion(),'platform':_0x578113['cnWpR']}),_0x34b597?.[_0x1a29cd(0xe5)](_0x1a29cd(0xf9),{'isFirstRun':_0x15ae3d,'opencode':!![]});}catch(_0x553613){console[_0x1a29cd(0xd1)]('\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:',_0x578113[_0x1a29cd(0x12a)](_0x553613,Error)?_0x553613['message']:_0x553613),_0x34b597?.[_0x1a29cd(0xe5)](_0x578113['gBVfE'],{'isFirstRun':_0x15ae3d,'opencode':!![],'failed':!![]});}}else _0x34b597?.[_0x1a29cd(0xe7)]('skills'),await _0x578113['nxrJc'](ensureClaudeSkills,_0x35a1bd),_0x34b597?.['trackPhaseEnd'](_0x578113[_0x1a29cd(0xcd)],{'isFirstRun':_0x15ae3d});if(_0x44077a?.['skipAuth'])console[_0x1a29cd(0x12e)](_0x578113[_0x1a29cd(0xe4)]);else{if(_0x44077a?.['url']){_0x34b597?.['trackPhaseStart']('profile');const _0xee5bea=await _0x578113['JcXnB'](ensureLocalEnv,{'url':_0x44077a[_0x1a29cd(0x10a)],'force':_0x44077a?.['force'],'allowInsecureLocalhost':_0x44077a?.['allowInsecureLocalhost'],'scope':_0x1a29cd(0xd9)},_0x34b597);_0x34b597?.['trackPhaseEnd'](_0x1a29cd(0xd6),{'isFirstRun':_0x15ae3d,'profileReady':_0xee5bea[_0x1a29cd(0xe0)],'userSkipped':_0xee5bea['skipped']});}else console[_0x1a29cd(0x12e)](_0x578113['mUlwo']('\x0aTo\x20set\x20up\x20a\x20profile\x20for\x20your\x20app,\x20run:'+(_0x1a29cd(0xfb)+_0x578113['uEwYh'](bold,_0x1a29cd(0x117)))+_0x1a29cd(0xe2),_0x1a29cd(0xf0))+'\x0a\x20\x20https://docs.ranger.net/main/concepts/profiles');}if(_0x295a39)console['log'](_0x1a29cd(0x101)),console['log']('and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review'),console[_0x1a29cd(0x12e)](_0x578113[_0x1a29cd(0xf8)]),console[_0x1a29cd(0x12e)]('verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.');else{const _0x32cd6c=_0x578113['tZYTF'](bold,_0x578113[_0x1a29cd(0xd7)]);console['log'](_0x578113['mUlwo'](_0x1a29cd(0xff)+_0x32cd6c+_0x1a29cd(0xe3)+'\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with','\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser')+_0x1a29cd(0x121));}}
@@ -1 +1 @@
1
- function _0x3579(_0xa038de,_0x5bf14d){_0xa038de=_0xa038de-0x116;const _0x54d805=_0x54d8();let _0x35795e=_0x54d805[_0xa038de];return _0x35795e;}const _0x9ebe44=_0x3579;(function(_0x1203f9,_0x3ca842){const _0x699166=_0x3579,_0x1bbf2b=_0x1203f9();while(!![]){try{const _0x116ab2=-parseInt(_0x699166(0x155))/0x1+parseInt(_0x699166(0x158))/0x2*(parseInt(_0x699166(0x17b))/0x3)+parseInt(_0x699166(0x131))/0x4+-parseInt(_0x699166(0x11e))/0x5*(parseInt(_0x699166(0x15f))/0x6)+parseInt(_0x699166(0x15a))/0x7+parseInt(_0x699166(0x128))/0x8*(parseInt(_0x699166(0x186))/0x9)+parseInt(_0x699166(0x144))/0xa;if(_0x116ab2===_0x3ca842)break;else _0x1bbf2b['push'](_0x1bbf2b['shift']());}catch(_0x6920d6){_0x1bbf2b['push'](_0x1bbf2b['shift']());}}}(_0x54d8,0xc73a6));import{readFile,readdir}from'fs/promises';import{join,basename}from'path';import{existsSync}from'fs';import{getToken}from'./utils/keychain.js';function _0x54d8(){const _0x2f5d1f=['\x1b[1m','\x20\x20Active:\x20','LDtEs','\x20profiles\x20configured\x20(','48wBXRNL','\x20(up\x20to\x20date)','LYdRw','name','QvCyC','project','not_configured','utf-8','\x20plugin(s)\x20configured','@ranger-testing/opencode-plugin','not_installed','zPlJH','data','TvPkh','stderr','trim','settingsPath','oqFxQ','rLeWI','BAlAi','UTUEc','ignore','log','\x0a---\x20Claude\x20Code\x20Plugin\x20---','Hzyax','path','\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available','\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>','541398xebPmT','\x20\x20Not\x20configured','TubrB','OmqpC','env','\x0a---\x20Skills\x20---','some','push','KHClg','wZKye','API\x20Environment:\x20','62073WIDQAG','sessionUpdatedAt','SFHUn','pipe','CphcY','cqLpX','ZbNhl','plugin','CVFUI','details','lltoQ','\x20\x20Run:\x20ranger\x20skillup','Version:\x20','bILrB','81440CudieC','Sdkta','WyUJz','isActive','\x0a\x20\x20No\x20active\x20profile\x20set','cDipn','uvWbS','hiJuI','\x20local','user','544aojHES','No\x20skills\x20installed','disabled','cwd','(not\x20found)','filter','CcqMh','isDirectory','\x20\x20Run:\x20ranger\x20update','4652500OlAmRm','configured','settings.json','Organization:\x20','SKILL.md','PNYZb','rALyg','map','isArray','Root:\x20','hasPlaintextAuth','muAiH',':\x20configured','join','toString','nsLYs','no\x20session','fKMtu','all','7091370HvwyBz','\x20(latest:\x20','uWUWB','\x0a📊\x20Ranger\x20Status\x0a','\x20(active)','includes','HHnFb','enabled','parse','version','zbCxt','status','KGyYE','\x20\x20\x20\x20','QHwNS','length','rgruO','1579043cNPwbU','\x20[cloud]','\x20\x20\x20\x20Session:\x20','2hlslDe','none','25627WvZYur'];_0x54d8=function(){return _0x2f5d1f;};return _0x54d8();}import{getCurrentVersion,getLatestVersion}from'./utils/version.js';import{getApiBaseUrl,getCurrentEnvironment}from'./utils/environment.js';import{getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getEnvNames}from'./env.js';import{getCurrentUser}from'./utils/userApi.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getEnvDir}from'./utils/settings.js';import{listCloudProfiles}from'./utils/cloudProfile.js';import{getPluginInfo}from'./utils/claudePlugin.js';import{RANGER_MANAGED_SKILLS}from'./utils/skills.js';import{spawn}from'child_process';const bold=_0x4e6765=>_0x9ebe44(0x15b)+_0x4e6765+'\x1b[0m',link=(_0x3f0e24,_0x20d594)=>'\x1b]8;;file://'+_0x3f0e24+'\x07'+(_0x20d594||_0x3f0e24)+'\x1b]8;;\x07';async function getOpencodePluginStatus(){const _0x19f5e2=_0x9ebe44,_0x4c5560={'KRPaX':function(_0x65606f,_0xb8e77c){return _0x65606f(_0xb8e77c);},'wzvZA':'opencode-plugin','Sdkta':_0x19f5e2(0x169),'fWKif':'debug','CVFUI':'pipe','nNVkR':_0x19f5e2(0x16b),'tQtfP':'close'};return new Promise(_0x463651=>{const _0x17aa43=_0x19f5e2,_0x4980fb={'hiJuI':function(_0x554baf,_0x994fda){return _0x4c5560['KRPaX'](_0x554baf,_0x994fda);},'cqLpX':'string','lltoQ':_0x4c5560['wzvZA'],'oqFxQ':function(_0x3366a3,_0x21179f){return _0x3366a3!==_0x21179f;},'CcqMh':_0x4c5560[_0x17aa43(0x11f)],'sZJRu':function(_0x3f3ab1,_0x42aec1){return _0x3f3ab1(_0x42aec1);},'rALyg':_0x17aa43(0x165)},_0x13f1d0=spawn('opencode',[_0x4c5560['fWKif'],'config'],{'stdio':[_0x17aa43(0x174),_0x17aa43(0x189),_0x4c5560[_0x17aa43(0x118)]]});let _0x4285fb='';_0x13f1d0['stdout']?.['on'](_0x4c5560['nNVkR'],_0x147aec=>{const _0x378c1c=_0x17aa43;_0x4285fb+=_0x147aec[_0x378c1c(0x13f)]();}),_0x13f1d0[_0x17aa43(0x16d)]?.['on'](_0x17aa43(0x16b),_0x579f7a=>{const _0x5bc64f=_0x17aa43;_0x4285fb+=_0x579f7a[_0x5bc64f(0x13f)]();}),_0x13f1d0['on']('error',()=>{const _0x533705=_0x17aa43;_0x4980fb[_0x533705(0x125)](_0x463651,{'status':'not_installed'});}),_0x13f1d0['on'](_0x4c5560['tQtfP'],_0x2e656a=>{const _0x46d604=_0x17aa43;if(_0x4980fb[_0x46d604(0x170)](_0x2e656a,0x0)){_0x463651({'status':_0x4980fb[_0x46d604(0x12e)]});return;}const _0x342f4c=_0x4285fb[_0x46d604(0x16e)]();let _0x1b6ead=null;if(_0x342f4c)try{_0x1b6ead=JSON[_0x46d604(0x14c)](_0x342f4c);}catch{const _0x47102f=_0x342f4c['match'](/\{[\s\S]*\}$/);if(_0x47102f)try{_0x1b6ead=JSON[_0x46d604(0x14c)](_0x47102f[0x0]);}catch{_0x1b6ead=null;}}const _0x58866e=Array[_0x46d604(0x139)](_0x1b6ead?.[_0x46d604(0x117)])?_0x1b6ead?.['plugin']:[],_0x43fe82=_0x58866e[_0x46d604(0x181)](_0x40ac56=>{const _0x2f0c7b=_0x46d604;if(typeof _0x40ac56!==_0x4980fb[_0x2f0c7b(0x18b)])return![];return _0x40ac56[_0x2f0c7b(0x149)](_0x2f0c7b(0x168))||_0x40ac56[_0x2f0c7b(0x149)](_0x4980fb[_0x2f0c7b(0x11a)]);});if(_0x43fe82){_0x4980fb['sZJRu'](_0x463651,{'status':_0x46d604(0x132),'details':_0x58866e[_0x46d604(0x153)]>0x0?_0x58866e['length']+'\x20plugin(s)\x20configured':undefined});return;}if(_0x58866e['length']>0x0){_0x4980fb[_0x46d604(0x125)](_0x463651,{'status':_0x4980fb[_0x46d604(0x137)],'details':_0x58866e['length']+_0x46d604(0x167)});return;}_0x4980fb[_0x46d604(0x125)](_0x463651,{'status':_0x4980fb[_0x46d604(0x137)]});});});}async function getSkillsFromDir(_0x2af1e1,_0x32176c){const _0x5423d0=_0x9ebe44,_0x312211={'nsLYs':function(_0x50b2d3,_0x29cf76){return _0x50b2d3(_0x29cf76);},'uWUWB':function(_0x182bee,_0x3f3cd0,_0x47c963){return _0x182bee(_0x3f3cd0,_0x47c963);},'UxZzt':function(_0x5dcec4,_0x1d1168,_0x4a64ba,_0x1fffbf){return _0x5dcec4(_0x1d1168,_0x4a64ba,_0x1fffbf);}};if(!_0x312211[_0x5423d0(0x140)](existsSync,_0x2af1e1))return[];const _0x3a6b0d=[];try{const _0x14f3db=await _0x312211[_0x5423d0(0x146)](readdir,_0x2af1e1,{'withFileTypes':!![]});for(const _0x59daa2 of _0x14f3db){if(_0x59daa2[_0x5423d0(0x12f)]()){const _0x4cc979=_0x312211['UxZzt'](join,_0x2af1e1,_0x59daa2[_0x5423d0(0x162)],_0x5423d0(0x135));if(_0x312211[_0x5423d0(0x140)](existsSync,_0x4cc979)){let _0xd928d0=_0x59daa2[_0x5423d0(0x162)];try{const _0x45b58b=await readFile(_0x4cc979,_0x5423d0(0x166)),_0x2775ed=_0x45b58b['match'](/name:\s*(.+)/);_0x2775ed&&(_0xd928d0=_0x2775ed[0x1][_0x5423d0(0x16e)]());}catch{}_0x3a6b0d['push']({'name':_0x59daa2[_0x5423d0(0x162)],'displayName':_0xd928d0,'path':_0x4cc979,'level':_0x32176c});}}}}catch{return[];}return _0x3a6b0d;}async function getInstalledSkills(){const _0x3a047f=_0x9ebe44,_0x1f349f={'JujpI':function(_0x48c152,_0x3a0ec5,_0x524638){return _0x48c152(_0x3a0ec5,_0x524638);},'rLeWI':function(_0x2658fd){return _0x2658fd();}},[_0xa0bdfd,_0x457137]=await Promise[_0x3a047f(0x143)]([_0x1f349f['JujpI'](getSkillsFromDir,getProjectSkillsDir(),_0x3a047f(0x164)),_0x1f349f['JujpI'](getSkillsFromDir,_0x1f349f[_0x3a047f(0x171)](getUserSkillsDir),_0x3a047f(0x127))]);return{'project':_0xa0bdfd,'user':_0x457137};}async function getEnvironments(){const _0x27992f=_0x9ebe44,_0x44f8a7={'ZbNhl':function(_0x1cbf95,_0x4f00e7){return _0x1cbf95(_0x4f00e7);},'QHwNS':function(_0x662dee,_0xc083c4,_0x5e3856){return _0x662dee(_0xc083c4,_0x5e3856);},'ZyRCu':function(_0xfe1a51,_0x18f72b,_0x3c5dbd){return _0xfe1a51(_0x18f72b,_0x3c5dbd);},'BeSMx':'auth.json.enc','Ldrlq':function(_0x4bfcea,_0x203468){return _0x4bfcea(_0x203468);},'zbCxt':_0x27992f(0x12c),'HHnFb':function(_0x74f0e5,_0x6eecb4){return _0x74f0e5(_0x6eecb4);},'KHClg':function(_0x444ac8,_0x1e217f){return _0x444ac8===_0x1e217f;},'bILrB':function(_0x85404d){return _0x85404d();},'KGyYE':function(_0x5dd40d){return _0x5dd40d();}},{envNames:_0x2f51d6,activeEnv:_0x3b839a}=await _0x44f8a7[_0x27992f(0x11d)](getEnvNames),_0x3c81ce=_0x44f8a7[_0x27992f(0x150)](getRangerDir);if(!_0x44f8a7[_0x27992f(0x14a)](existsSync,_0x3c81ce))return{'envs':[],'activeEnv':null};const _0x1e5604=_0x2f51d6[_0x27992f(0x138)](_0x4df038=>{const _0x1dbc3f=_0x27992f,_0x27f54c=_0x44f8a7[_0x1dbc3f(0x116)](getEnvDir,_0x4df038),_0x222a0f=_0x44f8a7['QHwNS'](join,_0x27f54c,_0x1dbc3f(0x133)),_0x3c1ba5=_0x44f8a7[_0x1dbc3f(0x152)](join,_0x27f54c,'auth.json'),_0x211e8c=_0x44f8a7['ZyRCu'](join,_0x27f54c,_0x44f8a7['BeSMx']);return{'name':_0x4df038,'settingsPath':_0x44f8a7['Ldrlq'](existsSync,_0x222a0f)?_0x222a0f:_0x44f8a7[_0x1dbc3f(0x14e)],'hasPlaintextAuth':existsSync(_0x3c1ba5),'hasEncryptedAuth':_0x44f8a7[_0x1dbc3f(0x14a)](existsSync,_0x211e8c),'isActive':_0x44f8a7[_0x1dbc3f(0x183)](_0x4df038,_0x3b839a)};});return{'envs':_0x1e5604,'activeEnv':_0x3b839a};}export async function status(){const _0x38a89e=_0x9ebe44,_0x3c7637={'XOjPs':_0x38a89e(0x147),'LYdRw':function(_0x3c8858,_0x20ecf5){return _0x3c8858(_0x20ecf5);},'PNYZb':function(_0xca581f,_0x28b3ab,_0x434d6d){return _0xca581f(_0x28b3ab,_0x434d6d);},'Aneps':function(_0x2599ef){return _0x2599ef();},'UTUEc':function(_0x57ce5a,_0x2d6b93){return _0x57ce5a!==_0x2d6b93;},'TubrB':function(_0x23f0f5){return _0x23f0f5();},'CphcY':function(_0x33aa5c,_0x19a81f){return _0x33aa5c(_0x19a81f);},'GRqbO':'\x0a---\x20OpenCode\x20Plugin\x20---','fKMtu':function(_0x5cea11){return _0x5cea11();},'DeoHQ':function(_0x39b386,_0x199d71){return _0x39b386===_0x199d71;},'QvCyC':_0x38a89e(0x132),'cDipn':_0x38a89e(0x168),'gSjKr':'\x20\x20Run:\x20ranger\x20setup\x20--opencode','muAiH':_0x38a89e(0x176),'MdRrK':'unknown','BYJUh':_0x38a89e(0x14b),'WyUJz':_0x38a89e(0x12a),'SFHUn':'\x20\x20Not\x20installed','BAlAi':'\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','OPhUk':_0x38a89e(0x180),'uvWbS':function(_0x487fac,_0x30264c){return _0x487fac===_0x30264c;},'LDtEs':_0x38a89e(0x129),'XYWVU':'\x0a---\x20Profiles\x20---','LnUiT':function(_0x1b6758){return _0x1b6758();},'zPlJH':function(_0x59130a){return _0x59130a();},'OmqpC':'No\x20profiles\x20configured','TvPkh':function(_0x5944ad,_0x56d728){return _0x5944ad>_0x56d728;},'wZKye':function(_0x5301af,_0x29abdb){return _0x5301af>_0x29abdb;},'hgQgr':function(_0x564b3f,_0x3712a7){return _0x564b3f(_0x3712a7);},'gcsFz':'\x20(active)','GwgCq':_0x38a89e(0x141),'Hzyax':_0x38a89e(0x12c),'iEswY':function(_0x1de111,_0x10c8ed,_0x1201cd){return _0x1de111(_0x10c8ed,_0x1201cd);},'rgruO':function(_0x4229d4,_0x534ddb){return _0x4229d4(_0x534ddb);}};console['log'](_0x3c7637['XOjPs']);const _0x91d25a=process[_0x38a89e(0x12b)](),_0x3f806c=getRangerDir();if(!_0x3c7637[_0x38a89e(0x161)](existsSync,_0x3f806c)){console[_0x38a89e(0x175)](_0x38a89e(0x13a)+_0x3c7637[_0x38a89e(0x136)](link,_0x91d25a,_0x3c7637[_0x38a89e(0x161)](bold,_0x3c7637[_0x38a89e(0x161)](basename,_0x91d25a)))),console['log']('\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.'),console[_0x38a89e(0x175)]('\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a');return;}console[_0x38a89e(0x175)](_0x38a89e(0x13a)+link(_0x91d25a,_0x3c7637['LYdRw'](bold,basename(_0x91d25a))));const _0x29437d=getCurrentVersion(),_0x5f20b7=_0x3c7637['Aneps'](getLatestVersion);if(_0x5f20b7['version']&&_0x3c7637[_0x38a89e(0x173)](_0x5f20b7[_0x38a89e(0x14d)],_0x29437d))console[_0x38a89e(0x175)](_0x38a89e(0x11c)+_0x29437d+_0x38a89e(0x145)+_0x5f20b7['version']+')'),console[_0x38a89e(0x175)](_0x38a89e(0x130));else _0x5f20b7['version']?console['log']('Version:\x20'+_0x29437d+_0x38a89e(0x160)):console['log'](_0x38a89e(0x11c)+_0x29437d);const _0x55678b=await _0x3c7637[_0x38a89e(0x17d)](getToken);if(_0x55678b){const _0xe01051=await getCurrentUser(_0x55678b);_0xe01051['success']?console[_0x38a89e(0x175)](_0x38a89e(0x134)+_0x3c7637[_0x38a89e(0x18a)](bold,_0xe01051['user']['organizationName'])):(console['log']('API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired'),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]'));}else console[_0x38a89e(0x175)]('API\x20Token:\x20✗\x20Not\x20found'),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]');process[_0x38a89e(0x17f)]['DEBUG']&&(console[_0x38a89e(0x175)](_0x38a89e(0x185)+getCurrentEnvironment()),console[_0x38a89e(0x175)]('API\x20URL:\x20'+getApiBaseUrl()));console[_0x38a89e(0x175)](_0x3c7637['GRqbO']);const _0x432aeb=await _0x3c7637[_0x38a89e(0x142)](getOpencodePluginStatus);if(_0x3c7637['DeoHQ'](_0x432aeb[_0x38a89e(0x14f)],_0x3c7637[_0x38a89e(0x163)]))console['log']('\x20\x20'+_0x3c7637['LYdRw'](bold,_0x3c7637[_0x38a89e(0x123)])+_0x38a89e(0x13d)),_0x432aeb['details']&&console['log']('\x20\x20'+_0x432aeb[_0x38a89e(0x119)]);else _0x432aeb['status']===_0x38a89e(0x165)?(console[_0x38a89e(0x175)](_0x38a89e(0x17c)),_0x432aeb['details']&&console['log']('\x20\x20'+_0x432aeb[_0x38a89e(0x119)]),console['log'](_0x3c7637['gSjKr'])):console[_0x38a89e(0x175)](_0x38a89e(0x179));console[_0x38a89e(0x175)](_0x3c7637[_0x38a89e(0x13c)]);const _0x38cfc7=await getPluginInfo('ranger@trailhead');if(_0x38cfc7){const _0x3bd782=_0x38cfc7['scope']||_0x3c7637['MdRrK'],_0x1bb829=_0x38cfc7['enabled']?_0x3c7637['BYJUh']:_0x3c7637[_0x38a89e(0x120)];console['log']('\x20\x20'+bold('ranger@trailhead')+':\x20installed\x20('+_0x3bd782+',\x20'+_0x1bb829+')');}else console['log'](_0x3c7637[_0x38a89e(0x188)]),console['log'](_0x3c7637[_0x38a89e(0x172)]);console['log'](_0x3c7637['OPhUk']);const {project:_0x217fff,user:_0x2cb0d2}=await getInstalledSkills(),_0x16718c=_0x217fff[_0x38a89e(0x12d)](_0x272366=>RANGER_MANAGED_SKILLS['includes'](_0x272366['name'])),_0x362ad8=_0x2cb0d2[_0x38a89e(0x12d)](_0x42f0c3=>RANGER_MANAGED_SKILLS['includes'](_0x42f0c3['name'])),_0x4055bf=_0x16718c[_0x38a89e(0x153)]+_0x362ad8['length'];if(_0x3c7637[_0x38a89e(0x124)](_0x4055bf,0x0))console[_0x38a89e(0x175)](_0x3c7637[_0x38a89e(0x15d)]),console['log'](_0x38a89e(0x11b));else{if(_0x16718c['length']>0x0){console['log']('\x20\x20Project-level:');for(const _0x5c839a of _0x16718c){console['log']('\x20\x20\x20\x20'+bold(_0x5c839a['displayName'])+':\x20'+link(_0x5c839a[_0x38a89e(0x178)],basename(_0x5c839a['path'])));}}if(_0x362ad8['length']>0x0){console[_0x38a89e(0x175)]('\x20\x20User-level:');for(const _0xa84738 of _0x362ad8){console[_0x38a89e(0x175)](_0x38a89e(0x151)+bold(_0xa84738['displayName'])+':\x20'+_0x3c7637['PNYZb'](link,_0xa84738[_0x38a89e(0x178)],basename(_0xa84738[_0x38a89e(0x178)])));}}}console['log'](_0x3c7637['XYWVU']);const {envs:_0x133617,activeEnv:_0x3a397e}=await _0x3c7637['LnUiT'](getEnvironments);let _0x18b2f6=[];if(_0x55678b)try{_0x18b2f6=await _0x3c7637[_0x38a89e(0x16a)](listCloudProfiles);}catch{}const _0x947b88=_0x133617['length']+_0x18b2f6['length'];if(_0x947b88===0x0)console[_0x38a89e(0x175)](_0x3c7637[_0x38a89e(0x17e)]),console['log'](_0x38a89e(0x17a));else{if(_0x3c7637[_0x38a89e(0x16c)](_0x947b88,0x5)){const _0x58533d=[];_0x18b2f6[_0x38a89e(0x153)]>0x0&&_0x58533d['push'](_0x18b2f6['length']+'\x20cloud'),_0x3c7637[_0x38a89e(0x184)](_0x133617['length'],0x0)&&_0x58533d[_0x38a89e(0x182)](_0x133617['length']+_0x38a89e(0x126)),console['log'](_0x947b88+_0x38a89e(0x15e)+_0x58533d['join'](',\x20')+')'),_0x3a397e&&console['log'](_0x38a89e(0x15c)+_0x3c7637['hgQgr'](bold,_0x3a397e)),console[_0x38a89e(0x175)]('\x20\x20Run:\x20ranger\x20profile\x20ls\x20\x20(list\x20all)');}else{for(const _0x2c9c92 of _0x18b2f6){const _0x5584de=_0x3c7637['DeoHQ'](_0x2c9c92[_0x38a89e(0x162)],_0x3a397e)?_0x3c7637['gcsFz']:'';console['log']('\x20\x20'+bold(_0x2c9c92[_0x38a89e(0x162)])+_0x38a89e(0x156)+_0x5584de);const _0x52318f=_0x2c9c92['sessionUpdatedAt']?'cached\x20(updated\x20'+_0x2c9c92[_0x38a89e(0x187)]+')':_0x3c7637['GwgCq'];console['log'](_0x38a89e(0x157)+_0x52318f);}const _0x35a48a=new Set(_0x18b2f6['map'](_0x59ec4d=>_0x59ec4d['name']));for(const _0xb4abc8 of _0x133617){if(_0x35a48a['has'](_0xb4abc8[_0x38a89e(0x162)]))continue;const _0x30a3f4=_0xb4abc8[_0x38a89e(0x121)]?_0x38a89e(0x148):'',_0x58a031=_0xb4abc8['hasEncryptedAuth']?'encrypted':_0xb4abc8[_0x38a89e(0x13b)]?'plaintext':_0x38a89e(0x159);console[_0x38a89e(0x175)]('\x20\x20'+bold(_0xb4abc8['name'])+'\x20[local]'+_0x30a3f4),console[_0x38a89e(0x175)]('\x20\x20\x20\x20Auth:\x20'+_0x58a031),_0x3c7637[_0x38a89e(0x173)](_0xb4abc8['settingsPath'],_0x3c7637[_0x38a89e(0x177)])&&console[_0x38a89e(0x175)]('\x20\x20\x20\x20Settings:\x20'+_0x3c7637['iEswY'](link,_0xb4abc8['settingsPath'],_0x3c7637[_0x38a89e(0x154)](basename,_0xb4abc8[_0x38a89e(0x16f)])));}if(!_0x3a397e){console['log'](_0x38a89e(0x122));const _0x2808c6=[..._0x18b2f6['map'](_0x1882be=>_0x1882be[_0x38a89e(0x162)]),..._0x133617[_0x38a89e(0x12d)](_0x77f817=>!_0x35a48a['has'](_0x77f817[_0x38a89e(0x162)]))[_0x38a89e(0x138)](_0x58056c=>_0x58056c[_0x38a89e(0x162)])];console['log']('\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20'+_0x2808c6[_0x38a89e(0x13e)](',\x20')+')');}}}console[_0x38a89e(0x175)]('');}
1
+ const _0x3207be=_0x1a0a;(function(_0x22c907,_0x496ae0){const _0x255e1b=_0x1a0a,_0x29b1df=_0x22c907();while(!![]){try{const _0x58b84b=parseInt(_0x255e1b(0x196))/0x1*(-parseInt(_0x255e1b(0x170))/0x2)+-parseInt(_0x255e1b(0x1bc))/0x3*(-parseInt(_0x255e1b(0x1a3))/0x4)+parseInt(_0x255e1b(0x1b1))/0x5*(-parseInt(_0x255e1b(0x188))/0x6)+parseInt(_0x255e1b(0x176))/0x7*(-parseInt(_0x255e1b(0x16a))/0x8)+-parseInt(_0x255e1b(0x167))/0x9*(parseInt(_0x255e1b(0x160))/0xa)+-parseInt(_0x255e1b(0x1c9))/0xb*(-parseInt(_0x255e1b(0x1b9))/0xc)+-parseInt(_0x255e1b(0x19b))/0xd*(-parseInt(_0x255e1b(0x1bf))/0xe);if(_0x58b84b===_0x496ae0)break;else _0x29b1df['push'](_0x29b1df['shift']());}catch(_0x899f2e){_0x29b1df['push'](_0x29b1df['shift']());}}}(_0x1a5b,0xc88b1));import{readFile,readdir}from'fs/promises';import{join,basename}from'path';import{existsSync}from'fs';import{getToken}from'./utils/keychain.js';import{getCurrentVersion,getLatestVersion}from'./utils/version.js';import{getApiBaseUrl,getCurrentEnvironment}from'./utils/environment.js';function _0x1a0a(_0x152e3a,_0x5ae2e7){_0x152e3a=_0x152e3a-0x157;const _0x1a5b92=_0x1a5b();let _0x1a0a4a=_0x1a5b92[_0x152e3a];return _0x1a0a4a;}import{getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getEnvNames}from'./env.js';import{getCurrentUser}from'./utils/userApi.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getEnvDir}from'./utils/settings.js';import{listCloudProfiles}from'./utils/cloudProfile.js';import{getPluginInfo}from'./utils/claudePlugin.js';import{RANGER_MANAGED_SKILLS}from'./utils/skills.js';import{spawn}from'child_process';function _0x1a5b(){const _0x3b7c49=['API\x20Token:\x20✗\x20Not\x20found','hasPlaintextAuth','sessionUpdatedAt','API\x20Environment:\x20','disabled','\x20(active)','295245fBijGQ','iXLaQ','NiZXl','8cenKiw','LnaKy',':\x20installed\x20(','cmztS','filter','settingsPath','6CloRiC','LBDcf','isArray','organizationName','\x20\x20Run:\x20ranger\x20update','Root:\x20','7724451pxwqbT','plugin','\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20','Version:\x20','AhQmw','enabled','not_configured','\x1b]8;;file://','PZHSO','\x0a---\x20OpenCode\x20Plugin\x20---','no\x20session','ranger@trailhead','kYGxV','\x1b[1m','\x1b[0m','XKKxr','toString','rwLTj','4248OrbioA','scope','bLYUj','stdout','join','bHspi','sBPmc','version','\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','RuGTQ','log',':\x20configured','API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired','Ncrqd','141366uhorpH','length','success','trim','utf-8','39HeDIFr','AxItH','(not\x20found)','SKILL.md','XBkxw','iBXEJ','cwd','Organization:\x20','265532kWPLwt','zMnnF','opencode','close','push','\x20\x20Not\x20installed','\x20plugin(s)\x20configured','env','\x20\x20\x20\x20','FgZSK','status','unknown','\x0a---\x20Claude\x20Code\x20Plugin\x20---','\x20\x20Not\x20configured','7690VeGfRD','pipe','Dxqae','DEBUG','API\x20URL:\x20','\x20\x20User-level:','\x20\x20Active:\x20','match','12VHgLJd','eWwly','displayName','33Ohrunf','\x20\x20\x20\x20Session:\x20','\x20profiles\x20configured\x20(','14691068tjRNRQ','FHufN','\x0a\x20\x20No\x20active\x20profile\x20set','map','\x20(latest:\x20','\x20\x20Run:\x20ranger\x20setup\x20[token]','xAetZ','xxutH','details','data','6703191oyRGJV','name','has','path','\x20\x20Run:\x20ranger\x20setup\x20--opencode','opencode-plugin','pGOLV','\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available','taNcw','\x20[local]','320oKyGIX'];_0x1a5b=function(){return _0x3b7c49;};return _0x1a5b();}const bold=_0x16c77a=>_0x3207be(0x183)+_0x16c77a+_0x3207be(0x184),link=(_0x4eff33,_0x14f55e)=>_0x3207be(0x17d)+_0x4eff33+'\x07'+(_0x14f55e||_0x4eff33)+'\x1b]8;;\x07';async function getOpencodePluginStatus(){const _0x4b3b55=_0x3207be,_0x327734={'ucavP':'not_installed','FgZSK':function(_0x441a02,_0x1b650e){return _0x441a02(_0x1b650e);},'NiZXl':_0x4b3b55(0x17c),'TRZTj':function(_0x38b4dd,_0x2c55de){return _0x38b4dd(_0x2c55de);},'HomeO':function(_0x1f860c,_0x5199fe){return _0x1f860c!==_0x5199fe;},'ZhvMe':'@ranger-testing/opencode-plugin','AhQmw':_0x4b3b55(0x15b),'PZHSO':'config','iBXEJ':_0x4b3b55(0x1c8),'taNcw':'error','MgoGk':_0x4b3b55(0x1a6)};return new Promise(_0x17e678=>{const _0x4f0b51=_0x4b3b55,_0x199407={'iYYKG':_0x327734['ucavP'],'IEZDV':function(_0x2d5631,_0x59c3eb){return _0x327734['HomeO'](_0x2d5631,_0x59c3eb);},'Ncrqd':_0x327734['ZhvMe'],'BBNQB':_0x327734[_0x4f0b51(0x17a)]},_0x20ee15=spawn(_0x4f0b51(0x1a5),['debug',_0x327734[_0x4f0b51(0x17e)]],{'stdio':['ignore',_0x4f0b51(0x1b2),_0x4f0b51(0x1b2)]});let _0xa8dad0='';_0x20ee15[_0x4f0b51(0x18b)]?.['on'](_0x327734['iBXEJ'],_0x3b261a=>{const _0x9a005=_0x4f0b51;_0xa8dad0+=_0x3b261a[_0x9a005(0x186)]();}),_0x20ee15['stderr']?.['on'](_0x327734[_0x4f0b51(0x1a0)],_0x21d680=>{_0xa8dad0+=_0x21d680['toString']();}),_0x20ee15['on'](_0x327734[_0x4f0b51(0x15e)],()=>{_0x17e678({'status':_0x199407['iYYKG']});}),_0x20ee15['on'](_0x327734['MgoGk'],_0x1bf29e=>{const _0x22cead=_0x4f0b51;if(_0x1bf29e!==0x0){_0x17e678({'status':_0x327734['ucavP']});return;}const _0xb03bb0=_0xa8dad0[_0x22cead(0x199)]();let _0x325a4a=null;if(_0xb03bb0)try{_0x325a4a=JSON['parse'](_0xb03bb0);}catch{const _0xb9f8cb=_0xb03bb0['match'](/\{[\s\S]*\}$/);if(_0xb9f8cb)try{_0x325a4a=JSON['parse'](_0xb9f8cb[0x0]);}catch{_0x325a4a=null;}}const _0xdbaf16=Array[_0x22cead(0x172)](_0x325a4a?.[_0x22cead(0x177)])?_0x325a4a?.[_0x22cead(0x177)]:[],_0x192bd5=_0xdbaf16['some'](_0x17ef4c=>{const _0x2c61d5=_0x22cead;if(_0x199407['IEZDV'](typeof _0x17ef4c,'string'))return![];return _0x17ef4c['includes'](_0x199407[_0x2c61d5(0x195)])||_0x17ef4c['includes'](_0x199407['BBNQB']);});if(_0x192bd5){_0x327734[_0x22cead(0x1ac)](_0x17e678,{'status':'configured','details':_0xdbaf16[_0x22cead(0x197)]>0x0?_0xdbaf16['length']+_0x22cead(0x1a9):undefined});return;}if(_0xdbaf16['length']>0x0){_0x17e678({'status':_0x327734['NiZXl'],'details':_0xdbaf16[_0x22cead(0x197)]+'\x20plugin(s)\x20configured'});return;}_0x327734['TRZTj'](_0x17e678,{'status':_0x327734[_0x22cead(0x169)]});});});}async function getSkillsFromDir(_0x142178,_0x3f51f9){const _0x284030=_0x3207be,_0x1501a6={'AHdUn':function(_0x19b4df,_0x264ef8){return _0x19b4df(_0x264ef8);},'xxutH':function(_0x5d403b,_0xe13c42,_0xe43ad1){return _0x5d403b(_0xe13c42,_0xe43ad1);},'LnaKy':function(_0xe74177,_0x4845e5,_0x5b62a2,_0x516b3b){return _0xe74177(_0x4845e5,_0x5b62a2,_0x516b3b);},'zMnnF':_0x284030(0x19e),'sBPmc':function(_0x28d7c1,_0x38889f){return _0x28d7c1(_0x38889f);}};if(!_0x1501a6['AHdUn'](existsSync,_0x142178))return[];const _0x4e1ce2=[];try{const _0x39a1c4=await _0x1501a6[_0x284030(0x1c6)](readdir,_0x142178,{'withFileTypes':!![]});for(const _0x378b8c of _0x39a1c4){if(_0x378b8c['isDirectory']()){const _0x48b1cd=_0x1501a6[_0x284030(0x16b)](join,_0x142178,_0x378b8c[_0x284030(0x157)],_0x1501a6[_0x284030(0x1a4)]);if(_0x1501a6[_0x284030(0x18e)](existsSync,_0x48b1cd)){let _0xa39ed3=_0x378b8c['name'];try{const _0x4dbe7e=await readFile(_0x48b1cd,_0x284030(0x19a)),_0x207314=_0x4dbe7e[_0x284030(0x1b8)](/name:\s*(.+)/);_0x207314&&(_0xa39ed3=_0x207314[0x1][_0x284030(0x199)]());}catch{}_0x4e1ce2[_0x284030(0x1a7)]({'name':_0x378b8c[_0x284030(0x157)],'displayName':_0xa39ed3,'path':_0x48b1cd,'level':_0x3f51f9});}}}}catch{return[];}return _0x4e1ce2;}async function getInstalledSkills(){const _0x246a8d=_0x3207be,_0x56e037={'XBkxw':function(_0x2b8704,_0x1f315b,_0x3c7923){return _0x2b8704(_0x1f315b,_0x3c7923);}},[_0x150747,_0x22dbcf]=await Promise['all']([_0x56e037['XBkxw'](getSkillsFromDir,getProjectSkillsDir(),'project'),_0x56e037[_0x246a8d(0x19f)](getSkillsFromDir,getUserSkillsDir(),'user')]);return{'project':_0x150747,'user':_0x22dbcf};}async function getEnvironments(){const _0x128ad0={'RBfzV':function(_0x3e1c09,_0x5ea566){return _0x3e1c09(_0x5ea566);},'qtZaL':function(_0x396e79,_0x276781,_0x971f51){return _0x396e79(_0x276781,_0x971f51);},'AesBk':'settings.json','QMGtm':function(_0x575c6b,_0x3f6448,_0x277651){return _0x575c6b(_0x3f6448,_0x277651);},'LBDcf':'auth.json.enc','eOBJQ':function(_0xb9e68f,_0x2d9d51){return _0xb9e68f===_0x2d9d51;},'uSIKQ':function(_0x338d3c,_0x11250e){return _0x338d3c(_0x11250e);}},{envNames:_0x1eca4a,activeEnv:_0x336eb7}=await getEnvNames(),_0x1d99f9=getRangerDir();if(!_0x128ad0['uSIKQ'](existsSync,_0x1d99f9))return{'envs':[],'activeEnv':null};const _0x104b98=_0x1eca4a['map'](_0x2be2d0=>{const _0x3e5210=_0x1a0a,_0x598ba3=_0x128ad0['RBfzV'](getEnvDir,_0x2be2d0),_0x2486e5=_0x128ad0['qtZaL'](join,_0x598ba3,_0x128ad0['AesBk']),_0x6afae6=_0x128ad0['QMGtm'](join,_0x598ba3,'auth.json'),_0x1739ec=_0x128ad0['QMGtm'](join,_0x598ba3,_0x128ad0[_0x3e5210(0x171)]);return{'name':_0x2be2d0,'settingsPath':existsSync(_0x2486e5)?_0x2486e5:_0x3e5210(0x19d),'hasPlaintextAuth':_0x128ad0['RBfzV'](existsSync,_0x6afae6),'hasEncryptedAuth':_0x128ad0['RBfzV'](existsSync,_0x1739ec),'isActive':_0x128ad0['eOBJQ'](_0x2be2d0,_0x336eb7)};});return{'envs':_0x104b98,'activeEnv':_0x336eb7};}export async function status(){const _0x135ddf=_0x3207be,_0x30e774={'rwLTj':function(_0x5118f0){return _0x5118f0();},'xAetZ':function(_0xd7ce4e,_0x302a6b,_0x1c49e3){return _0xd7ce4e(_0x302a6b,_0x1c49e3);},'BaUMh':function(_0x430369,_0x5d140d){return _0x430369(_0x5d140d);},'kYGxV':function(_0x361ee4){return _0x361ee4();},'BMiAf':function(_0x1ddb0b,_0x49cd82){return _0x1ddb0b!==_0x49cd82;},'kvawj':function(_0x32cbaa,_0x212c68){return _0x32cbaa(_0x212c68);},'JHMxM':_0x135ddf(0x17f),'Dxqae':'configured','RuGTQ':function(_0xaa0b08,_0x68cfa){return _0xaa0b08(_0x68cfa);},'pFbcP':_0x135ddf(0x15a),'ezeco':_0x135ddf(0x15d),'FDNWK':_0x135ddf(0x1af),'LVauY':'ranger@trailhead','bLYUj':_0x135ddf(0x190),'iXLaQ':function(_0x5d08b2){return _0x5d08b2();},'XKKxr':function(_0x2b7494,_0x3f3a27){return _0x2b7494+_0x3f3a27;},'ghmmJ':function(_0x55a715,_0x26fba9){return _0x55a715===_0x26fba9;},'cmztS':function(_0x2751ec,_0xc4017f){return _0x2751ec>_0xc4017f;},'gJAtn':'\x20\x20Project-level:','WMqeE':_0x135ddf(0x1b6),'HsNjR':function(_0xb2bebe,_0x32cd99,_0x329078){return _0xb2bebe(_0x32cd99,_0x329078);},'AxItH':function(_0x7cfc24,_0x277f1a){return _0x7cfc24(_0x277f1a);},'hxBBZ':'\x0a---\x20Profiles\x20---','pGOLV':'No\x20profiles\x20configured','bHspi':function(_0x1607f6,_0x268b03){return _0x1607f6>_0x268b03;},'zvJcB':_0x135ddf(0x180),'LriCK':_0x135ddf(0x166),'FHufN':'none','eWwly':_0x135ddf(0x19d)};console['log']('\x0a📊\x20Ranger\x20Status\x0a');const _0x48b0fd=process[_0x135ddf(0x1a1)](),_0x4804c9=_0x30e774[_0x135ddf(0x187)](getRangerDir);if(!existsSync(_0x4804c9)){console[_0x135ddf(0x192)](_0x135ddf(0x175)+_0x30e774['xAetZ'](link,_0x48b0fd,bold(_0x30e774['BaUMh'](basename,_0x48b0fd)))),console[_0x135ddf(0x192)]('\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.'),console[_0x135ddf(0x192)]('\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a');return;}console[_0x135ddf(0x192)](_0x135ddf(0x175)+_0x30e774[_0x135ddf(0x1c5)](link,_0x48b0fd,_0x30e774['BaUMh'](bold,basename(_0x48b0fd))));const _0x456145=_0x30e774['rwLTj'](getCurrentVersion),_0x16122c=_0x30e774[_0x135ddf(0x182)](getLatestVersion);if(_0x16122c['version']&&_0x30e774['BMiAf'](_0x16122c['version'],_0x456145))console[_0x135ddf(0x192)]('Version:\x20'+_0x456145+_0x135ddf(0x1c3)+_0x16122c[_0x135ddf(0x18f)]+')'),console['log'](_0x135ddf(0x174));else _0x16122c[_0x135ddf(0x18f)]?console['log'](_0x135ddf(0x179)+_0x456145+'\x20(up\x20to\x20date)'):console[_0x135ddf(0x192)]('Version:\x20'+_0x456145);const _0x46ebc1=await getToken();if(_0x46ebc1){const _0x1cb4f5=await _0x30e774['kvawj'](getCurrentUser,_0x46ebc1);_0x1cb4f5[_0x135ddf(0x198)]?console[_0x135ddf(0x192)](_0x135ddf(0x1a2)+_0x30e774['kvawj'](bold,_0x1cb4f5['user'][_0x135ddf(0x173)])):(console[_0x135ddf(0x192)](_0x135ddf(0x194)),console[_0x135ddf(0x192)](_0x135ddf(0x1c4)));}else console['log'](_0x135ddf(0x161)),console['log'](_0x135ddf(0x1c4));process[_0x135ddf(0x1aa)][_0x135ddf(0x1b4)]&&(console[_0x135ddf(0x192)](_0x135ddf(0x164)+getCurrentEnvironment()),console['log'](_0x135ddf(0x1b5)+getApiBaseUrl()));console[_0x135ddf(0x192)](_0x30e774['JHMxM']);const _0x57c14f=await getOpencodePluginStatus();if(_0x57c14f[_0x135ddf(0x1ad)]===_0x30e774[_0x135ddf(0x1b3)])console['log']('\x20\x20'+_0x30e774[_0x135ddf(0x191)](bold,'@ranger-testing/opencode-plugin')+_0x135ddf(0x193)),_0x57c14f['details']&&console['log']('\x20\x20'+_0x57c14f['details']);else _0x57c14f['status']===_0x135ddf(0x17c)?(console[_0x135ddf(0x192)](_0x135ddf(0x1b0)),_0x57c14f[_0x135ddf(0x1c7)]&&console['log']('\x20\x20'+_0x57c14f['details']),console[_0x135ddf(0x192)](_0x30e774['pFbcP'])):console[_0x135ddf(0x192)](_0x30e774['ezeco']);console['log'](_0x30e774['FDNWK']);const _0x273524=await getPluginInfo(_0x30e774['LVauY']);if(_0x273524){const _0x30cdc5=_0x273524[_0x135ddf(0x189)]||_0x135ddf(0x1ae),_0x18c15f=_0x273524[_0x135ddf(0x17b)]?_0x135ddf(0x17b):_0x135ddf(0x165);console['log']('\x20\x20'+_0x30e774[_0x135ddf(0x191)](bold,_0x135ddf(0x181))+_0x135ddf(0x16c)+_0x30cdc5+',\x20'+_0x18c15f+')');}else console['log'](_0x135ddf(0x1a8)),console[_0x135ddf(0x192)](_0x30e774[_0x135ddf(0x18a)]);console[_0x135ddf(0x192)]('\x0a---\x20Skills\x20---');const {project:_0x44a8da,user:_0x18b176}=await _0x30e774[_0x135ddf(0x168)](getInstalledSkills),_0x7fff83=_0x44a8da[_0x135ddf(0x16e)](_0x29ec42=>RANGER_MANAGED_SKILLS['includes'](_0x29ec42['name'])),_0x31326c=_0x18b176['filter'](_0x20f5db=>RANGER_MANAGED_SKILLS['includes'](_0x20f5db[_0x135ddf(0x157)])),_0x95fa46=_0x30e774[_0x135ddf(0x185)](_0x7fff83['length'],_0x31326c[_0x135ddf(0x197)]);if(_0x30e774['ghmmJ'](_0x95fa46,0x0))console[_0x135ddf(0x192)]('No\x20skills\x20installed'),console[_0x135ddf(0x192)]('\x20\x20Run:\x20ranger\x20skillup');else{if(_0x30e774[_0x135ddf(0x16d)](_0x7fff83['length'],0x0)){console[_0x135ddf(0x192)](_0x30e774['gJAtn']);for(const _0x33ee1c of _0x7fff83){console['log']('\x20\x20\x20\x20'+bold(_0x33ee1c[_0x135ddf(0x1bb)])+':\x20'+link(_0x33ee1c[_0x135ddf(0x159)],basename(_0x33ee1c[_0x135ddf(0x159)])));}}if(_0x30e774['cmztS'](_0x31326c[_0x135ddf(0x197)],0x0)){console['log'](_0x30e774['WMqeE']);for(const _0x565300 of _0x31326c){console['log'](_0x135ddf(0x1ab)+bold(_0x565300[_0x135ddf(0x1bb)])+':\x20'+_0x30e774['HsNjR'](link,_0x565300['path'],_0x30e774[_0x135ddf(0x19c)](basename,_0x565300[_0x135ddf(0x159)])));}}}console['log'](_0x30e774['hxBBZ']);const {envs:_0x191647,activeEnv:_0x5cf8de}=await _0x30e774['rwLTj'](getEnvironments);let _0xcc6d39=[];if(_0x46ebc1)try{_0xcc6d39=await listCloudProfiles();}catch{}const _0x1b80a5=_0x191647[_0x135ddf(0x197)]+_0xcc6d39[_0x135ddf(0x197)];if(_0x1b80a5===0x0)console[_0x135ddf(0x192)](_0x30e774[_0x135ddf(0x15c)]),console[_0x135ddf(0x192)]('\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>');else{if(_0x30e774['bHspi'](_0x1b80a5,0x5)){const _0x240e07=[];_0xcc6d39[_0x135ddf(0x197)]>0x0&&_0x240e07[_0x135ddf(0x1a7)](_0xcc6d39[_0x135ddf(0x197)]+'\x20cloud'),_0x30e774[_0x135ddf(0x18d)](_0x191647[_0x135ddf(0x197)],0x0)&&_0x240e07[_0x135ddf(0x1a7)](_0x191647['length']+'\x20local'),console['log'](_0x1b80a5+_0x135ddf(0x1be)+_0x240e07[_0x135ddf(0x18c)](',\x20')+')'),_0x5cf8de&&console[_0x135ddf(0x192)](_0x135ddf(0x1b7)+_0x30e774[_0x135ddf(0x191)](bold,_0x5cf8de)),console[_0x135ddf(0x192)]('\x20\x20Run:\x20ranger\x20profile\x20ls\x20\x20(list\x20all)');}else{for(const _0xc6c8d6 of _0xcc6d39){const _0x337648=_0xc6c8d6[_0x135ddf(0x157)]===_0x5cf8de?_0x135ddf(0x166):'';console['log']('\x20\x20'+bold(_0xc6c8d6['name'])+'\x20[cloud]'+_0x337648);const _0x427a43=_0xc6c8d6[_0x135ddf(0x163)]?'cached\x20(updated\x20'+_0xc6c8d6[_0x135ddf(0x163)]+')':_0x30e774['zvJcB'];console[_0x135ddf(0x192)](_0x135ddf(0x1bd)+_0x427a43);}const _0x588ee9=new Set(_0xcc6d39[_0x135ddf(0x1c2)](_0x890d3d=>_0x890d3d['name']));for(const _0x2a723c of _0x191647){if(_0x588ee9[_0x135ddf(0x158)](_0x2a723c[_0x135ddf(0x157)]))continue;const _0x53d9d3=_0x2a723c['isActive']?_0x30e774['LriCK']:'',_0x42f611=_0x2a723c['hasEncryptedAuth']?'encrypted':_0x2a723c[_0x135ddf(0x162)]?'plaintext':_0x30e774[_0x135ddf(0x1c0)];console['log']('\x20\x20'+bold(_0x2a723c[_0x135ddf(0x157)])+_0x135ddf(0x15f)+_0x53d9d3),console['log']('\x20\x20\x20\x20Auth:\x20'+_0x42f611),_0x2a723c['settingsPath']!==_0x30e774[_0x135ddf(0x1ba)]&&console['log']('\x20\x20\x20\x20Settings:\x20'+link(_0x2a723c['settingsPath'],basename(_0x2a723c[_0x135ddf(0x16f)])));}if(!_0x5cf8de){console['log'](_0x135ddf(0x1c1));const _0x2c5b11=[..._0xcc6d39[_0x135ddf(0x1c2)](_0x515204=>_0x515204[_0x135ddf(0x157)]),..._0x191647[_0x135ddf(0x16e)](_0x400596=>!_0x588ee9['has'](_0x400596['name']))['map'](_0x15d1a9=>_0x15d1a9[_0x135ddf(0x157)])];console['log'](_0x135ddf(0x178)+_0x2c5b11['join'](',\x20')+')');}}}console['log']('');}