@ranger-testing/ranger-cli 3.1.6-alpha.cbf7608-55 → 3.1.6-alpha.e1ccb01-57

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/build/cli.js +1 -1
  2. package/build/commands/addEnv.js +1 -1
  3. package/build/commands/authEncrypt.js +1 -1
  4. package/build/commands/clean.js +1 -1
  5. package/build/commands/config.js +1 -1
  6. package/build/commands/deleteProfile.js +1 -1
  7. package/build/commands/env.js +1 -1
  8. package/build/commands/feature.js +1 -1
  9. package/build/commands/hook.js +1 -1
  10. package/build/commands/hooks/autoPrompt.js +1 -1
  11. package/build/commands/hooks/disable.js +1 -1
  12. package/build/commands/hooks/enable.js +1 -1
  13. package/build/commands/hooks/exitPlanMode.js +1 -1
  14. package/build/commands/hooks/index.js +1 -1
  15. package/build/commands/hooks/output.js +1 -1
  16. package/build/commands/hooks/planReminder.js +1 -1
  17. package/build/commands/hooks/planStart.js +1 -1
  18. package/build/commands/hooks/postEdit.js +1 -1
  19. package/build/commands/hooks/preCompact.js +1 -1
  20. package/build/commands/hooks/sessionEnd.js +1 -1
  21. package/build/commands/hooks/sessionStart.js +1 -1
  22. package/build/commands/hooks/stopHook.js +1 -1
  23. package/build/commands/index.js +1 -1
  24. package/build/commands/login.js +1 -1
  25. package/build/commands/mcpBootstrap.js +1 -1
  26. package/build/commands/migrateProfile.js +1 -1
  27. package/build/commands/setup/claude.js +1 -1
  28. package/build/commands/setup/opencode.js +1 -1
  29. package/build/commands/setupCi.js +1 -1
  30. package/build/commands/skillup.js +1 -1
  31. package/build/commands/start.js +1 -1
  32. package/build/commands/status.js +1 -1
  33. package/build/commands/update.js +1 -1
  34. package/build/commands/updateEnv.js +1 -1
  35. package/build/commands/useEnv.js +1 -1
  36. package/build/commands/utils/activeProfile.js +1 -1
  37. package/build/commands/utils/agentEnv.js +1 -1
  38. package/build/commands/utils/browserSessionsApi.js +1 -1
  39. package/build/commands/utils/claudeConfig.js +1 -1
  40. package/build/commands/utils/claudeOverrideSettings.js +1 -1
  41. package/build/commands/utils/claudePlugin.js +1 -1
  42. package/build/commands/utils/cloudProfile.js +1 -1
  43. package/build/commands/utils/cloudProfileSession.js +1 -1
  44. package/build/commands/utils/crypto.js +1 -1
  45. package/build/commands/utils/desirePathLog.js +1 -1
  46. package/build/commands/utils/deviceAuth.js +1 -1
  47. package/build/commands/utils/environment.js +1 -1
  48. package/build/commands/utils/featureApi.js +1 -1
  49. package/build/commands/utils/fixWebmDuration.js +1 -1
  50. package/build/commands/utils/gitTracked.js +1 -1
  51. package/build/commands/utils/keychain.js +1 -1
  52. package/build/commands/utils/legacyWarning.js +1 -1
  53. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  54. package/build/commands/utils/matchAuthEnvironment.js +1 -1
  55. package/build/commands/utils/mcpImageBase64.js +1 -1
  56. package/build/commands/utils/model.js +1 -1
  57. package/build/commands/utils/novaActCli.js +1 -1
  58. package/build/commands/utils/opencodeConfig.js +1 -1
  59. package/build/commands/utils/organizationEnvApi.js +1 -1
  60. package/build/commands/utils/playwrightCli.js +1 -1
  61. package/build/commands/utils/profileMessages.js +1 -1
  62. package/build/commands/utils/profileSetupBanner.js +1 -1
  63. package/build/commands/utils/projectsConfig.js +1 -1
  64. package/build/commands/utils/rangerConfig.js +1 -1
  65. package/build/commands/utils/rangerRoot.js +1 -1
  66. package/build/commands/utils/rangerwrightCli.js +1 -1
  67. package/build/commands/utils/resolveProfileContext.js +1 -1
  68. package/build/commands/utils/resolveProfileUrl.js +1 -1
  69. package/build/commands/utils/retry.js +1 -1
  70. package/build/commands/utils/scenarioOriginCheck.js +1 -1
  71. package/build/commands/utils/sessionCache.js +1 -1
  72. package/build/commands/utils/settings.js +1 -1
  73. package/build/commands/utils/skillContent.js +1 -1
  74. package/build/commands/utils/skills.js +1 -1
  75. package/build/commands/utils/stitchWebmFiles.js +1 -1
  76. package/build/commands/utils/telemetry.js +1 -1
  77. package/build/commands/utils/tokenRefresh.js +1 -1
  78. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  79. package/build/commands/utils/tunnelClient.js +1 -1
  80. package/build/commands/utils/userApi.js +1 -1
  81. package/build/commands/utils/version.js +1 -1
  82. package/build/commands/verifyFeature.js +1 -1
  83. package/build/commands/verifyFeatureCli.js +1 -1
  84. package/build/commands/verifyFeatureNovaCli.js +1 -1
  85. package/build/commands/verifyFeatureRangerwrightCli.js +1 -1
  86. package/package.json +2 -2
