@ranger-testing/ranger-cli 2.5.4-alpha.78800d3-3 → 2.5.4-alpha.9360c2a-16

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 (82) hide show
  1. package/README.md +36 -14
  2. package/build/cli.js +1 -1
  3. package/build/commands/addEnv.js +1 -1
  4. package/build/commands/authEncrypt.js +1 -1
  5. package/build/commands/clean.js +1 -1
  6. package/build/commands/config.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 -0
  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/opencodeConfig.js +1 -1
  58. package/build/commands/utils/playwrightCli.js +1 -1
  59. package/build/commands/utils/profileMessages.js +1 -1
  60. package/build/commands/utils/profileSetupBanner.js +1 -1
  61. package/build/commands/utils/projectsConfig.js +1 -1
  62. package/build/commands/utils/rangerConfig.js +1 -1
  63. package/build/commands/utils/rangerRoot.js +1 -1
  64. package/build/commands/utils/resolveProfileContext.js +1 -1
  65. package/build/commands/utils/resolveProfileUrl.js +1 -1
  66. package/build/commands/utils/retry.js +1 -1
  67. package/build/commands/utils/sessionCache.js +1 -1
  68. package/build/commands/utils/settings.js +1 -1
  69. package/build/commands/utils/skillContent.js +1 -1
  70. package/build/commands/utils/skills.js +1 -1
  71. package/build/commands/utils/stitchWebmFiles.js +1 -1
  72. package/build/commands/utils/telemetry.js +1 -1
  73. package/build/commands/utils/tokenRefresh.js +1 -1
  74. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  75. package/build/commands/utils/userApi.js +1 -1
  76. package/build/commands/utils/version.js +1 -1
  77. package/build/commands/verifyFeature.js +1 -1
  78. package/build/commands/verifyFeatureCli.js +1 -1
  79. package/build/skills/ranger/SKILL.md +36 -6
  80. package/build/skills/ranger/create.md +19 -0
  81. package/build/skills/ranger/verify.md +46 -7
  82. package/package.json +3 -2
