@ranger-testing/ranger-cli 3.1.4-alpha.ffeeafe-46 → 3.1.5-alpha.0c090c6-50

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 +6 -3
@@ -1 +1 @@
1
- const _0x2182ea=_0x3161;(function(_0x37eb5a,_0x2510c6){const _0xaafe1e=_0x3161,_0x27e394=_0x37eb5a();while(!![]){try{const _0x91c0ff=parseInt(_0xaafe1e(0x198))/0x1*(-parseInt(_0xaafe1e(0x158))/0x2)+parseInt(_0xaafe1e(0x1b7))/0x3*(-parseInt(_0xaafe1e(0x14b))/0x4)+-parseInt(_0xaafe1e(0x178))/0x5+-parseInt(_0xaafe1e(0x156))/0x6*(-parseInt(_0xaafe1e(0x1a3))/0x7)+parseInt(_0xaafe1e(0x1b1))/0x8+parseInt(_0xaafe1e(0x17e))/0x9+-parseInt(_0xaafe1e(0x160))/0xa;if(_0x91c0ff===_0x2510c6)break;else _0x27e394['push'](_0x27e394['shift']());}catch(_0x53d6e5){_0x27e394['push'](_0x27e394['shift']());}}}(_0x17cc,0x2fae1));function _0x3161(_0x5d930d,_0x3d10e5){_0x5d930d=_0x5d930d-0x141;const _0x17cc53=_0x17cc();let _0x316129=_0x17cc53[_0x5d930d];return _0x316129;}import{readdir,rm}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import _0x68b18a from'inquirer';import{getRangerDir,getRangerHomeDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';function _0x17cc(){const _0x155a6b=['FKbcM','keys','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.','Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','exit','origin','error','LBmbf','continue','startsWith','env_not_found','http://','882370RgNMaf','setupHeader','manual','log','\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20','2296854eoLjvQ','eFYXP',')\x0a\x20\x20Save\x20\x27','slice','Invalid\x20--setup-header\x20format:\x20\x22','env','user_declined','ewGPP','NbiLZ','\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','yes','authEnv','SrRSu','DEULa','trackPhaseEnd','--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','\x22.\x20Expected\x20\x22Name:\x20Value\x22.','skipAuth','\x20\x20Did\x20you\x20mean\x20','\x20\x20Next:\x20ranger\x20go\x20--profile\x20','\x0a\x20\x20Still\x20could\x20not\x20reach\x20','uxTnf','length','\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22','⚠\x20Could\x20not\x20reach\x20','51563uOPpTz','The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a','Continue\x20anyway','What\x20would\x20you\x20like\x20to\x20do?','Enter\x20a\x20different\x20URL','profile.add.autoRouted','message','force','TypeError','GQDYv','NODE_TLS_REJECT_UNAUTHORIZED','2533433UzgYjW','\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20','\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20(','warn','prompt','capture','vkDBR','no_auth_config','\x27\x20matching\x20','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','confirm','\x0a\x20\x20A\x20profile\x20named\x20\x22','\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20','giscg','504184KOsyKL','cdpEndpoint','rnDoy','GyVfB','--skip-auth\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20--skip-auth\x20makes\x20an\x20env-less\x20profile,\x20--env\x20binds\x20one\x20to\x20an\x20auth\x20environment.','\x20--skip-auth\x0a','106719beypIH','✓\x20Cloud\x20profile\x20\x27','\x27\x20created.\x0a','This\x20account\x20will\x20be\x20shared\x20with\x20everyone\x20at\x20your\x20organization','HEAD','KuvAM','vFDpX','ooQsp','use_suggestion','baseUrl','.tmp-','jHCvA','\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.','CSgZB','avbNc','trim','hrEOp','OmLFe','uLeyk','WmMyH','Found\x20auth\x20environment\x20\x27','xMBDH','FBgPz','XGeRv','\x22:\x20','JJwIh','\x20\x20https://docs.ranger.net/main/concepts/profiles','4eMgcgA','ztsCL','--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','saveToCloud','setupHeaders','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','environments','tmozJ','join','url','includes','6QoCkCu','ISaZf','4TTGJMx','.\x20Pass\x20--env\x20<key>\x20to\x20pick\x20one,\x20or\x20use\x20--skip-auth.\x20Configured\x20envs:\x20','status','\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20','no_match','TFNvm','yUgaW','\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20','1696780afyJhN','Use\x20','\x20\x20Set\x20active\x20profile:\x20','muPvo','Vaaqq','\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','indexOf','✓\x20Profile\x20\x27','nCSyR','profile.add.autoRouteSkipped','OyuDs','Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?'];_0x17cc=function(){return _0x155a6b;};return _0x17cc();}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=_0x2182ea(0x1ba);function warnCloudProfileSharedInOrg(){const _0x4a7144=_0x2182ea;if(!process['stdout']['isTTY'])return;console[_0x4a7144(0x1a6)](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x484492){const _0x33d41e=_0x2182ea,_0x3552db={'OmLFe':function(_0x279c8c,_0x1b6740,_0x5f2fd8){return _0x279c8c(_0x1b6740,_0x5f2fd8);},'SrRSu':_0x33d41e(0x1bb),'gWWsq':_0x33d41e(0x17a),'avbNc':function(_0x57b351,_0x2179da){return _0x57b351(_0x2179da);},'FKbcM':'Invalid\x20URL','ztsCL':_0x33d41e(0x1a0)};try{const _0xdbf46f=new AbortController(),_0x1e42aa=_0x3552db[_0x33d41e(0x141)](setTimeout,()=>_0xdbf46f['abort'](),0x1388),_0x417515={'method':_0x3552db[_0x33d41e(0x18b)],'signal':_0xdbf46f['signal'],'redirect':_0x3552db['gWWsq']};/^https:\/\/localhost(:\d+)?/i['test'](_0x484492)&&(process[_0x33d41e(0x183)][_0x33d41e(0x1a2)]='0');const _0x54be1=await _0x3552db[_0x33d41e(0x141)](fetch,_0x484492,_0x417515);delete process[_0x33d41e(0x183)]['NODE_TLS_REJECT_UNAUTHORIZED'],clearTimeout(_0x1e42aa);if(_0x54be1[_0x33d41e(0x15a)]<0x190)return{'ok':!![]};return{'ok':![],'error':'HTTP\x20'+_0x54be1[_0x33d41e(0x15a)]};}catch(_0x38d439){delete process[_0x33d41e(0x183)]['NODE_TLS_REJECT_UNAUTHORIZED'];const _0x26e823=_0x38d439,_0x1da082=_0x26e823['message']||_0x3552db[_0x33d41e(0x1c5)](String,_0x38d439),_0x564e9f=_0x1da082[_0x33d41e(0x155)](_0x3552db[_0x33d41e(0x16c)])||_0x26e823['name']===_0x3552db[_0x33d41e(0x14c)]||_0x1da082['includes']('fetch\x20failed');return{'ok':![],'error':_0x1da082,'isProtocolError':_0x564e9f};}}async function sweepOrphanLocalProfile(_0x3bbfcb,_0xb7f48,_0xd5ce65){const _0x34bbb9=_0x2182ea,_0xb98c1b={'FBgPz':function(_0x53e1be,_0x4aed78){return _0x53e1be(_0x4aed78);},'mcvzA':function(_0x39456c,_0x430196){return _0x39456c(_0x430196);},'ewGPP':function(_0xdf8fd1,_0x19b1b8,_0x27dd3c){return _0xdf8fd1(_0x19b1b8,_0x27dd3c);}},_0xef4b54=join(_0xb7f48,'local'),_0x29a123=join(_0xef4b54,_0x3bbfcb);_0xb98c1b['FBgPz'](existsSync,_0x29a123)&&(_0xd5ce65&&await _0xb98c1b['mcvzA'](isPathGitTracked,_0x29a123)?console[_0x34bbb9(0x17b)](_0x34bbb9(0x1af)+_0x29a123+'\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.'):(await rm(_0x29a123,{'recursive':!![],'force':!![]}),console[_0x34bbb9(0x17b)]('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x29a123)));if(_0xb98c1b[_0x34bbb9(0x146)](existsSync,_0xef4b54)){let _0x12f572=[];try{_0x12f572=await _0xb98c1b[_0x34bbb9(0x146)](readdir,_0xef4b54);}catch{return;}const _0x15f9a8=_0x34bbb9(0x1c1)+_0x3bbfcb+'-';for(const _0x2dbeda of _0x12f572){if(!_0x2dbeda[_0x34bbb9(0x175)](_0x15f9a8))continue;const _0x1f1693=join(_0xef4b54,_0x2dbeda);await _0xb98c1b[_0x34bbb9(0x185)](rm,_0x1f1693,{'recursive':!![],'force':!![]}),console[_0x34bbb9(0x17b)](_0x34bbb9(0x15b)+_0x1f1693);}}}async function sweepOrphansBestEffort(_0x324fc6){const _0x2c7098=_0x2182ea,_0x195ddf={'muPvo':function(_0x545a67,_0x55881b,_0x5a890d,_0x45690f){return _0x545a67(_0x55881b,_0x5a890d,_0x45690f);},'ElkKU':function(_0x39b683){return _0x39b683();},'JJwIh':function(_0x5e6310,_0x1fbd4e){return _0x5e6310 instanceof _0x1fbd4e;}};try{await _0x195ddf[_0x2c7098(0x163)](sweepOrphanLocalProfile,_0x324fc6,_0x195ddf['ElkKU'](getRangerHomeDir),![]);const _0xa9d594=getRangerDir();_0xa9d594!==_0x195ddf['ElkKU'](getRangerHomeDir)&&await sweepOrphanLocalProfile(_0x324fc6,_0xa9d594,!![]);}catch(_0x438c55){console[_0x2c7098(0x17b)](_0x2c7098(0x1a5)+(_0x195ddf[_0x2c7098(0x149)](_0x438c55,Error)?_0x438c55['message']:String(_0x438c55))+').');}}async function markActive(_0x3c583c){const _0x49b095=_0x2182ea;try{await writeActiveProfileName(_0x3c583c),console['log'](_0x49b095(0x162)+_0x3c583c);}catch{console[_0x49b095(0x17b)]('Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.');}}async function tryAutoRouteCloudProfile(_0x5d9384,_0x3d304f,_0x422f20,_0x1072b9,_0x14aac6){const _0x5007a8=_0x2182ea,_0x304d7f={'fMEyd':function(_0x164827,_0x1c34cd){return _0x164827===_0x1c34cd;},'ooQsp':_0x5007a8(0x169),'VhkYQ':_0x5007a8(0x1aa),'vxlkZ':function(_0x2b3dce,_0x375c10){return _0x2b3dce(_0x375c10);},'qOuWC':function(_0x35a44a,_0x1776f0,_0x1cf056,_0x50b349,_0x359b7d){return _0x35a44a(_0x1776f0,_0x1cf056,_0x50b349,_0x359b7d);},'GQDYv':function(_0x291389,_0x13ae34){return _0x291389+_0x13ae34;},'ZplcL':function(_0x81d9c4,_0x31b1e5){return _0x81d9c4+_0x31b1e5;},'Yrysk':_0x5007a8(0x176),'dnbkj':'\x20Your\x20org\x20has\x20no\x20auth\x20environments\x20configured.','uxTnf':_0x5007a8(0x1ad),'eUcVQ':_0x5007a8(0x14e),'NGeOL':_0x5007a8(0x184),'aeduI':_0x5007a8(0x16e),'yUgaW':function(_0x4f3631,_0x52c14f){return _0x4f3631+_0x52c14f;},'vFDpX':function(_0x3f1aa1,_0x5189f0){return _0x3f1aa1+_0x5189f0;}};let _0x5eabc5;try{_0x5eabc5=await fetchAuthConfig();}catch(_0x2946f5){return _0x14aac6?.['trackPhaseEnd'](_0x304d7f[_0x5007a8(0x1be)],{'reason':_0x304d7f['VhkYQ'],'profileName':_0x5d9384}),console['error'](_0x5007a8(0x15f)+(_0x2946f5 instanceof Error?_0x2946f5[_0x5007a8(0x19e)]:_0x304d7f['vxlkZ'](String,_0x2946f5))),![];}if((!_0x5eabc5||!_0x5eabc5['environments']||Object[_0x5007a8(0x16d)](_0x5eabc5[_0x5007a8(0x151)])[_0x5007a8(0x195)]===0x0)&&!_0x422f20[_0x5007a8(0x18a)]){if(_0x1072b9)return await _0x304d7f['qOuWC'](captureEnvLessProfile,_0x5d9384,_0x3d304f,_0x422f20,_0x14aac6);return _0x14aac6?.['trackPhaseEnd'](_0x304d7f['ooQsp'],{'reason':_0x304d7f['VhkYQ'],'profileName':_0x5d9384}),console['error'](_0x304d7f[_0x5007a8(0x1a1)](_0x304d7f['GQDYv'](_0x304d7f['ZplcL']('\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'+(_0x5007a8(0x17d)+_0x5d9384+'\x20--url\x20'+_0x3d304f+_0x5007a8(0x1b6)),'\x0a'),'\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a')+'\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login'),![];}let _0x51dc67;if(_0x422f20[_0x5007a8(0x18a)]){if(!_0x5eabc5?.['environments']?.[_0x422f20[_0x5007a8(0x18a)]]){const _0x2871cf=Object['keys'](_0x5eabc5?.['environments']??{});return _0x14aac6?.[_0x5007a8(0x18d)](_0x5007a8(0x169),{'reason':_0x304d7f['Yrysk'],'profileName':_0x5d9384}),console[_0x5007a8(0x172)]('\x0a\x20\x20Auth\x20environment\x20\x22'+_0x422f20[_0x5007a8(0x18a)]+'\x22\x20not\x20found.'+(_0x2871cf[_0x5007a8(0x195)]?'\x20Configured\x20envs:\x20'+_0x2871cf['join'](',\x20')+'.':_0x304d7f['dnbkj'])),![];}_0x51dc67=_0x422f20['authEnv'];}else _0x51dc67=matchAuthEnvironment(_0x3d304f,_0x5eabc5);if(!_0x51dc67)return _0x14aac6?.[_0x5007a8(0x18d)](_0x304d7f[_0x5007a8(0x1be)],{'reason':_0x5007a8(0x15c),'profileName':_0x5d9384}),console['error']('\x0a\x20\x20No\x20auth\x20env\x20matches\x20'+_0x3d304f+_0x5007a8(0x159)+Object['keys'](_0x5eabc5?.[_0x5007a8(0x151)]??{})[_0x5007a8(0x153)](',\x20')+'.'),![];const _0x401030=_0x5eabc5?.['environments']?.[_0x51dc67],_0x432e3c=_0x401030?.['domains']??[];if(_0x1072b9&&!_0x422f20[_0x5007a8(0x189)]){const {saveToCloud:_0x2d2650}=await _0x68b18a['prompt']([{'type':_0x304d7f[_0x5007a8(0x194)],'name':_0x304d7f['eUcVQ'],'message':_0x5007a8(0x144)+_0x51dc67+_0x5007a8(0x1ab)+_0x3d304f+'\x0a\x20\x20(domains:\x20'+_0x432e3c[_0x5007a8(0x153)](',\x20')+_0x5007a8(0x180)+_0x5d9384+'\x27\x20to\x20the\x20cloud?','default':!![]}]);if(!_0x2d2650)return _0x14aac6?.[_0x5007a8(0x18d)](_0x304d7f[_0x5007a8(0x1be)],{'reason':_0x304d7f['NGeOL'],'profileName':_0x5d9384}),console['error'](_0x304d7f['aeduI']),![];}const _0x2b87c9=_0x432e3c['some'](_0x5edd02=>{const _0x4ed680=_0x5007a8;try{return _0x304d7f['fMEyd'](new URL(_0x5edd02)['origin'],new URL(_0x3d304f)[_0x4ed680(0x171)]);}catch{return![];}}),_0x35dd59={};!_0x2b87c9&&(_0x35dd59[_0x5007a8(0x1c0)]=_0x3d304f);try{await createCloudProfile(_0x5d9384,_0x51dc67,{'settings':_0x35dd59}),warnCloudProfileSharedInOrg();}catch(_0x47c73f){if(_0x47c73f instanceof ApiError&&_0x304d7f['fMEyd'](_0x47c73f['status'],0x199)){console['error'](_0x304d7f[_0x5007a8(0x15e)]('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x5d9384+_0x5007a8(0x165),_0x5007a8(0x150)+_0x5d9384));throw _0x47c73f;}throw _0x47c73f;}return console[_0x5007a8(0x17b)](_0x304d7f[_0x5007a8(0x1bd)](_0x5007a8(0x167)+_0x5d9384+_0x5007a8(0x1b9),'\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x5d9384)),await _0x304d7f['vxlkZ'](sweepOrphansBestEffort,_0x5d9384),_0x14aac6?.[_0x5007a8(0x18d)](_0x5007a8(0x19d),{'envKey':_0x51dc67,'profileName':_0x5d9384}),!![];}async function createUnconfiguredCloudProfile(_0x1bd725,_0x558cbb){const _0x681c69=_0x2182ea,_0x2fa15c={'vBgbX':function(_0x428ae4){return _0x428ae4();},'XGeRv':function(_0x43056a,_0xe88e23){return _0x43056a instanceof _0xe88e23;},'xMBDH':function(_0x196b16,_0x310237){return _0x196b16===_0x310237;},'mbdpp':function(_0x48d04b,_0x2240c7){return _0x48d04b+_0x2240c7;}};try{await createCloudProfile(_0x1bd725,undefined,{'settings':_0x558cbb}),_0x2fa15c['vBgbX'](warnCloudProfileSharedInOrg);}catch(_0x41bd9b){_0x2fa15c[_0x681c69(0x147)](_0x41bd9b,ApiError)&&_0x2fa15c[_0x681c69(0x145)](_0x41bd9b['status'],0x199)&&console['error'](_0x2fa15c['mbdpp'](_0x681c69(0x1ae)+_0x1bd725+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x1bd725));throw _0x41bd9b;}}async function captureEnvLessProfile(_0x154d76,_0x150c08,_0x416ebd,_0x26a2f2){const _0x2d808c=_0x2182ea,_0x57a3f6={'OyuDs':_0x2d808c(0x1a8),'rnDoy':function(_0x2325c6,_0x1ed758){return _0x2325c6===_0x1ed758;},'NbiLZ':function(_0x328efc,_0x5f2a69){return _0x328efc>_0x5f2a69;},'JSZLq':function(_0x56f630,_0x398422,_0x5743b1,_0x579267){return _0x56f630(_0x398422,_0x5743b1,_0x579267);},'DEULa':'profile.add.autoRouted'};if(!_0x416ebd[_0x2d808c(0x189)]){const {capture:_0x1a12bc}=await _0x68b18a['prompt']([{'type':'confirm','name':_0x57a3f6[_0x2d808c(0x16a)],'message':_0x2d808c(0x16b),'default':!![]}]);if(!_0x1a12bc)return _0x26a2f2?.['trackPhaseEnd']('profile.add.autoRouteSkipped',{'reason':_0x2d808c(0x184),'profileName':_0x154d76}),console['error']('\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a'+_0x2d808c(0x1c3)),![];}const _0x49bb2b={};if(_0x416ebd['setupHeader'])for(const _0x463955 of _0x416ebd['setupHeader']){const _0x45ff88=_0x463955[_0x2d808c(0x166)](':');if(_0x57a3f6[_0x2d808c(0x1b3)](_0x45ff88,-0x1))continue;_0x49bb2b[_0x463955['slice'](0x0,_0x45ff88)['trim']()]=_0x463955[_0x2d808c(0x181)](_0x45ff88+0x1)[_0x2d808c(0x1c6)]();}const _0x27e852={'baseUrl':_0x150c08};_0x57a3f6[_0x2d808c(0x186)](Object['keys'](_0x49bb2b)['length'],0x0)&&(_0x27e852['setupHeaders']=_0x49bb2b);let _0x3459ec;try{_0x3459ec=await _0x57a3f6['JSZLq'](createCloudProfile,_0x154d76,undefined,{'settings':_0x27e852}),warnCloudProfileSharedInOrg();}catch(_0x45711a){_0x45711a instanceof ApiError&&_0x45711a[_0x2d808c(0x15a)]===0x199&&console[_0x2d808c(0x172)]('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x154d76+_0x2d808c(0x165)+(_0x2d808c(0x150)+_0x154d76));throw _0x45711a;}return await manualBrowserLogin(_0x3459ec,{'key':'','domains':[_0x150c08],'setupHeaders':Object[_0x2d808c(0x16d)](_0x49bb2b)['length']>0x0?_0x49bb2b:undefined}),console['log']('\x0a✓\x20Profile\x20\x27'+_0x154d76+'\x27\x20created\x20with\x20a\x20captured\x20session.\x0a'+(_0x2d808c(0x192)+_0x154d76)),await sweepOrphansBestEffort(_0x154d76),_0x26a2f2?.[_0x2d808c(0x18d)](_0x57a3f6[_0x2d808c(0x18c)],{'envKey':null,'profileName':_0x154d76}),!![];}export async function addEnv(_0x1791c0,_0xafc23f={},_0x12fb31){const _0x4c52cd=_0x2182ea,_0x16202a={'eFYXP':function(_0xece2f1,_0x3a6f01){return _0xece2f1+_0x3a6f01;},'UtjGx':function(_0x249056,_0xa49f9d){return _0x249056+_0xa49f9d;},'XfgTI':_0x4c52cd(0x199),'suoZP':'for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a','giscg':_0x4c52cd(0x14a),'hrEOp':function(_0x358b5c,_0x5d74ac){return _0x358b5c!==_0x5d74ac;},'uLeyk':_0x4c52cd(0x14d),'CSgZB':_0x4c52cd(0x18e),'avbII':_0x4c52cd(0x1b5),'TFNvm':function(_0x2ca6f7,_0x930524){return _0x2ca6f7(_0x930524);},'EMGfX':_0x4c52cd(0x1ac),'ZSlZt':_0x4c52cd(0x17c),'GyVfB':function(_0x433a40,_0x75638e){return _0x433a40>_0x75638e;},'nCSyR':function(_0x33ca01,_0x38ef5f,_0x2054f1){return _0x33ca01(_0x38ef5f,_0x2054f1);},'fzvGz':function(_0x1d2826,_0x3b8b23,_0x3a3015,_0x3d26f2,_0xb8e666){return _0x1d2826(_0x3b8b23,_0x3a3015,_0x3d26f2,_0xb8e666);},'ISaZf':'isElectron','WmMyH':function(_0x24fa47,_0x40bccb){return _0x24fa47 instanceof _0x40bccb;},'tmozJ':function(_0x59f3b1,_0x3514b3){return _0x59f3b1(_0x3514b3);},'IlnNt':function(_0x572ba6,_0xc7638f,_0x1ddd73){return _0x572ba6(_0xc7638f,_0x1ddd73);},'lsEYd':function(_0x152fa6,_0x583adb){return _0x152fa6+_0x583adb;},'qrVjv':function(_0x482d37,_0x7af16e){return _0x482d37(_0x7af16e);},'Vaaqq':_0x4c52cd(0x188),'WQaHU':'\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a','uDaTB':'What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','bnBmT':'http://localhost:3000','YlBDE':'list','LBmbf':'action','jHCvA':'retry','HWRLO':_0x4c52cd(0x19a),'KuvAM':_0x4c52cd(0x174),'vkDBR':_0x4c52cd(0x1bf)};_0xafc23f['ci']&&(console[_0x4c52cd(0x172)](_0x16202a[_0x4c52cd(0x17f)](_0x16202a['UtjGx'](_0x16202a['XfgTI']+_0x16202a['suoZP']+'\x0a'+'To\x20set\x20up\x20a\x20profile,\x20run:\x0a','\x20\x20ranger\x20profile\x20add\x20<name>\x0a')+'\x0a'+'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a',_0x16202a[_0x4c52cd(0x1b0)])),process[_0x4c52cd(0x170)](0x1));const _0x5b2b54={};if(_0xafc23f['setupHeader'])for(const _0x3a8555 of _0xafc23f[_0x4c52cd(0x179)]){const _0x2d6717=_0x3a8555['indexOf'](':');if(_0x2d6717===-0x1)throw new Error(_0x4c52cd(0x182)+_0x3a8555+_0x4c52cd(0x18f));const _0x34de37=_0x3a8555['slice'](0x0,_0x2d6717)['trim'](),_0x38e168=_0x3a8555[_0x4c52cd(0x181)](_0x2d6717+0x1)['trim']();_0x5b2b54[_0x34de37]=_0x38e168;}if(_0x16202a[_0x4c52cd(0x1c7)](_0xafc23f[_0x4c52cd(0x1b2)],undefined)&&_0xafc23f['cdpEndpoint'][_0x4c52cd(0x1c6)]()==='')throw new Error(_0x16202a[_0x4c52cd(0x142)]);if(_0xafc23f[_0x4c52cd(0x1b2)]&&_0xafc23f[_0x4c52cd(0x154)])throw new Error(_0x16202a[_0x4c52cd(0x1c4)]);if(_0xafc23f[_0x4c52cd(0x18a)]&&_0xafc23f[_0x4c52cd(0x190)])throw new Error(_0x16202a['avbII']);if(_0xafc23f['authEnv']&&_0xafc23f['cdpEndpoint'])throw new Error('--cdp-endpoint\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20a\x20CDP\x20profile\x20connects\x20to\x20an\x20existing\x20browser\x20and\x20has\x20no\x20auth\x20environment.');const _0x4c7f47=_0x16202a['TFNvm'](Boolean,_0xafc23f['cdpEndpoint']),_0x532089=isInteractive();if(!_0x532089&&!_0xafc23f['url']&&!_0x4c7f47&&!_0xafc23f['skipAuth'])throw new Error(_0x16202a['EMGfX']);if(_0x4c7f47){const _0xc9898b=_0xafc23f[_0x4c52cd(0x1b2)];console[_0x4c52cd(0x17b)](_0x16202a['ZSlZt']),console[_0x4c52cd(0x17b)](_0x4c52cd(0x187)+_0xc9898b);const _0x594ef8={'cdpEndpoint':_0xc9898b,'isElectron':!![]};_0x16202a[_0x4c52cd(0x1b4)](Object[_0x4c52cd(0x16d)](_0x5b2b54)[_0x4c52cd(0x195)],0x0)&&(_0x594ef8['setupHeaders']=_0x5b2b54);await _0x16202a[_0x4c52cd(0x168)](createUnconfiguredCloudProfile,_0x1791c0,_0x594ef8);try{setProfileOverride(process['cwd'](),_0x1791c0,_0x4c52cd(0x1b2),_0xc9898b),_0x16202a['fzvGz'](setProfileOverride,process['cwd'](),_0x1791c0,_0x16202a[_0x4c52cd(0x157)],!![]);}catch(_0x472e70){console['error'](_0x4c52cd(0x1a4)+(_0x16202a[_0x4c52cd(0x143)](_0x472e70,Error)?_0x472e70['message']:String(_0x472e70)));}console[_0x4c52cd(0x17b)](_0x4c52cd(0x1b8)+_0x1791c0+'\x27\x20created\x20(CDP).'),await _0x16202a[_0x4c52cd(0x15d)](sweepOrphansBestEffort,_0x1791c0),await _0x16202a[_0x4c52cd(0x152)](markActive,_0x1791c0);return;}if(_0xafc23f[_0x4c52cd(0x190)]){const _0x40a6b6={};_0xafc23f['url']&&(_0x40a6b6[_0x4c52cd(0x1c0)]=_0xafc23f['url']);_0x16202a[_0x4c52cd(0x1b4)](Object['keys'](_0x5b2b54)[_0x4c52cd(0x195)],0x0)&&(_0x40a6b6[_0x4c52cd(0x14f)]=_0x5b2b54);await _0x16202a['IlnNt'](createUnconfiguredCloudProfile,_0x1791c0,_0x40a6b6),console['log'](_0x16202a['lsEYd']('✓\x20Profile\x20\x27'+_0x1791c0+'\x27\x20created\x20(no\x20session).\x0a','\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20'+_0x1791c0+'`\x20again\x20without\x20--skip-auth.')),await sweepOrphansBestEffort(_0x1791c0),await _0x16202a['tmozJ'](markActive,_0x1791c0);return;}if(_0xafc23f['url']){const _0x322295=_0xafc23f[_0x4c52cd(0x154)],_0x42f5e7=await _0x16202a['qrVjv'](checkUrlReachability,_0x322295);if(!_0x42f5e7['ok']&&!_0xafc23f['force'])throw new Error('Could\x20not\x20reach\x20'+_0x322295+':\x20'+_0x42f5e7['error']+'\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.');!_0x42f5e7['ok']&&_0xafc23f[_0x4c52cd(0x19f)]&&console[_0x4c52cd(0x17b)](_0x4c52cd(0x197)+_0x322295+':\x20'+_0x42f5e7[_0x4c52cd(0x172)]+'\x20(continuing\x20with\x20--force)');}else{console['log']('\x0a🌐\x20Profile\x20Setup\x0a'),console[_0x4c52cd(0x17b)](_0x16202a[_0x4c52cd(0x164)]),console[_0x4c52cd(0x17b)](_0x16202a['WQaHU']);let _0x1b726a='',_0x3a966f=![];while(!![]){const _0x4042d3=await _0x68b18a['prompt']([{'type':'input','name':_0x4c52cd(0x1c0),'message':_0x3a966f?_0x4c52cd(0x16f):_0x16202a['uDaTB'],'default':_0x1b726a||_0x16202a['bnBmT']}]);_0x1b726a=_0x4042d3['baseUrl'];const _0x1e4a13=await checkUrlReachability(_0x1b726a);if(_0x1e4a13['ok'])break;const _0x11b283=/^[a-zA-Z][\w+.-]*:\/\//['test'](_0x1b726a),_0x5a1130=_0x1e4a13['isProtocolError']&&!_0x11b283,_0x3b5c2e=_0x5a1130?_0x4c52cd(0x177)+_0x1b726a:null;_0x3a966f=!![],console[_0x4c52cd(0x17b)]('\x0a\x20\x20Could\x20not\x20reach\x20'+_0x1b726a+':\x20'+_0x1e4a13[_0x4c52cd(0x172)]);_0x3b5c2e&&console[_0x4c52cd(0x17b)](_0x4c52cd(0x191)+_0x3b5c2e+'?');const {action:_0x490eee}=await _0x68b18a[_0x4c52cd(0x1a7)]([{'type':_0x16202a['YlBDE'],'name':_0x16202a[_0x4c52cd(0x173)],'message':_0x4c52cd(0x19b),'choices':[..._0x3b5c2e?[{'name':_0x4c52cd(0x161)+_0x3b5c2e,'value':_0x4c52cd(0x1bf)}]:[],{'name':_0x4c52cd(0x19c),'value':_0x16202a[_0x4c52cd(0x1c2)]},{'name':_0x16202a['HWRLO'],'value':_0x16202a[_0x4c52cd(0x1bc)]}]}]);if(_0x490eee===_0x16202a[_0x4c52cd(0x1a9)]&&_0x3b5c2e){_0x1b726a=_0x3b5c2e;const _0x537b23=await _0x16202a['TFNvm'](checkUrlReachability,_0x1b726a);if(_0x537b23['ok'])break;console[_0x4c52cd(0x17b)](_0x4c52cd(0x193)+_0x1b726a+':\x20'+_0x537b23[_0x4c52cd(0x172)]);}else{if(_0x490eee==='continue')break;}}_0xafc23f={..._0xafc23f,'url':_0x1b726a};}let _0x51f178=![];try{_0x51f178=await tryAutoRouteCloudProfile(_0x1791c0,_0xafc23f['url'],_0xafc23f,_0x532089,_0x12fb31);}catch(_0x5d4a89){console['error'](_0x4c52cd(0x196)+_0x1791c0+_0x4c52cd(0x148)+(_0x5d4a89 instanceof Error?_0x5d4a89[_0x4c52cd(0x19e)]:String(_0x5d4a89))),process['exit'](0x1);}!_0x51f178&&process['exit'](0x1),await markActive(_0x1791c0);}
1
+ (function(_0x1c2323,_0xf8a57b){const _0x1ba0bf=_0x1094,_0x49a024=_0x1c2323();while(!![]){try{const _0x2b24ef=-parseInt(_0x1ba0bf(0x15d))/0x1*(parseInt(_0x1ba0bf(0x15e))/0x2)+parseInt(_0x1ba0bf(0x1b4))/0x3*(parseInt(_0x1ba0bf(0x18d))/0x4)+parseInt(_0x1ba0bf(0x14a))/0x5*(-parseInt(_0x1ba0bf(0x16a))/0x6)+-parseInt(_0x1ba0bf(0x169))/0x7*(parseInt(_0x1ba0bf(0x195))/0x8)+parseInt(_0x1ba0bf(0x13b))/0x9*(parseInt(_0x1ba0bf(0x15a))/0xa)+parseInt(_0x1ba0bf(0x171))/0xb*(parseInt(_0x1ba0bf(0x13a))/0xc)+parseInt(_0x1ba0bf(0x194))/0xd*(parseInt(_0x1ba0bf(0x13f))/0xe);if(_0x2b24ef===_0xf8a57b)break;else _0x49a024['push'](_0x49a024['shift']());}catch(_0x35e72a){_0x49a024['push'](_0x49a024['shift']());}}}(_0x2025,0x5fa44));import{readdir,rm}from'fs/promises';import{join}from'path';import{existsSync}from'fs';function _0x1094(_0x3f4bd0,_0x59f690){_0x3f4bd0=_0x3f4bd0-0x137;const _0x20250f=_0x2025();let _0x10948d=_0x20250f[_0x3f4bd0];return _0x10948d;}import _0x4ab354 from'inquirer';import{getRangerDir,getRangerHomeDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{fetchAuthConfig,createCloudProfile,manualBrowserLogin,ApiError}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';import{matchAuthEnvironment}from'./utils/matchAuthEnvironment.js';import{isPathGitTracked}from'./utils/gitTracked.js';import{setProfileOverride}from'./utils/projectsConfig.js';const CLOUD_PROFILE_SHARING_WARNING='This\x20account\x20will\x20be\x20shared\x20with\x20everyone\x20at\x20your\x20organization';function warnCloudProfileSharedInOrg(){const _0x306c90=_0x1094;if(!process['stdout'][_0x306c90(0x178)])return;console['warn'](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x25b819){const _0x869a38=_0x1094,_0x2d82a5={'hCbrb':function(_0x41adf4,_0x34b387,_0x4ae91d){return _0x41adf4(_0x34b387,_0x4ae91d);},'TAzGf':'manual','dXeUC':function(_0x545419,_0x1c2695){return _0x545419<_0x1c2695;},'jQyUv':'Invalid\x20URL','baGZN':_0x869a38(0x160),'sGYJu':_0x869a38(0x175)};try{const _0x1f77a1=new AbortController(),_0x4f2a90=_0x2d82a5['hCbrb'](setTimeout,()=>_0x1f77a1['abort'](),0x1388),_0x411ec6={'method':_0x869a38(0x137),'signal':_0x1f77a1['signal'],'redirect':_0x2d82a5[_0x869a38(0x1a3)]};/^https:\/\/localhost(:\d+)?/i[_0x869a38(0x1ae)](_0x25b819)&&(process['env'][_0x869a38(0x19c)]='0');const _0x298763=await fetch(_0x25b819,_0x411ec6);delete process['env'][_0x869a38(0x19c)],clearTimeout(_0x4f2a90);if(_0x2d82a5[_0x869a38(0x197)](_0x298763[_0x869a38(0x149)],0x190))return{'ok':!![]};return{'ok':![],'error':_0x869a38(0x168)+_0x298763['status']};}catch(_0x9bb97d){delete process[_0x869a38(0x166)][_0x869a38(0x19c)];const _0xc00267=_0x9bb97d,_0x57a04a=_0xc00267['message']||String(_0x9bb97d),_0x3aec43=_0x57a04a[_0x869a38(0x170)](_0x2d82a5[_0x869a38(0x150)])||_0xc00267[_0x869a38(0x16f)]===_0x2d82a5['baGZN']||_0x57a04a[_0x869a38(0x170)](_0x2d82a5['sGYJu']);return{'ok':![],'error':_0x57a04a,'isProtocolError':_0x3aec43};}}function _0x2025(){const _0x120a0d=['VWBwe','ltqRV','test','⚠\x20Could\x20not\x20reach\x20','length','tCyoH','cdpEndpoint','profile.add.autoRouted','492573TNSyQu','\x20(continuing\x20with\x20--force)','XvaMb','trackPhaseEnd','join','dTfKY','YSLuV','domains',')\x0a\x20\x20Save\x20\x27','ZyqHB','skipAuth','kstaZ','JkWCc','\x0a\x20\x20A\x20profile\x20named\x20\x22','HEAD','Use\x20','isElectron','263760iInjRe','135PXzZdU','keys','yes','\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20','14126cyeemg','\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20(','setupHeaders','\x20Configured\x20envs:\x20','gPWgF','uzXZf','trim','nvsPs','message','\x27\x20to\x20the\x20cloud?','status','5yKduss','\x20--url\x20','\x0a\x20\x20No\x20auth\x20env\x20matches\x20','✓\x20Cloud\x20profile\x20\x27','retry','error','jQyUv','baseUrl','--cdp-endpoint\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20a\x20CDP\x20profile\x20connects\x20to\x20an\x20existing\x20browser\x20and\x20has\x20no\x20auth\x20environment.','✓\x20Profile\x20\x27','action','user_declined','environments','aXzqO','\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20','BxnPo','264230vHQYSo','Invalid\x20--setup-header\x20format:\x20\x22','zDAdV','4ZSBMfa','1574KBVYrA','JqUWt','TypeError','authEnv','What\x20would\x20you\x20like\x20to\x20do?','JSDJF','exit','\x27\x20matching\x20','env','prompt','HTTP\x20','602FXKaze','1335546byDclT','uFvWv','The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a','`\x20again\x20without\x20--skip-auth.','\x22:\x20','name','includes','165qnRzso','.\x20Pass\x20--env\x20<key>\x20to\x20pick\x20one,\x20or\x20use\x20--skip-auth.\x20Configured\x20envs:\x20','VzUJx','kMwGh','fetch\x20failed','Found\x20auth\x20environment\x20\x27','To\x20set\x20up\x20a\x20profile,\x20run:\x0a','isTTY','FbAHt','Ycpit','\x27\x20created\x20(CDP).','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','pbEIj','url','ipypU','some','force','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','Continue\x20anyway','\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','\x27\x20created\x20with\x20a\x20captured\x20session.\x0a','\x0a\x20\x20Still\x20could\x20not\x20reach\x20','dAmdi','OhuZh','\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a','\x22\x20not\x20found.','XERWg','4MnNHvZ','use_suggestion','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a','setupHeader','confirm','Could\x20not\x20reach\x20','KDKgU','1677xYDUmC','37480CZQcYi','FhlMN','dXeUC','PGIlu','AKOxe','profile.add.autoRouteSkipped','log','NODE_TLS_REJECT_UNAUTHORIZED','ziauw','\x20\x20https://docs.ranger.net/main/concepts/profiles','\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','ujXSN','http://localhost:3000','RrcdP','TAzGf','slice','\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20','RfuNG','\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.','TbQqj','env_not_found','isProtocolError','Enter\x20a\x20different\x20URL'];_0x2025=function(){return _0x120a0d;};return _0x2025();}async function sweepOrphanLocalProfile(_0xa245f4,_0x4dee9e,_0x24f8dc){const _0x2dee58=_0x1094,_0x2c6fc5={'fKutM':function(_0x542e08,_0x3ab7e7){return _0x542e08(_0x3ab7e7);},'aGnAI':function(_0x40cb7f,_0x56e63e){return _0x40cb7f(_0x56e63e);},'pbEIj':function(_0x3d8521,_0x59ddc6,_0x34edc6){return _0x3d8521(_0x59ddc6,_0x34edc6);}},_0xde23aa=join(_0x4dee9e,'local'),_0xe7e120=join(_0xde23aa,_0xa245f4);existsSync(_0xe7e120)&&(_0x24f8dc&&await isPathGitTracked(_0xe7e120)?console[_0x2dee58(0x19b)](_0x2dee58(0x1a5)+_0xe7e120+'\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.'):(await rm(_0xe7e120,{'recursive':!![],'force':!![]}),console[_0x2dee58(0x19b)]('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0xe7e120)));if(_0x2c6fc5['fKutM'](existsSync,_0xde23aa)){let _0x148238=[];try{_0x148238=await _0x2c6fc5['aGnAI'](readdir,_0xde23aa);}catch{return;}const _0x4ff1d6='.tmp-'+_0xa245f4+'-';for(const _0x77e61f of _0x148238){if(!_0x77e61f['startsWith'](_0x4ff1d6))continue;const _0x13b531=_0x2c6fc5[_0x2dee58(0x17d)](join,_0xde23aa,_0x77e61f);await rm(_0x13b531,{'recursive':!![],'force':!![]}),console[_0x2dee58(0x19b)](_0x2dee58(0x158)+_0x13b531);}}}async function sweepOrphansBestEffort(_0x4f8f67){const _0x3b1509=_0x1094,_0x3d8add={'aXzqO':function(_0x3e647b){return _0x3e647b();},'dAmdi':function(_0x416972){return _0x416972();},'PGIlu':function(_0x5f1a73,_0x4438a8,_0x3e03ea,_0x5eca74){return _0x5f1a73(_0x4438a8,_0x3e03ea,_0x5eca74);},'AKOxe':function(_0x31819a,_0x20fa5e){return _0x31819a(_0x20fa5e);}};try{await sweepOrphanLocalProfile(_0x4f8f67,_0x3d8add[_0x3b1509(0x157)](getRangerHomeDir),![]);const _0x1c8b57=_0x3d8add[_0x3b1509(0x188)](getRangerDir);_0x1c8b57!==getRangerHomeDir()&&await _0x3d8add[_0x3b1509(0x198)](sweepOrphanLocalProfile,_0x4f8f67,_0x1c8b57,!![]);}catch(_0x680737){console[_0x3b1509(0x19b)](_0x3b1509(0x140)+(_0x680737 instanceof Error?_0x680737[_0x3b1509(0x147)]:_0x3d8add[_0x3b1509(0x199)](String,_0x680737))+').');}}async function markActive(_0x421adb){try{await writeActiveProfileName(_0x421adb),console['log']('\x20\x20Set\x20active\x20profile:\x20'+_0x421adb);}catch{console['log']('Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.');}}async function tryAutoRouteCloudProfile(_0x127ac4,_0x158ff2,_0x56aa9d,_0x2cc3cd,_0x58e5b7){const _0x36fc2e=_0x1094,_0x1435fc={'xDVeh':function(_0x594cfe,_0x53d4fd){return _0x594cfe===_0x53d4fd;},'ZvWoi':function(_0x30710b){return _0x30710b();},'JkWCc':'no_auth_config','OVhXM':function(_0x401340,_0x1cd8e1,_0x1a7cea,_0x25e75c,_0x2e2a65){return _0x401340(_0x1cd8e1,_0x1a7cea,_0x25e75c,_0x2e2a65);},'EfNcW':function(_0x1ac19c,_0x2cb406){return _0x1ac19c+_0x2cb406;},'Ycpit':function(_0x6fc3fd,_0x560c39){return _0x6fc3fd+_0x560c39;},'vPABR':function(_0x1b9f9a,_0x3d44aa){return _0x1b9f9a+_0x3d44aa;},'ujXSN':_0x36fc2e(0x19f),'EQdOe':_0x36fc2e(0x18a),'JSDJF':'\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a','OBGYh':_0x36fc2e(0x1a9),'YSLuV':function(_0x327a6c,_0x5b0829){return _0x327a6c+_0x5b0829;},'ZyIyW':'\x20Your\x20org\x20has\x20no\x20auth\x20environments\x20configured.','vGysX':'no_match','ziauw':'saveToCloud','PkFTh':'profile.add.autoRouteSkipped','yDZuX':'\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.','BxofX':function(_0x99d370,_0x1ba29d){return _0x99d370===_0x1ba29d;},'TbQqj':function(_0x40a251,_0x121be0){return _0x40a251(_0x121be0);},'ltqRV':_0x36fc2e(0x1b3)};let _0xcb9a03;try{_0xcb9a03=await _0x1435fc['ZvWoi'](fetchAuthConfig);}catch(_0x6e53a6){return _0x58e5b7?.[_0x36fc2e(0x1b7)](_0x36fc2e(0x19a),{'reason':_0x1435fc[_0x36fc2e(0x1c0)],'profileName':_0x127ac4}),console[_0x36fc2e(0x14f)]('\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20'+(_0x6e53a6 instanceof Error?_0x6e53a6['message']:String(_0x6e53a6))),![];}if((!_0xcb9a03||!_0xcb9a03['environments']||Object['keys'](_0xcb9a03[_0x36fc2e(0x156)])[_0x36fc2e(0x1b0)]===0x0)&&!_0x56aa9d[_0x36fc2e(0x161)]){if(_0x2cc3cd)return await _0x1435fc['OVhXM'](captureEnvLessProfile,_0x127ac4,_0x158ff2,_0x56aa9d,_0x58e5b7);return _0x58e5b7?.['trackPhaseEnd'](_0x36fc2e(0x19a),{'reason':'no_auth_config','profileName':_0x127ac4}),console[_0x36fc2e(0x14f)](_0x1435fc['EfNcW'](_0x1435fc['Ycpit'](_0x1435fc['vPABR'](_0x1435fc[_0x36fc2e(0x1a0)]+'\x0a',_0x1435fc['EQdOe']),'\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20'+_0x127ac4+_0x36fc2e(0x14b)+_0x158ff2+'\x20--skip-auth\x0a')+'\x0a'+_0x1435fc[_0x36fc2e(0x163)],_0x36fc2e(0x185))),![];}let _0x219c30;if(_0x56aa9d[_0x36fc2e(0x161)]){if(!_0xcb9a03?.['environments']?.[_0x56aa9d['authEnv']]){const _0x4d5f7a=Object[_0x36fc2e(0x13c)](_0xcb9a03?.[_0x36fc2e(0x156)]??{});return _0x58e5b7?.['trackPhaseEnd'](_0x36fc2e(0x19a),{'reason':_0x1435fc['OBGYh'],'profileName':_0x127ac4}),console['error'](_0x1435fc[_0x36fc2e(0x1ba)]('\x0a\x20\x20Auth\x20environment\x20\x22'+_0x56aa9d['authEnv']+_0x36fc2e(0x18b),_0x4d5f7a[_0x36fc2e(0x1b0)]?_0x36fc2e(0x142)+_0x4d5f7a[_0x36fc2e(0x1b8)](',\x20')+'.':_0x1435fc['ZyIyW'])),![];}_0x219c30=_0x56aa9d['authEnv'];}else _0x219c30=matchAuthEnvironment(_0x158ff2,_0xcb9a03);if(!_0x219c30)return _0x58e5b7?.[_0x36fc2e(0x1b7)](_0x36fc2e(0x19a),{'reason':_0x1435fc['vGysX'],'profileName':_0x127ac4}),console[_0x36fc2e(0x14f)](_0x36fc2e(0x14c)+_0x158ff2+_0x36fc2e(0x172)+Object['keys'](_0xcb9a03?.[_0x36fc2e(0x156)]??{})['join'](',\x20')+'.'),![];const _0x323fa3=_0xcb9a03?.[_0x36fc2e(0x156)]?.[_0x219c30],_0x235a1a=_0x323fa3?.[_0x36fc2e(0x1bb)]??[];if(_0x2cc3cd&&!_0x56aa9d[_0x36fc2e(0x13d)]){const {saveToCloud:_0x2a05e5}=await _0x4ab354['prompt']([{'type':_0x36fc2e(0x191),'name':_0x1435fc[_0x36fc2e(0x19d)],'message':_0x36fc2e(0x176)+_0x219c30+_0x36fc2e(0x165)+_0x158ff2+'\x0a\x20\x20(domains:\x20'+_0x235a1a['join'](',\x20')+_0x36fc2e(0x1bc)+_0x127ac4+_0x36fc2e(0x148),'default':!![]}]);if(!_0x2a05e5)return _0x58e5b7?.[_0x36fc2e(0x1b7)](_0x1435fc['PkFTh'],{'reason':_0x36fc2e(0x155),'profileName':_0x127ac4}),console[_0x36fc2e(0x14f)](_0x1435fc['yDZuX']),![];}const _0x3c19d3=_0x235a1a[_0x36fc2e(0x180)](_0x3bac15=>{try{return _0x1435fc['xDVeh'](new URL(_0x3bac15)['origin'],new URL(_0x158ff2)['origin']);}catch{return![];}}),_0x5b14a3={};!_0x3c19d3&&(_0x5b14a3[_0x36fc2e(0x151)]=_0x158ff2);try{await createCloudProfile(_0x127ac4,_0x219c30,{'settings':_0x5b14a3}),warnCloudProfileSharedInOrg();}catch(_0x47c1ca){if(_0x47c1ca instanceof ApiError&&_0x1435fc['BxofX'](_0x47c1ca['status'],0x199)){console[_0x36fc2e(0x14f)](_0x1435fc['YSLuV'](_0x36fc2e(0x1c1)+_0x127ac4+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a',_0x36fc2e(0x182)+_0x127ac4));throw _0x47c1ca;}throw _0x47c1ca;}return console[_0x36fc2e(0x19b)](_0x1435fc[_0x36fc2e(0x17a)]('✓\x20Profile\x20\x27'+_0x127ac4+'\x27\x20created.\x0a','\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x127ac4)),await _0x1435fc[_0x36fc2e(0x1a8)](sweepOrphansBestEffort,_0x127ac4),_0x58e5b7?.['trackPhaseEnd'](_0x1435fc[_0x36fc2e(0x1ad)],{'envKey':_0x219c30,'profileName':_0x127ac4}),!![];}async function createUnconfiguredCloudProfile(_0x365c80,_0x12c4f8){const _0x545762=_0x1094,_0xf8d8f6={'txtTK':function(_0x10fd6f,_0xb22c75,_0x20e22b,_0x5c5d43){return _0x10fd6f(_0xb22c75,_0x20e22b,_0x5c5d43);},'dTfKY':function(_0x572c8a){return _0x572c8a();},'XERWg':function(_0x38f52a,_0x6bf0e4){return _0x38f52a===_0x6bf0e4;},'crotj':function(_0x848086,_0x5f2b24){return _0x848086+_0x5f2b24;}};try{await _0xf8d8f6['txtTK'](createCloudProfile,_0x365c80,undefined,{'settings':_0x12c4f8}),_0xf8d8f6[_0x545762(0x1b9)](warnCloudProfileSharedInOrg);}catch(_0x3f8ee8){_0x3f8ee8 instanceof ApiError&&_0xf8d8f6[_0x545762(0x18c)](_0x3f8ee8['status'],0x199)&&console[_0x545762(0x14f)](_0xf8d8f6['crotj'](_0x545762(0x1c1)+_0x365c80+_0x545762(0x183),_0x545762(0x182)+_0x365c80));throw _0x3f8ee8;}}async function captureEnvLessProfile(_0x53bcf0,_0x2725c1,_0x29bbc4,_0x3e94e9){const _0x6172e1=_0x1094,_0x1503e8={'dRnqk':'confirm','tCyoH':'Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','RfuNG':function(_0x5736c9){return _0x5736c9();},'ZyqHB':function(_0x4ce8e5,_0x1d6377){return _0x4ce8e5+_0x1d6377;},'JdhWS':function(_0x821e0f,_0x40a95d){return _0x821e0f>_0x40a95d;},'ImPEk':_0x6172e1(0x1b3)};if(!_0x29bbc4[_0x6172e1(0x13d)]){const {capture:_0x2eb811}=await _0x4ab354[_0x6172e1(0x167)]([{'type':_0x1503e8['dRnqk'],'name':'capture','message':_0x1503e8[_0x6172e1(0x1b1)],'default':!![]}]);if(!_0x2eb811)return _0x3e94e9?.['trackPhaseEnd']('profile.add.autoRouteSkipped',{'reason':_0x6172e1(0x155),'profileName':_0x53bcf0}),console['error'](_0x6172e1(0x18f)+'\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.'),![];}const _0x3ae965={};if(_0x29bbc4['setupHeader'])for(const _0x269c63 of _0x29bbc4[_0x6172e1(0x190)]){const _0x4fcaf4=_0x269c63['indexOf'](':');if(_0x4fcaf4===-0x1)continue;_0x3ae965[_0x269c63[_0x6172e1(0x1a4)](0x0,_0x4fcaf4)[_0x6172e1(0x145)]()]=_0x269c63[_0x6172e1(0x1a4)](_0x4fcaf4+0x1)[_0x6172e1(0x145)]();}const _0xdabb8b={'baseUrl':_0x2725c1};Object[_0x6172e1(0x13c)](_0x3ae965)['length']>0x0&&(_0xdabb8b[_0x6172e1(0x141)]=_0x3ae965);let _0xe20d97;try{_0xe20d97=await createCloudProfile(_0x53bcf0,undefined,{'settings':_0xdabb8b}),_0x1503e8[_0x6172e1(0x1a6)](warnCloudProfileSharedInOrg);}catch(_0x6e7549){_0x6e7549 instanceof ApiError&&_0x6e7549[_0x6172e1(0x149)]===0x199&&console[_0x6172e1(0x14f)](_0x1503e8[_0x6172e1(0x1bd)]('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x53bcf0+_0x6172e1(0x183),_0x6172e1(0x182)+_0x53bcf0));throw _0x6e7549;}return await manualBrowserLogin(_0xe20d97,{'key':'','domains':[_0x2725c1],'setupHeaders':_0x1503e8['JdhWS'](Object['keys'](_0x3ae965)[_0x6172e1(0x1b0)],0x0)?_0x3ae965:undefined}),console['log'](_0x1503e8[_0x6172e1(0x1bd)]('\x0a✓\x20Profile\x20\x27'+_0x53bcf0+_0x6172e1(0x186),'\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x53bcf0)),await sweepOrphansBestEffort(_0x53bcf0),_0x3e94e9?.[_0x6172e1(0x1b7)](_0x1503e8['ImPEk'],{'envKey':null,'profileName':_0x53bcf0}),!![];}export async function addEnv(_0x5ea665,_0x4bea2a={},_0x2d63b1){const _0x22199c=_0x1094,_0xb06ea={'uFvWv':function(_0x571c64,_0x3a2789){return _0x571c64+_0x3a2789;},'JqUWt':function(_0x2a6ccd,_0xb741af){return _0x2a6ccd+_0xb741af;},'jnleo':function(_0x3994f9,_0x525669){return _0x3994f9+_0x525669;},'OhuZh':function(_0x2428f0,_0xd1cabf){return _0x2428f0+_0xd1cabf;},'YjjAq':_0x22199c(0x177),'Rxgxq':'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','DiDmV':function(_0x3d46eb,_0x54b084){return _0x3d46eb===_0x54b084;},'VWBwe':function(_0x2f7af2,_0x1d4811){return _0x2f7af2!==_0x1d4811;},'KDKgU':function(_0x168804,_0xad1d40){return _0x168804===_0xad1d40;},'WAuaN':'--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','kstaZ':'--skip-auth\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20--skip-auth\x20makes\x20an\x20env-less\x20profile,\x20--env\x20binds\x20one\x20to\x20an\x20auth\x20environment.','FAivo':_0x22199c(0x152),'zDAdV':function(_0x5a4de4,_0x4b45f4){return _0x5a4de4(_0x4b45f4);},'RxGPO':'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','QREHN':'\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','ipypU':function(_0x28d8f2,_0x2003d2,_0x210aed){return _0x28d8f2(_0x2003d2,_0x210aed);},'FhlMN':function(_0xdfdf11,_0x409dd4,_0x262fb2,_0x5222f2,_0x47f2aa){return _0xdfdf11(_0x409dd4,_0x262fb2,_0x5222f2,_0x47f2aa);},'gPWgF':_0x22199c(0x139),'uzXZf':function(_0x3a98f5,_0x53b999){return _0x3a98f5(_0x53b999);},'BxnPo':function(_0x3913f2,_0x1cac12){return _0x3913f2(_0x1cac12);},'FbAHt':function(_0xc9c26a,_0x214e4e){return _0xc9c26a>_0x214e4e;},'FYKQx':function(_0x8e0017,_0xea143b,_0x421365){return _0x8e0017(_0xea143b,_0x421365);},'BmVnn':function(_0x34e602,_0x380d2c){return _0x34e602(_0x380d2c);},'aOjJY':'\x0a🌐\x20Profile\x20Setup\x0a','XvaMb':_0x22199c(0x17c),'XthsH':'\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a','VzUJx':'input','kMwGh':'list','wKMrp':_0x22199c(0x162),'RrcdP':_0x22199c(0x18e),'ngIYZ':'continue','VVFHv':function(_0x4ad4be,_0x6c84b5){return _0x4ad4be===_0x6c84b5;},'nvsPs':function(_0x51f149,_0x2cb7f4,_0x74794e,_0x5e679d,_0x13e4ab,_0x1e68b8){return _0x51f149(_0x2cb7f4,_0x74794e,_0x5e679d,_0x13e4ab,_0x1e68b8);}};_0x4bea2a['ci']&&(console['error'](_0xb06ea[_0x22199c(0x16b)](_0xb06ea[_0x22199c(0x15f)](_0xb06ea['JqUWt'](_0xb06ea['jnleo'](_0xb06ea[_0x22199c(0x189)](_0xb06ea['OhuZh'](_0x22199c(0x16c),'for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a'),'\x0a'),_0xb06ea['YjjAq'])+'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','\x0a'),_0xb06ea['Rxgxq']),_0x22199c(0x19e))),process[_0x22199c(0x164)](0x1));const _0x575b47={};if(_0x4bea2a['setupHeader'])for(const _0x3be3ce of _0x4bea2a['setupHeader']){const _0x4319e2=_0x3be3ce['indexOf'](':');if(_0xb06ea['DiDmV'](_0x4319e2,-0x1))throw new Error(_0x22199c(0x15b)+_0x3be3ce+'\x22.\x20Expected\x20\x22Name:\x20Value\x22.');const _0x13a03c=_0x3be3ce['slice'](0x0,_0x4319e2)[_0x22199c(0x145)](),_0xec8a5b=_0x3be3ce[_0x22199c(0x1a4)](_0xb06ea[_0x22199c(0x189)](_0x4319e2,0x1))['trim']();_0x575b47[_0x13a03c]=_0xec8a5b;}if(_0xb06ea[_0x22199c(0x1ac)](_0x4bea2a['cdpEndpoint'],undefined)&&_0xb06ea[_0x22199c(0x193)](_0x4bea2a[_0x22199c(0x1b2)][_0x22199c(0x145)](),''))throw new Error(_0xb06ea['WAuaN']);if(_0x4bea2a[_0x22199c(0x1b2)]&&_0x4bea2a[_0x22199c(0x17e)])throw new Error('--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.');if(_0x4bea2a['authEnv']&&_0x4bea2a['skipAuth'])throw new Error(_0xb06ea[_0x22199c(0x1bf)]);if(_0x4bea2a['authEnv']&&_0x4bea2a['cdpEndpoint'])throw new Error(_0xb06ea['FAivo']);const _0x4640ab=_0xb06ea[_0x22199c(0x15c)](Boolean,_0x4bea2a[_0x22199c(0x1b2)]),_0x493c30=isInteractive();if(!_0x493c30&&!_0x4bea2a[_0x22199c(0x17e)]&&!_0x4640ab&&!_0x4bea2a[_0x22199c(0x1be)])throw new Error(_0xb06ea['RxGPO']);if(_0x4640ab){const _0x1a513c=_0x4bea2a[_0x22199c(0x1b2)];console['log'](_0xb06ea['QREHN']),console[_0x22199c(0x19b)]('\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20'+_0x1a513c);const _0x232a97={'cdpEndpoint':_0x1a513c,'isElectron':!![]};Object['keys'](_0x575b47)['length']>0x0&&(_0x232a97[_0x22199c(0x141)]=_0x575b47);await _0xb06ea[_0x22199c(0x17f)](createUnconfiguredCloudProfile,_0x5ea665,_0x232a97);try{_0xb06ea[_0x22199c(0x196)](setProfileOverride,process['cwd'](),_0x5ea665,_0x22199c(0x1b2),_0x1a513c),setProfileOverride(process['cwd'](),_0x5ea665,_0xb06ea[_0x22199c(0x143)],!![]);}catch(_0x570c90){console[_0x22199c(0x14f)]('\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20'+(_0x570c90 instanceof Error?_0x570c90[_0x22199c(0x147)]:_0xb06ea[_0x22199c(0x144)](String,_0x570c90)));}console[_0x22199c(0x19b)](_0x22199c(0x14d)+_0x5ea665+_0x22199c(0x17b)),await _0xb06ea[_0x22199c(0x159)](sweepOrphansBestEffort,_0x5ea665),await _0xb06ea[_0x22199c(0x159)](markActive,_0x5ea665);return;}if(_0x4bea2a[_0x22199c(0x1be)]){const _0x514574={};_0x4bea2a['url']&&(_0x514574[_0x22199c(0x151)]=_0x4bea2a['url']);_0xb06ea[_0x22199c(0x179)](Object[_0x22199c(0x13c)](_0x575b47)['length'],0x0)&&(_0x514574[_0x22199c(0x141)]=_0x575b47);await _0xb06ea['FYKQx'](createUnconfiguredCloudProfile,_0x5ea665,_0x514574),console[_0x22199c(0x19b)](_0xb06ea['uFvWv'](_0x22199c(0x153)+_0x5ea665+'\x27\x20created\x20(no\x20session).\x0a',_0x22199c(0x13e)+_0x5ea665+_0x22199c(0x16d))),await sweepOrphansBestEffort(_0x5ea665),await markActive(_0x5ea665);return;}if(_0x4bea2a['url']){const _0x511b21=_0x4bea2a[_0x22199c(0x17e)],_0x3c064d=await _0xb06ea['BmVnn'](checkUrlReachability,_0x511b21);if(!_0x3c064d['ok']&&!_0x4bea2a[_0x22199c(0x181)])throw new Error(_0x22199c(0x192)+_0x511b21+':\x20'+_0x3c064d[_0x22199c(0x14f)]+_0x22199c(0x1a7));!_0x3c064d['ok']&&_0x4bea2a[_0x22199c(0x181)]&&console['log'](_0x22199c(0x1af)+_0x511b21+':\x20'+_0x3c064d['error']+_0x22199c(0x1b5));}else{console['log'](_0xb06ea['aOjJY']),console[_0x22199c(0x19b)](_0xb06ea[_0x22199c(0x1b6)]),console['log'](_0xb06ea['XthsH']);let _0x15e8cf='',_0x16b631=![];while(!![]){const _0x49e16a=await _0x4ab354['prompt']([{'type':_0xb06ea[_0x22199c(0x173)],'name':'baseUrl','message':_0x16b631?'Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):':'What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','default':_0x15e8cf||_0x22199c(0x1a1)}]);_0x15e8cf=_0x49e16a[_0x22199c(0x151)];const _0x172392=await checkUrlReachability(_0x15e8cf);if(_0x172392['ok'])break;const _0x55e384=/^[a-zA-Z][\w+.-]*:\/\//[_0x22199c(0x1ae)](_0x15e8cf),_0x530026=_0x172392[_0x22199c(0x1aa)]&&!_0x55e384,_0x4872e9=_0x530026?'http://'+_0x15e8cf:null;_0x16b631=!![],console[_0x22199c(0x19b)]('\x0a\x20\x20Could\x20not\x20reach\x20'+_0x15e8cf+':\x20'+_0x172392['error']);_0x4872e9&&console[_0x22199c(0x19b)]('\x20\x20Did\x20you\x20mean\x20'+_0x4872e9+'?');const {action:_0x325c14}=await _0x4ab354[_0x22199c(0x167)]([{'type':_0xb06ea[_0x22199c(0x174)],'name':_0x22199c(0x154),'message':_0xb06ea['wKMrp'],'choices':[..._0x4872e9?[{'name':_0x22199c(0x138)+_0x4872e9,'value':_0xb06ea[_0x22199c(0x1a2)]}]:[],{'name':_0x22199c(0x1ab),'value':_0x22199c(0x14e)},{'name':_0x22199c(0x184),'value':_0xb06ea['ngIYZ']}]}]);if(_0xb06ea['VVFHv'](_0x325c14,_0xb06ea[_0x22199c(0x1a2)])&&_0x4872e9){_0x15e8cf=_0x4872e9;const _0x14412d=await checkUrlReachability(_0x15e8cf);if(_0x14412d['ok'])break;console[_0x22199c(0x19b)](_0x22199c(0x187)+_0x15e8cf+':\x20'+_0x14412d[_0x22199c(0x14f)]);}else{if(_0x325c14==='continue')break;}}_0x4bea2a={..._0x4bea2a,'url':_0x15e8cf};}let _0x2b41da=![];try{_0x2b41da=await _0xb06ea[_0x22199c(0x146)](tryAutoRouteCloudProfile,_0x5ea665,_0x4bea2a['url'],_0x4bea2a,_0x493c30,_0x2d63b1);}catch(_0x2964c5){console['error']('\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22'+_0x5ea665+_0x22199c(0x16e)+(_0x2964c5 instanceof Error?_0x2964c5[_0x22199c(0x147)]:String(_0x2964c5))),process['exit'](0x1);}!_0x2b41da&&process['exit'](0x1),await markActive(_0x5ea665);}
@@ -1 +1 @@
1
- (function(_0x59f4f1,_0x1aaf3f){var _0x5468a6=_0x1b91,_0x8aab2d=_0x59f4f1();while(!![]){try{var _0x10ecc5=-parseInt(_0x5468a6(0xaf))/0x1*(parseInt(_0x5468a6(0xb9))/0x2)+-parseInt(_0x5468a6(0xad))/0x3+-parseInt(_0x5468a6(0xb2))/0x4+parseInt(_0x5468a6(0xae))/0x5+-parseInt(_0x5468a6(0xab))/0x6+-parseInt(_0x5468a6(0xac))/0x7*(parseInt(_0x5468a6(0xb8))/0x8)+parseInt(_0x5468a6(0xb4))/0x9;if(_0x10ecc5===_0x1aaf3f)break;else _0x8aab2d['push'](_0x8aab2d['shift']());}catch(_0x1e02c5){_0x8aab2d['push'](_0x8aab2d['shift']());}}}(_0x440e,0x6131a));function _0x1b91(_0x3b0e01,_0x1a6c89){_0x3b0e01=_0x3b0e01-0xab;var _0x440e5d=_0x440e();var _0x1b9163=_0x440e5d[_0x3b0e01];return _0x1b9163;}function _0x440e(){var _0x3fbbad=['552284twFmcE','Whnoh','7805439CBqcOm','ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','\x20\x20https://docs.ranger.net/main/concepts/profiles','1171176RrTJlF','12QxyiiM','450120OfKyeh','7gJUAPW','725607xQBPik','2897490AcmSWF','74551TNWLaa','exit','MzzXC'];_0x440e=function(){return _0x3fbbad;};return _0x440e();}export async function authEncrypt(_0x573932){var _0x4ea999=_0x1b91,_0x1a6343={'Whnoh':function(_0x1dd0df,_0x1fb19d){return _0x1dd0df+_0x1fb19d;},'PTEjX':function(_0x172bfc,_0xdd865e){return _0x172bfc+_0xdd865e;},'mSEzQ':_0x4ea999(0xb5),'MzzXC':'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a'};console['error'](_0x1a6343[_0x4ea999(0xb3)](_0x1a6343[_0x4ea999(0xb3)](_0x1a6343[_0x4ea999(0xb3)](_0x1a6343['PTEjX'](_0x1a6343['mSEzQ']+'session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a','\x0a'),_0x1a6343[_0x4ea999(0xb1)])+_0x4ea999(0xb6)+'\x0a','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a'),_0x4ea999(0xb7))),process[_0x4ea999(0xb0)](0x1);}
1
+ function _0x160c(_0x54f36b,_0x55a828){_0x54f36b=_0x54f36b-0x197;var _0x477a5d=_0x477a();var _0x160cbd=_0x477a5d[_0x54f36b];return _0x160cbd;}(function(_0x48c57f,_0x3594f9){var _0x41bf3f=_0x160c,_0x1408e2=_0x48c57f();while(!![]){try{var _0x22ac31=-parseInt(_0x41bf3f(0x1a5))/0x1*(-parseInt(_0x41bf3f(0x1a8))/0x2)+-parseInt(_0x41bf3f(0x19d))/0x3+parseInt(_0x41bf3f(0x1a4))/0x4+parseInt(_0x41bf3f(0x19f))/0x5+-parseInt(_0x41bf3f(0x1a1))/0x6*(parseInt(_0x41bf3f(0x1a3))/0x7)+parseInt(_0x41bf3f(0x199))/0x8*(-parseInt(_0x41bf3f(0x19c))/0x9)+parseInt(_0x41bf3f(0x1a6))/0xa*(parseInt(_0x41bf3f(0x19b))/0xb);if(_0x22ac31===_0x3594f9)break;else _0x1408e2['push'](_0x1408e2['shift']());}catch(_0x36e230){_0x1408e2['push'](_0x1408e2['shift']());}}}(_0x477a,0xe987f));function _0x477a(){var _0x38debe=['209BkcwuV','18dYZaIi','2929953MmTmMj','IfGRX','9529790NrlYkz','error','96xBivLz','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','231322UQkbbP','4050856IfbSkD','73247nvpXCd','221170QLvbfh','nPgcM','22DPAPKL','ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','6730728uxWyzO','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a'];_0x477a=function(){return _0x38debe;};return _0x477a();}export async function authEncrypt(_0x4c7b1e){var _0x30cdc=_0x160c,_0xddcb1f={'nPgcM':function(_0x56698d,_0x14b34b){return _0x56698d+_0x14b34b;},'qLhjc':function(_0x2c2a12,_0x57043a){return _0x2c2a12+_0x57043a;},'fvXDb':_0x30cdc(0x197),'IfGRX':_0x30cdc(0x19a)};console[_0x30cdc(0x1a0)](_0xddcb1f[_0x30cdc(0x1a7)](_0xddcb1f['nPgcM'](_0xddcb1f['nPgcM'](_0xddcb1f['qLhjc'](_0xddcb1f['fvXDb'],'session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a'),'\x0a'),_0x30cdc(0x1a2)),_0x30cdc(0x198))+'\x0a'+_0xddcb1f[_0x30cdc(0x19e)]+'\x20\x20https://docs.ranger.net/main/concepts/profiles'),process['exit'](0x1);}
@@ -1 +1 @@
1
- const _0x348b44=_0x3988;(function(_0x322660,_0x1e8caa){const _0x50d0b6=_0x3988,_0x42e900=_0x322660();while(!![]){try{const _0x410b7d=-parseInt(_0x50d0b6(0xed))/0x1+parseInt(_0x50d0b6(0xf5))/0x2*(-parseInt(_0x50d0b6(0xe3))/0x3)+parseInt(_0x50d0b6(0xf1))/0x4+parseInt(_0x50d0b6(0xe5))/0x5*(parseInt(_0x50d0b6(0xf9))/0x6)+parseInt(_0x50d0b6(0xe9))/0x7*(parseInt(_0x50d0b6(0xc8))/0x8)+-parseInt(_0x50d0b6(0xee))/0x9+-parseInt(_0x50d0b6(0xe1))/0xa*(-parseInt(_0x50d0b6(0xd9))/0xb);if(_0x410b7d===_0x1e8caa)break;else _0x42e900['push'](_0x42e900['shift']());}catch(_0x1f4cd2){_0x42e900['push'](_0x42e900['shift']());}}}(_0x4bf9,0x58521));import{rm,readFile,writeFile}from'fs/promises';function _0x3988(_0x29afd4,_0x27a53e){_0x29afd4=_0x29afd4-0xc1;const _0x4bf905=_0x4bf9();let _0x39883e=_0x4bf905[_0x29afd4];return _0x39883e;}import{join}from'path';import{existsSync}from'fs';import{spawn}from'child_process';import{deleteAllCredentials}from'./utils/keychain.js';function _0x4bf9(){const _0x9c09a8=['rBvdN','AiKlo','ZMnhk','DDRlu','pDtWN','trailhead','✓\x20Removed\x20stored\x20credentials','QQlZB','plugin','log','length','nMkKT','1047090GQhhgT','platform','tPvmS','parse','push','--scope','isArray','nVfMY','10PlzlFj','UnznY','15186XDywQi','RMDXn','60YbbnDQ','Aygyn','✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','replace','3686382ceEImC','win32','✓\x20Removed\x20trailhead\x20marketplace','BAMFk','413983ewgUCo','1976598dvgIOp','user','MTkSp','1264752QIjEXF','string','ranger','claude','62TVduaV','HiCCp','project','ObTwD','107142MrdGrg','ignore','igNui','✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','rTPfZ','error','UKccQ','filter','stringify','8CNBIKO','OrHdp','\x0a✅\x20Cleanup\x20complete!\x0a','✓\x20Removed\x20OpenCode\x20user\x20skill:\x20','dpgzs'];_0x4bf9=function(){return _0x9c09a8;};return _0x4bf9();}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=[_0x348b44(0xf3),'feature-tracker','bug-bash','e2e-test-recommender'],opencodePluginName='@ranger-testing/opencode-plugin';function parseJsonc(_0x4630f0){const _0xd23060=_0x348b44,_0x5e97d2=_0x4630f0['replace'](/\/\*[\s\S]*?\*\//g,''),_0x563acf=_0x5e97d2['replace'](/^\s*\/\/.*$/gm,''),_0x3bce18=_0x563acf[_0xd23060(0xe8)](/,\s*([}\]])/g,'$1');return JSON[_0xd23060(0xdc)](_0x3bce18);}async function removeOpencodePluginConfig(_0x5b2ff8){const _0x4d8152=_0x348b44,_0x4f04ee={'CNIWj':function(_0x1cfb02,_0x316589){return _0x1cfb02!==_0x316589;},'nMkKT':_0x4d8152(0xf2),'BAMFk':function(_0x4a19a7,_0x168a86){return _0x4a19a7(_0x168a86);},'nVfMY':function(_0x318c5b,_0x2fe624){return _0x318c5b===_0x2fe624;}};if(!_0x4f04ee[_0x4d8152(0xec)](existsSync,_0x5b2ff8))return![];let _0x23585c;try{const _0x56d8b3=await readFile(_0x5b2ff8,'utf-8');_0x23585c=parseJsonc(_0x56d8b3);}catch{return![];}const _0x5b1e2b=Array[_0x4d8152(0xdf)](_0x23585c[_0x4d8152(0xd5)])?_0x23585c[_0x4d8152(0xd5)]:[];if(_0x5b1e2b['length']===0x0)return![];const _0x20fb9c=_0x5b1e2b[_0x4d8152(0xc6)](_0x29371a=>{const _0x795591=_0x4d8152;if(_0x4f04ee['CNIWj'](typeof _0x29371a,_0x4f04ee[_0x795591(0xd8)]))return!![];return _0x29371a!==opencodePluginName;});if(_0x4f04ee['nVfMY'](_0x20fb9c[_0x4d8152(0xd7)],_0x5b1e2b['length']))return![];return _0x4f04ee[_0x4d8152(0xe0)](_0x20fb9c[_0x4d8152(0xd7)],0x0)?delete _0x23585c[_0x4d8152(0xd5)]:_0x23585c[_0x4d8152(0xd5)]=_0x20fb9c,await writeFile(_0x5b2ff8,JSON[_0x4d8152(0xc7)](_0x23585c,null,0x2)+'\x0a'),!![];}async function uninstallClaudePlugin(_0x3b9566){const _0x4658ac=_0x348b44,_0x493b5e={'dpgzs':'uninstall','HiCCp':'ranger@trailhead','HVqWN':_0x4658ac(0xde),'UnznY':function(_0x3d1ef5,_0x48ede3,_0x213a35,_0x5a1e83){return _0x3d1ef5(_0x48ede3,_0x213a35,_0x5a1e83);},'igNui':_0x4658ac(0xf4),'tPvmS':'ignore','wKKKN':function(_0x189edf){return _0x189edf();}};return new Promise(_0x3ca8e5=>{const _0x555e03=_0x4658ac,_0x138f82={'ZMnhk':function(_0x56ec69,_0x1f8468){return _0x56ec69(_0x1f8468);}},_0x10109c=[_0x555e03(0xd5),_0x493b5e[_0x555e03(0xcc)],_0x493b5e[_0x555e03(0xf6)]];_0x3b9566&&_0x10109c[_0x555e03(0xdd)](_0x493b5e['HVqWN'],_0x3b9566);const _0x5e4158=_0x493b5e[_0x555e03(0xe2)](spawn,_0x493b5e[_0x555e03(0xc1)],_0x10109c,{'stdio':[_0x555e03(0xfa),_0x555e03(0xfa),_0x493b5e[_0x555e03(0xdb)]],'cwd':_0x3b9566?_0x493b5e['wKKKN'](getProjectRoot):undefined,'shell':process[_0x555e03(0xda)]===_0x555e03(0xea)});_0x5e4158['on']('close',_0xc1c81c=>{const _0x590420=_0x555e03;_0x138f82[_0x590420(0xcf)](_0x3ca8e5,_0xc1c81c===0x0);}),_0x5e4158['on'](_0x555e03(0xc4),()=>{_0x3ca8e5(![]);});});}async function removeMarketplace(){const _0x49f317=_0x348b44,_0x59cd27={'hDnQg':function(_0x53f1f3,_0x19d837){return _0x53f1f3(_0x19d837);},'fOWex':function(_0x566148,_0x363e8d,_0x3b1b9b,_0x279de3){return _0x566148(_0x363e8d,_0x3b1b9b,_0x279de3);},'XwWJs':'claude','iDHbl':'plugin','RMDXn':'marketplace','rBvdN':'remove','aeddG':_0x49f317(0xd2),'pDtWN':'ignore','peeSN':function(_0x22761f,_0x104ef5){return _0x22761f===_0x104ef5;},'MTkSp':_0x49f317(0xea),'LIXiI':'close'};return new Promise(_0x2eb2e9=>{const _0x3977a6=_0x49f317,_0x476567=_0x59cd27['fOWex'](spawn,_0x59cd27['XwWJs'],[_0x59cd27['iDHbl'],_0x59cd27[_0x3977a6(0xe4)],_0x59cd27[_0x3977a6(0xcd)],_0x59cd27['aeddG']],{'stdio':[_0x3977a6(0xfa),_0x59cd27[_0x3977a6(0xd1)],_0x59cd27[_0x3977a6(0xd1)]],'shell':_0x59cd27['peeSN'](process['platform'],_0x59cd27[_0x3977a6(0xf0)])});_0x476567['on'](_0x59cd27['LIXiI'],_0x41cf=>{_0x59cd27['hDnQg'](_0x2eb2e9,_0x41cf===0x0);}),_0x476567['on'](_0x3977a6(0xc4),()=>{_0x2eb2e9(![]);});});}export async function clean(){const _0x55a32a=_0x348b44,_0x185f0b={'Aygyn':function(_0x47f59b){return _0x47f59b();},'kwSFe':function(_0x5069a5,_0x758be2){return _0x5069a5(_0x758be2);},'OrHdp':function(_0x1fa84b,_0x32c2b2){return _0x1fa84b(_0x32c2b2);},'ObTwD':function(_0x2be512){return _0x2be512();},'DDRlu':function(_0xc0eee1,_0x5ba397,_0x4a0481){return _0xc0eee1(_0x5ba397,_0x4a0481);},'nKlyZ':function(_0x5ac97f,_0x4cfe7f){return _0x5ac97f(_0x4cfe7f);},'UKccQ':_0x55a32a(0xf7),'rTPfZ':function(_0x3398df,_0x42d5fd){return _0x3398df(_0x42d5fd);},'AiKlo':_0x55a32a(0xef),'QQlZB':function(_0x21a345,_0x493f05){return _0x21a345(_0x493f05);},'rpzjx':_0x55a32a(0xeb),'baFbe':_0x55a32a(0xca)};console['log']('\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a');let _0x33907f=![];try{await _0x185f0b['Aygyn'](deleteAllCredentials),console['log'](_0x55a32a(0xd3)),_0x33907f=!![];}catch{}const _0x575ea7=_0x185f0b[_0x55a32a(0xe6)](getCacheFile);_0x185f0b['kwSFe'](existsSync,_0x575ea7)&&(await _0x185f0b[_0x55a32a(0xc9)](rm,_0x575ea7),_0x33907f=!![]);const _0x7cf594=_0x185f0b[_0x55a32a(0xf8)](getRangerDir);_0x185f0b['kwSFe'](existsSync,_0x7cf594)&&(await _0x185f0b['DDRlu'](rm,_0x7cf594,{'recursive':!![]}),console[_0x55a32a(0xd6)]('✓\x20Removed\x20.ranger/\x20directory'),_0x33907f=!![]);const _0x26efff=getProjectSkillsDir();for(const _0x2432b1 of skillsToRemove){const _0x30521c=join(_0x26efff,_0x2432b1);_0x185f0b['nKlyZ'](existsSync,_0x30521c)&&(await rm(_0x30521c,{'recursive':!![]}),console[_0x55a32a(0xd6)]('✓\x20Removed\x20project\x20skill:\x20'+_0x2432b1),_0x33907f=!![]);}const _0x14263a=getUserSkillsDir();for(const _0x213cad of skillsToRemove){const _0x5e52c0=join(_0x14263a,_0x213cad);existsSync(_0x5e52c0)&&(await _0x185f0b[_0x55a32a(0xd0)](rm,_0x5e52c0,{'recursive':!![]}),console[_0x55a32a(0xd6)]('✓\x20Removed\x20user\x20skill:\x20'+_0x213cad),_0x33907f=!![]);}const _0x3b97bd=getOpencodeSkillsDir(_0x185f0b['UKccQ']);for(const _0x5beb0f of skillsToRemove){const _0x3e3913=join(_0x3b97bd,_0x5beb0f);_0x185f0b[_0x55a32a(0xc3)](existsSync,_0x3e3913)&&(await rm(_0x3e3913,{'recursive':!![]}),console[_0x55a32a(0xd6)]('✓\x20Removed\x20OpenCode\x20project\x20skill:\x20'+_0x5beb0f),_0x33907f=!![]);}const _0x1a5bbd=getOpencodeSkillsDir(_0x185f0b[_0x55a32a(0xce)]);for(const _0x2f05de of skillsToRemove){const _0x4a556f=_0x185f0b[_0x55a32a(0xd0)](join,_0x1a5bbd,_0x2f05de);existsSync(_0x4a556f)&&(await rm(_0x4a556f,{'recursive':!![]}),console['log'](_0x55a32a(0xcb)+_0x2f05de),_0x33907f=!![]);}const _0x57a0aa=join(getOpencodeConfigDir(_0x185f0b[_0x55a32a(0xc5)]),'opencode.json');await _0x185f0b['OrHdp'](removeOpencodePluginConfig,_0x57a0aa)&&(console['log']('✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)'),_0x33907f=!![]);const _0x38c58d=_0x185f0b['DDRlu'](join,getOpencodeConfigDir(_0x185f0b[_0x55a32a(0xce)]),'opencode.json');await removeOpencodePluginConfig(_0x38c58d)&&(console[_0x55a32a(0xd6)]('✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)'),_0x33907f=!![]);const _0x42d9bf=await _0x185f0b['Aygyn'](uninstallClaudePlugin);_0x42d9bf&&(console['log'](_0x55a32a(0xc2)),_0x33907f=!![]);const _0x438d64=await _0x185f0b[_0x55a32a(0xd4)](uninstallClaudePlugin,'project');_0x438d64&&(console['log'](_0x55a32a(0xe7)),_0x33907f=!![]);const _0x333999=await removeMarketplace();_0x333999&&(console[_0x55a32a(0xd6)](_0x185f0b['rpzjx']),_0x33907f=!![]),_0x33907f?console['log'](_0x185f0b['baFbe']):console[_0x55a32a(0xd6)]('Nothing\x20to\x20clean\x20up.\x0a');}
1
+ const _0x51f633=_0xe228;(function(_0x72f611,_0x2bd7c2){const _0x37a8f6=_0xe228,_0x245b1a=_0x72f611();while(!![]){try{const _0x4f735e=parseInt(_0x37a8f6(0x88))/0x1*(parseInt(_0x37a8f6(0x6f))/0x2)+-parseInt(_0x37a8f6(0x8b))/0x3*(parseInt(_0x37a8f6(0x94))/0x4)+-parseInt(_0x37a8f6(0x99))/0x5+parseInt(_0x37a8f6(0x85))/0x6+-parseInt(_0x37a8f6(0x81))/0x7*(-parseInt(_0x37a8f6(0x7d))/0x8)+-parseInt(_0x37a8f6(0x78))/0x9+-parseInt(_0x37a8f6(0x8c))/0xa*(-parseInt(_0x37a8f6(0x9b))/0xb);if(_0x4f735e===_0x2bd7c2)break;else _0x245b1a['push'](_0x245b1a['shift']());}catch(_0x38faae){_0x245b1a['push'](_0x245b1a['shift']());}}}(_0x3b56,0xa8895));import{rm,readFile,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{spawn}from'child_process';function _0xe228(_0x1290e5,_0x4d06ca){_0x1290e5=_0x1290e5-0x69;const _0x3b56d1=_0x3b56();let _0xe228a8=_0x3b56d1[_0x1290e5];return _0xe228a8;}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=_0x51f633(0x7f);function parseJsonc(_0x425c8e){const _0x3eb514=_0x51f633,_0x1f81f2=_0x425c8e['replace'](/\/\*[\s\S]*?\*\//g,''),_0x4a11a2=_0x1f81f2['replace'](/^\s*\/\/.*$/gm,''),_0x52f98d=_0x4a11a2['replace'](/,\s*([}\]])/g,'$1');return JSON[_0x3eb514(0x86)](_0x52f98d);}async function removeOpencodePluginConfig(_0x253031){const _0x5b19a1=_0x51f633,_0x1d9f23={'UodCL':function(_0x46a661,_0x842c73){return _0x46a661!==_0x842c73;},'HcyRJ':'string','EWiTW':function(_0x14a238,_0x2aeaf6){return _0x14a238!==_0x2aeaf6;},'zhxLN':function(_0x204e2f,_0x2ad495){return _0x204e2f(_0x2ad495);},'RmpqM':function(_0x5d11f5,_0x11cca0,_0x5c3e2a){return _0x5d11f5(_0x11cca0,_0x5c3e2a);},'Dydnx':function(_0x27a61b,_0x3943e6){return _0x27a61b===_0x3943e6;},'AYZzq':function(_0x1973b7,_0x57cb8a,_0x300edd){return _0x1973b7(_0x57cb8a,_0x300edd);}};if(!_0x1d9f23[_0x5b19a1(0x84)](existsSync,_0x253031))return![];let _0x2d0b56;try{const _0x4904f2=await _0x1d9f23[_0x5b19a1(0x96)](readFile,_0x253031,'utf-8');_0x2d0b56=_0x1d9f23['zhxLN'](parseJsonc,_0x4904f2);}catch{return![];}const _0x570099=Array['isArray'](_0x2d0b56['plugin'])?_0x2d0b56['plugin']:[];if(_0x570099['length']===0x0)return![];const _0x288cc2=_0x570099[_0x5b19a1(0x8e)](_0x3ba807=>{const _0x52fec1=_0x5b19a1;if(_0x1d9f23[_0x52fec1(0x8d)](typeof _0x3ba807,_0x1d9f23[_0x52fec1(0x6b)]))return!![];return _0x1d9f23['EWiTW'](_0x3ba807,opencodePluginName);});if(_0x288cc2[_0x5b19a1(0x70)]===_0x570099[_0x5b19a1(0x70)])return![];return _0x1d9f23[_0x5b19a1(0x7a)](_0x288cc2[_0x5b19a1(0x70)],0x0)?delete _0x2d0b56['plugin']:_0x2d0b56[_0x5b19a1(0x83)]=_0x288cc2,await _0x1d9f23[_0x5b19a1(0x80)](writeFile,_0x253031,JSON[_0x5b19a1(0x6a)](_0x2d0b56,null,0x2)+'\x0a'),!![];}async function uninstallClaudePlugin(_0x32a668){const _0x5cedf3=_0x51f633,_0x8972ef={'hvzJN':function(_0x481c9c,_0x2f9605){return _0x481c9c(_0x2f9605);},'nXOKp':_0x5cedf3(0x76),'lrCed':'ranger@trailhead','YOHlq':'claude','NZnGk':_0x5cedf3(0x74),'DTxPp':function(_0x3aeee0,_0x5cc6b6){return _0x3aeee0===_0x5cc6b6;},'vnEQJ':'close'};return new Promise(_0x26e0cd=>{const _0x402424=_0x5cedf3,_0xabaaeb=[_0x402424(0x83),_0x8972ef['nXOKp'],_0x8972ef['lrCed']];_0x32a668&&_0xabaaeb['push']('--scope',_0x32a668);const _0x4e9901=spawn(_0x8972ef[_0x402424(0x7b)],_0xabaaeb,{'stdio':[_0x8972ef['NZnGk'],_0x8972ef['NZnGk'],_0x8972ef['NZnGk']],'cwd':_0x32a668?getProjectRoot():undefined,'shell':_0x8972ef[_0x402424(0x92)](process[_0x402424(0x8a)],'win32')});_0x4e9901['on'](_0x8972ef[_0x402424(0x75)],_0x1fec8b=>{const _0x97edba=_0x402424;_0x8972ef[_0x97edba(0x79)](_0x26e0cd,_0x1fec8b===0x0);}),_0x4e9901['on']('error',()=>{_0x26e0cd(![]);});});}async function removeMarketplace(){const _0x308882=_0x51f633,_0xda64cd={'LsSJh':function(_0x30cbc3,_0x490856){return _0x30cbc3(_0x490856);},'PaQed':function(_0x27f32e,_0x33f568,_0x3356fd,_0x256b54){return _0x27f32e(_0x33f568,_0x3356fd,_0x256b54);},'nYdWv':'plugin','ILWnY':'marketplace','HErAC':'remove','ZtugC':'trailhead','qCovr':'ignore','XNulR':function(_0x413c35,_0x4f1dff){return _0x413c35===_0x4f1dff;},'ByweG':_0x308882(0x77),'iKTXk':'error'};return new Promise(_0x288d69=>{const _0x11e8a2=_0x308882,_0x6edbe1={'eGsic':function(_0x3236f1,_0x3b308a){const _0x3a1ef4=_0xe228;return _0xda64cd[_0x3a1ef4(0x7e)](_0x3236f1,_0x3b308a);}},_0x3fd1f0=_0xda64cd['PaQed'](spawn,_0x11e8a2(0x93),[_0xda64cd['nYdWv'],_0xda64cd['ILWnY'],_0xda64cd['HErAC'],_0xda64cd[_0x11e8a2(0x73)]],{'stdio':[_0xda64cd['qCovr'],_0x11e8a2(0x74),_0xda64cd[_0x11e8a2(0x6c)]],'shell':_0xda64cd[_0x11e8a2(0x98)](process['platform'],_0xda64cd['ByweG'])});_0x3fd1f0['on']('close',_0x599da2=>{_0x288d69(_0x599da2===0x0);}),_0x3fd1f0['on'](_0xda64cd['iKTXk'],()=>{_0x6edbe1['eGsic'](_0x288d69,![]);});});}export async function clean(){const _0x44c822=_0x51f633,_0x923b9a={'zpciQ':function(_0x275686){return _0x275686();},'FYbEp':function(_0x3d4d97,_0x18500f){return _0x3d4d97(_0x18500f);},'szNhx':function(_0x2f7afb,_0x2ab1e5){return _0x2f7afb(_0x2ab1e5);},'RKYBP':function(_0x21c76e,_0x3792d7,_0xb80aa4){return _0x21c76e(_0x3792d7,_0xb80aa4);},'ifSwB':function(_0xf5485,_0x3ea921,_0x40d4c5){return _0xf5485(_0x3ea921,_0x40d4c5);},'ezEoG':function(_0x1f721f,_0x2ba406,_0x1ae2e2){return _0x1f721f(_0x2ba406,_0x1ae2e2);},'yPfIz':function(_0xc1216a){return _0xc1216a();},'SoYVE':function(_0x133948,_0x1fbe27,_0x51f2e2){return _0x133948(_0x1fbe27,_0x51f2e2);},'wVMor':'user','DBANm':'✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','hNpzd':'opencode.json','Dfqzy':'✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)','dXovU':_0x44c822(0x91),'uHuPV':'✓\x20Removed\x20trailhead\x20marketplace','KOKsb':'\x0a✅\x20Cleanup\x20complete!\x0a'};console[_0x44c822(0x7c)](_0x44c822(0x72));let _0x4103e8=![];try{await deleteAllCredentials(),console[_0x44c822(0x7c)]('✓\x20Removed\x20stored\x20credentials'),_0x4103e8=!![];}catch{}const _0x13e065=_0x923b9a['zpciQ'](getCacheFile);existsSync(_0x13e065)&&(await _0x923b9a[_0x44c822(0x9a)](rm,_0x13e065),_0x4103e8=!![]);const _0x23faf5=_0x923b9a['zpciQ'](getRangerDir);_0x923b9a['szNhx'](existsSync,_0x23faf5)&&(await _0x923b9a['RKYBP'](rm,_0x23faf5,{'recursive':!![]}),console[_0x44c822(0x7c)]('✓\x20Removed\x20.ranger/\x20directory'),_0x4103e8=!![]);const _0xfacadf=getProjectSkillsDir();for(const _0x180edb of skillsToRemove){const _0x54424d=_0x923b9a['ifSwB'](join,_0xfacadf,_0x180edb);_0x923b9a[_0x44c822(0x9a)](existsSync,_0x54424d)&&(await _0x923b9a[_0x44c822(0x6d)](rm,_0x54424d,{'recursive':!![]}),console[_0x44c822(0x7c)]('✓\x20Removed\x20project\x20skill:\x20'+_0x180edb),_0x4103e8=!![]);}const _0x4358c5=_0x923b9a[_0x44c822(0x87)](getUserSkillsDir);for(const _0x41112f of skillsToRemove){const _0xc07fcd=_0x923b9a[_0x44c822(0x95)](join,_0x4358c5,_0x41112f);_0x923b9a[_0x44c822(0x97)](existsSync,_0xc07fcd)&&(await rm(_0xc07fcd,{'recursive':!![]}),console['log']('✓\x20Removed\x20user\x20skill:\x20'+_0x41112f),_0x4103e8=!![]);}const _0x3e02c3=getOpencodeSkillsDir('project');for(const _0x303320 of skillsToRemove){const _0x9769bf=join(_0x3e02c3,_0x303320);_0x923b9a['szNhx'](existsSync,_0x9769bf)&&(await rm(_0x9769bf,{'recursive':!![]}),console['log'](_0x44c822(0x90)+_0x303320),_0x4103e8=!![]);}const _0x382973=getOpencodeSkillsDir(_0x923b9a['wVMor']);for(const _0x4ee4ea of skillsToRemove){const _0x5374c6=join(_0x382973,_0x4ee4ea);existsSync(_0x5374c6)&&(await rm(_0x5374c6,{'recursive':!![]}),console['log']('✓\x20Removed\x20OpenCode\x20user\x20skill:\x20'+_0x4ee4ea),_0x4103e8=!![]);}const _0x4c1bf6=join(getOpencodeConfigDir('project'),'opencode.json');await _0x923b9a['szNhx'](removeOpencodePluginConfig,_0x4c1bf6)&&(console[_0x44c822(0x7c)](_0x923b9a[_0x44c822(0x89)]),_0x4103e8=!![]);const _0x42c81c=_0x923b9a['ezEoG'](join,getOpencodeConfigDir(_0x923b9a[_0x44c822(0x69)]),_0x923b9a['hNpzd']);await removeOpencodePluginConfig(_0x42c81c)&&(console['log'](_0x923b9a[_0x44c822(0x71)]),_0x4103e8=!![]);const _0x4de511=await uninstallClaudePlugin();_0x4de511&&(console['log']('✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)'),_0x4103e8=!![]);const _0x2d0cc1=await uninstallClaudePlugin(_0x923b9a['dXovU']);_0x2d0cc1&&(console['log']('✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)'),_0x4103e8=!![]);const _0x8d8849=await removeMarketplace();_0x8d8849&&(console[_0x44c822(0x7c)](_0x923b9a[_0x44c822(0x6e)]),_0x4103e8=!![]),_0x4103e8?console['log'](_0x923b9a[_0x44c822(0x82)]):console[_0x44c822(0x7c)](_0x44c822(0x8f));}function _0x3b56(){const _0x43f2ca=['8kiQmKd','LsSJh','@ranger-testing/opencode-plugin','AYZzq','659407JImsoz','KOKsb','plugin','zhxLN','5671194OdxlvV','parse','yPfIz','1dloqWX','DBANm','platform','80127IjMDUI','30mRzTez','UodCL','filter','Nothing\x20to\x20clean\x20up.\x0a','✓\x20Removed\x20OpenCode\x20project\x20skill:\x20','project','DTxPp','claude','64Hnlqvc','SoYVE','RmpqM','szNhx','XNulR','2678260vBeIBY','FYbEp','2726119gDbrft','wVMor','stringify','HcyRJ','qCovr','ezEoG','uHuPV','25972hDepHs','length','Dfqzy','\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','ZtugC','ignore','vnEQJ','uninstall','win32','1282968nztadE','hvzJN','Dydnx','YOHlq','log'];_0x3b56=function(){return _0x43f2ca;};return _0x3b56();}
@@ -1 +1 @@
1
- function _0x27ee(){const _0x2de7aa=['5ZUecYn','oUpvA','local','leLde','ZlrKW','NMJzH','cwd','135921qLpYJA','gxJlj','alsoExistsElsewhere','stringify','dQqXP','\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.','No\x20configuration\x20set\x20for\x20\x22','QqSHp','null','\x22\x20not\x20found','trim','Removed\x20','true','164435lDAwVb','246530gFUsIr','startsWith','\x20<key>\x22\x20to\x20remove\x20individual\x20values.','log','xzfKL','fsKqr','undefined','3480960Neqbfw','isNaN','pNLlS','settings','\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20','cloud','nFfbm','110kyNTyW','42VvrQap','endsWith','false','eGlOp','khfbk','KFDom',':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22','165728SGeiWs','FsaNz','Set\x20','lfYbX','5941428JFFhFb','4177647qKwamh','Eeawh','test','kind','16IfHiZI','Key\x20\x22','isSafeInteger','object','AmWXl','4BJoMEE','ytdhe'];_0x27ee=function(){return _0x2de7aa;};return _0x27ee();}(function(_0x2e0427,_0x1266a9){const _0x1c893a=_0xb169,_0x26bba7=_0x2e0427();while(!![]){try{const _0xd0ed17=-parseInt(_0x1c893a(0x19d))/0x1*(-parseInt(_0x1c893a(0x1c2))/0x2)+parseInt(_0x1c893a(0x190))/0x3*(parseInt(_0x1c893a(0x1bd))/0x4)+parseInt(_0x1c893a(0x189))/0x5*(-parseInt(_0x1c893a(0x1a5))/0x6)+-parseInt(_0x1c893a(0x1ad))/0x7*(-parseInt(_0x1c893a(0x1b4))/0x8)+-parseInt(_0x1c893a(0x1b9))/0x9+parseInt(_0x1c893a(0x19e))/0xa*(parseInt(_0x1c893a(0x1ac))/0xb)+parseInt(_0x1c893a(0x1b8))/0xc;if(_0xd0ed17===_0x1266a9)break;else _0x26bba7['push'](_0x26bba7['shift']());}catch(_0x33067b){_0x26bba7['push'](_0x26bba7['shift']());}}}(_0x27ee,0x50fb4));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';const BOOLEAN_KEYS=['headless','allowInsecureLocalhost','forceLogin'];function parseLocalValue(_0xc9a5ec,_0x502cd0){const _0x4daada=_0xb169;if(BOOLEAN_KEYS['includes'](_0xc9a5ec)){if(_0x502cd0===_0x4daada(0x19c))return!![];if(_0x502cd0==='false')return![];throw new Error('Invalid\x20value\x20for\x20'+_0xc9a5ec+_0x4daada(0x1b3));}return _0x502cd0;}function parseOverrideValue(_0x535174){const _0x24e23a=_0xb169,_0x50f0df={'EWrig':function(_0x26011b,_0x5b8ab4){return _0x26011b===_0x5b8ab4;},'hUAaV':function(_0x34c140,_0x2e83f3){return _0x34c140===_0x2e83f3;},'lfYbX':_0x24e23a(0x1af),'xzfKL':function(_0x277411,_0x47bf34){return _0x277411===_0x47bf34;},'oUpvA':_0x24e23a(0x1a4),'pNLlS':function(_0x41039d,_0x34b4ae){return _0x41039d(_0x34b4ae);},'qapln':function(_0x5830e0,_0x11ad93){return _0x5830e0(_0x11ad93);}};if(_0x50f0df['EWrig'](_0x535174,'true'))return!![];if(_0x50f0df['hUAaV'](_0x535174,_0x50f0df[_0x24e23a(0x1b7)]))return![];if(_0x50f0df[_0x24e23a(0x1a2)](_0x535174,_0x24e23a(0x198)))return null;if(_0x535174===_0x50f0df[_0x24e23a(0x18a)])return undefined;if(/^-?\d+$/[_0x24e23a(0x1bb)](_0x535174)){const _0x5c263a=_0x50f0df[_0x24e23a(0x1a7)](Number,_0x535174);if(Number[_0x24e23a(0x1bf)](_0x5c263a))return _0x5c263a;}if(/^-?\d+\.\d+$/['test'](_0x535174)){const _0xba8ca4=_0x50f0df['qapln'](Number,_0x535174);if(!Number[_0x24e23a(0x1a6)](_0xba8ca4))return _0xba8ca4;}const _0x3fe772=_0x535174[_0x24e23a(0x19a)]();if(_0x3fe772[_0x24e23a(0x19f)]('{')&&_0x3fe772[_0x24e23a(0x1ae)]('}')||_0x3fe772['startsWith']('[')&&_0x3fe772['endsWith'](']'))try{return JSON['parse'](_0x3fe772);}catch{}return _0x535174;}async function resolveProfileTarget(_0x315077){const _0x459727=_0xb169,_0xd565eb={'AmWXl':function(_0x554247,_0xb54a8a){return _0x554247(_0xb54a8a);}},_0x3433c0=existsSync(getEnvDir(_0x315077));let _0x33e22b=![];try{const _0x261b28=await fetchCloudProfile(_0x315077);_0x33e22b=_0xd565eb[_0x459727(0x1c1)](Boolean,_0x261b28);}catch{}if(_0x33e22b)return{'kind':_0x459727(0x1aa),'alsoExistsElsewhere':_0x3433c0};if(_0x3433c0)return{'kind':_0x459727(0x18b),'alsoExistsElsewhere':![]};throw new Error('Profile\x20\x22'+_0x315077+_0x459727(0x1a9)+_0x315077);}function printDualExistsHint(_0x4d31e9){const _0x137733=_0xb169;console[_0x137733(0x1a1)]('\x20\x20Note:\x20\x22'+_0x4d31e9+_0x137733(0x195));}function getProjectPath(){const _0x3a5dbf=_0xb169;return process[_0x3a5dbf(0x18f)]();}async function loadEffectiveCloudSettings(_0x244c56){const _0xc1b00c=_0xb169,_0x5c3d77={'UQydt':function(_0x3fb253,_0x320bdf,_0x1377ad){return _0x3fb253(_0x320bdf,_0x1377ad);},'fsKqr':function(_0x269739,_0x138210,_0xab3f88){return _0x269739(_0x138210,_0xab3f88);}},_0x521f1e=await fetchCloudProfile(_0x244c56),_0xf79837=_0x5c3d77['UQydt'](readProfileOverrides,getProjectPath(),_0x244c56);return _0x5c3d77[_0xc1b00c(0x1a3)](mergeCloudProfileSettings,_0x521f1e?.[_0xc1b00c(0x1a8)]??{},_0xf79837??undefined);}export async function configSet(_0xaadda4,_0x5472a1,_0x3383bc){const _0x544688=_0xb169,_0x4d57df={'VnNfu':function(_0x3ea599,_0x312e25){return _0x3ea599===_0x312e25;},'HGZna':function(_0x3a87cb,_0x1214cf,_0x177d7a,_0x1394f6,_0x1a20c6){return _0x3a87cb(_0x1214cf,_0x177d7a,_0x1394f6,_0x1a20c6);},'khfbk':function(_0x3da240){return _0x3da240();}},_0x432f40=await resolveProfileTarget(_0xaadda4);if(_0x4d57df['VnNfu'](_0x432f40['kind'],'cloud')){if(_0x432f40['alsoExistsElsewhere'])printDualExistsHint(_0xaadda4);const _0xa885d=parseOverrideValue(_0x3383bc);_0x4d57df['HGZna'](setProfileOverride,getProjectPath(),_0xaadda4,_0x5472a1,_0xa885d),console[_0x544688(0x1a1)]('Set\x20'+_0x5472a1+'\x20=\x20'+JSON[_0x544688(0x193)](_0xa885d)+'\x20for\x20\x22'+_0xaadda4+'\x22');return;}const _0x1a70f9=parseLocalValue(_0x5472a1,_0x3383bc);setProfileOverride(_0x4d57df[_0x544688(0x1b1)](getProjectPath),_0xaadda4,_0x5472a1,_0x1a70f9),console[_0x544688(0x1a1)](_0x544688(0x1b6)+_0x5472a1+'\x20=\x20'+_0x1a70f9+'\x20for\x20\x22'+_0xaadda4+'\x22');}export async function configGet(_0x246e1a,_0x2084ae){const _0x3d4ae5=_0xb169,_0x263936={'wkSsV':'cloud','hRUIV':function(_0x43e306,_0x19aa0d){return _0x43e306(_0x19aa0d);},'KFDom':function(_0x11b0b6,_0x259851){return _0x11b0b6===_0x259851;},'dQqXP':_0x3d4ae5(0x1c0),'TRmjV':function(_0x4bf19e,_0x33fc9b){return _0x4bf19e(_0x33fc9b);}},_0x4f96f9=await resolveProfileTarget(_0x246e1a);if(_0x4f96f9[_0x3d4ae5(0x1bc)]===_0x263936['wkSsV']){const _0x140ce7=await _0x263936['hRUIV'](loadEffectiveCloudSettings,_0x246e1a),_0x163e32=getNestedValue(_0x140ce7,_0x2084ae);if(_0x263936[_0x3d4ae5(0x1b2)](_0x163e32,undefined))console[_0x3d4ae5(0x1a1)]('(not\x20set)');else _0x263936['KFDom'](typeof _0x163e32,_0x263936[_0x3d4ae5(0x194)])?console[_0x3d4ae5(0x1a1)](JSON['stringify'](_0x163e32,null,0x2)):console[_0x3d4ae5(0x1a1)](_0x163e32);return;}const _0x3a47fe=await _0x263936['TRmjV'](loadSettings,_0x246e1a),_0x3382eb=getNestedValue(_0x3a47fe,_0x2084ae);if(_0x3382eb===undefined)console[_0x3d4ae5(0x1a1)]('(not\x20set)');else typeof _0x3382eb==='object'?console['log'](JSON['stringify'](_0x3382eb,null,0x2)):console[_0x3d4ae5(0x1a1)](_0x3382eb);}export async function configList(_0x5639c7){const _0x2430ea=_0xb169,_0x2ccbf={'ZlrKW':_0x2430ea(0x1aa),'Eeawh':function(_0x34d8f4,_0x3849e0){return _0x34d8f4(_0x3849e0);},'ytdhe':function(_0x396dee,_0x2ba0f0){return _0x396dee===_0x2ba0f0;}},_0x2b462f=await resolveProfileTarget(_0x5639c7);if(_0x2b462f['kind']===_0x2ccbf[_0x2430ea(0x18d)]){const _0x4d7420=await _0x2ccbf[_0x2430ea(0x1ba)](loadEffectiveCloudSettings,_0x5639c7);if(!_0x4d7420||_0x2ccbf[_0x2430ea(0x188)](Object['keys'](_0x4d7420)['length'],0x0)){console[_0x2430ea(0x1a1)](_0x2430ea(0x196)+_0x5639c7+'\x22');return;}console['log'](JSON['stringify'](_0x4d7420,null,0x2));return;}const _0x28b709=getSettingsPath(_0x5639c7);if(!_0x2ccbf[_0x2430ea(0x1ba)](existsSync,_0x28b709)){console[_0x2430ea(0x1a1)](_0x2430ea(0x196)+_0x5639c7+'\x22');return;}const _0x40649b=await loadSettings(_0x5639c7),_0x2b4968=formatSettings(_0x40649b);!_0x2b4968?console['log']('No\x20configuration\x20set\x20for\x20\x22'+_0x5639c7+'\x22'):console['log'](_0x2b4968);}function _0xb169(_0x422a3e,_0x328235){_0x422a3e=_0x422a3e-0x188;const _0x27ee72=_0x27ee();let _0xb1698b=_0x27ee72[_0x422a3e];return _0xb1698b;}export async function configUnset(_0x42362c,_0x4a0bc7){const _0x5817d1=_0xb169,_0x232cb5={'gxJlj':function(_0x1e58f9,_0x2c93f7){return _0x1e58f9(_0x2c93f7);},'QqSHp':function(_0x1b4f2d,_0xe33d83,_0x1abe61,_0x5ee861){return _0x1b4f2d(_0xe33d83,_0x1abe61,_0x5ee861);},'NMJzH':function(_0x4fa838){return _0x4fa838();},'eGlOp':function(_0x324ad6,_0x98f10,_0x34e01f,_0x1f16d1){return _0x324ad6(_0x98f10,_0x34e01f,_0x1f16d1);}},_0x5871ac=await resolveProfileTarget(_0x42362c);if(_0x5871ac['kind']===_0x5817d1(0x1aa)){if(_0x5871ac[_0x5817d1(0x192)])_0x232cb5[_0x5817d1(0x191)](printDualExistsHint,_0x42362c);const _0x391a41=_0x232cb5[_0x5817d1(0x197)](unsetProfileOverride,_0x232cb5[_0x5817d1(0x18e)](getProjectPath),_0x42362c,_0x4a0bc7);_0x391a41?console['log'](_0x5817d1(0x19b)+_0x4a0bc7+'\x20for\x20\x22'+_0x42362c+'\x22'):console['log']('Key\x20\x22'+_0x4a0bc7+_0x5817d1(0x199));return;}const _0x229927=_0x232cb5[_0x5817d1(0x1b0)](unsetProfileOverride,_0x232cb5['NMJzH'](getProjectPath),_0x42362c,_0x4a0bc7);if(_0x229927){console['log'](_0x5817d1(0x19b)+_0x4a0bc7);return;}const _0x200dd7=await loadSettings(_0x42362c),_0x25e49c=deleteNestedValue(_0x200dd7,_0x4a0bc7);_0x25e49c?console['log'](_0x5817d1(0x1be)+_0x4a0bc7+'\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22'+_0x42362c+'\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.'):console['log']('Key\x20\x22'+_0x4a0bc7+_0x5817d1(0x199));}export async function configReset(_0x36e8ca){const _0x1a8414=_0xb169,_0x1f3624={'FsaNz':function(_0xee529a,_0x18be03){return _0xee529a(_0x18be03);},'leLde':function(_0x6acfd0,_0x47a8cc){return _0x6acfd0===_0x47a8cc;},'ghYaC':'cloud','nFfbm':function(_0x1b3345){return _0x1b3345();}},_0xf4cb48=await _0x1f3624[_0x1a8414(0x1b5)](resolveProfileTarget,_0x36e8ca);if(_0x1f3624[_0x1a8414(0x18c)](_0xf4cb48['kind'],_0x1f3624['ghYaC'])){resetProfileOverrides(_0x1f3624[_0x1a8414(0x1ab)](getProjectPath),_0x36e8ca),console[_0x1a8414(0x1a1)]('Cleared\x20local\x20overrides\x20for\x20\x22'+_0x36e8ca+'\x22');return;}console['log']('\x22'+_0x36e8ca+'\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20'+_0x36e8ca+_0x1a8414(0x1a0));}
1
+ const _0x17fb66=_0x19e6;(function(_0x13f651,_0x49cead){const _0x42551c=_0x19e6,_0x1ca070=_0x13f651();while(!![]){try{const _0x32b824=-parseInt(_0x42551c(0x1be))/0x1*(-parseInt(_0x42551c(0x1e4))/0x2)+parseInt(_0x42551c(0x1b3))/0x3*(-parseInt(_0x42551c(0x1c0))/0x4)+parseInt(_0x42551c(0x1bc))/0x5*(parseInt(_0x42551c(0x1d5))/0x6)+-parseInt(_0x42551c(0x1d0))/0x7+parseInt(_0x42551c(0x1e8))/0x8+-parseInt(_0x42551c(0x1cf))/0x9+-parseInt(_0x42551c(0x1e9))/0xa*(parseInt(_0x42551c(0x1d6))/0xb);if(_0x32b824===_0x49cead)break;else _0x1ca070['push'](_0x1ca070['shift']());}catch(_0x2442b7){_0x1ca070['push'](_0x1ca070['shift']());}}}(_0x58f0,0x64775));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';const BOOLEAN_KEYS=[_0x17fb66(0x1bf),_0x17fb66(0x1cd),_0x17fb66(0x1db)];function parseLocalValue(_0x2111eb,_0x5214e1){const _0x2c80df=_0x17fb66,_0x26e5f1={'VfXlK':function(_0x1b6482,_0x470e80){return _0x1b6482===_0x470e80;},'jYewx':function(_0x15dbf3,_0x2b2a39){return _0x15dbf3===_0x2b2a39;},'IsHHO':_0x2c80df(0x1c5)};if(BOOLEAN_KEYS['includes'](_0x2111eb)){if(_0x26e5f1[_0x2c80df(0x1c3)](_0x5214e1,'true'))return!![];if(_0x26e5f1['jYewx'](_0x5214e1,_0x26e5f1[_0x2c80df(0x1de)]))return![];throw new Error(_0x2c80df(0x1d8)+_0x2111eb+':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22');}return _0x5214e1;}function parseOverrideValue(_0x3e50c9){const _0x245d0f=_0x17fb66,_0x4aa6d3={'hIDZm':'true','FCHgv':function(_0x11b686,_0x2c5d66){return _0x11b686===_0x2c5d66;},'pFIYZ':_0x245d0f(0x1c5),'ufEYC':function(_0x40ae5b,_0x4d1350){return _0x40ae5b===_0x4d1350;},'tTYQA':_0x245d0f(0x1b1),'KYJxi':function(_0x3facc5,_0x30dc78){return _0x3facc5(_0x30dc78);},'Vglfj':function(_0x3a31c2,_0x1a027a){return _0x3a31c2(_0x1a027a);}};if(_0x3e50c9===_0x4aa6d3[_0x245d0f(0x1b2)])return!![];if(_0x4aa6d3['FCHgv'](_0x3e50c9,_0x4aa6d3[_0x245d0f(0x1cb)]))return![];if(_0x3e50c9===_0x245d0f(0x1b9))return null;if(_0x4aa6d3[_0x245d0f(0x1b7)](_0x3e50c9,_0x4aa6d3[_0x245d0f(0x1da)]))return undefined;if(/^-?\d+$/['test'](_0x3e50c9)){const _0x28b889=_0x4aa6d3['KYJxi'](Number,_0x3e50c9);if(Number[_0x245d0f(0x1b5)](_0x28b889))return _0x28b889;}if(/^-?\d+\.\d+$/[_0x245d0f(0x1c9)](_0x3e50c9)){const _0x57bb17=_0x4aa6d3['Vglfj'](Number,_0x3e50c9);if(!Number[_0x245d0f(0x1df)](_0x57bb17))return _0x57bb17;}const _0x144b4a=_0x3e50c9['trim']();if(_0x144b4a['startsWith']('{')&&_0x144b4a['endsWith']('}')||_0x144b4a['startsWith']('[')&&_0x144b4a[_0x245d0f(0x1b0)](']'))try{return JSON[_0x245d0f(0x1d9)](_0x144b4a);}catch{}return _0x3e50c9;}function _0x19e6(_0x2319fa,_0x23a343){_0x2319fa=_0x2319fa-0x1af;const _0x58f0c9=_0x58f0();let _0x19e615=_0x58f0c9[_0x2319fa];return _0x19e615;}async function resolveProfileTarget(_0x300c74){const _0xd0fd3=_0x17fb66,_0x97d737={'XeppC':function(_0x340f94,_0x327efa){return _0x340f94(_0x327efa);},'qTsTS':function(_0x1e977b,_0x41f0ea){return _0x1e977b(_0x41f0ea);}},_0x101a43=_0x97d737['XeppC'](existsSync,_0x97d737[_0xd0fd3(0x1dc)](getEnvDir,_0x300c74));let _0x2512f0=![];try{const _0x4818b2=await fetchCloudProfile(_0x300c74);_0x2512f0=Boolean(_0x4818b2);}catch{}if(_0x2512f0)return{'kind':_0xd0fd3(0x1b6),'alsoExistsElsewhere':_0x101a43};if(_0x101a43)return{'kind':'local','alsoExistsElsewhere':![]};throw new Error('Profile\x20\x22'+_0x300c74+'\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20'+_0x300c74);}function printDualExistsHint(_0x46b70a){const _0x7cf0e6=_0x17fb66;console['log']('\x20\x20Note:\x20\x22'+_0x46b70a+_0x7cf0e6(0x1b8));}function getProjectPath(){const _0x553613=_0x17fb66;return process[_0x553613(0x1e3)]();}async function loadEffectiveCloudSettings(_0x360a3d){const _0x4065f8=_0x17fb66,_0x48ea9a={'HEeQK':function(_0x11fdd1,_0x561e29){return _0x11fdd1(_0x561e29);},'wLEcF':function(_0x29273a,_0x140441,_0x2168ef){return _0x29273a(_0x140441,_0x2168ef);}},_0x58f5ab=await _0x48ea9a['HEeQK'](fetchCloudProfile,_0x360a3d),_0x944684=readProfileOverrides(getProjectPath(),_0x360a3d);return _0x48ea9a[_0x4065f8(0x1e6)](mergeCloudProfileSettings,_0x58f5ab?.['settings']??{},_0x944684??undefined);}function _0x58f0(){const _0x417dea=['headless','348dsenNf','keys','stringify','VfXlK','cWYKw','false','wYFpU','\x20=\x20','\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.','test','hHeLa','pFIYZ','Cleared\x20local\x20overrides\x20for\x20\x22','allowInsecureLocalhost','(not\x20set)','5943492VIPkJw','1049979ZYqcre','length','ZdQPM','QdFjU','object','4907922KYrFXW','11pHRAYz','Key\x20\x22','Invalid\x20value\x20for\x20','parse','tTYQA','forceLogin','qTsTS','log','IsHHO','isNaN','\x20for\x20\x22','oynaf','svWxv','cwd','40462mlsWxi','Set\x20','wLEcF','No\x20configuration\x20set\x20for\x20\x22','2923216EKPfCs','239060iKLynG','kind','OwMbi','endsWith','undefined','hIDZm','21567UbQpYn','GSrHl','isSafeInteger','cloud','ufEYC','\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.','null','rVmED','XIjYc','5xAfKcN','ZcgOd','34RcqReg'];_0x58f0=function(){return _0x417dea;};return _0x58f0();}export async function configSet(_0x16812e,_0x55ee12,_0x148988){const _0x40f694=_0x17fb66,_0x2231d7={'yUwHi':function(_0x524ef9,_0x549a15){return _0x524ef9===_0x549a15;},'MeAlJ':'cloud','hHeLa':function(_0x276e1a,_0x280608){return _0x276e1a(_0x280608);},'eBVqD':function(_0x5ed984,_0x1f638f,_0xceee3f){return _0x5ed984(_0x1f638f,_0xceee3f);},'KeglE':function(_0x3baaf4,_0x14ac0d,_0x5f1b0e,_0x534fd6,_0x4fbe44){return _0x3baaf4(_0x14ac0d,_0x5f1b0e,_0x534fd6,_0x4fbe44);},'XIjYc':function(_0x130c62){return _0x130c62();}},_0x4a2796=await resolveProfileTarget(_0x16812e);if(_0x2231d7['yUwHi'](_0x4a2796[_0x40f694(0x1ea)],_0x2231d7['MeAlJ'])){if(_0x4a2796['alsoExistsElsewhere'])_0x2231d7[_0x40f694(0x1ca)](printDualExistsHint,_0x16812e);const _0x37f7cf=parseOverrideValue(_0x148988);setProfileOverride(getProjectPath(),_0x16812e,_0x55ee12,_0x37f7cf),console['log']('Set\x20'+_0x55ee12+'\x20=\x20'+JSON['stringify'](_0x37f7cf)+_0x40f694(0x1e0)+_0x16812e+'\x22');return;}const _0x4faaad=_0x2231d7['eBVqD'](parseLocalValue,_0x55ee12,_0x148988);_0x2231d7['KeglE'](setProfileOverride,_0x2231d7[_0x40f694(0x1bb)](getProjectPath),_0x16812e,_0x55ee12,_0x4faaad),console[_0x40f694(0x1dd)](_0x40f694(0x1e5)+_0x55ee12+_0x40f694(0x1c7)+_0x4faaad+_0x40f694(0x1e0)+_0x16812e+'\x22');}export async function configGet(_0x190a4f,_0x640c6b){const _0x3a223e=_0x17fb66,_0x241394={'lLkJX':function(_0x5cb556,_0x5400be){return _0x5cb556===_0x5400be;},'valmL':function(_0x1640c3,_0x425b2f){return _0x1640c3===_0x425b2f;},'cWYKw':_0x3a223e(0x1d4),'ZcgOd':function(_0x3d269a,_0x2ce64e){return _0x3d269a(_0x2ce64e);},'kAghI':function(_0x57f13d,_0x5519e0,_0x463152){return _0x57f13d(_0x5519e0,_0x463152);},'JebvB':function(_0xa7bc67,_0x4b235a){return _0xa7bc67===_0x4b235a;},'GSrHl':function(_0x18a84e,_0x1d3d14){return _0x18a84e===_0x1d3d14;}},_0xf5fc53=await resolveProfileTarget(_0x190a4f);if(_0xf5fc53['kind']==='cloud'){const _0x221230=await loadEffectiveCloudSettings(_0x190a4f),_0x36679f=getNestedValue(_0x221230,_0x640c6b);if(_0x241394['lLkJX'](_0x36679f,undefined))console['log']('(not\x20set)');else _0x241394['valmL'](typeof _0x36679f,_0x241394[_0x3a223e(0x1c4)])?console['log'](JSON[_0x3a223e(0x1c2)](_0x36679f,null,0x2)):console[_0x3a223e(0x1dd)](_0x36679f);return;}const _0x3508c6=await _0x241394[_0x3a223e(0x1bd)](loadSettings,_0x190a4f),_0x2ea97b=_0x241394['kAghI'](getNestedValue,_0x3508c6,_0x640c6b);if(_0x241394['JebvB'](_0x2ea97b,undefined))console[_0x3a223e(0x1dd)](_0x3a223e(0x1ce));else _0x241394[_0x3a223e(0x1b4)](typeof _0x2ea97b,_0x3a223e(0x1d4))?console[_0x3a223e(0x1dd)](JSON[_0x3a223e(0x1c2)](_0x2ea97b,null,0x2)):console['log'](_0x2ea97b);}export async function configList(_0x199138){const _0x46a68f=_0x17fb66,_0x1de1e5={'KXaBv':function(_0x4b50d6,_0x2594fa){return _0x4b50d6===_0x2594fa;},'oynaf':function(_0x2340da,_0x2d8058){return _0x2340da(_0x2d8058);},'ZdQPM':function(_0x57b714,_0x323f3d){return _0x57b714(_0x323f3d);},'ROaCV':function(_0x251fd6,_0x5eb7f5){return _0x251fd6(_0x5eb7f5);}},_0x14d345=await resolveProfileTarget(_0x199138);if(_0x1de1e5['KXaBv'](_0x14d345['kind'],_0x46a68f(0x1b6))){const _0xcff8ef=await _0x1de1e5['oynaf'](loadEffectiveCloudSettings,_0x199138);if(!_0xcff8ef||Object[_0x46a68f(0x1c1)](_0xcff8ef)[_0x46a68f(0x1d1)]===0x0){console['log'](_0x46a68f(0x1e7)+_0x199138+'\x22');return;}console[_0x46a68f(0x1dd)](JSON['stringify'](_0xcff8ef,null,0x2));return;}const _0x508f77=_0x1de1e5['oynaf'](getSettingsPath,_0x199138);if(!_0x1de1e5[_0x46a68f(0x1e1)](existsSync,_0x508f77)){console['log']('No\x20configuration\x20set\x20for\x20\x22'+_0x199138+'\x22');return;}const _0x48fa9c=await _0x1de1e5[_0x46a68f(0x1d2)](loadSettings,_0x199138),_0x5e344b=_0x1de1e5['ROaCV'](formatSettings,_0x48fa9c);!_0x5e344b?console[_0x46a68f(0x1dd)](_0x46a68f(0x1e7)+_0x199138+'\x22'):console['log'](_0x5e344b);}export async function configUnset(_0x355dfe,_0x35a706){const _0x74c48=_0x17fb66,_0x2f7853={'ndriP':'cloud','svWxv':function(_0x50135d,_0x3fc150){return _0x50135d(_0x3fc150);},'OwMbi':function(_0x5a3850){return _0x5a3850();}},_0x2543f0=await resolveProfileTarget(_0x355dfe);if(_0x2543f0[_0x74c48(0x1ea)]===_0x2f7853['ndriP']){if(_0x2543f0['alsoExistsElsewhere'])_0x2f7853[_0x74c48(0x1e2)](printDualExistsHint,_0x355dfe);const _0x269c7f=unsetProfileOverride(_0x2f7853[_0x74c48(0x1af)](getProjectPath),_0x355dfe,_0x35a706);_0x269c7f?console[_0x74c48(0x1dd)]('Removed\x20'+_0x35a706+'\x20for\x20\x22'+_0x355dfe+'\x22'):console[_0x74c48(0x1dd)](_0x74c48(0x1d7)+_0x35a706+'\x22\x20not\x20found');return;}const _0x1aa4df=unsetProfileOverride(getProjectPath(),_0x355dfe,_0x35a706);if(_0x1aa4df){console[_0x74c48(0x1dd)]('Removed\x20'+_0x35a706);return;}const _0x4163ad=await _0x2f7853[_0x74c48(0x1e2)](loadSettings,_0x355dfe),_0x2a1438=deleteNestedValue(_0x4163ad,_0x35a706);_0x2a1438?console['log']('Key\x20\x22'+_0x35a706+'\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22'+_0x355dfe+_0x74c48(0x1c8)):console[_0x74c48(0x1dd)](_0x74c48(0x1d7)+_0x35a706+'\x22\x20not\x20found');}export async function configReset(_0x52bda5){const _0x59fd82=_0x17fb66,_0x1095c3={'wYFpU':function(_0x5d32a4,_0x313f46){return _0x5d32a4(_0x313f46);},'QdFjU':function(_0x470de2,_0x5e30ae){return _0x470de2===_0x5e30ae;},'rVmED':function(_0x5b4a4a){return _0x5b4a4a();}},_0x59b0fe=await _0x1095c3[_0x59fd82(0x1c6)](resolveProfileTarget,_0x52bda5);if(_0x1095c3[_0x59fd82(0x1d3)](_0x59b0fe[_0x59fd82(0x1ea)],'cloud')){resetProfileOverrides(_0x1095c3[_0x59fd82(0x1ba)](getProjectPath),_0x52bda5),console[_0x59fd82(0x1dd)](_0x59fd82(0x1cc)+_0x52bda5+'\x22');return;}console[_0x59fd82(0x1dd)]('\x22'+_0x52bda5+'\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20'+_0x52bda5+'\x20<key>\x22\x20to\x20remove\x20individual\x20values.');}
@@ -1 +1 @@
1
- function _0x4fcf(){const _0x174ac2=['3236XvwSEv','confirmation','prompt','6fXgFjN','input','OZLoc','3521464VXBWgA','28aZVaMD','log','66012CsjcUH','2413467qXwQuX','9996630DIZEPe','\x22\x20not\x20found.','OUPTn','15eChigQ','1092345xAlrcd','Profile\x20deletion\x20cancelled:\x20confirmation\x20did\x20not\x20match.','168395pePRkP','yes','ZWPHF','\x0aWarning:\x20this\x20deletes\x20the\x20shared\x20cloud\x20profile\x20\x22'];_0x4fcf=function(){return _0x174ac2;};return _0x4fcf();}(function(_0x353b70,_0x2e2cad){const _0x4eed53=_0x154f,_0xfd538f=_0x353b70();while(!![]){try{const _0x7af61e=-parseInt(_0x4eed53(0x10c))/0x1*(parseInt(_0x4eed53(0x113))/0x2)+-parseInt(_0x4eed53(0x11f))/0x3+-parseInt(_0x4eed53(0x110))/0x4*(parseInt(_0x4eed53(0x11e))/0x5)+-parseInt(_0x4eed53(0x119))/0x6*(-parseInt(_0x4eed53(0x117))/0x7)+parseInt(_0x4eed53(0x116))/0x8+-parseInt(_0x4eed53(0x11a))/0x9+parseInt(_0x4eed53(0x11b))/0xa;if(_0x7af61e===_0x2e2cad)break;else _0xfd538f['push'](_0xfd538f['shift']());}catch(_0x2106fa){_0xfd538f['push'](_0xfd538f['shift']());}}}(_0x4fcf,0x53f9c));import _0x18f8b3 from'inquirer';import{deleteCloudProfile,fetchCloudProfile}from'./utils/cloudProfile.js';function _0x154f(_0x1a1c4b,_0x4a49fe){_0x1a1c4b=_0x1a1c4b-0x10c;const _0x4fcf39=_0x4fcf();let _0x154f73=_0x4fcf39[_0x1a1c4b];return _0x154f73;}import{isInteractive}from'./utils/cloudProfileSession.js';import{clearLastProfile,resetProfileOverrides}from'./utils/projectsConfig.js';export async function deleteProfile(_0x42a7c6,_0x5b6c0a={}){const _0x4a277c=_0x154f,_0x48b3ac={'OUPTn':function(_0x244968,_0x121144){return _0x244968(_0x121144);},'ZWPHF':function(_0x5f3ed8){return _0x5f3ed8();},'OZLoc':'Profile\x20deletion\x20requires\x20an\x20interactive\x20terminal\x20so\x20the\x20profile\x20name\x20can\x20be\x20typed\x20for\x20confirmation.\x20Pass\x20--yes\x20to\x20skip\x20confirmation.','UAeYE':_0x4a277c(0x111)},_0x264e7c=await _0x48b3ac[_0x4a277c(0x11d)](fetchCloudProfile,_0x42a7c6);if(!_0x264e7c)throw new Error('Cloud\x20profile\x20\x22'+_0x42a7c6+_0x4a277c(0x11c));if(!_0x5b6c0a['yes']&&!_0x48b3ac[_0x4a277c(0x10e)](isInteractive))throw new Error(_0x48b3ac[_0x4a277c(0x115)]);console[_0x4a277c(0x118)](_0x4a277c(0x10f)+_0x42a7c6+'\x22\x20for\x20everyone\x20in\x20your\x20organization.');if(!_0x5b6c0a[_0x4a277c(0x10d)]){const {confirmation:_0x20c696}=await _0x18f8b3[_0x4a277c(0x112)]([{'type':_0x4a277c(0x114),'name':_0x48b3ac['UAeYE'],'message':'Type\x20\x22'+_0x42a7c6+'\x22\x20to\x20confirm\x20deletion:'}]);if(_0x20c696!==_0x42a7c6)throw new Error(_0x4a277c(0x120));}await deleteCloudProfile(_0x42a7c6),resetProfileOverrides(process['cwd'](),_0x42a7c6),clearLastProfile(process['cwd'](),_0x42a7c6),console[_0x4a277c(0x118)]('✓\x20Deleted\x20cloud\x20profile\x20\x22'+_0x42a7c6+'\x22.');}
1
+ (function(_0xcd0a2b,_0x19cb27){const _0x570230=_0x6f84,_0xffa180=_0xcd0a2b();while(!![]){try{const _0x200b9c=parseInt(_0x570230(0xac))/0x1*(-parseInt(_0x570230(0xb7))/0x2)+parseInt(_0x570230(0xbb))/0x3*(-parseInt(_0x570230(0xb3))/0x4)+parseInt(_0x570230(0xb4))/0x5*(parseInt(_0x570230(0xaa))/0x6)+-parseInt(_0x570230(0xb2))/0x7*(parseInt(_0x570230(0xbc))/0x8)+parseInt(_0x570230(0xaf))/0x9*(parseInt(_0x570230(0xad))/0xa)+parseInt(_0x570230(0xb6))/0xb+-parseInt(_0x570230(0xa9))/0xc*(-parseInt(_0x570230(0xae))/0xd);if(_0x200b9c===_0x19cb27)break;else _0xffa180['push'](_0xffa180['shift']());}catch(_0x4736db){_0xffa180['push'](_0xffa180['shift']());}}}(_0x5154,0xa8a74));import _0x30f3a6 from'inquirer';import{deleteCloudProfile,fetchCloudProfile}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';function _0x6f84(_0x14d2f4,_0x155c5e){_0x14d2f4=_0x14d2f4-0xa8;const _0x515408=_0x5154();let _0x6f84b8=_0x515408[_0x14d2f4];return _0x6f84b8;}import{clearLastProfile,resetProfileOverrides}from'./utils/projectsConfig.js';function _0x5154(){const _0x1954bb=['7HFEbtG','220ozpLYZ','2019245sBKbEC','confirmation','9366852RsImXj','2vJCKwc','Type\x20\x22','yes','xiCha','70107uIBiqf','972912mzVHgI','CZnme','cwd','\x0aWarning:\x20this\x20deletes\x20the\x20shared\x20cloud\x20profile\x20\x22','\x22\x20for\x20everyone\x20in\x20your\x20organization.','542604zEpmfz','12kSUwOZ','\x22\x20not\x20found.','1334363NFzHOG','11420kExGlP','468cCpXgY','1143bnVgok','\x22\x20to\x20confirm\x20deletion:','cxyex'];_0x5154=function(){return _0x1954bb;};return _0x5154();}export async function deleteProfile(_0x19a334,_0x192749={}){const _0x131c01=_0x6f84,_0x27bcd4={'CZnme':function(_0xa686b3){return _0xa686b3();},'AGKRd':'Profile\x20deletion\x20requires\x20an\x20interactive\x20terminal\x20so\x20the\x20profile\x20name\x20can\x20be\x20typed\x20for\x20confirmation.\x20Pass\x20--yes\x20to\x20skip\x20confirmation.','cxyex':'input','wkHrO':function(_0x260ac4,_0x4be282){return _0x260ac4!==_0x4be282;},'xiCha':function(_0x37d96b,_0x5558f8){return _0x37d96b(_0x5558f8);},'IdGJZ':function(_0x4e7729,_0x4fc447,_0x24ac51){return _0x4e7729(_0x4fc447,_0x24ac51);},'rOGnf':function(_0x3dc667,_0x139b72,_0x4688d7){return _0x3dc667(_0x139b72,_0x4688d7);}},_0x1680a7=await fetchCloudProfile(_0x19a334);if(!_0x1680a7)throw new Error('Cloud\x20profile\x20\x22'+_0x19a334+_0x131c01(0xab));if(!_0x192749[_0x131c01(0xb9)]&&!_0x27bcd4[_0x131c01(0xbd)](isInteractive))throw new Error(_0x27bcd4['AGKRd']);console['log'](_0x131c01(0xbf)+_0x19a334+_0x131c01(0xa8));if(!_0x192749['yes']){const {confirmation:_0x67c30d}=await _0x30f3a6['prompt']([{'type':_0x27bcd4[_0x131c01(0xb1)],'name':_0x131c01(0xb5),'message':_0x131c01(0xb8)+_0x19a334+_0x131c01(0xb0)}]);if(_0x27bcd4['wkHrO'](_0x67c30d,_0x19a334))throw new Error('Profile\x20deletion\x20cancelled:\x20confirmation\x20did\x20not\x20match.');}await _0x27bcd4[_0x131c01(0xba)](deleteCloudProfile,_0x19a334),_0x27bcd4['IdGJZ'](resetProfileOverrides,process['cwd'](),_0x19a334),_0x27bcd4['rOGnf'](clearLastProfile,process[_0x131c01(0xbe)](),_0x19a334),console['log']('✓\x20Deleted\x20cloud\x20profile\x20\x22'+_0x19a334+'\x22.');}
@@ -1 +1 @@
1
- const _0x63e09c=_0xa6b9;function _0x41a9(){const _0x5e48fb=['jgHBK','17123553loJDLp','isDirectory','mRiqZ','8hclpkf','environmentDetails','cached\x20(updated\x20','log','LDDyb','.txt','\x0a\x20\x20','has','11262260RILmUW','8iSOmjY','sessionUpdatedAt','1086TaKpcN','push','settings.json','jUAZZ','sessions','IlheX','WWROR','name','set','xADqf','36403983OguIdQ','bug-bashes','baseUrl','38DTCzDC','VlRwJ','EHGIC','qhbpo','32979DElRXF','error','map','length','environmentKey','3210130IdhEmJ','31969bRssLE','IJOYO','\x0a*\x20=\x20active\x20profile','get','message','legacy','sort','includes','(no\x20environment\x20—\x20manual\x20or\x20no\x20auth)','2390184zXNpMo'];_0x41a9=function(){return _0x5e48fb;};return _0x41a9();}(function(_0x3662ef,_0x4f5306){const _0x31bb8e=_0xa6b9,_0x31a16e=_0x3662ef();while(!![]){try{const _0x18c167=parseInt(_0x31bb8e(0x1c9))/0x1*(-parseInt(_0x31bb8e(0x1c5))/0x2)+-parseInt(_0x31bb8e(0x1d8))/0x3+-parseInt(_0x31bb8e(0x1dd))/0x4*(-parseInt(_0x31bb8e(0x1ce))/0x5)+parseInt(_0x31bb8e(0x1b8))/0x6*(parseInt(_0x31bb8e(0x1cf))/0x7)+parseInt(_0x31bb8e(0x1b6))/0x8*(-parseInt(_0x31bb8e(0x1da))/0x9)+-parseInt(_0x31bb8e(0x1b5))/0xa+parseInt(_0x31bb8e(0x1c2))/0xb;if(_0x18c167===_0x4f5306)break;else _0x31a16e['push'](_0x31a16e['shift']());}catch(_0x33da26){_0x31a16e['push'](_0x31a16e['shift']());}}}(_0x41a9,0xec518));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';function _0xa6b9(_0x32f3cd,_0x90a36a){_0x32f3cd=_0x32f3cd-0x1b4;const _0x41a9ea=_0x41a9();let _0xa6b964=_0x41a9ea[_0x32f3cd];return _0xa6b964;}import{getToken}from'./utils/keychain.js';import{listCloudProfiles}from'./utils/cloudProfile.js';const NON_ENV_DIRS=[_0x63e09c(0x1bc),_0x63e09c(0x1c3),'reports','local','ci'];export function shouldGroupByEnvironment(_0xdd4009){const _0x2065e7=_0x63e09c;return _0xdd4009['some'](_0x7ba931=>_0x7ba931[_0x2065e7(0x1cd)]);}export function groupCloudProfilesByEnvironment(_0x1ad73a){const _0x54f527=_0x63e09c,_0x5b54a1={'QRZrc':function(_0x249cb2,_0x4b1365){return _0x249cb2===_0x4b1365;},'gwxkl':function(_0x4a06e7,_0x3ebe1b){return _0x4a06e7===_0x3ebe1b;}},_0x133899=new Map();for(const _0x5d8426 of _0x1ad73a){const _0x91065c=_0x5d8426[_0x54f527(0x1cd)]??null,_0x4b7032=_0x133899[_0x54f527(0x1d2)](_0x91065c);if(_0x4b7032)_0x4b7032[_0x54f527(0x1b9)](_0x5d8426);else _0x133899[_0x54f527(0x1c0)](_0x91065c,[_0x5d8426]);}const _0x3ff682=[..._0x133899['keys']()][_0x54f527(0x1d5)]((_0x50669e,_0xb383ca)=>{if(_0x5b54a1['QRZrc'](_0x50669e,null))return 0x1;if(_0x5b54a1['gwxkl'](_0xb383ca,null))return-0x1;return _0x50669e['localeCompare'](_0xb383ca);});return _0x3ff682[_0x54f527(0x1cb)](_0x32fc3d=>({'environmentKey':_0x32fc3d,'profiles':_0x133899[_0x54f527(0x1d2)](_0x32fc3d)['sort']((_0x14cfa3,_0x1fd62b)=>_0x14cfa3[_0x54f527(0x1bf)]['localeCompare'](_0x1fd62b['name']))}));}export async function getEnvNames(){const _0x4d7fdc=_0x63e09c,_0x934961={'jgHBK':function(_0x7254e5){return _0x7254e5();},'qhbpo':function(_0x45c7dc,_0x315bb6,_0x4c08e8){return _0x45c7dc(_0x315bb6,_0x4c08e8);},'cUoBJ':'local','xZqWQ':function(_0xa2dffa,_0x574fe6){return _0xa2dffa(_0x574fe6);},'jUAZZ':function(_0x147933,_0x5ef249){return _0x147933(_0x5ef249);},'WWROR':function(_0x283d0e,_0x5f20da,_0x5656bf){return _0x283d0e(_0x5f20da,_0x5656bf);},'IJOYO':_0x4d7fdc(0x1e2),'rZndo':function(_0xce11db,_0x228b7b,_0x55988d){return _0xce11db(_0x228b7b,_0x55988d);},'IlheX':_0x4d7fdc(0x1ba)},_0xc56303=_0x934961[_0x4d7fdc(0x1d9)](getRangerDir);if(!existsSync(_0xc56303))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x35dc80=await readActiveProfileName(),_0xf5af74=[],_0x22ea7a={},_0x22a1ae=_0x934961['qhbpo'](join,_0xc56303,_0x934961['cUoBJ']);if(_0x934961['xZqWQ'](existsSync,_0x22a1ae)){const _0x3894a9=await _0x934961[_0x4d7fdc(0x1bb)](readdir,_0x22a1ae);for(const _0x347c4e of _0x3894a9){const _0x2ac6c4=_0x934961[_0x4d7fdc(0x1c8)](join,_0x22a1ae,_0x347c4e),_0x313c99=await _0x934961[_0x4d7fdc(0x1bb)](stat,_0x2ac6c4);_0x313c99['isDirectory']()&&(_0xf5af74[_0x4d7fdc(0x1b9)](_0x347c4e),_0x22ea7a[_0x347c4e]='local');}}const _0x517896=join(_0xc56303,'ci');if(_0x934961[_0x4d7fdc(0x1bb)](existsSync,_0x517896)){const _0x574c98=await _0x934961[_0x4d7fdc(0x1bb)](readdir,_0x517896);for(const _0x352dcf of _0x574c98){const _0x230bf3=_0x934961[_0x4d7fdc(0x1be)](join,_0x517896,_0x352dcf),_0x575c5b=await stat(_0x230bf3);_0x575c5b[_0x4d7fdc(0x1db)]()&&(_0xf5af74['push'](_0x352dcf),_0x22ea7a[_0x352dcf]='ci');}}const _0xf9a284=await _0x934961['jUAZZ'](readdir,_0xc56303);for(const _0x37fb29 of _0xf9a284){if(NON_ENV_DIRS['includes'](_0x37fb29))continue;if(_0x37fb29['startsWith']('.'))continue;if(_0x37fb29['endsWith'](_0x934961[_0x4d7fdc(0x1d0)]))continue;const _0x41fcab=_0x934961['rZndo'](join,_0xc56303,_0x37fb29),_0x565283=await stat(_0x41fcab);_0x565283[_0x4d7fdc(0x1db)]()&&existsSync(_0x934961['qhbpo'](join,_0x41fcab,_0x934961[_0x4d7fdc(0x1bd)]))&&(!_0xf5af74[_0x4d7fdc(0x1d6)](_0x37fb29)&&(_0xf5af74[_0x4d7fdc(0x1b9)](_0x37fb29),_0x22ea7a[_0x37fb29]=_0x4d7fdc(0x1d4)));}return{'envNames':_0xf5af74,'activeEnv':_0x35dc80,'envTypes':_0x22ea7a};}export async function envList(){const _0x2efd72=_0x63e09c,_0x3e9adc={'LDDyb':function(_0x49ff9e){return _0x49ff9e();},'WUCEJ':function(_0x3d07a0,_0x4e071a){return _0x3d07a0(_0x4e071a);},'mRiqZ':function(_0x2dfa70,_0x39d992){return _0x2dfa70===_0x39d992;},'EHGIC':'\x0aNo\x20profiles\x20found.','xADqf':function(_0x5c1f84,_0x18ae8c){return _0x5c1f84>_0x18ae8c;},'umZui':'\x0aLocal\x20Profiles\x20(legacy):','QdLDC':'\x0aCloud\x20Profiles\x20(by\x20environment):','VlRwJ':function(_0x2432c3,_0x3c4650,_0x4557f4){return _0x2432c3(_0x3c4650,_0x4557f4);},'BIaVm':'\x20\x20\x20\x20','mKfhD':'\x0aCloud\x20Profiles:','Dfcvr':function(_0x2556b1,_0x426b14,_0x2f7919){return _0x2556b1(_0x426b14,_0x2f7919);}},{envNames:_0x4c6d80,activeEnv:_0xca2998,envTypes:_0x5628eb}=await _0x3e9adc[_0x2efd72(0x1e1)](getEnvNames);let _0x49f976=[];const _0x4684c2=await _0x3e9adc[_0x2efd72(0x1e1)](getToken);if(_0x4684c2)try{_0x49f976=await listCloudProfiles();}catch(_0x26841f){console[_0x2efd72(0x1ca)]('\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profiles:\x20'+(_0x26841f instanceof Error?_0x26841f[_0x2efd72(0x1d3)]:_0x3e9adc['WUCEJ'](String,_0x26841f)));}if(_0x3e9adc[_0x2efd72(0x1dc)](_0x4c6d80[_0x2efd72(0x1cc)],0x0)&&_0x49f976['length']===0x0){console[_0x2efd72(0x1e0)](_0x3e9adc[_0x2efd72(0x1c7)]),console['log']('Run:\x20ranger\x20profile\x20add\x20<profile-name>');return;}const _0x30fedd=new Set(_0x49f976[_0x2efd72(0x1cb)](_0x5688b1=>_0x5688b1['name']));if(_0x3e9adc[_0x2efd72(0x1c1)](_0x4c6d80[_0x2efd72(0x1cc)],0x0)){console[_0x2efd72(0x1e0)](_0x3e9adc['umZui']);for(const _0x5d9984 of _0x4c6d80[_0x2efd72(0x1d5)]()){const _0x5089e8=_0x5d9984===_0xca2998&&!_0x30fedd[_0x2efd72(0x1b4)](_0x5d9984),_0x24f9a4=_0x5628eb[_0x5d9984]||'local',_0xf176d4=await loadSettings(_0x5d9984),_0x297cfa=_0x24f9a4===_0x2efd72(0x1d4)?'':'\x20['+_0x24f9a4+']';console['log']('\x20\x20'+(_0x5089e8?'*\x20':'\x20\x20')+_0x5d9984+_0x297cfa),_0xf176d4['baseUrl']&&console['log']('\x20\x20\x20\x20\x20\x20URL:\x20'+_0xf176d4[_0x2efd72(0x1c4)]),_0xf176d4['environmentDetails']&&console[_0x2efd72(0x1e0)]('\x20\x20\x20\x20\x20\x20Details:\x20'+_0xf176d4[_0x2efd72(0x1de)]);}}const _0x771961=(_0x2846da,_0x2f6d2f)=>{const _0x2faed3=_0x2efd72,_0x498e68=_0x2846da['name']===_0xca2998,_0x3b86bf=_0x2846da[_0x2faed3(0x1b7)]?_0x2faed3(0x1df)+_0x2846da[_0x2faed3(0x1b7)]+')':'no\x20session';console[_0x2faed3(0x1e0)](''+_0x2f6d2f+(_0x498e68?'*\x20':'\x20\x20')+_0x2846da[_0x2faed3(0x1bf)]),console['log'](_0x2f6d2f+'\x20\x20\x20\x20Session:\x20'+_0x3b86bf);};if(_0x49f976['length']>0x0){if(shouldGroupByEnvironment(_0x49f976)){console[_0x2efd72(0x1e0)](_0x3e9adc['QdLDC']);for(const _0x202c88 of _0x3e9adc['WUCEJ'](groupCloudProfilesByEnvironment,_0x49f976)){const _0x5322ee=_0x202c88['environmentKey']??_0x2efd72(0x1d7);console['log'](_0x2efd72(0x1e3)+_0x5322ee);for(const _0x5e2d3c of _0x202c88['profiles']){_0x3e9adc[_0x2efd72(0x1c6)](_0x771961,_0x5e2d3c,_0x3e9adc['BIaVm']);}}}else{console[_0x2efd72(0x1e0)](_0x3e9adc['mKfhD']);for(const _0x547294 of[..._0x49f976][_0x2efd72(0x1d5)]((_0x4dfe9c,_0x512fb2)=>_0x4dfe9c['name']['localeCompare'](_0x512fb2[_0x2efd72(0x1bf)]))){_0x3e9adc['Dfcvr'](_0x771961,_0x547294,'\x20\x20');}}}_0xca2998&&console['log'](_0x2efd72(0x1d1));}
1
+ const _0xf1ccda=_0xd9b3;(function(_0x26045a,_0x2d51cb){const _0x587624=_0xd9b3,_0xe6be22=_0x26045a();while(!![]){try{const _0x3cc8b7=parseInt(_0x587624(0x16f))/0x1*(parseInt(_0x587624(0x175))/0x2)+parseInt(_0x587624(0x182))/0x3*(-parseInt(_0x587624(0x160))/0x4)+parseInt(_0x587624(0x166))/0x5+parseInt(_0x587624(0x187))/0x6+parseInt(_0x587624(0x171))/0x7*(parseInt(_0x587624(0x18d))/0x8)+parseInt(_0x587624(0x18b))/0x9*(parseInt(_0x587624(0x169))/0xa)+-parseInt(_0x587624(0x174))/0xb;if(_0x3cc8b7===_0x2d51cb)break;else _0xe6be22['push'](_0xe6be22['shift']());}catch(_0x4c84b3){_0xe6be22['push'](_0xe6be22['shift']());}}}(_0x26dc,0x9243c));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 _0x26dc(){const _0x214cb6=['1893WjDiTC','qNMtG','get','\x0a\x20\x20','jeYeL','645672YQWKGg','baseUrl','message','\x0aNo\x20profiles\x20found.','30231yoswYm','log','8wOrqYM','environmentDetails','Run:\x20ranger\x20profile\x20add\x20<profile-name>','environmentKey','6436bwFiBL','includes','sessionUpdatedAt','jtwcH','DuGKC','\x0aCloud\x20Profiles\x20(by\x20environment):','5214665OTzUPu','\x0aLocal\x20Profiles\x20(legacy):','\x20\x20\x20\x20','750CoSuyE','\x0a*\x20=\x20active\x20profile','sessions','\x20\x20\x20\x20Session:\x20','cached\x20(updated\x20','map','2IShdyh','localeCompare','5232185cxNvGQ','Xornn','keys','16927592FhuGPi','1003326sLaiIb','sort','uiMcX','.txt','isDirectory','no\x20session','error','WfXOj','name','push','EsVuP','local','some'];_0x26dc=function(){return _0x214cb6;};return _0x26dc();}const NON_ENV_DIRS=[_0xf1ccda(0x16b),'bug-bashes','reports',_0xf1ccda(0x180),'ci'];export function shouldGroupByEnvironment(_0x33d9f4){const _0x1b5567=_0xf1ccda;return _0x33d9f4[_0x1b5567(0x181)](_0x32abb9=>_0x32abb9['environmentKey']);}export function groupCloudProfilesByEnvironment(_0x27f5ce){const _0x510196=_0xf1ccda,_0x3392ad=new Map();for(const _0x1cb188 of _0x27f5ce){const _0x452f3d=_0x1cb188['environmentKey']??null,_0x5579e0=_0x3392ad['get'](_0x452f3d);if(_0x5579e0)_0x5579e0[_0x510196(0x17e)](_0x1cb188);else _0x3392ad['set'](_0x452f3d,[_0x1cb188]);}const _0x125287=[..._0x3392ad[_0x510196(0x173)]()]['sort']((_0x505e4b,_0x4be945)=>{const _0x550118=_0x510196;if(_0x505e4b===null)return 0x1;if(_0x4be945===null)return-0x1;return _0x505e4b[_0x550118(0x170)](_0x4be945);});return _0x125287[_0x510196(0x16e)](_0x5d206c=>({'environmentKey':_0x5d206c,'profiles':_0x3392ad[_0x510196(0x184)](_0x5d206c)['sort']((_0x2f9f2d,_0x422083)=>_0x2f9f2d['name'][_0x510196(0x170)](_0x422083[_0x510196(0x17d)]))}));}export async function getEnvNames(){const _0x51c7ad=_0xf1ccda,_0x4f0ce9={'AHFyA':function(_0x404a63){return _0x404a63();},'ehhLn':function(_0x104fbf,_0x48f8dd,_0x19ccc1){return _0x104fbf(_0x48f8dd,_0x19ccc1);},'EsVuP':function(_0x11dee4,_0x387669){return _0x11dee4(_0x387669);},'jtwcH':function(_0x234871,_0x11892d,_0x5bab66){return _0x234871(_0x11892d,_0x5bab66);},'WfXOj':function(_0x52971e,_0x23b7d7,_0x1b4c95){return _0x52971e(_0x23b7d7,_0x1b4c95);},'UggzB':function(_0x138c2b,_0x3c5254){return _0x138c2b(_0x3c5254);},'oUPtz':'settings.json'},_0x4195b4=getRangerDir();if(!existsSync(_0x4195b4))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x4d6131=await _0x4f0ce9['AHFyA'](readActiveProfileName),_0x5315d9=[],_0x477992={},_0x1ec75d=_0x4f0ce9['ehhLn'](join,_0x4195b4,_0x51c7ad(0x180));if(_0x4f0ce9[_0x51c7ad(0x17f)](existsSync,_0x1ec75d)){const _0x421944=await readdir(_0x1ec75d);for(const _0x46a222 of _0x421944){const _0x4c157d=_0x4f0ce9[_0x51c7ad(0x163)](join,_0x1ec75d,_0x46a222),_0x6b311e=await stat(_0x4c157d);_0x6b311e[_0x51c7ad(0x179)]()&&(_0x5315d9[_0x51c7ad(0x17e)](_0x46a222),_0x477992[_0x46a222]=_0x51c7ad(0x180));}}const _0x4e9419=join(_0x4195b4,'ci');if(existsSync(_0x4e9419)){const _0x35c848=await _0x4f0ce9['EsVuP'](readdir,_0x4e9419);for(const _0x1f1418 of _0x35c848){const _0x47ab22=_0x4f0ce9[_0x51c7ad(0x163)](join,_0x4e9419,_0x1f1418),_0x1ea425=await _0x4f0ce9[_0x51c7ad(0x17f)](stat,_0x47ab22);_0x1ea425[_0x51c7ad(0x179)]()&&(_0x5315d9['push'](_0x1f1418),_0x477992[_0x1f1418]='ci');}}const _0x469683=await _0x4f0ce9[_0x51c7ad(0x17f)](readdir,_0x4195b4);for(const _0x28adcb of _0x469683){if(NON_ENV_DIRS[_0x51c7ad(0x161)](_0x28adcb))continue;if(_0x28adcb['startsWith']('.'))continue;if(_0x28adcb['endsWith'](_0x51c7ad(0x178)))continue;const _0x4ecb41=_0x4f0ce9[_0x51c7ad(0x17c)](join,_0x4195b4,_0x28adcb),_0x18c004=await _0x4f0ce9[_0x51c7ad(0x17f)](stat,_0x4ecb41);_0x18c004[_0x51c7ad(0x179)]()&&_0x4f0ce9['UggzB'](existsSync,join(_0x4ecb41,_0x4f0ce9['oUPtz']))&&(!_0x5315d9[_0x51c7ad(0x161)](_0x28adcb)&&(_0x5315d9[_0x51c7ad(0x17e)](_0x28adcb),_0x477992[_0x28adcb]='legacy'));}return{'envNames':_0x5315d9,'activeEnv':_0x4d6131,'envTypes':_0x477992};}function _0xd9b3(_0x16387a,_0x1b2d35){_0x16387a=_0x16387a-0x15f;const _0x26dc89=_0x26dc();let _0xd9b304=_0x26dc89[_0x16387a];return _0xd9b304;}export async function envList(){const _0x18b8a3=_0xf1ccda,_0x2ce6f6={'qNMtG':function(_0x2f2fd2,_0x472185){return _0x2f2fd2===_0x472185;},'DuGKC':_0x18b8a3(0x17a),'nmcVL':function(_0x42868a){return _0x42868a();},'GnwLu':function(_0x3c91bd,_0x19c95b){return _0x3c91bd===_0x19c95b;},'jeYeL':_0x18b8a3(0x18f),'Xornn':function(_0xcb042d,_0x2a8026){return _0xcb042d(_0x2a8026);},'uiMcX':function(_0x3ce4fd,_0x4690a2,_0x39efe3){return _0x3ce4fd(_0x4690a2,_0x39efe3);},'cnoEh':'\x0aCloud\x20Profiles:'},{envNames:_0x46375f,activeEnv:_0x423b79,envTypes:_0x1ba1b4}=await _0x2ce6f6['nmcVL'](getEnvNames);let _0xb4a0e6=[];const _0x5be9bf=await _0x2ce6f6['nmcVL'](getToken);if(_0x5be9bf)try{_0xb4a0e6=await listCloudProfiles();}catch(_0x4b0c46){console[_0x18b8a3(0x17b)]('\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profiles:\x20'+(_0x4b0c46 instanceof Error?_0x4b0c46[_0x18b8a3(0x189)]:String(_0x4b0c46)));}if(_0x2ce6f6['GnwLu'](_0x46375f['length'],0x0)&&_0xb4a0e6['length']===0x0){console[_0x18b8a3(0x18c)](_0x18b8a3(0x18a)),console['log'](_0x2ce6f6[_0x18b8a3(0x186)]);return;}const _0xa30917=new Set(_0xb4a0e6[_0x18b8a3(0x16e)](_0x4a03aa=>_0x4a03aa['name']));if(_0x46375f['length']>0x0){console['log'](_0x18b8a3(0x167));for(const _0x19ef0b of _0x46375f['sort']()){const _0x2e465b=_0x2ce6f6[_0x18b8a3(0x183)](_0x19ef0b,_0x423b79)&&!_0xa30917['has'](_0x19ef0b),_0x3ef7bf=_0x1ba1b4[_0x19ef0b]||_0x18b8a3(0x180),_0x1bd3f4=await _0x2ce6f6[_0x18b8a3(0x172)](loadSettings,_0x19ef0b),_0x5e8f92=_0x3ef7bf==='legacy'?'':'\x20['+_0x3ef7bf+']';console[_0x18b8a3(0x18c)]('\x20\x20'+(_0x2e465b?'*\x20':'\x20\x20')+_0x19ef0b+_0x5e8f92),_0x1bd3f4[_0x18b8a3(0x188)]&&console[_0x18b8a3(0x18c)]('\x20\x20\x20\x20\x20\x20URL:\x20'+_0x1bd3f4['baseUrl']),_0x1bd3f4[_0x18b8a3(0x18e)]&&console['log']('\x20\x20\x20\x20\x20\x20Details:\x20'+_0x1bd3f4[_0x18b8a3(0x18e)]);}}const _0x32031d=(_0x326c09,_0x3e2d17)=>{const _0x268dae=_0x18b8a3,_0x904e7e=_0x2ce6f6[_0x268dae(0x183)](_0x326c09['name'],_0x423b79),_0x3111ff=_0x326c09[_0x268dae(0x162)]?_0x268dae(0x16d)+_0x326c09['sessionUpdatedAt']+')':_0x2ce6f6[_0x268dae(0x164)];console[_0x268dae(0x18c)](''+_0x3e2d17+(_0x904e7e?'*\x20':'\x20\x20')+_0x326c09['name']),console[_0x268dae(0x18c)](_0x3e2d17+_0x268dae(0x16c)+_0x3111ff);};if(_0xb4a0e6['length']>0x0){if(shouldGroupByEnvironment(_0xb4a0e6)){console['log'](_0x18b8a3(0x165));for(const _0x292b9c of groupCloudProfilesByEnvironment(_0xb4a0e6)){const _0x880cbb=_0x292b9c[_0x18b8a3(0x15f)]??'(no\x20environment\x20—\x20manual\x20or\x20no\x20auth)';console[_0x18b8a3(0x18c)](_0x18b8a3(0x185)+_0x880cbb);for(const _0x461dda of _0x292b9c['profiles']){_0x2ce6f6[_0x18b8a3(0x177)](_0x32031d,_0x461dda,_0x18b8a3(0x168));}}}else{console['log'](_0x2ce6f6['cnoEh']);for(const _0x104358 of[..._0xb4a0e6][_0x18b8a3(0x176)]((_0x5c25be,_0x876b02)=>_0x5c25be['name'][_0x18b8a3(0x170)](_0x876b02['name']))){_0x32031d(_0x104358,'\x20\x20');}}}_0x423b79&&console['log'](_0x18b8a3(0x16a));}