@@ -1 +1 @@
1
- const _0x291f8f=_0x3bb8;(function(_0x7a8304,_0x146abc){const _0x2eced4=_0x3bb8,_0x4a0ab6=_0x7a8304();while(!![]){try{const _0x272bbe=-parseInt(_0x2eced4(0x1a0))/0x1+parseInt(_0x2eced4(0x1a9))/0x2+-parseInt(_0x2eced4(0x1ef))/0x3+-parseInt(_0x2eced4(0x208))/0x4+-parseInt(_0x2eced4(0x1c9))/0x5*(-parseInt(_0x2eced4(0x192))/0x6)+-parseInt(_0x2eced4(0x1a8))/0x7*(parseInt(_0x2eced4(0x1cb))/0x8)+parseInt(_0x2eced4(0x1ed))/0x9;if(_0x272bbe===_0x146abc)break;else _0x4a0ab6['push'](_0x4a0ab6['shift']());}catch(_0x5beebb){_0x4a0ab6['push'](_0x4a0ab6['shift']());}}}(_0x1a99,0xe4a06));import{readdir,rm}from'fs/promises';function _0x3bb8(_0x5a7230,_0x634641){_0x5a7230=_0x5a7230-0x188;const _0x1a995b=_0x1a99();let _0x3bb8ed=_0x1a995b[_0x5a7230];return _0x3bb8ed;}function _0x1a99(){const _0x4131a3=['1174016uJGLEf','action','\x20\x20https://docs.ranger.net/main/concepts/profiles','\x0a\x20\x20(domains:\x20','\x20Your\x20org\x20has\x20no\x20auth\x20environments\x20configured.','qiGWi','retry','\x20\x20Did\x20you\x20mean\x20','8967luubRd','338948SYEwXT','\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','dXWvv','--cdp-endpoint\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20a\x20CDP\x20profile\x20connects\x20to\x20an\x20existing\x20browser\x20and\x20has\x20no\x20auth\x20environment.','Enter\x20a\x20different\x20URL','\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20(','--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','Could\x20not\x20reach\x20','\x27\x20to\x20the\x20cloud?','mSFil','\x20Configured\x20envs:\x20','\x20--url\x20','message','\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.','zNYan','\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20','HTTP\x20','tOUIm','\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a','JTFHO','skipAuth','What\x20would\x20you\x20like\x20to\x20do?','Ktfwf','indexOf','TFLvL','yHCXk','length','\x0a\x20\x20Could\x20not\x20reach\x20','for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a','\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.','error','\x22\x20not\x20found.','200630kstqGA','authEnv','5136NglVxE','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','input','name','This\x20account\x20will\x20be\x20shared\x20with\x20everyone\x20at\x20your\x20organization','EyDRp','ncaxP','trackPhaseEnd','env','YLZOl','profile.add.autoRouted','keys','JgsfR','IEPWe','capture','exit','`\x20again\x20without\x20--skip-auth.','rxaGb','rtHVU','qezAn','mhcCj','nZUbF','\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','prompt','unRSo','join','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a','use_suggestion','dYPkL','adLqY','yes','\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20','\x20\x20Set\x20active\x20profile:\x20','xtcyu','39903939eApLai','To\x20set\x20up\x20a\x20profile,\x20run:\x0a','5426247prwHRK','baseUrl','url','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.','Pzaix','\x27\x20matching\x20','confirm','\x27\x20created.\x0a','Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.','log','Jldtd','saveToCloud','Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','eSESg','uOiLC','JfAxO','jdcmk','HEAD','setupHeader','.tmp-','abort','Use\x20','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','no_auth_config','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','6508672jzrIQO','Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','local','includes','fetch\x20failed','http://localhost:3000','.\x20Pass\x20--env\x20<key>\x20to\x20pick\x20one,\x20or\x20use\x20--skip-auth.\x20Configured\x20envs:\x20','profile.add.autoRouteSkipped','cwd','LtMBO','isTTY','cdpEndpoint','Found\x20auth\x20environment\x20\x27','kRzNr','setupHeaders','domains','✓\x20Profile\x20\x27','264vqvmAc','environments','trim','OedeB','NODE_TLS_REJECT_UNAUTHORIZED','\x0a\x20\x20A\x20profile\x20named\x20\x22','What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','slice','continue','✓\x20Cloud\x20profile\x20\x27','cjPXo','ktWIR','\x0a\x20\x20Auth\x20environment\x20\x22','status'];_0x1a99=function(){return _0x4131a3;};return _0x1a99();}import{join}from'path';import{existsSync}from'fs';import _0x474d25 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=_0x291f8f(0x1cf);function warnCloudProfileSharedInOrg(){const _0x1e06f8=_0x291f8f;if(!process['stdout'][_0x1e06f8(0x18b)])return;console['warn'](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x519e35){const _0x3fce2a=_0x291f8f,_0x2dd9a1={'IMCEn':function(_0x1acffb,_0xbe5bd,_0x2f6f1d){return _0x1acffb(_0xbe5bd,_0x2f6f1d);},'dbbtG':'manual','SPgoO':function(_0x2fb95b,_0x26549d,_0x33bc67){return _0x2fb95b(_0x26549d,_0x33bc67);},'McIuO':function(_0x4c213b,_0x192408){return _0x4c213b(_0x192408);},'HnkXC':'Invalid\x20URL','SuHzh':function(_0x56a460,_0x5f08b6){return _0x56a460===_0x5f08b6;},'BdWsi':_0x3fce2a(0x20c)};try{const _0x1d229a=new AbortController(),_0x1d52d1=_0x2dd9a1['IMCEn'](setTimeout,()=>_0x1d229a[_0x3fce2a(0x203)](),0x1388),_0x25be4f={'method':_0x3fce2a(0x200),'signal':_0x1d229a['signal'],'redirect':_0x2dd9a1['dbbtG']};/^https:\/\/localhost(:\d+)?/i['test'](_0x519e35)&&(process[_0x3fce2a(0x1d3)][_0x3fce2a(0x196)]='0');const _0x44c88c=await _0x2dd9a1['SPgoO'](fetch,_0x519e35,_0x25be4f);delete process[_0x3fce2a(0x1d3)][_0x3fce2a(0x196)],_0x2dd9a1['McIuO'](clearTimeout,_0x1d52d1);if(_0x44c88c[_0x3fce2a(0x19f)]<0x190)return{'ok':!![]};return{'ok':![],'error':_0x3fce2a(0x1b9)+_0x44c88c[_0x3fce2a(0x19f)]};}catch(_0x2797b9){delete process[_0x3fce2a(0x1d3)][_0x3fce2a(0x196)];const _0x1ab042=_0x2797b9,_0x309043=_0x1ab042[_0x3fce2a(0x1b5)]||_0x2dd9a1['McIuO'](String,_0x2797b9),_0x282f77=_0x309043['includes'](_0x2dd9a1['HnkXC'])||_0x2dd9a1['SuHzh'](_0x1ab042[_0x3fce2a(0x1ce)],'TypeError')||_0x309043[_0x3fce2a(0x20b)](_0x2dd9a1['BdWsi']);return{'ok':![],'error':_0x309043,'isProtocolError':_0x282f77};}}async function sweepOrphanLocalProfile(_0x33a2fe,_0x22714e,_0x1437f8){const _0x423ea0=_0x291f8f,_0x4fb2cf={'qezAn':function(_0x5cf4cb,_0x590dd1,_0x1fa07e){return _0x5cf4cb(_0x590dd1,_0x1fa07e);},'JfAxO':_0x423ea0(0x20a),'OWXGc':function(_0x12808b,_0x328e50){return _0x12808b(_0x328e50);},'Jldtd':function(_0x192883,_0x186916){return _0x192883(_0x186916);}},_0x41df12=_0x4fb2cf[_0x423ea0(0x1de)](join,_0x22714e,_0x4fb2cf[_0x423ea0(0x1fe)]),_0x5e3826=join(_0x41df12,_0x33a2fe);existsSync(_0x5e3826)&&(_0x1437f8&&await _0x4fb2cf['OWXGc'](isPathGitTracked,_0x5e3826)?console[_0x423ea0(0x1f8)]('\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20'+_0x5e3826+_0x423ea0(0x1c6)):(await _0x4fb2cf[_0x423ea0(0x1de)](rm,_0x5e3826,{'recursive':!![],'force':!![]}),console[_0x423ea0(0x1f8)]('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x5e3826)));if(_0x4fb2cf[_0x423ea0(0x1f9)](existsSync,_0x41df12)){let _0x51e6b6=[];try{_0x51e6b6=await readdir(_0x41df12);}catch{return;}const _0x3172ce=_0x423ea0(0x202)+_0x33a2fe+'-';for(const _0x3c937f of _0x51e6b6){if(!_0x3c937f['startsWith'](_0x3172ce))continue;const _0xeceb41=join(_0x41df12,_0x3c937f);await _0x4fb2cf[_0x423ea0(0x1de)](rm,_0xeceb41,{'recursive':!![],'force':!![]}),console[_0x423ea0(0x1f8)]('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0xeceb41);}}}async function sweepOrphansBestEffort(_0x2614dc){const _0x598e59=_0x291f8f,_0x2e1f21={'jdcmk':function(_0x362808,_0x39c514){return _0x362808 instanceof _0x39c514;}};try{await sweepOrphanLocalProfile(_0x2614dc,getRangerHomeDir(),![]);const _0x2e6804=getRangerDir();_0x2e6804!==getRangerHomeDir()&&await sweepOrphanLocalProfile(_0x2614dc,_0x2e6804,!![]);}catch(_0x3019f9){console[_0x598e59(0x1f8)](_0x598e59(0x1ae)+(_0x2e1f21[_0x598e59(0x1ff)](_0x3019f9,Error)?_0x3019f9[_0x598e59(0x1b5)]:String(_0x3019f9))+').');}}async function markActive(_0x333274){const _0x5da9d2=_0x291f8f,_0x2252d2={'tOUIm':_0x5da9d2(0x1f7)};try{await writeActiveProfileName(_0x333274),console['log'](_0x5da9d2(0x1eb)+_0x333274);}catch{console[_0x5da9d2(0x1f8)](_0x2252d2[_0x5da9d2(0x1ba)]);}}async function tryAutoRouteCloudProfile(_0x34750f,_0x37b928,_0x2bedc0,_0x39164d,_0xf1d95b){const _0x606e68=_0x291f8f,_0xf014d0={'OedeB':function(_0x1eb6bf,_0x4eab68){return _0x1eb6bf===_0x4eab68;},'JgsfR':'profile.add.autoRouteSkipped','TAoHC':function(_0x7881a0,_0x2a5203,_0x2a496f,_0xebd37c,_0x1fc974){return _0x7881a0(_0x2a5203,_0x2a496f,_0xebd37c,_0x1fc974);},'xvqTA':'no_auth_config','eSESg':function(_0x584515,_0x1a4b33){return _0x584515+_0x1a4b33;},'qiGWi':_0x606e68(0x1bb),'zNYan':_0x606e68(0x1e1),'cjPXo':'env_not_found','yHCXk':_0x606e68(0x1a4),'ycDmw':_0x606e68(0x1fa),'EyDRp':_0x606e68(0x1f2),'xtcyu':function(_0x2a07aa,_0x7f93f5,_0x1fcbe2,_0x57ebe2){return _0x2a07aa(_0x7f93f5,_0x1fcbe2,_0x57ebe2);},'kRzNr':function(_0x461437,_0xa8f5ac){return _0x461437 instanceof _0xa8f5ac;},'IEPWe':function(_0x13a57f,_0x318760){return _0x13a57f===_0x318760;},'OahXI':function(_0x2452b2,_0x4caed1){return _0x2452b2+_0x4caed1;},'TCNsq':function(_0x22b50e,_0x4aa9d5){return _0x22b50e(_0x4aa9d5);}};let _0x38c6af;try{_0x38c6af=await fetchAuthConfig();}catch(_0x4713d7){return _0xf1d95b?.[_0x606e68(0x1d2)](_0xf014d0[_0x606e68(0x1d7)],{'reason':_0x606e68(0x206),'profileName':_0x34750f}),console[_0x606e68(0x1c7)]('\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20'+(_0x4713d7 instanceof Error?_0x4713d7[_0x606e68(0x1b5)]:String(_0x4713d7))),![];}if((!_0x38c6af||!_0x38c6af['environments']||Object[_0x606e68(0x1d6)](_0x38c6af['environments'])['length']===0x0)&&!_0x2bedc0['authEnv']){if(_0x39164d)return await _0xf014d0['TAoHC'](captureEnvLessProfile,_0x34750f,_0x37b928,_0x2bedc0,_0xf1d95b);return _0xf1d95b?.['trackPhaseEnd'](_0xf014d0['JgsfR'],{'reason':_0xf014d0['xvqTA'],'profileName':_0x34750f}),console[_0x606e68(0x1c7)](_0xf014d0['eSESg'](_0xf014d0[_0x606e68(0x1fc)]('\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','\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a')+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20'+_0x34750f+_0x606e68(0x1b4)+_0x37b928+'\x20--skip-auth\x0a')+'\x0a'+_0xf014d0[_0x606e68(0x1a5)],_0xf014d0[_0x606e68(0x1b7)])),![];}let _0x2f9ade;if(_0x2bedc0[_0x606e68(0x1ca)]){if(!_0x38c6af?.[_0x606e68(0x193)]?.[_0x2bedc0[_0x606e68(0x1ca)]]){const _0x2d51d7=Object[_0x606e68(0x1d6)](_0x38c6af?.['environments']??{});return _0xf1d95b?.['trackPhaseEnd'](_0xf014d0['JgsfR'],{'reason':_0xf014d0[_0x606e68(0x19c)],'profileName':_0x34750f}),console[_0x606e68(0x1c7)](_0xf014d0['eSESg'](_0x606e68(0x19e)+_0x2bedc0[_0x606e68(0x1ca)]+_0x606e68(0x1c8),_0x2d51d7[_0x606e68(0x1c3)]?_0x606e68(0x1b3)+_0x2d51d7['join'](',\x20')+'.':_0xf014d0[_0x606e68(0x1c2)])),![];}_0x2f9ade=_0x2bedc0['authEnv'];}else _0x2f9ade=matchAuthEnvironment(_0x37b928,_0x38c6af);if(!_0x2f9ade)return _0xf1d95b?.[_0x606e68(0x1d2)](_0xf014d0['JgsfR'],{'reason':'no_match','profileName':_0x34750f}),console['error']('\x0a\x20\x20No\x20auth\x20env\x20matches\x20'+_0x37b928+_0x606e68(0x20e)+Object[_0x606e68(0x1d6)](_0x38c6af?.[_0x606e68(0x193)]??{})[_0x606e68(0x1e4)](',\x20')+'.'),![];const _0x2564dc=_0x38c6af?.[_0x606e68(0x193)]?.[_0x2f9ade],_0x333b89=_0x2564dc?.[_0x606e68(0x190)]??[];if(_0x39164d&&!_0x2bedc0[_0x606e68(0x1e9)]){const {saveToCloud:_0x54d385}=await _0x474d25['prompt']([{'type':'confirm','name':_0xf014d0['ycDmw'],'message':_0x606e68(0x18d)+_0x2f9ade+_0x606e68(0x1f4)+_0x37b928+_0x606e68(0x1a3)+_0x333b89[_0x606e68(0x1e4)](',\x20')+')\x0a\x20\x20Save\x20\x27'+_0x34750f+_0x606e68(0x1b1),'default':!![]}]);if(!_0x54d385)return _0xf1d95b?.['trackPhaseEnd']('profile.add.autoRouteSkipped',{'reason':'user_declined','profileName':_0x34750f}),console[_0x606e68(0x1c7)](_0xf014d0[_0x606e68(0x1d0)]),![];}const _0x1ad065=_0x333b89['some'](_0x1e875b=>{const _0x177b70=_0x606e68;try{return _0xf014d0[_0x177b70(0x195)](new URL(_0x1e875b)['origin'],new URL(_0x37b928)['origin']);}catch{return![];}}),_0x4876be={};!_0x1ad065&&(_0x4876be['baseUrl']=_0x37b928);try{await _0xf014d0[_0x606e68(0x1ec)](createCloudProfile,_0x34750f,_0x2f9ade,{'settings':_0x4876be}),warnCloudProfileSharedInOrg();}catch(_0x78e449){if(_0xf014d0[_0x606e68(0x18e)](_0x78e449,ApiError)&&_0xf014d0[_0x606e68(0x1d8)](_0x78e449[_0x606e68(0x19f)],0x199)){console['error'](_0xf014d0[_0x606e68(0x1fc)](_0x606e68(0x197)+_0x34750f+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x34750f));throw _0x78e449;}throw _0x78e449;}return console['log'](_0xf014d0['OahXI'](_0x606e68(0x191)+_0x34750f+_0x606e68(0x1f6),'\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x34750f)),await _0xf014d0['TCNsq'](sweepOrphansBestEffort,_0x34750f),_0xf1d95b?.['trackPhaseEnd'](_0x606e68(0x1d5),{'envKey':_0x2f9ade,'profileName':_0x34750f}),!![];}async function createUnconfiguredCloudProfile(_0x1c5e96,_0x295cc6){const _0x20a15a=_0x291f8f,_0x155119={'nZUbF':function(_0x57cd55){return _0x57cd55();},'dXWvv':function(_0x3ffc3e,_0x3948eb){return _0x3ffc3e+_0x3948eb;}};try{await createCloudProfile(_0x1c5e96,undefined,{'settings':_0x295cc6}),_0x155119[_0x20a15a(0x1e0)](warnCloudProfileSharedInOrg);}catch(_0x1c1323){_0x1c1323 instanceof ApiError&&_0x1c1323['status']===0x199&&console['error'](_0x155119[_0x20a15a(0x1ab)](_0x20a15a(0x197)+_0x1c5e96+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a',_0x20a15a(0x1cc)+_0x1c5e96));throw _0x1c1323;}}async function captureEnvLessProfile(_0x564c3b,_0x1222af,_0x27b5a7,_0x3518ae){const _0x4e2664=_0x291f8f,_0x3508c5={'rtHVU':_0x4e2664(0x1d9),'afmKq':_0x4e2664(0x209),'ffyZv':_0x4e2664(0x188),'JqXYn':function(_0x47c9e4,_0x1b9294){return _0x47c9e4===_0x1b9294;},'gJmGa':function(_0x399b4f,_0x4db029){return _0x399b4f+_0x4db029;},'iWaGW':function(_0x2cae1a){return _0x2cae1a();},'RtSbV':_0x4e2664(0x1d5)};if(!_0x27b5a7['yes']){const {capture:_0x270634}=await _0x474d25['prompt']([{'type':_0x4e2664(0x1f5),'name':_0x3508c5[_0x4e2664(0x1dd)],'message':_0x3508c5['afmKq'],'default':!![]}]);if(!_0x270634)return _0x3518ae?.[_0x4e2664(0x1d2)](_0x3508c5['ffyZv'],{'reason':'user_declined','profileName':_0x564c3b}),console[_0x4e2664(0x1c7)](_0x4e2664(0x1e5)+'\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.'),![];}const _0x4a5020={};if(_0x27b5a7[_0x4e2664(0x201)])for(const _0x52c14e of _0x27b5a7[_0x4e2664(0x201)]){const _0x3c5593=_0x52c14e[_0x4e2664(0x1c0)](':');if(_0x3508c5['JqXYn'](_0x3c5593,-0x1))continue;_0x4a5020[_0x52c14e[_0x4e2664(0x199)](0x0,_0x3c5593)['trim']()]=_0x52c14e['slice'](_0x3508c5['gJmGa'](_0x3c5593,0x1))[_0x4e2664(0x194)]();}const _0x4d5935={'baseUrl':_0x1222af};Object[_0x4e2664(0x1d6)](_0x4a5020)['length']>0x0&&(_0x4d5935['setupHeaders']=_0x4a5020);let _0x13a056;try{_0x13a056=await createCloudProfile(_0x564c3b,undefined,{'settings':_0x4d5935}),_0x3508c5['iWaGW'](warnCloudProfileSharedInOrg);}catch(_0x13538e){_0x13538e instanceof ApiError&&_0x13538e[_0x4e2664(0x19f)]===0x199&&console['error'](_0x4e2664(0x197)+_0x564c3b+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a'+(_0x4e2664(0x1cc)+_0x564c3b));throw _0x13538e;}return await manualBrowserLogin(_0x13a056,{'key':'','domains':[_0x1222af],'setupHeaders':Object['keys'](_0x4a5020)['length']>0x0?_0x4a5020:undefined}),console[_0x4e2664(0x1f8)]('\x0a✓\x20Profile\x20\x27'+_0x564c3b+'\x27\x20created\x20with\x20a\x20captured\x20session.\x0a'+('\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x564c3b)),await sweepOrphansBestEffort(_0x564c3b),_0x3518ae?.[_0x4e2664(0x1d2)](_0x3508c5['RtSbV'],{'envKey':null,'profileName':_0x564c3b}),!![];}export async function addEnv(_0x1c2670,_0x1118b0={},_0x4a692d){const _0x4e05a9=_0x291f8f,_0x438549={'ncaxP':function(_0x110fbd,_0x22512a){return _0x110fbd+_0x22512a;},'uHJaR':_0x4e05a9(0x1ee),'NlLbG':_0x4e05a9(0x207),'unRSo':_0x4e05a9(0x1a2),'WOrOn':function(_0x1f99e2,_0x17b414){return _0x1f99e2===_0x17b414;},'mhcCj':function(_0x44ed8d,_0x36052c){return _0x44ed8d!==_0x36052c;},'ktWIR':_0x4e05a9(0x1af),'JTFHO':'--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','JlcCW':_0x4e05a9(0x1aa),'Ktfwf':function(_0x11a5bb,_0x31a63c,_0x3ab376,_0x1bfcfe,_0x43cdff){return _0x11a5bb(_0x31a63c,_0x3ab376,_0x1bfcfe,_0x43cdff);},'AUSdu':'isElectron','uOiLC':function(_0x407fdf,_0x4dbaa3){return _0x407fdf(_0x4dbaa3);},'sFYOB':function(_0x4284fa,_0x2304da){return _0x4284fa(_0x2304da);},'YLZOl':function(_0x42eb3a,_0x39b5ac,_0x44af6f){return _0x42eb3a(_0x39b5ac,_0x44af6f);},'NkzbG':function(_0x1936a5,_0x4953fe){return _0x1936a5(_0x4953fe);},'LtMBO':'\x0a🌐\x20Profile\x20Setup\x0a','Pzaix':_0x4e05a9(0x205),'sZUbt':_0x4e05a9(0x1f0),'mSFil':_0x4e05a9(0x198),'rxaGb':function(_0x5d9cab,_0x23dcf1){return _0x5d9cab||_0x23dcf1;},'dYPkL':_0x4e05a9(0x1ad),'adLqY':'Continue\x20anyway','OYvzL':function(_0x382247,_0x169731){return _0x382247===_0x169731;},'WWiNt':_0x4e05a9(0x19a),'woFfy':function(_0x3792a6,_0x491e00,_0x350f28,_0x23e12a,_0x1b4bcc,_0xabc48){return _0x3792a6(_0x491e00,_0x350f28,_0x23e12a,_0x1b4bcc,_0xabc48);},'TFLvL':function(_0x47245b,_0x3fe4e2){return _0x47245b(_0x3fe4e2);}};_0x1118b0['ci']&&(console[_0x4e05a9(0x1c7)](_0x438549[_0x4e05a9(0x1d1)](_0x438549['ncaxP'](_0x438549[_0x4e05a9(0x1d1)]('The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a'+_0x4e05a9(0x1c5),'\x0a')+_0x438549['uHJaR']+'\x20\x20ranger\x20profile\x20add\x20<name>\x0a'+'\x0a',_0x438549['NlLbG']),_0x438549[_0x4e05a9(0x1e3)])),process[_0x4e05a9(0x1da)](0x1));const _0x2ec69a={};if(_0x1118b0[_0x4e05a9(0x201)])for(const _0x143c71 of _0x1118b0['setupHeader']){const _0x11ab23=_0x143c71['indexOf'](':');if(_0x438549['WOrOn'](_0x11ab23,-0x1))throw new Error('Invalid\x20--setup-header\x20format:\x20\x22'+_0x143c71+'\x22.\x20Expected\x20\x22Name:\x20Value\x22.');const _0x4b00ee=_0x143c71['slice'](0x0,_0x11ab23)[_0x4e05a9(0x194)](),_0x279bbe=_0x143c71[_0x4e05a9(0x199)](_0x438549['ncaxP'](_0x11ab23,0x1))['trim']();_0x2ec69a[_0x4b00ee]=_0x279bbe;}if(_0x438549[_0x4e05a9(0x1df)](_0x1118b0['cdpEndpoint'],undefined)&&_0x1118b0['cdpEndpoint']['trim']()==='')throw new Error(_0x438549[_0x4e05a9(0x19d)]);if(_0x1118b0[_0x4e05a9(0x18c)]&&_0x1118b0['url'])throw new Error(_0x438549[_0x4e05a9(0x1bc)]);if(_0x1118b0[_0x4e05a9(0x1ca)]&&_0x1118b0[_0x4e05a9(0x1bd)])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(_0x1118b0['authEnv']&&_0x1118b0['cdpEndpoint'])throw new Error(_0x4e05a9(0x1ac));const _0x238b30=Boolean(_0x1118b0['cdpEndpoint']),_0x57dfc1=isInteractive();if(!_0x57dfc1&&!_0x1118b0['url']&&!_0x238b30&&!_0x1118b0[_0x4e05a9(0x1bd)])throw new Error('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');if(_0x238b30){const _0x4435cb=_0x1118b0['cdpEndpoint'];console[_0x4e05a9(0x1f8)](_0x438549['JlcCW']),console[_0x4e05a9(0x1f8)](_0x4e05a9(0x1ea)+_0x4435cb);const _0x217ed9={'cdpEndpoint':_0x4435cb,'isElectron':!![]};Object['keys'](_0x2ec69a)['length']>0x0&&(_0x217ed9[_0x4e05a9(0x18f)]=_0x2ec69a);await createUnconfiguredCloudProfile(_0x1c2670,_0x217ed9);try{_0x438549[_0x4e05a9(0x1bf)](setProfileOverride,process[_0x4e05a9(0x189)](),_0x1c2670,_0x4e05a9(0x18c),_0x4435cb),_0x438549['Ktfwf'](setProfileOverride,process['cwd'](),_0x1c2670,_0x438549['AUSdu'],!![]);}catch(_0x1b0655){console[_0x4e05a9(0x1c7)](_0x4e05a9(0x1b8)+(_0x1b0655 instanceof Error?_0x1b0655[_0x4e05a9(0x1b5)]:_0x438549[_0x4e05a9(0x1fd)](String,_0x1b0655)));}console[_0x4e05a9(0x1f8)](_0x4e05a9(0x19b)+_0x1c2670+'\x27\x20created\x20(CDP).'),await sweepOrphansBestEffort(_0x1c2670),await _0x438549['sFYOB'](markActive,_0x1c2670);return;}if(_0x1118b0['skipAuth']){const _0x426c94={};_0x1118b0['url']&&(_0x426c94[_0x4e05a9(0x1f0)]=_0x1118b0[_0x4e05a9(0x1f1)]);Object[_0x4e05a9(0x1d6)](_0x2ec69a)['length']>0x0&&(_0x426c94[_0x4e05a9(0x18f)]=_0x2ec69a);await _0x438549[_0x4e05a9(0x1d4)](createUnconfiguredCloudProfile,_0x1c2670,_0x426c94),console[_0x4e05a9(0x1f8)](_0x4e05a9(0x191)+_0x1c2670+'\x27\x20created\x20(no\x20session).\x0a'+('\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20'+_0x1c2670+_0x4e05a9(0x1db))),await sweepOrphansBestEffort(_0x1c2670),await markActive(_0x1c2670);return;}if(_0x1118b0[_0x4e05a9(0x1f1)]){const _0x138b26=_0x1118b0['url'],_0x14a8fa=await _0x438549['NkzbG'](checkUrlReachability,_0x138b26);if(!_0x14a8fa['ok']&&!_0x1118b0['force'])throw new Error(_0x4e05a9(0x1b0)+_0x138b26+':\x20'+_0x14a8fa['error']+_0x4e05a9(0x1b6));!_0x14a8fa['ok']&&_0x1118b0['force']&&console['log']('⚠\x20Could\x20not\x20reach\x20'+_0x138b26+':\x20'+_0x14a8fa['error']+'\x20(continuing\x20with\x20--force)');}else{console[_0x4e05a9(0x1f8)](_0x438549[_0x4e05a9(0x18a)]),console['log'](_0x438549[_0x4e05a9(0x1f3)]),console[_0x4e05a9(0x1f8)]('\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a');let _0x5b1979='',_0xe2518=![];while(!![]){const _0x6e83d9=await _0x474d25[_0x4e05a9(0x1e2)]([{'type':_0x4e05a9(0x1cd),'name':_0x438549['sZUbt'],'message':_0xe2518?_0x4e05a9(0x1fb):_0x438549[_0x4e05a9(0x1b2)],'default':_0x438549[_0x4e05a9(0x1dc)](_0x5b1979,_0x4e05a9(0x20d))}]);_0x5b1979=_0x6e83d9['baseUrl'];const _0x484917=await checkUrlReachability(_0x5b1979);if(_0x484917['ok'])break;const _0x34f2b3=/^[a-zA-Z][\w+.-]*:\/\//['test'](_0x5b1979),_0x2bf5d5=_0x484917['isProtocolError']&&!_0x34f2b3,_0x36a9f0=_0x2bf5d5?'http://'+_0x5b1979:null;_0xe2518=!![],console['log'](_0x4e05a9(0x1c4)+_0x5b1979+':\x20'+_0x484917['error']);_0x36a9f0&&console[_0x4e05a9(0x1f8)](_0x4e05a9(0x1a7)+_0x36a9f0+'?');const {action:_0x38965e}=await _0x474d25['prompt']([{'type':'list','name':_0x4e05a9(0x1a1),'message':_0x4e05a9(0x1be),'choices':[..._0x36a9f0?[{'name':_0x4e05a9(0x204)+_0x36a9f0,'value':_0x4e05a9(0x1e6)}]:[],{'name':_0x438549[_0x4e05a9(0x1e7)],'value':_0x4e05a9(0x1a6)},{'name':_0x438549[_0x4e05a9(0x1e8)],'value':'continue'}]}]);if(_0x38965e==='use_suggestion'&&_0x36a9f0){_0x5b1979=_0x36a9f0;const _0x447329=await _0x438549['NkzbG'](checkUrlReachability,_0x5b1979);if(_0x447329['ok'])break;console[_0x4e05a9(0x1f8)]('\x0a\x20\x20Still\x20could\x20not\x20reach\x20'+_0x5b1979+':\x20'+_0x447329['error']);}else{if(_0x438549['OYvzL'](_0x38965e,_0x438549['WWiNt']))break;}}_0x1118b0={..._0x1118b0,'url':_0x5b1979};}let _0x5d5c50=![];try{_0x5d5c50=await _0x438549['woFfy'](tryAutoRouteCloudProfile,_0x1c2670,_0x1118b0['url'],_0x1118b0,_0x57dfc1,_0x4a692d);}catch(_0x3e452d){console[_0x4e05a9(0x1c7)]('\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22'+_0x1c2670+'\x22:\x20'+(_0x3e452d instanceof Error?_0x3e452d[_0x4e05a9(0x1b5)]:_0x438549[_0x4e05a9(0x1c1)](String,_0x3e452d))),process[_0x4e05a9(0x1da)](0x1);}!_0x5d5c50&&process['exit'](0x1),await markActive(_0x1c2670);}
1
+ const _0x10726e=_0x3597;(function(_0x59cef9,_0x4c9eb0){const _0x243082=_0x3597,_0xa4ae33=_0x59cef9();while(!![]){try{const _0x210a09=-parseInt(_0x243082(0x1ed))/0x1+-parseInt(_0x243082(0x200))/0x2+-parseInt(_0x243082(0x218))/0x3+parseInt(_0x243082(0x260))/0x4*(parseInt(_0x243082(0x240))/0x5)+-parseInt(_0x243082(0x215))/0x6+parseInt(_0x243082(0x25b))/0x7*(parseInt(_0x243082(0x224))/0x8)+parseInt(_0x243082(0x211))/0x9;if(_0x210a09===_0x4c9eb0)break;else _0xa4ae33['push'](_0xa4ae33['shift']());}catch(_0x2b9363){_0xa4ae33['push'](_0xa4ae33['shift']());}}}(_0xed8e,0xa38d5));function _0x3597(_0x4a775d,_0x42e816){_0x4a775d=_0x4a775d-0x1eb;const _0xed8edb=_0xed8e();let _0x3597e3=_0xed8edb[_0x4a775d];return _0x3597e3;}import{readdir,rm}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import _0x43de1a from'inquirer';import{getRangerDir,getRangerHomeDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{fetchAuthConfig,createCloudProfile,manualBrowserLogin,ApiError}from'./utils/cloudProfile.js';function _0xed8e(){const _0x575a21=['keys','bFkAL','40dZrapK','kbcJZ','error','xlaOZ','profile.add.autoRouteSkipped','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','trackPhaseEnd','domains','yes','EsaVO','\x20(continuing\x20with\x20--force)','signal','The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a','ycuAD','`\x20again\x20without\x20--skip-auth.','abort','list','UqLUC','wHmwa','indexOf','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','cdpEndpoint','continue','MFABv','Continue\x20anyway','capture','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a','3647BEiayh','\x27\x20created.\x0a','\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a','Use\x20','cwd','400828SmylgL','ROxTf','LtMYN','meogq','--skip-auth\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20--skip-auth\x20makes\x20an\x20env-less\x20profile,\x20--env\x20binds\x20one\x20to\x20an\x20auth\x20environment.','HbhiQ','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.','gcTxM','Cqfpt','\x0a\x20\x20No\x20auth\x20env\x20matches\x20','--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','isElectron','whrmO','298613iXYqOG','\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20(','SwhmW','slice','ghGTa','authEnv','\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a','XKjyM','message','skipAuth','\x20--skip-auth\x0a','CpcXR','\x20\x20Next:\x20ranger\x20go\x20--profile\x20','environments','\x22:\x20','Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.','VOVHx','\x0a\x20\x20Still\x20could\x20not\x20reach\x20','setupHeader','1262432upGoiU','use_suggestion','profile.add.autoRouted','DYgsh','\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20','\x27\x20matching\x20','\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22','IaUxG','setupHeaders','RYjxb','\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.','wqqQf','test','no_auth_config','\x20Configured\x20envs:\x20','retry','confirm','8124912anZxSV','status','iSyou','✓\x20Cloud\x20profile\x20\x27','1767282hMvbfz','local','This\x20account\x20will\x20be\x20shared\x20with\x20everyone\x20at\x20your\x20organization','1479510TTcSdK','aByWs','\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','ODptS','wZiBF','saveToCloud','url','\x0a\x20\x20(domains:\x20','Invalid\x20--setup-header\x20format:\x20\x22','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','TypeError','10488vLeyiH','PYbZJ','aWBYb','user_declined','✓\x20Profile\x20\x27','kIbUp','prompt','Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','isTTY','\x20\x20https://docs.ranger.net/main/concepts/profiles','\x0a\x20\x20A\x20profile\x20named\x20\x22','iMEmC','Smsma','oiQzu','length','join','\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a','.\x20Pass\x20--env\x20<key>\x20to\x20pick\x20one,\x20or\x20use\x20--skip-auth.\x20Configured\x20envs:\x20','baseUrl','XCTDD','exit','slqmG','\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20','log','zWsTN','--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.'];_0xed8e=function(){return _0x575a21;};return _0xed8e();}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=_0x10726e(0x217);function warnCloudProfileSharedInOrg(){const _0x4e37d6=_0x10726e;if(!process['stdout'][_0x4e37d6(0x22c)])return;console['warn'](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x53a50a){const _0x28ca24=_0x10726e,_0x51849e={'MFABv':'manual','aWBYb':'Invalid\x20URL','meogq':_0x28ca24(0x223),'bFkAL':'fetch\x20failed'};try{const _0x1c532f=new AbortController(),_0x4150d4=setTimeout(()=>_0x1c532f[_0x28ca24(0x24f)](),0x1388),_0x4b7688={'method':'HEAD','signal':_0x1c532f[_0x28ca24(0x24b)],'redirect':_0x51849e[_0x28ca24(0x257)]};/^https:\/\/localhost(:\d+)?/i[_0x28ca24(0x20c)](_0x53a50a)&&(process['env']['NODE_TLS_REJECT_UNAUTHORIZED']='0');const _0x3b304c=await fetch(_0x53a50a,_0x4b7688);delete process['env']['NODE_TLS_REJECT_UNAUTHORIZED'],clearTimeout(_0x4150d4);if(_0x3b304c[_0x28ca24(0x212)]<0x190)return{'ok':!![]};return{'ok':![],'error':'HTTP\x20'+_0x3b304c['status']};}catch(_0x6cd92e){delete process['env']['NODE_TLS_REJECT_UNAUTHORIZED'];const _0x3a6b2e=_0x6cd92e,_0x2337c6=_0x3a6b2e['message']||String(_0x6cd92e),_0x23f618=_0x2337c6['includes'](_0x51849e[_0x28ca24(0x226)])||_0x3a6b2e['name']===_0x51849e[_0x28ca24(0x263)]||_0x2337c6['includes'](_0x51849e[_0x28ca24(0x23f)]);return{'ok':![],'error':_0x2337c6,'isProtocolError':_0x23f618};}}async function sweepOrphanLocalProfile(_0x36eaca,_0x15ec26,_0x480299){const _0x10cfee=_0x10726e,_0x4fb9f6={'EjLLj':function(_0x4697ba,_0x5be319,_0x4b62af){return _0x4697ba(_0x5be319,_0x4b62af);},'VOVHx':function(_0xea0591,_0x27ce2d){return _0xea0591(_0x27ce2d);},'tgFym':function(_0x1cec9a,_0x4f72b7,_0x203bd5){return _0x1cec9a(_0x4f72b7,_0x203bd5);}},_0x312213=join(_0x15ec26,_0x10cfee(0x216)),_0xd21478=_0x4fb9f6['EjLLj'](join,_0x312213,_0x36eaca);existsSync(_0xd21478)&&(_0x480299&&await _0x4fb9f6[_0x10cfee(0x1fd)](isPathGitTracked,_0xd21478)?console['log']('\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20'+_0xd21478+'\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.'):(await rm(_0xd21478,{'recursive':!![],'force':!![]}),console[_0x10cfee(0x23b)]('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0xd21478)));if(_0x4fb9f6['VOVHx'](existsSync,_0x312213)){let _0x2a228a=[];try{_0x2a228a=await _0x4fb9f6['VOVHx'](readdir,_0x312213);}catch{return;}const _0x1898b7='.tmp-'+_0x36eaca+'-';for(const _0xbfa3f of _0x2a228a){if(!_0xbfa3f['startsWith'](_0x1898b7))continue;const _0x3770d4=join(_0x312213,_0xbfa3f);await _0x4fb9f6['tgFym'](rm,_0x3770d4,{'recursive':!![],'force':!![]}),console[_0x10cfee(0x23b)]('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x3770d4);}}}async function sweepOrphansBestEffort(_0x142004){const _0xdbb6b2=_0x10726e,_0x557fe9={'PvCng':function(_0x355908,_0x125324,_0x37c6f5,_0xea35c0){return _0x355908(_0x125324,_0x37c6f5,_0xea35c0);},'SrRlO':function(_0x398301,_0x3484c4){return _0x398301!==_0x3484c4;},'iSyou':function(_0x248a15,_0x358708,_0x11e333,_0x2a78e3){return _0x248a15(_0x358708,_0x11e333,_0x2a78e3);},'wLveI':function(_0x2029de,_0x5c0c0f){return _0x2029de(_0x5c0c0f);}};try{await _0x557fe9['PvCng'](sweepOrphanLocalProfile,_0x142004,getRangerHomeDir(),![]);const _0x1a30ad=getRangerDir();_0x557fe9['SrRlO'](_0x1a30ad,getRangerHomeDir())&&await _0x557fe9[_0xdbb6b2(0x213)](sweepOrphanLocalProfile,_0x142004,_0x1a30ad,!![]);}catch(_0xed1ca7){console['log'](_0xdbb6b2(0x1ee)+(_0xed1ca7 instanceof Error?_0xed1ca7[_0xdbb6b2(0x1f5)]:_0x557fe9['wLveI'](String,_0xed1ca7))+').');}}async function markActive(_0x2687f8){const _0x326a4e=_0x10726e;try{await writeActiveProfileName(_0x2687f8),console['log']('\x20\x20Set\x20active\x20profile:\x20'+_0x2687f8);}catch{console[_0x326a4e(0x23b)](_0x326a4e(0x1fc));}}async function tryAutoRouteCloudProfile(_0x2ed2f1,_0x2efd78,_0xf65d13,_0x2be735,_0x5cad2b){const _0x23d830=_0x10726e,_0x2054eb={'kbcJZ':function(_0xb591a4,_0x137eb7){return _0xb591a4===_0x137eb7;},'AyLve':function(_0x337f2c){return _0x337f2c();},'fntrg':_0x23d830(0x20d),'aByWs':function(_0x186780,_0x1f75a4){return _0x186780 instanceof _0x1f75a4;},'ckYEq':function(_0x56190f,_0x5d5840){return _0x56190f(_0x5d5840);},'PYbZJ':function(_0x11e7de,_0x3676ff){return _0x11e7de===_0x3676ff;},'DYgsh':function(_0x352429,_0x200079){return _0x352429+_0x200079;},'Cqfpt':function(_0x5509f1,_0x274eda){return _0x5509f1+_0x274eda;},'HbhiQ':'\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','CpcXR':_0x23d830(0x244),'AcZHi':'env_not_found','nEBhk':'\x20Your\x20org\x20has\x20no\x20auth\x20environments\x20configured.','AtJKK':function(_0x293a32,_0x5b85dd,_0x332e59){return _0x293a32(_0x5b85dd,_0x332e59);},'ywKXn':'no_match','rFteN':_0x23d830(0x266),'LvHtD':function(_0x350ae6,_0x31366c,_0x2e2352,_0x5d4193){return _0x350ae6(_0x31366c,_0x2e2352,_0x5d4193);},'YLoAe':function(_0x50bb65){return _0x50bb65();},'IaUxG':function(_0xa6bf1d,_0x3ff186){return _0xa6bf1d(_0x3ff186);}};let _0x91a5ab;try{_0x91a5ab=await _0x2054eb['AyLve'](fetchAuthConfig);}catch(_0x5eb0e7){return _0x5cad2b?.['trackPhaseEnd'](_0x23d830(0x244),{'reason':_0x2054eb['fntrg'],'profileName':_0x2ed2f1}),console['error'](_0x23d830(0x204)+(_0x2054eb[_0x23d830(0x219)](_0x5eb0e7,Error)?_0x5eb0e7[_0x23d830(0x1f5)]:_0x2054eb['ckYEq'](String,_0x5eb0e7))),![];}if((!_0x91a5ab||!_0x91a5ab[_0x23d830(0x1fa)]||_0x2054eb[_0x23d830(0x225)](Object[_0x23d830(0x23e)](_0x91a5ab['environments'])[_0x23d830(0x232)],0x0))&&!_0xf65d13[_0x23d830(0x1f2)]){if(_0x2be735)return await captureEnvLessProfile(_0x2ed2f1,_0x2efd78,_0xf65d13,_0x5cad2b);return _0x5cad2b?.[_0x23d830(0x246)](_0x23d830(0x244),{'reason':'no_auth_config','profileName':_0x2ed2f1}),console[_0x23d830(0x242)](_0x2054eb[_0x23d830(0x203)](_0x2054eb['Cqfpt'](_0x2054eb[_0x23d830(0x265)]+'\x0a'+_0x23d830(0x1f3)+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20'+_0x2ed2f1+'\x20--url\x20'+_0x2efd78+_0x23d830(0x1f7))+'\x0a',_0x23d830(0x25d)),_0x23d830(0x21a))),![];}let _0x4d8d96;if(_0xf65d13[_0x23d830(0x1f2)]){if(!_0x91a5ab?.['environments']?.[_0xf65d13['authEnv']]){const _0x5ed1bd=Object[_0x23d830(0x23e)](_0x91a5ab?.['environments']??{});return _0x5cad2b?.[_0x23d830(0x246)](_0x2054eb[_0x23d830(0x1f8)],{'reason':_0x2054eb['AcZHi'],'profileName':_0x2ed2f1}),console['error'](_0x2054eb[_0x23d830(0x268)]('\x0a\x20\x20Auth\x20environment\x20\x22'+_0xf65d13['authEnv']+'\x22\x20not\x20found.',_0x5ed1bd['length']?_0x23d830(0x20e)+_0x5ed1bd[_0x23d830(0x233)](',\x20')+'.':_0x2054eb['nEBhk'])),![];}_0x4d8d96=_0xf65d13['authEnv'];}else _0x4d8d96=_0x2054eb['AtJKK'](matchAuthEnvironment,_0x2efd78,_0x91a5ab);if(!_0x4d8d96)return _0x5cad2b?.[_0x23d830(0x246)](_0x2054eb[_0x23d830(0x1f8)],{'reason':_0x2054eb['ywKXn'],'profileName':_0x2ed2f1}),console[_0x23d830(0x242)](_0x23d830(0x269)+_0x2efd78+_0x23d830(0x235)+Object[_0x23d830(0x23e)](_0x91a5ab?.[_0x23d830(0x1fa)]??{})[_0x23d830(0x233)](',\x20')+'.'),![];const _0x2bf63e=_0x91a5ab?.[_0x23d830(0x1fa)]?.[_0x4d8d96],_0x394f2c=_0x2bf63e?.[_0x23d830(0x247)]??[];if(_0x2be735&&!_0xf65d13['yes']){const {saveToCloud:_0x5f2ce5}=await _0x43de1a[_0x23d830(0x22a)]([{'type':'confirm','name':_0x23d830(0x21e),'message':'Found\x20auth\x20environment\x20\x27'+_0x4d8d96+_0x23d830(0x205)+_0x2efd78+_0x23d830(0x220)+_0x394f2c[_0x23d830(0x233)](',\x20')+')\x0a\x20\x20Save\x20\x27'+_0x2ed2f1+'\x27\x20to\x20the\x20cloud?','default':!![]}]);if(!_0x5f2ce5)return _0x5cad2b?.['trackPhaseEnd']('profile.add.autoRouteSkipped',{'reason':_0x23d830(0x227),'profileName':_0x2ed2f1}),console['error'](_0x2054eb['rFteN']),![];}const _0x5090c6=_0x394f2c['some'](_0x1c9071=>{const _0x12c9ab=_0x23d830;try{return _0x2054eb[_0x12c9ab(0x241)](new URL(_0x1c9071)['origin'],new URL(_0x2efd78)['origin']);}catch{return![];}}),_0x3ceaa7={};!_0x5090c6&&(_0x3ceaa7[_0x23d830(0x236)]=_0x2efd78);try{await _0x2054eb['LvHtD'](createCloudProfile,_0x2ed2f1,_0x4d8d96,{'settings':_0x3ceaa7}),_0x2054eb['YLoAe'](warnCloudProfileSharedInOrg);}catch(_0x59b683){if(_0x59b683 instanceof ApiError&&_0x2054eb[_0x23d830(0x225)](_0x59b683[_0x23d830(0x212)],0x199)){console['error']('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x2ed2f1+_0x23d830(0x21b)+(_0x23d830(0x222)+_0x2ed2f1));throw _0x59b683;}throw _0x59b683;}return console[_0x23d830(0x23b)]('✓\x20Profile\x20\x27'+_0x2ed2f1+_0x23d830(0x25c)+(_0x23d830(0x1f9)+_0x2ed2f1)),await _0x2054eb[_0x23d830(0x207)](sweepOrphansBestEffort,_0x2ed2f1),_0x5cad2b?.[_0x23d830(0x246)](_0x23d830(0x202),{'envKey':_0x4d8d96,'profileName':_0x2ed2f1}),!![];}async function createUnconfiguredCloudProfile(_0x54b8b1,_0xba9fb7){const _0x34f79a=_0x10726e,_0x5a9912={'PSGAK':function(_0x4cb352,_0x446820,_0x4033cd,_0x895408){return _0x4cb352(_0x446820,_0x4033cd,_0x895408);},'XCTDD':function(_0x546bd2,_0x507e42){return _0x546bd2===_0x507e42;},'yfQLc':function(_0x5a6bcd,_0x564cb5){return _0x5a6bcd+_0x564cb5;}};try{await _0x5a9912['PSGAK'](createCloudProfile,_0x54b8b1,undefined,{'settings':_0xba9fb7}),warnCloudProfileSharedInOrg();}catch(_0x9c53fe){_0x9c53fe instanceof ApiError&&_0x5a9912[_0x34f79a(0x237)](_0x9c53fe[_0x34f79a(0x212)],0x199)&&console[_0x34f79a(0x242)](_0x5a9912['yfQLc'](_0x34f79a(0x22e)+_0x54b8b1+_0x34f79a(0x21b),'\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x54b8b1));throw _0x9c53fe;}}async function captureEnvLessProfile(_0x2a3d29,_0x15dfe9,_0x265f84,_0x45a583){const _0x3e7baa=_0x10726e,_0x3ee1f1={'yIoQZ':_0x3e7baa(0x210),'JRpUD':_0x3e7baa(0x22b),'SxBnQ':function(_0x3e73ea,_0x3b457c){return _0x3e73ea+_0x3b457c;},'oiQzu':function(_0x1522ea,_0x54aafc){return _0x1522ea===_0x54aafc;},'jubgb':function(_0x4f5e1b,_0x36a581){return _0x4f5e1b+_0x36a581;},'zWsTN':function(_0x49756d,_0x530059,_0x31f17b,_0xe1b863){return _0x49756d(_0x530059,_0x31f17b,_0xe1b863);},'whrmO':function(_0x3427e2,_0x5703e9){return _0x3427e2(_0x5703e9);},'SLlgt':_0x3e7baa(0x202)};if(!_0x265f84[_0x3e7baa(0x248)]){const {capture:_0x48d27d}=await _0x43de1a['prompt']([{'type':_0x3ee1f1['yIoQZ'],'name':_0x3e7baa(0x259),'message':_0x3ee1f1['JRpUD'],'default':!![]}]);if(!_0x48d27d)return _0x45a583?.[_0x3e7baa(0x246)]('profile.add.autoRouteSkipped',{'reason':_0x3e7baa(0x227),'profileName':_0x2a3d29}),console[_0x3e7baa(0x242)](_0x3ee1f1['SxBnQ'](_0x3e7baa(0x25a),'\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.')),![];}const _0x30fa96={};if(_0x265f84['setupHeader'])for(const _0x1b2387 of _0x265f84[_0x3e7baa(0x1ff)]){const _0x35a228=_0x1b2387[_0x3e7baa(0x253)](':');if(_0x3ee1f1[_0x3e7baa(0x231)](_0x35a228,-0x1))continue;_0x30fa96[_0x1b2387[_0x3e7baa(0x1f0)](0x0,_0x35a228)['trim']()]=_0x1b2387['slice'](_0x3ee1f1['jubgb'](_0x35a228,0x1))['trim']();}const _0x11655a={'baseUrl':_0x15dfe9};Object[_0x3e7baa(0x23e)](_0x30fa96)[_0x3e7baa(0x232)]>0x0&&(_0x11655a[_0x3e7baa(0x208)]=_0x30fa96);let _0x125c57;try{_0x125c57=await _0x3ee1f1[_0x3e7baa(0x23c)](createCloudProfile,_0x2a3d29,undefined,{'settings':_0x11655a}),warnCloudProfileSharedInOrg();}catch(_0xf01472){_0xf01472 instanceof ApiError&&_0xf01472['status']===0x199&&console['error'](_0x3ee1f1['SxBnQ'](_0x3e7baa(0x22e)+_0x2a3d29+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x2a3d29));throw _0xf01472;}return await manualBrowserLogin(_0x125c57,{'key':'','domains':[_0x15dfe9],'setupHeaders':Object[_0x3e7baa(0x23e)](_0x30fa96)[_0x3e7baa(0x232)]>0x0?_0x30fa96:undefined}),console[_0x3e7baa(0x23b)]('\x0a✓\x20Profile\x20\x27'+_0x2a3d29+'\x27\x20created\x20with\x20a\x20captured\x20session.\x0a'+('\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x2a3d29)),await _0x3ee1f1[_0x3e7baa(0x1ec)](sweepOrphansBestEffort,_0x2a3d29),_0x45a583?.['trackPhaseEnd'](_0x3ee1f1['SLlgt'],{'envKey':null,'profileName':_0x2a3d29}),!![];}export async function addEnv(_0x4ffc8e,_0x55d126={},_0x19a010){const _0x2d5a6e=_0x10726e,_0x1fbf62={'ycuAD':function(_0x56cf8c,_0x5cfa24){return _0x56cf8c+_0x5cfa24;},'ERBcL':function(_0x1dc3fe,_0x1892bf){return _0x1dc3fe+_0x1892bf;},'ODptS':function(_0x423d13,_0x465a36){return _0x423d13+_0x465a36;},'jwAaU':_0x2d5a6e(0x24c),'iMEmC':'To\x20set\x20up\x20a\x20profile,\x20run:\x0a','ascmK':_0x2d5a6e(0x254),'SwhmW':'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','HhiXI':function(_0x4490d0,_0xc91e77){return _0x4490d0===_0xc91e77;},'XKjyM':function(_0x489155,_0x2fb3b2){return _0x489155!==_0x2fb3b2;},'EOgbW':function(_0x362532,_0x178e74){return _0x362532===_0x178e74;},'fTfhJ':_0x2d5a6e(0x26a),'wHmwa':_0x2d5a6e(0x264),'wqqQf':'--cdp-endpoint\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20a\x20CDP\x20profile\x20connects\x20to\x20an\x20existing\x20browser\x20and\x20has\x20no\x20auth\x20environment.','jRGBd':function(_0xff9fa8,_0x5234fa){return _0xff9fa8(_0x5234fa);},'TMQKK':'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','gcTxM':function(_0x475430,_0x240117){return _0x475430>_0x240117;},'UqLUC':function(_0x4fcc1d,_0x52092f,_0x35b81f,_0x1fb73e,_0x500d0c){return _0x4fcc1d(_0x52092f,_0x35b81f,_0x1fb73e,_0x500d0c);},'Smsma':function(_0x447ef4,_0x5a902c){return _0x447ef4(_0x5a902c);},'fKOda':function(_0x12d547,_0xdab85a,_0x3d16d5){return _0x12d547(_0xdab85a,_0x3d16d5);},'ROxTf':function(_0x368f80,_0xef5c69){return _0x368f80+_0xef5c69;},'wZiBF':function(_0x4d329c,_0x319533){return _0x4d329c(_0x319533);},'BVcUq':function(_0x46746f,_0x3c1b42){return _0x46746f(_0x3c1b42);},'ghGTa':function(_0x5dab19,_0x5674a7){return _0x5dab19(_0x5674a7);},'dYlwx':'\x0a🌐\x20Profile\x20Setup\x0a','kxILB':_0x2d5a6e(0x245),'xlaOZ':'input','RYjxb':'Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','EsaVO':'http://localhost:3000','LtMYN':'action','SPqEq':'What\x20would\x20you\x20like\x20to\x20do?','kIbUp':function(_0x583db3,_0x58ea12){return _0x583db3===_0x58ea12;},'slqmG':_0x2d5a6e(0x201),'RSxxv':function(_0x4050e1,_0x52816){return _0x4050e1 instanceof _0x52816;}};_0x55d126['ci']&&(console[_0x2d5a6e(0x242)](_0x1fbf62['ycuAD'](_0x1fbf62[_0x2d5a6e(0x24d)](_0x1fbf62['ERBcL'](_0x1fbf62[_0x2d5a6e(0x21c)](_0x1fbf62['jwAaU']+'for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a'+'\x0a',_0x1fbf62[_0x2d5a6e(0x22f)]),_0x1fbf62['ascmK']),'\x0a')+_0x1fbf62[_0x2d5a6e(0x1ef)],_0x2d5a6e(0x22d))),process[_0x2d5a6e(0x238)](0x1));const _0x324a92={};if(_0x55d126[_0x2d5a6e(0x1ff)])for(const _0x5bedae of _0x55d126['setupHeader']){const _0x1ef652=_0x5bedae['indexOf'](':');if(_0x1fbf62['HhiXI'](_0x1ef652,-0x1))throw new Error(_0x2d5a6e(0x221)+_0x5bedae+'\x22.\x20Expected\x20\x22Name:\x20Value\x22.');const _0x66fba1=_0x5bedae[_0x2d5a6e(0x1f0)](0x0,_0x1ef652)['trim'](),_0x5bc553=_0x5bedae[_0x2d5a6e(0x1f0)](_0x1fbf62['ODptS'](_0x1ef652,0x1))['trim']();_0x324a92[_0x66fba1]=_0x5bc553;}if(_0x1fbf62[_0x2d5a6e(0x1f4)](_0x55d126['cdpEndpoint'],undefined)&&_0x1fbf62['EOgbW'](_0x55d126[_0x2d5a6e(0x255)]['trim'](),''))throw new Error(_0x1fbf62['fTfhJ']);if(_0x55d126[_0x2d5a6e(0x255)]&&_0x55d126['url'])throw new Error(_0x2d5a6e(0x23d));if(_0x55d126[_0x2d5a6e(0x1f2)]&&_0x55d126[_0x2d5a6e(0x1f6)])throw new Error(_0x1fbf62[_0x2d5a6e(0x252)]);if(_0x55d126['authEnv']&&_0x55d126['cdpEndpoint'])throw new Error(_0x1fbf62[_0x2d5a6e(0x20b)]);const _0x462612=_0x1fbf62['jRGBd'](Boolean,_0x55d126['cdpEndpoint']),_0x5b1df1=isInteractive();if(!_0x5b1df1&&!_0x55d126[_0x2d5a6e(0x21f)]&&!_0x462612&&!_0x55d126['skipAuth'])throw new Error(_0x1fbf62['TMQKK']);if(_0x462612){const _0x51b7b1=_0x55d126[_0x2d5a6e(0x255)];console[_0x2d5a6e(0x23b)]('\x0a🔌\x20CDP\x20Profile\x20Setup\x0a'),console[_0x2d5a6e(0x23b)]('\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20'+_0x51b7b1);const _0x5cf9f2={'cdpEndpoint':_0x51b7b1,'isElectron':!![]};_0x1fbf62[_0x2d5a6e(0x267)](Object[_0x2d5a6e(0x23e)](_0x324a92)[_0x2d5a6e(0x232)],0x0)&&(_0x5cf9f2['setupHeaders']=_0x324a92);await createUnconfiguredCloudProfile(_0x4ffc8e,_0x5cf9f2);try{setProfileOverride(process[_0x2d5a6e(0x25f)](),_0x4ffc8e,_0x2d5a6e(0x255),_0x51b7b1),_0x1fbf62[_0x2d5a6e(0x251)](setProfileOverride,process[_0x2d5a6e(0x25f)](),_0x4ffc8e,_0x2d5a6e(0x1eb),!![]);}catch(_0x13e995){console['error']('\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20'+(_0x13e995 instanceof Error?_0x13e995['message']:_0x1fbf62[_0x2d5a6e(0x230)](String,_0x13e995)));}console['log'](_0x2d5a6e(0x214)+_0x4ffc8e+'\x27\x20created\x20(CDP).'),await sweepOrphansBestEffort(_0x4ffc8e),await markActive(_0x4ffc8e);return;}if(_0x55d126[_0x2d5a6e(0x1f6)]){const _0x26c7ad={};_0x55d126['url']&&(_0x26c7ad['baseUrl']=_0x55d126['url']);Object['keys'](_0x324a92)[_0x2d5a6e(0x232)]>0x0&&(_0x26c7ad['setupHeaders']=_0x324a92);await _0x1fbf62['fKOda'](createUnconfiguredCloudProfile,_0x4ffc8e,_0x26c7ad),console[_0x2d5a6e(0x23b)](_0x1fbf62[_0x2d5a6e(0x261)](_0x2d5a6e(0x228)+_0x4ffc8e+'\x27\x20created\x20(no\x20session).\x0a',_0x2d5a6e(0x23a)+_0x4ffc8e+_0x2d5a6e(0x24e))),await _0x1fbf62[_0x2d5a6e(0x21d)](sweepOrphansBestEffort,_0x4ffc8e),await _0x1fbf62['BVcUq'](markActive,_0x4ffc8e);return;}if(_0x55d126['url']){const _0x4e489b=_0x55d126['url'],_0x14914f=await _0x1fbf62['ghGTa'](checkUrlReachability,_0x4e489b);if(!_0x14914f['ok']&&!_0x55d126['force'])throw new Error('Could\x20not\x20reach\x20'+_0x4e489b+':\x20'+_0x14914f[_0x2d5a6e(0x242)]+_0x2d5a6e(0x20a));!_0x14914f['ok']&&_0x55d126['force']&&console['log']('⚠\x20Could\x20not\x20reach\x20'+_0x4e489b+':\x20'+_0x14914f[_0x2d5a6e(0x242)]+_0x2d5a6e(0x24a));}else{console['log'](_0x1fbf62['dYlwx']),console[_0x2d5a6e(0x23b)](_0x1fbf62['kxILB']),console[_0x2d5a6e(0x23b)](_0x2d5a6e(0x234));let _0x28bdd1='',_0x2139a8=![];while(!![]){const _0x12696e=await _0x43de1a[_0x2d5a6e(0x22a)]([{'type':_0x1fbf62[_0x2d5a6e(0x243)],'name':'baseUrl','message':_0x2139a8?_0x1fbf62[_0x2d5a6e(0x209)]:'What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','default':_0x28bdd1||_0x1fbf62[_0x2d5a6e(0x249)]}]);_0x28bdd1=_0x12696e['baseUrl'];const _0x5cdaf5=await checkUrlReachability(_0x28bdd1);if(_0x5cdaf5['ok'])break;const _0x4bbd9b=/^[a-zA-Z][\w+.-]*:\/\//['test'](_0x28bdd1),_0x5408ee=_0x5cdaf5['isProtocolError']&&!_0x4bbd9b,_0x799b71=_0x5408ee?'http://'+_0x28bdd1:null;_0x2139a8=!![],console[_0x2d5a6e(0x23b)]('\x0a\x20\x20Could\x20not\x20reach\x20'+_0x28bdd1+':\x20'+_0x5cdaf5['error']);_0x799b71&&console[_0x2d5a6e(0x23b)]('\x20\x20Did\x20you\x20mean\x20'+_0x799b71+'?');const {action:_0x34bf0b}=await _0x43de1a['prompt']([{'type':_0x2d5a6e(0x250),'name':_0x1fbf62[_0x2d5a6e(0x262)],'message':_0x1fbf62['SPqEq'],'choices':[..._0x799b71?[{'name':_0x2d5a6e(0x25e)+_0x799b71,'value':'use_suggestion'}]:[],{'name':'Enter\x20a\x20different\x20URL','value':_0x2d5a6e(0x20f)},{'name':_0x2d5a6e(0x258),'value':_0x2d5a6e(0x256)}]}]);if(_0x1fbf62[_0x2d5a6e(0x229)](_0x34bf0b,_0x1fbf62[_0x2d5a6e(0x239)])&&_0x799b71){_0x28bdd1=_0x799b71;const _0x3bbfc5=await _0x1fbf62[_0x2d5a6e(0x230)](checkUrlReachability,_0x28bdd1);if(_0x3bbfc5['ok'])break;console[_0x2d5a6e(0x23b)](_0x2d5a6e(0x1fe)+_0x28bdd1+':\x20'+_0x3bbfc5['error']);}else{if(_0x34bf0b==='continue')break;}}_0x55d126={..._0x55d126,'url':_0x28bdd1};}let _0x53c3f0=![];try{_0x53c3f0=await tryAutoRouteCloudProfile(_0x4ffc8e,_0x55d126['url'],_0x55d126,_0x5b1df1,_0x19a010);}catch(_0x140ec9){console[_0x2d5a6e(0x242)](_0x2d5a6e(0x206)+_0x4ffc8e+_0x2d5a6e(0x1fb)+(_0x1fbf62['RSxxv'](_0x140ec9,Error)?_0x140ec9[_0x2d5a6e(0x1f5)]:String(_0x140ec9))),process['exit'](0x1);}!_0x53c3f0&&process[_0x2d5a6e(0x238)](0x1),await _0x1fbf62[_0x2d5a6e(0x1f1)](markActive,_0x4ffc8e);}
@@ -1 +1 @@
1
- function _0x4d6d(){var _0x1534f0=['4476185vSMltv','177DGAxQT','320451XPKvsF','error','gUQdT','2585241lDcQGF','30xVYZKH','2586CjpjcC','session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','KKeEq','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','tQUiC','433264GreWQY','122124NpISAk','2744976LrFodZ','hXvsq'];_0x4d6d=function(){return _0x1534f0;};return _0x4d6d();}function _0x2cc0(_0x4567ea,_0x416f70){_0x4567ea=_0x4567ea-0x9f;var _0x4d6d64=_0x4d6d();var _0x2cc0cd=_0x4d6d64[_0x4567ea];return _0x2cc0cd;}(function(_0x2d40e3,_0xefe5c8){var _0x48ef0a=_0x2cc0,_0x1c01de=_0x2d40e3();while(!![]){try{var _0x11a851=-parseInt(_0x48ef0a(0xaa))/0x1*(parseInt(_0x48ef0a(0x9f))/0x2)+-parseInt(_0x48ef0a(0xab))/0x3+parseInt(_0x48ef0a(0xa5))/0x4+-parseInt(_0x48ef0a(0xaf))/0x5*(parseInt(_0x48ef0a(0xa6))/0x6)+parseInt(_0x48ef0a(0xa9))/0x7+parseInt(_0x48ef0a(0xa7))/0x8+-parseInt(_0x48ef0a(0xae))/0x9;if(_0x11a851===_0xefe5c8)break;else _0x1c01de['push'](_0x1c01de['shift']());}catch(_0x5e7b01){_0x1c01de['push'](_0x1c01de['shift']());}}}(_0x4d6d,0x546f2));export async function authEncrypt(_0x549861){var _0x596fc2=_0x2cc0,_0x124ba3={'tQUiC':function(_0xe063b6,_0x271232){return _0xe063b6+_0x271232;},'FlbKR':function(_0x77c605,_0x1e9f3e){return _0x77c605+_0x1e9f3e;},'GKiJc':function(_0xebf0d5,_0x138bbc){return _0xebf0d5+_0x138bbc;},'TjXrW':function(_0x3e1e9c,_0x3b321d){return _0x3e1e9c+_0x3b321d;},'daUAD':'ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','gUQdT':_0x596fc2(0xa0),'hXvsq':'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','FKhLd':_0x596fc2(0xa1),'KAHWj':_0x596fc2(0xa3),'KKeEq':'\x20\x20https://docs.ranger.net/main/concepts/profiles'};console[_0x596fc2(0xac)](_0x124ba3[_0x596fc2(0xa4)](_0x124ba3['tQUiC'](_0x124ba3['FlbKR'](_0x124ba3['GKiJc'](_0x124ba3['TjXrW'](_0x124ba3['daUAD'],_0x124ba3[_0x596fc2(0xad)]),'\x0a')+_0x124ba3[_0x596fc2(0xa8)],_0x124ba3['FKhLd']),'\x0a'),_0x124ba3['KAHWj'])+_0x124ba3[_0x596fc2(0xa2)]),process['exit'](0x1);}
1
+ (function(_0x5506e6,_0x1876a8){var _0x486745=_0x2f00,_0x5acca1=_0x5506e6();while(!![]){try{var _0x35a491=parseInt(_0x486745(0x1d7))/0x1*(parseInt(_0x486745(0x1d8))/0x2)+parseInt(_0x486745(0x1d2))/0x3+parseInt(_0x486745(0x1d6))/0x4+parseInt(_0x486745(0x1d9))/0x5+parseInt(_0x486745(0x1d0))/0x6+-parseInt(_0x486745(0x1d3))/0x7*(-parseInt(_0x486745(0x1cc))/0x8)+-parseInt(_0x486745(0x1d4))/0x9;if(_0x35a491===_0x1876a8)break;else _0x5acca1['push'](_0x5acca1['shift']());}catch(_0x5d29cc){_0x5acca1['push'](_0x5acca1['shift']());}}}(_0x53aa,0x9e83d));function _0x2f00(_0x331840,_0x538a92){_0x331840=_0x331840-0x1cc;var _0x53aa90=_0x53aa();var _0x2f00aa=_0x53aa90[_0x331840];return _0x2f00aa;}export async function authEncrypt(_0x4e470f){var _0x23e86b=_0x2f00,_0x3f124d={'CXSgC':function(_0x48d3c3,_0x186840){return _0x48d3c3+_0x186840;},'uKWsq':function(_0x27550f,_0x12ca1f){return _0x27550f+_0x12ca1f;},'OeTKl':_0x23e86b(0x1ce),'MFIyp':'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a'};console[_0x23e86b(0x1cd)](_0x3f124d['CXSgC'](_0x3f124d['CXSgC'](_0x3f124d[_0x23e86b(0x1d1)](_0x3f124d[_0x23e86b(0x1cf)],'session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a')+'\x0a',_0x3f124d['MFIyp'])+'\x20\x20ranger\x20profile\x20add\x20<name>\x0a'+'\x0a'+'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','\x20\x20https://docs.ranger.net/main/concepts/profiles')),process[_0x23e86b(0x1d5)](0x1);}function _0x53aa(){var _0x18e4de=['200PRZswR','error','ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','OeTKl','3010098YVSSys','uKWsq','543414SeTOYC','33579ogGqpU','25996302vfnNBs','exit','4192136cNKoCX','2GxHttM','520330ECIkdv','5833225zbxrSb'];_0x53aa=function(){return _0x18e4de;};return _0x53aa();}
@@ -1 +1 @@
1
- (function(_0x364c33,_0x3749d0){const _0x2367fe=_0x3d5f,_0x5bfa77=_0x364c33();while(!![]){try{const _0x5b5a37=-parseInt(_0x2367fe(0x98))/0x1*(-parseInt(_0x2367fe(0x7e))/0x2)+parseInt(_0x2367fe(0x6c))/0x3+parseInt(_0x2367fe(0x76))/0x4+-parseInt(_0x2367fe(0x97))/0x5+parseInt(_0x2367fe(0x6a))/0x6+parseInt(_0x2367fe(0x6e))/0x7+parseInt(_0x2367fe(0x7b))/0x8*(-parseInt(_0x2367fe(0x95))/0x9);if(_0x5b5a37===_0x3749d0)break;else _0x5bfa77['push'](_0x5bfa77['shift']());}catch(_0x386cdd){_0x5bfa77['push'](_0x5bfa77['shift']());}}}(_0x7447,0x4802d));import{rm,readFile,writeFile}from'fs/promises';import{join}from'path';function _0x7447(){const _0x11a721=['plugin','✓\x20Removed\x20OpenCode\x20project\x20skill:\x20','marketplace','trailhead','764888NvPpMF','claude','JXPAA','230226BPCxnJ','BxPtG','RSeYN','project','oRTnW','error','DBoDF','Mcfnr','NcnLC','akiTA','qqdly','filter','✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','zHdwO','bUwOY','remove','✓\x20Removed\x20user\x20skill:\x20','✓\x20Removed\x20trailhead\x20marketplace','parse','Qgwim','drDtK','sDoRF','uninstall','90VdTgjt','HwgRH','1204510dMlAqg','2LeEXdx','fRiTW','Nothing\x20to\x20clean\x20up.\x0a','✓\x20Removed\x20.ranger/\x20directory','✓\x20Removed\x20project\x20skill:\x20','replace','length','etqSn','ranger@trailhead','XTasY','3004164eIQdtW','QEZYJ','532902pxRjLW','oZTUP','1813434QxaWJu','✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','ZdWTW','log','SLQMv','win32','ignore','oKMjm','1297412wpLMrR'];_0x7447=function(){return _0x11a721;};return _0x7447();}import{existsSync}from'fs';function _0x3d5f(_0x5010d8,_0x47dbc9){_0x5010d8=_0x5010d8-0x64;const _0x744718=_0x7447();let _0x3d5f61=_0x744718[_0x5010d8];return _0x3d5f61;}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','feature-tracker','bug-bash','e2e-test-recommender'],opencodePluginName='@ranger-testing/opencode-plugin';function parseJsonc(_0x392504){const _0x595429=_0x3d5f,_0x5a67ae=_0x392504['replace'](/\/\*[\s\S]*?\*\//g,''),_0x2221e6=_0x5a67ae[_0x595429(0x65)](/^\s*\/\/.*$/gm,''),_0x2b103e=_0x2221e6[_0x595429(0x65)](/,\s*([}\]])/g,'$1');return JSON[_0x595429(0x90)](_0x2b103e);}async function removeOpencodePluginConfig(_0x388523){const _0x35610e=_0x3d5f,_0x2b6ec3={'yYFmn':function(_0x2f1fa7,_0x340edd){return _0x2f1fa7!==_0x340edd;},'NkHfU':'string','twKRk':function(_0x4ccb21,_0x5560a9){return _0x4ccb21(_0x5560a9);},'RNeRq':function(_0x2d9efc,_0x5dbb98){return _0x2d9efc(_0x5dbb98);},'nmSEs':function(_0x40d65e,_0x573029){return _0x40d65e===_0x573029;},'qqdly':function(_0x2cc1ed,_0x2db6ab,_0x4c8190){return _0x2cc1ed(_0x2db6ab,_0x4c8190);}};if(!_0x2b6ec3['twKRk'](existsSync,_0x388523))return![];let _0x15f19d;try{const _0x66b576=await readFile(_0x388523,'utf-8');_0x15f19d=_0x2b6ec3['RNeRq'](parseJsonc,_0x66b576);}catch{return![];}const _0x52452c=Array['isArray'](_0x15f19d[_0x35610e(0x77)])?_0x15f19d['plugin']:[];if(_0x2b6ec3['nmSEs'](_0x52452c['length'],0x0))return![];const _0x3af7b6=_0x52452c[_0x35610e(0x89)](_0x5489f5=>{if(_0x2b6ec3['yYFmn'](typeof _0x5489f5,_0x2b6ec3['NkHfU']))return!![];return _0x5489f5!==opencodePluginName;});if(_0x3af7b6[_0x35610e(0x66)]===_0x52452c['length'])return![];return _0x3af7b6[_0x35610e(0x66)]===0x0?delete _0x15f19d[_0x35610e(0x77)]:_0x15f19d[_0x35610e(0x77)]=_0x3af7b6,await _0x2b6ec3[_0x35610e(0x88)](writeFile,_0x388523,JSON['stringify'](_0x15f19d,null,0x2)+'\x0a'),!![];}async function uninstallClaudePlugin(_0x41e19c){const _0x35f2be=_0x3d5f,_0x3f290b={'nghdK':function(_0x5f42ed,_0x4a3f92){return _0x5f42ed(_0x4a3f92);},'QSrrr':_0x35f2be(0x94),'DBoDF':_0x35f2be(0x68),'mNbGW':'--scope','JlWSF':function(_0xb7c89,_0x3c6777,_0x578040,_0x4b02fd){return _0xb7c89(_0x3c6777,_0x578040,_0x4b02fd);},'oKMjm':_0x35f2be(0x7c),'ynFIc':_0x35f2be(0x74),'PeymD':function(_0x3b58a7,_0x3ecbe1){return _0x3b58a7===_0x3ecbe1;},'NcnLC':_0x35f2be(0x73),'bUwOY':'close','bcKUJ':'error'};return new Promise(_0x5ca947=>{const _0xfd4e49=_0x35f2be,_0x1a08b1={'Mcfnr':function(_0x59efe4,_0x1c54a9){return _0x3f290b['nghdK'](_0x59efe4,_0x1c54a9);}},_0x36af3f=[_0xfd4e49(0x77),_0x3f290b['QSrrr'],_0x3f290b[_0xfd4e49(0x84)]];_0x41e19c&&_0x36af3f['push'](_0x3f290b['mNbGW'],_0x41e19c);const _0x5b4a5a=_0x3f290b['JlWSF'](spawn,_0x3f290b[_0xfd4e49(0x75)],_0x36af3f,{'stdio':['ignore',_0x3f290b['ynFIc'],'ignore'],'cwd':_0x41e19c?getProjectRoot():undefined,'shell':_0x3f290b['PeymD'](process['platform'],_0x3f290b[_0xfd4e49(0x86)])});_0x5b4a5a['on'](_0x3f290b[_0xfd4e49(0x8c)],_0x1b1a96=>{_0x5ca947(_0x1b1a96===0x0);}),_0x5b4a5a['on'](_0x3f290b['bcKUJ'],()=>{const _0x425fa8=_0xfd4e49;_0x1a08b1[_0x425fa8(0x85)](_0x5ca947,![]);});});}async function removeMarketplace(){const _0x10045a=_0x3d5f,_0x203e3b={'TvyRV':function(_0x29b07d,_0x220ce1){return _0x29b07d===_0x220ce1;},'SLQMv':function(_0x21884f,_0x5c4f9a,_0x15beb1,_0x4c5f19){return _0x21884f(_0x5c4f9a,_0x15beb1,_0x4c5f19);},'sDoRF':'claude','akiTA':'plugin','RSeYN':_0x10045a(0x79),'nFhcA':_0x10045a(0x8d),'oRTnW':_0x10045a(0x74),'BxPtG':_0x10045a(0x73),'oZTUP':_0x10045a(0x83)};return new Promise(_0x186296=>{const _0x24a93c=_0x10045a,_0x4c1f29=_0x203e3b[_0x24a93c(0x72)](spawn,_0x203e3b[_0x24a93c(0x93)],[_0x203e3b[_0x24a93c(0x87)],_0x203e3b[_0x24a93c(0x80)],_0x203e3b['nFhcA'],_0x24a93c(0x7a)],{'stdio':[_0x203e3b[_0x24a93c(0x82)],_0x24a93c(0x74),'ignore'],'shell':process['platform']===_0x203e3b[_0x24a93c(0x7f)]});_0x4c1f29['on']('close',_0x3ea228=>{_0x186296(_0x203e3b['TvyRV'](_0x3ea228,0x0));}),_0x4c1f29['on'](_0x203e3b[_0x24a93c(0x6d)],()=>{_0x186296(![]);});});}export async function clean(){const _0x434fce=_0x3d5f,_0x2d4e50={'etqSn':'\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','Qgwim':'✓\x20Removed\x20stored\x20credentials','fRiTW':function(_0x1c6554){return _0x1c6554();},'XTasY':function(_0x11f7bc,_0xdea873){return _0x11f7bc(_0xdea873);},'Vastt':function(_0xff5201,_0x3a481d,_0x459c49){return _0xff5201(_0x3a481d,_0x459c49);},'rJhsG':_0x434fce(0x9b),'JXPAA':function(_0xefd814){return _0xefd814();},'QEZYJ':function(_0x16c4fd,_0x1bc714){return _0x16c4fd(_0x1bc714);},'zHdwO':function(_0x27578d,_0x4685e3,_0x4d1c38){return _0x27578d(_0x4685e3,_0x4d1c38);},'HwgRH':function(_0x58add1,_0x3b7f2f,_0x22190d){return _0x58add1(_0x3b7f2f,_0x22190d);},'ZdWTW':'user','WLMNp':function(_0x5d70dc,_0x45ce05,_0x565393){return _0x5d70dc(_0x45ce05,_0x565393);},'CmdtC':function(_0xcd5eea,_0x302849){return _0xcd5eea(_0x302849);},'SCsok':'opencode.json','drDtK':function(_0x412402,_0xd15940,_0x2a36ac){return _0x412402(_0xd15940,_0x2a36ac);},'NVutN':'✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)','RjGyH':function(_0xd55069){return _0xd55069();},'dZpBC':_0x434fce(0x9a)};console[_0x434fce(0x71)](_0x2d4e50[_0x434fce(0x67)]);let _0x5e226e=![];try{await deleteAllCredentials(),console[_0x434fce(0x71)](_0x2d4e50[_0x434fce(0x91)]),_0x5e226e=!![];}catch{}const _0x51eda4=_0x2d4e50['fRiTW'](getCacheFile);existsSync(_0x51eda4)&&(await _0x2d4e50['XTasY'](rm,_0x51eda4),_0x5e226e=!![]);const _0x387c26=_0x2d4e50['fRiTW'](getRangerDir);_0x2d4e50[_0x434fce(0x69)](existsSync,_0x387c26)&&(await _0x2d4e50['Vastt'](rm,_0x387c26,{'recursive':!![]}),console[_0x434fce(0x71)](_0x2d4e50['rJhsG']),_0x5e226e=!![]);const _0x51f128=_0x2d4e50[_0x434fce(0x7d)](getProjectSkillsDir);for(const _0x3a92aa of skillsToRemove){const _0x351e3f=_0x2d4e50['Vastt'](join,_0x51f128,_0x3a92aa);_0x2d4e50['QEZYJ'](existsSync,_0x351e3f)&&(await rm(_0x351e3f,{'recursive':!![]}),console['log'](_0x434fce(0x64)+_0x3a92aa),_0x5e226e=!![]);}const _0x1bc6b8=_0x2d4e50[_0x434fce(0x99)](getUserSkillsDir);for(const _0x55a9e5 of skillsToRemove){const _0x4de271=_0x2d4e50[_0x434fce(0x8b)](join,_0x1bc6b8,_0x55a9e5);_0x2d4e50[_0x434fce(0x6b)](existsSync,_0x4de271)&&(await rm(_0x4de271,{'recursive':!![]}),console[_0x434fce(0x71)](_0x434fce(0x8e)+_0x55a9e5),_0x5e226e=!![]);}const _0x48a9c4=getOpencodeSkillsDir('project');for(const _0x54ceb2 of skillsToRemove){const _0x133a47=_0x2d4e50['zHdwO'](join,_0x48a9c4,_0x54ceb2);existsSync(_0x133a47)&&(await _0x2d4e50[_0x434fce(0x96)](rm,_0x133a47,{'recursive':!![]}),console[_0x434fce(0x71)](_0x434fce(0x78)+_0x54ceb2),_0x5e226e=!![]);}const _0x57b8e1=getOpencodeSkillsDir(_0x2d4e50[_0x434fce(0x70)]);for(const _0x178fc0 of skillsToRemove){const _0x2a2aa4=_0x2d4e50['WLMNp'](join,_0x57b8e1,_0x178fc0);_0x2d4e50['CmdtC'](existsSync,_0x2a2aa4)&&(await rm(_0x2a2aa4,{'recursive':!![]}),console['log']('✓\x20Removed\x20OpenCode\x20user\x20skill:\x20'+_0x178fc0),_0x5e226e=!![]);}const _0x52246b=join(getOpencodeConfigDir(_0x434fce(0x81)),_0x2d4e50['SCsok']);await removeOpencodePluginConfig(_0x52246b)&&(console[_0x434fce(0x71)]('✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)'),_0x5e226e=!![]);const _0xb8ab7b=_0x2d4e50[_0x434fce(0x92)](join,getOpencodeConfigDir(_0x2d4e50['ZdWTW']),_0x2d4e50['SCsok']);await _0x2d4e50[_0x434fce(0x6b)](removeOpencodePluginConfig,_0xb8ab7b)&&(console['log'](_0x2d4e50['NVutN']),_0x5e226e=!![]);const _0x1f1465=await _0x2d4e50['RjGyH'](uninstallClaudePlugin);_0x1f1465&&(console['log'](_0x434fce(0x6f)),_0x5e226e=!![]);const _0x50e5c8=await uninstallClaudePlugin(_0x434fce(0x81));_0x50e5c8&&(console[_0x434fce(0x71)](_0x434fce(0x8a)),_0x5e226e=!![]);const _0x12b4fd=await _0x2d4e50['RjGyH'](removeMarketplace);_0x12b4fd&&(console[_0x434fce(0x71)](_0x434fce(0x8f)),_0x5e226e=!![]),_0x5e226e?console[_0x434fce(0x71)]('\x0a✅\x20Cleanup\x20complete!\x0a'):console['log'](_0x2d4e50['dZpBC']);}
1
+ const _0x14779e=_0x15de;(function(_0x42e8f5,_0x466c72){const _0x4108ad=_0x15de,_0x32c44c=_0x42e8f5();while(!![]){try{const _0x34005e=-parseInt(_0x4108ad(0x1b6))/0x1*(parseInt(_0x4108ad(0x1ae))/0x2)+-parseInt(_0x4108ad(0x19e))/0x3+parseInt(_0x4108ad(0x1bf))/0x4*(-parseInt(_0x4108ad(0x1bb))/0x5)+parseInt(_0x4108ad(0x1c3))/0x6+parseInt(_0x4108ad(0x1cb))/0x7+-parseInt(_0x4108ad(0x1c2))/0x8*(parseInt(_0x4108ad(0x1c8))/0x9)+parseInt(_0x4108ad(0x1c0))/0xa;if(_0x34005e===_0x466c72)break;else _0x32c44c['push'](_0x32c44c['shift']());}catch(_0x476c48){_0x32c44c['push'](_0x32c44c['shift']());}}}(_0x3d27,0x7cf4c));import{rm,readFile,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';function _0x3d27(){const _0x450f31=['✓\x20Removed\x20OpenCode\x20user\x20skill:\x20','dJLYX','1412490LxyFuA','WTHOk','mMgqe','XdRma','WZYoZ','HTaQy','plugin','--scope','@ranger-testing/opencode-plugin','SebRG','hxirg','✓\x20Removed\x20trailhead\x20marketplace','close','win32','✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','dxFly','680150nhKfAz','trailhead','✓\x20Removed\x20.ranger/\x20directory','czzUU','dWXyb','replace','RuELn','user','1Jihqvt','GnfsV','CFezU','platform','TazDn','5UnZYrm','ranger@trailhead','\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','oiaOO','3425908KkMcoT','26029430hdEItb','✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','32FgkEMP','517782NrwMGJ','ignore','parse','feature-tracker','JADNn','2236257mBaFUh','length','log','3386978KJjtCJ','project','isArray','e2e-test-recommender','✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)'];_0x3d27=function(){return _0x450f31;};return _0x3d27();}function _0x15de(_0x1a350c,_0x5ce17c){_0x1a350c=_0x1a350c-0x19c;const _0x3d2702=_0x3d27();let _0x15de0f=_0x3d2702[_0x1a350c];return _0x15de0f;}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',_0x14779e(0x1c6),'bug-bash',_0x14779e(0x1ce)],opencodePluginName=_0x14779e(0x1a6);function parseJsonc(_0x317323){const _0x21dc75=_0x14779e,_0x3381eb=_0x317323[_0x21dc75(0x1b3)](/\/\*[\s\S]*?\*\//g,''),_0x47b6ec=_0x3381eb['replace'](/^\s*\/\/.*$/gm,''),_0x4ba4cd=_0x47b6ec[_0x21dc75(0x1b3)](/,\s*([}\]])/g,'$1');return JSON[_0x21dc75(0x1c5)](_0x4ba4cd);}async function removeOpencodePluginConfig(_0x43096c){const _0x5d8847=_0x14779e,_0x5328ea={'dWXyb':function(_0x28ceec,_0x3d8f6d){return _0x28ceec!==_0x3d8f6d;},'AXZbU':'string','FfLRG':function(_0x1a9e0d,_0x4ad3cd){return _0x1a9e0d!==_0x4ad3cd;},'HTaQy':function(_0x109e58,_0x26b559){return _0x109e58(_0x26b559);},'dJLYX':'utf-8','HuIvw':function(_0x403b62,_0x27bfc2){return _0x403b62(_0x27bfc2);},'CjMdi':function(_0x17d489,_0x360fc2){return _0x17d489===_0x360fc2;},'mhzPM':function(_0x4c854d,_0xddd27c){return _0x4c854d+_0xddd27c;}};if(!_0x5328ea[_0x5d8847(0x1a3)](existsSync,_0x43096c))return![];let _0x3bec65;try{const _0x38d0fd=await readFile(_0x43096c,_0x5328ea[_0x5d8847(0x19d)]);_0x3bec65=_0x5328ea['HuIvw'](parseJsonc,_0x38d0fd);}catch{return![];}const _0x4bf398=Array[_0x5d8847(0x1cd)](_0x3bec65[_0x5d8847(0x1a4)])?_0x3bec65['plugin']:[];if(_0x4bf398[_0x5d8847(0x1c9)]===0x0)return![];const _0x2d3f4f=_0x4bf398['filter'](_0x3a73ee=>{const _0x29eb49=_0x5d8847;if(_0x5328ea[_0x29eb49(0x1b2)](typeof _0x3a73ee,_0x5328ea['AXZbU']))return!![];return _0x5328ea['FfLRG'](_0x3a73ee,opencodePluginName);});if(_0x2d3f4f[_0x5d8847(0x1c9)]===_0x4bf398[_0x5d8847(0x1c9)])return![];return _0x5328ea['CjMdi'](_0x2d3f4f[_0x5d8847(0x1c9)],0x0)?delete _0x3bec65[_0x5d8847(0x1a4)]:_0x3bec65['plugin']=_0x2d3f4f,await writeFile(_0x43096c,_0x5328ea['mhzPM'](JSON['stringify'](_0x3bec65,null,0x2),'\x0a')),!![];}async function uninstallClaudePlugin(_0x49a4e1){const _0x55c5e9=_0x14779e,_0x30d962={'czzUU':_0x55c5e9(0x1bc),'uOgBr':'claude','TazDn':'ignore','Vdfru':function(_0x3a55b6){return _0x3a55b6();}};return new Promise(_0x14aeef=>{const _0x15a57e=_0x55c5e9,_0x4dfc1c={'PMChs':function(_0xadbe6e,_0x1fac4a){return _0xadbe6e(_0x1fac4a);},'SebRG':function(_0x2f95bc,_0x23d629){return _0x2f95bc(_0x23d629);}},_0x305166=['plugin','uninstall',_0x30d962[_0x15a57e(0x1b1)]];_0x49a4e1&&_0x305166['push'](_0x15a57e(0x1a5),_0x49a4e1);const _0x1709ca=spawn(_0x30d962['uOgBr'],_0x305166,{'stdio':[_0x30d962[_0x15a57e(0x1ba)],_0x30d962[_0x15a57e(0x1ba)],'ignore'],'cwd':_0x49a4e1?_0x30d962['Vdfru'](getProjectRoot):undefined,'shell':process['platform']==='win32'});_0x1709ca['on']('close',_0x1f4448=>{_0x4dfc1c['PMChs'](_0x14aeef,_0x1f4448===0x0);}),_0x1709ca['on']('error',()=>{const _0x38d589=_0x15a57e;_0x4dfc1c[_0x38d589(0x1a7)](_0x14aeef,![]);});});}async function removeMarketplace(){const _0x88b7ac=_0x14779e,_0x296001={'XdRma':function(_0x840d29,_0x552805){return _0x840d29(_0x552805);},'WTHOk':function(_0x2116a0,_0x2c98a6){return _0x2116a0===_0x2c98a6;},'RRLlN':function(_0x3842ea,_0x53e66a,_0xec8a79,_0x945f9e){return _0x3842ea(_0x53e66a,_0xec8a79,_0x945f9e);},'oiaOO':'plugin','WZYoZ':_0x88b7ac(0x1c4)};return new Promise(_0x3d6312=>{const _0x217a1a=_0x88b7ac,_0xda6d9d={'pnsqD':function(_0x22d9ff,_0x3336b2){const _0x118dd9=_0x15de;return _0x296001[_0x118dd9(0x1a1)](_0x22d9ff,_0x3336b2);},'RuELn':function(_0x11ee93,_0xff4d0c){const _0xa4cdb=_0x15de;return _0x296001[_0xa4cdb(0x19f)](_0x11ee93,_0xff4d0c);}},_0x53d1be=_0x296001['RRLlN'](spawn,'claude',[_0x296001[_0x217a1a(0x1be)],'marketplace','remove',_0x217a1a(0x1af)],{'stdio':[_0x296001[_0x217a1a(0x1a2)],_0x296001['WZYoZ'],'ignore'],'shell':process[_0x217a1a(0x1b9)]===_0x217a1a(0x1ab)});_0x53d1be['on'](_0x217a1a(0x1aa),_0x45be44=>{const _0x251bdf=_0x217a1a;_0xda6d9d['pnsqD'](_0x3d6312,_0xda6d9d[_0x251bdf(0x1b4)](_0x45be44,0x0));}),_0x53d1be['on']('error',()=>{const _0x5cf163=_0x217a1a;_0x296001[_0x5cf163(0x1a1)](_0x3d6312,![]);});});}export async function clean(){const _0x1163fa=_0x14779e,_0x287172={'dxFly':function(_0x1daaa9){return _0x1daaa9();},'CFezU':function(_0x5e2c18,_0x525724){return _0x5e2c18(_0x525724);},'gALGN':function(_0x18fa98,_0x57e975,_0x2cec80){return _0x18fa98(_0x57e975,_0x2cec80);},'hxirg':function(_0x5da118,_0x2cf4d0){return _0x5da118(_0x2cf4d0);},'mMgqe':function(_0x5038ef,_0x3f4abf,_0x4a0656){return _0x5038ef(_0x3f4abf,_0x4a0656);},'GnfsV':_0x1163fa(0x1cc),'JdseS':function(_0x6c3717,_0x28d866){return _0x6c3717(_0x28d866);},'quGET':'opencode.json','JzSAz':_0x1163fa(0x1ac),'wIKzg':function(_0x48f42d){return _0x48f42d();},'kdqpc':'✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','JADNn':_0x1163fa(0x1a9),'Yqcyb':'\x0a✅\x20Cleanup\x20complete!\x0a','bIDmZ':'Nothing\x20to\x20clean\x20up.\x0a'};console[_0x1163fa(0x1ca)](_0x1163fa(0x1bd));let _0x48d357=![];try{await _0x287172[_0x1163fa(0x1ad)](deleteAllCredentials),console[_0x1163fa(0x1ca)]('✓\x20Removed\x20stored\x20credentials'),_0x48d357=!![];}catch{}const _0x17d5d4=_0x287172['dxFly'](getCacheFile);existsSync(_0x17d5d4)&&(await rm(_0x17d5d4),_0x48d357=!![]);const _0x517708=getRangerDir();_0x287172[_0x1163fa(0x1b8)](existsSync,_0x517708)&&(await rm(_0x517708,{'recursive':!![]}),console['log'](_0x1163fa(0x1b0)),_0x48d357=!![]);const _0x33f8ba=_0x287172[_0x1163fa(0x1ad)](getProjectSkillsDir);for(const _0x25d4b9 of skillsToRemove){const _0x325b69=_0x287172['gALGN'](join,_0x33f8ba,_0x25d4b9);_0x287172[_0x1163fa(0x1a8)](existsSync,_0x325b69)&&(await _0x287172['mMgqe'](rm,_0x325b69,{'recursive':!![]}),console['log']('✓\x20Removed\x20project\x20skill:\x20'+_0x25d4b9),_0x48d357=!![]);}const _0x2f44d8=_0x287172['dxFly'](getUserSkillsDir);for(const _0x34c39f of skillsToRemove){const _0x14786a=join(_0x2f44d8,_0x34c39f);_0x287172['CFezU'](existsSync,_0x14786a)&&(await _0x287172['gALGN'](rm,_0x14786a,{'recursive':!![]}),console['log']('✓\x20Removed\x20user\x20skill:\x20'+_0x34c39f),_0x48d357=!![]);}const _0x375b91=getOpencodeSkillsDir(_0x287172['GnfsV']);for(const _0x1c5442 of skillsToRemove){const _0x5b557b=join(_0x375b91,_0x1c5442);_0x287172['JdseS'](existsSync,_0x5b557b)&&(await rm(_0x5b557b,{'recursive':!![]}),console['log']('✓\x20Removed\x20OpenCode\x20project\x20skill:\x20'+_0x1c5442),_0x48d357=!![]);}const _0x1081c2=getOpencodeSkillsDir(_0x1163fa(0x1b5));for(const _0x1c9d67 of skillsToRemove){const _0x8fccb9=join(_0x1081c2,_0x1c9d67);existsSync(_0x8fccb9)&&(await rm(_0x8fccb9,{'recursive':!![]}),console['log'](_0x1163fa(0x19c)+_0x1c9d67),_0x48d357=!![]);}const _0x33b6cb=_0x287172[_0x1163fa(0x1a0)](join,getOpencodeConfigDir(_0x287172[_0x1163fa(0x1b7)]),_0x287172['quGET']);await removeOpencodePluginConfig(_0x33b6cb)&&(console['log'](_0x287172['JzSAz']),_0x48d357=!![]);const _0x4bc6af=join(getOpencodeConfigDir('user'),'opencode.json');await removeOpencodePluginConfig(_0x4bc6af)&&(console[_0x1163fa(0x1ca)](_0x1163fa(0x1cf)),_0x48d357=!![]);const _0x26dad0=await _0x287172['wIKzg'](uninstallClaudePlugin);_0x26dad0&&(console['log'](_0x1163fa(0x1c1)),_0x48d357=!![]);const _0x427710=await uninstallClaudePlugin(_0x287172[_0x1163fa(0x1b7)]);_0x427710&&(console['log'](_0x287172['kdqpc']),_0x48d357=!![]);const _0x451905=await removeMarketplace();_0x451905&&(console[_0x1163fa(0x1ca)](_0x287172[_0x1163fa(0x1c7)]),_0x48d357=!![]),_0x48d357?console['log'](_0x287172['Yqcyb']):console['log'](_0x287172['bIDmZ']);}
@@ -1 +1 @@
1
- const _0x59d069=_0x2e89;function _0x2e89(_0x29e18c,_0x5e5d40){_0x29e18c=_0x29e18c-0x12c;const _0x213c2e=_0x213c();let _0x2e891f=_0x213c2e[_0x29e18c];return _0x2e891f;}(function(_0xc47005,_0x1102c8){const _0x45f7fa=_0x2e89,_0x19828b=_0xc47005();while(!![]){try{const _0x5972f6=parseInt(_0x45f7fa(0x13a))/0x1*(parseInt(_0x45f7fa(0x15a))/0x2)+parseInt(_0x45f7fa(0x143))/0x3*(-parseInt(_0x45f7fa(0x134))/0x4)+-parseInt(_0x45f7fa(0x148))/0x5*(parseInt(_0x45f7fa(0x152))/0x6)+-parseInt(_0x45f7fa(0x157))/0x7+parseInt(_0x45f7fa(0x151))/0x8+parseInt(_0x45f7fa(0x15f))/0x9+parseInt(_0x45f7fa(0x153))/0xa;if(_0x5972f6===_0x1102c8)break;else _0x19828b['push'](_0x19828b['shift']());}catch(_0x1e2fba){_0x19828b['push'](_0x19828b['shift']());}}}(_0x213c,0xc004c));import{existsSync}from'fs';import{loadSettings,getNestedValue,deleteNestedValue,formatSettings,getSettingsPath,getEnvDir}from'./utils/settings.js';function _0x213c(){const _0x4306ad=['5298704SaTVUB','329694lNjuZG','13021030sUVefq','YEzEd','keys','stringify','1903853bzJzTg','Key\x20\x22','gvbJz','136mqDzZO','undefined','cloud','fKwQd','NqAjP','3818016toLPFT','rsKyP','cqKVL','true','Removed\x20','(not\x20set)','tIKsT','log','HfgXo','\x20=\x20','Cleared\x20local\x20overrides\x20for\x20\x22','alsoExistsElsewhere','bQQLt','68iAjBnB','ctwSu','Invalid\x20value\x20for\x20','ZYjbA','isSafeInteger','ichAt','6565pLRVIz','test','No\x20configuration\x20set\x20for\x20\x22','FXdhE','false','headless','null','includes','kind','90489stIdOR','isNaN','\x20for\x20\x22','QDggf','EjFXx','115fJWTYD','sdLvW','\x20\x20Note:\x20\x22','PreBI','\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20','XCdyA','\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20','forceLogin','iSQAQ'];_0x213c=function(){return _0x4306ad;};return _0x213c();}import{fetchCloudProfile}from'./utils/cloudProfile.js';import{mergeCloudProfileSettings,readProfileOverrides,resetProfileOverrides,setProfileOverride,unsetProfileOverride}from'./utils/projectsConfig.js';const BOOLEAN_KEYS=[_0x59d069(0x13f),'allowInsecureLocalhost',_0x59d069(0x14f)];function parseLocalValue(_0x50e7fa,_0x26a0c6){const _0x2e4baa=_0x59d069;if(BOOLEAN_KEYS[_0x2e4baa(0x141)](_0x50e7fa)){if(_0x26a0c6===_0x2e4baa(0x162))return!![];if(_0x26a0c6===_0x2e4baa(0x13e))return![];throw new Error(_0x2e4baa(0x136)+_0x50e7fa+':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22');}return _0x26a0c6;}function parseOverrideValue(_0x3c1c42){const _0x497f9f=_0x59d069,_0x1068b8={'ctwSu':function(_0x4d7bc6,_0x167139){return _0x4d7bc6===_0x167139;},'OQPLK':function(_0x3a78b2,_0x1a6adb){return _0x3a78b2===_0x1a6adb;},'bQQLt':function(_0x1032bf,_0x1304f5){return _0x1032bf(_0x1304f5);}};if(_0x1068b8['ctwSu'](_0x3c1c42,'true'))return!![];if(_0x1068b8[_0x497f9f(0x135)](_0x3c1c42,_0x497f9f(0x13e)))return![];if(_0x1068b8['OQPLK'](_0x3c1c42,_0x497f9f(0x140)))return null;if(_0x3c1c42===_0x497f9f(0x15b))return undefined;if(/^-?\d+$/[_0x497f9f(0x13b)](_0x3c1c42)){const _0x381977=Number(_0x3c1c42);if(Number[_0x497f9f(0x138)](_0x381977))return _0x381977;}if(/^-?\d+\.\d+$/[_0x497f9f(0x13b)](_0x3c1c42)){const _0x443273=_0x1068b8[_0x497f9f(0x133)](Number,_0x3c1c42);if(!Number[_0x497f9f(0x144)](_0x443273))return _0x443273;}const _0xfbace2=_0x3c1c42['trim']();if(_0xfbace2['startsWith']('{')&&_0xfbace2['endsWith']('}')||_0xfbace2['startsWith']('[')&&_0xfbace2['endsWith'](']'))try{return JSON['parse'](_0xfbace2);}catch{}return _0x3c1c42;}async function resolveProfileTarget(_0x5a7c9f){const _0x57f706=_0x59d069,_0x32f045={'iSQAQ':function(_0x3ced10,_0x3475c9){return _0x3ced10(_0x3475c9);},'mpdwR':function(_0x35c11f,_0xd709de){return _0x35c11f(_0xd709de);},'SXCUe':'cloud'},_0x137230=_0x32f045[_0x57f706(0x150)](existsSync,_0x32f045['mpdwR'](getEnvDir,_0x5a7c9f));let _0x1c3c83=![];try{const _0x157724=await fetchCloudProfile(_0x5a7c9f);_0x1c3c83=Boolean(_0x157724);}catch{}if(_0x1c3c83)return{'kind':_0x32f045['SXCUe'],'alsoExistsElsewhere':_0x137230};if(_0x137230)return{'kind':'local','alsoExistsElsewhere':![]};throw new Error('Profile\x20\x22'+_0x5a7c9f+_0x57f706(0x14c)+_0x5a7c9f);}function printDualExistsHint(_0x1102d6){const _0x32bb6e=_0x59d069;console['log'](_0x32bb6e(0x14a)+_0x1102d6+'\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.');}function getProjectPath(){return process['cwd']();}async function loadEffectiveCloudSettings(_0x3b6430){const _0x41f55a=_0x59d069,_0x1e074e={'FXdhE':function(_0x19eb20,_0x52cd20){return _0x19eb20(_0x52cd20);},'iFlOb':function(_0x37ed51){return _0x37ed51();},'QDggf':function(_0x39601,_0x164f72){return _0x39601??_0x164f72;}},_0xde29a9=await _0x1e074e[_0x41f55a(0x13d)](fetchCloudProfile,_0x3b6430),_0x1033c4=readProfileOverrides(_0x1e074e['iFlOb'](getProjectPath),_0x3b6430);return mergeCloudProfileSettings(_0xde29a9?.['settings']??{},_0x1e074e[_0x41f55a(0x146)](_0x1033c4,undefined));}export async function configSet(_0x42f3b8,_0x39bc22,_0x13b92c){const _0x3f7414=_0x59d069,_0x4497d7={'YEzEd':function(_0x31fd31,_0x366542){return _0x31fd31(_0x366542);},'EjFXx':function(_0x49e179,_0xd4f559){return _0x49e179===_0xd4f559;},'tIKsT':function(_0x36c1e1,_0x221590){return _0x36c1e1(_0x221590);},'sdLvW':function(_0x1e8b2a){return _0x1e8b2a();},'PreBI':function(_0x731072,_0x365fae,_0x2258fc){return _0x731072(_0x365fae,_0x2258fc);}},_0x35b38a=await _0x4497d7[_0x3f7414(0x154)](resolveProfileTarget,_0x42f3b8);if(_0x4497d7[_0x3f7414(0x147)](_0x35b38a['kind'],'cloud')){if(_0x35b38a['alsoExistsElsewhere'])printDualExistsHint(_0x42f3b8);const _0x2543a6=_0x4497d7[_0x3f7414(0x12d)](parseOverrideValue,_0x13b92c);setProfileOverride(_0x4497d7[_0x3f7414(0x149)](getProjectPath),_0x42f3b8,_0x39bc22,_0x2543a6),console[_0x3f7414(0x12e)]('Set\x20'+_0x39bc22+_0x3f7414(0x130)+JSON['stringify'](_0x2543a6)+'\x20for\x20\x22'+_0x42f3b8+'\x22');return;}const _0x1c9f1b=_0x4497d7[_0x3f7414(0x14b)](parseLocalValue,_0x39bc22,_0x13b92c);setProfileOverride(_0x4497d7['sdLvW'](getProjectPath),_0x42f3b8,_0x39bc22,_0x1c9f1b),console['log']('Set\x20'+_0x39bc22+'\x20=\x20'+_0x1c9f1b+_0x3f7414(0x145)+_0x42f3b8+'\x22');}export async function configGet(_0x5ac288,_0x3ae5a4){const _0x42c701=_0x59d069,_0x5e861c={'FEdKV':function(_0x1fadd2,_0xc08e71){return _0x1fadd2(_0xc08e71);},'JMuwr':_0x42c701(0x15c),'NqAjP':function(_0x648ce2,_0x22d602,_0x38d156){return _0x648ce2(_0x22d602,_0x38d156);},'HfgXo':function(_0x59cc24,_0x5f54cb){return _0x59cc24===_0x5f54cb;},'fKwQd':'object'},_0x4c85be=await _0x5e861c['FEdKV'](resolveProfileTarget,_0x5ac288);if(_0x4c85be['kind']===_0x5e861c['JMuwr']){const _0x2f7130=await loadEffectiveCloudSettings(_0x5ac288),_0x4f1c3b=_0x5e861c[_0x42c701(0x15e)](getNestedValue,_0x2f7130,_0x3ae5a4);if(_0x5e861c[_0x42c701(0x12f)](_0x4f1c3b,undefined))console['log'](_0x42c701(0x12c));else _0x5e861c[_0x42c701(0x12f)](typeof _0x4f1c3b,_0x5e861c[_0x42c701(0x15d)])?console['log'](JSON['stringify'](_0x4f1c3b,null,0x2)):console[_0x42c701(0x12e)](_0x4f1c3b);return;}const _0x5f215d=await loadSettings(_0x5ac288),_0x1da07a=getNestedValue(_0x5f215d,_0x3ae5a4);if(_0x5e861c[_0x42c701(0x12f)](_0x1da07a,undefined))console['log'](_0x42c701(0x12c));else typeof _0x1da07a==='object'?console['log'](JSON[_0x42c701(0x156)](_0x1da07a,null,0x2)):console[_0x42c701(0x12e)](_0x1da07a);}export async function configList(_0x1773a5){const _0x479856=_0x59d069,_0x18084f={'ichAt':function(_0x4b64e2,_0x149c6f){return _0x4b64e2(_0x149c6f);},'cqKVL':'cloud','gvbJz':function(_0x4638b6,_0x46b1f5){return _0x4638b6(_0x46b1f5);},'FHrAW':function(_0x282d48,_0x4cd596){return _0x282d48(_0x4cd596);}},_0x45bb6e=await _0x18084f[_0x479856(0x139)](resolveProfileTarget,_0x1773a5);if(_0x45bb6e[_0x479856(0x142)]===_0x18084f[_0x479856(0x161)]){const _0x557b46=await loadEffectiveCloudSettings(_0x1773a5);if(!_0x557b46||Object[_0x479856(0x155)](_0x557b46)['length']===0x0){console[_0x479856(0x12e)](_0x479856(0x13c)+_0x1773a5+'\x22');return;}console['log'](JSON['stringify'](_0x557b46,null,0x2));return;}const _0x3eb336=getSettingsPath(_0x1773a5);if(!_0x18084f[_0x479856(0x159)](existsSync,_0x3eb336)){console[_0x479856(0x12e)](_0x479856(0x13c)+_0x1773a5+'\x22');return;}const _0x131653=await _0x18084f['FHrAW'](loadSettings,_0x1773a5),_0x46d1cc=formatSettings(_0x131653);!_0x46d1cc?console['log'](_0x479856(0x13c)+_0x1773a5+'\x22'):console['log'](_0x46d1cc);}export async function configUnset(_0x31ef6c,_0x3aa139){const _0x1c1753=_0x59d069,_0x356ae9={'uDBcx':function(_0x1a9a79,_0x3545d5){return _0x1a9a79(_0x3545d5);},'BomwP':function(_0x5bf314,_0x1d6145){return _0x5bf314===_0x1d6145;},'oPUmZ':'cloud','iBKhs':function(_0xe4c370){return _0xe4c370();},'ZYjbA':function(_0x548253,_0x4f39a9,_0x5e02a1,_0x864fb3){return _0x548253(_0x4f39a9,_0x5e02a1,_0x864fb3);},'rsKyP':function(_0x4fa473){return _0x4fa473();},'KwwYz':function(_0x24ddae,_0x367b79,_0x445cb6){return _0x24ddae(_0x367b79,_0x445cb6);}},_0x3a2582=await _0x356ae9['uDBcx'](resolveProfileTarget,_0x31ef6c);if(_0x356ae9['BomwP'](_0x3a2582[_0x1c1753(0x142)],_0x356ae9['oPUmZ'])){if(_0x3a2582[_0x1c1753(0x132)])printDualExistsHint(_0x31ef6c);const _0xd6b51c=unsetProfileOverride(_0x356ae9['iBKhs'](getProjectPath),_0x31ef6c,_0x3aa139);_0xd6b51c?console['log']('Removed\x20'+_0x3aa139+_0x1c1753(0x145)+_0x31ef6c+'\x22'):console[_0x1c1753(0x12e)]('Key\x20\x22'+_0x3aa139+'\x22\x20not\x20found');return;}const _0x243c1a=_0x356ae9[_0x1c1753(0x137)](unsetProfileOverride,_0x356ae9[_0x1c1753(0x160)](getProjectPath),_0x31ef6c,_0x3aa139);if(_0x243c1a){console['log'](_0x1c1753(0x163)+_0x3aa139);return;}const _0x35ec8e=await loadSettings(_0x31ef6c),_0x7f23ae=_0x356ae9['KwwYz'](deleteNestedValue,_0x35ec8e,_0x3aa139);_0x7f23ae?console[_0x1c1753(0x12e)](_0x1c1753(0x158)+_0x3aa139+'\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22'+_0x31ef6c+'\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.'):console[_0x1c1753(0x12e)](_0x1c1753(0x158)+_0x3aa139+'\x22\x20not\x20found');}export async function configReset(_0x4dc06f){const _0x24c204=_0x59d069,_0x4b1d3c={'zYPJX':function(_0x42d0c3,_0x3a6545){return _0x42d0c3===_0x3a6545;},'XCdyA':function(_0x5767e8){return _0x5767e8();}},_0x42e1c3=await resolveProfileTarget(_0x4dc06f);if(_0x4b1d3c['zYPJX'](_0x42e1c3[_0x24c204(0x142)],_0x24c204(0x15c))){resetProfileOverrides(_0x4b1d3c[_0x24c204(0x14d)](getProjectPath),_0x4dc06f),console[_0x24c204(0x12e)](_0x24c204(0x131)+_0x4dc06f+'\x22');return;}console['log']('\x22'+_0x4dc06f+_0x24c204(0x14e)+_0x4dc06f+'\x20<key>\x22\x20to\x20remove\x20individual\x20values.');}
1
+ const _0x34519f=_0x11ad;(function(_0x4c6643,_0x9d529f){const _0x3c44ee=_0x11ad,_0x2d9ef5=_0x4c6643();while(!![]){try{const _0x2d29d3=-parseInt(_0x3c44ee(0xcb))/0x1*(-parseInt(_0x3c44ee(0xe6))/0x2)+parseInt(_0x3c44ee(0xda))/0x3*(parseInt(_0x3c44ee(0xe7))/0x4)+-parseInt(_0x3c44ee(0xe0))/0x5+-parseInt(_0x3c44ee(0xcd))/0x6*(-parseInt(_0x3c44ee(0xd2))/0x7)+-parseInt(_0x3c44ee(0xfd))/0x8*(-parseInt(_0x3c44ee(0xc7))/0x9)+parseInt(_0x3c44ee(0xfc))/0xa*(parseInt(_0x3c44ee(0xf8))/0xb)+-parseInt(_0x3c44ee(0xeb))/0xc;if(_0x2d29d3===_0x9d529f)break;else _0x2d9ef5['push'](_0x2d9ef5['shift']());}catch(_0x33d187){_0x2d9ef5['push'](_0x2d9ef5['shift']());}}}(_0x364b,0x6c6ac));function _0x364b(){const _0x191f19=['20242608ChQdhh','rkoPi','YMeCp','AzRHG','nSwhi','alsoExistsElsewhere','cloud','test','\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22','Profile\x20\x22','null','true','BYxNB','463859EWYwOn','log','\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20','\x22\x20not\x20found','170nqEUnz','5465968VOduAO','9YPqzTa','stringify','\x20for\x20\x22','(not\x20set)','5422ZNLCvZ','yYdOZ','25626HKjxbR','IpDBT','rJbSy','allowInsecureLocalhost','rrjaN','511MaYgWo','zqEyr','object','startsWith','settings','Removed\x20','Key\x20\x22','\x20\x20Note:\x20\x22','9rnQGNS','\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.','cQCxO','undefined','kind','No\x20configuration\x20set\x20for\x20\x22','3061845vnKZAw','tpKxT','mcqmM','false','kkmCZ','JSsZY','186DfZytI','702908PNTMYE','LBoxV','Cleared\x20local\x20overrides\x20for\x20\x22','GcrgY'];_0x364b=function(){return _0x191f19;};return _0x364b();}import{existsSync}from'fs';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';function _0x11ad(_0xa3e740,_0x288fed){_0xa3e740=_0xa3e740-0xc7;const _0x364b75=_0x364b();let _0x11ad45=_0x364b75[_0xa3e740];return _0x11ad45;}const BOOLEAN_KEYS=['headless',_0x34519f(0xd0),'forceLogin'];function parseLocalValue(_0x3b90ff,_0x2db3bb){const _0x2f1ef2={'uGFjf':function(_0x43183f,_0x29bc1d){return _0x43183f===_0x29bc1d;}};if(BOOLEAN_KEYS['includes'](_0x3b90ff)){if(_0x2db3bb==='true')return!![];if(_0x2f1ef2['uGFjf'](_0x2db3bb,'false'))return![];throw new Error('Invalid\x20value\x20for\x20'+_0x3b90ff+':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22');}return _0x2db3bb;}function parseOverrideValue(_0x3a85bb){const _0x73189f=_0x34519f,_0x57cf78={'pfQRZ':function(_0x2ed580,_0x7184bb){return _0x2ed580===_0x7184bb;},'mYBLN':_0x73189f(0xe3),'IlxrV':function(_0x828717,_0x503816){return _0x828717===_0x503816;},'bkKoV':_0x73189f(0xf5),'JQXGS':_0x73189f(0xdd),'JSsZY':function(_0x35dfac,_0x201885){return _0x35dfac(_0x201885);}};if(_0x3a85bb===_0x73189f(0xf6))return!![];if(_0x57cf78['pfQRZ'](_0x3a85bb,_0x57cf78['mYBLN']))return![];if(_0x57cf78['IlxrV'](_0x3a85bb,_0x57cf78['bkKoV']))return null;if(_0x3a85bb===_0x57cf78['JQXGS'])return undefined;if(/^-?\d+$/['test'](_0x3a85bb)){const _0x517566=_0x57cf78[_0x73189f(0xe5)](Number,_0x3a85bb);if(Number['isSafeInteger'](_0x517566))return _0x517566;}if(/^-?\d+\.\d+$/[_0x73189f(0xf2)](_0x3a85bb)){const _0x26b277=Number(_0x3a85bb);if(!Number['isNaN'](_0x26b277))return _0x26b277;}const _0x198c7a=_0x3a85bb['trim']();if(_0x198c7a[_0x73189f(0xd5)]('{')&&_0x198c7a['endsWith']('}')||_0x198c7a[_0x73189f(0xd5)]('[')&&_0x198c7a['endsWith'](']'))try{return JSON['parse'](_0x198c7a);}catch{}return _0x3a85bb;}async function resolveProfileTarget(_0x37a154){const _0x55f2f7=_0x34519f,_0xb042e={'yYdOZ':function(_0x140c27,_0x36aac8){return _0x140c27(_0x36aac8);},'zqEyr':function(_0x2ab26c,_0x9028a7){return _0x2ab26c(_0x9028a7);},'BYxNB':function(_0x35f11d,_0x2fb70a){return _0x35f11d(_0x2fb70a);}},_0x3df195=_0xb042e[_0x55f2f7(0xcc)](existsSync,_0xb042e[_0x55f2f7(0xd3)](getEnvDir,_0x37a154));let _0x421aba=![];try{const _0x58f804=await _0xb042e[_0x55f2f7(0xf7)](fetchCloudProfile,_0x37a154);_0x421aba=Boolean(_0x58f804);}catch{}if(_0x421aba)return{'kind':'cloud','alsoExistsElsewhere':_0x3df195};if(_0x3df195)return{'kind':'local','alsoExistsElsewhere':![]};throw new Error(_0x55f2f7(0xf4)+_0x37a154+'\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20'+_0x37a154);}function printDualExistsHint(_0xf175b3){const _0xa4b8ce=_0x34519f;console[_0xa4b8ce(0xf9)](_0xa4b8ce(0xd9)+_0xf175b3+'\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.');}function getProjectPath(){return process['cwd']();}async function loadEffectiveCloudSettings(_0x5b56b6){const _0x403fe7=_0x34519f,_0x1cf472={'rJbSy':function(_0xf48a8f,_0x289967,_0x5ddbe8){return _0xf48a8f(_0x289967,_0x5ddbe8);},'DBOfW':function(_0x570c73){return _0x570c73();},'ysxbb':function(_0x33bd97,_0x1d9424,_0x204388){return _0x33bd97(_0x1d9424,_0x204388);}},_0x49c1ee=await fetchCloudProfile(_0x5b56b6),_0x298100=_0x1cf472[_0x403fe7(0xcf)](readProfileOverrides,_0x1cf472['DBOfW'](getProjectPath),_0x5b56b6);return _0x1cf472['ysxbb'](mergeCloudProfileSettings,_0x49c1ee?.[_0x403fe7(0xd6)]??{},_0x298100??undefined);}export async function configSet(_0x286dcc,_0x51272e,_0x533b53){const _0x222906=_0x34519f,_0x1bce15={'cQCxO':function(_0x2b9296,_0x7009bd){return _0x2b9296(_0x7009bd);},'mcqmM':'cloud','sLDGh':function(_0x5a7be1,_0x4b449d){return _0x5a7be1(_0x4b449d);},'AzRHG':function(_0x52b2ae){return _0x52b2ae();},'YMeCp':function(_0x5b8df4,_0x5de340,_0x305681,_0x36136e,_0x328b01){return _0x5b8df4(_0x5de340,_0x305681,_0x36136e,_0x328b01);}},_0x52e12d=await _0x1bce15[_0x222906(0xdc)](resolveProfileTarget,_0x286dcc);if(_0x52e12d[_0x222906(0xde)]===_0x1bce15[_0x222906(0xe2)]){if(_0x52e12d[_0x222906(0xf0)])_0x1bce15['sLDGh'](printDualExistsHint,_0x286dcc);const _0x36fe4b=_0x1bce15['cQCxO'](parseOverrideValue,_0x533b53);setProfileOverride(_0x1bce15[_0x222906(0xee)](getProjectPath),_0x286dcc,_0x51272e,_0x36fe4b),console[_0x222906(0xf9)]('Set\x20'+_0x51272e+'\x20=\x20'+JSON['stringify'](_0x36fe4b)+_0x222906(0xc9)+_0x286dcc+'\x22');return;}const _0x292ea0=parseLocalValue(_0x51272e,_0x533b53);_0x1bce15[_0x222906(0xed)](setProfileOverride,getProjectPath(),_0x286dcc,_0x51272e,_0x292ea0),console[_0x222906(0xf9)]('Set\x20'+_0x51272e+'\x20=\x20'+_0x292ea0+'\x20for\x20\x22'+_0x286dcc+'\x22');}export async function configGet(_0x1f2141,_0x4a6a4c){const _0x4615f5=_0x34519f,_0xe76f78={'tpKxT':function(_0x18abbb,_0x588c3c){return _0x18abbb===_0x588c3c;},'kkmCZ':function(_0x564f64,_0x402002){return _0x564f64===_0x402002;},'OzQIj':function(_0x2a2747,_0xd11c17){return _0x2a2747(_0xd11c17);},'iCEwo':_0x4615f5(0xd4)},_0x345220=await resolveProfileTarget(_0x1f2141);if(_0xe76f78['tpKxT'](_0x345220['kind'],'cloud')){const _0x2344ad=await loadEffectiveCloudSettings(_0x1f2141),_0xf251a4=getNestedValue(_0x2344ad,_0x4a6a4c);if(_0xe76f78[_0x4615f5(0xe4)](_0xf251a4,undefined))console[_0x4615f5(0xf9)](_0x4615f5(0xca));else typeof _0xf251a4===_0x4615f5(0xd4)?console[_0x4615f5(0xf9)](JSON[_0x4615f5(0xc8)](_0xf251a4,null,0x2)):console['log'](_0xf251a4);return;}const _0x8be122=await _0xe76f78['OzQIj'](loadSettings,_0x1f2141),_0x117151=getNestedValue(_0x8be122,_0x4a6a4c);if(_0xe76f78[_0x4615f5(0xe1)](_0x117151,undefined))console['log']('(not\x20set)');else typeof _0x117151===_0xe76f78['iCEwo']?console[_0x4615f5(0xf9)](JSON[_0x4615f5(0xc8)](_0x117151,null,0x2)):console['log'](_0x117151);}export async function configList(_0x827df4){const _0x266040=_0x34519f,_0x167bcf={'GcrgY':function(_0x2527e3,_0x1eaf70){return _0x2527e3===_0x1eaf70;},'LBoxV':'cloud','rkoPi':function(_0x3349e9,_0x9eafef){return _0x3349e9(_0x9eafef);}},_0xe58365=await resolveProfileTarget(_0x827df4);if(_0x167bcf[_0x266040(0xea)](_0xe58365[_0x266040(0xde)],_0x167bcf[_0x266040(0xe8)])){const _0x450201=await loadEffectiveCloudSettings(_0x827df4);if(!_0x450201||Object['keys'](_0x450201)['length']===0x0){console[_0x266040(0xf9)]('No\x20configuration\x20set\x20for\x20\x22'+_0x827df4+'\x22');return;}console[_0x266040(0xf9)](JSON['stringify'](_0x450201,null,0x2));return;}const _0x5062e0=_0x167bcf['rkoPi'](getSettingsPath,_0x827df4);if(!existsSync(_0x5062e0)){console['log']('No\x20configuration\x20set\x20for\x20\x22'+_0x827df4+'\x22');return;}const _0x307031=await _0x167bcf[_0x266040(0xec)](loadSettings,_0x827df4),_0x5e8a20=_0x167bcf[_0x266040(0xec)](formatSettings,_0x307031);!_0x5e8a20?console['log'](_0x266040(0xdf)+_0x827df4+'\x22'):console[_0x266040(0xf9)](_0x5e8a20);}export async function configUnset(_0x3e43f3,_0x29ffce){const _0x2ddbaf=_0x34519f,_0x5d733e={'IpDBT':function(_0x3221de,_0x413edf){return _0x3221de===_0x413edf;},'yIDrj':function(_0x221f6b,_0x103bc7,_0x342934,_0x156d8f){return _0x221f6b(_0x103bc7,_0x342934,_0x156d8f);},'rrjaN':function(_0x23eec7){return _0x23eec7();}},_0x19027f=await resolveProfileTarget(_0x3e43f3);if(_0x5d733e[_0x2ddbaf(0xce)](_0x19027f[_0x2ddbaf(0xde)],'cloud')){if(_0x19027f[_0x2ddbaf(0xf0)])printDualExistsHint(_0x3e43f3);const _0x468d44=_0x5d733e['yIDrj'](unsetProfileOverride,_0x5d733e[_0x2ddbaf(0xd1)](getProjectPath),_0x3e43f3,_0x29ffce);_0x468d44?console[_0x2ddbaf(0xf9)](_0x2ddbaf(0xd7)+_0x29ffce+'\x20for\x20\x22'+_0x3e43f3+'\x22'):console['log']('Key\x20\x22'+_0x29ffce+_0x2ddbaf(0xfb));return;}const _0x966363=unsetProfileOverride(getProjectPath(),_0x3e43f3,_0x29ffce);if(_0x966363){console[_0x2ddbaf(0xf9)]('Removed\x20'+_0x29ffce);return;}const _0x3007ce=await loadSettings(_0x3e43f3),_0x5412dd=deleteNestedValue(_0x3007ce,_0x29ffce);_0x5412dd?console['log']('Key\x20\x22'+_0x29ffce+_0x2ddbaf(0xf3)+_0x3e43f3+_0x2ddbaf(0xdb)):console['log'](_0x2ddbaf(0xd8)+_0x29ffce+_0x2ddbaf(0xfb));}export async function configReset(_0x1414ed){const _0x304e04=_0x34519f,_0x5b8b5b={'nSwhi':function(_0x2708cc,_0x327dea){return _0x2708cc(_0x327dea);}},_0xf68b30=await _0x5b8b5b[_0x304e04(0xef)](resolveProfileTarget,_0x1414ed);if(_0xf68b30[_0x304e04(0xde)]===_0x304e04(0xf1)){resetProfileOverrides(getProjectPath(),_0x1414ed),console[_0x304e04(0xf9)](_0x304e04(0xe9)+_0x1414ed+'\x22');return;}console[_0x304e04(0xf9)]('\x22'+_0x1414ed+_0x304e04(0xfa)+_0x1414ed+'\x20<key>\x22\x20to\x20remove\x20individual\x20values.');}
@@ -1 +1 @@
1
- (function(_0x553919,_0x462574){const _0x1538e1=_0x3181,_0x471d4f=_0x553919();while(!![]){try{const _0x2c7e5=-parseInt(_0x1538e1(0x121))/0x1*(parseInt(_0x1538e1(0x126))/0x2)+-parseInt(_0x1538e1(0x11d))/0x3+parseInt(_0x1538e1(0x127))/0x4+parseInt(_0x1538e1(0x122))/0x5*(parseInt(_0x1538e1(0x123))/0x6)+-parseInt(_0x1538e1(0x11a))/0x7*(-parseInt(_0x1538e1(0x128))/0x8)+-parseInt(_0x1538e1(0x120))/0x9+-parseInt(_0x1538e1(0x117))/0xa*(-parseInt(_0x1538e1(0x119))/0xb);if(_0x2c7e5===_0x462574)break;else _0x471d4f['push'](_0x471d4f['shift']());}catch(_0x4de3bb){_0x471d4f['push'](_0x471d4f['shift']());}}}(_0x3874,0x97d7b));function _0x3874(){const _0x7588c3=['2740buEVKl','input','20746hMnVlB','175hzywgy','log','prompt','994896qRVTnB','yes','\x22\x20to\x20confirm\x20deletion:','3317733iZURtp','12942LAILWq','440xPrxBG','22056PswyMa','Profile\x20deletion\x20requires\x20an\x20interactive\x20terminal\x20so\x20the\x20profile\x20name\x20can\x20be\x20typed\x20for\x20confirmation.\x20Pass\x20--yes\x20to\x20skip\x20confirmation.','cwd','74YLPCsJ','3798972iQVrGg','3544lQlypN','VXJzb'];_0x3874=function(){return _0x7588c3;};return _0x3874();}import _0x1540bf from'inquirer';function _0x3181(_0x4a493f,_0x2b6f6a){_0x4a493f=_0x4a493f-0x117;const _0x3874d1=_0x3874();let _0x31812f=_0x3874d1[_0x4a493f];return _0x31812f;}import{deleteCloudProfile,fetchCloudProfile}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';import{clearLastProfile,resetProfileOverrides}from'./utils/projectsConfig.js';export async function deleteProfile(_0x235a12,_0x4011f6={}){const _0x37c60f=_0x3181,_0x150d82={'FuvsD':_0x37c60f(0x118),'tpMjM':function(_0x29ab20,_0x34d964){return _0x29ab20!==_0x34d964;},'yaGtj':'Profile\x20deletion\x20cancelled:\x20confirmation\x20did\x20not\x20match.','VXJzb':function(_0x126903,_0x1245fd,_0x238cb6){return _0x126903(_0x1245fd,_0x238cb6);}},_0x2a9b52=await fetchCloudProfile(_0x235a12);if(!_0x2a9b52)throw new Error('Cloud\x20profile\x20\x22'+_0x235a12+'\x22\x20not\x20found.');if(!_0x4011f6[_0x37c60f(0x11e)]&&!isInteractive())throw new Error(_0x37c60f(0x124));console['log']('\x0aWarning:\x20this\x20deletes\x20the\x20shared\x20cloud\x20profile\x20\x22'+_0x235a12+'\x22\x20for\x20everyone\x20in\x20your\x20organization.');if(!_0x4011f6['yes']){const {confirmation:_0x29e63d}=await _0x1540bf[_0x37c60f(0x11c)]([{'type':_0x150d82['FuvsD'],'name':'confirmation','message':'Type\x20\x22'+_0x235a12+_0x37c60f(0x11f)}]);if(_0x150d82['tpMjM'](_0x29e63d,_0x235a12))throw new Error(_0x150d82['yaGtj']);}await deleteCloudProfile(_0x235a12),_0x150d82[_0x37c60f(0x129)](resetProfileOverrides,process[_0x37c60f(0x125)](),_0x235a12),clearLastProfile(process['cwd'](),_0x235a12),console[_0x37c60f(0x11b)]('✓\x20Deleted\x20cloud\x20profile\x20\x22'+_0x235a12+'\x22.');}
1
+ (function(_0x121da5,_0xc56734){const _0x1cc82b=_0x3e91,_0x16c232=_0x121da5();while(!![]){try{const _0x298c8f=-parseInt(_0x1cc82b(0x16f))/0x1*(-parseInt(_0x1cc82b(0x171))/0x2)+-parseInt(_0x1cc82b(0x168))/0x3*(-parseInt(_0x1cc82b(0x172))/0x4)+-parseInt(_0x1cc82b(0x175))/0x5+parseInt(_0x1cc82b(0x160))/0x6+parseInt(_0x1cc82b(0x15f))/0x7*(parseInt(_0x1cc82b(0x161))/0x8)+parseInt(_0x1cc82b(0x165))/0x9+-parseInt(_0x1cc82b(0x167))/0xa;if(_0x298c8f===_0xc56734)break;else _0x16c232['push'](_0x16c232['shift']());}catch(_0x56da08){_0x16c232['push'](_0x16c232['shift']());}}}(_0x2f44,0xe02b4));function _0x3e91(_0x5c716d,_0x35bb0f){_0x5c716d=_0x5c716d-0x15f;const _0x2f44d8=_0x2f44();let _0x3e91ee=_0x2f44d8[_0x5c716d];return _0x3e91ee;}import _0x32f894 from'inquirer';function _0x2f44(){const _0x18d039=['Type\x20\x22','input','\x22\x20for\x20everyone\x20in\x20your\x20organization.','13188jbwCyA','gjRAf','152CwLOFX','12gmVdQp','\x0aWarning:\x20this\x20deletes\x20the\x20shared\x20cloud\x20profile\x20\x22','Cloud\x20profile\x20\x22','8305540NwSMlc','4929295bMUqBi','1436088XdFzGT','16zZnldf','confirmation','cwd','FgISe','12729600PUdYkW','zvUSf','28832880HgfxuD','1398186htpxsS','ynQKR','nmAJv','yes'];_0x2f44=function(){return _0x18d039;};return _0x2f44();}import{deleteCloudProfile,fetchCloudProfile}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';import{clearLastProfile,resetProfileOverrides}from'./utils/projectsConfig.js';export async function deleteProfile(_0x70ee29,_0x541b7e={}){const _0x35ea3b=_0x3e91,_0x20e500={'ynQKR':function(_0x5d9bbf,_0x5294b2){return _0x5d9bbf(_0x5294b2);},'gjRAf':function(_0xa4278b){return _0xa4278b();},'zvUSf':_0x35ea3b(0x16d),'FgISe':function(_0x5951d0,_0x1e0c79){return _0x5951d0!==_0x1e0c79;},'nmAJv':function(_0x5272a4,_0x212de8,_0x29b0da){return _0x5272a4(_0x212de8,_0x29b0da);}},_0x1a397d=await _0x20e500[_0x35ea3b(0x169)](fetchCloudProfile,_0x70ee29);if(!_0x1a397d)throw new Error(_0x35ea3b(0x174)+_0x70ee29+'\x22\x20not\x20found.');if(!_0x541b7e[_0x35ea3b(0x16b)]&&!_0x20e500[_0x35ea3b(0x170)](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['log'](_0x35ea3b(0x173)+_0x70ee29+_0x35ea3b(0x16e));if(!_0x541b7e[_0x35ea3b(0x16b)]){const {confirmation:_0x20f470}=await _0x32f894['prompt']([{'type':_0x20e500[_0x35ea3b(0x166)],'name':_0x35ea3b(0x162),'message':_0x35ea3b(0x16c)+_0x70ee29+'\x22\x20to\x20confirm\x20deletion:'}]);if(_0x20e500[_0x35ea3b(0x164)](_0x20f470,_0x70ee29))throw new Error('Profile\x20deletion\x20cancelled:\x20confirmation\x20did\x20not\x20match.');}await deleteCloudProfile(_0x70ee29),_0x20e500[_0x35ea3b(0x16a)](resetProfileOverrides,process[_0x35ea3b(0x163)](),_0x70ee29),clearLastProfile(process['cwd'](),_0x70ee29),console['log']('✓\x20Deleted\x20cloud\x20profile\x20\x22'+_0x70ee29+'\x22.');}
@@ -1 +1 @@
1
- const _0x462d0a=_0x3c00;(function(_0x2ae554,_0x1b00b4){const _0x25a4a5=_0x3c00,_0x555c46=_0x2ae554();while(!![]){try{const _0x532a1e=parseInt(_0x25a4a5(0x9e))/0x1+parseInt(_0x25a4a5(0xad))/0x2*(-parseInt(_0x25a4a5(0xb3))/0x3)+parseInt(_0x25a4a5(0x98))/0x4*(parseInt(_0x25a4a5(0xa0))/0x5)+parseInt(_0x25a4a5(0xa4))/0x6*(-parseInt(_0x25a4a5(0xa3))/0x7)+-parseInt(_0x25a4a5(0xa9))/0x8*(-parseInt(_0x25a4a5(0xa5))/0x9)+-parseInt(_0x25a4a5(0xbd))/0xa+parseInt(_0x25a4a5(0x9b))/0xb*(parseInt(_0x25a4a5(0xa8))/0xc);if(_0x532a1e===_0x1b00b4)break;else _0x555c46['push'](_0x555c46['shift']());}catch(_0x2916fd){_0x555c46['push'](_0x555c46['shift']());}}}(_0x4f7c,0xcf3f7));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{listCloudProfiles}from'./utils/cloudProfile.js';function _0x3c00(_0x12a0cb,_0x4de359){_0x12a0cb=_0x12a0cb-0x8e;const _0x4f7c12=_0x4f7c();let _0x3c0035=_0x4f7c12[_0x12a0cb];return _0x3c0035;}const NON_ENV_DIRS=['sessions','bug-bashes',_0x462d0a(0x90),'local','ci'];export function shouldGroupByEnvironment(_0x5c18a2){const _0x1b4886=_0x462d0a;return _0x5c18a2[_0x1b4886(0xbe)](_0x58f0b2=>_0x58f0b2[_0x1b4886(0x9c)]);}export function groupCloudProfilesByEnvironment(_0x2cd0fd){const _0x4e7293=_0x462d0a,_0x60283f={'YjtGp':function(_0x5ad5ff,_0x15814d){return _0x5ad5ff===_0x15814d;},'opKQj':function(_0x54922a,_0x3c11c8){return _0x54922a===_0x3c11c8;}},_0x31e1a3=new Map();for(const _0x40b898 of _0x2cd0fd){const _0x5166b9=_0x40b898[_0x4e7293(0x9c)]??null,_0x33b942=_0x31e1a3['get'](_0x5166b9);if(_0x33b942)_0x33b942['push'](_0x40b898);else _0x31e1a3[_0x4e7293(0xa2)](_0x5166b9,[_0x40b898]);}const _0x482945=[..._0x31e1a3['keys']()]['sort']((_0x530437,_0x25958e)=>{const _0x12aaa5=_0x4e7293;if(_0x60283f['YjtGp'](_0x530437,null))return 0x1;if(_0x60283f[_0x12aaa5(0xaf)](_0x25958e,null))return-0x1;return _0x530437['localeCompare'](_0x25958e);});return _0x482945[_0x4e7293(0x8e)](_0x290c10=>({'environmentKey':_0x290c10,'profiles':_0x31e1a3[_0x4e7293(0xb9)](_0x290c10)['sort']((_0x9d32cd,_0x3612d7)=>_0x9d32cd['name'][_0x4e7293(0x99)](_0x3612d7[_0x4e7293(0x92)]))}));}export async function getEnvNames(){const _0x2d9919=_0x462d0a,_0x38f110={'FdHHQ':function(_0x31a322,_0x241d1d,_0x4b025b){return _0x31a322(_0x241d1d,_0x4b025b);},'Khhwo':function(_0x30eba4,_0x55a3d8){return _0x30eba4(_0x55a3d8);},'SKNhd':function(_0x15ddc7,_0x3b480,_0x223fe1){return _0x15ddc7(_0x3b480,_0x223fe1);},'SlVCP':'local','qOhip':function(_0xb3e5df,_0x6a68a6){return _0xb3e5df(_0x6a68a6);},'NOYWU':'.txt','NqqRh':_0x2d9919(0x94)},_0x5f0087=getRangerDir();if(!existsSync(_0x5f0087))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x5c417f=await readActiveProfileName(),_0x475736=[],_0x176229={},_0xdaf119=_0x38f110[_0x2d9919(0xbc)](join,_0x5f0087,'local');if(existsSync(_0xdaf119)){const _0x1b4cc8=await _0x38f110[_0x2d9919(0xb1)](readdir,_0xdaf119);for(const _0x2b1ff3 of _0x1b4cc8){const _0x3a7052=_0x38f110[_0x2d9919(0xae)](join,_0xdaf119,_0x2b1ff3),_0x363e0c=await _0x38f110['Khhwo'](stat,_0x3a7052);_0x363e0c[_0x2d9919(0xb6)]()&&(_0x475736[_0x2d9919(0x95)](_0x2b1ff3),_0x176229[_0x2b1ff3]=_0x38f110['SlVCP']);}}const _0x31185b=_0x38f110[_0x2d9919(0xbc)](join,_0x5f0087,'ci');if(existsSync(_0x31185b)){const _0x73f0f9=await readdir(_0x31185b);for(const _0x149399 of _0x73f0f9){const _0x369524=_0x38f110[_0x2d9919(0xbc)](join,_0x31185b,_0x149399),_0x562a41=await _0x38f110['qOhip'](stat,_0x369524);_0x562a41['isDirectory']()&&(_0x475736['push'](_0x149399),_0x176229[_0x149399]='ci');}}const _0x240532=await readdir(_0x5f0087);for(const _0x4cbb50 of _0x240532){if(NON_ENV_DIRS[_0x2d9919(0xa7)](_0x4cbb50))continue;if(_0x4cbb50['startsWith']('.'))continue;if(_0x4cbb50['endsWith'](_0x38f110['NOYWU']))continue;const _0x42ced3=_0x38f110[_0x2d9919(0xae)](join,_0x5f0087,_0x4cbb50),_0x33d4cc=await stat(_0x42ced3);_0x33d4cc[_0x2d9919(0xb6)]()&&_0x38f110[_0x2d9919(0x9a)](existsSync,_0x38f110['SKNhd'](join,_0x42ced3,'settings.json'))&&(!_0x475736[_0x2d9919(0xa7)](_0x4cbb50)&&(_0x475736[_0x2d9919(0x95)](_0x4cbb50),_0x176229[_0x4cbb50]=_0x38f110[_0x2d9919(0xb7)]));}return{'envNames':_0x475736,'activeEnv':_0x5c417f,'envTypes':_0x176229};}function _0x4f7c(){const _0x5766e6=['108TLQPiH','48AePfHE','length','profiles','KCzBZ','2FouyTp','SKNhd','opKQj','\x20\x20\x20\x20Session:\x20','Khhwo','hiIOY','131289ImIZKF','\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profiles:\x20','has','isDirectory','NqqRh','\x20\x20\x20\x20\x20\x20Details:\x20','get','dmwki','\x0a\x20\x20','FdHHQ','12927300IjdYnV','some','wqdXe','\x0aCloud\x20Profiles:','map','message','reports','log','name','dNbar','legacy','push','(no\x20environment\x20—\x20manual\x20or\x20no\x20auth)','\x20\x20\x20\x20','78244zdSvbl','localeCompare','qOhip','245597SyNnqO','environmentKey','environmentDetails','1025787GMUMfT','sort','385cnNCMp','\x0aCloud\x20Profiles\x20(by\x20environment):','set','7jEvFoW','7603842aKQfcV','1079640RkhxKr','\x0aLocal\x20Profiles\x20(legacy):','includes'];_0x4f7c=function(){return _0x5766e6;};return _0x4f7c();}export async function envList(){const _0x3cdbff=_0x462d0a,_0x35bee0={'yBBDb':function(_0x3e4e0b,_0xb49466){return _0x3e4e0b===_0xb49466;},'yAWuO':'Run:\x20ranger\x20profile\x20add\x20<profile-name>','hiIOY':function(_0x41299c,_0x2d0273){return _0x41299c>_0x2d0273;},'lYoLe':function(_0x488c3a,_0x590c08){return _0x488c3a===_0x590c08;},'KCzBZ':function(_0x48096d,_0x3b46bf){return _0x48096d(_0x3b46bf);},'dNbar':_0x3cdbff(0x94),'dgVze':_0x3cdbff(0xa1),'FTBMa':_0x3cdbff(0x96),'dmwki':function(_0x1b5273,_0x5dea83,_0x5bd957){return _0x1b5273(_0x5dea83,_0x5bd957);},'wqdXe':_0x3cdbff(0x97),'mjZbB':_0x3cdbff(0xc0),'fotsA':function(_0x364708,_0x12b9dd,_0x12cea1){return _0x364708(_0x12b9dd,_0x12cea1);}},{envNames:_0x41b85e,activeEnv:_0x591028,envTypes:_0x4412dd}=await getEnvNames();let _0x17907b=[];const _0x579b82=await getToken();if(_0x579b82)try{_0x17907b=await listCloudProfiles();}catch(_0x25ff17){console['error'](_0x3cdbff(0xb4)+(_0x25ff17 instanceof Error?_0x25ff17[_0x3cdbff(0x8f)]:String(_0x25ff17)));}if(_0x35bee0['yBBDb'](_0x41b85e['length'],0x0)&&_0x17907b[_0x3cdbff(0xaa)]===0x0){console[_0x3cdbff(0x91)]('\x0aNo\x20profiles\x20found.'),console[_0x3cdbff(0x91)](_0x35bee0['yAWuO']);return;}const _0x290576=new Set(_0x17907b['map'](_0x3abd56=>_0x3abd56['name']));if(_0x35bee0[_0x3cdbff(0xb2)](_0x41b85e['length'],0x0)){console['log'](_0x3cdbff(0xa6));for(const _0x434c45 of _0x41b85e[_0x3cdbff(0x9f)]()){const _0x349124=_0x35bee0['lYoLe'](_0x434c45,_0x591028)&&!_0x290576[_0x3cdbff(0xb5)](_0x434c45),_0x1020f5=_0x4412dd[_0x434c45]||'local',_0x47bcfd=await _0x35bee0[_0x3cdbff(0xac)](loadSettings,_0x434c45),_0x27414a=_0x1020f5===_0x35bee0[_0x3cdbff(0x93)]?'':'\x20['+_0x1020f5+']';console[_0x3cdbff(0x91)]('\x20\x20'+(_0x349124?'*\x20':'\x20\x20')+_0x434c45+_0x27414a),_0x47bcfd['baseUrl']&&console[_0x3cdbff(0x91)]('\x20\x20\x20\x20\x20\x20URL:\x20'+_0x47bcfd['baseUrl']),_0x47bcfd[_0x3cdbff(0x9d)]&&console['log'](_0x3cdbff(0xb8)+_0x47bcfd['environmentDetails']);}}const _0x1fad50=(_0x580a00,_0xc17808)=>{const _0x2ad071=_0x3cdbff,_0x174c11=_0x580a00['name']===_0x591028,_0x289e0f=_0x580a00['sessionUpdatedAt']?'cached\x20(updated\x20'+_0x580a00['sessionUpdatedAt']+')':'no\x20session';console['log'](''+_0xc17808+(_0x174c11?'*\x20':'\x20\x20')+_0x580a00[_0x2ad071(0x92)]),console['log'](_0xc17808+_0x2ad071(0xb0)+_0x289e0f);};if(_0x17907b[_0x3cdbff(0xaa)]>0x0){if(_0x35bee0['KCzBZ'](shouldGroupByEnvironment,_0x17907b)){console[_0x3cdbff(0x91)](_0x35bee0['dgVze']);for(const _0x3bdb2e of groupCloudProfilesByEnvironment(_0x17907b)){const _0xd8c1a=_0x3bdb2e[_0x3cdbff(0x9c)]??_0x35bee0['FTBMa'];console['log'](_0x3cdbff(0xbb)+_0xd8c1a);for(const _0xb97311 of _0x3bdb2e[_0x3cdbff(0xab)]){_0x35bee0[_0x3cdbff(0xba)](_0x1fad50,_0xb97311,_0x35bee0[_0x3cdbff(0xbf)]);}}}else{console[_0x3cdbff(0x91)](_0x35bee0['mjZbB']);for(const _0x950ba0 of[..._0x17907b]['sort']((_0x475c46,_0x228ee2)=>_0x475c46[_0x3cdbff(0x92)]['localeCompare'](_0x228ee2[_0x3cdbff(0x92)]))){_0x35bee0['fotsA'](_0x1fad50,_0x950ba0,'\x20\x20');}}}_0x591028&&console['log']('\x0a*\x20=\x20active\x20profile');}
1
+ function _0x400d(){const _0x5273f9=['902721oVUlfx','fAgQB','xqBJi','ADuUl','get','baseUrl','reports','365Ayjmsw','\x20\x20\x20\x20\x20\x20Details:\x20','4298648GaqNDc','4HohtrL','Rizot','CgVHf','YOqys','(no\x20environment\x20—\x20manual\x20or\x20no\x20auth)','cached\x20(updated\x20','9336wDHaog','\x20\x20\x20\x20','has','mWVji','10fqzrJc','length','legacy','ikpbR','1027940ncMfBU','9063923JfZVFg','SWwRL','\x0a\x20\x20','\x0aNo\x20profiles\x20found.','sort','\x0aLocal\x20Profiles\x20(legacy):','QIzkx','message','28232VmDEYe','keys','push','environmentKey','name','localeCompare','1043tbEcDd','isDirectory','4439385zPnNyh','log','environmentDetails','YxaMR','CVEhn','Cinxa','local','includes'];_0x400d=function(){return _0x5273f9;};return _0x400d();}const _0x5b69da=_0x2d84;(function(_0x40e4a1,_0x1c34da){const _0x3cf9b8=_0x2d84,_0xd7182a=_0x40e4a1();while(!![]){try{const _0x2e6693=parseInt(_0x3cf9b8(0x11a))/0x1+parseInt(_0x3cf9b8(0x10c))/0x2*(parseInt(_0x3cf9b8(0x102))/0x3)+-parseInt(_0x3cf9b8(0x10b))/0x4+-parseInt(_0x3cf9b8(0x109))/0x5*(parseInt(_0x3cf9b8(0x112))/0x6)+-parseInt(_0x3cf9b8(0x129))/0x7*(-parseInt(_0x3cf9b8(0x123))/0x8)+parseInt(_0x3cf9b8(0x12b))/0x9+parseInt(_0x3cf9b8(0x116))/0xa*(-parseInt(_0x3cf9b8(0x11b))/0xb);if(_0x2e6693===_0x1c34da)break;else _0xd7182a['push'](_0xd7182a['shift']());}catch(_0x6009ca){_0xd7182a['push'](_0xd7182a['shift']());}}}(_0x400d,0x9b6b5));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{listCloudProfiles}from'./utils/cloudProfile.js';const NON_ENV_DIRS=['sessions','bug-bashes',_0x5b69da(0x108),'local','ci'];export function shouldGroupByEnvironment(_0x32316b){return _0x32316b['some'](_0x45f255=>_0x45f255['environmentKey']);}function _0x2d84(_0x2fa852,_0x10f16c){_0x2fa852=_0x2fa852-0xfd;const _0x400dac=_0x400d();let _0x2d8447=_0x400dac[_0x2fa852];return _0x2d8447;}export function groupCloudProfilesByEnvironment(_0x35b141){const _0x53b5ac=_0x5b69da,_0x5db4d9={'dFhZd':function(_0x161e37,_0x123569){return _0x161e37===_0x123569;}},_0x51bc06=new Map();for(const _0x34a1e4 of _0x35b141){const _0x31304c=_0x34a1e4['environmentKey']??null,_0x1c2863=_0x51bc06['get'](_0x31304c);if(_0x1c2863)_0x1c2863['push'](_0x34a1e4);else _0x51bc06['set'](_0x31304c,[_0x34a1e4]);}const _0x1f7514=[..._0x51bc06[_0x53b5ac(0x124)]()]['sort']((_0x56b5f8,_0x5645c5)=>{const _0x470c36=_0x53b5ac;if(_0x5db4d9['dFhZd'](_0x56b5f8,null))return 0x1;if(_0x5db4d9['dFhZd'](_0x5645c5,null))return-0x1;return _0x56b5f8[_0x470c36(0x128)](_0x5645c5);});return _0x1f7514['map'](_0x18d7ae=>({'environmentKey':_0x18d7ae,'profiles':_0x51bc06[_0x53b5ac(0x106)](_0x18d7ae)[_0x53b5ac(0x11f)]((_0x34bfee,_0xa2649d)=>_0x34bfee['name'][_0x53b5ac(0x128)](_0xa2649d['name']))}));}export async function getEnvNames(){const _0x234fc0=_0x5b69da,_0x412405={'XUdvW':_0x234fc0(0x100),'CgVHf':function(_0x6e9a0d,_0x34f4b8){return _0x6e9a0d(_0x34f4b8);},'ikpbR':function(_0x4ad1f4,_0x1df529){return _0x4ad1f4(_0x1df529);},'xqBJi':function(_0x50c26b,_0x3d042c,_0x20a825){return _0x50c26b(_0x3d042c,_0x20a825);},'ADuUl':function(_0x1c94bc,_0x1fb86b){return _0x1c94bc(_0x1fb86b);},'SVvnd':function(_0x185039,_0x1b8bd6){return _0x185039(_0x1b8bd6);},'YOqys':'.txt','MJJnk':function(_0x5d6b17,_0x1abd9a){return _0x5d6b17(_0x1abd9a);},'gscla':'settings.json','Cinxa':_0x234fc0(0x118)},_0x1d9e1a=getRangerDir();if(!existsSync(_0x1d9e1a))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x4e3dc3=await readActiveProfileName(),_0x2462c6=[],_0x3aac7e={},_0x40e968=join(_0x1d9e1a,_0x412405['XUdvW']);if(_0x412405[_0x234fc0(0x10e)](existsSync,_0x40e968)){const _0x3e8e48=await _0x412405[_0x234fc0(0x119)](readdir,_0x40e968);for(const _0x6916d8 of _0x3e8e48){const _0x56f32c=_0x412405['xqBJi'](join,_0x40e968,_0x6916d8),_0x563855=await _0x412405[_0x234fc0(0x105)](stat,_0x56f32c);_0x563855[_0x234fc0(0x12a)]()&&(_0x2462c6[_0x234fc0(0x125)](_0x6916d8),_0x3aac7e[_0x6916d8]='local');}}const _0x522dec=join(_0x1d9e1a,'ci');if(_0x412405['ADuUl'](existsSync,_0x522dec)){const _0x4ba81f=await _0x412405['SVvnd'](readdir,_0x522dec);for(const _0x32d4ee of _0x4ba81f){const _0x14f2df=_0x412405[_0x234fc0(0x104)](join,_0x522dec,_0x32d4ee),_0x11ab39=await stat(_0x14f2df);_0x11ab39[_0x234fc0(0x12a)]()&&(_0x2462c6['push'](_0x32d4ee),_0x3aac7e[_0x32d4ee]='ci');}}const _0x3c5efa=await readdir(_0x1d9e1a);for(const _0x14cca9 of _0x3c5efa){if(NON_ENV_DIRS['includes'](_0x14cca9))continue;if(_0x14cca9['startsWith']('.'))continue;if(_0x14cca9['endsWith'](_0x412405[_0x234fc0(0x10f)]))continue;const _0x531052=join(_0x1d9e1a,_0x14cca9),_0x266c27=await _0x412405['MJJnk'](stat,_0x531052);_0x266c27[_0x234fc0(0x12a)]()&&existsSync(join(_0x531052,_0x412405['gscla']))&&(!_0x2462c6[_0x234fc0(0x101)](_0x14cca9)&&(_0x2462c6['push'](_0x14cca9),_0x3aac7e[_0x14cca9]=_0x412405[_0x234fc0(0xff)]));}return{'envNames':_0x2462c6,'activeEnv':_0x4e3dc3,'envTypes':_0x3aac7e};}export async function envList(){const _0x4dc7af=_0x5b69da,_0x5920d4={'QIzkx':function(_0x42eddd,_0x39d56e){return _0x42eddd===_0x39d56e;},'Rizot':'no\x20session','fAgQB':function(_0xcd709e){return _0xcd709e();},'CVEhn':function(_0x55d54a){return _0x55d54a();},'mWVji':function(_0x5bd0a8,_0x3aeefc){return _0x5bd0a8(_0x3aeefc);},'duuMA':_0x4dc7af(0x11e),'elwMw':function(_0x931381,_0xa95b9){return _0x931381>_0xa95b9;},'CXEER':_0x4dc7af(0x120),'SWwRL':'local','jaNlj':_0x4dc7af(0x110),'YxaMR':function(_0x40443b,_0x54e1b0,_0x1eb031){return _0x40443b(_0x54e1b0,_0x1eb031);}},{envNames:_0x25c98a,activeEnv:_0x347981,envTypes:_0x501aa5}=await getEnvNames();let _0x4e030f=[];const _0x3a88dc=await _0x5920d4[_0x4dc7af(0x103)](getToken);if(_0x3a88dc)try{_0x4e030f=await _0x5920d4[_0x4dc7af(0xfe)](listCloudProfiles);}catch(_0x404442){console['error']('\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profiles:\x20'+(_0x404442 instanceof Error?_0x404442[_0x4dc7af(0x122)]:_0x5920d4['mWVji'](String,_0x404442)));}if(_0x5920d4[_0x4dc7af(0x121)](_0x25c98a[_0x4dc7af(0x117)],0x0)&&_0x5920d4['QIzkx'](_0x4e030f[_0x4dc7af(0x117)],0x0)){console['log'](_0x5920d4['duuMA']),console['log']('Run:\x20ranger\x20profile\x20add\x20<profile-name>');return;}const _0x1c3037=new Set(_0x4e030f['map'](_0x17a5c3=>_0x17a5c3['name']));if(_0x5920d4['elwMw'](_0x25c98a['length'],0x0)){console['log'](_0x5920d4['CXEER']);for(const _0x2ba777 of _0x25c98a['sort']()){const _0x3b1d18=_0x5920d4['QIzkx'](_0x2ba777,_0x347981)&&!_0x1c3037[_0x4dc7af(0x114)](_0x2ba777),_0x59cdf9=_0x501aa5[_0x2ba777]||_0x5920d4[_0x4dc7af(0x11c)],_0x19fe23=await _0x5920d4[_0x4dc7af(0x115)](loadSettings,_0x2ba777),_0x22a6dc=_0x59cdf9===_0x4dc7af(0x118)?'':'\x20['+_0x59cdf9+']';console['log']('\x20\x20'+(_0x3b1d18?'*\x20':'\x20\x20')+_0x2ba777+_0x22a6dc),_0x19fe23[_0x4dc7af(0x107)]&&console['log']('\x20\x20\x20\x20\x20\x20URL:\x20'+_0x19fe23[_0x4dc7af(0x107)]),_0x19fe23[_0x4dc7af(0x12d)]&&console[_0x4dc7af(0x12c)](_0x4dc7af(0x10a)+_0x19fe23[_0x4dc7af(0x12d)]);}}const _0x3fe39e=(_0xecdddf,_0x423c8c)=>{const _0xb57e9a=_0x4dc7af,_0x8ea27a=_0x5920d4[_0xb57e9a(0x121)](_0xecdddf[_0xb57e9a(0x127)],_0x347981),_0x1d564e=_0xecdddf['sessionUpdatedAt']?_0xb57e9a(0x111)+_0xecdddf['sessionUpdatedAt']+')':_0x5920d4[_0xb57e9a(0x10d)];console['log'](''+_0x423c8c+(_0x8ea27a?'*\x20':'\x20\x20')+_0xecdddf[_0xb57e9a(0x127)]),console[_0xb57e9a(0x12c)](_0x423c8c+'\x20\x20\x20\x20Session:\x20'+_0x1d564e);};if(_0x5920d4['elwMw'](_0x4e030f[_0x4dc7af(0x117)],0x0)){if(_0x5920d4['mWVji'](shouldGroupByEnvironment,_0x4e030f)){console['log']('\x0aCloud\x20Profiles\x20(by\x20environment):');for(const _0x186925 of groupCloudProfilesByEnvironment(_0x4e030f)){const _0x191853=_0x186925[_0x4dc7af(0x126)]??_0x5920d4['jaNlj'];console[_0x4dc7af(0x12c)](_0x4dc7af(0x11d)+_0x191853);for(const _0x32181e of _0x186925['profiles']){_0x5920d4['YxaMR'](_0x3fe39e,_0x32181e,_0x4dc7af(0x113));}}}else{console[_0x4dc7af(0x12c)]('\x0aCloud\x20Profiles:');for(const _0x533736 of[..._0x4e030f]['sort']((_0x352c07,_0x2b581e)=>_0x352c07['name'][_0x4dc7af(0x128)](_0x2b581e['name']))){_0x5920d4[_0x4dc7af(0xfd)](_0x3fe39e,_0x533736,'\x20\x20');}}}_0x347981&&console[_0x4dc7af(0x12c)]('\x0a*\x20=\x20active\x20profile');}