@ranger-testing/ranger-cli 3.1.6-alpha.aca5f9c-53 → 3.1.7-alpha.62f152a-54

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 -1
  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 _0x557f(){const _0x43a205=['success','message','xZAjR','log','LDNar','2855908vvjRii','7893nNUVuQ','227IVFHVv','2426880ZdyTpr','83544BOSgdd','2693770JsypMd','\x0a✅\x20API\x20key\x20stored\x20successfully','3710aCACQL','468pHMfLe','isVUy','Re-authenticating\x20via\x20MCP\x20bootstrap...','3176DyBeih','Lzmoj','5826mmqrCe','28wARjGV','Login\x20requires\x20an\x20interactive\x20terminal.\x20In\x20CI,\x20use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.','user'];_0x557f=function(){return _0x43a205;};return _0x557f();}(function(_0x25ab02,_0x578c6c){const _0x331bc7=_0x3f4c,_0x16659f=_0x25ab02();while(!![]){try{const _0x15a19c=-parseInt(_0x331bc7(0xbd))/0x1*(-parseInt(_0x331bc7(0xc2))/0x2)+-parseInt(_0x331bc7(0xc8))/0x3*(parseInt(_0x331bc7(0xc3))/0x4)+parseInt(_0x331bc7(0xbe))/0x5+-parseInt(_0x331bc7(0xbf))/0x6*(parseInt(_0x331bc7(0xc9))/0x7)+parseInt(_0x331bc7(0xc6))/0x8*(-parseInt(_0x331bc7(0xbc))/0x9)+parseInt(_0x331bc7(0xc0))/0xa+-parseInt(_0x331bc7(0xbb))/0xb;if(_0x15a19c===_0x578c6c)break;else _0x16659f['push'](_0x16659f['shift']());}catch(_0x7a95bf){_0x16659f['push'](_0x16659f['shift']());}}}(_0x557f,0x459cb));import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{getCurrentUser}from'./utils/userApi.js';import{getMcpAuthOrigin,mcpBootstrap}from'./mcpBootstrap.js';import{isInteractive}from'./utils/cloudProfileSession.js';function _0x3f4c(_0x53badf,_0xa77cbd){_0x53badf=_0x53badf-0xb6;const _0x557f16=_0x557f();let _0x3f4ce3=_0x557f16[_0x53badf];return _0x3f4ce3;}export async function login(){const _0x564ac6=_0x3f4c,_0x25a199={'isVUy':function(_0x4d45c2){return _0x4d45c2();},'Lzmoj':function(_0xf2b8ad){return _0xf2b8ad();},'LDNar':function(_0x3ccac8){return _0x3ccac8();},'qyybl':function(_0x15644d,_0x2ae39d){return _0x15644d(_0x2ae39d);},'xZAjR':function(_0x44e62a,_0x451762){return _0x44e62a instanceof _0x451762;}},_0x1bf2be=await _0x25a199[_0x564ac6(0xc4)](getMcpAuthOrigin);if(_0x1bf2be){console['log'](_0x564ac6(0xc5)),await _0x25a199[_0x564ac6(0xc7)](mcpBootstrap);return;}if(!_0x25a199[_0x564ac6(0xc4)](isInteractive))throw new Error(_0x564ac6(0xca));try{const _0x4f6467=await _0x25a199[_0x564ac6(0xba)](runDeviceAuthFlow),_0x41d31b=await _0x25a199['qyybl'](getCurrentUser,_0x4f6467);_0x41d31b[_0x564ac6(0xb6)]?console[_0x564ac6(0xb9)]('\x0a✅\x20Logged\x20in\x20to\x20'+_0x41d31b[_0x564ac6(0xcb)]['organizationName']):console['log'](_0x564ac6(0xc1));}catch(_0x36f1ac){throw new Error('Login\x20failed:\x20'+(_0x25a199[_0x564ac6(0xb8)](_0x36f1ac,Error)?_0x36f1ac[_0x564ac6(0xb7)]:_0x36f1ac));}}
