@ranger-testing/ranger-cli 2.0.6 → 2.1.0

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 (62) hide show
  1. package/build/cli.js +1 -1
  2. package/build/commands/addEnv.js +1 -1
  3. package/build/commands/authEncrypt.js +1 -1
  4. package/build/commands/clean.js +1 -1
  5. package/build/commands/config.js +1 -1
  6. package/build/commands/env.js +1 -1
  7. package/build/commands/feature.js +1 -1
  8. package/build/commands/hook.js +1 -1
  9. package/build/commands/hooks/autoPrompt.js +1 -1
  10. package/build/commands/hooks/disable.js +1 -1
  11. package/build/commands/hooks/enable.js +1 -1
  12. package/build/commands/hooks/exitPlanMode.js +1 -1
  13. package/build/commands/hooks/index.js +1 -1
  14. package/build/commands/hooks/output.js +1 -1
  15. package/build/commands/hooks/planReminder.js +1 -1
  16. package/build/commands/hooks/planStart.js +1 -1
  17. package/build/commands/hooks/postEdit.js +1 -1
  18. package/build/commands/hooks/preCompact.js +1 -1
  19. package/build/commands/hooks/sessionEnd.js +1 -1
  20. package/build/commands/hooks/sessionStart.js +1 -1
  21. package/build/commands/hooks/stopHook.js +1 -1
  22. package/build/commands/index.js +1 -1
  23. package/build/commands/login.js +1 -1
  24. package/build/commands/setup/claude.js +1 -0
  25. package/build/commands/setup/opencode.js +1 -0
  26. package/build/commands/setupCi.js +1 -1
  27. package/build/commands/skillup.js +1 -1
  28. package/build/commands/start.js +1 -1
  29. package/build/commands/status.js +1 -1
  30. package/build/commands/update.js +1 -1
  31. package/build/commands/updateEnv.js +1 -1
  32. package/build/commands/useEnv.js +1 -1
  33. package/build/commands/utils/activeProfile.js +1 -1
  34. package/build/commands/utils/browserSessionsApi.js +1 -1
  35. package/build/commands/utils/claudeConfig.js +1 -1
  36. package/build/commands/utils/claudePlugin.js +1 -1
  37. package/build/commands/utils/crypto.js +1 -1
  38. package/build/commands/utils/desirePathLog.js +1 -1
  39. package/build/commands/utils/deviceAuth.js +1 -1
  40. package/build/commands/utils/environment.js +1 -1
  41. package/build/commands/utils/featureApi.js +1 -1
  42. package/build/commands/utils/featureReportGenerator.js +1 -1
  43. package/build/commands/utils/fixWebmDuration.js +1 -0
  44. package/build/commands/utils/git.js +1 -1
  45. package/build/commands/utils/keychain.js +1 -1
  46. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  47. package/build/commands/utils/opencodeConfig.js +1 -0
  48. package/build/commands/utils/profileMessages.js +1 -1
  49. package/build/commands/utils/profileSetupBanner.js +1 -1
  50. package/build/commands/utils/rangerRoot.js +1 -1
  51. package/build/commands/utils/reportGenerator.js +1 -1
  52. package/build/commands/utils/retry.js +1 -1
  53. package/build/commands/utils/sessionCache.js +1 -1
  54. package/build/commands/utils/settings.js +1 -1
  55. package/build/commands/utils/skillContent.js +1 -1
  56. package/build/commands/utils/skills.js +1 -1
  57. package/build/commands/utils/telemetry.js +1 -1
  58. package/build/commands/utils/userApi.js +1 -1
  59. package/build/commands/utils/version.js +1 -1
  60. package/build/commands/verifyFeature.js +1 -1
  61. package/build/commands/verifyInBrowser.js +1 -1
  62. package/package.json +4 -1
