@ranger-testing/ranger-cli 3.1.7-alpha.34400c2-56 → 3.1.7-alpha.387730d-58

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/build/cli.js +1 -1
  2. package/build/commands/addEnv.js +1 -1
  3. package/build/commands/authEncrypt.js +1 -1
  4. package/build/commands/clean.js +1 -1
  5. package/build/commands/config.js +1 -1
  6. package/build/commands/deleteProfile.js +1 -1
  7. package/build/commands/env.js +1 -1
  8. package/build/commands/feature.js +1 -1
  9. package/build/commands/hook.js +1 -1
  10. package/build/commands/hooks/autoPrompt.js +1 -1
  11. package/build/commands/hooks/disable.js +1 -1
  12. package/build/commands/hooks/enable.js +1 -1
  13. package/build/commands/hooks/exitPlanMode.js +1 -1
  14. package/build/commands/hooks/index.js +1 -1
  15. package/build/commands/hooks/output.js +1 -1
  16. package/build/commands/hooks/planReminder.js +1 -1
  17. package/build/commands/hooks/planStart.js +1 -1
  18. package/build/commands/hooks/postEdit.js +1 -1
  19. package/build/commands/hooks/preCompact.js +1 -1
  20. package/build/commands/hooks/sessionEnd.js +1 -1
  21. package/build/commands/hooks/sessionStart.js +1 -1
  22. package/build/commands/hooks/stopHook.js +1 -1
  23. package/build/commands/index.js +1 -1
  24. package/build/commands/login.js +1 -1
  25. package/build/commands/mcpBootstrap.js +1 -1
  26. package/build/commands/migrateProfile.js +1 -1
  27. package/build/commands/setup/claude.js +1 -1
  28. package/build/commands/setup/opencode.js +1 -1
  29. package/build/commands/setupCi.js +1 -1
  30. package/build/commands/skillup.js +1 -1
  31. package/build/commands/start.js +1 -1
  32. package/build/commands/status.js +1 -1
  33. package/build/commands/update.js +1 -1
  34. package/build/commands/updateEnv.js +1 -1
  35. package/build/commands/useEnv.js +1 -1
  36. package/build/commands/utils/activeProfile.js +1 -1
  37. package/build/commands/utils/agentEnv.js +1 -1
  38. package/build/commands/utils/browserSessionsApi.js +1 -1
  39. package/build/commands/utils/claudeConfig.js +1 -1
  40. package/build/commands/utils/claudeOverrideSettings.js +1 -1
  41. package/build/commands/utils/claudePlugin.js +1 -1
  42. package/build/commands/utils/cloudProfile.js +1 -1
  43. package/build/commands/utils/cloudProfileSession.js +1 -1
  44. package/build/commands/utils/crypto.js +1 -1
  45. package/build/commands/utils/desirePathLog.js +1 -1
  46. package/build/commands/utils/deviceAuth.js +1 -1
  47. package/build/commands/utils/environment.js +1 -1
  48. package/build/commands/utils/featureApi.js +1 -1
  49. package/build/commands/utils/fixWebmDuration.js +1 -1
  50. package/build/commands/utils/gitTracked.js +1 -1
  51. package/build/commands/utils/keychain.js +1 -1
  52. package/build/commands/utils/legacyWarning.js +1 -1
  53. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  54. package/build/commands/utils/matchAuthEnvironment.js +1 -1
  55. package/build/commands/utils/mcpImageBase64.js +1 -1
  56. package/build/commands/utils/model.js +1 -1
  57. package/build/commands/utils/novaActCli.js +1 -1
  58. package/build/commands/utils/opencodeConfig.js +1 -1
  59. package/build/commands/utils/organizationEnvApi.js +1 -1
  60. package/build/commands/utils/playwrightCli.js +1 -1
  61. package/build/commands/utils/profileMessages.js +1 -1
  62. package/build/commands/utils/profileSetupBanner.js +1 -1
  63. package/build/commands/utils/projectsConfig.js +1 -1
  64. package/build/commands/utils/rangerConfig.js +1 -1
  65. package/build/commands/utils/rangerRoot.js +1 -1
  66. package/build/commands/utils/rangerwrightCli.js +1 -1
  67. package/build/commands/utils/resolveProfileContext.js +1 -1
  68. package/build/commands/utils/resolveProfileUrl.js +1 -1
  69. package/build/commands/utils/retry.js +1 -1
  70. package/build/commands/utils/scenarioOriginCheck.js +1 -1
  71. package/build/commands/utils/sessionCache.js +1 -1
  72. package/build/commands/utils/settings.js +1 -1
  73. package/build/commands/utils/skillContent.js +1 -1
  74. package/build/commands/utils/skills.js +1 -1
  75. package/build/commands/utils/stitchWebmFiles.js +1 -1
  76. package/build/commands/utils/telemetry.js +1 -1
  77. package/build/commands/utils/tokenRefresh.js +1 -1
  78. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  79. package/build/commands/utils/tunnelClient.js +1 -1
  80. package/build/commands/utils/userApi.js +1 -1
  81. package/build/commands/utils/version.js +1 -1
  82. package/build/commands/verifyFeature.js +1 -1
  83. package/build/commands/verifyFeatureCli.js +1 -1
  84. package/build/commands/verifyFeatureNovaCli.js +1 -1
  85. package/build/commands/verifyFeatureRangerwrightCli.js +1 -1
  86. package/package.json +2 -2