@@ -1 +1 @@
1
- (function(_0x1c7413,_0x4d222){const _0x25772c=_0xbe8e,_0x4e5d98=_0x1c7413();while(!![]){try{const _0x59ad4b=-parseInt(_0x25772c(0x12d))/0x1+-parseInt(_0x25772c(0x14c))/0x2+-parseInt(_0x25772c(0x13f))/0x3*(-parseInt(_0x25772c(0x14b))/0x4)+parseInt(_0x25772c(0x14a))/0x5+-parseInt(_0x25772c(0x158))/0x6+parseInt(_0x25772c(0x12e))/0x7*(parseInt(_0x25772c(0x157))/0x8)+parseInt(_0x25772c(0x146))/0x9;if(_0x59ad4b===_0x4d222)break;else _0x4e5d98['push'](_0x4e5d98['shift']());}catch(_0x70d488){_0x4e5d98['push'](_0x4e5d98['shift']());}}}(_0x4908,0xb9241));function _0x4908(){const _0x490d4c=['uWgPe','Rsyng','Bwelj','IBGja','Project\x20(shared\x20with\x20team\x20via\x20git)','✓\x20Claude\x20Code\x20plugin\x20enabled','pluginScope','AUVtk','1191757GFicwE','1687IOALpH','trailhead','user','hlzwu','uLTIJ','jHaRq','plugin','fKqmT','\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','ranger','log','prompt','xRHCT','NOwBJ','QtGEb','ranger@trailhead','output','3pgZyET','\x20level)...\x0a','MEoXJ','VxdLc','User\x20(available\x20in\x20all\x20your\x20projects)','\x0aYou\x20can\x20install\x20manually\x20with:','project','21253509XCQqLp','push','marketplace','success','5706615TRMFUn','1645612zAghuz','2801098rEAvmo','wantsSkillup','❌\x20Failed\x20to\x20add\x20marketplace:','enable','confirm','kgBVw','SKILL.md','error','ranger-testing/trailhead','yACFZ','.claude','6224pUpTGE','4506492gjOjWW','FvYbO','Where\x20should\x20the\x20plugin\x20be\x20installed?','jdcJg','HfwlW'];_0x4908=function(){return _0x490d4c;};return _0x4908();}import{join}from'path';import{existsSync}from'fs';import _0x373e56 from'inquirer';function _0xbe8e(_0x3efd99,_0x17b385){_0x3efd99=_0x3efd99-0x121;const _0x49080c=_0x4908();let _0xbe8ec7=_0x49080c[_0x3efd99];return _0xbe8ec7;}import{skillup}from'../skillup.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'../utils/claudePlugin.js';import{getProjectRoot,getSkillsDir}from'../utils/claudeConfig.js';export async function ensureClaudePlugin(_0x4ecbb9){const _0x3306ad=_0xbe8e,_0x54b62e={'AUVtk':_0x3306ad(0x13d),'SYyvL':'✓\x20Claude\x20Code\x20plugin\x20already\x20installed','MEoXJ':function(_0x236c1b,_0x233009){return _0x236c1b(_0x233009);},'HfwlW':function(_0x3e0058,_0x3ca165,_0x2e0bdb){return _0x3e0058(_0x3ca165,_0x2e0bdb);},'jdcJg':_0x3306ad(0x145),'QtGEb':'list','FcPCy':_0x3306ad(0x122),'qeQOG':'user','kgBVw':'plugin','Bwelj':_0x3306ad(0x148),'NOwBJ':'add','iKkrL':_0x3306ad(0x14e),'rRnzX':'--scope','ERWnP':'❌\x20Failed\x20to\x20install\x20plugin:','phmgt':'✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully','hlzwu':function(_0x544083,_0x137efc){return _0x544083===_0x137efc;},'uWgPe':'already\x20enabled','fKqmT':'⚠\x20Failed\x20to\x20enable\x20plugin:','nEJLr':_0x3306ad(0x12a)},_0x288e7b=await isPluginInstalled(_0x54b62e[_0x3306ad(0x12c)]);if(_0x288e7b)return console[_0x3306ad(0x138)](_0x54b62e['SYyvL']),![];const _0x488335=_0x54b62e[_0x3306ad(0x141)](existsSync,_0x54b62e[_0x3306ad(0x124)](join,getProjectRoot(),'.claude'));let _0x1500dd;if(_0x4ecbb9)_0x1500dd=_0x4ecbb9;else{if(_0x488335)_0x1500dd=_0x54b62e['jdcJg'];else{console['log']('\x0a📦\x20Claude\x20Code\x20Plugin\x0a');const _0x34ecaf=await _0x373e56['prompt']([{'type':_0x54b62e[_0x3306ad(0x13c)],'name':'pluginScope','message':_0x54b62e['FcPCy'],'choices':[{'name':_0x3306ad(0x143),'value':_0x3306ad(0x130)},{'name':_0x3306ad(0x129),'value':'project'}],'default':_0x54b62e['qeQOG']}]);_0x1500dd=_0x34ecaf[_0x3306ad(0x12b)];}}console['log']('\x0aInstalling\x20Claude\x20Code\x20plugin\x20('+_0x1500dd+_0x3306ad(0x140));const _0x2a3b71=await _0x54b62e[_0x3306ad(0x141)](isMarketplaceAdded,_0x3306ad(0x12f));let _0x20c522=_0x2a3b71;if(_0x2a3b71)console['log']('✓\x20Marketplace\x20already\x20added');else{const _0x3b5fdd=await _0x54b62e['MEoXJ'](runClaudeCommand,[_0x54b62e['kgBVw'],_0x54b62e[_0x3306ad(0x127)],_0x54b62e[_0x3306ad(0x13b)],_0x3306ad(0x154)]);!_0x3b5fdd[_0x3306ad(0x149)]?(console[_0x3306ad(0x153)](_0x54b62e['iKkrL'],_0x3b5fdd['error']),console['log'](_0x3306ad(0x144)),console[_0x3306ad(0x138)](_0x3306ad(0x136)),console[_0x3306ad(0x138)]('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0x1500dd)):_0x20c522=!![];}if(_0x20c522){const _0x5ba596=await runClaudeCommand([_0x54b62e[_0x3306ad(0x151)],'install',_0x54b62e['AUVtk'],_0x54b62e['rRnzX'],_0x1500dd]);if(!_0x5ba596[_0x3306ad(0x149)])console[_0x3306ad(0x153)](_0x54b62e['ERWnP'],_0x5ba596['error']),console['log'](_0x3306ad(0x144)),console['log']('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0x1500dd);else{console['log'](_0x54b62e['phmgt']);const _0x25d5b3=[_0x3306ad(0x134),_0x3306ad(0x14f),_0x3306ad(0x13d)];_0x54b62e[_0x3306ad(0x131)](_0x1500dd,_0x54b62e[_0x3306ad(0x123)])&&_0x25d5b3[_0x3306ad(0x147)](_0x54b62e['rRnzX'],_0x3306ad(0x145));const _0x4288c3=await runClaudeCommand(_0x25d5b3,{'captureOutput':!![]}),_0x17ab74=_0x4288c3[_0x3306ad(0x13e)]?.['includes'](_0x54b62e[_0x3306ad(0x125)]);!_0x4288c3['success']&&!_0x17ab74?console[_0x3306ad(0x153)](_0x54b62e[_0x3306ad(0x135)],_0x4288c3['error']):console[_0x3306ad(0x138)](_0x54b62e['nEJLr']);}}return!![];}export async function ensureClaudeSkills(_0x5b5bcd){const _0xc865d9=_0xbe8e,_0x17ca0b={'xRHCT':function(_0x742e41,_0x21798e,_0x520cde,_0x26acf0){return _0x742e41(_0x21798e,_0x520cde,_0x26acf0);},'uLTIJ':_0xc865d9(0x130),'jHaRq':function(_0x33cc68,_0x56c880){return _0x33cc68(_0x56c880);},'Bqouc':'ranger','Rsyng':'SKILL.md','yACFZ':'✓\x20Ranger\x20skills\x20already\x20installed','FvYbO':function(_0x505403){return _0x505403();},'IBGja':_0xc865d9(0x156),'WkcNh':function(_0x1423e6,_0x7e8a71){return _0x1423e6(_0x7e8a71);},'YUQJe':_0xc865d9(0x14d),'VxdLc':'Would\x20you\x20like\x20to\x20install\x20skills?','PZeQc':function(_0x24e3d7,_0x442b26){return _0x24e3d7(_0x442b26);}},_0x5d1e92=existsSync(_0x17ca0b[_0xc865d9(0x13a)](join,getSkillsDir(_0x17ca0b[_0xc865d9(0x132)]),_0xc865d9(0x137),_0xc865d9(0x152))),_0x5d0f31=existsSync(join(_0x17ca0b['jHaRq'](getSkillsDir,_0xc865d9(0x145)),_0x17ca0b['Bqouc'],_0x17ca0b[_0xc865d9(0x126)]));if(_0x5d1e92||_0x5d0f31)return console[_0xc865d9(0x138)](_0x17ca0b[_0xc865d9(0x155)]),![];const _0x5c26ae=_0x17ca0b['jHaRq'](existsSync,join(_0x17ca0b[_0xc865d9(0x121)](getProjectRoot),_0x17ca0b[_0xc865d9(0x128)]));let _0x560d1a=!![];if(_0x5b5bcd)await _0x17ca0b['WkcNh'](skillup,{'autoInstall':_0x5b5bcd,'suppressUsage':!![]});else{if(_0x5c26ae)await _0x17ca0b[_0xc865d9(0x133)](skillup,{'autoInstall':'project','suppressUsage':!![]});else{const _0x25b25e=await _0x373e56[_0xc865d9(0x139)]([{'type':_0xc865d9(0x150),'name':_0x17ca0b['YUQJe'],'message':_0x17ca0b[_0xc865d9(0x142)],'default':!![]}]);_0x560d1a=_0x25b25e[_0xc865d9(0x14d)],_0x560d1a&&await _0x17ca0b['PZeQc'](skillup,{'suppressUsage':!![]});}}return _0x560d1a;}
1
+ (function(_0x3d228a,_0x4ab55d){const _0x25a2b0=_0x15d3,_0x1504f7=_0x3d228a();while(!![]){try{const _0x361be6=-parseInt(_0x25a2b0(0x7c))/0x1+-parseInt(_0x25a2b0(0x99))/0x2+parseInt(_0x25a2b0(0x9d))/0x3*(parseInt(_0x25a2b0(0x76))/0x4)+-parseInt(_0x25a2b0(0x94))/0x5+-parseInt(_0x25a2b0(0x97))/0x6+-parseInt(_0x25a2b0(0x77))/0x7*(parseInt(_0x25a2b0(0x9e))/0x8)+parseInt(_0x25a2b0(0x8a))/0x9;if(_0x361be6===_0x4ab55d)break;else _0x1504f7['push'](_0x1504f7['shift']());}catch(_0xcfc8a4){_0x1504f7['push'](_0x1504f7['shift']());}}}(_0x552f,0xab45a));import{join}from'path';import{existsSync}from'fs';import _0x4c8540 from'inquirer';import{skillup}from'../skillup.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'../utils/claudePlugin.js';function _0x15d3(_0x4a39fa,_0x47907f){_0x4a39fa=_0x4a39fa-0x71;const _0x552f8b=_0x552f();let _0x15d338=_0x552f8b[_0x4a39fa];return _0x15d338;}import{getProjectRoot,getSkillsDir}from'../utils/claudeConfig.js';export async function ensureClaudePlugin(_0xce305c){const _0x10eb98=_0x15d3,_0x164884={'NbObM':'ranger@trailhead','VlfoW':function(_0x4c0577,_0x1be185){return _0x4c0577(_0x1be185);},'RYEtg':function(_0x20ded2,_0x1cbc9a,_0x28a497){return _0x20ded2(_0x1cbc9a,_0x28a497);},'jVrwJ':'project','qQiaa':_0x10eb98(0x75),'IQLyq':'User\x20(available\x20in\x20all\x20your\x20projects)','hwusS':_0x10eb98(0x87),'vZCGH':_0x10eb98(0x79),'ekGdI':function(_0x4539e1,_0x251aff){return _0x4539e1(_0x251aff);},'zZaaV':'marketplace','UvQGx':'ranger-testing/trailhead','ZKqvd':'\x0aYou\x20can\x20install\x20manually\x20with:','Bypgc':'--scope','ntpgj':'❌\x20Failed\x20to\x20install\x20plugin:','MgwQN':_0x10eb98(0x8b),'VIUyi':function(_0x331d32,_0x5901b2){return _0x331d32===_0x5901b2;},'BklKx':'already\x20enabled'},_0x3d1128=await isPluginInstalled(_0x164884['NbObM']);if(_0x3d1128)return console['log']('✓\x20Claude\x20Code\x20plugin\x20already\x20installed'),![];const _0x5b7808=_0x164884['VlfoW'](existsSync,_0x164884[_0x10eb98(0x83)](join,getProjectRoot(),_0x10eb98(0x7d)));let _0x2ca595;if(_0xce305c)_0x2ca595=_0xce305c;else{if(_0x5b7808)_0x2ca595=_0x164884[_0x10eb98(0x7e)];else{console[_0x10eb98(0x72)]('\x0a📦\x20Claude\x20Code\x20Plugin\x0a');const _0x515c8d=await _0x4c8540[_0x10eb98(0x9b)]([{'type':'list','name':_0x164884[_0x10eb98(0x7f)],'message':_0x10eb98(0x93),'choices':[{'name':_0x164884['IQLyq'],'value':_0x164884[_0x10eb98(0x90)]},{'name':'Project\x20(shared\x20with\x20team\x20via\x20git)','value':_0x164884[_0x10eb98(0x7e)]}],'default':_0x164884[_0x10eb98(0x90)]}]);_0x2ca595=_0x515c8d[_0x10eb98(0x75)];}}console[_0x10eb98(0x72)](_0x10eb98(0x8d)+_0x2ca595+_0x10eb98(0x84));const _0x1793dc=await _0x164884[_0x10eb98(0x9c)](isMarketplaceAdded,'trailhead');let _0x40c3ff=_0x1793dc;if(_0x1793dc)console[_0x10eb98(0x72)](_0x164884['vZCGH']);else{const _0x4424ea=await _0x164884[_0x10eb98(0x86)](runClaudeCommand,[_0x10eb98(0x8b),_0x164884['zZaaV'],'add',_0x164884[_0x10eb98(0x92)]]);!_0x4424ea['success']?(console['error'](_0x10eb98(0x98),_0x4424ea['error']),console[_0x10eb98(0x72)](_0x164884['ZKqvd']),console['log']('\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead'),console['log']('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0x2ca595)):_0x40c3ff=!![];}if(_0x40c3ff){const _0x4f312c=await runClaudeCommand([_0x10eb98(0x8b),'install',_0x164884[_0x10eb98(0x82)],_0x164884[_0x10eb98(0x7a)],_0x2ca595],{'cwd':_0x2ca595===_0x164884[_0x10eb98(0x7e)]?getProjectRoot():undefined});if(!_0x4f312c[_0x10eb98(0x89)])console['error'](_0x164884['ntpgj'],_0x4f312c['error']),console[_0x10eb98(0x72)](_0x164884[_0x10eb98(0x73)]),console['log']('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0x2ca595);else{console['log']('✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully');const _0x4ec77b=[_0x164884[_0x10eb98(0x9f)],'enable',_0x164884['NbObM']];_0x164884['VIUyi'](_0x2ca595,_0x164884[_0x10eb98(0x7e)])&&_0x4ec77b[_0x10eb98(0x71)](_0x164884[_0x10eb98(0x7a)],'project');const _0x5ad9ba=await runClaudeCommand(_0x4ec77b,{'captureOutput':!![],'cwd':_0x164884['VIUyi'](_0x2ca595,_0x164884['jVrwJ'])?getProjectRoot():undefined}),_0x463868=_0x5ad9ba['output']?.[_0x10eb98(0x9a)](_0x164884[_0x10eb98(0x74)]);!_0x5ad9ba[_0x10eb98(0x89)]&&!_0x463868?console['error'](_0x10eb98(0x8e),_0x5ad9ba['error']):console[_0x10eb98(0x72)](_0x10eb98(0x7b));}}return!![];}export async function ensureClaudeSkills(_0x4cfe94){const _0x3467d9=_0x15d3,_0x438c06={'zfTmR':function(_0x42ae9f,_0xfc24c9,_0x4e8030,_0x22a8bd){return _0x42ae9f(_0xfc24c9,_0x4e8030,_0x22a8bd);},'nyaLE':'SKILL.md','jbWLB':function(_0x5233b0,_0x2b204d){return _0x5233b0(_0x2b204d);},'LcJOa':function(_0x59627f,_0x5b29aa){return _0x59627f(_0x5b29aa);},'ZTDzG':_0x3467d9(0x78),'RLDwT':'ranger','CAfAp':'.claude','eGzUc':_0x3467d9(0x95),'QeUZN':'wantsSkillup'},_0x10ab3a=existsSync(_0x438c06['zfTmR'](join,getSkillsDir('user'),_0x3467d9(0x8f),_0x438c06['nyaLE'])),_0xdc421=_0x438c06['jbWLB'](existsSync,join(_0x438c06['LcJOa'](getSkillsDir,_0x438c06['ZTDzG']),_0x438c06[_0x3467d9(0x88)],_0x3467d9(0x80)));if(_0x10ab3a||_0xdc421)return console['log']('✓\x20Ranger\x20skills\x20already\x20installed'),![];const _0x18c948=existsSync(join(getProjectRoot(),_0x438c06[_0x3467d9(0x91)]));let _0x45bc0c=!![];if(_0x4cfe94)await _0x438c06[_0x3467d9(0x96)](skillup,{'autoInstall':_0x4cfe94,'suppressUsage':!![]});else{if(_0x18c948)await skillup({'autoInstall':_0x438c06['ZTDzG'],'suppressUsage':!![]});else{const _0x173693=await _0x4c8540[_0x3467d9(0x9b)]([{'type':_0x438c06['eGzUc'],'name':_0x438c06['QeUZN'],'message':_0x3467d9(0x85),'default':!![]}]);_0x45bc0c=_0x173693[_0x3467d9(0x8c)],_0x45bc0c&&await _0x438c06[_0x3467d9(0x81)](skillup,{'suppressUsage':!![]});}}return _0x45bc0c;}function _0x552f(){const _0x406d73=['user','RLDwT','success','36634176MwOMgY','plugin','wantsSkillup','\x0aInstalling\x20Claude\x20Code\x20plugin\x20(','⚠\x20Failed\x20to\x20enable\x20plugin:','ranger','hwusS','CAfAp','UvQGx','Where\x20should\x20the\x20plugin\x20be\x20installed?','5388370QhNGyM','confirm','LcJOa','5450610qdCrmz','❌\x20Failed\x20to\x20add\x20marketplace:','2500296yVHFbx','includes','prompt','VlfoW','344787dzUVSR','8oXALBq','MgwQN','push','log','ZKqvd','BklKx','pluginScope','28xnLcEb','5875926CtYbmp','project','✓\x20Marketplace\x20already\x20added','Bypgc','✓\x20Claude\x20Code\x20plugin\x20enabled','97762zTyrKP','.claude','jVrwJ','qQiaa','SKILL.md','jbWLB','NbObM','RYEtg','\x20level)...\x0a','Would\x20you\x20like\x20to\x20install\x20skills?','ekGdI'];_0x552f=function(){return _0x406d73;};return _0x552f();}
@@ -1 +1 @@
1
- (function(_0x3ece10,_0x276d5b){const _0x3f1d35=_0x35a0,_0x313b18=_0x3ece10();while(!![]){try{const _0x5c3c64=parseInt(_0x3f1d35(0xef))/0x1*(parseInt(_0x3f1d35(0xec))/0x2)+-parseInt(_0x3f1d35(0xf8))/0x3+parseInt(_0x3f1d35(0xdf))/0x4+parseInt(_0x3f1d35(0xf3))/0x5*(parseInt(_0x3f1d35(0xf0))/0x6)+parseInt(_0x3f1d35(0xf5))/0x7+parseInt(_0x3f1d35(0xf6))/0x8+-parseInt(_0x3f1d35(0xe8))/0x9*(parseInt(_0x3f1d35(0xe3))/0xa);if(_0x5c3c64===_0x276d5b)break;else _0x313b18['push'](_0x313b18['shift']());}catch(_0x56bc7f){_0x313b18['push'](_0x313b18['shift']());}}}(_0x3f6d,0x5fcce));function _0x35a0(_0x1d9299,_0x52c890){_0x1d9299=_0x1d9299-0xdf;const _0x3f6d5b=_0x3f6d();let _0x35a072=_0x3f6d5b[_0x1d9299];return _0x35a072;}import{join}from'path';function _0x3f6d(){const _0x23df46=['cicTw','User\x20(available\x20in\x20all\x20your\x20projects)','includes','11214099lKHXBS','bsMrm','BqxWk','ZKPlY','4sDoHiu','$schema','\x0a📦\x20OpenCode\x20Plugin\x0a','245137prxxdy','42VZTPnK','parse','Where\x20should\x20the\x20plugin\x20be\x20installed?','97410JOPVHx','pluginScope','4457089tbvyGp','4083128ZncuZg','@ranger-testing/opencode-plugin','1529199pZojHe','log','⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.','✓\x20OpenCode\x20plugin\x20already\x20configured','list','jvsCQ','opencode.json','✓\x20OpenCode\x20plugin\x20configured','FPqNr','1497504ooBDKd','wqzPu','user','plugin','10daYEDu','stringify'];_0x3f6d=function(){return _0x23df46;};return _0x3f6d();}import{existsSync}from'fs';import{mkdir,readFile,writeFile}from'fs/promises';import _0x848681 from'inquirer';import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';export async function ensureOpencodePluginConfig(_0x5b5bdd){const _0x257df2=_0x35a0,_0x520621={'BqxWk':function(_0x4a32b1,_0x23ac59){return _0x4a32b1(_0x23ac59);},'pvQsP':function(_0x91dd48,_0xd5f0b1,_0x573521){return _0x91dd48(_0xd5f0b1,_0x573521);},'BGnzO':'project','ZKPlY':_0x257df2(0xfe),'jvsCQ':_0x257df2(0xee),'aRjEV':_0x257df2(0xf2),'bsMrm':_0x257df2(0xe6),'UxQtA':'user','cicTw':'Project\x20(shared\x20with\x20team\x20via\x20git)','kfIzg':function(_0x2d1357,_0x39011a,_0x3f7580){return _0x2d1357(_0x39011a,_0x3f7580);},'sKIpw':_0x257df2(0xf7),'MQcDf':'https://opencode.ai/config.json','wqzPu':_0x257df2(0xfa),'nPZwf':'Failed\x20to\x20read\x20opencode.json','FPqNr':_0x257df2(0xfb),'AknQC':function(_0x6dece6,_0x3c6e49){return _0x6dece6+_0x3c6e49;},'ulXfy':_0x257df2(0xff)},_0x2e72b2=_0x520621[_0x257df2(0xea)](existsSync,_0x520621['pvQsP'](join,getOpencodeConfigDir(_0x520621['BGnzO']),_0x520621[_0x257df2(0xeb)]));let _0x31166e;if(_0x5b5bdd)_0x31166e=_0x5b5bdd;else{if(_0x2e72b2)_0x31166e='project';else{console['log'](_0x520621[_0x257df2(0xfd)]);const _0x514f45=await _0x848681['prompt']([{'type':_0x257df2(0xfc),'name':_0x257df2(0xf4),'message':_0x520621['aRjEV'],'choices':[{'name':_0x520621[_0x257df2(0xe9)],'value':_0x520621['UxQtA']},{'name':_0x520621[_0x257df2(0xe5)],'value':'project'}],'default':_0x257df2(0xe1)}]);_0x31166e=_0x514f45[_0x257df2(0xf4)];}}const _0x5ce59a=_0x520621['kfIzg'](join,getOpencodeConfigDir(_0x31166e),'opencode.json'),_0x141fd7=_0x520621['sKIpw'],_0x559ded=_0x520621['MQcDf'];let _0x53c1d9={};if(_0x520621['BqxWk'](existsSync,_0x5ce59a))try{const _0x11daf0=await readFile(_0x5ce59a,'utf-8');_0x53c1d9=JSON[_0x257df2(0xf1)](_0x11daf0);}catch(_0x4db55f){return console['error'](_0x520621[_0x257df2(0xe0)]),{'configured':![],'scope':_0x31166e,'error':_0x520621['nPZwf'],'details':_0x4db55f};}const _0x7b063c=Array['isArray'](_0x53c1d9[_0x257df2(0xe2)])?_0x53c1d9['plugin']:[];if(_0x7b063c[_0x257df2(0xe7)](_0x141fd7))return console[_0x257df2(0xf9)](_0x520621[_0x257df2(0x100)]),{'configured':![],'scope':_0x31166e};return _0x53c1d9[_0x257df2(0xed)]=_0x53c1d9[_0x257df2(0xed)]||_0x559ded,_0x53c1d9[_0x257df2(0xe2)]=[..._0x7b063c,_0x141fd7],await mkdir(getOpencodeConfigDir(_0x31166e),{'recursive':!![]}),await writeFile(_0x5ce59a,_0x520621['AknQC'](JSON[_0x257df2(0xe4)](_0x53c1d9,null,0x2),'\x0a')),console['log'](_0x520621['ulXfy']),{'configured':!![],'scope':_0x31166e};}
1
+ (function(_0x23a131,_0xd89e3c){const _0x593bd4=_0x57b0,_0x159ae7=_0x23a131();while(!![]){try{const _0x4d93f1=-parseInt(_0x593bd4(0x1d0))/0x1*(parseInt(_0x593bd4(0x1c6))/0x2)+parseInt(_0x593bd4(0x1d9))/0x3+-parseInt(_0x593bd4(0x1c5))/0x4+parseInt(_0x593bd4(0x1bb))/0x5+parseInt(_0x593bd4(0x1b9))/0x6*(-parseInt(_0x593bd4(0x1bf))/0x7)+parseInt(_0x593bd4(0x1cb))/0x8+-parseInt(_0x593bd4(0x1ca))/0x9;if(_0x4d93f1===_0xd89e3c)break;else _0x159ae7['push'](_0x159ae7['shift']());}catch(_0x3574e6){_0x159ae7['push'](_0x159ae7['shift']());}}}(_0x4369,0x9966e));function _0x4369(){const _0x5be2d=['✓\x20OpenCode\x20plugin\x20already\x20configured','246GVMrIo','isArray','5416160mVvkej','Failed\x20to\x20read\x20opencode.json','utf-8','MZGYA','63469qwdAQS','plugin','GWiLG','parse','nJSKY','nyLDH','117504qZdCFo','263470DEQSRa','log','lHUuj','QvIKd','8202753pObfot','716768KFqVzQ','@ranger-testing/opencode-plugin','$schema','⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.','pluginScope','1UPvzLg','WlJeN','opencode.json','error','HTpTF','✓\x20OpenCode\x20plugin\x20configured','HgsYG','project','ftvYc','2699343Ixbkaz','JeioK'];_0x4369=function(){return _0x5be2d;};return _0x4369();}import{join}from'path';function _0x57b0(_0x5447fd,_0x4ea73c){_0x5447fd=_0x5447fd-0x1b7;const _0x436996=_0x4369();let _0x57b0a4=_0x436996[_0x5447fd];return _0x57b0a4;}import{existsSync}from'fs';import{mkdir,readFile,writeFile}from'fs/promises';import _0x7ee401 from'inquirer';import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';export async function ensureOpencodePluginConfig(_0x518129){const _0x1fd011=_0x57b0,_0x515c98={'GWiLG':function(_0x2fd4b5,_0x226ad8){return _0x2fd4b5(_0x226ad8);},'QvIKd':'project','MPrwh':_0x1fd011(0x1d2),'MZGYA':'Where\x20should\x20the\x20plugin\x20be\x20installed?','JeioK':'user','HTpTF':_0x1fd011(0x1cc),'nJSKY':'https://opencode.ai/config.json','lHUuj':function(_0x52083a,_0x116d0f){return _0x52083a(_0x116d0f);},'WlJeN':_0x1fd011(0x1bd),'HgsYG':_0x1fd011(0x1ce),'wDhSv':_0x1fd011(0x1bc),'LMgGF':function(_0x23f5a1,_0xbb6205,_0x2ef7e8){return _0x23f5a1(_0xbb6205,_0x2ef7e8);},'vTHDY':function(_0x324549,_0x33402e){return _0x324549(_0x33402e);},'ftvYc':function(_0x5e89a2,_0x1cdb6e,_0x249ca0){return _0x5e89a2(_0x1cdb6e,_0x249ca0);},'sjVmE':function(_0x3bea21,_0x469cd5){return _0x3bea21+_0x469cd5;},'nyLDH':_0x1fd011(0x1d5)},_0x29ec86=_0x515c98[_0x1fd011(0x1c1)](existsSync,join(_0x515c98[_0x1fd011(0x1c1)](getOpencodeConfigDir,_0x515c98[_0x1fd011(0x1c9)]),_0x515c98['MPrwh']));let _0x3a5e32;if(_0x518129)_0x3a5e32=_0x518129;else{if(_0x29ec86)_0x3a5e32=_0x1fd011(0x1d7);else{console['log']('\x0a📦\x20OpenCode\x20Plugin\x0a');const _0x5f2b82=await _0x7ee401['prompt']([{'type':'list','name':_0x1fd011(0x1cf),'message':_0x515c98[_0x1fd011(0x1be)],'choices':[{'name':'User\x20(available\x20in\x20all\x20your\x20projects)','value':_0x515c98[_0x1fd011(0x1b7)]},{'name':'Project\x20(shared\x20with\x20team\x20via\x20git)','value':'project'}],'default':_0x515c98['JeioK']}]);_0x3a5e32=_0x5f2b82[_0x1fd011(0x1cf)];}}const _0x332a59=join(_0x515c98['GWiLG'](getOpencodeConfigDir,_0x3a5e32),_0x515c98['MPrwh']),_0x1ea16e=_0x515c98[_0x1fd011(0x1d4)],_0x197f12=_0x515c98[_0x1fd011(0x1c3)];let _0x3bc178={};if(_0x515c98[_0x1fd011(0x1c8)](existsSync,_0x332a59))try{const _0x47ff81=await readFile(_0x332a59,_0x515c98[_0x1fd011(0x1d1)]);_0x3bc178=JSON[_0x1fd011(0x1c2)](_0x47ff81);}catch(_0x3ae0cf){return console[_0x1fd011(0x1d3)](_0x515c98[_0x1fd011(0x1d6)]),{'configured':![],'scope':_0x3a5e32,'error':_0x515c98['wDhSv'],'details':_0x3ae0cf};}const _0x281e94=Array[_0x1fd011(0x1ba)](_0x3bc178[_0x1fd011(0x1c0)])?_0x3bc178['plugin']:[];if(_0x281e94['includes'](_0x1ea16e))return console['log'](_0x1fd011(0x1b8)),{'configured':![],'scope':_0x3a5e32};return _0x3bc178[_0x1fd011(0x1cd)]=_0x3bc178['$schema']||_0x197f12,_0x3bc178[_0x1fd011(0x1c0)]=[..._0x281e94,_0x1ea16e],await _0x515c98['LMgGF'](mkdir,_0x515c98['vTHDY'](getOpencodeConfigDir,_0x3a5e32),{'recursive':!![]}),await _0x515c98[_0x1fd011(0x1d8)](writeFile,_0x332a59,_0x515c98['sjVmE'](JSON['stringify'](_0x3bc178,null,0x2),'\x0a')),console[_0x1fd011(0x1c7)](_0x515c98[_0x1fd011(0x1c4)]),{'configured':!![],'scope':_0x3a5e32};}
@@ -1 +1 @@
1
- (function(_0x1fb5ff,_0x10ef82){const _0x2a3801=_0x16ff,_0x26e544=_0x1fb5ff();while(!![]){try{const _0x497705=-parseInt(_0x2a3801(0x100))/0x1*(parseInt(_0x2a3801(0x10f))/0x2)+-parseInt(_0x2a3801(0x129))/0x3+-parseInt(_0x2a3801(0x11b))/0x4*(-parseInt(_0x2a3801(0x12c))/0x5)+parseInt(_0x2a3801(0xf8))/0x6+-parseInt(_0x2a3801(0x12a))/0x7+-parseInt(_0x2a3801(0x127))/0x8*(-parseInt(_0x2a3801(0x10b))/0x9)+-parseInt(_0x2a3801(0x133))/0xa*(-parseInt(_0x2a3801(0x130))/0xb);if(_0x497705===_0x10ef82)break;else _0x26e544['push'](_0x26e544['shift']());}catch(_0x354b2a){_0x26e544['push'](_0x26e544['shift']());}}}(_0x4863,0xaf63c));import{mkdir,readFile,readdir}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{authenticate,ensureRangerDir,ensureChromium,writeRangerGitignore}from'./start.js';function _0x4863(){const _0x10c3a3=['RXRsB','UmRqV','trackPhaseStart','eQwIv','settings.json','lDBTB','chromium','dir_setup','log','profile_activate','\x0a🔧\x20Ranger\x20CI\x20Setup\x0a','12072lMrkuB','gqBGT','4106550zPTqsm','8923236LJeyWl','IddrW','5812405cFkpbO','trailhead','No\x20API\x20token\x20available\x20for\x20decryption','✓\x20Encrypted\x20auth\x20verified\x20(will\x20decrypt\x20at\x20runtime)','154bMulld','join','fmmtP','367390MylLZj','XZXZU','TbAFU','length','plugin','baseUrl','error','cPpLW','Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.','ufxLb','OYcJN','skills','✓\x20Claude\x20Code\x20plugin\x20already\x20installed','success','UkAiS','ixCII','kJpPU','path','.\x20Use\x20--profile\x20to\x20specify\x20which\x20one.','6001008bXtCuu','✓\x20Claude\x20Code\x20plugin\x20installed','ySBHY','myFlD','message','✓\x20Created\x20profile\x20settings:\x20baseUrl=','Failed\x20to\x20add\x20marketplace:','UXVko','3TwUVAx','map','cJdOB','No\x20CI\x20profiles\x20found.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a','auth.json.enc','VHAFT','trackPhaseEnd','✓\x20Auth\x20state\x20found','OHTxS','wzTSE','\x0a✅\x20Ranger\x20CI\x20setup\x20complete!\x0a','5337ILZNQt','Failed\x20to\x20verify\x20encrypted\x20auth\x20for\x20profile\x20\x22','RRCYY','filter','139892RkptzF','project','You\x20can\x20install\x20manually:\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','JVYUO','onlWs','name','HVzei','skipChromium','You\x20can\x20install\x20manually:\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20project','wYtOK','auth','No\x20CI\x20profiles\x20found\x20in\x20.ranger/ci/.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a','4HJtLjg'];_0x4863=function(){return _0x10c3a3;};return _0x4863();}import{skillup}from'./skillup.js';import{getRangerDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';function _0x16ff(_0x4a98d3,_0x433ae6){_0x4a98d3=_0x4a98d3-0xf3;const _0x4863de=_0x4863();let _0x16ff33=_0x4863de[_0x4a98d3];return _0x16ff33;}import{saveSettings}from'./utils/settings.js';import{decrypt}from'./utils/crypto.js';import{getToken}from'./utils/keychain.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';async function findCiProfile(_0x34b2bf){const _0xaaa9cb=_0x16ff,_0x26f8b3={'NeMrx':function(_0x3ff3aa){return _0x3ff3aa();},'gqBGT':function(_0x4036bf,_0x3bc664,_0x58e9d8){return _0x4036bf(_0x3bc664,_0x58e9d8);},'ezjrh':_0xaaa9cb(0x103),'eQwIv':function(_0x4de6b7,_0x4615e8){return _0x4de6b7===_0x4615e8;},'lDBTB':function(_0x161e7a,_0x334c53){return _0x161e7a+_0x334c53;},'OHTxS':_0xaaa9cb(0x11a),'myFlD':'Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.'},_0x310b04=_0x26f8b3['NeMrx'](getRangerDir),_0x458dd9=join(_0x310b04,'ci');if(_0x34b2bf){const _0x343a4c=_0x26f8b3[_0xaaa9cb(0x128)](join,_0x458dd9,_0x34b2bf);return{'name':_0x34b2bf,'path':_0x343a4c};}if(!existsSync(_0x458dd9))throw new Error(_0x26f8b3['ezjrh']+_0xaaa9cb(0x13b));const _0x5a3d9e=await readdir(_0x458dd9,{'withFileTypes':!![]}),_0x19c092=_0x5a3d9e[_0xaaa9cb(0x10e)](_0x42dacd=>_0x42dacd['isDirectory']())[_0xaaa9cb(0x101)](_0x32a46f=>_0x32a46f['name']);if(_0x26f8b3[_0xaaa9cb(0x11f)](_0x19c092[_0xaaa9cb(0x136)],0x0))throw new Error(_0x26f8b3[_0xaaa9cb(0x121)](_0x26f8b3[_0xaaa9cb(0x108)],_0x26f8b3[_0xaaa9cb(0xfb)]));if(_0x19c092[_0xaaa9cb(0x136)]===0x1){const _0x41325f=_0x19c092[0x0];return console[_0xaaa9cb(0x124)]('Auto-detected\x20CI\x20profile:\x20'+_0x41325f),{'name':_0x41325f,'path':join(_0x458dd9,_0x41325f)};}throw new Error('Multiple\x20CI\x20profiles\x20found:\x20'+_0x19c092[_0xaaa9cb(0x131)](',\x20')+_0xaaa9cb(0xf7));}async function installPluginNonInteractive(){const _0x36cdff=_0x16ff,_0x3fa74d={'IddrW':function(_0x481d20,_0x2b67db){return _0x481d20(_0x2b67db);},'UXVko':_0x36cdff(0x13f),'ixCII':'Installing\x20Claude\x20Code\x20plugin\x20(project\x20level)...','VHAFT':_0x36cdff(0x12d),'OYcJN':'✓\x20Marketplace\x20already\x20added','DpGBB':'marketplace','gFKfi':'ranger-testing/trailhead','ieojc':_0x36cdff(0xfe),'TbAFU':_0x36cdff(0x111),'RRCYY':'plugin','vSbfS':'install','wPsVU':'ranger@trailhead','onlWs':'--scope','XXLtt':'Failed\x20to\x20install\x20plugin:','ySBHY':_0x36cdff(0x117),'ufxLb':_0x36cdff(0xf9)},_0x262a88=await _0x3fa74d[_0x36cdff(0x12b)](isPluginInstalled,'ranger@trailhead');if(_0x262a88)return console['log'](_0x3fa74d[_0x36cdff(0xff)]),![];console['log'](_0x3fa74d[_0x36cdff(0xf4)]);const _0x424b0f=await isMarketplaceAdded(_0x3fa74d[_0x36cdff(0x105)]);let _0xcacc58=_0x424b0f;if(_0x424b0f)console[_0x36cdff(0x124)](_0x3fa74d[_0x36cdff(0x13d)]);else{const _0x3ee3a5=await _0x3fa74d['IddrW'](runClaudeCommand,[_0x36cdff(0x137),_0x3fa74d['DpGBB'],'add',_0x3fa74d['gFKfi']]);!_0x3ee3a5['success']?(console['error'](_0x3fa74d['ieojc'],_0x3ee3a5[_0x36cdff(0x139)]),console['log'](_0x3fa74d[_0x36cdff(0x135)])):_0xcacc58=!![];}if(_0xcacc58){const _0x332d03=await runClaudeCommand([_0x3fa74d[_0x36cdff(0x10d)],_0x3fa74d['vSbfS'],_0x3fa74d['wPsVU'],_0x3fa74d[_0x36cdff(0x113)],_0x36cdff(0x110)]);!_0x332d03[_0x36cdff(0x140)]?(console['error'](_0x3fa74d['XXLtt'],_0x332d03[_0x36cdff(0x139)]),console[_0x36cdff(0x124)](_0x3fa74d[_0x36cdff(0xfa)])):console['log'](_0x3fa74d[_0x36cdff(0x13c)]);}return!![];}export async function setupCi(_0x19ce0d,_0x4c1c59,_0x10bfea){const _0x415991=_0x16ff,_0x642f74={'wYtOK':_0x415991(0x119),'fmmtP':function(_0x16f84f,_0x16bae5){return _0x16f84f(_0x16bae5);},'UkAiS':function(_0xd70b64){return _0xd70b64();},'RXRsB':function(_0x36db1b,_0x142361){return _0x36db1b(_0x142361);},'cPpLW':function(_0x41d59,_0x3481f3,_0x182ea7){return _0x41d59(_0x3481f3,_0x182ea7);},'pebBx':'chromium','dKdLd':_0x415991(0x125),'HVzei':function(_0x5baa1c,_0x403e8f,_0x132bb1){return _0x5baa1c(_0x403e8f,_0x132bb1);},'UmRqV':_0x415991(0x120),'JVYUO':function(_0x39551b,_0x46cc58,_0x481a85){return _0x39551b(_0x46cc58,_0x481a85);},'cJdOB':'auth.json','NUBNA':_0x415991(0x104),'wzTSE':_0x415991(0x12e),'kJpPU':_0x415991(0x12f),'XZXZU':function(_0x2574d2,_0x563c42){return _0x2574d2 instanceof _0x563c42;},'VChAe':function(_0x30c34b,_0x4e9123){return _0x30c34b(_0x4e9123);},'TOnJF':_0x415991(0x13e),'rDXjd':_0x415991(0x10a)};console[_0x415991(0x124)](_0x415991(0x126)),_0x10bfea?.['trackPhaseStart'](_0x642f74['wYtOK']),await _0x642f74[_0x415991(0x132)](authenticate,_0x19ce0d),_0x10bfea?.[_0x415991(0x106)](_0x642f74[_0x415991(0x118)]),_0x10bfea?.['trackPhaseStart'](_0x415991(0x123));const {path:_0x1ce6ac,installed:_0x3fb084}=await _0x642f74[_0x415991(0xf3)](ensureRangerDir);await writeRangerGitignore(_0x1ce6ac);const _0x35ac06=join(_0x1ce6ac,'sessions');!_0x642f74[_0x415991(0x11c)](existsSync,_0x35ac06)&&await _0x642f74[_0x415991(0x13a)](mkdir,_0x35ac06,{'recursive':!![]});_0x10bfea?.['trackPhaseEnd'](_0x415991(0x123),{'installed':_0x3fb084}),_0x10bfea?.['trackPhaseStart'](_0x642f74['pebBx']);let _0x4953ff=![];_0x4c1c59?.[_0x415991(0x116)]?console[_0x415991(0x124)]('✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)'):_0x4953ff=await ensureChromium();_0x10bfea?.[_0x415991(0x106)](_0x415991(0x122),{'installed':_0x4953ff,'skipped':!!_0x4c1c59?.['skipChromium']}),_0x10bfea?.[_0x415991(0x11e)](_0x642f74['dKdLd']);const _0x1c80e7=await _0x642f74['fmmtP'](findCiProfile,_0x4c1c59?.['profile']);let _0xd5cd49=![];_0x4c1c59?.['baseUrl']&&(await mkdir(_0x1c80e7['path'],{'recursive':!![]}),await _0x642f74['HVzei'](saveSettings,_0x1c80e7['name'],{'baseUrl':_0x4c1c59[_0x415991(0x138)],'headless':!![]}),console[_0x415991(0x124)](_0x415991(0xfd)+_0x4c1c59[_0x415991(0x138)]),_0xd5cd49=!![]);const _0x42dbe5=join(_0x1c80e7[_0x415991(0xf6)],_0x642f74[_0x415991(0x11d)]);if(!existsSync(_0x42dbe5)&&!_0xd5cd49)throw new Error('CI\x20profile\x20\x22'+_0x1c80e7['name']+'\x22\x20has\x20no\x20settings.json.\x20Use\x20--base-url\x20to\x20configure\x20it.');const _0x500d61=_0x642f74[_0x415991(0x112)](join,_0x1c80e7['path'],_0x642f74[_0x415991(0x102)]),_0x2c9f83=join(_0x1c80e7['path'],_0x642f74['NUBNA']),_0x514a97=_0x642f74['fmmtP'](existsSync,_0x500d61),_0x4b0c1b=_0x642f74[_0x415991(0x11c)](existsSync,_0x2c9f83);if(_0x4b0c1b)try{const _0x2d5b4f=await getToken();if(!_0x2d5b4f)throw new Error(_0x642f74[_0x415991(0x109)]);const _0x42273e=await readFile(_0x2c9f83);_0x642f74[_0x415991(0x115)](decrypt,_0x42273e,_0x2d5b4f),console['log'](_0x642f74[_0x415991(0xf5)]);}catch(_0x2537fd){const _0x28ba59=_0x642f74[_0x415991(0x134)](_0x2537fd,Error)?_0x2537fd[_0x415991(0xfc)]:String(_0x2537fd);throw new Error(_0x415991(0x10c)+_0x1c80e7['name']+'\x22:\x20'+_0x28ba59);}else _0x514a97?console[_0x415991(0x124)](_0x415991(0x107)):console['log']('\x20\x20No\x20auth\x20state\x20found\x20(app\x20may\x20not\x20require\x20authentication)');await _0x642f74['VChAe'](writeActiveProfileName,_0x1c80e7['name']),console[_0x415991(0x124)]('✓\x20Active\x20profile:\x20'+_0x1c80e7[_0x415991(0x114)]),_0x10bfea?.[_0x415991(0x106)](_0x415991(0x125),{'profileName':_0x1c80e7[_0x415991(0x114)],'hasAuth':_0x514a97,'hasEncryptedAuth':_0x4b0c1b,'createdSettings':_0xd5cd49}),_0x10bfea?.['trackPhaseStart']('plugin');const _0x1184b0=await _0x642f74['UkAiS'](installPluginNonInteractive);_0x10bfea?.[_0x415991(0x106)]('plugin',{'installed':_0x1184b0}),_0x10bfea?.['trackPhaseStart'](_0x642f74['TOnJF']),await _0x642f74['fmmtP'](skillup,{'autoInstall':_0x415991(0x110)}),_0x10bfea?.[_0x415991(0x106)](_0x415991(0x13e)),console[_0x415991(0x124)](_0x642f74['rDXjd']);}
1
+ function _0x3d65(){var _0x468a00=['8916000dHqhAq','253040nbqorc','50NUXSXV','9820404xcjshv','CtVkz','2860641neskRh','5679453NtfBxq','gfAIS','error','62984osInLq','5800887WKsmOb','9hehVPF'];_0x3d65=function(){return _0x468a00;};return _0x3d65();}(function(_0x3ddb00,_0x54f687){var _0xcac8ac=_0x27cc,_0xb6e795=_0x3ddb00();while(!![]){try{var _0x45eb11=-parseInt(_0xcac8ac(0x165))/0x1*(parseInt(_0xcac8ac(0x16f))/0x2)+-parseInt(_0xcac8ac(0x16c))/0x3+-parseInt(_0xcac8ac(0x167))/0x4*(parseInt(_0xcac8ac(0x168))/0x5)+parseInt(_0xcac8ac(0x169))/0x6+parseInt(_0xcac8ac(0x16b))/0x7+parseInt(_0xcac8ac(0x166))/0x8+parseInt(_0xcac8ac(0x164))/0x9;if(_0x45eb11===_0x54f687)break;else _0xb6e795['push'](_0xb6e795['shift']());}catch(_0x419b82){_0xb6e795['push'](_0xb6e795['shift']());}}}(_0x3d65,0xf2fbd));function _0x27cc(_0x47bce8,_0x77b4be){_0x47bce8=_0x47bce8-0x164;var _0x3d652a=_0x3d65();var _0x27cc49=_0x3d652a[_0x47bce8];return _0x27cc49;}export async function setupCi(_0x4fa6ad,_0x5d9256,_0x449a5a){var _0x2ec620=_0x27cc,_0x1c96fc={'CtVkz':function(_0x35c5ae,_0x1159c0){return _0x35c5ae+_0x1159c0;},'gfAIS':function(_0x549a07,_0x2a93fc){return _0x549a07+_0x2a93fc;},'NTmdC':'ranger\x20setup\x20--ci\x20writes\x20to\x20the\x20legacy\x20.ranger/ci/\x20tree\x20which\x20is\x20no\x20longer\x20supported.\x0a'};console[_0x2ec620(0x16e)](_0x1c96fc[_0x2ec620(0x16a)](_0x1c96fc[_0x2ec620(0x16d)](_0x1c96fc['CtVkz'](_0x1c96fc['NTmdC'],'\x0a')+'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','\x20\x20ranger\x20profile\x20add\x20<name>\x0a'),'\x0a')+'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a'+'\x20\x20https://docs.ranger.net/main/concepts/profiles'),process['exit'](0x1);}
@@ -1 +1 @@
1
- (function(_0x110155,_0xba47af){const _0x2e2fab=_0x59d5,_0x3779fb=_0x110155();while(!![]){try{const _0x43c1fd=-parseInt(_0x2e2fab(0x104))/0x1*(parseInt(_0x2e2fab(0x10f))/0x2)+parseInt(_0x2e2fab(0x116))/0x3+-parseInt(_0x2e2fab(0x113))/0x4+-parseInt(_0x2e2fab(0x117))/0x5+-parseInt(_0x2e2fab(0x11c))/0x6+parseInt(_0x2e2fab(0xfe))/0x7*(parseInt(_0x2e2fab(0x100))/0x8)+parseInt(_0x2e2fab(0xfa))/0x9;if(_0x43c1fd===_0xba47af)break;else _0x3779fb['push'](_0x3779fb['shift']());}catch(_0x5632a9){_0x3779fb['push'](_0x3779fb['shift']());}}}(_0x570e,0x6026c));import{basename}from'path';import _0x4d3038 from'inquirer';import{getToken}from'./utils/keychain.js';function _0x570e(){const _0x30e98e=['770655pvAPFI','\x20--opencode','isTTY','project-level','To\x20get\x20started:','4547418qoVXQa','MKjYi','/skills/','ENZdn','AWHbu','prompt','ErfHP','Where\x20should\x20skills\x20be\x20installed?','suppressUsage','❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a','split','\x20successfully!\x0a','9720423xKfwoL','\x20skill','\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.','\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli','7qLDoeT','WkzCq','3129784NywopH','\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a','txFaZ','user','31WjEksD','project','claude','To\x20use:','log','warn','Elkhu','iYGxD','\x20\x20Failed\x20to\x20install\x20ranger\x20skill:','\x20\x202.\x20Run:\x20ranger\x20setup','ByKLQ','17972URMOez','\x20<your-api-token>','dKYSx','\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!','1113544BUIsZK','installLevel','\x0a✅\x20Installed\x20','1174656Nahzmr'];_0x570e=function(){return _0x30e98e;};return _0x570e();}import{installSkill}from'./utils/skills.js';import{getCurrentVersion}from'./utils/version.js';import{getClaudeConfigDir,getProjectRoot}from'./utils/claudeConfig.js';function _0x59d5(_0x2b09c5,_0xa5c6b2){_0x2b09c5=_0x2b09c5-0xf3;const _0x570e05=_0x570e();let _0x59d566=_0x570e05[_0x2b09c5];return _0x59d566;}import{getOpencodeConfigDir}from'./utils/opencodeConfig.js';export async function skillup(_0x2b03c4={}){const _0x4dbae9=_0x59d5,_0x4029f3={'gYzhG':'\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a','ErfHP':'3|1|2|4|5|0','dKYSx':'opencode','AWHbu':function(_0x124315,_0x16ef6c){return _0x124315===_0x16ef6c;},'ENZdn':function(_0x2d45ed,_0x83ce96){return _0x2d45ed===_0x83ce96;},'WkzCq':function(_0x4d5744,_0xad5056){return _0x4d5744(_0xad5056);},'MKjYi':_0x4dbae9(0x103),'Elkhu':function(_0x5e70f5){return _0x5e70f5();},'gNMSo':'list','rIVzR':_0x4dbae9(0xf5),'iHWrU':_0x4dbae9(0x105),'iYGxD':function(_0x398680,_0x4b8681,_0xd23939){return _0x398680(_0x4b8681,_0xd23939);},'jdIvk':_0x4dbae9(0x10c),'txFaZ':function(_0x4c6489,_0x30c500){return _0x4c6489>_0x30c500;},'SBnDK':'user-level','ByKLQ':function(_0x28b881,_0x5241c8){return _0x28b881===_0x5241c8;}};console['log'](_0x4029f3['gYzhG']);const _0x9ae306=_0x2b03c4['platform']??_0x4dbae9(0x106),_0x412503=await getToken();if(!_0x412503){const _0x5c5b8d=_0x4029f3[_0x4dbae9(0xf4)][_0x4dbae9(0xf8)]('|');let _0x4b2043=0x0;while(!![]){switch(_0x5c5b8d[_0x4b2043++]){case'0':return;case'1':console[_0x4dbae9(0x108)](_0x4dbae9(0x11b));continue;case'2':console['log'](_0x4dbae9(0xfd));continue;case'3':console[_0x4dbae9(0x108)](_0x4dbae9(0xf7));continue;case'4':console['log'](_0x4dbae9(0x10d)+(_0x9ae306===_0x4029f3['dKYSx']?'\x20--opencode':'')+_0x4dbae9(0x110));continue;case'5':console[_0x4dbae9(0x108)]('\x20\x203.\x20Run:\x20ranger\x20skillup'+(_0x4029f3[_0x4dbae9(0x120)](_0x9ae306,_0x4029f3['dKYSx'])?_0x4dbae9(0x118):'')+'\x0a');continue;}break;}}console[_0x4dbae9(0x108)]('✓\x20Found\x20API\x20token');const _0x5cebcb=getProjectRoot(),_0x13c01e=basename(_0x5cebcb),_0xf7bb90=_0x4029f3[_0x4dbae9(0x11f)](_0x9ae306,_0x4029f3['dKYSx'])?_0x4029f3[_0x4dbae9(0xff)](getOpencodeConfigDir,_0x4029f3[_0x4dbae9(0x11d)])+_0x4dbae9(0x11e):_0x4029f3[_0x4dbae9(0x10a)](getClaudeConfigDir)+_0x4dbae9(0x11e),_0x42544a=_0x9ae306===_0x4029f3[_0x4dbae9(0x111)]?_0x5cebcb+'/.opencode/skills/':_0x5cebcb+'/.claude/skills/',_0x1b3868=process['stdin'][_0x4dbae9(0x119)]&&process['stdout'][_0x4dbae9(0x119)];let _0x546324;if(_0x2b03c4['autoInstall'])_0x546324=_0x2b03c4['autoInstall'];else{if(_0x1b3868){const _0x354f20=await _0x4d3038[_0x4dbae9(0xf3)]([{'type':_0x4029f3['gNMSo'],'name':_0x4dbae9(0x114),'message':_0x4029f3['rIVzR'],'choices':[{'name':'All\x20projects\x20('+_0xf7bb90+')','value':_0x4029f3['MKjYi']},{'name':'This\x20project\x20only\x20('+_0x42544a+')','value':_0x4dbae9(0x105)}]}]);_0x546324=_0x354f20['installLevel'];}else _0x546324=_0x4029f3['iHWrU'],console['log']('Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20('+_0x42544a+')');}let _0x1949ee=0x0;const _0x273e32=getCurrentVersion();console['log']('\x0a📦\x20Installing\x20skills...\x0a');try{const _0x1f6128=await _0x4029f3[_0x4dbae9(0x10b)](installSkill,'ranger',{'cliVersion':_0x273e32,'level':_0x546324,'platform':_0x9ae306});_0x1f6128&&_0x1949ee++;}catch(_0x44d9b2){console[_0x4dbae9(0x109)](_0x4029f3['jdIvk'],_0x44d9b2 instanceof Error?_0x44d9b2['message']:_0x44d9b2);}if(_0x4029f3[_0x4dbae9(0x102)](_0x1949ee,0x0)){const _0x118f00=_0x4029f3[_0x4dbae9(0x11f)](_0x546324,'user')?_0x4029f3['SBnDK']:_0x4dbae9(0x11a);console[_0x4dbae9(0x108)](_0x4dbae9(0x115)+_0x1949ee+'\x20'+_0x118f00+_0x4dbae9(0xfb)+(_0x1949ee>0x1?'s':'')+_0x4dbae9(0xf9)),!_0x2b03c4[_0x4dbae9(0xf6)]&&(console[_0x4dbae9(0x108)](_0x4dbae9(0x107)),_0x4029f3[_0x4dbae9(0x10e)](_0x9ae306,'opencode')?console[_0x4dbae9(0x108)](_0x4dbae9(0xfc)):console[_0x4dbae9(0x108)](_0x4dbae9(0x112)));}else console['log'](_0x4dbae9(0x101));}
1
+ (function(_0x65b464,_0x4f4128){const _0x17d3f7=_0x4e4b,_0x389cb9=_0x65b464();while(!![]){try{const _0x29582a=parseInt(_0x17d3f7(0x1f8))/0x1+parseInt(_0x17d3f7(0x1d0))/0x2*(parseInt(_0x17d3f7(0x1e2))/0x3)+parseInt(_0x17d3f7(0x1d2))/0x4+-parseInt(_0x17d3f7(0x1d6))/0x5+-parseInt(_0x17d3f7(0x1cb))/0x6*(parseInt(_0x17d3f7(0x1cc))/0x7)+parseInt(_0x17d3f7(0x1ea))/0x8+-parseInt(_0x17d3f7(0x1d3))/0x9;if(_0x29582a===_0x4f4128)break;else _0x389cb9['push'](_0x389cb9['shift']());}catch(_0x53b082){_0x389cb9['push'](_0x389cb9['shift']());}}}(_0x508f,0x9ca26));import{basename}from'path';import _0x24dc7d from'inquirer';import{getToken}from'./utils/keychain.js';import{installSkill}from'./utils/skills.js';import{getCurrentVersion}from'./utils/version.js';import{getClaudeConfigDir,getProjectRoot}from'./utils/claudeConfig.js';function _0x508f(){const _0x50939a=['4745872YrAEwn','gCdaw','YVmbM','fTAOc','xFzqU','user','\x20skill','installLevel','\x20--opencode','\x20\x20Failed\x20to\x20install\x20ranger\x20skill:','project','autoInstall','platform','\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.','1100587QxrBqi','\x20successfully!\x0a','split','All\x20projects\x20(','project-level','\x20\x203.\x20Run:\x20ranger\x20skillup','user-level','6FMCFOX','8076285kUYHrw','prompt','zizXr','lrYDu','1882jvCKTK','isTTY','1251068SZjebc','10700739LFteuR','opencode','log','1157365pPEBMr','SOfSI','\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli','stdout','/.claude/skills/','\x20\x202.\x20Run:\x20ranger\x20setup','✓\x20Found\x20API\x20token','\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!','To\x20get\x20started:','losuK','3|1|2|4|5|0','\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a','3855UADbhS','YhhVC','list','WpLIe','Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20(','QBpTw','ZZKRv','To\x20use:'];_0x508f=function(){return _0x50939a;};return _0x508f();}import{getOpencodeConfigDir}from'./utils/opencodeConfig.js';function _0x4e4b(_0x1c4e04,_0x10e4c7){_0x1c4e04=_0x1c4e04-0x1c7;const _0x508f7e=_0x508f();let _0x4e4bbb=_0x508f7e[_0x1c4e04];return _0x4e4bbb;}export async function skillup(_0x32dc83={}){const _0x1f5d20=_0x4e4b,_0x22ab1a={'qnFPQ':_0x1f5d20(0x1e1),'MPHwU':_0x1f5d20(0x1e0),'ZZKRv':_0x1f5d20(0x1de),'AHOaO':'❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a','YgObe':_0x1f5d20(0x1f2),'zizXr':'opencode','fTAOc':_0x1f5d20(0x1dc),'xFzqU':function(_0x1c5d47){return _0x1c5d47();},'lrYDu':function(_0xfe533f,_0x27be03){return _0xfe533f(_0x27be03);},'losuK':_0x1f5d20(0x1e4),'UbVeZ':_0x1f5d20(0x1f1),'lVlyn':'Where\x20should\x20skills\x20be\x20installed?','foPKi':_0x1f5d20(0x1ef),'AnqTB':function(_0x3ba151){return _0x3ba151();},'SOfSI':function(_0x4afb09,_0x3c758c,_0x20e515){return _0x4afb09(_0x3c758c,_0x20e515);},'YVmbM':_0x1f5d20(0x1f3),'gCdaw':function(_0xec4d4a,_0x3e5cd4){return _0xec4d4a===_0x3e5cd4;},'YhhVC':_0x1f5d20(0x1ca),'WpLIe':_0x1f5d20(0x1f7),'QBpTw':'\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a'};console[_0x1f5d20(0x1d5)](_0x22ab1a['qnFPQ']);const _0x3597b1=_0x32dc83[_0x1f5d20(0x1f6)]??'claude',_0x541f5b=await getToken();if(!_0x541f5b){const _0x3b652c=_0x22ab1a['MPHwU'][_0x1f5d20(0x1fa)]('|');let _0x2f50b2=0x0;while(!![]){switch(_0x3b652c[_0x2f50b2++]){case'0':return;case'1':console[_0x1f5d20(0x1d5)](_0x22ab1a[_0x1f5d20(0x1e8)]);continue;case'2':console['log'](_0x1f5d20(0x1d8));continue;case'3':console[_0x1f5d20(0x1d5)](_0x22ab1a['AHOaO']);continue;case'4':console[_0x1f5d20(0x1d5)](_0x1f5d20(0x1db)+(_0x3597b1===_0x1f5d20(0x1d4)?_0x22ab1a['YgObe']:'')+'\x20<your-api-token>');continue;case'5':console[_0x1f5d20(0x1d5)](_0x1f5d20(0x1c9)+(_0x3597b1===_0x22ab1a['zizXr']?_0x1f5d20(0x1f2):'')+'\x0a');continue;}break;}}console['log'](_0x22ab1a[_0x1f5d20(0x1ed)]);const _0x49f478=_0x22ab1a[_0x1f5d20(0x1ee)](getProjectRoot),_0x3475fa=_0x22ab1a[_0x1f5d20(0x1cf)](basename,_0x49f478),_0x4c7641=_0x3597b1===_0x22ab1a[_0x1f5d20(0x1ce)]?getOpencodeConfigDir(_0x1f5d20(0x1ef))+'/skills/':_0x22ab1a['xFzqU'](getClaudeConfigDir)+'/skills/',_0x42897f=_0x3597b1==='opencode'?_0x49f478+'/.opencode/skills/':_0x49f478+_0x1f5d20(0x1da),_0x12c079=process['stdin'][_0x1f5d20(0x1d1)]&&process[_0x1f5d20(0x1d9)][_0x1f5d20(0x1d1)];let _0x2a536c;if(_0x32dc83[_0x1f5d20(0x1f5)])_0x2a536c=_0x32dc83['autoInstall'];else{if(_0x12c079){const _0x2602b4=await _0x24dc7d[_0x1f5d20(0x1cd)]([{'type':_0x22ab1a[_0x1f5d20(0x1df)],'name':_0x22ab1a['UbVeZ'],'message':_0x22ab1a['lVlyn'],'choices':[{'name':_0x1f5d20(0x1c7)+_0x4c7641+')','value':_0x22ab1a['foPKi']},{'name':'This\x20project\x20only\x20('+_0x42897f+')','value':'project'}]}]);_0x2a536c=_0x2602b4['installLevel'];}else _0x2a536c=_0x1f5d20(0x1f4),console['log'](_0x1f5d20(0x1e6)+_0x42897f+')');}let _0x3c6753=0x0;const _0x45c830=_0x22ab1a['AnqTB'](getCurrentVersion);console['log']('\x0a📦\x20Installing\x20skills...\x0a');try{const _0x2d0bb6=await _0x22ab1a[_0x1f5d20(0x1d7)](installSkill,'ranger',{'cliVersion':_0x45c830,'level':_0x2a536c,'platform':_0x3597b1});_0x2d0bb6&&_0x3c6753++;}catch(_0x527c84){console['warn'](_0x22ab1a[_0x1f5d20(0x1ec)],_0x527c84 instanceof Error?_0x527c84['message']:_0x527c84);}if(_0x3c6753>0x0){const _0x38900e=_0x22ab1a[_0x1f5d20(0x1eb)](_0x2a536c,_0x1f5d20(0x1ef))?_0x22ab1a[_0x1f5d20(0x1e3)]:_0x1f5d20(0x1c8);console['log']('\x0a✅\x20Installed\x20'+_0x3c6753+'\x20'+_0x38900e+_0x1f5d20(0x1f0)+(_0x3c6753>0x1?'s':'')+_0x1f5d20(0x1f9)),!_0x32dc83['suppressUsage']&&(console['log'](_0x1f5d20(0x1e9)),_0x3597b1===_0x22ab1a['zizXr']?console[_0x1f5d20(0x1d5)](_0x22ab1a[_0x1f5d20(0x1e5)]):console['log'](_0x1f5d20(0x1dd)));}else console[_0x1f5d20(0x1d5)](_0x22ab1a[_0x1f5d20(0x1e7)]);}
@@ -1 +1 @@
1
- (function(_0x3cbded,_0x18f702){const _0x48e7f1=_0x34bd,_0x56b54c=_0x3cbded();while(!![]){try{const _0x25e0c1=parseInt(_0x48e7f1(0xb6))/0x1+parseInt(_0x48e7f1(0xe0))/0x2*(parseInt(_0x48e7f1(0xa5))/0x3)+-parseInt(_0x48e7f1(0xdf))/0x4+parseInt(_0x48e7f1(0xbb))/0x5+parseInt(_0x48e7f1(0xaf))/0x6*(parseInt(_0x48e7f1(0xcf))/0x7)+parseInt(_0x48e7f1(0xe2))/0x8*(-parseInt(_0x48e7f1(0x9a))/0x9)+-parseInt(_0x48e7f1(0xdd))/0xa*(parseInt(_0x48e7f1(0xd0))/0xb);if(_0x25e0c1===_0x18f702)break;else _0x56b54c['push'](_0x56b54c['shift']());}catch(_0x536256){_0x56b54c['push'](_0x56b54c['shift']());}}}(_0x5243,0xea9b8));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';import _0x14a49 from'inquirer';import{getToken,storeToken}from'./utils/keychain.js';import{getCurrentUser}from'./utils/userApi.js';import{chromium}from'playwright';function _0x5243(){const _0x102791=['Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20','skills','You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:','SAuXB','message','gJZQV','6RInzdt',')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','voDvt','\x0aIn\x20Claude\x20Code,\x20run\x20','xbdli','error','\x0a❌\x20Failed\x20to\x20install\x20Chromium:','1889832bfhEnS','git_check','platform','install','Abemy','1476370nWOAZK','Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20','xfbdL','\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','AUhdt','url','skipChromium','yoKAZ','plugin','playwright@','✓\x20Already\x20authenticated\x20to\x20','BiLcw','BjdBA','No\x20git\x20repository\x20found','wantsProfile','stdin','✓\x20Authenticated\x20to\x20','skipAuth','paaIB','XuYRV','13372121diKrlL','1368037jmrjlQ','No\x20git\x20repository\x20found.\x20Please\x20run\x20`ranger\x20setup`\x20from\x20inside\x20your\x20project\x20directory,\x0a','ranger','The\x20required\x20version\x20(','Make\x20sure\x20your\x20app\x20is\x20running\x20before\x20you\x20start.\x0a','nbesD','npx','\x0aIn\x20order\x20for\x20Ranger\x20to\x20verify\x20your\x20work,\x20you\x27ll\x20need\x20to\x20set\x20up\x20a\x20profile\x20later\x20with:','✓\x20.ranger/\x20directory\x20already\x20exists','✓\x20Local\x20profile\x20already\x20exists','qrJEk','opencode','ranger\x20profile\x20add\x20local','130SYjqAJ','log','6073620WlTuBr','67148mMtYBj','or\x20use\x20--scope\x20user\x20to\x20install\x20at\x20the\x20user\x20level\x20without\x20a\x20project.','256664CfSQbS','.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.','\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','FiVvv','\x0aSkipping\x20profile\x20setup\x20(--skip-auth).\x20Run\x20`ranger\x20setup`\x20with\x20auth\x20to\x20add\x20a\x20profile\x20later.\x0a','trackPhaseStart','CvjmK','trackPhaseEnd','RhuWm','isTTY','ready','trackPhaseError','withDeps','Kidwe','rzRxt','scope','force','\x0a🚀\x20Ranger\x20Setup\x0a','organizationName','✓\x20Skipping\x20authentication\x20(--skip-auth)','chromium','uGdhf','confirm','aqApF','inherit','stdout','success','DQuZB','status','.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.','wKCyc','bzBWi','local','JXDys','207plWxrD','Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20','skipped','user','BWhYW','auth','TlcIl','prompt','\x0aInstalling\x20Chromium\x20browser...\x0a','djUHM','\x20install\x20chromium','66DjyLLz','You\x27ll\x20need\x20the\x20app\x20to\x20be\x20running\x20to\x20set\x20up\x20the\x20profile.','\x20now?','UGoUt'];_0x5243=function(){return _0x102791;};return _0x5243();}import{addEnv}from'./addEnv.js';import{getRangerDir,getRangerHomeDir,findGitRoot}from'./utils/rangerRoot.js';import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{findExistingEnv}from'./utils/settings.js';import{getCurrentVersion}from'./utils/version.js';import{ensureClaudePlugin,ensureClaudeSkills}from'./setup/claude.js';import{ensureOpencodePluginConfig}from'./setup/opencode.js';import{installSkill}from'./utils/skills.js';const require=createRequire(import.meta.url);function _0x34bd(_0x5b2730,_0x236302){_0x5b2730=_0x5b2730-0x85;const _0x524368=_0x5243();let _0x34bdc2=_0x524368[_0x5b2730];return _0x34bdc2;}export const PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION='1.58.2';const bold=_0x49ad42=>'\x1b[1m'+_0x49ad42+'\x1b[0m';export function getPlaywrightVersion(){const _0x1d9ba5={'iSGlC':'playwright/package.json','VKSMG':function(_0x29e086,_0x30aeb6){return _0x29e086(_0x30aeb6);}};try{const _0x1394ff=require['resolve'](_0x1d9ba5['iSGlC']),_0xfce0bc=_0x1d9ba5['VKSMG'](require,_0x1394ff);return _0xfce0bc['version'];}catch{return null;}}export function installChromiumBinary(_0x5df785,_0x3ec58c=![]){const _0x387c45=_0x34bd,_0x4014c5={'LrdzZ':function(_0x596823,_0x36ec1b){return _0x596823===_0x36ec1b;},'Ylplu':'--with-deps','BBGMW':'chromium','yoKAZ':function(_0x2395fb,_0x318cbf,_0x299d22,_0x58ff78){return _0x2395fb(_0x318cbf,_0x299d22,_0x58ff78);},'Abemy':'ignore','eoMzf':_0x387c45(0x90),'RhuWm':function(_0x2314a3,_0x3db73b){return _0x2314a3===_0x3db73b;},'DQuZB':'win32'};return new Promise((_0x592807,_0x44b43f)=>{const _0xf07d38=_0x387c45,_0x58b44f=[_0xf07d38(0xc4)+_0x5df785,_0xf07d38(0xb9),..._0x3ec58c?[_0x4014c5['Ylplu']]:[],_0x4014c5['BBGMW']],_0xbc947c=_0x4014c5[_0xf07d38(0xc2)](spawn,_0xf07d38(0xd6),_0x58b44f,{'stdio':[_0x4014c5[_0xf07d38(0xba)],_0xf07d38(0x90),_0x4014c5['eoMzf']],'shell':_0x4014c5[_0xf07d38(0xea)](process[_0xf07d38(0xb8)],_0x4014c5[_0xf07d38(0x93)])});_0xbc947c['on']('close',_0x503383=>{_0x4014c5['LrdzZ'](_0x503383,0x0)?_0x592807():_0x44b43f(new Error('Installation\x20failed\x20with\x20exit\x20code\x20'+_0x503383));}),_0xbc947c['on']('error',_0x2c0307=>{_0x44b43f(_0x2c0307);});});}export async function authenticate(_0x354002){const _0x4bf6b1=_0x34bd,_0x19d3ba={'NLSSX':function(_0x4d3807,_0x1c56f9){return _0x4d3807(_0x1c56f9);},'UGoUt':function(_0x55f57d,_0x559480){return _0x55f57d instanceof _0x559480;},'djUHM':'device_auth','snDRE':function(_0x127d29,_0x183671){return _0x127d29(_0x183671);},'BWhYW':'✓\x20Exported\x20credentials\x20for\x20CI'};if(!_0x354002){const _0xb52e49=await getToken();if(_0xb52e49){const _0x52976a=await _0x19d3ba['NLSSX'](getCurrentUser,_0xb52e49);if(_0x52976a[_0x4bf6b1(0x92)])return console['log'](_0x4bf6b1(0xc5)+_0x52976a['user'][_0x4bf6b1(0x8a)]),{'token':_0xb52e49,'method':'existing_token'};}try{_0x354002=await runDeviceAuthFlow();}catch(_0x240926){throw new Error('Authentication\x20failed:\x20'+(_0x19d3ba[_0x4bf6b1(0xa8)](_0x240926,Error)?_0x240926[_0x4bf6b1(0xad)]:_0x240926));}const _0x160a69=await getCurrentUser(_0x354002);if(!_0x160a69[_0x4bf6b1(0x92)])throw new Error(_0x4bf6b1(0xbc)+_0x160a69[_0x4bf6b1(0xb4)]);return console['log'](_0x4bf6b1(0xcb)+_0x160a69[_0x4bf6b1(0x9d)][_0x4bf6b1(0x8a)]),{'token':_0x354002,'method':_0x19d3ba[_0x4bf6b1(0xa3)]};}console['log']('Validating\x20API\x20token...');const _0x4f8d5f=await _0x19d3ba['NLSSX'](getCurrentUser,_0x354002);if(!_0x4f8d5f[_0x4bf6b1(0x92)]){if(_0x4f8d5f[_0x4bf6b1(0x94)])throw new Error('Authentication\x20failed:\x20'+_0x4f8d5f[_0x4bf6b1(0xb4)]+_0x4bf6b1(0x95));else throw new Error(_0x4bf6b1(0x9b)+_0x4f8d5f['error']+_0x4bf6b1(0xe3));}return console['log'](_0x4bf6b1(0xcb)+_0x4f8d5f[_0x4bf6b1(0x9d)][_0x4bf6b1(0x8a)]),await _0x19d3ba['snDRE'](storeToken,_0x354002),console['log'](process['env']['GITHUB_ENV']?_0x19d3ba[_0x4bf6b1(0x9e)]:'✓\x20Stored\x20credentials\x20locally'),{'token':_0x354002,'method':'provided_token'};}export async function ensureRangerDir(_0x2067f7){const _0x9118e1=_0x34bd,_0x355c5d={'paaIB':function(_0x2d7d4f){return _0x2d7d4f();},'wKCyc':function(_0x22f3d7,_0x4bebb9,_0x364573){return _0x22f3d7(_0x4bebb9,_0x364573);},'ASFGe':'.ranger','BjdBA':function(_0x50fa9b){return _0x50fa9b();},'TlcIl':'✓\x20Created\x20.ranger/\x20directory'};let _0x592bfd;if(_0x2067f7==='user')_0x592bfd=_0x355c5d[_0x9118e1(0xcd)](getRangerHomeDir);else{const _0x4df03=_0x355c5d['paaIB'](findGitRoot);_0x592bfd=_0x4df03?_0x355c5d[_0x9118e1(0x96)](join,_0x4df03,_0x355c5d['ASFGe']):_0x355c5d[_0x9118e1(0xc7)](getRangerDir);}return!existsSync(_0x592bfd)?(await _0x355c5d[_0x9118e1(0x96)](mkdir,_0x592bfd,{'recursive':!![]}),console[_0x9118e1(0xde)](_0x355c5d[_0x9118e1(0xa0)]),{'path':_0x592bfd,'installed':!![]}):(console['log'](_0x9118e1(0xd8)),{'path':_0x592bfd,'installed':![]});}export async function ensureChromium(_0xfb96a8=![]){const _0x141526=_0x34bd,_0x294d51={'BMBsf':function(_0x2088da,_0x450373){return _0x2088da(_0x450373);},'xfbdL':'✓\x20Playwright\x20Chromium\x20browser\x20found','XfIQs':function(_0x55f170){return _0x55f170();},'avNdZ':_0x141526(0xa2),'bzBWi':_0x141526(0xbe),'IIuRy':_0x141526(0xb5),'tsNGm':function(_0x19d409,_0x38fcab){return _0x19d409 instanceof _0x38fcab;},'JXDys':'You\x20can\x20install\x20it\x20manually\x20by\x20running:','YDDnc':'\x0a⚠\x20Skipping\x20Chromium\x20installation.'};let _0xfae1f2=![];try{const _0xf936b0=chromium['executablePath']();_0xfae1f2=_0x294d51['BMBsf'](existsSync,_0xf936b0);}catch{_0xfae1f2=![];}if(_0xfae1f2)return console['log'](_0x294d51[_0x141526(0xbd)]),![];const _0x530f22=_0x294d51['XfIQs'](getPlaywrightVersion),_0x203450=_0x530f22??PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION,_0x1e3a2d=!_0x530f22,_0x18404a=process[_0x141526(0xca)][_0x141526(0xeb)]&&process[_0x141526(0x91)]['isTTY'];let _0x1ce09b=!![];if(_0x18404a){const {install:_0x2ca713}=await _0x14a49[_0x141526(0xa1)]([{'type':'confirm','name':'install','message':_0x1e3a2d?_0x141526(0xa9)+_0x203450+_0x141526(0xa7):_0x141526(0xd3)+_0x203450+_0x141526(0xb0),'default':!![]}]);_0x1ce09b=_0x2ca713;}else console[_0x141526(0xde)]('\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20'+_0x203450+(_0x1e3a2d?'\x20(fallback\x20version)':'')+'...');if(_0x1ce09b){console['log'](_0x294d51['avNdZ']);try{await installChromiumBinary(_0x203450,_0xfb96a8),console[_0x141526(0xde)](_0x294d51[_0x141526(0x97)]);}catch(_0x408911){console['error'](_0x294d51['IIuRy'],_0x294d51['tsNGm'](_0x408911,Error)?_0x408911['message']:_0x408911),console['log'](_0x294d51[_0x141526(0x99)]),console[_0x141526(0xde)]('\x20\x20npx\x20playwright@'+_0x203450+_0x141526(0xa4));}}else console['log'](_0x294d51['YDDnc']),console[_0x141526(0xde)](_0x141526(0xab)),console['log']('\x20\x20npx\x20playwright@'+_0x203450+_0x141526(0xa4));return!![];}export async function writeRangerGitignore(_0x5040c5){const _0x25963c={'vWfEq':'.gitignore','nWBlX':'✓\x20Created\x20.ranger/.gitignore'},_0x4166ea=join(_0x5040c5,_0x25963c['vWfEq']),_0x3393f5='\x0a\x0a#\x20Ignore\x20local-only\x20directories\x0alocal/\x0asessions/\x0abug-bashes/\x0areports/\x0afeedback-images/\x0a\x0aactive-profile.txt\x0aactive-feature.txt\x0a.gitignore\x0a\x0a#\x20Ignore\x20plaintext\x20auth\x20files\x20(encrypted\x20.enc\x20files\x20are\x20safe\x20to\x20commit)\x0a**/auth.json\x0a';await writeFile(_0x4166ea,_0x3393f5),console['log'](_0x25963c['nWBlX']);}function printProfileSetupLaterInstructions(){const _0x16be80=_0x34bd,_0x578865={'Tcogw':_0x16be80(0xdc),'FrzLC':_0x16be80(0xd4)};console['log'](_0x16be80(0xd7)),console[_0x16be80(0xde)]('\x20\x20'+bold(_0x578865['Tcogw'])),console[_0x16be80(0xde)](_0x578865['FrzLC']);}export async function ensureLocalEnv(_0xb969fa,_0x2322ef){const _0x42cb89=_0x34bd,_0x1b21ae={'smnZA':function(_0x82cc94){return _0x82cc94();},'xbKsb':function(_0x16ced6,_0x583d7,_0x2921e9){return _0x16ced6(_0x583d7,_0x2921e9);},'iwFUB':_0x42cb89(0x98),'yZRTe':'to\x20access\x20your\x20app.\x20If\x20the\x20part\x20of\x20your\x20app\x20you\x20want\x20to\x20test\x20is\x20behind','OrNcc':'auth,\x20you\x20can\x20log\x20in\x20and\x20we\x27ll\x20save\x20the\x20session\x20state\x20for\x20Ranger\x20to','kCXst':'use\x20until\x20the\x20session\x20expires.\x0a','hsPjt':_0x42cb89(0x8e),'wHHfA':_0x42cb89(0xc9),'uGdhf':'Would\x20you\x20like\x20to\x20set\x20up\x20the\x20profile\x20now?','xbdli':function(_0x5969f1){return _0x5969f1();}};if(!_0x1b21ae['smnZA'](findGitRoot))return console['log']('⚠\x20No\x20git\x20repository\x20found.\x20Run\x20`ranger\x20profile\x20add\x20local`\x20from\x20your\x20project\x20directory.'),{'ready':![],'skipped':!![]};const _0x245acc=_0xb969fa?.['scope']===_0x42cb89(0x9d)?_0x1b21ae['smnZA'](getRangerHomeDir):undefined;if(_0x1b21ae['xbKsb'](findExistingEnv,_0x42cb89(0x98),{'locations':[_0x1b21ae['iwFUB']],'rangerDir':_0x245acc}))return console['log'](_0x42cb89(0xd9)),{'ready':!![],'skipped':![]};const _0x339aa8=process[_0x42cb89(0xca)][_0x42cb89(0xeb)]&&process['stdout']['isTTY'];if(_0x339aa8&&!_0xb969fa?.['url']){console[_0x42cb89(0xde)]('\x0aA\x20profile\x20gives\x20Ranger\x27s\x20browser\x20agent\x20information\x20about\x20how'),console[_0x42cb89(0xde)](_0x1b21ae['yZRTe']),console['log'](_0x1b21ae['OrNcc']),console[_0x42cb89(0xde)](_0x1b21ae['kCXst']),console[_0x42cb89(0xde)](_0x42cb89(0xa6));const {wantsProfile:_0x34d828}=await _0x14a49[_0x42cb89(0xa1)]([{'type':_0x1b21ae['hsPjt'],'name':_0x1b21ae['wHHfA'],'message':_0x1b21ae[_0x42cb89(0x8d)],'default':!![]}]);if(!_0x34d828)return _0x1b21ae[_0x42cb89(0xb3)](printProfileSetupLaterInstructions),{'ready':![],'skipped':!![]};}try{return await addEnv(_0x42cb89(0x98),{'url':_0xb969fa?.[_0x42cb89(0xc0)],'force':_0xb969fa?.[_0x42cb89(0x88)],'allowInsecureLocalhost':_0xb969fa?.['allowInsecureLocalhost'],'scope':_0xb969fa?.['scope']},_0x2322ef),{'ready':!![],'skipped':![]};}catch(_0x55cd77){return console[_0x42cb89(0xb4)]('\x0a❌\x20Profile\x20setup\x20failed:',_0x55cd77 instanceof Error?_0x55cd77[_0x42cb89(0xad)]:_0x55cd77),printProfileSetupLaterInstructions(),{'ready':![],'skipped':![]};}}export async function start(_0x30c640,_0x4d267e,_0x50fdb0){const _0x16bb11=_0x34bd,_0x15f6ac={'zlaUY':_0x16bb11(0x89),'FiVvv':'user','pLpHA':function(_0x5f22b2,_0x3b897c){return _0x5f22b2===_0x3b897c;},'voDvt':'git_check','AUhdt':_0x16bb11(0xc8),'rzRxt':function(_0x4529b3,_0x2b4c84){return _0x4529b3+_0x2b4c84;},'pQAMB':_0x16bb11(0xe1),'PLBOV':function(_0x416cbb,_0x171e50){return _0x416cbb(_0x171e50);},'SAuXB':function(_0x554a8d,_0x23b179){return _0x554a8d(_0x23b179);},'BiLcw':_0x16bb11(0x9f),'iAmxY':_0x16bb11(0x8c),'CvjmK':_0x16bb11(0xc3),'uxQKJ':_0x16bb11(0xd2),'XuYRV':'skills','Kidwe':'\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:','SGObZ':'Non-interactive\x20mode:\x20Skipping\x20profile\x20setup.\x20To\x20set\x20up\x20a\x20profile,\x20pass\x20--url\x20or\x20run\x20later:','luwYr':function(_0x26d471,_0x4c5883){return _0x26d471(_0x4c5883);},'qrJEk':'profile','aqApF':'\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)','FwcAE':'and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review','PWyUi':'with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','nbesD':function(_0x5e4d0c,_0x755917){return _0x5e4d0c(_0x755917);},'gJZQV':'/ranger:enable','aulTv':function(_0x5a1237,_0x58789f){return _0x5a1237+_0x58789f;}};console[_0x16bb11(0xde)](_0x15f6ac['zlaUY']);const _0x410b12=process['stdin'][_0x16bb11(0xeb)]&&process[_0x16bb11(0x91)]['isTTY'];!_0x410b12&&!_0x4d267e?.['scope']&&(console['log']('Non-interactive\x20mode:\x20No\x20--scope\x20provided,\x20defaulting\x20to\x20user.'),_0x4d267e={..._0x4d267e,'scope':_0x15f6ac[_0x16bb11(0xe5)]});const _0x47692d=_0x15f6ac['pLpHA'](_0x4d267e?.['scope'],_0x15f6ac[_0x16bb11(0xe5)]);_0x50fdb0?.['trackPhaseStart'](_0x15f6ac[_0x16bb11(0xb1)]);const _0x1ce205=findGitRoot();if(!_0x1ce205&&!_0x47692d){await _0x50fdb0?.[_0x16bb11(0xed)]('git_check',new Error(_0x15f6ac[_0x16bb11(0xbf)]));throw new Error(_0x15f6ac[_0x16bb11(0x86)](_0x16bb11(0xd1),_0x15f6ac['pQAMB']));}_0x50fdb0?.['trackPhaseEnd'](_0x16bb11(0xb7));const _0x3aba9e=!existsSync(getRangerDir()),{path:_0x258783}=await _0x15f6ac['PLBOV'](ensureRangerDir,_0x47692d?_0x15f6ac['FiVvv']:undefined);if(_0x4d267e?.[_0x16bb11(0xcc)])console['log'](_0x16bb11(0x8b)),_0x50fdb0?.['trackPhaseEnd'](_0x16bb11(0x9f),{'isFirstRun':_0x3aba9e,'method':_0x16bb11(0x9c)});else{_0x50fdb0?.['trackPhaseStart'](_0x16bb11(0x9f));const _0x39dce8=await _0x15f6ac[_0x16bb11(0xac)](authenticate,_0x30c640);_0x50fdb0?.['trackPhaseEnd'](_0x15f6ac[_0x16bb11(0xc6)],{'isFirstRun':_0x3aba9e,'method':_0x39dce8['method']});}_0x50fdb0?.[_0x16bb11(0xe7)](_0x15f6ac['iAmxY']);_0x4d267e?.[_0x16bb11(0xc1)]?console[_0x16bb11(0xde)]('✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)'):await ensureChromium(_0x4d267e?.[_0x16bb11(0xee)]);_0x50fdb0?.['trackPhaseEnd']('chromium',{'isFirstRun':_0x3aba9e,'skipped':!!_0x4d267e?.[_0x16bb11(0xc1)]});!_0x47692d&&await _0x15f6ac['SAuXB'](writeRangerGitignore,_0x258783);console[_0x16bb11(0xde)]('\x0a✅\x20Ranger\x20setup\x20complete!\x0a');const _0x255637=_0x4d267e?.[_0x16bb11(0x87)],_0x21fbbc=_0x4d267e?.[_0x16bb11(0xdb)]??![];let _0x326a36=null;_0x21fbbc?(_0x50fdb0?.[_0x16bb11(0xe7)](_0x15f6ac['CvjmK']),_0x326a36=await _0x15f6ac['PLBOV'](ensureOpencodePluginConfig,_0x255637),_0x50fdb0?.['trackPhaseEnd']('plugin',{'isFirstRun':_0x3aba9e,'opencode':!![]})):(_0x50fdb0?.['trackPhaseStart'](_0x15f6ac[_0x16bb11(0xe8)]),await ensureClaudePlugin(_0x255637),_0x50fdb0?.[_0x16bb11(0xe9)](_0x15f6ac['CvjmK'],{'isFirstRun':_0x3aba9e}));if(_0x21fbbc&&_0x326a36){_0x50fdb0?.['trackPhaseStart']('skills');try{await installSkill(_0x15f6ac['uxQKJ'],{'level':_0x326a36[_0x16bb11(0x87)],'cliVersion':getCurrentVersion(),'platform':'opencode'}),_0x50fdb0?.[_0x16bb11(0xe9)](_0x15f6ac[_0x16bb11(0xce)],{'isFirstRun':_0x3aba9e,'opencode':!![]});}catch(_0x8e25f3){console['warn'](_0x15f6ac[_0x16bb11(0x85)],_0x8e25f3 instanceof Error?_0x8e25f3[_0x16bb11(0xad)]:_0x8e25f3),_0x50fdb0?.[_0x16bb11(0xe9)](_0x15f6ac[_0x16bb11(0xce)],{'isFirstRun':_0x3aba9e,'opencode':!![],'failed':!![]});}}else _0x50fdb0?.[_0x16bb11(0xe7)]('skills'),await _0x15f6ac['SAuXB'](ensureClaudeSkills,_0x255637),_0x50fdb0?.['trackPhaseEnd'](_0x16bb11(0xaa),{'isFirstRun':_0x3aba9e});if(_0x4d267e?.['skipAuth'])console[_0x16bb11(0xde)](_0x16bb11(0xe6));else{if(!_0x410b12&&!_0x4d267e?.[_0x16bb11(0xc0)])console[_0x16bb11(0xde)](_0x15f6ac['SGObZ']),console['log']('\x20\x20'+_0x15f6ac['luwYr'](bold,_0x16bb11(0xdc))+'\x0a');else{_0x50fdb0?.['trackPhaseStart'](_0x15f6ac[_0x16bb11(0xda)]);const _0x15927b=await ensureLocalEnv({'url':_0x4d267e?.['url'],'force':_0x4d267e?.[_0x16bb11(0x88)],'allowInsecureLocalhost':_0x4d267e?.['allowInsecureLocalhost'],'scope':_0x4d267e?.['scope']==='user'?_0x15f6ac[_0x16bb11(0xe5)]:undefined},_0x50fdb0);_0x50fdb0?.['trackPhaseEnd'](_0x15f6ac['qrJEk'],{'isFirstRun':_0x3aba9e,'profileReady':_0x15927b['ready'],'userSkipped':_0x15927b[_0x16bb11(0x9c)]}),_0x15927b[_0x16bb11(0xec)]&&console['log']('\x0a✅\x20You\x27re\x20ready\x20to\x20start\x20using\x20Ranger\x20Feature\x20Review.');}}if(_0x21fbbc)console[_0x16bb11(0xde)](_0x15f6ac[_0x16bb11(0x8f)]),console[_0x16bb11(0xde)](_0x15f6ac['FwcAE']),console[_0x16bb11(0xde)](_0x15f6ac['PWyUi']),console[_0x16bb11(0xde)]('verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.');else{const _0x207266=_0x15f6ac[_0x16bb11(0xd5)](bold,_0x15f6ac[_0x16bb11(0xae)]);console[_0x16bb11(0xde)](_0x15f6ac['aulTv'](_0x15f6ac[_0x16bb11(0x86)](_0x16bb11(0xb2)+_0x207266+'\x20and\x20prompt\x20the\x20coding','\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with')+_0x16bb11(0xe4),'\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.'));}}
1
+ const _0x27a0a8=_0x2dda;(function(_0x22ebab,_0x203c45){const _0x41cc45=_0x2dda,_0x22e352=_0x22ebab();while(!![]){try{const _0x2466c6=-parseInt(_0x41cc45(0x19e))/0x1+-parseInt(_0x41cc45(0x160))/0x2+parseInt(_0x41cc45(0x1b6))/0x3+-parseInt(_0x41cc45(0x1b3))/0x4*(parseInt(_0x41cc45(0x15f))/0x5)+-parseInt(_0x41cc45(0x19a))/0x6*(parseInt(_0x41cc45(0x19b))/0x7)+-parseInt(_0x41cc45(0x1ae))/0x8+-parseInt(_0x41cc45(0x17e))/0x9*(-parseInt(_0x41cc45(0x1a1))/0xa);if(_0x2466c6===_0x203c45)break;else _0x22e352['push'](_0x22e352['shift']());}catch(_0x246ac3){_0x22e352['push'](_0x22e352['shift']());}}}(_0x45d6,0x6872c));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';function _0x45d6(){const _0x5bab26=['message','\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','368580mPNRZD','\x0aInstalling\x20Chromium\x20browser...\x0a','\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with','1744380DMxmDK','.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.','\x0a✅\x20Ranger\x20setup\x20complete!\x0a','1.58.2','BzogY','local','platform','npx','You\x20can\x20install\x20it\x20manually\x20by\x20running:','KrMEB','pIxUi','ignore','cMmPu','withDeps','isTTY','scope','...','KcUhy','CQcIZ','executablePath','log','UBXPg','method','xTXCZ','vQZWE','skills','\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20','organizationName','5dOsuiP','1333212gbrCQc','Authentication\x20failed:\x20','with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20','skipAuth','allowInsecureLocalhost','xnuyr','\x20and\x20prompt\x20the\x20coding','uGOVb','✓\x20~/.ranger/\x20directory\x20already\x20exists','version','\x0aSkipping\x20profile\x20setup\x20(--skip-auth).\x20Run\x20`ranger\x20setup`\x20with\x20auth\x20to\x20add\x20a\x20profile\x20later.\x0a','NIToc','FtfKO','\x0a\x20\x20(opens\x20a\x20browser\x20so\x20you\x20can\x20log\x20in\x20once)','✓\x20Created\x20~/.ranger/\x20directory','project-scope\x20setup\x20obsolete).\x20Drop\x20the\x20--scope\x20flag\x20or\x20pass\x20--scope=user.','\x20install\x20chromium','oMJvw','ready','muGyC','and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review','ZLUic','auth','env','Setup\x20always\x20installs\x20at\x20user\x20scope\x20now\x20(cloud\x20profiles\x20make\x20','existing_token','skipChromium','aVmmt','YvhwC','288iNfBcM','\x0a🚀\x20Ranger\x20Setup\x0a','TWsqr','stdin','HckVO','GaLWC','url','mfvPa','skipped','\x0a⚠\x20Skipping\x20Chromium\x20installation.','chromium','HqMDD','\x20\x20npx\x20playwright@','error','OyUfZ','force','KoBhJ','\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','\x20is\x20no\x20longer\x20supported.\x20','gUzgN','/ranger:enable','NYrGR','plugin','NMEwj','hOfbB','verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','trackPhaseEnd','✓\x20Skipping\x20authentication\x20(--skip-auth)','6WdamgL','161091cDQJwt','PPMvh','trackPhaseStart','513372LJEQVL','\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:','teYYV','482280CUIubQ','✓\x20Stored\x20credentials\x20locally','Validating\x20API\x20token...','provided_token','✓\x20Authenticated\x20to\x20','MJwrI','✓\x20Exported\x20credentials\x20for\x20CI','stdout','\x0aIn\x20Claude\x20Code,\x20run\x20','zIwOB','resolve','QwNWS','user','3214400xwWmEG','inherit','SXezM'];_0x45d6=function(){return _0x5bab26;};return _0x45d6();}import{spawn}from'child_process';import _0x2be328 from'inquirer';import{getToken,storeToken}from'./utils/keychain.js';import{getCurrentUser}from'./utils/userApi.js';import{chromium}from'playwright';function _0x2dda(_0x38f59b,_0x315fc9){_0x38f59b=_0x38f59b-0x144;const _0x45d6a5=_0x45d6();let _0x2ddabd=_0x45d6a5[_0x38f59b];return _0x2ddabd;}import{addEnv}from'./addEnv.js';import{getRangerHomeDir,findGitRoot}from'./utils/rangerRoot.js';import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{findExistingEnv}from'./utils/settings.js';import{getCurrentVersion}from'./utils/version.js';import{ensureClaudePlugin,ensureClaudeSkills}from'./setup/claude.js';import{ensureOpencodePluginConfig}from'./setup/opencode.js';import{installSkill}from'./utils/skills.js';const require=createRequire(import.meta.url);export const PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION=_0x27a0a8(0x146);const bold=_0x3088a8=>'\x1b[1m'+_0x3088a8+'\x1b[0m';export function getPlaywrightVersion(){const _0x2af685=_0x27a0a8,_0x108c9e={'QwNWS':function(_0x4360e4,_0x4d0383){return _0x4360e4(_0x4d0383);}};try{const _0x46e20e=require[_0x2af685(0x1ab)]('playwright/package.json'),_0x2bc201=_0x108c9e[_0x2af685(0x1ac)](require,_0x46e20e);return _0x2bc201[_0x2af685(0x16a)];}catch{return null;}}export function installChromiumBinary(_0x1fa076,_0x35719=![]){const _0xf87fe4=_0x27a0a8,_0x1aaaf7={'kvXwS':'install','mfvPa':'--with-deps','lfcip':_0xf87fe4(0x188),'XFrKA':_0xf87fe4(0x1af),'pqgIw':'win32','MJwrI':'close'};return new Promise((_0x57fcdb,_0x568767)=>{const _0x208e4e=_0xf87fe4,_0x43f2fb={'UBXPg':function(_0x1e5cba,_0x5c1b2a){return _0x1e5cba(_0x5c1b2a);}},_0x51d927=['playwright@'+_0x1fa076,_0x1aaaf7['kvXwS'],..._0x35719?[_0x1aaaf7[_0x208e4e(0x185)]]:[],_0x1aaaf7['lfcip']],_0x48bc27=spawn(_0x208e4e(0x14a),_0x51d927,{'stdio':[_0x208e4e(0x14e),_0x1aaaf7['XFrKA'],_0x1aaaf7['XFrKA']],'shell':process[_0x208e4e(0x149)]===_0x1aaaf7['pqgIw']});_0x48bc27['on'](_0x1aaaf7[_0x208e4e(0x1a6)],_0x22796d=>{_0x22796d===0x0?_0x57fcdb():_0x568767(new Error('Installation\x20failed\x20with\x20exit\x20code\x20'+_0x22796d));}),_0x48bc27['on'](_0x208e4e(0x18b),_0x3bd401=>{const _0x331347=_0x208e4e;_0x43f2fb[_0x331347(0x158)](_0x568767,_0x3bd401);});});}export async function authenticate(_0x3b3c9f){const _0x27714c=_0x27a0a8,_0x58ea83={'vQZWE':function(_0x123ebb,_0x829f14){return _0x123ebb(_0x829f14);},'cwhyg':_0x27714c(0x17a),'GaLWC':function(_0x1b3a73){return _0x1b3a73();},'pIxUi':_0x27714c(0x1a3),'oMJvw':_0x27714c(0x1a7),'NYrGR':_0x27714c(0x1a2)};if(!_0x3b3c9f){const _0x5971fb=await getToken();if(_0x5971fb){const _0x4b7690=await _0x58ea83['vQZWE'](getCurrentUser,_0x5971fb);if(_0x4b7690['success'])return console[_0x27714c(0x157)]('✓\x20Already\x20authenticated\x20to\x20'+_0x4b7690[_0x27714c(0x1ad)][_0x27714c(0x15e)]),{'token':_0x5971fb,'method':_0x58ea83['cwhyg']};}try{_0x3b3c9f=await _0x58ea83[_0x27714c(0x183)](runDeviceAuthFlow);}catch(_0x178b96){throw new Error('Authentication\x20failed:\x20'+(_0x178b96 instanceof Error?_0x178b96['message']:_0x178b96));}const _0x3ec634=await _0x58ea83['vQZWE'](getCurrentUser,_0x3b3c9f);if(!_0x3ec634['success'])throw new Error('Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20'+_0x3ec634[_0x27714c(0x18b)]);return console['log']('✓\x20Authenticated\x20to\x20'+_0x3ec634[_0x27714c(0x1ad)]['organizationName']),{'token':_0x3b3c9f,'method':'device_auth'};}console[_0x27714c(0x157)](_0x58ea83[_0x27714c(0x14d)]);const _0x3e7cc4=await _0x58ea83[_0x27714c(0x15b)](getCurrentUser,_0x3b3c9f);if(!_0x3e7cc4['success']){if(_0x3e7cc4['status'])throw new Error(_0x27714c(0x161)+_0x3e7cc4['error']+'.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.');else throw new Error(_0x27714c(0x163)+_0x3e7cc4[_0x27714c(0x18b)]+_0x27714c(0x144));}return console['log'](_0x27714c(0x1a5)+_0x3e7cc4['user'][_0x27714c(0x15e)]),await storeToken(_0x3b3c9f),console['log'](process[_0x27714c(0x178)]['GITHUB_ENV']?_0x58ea83[_0x27714c(0x172)]:_0x58ea83[_0x27714c(0x193)]),{'token':_0x3b3c9f,'method':_0x27714c(0x1a4)};}export async function ensureRangerDir(_0x18220a){const _0x51faab=_0x27a0a8,_0x36d6c3={'MLIIQ':function(_0x28fe6b){return _0x28fe6b();},'KoBhJ':function(_0x2ee799,_0x5c0369){return _0x2ee799(_0x5c0369);},'RDStW':function(_0x44f8ba,_0x33cf4c,_0x2c259a){return _0x44f8ba(_0x33cf4c,_0x2c259a);},'KrMEB':_0x51faab(0x16f)};void _0x18220a;const _0x2ed2dd=_0x36d6c3['MLIIQ'](getRangerHomeDir);return!_0x36d6c3[_0x51faab(0x18e)](existsSync,_0x2ed2dd)?(await _0x36d6c3['RDStW'](mkdir,_0x2ed2dd,{'recursive':!![]}),console[_0x51faab(0x157)](_0x36d6c3[_0x51faab(0x14c)]),{'path':_0x2ed2dd,'installed':!![]}):(console['log'](_0x51faab(0x169)),{'path':_0x2ed2dd,'installed':![]});}export async function ensureChromium(_0x81002b=![]){const _0x5e6c24=_0x27a0a8,_0x52ce12={'HqMDD':'install','sIpqv':_0x5e6c24(0x1b4),'uGOVb':function(_0xb19e51,_0x2563de,_0x326ad9){return _0xb19e51(_0x2563de,_0x326ad9);},'vuSdi':_0x5e6c24(0x18f),'yKEzC':'\x0a❌\x20Failed\x20to\x20install\x20Chromium:','KnbwA':function(_0x33bd34,_0x3737dc){return _0x33bd34 instanceof _0x3737dc;},'OyUfZ':_0x5e6c24(0x187)};let _0x2bb7fb=![];try{const _0x5c9c78=chromium[_0x5e6c24(0x156)]();_0x2bb7fb=existsSync(_0x5c9c78);}catch{_0x2bb7fb=![];}if(_0x2bb7fb)return console[_0x5e6c24(0x157)]('✓\x20Playwright\x20Chromium\x20browser\x20found'),![];const _0x191bd4=getPlaywrightVersion(),_0x10cb17=_0x191bd4??PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION,_0x4deff3=!_0x191bd4,_0x5e255b=process[_0x5e6c24(0x181)][_0x5e6c24(0x151)]&&process[_0x5e6c24(0x1a8)][_0x5e6c24(0x151)];let _0x468e8e=!![];if(_0x5e255b){const {install:_0x51fda4}=await _0x2be328['prompt']([{'type':'confirm','name':_0x52ce12[_0x5e6c24(0x189)],'message':_0x4deff3?'Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20'+_0x10cb17+'\x20now?':'The\x20required\x20version\x20('+_0x10cb17+')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','default':!![]}]);_0x468e8e=_0x51fda4;}else console['log'](_0x5e6c24(0x15d)+_0x10cb17+(_0x4deff3?'\x20(fallback\x20version)':'')+_0x5e6c24(0x153));if(_0x468e8e){console[_0x5e6c24(0x157)](_0x52ce12['sIpqv']);try{await _0x52ce12[_0x5e6c24(0x168)](installChromiumBinary,_0x10cb17,_0x81002b),console['log'](_0x52ce12['vuSdi']);}catch(_0x1effc9){console['error'](_0x52ce12['yKEzC'],_0x52ce12['KnbwA'](_0x1effc9,Error)?_0x1effc9[_0x5e6c24(0x1b1)]:_0x1effc9),console['log'](_0x5e6c24(0x14b)),console['log'](_0x5e6c24(0x18a)+_0x10cb17+_0x5e6c24(0x171));}}else console[_0x5e6c24(0x157)](_0x52ce12[_0x5e6c24(0x18c)]),console[_0x5e6c24(0x157)]('You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:'),console['log'](_0x5e6c24(0x18a)+_0x10cb17+_0x5e6c24(0x171));return!![];}export async function writeRangerGitignore(_0x4bcd44){const _0x3b7410=join(_0x4bcd44,'.gitignore'),_0x59a40b='\x0a\x0a#\x20Ignore\x20local-only\x20directories\x0alocal/\x0asessions/\x0abug-bashes/\x0areports/\x0afeedback-images/\x0a\x0aactive-profile.txt\x0aactive-feature.txt\x0a.gitignore\x0a\x0a#\x20Ignore\x20plaintext\x20auth\x20files\x20(encrypted\x20.enc\x20files\x20are\x20safe\x20to\x20commit)\x0a**/auth.json\x0a';await writeFile(_0x3b7410,_0x59a40b),console['log']('✓\x20Created\x20.ranger/.gitignore');}export async function ensureLocalEnv(_0x383c47,_0x328d5b){const _0x351271=_0x27a0a8,_0x17105e={'zIwOB':function(_0x4b5858){return _0x4b5858();},'zacvJ':function(_0x2d105d,_0x11d24c){return _0x2d105d!==_0x11d24c;},'gDozq':'⚠\x20No\x20git\x20repository\x20found.\x20Re-run\x20with\x20`--scope\x20user`\x20to\x20store\x20the\x20profile\x20at\x20~/.ranger/.','PPMvh':function(_0x27618c,_0x553b81){return _0x27618c===_0x553b81;},'hBURy':'user','gGeEx':'✓\x20Local\x20profile\x20already\x20exists','HckVO':function(_0x4f4c90,_0x4109ad,_0x2c8afe,_0x569987){return _0x4f4c90(_0x4109ad,_0x2c8afe,_0x569987);},'lRKDG':'\x0a❌\x20Profile\x20setup\x20failed:'};if(!_0x17105e[_0x351271(0x1aa)](findGitRoot)&&_0x17105e['zacvJ'](_0x383c47?.[_0x351271(0x152)],_0x351271(0x1ad)))return console['log'](_0x17105e['gDozq']),{'ready':![],'skipped':!![]};const _0x16f287=_0x17105e[_0x351271(0x19c)](_0x383c47?.['scope'],_0x17105e['hBURy'])?_0x17105e['zIwOB'](getRangerHomeDir):undefined;if(findExistingEnv(_0x351271(0x148),{'locations':['local'],'rangerDir':_0x16f287}))return console['log'](_0x17105e['gGeEx']),{'ready':!![],'skipped':![]};try{return await _0x17105e[_0x351271(0x182)](addEnv,_0x351271(0x148),{'url':_0x383c47?.[_0x351271(0x184)],'force':_0x383c47?.[_0x351271(0x18d)],'allowInsecureLocalhost':_0x383c47?.[_0x351271(0x165)],'scope':_0x383c47?.['scope']},_0x328d5b),{'ready':!![],'skipped':![]};}catch(_0x162125){return console[_0x351271(0x18b)](_0x17105e['lRKDG'],_0x162125 instanceof Error?_0x162125[_0x351271(0x1b1)]:_0x162125),{'ready':![],'skipped':![]};}}export async function start(_0x323d2d,_0x14e234,_0x29d63d){const _0x34bc97=_0x27a0a8,_0x4f7700={'KJhzc':_0x34bc97(0x17f),'qqnbT':function(_0xedf07d,_0x46077f){return _0xedf07d!==_0x46077f;},'NIToc':function(_0x1c23b8,_0x4bebcd){return _0x1c23b8+_0x4bebcd;},'gUzgN':function(_0x3e99f9,_0x5d7ac3){return _0x3e99f9+_0x5d7ac3;},'cMmPu':function(_0xa88942,_0x248d92){return _0xa88942(_0x248d92);},'aVmmt':'user','BzogY':function(_0x20bc84,_0x17586a){return _0x20bc84(_0x17586a);},'sAfoF':_0x34bc97(0x199),'YvhwC':_0x34bc97(0x177),'NMEwj':_0x34bc97(0x188),'CQcIZ':_0x34bc97(0x145),'SXezM':_0x34bc97(0x194),'teYYV':function(_0x2680bd,_0x1cdc2d){return _0x2680bd&&_0x1cdc2d;},'uMnuI':function(_0x5cbb56,_0x337911,_0x130857){return _0x5cbb56(_0x337911,_0x130857);},'FtfKO':'ranger','xnuyr':'opencode','muGyC':'skills','ZLUic':function(_0x23f754,_0x44292a){return _0x23f754(_0x44292a);},'hOfbB':_0x34bc97(0x16b),'xTXCZ':'profile','TWsqr':function(_0x40a17f,_0x566807,_0x27962e){return _0x40a17f(_0x566807,_0x27962e);},'NVUQR':'ranger\x20profile\x20add\x20<name>','HWOZF':'\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)','KcUhy':_0x34bc97(0x197),'yugzn':function(_0x498175,_0x2b2afb){return _0x498175+_0x2b2afb;}};console[_0x34bc97(0x157)](_0x4f7700['KJhzc']);_0x14e234?.['scope']!==undefined&&_0x4f7700['qqnbT'](_0x14e234[_0x34bc97(0x152)],'user')&&(console[_0x34bc97(0x18b)](_0x4f7700[_0x34bc97(0x16c)](_0x4f7700[_0x34bc97(0x191)]('ranger\x20setup\x20--scope='+_0x4f7700[_0x34bc97(0x14f)](String,_0x14e234[_0x34bc97(0x152)])+_0x34bc97(0x190),_0x34bc97(0x179)),_0x34bc97(0x170))),process['exit'](0x1));_0x14e234={..._0x14e234,'scope':_0x4f7700[_0x34bc97(0x17c)]};const _0x2899d8=!_0x4f7700[_0x34bc97(0x147)](existsSync,getRangerHomeDir());await ensureRangerDir(_0x34bc97(0x1ad));if(_0x14e234?.[_0x34bc97(0x164)])console[_0x34bc97(0x157)](_0x4f7700['sAfoF']),_0x29d63d?.[_0x34bc97(0x198)](_0x4f7700['YvhwC'],{'isFirstRun':_0x2899d8,'method':_0x34bc97(0x186)});else{_0x29d63d?.['trackPhaseStart'](_0x4f7700[_0x34bc97(0x17d)]);const _0x5f00b6=await authenticate(_0x323d2d);_0x29d63d?.[_0x34bc97(0x198)]('auth',{'isFirstRun':_0x2899d8,'method':_0x5f00b6[_0x34bc97(0x159)]});}_0x29d63d?.['trackPhaseStart'](_0x4f7700[_0x34bc97(0x195)]);_0x14e234?.[_0x34bc97(0x17b)]?console['log']('✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)'):await _0x4f7700[_0x34bc97(0x14f)](ensureChromium,_0x14e234?.[_0x34bc97(0x150)]);_0x29d63d?.['trackPhaseEnd'](_0x34bc97(0x188),{'isFirstRun':_0x2899d8,'skipped':!!_0x14e234?.['skipChromium']}),console['log'](_0x4f7700[_0x34bc97(0x155)]);const _0x2d3b91=_0x14e234?.[_0x34bc97(0x152)],_0x555245=_0x14e234?.['opencode']??![];let _0x3ae0f4=null;_0x555245?(_0x29d63d?.['trackPhaseStart'](_0x4f7700['SXezM']),_0x3ae0f4=await ensureOpencodePluginConfig(_0x2d3b91),_0x29d63d?.['trackPhaseEnd'](_0x4f7700[_0x34bc97(0x1b0)],{'isFirstRun':_0x2899d8,'opencode':!![]})):(_0x29d63d?.['trackPhaseStart'](_0x4f7700['SXezM']),await ensureClaudePlugin(_0x2d3b91),_0x29d63d?.['trackPhaseEnd'](_0x4f7700['SXezM'],{'isFirstRun':_0x2899d8}));if(_0x4f7700[_0x34bc97(0x1a0)](_0x555245,_0x3ae0f4)){_0x29d63d?.[_0x34bc97(0x19d)]('skills');try{await _0x4f7700['uMnuI'](installSkill,_0x4f7700[_0x34bc97(0x16d)],{'level':_0x3ae0f4[_0x34bc97(0x152)],'cliVersion':getCurrentVersion(),'platform':_0x4f7700[_0x34bc97(0x166)]}),_0x29d63d?.['trackPhaseEnd'](_0x34bc97(0x15c),{'isFirstRun':_0x2899d8,'opencode':!![]});}catch(_0x54010c){console['warn'](_0x34bc97(0x19f),_0x54010c instanceof Error?_0x54010c['message']:_0x54010c),_0x29d63d?.[_0x34bc97(0x198)](_0x4f7700[_0x34bc97(0x174)],{'isFirstRun':_0x2899d8,'opencode':!![],'failed':!![]});}}else _0x29d63d?.[_0x34bc97(0x19d)](_0x4f7700['muGyC']),await _0x4f7700[_0x34bc97(0x176)](ensureClaudeSkills,_0x2d3b91),_0x29d63d?.['trackPhaseEnd']('skills',{'isFirstRun':_0x2899d8});if(_0x14e234?.[_0x34bc97(0x164)])console['log'](_0x4f7700[_0x34bc97(0x196)]);else{if(_0x14e234?.['url']){_0x29d63d?.['trackPhaseStart'](_0x4f7700[_0x34bc97(0x15a)]);const _0x1ca9fa=await _0x4f7700[_0x34bc97(0x180)](ensureLocalEnv,{'url':_0x14e234[_0x34bc97(0x184)],'force':_0x14e234?.[_0x34bc97(0x18d)],'allowInsecureLocalhost':_0x14e234?.['allowInsecureLocalhost'],'scope':'user'},_0x29d63d);_0x29d63d?.['trackPhaseEnd'](_0x4f7700[_0x34bc97(0x15a)],{'isFirstRun':_0x2899d8,'profileReady':_0x1ca9fa[_0x34bc97(0x173)],'userSkipped':_0x1ca9fa['skipped']});}else console[_0x34bc97(0x157)](_0x4f7700['NIToc'](_0x4f7700['NIToc']('\x0aTo\x20set\x20up\x20a\x20profile\x20for\x20your\x20app,\x20run:','\x0a\x20\x20'+_0x4f7700[_0x34bc97(0x14f)](bold,_0x4f7700['NVUQR']))+_0x34bc97(0x16e)+'\x0a\x0aFor\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:','\x0a\x20\x20https://docs.ranger.net/main/concepts/profiles'));}if(_0x555245)console[_0x34bc97(0x157)](_0x4f7700['HWOZF']),console[_0x34bc97(0x157)](_0x34bc97(0x175)),console['log'](_0x34bc97(0x162)),console[_0x34bc97(0x157)](_0x4f7700[_0x34bc97(0x154)]);else{const _0x3392d9=bold(_0x34bc97(0x192));console['log'](_0x4f7700['yugzn'](_0x4f7700[_0x34bc97(0x191)](_0x4f7700['yugzn'](_0x34bc97(0x1a9)+_0x3392d9+_0x34bc97(0x167),_0x34bc97(0x1b5)),_0x34bc97(0x1b2)),'\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.'));}}
@@ -1 +1 @@
1
- (function(_0x537051,_0x4878f7){const _0x5790ee=_0x37c5,_0x28b3f5=_0x537051();while(!![]){try{const _0x2921b4=parseInt(_0x5790ee(0x1f7))/0x1*(parseInt(_0x5790ee(0x20d))/0x2)+parseInt(_0x5790ee(0x20a))/0x3*(parseInt(_0x5790ee(0x201))/0x4)+parseInt(_0x5790ee(0x1f4))/0x5+parseInt(_0x5790ee(0x229))/0x6*(-parseInt(_0x5790ee(0x22e))/0x7)+parseInt(_0x5790ee(0x221))/0x8+parseInt(_0x5790ee(0x206))/0x9+-parseInt(_0x5790ee(0x224))/0xa;if(_0x2921b4===_0x4878f7)break;else _0x28b3f5['push'](_0x28b3f5['shift']());}catch(_0x50b440){_0x28b3f5['push'](_0x28b3f5['shift']());}}}(_0x3a50,0xac8e1));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';import{getEnvNames}from'./env.js';import{getCurrentUser}from'./utils/userApi.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getEnvDir}from'./utils/settings.js';function _0x3a50(){const _0x1bdbdc=['version','stderr','FlHAu','zbwfa','plugin','\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.','settingsPath','\x20(up\x20to\x20date)','plaintext','\x20\x20Not\x20configured','\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a','\x20plugin(s)\x20configured','user','gWKBH','@ranger-testing/opencode-plugin','match','disabled','myegE','data','hasEncryptedAuth','close','\x0a---\x20Profiles\x20---','\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available','lwEdD','pCsns','Version:\x20','not_installed','999795ciIgzJ','encrypted','\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>','97aoLKYT','auth.json.enc','\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20','string','configured','API\x20Token:\x20✗\x20Not\x20found','\x20\x20Run:\x20ranger\x20update','wytNO','isDirectory','details','2198080olFsnf','\x20(active)','name','oENQq','map','11730852RwHXLp','join','oqELa','RTIiU','3sBHldg','tmUbv','Organization:\x20','10882pppVtv','\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','status','utf-8','\x0a\x20\x20No\x20active\x20profile\x20set','\x20\x20\x20\x20Auth:\x20','\x0a---\x20Claude\x20Code\x20Plugin\x20---','toString','\x20\x20Run:\x20ranger\x20setup\x20[token]','\x20\x20Not\x20installed','error','qQYbB','mzetZ','ranger@trailhead','filter','\x0a---\x20Skills\x20---','path','length','\x20\x20Run:\x20ranger\x20skillup','dAGsz','9402896KlhORc','ezBHa','\x0a---\x20OpenCode\x20Plugin\x20---','17974150aPrGYV','project','BbXkd','emEoD','Root:\x20','2503692irGwNH','push','includes','FiOJv','hasPlaintextAuth','21nTmijG','trim','ignore','some','log','cwd','SKILL.md','enabled','parse'];_0x3a50=function(){return _0x1bdbdc;};return _0x3a50();}import{getPluginInfo}from'./utils/claudePlugin.js';import{RANGER_MANAGED_SKILLS}from'./utils/skills.js';import{spawn}from'child_process';const bold=_0x452fcb=>'\x1b[1m'+_0x452fcb+'\x1b[0m',link=(_0x4ff34c,_0x346289)=>'\x1b]8;;file://'+_0x4ff34c+'\x07'+(_0x346289||_0x4ff34c)+'\x1b]8;;\x07';async function getOpencodePluginStatus(){const _0x1eec7e=_0x37c5,_0x3f013e={'zdFMs':_0x1eec7e(0x1f3),'KEakM':'configured','oQJKb':function(_0x4f1e5d,_0x3d9857){return _0x4f1e5d>_0x3d9857;},'zbwfa':function(_0x1ff95d,_0x5c3870){return _0x1ff95d(_0x5c3870);},'qQYbB':'not_configured','BbXkd':function(_0x1cf536,_0x38f378,_0x16b90f,_0x160821){return _0x1cf536(_0x38f378,_0x16b90f,_0x160821);},'bdGdQ':'opencode','tmUbv':'config','clWAp':'pipe','hRdzK':_0x1eec7e(0x217)};return new Promise(_0x57343a=>{const _0x167c92=_0x1eec7e,_0x4c5325={'BLZvd':function(_0x5e9332,_0x281952){return _0x5e9332(_0x281952);},'FiOJv':_0x3f013e['zdFMs']},_0x1b4959=_0x3f013e[_0x167c92(0x226)](spawn,_0x3f013e['bdGdQ'],['debug',_0x3f013e[_0x167c92(0x20b)]],{'stdio':[_0x167c92(0x230),_0x3f013e['clWAp'],'pipe']});let _0x5c1169='';_0x1b4959['stdout']?.['on'](_0x167c92(0x1eb),_0x5589ea=>{const _0x328280=_0x167c92;_0x5c1169+=_0x5589ea[_0x328280(0x214)]();}),_0x1b4959[_0x167c92(0x1da)]?.['on']('data',_0x41abae=>{const _0x839a8e=_0x167c92;_0x5c1169+=_0x41abae[_0x839a8e(0x214)]();}),_0x1b4959['on'](_0x3f013e['hRdzK'],()=>{const _0x5e1cb0=_0x167c92;_0x4c5325['BLZvd'](_0x57343a,{'status':_0x4c5325[_0x5e1cb0(0x22c)]});}),_0x1b4959['on'](_0x167c92(0x1ed),_0x20e0b1=>{const _0x32bb05=_0x167c92,_0x57cb9e={'FlHAu':'opencode-plugin'};if(_0x20e0b1!==0x0){_0x57343a({'status':_0x3f013e['zdFMs']});return;}const _0x414339=_0x5c1169[_0x32bb05(0x22f)]();let _0x4e8e47=null;if(_0x414339)try{_0x4e8e47=JSON[_0x32bb05(0x1d8)](_0x414339);}catch{const _0x58d596=_0x414339['match'](/\{[\s\S]*\}$/);if(_0x58d596)try{_0x4e8e47=JSON[_0x32bb05(0x1d8)](_0x58d596[0x0]);}catch{_0x4e8e47=null;}}const _0x168d16=Array['isArray'](_0x4e8e47?.[_0x32bb05(0x1dd)])?_0x4e8e47?.['plugin']:[],_0x54fbe5=_0x168d16[_0x32bb05(0x1d3)](_0x3ae68b=>{const _0x3a0c41=_0x32bb05;if(typeof _0x3ae68b!==_0x3a0c41(0x1fa))return![];return _0x3ae68b[_0x3a0c41(0x22b)]('@ranger-testing/opencode-plugin')||_0x3ae68b['includes'](_0x57cb9e[_0x3a0c41(0x1db)]);});if(_0x54fbe5){_0x57343a({'status':_0x3f013e['KEakM'],'details':_0x168d16['length']>0x0?_0x168d16[_0x32bb05(0x21e)]+_0x32bb05(0x1e4):undefined});return;}if(_0x3f013e['oQJKb'](_0x168d16[_0x32bb05(0x21e)],0x0)){_0x3f013e[_0x32bb05(0x1dc)](_0x57343a,{'status':_0x3f013e[_0x32bb05(0x218)],'details':_0x168d16['length']+_0x32bb05(0x1e4)});return;}_0x57343a({'status':_0x3f013e['qQYbB']});});});}async function getSkillsFromDir(_0x4e6ba0,_0x24132e){const _0x16b6ef=_0x37c5,_0x35101d={'FAqZX':function(_0x5b661e,_0x52773c,_0x19c319){return _0x5b661e(_0x52773c,_0x19c319);},'emEoD':_0x16b6ef(0x1d6),'GmTQp':function(_0x2580d3,_0x448b09){return _0x2580d3(_0x448b09);},'ALUIW':_0x16b6ef(0x210)};if(!existsSync(_0x4e6ba0))return[];const _0x231a92=[];try{const _0x4892a0=await _0x35101d['FAqZX'](readdir,_0x4e6ba0,{'withFileTypes':!![]});for(const _0x2edcf0 of _0x4892a0){if(_0x2edcf0[_0x16b6ef(0x1ff)]()){const _0x24d41d=join(_0x4e6ba0,_0x2edcf0[_0x16b6ef(0x203)],_0x35101d[_0x16b6ef(0x227)]);if(_0x35101d['GmTQp'](existsSync,_0x24d41d)){let _0x16ddea=_0x2edcf0['name'];try{const _0x317ced=await readFile(_0x24d41d,_0x35101d['ALUIW']),_0x4ca668=_0x317ced[_0x16b6ef(0x1e8)](/name:\s*(.+)/);_0x4ca668&&(_0x16ddea=_0x4ca668[0x1]['trim']());}catch{}_0x231a92[_0x16b6ef(0x22a)]({'name':_0x2edcf0[_0x16b6ef(0x203)],'displayName':_0x16ddea,'path':_0x24d41d,'level':_0x24132e});}}}}catch{return[];}return _0x231a92;}async function getInstalledSkills(){const _0x5d2069=_0x37c5,_0x145922={'FGxon':function(_0x3d312b,_0x1fffd5,_0xa88787){return _0x3d312b(_0x1fffd5,_0xa88787);},'ResuV':_0x5d2069(0x225),'oqELa':function(_0x5d9bee){return _0x5d9bee();}},[_0x21b357,_0x905514]=await Promise['all']([_0x145922['FGxon'](getSkillsFromDir,getProjectSkillsDir(),_0x145922['ResuV']),getSkillsFromDir(_0x145922[_0x5d2069(0x208)](getUserSkillsDir),_0x5d2069(0x1e5))]);return{'project':_0x21b357,'user':_0x905514};}async function getEnvironments(){const _0x2daaa9=_0x37c5,_0x438b5c={'dAGsz':function(_0x4be23c,_0x423f63,_0x3e5818){return _0x4be23c(_0x423f63,_0x3e5818);},'LELqk':'auth.json','nBZzz':'(not\x20found)','ezBHa':function(_0x40ac10){return _0x40ac10();},'EnwkB':function(_0x18235f){return _0x18235f();}},{envNames:_0x57f4fe,activeEnv:_0x3e0bd7}=await _0x438b5c[_0x2daaa9(0x222)](getEnvNames),_0x3b489c=_0x438b5c['EnwkB'](getRangerDir);if(!existsSync(_0x3b489c))return{'envs':[],'activeEnv':null};const _0x222ce0=_0x57f4fe['map'](_0x4703d6=>{const _0x68f36f=_0x2daaa9,_0x2b53c2=getEnvDir(_0x4703d6),_0x5e6add=join(_0x2b53c2,'settings.json'),_0x1f55f1=_0x438b5c[_0x68f36f(0x220)](join,_0x2b53c2,_0x438b5c['LELqk']),_0x89a4f5=join(_0x2b53c2,_0x68f36f(0x1f8));return{'name':_0x4703d6,'settingsPath':existsSync(_0x5e6add)?_0x5e6add:_0x438b5c['nBZzz'],'hasPlaintextAuth':existsSync(_0x1f55f1),'hasEncryptedAuth':existsSync(_0x89a4f5),'isActive':_0x4703d6===_0x3e0bd7};});return{'envs':_0x222ce0,'activeEnv':_0x3e0bd7};}function _0x37c5(_0x1a5327,_0x47f8c3){_0x1a5327=_0x1a5327-0x1d3;const _0x3a50db=_0x3a50();let _0x37c581=_0x3a50db[_0x1a5327];return _0x37c581;}export async function status(){const _0x327f24=_0x37c5,_0x41b1d5={'mzetZ':function(_0x2b3f44){return _0x2b3f44();},'wytNO':function(_0x2071a1,_0x116fc7){return _0x2071a1(_0x116fc7);},'dGOKj':function(_0x58ced4,_0x4fe732,_0x4dc6d0){return _0x58ced4(_0x4fe732,_0x4dc6d0);},'lwEdD':function(_0x433499,_0x2150a1){return _0x433499(_0x2150a1);},'pCsns':function(_0x4e5f71,_0x52ccc0){return _0x4e5f71===_0x52ccc0;},'YGOwj':_0x327f24(0x1fb),'kmnma':_0x327f24(0x1e2),'oENQq':'\x20\x20Run:\x20ranger\x20setup\x20--opencode','kdIFN':'ranger@trailhead','UAlXo':'unknown','uRNAz':_0x327f24(0x1e9),'RTIiU':function(_0x10b5c5,_0x48f533){return _0x10b5c5(_0x48f533);},'myegE':function(_0x522fa3){return _0x522fa3();},'rxGnz':function(_0x446417,_0x5aea8f){return _0x446417>_0x5aea8f;},'VudzM':'\x20\x20Project-level:','cSXIk':function(_0x49a660,_0x1eed77){return _0x49a660(_0x1eed77);},'gWKBH':function(_0x1079e9,_0x5cf078,_0xa09b5f){return _0x1079e9(_0x5cf078,_0xa09b5f);},'pydOh':_0x327f24(0x202),'OaaNw':_0x327f24(0x1e1),'raeYY':'none'};console[_0x327f24(0x1d4)]('\x0a📊\x20Ranger\x20Status\x0a');const _0x32c432=process[_0x327f24(0x1d5)](),_0x3979ef=_0x41b1d5['mzetZ'](getRangerDir);if(!existsSync(_0x3979ef)){console[_0x327f24(0x1d4)]('Root:\x20'+link(_0x32c432,bold(_0x41b1d5['wytNO'](basename,_0x32c432)))),console['log'](_0x327f24(0x1de)),console['log'](_0x327f24(0x1e3));return;}console['log'](_0x327f24(0x228)+_0x41b1d5['dGOKj'](link,_0x32c432,_0x41b1d5[_0x327f24(0x1fe)](bold,_0x41b1d5[_0x327f24(0x1f0)](basename,_0x32c432))));const _0x4c8f34=_0x41b1d5[_0x327f24(0x219)](getCurrentVersion),_0x3c6b2e=getLatestVersion();if(_0x3c6b2e[_0x327f24(0x1d9)]&&_0x3c6b2e['version']!==_0x4c8f34)console[_0x327f24(0x1d4)](_0x327f24(0x1f2)+_0x4c8f34+'\x20(latest:\x20'+_0x3c6b2e['version']+')'),console[_0x327f24(0x1d4)](_0x327f24(0x1fd));else _0x3c6b2e['version']?console['log'](_0x327f24(0x1f2)+_0x4c8f34+_0x327f24(0x1e0)):console['log']('Version:\x20'+_0x4c8f34);const _0x23d463=await getToken();if(_0x23d463){const _0x4b664f=await getCurrentUser(_0x23d463);_0x4b664f['success']?console['log'](_0x327f24(0x20c)+bold(_0x4b664f['user']['organizationName'])):(console['log']('API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired'),console[_0x327f24(0x1d4)]('\x20\x20Run:\x20ranger\x20setup\x20[token]'));}else console['log'](_0x327f24(0x1fc)),console['log'](_0x327f24(0x215));process['env']['DEBUG']&&(console['log']('API\x20Environment:\x20'+getCurrentEnvironment()),console['log']('API\x20URL:\x20'+getApiBaseUrl()));console['log'](_0x327f24(0x223));const _0x357bfd=await getOpencodePluginStatus();if(_0x41b1d5[_0x327f24(0x1f1)](_0x357bfd[_0x327f24(0x20f)],_0x41b1d5['YGOwj']))console[_0x327f24(0x1d4)]('\x20\x20'+bold(_0x327f24(0x1e7))+':\x20configured'),_0x357bfd[_0x327f24(0x200)]&&console[_0x327f24(0x1d4)]('\x20\x20'+_0x357bfd['details']);else _0x41b1d5['pCsns'](_0x357bfd['status'],'not_configured')?(console['log'](_0x41b1d5['kmnma']),_0x357bfd[_0x327f24(0x200)]&&console[_0x327f24(0x1d4)]('\x20\x20'+_0x357bfd['details']),console['log'](_0x41b1d5[_0x327f24(0x204)])):console[_0x327f24(0x1d4)](_0x327f24(0x1ef));console[_0x327f24(0x1d4)](_0x327f24(0x213));const _0x567c79=await getPluginInfo(_0x41b1d5['kdIFN']);if(_0x567c79){const _0xa5748f=_0x567c79['scope']||_0x41b1d5['UAlXo'],_0x112d2a=_0x567c79[_0x327f24(0x1d7)]?'enabled':_0x41b1d5['uRNAz'];console['log']('\x20\x20'+_0x41b1d5[_0x327f24(0x209)](bold,_0x327f24(0x21a))+':\x20installed\x20('+_0xa5748f+',\x20'+_0x112d2a+')');}else console[_0x327f24(0x1d4)](_0x327f24(0x216)),console['log'](_0x327f24(0x20e));console['log'](_0x327f24(0x21c));const {project:_0x527f95,user:_0xb6eacb}=await _0x41b1d5[_0x327f24(0x1ea)](getInstalledSkills),_0x176392=_0x527f95['filter'](_0x130141=>RANGER_MANAGED_SKILLS[_0x327f24(0x22b)](_0x130141['name'])),_0x1b2c20=_0xb6eacb[_0x327f24(0x21b)](_0xd1959c=>RANGER_MANAGED_SKILLS[_0x327f24(0x22b)](_0xd1959c[_0x327f24(0x203)])),_0xd70cd3=_0x176392[_0x327f24(0x21e)]+_0x1b2c20['length'];if(_0xd70cd3===0x0)console['log']('No\x20skills\x20installed'),console[_0x327f24(0x1d4)](_0x327f24(0x21f));else{if(_0x41b1d5['rxGnz'](_0x176392['length'],0x0)){console[_0x327f24(0x1d4)](_0x41b1d5['VudzM']);for(const _0x2ea72b of _0x176392){console['log']('\x20\x20\x20\x20'+_0x41b1d5['cSXIk'](bold,_0x2ea72b['displayName'])+':\x20'+link(_0x2ea72b['path'],_0x41b1d5[_0x327f24(0x209)](basename,_0x2ea72b[_0x327f24(0x21d)])));}}if(_0x1b2c20['length']>0x0){console['log']('\x20\x20User-level:');for(const _0x209bdd of _0x1b2c20){console['log']('\x20\x20\x20\x20'+bold(_0x209bdd['displayName'])+':\x20'+_0x41b1d5[_0x327f24(0x1e6)](link,_0x209bdd['path'],basename(_0x209bdd['path'])));}}}console['log'](_0x327f24(0x1ee));const {envs:_0x1fdecc,activeEnv:_0x3d5bf7}=await getEnvironments();if(_0x41b1d5[_0x327f24(0x1f1)](_0x1fdecc[_0x327f24(0x21e)],0x0))console['log']('No\x20profiles\x20configured'),console['log'](_0x327f24(0x1f6));else{for(const _0x2ae0c3 of _0x1fdecc){const _0x2529e7=_0x2ae0c3['isActive']?_0x41b1d5['pydOh']:'',_0x4dce2f=_0x2ae0c3[_0x327f24(0x1ec)]?_0x327f24(0x1f5):_0x2ae0c3[_0x327f24(0x22d)]?_0x41b1d5['OaaNw']:_0x41b1d5['raeYY'];console['log']('\x20\x20'+bold(_0x2ae0c3['name'])+_0x2529e7),console[_0x327f24(0x1d4)](_0x327f24(0x212)+_0x4dce2f),_0x2ae0c3[_0x327f24(0x1df)]!=='(not\x20found)'&&console['log']('\x20\x20\x20\x20Settings:\x20'+link(_0x2ae0c3[_0x327f24(0x1df)],basename(_0x2ae0c3[_0x327f24(0x1df)])));}!_0x3d5bf7&&(console[_0x327f24(0x1d4)](_0x327f24(0x211)),console['log'](_0x327f24(0x1f9)+_0x1fdecc[_0x327f24(0x205)](_0x439628=>_0x439628[_0x327f24(0x203)])[_0x327f24(0x207)](',\x20')+')'));}console[_0x327f24(0x1d4)]('');}
1
+ (function(_0x3dc174,_0x24727e){const _0x330c17=_0x441b,_0x45f26f=_0x3dc174();while(!![]){try{const _0x507e79=parseInt(_0x330c17(0x1c1))/0x1*(parseInt(_0x330c17(0x1f1))/0x2)+-parseInt(_0x330c17(0x19f))/0x3*(parseInt(_0x330c17(0x19e))/0x4)+parseInt(_0x330c17(0x1a0))/0x5*(parseInt(_0x330c17(0x1af))/0x6)+parseInt(_0x330c17(0x1c0))/0x7+-parseInt(_0x330c17(0x1a2))/0x8*(-parseInt(_0x330c17(0x1a3))/0x9)+-parseInt(_0x330c17(0x1bc))/0xa*(-parseInt(_0x330c17(0x1ed))/0xb)+parseInt(_0x330c17(0x1d2))/0xc*(-parseInt(_0x330c17(0x1d5))/0xd);if(_0x507e79===_0x24727e)break;else _0x45f26f['push'](_0x45f26f['shift']());}catch(_0x9d12d3){_0x45f26f['push'](_0x45f26f['shift']());}}}(_0x2f6d,0xa6898));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';import{getEnvNames}from'./env.js';function _0x441b(_0x58f4bb,_0x19906e){_0x58f4bb=_0x58f4bb-0x199;const _0x2f6d93=_0x2f6d();let _0x441bf7=_0x2f6d93[_0x58f4bb];return _0x441bf7;}import{getCurrentUser}from'./utils/userApi.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getEnvDir}from'./utils/settings.js';import{getPluginInfo}from'./utils/claudePlugin.js';import{RANGER_MANAGED_SKILLS}from'./utils/skills.js';import{spawn}from'child_process';const bold=_0x318c92=>'\x1b[1m'+_0x318c92+'\x1b[0m',link=(_0xe82d4,_0x3249e0)=>'\x1b]8;;file://'+_0xe82d4+'\x07'+(_0x3249e0||_0xe82d4)+'\x1b]8;;\x07';async function getOpencodePluginStatus(){const _0x39d6ba=_0x441b,_0x4ebf96={'RtWzM':_0x39d6ba(0x1cd),'gqRRO':function(_0x5822ca,_0xa23b0b){return _0x5822ca!==_0xa23b0b;},'xOqNf':_0x39d6ba(0x1e6),'qLoGR':function(_0x3558a7,_0x1bfece){return _0x3558a7>_0x1bfece;},'dhwmE':function(_0x39b0a6,_0x5c0847){return _0x39b0a6(_0x5c0847);},'dmWWJ':_0x39d6ba(0x1fd),'rMUVS':'opencode','gFhYr':'debug','fvKwM':_0x39d6ba(0x1cc),'WPgDA':_0x39d6ba(0x1d7),'fIlDv':_0x39d6ba(0x1f3),'GlLgs':'data','fMEYJ':'close'};return new Promise(_0xd6367e=>{const _0x2ba4c8=_0x39d6ba,_0x4cb8b3={'QvaqP':function(_0x4c085b,_0x90353e){const _0xe03347=_0x441b;return _0x4ebf96[_0xe03347(0x1d8)](_0x4c085b,_0x90353e);},'DKKkD':_0x4ebf96[_0x2ba4c8(0x1b9)]},_0x1e1f93=spawn(_0x4ebf96[_0x2ba4c8(0x1e1)],[_0x4ebf96[_0x2ba4c8(0x1e9)],_0x4ebf96['fvKwM']],{'stdio':[_0x4ebf96['WPgDA'],_0x4ebf96[_0x2ba4c8(0x1ad)],_0x4ebf96[_0x2ba4c8(0x1ad)]]});let _0x1eed92='';_0x1e1f93[_0x2ba4c8(0x1fa)]?.['on'](_0x4ebf96['GlLgs'],_0x20c0e9=>{_0x1eed92+=_0x20c0e9['toString']();}),_0x1e1f93['stderr']?.['on']('data',_0x4ac1a8=>{const _0x492d24=_0x2ba4c8;_0x1eed92+=_0x4ac1a8[_0x492d24(0x1c6)]();}),_0x1e1f93['on']('error',()=>{const _0x3bc207=_0x2ba4c8;_0x4cb8b3[_0x3bc207(0x1ee)](_0xd6367e,{'status':_0x4cb8b3['DKKkD']});}),_0x1e1f93['on'](_0x4ebf96[_0x2ba4c8(0x1c7)],_0x11e6be=>{const _0x31e955=_0x2ba4c8,_0x49d452={'QiJmm':_0x4ebf96[_0x31e955(0x1dd)]};if(_0x4ebf96[_0x31e955(0x1fb)](_0x11e6be,0x0)){_0xd6367e({'status':_0x4ebf96[_0x31e955(0x1b9)]});return;}const _0x249c49=_0x1eed92[_0x31e955(0x1a1)]();let _0x3f6a80=null;if(_0x249c49)try{_0x3f6a80=JSON['parse'](_0x249c49);}catch{const _0x2164bc=_0x249c49['match'](/\{[\s\S]*\}$/);if(_0x2164bc)try{_0x3f6a80=JSON[_0x31e955(0x1ba)](_0x2164bc[0x0]);}catch{_0x3f6a80=null;}}const _0x237773=Array['isArray'](_0x3f6a80?.['plugin'])?_0x3f6a80?.[_0x31e955(0x1ca)]:[],_0x658613=_0x237773[_0x31e955(0x1a7)](_0x2b7ddd=>{if(typeof _0x2b7ddd!=='string')return![];return _0x2b7ddd['includes']('@ranger-testing/opencode-plugin')||_0x2b7ddd['includes'](_0x49d452['QiJmm']);});if(_0x658613){_0xd6367e({'status':'configured','details':_0x237773['length']>0x0?_0x237773['length']+_0x31e955(0x1d9):undefined});return;}if(_0x4ebf96['qLoGR'](_0x237773[_0x31e955(0x1d1)],0x0)){_0x4ebf96['dhwmE'](_0xd6367e,{'status':_0x4ebf96[_0x31e955(0x1a4)],'details':_0x237773[_0x31e955(0x1d1)]+'\x20plugin(s)\x20configured'});return;}_0x4ebf96['dhwmE'](_0xd6367e,{'status':_0x31e955(0x1fd)});});});}async function getSkillsFromDir(_0x24d489,_0x3f9c2a){const _0x5c7466=_0x441b,_0x53eb81={'Qvuwj':function(_0x34ca0e,_0x39a8db,_0x1eb36b,_0x11cf49){return _0x34ca0e(_0x39a8db,_0x1eb36b,_0x11cf49);},'dzQPa':_0x5c7466(0x1b7),'KIqOp':function(_0x10d3e7,_0x5613ab){return _0x10d3e7(_0x5613ab);},'lxiSO':_0x5c7466(0x1fc)};if(!existsSync(_0x24d489))return[];const _0x4a4a70=[];try{const _0x325395=await readdir(_0x24d489,{'withFileTypes':!![]});for(const _0x37b186 of _0x325395){if(_0x37b186[_0x5c7466(0x19b)]()){const _0x16ff27=_0x53eb81['Qvuwj'](join,_0x24d489,_0x37b186[_0x5c7466(0x1e8)],_0x53eb81[_0x5c7466(0x1d0)]);if(_0x53eb81['KIqOp'](existsSync,_0x16ff27)){let _0x47dcc9=_0x37b186[_0x5c7466(0x1e8)];try{const _0x2a6352=await readFile(_0x16ff27,_0x53eb81[_0x5c7466(0x1f8)]),_0x2d4fa1=_0x2a6352['match'](/name:\s*(.+)/);_0x2d4fa1&&(_0x47dcc9=_0x2d4fa1[0x1]['trim']());}catch{}_0x4a4a70['push']({'name':_0x37b186['name'],'displayName':_0x47dcc9,'path':_0x16ff27,'level':_0x3f9c2a});}}}}catch{return[];}return _0x4a4a70;}async function getInstalledSkills(){const _0x182a56=_0x441b,_0x19655c={'jWfGT':function(_0x41ea90,_0x5bc697,_0x490fe1){return _0x41ea90(_0x5bc697,_0x490fe1);},'DXMAL':function(_0xabe4c4){return _0xabe4c4();},'GmsGy':function(_0x17a45b,_0x25d3f3,_0x46903a){return _0x17a45b(_0x25d3f3,_0x46903a);}},[_0x5a4414,_0x4f857e]=await Promise[_0x182a56(0x1e7)]([_0x19655c['jWfGT'](getSkillsFromDir,_0x19655c['DXMAL'](getProjectSkillsDir),_0x182a56(0x1b8)),_0x19655c[_0x182a56(0x1de)](getSkillsFromDir,getUserSkillsDir(),'user')]);return{'project':_0x5a4414,'user':_0x4f857e};}function _0x2f6d(){const _0x4d6c7b=['\x20(up\x20to\x20date)','scope','isDirectory','zqPxR','displayName','16lMjjIQ','818799yuYqAp','5231495LkCBkB','trim','2046424ekaaOw','9lFouOJ','dmWWJ','jPaQw','enabled','some','\x20\x20Project-level:','\x20\x20Run:\x20ranger\x20setup\x20[token]','hasPlaintextAuth',':\x20configured','dyERl','fIlDv','\x20\x20Run:\x20ranger\x20skillup','6mZFGID','Root:\x20','\x20(active)','log','\x20\x20\x20\x20Auth:\x20','Version:\x20','\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','UGiQA','SKILL.md','project','xOqNf','parse','dbech','2767850TnOuMg','status','OXowY','encrypted','7569611txVazy','5113CZBelx','ObDNS','JHOTr','isActive','path','toString','fMEYJ','\x20\x20Run:\x20ranger\x20update','details','plugin','\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>','config','opencode-plugin','hfyUL','auth.json.enc','dzQPa','length','59052zRYCMg','\x20(latest:\x20','\x20\x20\x20\x20','5668nNKDix','klYFJ','ignore','dhwmE','\x20plugin(s)\x20configured','nhGrg','ranger@trailhead','version','RtWzM','GmsGy','settings.json','lCQBy','rMUVS','organizationName','IDZzj','No\x20skills\x20installed','API\x20Token:\x20✗\x20Not\x20found','not_installed','all','name','gFhYr','No\x20profiles\x20configured','includes','filter','33VOFTfr','QvaqP','IDffc','\x20\x20\x20\x20Settings:\x20','276oyPawn','Organization:\x20','pipe','success','SBxNe','\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available','\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20','lxiSO','join','stdout','gqRRO','utf-8','not_configured'];_0x2f6d=function(){return _0x4d6c7b;};return _0x2f6d();}async function getEnvironments(){const _0x46938f=_0x441b,_0x2a5dbd={'hfyUL':_0x46938f(0x1df),'UGiQA':'auth.json','HisqU':_0x46938f(0x1cf),'dyERl':'(not\x20found)','XgASy':function(_0x170b5c,_0x5e69ac){return _0x170b5c(_0x5e69ac);},'dbech':function(_0x30befd){return _0x30befd();}},{envNames:_0x4c71a1,activeEnv:_0x21534b}=await _0x2a5dbd[_0x46938f(0x1bb)](getEnvNames),_0x5dfa5b=getRangerDir();if(!existsSync(_0x5dfa5b))return{'envs':[],'activeEnv':null};const _0x2a29d2=_0x4c71a1['map'](_0x4330b0=>{const _0x3db736=_0x46938f,_0x29bf05=getEnvDir(_0x4330b0),_0x2a66c4=join(_0x29bf05,_0x2a5dbd[_0x3db736(0x1ce)]),_0x8923b0=join(_0x29bf05,_0x2a5dbd[_0x3db736(0x1b6)]),_0x1b88b9=join(_0x29bf05,_0x2a5dbd['HisqU']);return{'name':_0x4330b0,'settingsPath':existsSync(_0x2a66c4)?_0x2a66c4:_0x2a5dbd[_0x3db736(0x1ac)],'hasPlaintextAuth':_0x2a5dbd['XgASy'](existsSync,_0x8923b0),'hasEncryptedAuth':existsSync(_0x1b88b9),'isActive':_0x4330b0===_0x21534b};});return{'envs':_0x2a29d2,'activeEnv':_0x21534b};}export async function status(){const _0x3a7971=_0x441b,_0x112adb={'vulLb':'\x0a📊\x20Ranger\x20Status\x0a','aclRw':function(_0x2c037d,_0x503a71){return _0x2c037d(_0x503a71);},'IDZzj':function(_0x159b27,_0x4d197d,_0x27b8a2){return _0x159b27(_0x4d197d,_0x27b8a2);},'JHOTr':function(_0x153365,_0x229f95){return _0x153365(_0x229f95);},'ObDNS':function(_0x5860b0){return _0x5860b0();},'jPaQw':'\x0a---\x20OpenCode\x20Plugin\x20---','mOKVH':function(_0x4e3d9e){return _0x4e3d9e();},'nhGrg':function(_0xf4f97d,_0x21f6ae){return _0xf4f97d===_0x21f6ae;},'pzBHT':'configured','OXowY':'@ranger-testing/opencode-plugin','SBxNe':'\x20\x20Run:\x20ranger\x20setup\x20--opencode','klYFJ':'disabled','IDffc':function(_0x1276e6,_0x1ade55){return _0x1276e6(_0x1ade55);},'HxoXk':'ranger@trailhead','RdjjJ':'\x0a---\x20Skills\x20---','RaplB':'\x20\x20User-level:','lCQBy':_0x3a7971(0x1b1),'xAFwx':'none','xCkcY':function(_0x3a48c7,_0x110d55){return _0x3a48c7!==_0x110d55;},'zqPxR':function(_0x47837a,_0x1f0eb7){return _0x47837a(_0x1f0eb7);}};console['log'](_0x112adb['vulLb']);const _0x44b803=process['cwd'](),_0x2dd453=getRangerDir();if(!existsSync(_0x2dd453)){console[_0x3a7971(0x1b2)]('Root:\x20'+link(_0x44b803,_0x112adb['aclRw'](bold,_0x112adb['aclRw'](basename,_0x44b803)))),console[_0x3a7971(0x1b2)]('\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.'),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a');return;}console['log'](_0x3a7971(0x1b0)+_0x112adb['IDZzj'](link,_0x44b803,_0x112adb[_0x3a7971(0x1c3)](bold,basename(_0x44b803))));const _0xb9c587=getCurrentVersion(),_0x21ca13=getLatestVersion();if(_0x21ca13['version']&&_0x21ca13['version']!==_0xb9c587)console['log'](_0x3a7971(0x1b4)+_0xb9c587+_0x3a7971(0x1d3)+_0x21ca13[_0x3a7971(0x1dc)]+')'),console[_0x3a7971(0x1b2)](_0x3a7971(0x1c8));else _0x21ca13['version']?console[_0x3a7971(0x1b2)]('Version:\x20'+_0xb9c587+_0x3a7971(0x199)):console['log']('Version:\x20'+_0xb9c587);const _0x53a7b2=await getToken();if(_0x53a7b2){const _0x55049e=await getCurrentUser(_0x53a7b2);_0x55049e[_0x3a7971(0x1f4)]?console['log'](_0x3a7971(0x1f2)+_0x112adb['JHOTr'](bold,_0x55049e['user'][_0x3a7971(0x1e2)])):(console[_0x3a7971(0x1b2)]('API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired'),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]'));}else console[_0x3a7971(0x1b2)](_0x3a7971(0x1e5)),console['log'](_0x3a7971(0x1a9));process['env']['DEBUG']&&(console[_0x3a7971(0x1b2)]('API\x20Environment:\x20'+_0x112adb['ObDNS'](getCurrentEnvironment)),console['log']('API\x20URL:\x20'+_0x112adb[_0x3a7971(0x1c2)](getApiBaseUrl)));console['log'](_0x112adb[_0x3a7971(0x1a5)]);const _0x59d07a=await _0x112adb['mOKVH'](getOpencodePluginStatus);if(_0x112adb[_0x3a7971(0x1da)](_0x59d07a[_0x3a7971(0x1bd)],_0x112adb['pzBHT']))console['log']('\x20\x20'+bold(_0x112adb[_0x3a7971(0x1be)])+_0x3a7971(0x1ab)),_0x59d07a['details']&&console[_0x3a7971(0x1b2)]('\x20\x20'+_0x59d07a['details']);else _0x59d07a[_0x3a7971(0x1bd)]==='not_configured'?(console[_0x3a7971(0x1b2)]('\x20\x20Not\x20configured'),_0x59d07a['details']&&console['log']('\x20\x20'+_0x59d07a[_0x3a7971(0x1c9)]),console[_0x3a7971(0x1b2)](_0x112adb[_0x3a7971(0x1f5)])):console['log'](_0x3a7971(0x1f6));console[_0x3a7971(0x1b2)]('\x0a---\x20Claude\x20Code\x20Plugin\x20---');const _0x1ca134=await getPluginInfo(_0x3a7971(0x1db));if(_0x1ca134){const _0x123014=_0x1ca134[_0x3a7971(0x19a)]||'unknown',_0x582e60=_0x1ca134[_0x3a7971(0x1a6)]?_0x3a7971(0x1a6):_0x112adb[_0x3a7971(0x1d6)];console[_0x3a7971(0x1b2)]('\x20\x20'+_0x112adb[_0x3a7971(0x1ef)](bold,_0x112adb['HxoXk'])+':\x20installed\x20('+_0x123014+',\x20'+_0x582e60+')');}else console[_0x3a7971(0x1b2)]('\x20\x20Not\x20installed'),console['log'](_0x3a7971(0x1b5));console[_0x3a7971(0x1b2)](_0x112adb['RdjjJ']);const {project:_0x59c5dc,user:_0x3f8339}=await _0x112adb['mOKVH'](getInstalledSkills),_0x549e6c=_0x59c5dc['filter'](_0x595901=>RANGER_MANAGED_SKILLS[_0x3a7971(0x1eb)](_0x595901['name'])),_0x4b3529=_0x3f8339[_0x3a7971(0x1ec)](_0xefe601=>RANGER_MANAGED_SKILLS['includes'](_0xefe601['name'])),_0x9b3791=_0x549e6c['length']+_0x4b3529['length'];if(_0x112adb['nhGrg'](_0x9b3791,0x0))console[_0x3a7971(0x1b2)](_0x3a7971(0x1e4)),console[_0x3a7971(0x1b2)](_0x3a7971(0x1ae));else{if(_0x549e6c[_0x3a7971(0x1d1)]>0x0){console['log'](_0x3a7971(0x1a8));for(const _0x37d177 of _0x549e6c){console['log']('\x20\x20\x20\x20'+bold(_0x37d177['displayName'])+':\x20'+_0x112adb['IDZzj'](link,_0x37d177[_0x3a7971(0x1c5)],_0x112adb['aclRw'](basename,_0x37d177['path'])));}}if(_0x4b3529['length']>0x0){console['log'](_0x112adb['RaplB']);for(const _0x722739 of _0x4b3529){console['log'](_0x3a7971(0x1d4)+bold(_0x722739[_0x3a7971(0x19d)])+':\x20'+link(_0x722739[_0x3a7971(0x1c5)],basename(_0x722739['path'])));}}}console['log']('\x0a---\x20Profiles\x20---');const {envs:_0x2b3a25,activeEnv:_0x2a37ff}=await getEnvironments();if(_0x2b3a25[_0x3a7971(0x1d1)]===0x0)console[_0x3a7971(0x1b2)](_0x3a7971(0x1ea)),console['log'](_0x3a7971(0x1cb));else{for(const _0x82bcdb of _0x2b3a25){const _0x25771f=_0x82bcdb[_0x3a7971(0x1c4)]?_0x112adb[_0x3a7971(0x1e0)]:'',_0x4e5e33=_0x82bcdb['hasEncryptedAuth']?_0x3a7971(0x1bf):_0x82bcdb[_0x3a7971(0x1aa)]?'plaintext':_0x112adb['xAFwx'];console[_0x3a7971(0x1b2)]('\x20\x20'+bold(_0x82bcdb[_0x3a7971(0x1e8)])+_0x25771f),console[_0x3a7971(0x1b2)](_0x3a7971(0x1b3)+_0x4e5e33),_0x112adb['xCkcY'](_0x82bcdb['settingsPath'],'(not\x20found)')&&console['log'](_0x3a7971(0x1f0)+_0x112adb[_0x3a7971(0x1e3)](link,_0x82bcdb['settingsPath'],_0x112adb[_0x3a7971(0x19c)](basename,_0x82bcdb['settingsPath'])));}!_0x2a37ff&&(console[_0x3a7971(0x1b2)]('\x0a\x20\x20No\x20active\x20profile\x20set'),console['log'](_0x3a7971(0x1f7)+_0x2b3a25['map'](_0x365968=>_0x365968['name'])[_0x3a7971(0x1f9)](',\x20')+')'));}console['log']('');}
@@ -1 +1 @@
1
- (function(_0x317fa6,_0x3b5bf0){const _0xf29dcc=_0x2217,_0x2354cd=_0x317fa6();while(!![]){try{const _0x56914f=-parseInt(_0xf29dcc(0x1e6))/0x1*(parseInt(_0xf29dcc(0x1c0))/0x2)+parseInt(_0xf29dcc(0x1c5))/0x3+parseInt(_0xf29dcc(0x1a6))/0x4*(parseInt(_0xf29dcc(0x1c6))/0x5)+parseInt(_0xf29dcc(0x1d7))/0x6*(-parseInt(_0xf29dcc(0x198))/0x7)+-parseInt(_0xf29dcc(0x1a5))/0x8*(parseInt(_0xf29dcc(0x19c))/0x9)+parseInt(_0xf29dcc(0x1bb))/0xa*(-parseInt(_0xf29dcc(0x1da))/0xb)+parseInt(_0xf29dcc(0x19d))/0xc;if(_0x56914f===_0x3b5bf0)break;else _0x2354cd['push'](_0x2354cd['shift']());}catch(_0x1185c8){_0x2354cd['push'](_0x2354cd['shift']());}}}(_0x53da,0xd8240));import{spawn}from'child_process';function _0x2217(_0x27a8fc,_0x2bb880){_0x27a8fc=_0x27a8fc-0x198;const _0x53da10=_0x53da();let _0x221783=_0x53da10[_0x27a8fc];return _0x221783;}import{existsSync}from'fs';import{readFile,writeFile}from'fs/promises';function _0x53da(){const _0x962ee0=['\x0a✅\x20Update\x20complete!','.gitignore','ignore','gGSUo','ulGbc','splice','npm','error','\x0aSuccessfully\x20installed\x20latest\x20version.','--scope','@latest','qPjCi','version','590AePwfx','vjsdY','log','rkyee','close','426526AjETmz','\x0aYour\x20version\x20(','\x0aCurrent\x20version:\x20','GXmBn','PqkiM','2655186UeMuJF','443175LJpXeL','TaWNW','sAzvF','kMevY','MqCjo','xXYvI',')\x20is\x20newer\x20than\x20the\x20published\x20version\x20(','\x20\x20Failed\x20to\x20reinstall\x20','ranger@trailhead','ZbGEv','inherit','CmJjM','claude','kill','wLLcp','trim','XmOuJ','2334ppWgFr','TqZLH','user','313489TKxTqh','project','Sgzbu','win32','VKyMo','Claude\x20marketplace\x20update\x20command\x20failed\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).','join','plugin','active-feature.txt','findIndex','yayaM','opencode','2fTsWcL','29281wkpwkZ','utf-8','\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.','BydvJ','369wmMoex','48216456pmQMzz','update','icmRR','\x0aInstalling\x20','platform','\x0aClaude\x20plugin\x20updated\x20(project\x20scope).','GaXrq','marketplace','107032hsMluI','12Acehnd','✓\x20Migrated\x20active\x20profile\x20file','XaYzO','Vantm','ZxogX','push','jtXZC','\x0aCould\x20not\x20check\x20latest\x20version:\x20'];_0x53da=function(){return _0x962ee0;};return _0x53da();}import{installSkill,removeSkill,RANGER_MANAGED_SKILLS,DEPRECATED_SKILLS}from'./utils/skills.js';import{PACKAGE_NAME,getCurrentVersion,getLatestVersion,compareVersions}from'./utils/version.js';import{getSkillsDir}from'./utils/claudeConfig.js';import{getOpencodeSkillsDir}from'./utils/opencodeConfig.js';import{join}from'path';import{migrateActiveProfileFile}from'./utils/activeProfile.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getPluginInfo,isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';const CLAUDE_COMMAND_TIMEOUT_MS=0x1d4c0;async function runCommand(_0x250f97,_0x15db6c,_0x23b549){const _0x34ce7f={'icmRR':function(_0x3bf76f,_0x2fe408){return _0x3bf76f(_0x2fe408);},'IZSdf':function(_0x2c505a,_0xd6294f){return _0x2c505a===_0xd6294f;},'yayaM':function(_0x194779,_0x2cd4d4){return _0x194779(_0x2cd4d4);},'QNimZ':function(_0x4ce6b5,_0x5c5f85,_0x40c431,_0x369494){return _0x4ce6b5(_0x5c5f85,_0x40c431,_0x369494);},'NqIIs':'inherit'};return new Promise(_0x5b67d1=>{const _0x5255f1=_0x2217,_0x3d5c05={'ulGbc':function(_0xa28d01,_0x402d3d){const _0x4c9923=_0x2217;return _0x34ce7f[_0x4c9923(0x1e4)](_0xa28d01,_0x402d3d);}};let _0x10111e=![],_0x348f4a;const _0x5eddde=_0x2b1f9e=>{const _0x39c4fe=_0x2217;if(_0x10111e)return;_0x10111e=!![],_0x348f4a&&clearTimeout(_0x348f4a),_0x34ce7f[_0x39c4fe(0x19f)](_0x5b67d1,_0x2b1f9e);},_0x27cc56=_0x34ce7f['QNimZ'](spawn,_0x250f97,_0x15db6c,{'stdio':[_0x5255f1(0x1b0),_0x23b549?.['stdio']??'inherit',_0x23b549?.['stdio']??_0x34ce7f['NqIIs']],'shell':process[_0x5255f1(0x1a1)]==='win32'});_0x348f4a=_0x23b549?.['timeoutMs']?setTimeout(()=>{const _0x45e1fd=_0x5255f1;_0x27cc56[_0x45e1fd(0x1d3)](),_0x27cc56['unref'](),_0x3d5c05[_0x45e1fd(0x1b2)](_0x5eddde,![]);},_0x23b549['timeoutMs']):undefined,_0x27cc56['on'](_0x5255f1(0x1bf),_0x4feb24=>{_0x5eddde(_0x34ce7f['IZSdf'](_0x4feb24,0x0));}),_0x27cc56['on']('error',()=>{_0x3d5c05['ulGbc'](_0x5eddde,![]);});});}async function runInstall(){const _0x44f70f=_0x2217,_0x2a82fb={'WcqoO':function(_0x501259,_0x419cf7){return _0x501259===_0x419cf7;},'IaMem':function(_0x5427ae,_0x380467,_0x4f31dd,_0x359a2f){return _0x5427ae(_0x380467,_0x4f31dd,_0x359a2f);},'jtXZC':_0x44f70f(0x1b4),'fgPEK':'ignore','rkyee':_0x44f70f(0x1d0),'GaXrq':function(_0x18fd66,_0x1f293d){return _0x18fd66===_0x1f293d;},'vjsdY':_0x44f70f(0x1dd),'tUiaB':'close'};return new Promise(_0x4abb5e=>{const _0x27c00a=_0x44f70f,_0x3d55eb={'qPjCi':function(_0x1ecc71,_0x2f7c3f){return _0x1ecc71(_0x2f7c3f);}};console[_0x27c00a(0x1bd)](_0x27c00a(0x1a0)+PACKAGE_NAME+'@latest...\x0a');const _0x29fb5c=_0x2a82fb['IaMem'](spawn,_0x2a82fb[_0x27c00a(0x1ac)],['install','-g',PACKAGE_NAME+_0x27c00a(0x1b8)],{'stdio':[_0x2a82fb['fgPEK'],_0x2a82fb[_0x27c00a(0x1be)],_0x2a82fb[_0x27c00a(0x1be)]],'shell':_0x2a82fb[_0x27c00a(0x1a3)](process[_0x27c00a(0x1a1)],_0x2a82fb[_0x27c00a(0x1bc)])});_0x29fb5c['on'](_0x2a82fb['tUiaB'],_0x338af3=>{_0x4abb5e(_0x2a82fb['WcqoO'](_0x338af3,0x0));}),_0x29fb5c['on'](_0x27c00a(0x1b5),()=>{const _0x56c51a=_0x27c00a;_0x3d55eb[_0x56c51a(0x1b9)](_0x4abb5e,![]);});});}async function updateClaudeMarketplace(){const _0x220c86=_0x2217,_0x1e0979={'MqCjo':_0x220c86(0x1d2),'xXYvI':_0x220c86(0x1e1),'oSlQF':_0x220c86(0x19e),'eXcCA':'trailhead'},_0x83296e=await runCommand(_0x1e0979[_0x220c86(0x1ca)],[_0x1e0979[_0x220c86(0x1cb)],_0x220c86(0x1a4),_0x1e0979['oSlQF'],_0x1e0979['eXcCA']],{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS});if(!_0x83296e)throw new Error(_0x220c86(0x1df));}async function updateClaudePlugin(_0x44e102){const _0x420366=_0x2217,_0x1dcc99={'UWJGn':_0x420366(0x1e1),'MrPve':_0x420366(0x19e),'pZTxQ':_0x420366(0x1b7),'BydvJ':function(_0x2d680e,_0x21534c,_0x203c14,_0x2432ad){return _0x2d680e(_0x21534c,_0x203c14,_0x2432ad);},'JDOow':function(_0x4b506e,_0x444b1d){return _0x4b506e??_0x444b1d;},'TqZLH':_0x420366(0x1d9)},_0x5208b4=[_0x1dcc99['UWJGn'],_0x1dcc99['MrPve'],_0x420366(0x1ce)];_0x44e102&&_0x5208b4['push'](_0x1dcc99['pZTxQ'],_0x44e102);const _0x48e5d2=await _0x1dcc99[_0x420366(0x19b)](runCommand,_0x420366(0x1d2),_0x5208b4,{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS});if(!_0x48e5d2){const _0x1d172c=_0x1dcc99['JDOow'](_0x44e102,_0x1dcc99[_0x420366(0x1d8)]);throw new Error('Claude\x20plugin\x20update\x20failed\x20for\x20'+_0x1d172c+'\x20scope\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).');}}function isSkillInstalled(_0x591255,_0x1f6f7a,_0x149618){const _0x3bad00={'Qlsyn':function(_0x4fe7e7,_0xe954a3){return _0x4fe7e7(_0xe954a3);}},_0x3831fe=_0x149618==='opencode'?getOpencodeSkillsDir(_0x1f6f7a):getSkillsDir(_0x1f6f7a),_0x1a2353=join(_0x3831fe,_0x591255);return _0x3bad00['Qlsyn'](existsSync,_0x1a2353);}async function reinstallSkills(_0x2f009b){const _0x1dd615=_0x2217,_0x1e747f={'XaYzO':_0x1dd615(0x1db),'kXaDm':function(_0x27a036,_0x2a1f37,_0x408b78,_0x14a460){return _0x27a036(_0x2a1f37,_0x408b78,_0x14a460);},'PqkiM':'claude','RFqhi':function(_0x335d11,_0x3a1a70){return _0x335d11===_0x3a1a70;},'kMevY':function(_0x519d4f,_0x5e42e7,_0x498b65){return _0x519d4f(_0x5e42e7,_0x498b65);}},_0x527534=[_0x1e747f[_0x1dd615(0x1a8)],'user'],_0x1c4d2e=[];for(const _0x57a554 of _0x527534){for(const _0x59d27b of RANGER_MANAGED_SKILLS){_0x1e747f['kXaDm'](isSkillInstalled,_0x59d27b,_0x57a554,_0x1dd615(0x1d2))&&_0x1c4d2e['push']({'skillName':_0x59d27b,'level':_0x57a554,'platform':_0x1e747f[_0x1dd615(0x1c4)]}),isSkillInstalled(_0x59d27b,_0x57a554,_0x1dd615(0x1e5))&&_0x1c4d2e[_0x1dd615(0x1ab)]({'skillName':_0x59d27b,'level':_0x57a554,'platform':_0x1dd615(0x1e5)});}}for(const _0x2e3910 of _0x527534){for(const _0x41a17d of DEPRECATED_SKILLS){await removeSkill(_0x41a17d,_0x2e3910);}}if(_0x1e747f['RFqhi'](_0x1c4d2e['length'],0x0)){console['log'](_0x1dd615(0x19a));return;}console[_0x1dd615(0x1bd)]('\x0aReinstalling\x20'+_0x1c4d2e['length']+'\x20ranger-managed\x20skill(s)...');for(const {skillName:_0x1fbf99,level:_0x54f9b7,platform:_0x17c939}of _0x1c4d2e){try{await _0x1e747f[_0x1dd615(0x1c9)](installSkill,_0x1fbf99,{'level':_0x54f9b7,'cliVersion':_0x2f009b,'platform':_0x17c939});}catch(_0x30974b){console['warn'](_0x1dd615(0x1cd)+_0x17c939+'\x20'+_0x54f9b7+'\x20skill\x20'+_0x1fbf99+':',_0x30974b);}}}async function ensureActiveProfileGitignored(){const _0x123b25=_0x2217,_0x424052={'CmJjM':function(_0x2ed01d,_0x366065,_0x1bed24){return _0x2ed01d(_0x366065,_0x1bed24);},'ndAZP':_0x123b25(0x199),'kEGNp':function(_0x5957af,_0x15567e){return _0x5957af===_0x15567e;},'TaWNW':function(_0x50769b,_0x53a6a2,_0x471388,_0x45bf9c){return _0x50769b(_0x53a6a2,_0x471388,_0x45bf9c);}},_0x3b3153=_0x424052[_0x123b25(0x1d1)](join,getRangerDir(),_0x123b25(0x1af));if(!existsSync(_0x3b3153))return![];let _0x3737f5='';try{_0x3737f5=await readFile(_0x3b3153,_0x424052['ndAZP']);}catch{return![];}const _0x5abb36=_0x3737f5['split'](/\r?\n/);if(_0x5abb36['some'](_0x3448be=>_0x3448be['trim']()==='active-profile.txt'))return![];let _0x371a4b=_0x5abb36[_0x123b25(0x1e3)](_0x5483e0=>_0x5483e0[_0x123b25(0x1d5)]()===_0x123b25(0x1e2));_0x424052['kEGNp'](_0x371a4b,-0x1)&&(_0x371a4b=_0x5abb36['length']);_0x5abb36[_0x123b25(0x1b3)](_0x371a4b,0x0,'active-profile.txt');let _0x459c7f=_0x5abb36[_0x123b25(0x1e0)]('\x0a');!_0x459c7f['endsWith']('\x0a')&&(_0x459c7f+='\x0a');try{await _0x424052[_0x123b25(0x1c7)](writeFile,_0x3b3153,_0x459c7f,_0x123b25(0x199));}catch{return![];}return!![];}export async function update(){const _0x553475=_0x2217,_0x4c277c={'enSTR':'Checking\x20for\x20updates...','wLLcp':'Attempting\x20install\x20anyway...','gGSUo':_0x553475(0x1b6),'ZbGEv':function(_0x234c82,_0x3fcb37){return _0x234c82===_0x3fcb37;},'sAzvF':function(_0x1bd587,_0x4b15bb){return _0x1bd587<_0x4b15bb;},'yQkHo':function(_0x42874a,_0x397885){return _0x42874a(_0x397885);},'ZxogX':'trailhead','VKyMo':function(_0x2d7fed,_0x533249){return _0x2d7fed(_0x533249);},'GXmBn':'ranger@trailhead','Vantm':function(_0x620dd8){return _0x620dd8();},'Sgzbu':function(_0x20b40f,_0xfef018){return _0x20b40f(_0xfef018);},'UoUAK':_0x553475(0x1db),'NTwXo':_0x553475(0x1a2),'XmOuJ':function(_0x11a317){return _0x11a317();},'qDmFp':_0x553475(0x1ae)},_0x16dd49=getCurrentVersion();console[_0x553475(0x1bd)](_0x553475(0x1c2)+_0x16dd49),console['log'](_0x4c277c['enSTR']);const _0x2f191c=getLatestVersion();let _0x4d448c=_0x16dd49;if(!_0x2f191c[_0x553475(0x1ba)]){console['warn'](_0x553475(0x1ad)+_0x2f191c['error']),console[_0x553475(0x1bd)](_0x4c277c[_0x553475(0x1d4)]);const _0xa07f4d=await runInstall();if(_0xa07f4d)console['log'](_0x4c277c[_0x553475(0x1b1)]),_0x4d448c=getCurrentVersion();else throw new Error('Update\x20failed:\x20'+_0x2f191c['error']);}else{const _0x50b633=_0x2f191c[_0x553475(0x1ba)];console[_0x553475(0x1bd)]('Latest\x20version:\x20\x20'+_0x50b633);const _0x45323d=compareVersions(_0x16dd49,_0x50b633);if(_0x4c277c[_0x553475(0x1cf)](_0x45323d,0x0))console['log']('\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.');else{if(_0x4c277c[_0x553475(0x1c8)](_0x45323d,0x0))console[_0x553475(0x1bd)](_0x553475(0x1c1)+_0x16dd49+_0x553475(0x1cc)+_0x50b633+').');else{const _0xafa4e6=await runInstall();if(_0xafa4e6)console[_0x553475(0x1bd)]('\x0aSuccessfully\x20updated\x20to\x20version\x20'+_0x50b633),_0x4d448c=_0x50b633;else throw new Error('Update\x20failed.');}}}await _0x4c277c['yQkHo'](reinstallSkills,_0x4d448c);const _0xed3248=await isMarketplaceAdded(_0x4c277c[_0x553475(0x1aa)]),_0x464a53=await _0x4c277c[_0x553475(0x1de)](isPluginInstalled,_0x4c277c['GXmBn']);_0xed3248&&(await _0x4c277c[_0x553475(0x1a9)](updateClaudeMarketplace),console['log']('\x0aClaude\x20marketplace\x20updated\x20(trailhead).'));if(_0x464a53){const _0xd81933=await _0x4c277c['yQkHo'](getPluginInfo,_0x4c277c[_0x553475(0x1c3)]);_0x4c277c[_0x553475(0x1cf)](_0xd81933?.['scope'],_0x553475(0x1db))?(await _0x4c277c[_0x553475(0x1dc)](updateClaudePlugin,_0x4c277c['UoUAK']),console['log'](_0x4c277c['NTwXo'])):(await _0x4c277c['XmOuJ'](updateClaudePlugin),console['log']('\x0aClaude\x20plugin\x20updated\x20(user\x20scope).'));}const _0xb7877c=await migrateActiveProfileFile();_0xb7877c&&console['log'](_0x553475(0x1a7));const _0x2159e2=await _0x4c277c[_0x553475(0x1d6)](ensureActiveProfileGitignored);console['log'](_0x4c277c['qDmFp']);}
1
+ function _0x9430(){const _0xfd1e38=['cGnLG','\x0aReinstalling\x20','26ufuGRL','\x0aClaude\x20plugin\x20updated\x20(local\x20scope).','\x0a✅\x20Update\x20complete!','BRlAE','marketplace','active-feature.txt','\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','active-profile.txt','LNMjY','8MZRnPe','\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.','1111uIGAkm','dcqVJ','alpha','pzebl','sCqIh','some','3HFawTT','pqxgw','jMODX','project','log','DVxrR','bMneg','1169364CDmDTQ','opencode','BRjjS','GZUMM','CHqsm','fMhxT','inherit','stdio','cFrbu','BZlqp','platform','59908AxryjP','test','error','aZfCN','NQtBf','\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.','.gitignore','close','scope','\x0aSuccessfully\x20updated\x20to\x20version\x20','push','ZfUhK','claude','win32','aRatf','Update\x20failed\x20for\x20@','update','--scope','Uikyw','amaot','endsWith','latest','\x20\x20Failed\x20to\x20reinstall\x20','1694236AoULpM','Attempting\x20install\x20anyway...','version','hotCQ','NPyOB','utf-8','67450RcNBvF','230zqQKTx','length','\x20scope\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).','7513800CxdLGY','uDluP','urBUP','cwd','\x0aClaude\x20marketplace\x20updated\x20(trailhead).','JDTQm','3855609ElIdiR','tGSIB','warn','\x0aSuccessfully\x20installed\x20latest\x20version.','FvOKa','rcvzc','...\x0a','BULrY','\x0aInstalling\x20','plugin','beta','ranger@trailhead','99462gQlFmX'];_0x9430=function(){return _0xfd1e38;};return _0x9430();}const _0x319d3e=_0x3338;(function(_0x4e6e22,_0x5915e2){const _0x578f2d=_0x3338,_0x1b3123=_0x4e6e22();while(!![]){try{const _0x143a48=parseInt(_0x578f2d(0x7a))/0x1*(parseInt(_0x578f2d(0xb0))/0x2)+parseInt(_0x578f2d(0xc1))/0x3*(-parseInt(_0x578f2d(0x91))/0x4)+-parseInt(_0x578f2d(0x98))/0x5*(-parseInt(_0x578f2d(0xad))/0x6)+parseInt(_0x578f2d(0x6f))/0x7+-parseInt(_0x578f2d(0xb9))/0x8*(-parseInt(_0x578f2d(0xa1))/0x9)+-parseInt(_0x578f2d(0x97))/0xa*(parseInt(_0x578f2d(0xbb))/0xb)+-parseInt(_0x578f2d(0x9b))/0xc;if(_0x143a48===_0x5915e2)break;else _0x1b3123['push'](_0x1b3123['shift']());}catch(_0x3ee96f){_0x1b3123['push'](_0x1b3123['shift']());}}}(_0x9430,0x63155));import{spawn}from'child_process';import{existsSync}from'fs';import{readFile,writeFile}from'fs/promises';import{installSkill,removeSkill,RANGER_MANAGED_SKILLS,DEPRECATED_SKILLS}from'./utils/skills.js';import{PACKAGE_NAME,getCurrentVersion,getLatestVersion,compareVersions}from'./utils/version.js';import{getProjectRoot,getSkillsDir}from'./utils/claudeConfig.js';function _0x3338(_0x354cc1,_0x422cdb){_0x354cc1=_0x354cc1-0x6e;const _0x943025=_0x9430();let _0x3338a2=_0x943025[_0x354cc1];return _0x3338a2;}import{getOpencodeSkillsDir}from'./utils/opencodeConfig.js';import{join}from'path';import{getRangerDir}from'./utils/rangerRoot.js';import{getPluginInfo,isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';const CLAUDE_COMMAND_TIMEOUT_MS=0x1d4c0;async function runCommand(_0x5cb582,_0xfd626,_0x45478f){const _0xdc62c4=_0x3338,_0x513f73={'aRatf':function(_0x17ca81,_0x472df7){return _0x17ca81(_0x472df7);},'mAnyG':function(_0x5b1466,_0x3cc195){return _0x5b1466===_0x3cc195;},'jMODX':function(_0x93fb00,_0x820fc2,_0x5cf8f2,_0x5cd366){return _0x93fb00(_0x820fc2,_0x5cf8f2,_0x5cd366);},'sCqIh':'ignore','aZfCN':_0xdc62c4(0x75),'BRlAE':_0xdc62c4(0x87),'nhmOJ':function(_0x4f7588,_0x49aafc,_0x760b31){return _0x4f7588(_0x49aafc,_0x760b31);}};return new Promise(_0xcd6409=>{const _0x5c31fb=_0xdc62c4,_0xb5fef5={'TVuhn':function(_0x4306bc,_0x4e5254){return _0x4306bc(_0x4e5254);}};let _0x4ef67b=![],_0x24f15d;const _0x4bd286=_0x45c82b=>{const _0x42e9ac=_0x3338;if(_0x4ef67b)return;_0x4ef67b=!![],_0x24f15d&&_0x513f73[_0x42e9ac(0x88)](clearTimeout,_0x24f15d),_0xcd6409(_0x45c82b);},_0x272ddc=_0x513f73[_0x5c31fb(0xc3)](spawn,_0x5cb582,_0xfd626,{'stdio':[_0x513f73[_0x5c31fb(0xbf)],_0x45478f?.[_0x5c31fb(0x76)]??_0x5c31fb(0x75),_0x45478f?.[_0x5c31fb(0x76)]??_0x513f73[_0x5c31fb(0x7d)]],'cwd':_0x45478f?.[_0x5c31fb(0x9e)],'shell':_0x513f73['mAnyG'](process['platform'],_0x513f73[_0x5c31fb(0xb3)])});_0x24f15d=_0x45478f?.['timeoutMs']?_0x513f73['nhmOJ'](setTimeout,()=>{_0x272ddc['kill'](),_0x272ddc['unref'](),_0xb5fef5['TVuhn'](_0x4bd286,![]);},_0x45478f['timeoutMs']):undefined,_0x272ddc['on'](_0x5c31fb(0x81),_0x221c0e=>{_0x4bd286(_0x513f73['mAnyG'](_0x221c0e,0x0));}),_0x272ddc['on']('error',()=>{_0xb5fef5['TVuhn'](_0x4bd286,![]);});});}export function resolveDistTag(_0x5c2ef2){const _0x170180=_0x3338,_0x33d565={'GZUMM':_0x170180(0xbd),'VNUsV':_0x170180(0xab),'DrNXV':_0x170180(0x8f)};if(/-alpha\./i['test'](_0x5c2ef2))return _0x33d565[_0x170180(0x72)];if(/-beta\./i[_0x170180(0x7b)](_0x5c2ef2))return _0x33d565['VNUsV'];if(/-rc\./i['test'](_0x5c2ef2))return'rc';return _0x33d565['DrNXV'];}async function runInstall(_0x3a6110=_0x319d3e(0x8f)){const _0x5159eb=_0x319d3e,_0x3bb449={'uDluP':'install','dcqVJ':_0x5159eb(0x75),'lLkrn':function(_0x43be58,_0x34df73){return _0x43be58===_0x34df73;},'CHqsm':'close'};return new Promise(_0x28e0ee=>{const _0x4c1f0e=_0x5159eb,_0x5b3c55={'ihQEU':function(_0x341ff3,_0x50cd1d){return _0x341ff3(_0x50cd1d);}};console['log'](_0x4c1f0e(0xa9)+PACKAGE_NAME+'@'+_0x3a6110+_0x4c1f0e(0xa7));const _0x4370e9=spawn('npm',[_0x3bb449[_0x4c1f0e(0x9c)],'-g',PACKAGE_NAME+'@'+_0x3a6110],{'stdio':['ignore',_0x3bb449['dcqVJ'],_0x3bb449[_0x4c1f0e(0xbc)]],'shell':_0x3bb449['lLkrn'](process[_0x4c1f0e(0x79)],_0x4c1f0e(0x87))});_0x4370e9['on'](_0x3bb449[_0x4c1f0e(0x73)],_0x46048e=>{_0x28e0ee(_0x46048e===0x0);}),_0x4370e9['on'](_0x4c1f0e(0x7c),()=>{_0x5b3c55['ihQEU'](_0x28e0ee,![]);});});}async function updateClaudeMarketplace(){const _0x2d740e=_0x319d3e,_0x5455e5={'NPyOB':'Claude\x20marketplace\x20update\x20command\x20failed\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).'},_0x38ab60=await runCommand(_0x2d740e(0x86),['plugin',_0x2d740e(0xb4),'update','trailhead'],{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS});if(!_0x38ab60)throw new Error(_0x5455e5[_0x2d740e(0x95)]);}async function updateClaudePlugin(_0x2b9f96='user'){const _0x46a2dd=_0x319d3e,_0x452695={'fMhxT':_0x46a2dd(0x8a),'nwPfZ':_0x46a2dd(0xac),'WcrrA':function(_0x263e5c,_0x531a69){return _0x263e5c!==_0x531a69;},'BULrY':'user','MxwhK':_0x46a2dd(0x8b),'BRjjS':function(_0x4cb587,_0x2d0469,_0x1dcd01,_0x4ff33a){return _0x4cb587(_0x2d0469,_0x1dcd01,_0x4ff33a);},'gCtwO':function(_0x59e896,_0x1f08f9){return _0x59e896===_0x1f08f9;},'rcvzc':'local'},_0xbfb021=[_0x46a2dd(0xaa),_0x452695[_0x46a2dd(0x74)],_0x452695['nwPfZ']];_0x452695['WcrrA'](_0x2b9f96,_0x452695[_0x46a2dd(0xa8)])&&_0xbfb021[_0x46a2dd(0x84)](_0x452695['MxwhK'],_0x2b9f96);const _0x347204=await _0x452695[_0x46a2dd(0x71)](runCommand,_0x46a2dd(0x86),_0xbfb021,{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS,'cwd':_0x2b9f96==='project'||_0x452695['gCtwO'](_0x2b9f96,_0x452695[_0x46a2dd(0xa6)])?getProjectRoot():undefined});if(!_0x347204)throw new Error('Claude\x20plugin\x20update\x20failed\x20for\x20'+_0x2b9f96+_0x46a2dd(0x9a));}function isSkillInstalled(_0x221c79,_0x2dbaeb,_0x402d4a){const _0xbeb441=_0x319d3e,_0x17e816={'cFrbu':'opencode','cGnLG':function(_0x243f35,_0x4dc89b){return _0x243f35(_0x4dc89b);}},_0x206883=_0x402d4a===_0x17e816[_0xbeb441(0x77)]?getOpencodeSkillsDir(_0x2dbaeb):getSkillsDir(_0x2dbaeb),_0x32a5ea=join(_0x206883,_0x221c79);return _0x17e816[_0xbeb441(0xae)](existsSync,_0x32a5ea);}async function reinstallSkills(_0x3b3386){const _0x2a3f2a=_0x319d3e,_0x12549c={'hotCQ':'user','urBUP':_0x2a3f2a(0x86),'pzebl':function(_0x992cba,_0x29bed6,_0x21eb93,_0x316336){return _0x992cba(_0x29bed6,_0x21eb93,_0x316336);},'LNMjY':_0x2a3f2a(0x70),'NQtBf':function(_0x8473c6,_0x569509){return _0x8473c6===_0x569509;},'bMneg':function(_0x4878bc,_0x3f5f86,_0xc774c2){return _0x4878bc(_0x3f5f86,_0xc774c2);}},_0x7a713a=[_0x2a3f2a(0xc4),_0x12549c[_0x2a3f2a(0x94)]],_0x56f1f3=[];for(const _0x307b25 of _0x7a713a){for(const _0xc263a of RANGER_MANAGED_SKILLS){isSkillInstalled(_0xc263a,_0x307b25,_0x12549c['urBUP'])&&_0x56f1f3[_0x2a3f2a(0x84)]({'skillName':_0xc263a,'level':_0x307b25,'platform':_0x12549c[_0x2a3f2a(0x9d)]}),_0x12549c[_0x2a3f2a(0xbe)](isSkillInstalled,_0xc263a,_0x307b25,'opencode')&&_0x56f1f3[_0x2a3f2a(0x84)]({'skillName':_0xc263a,'level':_0x307b25,'platform':_0x12549c[_0x2a3f2a(0xb8)]});}}for(const _0x4dd2b1 of _0x7a713a){for(const _0x4a78c4 of DEPRECATED_SKILLS){await removeSkill(_0x4a78c4,_0x4dd2b1);}}if(_0x12549c[_0x2a3f2a(0x7e)](_0x56f1f3['length'],0x0)){console[_0x2a3f2a(0xc5)](_0x2a3f2a(0xba));return;}console['log'](_0x2a3f2a(0xaf)+_0x56f1f3['length']+'\x20ranger-managed\x20skill(s)...');for(const {skillName:_0x215efb,level:_0x54f0d7,platform:_0x35879c}of _0x56f1f3){try{await _0x12549c[_0x2a3f2a(0x6e)](installSkill,_0x215efb,{'level':_0x54f0d7,'cliVersion':_0x3b3386,'platform':_0x35879c});}catch(_0x4514c7){console['warn'](_0x2a3f2a(0x90)+_0x35879c+'\x20'+_0x54f0d7+'\x20skill\x20'+_0x215efb+':',_0x4514c7);}}}async function ensureActiveProfileGitignored(){const _0x26ae72=_0x319d3e,_0x2966a5={'VGHCr':function(_0x4acead,_0x5e697c,_0x418f93){return _0x4acead(_0x5e697c,_0x418f93);},'snoXC':function(_0x4015a5,_0xc34d8e){return _0x4015a5(_0xc34d8e);},'QwwyY':function(_0xcfad53,_0x3fc1a7,_0x2e3734){return _0xcfad53(_0x3fc1a7,_0x2e3734);},'xGZxP':'utf-8'},_0x39327b=_0x2966a5['VGHCr'](join,getRangerDir(),_0x26ae72(0x80));if(!_0x2966a5['snoXC'](existsSync,_0x39327b))return![];let _0x326849='';try{_0x326849=await _0x2966a5['QwwyY'](readFile,_0x39327b,_0x26ae72(0x96));}catch{return![];}const _0x3a0875=_0x326849['split'](/\r?\n/);if(_0x3a0875[_0x26ae72(0xc0)](_0x44cd0d=>_0x44cd0d['trim']()==='active-profile.txt'))return![];let _0x46a078=_0x3a0875['findIndex'](_0x1c790c=>_0x1c790c['trim']()===_0x26ae72(0xb5));_0x46a078===-0x1&&(_0x46a078=_0x3a0875[_0x26ae72(0x99)]);_0x3a0875['splice'](_0x46a078,0x0,_0x26ae72(0xb7));let _0x14c527=_0x3a0875['join']('\x0a');!_0x14c527[_0x26ae72(0x8e)]('\x0a')&&(_0x14c527+='\x0a');try{await writeFile(_0x39327b,_0x14c527,_0x2966a5['xGZxP']);}catch{return![];}return!![];}export async function update(){const _0x443541=_0x319d3e,_0x582258={'pqxgw':function(_0x4cd346){return _0x4cd346();},'tGSIB':function(_0x3e2b2d,_0x2185d5){return _0x3e2b2d!==_0x2185d5;},'uFSon':_0x443541(0x8f),'FvOKa':function(_0x12f1ef,_0x2827e3){return _0x12f1ef(_0x2827e3);},'PvOFb':function(_0x1c8356,_0x5102d5){return _0x1c8356(_0x5102d5);},'FHMjF':'\x0a✅\x20Update\x20complete!','KwjxE':'Checking\x20for\x20updates...','Uikyw':_0x443541(0xa4),'vOiET':function(_0x4c776c,_0x932b05){return _0x4c776c===_0x932b05;},'BZlqp':_0x443541(0x7f),'DVxrR':function(_0x34172f,_0x123649){return _0x34172f<_0x123649;},'amaot':'Update\x20failed.','XHjRq':function(_0x88c11e,_0xd2f52f){return _0x88c11e(_0xd2f52f);},'sVYFR':_0x443541(0x9f),'ZfUhK':'user','JDTQm':function(_0x17bdff,_0x477a7b){return _0x17bdff(_0x477a7b);},'cWntA':'local'},_0x1ef7db=_0x582258[_0x443541(0xc2)](getCurrentVersion);console['log']('\x0aCurrent\x20version:\x20'+_0x1ef7db);const _0x4ea1c4=resolveDistTag(_0x1ef7db);if(_0x582258[_0x443541(0xa2)](_0x4ea1c4,_0x582258['uFSon'])){console['log']('Prerelease\x20channel\x20detected\x20(@'+_0x4ea1c4+').\x20Staying\x20on\x20'+_0x4ea1c4+'\x20—\x20reinstalling\x20@'+_0x4ea1c4+'...');const _0x52830b=await _0x582258['FvOKa'](runInstall,_0x4ea1c4);if(!_0x52830b)throw new Error(_0x443541(0x89)+_0x4ea1c4+'\x20channel.');const _0xbf091d=getCurrentVersion();console['log']('\x0aSuccessfully\x20installed\x20'+PACKAGE_NAME+'@'+_0x4ea1c4+'.'),await _0x582258['PvOFb'](reinstallSkills,_0xbf091d),await ensureActiveProfileGitignored(),console['log'](_0x582258['FHMjF']);return;}console[_0x443541(0xc5)](_0x582258['KwjxE']);const _0x4327f4=getLatestVersion();let _0x3d0052=_0x1ef7db;if(!_0x4327f4['version']){console[_0x443541(0xa3)]('\x0aCould\x20not\x20check\x20latest\x20version:\x20'+_0x4327f4['error']),console[_0x443541(0xc5)](_0x443541(0x92));const _0x4dae8e=await _0x582258['pqxgw'](runInstall);if(_0x4dae8e)console[_0x443541(0xc5)](_0x582258[_0x443541(0x8c)]),_0x3d0052=getCurrentVersion();else throw new Error('Update\x20failed:\x20'+_0x4327f4['error']);}else{const _0x1d9030=_0x4327f4[_0x443541(0x93)];console['log']('Latest\x20version:\x20\x20'+_0x1d9030);const _0x27b589=compareVersions(_0x1ef7db,_0x1d9030);if(_0x582258['vOiET'](_0x27b589,0x0))console['log'](_0x582258[_0x443541(0x78)]);else{if(_0x582258[_0x443541(0xc6)](_0x27b589,0x0))console['log']('\x0aYour\x20version\x20('+_0x1ef7db+')\x20is\x20newer\x20than\x20the\x20published\x20version\x20('+_0x1d9030+').');else{const _0x45b21a=await _0x582258[_0x443541(0xc2)](runInstall);if(_0x45b21a)console['log'](_0x443541(0x83)+_0x1d9030),_0x3d0052=_0x1d9030;else throw new Error(_0x582258[_0x443541(0x8d)]);}}}await reinstallSkills(_0x3d0052);const _0x31c3c6=await _0x582258['XHjRq'](isMarketplaceAdded,'trailhead'),_0x3c8b6b=await _0x582258[_0x443541(0xa5)](isPluginInstalled,'ranger@trailhead');_0x31c3c6&&(await updateClaudeMarketplace(),console['log'](_0x582258['sVYFR']));if(_0x3c8b6b){const _0x57441e=await getPluginInfo(_0x443541(0xac)),_0x286863=_0x57441e?.[_0x443541(0x82)]??_0x582258[_0x443541(0x85)];await _0x582258[_0x443541(0xa0)](updateClaudePlugin,_0x286863);if(_0x286863===_0x443541(0xc4))console[_0x443541(0xc5)]('\x0aClaude\x20plugin\x20updated\x20(project\x20scope).');else _0x582258['vOiET'](_0x286863,_0x582258['cWntA'])?console['log'](_0x443541(0xb1)):console[_0x443541(0xc5)](_0x443541(0xb6));}const _0x2201d0=await _0x582258['pqxgw'](ensureActiveProfileGitignored);console[_0x443541(0xc5)](_0x443541(0xb2));}
@@ -1 +1 @@
1
- (function(_0xe40305,_0x2faeb5){const _0x5567f6=_0x592f,_0x2c302a=_0xe40305();while(!![]){try{const _0x377b1b=parseInt(_0x5567f6(0x1d7))/0x1+parseInt(_0x5567f6(0x1a8))/0x2*(parseInt(_0x5567f6(0x1ca))/0x3)+-parseInt(_0x5567f6(0x1bd))/0x4*(-parseInt(_0x5567f6(0x1d6))/0x5)+-parseInt(_0x5567f6(0x1b7))/0x6+parseInt(_0x5567f6(0x1aa))/0x7+parseInt(_0x5567f6(0x1b3))/0x8+-parseInt(_0x5567f6(0x1c6))/0x9;if(_0x377b1b===_0x2faeb5)break;else _0x2c302a['push'](_0x2c302a['shift']());}catch(_0x1c933f){_0x2c302a['push'](_0x2c302a['shift']());}}}(_0x5bd9,0x22d18));import{writeFile,readFile,unlink}from'fs/promises';import{join}from'path';function _0x5bd9(){const _0x4c824c=['Non-interactive\x20mode\x20detected.\x0aThe\x20\x22ranger\x20profile\x20update\x22\x20command\x20requires\x20interactive\x20browser\x20authentication\x20and\x20cannot\x20be\x20run\x20in\x20non-TTY\x20environments\x20(CI,\x20scripts,\x20Claude\x20Code).\x0aTo\x20update\x20profile\x20authentication:\x0a\x20\x201.\x20Run\x20\x22ranger\x20profile\x20update\x20<name>\x22\x20in\x20an\x20interactive\x20terminal\x0a\x20\x202.\x20Commit\x20the\x20updated\x20encrypted\x20auth\x20file\x20to\x20git','\x20\x20Could\x20not\x20encrypt:\x20No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','baseUrl','1517322BXCiHs','stringify','close','newPage','BEwac','utf-8','36XiFRAU','tjewN','goto','auth.json','config_write','\x20\x20\x20Update\x20your\x20authentication\x20as\x20needed.','\x0a📋\x20Authentication\x20Update','isTTY','ieYmi','1207116unrlWc','ftcbD','VPMeF','error','6otmzeI','allowInsecureLocalhost','✓\x20Updated\x20config:\x20','OetrF','stdin','launch','Saving\x20authentication\x20state...','browser_auth','newContext','ISSOk','contextOptions','settings.json','53495draPno','242775LhLVdl','catch','76126BrGrVo','rtNok','47796WZhsag','.\x20Run\x20first:\x20ranger\x20profile\x20add\x20','\x20\x20Run\x20ranger\x20setup\x20in\x20CI\x20to\x20decrypt\x20at\x20runtime.','log','extraHTTPHeaders','Browser\x20closed\x20before\x20authentication\x20was\x20saved.','trackPhaseStart','browser','tuGAm','860856OIdwpu'];_0x5bd9=function(){return _0x4c824c;};return _0x5bd9();}import{existsSync}from'fs';function _0x592f(_0x3be605,_0x294c40){_0x3be605=_0x3be605-0x1a8;const _0x5bd9d7=_0x5bd9();let _0x592fe5=_0x5bd9d7[_0x3be605];return _0x592fe5;}import{chromium}from'playwright';import{encrypt}from'./utils/crypto.js';import{getToken}from'./utils/keychain.js';import{buildBrowserOptionsFromSettings,getEnvDir,isEnvCi,resolveEnvVars}from'./utils/settings.js';import{addProfileSetupBanner}from'./utils/profileSetupBanner.js';export async function updateEnv(_0x3338d2,_0x1b6dad,_0x2ab4f){const _0x357fe8=_0x592f,_0x3e16b9={'BEWjF':function(_0xd05c92){return _0xd05c92();},'ieYmi':function(_0x248c6c,_0x3dc344){return _0x248c6c(_0x3dc344);},'rtNok':_0x357fe8(0x1d5),'mebvO':'.enc','VPMeF':function(_0x346bce,_0x210f9b){return _0x346bce(_0x210f9b);},'tjewN':function(_0x20b8fc,_0x4cf686,_0x1bc9e3){return _0x20b8fc(_0x4cf686,_0x1bc9e3);},'KtOCR':'utf-8','ilNyp':'string','kFDQv':_0x357fe8(0x1c3),'BEwac':_0x357fe8(0x1c2),'OetrF':'\x20\x20\x20When\x20you\x20are\x20done,\x20close\x20the\x20browser.\x0a','ISSOk':function(_0x2cec32,_0x374911){return _0x2cec32(_0x374911);},'JsTQp':function(_0x5edee6,_0x12e837){return _0x5edee6||_0x12e837;},'zcBtn':'This\x20can\x20happen\x20due\x20to\x20a\x20browser\x20compatibility\x20issue\x20on\x20some\x20systems.\x0a','QxEpK':function(_0x332313){return _0x332313();},'tuGAm':_0x357fe8(0x1b5),'ftcbD':'\x20\x20You\x20can\x20safely\x20commit\x20this\x20file\x20to\x20git.','FwYyr':_0x357fe8(0x1ac),'KZLiq':_0x357fe8(0x1d1),'lUCuw':function(_0x28abc7,_0x51dbfe){return _0x28abc7===_0x51dbfe;}},_0x4a8c71=_0x3e16b9[_0x357fe8(0x1c5)](getEnvDir,_0x3338d2),_0x4d3ec4=join(_0x4a8c71,_0x3e16b9[_0x357fe8(0x1a9)]),_0x25bb34=join(_0x4a8c71,_0x357fe8(0x1c0)),_0x4c6f0e=_0x25bb34+_0x3e16b9['mebvO'],_0x4a2f82=process[_0x357fe8(0x1ce)][_0x357fe8(0x1c4)]&&process['stdout'][_0x357fe8(0x1c4)];if(!_0x4a2f82)throw new Error(_0x357fe8(0x1b4));if(!_0x3e16b9[_0x357fe8(0x1c8)](existsSync,_0x4a8c71))throw new Error('Profile\x20\x22'+_0x3338d2+'\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x3338d2);if(!existsSync(_0x4d3ec4))throw new Error('Config\x20not\x20found\x20at\x20'+_0x4d3ec4+_0x357fe8(0x1ab)+_0x3338d2);const _0x29363f=await _0x3e16b9['tjewN'](readFile,_0x4d3ec4,_0x3e16b9['KtOCR']),_0x55b7b0=JSON['parse'](_0x29363f),_0xe4f5e2=resolveEnvVars(_0x55b7b0),_0x457844=typeof _0xe4f5e2[_0x357fe8(0x1b6)]===_0x3e16b9['ilNyp']?_0xe4f5e2['baseUrl']:undefined,_0xa752a=existsSync(_0x25bb34),_0x3c7f68=isEnvCi(_0x3338d2);_0x1b6dad?.[_0x357fe8(0x1b0)](_0x357fe8(0x1d1)),console['log'](_0x3e16b9['kFDQv']),console[_0x357fe8(0x1ad)]('\x20\x20\x20A\x20browser\x20will\x20open\x20with\x20your\x20existing\x20session\x20(if\x20any).'),console['log'](_0x3e16b9[_0x357fe8(0x1bb)]),console[_0x357fe8(0x1ad)](_0x3e16b9[_0x357fe8(0x1cd)]);const {launchOptions:_0x16a270,contextOptions:_0x37ceab}=buildBrowserOptionsFromSettings(_0xe4f5e2,{'headless':![],'storageStatePath':_0xa752a?_0x25bb34:undefined});_0xe4f5e2['setupHeaders']&&(_0x37ceab[_0x357fe8(0x1ae)]={..._0x37ceab[_0x357fe8(0x1ae)],..._0xe4f5e2['setupHeaders']});const _0x443be9=await chromium[_0x357fe8(0x1cf)](_0x16a270);let _0x2749ee=null;try{_0x2749ee=await _0x443be9[_0x357fe8(0x1d2)](_0x37ceab),await _0x3e16b9[_0x357fe8(0x1d3)](addProfileSetupBanner,_0x2749ee);const _0x278921=await _0x2749ee[_0x357fe8(0x1ba)]();await _0x278921[_0x357fe8(0x1bf)](_0x3e16b9['JsTQp'](_0x457844,'about:blank'));let _0x110c2b=![];await new Promise(_0x17005c=>{const _0x306cf1=_0x357fe8;_0x278921['on'](_0x306cf1(0x1b9),async()=>{const _0x2afa0c=_0x306cf1;try{console['log'](_0x2afa0c(0x1d0)),await _0x2749ee?.['storageState']({'path':_0x25bb34}),_0x110c2b=!![];}catch{}_0x3e16b9['BEWjF'](_0x17005c);});});if(!_0x110c2b){console['log']('\x0aThe\x20browser\x20closed\x20unexpectedly\x20before\x20authentication\x20could\x20be\x20saved.');!_0xe4f5e2['safeMode']&&(console['log'](_0x3e16b9['zcBtn']),console['log']('Enable\x20safe\x20mode\x20and\x20try\x20again:\x20ranger\x20profile\x20config\x20set\x20'+_0x3338d2+'\x20safeMode\x20true\x0a'));throw new Error(_0x357fe8(0x1af));}}finally{_0x2749ee&&await _0x2749ee[_0x357fe8(0x1b9)]()[_0x357fe8(0x1d8)](()=>{}),await _0x443be9['close']()['catch'](()=>{});}if(_0x3c7f68){const _0x182f2b=await readFile(_0x25bb34,_0x357fe8(0x1bc)),_0x2c7b36=await _0x3e16b9['QxEpK'](getToken);if(!_0x2c7b36)console[_0x357fe8(0x1c9)](_0x3e16b9[_0x357fe8(0x1b2)]),console['log']('✓\x20Auth\x20state\x20saved\x20to:\x20'+_0x25bb34);else{const _0x512acf=_0x3e16b9[_0x357fe8(0x1be)](encrypt,_0x182f2b,_0x2c7b36);await writeFile(_0x4c6f0e,_0x512acf),await _0x3e16b9['ISSOk'](unlink,_0x25bb34),console[_0x357fe8(0x1ad)]('✓\x20Encrypted\x20auth\x20saved\x20to:\x20'+_0x4c6f0e),console[_0x357fe8(0x1ad)](_0x3e16b9[_0x357fe8(0x1c7)]),console[_0x357fe8(0x1ad)](_0x3e16b9['FwYyr']);}}else console['log']('✓\x20Auth\x20state\x20saved\x20to:\x20'+_0x25bb34);_0x1b6dad?.['trackPhaseEnd'](_0x3e16b9['KZLiq']),_0x1b6dad?.[_0x357fe8(0x1b0)](_0x357fe8(0x1c1)),_0x55b7b0['browser']=_0x55b7b0[_0x357fe8(0x1b1)]||{},_0x55b7b0['browser'][_0x357fe8(0x1d4)]=_0x55b7b0['browser'][_0x357fe8(0x1d4)]||{},_0x55b7b0[_0x357fe8(0x1b1)]['contextOptions']['storageState']=_0x25bb34,_0x3e16b9['lUCuw'](_0x2ab4f?.[_0x357fe8(0x1cb)],!![])&&(_0x55b7b0['allowInsecureLocalhost']=!![]),await writeFile(_0x4d3ec4,JSON[_0x357fe8(0x1b8)](_0x55b7b0,null,0x2)),console['log'](_0x357fe8(0x1cc)+_0x4d3ec4),_0x1b6dad?.['trackPhaseEnd']('config_write'),console['log']('\x0a✅\x20Profile\x20\x22'+_0x3338d2+'\x22\x20authentication\x20updated');}
1
+ function _0x52c6(){var _0x5c02be=['250foJpVz','9YPzCnN','622904HelFKg','10305612kwknKL','3729376pweEDl','4pVDZzR','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','4269880mIlxBt','zkTuk','16DRWPEE','\x20\x20https://docs.ranger.net/main/concepts/profiles','238156zCOrSJ','vYPeH','JNUNa','160566GJiGuS','33509575AfChtg'];_0x52c6=function(){return _0x5c02be;};return _0x52c6();}function _0x5ea1(_0x2a1b0d,_0xcb892e){_0x2a1b0d=_0x2a1b0d-0x1ca;var _0x52c6ad=_0x52c6();var _0x5ea106=_0x52c6ad[_0x2a1b0d];return _0x5ea106;}(function(_0x2a7de8,_0x3159f1){var _0x470379=_0x5ea1,_0x3b2f5d=_0x2a7de8();while(!![]){try{var _0x20102f=-parseInt(_0x470379(0x1d9))/0x1*(parseInt(_0x470379(0x1cc))/0x2)+-parseInt(_0x470379(0x1d8))/0x3*(parseInt(_0x470379(0x1d2))/0x4)+parseInt(_0x470379(0x1d7))/0x5*(-parseInt(_0x470379(0x1d5))/0x6)+parseInt(_0x470379(0x1cb))/0x7*(-parseInt(_0x470379(0x1d0))/0x8)+parseInt(_0x470379(0x1ca))/0x9+parseInt(_0x470379(0x1ce))/0xa+parseInt(_0x470379(0x1d6))/0xb;if(_0x20102f===_0x3159f1)break;else _0x3b2f5d['push'](_0x3b2f5d['shift']());}catch(_0x153732){_0x3b2f5d['push'](_0x3b2f5d['shift']());}}}(_0x52c6,0xc0f62));export async function updateEnv(_0x550e14,_0x21227a,_0x5cec22){var _0x2ec659=_0x5ea1,_0x51d55a={'zkTuk':function(_0x3ca76e,_0x2d23be){return _0x3ca76e+_0x2d23be;},'JNUNa':function(_0x247d50,_0x425cd5){return _0x247d50+_0x425cd5;},'Iogim':'ranger\x20profile\x20update\x20is\x20no\x20longer\x20supported.\x20To\x20refresh\x20authentication,\x0a','vYPeH':_0x2ec659(0x1cd),'khXjH':_0x2ec659(0x1d1)};console['error'](_0x51d55a[_0x2ec659(0x1cf)](_0x51d55a[_0x2ec659(0x1d4)](_0x51d55a[_0x2ec659(0x1cf)](_0x51d55a['Iogim']+'re-run\x20the\x20same\x20setup\x20that\x20created\x20the\x20profile:\x0a','\x0a'),'\x20\x20ranger\x20profile\x20add\x20<name>\x0a'),'\x0a')+_0x51d55a[_0x2ec659(0x1d3)]+_0x51d55a['khXjH']),process['exit'](0x1);}
@@ -1 +1 @@
1
- (function(_0xb8be55,_0x3b2296){const _0x5e8cd1=_0x2cdf,_0x2bb64c=_0xb8be55();while(!![]){try{const _0x1e507d=-parseInt(_0x5e8cd1(0x1ba))/0x1*(-parseInt(_0x5e8cd1(0x1af))/0x2)+-parseInt(_0x5e8cd1(0x1bc))/0x3*(parseInt(_0x5e8cd1(0x1ae))/0x4)+-parseInt(_0x5e8cd1(0x1b0))/0x5+-parseInt(_0x5e8cd1(0x1bb))/0x6+parseInt(_0x5e8cd1(0x1bd))/0x7*(-parseInt(_0x5e8cd1(0x1ad))/0x8)+parseInt(_0x5e8cd1(0x1b1))/0x9*(-parseInt(_0x5e8cd1(0x1b8))/0xa)+parseInt(_0x5e8cd1(0x1b7))/0xb*(parseInt(_0x5e8cd1(0x1b5))/0xc);if(_0x1e507d===_0x3b2296)break;else _0x2bb64c['push'](_0x2bb64c['shift']());}catch(_0x3ed95d){_0x2bb64c['push'](_0x2bb64c['shift']());}}}(_0x33ac,0xdb530));import{join}from'path';import{existsSync}from'fs';function _0x33ac(){const _0x122342=['10307ONOBYi','730WjIJtt','log','4yjOUOn','10212330KrgPjD','18NaHmGQ','4480yUkSXO','9496rqehnG','179836Hnklmc','538402rtlEZV','3384120hEodsW','48978JaPOlb','fHYQE','settings.json','Config\x20not\x20found\x20at\x20','46452UpMOoH','\x0a✓\x20Now\x20using\x20profile\x20\x22'];_0x33ac=function(){return _0x122342;};return _0x33ac();}import{getEnvDir}from'./utils/settings.js';import{writeActiveProfileName}from'./utils/activeProfile.js';function _0x2cdf(_0xc0939d,_0xc42664){_0xc0939d=_0xc0939d-0x1ad;const _0x33acc5=_0x33ac();let _0x2cdfbc=_0x33acc5[_0xc0939d];return _0x2cdfbc;}export async function useEnv(_0x4555e6){const _0x56caf5=_0x2cdf,_0x54f4c2={'gueQX':function(_0x45d585,_0x568f2a){return _0x45d585(_0x568f2a);},'fHYQE':function(_0x175085,_0x526daa,_0x3b0b68){return _0x175085(_0x526daa,_0x3b0b68);}},_0xbe561e=_0x54f4c2['gueQX'](getEnvDir,_0x4555e6),_0x461486=_0x54f4c2[_0x56caf5(0x1b2)](join,_0xbe561e,_0x56caf5(0x1b3));if(!_0x54f4c2['gueQX'](existsSync,_0xbe561e))throw new Error('Profile\x20\x22'+_0x4555e6+'\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x4555e6);if(!existsSync(_0x461486))throw new Error(_0x56caf5(0x1b4)+_0x461486+'.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x4555e6);await writeActiveProfileName(_0x4555e6),console[_0x56caf5(0x1b9)](_0x56caf5(0x1b6)+_0x4555e6+'\x22');}
1
+ (function(_0x7f8be9,_0x4a1772){const _0x5cc6e3=_0x5c98,_0x12e086=_0x7f8be9();while(!![]){try{const _0x534bd9=parseInt(_0x5cc6e3(0x1a9))/0x1*(-parseInt(_0x5cc6e3(0x1b2))/0x2)+-parseInt(_0x5cc6e3(0x1aa))/0x3+-parseInt(_0x5cc6e3(0x1b5))/0x4+parseInt(_0x5cc6e3(0x1b4))/0x5+parseInt(_0x5cc6e3(0x1ae))/0x6*(parseInt(_0x5cc6e3(0x1ad))/0x7)+-parseInt(_0x5cc6e3(0x1a8))/0x8*(parseInt(_0x5cc6e3(0x1b0))/0x9)+-parseInt(_0x5cc6e3(0x1ac))/0xa*(parseInt(_0x5cc6e3(0x1b3))/0xb);if(_0x534bd9===_0x4a1772)break;else _0x12e086['push'](_0x12e086['shift']());}catch(_0x252658){_0x12e086['push'](_0x12e086['shift']());}}}(_0x3317,0x4111c));import{join}from'path';import{existsSync}from'fs';function _0x3317(){const _0x327234=['111013oKOmkF','443475sVbOow','`\x20to\x20create\x20one.','1389810XaBpea','14tdvSqm','1497198Nhjqqa','log','225zIAPQX','Profile\x20\x22','2qwTJVt','22XParLY','2146250kHjdFa','129668SmxNAB','\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x20','VXYSW','29624EtpoNr'];_0x3317=function(){return _0x327234;};return _0x3317();}function _0x5c98(_0x5dfba1,_0x40532a){_0x5dfba1=_0x5dfba1-0x1a8;const _0x3317d3=_0x3317();let _0x5c98da=_0x3317d3[_0x5dfba1];return _0x5c98da;}import{getEnvDir}from'./utils/settings.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{ApiError,fetchCloudProfile}from'./utils/cloudProfile.js';export async function useEnv(_0x2427ea){const _0x59177e=_0x5c98,_0x44dc65={'VXYSW':function(_0x1d3f87,_0x2f6372){return _0x1d3f87(_0x2f6372);},'lmZJf':function(_0x2a6b88,_0x506296,_0x21047b){return _0x2a6b88(_0x506296,_0x21047b);},'PNkJn':function(_0x31c2ec,_0x46c9a6){return _0x31c2ec(_0x46c9a6);},'wHWeo':function(_0x12ae3c,_0x2b8d8e){return _0x12ae3c===_0x2b8d8e;},'DHeIk':function(_0x11aec2,_0x1e46bc){return _0x11aec2+_0x1e46bc;}},_0x2b77f6=_0x44dc65['VXYSW'](getEnvDir,_0x2427ea),_0x2daa94=_0x44dc65['lmZJf'](join,_0x2b77f6,'settings.json'),_0xe7aa8=_0x44dc65['PNkJn'](existsSync,_0x2b77f6)&&_0x44dc65[_0x59177e(0x1b7)](existsSync,_0x2daa94);if(_0xe7aa8){await writeActiveProfileName(_0x2427ea),console[_0x59177e(0x1af)]('\x0a✓\x20Now\x20using\x20profile\x20\x22'+_0x2427ea+'\x22');return;}let _0xc59bf1=null,_0x49d169=![];try{_0xc59bf1=await _0x44dc65[_0x59177e(0x1b7)](fetchCloudProfile,_0x2427ea);if(!_0xc59bf1)_0x49d169=!![];}catch(_0x30c71d){_0x30c71d instanceof ApiError&&_0x44dc65['wHWeo'](_0x30c71d['status'],0x194)&&(_0x49d169=!![]);}if(_0x49d169)throw new Error(_0x44dc65['DHeIk'](_0x44dc65['DHeIk'](_0x59177e(0x1b1)+_0x2427ea+_0x59177e(0x1b6),'Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20'),'`ranger\x20profile\x20add\x20'+_0x2427ea+_0x59177e(0x1ab)));await _0x44dc65['VXYSW'](writeActiveProfileName,_0x2427ea),console['log']('\x0a✓\x20Now\x20using\x20profile\x20\x22'+_0x2427ea+'\x22');}
@@ -1 +1 @@
1
- (function(_0x1b4975,_0x47e486){const _0x243cc0=_0x5160,_0x1061e1=_0x1b4975();while(!![]){try{const _0x484ccf=-parseInt(_0x243cc0(0xe4))/0x1*(parseInt(_0x243cc0(0xf2))/0x2)+parseInt(_0x243cc0(0xe9))/0x3*(-parseInt(_0x243cc0(0xe1))/0x4)+-parseInt(_0x243cc0(0xe7))/0x5*(-parseInt(_0x243cc0(0xed))/0x6)+parseInt(_0x243cc0(0xf3))/0x7+-parseInt(_0x243cc0(0xe2))/0x8*(-parseInt(_0x243cc0(0xe5))/0x9)+parseInt(_0x243cc0(0xe3))/0xa*(-parseInt(_0x243cc0(0xe6))/0xb)+parseInt(_0x243cc0(0xe0))/0xc*(parseInt(_0x243cc0(0xeb))/0xd);if(_0x484ccf===_0x47e486)break;else _0x1061e1['push'](_0x1061e1['shift']());}catch(_0x547b88){_0x1061e1['push'](_0x1061e1['shift']());}}}(_0x26b4,0x45bf0));import{existsSync}from'fs';function _0x26b4(){const _0x4a210e=['646088BKdoaw','12660GDKodY','34019SwLFvO','9UjyRAk','1804RUCkuY','335zdRBVX','VbroB','60NbSqOY','sMReL','260sPZaXf','Vnpdr','50664jOKqAn','trim','utf-8','UNatP','VApje','6eDozUW','1457624oGFVMi','onydf','61212ywnfCi','72280SWLXCZ'];_0x26b4=function(){return _0x4a210e;};return _0x26b4();}import{mkdir,readFile,rename,unlink,writeFile}from'fs/promises';function _0x5160(_0x1a91a2,_0x1aadca){_0x1a91a2=_0x1a91a2-0xdf;const _0x26b484=_0x26b4();let _0x516083=_0x26b484[_0x1a91a2];return _0x516083;}import{join}from'path';import{getRangerDir}from'./rangerRoot.js';const ACTIVE_PROFILE_FILE='active-profile.txt',LEGACY_ACTIVE_ENV_FILE='active-env.txt';function getActiveProfilePath(){const _0x18556b=_0x5160,_0x8e3186={'Vnpdr':function(_0x3f92fb,_0x243cf6,_0x3bffca){return _0x3f92fb(_0x243cf6,_0x3bffca);}};return _0x8e3186[_0x18556b(0xec)](join,getRangerDir(),ACTIVE_PROFILE_FILE);}function getLegacyActiveEnvPath(){const _0x56040e={'oYgeU':function(_0x27d5e8){return _0x27d5e8();}};return join(_0x56040e['oYgeU'](getRangerDir),LEGACY_ACTIVE_ENV_FILE);}async function migrateLegacyActiveEnv(){const _0x291ea7=_0x5160,_0x38d5c2={'KTvjo':function(_0xb7d8d,_0x9fba8){return _0xb7d8d(_0x9fba8);},'UNatP':function(_0xd6208c){return _0xd6208c();},'IkoGk':'utf-8','onydf':function(_0x14663f,_0x35b3a9){return _0x14663f(_0x35b3a9);}},_0x59f219=getLegacyActiveEnvPath();if(!_0x38d5c2['KTvjo'](existsSync,_0x59f219))return null;let _0x259ff6=null;try{_0x259ff6=(await readFile(_0x59f219,_0x291ea7(0xef)))['trim']()||null;}catch{_0x259ff6=null;}if(!_0x259ff6)return null;const _0x4274a7=getActiveProfilePath();try{await rename(_0x59f219,_0x4274a7);}catch{try{const _0x25f206=_0x38d5c2[_0x291ea7(0xf0)](getRangerDir);await mkdir(_0x25f206,{'recursive':!![]}),await writeFile(_0x4274a7,_0x259ff6,_0x38d5c2['IkoGk']),await _0x38d5c2[_0x291ea7(0xdf)](unlink,_0x59f219);}catch{}}return _0x259ff6;}export async function readActiveProfileName(){const _0x3eb1b3=_0x5160,_0x45f1d3={'AbqwO':function(_0x4cfd5a){return _0x4cfd5a();},'bincC':function(_0x49393e,_0x11a16d){return _0x49393e(_0x11a16d);},'sVERa':_0x3eb1b3(0xef)},_0x3b22da=_0x45f1d3['AbqwO'](getActiveProfilePath);if(_0x45f1d3['bincC'](existsSync,_0x3b22da))try{return(await readFile(_0x3b22da,_0x45f1d3['sVERa']))[_0x3eb1b3(0xee)]()||null;}catch{return null;}return await migrateLegacyActiveEnv();}export async function writeActiveProfileName(_0x14cafd){const _0x986f1a=_0x5160,_0x22fb0d={'VbroB':function(_0x3daec7){return _0x3daec7();},'VApje':function(_0x1cd1e5,_0x374d18,_0x4b00dc){return _0x1cd1e5(_0x374d18,_0x4b00dc);},'TUciq':'utf-8','sMReL':function(_0x19b759,_0x4ddbd3){return _0x19b759(_0x4ddbd3);}},_0x7f5df=_0x22fb0d[_0x986f1a(0xe8)](getRangerDir);await _0x22fb0d[_0x986f1a(0xf1)](mkdir,_0x7f5df,{'recursive':!![]});const _0x4c5710=_0x22fb0d['VbroB'](getActiveProfilePath);await writeFile(_0x4c5710,_0x14cafd,_0x22fb0d['TUciq']);const _0x30a380=getLegacyActiveEnvPath();if(existsSync(_0x30a380))try{await _0x22fb0d[_0x986f1a(0xea)](unlink,_0x30a380);}catch{}}export async function migrateActiveProfileFile(){const _0x38126f=await migrateLegacyActiveEnv();return _0x38126f!==null;}
1
+ (function(_0x410cc9,_0x81aa8d){const _0x106e78=_0x4adb,_0x262818=_0x410cc9();while(!![]){try{const _0x1289aa=parseInt(_0x106e78(0xe8))/0x1*(parseInt(_0x106e78(0xf3))/0x2)+parseInt(_0x106e78(0xf8))/0x3*(-parseInt(_0x106e78(0xf7))/0x4)+parseInt(_0x106e78(0xed))/0x5+parseInt(_0x106e78(0xf1))/0x6*(-parseInt(_0x106e78(0xfa))/0x7)+-parseInt(_0x106e78(0xeb))/0x8*(-parseInt(_0x106e78(0xf0))/0x9)+-parseInt(_0x106e78(0xee))/0xa*(parseInt(_0x106e78(0xec))/0xb)+parseInt(_0x106e78(0xf2))/0xc*(-parseInt(_0x106e78(0xe7))/0xd);if(_0x1289aa===_0x81aa8d)break;else _0x262818['push'](_0x262818['shift']());}catch(_0x258932){_0x262818['push'](_0x262818['shift']());}}}(_0x5dde,0x71bfc));import{existsSync}from'fs';import{readFile}from'fs/promises';import{join}from'path';import{getRangerDir,getRangerHomeDir}from'./rangerRoot.js';import{readLastProfile,writeLastProfile}from'./projectsConfig.js';const LEGACY_ACTIVE_PROFILE_FILE='active-profile.txt',LEGACY_ACTIVE_ENV_FILE='active-env.txt';function readLegacyActiveProfileFile(){const _0x238a6b=_0x4adb,_0x1f1ea1={'MyInY':function(_0x4db46f,_0x5d395f,_0x47ec7b){return _0x4db46f(_0x5d395f,_0x47ec7b);},'kDoYX':function(_0x3a5d7b){return _0x3a5d7b();},'mLeqd':function(_0x131e9a,_0x28d17c,_0x4c18ca){return _0x131e9a(_0x28d17c,_0x4c18ca);},'nHvkm':function(_0x3b36e1){return _0x3b36e1();},'nwZfk':function(_0xad16b3){return _0xad16b3();},'gdfqi':function(_0x2f308e,_0x13aeb,_0x1b1330){return _0x2f308e(_0x13aeb,_0x1b1330);},'rtIHp':function(_0x3b869a){return _0x3b869a();},'vXxOV':function(_0x40aa3e,_0x32894b){return _0x40aa3e(_0x32894b);}},_0x402dee=[_0x1f1ea1['MyInY'](join,_0x1f1ea1['kDoYX'](getRangerDir),LEGACY_ACTIVE_PROFILE_FILE),_0x1f1ea1[_0x238a6b(0xf6)](join,_0x1f1ea1['nHvkm'](getRangerHomeDir),LEGACY_ACTIVE_PROFILE_FILE),join(_0x1f1ea1[_0x238a6b(0xe9)](getRangerDir),LEGACY_ACTIVE_ENV_FILE),_0x1f1ea1[_0x238a6b(0xf4)](join,_0x1f1ea1['rtIHp'](getRangerHomeDir),LEGACY_ACTIVE_ENV_FILE)];for(const _0x3cd142 of _0x402dee){if(_0x1f1ea1['vXxOV'](existsSync,_0x3cd142))return _0x3cd142;}return null;}function _0x5dde(){const _0x4f32b9=['413010VJvzdI','yyjQw','18AvlIoe','174zZEpFx','140880kgoMNy','56986DCwzRM','gdfqi','utf-8','mLeqd','428480GIxVLp','9WEcdlX','cwd','49413TOTYdw','247mcvEdW','1QiHMDQ','nwZfk','FfhMw','1561024vnOxhU','33PzOIWZ','4601005MdJoiu'];_0x5dde=function(){return _0x4f32b9;};return _0x5dde();}export async function readActiveProfileName(){const _0x26e25c=_0x4adb,_0x2d7544={'FfhMw':function(_0x5195a7){return _0x5195a7();},'yyjQw':_0x26e25c(0xf5)},_0x30b04a=readLastProfile(process['cwd']());if(_0x30b04a)return _0x30b04a;const _0x486b6b=_0x2d7544[_0x26e25c(0xea)](readLegacyActiveProfileFile);if(!_0x486b6b)return null;try{return(await readFile(_0x486b6b,_0x2d7544[_0x26e25c(0xef)]))['trim']()||null;}catch{return null;}}function _0x4adb(_0x11f249,_0xd77b1e){_0x11f249=_0x11f249-0xe7;const _0x5ddeb3=_0x5dde();let _0x4adb87=_0x5ddeb3[_0x11f249];return _0x4adb87;}export async function writeActiveProfileName(_0x188e3d){const _0x5c1f95=_0x4adb,_0x178caa={'QFqss':function(_0x5800f1,_0x5dda73,_0x2f35c5){return _0x5800f1(_0x5dda73,_0x2f35c5);}};_0x178caa['QFqss'](writeLastProfile,process[_0x5c1f95(0xf9)](),_0x188e3d);}