@ranger-testing/ranger-cli 3.1.7-alpha.be2850d-64 → 3.1.7-alpha.e26cd28-63

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 (88) hide show
  1. package/build/cli.js +1 -1
  2. package/build/commands/addEnv.js +1 -1
  3. package/build/commands/authEncrypt.js +1 -1
  4. package/build/commands/clean.js +1 -1
  5. package/build/commands/config.js +1 -1
  6. package/build/commands/deleteProfile.js +1 -1
  7. package/build/commands/env.js +1 -1
  8. package/build/commands/feature.js +1 -1
  9. package/build/commands/hook.js +1 -1
  10. package/build/commands/hooks/autoPrompt.js +1 -1
  11. package/build/commands/hooks/disable.js +1 -1
  12. package/build/commands/hooks/enable.js +1 -1
  13. package/build/commands/hooks/exitPlanMode.js +1 -1
  14. package/build/commands/hooks/index.js +1 -1
  15. package/build/commands/hooks/output.js +1 -1
  16. package/build/commands/hooks/planReminder.js +1 -1
  17. package/build/commands/hooks/planStart.js +1 -1
  18. package/build/commands/hooks/postEdit.js +1 -1
  19. package/build/commands/hooks/preCompact.js +1 -1
  20. package/build/commands/hooks/sessionEnd.js +1 -1
  21. package/build/commands/hooks/sessionStart.js +1 -1
  22. package/build/commands/hooks/stopHook.js +1 -1
  23. package/build/commands/index.js +1 -1
  24. package/build/commands/login.js +1 -1
  25. package/build/commands/mcpBootstrap.js +1 -1
  26. package/build/commands/migrateProfile.js +1 -1
  27. package/build/commands/setup/claude.js +1 -1
  28. package/build/commands/setup/opencode.js +1 -1
  29. package/build/commands/setupCi.js +1 -1
  30. package/build/commands/skillup.js +1 -1
  31. package/build/commands/start.js +1 -1
  32. package/build/commands/status.js +1 -1
  33. package/build/commands/update.js +1 -1
  34. package/build/commands/updateEnv.js +1 -1
  35. package/build/commands/useEnv.js +1 -1
  36. package/build/commands/utils/activeProfile.js +1 -1
  37. package/build/commands/utils/actors.js +1 -1
  38. package/build/commands/utils/agentEnv.js +1 -1
  39. package/build/commands/utils/browserSessionsApi.js +1 -1
  40. package/build/commands/utils/claudeConfig.js +1 -1
  41. package/build/commands/utils/claudeOverrideSettings.js +1 -1
  42. package/build/commands/utils/claudePlugin.js +1 -1
  43. package/build/commands/utils/cloudProfile.js +1 -1
  44. package/build/commands/utils/cloudProfileSession.js +1 -1
  45. package/build/commands/utils/crypto.js +1 -1
  46. package/build/commands/utils/desirePathLog.js +1 -1
  47. package/build/commands/utils/deviceAuth.js +1 -1
  48. package/build/commands/utils/environment.js +1 -1
  49. package/build/commands/utils/featureApi.js +1 -1
  50. package/build/commands/utils/fixWebmDuration.js +1 -1
  51. package/build/commands/utils/gitTracked.js +1 -1
  52. package/build/commands/utils/keychain.js +1 -1
  53. package/build/commands/utils/legacyWarning.js +1 -1
  54. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  55. package/build/commands/utils/matchAuthEnvironment.js +1 -1
  56. package/build/commands/utils/mcpImageBase64.js +1 -1
  57. package/build/commands/utils/model.js +1 -1
  58. package/build/commands/utils/novaActCli.js +1 -1
  59. package/build/commands/utils/opencodeConfig.js +1 -1
  60. package/build/commands/utils/organizationEnvApi.js +1 -1
  61. package/build/commands/utils/playwrightCli.js +1 -1
  62. package/build/commands/utils/profileMessages.js +1 -1
  63. package/build/commands/utils/profileSetupBanner.js +1 -1
  64. package/build/commands/utils/projectsConfig.js +1 -1
  65. package/build/commands/utils/rangerConfig.js +1 -1
  66. package/build/commands/utils/rangerRoot.js +1 -1
  67. package/build/commands/utils/rangerwrightCli.js +1 -1
  68. package/build/commands/utils/resolveProfileContext.js +1 -1
  69. package/build/commands/utils/resolveProfileUrl.js +1 -1
  70. package/build/commands/utils/retry.js +1 -1
  71. package/build/commands/utils/scenarioOriginCheck.js +1 -1
  72. package/build/commands/utils/sessionCache.js +1 -1
  73. package/build/commands/utils/settings.js +1 -1
  74. package/build/commands/utils/skillContent.js +1 -1
  75. package/build/commands/utils/skills.js +1 -1
  76. package/build/commands/utils/stitchWebmFiles.js +1 -1
  77. package/build/commands/utils/telemetry.js +1 -1
  78. package/build/commands/utils/tokenRefresh.js +1 -1
  79. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  80. package/build/commands/utils/tunnelClient.js +1 -1
  81. package/build/commands/utils/userApi.js +1 -1
  82. package/build/commands/utils/version.js +1 -1
  83. package/build/commands/verifyFeature.js +1 -1
  84. package/build/commands/verifyFeatureCli.js +1 -1
  85. package/build/commands/verifyFeatureNovaCli.js +1 -1
  86. package/build/commands/verifyFeatureRangerwrightCli.js +1 -1
  87. package/build/skills/ranger/SKILL.md +0 -8
  88. package/package.json +1 -1