@@ -0,0 +1 @@
1
+ (function(_0x134a2e,_0x2bd2a8){const _0x380d19=_0x265e,_0x1a86f6=_0x134a2e();while(!![]){try{const _0x3b5448=parseInt(_0x380d19(0xb7))/0x1+parseInt(_0x380d19(0xbf))/0x2+-parseInt(_0x380d19(0xae))/0x3*(-parseInt(_0x380d19(0xaf))/0x4)+-parseInt(_0x380d19(0xc3))/0x5*(parseInt(_0x380d19(0xb8))/0x6)+-parseInt(_0x380d19(0xc0))/0x7*(parseInt(_0x380d19(0xb1))/0x8)+parseInt(_0x380d19(0xb2))/0x9*(-parseInt(_0x380d19(0xb3))/0xa)+-parseInt(_0x380d19(0xb4))/0xb*(-parseInt(_0x380d19(0xc8))/0xc);if(_0x3b5448===_0x2bd2a8)break;else _0x1a86f6['push'](_0x1a86f6['shift']());}catch(_0x3ee51f){_0x1a86f6['push'](_0x1a86f6['shift']());}}}(_0x590e,0xb2380));import{join}from'path';function _0x265e(_0x418111,_0x23b790){_0x418111=_0x418111-0xae;const _0x590e6d=_0x590e();let _0x265e15=_0x590e6d[_0x418111];return _0x265e15;}import{existsSync}from'fs';import{mkdir,readFile,writeFile}from'fs/promises';import _0x3f4949 from'inquirer';function _0x590e(){const _0x14d712=['3268578fjSqYa','4qtHdye','opencode.json','12768dARkxX','336123MnmMee','140Mvwytf','99tJehYb','pluginScope','prompt','517100lsnbqm','462558dBWMmP','oHDwd','HIzoh','aguWB','@ranger-testing/opencode-plugin','Project\x20(shared\x20with\x20team\x20via\x20git)','Where\x20should\x20the\x20plugin\x20be\x20installed?','642146IgTnMo','1477yVVJFa','Failed\x20to\x20read\x20opencode.json','QOgBn','55DNgiWm','list','$schema','ogNft','isArray','679896GnQbab','user','plugin','log'];_0x590e=function(){return _0x14d712;};return _0x590e();}import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';export async function ensureOpencodePluginConfig(_0xfba701){const _0x25c9ac=_0x265e,_0x5d5a52={'oHDwd':function(_0x10b999,_0x1f02c8){return _0x10b999(_0x1f02c8);},'aguWB':'project','ogNft':_0x25c9ac(0xc9),'QOgBn':function(_0x127cf5,_0x342397){return _0x127cf5(_0x342397);},'HIzoh':function(_0x295b3b,_0x1ad91a,_0x42bf33){return _0x295b3b(_0x1ad91a,_0x42bf33);},'YZICT':'✓\x20OpenCode\x20plugin\x20already\x20configured','zHgpw':function(_0x4b9f1b,_0x3d7ea6,_0x246aeb){return _0x4b9f1b(_0x3d7ea6,_0x246aeb);},'eFvlu':function(_0x5a6a7d,_0x56d29c){return _0x5a6a7d+_0x56d29c;}},_0x43d226=_0x5d5a52[_0x25c9ac(0xb9)](existsSync,join(_0x5d5a52['oHDwd'](getOpencodeConfigDir,_0x5d5a52[_0x25c9ac(0xbb)]),_0x25c9ac(0xb0)));let _0x213425;if(_0xfba701)_0x213425=_0xfba701;else{if(_0x43d226)_0x213425='project';else{console[_0x25c9ac(0xcb)]('\x0a📦\x20OpenCode\x20Plugin\x0a');const _0x313bbe=await _0x3f4949[_0x25c9ac(0xb6)]([{'type':_0x25c9ac(0xc4),'name':_0x25c9ac(0xb5),'message':_0x25c9ac(0xbe),'choices':[{'name':'User\x20(available\x20in\x20all\x20your\x20projects)','value':_0x5d5a52[_0x25c9ac(0xc6)]},{'name':_0x25c9ac(0xbd),'value':_0x5d5a52['aguWB']}],'default':_0x5d5a52['ogNft']}]);_0x213425=_0x313bbe['pluginScope'];}}const _0x5657b8=join(_0x5d5a52[_0x25c9ac(0xc2)](getOpencodeConfigDir,_0x213425),'opencode.json'),_0x57b165=_0x25c9ac(0xbc),_0x412de4='https://opencode.ai/config.json';let _0x145c84={};if(existsSync(_0x5657b8))try{const _0x3f197f=await _0x5d5a52[_0x25c9ac(0xba)](readFile,_0x5657b8,'utf-8');_0x145c84=JSON['parse'](_0x3f197f);}catch(_0x5777a5){return console['error']('⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.'),{'configured':![],'scope':_0x213425,'error':_0x25c9ac(0xc1),'details':_0x5777a5};}const _0x67ad7b=Array[_0x25c9ac(0xc7)](_0x145c84['plugin'])?_0x145c84['plugin']:[];if(_0x67ad7b['includes'](_0x57b165))return console[_0x25c9ac(0xcb)](_0x5d5a52['YZICT']),{'configured':![],'scope':_0x213425};return _0x145c84[_0x25c9ac(0xc5)]=_0x145c84[_0x25c9ac(0xc5)]||_0x412de4,_0x145c84[_0x25c9ac(0xca)]=[..._0x67ad7b,_0x57b165],await _0x5d5a52['zHgpw'](mkdir,getOpencodeConfigDir(_0x213425),{'recursive':!![]}),await _0x5d5a52['zHgpw'](writeFile,_0x5657b8,_0x5d5a52['eFvlu'](JSON['stringify'](_0x145c84,null,0x2),'\x0a')),console['log']('✓\x20OpenCode\x20plugin\x20configured'),{'configured':!![],'scope':_0x213425};}
@@ -1 +1 @@
1
- (function(_0x406149,_0x3c7526){const _0x2597a1=_0x359a,_0x3fd382=_0x406149();while(!![]){try{const _0x55ea0e=-parseInt(_0x2597a1(0xa9))/0x1*(parseInt(_0x2597a1(0x9d))/0x2)+parseInt(_0x2597a1(0xa1))/0x3+parseInt(_0x2597a1(0x9e))/0x4*(-parseInt(_0x2597a1(0x83))/0x5)+parseInt(_0x2597a1(0xb8))/0x6+-parseInt(_0x2597a1(0xb3))/0x7*(parseInt(_0x2597a1(0x8f))/0x8)+-parseInt(_0x2597a1(0x90))/0x9*(-parseInt(_0x2597a1(0xa5))/0xa)+parseInt(_0x2597a1(0xa8))/0xb;if(_0x55ea0e===_0x3c7526)break;else _0x3fd382['push'](_0x3fd382['shift']());}catch(_0x21b3f5){_0x3fd382['push'](_0x3fd382['shift']());}}}(_0x1a3f,0x5daef));import{mkdir,readFile,readdir}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{authenticate,ensureRangerDir,ensureChromium,writeRangerGitignore}from'./start.js';import{skillup}from'./skillup.js';import{getRangerDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';function _0x359a(_0x5aef0b,_0xa709d3){_0x5aef0b=_0x5aef0b-0x83;const _0x1a3f8f=_0x1a3f();let _0x359a6c=_0x1a3f8f[_0x5aef0b];return _0x359a6c;}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(_0x45d57e){const _0x3d1709=_0x359a,_0x292e1d={'yDISF':function(_0x14b886){return _0x14b886();},'CfExN':function(_0x2ea2f7,_0x17d65c,_0x5d2479){return _0x2ea2f7(_0x17d65c,_0x5d2479);},'jLjgl':function(_0x39a3b8,_0x4586cd,_0x4628d4){return _0x39a3b8(_0x4586cd,_0x4628d4);},'ATeuY':function(_0x6987ed,_0x28ef7e){return _0x6987ed+_0x28ef7e;},'Mcqwi':'Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.','ZwkWD':function(_0x282952,_0x25254c,_0x20e6c7){return _0x282952(_0x25254c,_0x20e6c7);},'kQpOT':'No\x20CI\x20profiles\x20found\x20in\x20.ranger/ci/.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a','ZOckT':function(_0x490abc,_0x5eb8a5,_0x37fae5){return _0x490abc(_0x5eb8a5,_0x37fae5);}},_0x281c7e=_0x292e1d['yDISF'](getRangerDir),_0x5c90f9=_0x292e1d['CfExN'](join,_0x281c7e,'ci');if(_0x45d57e){const _0x4dbb36=_0x292e1d[_0x3d1709(0xb9)](join,_0x5c90f9,_0x45d57e);return{'name':_0x45d57e,'path':_0x4dbb36};}if(!existsSync(_0x5c90f9))throw new Error(_0x292e1d['ATeuY']('No\x20CI\x20profiles\x20found.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a',_0x292e1d['Mcqwi']));const _0x4b8f9a=await _0x292e1d['ZwkWD'](readdir,_0x5c90f9,{'withFileTypes':!![]}),_0x1d2e09=_0x4b8f9a['filter'](_0x13f97f=>_0x13f97f['isDirectory']())[_0x3d1709(0x97)](_0x53dd2e=>_0x53dd2e['name']);if(_0x1d2e09[_0x3d1709(0xa7)]===0x0)throw new Error(_0x292e1d['kQpOT']+_0x3d1709(0x98));if(_0x1d2e09[_0x3d1709(0xa7)]===0x1){const _0x311b7e=_0x1d2e09[0x0];return console[_0x3d1709(0xad)](_0x3d1709(0x9a)+_0x311b7e),{'name':_0x311b7e,'path':_0x292e1d[_0x3d1709(0xb6)](join,_0x5c90f9,_0x311b7e)};}throw new Error('Multiple\x20CI\x20profiles\x20found:\x20'+_0x1d2e09[_0x3d1709(0x8d)](',\x20')+_0x3d1709(0x93));}function _0x1a3f(){const _0x12528f=['GbVUh','name','5213930UZslyv','trackPhaseStart','length','1195414dCxGOF','4943mtwWpl','✓\x20Encrypted\x20auth\x20verified\x20(will\x20decrypt\x20at\x20runtime)','plugin','Fqbai','log','ZTtNs','oLhcw','trailhead','skills','CrnEE','613466PUpVal','chromium','Failed\x20to\x20verify\x20encrypted\x20auth\x20for\x20profile\x20\x22','ZOckT','kpooc','944556JRsVbe','jLjgl','qoMiX','215030ShMSaa','\x22:\x20','error','install','ranger@trailhead','✓\x20Auth\x20state\x20found','Xbtkh','path','Kevkm','✓\x20Marketplace\x20already\x20added','join','baseUrl','64eqbITm','9vPnrck','trackPhaseEnd','bMlIZ','.\x20Use\x20--profile\x20to\x20specify\x20which\x20one.','VRzBS','message','rhBub','map','Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.','--scope','Auto-detected\x20CI\x20profile:\x20','Failed\x20to\x20install\x20plugin:','You\x20can\x20install\x20manually:\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20project','56NwErId','4RppVAo','QyzFE','CI\x20profile\x20\x22','1436244CSPvJt','project'];_0x1a3f=function(){return _0x12528f;};return _0x1a3f();}async function installPluginNonInteractive(){const _0x5b7a64=_0x359a,_0x90ee6b={'oLhcw':function(_0x240a1a,_0x832de0){return _0x240a1a(_0x832de0);},'uQuyV':'Installing\x20Claude\x20Code\x20plugin\x20(project\x20level)...','KaKSZ':_0x5b7a64(0xb0),'Kevkm':_0x5b7a64(0xab),'kpooc':'ranger@trailhead','Fqbai':_0x5b7a64(0x9c),'jCJPN':'✓\x20Claude\x20Code\x20plugin\x20installed'},_0x42adca=await _0x90ee6b['oLhcw'](isPluginInstalled,_0x5b7a64(0x87));if(_0x42adca)return console['log']('✓\x20Claude\x20Code\x20plugin\x20already\x20installed'),![];console['log'](_0x90ee6b['uQuyV']);const _0x593de7=await isMarketplaceAdded(_0x90ee6b['KaKSZ']);let _0x57b2eb=_0x593de7;if(_0x593de7)console['log'](_0x5b7a64(0x8c));else{const _0x2a7996=await runClaudeCommand([_0x90ee6b[_0x5b7a64(0x8b)],'marketplace','add','ranger-testing/trailhead']);!_0x2a7996['success']?(console[_0x5b7a64(0x85)]('Failed\x20to\x20add\x20marketplace:',_0x2a7996['error']),console[_0x5b7a64(0xad)]('You\x20can\x20install\x20manually:\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead')):_0x57b2eb=!![];}if(_0x57b2eb){const _0x4d579a=await _0x90ee6b[_0x5b7a64(0xaf)](runClaudeCommand,['plugin',_0x5b7a64(0x86),_0x90ee6b[_0x5b7a64(0xb7)],_0x5b7a64(0x99),_0x5b7a64(0xa2)]);!_0x4d579a['success']?(console['error'](_0x5b7a64(0x9b),_0x4d579a[_0x5b7a64(0x85)]),console['log'](_0x90ee6b[_0x5b7a64(0xac)])):console[_0x5b7a64(0xad)](_0x90ee6b['jCJPN']);}return!![];}export async function setupCi(_0x2861ba,_0x3bd431,_0x40c9bc){const _0x480172=_0x359a,_0x5a53e2={'zexxd':'\x0a🔧\x20Ranger\x20CI\x20Setup\x0a','GcCMe':'auth','VRzBS':function(_0x3a57c9,_0x4115d8){return _0x3a57c9(_0x4115d8);},'emaQa':'dir_setup','QyzFE':function(_0x53f43d,_0x3e84fb){return _0x53f43d(_0x3e84fb);},'CrnEE':function(_0x58c784,_0x2d57de,_0x304c9e){return _0x58c784(_0x2d57de,_0x304c9e);},'pZBYm':'sessions','DLQSY':function(_0x559623,_0x127b92){return _0x559623(_0x127b92);},'DLRrF':'✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','Zjqrl':function(_0x32187b,_0x259aa7,_0x26dab0){return _0x32187b(_0x259aa7,_0x26dab0);},'bMlIZ':'settings.json','rhBub':'auth.json','qoMiX':'auth.json.enc','ZTtNs':function(_0x19c5e5,_0x466ae9){return _0x19c5e5 instanceof _0x466ae9;},'GbVUh':'\x20\x20No\x20auth\x20state\x20found\x20(app\x20may\x20not\x20require\x20authentication)','jUrhL':_0x480172(0xb1),'Xbtkh':'\x0a✅\x20Ranger\x20CI\x20setup\x20complete!\x0a'};console['log'](_0x5a53e2['zexxd']),_0x40c9bc?.[_0x480172(0xa6)](_0x5a53e2['GcCMe']),await _0x5a53e2['VRzBS'](authenticate,_0x2861ba),_0x40c9bc?.['trackPhaseEnd']('auth'),_0x40c9bc?.[_0x480172(0xa6)](_0x5a53e2['emaQa']);const {path:_0x42089b,installed:_0x3456fa}=await ensureRangerDir();await _0x5a53e2['QyzFE'](writeRangerGitignore,_0x42089b);const _0x2038a5=_0x5a53e2['CrnEE'](join,_0x42089b,_0x5a53e2['pZBYm']);!_0x5a53e2['DLQSY'](existsSync,_0x2038a5)&&await mkdir(_0x2038a5,{'recursive':!![]});_0x40c9bc?.[_0x480172(0x91)](_0x5a53e2['emaQa'],{'installed':_0x3456fa}),_0x40c9bc?.[_0x480172(0xa6)](_0x480172(0xb4));let _0x3e13a=![];_0x3bd431?.['skipChromium']?console[_0x480172(0xad)](_0x5a53e2['DLRrF']):_0x3e13a=await ensureChromium();_0x40c9bc?.[_0x480172(0x91)](_0x480172(0xb4),{'installed':_0x3e13a,'skipped':!!_0x3bd431?.['skipChromium']}),_0x40c9bc?.['trackPhaseStart']('profile_activate');const _0x2bd328=await findCiProfile(_0x3bd431?.['profile']);let _0xea0e32=![];_0x3bd431?.['baseUrl']&&(await _0x5a53e2['Zjqrl'](mkdir,_0x2bd328['path'],{'recursive':!![]}),await _0x5a53e2['CrnEE'](saveSettings,_0x2bd328[_0x480172(0xa4)],{'baseUrl':_0x3bd431[_0x480172(0x8e)],'headless':!![]}),console['log']('✓\x20Created\x20profile\x20settings:\x20baseUrl='+_0x3bd431[_0x480172(0x8e)]),_0xea0e32=!![]);const _0x339922=join(_0x2bd328[_0x480172(0x8a)],_0x5a53e2[_0x480172(0x92)]);if(!_0x5a53e2[_0x480172(0x9f)](existsSync,_0x339922)&&!_0xea0e32)throw new Error(_0x480172(0xa0)+_0x2bd328[_0x480172(0xa4)]+'\x22\x20has\x20no\x20settings.json.\x20Use\x20--base-url\x20to\x20configure\x20it.');const _0x3f9c40=join(_0x2bd328['path'],_0x5a53e2[_0x480172(0x96)]),_0x4d0181=_0x5a53e2[_0x480172(0xb2)](join,_0x2bd328[_0x480172(0x8a)],_0x5a53e2[_0x480172(0xba)]),_0x417e41=existsSync(_0x3f9c40),_0xdc0e93=_0x5a53e2[_0x480172(0x9f)](existsSync,_0x4d0181);if(_0xdc0e93)try{const _0x1c6d40=await getToken();if(!_0x1c6d40)throw new Error('No\x20API\x20token\x20available\x20for\x20decryption');const _0x2ba048=await readFile(_0x4d0181);decrypt(_0x2ba048,_0x1c6d40),console[_0x480172(0xad)](_0x480172(0xaa));}catch(_0x1a39bc){const _0x317eca=_0x5a53e2[_0x480172(0xae)](_0x1a39bc,Error)?_0x1a39bc[_0x480172(0x95)]:_0x5a53e2[_0x480172(0x9f)](String,_0x1a39bc);throw new Error(_0x480172(0xb5)+_0x2bd328['name']+_0x480172(0x84)+_0x317eca);}else _0x417e41?console[_0x480172(0xad)](_0x480172(0x88)):console[_0x480172(0xad)](_0x5a53e2[_0x480172(0xa3)]);await writeActiveProfileName(_0x2bd328['name']),console[_0x480172(0xad)]('✓\x20Active\x20profile:\x20'+_0x2bd328[_0x480172(0xa4)]),_0x40c9bc?.[_0x480172(0x91)]('profile_activate',{'profileName':_0x2bd328[_0x480172(0xa4)],'hasAuth':_0x417e41,'hasEncryptedAuth':_0xdc0e93,'createdSettings':_0xea0e32}),_0x40c9bc?.[_0x480172(0xa6)](_0x480172(0xab));const _0x1510cc=await installPluginNonInteractive();_0x40c9bc?.['trackPhaseEnd'](_0x480172(0xab),{'installed':_0x1510cc}),_0x40c9bc?.['trackPhaseStart'](_0x5a53e2['jUrhL']),await _0x5a53e2[_0x480172(0x94)](skillup,{'autoInstall':_0x480172(0xa2)}),_0x40c9bc?.['trackPhaseEnd']('skills'),console[_0x480172(0xad)](_0x5a53e2[_0x480172(0x89)]);}
1
+ (function(_0x423bdf,_0x43c28d){const _0x24a6cb=_0x28c8,_0x29025d=_0x423bdf();while(!![]){try{const _0x52fc9d=-parseInt(_0x24a6cb(0x1df))/0x1+parseInt(_0x24a6cb(0x1e2))/0x2+-parseInt(_0x24a6cb(0x204))/0x3+parseInt(_0x24a6cb(0x20d))/0x4*(parseInt(_0x24a6cb(0x1fe))/0x5)+parseInt(_0x24a6cb(0x214))/0x6*(-parseInt(_0x24a6cb(0x206))/0x7)+-parseInt(_0x24a6cb(0x1ee))/0x8*(-parseInt(_0x24a6cb(0x207))/0x9)+parseInt(_0x24a6cb(0x200))/0xa*(parseInt(_0x24a6cb(0x202))/0xb);if(_0x52fc9d===_0x43c28d)break;else _0x29025d['push'](_0x29025d['shift']());}catch(_0x251d31){_0x29025d['push'](_0x29025d['shift']());}}}(_0xb39e,0x767e9));import{mkdir,readFile,readdir}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{authenticate,ensureRangerDir,ensureChromium,writeRangerGitignore}from'./start.js';import{skillup}from'./skillup.js';import{getRangerDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';function _0x28c8(_0x50c0a5,_0x1f594d){_0x50c0a5=_0x50c0a5-0x1dd;const _0xb39e73=_0xb39e();let _0x28c86b=_0xb39e73[_0x50c0a5];return _0x28c86b;}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';function _0xb39e(){const _0x4e4d15=['Auto-detected\x20CI\x20profile:\x20','--scope','plugin','FlfwN','364266nOKKrk','baseUrl','ranger@trailhead','535500DlKlAh','ItKln','jLJSw','MWuPC','lXeqM','skills','rxaho','trailhead','YpcIC','chromium','path','project','28744BNcQJu','Multiple\x20CI\x20profiles\x20found:\x20','JvKkD','CHKxd','Ushxy','isDirectory','whUgf','log','uOHbW','mvPUw','marketplace','RseWK','name','success','✓\x20Claude\x20Code\x20plugin\x20installed','daRQK','443395OudINh','auth.json.enc','30UbWnqS','trackPhaseEnd','3067669ZMsuWO','\x0a✅\x20Ranger\x20CI\x20setup\x20complete!\x0a','2334801YrevGq','vJdwp','290668QrlCjZ','2295cQhdaF','EvIoQ','trackPhaseStart','qDkSP','error','profile_activate','16TkYPJM','vbhUN','No\x20API\x20token\x20available\x20for\x20decryption','✓\x20Active\x20profile:\x20','\x22\x20has\x20no\x20settings.json.\x20Use\x20--base-url\x20to\x20configure\x20it.','dir_setup','WujtH','108RLWmMu','\x20\x20No\x20auth\x20state\x20found\x20(app\x20may\x20not\x20require\x20authentication)','DlSNV','yPhKE'];_0xb39e=function(){return _0x4e4d15;};return _0xb39e();}async function findCiProfile(_0x559a62){const _0x5557ea=_0x28c8,_0x4130e3={'YpcIC':function(_0x5b70a2,_0x536fc3,_0x57e462){return _0x5b70a2(_0x536fc3,_0x57e462);},'Jgcwd':function(_0x20c423,_0x2e82aa){return _0x20c423+_0x2e82aa;},'jLJSw':'Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.','JvKkD':function(_0x238fad,_0x3e385e){return _0x238fad+_0x3e385e;},'CHKxd':function(_0x3705da,_0x24d207){return _0x3705da===_0x24d207;},'qDkSP':function(_0x55b59b,_0x5a854b,_0x2e4874){return _0x55b59b(_0x5a854b,_0x2e4874);}},_0x5bfde5=getRangerDir(),_0x51ebc2=_0x4130e3[_0x5557ea(0x1ea)](join,_0x5bfde5,'ci');if(_0x559a62){const _0x538952=join(_0x51ebc2,_0x559a62);return{'name':_0x559a62,'path':_0x538952};}if(!existsSync(_0x51ebc2))throw new Error(_0x4130e3['Jgcwd']('No\x20CI\x20profiles\x20found.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a',_0x4130e3['jLJSw']));const _0x2418f9=await readdir(_0x51ebc2,{'withFileTypes':!![]}),_0x5f15a8=_0x2418f9['filter'](_0x568c38=>_0x568c38[_0x5557ea(0x1f3)]())['map'](_0x50e0c4=>_0x50e0c4['name']);if(_0x5f15a8['length']===0x0)throw new Error(_0x4130e3[_0x5557ea(0x1f0)]('No\x20CI\x20profiles\x20found\x20in\x20.ranger/ci/.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a',_0x4130e3[_0x5557ea(0x1e4)]));if(_0x4130e3[_0x5557ea(0x1f1)](_0x5f15a8['length'],0x1)){const _0x8763ef=_0x5f15a8[0x0];return console['log'](_0x5557ea(0x218)+_0x8763ef),{'name':_0x8763ef,'path':_0x4130e3[_0x5557ea(0x20a)](join,_0x51ebc2,_0x8763ef)};}throw new Error(_0x5557ea(0x1ef)+_0x5f15a8['join'](',\x20')+'.\x20Use\x20--profile\x20to\x20specify\x20which\x20one.');}async function installPluginNonInteractive(){const _0x44dcf0=_0x28c8,_0x24c3d4={'yPhKE':function(_0xc14215,_0x581d25){return _0xc14215(_0x581d25);},'UdvPk':_0x44dcf0(0x1e1),'WxwTS':'Installing\x20Claude\x20Code\x20plugin\x20(project\x20level)...','RseWK':'✓\x20Marketplace\x20already\x20added','whUgf':'plugin','lXeqM':_0x44dcf0(0x1f8),'vHmhn':'add','wDSpo':'ranger-testing/trailhead','JcuVc':'You\x20can\x20install\x20manually:\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','EvIoQ':_0x44dcf0(0x1fc)},_0x13fded=await _0x24c3d4[_0x44dcf0(0x217)](isPluginInstalled,_0x24c3d4['UdvPk']);if(_0x13fded)return console['log']('✓\x20Claude\x20Code\x20plugin\x20already\x20installed'),![];console['log'](_0x24c3d4['WxwTS']);const _0xef23cd=await isMarketplaceAdded(_0x44dcf0(0x1e9));let _0x2e359b=_0xef23cd;if(_0xef23cd)console[_0x44dcf0(0x1f5)](_0x24c3d4[_0x44dcf0(0x1f9)]);else{const _0x595c64=await _0x24c3d4['yPhKE'](runClaudeCommand,[_0x24c3d4[_0x44dcf0(0x1f4)],_0x24c3d4[_0x44dcf0(0x1e6)],_0x24c3d4['vHmhn'],_0x24c3d4['wDSpo']]);!_0x595c64['success']?(console[_0x44dcf0(0x20b)]('Failed\x20to\x20add\x20marketplace:',_0x595c64['error']),console['log'](_0x24c3d4['JcuVc'])):_0x2e359b=!![];}if(_0x2e359b){const _0x52763b=await runClaudeCommand(['plugin','install',_0x24c3d4['UdvPk'],_0x44dcf0(0x219),_0x44dcf0(0x1ed)]);!_0x52763b[_0x44dcf0(0x1fb)]?(console['error']('Failed\x20to\x20install\x20plugin:',_0x52763b[_0x44dcf0(0x20b)]),console['log']('You\x20can\x20install\x20manually:\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20project')):console['log'](_0x24c3d4[_0x44dcf0(0x208)]);}return!![];}export async function setupCi(_0x192862,_0x37d602,_0x9de248){const _0x32a7a5=_0x28c8,_0x1c696a={'CxEOT':'auth','UNOtV':function(_0xb001b1,_0x51af4d){return _0xb001b1(_0x51af4d);},'FlfwN':function(_0x56fb6f){return _0x56fb6f();},'daRQK':'sessions','MWuPC':function(_0x2df121,_0xe637fa){return _0x2df121(_0xe637fa);},'ItKln':function(_0x435c26,_0x4a5961,_0x558244){return _0x435c26(_0x4a5961,_0x558244);},'LBqQQ':'dir_setup','SMwET':_0x32a7a5(0x20c),'EKODp':'settings.json','uOHbW':function(_0x380a99,_0x31b274){return _0x380a99(_0x31b274);},'dwBBx':function(_0x3e7f90,_0x39e411,_0x57f608){return _0x3e7f90(_0x39e411,_0x57f608);},'jRjFd':'auth.json','vJdwp':function(_0x482173,_0x25db65,_0xbde687){return _0x482173(_0x25db65,_0xbde687);},'WujtH':_0x32a7a5(0x1ff),'SnJCm':function(_0xbb729d){return _0xbb729d();},'hEPkf':_0x32a7a5(0x20f),'DlSNV':function(_0x417fcb,_0xf2469c){return _0x417fcb(_0xf2469c);},'xGJIr':'✓\x20Encrypted\x20auth\x20verified\x20(will\x20decrypt\x20at\x20runtime)','rxaho':function(_0x43854d,_0x44ae6c){return _0x43854d instanceof _0x44ae6c;},'vbhUN':'✓\x20Auth\x20state\x20found','mvPUw':_0x32a7a5(0x215),'Ushxy':function(_0x5e9765,_0x165b68){return _0x5e9765(_0x165b68);},'WvmqR':function(_0xb616b5){return _0xb616b5();},'CQuWs':'project','QNExO':'skills','qDAfa':_0x32a7a5(0x203)};console['log']('\x0a🔧\x20Ranger\x20CI\x20Setup\x0a'),_0x9de248?.[_0x32a7a5(0x209)](_0x1c696a['CxEOT']),await _0x1c696a['UNOtV'](authenticate,_0x192862),_0x9de248?.[_0x32a7a5(0x201)](_0x1c696a['CxEOT']),_0x9de248?.['trackPhaseStart'](_0x32a7a5(0x212));const {path:_0x228bff,installed:_0x301cec}=await _0x1c696a[_0x32a7a5(0x1de)](ensureRangerDir);await writeRangerGitignore(_0x228bff);const _0x3fc9e9=join(_0x228bff,_0x1c696a[_0x32a7a5(0x1fd)]);!_0x1c696a['MWuPC'](existsSync,_0x3fc9e9)&&await _0x1c696a[_0x32a7a5(0x1e3)](mkdir,_0x3fc9e9,{'recursive':!![]});_0x9de248?.['trackPhaseEnd'](_0x1c696a['LBqQQ'],{'installed':_0x301cec}),_0x9de248?.['trackPhaseStart']('chromium');let _0x3dbf1c=![];_0x37d602?.['skipChromium']?console['log']('✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)'):_0x3dbf1c=await ensureChromium();_0x9de248?.[_0x32a7a5(0x201)](_0x32a7a5(0x1eb),{'installed':_0x3dbf1c,'skipped':!!_0x37d602?.['skipChromium']}),_0x9de248?.[_0x32a7a5(0x209)](_0x1c696a['SMwET']);const _0x43a51c=await findCiProfile(_0x37d602?.['profile']);let _0x47cd74=![];_0x37d602?.['baseUrl']&&(await _0x1c696a[_0x32a7a5(0x1e3)](mkdir,_0x43a51c['path'],{'recursive':!![]}),await saveSettings(_0x43a51c[_0x32a7a5(0x1fa)],{'baseUrl':_0x37d602['baseUrl'],'headless':!![]}),console['log']('✓\x20Created\x20profile\x20settings:\x20baseUrl='+_0x37d602[_0x32a7a5(0x1e0)]),_0x47cd74=!![]);const _0x1c426f=_0x1c696a['ItKln'](join,_0x43a51c[_0x32a7a5(0x1ec)],_0x1c696a['EKODp']);if(!_0x1c696a[_0x32a7a5(0x1f6)](existsSync,_0x1c426f)&&!_0x47cd74)throw new Error('CI\x20profile\x20\x22'+_0x43a51c[_0x32a7a5(0x1fa)]+_0x32a7a5(0x211));const _0x1772bd=_0x1c696a['dwBBx'](join,_0x43a51c['path'],_0x1c696a['jRjFd']),_0x28635f=_0x1c696a[_0x32a7a5(0x205)](join,_0x43a51c['path'],_0x1c696a[_0x32a7a5(0x213)]),_0x4b7457=existsSync(_0x1772bd),_0x4e87f6=_0x1c696a[_0x32a7a5(0x1e5)](existsSync,_0x28635f);if(_0x4e87f6)try{const _0x2a5628=await _0x1c696a['SnJCm'](getToken);if(!_0x2a5628)throw new Error(_0x1c696a['hEPkf']);const _0x13ebc7=await _0x1c696a[_0x32a7a5(0x216)](readFile,_0x28635f);decrypt(_0x13ebc7,_0x2a5628),console[_0x32a7a5(0x1f5)](_0x1c696a['xGJIr']);}catch(_0x3e0fd9){const _0x1ea758=_0x1c696a[_0x32a7a5(0x1e8)](_0x3e0fd9,Error)?_0x3e0fd9['message']:String(_0x3e0fd9);throw new Error('Failed\x20to\x20verify\x20encrypted\x20auth\x20for\x20profile\x20\x22'+_0x43a51c['name']+'\x22:\x20'+_0x1ea758);}else _0x4b7457?console['log'](_0x1c696a[_0x32a7a5(0x20e)]):console['log'](_0x1c696a[_0x32a7a5(0x1f7)]);await _0x1c696a[_0x32a7a5(0x1f2)](writeActiveProfileName,_0x43a51c['name']),console[_0x32a7a5(0x1f5)](_0x32a7a5(0x210)+_0x43a51c[_0x32a7a5(0x1fa)]),_0x9de248?.[_0x32a7a5(0x201)](_0x32a7a5(0x20c),{'profileName':_0x43a51c[_0x32a7a5(0x1fa)],'hasAuth':_0x4b7457,'hasEncryptedAuth':_0x4e87f6,'createdSettings':_0x47cd74}),_0x9de248?.[_0x32a7a5(0x209)](_0x32a7a5(0x1dd));const _0x36f52b=await _0x1c696a['WvmqR'](installPluginNonInteractive);_0x9de248?.['trackPhaseEnd'](_0x32a7a5(0x1dd),{'installed':_0x36f52b}),_0x9de248?.['trackPhaseStart'](_0x32a7a5(0x1e7)),await skillup({'autoInstall':_0x1c696a['CQuWs']}),_0x9de248?.['trackPhaseEnd'](_0x1c696a['QNExO']),console['log'](_0x1c696a['qDAfa']);}
@@ -1 +1 @@
1
- (function(_0x3fc66e,_0x292e92){const _0x24fd72=_0x2d4b,_0x3a8493=_0x3fc66e();while(!![]){try{const _0x5a7b48=parseInt(_0x24fd72(0xdf))/0x1*(-parseInt(_0x24fd72(0xda))/0x2)+-parseInt(_0x24fd72(0xeb))/0x3*(-parseInt(_0x24fd72(0xe2))/0x4)+parseInt(_0x24fd72(0xd6))/0x5+-parseInt(_0x24fd72(0xf1))/0x6*(parseInt(_0x24fd72(0xf8))/0x7)+parseInt(_0x24fd72(0xf4))/0x8+parseInt(_0x24fd72(0xea))/0x9+-parseInt(_0x24fd72(0xee))/0xa;if(_0x5a7b48===_0x292e92)break;else _0x3a8493['push'](_0x3a8493['shift']());}catch(_0x1b5ac7){_0x3a8493['push'](_0x3a8493['shift']());}}}(_0x1046,0x1aaaf));function _0x1046(){const _0x4b83bf=['project-level','This\x20project\x20only\x20(','4TjGBTJ','Where\x20should\x20skills\x20be\x20installed?','All\x20projects\x20(','installLevel','geGkY','\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli','user-level','user','281070JRpDqO','274254MLikJc','autoInstall','TyQLw','758160kzhXVY','ccEAt','\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a','139662cymKnr','BRRUM','\x20\x20Failed\x20to\x20install\x20ranger\x20skill:','1275672EQfSNX','ranger','prompt','vyBpf','35CwCVnq','Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20(','\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!','\x20\x202.\x20Run:\x20ranger\x20setup\x20<your-api-token>','230960DoJyhR','stdout','project','PlMHF','802zeLEHJ','log','BfXdX','To\x20get\x20started:','/.claude/skills/)','67DzBPEp'];_0x1046=function(){return _0x4b83bf;};return _0x1046();}import{basename}from'path';import _0x547795 from'inquirer';function _0x2d4b(_0x4d3db0,_0xaff6d6){_0x4d3db0=_0x4d3db0-0xd3;const _0x1046ec=_0x1046();let _0x2d4b3e=_0x1046ec[_0x4d3db0];return _0x2d4b3e;}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';export async function skillup(_0x4eb131={}){const _0x2082f9=_0x2d4b,_0xf471d7={'zuWIw':_0x2082f9(0xf0),'NSCnL':function(_0x222e33){return _0x222e33();},'ccEAt':'❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a','sOouF':_0x2082f9(0xdd),'rKOIf':_0x2082f9(0xd5),'WWukz':'\x20\x203.\x20Run:\x20ranger\x20skillup\x0a','ZMmYv':'✓\x20Found\x20API\x20token','aMUFp':_0x2082f9(0xe3),'geGkY':_0x2082f9(0xd8),'vyBpf':function(_0x1b5f3c,_0x5a1234,_0x18d695){return _0x1b5f3c(_0x5a1234,_0x18d695);},'BRRUM':_0x2082f9(0xf5),'TyQLw':function(_0x3f26f7,_0xd477fd){return _0x3f26f7 instanceof _0xd477fd;},'BfXdX':function(_0x52abfc,_0x4b45e7){return _0x52abfc===_0x4b45e7;},'uPwNM':_0x2082f9(0xe8),'PlMHF':_0x2082f9(0xe0),'GVbya':'To\x20use:'};console['log'](_0xf471d7['zuWIw']);const _0x492ea8=await _0xf471d7['NSCnL'](getToken);if(!_0x492ea8){console['log'](_0xf471d7[_0x2082f9(0xef)]),console['log'](_0xf471d7['sOouF']),console[_0x2082f9(0xdb)](_0x2082f9(0xe7)),console[_0x2082f9(0xdb)](_0xf471d7['rKOIf']),console['log'](_0xf471d7['WWukz']);return;}console[_0x2082f9(0xdb)](_0xf471d7['ZMmYv']);const _0x2937c4=_0xf471d7['NSCnL'](getProjectRoot),_0x1c51ca=basename(_0x2937c4),_0x4c0e90=process['stdin']['isTTY']&&process[_0x2082f9(0xd7)]['isTTY'];let _0x374a57;if(_0x4eb131[_0x2082f9(0xec)])_0x374a57=_0x4eb131[_0x2082f9(0xec)];else{if(_0x4c0e90){const _0x281071=await _0x547795[_0x2082f9(0xf6)]([{'type':'list','name':_0x2082f9(0xe5),'message':_0xf471d7['aMUFp'],'choices':[{'name':_0x2082f9(0xe4)+_0xf471d7['NSCnL'](getClaudeConfigDir)+'/skills/)','value':'user'},{'name':_0x2082f9(0xe1)+_0x1c51ca+_0x2082f9(0xde),'value':_0xf471d7[_0x2082f9(0xe6)]}]}]);_0x374a57=_0x281071[_0x2082f9(0xe5)];}else _0x374a57=_0x2082f9(0xd8),console[_0x2082f9(0xdb)](_0x2082f9(0xd3)+_0x1c51ca+'/.claude/skills/)');}let _0x173ac4=0x0;const _0x57104c=getCurrentVersion();console[_0x2082f9(0xdb)]('\x0a📦\x20Installing\x20skills...\x0a');try{const _0x3c8b34=await _0xf471d7[_0x2082f9(0xf7)](installSkill,_0xf471d7[_0x2082f9(0xf2)],{'cliVersion':_0x57104c,'level':_0x374a57});_0x3c8b34&&_0x173ac4++;}catch(_0x36c8a6){console['warn'](_0x2082f9(0xf3),_0xf471d7[_0x2082f9(0xed)](_0x36c8a6,Error)?_0x36c8a6['message']:_0x36c8a6);}if(_0x173ac4>0x0){const _0x30e8e7=_0xf471d7[_0x2082f9(0xdc)](_0x374a57,_0x2082f9(0xe9))?_0xf471d7['uPwNM']:_0xf471d7[_0x2082f9(0xd9)];console[_0x2082f9(0xdb)]('\x0a✅\x20Installed\x20'+_0x173ac4+'\x20'+_0x30e8e7+'\x20skill'+(_0x173ac4>0x1?'s':'')+'\x20successfully!\x0a'),!_0x4eb131['suppressUsage']&&(console['log'](_0xf471d7['GVbya']),console['log'](_0x2082f9(0xd4)));}else console[_0x2082f9(0xdb)]('\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a');}
1
+ (function(_0x179a31,_0x3b09ed){const _0x11ef07=_0x28ad,_0x161c5f=_0x179a31();while(!![]){try{const _0x5cd496=parseInt(_0x11ef07(0x1d2))/0x1*(-parseInt(_0x11ef07(0x1d5))/0x2)+-parseInt(_0x11ef07(0x1ae))/0x3*(-parseInt(_0x11ef07(0x1ce))/0x4)+-parseInt(_0x11ef07(0x1da))/0x5*(-parseInt(_0x11ef07(0x1b8))/0x6)+parseInt(_0x11ef07(0x1ba))/0x7*(parseInt(_0x11ef07(0x1c5))/0x8)+parseInt(_0x11ef07(0x1c4))/0x9+-parseInt(_0x11ef07(0x1cf))/0xa+-parseInt(_0x11ef07(0x1d3))/0xb*(parseInt(_0x11ef07(0x1cd))/0xc);if(_0x5cd496===_0x3b09ed)break;else _0x161c5f['push'](_0x161c5f['shift']());}catch(_0x5d2d73){_0x161c5f['push'](_0x161c5f['shift']());}}}(_0x279d,0x4fac3));import{basename}from'path';function _0x279d(){const _0x801342=['61448zMQLRT','5811090QHgpjJ','icJui','\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.','7NbcXxq','97625xqRAJo','claude','54826TumTNq','CyLYv','project','/.claude/skills/','PEvWj','2015600agZepX','autoInstall','suppressUsage','6VIhYde','eTAFa','\x20\x202.\x20Run:\x20ranger\x20setup','installLevel','KENZR','user','\x0a✅\x20Installed\x20','log','/skills/','\x20successfully!\x0a','6LTBFyd','stdin','61565IxPvuw','\x20--opencode','\x0a📦\x20Installing\x20skills...\x0a','❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a','prompt','platform','list','opencode','This\x20project\x20only\x20(','\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli','370170MAAfHM','576nMBXiY','HRPSa','Lqcon','tVQRs','To\x20use:','VCSKA','EUvPq','ZMdCc','12AoPBnr'];_0x279d=function(){return _0x801342;};return _0x279d();}import _0x45280c from'inquirer';function _0x28ad(_0x325236,_0x4c9f87){_0x325236=_0x325236-0x1ac;const _0x279d8e=_0x279d();let _0x28ad39=_0x279d8e[_0x325236];return _0x28ad39;}import{getToken}from'./utils/keychain.js';import{installSkill}from'./utils/skills.js';import{getCurrentVersion}from'./utils/version.js';import{getClaudeConfigDir,getProjectRoot}from'./utils/claudeConfig.js';import{getOpencodeConfigDir}from'./utils/opencodeConfig.js';export async function skillup(_0x21542e={}){const _0x54c4f2=_0x28ad,_0x9bc87f={'yyyJz':'\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a','kOHuF':_0x54c4f2(0x1d4),'pDqOq':function(_0x52ee91){return _0x52ee91();},'hNDep':'5|0|1|3|4|2','NodNq':'To\x20get\x20started:','HzZnw':_0x54c4f2(0x1c3),'ZMdCc':_0x54c4f2(0x1bd),'vXUkz':'✓\x20Found\x20API\x20token','Lqcon':function(_0x11eda7,_0x521f2d){return _0x11eda7===_0x521f2d;},'XgKKa':'opencode','KENZR':function(_0x4ed86b,_0xfad7a){return _0x4ed86b(_0xfad7a);},'PEvWj':function(_0x3d7627,_0x36bc85){return _0x3d7627===_0x36bc85;},'MjmIA':_0x54c4f2(0x1c0),'eTAFa':_0x54c4f2(0x1b1),'ZZjft':'ranger','tVQRs':'\x20\x20Failed\x20to\x20install\x20ranger\x20skill:','CyLYv':function(_0x4eed0a,_0x2705b1){return _0x4eed0a instanceof _0x2705b1;},'EUvPq':function(_0x193a17,_0x526133){return _0x193a17>_0x526133;},'HRPSa':function(_0x501050,_0x16a604){return _0x501050===_0x16a604;},'icJui':'user-level','MBLLZ':_0x54c4f2(0x1c9),'VCSKA':'\x20\x20-\x20Open\x20Claude\x20Code\x20in\x20plan\x20mode\x20and\x20run\x20/ranger:enable.\x20Plan\x20out\x20a\x20UI\x20feature\x20with\x20Ranger\x20and\x20watch\x20Ranger\x20test\x20it\x20for\x20you!'};console['log'](_0x9bc87f['yyyJz']);const _0x54a835=_0x21542e[_0x54c4f2(0x1bf)]??_0x9bc87f['kOHuF'],_0x228d9e=await _0x9bc87f['pDqOq'](getToken);if(!_0x228d9e){const _0x31e8e6=_0x9bc87f['hNDep']['split']('|');let _0x46b780=0x0;while(!![]){switch(_0x31e8e6[_0x46b780++]){case'0':console[_0x54c4f2(0x1b5)](_0x9bc87f['NodNq']);continue;case'1':console[_0x54c4f2(0x1b5)](_0x9bc87f['HzZnw']);continue;case'2':return;case'3':console['log'](_0x54c4f2(0x1b0)+(_0x54a835==='opencode'?_0x54c4f2(0x1bb):'')+'\x20<your-api-token>');continue;case'4':console['log']('\x20\x203.\x20Run:\x20ranger\x20skillup'+(_0x54a835===_0x54c4f2(0x1c1)?'\x20--opencode':'')+'\x0a');continue;case'5':console[_0x54c4f2(0x1b5)](_0x9bc87f[_0x54c4f2(0x1cc)]);continue;}break;}}console[_0x54c4f2(0x1b5)](_0x9bc87f['vXUkz']);const _0x1d33ea=getProjectRoot(),_0x27d802=basename(_0x1d33ea),_0x330c0b=_0x9bc87f[_0x54c4f2(0x1c7)](_0x54a835,_0x9bc87f['XgKKa'])?_0x9bc87f[_0x54c4f2(0x1b2)](getOpencodeConfigDir,'user')+'/skills/':getClaudeConfigDir()+_0x54c4f2(0x1b6),_0x57e322=_0x9bc87f[_0x54c4f2(0x1d9)](_0x54a835,_0x9bc87f['XgKKa'])?_0x1d33ea+'/.opencode/skills/':_0x1d33ea+_0x54c4f2(0x1d8),_0x136249=process[_0x54c4f2(0x1b9)]['isTTY']&&process['stdout']['isTTY'];let _0x2b72d3;if(_0x21542e[_0x54c4f2(0x1ac)])_0x2b72d3=_0x21542e[_0x54c4f2(0x1ac)];else{if(_0x136249){const _0x35f214=await _0x45280c[_0x54c4f2(0x1be)]([{'type':_0x9bc87f['MjmIA'],'name':_0x9bc87f[_0x54c4f2(0x1af)],'message':'Where\x20should\x20skills\x20be\x20installed?','choices':[{'name':'All\x20projects\x20('+_0x330c0b+')','value':_0x54c4f2(0x1b3)},{'name':_0x54c4f2(0x1c2)+_0x57e322+')','value':_0x54c4f2(0x1d7)}]}]);_0x2b72d3=_0x35f214['installLevel'];}else _0x2b72d3='project',console['log']('Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20('+_0x57e322+')');}let _0x46c5ff=0x0;const _0x2b9636=_0x9bc87f['pDqOq'](getCurrentVersion);console['log'](_0x54c4f2(0x1bc));try{const _0x20a917=await installSkill(_0x9bc87f['ZZjft'],{'cliVersion':_0x2b9636,'level':_0x2b72d3,'platform':_0x54a835});_0x20a917&&_0x46c5ff++;}catch(_0x507c23){console['warn'](_0x9bc87f[_0x54c4f2(0x1c8)],_0x9bc87f[_0x54c4f2(0x1d6)](_0x507c23,Error)?_0x507c23['message']:_0x507c23);}if(_0x9bc87f[_0x54c4f2(0x1cb)](_0x46c5ff,0x0)){const _0x2fc47e=_0x9bc87f[_0x54c4f2(0x1c6)](_0x2b72d3,_0x54c4f2(0x1b3))?_0x9bc87f[_0x54c4f2(0x1d0)]:'project-level';console['log'](_0x54c4f2(0x1b4)+_0x46c5ff+'\x20'+_0x2fc47e+'\x20skill'+(_0x46c5ff>0x1?'s':'')+_0x54c4f2(0x1b7)),!_0x21542e[_0x54c4f2(0x1ad)]&&(console[_0x54c4f2(0x1b5)](_0x9bc87f['MBLLZ']),_0x54a835===_0x9bc87f['XgKKa']?console[_0x54c4f2(0x1b5)](_0x54c4f2(0x1d1)):console['log'](_0x9bc87f[_0x54c4f2(0x1ca)]));}else console[_0x54c4f2(0x1b5)]('\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a');}
@@ -1 +1 @@
1
- const _0x15fb3f=_0x2fe2;(function(_0x5d207b,_0x56629e){const _0x93870b=_0x2fe2,_0x4a96cd=_0x5d207b();while(!![]){try{const _0x4eec02=-parseInt(_0x93870b(0x144))/0x1+parseInt(_0x93870b(0x154))/0x2*(-parseInt(_0x93870b(0x147))/0x3)+-parseInt(_0x93870b(0x16c))/0x4+parseInt(_0x93870b(0x10f))/0x5*(-parseInt(_0x93870b(0x13d))/0x6)+parseInt(_0x93870b(0x15a))/0x7*(-parseInt(_0x93870b(0x140))/0x8)+-parseInt(_0x93870b(0x133))/0x9*(parseInt(_0x93870b(0x182))/0xa)+-parseInt(_0x93870b(0x127))/0xb*(-parseInt(_0x93870b(0x18f))/0xc);if(_0x4eec02===_0x56629e)break;else _0x4a96cd['push'](_0x4a96cd['shift']());}catch(_0xebc76f){_0x4a96cd['push'](_0x4a96cd['shift']());}}}(_0x15f4,0x9a4a3));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';function _0x15f4(){const _0x2af1cc=['sxnlN','MCCFA','SECdn','ranger\x20profile\x20add\x20local','zrWzt','trackPhaseStart','Kdoxz','PRIWL','error','Bweaz','OFGfj','22gSrPQU','\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with','✓\x20Exported\x20credentials\x20for\x20CI','ranger','\x0aA\x20profile\x20gives\x20Ranger\x27s\x20browser\x20agent\x20information\x20about\x20how','IiAbI','42XbVTyG','inherit','mrcnO','ALYfc','confirm','FFPQB','message','use\x20until\x20the\x20session\x20expires.\x0a','install','Authentication\x20failed:\x20','OqqRZ','Would\x20you\x20like\x20to\x20install\x20skills?','\x0a📦\x20Claude\x20Code\x20Plugin\x0a','list','✓\x20Claude\x20Code\x20plugin\x20already\x20installed','Hivae','already\x20enabled','Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20','2584396yXNNGq','MRTko','prompt','\x20\x201.\x20Navigate\x20to\x20your\x20project\x20directory','playwright/package.json','jpKgm','\x0aYou\x20can\x20install\x20manually\x20with:','\x0a✅\x20You\x27re\x20ready\x20to\x20start\x20using\x20Ranger\x20Feature\x20Review.','stdin','SKILL.md','You\x20can\x20install\x20it\x20manually\x20by\x20running:','UYnvG','THZiA','PUldx','Make\x20sure\x20your\x20app\x20is\x20running\x20before\x20you\x20start.\x0a','\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','QxnXb','Fusjd','...','user','\x20install\x20chromium','stdout','1470kIxfNb','ready','JpcWq','qErSk','env','AZQRe','log','The\x20required\x20version\x20(','eUVVM','.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.','\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20','\x20\x20\x20\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','7|5|4|2|3|8|1|6|0','36cTYQNS','You\x27ll\x20need\x20the\x20app\x20to\x20be\x20running\x20to\x20set\x20up\x20the\x20profile.','\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','project','fvUhB','device_auth','trackPhaseError','platform','EmsKa','mHpeY','1702510svQwtI','dUEYK','\x0a❌\x20Profile\x20setup\x20failed:','split','ZxPIT','method','\x1b[1m','Project\x20(shared\x20with\x20team\x20via\x20git)','eVWSv','⚠\x20No\x20git\x20repository\x20found.\x20Run\x20`ranger\x20profile\x20add\x20local`\x20from\x20your\x20project\x20directory.','isTTY','bMvYc','playwright@','close','⚠\x20Failed\x20to\x20enable\x20plugin:','✓\x20Created\x20.ranger/\x20directory','uetkL','provided_token','NmIPm','✓\x20.ranger/\x20directory\x20already\x20exists','wantsSkillup','\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','version','iTodr','14678719LUYizi','trackPhaseEnd','local','jIowJ','✓\x20Ranger\x20skills\x20already\x20installed','\x20\x203.\x20Install\x20Claude\x20Code\x20plugin:','/ranger:enable','ArXBE','wOLVA','aSjLJ','✓\x20Marketplace\x20already\x20added','Non-interactive\x20mode\x20detected.\x20Skipping\x20optional\x20setup\x20prompts.','45405ignPUu','git_check','success','marketplace','status','✓\x20Created\x20.ranger/.gitignore','EQyru','auth','chromium','siYkO','18FLMzsW','KZeUO','plugin','319448JmiyCx','AiFwL','xixWy','skipChromium','606273heUlPa','tsGqx','clQel','31701RKDuWV','skills'];_0x15f4=function(){return _0x2af1cc;};return _0x15f4();}import{spawn}from'child_process';import _0x43e3dc from'inquirer';import{getToken,storeToken}from'./utils/keychain.js';import{getCurrentUser}from'./utils/userApi.js';import{chromium}from'playwright';import{addEnv}from'./addEnv.js';import{skillup}from'./skillup.js';import{getRangerDir,findGitRoot}from'./utils/rangerRoot.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';import{getProjectRoot,getSkillsDir}from'./utils/claudeConfig.js';import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{findExistingEnv}from'./utils/settings.js';const require=createRequire(import.meta.url),bold=_0x100099=>_0x15fb3f(0x115)+_0x100099+'\x1b[0m';function getPlaywrightVersion(){const _0x192a19=_0x15fb3f;try{const _0x3f1aed=require['resolve'](_0x192a19(0x170)),_0xe23bbf=require(_0x3f1aed);return _0xe23bbf[_0x192a19(0x125)];}catch{return null;}}function installChromiumBinary(_0x1d1354){const _0x58c388=_0x15fb3f,_0x2081cf={'aSjLJ':'install','wEVcs':function(_0x28a29b,_0x3a3853,_0x31650b,_0x5c20f2){return _0x28a29b(_0x3a3853,_0x31650b,_0x5c20f2);},'pLQfz':'npx','Fusjd':_0x58c388(0x15b),'kwYqk':function(_0x32789b,_0x1c978f){return _0x32789b===_0x1c978f;},'tsGqx':_0x58c388(0x151)};return new Promise((_0x4b2ab1,_0x493e64)=>{const _0x12c7ba=_0x58c388,_0x42b6dc={'KxcvX':function(_0x5b7dc1,_0x1e4bf9){return _0x5b7dc1===_0x1e4bf9;}},_0x130611=_0x1d1354?[_0x12c7ba(0x11b)+_0x1d1354,_0x2081cf[_0x12c7ba(0x130)],'chromium']:['playwright',_0x2081cf['aSjLJ'],_0x12c7ba(0x13b)],_0x39f061=_0x2081cf['wEVcs'](spawn,_0x2081cf['pLQfz'],_0x130611,{'stdio':_0x2081cf[_0x12c7ba(0x17d)],'shell':_0x2081cf['kwYqk'](process[_0x12c7ba(0x10c)],'win32')});_0x39f061['on'](_0x12c7ba(0x11c),_0x23dcb8=>{_0x42b6dc['KxcvX'](_0x23dcb8,0x0)?_0x4b2ab1():_0x493e64(new Error('Installation\x20failed\x20with\x20exit\x20code\x20'+_0x23dcb8));}),_0x39f061['on'](_0x2081cf[_0x12c7ba(0x145)],_0x205b53=>{_0x493e64(_0x205b53);});});}export async function authenticate(_0xd0e6cd){const _0x364b98=_0x15fb3f,_0x5516ab={'Hivae':function(_0x1e44df,_0x31c2ba){return _0x1e44df instanceof _0x31c2ba;},'EmsKa':function(_0x3afe39,_0x25c383){return _0x3afe39(_0x25c383);},'eHNYe':_0x364b98(0x156),'TstbD':'✓\x20Stored\x20credentials\x20locally','fvUhB':_0x364b98(0x120)};if(!_0xd0e6cd){const _0x4f2ee2=await getToken();if(_0x4f2ee2){const _0x3bbab5=await getCurrentUser(_0x4f2ee2);if(_0x3bbab5[_0x364b98(0x135)])return console['log']('✓\x20Already\x20authenticated\x20to\x20'+_0x3bbab5['user']['organizationName']),{'token':_0x4f2ee2,'method':'existing_token'};}const _0x1538ad=process[_0x364b98(0x174)][_0x364b98(0x119)]&&process['stdout'][_0x364b98(0x119)];if(!_0x1538ad)throw new Error('No\x20token\x20provided\x20and\x20running\x20in\x20non-interactive\x20mode.\x20In\x20CI,\x20pass\x20a\x20token:\x20ranger\x20setup\x20[token].\x20Or\x20set\x20the\x20RANGER_CLI_TOKEN\x20environment\x20variable.');try{_0xd0e6cd=await runDeviceAuthFlow();}catch(_0x515d58){throw new Error('Authentication\x20failed:\x20'+(_0x5516ab[_0x364b98(0x169)](_0x515d58,Error)?_0x515d58[_0x364b98(0x160)]:_0x515d58));}const _0x11a258=await getCurrentUser(_0xd0e6cd);if(!_0x11a258[_0x364b98(0x135)])throw new Error('Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20'+_0x11a258[_0x364b98(0x151)]);return console[_0x364b98(0x188)]('✓\x20Authenticated\x20to\x20'+_0x11a258[_0x364b98(0x17f)]['organizationName']),{'token':_0xd0e6cd,'method':_0x364b98(0x194)};}console[_0x364b98(0x188)]('Validating\x20API\x20token...');const _0x32a4b7=await getCurrentUser(_0xd0e6cd);if(!_0x32a4b7[_0x364b98(0x135)]){if(_0x32a4b7[_0x364b98(0x137)])throw new Error(_0x364b98(0x163)+_0x32a4b7['error']+_0x364b98(0x18b));else throw new Error(_0x364b98(0x16b)+_0x32a4b7[_0x364b98(0x151)]+'.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.');}return console[_0x364b98(0x188)]('✓\x20Authenticated\x20to\x20'+_0x32a4b7['user']['organizationName']),await _0x5516ab[_0x364b98(0x10d)](storeToken,_0xd0e6cd),console[_0x364b98(0x188)](process[_0x364b98(0x186)]['GITHUB_ENV']?_0x5516ab['eHNYe']:_0x5516ab['TstbD']),{'token':_0xd0e6cd,'method':_0x5516ab[_0x364b98(0x193)]};}export async function ensureRangerDir(){const _0x6e3cfe=_0x15fb3f,_0x50fe74={'ArXBE':_0x6e3cfe(0x122)},_0x4e26cd=getRangerDir();return!existsSync(_0x4e26cd)?(await mkdir(_0x4e26cd,{'recursive':!![]}),console[_0x6e3cfe(0x188)](_0x6e3cfe(0x11e)),{'path':_0x4e26cd,'installed':!![]}):(console[_0x6e3cfe(0x188)](_0x50fe74[_0x6e3cfe(0x12e)]),{'path':_0x4e26cd,'installed':![]});}export async function ensureChromium(){const _0xafda06=_0x15fb3f,_0x3f4efc={'eUVVM':function(_0x4e1ea4,_0x31aa73){return _0x4e1ea4(_0x31aa73);},'bMvYc':'✓\x20Playwright\x20Chromium\x20browser\x20found','sxnlN':_0xafda06(0x15e),'Iywxn':'The\x20required\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','zrWzt':function(_0x8f2dc6,_0x44ad6a){return _0x8f2dc6(_0x44ad6a);},'WaqaP':'\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','sFfpi':'\x0a❌\x20Failed\x20to\x20install\x20Chromium:','eDyvU':_0xafda06(0x176),'vKLRf':'\x20\x20npx\x20playwright\x20install\x20chromium'};let _0x2c5f73=![];try{const _0x2471fc=chromium['executablePath']();_0x2c5f73=_0x3f4efc[_0xafda06(0x18a)](existsSync,_0x2471fc);}catch{_0x2c5f73=![];}if(_0x2c5f73)return console[_0xafda06(0x188)](_0x3f4efc[_0xafda06(0x11a)]),![];const _0x29552e=getPlaywrightVersion(),_0x3f54f5=process[_0xafda06(0x174)][_0xafda06(0x119)]&&process[_0xafda06(0x181)]['isTTY'];let _0xd292=!![];if(_0x3f54f5){const {install:_0x4753f3}=await _0x43e3dc[_0xafda06(0x16e)]([{'type':_0x3f4efc[_0xafda06(0x149)],'name':'install','message':_0x29552e?_0xafda06(0x189)+_0x29552e+')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?':_0x3f4efc['Iywxn'],'default':!![]}]);_0xd292=_0x4753f3;}else console[_0xafda06(0x188)]('\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium'+(_0x29552e?'\x20'+_0x29552e:'')+_0xafda06(0x17e));if(_0xd292){console['log']('\x0aInstalling\x20Chromium\x20browser...\x0a');try{await _0x3f4efc[_0xafda06(0x14d)](installChromiumBinary,_0x29552e),console[_0xafda06(0x188)](_0x3f4efc['WaqaP']);}catch(_0x4efa64){console[_0xafda06(0x151)](_0x3f4efc['sFfpi'],_0x4efa64 instanceof Error?_0x4efa64['message']:_0x4efa64),console['log'](_0x3f4efc['eDyvU']),_0x29552e?console['log']('\x20\x20npx\x20playwright@'+_0x29552e+_0xafda06(0x180)):console['log'](_0x3f4efc['vKLRf']);}}else console[_0xafda06(0x188)]('\x0a⚠\x20Skipping\x20Chromium\x20installation.'),console[_0xafda06(0x188)]('You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:'),_0x29552e?console[_0xafda06(0x188)]('\x20\x20npx\x20playwright@'+_0x29552e+'\x20install\x20chromium'):console[_0xafda06(0x188)]('\x20\x20npx\x20playwright\x20install\x20chromium');return!![];}function _0x2fe2(_0x38e94d,_0x5b51d8){_0x38e94d=_0x38e94d-0x10c;const _0x15f4d4=_0x15f4();let _0x2fe29c=_0x15f4d4[_0x38e94d];return _0x2fe29c;}export async function writeRangerGitignore(_0x4b4277){const _0x4a8829=_0x15fb3f,_0x59016a={'EQyru':function(_0x29f263,_0x2eefec,_0xd509b2){return _0x29f263(_0x2eefec,_0xd509b2);},'HnaIj':_0x4a8829(0x138)},_0x4a0d33=join(_0x4b4277,'.gitignore'),_0x148f9d=_0x4a8829(0x191);await _0x59016a[_0x4a8829(0x139)](writeFile,_0x4a0d33,_0x148f9d),console[_0x4a8829(0x188)](_0x59016a['HnaIj']);}async function ensurePlugin(){const _0x9d18f2=_0x15fb3f,_0x18a8a6={'PUldx':function(_0x6147dd,_0x5f2f5b){return _0x6147dd(_0x5f2f5b);},'OqqRZ':'ranger@trailhead','AQHqh':function(_0x68086){return _0x68086();},'UJTRZ':'.claude','mSWHt':_0x9d18f2(0x192),'UYnvG':'User\x20(available\x20in\x20all\x20your\x20projects)','ALYfc':_0x9d18f2(0x116),'JpcWq':'trailhead','phEUC':_0x9d18f2(0x136),'qErSk':'add','fKQVD':'ranger-testing/trailhead','jFwTt':function(_0xaa41bc,_0x311157){return _0xaa41bc(_0x311157);},'PRIWL':_0x9d18f2(0x13f),'QYhtt':_0x9d18f2(0x162),'GxhnK':'--scope','AiFwL':_0x9d18f2(0x172),'WQRFd':'enable','wOLVA':function(_0x2aa4d1,_0x32d69e){return _0x2aa4d1===_0x32d69e;},'oZifK':function(_0x4eca0d,_0x4bde9a,_0x387fe6){return _0x4eca0d(_0x4bde9a,_0x387fe6);},'THZiA':_0x9d18f2(0x16a),'eVWSv':'✓\x20Claude\x20Code\x20plugin\x20enabled'},_0x5385ba=await _0x18a8a6['PUldx'](isPluginInstalled,_0x18a8a6[_0x9d18f2(0x164)]);if(_0x5385ba)return console['log'](_0x9d18f2(0x168)),![];const _0x37960a=_0x18a8a6[_0x9d18f2(0x179)](existsSync,join(_0x18a8a6['AQHqh'](getProjectRoot),_0x18a8a6['UJTRZ']));let _0x9d9b67;if(_0x37960a)_0x9d9b67=_0x18a8a6['mSWHt'];else{console[_0x9d18f2(0x188)](_0x9d18f2(0x166));const _0x249b93=await _0x43e3dc['prompt']([{'type':_0x9d18f2(0x167),'name':'pluginScope','message':'Where\x20should\x20the\x20plugin\x20be\x20installed?','choices':[{'name':_0x18a8a6[_0x9d18f2(0x177)],'value':'user'},{'name':_0x18a8a6[_0x9d18f2(0x15d)],'value':_0x9d18f2(0x192)}],'default':'user'}]);_0x9d9b67=_0x249b93['pluginScope'];}console['log']('\x0aInstalling\x20Claude\x20Code\x20plugin\x20('+_0x9d9b67+'\x20level)...\x0a');const _0x4f408b=await _0x18a8a6[_0x9d18f2(0x179)](isMarketplaceAdded,_0x18a8a6[_0x9d18f2(0x184)]);let _0x5beccb=_0x4f408b;if(_0x4f408b)console['log'](_0x9d18f2(0x131));else{const _0x7e046b=await _0x18a8a6[_0x9d18f2(0x179)](runClaudeCommand,['plugin',_0x18a8a6['phEUC'],_0x18a8a6[_0x9d18f2(0x185)],_0x18a8a6['fKQVD']]);!_0x7e046b[_0x9d18f2(0x135)]?(console[_0x9d18f2(0x151)]('❌\x20Failed\x20to\x20add\x20marketplace:',_0x7e046b['error']),console['log'](_0x9d18f2(0x172)),console['log'](_0x9d18f2(0x124)),console[_0x9d18f2(0x188)]('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0x9d9b67)):_0x5beccb=!![];}if(_0x5beccb){const _0x583a1=await _0x18a8a6['jFwTt'](runClaudeCommand,[_0x18a8a6[_0x9d18f2(0x150)],_0x18a8a6['QYhtt'],'ranger@trailhead',_0x18a8a6['GxhnK'],_0x9d9b67]);if(!_0x583a1['success'])console[_0x9d18f2(0x151)]('❌\x20Failed\x20to\x20install\x20plugin:',_0x583a1[_0x9d18f2(0x151)]),console[_0x9d18f2(0x188)](_0x18a8a6[_0x9d18f2(0x141)]),console['log'](_0x9d18f2(0x18c)+_0x9d9b67);else{console['log']('✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully');const _0x5cbbee=[_0x9d18f2(0x13f),_0x18a8a6['WQRFd'],_0x18a8a6['OqqRZ']];_0x18a8a6[_0x9d18f2(0x12f)](_0x9d9b67,_0x9d18f2(0x192))&&_0x5cbbee['push'](_0x18a8a6['GxhnK'],'project');const _0x806caa=await _0x18a8a6['oZifK'](runClaudeCommand,_0x5cbbee,{'captureOutput':!![]});if(!_0x806caa['success']){const _0x577015=_0x806caa['output']?.['includes'](_0x18a8a6[_0x9d18f2(0x178)]);!_0x577015&&console[_0x9d18f2(0x151)](_0x9d18f2(0x11d),_0x806caa[_0x9d18f2(0x151)]);}console[_0x9d18f2(0x188)](_0x18a8a6[_0x9d18f2(0x117)]);}}return!![];}function printProfileSetupLaterInstructions(){const _0x4c506e=_0x15fb3f,_0x3e47e0={'VzSDX':'\x0aIn\x20order\x20for\x20Ranger\x20to\x20verify\x20your\x20work,\x20you\x27ll\x20need\x20to\x20set\x20up\x20a\x20profile\x20later\x20with:','Bweaz':function(_0x841e61,_0x79aeb2){return _0x841e61(_0x79aeb2);},'xgNWQ':_0x4c506e(0x14c)};console[_0x4c506e(0x188)](_0x3e47e0['VzSDX']),console['log']('\x20\x20'+_0x3e47e0[_0x4c506e(0x152)](bold,_0x3e47e0['xgNWQ'])),console[_0x4c506e(0x188)](_0x4c506e(0x17a));}async function ensureLocalEnv(_0x92d7bd){const _0x1eff40=_0x15fb3f,_0xaee3b8={'GHFJp':function(_0x225f7a){return _0x225f7a();},'kHZjA':function(_0x4adb39,_0x48373e,_0x28413a){return _0x4adb39(_0x48373e,_0x28413a);},'nqdrr':'✓\x20Local\x20profile\x20already\x20exists','ywjXv':_0x1eff40(0x158),'uINYu':'to\x20access\x20your\x20app.\x20If\x20the\x20part\x20of\x20your\x20app\x20you\x20want\x20to\x20test\x20is\x20behind','XgtON':'auth,\x20you\x20can\x20log\x20in\x20and\x20we\x27ll\x20save\x20the\x20session\x20state\x20for\x20Ranger\x20to','MCCFA':'confirm','uetkL':'wantsProfile','FhdhQ':'Would\x20you\x20like\x20to\x20set\x20up\x20the\x20profile\x20now?','MCxBJ':function(_0xfca45a,_0x105de3,_0x106d33,_0x383d26){return _0xfca45a(_0x105de3,_0x106d33,_0x383d26);},'QxnXb':_0x1eff40(0x129),'jIowJ':_0x1eff40(0x111)};if(!_0xaee3b8['GHFJp'](findGitRoot))return console[_0x1eff40(0x188)](_0x1eff40(0x118)),{'ready':![],'skipped':!![]};if(_0xaee3b8['kHZjA'](findExistingEnv,_0x1eff40(0x129),{'locations':[_0x1eff40(0x129)]}))return console[_0x1eff40(0x188)](_0xaee3b8['nqdrr']),{'ready':!![],'skipped':![]};console[_0x1eff40(0x188)](_0xaee3b8['ywjXv']),console[_0x1eff40(0x188)](_0xaee3b8['uINYu']),console['log'](_0xaee3b8['XgtON']),console['log'](_0x1eff40(0x161)),console['log'](_0x1eff40(0x190));const {wantsProfile:_0x306097}=await _0x43e3dc[_0x1eff40(0x16e)]([{'type':_0xaee3b8[_0x1eff40(0x14a)],'name':_0xaee3b8[_0x1eff40(0x11f)],'message':_0xaee3b8['FhdhQ'],'default':!![]}]);if(!_0x306097)return printProfileSetupLaterInstructions(),{'ready':![],'skipped':!![]};try{return await _0xaee3b8['MCxBJ'](addEnv,_0xaee3b8[_0x1eff40(0x17c)],{},_0x92d7bd),{'ready':!![],'skipped':![]};}catch(_0x539bcb){return console['error'](_0xaee3b8[_0x1eff40(0x12a)],_0x539bcb instanceof Error?_0x539bcb['message']:_0x539bcb),printProfileSetupLaterInstructions(),{'ready':![],'skipped':![]};}}async function ensureSkills(){const _0x6863bf=_0x15fb3f,_0x26e270={'xixWy':function(_0x301690,_0x34f8cc,_0x523c0b,_0xfcba60){return _0x301690(_0x34f8cc,_0x523c0b,_0xfcba60);},'vaPzU':function(_0x5c8ad1,_0x55774b){return _0x5c8ad1(_0x55774b);},'AZQRe':_0x6863bf(0x175),'dUEYK':function(_0x532b65,_0x30cb65){return _0x532b65(_0x30cb65);},'Kdoxz':'project','SECdn':function(_0x2d7f2f,_0x3b5786){return _0x2d7f2f||_0x3b5786;},'mrcnO':function(_0x471b96,_0x7cbe){return _0x471b96(_0x7cbe);},'YMQaB':function(_0x515f0b,_0x49b93a,_0x5f50c4){return _0x515f0b(_0x49b93a,_0x5f50c4);},'ekWlj':function(_0x59c8e4){return _0x59c8e4();}},_0x3aca68=existsSync(_0x26e270['xixWy'](join,_0x26e270['vaPzU'](getSkillsDir,'user'),'ranger',_0x26e270[_0x6863bf(0x187)])),_0x345fda=existsSync(_0x26e270[_0x6863bf(0x142)](join,_0x26e270['dUEYK'](getSkillsDir,_0x26e270[_0x6863bf(0x14f)]),_0x6863bf(0x157),_0x6863bf(0x175)));if(_0x26e270[_0x6863bf(0x14b)](_0x3aca68,_0x345fda))return console[_0x6863bf(0x188)](_0x6863bf(0x12b)),![];const _0x2f135f=_0x26e270[_0x6863bf(0x15c)](existsSync,_0x26e270['YMQaB'](join,_0x26e270['ekWlj'](getProjectRoot),'.claude'));if(_0x2f135f)await _0x26e270[_0x6863bf(0x110)](skillup,{'autoInstall':_0x26e270['Kdoxz'],'suppressUsage':!![]});else{const {wantsSkillup:_0x496a5a}=await _0x43e3dc['prompt']([{'type':_0x6863bf(0x15e),'name':_0x6863bf(0x123),'message':_0x6863bf(0x165),'default':!![]}]);_0x496a5a&&await skillup({'suppressUsage':!![]});}return!![];}export async function start(_0xe16f25,_0x1b96ed,_0x3fc9ad){const _0x36d33d=_0x15fb3f,_0x3f22f5={'mHpeY':_0x36d33d(0x134),'OFGfj':function(_0x59acc3){return _0x59acc3();},'VMnAy':'No\x20git\x20repository\x20found','VAbuF':'No\x20git\x20repository\x20found.\x20Please\x20run\x20`ranger\x20setup`\x20from\x20inside\x20your\x20project\x20directory.','MRTko':function(_0x145d7f){return _0x145d7f();},'bqxUn':_0x36d33d(0x13a),'qfBxL':_0x36d33d(0x13b),'tZRyy':function(_0x1fc672,_0x4860e1){return _0x1fc672(_0x4860e1);},'iTodr':'\x0a✅\x20Ranger\x20setup\x20complete!\x0a','IiAbI':_0x36d33d(0x18e),'fDyNv':'\x20\x202.\x20Run:\x20ranger\x20skillup','NzdgN':_0x36d33d(0x12c),'dZqDd':'\x0aNext\x20steps:','jkQNB':_0x36d33d(0x132),'uDPwU':_0x36d33d(0x18d),'ZxPIT':_0x36d33d(0x13f),'jpKgm':_0x36d33d(0x148),'FFPQB':function(_0x31fe7a){return _0x31fe7a();},'KZeUO':'.ranger','siYkO':'profile','clQel':function(_0x176c14,_0xf1d27c){return _0x176c14(_0xf1d27c);},'LmMzR':_0x36d33d(0x12d),'NmIPm':function(_0x1c51f7,_0x119c1c){return _0x1c51f7+_0x119c1c;}};console['log']('\x0a🚀\x20Ranger\x20Setup\x0a'),_0x3fc9ad?.[_0x36d33d(0x14e)](_0x3f22f5[_0x36d33d(0x10e)]);if(!_0x3f22f5[_0x36d33d(0x153)](findGitRoot)){await _0x3fc9ad?.[_0x36d33d(0x195)](_0x3f22f5[_0x36d33d(0x10e)],new Error(_0x3f22f5['VMnAy']));throw new Error(_0x3f22f5['VAbuF']);}_0x3fc9ad?.['trackPhaseEnd'](_0x3f22f5['mHpeY']);const _0x4b2ca7=!existsSync(getRangerDir()),{path:_0x1ad0b6}=await _0x3f22f5[_0x36d33d(0x16d)](ensureRangerDir);_0x3fc9ad?.[_0x36d33d(0x14e)](_0x36d33d(0x13a));const _0x22f7c7=await authenticate(_0xe16f25);_0x3fc9ad?.['trackPhaseEnd'](_0x3f22f5['bqxUn'],{'isFirstRun':_0x4b2ca7,'method':_0x22f7c7[_0x36d33d(0x114)]}),_0x3fc9ad?.[_0x36d33d(0x14e)](_0x3f22f5['qfBxL']);_0x1b96ed?.['skipChromium']?console[_0x36d33d(0x188)]('✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)'):await ensureChromium();_0x3fc9ad?.[_0x36d33d(0x128)](_0x36d33d(0x13b),{'isFirstRun':_0x4b2ca7,'skipped':!!_0x1b96ed?.[_0x36d33d(0x143)]}),await _0x3f22f5['tZRyy'](writeRangerGitignore,_0x1ad0b6),console[_0x36d33d(0x188)](_0x3f22f5[_0x36d33d(0x126)]);const _0x2861ae=process[_0x36d33d(0x174)][_0x36d33d(0x119)]&&process[_0x36d33d(0x181)][_0x36d33d(0x119)];if(!_0x2861ae){const _0x5107ca=_0x3f22f5[_0x36d33d(0x159)][_0x36d33d(0x112)]('|');let _0x5daabb=0x0;while(!![]){switch(_0x5107ca[_0x5daabb++]){case'0':return;case'1':console[_0x36d33d(0x188)]('\x20\x20\x20\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x0a');continue;case'2':console[_0x36d33d(0x188)](_0x3f22f5['fDyNv']);continue;case'3':console['log'](_0x3f22f5['NzdgN']);continue;case'4':console[_0x36d33d(0x188)](_0x36d33d(0x16f));continue;case'5':console[_0x36d33d(0x188)](_0x3f22f5['dZqDd']);continue;case'6':console['log']('\x20\x204.\x20Run:\x20ranger\x20profile\x20add\x20local');continue;case'7':console[_0x36d33d(0x188)](_0x3f22f5['jkQNB']);continue;case'8':console['log'](_0x3f22f5['uDPwU']);continue;}break;}}_0x3fc9ad?.[_0x36d33d(0x14e)](_0x36d33d(0x13f)),await ensurePlugin(),_0x3fc9ad?.['trackPhaseEnd'](_0x3f22f5[_0x36d33d(0x113)],{'isFirstRun':_0x4b2ca7}),_0x3fc9ad?.[_0x36d33d(0x14e)](_0x3f22f5['jpKgm']),await _0x3f22f5[_0x36d33d(0x15f)](ensureSkills),_0x3fc9ad?.['trackPhaseEnd'](_0x3f22f5[_0x36d33d(0x171)],{'isFirstRun':_0x4b2ca7});const _0x4c66fc=_0x3f22f5[_0x36d33d(0x153)](findGitRoot);if(_0x4c66fc){const _0xcf5909=join(_0x4c66fc,_0x3f22f5[_0x36d33d(0x13e)]);!_0x3f22f5['tZRyy'](existsSync,_0xcf5909)&&await mkdir(_0xcf5909,{'recursive':!![]});}_0x3fc9ad?.[_0x36d33d(0x14e)](_0x3f22f5[_0x36d33d(0x13c)]);const _0x193304=await ensureLocalEnv(_0x3fc9ad);_0x3fc9ad?.[_0x36d33d(0x128)](_0x3f22f5[_0x36d33d(0x13c)],{'isFirstRun':_0x4b2ca7,'profileReady':_0x193304[_0x36d33d(0x183)],'userSkipped':_0x193304['skipped']});const _0x49bdf5=_0x193304['ready'],_0x45fccc=_0x3f22f5[_0x36d33d(0x146)](bold,_0x3f22f5['LmMzR']);_0x49bdf5&&console[_0x36d33d(0x188)](_0x36d33d(0x173)),console[_0x36d33d(0x188)](_0x3f22f5[_0x36d33d(0x121)](_0x3f22f5[_0x36d33d(0x121)]('\x0aIn\x20Claude\x20Code,\x20run\x20'+_0x45fccc+'\x20and\x20prompt\x20the\x20coding'+_0x36d33d(0x155),_0x36d33d(0x17b)),'\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.'));}
1
+ const _0x3f6777=_0x405d;(function(_0x24bafa,_0x4eb7b4){const _0x2e48d5=_0x405d,_0x5dbb0c=_0x24bafa();while(!![]){try{const _0x3d4090=-parseInt(_0x2e48d5(0x1e6))/0x1+-parseInt(_0x2e48d5(0x222))/0x2+parseInt(_0x2e48d5(0x1d6))/0x3+parseInt(_0x2e48d5(0x227))/0x4+parseInt(_0x2e48d5(0x1f8))/0x5+parseInt(_0x2e48d5(0x1f1))/0x6+-parseInt(_0x2e48d5(0x1c0))/0x7*(parseInt(_0x2e48d5(0x221))/0x8);if(_0x3d4090===_0x4eb7b4)break;else _0x5dbb0c['push'](_0x5dbb0c['shift']());}catch(_0x4163c0){_0x5dbb0c['push'](_0x5dbb0c['shift']());}}}(_0x4705,0x878ce));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';import _0x352a9f from'inquirer';import{getToken,storeToken}from'./utils/keychain.js';import{getCurrentUser}from'./utils/userApi.js';import{chromium}from'playwright';import{addEnv}from'./addEnv.js';import{getRangerDir,findGitRoot}from'./utils/rangerRoot.js';import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{findExistingEnv}from'./utils/settings.js';import{getCurrentVersion}from'./utils/version.js';import{ensureClaudePlugin,ensureClaudeSkills}from'./setup/claude.js';import{ensureOpencodePluginConfig}from'./setup/opencode.js';function _0x405d(_0x251187,_0x193159){_0x251187=_0x251187-0x1b9;const _0x47054c=_0x4705();let _0x405db7=_0x47054c[_0x251187];return _0x405db7;}function _0x4705(){const _0x5ab38f=['BYGgb','existing_token','6601662epwBjV','env','xNIVC','organizationName','.ranger','\x1b[1m','ready','700895zZfbio','skills','BDmNT','error','DwxIN','Installation\x20failed\x20with\x20exit\x20code\x20','.gitignore','You\x20can\x20install\x20it\x20manually\x20by\x20running:','JLNzU','JOzIM','FloBC','trackPhaseError','chromium','\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with','✓\x20Playwright\x20Chromium\x20browser\x20found','verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','...','isTTY','log','XAsPG','⚠\x20No\x20git\x20repository\x20found.\x20Run\x20`ranger\x20profile\x20add\x20local`\x20from\x20your\x20project\x20directory.','✓\x20Created\x20.ranger/\x20directory','auth','Make\x20sure\x20your\x20app\x20is\x20running\x20before\x20you\x20start.\x0a','You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:','.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.','skipChromium','ranger\x20profile\x20add\x20local','install','\x0a✅\x20Ranger\x20setup\x20complete!\x0a','prompt','pQNrv','✓\x20Stored\x20credentials\x20locally','opencode','\x20\x20npx\x20playwright\x20install\x20chromium','platform','✓\x20Already\x20authenticated\x20to\x20','Authentication\x20failed:\x20','force','IGwUn','OQorh','24YwfLJk','1994870CbLdXV','XgSBA','Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20','No\x20git\x20repository\x20found','user','971856YrjdcM','stdin','version','stdout','provided_token','scope','to\x20access\x20your\x20app.\x20If\x20the\x20part\x20of\x20your\x20app\x20you\x20want\x20to\x20test\x20is\x20behind','You\x27ll\x20need\x20the\x20app\x20to\x20be\x20running\x20to\x20set\x20up\x20the\x20profile.','url','REAUA','success','uMOMT','auth,\x20you\x20can\x20log\x20in\x20and\x20we\x27ll\x20save\x20the\x20session\x20state\x20for\x20Ranger\x20to','✓\x20Local\x20profile\x20already\x20exists','XITWI','✓\x20Created\x20.ranger/.gitignore','85253zWomSi','\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','\x0a❌\x20Profile\x20setup\x20failed:','dkNuH','LTpDT','aOAqK','.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.','WQMqv','NVxix','qjzmT','GITHUB_ENV','qAaDX','resolve','plugin','message','oYnma','✓\x20Exported\x20credentials\x20for\x20CI','\x0a⚠\x20Skipping\x20Chromium\x20installation.','warn','✓\x20Authenticated\x20to\x20','AMWJI','\x20install\x20chromium','1767174uOvUGS','eXTJV','\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','\x0aIn\x20order\x20for\x20Ranger\x20to\x20verify\x20your\x20work,\x20you\x27ll\x20need\x20to\x20set\x20up\x20a\x20profile\x20later\x20with:','\x20\x20npx\x20playwright@','\x0a✅\x20You\x27re\x20ready\x20to\x20start\x20using\x20Ranger\x20Feature\x20Review.','TOCDr','trackPhaseStart','The\x20required\x20version\x20(','method','cXsVd','playwright@','\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:','ranger','\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium','483292yHaoks','The\x20required\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','GsFAw','lGpSW','QPXDg','trackPhaseEnd','VaWZK','profile'];_0x4705=function(){return _0x5ab38f;};return _0x4705();}import{installSkill}from'./utils/skills.js';const require=createRequire(import.meta.url),bold=_0x2c0f0c=>_0x3f6777(0x1f6)+_0x2c0f0c+'\x1b[0m';function getPlaywrightVersion(){const _0x4ae0b4=_0x3f6777,_0x320741={'oQGqg':'playwright/package.json','xNIVC':function(_0x87ec1f,_0x1b4606){return _0x87ec1f(_0x1b4606);}};try{const _0x1ed282=require[_0x4ae0b4(0x1cc)](_0x320741['oQGqg']),_0x5bc468=_0x320741[_0x4ae0b4(0x1f3)](require,_0x1ed282);return _0x5bc468[_0x4ae0b4(0x229)];}catch{return null;}}function installChromiumBinary(_0x2ff176){const _0x3b966d={'aKMlf':function(_0x455f6a,_0x32878c){return _0x455f6a===_0x32878c;},'yvoWL':function(_0x31141c,_0x3407a6){return _0x31141c(_0x3407a6);},'mtTMB':'playwright','dcsVR':'chromium','Uhins':function(_0x19ee2d,_0x1bd162,_0x2e54d2,_0x144656){return _0x19ee2d(_0x1bd162,_0x2e54d2,_0x144656);},'IGwUn':'npx','qAaDX':function(_0x4f14f9,_0x25fa14){return _0x4f14f9===_0x25fa14;},'uyhXF':'win32'};return new Promise((_0x212498,_0x37f80a)=>{const _0x1dded1=_0x405d,_0x50ec34=_0x2ff176?[_0x1dded1(0x1e2)+_0x2ff176,'install','chromium']:[_0x3b966d['mtTMB'],_0x1dded1(0x214),_0x3b966d['dcsVR']],_0x56414a=_0x3b966d['Uhins'](spawn,_0x3b966d[_0x1dded1(0x21f)],_0x50ec34,{'stdio':'inherit','shell':_0x3b966d[_0x1dded1(0x1cb)](process[_0x1dded1(0x21b)],_0x3b966d['uyhXF'])});_0x56414a['on']('close',_0x539a6f=>{const _0x2798e8=_0x1dded1;_0x3b966d['aKMlf'](_0x539a6f,0x0)?_0x212498():_0x3b966d['yvoWL'](_0x37f80a,new Error(_0x2798e8(0x1fd)+_0x539a6f));}),_0x56414a['on']('error',_0x2c795a=>{_0x37f80a(_0x2c795a);});});}export async function authenticate(_0x30a3e9){const _0x42b7ca=_0x3f6777,_0x5ae061={'JopPE':function(_0x5e90f8){return _0x5e90f8();},'XAsPG':_0x42b7ca(0x1f0),'oKaob':function(_0xf8b60a){return _0xf8b60a();},'tfWPc':function(_0x53bafa,_0x4faced){return _0x53bafa instanceof _0x4faced;},'GsFAw':function(_0x263812,_0x5cba0b){return _0x263812(_0x5cba0b);},'CDySN':_0x42b7ca(0x1d0),'XITWI':_0x42b7ca(0x218),'ehUfi':_0x42b7ca(0x22b)};if(!_0x30a3e9){const _0x392c57=await _0x5ae061['JopPE'](getToken);if(_0x392c57){const _0x5994ad=await getCurrentUser(_0x392c57);if(_0x5994ad[_0x42b7ca(0x1ba)])return console[_0x42b7ca(0x20a)](_0x42b7ca(0x21c)+_0x5994ad[_0x42b7ca(0x226)][_0x42b7ca(0x1f4)]),{'token':_0x392c57,'method':_0x5ae061[_0x42b7ca(0x20b)]};}try{_0x30a3e9=await _0x5ae061['oKaob'](runDeviceAuthFlow);}catch(_0x59fc4c){throw new Error(_0x42b7ca(0x21d)+(_0x5ae061['tfWPc'](_0x59fc4c,Error)?_0x59fc4c[_0x42b7ca(0x1ce)]:_0x59fc4c));}const _0x30e6a2=await getCurrentUser(_0x30a3e9);if(!_0x30e6a2['success'])throw new Error(_0x42b7ca(0x224)+_0x30e6a2[_0x42b7ca(0x1fb)]);return console['log'](_0x42b7ca(0x1d3)+_0x30e6a2[_0x42b7ca(0x226)][_0x42b7ca(0x1f4)]),{'token':_0x30a3e9,'method':'device_auth'};}console['log']('Validating\x20API\x20token...');const _0x2a77a2=await _0x5ae061[_0x42b7ca(0x1e9)](getCurrentUser,_0x30a3e9);if(!_0x2a77a2['success']){if(_0x2a77a2['status'])throw new Error(_0x42b7ca(0x21d)+_0x2a77a2['error']+_0x42b7ca(0x211));else throw new Error('Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20'+_0x2a77a2[_0x42b7ca(0x1fb)]+_0x42b7ca(0x1c6));}return console['log'](_0x42b7ca(0x1d3)+_0x2a77a2[_0x42b7ca(0x226)]['organizationName']),await _0x5ae061[_0x42b7ca(0x1e9)](storeToken,_0x30a3e9),console[_0x42b7ca(0x20a)](process[_0x42b7ca(0x1f2)][_0x42b7ca(0x1ca)]?_0x5ae061['CDySN']:_0x5ae061[_0x42b7ca(0x1be)]),{'token':_0x30a3e9,'method':_0x5ae061['ehUfi']};}export async function ensureRangerDir(){const _0x4caa4b=_0x3f6777,_0x44a06b={'iUrkr':function(_0x2dbeb9){return _0x2dbeb9();},'SJWXr':function(_0x1fa50f,_0x9bffa1){return _0x1fa50f(_0x9bffa1);},'dxEBB':function(_0x55254e,_0x548419,_0x23487f){return _0x55254e(_0x548419,_0x23487f);},'zNUml':'✓\x20.ranger/\x20directory\x20already\x20exists'},_0x1af432=_0x44a06b['iUrkr'](getRangerDir);return!_0x44a06b['SJWXr'](existsSync,_0x1af432)?(await _0x44a06b['dxEBB'](mkdir,_0x1af432,{'recursive':!![]}),console['log'](_0x4caa4b(0x20d)),{'path':_0x1af432,'installed':!![]}):(console['log'](_0x44a06b['zNUml']),{'path':_0x1af432,'installed':![]});}export async function ensureChromium(){const _0x43bcf8=_0x3f6777,_0x289d7b={'WQMqv':function(_0x50c2a7,_0x2b10a4){return _0x50c2a7(_0x2b10a4);},'eXTJV':_0x43bcf8(0x206),'oYnma':'confirm','HaRxN':function(_0x29aef6,_0x52ceae){return _0x29aef6 instanceof _0x52ceae;},'OQorh':_0x43bcf8(0x1ff),'aRKkv':_0x43bcf8(0x210),'XgSBA':_0x43bcf8(0x21a)};let _0x570865=![];try{const _0x2c03c0=chromium['executablePath']();_0x570865=_0x289d7b[_0x43bcf8(0x1c7)](existsSync,_0x2c03c0);}catch{_0x570865=![];}if(_0x570865)return console[_0x43bcf8(0x20a)](_0x289d7b[_0x43bcf8(0x1d7)]),![];const _0x1b1218=getPlaywrightVersion(),_0x225aa0=process[_0x43bcf8(0x228)]['isTTY']&&process[_0x43bcf8(0x22a)][_0x43bcf8(0x209)];let _0x4bed33=!![];if(_0x225aa0){const {install:_0x3769ba}=await _0x352a9f['prompt']([{'type':_0x289d7b[_0x43bcf8(0x1cf)],'name':_0x43bcf8(0x214),'message':_0x1b1218?_0x43bcf8(0x1df)+_0x1b1218+')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?':_0x43bcf8(0x1e7),'default':!![]}]);_0x4bed33=_0x3769ba;}else console[_0x43bcf8(0x20a)](_0x43bcf8(0x1e5)+(_0x1b1218?'\x20'+_0x1b1218:'')+_0x43bcf8(0x208));if(_0x4bed33){console[_0x43bcf8(0x20a)]('\x0aInstalling\x20Chromium\x20browser...\x0a');try{await _0x289d7b['WQMqv'](installChromiumBinary,_0x1b1218),console['log'](_0x43bcf8(0x1d9));}catch(_0x5bb0f1){console[_0x43bcf8(0x1fb)]('\x0a❌\x20Failed\x20to\x20install\x20Chromium:',_0x289d7b['HaRxN'](_0x5bb0f1,Error)?_0x5bb0f1['message']:_0x5bb0f1),console[_0x43bcf8(0x20a)](_0x289d7b[_0x43bcf8(0x220)]),_0x1b1218?console['log']('\x20\x20npx\x20playwright@'+_0x1b1218+_0x43bcf8(0x1d5)):console['log']('\x20\x20npx\x20playwright\x20install\x20chromium');}}else console['log'](_0x43bcf8(0x1d1)),console[_0x43bcf8(0x20a)](_0x289d7b['aRKkv']),_0x1b1218?console['log'](_0x43bcf8(0x1db)+_0x1b1218+'\x20install\x20chromium'):console[_0x43bcf8(0x20a)](_0x289d7b[_0x43bcf8(0x223)]);return!![];}export async function writeRangerGitignore(_0x369983){const _0x3e3857=_0x3f6777,_0x4395fe={'JOzIM':function(_0x3d4a40,_0x42028d,_0x43ee05){return _0x3d4a40(_0x42028d,_0x43ee05);},'QNRLP':_0x3e3857(0x1bf)},_0xc4e581=_0x4395fe['JOzIM'](join,_0x369983,_0x3e3857(0x1fe)),_0x414a74='\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 _0x4395fe[_0x3e3857(0x201)](writeFile,_0xc4e581,_0x414a74),console['log'](_0x4395fe['QNRLP']);}function printProfileSetupLaterInstructions(){const _0x26c3f7=_0x3f6777,_0x21b4d7={'LTpDT':_0x26c3f7(0x1da),'kZULg':_0x26c3f7(0x20f)};console[_0x26c3f7(0x20a)](_0x21b4d7[_0x26c3f7(0x1c4)]),console[_0x26c3f7(0x20a)]('\x20\x20'+bold(_0x26c3f7(0x213))),console[_0x26c3f7(0x20a)](_0x21b4d7['kZULg']);}async function ensureLocalEnv(_0x424f12,_0x538272){const _0x5d168a=_0x3f6777,_0x536ab0={'JLNzU':function(_0xaee11b){return _0xaee11b();},'DwxIN':_0x5d168a(0x20c),'YhyCX':function(_0x42a94c,_0x138973,_0x548a68){return _0x42a94c(_0x138973,_0x548a68);},'pQNrv':_0x5d168a(0x1bd),'jlaYe':_0x5d168a(0x1bc),'YCULr':_0x5d168a(0x22e),'REAUA':function(_0x50a10d,_0x8732bf,_0x1909fa,_0x40c678){return _0x50a10d(_0x8732bf,_0x1909fa,_0x40c678);},'TuMym':'local','UHRZy':function(_0x3bbdaf){return _0x3bbdaf();}};if(!_0x536ab0[_0x5d168a(0x200)](findGitRoot))return console['log'](_0x536ab0[_0x5d168a(0x1fc)]),{'ready':![],'skipped':!![]};if(_0x536ab0['YhyCX'](findExistingEnv,'local',{'locations':['local']}))return console[_0x5d168a(0x20a)](_0x536ab0[_0x5d168a(0x217)]),{'ready':!![],'skipped':![]};const _0x407c3a=process['stdin']['isTTY']&&process[_0x5d168a(0x22a)][_0x5d168a(0x209)];if(_0x407c3a&&!_0x424f12?.[_0x5d168a(0x22f)]){console['log']('\x0aA\x20profile\x20gives\x20Ranger\x27s\x20browser\x20agent\x20information\x20about\x20how'),console[_0x5d168a(0x20a)](_0x5d168a(0x22d)),console['log'](_0x536ab0['jlaYe']),console[_0x5d168a(0x20a)]('use\x20until\x20the\x20session\x20expires.\x0a'),console[_0x5d168a(0x20a)](_0x536ab0['YCULr']);const {wantsProfile:_0x584860}=await _0x352a9f[_0x5d168a(0x216)]([{'type':'confirm','name':'wantsProfile','message':'Would\x20you\x20like\x20to\x20set\x20up\x20the\x20profile\x20now?','default':!![]}]);if(!_0x584860)return printProfileSetupLaterInstructions(),{'ready':![],'skipped':!![]};}try{return await _0x536ab0[_0x5d168a(0x1b9)](addEnv,_0x536ab0['TuMym'],{'url':_0x424f12?.[_0x5d168a(0x22f)],'force':_0x424f12?.['force']},_0x538272),{'ready':!![],'skipped':![]};}catch(_0x2ea350){return console['error'](_0x5d168a(0x1c2),_0x2ea350 instanceof Error?_0x2ea350['message']:_0x2ea350),_0x536ab0['UHRZy'](printProfileSetupLaterInstructions),{'ready':![],'skipped':![]};}}export async function start(_0x37a315,_0x33aebd,_0x58b8a2){const _0x11e736=_0x3f6777,_0x534e64={'FsYaS':'Non-interactive\x20mode:\x20No\x20--scope\x20provided,\x20defaulting\x20to\x20user.','aOAqK':'git_check','QPXDg':function(_0x554f87){return _0x554f87();},'cXsVd':'No\x20git\x20repository\x20found.\x20Please\x20run\x20`ranger\x20setup`\x20from\x20inside\x20your\x20project\x20directory.','DXsCP':function(_0x1abdf1){return _0x1abdf1();},'NVxix':function(_0x5a6ac8,_0x1b2dca){return _0x5a6ac8(_0x1b2dca);},'BYGgb':_0x11e736(0x20e),'AMWJI':_0x11e736(0x204),'RYzrT':_0x11e736(0x1cd),'WlwZn':function(_0x1572c9,_0x240541){return _0x1572c9(_0x240541);},'VaWZK':function(_0x34b776,_0x22ca8a){return _0x34b776&&_0x22ca8a;},'kfDty':_0x11e736(0x1e4),'dkNuH':'skills','lGpSW':_0x11e736(0x1e3),'DZBel':function(_0x53966a,_0x105005){return _0x53966a instanceof _0x105005;},'nnFjU':function(_0x518443,_0x280b2a,_0x523d9c){return _0x518443(_0x280b2a,_0x523d9c);},'NLuBf':'Non-interactive\x20mode:\x20Skipping\x20profile\x20setup.\x20To\x20set\x20up\x20a\x20profile,\x20pass\x20--url\x20or\x20run\x20later:','TOCDr':'ranger\x20profile\x20add\x20local','FloBC':_0x11e736(0x1ee),'BDmNT':_0x11e736(0x207),'YLUvy':function(_0x152b65,_0xb2fdf0){return _0x152b65(_0xb2fdf0);},'IgzsG':'/ranger:enable','qjzmT':function(_0x35e537,_0x372fb1){return _0x35e537+_0x372fb1;},'uMOMT':function(_0x2698ab,_0x21b857){return _0x2698ab+_0x21b857;}};console['log']('\x0a🚀\x20Ranger\x20Setup\x0a');const _0x3f7392=process[_0x11e736(0x228)]['isTTY']&&process[_0x11e736(0x22a)]['isTTY'];!_0x3f7392&&!_0x33aebd?.[_0x11e736(0x22c)]&&(console['log'](_0x534e64['FsYaS']),_0x33aebd={..._0x33aebd,'scope':_0x11e736(0x226)});_0x58b8a2?.['trackPhaseStart'](_0x534e64[_0x11e736(0x1c5)]);if(!_0x534e64[_0x11e736(0x1eb)](findGitRoot)){await _0x58b8a2?.[_0x11e736(0x203)]('git_check',new Error(_0x11e736(0x225)));throw new Error(_0x534e64[_0x11e736(0x1e1)]);}_0x58b8a2?.['trackPhaseEnd']('git_check');const _0x2cb3bb=!existsSync(_0x534e64['DXsCP'](getRangerDir)),{path:_0x54be5a}=await ensureRangerDir();_0x58b8a2?.['trackPhaseStart']('auth');const _0x189549=await _0x534e64[_0x11e736(0x1c8)](authenticate,_0x37a315);_0x58b8a2?.[_0x11e736(0x1ec)](_0x534e64[_0x11e736(0x1ef)],{'isFirstRun':_0x2cb3bb,'method':_0x189549[_0x11e736(0x1e0)]}),_0x58b8a2?.[_0x11e736(0x1de)](_0x534e64[_0x11e736(0x1d4)]);_0x33aebd?.[_0x11e736(0x212)]?console[_0x11e736(0x20a)](_0x11e736(0x1e8)):await ensureChromium();_0x58b8a2?.[_0x11e736(0x1ec)](_0x534e64[_0x11e736(0x1d4)],{'isFirstRun':_0x2cb3bb,'skipped':!!_0x33aebd?.['skipChromium']}),await writeRangerGitignore(_0x54be5a),console[_0x11e736(0x20a)](_0x11e736(0x215));const _0x5e9154=_0x33aebd?.[_0x11e736(0x22c)],_0xb24671=_0x33aebd?.['opencode']??![];let _0xacb182=null;_0xb24671?(_0x58b8a2?.[_0x11e736(0x1de)](_0x534e64['RYzrT']),_0xacb182=await _0x534e64['WlwZn'](ensureOpencodePluginConfig,_0x5e9154),_0x58b8a2?.['trackPhaseEnd'](_0x11e736(0x1cd),{'isFirstRun':_0x2cb3bb,'opencode':!![]})):(_0x58b8a2?.['trackPhaseStart'](_0x11e736(0x1cd)),await _0x534e64['WlwZn'](ensureClaudePlugin,_0x5e9154),_0x58b8a2?.['trackPhaseEnd'](_0x11e736(0x1cd),{'isFirstRun':_0x2cb3bb}));if(_0x534e64[_0x11e736(0x1ed)](_0xb24671,_0xacb182)){_0x58b8a2?.[_0x11e736(0x1de)]('skills');try{await installSkill(_0x534e64['kfDty'],{'level':_0xacb182[_0x11e736(0x22c)],'cliVersion':_0x534e64['QPXDg'](getCurrentVersion),'platform':_0x11e736(0x219)}),_0x58b8a2?.[_0x11e736(0x1ec)](_0x534e64['dkNuH'],{'isFirstRun':_0x2cb3bb,'opencode':!![]});}catch(_0x49cb7a){console[_0x11e736(0x1d2)](_0x534e64[_0x11e736(0x1ea)],_0x534e64['DZBel'](_0x49cb7a,Error)?_0x49cb7a[_0x11e736(0x1ce)]:_0x49cb7a),_0x58b8a2?.['trackPhaseEnd'](_0x534e64[_0x11e736(0x1c3)],{'isFirstRun':_0x2cb3bb,'opencode':!![],'failed':!![]});}}else _0x58b8a2?.[_0x11e736(0x1de)](_0x534e64[_0x11e736(0x1c3)]),await ensureClaudeSkills(_0x5e9154),_0x58b8a2?.['trackPhaseEnd'](_0x11e736(0x1f9),{'isFirstRun':_0x2cb3bb});const _0x58a82b=findGitRoot();if(_0x58a82b){const _0x1c6de1=join(_0x58a82b,_0x11e736(0x1f5));!_0x534e64['WlwZn'](existsSync,_0x1c6de1)&&await _0x534e64['nnFjU'](mkdir,_0x1c6de1,{'recursive':!![]});}if(!_0x3f7392&&!_0x33aebd?.[_0x11e736(0x22f)])console['log'](_0x534e64['NLuBf']),console[_0x11e736(0x20a)]('\x20\x20'+_0x534e64['NVxix'](bold,_0x534e64[_0x11e736(0x1dd)])+'\x0a');else{_0x58b8a2?.['trackPhaseStart'](_0x534e64[_0x11e736(0x202)]);const _0x35f53a=await _0x534e64['nnFjU'](ensureLocalEnv,{'url':_0x33aebd?.[_0x11e736(0x22f)],'force':_0x33aebd?.[_0x11e736(0x21e)]},_0x58b8a2);_0x58b8a2?.[_0x11e736(0x1ec)](_0x534e64[_0x11e736(0x202)],{'isFirstRun':_0x2cb3bb,'profileReady':_0x35f53a['ready'],'userSkipped':_0x35f53a['skipped']}),_0x35f53a[_0x11e736(0x1f7)]&&console[_0x11e736(0x20a)](_0x11e736(0x1dc));}if(_0xb24671)console['log']('\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)'),console['log']('and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review'),console[_0x11e736(0x20a)]('with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser'),console['log'](_0x534e64[_0x11e736(0x1fa)]);else{const _0x5c9eda=_0x534e64['YLUvy'](bold,_0x534e64['IgzsG']);console[_0x11e736(0x20a)](_0x534e64[_0x11e736(0x1c9)](_0x534e64[_0x11e736(0x1c9)](_0x534e64[_0x11e736(0x1bb)]('\x0aIn\x20Claude\x20Code,\x20run\x20'+_0x5c9eda+'\x20and\x20prompt\x20the\x20coding',_0x11e736(0x205)),_0x11e736(0x1c1)),_0x11e736(0x1d8)));}}
@@ -1 +1 @@
1
- function _0xa9de(){const _0x123a3c=['\x0a\x20\x20No\x20active\x20profile\x20set','\x0a---\x20Claude\x20Code\x20Plugin\x20---','hasEncryptedAuth','none','JGUud','settingsPath','API\x20Environment:\x20','863822KGqXmf','isDirectory','aptAR','\x0a📊\x20Ranger\x20Status\x0a','isActive','\x20\x20\x20\x20','ranger@trailhead','push','settings.json','log','2436JVoxmo','(not\x20found)','HqgSQ','426844WLhtYl','path',':\x20installed\x20(','\x0a---\x20Profiles\x20---','success','\x1b]8;;\x07','gLvba','uTxNG','plaintext','TlyMr','\x20\x20Run:\x20ranger\x20setup\x20[token]','join','\x20\x20Not\x20installed','scope','API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired','length','AlYUC','\x20\x20User-level:','utf-8','user','35731Jqbups','auth.json.enc','\x1b[1m','WwVMY','\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.','Version:\x20','unknown','env','oatvD','4746912JZZrNQ','match','No\x20skills\x20installed','No\x20profiles\x20configured','hasPlaintextAuth','\x20\x20\x20\x20Auth:\x20','1033578KqPgUH','includes','GzGoB','auth.json','\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','\x20\x20Project-level:','HjqAp','RrIrg','API\x20URL:\x20','501582DjkvXB','displayName','enabled','2325LbWpsR','wWeVH','name','knIND','\x20\x20\x20\x20Settings:\x20','organizationName'];_0xa9de=function(){return _0x123a3c;};return _0xa9de();}const _0x324e03=_0xdb4e;(function(_0x31abdf,_0x12be3c){const _0x30ea10=_0xdb4e,_0x4a0d36=_0x31abdf();while(!![]){try{const _0x67984c=-parseInt(_0x30ea10(0x129))/0x1+-parseInt(_0x30ea10(0x151))/0x2+parseInt(_0x30ea10(0x141))/0x3+-parseInt(_0x30ea10(0x15e))/0x4+parseInt(_0x30ea10(0x144))/0x5*(parseInt(_0x30ea10(0x15b))/0x6)+-parseInt(_0x30ea10(0x138))/0x7+parseInt(_0x30ea10(0x132))/0x8;if(_0x67984c===_0x12be3c)break;else _0x4a0d36['push'](_0x4a0d36['shift']());}catch(_0x39e747){_0x4a0d36['push'](_0x4a0d36['shift']());}}}(_0xa9de,0x3780d));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';import{getPluginInfo}from'./utils/claudePlugin.js';import{RANGER_MANAGED_SKILLS}from'./utils/skills.js';const bold=_0x8bac61=>_0x324e03(0x12b)+_0x8bac61+'\x1b[0m',link=(_0x482ec7,_0x15e788)=>'\x1b]8;;file://'+_0x482ec7+'\x07'+(_0x15e788||_0x482ec7)+_0x324e03(0x11a);function _0xdb4e(_0x546e7d,_0x5509ae){_0x546e7d=_0x546e7d-0x117;const _0xa9deeb=_0xa9de();let _0xdb4ed2=_0xa9deeb[_0x546e7d];return _0xdb4ed2;}async function getSkillsFromDir(_0x19a6b5,_0x29f33c){const _0xcaa07=_0x324e03,_0x54821f={'GgnKn':function(_0x5e4233,_0x395787){return _0x5e4233(_0x395787);},'fmwOh':function(_0x510d50,_0x296d83,_0x1d8dcc){return _0x510d50(_0x296d83,_0x1d8dcc);},'nnJiE':function(_0x2a3bc2,_0x1cf8ed,_0x468ba3){return _0x2a3bc2(_0x1cf8ed,_0x468ba3);}};if(!_0x54821f['GgnKn'](existsSync,_0x19a6b5))return[];const _0x3b4018=[];try{const _0x30002d=await _0x54821f['fmwOh'](readdir,_0x19a6b5,{'withFileTypes':!![]});for(const _0x9ea1b0 of _0x30002d){if(_0x9ea1b0[_0xcaa07(0x152)]()){const _0x9d8cbe=join(_0x19a6b5,_0x9ea1b0['name'],'SKILL.md');if(existsSync(_0x9d8cbe)){let _0x42cf70=_0x9ea1b0['name'];try{const _0x52fb6f=await _0x54821f['nnJiE'](readFile,_0x9d8cbe,_0xcaa07(0x127)),_0x21ef05=_0x52fb6f[_0xcaa07(0x133)](/name:\s*(.+)/);_0x21ef05&&(_0x42cf70=_0x21ef05[0x1]['trim']());}catch{}_0x3b4018[_0xcaa07(0x158)]({'name':_0x9ea1b0[_0xcaa07(0x146)],'displayName':_0x42cf70,'path':_0x9d8cbe,'level':_0x29f33c});}}}}catch{return[];}return _0x3b4018;}async function getInstalledSkills(){const _0x4d9f7a={'EgRNJ':function(_0x375b43,_0xe1c383,_0x41981d){return _0x375b43(_0xe1c383,_0x41981d);},'pEPBc':function(_0x461a03){return _0x461a03();},'KrRmp':'project'},[_0x46422b,_0x5fdae7]=await Promise['all']([_0x4d9f7a['EgRNJ'](getSkillsFromDir,_0x4d9f7a['pEPBc'](getProjectSkillsDir),_0x4d9f7a['KrRmp']),getSkillsFromDir(_0x4d9f7a['pEPBc'](getUserSkillsDir),'user')]);return{'project':_0x46422b,'user':_0x5fdae7};}async function getEnvironments(){const _0x5b51a4=_0x324e03,_0x31c97a={'aptAR':_0x5b51a4(0x13b),'FUSVE':function(_0x412480,_0x34a698,_0x4fd3ba){return _0x412480(_0x34a698,_0x4fd3ba);},'TlyMr':function(_0x5e9522,_0x5a8e0b){return _0x5e9522(_0x5a8e0b);},'AlYUC':function(_0x1e7f3d){return _0x1e7f3d();},'GzGoB':function(_0x57df83,_0x383487){return _0x57df83(_0x383487);}},{envNames:_0x43a680,activeEnv:_0x207560}=await getEnvNames(),_0x4861ac=_0x31c97a[_0x5b51a4(0x125)](getRangerDir);if(!_0x31c97a[_0x5b51a4(0x13a)](existsSync,_0x4861ac))return{'envs':[],'activeEnv':null};const _0x3c3f45=_0x43a680['map'](_0x34d7c6=>{const _0x25f75b=_0x5b51a4,_0x5c68f6=getEnvDir(_0x34d7c6),_0x41631a=join(_0x5c68f6,_0x25f75b(0x159)),_0x46190e=join(_0x5c68f6,_0x31c97a[_0x25f75b(0x153)]),_0x129831=_0x31c97a['FUSVE'](join,_0x5c68f6,_0x25f75b(0x12a));return{'name':_0x34d7c6,'settingsPath':existsSync(_0x41631a)?_0x41631a:'(not\x20found)','hasPlaintextAuth':_0x31c97a['TlyMr'](existsSync,_0x46190e),'hasEncryptedAuth':_0x31c97a[_0x25f75b(0x11e)](existsSync,_0x129831),'isActive':_0x34d7c6===_0x207560};});return{'envs':_0x3c3f45,'activeEnv':_0x207560};}export async function status(){const _0x33d23b=_0x324e03,_0x1eff65={'QlINJ':_0x33d23b(0x154),'JGUud':function(_0xc9163b){return _0xc9163b();},'KBeCA':function(_0x165cc4,_0x124ea1){return _0x165cc4(_0x124ea1);},'vvzTc':function(_0x4fe662,_0x116fb7,_0x19d965){return _0x4fe662(_0x116fb7,_0x19d965);},'FpsaI':function(_0x252de8,_0x1cb1d4,_0x2233c6){return _0x252de8(_0x1cb1d4,_0x2233c6);},'gLvba':function(_0x1b6ddf,_0x25bb70){return _0x1b6ddf!==_0x25bb70;},'UMLvZ':function(_0x5063d6){return _0x5063d6();},'uTxNG':function(_0x4bb445,_0x5e5f5f){return _0x4bb445(_0x5e5f5f);},'WwVMY':_0x33d23b(0x157),'iaArx':_0x33d23b(0x12f),'knIND':'disabled','SBLGU':function(_0x5e0ab8,_0x40ebcc){return _0x5e0ab8(_0x40ebcc);},'XgurX':_0x33d23b(0x121),'IJGeE':_0x33d23b(0x13c),'wWeVH':function(_0x4e0050,_0x8100d0){return _0x4e0050===_0x8100d0;},'HjqAp':function(_0x24cd51,_0x380dc4){return _0x24cd51>_0x380dc4;},'eTDIl':_0x33d23b(0x13d),'HqgSQ':_0x33d23b(0x118),'TTUPa':function(_0x5e0bbd,_0x52b001){return _0x5e0bbd===_0x52b001;},'PeAch':_0x33d23b(0x15c),'RrIrg':function(_0xdb1a29,_0x1f65ad,_0x4f199e){return _0xdb1a29(_0x1f65ad,_0x4f199e);},'oatvD':function(_0x387e60,_0x359c3b){return _0x387e60(_0x359c3b);}};console[_0x33d23b(0x15a)](_0x1eff65['QlINJ']);const _0x4a8131=process['cwd'](),_0x2fbc86=_0x1eff65['JGUud'](getRangerDir);if(!_0x1eff65['KBeCA'](existsSync,_0x2fbc86)){console['log']('Root:\x20'+_0x1eff65['vvzTc'](link,_0x4a8131,bold(basename(_0x4a8131)))),console['log'](_0x33d23b(0x12d)),console[_0x33d23b(0x15a)]('\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a');return;}console[_0x33d23b(0x15a)]('Root:\x20'+_0x1eff65['FpsaI'](link,_0x4a8131,bold(basename(_0x4a8131))));const _0x6636f0=getCurrentVersion(),_0x5cf1c0=_0x1eff65[_0x33d23b(0x14e)](getLatestVersion);if(_0x5cf1c0&&_0x1eff65[_0x33d23b(0x11b)](_0x5cf1c0,_0x6636f0))console[_0x33d23b(0x15a)]('Version:\x20'+_0x6636f0+'\x20(latest:\x20'+_0x5cf1c0+')'),console['log']('\x20\x20Run:\x20ranger\x20update');else _0x5cf1c0?console['log'](_0x33d23b(0x12e)+_0x6636f0+'\x20(up\x20to\x20date)'):console[_0x33d23b(0x15a)]('Version:\x20'+_0x6636f0);const _0x579f2e=await getToken();if(_0x579f2e){const _0x3cde60=await _0x1eff65['KBeCA'](getCurrentUser,_0x579f2e);_0x3cde60[_0x33d23b(0x119)]?console['log']('Organization:\x20'+bold(_0x3cde60[_0x33d23b(0x128)][_0x33d23b(0x149)])):(console[_0x33d23b(0x15a)](_0x33d23b(0x123)),console[_0x33d23b(0x15a)]('\x20\x20Run:\x20ranger\x20setup\x20[token]'));}else console[_0x33d23b(0x15a)]('API\x20Token:\x20✗\x20Not\x20found'),console['log'](_0x33d23b(0x11f));process[_0x33d23b(0x130)]['DEBUG']&&(console[_0x33d23b(0x15a)](_0x33d23b(0x150)+_0x1eff65['JGUud'](getCurrentEnvironment)),console[_0x33d23b(0x15a)](_0x33d23b(0x140)+_0x1eff65['UMLvZ'](getApiBaseUrl)));console[_0x33d23b(0x15a)](_0x33d23b(0x14b));const _0x5d75b2=await _0x1eff65[_0x33d23b(0x11c)](getPluginInfo,_0x1eff65[_0x33d23b(0x12c)]);if(_0x5d75b2){const _0x1ec4a8=_0x5d75b2[_0x33d23b(0x122)]||_0x1eff65['iaArx'],_0x40564b=_0x5d75b2[_0x33d23b(0x143)]?_0x33d23b(0x143):_0x1eff65[_0x33d23b(0x147)];console['log']('\x20\x20'+_0x1eff65['SBLGU'](bold,_0x33d23b(0x157))+_0x33d23b(0x117)+_0x1ec4a8+',\x20'+_0x40564b+')');}else console['log'](_0x1eff65['XgurX']),console['log'](_0x1eff65['IJGeE']);console[_0x33d23b(0x15a)]('\x0a---\x20Skills\x20---');const {project:_0x235c1d,user:_0x2b4f6a}=await getInstalledSkills(),_0x4fb7e5=_0x235c1d['filter'](_0x4fd691=>RANGER_MANAGED_SKILLS[_0x33d23b(0x139)](_0x4fd691[_0x33d23b(0x146)])),_0x1f6e51=_0x2b4f6a['filter'](_0x169b92=>RANGER_MANAGED_SKILLS[_0x33d23b(0x139)](_0x169b92['name'])),_0x9ae2d7=_0x4fb7e5[_0x33d23b(0x124)]+_0x1f6e51[_0x33d23b(0x124)];if(_0x1eff65[_0x33d23b(0x145)](_0x9ae2d7,0x0))console[_0x33d23b(0x15a)](_0x33d23b(0x134)),console['log']('\x20\x20Run:\x20ranger\x20skillup');else{if(_0x1eff65[_0x33d23b(0x13e)](_0x4fb7e5[_0x33d23b(0x124)],0x0)){console[_0x33d23b(0x15a)](_0x1eff65['eTDIl']);for(const _0x5ae400 of _0x4fb7e5){console[_0x33d23b(0x15a)](_0x33d23b(0x156)+bold(_0x5ae400['displayName'])+':\x20'+link(_0x5ae400[_0x33d23b(0x15f)],_0x1eff65['KBeCA'](basename,_0x5ae400['path'])));}}if(_0x1f6e51['length']>0x0){console['log'](_0x33d23b(0x126));for(const _0x342587 of _0x1f6e51){console[_0x33d23b(0x15a)](_0x33d23b(0x156)+bold(_0x342587[_0x33d23b(0x142)])+':\x20'+link(_0x342587[_0x33d23b(0x15f)],_0x1eff65['SBLGU'](basename,_0x342587['path'])));}}}console[_0x33d23b(0x15a)](_0x1eff65[_0x33d23b(0x15d)]);const {envs:_0x3fe8f6,activeEnv:_0x304037}=await getEnvironments();if(_0x1eff65['TTUPa'](_0x3fe8f6['length'],0x0))console[_0x33d23b(0x15a)](_0x33d23b(0x135)),console[_0x33d23b(0x15a)]('\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>');else{for(const _0x10bab3 of _0x3fe8f6){const _0x1b1a1a=_0x10bab3[_0x33d23b(0x155)]?'\x20(active)':'',_0x27f162=_0x10bab3[_0x33d23b(0x14c)]?'encrypted':_0x10bab3[_0x33d23b(0x136)]?_0x33d23b(0x11d):_0x33d23b(0x14d);console[_0x33d23b(0x15a)]('\x20\x20'+_0x1eff65['SBLGU'](bold,_0x10bab3[_0x33d23b(0x146)])+_0x1b1a1a),console['log'](_0x33d23b(0x137)+_0x27f162),_0x10bab3[_0x33d23b(0x14f)]!==_0x1eff65['PeAch']&&console['log'](_0x33d23b(0x148)+_0x1eff65[_0x33d23b(0x13f)](link,_0x10bab3[_0x33d23b(0x14f)],_0x1eff65[_0x33d23b(0x131)](basename,_0x10bab3[_0x33d23b(0x14f)])));}!_0x304037&&(console[_0x33d23b(0x15a)](_0x33d23b(0x14a)),console['log']('\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20'+_0x3fe8f6['map'](_0x1f2a63=>_0x1f2a63[_0x33d23b(0x146)])[_0x33d23b(0x120)](',\x20')+')'));}console[_0x33d23b(0x15a)]('');}
1
+ function _0x1c3f(_0xdd6d2f,_0xe35472){_0xdd6d2f=_0xdd6d2f-0xee;const _0x5a7c57=_0x5a7c();let _0x1c3fd0=_0x5a7c57[_0xdd6d2f];return _0x1c3fd0;}(function(_0xb4798f,_0x3b9a15){const _0x39bace=_0x1c3f,_0x368d66=_0xb4798f();while(!![]){try{const _0x969da3=parseInt(_0x39bace(0x137))/0x1*(-parseInt(_0x39bace(0x11d))/0x2)+-parseInt(_0x39bace(0x11e))/0x3+-parseInt(_0x39bace(0x124))/0x4+-parseInt(_0x39bace(0xf2))/0x5+-parseInt(_0x39bace(0x10b))/0x6*(-parseInt(_0x39bace(0x132))/0x7)+parseInt(_0x39bace(0x12b))/0x8+parseInt(_0x39bace(0x13b))/0x9*(parseInt(_0x39bace(0x120))/0xa);if(_0x969da3===_0x3b9a15)break;else _0x368d66['push'](_0x368d66['shift']());}catch(_0x48d311){_0x368d66['push'](_0x368d66['shift']());}}}(_0x5a7c,0x86921));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';import{getPluginInfo}from'./utils/claudePlugin.js';import{RANGER_MANAGED_SKILLS}from'./utils/skills.js';import{spawn}from'child_process';const bold=_0x3b1b1f=>'\x1b[1m'+_0x3b1b1f+'\x1b[0m',link=(_0x435b4b,_0xc3e3d2)=>'\x1b]8;;file://'+_0x435b4b+'\x07'+(_0xc3e3d2||_0x435b4b)+'\x1b]8;;\x07';async function getOpencodePluginStatus(){const _0x41cdaf=_0x1c3f,_0x3616a7={'MGzDP':function(_0x4248cc,_0xd8bc0e){return _0x4248cc(_0xd8bc0e);},'MMrvG':'not_configured','gXZla':'string','jVxqu':function(_0x25ee42,_0x1a007d,_0x159fa3,_0x44211d){return _0x25ee42(_0x1a007d,_0x159fa3,_0x44211d);},'mMvDh':_0x41cdaf(0x129),'SLVSt':_0x41cdaf(0xee)};return new Promise(_0x15a62c=>{const _0x159e2d=_0x41cdaf,_0x5087fb={'sadhO':_0x3616a7['gXZla'],'XgCbw':_0x159e2d(0xf3)},_0x3dc739=_0x3616a7[_0x159e2d(0x119)](spawn,'opencode',[_0x159e2d(0x131),_0x159e2d(0xfb)],{'stdio':[_0x159e2d(0x11b),'pipe',_0x159e2d(0x145)]});let _0x4ddee9='';_0x3dc739[_0x159e2d(0x141)]?.['on']('data',_0x42a621=>{_0x4ddee9+=_0x42a621['toString']();}),_0x3dc739['stderr']?.['on']('data',_0x4ff21f=>{_0x4ddee9+=_0x4ff21f['toString']();}),_0x3dc739['on'](_0x3616a7['mMvDh'],()=>{_0x15a62c({'status':'not_installed'});}),_0x3dc739['on'](_0x3616a7['SLVSt'],_0x22ef7d=>{const _0x3cf469=_0x159e2d;if(_0x22ef7d!==0x0){_0x3616a7['MGzDP'](_0x15a62c,{'status':_0x3cf469(0x10d)});return;}const _0x2a1730=_0x4ddee9[_0x3cf469(0x148)]();let _0x3f7c01=null;if(_0x2a1730)try{_0x3f7c01=JSON[_0x3cf469(0x146)](_0x2a1730);}catch{const _0x2fdf21=_0x2a1730['match'](/\{[\s\S]*\}$/);if(_0x2fdf21)try{_0x3f7c01=JSON['parse'](_0x2fdf21[0x0]);}catch{_0x3f7c01=null;}}const _0x52ad59=Array[_0x3cf469(0x13f)](_0x3f7c01?.[_0x3cf469(0xff)])?_0x3f7c01?.[_0x3cf469(0xff)]:[],_0x45d63c=_0x52ad59[_0x3cf469(0x123)](_0x150020=>{const _0x1a06f2=_0x3cf469;if(typeof _0x150020!==_0x5087fb[_0x1a06f2(0xfa)])return![];return _0x150020[_0x1a06f2(0xf9)](_0x5087fb[_0x1a06f2(0x138)])||_0x150020[_0x1a06f2(0xf9)]('opencode-plugin');});if(_0x45d63c){_0x3616a7[_0x3cf469(0x10a)](_0x15a62c,{'status':_0x3cf469(0x140),'details':_0x52ad59['length']>0x0?_0x52ad59[_0x3cf469(0x13d)]+'\x20plugin(s)\x20configured':undefined});return;}if(_0x52ad59[_0x3cf469(0x13d)]>0x0){_0x3616a7['MGzDP'](_0x15a62c,{'status':_0x3616a7['MMrvG'],'details':_0x52ad59[_0x3cf469(0x13d)]+'\x20plugin(s)\x20configured'});return;}_0x15a62c({'status':'not_configured'});});});}async function getSkillsFromDir(_0x2b69ee,_0x35d019){const _0xeefeca=_0x1c3f,_0x11a614={'ZdpBu':function(_0x9b2f75,_0xbe848e,_0x53717e){return _0x9b2f75(_0xbe848e,_0x53717e);},'aKIMe':'utf-8'};if(!existsSync(_0x2b69ee))return[];const _0x352cfd=[];try{const _0x208f79=await _0x11a614['ZdpBu'](readdir,_0x2b69ee,{'withFileTypes':!![]});for(const _0x113899 of _0x208f79){if(_0x113899[_0xeefeca(0x109)]()){const _0x4fabb6=join(_0x2b69ee,_0x113899['name'],'SKILL.md');if(existsSync(_0x4fabb6)){let _0x23c726=_0x113899['name'];try{const _0x47bb07=await readFile(_0x4fabb6,_0x11a614['aKIMe']),_0x5465c6=_0x47bb07[_0xeefeca(0x11f)](/name:\s*(.+)/);_0x5465c6&&(_0x23c726=_0x5465c6[0x1][_0xeefeca(0x148)]());}catch{}_0x352cfd[_0xeefeca(0x125)]({'name':_0x113899['name'],'displayName':_0x23c726,'path':_0x4fabb6,'level':_0x35d019});}}}}catch{return[];}return _0x352cfd;}async function getInstalledSkills(){const _0xf122d6=_0x1c3f,_0x5b2f59={'JmDwb':_0xf122d6(0x11c),'sxcgA':function(_0x1761d2,_0x53b38f,_0x3d0d0c){return _0x1761d2(_0x53b38f,_0x3d0d0c);},'bFdZJ':function(_0x135c31){return _0x135c31();},'vhkFv':_0xf122d6(0x143)},[_0x406057,_0x20e85c]=await Promise[_0xf122d6(0x12d)]([getSkillsFromDir(getProjectSkillsDir(),_0x5b2f59[_0xf122d6(0x103)]),_0x5b2f59['sxcgA'](getSkillsFromDir,_0x5b2f59['bFdZJ'](getUserSkillsDir),_0x5b2f59[_0xf122d6(0x135)])]);return{'project':_0x406057,'user':_0x20e85c};}async function getEnvironments(){const _0x5a46ed=_0x1c3f,_0x20a4e4={'Rnkwm':_0x5a46ed(0x127),'wnzTQ':_0x5a46ed(0x12e),'DQlKC':function(_0xf4eac8,_0x54fe70){return _0xf4eac8(_0x54fe70);},'OKLUX':_0x5a46ed(0x112),'zSXZP':function(_0x264496,_0x2ded91){return _0x264496(_0x2ded91);},'vMCdg':function(_0x2a82d3){return _0x2a82d3();}},{envNames:_0x17e993,activeEnv:_0x34c1f5}=await _0x20a4e4[_0x5a46ed(0x113)](getEnvNames),_0x1e5342=_0x20a4e4[_0x5a46ed(0x113)](getRangerDir);if(!existsSync(_0x1e5342))return{'envs':[],'activeEnv':null};const _0x2f497=_0x17e993['map'](_0x204f35=>{const _0x5c723c=_0x5a46ed,_0x58430c=getEnvDir(_0x204f35),_0xb4ff6f=join(_0x58430c,'settings.json'),_0x259ed1=join(_0x58430c,_0x20a4e4[_0x5c723c(0x102)]),_0x1b1653=join(_0x58430c,_0x20a4e4['wnzTQ']);return{'name':_0x204f35,'settingsPath':_0x20a4e4[_0x5c723c(0x110)](existsSync,_0xb4ff6f)?_0xb4ff6f:_0x20a4e4['OKLUX'],'hasPlaintextAuth':_0x20a4e4[_0x5c723c(0x110)](existsSync,_0x259ed1),'hasEncryptedAuth':_0x20a4e4['zSXZP'](existsSync,_0x1b1653),'isActive':_0x204f35===_0x34c1f5};});return{'envs':_0x2f497,'activeEnv':_0x34c1f5};}export async function status(){const _0x3b51a4=_0x1c3f,_0x3a79c5={'fJEzq':'\x0a📊\x20Ranger\x20Status\x0a','VmgAo':function(_0x4a32ed,_0x41cc00){return _0x4a32ed(_0x41cc00);},'ZmcRv':function(_0x314aba,_0x3ef941){return _0x314aba(_0x3ef941);},'kbgnN':function(_0x3fa034,_0x559f30){return _0x3fa034(_0x559f30);},'wazuh':function(_0x242812){return _0x242812();},'MpDQz':function(_0x2c4525){return _0x2c4525();},'sPDWf':_0x3b51a4(0xfc),'byNph':function(_0x445943,_0x5a56ce){return _0x445943===_0x5a56ce;},'EzUUA':_0x3b51a4(0x107),'yxUIt':'disabled','AxlIz':_0x3b51a4(0x139),'thTBn':_0x3b51a4(0xf1),'dZrrV':function(_0x162c9b,_0x6065df){return _0x162c9b(_0x6065df);},'XAouv':function(_0x2a38c6,_0x380fb0,_0x28c2b3){return _0x2a38c6(_0x380fb0,_0x28c2b3);},'ZGBRv':'\x20\x20User-level:','pURzN':_0x3b51a4(0x118),'TyLCb':'No\x20profiles\x20configured','QIUrl':'\x20(active)','aAKOj':'encrypted','HLMDj':'plaintext','krUXN':function(_0x2ae4ef,_0x2f80b1){return _0x2ae4ef!==_0x2f80b1;},'rpxnl':function(_0x23e4e9,_0x2a2c79,_0x59515f){return _0x23e4e9(_0x2a2c79,_0x59515f);},'rRePJ':function(_0x45eedb,_0x55e811){return _0x45eedb(_0x55e811);}};console['log'](_0x3a79c5[_0x3b51a4(0x128)]);const _0x14a861=process[_0x3b51a4(0x12c)](),_0x204084=getRangerDir();if(!_0x3a79c5[_0x3b51a4(0x12a)](existsSync,_0x204084)){console['log'](_0x3b51a4(0x126)+link(_0x14a861,_0x3a79c5[_0x3b51a4(0x121)](bold,_0x3a79c5[_0x3b51a4(0x122)](basename,_0x14a861)))),console['log'](_0x3b51a4(0xfe)),console['log'](_0x3b51a4(0x106));return;}console[_0x3b51a4(0xfd)](_0x3b51a4(0x126)+link(_0x14a861,_0x3a79c5['kbgnN'](bold,basename(_0x14a861))));const _0x4e8848=getCurrentVersion(),_0x394776=getLatestVersion();if(_0x394776&&_0x394776!==_0x4e8848)console[_0x3b51a4(0xfd)]('Version:\x20'+_0x4e8848+_0x3b51a4(0x105)+_0x394776+')'),console['log']('\x20\x20Run:\x20ranger\x20update');else _0x394776?console['log'](_0x3b51a4(0xf4)+_0x4e8848+_0x3b51a4(0x116)):console['log'](_0x3b51a4(0xf4)+_0x4e8848);const _0x156952=await _0x3a79c5['wazuh'](getToken);if(_0x156952){const _0x37236c=await _0x3a79c5[_0x3b51a4(0x121)](getCurrentUser,_0x156952);_0x37236c[_0x3b51a4(0x13c)]?console['log'](_0x3b51a4(0x130)+_0x3a79c5[_0x3b51a4(0x12a)](bold,_0x37236c[_0x3b51a4(0x143)][_0x3b51a4(0x142)])):(console[_0x3b51a4(0xfd)]('API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired'),console['log'](_0x3b51a4(0x115)));}else console['log']('API\x20Token:\x20✗\x20Not\x20found'),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]');process['env']['DEBUG']&&(console['log']('API\x20Environment:\x20'+_0x3a79c5['MpDQz'](getCurrentEnvironment)),console['log']('API\x20URL:\x20'+getApiBaseUrl()));console[_0x3b51a4(0xfd)](_0x3a79c5[_0x3b51a4(0xf5)]);const _0x1f395e=await getOpencodePluginStatus();if(_0x3a79c5['byNph'](_0x1f395e['status'],'configured'))console['log']('\x20\x20'+bold('@ranger-testing/opencode-plugin')+_0x3b51a4(0x133)),_0x1f395e['details']&&console['log']('\x20\x20'+_0x1f395e[_0x3b51a4(0x104)]);else _0x1f395e['status']===_0x3b51a4(0x144)?(console[_0x3b51a4(0xfd)](_0x3a79c5[_0x3b51a4(0xf6)]),_0x1f395e[_0x3b51a4(0x104)]&&console['log']('\x20\x20'+_0x1f395e['details']),console[_0x3b51a4(0xfd)](_0x3b51a4(0x134))):console[_0x3b51a4(0xfd)]('\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available');console['log']('\x0a---\x20Claude\x20Code\x20Plugin\x20---');const _0x3a4f8c=await getPluginInfo('ranger@trailhead');if(_0x3a4f8c){const _0x113aff=_0x3a4f8c[_0x3b51a4(0xef)]||_0x3b51a4(0x13a),_0x2e8d50=_0x3a4f8c['enabled']?'enabled':_0x3a79c5[_0x3b51a4(0x12f)];console['log']('\x20\x20'+_0x3a79c5['kbgnN'](bold,'ranger@trailhead')+_0x3b51a4(0x13e)+_0x113aff+',\x20'+_0x2e8d50+')');}else console['log'](_0x3a79c5['AxlIz']),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)');console['log']('\x0a---\x20Skills\x20---');const {project:_0x4c0fbf,user:_0x5f35c4}=await _0x3a79c5['wazuh'](getInstalledSkills),_0x1eac89=_0x4c0fbf['filter'](_0xf4d67a=>RANGER_MANAGED_SKILLS['includes'](_0xf4d67a['name'])),_0x5974f3=_0x5f35c4[_0x3b51a4(0x11a)](_0x38abec=>RANGER_MANAGED_SKILLS[_0x3b51a4(0xf9)](_0x38abec[_0x3b51a4(0x108)])),_0x34e2db=_0x1eac89['length']+_0x5974f3['length'];if(_0x3a79c5['byNph'](_0x34e2db,0x0))console[_0x3b51a4(0xfd)](_0x3a79c5[_0x3b51a4(0x136)]),console['log']('\x20\x20Run:\x20ranger\x20skillup');else{if(_0x1eac89['length']>0x0){console['log'](_0x3b51a4(0xf8));for(const _0x2c9937 of _0x1eac89){console[_0x3b51a4(0xfd)]('\x20\x20\x20\x20'+_0x3a79c5['dZrrV'](bold,_0x2c9937[_0x3b51a4(0xf0)])+':\x20'+_0x3a79c5[_0x3b51a4(0x147)](link,_0x2c9937['path'],basename(_0x2c9937[_0x3b51a4(0x100)])));}}if(_0x5974f3['length']>0x0){console[_0x3b51a4(0xfd)](_0x3a79c5[_0x3b51a4(0x10e)]);for(const _0x51ba91 of _0x5974f3){console['log']('\x20\x20\x20\x20'+bold(_0x51ba91['displayName'])+':\x20'+_0x3a79c5['XAouv'](link,_0x51ba91['path'],basename(_0x51ba91[_0x3b51a4(0x100)])));}}}console[_0x3b51a4(0xfd)](_0x3a79c5['pURzN']);const {envs:_0x46910b,activeEnv:_0x425f64}=await getEnvironments();if(_0x3a79c5['byNph'](_0x46910b['length'],0x0))console['log'](_0x3a79c5['TyLCb']),console[_0x3b51a4(0xfd)](_0x3b51a4(0x114));else{for(const _0x4b647b of _0x46910b){const _0x447ec9=_0x4b647b['isActive']?_0x3a79c5[_0x3b51a4(0x117)]:'',_0x3ab18b=_0x4b647b['hasEncryptedAuth']?_0x3a79c5['aAKOj']:_0x4b647b['hasPlaintextAuth']?_0x3a79c5['HLMDj']:'none';console['log']('\x20\x20'+bold(_0x4b647b[_0x3b51a4(0x108)])+_0x447ec9),console['log'](_0x3b51a4(0xf7)+_0x3ab18b),_0x3a79c5[_0x3b51a4(0x101)](_0x4b647b['settingsPath'],'(not\x20found)')&&console[_0x3b51a4(0xfd)]('\x20\x20\x20\x20Settings:\x20'+_0x3a79c5[_0x3b51a4(0x111)](link,_0x4b647b[_0x3b51a4(0x10c)],_0x3a79c5['rRePJ'](basename,_0x4b647b['settingsPath'])));}!_0x425f64&&(console['log']('\x0a\x20\x20No\x20active\x20profile\x20set'),console['log']('\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20'+_0x46910b[_0x3b51a4(0x10f)](_0x4f95e9=>_0x4f95e9[_0x3b51a4(0x108)])['join'](',\x20')+')'));}console['log']('');}function _0x5a7c(){const _0x33aa9b=['\x0a---\x20OpenCode\x20Plugin\x20---','log','\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.','plugin','path','krUXN','Rnkwm','JmDwb','details','\x20(latest:\x20','\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a','\x20\x20Not\x20configured','name','isDirectory','MGzDP','137892gfljGp','settingsPath','not_installed','ZGBRv','map','DQlKC','rpxnl','(not\x20found)','vMCdg','\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>','\x20\x20Run:\x20ranger\x20setup\x20[token]','\x20(up\x20to\x20date)','QIUrl','\x0a---\x20Profiles\x20---','jVxqu','filter','ignore','project','12WUxZcz','2973360uvUoFH','match','17488840PoTUQg','ZmcRv','kbgnN','some','4033888njHtHw','push','Root:\x20','auth.json','fJEzq','error','VmgAo','2110696rWEteF','cwd','all','auth.json.enc','yxUIt','Organization:\x20','debug','308qLAzdO',':\x20configured','\x20\x20Run:\x20ranger\x20setup\x20--opencode','vhkFv','thTBn','47692ZcAqaE','XgCbw','\x20\x20Not\x20installed','unknown','9JaqTkr','success','length',':\x20installed\x20(','isArray','configured','stdout','organizationName','user','not_configured','pipe','parse','XAouv','trim','close','scope','displayName','No\x20skills\x20installed','934920doPDMy','@ranger-testing/opencode-plugin','Version:\x20','sPDWf','EzUUA','\x20\x20\x20\x20Auth:\x20','\x20\x20Project-level:','includes','sadhO','config'];_0x5a7c=function(){return _0x33aa9b;};return _0x5a7c();}
@@ -1 +1 @@
1
- (function(_0x3e0a76,_0x5df658){const _0x20bf6e=_0x32b9,_0x1ffdaa=_0x3e0a76();while(!![]){try{const _0x4f3025=parseInt(_0x20bf6e(0x164))/0x1+parseInt(_0x20bf6e(0x15f))/0x2+parseInt(_0x20bf6e(0x150))/0x3+-parseInt(_0x20bf6e(0x151))/0x4*(parseInt(_0x20bf6e(0x168))/0x5)+-parseInt(_0x20bf6e(0x152))/0x6*(parseInt(_0x20bf6e(0x14a))/0x7)+-parseInt(_0x20bf6e(0x14f))/0x8*(-parseInt(_0x20bf6e(0x167))/0x9)+-parseInt(_0x20bf6e(0x14d))/0xa;if(_0x4f3025===_0x5df658)break;else _0x1ffdaa['push'](_0x1ffdaa['shift']());}catch(_0x2db317){_0x1ffdaa['push'](_0x1ffdaa['shift']());}}}(_0x583b,0xb9d9d));import{spawn}from'child_process';import{existsSync}from'fs';import{readFile,writeFile}from'fs/promises';import{installSkill,removeSkill,RANGER_MANAGED_SKILLS,DEPRECATED_SKILLS}from'./utils/skills.js';import{PACKAGE_NAME,getCurrentVersion,getLatestVersion,compareVersions}from'./utils/version.js';import{getSkillsDir}from'./utils/claudeConfig.js';import{join}from'path';import{migrateActiveProfileFile}from'./utils/activeProfile.js';import{getRangerDir}from'./utils/rangerRoot.js';async function runInstall(){const _0x55849e=_0x32b9,_0x5c2844={'oaeZq':function(_0x5cef61,_0x341e27,_0xcff0b4,_0x308f87){return _0x5cef61(_0x341e27,_0xcff0b4,_0x308f87);},'IsFXZ':'install','cQucj':function(_0x2e1ab0,_0x47994b){return _0x2e1ab0===_0x47994b;},'OjJTs':_0x55849e(0x16d),'AqpGq':_0x55849e(0x175)};return new Promise(_0x6e8c4d=>{const _0x3d82dd=_0x55849e;console['log'](_0x3d82dd(0x163)+PACKAGE_NAME+_0x3d82dd(0x170));const _0x3c584e=_0x5c2844[_0x3d82dd(0x15a)](spawn,'npm',[_0x5c2844[_0x3d82dd(0x174)],'-g',PACKAGE_NAME+'@latest'],{'stdio':_0x3d82dd(0x17f),'shell':_0x5c2844['cQucj'](process['platform'],_0x5c2844['OjJTs'])});_0x3c584e['on'](_0x5c2844['AqpGq'],_0x1caaf4=>{_0x6e8c4d(_0x1caaf4===0x0);}),_0x3c584e['on'](_0x3d82dd(0x16a),()=>{_0x6e8c4d(![]);});});}async function updateClaudeMarketplace(){const _0x2d6707=_0x32b9,_0x381f2a={'IMrtY':function(_0x5bb499,_0x23ff40){return _0x5bb499(_0x23ff40);},'sJwgO':function(_0x5db5b4,_0x544be9){return _0x5db5b4(_0x544be9);},'bCPfB':'plugin','XumAv':_0x2d6707(0x155),'mKMLJ':_0x2d6707(0x16d),'aQESY':_0x2d6707(0x175),'OZqRd':_0x2d6707(0x16a)};return new Promise(_0x5ec15e=>{const _0x35e875=_0x2d6707,_0x30eadf=spawn('claude',[_0x381f2a[_0x35e875(0x184)],_0x381f2a[_0x35e875(0x172)],'update',_0x35e875(0x181)],{'stdio':'pipe','shell':process[_0x35e875(0x15b)]===_0x381f2a[_0x35e875(0x149)]});_0x30eadf['on'](_0x381f2a[_0x35e875(0x16c)],_0x4b2d5f=>{const _0x31b2d6=_0x35e875;_0x381f2a[_0x31b2d6(0x153)](_0x5ec15e,_0x4b2d5f===0x0);}),_0x30eadf['on'](_0x381f2a['OZqRd'],()=>{_0x381f2a['sJwgO'](_0x5ec15e,![]);});});}function _0x583b(){const _0x2a80c4=['Checking\x20for\x20updates...','fnHNX',')\x20is\x20newer\x20than\x20the\x20published\x20version\x20(','gEJvH','\x0aReinstalling\x20','update','inherit','\x0a✅\x20Update\x20complete!','trailhead','XlKSw','project','bCPfB','--scope','mKMLJ','14kLNlbD','findIndex','OLtgc','9973120YoBgzc','some','446024vvHqjj','3585174mVBpoS','522912vWdDPM','3886638pMghGA','IMrtY','\x20ranger-managed\x20skill(s)...','marketplace','user','active-profile.txt','DnlYC','\x0aClaude\x20marketplace\x20updated\x20(trailhead).','oaeZq','platform','active-feature.txt','splice','WoICn','2841384wQaGED','JqSxd','log','loCMJ','\x0aInstalling\x20','1074684rfNQPf','xhqpm','\x0aYour\x20version\x20(','45tMggXK','35puUSRJ','XKjQQ','error','AoXxg','aQESY','win32','Ncshl','length','@latest...\x0a','\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','XumAv','utf-8','IsFXZ','close','GtWzD','OqYkh','nDKcE'];_0x583b=function(){return _0x2a80c4;};return _0x583b();}async function updateClaudePlugin(_0x4a51b1){const _0x3f24d2=_0x32b9,_0x4b5e8e={'gEJvH':function(_0x550d82,_0x5772e4){return _0x550d82===_0x5772e4;},'oGSFb':'plugin','OLtgc':_0x3f24d2(0x17e),'GtWzD':'ranger@trailhead','xhqpm':_0x3f24d2(0x148),'SyXdK':function(_0x264584,_0x21b2e4,_0x4126b0,_0x4d1266){return _0x264584(_0x21b2e4,_0x4126b0,_0x4d1266);},'EXmLz':'claude','bZwnT':'pipe','RXXTy':function(_0x497c3b,_0x2acdcf){return _0x497c3b===_0x2acdcf;},'SBSGV':'close'};return new Promise(_0x166466=>{const _0x5e2892=_0x3f24d2,_0x223ecb={'StkFL':function(_0x59665f,_0xb62652){return _0x59665f(_0xb62652);},'WoICn':function(_0x1d63bc,_0x3a168d){const _0x257a5d=_0x32b9;return _0x4b5e8e[_0x257a5d(0x17c)](_0x1d63bc,_0x3a168d);}},_0xd18adb=[_0x4b5e8e['oGSFb'],_0x4b5e8e[_0x5e2892(0x14c)],_0x4b5e8e[_0x5e2892(0x176)]];_0x4a51b1&&_0xd18adb['push'](_0x4b5e8e[_0x5e2892(0x165)],_0x4a51b1);const _0x1f6919=_0x4b5e8e['SyXdK'](spawn,_0x4b5e8e['EXmLz'],_0xd18adb,{'stdio':_0x4b5e8e['bZwnT'],'shell':_0x4b5e8e['RXXTy'](process[_0x5e2892(0x15b)],_0x5e2892(0x16d))});_0x1f6919['on'](_0x4b5e8e['SBSGV'],_0x10d4b3=>{const _0x40f225=_0x5e2892;_0x223ecb['StkFL'](_0x166466,_0x223ecb[_0x40f225(0x15e)](_0x10d4b3,0x0));}),_0x1f6919['on']('error',()=>{_0x166466(![]);});});}function _0x32b9(_0x75c072,_0x581091){_0x75c072=_0x75c072-0x148;const _0x583b77=_0x583b();let _0x32b945=_0x583b77[_0x75c072];return _0x32b945;}function isSkillInstalled(_0x57d819,_0x181b1a){const _0x3689a4=_0x32b9,_0x5f25f4={'nPcLo':function(_0x3bd8ab,_0x39586f,_0x3ea416){return _0x3bd8ab(_0x39586f,_0x3ea416);},'XKjQQ':function(_0x24671c,_0x3c1bf7){return _0x24671c(_0x3c1bf7);}},_0x2e6045=_0x5f25f4['nPcLo'](join,_0x5f25f4[_0x3689a4(0x169)](getSkillsDir,_0x181b1a),_0x57d819);return existsSync(_0x2e6045);}async function reinstallSkills(_0x257e73){const _0x307406=_0x32b9,_0x5cf0f7={'QtIjO':_0x307406(0x156),'Ncshl':function(_0xe2eceb,_0x3bdd0d,_0x29278e){return _0xe2eceb(_0x3bdd0d,_0x29278e);},'FBCEA':function(_0x2144b7,_0x2d2076){return _0x2144b7===_0x2d2076;}},_0x534eff=['project',_0x5cf0f7['QtIjO']],_0x4dd82d=[];for(const _0x1a7d9a of _0x534eff){for(const _0x5cb75a of RANGER_MANAGED_SKILLS){isSkillInstalled(_0x5cb75a,_0x1a7d9a)&&_0x4dd82d['push']({'skillName':_0x5cb75a,'level':_0x1a7d9a});}}for(const _0x23c604 of _0x534eff){for(const _0xdfc2c7 of DEPRECATED_SKILLS){await _0x5cf0f7[_0x307406(0x16e)](removeSkill,_0xdfc2c7,_0x23c604);}}if(_0x5cf0f7['FBCEA'](_0x4dd82d['length'],0x0)){console[_0x307406(0x161)]('\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.');return;}console[_0x307406(0x161)](_0x307406(0x17d)+_0x4dd82d[_0x307406(0x16f)]+_0x307406(0x154));for(const {skillName:_0x886f2,level:_0x50f519}of _0x4dd82d){try{await installSkill(_0x886f2,{'level':_0x50f519,'cliVersion':_0x257e73});}catch(_0x3674f6){console['warn']('\x20\x20Failed\x20to\x20reinstall\x20'+_0x50f519+'\x20skill\x20'+_0x886f2+':',_0x3674f6);}}}async function ensureActiveProfileGitignored(){const _0x30a3d1=_0x32b9,_0x8b1f15={'DnlYC':function(_0x561567,_0x5a9de2,_0x59d02b){return _0x561567(_0x5a9de2,_0x59d02b);},'JqSxd':function(_0x140aac){return _0x140aac();},'loCMJ':'.gitignore','hFGFO':function(_0xaa2e22,_0x4ee0ad){return _0xaa2e22===_0x4ee0ad;}},_0x3325f0=_0x8b1f15[_0x30a3d1(0x158)](join,_0x8b1f15[_0x30a3d1(0x160)](getRangerDir),_0x8b1f15[_0x30a3d1(0x162)]);if(!existsSync(_0x3325f0))return![];let _0x4f89be='';try{_0x4f89be=await readFile(_0x3325f0,'utf-8');}catch{return![];}const _0x21e10b=_0x4f89be['split'](/\r?\n/);if(_0x21e10b[_0x30a3d1(0x14e)](_0x180e11=>_0x180e11['trim']()===_0x30a3d1(0x157)))return![];let _0x1a342d=_0x21e10b[_0x30a3d1(0x14b)](_0xf9be2d=>_0xf9be2d['trim']()===_0x30a3d1(0x15c));_0x8b1f15['hFGFO'](_0x1a342d,-0x1)&&(_0x1a342d=_0x21e10b['length']);_0x21e10b[_0x30a3d1(0x15d)](_0x1a342d,0x0,_0x30a3d1(0x157));let _0x4a01af=_0x21e10b['join']('\x0a');!_0x4a01af['endsWith']('\x0a')&&(_0x4a01af+='\x0a');try{await writeFile(_0x3325f0,_0x4a01af,_0x30a3d1(0x173));}catch{return![];}return!![];}export async function update(){const _0x2733af=_0x32b9,_0x522e7b={'sumxN':function(_0x5caf88){return _0x5caf88();},'NNjdz':'Failed\x20to\x20check\x20for\x20updates.\x20Please\x20check\x20your\x20network\x20connection.','XlKSw':function(_0x2cedbb,_0x42e2ea,_0xef20c1){return _0x2cedbb(_0x42e2ea,_0xef20c1);},'MtWHD':function(_0x1b9a74,_0x4c5def){return _0x1b9a74(_0x4c5def);},'nDKcE':function(_0x298bf3){return _0x298bf3();},'OqYkh':_0x2733af(0x171),'NErXO':function(_0x2a7292,_0x360192){return _0x2a7292(_0x360192);},'NABax':_0x2733af(0x183),'fnHNX':function(_0x497d26){return _0x497d26();},'AoXxg':_0x2733af(0x180)},_0x25fc7d=getCurrentVersion();console['log']('\x0aCurrent\x20version:\x20'+_0x25fc7d),console['log'](_0x2733af(0x179));const _0x12508d=_0x522e7b['sumxN'](getLatestVersion);if(!_0x12508d)throw new Error(_0x522e7b['NNjdz']);console[_0x2733af(0x161)]('Latest\x20version:\x20\x20'+_0x12508d);const _0x3f983c=_0x522e7b[_0x2733af(0x182)](compareVersions,_0x25fc7d,_0x12508d);let _0x1a812c=_0x25fc7d;if(_0x3f983c===0x0)console['log']('\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.');else{if(_0x3f983c<0x0)console[_0x2733af(0x161)](_0x2733af(0x166)+_0x25fc7d+_0x2733af(0x17b)+_0x12508d+').');else{const _0x18d906=await runInstall();if(_0x18d906)console['log']('\x0aSuccessfully\x20updated\x20to\x20version\x20'+_0x12508d),_0x1a812c=_0x12508d;else throw new Error('Update\x20failed.\x20You\x20may\x20need\x20to\x20run\x20with\x20sudo:\x20sudo\x20npm\x20install\x20-g\x20'+PACKAGE_NAME+'@latest');}}await _0x522e7b['MtWHD'](reinstallSkills,_0x1a812c);const _0x1bdd8d=await _0x522e7b['sumxN'](updateClaudeMarketplace);_0x1bdd8d&&console[_0x2733af(0x161)](_0x2733af(0x159));const _0x29a260=await _0x522e7b[_0x2733af(0x178)](updateClaudePlugin);_0x29a260&&console[_0x2733af(0x161)](_0x522e7b[_0x2733af(0x177)]);const _0xa18053=await _0x522e7b['NErXO'](updateClaudePlugin,_0x522e7b['NABax']);_0xa18053&&console['log']((_0x29a260?'':'\x0a')+'Claude\x20plugin\x20updated\x20(project\x20scope).');const _0x171302=await _0x522e7b[_0x2733af(0x17a)](migrateActiveProfileFile);_0x171302&&console['log']('✓\x20Migrated\x20active\x20profile\x20file');const _0x281e49=await ensureActiveProfileGitignored();console['log'](_0x522e7b[_0x2733af(0x16b)]);}
1
+ (function(_0x52ca44,_0x3cf5d5){const _0x452a3b=_0x1773,_0x21f676=_0x52ca44();while(!![]){try{const _0x5b44d6=-parseInt(_0x452a3b(0xc1))/0x1*(parseInt(_0x452a3b(0xec))/0x2)+parseInt(_0x452a3b(0xe7))/0x3+parseInt(_0x452a3b(0xb3))/0x4*(parseInt(_0x452a3b(0xd4))/0x5)+parseInt(_0x452a3b(0xb4))/0x6+-parseInt(_0x452a3b(0xc6))/0x7*(parseInt(_0x452a3b(0xca))/0x8)+parseInt(_0x452a3b(0xd0))/0x9+-parseInt(_0x452a3b(0xd7))/0xa;if(_0x5b44d6===_0x3cf5d5)break;else _0x21f676['push'](_0x21f676['shift']());}catch(_0x4726f4){_0x21f676['push'](_0x21f676['shift']());}}}(_0xba67,0x78f13));import{spawn}from'child_process';import{existsSync}from'fs';import{readFile,writeFile}from'fs/promises';import{installSkill,removeSkill,RANGER_MANAGED_SKILLS,DEPRECATED_SKILLS}from'./utils/skills.js';import{PACKAGE_NAME,getCurrentVersion,getLatestVersion,compareVersions}from'./utils/version.js';import{getSkillsDir}from'./utils/claudeConfig.js';import{getOpencodeSkillsDir}from'./utils/opencodeConfig.js';import{join}from'path';import{migrateActiveProfileFile}from'./utils/activeProfile.js';import{getRangerDir}from'./utils/rangerRoot.js';import{isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';async function runInstall(){const _0x5653e7=_0x1773,_0x7b25bc={'lFdwh':function(_0x54ce99,_0x2ff208){return _0x54ce99(_0x2ff208);},'PQoiZ':function(_0x1e844b,_0x3172ae){return _0x1e844b===_0x3172ae;},'GahgV':function(_0x3f646a,_0x162a1d,_0x342797,_0x195dac){return _0x3f646a(_0x162a1d,_0x342797,_0x195dac);},'BxrVb':_0x5653e7(0xe9),'AfbXJ':'inherit'};return new Promise(_0x1bd47e=>{const _0x4822cd=_0x5653e7;console['log']('\x0aInstalling\x20'+PACKAGE_NAME+'@latest...\x0a');const _0x183cc8=_0x7b25bc['GahgV'](spawn,'npm',[_0x7b25bc[_0x4822cd(0xc0)],'-g',PACKAGE_NAME+_0x4822cd(0xe0)],{'stdio':_0x7b25bc[_0x4822cd(0xcb)],'shell':process[_0x4822cd(0xb0)]===_0x4822cd(0xba)});_0x183cc8['on']('close',_0x2702a1=>{_0x7b25bc['lFdwh'](_0x1bd47e,_0x7b25bc['PQoiZ'](_0x2702a1,0x0));}),_0x183cc8['on']('error',()=>{_0x1bd47e(![]);});});}async function updateClaudeMarketplace(){const _0x11347b=_0x1773,_0x5a625b={'vMJBk':function(_0x4c43c1,_0x3ab966,_0x35b30c,_0x15db46){return _0x4c43c1(_0x3ab966,_0x35b30c,_0x15db46);},'jYwfF':_0x11347b(0xc5),'OhSlw':'plugin','ZxdDE':_0x11347b(0xbb),'UOHPs':'update','iMchv':'pipe','voSrO':_0x11347b(0xba),'iPFGe':_0x11347b(0xcc)};return new Promise(_0x2c168d=>{const _0x59bc19=_0x11347b,_0x5286d2=_0x5a625b['vMJBk'](spawn,_0x5a625b[_0x59bc19(0xdc)],[_0x5a625b[_0x59bc19(0xc3)],_0x5a625b[_0x59bc19(0xeb)],_0x5a625b[_0x59bc19(0xb2)],'trailhead'],{'stdio':_0x5a625b[_0x59bc19(0xd5)],'shell':process[_0x59bc19(0xb0)]===_0x5a625b['voSrO']});_0x5286d2['on']('close',_0xbb934d=>{_0x2c168d(_0xbb934d===0x0);}),_0x5286d2['on'](_0x5a625b['iPFGe'],()=>{_0x2c168d(![]);});});}async function updateClaudePlugin(_0x361117){const _0x10a82b=_0x1773,_0x368358={'KuLuL':function(_0x1fa256,_0x454f81){return _0x1fa256(_0x454f81);},'Dvhqv':_0x10a82b(0xad),'iFLmK':'update','wasOI':_0x10a82b(0xd3),'oBltO':'claude','KIPHZ':_0x10a82b(0xb9),'caeIC':_0x10a82b(0xba),'sChnq':'close','ImMFo':_0x10a82b(0xcc)};return new Promise(_0x55cef9=>{const _0x205891=_0x10a82b,_0x15e0e7=[_0x368358['Dvhqv'],_0x368358[_0x205891(0xbd)],_0x368358['wasOI']];_0x361117&&_0x15e0e7[_0x205891(0xd8)]('--scope',_0x361117);const _0x1cecd6=spawn(_0x368358['oBltO'],_0x15e0e7,{'stdio':_0x368358[_0x205891(0xe8)],'shell':process[_0x205891(0xb0)]===_0x368358[_0x205891(0xdd)]});_0x1cecd6['on'](_0x368358['sChnq'],_0x1b5255=>{_0x55cef9(_0x1b5255===0x0);}),_0x1cecd6['on'](_0x368358['ImMFo'],()=>{const _0x16c437=_0x205891;_0x368358[_0x16c437(0xe1)](_0x55cef9,![]);});});}function isSkillInstalled(_0x137e02,_0x270679,_0x4a4a53){const _0x468977=_0x1773,_0x5e2837={'aXgHn':function(_0x2ce18a,_0x6f77ee){return _0x2ce18a===_0x6f77ee;},'jkhzY':'opencode'},_0x383e5f=_0x5e2837['aXgHn'](_0x4a4a53,_0x5e2837[_0x468977(0xb8)])?getOpencodeSkillsDir(_0x270679):getSkillsDir(_0x270679),_0x5a5280=join(_0x383e5f,_0x137e02);return existsSync(_0x5a5280);}async function reinstallSkills(_0x5c16b5){const _0x2c6482=_0x1773,_0x3b249f={'gsUbB':'user','ZqiWK':function(_0x571508,_0x29104e,_0x51ec50,_0x126a5a){return _0x571508(_0x29104e,_0x51ec50,_0x126a5a);},'mcSvT':_0x2c6482(0xc5),'WCGgq':function(_0x1161e3,_0x28b90b,_0x518210,_0x1e9406){return _0x1161e3(_0x28b90b,_0x518210,_0x1e9406);},'RXcNJ':function(_0x274520,_0x162464,_0x573755){return _0x274520(_0x162464,_0x573755);},'eRqiS':_0x2c6482(0xcf),'ccswY':function(_0x40f6d8,_0x189f23,_0x9af0db){return _0x40f6d8(_0x189f23,_0x9af0db);}},_0x4de03c=['project',_0x3b249f[_0x2c6482(0xbf)]],_0x405f6c=[];for(const _0x1e0f06 of _0x4de03c){for(const _0x483089 of RANGER_MANAGED_SKILLS){_0x3b249f['ZqiWK'](isSkillInstalled,_0x483089,_0x1e0f06,_0x2c6482(0xc5))&&_0x405f6c['push']({'skillName':_0x483089,'level':_0x1e0f06,'platform':_0x3b249f['mcSvT']}),_0x3b249f[_0x2c6482(0xde)](isSkillInstalled,_0x483089,_0x1e0f06,_0x2c6482(0xbc))&&_0x405f6c[_0x2c6482(0xd8)]({'skillName':_0x483089,'level':_0x1e0f06,'platform':'opencode'});}}for(const _0x109526 of _0x4de03c){for(const _0x24e76a of DEPRECATED_SKILLS){await _0x3b249f['RXcNJ'](removeSkill,_0x24e76a,_0x109526);}}if(_0x405f6c[_0x2c6482(0xc9)]===0x0){console['log'](_0x3b249f[_0x2c6482(0xb7)]);return;}console['log']('\x0aReinstalling\x20'+_0x405f6c['length']+'\x20ranger-managed\x20skill(s)...');for(const {skillName:_0x284931,level:_0x4e4e59,platform:_0x5b653}of _0x405f6c){try{await _0x3b249f['ccswY'](installSkill,_0x284931,{'level':_0x4e4e59,'cliVersion':_0x5c16b5,'platform':_0x5b653});}catch(_0x4bd77f){console[_0x2c6482(0xc8)]('\x20\x20Failed\x20to\x20reinstall\x20'+_0x5b653+'\x20'+_0x4e4e59+_0x2c6482(0xc4)+_0x284931+':',_0x4bd77f);}}}function _0xba67(){const _0x56ab32=['Checking\x20for\x20updates...','plugin','active-feature.txt','tZXOD','platform','\x0aSuccessfully\x20updated\x20to\x20version\x20','UOHPs','4DArlzH','5944338hCyBAD','MpEfQ','Update\x20failed.\x20You\x20may\x20need\x20to\x20run\x20with\x20sudo:\x20sudo\x20npm\x20install\x20-g\x20','eRqiS','jkhzY','pipe','win32','marketplace','opencode','iFLmK','split','gsUbB','BxrVb','135pJycBy','\x0a✅\x20Update\x20complete!','OhSlw','\x20skill\x20','claude','3325959wXwjnh','some','warn','length','8hBGeIR','AfbXJ','error','\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.','active-profile.txt','\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.','6735906VGdnjt','qjPMN','Claude\x20plugin\x20updated\x20(project\x20scope).','ranger@trailhead','1571010PVMZQC','iMchv','project','20004590CJPOKA','push','EKeoU','\x0aYour\x20version\x20(','\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','jYwfF','caeIC','WCGgq','eQRWa','@latest','KuLuL','utf-8','log','✓\x20Migrated\x20active\x20profile\x20file',')\x20is\x20newer\x20than\x20the\x20published\x20version\x20(','uKLwS','2767833IlhfMB','KIPHZ','install','YXgmM','ZxdDE','74lFwwZS'];_0xba67=function(){return _0x56ab32;};return _0xba67();}function _0x1773(_0x2b8551,_0x139a31){_0x2b8551=_0x2b8551-0xac;const _0xba6733=_0xba67();let _0x1773b6=_0xba6733[_0x2b8551];return _0x1773b6;}async function ensureActiveProfileGitignored(){const _0x51690e=_0x1773,_0x4e6691={'uKLwS':function(_0x39f249,_0x1003e4,_0x3ee704){return _0x39f249(_0x1003e4,_0x3ee704);},'DkHlL':_0x51690e(0xe2),'MpEfQ':function(_0x35863a,_0x246c73){return _0x35863a===_0x246c73;}},_0x44b648=join(getRangerDir(),'.gitignore');if(!existsSync(_0x44b648))return![];let _0xed126d='';try{_0xed126d=await _0x4e6691[_0x51690e(0xe6)](readFile,_0x44b648,_0x4e6691['DkHlL']);}catch{return![];}const _0x245188=_0xed126d[_0x51690e(0xbe)](/\r?\n/);if(_0x245188[_0x51690e(0xc7)](_0x107941=>_0x107941['trim']()===_0x51690e(0xce)))return![];let _0x529db2=_0x245188['findIndex'](_0x1749c7=>_0x1749c7['trim']()===_0x51690e(0xae));_0x4e6691[_0x51690e(0xb5)](_0x529db2,-0x1)&&(_0x529db2=_0x245188['length']);_0x245188['splice'](_0x529db2,0x0,_0x51690e(0xce));let _0xe0fc9a=_0x245188['join']('\x0a');!_0xe0fc9a['endsWith']('\x0a')&&(_0xe0fc9a+='\x0a');try{await writeFile(_0x44b648,_0xe0fc9a,'utf-8');}catch{return![];}return!![];}export async function update(){const _0x4cbab9=_0x1773,_0x5e324b={'eQRWa':function(_0x191edc){return _0x191edc();},'EKeoU':_0x4cbab9(0xac),'Ojpfz':function(_0x46dfe5,_0x3e8fa5,_0x1ce6e0){return _0x46dfe5(_0x3e8fa5,_0x1ce6e0);},'sArog':_0x4cbab9(0xcd),'qjPMN':function(_0x1efd3a){return _0x1efd3a();},'YXgmM':function(_0x3b25aa,_0x5882da){return _0x3b25aa(_0x5882da);},'rdtqd':_0x4cbab9(0xdb),'wzXYF':function(_0x2c813a,_0x4e5d1c){return _0x2c813a(_0x4e5d1c);},'tZXOD':_0x4cbab9(0xe4)},_0x307451=_0x5e324b['eQRWa'](getCurrentVersion);console['log']('\x0aCurrent\x20version:\x20'+_0x307451),console['log'](_0x5e324b[_0x4cbab9(0xd9)]);const _0x3a67f7=_0x5e324b[_0x4cbab9(0xdf)](getLatestVersion);if(!_0x3a67f7)throw new Error('Failed\x20to\x20check\x20for\x20updates.\x20Please\x20check\x20your\x20network\x20connection.');console[_0x4cbab9(0xe3)]('Latest\x20version:\x20\x20'+_0x3a67f7);const _0x2bd014=_0x5e324b['Ojpfz'](compareVersions,_0x307451,_0x3a67f7);let _0x74fa3b=_0x307451;if(_0x2bd014===0x0)console['log'](_0x5e324b['sArog']);else{if(_0x2bd014<0x0)console[_0x4cbab9(0xe3)](_0x4cbab9(0xda)+_0x307451+_0x4cbab9(0xe5)+_0x3a67f7+').');else{const _0x3f987b=await _0x5e324b[_0x4cbab9(0xd1)](runInstall);if(_0x3f987b)console['log'](_0x4cbab9(0xb1)+_0x3a67f7),_0x74fa3b=_0x3a67f7;else throw new Error(_0x4cbab9(0xb6)+PACKAGE_NAME+'@latest');}}await reinstallSkills(_0x74fa3b);const _0x143bea=await isMarketplaceAdded('trailhead'),_0x9c61ca=await _0x5e324b[_0x4cbab9(0xea)](isPluginInstalled,'ranger@trailhead');if(_0x143bea){const _0x2403f5=await updateClaudeMarketplace();_0x2403f5&&console['log']('\x0aClaude\x20marketplace\x20updated\x20(trailhead).');}if(_0x9c61ca){const _0x7a894b=await updateClaudePlugin();_0x7a894b&&console['log'](_0x5e324b['rdtqd']);const _0x1c5330=await _0x5e324b['wzXYF'](updateClaudePlugin,_0x4cbab9(0xd6));_0x1c5330&&console['log']((_0x7a894b?'':'\x0a')+_0x4cbab9(0xd2));}const _0x568377=await migrateActiveProfileFile();_0x568377&&console['log'](_0x5e324b[_0x4cbab9(0xaf)]);const _0xfb3b89=await ensureActiveProfileGitignored();console[_0x4cbab9(0xe3)](_0x4cbab9(0xc2));}
@@ -1 +1 @@
1
- (function(_0x40b080,_0x807dbd){const _0x19bbe4=_0x29f6,_0x7e8523=_0x40b080();while(!![]){try{const _0xbadba=-parseInt(_0x19bbe4(0x203))/0x1*(-parseInt(_0x19bbe4(0x1ec))/0x2)+parseInt(_0x19bbe4(0x1dd))/0x3*(-parseInt(_0x19bbe4(0x200))/0x4)+-parseInt(_0x19bbe4(0x1ea))/0x5*(-parseInt(_0x19bbe4(0x1fa))/0x6)+-parseInt(_0x19bbe4(0x1f4))/0x7+-parseInt(_0x19bbe4(0x1f6))/0x8+parseInt(_0x19bbe4(0x206))/0x9+parseInt(_0x19bbe4(0x1f3))/0xa*(-parseInt(_0x19bbe4(0x1e1))/0xb);if(_0xbadba===_0x807dbd)break;else _0x7e8523['push'](_0x7e8523['shift']());}catch(_0xf0e489){_0x7e8523['push'](_0x7e8523['shift']());}}}(_0x3400,0xae811));function _0x29f6(_0x24d92f,_0x10d2db){_0x24d92f=_0x24d92f-0x1dd;const _0x3400e4=_0x3400();let _0x29f67f=_0x3400e4[_0x24d92f];return _0x29f67f;}import{writeFile,readFile,unlink}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{chromium}from'playwright';import{encrypt}from'./utils/crypto.js';import{getToken}from'./utils/keychain.js';import{getEnvDir,isEnvCi}from'./utils/settings.js';import{addProfileSetupBanner}from'./utils/profileSetupBanner.js';function _0x3400(){const _0x100132=['4RobKqZ','utf-8','storageState','11rCUoNe','trackPhaseEnd','.\x20Run\x20first:\x20ranger\x20profile\x20add\x20','11109321HSGmHB','120573rcpTmJ','catch','HeBdK','jMAWQ','33IBETyh','anoLS','oJhDj','\x20\x20You\x20can\x20safely\x20commit\x20this\x20file\x20to\x20git.','close','\x0a✅\x20Profile\x20\x22','.enc','✓\x20Auth\x20state\x20saved\x20to:\x20','browser_auth','5ZiPcad','stdout','113676eRYRow','browser','log','\x20\x20\x20When\x20you\x20are\x20done,\x20close\x20the\x20browser.\x0a','error','\x22\x20authentication\x20updated','UFHBX','4568990tdYYAO','1613948MMPOLt','jduqW','32040CmPYUW','goto','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','config_write','3003834DZiUcA','fvykU','trackPhaseStart','newPage','newContext','atwLs'];_0x3400=function(){return _0x100132;};return _0x3400();}export async function updateEnv(_0x3acfd7,_0x307ea6){const _0x2431e5=_0x29f6,_0x2835ae={'Svbog':function(_0x20d323){return _0x20d323();},'UFHBX':function(_0x2040cf){return _0x2040cf();},'anoLS':function(_0x1ce703,_0x36fd7c,_0x5ddea8){return _0x1ce703(_0x36fd7c,_0x5ddea8);},'HeBdK':'auth.json','IVmca':function(_0x481e39,_0x355c88){return _0x481e39+_0x355c88;},'lJipA':function(_0xc859d0,_0x2369d6){return _0xc859d0(_0x2369d6);},'hQSEj':function(_0x44347d,_0x1f760b){return _0x44347d===_0x1f760b;},'ZqBXK':'\x0a📋\x20Authentication\x20Update','atwLs':_0x2431e5(0x1ef),'jMAWQ':function(_0x54e929,_0x4331a5){return _0x54e929||_0x4331a5;},'fvykU':'about:blank','oJhDj':'\x20\x20Could\x20not\x20encrypt:\x20No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','hjoai':_0x2431e5(0x1e4),'jduqW':'config_write','ZQVri':function(_0x5a1bb2,_0x321384,_0x6c7f2){return _0x5a1bb2(_0x321384,_0x6c7f2);}},_0xdefd7d=getEnvDir(_0x3acfd7),_0x22fd20=join(_0xdefd7d,'settings.json'),_0x1a83ac=_0x2835ae['anoLS'](join,_0xdefd7d,_0x2835ae[_0x2431e5(0x1df)]),_0x52d248=_0x2835ae['IVmca'](_0x1a83ac,_0x2431e5(0x1e7)),_0x2f52cc=process['stdin']['isTTY']&&process[_0x2431e5(0x1eb)]['isTTY'];if(!_0x2f52cc)throw new Error(_0x2431e5(0x1f8));if(!existsSync(_0xdefd7d))throw new Error('Profile\x20\x22'+_0x3acfd7+'\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x3acfd7);if(!_0x2835ae['lJipA'](existsSync,_0x22fd20))throw new Error('Config\x20not\x20found\x20at\x20'+_0x22fd20+_0x2431e5(0x205)+_0x3acfd7);const _0x5a7da8=await readFile(_0x22fd20,_0x2431e5(0x201)),_0x3596d0=JSON['parse'](_0x5a7da8),_0x2241d2=_0x2835ae['hQSEj'](typeof _0x3596d0['baseUrl'],'string')?_0x3596d0['baseUrl']:undefined,_0xdc588f=existsSync(_0x1a83ac),_0x4f9b1b=isEnvCi(_0x3acfd7);_0x307ea6?.[_0x2431e5(0x1fc)](_0x2431e5(0x1e9)),console[_0x2431e5(0x1ee)](_0x2835ae['ZqBXK']),console['log']('\x20\x20\x20A\x20browser\x20will\x20open\x20with\x20your\x20existing\x20session\x20(if\x20any).'),console['log']('\x20\x20\x20Update\x20your\x20authentication\x20as\x20needed.'),console[_0x2431e5(0x1ee)](_0x2835ae[_0x2431e5(0x1ff)]);const _0x1267a6=await chromium['launch']({'headless':![]}),_0x1f6fcb=_0xdc588f?{'storageState':_0x1a83ac}:{};let _0x331d2c=null;try{_0x331d2c=await _0x1267a6[_0x2431e5(0x1fe)](_0x1f6fcb),await addProfileSetupBanner(_0x331d2c);const _0x16060a=await _0x331d2c[_0x2431e5(0x1fd)]();await _0x16060a[_0x2431e5(0x1f7)](_0x2835ae[_0x2431e5(0x1e0)](_0x2241d2,_0x2835ae[_0x2431e5(0x1fb)])),await new Promise(_0x1739cb=>{const _0x8c42c=_0x2431e5,_0x5d15af={'PnkNf':function(_0x4bd1c1){return _0x2835ae['Svbog'](_0x4bd1c1);},'PFJOp':function(_0x4b769e){const _0x2bf452=_0x29f6;return _0x2835ae[_0x2bf452(0x1f2)](_0x4b769e);}};_0x16060a['on'](_0x8c42c(0x1e5),async()=>{const _0x481322=_0x8c42c;try{console['log']('Saving\x20authentication\x20state...'),await _0x331d2c?.[_0x481322(0x202)]({'path':_0x1a83ac}),_0x5d15af['PnkNf'](_0x1739cb);}catch{_0x5d15af['PFJOp'](_0x1739cb);}});});}finally{_0x331d2c&&await _0x331d2c['close']()['catch'](()=>{}),await _0x1267a6['close']()[_0x2431e5(0x1de)](()=>{});}if(_0x4f9b1b){const _0x1e7187=await readFile(_0x1a83ac,'utf-8'),_0x4fe96f=await getToken();if(!_0x4fe96f)console[_0x2431e5(0x1f0)](_0x2835ae[_0x2431e5(0x1e3)]),console[_0x2431e5(0x1ee)]('✓\x20Auth\x20state\x20saved\x20to:\x20'+_0x1a83ac);else{const _0x58bbfe=_0x2835ae[_0x2431e5(0x1e2)](encrypt,_0x1e7187,_0x4fe96f);await writeFile(_0x52d248,_0x58bbfe),await _0x2835ae['lJipA'](unlink,_0x1a83ac),console['log']('✓\x20Encrypted\x20auth\x20saved\x20to:\x20'+_0x52d248),console['log'](_0x2835ae['hjoai']),console[_0x2431e5(0x1ee)]('\x20\x20Run\x20ranger\x20setup\x20in\x20CI\x20to\x20decrypt\x20at\x20runtime.');}}else console['log'](_0x2431e5(0x1e8)+_0x1a83ac);_0x307ea6?.['trackPhaseEnd']('browser_auth'),_0x307ea6?.[_0x2431e5(0x1fc)](_0x2835ae[_0x2431e5(0x1f5)]),_0x3596d0['browser']=_0x3596d0[_0x2431e5(0x1ed)]||{},_0x3596d0['browser']['contextOptions']=_0x3596d0[_0x2431e5(0x1ed)]['contextOptions']||{},_0x3596d0['browser']['contextOptions']['storageState']=_0x1a83ac,await _0x2835ae['ZQVri'](writeFile,_0x22fd20,JSON['stringify'](_0x3596d0,null,0x2)),console['log']('✓\x20Updated\x20config:\x20'+_0x22fd20),_0x307ea6?.[_0x2431e5(0x204)](_0x2431e5(0x1f9)),console['log'](_0x2431e5(0x1e6)+_0x3acfd7+_0x2431e5(0x1f1));}
1
+ (function(_0x89dbe5,_0x2b4902){const _0x3f752b=_0x3ef6,_0x70a361=_0x89dbe5();while(!![]){try{const _0xc3bb3a=parseInt(_0x3f752b(0x1b0))/0x1+-parseInt(_0x3f752b(0x1a7))/0x2+parseInt(_0x3f752b(0x1b2))/0x3+-parseInt(_0x3f752b(0x199))/0x4*(-parseInt(_0x3f752b(0x198))/0x5)+-parseInt(_0x3f752b(0x1bd))/0x6*(parseInt(_0x3f752b(0x19d))/0x7)+-parseInt(_0x3f752b(0x191))/0x8+parseInt(_0x3f752b(0x1b7))/0x9;if(_0xc3bb3a===_0x2b4902)break;else _0x70a361['push'](_0x70a361['shift']());}catch(_0x205c5f){_0x70a361['push'](_0x70a361['shift']());}}}(_0x45dd,0xa8e6c));import{writeFile,readFile,unlink}from'fs/promises';import{join}from'path';import{existsSync}from'fs';function _0x45dd(){const _0x3f1037=['browser_auth','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','stdout','.enc','close','WBVyD','\x0a✅\x20Profile\x20\x22','tzrlK','kODlN','744008sXjzPY','kIJsn','stdin','hRIzZ','Config\x20not\x20found\x20at\x20','browser','Profile\x20\x22','SvcNl','✓\x20Auth\x20state\x20saved\x20to:\x20','743822kGeRga','VCroY','3070065BXFxjw','\x20\x20\x20Update\x20your\x20authentication\x20as\x20needed.','utf-8','trackPhaseStart','hacVC','16246152hfUcYS','lbpag','isTTY','\x20\x20You\x20can\x20safely\x20commit\x20this\x20file\x20to\x20git.','OisFR','faCvf','6ASIpKf','log','\x22\x20authentication\x20updated','FMWBf','goto','faKSw','Saving\x20authentication\x20state...','10400736SJUApY','JOabE','launch','.\x20Run\x20first:\x20ranger\x20profile\x20add\x20','contextOptions','string','\x20\x20\x20When\x20you\x20are\x20done,\x20close\x20the\x20browser.\x0a','15mcUKaK','32nXNCnV','ygXLC','error','\x20\x20Run\x20ranger\x20setup\x20in\x20CI\x20to\x20decrypt\x20at\x20runtime.','8458891DIWmwI'];_0x45dd=function(){return _0x3f1037;};return _0x45dd();}import{chromium}from'playwright';function _0x3ef6(_0x294b7d,_0x48bb72){_0x294b7d=_0x294b7d-0x18f;const _0x45dd0f=_0x45dd();let _0x3ef6da=_0x45dd0f[_0x294b7d];return _0x3ef6da;}import{encrypt}from'./utils/crypto.js';import{getToken}from'./utils/keychain.js';import{getEnvDir,isEnvCi}from'./utils/settings.js';import{addProfileSetupBanner}from'./utils/profileSetupBanner.js';export async function updateEnv(_0x3e6a1c,_0x3c9b21){const _0x51c5b5=_0x3ef6,_0x2e1b3d={'FMWBf':_0x51c5b5(0x1a2),'ygXLC':function(_0x49cb5c,_0x53c19a){return _0x49cb5c(_0x53c19a);},'tzrlK':'settings.json','faCvf':function(_0x1e2efc,_0x1a71c0,_0x3bb9b7){return _0x1e2efc(_0x1a71c0,_0x3bb9b7);},'hacVC':'auth.json','fLhGJ':function(_0x544bbf,_0x142042){return _0x544bbf+_0x142042;},'kIJsn':_0x51c5b5(0x1a1),'hRIzZ':function(_0x2d344c,_0x4ff59d){return _0x2d344c(_0x4ff59d);},'mjMUb':_0x51c5b5(0x1b4),'SvcNl':_0x51c5b5(0x196),'kODlN':function(_0x308bef,_0x469ade){return _0x308bef(_0x469ade);},'KAHrQ':_0x51c5b5(0x19e),'JOabE':'\x0a📋\x20Authentication\x20Update','OisFR':'\x20\x20\x20A\x20browser\x20will\x20open\x20with\x20your\x20existing\x20session\x20(if\x20any).','jBDlW':_0x51c5b5(0x1b3),'WBVyD':function(_0x4e9ee5,_0x2ab33f){return _0x4e9ee5(_0x2ab33f);},'bvaJn':function(_0x3d6ac1){return _0x3d6ac1();},'fzmgK':'\x20\x20Could\x20not\x20encrypt:\x20No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','ReFeE':_0x51c5b5(0x1ba),'VCroY':'config_write'},_0x2d32b9=_0x2e1b3d[_0x51c5b5(0x19a)](getEnvDir,_0x3e6a1c),_0x103672=join(_0x2d32b9,_0x2e1b3d[_0x51c5b5(0x1a5)]),_0x4004b2=_0x2e1b3d[_0x51c5b5(0x1bc)](join,_0x2d32b9,_0x2e1b3d[_0x51c5b5(0x1b6)]),_0x176a20=_0x2e1b3d['fLhGJ'](_0x4004b2,_0x2e1b3d[_0x51c5b5(0x1a8)]),_0x4966ff=process[_0x51c5b5(0x1a9)]['isTTY']&&process[_0x51c5b5(0x1a0)][_0x51c5b5(0x1b9)];if(!_0x4966ff)throw new Error(_0x51c5b5(0x19f));if(!existsSync(_0x2d32b9))throw new Error(_0x51c5b5(0x1ad)+_0x3e6a1c+'\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x3e6a1c);if(!_0x2e1b3d[_0x51c5b5(0x1aa)](existsSync,_0x103672))throw new Error(_0x51c5b5(0x1ab)+_0x103672+_0x51c5b5(0x194)+_0x3e6a1c);const _0x4ca18f=await readFile(_0x103672,_0x2e1b3d['mjMUb']),_0x48232e=JSON['parse'](_0x4ca18f),_0x82218a=typeof _0x48232e['baseUrl']===_0x2e1b3d[_0x51c5b5(0x1ae)]?_0x48232e['baseUrl']:undefined,_0x136806=_0x2e1b3d[_0x51c5b5(0x1a6)](existsSync,_0x4004b2),_0x1ea808=_0x2e1b3d['kODlN'](isEnvCi,_0x3e6a1c);_0x3c9b21?.[_0x51c5b5(0x1b5)](_0x2e1b3d['KAHrQ']),console[_0x51c5b5(0x1be)](_0x2e1b3d[_0x51c5b5(0x192)]),console[_0x51c5b5(0x1be)](_0x2e1b3d[_0x51c5b5(0x1bb)]),console[_0x51c5b5(0x1be)](_0x2e1b3d['jBDlW']),console[_0x51c5b5(0x1be)](_0x51c5b5(0x197));const _0x421815=await chromium[_0x51c5b5(0x193)]({'headless':![]}),_0xe96227=_0x136806?{'storageState':_0x4004b2}:{};let _0x254d19=null;try{_0x254d19=await _0x421815['newContext'](_0xe96227),await _0x2e1b3d['WBVyD'](addProfileSetupBanner,_0x254d19);const _0x2447bb=await _0x254d19['newPage']();await _0x2447bb[_0x51c5b5(0x1c1)](_0x82218a||'about:blank'),await new Promise(_0x536191=>{const _0x21a356=_0x51c5b5,_0xc269ed={'faKSw':_0x21a356(0x190),'lbpag':function(_0x119e6a){return _0x119e6a();}};_0x2447bb['on'](_0x2e1b3d[_0x21a356(0x1c0)],async()=>{const _0x32632a=_0x21a356;try{console['log'](_0xc269ed[_0x32632a(0x18f)]),await _0x254d19?.['storageState']({'path':_0x4004b2}),_0xc269ed[_0x32632a(0x1b8)](_0x536191);}catch{_0xc269ed[_0x32632a(0x1b8)](_0x536191);}});});}finally{_0x254d19&&await _0x254d19[_0x51c5b5(0x1a2)]()['catch'](()=>{}),await _0x421815[_0x51c5b5(0x1a2)]()['catch'](()=>{});}if(_0x1ea808){const _0xcec198=await readFile(_0x4004b2,_0x2e1b3d['mjMUb']),_0x4ff7bd=await _0x2e1b3d['bvaJn'](getToken);if(!_0x4ff7bd)console[_0x51c5b5(0x19b)](_0x2e1b3d['fzmgK']),console['log'](_0x51c5b5(0x1af)+_0x4004b2);else{const _0x482289=_0x2e1b3d['faCvf'](encrypt,_0xcec198,_0x4ff7bd);await writeFile(_0x176a20,_0x482289),await _0x2e1b3d[_0x51c5b5(0x1a3)](unlink,_0x4004b2),console[_0x51c5b5(0x1be)]('✓\x20Encrypted\x20auth\x20saved\x20to:\x20'+_0x176a20),console[_0x51c5b5(0x1be)](_0x2e1b3d['ReFeE']),console['log'](_0x51c5b5(0x19c));}}else console[_0x51c5b5(0x1be)]('✓\x20Auth\x20state\x20saved\x20to:\x20'+_0x4004b2);_0x3c9b21?.['trackPhaseEnd'](_0x51c5b5(0x19e)),_0x3c9b21?.['trackPhaseStart'](_0x2e1b3d[_0x51c5b5(0x1b1)]),_0x48232e['browser']=_0x48232e['browser']||{},_0x48232e[_0x51c5b5(0x1ac)][_0x51c5b5(0x195)]=_0x48232e['browser']['contextOptions']||{},_0x48232e[_0x51c5b5(0x1ac)][_0x51c5b5(0x195)]['storageState']=_0x4004b2,await writeFile(_0x103672,JSON['stringify'](_0x48232e,null,0x2)),console['log']('✓\x20Updated\x20config:\x20'+_0x103672),_0x3c9b21?.['trackPhaseEnd'](_0x2e1b3d['VCroY']),console[_0x51c5b5(0x1be)](_0x51c5b5(0x1a4)+_0x3e6a1c+_0x51c5b5(0x1bf));}
@@ -1 +1 @@
1
- (function(_0x3e5ad9,_0x339186){const _0x4bfe32=_0x4148,_0x4af59c=_0x3e5ad9();while(!![]){try{const _0x582879=-parseInt(_0x4bfe32(0x104))/0x1+parseInt(_0x4bfe32(0x106))/0x2*(parseInt(_0x4bfe32(0x111))/0x3)+-parseInt(_0x4bfe32(0x10a))/0x4*(-parseInt(_0x4bfe32(0x10f))/0x5)+-parseInt(_0x4bfe32(0x112))/0x6+-parseInt(_0x4bfe32(0x10d))/0x7+parseInt(_0x4bfe32(0x105))/0x8*(-parseInt(_0x4bfe32(0x109))/0x9)+-parseInt(_0x4bfe32(0x10b))/0xa*(-parseInt(_0x4bfe32(0x113))/0xb);if(_0x582879===_0x339186)break;else _0x4af59c['push'](_0x4af59c['shift']());}catch(_0x24c04e){_0x4af59c['push'](_0x4af59c['shift']());}}}(_0x4b72,0x7924c));import{join}from'path';import{existsSync}from'fs';function _0x4b72(){const _0x487e79=['settings.json','Profile\x20\x22','27GyiibB','8biSkxi','150710hxatcB','\x0a✓\x20Now\x20using\x20profile\x20\x22','6075433MTdGOP','.\x20Run\x20first:\x20ranger\x20profile\x20add\x20','1422895pELUDX','GTRPE','960aTiuzs','4446660JPHzxR','1727IsfxZa','899941qQLIIN','1601416dHzGBR','4190dfHDUI'];_0x4b72=function(){return _0x487e79;};return _0x4b72();}import{getEnvDir}from'./utils/settings.js';function _0x4148(_0x1b0c4f,_0x4b0643){_0x1b0c4f=_0x1b0c4f-0x104;const _0x4b72af=_0x4b72();let _0x414825=_0x4b72af[_0x1b0c4f];return _0x414825;}import{writeActiveProfileName}from'./utils/activeProfile.js';export async function useEnv(_0x240d15){const _0x46d06a=_0x4148,_0x5979dd={'HhSOr':function(_0xd511a0,_0x3b66bc){return _0xd511a0(_0x3b66bc);},'xXxuC':function(_0x42a98,_0x3069df,_0xbf5f4e){return _0x42a98(_0x3069df,_0xbf5f4e);},'GTRPE':_0x46d06a(0x107)},_0x465362=_0x5979dd['HhSOr'](getEnvDir,_0x240d15),_0xd25e9=_0x5979dd['xXxuC'](join,_0x465362,_0x5979dd[_0x46d06a(0x110)]);if(!existsSync(_0x465362))throw new Error(_0x46d06a(0x108)+_0x240d15+'\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x240d15);if(!existsSync(_0xd25e9))throw new Error('Config\x20not\x20found\x20at\x20'+_0xd25e9+_0x46d06a(0x10e)+_0x240d15);await writeActiveProfileName(_0x240d15),console['log'](_0x46d06a(0x10c)+_0x240d15+'\x22');}
1
+ (function(_0x17e663,_0x50bf41){const _0x4f4842=_0x9419,_0x19cc9f=_0x17e663();while(!![]){try{const _0x33d1fa=parseInt(_0x4f4842(0x1be))/0x1+-parseInt(_0x4f4842(0x1bc))/0x2*(parseInt(_0x4f4842(0x1c3))/0x3)+-parseInt(_0x4f4842(0x1c2))/0x4+parseInt(_0x4f4842(0x1bf))/0x5*(-parseInt(_0x4f4842(0x1bb))/0x6)+parseInt(_0x4f4842(0x1b9))/0x7+-parseInt(_0x4f4842(0x1c5))/0x8+parseInt(_0x4f4842(0x1c6))/0x9*(parseInt(_0x4f4842(0x1c4))/0xa);if(_0x33d1fa===_0x50bf41)break;else _0x19cc9f['push'](_0x19cc9f['shift']());}catch(_0x2b3584){_0x19cc9f['push'](_0x19cc9f['shift']());}}}(_0x3642,0x42701));import{join}from'path';import{existsSync}from'fs';function _0x9419(_0x418e8d,_0x5b3adb){_0x418e8d=_0x418e8d-0x1b8;const _0x36423c=_0x3642();let _0x9419a9=_0x36423c[_0x418e8d];return _0x9419a9;}import{getEnvDir}from'./utils/settings.js';function _0x3642(){const _0x4a9c3c=['3549288HEztEc','7587NfDIYO','settings.json','1504118YaJKNz','vkyLe','18918yPeNFp','66Iieyqs','Profile\x20\x22','455884LKcwgI','95LujeQy','UgeMf','\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20','1308184SceoeY','15447NVIPTh','7140SqYVzv'];_0x3642=function(){return _0x4a9c3c;};return _0x3642();}import{writeActiveProfileName}from'./utils/activeProfile.js';export async function useEnv(_0x3ea8f0){const _0x1c9cd6=_0x9419,_0x264b21={'UgeMf':function(_0x387542,_0x2406f0){return _0x387542(_0x2406f0);},'vkyLe':function(_0x45783d,_0x5b14c8,_0x4472d8){return _0x45783d(_0x5b14c8,_0x4472d8);},'vyody':_0x1c9cd6(0x1b8),'mZvRr':function(_0x53b989,_0x36adac){return _0x53b989(_0x36adac);}},_0x446b29=_0x264b21['UgeMf'](getEnvDir,_0x3ea8f0),_0xf26941=_0x264b21[_0x1c9cd6(0x1ba)](join,_0x446b29,_0x264b21['vyody']);if(!_0x264b21['UgeMf'](existsSync,_0x446b29))throw new Error(_0x1c9cd6(0x1bd)+_0x3ea8f0+_0x1c9cd6(0x1c1)+_0x3ea8f0);if(!_0x264b21['mZvRr'](existsSync,_0xf26941))throw new Error('Config\x20not\x20found\x20at\x20'+_0xf26941+'.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x3ea8f0);await _0x264b21[_0x1c9cd6(0x1c0)](writeActiveProfileName,_0x3ea8f0),console['log']('\x0a✓\x20Now\x20using\x20profile\x20\x22'+_0x3ea8f0+'\x22');}
@@ -1 +1 @@
1
- (function(_0x148d67,_0x10ee8e){const _0x2c49f8=_0x40c9,_0x51617c=_0x148d67();while(!![]){try{const _0x734e6c=-parseInt(_0x2c49f8(0x139))/0x1+-parseInt(_0x2c49f8(0x143))/0x2*(-parseInt(_0x2c49f8(0x14a))/0x3)+parseInt(_0x2c49f8(0x14b))/0x4*(parseInt(_0x2c49f8(0x14d))/0x5)+-parseInt(_0x2c49f8(0x146))/0x6+parseInt(_0x2c49f8(0x13d))/0x7*(parseInt(_0x2c49f8(0x13f))/0x8)+parseInt(_0x2c49f8(0x148))/0x9*(parseInt(_0x2c49f8(0x145))/0xa)+-parseInt(_0x2c49f8(0x13a))/0xb;if(_0x734e6c===_0x10ee8e)break;else _0x51617c['push'](_0x51617c['shift']());}catch(_0x168e74){_0x51617c['push'](_0x51617c['shift']());}}}(_0x53e0,0x34037));import{existsSync}from'fs';import{mkdir,readFile,rename,unlink,writeFile}from'fs/promises';import{join}from'path';import{getRangerDir}from'./rangerRoot.js';const ACTIVE_PROFILE_FILE='active-profile.txt',LEGACY_ACTIVE_ENV_FILE='active-env.txt';function getActiveProfilePath(){const _0x115c0e=_0x40c9,_0x1e40ae={'VHMHN':function(_0x576038,_0x12872c,_0x18b2fa){return _0x576038(_0x12872c,_0x18b2fa);},'JCWPj':function(_0x4c5251){return _0x4c5251();}};return _0x1e40ae[_0x115c0e(0x14c)](join,_0x1e40ae['JCWPj'](getRangerDir),ACTIVE_PROFILE_FILE);}function getLegacyActiveEnvPath(){const _0x5e2e09={'Gpbrx':function(_0x1e28a3,_0x2548e9,_0xa06781){return _0x1e28a3(_0x2548e9,_0xa06781);},'lZxJK':function(_0x208822){return _0x208822();}};return _0x5e2e09['Gpbrx'](join,_0x5e2e09['lZxJK'](getRangerDir),LEGACY_ACTIVE_ENV_FILE);}async function migrateLegacyActiveEnv(){const _0xff4edb=_0x40c9,_0x135c59={'mHcgR':function(_0x5e549c,_0x570191){return _0x5e549c(_0x570191);},'IYHKd':function(_0x32dd18,_0x170aa5,_0x25c0ee){return _0x32dd18(_0x170aa5,_0x25c0ee);},'djxCi':function(_0x4018ce){return _0x4018ce();},'rqQUS':function(_0x4a25a5,_0x249348,_0x5c5689){return _0x4a25a5(_0x249348,_0x5c5689);},'xlPcO':function(_0x2926f2,_0x5b3244,_0x1a42b0,_0x43feaa){return _0x2926f2(_0x5b3244,_0x1a42b0,_0x43feaa);},'VDbjb':function(_0x5b7dd1,_0x368a65){return _0x5b7dd1(_0x368a65);}},_0x183ff7=getLegacyActiveEnvPath();if(!_0x135c59[_0xff4edb(0x149)](existsSync,_0x183ff7))return null;let _0x3096a=null;try{_0x3096a=(await readFile(_0x183ff7,'utf-8'))[_0xff4edb(0x147)]()||null;}catch{_0x3096a=null;}if(!_0x3096a)return null;const _0x26ef4b=getActiveProfilePath();try{await _0x135c59[_0xff4edb(0x141)](rename,_0x183ff7,_0x26ef4b);}catch{try{const _0x443662=_0x135c59[_0xff4edb(0x13b)](getRangerDir);await _0x135c59['rqQUS'](mkdir,_0x443662,{'recursive':!![]}),await _0x135c59[_0xff4edb(0x142)](writeFile,_0x26ef4b,_0x3096a,_0xff4edb(0x138)),await _0x135c59['VDbjb'](unlink,_0x183ff7);}catch{}}return _0x3096a;}export async function readActiveProfileName(){const _0x10e87f=_0x40c9,_0x1f8f55={'NYxIS':function(_0xf0ca81){return _0xf0ca81();},'CCjgR':function(_0xb47fea,_0x439db7){return _0xb47fea(_0x439db7);},'XUTKg':function(_0x31afa5,_0x4a36f2,_0x383108){return _0x31afa5(_0x4a36f2,_0x383108);},'VOleA':'utf-8'},_0x1fef32=_0x1f8f55[_0x10e87f(0x144)](getActiveProfilePath);if(_0x1f8f55[_0x10e87f(0x140)](existsSync,_0x1fef32))try{return(await _0x1f8f55['XUTKg'](readFile,_0x1fef32,_0x1f8f55['VOleA']))['trim']()||null;}catch{return null;}return await _0x1f8f55['NYxIS'](migrateLegacyActiveEnv);}function _0x40c9(_0x54d25d,_0x51913b){_0x54d25d=_0x54d25d-0x138;const _0x53e09b=_0x53e0();let _0x40c940=_0x53e09b[_0x54d25d];return _0x40c940;}function _0x53e0(){const _0x36a36f=['2510AqPBPd','utf-8','387726tQFkmv','2389552KvxLEc','djxCi','oVmMg','6986GQeqdU','skoZI','3016qdPNbu','CCjgR','IYHKd','xlPcO','12hjLzoV','NYxIS','360RfLOgq','977502eVJmVs','trim','3834kzYTad','mHcgR','207573iyiqvK','1388lxIBYK','VHMHN'];_0x53e0=function(){return _0x36a36f;};return _0x53e0();}export async function writeActiveProfileName(_0x3440fd){const _0x116e7f=_0x40c9,_0x2ba8d9={'oVmMg':function(_0x425eed,_0x17fbf5,_0xedf055){return _0x425eed(_0x17fbf5,_0xedf055);},'nYKIO':function(_0x1d3d2d){return _0x1d3d2d();},'Snzwv':function(_0x531654,_0x57302d){return _0x531654(_0x57302d);}},_0xecb999=getRangerDir();await _0x2ba8d9[_0x116e7f(0x13c)](mkdir,_0xecb999,{'recursive':!![]});const _0x372441=getActiveProfilePath();await writeFile(_0x372441,_0x3440fd,_0x116e7f(0x138));const _0x6f9db6=_0x2ba8d9['nYKIO'](getLegacyActiveEnvPath);if(existsSync(_0x6f9db6))try{await _0x2ba8d9['Snzwv'](unlink,_0x6f9db6);}catch{}}export async function migrateActiveProfileFile(){const _0xc9e546=_0x40c9,_0x49e892={'skoZI':function(_0x2a0925){return _0x2a0925();}},_0x244ef6=await _0x49e892[_0xc9e546(0x13e)](migrateLegacyActiveEnv);return _0x244ef6!==null;}
1
+ const _0x2d58df=_0x338e;(function(_0x47e687,_0x407ba3){const _0x5a898d=_0x338e,_0x410c29=_0x47e687();while(!![]){try{const _0xe14091=-parseInt(_0x5a898d(0x1b0))/0x1+-parseInt(_0x5a898d(0x1b3))/0x2+parseInt(_0x5a898d(0x1b1))/0x3+-parseInt(_0x5a898d(0x1b4))/0x4+parseInt(_0x5a898d(0x1bf))/0x5*(parseInt(_0x5a898d(0x1b7))/0x6)+parseInt(_0x5a898d(0x1ad))/0x7+parseInt(_0x5a898d(0x1c0))/0x8*(parseInt(_0x5a898d(0x1b6))/0x9);if(_0xe14091===_0x407ba3)break;else _0x410c29['push'](_0x410c29['shift']());}catch(_0x4ed3ba){_0x410c29['push'](_0x410c29['shift']());}}}(_0x1695,0x420c0));import{existsSync}from'fs';function _0x1695(){const _0x4bfecb=['utf-8','661726jJXhpS','1328140ajzSgt','aqWzY','27SmTZtP','3714jJkLbG','yAOiv','active-env.txt','HREEz','elvFU','iQTNq','xiRIu','XQcvp','155xpVDVh','2994296ZWSpQv','kuNyF','1299032uyEpyy','trim','YkmJs','477819xDaIBa','250857GnwwDi'];_0x1695=function(){return _0x4bfecb;};return _0x1695();}import{mkdir,readFile,rename,unlink,writeFile}from'fs/promises';import{join}from'path';import{getRangerDir}from'./rangerRoot.js';const ACTIVE_PROFILE_FILE='active-profile.txt',LEGACY_ACTIVE_ENV_FILE=_0x2d58df(0x1b9);function getActiveProfilePath(){const _0x3c7e35=_0x2d58df,_0x60b42f={'FsuLT':function(_0x31dac2,_0x7fb434,_0x4c0165){return _0x31dac2(_0x7fb434,_0x4c0165);},'XQcvp':function(_0x4ac0f6){return _0x4ac0f6();}};return _0x60b42f['FsuLT'](join,_0x60b42f[_0x3c7e35(0x1be)](getRangerDir),ACTIVE_PROFILE_FILE);}function getLegacyActiveEnvPath(){const _0x3dcef0=_0x2d58df,_0x1a5596={'mSJxe':function(_0x2edbb1,_0x28517c,_0x206a40){return _0x2edbb1(_0x28517c,_0x206a40);},'HREEz':function(_0x38fb4e){return _0x38fb4e();}};return _0x1a5596['mSJxe'](join,_0x1a5596[_0x3dcef0(0x1ba)](getRangerDir),LEGACY_ACTIVE_ENV_FILE);}async function migrateLegacyActiveEnv(){const _0x4001d9=_0x2d58df,_0x123670={'aqWzY':function(_0x16cb36){return _0x16cb36();},'YkmJs':'utf-8','xiRIu':function(_0x5f40ed,_0x1f69dc,_0x348647){return _0x5f40ed(_0x1f69dc,_0x348647);},'phQSM':function(_0x5b9535,_0x4cd530,_0x469c45,_0x1adf5f){return _0x5b9535(_0x4cd530,_0x469c45,_0x1adf5f);}},_0x3fae3c=_0x123670[_0x4001d9(0x1b5)](getLegacyActiveEnvPath);if(!existsSync(_0x3fae3c))return null;let _0x2414b6=null;try{_0x2414b6=(await readFile(_0x3fae3c,_0x123670[_0x4001d9(0x1af)]))[_0x4001d9(0x1ae)]()||null;}catch{_0x2414b6=null;}if(!_0x2414b6)return null;const _0x542a08=getActiveProfilePath();try{await _0x123670[_0x4001d9(0x1bd)](rename,_0x3fae3c,_0x542a08);}catch{try{const _0x13ba99=getRangerDir();await mkdir(_0x13ba99,{'recursive':!![]}),await _0x123670['phQSM'](writeFile,_0x542a08,_0x2414b6,_0x123670['YkmJs']),await unlink(_0x3fae3c);}catch{}}return _0x2414b6;}export async function readActiveProfileName(){const _0x4eb7aa=_0x2d58df,_0x6b89f7={'elvFU':function(_0x949a3d){return _0x949a3d();},'BulEn':function(_0x42b88f,_0x40729b){return _0x42b88f(_0x40729b);},'hWtXa':function(_0x466b0a,_0x5f437f,_0x2c1f4f){return _0x466b0a(_0x5f437f,_0x2c1f4f);}},_0x12ed83=_0x6b89f7[_0x4eb7aa(0x1bb)](getActiveProfilePath);if(_0x6b89f7['BulEn'](existsSync,_0x12ed83))try{return(await _0x6b89f7['hWtXa'](readFile,_0x12ed83,'utf-8'))['trim']()||null;}catch{return null;}return await _0x6b89f7['elvFU'](migrateLegacyActiveEnv);}export async function writeActiveProfileName(_0x4bea1f){const _0xc04e32=_0x2d58df,_0x2152a3={'yAOiv':function(_0xe638ae){return _0xe638ae();},'iQTNq':function(_0x4094ba,_0x416460,_0x17f6f1,_0x10fcde){return _0x4094ba(_0x416460,_0x17f6f1,_0x10fcde);}},_0x48a039=_0x2152a3[_0xc04e32(0x1b8)](getRangerDir);await mkdir(_0x48a039,{'recursive':!![]});const _0x3e2371=_0x2152a3['yAOiv'](getActiveProfilePath);await _0x2152a3[_0xc04e32(0x1bc)](writeFile,_0x3e2371,_0x4bea1f,_0xc04e32(0x1b2));const _0x456d71=getLegacyActiveEnvPath();if(existsSync(_0x456d71))try{await unlink(_0x456d71);}catch{}}function _0x338e(_0xbc35a9,_0x2a6547){_0xbc35a9=_0xbc35a9-0x1ac;const _0x169539=_0x1695();let _0x338ef6=_0x169539[_0xbc35a9];return _0x338ef6;}export async function migrateActiveProfileFile(){const _0x36e7c3=_0x2d58df,_0x522d2d={'kuNyF':function(_0x5ad8fb){return _0x5ad8fb();},'QHqho':function(_0x123389,_0x3ee007){return _0x123389!==_0x3ee007;}},_0x42666a=await _0x522d2d[_0x36e7c3(0x1ac)](migrateLegacyActiveEnv);return _0x522d2d['QHqho'](_0x42666a,null);}