1
+ (function(_0x531f09,_0x4c1497){const _0x1325c4=_0x46a5,_0x471818=_0x531f09();while(!![]){try{const _0x588ac7=parseInt(_0x1325c4(0x18d))/0x1+-parseInt(_0x1325c4(0x18f))/0x2*(parseInt(_0x1325c4(0x189))/0x3)+parseInt(_0x1325c4(0x195))/0x4*(parseInt(_0x1325c4(0x190))/0x5)+parseInt(_0x1325c4(0x18b))/0x6*(parseInt(_0x1325c4(0x196))/0x7)+parseInt(_0x1325c4(0x186))/0x8*(-parseInt(_0x1325c4(0x18c))/0x9)+-parseInt(_0x1325c4(0x185))/0xa+parseInt(_0x1325c4(0x194))/0xb;if(_0x588ac7===_0x4c1497)break;else _0x471818['push'](_0x471818['shift']());}catch(_0x477e03){_0x471818['push'](_0x471818['shift']());}}}(_0x323c,0x61a0c));import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{getCurrentUser}from'./utils/userApi.js';import{getMcpAuthOrigin,mcpBootstrap}from'./mcpBootstrap.js';import{isInteractive}from'./utils/cloudProfileSession.js';function _0x46a5(_0x19a6b6,_0x49b0b0){_0x19a6b6=_0x19a6b6-0x185;const _0x323cf5=_0x323c();let _0x46a538=_0x323cf5[_0x19a6b6];return _0x46a538;}export async function login(){const _0x5b9811=_0x46a5,_0x1b460a={'Pwwvx':'Re-authenticating\x20via\x20MCP\x20bootstrap...','Bgblw':function(_0x2d6189){return _0x2d6189();},'dzQpD':_0x5b9811(0x198),'wbAcl':_0x5b9811(0x19a)},_0x5c857b=await getMcpAuthOrigin();if(_0x5c857b){console['log'](_0x1b460a[_0x5b9811(0x192)]),await mcpBootstrap();return;}if(!_0x1b460a[_0x5b9811(0x191)](isInteractive))throw new Error(_0x1b460a[_0x5b9811(0x18e)]);try{const _0x3a146a=await runDeviceAuthFlow(),_0x2fadb5=await getCurrentUser(_0x3a146a);_0x2fadb5['success']?console[_0x5b9811(0x188)]('\x0a✅\x20Logged\x20in\x20to\x20'+_0x2fadb5[_0x5b9811(0x197)][_0x5b9811(0x18a)]):console['log'](_0x1b460a[_0x5b9811(0x199)]);}catch(_0x2b6752){throw new Error(_0x5b9811(0x187)+(_0x2b6752 instanceof Error?_0x2b6752[_0x5b9811(0x193)]:_0x2b6752));}}function _0x323c(){const _0x5d0d66=['72GDEMSA','486384WWIoMq','dzQpD','177530iMNeBS','231705uIXdzE','Bgblw','Pwwvx','message','4245164bcmGDd','28SCgtVL','1961309OXlOQI','user','Login\x20requires\x20an\x20interactive\x20terminal.\x20In\x20CI,\x20use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.','wbAcl','\x0a✅\x20API\x20key\x20stored\x20successfully','6772260YlqOOi','44712pWPiMZ','Login\x20failed:\x20','log','12VxYPwm','organizationName','6MzPESX'];_0x323c=function(){return _0x5d0d66;};return _0x323c();}
@@ -1 +1 @@
1
- const _0x3371a5=_0x38b8;(function(_0x21f57a,_0x581c64){const _0x4824e4=_0x38b8,_0xbee225=_0x21f57a();while(!![]){try{const _0x45c55d=-parseInt(_0x4824e4(0x1b7))/0x1*(parseInt(_0x4824e4(0x21f))/0x2)+-parseInt(_0x4824e4(0x247))/0x3+-parseInt(_0x4824e4(0x1b9))/0x4*(parseInt(_0x4824e4(0x231))/0x5)+parseInt(_0x4824e4(0x1cb))/0x6+parseInt(_0x4824e4(0x1c8))/0x7*(parseInt(_0x4824e4(0x1e2))/0x8)+parseInt(_0x4824e4(0x1c7))/0x9*(parseInt(_0x4824e4(0x20d))/0xa)+-parseInt(_0x4824e4(0x1c1))/0xb;if(_0x45c55d===_0x581c64)break;else _0xbee225['push'](_0xbee225['shift']());}catch(_0x1df346){_0xbee225['push'](_0xbee225['shift']());}}}(_0x4a09,0xd3b92));import{mkdir,writeFile,readFile}from'fs/promises';import{join}from'path';function _0x4a09(){const _0x5d2ee7=['Registering\x20OAuth\x20client...','authorization_code','now','message','vNYOa','split','stringify','WPSQX','response_type','open','status','1.0.0','Run\x20`ranger\x20status`\x20to\x20verify\x20authentication.\x0a','hex','JkQyQ','token_endpoint','NShbf','gklMb','origin','utf-8','IZxdv','trim','log','code','Could\x20not\x20extract\x20token\x20from\x20MCP\x20response','write','nzfBv','application/json,\x20text/event-stream','Could\x20not\x20fetch\x20auth\x20server\x20metadata\x20from\x20','Bhcnc','tLZOJ','</p><p>You\x20can\x20close\x20this\x20window.</p></body></html>','http://localhost:','XiADS','HTTP\x20','Bearer\x20','YvnEs','MCP\x20server\x20requires\x20authentication\x20but\x20running\x20in\x20non-interactive\x20mode.\x0a','LaRPT','error_description','expiresAt','100ukzcOk','iPoGv','pNMQt','WCSBY','toString','refreshToken','type','JoTSz','get_cli_token','IeRFf','Authorization\x20server\x20does\x20not\x20support\x20dynamic\x20client\x20registration\x20and\x20no\x20cached\x20client\x20found','data:','CaYmb','iKlPG','WvJgj','darwin','OAuth\x20error:\x20','access_token','132094IYatuV','get','authorization_endpoint','ZzSQz','GdtUK','resource','tools/call','application/x-www-form-urlencoded','isTTY','content-type','text/html','Exchanging\x20authorization\x20code...','<html><body><h2>Authentication\x20failed</h2><p>','.ranger','result','auth-origin.txt','structuredContent','token','197445lfXksS','dJcjp','fgyUq','digest','uDAoA','includes','uFtZq','TcKPN','platform','content','tLwgP','slice','stdout','iabos','xdg-open','tcNGL','jYEPY','kfCSl','ranger-cli','client_id','pathname','ISyWS','1041357YIdfNZ','slMCk','LSzwG','\x20done','vVxBW','url','EMahp','WmOHF','GQFKF','set','authorization_servers','2025-03-26','notifications/initialized','1ttxenV','oScId','20XrLxYn','client_secret','QiVKz','uECTj','accessToken','lRmFs','2.0','proxied','8855033OdLbcA','No\x20authorization_servers\x20in\x20protected\x20resource\x20metadata','listen','VpaHY','S256','PLnYS','623961hnCDDj','14JlbjKZ','end','string','5490984nTCpUu','TDbOs','parse','json','ilkOM','clientSecret','ZQpIG','replace','puPMb','BIvYH','sha256','error','UAYfi','YspXz','XEpDS','Run\x20`ranger\x20setup\x20--mcp-bootstrap`\x20interactively\x20first.','closeAllConnections','ERRXX','text','uUiCo','code_challenge','uPjbp','searchParams','2697512mXIPkv','clientId'];_0x4a09=function(){return _0x5d2ee7;};return _0x4a09();}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(),'.ranger','mcp-oauth-tokens.json'),AUTH_ORIGIN_PATH=join(homedir(),'.ranger',_0x3371a5(0x22e));export async function getMcpAuthOrigin(){const _0x2fd28e=_0x3371a5,_0x13e4e3={'WmOHF':function(_0x364311,_0x53489e,_0x3597f3){return _0x364311(_0x53489e,_0x3597f3);},'dmVme':'utf-8'};try{const _0x547b0c=(await _0x13e4e3[_0x2fd28e(0x24e)](readFile,AUTH_ORIGIN_PATH,_0x13e4e3['dmVme']))[_0x2fd28e(0x1f9)]();return _0x547b0c||null;}catch{return null;}}function _0x38b8(_0x128c69,_0x4d969e){_0x128c69=_0x128c69-0x1b5;const _0x4a0933=_0x4a09();let _0x38b819=_0x4a0933[_0x128c69];return _0x38b819;}export async function mcpBootstrap(){const _0x2640c6=_0x3371a5,_0x59bbf8={'ZYCWK':function(_0x332d5f,_0x39e19f){return _0x332d5f(_0x39e19f);},'GdtUK':function(_0x359249,_0x5a2760,_0x123280){return _0x359249(_0x5a2760,_0x123280);}},_0x36d254=getMcpAuthUrl();currentOrigin=_0x36d254;const _0x494dee=process[_0x2640c6(0x23d)][_0x2640c6(0x227)]??![];console[_0x2640c6(0x1fa)]('\x0aConnecting\x20to\x20MCP\x20auth\x20server:\x20'+_0x36d254+'\x0a');const _0x1befc0=await _0x59bbf8['ZYCWK'](tryUnauthenticated,_0x36d254);let _0x3e9dfd=null;if(_0x1befc0===_0x2640c6(0x1c0))_0x3e9dfd='';else{_0x3e9dfd=await loadCachedToken();if(!_0x3e9dfd){if(!_0x494dee)throw new Error(_0x2640c6(0x209)+_0x2640c6(0x1da));_0x3e9dfd=await _0x59bbf8['ZYCWK'](oauthFlow,_0x36d254);}}await _0x59bbf8[_0x2640c6(0x223)](callGetCliToken,_0x36d254,_0x3e9dfd);}async function tryUnauthenticated(_0x2a334f){const _0x1bb679=_0x3371a5,_0x158544={'ZNvcv':function(_0x2ba6db,_0x5b94f8,_0x1efc2c){return _0x2ba6db(_0x5b94f8,_0x1efc2c);},'VpaHY':'application/json','Bhcnc':_0x1bb679(0x1bf),'Urmwg':'initialize','kfCSl':'2025-03-26','ilkOM':'proxied','QiVKz':function(_0x36a691,_0x63d42c){return _0x36a691===_0x63d42c;}},_0x5a3806=await _0x158544['ZNvcv'](fetch,_0x2a334f,{'method':'POST','headers':{'Content-Type':_0x158544[_0x1bb679(0x1c4)],'Accept':'application/json,\x20text/event-stream'},'body':JSON[_0x1bb679(0x1ea)]({'jsonrpc':_0x158544[_0x1bb679(0x201)],'id':0x1,'method':_0x158544['Urmwg'],'params':{'protocolVersion':_0x158544[_0x1bb679(0x242)],'capabilities':{},'clientInfo':{'name':_0x1bb679(0x243),'version':_0x1bb679(0x1ef)}}})});if(_0x5a3806['ok'])return await _0x5a3806[_0x1bb679(0x1dd)](),_0x158544[_0x1bb679(0x1cf)];if(_0x158544[_0x1bb679(0x1bb)](_0x5a3806[_0x1bb679(0x1ee)],0x191))return await _0x5a3806[_0x1bb679(0x1dd)](),'needs-oauth';const _0x426592=await _0x5a3806['text']();throw new Error('MCP\x20server\x20returned\x20HTTP\x20'+_0x5a3806['status']+':\x20'+_0x426592);}class OAuthTimeoutError extends Error{constructor(_0x1bc8bc){const _0x3c66d4=_0x3371a5,_0x3094dd={'EMahp':'OAuthTimeoutError'};super(_0x1bc8bc),this['name']=_0x3094dd[_0x3c66d4(0x24d)];}}async function oauthFlow(_0x11a708){const _0x47fc28=_0x3371a5,_0x2a5c23={'dJcjp':function(_0x10dca8,_0x329286){return _0x10dca8(_0x329286);},'gklMb':'\x0aCached\x20OAuth\x20client\x20may\x20be\x20stale\x20—\x20clearing\x20and\x20retrying...\x0a','mouPZ':function(_0x4ebb34){return _0x4ebb34();}};try{return await _0x2a5c23[_0x47fc28(0x232)](oauthFlowAttempt,_0x11a708);}catch(_0x2586e0){if(_0x2586e0 instanceof OAuthTimeoutError&&await loadCachedClient())return console['log'](_0x2a5c23[_0x47fc28(0x1f5)]),await _0x2a5c23['mouPZ'](clearCachedClient),await oauthFlowAttempt(_0x11a708);throw _0x2586e0;}}async function oauthFlowAttempt(_0x2d3179){const _0x2a0311=_0x3371a5,_0xda4e46={'gIKwE':_0x2a0311(0x1e4),'vVxBW':function(_0x32817c,_0x4a318a,_0x166009){return _0x32817c(_0x4a318a,_0x166009);},'uUiCo':'POST','iuEbV':'application/json','nzfBv':'refresh_token','YspXz':'none','vNYOa':_0x2a0311(0x24a),'CaYmb':_0x2a0311(0x217),'pWnCM':function(_0x5a850f,_0x788619){return _0x5a850f(_0x788619);},'pNMQt':_0x2a0311(0x1f1),'PdxPA':_0x2a0311(0x1ec),'OyNhy':_0x2a0311(0x244),'oWXbj':_0x2a0311(0x1df),'fJKiJ':'code_challenge_method','OhKWn':'state','UAYfi':_0x2a0311(0x224),'QjZkU':'\x0aOpening\x20browser\x20for\x20authentication...','YvnEs':function(_0x316bca,_0x404fe5){return _0x316bca(_0x404fe5);},'uFtZq':_0x2a0311(0x22a),'RpoFJ':_0x2a0311(0x1e5),'GySEt':function(_0x323ef9,_0x5e38d1,_0x26f261){return _0x323ef9(_0x5e38d1,_0x26f261);},'BsoTC':_0x2a0311(0x226)},_0x522e31=_0x2d3179[_0x2a0311(0x1d2)](/\/mcp$/,'');process[_0x2a0311(0x23d)][_0x2a0311(0x1fd)]('Discovering\x20authorization\x20server...');const _0x499fe0=await fetch(_0x522e31+'/.well-known/oauth-protected-resource');if(!_0x499fe0['ok'])throw new Error('Could\x20not\x20fetch\x20protected\x20resource\x20metadata\x20from\x20MCP\x20server');const _0x2575b9=await _0x499fe0[_0x2a0311(0x1ce)](),_0x35b326=_0x2575b9[_0x2a0311(0x251)]?.[0x0];if(!_0x35b326)throw new Error(_0x2a0311(0x1c2));console['log']('\x20'+_0x35b326);const _0x257817=await fetchAuthServerMetadata(_0x35b326);let _0x149e21,_0xff0939;const _0x5b7b04=await loadCachedClient();if(_0x5b7b04)_0x149e21=_0x5b7b04[_0x2a0311(0x1e3)],_0xff0939=_0x5b7b04[_0x2a0311(0x1d0)];else{if(_0x257817['registration_endpoint']){process[_0x2a0311(0x23d)]['write'](_0xda4e46['gIKwE']);const _0x519243=await _0xda4e46[_0x2a0311(0x24b)](fetch,_0x257817['registration_endpoint'],{'method':_0xda4e46[_0x2a0311(0x1de)],'headers':{'Content-Type':_0xda4e46['iuEbV']},'body':JSON[_0x2a0311(0x1ea)]({'client_name':'Ranger\x20CLI','redirect_uris':[_0x2a0311(0x204)+CALLBACK_PORT+'/callback'],'grant_types':['authorization_code',_0xda4e46[_0x2a0311(0x1fe)]],'response_types':[_0x2a0311(0x1fb)],'token_endpoint_auth_method':_0xda4e46[_0x2a0311(0x1d8)]})});if(!_0x519243['ok']){const _0x36cafa=await _0x519243['text']();throw new Error('Client\x20registration\x20failed:\x20'+_0x36cafa);}const _0x3f0ae7=await _0x519243['json']();_0x149e21=_0x3f0ae7[_0x2a0311(0x244)],_0xff0939=_0x3f0ae7[_0x2a0311(0x1ba)],await saveCachedClient(_0x149e21,_0xff0939),console[_0x2a0311(0x1fa)](_0xda4e46[_0x2a0311(0x1e8)]);}else throw new Error(_0xda4e46[_0x2a0311(0x219)]);}const _0x2c5bdc=randomBytes(0x20)['toString']('base64url'),_0x3fd18b=createHash(_0x2a0311(0x1d5))['update'](_0x2c5bdc)[_0x2a0311(0x234)]('base64url'),_0x173625=_0xda4e46['pWnCM'](randomBytes,0x10)[_0x2a0311(0x211)](_0xda4e46[_0x2a0311(0x20f)]),_0x14b51e=new URL(_0x257817[_0x2a0311(0x221)]);_0x14b51e['searchParams']['set'](_0xda4e46['PdxPA'],_0x2a0311(0x1fb)),_0x14b51e[_0x2a0311(0x1e1)][_0x2a0311(0x250)](_0xda4e46['OyNhy'],_0x149e21),_0x14b51e['searchParams']['set']('redirect_uri',_0x2a0311(0x204)+CALLBACK_PORT+'/callback'),_0x14b51e['searchParams'][_0x2a0311(0x250)](_0xda4e46['oWXbj'],_0x3fd18b),_0x14b51e[_0x2a0311(0x1e1)]['set'](_0xda4e46['fJKiJ'],_0x2a0311(0x1c5)),_0x14b51e[_0x2a0311(0x1e1)][_0x2a0311(0x250)](_0xda4e46['OhKWn'],_0x173625);_0x2575b9['resource']&&_0x14b51e[_0x2a0311(0x1e1)][_0x2a0311(0x250)](_0xda4e46[_0x2a0311(0x1d7)],_0x2575b9['resource']);console[_0x2a0311(0x1fa)](_0xda4e46['QjZkU']),console[_0x2a0311(0x1fa)]('If\x20the\x20browser\x20doesn\x27t\x20open,\x20visit:\x0a'+_0x14b51e['toString']()+'\x0a'),await openBrowser(_0x14b51e['toString']());const _0x2dce98=await _0xda4e46[_0x2a0311(0x208)](waitForCallback,_0x173625);process['stdout'][_0x2a0311(0x1fd)](_0xda4e46[_0x2a0311(0x237)]);const _0x5ca2bf=new URLSearchParams({'grant_type':_0xda4e46['RpoFJ'],'code':_0x2dce98,'redirect_uri':'http://localhost:'+CALLBACK_PORT+'/callback','client_id':_0x149e21,'code_verifier':_0x2c5bdc});_0xff0939&&_0x5ca2bf['set'](_0x2a0311(0x1ba),_0xff0939);_0x2575b9['resource']&&_0x5ca2bf[_0x2a0311(0x250)](_0xda4e46['UAYfi'],_0x2575b9['resource']);const _0x453eef=await _0xda4e46['GySEt'](fetch,_0x257817[_0x2a0311(0x1f3)],{'method':_0xda4e46['uUiCo'],'headers':{'Content-Type':_0xda4e46['BsoTC']},'body':_0x5ca2bf});if(!_0x453eef['ok']){const _0x32d07f=await _0x453eef['text']();throw new Error('Token\x20exchange\x20failed:\x20'+_0x32d07f);}const _0xb59a2=await _0x453eef['json']();return console[_0x2a0311(0x1fa)](_0xda4e46['vNYOa']),await saveCachedToken(_0xb59a2[_0x2a0311(0x21e)],_0xb59a2['refresh_token'],_0xb59a2['expires_in']),_0xb59a2[_0x2a0311(0x21e)];}async function callGetCliToken(_0x3c37eb,_0x2b044a){const _0x4cb8dd=_0x3371a5,_0x179f5f={'iOTGQ':'POST','uDAoA':function(_0xc7f3b9,_0x205a83){return _0xc7f3b9(_0x205a83);},'oBkqz':'application/json','RgEmS':_0x4cb8dd(0x1ff),'ZQpIG':'2.0','IeRFf':'initialize','IZxdv':_0x4cb8dd(0x1ef),'cPXOP':'\x20done','mgFOJ':_0x4cb8dd(0x1b6),'tLZOJ':_0x4cb8dd(0x215),'NShbf':function(_0x39680e,_0x176adf){return _0x39680e(_0x176adf);},'TcKPN':'\x0aUnexpected\x20response\x20structure:','WPSQX':_0x4cb8dd(0x1fc),'cOuWE':function(_0x2eb96d){return _0x2eb96d();},'LSzwG':_0x4cb8dd(0x22c),'hiRZf':function(_0x14d7ac,_0x2ee2b6,_0x15d4ea,_0x30cfb3){return _0x14d7ac(_0x2ee2b6,_0x15d4ea,_0x30cfb3);},'abNmT':function(_0x4e2141,_0x5ee110,_0x3e4e52){return _0x4e2141(_0x5ee110,_0x3e4e52);},'eywAH':_0x4cb8dd(0x1f0)},_0x1e0a8d={'Content-Type':_0x179f5f['oBkqz'],'Accept':_0x179f5f['RgEmS']};_0x2b044a&&(_0x1e0a8d['Authorization']=_0x4cb8dd(0x207)+_0x2b044a);const _0x35e479=async _0x2f42f8=>{const _0x29a6dc=_0x4cb8dd,_0x5d3534=await fetch(_0x3c37eb,{'method':_0x179f5f['iOTGQ'],'headers':_0x1e0a8d,'body':JSON['stringify'](_0x2f42f8)});if(!_0x5d3534['ok']){const _0x34582d=await _0x5d3534['text']();throw new Error(_0x29a6dc(0x206)+_0x5d3534['status']+':\x20'+_0x34582d);}return _0x179f5f['uDAoA'](parseResponse,_0x5d3534);};process['stdout']['write']('Initializing\x20MCP\x20session...');const _0x4bf88b=await _0x35e479({'jsonrpc':_0x179f5f[_0x4cb8dd(0x1d1)],'id':0x1,'method':_0x179f5f[_0x4cb8dd(0x216)],'params':{'protocolVersion':_0x4cb8dd(0x1b5),'capabilities':{},'clientInfo':{'name':'ranger-cli','version':_0x179f5f[_0x4cb8dd(0x1f8)]}}});if(_0x4bf88b[_0x4cb8dd(0x1d6)])throw new Error('MCP\x20initialize\x20failed:\x20'+(_0x4bf88b[_0x4cb8dd(0x1d6)][_0x4cb8dd(0x1e7)]??JSON[_0x4cb8dd(0x1ea)](_0x4bf88b[_0x4cb8dd(0x1d6)])));console['log'](_0x179f5f['cPXOP']),await fetch(_0x3c37eb,{'method':'POST','headers':_0x1e0a8d,'body':JSON['stringify']({'jsonrpc':_0x179f5f[_0x4cb8dd(0x1d1)],'method':_0x179f5f['mgFOJ']})})['then'](_0x39f4cc=>_0x39f4cc[_0x4cb8dd(0x1dd)]()),process[_0x4cb8dd(0x23d)]['write']('Requesting\x20CLI\x20token...');const _0x5b1336=await _0x179f5f[_0x4cb8dd(0x235)](_0x35e479,{'jsonrpc':_0x4cb8dd(0x1bf),'id':0x2,'method':_0x4cb8dd(0x225),'params':{'name':_0x179f5f[_0x4cb8dd(0x202)],'arguments':{}}});if(_0x5b1336[_0x4cb8dd(0x1d6)])throw new Error('get_cli_token\x20failed:\x20'+(_0x5b1336['error'][_0x4cb8dd(0x1e7)]??JSON[_0x4cb8dd(0x1ea)](_0x5b1336['error'])));console[_0x4cb8dd(0x1fa)]('\x20done');const _0x57dff5=_0x179f5f[_0x4cb8dd(0x1f4)](extractToken,_0x5b1336[_0x4cb8dd(0x22d)]);if(!_0x57dff5){console['error'](_0x179f5f[_0x4cb8dd(0x238)]),console['error'](JSON[_0x4cb8dd(0x1ea)](_0x5b1336['result'],null,0x2));throw new Error(_0x179f5f[_0x4cb8dd(0x1eb)]);}const _0x341fb5=join(_0x179f5f['cOuWE'](homedir),_0x179f5f[_0x4cb8dd(0x249)]),_0x18725f=join(_0x341fb5,'refresh.txt');await mkdir(_0x341fb5,{'recursive':!![]}),await writeFile(_0x18725f,_0x57dff5,{'mode':0x180}),await _0x179f5f['hiRZf'](writeFile,_0x179f5f['abNmT'](join,_0x341fb5,_0x4cb8dd(0x22e)),_0x3c37eb,{'mode':0x180}),console['log']('\x0aToken\x20written\x20to\x20'+_0x18725f),console[_0x4cb8dd(0x1fa)](_0x179f5f['eywAH']);}async function fetchAuthServerMetadata(_0x2c5fb3){const _0xda6207=_0x3371a5,_0xfc30a4={'slMCk':function(_0x56b843,_0x3eb7a8){return _0x56b843(_0x3eb7a8);}},_0x44efe6=_0x2c5fb3+'/.well-known/oauth-authorization-server',_0x86f86d=await _0xfc30a4[_0xda6207(0x248)](fetch,_0x44efe6);if(!_0x86f86d['ok'])throw new Error(_0xda6207(0x200)+_0x44efe6+':\x20'+_0x86f86d['status']);return _0x86f86d['json']();}function waitForCallback(_0x31d1fb){const _0x5316b7={'FquVi':function(_0x52d1ba){return _0x52d1ba();},'WvJgj':function(_0x34df6a,_0x3357ba){return _0x34df6a(_0x3357ba);},'PLnYS':'OAuth\x20callback\x20timed\x20out\x20after\x202\x20minutes','vGuwC':'Not\x20found','GQFKF':'error','tLwgP':'<html><body><h2>Authenticated!</h2><p>You\x20can\x20close\x20this\x20window\x20and\x20return\x20to\x20the\x20terminal.</p></body></html>','iPoGv':function(_0x90bfb9,_0xe75332,_0x1e0759){return _0x90bfb9(_0xe75332,_0x1e0759);},'LaRPT':'127.0.0.1'};return new Promise((_0x4e59ac,_0x1926c6)=>{const _0x463924=_0x38b8,_0x24c1ec={'pZSXq':function(_0x2991c1){return _0x5316b7['FquVi'](_0x2991c1);},'WCSBY':function(_0x24116a,_0x5d46f9){const _0x8cccad=_0x38b8;return _0x5316b7[_0x8cccad(0x21b)](_0x24116a,_0x5d46f9);},'ZTGtw':_0x5316b7[_0x463924(0x1c6)],'TDbOs':function(_0x30c9e1,_0x35ec97){return _0x30c9e1!==_0x35ec97;},'JoTSz':_0x5316b7['vGuwC'],'XiADS':'state','xwYhn':_0x5316b7[_0x463924(0x24f)],'ISyWS':_0x463924(0x229),'MeKvm':_0x5316b7[_0x463924(0x23b)],'XEpDS':function(_0x4feed5,_0x2e2a26){const _0x3e2df6=_0x463924;return _0x5316b7[_0x3e2df6(0x21b)](_0x4feed5,_0x2e2a26);},'bQmUz':function(_0x547f76){return _0x5316b7['FquVi'](_0x547f76);}},_0x53254f=()=>{const _0x3c55e7=_0x463924;_0x4646d2[_0x3c55e7(0x1db)](),_0x4646d2['close']();},_0x577704=_0x5316b7[_0x463924(0x20e)](setTimeout,()=>{const _0x1346cc=_0x463924;_0x24c1ec['pZSXq'](_0x53254f),_0x24c1ec[_0x1346cc(0x210)](_0x1926c6,new OAuthTimeoutError(_0x24c1ec['ZTGtw']));},0x1d4c0),_0x4646d2=_0x5316b7[_0x463924(0x21b)](createServer,(_0x210a01,_0x3c74a2)=>{const _0x41c47d=_0x463924,_0x139863=new URL(_0x210a01[_0x41c47d(0x24c)]??'/',_0x41c47d(0x204)+CALLBACK_PORT);if(_0x24c1ec[_0x41c47d(0x1cc)](_0x139863[_0x41c47d(0x245)],'/callback')){_0x3c74a2['writeHead'](0x194),_0x3c74a2[_0x41c47d(0x1c9)](_0x24c1ec[_0x41c47d(0x214)]);return;}const _0x1f3add=_0x139863['searchParams'][_0x41c47d(0x220)]('code'),_0x2a08df=_0x139863[_0x41c47d(0x1e1)][_0x41c47d(0x220)](_0x24c1ec[_0x41c47d(0x205)]),_0x42536f=_0x139863[_0x41c47d(0x1e1)]['get'](_0x24c1ec['xwYhn']);if(_0x42536f){const _0x4aee70=_0x139863[_0x41c47d(0x1e1)][_0x41c47d(0x220)](_0x41c47d(0x20b))??_0x42536f;_0x3c74a2['writeHead'](0xc8,{'Content-Type':_0x24c1ec[_0x41c47d(0x246)]}),_0x3c74a2['end'](_0x41c47d(0x22b)+_0x4aee70+_0x41c47d(0x203)),clearTimeout(_0x577704),_0x53254f(),_0x24c1ec[_0x41c47d(0x210)](_0x1926c6,new Error(_0x41c47d(0x21d)+_0x4aee70));return;}if(!_0x1f3add||_0x2a08df!==_0x31d1fb){_0x3c74a2['writeHead'](0x190,{'Content-Type':_0x24c1ec['ISyWS']}),_0x3c74a2['end']('<html><body><h2>Invalid\x20callback</h2><p>Missing\x20code\x20or\x20state\x20mismatch.</p></body></html>');return;}_0x3c74a2['writeHead'](0xc8,{'Content-Type':_0x24c1ec[_0x41c47d(0x246)]}),_0x3c74a2['end'](_0x24c1ec['MeKvm']),_0x24c1ec[_0x41c47d(0x1d9)](clearTimeout,_0x577704),_0x24c1ec['bQmUz'](_0x53254f),_0x4e59ac(_0x1f3add);});_0x4646d2[_0x463924(0x1c3)](CALLBACK_PORT,_0x5316b7[_0x463924(0x20a)]);});}async function openBrowser(_0xe42778){const _0xca0dbe=_0x3371a5,_0x437283={'lRmFs':_0xca0dbe(0x1ed),'fgyUq':'win32','tcNGL':_0xca0dbe(0x23f)},_0x2e82b5=process[_0xca0dbe(0x239)]===_0xca0dbe(0x21c)?_0x437283[_0xca0dbe(0x1be)]:process['platform']===_0x437283[_0xca0dbe(0x233)]?'start':_0x437283[_0xca0dbe(0x240)];exec(_0x2e82b5+'\x20\x22'+_0xe42778+'\x22');}let currentOrigin='';async function loadCachedToken(){const _0x3a23ad=_0x3371a5,_0x393341={'ZzSQz':function(_0x2156c9,_0x152014,_0x25823a){return _0x2156c9(_0x152014,_0x25823a);},'iabos':'utf-8'};try{const _0x3e41e5=JSON['parse'](await _0x393341[_0x3a23ad(0x222)](readFile,TOKEN_CACHE_PATH,_0x393341[_0x3a23ad(0x23e)]));if(_0x3e41e5[_0x3a23ad(0x1f6)]&&_0x3e41e5['origin']!==currentOrigin)return null;if(_0x3e41e5[_0x3a23ad(0x20c)]&&Date['now']()>_0x3e41e5[_0x3a23ad(0x20c)])return null;return _0x3e41e5[_0x3a23ad(0x1bd)]??null;}catch{return null;}}async function saveCachedToken(_0x327086,_0x41658a,_0x3c37b7){const _0x2cdab6=_0x3371a5,_0xe7f85b={'iKlPG':function(_0x263de5,_0x34f20a){return _0x263de5+_0x34f20a;},'puPMb':function(_0x1a799e,_0x4c67e8){return _0x1a799e*_0x4c67e8;},'BIvYH':function(_0x276f4b,_0x38aeac,_0x42877c){return _0x276f4b(_0x38aeac,_0x42877c);},'uPjbp':_0x2cdab6(0x22c),'uECTj':function(_0x4a93aa,_0x210c51,_0x51c643,_0xf0902d){return _0x4a93aa(_0x210c51,_0x51c643,_0xf0902d);}},_0xd206a=await loadCachedData(),_0x328631={..._0xd206a,'origin':currentOrigin,'accessToken':_0x327086,'refreshToken':_0x41658a??_0xd206a?.[_0x2cdab6(0x212)],'expiresAt':_0x3c37b7?_0xe7f85b[_0x2cdab6(0x21a)](Date[_0x2cdab6(0x1e6)](),_0xe7f85b[_0x2cdab6(0x1d3)](_0x3c37b7,0x3e8)):undefined};await mkdir(_0xe7f85b[_0x2cdab6(0x1d4)](join,homedir(),_0xe7f85b[_0x2cdab6(0x1e0)]),{'recursive':!![]}),await _0xe7f85b[_0x2cdab6(0x1bc)](writeFile,TOKEN_CACHE_PATH,JSON[_0x2cdab6(0x1ea)](_0x328631),{'mode':0x180});}async function loadCachedClient(){const _0x41ca43=_0x3371a5,_0x46ca0e=await loadCachedData();if(_0x46ca0e?.['origin']&&_0x46ca0e[_0x41ca43(0x1f6)]!==currentOrigin)return null;return _0x46ca0e?.[_0x41ca43(0x1e3)]?{'clientId':_0x46ca0e[_0x41ca43(0x1e3)],'clientSecret':_0x46ca0e[_0x41ca43(0x1d0)]}:null;}async function clearCachedClient(){const _0x51c758=_0x3371a5,_0x481732={'nxRwg':function(_0x5af31f){return _0x5af31f();}},_0x5333aa=await _0x481732['nxRwg'](loadCachedData);if(!_0x5333aa)return;const {clientId:_0x355923,clientSecret:_0x4695d2,..._0xe70c88}=_0x5333aa;await writeFile(TOKEN_CACHE_PATH,JSON[_0x51c758(0x1ea)](_0xe70c88),{'mode':0x180});}async function saveCachedClient(_0x25cc5a,_0x2abb59){const _0x5ed4c8=_0x3371a5,_0x27ac1d={'ERRXX':function(_0xf136d1,_0xeead92,_0x4a270e){return _0xf136d1(_0xeead92,_0x4a270e);},'TSInl':function(_0x1100ee,_0x4894b1,_0x9610f4,_0x386d56){return _0x1100ee(_0x4894b1,_0x9610f4,_0x386d56);}},_0x38cd47=await loadCachedData(),_0x37230b={..._0x38cd47,'origin':currentOrigin,'accessToken':_0x38cd47?.[_0x5ed4c8(0x1bd)]??'','clientId':_0x25cc5a,'clientSecret':_0x2abb59};await _0x27ac1d[_0x5ed4c8(0x1dc)](mkdir,join(homedir(),'.ranger'),{'recursive':!![]}),await _0x27ac1d['TSInl'](writeFile,TOKEN_CACHE_PATH,JSON[_0x5ed4c8(0x1ea)](_0x37230b),{'mode':0x180});}async function loadCachedData(){const _0x3386b0=_0x3371a5,_0x4983a4={'TOMfS':function(_0x55fb0f,_0x19b1dd,_0x240dfc){return _0x55fb0f(_0x19b1dd,_0x240dfc);},'JkQyQ':_0x3386b0(0x1f7)};try{return JSON[_0x3386b0(0x1cd)](await _0x4983a4['TOMfS'](readFile,TOKEN_CACHE_PATH,_0x4983a4[_0x3386b0(0x1f2)]));}catch{return null;}}async function parseResponse(_0x2038fb){const _0x88096c=_0x3371a5,_0x35d06d={'HOSdX':_0x88096c(0x228),'jYEPY':_0x88096c(0x218)},_0x240c50=_0x2038fb['headers'][_0x88096c(0x220)](_0x35d06d['HOSdX'])??'';if(_0x240c50[_0x88096c(0x236)]('text/event-stream')){const _0x27a51c=await _0x2038fb['text']();for(const _0x5c2657 of _0x27a51c[_0x88096c(0x1e9)]('\x0a')){const _0xdf96f7=_0x5c2657[_0x88096c(0x1f9)]();if(_0xdf96f7['startsWith'](_0x88096c(0x218))){const _0x4946a8=_0xdf96f7[_0x88096c(0x23c)](_0x35d06d[_0x88096c(0x241)]['length'])[_0x88096c(0x1f9)]();if(!_0x4946a8)continue;try{const _0x2418ae=JSON['parse'](_0x4946a8);if(_0x2418ae['id']!==undefined||_0x2418ae[_0x88096c(0x1d6)])return _0x2418ae;}catch{}}}throw new Error('No\x20JSON-RPC\x20response\x20found\x20in\x20SSE\x20stream');}return _0x2038fb['json']();}function extractToken(_0x2bef7a){const _0x468c24=_0x3371a5,_0x7037a8={'oScId':function(_0x441c9a,_0x5d7d79){return _0x441c9a===_0x5d7d79;},'KTNCn':'Unknown\x20error','tkLTX':_0x468c24(0x1ca)};if(!_0x2bef7a)return null;const _0x50a1e7=_0x2bef7a[_0x468c24(0x22f)];if(_0x50a1e7?.['token']&&_0x7037a8[_0x468c24(0x1b8)](typeof _0x50a1e7['token'],'string'))return _0x50a1e7[_0x468c24(0x230)];if(_0x2bef7a['isError']){const _0x53ee05=_0x2bef7a[_0x468c24(0x23a)];throw new Error('Server\x20returned\x20error:\x20'+(_0x53ee05?.[0x0]?.['text']??_0x7037a8['KTNCn']));}const _0x51481b=_0x2bef7a['content'];if(_0x51481b)for(const _0x55e8dc of _0x51481b){if(_0x55e8dc[_0x468c24(0x213)]===_0x468c24(0x1dd)&&_0x55e8dc['text']){try{const _0x4d902b=JSON['parse'](_0x55e8dc[_0x468c24(0x1dd)]);if(_0x7037a8['oScId'](typeof _0x4d902b?.[_0x468c24(0x230)],_0x7037a8['tkLTX']))return _0x4d902b[_0x468c24(0x230)];}catch{}const _0xd19978=_0x55e8dc[_0x468c24(0x1dd)]['match'](/(rngr_[A-Za-z0-9_-]+)/);if(_0xd19978)return _0xd19978[0x1];}}return null;}
1
+ const _0x1cff32=_0x47ab;(function(_0x2f6425,_0x4c0ff5){const _0x389f97=_0x47ab,_0x317ee1=_0x2f6425();while(!![]){try{const _0x2bd3cd=-parseInt(_0x389f97(0x173))/0x1*(-parseInt(_0x389f97(0x125))/0x2)+-parseInt(_0x389f97(0x114))/0x3+parseInt(_0x389f97(0x174))/0x4*(-parseInt(_0x389f97(0x105))/0x5)+parseInt(_0x389f97(0x10f))/0x6*(parseInt(_0x389f97(0x12e))/0x7)+-parseInt(_0x389f97(0x10a))/0x8+parseInt(_0x389f97(0x189))/0x9*(-parseInt(_0x389f97(0x158))/0xa)+parseInt(_0x389f97(0x14d))/0xb*(parseInt(_0x389f97(0x107))/0xc);if(_0x2bd3cd===_0x4c0ff5)break;else _0x317ee1['push'](_0x317ee1['shift']());}catch(_0x280b4a){_0x317ee1['push'](_0x317ee1['shift']());}}}(_0x1aee,0x69afa));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(),_0x1cff32(0x166),_0x1cff32(0x102)),AUTH_ORIGIN_PATH=join(homedir(),_0x1cff32(0x166),'auth-origin.txt');export async function getMcpAuthOrigin(){const _0x2f4ea5=_0x1cff32,_0x1bfa59={'yDKwN':function(_0x1fa9db,_0x3d0f18,_0x257167){return _0x1fa9db(_0x3d0f18,_0x257167);}};try{const _0x232cbc=(await _0x1bfa59[_0x2f4ea5(0x17e)](readFile,AUTH_ORIGIN_PATH,'utf-8'))['trim']();return _0x232cbc||null;}catch{return null;}}export async function mcpBootstrap(){const _0x107141=_0x1cff32,_0x4a8466={'NjLlk':function(_0x58ddf6,_0x9a8479){return _0x58ddf6(_0x9a8479);},'hAwJc':function(_0x1772fc){return _0x1772fc();},'rhTCH':function(_0x3ead75,_0xb12370){return _0x3ead75(_0xb12370);}},_0x32302d=getMcpAuthUrl();currentOrigin=_0x32302d;const _0x3a6246=process['stdout'][_0x107141(0x187)]??![];console[_0x107141(0x116)]('\x0aConnecting\x20to\x20MCP\x20auth\x20server:\x20'+_0x32302d+'\x0a');const _0x4a7a4a=await _0x4a8466[_0x107141(0x164)](tryUnauthenticated,_0x32302d);let _0x323b22=null;if(_0x4a7a4a===_0x107141(0x17c))_0x323b22='';else{_0x323b22=await _0x4a8466[_0x107141(0x18c)](loadCachedToken);if(!_0x323b22){if(!_0x3a6246)throw new Error('MCP\x20server\x20requires\x20authentication\x20but\x20running\x20in\x20non-interactive\x20mode.\x0a'+_0x107141(0x11d));_0x323b22=await _0x4a8466['rhTCH'](oauthFlow,_0x32302d);}}await callGetCliToken(_0x32302d,_0x323b22);}async function tryUnauthenticated(_0x6f0189){const _0x3b57a0=_0x1cff32,_0x3c07eb={'VhGUa':function(_0x497e7d,_0x46bec1,_0x37c16b){return _0x497e7d(_0x46bec1,_0x37c16b);},'uwQRI':'POST','eWMEe':_0x3b57a0(0x108),'jqKAA':_0x3b57a0(0x130),'TUMBT':'2025-03-26','dJjNs':_0x3b57a0(0x145),'dsWAo':'1.0.0','YPZcE':function(_0x200d05,_0x2788e5){return _0x200d05===_0x2788e5;},'qCeMI':'needs-oauth'},_0x51f695=await _0x3c07eb[_0x3b57a0(0x163)](fetch,_0x6f0189,{'method':_0x3c07eb['uwQRI'],'headers':{'Content-Type':'application/json','Accept':_0x3c07eb[_0x3b57a0(0x123)]},'body':JSON['stringify']({'jsonrpc':_0x3c07eb[_0x3b57a0(0x16f)],'id':0x1,'method':_0x3b57a0(0x18b),'params':{'protocolVersion':_0x3c07eb['TUMBT'],'capabilities':{},'clientInfo':{'name':_0x3c07eb[_0x3b57a0(0x100)],'version':_0x3c07eb['dsWAo']}}})});if(_0x51f695['ok'])return await _0x51f695[_0x3b57a0(0x157)](),_0x3b57a0(0x17c);if(_0x3c07eb[_0x3b57a0(0x133)](_0x51f695['status'],0x191))return await _0x51f695['text'](),_0x3c07eb['qCeMI'];const _0x2bf797=await _0x51f695[_0x3b57a0(0x157)]();throw new Error('MCP\x20server\x20returned\x20HTTP\x20'+_0x51f695[_0x3b57a0(0x15c)]+':\x20'+_0x2bf797);}class OAuthTimeoutError extends Error{constructor(_0x573fba){const _0x4748a3=_0x1cff32;super(_0x573fba),this[_0x4748a3(0x180)]=_0x4748a3(0x132);}}async function oauthFlow(_0xcf6030){const _0x1dc2cd=_0x1cff32,_0x2f2e37={'khvfz':function(_0x41d03a,_0x4fd45d){return _0x41d03a(_0x4fd45d);},'OpxLJ':function(_0x3cf2cf,_0x44a966){return _0x3cf2cf instanceof _0x44a966;},'EpOxT':function(_0x2c6e15){return _0x2c6e15();}};try{return await _0x2f2e37['khvfz'](oauthFlowAttempt,_0xcf6030);}catch(_0x1d9f0d){if(_0x2f2e37['OpxLJ'](_0x1d9f0d,OAuthTimeoutError)&&await _0x2f2e37[_0x1dc2cd(0x11e)](loadCachedClient))return console['log'](_0x1dc2cd(0x152)),await clearCachedClient(),await oauthFlowAttempt(_0xcf6030);throw _0x1d9f0d;}}async function oauthFlowAttempt(_0x590df9){const _0x18ac21=_0x1cff32,_0x1282db={'zpkxv':'Could\x20not\x20fetch\x20protected\x20resource\x20metadata\x20from\x20MCP\x20server','pjQGR':_0x18ac21(0x183),'lJnyy':function(_0x18fe82,_0x4b0fef){return _0x18fe82(_0x4b0fef);},'NRFqw':'Registering\x20OAuth\x20client...','iIWVV':function(_0x5e23b9,_0x4fc14b,_0x10d2f7){return _0x5e23b9(_0x4fc14b,_0x10d2f7);},'Kwyrz':_0x18ac21(0x18f),'wocSq':'refresh_token','eMGhN':'none','yZRCf':_0x18ac21(0x172),'NbrKI':_0x18ac21(0x138),'oJejQ':function(_0x5daa8c,_0x4ec0bb){return _0x5daa8c(_0x4ec0bb);},'JUsfx':_0x18ac21(0x12d),'IgOnI':function(_0x174b33,_0x564e41){return _0x174b33(_0x564e41);},'aMgpP':'code','HGJDp':_0x18ac21(0x13f),'grYyo':_0x18ac21(0x18d),'pATHM':_0x18ac21(0x103),'HRYqb':'Exchanging\x20authorization\x20code...','mTuAn':function(_0x5331d2,_0x3be7b4,_0x303d9a){return _0x5331d2(_0x3be7b4,_0x303d9a);},'tuAJi':_0x18ac21(0x104)},_0xc2c17=_0x590df9['replace'](/\/mcp$/,'');process[_0x18ac21(0x150)][_0x18ac21(0x171)](_0x18ac21(0x162));const _0x4a1150=await fetch(_0xc2c17+_0x18ac21(0x12a));if(!_0x4a1150['ok'])throw new Error(_0x1282db[_0x18ac21(0x147)]);const _0x3470d8=await _0x4a1150[_0x18ac21(0x11a)](),_0x3f87d0=_0x3470d8[_0x18ac21(0x190)]?.[0x0];if(!_0x3f87d0)throw new Error(_0x1282db[_0x18ac21(0x122)]);console['log']('\x20'+_0x3f87d0);const _0x32bae4=await _0x1282db[_0x18ac21(0x136)](fetchAuthServerMetadata,_0x3f87d0);let _0x1f660a,_0x47a440;const _0x1d5241=await loadCachedClient();if(_0x1d5241)_0x1f660a=_0x1d5241['clientId'],_0x47a440=_0x1d5241['clientSecret'];else{if(_0x32bae4[_0x18ac21(0x176)]){process['stdout'][_0x18ac21(0x171)](_0x1282db[_0x18ac21(0x14b)]);const _0x2b30e7=await _0x1282db['iIWVV'](fetch,_0x32bae4[_0x18ac21(0x176)],{'method':_0x18ac21(0x104),'headers':{'Content-Type':_0x18ac21(0x146)},'body':JSON[_0x18ac21(0x192)]({'client_name':_0x18ac21(0x149),'redirect_uris':[_0x18ac21(0x155)+CALLBACK_PORT+_0x18ac21(0x101)],'grant_types':[_0x1282db[_0x18ac21(0x182)],_0x1282db['wocSq']],'response_types':['code'],'token_endpoint_auth_method':_0x1282db[_0x18ac21(0x12f)]})});if(!_0x2b30e7['ok']){const _0x2f8044=await _0x2b30e7[_0x18ac21(0x157)]();throw new Error(_0x18ac21(0x140)+_0x2f8044);}const _0xf693be=await _0x2b30e7['json']();_0x1f660a=_0xf693be[_0x18ac21(0x16e)],_0x47a440=_0xf693be['client_secret'],await saveCachedClient(_0x1f660a,_0x47a440),console['log'](_0x1282db[_0x18ac21(0x110)]);}else throw new Error(_0x1282db[_0x18ac21(0x154)]);}const _0x55adaa=_0x1282db['oJejQ'](randomBytes,0x20)[_0x18ac21(0x16a)](_0x1282db[_0x18ac21(0x115)]),_0x1e04bb=_0x1282db[_0x18ac21(0x113)](createHash,_0x18ac21(0x18a))['update'](_0x55adaa)[_0x18ac21(0x129)](_0x1282db['JUsfx']),_0x16277e=_0x1282db['oJejQ'](randomBytes,0x10)[_0x18ac21(0x16a)](_0x18ac21(0x17d)),_0x2b217d=new URL(_0x32bae4[_0x18ac21(0x15e)]);_0x2b217d[_0x18ac21(0x14a)][_0x18ac21(0x17b)](_0x18ac21(0x170),_0x1282db[_0x18ac21(0x111)]),_0x2b217d[_0x18ac21(0x14a)]['set']('client_id',_0x1f660a),_0x2b217d['searchParams'][_0x18ac21(0x17b)](_0x1282db['HGJDp'],'http://localhost:'+CALLBACK_PORT+'/callback'),_0x2b217d['searchParams'][_0x18ac21(0x17b)](_0x18ac21(0x15d),_0x1e04bb),_0x2b217d['searchParams'][_0x18ac21(0x17b)]('code_challenge_method',_0x1282db['grYyo']),_0x2b217d['searchParams'][_0x18ac21(0x17b)](_0x18ac21(0x10e),_0x16277e);_0x3470d8[_0x18ac21(0x103)]&&_0x2b217d['searchParams']['set'](_0x1282db[_0x18ac21(0x106)],_0x3470d8[_0x18ac21(0x103)]);console['log'](_0x18ac21(0x13b)),console['log']('If\x20the\x20browser\x20doesn\x27t\x20open,\x20visit:\x0a'+_0x2b217d['toString']()+'\x0a'),await openBrowser(_0x2b217d['toString']());const _0xcf690a=await waitForCallback(_0x16277e);process[_0x18ac21(0x150)][_0x18ac21(0x171)](_0x1282db['HRYqb']);const _0x3f9e15=new URLSearchParams({'grant_type':'authorization_code','code':_0xcf690a,'redirect_uri':'http://localhost:'+CALLBACK_PORT+'/callback','client_id':_0x1f660a,'code_verifier':_0x55adaa});_0x47a440&&_0x3f9e15[_0x18ac21(0x17b)](_0x18ac21(0x112),_0x47a440);_0x3470d8['resource']&&_0x3f9e15[_0x18ac21(0x17b)](_0x18ac21(0x103),_0x3470d8['resource']);const _0x495225=await _0x1282db['mTuAn'](fetch,_0x32bae4['token_endpoint'],{'method':_0x1282db['tuAJi'],'headers':{'Content-Type':'application/x-www-form-urlencoded'},'body':_0x3f9e15});if(!_0x495225['ok']){const _0x155442=await _0x495225['text']();throw new Error(_0x18ac21(0x143)+_0x155442);}const _0x475a0e=await _0x495225['json']();return console['log'](_0x1282db['yZRCf']),await saveCachedToken(_0x475a0e['access_token'],_0x475a0e['refresh_token'],_0x475a0e[_0x18ac21(0x13e)]),_0x475a0e['access_token'];}async function callGetCliToken(_0x7fda62,_0x4bf249){const _0x39cbe3=_0x1cff32,_0x15cd09={'Nclfs':function(_0x4c8d63,_0x2c52f1,_0x3a16e7){return _0x4c8d63(_0x2c52f1,_0x3a16e7);},'ioHMQ':_0x39cbe3(0x146),'uOQtw':_0x39cbe3(0x17f),'HNLqr':'2.0','DHhMa':_0x39cbe3(0x10c),'eAXgR':function(_0x10e7cb,_0x6c8adc){return _0x10e7cb(_0x6c8adc);},'tmyxJ':'tools/call','uPAew':'get_cli_token','pUale':_0x39cbe3(0x13c),'cAhjC':function(_0x1c6201){return _0x1c6201();},'HnEgv':function(_0x3b97ff,_0x1181d1,_0x470269,_0x2e8fda){return _0x3b97ff(_0x1181d1,_0x470269,_0x2e8fda);},'Cyqhv':function(_0x537570,_0x304d94,_0x1e3016){return _0x537570(_0x304d94,_0x1e3016);},'Pvnem':'auth-origin.txt'},_0x52f6fb={'Content-Type':_0x15cd09[_0x39cbe3(0x134)],'Accept':'application/json,\x20text/event-stream'};_0x4bf249&&(_0x52f6fb[_0x39cbe3(0x117)]='Bearer\x20'+_0x4bf249);const _0x107d47=async _0x2a998b=>{const _0x273786=_0x39cbe3,_0x3349a1=await _0x15cd09[_0x273786(0x118)](fetch,_0x7fda62,{'method':_0x273786(0x104),'headers':_0x52f6fb,'body':JSON[_0x273786(0x192)](_0x2a998b)});if(!_0x3349a1['ok']){const _0x32f931=await _0x3349a1['text']();throw new Error('HTTP\x20'+_0x3349a1[_0x273786(0x15c)]+':\x20'+_0x32f931);}return parseResponse(_0x3349a1);};process['stdout'][_0x39cbe3(0x171)](_0x15cd09[_0x39cbe3(0x156)]);const _0x34f77a=await _0x107d47({'jsonrpc':_0x15cd09[_0x39cbe3(0x13d)],'id':0x1,'method':_0x39cbe3(0x18b),'params':{'protocolVersion':'2025-03-26','capabilities':{},'clientInfo':{'name':_0x39cbe3(0x145),'version':'1.0.0'}}});if(_0x34f77a[_0x39cbe3(0x139)])throw new Error('MCP\x20initialize\x20failed:\x20'+(_0x34f77a['error'][_0x39cbe3(0x131)]??JSON[_0x39cbe3(0x192)](_0x34f77a['error'])));console['log'](_0x39cbe3(0x172)),await fetch(_0x7fda62,{'method':_0x39cbe3(0x104),'headers':_0x52f6fb,'body':JSON[_0x39cbe3(0x192)]({'jsonrpc':'2.0','method':_0x39cbe3(0x153)})})['then'](_0x1e14e8=>_0x1e14e8['text']()),process['stdout']['write'](_0x15cd09['DHhMa']);const _0x5536ee=await _0x15cd09[_0x39cbe3(0x177)](_0x107d47,{'jsonrpc':'2.0','id':0x2,'method':_0x15cd09['tmyxJ'],'params':{'name':_0x15cd09['uPAew'],'arguments':{}}});if(_0x5536ee[_0x39cbe3(0x139)])throw new Error(_0x39cbe3(0x16d)+(_0x5536ee[_0x39cbe3(0x139)][_0x39cbe3(0x131)]??JSON[_0x39cbe3(0x192)](_0x5536ee['error'])));console['log']('\x20done');const _0x42802f=extractToken(_0x5536ee[_0x39cbe3(0x16b)]);if(!_0x42802f){console['error'](_0x15cd09['pUale']),console['error'](JSON[_0x39cbe3(0x192)](_0x5536ee['result'],null,0x2));throw new Error(_0x39cbe3(0x127));}const _0x399d5f=join(_0x15cd09[_0x39cbe3(0x137)](homedir),'.ranger'),_0x57c566=join(_0x399d5f,_0x39cbe3(0x159));await mkdir(_0x399d5f,{'recursive':!![]}),await _0x15cd09[_0x39cbe3(0x109)](writeFile,_0x57c566,_0x42802f,{'mode':0x180}),await writeFile(_0x15cd09['Cyqhv'](join,_0x399d5f,_0x15cd09[_0x39cbe3(0x178)]),_0x7fda62,{'mode':0x180}),console['log'](_0x39cbe3(0x181)+_0x57c566),console['log']('Run\x20`ranger\x20status`\x20to\x20verify\x20authentication.\x0a');}async function fetchAuthServerMetadata(_0x4c040b){const _0x613737=_0x1cff32,_0x1ffc0e={'uUVdD':function(_0x4bea73,_0x40dec5){return _0x4bea73(_0x40dec5);}},_0x4d597c=_0x4c040b+_0x613737(0x11c),_0x161343=await _0x1ffc0e['uUVdD'](fetch,_0x4d597c);if(!_0x161343['ok'])throw new Error('Could\x20not\x20fetch\x20auth\x20server\x20metadata\x20from\x20'+_0x4d597c+':\x20'+_0x161343[_0x613737(0x15c)]);return _0x161343['json']();}function waitForCallback(_0xb41027){const _0x43136a=_0x1cff32,_0xb27df6={'Vtfsc':function(_0x44c277){return _0x44c277();},'yHfzt':_0x43136a(0x10e),'XELyj':'error','iKnLu':function(_0x2463d5){return _0x2463d5();},'TtlDz':'<html><body><h2>Invalid\x20callback</h2><p>Missing\x20code\x20or\x20state\x20mismatch.</p></body></html>','MItKi':function(_0x32bccc,_0x13fcb9){return _0x32bccc(_0x13fcb9);},'FQvLV':'127.0.0.1'};return new Promise((_0x52a5d5,_0x582e80)=>{const _0xcadcc5=_0x43136a,_0x5c8083={'BbrlL':function(_0x55ca50){const _0x129b4d=_0x47ab;return _0xb27df6[_0x129b4d(0x144)](_0x55ca50);},'pOoti':'OAuth\x20callback\x20timed\x20out\x20after\x202\x20minutes','JBgao':'/callback','kExIV':_0xb27df6['yHfzt'],'txmua':_0xb27df6['XELyj'],'RDQBT':_0xcadcc5(0x167),'ISfzY':function(_0x882133,_0x20b274){return _0x882133(_0x20b274);},'RygLe':function(_0x20ff28){const _0x4f7d1a=_0xcadcc5;return _0xb27df6[_0x4f7d1a(0x186)](_0x20ff28);},'ewqAN':_0xb27df6['TtlDz'],'JSzHw':'<html><body><h2>Authenticated!</h2><p>You\x20can\x20close\x20this\x20window\x20and\x20return\x20to\x20the\x20terminal.</p></body></html>'},_0x1064a7=()=>{_0x101e2a['closeAllConnections'](),_0x101e2a['close']();},_0x3f71ca=setTimeout(()=>{const _0x2ef27c=_0xcadcc5;_0x5c8083[_0x2ef27c(0x12c)](_0x1064a7),_0x582e80(new OAuthTimeoutError(_0x5c8083[_0x2ef27c(0x15b)]));},0x1d4c0),_0x101e2a=_0xb27df6[_0xcadcc5(0x148)](createServer,(_0xec690c,_0xba4223)=>{const _0x3327cf=_0xcadcc5,_0x4cb802=new URL(_0xec690c['url']??'/','http://localhost:'+CALLBACK_PORT);if(_0x4cb802['pathname']!==_0x5c8083['JBgao']){_0xba4223[_0x3327cf(0x188)](0x194),_0xba4223[_0x3327cf(0x128)](_0x3327cf(0x16c));return;}const _0x1dd2fd=_0x4cb802[_0x3327cf(0x14a)][_0x3327cf(0x160)](_0x3327cf(0x17a)),_0x4d1195=_0x4cb802[_0x3327cf(0x14a)]['get'](_0x5c8083[_0x3327cf(0x11f)]),_0x353729=_0x4cb802['searchParams']['get'](_0x5c8083[_0x3327cf(0x14f)]);if(_0x353729){const _0x74cf08=_0x4cb802['searchParams'][_0x3327cf(0x160)]('error_description')??_0x353729;_0xba4223['writeHead'](0xc8,{'Content-Type':_0x5c8083[_0x3327cf(0x126)]}),_0xba4223[_0x3327cf(0x128)]('<html><body><h2>Authentication\x20failed</h2><p>'+_0x74cf08+'</p><p>You\x20can\x20close\x20this\x20window.</p></body></html>'),_0x5c8083[_0x3327cf(0x13a)](clearTimeout,_0x3f71ca),_0x5c8083['RygLe'](_0x1064a7),_0x582e80(new Error('OAuth\x20error:\x20'+_0x74cf08));return;}if(!_0x1dd2fd||_0x4d1195!==_0xb41027){_0xba4223['writeHead'](0x190,{'Content-Type':_0x5c8083['RDQBT']}),_0xba4223['end'](_0x5c8083[_0x3327cf(0x191)]);return;}_0xba4223['writeHead'](0xc8,{'Content-Type':'text/html'}),_0xba4223['end'](_0x5c8083['JSzHw']),_0x5c8083[_0x3327cf(0x13a)](clearTimeout,_0x3f71ca),_0x1064a7(),_0x5c8083['ISfzY'](_0x52a5d5,_0x1dd2fd);});_0x101e2a['listen'](CALLBACK_PORT,_0xb27df6[_0xcadcc5(0x15a)]);});}async function openBrowser(_0x4e92f6){const _0x1f12d1=_0x1cff32,_0x53206f={'TRSYf':_0x1f12d1(0x15f),'pbaGf':_0x1f12d1(0x161),'DQKEu':function(_0x4337cd,_0x2b8555){return _0x4337cd(_0x2b8555);}},_0x40d785=process[_0x1f12d1(0x141)]===_0x1f12d1(0x169)?_0x53206f['TRSYf']:process['platform']===_0x53206f['pbaGf']?_0x1f12d1(0x18e):_0x1f12d1(0x119);_0x53206f['DQKEu'](exec,_0x40d785+'\x20\x22'+_0x4e92f6+'\x22');}let currentOrigin='';async function loadCachedToken(){const _0x42fb34=_0x1cff32,_0x3d8959={'bcdNV':function(_0xa9b774,_0x56b55c,_0x23b797){return _0xa9b774(_0x56b55c,_0x23b797);}};try{const _0x3d06ec=JSON[_0x42fb34(0x10d)](await _0x3d8959['bcdNV'](readFile,TOKEN_CACHE_PATH,'utf-8'));if(_0x3d06ec['origin']&&_0x3d06ec[_0x42fb34(0x10b)]!==currentOrigin)return null;if(_0x3d06ec['expiresAt']&&Date['now']()>_0x3d06ec[_0x42fb34(0x124)])return null;return _0x3d06ec['accessToken']??null;}catch{return null;}}function _0x1aee(){const _0x459209=['ewqAN','stringify','structuredContent','dJjNs','/callback','mcp-oauth-tokens.json','resource','POST','5gjAAyo','pATHM','12lZQmxy','application/json,\x20text/event-stream','HnEgv','4092448yfxQmz','origin','Requesting\x20CLI\x20token...','parse','state','6fLeJdQ','yZRCf','aMgpP','client_secret','IgOnI','2195907lRYXqL','JUsfx','log','Authorization','Nclfs','xdg-open','json','ZCTTX','/.well-known/oauth-authorization-server','Run\x20`ranger\x20setup\x20--mcp-bootstrap`\x20interactively\x20first.','EpOxT','kExIV','accessToken','clientId','pjQGR','eWMEe','expiresAt','70502qcTizg','RDQBT','Could\x20not\x20extract\x20token\x20from\x20MCP\x20response','end','digest','/.well-known/oauth-protected-resource','Ezejg','BbrlL','base64url','123739FFoDbP','eMGhN','2.0','message','OAuthTimeoutError','YPZcE','ioHMQ','JHvJI','lJnyy','cAhjC','Authorization\x20server\x20does\x20not\x20support\x20dynamic\x20client\x20registration\x20and\x20no\x20cached\x20client\x20found','error','ISfzY','\x0aOpening\x20browser\x20for\x20authentication...','\x0aUnexpected\x20response\x20structure:','HNLqr','expires_in','redirect_uri','Client\x20registration\x20failed:\x20','platform','utf-8','Token\x20exchange\x20failed:\x20','Vtfsc','ranger-cli','application/json','zpkxv','MItKi','Ranger\x20CLI','searchParams','NRFqw','content-type','22607695sSYSdq','text/event-stream','txmua','stdout','yiFHZ','\x0aCached\x20OAuth\x20client\x20may\x20be\x20stale\x20—\x20clearing\x20and\x20retrying...\x0a','notifications/initialized','NbrKI','http://localhost:','uOQtw','text','1110AKskry','refresh.txt','FQvLV','pOoti','status','code_challenge','authorization_endpoint','open','get','win32','Discovering\x20authorization\x20server...','VhGUa','NjLlk','YUmLT','.ranger','text/html','type','darwin','toString','result','Not\x20found','get_cli_token\x20failed:\x20','client_id','jqKAA','response_type','write','\x20done','11QZebJJ','2507036hNlaDO','TXTqc','registration_endpoint','eAXgR','Pvnem','data:','code','set','proxied','hex','yDKwN','Initializing\x20MCP\x20session...','name','\x0aToken\x20written\x20to\x20','Kwyrz','No\x20authorization_servers\x20in\x20protected\x20resource\x20metadata','slice','token','iKnLu','isTTY','writeHead','12771szPWEE','sha256','initialize','hAwJc','S256','start','authorization_code','authorization_servers'];_0x1aee=function(){return _0x459209;};return _0x1aee();}async function saveCachedToken(_0x53c842,_0x337e09,_0x441ab2){const _0x5b311a=_0x1cff32,_0x2a43c2={'Ezejg':function(_0xd26f1c,_0x3abb86,_0x3741bb){return _0xd26f1c(_0x3abb86,_0x3741bb);},'SzMpi':function(_0x10826b,_0xd9ce8a,_0x126b7e,_0x2e0156){return _0x10826b(_0xd9ce8a,_0x126b7e,_0x2e0156);}},_0x5bda5e=await loadCachedData(),_0x870a5e={..._0x5bda5e,'origin':currentOrigin,'accessToken':_0x53c842,'refreshToken':_0x337e09??_0x5bda5e?.['refreshToken'],'expiresAt':_0x441ab2?Date['now']()+_0x441ab2*0x3e8:undefined};await mkdir(_0x2a43c2[_0x5b311a(0x12b)](join,homedir(),_0x5b311a(0x166)),{'recursive':!![]}),await _0x2a43c2['SzMpi'](writeFile,TOKEN_CACHE_PATH,JSON[_0x5b311a(0x192)](_0x870a5e),{'mode':0x180});}async function loadCachedClient(){const _0x113a47=_0x1cff32,_0x442358={'RzNKP':function(_0x3fc1c5){return _0x3fc1c5();}},_0x2dbfa1=await _0x442358['RzNKP'](loadCachedData);if(_0x2dbfa1?.[_0x113a47(0x10b)]&&_0x2dbfa1[_0x113a47(0x10b)]!==currentOrigin)return null;return _0x2dbfa1?.['clientId']?{'clientId':_0x2dbfa1[_0x113a47(0x121)],'clientSecret':_0x2dbfa1['clientSecret']}:null;}async function clearCachedClient(){const _0x40b0a4={'hffPz':function(_0x1d0ea2,_0x585666,_0x1d4088,_0xe244f7){return _0x1d0ea2(_0x585666,_0x1d4088,_0xe244f7);}},_0x9ae522=await loadCachedData();if(!_0x9ae522)return;const {clientId:_0xc9798f,clientSecret:_0x36c1d9,..._0x567cfa}=_0x9ae522;await _0x40b0a4['hffPz'](writeFile,TOKEN_CACHE_PATH,JSON['stringify'](_0x567cfa),{'mode':0x180});}async function saveCachedClient(_0x5bdf7d,_0x1ae346){const _0x2da624=_0x1cff32,_0x1e9929={'QHrXJ':function(_0x3b3171,_0x468f36,_0xc34589){return _0x3b3171(_0x468f36,_0xc34589);},'FOSwM':function(_0x775fc5){return _0x775fc5();},'JHvJI':_0x2da624(0x166),'imeVe':function(_0x7c16b9,_0x2a7345,_0x4437d4,_0x342f79){return _0x7c16b9(_0x2a7345,_0x4437d4,_0x342f79);}},_0xfbde29=await loadCachedData(),_0x8dfcb5={..._0xfbde29,'origin':currentOrigin,'accessToken':_0xfbde29?.[_0x2da624(0x120)]??'','clientId':_0x5bdf7d,'clientSecret':_0x1ae346};await mkdir(_0x1e9929['QHrXJ'](join,_0x1e9929['FOSwM'](homedir),_0x1e9929[_0x2da624(0x135)]),{'recursive':!![]}),await _0x1e9929['imeVe'](writeFile,TOKEN_CACHE_PATH,JSON[_0x2da624(0x192)](_0x8dfcb5),{'mode':0x180});}async function loadCachedData(){const _0xa9d94=_0x1cff32,_0x32ff40={'yiFHZ':function(_0x381a79,_0x3df337,_0x4a1ffa){return _0x381a79(_0x3df337,_0x4a1ffa);}};try{return JSON['parse'](await _0x32ff40[_0xa9d94(0x151)](readFile,TOKEN_CACHE_PATH,_0xa9d94(0x142)));}catch{return null;}}function _0x47ab(_0x8ba3da,_0x419daa){_0x8ba3da=_0x8ba3da-0xff;const _0x1aeeb9=_0x1aee();let _0x47ab7a=_0x1aeeb9[_0x8ba3da];return _0x47ab7a;}async function parseResponse(_0x49f237){const _0x3a413c=_0x1cff32,_0x58fc3b={'ZCTTX':_0x3a413c(0x179),'TXTqc':function(_0xdb9db6,_0x48ff62){return _0xdb9db6!==_0x48ff62;}},_0x3a2981=_0x49f237['headers'][_0x3a413c(0x160)](_0x3a413c(0x14c))??'';if(_0x3a2981['includes'](_0x3a413c(0x14e))){const _0xc5d643=await _0x49f237[_0x3a413c(0x157)]();for(const _0xdabfff of _0xc5d643['split']('\x0a')){const _0x49d4fc=_0xdabfff['trim']();if(_0x49d4fc['startsWith'](_0x58fc3b[_0x3a413c(0x11b)])){const _0x21e827=_0x49d4fc[_0x3a413c(0x184)](_0x3a413c(0x179)['length'])['trim']();if(!_0x21e827)continue;try{const _0x1d3958=JSON[_0x3a413c(0x10d)](_0x21e827);if(_0x58fc3b[_0x3a413c(0x175)](_0x1d3958['id'],undefined)||_0x1d3958[_0x3a413c(0x139)])return _0x1d3958;}catch{}}}throw new Error('No\x20JSON-RPC\x20response\x20found\x20in\x20SSE\x20stream');}return _0x49f237['json']();}function extractToken(_0x405562){const _0x2a99ed=_0x1cff32,_0x1b0dff={'fyzfX':'string','YUmLT':'Unknown\x20error'};if(!_0x405562)return null;const _0x33f97e=_0x405562[_0x2a99ed(0xff)];if(_0x33f97e?.['token']&&typeof _0x33f97e['token']===_0x1b0dff['fyzfX'])return _0x33f97e[_0x2a99ed(0x185)];if(_0x405562['isError']){const _0x157eed=_0x405562['content'];throw new Error('Server\x20returned\x20error:\x20'+(_0x157eed?.[0x0]?.['text']??_0x1b0dff[_0x2a99ed(0x165)]));}const _0x2d1cff=_0x405562['content'];if(_0x2d1cff)for(const _0x209eca of _0x2d1cff){if(_0x209eca[_0x2a99ed(0x168)]==='text'&&_0x209eca[_0x2a99ed(0x157)]){try{const _0x2e25fb=JSON[_0x2a99ed(0x10d)](_0x209eca['text']);if(typeof _0x2e25fb?.['token']==='string')return _0x2e25fb['token'];}catch{}const _0x389bad=_0x209eca[_0x2a99ed(0x157)]['match'](/(rngr_[A-Za-z0-9_-]+)/);if(_0x389bad)return _0x389bad[0x1];}}return null;}
@@ -1 +1 @@
1
- function _0x1c42(_0x57e527,_0x4bb81c){_0x57e527=_0x57e527-0x16f;var _0x3a32e3=_0x3a32();var _0x1c42d4=_0x3a32e3[_0x57e527];return _0x1c42d4;}(function(_0x260175,_0x3150a3){var _0x47b410=_0x1c42,_0x162554=_0x260175();while(!![]){try{var _0x1967e7=parseInt(_0x47b410(0x17e))/0x1+parseInt(_0x47b410(0x177))/0x2+-parseInt(_0x47b410(0x17b))/0x3*(-parseInt(_0x47b410(0x178))/0x4)+-parseInt(_0x47b410(0x176))/0x5*(parseInt(_0x47b410(0x172))/0x6)+-parseInt(_0x47b410(0x16f))/0x7*(parseInt(_0x47b410(0x179))/0x8)+-parseInt(_0x47b410(0x173))/0x9+-parseInt(_0x47b410(0x17a))/0xa;if(_0x1967e7===_0x3150a3)break;else _0x162554['push'](_0x162554['shift']());}catch(_0x44f5c3){_0x162554['push'](_0x162554['shift']());}}}(_0x3a32,0xd3019));function _0x3a32(){var _0x19bf3b=['To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','hyXPx','1329254SrTaxD','77zZvopG','UioTY','cSKeZ','496158saflXr','718029TKpeyr','\x20\x20https://docs.ranger.net/main/concepts/profiles\x0a','oRbya','90abgMxn','3160704YMnCJt','84llMOXr','81016tRnPVR','17023440rViucA','190953hsnhZH'];_0x3a32=function(){return _0x19bf3b;};return _0x3a32();}export async function migrateProfile(_0x500e17,_0x546877){var _0x4955f2=_0x1c42,_0x219d8e={'cSKeZ':function(_0x5da4e7,_0x444172){return _0x5da4e7+_0x444172;},'hyXPx':function(_0x41b580,_0x1fe2fd){return _0x41b580+_0x1fe2fd;},'cVyKH':function(_0x442fd8,_0x3e29d7){return _0x442fd8+_0x3e29d7;},'UioTY':'ranger\x20profile\x20migrate\x20is\x20no\x20longer\x20supported.\x0a','vlKFV':'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','oRbya':'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','bruqP':'Existing\x20sessions\x20in\x20your\x20old\x20<project>/.ranger/\x20dirs\x20still\x20work\x20as\x20a\x0a'};console['error'](_0x219d8e[_0x4955f2(0x171)](_0x219d8e['hyXPx'](_0x219d8e['cVyKH'](_0x219d8e[_0x4955f2(0x17d)](_0x219d8e['cVyKH'](_0x219d8e[_0x4955f2(0x170)]+'\x0a',_0x4955f2(0x17c)),_0x219d8e['vlKFV'])+'\x0a',_0x219d8e[_0x4955f2(0x175)]),_0x4955f2(0x174)),'\x0a')+_0x219d8e['bruqP']+'fallback;\x20you\x20can\x20delete\x20them\x20once\x20you\x20have\x20re-auth-ed.'),process['exit'](0x1);}
1
+ (function(_0x4df19d,_0x1f7291){var _0x3756b7=_0x456f,_0x19be93=_0x4df19d();while(!![]){try{var _0x51468b=parseInt(_0x3756b7(0x13e))/0x1*(-parseInt(_0x3756b7(0x143))/0x2)+-parseInt(_0x3756b7(0x13d))/0x3*(parseInt(_0x3756b7(0x139))/0x4)+parseInt(_0x3756b7(0x142))/0x5+-parseInt(_0x3756b7(0x134))/0x6+-parseInt(_0x3756b7(0x148))/0x7+-parseInt(_0x3756b7(0x140))/0x8+parseInt(_0x3756b7(0x144))/0x9*(parseInt(_0x3756b7(0x141))/0xa);if(_0x51468b===_0x1f7291)break;else _0x19be93['push'](_0x19be93['shift']());}catch(_0x284148){_0x19be93['push'](_0x19be93['shift']());}}}(_0x337d,0x79c19));function _0x456f(_0x23654d,_0x326d98){_0x23654d=_0x23654d-0x134;var _0x337de6=_0x337d();var _0x456f30=_0x337de6[_0x23654d];return _0x456f30;}function _0x337d(){var _0x569afc=['1729287sVsAxI','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','1387464HtifhR','cSNdP','YoAWm','TNjhp','Existing\x20sessions\x20in\x20your\x20old\x20<project>/.ranger/\x20dirs\x20still\x20work\x20as\x20a\x0a','259132RZwflc','bNhPM','ranger\x20profile\x20migrate\x20is\x20no\x20longer\x20supported.\x0a','error','3BsPnLP','6euqPaO','exit','730640ZClvCM','3605680NzIJnJ','775645zEByiZ','34574jVvBst','27vUEFWh','XiOdS','vLqFx','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a'];_0x337d=function(){return _0x569afc;};return _0x337d();}export async function migrateProfile(_0x10fc6e,_0x345245){var _0x51aaa7=_0x456f,_0x4206e0={'YoAWm':function(_0x1fab60,_0x5a5995){return _0x1fab60+_0x5a5995;},'TNjhp':function(_0x2d1edd,_0x36677f){return _0x2d1edd+_0x36677f;},'cSNdP':_0x51aaa7(0x13b),'XiOdS':_0x51aaa7(0x147),'EMzRU':'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','bNhPM':_0x51aaa7(0x149),'xZodJ':'\x20\x20https://docs.ranger.net/main/concepts/profiles\x0a','vLqFx':_0x51aaa7(0x138)};console[_0x51aaa7(0x13c)](_0x4206e0[_0x51aaa7(0x136)](_0x4206e0[_0x51aaa7(0x137)](_0x4206e0['YoAWm'](_0x4206e0['YoAWm'](_0x4206e0[_0x51aaa7(0x135)],'\x0a')+_0x4206e0[_0x51aaa7(0x145)],_0x4206e0['EMzRU']),'\x0a')+_0x4206e0[_0x51aaa7(0x13a)]+_0x4206e0['xZodJ'],'\x0a')+_0x4206e0[_0x51aaa7(0x146)]+'fallback;\x20you\x20can\x20delete\x20them\x20once\x20you\x20have\x20re-auth-ed.'),process[_0x51aaa7(0x13f)](0x1);}
@@ -1 +1 @@
1
- function _0x4c85(){const _0x51fa69=['1062280TWYoAr','itpDz','rnWic','xjDSB','1053470McwqUw','4636oreXzE','Would\x20you\x20like\x20to\x20install\x20skills?','7rkSRJf','CjykU','pluginScope','SKILL.md','526qtAReC','prompt','rBTUp','YmRhD','output','702psaRFb','confirm','success','project','list','\x0a📦\x20Claude\x20Code\x20Plugin\x0a','rqWmm','✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully','bAslj','6770AAYKsc','444ZVVbAE','vSlkV','\x20level)...\x0a','wantsSkillup','--scope','6983548gMUcGS','DAOAk','plugin','✓\x20Claude\x20Code\x20plugin\x20enabled','ranger@trailhead','✓\x20Marketplace\x20already\x20added','LMVSf','mOLnV','AGgfY','NmnOn','user','add','.claude','Where\x20should\x20the\x20plugin\x20be\x20installed?','srQZL','69FQusso','pvpzs','1430514wdVBLH','QJEUo','error','log','marketplace','MOpol','⚠\x20Failed\x20to\x20enable\x20plugin:','lJLRy','RUMbn'];_0x4c85=function(){return _0x51fa69;};return _0x4c85();}(function(_0x32017c,_0x203b8a){const _0x327548=_0x4855,_0x297c50=_0x32017c();while(!![]){try{const _0xed4ea5=parseInt(_0x327548(0x8c))/0x1*(-parseInt(_0x327548(0xa2))/0x2)+-parseInt(_0x327548(0xb1))/0x3*(-parseInt(_0x327548(0x9c))/0x4)+parseInt(_0x327548(0x9b))/0x5+parseInt(_0x327548(0x8e))/0x6+parseInt(_0x327548(0x9e))/0x7*(parseInt(_0x327548(0x97))/0x8)+-parseInt(_0x327548(0xa7))/0x9*(-parseInt(_0x327548(0xb0))/0xa)+-parseInt(_0x327548(0xb6))/0xb;if(_0xed4ea5===_0x203b8a)break;else _0x297c50['push'](_0x297c50['shift']());}catch(_0x55d499){_0x297c50['push'](_0x297c50['shift']());}}}(_0x4c85,0x25685));import{join}from'path';import{existsSync}from'fs';import _0x57b791 from'inquirer';function _0x4855(_0x4c2e95,_0xa3d554){_0x4c2e95=_0x4c2e95-0x80;const _0x4c85a8=_0x4c85();let _0x48553e=_0x4c85a8[_0x4c2e95];return _0x48553e;}import{skillup}from'../skillup.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'../utils/claudePlugin.js';import{getProjectRoot,getSkillsDir}from'../utils/claudeConfig.js';export async function ensureClaudePlugin(_0x223399){const _0x460720=_0x4855,_0x5150ca={'vTula':function(_0x3c40b5,_0x27b138){return _0x3c40b5(_0x27b138);},'MOpol':function(_0x2293df,_0x1d6aaf){return _0x2293df(_0x1d6aaf);},'pvpzs':function(_0x5bf79e){return _0x5bf79e();},'RUMbn':_0x460720(0xaa),'lcAoO':_0x460720(0xab),'Vaoxp':_0x460720(0xa0),'rqWmm':'User\x20(available\x20in\x20all\x20your\x20projects)','mOLnV':_0x460720(0x87),'srQZL':'Project\x20(shared\x20with\x20team\x20via\x20git)','YmRhD':'trailhead','AjZkW':function(_0x4a9f8d,_0x106b05){return _0x4a9f8d(_0x106b05);},'AGgfY':'plugin','lJLRy':'ranger-testing/trailhead','JSjvj':'❌\x20Failed\x20to\x20add\x20marketplace:','rnWic':'\x0aYou\x20can\x20install\x20manually\x20with:','xjDSB':function(_0x53bb20,_0x3c8cdd,_0x13af8b){return _0x53bb20(_0x3c8cdd,_0x13af8b);},'IQhhd':_0x460720(0x81),'DAOAk':function(_0x2206fd,_0x32c8a3){return _0x2206fd===_0x32c8a3;},'rBTUp':'❌\x20Failed\x20to\x20install\x20plugin:','vSlkV':_0x460720(0xae),'yRvce':'enable','dpFZh':_0x460720(0xb5),'itpDz':function(_0x26d7f6){return _0x26d7f6();},'oujrv':'already\x20enabled','CjykU':_0x460720(0x94)},_0x13bf87=await _0x5150ca['vTula'](isPluginInstalled,_0x460720(0x81));if(_0x13bf87)return console['log']('✓\x20Claude\x20Code\x20plugin\x20already\x20installed'),![];const _0x411a53=_0x5150ca[_0x460720(0x93)](existsSync,join(_0x5150ca[_0x460720(0x8d)](getProjectRoot),'.claude'));let _0x326e3c;if(_0x223399)_0x326e3c=_0x223399;else{if(_0x411a53)_0x326e3c=_0x5150ca[_0x460720(0x96)];else{console['log'](_0x460720(0xac));const _0x226768=await _0x57b791[_0x460720(0xa3)]([{'type':_0x5150ca['lcAoO'],'name':_0x5150ca['Vaoxp'],'message':_0x460720(0x8a),'choices':[{'name':_0x5150ca[_0x460720(0xad)],'value':_0x5150ca[_0x460720(0x84)]},{'name':_0x5150ca[_0x460720(0x8b)],'value':'project'}],'default':'user'}]);_0x326e3c=_0x226768['pluginScope'];}}console[_0x460720(0x91)]('\x0aInstalling\x20Claude\x20Code\x20plugin\x20('+_0x326e3c+_0x460720(0xb3));const _0x5f0fc5=await isMarketplaceAdded(_0x5150ca[_0x460720(0xa5)]);let _0x183728=_0x5f0fc5;if(_0x5f0fc5)console['log'](_0x460720(0x82));else{const _0x19c3e5=await _0x5150ca['AjZkW'](runClaudeCommand,[_0x5150ca[_0x460720(0x85)],_0x460720(0x92),_0x460720(0x88),_0x5150ca[_0x460720(0x95)]]);!_0x19c3e5[_0x460720(0xa9)]?(console[_0x460720(0x90)](_0x5150ca['JSjvj'],_0x19c3e5[_0x460720(0x90)]),console[_0x460720(0x91)](_0x5150ca[_0x460720(0x99)]),console[_0x460720(0x91)]('\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead'),console[_0x460720(0x91)]('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0x326e3c)):_0x183728=!![];}if(_0x183728){const _0x158a77=await _0x5150ca[_0x460720(0x9a)](runClaudeCommand,[_0x5150ca[_0x460720(0x85)],'install',_0x5150ca['IQhhd'],'--scope',_0x326e3c],{'cwd':_0x5150ca[_0x460720(0xb7)](_0x326e3c,_0x460720(0xaa))?_0x5150ca[_0x460720(0x8d)](getProjectRoot):undefined});if(!_0x158a77['success'])console['error'](_0x5150ca[_0x460720(0xa4)],_0x158a77[_0x460720(0x90)]),console['log']('\x0aYou\x20can\x20install\x20manually\x20with:'),console['log']('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0x326e3c);else{console[_0x460720(0x91)](_0x5150ca[_0x460720(0xb2)]);const _0x3affb6=[_0x460720(0xb8),_0x5150ca['yRvce'],'ranger@trailhead'];_0x326e3c===_0x460720(0xaa)&&_0x3affb6['push'](_0x5150ca['dpFZh'],_0x5150ca['RUMbn']);const _0xd67eab=await _0x5150ca['xjDSB'](runClaudeCommand,_0x3affb6,{'captureOutput':!![],'cwd':_0x326e3c===_0x5150ca[_0x460720(0x96)]?_0x5150ca[_0x460720(0x98)](getProjectRoot):undefined}),_0x2bb127=_0xd67eab[_0x460720(0xa6)]?.['includes'](_0x5150ca['oujrv']);!_0xd67eab[_0x460720(0xa9)]&&!_0x2bb127?console['error'](_0x5150ca[_0x460720(0x9f)],_0xd67eab[_0x460720(0x90)]):console['log'](_0x460720(0x80));}}return!![];}export async function ensureClaudeSkills(_0x448d16){const _0xaf3a7e=_0x4855,_0x1fd6bb={'bAslj':function(_0x1558b1,_0x1df0ec){return _0x1558b1(_0x1df0ec);},'zbGkG':function(_0x43b513,_0x1d0a1c,_0x58646e,_0x1ad976){return _0x43b513(_0x1d0a1c,_0x58646e,_0x1ad976);},'buboR':_0xaf3a7e(0x87),'yavWJ':_0xaf3a7e(0xa1),'kchSd':'project','NmnOn':'✓\x20Ranger\x20skills\x20already\x20installed','jBTZi':function(_0x277e6b,_0x7a13ba){return _0x277e6b(_0x7a13ba);},'wCgGL':_0xaf3a7e(0x89),'LMVSf':function(_0xf1a3c7,_0x4f8a6a){return _0xf1a3c7(_0x4f8a6a);},'nvpQN':_0xaf3a7e(0xb4),'QJEUo':_0xaf3a7e(0x9d)},_0x3b55b8=_0x1fd6bb['bAslj'](existsSync,_0x1fd6bb['zbGkG'](join,getSkillsDir(_0x1fd6bb['buboR']),'ranger',_0x1fd6bb['yavWJ'])),_0x546d41=existsSync(join(_0x1fd6bb[_0xaf3a7e(0xaf)](getSkillsDir,_0x1fd6bb['kchSd']),'ranger',_0x1fd6bb['yavWJ']));if(_0x3b55b8||_0x546d41)return console[_0xaf3a7e(0x91)](_0x1fd6bb[_0xaf3a7e(0x86)]),![];const _0x28b0ba=_0x1fd6bb['jBTZi'](existsSync,join(getProjectRoot(),_0x1fd6bb['wCgGL']));let _0x5b65f2=!![];if(_0x448d16)await _0x1fd6bb[_0xaf3a7e(0x83)](skillup,{'autoInstall':_0x448d16,'suppressUsage':!![]});else{if(_0x28b0ba)await _0x1fd6bb[_0xaf3a7e(0x83)](skillup,{'autoInstall':_0xaf3a7e(0xaa),'suppressUsage':!![]});else{const _0x5aa90e=await _0x57b791[_0xaf3a7e(0xa3)]([{'type':_0xaf3a7e(0xa8),'name':_0x1fd6bb['nvpQN'],'message':_0x1fd6bb[_0xaf3a7e(0x8f)],'default':!![]}]);_0x5b65f2=_0x5aa90e[_0xaf3a7e(0xb4)],_0x5b65f2&&await skillup({'suppressUsage':!![]});}}return _0x5b65f2;}
1
+ function _0x2c09(_0x4ec352,_0x4be285){_0x4ec352=_0x4ec352-0x17a;const _0x4d0741=_0x4d07();let _0x2c0904=_0x4d0741[_0x4ec352];return _0x2c0904;}(function(_0x31c2cd,_0x419c1b){const _0x4377e3=_0x2c09,_0x1ef449=_0x31c2cd();while(!![]){try{const _0x5eb11c=-parseInt(_0x4377e3(0x18f))/0x1*(parseInt(_0x4377e3(0x1aa))/0x2)+parseInt(_0x4377e3(0x17d))/0x3*(-parseInt(_0x4377e3(0x17a))/0x4)+parseInt(_0x4377e3(0x1a6))/0x5*(parseInt(_0x4377e3(0x19a))/0x6)+parseInt(_0x4377e3(0x1a9))/0x7*(parseInt(_0x4377e3(0x1a4))/0x8)+-parseInt(_0x4377e3(0x189))/0x9+-parseInt(_0x4377e3(0x196))/0xa*(-parseInt(_0x4377e3(0x184))/0xb)+parseInt(_0x4377e3(0x181))/0xc;if(_0x5eb11c===_0x419c1b)break;else _0x1ef449['push'](_0x1ef449['shift']());}catch(_0xbb83fc){_0x1ef449['push'](_0x1ef449['shift']());}}}(_0x4d07,0x6dc4b));import{join}from'path';import{existsSync}from'fs';function _0x4d07(){const _0x8e727f=['RaGfr','HBKaQ','enable','--scope','JAEZG','tcqKf','❌\x20Failed\x20to\x20add\x20marketplace:','nNIFf','40ZElkvw','project','5jZSFmT','\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','error','1237334zTyTRQ','110uUdxDS','Project\x20(shared\x20with\x20team\x20via\x20git)','TmpXy','csTBh','364lMNPTm','success','✓\x20Ranger\x20skills\x20already\x20installed','28416LGlepe','ranger@trailhead','BHeQL','qOcGV','2344368lBhTft','ZMNgR','OQryh','4158VJZfDe','\x0a📦\x20Claude\x20Code\x20Plugin\x0a','user','jLdhk','ranger-testing/trailhead','3684384NxMnPZ','yJHOW','plugin','marketplace','\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20','wantsSkillup','15443mtUtma','DnjQW','CjcoW','\x0aYou\x20can\x20install\x20manually\x20with:','VooPI','✓\x20Marketplace\x20already\x20added','UbEqS','16280xDwiVE','LercH','✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully','\x0aInstalling\x20Claude\x20Code\x20plugin\x20(','5254476wzKwwS','log'];_0x4d07=function(){return _0x8e727f;};return _0x4d07();}import _0x6b25b8 from'inquirer';import{skillup}from'../skillup.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'../utils/claudePlugin.js';import{getProjectRoot,getSkillsDir}from'../utils/claudeConfig.js';export async function ensureClaudePlugin(_0x133260){const _0x4f46f7=_0x2c09,_0x4d9f75={'OQryh':function(_0x3a5acb,_0xddbe53){return _0x3a5acb(_0xddbe53);},'VooPI':_0x4f46f7(0x17e),'iWpRA':'✓\x20Claude\x20Code\x20plugin\x20already\x20installed','eZvsE':function(_0xa38bf0,_0xf9bc8b){return _0xa38bf0(_0xf9bc8b);},'qOcGV':function(_0x205166){return _0x205166();},'JAEZG':'pluginScope','yJHOW':_0x4f46f7(0x1a5),'ubIXl':'user','csTBh':'trailhead','TmpXy':'add','MbwoX':_0x4f46f7(0x1a2),'nNIFf':_0x4f46f7(0x192),'RaGfr':function(_0x320552){return _0x320552();},'IjFfk':_0x4f46f7(0x18b),'HBKaQ':_0x4f46f7(0x19e),'jLdhk':function(_0x36a964,_0x12ed32){return _0x36a964===_0x12ed32;},'CjcoW':function(_0x421b7e,_0x4f2f57){return _0x421b7e===_0x4f2f57;},'IxdpQ':'already\x20enabled','WKKHW':'✓\x20Claude\x20Code\x20plugin\x20enabled'},_0x58fa9b=await _0x4d9f75[_0x4f46f7(0x183)](isPluginInstalled,_0x4d9f75['VooPI']);if(_0x58fa9b)return console['log'](_0x4d9f75['iWpRA']),![];const _0x5573a0=_0x4d9f75['eZvsE'](existsSync,join(_0x4d9f75[_0x4f46f7(0x180)](getProjectRoot),'.claude'));let _0x19c51d;if(_0x133260)_0x19c51d=_0x133260;else{if(_0x5573a0)_0x19c51d=_0x4f46f7(0x1a5);else{console['log'](_0x4f46f7(0x185));const _0x28b509=await _0x6b25b8['prompt']([{'type':'list','name':_0x4d9f75[_0x4f46f7(0x1a0)],'message':'Where\x20should\x20the\x20plugin\x20be\x20installed?','choices':[{'name':'User\x20(available\x20in\x20all\x20your\x20projects)','value':'user'},{'name':_0x4f46f7(0x1ab),'value':_0x4d9f75['yJHOW']}],'default':_0x4d9f75['ubIXl']}]);_0x19c51d=_0x28b509['pluginScope'];}}console['log'](_0x4f46f7(0x199)+_0x19c51d+'\x20level)...\x0a');const _0x34f89f=await isMarketplaceAdded(_0x4d9f75[_0x4f46f7(0x1ad)]);let _0x56de26=_0x34f89f;if(_0x34f89f)console[_0x4f46f7(0x19b)](_0x4f46f7(0x194));else{const _0x457d35=await runClaudeCommand(['plugin',_0x4f46f7(0x18c),_0x4d9f75[_0x4f46f7(0x1ac)],_0x4f46f7(0x188)]);!_0x457d35[_0x4f46f7(0x17b)]?(console['error'](_0x4d9f75['MbwoX'],_0x457d35['error']),console['log'](_0x4d9f75[_0x4f46f7(0x1a3)]),console['log'](_0x4f46f7(0x1a7)),console['log']('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0x19c51d)):_0x56de26=!![];}if(_0x56de26){const _0x15f83b=await runClaudeCommand(['plugin','install',_0x4d9f75[_0x4f46f7(0x193)],_0x4f46f7(0x19f),_0x19c51d],{'cwd':_0x19c51d===_0x4f46f7(0x1a5)?_0x4d9f75[_0x4f46f7(0x19c)](getProjectRoot):undefined});if(!_0x15f83b['success'])console[_0x4f46f7(0x1a8)]('❌\x20Failed\x20to\x20install\x20plugin:',_0x15f83b[_0x4f46f7(0x1a8)]),console['log'](_0x4d9f75['nNIFf']),console[_0x4f46f7(0x19b)](_0x4f46f7(0x18d)+_0x19c51d);else{console[_0x4f46f7(0x19b)](_0x4f46f7(0x198));const _0x3af341=[_0x4d9f75['IjFfk'],_0x4d9f75[_0x4f46f7(0x19d)],'ranger@trailhead'];_0x4d9f75[_0x4f46f7(0x187)](_0x19c51d,_0x4d9f75[_0x4f46f7(0x18a)])&&_0x3af341['push']('--scope',_0x4d9f75[_0x4f46f7(0x18a)]);const _0x369a0d=await runClaudeCommand(_0x3af341,{'captureOutput':!![],'cwd':_0x4d9f75[_0x4f46f7(0x191)](_0x19c51d,_0x4d9f75['yJHOW'])?getProjectRoot():undefined}),_0x42feca=_0x369a0d['output']?.['includes'](_0x4d9f75['IxdpQ']);!_0x369a0d['success']&&!_0x42feca?console[_0x4f46f7(0x1a8)]('⚠\x20Failed\x20to\x20enable\x20plugin:',_0x369a0d[_0x4f46f7(0x1a8)]):console[_0x4f46f7(0x19b)](_0x4d9f75['WKKHW']);}}return!![];}export async function ensureClaudeSkills(_0x955f98){const _0x4a722a=_0x2c09,_0x26e9a5={'LercH':function(_0x72fa81,_0x513c2c,_0x2f9f98,_0x58c987){return _0x72fa81(_0x513c2c,_0x2f9f98,_0x58c987);},'djCLF':_0x4a722a(0x186),'DnjQW':function(_0x5e61e5,_0x10fafd){return _0x5e61e5(_0x10fafd);},'UPhmP':_0x4a722a(0x1a5),'EVITm':'SKILL.md','JWVfF':function(_0xba9cce,_0x362670){return _0xba9cce||_0x362670;},'ZMNgR':function(_0x56618d,_0x3bb9b2,_0x449c3d){return _0x56618d(_0x3bb9b2,_0x449c3d);},'BHeQL':function(_0x5df810){return _0x5df810();},'tcqKf':'.claude','UbEqS':'Would\x20you\x20like\x20to\x20install\x20skills?'},_0x2a1e67=existsSync(_0x26e9a5['LercH'](join,getSkillsDir(_0x26e9a5['djCLF']),'ranger','SKILL.md')),_0x368a29=_0x26e9a5[_0x4a722a(0x190)](existsSync,_0x26e9a5[_0x4a722a(0x197)](join,getSkillsDir(_0x26e9a5['UPhmP']),'ranger',_0x26e9a5['EVITm']));if(_0x26e9a5['JWVfF'](_0x2a1e67,_0x368a29))return console[_0x4a722a(0x19b)](_0x4a722a(0x17c)),![];const _0x4d077b=existsSync(_0x26e9a5[_0x4a722a(0x182)](join,_0x26e9a5[_0x4a722a(0x17f)](getProjectRoot),_0x26e9a5[_0x4a722a(0x1a1)]));let _0x5a8634=!![];if(_0x955f98)await skillup({'autoInstall':_0x955f98,'suppressUsage':!![]});else{if(_0x4d077b)await skillup({'autoInstall':_0x26e9a5['UPhmP'],'suppressUsage':!![]});else{const _0x5147b0=await _0x6b25b8['prompt']([{'type':'confirm','name':'wantsSkillup','message':_0x26e9a5[_0x4a722a(0x195)],'default':!![]}]);_0x5a8634=_0x5147b0[_0x4a722a(0x18e)],_0x5a8634&&await _0x26e9a5[_0x4a722a(0x190)](skillup,{'suppressUsage':!![]});}}return _0x5a8634;}
@@ -1 +1 @@
1
- (function(_0xe5ce9d,_0x4889ca){const _0x314fa6=_0x2de1,_0xd7a382=_0xe5ce9d();while(!![]){try{const _0x3fda7b=parseInt(_0x314fa6(0xc6))/0x1+-parseInt(_0x314fa6(0xc9))/0x2+-parseInt(_0x314fa6(0xde))/0x3+-parseInt(_0x314fa6(0xd8))/0x4+-parseInt(_0x314fa6(0xcb))/0x5*(-parseInt(_0x314fa6(0xdb))/0x6)+-parseInt(_0x314fa6(0xce))/0x7+-parseInt(_0x314fa6(0xcd))/0x8*(-parseInt(_0x314fa6(0xdd))/0x9);if(_0x3fda7b===_0x4889ca)break;else _0xd7a382['push'](_0xd7a382['shift']());}catch(_0x28b95a){_0xd7a382['push'](_0xd7a382['shift']());}}}(_0x43de,0xb279a));import{join}from'path';import{existsSync}from'fs';function _0x2de1(_0x2c30a1,_0x5db3ee){_0x2c30a1=_0x2c30a1-0xc6;const _0x43de91=_0x43de();let _0x2de1b3=_0x43de91[_0x2c30a1];return _0x2de1b3;}import{mkdir,readFile,writeFile}from'fs/promises';import _0x95f200 from'inquirer';import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';function _0x43de(){const _0x4601d1=['haMVK','225054omJoTo','1082364eoRiKv','YOaqy','stringify','kFoDe','100710crEgNN','error','@ranger-testing/opencode-plugin','1082496ceVHqk','plugin','1315HkwZvR','isArray','736UGDLsQ','9475256EZDIJJ','includes','beYxX','\x0a📦\x20OpenCode\x20Plugin\x0a','ECoER','parse','cXqKQ','log','User\x20(available\x20in\x20all\x20your\x20projects)','project','651276jhpsRs','✓\x20OpenCode\x20plugin\x20already\x20configured','opencode.json','17070ijUFpw'];_0x43de=function(){return _0x4601d1;};return _0x43de();}export async function ensureOpencodePluginConfig(_0x3116af){const _0x33fedb=_0x2de1,_0x47b5a9={'cXqKQ':function(_0x4129bd,_0x402f5f,_0x36b3c8){return _0x4129bd(_0x402f5f,_0x36b3c8);},'YOaqy':function(_0x5de660,_0x18bb9a){return _0x5de660(_0x18bb9a);},'UNtSS':'opencode.json','beYxX':'list','kFoDe':_0x33fedb(0xd6),'ECoER':'Project\x20(shared\x20with\x20team\x20via\x20git)','IhmJC':function(_0x1c3421,_0x4c4055){return _0x1c3421(_0x4c4055);},'tzrtF':'⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.','haMVK':function(_0x29cbeb,_0x507353){return _0x29cbeb(_0x507353);},'lUQbX':'✓\x20OpenCode\x20plugin\x20configured'},_0x350072=existsSync(_0x47b5a9[_0x33fedb(0xd4)](join,_0x47b5a9[_0x33fedb(0xdf)](getOpencodeConfigDir,'project'),_0x47b5a9['UNtSS']));let _0x5301ac;if(_0x3116af)_0x5301ac=_0x3116af;else{if(_0x350072)_0x5301ac='project';else{console['log'](_0x33fedb(0xd1));const _0x2e0d02=await _0x95f200['prompt']([{'type':_0x47b5a9[_0x33fedb(0xd0)],'name':'pluginScope','message':'Where\x20should\x20the\x20plugin\x20be\x20installed?','choices':[{'name':_0x47b5a9[_0x33fedb(0xe1)],'value':'user'},{'name':_0x47b5a9[_0x33fedb(0xd2)],'value':_0x33fedb(0xd7)}],'default':'user'}]);_0x5301ac=_0x2e0d02['pluginScope'];}}const _0x4552a2=join(_0x47b5a9['IhmJC'](getOpencodeConfigDir,_0x5301ac),_0x33fedb(0xda)),_0x296ff3=_0x33fedb(0xc8),_0x3b6df5='https://opencode.ai/config.json';let _0x48fbfb={};if(existsSync(_0x4552a2))try{const _0x4026ac=await _0x47b5a9[_0x33fedb(0xd4)](readFile,_0x4552a2,'utf-8');_0x48fbfb=JSON[_0x33fedb(0xd3)](_0x4026ac);}catch(_0x358d0f){return console[_0x33fedb(0xc7)](_0x47b5a9['tzrtF']),{'configured':![],'scope':_0x5301ac,'error':'Failed\x20to\x20read\x20opencode.json','details':_0x358d0f};}const _0x4bd7b7=Array[_0x33fedb(0xcc)](_0x48fbfb[_0x33fedb(0xca)])?_0x48fbfb[_0x33fedb(0xca)]:[];if(_0x4bd7b7[_0x33fedb(0xcf)](_0x296ff3))return console['log'](_0x33fedb(0xd9)),{'configured':![],'scope':_0x5301ac};return _0x48fbfb['$schema']=_0x48fbfb['$schema']||_0x3b6df5,_0x48fbfb['plugin']=[..._0x4bd7b7,_0x296ff3],await mkdir(_0x47b5a9[_0x33fedb(0xdc)](getOpencodeConfigDir,_0x5301ac),{'recursive':!![]}),await _0x47b5a9['cXqKQ'](writeFile,_0x4552a2,JSON[_0x33fedb(0xe0)](_0x48fbfb,null,0x2)+'\x0a'),console[_0x33fedb(0xd5)](_0x47b5a9['lUQbX']),{'configured':!![],'scope':_0x5301ac};}
1
+ (function(_0x23f88f,_0x3c09f7){const _0x2dfd95=_0x2747,_0x31752a=_0x23f88f();while(!![]){try{const _0x504dbb=parseInt(_0x2dfd95(0xb3))/0x1+parseInt(_0x2dfd95(0xa3))/0x2*(-parseInt(_0x2dfd95(0xaa))/0x3)+parseInt(_0x2dfd95(0xbe))/0x4*(-parseInt(_0x2dfd95(0xaf))/0x5)+parseInt(_0x2dfd95(0xb6))/0x6*(-parseInt(_0x2dfd95(0xba))/0x7)+-parseInt(_0x2dfd95(0xbd))/0x8+-parseInt(_0x2dfd95(0xbc))/0x9+-parseInt(_0x2dfd95(0xb0))/0xa*(-parseInt(_0x2dfd95(0xa7))/0xb);if(_0x504dbb===_0x3c09f7)break;else _0x31752a['push'](_0x31752a['shift']());}catch(_0x35de5d){_0x31752a['push'](_0x31752a['shift']());}}}(_0x2996,0x993d5));import{join}from'path';import{existsSync}from'fs';function _0x2996(){const _0x339f9d=['plugin','https://opencode.ai/config.json','15DLycgC','@ranger-testing/opencode-plugin','User\x20(available\x20in\x20all\x20your\x20projects)','ICHXH','✓\x20OpenCode\x20plugin\x20configured','2832505fqYqtw','2028970kTwIlP','project','✓\x20OpenCode\x20plugin\x20already\x20configured','1006860QVRtbJ','mCEJF','uVXPs','17040HlzZbJ','user','Failed\x20to\x20read\x20opencode.json','Where\x20should\x20the\x20plugin\x20be\x20installed?','1764LSwChZ','log','1436166YmtnTB','8715504XPvUGi','4bsBIol','pluginScope','31946CzTZfy','⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.','$schema','isArray','121zXJzqH'];_0x2996=function(){return _0x339f9d;};return _0x2996();}function _0x2747(_0x323796,_0x21d8db){_0x323796=_0x323796-0xa2;const _0x2996c0=_0x2996();let _0x274796=_0x2996c0[_0x323796];return _0x274796;}import{mkdir,readFile,writeFile}from'fs/promises';import _0x4ef52c from'inquirer';import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';export async function ensureOpencodePluginConfig(_0x1aa9ee){const _0x32fc6d=_0x2747,_0x1955cf={'plXJQ':'pluginScope','RYmtZ':'user','uVXPs':'Project\x20(shared\x20with\x20team\x20via\x20git)','paSaq':_0x32fc6d(0xb1),'ICHXH':function(_0x4ab95c,_0x477718,_0x493099){return _0x4ab95c(_0x477718,_0x493099);},'KsGyy':'utf-8','aAkFZ':_0x32fc6d(0xa4),'mCEJF':function(_0x56cb40,_0x1613aa){return _0x56cb40(_0x1613aa);}},_0x2fc3b3=existsSync(join(getOpencodeConfigDir('project'),'opencode.json'));let _0x5729ec;if(_0x1aa9ee)_0x5729ec=_0x1aa9ee;else{if(_0x2fc3b3)_0x5729ec=_0x32fc6d(0xb1);else{console['log']('\x0a📦\x20OpenCode\x20Plugin\x0a');const _0xf001a2=await _0x4ef52c['prompt']([{'type':'list','name':_0x1955cf['plXJQ'],'message':_0x32fc6d(0xb9),'choices':[{'name':_0x32fc6d(0xac),'value':_0x1955cf['RYmtZ']},{'name':_0x1955cf[_0x32fc6d(0xb5)],'value':_0x1955cf['paSaq']}],'default':_0x32fc6d(0xb7)}]);_0x5729ec=_0xf001a2[_0x32fc6d(0xa2)];}}const _0x5657a7=_0x1955cf['ICHXH'](join,getOpencodeConfigDir(_0x5729ec),'opencode.json'),_0x2781f9=_0x32fc6d(0xab),_0xcd8f4f=_0x32fc6d(0xa9);let _0xb291ab={};if(existsSync(_0x5657a7))try{const _0x559721=await _0x1955cf[_0x32fc6d(0xad)](readFile,_0x5657a7,_0x1955cf['KsGyy']);_0xb291ab=JSON['parse'](_0x559721);}catch(_0x5edd3a){return console['error'](_0x1955cf['aAkFZ']),{'configured':![],'scope':_0x5729ec,'error':_0x32fc6d(0xb8),'details':_0x5edd3a};}const _0x36ca8a=Array[_0x32fc6d(0xa6)](_0xb291ab[_0x32fc6d(0xa8)])?_0xb291ab['plugin']:[];if(_0x36ca8a['includes'](_0x2781f9))return console['log'](_0x32fc6d(0xb2)),{'configured':![],'scope':_0x5729ec};return _0xb291ab[_0x32fc6d(0xa5)]=_0xb291ab[_0x32fc6d(0xa5)]||_0xcd8f4f,_0xb291ab['plugin']=[..._0x36ca8a,_0x2781f9],await _0x1955cf['ICHXH'](mkdir,_0x1955cf[_0x32fc6d(0xb4)](getOpencodeConfigDir,_0x5729ec),{'recursive':!![]}),await _0x1955cf['ICHXH'](writeFile,_0x5657a7,JSON['stringify'](_0xb291ab,null,0x2)+'\x0a'),console[_0x32fc6d(0xbb)](_0x32fc6d(0xae)),{'configured':!![],'scope':_0x5729ec};}
@@ -1 +1 @@
1
- function _0x401b(_0x314214,_0x475948){_0x314214=_0x314214-0x14e;var _0x62fce8=_0x62fc();var _0x401b45=_0x62fce8[_0x314214];return _0x401b45;}function _0x62fc(){var _0x10a484=['exit','18610NAGjou','3054405DMYwrH','8019809nFLUqF','189662GcfPHD','8SsfWBC','213UrISLK','12333087sDbtyc','48820hSBziV','230380BGuMlz','LjTlc','14707zNNKOg','12DBDyEX','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','ozcGh','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','error','\x20\x20https://docs.ranger.net/main/concepts/profiles'];_0x62fc=function(){return _0x10a484;};return _0x62fc();}(function(_0x329541,_0x1d145a){var _0x3877ec=_0x401b,_0x604994=_0x329541();while(!![]){try{var _0x49e1c5=parseInt(_0x3877ec(0x15f))/0x1+-parseInt(_0x3877ec(0x152))/0x2+-parseInt(_0x3877ec(0x14f))/0x3*(parseInt(_0x3877ec(0x151))/0x4)+-parseInt(_0x3877ec(0x15d))/0x5*(parseInt(_0x3877ec(0x155))/0x6)+parseInt(_0x3877ec(0x15e))/0x7*(-parseInt(_0x3877ec(0x14e))/0x8)+parseInt(_0x3877ec(0x150))/0x9+-parseInt(_0x3877ec(0x15c))/0xa*(-parseInt(_0x3877ec(0x154))/0xb);if(_0x49e1c5===_0x1d145a)break;else _0x604994['push'](_0x604994['shift']());}catch(_0x2b1499){_0x604994['push'](_0x604994['shift']());}}}(_0x62fc,0xaaa58));export async function setupCi(_0x196fec,_0x268c71,_0x5021bf){var _0x378052=_0x401b,_0x532cbd={'OggYx':function(_0x3cc629,_0x1e2831){return _0x3cc629+_0x1e2831;},'LjTlc':function(_0xf21b2e,_0x9a4e0b){return _0xf21b2e+_0x9a4e0b;},'vahJt':_0x378052(0x158),'ozcGh':'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','xPHFd':_0x378052(0x15a)};console[_0x378052(0x159)](_0x532cbd['OggYx'](_0x532cbd[_0x378052(0x153)]('ranger\x20setup\x20--ci\x20writes\x20to\x20the\x20legacy\x20.ranger/ci/\x20tree\x20which\x20is\x20no\x20longer\x20supported.\x0a'+'\x0a'+_0x378052(0x156)+_0x532cbd['vahJt'],'\x0a')+_0x532cbd[_0x378052(0x157)],_0x532cbd['xPHFd'])),process[_0x378052(0x15b)](0x1);}
1
+ function _0x51f7(_0x2286ce,_0x53716f){_0x2286ce=_0x2286ce-0x12f;var _0x3b7ceb=_0x3b7c();var _0x51f752=_0x3b7ceb[_0x2286ce];return _0x51f752;}function _0x3b7c(){var _0x3feacd=['2ZCOGCn','tXsyE','error','mwcci','exit','94507sOEWzl','160295FgHAHn','1500076poMrZI','TfUAB','\x20\x20https://docs.ranger.net/main/concepts/profiles','ranger\x20setup\x20--ci\x20writes\x20to\x20the\x20legacy\x20.ranger/ci/\x20tree\x20which\x20is\x20no\x20longer\x20supported.\x0a','2150coSVvA','301331XePTNA','ZaSXP','186042RQDDqX','156GSdnog','23121naJuzm','1806856SStihJ'];_0x3b7c=function(){return _0x3feacd;};return _0x3b7c();}(function(_0xff4b19,_0x2b3969){var _0x177ec9=_0x51f7,_0x2bd420=_0xff4b19();while(!![]){try{var _0x26c089=parseInt(_0x177ec9(0x138))/0x1+parseInt(_0x177ec9(0x13e))/0x2*(parseInt(_0x177ec9(0x13a))/0x3)+parseInt(_0x177ec9(0x133))/0x4+-parseInt(_0x177ec9(0x132))/0x5+-parseInt(_0x177ec9(0x13b))/0x6*(-parseInt(_0x177ec9(0x131))/0x7)+-parseInt(_0x177ec9(0x13d))/0x8+parseInt(_0x177ec9(0x13c))/0x9*(-parseInt(_0x177ec9(0x137))/0xa);if(_0x26c089===_0x2b3969)break;else _0x2bd420['push'](_0x2bd420['shift']());}catch(_0x1d12ce){_0x2bd420['push'](_0x2bd420['shift']());}}}(_0x3b7c,0x44263));export async function setupCi(_0x574d6c,_0x2fd998,_0x44cc88){var _0x3866a8=_0x51f7,_0x40d568={'TfUAB':function(_0x1775e6,_0x4e7b80){return _0x1775e6+_0x4e7b80;},'mwcci':function(_0x5b402d,_0xeb0a3){return _0x5b402d+_0xeb0a3;},'ZaSXP':_0x3866a8(0x136),'MJHGP':'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','tXsyE':'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','YhOzK':_0x3866a8(0x135)};console[_0x3866a8(0x140)](_0x40d568[_0x3866a8(0x134)](_0x40d568[_0x3866a8(0x12f)](_0x40d568[_0x3866a8(0x134)](_0x40d568[_0x3866a8(0x139)]+'\x0a',_0x40d568['MJHGP'])+_0x40d568[_0x3866a8(0x13f)],'\x0a')+'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a',_0x40d568['YhOzK'])),process[_0x3866a8(0x130)](0x1);}
@@ -1 +1 @@
1
- (function(_0x103d18,_0x728021){const _0x133b6=_0xe110,_0x3cdad7=_0x103d18();while(!![]){try{const _0x75dc4d=parseInt(_0x133b6(0x10b))/0x1*(-parseInt(_0x133b6(0x11b))/0x2)+-parseInt(_0x133b6(0x10f))/0x3*(-parseInt(_0x133b6(0x12c))/0x4)+-parseInt(_0x133b6(0x128))/0x5*(parseInt(_0x133b6(0x110))/0x6)+parseInt(_0x133b6(0x124))/0x7*(parseInt(_0x133b6(0x114))/0x8)+parseInt(_0x133b6(0x107))/0x9+parseInt(_0x133b6(0x12a))/0xa*(-parseInt(_0x133b6(0x109))/0xb)+parseInt(_0x133b6(0x11f))/0xc;if(_0x75dc4d===_0x728021)break;else _0x3cdad7['push'](_0x3cdad7['shift']());}catch(_0x45bed3){_0x3cdad7['push'](_0x3cdad7['shift']());}}}(_0x35a4,0x310a4));import{basename}from'path';import _0x549019 from'inquirer';import{getToken}from'./utils/keychain.js';function _0xe110(_0x59bc88,_0x2c6c01){_0x59bc88=_0x59bc88-0x103;const _0x35a4a7=_0x35a4();let _0xe11051=_0x35a4a7[_0x59bc88];return _0xe11051;}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(_0x3f9d99={}){const _0x5cc5cf=_0xe110,_0x51a27e={'GaYsP':_0x5cc5cf(0x120),'NKkkV':'To\x20get\x20started:','EeKNE':'opencode','yqkEn':_0x5cc5cf(0x113),'KlCJl':_0x5cc5cf(0x121),'lpWEJ':function(_0x7a24f,_0x55bed4){return _0x7a24f(_0x55bed4);},'XhTMh':_0x5cc5cf(0x129),'fCGkm':'installLevel','yYBfu':'Where\x20should\x20skills\x20be\x20installed?','zTWDO':_0x5cc5cf(0x126),'atlZX':function(_0x28421a,_0xb1d9be,_0x504d55){return _0x28421a(_0xb1d9be,_0x504d55);},'inLcY':_0x5cc5cf(0x118),'wQYPZ':_0x5cc5cf(0x119),'qQwIL':'project-level','PEolj':'\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.','WcdLH':_0x5cc5cf(0x12b)};console['log'](_0x51a27e['GaYsP']);const _0x9b727e=_0x3f9d99['platform']??_0x5cc5cf(0x103),_0x45d6eb=await getToken();if(!_0x45d6eb){console['log'](_0x5cc5cf(0x11c)),console[_0x5cc5cf(0x10a)](_0x51a27e['NKkkV']),console['log']('\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli'),console['log']('\x20\x202.\x20Run:\x20ranger\x20setup'+(_0x9b727e===_0x51a27e['EeKNE']?_0x5cc5cf(0x113):'')+'\x20<your-api-token>'),console[_0x5cc5cf(0x10a)]('\x20\x203.\x20Run:\x20ranger\x20skillup'+(_0x9b727e===_0x51a27e['EeKNE']?_0x51a27e['yqkEn']:'')+'\x0a');return;}console['log'](_0x51a27e['KlCJl']);const _0x2b6860=getProjectRoot(),_0x138e5f=basename(_0x2b6860),_0x506a98=_0x9b727e===_0x5cc5cf(0x108)?_0x51a27e[_0x5cc5cf(0x125)](getOpencodeConfigDir,_0x5cc5cf(0x126))+_0x5cc5cf(0x10e):getClaudeConfigDir()+_0x5cc5cf(0x10e),_0x1bc40d=_0x9b727e===_0x5cc5cf(0x108)?_0x2b6860+'/.opencode/skills/':_0x2b6860+_0x5cc5cf(0x116),_0x4a05a5=process[_0x5cc5cf(0x11e)]['isTTY']&&process[_0x5cc5cf(0x111)][_0x5cc5cf(0x10d)];let _0xe124d8;if(_0x3f9d99['autoInstall'])_0xe124d8=_0x3f9d99[_0x5cc5cf(0x10c)];else{if(_0x4a05a5){const _0x2ec13f=await _0x549019['prompt']([{'type':_0x51a27e[_0x5cc5cf(0x112)],'name':_0x51a27e[_0x5cc5cf(0x122)],'message':_0x51a27e[_0x5cc5cf(0x11a)],'choices':[{'name':_0x5cc5cf(0x11d)+_0x506a98+')','value':_0x51a27e['zTWDO']},{'name':'This\x20project\x20only\x20('+_0x1bc40d+')','value':_0x5cc5cf(0x105)}]}]);_0xe124d8=_0x2ec13f['installLevel'];}else _0xe124d8='project',console['log']('Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20('+_0x1bc40d+')');}let _0x54ef61=0x0;const _0x471eff=getCurrentVersion();console['log'](_0x5cc5cf(0x106));try{const _0x1fffd6=await _0x51a27e['atlZX'](installSkill,_0x51a27e[_0x5cc5cf(0x117)],{'cliVersion':_0x471eff,'level':_0xe124d8,'platform':_0x9b727e});_0x1fffd6&&_0x54ef61++;}catch(_0xfb03a1){console['warn'](_0x51a27e['wQYPZ'],_0xfb03a1 instanceof Error?_0xfb03a1['message']:_0xfb03a1);}if(_0x54ef61>0x0){const _0x54e240=_0xe124d8===_0x51a27e[_0x5cc5cf(0x127)]?'user-level':_0x51a27e['qQwIL'];console[_0x5cc5cf(0x10a)]('\x0a✅\x20Installed\x20'+_0x54ef61+'\x20'+_0x54e240+_0x5cc5cf(0x123)+(_0x54ef61>0x1?'s':'')+'\x20successfully!\x0a'),!_0x3f9d99[_0x5cc5cf(0x104)]&&(console[_0x5cc5cf(0x10a)]('To\x20use:'),_0x9b727e===_0x5cc5cf(0x108)?console[_0x5cc5cf(0x10a)](_0x51a27e['PEolj']):console[_0x5cc5cf(0x10a)]('\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!'));}else console[_0x5cc5cf(0x10a)](_0x51a27e[_0x5cc5cf(0x115)]);}function _0x35a4(){const _0x54ab01=['project','\x0a📦\x20Installing\x20skills...\x0a','2971161NVZtDw','opencode','11ZWMnPe','log','57qeSZPV','autoInstall','isTTY','/skills/','849768jFVLOf','12veEdge','stdout','XhTMh','\x20--opencode','9032BqgIbn','WcdLH','/.claude/skills/','inLcY','ranger','\x20\x20Failed\x20to\x20install\x20ranger\x20skill:','yYBfu','11866yDRqLT','❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a','All\x20projects\x20(','stdin','3915864wGiczv','\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a','✓\x20Found\x20API\x20token','fCGkm','\x20skill','189yALRnO','lpWEJ','user','zTWDO','417895XoiRnV','list','2639830kUFzpX','\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a','4gjbrVZ','claude','suppressUsage'];_0x35a4=function(){return _0x54ab01;};return _0x35a4();}
1
+ (function(_0x226384,_0x539963){const _0x45de50=_0x1470,_0x1e8c21=_0x226384();while(!![]){try{const _0x161667=parseInt(_0x45de50(0x112))/0x1*(-parseInt(_0x45de50(0xfb))/0x2)+parseInt(_0x45de50(0x123))/0x3+parseInt(_0x45de50(0x114))/0x4+-parseInt(_0x45de50(0x10b))/0x5+parseInt(_0x45de50(0x124))/0x6+-parseInt(_0x45de50(0x120))/0x7*(parseInt(_0x45de50(0x100))/0x8)+parseInt(_0x45de50(0x115))/0x9;if(_0x161667===_0x539963)break;else _0x1e8c21['push'](_0x1e8c21['shift']());}catch(_0x1d4fc5){_0x1e8c21['push'](_0x1e8c21['shift']());}}}(_0x2d79,0x48c22));import{basename}from'path';import _0x14043c from'inquirer';import{getToken}from'./utils/keychain.js';function _0x1470(_0x58813c,_0x188c50){_0x58813c=_0x58813c-0xfa;const _0x2d7961=_0x2d79();let _0x147012=_0x2d7961[_0x58813c];return _0x147012;}import{installSkill}from'./utils/skills.js';function _0x2d79(){const _0x591b4d=['user','191384fFBrPd','QIkHE','uMGyg','isTTY','opencode','stdin','\x20\x203.\x20Run:\x20ranger\x20skillup','To\x20get\x20started:','Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20(','iUGFA','installLevel','2419910dIZkzh','zzqjD','\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli','Where\x20should\x20skills\x20be\x20installed?','\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a','autoInstall','\x0a✅\x20Installed\x20','290LHcBPS','xXxce','282268crlidE','4015161CxBQpG','RCKWA','This\x20project\x20only\x20(','\x20\x20Failed\x20to\x20install\x20ranger\x20skill:','hTDSR','/.opencode/skills/','list','stdout','\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.','log','ICIpN','7VbIxzf','uDfqM','platform','447354IzgLkL','1788954TgXyOb','✓\x20Found\x20API\x20token','\x20successfully!\x0a','1090FAUgjY','warn','sHxLp','\x0a📦\x20Installing\x20skills...\x0a'];_0x2d79=function(){return _0x591b4d;};return _0x2d79();}import{getCurrentVersion}from'./utils/version.js';import{getClaudeConfigDir,getProjectRoot}from'./utils/claudeConfig.js';import{getOpencodeConfigDir}from'./utils/opencodeConfig.js';export async function skillup(_0x19704f={}){const _0x23ff66=_0x1470,_0x5b280a={'iUGFA':_0x23ff66(0x10f),'ICIpN':'opencode','nrrNG':'\x20--opencode','QIkHE':_0x23ff66(0x125),'RCKWA':function(_0x50c83b){return _0x50c83b();},'zWVHD':function(_0x4effca,_0x2c5224){return _0x4effca===_0x2c5224;},'hTDSR':function(_0x34e185,_0x169d8e){return _0x34e185(_0x169d8e);},'gjaju':_0x23ff66(0x11b),'zzqjD':'project','KBdrU':function(_0x4a4f0c){return _0x4a4f0c();},'KRdxB':_0x23ff66(0xfe),'OciCL':function(_0x1bbc1d,_0x83bcde,_0xae5972){return _0x1bbc1d(_0x83bcde,_0xae5972);},'vgiov':_0x23ff66(0x118),'uMGyg':function(_0x1051c6,_0x509c42){return _0x1051c6===_0x509c42;},'uDfqM':'user-level','xXxce':function(_0x284c65,_0x12e717){return _0x284c65>_0x12e717;},'PDFdw':'To\x20use:','sHxLp':'\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!'};console[_0x23ff66(0x11e)](_0x5b280a[_0x23ff66(0x109)]);const _0xd7596f=_0x19704f[_0x23ff66(0x122)]??'claude',_0x1587ec=await getToken();if(!_0x1587ec){console[_0x23ff66(0x11e)]('❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a'),console['log'](_0x23ff66(0x107)),console['log'](_0x23ff66(0x10d)),console['log']('\x20\x202.\x20Run:\x20ranger\x20setup'+(_0xd7596f===_0x5b280a['ICIpN']?'\x20--opencode':'')+'\x20<your-api-token>'),console[_0x23ff66(0x11e)](_0x23ff66(0x106)+(_0xd7596f===_0x5b280a[_0x23ff66(0x11f)]?_0x5b280a['nrrNG']:'')+'\x0a');return;}console['log'](_0x5b280a[_0x23ff66(0x101)]);const _0x2d7a32=_0x5b280a['RCKWA'](getProjectRoot),_0x3d2a40=basename(_0x2d7a32),_0x214d85=_0x5b280a['zWVHD'](_0xd7596f,_0x23ff66(0x104))?_0x5b280a[_0x23ff66(0x119)](getOpencodeConfigDir,'user')+'/skills/':_0x5b280a[_0x23ff66(0x116)](getClaudeConfigDir)+'/skills/',_0xf6ac7c=_0xd7596f==='opencode'?_0x2d7a32+_0x23ff66(0x11a):_0x2d7a32+'/.claude/skills/',_0x4cec07=process[_0x23ff66(0x105)][_0x23ff66(0x103)]&&process[_0x23ff66(0x11c)]['isTTY'];let _0x11b080;if(_0x19704f['autoInstall'])_0x11b080=_0x19704f[_0x23ff66(0x110)];else{if(_0x4cec07){const _0x5a1ce0=await _0x14043c['prompt']([{'type':_0x5b280a['gjaju'],'name':'installLevel','message':_0x23ff66(0x10e),'choices':[{'name':'All\x20projects\x20('+_0x214d85+')','value':_0x23ff66(0xff)},{'name':_0x23ff66(0x117)+_0xf6ac7c+')','value':_0x5b280a[_0x23ff66(0x10c)]}]}]);_0x11b080=_0x5a1ce0[_0x23ff66(0x10a)];}else _0x11b080='project',console['log'](_0x23ff66(0x108)+_0xf6ac7c+')');}let _0x559503=0x0;const _0x4dfb41=_0x5b280a['KBdrU'](getCurrentVersion);console['log'](_0x5b280a['KRdxB']);try{const _0x495ab2=await _0x5b280a['OciCL'](installSkill,'ranger',{'cliVersion':_0x4dfb41,'level':_0x11b080,'platform':_0xd7596f});_0x495ab2&&_0x559503++;}catch(_0x5e3ff5){console[_0x23ff66(0xfc)](_0x5b280a['vgiov'],_0x5e3ff5 instanceof Error?_0x5e3ff5['message']:_0x5e3ff5);}if(_0x559503>0x0){const _0x25d070=_0x5b280a[_0x23ff66(0x102)](_0x11b080,_0x23ff66(0xff))?_0x5b280a[_0x23ff66(0x121)]:'project-level';console['log'](_0x23ff66(0x111)+_0x559503+'\x20'+_0x25d070+'\x20skill'+(_0x5b280a[_0x23ff66(0x113)](_0x559503,0x1)?'s':'')+_0x23ff66(0xfa)),!_0x19704f['suppressUsage']&&(console[_0x23ff66(0x11e)](_0x5b280a['PDFdw']),_0x5b280a[_0x23ff66(0x102)](_0xd7596f,'opencode')?console['log'](_0x23ff66(0x11d)):console[_0x23ff66(0x11e)](_0x5b280a[_0x23ff66(0xfd)]));}else console['log']('\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a');}
@@ -1 +1 @@
1
- const _0x523964=_0xde58;(function(_0x2b53b8,_0x10240d){const _0x18ca27=_0xde58,_0x178879=_0x2b53b8();while(!![]){try{const _0x482e3a=parseInt(_0x18ca27(0x106))/0x1+parseInt(_0x18ca27(0xfe))/0x2*(parseInt(_0x18ca27(0x113))/0x3)+-parseInt(_0x18ca27(0xbb))/0x4+-parseInt(_0x18ca27(0xcb))/0x5+parseInt(_0x18ca27(0xd6))/0x6+parseInt(_0x18ca27(0xfd))/0x7*(-parseInt(_0x18ca27(0xf1))/0x8)+-parseInt(_0x18ca27(0x10f))/0x9;if(_0x482e3a===_0x10240d)break;else _0x178879['push'](_0x178879['shift']());}catch(_0x188f27){_0x178879['push'](_0x178879['shift']());}}}(_0x11d7,0x3f713));import{mkdir,writeFile}from'fs/promises';import{join,dirname}from'path';import{existsSync}from'fs';import{createRequire}from'module';import _0x3da524 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';function _0xde58(_0x123fe8,_0x1ae138){_0x123fe8=_0x123fe8-0xb1;const _0x11d74b=_0x11d7();let _0xde58bd=_0x11d74b[_0x123fe8];return _0xde58bd;}import{getCurrentVersion}from'./utils/version.js';import{ensureClaudePlugin,ensureClaudeSkills}from'./setup/claude.js';import{ensureOpencodePluginConfig}from'./setup/opencode.js';function _0x11d7(){const _0x4dc92f=['prompt','project-scope\x20setup\x20obsolete).\x20Drop\x20the\x20--scope\x20flag\x20or\x20pass\x20--scope=user.','VNKJU','129015INvdqe','Validating\x20API\x20token...','czphL','...','oAKBj','RUwbI','\x20\x20npx\x20playwright@','.gitignore','rYTOS','force','user','1898688DkGiKw','skipped','.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.','\x0a❌\x20Failed\x20to\x20install\x20Chromium:','log','Setup\x20always\x20installs\x20at\x20user\x20scope\x20now\x20(cloud\x20profiles\x20make\x20','UowdF','tCFdS','⚠\x20No\x20git\x20repository\x20found.\x20Re-run\x20with\x20`--scope\x20user`\x20to\x20store\x20the\x20profile\x20at\x20~/.ranger/.','s).\x20On\x20a\x20slow\x20or\x20proxied\x20connection,\x20raise\x20the\x20limit\x20and\x20retry,\x20e.g.:\x0a','isTTY','CHIjI','Installation\x20failed\x20with\x20exit\x20code\x20','--with-deps','npx','message','\x20install\x20chromium','execPath','allowInsecureLocalhost','success','Authentication\x20failed:\x20','ignore','You\x20can\x20install\x20it\x20manually\x20by\x20running:','iWeNZ','TLIdz','scope','\x20(fallback\x20version)','1152nrCXXc','url','skipAuth','device_auth','organizationName','opencode','skipChromium','bINvR','method','error','exit','executablePath','1708QQxxit','15722QQGlyX','\x20now?','zPiyD','IYXdJ','\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','stdin','trackPhaseStart','and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review','279970agWVAo','AZLBX','auth','install','local','wOKSj','skills',')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','rJewn','703611DqIkFh','\x0aInstalling\x20Chromium\x20browser...\x0a','profile','playwright/package.json','33nhmFSH','\x0a\x20\x20https://docs.ranger.net/main/concepts/profiles','1.56.1','inherit','NOQUu','\x0aSkipping\x20profile\x20setup\x20(--skip-auth).\x20Run\x20`ranger\x20setup`\x20with\x20auth\x20to\x20add\x20a\x20profile\x20later.\x0a','\x0a\x20\x20Chromium\x20install\x20timed\x20out\x20(limit\x20','MUdnz','chromium','.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.','ZKjMh','\x20\x20\x20\x20RANGER_CHROMIUM_INSTALL_TIMEOUT_MS=1800000\x20ranger\x20setup\x20deps','\x0a⚠\x20Skipping\x20Chromium\x20installation.','\x1b[0m','\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with','cGMha','TLDrY','\x0a🚀\x20Ranger\x20Setup\x0a','OOFcK','PaImm','✓\x20Authenticated\x20to\x20','You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:','Erfgy','1135648suqNhv','ranger\x20profile\x20add\x20<name>','plugin','LrxGV','SIGKILL','trackPhaseEnd','lmINM','warn','playwright@','YxZQC','\x0a\x20\x20','env','yelfF'];_0x11d7=function(){return _0x4dc92f;};return _0x11d7();}import{installSkill}from'./utils/skills.js';import{spawn}from'child_process';const require=createRequire(import.meta.url);export const PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION=_0x523964(0x115);const bold=_0xd6f3fd=>'\x1b[1m'+_0xd6f3fd+_0x523964(0xb1);export function getPlaywrightVersion(){const _0x181e3e=_0x523964;try{const _0x6d5cc0=require['resolve'](_0x181e3e(0x112)),_0x3b27ad=require(_0x6d5cc0);return _0x3b27ad['version'];}catch{return null;}}function resolveBundledPlaywrightCli(){const _0x564ccf=_0x523964,_0x643568={'IYXdJ':function(_0x316701,_0x5b4fbd,_0x4a5028){return _0x316701(_0x5b4fbd,_0x4a5028);},'TLDrY':function(_0x16b1d9,_0x57feca){return _0x16b1d9(_0x57feca);}};try{const _0x594090=_0x643568[_0x564ccf(0x101)](join,_0x643568[_0x564ccf(0xb4)](dirname,require['resolve']('playwright/package.json')),'cli.js');return _0x643568[_0x564ccf(0xb4)](existsSync,_0x594090)?_0x594090:null;}catch{return null;}}const CHROMIUM_INSTALL_TIMEOUT_MS=Number(process[_0x523964(0xc6)]['RANGER_CHROMIUM_INSTALL_TIMEOUT_MS'])||0x927c0;class ChromiumInstallTimeoutError extends Error{}export async function installChromiumBinary(_0x3fc859,_0x4a74cf=![]){const _0x56acd7=_0x523964,_0x4279a3={'wOKSj':_0x56acd7(0xe4),'JzHnG':function(_0x2811b5,_0x2a3b49,_0x5d9429){return _0x2811b5(_0x2a3b49,_0x5d9429);},'cHTcg':function(_0x24dddb,_0x533b17){return _0x24dddb/_0x533b17;},'MUdnz':function(_0xd4ccae,_0x5bf863){return _0xd4ccae instanceof _0x5bf863;}},_0xcce954=resolveBundledPlaywrightCli(),_0x1c538f=_0xcce954?process[_0x56acd7(0xe7)]:_0x4279a3[_0x56acd7(0x10b)],_0x39cf88=[_0xcce954??_0x56acd7(0xc3)+_0x3fc859,'install',..._0x4a74cf?[_0x56acd7(0xe3)]:[],'chromium'];let _0x3b44a7=![];for(let _0x501a36=0x1;;_0x501a36++){try{await _0x4279a3['JzHnG'](runChromiumInstall,_0x1c538f,_0x39cf88);return;}catch(_0x152dfc){_0x152dfc instanceof ChromiumInstallTimeoutError&&!_0x3b44a7&&(_0x3b44a7=!![],console[_0x56acd7(0xda)](_0x56acd7(0x119)+Math['round'](_0x4279a3['cHTcg'](CHROMIUM_INSTALL_TIMEOUT_MS,0x3e8))+_0x56acd7(0xdf)+_0x56acd7(0x11e)));if(_0x501a36>=0x3)throw _0x152dfc;const _0x560eba=_0x4279a3[_0x56acd7(0x11a)](_0x152dfc,Error)?_0x152dfc[_0x56acd7(0xe5)]:String(_0x152dfc);console[_0x56acd7(0xda)]('\x20\x20Chromium\x20install\x20attempt\x20'+_0x501a36+'\x20failed\x20('+_0x560eba+');\x20retrying...');}}}function runChromiumInstall(_0x372b00,_0x57dd6b){const _0x4f5894=_0x523964,_0x2dfd56={'Erfgy':function(_0x4a2be0,_0x10dfa8){return _0x4a2be0(_0x10dfa8);},'gahsX':function(_0x566ef9){return _0x566ef9();},'lmINM':function(_0x99b5c2,_0x192e40,_0x65f3ce,_0x3706ee){return _0x99b5c2(_0x192e40,_0x65f3ce,_0x3706ee);},'shUIj':_0x4f5894(0x116),'zOIyS':'win32','rYTOS':function(_0x24f127,_0x1dc9cf,_0x13498a){return _0x24f127(_0x1dc9cf,_0x13498a);}};return new Promise((_0x129d64,_0x836009)=>{const _0x461987=_0x4f5894,_0x31d944={'vOfLu':function(_0x1da391,_0x11e66a){const _0x1b5c08=_0xde58;return _0x2dfd56[_0x1b5c08(0xba)](_0x1da391,_0x11e66a);},'UzPXF':function(_0xe77d2f,_0x584ee8){return _0xe77d2f(_0x584ee8);}},_0x5e4262=_0x2dfd56[_0x461987(0xc1)](spawn,_0x372b00,_0x57dd6b,{'stdio':[_0x461987(0xeb),_0x461987(0x116),_0x2dfd56['shUIj']],'shell':process['platform']===_0x2dfd56['zOIyS']}),_0x4f6d1c=_0x2dfd56[_0x461987(0xd3)](setTimeout,()=>{const _0x361eab=_0x461987;_0x5e4262['kill'](_0x361eab(0xbf)),_0x836009(new ChromiumInstallTimeoutError('Chromium\x20install\x20timed\x20out\x20after\x20'+Math['round'](CHROMIUM_INSTALL_TIMEOUT_MS/0x3e8)+'s'));},CHROMIUM_INSTALL_TIMEOUT_MS);_0x5e4262['on']('close',_0x1f2336=>{const _0x5612e1=_0x461987;_0x2dfd56['Erfgy'](clearTimeout,_0x4f6d1c);if(_0x1f2336===0x0)_0x2dfd56['gahsX'](_0x129d64);else _0x836009(new Error(_0x5612e1(0xe2)+_0x1f2336));}),_0x5e4262['on'](_0x461987(0xfa),_0x19d0aa=>{_0x31d944['vOfLu'](clearTimeout,_0x4f6d1c),_0x31d944['UzPXF'](_0x836009,_0x19d0aa);});});}export async function authenticate(_0x349e77){const _0x2accdd=_0x523964,_0x1c5ebe={'cGMha':function(_0x3b37d5){return _0x3b37d5();},'lneiP':function(_0x400f28,_0x5a266e){return _0x400f28 instanceof _0x5a266e;},'UCwKz':_0x2accdd(0xf4),'Isyqc':_0x2accdd(0xcc),'MMAMb':function(_0x4f827a,_0x2cf130){return _0x4f827a(_0x2cf130);},'jrrjA':'✓\x20Stored\x20credentials\x20locally','CHIjI':'provided_token'};if(!_0x349e77){const _0x2fec99=await _0x1c5ebe[_0x2accdd(0xb3)](getToken);if(_0x2fec99){const _0x435a33=await getCurrentUser(_0x2fec99);if(_0x435a33['success'])return console['log']('✓\x20Already\x20authenticated\x20to\x20'+_0x435a33[_0x2accdd(0xd5)]['organizationName']),{'token':_0x2fec99,'method':'existing_token'};}try{_0x349e77=await runDeviceAuthFlow();}catch(_0x459688){throw new Error(_0x2accdd(0xea)+(_0x1c5ebe['lneiP'](_0x459688,Error)?_0x459688['message']:_0x459688));}const _0x4ec0e4=await getCurrentUser(_0x349e77);if(!_0x4ec0e4[_0x2accdd(0xe9)])throw new Error('Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20'+_0x4ec0e4[_0x2accdd(0xfa)]);return console['log'](_0x2accdd(0xb8)+_0x4ec0e4['user'][_0x2accdd(0xf5)]),{'token':_0x349e77,'method':_0x1c5ebe['UCwKz']};}console['log'](_0x1c5ebe['Isyqc']);const _0x11b3b2=await getCurrentUser(_0x349e77);if(!_0x11b3b2[_0x2accdd(0xe9)]){if(_0x11b3b2['status'])throw new Error('Authentication\x20failed:\x20'+_0x11b3b2['error']+_0x2accdd(0xd8));else throw new Error('Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20'+_0x11b3b2[_0x2accdd(0xfa)]+_0x2accdd(0x11c));}return console[_0x2accdd(0xda)](_0x2accdd(0xb8)+_0x11b3b2['user']['organizationName']),await _0x1c5ebe['MMAMb'](storeToken,_0x349e77),console['log'](process[_0x2accdd(0xc6)]['GITHUB_ENV']?'✓\x20Exported\x20credentials\x20for\x20CI':_0x1c5ebe['jrrjA']),{'token':_0x349e77,'method':_0x1c5ebe[_0x2accdd(0xe1)]};}export async function ensureRangerDir(_0x2faa0a){const _0x1ddd45=_0x523964,_0x48b4ff={'RUwbI':function(_0x19459b,_0x1df22f,_0x833659){return _0x19459b(_0x1df22f,_0x833659);}};void _0x2faa0a;const _0x3221c1=getRangerHomeDir();return!existsSync(_0x3221c1)?(await _0x48b4ff[_0x1ddd45(0xd0)](mkdir,_0x3221c1,{'recursive':!![]}),console['log']('✓\x20Created\x20~/.ranger/\x20directory'),{'path':_0x3221c1,'installed':!![]}):(console[_0x1ddd45(0xda)]('✓\x20~/.ranger/\x20directory\x20already\x20exists'),{'path':_0x3221c1,'installed':![]});}export async function ensureChromium(_0x458a91=![]){const _0x1d12e7=_0x523964,_0x4c04c0={'ZKjMh':function(_0x315499,_0x55cc7a){return _0x315499??_0x55cc7a;},'XgCWl':'\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','oAKBj':_0x1d12e7(0xd9),'jWQeI':_0x1d12e7(0xec),'cdEWd':_0x1d12e7(0x11f)};let _0x5136a9=![];try{const _0x17de05=chromium[_0x1d12e7(0xfc)]();_0x5136a9=existsSync(_0x17de05);}catch{_0x5136a9=![];}if(_0x5136a9)return console['log']('✓\x20Playwright\x20Chromium\x20browser\x20found'),![];const _0x58df17=getPlaywrightVersion(),_0x35157d=_0x4c04c0[_0x1d12e7(0x11d)](_0x58df17,PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION),_0x1f0d44=!_0x58df17,_0x417b84=process[_0x1d12e7(0x103)][_0x1d12e7(0xe0)]&&process['stdout'][_0x1d12e7(0xe0)];let _0x2443cd=!![];if(_0x417b84){const {install:_0x802b2f}=await _0x3da524[_0x1d12e7(0xc8)]([{'type':'confirm','name':_0x1d12e7(0x109),'message':_0x1f0d44?'Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20'+_0x35157d+_0x1d12e7(0xff):'The\x20required\x20version\x20('+_0x35157d+_0x1d12e7(0x10d),'default':!![]}]);_0x2443cd=_0x802b2f;}else console['log']('\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20'+_0x35157d+(_0x1f0d44?_0x1d12e7(0xf0):'')+_0x1d12e7(0xce));if(_0x2443cd){console[_0x1d12e7(0xda)](_0x1d12e7(0x110));try{await installChromiumBinary(_0x35157d,_0x458a91),console['log'](_0x4c04c0['XgCWl']);}catch(_0x168908){console['error'](_0x4c04c0[_0x1d12e7(0xcf)],_0x168908 instanceof Error?_0x168908['message']:_0x168908),console[_0x1d12e7(0xda)](_0x4c04c0['jWQeI']),console[_0x1d12e7(0xda)](_0x1d12e7(0xd1)+_0x35157d+_0x1d12e7(0xe6));}}else console[_0x1d12e7(0xda)](_0x4c04c0['cdEWd']),console[_0x1d12e7(0xda)](_0x1d12e7(0xb9)),console[_0x1d12e7(0xda)](_0x1d12e7(0xd1)+_0x35157d+'\x20install\x20chromium');return!![];}export async function writeRangerGitignore(_0x2a5f93){const _0x14bc73=_0x523964,_0x4f70e8={'YxZQC':function(_0x55a04a,_0x382215,_0x59c744){return _0x55a04a(_0x382215,_0x59c744);},'etgWw':'✓\x20Created\x20.ranger/.gitignore'},_0x5cdabd=join(_0x2a5f93,_0x14bc73(0xd2)),_0x3a2cfd='\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 _0x4f70e8[_0x14bc73(0xc4)](writeFile,_0x5cdabd,_0x3a2cfd),console[_0x14bc73(0xda)](_0x4f70e8['etgWw']);}export async function ensureLocalEnv(_0xf85d76,_0x36963a){const _0x475c5f=_0x523964,_0x4ff05e={'bINvR':function(_0x4366fe){return _0x4366fe();},'VDfgM':_0x475c5f(0xd5),'wlImz':_0x475c5f(0xde),'rJewn':function(_0x522c97,_0x2da466){return _0x522c97===_0x2da466;},'AZLBX':function(_0x127ca4,_0x3be6fb,_0x8353c0,_0x10f287){return _0x127ca4(_0x3be6fb,_0x8353c0,_0x10f287);},'rpecM':'\x0a❌\x20Profile\x20setup\x20failed:','tCFdS':function(_0x5d4088,_0x4a5da1){return _0x5d4088 instanceof _0x4a5da1;}};if(!_0x4ff05e[_0x475c5f(0xf8)](findGitRoot)&&_0xf85d76?.['scope']!==_0x4ff05e['VDfgM'])return console[_0x475c5f(0xda)](_0x4ff05e['wlImz']),{'ready':![],'skipped':!![]};const _0x53bdea=_0x4ff05e[_0x475c5f(0x10e)](_0xf85d76?.['scope'],_0x475c5f(0xd5))?getRangerHomeDir():undefined;if(findExistingEnv('local',{'locations':[_0x475c5f(0x10a)],'rangerDir':_0x53bdea}))return console['log']('✓\x20Local\x20profile\x20already\x20exists'),{'ready':!![],'skipped':![]};try{return await _0x4ff05e[_0x475c5f(0x107)](addEnv,_0x475c5f(0x10a),{'url':_0xf85d76?.[_0x475c5f(0xf2)],'force':_0xf85d76?.['force'],'allowInsecureLocalhost':_0xf85d76?.['allowInsecureLocalhost'],'scope':_0xf85d76?.[_0x475c5f(0xef)]},_0x36963a),{'ready':!![],'skipped':![]};}catch(_0x417dbb){return console['error'](_0x4ff05e['rpecM'],_0x4ff05e[_0x475c5f(0xdd)](_0x417dbb,Error)?_0x417dbb[_0x475c5f(0xe5)]:_0x417dbb),{'ready':![],'skipped':![]};}}export async function start(_0x8508a9,_0x2ab04b,_0x5253bb){const _0x4b113d=_0x523964,_0x3fa563={'yelfF':function(_0x3c08f1,_0x536060){return _0x3c08f1+_0x536060;},'VNKJU':_0x4b113d(0xd5),'GtFiQ':'✓\x20Skipping\x20authentication\x20(--skip-auth)','ZyUaX':function(_0x15dea2,_0x5ecab9){return _0x15dea2(_0x5ecab9);},'OEbpx':'✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','czphL':_0x4b113d(0x11b),'iWeNZ':_0x4b113d(0xbd),'UjZYC':function(_0x559f2a,_0x2c8197){return _0x559f2a(_0x2c8197);},'OOFcK':'ranger','UowdF':'\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:','nLuvj':function(_0x23a551,_0x3b0b73){return _0x23a551 instanceof _0x3b0b73;},'LrxGV':'skills','PaImm':function(_0x4f3348,_0x46b28c,_0x5d7a1a){return _0x4f3348(_0x46b28c,_0x5d7a1a);},'zPiyD':_0x4b113d(0x111),'NOQUu':function(_0x5868ff,_0x18d2e0){return _0x5868ff+_0x18d2e0;},'XOzLL':function(_0x57a1e4,_0xe18285){return _0x57a1e4(_0xe18285);},'TLIdz':function(_0x2b0d03,_0x3a1adc){return _0x2b0d03+_0x3a1adc;}};console['log'](_0x4b113d(0xb5));_0x2ab04b?.[_0x4b113d(0xef)]!==undefined&&_0x2ab04b['scope']!==_0x4b113d(0xd5)&&(console[_0x4b113d(0xfa)](_0x3fa563[_0x4b113d(0xc7)]('ranger\x20setup\x20--scope='+String(_0x2ab04b[_0x4b113d(0xef)])+'\x20is\x20no\x20longer\x20supported.\x20',_0x4b113d(0xdb))+_0x4b113d(0xc9)),process[_0x4b113d(0xfb)](0x1));_0x2ab04b={..._0x2ab04b,'scope':_0x3fa563[_0x4b113d(0xca)]};const _0x8f6bf2=!existsSync(getRangerHomeDir());await ensureRangerDir(_0x3fa563[_0x4b113d(0xca)]);if(_0x2ab04b?.['skipAuth'])console[_0x4b113d(0xda)](_0x3fa563['GtFiQ']),_0x5253bb?.[_0x4b113d(0xc0)]('auth',{'isFirstRun':_0x8f6bf2,'method':_0x4b113d(0xd7)});else{_0x5253bb?.['trackPhaseStart'](_0x4b113d(0x108));const _0x3dc651=await _0x3fa563['ZyUaX'](authenticate,_0x8508a9);_0x5253bb?.[_0x4b113d(0xc0)]('auth',{'isFirstRun':_0x8f6bf2,'method':_0x3dc651[_0x4b113d(0xf9)]});}_0x5253bb?.['trackPhaseStart']('chromium');_0x2ab04b?.[_0x4b113d(0xf7)]?console['log'](_0x3fa563['OEbpx']):await _0x3fa563['ZyUaX'](ensureChromium,_0x2ab04b?.['withDeps']);_0x5253bb?.['trackPhaseEnd'](_0x3fa563[_0x4b113d(0xcd)],{'isFirstRun':_0x8f6bf2,'skipped':!!_0x2ab04b?.[_0x4b113d(0xf7)]}),console['log']('\x0a✅\x20Ranger\x20setup\x20complete!\x0a');const _0x5d2727=_0x2ab04b?.['scope'],_0x453f0c=_0x2ab04b?.[_0x4b113d(0xf6)]??![];let _0xfe3a6f=null;_0x453f0c?(_0x5253bb?.['trackPhaseStart'](_0x4b113d(0xbd)),_0xfe3a6f=await ensureOpencodePluginConfig(_0x5d2727),_0x5253bb?.[_0x4b113d(0xc0)](_0x3fa563[_0x4b113d(0xed)],{'isFirstRun':_0x8f6bf2,'opencode':!![]})):(_0x5253bb?.[_0x4b113d(0x104)](_0x3fa563['iWeNZ']),await _0x3fa563['UjZYC'](ensureClaudePlugin,_0x5d2727),_0x5253bb?.['trackPhaseEnd'](_0x3fa563[_0x4b113d(0xed)],{'isFirstRun':_0x8f6bf2}));if(_0x453f0c&&_0xfe3a6f){_0x5253bb?.[_0x4b113d(0x104)](_0x4b113d(0x10c));try{await installSkill(_0x3fa563[_0x4b113d(0xb6)],{'level':_0xfe3a6f['scope'],'cliVersion':getCurrentVersion(),'platform':'opencode'}),_0x5253bb?.['trackPhaseEnd']('skills',{'isFirstRun':_0x8f6bf2,'opencode':!![]});}catch(_0x14a53f){console[_0x4b113d(0xc2)](_0x3fa563[_0x4b113d(0xdc)],_0x3fa563['nLuvj'](_0x14a53f,Error)?_0x14a53f['message']:_0x14a53f),_0x5253bb?.['trackPhaseEnd'](_0x4b113d(0x10c),{'isFirstRun':_0x8f6bf2,'opencode':!![],'failed':!![]});}}else _0x5253bb?.[_0x4b113d(0x104)](_0x3fa563[_0x4b113d(0xbe)]),await ensureClaudeSkills(_0x5d2727),_0x5253bb?.[_0x4b113d(0xc0)](_0x4b113d(0x10c),{'isFirstRun':_0x8f6bf2});if(_0x2ab04b?.[_0x4b113d(0xf3)])console['log'](_0x4b113d(0x118));else{if(_0x2ab04b?.['url']){_0x5253bb?.['trackPhaseStart'](_0x4b113d(0x111));const _0x179b88=await _0x3fa563[_0x4b113d(0xb7)](ensureLocalEnv,{'url':_0x2ab04b['url'],'force':_0x2ab04b?.[_0x4b113d(0xd4)],'allowInsecureLocalhost':_0x2ab04b?.[_0x4b113d(0xe8)],'scope':_0x3fa563[_0x4b113d(0xca)]},_0x5253bb);_0x5253bb?.[_0x4b113d(0xc0)](_0x3fa563[_0x4b113d(0x100)],{'isFirstRun':_0x8f6bf2,'profileReady':_0x179b88['ready'],'userSkipped':_0x179b88[_0x4b113d(0xd7)]});}else console['log'](_0x3fa563['NOQUu'](_0x3fa563[_0x4b113d(0x117)]('\x0aTo\x20set\x20up\x20a\x20profile\x20for\x20your\x20app,\x20run:'+(_0x4b113d(0xc5)+bold(_0x4b113d(0xbc))),'\x0a\x20\x20(opens\x20a\x20browser\x20so\x20you\x20can\x20log\x20in\x20once)')+'\x0a\x0aFor\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:',_0x4b113d(0x114)));}if(_0x453f0c)console[_0x4b113d(0xda)]('\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)'),console['log'](_0x4b113d(0x105)),console['log']('with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser'),console['log']('verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.');else{const _0x327aca=_0x3fa563['XOzLL'](bold,'/ranger:enable');console['log'](_0x3fa563['NOQUu'](_0x3fa563[_0x4b113d(0xee)]('\x0aIn\x20Claude\x20Code,\x20run\x20'+_0x327aca+'\x20and\x20prompt\x20the\x20coding',_0x4b113d(0xb2)),_0x4b113d(0x102))+'\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.');}}
1
+ const _0x5cd83e=_0x1a39;(function(_0x19ea68,_0x138b39){const _0x4d0e05=_0x1a39,_0x45602b=_0x19ea68();while(!![]){try{const _0x151426=-parseInt(_0x4d0e05(0xf0))/0x1+-parseInt(_0x4d0e05(0x128))/0x2*(-parseInt(_0x4d0e05(0xff))/0x3)+parseInt(_0x4d0e05(0x105))/0x4+parseInt(_0x4d0e05(0xfc))/0x5*(parseInt(_0x4d0e05(0x110))/0x6)+parseInt(_0x4d0e05(0x12d))/0x7*(parseInt(_0x4d0e05(0xea))/0x8)+-parseInt(_0x4d0e05(0xec))/0x9+-parseInt(_0x4d0e05(0x151))/0xa*(parseInt(_0x4d0e05(0x129))/0xb);if(_0x151426===_0x138b39)break;else _0x45602b['push'](_0x45602b['shift']());}catch(_0x480557){_0x45602b['push'](_0x45602b['shift']());}}}(_0x390d,0x3c950));import{mkdir,writeFile}from'fs/promises';import{join,dirname}from'path';import{existsSync}from'fs';import{createRequire}from'module';import _0x2b1032 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';function _0x1a39(_0x1bfef6,_0x22f879){_0x1bfef6=_0x1bfef6-0xe3;const _0x390d90=_0x390d();let _0x1a3958=_0x390d90[_0x1bfef6];return _0x1a3958;}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';import{spawn}from'child_process';const require=createRequire(import.meta.url);export const PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION=_0x5cd83e(0x108);const bold=_0x18364a=>'\x1b[1m'+_0x18364a+_0x5cd83e(0x159);export function getPlaywrightVersion(){const _0xaf647c=_0x5cd83e;try{const _0x2027d3=require[_0xaf647c(0x134)](_0xaf647c(0x122)),_0x452fc1=require(_0x2027d3);return _0x452fc1['version'];}catch{return null;}}function resolveBundledPlaywrightCli(){const _0x2260de=_0x5cd83e,_0x4d37a0={'MXDew':_0x2260de(0x122),'yfLTH':'cli.js'};try{const _0x15197f=join(dirname(require['resolve'](_0x4d37a0['MXDew'])),_0x4d37a0[_0x2260de(0x13c)]);return existsSync(_0x15197f)?_0x15197f:null;}catch{return null;}}const CHROMIUM_INSTALL_TIMEOUT_MS=Number(process['env'][_0x5cd83e(0x154)])||0x927c0;class ChromiumInstallTimeoutError extends Error{}function _0x390d(){const _0x5ad975=['local','yCDAf','1.56.1','You\x20can\x20install\x20it\x20manually\x20by\x20running:','ngfyJ','organizationName','aYxAh','ignore','project-scope\x20setup\x20obsolete).\x20Drop\x20the\x20--scope\x20flag\x20or\x20pass\x20--scope=user.','xANhT','6coIKNe','✓\x20Stored\x20credentials\x20locally','SIGKILL','\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','\x20\x20Chromium\x20install\x20attempt\x20','\x0aSkipping\x20profile\x20setup\x20(--skip-auth).\x20Run\x20`ranger\x20setup`\x20with\x20auth\x20to\x20add\x20a\x20profile\x20later.\x0a','/ranger:enable','...','\x20now?','jpKKq','LuhEa','PTtQI','exit','device_auth','SGIbv','\x0aTo\x20set\x20up\x20a\x20profile\x20for\x20your\x20app,\x20run:','WXIXu','✓\x20Authenticated\x20to\x20','playwright/package.json','oqeEL','✓\x20~/.ranger/\x20directory\x20already\x20exists','Ulcfs','SDeLy','vQRVD','2cjCkTY','5687902dPfLAm','profile','\x0a\x20\x20','EaXuN','1524761aCCuez','opencode','⚠\x20No\x20git\x20repository\x20found.\x20Re-run\x20with\x20`--scope\x20user`\x20to\x20store\x20the\x20profile\x20at\x20~/.ranger/.','\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20','bqvrr','and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review','Installation\x20failed\x20with\x20exit\x20code\x20','resolve','bvWBY','jKLdG','\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.','auth','install','log','yfLTH','EMkTk','\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','✓\x20Exported\x20credentials\x20for\x20CI','skills','user','MGEto','✓\x20Playwright\x20Chromium\x20browser\x20found','NHnqB','vaoAC','ranger\x20profile\x20add\x20<name>','force','✓\x20Local\x20profile\x20already\x20exists','\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)','ranger','inherit','skipAuth','chromium','trackPhaseStart','\x0a❌\x20Failed\x20to\x20install\x20Chromium:','warn','10TNNJSX','ready','env','RANGER_CHROMIUM_INSTALL_TIMEOUT_MS','eVbGP','trackPhaseEnd','OLkQS','plugin','\x1b[0m','jImZG','JZMqt','EpwWR','existing_token','round','gXdXX','success','execPath','oVxYt','.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.','lzkWU','JFloW','kBWGv','16nNeGlx','win32','2355489lzODBJ','kill','skipChromium','\x20install\x20chromium','143976FOmuYW','hVrRa','skipped','lzwAZ','.gitignore','error','\x20failed\x20(','isTTY','url','platform','\x20\x20npx\x20playwright@','\x0a✅\x20Ranger\x20setup\x20complete!\x0a','1021690uGNQMi','Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20','Authentication\x20failed:\x20','663213ZbGaIP','scope','✓\x20Created\x20~/.ranger/\x20directory','executablePath','CEuhn','message','1239472iAVGIb'];_0x390d=function(){return _0x5ad975;};return _0x390d();}export async function installChromiumBinary(_0x1a58f4,_0x19e6ed=![]){const _0x345009=_0x5cd83e,_0x11a21a={'EMkTk':function(_0x512b88){return _0x512b88();},'WXIXu':_0x345009(0x13a),'EaXuN':'--with-deps','bvWBY':_0x345009(0x14d),'Ulcfs':function(_0x533f1d,_0x55b9ac){return _0x533f1d+_0x55b9ac;},'lzwAZ':function(_0x970525,_0x2431e3){return _0x970525(_0x2431e3);}},_0x20de7f=_0x11a21a[_0x345009(0x13d)](resolveBundledPlaywrightCli),_0x46178c=_0x20de7f?process[_0x345009(0xe4)]:'npx',_0x16d8fa=[_0x20de7f??'playwright@'+_0x1a58f4,_0x11a21a[_0x345009(0x120)],..._0x19e6ed?[_0x11a21a[_0x345009(0x12c)]]:[],_0x11a21a[_0x345009(0x135)]];let _0x4c98fc=![];for(let _0x188fb6=0x1;;_0x188fb6++){try{await runChromiumInstall(_0x46178c,_0x16d8fa);return;}catch(_0x578308){_0x578308 instanceof ChromiumInstallTimeoutError&&!_0x4c98fc&&(_0x4c98fc=!![],console['log'](_0x11a21a[_0x345009(0x125)]('\x0a\x20\x20Chromium\x20install\x20timed\x20out\x20(limit\x20'+Math[_0x345009(0x15e)](CHROMIUM_INSTALL_TIMEOUT_MS/0x3e8)+'s).\x20On\x20a\x20slow\x20or\x20proxied\x20connection,\x20raise\x20the\x20limit\x20and\x20retry,\x20e.g.:\x0a','\x20\x20\x20\x20RANGER_CHROMIUM_INSTALL_TIMEOUT_MS=1800000\x20ranger\x20setup\x20deps')));if(_0x188fb6>=0x3)throw _0x578308;const _0x458491=_0x578308 instanceof Error?_0x578308['message']:_0x11a21a[_0x345009(0xf3)](String,_0x578308);console['log'](_0x345009(0x114)+_0x188fb6+_0x345009(0xf6)+_0x458491+');\x20retrying...');}}}function runChromiumInstall(_0x5e6d29,_0x44e1bf){const _0x219898=_0x5cd83e,_0x570bd2={'yCDAf':function(_0x13185f,_0x2356d9){return _0x13185f(_0x2356d9);},'aYxAh':function(_0x10f9e9,_0x2978fb){return _0x10f9e9/_0x2978fb;},'PDIRC':function(_0x25b801,_0x578098){return _0x25b801(_0x578098);},'JfEBE':function(_0x49a103){return _0x49a103();},'BBDJS':function(_0x34ba22,_0x7c9d40){return _0x34ba22(_0x7c9d40);},'HLBdU':function(_0xf50981,_0x28aa4d,_0xe62c9d,_0x4799e6){return _0xf50981(_0x28aa4d,_0xe62c9d,_0x4799e6);},'vQRVD':_0x219898(0x14b),'CjGBR':_0x219898(0xeb),'oMfcO':function(_0x538a40,_0x1b21b4,_0x526575){return _0x538a40(_0x1b21b4,_0x526575);},'HCteA':'error'};return new Promise((_0x2aafd0,_0x11df00)=>{const _0x21d1d3=_0x219898,_0xebc7f0={'oVxYt':function(_0x1d88a2,_0x1c6931){return _0x1d88a2(_0x1c6931);}},_0x2b2af9=_0x570bd2['HLBdU'](spawn,_0x5e6d29,_0x44e1bf,{'stdio':[_0x21d1d3(0x10d),_0x21d1d3(0x14b),_0x570bd2[_0x21d1d3(0x127)]],'shell':process[_0x21d1d3(0xf9)]===_0x570bd2['CjGBR']}),_0xbb62ab=_0x570bd2['oMfcO'](setTimeout,()=>{const _0x2ff5f4=_0x21d1d3;_0x2b2af9[_0x2ff5f4(0xed)](_0x2ff5f4(0x112)),_0x570bd2[_0x2ff5f4(0x107)](_0x11df00,new ChromiumInstallTimeoutError('Chromium\x20install\x20timed\x20out\x20after\x20'+Math[_0x2ff5f4(0x15e)](_0x570bd2[_0x2ff5f4(0x10c)](CHROMIUM_INSTALL_TIMEOUT_MS,0x3e8))+'s'));},CHROMIUM_INSTALL_TIMEOUT_MS);_0x2b2af9['on']('close',_0x4425be=>{const _0x203f41=_0x21d1d3;_0x570bd2['PDIRC'](clearTimeout,_0xbb62ab);if(_0x4425be===0x0)_0x570bd2['JfEBE'](_0x2aafd0);else _0x570bd2['BBDJS'](_0x11df00,new Error(_0x203f41(0x133)+_0x4425be));}),_0x2b2af9['on'](_0x570bd2['HCteA'],_0x3987c7=>{const _0x5a1c59=_0x21d1d3;_0xebc7f0[_0x5a1c59(0xe5)](clearTimeout,_0xbb62ab),_0xebc7f0['oVxYt'](_0x11df00,_0x3987c7);});});}export async function authenticate(_0x4e2996){const _0x222039=_0x5cd83e,_0xc78658={'jKLdG':function(_0x349edb){return _0x349edb();},'dPInj':function(_0x9a5ab3,_0x1d0e32){return _0x9a5ab3(_0x1d0e32);},'kBWGv':function(_0xcf82f5,_0x3a2e58){return _0xcf82f5 instanceof _0x3a2e58;},'KhsZT':function(_0xee5679,_0x5bedf2){return _0xee5679(_0x5bedf2);},'eEccw':'Validating\x20API\x20token...','akGkB':_0x222039(0x111)};if(!_0x4e2996){const _0x2e2c73=await _0xc78658[_0x222039(0x136)](getToken);if(_0x2e2c73){const _0x504095=await _0xc78658['dPInj'](getCurrentUser,_0x2e2c73);if(_0x504095[_0x222039(0xe3)])return console[_0x222039(0x13b)]('✓\x20Already\x20authenticated\x20to\x20'+_0x504095[_0x222039(0x141)][_0x222039(0x10b)]),{'token':_0x2e2c73,'method':_0x222039(0x15d)};}try{_0x4e2996=await _0xc78658['jKLdG'](runDeviceAuthFlow);}catch(_0x49518b){throw new Error('Authentication\x20failed:\x20'+(_0xc78658[_0x222039(0xe9)](_0x49518b,Error)?_0x49518b[_0x222039(0x104)]:_0x49518b));}const _0x303577=await _0xc78658['KhsZT'](getCurrentUser,_0x4e2996);if(!_0x303577[_0x222039(0xe3)])throw new Error('Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20'+_0x303577['error']);return console['log'](_0x222039(0x121)+_0x303577['user']['organizationName']),{'token':_0x4e2996,'method':_0x222039(0x11d)};}console['log'](_0xc78658['eEccw']);const _0x4ae165=await getCurrentUser(_0x4e2996);if(!_0x4ae165[_0x222039(0xe3)]){if(_0x4ae165['status'])throw new Error(_0x222039(0xfe)+_0x4ae165['error']+_0x222039(0x138));else throw new Error('Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20'+_0x4ae165[_0x222039(0xf5)]+_0x222039(0xe6));}return console['log'](_0x222039(0x121)+_0x4ae165[_0x222039(0x141)]['organizationName']),await storeToken(_0x4e2996),console['log'](process[_0x222039(0x153)]['GITHUB_ENV']?_0x222039(0x13f):_0xc78658['akGkB']),{'token':_0x4e2996,'method':'provided_token'};}export async function ensureRangerDir(_0x2399d3){const _0x3deb8a=_0x5cd83e,_0x7d9186={'UJduJ':function(_0x7bb930){return _0x7bb930();},'vaoAC':function(_0xb242ba,_0x52ec3d,_0x19745c){return _0xb242ba(_0x52ec3d,_0x19745c);},'MGEto':_0x3deb8a(0x101)};void _0x2399d3;const _0x268812=_0x7d9186['UJduJ'](getRangerHomeDir);return!existsSync(_0x268812)?(await _0x7d9186[_0x3deb8a(0x145)](mkdir,_0x268812,{'recursive':!![]}),console['log'](_0x7d9186[_0x3deb8a(0x142)]),{'path':_0x268812,'installed':!![]}):(console[_0x3deb8a(0x13b)](_0x3deb8a(0x124)),{'path':_0x268812,'installed':![]});}export async function ensureChromium(_0x34734f=![]){const _0x26e2a5=_0x5cd83e,_0x1134b0={'SGIbv':function(_0x235fa7,_0x2c83b6){return _0x235fa7(_0x2c83b6);},'eVbGP':'\x20(fallback\x20version)','bqvrr':'\x0aInstalling\x20Chromium\x20browser...\x0a','mlEVb':function(_0x57cd86,_0x2e737d,_0x2fd104){return _0x57cd86(_0x2e737d,_0x2fd104);},'SJfgs':_0x26e2a5(0x137),'sXnpZ':'You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:'};let _0x540fb3=![];try{const _0x184c4c=chromium[_0x26e2a5(0x102)]();_0x540fb3=_0x1134b0[_0x26e2a5(0x11e)](existsSync,_0x184c4c);}catch{_0x540fb3=![];}if(_0x540fb3)return console[_0x26e2a5(0x13b)](_0x26e2a5(0x143)),![];const _0x5ef6f0=getPlaywrightVersion(),_0x1ccbda=_0x5ef6f0??PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION,_0x4f7f81=!_0x5ef6f0,_0x329b0f=process['stdin'][_0x26e2a5(0xf7)]&&process['stdout'][_0x26e2a5(0xf7)];let _0x38e2b8=!![];if(_0x329b0f){const {install:_0x4fdd79}=await _0x2b1032['prompt']([{'type':'confirm','name':'install','message':_0x4f7f81?_0x26e2a5(0xfd)+_0x1ccbda+_0x26e2a5(0x118):'The\x20required\x20version\x20('+_0x1ccbda+')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','default':!![]}]);_0x38e2b8=_0x4fdd79;}else console['log'](_0x26e2a5(0x130)+_0x1ccbda+(_0x4f7f81?_0x1134b0[_0x26e2a5(0x155)]:'')+_0x26e2a5(0x117));if(_0x38e2b8){console['log'](_0x1134b0[_0x26e2a5(0x131)]);try{await _0x1134b0['mlEVb'](installChromiumBinary,_0x1ccbda,_0x34734f),console['log'](_0x1134b0['SJfgs']);}catch(_0x2ac7ab){console['error'](_0x26e2a5(0x14f),_0x2ac7ab instanceof Error?_0x2ac7ab['message']:_0x2ac7ab),console['log'](_0x26e2a5(0x109)),console[_0x26e2a5(0x13b)](_0x26e2a5(0xfa)+_0x1ccbda+_0x26e2a5(0xef));}}else console[_0x26e2a5(0x13b)]('\x0a⚠\x20Skipping\x20Chromium\x20installation.'),console['log'](_0x1134b0['sXnpZ']),console[_0x26e2a5(0x13b)]('\x20\x20npx\x20playwright@'+_0x1ccbda+_0x26e2a5(0xef));return!![];}export async function writeRangerGitignore(_0x1d369d){const _0x591808=_0x5cd83e,_0x47b02b={'lzkWU':function(_0x380f6d,_0xd98064,_0x12b1a5){return _0x380f6d(_0xd98064,_0x12b1a5);}},_0x1c5abb=_0x47b02b[_0x591808(0xe7)](join,_0x1d369d,_0x591808(0xf4)),_0x5e34e0='\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 _0x47b02b['lzkWU'](writeFile,_0x1c5abb,_0x5e34e0),console[_0x591808(0x13b)]('✓\x20Created\x20.ranger/.gitignore');}export async function ensureLocalEnv(_0x199800,_0x31f89f){const _0x1383fe=_0x5cd83e,_0x3c755b={'OLkQS':function(_0x2cb43e,_0x2c2a7b){return _0x2cb43e!==_0x2c2a7b;},'TvSrj':_0x1383fe(0x12f),'fpFKz':function(_0x541b5e,_0x458fc3){return _0x541b5e===_0x458fc3;},'NJjXD':_0x1383fe(0x141),'gXdXX':function(_0x187501,_0x293671,_0x59d4e2){return _0x187501(_0x293671,_0x59d4e2);},'PTtQI':_0x1383fe(0x106),'JFloW':_0x1383fe(0x148),'zabaB':function(_0x21472e,_0x37ddfb,_0x38a1dc,_0x3ddbf1){return _0x21472e(_0x37ddfb,_0x38a1dc,_0x3ddbf1);},'nMSHM':'\x0a❌\x20Profile\x20setup\x20failed:'};if(!findGitRoot()&&_0x3c755b[_0x1383fe(0x157)](_0x199800?.[_0x1383fe(0x100)],_0x1383fe(0x141)))return console['log'](_0x3c755b['TvSrj']),{'ready':![],'skipped':!![]};const _0xa671dd=_0x3c755b['fpFKz'](_0x199800?.[_0x1383fe(0x100)],_0x3c755b['NJjXD'])?getRangerHomeDir():undefined;if(_0x3c755b[_0x1383fe(0x15f)](findExistingEnv,_0x3c755b[_0x1383fe(0x11b)],{'locations':['local'],'rangerDir':_0xa671dd}))return console['log'](_0x3c755b[_0x1383fe(0xe8)]),{'ready':!![],'skipped':![]};try{return await _0x3c755b['zabaB'](addEnv,_0x3c755b[_0x1383fe(0x11b)],{'url':_0x199800?.['url'],'force':_0x199800?.['force'],'allowInsecureLocalhost':_0x199800?.['allowInsecureLocalhost'],'scope':_0x199800?.[_0x1383fe(0x100)]},_0x31f89f),{'ready':!![],'skipped':![]};}catch(_0x24871a){return console[_0x1383fe(0xf5)](_0x3c755b['nMSHM'],_0x24871a instanceof Error?_0x24871a['message']:_0x24871a),{'ready':![],'skipped':![]};}}export async function start(_0xb8d7e9,_0x214481,_0x162c9b){const _0x29944b=_0x5cd83e,_0x25244f={'kpdlk':function(_0x2b2dcd,_0x39cf34){return _0x2b2dcd!==_0x39cf34;},'JZMqt':'user','oQGwf':function(_0x1abe82,_0x51211b){return _0x1abe82+_0x51211b;},'SDeLy':function(_0x1d9267,_0x182414){return _0x1d9267+_0x182414;},'NHnqB':function(_0x37ed4d){return _0x37ed4d();},'JdiJW':function(_0x3b9bc2,_0x5526a1){return _0x3b9bc2(_0x5526a1);},'StswP':'✓\x20Skipping\x20authentication\x20(--skip-auth)','CEuhn':_0x29944b(0xf2),'ZNSHv':_0x29944b(0x14d),'YLEAh':'✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','cSLFD':_0x29944b(0xfb),'LuhEa':'plugin','EtIMq':function(_0x4fffab,_0x588a2a){return _0x4fffab(_0x588a2a);},'EpwWR':_0x29944b(0x140),'jpKKq':function(_0xe6ee00){return _0xe6ee00();},'oqeEL':'\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:','ngfyJ':_0x29944b(0x115),'xANhT':_0x29944b(0x12a),'TYQVj':function(_0x40275d,_0x3e79bc,_0xc7ced7){return _0x40275d(_0x3e79bc,_0xc7ced7);},'TXUJe':function(_0x166268,_0x4f37aa){return _0x166268+_0x4f37aa;},'AscUn':_0x29944b(0x146),'EowvG':_0x29944b(0x149),'hVrRa':_0x29944b(0x132),'jImZG':'with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','xDdWn':function(_0x1db95e,_0x48a05f){return _0x1db95e+_0x48a05f;},'eoXzL':function(_0x2a8ec2,_0x207a7c){return _0x2a8ec2+_0x207a7c;}};console[_0x29944b(0x13b)]('\x0a🚀\x20Ranger\x20Setup\x0a');_0x25244f['kpdlk'](_0x214481?.[_0x29944b(0x100)],undefined)&&_0x214481['scope']!==_0x25244f[_0x29944b(0x15b)]&&(console['error'](_0x25244f['oQGwf'](_0x25244f['SDeLy']('ranger\x20setup\x20--scope='+String(_0x214481['scope'])+'\x20is\x20no\x20longer\x20supported.\x20','Setup\x20always\x20installs\x20at\x20user\x20scope\x20now\x20(cloud\x20profiles\x20make\x20'),_0x29944b(0x10e))),process[_0x29944b(0x11c)](0x1));_0x214481={..._0x214481,'scope':'user'};const _0x3e1318=!existsSync(_0x25244f[_0x29944b(0x144)](getRangerHomeDir));await _0x25244f['JdiJW'](ensureRangerDir,_0x29944b(0x141));if(_0x214481?.[_0x29944b(0x14c)])console[_0x29944b(0x13b)](_0x25244f['StswP']),_0x162c9b?.['trackPhaseEnd']('auth',{'isFirstRun':_0x3e1318,'method':_0x25244f[_0x29944b(0x103)]});else{_0x162c9b?.['trackPhaseStart']('auth');const _0x3ccbb2=await _0x25244f['JdiJW'](authenticate,_0xb8d7e9);_0x162c9b?.['trackPhaseEnd'](_0x29944b(0x139),{'isFirstRun':_0x3e1318,'method':_0x3ccbb2['method']});}_0x162c9b?.[_0x29944b(0x14e)](_0x25244f['ZNSHv']);_0x214481?.[_0x29944b(0xee)]?console[_0x29944b(0x13b)](_0x25244f['YLEAh']):await ensureChromium(_0x214481?.['withDeps']);_0x162c9b?.[_0x29944b(0x156)](_0x25244f['ZNSHv'],{'isFirstRun':_0x3e1318,'skipped':!!_0x214481?.['skipChromium']}),console[_0x29944b(0x13b)](_0x25244f['cSLFD']);const _0x357477=_0x214481?.['scope'],_0x1e6d31=_0x214481?.['opencode']??![];let _0x4b4e8c=null;_0x1e6d31?(_0x162c9b?.[_0x29944b(0x14e)](_0x25244f[_0x29944b(0x11a)]),_0x4b4e8c=await _0x25244f['EtIMq'](ensureOpencodePluginConfig,_0x357477),_0x162c9b?.['trackPhaseEnd'](_0x29944b(0x158),{'isFirstRun':_0x3e1318,'opencode':!![]})):(_0x162c9b?.[_0x29944b(0x14e)](_0x29944b(0x158)),await ensureClaudePlugin(_0x357477),_0x162c9b?.['trackPhaseEnd'](_0x29944b(0x158),{'isFirstRun':_0x3e1318}));if(_0x1e6d31&&_0x4b4e8c){_0x162c9b?.[_0x29944b(0x14e)](_0x25244f[_0x29944b(0x15c)]);try{await installSkill(_0x29944b(0x14a),{'level':_0x4b4e8c['scope'],'cliVersion':_0x25244f[_0x29944b(0x119)](getCurrentVersion),'platform':_0x29944b(0x12e)}),_0x162c9b?.['trackPhaseEnd'](_0x25244f[_0x29944b(0x15c)],{'isFirstRun':_0x3e1318,'opencode':!![]});}catch(_0x3c6289){console[_0x29944b(0x150)](_0x25244f[_0x29944b(0x123)],_0x3c6289 instanceof Error?_0x3c6289[_0x29944b(0x104)]:_0x3c6289),_0x162c9b?.[_0x29944b(0x156)](_0x29944b(0x140),{'isFirstRun':_0x3e1318,'opencode':!![],'failed':!![]});}}else _0x162c9b?.[_0x29944b(0x14e)](_0x29944b(0x140)),await ensureClaudeSkills(_0x357477),_0x162c9b?.['trackPhaseEnd'](_0x25244f[_0x29944b(0x15c)],{'isFirstRun':_0x3e1318});if(_0x214481?.[_0x29944b(0x14c)])console[_0x29944b(0x13b)](_0x25244f[_0x29944b(0x10a)]);else{if(_0x214481?.[_0x29944b(0xf8)]){_0x162c9b?.[_0x29944b(0x14e)](_0x25244f[_0x29944b(0x10f)]);const _0x152bc0=await _0x25244f['TYQVj'](ensureLocalEnv,{'url':_0x214481[_0x29944b(0xf8)],'force':_0x214481?.[_0x29944b(0x147)],'allowInsecureLocalhost':_0x214481?.['allowInsecureLocalhost'],'scope':_0x25244f['JZMqt']},_0x162c9b);_0x162c9b?.['trackPhaseEnd'](_0x29944b(0x12a),{'isFirstRun':_0x3e1318,'profileReady':_0x152bc0[_0x29944b(0x152)],'userSkipped':_0x152bc0['skipped']});}else console[_0x29944b(0x13b)](_0x25244f['TXUJe'](_0x25244f[_0x29944b(0x126)](_0x25244f['oQGwf'](_0x29944b(0x11f),_0x29944b(0x12b)+bold(_0x25244f['AscUn'])),'\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(_0x1e6d31)console[_0x29944b(0x13b)](_0x25244f['EowvG']),console['log'](_0x25244f[_0x29944b(0xf1)]),console[_0x29944b(0x13b)](_0x25244f[_0x29944b(0x15a)]),console['log']('verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.');else{const _0x5d4ed0=_0x25244f['EtIMq'](bold,_0x29944b(0x116));console[_0x29944b(0x13b)](_0x25244f['xDdWn'](_0x25244f['eoXzL']('\x0aIn\x20Claude\x20Code,\x20run\x20'+_0x5d4ed0+'\x20and\x20prompt\x20the\x20coding'+'\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with',_0x29944b(0x13e)),_0x29944b(0x113)));}}
@@ -1 +1 @@
1
- const _0x5ae4af=_0x3715;function _0x3715(_0x17621d,_0x5104ff){_0x17621d=_0x17621d-0x139;const _0xe7b90f=_0xe7b9();let _0x3715ad=_0xe7b90f[_0x17621d];return _0x3715ad;}(function(_0x4fbb38,_0x13f9de){const _0x170398=_0x3715,_0x1b9bca=_0x4fbb38();while(!![]){try{const _0x4b311a=parseInt(_0x170398(0x19d))/0x1+-parseInt(_0x170398(0x173))/0x2+parseInt(_0x170398(0x17b))/0x3*(parseInt(_0x170398(0x16e))/0x4)+-parseInt(_0x170398(0x185))/0x5*(-parseInt(_0x170398(0x149))/0x6)+-parseInt(_0x170398(0x179))/0x7*(-parseInt(_0x170398(0x1a6))/0x8)+parseInt(_0x170398(0x187))/0x9+parseInt(_0x170398(0x17f))/0xa*(-parseInt(_0x170398(0x18d))/0xb);if(_0x4b311a===_0x13f9de)break;else _0x1b9bca['push'](_0x1b9bca['shift']());}catch(_0xaf535c){_0x1b9bca['push'](_0x1b9bca['shift']());}}}(_0xe7b9,0x92bb2));import{readFile,readdir}from'fs/promises';function _0xe7b9(){const _0x3203fd=['not_installed','qHqxO','settingsPath','ranger@trailhead','1837BOsPlU','string','SKILL.md','join','xGRFY','\x20(up\x20to\x20date)','RPoFX','\x20cloud','USNwR','\x1b[1m','McBuc','unknown','\x0a---\x20Profiles\x20---','config','ignore','Organization:\x20','726543JIWNeF','toString','match','XDdME','PLGuN','ZwlRG','MhJLx','qERhm','WCMTW','1880SwkNWA','opencode','agrEj','debug','Bgdzn','no\x20session','has','sIvsZ','\x20(latest:\x20','UzKKy','log','\x20\x20Project-level:','\x1b[0m','\x0a---\x20Skills\x20---','auth.json','No\x20profiles\x20configured','FRfjN','\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available','encrypted','6KpSgxe','SZHQQ',':\x20installed\x20(','CMxnF','\x1b]8;;\x07','project','iPzkW','\x1b]8;;file://','stdout','plaintext','disabled','hasEncryptedAuth','\x20\x20\x20\x20Settings:\x20','JlgZc','@ranger-testing/opencode-plugin','\x20\x20Run:\x20ranger\x20profile\x20ls\x20\x20(list\x20all)','scope','JKGaP','trim','Root:\x20','length','close','hTtCJ','API\x20Token:\x20✗\x20Not\x20found','Version:\x20','name','gSgEo','AYErv','plugin','eOhZb','push','version','\x20\x20\x20\x20','pkNhj','\x20(active)','dRDuN','enabled','2722696RLaipG','not_configured','\x20\x20\x20\x20Session:\x20','\x20plugin(s)\x20configured','includes','1729908cEzcyY','\x20\x20User-level:','details','QsYPY','qAcdc','\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>','21910MyrwDy','oCHDd','3NxsnUB','parse','status','map','65630qUOXQr','JWeqA','DASxl','\x20\x20Run:\x20ranger\x20skillup','dVpTC','XtDFc','1163265ZISUyT','user','1679085QgFpDW','filter'];_0xe7b9=function(){return _0x3203fd;};return _0xe7b9();}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';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=_0x269043=>_0x5ae4af(0x196)+_0x269043+_0x5ae4af(0x142),link=(_0x2ba779,_0x13110a)=>_0x5ae4af(0x150)+_0x2ba779+'\x07'+(_0x13110a||_0x2ba779)+_0x5ae4af(0x14d);async function getOpencodePluginStatus(){const _0x26f7ac=_0x5ae4af,_0x5f3064={'qHqxO':function(_0x9998b5,_0x25658a){return _0x9998b5(_0x25658a);},'xfbFG':_0x26f7ac(0x189),'XDdME':'configured','oCHDd':function(_0x11da8d,_0x3d61b8){return _0x11da8d>_0x3d61b8;},'aakee':function(_0x314cbd,_0x34b9cd){return _0x314cbd>_0x34b9cd;},'QjKFq':_0x26f7ac(0x1a7),'USNwR':_0x26f7ac(0x139),'Gittp':'pipe','oXiGc':'data','EWoqA':'error','JWeqA':_0x26f7ac(0x15e)};return new Promise(_0x44b4ef=>{const _0x56fede=_0x26f7ac,_0x2c663b={'iPzkW':function(_0x5baef8,_0x55198c){return _0x5baef8(_0x55198c);},'JKmZC':'not_installed','espFs':function(_0x48347e,_0x989ac){return _0x48347e!==_0x989ac;}},_0x5ed282=spawn(_0x5f3064['QjKFq'],[_0x5f3064[_0x56fede(0x195)],_0x56fede(0x19a)],{'stdio':[_0x56fede(0x19b),_0x5f3064['Gittp'],_0x5f3064['Gittp']]});let _0x516b44='';_0x5ed282[_0x56fede(0x151)]?.['on'](_0x5f3064['oXiGc'],_0x3f8750=>{const _0x253cf2=_0x56fede;_0x516b44+=_0x3f8750[_0x253cf2(0x19e)]();}),_0x5ed282['stderr']?.['on'](_0x5f3064['oXiGc'],_0x4eb494=>{const _0x5aff97=_0x56fede;_0x516b44+=_0x4eb494[_0x5aff97(0x19e)]();}),_0x5ed282['on'](_0x5f3064['EWoqA'],()=>{const _0x451ae5=_0x56fede;_0x2c663b[_0x451ae5(0x14f)](_0x44b4ef,{'status':_0x2c663b['JKmZC']});}),_0x5ed282['on'](_0x5f3064[_0x56fede(0x180)],_0x3c4b42=>{const _0x37f104=_0x56fede;if(_0x3c4b42!==0x0){_0x5f3064[_0x37f104(0x18a)](_0x44b4ef,{'status':_0x5f3064['xfbFG']});return;}const _0x5c5705=_0x516b44[_0x37f104(0x15b)]();let _0x47ed82=null;if(_0x5c5705)try{_0x47ed82=JSON[_0x37f104(0x17c)](_0x5c5705);}catch{const _0x603a6a=_0x5c5705['match'](/\{[\s\S]*\}$/);if(_0x603a6a)try{_0x47ed82=JSON[_0x37f104(0x17c)](_0x603a6a[0x0]);}catch{_0x47ed82=null;}}const _0x4bb79b=Array['isArray'](_0x47ed82?.[_0x37f104(0x165)])?_0x47ed82?.[_0x37f104(0x165)]:[],_0x4ea171=_0x4bb79b['some'](_0x3dcc57=>{const _0x5a0195=_0x37f104;if(_0x2c663b['espFs'](typeof _0x3dcc57,_0x5a0195(0x18e)))return![];return _0x3dcc57['includes'](_0x5a0195(0x157))||_0x3dcc57['includes']('opencode-plugin');});if(_0x4ea171){_0x44b4ef({'status':_0x5f3064[_0x37f104(0x1a0)],'details':_0x5f3064[_0x37f104(0x17a)](_0x4bb79b[_0x37f104(0x15d)],0x0)?_0x4bb79b[_0x37f104(0x15d)]+_0x37f104(0x171):undefined});return;}if(_0x5f3064['aakee'](_0x4bb79b['length'],0x0)){_0x44b4ef({'status':_0x37f104(0x16f),'details':_0x4bb79b['length']+'\x20plugin(s)\x20configured'});return;}_0x44b4ef({'status':'not_configured'});});});}async function getSkillsFromDir(_0x472b55,_0x699081){const _0x8d06d3=_0x5ae4af,_0x2cfd67={'IZZbT':function(_0x2a5c8b,_0x264360,_0x3307b2){return _0x2a5c8b(_0x264360,_0x3307b2);},'WtZgf':function(_0x43af14,_0x481d90,_0x1ecdf6,_0x59b763){return _0x43af14(_0x481d90,_0x1ecdf6,_0x59b763);},'uzIyv':_0x8d06d3(0x18f),'IQrIk':function(_0x5f0076,_0x5295ad){return _0x5f0076(_0x5295ad);},'rStoW':function(_0x593e5b,_0x235c95,_0x159ab3){return _0x593e5b(_0x235c95,_0x159ab3);},'xiciC':'utf-8'};if(!existsSync(_0x472b55))return[];const _0x413ea6=[];try{const _0x6a3950=await _0x2cfd67['IZZbT'](readdir,_0x472b55,{'withFileTypes':!![]});for(const _0x39eef4 of _0x6a3950){if(_0x39eef4['isDirectory']()){const _0x21c038=_0x2cfd67['WtZgf'](join,_0x472b55,_0x39eef4[_0x8d06d3(0x162)],_0x2cfd67['uzIyv']);if(_0x2cfd67['IQrIk'](existsSync,_0x21c038)){let _0x3ef8bc=_0x39eef4['name'];try{const _0x55e178=await _0x2cfd67['rStoW'](readFile,_0x21c038,_0x2cfd67['xiciC']),_0x378381=_0x55e178[_0x8d06d3(0x19f)](/name:\s*(.+)/);_0x378381&&(_0x3ef8bc=_0x378381[0x1]['trim']());}catch{}_0x413ea6['push']({'name':_0x39eef4['name'],'displayName':_0x3ef8bc,'path':_0x21c038,'level':_0x699081});}}}}catch{return[];}return _0x413ea6;}async function getInstalledSkills(){const _0xc8f204=_0x5ae4af,_0x10056e={'ijpfX':function(_0x332388){return _0x332388();},'qERhm':_0xc8f204(0x14e),'eSEjV':function(_0x118b45,_0xdfc3,_0x43fe32){return _0x118b45(_0xdfc3,_0x43fe32);},'ZwlRG':function(_0x27aec0){return _0x27aec0();}},[_0x256155,_0x20b20a]=await Promise['all']([getSkillsFromDir(_0x10056e['ijpfX'](getProjectSkillsDir),_0x10056e[_0xc8f204(0x1a4)]),_0x10056e['eSEjV'](getSkillsFromDir,_0x10056e[_0xc8f204(0x1a2)](getUserSkillsDir),'user')]);return{'project':_0x256155,'user':_0x20b20a};}async function getEnvironments(){const _0x3ebe31=_0x5ae4af,_0x51fa2e={'gZFqC':function(_0x530a34,_0xec2b0e){return _0x530a34(_0xec2b0e);},'hTtCJ':function(_0x4d19b4,_0x3711c7,_0x4d5a18){return _0x4d19b4(_0x3711c7,_0x4d5a18);},'CMxnF':'settings.json','mSWbn':_0x3ebe31(0x144),'dRDuN':function(_0x4ac92c,_0x1647b1){return _0x4ac92c(_0x1647b1);},'Bgdzn':function(_0x1784d2,_0xf47f2c){return _0x1784d2(_0xf47f2c);},'PHwCH':function(_0x1c8ac7,_0x8c22f9){return _0x1c8ac7===_0x8c22f9;},'RPoFX':function(_0x57e1db){return _0x57e1db();}},{envNames:_0x44ca0c,activeEnv:_0x5cdcbc}=await _0x51fa2e[_0x3ebe31(0x193)](getEnvNames),_0x4caf8c=_0x51fa2e[_0x3ebe31(0x193)](getRangerDir);if(!existsSync(_0x4caf8c))return{'envs':[],'activeEnv':null};const _0x51fcc7=_0x44ca0c['map'](_0x5d600e=>{const _0x5b183a=_0x3ebe31,_0x49a8a5=_0x51fa2e['gZFqC'](getEnvDir,_0x5d600e),_0xa6983a=_0x51fa2e[_0x5b183a(0x15f)](join,_0x49a8a5,_0x51fa2e[_0x5b183a(0x14c)]),_0x9d0550=_0x51fa2e[_0x5b183a(0x15f)](join,_0x49a8a5,_0x51fa2e['mSWbn']),_0x645a9a=join(_0x49a8a5,'auth.json.enc');return{'name':_0x5d600e,'settingsPath':_0x51fa2e[_0x5b183a(0x16c)](existsSync,_0xa6983a)?_0xa6983a:'(not\x20found)','hasPlaintextAuth':_0x51fa2e[_0x5b183a(0x13a)](existsSync,_0x9d0550),'hasEncryptedAuth':_0x51fa2e['gZFqC'](existsSync,_0x645a9a),'isActive':_0x51fa2e['PHwCH'](_0x5d600e,_0x5cdcbc)};});return{'envs':_0x51fcc7,'activeEnv':_0x5cdcbc};}export async function status(){const _0x2f9662=_0x5ae4af,_0x25cb0d={'DASxl':'\x0a📊\x20Ranger\x20Status\x0a','McBuc':function(_0x338f44){return _0x338f44();},'BHosr':function(_0x2d2b3f,_0xea0e64){return _0x2d2b3f(_0xea0e64);},'FRfjN':function(_0x2f3cd5,_0x3ac9d1){return _0x2f3cd5(_0x3ac9d1);},'dVpTC':function(_0x3475a3,_0x5d1232,_0x463cd4){return _0x3475a3(_0x5d1232,_0x463cd4);},'jwSsG':function(_0x50fe1e,_0x83d45d){return _0x50fe1e(_0x83d45d);},'Tvzez':function(_0x1c4257){return _0x1c4257();},'OVPjo':function(_0x24065c,_0x376f06){return _0x24065c(_0x376f06);},'eOhZb':function(_0x347b7a){return _0x347b7a();},'xGRFY':function(_0x2ac4f8){return _0x2ac4f8();},'qAcdc':'\x0a---\x20OpenCode\x20Plugin\x20---','gSgEo':function(_0x219d8f){return _0x219d8f();},'SZHQQ':function(_0x220904,_0x518926){return _0x220904===_0x518926;},'AYErv':'configured','XtDFc':'@ranger-testing/opencode-plugin','NaMiC':'not_configured','MhJLx':'\x20\x20Not\x20configured','jEvOq':'\x20\x20Run:\x20ranger\x20setup\x20--opencode','agrEj':_0x2f9662(0x147),'YZXhl':function(_0xf5c908,_0x488042){return _0xf5c908(_0x488042);},'HUicT':_0x2f9662(0x198),'sIvsZ':_0x2f9662(0x18c),'QsYPY':'\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','WCMTW':function(_0x3b2f9d){return _0x3b2f9d();},'hmPJl':function(_0x555a51,_0x26751d){return _0x555a51>_0x26751d;},'UzKKy':_0x2f9662(0x141),'JKGaP':function(_0x56d445,_0xcfca8,_0x3b85b8){return _0x56d445(_0xcfca8,_0x3b85b8);},'WmlgR':function(_0x283d7a,_0x5bec26){return _0x283d7a(_0x5bec26);},'PLGuN':function(_0x260a60,_0x1cee7a){return _0x260a60(_0x1cee7a);},'xNIzP':_0x2f9662(0x199),'JlgZc':function(_0x37b7b8){return _0x37b7b8();},'IqmEx':_0x2f9662(0x145),'RIKYI':function(_0x544b43,_0x3c6918){return _0x544b43>_0x3c6918;},'gpqjM':function(_0x70a69f,_0x43fbfe){return _0x70a69f===_0x43fbfe;},'SJdzn':_0x2f9662(0x16b),'JwSPE':_0x2f9662(0x13b),'WqeCa':_0x2f9662(0x148),'QFVCf':_0x2f9662(0x152),'pkNhj':function(_0x786cbe,_0x43a60a){return _0x786cbe!==_0x43a60a;},'BwtUH':'(not\x20found)','aajtE':function(_0x4a2089,_0x45dc98,_0x5488f8){return _0x4a2089(_0x45dc98,_0x5488f8);}};console['log'](_0x25cb0d[_0x2f9662(0x181)]);const _0x16b23d=process['cwd'](),_0x2b00b7=_0x25cb0d['McBuc'](getRangerDir);if(!_0x25cb0d['BHosr'](existsSync,_0x2b00b7)){console[_0x2f9662(0x140)](_0x2f9662(0x15c)+link(_0x16b23d,bold(_0x25cb0d['FRfjN'](basename,_0x16b23d)))),console[_0x2f9662(0x140)]('\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.'),console[_0x2f9662(0x140)]('\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a');return;}console['log']('Root:\x20'+_0x25cb0d[_0x2f9662(0x183)](link,_0x16b23d,_0x25cb0d['jwSsG'](bold,basename(_0x16b23d))));const _0x54d6c9=_0x25cb0d[_0x2f9662(0x197)](getCurrentVersion),_0x21c334=getLatestVersion();if(_0x21c334[_0x2f9662(0x168)]&&_0x21c334['version']!==_0x54d6c9)console['log'](_0x2f9662(0x161)+_0x54d6c9+_0x2f9662(0x13e)+_0x21c334[_0x2f9662(0x168)]+')'),console['log']('\x20\x20Run:\x20ranger\x20update');else _0x21c334[_0x2f9662(0x168)]?console['log'](_0x2f9662(0x161)+_0x54d6c9+_0x2f9662(0x192)):console[_0x2f9662(0x140)](_0x2f9662(0x161)+_0x54d6c9);const _0x53c345=await _0x25cb0d['Tvzez'](getToken);if(_0x53c345){const _0x168479=await _0x25cb0d['BHosr'](getCurrentUser,_0x53c345);_0x168479['success']?console[_0x2f9662(0x140)](_0x2f9662(0x19c)+_0x25cb0d['OVPjo'](bold,_0x168479[_0x2f9662(0x186)]['organizationName'])):(console[_0x2f9662(0x140)]('API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired'),console[_0x2f9662(0x140)]('\x20\x20Run:\x20ranger\x20setup\x20[token]'));}else console[_0x2f9662(0x140)](_0x2f9662(0x160)),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]');process['env']['DEBUG']&&(console[_0x2f9662(0x140)]('API\x20Environment:\x20'+_0x25cb0d[_0x2f9662(0x166)](getCurrentEnvironment)),console[_0x2f9662(0x140)]('API\x20URL:\x20'+_0x25cb0d[_0x2f9662(0x191)](getApiBaseUrl)));console['log'](_0x25cb0d[_0x2f9662(0x177)]);const _0xb22be9=await _0x25cb0d[_0x2f9662(0x163)](getOpencodePluginStatus);if(_0x25cb0d['SZHQQ'](_0xb22be9[_0x2f9662(0x17d)],_0x25cb0d[_0x2f9662(0x164)]))console[_0x2f9662(0x140)]('\x20\x20'+bold(_0x25cb0d[_0x2f9662(0x184)])+':\x20configured'),_0xb22be9[_0x2f9662(0x175)]&&console['log']('\x20\x20'+_0xb22be9['details']);else _0xb22be9[_0x2f9662(0x17d)]===_0x25cb0d['NaMiC']?(console[_0x2f9662(0x140)](_0x25cb0d[_0x2f9662(0x1a3)]),_0xb22be9['details']&&console[_0x2f9662(0x140)]('\x20\x20'+_0xb22be9[_0x2f9662(0x175)]),console['log'](_0x25cb0d['jEvOq'])):console['log'](_0x25cb0d[_0x2f9662(0x1a8)]);console['log']('\x0a---\x20Claude\x20Code\x20Plugin\x20---');const _0x3a759e=await _0x25cb0d['YZXhl'](getPluginInfo,_0x2f9662(0x18c));if(_0x3a759e){const _0x1996b0=_0x3a759e[_0x2f9662(0x159)]||_0x25cb0d['HUicT'],_0x539575=_0x3a759e[_0x2f9662(0x16d)]?_0x2f9662(0x16d):_0x2f9662(0x153);console['log']('\x20\x20'+bold(_0x25cb0d[_0x2f9662(0x13d)])+_0x2f9662(0x14b)+_0x1996b0+',\x20'+_0x539575+')');}else console['log']('\x20\x20Not\x20installed'),console['log'](_0x25cb0d[_0x2f9662(0x176)]);console[_0x2f9662(0x140)](_0x2f9662(0x143));const {project:_0x5f5dae,user:_0x14eabc}=await _0x25cb0d[_0x2f9662(0x1a5)](getInstalledSkills),_0x482681=_0x5f5dae[_0x2f9662(0x188)](_0x4cb83d=>RANGER_MANAGED_SKILLS[_0x2f9662(0x172)](_0x4cb83d[_0x2f9662(0x162)])),_0xb6403b=_0x14eabc[_0x2f9662(0x188)](_0x484e29=>RANGER_MANAGED_SKILLS[_0x2f9662(0x172)](_0x484e29['name'])),_0x4f3122=_0x482681[_0x2f9662(0x15d)]+_0xb6403b['length'];if(_0x25cb0d[_0x2f9662(0x14a)](_0x4f3122,0x0))console['log']('No\x20skills\x20installed'),console[_0x2f9662(0x140)](_0x2f9662(0x182));else{if(_0x25cb0d['hmPJl'](_0x482681[_0x2f9662(0x15d)],0x0)){console['log'](_0x25cb0d[_0x2f9662(0x13f)]);for(const _0x401a54 of _0x482681){console['log'](_0x2f9662(0x169)+bold(_0x401a54['displayName'])+':\x20'+_0x25cb0d[_0x2f9662(0x15a)](link,_0x401a54['path'],basename(_0x401a54['path'])));}}if(_0xb6403b['length']>0x0){console['log'](_0x2f9662(0x174));for(const _0x3a9207 of _0xb6403b){console['log']('\x20\x20\x20\x20'+_0x25cb0d['WmlgR'](bold,_0x3a9207['displayName'])+':\x20'+link(_0x3a9207['path'],_0x25cb0d[_0x2f9662(0x1a1)](basename,_0x3a9207['path'])));}}}console[_0x2f9662(0x140)](_0x25cb0d['xNIzP']);const {envs:_0x581570,activeEnv:_0x5e792c}=await _0x25cb0d[_0x2f9662(0x156)](getEnvironments);let _0x42691a=[];if(_0x53c345)try{_0x42691a=await listCloudProfiles();}catch{}const _0x3accc0=_0x581570[_0x2f9662(0x15d)]+_0x42691a[_0x2f9662(0x15d)];if(_0x3accc0===0x0)console['log'](_0x25cb0d['IqmEx']),console[_0x2f9662(0x140)](_0x2f9662(0x178));else{if(_0x3accc0>0x5){const _0x1ba832=[];_0x42691a['length']>0x0&&_0x1ba832[_0x2f9662(0x167)](_0x42691a[_0x2f9662(0x15d)]+_0x2f9662(0x194)),_0x25cb0d['RIKYI'](_0x581570['length'],0x0)&&_0x1ba832[_0x2f9662(0x167)](_0x581570[_0x2f9662(0x15d)]+'\x20local'),console[_0x2f9662(0x140)](_0x3accc0+'\x20profiles\x20configured\x20('+_0x1ba832[_0x2f9662(0x190)](',\x20')+')'),_0x5e792c&&console['log']('\x20\x20Active:\x20'+_0x25cb0d[_0x2f9662(0x146)](bold,_0x5e792c)),console['log'](_0x2f9662(0x158));}else{for(const _0x524267 of _0x42691a){const _0x3f6eaa=_0x25cb0d['gpqjM'](_0x524267[_0x2f9662(0x162)],_0x5e792c)?_0x25cb0d['SJdzn']:'';console['log']('\x20\x20'+bold(_0x524267[_0x2f9662(0x162)])+'\x20[cloud]'+_0x3f6eaa);const _0x1ab428=_0x524267['sessionUpdatedAt']?'cached\x20(updated\x20'+_0x524267['sessionUpdatedAt']+')':_0x25cb0d['JwSPE'];console['log'](_0x2f9662(0x170)+_0x1ab428);}const _0xa6ae14=new Set(_0x42691a[_0x2f9662(0x17e)](_0x13abc6=>_0x13abc6['name']));for(const _0x63250e of _0x581570){if(_0xa6ae14['has'](_0x63250e['name']))continue;const _0x479539=_0x63250e['isActive']?_0x2f9662(0x16b):'',_0x276c7e=_0x63250e[_0x2f9662(0x154)]?_0x25cb0d['WqeCa']:_0x63250e['hasPlaintextAuth']?_0x25cb0d['QFVCf']:'none';console[_0x2f9662(0x140)]('\x20\x20'+bold(_0x63250e['name'])+'\x20[local]'+_0x479539),console[_0x2f9662(0x140)]('\x20\x20\x20\x20Auth:\x20'+_0x276c7e),_0x25cb0d[_0x2f9662(0x16a)](_0x63250e['settingsPath'],_0x25cb0d['BwtUH'])&&console['log'](_0x2f9662(0x155)+_0x25cb0d['aajtE'](link,_0x63250e[_0x2f9662(0x18b)],basename(_0x63250e['settingsPath'])));}if(!_0x5e792c){console['log']('\x0a\x20\x20No\x20active\x20profile\x20set');const _0x1ee038=[..._0x42691a['map'](_0x4aa9a3=>_0x4aa9a3['name']),..._0x581570[_0x2f9662(0x188)](_0xb3cd92=>!_0xa6ae14[_0x2f9662(0x13c)](_0xb3cd92['name']))['map'](_0x1a0804=>_0x1a0804['name'])];console[_0x2f9662(0x140)]('\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20'+_0x1ee038['join'](',\x20')+')');}}}console['log']('');}
1
+ const _0x1faeae=_0x31f1;(function(_0x4c22da,_0x5d8f5f){const _0x231302=_0x31f1,_0x46a14a=_0x4c22da();while(!![]){try{const _0xcec824=-parseInt(_0x231302(0x1b5))/0x1+parseInt(_0x231302(0x215))/0x2+-parseInt(_0x231302(0x210))/0x3+-parseInt(_0x231302(0x21a))/0x4*(-parseInt(_0x231302(0x1d0))/0x5)+parseInt(_0x231302(0x219))/0x6*(-parseInt(_0x231302(0x1d5))/0x7)+-parseInt(_0x231302(0x1cc))/0x8*(parseInt(_0x231302(0x1df))/0x9)+parseInt(_0x231302(0x1e2))/0xa;if(_0xcec824===_0x5d8f5f)break;else _0x46a14a['push'](_0x46a14a['shift']());}catch(_0x3fb9fb){_0x46a14a['push'](_0x46a14a['shift']());}}}(_0x363f,0xd5f47));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';import{getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';function _0x363f(){const _0x5b1da3=['\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available','trim','hasPlaintextAuth','none','924375gzxGTF','Kjjoj','status','\x20(active)','join','370220jNYoho','\x20\x20Active:\x20','dyLvF','enabled','980898yMyXxh','6122252LJNXPq','opencode','\x1b[0m','uvLGC','isArray','API\x20Token:\x20✗\x20Not\x20found','includes','TzgLM','950945DHJylq','\x20\x20\x20\x20Auth:\x20','cQSkV','ftfie','zIKkA','NxZhC','\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a','API\x20URL:\x20','configured','API\x20Environment:\x20','sXHzz','BFXRS','\x20profiles\x20configured\x20(','version','name','isActive','GFNMC','TBCAg','QtraE','length','user','\x0a\x20\x20No\x20active\x20profile\x20set',':\x20installed\x20(','8wZnsKp','config','\x20[cloud]','\x0a---\x20Profiles\x20---','5sKbkFC','Npxyd','Root:\x20','PZEJS','PlloC','35qDpszq','(not\x20found)','debug','jopVs','mpvWM','disabled','CZBHw','gicGQ','emURj','ZAmMq','13182138vlyAzS','details',':\x20configured','27018530IvGvsi','JHXaR','NaBlt','\x0a📊\x20Ranger\x20Status\x0a','success','LQfrn','no\x20session','displayName','\x20\x20User-level:','DvJjw','map','toString','JtscC','\x20\x20Not\x20configured','No\x20profiles\x20configured','\x1b[1m','wjWXE','nWdeD','auth.json','wwuMN','not_installed','gMVuB','filter','pipe','Version:\x20','has','zDzZB','\x20cloud','parse','project','log','match','ynUaD','NVJgB','opencode-plugin','plugin','uDrDH','cwd','\x20\x20Run:\x20ranger\x20skillup','dkfpJ','eDLwO','\x20\x20Not\x20installed'];_0x363f=function(){return _0x5b1da3;};return _0x363f();}function _0x31f1(_0x14c419,_0x5156ad){_0x14c419=_0x14c419-0x1b3;const _0x363f3b=_0x363f();let _0x31f1be=_0x363f3b[_0x14c419];return _0x31f1be;}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=_0x24177a=>_0x1faeae(0x1f1)+_0x24177a+_0x1faeae(0x21c),link=(_0x531cce,_0x4149cc)=>'\x1b]8;;file://'+_0x531cce+'\x07'+(_0x4149cc||_0x531cce)+'\x1b]8;;\x07';async function getOpencodePluginStatus(){const _0x3557fe=_0x1faeae,_0x417a5e={'ydurP':_0x3557fe(0x1bd),'gMVuB':'not_configured','JHXaR':'data','ZAmMq':'close'};return new Promise(_0x26a75b=>{const _0x316535=_0x3557fe,_0x59a458={'QtraE':'string','dkfpJ':function(_0x5e02ff,_0x359d8d){return _0x5e02ff(_0x359d8d);},'NxZhC':_0x417a5e['ydurP'],'eDLwO':function(_0x15172e,_0x31fd2f){return _0x15172e>_0x31fd2f;},'VHgUO':_0x417a5e[_0x316535(0x1f7)]},_0x2e08e7=spawn(_0x316535(0x21b),[_0x316535(0x1d7),_0x316535(0x1cd)],{'stdio':['ignore',_0x316535(0x1f9),_0x316535(0x1f9)]});let _0x246e66='';_0x2e08e7['stdout']?.['on'](_0x417a5e[_0x316535(0x1e3)],_0x2b7fb9=>{const _0x3a5d62=_0x316535;_0x246e66+=_0x2b7fb9[_0x3a5d62(0x1ed)]();}),_0x2e08e7['stderr']?.['on'](_0x417a5e['JHXaR'],_0x131d19=>{const _0xc30dc1=_0x316535;_0x246e66+=_0x131d19[_0xc30dc1(0x1ed)]();}),_0x2e08e7['on']('error',()=>{const _0x25e0eb=_0x316535;_0x26a75b({'status':_0x25e0eb(0x1f6)});}),_0x2e08e7['on'](_0x417a5e[_0x316535(0x1de)],_0x32c219=>{const _0x505993=_0x316535,_0x546e21={'mpvWM':_0x59a458[_0x505993(0x1c7)],'NaBlt':_0x505993(0x204)};if(_0x32c219!==0x0){_0x59a458[_0x505993(0x209)](_0x26a75b,{'status':'not_installed'});return;}const _0x5cf651=_0x246e66[_0x505993(0x20d)]();let _0x35dd84=null;if(_0x5cf651)try{_0x35dd84=JSON[_0x505993(0x1fe)](_0x5cf651);}catch{const _0x10abc2=_0x5cf651[_0x505993(0x201)](/\{[\s\S]*\}$/);if(_0x10abc2)try{_0x35dd84=JSON['parse'](_0x10abc2[0x0]);}catch{_0x35dd84=null;}}const _0x590131=Array[_0x505993(0x21e)](_0x35dd84?.[_0x505993(0x205)])?_0x35dd84?.[_0x505993(0x205)]:[],_0x147a85=_0x590131['some'](_0x90343a=>{const _0x4cd6e7=_0x505993;if(typeof _0x90343a!==_0x546e21[_0x4cd6e7(0x1d9)])return![];return _0x90343a[_0x4cd6e7(0x1b3)]('@ranger-testing/opencode-plugin')||_0x90343a['includes'](_0x546e21[_0x4cd6e7(0x1e4)]);});if(_0x147a85){_0x26a75b({'status':_0x59a458[_0x505993(0x1ba)],'details':_0x59a458[_0x505993(0x20a)](_0x590131['length'],0x0)?_0x590131[_0x505993(0x1c8)]+'\x20plugin(s)\x20configured':undefined});return;}if(_0x590131['length']>0x0){_0x26a75b({'status':_0x59a458['VHgUO'],'details':_0x590131['length']+'\x20plugin(s)\x20configured'});return;}_0x26a75b({'status':_0x59a458['VHgUO']});});});}async function getSkillsFromDir(_0x27c7f9,_0x5a78b6){const _0x9acd0c=_0x1faeae,_0x58e994={'zDzZB':function(_0x52ce90,_0x1ee3eb){return _0x52ce90(_0x1ee3eb);},'LQfrn':function(_0x1b3376,_0x1dbf49,_0x9ba47d){return _0x1b3376(_0x1dbf49,_0x9ba47d);},'cQSkV':'utf-8'};if(!existsSync(_0x27c7f9))return[];const _0xf9aef=[];try{const _0x48d085=await readdir(_0x27c7f9,{'withFileTypes':!![]});for(const _0x58180 of _0x48d085){if(_0x58180['isDirectory']()){const _0xec9f27=join(_0x27c7f9,_0x58180['name'],'SKILL.md');if(_0x58e994[_0x9acd0c(0x1fc)](existsSync,_0xec9f27)){let _0x56771d=_0x58180[_0x9acd0c(0x1c3)];try{const _0x5751c4=await _0x58e994[_0x9acd0c(0x1e7)](readFile,_0xec9f27,_0x58e994[_0x9acd0c(0x1b7)]),_0x5374c5=_0x5751c4['match'](/name:\s*(.+)/);_0x5374c5&&(_0x56771d=_0x5374c5[0x1]['trim']());}catch{}_0xf9aef['push']({'name':_0x58180['name'],'displayName':_0x56771d,'path':_0xec9f27,'level':_0x5a78b6});}}}}catch{return[];}return _0xf9aef;}async function getInstalledSkills(){const _0x43e44f=_0x1faeae,_0x51346e={'Npxyd':_0x43e44f(0x1ff)},[_0x2acdc7,_0x58238f]=await Promise['all']([getSkillsFromDir(getProjectSkillsDir(),_0x51346e[_0x43e44f(0x1d1)]),getSkillsFromDir(getUserSkillsDir(),_0x43e44f(0x1c9))]);return{'project':_0x2acdc7,'user':_0x58238f};}async function getEnvironments(){const _0x553343={'ekDrO':function(_0x154fa7,_0x24d0ed){return _0x154fa7(_0x24d0ed);},'jtSaV':function(_0x34e95,_0xd58042,_0xe390ff){return _0x34e95(_0xd58042,_0xe390ff);},'rzqvY':function(_0x5b56e8){return _0x5b56e8();}},{envNames:_0x267372,activeEnv:_0x127da7}=await _0x553343['rzqvY'](getEnvNames),_0x38f47e=getRangerDir();if(!existsSync(_0x38f47e))return{'envs':[],'activeEnv':null};const _0x414558=_0x267372['map'](_0xfa241d=>{const _0x1a3ece=_0x31f1,_0x1e6b31=_0x553343['ekDrO'](getEnvDir,_0xfa241d),_0x38a5a5=join(_0x1e6b31,'settings.json'),_0x5b91fc=join(_0x1e6b31,_0x1a3ece(0x1f4)),_0x24b0d9=_0x553343['jtSaV'](join,_0x1e6b31,'auth.json.enc');return{'name':_0xfa241d,'settingsPath':existsSync(_0x38a5a5)?_0x38a5a5:'(not\x20found)','hasPlaintextAuth':_0x553343['ekDrO'](existsSync,_0x5b91fc),'hasEncryptedAuth':existsSync(_0x24b0d9),'isActive':_0xfa241d===_0x127da7};});return{'envs':_0x414558,'activeEnv':_0x127da7};}export async function status(){const _0x24ebce=_0x1faeae,_0x427e73={'PZEJS':_0x24ebce(0x1e5),'ynUaD':function(_0x4a0033){return _0x4a0033();},'PlloC':function(_0x12ce49,_0xf460b9){return _0x12ce49(_0xf460b9);},'TBCAg':function(_0x495843,_0x133bfd){return _0x495843(_0x133bfd);},'dyLvF':function(_0x5541bb){return _0x5541bb();},'wwuMN':function(_0x3b30f2){return _0x3b30f2();},'ftfie':function(_0x11e211){return _0x11e211();},'jopVs':function(_0x48f95e,_0x4506f6){return _0x48f95e(_0x4506f6);},'Mwfqu':'@ranger-testing/opencode-plugin','jwlnP':'not_configured','cynrM':'\x20\x20Run:\x20ranger\x20setup\x20--opencode','JtscC':_0x24ebce(0x20c),'gicGQ':'unknown','tVALQ':_0x24ebce(0x218),'hxOXI':_0x24ebce(0x1da),'DvJjw':'ranger@trailhead','zIKkA':'\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','TzgLM':function(_0x24ba64,_0x4c280e){return _0x24ba64===_0x4c280e;},'GFNMC':'\x20\x20Project-level:','XSUSJ':function(_0x4cd49a,_0x3fc6c5,_0x5c915b){return _0x4cd49a(_0x3fc6c5,_0x5c915b);},'sXHzz':function(_0x29a32d,_0x38c796){return _0x29a32d>_0x38c796;},'yLtae':_0x24ebce(0x1ea),'uvLGC':_0x24ebce(0x1cf),'eaYek':function(_0x33ddbc){return _0x33ddbc();},'nWdeD':function(_0x3451b1){return _0x3451b1();},'KLtFC':function(_0x1293e1,_0x6ece89){return _0x1293e1+_0x6ece89;},'uDrDH':_0x24ebce(0x1f0),'CZBHw':function(_0x1e8e28,_0x6ac7eb){return _0x1e8e28>_0x6ac7eb;},'Kjjoj':_0x24ebce(0x213),'XZhWQ':'encrypted','BFXRS':'plaintext','FzPZz':_0x24ebce(0x20f),'emURj':function(_0x3e1856,_0x5c6fb9){return _0x3e1856!==_0x5c6fb9;},'wjWXE':function(_0x1bc092,_0x291a1d,_0x196645){return _0x1bc092(_0x291a1d,_0x196645);},'NVJgB':function(_0x1730c3,_0x576a94){return _0x1730c3(_0x576a94);}};console[_0x24ebce(0x200)](_0x427e73[_0x24ebce(0x1d3)]);const _0x27ea91=process[_0x24ebce(0x207)](),_0x19abd2=_0x427e73['ynUaD'](getRangerDir);if(!_0x427e73[_0x24ebce(0x1d4)](existsSync,_0x19abd2)){console[_0x24ebce(0x200)]('Root:\x20'+link(_0x27ea91,_0x427e73['TBCAg'](bold,basename(_0x27ea91)))),console[_0x24ebce(0x200)]('\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.'),console['log'](_0x24ebce(0x1bb));return;}console['log'](_0x24ebce(0x1d2)+link(_0x27ea91,_0x427e73[_0x24ebce(0x1d4)](bold,_0x427e73[_0x24ebce(0x1d4)](basename,_0x27ea91))));const _0x112d86=getCurrentVersion(),_0x15084b=_0x427e73[_0x24ebce(0x202)](getLatestVersion);if(_0x15084b[_0x24ebce(0x1c2)]&&_0x15084b[_0x24ebce(0x1c2)]!==_0x112d86)console['log'](_0x24ebce(0x1fa)+_0x112d86+'\x20(latest:\x20'+_0x15084b['version']+')'),console[_0x24ebce(0x200)]('\x20\x20Run:\x20ranger\x20update');else _0x15084b[_0x24ebce(0x1c2)]?console[_0x24ebce(0x200)]('Version:\x20'+_0x112d86+'\x20(up\x20to\x20date)'):console[_0x24ebce(0x200)]('Version:\x20'+_0x112d86);const _0x294edb=await _0x427e73[_0x24ebce(0x217)](getToken);if(_0x294edb){const _0x3839c3=await _0x427e73[_0x24ebce(0x1c6)](getCurrentUser,_0x294edb);_0x3839c3[_0x24ebce(0x1e6)]?console['log']('Organization:\x20'+_0x427e73[_0x24ebce(0x1c6)](bold,_0x3839c3[_0x24ebce(0x1c9)]['organizationName'])):(console[_0x24ebce(0x200)]('API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired'),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]'));}else console['log'](_0x24ebce(0x21f)),console[_0x24ebce(0x200)]('\x20\x20Run:\x20ranger\x20setup\x20[token]');process['env']['DEBUG']&&(console['log'](_0x24ebce(0x1be)+_0x427e73[_0x24ebce(0x1f5)](getCurrentEnvironment)),console['log'](_0x24ebce(0x1bc)+_0x427e73[_0x24ebce(0x1b8)](getApiBaseUrl)));console[_0x24ebce(0x200)]('\x0a---\x20OpenCode\x20Plugin\x20---');const _0x566c96=await getOpencodePluginStatus();if(_0x566c96[_0x24ebce(0x212)]==='configured')console['log']('\x20\x20'+_0x427e73[_0x24ebce(0x1d8)](bold,_0x427e73['Mwfqu'])+_0x24ebce(0x1e1)),_0x566c96[_0x24ebce(0x1e0)]&&console['log']('\x20\x20'+_0x566c96[_0x24ebce(0x1e0)]);else _0x566c96[_0x24ebce(0x212)]===_0x427e73['jwlnP']?(console['log'](_0x24ebce(0x1ef)),_0x566c96[_0x24ebce(0x1e0)]&&console['log']('\x20\x20'+_0x566c96[_0x24ebce(0x1e0)]),console['log'](_0x427e73['cynrM'])):console['log'](_0x427e73[_0x24ebce(0x1ee)]);console['log']('\x0a---\x20Claude\x20Code\x20Plugin\x20---');const _0x17b90e=await getPluginInfo('ranger@trailhead');if(_0x17b90e){const _0x10a813=_0x17b90e['scope']||_0x427e73[_0x24ebce(0x1dc)],_0x55a9c0=_0x17b90e[_0x24ebce(0x218)]?_0x427e73['tVALQ']:_0x427e73['hxOXI'];console['log']('\x20\x20'+_0x427e73[_0x24ebce(0x1d4)](bold,_0x427e73[_0x24ebce(0x1eb)])+_0x24ebce(0x1cb)+_0x10a813+',\x20'+_0x55a9c0+')');}else console['log'](_0x24ebce(0x20b)),console['log'](_0x427e73[_0x24ebce(0x1b9)]);console[_0x24ebce(0x200)]('\x0a---\x20Skills\x20---');const {project:_0x22cf77,user:_0x1a9bc4}=await getInstalledSkills(),_0x51bab1=_0x22cf77[_0x24ebce(0x1f8)](_0x2e4c11=>RANGER_MANAGED_SKILLS['includes'](_0x2e4c11['name'])),_0x445024=_0x1a9bc4[_0x24ebce(0x1f8)](_0x298e4d=>RANGER_MANAGED_SKILLS['includes'](_0x298e4d[_0x24ebce(0x1c3)])),_0x5a6870=_0x51bab1[_0x24ebce(0x1c8)]+_0x445024['length'];if(_0x427e73[_0x24ebce(0x1b4)](_0x5a6870,0x0))console['log']('No\x20skills\x20installed'),console[_0x24ebce(0x200)](_0x24ebce(0x208));else{if(_0x51bab1['length']>0x0){console[_0x24ebce(0x200)](_0x427e73[_0x24ebce(0x1c5)]);for(const _0x372a34 of _0x51bab1){console[_0x24ebce(0x200)]('\x20\x20\x20\x20'+bold(_0x372a34[_0x24ebce(0x1e9)])+':\x20'+_0x427e73['XSUSJ'](link,_0x372a34['path'],_0x427e73[_0x24ebce(0x1d4)](basename,_0x372a34['path'])));}}if(_0x427e73[_0x24ebce(0x1bf)](_0x445024['length'],0x0)){console['log'](_0x427e73['yLtae']);for(const _0x3aefcb of _0x445024){console['log']('\x20\x20\x20\x20'+bold(_0x3aefcb[_0x24ebce(0x1e9)])+':\x20'+link(_0x3aefcb['path'],basename(_0x3aefcb['path'])));}}}console[_0x24ebce(0x200)](_0x427e73[_0x24ebce(0x21d)]);const {envs:_0x26c276,activeEnv:_0x551ae3}=await _0x427e73['eaYek'](getEnvironments);let _0xace2b6=[];if(_0x294edb)try{_0xace2b6=await _0x427e73[_0x24ebce(0x1f3)](listCloudProfiles);}catch{}const _0x21fa95=_0x427e73['KLtFC'](_0x26c276[_0x24ebce(0x1c8)],_0xace2b6['length']);if(_0x427e73['TzgLM'](_0x21fa95,0x0))console['log'](_0x427e73[_0x24ebce(0x206)]),console['log']('\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>');else{if(_0x21fa95>0x5){const _0x4c0189=[];_0x427e73[_0x24ebce(0x1db)](_0xace2b6[_0x24ebce(0x1c8)],0x0)&&_0x4c0189['push'](_0xace2b6[_0x24ebce(0x1c8)]+_0x24ebce(0x1fd)),_0x427e73['CZBHw'](_0x26c276[_0x24ebce(0x1c8)],0x0)&&_0x4c0189['push'](_0x26c276['length']+'\x20local'),console[_0x24ebce(0x200)](_0x21fa95+_0x24ebce(0x1c1)+_0x4c0189[_0x24ebce(0x214)](',\x20')+')'),_0x551ae3&&console[_0x24ebce(0x200)](_0x24ebce(0x216)+bold(_0x551ae3)),console[_0x24ebce(0x200)]('\x20\x20Run:\x20ranger\x20profile\x20ls\x20\x20(list\x20all)');}else{for(const _0x13f550 of _0xace2b6){const _0x5161bf=_0x13f550['name']===_0x551ae3?_0x427e73[_0x24ebce(0x211)]:'';console[_0x24ebce(0x200)]('\x20\x20'+_0x427e73[_0x24ebce(0x1d8)](bold,_0x13f550[_0x24ebce(0x1c3)])+_0x24ebce(0x1ce)+_0x5161bf);const _0x38a7ee=_0x13f550['sessionUpdatedAt']?'cached\x20(updated\x20'+_0x13f550['sessionUpdatedAt']+')':_0x24ebce(0x1e8);console[_0x24ebce(0x200)]('\x20\x20\x20\x20Session:\x20'+_0x38a7ee);}const _0x181922=new Set(_0xace2b6[_0x24ebce(0x1ec)](_0x5626ce=>_0x5626ce[_0x24ebce(0x1c3)]));for(const _0xab8fd6 of _0x26c276){if(_0x181922[_0x24ebce(0x1fb)](_0xab8fd6[_0x24ebce(0x1c3)]))continue;const _0x5d49ba=_0xab8fd6[_0x24ebce(0x1c4)]?_0x427e73[_0x24ebce(0x211)]:'',_0x478f57=_0xab8fd6['hasEncryptedAuth']?_0x427e73['XZhWQ']:_0xab8fd6[_0x24ebce(0x20e)]?_0x427e73[_0x24ebce(0x1c0)]:_0x427e73['FzPZz'];console[_0x24ebce(0x200)]('\x20\x20'+_0x427e73[_0x24ebce(0x1c6)](bold,_0xab8fd6[_0x24ebce(0x1c3)])+'\x20[local]'+_0x5d49ba),console['log'](_0x24ebce(0x1b6)+_0x478f57),_0x427e73[_0x24ebce(0x1dd)](_0xab8fd6['settingsPath'],_0x24ebce(0x1d6))&&console['log']('\x20\x20\x20\x20Settings:\x20'+_0x427e73[_0x24ebce(0x1f2)](link,_0xab8fd6['settingsPath'],_0x427e73[_0x24ebce(0x203)](basename,_0xab8fd6['settingsPath'])));}if(!_0x551ae3){console[_0x24ebce(0x200)](_0x24ebce(0x1ca));const _0x4a316f=[..._0xace2b6[_0x24ebce(0x1ec)](_0x55b853=>_0x55b853[_0x24ebce(0x1c3)]),..._0x26c276[_0x24ebce(0x1f8)](_0x677969=>!_0x181922['has'](_0x677969[_0x24ebce(0x1c3)]))[_0x24ebce(0x1ec)](_0x5166f0=>_0x5166f0[_0x24ebce(0x1c3)])];console[_0x24ebce(0x200)]('\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20'+_0x4a316f['join'](',\x20')+')');}}}console[_0x24ebce(0x200)]('');}