@@ -1 +1 @@
1
- function _0x52cc(_0x20aea0,_0x14087){_0x20aea0=_0x20aea0-0x7a;const _0xbb0ca1=_0xbb0c();let _0x52cc67=_0xbb0ca1[_0x20aea0];return _0x52cc67;}const _0x18c33c=_0x52cc;(function(_0x42d565,_0x548cdb){const _0xf7975d=_0x52cc,_0x102ce9=_0x42d565();while(!![]){try{const _0x5b0355=parseInt(_0xf7975d(0xe8))/0x1+-parseInt(_0xf7975d(0xc7))/0x2*(-parseInt(_0xf7975d(0xe1))/0x3)+parseInt(_0xf7975d(0x8a))/0x4*(parseInt(_0xf7975d(0xeb))/0x5)+parseInt(_0xf7975d(0xe2))/0x6*(-parseInt(_0xf7975d(0x95))/0x7)+-parseInt(_0xf7975d(0xa6))/0x8+parseInt(_0xf7975d(0xb9))/0x9+-parseInt(_0xf7975d(0x88))/0xa;if(_0x5b0355===_0x548cdb)break;else _0x102ce9['push'](_0x102ce9['shift']());}catch(_0x232cbf){_0x102ce9['push'](_0x102ce9['shift']());}}}(_0xbb0c,0xeda3e));import{readdir,rm}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import _0x44c9a0 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=_0x18c33c(0x9a);function warnCloudProfileSharedInOrg(){const _0x24e429=_0x18c33c;if(!process[_0x24e429(0x80)]['isTTY'])return;console[_0x24e429(0xc9)](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x1a1867){const _0x5c070c=_0x18c33c,_0x1f0a03={'NZyLI':_0x5c070c(0xc4),'XzAJs':function(_0x1b7598,_0x4f9e00,_0x421378){return _0x1b7598(_0x4f9e00,_0x421378);},'ZIBZa':function(_0x412dc3,_0x2f4f9d){return _0x412dc3(_0x2f4f9d);},'pyDmm':function(_0x15683d,_0x5033eb){return _0x15683d<_0x5033eb;},'GLUmw':'fetch\x20failed'};try{const _0x262de5=new AbortController(),_0x539745=setTimeout(()=>_0x262de5['abort'](),0x1388),_0x186dd5={'method':'HEAD','signal':_0x262de5['signal'],'redirect':_0x1f0a03['NZyLI']};/^https:\/\/localhost(:\d+)?/i['test'](_0x1a1867)&&(process['env'][_0x5c070c(0xf3)]='0');const _0x58a498=await _0x1f0a03['XzAJs'](fetch,_0x1a1867,_0x186dd5);delete process['env']['NODE_TLS_REJECT_UNAUTHORIZED'],_0x1f0a03['ZIBZa'](clearTimeout,_0x539745);if(_0x1f0a03[_0x5c070c(0x9f)](_0x58a498[_0x5c070c(0x98)],0x190))return{'ok':!![]};return{'ok':![],'error':_0x5c070c(0xe3)+_0x58a498['status']};}catch(_0xcc756){delete process[_0x5c070c(0x84)]['NODE_TLS_REJECT_UNAUTHORIZED'];const _0xd04d85=_0xcc756,_0xf5f46e=_0xd04d85['message']||String(_0xcc756),_0x173143=_0xf5f46e['includes']('Invalid\x20URL')||_0xd04d85['name']==='TypeError'||_0xf5f46e['includes'](_0x1f0a03[_0x5c070c(0xb6)]);return{'ok':![],'error':_0xf5f46e,'isProtocolError':_0x173143};}}async function sweepOrphanLocalProfile(_0x2394d1,_0x30d02a,_0x76e168){const _0x2ec91e=_0x18c33c,_0x141de3={'McxVP':'local','NpwQm':function(_0xa908bd,_0x167591,_0xce43f1){return _0xa908bd(_0x167591,_0xce43f1);},'GNAHW':function(_0x9245ae,_0x4cfb2a){return _0x9245ae(_0x4cfb2a);},'cYfGR':function(_0x21fe66,_0x177f37){return _0x21fe66(_0x177f37);},'skiTD':function(_0x11014a,_0x2cfa57,_0x4a5b59){return _0x11014a(_0x2cfa57,_0x4a5b59);}},_0x5a1a24=join(_0x30d02a,_0x141de3[_0x2ec91e(0x81)]),_0x3e29c2=_0x141de3[_0x2ec91e(0xcf)](join,_0x5a1a24,_0x2394d1);_0x141de3['GNAHW'](existsSync,_0x3e29c2)&&(_0x76e168&&await _0x141de3[_0x2ec91e(0xb0)](isPathGitTracked,_0x3e29c2)?console[_0x2ec91e(0x7e)]('\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20'+_0x3e29c2+'\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.'):(await rm(_0x3e29c2,{'recursive':!![],'force':!![]}),console[_0x2ec91e(0x7e)]('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x3e29c2)));if(existsSync(_0x5a1a24)){let _0x5eb6ef=[];try{_0x5eb6ef=await _0x141de3[_0x2ec91e(0x85)](readdir,_0x5a1a24);}catch{return;}const _0x4683f6='.tmp-'+_0x2394d1+'-';for(const _0x5c5f01 of _0x5eb6ef){if(!_0x5c5f01['startsWith'](_0x4683f6))continue;const _0x12140f=join(_0x5a1a24,_0x5c5f01);await _0x141de3['skiTD'](rm,_0x12140f,{'recursive':!![],'force':!![]}),console[_0x2ec91e(0x7e)]('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x12140f);}}}function _0xbb0c(){const _0x25c839=['profile.add.autoRouted','--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\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a','\x22\x20not\x20found.','manual','input','prompt','2578546CgVrsQ','\x27\x20created.\x0a','warn','HoLiN','eGTWA','zQDVT','error','baseUrl','NpwQm','\x20Your\x20org\x20has\x20no\x20auth\x20environments\x20configured.','\x20\x20Next:\x20ranger\x20go\x20--profile\x20','Enter\x20a\x20different\x20URL','\x22:\x20','setupHeaders','continue','use_suggestion','\x0a\x20\x20(domains:\x20','\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.','.\x20Pass\x20--env\x20<key>\x20to\x20pick\x20one,\x20or\x20use\x20--skip-auth.\x20Configured\x20envs:\x20','ImtCp','trim','✓\x20Cloud\x20profile\x20\x27','\x0a\x20\x20Still\x20could\x20not\x20reach\x20','test','YqBwE','\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','3Kpcdaf','2658ojXbJw','HTTP\x20','\x27\x20created\x20with\x20a\x20captured\x20session.\x0a','some','\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22','Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','1353538AcrEUO','The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a','isElectron','15UKoKsi','yes','\x20(continuing\x20with\x20--force)','env_not_found','What\x20would\x20you\x20like\x20to\x20do?','LUost','BBiKh','authEnv','NODE_TLS_REJECT_UNAUTHORIZED','list','\x27\x20created\x20(no\x20session).\x0a','PQfUP','`\x20again\x20without\x20--skip-auth.','length','dVCox','tkFRx','force','log','NOIZv','stdout','McxVP','slice','uhGny','env','cYfGR','keys','rinWG','14878140BCBzNY','XovCP','384708fvgQOZ','uLapI','wDziJ','no_auth_config','NQwkw','\x27\x20created\x20(CDP).','no_match','qtgoH','exit','http://localhost:3000','skipAuth','7504UtMknG','Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.','TSpXX','status','cwd','This\x20account\x20will\x20be\x20shared\x20with\x20everyone\x20at\x20your\x20organization','\x20\x20Did\x20you\x20mean\x20','setupHeader','\x22.\x20Expected\x20\x22Name:\x20Value\x22.','\x0a🌐\x20Profile\x20Setup\x0a','pyDmm','message','\x20Configured\x20envs:\x20','pIwfP','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.','\x0a\x20\x20A\x20profile\x20named\x20\x22','\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','7233752vOeMui','trackPhaseEnd','profile.add.autoRouteSkipped','dZmlt','HFxDS','cdpEndpoint','indexOf','\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a','rHEvH','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','GNAHW','✓\x20Profile\x20\x27','url','CmzjY','isProtocolError','environments','GLUmw','\x0a\x20\x20Could\x20not\x20reach\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','8180649jBecwY','nBWOt','--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','kmUTK','\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20','origin','vNnYO'];_0xbb0c=function(){return _0x25c839;};return _0xbb0c();}async function sweepOrphansBestEffort(_0x4b16cb){const _0x42938f=_0x18c33c,_0x1b9fca={'ieATx':function(_0xa62038){return _0xa62038();},'CmzjY':function(_0x829e00,_0x3c5b1b){return _0x829e00!==_0x3c5b1b;},'HqcHA':function(_0x37f109){return _0x37f109();},'pIwfP':function(_0x41012f,_0x4c1a85,_0x459918,_0x3bb3f6){return _0x41012f(_0x4c1a85,_0x459918,_0x3bb3f6);}};try{await sweepOrphanLocalProfile(_0x4b16cb,getRangerHomeDir(),![]);const _0x56c760=_0x1b9fca['ieATx'](getRangerDir);_0x1b9fca[_0x42938f(0xb3)](_0x56c760,_0x1b9fca['HqcHA'](getRangerHomeDir))&&await _0x1b9fca[_0x42938f(0xa2)](sweepOrphanLocalProfile,_0x4b16cb,_0x56c760,!![]);}catch(_0x2fe2e3){console['log']('\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20('+(_0x2fe2e3 instanceof Error?_0x2fe2e3['message']:String(_0x2fe2e3))+').');}}async function markActive(_0x36ed37){const _0x4ecbeb=_0x18c33c;try{await writeActiveProfileName(_0x36ed37),console['log']('\x20\x20Set\x20active\x20profile:\x20'+_0x36ed37);}catch{console['log'](_0x4ecbeb(0x96));}}async function tryAutoRouteCloudProfile(_0x21b7b7,_0x199956,_0x34ee2b,_0x387980,_0x247027){const _0xaaa9a7=_0x18c33c,_0x4716f3={'tkFRx':'profile.add.autoRouteSkipped','ITdFW':function(_0x791864,_0x53f876,_0x3f5dcf,_0x6fd04e,_0x407d67){return _0x791864(_0x53f876,_0x3f5dcf,_0x6fd04e,_0x407d67);},'xUmZx':_0xaaa9a7(0x8d),'qzLHB':_0xaaa9a7(0xe0),'joapH':_0xaaa9a7(0xad),'uhGny':_0xaaa9a7(0xc2),'NQwkw':_0xaaa9a7(0xd0),'vNnYO':'user_declined','rwzvw':_0xaaa9a7(0xa3),'HoLiN':function(_0x2e9e6b,_0x40693b,_0x3d13d7,_0x249518){return _0x2e9e6b(_0x40693b,_0x3d13d7,_0x249518);},'DKQxg':function(_0x83bf5c){return _0x83bf5c();},'wDziJ':function(_0x3553d4,_0x5abb8e){return _0x3553d4+_0x5abb8e;},'qtgoH':function(_0x39c7d8,_0x2ed04c){return _0x39c7d8(_0x2ed04c);}};let _0x361f86;try{_0x361f86=await fetchAuthConfig();}catch(_0x23e014){return _0x247027?.['trackPhaseEnd'](_0x4716f3[_0xaaa9a7(0x7c)],{'reason':_0xaaa9a7(0x8d),'profileName':_0x21b7b7}),console[_0xaaa9a7(0xcd)](_0xaaa9a7(0xbd)+(_0x23e014 instanceof Error?_0x23e014[_0xaaa9a7(0xa0)]:String(_0x23e014))),![];}if((!_0x361f86||!_0x361f86[_0xaaa9a7(0xb5)]||Object[_0xaaa9a7(0x86)](_0x361f86[_0xaaa9a7(0xb5)])[_0xaaa9a7(0x7a)]===0x0)&&!_0x34ee2b['authEnv']){if(_0x387980)return await _0x4716f3['ITdFW'](captureEnvLessProfile,_0x21b7b7,_0x199956,_0x34ee2b,_0x247027);return _0x247027?.[_0xaaa9a7(0xa7)]('profile.add.autoRouteSkipped',{'reason':_0x4716f3['xUmZx'],'profileName':_0x21b7b7}),console['error'](_0x4716f3['qzLHB']+'\x0a'+_0x4716f3['joapH']+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20'+_0x21b7b7+'\x20--url\x20'+_0x199956+'\x20--skip-auth\x0a')+'\x0a'+_0x4716f3[_0xaaa9a7(0x83)]+'\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login'),![];}let _0x34c080;if(_0x34ee2b[_0xaaa9a7(0xf2)]){if(!_0x361f86?.['environments']?.[_0x34ee2b['authEnv']]){const _0xfee778=Object[_0xaaa9a7(0x86)](_0x361f86?.[_0xaaa9a7(0xb5)]??{});return _0x247027?.[_0xaaa9a7(0xa7)](_0xaaa9a7(0xa8),{'reason':_0xaaa9a7(0xee),'profileName':_0x21b7b7}),console['error']('\x0a\x20\x20Auth\x20environment\x20\x22'+_0x34ee2b[_0xaaa9a7(0xf2)]+_0xaaa9a7(0xc3)+(_0xfee778['length']?_0xaaa9a7(0xa1)+_0xfee778['join'](',\x20')+'.':_0x4716f3[_0xaaa9a7(0x8e)])),![];}_0x34c080=_0x34ee2b[_0xaaa9a7(0xf2)];}else _0x34c080=matchAuthEnvironment(_0x199956,_0x361f86);if(!_0x34c080)return _0x247027?.['trackPhaseEnd'](_0xaaa9a7(0xa8),{'reason':_0xaaa9a7(0x90),'profileName':_0x21b7b7}),console['error']('\x0a\x20\x20No\x20auth\x20env\x20matches\x20'+_0x199956+_0xaaa9a7(0xd9)+Object['keys'](_0x361f86?.['environments']??{})['join'](',\x20')+'.'),![];const _0x2ec8ac=_0x361f86?.[_0xaaa9a7(0xb5)]?.[_0x34c080],_0x1b6316=_0x2ec8ac?.['domains']??[];if(_0x387980&&!_0x34ee2b['yes']){const {saveToCloud:_0x196d0e}=await _0x44c9a0[_0xaaa9a7(0xc6)]([{'type':'confirm','name':'saveToCloud','message':'Found\x20auth\x20environment\x20\x27'+_0x34c080+'\x27\x20matching\x20'+_0x199956+_0xaaa9a7(0xd7)+_0x1b6316['join'](',\x20')+')\x0a\x20\x20Save\x20\x27'+_0x21b7b7+'\x27\x20to\x20the\x20cloud?','default':!![]}]);if(!_0x196d0e)return _0x247027?.[_0xaaa9a7(0xa7)](_0x4716f3['tkFRx'],{'reason':_0x4716f3[_0xaaa9a7(0xbf)],'profileName':_0x21b7b7}),console[_0xaaa9a7(0xcd)](_0x4716f3['rwzvw']),![];}const _0x291a6b=_0x1b6316[_0xaaa9a7(0xe5)](_0x4d9316=>{const _0x2cb6f0=_0xaaa9a7;try{return new URL(_0x4d9316)[_0x2cb6f0(0xbe)]===new URL(_0x199956)['origin'];}catch{return![];}}),_0x4d4b59={};!_0x291a6b&&(_0x4d4b59['baseUrl']=_0x199956);try{await _0x4716f3[_0xaaa9a7(0xca)](createCloudProfile,_0x21b7b7,_0x34c080,{'settings':_0x4d4b59}),_0x4716f3['DKQxg'](warnCloudProfileSharedInOrg);}catch(_0x1d42bc){if(_0x1d42bc instanceof ApiError&&_0x1d42bc['status']===0x199){console['error'](_0x4716f3[_0xaaa9a7(0x8c)](_0xaaa9a7(0xa4)+_0x21b7b7+_0xaaa9a7(0xa5),_0xaaa9a7(0xaf)+_0x21b7b7));throw _0x1d42bc;}throw _0x1d42bc;}return console['log'](_0xaaa9a7(0xb1)+_0x21b7b7+_0xaaa9a7(0xc8)+(_0xaaa9a7(0xd1)+_0x21b7b7)),await _0x4716f3[_0xaaa9a7(0x91)](sweepOrphansBestEffort,_0x21b7b7),_0x247027?.['trackPhaseEnd'](_0xaaa9a7(0xc0),{'envKey':_0x34c080,'profileName':_0x21b7b7}),!![];}async function createUnconfiguredCloudProfile(_0x5c2291,_0x27032e){const _0x5a1111=_0x18c33c,_0x4e36b0={'wpBJx':function(_0x1328c0,_0x43e6db,_0x2ac7d8,_0x4299f8){return _0x1328c0(_0x43e6db,_0x2ac7d8,_0x4299f8);}};try{await _0x4e36b0['wpBJx'](createCloudProfile,_0x5c2291,undefined,{'settings':_0x27032e}),warnCloudProfileSharedInOrg();}catch(_0x471207){_0x471207 instanceof ApiError&&_0x471207[_0x5a1111(0x98)]===0x199&&console['error'](_0x5a1111(0xa4)+_0x5c2291+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a'+(_0x5a1111(0xaf)+_0x5c2291));throw _0x471207;}}async function captureEnvLessProfile(_0x225c34,_0x4a93a3,_0x5a4cd7,_0x75abc1){const _0x224aae=_0x18c33c,_0x122566={'gEqWa':'confirm','JsYNa':'capture','UZyyZ':'Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','eGTWA':'user_declined','NOIZv':function(_0x20cd89,_0x1dde6b){return _0x20cd89+_0x1dde6b;},'YUgLh':function(_0x5b368c,_0x148cb8,_0x220034,_0x12f550){return _0x5b368c(_0x148cb8,_0x220034,_0x12f550);},'rHEvH':function(_0x2ded60,_0x53bc0e){return _0x2ded60===_0x53bc0e;},'CFzVe':function(_0x5a0a59,_0x2becf2,_0x5bba0d){return _0x5a0a59(_0x2becf2,_0x5bba0d);},'eJhfM':function(_0x1fda23,_0x4ea5b6){return _0x1fda23>_0x4ea5b6;}};if(!_0x5a4cd7[_0x224aae(0xec)]){const {capture:_0x3917d3}=await _0x44c9a0['prompt']([{'type':_0x122566['gEqWa'],'name':_0x122566['JsYNa'],'message':_0x122566['UZyyZ'],'default':!![]}]);if(!_0x3917d3)return _0x75abc1?.[_0x224aae(0xa7)](_0x224aae(0xa8),{'reason':_0x122566[_0x224aae(0xcb)],'profileName':_0x225c34}),console['error'](_0x122566[_0x224aae(0x7f)]('\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a','\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.')),![];}const _0x2d39f3={};if(_0x5a4cd7[_0x224aae(0x9c)])for(const _0xb43326 of _0x5a4cd7[_0x224aae(0x9c)]){const _0x4ac1d7=_0xb43326[_0x224aae(0xac)](':');if(_0x4ac1d7===-0x1)continue;_0x2d39f3[_0xb43326[_0x224aae(0x82)](0x0,_0x4ac1d7)['trim']()]=_0xb43326['slice'](_0x4ac1d7+0x1)[_0x224aae(0xdb)]();}const _0x456742={'baseUrl':_0x4a93a3};Object[_0x224aae(0x86)](_0x2d39f3)[_0x224aae(0x7a)]>0x0&&(_0x456742[_0x224aae(0xd4)]=_0x2d39f3);let _0x3d8630;try{_0x3d8630=await _0x122566['YUgLh'](createCloudProfile,_0x225c34,undefined,{'settings':_0x456742}),warnCloudProfileSharedInOrg();}catch(_0x28cf7f){_0x28cf7f instanceof ApiError&&_0x122566[_0x224aae(0xae)](_0x28cf7f['status'],0x199)&&console['error'](_0x122566['NOIZv'](_0x224aae(0xa4)+_0x225c34+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x225c34));throw _0x28cf7f;}return await _0x122566['CFzVe'](manualBrowserLogin,_0x3d8630,{'key':'','domains':[_0x4a93a3],'setupHeaders':_0x122566['eJhfM'](Object['keys'](_0x2d39f3)[_0x224aae(0x7a)],0x0)?_0x2d39f3:undefined}),console[_0x224aae(0x7e)]('\x0a✓\x20Profile\x20\x27'+_0x225c34+_0x224aae(0xe4)+(_0x224aae(0xd1)+_0x225c34)),await sweepOrphansBestEffort(_0x225c34),_0x75abc1?.['trackPhaseEnd'](_0x224aae(0xc0),{'envKey':null,'profileName':_0x225c34}),!![];}export async function addEnv(_0x5e8845,_0x3123d5={},_0x4b0e09){const _0x1f79da=_0x18c33c,_0x1a2158={'HFxDS':function(_0x1ae53a,_0x2bdb45){return _0x1ae53a+_0x2bdb45;},'dVCox':function(_0x494063,_0xc1763b){return _0x494063+_0xc1763b;},'NDwTh':'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','ImtCp':'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','wCyts':function(_0x548ea8,_0x1bc251){return _0x548ea8===_0x1bc251;},'YqBwE':_0x1f79da(0xbb),'rinWG':_0x1f79da(0xc1),'zJkaL':'--cdp-endpoint\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20a\x20CDP\x20profile\x20connects\x20to\x20an\x20existing\x20browser\x20and\x20has\x20no\x20auth\x20environment.','tcCvl':function(_0x1958ec,_0x25ae49){return _0x1958ec(_0x25ae49);},'uLapI':'\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','LUost':function(_0x314326,_0x597285){return _0x314326>_0x597285;},'vMiAW':'cdpEndpoint','TSpXX':function(_0x541d67,_0x214cc3){return _0x541d67(_0x214cc3);},'tCdaZ':function(_0x580030,_0x5c698c,_0x46ffb1){return _0x580030(_0x5c698c,_0x46ffb1);},'BBiKh':_0x1f79da(0xc5),'dZmlt':_0x1f79da(0xce),'SEPGs':'What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','PQfUP':'action','zQDVT':_0x1f79da(0xd6),'kmUTK':'retry','XovCP':_0x1f79da(0xd5),'nBWOt':function(_0x58073b,_0xcdd50a){return _0x58073b(_0xcdd50a);},'uISnZ':function(_0x477658,_0x25bfb6,_0x570832,_0x167277,_0x41afa4,_0x152faf){return _0x477658(_0x25bfb6,_0x570832,_0x167277,_0x41afa4,_0x152faf);}};_0x3123d5['ci']&&(console['error'](_0x1a2158[_0x1f79da(0xaa)](_0x1a2158['HFxDS'](_0x1a2158['HFxDS'](_0x1a2158[_0x1f79da(0x7b)](_0x1a2158['HFxDS'](_0x1f79da(0xe9),'for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a'),'\x0a'),'To\x20set\x20up\x20a\x20profile,\x20run:\x0a')+_0x1a2158['NDwTh'],'\x0a'),_0x1a2158[_0x1f79da(0xda)])+'\x20\x20https://docs.ranger.net/main/concepts/profiles'),process[_0x1f79da(0x92)](0x1));const _0x1764a0={};if(_0x3123d5['setupHeader'])for(const _0x252998 of _0x3123d5['setupHeader']){const _0x32d887=_0x252998['indexOf'](':');if(_0x1a2158['wCyts'](_0x32d887,-0x1))throw new Error('Invalid\x20--setup-header\x20format:\x20\x22'+_0x252998+_0x1f79da(0x9d));const _0x56c9b2=_0x252998[_0x1f79da(0x82)](0x0,_0x32d887)[_0x1f79da(0xdb)](),_0x17170d=_0x252998['slice'](_0x32d887+0x1)[_0x1f79da(0xdb)]();_0x1764a0[_0x56c9b2]=_0x17170d;}if(_0x3123d5['cdpEndpoint']!==undefined&&_0x3123d5[_0x1f79da(0xab)][_0x1f79da(0xdb)]()==='')throw new Error(_0x1a2158[_0x1f79da(0xdf)]);if(_0x3123d5[_0x1f79da(0xab)]&&_0x3123d5['url'])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(_0x3123d5['authEnv']&&_0x3123d5[_0x1f79da(0x94)])throw new Error(_0x1a2158[_0x1f79da(0x87)]);if(_0x3123d5['authEnv']&&_0x3123d5['cdpEndpoint'])throw new Error(_0x1a2158['zJkaL']);const _0x3d559f=_0x1a2158['tcCvl'](Boolean,_0x3123d5[_0x1f79da(0xab)]),_0x49190f=isInteractive();if(!_0x49190f&&!_0x3123d5[_0x1f79da(0xb2)]&&!_0x3d559f&&!_0x3123d5['skipAuth'])throw new Error(_0x1f79da(0xb8));if(_0x3d559f){const _0x49139=_0x3123d5[_0x1f79da(0xab)];console['log'](_0x1a2158[_0x1f79da(0x8b)]),console['log']('\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20'+_0x49139);const _0x41053f={'cdpEndpoint':_0x49139,'isElectron':!![]};_0x1a2158['LUost'](Object['keys'](_0x1764a0)['length'],0x0)&&(_0x41053f['setupHeaders']=_0x1764a0);await createUnconfiguredCloudProfile(_0x5e8845,_0x41053f);try{setProfileOverride(process[_0x1f79da(0x99)](),_0x5e8845,_0x1a2158['vMiAW'],_0x49139),setProfileOverride(process[_0x1f79da(0x99)](),_0x5e8845,_0x1f79da(0xea),!![]);}catch(_0x248338){console[_0x1f79da(0xcd)]('\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20'+(_0x248338 instanceof Error?_0x248338[_0x1f79da(0xa0)]:String(_0x248338)));}console[_0x1f79da(0x7e)](_0x1f79da(0xdc)+_0x5e8845+_0x1f79da(0x8f)),await sweepOrphansBestEffort(_0x5e8845),await _0x1a2158['TSpXX'](markActive,_0x5e8845);return;}if(_0x3123d5[_0x1f79da(0x94)]){const _0x50ce4c={};_0x3123d5[_0x1f79da(0xb2)]&&(_0x50ce4c[_0x1f79da(0xce)]=_0x3123d5['url']);_0x1a2158[_0x1f79da(0xf0)](Object['keys'](_0x1764a0)['length'],0x0)&&(_0x50ce4c['setupHeaders']=_0x1764a0);await _0x1a2158['tCdaZ'](createUnconfiguredCloudProfile,_0x5e8845,_0x50ce4c),console['log'](_0x1a2158['dVCox']('✓\x20Profile\x20\x27'+_0x5e8845+_0x1f79da(0xf5),'\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20'+_0x5e8845+_0x1f79da(0xf7))),await _0x1a2158[_0x1f79da(0x97)](sweepOrphansBestEffort,_0x5e8845),await markActive(_0x5e8845);return;}if(_0x3123d5['url']){const _0x278f7f=_0x3123d5[_0x1f79da(0xb2)],_0x573fca=await _0x1a2158['TSpXX'](checkUrlReachability,_0x278f7f);if(!_0x573fca['ok']&&!_0x3123d5[_0x1f79da(0x7d)])throw new Error('Could\x20not\x20reach\x20'+_0x278f7f+':\x20'+_0x573fca[_0x1f79da(0xcd)]+_0x1f79da(0xd8));!_0x573fca['ok']&&_0x3123d5[_0x1f79da(0x7d)]&&console[_0x1f79da(0x7e)]('⚠\x20Could\x20not\x20reach\x20'+_0x278f7f+':\x20'+_0x573fca['error']+_0x1f79da(0xed));}else{console[_0x1f79da(0x7e)](_0x1f79da(0x9e)),console[_0x1f79da(0x7e)]('\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.'),console[_0x1f79da(0x7e)]('\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a');let _0x5675dd='',_0x54bb74=![];while(!![]){const _0x1c3f22=await _0x44c9a0['prompt']([{'type':_0x1a2158[_0x1f79da(0xf1)],'name':_0x1a2158[_0x1f79da(0xa9)],'message':_0x54bb74?_0x1f79da(0xe7):_0x1a2158['SEPGs'],'default':_0x5675dd||_0x1f79da(0x93)}]);_0x5675dd=_0x1c3f22['baseUrl'];const _0x11043f=await _0x1a2158['TSpXX'](checkUrlReachability,_0x5675dd);if(_0x11043f['ok'])break;const _0x204ee2=/^[a-zA-Z][\w+.-]*:\/\//[_0x1f79da(0xde)](_0x5675dd),_0x51e4e4=_0x11043f[_0x1f79da(0xb4)]&&!_0x204ee2,_0x515291=_0x51e4e4?'http://'+_0x5675dd:null;_0x54bb74=!![],console[_0x1f79da(0x7e)](_0x1f79da(0xb7)+_0x5675dd+':\x20'+_0x11043f['error']);_0x515291&&console[_0x1f79da(0x7e)](_0x1f79da(0x9b)+_0x515291+'?');const {action:_0x365bed}=await _0x44c9a0['prompt']([{'type':_0x1f79da(0xf4),'name':_0x1a2158[_0x1f79da(0xf6)],'message':_0x1f79da(0xef),'choices':[..._0x515291?[{'name':'Use\x20'+_0x515291,'value':_0x1a2158[_0x1f79da(0xcc)]}]:[],{'name':_0x1f79da(0xd2),'value':_0x1a2158[_0x1f79da(0xbc)]},{'name':'Continue\x20anyway','value':_0x1a2158['XovCP']}]}]);if(_0x365bed===_0x1a2158[_0x1f79da(0xcc)]&&_0x515291){_0x5675dd=_0x515291;const _0x46fadc=await _0x1a2158[_0x1f79da(0xba)](checkUrlReachability,_0x5675dd);if(_0x46fadc['ok'])break;console[_0x1f79da(0x7e)](_0x1f79da(0xdd)+_0x5675dd+':\x20'+_0x46fadc[_0x1f79da(0xcd)]);}else{if(_0x365bed===_0x1a2158[_0x1f79da(0x89)])break;}}_0x3123d5={..._0x3123d5,'url':_0x5675dd};}let _0x21503c=![];try{_0x21503c=await _0x1a2158['uISnZ'](tryAutoRouteCloudProfile,_0x5e8845,_0x3123d5['url'],_0x3123d5,_0x49190f,_0x4b0e09);}catch(_0xc84b27){console['error'](_0x1f79da(0xe6)+_0x5e8845+_0x1f79da(0xd3)+(_0xc84b27 instanceof Error?_0xc84b27['message']:_0x1a2158[_0x1f79da(0x97)](String,_0xc84b27))),process['exit'](0x1);}!_0x21503c&&process[_0x1f79da(0x92)](0x1),await markActive(_0x5e8845);}
1
+ (function(_0x14643b,_0x228c7a){const _0x5ef594=_0x1369,_0x29a00f=_0x14643b();while(!![]){try{const _0x412489=parseInt(_0x5ef594(0x1ac))/0x1*(parseInt(_0x5ef594(0x1af))/0x2)+parseInt(_0x5ef594(0x1c5))/0x3*(-parseInt(_0x5ef594(0x18d))/0x4)+-parseInt(_0x5ef594(0x143))/0x5*(parseInt(_0x5ef594(0x157))/0x6)+parseInt(_0x5ef594(0x14b))/0x7*(-parseInt(_0x5ef594(0x152))/0x8)+-parseInt(_0x5ef594(0x178))/0x9+-parseInt(_0x5ef594(0x1aa))/0xa+-parseInt(_0x5ef594(0x15d))/0xb*(-parseInt(_0x5ef594(0x184))/0xc);if(_0x412489===_0x228c7a)break;else _0x29a00f['push'](_0x29a00f['shift']());}catch(_0x3caf5b){_0x29a00f['push'](_0x29a00f['shift']());}}}(_0xc63d,0xc81ab));import{readdir,rm}from'fs/promises';import{join}from'path';function _0x1369(_0x413ec0,_0x29a2f2){_0x413ec0=_0x413ec0-0x13e;const _0xc63d2c=_0xc63d();let _0x1369d1=_0xc63d2c[_0x413ec0];return _0x1369d1;}import{existsSync}from'fs';import _0x22def1 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 _0x2d6cab=_0x1369;if(!process['stdout'][_0x2d6cab(0x18f)])return;console['warn'](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x553f8f){const _0x3a37e7=_0x1369,_0x50c724={'cmIBp':function(_0x21dc9f,_0x312d89,_0x2ea1b4){return _0x21dc9f(_0x312d89,_0x2ea1b4);},'jORaR':'HEAD','nKife':'manual','orlIj':function(_0x381772,_0x56d73b){return _0x381772(_0x56d73b);},'vTJwe':'Invalid\x20URL','iCJLd':'fetch\x20failed'};try{const _0x5245a5=new AbortController(),_0x15acea=_0x50c724[_0x3a37e7(0x191)](setTimeout,()=>_0x5245a5['abort'](),0x1388),_0x1b1bb1={'method':_0x50c724[_0x3a37e7(0x156)],'signal':_0x5245a5[_0x3a37e7(0x188)],'redirect':_0x50c724['nKife']};/^https:\/\/localhost(:\d+)?/i[_0x3a37e7(0x1c1)](_0x553f8f)&&(process[_0x3a37e7(0x16b)][_0x3a37e7(0x189)]='0');const _0x74013d=await _0x50c724[_0x3a37e7(0x191)](fetch,_0x553f8f,_0x1b1bb1);delete process[_0x3a37e7(0x16b)][_0x3a37e7(0x189)],_0x50c724['orlIj'](clearTimeout,_0x15acea);if(_0x74013d['status']<0x190)return{'ok':!![]};return{'ok':![],'error':_0x3a37e7(0x1c0)+_0x74013d['status']};}catch(_0x13c565){delete process[_0x3a37e7(0x16b)]['NODE_TLS_REJECT_UNAUTHORIZED'];const _0x41c336=_0x13c565,_0x5c3b70=_0x41c336['message']||String(_0x13c565),_0x58bba0=_0x5c3b70[_0x3a37e7(0x172)](_0x50c724[_0x3a37e7(0x19e)])||_0x41c336['name']==='TypeError'||_0x5c3b70[_0x3a37e7(0x172)](_0x50c724['iCJLd']);return{'ok':![],'error':_0x5c3b70,'isProtocolError':_0x58bba0};}}async function sweepOrphanLocalProfile(_0x1804fa,_0x1c5b6e,_0x3b150b){const _0x28dc03=_0x1369,_0x26411c={'PKMVf':'local','GjmHX':function(_0x261bb0,_0x2ab406){return _0x261bb0(_0x2ab406);},'JmRXZ':function(_0x4c9fee,_0xa54324){return _0x4c9fee(_0xa54324);},'Fzzlh':function(_0x4aaf2d,_0x277b3f,_0x2d4e18){return _0x4aaf2d(_0x277b3f,_0x2d4e18);}},_0x234cbd=join(_0x1c5b6e,_0x26411c[_0x28dc03(0x150)]),_0x3277a9=join(_0x234cbd,_0x1804fa);_0x26411c['GjmHX'](existsSync,_0x3277a9)&&(_0x3b150b&&await _0x26411c['GjmHX'](isPathGitTracked,_0x3277a9)?console['log']('\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20'+_0x3277a9+_0x28dc03(0x1c2)):(await rm(_0x3277a9,{'recursive':!![],'force':!![]}),console['log']('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x3277a9)));if(_0x26411c['JmRXZ'](existsSync,_0x234cbd)){let _0x5c708d=[];try{_0x5c708d=await _0x26411c[_0x28dc03(0x170)](readdir,_0x234cbd);}catch{return;}const _0x3d89c5=_0x28dc03(0x17c)+_0x1804fa+'-';for(const _0x59561b of _0x5c708d){if(!_0x59561b[_0x28dc03(0x168)](_0x3d89c5))continue;const _0x2ec99c=_0x26411c['Fzzlh'](join,_0x234cbd,_0x59561b);await _0x26411c['Fzzlh'](rm,_0x2ec99c,{'recursive':!![],'force':!![]}),console['log'](_0x28dc03(0x1b7)+_0x2ec99c);}}}async function sweepOrphansBestEffort(_0x368f11){const _0x1575e3=_0x1369,_0x2fea7c={'UQyuR':function(_0x1dee2a,_0xd1aaaa,_0x44c8c1,_0x27c783){return _0x1dee2a(_0xd1aaaa,_0x44c8c1,_0x27c783);},'ycKcD':function(_0x2b8b87){return _0x2b8b87();},'FLiqu':function(_0x44d29b,_0x2629b5){return _0x44d29b!==_0x2629b5;},'EAtks':function(_0x302b67){return _0x302b67();},'inrMJ':function(_0x54808a,_0x3bd444,_0x541079,_0x3ac57c){return _0x54808a(_0x3bd444,_0x541079,_0x3ac57c);}};try{await _0x2fea7c[_0x1575e3(0x197)](sweepOrphanLocalProfile,_0x368f11,_0x2fea7c['ycKcD'](getRangerHomeDir),![]);const _0x21fdc7=_0x2fea7c[_0x1575e3(0x161)](getRangerDir);_0x2fea7c['FLiqu'](_0x21fdc7,_0x2fea7c[_0x1575e3(0x1b8)](getRangerHomeDir))&&await _0x2fea7c[_0x1575e3(0x1a5)](sweepOrphanLocalProfile,_0x368f11,_0x21fdc7,!![]);}catch(_0xc5bb0e){console[_0x1575e3(0x141)](_0x1575e3(0x190)+(_0xc5bb0e instanceof Error?_0xc5bb0e[_0x1575e3(0x14d)]:String(_0xc5bb0e))+').');}}async function markActive(_0x4a3e5c){const _0x28023a=_0x1369,_0xdbc597={'LHDzI':_0x28023a(0x185)};try{await writeActiveProfileName(_0x4a3e5c),console['log'](_0x28023a(0x163)+_0x4a3e5c);}catch{console[_0x28023a(0x141)](_0xdbc597[_0x28023a(0x162)]);}}async function tryAutoRouteCloudProfile(_0x21b518,_0x1fad8e,_0x113c04,_0x2f2058,_0x2b5643){const _0x4616ea=_0x1369,_0x5978c5={'OAZbv':_0x4616ea(0x196),'zugCZ':function(_0x1b6893,_0x268928){return _0x1b6893===_0x268928;},'iROaz':function(_0x4b797f,_0x2ab331,_0x3b74d3,_0x4318e8,_0x40693d){return _0x4b797f(_0x2ab331,_0x3b74d3,_0x4318e8,_0x40693d);},'KAJxU':function(_0x5d87e4,_0x3f1f56){return _0x5d87e4+_0x3f1f56;},'PbbJI':function(_0x26c7a9,_0x273d02){return _0x26c7a9+_0x273d02;},'mKjgh':'\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','uvQFJ':'profile.add.autoRouteSkipped','gwBym':'\x20Your\x20org\x20has\x20no\x20auth\x20environments\x20configured.','bFePv':function(_0x16b533,_0x135cfa,_0x3cfcb8){return _0x16b533(_0x135cfa,_0x3cfcb8);},'mstri':_0x4616ea(0x19b),'dICQA':_0x4616ea(0x154),'nAZhc':'user_declined','krHaL':function(_0x1124f3,_0x5aef38,_0xf06306,_0x32510e){return _0x1124f3(_0x5aef38,_0xf06306,_0x32510e);},'svAjk':function(_0x2df9da){return _0x2df9da();},'dJSxB':function(_0x5dc321,_0x40a44f){return _0x5dc321 instanceof _0x40a44f;},'dzwii':function(_0x4cd3fb,_0xc99edc){return _0x4cd3fb===_0xc99edc;},'wywxv':_0x4616ea(0x1a9)};let _0x38f8d8;try{_0x38f8d8=await fetchAuthConfig();}catch(_0x4c6553){return _0x2b5643?.['trackPhaseEnd']('profile.add.autoRouteSkipped',{'reason':_0x5978c5[_0x4616ea(0x179)],'profileName':_0x21b518}),console[_0x4616ea(0x1c7)]('\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20'+(_0x4c6553 instanceof Error?_0x4c6553[_0x4616ea(0x14d)]:String(_0x4c6553))),![];}if((!_0x38f8d8||!_0x38f8d8['environments']||_0x5978c5[_0x4616ea(0x140)](Object[_0x4616ea(0x1b6)](_0x38f8d8['environments'])[_0x4616ea(0x175)],0x0))&&!_0x113c04['authEnv']){if(_0x2f2058)return await _0x5978c5['iROaz'](captureEnvLessProfile,_0x21b518,_0x1fad8e,_0x113c04,_0x2b5643);return _0x2b5643?.[_0x4616ea(0x176)]('profile.add.autoRouteSkipped',{'reason':_0x5978c5['OAZbv'],'profileName':_0x21b518}),console['error'](_0x5978c5[_0x4616ea(0x167)](_0x5978c5[_0x4616ea(0x164)]('\x0a\x20\x20Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team\x20yet\x20—\x20that\x27s\x20the\x20path\x20that\x20lets\x20Ranger\x20log\x20into\x20your\x20app\x20for\x20you\x20in\x20CI\x20/\x20background\x20agents.\x0a'+'\x0a'+'\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a'+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20'+_0x21b518+'\x20--url\x20'+_0x1fad8e+'\x20--skip-auth\x0a')+'\x0a','\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a'),_0x5978c5['mKjgh'])),![];}let _0x219c32;if(_0x113c04[_0x4616ea(0x1bf)]){if(!_0x38f8d8?.[_0x4616ea(0x1ca)]?.[_0x113c04[_0x4616ea(0x1bf)]]){const _0x48792b=Object['keys'](_0x38f8d8?.['environments']??{});return _0x2b5643?.['trackPhaseEnd'](_0x5978c5[_0x4616ea(0x1ae)],{'reason':_0x4616ea(0x15a),'profileName':_0x21b518}),console[_0x4616ea(0x1c7)](_0x4616ea(0x182)+_0x113c04['authEnv']+'\x22\x20not\x20found.'+(_0x48792b[_0x4616ea(0x175)]?_0x4616ea(0x1a1)+_0x48792b[_0x4616ea(0x18c)](',\x20')+'.':_0x5978c5['gwBym'])),![];}_0x219c32=_0x113c04['authEnv'];}else _0x219c32=_0x5978c5[_0x4616ea(0x160)](matchAuthEnvironment,_0x1fad8e,_0x38f8d8);if(!_0x219c32)return _0x2b5643?.['trackPhaseEnd'](_0x5978c5[_0x4616ea(0x1ae)],{'reason':_0x5978c5[_0x4616ea(0x1a3)],'profileName':_0x21b518}),console[_0x4616ea(0x1c7)](_0x4616ea(0x148)+_0x1fad8e+'.\x20Pass\x20--env\x20<key>\x20to\x20pick\x20one,\x20or\x20use\x20--skip-auth.\x20Configured\x20envs:\x20'+Object[_0x4616ea(0x1b6)](_0x38f8d8?.[_0x4616ea(0x1ca)]??{})['join'](',\x20')+'.'),![];const _0x5cb05f=_0x38f8d8?.['environments']?.[_0x219c32],_0x49e2a3=_0x5cb05f?.['domains']??[];if(_0x2f2058&&!_0x113c04['yes']){const {saveToCloud:_0x1e9771}=await _0x22def1['prompt']([{'type':_0x5978c5[_0x4616ea(0x18b)],'name':'saveToCloud','message':_0x4616ea(0x15c)+_0x219c32+'\x27\x20matching\x20'+_0x1fad8e+_0x4616ea(0x18e)+_0x49e2a3[_0x4616ea(0x18c)](',\x20')+')\x0a\x20\x20Save\x20\x27'+_0x21b518+_0x4616ea(0x171),'default':!![]}]);if(!_0x1e9771)return _0x2b5643?.[_0x4616ea(0x176)]('profile.add.autoRouteSkipped',{'reason':_0x5978c5[_0x4616ea(0x180)],'profileName':_0x21b518}),console['error'](_0x4616ea(0x14a)),![];}const _0x59d713=_0x49e2a3['some'](_0x25417c=>{const _0x5d49a9=_0x4616ea;try{return new URL(_0x25417c)[_0x5d49a9(0x195)]===new URL(_0x1fad8e)[_0x5d49a9(0x195)];}catch{return![];}}),_0x523986={};!_0x59d713&&(_0x523986[_0x4616ea(0x13e)]=_0x1fad8e);try{await _0x5978c5[_0x4616ea(0x16d)](createCloudProfile,_0x21b518,_0x219c32,{'settings':_0x523986}),_0x5978c5[_0x4616ea(0x1a2)](warnCloudProfileSharedInOrg);}catch(_0x5c0655){if(_0x5978c5['dJSxB'](_0x5c0655,ApiError)&&_0x5978c5[_0x4616ea(0x14f)](_0x5c0655['status'],0x199)){console[_0x4616ea(0x1c7)](_0x4616ea(0x173)+_0x21b518+_0x4616ea(0x1b2)+(_0x4616ea(0x1c3)+_0x21b518));throw _0x5c0655;}throw _0x5c0655;}return console['log'](_0x5978c5['KAJxU'](_0x4616ea(0x183)+_0x21b518+_0x4616ea(0x165),_0x4616ea(0x17d)+_0x21b518)),await sweepOrphansBestEffort(_0x21b518),_0x2b5643?.[_0x4616ea(0x176)](_0x5978c5[_0x4616ea(0x16e)],{'envKey':_0x219c32,'profileName':_0x21b518}),!![];}function _0xc63d(){const _0x1f25f3=['82HzmOSI','Use\x20','\x0a✓\x20Profile\x20\x27','\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','bsEhE','force','url','keys','\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20','EAtks','To\x20set\x20up\x20a\x20profile,\x20run:\x0a','\x20\x20Did\x20you\x20mean\x20','Invalid\x20--setup-header\x20format:\x20\x22','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','DiZEJ','Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','authEnv','HTTP\x20','test','\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','cwd','952116FBLcXq','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','error','zaxTP','skipAuth','environments','baseUrl','XkdMM','zugCZ','log','\x0a🌐\x20Profile\x20Setup\x0a','1311005NMEsxX','Could\x20not\x20reach\x20','OIpMB','fMgzq','status','\x0a\x20\x20No\x20auth\x20env\x20matches\x20','KsYVy','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.','21qcKVfN','qmmeS','message','prompt','dzwii','PKMVf','HJOVj','3261592GMxohK','indexOf','confirm','\x27\x20created\x20(CDP).','jORaR','6DQVkft','input','pVGys','env_not_found','setupHeaders','Found\x20auth\x20environment\x20\x27','39444955oXwHyU','Continue\x20anyway','\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20','bFePv','ycKcD','LHDzI','\x20\x20Set\x20active\x20profile:\x20','PbbJI','\x27\x20created.\x0a','slice','KAJxU','startsWith','HYwOy','\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.','env','`\x20again\x20without\x20--skip-auth.','krHaL','wywxv','ojrGW','JmRXZ','\x27\x20to\x20the\x20cloud?','includes','\x0a\x20\x20A\x20profile\x20named\x20\x22','isElectron','length','trackPhaseEnd','cdpEndpoint','9117648CFWXEm','OAZbv','fFCPD','VRSkb','.tmp-','\x20\x20Next:\x20ranger\x20go\x20--profile\x20','yes','http://localhost:3000','nAZhc','kSfxq','\x0a\x20\x20Auth\x20environment\x20\x22','✓\x20Profile\x20\x27','12vNhMIx','Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.','retry','vmOLL','signal','NODE_TLS_REJECT_UNAUTHORIZED','\x0a\x20\x20Could\x20not\x20reach\x20','dICQA','join','8rwpZnZ','\x0a\x20\x20(domains:\x20','isTTY','\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20(','cmIBp','use_suggestion','continue','mPiCA','origin','no_auth_config','UQyuR','vZEpV','Cfdya','profile.add.autoRouteSkipped','no_match','trim','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','vTJwe','\x27\x20created\x20(no\x20session).\x0a','FFZeC','\x20Configured\x20envs:\x20','svAjk','mstri','rAzfS','inrMJ','Enter\x20a\x20different\x20URL','exit','Uzlmd','profile.add.autoRouted','4701380VJlUsj','\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','20414ZrOjdw','\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22','uvQFJ'];_0xc63d=function(){return _0x1f25f3;};return _0xc63d();}async function createUnconfiguredCloudProfile(_0x4114b2,_0x453bea){const _0x4c79ec=_0x1369,_0x2c6aa0={'zaxTP':function(_0x2674a1){return _0x2674a1();},'MnINL':function(_0x1b967d,_0x3f26cb){return _0x1b967d===_0x3f26cb;}};try{await createCloudProfile(_0x4114b2,undefined,{'settings':_0x453bea}),_0x2c6aa0[_0x4c79ec(0x1c8)](warnCloudProfileSharedInOrg);}catch(_0x20dec6){_0x20dec6 instanceof ApiError&&_0x2c6aa0['MnINL'](_0x20dec6[_0x4c79ec(0x147)],0x199)&&console['error'](_0x4c79ec(0x173)+_0x4114b2+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a'+(_0x4c79ec(0x1c3)+_0x4114b2));throw _0x20dec6;}}async function captureEnvLessProfile(_0x12cd77,_0x14e4f5,_0x3fc6ac,_0xcdf1c9){const _0x4a2597=_0x1369,_0x493c4b={'YDmnn':'Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','WRdYG':_0x4a2597(0x19a),'OlRVv':'user_declined','vTOst':function(_0x55d039,_0x21652b){return _0x55d039===_0x21652b;},'bsEhE':function(_0x33a11c,_0x5efca9){return _0x33a11c>_0x5efca9;},'sMoGn':function(_0x23c7ff){return _0x23c7ff();},'FFZeC':function(_0x133ca2,_0x507979){return _0x133ca2+_0x507979;},'XkdMM':function(_0x498bf8,_0x4fce0f,_0x30ea82){return _0x498bf8(_0x4fce0f,_0x30ea82);},'pVGys':function(_0x1c4e6a,_0x1b6170){return _0x1c4e6a>_0x1b6170;},'gOirK':function(_0x3de6ef,_0x39bad6){return _0x3de6ef(_0x39bad6);}};if(!_0x3fc6ac[_0x4a2597(0x17e)]){const {capture:_0x1b1a02}=await _0x22def1[_0x4a2597(0x14e)]([{'type':'confirm','name':'capture','message':_0x493c4b['YDmnn'],'default':!![]}]);if(!_0x1b1a02)return _0xcdf1c9?.['trackPhaseEnd'](_0x493c4b['WRdYG'],{'reason':_0x493c4b['OlRVv'],'profileName':_0x12cd77}),console['error']('\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a'+_0x4a2597(0x16a)),![];}const _0x406831={};if(_0x3fc6ac['setupHeader'])for(const _0x4ebefe of _0x3fc6ac['setupHeader']){const _0x456998=_0x4ebefe[_0x4a2597(0x153)](':');if(_0x493c4b['vTOst'](_0x456998,-0x1))continue;_0x406831[_0x4ebefe['slice'](0x0,_0x456998)['trim']()]=_0x4ebefe[_0x4a2597(0x166)](_0x456998+0x1)[_0x4a2597(0x19c)]();}const _0x221f99={'baseUrl':_0x14e4f5};_0x493c4b[_0x4a2597(0x1b3)](Object['keys'](_0x406831)['length'],0x0)&&(_0x221f99[_0x4a2597(0x15b)]=_0x406831);let _0x22e5d9;try{_0x22e5d9=await createCloudProfile(_0x12cd77,undefined,{'settings':_0x221f99}),_0x493c4b['sMoGn'](warnCloudProfileSharedInOrg);}catch(_0xbb1498){_0xbb1498 instanceof ApiError&&_0xbb1498[_0x4a2597(0x147)]===0x199&&console['error'](_0x493c4b[_0x4a2597(0x1a0)]('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x12cd77+_0x4a2597(0x1b2),'\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x12cd77));throw _0xbb1498;}return await _0x493c4b[_0x4a2597(0x13f)](manualBrowserLogin,_0x22e5d9,{'key':'','domains':[_0x14e4f5],'setupHeaders':_0x493c4b[_0x4a2597(0x159)](Object[_0x4a2597(0x1b6)](_0x406831)[_0x4a2597(0x175)],0x0)?_0x406831:undefined}),console['log'](_0x493c4b['FFZeC'](_0x4a2597(0x1b1)+_0x12cd77+'\x27\x20created\x20with\x20a\x20captured\x20session.\x0a',_0x4a2597(0x17d)+_0x12cd77)),await _0x493c4b['gOirK'](sweepOrphansBestEffort,_0x12cd77),_0xcdf1c9?.[_0x4a2597(0x176)](_0x4a2597(0x1a9),{'envKey':null,'profileName':_0x12cd77}),!![];}export async function addEnv(_0x2cdbff,_0x699d06={},_0x40d5b8){const _0x3d237b=_0x1369,_0x882d66={'PNAaQ':function(_0x484e2e,_0x5534d9){return _0x484e2e+_0x5534d9;},'GYvZH':function(_0x2eedc9,_0x69be94){return _0x2eedc9+_0x69be94;},'Cfdya':function(_0x57f50a,_0x4ba546){return _0x57f50a+_0x4ba546;},'mPiCA':'The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a','ojrGW':_0x3d237b(0x1b9),'rIWeC':'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','Uzlmd':_0x3d237b(0x1bc),'qnCWq':function(_0x8e46f0,_0x56f89c){return _0x8e46f0!==_0x56f89c;},'JsGmy':function(_0x1955f5,_0x298a78){return _0x1955f5===_0x298a78;},'QEeTr':'--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','HYwOy':'--skip-auth\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20--skip-auth\x20makes\x20an\x20env-less\x20profile,\x20--env\x20binds\x20one\x20to\x20an\x20auth\x20environment.','DDeiD':_0x3d237b(0x1ab),'KsYVy':function(_0x351874,_0x51057f){return _0x351874>_0x51057f;},'OIpMB':function(_0x3ff901,_0x2392e0,_0x47e725,_0x39efd7,_0x15ef76){return _0x3ff901(_0x2392e0,_0x47e725,_0x39efd7,_0x15ef76);},'HJOVj':function(_0x1b8d81,_0x2d7fec){return _0x1b8d81 instanceof _0x2d7fec;},'vmOLL':function(_0xa0f4d5,_0x2b882b){return _0xa0f4d5(_0x2b882b);},'mZwEQ':function(_0x4af5eb,_0x3872dd){return _0x4af5eb(_0x3872dd);},'DiZEJ':function(_0x370a38,_0x3a89a5){return _0x370a38(_0x3a89a5);},'nTXTf':function(_0x69ff5,_0x4a9827){return _0x69ff5+_0x4a9827;},'kSfxq':'\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a','KfEqC':'baseUrl','qmmeS':_0x3d237b(0x1be),'eGMnt':_0x3d237b(0x17f),'VRSkb':'list','fMgzq':'action','eqTYW':_0x3d237b(0x1a6),'vZEpV':_0x3d237b(0x15e),'PqoMd':'continue','fFCPD':function(_0x5f1309,_0x1939c0,_0x2f56d7,_0x11ddc1,_0x14a614,_0x24213f){return _0x5f1309(_0x1939c0,_0x2f56d7,_0x11ddc1,_0x14a614,_0x24213f);},'rAzfS':function(_0x211a30,_0x25e9b8){return _0x211a30(_0x25e9b8);}};_0x699d06['ci']&&(console[_0x3d237b(0x1c7)](_0x882d66['PNAaQ'](_0x882d66['GYvZH'](_0x882d66[_0x3d237b(0x199)](_0x882d66[_0x3d237b(0x194)],'for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a'),'\x0a')+_0x882d66[_0x3d237b(0x16f)]+_0x882d66['rIWeC'],'\x0a')+_0x882d66[_0x3d237b(0x1a8)]+'\x20\x20https://docs.ranger.net/main/concepts/profiles'),process['exit'](0x1));const _0x576118={};if(_0x699d06['setupHeader'])for(const _0x42ee89 of _0x699d06['setupHeader']){const _0x5d3dca=_0x42ee89[_0x3d237b(0x153)](':');if(_0x5d3dca===-0x1)throw new Error(_0x3d237b(0x1bb)+_0x42ee89+'\x22.\x20Expected\x20\x22Name:\x20Value\x22.');const _0x164069=_0x42ee89['slice'](0x0,_0x5d3dca)[_0x3d237b(0x19c)](),_0x7dcf48=_0x42ee89['slice'](_0x882d66[_0x3d237b(0x199)](_0x5d3dca,0x1))['trim']();_0x576118[_0x164069]=_0x7dcf48;}if(_0x882d66['qnCWq'](_0x699d06['cdpEndpoint'],undefined)&&_0x882d66['JsGmy'](_0x699d06[_0x3d237b(0x177)]['trim'](),''))throw new Error('--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222');if(_0x699d06['cdpEndpoint']&&_0x699d06[_0x3d237b(0x1b5)])throw new Error(_0x882d66['QEeTr']);if(_0x699d06['authEnv']&&_0x699d06['skipAuth'])throw new Error(_0x882d66[_0x3d237b(0x169)]);if(_0x699d06['authEnv']&&_0x699d06[_0x3d237b(0x177)])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 _0x202d58=Boolean(_0x699d06[_0x3d237b(0x177)]),_0x239503=isInteractive();if(!_0x239503&&!_0x699d06['url']&&!_0x202d58&&!_0x699d06[_0x3d237b(0x1c9)])throw new Error(_0x3d237b(0x19d));if(_0x202d58){const _0x1908e7=_0x699d06['cdpEndpoint'];console['log'](_0x882d66['DDeiD']),console['log']('\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20'+_0x1908e7);const _0x14234d={'cdpEndpoint':_0x1908e7,'isElectron':!![]};_0x882d66[_0x3d237b(0x149)](Object['keys'](_0x576118)[_0x3d237b(0x175)],0x0)&&(_0x14234d['setupHeaders']=_0x576118);await createUnconfiguredCloudProfile(_0x2cdbff,_0x14234d);try{setProfileOverride(process['cwd'](),_0x2cdbff,_0x3d237b(0x177),_0x1908e7),_0x882d66[_0x3d237b(0x145)](setProfileOverride,process[_0x3d237b(0x1c4)](),_0x2cdbff,_0x3d237b(0x174),!![]);}catch(_0xb2b7d8){console['error']('\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20'+(_0x882d66['HJOVj'](_0xb2b7d8,Error)?_0xb2b7d8[_0x3d237b(0x14d)]:_0x882d66[_0x3d237b(0x187)](String,_0xb2b7d8)));}console[_0x3d237b(0x141)]('✓\x20Cloud\x20profile\x20\x27'+_0x2cdbff+_0x3d237b(0x155)),await _0x882d66['mZwEQ'](sweepOrphansBestEffort,_0x2cdbff),await _0x882d66['DiZEJ'](markActive,_0x2cdbff);return;}if(_0x699d06['skipAuth']){const _0x41e37e={};_0x699d06['url']&&(_0x41e37e[_0x3d237b(0x13e)]=_0x699d06[_0x3d237b(0x1b5)]);Object[_0x3d237b(0x1b6)](_0x576118)[_0x3d237b(0x175)]>0x0&&(_0x41e37e[_0x3d237b(0x15b)]=_0x576118);await createUnconfiguredCloudProfile(_0x2cdbff,_0x41e37e),console[_0x3d237b(0x141)](_0x882d66['nTXTf'](_0x3d237b(0x183)+_0x2cdbff+_0x3d237b(0x19f),_0x3d237b(0x15f)+_0x2cdbff+_0x3d237b(0x16c))),await _0x882d66['DiZEJ'](sweepOrphansBestEffort,_0x2cdbff),await markActive(_0x2cdbff);return;}if(_0x699d06['url']){const _0x4828d3=_0x699d06['url'],_0x1d5516=await checkUrlReachability(_0x4828d3);if(!_0x1d5516['ok']&&!_0x699d06[_0x3d237b(0x1b4)])throw new Error(_0x3d237b(0x144)+_0x4828d3+':\x20'+_0x1d5516[_0x3d237b(0x1c7)]+'\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.');!_0x1d5516['ok']&&_0x699d06[_0x3d237b(0x1b4)]&&console['log']('⚠\x20Could\x20not\x20reach\x20'+_0x4828d3+':\x20'+_0x1d5516[_0x3d237b(0x1c7)]+'\x20(continuing\x20with\x20--force)');}else{console[_0x3d237b(0x141)](_0x3d237b(0x142)),console[_0x3d237b(0x141)](_0x3d237b(0x1c6)),console[_0x3d237b(0x141)](_0x882d66[_0x3d237b(0x181)]);let _0x5e4db7='',_0x1d5ad2=![];while(!![]){const _0x4d301b=await _0x22def1['prompt']([{'type':_0x3d237b(0x158),'name':_0x882d66['KfEqC'],'message':_0x1d5ad2?_0x882d66[_0x3d237b(0x14c)]:'What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','default':_0x5e4db7||_0x882d66['eGMnt']}]);_0x5e4db7=_0x4d301b['baseUrl'];const _0x450afd=await checkUrlReachability(_0x5e4db7);if(_0x450afd['ok'])break;const _0x7c143e=/^[a-zA-Z][\w+.-]*:\/\//['test'](_0x5e4db7),_0x24b84a=_0x450afd['isProtocolError']&&!_0x7c143e,_0x2eec93=_0x24b84a?'http://'+_0x5e4db7:null;_0x1d5ad2=!![],console[_0x3d237b(0x141)](_0x3d237b(0x18a)+_0x5e4db7+':\x20'+_0x450afd['error']);_0x2eec93&&console[_0x3d237b(0x141)](_0x3d237b(0x1ba)+_0x2eec93+'?');const {action:_0x5cd492}=await _0x22def1['prompt']([{'type':_0x882d66[_0x3d237b(0x17b)],'name':_0x882d66[_0x3d237b(0x146)],'message':'What\x20would\x20you\x20like\x20to\x20do?','choices':[..._0x2eec93?[{'name':_0x3d237b(0x1b0)+_0x2eec93,'value':'use_suggestion'}]:[],{'name':_0x882d66['eqTYW'],'value':_0x3d237b(0x186)},{'name':_0x882d66[_0x3d237b(0x198)],'value':_0x882d66['PqoMd']}]}]);if(_0x5cd492===_0x3d237b(0x192)&&_0x2eec93){_0x5e4db7=_0x2eec93;const _0x3bd979=await checkUrlReachability(_0x5e4db7);if(_0x3bd979['ok'])break;console[_0x3d237b(0x141)]('\x0a\x20\x20Still\x20could\x20not\x20reach\x20'+_0x5e4db7+':\x20'+_0x3bd979[_0x3d237b(0x1c7)]);}else{if(_0x5cd492===_0x3d237b(0x193))break;}}_0x699d06={..._0x699d06,'url':_0x5e4db7};}let _0x395c3b=![];try{_0x395c3b=await _0x882d66[_0x3d237b(0x17a)](tryAutoRouteCloudProfile,_0x2cdbff,_0x699d06[_0x3d237b(0x1b5)],_0x699d06,_0x239503,_0x40d5b8);}catch(_0x2d723f){console[_0x3d237b(0x1c7)](_0x3d237b(0x1ad)+_0x2cdbff+'\x22:\x20'+(_0x882d66[_0x3d237b(0x151)](_0x2d723f,Error)?_0x2d723f['message']:_0x882d66[_0x3d237b(0x1bd)](String,_0x2d723f))),process['exit'](0x1);}!_0x395c3b&&process[_0x3d237b(0x1a7)](0x1),await _0x882d66[_0x3d237b(0x1a4)](markActive,_0x2cdbff);}
@@ -1 +1 @@
1
- (function(_0x3c01fb,_0x36eaaf){var _0x2d4940=_0x1988,_0x5bbab3=_0x3c01fb();while(!![]){try{var _0x56f5c6=-parseInt(_0x2d4940(0x17e))/0x1+parseInt(_0x2d4940(0x17f))/0x2*(parseInt(_0x2d4940(0x17c))/0x3)+parseInt(_0x2d4940(0x182))/0x4*(parseInt(_0x2d4940(0x179))/0x5)+-parseInt(_0x2d4940(0x184))/0x6*(-parseInt(_0x2d4940(0x18a))/0x7)+-parseInt(_0x2d4940(0x180))/0x8+-parseInt(_0x2d4940(0x187))/0x9*(parseInt(_0x2d4940(0x17a))/0xa)+-parseInt(_0x2d4940(0x188))/0xb;if(_0x56f5c6===_0x36eaaf)break;else _0x5bbab3['push'](_0x5bbab3['shift']());}catch(_0x40679a){_0x5bbab3['push'](_0x5bbab3['shift']());}}}(_0x36d7,0x3c5ff));function _0x1988(_0x5cf506,_0x447387){_0x5cf506=_0x5cf506-0x179;var _0x36d7f9=_0x36d7();var _0x1988e5=_0x36d7f9[_0x5cf506];return _0x1988e5;}function _0x36d7(){var _0x3b9ba6=['3991504GCgOKJ','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','6937pGEoig','15bJSqEV','30SbqVsl','ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','777EFaOzU','WUmKX','10146kkULCb','2570rJZkXQ','399528zFAcaW','error','378212VVOdNz','hcXRl','2124bREujn','session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a','TPvZi','891126izesLv'];_0x36d7=function(){return _0x3b9ba6;};return _0x36d7();}export async function authEncrypt(_0x213a0a){var _0x3b442c=_0x1988,_0x96229a={'WUmKX':function(_0x3d2905,_0x3d5866){return _0x3d2905+_0x3d5866;},'xYsxu':function(_0x270c45,_0x156ba1){return _0x270c45+_0x156ba1;},'hcXRl':function(_0x282000,_0x4fac23){return _0x282000+_0x4fac23;},'TPvZi':function(_0x4af8c1,_0x3dea15){return _0x4af8c1+_0x3dea15;},'tcwLW':_0x3b442c(0x189),'yfBbw':'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a'};console[_0x3b442c(0x181)](_0x96229a[_0x3b442c(0x17d)](_0x96229a['xYsxu'](_0x96229a[_0x3b442c(0x183)](_0x96229a[_0x3b442c(0x186)](_0x96229a['hcXRl'](_0x3b442c(0x17b),_0x3b442c(0x185)),'\x0a')+_0x96229a['tcwLW'],'\x20\x20ranger\x20profile\x20add\x20<name>\x0a'),'\x0a'),_0x96229a['yfBbw'])+'\x20\x20https://docs.ranger.net/main/concepts/profiles'),process['exit'](0x1);}
1
+ (function(_0x5bf2a6,_0x31aeaf){var _0x260e81=_0x5980,_0x9b7697=_0x5bf2a6();while(!![]){try{var _0x32b928=-parseInt(_0x260e81(0x105))/0x1+parseInt(_0x260e81(0xf9))/0x2+-parseInt(_0x260e81(0xfe))/0x3*(-parseInt(_0x260e81(0x104))/0x4)+-parseInt(_0x260e81(0x101))/0x5+parseInt(_0x260e81(0xff))/0x6+-parseInt(_0x260e81(0x100))/0x7+-parseInt(_0x260e81(0x108))/0x8*(parseInt(_0x260e81(0x102))/0x9);if(_0x32b928===_0x31aeaf)break;else _0x9b7697['push'](_0x9b7697['shift']());}catch(_0x54e11a){_0x9b7697['push'](_0x9b7697['shift']());}}}(_0x292c,0xdec10));export async function authEncrypt(_0x3872c4){var _0x131a4d=_0x5980,_0x573eae={'UQoEd':function(_0x8ee856,_0x6c35d8){return _0x8ee856+_0x6c35d8;},'bzoic':function(_0x5488c1,_0x3e6802){return _0x5488c1+_0x3e6802;},'xrWCO':_0x131a4d(0x106),'HUFzk':_0x131a4d(0xfc),'gqORB':_0x131a4d(0x103),'nNPSt':'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a'};console[_0x131a4d(0x109)](_0x573eae['UQoEd'](_0x573eae[_0x131a4d(0xfd)](_0x573eae[_0x131a4d(0xfd)](_0x573eae[_0x131a4d(0xfd)](_0x573eae['bzoic'](_0x573eae['xrWCO'],_0x573eae[_0x131a4d(0xfa)]),'\x0a')+_0x573eae['gqORB'],_0x131a4d(0xfb)),'\x0a')+_0x573eae['nNPSt'],_0x131a4d(0x107))),process['exit'](0x1);}function _0x5980(_0x58ec38,_0x2c7051){_0x58ec38=_0x58ec38-0xf9;var _0x292c50=_0x292c();var _0x598032=_0x292c50[_0x58ec38];return _0x598032;}function _0x292c(){var _0x26b368=['error','1701162KCcpSw','HUFzk','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a','UQoEd','741291yQfmLJ','9785760DYjoHi','3998491mxMpZd','5797105NTrxSD','2799CkJqYq','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','24kpCSci','99170HjjXMb','ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','\x20\x20https://docs.ranger.net/main/concepts/profiles','31432lMGltZ'];_0x292c=function(){return _0x26b368;};return _0x292c();}
@@ -1 +1 @@
1
- const _0x562198=_0x19ea;(function(_0x3bc797,_0x4b42c8){const _0x5cbd66=_0x19ea,_0x9f4dbe=_0x3bc797();while(!![]){try{const _0x599ed0=-parseInt(_0x5cbd66(0xfa))/0x1*(-parseInt(_0x5cbd66(0xea))/0x2)+-parseInt(_0x5cbd66(0xef))/0x3+parseInt(_0x5cbd66(0xf6))/0x4*(parseInt(_0x5cbd66(0x10a))/0x5)+parseInt(_0x5cbd66(0xf2))/0x6*(parseInt(_0x5cbd66(0x101))/0x7)+-parseInt(_0x5cbd66(0xeb))/0x8+parseInt(_0x5cbd66(0x10b))/0x9*(parseInt(_0x5cbd66(0x102))/0xa)+parseInt(_0x5cbd66(0xee))/0xb*(-parseInt(_0x5cbd66(0xf3))/0xc);if(_0x599ed0===_0x4b42c8)break;else _0x9f4dbe['push'](_0x9f4dbe['shift']());}catch(_0x382f3f){_0x9f4dbe['push'](_0x9f4dbe['shift']());}}}(_0x23ce,0xaec82));import{rm,readFile,writeFile}from'fs/promises';function _0x19ea(_0x1b6920,_0x2ddaab){_0x1b6920=_0x1b6920-0xde;const _0x23ce58=_0x23ce();let _0x19ead0=_0x23ce58[_0x1b6920];return _0x19ead0;}function _0x23ce(){const _0x4dac1b=['✓\x20Removed\x20stored\x20credentials','parse','✓\x20Removed\x20OpenCode\x20user\x20skill:\x20','✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','BSHxD','✓\x20Removed\x20trailhead\x20marketplace','replace','xRczR','✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','user','platform','pdLxA','utf-8','2vplnGe','10596392SnhXVl','jRfqy','--scope','33LXapIa','1981842DgKpDG','EqyOO','cRcPB','4686YSkyQG','1849452EYCRGB','rWGfI','tWGca','4184ZXCZQV','string','plugin','stringify','649429rvSwZZ','fJiWm','ZLjuZ','close','GAFge','RjLxj','@ranger-testing/opencode-plugin','4739GRQdFz','213260vByKCF','\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','ignore','VuQVx','project','✓\x20Removed\x20.ranger/\x20directory','GvAda','GTDHT','3985zHKsvc','486yDissN','gVABw','pNQTD','LUVbG','XWWrR','feature-tracker','log','error','e2e-test-recommender'];_0x23ce=function(){return _0x4dac1b;};return _0x23ce();}import{join}from'path';import{existsSync}from'fs';import{spawn}from'child_process';import{deleteAllCredentials}from'./utils/keychain.js';import{getProjectRoot,getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getCacheFile}from'./utils/sessionCache.js';import{getOpencodeConfigDir,getOpencodeSkillsDir}from'./utils/opencodeConfig.js';const skillsToRemove=['ranger',_0x562198(0x110),'bug-bash',_0x562198(0x113)],opencodePluginName=_0x562198(0x100);function parseJsonc(_0x31008a){const _0x46343f=_0x562198,_0x425663=_0x31008a['replace'](/\/\*[\s\S]*?\*\//g,''),_0x53f50=_0x425663['replace'](/^\s*\/\/.*$/gm,''),_0x500c1f=_0x53f50[_0x46343f(0xe3)](/,\s*([}\]])/g,'$1');return JSON[_0x46343f(0xde)](_0x500c1f);}async function removeOpencodePluginConfig(_0xa4316a){const _0x12bc55=_0x562198,_0x3af322={'GvAda':_0x12bc55(0xf7),'qjjGZ':function(_0x4f45dc,_0x27b95d){return _0x4f45dc!==_0x27b95d;},'GAFge':function(_0x485ce1,_0x114e26){return _0x485ce1(_0x114e26);}};if(!existsSync(_0xa4316a))return![];let _0x26bf7f;try{const _0x436e0e=await readFile(_0xa4316a,_0x12bc55(0xe9));_0x26bf7f=_0x3af322[_0x12bc55(0xfe)](parseJsonc,_0x436e0e);}catch{return![];}const _0x2210c7=Array['isArray'](_0x26bf7f['plugin'])?_0x26bf7f[_0x12bc55(0xf8)]:[];if(_0x2210c7['length']===0x0)return![];const _0x2008e1=_0x2210c7['filter'](_0x1fa309=>{const _0x1c7e0f=_0x12bc55;if(typeof _0x1fa309!==_0x3af322[_0x1c7e0f(0x108)])return!![];return _0x3af322['qjjGZ'](_0x1fa309,opencodePluginName);});if(_0x2008e1['length']===_0x2210c7['length'])return![];return _0x2008e1['length']===0x0?delete _0x26bf7f[_0x12bc55(0xf8)]:_0x26bf7f[_0x12bc55(0xf8)]=_0x2008e1,await writeFile(_0xa4316a,JSON[_0x12bc55(0xf9)](_0x26bf7f,null,0x2)+'\x0a'),!![];}async function uninstallClaudePlugin(_0x33c4c7){const _0xcab7c8=_0x562198,_0x56e10c={'VZVeb':'uninstall','GTDHT':'ranger@trailhead','GRNmW':_0xcab7c8(0xed),'WoKlM':_0xcab7c8(0xfd)};return new Promise(_0x3f6eda=>{const _0x24bea4=_0xcab7c8,_0x4bb28d={'Rlzpb':function(_0x57f41f,_0x446da0){return _0x57f41f(_0x446da0);},'KwihW':function(_0x47698c,_0x533ad6){return _0x47698c===_0x533ad6;}},_0x3c77d1=[_0x24bea4(0xf8),_0x56e10c['VZVeb'],_0x56e10c[_0x24bea4(0x109)]];_0x33c4c7&&_0x3c77d1['push'](_0x56e10c['GRNmW'],_0x33c4c7);const _0x5c4043=spawn('claude',_0x3c77d1,{'stdio':[_0x24bea4(0x104),'ignore','ignore'],'cwd':_0x33c4c7?getProjectRoot():undefined,'shell':process[_0x24bea4(0xe7)]==='win32'});_0x5c4043['on'](_0x56e10c['WoKlM'],_0x9aa182=>{_0x4bb28d['Rlzpb'](_0x3f6eda,_0x4bb28d['KwihW'](_0x9aa182,0x0));}),_0x5c4043['on']('error',()=>{_0x3f6eda(![]);});});}async function removeMarketplace(){const _0x250d64=_0x562198,_0x2d4659={'xQcWS':function(_0x1605a6,_0x41c975){return _0x1605a6(_0x41c975);},'zOsPa':'plugin','XWWrR':'remove','lXaiX':'trailhead','xRczR':_0x250d64(0x104),'fJiWm':_0x250d64(0xfd)};return new Promise(_0x4c9077=>{const _0x1b4555=_0x250d64,_0x714687=spawn('claude',[_0x2d4659['zOsPa'],'marketplace',_0x2d4659[_0x1b4555(0x10f)],_0x2d4659['lXaiX']],{'stdio':[_0x2d4659['xRczR'],_0x1b4555(0x104),_0x2d4659[_0x1b4555(0xe4)]],'shell':process['platform']==='win32'});_0x714687['on'](_0x2d4659[_0x1b4555(0xfb)],_0x4281e3=>{_0x4c9077(_0x4281e3===0x0);}),_0x714687['on'](_0x1b4555(0x112),()=>{_0x2d4659['xQcWS'](_0x4c9077,![]);});});}export async function clean(){const _0xacf4da=_0x562198,_0x4721ff={'EqyOO':_0xacf4da(0x103),'gVABw':function(_0x53922d){return _0x53922d();},'LUVbG':_0xacf4da(0x114),'pNQTD':function(_0x383888){return _0x383888();},'jnNqh':function(_0x1816a6,_0x427a0d,_0x28fcfb){return _0x1816a6(_0x427a0d,_0x28fcfb);},'ZLjuZ':function(_0x5b5005){return _0x5b5005();},'gERpV':function(_0x961786,_0x3b74d3,_0x49a677){return _0x961786(_0x3b74d3,_0x49a677);},'pdLxA':function(_0xb5f289){return _0xb5f289();},'VuQVx':function(_0x106079,_0x34ed9a){return _0x106079(_0x34ed9a);},'rWGfI':function(_0x4aef6b,_0x1a4723,_0x570b7b){return _0x4aef6b(_0x1a4723,_0x570b7b);},'cRcPB':_0xacf4da(0xe6),'RjLxj':'opencode.json','PSXMH':_0xacf4da(0xe5),'jRfqy':function(_0x24e8aa,_0x24e184,_0x361349){return _0x24e8aa(_0x24e184,_0x361349);},'fGBvC':_0xacf4da(0xe0),'BSHxD':function(_0x5c17b6,_0x50e4bd){return _0x5c17b6(_0x50e4bd);},'tWGca':_0xacf4da(0xe2),'GjSHO':'\x0a✅\x20Cleanup\x20complete!\x0a'};console['log'](_0x4721ff[_0xacf4da(0xf0)]);let _0x1aa5ac=![];try{await _0x4721ff[_0xacf4da(0x10c)](deleteAllCredentials),console[_0xacf4da(0x111)](_0x4721ff[_0xacf4da(0x10e)]),_0x1aa5ac=!![];}catch{}const _0x5d21a1=_0x4721ff['gVABw'](getCacheFile);existsSync(_0x5d21a1)&&(await rm(_0x5d21a1),_0x1aa5ac=!![]);const _0x55f75d=_0x4721ff[_0xacf4da(0x10d)](getRangerDir);existsSync(_0x55f75d)&&(await _0x4721ff['jnNqh'](rm,_0x55f75d,{'recursive':!![]}),console['log'](_0xacf4da(0x107)),_0x1aa5ac=!![]);const _0x244702=_0x4721ff[_0xacf4da(0xfc)](getProjectSkillsDir);for(const _0x248b45 of skillsToRemove){const _0xb31d86=join(_0x244702,_0x248b45);existsSync(_0xb31d86)&&(await _0x4721ff['gERpV'](rm,_0xb31d86,{'recursive':!![]}),console['log']('✓\x20Removed\x20project\x20skill:\x20'+_0x248b45),_0x1aa5ac=!![]);}const _0x1d2983=_0x4721ff[_0xacf4da(0xe8)](getUserSkillsDir);for(const _0x5500bb of skillsToRemove){const _0x480a5f=join(_0x1d2983,_0x5500bb);_0x4721ff['VuQVx'](existsSync,_0x480a5f)&&(await rm(_0x480a5f,{'recursive':!![]}),console[_0xacf4da(0x111)]('✓\x20Removed\x20user\x20skill:\x20'+_0x5500bb),_0x1aa5ac=!![]);}const _0x2a423b=getOpencodeSkillsDir(_0xacf4da(0x106));for(const _0x1a0a08 of skillsToRemove){const _0x47e203=_0x4721ff['rWGfI'](join,_0x2a423b,_0x1a0a08);existsSync(_0x47e203)&&(await _0x4721ff['gERpV'](rm,_0x47e203,{'recursive':!![]}),console['log']('✓\x20Removed\x20OpenCode\x20project\x20skill:\x20'+_0x1a0a08),_0x1aa5ac=!![]);}const _0x5640c0=getOpencodeSkillsDir(_0x4721ff[_0xacf4da(0xf1)]);for(const _0x1f0f77 of skillsToRemove){const _0x2fdb9e=_0x4721ff[_0xacf4da(0xf4)](join,_0x5640c0,_0x1f0f77);_0x4721ff[_0xacf4da(0x105)](existsSync,_0x2fdb9e)&&(await rm(_0x2fdb9e,{'recursive':!![]}),console[_0xacf4da(0x111)](_0xacf4da(0xdf)+_0x1f0f77),_0x1aa5ac=!![]);}const _0x2f5a48=join(getOpencodeConfigDir('project'),_0x4721ff[_0xacf4da(0xff)]);await removeOpencodePluginConfig(_0x2f5a48)&&(console['log'](_0x4721ff['PSXMH']),_0x1aa5ac=!![]);const _0x104f7d=_0x4721ff[_0xacf4da(0xec)](join,_0x4721ff['VuQVx'](getOpencodeConfigDir,_0x4721ff['cRcPB']),_0x4721ff['RjLxj']);await _0x4721ff[_0xacf4da(0x105)](removeOpencodePluginConfig,_0x104f7d)&&(console[_0xacf4da(0x111)]('✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)'),_0x1aa5ac=!![]);const _0x31e5d4=await uninstallClaudePlugin();_0x31e5d4&&(console[_0xacf4da(0x111)](_0x4721ff['fGBvC']),_0x1aa5ac=!![]);const _0x543106=await _0x4721ff[_0xacf4da(0xe1)](uninstallClaudePlugin,_0xacf4da(0x106));_0x543106&&(console[_0xacf4da(0x111)]('✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)'),_0x1aa5ac=!![]);const _0x38556e=await removeMarketplace();_0x38556e&&(console[_0xacf4da(0x111)](_0x4721ff[_0xacf4da(0xf5)]),_0x1aa5ac=!![]),_0x1aa5ac?console['log'](_0x4721ff['GjSHO']):console['log']('Nothing\x20to\x20clean\x20up.\x0a');}
1
+ const _0xf40487=_0x2bbb;(function(_0x405910,_0x36a6bd){const _0xb462f5=_0x2bbb,_0x1264ae=_0x405910();while(!![]){try{const _0x409db1=parseInt(_0xb462f5(0x1a5))/0x1*(parseInt(_0xb462f5(0x1af))/0x2)+-parseInt(_0xb462f5(0x1b9))/0x3*(parseInt(_0xb462f5(0x194))/0x4)+parseInt(_0xb462f5(0x19f))/0x5*(-parseInt(_0xb462f5(0x187))/0x6)+-parseInt(_0xb462f5(0x19d))/0x7*(parseInt(_0xb462f5(0x1a6))/0x8)+parseInt(_0xb462f5(0x1ac))/0x9+parseInt(_0xb462f5(0x18a))/0xa*(-parseInt(_0xb462f5(0x1b4))/0xb)+parseInt(_0xb462f5(0x19c))/0xc;if(_0x409db1===_0x36a6bd)break;else _0x1264ae['push'](_0x1264ae['shift']());}catch(_0x2a1ae8){_0x1264ae['push'](_0x1264ae['shift']());}}}(_0x4d7d,0xa1d34));import{rm,readFile,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{spawn}from'child_process';function _0x2bbb(_0x41487d,_0xbedc61){_0x41487d=_0x41487d-0x17f;const _0x4d7da6=_0x4d7d();let _0x2bbb91=_0x4d7da6[_0x41487d];return _0x2bbb91;}function _0x4d7d(){const _0x155e34=['27329784tpDsgy','2275IeahLF','opencode.json','5oqKVWp','Nothing\x20to\x20clean\x20up.\x0a','kCKff','log','stringify','UaTWm','2477nmJayG','6968VGfFXr','hrpXg','jZcwH','FAiaS','bXmWY','Rvpyp','6931593UtHtxH','vLhqa','bug-bash','582kOIghT','filter','xEzQw','WGQqh','XtuiR','224147apPwIr','✓\x20Removed\x20stored\x20credentials','win32','buGWW','platform','276fVivAX','close','\x0a✅\x20Cleanup\x20complete!\x0a','GNisP','KMqwM','@ranger-testing/opencode-plugin','PKdVz','error','✓\x20Removed\x20OpenCode\x20user\x20skill:\x20','6240228fyVRps','✓\x20Removed\x20project\x20skill:\x20','✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','290WBNEly','trailhead','project','jmgVT','Jozft','✓\x20Removed\x20OpenCode\x20project\x20skill:\x20','parse','utf-8','ikOni','plugin','51808uYjIXQ','length','ignore','ranger','ZUYgn','eYKAL','claude','replace'];_0x4d7d=function(){return _0x155e34;};return _0x4d7d();}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=[_0xf40487(0x197),'feature-tracker',_0xf40487(0x1ae),'e2e-test-recommender'],opencodePluginName=_0xf40487(0x183);function parseJsonc(_0x1c215d){const _0x4de69a=_0xf40487,_0x55794f=_0x1c215d[_0x4de69a(0x19b)](/\/\*[\s\S]*?\*\//g,''),_0xba656e=_0x55794f['replace'](/^\s*\/\/.*$/gm,''),_0xb89338=_0xba656e['replace'](/,\s*([}\]])/g,'$1');return JSON[_0x4de69a(0x190)](_0xb89338);}async function removeOpencodePluginConfig(_0x3fcf98){const _0x5d43db=_0xf40487,_0x51ddaf={'jZcwH':'string','ePqor':function(_0x43a2a6,_0x29d409){return _0x43a2a6!==_0x29d409;},'mdNMi':function(_0x1b84f0,_0x2dbcc0){return _0x1b84f0(_0x2dbcc0);},'Rvpyp':function(_0x4218bb,_0x424657,_0x525296){return _0x4218bb(_0x424657,_0x525296);},'kCKff':function(_0x4cfc70,_0xebd0b4){return _0x4cfc70===_0xebd0b4;},'SjHFx':function(_0x24d54a,_0x3b3109){return _0x24d54a+_0x3b3109;}};if(!_0x51ddaf['mdNMi'](existsSync,_0x3fcf98))return![];let _0x1fff4d;try{const _0x3b664b=await _0x51ddaf[_0x5d43db(0x1ab)](readFile,_0x3fcf98,_0x5d43db(0x191));_0x1fff4d=parseJsonc(_0x3b664b);}catch{return![];}const _0x2c4227=Array['isArray'](_0x1fff4d[_0x5d43db(0x193)])?_0x1fff4d['plugin']:[];if(_0x2c4227[_0x5d43db(0x195)]===0x0)return![];const _0x2e75ab=_0x2c4227[_0x5d43db(0x1b0)](_0x52c43e=>{const _0x2010bf=_0x5d43db;if(typeof _0x52c43e!==_0x51ddaf[_0x2010bf(0x1a8)])return!![];return _0x51ddaf['ePqor'](_0x52c43e,opencodePluginName);});if(_0x51ddaf['kCKff'](_0x2e75ab['length'],_0x2c4227[_0x5d43db(0x195)]))return![];return _0x51ddaf[_0x5d43db(0x1a1)](_0x2e75ab['length'],0x0)?delete _0x1fff4d['plugin']:_0x1fff4d[_0x5d43db(0x193)]=_0x2e75ab,await writeFile(_0x3fcf98,_0x51ddaf['SjHFx'](JSON[_0x5d43db(0x1a3)](_0x1fff4d,null,0x2),'\x0a')),!![];}async function uninstallClaudePlugin(_0x50a91a){const _0x15d421=_0xf40487,_0x1f2bdf={'GNisP':function(_0x46c707,_0x4f8201){return _0x46c707===_0x4f8201;},'PKdVz':'uninstall','ikOni':'ranger@trailhead','vLhqa':'--scope','buGWW':_0x15d421(0x196),'hOrkc':function(_0x279d05){return _0x279d05();},'Bhtwx':_0x15d421(0x17f),'RUOLp':_0x15d421(0x185)};return new Promise(_0x3fe021=>{const _0x35557d=_0x15d421,_0x344206=[_0x35557d(0x193),_0x1f2bdf[_0x35557d(0x184)],_0x1f2bdf[_0x35557d(0x192)]];_0x50a91a&&_0x344206['push'](_0x1f2bdf[_0x35557d(0x1ad)],_0x50a91a);const _0x58a0c1=spawn('claude',_0x344206,{'stdio':['ignore',_0x1f2bdf[_0x35557d(0x1b7)],_0x1f2bdf['buGWW']],'cwd':_0x50a91a?_0x1f2bdf['hOrkc'](getProjectRoot):undefined,'shell':process[_0x35557d(0x1b8)]==='win32'});_0x58a0c1['on'](_0x1f2bdf['Bhtwx'],_0x220e19=>{const _0x2d6642=_0x35557d;_0x3fe021(_0x1f2bdf[_0x2d6642(0x181)](_0x220e19,0x0));}),_0x58a0c1['on'](_0x1f2bdf['RUOLp'],()=>{_0x3fe021(![]);});});}async function removeMarketplace(){const _0x3d9ebf=_0xf40487,_0x5ddf73={'tCqjd':function(_0x3a351c,_0x1fa13c){return _0x3a351c===_0x1fa13c;},'ZUYgn':function(_0x28145b,_0x2908ea,_0x1b8eb9,_0x6501c9){return _0x28145b(_0x2908ea,_0x1b8eb9,_0x6501c9);},'KMqwM':_0x3d9ebf(0x19a),'bXmWY':_0x3d9ebf(0x193),'WGQqh':'ignore','FAiaS':_0x3d9ebf(0x1b6)};return new Promise(_0x16622f=>{const _0x4be36f=_0x3d9ebf,_0x203f74={'UaTWm':function(_0x4ab1e6,_0x58fe96){return _0x5ddf73['tCqjd'](_0x4ab1e6,_0x58fe96);}},_0x1de706=_0x5ddf73[_0x4be36f(0x198)](spawn,_0x5ddf73[_0x4be36f(0x182)],[_0x5ddf73[_0x4be36f(0x1aa)],'marketplace','remove',_0x4be36f(0x18b)],{'stdio':[_0x5ddf73[_0x4be36f(0x1b2)],_0x5ddf73[_0x4be36f(0x1b2)],_0x5ddf73[_0x4be36f(0x1b2)]],'shell':process['platform']===_0x5ddf73[_0x4be36f(0x1a9)]});_0x1de706['on'](_0x4be36f(0x17f),_0x7442a5=>{const _0x1b2151=_0x4be36f;_0x16622f(_0x203f74[_0x1b2151(0x1a4)](_0x7442a5,0x0));}),_0x1de706['on']('error',()=>{_0x16622f(![]);});});}export async function clean(){const _0x2e3420=_0xf40487,_0xc50681={'kMjju':'\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','PYNnW':function(_0x26bc27,_0x25842c){return _0x26bc27(_0x25842c);},'hrpXg':function(_0x377f60,_0x58467f,_0x512b02){return _0x377f60(_0x58467f,_0x512b02);},'HYPEL':function(_0x333936,_0x4650d1,_0x505863){return _0x333936(_0x4650d1,_0x505863);},'eYKAL':function(_0x587fc9,_0x17edc7,_0x4cae2c){return _0x587fc9(_0x17edc7,_0x4cae2c);},'xEzQw':function(_0x408742){return _0x408742();},'GwJrq':function(_0x48bd1f,_0x15d9e3,_0x191fbc){return _0x48bd1f(_0x15d9e3,_0x191fbc);},'CnlPK':function(_0xf7a0b1,_0x3fcd28,_0x573303){return _0xf7a0b1(_0x3fcd28,_0x573303);},'CmKqU':function(_0x26a6b1,_0x31b98e){return _0x26a6b1(_0x31b98e);},'NLsdw':function(_0x432fc2,_0x4f1755,_0x339c83){return _0x432fc2(_0x4f1755,_0x339c83);},'DNDDK':function(_0x1379c7,_0x534f38){return _0x1379c7(_0x534f38);},'Jozft':function(_0x5dbc91,_0x5369b2){return _0x5dbc91(_0x5369b2);},'jmgVT':_0x2e3420(0x19e),'FweuL':'✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','VCRvG':function(_0x3f9b55,_0x174e68){return _0x3f9b55(_0x174e68);},'hEgRq':_0x2e3420(0x18c),'XtuiR':_0x2e3420(0x189)};console[_0x2e3420(0x1a2)](_0xc50681['kMjju']);let _0x14314e=![];try{await deleteAllCredentials(),console['log'](_0x2e3420(0x1b5)),_0x14314e=!![];}catch{}const _0x51e904=getCacheFile();existsSync(_0x51e904)&&(await rm(_0x51e904),_0x14314e=!![]);const _0x5d40ee=getRangerDir();_0xc50681['PYNnW'](existsSync,_0x5d40ee)&&(await _0xc50681[_0x2e3420(0x1a7)](rm,_0x5d40ee,{'recursive':!![]}),console['log']('✓\x20Removed\x20.ranger/\x20directory'),_0x14314e=!![]);const _0x397f7f=getProjectSkillsDir();for(const _0x551c1f of skillsToRemove){const _0x38b0a4=_0xc50681['HYPEL'](join,_0x397f7f,_0x551c1f);_0xc50681['PYNnW'](existsSync,_0x38b0a4)&&(await _0xc50681[_0x2e3420(0x199)](rm,_0x38b0a4,{'recursive':!![]}),console[_0x2e3420(0x1a2)](_0x2e3420(0x188)+_0x551c1f),_0x14314e=!![]);}const _0x356c78=_0xc50681['xEzQw'](getUserSkillsDir);for(const _0x152661 of skillsToRemove){const _0x366b4e=_0xc50681['GwJrq'](join,_0x356c78,_0x152661);_0xc50681['PYNnW'](existsSync,_0x366b4e)&&(await _0xc50681['CnlPK'](rm,_0x366b4e,{'recursive':!![]}),console['log']('✓\x20Removed\x20user\x20skill:\x20'+_0x152661),_0x14314e=!![]);}const _0x1fad6a=getOpencodeSkillsDir('project');for(const _0x8153e of skillsToRemove){const _0x291f66=join(_0x1fad6a,_0x8153e);_0xc50681['CmKqU'](existsSync,_0x291f66)&&(await _0xc50681['NLsdw'](rm,_0x291f66,{'recursive':!![]}),console['log'](_0x2e3420(0x18f)+_0x8153e),_0x14314e=!![]);}const _0x5ba9a8=_0xc50681['DNDDK'](getOpencodeSkillsDir,'user');for(const _0xfcb453 of skillsToRemove){const _0xe225fd=_0xc50681['NLsdw'](join,_0x5ba9a8,_0xfcb453);existsSync(_0xe225fd)&&(await rm(_0xe225fd,{'recursive':!![]}),console[_0x2e3420(0x1a2)](_0x2e3420(0x186)+_0xfcb453),_0x14314e=!![]);}const _0x11f1bc=_0xc50681['HYPEL'](join,_0xc50681[_0x2e3420(0x18e)](getOpencodeConfigDir,_0x2e3420(0x18c)),_0xc50681['jmgVT']);await removeOpencodePluginConfig(_0x11f1bc)&&(console['log'](_0xc50681['FweuL']),_0x14314e=!![]);const _0x37c8fa=join(getOpencodeConfigDir('user'),_0xc50681[_0x2e3420(0x18d)]);await _0xc50681['VCRvG'](removeOpencodePluginConfig,_0x37c8fa)&&(console['log']('✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)'),_0x14314e=!![]);const _0x2aa1f6=await _0xc50681['xEzQw'](uninstallClaudePlugin);_0x2aa1f6&&(console[_0x2e3420(0x1a2)]('✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)'),_0x14314e=!![]);const _0x786987=await uninstallClaudePlugin(_0xc50681['hEgRq']);_0x786987&&(console['log'](_0xc50681[_0x2e3420(0x1b3)]),_0x14314e=!![]);const _0x4ba3b0=await _0xc50681[_0x2e3420(0x1b1)](removeMarketplace);_0x4ba3b0&&(console[_0x2e3420(0x1a2)]('✓\x20Removed\x20trailhead\x20marketplace'),_0x14314e=!![]),_0x14314e?console['log'](_0x2e3420(0x180)):console['log'](_0x2e3420(0x1a0));}
@@ -1 +1 @@
1
- (function(_0x51954d,_0x3a18ed){const _0x49c9f2=_0x5450,_0x5e3908=_0x51954d();while(!![]){try{const _0x50fa5b=-parseInt(_0x49c9f2(0x11e))/0x1+-parseInt(_0x49c9f2(0xfd))/0x2*(parseInt(_0x49c9f2(0x10c))/0x3)+parseInt(_0x49c9f2(0x10a))/0x4+-parseInt(_0x49c9f2(0x10e))/0x5*(parseInt(_0x49c9f2(0xfa))/0x6)+parseInt(_0x49c9f2(0x106))/0x7+-parseInt(_0x49c9f2(0x12b))/0x8*(-parseInt(_0x49c9f2(0x107))/0x9)+-parseInt(_0x49c9f2(0x12a))/0xa*(-parseInt(_0x49c9f2(0xfb))/0xb);if(_0x50fa5b===_0x3a18ed)break;else _0x5e3908['push'](_0x5e3908['shift']());}catch(_0x3f0d6c){_0x5e3908['push'](_0x5e3908['shift']());}}}(_0x2658,0x40ebb));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(_0x278bc2,_0x3d7f8f){const _0x560944=_0x5450,_0x3b6839={'EZxxV':'false'};if(BOOLEAN_KEYS['includes'](_0x278bc2)){if(_0x3d7f8f===_0x560944(0x128))return!![];if(_0x3d7f8f===_0x3b6839['EZxxV'])return![];throw new Error(_0x560944(0x119)+_0x278bc2+_0x560944(0x117));}return _0x3d7f8f;}function parseOverrideValue(_0x17642d){const _0x35c2ca=_0x5450,_0x1d8178={'qKspA':function(_0x37f2da,_0x485905){return _0x37f2da===_0x485905;},'voVvA':_0x35c2ca(0x10b),'jsFIr':_0x35c2ca(0x11c),'pdBCM':function(_0x3c14d0,_0x3562e9){return _0x3c14d0(_0x3562e9);}};if(_0x17642d===_0x35c2ca(0x128))return!![];if(_0x1d8178[_0x35c2ca(0x12d)](_0x17642d,_0x1d8178['voVvA']))return![];if(_0x1d8178['qKspA'](_0x17642d,'null'))return null;if(_0x17642d===_0x1d8178[_0x35c2ca(0x132)])return undefined;if(/^-?\d+$/[_0x35c2ca(0x116)](_0x17642d)){const _0x3dd280=_0x1d8178[_0x35c2ca(0x112)](Number,_0x17642d);if(Number['isSafeInteger'](_0x3dd280))return _0x3dd280;}if(/^-?\d+\.\d+$/['test'](_0x17642d)){const _0x23c3ac=Number(_0x17642d);if(!Number['isNaN'](_0x23c3ac))return _0x23c3ac;}const _0x3c5a74=_0x17642d[_0x35c2ca(0x127)]();if(_0x3c5a74[_0x35c2ca(0x113)]('{')&&_0x3c5a74[_0x35c2ca(0x101)]('}')||_0x3c5a74['startsWith']('[')&&_0x3c5a74['endsWith'](']'))try{return JSON['parse'](_0x3c5a74);}catch{}return _0x17642d;}async function resolveProfileTarget(_0x3ba72d){const _0x50a76c=_0x5450,_0x63117={'gBznH':function(_0xe1f252,_0x44dc13){return _0xe1f252(_0x44dc13);},'oYdYJ':'cloud','zoInX':'local'},_0x1ca4a8=existsSync(_0x63117['gBznH'](getEnvDir,_0x3ba72d));let _0x40fc52=![];try{const _0x3edc25=await _0x63117['gBznH'](fetchCloudProfile,_0x3ba72d);_0x40fc52=_0x63117[_0x50a76c(0x122)](Boolean,_0x3edc25);}catch{}if(_0x40fc52)return{'kind':_0x63117[_0x50a76c(0xfc)],'alsoExistsElsewhere':_0x1ca4a8};if(_0x1ca4a8)return{'kind':_0x63117[_0x50a76c(0xf9)],'alsoExistsElsewhere':![]};throw new Error(_0x50a76c(0xff)+_0x3ba72d+_0x50a76c(0x11b)+_0x3ba72d);}function printDualExistsHint(_0x107836){const _0x282a9e=_0x5450;console[_0x282a9e(0x125)](_0x282a9e(0x103)+_0x107836+_0x282a9e(0x10d));}function getProjectPath(){return process['cwd']();}async function loadEffectiveCloudSettings(_0x3e1ec2){const _0x3b9587=_0x5450,_0x5d0418={'HaYwr':function(_0x50f7d0,_0x28f676){return _0x50f7d0(_0x28f676);},'TKgZy':function(_0x1f2156,_0x3260db,_0x89fe4c){return _0x1f2156(_0x3260db,_0x89fe4c);},'fsWhK':function(_0x2fb4b3,_0x6ecad0){return _0x2fb4b3??_0x6ecad0;}},_0x28ce3f=await _0x5d0418[_0x3b9587(0xf8)](fetchCloudProfile,_0x3e1ec2),_0x1783c8=_0x5d0418['TKgZy'](readProfileOverrides,getProjectPath(),_0x3e1ec2);return mergeCloudProfileSettings(_0x28ce3f?.['settings']??{},_0x5d0418['fsWhK'](_0x1783c8,undefined));}export async function configSet(_0xf22639,_0x160d34,_0x5d170b){const _0x4e93c6=_0x5450,_0x53755d={'LWoec':function(_0x1e2c2e,_0x54813d){return _0x1e2c2e===_0x54813d;},'qWwZS':'cloud','HiVUF':function(_0x4ce920,_0x3f4049){return _0x4ce920(_0x3f4049);},'wbqtV':function(_0x1d73e5){return _0x1d73e5();},'hYXce':function(_0x63a0c5,_0x203d6d,_0x33df73,_0x5abe64,_0x1d18e9){return _0x63a0c5(_0x203d6d,_0x33df73,_0x5abe64,_0x1d18e9);},'fyLVF':function(_0x57e725){return _0x57e725();}},_0x22a905=await resolveProfileTarget(_0xf22639);if(_0x53755d[_0x4e93c6(0x129)](_0x22a905[_0x4e93c6(0x121)],_0x53755d[_0x4e93c6(0x105)])){if(_0x22a905['alsoExistsElsewhere'])_0x53755d[_0x4e93c6(0x133)](printDualExistsHint,_0xf22639);const _0x4792aa=parseOverrideValue(_0x5d170b);setProfileOverride(_0x53755d[_0x4e93c6(0x126)](getProjectPath),_0xf22639,_0x160d34,_0x4792aa),console['log']('Set\x20'+_0x160d34+_0x4e93c6(0x118)+JSON[_0x4e93c6(0x100)](_0x4792aa)+_0x4e93c6(0x123)+_0xf22639+'\x22');return;}const _0x712161=parseLocalValue(_0x160d34,_0x5d170b);_0x53755d[_0x4e93c6(0x11f)](setProfileOverride,_0x53755d[_0x4e93c6(0x111)](getProjectPath),_0xf22639,_0x160d34,_0x712161),console['log'](_0x4e93c6(0x108)+_0x160d34+_0x4e93c6(0x118)+_0x712161+_0x4e93c6(0x123)+_0xf22639+'\x22');}export async function configGet(_0x4edfd0,_0x52500c){const _0x1bfce7=_0x5450,_0x506211={'pEkPk':function(_0x4f04cc,_0x5c38c7){return _0x4f04cc===_0x5c38c7;},'BbQOI':function(_0x5abaf4,_0x2da7a0){return _0x5abaf4(_0x2da7a0);}},_0x1fe0d8=await resolveProfileTarget(_0x4edfd0);if(_0x506211[_0x1bfce7(0x115)](_0x1fe0d8['kind'],_0x1bfce7(0x104))){const _0x24b97f=await loadEffectiveCloudSettings(_0x4edfd0),_0x55a65c=getNestedValue(_0x24b97f,_0x52500c);if(_0x55a65c===undefined)console['log'](_0x1bfce7(0x130));else _0x506211[_0x1bfce7(0x115)](typeof _0x55a65c,'object')?console[_0x1bfce7(0x125)](JSON['stringify'](_0x55a65c,null,0x2)):console[_0x1bfce7(0x125)](_0x55a65c);return;}const _0x34607c=await _0x506211[_0x1bfce7(0x11a)](loadSettings,_0x4edfd0),_0x1d7ea5=getNestedValue(_0x34607c,_0x52500c);if(_0x1d7ea5===undefined)console['log'](_0x1bfce7(0x130));else _0x506211['pEkPk'](typeof _0x1d7ea5,_0x1bfce7(0x110))?console[_0x1bfce7(0x125)](JSON[_0x1bfce7(0x100)](_0x1d7ea5,null,0x2)):console['log'](_0x1d7ea5);}function _0x5450(_0x372a9c,_0x5b9d29){_0x372a9c=_0x372a9c-0xf8;const _0x2658ea=_0x2658();let _0x54502c=_0x2658ea[_0x372a9c];return _0x54502c;}export async function configList(_0x398b3c){const _0x2461ca=_0x5450,_0x29b1b7={'dfxbr':function(_0x35ce37,_0x37d74e){return _0x35ce37(_0x37d74e);}},_0x1e3471=await _0x29b1b7[_0x2461ca(0x10f)](resolveProfileTarget,_0x398b3c);if(_0x1e3471[_0x2461ca(0x121)]==='cloud'){const _0x4ad38e=await _0x29b1b7['dfxbr'](loadEffectiveCloudSettings,_0x398b3c);if(!_0x4ad38e||Object['keys'](_0x4ad38e)['length']===0x0){console['log']('No\x20configuration\x20set\x20for\x20\x22'+_0x398b3c+'\x22');return;}console[_0x2461ca(0x125)](JSON[_0x2461ca(0x100)](_0x4ad38e,null,0x2));return;}const _0x1301cd=getSettingsPath(_0x398b3c);if(!existsSync(_0x1301cd)){console['log'](_0x2461ca(0x11d)+_0x398b3c+'\x22');return;}const _0x4bcfd8=await loadSettings(_0x398b3c),_0x59187b=formatSettings(_0x4bcfd8);!_0x59187b?console['log'](_0x2461ca(0x11d)+_0x398b3c+'\x22'):console['log'](_0x59187b);}function _0x2658(){const _0x419c95=['poggq','qKspA','ZihRi','\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20','(not\x20set)','\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22','jsFIr','HiVUF','HaYwr','zoInX','6agIKWr','60269RjqjLj','oYdYJ','509254daznxk','Removed\x20','Profile\x20\x22','stringify','endsWith','\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.','\x20\x20Note:\x20\x22','cloud','qWwZS','2747066NtzLOZ','18AEYDra','Set\x20','alsoExistsElsewhere','1113076bGOGIJ','false','3COXmqa','\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.','588515dyPTON','dfxbr','object','fyLVF','pdBCM','startsWith','eMLEY','pEkPk','test',':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22','\x20=\x20','Invalid\x20value\x20for\x20','BbQOI','\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20','undefined','No\x20configuration\x20set\x20for\x20\x22','89601sXykRI','hYXce','CorHW','kind','gBznH','\x20for\x20\x22','Key\x20\x22','log','wbqtV','trim','true','LWoec','30zkiCFM','162808kHIZeT'];_0x2658=function(){return _0x419c95;};return _0x2658();}export async function configUnset(_0x2b1bcb,_0xbb406c){const _0x49e38a=_0x5450,_0x4b889d={'poggq':function(_0x785e53,_0x190034){return _0x785e53===_0x190034;},'cnYZh':_0x49e38a(0x104),'CorHW':function(_0x3754e3,_0x41e803){return _0x3754e3(_0x41e803);},'ZihRi':function(_0x7f8d4c,_0x2eb407,_0x2b124b,_0x271c06){return _0x7f8d4c(_0x2eb407,_0x2b124b,_0x271c06);},'eMLEY':function(_0x3457d6,_0x585673,_0x39a23e){return _0x3457d6(_0x585673,_0x39a23e);}},_0x21e4fd=await resolveProfileTarget(_0x2b1bcb);if(_0x4b889d[_0x49e38a(0x12c)](_0x21e4fd['kind'],_0x4b889d['cnYZh'])){if(_0x21e4fd[_0x49e38a(0x109)])_0x4b889d[_0x49e38a(0x120)](printDualExistsHint,_0x2b1bcb);const _0x4ab226=_0x4b889d[_0x49e38a(0x12e)](unsetProfileOverride,getProjectPath(),_0x2b1bcb,_0xbb406c);_0x4ab226?console[_0x49e38a(0x125)]('Removed\x20'+_0xbb406c+'\x20for\x20\x22'+_0x2b1bcb+'\x22'):console[_0x49e38a(0x125)](_0x49e38a(0x124)+_0xbb406c+'\x22\x20not\x20found');return;}const _0x5dace2=unsetProfileOverride(getProjectPath(),_0x2b1bcb,_0xbb406c);if(_0x5dace2){console['log'](_0x49e38a(0xfe)+_0xbb406c);return;}const _0x5279c2=await loadSettings(_0x2b1bcb),_0xfd5b18=_0x4b889d[_0x49e38a(0x114)](deleteNestedValue,_0x5279c2,_0xbb406c);_0xfd5b18?console['log']('Key\x20\x22'+_0xbb406c+_0x49e38a(0x131)+_0x2b1bcb+_0x49e38a(0x102)):console['log'](_0x49e38a(0x124)+_0xbb406c+'\x22\x20not\x20found');}export async function configReset(_0x453178){const _0x1f3337=_0x5450,_0x518b22=await resolveProfileTarget(_0x453178);if(_0x518b22[_0x1f3337(0x121)]==='cloud'){resetProfileOverrides(getProjectPath(),_0x453178),console[_0x1f3337(0x125)]('Cleared\x20local\x20overrides\x20for\x20\x22'+_0x453178+'\x22');return;}console[_0x1f3337(0x125)]('\x22'+_0x453178+_0x1f3337(0x12f)+_0x453178+'\x20<key>\x22\x20to\x20remove\x20individual\x20values.');}
1
+ const _0x5fcee1=_0xca7e;(function(_0x3055d8,_0x381c1c){const _0x39cf41=_0xca7e,_0x442a7c=_0x3055d8();while(!![]){try{const _0x1dcd73=parseInt(_0x39cf41(0x142))/0x1+-parseInt(_0x39cf41(0x14c))/0x2+parseInt(_0x39cf41(0x12b))/0x3+parseInt(_0x39cf41(0x131))/0x4*(-parseInt(_0x39cf41(0x147))/0x5)+parseInt(_0x39cf41(0x13d))/0x6*(-parseInt(_0x39cf41(0x141))/0x7)+parseInt(_0x39cf41(0x148))/0x8+parseInt(_0x39cf41(0x134))/0x9*(parseInt(_0x39cf41(0x124))/0xa);if(_0x1dcd73===_0x381c1c)break;else _0x442a7c['push'](_0x442a7c['shift']());}catch(_0x4ef7ec){_0x442a7c['push'](_0x442a7c['shift']());}}}(_0x2dc3,0x8d217));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=[_0x5fcee1(0x143),_0x5fcee1(0x132),_0x5fcee1(0x139)];function parseLocalValue(_0x22cba1,_0x1584df){const _0x55852e=_0x5fcee1,_0x216300={'tEKOA':function(_0x41f070,_0x1eaaf6){return _0x41f070===_0x1eaaf6;},'bhjMe':function(_0x11f957,_0x15d5d6){return _0x11f957===_0x15d5d6;}};if(BOOLEAN_KEYS[_0x55852e(0x12e)](_0x22cba1)){if(_0x216300['tEKOA'](_0x1584df,'true'))return!![];if(_0x216300['bhjMe'](_0x1584df,'false'))return![];throw new Error('Invalid\x20value\x20for\x20'+_0x22cba1+_0x55852e(0x144));}return _0x1584df;}function parseOverrideValue(_0x93b37d){const _0xf15f6a=_0x5fcee1,_0xbd06f4={'aCjtz':function(_0x4fc3b8,_0x20974a){return _0x4fc3b8===_0x20974a;},'KvFuf':'false','WIQJd':function(_0x3fe19b,_0x406d98){return _0x3fe19b===_0x406d98;},'WEOZC':'null','SoFoT':_0xf15f6a(0x11d)};if(_0xbd06f4[_0xf15f6a(0x130)](_0x93b37d,_0xf15f6a(0x11e)))return!![];if(_0x93b37d===_0xbd06f4[_0xf15f6a(0x12f)])return![];if(_0xbd06f4[_0xf15f6a(0x152)](_0x93b37d,_0xbd06f4['WEOZC']))return null;if(_0x93b37d===_0xbd06f4['SoFoT'])return undefined;if(/^-?\d+$/['test'](_0x93b37d)){const _0x1bae3b=Number(_0x93b37d);if(Number[_0xf15f6a(0x12a)](_0x1bae3b))return _0x1bae3b;}if(/^-?\d+\.\d+$/[_0xf15f6a(0x140)](_0x93b37d)){const _0x49e6d3=Number(_0x93b37d);if(!Number[_0xf15f6a(0x11b)](_0x49e6d3))return _0x49e6d3;}const _0x2f46a7=_0x93b37d['trim']();if(_0x2f46a7['startsWith']('{')&&_0x2f46a7[_0xf15f6a(0x13f)]('}')||_0x2f46a7[_0xf15f6a(0x13c)]('[')&&_0x2f46a7['endsWith'](']'))try{return JSON[_0xf15f6a(0x150)](_0x2f46a7);}catch{}return _0x93b37d;}function _0xca7e(_0x2a148b,_0xbc564e){_0x2a148b=_0x2a148b-0x11a;const _0x2dc37d=_0x2dc3();let _0xca7ef2=_0x2dc37d[_0x2a148b];return _0xca7ef2;}async function resolveProfileTarget(_0x45de5e){const _0xff697a=_0x5fcee1,_0xf1728a={'tIPnQ':function(_0xa1c96c,_0xc98273){return _0xa1c96c(_0xc98273);},'PdebS':_0xff697a(0x121)},_0x3b5e9f=existsSync(getEnvDir(_0x45de5e));let _0x47c3ab=![];try{const _0x537bed=await fetchCloudProfile(_0x45de5e);_0x47c3ab=_0xf1728a[_0xff697a(0x126)](Boolean,_0x537bed);}catch{}if(_0x47c3ab)return{'kind':_0xff697a(0x138),'alsoExistsElsewhere':_0x3b5e9f};if(_0x3b5e9f)return{'kind':_0xf1728a['PdebS'],'alsoExistsElsewhere':![]};throw new Error('Profile\x20\x22'+_0x45de5e+'\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20'+_0x45de5e);}function printDualExistsHint(_0x56b8ad){const _0x1862b9=_0x5fcee1;console['log'](_0x1862b9(0x145)+_0x56b8ad+'\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.');}function getProjectPath(){return process['cwd']();}async function loadEffectiveCloudSettings(_0x4defd8){const _0x244d17=_0x5fcee1,_0x5cc003={'XGnJs':function(_0x11b005,_0x25b760,_0x1548d7){return _0x11b005(_0x25b760,_0x1548d7);},'VMxnM':function(_0x3eb3b8){return _0x3eb3b8();}},_0x24879a=await fetchCloudProfile(_0x4defd8),_0x2a979a=_0x5cc003[_0x244d17(0x12d)](readProfileOverrides,_0x5cc003[_0x244d17(0x153)](getProjectPath),_0x4defd8);return mergeCloudProfileSettings(_0x24879a?.['settings']??{},_0x2a979a??undefined);}export async function configSet(_0x7f8149,_0x581153,_0x3a16f2){const _0x520342=_0x5fcee1,_0x4f095c={'dxebs':function(_0xb0ef48,_0x83512){return _0xb0ef48===_0x83512;},'GypmG':_0x520342(0x138),'GsfuA':function(_0x4b19ca,_0xfdc5db){return _0x4b19ca(_0xfdc5db);},'yNHKu':function(_0x298092,_0x266ccd,_0x3226c1){return _0x298092(_0x266ccd,_0x3226c1);},'ZQteE':function(_0x15e494){return _0x15e494();}},_0x203f8e=await resolveProfileTarget(_0x7f8149);if(_0x4f095c[_0x520342(0x14f)](_0x203f8e[_0x520342(0x137)],_0x4f095c[_0x520342(0x128)])){if(_0x203f8e[_0x520342(0x13e)])_0x4f095c[_0x520342(0x125)](printDualExistsHint,_0x7f8149);const _0x3968a0=parseOverrideValue(_0x3a16f2);setProfileOverride(getProjectPath(),_0x7f8149,_0x581153,_0x3968a0),console['log']('Set\x20'+_0x581153+_0x520342(0x13b)+JSON['stringify'](_0x3968a0)+'\x20for\x20\x22'+_0x7f8149+'\x22');return;}const _0x20e5b7=_0x4f095c['yNHKu'](parseLocalValue,_0x581153,_0x3a16f2);setProfileOverride(_0x4f095c['ZQteE'](getProjectPath),_0x7f8149,_0x581153,_0x20e5b7),console[_0x520342(0x120)](_0x520342(0x151)+_0x581153+_0x520342(0x13b)+_0x20e5b7+_0x520342(0x127)+_0x7f8149+'\x22');}export async function configGet(_0x5f268a,_0x1af1b3){const _0x1bf25c=_0x5fcee1,_0x6e3e={'ndXir':function(_0x50c356,_0xbc8a16){return _0x50c356===_0xbc8a16;},'rwWcR':'cloud','zNmaO':function(_0x11b6ce,_0x5e1dc7){return _0x11b6ce===_0x5e1dc7;},'PxFDK':_0x1bf25c(0x149),'KwYoz':function(_0x1abf7c,_0x4174db){return _0x1abf7c===_0x4174db;}},_0x2ec4c9=await resolveProfileTarget(_0x5f268a);if(_0x6e3e['ndXir'](_0x2ec4c9[_0x1bf25c(0x137)],_0x6e3e[_0x1bf25c(0x135)])){const _0x316218=await loadEffectiveCloudSettings(_0x5f268a),_0x1504ed=getNestedValue(_0x316218,_0x1af1b3);if(_0x1504ed===undefined)console[_0x1bf25c(0x120)]('(not\x20set)');else _0x6e3e[_0x1bf25c(0x154)](typeof _0x1504ed,_0x6e3e[_0x1bf25c(0x146)])?console[_0x1bf25c(0x120)](JSON[_0x1bf25c(0x129)](_0x1504ed,null,0x2)):console['log'](_0x1504ed);return;}const _0x442118=await loadSettings(_0x5f268a),_0x2ed332=getNestedValue(_0x442118,_0x1af1b3);if(_0x2ed332===undefined)console['log']('(not\x20set)');else _0x6e3e['KwYoz'](typeof _0x2ed332,_0x1bf25c(0x149))?console[_0x1bf25c(0x120)](JSON[_0x1bf25c(0x129)](_0x2ed332,null,0x2)):console['log'](_0x2ed332);}export async function configList(_0x40d435){const _0x40c4ce=_0x5fcee1,_0x2d6607={'niAUn':function(_0x4c0577,_0x380966){return _0x4c0577(_0x380966);},'HHMTi':function(_0x57d5a3,_0x433850){return _0x57d5a3(_0x433850);},'ySCnA':function(_0x7e89b9,_0x1bd65d){return _0x7e89b9===_0x1bd65d;},'SurGK':function(_0x432f4f,_0x4f8f25){return _0x432f4f(_0x4f8f25);}},_0x340b4e=await _0x2d6607[_0x40c4ce(0x123)](resolveProfileTarget,_0x40d435);if(_0x340b4e[_0x40c4ce(0x137)]===_0x40c4ce(0x138)){const _0x3b2f5a=await _0x2d6607[_0x40c4ce(0x13a)](loadEffectiveCloudSettings,_0x40d435);if(!_0x3b2f5a||_0x2d6607['ySCnA'](Object['keys'](_0x3b2f5a)[_0x40c4ce(0x11c)],0x0)){console[_0x40c4ce(0x120)](_0x40c4ce(0x14d)+_0x40d435+'\x22');return;}console[_0x40c4ce(0x120)](JSON['stringify'](_0x3b2f5a,null,0x2));return;}const _0xd33134=_0x2d6607['SurGK'](getSettingsPath,_0x40d435);if(!existsSync(_0xd33134)){console[_0x40c4ce(0x120)](_0x40c4ce(0x14d)+_0x40d435+'\x22');return;}const _0x1ad88d=await loadSettings(_0x40d435),_0x88934c=formatSettings(_0x1ad88d);!_0x88934c?console['log'](_0x40c4ce(0x14d)+_0x40d435+'\x22'):console[_0x40c4ce(0x120)](_0x88934c);}export async function configUnset(_0x19cb05,_0x4a330e){const _0x5b87e1=_0x5fcee1,_0x21eb61={'ggEEg':function(_0x1067f7,_0xb6da65){return _0x1067f7(_0xb6da65);},'xFpwd':function(_0x198701){return _0x198701();},'rwYZI':function(_0x3181af){return _0x3181af();},'OcdYF':function(_0x526d6f,_0x3a55e5){return _0x526d6f(_0x3a55e5);},'VIYiw':function(_0x173a23,_0x1a0d4e,_0x30d28){return _0x173a23(_0x1a0d4e,_0x30d28);}},_0x22284c=await _0x21eb61[_0x5b87e1(0x122)](resolveProfileTarget,_0x19cb05);if(_0x22284c['kind']===_0x5b87e1(0x138)){if(_0x22284c['alsoExistsElsewhere'])printDualExistsHint(_0x19cb05);const _0x3241f8=unsetProfileOverride(_0x21eb61['xFpwd'](getProjectPath),_0x19cb05,_0x4a330e);_0x3241f8?console[_0x5b87e1(0x120)](_0x5b87e1(0x14e)+_0x4a330e+'\x20for\x20\x22'+_0x19cb05+'\x22'):console['log'](_0x5b87e1(0x136)+_0x4a330e+_0x5b87e1(0x11f));return;}const _0x442825=unsetProfileOverride(_0x21eb61[_0x5b87e1(0x14b)](getProjectPath),_0x19cb05,_0x4a330e);if(_0x442825){console['log'](_0x5b87e1(0x14e)+_0x4a330e);return;}const _0x1740d7=await _0x21eb61[_0x5b87e1(0x11a)](loadSettings,_0x19cb05),_0x224388=_0x21eb61['VIYiw'](deleteNestedValue,_0x1740d7,_0x4a330e);_0x224388?console[_0x5b87e1(0x120)]('Key\x20\x22'+_0x4a330e+'\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22'+_0x19cb05+'\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.'):console[_0x5b87e1(0x120)]('Key\x20\x22'+_0x4a330e+_0x5b87e1(0x11f));}export async function configReset(_0x1d7c2c){const _0x2bf5be=_0x5fcee1,_0x320a1b=await resolveProfileTarget(_0x1d7c2c);if(_0x320a1b['kind']===_0x2bf5be(0x138)){resetProfileOverrides(getProjectPath(),_0x1d7c2c),console[_0x2bf5be(0x120)](_0x2bf5be(0x14a)+_0x1d7c2c+'\x22');return;}console[_0x2bf5be(0x120)]('\x22'+_0x1d7c2c+_0x2bf5be(0x133)+_0x1d7c2c+_0x2bf5be(0x12c));}function _0x2dc3(){const _0x40c6b8=['undefined','true','\x22\x20not\x20found','log','local','ggEEg','niAUn','565660EbwXaY','GsfuA','tIPnQ','\x20for\x20\x22','GypmG','stringify','isSafeInteger','685767yMlfpE','\x20<key>\x22\x20to\x20remove\x20individual\x20values.','XGnJs','includes','KvFuf','aCjtz','4NYpWRu','allowInsecureLocalhost','\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20','234IwoUCA','rwWcR','Key\x20\x22','kind','cloud','forceLogin','HHMTi','\x20=\x20','startsWith','407598XlnpWQ','alsoExistsElsewhere','endsWith','test','119jTbulX','757145wlDLrD','headless',':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22','\x20\x20Note:\x20\x22','PxFDK','3375510lSNNWE','2884608UeeNvo','object','Cleared\x20local\x20overrides\x20for\x20\x22','rwYZI','817984HZBDkj','No\x20configuration\x20set\x20for\x20\x22','Removed\x20','dxebs','parse','Set\x20','WIQJd','VMxnM','zNmaO','OcdYF','isNaN','length'];_0x2dc3=function(){return _0x40c6b8;};return _0x2dc3();}
@@ -1 +1 @@
1
- function _0x2451(){const _0x429ba2=['7Tgvfwc','\x22\x20for\x20everyone\x20in\x20your\x20organization.','48414ziruNi','4737978przuQJ','3071070eBsBVX','\x22\x20not\x20found.','33RiYNYd','confirmation','235769hcgjqU','Profile\x20deletion\x20requires\x20an\x20interactive\x20terminal\x20so\x20the\x20profile\x20name\x20can\x20be\x20typed\x20for\x20confirmation.\x20Pass\x20--yes\x20to\x20skip\x20confirmation.','24iOJZev','aIhCe','Profile\x20deletion\x20cancelled:\x20confirmation\x20did\x20not\x20match.','\x0aWarning:\x20this\x20deletes\x20the\x20shared\x20cloud\x20profile\x20\x22','input','Type\x20\x22','✓\x20Deleted\x20cloud\x20profile\x20\x22','758585cTjRIv','Cloud\x20profile\x20\x22','80MAvztU','1658304xaCCcZ','4036144YCbSFq','cwd'];_0x2451=function(){return _0x429ba2;};return _0x2451();}(function(_0x5154ab,_0x3dc7eb){const _0x10e629=_0x40a1,_0x2e4ccc=_0x5154ab();while(!![]){try{const _0x34883a=-parseInt(_0x10e629(0x10f))/0x1+parseInt(_0x10e629(0x11b))/0x2+-parseInt(_0x10e629(0x120))/0x3*(parseInt(_0x10e629(0x11a))/0x4)+-parseInt(_0x10e629(0x118))/0x5*(parseInt(_0x10e629(0x111))/0x6)+-parseInt(_0x10e629(0x11e))/0x7*(parseInt(_0x10e629(0x11c))/0x8)+parseInt(_0x10e629(0x121))/0x9+parseInt(_0x10e629(0x10b))/0xa*(parseInt(_0x10e629(0x10d))/0xb);if(_0x34883a===_0x3dc7eb)break;else _0x2e4ccc['push'](_0x2e4ccc['shift']());}catch(_0xe041ae){_0x2e4ccc['push'](_0x2e4ccc['shift']());}}}(_0x2451,0x94318));import _0x2919b8 from'inquirer';import{deleteCloudProfile,fetchCloudProfile}from'./utils/cloudProfile.js';function _0x40a1(_0x3ba408,_0x3066c9){_0x3ba408=_0x3ba408-0x10b;const _0x245116=_0x2451();let _0x40a1ed=_0x245116[_0x3ba408];return _0x40a1ed;}import{isInteractive}from'./utils/cloudProfileSession.js';import{clearLastProfile,resetProfileOverrides}from'./utils/projectsConfig.js';export async function deleteProfile(_0x38f2c4,_0x2687ab={}){const _0x3e0b93=_0x40a1,_0x302584={'fVSzt':function(_0x3fbb1b){return _0x3fbb1b();},'RVzYN':_0x3e0b93(0x115),'aIhCe':_0x3e0b93(0x10e),'JHrRA':function(_0x4dcd34,_0x197882,_0x489f2c){return _0x4dcd34(_0x197882,_0x489f2c);}},_0x393452=await fetchCloudProfile(_0x38f2c4);if(!_0x393452)throw new Error(_0x3e0b93(0x119)+_0x38f2c4+_0x3e0b93(0x10c));if(!_0x2687ab['yes']&&!_0x302584['fVSzt'](isInteractive))throw new Error(_0x3e0b93(0x110));console['log'](_0x3e0b93(0x114)+_0x38f2c4+_0x3e0b93(0x11f));if(!_0x2687ab['yes']){const {confirmation:_0x1ff472}=await _0x2919b8['prompt']([{'type':_0x302584['RVzYN'],'name':_0x302584[_0x3e0b93(0x112)],'message':_0x3e0b93(0x116)+_0x38f2c4+'\x22\x20to\x20confirm\x20deletion:'}]);if(_0x1ff472!==_0x38f2c4)throw new Error(_0x3e0b93(0x113));}await deleteCloudProfile(_0x38f2c4),_0x302584['JHrRA'](resetProfileOverrides,process[_0x3e0b93(0x11d)](),_0x38f2c4),clearLastProfile(process['cwd'](),_0x38f2c4),console['log'](_0x3e0b93(0x117)+_0x38f2c4+'\x22.');}
1
+ (function(_0x1dcf8a,_0x3b5a56){const _0x3c6827=_0x4525,_0x56e907=_0x1dcf8a();while(!![]){try{const _0x3c8cf0=-parseInt(_0x3c6827(0x1ac))/0x1+parseInt(_0x3c6827(0x19d))/0x2*(parseInt(_0x3c6827(0x19c))/0x3)+parseInt(_0x3c6827(0x1ab))/0x4+-parseInt(_0x3c6827(0x19a))/0x5+-parseInt(_0x3c6827(0x1a8))/0x6*(-parseInt(_0x3c6827(0x1a6))/0x7)+-parseInt(_0x3c6827(0x19f))/0x8*(-parseInt(_0x3c6827(0x1a9))/0x9)+parseInt(_0x3c6827(0x1a1))/0xa;if(_0x3c8cf0===_0x3b5a56)break;else _0x56e907['push'](_0x56e907['shift']());}catch(_0x2b0cc3){_0x56e907['push'](_0x56e907['shift']());}}}(_0x5f03,0x56309));function _0x5f03(){const _0x9f849c=['rzFMx','2720485yHWLvM','\x22\x20to\x20confirm\x20deletion:','36swSVXK','188URghEz','MUQtY','8IzoLRl','input','8465380qNzZXM','Profile\x20deletion\x20cancelled:\x20confirmation\x20did\x20not\x20match.','confirmation','Type\x20\x22','✓\x20Deleted\x20cloud\x20profile\x20\x22','1696499bJcQVX','cwd','6ZOKVEz','1654281aEovwX','log','241516GOOEbO','437081AGjvKv','Profile\x20deletion\x20requires\x20an\x20interactive\x20terminal\x20so\x20the\x20profile\x20name\x20can\x20be\x20typed\x20for\x20confirmation.\x20Pass\x20--yes\x20to\x20skip\x20confirmation.'];_0x5f03=function(){return _0x9f849c;};return _0x5f03();}import _0x8fa8c7 from'inquirer';function _0x4525(_0x45c996,_0x222f2b){_0x45c996=_0x45c996-0x199;const _0x5f03d7=_0x5f03();let _0x4525ad=_0x5f03d7[_0x45c996];return _0x4525ad;}import{deleteCloudProfile,fetchCloudProfile}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';import{clearLastProfile,resetProfileOverrides}from'./utils/projectsConfig.js';export async function deleteProfile(_0x509747,_0x1919aa={}){const _0x2819f6=_0x4525,_0x4b3e3a={'cFyZV':function(_0x52c6d2,_0xb60fd1){return _0x52c6d2(_0xb60fd1);},'MUQtY':_0x2819f6(0x1ad),'EvSmh':_0x2819f6(0x1a0),'PETJs':_0x2819f6(0x1a3),'qcoVw':function(_0x301749,_0x2e11e6){return _0x301749!==_0x2e11e6;},'DlkXL':function(_0xbaad53,_0x1729b3){return _0xbaad53(_0x1729b3);},'rzFMx':function(_0x3a5b63,_0x2523b4,_0x17b133){return _0x3a5b63(_0x2523b4,_0x17b133);}},_0x2fd623=await _0x4b3e3a['cFyZV'](fetchCloudProfile,_0x509747);if(!_0x2fd623)throw new Error('Cloud\x20profile\x20\x22'+_0x509747+'\x22\x20not\x20found.');if(!_0x1919aa['yes']&&!isInteractive())throw new Error(_0x4b3e3a[_0x2819f6(0x19e)]);console[_0x2819f6(0x1aa)]('\x0aWarning:\x20this\x20deletes\x20the\x20shared\x20cloud\x20profile\x20\x22'+_0x509747+'\x22\x20for\x20everyone\x20in\x20your\x20organization.');if(!_0x1919aa['yes']){const {confirmation:_0x158799}=await _0x8fa8c7['prompt']([{'type':_0x4b3e3a['EvSmh'],'name':_0x4b3e3a['PETJs'],'message':_0x2819f6(0x1a4)+_0x509747+_0x2819f6(0x19b)}]);if(_0x4b3e3a['qcoVw'](_0x158799,_0x509747))throw new Error(_0x2819f6(0x1a2));}await _0x4b3e3a['DlkXL'](deleteCloudProfile,_0x509747),_0x4b3e3a[_0x2819f6(0x199)](resetProfileOverrides,process[_0x2819f6(0x1a7)](),_0x509747),clearLastProfile(process['cwd'](),_0x509747),console[_0x2819f6(0x1aa)](_0x2819f6(0x1a5)+_0x509747+'\x22.');}
@@ -1 +1 @@
1
- const _0x30bb1f=_0x2d17;(function(_0x26bf2b,_0x3e324e){const _0x27d66c=_0x2d17,_0x199b0a=_0x26bf2b();while(!![]){try{const _0x3bbf22=-parseInt(_0x27d66c(0x126))/0x1*(-parseInt(_0x27d66c(0x132))/0x2)+parseInt(_0x27d66c(0x134))/0x3*(-parseInt(_0x27d66c(0x123))/0x4)+-parseInt(_0x27d66c(0x144))/0x5+parseInt(_0x27d66c(0x124))/0x6*(parseInt(_0x27d66c(0x11f))/0x7)+parseInt(_0x27d66c(0x11d))/0x8+parseInt(_0x27d66c(0x147))/0x9+parseInt(_0x27d66c(0x13a))/0xa*(parseInt(_0x27d66c(0x141))/0xb);if(_0x3bbf22===_0x3e324e)break;else _0x199b0a['push'](_0x199b0a['shift']());}catch(_0x4eba3c){_0x199b0a['push'](_0x199b0a['shift']());}}}(_0x462e,0xee21b));import{readdir,stat}from'fs/promises';import{join}from'path';function _0x2d17(_0x54e261,_0x17ea76){_0x54e261=_0x54e261-0x11d;const _0x462e76=_0x462e();let _0x2d1742=_0x462e76[_0x54e261];return _0x2d1742;}import{existsSync}from'fs';import{getRangerDir}from'./utils/rangerRoot.js';import{loadSettings}from'./utils/settings.js';import{readActiveProfileName}from'./utils/activeProfile.js';import{getToken}from'./utils/keychain.js';import{listCloudProfiles}from'./utils/cloudProfile.js';const NON_ENV_DIRS=['sessions',_0x30bb1f(0x12e),'reports',_0x30bb1f(0x13b),'ci'];export function shouldGroupByEnvironment(_0x39808b){return _0x39808b['some'](_0x30a7df=>_0x30a7df['environmentKey']);}function _0x462e(){const _0x417b14=['\x0aLocal\x20Profiles\x20(legacy):','1994625AblFNr','pymSL','Run:\x20ranger\x20profile\x20add\x20<profile-name>','14978968RtgRkf','qgGFD','2507162ebHUVF','set','name','settings.json','24KUkdIr','6cbOJet','sessionUpdatedAt','2sBkOhS','\x0aCloud\x20Profiles:','\x0aCloud\x20Profiles\x20(by\x20environment):','qmmGG','TVKZb','no\x20session','log','BiyCN','bug-bashes','tnlgB','localeCompare','\x20\x20\x20\x20','1022396EEgoGe','message','919497oRehFA','RSJUz','includes','\x20\x20\x20\x20Session:\x20','environmentKey','xtNeR','10ylhbud','local','profiles','sort','isDirectory','length','JFZJu','5015516ECVXbE','get','map','5580665hcytUL','legacy'];_0x462e=function(){return _0x417b14;};return _0x462e();}export function groupCloudProfilesByEnvironment(_0x39f0a6){const _0x498419=_0x30bb1f,_0x109c93={'WsLcd':function(_0x4cf6c1,_0x1900e2){return _0x4cf6c1===_0x1900e2;}},_0x605950=new Map();for(const _0x18f7c6 of _0x39f0a6){const _0x41ccfa=_0x18f7c6[_0x498419(0x138)]??null,_0x3daf38=_0x605950['get'](_0x41ccfa);if(_0x3daf38)_0x3daf38['push'](_0x18f7c6);else _0x605950[_0x498419(0x120)](_0x41ccfa,[_0x18f7c6]);}const _0x5d5e81=[..._0x605950['keys']()][_0x498419(0x13d)]((_0x1b6b55,_0x3a4224)=>{if(_0x109c93['WsLcd'](_0x1b6b55,null))return 0x1;if(_0x109c93['WsLcd'](_0x3a4224,null))return-0x1;return _0x1b6b55['localeCompare'](_0x3a4224);});return _0x5d5e81[_0x498419(0x143)](_0x334306=>({'environmentKey':_0x334306,'profiles':_0x605950[_0x498419(0x142)](_0x334306)['sort']((_0x59aefb,_0x4fb2ec)=>_0x59aefb['name'][_0x498419(0x130)](_0x4fb2ec['name']))}));}export async function getEnvNames(){const _0x2e9989=_0x30bb1f,_0x4f5901={'aKGBT':function(_0x45bec4){return _0x45bec4();},'cfbXl':function(_0x16cedd,_0x3326c8){return _0x16cedd(_0x3326c8);},'JVcPS':_0x2e9989(0x13b),'qmmGG':function(_0x4ab9ee,_0x37f9cd){return _0x4ab9ee(_0x37f9cd);},'BiyCN':function(_0x3188d6,_0x5a34f8){return _0x3188d6(_0x5a34f8);},'jojtO':'.txt','JFZJu':function(_0x1dd44d,_0x467f3b,_0x217592){return _0x1dd44d(_0x467f3b,_0x217592);},'xtNeR':function(_0x5cfac5,_0x4a74b6){return _0x5cfac5(_0x4a74b6);},'riHWR':_0x2e9989(0x122),'EdDSA':_0x2e9989(0x145)},_0x11ab7c=getRangerDir();if(!existsSync(_0x11ab7c))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x176617=await _0x4f5901['aKGBT'](readActiveProfileName),_0x1b23d0=[],_0x13eb8c={},_0xa3c300=join(_0x11ab7c,_0x2e9989(0x13b));if(_0x4f5901['cfbXl'](existsSync,_0xa3c300)){const _0x4fef47=await readdir(_0xa3c300);for(const _0x270d16 of _0x4fef47){const _0x5202f8=join(_0xa3c300,_0x270d16),_0x39f142=await stat(_0x5202f8);_0x39f142['isDirectory']()&&(_0x1b23d0['push'](_0x270d16),_0x13eb8c[_0x270d16]=_0x4f5901['JVcPS']);}}const _0xca044a=join(_0x11ab7c,'ci');if(_0x4f5901['qmmGG'](existsSync,_0xca044a)){const _0x825a35=await _0x4f5901[_0x2e9989(0x129)](readdir,_0xca044a);for(const _0x1918a0 of _0x825a35){const _0x4ae8f7=join(_0xca044a,_0x1918a0),_0x25890f=await stat(_0x4ae8f7);_0x25890f['isDirectory']()&&(_0x1b23d0['push'](_0x1918a0),_0x13eb8c[_0x1918a0]='ci');}}const _0x35ca6e=await _0x4f5901[_0x2e9989(0x12d)](readdir,_0x11ab7c);for(const _0x1f3a9e of _0x35ca6e){if(NON_ENV_DIRS[_0x2e9989(0x136)](_0x1f3a9e))continue;if(_0x1f3a9e['startsWith']('.'))continue;if(_0x1f3a9e['endsWith'](_0x4f5901['jojtO']))continue;const _0x535c64=_0x4f5901[_0x2e9989(0x140)](join,_0x11ab7c,_0x1f3a9e),_0x4e8352=await _0x4f5901[_0x2e9989(0x139)](stat,_0x535c64);_0x4e8352[_0x2e9989(0x13e)]()&&existsSync(join(_0x535c64,_0x4f5901['riHWR']))&&(!_0x1b23d0['includes'](_0x1f3a9e)&&(_0x1b23d0['push'](_0x1f3a9e),_0x13eb8c[_0x1f3a9e]=_0x4f5901['EdDSA']));}return{'envNames':_0x1b23d0,'activeEnv':_0x176617,'envTypes':_0x13eb8c};}export async function envList(){const _0x33fd44=_0x30bb1f,_0x10dc64={'qgGFD':function(_0x22aa34,_0x2404fc){return _0x22aa34===_0x2404fc;},'pymSL':function(_0x4d43fc){return _0x4d43fc();},'lOvQB':function(_0x2c097e,_0x2372bc){return _0x2c097e instanceof _0x2372bc;},'TVKZb':function(_0x1a27b9,_0x21a698){return _0x1a27b9(_0x21a698);},'sfsUw':'\x0aNo\x20profiles\x20found.','RSJUz':_0x33fd44(0x149),'UrJuQ':_0x33fd44(0x13b),'tnlgB':'(no\x20environment\x20—\x20manual\x20or\x20no\x20auth)','bHYGo':_0x33fd44(0x131)},{envNames:_0x29c0a5,activeEnv:_0x2657a9,envTypes:_0x19365b}=await getEnvNames();let _0x2b0151=[];const _0x444829=await getToken();if(_0x444829)try{_0x2b0151=await _0x10dc64[_0x33fd44(0x148)](listCloudProfiles);}catch(_0x125deb){console['error']('\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profiles:\x20'+(_0x10dc64['lOvQB'](_0x125deb,Error)?_0x125deb[_0x33fd44(0x133)]:_0x10dc64[_0x33fd44(0x12a)](String,_0x125deb)));}if(_0x10dc64['qgGFD'](_0x29c0a5[_0x33fd44(0x13f)],0x0)&&_0x10dc64[_0x33fd44(0x11e)](_0x2b0151['length'],0x0)){console['log'](_0x10dc64['sfsUw']),console[_0x33fd44(0x12c)](_0x10dc64[_0x33fd44(0x135)]);return;}const _0x1e9ef1=new Set(_0x2b0151['map'](_0x387909=>_0x387909[_0x33fd44(0x121)]));if(_0x29c0a5[_0x33fd44(0x13f)]>0x0){console['log'](_0x33fd44(0x146));for(const _0x175916 of _0x29c0a5['sort']()){const _0x384b8e=_0x175916===_0x2657a9&&!_0x1e9ef1['has'](_0x175916),_0x444384=_0x19365b[_0x175916]||_0x10dc64['UrJuQ'],_0xc8a89f=await loadSettings(_0x175916),_0x42c2fb=_0x10dc64[_0x33fd44(0x11e)](_0x444384,'legacy')?'':'\x20['+_0x444384+']';console[_0x33fd44(0x12c)]('\x20\x20'+(_0x384b8e?'*\x20':'\x20\x20')+_0x175916+_0x42c2fb),_0xc8a89f['baseUrl']&&console['log']('\x20\x20\x20\x20\x20\x20URL:\x20'+_0xc8a89f['baseUrl']),_0xc8a89f['environmentDetails']&&console[_0x33fd44(0x12c)]('\x20\x20\x20\x20\x20\x20Details:\x20'+_0xc8a89f['environmentDetails']);}}const _0x5c20a1=(_0x101624,_0x5e8632)=>{const _0x3072c1=_0x33fd44,_0x4d155f=_0x10dc64[_0x3072c1(0x11e)](_0x101624['name'],_0x2657a9),_0x126976=_0x101624[_0x3072c1(0x125)]?'cached\x20(updated\x20'+_0x101624[_0x3072c1(0x125)]+')':_0x3072c1(0x12b);console['log'](''+_0x5e8632+(_0x4d155f?'*\x20':'\x20\x20')+_0x101624[_0x3072c1(0x121)]),console['log'](_0x5e8632+_0x3072c1(0x137)+_0x126976);};if(_0x2b0151['length']>0x0){if(shouldGroupByEnvironment(_0x2b0151)){console['log'](_0x33fd44(0x128));for(const _0x44fdf7 of groupCloudProfilesByEnvironment(_0x2b0151)){const _0x2adb68=_0x44fdf7[_0x33fd44(0x138)]??_0x10dc64[_0x33fd44(0x12f)];console[_0x33fd44(0x12c)]('\x0a\x20\x20'+_0x2adb68);for(const _0x3aa9ba of _0x44fdf7[_0x33fd44(0x13c)]){_0x5c20a1(_0x3aa9ba,_0x10dc64['bHYGo']);}}}else{console[_0x33fd44(0x12c)](_0x33fd44(0x127));for(const _0x4e6056 of[..._0x2b0151]['sort']((_0x44a012,_0xb2f70b)=>_0x44a012['name'][_0x33fd44(0x130)](_0xb2f70b['name']))){_0x5c20a1(_0x4e6056,'\x20\x20');}}}_0x2657a9&&console['log']('\x0a*\x20=\x20active\x20profile');}
1
+ const _0x572e6a=_0x1d01;(function(_0x176097,_0x862f2a){const _0x4f43c7=_0x1d01,_0x5e2e30=_0x176097();while(!![]){try{const _0x6f530e=-parseInt(_0x4f43c7(0x20e))/0x1+parseInt(_0x4f43c7(0x1fb))/0x2*(-parseInt(_0x4f43c7(0x1f6))/0x3)+-parseInt(_0x4f43c7(0x205))/0x4*(parseInt(_0x4f43c7(0x21f))/0x5)+-parseInt(_0x4f43c7(0x211))/0x6+-parseInt(_0x4f43c7(0x1f7))/0x7*(parseInt(_0x4f43c7(0x1f1))/0x8)+parseInt(_0x4f43c7(0x21e))/0x9+parseInt(_0x4f43c7(0x220))/0xa;if(_0x6f530e===_0x862f2a)break;else _0x5e2e30['push'](_0x5e2e30['shift']());}catch(_0x2131b5){_0x5e2e30['push'](_0x5e2e30['shift']());}}}(_0xc0ab,0x68089));import{readdir,stat}from'fs/promises';import{join}from'path';import{existsSync}from'fs';function _0xc0ab(){const _0x48211d=['244806uEmvCj','70343zbDDEu','includes','legacy','(no\x20environment\x20—\x20manual\x20or\x20no\x20auth)','14tjtFgD','jCUDV','message','wLyUP','sessionUpdatedAt','local','.txt','isDirectory','endsWith','okszY','4gQeMhh','\x0aCloud\x20Profiles\x20(by\x20environment):','AgrFF','reports','\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profiles:\x20','\x20\x20\x20\x20\x20\x20Details:\x20','ydTJO','push','\x20\x20\x20\x20\x20\x20URL:\x20','707466IIgsbx','SXVdl','BOfWA','1945404yKKhIR','posmk','log','localeCompare','name','VmDuR','\x0a\x20\x20','jkGIV','\x0aCloud\x20Profiles:','\x0a*\x20=\x20active\x20profile','yukeH','\x0aLocal\x20Profiles\x20(legacy):','dvlmv','5384403BqerwK','2674255PUExbF','23173340klXDsT','get','cached\x20(updated\x20','some','Maduo','environmentKey','length','bnLgC','\x20\x20\x20\x20','280gmHxEA','ecHzK','sort','WGOKa','baseUrl'];_0xc0ab=function(){return _0x48211d;};return _0xc0ab();}import{getRangerDir}from'./utils/rangerRoot.js';import{loadSettings}from'./utils/settings.js';import{readActiveProfileName}from'./utils/activeProfile.js';import{getToken}from'./utils/keychain.js';import{listCloudProfiles}from'./utils/cloudProfile.js';const NON_ENV_DIRS=['sessions','bug-bashes',_0x572e6a(0x208),'local','ci'];function _0x1d01(_0x1ea063,_0x47b499){_0x1ea063=_0x1ea063-0x1f1;const _0xc0ab4c=_0xc0ab();let _0x1d011a=_0xc0ab4c[_0x1ea063];return _0x1d011a;}export function shouldGroupByEnvironment(_0x1424f4){const _0x1f6362=_0x572e6a;return _0x1424f4[_0x1f6362(0x223)](_0xd111cc=>_0xd111cc[_0x1f6362(0x225)]);}export function groupCloudProfilesByEnvironment(_0x3ff274){const _0x1f84eb=_0x572e6a,_0x3b473b={'yukeH':function(_0x5068ac,_0x151d7f){return _0x5068ac===_0x151d7f;}},_0x2e7772=new Map();for(const _0x2b52ac of _0x3ff274){const _0x3789dc=_0x2b52ac[_0x1f84eb(0x225)]??null,_0x5ae02d=_0x2e7772[_0x1f84eb(0x221)](_0x3789dc);if(_0x5ae02d)_0x5ae02d[_0x1f84eb(0x20c)](_0x2b52ac);else _0x2e7772['set'](_0x3789dc,[_0x2b52ac]);}const _0x324e1a=[..._0x2e7772['keys']()]['sort']((_0x24cb11,_0x50924a)=>{const _0x2f4218=_0x1f84eb;if(_0x3b473b['yukeH'](_0x24cb11,null))return 0x1;if(_0x3b473b[_0x2f4218(0x21b)](_0x50924a,null))return-0x1;return _0x24cb11[_0x2f4218(0x214)](_0x50924a);});return _0x324e1a['map'](_0x53b2d9=>({'environmentKey':_0x53b2d9,'profiles':_0x2e7772['get'](_0x53b2d9)['sort']((_0x241724,_0x10d303)=>_0x241724[_0x1f84eb(0x215)][_0x1f84eb(0x214)](_0x10d303['name']))}));}export async function getEnvNames(){const _0x599bca=_0x572e6a,_0x403529={'okszY':function(_0x23ae06){return _0x23ae06();},'jCUDV':function(_0x5291fd,_0x2872c0){return _0x5291fd(_0x2872c0);},'wLyUP':function(_0x21aa2c){return _0x21aa2c();},'dvlmv':function(_0x528205,_0x2eb545,_0x38a6f3){return _0x528205(_0x2eb545,_0x38a6f3);},'AgrFF':_0x599bca(0x200),'ecHzK':function(_0x4a0dbb,_0x2dcde9,_0x592a13){return _0x4a0dbb(_0x2dcde9,_0x592a13);},'hCoEv':_0x599bca(0x201),'ydTJO':function(_0x1c219f,_0x439d4e){return _0x1c219f(_0x439d4e);},'BOfWA':function(_0x3b9241,_0x11ffa3){return _0x3b9241(_0x11ffa3);},'VvsYB':'legacy'},_0x383d9d=_0x403529[_0x599bca(0x204)](getRangerDir);if(!_0x403529[_0x599bca(0x1fc)](existsSync,_0x383d9d))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x592021=await _0x403529[_0x599bca(0x1fe)](readActiveProfileName),_0x5646f5=[],_0x2fff86={},_0x4d8f1f=_0x403529[_0x599bca(0x21d)](join,_0x383d9d,_0x403529[_0x599bca(0x207)]);if(_0x403529['jCUDV'](existsSync,_0x4d8f1f)){const _0x2458da=await readdir(_0x4d8f1f);for(const _0x4ca5c3 of _0x2458da){const _0x420082=_0x403529[_0x599bca(0x1f2)](join,_0x4d8f1f,_0x4ca5c3),_0x501184=await _0x403529['jCUDV'](stat,_0x420082);_0x501184[_0x599bca(0x202)]()&&(_0x5646f5[_0x599bca(0x20c)](_0x4ca5c3),_0x2fff86[_0x4ca5c3]=_0x403529['AgrFF']);}}const _0x4c6686=_0x403529['dvlmv'](join,_0x383d9d,'ci');if(_0x403529[_0x599bca(0x1fc)](existsSync,_0x4c6686)){const _0x23dd8e=await readdir(_0x4c6686);for(const _0x38f111 of _0x23dd8e){const _0xfe8de2=join(_0x4c6686,_0x38f111),_0xcaaea7=await stat(_0xfe8de2);_0xcaaea7[_0x599bca(0x202)]()&&(_0x5646f5[_0x599bca(0x20c)](_0x38f111),_0x2fff86[_0x38f111]='ci');}}const _0x4ebb3f=await readdir(_0x383d9d);for(const _0x4936bc of _0x4ebb3f){if(NON_ENV_DIRS['includes'](_0x4936bc))continue;if(_0x4936bc['startsWith']('.'))continue;if(_0x4936bc[_0x599bca(0x203)](_0x403529['hCoEv']))continue;const _0x46410b=join(_0x383d9d,_0x4936bc),_0x3d65cb=await _0x403529[_0x599bca(0x20b)](stat,_0x46410b);_0x3d65cb[_0x599bca(0x202)]()&&_0x403529[_0x599bca(0x210)](existsSync,join(_0x46410b,'settings.json'))&&(!_0x5646f5[_0x599bca(0x1f8)](_0x4936bc)&&(_0x5646f5[_0x599bca(0x20c)](_0x4936bc),_0x2fff86[_0x4936bc]=_0x403529['VvsYB']));}return{'envNames':_0x5646f5,'activeEnv':_0x592021,'envTypes':_0x2fff86};}export async function envList(){const _0x2ce25d=_0x572e6a,_0x390c29={'SXVdl':function(_0x3902fc,_0x4851cf){return _0x3902fc===_0x4851cf;},'VclcH':'no\x20session','auzUz':function(_0x3b2179){return _0x3b2179();},'DxMJz':function(_0x2f75e2,_0x2db2ae){return _0x2f75e2 instanceof _0x2db2ae;},'VmDuR':function(_0x9f639,_0x49a972){return _0x9f639===_0x49a972;},'YbVpf':'\x0aNo\x20profiles\x20found.','TxbPx':'Run:\x20ranger\x20profile\x20add\x20<profile-name>','WGOKa':_0x2ce25d(0x21c),'jKmhT':function(_0x81abf3,_0x170e20){return _0x81abf3(_0x170e20);},'jkGIV':_0x2ce25d(0x1f9),'Maduo':_0x2ce25d(0x206),'bnLgC':_0x2ce25d(0x1fa),'NYomo':function(_0xf903e9,_0x577706,_0x4fff5b){return _0xf903e9(_0x577706,_0x4fff5b);},'posmk':_0x2ce25d(0x228)},{envNames:_0x3e593c,activeEnv:_0x12e882,envTypes:_0x194ee0}=await getEnvNames();let _0x60c531=[];const _0x3fbaef=await getToken();if(_0x3fbaef)try{_0x60c531=await _0x390c29['auzUz'](listCloudProfiles);}catch(_0x302f76){console['error'](_0x2ce25d(0x209)+(_0x390c29['DxMJz'](_0x302f76,Error)?_0x302f76[_0x2ce25d(0x1fd)]:String(_0x302f76)));}if(_0x390c29[_0x2ce25d(0x20f)](_0x3e593c['length'],0x0)&&_0x390c29[_0x2ce25d(0x216)](_0x60c531[_0x2ce25d(0x226)],0x0)){console['log'](_0x390c29['YbVpf']),console['log'](_0x390c29['TxbPx']);return;}const _0xeef063=new Set(_0x60c531['map'](_0x88e2d2=>_0x88e2d2[_0x2ce25d(0x215)]));if(_0x3e593c[_0x2ce25d(0x226)]>0x0){console['log'](_0x390c29[_0x2ce25d(0x1f4)]);for(const _0x1a0ee4 of _0x3e593c[_0x2ce25d(0x1f3)]()){const _0xece607=_0x390c29['SXVdl'](_0x1a0ee4,_0x12e882)&&!_0xeef063['has'](_0x1a0ee4),_0x5db79d=_0x194ee0[_0x1a0ee4]||'local',_0x4fa939=await _0x390c29['jKmhT'](loadSettings,_0x1a0ee4),_0x305543=_0x5db79d===_0x390c29[_0x2ce25d(0x218)]?'':'\x20['+_0x5db79d+']';console[_0x2ce25d(0x213)]('\x20\x20'+(_0xece607?'*\x20':'\x20\x20')+_0x1a0ee4+_0x305543),_0x4fa939['baseUrl']&&console['log'](_0x2ce25d(0x20d)+_0x4fa939[_0x2ce25d(0x1f5)]),_0x4fa939['environmentDetails']&&console[_0x2ce25d(0x213)](_0x2ce25d(0x20a)+_0x4fa939['environmentDetails']);}}const _0x51a362=(_0x1b8b72,_0x4dad70)=>{const _0x463c6c=_0x2ce25d,_0x4f11e6=_0x390c29[_0x463c6c(0x20f)](_0x1b8b72['name'],_0x12e882),_0x376f0b=_0x1b8b72[_0x463c6c(0x1ff)]?_0x463c6c(0x222)+_0x1b8b72[_0x463c6c(0x1ff)]+')':_0x390c29['VclcH'];console[_0x463c6c(0x213)](''+_0x4dad70+(_0x4f11e6?'*\x20':'\x20\x20')+_0x1b8b72[_0x463c6c(0x215)]),console[_0x463c6c(0x213)](_0x4dad70+'\x20\x20\x20\x20Session:\x20'+_0x376f0b);};if(_0x60c531[_0x2ce25d(0x226)]>0x0){if(shouldGroupByEnvironment(_0x60c531)){console['log'](_0x390c29[_0x2ce25d(0x224)]);for(const _0x16d5fa of groupCloudProfilesByEnvironment(_0x60c531)){const _0x11e417=_0x16d5fa[_0x2ce25d(0x225)]??_0x390c29[_0x2ce25d(0x227)];console[_0x2ce25d(0x213)](_0x2ce25d(0x217)+_0x11e417);for(const _0x59b32d of _0x16d5fa['profiles']){_0x390c29['NYomo'](_0x51a362,_0x59b32d,_0x390c29[_0x2ce25d(0x212)]);}}}else{console['log'](_0x2ce25d(0x219));for(const _0x3fc78d of[..._0x60c531][_0x2ce25d(0x1f3)]((_0x13f56c,_0x568813)=>_0x13f56c[_0x2ce25d(0x215)][_0x2ce25d(0x214)](_0x568813['name']))){_0x51a362(_0x3fc78d,'\x20\x20');}}}_0x12e882&&console[_0x2ce25d(0x213)](_0x2ce25d(0x21a));}