@@ -1 +1 @@
1
- const _0x126944=_0x498d;(function(_0xcd30b7,_0x1e61a3){const _0x4d4b71=_0x498d,_0x5ad7b=_0xcd30b7();while(!![]){try{const _0x2cfee2=parseInt(_0x4d4b71(0x151))/0x1*(-parseInt(_0x4d4b71(0x1b1))/0x2)+-parseInt(_0x4d4b71(0x1c4))/0x3+parseInt(_0x4d4b71(0x164))/0x4*(-parseInt(_0x4d4b71(0x170))/0x5)+-parseInt(_0x4d4b71(0x179))/0x6*(-parseInt(_0x4d4b71(0x15c))/0x7)+parseInt(_0x4d4b71(0x167))/0x8*(parseInt(_0x4d4b71(0x19f))/0x9)+parseInt(_0x4d4b71(0x190))/0xa*(-parseInt(_0x4d4b71(0x188))/0xb)+parseInt(_0x4d4b71(0x13d))/0xc*(parseInt(_0x4d4b71(0x1a8))/0xd);if(_0x2cfee2===_0x1e61a3)break;else _0x5ad7b['push'](_0x5ad7b['shift']());}catch(_0x2c42ea){_0x5ad7b['push'](_0x5ad7b['shift']());}}}(_0x2ad1,0x3334f));import{readdir,rm}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import _0xe21165 from'inquirer';function _0x2ad1(){const _0x31c50c=['TypeError','kMVTZ','65jwYAxf','afOuo','env_not_found','manual','\x20\x20Set\x20active\x20profile:\x20','agziy','profile.add.autoRouted','action','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','2HpFJra','\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20','fetch\x20failed','for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a','PLtFV','xRcsx','What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','\x27\x20created\x20with\x20a\x20captured\x20session.\x0a','nzfQQ','Invalid\x20URL','error','OTiax','\x0a\x20\x20A\x20profile\x20named\x20\x22','HEAD','The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a','HTTP\x20','message','OEbNZ','env','286008xtBDgj','baseUrl','TzkTY','1371576QDwhcU','KybpP','Please\x20provide\x20--url\x20when\x20running\x20in\x20non-interactive\x20mode.\x0aMake\x20sure\x20the\x20service\x20is\x20running\x20on\x20that\x20port\x20before\x20retrying.\x0aExample:\x20ranger\x20profile\x20add\x20local\x20--url\x20http://localhost:3000','.tmp-','url','HOKGr','\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.','KsSyp','wywwR','\x0a\x20\x20(domains:\x20','XZSje','RdMOr','`\x20again\x20without\x20--skip-auth.','VtpxL','trim','\x27\x20matching\x20','\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22','pzTSa','--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','\x27\x20created.\x0a','384911VdjgCz','ywUma','skipAuth','RckKQ','tyJuI','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','test','NODE_TLS_REJECT_UNAUTHORIZED','kPTGi','\x20\x20Next:\x20ranger\x20go\x20--profile\x20','flZSx','82999LpJeZb','user_declined','log','indexOf','no_match','setupHeaders','UGyMP','profile.add.autoRouteSkipped','8HbFdDH','yes','\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a','24ZoeMEn','UerOJ','setupHeader','startsWith','Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','force','slice','ysUwX','DtPlV','365270TLBFTR','join','oNKGm','\x20Your\x20org\x20has\x20no\x20auth\x20environments\x20configured.','\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','YbeBX','yQwFm','cXSlh','\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','120RnlTEN','trackPhaseEnd','eQqgq','NQmKC','✓\x20Cloud\x20profile\x20\x27','\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20','prompt','PWCUI','egqGp','status','cdpEndpoint','keys','environments','\x20\x20https://docs.ranger.net/main/concepts/profiles','\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.','3465033NUNbRe','length','MNEzk','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.','bZtSo','Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','origin','continue','10sZEclw','toQdf','exit','no_auth_config','Use\x20','\x0a\x20\x20Could\x20not\x20reach\x20','authEnv','capture','Sqsay','confirm','\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20',')\x0a\x20\x20Save\x20\x27','dppnZ','tJpLt','GuDJV','1027413DiJZLH','http://localhost:3000','VyKUf','This\x20account\x20will\x20be\x20shared\x20with\x20everyone\x20at\x20your\x20organization','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','cwd','.\x20Pass\x20--env\x20<key>\x20to\x20pick\x20one,\x20or\x20use\x20--skip-auth.\x20Configured\x20envs:\x20'];_0x2ad1=function(){return _0x31c50c;};return _0x2ad1();}import{getRangerDir,getRangerHomeDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{fetchAuthConfig,createCloudProfile,manualBrowserLogin,ApiError}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';import{matchAuthEnvironment}from'./utils/matchAuthEnvironment.js';import{isPathGitTracked}from'./utils/gitTracked.js';import{setProfileOverride}from'./utils/projectsConfig.js';const CLOUD_PROFILE_SHARING_WARNING=_0x126944(0x1a2);function warnCloudProfileSharedInOrg(){if(!process['stdout']['isTTY'])return;console['warn'](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x112a1c){const _0x4cf492=_0x126944,_0x4a408f={'ZhdgM':function(_0x3b464b,_0x3d6137,_0x5050eb){return _0x3b464b(_0x3d6137,_0x5050eb);},'NQmKC':_0x4cf492(0x1be),'OTiax':_0x4cf492(0x1ab),'toQdf':function(_0x25a38c,_0x28ed89){return _0x25a38c<_0x28ed89;},'VyKUf':function(_0x520f6f,_0x85ee0d){return _0x520f6f(_0x85ee0d);},'wywwR':_0x4cf492(0x1ba),'KybpP':function(_0x4fbbe4,_0x2367d1){return _0x4fbbe4===_0x2367d1;}};try{const _0x3718fd=new AbortController(),_0x575057=_0x4a408f['ZhdgM'](setTimeout,()=>_0x3718fd['abort'](),0x1388),_0xf20c88={'method':_0x4a408f[_0x4cf492(0x17c)],'signal':_0x3718fd['signal'],'redirect':_0x4a408f[_0x4cf492(0x1bc)]};/^https:\/\/localhost(:\d+)?/i[_0x4cf492(0x157)](_0x112a1c)&&(process[_0x4cf492(0x1c3)]['NODE_TLS_REJECT_UNAUTHORIZED']='0');const _0xb8d321=await fetch(_0x112a1c,_0xf20c88);delete process[_0x4cf492(0x1c3)][_0x4cf492(0x158)],clearTimeout(_0x575057);if(_0x4a408f[_0x4cf492(0x191)](_0xb8d321['status'],0x190))return{'ok':!![]};return{'ok':![],'error':_0x4cf492(0x1c0)+_0xb8d321[_0x4cf492(0x182)]};}catch(_0x1e21e5){delete process[_0x4cf492(0x1c3)]['NODE_TLS_REJECT_UNAUTHORIZED'];const _0x492935=_0x1e21e5,_0x327f91=_0x492935['message']||_0x4a408f[_0x4cf492(0x1a1)](String,_0x1e21e5),_0x413ab3=_0x327f91['includes'](_0x4a408f[_0x4cf492(0x145)])||_0x4a408f[_0x4cf492(0x13e)](_0x492935['name'],_0x4cf492(0x1a6))||_0x327f91['includes'](_0x4cf492(0x1b3));return{'ok':![],'error':_0x327f91,'isProtocolError':_0x413ab3};}}async function sweepOrphanLocalProfile(_0x2624be,_0x45f721,_0x2b10b4){const _0x15a917=_0x126944,_0x3b71bb={'RdMOr':function(_0x33506b,_0x5da304,_0x2642b5){return _0x33506b(_0x5da304,_0x2642b5);},'KTtrZ':function(_0x5dfc8f,_0x23efb2){return _0x5dfc8f(_0x23efb2);},'tJpLt':function(_0x5ee40c,_0x2cdb91){return _0x5ee40c(_0x2cdb91);},'Xcaxq':function(_0x1020a1,_0x4049fb,_0x5596d0){return _0x1020a1(_0x4049fb,_0x5596d0);}},_0x232fd3=_0x3b71bb['RdMOr'](join,_0x45f721,'local'),_0x29a69a=join(_0x232fd3,_0x2624be);existsSync(_0x29a69a)&&(_0x2b10b4&&await isPathGitTracked(_0x29a69a)?console[_0x15a917(0x15e)]('\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20'+_0x29a69a+_0x15a917(0x187)):(await rm(_0x29a69a,{'recursive':!![],'force':!![]}),console[_0x15a917(0x15e)](_0x15a917(0x1b2)+_0x29a69a)));if(_0x3b71bb['KTtrZ'](existsSync,_0x232fd3)){let _0x4d480b=[];try{_0x4d480b=await _0x3b71bb[_0x15a917(0x19d)](readdir,_0x232fd3);}catch{return;}const _0xf07e2d=_0x15a917(0x140)+_0x2624be+'-';for(const _0x328fda of _0x4d480b){if(!_0x328fda[_0x15a917(0x16a)](_0xf07e2d))continue;const _0x3766b8=_0x3b71bb['Xcaxq'](join,_0x232fd3,_0x328fda);await _0x3b71bb[_0x15a917(0x148)](rm,_0x3766b8,{'recursive':!![],'force':!![]}),console[_0x15a917(0x15e)]('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x3766b8);}}}async function sweepOrphansBestEffort(_0x1897e2){const _0x148ae6=_0x126944,_0x4bc9d1={'PWCUI':function(_0x1d94b2,_0x166baa,_0x77a32,_0x46ce5b){return _0x1d94b2(_0x166baa,_0x77a32,_0x46ce5b);},'MNEzk':function(_0x5dd321){return _0x5dd321();},'UerOJ':function(_0x396d2f,_0x13c76e,_0x410484,_0x603613){return _0x396d2f(_0x13c76e,_0x410484,_0x603613);}};try{await _0x4bc9d1[_0x148ae6(0x180)](sweepOrphanLocalProfile,_0x1897e2,_0x4bc9d1['MNEzk'](getRangerHomeDir),![]);const _0xc1ac0a=getRangerDir();_0xc1ac0a!==_0x4bc9d1[_0x148ae6(0x18a)](getRangerHomeDir)&&await _0x4bc9d1[_0x148ae6(0x168)](sweepOrphanLocalProfile,_0x1897e2,_0xc1ac0a,!![]);}catch(_0x106b69){console[_0x148ae6(0x15e)]('\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20('+(_0x106b69 instanceof Error?_0x106b69['message']:String(_0x106b69))+').');}}async function markActive(_0x29286a){const _0x23210d=_0x126944,_0x4c33ae={'mcYaq':function(_0x402471,_0x4e926a){return _0x402471(_0x4e926a);}};try{await _0x4c33ae['mcYaq'](writeActiveProfileName,_0x29286a),console[_0x23210d(0x15e)](_0x23210d(0x1ac)+_0x29286a);}catch{console['log']('Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.');}}async function tryAutoRouteCloudProfile(_0x7db0ee,_0x327238,_0x327a1f,_0x1f54b5,_0x190be4){const _0x41c8b3=_0x126944,_0x31be7d={'EgHsW':function(_0x2208f3,_0x5bf40a){return _0x2208f3===_0x5bf40a;},'bZtSo':function(_0x1bcc8e){return _0x1bcc8e();},'nzfQQ':function(_0x1f2a3c,_0xf3f3a3){return _0x1f2a3c instanceof _0xf3f3a3;},'XgWyR':function(_0x356f88,_0x2db120){return _0x356f88===_0x2db120;},'kPTGi':function(_0x1c2420,_0x170a9f,_0x34802f,_0x2ac69f,_0xde18bc){return _0x1c2420(_0x170a9f,_0x34802f,_0x2ac69f,_0xde18bc);},'JcqZj':_0x41c8b3(0x193),'VtpxL':function(_0x161ce8,_0x2f8994){return _0x161ce8+_0x2f8994;},'RhtWD':function(_0x14c667,_0x1fb24c){return _0x14c667+_0x1fb24c;},'egqGp':_0x41c8b3(0x166),'GuDJV':'\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a','UGyMP':_0x41c8b3(0x1aa),'KsSyp':_0x41c8b3(0x160),'hGegC':function(_0x1eba44,_0x231605,_0x394c75,_0x37e649){return _0x1eba44(_0x231605,_0x394c75,_0x37e649);},'IXLMi':function(_0xb374c2){return _0xb374c2();},'BUCmQ':function(_0x52f642,_0x6a2f85){return _0x52f642+_0x6a2f85;}};let _0x24b915;try{_0x24b915=await _0x31be7d[_0x41c8b3(0x18c)](fetchAuthConfig);}catch(_0x22a2a0){return _0x190be4?.['trackPhaseEnd']('profile.add.autoRouteSkipped',{'reason':'no_auth_config','profileName':_0x7db0ee}),console[_0x41c8b3(0x1bb)]('\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20'+(_0x31be7d[_0x41c8b3(0x1b9)](_0x22a2a0,Error)?_0x22a2a0[_0x41c8b3(0x1c1)]:String(_0x22a2a0))),![];}if((!_0x24b915||!_0x24b915['environments']||_0x31be7d['XgWyR'](Object[_0x41c8b3(0x184)](_0x24b915[_0x41c8b3(0x185)])['length'],0x0))&&!_0x327a1f[_0x41c8b3(0x196)]){if(_0x1f54b5)return await _0x31be7d[_0x41c8b3(0x159)](captureEnvLessProfile,_0x7db0ee,_0x327238,_0x327a1f,_0x190be4);return _0x190be4?.['trackPhaseEnd'](_0x41c8b3(0x163),{'reason':_0x31be7d['JcqZj'],'profileName':_0x7db0ee}),console['error'](_0x31be7d[_0x41c8b3(0x14a)](_0x31be7d['VtpxL'](_0x31be7d['RhtWD']('\x0a\x20\x20Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team\x20yet\x20—\x20that\x27s\x20the\x20path\x20that\x20lets\x20Ranger\x20log\x20into\x20your\x20app\x20for\x20you\x20in\x20CI\x20/\x20background\x20agents.\x0a','\x0a')+_0x31be7d[_0x41c8b3(0x181)],'\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20'+_0x7db0ee+'\x20--url\x20'+_0x327238+'\x20--skip-auth\x0a')+'\x0a',_0x31be7d[_0x41c8b3(0x19e)])+_0x41c8b3(0x174)),![];}let _0x5c94bf;if(_0x327a1f['authEnv']){if(!_0x24b915?.['environments']?.[_0x327a1f[_0x41c8b3(0x196)]]){const _0x31772e=Object['keys'](_0x24b915?.['environments']??{});return _0x190be4?.['trackPhaseEnd'](_0x41c8b3(0x163),{'reason':_0x31be7d[_0x41c8b3(0x162)],'profileName':_0x7db0ee}),console[_0x41c8b3(0x1bb)](_0x31be7d['VtpxL']('\x0a\x20\x20Auth\x20environment\x20\x22'+_0x327a1f['authEnv']+'\x22\x20not\x20found.',_0x31772e[_0x41c8b3(0x189)]?'\x20Configured\x20envs:\x20'+_0x31772e[_0x41c8b3(0x171)](',\x20')+'.':_0x41c8b3(0x173))),![];}_0x5c94bf=_0x327a1f[_0x41c8b3(0x196)];}else _0x5c94bf=matchAuthEnvironment(_0x327238,_0x24b915);if(!_0x5c94bf)return _0x190be4?.[_0x41c8b3(0x17a)]('profile.add.autoRouteSkipped',{'reason':_0x31be7d[_0x41c8b3(0x144)],'profileName':_0x7db0ee}),console[_0x41c8b3(0x1bb)]('\x0a\x20\x20No\x20auth\x20env\x20matches\x20'+_0x327238+_0x41c8b3(0x1a5)+Object['keys'](_0x24b915?.[_0x41c8b3(0x185)]??{})['join'](',\x20')+'.'),![];const _0x9a60f8=_0x24b915?.['environments']?.[_0x5c94bf],_0x5f204a=_0x9a60f8?.['domains']??[];if(_0x1f54b5&&!_0x327a1f[_0x41c8b3(0x165)]){const {saveToCloud:_0x5593f6}=await _0xe21165[_0x41c8b3(0x17f)]([{'type':_0x41c8b3(0x199),'name':'saveToCloud','message':'Found\x20auth\x20environment\x20\x27'+_0x5c94bf+_0x41c8b3(0x14c)+_0x327238+_0x41c8b3(0x146)+_0x5f204a[_0x41c8b3(0x171)](',\x20')+_0x41c8b3(0x19b)+_0x7db0ee+'\x27\x20to\x20the\x20cloud?','default':!![]}]);if(!_0x5593f6)return _0x190be4?.[_0x41c8b3(0x17a)](_0x41c8b3(0x163),{'reason':_0x41c8b3(0x15d),'profileName':_0x7db0ee}),console[_0x41c8b3(0x1bb)](_0x41c8b3(0x18b)),![];}const _0x273273=_0x5f204a['some'](_0x1ea56e=>{const _0x5caca7=_0x41c8b3;try{return _0x31be7d['EgHsW'](new URL(_0x1ea56e)[_0x5caca7(0x18e)],new URL(_0x327238)['origin']);}catch{return![];}}),_0x3ddc86={};!_0x273273&&(_0x3ddc86[_0x41c8b3(0x1c5)]=_0x327238);try{await _0x31be7d['hGegC'](createCloudProfile,_0x7db0ee,_0x5c94bf,{'settings':_0x3ddc86}),_0x31be7d['IXLMi'](warnCloudProfileSharedInOrg);}catch(_0x54566b){if(_0x54566b instanceof ApiError&&_0x54566b[_0x41c8b3(0x182)]===0x199){console['error'](_0x31be7d['BUCmQ'](_0x41c8b3(0x1bd)+_0x7db0ee+_0x41c8b3(0x178),_0x41c8b3(0x1a3)+_0x7db0ee));throw _0x54566b;}throw _0x54566b;}return console['log']('✓\x20Profile\x20\x27'+_0x7db0ee+_0x41c8b3(0x150)+(_0x41c8b3(0x15a)+_0x7db0ee)),await sweepOrphansBestEffort(_0x7db0ee),_0x190be4?.[_0x41c8b3(0x17a)]('profile.add.autoRouted',{'envKey':_0x5c94bf,'profileName':_0x7db0ee}),!![];}function _0x498d(_0x56462b,_0x2aef2d){_0x56462b=_0x56462b-0x13c;const _0x2ad1d5=_0x2ad1();let _0x498d5c=_0x2ad1d5[_0x56462b];return _0x498d5c;}async function createUnconfiguredCloudProfile(_0x35e1b2,_0x339bda){const _0x10819d=_0x126944,_0x3575f1={'oEejV':function(_0x533714){return _0x533714();},'xRcsx':function(_0x632443,_0xa48266){return _0x632443 instanceof _0xa48266;},'OuGFC':function(_0x51691c,_0x5a1339){return _0x51691c===_0x5a1339;},'afOuo':function(_0x4383d4,_0xdd795d){return _0x4383d4+_0xdd795d;}};try{await createCloudProfile(_0x35e1b2,undefined,{'settings':_0x339bda}),_0x3575f1['oEejV'](warnCloudProfileSharedInOrg);}catch(_0x5948b1){_0x3575f1[_0x10819d(0x1b6)](_0x5948b1,ApiError)&&_0x3575f1['OuGFC'](_0x5948b1['status'],0x199)&&console['error'](_0x3575f1[_0x10819d(0x1a9)](_0x10819d(0x1bd)+_0x35e1b2+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x35e1b2));throw _0x5948b1;}}async function captureEnvLessProfile(_0x7ad8b2,_0x52874c,_0x2c3ce,_0x23c954){const _0x3fdfe9=_0x126944,_0x1a3000={'QNHyU':_0x3fdfe9(0x197),'yQwFm':'profile.add.autoRouteSkipped','DtPlV':function(_0x2ea923,_0x27687d){return _0x2ea923+_0x27687d;},'agziy':function(_0x52a569,_0x583430){return _0x52a569===_0x583430;},'XGgEh':function(_0x17cd6e,_0x6ce1e5){return _0x17cd6e>_0x6ce1e5;},'mMbWC':function(_0x329014,_0x31037f,_0x51daaf,_0x5bd402){return _0x329014(_0x31037f,_0x51daaf,_0x5bd402);},'OEbNZ':function(_0x9f3ba,_0x1a2c25){return _0x9f3ba instanceof _0x1a2c25;},'tLUJT':function(_0x3ad6eb,_0x4df909,_0x592ae2){return _0x3ad6eb(_0x4df909,_0x592ae2);},'ztkXz':function(_0x5b0345,_0x511f4b){return _0x5b0345(_0x511f4b);}};if(!_0x2c3ce['yes']){const {capture:_0x368d05}=await _0xe21165[_0x3fdfe9(0x17f)]([{'type':_0x3fdfe9(0x199),'name':_0x1a3000['QNHyU'],'message':_0x3fdfe9(0x16b),'default':!![]}]);if(!_0x368d05)return _0x23c954?.['trackPhaseEnd'](_0x1a3000[_0x3fdfe9(0x176)],{'reason':'user_declined','profileName':_0x7ad8b2}),console['error'](_0x1a3000[_0x3fdfe9(0x16f)]('\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a',_0x3fdfe9(0x143))),![];}const _0x22e6c2={};if(_0x2c3ce['setupHeader'])for(const _0x5ef5f7 of _0x2c3ce[_0x3fdfe9(0x169)]){const _0x1d943f=_0x5ef5f7['indexOf'](':');if(_0x1a3000[_0x3fdfe9(0x1ad)](_0x1d943f,-0x1))continue;_0x22e6c2[_0x5ef5f7[_0x3fdfe9(0x16d)](0x0,_0x1d943f)['trim']()]=_0x5ef5f7[_0x3fdfe9(0x16d)](_0x1d943f+0x1)['trim']();}const _0x445a48={'baseUrl':_0x52874c};_0x1a3000['XGgEh'](Object[_0x3fdfe9(0x184)](_0x22e6c2)['length'],0x0)&&(_0x445a48[_0x3fdfe9(0x161)]=_0x22e6c2);let _0x47027f;try{_0x47027f=await _0x1a3000['mMbWC'](createCloudProfile,_0x7ad8b2,undefined,{'settings':_0x445a48}),warnCloudProfileSharedInOrg();}catch(_0x50dcf8){_0x1a3000[_0x3fdfe9(0x1c2)](_0x50dcf8,ApiError)&&_0x50dcf8[_0x3fdfe9(0x182)]===0x199&&console['error'](_0x1a3000['DtPlV']('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x7ad8b2+_0x3fdfe9(0x178),'\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x7ad8b2));throw _0x50dcf8;}return await _0x1a3000['tLUJT'](manualBrowserLogin,_0x47027f,{'key':'','domains':[_0x52874c],'setupHeaders':Object['keys'](_0x22e6c2)[_0x3fdfe9(0x189)]>0x0?_0x22e6c2:undefined}),console['log']('\x0a✓\x20Profile\x20\x27'+_0x7ad8b2+_0x3fdfe9(0x1b8)+('\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x7ad8b2)),await _0x1a3000['ztkXz'](sweepOrphansBestEffort,_0x7ad8b2),_0x23c954?.[_0x3fdfe9(0x17a)](_0x3fdfe9(0x1ae),{'envKey':null,'profileName':_0x7ad8b2}),!![];}export async function addEnv(_0x165c38,_0x520212={},_0x2c28d9){const _0x552c44=_0x126944,_0x4ff41d={'ysUwX':function(_0x526801,_0xe10694){return _0x526801+_0xe10694;},'Sqsay':function(_0x32ce61,_0x555bdc){return _0x32ce61+_0x555bdc;},'SDKJZ':function(_0x2df2b9,_0x20c468){return _0x2df2b9+_0x20c468;},'kMVTZ':_0x552c44(0x1bf),'robFj':'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','HOKGr':'--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','MmfLk':_0x552c44(0x14f),'JtpTS':function(_0x225708,_0x599fb8){return _0x225708(_0x599fb8);},'cXSlh':function(_0x20dae3,_0x42bb29){return _0x20dae3>_0x42bb29;},'tykoj':function(_0x46c5d0,_0x166c65,_0x2e76c7){return _0x46c5d0(_0x166c65,_0x2e76c7);},'YbeBX':function(_0x109cc8,_0x3b9040,_0x2acc60,_0x19996c,_0x370bb7){return _0x109cc8(_0x3b9040,_0x2acc60,_0x19996c,_0x370bb7);},'GMHRm':_0x552c44(0x183),'JfeYj':function(_0x4c4730,_0x5c81f8){return _0x4c4730(_0x5c81f8);},'PRnwv':function(_0x469c42,_0x1e72a3){return _0x469c42>_0x1e72a3;},'pzTSa':function(_0x52925d,_0x25a481){return _0x52925d+_0x25a481;},'RckKQ':function(_0x4b82ed,_0x1227e5){return _0x4b82ed(_0x1227e5);},'flZSx':'\x0a🌐\x20Profile\x20Setup\x0a','XZSje':_0x552c44(0x156),'XRZUf':'baseUrl','edpKV':_0x552c44(0x18d),'oNKGm':_0x552c44(0x1a0),'FxeKj':'list','TzkTY':'What\x20would\x20you\x20like\x20to\x20do?','PLtFV':_0x552c44(0x18f),'dppnZ':function(_0x5c41e0,_0x3e6876){return _0x5c41e0===_0x3e6876;},'eQqgq':function(_0x1de72c,_0x5a9c96,_0x10b241,_0x2423f6,_0x4fbad5,_0x2aa5ed){return _0x1de72c(_0x5a9c96,_0x10b241,_0x2423f6,_0x4fbad5,_0x2aa5ed);},'tyJuI':function(_0x4eaa32,_0xc34d52){return _0x4eaa32 instanceof _0xc34d52;},'ywUma':function(_0x48981a,_0x3cafac){return _0x48981a(_0x3cafac);}};_0x520212['ci']&&(console['error'](_0x4ff41d[_0x552c44(0x16e)](_0x4ff41d[_0x552c44(0x16e)](_0x4ff41d['ysUwX'](_0x4ff41d[_0x552c44(0x198)](_0x4ff41d['SDKJZ'](_0x4ff41d[_0x552c44(0x1a7)],_0x552c44(0x1b4))+'\x0a','To\x20set\x20up\x20a\x20profile,\x20run:\x0a'),_0x4ff41d['robFj'])+'\x0a',_0x552c44(0x1b0)),_0x552c44(0x186))),process[_0x552c44(0x192)](0x1));const _0x483fb7={};if(_0x520212['setupHeader'])for(const _0x99cce7 of _0x520212[_0x552c44(0x169)]){const _0x28f39e=_0x99cce7[_0x552c44(0x15f)](':');if(_0x28f39e===-0x1)throw new Error('Invalid\x20--setup-header\x20format:\x20\x22'+_0x99cce7+'\x22.\x20Expected\x20\x22Name:\x20Value\x22.');const _0x214763=_0x99cce7[_0x552c44(0x16d)](0x0,_0x28f39e)['trim'](),_0x40b50b=_0x99cce7['slice'](_0x28f39e+0x1)[_0x552c44(0x14b)]();_0x483fb7[_0x214763]=_0x40b50b;}if(_0x520212[_0x552c44(0x183)]!==undefined&&_0x520212[_0x552c44(0x183)]['trim']()==='')throw new Error(_0x4ff41d[_0x552c44(0x142)]);if(_0x520212['cdpEndpoint']&&_0x520212[_0x552c44(0x141)])throw new Error(_0x4ff41d['MmfLk']);if(_0x520212[_0x552c44(0x196)]&&_0x520212[_0x552c44(0x153)])throw new Error('--skip-auth\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20--skip-auth\x20makes\x20an\x20env-less\x20profile,\x20--env\x20binds\x20one\x20to\x20an\x20auth\x20environment.');if(_0x520212[_0x552c44(0x196)]&&_0x520212[_0x552c44(0x183)])throw new Error('--cdp-endpoint\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20a\x20CDP\x20profile\x20connects\x20to\x20an\x20existing\x20browser\x20and\x20has\x20no\x20auth\x20environment.');const _0x692db7=_0x4ff41d['JtpTS'](Boolean,_0x520212['cdpEndpoint']),_0x426bdb=isInteractive();if(!_0x426bdb&&!_0x520212[_0x552c44(0x141)]&&!_0x692db7&&!_0x520212[_0x552c44(0x153)])throw new Error(_0x552c44(0x13f));if(_0x692db7){const _0x55b0de=_0x520212[_0x552c44(0x183)];console[_0x552c44(0x15e)]('\x0a🔌\x20CDP\x20Profile\x20Setup\x0a'),console['log'](_0x552c44(0x19a)+_0x55b0de);const _0x4e9b5d={'cdpEndpoint':_0x55b0de,'isElectron':!![]};_0x4ff41d[_0x552c44(0x177)](Object[_0x552c44(0x184)](_0x483fb7)[_0x552c44(0x189)],0x0)&&(_0x4e9b5d['setupHeaders']=_0x483fb7);await _0x4ff41d['tykoj'](createUnconfiguredCloudProfile,_0x165c38,_0x4e9b5d);try{_0x4ff41d[_0x552c44(0x175)](setProfileOverride,process['cwd'](),_0x165c38,_0x4ff41d['GMHRm'],_0x55b0de),setProfileOverride(process[_0x552c44(0x1a4)](),_0x165c38,'isElectron',!![]);}catch(_0x3f804b){console['error']('\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20'+(_0x3f804b instanceof Error?_0x3f804b[_0x552c44(0x1c1)]:_0x4ff41d['JfeYj'](String,_0x3f804b)));}console['log'](_0x552c44(0x17d)+_0x165c38+'\x27\x20created\x20(CDP).'),await sweepOrphansBestEffort(_0x165c38),await markActive(_0x165c38);return;}if(_0x520212[_0x552c44(0x153)]){const _0x39667b={};_0x520212['url']&&(_0x39667b[_0x552c44(0x1c5)]=_0x520212['url']);_0x4ff41d['PRnwv'](Object[_0x552c44(0x184)](_0x483fb7)['length'],0x0)&&(_0x39667b[_0x552c44(0x161)]=_0x483fb7);await _0x4ff41d['tykoj'](createUnconfiguredCloudProfile,_0x165c38,_0x39667b),console['log'](_0x4ff41d[_0x552c44(0x14e)]('✓\x20Profile\x20\x27'+_0x165c38+'\x27\x20created\x20(no\x20session).\x0a',_0x552c44(0x17e)+_0x165c38+_0x552c44(0x149))),await sweepOrphansBestEffort(_0x165c38),await markActive(_0x165c38);return;}if(_0x520212[_0x552c44(0x141)]){const _0xbb6a8d=_0x520212['url'],_0x248bd9=await _0x4ff41d[_0x552c44(0x154)](checkUrlReachability,_0xbb6a8d);if(!_0x248bd9['ok']&&!_0x520212[_0x552c44(0x16c)])throw new Error('Could\x20not\x20reach\x20'+_0xbb6a8d+':\x20'+_0x248bd9[_0x552c44(0x1bb)]+'\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.');!_0x248bd9['ok']&&_0x520212['force']&&console['log']('⚠\x20Could\x20not\x20reach\x20'+_0xbb6a8d+':\x20'+_0x248bd9[_0x552c44(0x1bb)]+'\x20(continuing\x20with\x20--force)');}else{console['log'](_0x4ff41d[_0x552c44(0x15b)]),console[_0x552c44(0x15e)](_0x4ff41d[_0x552c44(0x147)]),console['log']('\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a');let _0x18a1ca='',_0x524d82=![];while(!![]){const _0x50eb1d=await _0xe21165['prompt']([{'type':'input','name':_0x4ff41d['XRZUf'],'message':_0x524d82?_0x4ff41d['edpKV']:_0x552c44(0x1b7),'default':_0x18a1ca||_0x4ff41d[_0x552c44(0x172)]}]);_0x18a1ca=_0x50eb1d['baseUrl'];const _0x313a7c=await _0x4ff41d['JfeYj'](checkUrlReachability,_0x18a1ca);if(_0x313a7c['ok'])break;const _0x473974=/^[a-zA-Z][\w+.-]*:\/\//['test'](_0x18a1ca),_0x2c7dde=_0x313a7c['isProtocolError']&&!_0x473974,_0x2bffcf=_0x2c7dde?'http://'+_0x18a1ca:null;_0x524d82=!![],console['log'](_0x552c44(0x195)+_0x18a1ca+':\x20'+_0x313a7c[_0x552c44(0x1bb)]);_0x2bffcf&&console[_0x552c44(0x15e)]('\x20\x20Did\x20you\x20mean\x20'+_0x2bffcf+'?');const {action:_0x39bae3}=await _0xe21165['prompt']([{'type':_0x4ff41d['FxeKj'],'name':_0x552c44(0x1af),'message':_0x4ff41d[_0x552c44(0x13c)],'choices':[..._0x2bffcf?[{'name':_0x552c44(0x194)+_0x2bffcf,'value':'use_suggestion'}]:[],{'name':'Enter\x20a\x20different\x20URL','value':'retry'},{'name':'Continue\x20anyway','value':_0x4ff41d[_0x552c44(0x1b5)]}]}]);if(_0x4ff41d[_0x552c44(0x19c)](_0x39bae3,'use_suggestion')&&_0x2bffcf){_0x18a1ca=_0x2bffcf;const _0x3941dc=await _0x4ff41d[_0x552c44(0x154)](checkUrlReachability,_0x18a1ca);if(_0x3941dc['ok'])break;console[_0x552c44(0x15e)]('\x0a\x20\x20Still\x20could\x20not\x20reach\x20'+_0x18a1ca+':\x20'+_0x3941dc['error']);}else{if(_0x39bae3==='continue')break;}}_0x520212={..._0x520212,'url':_0x18a1ca};}let _0x55948f=![];try{_0x55948f=await _0x4ff41d[_0x552c44(0x17b)](tryAutoRouteCloudProfile,_0x165c38,_0x520212['url'],_0x520212,_0x426bdb,_0x2c28d9);}catch(_0x1a2d4b){console[_0x552c44(0x1bb)](_0x552c44(0x14d)+_0x165c38+'\x22:\x20'+(_0x4ff41d[_0x552c44(0x155)](_0x1a2d4b,Error)?_0x1a2d4b[_0x552c44(0x1c1)]:_0x4ff41d[_0x552c44(0x152)](String,_0x1a2d4b))),process[_0x552c44(0x192)](0x1);}!_0x55948f&&process['exit'](0x1),await _0x4ff41d['JfeYj'](markActive,_0x165c38);}
1
+ (function(_0x557437,_0x361f37){const _0x158d33=_0x2797,_0x25dacf=_0x557437();while(!![]){try{const _0x6d13e5=-parseInt(_0x158d33(0x10f))/0x1*(parseInt(_0x158d33(0xeb))/0x2)+parseInt(_0x158d33(0xcc))/0x3+parseInt(_0x158d33(0xf3))/0x4+parseInt(_0x158d33(0xec))/0x5+parseInt(_0x158d33(0xcf))/0x6*(-parseInt(_0x158d33(0xc0))/0x7)+-parseInt(_0x158d33(0xca))/0x8+parseInt(_0x158d33(0x123))/0x9;if(_0x6d13e5===_0x361f37)break;else _0x25dacf['push'](_0x25dacf['shift']());}catch(_0x305b83){_0x25dacf['push'](_0x25dacf['shift']());}}}(_0x151b,0x83b91));import{readdir,rm}from'fs/promises';import{join}from'path';function _0x2797(_0xb7dc37,_0x2843e9){_0xb7dc37=_0xb7dc37-0xa3;const _0x151b6f=_0x151b();let _0x279771=_0x151b6f[_0xb7dc37];return _0x279771;}import{existsSync}from'fs';import _0x5ab92a from'inquirer';import{getRangerDir,getRangerHomeDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{fetchAuthConfig,createCloudProfile,manualBrowserLogin,ApiError}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';import{matchAuthEnvironment}from'./utils/matchAuthEnvironment.js';import{isPathGitTracked}from'./utils/gitTracked.js';import{setProfileOverride}from'./utils/projectsConfig.js';const CLOUD_PROFILE_SHARING_WARNING='This\x20account\x20will\x20be\x20shared\x20with\x20everyone\x20at\x20your\x20organization';function _0x151b(){const _0x56f3c4=['kjUTI','lpfKt','ukujb','user_declined','nSTNE','error','\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20','lBaaa','\x0a\x20\x20(domains:\x20','signal','fjDjK','log','\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a','Please\x20provide\x20--url\x20when\x20running\x20in\x20non-interactive\x20mode.\x0aMake\x20sure\x20the\x20service\x20is\x20running\x20on\x20that\x20port\x20before\x20retrying.\x0aExample:\x20ranger\x20profile\x20add\x20local\x20--url\x20http://localhost:3000','WnsMc','saveToCloud','\x27\x20created\x20(no\x20session).\x0a','llIun','list','\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.','EnsGx','ynZUO','baseUrl','\x0a\x20\x20Still\x20could\x20not\x20reach\x20','dLbNh','KAMZa','1219918Crrbrn','1143485khjzPI','cdpEndpoint','yZwZu','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','indexOf','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','HTTP\x20','2405252ILDguN','setupHeader','bwpXo','\x22:\x20','zFenx','\x0a\x20\x20A\x20profile\x20named\x20\x22','skipAuth','test','setupHeaders','vBDuy','`\x20again\x20without\x20--skip-auth.','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20','JURsC','\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','beQmr','REpGi','UZKpd','status','env','ZqHXj','QVsum','\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22','--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','--cdp-endpoint\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20a\x20CDP\x20profile\x20connects\x20to\x20an\x20existing\x20browser\x20and\x20has\x20no\x20auth\x20environment.','The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a','keys','env_not_found','cwd','1iYzIrx','authEnv','message','length','Xkzpt','CxvoW','jzpmU','prompt','\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','EtFza','\x27\x20created.\x0a','continue','\x0a\x20\x20Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team\x20yet\x20—\x20that\x27s\x20the\x20path\x20that\x20lets\x20Ranger\x20log\x20into\x20your\x20app\x20for\x20you\x20in\x20CI\x20/\x20background\x20agents.\x0a','QUfFr','Enter\x20a\x20different\x20URL','url','includes','environments','oYUvh','OFbZi','6224274oYbOwR','\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.','slice','--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','warn','profile.add.autoRouted','vjQRv','\x0a🌐\x20Profile\x20Setup\x0a','HEAD','What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','NCzrP','exit',')\x0a\x20\x20Save\x20\x27','\x27\x20to\x20the\x20cloud?','\x20\x20Next:\x20ranger\x20go\x20--profile\x20','\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20','\x22\x20not\x20found.','trim','\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20','http://localhost:3000','riDGL','trackPhaseEnd','name','UyZgf','HFDlt','QmZPT','✓\x20Profile\x20\x27','pTBeL','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','some','.\x20Pass\x20--env\x20<key>\x20to\x20pick\x20one,\x20or\x20use\x20--skip-auth.\x20Configured\x20envs:\x20','NODE_TLS_REJECT_UNAUTHORIZED','KfKuD','180397FMIGzU','zMCVW','Found\x20auth\x20environment\x20\x27','confirm','isElectron','origin','join','Use\x20','\x0a\x20\x20No\x20auth\x20env\x20matches\x20','profile.add.autoRouteSkipped','4344200QkPcJB','PqEnU','1208592kUMYRY','\x0a✓\x20Profile\x20\x27','RWeQb','54KAlYCk','vgMXm'];_0x151b=function(){return _0x56f3c4;};return _0x151b();}function warnCloudProfileSharedInOrg(){const _0x11fd2b=_0x2797;if(!process['stdout']['isTTY'])return;console[_0x11fd2b(0xa3)](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x5867b7){const _0x2804b3=_0x2797,_0x13e0c6={'AvLgw':function(_0x5a979a,_0x3e31d7){return _0x5a979a<_0x3e31d7;},'SPhxl':function(_0xbc5b8a,_0x17b31c){return _0xbc5b8a(_0x17b31c);},'ROach':'Invalid\x20URL','piKzi':'TypeError','FoKup':'fetch\x20failed'};try{const _0x41fa1f=new AbortController(),_0x45f0dd=setTimeout(()=>_0x41fa1f['abort'](),0x1388),_0x4b1c50={'method':_0x2804b3(0xa7),'signal':_0x41fa1f[_0x2804b3(0xda)],'redirect':'manual'};/^https:\/\/localhost(:\d+)?/i[_0x2804b3(0xfa)](_0x5867b7)&&(process[_0x2804b3(0x105)][_0x2804b3(0xbe)]='0');const _0x1c18a4=await fetch(_0x5867b7,_0x4b1c50);delete process['env'][_0x2804b3(0xbe)],clearTimeout(_0x45f0dd);if(_0x13e0c6['AvLgw'](_0x1c18a4[_0x2804b3(0x104)],0x190))return{'ok':!![]};return{'ok':![],'error':_0x2804b3(0xf2)+_0x1c18a4['status']};}catch(_0x1db2d8){delete process[_0x2804b3(0x105)]['NODE_TLS_REJECT_UNAUTHORIZED'];const _0x17dd6f=_0x1db2d8,_0x15b58f=_0x17dd6f['message']||_0x13e0c6['SPhxl'](String,_0x1db2d8),_0x256464=_0x15b58f['includes'](_0x13e0c6['ROach'])||_0x17dd6f[_0x2804b3(0xb5)]===_0x13e0c6['piKzi']||_0x15b58f[_0x2804b3(0x11f)](_0x13e0c6['FoKup']);return{'ok':![],'error':_0x15b58f,'isProtocolError':_0x256464};}}async function sweepOrphanLocalProfile(_0x2ae4ee,_0x4e2be7,_0x2d2cd9){const _0x3a66b1=_0x2797,_0x21dc10={'QVsum':function(_0x144f68,_0x201bff,_0x3475a6){return _0x144f68(_0x201bff,_0x3475a6);},'beQmr':'local','KfKuD':function(_0x5ca34d,_0x41ed40,_0x248696){return _0x5ca34d(_0x41ed40,_0x248696);},'QUfFr':function(_0x1a8ff4,_0x4b7afe){return _0x1a8ff4(_0x4b7afe);},'lpfKt':function(_0x1c2583,_0x14b5eb,_0x1c1dc7){return _0x1c2583(_0x14b5eb,_0x1c1dc7);}},_0x2d1cec=_0x21dc10[_0x3a66b1(0x107)](join,_0x4e2be7,_0x21dc10[_0x3a66b1(0x101)]),_0xe5f1bc=_0x21dc10[_0x3a66b1(0xbf)](join,_0x2d1cec,_0x2ae4ee);_0x21dc10[_0x3a66b1(0x11c)](existsSync,_0xe5f1bc)&&(_0x2d2cd9&&await isPathGitTracked(_0xe5f1bc)?console['log']('\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20'+_0xe5f1bc+_0x3a66b1(0xe4)):(await _0x21dc10['QVsum'](rm,_0xe5f1bc,{'recursive':!![],'force':!![]}),console[_0x3a66b1(0xdc)]('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0xe5f1bc)));if(existsSync(_0x2d1cec)){let _0x4b04c7=[];try{_0x4b04c7=await readdir(_0x2d1cec);}catch{return;}const _0xc7b69='.tmp-'+_0x2ae4ee+'-';for(const _0x1bcc37 of _0x4b04c7){if(!_0x1bcc37['startsWith'](_0xc7b69))continue;const _0x4400c6=join(_0x2d1cec,_0x1bcc37);await _0x21dc10[_0x3a66b1(0xd2)](rm,_0x4400c6,{'recursive':!![],'force':!![]}),console[_0x3a66b1(0xdc)]('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x4400c6);}}}async function sweepOrphansBestEffort(_0x2e925f){const _0x487f50=_0x2797,_0x5ce207={'CxvoW':function(_0x41a6ec,_0x56a8ef,_0xeb9da5,_0x2fd939){return _0x41a6ec(_0x56a8ef,_0xeb9da5,_0x2fd939);},'llIun':function(_0xb33807){return _0xb33807();},'OFbZi':function(_0x24ee70,_0x2750c8){return _0x24ee70 instanceof _0x2750c8;},'lBaaa':function(_0x31d7b9,_0x2b973b){return _0x31d7b9(_0x2b973b);}};try{await _0x5ce207[_0x487f50(0x114)](sweepOrphanLocalProfile,_0x2e925f,_0x5ce207[_0x487f50(0xe2)](getRangerHomeDir),![]);const _0x21fedf=getRangerDir();_0x21fedf!==getRangerHomeDir()&&await sweepOrphanLocalProfile(_0x2e925f,_0x21fedf,!![]);}catch(_0x7176e3){console['log']('\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20('+(_0x5ce207[_0x487f50(0x122)](_0x7176e3,Error)?_0x7176e3['message']:_0x5ce207[_0x487f50(0xd8)](String,_0x7176e3))+').');}}async function markActive(_0x4240c0){const _0x4a3e2a={'jFNdI':'Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.'};try{await writeActiveProfileName(_0x4240c0),console['log']('\x20\x20Set\x20active\x20profile:\x20'+_0x4240c0);}catch{console['log'](_0x4a3e2a['jFNdI']);}}async function tryAutoRouteCloudProfile(_0x3e522c,_0x412678,_0xe1554f,_0x3a033d,_0x43c579){const _0x41840c=_0x2797,_0x38e443={'REpGi':function(_0x21daf3){return _0x21daf3();},'HFDlt':_0x41840c(0xc9),'MLfAF':'no_auth_config','yZwZu':function(_0x870d9e,_0x47400c){return _0x870d9e(_0x47400c);},'AePbL':function(_0x361874,_0x1eb59f,_0x25db6a,_0x42e6f3,_0x13bcb3){return _0x361874(_0x1eb59f,_0x25db6a,_0x42e6f3,_0x13bcb3);},'UyZgf':function(_0x5d7dfb,_0x2e2509){return _0x5d7dfb+_0x2e2509;},'ajYjF':function(_0x39eab7,_0x3168cd){return _0x39eab7+_0x3168cd;},'ynZUO':'\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a','tTlau':'no_match','NCzrP':_0x41840c(0xc3),'dLbNh':_0x41840c(0xe0),'jmxeN':'\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.','EnyAV':function(_0x1774fc,_0x2d6e51,_0x989a74,_0x3bf0fc){return _0x1774fc(_0x2d6e51,_0x989a74,_0x3bf0fc);},'nSTNE':function(_0xe0361e,_0xecd942){return _0xe0361e instanceof _0xecd942;},'PHpEp':_0x41840c(0xa4)};let _0x115865;try{_0x115865=await _0x38e443[_0x41840c(0x102)](fetchAuthConfig);}catch(_0x48f899){return _0x43c579?.[_0x41840c(0xb4)](_0x38e443[_0x41840c(0xb7)],{'reason':_0x38e443['MLfAF'],'profileName':_0x3e522c}),console[_0x41840c(0xd6)]('\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20'+(_0x48f899 instanceof Error?_0x48f899['message']:_0x38e443[_0x41840c(0xee)](String,_0x48f899))),![];}if((!_0x115865||!_0x115865[_0x41840c(0x120)]||Object['keys'](_0x115865[_0x41840c(0x120)])['length']===0x0)&&!_0xe1554f['authEnv']){if(_0x3a033d)return await _0x38e443['AePbL'](captureEnvLessProfile,_0x3e522c,_0x412678,_0xe1554f,_0x43c579);return _0x43c579?.[_0x41840c(0xb4)](_0x38e443[_0x41840c(0xb7)],{'reason':_0x38e443['MLfAF'],'profileName':_0x3e522c}),console[_0x41840c(0xd6)](_0x38e443[_0x41840c(0xb6)](_0x38e443[_0x41840c(0xb6)](_0x38e443['ajYjF'](_0x38e443['ajYjF'](_0x41840c(0x11b)+'\x0a',_0x41840c(0xdd)),_0x41840c(0xfe)+_0x3e522c+'\x20--url\x20'+_0x412678+'\x20--skip-auth\x0a'),'\x0a'),_0x38e443[_0x41840c(0xe6)])+_0x41840c(0x100)),![];}let _0x37699c;if(_0xe1554f[_0x41840c(0x110)]){if(!_0x115865?.[_0x41840c(0x120)]?.[_0xe1554f['authEnv']]){const _0x288e19=Object[_0x41840c(0x10c)](_0x115865?.['environments']??{});return _0x43c579?.['trackPhaseEnd'](_0x38e443['HFDlt'],{'reason':_0x41840c(0x10d),'profileName':_0x3e522c}),console['error']('\x0a\x20\x20Auth\x20environment\x20\x22'+_0xe1554f['authEnv']+_0x41840c(0xaf)+(_0x288e19[_0x41840c(0x112)]?'\x20Configured\x20envs:\x20'+_0x288e19['join'](',\x20')+'.':'\x20Your\x20org\x20has\x20no\x20auth\x20environments\x20configured.')),![];}_0x37699c=_0xe1554f[_0x41840c(0x110)];}else _0x37699c=matchAuthEnvironment(_0x412678,_0x115865);if(!_0x37699c)return _0x43c579?.[_0x41840c(0xb4)]('profile.add.autoRouteSkipped',{'reason':_0x38e443['tTlau'],'profileName':_0x3e522c}),console[_0x41840c(0xd6)](_0x41840c(0xc8)+_0x412678+_0x41840c(0xbd)+Object[_0x41840c(0x10c)](_0x115865?.[_0x41840c(0x120)]??{})[_0x41840c(0xc6)](',\x20')+'.'),![];const _0x38ffc9=_0x115865?.[_0x41840c(0x120)]?.[_0x37699c],_0x49b51c=_0x38ffc9?.['domains']??[];if(_0x3a033d&&!_0xe1554f['yes']){const {saveToCloud:_0x5e547c}=await _0x5ab92a['prompt']([{'type':_0x38e443[_0x41840c(0xa9)],'name':_0x38e443[_0x41840c(0xe9)],'message':_0x41840c(0xc2)+_0x37699c+'\x27\x20matching\x20'+_0x412678+_0x41840c(0xd9)+_0x49b51c['join'](',\x20')+_0x41840c(0xab)+_0x3e522c+_0x41840c(0xac),'default':!![]}]);if(!_0x5e547c)return _0x43c579?.[_0x41840c(0xb4)](_0x41840c(0xc9),{'reason':_0x41840c(0xd4),'profileName':_0x3e522c}),console[_0x41840c(0xd6)](_0x38e443['jmxeN']),![];}const _0x14a838=_0x49b51c[_0x41840c(0xbc)](_0x27e1c0=>{const _0x3fb0f0=_0x41840c;try{return new URL(_0x27e1c0)[_0x3fb0f0(0xc5)]===new URL(_0x412678)[_0x3fb0f0(0xc5)];}catch{return![];}}),_0x5805d0={};!_0x14a838&&(_0x5805d0[_0x41840c(0xe7)]=_0x412678);try{await _0x38e443['EnyAV'](createCloudProfile,_0x3e522c,_0x37699c,{'settings':_0x5805d0}),_0x38e443['REpGi'](warnCloudProfileSharedInOrg);}catch(_0x4f2252){if(_0x38e443[_0x41840c(0xd5)](_0x4f2252,ApiError)&&_0x4f2252[_0x41840c(0x104)]===0x199){console[_0x41840c(0xd6)](_0x38e443[_0x41840c(0xb6)](_0x41840c(0xf8)+_0x3e522c+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a',_0x41840c(0xbb)+_0x3e522c));throw _0x4f2252;}throw _0x4f2252;}return console['log']('✓\x20Profile\x20\x27'+_0x3e522c+_0x41840c(0x119)+(_0x41840c(0xad)+_0x3e522c)),await _0x38e443['yZwZu'](sweepOrphansBestEffort,_0x3e522c),_0x43c579?.['trackPhaseEnd'](_0x38e443['PHpEp'],{'envKey':_0x37699c,'profileName':_0x3e522c}),!![];}async function createUnconfiguredCloudProfile(_0xa9aa7a,_0xcf8e78){const _0x4cf7d8=_0x2797,_0xc50653={'bnRxK':function(_0x5a613f,_0x33715f,_0x1dfe05,_0x2e3df6){return _0x5a613f(_0x33715f,_0x1dfe05,_0x2e3df6);}};try{await _0xc50653['bnRxK'](createCloudProfile,_0xa9aa7a,undefined,{'settings':_0xcf8e78}),warnCloudProfileSharedInOrg();}catch(_0x2ecbdc){_0x2ecbdc instanceof ApiError&&_0x2ecbdc[_0x4cf7d8(0x104)]===0x199&&console[_0x4cf7d8(0xd6)](_0x4cf7d8(0xf8)+_0xa9aa7a+_0x4cf7d8(0x117)+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0xa9aa7a));throw _0x2ecbdc;}}async function captureEnvLessProfile(_0x4b51aa,_0x213ac2,_0x1b19a5,_0x4d2e06){const _0x71765a=_0x2797,_0x32c107={'oYUvh':'capture','vBDuy':'profile.add.autoRouteSkipped','riUjo':'user_declined','ukujb':function(_0xdd92,_0x5b3ddf){return _0xdd92+_0x5b3ddf;},'fjDjK':function(_0x22cada,_0x3afc36){return _0x22cada>_0x3afc36;},'JZDUp':function(_0x3a775b,_0x760c9d,_0x52f52a,_0x25344f){return _0x3a775b(_0x760c9d,_0x52f52a,_0x25344f);},'riDGL':function(_0x11c930,_0x2a9e40){return _0x11c930+_0x2a9e40;},'yVqCr':_0x71765a(0xa4)};if(!_0x1b19a5['yes']){const {capture:_0x1b5f6f}=await _0x5ab92a['prompt']([{'type':'confirm','name':_0x32c107[_0x71765a(0x121)],'message':'Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','default':!![]}]);if(!_0x1b5f6f)return _0x4d2e06?.[_0x71765a(0xb4)](_0x32c107[_0x71765a(0xfc)],{'reason':_0x32c107['riUjo'],'profileName':_0x4b51aa}),console[_0x71765a(0xd6)](_0x32c107[_0x71765a(0xd3)]('\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a',_0x71765a(0x124))),![];}const _0x110d66={};if(_0x1b19a5[_0x71765a(0xf4)])for(const _0x4012a4 of _0x1b19a5['setupHeader']){const _0x3d2ecd=_0x4012a4[_0x71765a(0xf0)](':');if(_0x3d2ecd===-0x1)continue;_0x110d66[_0x4012a4['slice'](0x0,_0x3d2ecd)['trim']()]=_0x4012a4['slice'](_0x3d2ecd+0x1)['trim']();}const _0x44d644={'baseUrl':_0x213ac2};_0x32c107[_0x71765a(0xdb)](Object[_0x71765a(0x10c)](_0x110d66)['length'],0x0)&&(_0x44d644[_0x71765a(0xfb)]=_0x110d66);let _0x11da35;try{_0x11da35=await _0x32c107['JZDUp'](createCloudProfile,_0x4b51aa,undefined,{'settings':_0x44d644}),warnCloudProfileSharedInOrg();}catch(_0x52a768){_0x52a768 instanceof ApiError&&_0x52a768['status']===0x199&&console['error'](_0x32c107[_0x71765a(0xd3)]('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x4b51aa+_0x71765a(0x117),'\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x4b51aa));throw _0x52a768;}return await manualBrowserLogin(_0x11da35,{'key':'','domains':[_0x213ac2],'setupHeaders':Object[_0x71765a(0x10c)](_0x110d66)['length']>0x0?_0x110d66:undefined}),console['log'](_0x32c107[_0x71765a(0xb3)](_0x71765a(0xcd)+_0x4b51aa+'\x27\x20created\x20with\x20a\x20captured\x20session.\x0a','\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x4b51aa)),await sweepOrphansBestEffort(_0x4b51aa),_0x4d2e06?.[_0x71765a(0xb4)](_0x32c107['yVqCr'],{'envKey':null,'profileName':_0x4b51aa}),!![];}export async function addEnv(_0x52a935,_0x538065={},_0xde6152){const _0x33792f=_0x2797,_0x2d716={'ZqHXj':function(_0x4e9c3f,_0x4b94b9){return _0x4e9c3f+_0x4b94b9;},'pTBeL':function(_0x7c8e00,_0x1f4eac){return _0x7c8e00+_0x1f4eac;},'vImQW':_0x33792f(0x10b),'RWeQb':function(_0x90a093,_0x156014){return _0x90a093===_0x156014;},'vgMXm':_0x33792f(0x109),'gzHzE':'--skip-auth\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20--skip-auth\x20makes\x20an\x20env-less\x20profile,\x20--env\x20binds\x20one\x20to\x20an\x20auth\x20environment.','QmZPT':_0x33792f(0x10a),'KAMZa':function(_0x5da5f3,_0x30aef3){return _0x5da5f3(_0x30aef3);},'OsWnj':function(_0x596ae3){return _0x596ae3();},'zMCVW':'\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','dCTmh':function(_0x1f84b1,_0x55463c,_0x4a8677){return _0x1f84b1(_0x55463c,_0x4a8677);},'EnsGx':function(_0x491276,_0x413d88,_0xa55dd4,_0x1949ac,_0x3102a6){return _0x491276(_0x413d88,_0xa55dd4,_0x1949ac,_0x3102a6);},'RZwRV':function(_0x14b5ec,_0x155b44){return _0x14b5ec instanceof _0x155b44;},'EtFza':function(_0x46165e,_0x142926){return _0x46165e(_0x142926);},'PqEnU':function(_0x87ca82,_0x368128){return _0x87ca82>_0x368128;},'kwaWj':function(_0x4d6ddf,_0x3eb686,_0x339418){return _0x4d6ddf(_0x3eb686,_0x339418);},'UKrHY':function(_0xedd7ae,_0x5f2bd3){return _0xedd7ae+_0x5f2bd3;},'vjQRv':_0x33792f(0xa6),'TXCno':_0x33792f(0xef),'KsoMB':'\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a','zFenx':'input','QdCwy':'baseUrl','JURsC':function(_0x564717,_0x2f504b){return _0x564717||_0x2f504b;},'zzzxa':_0x33792f(0xb2),'kjUTI':_0x33792f(0xe3),'jzpmU':'action','Xkzpt':'retry','bwpXo':'Continue\x20anyway','UZKpd':_0x33792f(0x11a),'WnsMc':function(_0x56e608,_0x4d5dd0){return _0x56e608 instanceof _0x4d5dd0;}};_0x538065['ci']&&(console['error'](_0x2d716[_0x33792f(0x106)](_0x2d716[_0x33792f(0x106)](_0x2d716[_0x33792f(0x106)](_0x2d716[_0x33792f(0xba)](_0x2d716['vImQW']+'for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a','\x0a'),'To\x20set\x20up\x20a\x20profile,\x20run:\x0a'),_0x33792f(0x127)),'\x0a')+_0x33792f(0xf1)+'\x20\x20https://docs.ranger.net/main/concepts/profiles'),process[_0x33792f(0xaa)](0x1));const _0x35fc02={};if(_0x538065['setupHeader'])for(const _0x8ffa9d of _0x538065[_0x33792f(0xf4)]){const _0x207f8c=_0x8ffa9d['indexOf'](':');if(_0x207f8c===-0x1)throw new Error('Invalid\x20--setup-header\x20format:\x20\x22'+_0x8ffa9d+'\x22.\x20Expected\x20\x22Name:\x20Value\x22.');const _0xf2ad5c=_0x8ffa9d['slice'](0x0,_0x207f8c)['trim'](),_0x2b7ace=_0x8ffa9d[_0x33792f(0x125)](_0x207f8c+0x1)[_0x33792f(0xb0)]();_0x35fc02[_0xf2ad5c]=_0x2b7ace;}if(_0x538065['cdpEndpoint']!==undefined&&_0x2d716[_0x33792f(0xce)](_0x538065['cdpEndpoint']['trim'](),''))throw new Error(_0x33792f(0x126));if(_0x538065[_0x33792f(0xed)]&&_0x538065['url'])throw new Error(_0x2d716[_0x33792f(0xd0)]);if(_0x538065[_0x33792f(0x110)]&&_0x538065[_0x33792f(0xf9)])throw new Error(_0x2d716['gzHzE']);if(_0x538065[_0x33792f(0x110)]&&_0x538065[_0x33792f(0xed)])throw new Error(_0x2d716[_0x33792f(0xb8)]);const _0x2b0493=_0x2d716['KAMZa'](Boolean,_0x538065[_0x33792f(0xed)]),_0x49f399=_0x2d716['OsWnj'](isInteractive);if(!_0x49f399&&!_0x538065['url']&&!_0x2b0493&&!_0x538065[_0x33792f(0xf9)])throw new Error(_0x33792f(0xde));if(_0x2b0493){const _0x163a23=_0x538065[_0x33792f(0xed)];console[_0x33792f(0xdc)](_0x2d716[_0x33792f(0xc1)]),console['log'](_0x33792f(0xd7)+_0x163a23);const _0x1c05f3={'cdpEndpoint':_0x163a23,'isElectron':!![]};Object['keys'](_0x35fc02)[_0x33792f(0x112)]>0x0&&(_0x1c05f3[_0x33792f(0xfb)]=_0x35fc02);await _0x2d716['dCTmh'](createUnconfiguredCloudProfile,_0x52a935,_0x1c05f3);try{_0x2d716[_0x33792f(0xe5)](setProfileOverride,process['cwd'](),_0x52a935,_0x33792f(0xed),_0x163a23),setProfileOverride(process[_0x33792f(0x10e)](),_0x52a935,_0x33792f(0xc4),!![]);}catch(_0xb37025){console['error'](_0x33792f(0xb1)+(_0x2d716['RZwRV'](_0xb37025,Error)?_0xb37025[_0x33792f(0x111)]:_0x2d716[_0x33792f(0x118)](String,_0xb37025)));}console['log']('✓\x20Cloud\x20profile\x20\x27'+_0x52a935+'\x27\x20created\x20(CDP).'),await sweepOrphansBestEffort(_0x52a935),await markActive(_0x52a935);return;}if(_0x538065['skipAuth']){const _0x38c29e={};_0x538065['url']&&(_0x38c29e['baseUrl']=_0x538065['url']);_0x2d716[_0x33792f(0xcb)](Object[_0x33792f(0x10c)](_0x35fc02)[_0x33792f(0x112)],0x0)&&(_0x38c29e['setupHeaders']=_0x35fc02);await _0x2d716['kwaWj'](createUnconfiguredCloudProfile,_0x52a935,_0x38c29e),console['log'](_0x2d716['UKrHY'](_0x33792f(0xb9)+_0x52a935+_0x33792f(0xe1),_0x33792f(0xae)+_0x52a935+_0x33792f(0xfd))),await sweepOrphansBestEffort(_0x52a935),await markActive(_0x52a935);return;}if(_0x538065['url']){const _0x10e1ce=_0x538065['url'],_0xe7fda5=await checkUrlReachability(_0x10e1ce);if(!_0xe7fda5['ok']&&!_0x538065['force'])throw new Error('Could\x20not\x20reach\x20'+_0x10e1ce+':\x20'+_0xe7fda5['error']+'\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.');!_0xe7fda5['ok']&&_0x538065['force']&&console['log']('⚠\x20Could\x20not\x20reach\x20'+_0x10e1ce+':\x20'+_0xe7fda5['error']+'\x20(continuing\x20with\x20--force)');}else{console[_0x33792f(0xdc)](_0x2d716[_0x33792f(0xa5)]),console[_0x33792f(0xdc)](_0x2d716['TXCno']),console[_0x33792f(0xdc)](_0x2d716['KsoMB']);let _0x5201a9='',_0x5c2af7=![];while(!![]){const _0x3bf1b6=await _0x5ab92a['prompt']([{'type':_0x2d716[_0x33792f(0xf7)],'name':_0x2d716['QdCwy'],'message':_0x5c2af7?'Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):':_0x33792f(0xa8),'default':_0x2d716[_0x33792f(0xff)](_0x5201a9,_0x2d716['zzzxa'])}]);_0x5201a9=_0x3bf1b6[_0x33792f(0xe7)];const _0x4874b8=await _0x2d716[_0x33792f(0xea)](checkUrlReachability,_0x5201a9);if(_0x4874b8['ok'])break;const _0x22cf13=/^[a-zA-Z][\w+.-]*:\/\//['test'](_0x5201a9),_0x449f07=_0x4874b8['isProtocolError']&&!_0x22cf13,_0x156641=_0x449f07?'http://'+_0x5201a9:null;_0x5c2af7=!![],console[_0x33792f(0xdc)]('\x0a\x20\x20Could\x20not\x20reach\x20'+_0x5201a9+':\x20'+_0x4874b8['error']);_0x156641&&console['log']('\x20\x20Did\x20you\x20mean\x20'+_0x156641+'?');const {action:_0x43d80f}=await _0x5ab92a[_0x33792f(0x116)]([{'type':_0x2d716[_0x33792f(0xd1)],'name':_0x2d716[_0x33792f(0x115)],'message':'What\x20would\x20you\x20like\x20to\x20do?','choices':[..._0x156641?[{'name':_0x33792f(0xc7)+_0x156641,'value':'use_suggestion'}]:[],{'name':_0x33792f(0x11d),'value':_0x2d716[_0x33792f(0x113)]},{'name':_0x2d716[_0x33792f(0xf5)],'value':_0x2d716[_0x33792f(0x103)]}]}]);if(_0x2d716['RWeQb'](_0x43d80f,'use_suggestion')&&_0x156641){_0x5201a9=_0x156641;const _0x3e9941=await checkUrlReachability(_0x5201a9);if(_0x3e9941['ok'])break;console['log'](_0x33792f(0xe8)+_0x5201a9+':\x20'+_0x3e9941[_0x33792f(0xd6)]);}else{if(_0x2d716['RWeQb'](_0x43d80f,_0x2d716[_0x33792f(0x103)]))break;}}_0x538065={..._0x538065,'url':_0x5201a9};}let _0x221c29=![];try{_0x221c29=await tryAutoRouteCloudProfile(_0x52a935,_0x538065[_0x33792f(0x11e)],_0x538065,_0x49f399,_0xde6152);}catch(_0x5b3590){console[_0x33792f(0xd6)](_0x33792f(0x108)+_0x52a935+_0x33792f(0xf6)+(_0x2d716[_0x33792f(0xdf)](_0x5b3590,Error)?_0x5b3590['message']:String(_0x5b3590))),process[_0x33792f(0xaa)](0x1);}!_0x221c29&&process[_0x33792f(0xaa)](0x1),await markActive(_0x52a935);}
@@ -1 +1 @@
1
- (function(_0xfb937b,_0x887c2a){var _0x2f9da0=_0x4136,_0x4461dc=_0xfb937b();while(!![]){try{var _0x4b4d85=-parseInt(_0x2f9da0(0x121))/0x1+-parseInt(_0x2f9da0(0x129))/0x2*(-parseInt(_0x2f9da0(0x124))/0x3)+-parseInt(_0x2f9da0(0x133))/0x4*(-parseInt(_0x2f9da0(0x131))/0x5)+-parseInt(_0x2f9da0(0x12a))/0x6+parseInt(_0x2f9da0(0x126))/0x7+parseInt(_0x2f9da0(0x12f))/0x8*(-parseInt(_0x2f9da0(0x125))/0x9)+parseInt(_0x2f9da0(0x123))/0xa;if(_0x4b4d85===_0x887c2a)break;else _0x4461dc['push'](_0x4461dc['shift']());}catch(_0xf1099a){_0x4461dc['push'](_0x4461dc['shift']());}}}(_0x47e1,0x7d523));export async function authEncrypt(_0x1a82dd){var _0x4168d1=_0x4136,_0x48fd43={'ArKfk':function(_0x1f143e,_0x3c4bd2){return _0x1f143e+_0x3c4bd2;},'TGuuo':function(_0x59570f,_0x4916a9){return _0x59570f+_0x4916a9;},'ExKwA':_0x4168d1(0x12d),'YDxFa':_0x4168d1(0x132)};console['error'](_0x48fd43[_0x4168d1(0x128)](_0x48fd43[_0x4168d1(0x128)](_0x48fd43['ArKfk'](_0x48fd43[_0x4168d1(0x12b)](_0x48fd43['ExKwA']+_0x48fd43[_0x4168d1(0x127)]+'\x0a',_0x4168d1(0x12c)),_0x4168d1(0x12e)),'\x0a'),'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a')+_0x4168d1(0x122)),process[_0x4168d1(0x130)](0x1);}function _0x4136(_0x309b6b,_0x5b8a3e){_0x309b6b=_0x309b6b-0x121;var _0x47e11f=_0x47e1();var _0x41365a=_0x47e11f[_0x309b6b];return _0x41365a;}function _0x47e1(){var _0x41faaf=['3017217avCMUm','YDxFa','ArKfk','120imDnmN','3336648ZXeYtS','TGuuo','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','8JAqDht','exit','275830ZrPsMT','session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a','36soYIpZ','214076gYDsYT','\x20\x20https://docs.ranger.net/main/concepts/profiles','9356190LAyHLx','10746jpjkLg','7151085rezaez'];_0x47e1=function(){return _0x41faaf;};return _0x47e1();}
1
+ function _0x8bb1(){var _0x212d12=['15cBTZlf','8883480FoSyan','JCWkN','ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','5527854JsAwFj','5208400XNtPPO','470198tyIEvZ','session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a','707IaRIha','6819610UqlzNk','77818omjmnG','AIRHE','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','NdwkZ','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','21768SfAFZx'];_0x8bb1=function(){return _0x212d12;};return _0x8bb1();}(function(_0x215236,_0x231bd7){var _0x363d44=_0x174f,_0x498cc6=_0x215236();while(!![]){try{var _0xa9449b=-parseInt(_0x363d44(0x179))/0x1+-parseInt(_0x363d44(0x175))/0x2*(parseInt(_0x363d44(0x16f))/0x3)+parseInt(_0x363d44(0x174))/0x4+parseInt(_0x363d44(0x178))/0x5+-parseInt(_0x363d44(0x170))/0x6+-parseInt(_0x363d44(0x177))/0x7*(-parseInt(_0x363d44(0x16e))/0x8)+parseInt(_0x363d44(0x173))/0x9;if(_0xa9449b===_0x231bd7)break;else _0x498cc6['push'](_0x498cc6['shift']());}catch(_0x408029){_0x498cc6['push'](_0x498cc6['shift']());}}}(_0x8bb1,0xc87a4));function _0x174f(_0x2bb738,_0x572c65){_0x2bb738=_0x2bb738-0x16a;var _0x8bb113=_0x8bb1();var _0x174f27=_0x8bb113[_0x2bb738];return _0x174f27;}export async function authEncrypt(_0x2880bc){var _0x469750=_0x174f,_0x3ba096={'NdwkZ':_0x469750(0x172),'AIRHE':_0x469750(0x176),'JCWkN':_0x469750(0x16b),'KDfmc':'\x20\x20https://docs.ranger.net/main/concepts/profiles'};console['error'](_0x3ba096[_0x469750(0x16c)]+_0x3ba096[_0x469750(0x16a)]+'\x0a'+_0x469750(0x16d)+'\x20\x20ranger\x20profile\x20add\x20<name>\x0a'+'\x0a'+_0x3ba096[_0x469750(0x171)]+_0x3ba096['KDfmc']),process['exit'](0x1);}
@@ -1 +1 @@
1
- const _0x2e7629=_0x72d5;(function(_0x1f8fa9,_0x2681a5){const _0x3b53ec=_0x72d5,_0x3a7c3c=_0x1f8fa9();while(!![]){try{const _0x198dc2=parseInt(_0x3b53ec(0x136))/0x1*(-parseInt(_0x3b53ec(0x124))/0x2)+-parseInt(_0x3b53ec(0x129))/0x3+-parseInt(_0x3b53ec(0x125))/0x4+-parseInt(_0x3b53ec(0x127))/0x5*(-parseInt(_0x3b53ec(0x150))/0x6)+parseInt(_0x3b53ec(0x126))/0x7*(parseInt(_0x3b53ec(0x15b))/0x8)+-parseInt(_0x3b53ec(0x134))/0x9*(parseInt(_0x3b53ec(0x143))/0xa)+parseInt(_0x3b53ec(0x142))/0xb;if(_0x198dc2===_0x2681a5)break;else _0x3a7c3c['push'](_0x3a7c3c['shift']());}catch(_0x5032b2){_0x3a7c3c['push'](_0x3a7c3c['shift']());}}}(_0x59c3,0x44fa8));import{rm,readFile,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{spawn}from'child_process';import{deleteAllCredentials}from'./utils/keychain.js';import{getProjectRoot,getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';function _0x72d5(_0x39c443,_0x2e3d93){_0x39c443=_0x39c443-0x123;const _0x59c3cd=_0x59c3();let _0x72d525=_0x59c3cd[_0x39c443];return _0x72d525;}import{getRangerDir}from'./utils/rangerRoot.js';import{getCacheFile}from'./utils/sessionCache.js';import{getOpencodeConfigDir,getOpencodeSkillsDir}from'./utils/opencodeConfig.js';const skillsToRemove=['ranger','feature-tracker',_0x2e7629(0x152),_0x2e7629(0x15c)],opencodePluginName='@ranger-testing/opencode-plugin';function parseJsonc(_0xec7d79){const _0x569570=_0x2e7629,_0x3f3034=_0xec7d79[_0x569570(0x145)](/\/\*[\s\S]*?\*\//g,''),_0x52aad6=_0x3f3034['replace'](/^\s*\/\/.*$/gm,''),_0x842cf8=_0x52aad6[_0x569570(0x145)](/,\s*([}\]])/g,'$1');return JSON['parse'](_0x842cf8);}async function removeOpencodePluginConfig(_0x2efb18){const _0x1c47a8=_0x2e7629,_0x11c3ce={'FyjTa':function(_0x198316,_0x491d06){return _0x198316(_0x491d06);},'onsXG':function(_0x155ce2,_0x5bf207){return _0x155ce2===_0x5bf207;},'BosrB':function(_0x5b59ca,_0x5e98bc,_0x4e8209){return _0x5b59ca(_0x5e98bc,_0x4e8209);},'Byive':function(_0x106908,_0x45e902){return _0x106908+_0x45e902;}};if(!existsSync(_0x2efb18))return![];let _0x309d4c;try{const _0x246752=await readFile(_0x2efb18,'utf-8');_0x309d4c=_0x11c3ce['FyjTa'](parseJsonc,_0x246752);}catch{return![];}const _0x11d465=Array['isArray'](_0x309d4c[_0x1c47a8(0x14e)])?_0x309d4c['plugin']:[];if(_0x11c3ce['onsXG'](_0x11d465['length'],0x0))return![];const _0x4a3b30=_0x11d465[_0x1c47a8(0x159)](_0x368d11=>{if(typeof _0x368d11!=='string')return!![];return _0x368d11!==opencodePluginName;});if(_0x4a3b30[_0x1c47a8(0x132)]===_0x11d465['length'])return![];return _0x4a3b30[_0x1c47a8(0x132)]===0x0?delete _0x309d4c[_0x1c47a8(0x14e)]:_0x309d4c['plugin']=_0x4a3b30,await _0x11c3ce['BosrB'](writeFile,_0x2efb18,_0x11c3ce[_0x1c47a8(0x12d)](JSON['stringify'](_0x309d4c,null,0x2),'\x0a')),!![];}async function uninstallClaudePlugin(_0x38b3c4){const _0x7508b9=_0x2e7629,_0x2390e2={'kkpgN':function(_0x39f654,_0x2be44b){return _0x39f654(_0x2be44b);},'bhEsc':'uninstall','ZUiLr':_0x7508b9(0x13b),'kQmLL':_0x7508b9(0x133),'Hixyb':function(_0x36a71a,_0xf05841,_0x1a5f67,_0x90d994){return _0x36a71a(_0xf05841,_0x1a5f67,_0x90d994);},'VyQVi':'ignore','HVSgK':function(_0x354854,_0x3b564e){return _0x354854===_0x3b564e;},'VGoHt':_0x7508b9(0x144),'LmQER':_0x7508b9(0x13e),'JotDa':'error'};return new Promise(_0x3bf4b1=>{const _0x1df53e=_0x7508b9,_0x283e13=['plugin',_0x2390e2['bhEsc'],_0x2390e2['ZUiLr']];_0x38b3c4&&_0x283e13['push'](_0x2390e2[_0x1df53e(0x14d)],_0x38b3c4);const _0x3d50ca=_0x2390e2['Hixyb'](spawn,_0x1df53e(0x15a),_0x283e13,{'stdio':[_0x2390e2['VyQVi'],'ignore',_0x2390e2['VyQVi']],'cwd':_0x38b3c4?getProjectRoot():undefined,'shell':_0x2390e2[_0x1df53e(0x151)](process['platform'],_0x2390e2[_0x1df53e(0x147)])});_0x3d50ca['on'](_0x2390e2[_0x1df53e(0x15d)],_0x2b6a61=>{_0x3bf4b1(_0x2b6a61===0x0);}),_0x3d50ca['on'](_0x2390e2[_0x1df53e(0x12e)],()=>{const _0xe56da3=_0x1df53e;_0x2390e2[_0xe56da3(0x156)](_0x3bf4b1,![]);});});}function _0x59c3(){const _0xa429db=['dMCXl','✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)','Byive','JotDa','vOMHy','Glejb','eHllA','length','--scope','12879bLZOFM','project','17PWQZsI','✓\x20Removed\x20user\x20skill:\x20','ahnFT','chlFb','user','ranger@trailhead','✓\x20Removed\x20OpenCode\x20user\x20skill:\x20','eSZHG','close','pJpac','xtzgz','✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','8918415nQqnBB','3720TqWjKw','win32','replace','uwkuW','VGoHt','YBsgJ','ZyMmm','ufDhL','✓\x20Removed\x20OpenCode\x20project\x20skill:\x20','ignore','kQmLL','plugin','ZZUEP','432PluWGq','HVSgK','bug-bash','rVTZa','\x0a✅\x20Cleanup\x20complete!\x0a','PrOqy','kkpgN','LEryu','LmbSq','filter','claude','24aFgZgP','e2e-test-recommender','LmQER','✓\x20Removed\x20stored\x20credentials','ALEhD','remove','✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','✓\x20Removed\x20.ranger/\x20directory','46674ZzVoex','598796AJvtcB','496118fOWDOx','27925ysiatv','OlyQl','192633UjhqXt','log'];_0x59c3=function(){return _0xa429db;};return _0x59c3();}async function removeMarketplace(){const _0x48fb48=_0x2e7629,_0x56aa45={'YBsgJ':function(_0x4394ce,_0x4c5a3f){return _0x4394ce(_0x4c5a3f);},'ZKKxm':'marketplace','WnMVb':_0x48fb48(0x160),'ZyMmm':'trailhead','eHllA':_0x48fb48(0x14c),'SxOAK':function(_0x2dca40,_0x370013){return _0x2dca40===_0x370013;},'ufDhL':'close'};return new Promise(_0x21dcf8=>{const _0x37ed04=_0x48fb48,_0x2f788e={'LEryu':function(_0x4e7919,_0x1f1ff8){const _0x91c93f=_0x72d5;return _0x56aa45[_0x91c93f(0x148)](_0x4e7919,_0x1f1ff8);},'FMyYx':function(_0x29b880,_0x32a020){return _0x29b880===_0x32a020;}},_0x405b2a=spawn('claude',[_0x37ed04(0x14e),_0x56aa45['ZKKxm'],_0x56aa45['WnMVb'],_0x56aa45[_0x37ed04(0x149)]],{'stdio':[_0x37ed04(0x14c),_0x56aa45[_0x37ed04(0x131)],_0x37ed04(0x14c)],'shell':_0x56aa45['SxOAK'](process['platform'],'win32')});_0x405b2a['on'](_0x56aa45[_0x37ed04(0x14a)],_0x460c85=>{_0x2f788e['LEryu'](_0x21dcf8,_0x2f788e['FMyYx'](_0x460c85,0x0));}),_0x405b2a['on']('error',()=>{const _0x24e414=_0x37ed04;_0x2f788e[_0x24e414(0x157)](_0x21dcf8,![]);});});}export async function clean(){const _0x50e9df=_0x2e7629,_0x2bee4d={'CkYyC':'\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','NRnvJ':function(_0x5dab87){return _0x5dab87();},'eSZHG':_0x50e9df(0x15e),'uwkuW':function(_0x1fade7){return _0x1fade7();},'jAwoZ':function(_0x4e62b5){return _0x4e62b5();},'vOMHy':function(_0x4945d0,_0x3f1ccb,_0x2af3fa){return _0x4945d0(_0x3f1ccb,_0x2af3fa);},'Glejb':function(_0x382dc9,_0xc82870,_0x45d8e6){return _0x382dc9(_0xc82870,_0x45d8e6);},'rVTZa':function(_0x5ea8cf,_0x1a0178){return _0x5ea8cf(_0x1a0178);},'pJpac':_0x50e9df(0x135),'xLCaM':function(_0x44510a,_0x281d3b,_0x3d0cb3){return _0x44510a(_0x281d3b,_0x3d0cb3);},'LmbSq':function(_0x21dfe6,_0x2f4b70){return _0x21dfe6(_0x2f4b70);},'GupXa':_0x50e9df(0x13a),'jCWKE':function(_0x585201,_0x20bd4d,_0x4e551e){return _0x585201(_0x20bd4d,_0x4e551e);},'ZZUEP':function(_0x3290e0,_0x2a9502){return _0x3290e0(_0x2a9502);},'ahnFT':function(_0x13fec3,_0x3f5029,_0x4dcec1){return _0x13fec3(_0x3f5029,_0x4dcec1);},'dMCXl':function(_0x3f23c6,_0x6a75b7,_0x33b120){return _0x3f23c6(_0x6a75b7,_0x33b120);},'OlyQl':'opencode.json','hdObt':_0x50e9df(0x12c),'xtzgz':'✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','chlFb':_0x50e9df(0x161),'ALEhD':function(_0x3ae6c2){return _0x3ae6c2();},'PrOqy':_0x50e9df(0x154)};console['log'](_0x2bee4d['CkYyC']);let _0x299630=![];try{await _0x2bee4d['NRnvJ'](deleteAllCredentials),console['log'](_0x2bee4d[_0x50e9df(0x13d)]),_0x299630=!![];}catch{}const _0x4dbecc=_0x2bee4d[_0x50e9df(0x146)](getCacheFile);existsSync(_0x4dbecc)&&(await rm(_0x4dbecc),_0x299630=!![]);const _0x212d3f=_0x2bee4d['uwkuW'](getRangerDir);existsSync(_0x212d3f)&&(await rm(_0x212d3f,{'recursive':!![]}),console[_0x50e9df(0x12a)](_0x50e9df(0x123)),_0x299630=!![]);const _0x42b4ec=_0x2bee4d['jAwoZ'](getProjectSkillsDir);for(const _0x98e12a of skillsToRemove){const _0x626ac9=_0x2bee4d[_0x50e9df(0x12f)](join,_0x42b4ec,_0x98e12a);existsSync(_0x626ac9)&&(await _0x2bee4d[_0x50e9df(0x130)](rm,_0x626ac9,{'recursive':!![]}),console[_0x50e9df(0x12a)]('✓\x20Removed\x20project\x20skill:\x20'+_0x98e12a),_0x299630=!![]);}const _0x1b2619=getUserSkillsDir();for(const _0x3eda69 of skillsToRemove){const _0x3ba172=join(_0x1b2619,_0x3eda69);_0x2bee4d[_0x50e9df(0x153)](existsSync,_0x3ba172)&&(await _0x2bee4d[_0x50e9df(0x130)](rm,_0x3ba172,{'recursive':!![]}),console[_0x50e9df(0x12a)](_0x50e9df(0x137)+_0x3eda69),_0x299630=!![]);}const _0x1f5186=getOpencodeSkillsDir(_0x2bee4d[_0x50e9df(0x13f)]);for(const _0x2f1e0a of skillsToRemove){const _0x30eaf0=_0x2bee4d['xLCaM'](join,_0x1f5186,_0x2f1e0a);existsSync(_0x30eaf0)&&(await _0x2bee4d[_0x50e9df(0x12f)](rm,_0x30eaf0,{'recursive':!![]}),console[_0x50e9df(0x12a)](_0x50e9df(0x14b)+_0x2f1e0a),_0x299630=!![]);}const _0x130719=_0x2bee4d[_0x50e9df(0x158)](getOpencodeSkillsDir,_0x2bee4d['GupXa']);for(const _0x35bb70 of skillsToRemove){const _0x207aa5=_0x2bee4d['jCWKE'](join,_0x130719,_0x35bb70);_0x2bee4d[_0x50e9df(0x14f)](existsSync,_0x207aa5)&&(await _0x2bee4d[_0x50e9df(0x138)](rm,_0x207aa5,{'recursive':!![]}),console['log'](_0x50e9df(0x13c)+_0x35bb70),_0x299630=!![]);}const _0x15f376=_0x2bee4d[_0x50e9df(0x12b)](join,getOpencodeConfigDir(_0x2bee4d['pJpac']),_0x2bee4d[_0x50e9df(0x128)]);await removeOpencodePluginConfig(_0x15f376)&&(console[_0x50e9df(0x12a)](_0x50e9df(0x141)),_0x299630=!![]);const _0x2843bd=join(getOpencodeConfigDir(_0x50e9df(0x13a)),_0x2bee4d[_0x50e9df(0x128)]);await removeOpencodePluginConfig(_0x2843bd)&&(console[_0x50e9df(0x12a)](_0x2bee4d['hdObt']),_0x299630=!![]);const _0x53b84b=await uninstallClaudePlugin();_0x53b84b&&(console[_0x50e9df(0x12a)](_0x2bee4d[_0x50e9df(0x140)]),_0x299630=!![]);const _0x185e93=await _0x2bee4d[_0x50e9df(0x153)](uninstallClaudePlugin,'project');_0x185e93&&(console['log'](_0x2bee4d[_0x50e9df(0x139)]),_0x299630=!![]);const _0x3de851=await _0x2bee4d[_0x50e9df(0x15f)](removeMarketplace);_0x3de851&&(console[_0x50e9df(0x12a)]('✓\x20Removed\x20trailhead\x20marketplace'),_0x299630=!![]),_0x299630?console['log'](_0x2bee4d[_0x50e9df(0x155)]):console['log']('Nothing\x20to\x20clean\x20up.\x0a');}
1
+ const _0x11f4f0=_0x1d97;(function(_0x4e2517,_0x2654fc){const _0x29f35d=_0x1d97,_0x2db0dc=_0x4e2517();while(!![]){try{const _0x5e5d9d=parseInt(_0x29f35d(0xe6))/0x1*(-parseInt(_0x29f35d(0xc9))/0x2)+-parseInt(_0x29f35d(0xc2))/0x3*(parseInt(_0x29f35d(0xbf))/0x4)+parseInt(_0x29f35d(0xb9))/0x5*(parseInt(_0x29f35d(0xd1))/0x6)+parseInt(_0x29f35d(0xc5))/0x7+-parseInt(_0x29f35d(0xcd))/0x8*(parseInt(_0x29f35d(0xe8))/0x9)+-parseInt(_0x29f35d(0xb8))/0xa*(-parseInt(_0x29f35d(0xdb))/0xb)+parseInt(_0x29f35d(0xe7))/0xc;if(_0x5e5d9d===_0x2654fc)break;else _0x2db0dc['push'](_0x2db0dc['shift']());}catch(_0x22abce){_0x2db0dc['push'](_0x2db0dc['shift']());}}}(_0x53ba,0x88a98));import{rm,readFile,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{spawn}from'child_process';import{deleteAllCredentials}from'./utils/keychain.js';import{getProjectRoot,getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getCacheFile}from'./utils/sessionCache.js';import{getOpencodeConfigDir,getOpencodeSkillsDir}from'./utils/opencodeConfig.js';const skillsToRemove=['ranger',_0x11f4f0(0xcb),'bug-bash','e2e-test-recommender'],opencodePluginName='@ranger-testing/opencode-plugin';function parseJsonc(_0x10bd2a){const _0x3f081b=_0x11f4f0,_0x285e6a=_0x10bd2a[_0x3f081b(0xbd)](/\/\*[\s\S]*?\*\//g,''),_0x24744f=_0x285e6a[_0x3f081b(0xbd)](/^\s*\/\/.*$/gm,''),_0x310b5c=_0x24744f[_0x3f081b(0xbd)](/,\s*([}\]])/g,'$1');return JSON[_0x3f081b(0xbc)](_0x310b5c);}async function removeOpencodePluginConfig(_0x2c4221){const _0x508676=_0x11f4f0,_0x4e6e87={'ahpbm':_0x508676(0xcc),'OuFgy':_0x508676(0xde),'QWbMw':function(_0x4e42e3,_0x4b1914){return _0x4e42e3(_0x4b1914);},'IWnEB':function(_0x33ad03,_0x59cab2){return _0x33ad03===_0x59cab2;},'ARgWE':function(_0x239289,_0x46ad83){return _0x239289===_0x46ad83;},'JVMyU':function(_0x141e7f,_0x16da92,_0x92a80a){return _0x141e7f(_0x16da92,_0x92a80a);},'TXuOm':function(_0x14ef93,_0xe2f858){return _0x14ef93+_0xe2f858;}};if(!existsSync(_0x2c4221))return![];let _0x2e1fa6;try{const _0x1b4c41=await readFile(_0x2c4221,_0x4e6e87['OuFgy']);_0x2e1fa6=_0x4e6e87['QWbMw'](parseJsonc,_0x1b4c41);}catch{return![];}const _0x8dd00d=Array[_0x508676(0xeb)](_0x2e1fa6['plugin'])?_0x2e1fa6[_0x508676(0xe0)]:[];if(_0x4e6e87[_0x508676(0xe1)](_0x8dd00d[_0x508676(0xb5)],0x0))return![];const _0x43a733=_0x8dd00d[_0x508676(0xe2)](_0x1821e6=>{const _0x1eb5de=_0x508676;if(typeof _0x1821e6!==_0x4e6e87[_0x1eb5de(0xee)])return!![];return _0x1821e6!==opencodePluginName;});if(_0x4e6e87['ARgWE'](_0x43a733['length'],_0x8dd00d[_0x508676(0xb5)]))return![];return _0x4e6e87[_0x508676(0xd8)](_0x43a733['length'],0x0)?delete _0x2e1fa6['plugin']:_0x2e1fa6['plugin']=_0x43a733,await _0x4e6e87['JVMyU'](writeFile,_0x2c4221,_0x4e6e87['TXuOm'](JSON[_0x508676(0xdc)](_0x2e1fa6,null,0x2),'\x0a')),!![];}async function uninstallClaudePlugin(_0x11ffae){const _0x4f3ab4=_0x11f4f0,_0x1543ed={'VwulP':function(_0x865405,_0x22f7cd){return _0x865405(_0x22f7cd);},'girxJ':function(_0x5261f3,_0x57da93){return _0x5261f3===_0x57da93;},'cTAIu':'plugin','AlZkd':_0x4f3ab4(0xb4),'BwJoh':function(_0x148eb7,_0x328516,_0x10caf8,_0x57ba8e){return _0x148eb7(_0x328516,_0x10caf8,_0x57ba8e);},'GEOhN':_0x4f3ab4(0xef),'vafeT':'ignore','sQQLC':function(_0x3ccac9){return _0x3ccac9();},'lptUo':_0x4f3ab4(0xdd),'DddHJ':_0x4f3ab4(0xdf)};return new Promise(_0x321fa8=>{const _0x424cfe=_0x4f3ab4,_0x5abaa2={'QvzEe':function(_0x1f4919,_0x423aab){return _0x1543ed['girxJ'](_0x1f4919,_0x423aab);}},_0x471cc6=[_0x1543ed[_0x424cfe(0xe9)],_0x1543ed['AlZkd'],_0x424cfe(0xe3)];_0x11ffae&&_0x471cc6[_0x424cfe(0xce)](_0x424cfe(0xb2),_0x11ffae);const _0x3a064e=_0x1543ed[_0x424cfe(0xe4)](spawn,_0x1543ed['GEOhN'],_0x471cc6,{'stdio':[_0x1543ed[_0x424cfe(0xbb)],_0x424cfe(0xc0),_0x1543ed[_0x424cfe(0xbb)]],'cwd':_0x11ffae?_0x1543ed['sQQLC'](getProjectRoot):undefined,'shell':process['platform']===_0x1543ed['lptUo']});_0x3a064e['on']('close',_0x5a7f5f=>{const _0x20e05e=_0x424cfe;_0x321fa8(_0x5abaa2[_0x20e05e(0xd3)](_0x5a7f5f,0x0));}),_0x3a064e['on'](_0x1543ed[_0x424cfe(0xc8)],()=>{_0x1543ed['VwulP'](_0x321fa8,![]);});});}function _0x1d97(_0x3320ca,_0x1485f7){_0x3320ca=_0x3320ca-0xb2;const _0x53bade=_0x53ba();let _0x1d97e6=_0x53bade[_0x3320ca];return _0x1d97e6;}async function removeMarketplace(){const _0x43c936=_0x11f4f0,_0x1aff53={'QRVFd':'claude','pOdnu':_0x43c936(0xe0),'wHwgy':'marketplace','YeACE':_0x43c936(0xc0),'nbcLM':function(_0x3a86c5,_0x410375){return _0x3a86c5===_0x410375;},'vPpZf':_0x43c936(0xdd)};return new Promise(_0x13f390=>{const _0x78b508=_0x43c936,_0x5a079c=spawn(_0x1aff53['QRVFd'],[_0x1aff53[_0x78b508(0xf0)],_0x1aff53['wHwgy'],'remove',_0x78b508(0xd5)],{'stdio':['ignore',_0x1aff53['YeACE'],_0x1aff53[_0x78b508(0xc3)]],'shell':_0x1aff53['nbcLM'](process[_0x78b508(0xd4)],_0x1aff53['vPpZf'])});_0x5a079c['on'](_0x78b508(0xc7),_0x3f59a3=>{_0x13f390(_0x3f59a3===0x0);}),_0x5a079c['on']('error',()=>{_0x13f390(![]);});});}function _0x53ba(){const _0x102eec=['✓\x20Removed\x20trailhead\x20marketplace','✓\x20Removed\x20OpenCode\x20user\x20skill:\x20','ahpbm','claude','pOdnu','--scope','pGDRm','uninstall','length','\x0a✅\x20Cleanup\x20complete!\x0a','✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','1760030qEPKkN','5vLEsyq','✓\x20Removed\x20stored\x20credentials','vafeT','parse','replace','project','30136yUPKoj','ignore','BXgJu','207gToENk','YeACE','TBqnW','6018138xWowcE','user','close','DddHJ','18474xtrGTK','xrHpG','feature-tracker','string','16WOxlBh','push','✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','GbMod','6557586CmTGBv','\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','QvzEe','platform','trailhead','vAenO','vGWSP','ARgWE','CFTOr','RztCQ','22hKwyMr','stringify','win32','utf-8','error','plugin','IWnEB','filter','ranger@trailhead','BwJoh','log','118hbtyUK','5099004HPRpEI','2520036FkkhJI','cTAIu','✓\x20Removed\x20user\x20skill:\x20','isArray'];_0x53ba=function(){return _0x102eec;};return _0x53ba();}export async function clean(){const _0x95ada3=_0x11f4f0,_0x4152af={'ERBLF':_0x95ada3(0xd2),'RztCQ':_0x95ada3(0xba),'GbMod':function(_0x2beee9,_0x23ae21){return _0x2beee9(_0x23ae21);},'BXgJu':function(_0x50c74a){return _0x50c74a();},'TBqnW':function(_0x1d87f4,_0x4c0637,_0x1a731e){return _0x1d87f4(_0x4c0637,_0x1a731e);},'jlYfK':function(_0x54547d,_0xa77173){return _0x54547d(_0xa77173);},'CFTOr':function(_0x4179b9,_0x1b34fc,_0x20faf8){return _0x4179b9(_0x1b34fc,_0x20faf8);},'xrHpG':function(_0x343f00,_0x48eedf){return _0x343f00(_0x48eedf);},'vGWSP':_0x95ada3(0xc6),'TfOoK':function(_0x237b41,_0x2c2a23,_0x5882c3){return _0x237b41(_0x2c2a23,_0x5882c3);},'FZQRI':'project','YfhlD':'opencode.json','RhwnG':function(_0x248fdd,_0x2ec4c5){return _0x248fdd(_0x2ec4c5);},'qICXP':function(_0x5887f6){return _0x5887f6();},'vAenO':_0x95ada3(0xec),'pGDRm':'Nothing\x20to\x20clean\x20up.\x0a'};console['log'](_0x4152af['ERBLF']);let _0x47a42b=![];try{await deleteAllCredentials(),console[_0x95ada3(0xe5)](_0x4152af[_0x95ada3(0xda)]),_0x47a42b=!![];}catch{}const _0xcc086d=getCacheFile();_0x4152af['GbMod'](existsSync,_0xcc086d)&&(await rm(_0xcc086d),_0x47a42b=!![]);const _0x1355f7=_0x4152af[_0x95ada3(0xc1)](getRangerDir);existsSync(_0x1355f7)&&(await _0x4152af['TBqnW'](rm,_0x1355f7,{'recursive':!![]}),console[_0x95ada3(0xe5)]('✓\x20Removed\x20.ranger/\x20directory'),_0x47a42b=!![]);const _0x309121=getProjectSkillsDir();for(const _0xe43946 of skillsToRemove){const _0x1fcf57=_0x4152af[_0x95ada3(0xc4)](join,_0x309121,_0xe43946);_0x4152af['jlYfK'](existsSync,_0x1fcf57)&&(await _0x4152af[_0x95ada3(0xd9)](rm,_0x1fcf57,{'recursive':!![]}),console[_0x95ada3(0xe5)]('✓\x20Removed\x20project\x20skill:\x20'+_0xe43946),_0x47a42b=!![]);}const _0x3bd2b7=getUserSkillsDir();for(const _0x45c36f of skillsToRemove){const _0x28455b=join(_0x3bd2b7,_0x45c36f);_0x4152af['jlYfK'](existsSync,_0x28455b)&&(await rm(_0x28455b,{'recursive':!![]}),console[_0x95ada3(0xe5)](_0x95ada3(0xea)+_0x45c36f),_0x47a42b=!![]);}const _0x5e62e5=_0x4152af[_0x95ada3(0xd0)](getOpencodeSkillsDir,_0x95ada3(0xbe));for(const _0x17d366 of skillsToRemove){const _0x581f01=_0x4152af[_0x95ada3(0xc4)](join,_0x5e62e5,_0x17d366);_0x4152af[_0x95ada3(0xca)](existsSync,_0x581f01)&&(await rm(_0x581f01,{'recursive':!![]}),console[_0x95ada3(0xe5)]('✓\x20Removed\x20OpenCode\x20project\x20skill:\x20'+_0x17d366),_0x47a42b=!![]);}const _0x5dc220=getOpencodeSkillsDir(_0x4152af[_0x95ada3(0xd7)]);for(const _0x39bf19 of skillsToRemove){const _0x43fc3d=_0x4152af['TfOoK'](join,_0x5dc220,_0x39bf19);existsSync(_0x43fc3d)&&(await rm(_0x43fc3d,{'recursive':!![]}),console['log'](_0x95ada3(0xed)+_0x39bf19),_0x47a42b=!![]);}const _0x45f27c=join(getOpencodeConfigDir(_0x4152af['FZQRI']),_0x4152af['YfhlD']);await _0x4152af['RhwnG'](removeOpencodePluginConfig,_0x45f27c)&&(console['log'](_0x95ada3(0xcf)),_0x47a42b=!![]);const _0x40afc3=join(getOpencodeConfigDir('user'),'opencode.json');await removeOpencodePluginConfig(_0x40afc3)&&(console['log']('✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)'),_0x47a42b=!![]);const _0x117ba4=await _0x4152af['qICXP'](uninstallClaudePlugin);_0x117ba4&&(console['log'](_0x95ada3(0xb7)),_0x47a42b=!![]);const _0x2e61fd=await uninstallClaudePlugin(_0x4152af['FZQRI']);_0x2e61fd&&(console[_0x95ada3(0xe5)]('✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)'),_0x47a42b=!![]);const _0x16b199=await _0x4152af[_0x95ada3(0xc1)](removeMarketplace);_0x16b199&&(console['log'](_0x4152af[_0x95ada3(0xd6)]),_0x47a42b=!![]),_0x47a42b?console['log'](_0x95ada3(0xb6)):console[_0x95ada3(0xe5)](_0x4152af[_0x95ada3(0xb3)]);}
@@ -1 +1 @@
1
- const _0x1a80b5=_0x29ed;(function(_0x15a35f,_0x4bd1b6){const _0x4f888b=_0x29ed,_0x558338=_0x15a35f();while(!![]){try{const _0x371142=-parseInt(_0x4f888b(0x14e))/0x1+parseInt(_0x4f888b(0x145))/0x2*(-parseInt(_0x4f888b(0x14c))/0x3)+-parseInt(_0x4f888b(0x149))/0x4*(parseInt(_0x4f888b(0x15f))/0x5)+-parseInt(_0x4f888b(0x166))/0x6*(-parseInt(_0x4f888b(0x16d))/0x7)+-parseInt(_0x4f888b(0x16b))/0x8*(-parseInt(_0x4f888b(0x174))/0x9)+parseInt(_0x4f888b(0x147))/0xa+-parseInt(_0x4f888b(0x169))/0xb*(-parseInt(_0x4f888b(0x175))/0xc);if(_0x371142===_0x4bd1b6)break;else _0x558338['push'](_0x558338['shift']());}catch(_0x332f3a){_0x558338['push'](_0x558338['shift']());}}}(_0x23a3,0xcda8b));import{existsSync}from'fs';import{loadSettings,getNestedValue,deleteNestedValue,formatSettings,getSettingsPath,getEnvDir}from'./utils/settings.js';function _0x23a3(){const _0x175771=['\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22','NaWST','XmfqT','114154XBfTiF','sOaaH','10577580fYkfsc','length','18988LFLRNY','\x20\x20Note:\x20\x22','No\x20configuration\x20set\x20for\x20\x22','39cUlDDu','HgUUi','1126594INKsxs','\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.','uCKyV','rtetH','true','\x20=\x20','\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.','Key\x20\x22','zNbUO','XEcJR','dmWHr','cloud','startsWith','stringify','nRgPQ','Profile\x20\x22','(not\x20set)','395bTFsYb','WImyz','\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20','keys','object','\x20for\x20\x22','allowInsecureLocalhost','258882HjyGEG','kind','Removed\x20','4466wFUOVK','WGbgU','8WQQgcx','\x22\x20not\x20found','196ukNauL','test','ZrXrD','log','cnchP','PiJtx','includes','5459013GqAHhF','6312hNJGso','undefined','alsoExistsElsewhere','uQBjL','DCOnG','RIpvH'];_0x23a3=function(){return _0x175771;};return _0x23a3();}import{fetchCloudProfile}from'./utils/cloudProfile.js';import{mergeCloudProfileSettings,readProfileOverrides,resetProfileOverrides,setProfileOverride,unsetProfileOverride}from'./utils/projectsConfig.js';const BOOLEAN_KEYS=['headless',_0x1a80b5(0x165),'forceLogin'];function parseLocalValue(_0x17bc0c,_0x284be3){const _0x1030fb=_0x1a80b5,_0x564b42={'RIpvH':_0x1030fb(0x152),'NDSkA':function(_0x1ba550,_0x27c9b5){return _0x1ba550===_0x27c9b5;},'YXjkN':'false'};if(BOOLEAN_KEYS[_0x1030fb(0x173)](_0x17bc0c)){if(_0x284be3===_0x564b42[_0x1030fb(0x141)])return!![];if(_0x564b42['NDSkA'](_0x284be3,_0x564b42['YXjkN']))return![];throw new Error('Invalid\x20value\x20for\x20'+_0x17bc0c+':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22');}return _0x284be3;}function parseOverrideValue(_0x123d48){const _0x366cab=_0x1a80b5,_0xc85c8e={'sOZEt':function(_0x339c94,_0x58f01a){return _0x339c94===_0x58f01a;},'cnchP':'true','AKfNs':'null','NaWST':function(_0xd1cc25,_0xe43ceb){return _0xd1cc25===_0xe43ceb;},'ZrXrD':function(_0x16e7f5,_0x507c1b){return _0x16e7f5(_0x507c1b);}};if(_0xc85c8e['sOZEt'](_0x123d48,_0xc85c8e[_0x366cab(0x171)]))return!![];if(_0xc85c8e['sOZEt'](_0x123d48,'false'))return![];if(_0x123d48===_0xc85c8e['AKfNs'])return null;if(_0xc85c8e[_0x366cab(0x143)](_0x123d48,_0x366cab(0x176)))return undefined;if(/^-?\d+$/['test'](_0x123d48)){const _0x3afadb=Number(_0x123d48);if(Number['isSafeInteger'](_0x3afadb))return _0x3afadb;}if(/^-?\d+\.\d+$/[_0x366cab(0x16e)](_0x123d48)){const _0x16eb22=_0xc85c8e[_0x366cab(0x16f)](Number,_0x123d48);if(!Number['isNaN'](_0x16eb22))return _0x16eb22;}const _0x13af62=_0x123d48['trim']();if(_0x13af62[_0x366cab(0x15a)]('{')&&_0x13af62['endsWith']('}')||_0x13af62['startsWith']('[')&&_0x13af62['endsWith'](']'))try{return JSON['parse'](_0x13af62);}catch{}return _0x123d48;}async function resolveProfileTarget(_0x2f695e){const _0x52cf61=_0x1a80b5,_0x5628e8={'ZJumx':function(_0x42981d,_0x45ab52){return _0x42981d(_0x45ab52);},'WGbgU':function(_0x155ed0,_0x240e4e){return _0x155ed0(_0x240e4e);},'nRgPQ':'local'},_0x3e2526=_0x5628e8['ZJumx'](existsSync,_0x5628e8[_0x52cf61(0x16a)](getEnvDir,_0x2f695e));let _0xda73aa=![];try{const _0x4dcd83=await fetchCloudProfile(_0x2f695e);_0xda73aa=Boolean(_0x4dcd83);}catch{}if(_0xda73aa)return{'kind':_0x52cf61(0x159),'alsoExistsElsewhere':_0x3e2526};if(_0x3e2526)return{'kind':_0x5628e8[_0x52cf61(0x15c)],'alsoExistsElsewhere':![]};throw new Error(_0x52cf61(0x15d)+_0x2f695e+_0x52cf61(0x161)+_0x2f695e);}function printDualExistsHint(_0x265ee2){const _0x16dd65=_0x1a80b5;console[_0x16dd65(0x170)](_0x16dd65(0x14a)+_0x265ee2+_0x16dd65(0x154));}function _0x29ed(_0x383607,_0x5eb460){_0x383607=_0x383607-0x141;const _0x23a356=_0x23a3();let _0x29ed5a=_0x23a356[_0x383607];return _0x29ed5a;}function getProjectPath(){return process['cwd']();}async function loadEffectiveCloudSettings(_0x51c81d){const _0x46cee1={'Kvbiz':function(_0x7b031e,_0x408610){return _0x7b031e(_0x408610);}},_0x2e2740=await _0x46cee1['Kvbiz'](fetchCloudProfile,_0x51c81d),_0x398aeb=readProfileOverrides(getProjectPath(),_0x51c81d);return mergeCloudProfileSettings(_0x2e2740?.['settings']??{},_0x398aeb??undefined);}export async function configSet(_0x1ba713,_0x260bef,_0x112220){const _0x5aeeb0=_0x1a80b5,_0x1b8a1c={'PiJtx':'cloud','KTqYb':function(_0x10cd55,_0x1483cd,_0x35c0ae,_0x22e62c,_0x2ed0e6){return _0x10cd55(_0x1483cd,_0x35c0ae,_0x22e62c,_0x2ed0e6);},'uQBjL':function(_0x44decf){return _0x44decf();}},_0xdd647f=await resolveProfileTarget(_0x1ba713);if(_0xdd647f['kind']===_0x1b8a1c[_0x5aeeb0(0x172)]){if(_0xdd647f[_0x5aeeb0(0x177)])printDualExistsHint(_0x1ba713);const _0x575eef=parseOverrideValue(_0x112220);setProfileOverride(getProjectPath(),_0x1ba713,_0x260bef,_0x575eef),console['log']('Set\x20'+_0x260bef+_0x5aeeb0(0x153)+JSON[_0x5aeeb0(0x15b)](_0x575eef)+'\x20for\x20\x22'+_0x1ba713+'\x22');return;}const _0x230809=parseLocalValue(_0x260bef,_0x112220);_0x1b8a1c['KTqYb'](setProfileOverride,_0x1b8a1c[_0x5aeeb0(0x178)](getProjectPath),_0x1ba713,_0x260bef,_0x230809),console['log']('Set\x20'+_0x260bef+_0x5aeeb0(0x153)+_0x230809+_0x5aeeb0(0x164)+_0x1ba713+'\x22');}export async function configGet(_0x12eaef,_0x2b22b9){const _0x3d35c6=_0x1a80b5,_0x3ecc8b={'HgUUi':function(_0x910962,_0x4768f9){return _0x910962===_0x4768f9;},'XmfqT':function(_0x3dcaae,_0x30d8d3){return _0x3dcaae(_0x30d8d3);},'sOaaH':function(_0x4382a9,_0xc2058,_0x33bf2d){return _0x4382a9(_0xc2058,_0x33bf2d);},'dmWHr':function(_0x35a4cc,_0x327b3c){return _0x35a4cc===_0x327b3c;}},_0x339b84=await resolveProfileTarget(_0x12eaef);if(_0x3ecc8b[_0x3d35c6(0x14d)](_0x339b84['kind'],'cloud')){const _0x3129a7=await _0x3ecc8b[_0x3d35c6(0x144)](loadEffectiveCloudSettings,_0x12eaef),_0x4b6ab9=getNestedValue(_0x3129a7,_0x2b22b9);if(_0x4b6ab9===undefined)console['log'](_0x3d35c6(0x15e));else typeof _0x4b6ab9===_0x3d35c6(0x163)?console['log'](JSON['stringify'](_0x4b6ab9,null,0x2)):console[_0x3d35c6(0x170)](_0x4b6ab9);return;}const _0x270965=await _0x3ecc8b[_0x3d35c6(0x144)](loadSettings,_0x12eaef),_0x1e62b2=_0x3ecc8b[_0x3d35c6(0x146)](getNestedValue,_0x270965,_0x2b22b9);if(_0x3ecc8b['HgUUi'](_0x1e62b2,undefined))console[_0x3d35c6(0x170)](_0x3d35c6(0x15e));else _0x3ecc8b[_0x3d35c6(0x158)](typeof _0x1e62b2,'object')?console['log'](JSON['stringify'](_0x1e62b2,null,0x2)):console[_0x3d35c6(0x170)](_0x1e62b2);}export async function configList(_0x530bb1){const _0x4d2756=_0x1a80b5,_0x41f8e9={'TcNnJ':function(_0x4f3b37,_0x152b28){return _0x4f3b37===_0x152b28;},'qzCLg':_0x4d2756(0x159),'WImyz':function(_0x347d09,_0x8c6e9c){return _0x347d09(_0x8c6e9c);},'DCOnG':function(_0x1c887f,_0x47bf4c){return _0x1c887f(_0x47bf4c);},'NCTdA':function(_0x5f2772,_0x3259dc){return _0x5f2772(_0x3259dc);}},_0x38cc7a=await resolveProfileTarget(_0x530bb1);if(_0x41f8e9['TcNnJ'](_0x38cc7a[_0x4d2756(0x167)],_0x41f8e9['qzCLg'])){const _0x3194a0=await loadEffectiveCloudSettings(_0x530bb1);if(!_0x3194a0||Object[_0x4d2756(0x162)](_0x3194a0)[_0x4d2756(0x148)]===0x0){console[_0x4d2756(0x170)]('No\x20configuration\x20set\x20for\x20\x22'+_0x530bb1+'\x22');return;}console['log'](JSON[_0x4d2756(0x15b)](_0x3194a0,null,0x2));return;}const _0x34cb08=_0x41f8e9[_0x4d2756(0x160)](getSettingsPath,_0x530bb1);if(!_0x41f8e9[_0x4d2756(0x179)](existsSync,_0x34cb08)){console['log'](_0x4d2756(0x14b)+_0x530bb1+'\x22');return;}const _0x51fb9b=await _0x41f8e9['NCTdA'](loadSettings,_0x530bb1),_0x26fc1c=_0x41f8e9['DCOnG'](formatSettings,_0x51fb9b);!_0x26fc1c?console['log']('No\x20configuration\x20set\x20for\x20\x22'+_0x530bb1+'\x22'):console[_0x4d2756(0x170)](_0x26fc1c);}export async function configUnset(_0x59edbd,_0x1a2d2f){const _0x57a503=_0x1a80b5,_0x574e5a={'IpQEt':function(_0x2cd205,_0x4ac3eb){return _0x2cd205(_0x4ac3eb);},'iIjco':function(_0x1bb46c,_0x476351){return _0x1bb46c===_0x476351;},'XEcJR':_0x57a503(0x159),'uCKyV':function(_0x3c6efd,_0x56b137){return _0x3c6efd(_0x56b137);},'FOPqn':function(_0x4e0e38,_0x2d6b81,_0x403182,_0x4d9137){return _0x4e0e38(_0x2d6b81,_0x403182,_0x4d9137);},'rtetH':function(_0x10ce9b){return _0x10ce9b();}},_0x563466=await _0x574e5a['IpQEt'](resolveProfileTarget,_0x59edbd);if(_0x574e5a['iIjco'](_0x563466['kind'],_0x574e5a[_0x57a503(0x157)])){if(_0x563466[_0x57a503(0x177)])_0x574e5a[_0x57a503(0x150)](printDualExistsHint,_0x59edbd);const _0x5b1a61=_0x574e5a['FOPqn'](unsetProfileOverride,_0x574e5a[_0x57a503(0x151)](getProjectPath),_0x59edbd,_0x1a2d2f);_0x5b1a61?console['log'](_0x57a503(0x168)+_0x1a2d2f+'\x20for\x20\x22'+_0x59edbd+'\x22'):console['log'](_0x57a503(0x155)+_0x1a2d2f+_0x57a503(0x16c));return;}const _0x5b8cc7=unsetProfileOverride(getProjectPath(),_0x59edbd,_0x1a2d2f);if(_0x5b8cc7){console['log'](_0x57a503(0x168)+_0x1a2d2f);return;}const _0x3bb738=await loadSettings(_0x59edbd),_0x780f00=deleteNestedValue(_0x3bb738,_0x1a2d2f);_0x780f00?console[_0x57a503(0x170)]('Key\x20\x22'+_0x1a2d2f+_0x57a503(0x142)+_0x59edbd+_0x57a503(0x14f)):console['log'](_0x57a503(0x155)+_0x1a2d2f+_0x57a503(0x16c));}export async function configReset(_0x64a77b){const _0x2dfef4=_0x1a80b5,_0x33e8d6={'zNbUO':function(_0x26ac6e,_0x32fe99){return _0x26ac6e===_0x32fe99;},'aqtGF':function(_0xe47267){return _0xe47267();}},_0x47fd81=await resolveProfileTarget(_0x64a77b);if(_0x33e8d6[_0x2dfef4(0x156)](_0x47fd81[_0x2dfef4(0x167)],'cloud')){resetProfileOverrides(_0x33e8d6['aqtGF'](getProjectPath),_0x64a77b),console[_0x2dfef4(0x170)]('Cleared\x20local\x20overrides\x20for\x20\x22'+_0x64a77b+'\x22');return;}console['log']('\x22'+_0x64a77b+'\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20'+_0x64a77b+'\x20<key>\x22\x20to\x20remove\x20individual\x20values.');}
1
+ const _0x3c181d=_0x4380;(function(_0x21be8f,_0x8e6208){const _0x2d3c3c=_0x4380,_0x13f0c8=_0x21be8f();while(!![]){try{const _0x405f4d=-parseInt(_0x2d3c3c(0x123))/0x1*(-parseInt(_0x2d3c3c(0x131))/0x2)+-parseInt(_0x2d3c3c(0x126))/0x3*(-parseInt(_0x2d3c3c(0x134))/0x4)+parseInt(_0x2d3c3c(0x10d))/0x5*(parseInt(_0x2d3c3c(0x128))/0x6)+parseInt(_0x2d3c3c(0x13e))/0x7*(parseInt(_0x2d3c3c(0x112))/0x8)+parseInt(_0x2d3c3c(0x137))/0x9*(-parseInt(_0x2d3c3c(0x125))/0xa)+-parseInt(_0x2d3c3c(0x12c))/0xb*(parseInt(_0x2d3c3c(0x11d))/0xc)+parseInt(_0x2d3c3c(0x115))/0xd;if(_0x405f4d===_0x8e6208)break;else _0x13f0c8['push'](_0x13f0c8['shift']());}catch(_0x337741){_0x13f0c8['push'](_0x13f0c8['shift']());}}}(_0x2292,0xa8a5c));import{existsSync}from'fs';function _0x4380(_0x5b6b7d,_0x3ae649){_0x5b6b7d=_0x5b6b7d-0x108;const _0x2292ff=_0x2292();let _0x438002=_0x2292ff[_0x5b6b7d];return _0x438002;}function _0x2292(){const _0x3ae79a=['4309081fNBycV','HpQLK','length','object','lXZTL','endsWith','\x20=\x20','isSafeInteger','keys','(not\x20set)','true','10315iBEqHx','VsABa','rlGAH','Cleared\x20local\x20overrides\x20for\x20\x22','OCGrR','16UciedQ','headless','SZLkT','799071XisAOO','CfCQn','\x22\x20not\x20found','forceLogin','OYQew','local','No\x20configuration\x20set\x20for\x20\x22','rcPRQ','283716UbbBqN','parse','false','\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22','cloud',':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22','168731plMACS','\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20','89500YgfKVk','2185221vUaIkY','\x20for\x20\x22','2310cCwhRo','Removed\x20','ngcwC','EggEK','616RwRBCC','\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.','ucJaO','null','stringify','6CZRDUT','gNRaW','keeWv','4MBCxAt','Key\x20\x22','xUjRI','1314iLeDgQ','log','Set\x20','Profile\x20\x22','alsoExistsElsewhere','dBNzG','undefined'];_0x2292=function(){return _0x3ae79a;};return _0x2292();}import{loadSettings,getNestedValue,deleteNestedValue,formatSettings,getSettingsPath,getEnvDir}from'./utils/settings.js';import{fetchCloudProfile}from'./utils/cloudProfile.js';import{mergeCloudProfileSettings,readProfileOverrides,resetProfileOverrides,setProfileOverride,unsetProfileOverride}from'./utils/projectsConfig.js';const BOOLEAN_KEYS=[_0x3c181d(0x113),'allowInsecureLocalhost',_0x3c181d(0x118)];function parseLocalValue(_0x1b81d9,_0x33c9c0){const _0x11ba7d=_0x3c181d,_0x488bee={'VsABa':function(_0x11023c,_0x449fe1){return _0x11023c===_0x449fe1;},'XlEtQ':_0x11ba7d(0x10c),'ucJaO':function(_0xab7f5a,_0x16fe5d){return _0xab7f5a===_0x16fe5d;},'lfhre':_0x11ba7d(0x11f)};if(BOOLEAN_KEYS['includes'](_0x1b81d9)){if(_0x488bee[_0x11ba7d(0x10e)](_0x33c9c0,_0x488bee['XlEtQ']))return!![];if(_0x488bee[_0x11ba7d(0x12e)](_0x33c9c0,_0x488bee['lfhre']))return![];throw new Error('Invalid\x20value\x20for\x20'+_0x1b81d9+_0x11ba7d(0x122));}return _0x33c9c0;}function parseOverrideValue(_0x2d06c0){const _0x4ce4d6=_0x3c181d,_0x14110d={'gNRaW':_0x4ce4d6(0x11f),'ngcwC':function(_0x2dd2b0,_0x455804){return _0x2dd2b0(_0x455804);}};if(_0x2d06c0==='true')return!![];if(_0x2d06c0===_0x14110d[_0x4ce4d6(0x132)])return![];if(_0x2d06c0===_0x4ce4d6(0x12f))return null;if(_0x2d06c0===_0x4ce4d6(0x13d))return undefined;if(/^-?\d+$/['test'](_0x2d06c0)){const _0x5db283=_0x14110d[_0x4ce4d6(0x12a)](Number,_0x2d06c0);if(Number[_0x4ce4d6(0x109)](_0x5db283))return _0x5db283;}if(/^-?\d+\.\d+$/['test'](_0x2d06c0)){const _0xd7a034=Number(_0x2d06c0);if(!Number['isNaN'](_0xd7a034))return _0xd7a034;}const _0x5e4e09=_0x2d06c0['trim']();if(_0x5e4e09['startsWith']('{')&&_0x5e4e09[_0x4ce4d6(0x143)]('}')||_0x5e4e09['startsWith']('[')&&_0x5e4e09['endsWith'](']'))try{return JSON[_0x4ce4d6(0x11e)](_0x5e4e09);}catch{}return _0x2d06c0;}async function resolveProfileTarget(_0x386546){const _0x1720c3=_0x3c181d,_0x57ad08={'rlGAH':function(_0x597987,_0x5f56bf){return _0x597987(_0x5f56bf);}},_0x4cf490=existsSync(_0x57ad08['rlGAH'](getEnvDir,_0x386546));let _0x3dfa48=![];try{const _0x4c1676=await _0x57ad08[_0x1720c3(0x10f)](fetchCloudProfile,_0x386546);_0x3dfa48=_0x57ad08[_0x1720c3(0x10f)](Boolean,_0x4c1676);}catch{}if(_0x3dfa48)return{'kind':_0x1720c3(0x121),'alsoExistsElsewhere':_0x4cf490};if(_0x4cf490)return{'kind':_0x1720c3(0x11a),'alsoExistsElsewhere':![]};throw new Error(_0x1720c3(0x13a)+_0x386546+_0x1720c3(0x124)+_0x386546);}function printDualExistsHint(_0x32a5f5){console['log']('\x20\x20Note:\x20\x22'+_0x32a5f5+'\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.');}function getProjectPath(){return process['cwd']();}async function loadEffectiveCloudSettings(_0x13cea4){const _0x25cf06=_0x3c181d,_0x38977f={'xUjRI':function(_0x54c640,_0x43ab7e){return _0x54c640(_0x43ab7e);},'RStdz':function(_0x150f2f,_0x3918b8,_0x45b9e9){return _0x150f2f(_0x3918b8,_0x45b9e9);}},_0x3ea557=await _0x38977f[_0x25cf06(0x136)](fetchCloudProfile,_0x13cea4),_0x51cf88=_0x38977f['RStdz'](readProfileOverrides,getProjectPath(),_0x13cea4);return mergeCloudProfileSettings(_0x3ea557?.['settings']??{},_0x51cf88??undefined);}export async function configSet(_0x3c3ad3,_0x195afa,_0x2af3d8){const _0x3c7bf2=_0x3c181d,_0x290d35={'lXZTL':function(_0x44836f,_0x2b55ae){return _0x44836f(_0x2b55ae);},'cZXBT':function(_0x515db8){return _0x515db8();},'UEQrQ':function(_0x4729c4,_0x508582,_0x100393,_0x15a965,_0x5a1244){return _0x4729c4(_0x508582,_0x100393,_0x15a965,_0x5a1244);},'kGsOp':function(_0x102fbb){return _0x102fbb();}},_0x28ab5d=await _0x290d35[_0x3c7bf2(0x142)](resolveProfileTarget,_0x3c3ad3);if(_0x28ab5d['kind']==='cloud'){if(_0x28ab5d[_0x3c7bf2(0x13b)])_0x290d35['lXZTL'](printDualExistsHint,_0x3c3ad3);const _0x37113c=parseOverrideValue(_0x2af3d8);setProfileOverride(_0x290d35['cZXBT'](getProjectPath),_0x3c3ad3,_0x195afa,_0x37113c),console['log'](_0x3c7bf2(0x139)+_0x195afa+_0x3c7bf2(0x108)+JSON[_0x3c7bf2(0x130)](_0x37113c)+'\x20for\x20\x22'+_0x3c3ad3+'\x22');return;}const _0x4a7480=parseLocalValue(_0x195afa,_0x2af3d8);_0x290d35['UEQrQ'](setProfileOverride,_0x290d35['kGsOp'](getProjectPath),_0x3c3ad3,_0x195afa,_0x4a7480),console['log']('Set\x20'+_0x195afa+_0x3c7bf2(0x108)+_0x4a7480+_0x3c7bf2(0x127)+_0x3c3ad3+'\x22');}export async function configGet(_0x43a8fd,_0xdcb14f){const _0x515662=_0x3c181d,_0x1991af={'CfCQn':function(_0x282ba9,_0x2ea254){return _0x282ba9(_0x2ea254);},'HpQLK':function(_0x5cae3e,_0x90bf84){return _0x5cae3e===_0x90bf84;},'QbHOd':'cloud','rFkej':function(_0x42f4c4,_0x1d3295){return _0x42f4c4===_0x1d3295;},'tVRrp':function(_0x4c25f4,_0xf0c651,_0x4bbc4a){return _0x4c25f4(_0xf0c651,_0x4bbc4a);}},_0x2396f0=await _0x1991af[_0x515662(0x116)](resolveProfileTarget,_0x43a8fd);if(_0x1991af[_0x515662(0x13f)](_0x2396f0['kind'],_0x1991af['QbHOd'])){const _0x4596a0=await _0x1991af[_0x515662(0x116)](loadEffectiveCloudSettings,_0x43a8fd),_0x5f064b=getNestedValue(_0x4596a0,_0xdcb14f);if(_0x5f064b===undefined)console[_0x515662(0x138)](_0x515662(0x10b));else _0x1991af['rFkej'](typeof _0x5f064b,_0x515662(0x141))?console[_0x515662(0x138)](JSON[_0x515662(0x130)](_0x5f064b,null,0x2)):console[_0x515662(0x138)](_0x5f064b);return;}const _0x1c3ae9=await loadSettings(_0x43a8fd),_0x51685b=_0x1991af['tVRrp'](getNestedValue,_0x1c3ae9,_0xdcb14f);if(_0x51685b===undefined)console['log']('(not\x20set)');else _0x1991af['rFkej'](typeof _0x51685b,'object')?console['log'](JSON['stringify'](_0x51685b,null,0x2)):console['log'](_0x51685b);}export async function configList(_0x21b2d1){const _0x5de5ea=_0x3c181d,_0x2e12de={'DFPFs':'cloud','SZLkT':function(_0x41c56,_0xe2be98){return _0x41c56===_0xe2be98;},'EggEK':function(_0x3e9d12,_0x418195){return _0x3e9d12(_0x418195);},'keeWv':function(_0x2ccc4e,_0x138b26){return _0x2ccc4e(_0x138b26);}},_0x49690f=await resolveProfileTarget(_0x21b2d1);if(_0x49690f['kind']===_0x2e12de['DFPFs']){const _0x297630=await loadEffectiveCloudSettings(_0x21b2d1);if(!_0x297630||_0x2e12de[_0x5de5ea(0x114)](Object[_0x5de5ea(0x10a)](_0x297630)[_0x5de5ea(0x140)],0x0)){console['log'](_0x5de5ea(0x11b)+_0x21b2d1+'\x22');return;}console[_0x5de5ea(0x138)](JSON[_0x5de5ea(0x130)](_0x297630,null,0x2));return;}const _0x34fd20=_0x2e12de[_0x5de5ea(0x12b)](getSettingsPath,_0x21b2d1);if(!_0x2e12de['EggEK'](existsSync,_0x34fd20)){console['log'](_0x5de5ea(0x11b)+_0x21b2d1+'\x22');return;}const _0x104783=await _0x2e12de[_0x5de5ea(0x133)](loadSettings,_0x21b2d1),_0x3a703b=formatSettings(_0x104783);!_0x3a703b?console['log'](_0x5de5ea(0x11b)+_0x21b2d1+'\x22'):console['log'](_0x3a703b);}export async function configUnset(_0x22d192,_0x39e9fb){const _0x573d56=_0x3c181d,_0x48ac88={'OYQew':function(_0x5ca814,_0x3c3ce8){return _0x5ca814===_0x3c3ce8;},'rcPRQ':function(_0x42c074,_0xb097e7){return _0x42c074(_0xb097e7);},'jcsSi':function(_0x51c09b,_0x66f8ff,_0x1db011,_0x469345){return _0x51c09b(_0x66f8ff,_0x1db011,_0x469345);},'CBxbd':function(_0x1b1247){return _0x1b1247();}},_0x2295f3=await resolveProfileTarget(_0x22d192);if(_0x48ac88[_0x573d56(0x119)](_0x2295f3['kind'],_0x573d56(0x121))){if(_0x2295f3[_0x573d56(0x13b)])_0x48ac88[_0x573d56(0x11c)](printDualExistsHint,_0x22d192);const _0x24d6c5=_0x48ac88['jcsSi'](unsetProfileOverride,_0x48ac88['CBxbd'](getProjectPath),_0x22d192,_0x39e9fb);_0x24d6c5?console['log']('Removed\x20'+_0x39e9fb+_0x573d56(0x127)+_0x22d192+'\x22'):console[_0x573d56(0x138)]('Key\x20\x22'+_0x39e9fb+_0x573d56(0x117));return;}const _0x453f72=unsetProfileOverride(getProjectPath(),_0x22d192,_0x39e9fb);if(_0x453f72){console['log'](_0x573d56(0x129)+_0x39e9fb);return;}const _0x2f59f3=await loadSettings(_0x22d192),_0x71be38=deleteNestedValue(_0x2f59f3,_0x39e9fb);_0x71be38?console['log'](_0x573d56(0x135)+_0x39e9fb+_0x573d56(0x120)+_0x22d192+_0x573d56(0x12d)):console[_0x573d56(0x138)]('Key\x20\x22'+_0x39e9fb+'\x22\x20not\x20found');}export async function configReset(_0x1ee669){const _0x3c79a1=_0x3c181d,_0x2eded1={'dBNzG':function(_0x5edbf6,_0x1ec546){return _0x5edbf6===_0x1ec546;},'OCGrR':function(_0x1fbc4e){return _0x1fbc4e();}},_0x1ed8a4=await resolveProfileTarget(_0x1ee669);if(_0x2eded1[_0x3c79a1(0x13c)](_0x1ed8a4['kind'],'cloud')){resetProfileOverrides(_0x2eded1[_0x3c79a1(0x111)](getProjectPath),_0x1ee669),console[_0x3c79a1(0x138)](_0x3c79a1(0x110)+_0x1ee669+'\x22');return;}console[_0x3c79a1(0x138)]('\x22'+_0x1ee669+'\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20'+_0x1ee669+'\x20<key>\x22\x20to\x20remove\x20individual\x20values.');}
@@ -1 +1 @@
1
- (function(_0x508b17,_0x347e20){const _0x51a477=_0x3b95,_0x24d35c=_0x508b17();while(!![]){try{const _0x3546d7=-parseInt(_0x51a477(0x157))/0x1*(-parseInt(_0x51a477(0x165))/0x2)+-parseInt(_0x51a477(0x15c))/0x3*(-parseInt(_0x51a477(0x159))/0x4)+parseInt(_0x51a477(0x164))/0x5+parseInt(_0x51a477(0x15f))/0x6+-parseInt(_0x51a477(0x155))/0x7+-parseInt(_0x51a477(0x15b))/0x8+-parseInt(_0x51a477(0x163))/0x9;if(_0x3546d7===_0x347e20)break;else _0x24d35c['push'](_0x24d35c['shift']());}catch(_0x478f38){_0x24d35c['push'](_0x24d35c['shift']());}}}(_0x5d72,0x4a996));function _0x3b95(_0x49e7df,_0x210af7){_0x49e7df=_0x49e7df-0x154;const _0x5d72c3=_0x5d72();let _0x3b95d2=_0x5d72c3[_0x49e7df];return _0x3b95d2;}import _0x122f1e from'inquirer';function _0x5d72(){const _0x1b14e2=['SXAGW','7297245BXfOVD','1307440kCnkzE','4NePdhX','yes','MQUwL','\x22\x20to\x20confirm\x20deletion:','log','729743EyITcC','Profile\x20deletion\x20requires\x20an\x20interactive\x20terminal\x20so\x20the\x20profile\x20name\x20can\x20be\x20typed\x20for\x20confirmation.\x20Pass\x20--yes\x20to\x20skip\x20confirmation.','213013IYXWuq','prompt','12dfGYhn','\x22\x20for\x20everyone\x20in\x20your\x20organization.','2183896WfDpzj','441930zYfjrL','cwd','FhdTl','2184930oHTByh','\x22\x20not\x20found.','Profile\x20deletion\x20cancelled:\x20confirmation\x20did\x20not\x20match.'];_0x5d72=function(){return _0x1b14e2;};return _0x5d72();}import{deleteCloudProfile,fetchCloudProfile}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';import{clearLastProfile,resetProfileOverrides}from'./utils/projectsConfig.js';export async function deleteProfile(_0x3e1f7d,_0x34dbf4={}){const _0x4d34d6=_0x3b95,_0x330212={'SXAGW':'input','YmxGC':_0x4d34d6(0x161),'FhdTl':function(_0x3d4a7e,_0x2b64df){return _0x3d4a7e(_0x2b64df);},'MQUwL':function(_0x261d4c,_0x98b481,_0x122bc9){return _0x261d4c(_0x98b481,_0x122bc9);}},_0x33ccd2=await fetchCloudProfile(_0x3e1f7d);if(!_0x33ccd2)throw new Error('Cloud\x20profile\x20\x22'+_0x3e1f7d+_0x4d34d6(0x160));if(!_0x34dbf4[_0x4d34d6(0x166)]&&!isInteractive())throw new Error(_0x4d34d6(0x156));console[_0x4d34d6(0x154)]('\x0aWarning:\x20this\x20deletes\x20the\x20shared\x20cloud\x20profile\x20\x22'+_0x3e1f7d+_0x4d34d6(0x15a));if(!_0x34dbf4[_0x4d34d6(0x166)]){const {confirmation:_0x2f18f6}=await _0x122f1e[_0x4d34d6(0x158)]([{'type':_0x330212[_0x4d34d6(0x162)],'name':'confirmation','message':'Type\x20\x22'+_0x3e1f7d+_0x4d34d6(0x168)}]);if(_0x2f18f6!==_0x3e1f7d)throw new Error(_0x330212['YmxGC']);}await _0x330212[_0x4d34d6(0x15e)](deleteCloudProfile,_0x3e1f7d),resetProfileOverrides(process[_0x4d34d6(0x15d)](),_0x3e1f7d),_0x330212[_0x4d34d6(0x167)](clearLastProfile,process[_0x4d34d6(0x15d)](),_0x3e1f7d),console[_0x4d34d6(0x154)]('✓\x20Deleted\x20cloud\x20profile\x20\x22'+_0x3e1f7d+'\x22.');}
1
+ (function(_0x23befc,_0x340981){const _0x8f4fcc=_0x336d,_0x4e74ac=_0x23befc();while(!![]){try{const _0x14c236=-parseInt(_0x8f4fcc(0x135))/0x1*(-parseInt(_0x8f4fcc(0x13c))/0x2)+-parseInt(_0x8f4fcc(0x137))/0x3+parseInt(_0x8f4fcc(0x149))/0x4*(-parseInt(_0x8f4fcc(0x146))/0x5)+parseInt(_0x8f4fcc(0x138))/0x6+parseInt(_0x8f4fcc(0x13b))/0x7+parseInt(_0x8f4fcc(0x142))/0x8+-parseInt(_0x8f4fcc(0x13d))/0x9*(-parseInt(_0x8f4fcc(0x13a))/0xa);if(_0x14c236===_0x340981)break;else _0x4e74ac['push'](_0x4e74ac['shift']());}catch(_0x31690c){_0x4e74ac['push'](_0x4e74ac['shift']());}}}(_0x3510,0xa62ed));import _0x379772 from'inquirer';import{deleteCloudProfile,fetchCloudProfile}from'./utils/cloudProfile.js';function _0x3510(){const _0x2ef4b8=['2016NHhcBf','\x22\x20not\x20found.','TOOpK','CWAdU','confirmation','196696opnvci','log','Type\x20\x22','jIaXg','5sXUQPb','cwd','slayD','5232956epPgqW','Profile\x20deletion\x20cancelled:\x20confirmation\x20did\x20not\x20match.','9WuIcRB','Cloud\x20profile\x20\x22','1026291kPOQkn','3489198EkncEn','input','47720NibOGY','3076724AEjZLS','48098UAcSAG'];_0x3510=function(){return _0x2ef4b8;};return _0x3510();}import{isInteractive}from'./utils/cloudProfileSession.js';import{clearLastProfile,resetProfileOverrides}from'./utils/projectsConfig.js';function _0x336d(_0x6de67f,_0xcec2ae){_0x6de67f=_0x6de67f-0x134;const _0x351028=_0x3510();let _0x336db0=_0x351028[_0x6de67f];return _0x336db0;}export async function deleteProfile(_0xb55d79,_0x35c94a={}){const _0x15320a=_0x336d,_0x4b1fbe={'CWAdU':function(_0x55771a,_0x5edd00){return _0x55771a(_0x5edd00);},'jIaXg':_0x15320a(0x141),'zWKCj':_0x15320a(0x134),'slayD':function(_0x2966e6,_0x35867a){return _0x2966e6(_0x35867a);},'TOOpK':function(_0x49870e,_0x34c8b2,_0x1a99d6){return _0x49870e(_0x34c8b2,_0x1a99d6);}},_0x23a0cf=await _0x4b1fbe[_0x15320a(0x140)](fetchCloudProfile,_0xb55d79);if(!_0x23a0cf)throw new Error(_0x15320a(0x136)+_0xb55d79+_0x15320a(0x13e));if(!_0x35c94a['yes']&&!isInteractive())throw new Error('Profile\x20deletion\x20requires\x20an\x20interactive\x20terminal\x20so\x20the\x20profile\x20name\x20can\x20be\x20typed\x20for\x20confirmation.\x20Pass\x20--yes\x20to\x20skip\x20confirmation.');console[_0x15320a(0x143)]('\x0aWarning:\x20this\x20deletes\x20the\x20shared\x20cloud\x20profile\x20\x22'+_0xb55d79+'\x22\x20for\x20everyone\x20in\x20your\x20organization.');if(!_0x35c94a['yes']){const {confirmation:_0x2a97aa}=await _0x379772['prompt']([{'type':_0x15320a(0x139),'name':_0x4b1fbe[_0x15320a(0x145)],'message':_0x15320a(0x144)+_0xb55d79+'\x22\x20to\x20confirm\x20deletion:'}]);if(_0x2a97aa!==_0xb55d79)throw new Error(_0x4b1fbe['zWKCj']);}await _0x4b1fbe[_0x15320a(0x148)](deleteCloudProfile,_0xb55d79),resetProfileOverrides(process[_0x15320a(0x147)](),_0xb55d79),_0x4b1fbe[_0x15320a(0x13f)](clearLastProfile,process[_0x15320a(0x147)](),_0xb55d79),console['log']('✓\x20Deleted\x20cloud\x20profile\x20\x22'+_0xb55d79+'\x22.');}
@@ -1 +1 @@
1
- function _0x3116(){const _0x30ac9a=['localeCompare','baseUrl','VKvOz','\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profile\x20\x22','environmentKey','8Aeykvz','map','cwd','message','8EZVsDB','domains','FeYnf','projectOverrides','log','kVFZi','authConfig','sort','keys','environmentDetails','35438bXDyIr','\x0a*\x20=\x20active\x20profile','\x0aCloud\x20Profiles\x20(by\x20environment):','local','sIuQO','\x0aLocal\x20Profiles\x20(legacy):','LTzHI','5601060wfieMW','\x0aNo\x20profiles\x20found.','isDirectory','QQdSH','startsWith','\x0a\x20\x20','has','5609328QtxzlN','bNyja','4079957BlJlkW','get','push','JumiK','set','sessions','length','error','\x20\x20\x20\x20\x20\x20Details:\x20','reports','settings.json','startPath','sessionUpdatedAt','2756835iqHaAh','\x0aCloud\x20Profiles:','23148950yKCLJA','3xzcUYF','\x22:\x20','Vjvnw','YQMIh','MkMOv','name','settings','801663mGUehX'];_0x3116=function(){return _0x30ac9a;};return _0x3116();}const _0x401db4=_0x2391;(function(_0x5d3436,_0x5380b4){const _0x5d2a25=_0x2391,_0x5a419d=_0x5d3436();while(!![]){try{const _0x2884da=parseInt(_0x5d2a25(0x155))/0x1*(-parseInt(_0x5d2a25(0x170))/0x2)+-parseInt(_0x5d2a25(0x15c))/0x3*(parseInt(_0x5d2a25(0x162))/0x4)+-parseInt(_0x5d2a25(0x177))/0x5+-parseInt(_0x5d2a25(0x17e))/0x6+parseInt(_0x5d2a25(0x180))/0x7*(parseInt(_0x5d2a25(0x166))/0x8)+parseInt(_0x5d2a25(0x152))/0x9+parseInt(_0x5d2a25(0x154))/0xa;if(_0x2884da===_0x5380b4)break;else _0x5a419d['push'](_0x5a419d['shift']());}catch(_0x58f900){_0x5a419d['push'](_0x5a419d['shift']());}}}(_0x3116,0x890d2));import{readdir,stat}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{getRangerDir}from'./utils/rangerRoot.js';import{loadSettings}from'./utils/settings.js';import{readActiveProfileName}from'./utils/activeProfile.js';import{getToken}from'./utils/keychain.js';import{fetchAuthConfig,fetchCloudProfile,listCloudProfiles}from'./utils/cloudProfile.js';import{resolveAuthEnvironmentLocally}from'./utils/cloudProfileSession.js';import{readProfileOverrides}from'./utils/projectsConfig.js';import{resolveProfileUrl}from'./utils/resolveProfileUrl.js';import{resolveEnvVars}from'./utils/settings.js';function _0x2391(_0x145f42,_0x20feb4){_0x145f42=_0x145f42-0x14b;const _0x3116a1=_0x3116();let _0x23915d=_0x3116a1[_0x145f42];return _0x23915d;}const NON_ENV_DIRS=[_0x401db4(0x185),'bug-bashes',_0x401db4(0x14e),_0x401db4(0x173),'ci'];export function shouldGroupByEnvironment(_0x114f01){const _0x44e3d0=_0x401db4;return _0x114f01['some'](_0x5be55d=>_0x5be55d[_0x44e3d0(0x161)]);}export function groupCloudProfilesByEnvironment(_0x16d287){const _0x150e17=_0x401db4,_0x3a8431={'FmXxK':function(_0x66dcbb,_0x3a882c){return _0x66dcbb===_0x3a882c;}},_0x22e472=new Map();for(const _0x455bc0 of _0x16d287){const _0x16b1da=_0x455bc0[_0x150e17(0x161)]??null,_0x825f07=_0x22e472['get'](_0x16b1da);if(_0x825f07)_0x825f07['push'](_0x455bc0);else _0x22e472[_0x150e17(0x184)](_0x16b1da,[_0x455bc0]);}const _0x48417b=[..._0x22e472[_0x150e17(0x16e)]()]['sort']((_0x141668,_0x26bfca)=>{const _0x55488f=_0x150e17;if(_0x3a8431['FmXxK'](_0x141668,null))return 0x1;if(_0x3a8431['FmXxK'](_0x26bfca,null))return-0x1;return _0x141668[_0x55488f(0x15d)](_0x26bfca);});return _0x48417b[_0x150e17(0x163)](_0x24c604=>({'environmentKey':_0x24c604,'profiles':_0x22e472['get'](_0x24c604)['sort']((_0x156343,_0x2f1e8f)=>_0x156343['name']['localeCompare'](_0x2f1e8f[_0x150e17(0x15a)]))}));}function expandString(_0x374d3f){if(!_0x374d3f)return undefined;return resolveEnvVars(_0x374d3f);}function expandProfileOverrides(_0x1d3e4a){const _0x4e25f5=_0x401db4,_0x2713de={'gNzrZ':function(_0x393916,_0xb89282){return _0x393916(_0xb89282);}};if(!_0x1d3e4a)return null;return{..._0x1d3e4a,'baseUrl':_0x2713de['gNzrZ'](expandString,_0x1d3e4a[_0x4e25f5(0x15e)]),'startPath':expandString(_0x1d3e4a[_0x4e25f5(0x150)])};}export function resolveCloudProfileListUrl(_0x5c7ece,_0x4117c8={}){const _0x5d49e0=_0x401db4,_0x44d7f9=_0x5c7ece[_0x5d49e0(0x15b)]??{},_0x2e3e54=_0x4117c8[_0x5d49e0(0x16c)]?resolveAuthEnvironmentLocally(_0x4117c8['authConfig'],_0x5c7ece[_0x5d49e0(0x161)]):null,_0x130194=resolveProfileUrl({'projectOverrides':expandProfileOverrides(_0x4117c8[_0x5d49e0(0x169)]??null),'cloudSettings':{'baseUrl':expandString(_0x44d7f9['baseUrl']),'startPath':expandString(_0x44d7f9[_0x5d49e0(0x150)])},'authEnvironmentDomain':_0x2e3e54?.[_0x5d49e0(0x167)]?.[0x0]});return{'baseUrl':_0x130194['baseUrl'],'source':_0x130194['baseUrlSource']};}async function loadCloudProfileListUrls(_0x5f5a1e){const _0x189a3c=_0x401db4,_0x4c5287={'QQdSH':function(_0x2b38fc,_0x41e6ce){return _0x2b38fc(_0x41e6ce);},'gXHqB':function(_0x35e51c){return _0x35e51c();}},_0x1bfcac=new Map();if(_0x5f5a1e[_0x189a3c(0x14b)]===0x0)return _0x1bfcac;const _0x2ae223=await _0x4c5287['gXHqB'](fetchAuthConfig);return await Promise['all'](_0x5f5a1e['map'](async _0x391c1b=>{const _0x28be5c=_0x189a3c;try{const _0xb0ceb3=await _0x4c5287[_0x28be5c(0x17a)](fetchCloudProfile,_0x391c1b['name']);if(!_0xb0ceb3)return;_0x1bfcac['set'](_0x391c1b[_0x28be5c(0x15a)],resolveCloudProfileListUrl(_0xb0ceb3,{'authConfig':_0x2ae223,'projectOverrides':readProfileOverrides(process[_0x28be5c(0x164)](),_0x391c1b['name'])}));}catch(_0x49bdcf){console[_0x28be5c(0x14c)](_0x28be5c(0x160)+_0x391c1b['name']+_0x28be5c(0x156)+(_0x49bdcf instanceof Error?_0x49bdcf[_0x28be5c(0x165)]:String(_0x49bdcf)));}})),_0x1bfcac;}export async function getEnvNames(){const _0x2cd166=_0x401db4,_0x4fe22c={'MkMOv':function(_0x55d378,_0x446058){return _0x55d378(_0x446058);},'oIrPV':function(_0x3f6a70,_0x42c562,_0x53ef42){return _0x3f6a70(_0x42c562,_0x53ef42);},'fLXPf':_0x2cd166(0x173),'VKvOz':function(_0x887f66,_0x2a7958){return _0x887f66(_0x2a7958);},'Xdenr':function(_0x558749,_0x46029d){return _0x558749(_0x46029d);},'OlBGX':_0x2cd166(0x14f)},_0x219430=getRangerDir();if(!_0x4fe22c['MkMOv'](existsSync,_0x219430))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x4f231c=await readActiveProfileName(),_0x2ef288=[],_0xb4985e={},_0x57bf20=_0x4fe22c['oIrPV'](join,_0x219430,_0x4fe22c['fLXPf']);if(existsSync(_0x57bf20)){const _0x38442d=await _0x4fe22c[_0x2cd166(0x159)](readdir,_0x57bf20);for(const _0x2e7100 of _0x38442d){const _0x112c12=join(_0x57bf20,_0x2e7100),_0x2a056c=await _0x4fe22c[_0x2cd166(0x159)](stat,_0x112c12);_0x2a056c['isDirectory']()&&(_0x2ef288[_0x2cd166(0x182)](_0x2e7100),_0xb4985e[_0x2e7100]=_0x2cd166(0x173));}}const _0x3b2a6e=join(_0x219430,'ci');if(_0x4fe22c['MkMOv'](existsSync,_0x3b2a6e)){const _0x38c5eb=await readdir(_0x3b2a6e);for(const _0x1a6563 of _0x38c5eb){const _0x252a16=join(_0x3b2a6e,_0x1a6563),_0x8a91ad=await stat(_0x252a16);_0x8a91ad['isDirectory']()&&(_0x2ef288[_0x2cd166(0x182)](_0x1a6563),_0xb4985e[_0x1a6563]='ci');}}const _0x51b80a=await readdir(_0x219430);for(const _0x5c1692 of _0x51b80a){if(NON_ENV_DIRS['includes'](_0x5c1692))continue;if(_0x5c1692[_0x2cd166(0x17b)]('.'))continue;if(_0x5c1692['endsWith']('.txt'))continue;const _0x1a938b=join(_0x219430,_0x5c1692),_0x7d9e03=await _0x4fe22c[_0x2cd166(0x15f)](stat,_0x1a938b);_0x7d9e03[_0x2cd166(0x179)]()&&_0x4fe22c['Xdenr'](existsSync,join(_0x1a938b,_0x4fe22c['OlBGX']))&&(!_0x2ef288['includes'](_0x5c1692)&&(_0x2ef288['push'](_0x5c1692),_0xb4985e[_0x5c1692]='legacy'));}return{'envNames':_0x2ef288,'activeEnv':_0x4f231c,'envTypes':_0xb4985e};}export async function envList(){const _0x41a8fa=_0x401db4,_0x5e0b46={'kVFZi':'no\x20session','sIuQO':function(_0x226f26){return _0x226f26();},'bNyja':function(_0x33cd5f,_0x5210bb){return _0x33cd5f(_0x5210bb);},'IAESa':function(_0x20e5ba,_0x3b1123){return _0x20e5ba instanceof _0x3b1123;},'JumiK':function(_0x4a78eb,_0x5d67b0){return _0x4a78eb===_0x5d67b0;},'mpvUQ':_0x41a8fa(0x178),'FeYnf':'Run:\x20ranger\x20profile\x20add\x20<profile-name>','LTzHI':function(_0x2ba663,_0x35b2d6){return _0x2ba663(_0x35b2d6);},'ivqHf':function(_0x45a89d,_0x57a330,_0x500fc2){return _0x45a89d(_0x57a330,_0x500fc2);},'EYNkF':'legacy','ZFskw':_0x41a8fa(0x172),'YQMIh':'(no\x20environment\x20—\x20manual\x20or\x20no\x20auth)','Vjvnw':'\x20\x20\x20\x20'},{envNames:_0x521824,activeEnv:_0x4f8d1d,envTypes:_0x5be35a}=await _0x5e0b46['sIuQO'](getEnvNames);let _0x2ea6cd=[],_0x5d7a86=new Map();const _0xd9488c=await getToken();if(_0xd9488c)try{_0x2ea6cd=await _0x5e0b46[_0x41a8fa(0x174)](listCloudProfiles),_0x5d7a86=await _0x5e0b46[_0x41a8fa(0x17f)](loadCloudProfileListUrls,_0x2ea6cd);}catch(_0x2aa46a){console['error']('\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profiles:\x20'+(_0x5e0b46['IAESa'](_0x2aa46a,Error)?_0x2aa46a['message']:String(_0x2aa46a)));}if(_0x5e0b46[_0x41a8fa(0x183)](_0x521824[_0x41a8fa(0x14b)],0x0)&&_0x2ea6cd[_0x41a8fa(0x14b)]===0x0){console['log'](_0x5e0b46['mpvUQ']),console['log'](_0x5e0b46[_0x41a8fa(0x168)]);return;}const _0x27108b=new Set(_0x2ea6cd[_0x41a8fa(0x163)](_0x16aebd=>_0x16aebd[_0x41a8fa(0x15a)]));if(_0x521824['length']>0x0){console['log'](_0x41a8fa(0x175));for(const _0x7cc26e of _0x521824['sort']()){const _0x5f1c66=_0x5e0b46[_0x41a8fa(0x183)](_0x7cc26e,_0x4f8d1d)&&!_0x27108b[_0x41a8fa(0x17d)](_0x7cc26e),_0x587bd2=_0x5be35a[_0x7cc26e]||'local',_0x334cd8=await _0x5e0b46['bNyja'](loadSettings,_0x7cc26e),_0x5cd28f=resolveProfileUrl({'localSettingsBaseUrl':expandString(_0x334cd8['baseUrl']),'projectOverrides':_0x5e0b46[_0x41a8fa(0x176)](expandProfileOverrides,_0x5e0b46['ivqHf'](readProfileOverrides,process[_0x41a8fa(0x164)](),_0x7cc26e))}),_0x5b4be4=_0x587bd2===_0x5e0b46['EYNkF']?'':'\x20['+_0x587bd2+']';console[_0x41a8fa(0x16a)]('\x20\x20'+(_0x5f1c66?'*\x20':'\x20\x20')+_0x7cc26e+_0x5b4be4),_0x5cd28f[_0x41a8fa(0x15e)]&&console['log']('\x20\x20\x20\x20\x20\x20URL:\x20'+_0x5cd28f['baseUrl']),_0x334cd8['environmentDetails']&&console[_0x41a8fa(0x16a)](_0x41a8fa(0x14d)+_0x334cd8[_0x41a8fa(0x16f)]);}}const _0x5fc114=(_0x25d5e0,_0x398c48)=>{const _0x5253af=_0x41a8fa,_0x39a8cc=_0x25d5e0[_0x5253af(0x15a)]===_0x4f8d1d,_0x22226a=_0x25d5e0['sessionUpdatedAt']?'cached\x20(updated\x20'+_0x25d5e0[_0x5253af(0x151)]+')':_0x5e0b46[_0x5253af(0x16b)],_0xc4b78b=_0x5d7a86[_0x5253af(0x181)](_0x25d5e0['name']);console[_0x5253af(0x16a)](''+_0x398c48+(_0x39a8cc?'*\x20':'\x20\x20')+_0x25d5e0['name']),_0xc4b78b?.[_0x5253af(0x15e)]&&console[_0x5253af(0x16a)](_0x398c48+'\x20\x20\x20\x20URL:\x20'+_0xc4b78b['baseUrl']),console['log'](_0x398c48+'\x20\x20\x20\x20Session:\x20'+_0x22226a);};if(_0x2ea6cd['length']>0x0){if(shouldGroupByEnvironment(_0x2ea6cd)){console[_0x41a8fa(0x16a)](_0x5e0b46['ZFskw']);for(const _0x503e66 of groupCloudProfilesByEnvironment(_0x2ea6cd)){const _0x115022=_0x503e66[_0x41a8fa(0x161)]??_0x5e0b46[_0x41a8fa(0x158)];console['log'](_0x41a8fa(0x17c)+_0x115022);for(const _0xdc272e of _0x503e66['profiles']){_0x5fc114(_0xdc272e,_0x5e0b46[_0x41a8fa(0x157)]);}}}else{console[_0x41a8fa(0x16a)](_0x41a8fa(0x153));for(const _0x28e8cc of[..._0x2ea6cd][_0x41a8fa(0x16d)]((_0x469c55,_0x46ff51)=>_0x469c55[_0x41a8fa(0x15a)][_0x41a8fa(0x15d)](_0x46ff51['name']))){_0x5fc114(_0x28e8cc,'\x20\x20');}}}_0x4f8d1d&&console[_0x41a8fa(0x16a)](_0x41a8fa(0x171));}
1
+ const _0x1c82e0=_0x433d;(function(_0x5e5fa0,_0x218f45){const _0x550373=_0x433d,_0x55712b=_0x5e5fa0();while(!![]){try{const _0x38acd5=parseInt(_0x550373(0x1de))/0x1*(-parseInt(_0x550373(0x1d1))/0x2)+-parseInt(_0x550373(0x200))/0x3+-parseInt(_0x550373(0x1db))/0x4*(-parseInt(_0x550373(0x1fa))/0x5)+-parseInt(_0x550373(0x1f0))/0x6+parseInt(_0x550373(0x1dc))/0x7+-parseInt(_0x550373(0x1df))/0x8+-parseInt(_0x550373(0x1da))/0x9*(-parseInt(_0x550373(0x1cd))/0xa);if(_0x38acd5===_0x218f45)break;else _0x55712b['push'](_0x55712b['shift']());}catch(_0x35b80d){_0x55712b['push'](_0x55712b['shift']());}}}(_0x26a3,0x645f3));function _0x26a3(){const _0x4d7e5e=['gGaeB','OilrZ','224710yaVUYm','name','nThbz','sessionUpdatedAt','419638UFOpWV','\x0a*\x20=\x20active\x20profile','environmentKey','\x20\x20\x20\x20Session:\x20','ZtOHY','VaiED','some','\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profiles:\x20','rNeIr','531DRoYeA','2220KZxgiG','578263aeLLkG','BOznV','1LKAIpp','5386136jxVUxv','map','ZCjiy','wFJkY','environmentDetails','includes','NrRtL','\x22:\x20','cwd','error','.txt','legacy','log','settings.json','AHMUp','cached\x20(updated\x20','GUxLB','802548LCCNOd','wiAoc','all','bug-bashes','\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profile\x20\x22','baseUrl','KqISv','upBrJ','oImlf','set','2515rntrfj','MrBpG','local','HsIyG','CBuqa','no\x20session','778788EUrJxo','localeCompare','sort','\x20\x20\x20\x20','SRUoC','profiles','get','startsWith','startPath','isDirectory','length','SYrSE','PdnpV'];_0x26a3=function(){return _0x4d7e5e;};return _0x26a3();}import{readdir,stat}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{getRangerDir}from'./utils/rangerRoot.js';import{loadSettings}from'./utils/settings.js';import{readActiveProfileName}from'./utils/activeProfile.js';import{getToken}from'./utils/keychain.js';import{fetchAuthConfig,fetchCloudProfile,listCloudProfiles}from'./utils/cloudProfile.js';import{resolveAuthEnvironmentLocally}from'./utils/cloudProfileSession.js';import{readProfileOverrides}from'./utils/projectsConfig.js';function _0x433d(_0x8d8b26,_0x369c26){_0x8d8b26=_0x8d8b26-0x1c5;const _0x26a3ee=_0x26a3();let _0x433d1b=_0x26a3ee[_0x8d8b26];return _0x433d1b;}import{resolveProfileUrl}from'./utils/resolveProfileUrl.js';import{resolveEnvVars}from'./utils/settings.js';const NON_ENV_DIRS=['sessions',_0x1c82e0(0x1f3),'reports','local','ci'];export function shouldGroupByEnvironment(_0x112338){const _0x24fc99=_0x1c82e0;return _0x112338[_0x24fc99(0x1d7)](_0x255ccb=>_0x255ccb['environmentKey']);}export function groupCloudProfilesByEnvironment(_0x3d051b){const _0x2c8cf8=_0x1c82e0,_0xaf20bb={'nThbz':function(_0x91e906,_0x21f0dd){return _0x91e906===_0x21f0dd;}},_0x3566d7=new Map();for(const _0x35f433 of _0x3d051b){const _0x14c7df=_0x35f433[_0x2c8cf8(0x1d3)]??null,_0x1e8361=_0x3566d7['get'](_0x14c7df);if(_0x1e8361)_0x1e8361['push'](_0x35f433);else _0x3566d7[_0x2c8cf8(0x1f9)](_0x14c7df,[_0x35f433]);}const _0x16af68=[..._0x3566d7['keys']()][_0x2c8cf8(0x202)]((_0x527941,_0x59756e)=>{const _0x51c8c6=_0x2c8cf8;if(_0xaf20bb[_0x51c8c6(0x1cf)](_0x527941,null))return 0x1;if(_0xaf20bb[_0x51c8c6(0x1cf)](_0x59756e,null))return-0x1;return _0x527941[_0x51c8c6(0x201)](_0x59756e);});return _0x16af68['map'](_0x462913=>({'environmentKey':_0x462913,'profiles':_0x3566d7[_0x2c8cf8(0x206)](_0x462913)[_0x2c8cf8(0x202)]((_0x488a86,_0x372340)=>_0x488a86[_0x2c8cf8(0x1ce)][_0x2c8cf8(0x201)](_0x372340['name']))}));}function expandString(_0x43c97b){const _0x1afb7c=_0x1c82e0,_0xeabe27={'ZCjiy':function(_0x501bd4,_0x1efdc9){return _0x501bd4(_0x1efdc9);}};if(!_0x43c97b)return undefined;return _0xeabe27[_0x1afb7c(0x1e1)](resolveEnvVars,_0x43c97b);}function expandProfileOverrides(_0x1db8f0){const _0x3c9f4c=_0x1c82e0,_0x1b0c84={'zIZzw':function(_0x40eff2,_0x2efc7f){return _0x40eff2(_0x2efc7f);},'CBuqa':function(_0x18437f,_0x1a071a){return _0x18437f(_0x1a071a);}};if(!_0x1db8f0)return null;return{..._0x1db8f0,'baseUrl':_0x1b0c84['zIZzw'](expandString,_0x1db8f0['baseUrl']),'startPath':_0x1b0c84[_0x3c9f4c(0x1fe)](expandString,_0x1db8f0['startPath'])};}export function resolveCloudProfileListUrl(_0xaac321,_0x2678ae={}){const _0x55eb80=_0x1c82e0,_0x49af05={'tBeXu':function(_0x27a1df,_0x3edd40,_0x6b9549){return _0x27a1df(_0x3edd40,_0x6b9549);},'MrBpG':function(_0x2de2b7,_0x1c2378){return _0x2de2b7(_0x1c2378);},'gHjge':function(_0x559321,_0x2806df){return _0x559321(_0x2806df);},'uAlgf':function(_0x45de9e,_0x3fd086){return _0x45de9e(_0x3fd086);},'RKcxO':function(_0x43add6,_0x1f8dbd){return _0x43add6(_0x1f8dbd);}},_0x551b69=_0xaac321['settings']??{},_0x3a66a9=_0x2678ae['authConfig']?_0x49af05['tBeXu'](resolveAuthEnvironmentLocally,_0x2678ae['authConfig'],_0xaac321[_0x55eb80(0x1d3)]):null,_0x5bba34=_0x49af05[_0x55eb80(0x1fb)](resolveProfileUrl,{'projectOverrides':_0x49af05['gHjge'](expandProfileOverrides,_0x2678ae['projectOverrides']??null),'cloudSettings':{'baseUrl':_0x49af05['uAlgf'](expandString,_0x551b69[_0x55eb80(0x1f5)]),'startPath':_0x49af05['RKcxO'](expandString,_0x551b69[_0x55eb80(0x1c6)])},'authEnvironmentDomain':_0x3a66a9?.['domains']?.[0x0]});return{'baseUrl':_0x5bba34['baseUrl'],'source':_0x5bba34['baseUrlSource']};}async function loadCloudProfileListUrls(_0x534f91){const _0x2ba6f9=_0x1c82e0,_0x36e39f={'wFJkY':function(_0x22a842,_0x4bc30a){return _0x22a842(_0x4bc30a);},'SRUoC':function(_0x29c7ad,_0x8ef68e,_0x4019f2){return _0x29c7ad(_0x8ef68e,_0x4019f2);},'rNeIr':function(_0x4308fa,_0x2e138e){return _0x4308fa instanceof _0x2e138e;}},_0x4e0a71=new Map();if(_0x534f91[_0x2ba6f9(0x1c8)]===0x0)return _0x4e0a71;const _0xb9bd20=await fetchAuthConfig();return await Promise[_0x2ba6f9(0x1f2)](_0x534f91['map'](async _0x14568c=>{const _0x59d051=_0x2ba6f9;try{const _0x2bc419=await _0x36e39f[_0x59d051(0x1e2)](fetchCloudProfile,_0x14568c['name']);if(!_0x2bc419)return;_0x4e0a71[_0x59d051(0x1f9)](_0x14568c[_0x59d051(0x1ce)],resolveCloudProfileListUrl(_0x2bc419,{'authConfig':_0xb9bd20,'projectOverrides':_0x36e39f[_0x59d051(0x204)](readProfileOverrides,process['cwd'](),_0x14568c[_0x59d051(0x1ce)])}));}catch(_0x202a7a){console[_0x59d051(0x1e8)](_0x59d051(0x1f4)+_0x14568c['name']+_0x59d051(0x1e6)+(_0x36e39f[_0x59d051(0x1d9)](_0x202a7a,Error)?_0x202a7a['message']:_0x36e39f[_0x59d051(0x1e2)](String,_0x202a7a)));}})),_0x4e0a71;}export async function getEnvNames(){const _0x289920=_0x1c82e0,_0x4bdbfe={'HsIyG':function(_0x5d7344){return _0x5d7344();},'ZtOHY':function(_0x253cae,_0x4d7e24){return _0x253cae(_0x4d7e24);},'AHMUp':function(_0x4a724c,_0xc98f92,_0x241b3b){return _0x4a724c(_0xc98f92,_0x241b3b);},'TlGnP':function(_0x5d0b66,_0x270af8,_0x26f6fc){return _0x5d0b66(_0x270af8,_0x26f6fc);},'PdnpV':function(_0x50d2f9,_0x1838be){return _0x50d2f9(_0x1838be);},'GUxLB':function(_0x42d539,_0x2abd2f){return _0x42d539(_0x2abd2f);},'BOznV':function(_0x7483b0,_0xd3a467,_0x5c711d){return _0x7483b0(_0xd3a467,_0x5c711d);},'wiAoc':function(_0x27c6e2,_0x407f97,_0x486c07){return _0x27c6e2(_0x407f97,_0x486c07);}},_0x640595=_0x4bdbfe[_0x289920(0x1fd)](getRangerDir);if(!_0x4bdbfe[_0x289920(0x1d5)](existsSync,_0x640595))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x3fe745=await readActiveProfileName(),_0x2a4284=[],_0xb8704e={},_0x1d2495=_0x4bdbfe[_0x289920(0x1ed)](join,_0x640595,_0x289920(0x1fc));if(_0x4bdbfe[_0x289920(0x1d5)](existsSync,_0x1d2495)){const _0x1bc827=await readdir(_0x1d2495);for(const _0x46b9cb of _0x1bc827){const _0x3e1495=_0x4bdbfe['TlGnP'](join,_0x1d2495,_0x46b9cb),_0x5d7969=await stat(_0x3e1495);_0x5d7969[_0x289920(0x1c7)]()&&(_0x2a4284['push'](_0x46b9cb),_0xb8704e[_0x46b9cb]='local');}}const _0x520b14=join(_0x640595,'ci');if(_0x4bdbfe[_0x289920(0x1ca)](existsSync,_0x520b14)){const _0x150cc2=await _0x4bdbfe[_0x289920(0x1ef)](readdir,_0x520b14);for(const _0x467362 of _0x150cc2){const _0x86a75d=_0x4bdbfe[_0x289920(0x1dd)](join,_0x520b14,_0x467362),_0x3a3a0e=await stat(_0x86a75d);_0x3a3a0e[_0x289920(0x1c7)]()&&(_0x2a4284['push'](_0x467362),_0xb8704e[_0x467362]='ci');}}const _0x341a5=await _0x4bdbfe[_0x289920(0x1ca)](readdir,_0x640595);for(const _0x1b348d of _0x341a5){if(NON_ENV_DIRS[_0x289920(0x1e4)](_0x1b348d))continue;if(_0x1b348d[_0x289920(0x1c5)]('.'))continue;if(_0x1b348d['endsWith'](_0x289920(0x1e9)))continue;const _0x759fff=_0x4bdbfe[_0x289920(0x1f1)](join,_0x640595,_0x1b348d),_0x2ac7ea=await stat(_0x759fff);_0x2ac7ea['isDirectory']()&&_0x4bdbfe['ZtOHY'](existsSync,_0x4bdbfe[_0x289920(0x1dd)](join,_0x759fff,_0x289920(0x1ec)))&&(!_0x2a4284['includes'](_0x1b348d)&&(_0x2a4284['push'](_0x1b348d),_0xb8704e[_0x1b348d]=_0x289920(0x1ea)));}return{'envNames':_0x2a4284,'activeEnv':_0x3fe745,'envTypes':_0xb8704e};}export async function envList(){const _0x523270=_0x1c82e0,_0x247d92={'KqISv':_0x523270(0x1ff),'cuDqo':function(_0x5c8d2a){return _0x5c8d2a();},'VaiED':function(_0x44a19b){return _0x44a19b();},'HnxyU':function(_0x2073db,_0x1f1ca4){return _0x2073db(_0x1f1ca4);},'uWVoB':function(_0x3378bf,_0x1541b8){return _0x3378bf===_0x1541b8;},'upBrJ':function(_0x350010,_0x2238c8){return _0x350010===_0x2238c8;},'NrRtL':'\x0aNo\x20profiles\x20found.','gGaeB':'\x0aLocal\x20Profiles\x20(legacy):','EhRkq':function(_0x1c3daf,_0x3a0779){return _0x1c3daf(_0x3a0779);},'hqzoQ':function(_0x580306,_0x4cff25){return _0x580306(_0x4cff25);},'pHPzW':function(_0x1f5703,_0x122239,_0x283c0f){return _0x1f5703(_0x122239,_0x283c0f);},'OilrZ':'\x0aCloud\x20Profiles\x20(by\x20environment):','oImlf':'(no\x20environment\x20—\x20manual\x20or\x20no\x20auth)','SYrSE':_0x523270(0x203),'TFmQY':'\x0aCloud\x20Profiles:'},{envNames:_0x43561e,activeEnv:_0x133d68,envTypes:_0x2ab0ef}=await _0x247d92['cuDqo'](getEnvNames);let _0x2b8e43=[],_0x58d1a9=new Map();const _0x59f570=await _0x247d92[_0x523270(0x1d6)](getToken);if(_0x59f570)try{_0x2b8e43=await _0x247d92['cuDqo'](listCloudProfiles),_0x58d1a9=await _0x247d92['HnxyU'](loadCloudProfileListUrls,_0x2b8e43);}catch(_0x416d82){console['error'](_0x523270(0x1d8)+(_0x416d82 instanceof Error?_0x416d82['message']:String(_0x416d82)));}if(_0x247d92['uWVoB'](_0x43561e['length'],0x0)&&_0x247d92[_0x523270(0x1f7)](_0x2b8e43[_0x523270(0x1c8)],0x0)){console[_0x523270(0x1eb)](_0x247d92[_0x523270(0x1e5)]),console['log']('Run:\x20ranger\x20profile\x20add\x20<profile-name>');return;}const _0x402690=new Set(_0x2b8e43[_0x523270(0x1e0)](_0x45172c=>_0x45172c[_0x523270(0x1ce)]));if(_0x43561e['length']>0x0){console[_0x523270(0x1eb)](_0x247d92[_0x523270(0x1cb)]);for(const _0x3117fe of _0x43561e['sort']()){const _0x212100=_0x3117fe===_0x133d68&&!_0x402690['has'](_0x3117fe),_0x3bcfcc=_0x2ab0ef[_0x3117fe]||_0x523270(0x1fc),_0x3acda7=await loadSettings(_0x3117fe),_0x44fddc=_0x247d92['EhRkq'](resolveProfileUrl,{'localSettingsBaseUrl':_0x247d92['hqzoQ'](expandString,_0x3acda7[_0x523270(0x1f5)]),'projectOverrides':expandProfileOverrides(_0x247d92['pHPzW'](readProfileOverrides,process[_0x523270(0x1e7)](),_0x3117fe))}),_0x5a0eaf=_0x247d92[_0x523270(0x1f7)](_0x3bcfcc,_0x523270(0x1ea))?'':'\x20['+_0x3bcfcc+']';console['log']('\x20\x20'+(_0x212100?'*\x20':'\x20\x20')+_0x3117fe+_0x5a0eaf),_0x44fddc['baseUrl']&&console[_0x523270(0x1eb)]('\x20\x20\x20\x20\x20\x20URL:\x20'+_0x44fddc[_0x523270(0x1f5)]),_0x3acda7['environmentDetails']&&console[_0x523270(0x1eb)]('\x20\x20\x20\x20\x20\x20Details:\x20'+_0x3acda7[_0x523270(0x1e3)]);}}const _0x246112=(_0x4bed21,_0x48a7ab)=>{const _0x526615=_0x523270,_0x255653=_0x4bed21[_0x526615(0x1ce)]===_0x133d68,_0x30593e=_0x4bed21[_0x526615(0x1d0)]?_0x526615(0x1ee)+_0x4bed21['sessionUpdatedAt']+')':_0x247d92[_0x526615(0x1f6)],_0x41fb68=_0x58d1a9[_0x526615(0x206)](_0x4bed21[_0x526615(0x1ce)]);console['log'](''+_0x48a7ab+(_0x255653?'*\x20':'\x20\x20')+_0x4bed21[_0x526615(0x1ce)]),_0x41fb68?.[_0x526615(0x1f5)]&&console[_0x526615(0x1eb)](_0x48a7ab+'\x20\x20\x20\x20URL:\x20'+_0x41fb68['baseUrl']),console[_0x526615(0x1eb)](_0x48a7ab+_0x526615(0x1d4)+_0x30593e);};if(_0x2b8e43['length']>0x0){if(shouldGroupByEnvironment(_0x2b8e43)){console['log'](_0x247d92[_0x523270(0x1cc)]);for(const _0x2591d5 of groupCloudProfilesByEnvironment(_0x2b8e43)){const _0x4726d0=_0x2591d5[_0x523270(0x1d3)]??_0x247d92[_0x523270(0x1f8)];console[_0x523270(0x1eb)]('\x0a\x20\x20'+_0x4726d0);for(const _0x34e9d4 of _0x2591d5[_0x523270(0x205)]){_0x246112(_0x34e9d4,_0x247d92[_0x523270(0x1c9)]);}}}else{console[_0x523270(0x1eb)](_0x247d92['TFmQY']);for(const _0x5f55df of[..._0x2b8e43]['sort']((_0x279525,_0x21812d)=>_0x279525['name'][_0x523270(0x201)](_0x21812d[_0x523270(0x1ce)]))){_0x246112(_0x5f55df,'\x20\x20');}}}_0x133d68&&console['log'](_0x523270(0x1d2));}