@ranger-testing/ranger-cli 2.5.4-alpha.f940f0d-18 → 2.5.4-alpha.feb9faf-20

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 (78) hide show
  1. package/build/cli.js +1 -1
  2. package/build/commands/addEnv.js +1 -1
  3. package/build/commands/authEncrypt.js +1 -1
  4. package/build/commands/clean.js +1 -1
  5. package/build/commands/config.js +1 -1
  6. package/build/commands/env.js +1 -1
  7. package/build/commands/feature.js +1 -1
  8. package/build/commands/hook.js +1 -1
  9. package/build/commands/hooks/autoPrompt.js +1 -1
  10. package/build/commands/hooks/disable.js +1 -1
  11. package/build/commands/hooks/enable.js +1 -1
  12. package/build/commands/hooks/exitPlanMode.js +1 -1
  13. package/build/commands/hooks/index.js +1 -1
  14. package/build/commands/hooks/output.js +1 -1
  15. package/build/commands/hooks/planReminder.js +1 -1
  16. package/build/commands/hooks/planStart.js +1 -1
  17. package/build/commands/hooks/postEdit.js +1 -1
  18. package/build/commands/hooks/preCompact.js +1 -1
  19. package/build/commands/hooks/sessionEnd.js +1 -1
  20. package/build/commands/hooks/sessionStart.js +1 -1
  21. package/build/commands/hooks/stopHook.js +1 -1
  22. package/build/commands/index.js +1 -1
  23. package/build/commands/login.js +1 -1
  24. package/build/commands/mcpBootstrap.js +1 -1
  25. package/build/commands/migrateProfile.js +1 -1
  26. package/build/commands/setup/claude.js +1 -1
  27. package/build/commands/setup/opencode.js +1 -1
  28. package/build/commands/setupCi.js +1 -1
  29. package/build/commands/skillup.js +1 -1
  30. package/build/commands/start.js +1 -1
  31. package/build/commands/status.js +1 -1
  32. package/build/commands/update.js +1 -1
  33. package/build/commands/updateEnv.js +1 -1
  34. package/build/commands/useEnv.js +1 -1
  35. package/build/commands/utils/activeProfile.js +1 -1
  36. package/build/commands/utils/agentEnv.js +1 -1
  37. package/build/commands/utils/browserSessionsApi.js +1 -1
  38. package/build/commands/utils/claudeConfig.js +1 -1
  39. package/build/commands/utils/claudeOverrideSettings.js +1 -1
  40. package/build/commands/utils/claudePlugin.js +1 -1
  41. package/build/commands/utils/cloudProfile.js +1 -1
  42. package/build/commands/utils/cloudProfileSession.js +1 -1
  43. package/build/commands/utils/crypto.js +1 -1
  44. package/build/commands/utils/desirePathLog.js +1 -1
  45. package/build/commands/utils/deviceAuth.js +1 -1
  46. package/build/commands/utils/environment.js +1 -1
  47. package/build/commands/utils/featureApi.js +1 -1
  48. package/build/commands/utils/fixWebmDuration.js +1 -1
  49. package/build/commands/utils/gitTracked.js +1 -1
  50. package/build/commands/utils/keychain.js +1 -1
  51. package/build/commands/utils/legacyWarning.js +1 -1
  52. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  53. package/build/commands/utils/matchAuthEnvironment.js +1 -1
  54. package/build/commands/utils/mcpImageBase64.js +1 -1
  55. package/build/commands/utils/model.js +1 -1
  56. package/build/commands/utils/opencodeConfig.js +1 -1
  57. package/build/commands/utils/playwrightCli.js +1 -1
  58. package/build/commands/utils/profileMessages.js +1 -1
  59. package/build/commands/utils/profileSetupBanner.js +1 -1
  60. package/build/commands/utils/projectsConfig.js +1 -1
  61. package/build/commands/utils/rangerConfig.js +1 -1
  62. package/build/commands/utils/rangerRoot.js +1 -1
  63. package/build/commands/utils/resolveProfileContext.js +1 -1
  64. package/build/commands/utils/resolveProfileUrl.js +1 -1
  65. package/build/commands/utils/retry.js +1 -1
  66. package/build/commands/utils/sessionCache.js +1 -1
  67. package/build/commands/utils/settings.js +1 -1
  68. package/build/commands/utils/skillContent.js +1 -1
  69. package/build/commands/utils/skills.js +1 -1
  70. package/build/commands/utils/stitchWebmFiles.js +1 -1
  71. package/build/commands/utils/telemetry.js +1 -1
  72. package/build/commands/utils/tokenRefresh.js +1 -1
  73. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  74. package/build/commands/utils/userApi.js +1 -1
  75. package/build/commands/utils/version.js +1 -1
  76. package/build/commands/verifyFeature.js +1 -1
  77. package/build/commands/verifyFeatureCli.js +1 -1
  78. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x13adca,_0x37ac9d){const _0x2b5611=_0x5f5a,_0x5b080f=_0x13adca();while(!![]){try{const _0x5ab86e=-parseInt(_0x2b5611(0x1d4))/0x1*(parseInt(_0x2b5611(0x237))/0x2)+parseInt(_0x2b5611(0x213))/0x3*(-parseInt(_0x2b5611(0x1de))/0x4)+-parseInt(_0x2b5611(0x23a))/0x5+parseInt(_0x2b5611(0x20f))/0x6*(-parseInt(_0x2b5611(0x238))/0x7)+-parseInt(_0x2b5611(0x24d))/0x8+parseInt(_0x2b5611(0x1fe))/0x9*(-parseInt(_0x2b5611(0x234))/0xa)+-parseInt(_0x2b5611(0x1ea))/0xb*(-parseInt(_0x2b5611(0x253))/0xc);if(_0x5ab86e===_0x37ac9d)break;else _0x5b080f['push'](_0x5b080f['shift']());}catch(_0x1a1e87){_0x5b080f['push'](_0x5b080f['shift']());}}}(_0x44d0,0x9382d));import{readdir,rm}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import _0x5135e8 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{matchAuthEnvironment}from'./utils/matchAuthEnvironment.js';function _0x44d0(){const _0x12aa59=['--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','isElectron','indexOf','9auTshp','no_match','\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20(','EJdmK','RikVU','status','✓\x20Cloud\x20profile\x20\x27','\x22.\x20Expected\x20\x22Name:\x20Value\x22.','DknrS','bzemE','\x0a\x20\x20No\x20auth\x20env\x20matches\x20','Found\x20auth\x20environment\x20\x27','input','\x0a\x20\x20Still\x20could\x20not\x20reach\x20',')\x0a\x20\x20Save\x20\x27','\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22','HEAD','6VhHyrK','\x0a🌐\x20Profile\x20Setup\x0a','environments','saveToCloud','3WoxjEP','\x27\x20to\x20the\x20cloud?','length','HTTP\x20','The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a','\x22\x20already\x20exists.\x20Choose\x20a\x20different\x20name\x20or\x20delete\x20the\x20existing\x20profile\x20first.','paTTw','join','error','setupHeader','url','profile.add.autoRouteSkipped','some','isProtocolError','exit','eAZZj','keys','yjHSB','Lvhsi','Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','\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\x20Could\x20not\x20reach\x20','xwKuc','name','user_declined','To\x20set\x20up\x20a\x20profile,\x20run:\x0a','\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.','\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20','tOwyT','\x27\x20created\x20(no\x20session).\x0a','\x0a✓\x20Profile\x20\x27','VNLmg','rQscs','5388400eolmKy','setupHeaders','\x20\x20https://docs.ranger.net/main/concepts/profiles','9884rsvpmW','565635sHlxSC','env','5468195nMzefB','pSzVh','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','fetch\x20failed','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','✓\x20Profile\x20\x27','manual','vDPRq','profile.add.autoRouted','\x20\x20Did\x20you\x20mean\x20','What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','includes','\x22:\x20','\x27\x20created\x20(CDP).','\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.','Enter\x20a\x20different\x20URL','trim','DAxrP','Could\x20not\x20reach\x20','7884368vtRVin','bVbYn','\x20\x20Set\x20active\x20profile:\x20','boTlU','\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a','tnBgZ','43620XONsSA','kdTqz','stdout','KQoUf','capture','jrhVr','Use\x20','origin','165tPekkz','log','isTTY','DsZBe','zmBxF','aZlAb','http://localhost:3000','NODE_TLS_REJECT_UNAUTHORIZED','cdpEndpoint','\x20\x20Next:\x20ranger\x20go\x20--profile\x20','3096980OKfTyZ','no_auth_config','\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.','\x20--url\x20','prompt','action','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20','sLPxs','slice','\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a','LaNMo','14806Bkedjj','PBRUf','voPiL','baseUrl','FnkHn','\x0a\x20\x20A\x20cloud\x20profile\x20named\x20\x22','xUDIe','domains','\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a','RMAab','OAqKb','trackPhaseEnd','retry','--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','message','`\x20again\x20without\x20--skip-auth.','confirm'];_0x44d0=function(){return _0x12aa59;};return _0x44d0();}import{isPathGitTracked}from'./utils/gitTracked.js';import{setProfileOverride}from'./utils/projectsConfig.js';async function checkUrlReachability(_0x443ee1){const _0xb96b2d=_0x5f5a,_0x3af391={'nHlZX':_0xb96b2d(0x20e),'DAxrP':function(_0x59ae39,_0x49897c){return _0x59ae39(_0x49897c);},'VNLmg':function(_0x38b6c5,_0xa7cd89){return _0x38b6c5===_0xa7cd89;},'IQiNU':'TypeError','Etsge':_0xb96b2d(0x23d)};try{const _0x471c64=new AbortController(),_0x7e12c2=setTimeout(()=>_0x471c64['abort'](),0x1388),_0x4f7504={'method':_0x3af391['nHlZX'],'signal':_0x471c64['signal'],'redirect':_0xb96b2d(0x240)};/^https:\/\/localhost(:\d+)?/i['test'](_0x443ee1)&&(process[_0xb96b2d(0x239)]['NODE_TLS_REJECT_UNAUTHORIZED']='0');const _0x4c45a3=await fetch(_0x443ee1,_0x4f7504);delete process[_0xb96b2d(0x239)][_0xb96b2d(0x1db)],_0x3af391[_0xb96b2d(0x24b)](clearTimeout,_0x7e12c2);if(_0x4c45a3[_0xb96b2d(0x203)]<0x190)return{'ok':!![]};return{'ok':![],'error':_0xb96b2d(0x216)+_0x4c45a3['status']};}catch(_0x596413){delete process[_0xb96b2d(0x239)]['NODE_TLS_REJECT_UNAUTHORIZED'];const _0x1eb16d=_0x596413,_0x3782ed=_0x1eb16d[_0xb96b2d(0x1f8)]||String(_0x596413),_0x3b212d=_0x3782ed[_0xb96b2d(0x245)]('Invalid\x20URL')||_0x3af391[_0xb96b2d(0x232)](_0x1eb16d[_0xb96b2d(0x22a)],_0x3af391['IQiNU'])||_0x3782ed[_0xb96b2d(0x245)](_0x3af391['Etsge']);return{'ok':![],'error':_0x3782ed,'isProtocolError':_0x3b212d};}}function _0x5f5a(_0x1687b4,_0x2d484e){_0x1687b4=_0x1687b4-0x1d4;const _0x44d069=_0x44d0();let _0x5f5a7f=_0x44d069[_0x1687b4];return _0x5f5a7f;}async function sweepOrphanLocalProfile(_0x5254fe,_0x5b1ac9,_0x477184){const _0x19ce3c=_0x5f5a,_0x4bb5f2={'kdTqz':function(_0x48ceb2,_0x2cf6cc,_0x473421){return _0x48ceb2(_0x2cf6cc,_0x473421);},'xUDIe':function(_0x1d3bf1,_0x2ac1c0){return _0x1d3bf1(_0x2ac1c0);},'tnBgZ':function(_0x4d518e,_0x49ad80,_0x1bdc2e){return _0x4d518e(_0x49ad80,_0x1bdc2e);}},_0x142b7c=_0x4bb5f2['kdTqz'](join,_0x5b1ac9,'local'),_0x407941=_0x4bb5f2[_0x19ce3c(0x254)](join,_0x142b7c,_0x5254fe);existsSync(_0x407941)&&(_0x477184&&await isPathGitTracked(_0x407941)?console[_0x19ce3c(0x1d5)]('\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20'+_0x407941+_0x19ce3c(0x22d)):(await _0x4bb5f2['kdTqz'](rm,_0x407941,{'recursive':!![],'force':!![]}),console['log'](_0x19ce3c(0x22e)+_0x407941)));if(existsSync(_0x142b7c)){let _0x1d2fde=[];try{_0x1d2fde=await _0x4bb5f2[_0x19ce3c(0x1f0)](readdir,_0x142b7c);}catch{return;}const _0x3622b2='.tmp-'+_0x5254fe+'-';for(const _0x1c7d9a of _0x1d2fde){if(!_0x1c7d9a['startsWith'](_0x3622b2))continue;const _0x11eb30=_0x4bb5f2['kdTqz'](join,_0x142b7c,_0x1c7d9a);await _0x4bb5f2[_0x19ce3c(0x252)](rm,_0x11eb30,{'recursive':!![],'force':!![]}),console[_0x19ce3c(0x1d5)]('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x11eb30);}}}async function sweepOrphansBestEffort(_0x5417fe){const _0x50c853=_0x5f5a,_0x52774e={'PBRUf':function(_0x5d79cb,_0x12b06b,_0x7746a2,_0x4ce0f1){return _0x5d79cb(_0x12b06b,_0x7746a2,_0x4ce0f1);},'PXIvU':function(_0x3f5c10){return _0x3f5c10();},'AhwQg':function(_0x5198d9,_0x51fb59){return _0x5198d9(_0x51fb59);}};try{await _0x52774e[_0x50c853(0x1eb)](sweepOrphanLocalProfile,_0x5417fe,getRangerHomeDir(),![]);const _0x1ca387=getRangerDir();_0x1ca387!==_0x52774e['PXIvU'](getRangerHomeDir)&&await sweepOrphanLocalProfile(_0x5417fe,_0x1ca387,!![]);}catch(_0x4da04b){console['log'](_0x50c853(0x200)+(_0x4da04b instanceof Error?_0x4da04b['message']:_0x52774e['AhwQg'](String,_0x4da04b))+').');}}async function markActive(_0x3d8e06){const _0x3970b9=_0x5f5a,_0x5cd458={'zmBxF':function(_0x379b34,_0x1a33f4){return _0x379b34(_0x1a33f4);}};try{await _0x5cd458[_0x3970b9(0x1d8)](writeActiveProfileName,_0x3d8e06),console[_0x3970b9(0x1d5)](_0x3970b9(0x24f)+_0x3d8e06);}catch{console['log']('Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.');}}async function tryAutoRouteCloudProfile(_0x9c8e15,_0x59e282,_0xf62c2b,_0x3b8fc8,_0x16fac5){const _0x3ec470=_0x5f5a,_0x265ce3={'FnkHn':function(_0x189e13,_0x3f6980){return _0x189e13===_0x3f6980;},'EJdmK':function(_0xb3cb5a,_0x29fa08){return _0xb3cb5a instanceof _0x29fa08;},'WNnvA':function(_0x1f09e6,_0x43c633){return _0x1f09e6(_0x43c633);},'DsZBe':'profile.add.autoRouteSkipped','xwKuc':_0x3ec470(0x1df),'bVbYn':function(_0x698d7e,_0xd56a6a){return _0x698d7e+_0xd56a6a;},'aZlAb':function(_0x4ce4df,_0x12ebbe){return _0x4ce4df+_0x12ebbe;},'OSjAo':_0x3ec470(0x251),'yjHSB':function(_0x97ec50,_0x434ad5,_0x4d6df6){return _0x97ec50(_0x434ad5,_0x4d6df6);},'QIWmj':_0x3ec470(0x1ff),'BKKAi':_0x3ec470(0x212),'UZIeS':_0x3ec470(0x22b),'RMAab':_0x3ec470(0x1e1),'rGDlo':function(_0x816e4a,_0x363fa3,_0x483144,_0x23688c){return _0x816e4a(_0x363fa3,_0x483144,_0x23688c);},'KQoUf':function(_0x46b0cd,_0xbf8cca){return _0x46b0cd===_0xbf8cca;},'qkrQh':function(_0x46d599,_0x42680f){return _0x46d599+_0x42680f;},'bzemE':_0x3ec470(0x242)};let _0x3d0a78;try{_0x3d0a78=await fetchAuthConfig();}catch(_0x128e6f){return _0x16fac5?.['trackPhaseEnd'](_0x3ec470(0x21e),{'reason':'no_auth_config','profileName':_0x9c8e15}),console['error']('\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20'+(_0x265ce3[_0x3ec470(0x201)](_0x128e6f,Error)?_0x128e6f['message']:_0x265ce3['WNnvA'](String,_0x128e6f))),![];}if(!_0x3d0a78||!_0x3d0a78['environments']||_0x265ce3['FnkHn'](Object[_0x3ec470(0x223)](_0x3d0a78['environments'])[_0x3ec470(0x215)],0x0)){if(_0x3b8fc8)return await captureEnvLessProfile(_0x9c8e15,_0x59e282,_0xf62c2b,_0x16fac5);return _0x16fac5?.[_0x3ec470(0x1f5)](_0x265ce3['DsZBe'],{'reason':_0x265ce3[_0x3ec470(0x229)],'profileName':_0x9c8e15}),console['error'](_0x265ce3['bVbYn'](_0x265ce3[_0x3ec470(0x1d9)](_0x265ce3[_0x3ec470(0x24e)](_0x265ce3[_0x3ec470(0x1d9)](_0x3ec470(0x227),'\x0a'),_0x265ce3['OSjAo']),_0x3ec470(0x1e5)+_0x9c8e15+_0x3ec470(0x1e2)+_0x59e282+'\x20--skip-auth\x0a')+'\x0a',_0x3ec470(0x1e8))+'\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login'),![];}const _0x3c8237=_0x265ce3[_0x3ec470(0x224)](matchAuthEnvironment,_0x59e282,_0x3d0a78);if(!_0x3c8237)return _0x16fac5?.[_0x3ec470(0x1f5)]('profile.add.autoRouteSkipped',{'reason':_0x265ce3['QIWmj'],'profileName':_0x9c8e15}),console[_0x3ec470(0x21b)](_0x3ec470(0x208)+_0x59e282+'.\x20Configured\x20envs:\x20'+Object[_0x3ec470(0x223)](_0x3d0a78[_0x3ec470(0x211)])[_0x3ec470(0x21a)](',\x20')+'.'),![];const _0x2ffb13=_0x3d0a78['environments'][_0x3c8237],_0x96d5b4=_0x2ffb13?.[_0x3ec470(0x1f1)]??[];if(_0x3b8fc8&&!_0xf62c2b['yes']){const {saveToCloud:_0x5c757c}=await _0x5135e8['prompt']([{'type':'confirm','name':_0x265ce3['BKKAi'],'message':_0x3ec470(0x209)+_0x3c8237+'\x27\x20matching\x20'+_0x59e282+'\x0a\x20\x20(domains:\x20'+_0x96d5b4['join'](',\x20')+_0x3ec470(0x20c)+_0x9c8e15+_0x3ec470(0x214),'default':!![]}]);if(!_0x5c757c)return _0x16fac5?.['trackPhaseEnd'](_0x265ce3[_0x3ec470(0x1d7)],{'reason':_0x265ce3['UZIeS'],'profileName':_0x9c8e15}),console[_0x3ec470(0x21b)](_0x265ce3[_0x3ec470(0x1f3)]),![];}const _0x173e31=_0x96d5b4[_0x3ec470(0x21f)](_0x29c878=>{const _0x3fe97e=_0x3ec470;try{return _0x265ce3[_0x3fe97e(0x1ee)](new URL(_0x29c878)['origin'],new URL(_0x59e282)[_0x3fe97e(0x25a)]);}catch{return![];}}),_0x382f4e={};!_0x173e31&&(_0x382f4e[_0x3ec470(0x1ed)]=_0x59e282);try{await _0x265ce3['rGDlo'](createCloudProfile,_0x9c8e15,_0x3c8237,{'settings':_0x382f4e});}catch(_0x1a548e){if(_0x265ce3[_0x3ec470(0x201)](_0x1a548e,ApiError)&&_0x265ce3[_0x3ec470(0x256)](_0x1a548e['status'],0x199)){console['error']('\x0a\x20\x20A\x20cloud\x20profile\x20named\x20\x22'+_0x9c8e15+_0x3ec470(0x218));throw _0x1a548e;}throw _0x1a548e;}return console['log'](_0x265ce3['qkrQh'](_0x3ec470(0x23f)+_0x9c8e15+'\x27\x20created.\x0a',_0x3ec470(0x1dd)+_0x9c8e15)),await _0x265ce3['WNnvA'](sweepOrphansBestEffort,_0x9c8e15),_0x16fac5?.['trackPhaseEnd'](_0x265ce3[_0x3ec470(0x207)],{'envKey':_0x3c8237,'profileName':_0x9c8e15}),!![];}async function createUnconfiguredCloudProfile(_0x3ef0d4,_0x6f4b73){const _0x26ab3b=_0x5f5a,_0x3843c4={'jrhVr':function(_0x375e8c,_0x31a8c8,_0x159265,_0x24468f){return _0x375e8c(_0x31a8c8,_0x159265,_0x24468f);},'PaAGF':function(_0x63e63a,_0x540d7a){return _0x63e63a instanceof _0x540d7a;}};try{await _0x3843c4[_0x26ab3b(0x258)](createCloudProfile,_0x3ef0d4,undefined,{'settings':_0x6f4b73});}catch(_0x25eab1){_0x3843c4['PaAGF'](_0x25eab1,ApiError)&&_0x25eab1['status']===0x199&&console['error'](_0x26ab3b(0x1ef)+_0x3ef0d4+'\x22\x20already\x20exists.\x20Choose\x20a\x20different\x20name\x20or\x20delete\x20the\x20existing\x20profile\x20first.');throw _0x25eab1;}}async function captureEnvLessProfile(_0x63c91c,_0x21bb33,_0x1bf779,_0x129c3f){const _0x8ada72=_0x5f5a,_0x32a046={'Lvhsi':_0x8ada72(0x226),'JQxKm':_0x8ada72(0x21e),'pSzVh':'user_declined','sLPxs':function(_0x4820f3,_0x571557){return _0x4820f3===_0x571557;},'OAqKb':function(_0x3a4b8f,_0x12ecc8){return _0x3a4b8f+_0x12ecc8;},'LaNMo':function(_0xdadfad,_0x41c102){return _0xdadfad>_0x41c102;},'eAZZj':function(_0x3ac5d5,_0x2a2cdb,_0x2aade4,_0x391b53){return _0x3ac5d5(_0x2a2cdb,_0x2aade4,_0x391b53);},'vDPRq':function(_0x1df93f,_0x4c1e51,_0x14e55a){return _0x1df93f(_0x4c1e51,_0x14e55a);},'voPiL':function(_0xe7158,_0x3e5824){return _0xe7158(_0x3e5824);}};if(!_0x1bf779['yes']){const {capture:_0x1861cf}=await _0x5135e8['prompt']([{'type':_0x8ada72(0x1fa),'name':_0x8ada72(0x257),'message':_0x32a046[_0x8ada72(0x225)],'default':!![]}]);if(!_0x1861cf)return _0x129c3f?.['trackPhaseEnd'](_0x32a046['JQxKm'],{'reason':_0x32a046[_0x8ada72(0x23b)],'profileName':_0x63c91c}),console['error']('\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 _0x3b53b0={};if(_0x1bf779['setupHeader'])for(const _0x17bcd7 of _0x1bf779[_0x8ada72(0x21c)]){const _0x1e3e9f=_0x17bcd7['indexOf'](':');if(_0x32a046['sLPxs'](_0x1e3e9f,-0x1))continue;_0x3b53b0[_0x17bcd7[_0x8ada72(0x1e7)](0x0,_0x1e3e9f)[_0x8ada72(0x24a)]()]=_0x17bcd7['slice'](_0x32a046[_0x8ada72(0x1f4)](_0x1e3e9f,0x1))[_0x8ada72(0x24a)]();}const _0x186573={'baseUrl':_0x21bb33};_0x32a046[_0x8ada72(0x1e9)](Object['keys'](_0x3b53b0)[_0x8ada72(0x215)],0x0)&&(_0x186573[_0x8ada72(0x235)]=_0x3b53b0);let _0x2c428f;try{_0x2c428f=await _0x32a046[_0x8ada72(0x222)](createCloudProfile,_0x63c91c,undefined,{'settings':_0x186573});}catch(_0x26352a){_0x26352a instanceof ApiError&&_0x32a046[_0x8ada72(0x1e6)](_0x26352a['status'],0x199)&&console[_0x8ada72(0x21b)]('\x0a\x20\x20A\x20cloud\x20profile\x20named\x20\x22'+_0x63c91c+'\x22\x20already\x20exists.\x20Choose\x20a\x20different\x20name\x20or\x20delete\x20the\x20existing\x20profile\x20first.');throw _0x26352a;}return await _0x32a046[_0x8ada72(0x241)](manualBrowserLogin,_0x2c428f,{'key':'','domains':[_0x21bb33],'setupHeaders':_0x32a046['LaNMo'](Object['keys'](_0x3b53b0)['length'],0x0)?_0x3b53b0:undefined}),console['log'](_0x8ada72(0x231)+_0x63c91c+'\x27\x20created\x20with\x20a\x20captured\x20session.\x0a'+('\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x63c91c)),await _0x32a046[_0x8ada72(0x1ec)](sweepOrphansBestEffort,_0x63c91c),_0x129c3f?.[_0x8ada72(0x1f5)]('profile.add.autoRouted',{'envKey':null,'profileName':_0x63c91c}),!![];}export async function addEnv(_0x4af174,_0x2d44b4={},_0x3521ae){const _0x34aa44=_0x5f5a,_0x42d15f={'rQscs':function(_0x327242,_0xced69c){return _0x327242+_0xced69c;},'HXsys':_0x34aa44(0x217),'boTlU':_0x34aa44(0x22c),'ZRhZg':_0x34aa44(0x23c),'iokqB':_0x34aa44(0x236),'paTTw':function(_0x437097,_0x328ee2){return _0x437097===_0x328ee2;},'DknrS':function(_0x3528e0,_0x4ecc2e){return _0x3528e0(_0x4ecc2e);},'CDSeD':'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','NUMft':_0x34aa44(0x1e0),'fHGdE':function(_0x3f6f9e,_0x55f9a4){return _0x3f6f9e>_0x55f9a4;},'NXrCy':function(_0x1e64d4,_0x39f53d){return _0x1e64d4||_0x39f53d;},'fkOgB':_0x34aa44(0x1e4),'RikVU':'What\x20would\x20you\x20like\x20to\x20do?','aIvXq':_0x34aa44(0x1f6),'KUody':'continue','tOwyT':function(_0x186c23,_0x1e0f83){return _0x186c23===_0x1e0f83;},'yQDCY':function(_0x3cc4b1,_0x4b0d6b){return _0x3cc4b1===_0x4b0d6b;},'pwBFB':function(_0xb9c449,_0x360ed0){return _0xb9c449 instanceof _0x360ed0;}};_0x2d44b4['ci']&&(console[_0x34aa44(0x21b)](_0x42d15f[_0x34aa44(0x233)](_0x42d15f[_0x34aa44(0x233)](_0x42d15f[_0x34aa44(0x233)](_0x42d15f['HXsys']+'for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a'+'\x0a'+_0x42d15f[_0x34aa44(0x250)],_0x42d15f['ZRhZg']),'\x0a'),'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a')+_0x42d15f['iokqB']),process['exit'](0x1));const _0x146065={};if(_0x2d44b4[_0x34aa44(0x21c)])for(const _0x2c109e of _0x2d44b4[_0x34aa44(0x21c)]){const _0x3de3f9=_0x2c109e[_0x34aa44(0x1fd)](':');if(_0x3de3f9===-0x1)throw new Error('Invalid\x20--setup-header\x20format:\x20\x22'+_0x2c109e+_0x34aa44(0x205));const _0x681897=_0x2c109e[_0x34aa44(0x1e7)](0x0,_0x3de3f9)[_0x34aa44(0x24a)](),_0xcb0ed6=_0x2c109e['slice'](_0x3de3f9+0x1)[_0x34aa44(0x24a)]();_0x146065[_0x681897]=_0xcb0ed6;}if(_0x2d44b4[_0x34aa44(0x1dc)]!==undefined&&_0x42d15f[_0x34aa44(0x219)](_0x2d44b4[_0x34aa44(0x1dc)][_0x34aa44(0x24a)](),''))throw new Error(_0x34aa44(0x1fb));if(_0x2d44b4['cdpEndpoint']&&_0x2d44b4[_0x34aa44(0x21d)])throw new Error(_0x34aa44(0x1f7));const _0x5873fd=_0x42d15f['DknrS'](Boolean,_0x2d44b4['cdpEndpoint']),_0x4a79a4=process['stdin'][_0x34aa44(0x1d6)]&&process[_0x34aa44(0x255)][_0x34aa44(0x1d6)];if(!_0x4a79a4&&!_0x2d44b4[_0x34aa44(0x21d)]&&!_0x5873fd&&!_0x2d44b4['skipAuth'])throw new Error(_0x42d15f['CDSeD']);if(_0x5873fd){const _0x37b470=_0x2d44b4[_0x34aa44(0x1dc)];console['log'](_0x42d15f['NUMft']),console[_0x34aa44(0x1d5)]('\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20'+_0x37b470);const _0xe55dc2={'cdpEndpoint':_0x37b470,'isElectron':!![]};Object[_0x34aa44(0x223)](_0x146065)['length']>0x0&&(_0xe55dc2['setupHeaders']=_0x146065);await createUnconfiguredCloudProfile(_0x4af174,_0xe55dc2);try{setProfileOverride(process['cwd'](),_0x4af174,_0x34aa44(0x1dc),_0x37b470),setProfileOverride(process['cwd'](),_0x4af174,_0x34aa44(0x1fc),!![]);}catch(_0x46989c){console[_0x34aa44(0x21b)]('\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20'+(_0x46989c instanceof Error?_0x46989c['message']:_0x42d15f[_0x34aa44(0x206)](String,_0x46989c)));}console[_0x34aa44(0x1d5)](_0x34aa44(0x204)+_0x4af174+_0x34aa44(0x247)),await _0x42d15f[_0x34aa44(0x206)](sweepOrphansBestEffort,_0x4af174),await markActive(_0x4af174);return;}if(_0x2d44b4['skipAuth']){const _0x12589d={};_0x2d44b4[_0x34aa44(0x21d)]&&(_0x12589d[_0x34aa44(0x1ed)]=_0x2d44b4[_0x34aa44(0x21d)]);_0x42d15f['fHGdE'](Object['keys'](_0x146065)['length'],0x0)&&(_0x12589d['setupHeaders']=_0x146065);await createUnconfiguredCloudProfile(_0x4af174,_0x12589d),console[_0x34aa44(0x1d5)](_0x34aa44(0x23f)+_0x4af174+_0x34aa44(0x230)+('\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20'+_0x4af174+_0x34aa44(0x1f9))),await sweepOrphansBestEffort(_0x4af174),await markActive(_0x4af174);return;}if(_0x2d44b4[_0x34aa44(0x21d)]){const _0x73279=_0x2d44b4[_0x34aa44(0x21d)],_0x276a4a=await checkUrlReachability(_0x73279);if(!_0x276a4a['ok']&&!_0x2d44b4['force'])throw new Error(_0x34aa44(0x24c)+_0x73279+':\x20'+_0x276a4a['error']+_0x34aa44(0x248));!_0x276a4a['ok']&&_0x2d44b4['force']&&console[_0x34aa44(0x1d5)]('⚠\x20Could\x20not\x20reach\x20'+_0x73279+':\x20'+_0x276a4a[_0x34aa44(0x21b)]+'\x20(continuing\x20with\x20--force)');}else{console['log'](_0x34aa44(0x210)),console[_0x34aa44(0x1d5)](_0x34aa44(0x23e)),console['log'](_0x34aa44(0x1f2));let _0x20f1e5='',_0x2ef3ef=![];while(!![]){const _0x5c3eab=await _0x5135e8[_0x34aa44(0x1e3)]([{'type':_0x34aa44(0x20a),'name':_0x34aa44(0x1ed),'message':_0x2ef3ef?'Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):':_0x34aa44(0x244),'default':_0x42d15f['NXrCy'](_0x20f1e5,_0x34aa44(0x1da))}]);_0x20f1e5=_0x5c3eab[_0x34aa44(0x1ed)];const _0x31045d=await _0x42d15f['DknrS'](checkUrlReachability,_0x20f1e5);if(_0x31045d['ok'])break;const _0x6b0f39=/^[a-zA-Z][\w+.-]*:\/\//['test'](_0x20f1e5),_0x405381=_0x31045d[_0x34aa44(0x220)]&&!_0x6b0f39,_0x385cd7=_0x405381?'http://'+_0x20f1e5:null;_0x2ef3ef=!![],console[_0x34aa44(0x1d5)](_0x34aa44(0x228)+_0x20f1e5+':\x20'+_0x31045d['error']);_0x385cd7&&console[_0x34aa44(0x1d5)](_0x34aa44(0x243)+_0x385cd7+'?');const {action:_0x106b04}=await _0x5135e8[_0x34aa44(0x1e3)]([{'type':'list','name':_0x42d15f['fkOgB'],'message':_0x42d15f[_0x34aa44(0x202)],'choices':[..._0x385cd7?[{'name':_0x34aa44(0x259)+_0x385cd7,'value':'use_suggestion'}]:[],{'name':_0x34aa44(0x249),'value':_0x42d15f['aIvXq']},{'name':'Continue\x20anyway','value':_0x42d15f['KUody']}]}]);if(_0x42d15f[_0x34aa44(0x22f)](_0x106b04,'use_suggestion')&&_0x385cd7){_0x20f1e5=_0x385cd7;const _0x4043bd=await _0x42d15f[_0x34aa44(0x206)](checkUrlReachability,_0x20f1e5);if(_0x4043bd['ok'])break;console[_0x34aa44(0x1d5)](_0x34aa44(0x20b)+_0x20f1e5+':\x20'+_0x4043bd['error']);}else{if(_0x42d15f['yQDCY'](_0x106b04,'continue'))break;}}_0x2d44b4={..._0x2d44b4,'url':_0x20f1e5};}let _0x43c8d4=![];try{_0x43c8d4=await tryAutoRouteCloudProfile(_0x4af174,_0x2d44b4['url'],_0x2d44b4,_0x4a79a4,_0x3521ae);}catch(_0x49452a){console['error'](_0x34aa44(0x20d)+_0x4af174+_0x34aa44(0x246)+(_0x42d15f['pwBFB'](_0x49452a,Error)?_0x49452a[_0x34aa44(0x1f8)]:_0x42d15f[_0x34aa44(0x206)](String,_0x49452a))),process[_0x34aa44(0x221)](0x1);}!_0x43c8d4&&process['exit'](0x1),await markActive(_0x4af174);}
1
+ (function(_0x3a7b82,_0x51edb0){const _0x5809ae=_0x332f,_0x4dd505=_0x3a7b82();while(!![]){try{const _0x5c8dc1=-parseInt(_0x5809ae(0x16b))/0x1+-parseInt(_0x5809ae(0x189))/0x2*(-parseInt(_0x5809ae(0x195))/0x3)+parseInt(_0x5809ae(0x197))/0x4*(-parseInt(_0x5809ae(0x14b))/0x5)+-parseInt(_0x5809ae(0x1af))/0x6*(-parseInt(_0x5809ae(0x199))/0x7)+-parseInt(_0x5809ae(0x19e))/0x8+-parseInt(_0x5809ae(0x196))/0x9*(parseInt(_0x5809ae(0x16d))/0xa)+-parseInt(_0x5809ae(0x192))/0xb*(-parseInt(_0x5809ae(0x15d))/0xc);if(_0x5c8dc1===_0x51edb0)break;else _0x4dd505['push'](_0x4dd505['shift']());}catch(_0xd71988){_0x4dd505['push'](_0x4dd505['shift']());}}}(_0x2ae8,0xdef6f));import{readdir,rm}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import _0x356642 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{matchAuthEnvironment}from'./utils/matchAuthEnvironment.js';import{isPathGitTracked}from'./utils/gitTracked.js';import{setProfileOverride}from'./utils/projectsConfig.js';async function checkUrlReachability(_0x2b8bc2){const _0x473a0e=_0x332f,_0x586490={'NwNNX':function(_0x230330,_0x56f7d9,_0x55a319){return _0x230330(_0x56f7d9,_0x55a319);},'WHzsY':function(_0x536408,_0x430383){return _0x536408(_0x430383);},'srfLx':function(_0xf5acde,_0x2da8b1){return _0xf5acde<_0x2da8b1;},'mPjbA':function(_0x5618fa,_0x31dac8){return _0x5618fa===_0x31dac8;},'IjvJk':'fetch\x20failed'};try{const _0x12a9e1=new AbortController(),_0xf4dc5f=setTimeout(()=>_0x12a9e1['abort'](),0x1388),_0x2f37df={'method':_0x473a0e(0x160),'signal':_0x12a9e1['signal'],'redirect':_0x473a0e(0x18f)};/^https:\/\/localhost(:\d+)?/i['test'](_0x2b8bc2)&&(process[_0x473a0e(0x1b5)][_0x473a0e(0x1a3)]='0');const _0xce2d87=await _0x586490[_0x473a0e(0x1b2)](fetch,_0x2b8bc2,_0x2f37df);delete process['env'][_0x473a0e(0x1a3)],_0x586490[_0x473a0e(0x1c7)](clearTimeout,_0xf4dc5f);if(_0x586490[_0x473a0e(0x149)](_0xce2d87['status'],0x190))return{'ok':!![]};return{'ok':![],'error':_0x473a0e(0x14a)+_0xce2d87['status']};}catch(_0x467aae){delete process[_0x473a0e(0x1b5)]['NODE_TLS_REJECT_UNAUTHORIZED'];const _0xa6f0=_0x467aae,_0x59c006=_0xa6f0[_0x473a0e(0x180)]||String(_0x467aae),_0x16013a=_0x59c006[_0x473a0e(0x19f)]('Invalid\x20URL')||_0x586490[_0x473a0e(0x161)](_0xa6f0['name'],_0x473a0e(0x18b))||_0x59c006['includes'](_0x586490['IjvJk']);return{'ok':![],'error':_0x59c006,'isProtocolError':_0x16013a};}}async function sweepOrphanLocalProfile(_0x3455f7,_0x171edb,_0x355c12){const _0x42c640=_0x332f,_0x3c77a5={'sZRdE':function(_0x31352e,_0x164271,_0x17d89c){return _0x31352e(_0x164271,_0x17d89c);},'lFNCB':'local','iiUkL':function(_0x1a0b0a,_0x78afa5){return _0x1a0b0a(_0x78afa5);}},_0x5233d8=_0x3c77a5[_0x42c640(0x185)](join,_0x171edb,_0x3c77a5[_0x42c640(0x159)]),_0x275d18=_0x3c77a5[_0x42c640(0x185)](join,_0x5233d8,_0x3455f7);existsSync(_0x275d18)&&(_0x355c12&&await isPathGitTracked(_0x275d18)?console['log']('\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20'+_0x275d18+_0x42c640(0x19a)):(await rm(_0x275d18,{'recursive':!![],'force':!![]}),console[_0x42c640(0x1a4)](_0x42c640(0x17f)+_0x275d18)));if(_0x3c77a5['iiUkL'](existsSync,_0x5233d8)){let _0x420890=[];try{_0x420890=await readdir(_0x5233d8);}catch{return;}const _0x527ad0='.tmp-'+_0x3455f7+'-';for(const _0x24580f of _0x420890){if(!_0x24580f[_0x42c640(0x177)](_0x527ad0))continue;const _0x2abab2=_0x3c77a5[_0x42c640(0x185)](join,_0x5233d8,_0x24580f);await rm(_0x2abab2,{'recursive':!![],'force':!![]}),console[_0x42c640(0x1a4)](_0x42c640(0x17f)+_0x2abab2);}}}async function sweepOrphansBestEffort(_0x2803c2){const _0x135974=_0x332f,_0x154008={'FUgJA':function(_0x44a825,_0x106cd6){return _0x44a825!==_0x106cd6;},'ycldD':function(_0x3b0cac,_0x2cee7e){return _0x3b0cac(_0x2cee7e);}};try{await sweepOrphanLocalProfile(_0x2803c2,getRangerHomeDir(),![]);const _0x2f19ae=getRangerDir();_0x154008[_0x135974(0x170)](_0x2f19ae,getRangerHomeDir())&&await sweepOrphanLocalProfile(_0x2803c2,_0x2f19ae,!![]);}catch(_0x55471b){console['log'](_0x135974(0x154)+(_0x55471b instanceof Error?_0x55471b[_0x135974(0x180)]:_0x154008['ycldD'](String,_0x55471b))+').');}}function _0x2ae8(){const _0x34d4a4=['\x0a🌐\x20Profile\x20Setup\x0a','\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','HEAD','mPjbA','Hbiap','MpWhs','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','RPpAN','\x20\x20Next:\x20ranger\x20go\x20--profile\x20','url','KjJyd','cwd','http://localhost:3000','530962klazPe','⚠\x20Could\x20not\x20reach\x20','290tfKxJz','FLsnp','JfLls','FUgJA','capture','profile.add.autoRouteSkipped','cdpEndpoint','RxqRK','\x0a\x20\x20(domains:\x20','\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22','startsWith','prompt','hBywO','retry','UtpqF','\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20','WxvLA','KssPC','\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20','message','--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','trackPhaseEnd','What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','error','sZRdE','fJZCP','Use\x20','ncNoK','8WojPSV','hcpBZ','TypeError','iuERG','\x20\x20Did\x20you\x20mean\x20','\x0a\x20\x20Still\x20could\x20not\x20reach\x20','manual','Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','`\x20again\x20without\x20--skip-auth.','21399917XpGspx','continue','input','196539tSoozh','241443wvEVpB','2104QHYTuQ','FvEyC','14hmGvZe','\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.','What\x20would\x20you\x20like\x20to\x20do?','qGHRT','\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a','2161544wcNQeh','includes','keys','zWXnJ','ghDsV','NODE_TLS_REJECT_UNAUTHORIZED','log','yes','action','exit','vaWRj','otUeX','baseUrl','setupHeaders','\x0a\x20\x20A\x20profile\x20named\x20\x22','for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a','Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','3191724pVOOyR','To\x20set\x20up\x20a\x20profile,\x20run:\x0a','length','NwNNX','BpHIF','Enter\x20a\x20different\x20URL','env','confirm','\x27\x20to\x20the\x20cloud?','status','\x27\x20matching\x20','QfMHx','\x20\x20https://docs.ranger.net/main/concepts/profiles','\x22.\x20Expected\x20\x22Name:\x20Value\x22.','YjCCF','luZOJ','isElectron','✓\x20Profile\x20\x27','domains','slice','join','\x22:\x20','profile.add.autoRouted','mkRQP','WHzsY','\x20\x20Set\x20active\x20profile:\x20','srfLx','HTTP\x20','7405CoDTPT','\x20--url\x20','trim','\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20','environments','Could\x20not\x20reach\x20','saveToCloud','xfGOB','\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20(','use_suggestion','force','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a','\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','lFNCB','--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','GSkDI','\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.','12wPBOTR'];_0x2ae8=function(){return _0x34d4a4;};return _0x2ae8();}async function markActive(_0x21e361){const _0x3c35f6=_0x332f,_0x5bafed={'TeyTK':'Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.'};try{await writeActiveProfileName(_0x21e361),console[_0x3c35f6(0x1a4)](_0x3c35f6(0x1c8)+_0x21e361);}catch{console['log'](_0x5bafed['TeyTK']);}}async function tryAutoRouteCloudProfile(_0x5b323e,_0x172863,_0x131112,_0x2ecc43,_0x465de2){const _0x272560=_0x332f,_0x587951={'cNFSf':function(_0x1ffd00,_0x241b06){return _0x1ffd00===_0x241b06;},'MpWhs':function(_0x44530a,_0x3a5b8f){return _0x44530a instanceof _0x3a5b8f;},'ieMlw':function(_0x3a3a7b,_0x16cc2c){return _0x3a3a7b(_0x16cc2c);},'mkRQP':'profile.add.autoRouteSkipped','otUeX':function(_0x628bda,_0x4616d4){return _0x628bda+_0x4616d4;},'PEqvF':function(_0x471285,_0x31bd7b){return _0x471285+_0x31bd7b;},'MmyMC':'\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','mdOnB':_0x272560(0x19d),'WxvLA':'\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a','zlifT':_0x272560(0x15f),'jsdwk':function(_0x287c68,_0x5963d2,_0x4ac38a){return _0x287c68(_0x5963d2,_0x4ac38a);},'Srqoi':'no_match','zXWpQ':'user_declined','JfLls':_0x272560(0x1c5)};let _0x116fc8;try{_0x116fc8=await fetchAuthConfig();}catch(_0x1a8397){return _0x465de2?.['trackPhaseEnd'](_0x272560(0x172),{'reason':'no_auth_config','profileName':_0x5b323e}),console['error'](_0x272560(0x14f)+(_0x587951[_0x272560(0x163)](_0x1a8397,Error)?_0x1a8397['message']:_0x587951['ieMlw'](String,_0x1a8397))),![];}if(!_0x116fc8||!_0x116fc8['environments']||Object[_0x272560(0x1a0)](_0x116fc8[_0x272560(0x150)])[_0x272560(0x1b1)]===0x0){if(_0x2ecc43)return await captureEnvLessProfile(_0x5b323e,_0x172863,_0x131112,_0x465de2);return _0x465de2?.['trackPhaseEnd'](_0x587951['mkRQP'],{'reason':'no_auth_config','profileName':_0x5b323e}),console[_0x272560(0x184)](_0x587951[_0x272560(0x1a9)](_0x587951['PEqvF'](_0x587951['MmyMC'],'\x0a')+_0x587951['mdOnB']+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20'+_0x5b323e+_0x272560(0x14c)+_0x172863+'\x20--skip-auth\x0a')+'\x0a',_0x587951[_0x272560(0x17d)])+_0x587951['zlifT']),![];}const _0x536407=_0x587951['jsdwk'](matchAuthEnvironment,_0x172863,_0x116fc8);if(!_0x536407)return _0x465de2?.['trackPhaseEnd'](_0x587951[_0x272560(0x1c6)],{'reason':_0x587951['Srqoi'],'profileName':_0x5b323e}),console[_0x272560(0x184)]('\x0a\x20\x20No\x20auth\x20env\x20matches\x20'+_0x172863+'.\x20Configured\x20envs:\x20'+Object['keys'](_0x116fc8[_0x272560(0x150)])[_0x272560(0x1c3)](',\x20')+'.'),![];const _0x4bf430=_0x116fc8[_0x272560(0x150)][_0x536407],_0x3d0b07=_0x4bf430?.[_0x272560(0x1c1)]??[];if(_0x2ecc43&&!_0x131112[_0x272560(0x1a5)]){const {saveToCloud:_0x38de62}=await _0x356642['prompt']([{'type':_0x272560(0x1b6),'name':_0x272560(0x152),'message':'Found\x20auth\x20environment\x20\x27'+_0x536407+_0x272560(0x1b9)+_0x172863+_0x272560(0x175)+_0x3d0b07[_0x272560(0x1c3)](',\x20')+')\x0a\x20\x20Save\x20\x27'+_0x5b323e+_0x272560(0x1b7),'default':!![]}]);if(!_0x38de62)return _0x465de2?.[_0x272560(0x182)](_0x587951['mkRQP'],{'reason':_0x587951['zXWpQ'],'profileName':_0x5b323e}),console['error']('\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.'),![];}const _0x38321d=_0x3d0b07['some'](_0x5b6a03=>{try{return _0x587951['cNFSf'](new URL(_0x5b6a03)['origin'],new URL(_0x172863)['origin']);}catch{return![];}}),_0x338ecb={};!_0x38321d&&(_0x338ecb['baseUrl']=_0x172863);try{await createCloudProfile(_0x5b323e,_0x536407,{'settings':_0x338ecb});}catch(_0x50f856){if(_0x50f856 instanceof ApiError&&_0x50f856['status']===0x199){console['error'](_0x272560(0x1ac)+_0x5b323e+_0x272560(0x158)+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x5b323e));throw _0x50f856;}throw _0x50f856;}return console['log'](_0x587951['PEqvF']('✓\x20Profile\x20\x27'+_0x5b323e+'\x27\x20created.\x0a',_0x272560(0x166)+_0x5b323e)),await _0x587951['ieMlw'](sweepOrphansBestEffort,_0x5b323e),_0x465de2?.[_0x272560(0x182)](_0x587951[_0x272560(0x16f)],{'envKey':_0x536407,'profileName':_0x5b323e}),!![];}async function createUnconfiguredCloudProfile(_0x4cf094,_0x2060ca){const _0x2d37dd=_0x332f;try{await createCloudProfile(_0x4cf094,undefined,{'settings':_0x2060ca});}catch(_0x8a7084){_0x8a7084 instanceof ApiError&&_0x8a7084['status']===0x199&&console[_0x2d37dd(0x184)](_0x2d37dd(0x1ac)+_0x4cf094+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a'+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x4cf094));throw _0x8a7084;}}function _0x332f(_0x46d516,_0x50f596){_0x46d516=_0x46d516-0x149;const _0x2ae82e=_0x2ae8();let _0x332f2f=_0x2ae82e[_0x46d516];return _0x332f2f;}async function captureEnvLessProfile(_0x310457,_0x58cf30,_0x4eb74f,_0x4fe327){const _0xced005=_0x332f,_0x379fb8={'YVdQW':'confirm','ncNoK':'user_declined','BpHIF':function(_0x3d6842,_0x2c068d){return _0x3d6842+_0x2c068d;},'UtpqF':function(_0xb9964f,_0x3df03b){return _0xb9964f===_0x3df03b;},'jynut':function(_0x41eb3c,_0x3fa305){return _0x41eb3c>_0x3fa305;},'luZOJ':function(_0x3011be,_0x1ef4d3,_0xd24a7,_0x527cd2){return _0x3011be(_0x1ef4d3,_0xd24a7,_0x527cd2);},'zWXnJ':function(_0x4de165,_0x1da359){return _0x4de165 instanceof _0x1da359;},'hcpBZ':function(_0x164031,_0xba4341,_0x11046b){return _0x164031(_0xba4341,_0x11046b);},'pIXoc':_0xced005(0x1c5)};if(!_0x4eb74f['yes']){const {capture:_0x434ff0}=await _0x356642[_0xced005(0x178)]([{'type':_0x379fb8['YVdQW'],'name':_0xced005(0x171),'message':_0xced005(0x1ae),'default':!![]}]);if(!_0x434ff0)return _0x4fe327?.[_0xced005(0x182)](_0xced005(0x172),{'reason':_0x379fb8[_0xced005(0x188)],'profileName':_0x310457}),console['error'](_0x379fb8[_0xced005(0x1b3)](_0xced005(0x157),'\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.')),![];}const _0x5f41d4={};if(_0x4eb74f['setupHeader'])for(const _0x37c4a5 of _0x4eb74f['setupHeader']){const _0x288345=_0x37c4a5['indexOf'](':');if(_0x379fb8[_0xced005(0x17b)](_0x288345,-0x1))continue;_0x5f41d4[_0x37c4a5['slice'](0x0,_0x288345)[_0xced005(0x14d)]()]=_0x37c4a5[_0xced005(0x1c2)](_0x288345+0x1)['trim']();}const _0x638116={'baseUrl':_0x58cf30};_0x379fb8['jynut'](Object['keys'](_0x5f41d4)['length'],0x0)&&(_0x638116[_0xced005(0x1ab)]=_0x5f41d4);let _0x4eb625;try{_0x4eb625=await _0x379fb8[_0xced005(0x1be)](createCloudProfile,_0x310457,undefined,{'settings':_0x638116});}catch(_0x3c63de){_0x379fb8[_0xced005(0x1a1)](_0x3c63de,ApiError)&&_0x379fb8['UtpqF'](_0x3c63de[_0xced005(0x1b8)],0x199)&&console[_0xced005(0x184)]('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x310457+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a'+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x310457));throw _0x3c63de;}return await _0x379fb8[_0xced005(0x18a)](manualBrowserLogin,_0x4eb625,{'key':'','domains':[_0x58cf30],'setupHeaders':Object['keys'](_0x5f41d4)['length']>0x0?_0x5f41d4:undefined}),console[_0xced005(0x1a4)]('\x0a✓\x20Profile\x20\x27'+_0x310457+'\x27\x20created\x20with\x20a\x20captured\x20session.\x0a'+('\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x310457)),await sweepOrphansBestEffort(_0x310457),_0x4fe327?.[_0xced005(0x182)](_0x379fb8['pIXoc'],{'envKey':null,'profileName':_0x310457}),!![];}export async function addEnv(_0x5fbf0f,_0x300611={},_0x24c80a){const _0x5aa2ce=_0x332f,_0x91573d={'oqhpD':_0x5aa2ce(0x1ad),'FLsnp':_0x5aa2ce(0x1b0),'hBywO':function(_0x1b07e1,_0x22ed34){return _0x1b07e1+_0x22ed34;},'vaWRj':function(_0x1780be,_0x588b73){return _0x1780be!==_0x588b73;},'QfMHx':function(_0x2c7e68,_0x549257){return _0x2c7e68===_0x549257;},'iuERG':_0x5aa2ce(0x181),'vxWsw':_0x5aa2ce(0x15a),'oGVaO':function(_0x1edf21,_0x4cbc04){return _0x1edf21(_0x4cbc04);},'RxqRK':function(_0x1448c9,_0x4b2efc,_0x5a88ae){return _0x1448c9(_0x4b2efc,_0x5a88ae);},'fJZCP':function(_0x59b22b,_0x4261d3,_0x9cb2be,_0x1d0ed1,_0x5c83c2){return _0x59b22b(_0x4261d3,_0x9cb2be,_0x1d0ed1,_0x5c83c2);},'Hbiap':function(_0x26f963,_0xf287dd,_0x3abd86,_0x13aaa4,_0xe9108){return _0x26f963(_0xf287dd,_0x3abd86,_0x13aaa4,_0xe9108);},'dMwIa':_0x5aa2ce(0x1bf),'aOxii':function(_0x4e9593,_0x574da6){return _0x4e9593(_0x574da6);},'KjJyd':function(_0x3b04a2,_0xebc72c){return _0x3b04a2>_0xebc72c;},'qGHRT':function(_0x5b7e72,_0xd44ad3){return _0x5b7e72(_0xd44ad3);},'ghDsV':function(_0x1f7741,_0x4513fe){return _0x1f7741(_0x4513fe);},'JjFVt':_0x5aa2ce(0x1aa),'RPpAN':_0x5aa2ce(0x190),'YjCCF':_0x5aa2ce(0x16a),'FvEyC':_0x5aa2ce(0x1a6),'KssPC':_0x5aa2ce(0x19b),'xfGOB':_0x5aa2ce(0x1b4),'ZTdOg':'Continue\x20anyway','SMvUK':function(_0x29f1b2,_0x441072){return _0x29f1b2===_0x441072;},'Rfhha':_0x5aa2ce(0x155),'GSkDI':function(_0x433218,_0x2c4f69){return _0x433218(_0x2c4f69);}};_0x300611['ci']&&(console[_0x5aa2ce(0x184)]('The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a'+_0x91573d['oqhpD']+'\x0a'+_0x91573d[_0x5aa2ce(0x16e)]+'\x20\x20ranger\x20profile\x20add\x20<name>\x0a'+'\x0a'+'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a'+_0x5aa2ce(0x1bb)),process['exit'](0x1));const _0x1a5f1b={};if(_0x300611['setupHeader'])for(const _0x51d256 of _0x300611['setupHeader']){const _0x6b1f77=_0x51d256['indexOf'](':');if(_0x6b1f77===-0x1)throw new Error('Invalid\x20--setup-header\x20format:\x20\x22'+_0x51d256+_0x5aa2ce(0x1bc));const _0x1db0cd=_0x51d256[_0x5aa2ce(0x1c2)](0x0,_0x6b1f77)[_0x5aa2ce(0x14d)](),_0x49a291=_0x51d256['slice'](_0x91573d[_0x5aa2ce(0x179)](_0x6b1f77,0x1))['trim']();_0x1a5f1b[_0x1db0cd]=_0x49a291;}if(_0x91573d[_0x5aa2ce(0x1a8)](_0x300611[_0x5aa2ce(0x173)],undefined)&&_0x91573d[_0x5aa2ce(0x1ba)](_0x300611['cdpEndpoint']['trim'](),''))throw new Error(_0x91573d[_0x5aa2ce(0x18c)]);if(_0x300611['cdpEndpoint']&&_0x300611['url'])throw new Error(_0x91573d['vxWsw']);const _0x3910c9=_0x91573d['oGVaO'](Boolean,_0x300611['cdpEndpoint']),_0x45543a=process['stdin']['isTTY']&&process['stdout']['isTTY'];if(!_0x45543a&&!_0x300611['url']&&!_0x3910c9&&!_0x300611['skipAuth'])throw new Error('Please\x20provide\x20--url\x20when\x20running\x20in\x20non-interactive\x20mode.\x0aMake\x20sure\x20the\x20service\x20is\x20running\x20on\x20that\x20port\x20before\x20retrying.\x0aExample:\x20ranger\x20profile\x20add\x20local\x20--url\x20http://localhost:3000');if(_0x3910c9){const _0x5e0be3=_0x300611[_0x5aa2ce(0x173)];console[_0x5aa2ce(0x1a4)](_0x5aa2ce(0x14e)),console['log']('\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20'+_0x5e0be3);const _0x4bf96b={'cdpEndpoint':_0x5e0be3,'isElectron':!![]};Object['keys'](_0x1a5f1b)['length']>0x0&&(_0x4bf96b[_0x5aa2ce(0x1ab)]=_0x1a5f1b);await _0x91573d[_0x5aa2ce(0x174)](createUnconfiguredCloudProfile,_0x5fbf0f,_0x4bf96b);try{_0x91573d[_0x5aa2ce(0x186)](setProfileOverride,process['cwd'](),_0x5fbf0f,_0x5aa2ce(0x173),_0x5e0be3),_0x91573d[_0x5aa2ce(0x162)](setProfileOverride,process[_0x5aa2ce(0x169)](),_0x5fbf0f,_0x91573d['dMwIa'],!![]);}catch(_0x3491fd){console[_0x5aa2ce(0x184)](_0x5aa2ce(0x17c)+(_0x3491fd instanceof Error?_0x3491fd[_0x5aa2ce(0x180)]:String(_0x3491fd)));}console[_0x5aa2ce(0x1a4)]('✓\x20Cloud\x20profile\x20\x27'+_0x5fbf0f+'\x27\x20created\x20(CDP).'),await _0x91573d['aOxii'](sweepOrphansBestEffort,_0x5fbf0f),await markActive(_0x5fbf0f);return;}if(_0x300611['skipAuth']){const _0x37e18b={};_0x300611[_0x5aa2ce(0x167)]&&(_0x37e18b[_0x5aa2ce(0x1aa)]=_0x300611['url']);_0x91573d[_0x5aa2ce(0x168)](Object[_0x5aa2ce(0x1a0)](_0x1a5f1b)['length'],0x0)&&(_0x37e18b['setupHeaders']=_0x1a5f1b);await createUnconfiguredCloudProfile(_0x5fbf0f,_0x37e18b),console['log'](_0x91573d['hBywO'](_0x5aa2ce(0x1c0)+_0x5fbf0f+'\x27\x20created\x20(no\x20session).\x0a','\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20'+_0x5fbf0f+_0x5aa2ce(0x191))),await _0x91573d[_0x5aa2ce(0x19c)](sweepOrphansBestEffort,_0x5fbf0f),await _0x91573d[_0x5aa2ce(0x1a2)](markActive,_0x5fbf0f);return;}if(_0x300611['url']){const _0x5732cb=_0x300611['url'],_0x5c237e=await _0x91573d['oGVaO'](checkUrlReachability,_0x5732cb);if(!_0x5c237e['ok']&&!_0x300611[_0x5aa2ce(0x156)])throw new Error(_0x5aa2ce(0x151)+_0x5732cb+':\x20'+_0x5c237e['error']+_0x5aa2ce(0x15c));!_0x5c237e['ok']&&_0x300611['force']&&console['log'](_0x5aa2ce(0x16c)+_0x5732cb+':\x20'+_0x5c237e[_0x5aa2ce(0x184)]+'\x20(continuing\x20with\x20--force)');}else{console['log'](_0x5aa2ce(0x15e)),console[_0x5aa2ce(0x1a4)](_0x5aa2ce(0x164)),console[_0x5aa2ce(0x1a4)]('\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a');let _0x2774bb='',_0x429716=![];while(!![]){const _0xb4b7b5=await _0x356642['prompt']([{'type':_0x5aa2ce(0x194),'name':_0x91573d['JjFVt'],'message':_0x429716?_0x91573d[_0x5aa2ce(0x165)]:_0x5aa2ce(0x183),'default':_0x2774bb||_0x91573d[_0x5aa2ce(0x1bd)]}]);_0x2774bb=_0xb4b7b5['baseUrl'];const _0x78d5fe=await checkUrlReachability(_0x2774bb);if(_0x78d5fe['ok'])break;const _0x4da3af=/^[a-zA-Z][\w+.-]*:\/\//['test'](_0x2774bb),_0x1bf393=_0x78d5fe['isProtocolError']&&!_0x4da3af,_0x58ad06=_0x1bf393?'http://'+_0x2774bb:null;_0x429716=!![],console[_0x5aa2ce(0x1a4)]('\x0a\x20\x20Could\x20not\x20reach\x20'+_0x2774bb+':\x20'+_0x78d5fe['error']);_0x58ad06&&console[_0x5aa2ce(0x1a4)](_0x5aa2ce(0x18d)+_0x58ad06+'?');const {action:_0x537b94}=await _0x356642['prompt']([{'type':'list','name':_0x91573d[_0x5aa2ce(0x198)],'message':_0x91573d[_0x5aa2ce(0x17e)],'choices':[..._0x58ad06?[{'name':_0x5aa2ce(0x187)+_0x58ad06,'value':_0x5aa2ce(0x155)}]:[],{'name':_0x91573d[_0x5aa2ce(0x153)],'value':_0x5aa2ce(0x17a)},{'name':_0x91573d['ZTdOg'],'value':'continue'}]}]);if(_0x91573d['SMvUK'](_0x537b94,_0x91573d['Rfhha'])&&_0x58ad06){_0x2774bb=_0x58ad06;const _0x1c5a26=await _0x91573d[_0x5aa2ce(0x15b)](checkUrlReachability,_0x2774bb);if(_0x1c5a26['ok'])break;console['log'](_0x5aa2ce(0x18e)+_0x2774bb+':\x20'+_0x1c5a26['error']);}else{if(_0x537b94===_0x5aa2ce(0x193))break;}}_0x300611={..._0x300611,'url':_0x2774bb};}let _0x3a73d6=![];try{_0x3a73d6=await tryAutoRouteCloudProfile(_0x5fbf0f,_0x300611[_0x5aa2ce(0x167)],_0x300611,_0x45543a,_0x24c80a);}catch(_0x1e9757){console['error'](_0x5aa2ce(0x176)+_0x5fbf0f+_0x5aa2ce(0x1c4)+(_0x1e9757 instanceof Error?_0x1e9757[_0x5aa2ce(0x180)]:String(_0x1e9757))),process[_0x5aa2ce(0x1a7)](0x1);}!_0x3a73d6&&process['exit'](0x1),await _0x91573d[_0x5aa2ce(0x15b)](markActive,_0x5fbf0f);}
@@ -1 +1 @@
1
- (function(_0x41c173,_0xca6219){var _0x2b428d=_0x4a9e,_0x10b672=_0x41c173();while(!![]){try{var _0x3472f9=parseInt(_0x2b428d(0x188))/0x1+-parseInt(_0x2b428d(0x194))/0x2*(parseInt(_0x2b428d(0x18c))/0x3)+-parseInt(_0x2b428d(0x193))/0x4+-parseInt(_0x2b428d(0x189))/0x5*(-parseInt(_0x2b428d(0x192))/0x6)+parseInt(_0x2b428d(0x195))/0x7+parseInt(_0x2b428d(0x18b))/0x8+-parseInt(_0x2b428d(0x18a))/0x9*(-parseInt(_0x2b428d(0x190))/0xa);if(_0x3472f9===_0xca6219)break;else _0x10b672['push'](_0x10b672['shift']());}catch(_0x542572){_0x10b672['push'](_0x10b672['shift']());}}}(_0x2a48,0x68ea8));function _0x4a9e(_0x3e1734,_0x4b80aa){_0x3e1734=_0x3e1734-0x188;var _0x2a487e=_0x2a48();var _0x4a9eaf=_0x2a487e[_0x3e1734];return _0x4a9eaf;}function _0x2a48(){var _0x954cf1=['error','57066MHGHfV','3231360yaxsRS','8FmitBn','1014307uTcXHD','gfHgI','588447OgxUcT','145fnEXRW','52524yTrBgG','934760UqncCi','52014KWANNz','\x20\x20https://docs.ranger.net/main/concepts/profiles','exit','cxVDv','310QdDvhP'];_0x2a48=function(){return _0x954cf1;};return _0x2a48();}export async function authEncrypt(_0x56c350){var _0x2b7bb0=_0x4a9e,_0x4f5c2a={'cxVDv':function(_0x48f799,_0x1a2274){return _0x48f799+_0x1a2274;},'gfHgI':'ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','VqjVq':'session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a','FUxvG':'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','ezAGB':'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','VKhVq':_0x2b7bb0(0x18d)};console[_0x2b7bb0(0x191)](_0x4f5c2a[_0x2b7bb0(0x18f)](_0x4f5c2a['cxVDv'](_0x4f5c2a[_0x2b7bb0(0x196)]+_0x4f5c2a['VqjVq'],'\x0a')+_0x4f5c2a['FUxvG']+'\x20\x20ranger\x20profile\x20add\x20<name>\x0a'+'\x0a',_0x4f5c2a['ezAGB'])+_0x4f5c2a['VKhVq']),process[_0x2b7bb0(0x18e)](0x1);}
1
+ (function(_0x53ba59,_0x56b44d){var _0x5c584e=_0x2fdd,_0xee69b1=_0x53ba59();while(!![]){try{var _0x42bbb2=parseInt(_0x5c584e(0x179))/0x1+-parseInt(_0x5c584e(0x175))/0x2*(-parseInt(_0x5c584e(0x174))/0x3)+parseInt(_0x5c584e(0x171))/0x4*(-parseInt(_0x5c584e(0x16d))/0x5)+-parseInt(_0x5c584e(0x172))/0x6+-parseInt(_0x5c584e(0x16c))/0x7+-parseInt(_0x5c584e(0x16e))/0x8*(-parseInt(_0x5c584e(0x173))/0x9)+parseInt(_0x5c584e(0x176))/0xa*(parseInt(_0x5c584e(0x178))/0xb);if(_0x42bbb2===_0x56b44d)break;else _0xee69b1['push'](_0xee69b1['shift']());}catch(_0xbc3dac){_0xee69b1['push'](_0xee69b1['shift']());}}}(_0x4cb3,0xe8b54));function _0x2fdd(_0x25be0b,_0x17f3a3){_0x25be0b=_0x25be0b-0x16c;var _0x4cb34f=_0x4cb3();var _0x2fdd10=_0x4cb34f[_0x25be0b];return _0x2fdd10;}function _0x4cb3(){var _0x41c826=['9VWLvtT','1353360IpLrna','2alqgud','31630oTehye','session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a','14861JTEZEJ','308859WYcNDi','mmSPS','13291915HZPsoB','45635kefrHh','4313648wxSpYf','ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','780IVttpk','5643696RLcdfw'];_0x4cb3=function(){return _0x41c826;};return _0x4cb3();}export async function authEncrypt(_0x170247){var _0xa809e8=_0x2fdd,_0xdc9747={'tKZVQ':_0xa809e8(0x177),'MFQJf':'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','mmSPS':'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','JjcFq':'\x20\x20https://docs.ranger.net/main/concepts/profiles'};console['error'](_0xa809e8(0x16f)+_0xdc9747['tKZVQ']+'\x0a'+_0xdc9747['MFQJf']+_0xdc9747[_0xa809e8(0x17a)]+'\x0a'+_0xa809e8(0x170)+_0xdc9747['JjcFq']),process['exit'](0x1);}
@@ -1 +1 @@
1
- function _0xc3d5(){const _0x3effd6=['win32','14GbFaqu','opencode.json','length','aVnNi','OZCCx','replace','JOacq','bug-bash','project','EVNNT','platform','claude','495393vMBVdV','KORtf','✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','remove','filter','1948869msyYhr','4111345taFCbJ','@ranger-testing/opencode-plugin','HkpyQ','error','oEtSe','EFOAK','WVblG','RCWQj','✓\x20Removed\x20trailhead\x20marketplace','feature-tracker','✓\x20Removed\x20.ranger/\x20directory','vFRhl','168747qtHDaW','\x0a✅\x20Cleanup\x20complete!\x0a','push','6724896BqOtDa','UusYt','RfZUS','Nothing\x20to\x20clean\x20up.\x0a','log','FNMnk','plugin','2684085wPfkxB','6PSvNrs','yQDcR','YNPSp','user','tAGHh','Ndbkc','e2e-test-recommender','fageb','wJLWn','55680iaaSUK','neUqD','ignore','parse','KxeSh','4AXNFkA','nCaHa','uninstall','close','string','22MbrtPl','8JksWwT'];_0xc3d5=function(){return _0x3effd6;};return _0xc3d5();}const _0x46877b=_0x2973;(function(_0x105f54,_0x38aee9){const _0x4e3c9a=_0x2973,_0x461941=_0x105f54();while(!![]){try{const _0x2afdd3=-parseInt(_0x4e3c9a(0x191))/0x1*(-parseInt(_0x4e3c9a(0x173))/0x2)+-parseInt(_0x4e3c9a(0x17f))/0x3*(parseInt(_0x4e3c9a(0x1aa))/0x4)+-parseInt(_0x4e3c9a(0x19b))/0x5*(-parseInt(_0x4e3c9a(0x19c))/0x6)+-parseInt(_0x4e3c9a(0x185))/0x7+-parseInt(_0x4e3c9a(0x171))/0x8*(-parseInt(_0x4e3c9a(0x184))/0x9)+parseInt(_0x4e3c9a(0x1a5))/0xa*(parseInt(_0x4e3c9a(0x170))/0xb)+-parseInt(_0x4e3c9a(0x194))/0xc;if(_0x2afdd3===_0x38aee9)break;else _0x461941['push'](_0x461941['shift']());}catch(_0xf2792a){_0x461941['push'](_0x461941['shift']());}}}(_0xc3d5,0x9a811));import{rm,readFile,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{spawn}from'child_process';import{deleteAllCredentials}from'./utils/keychain.js';import{getProjectRoot,getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getCacheFile}from'./utils/sessionCache.js';function _0x2973(_0x1a707b,_0x460746){_0x1a707b=_0x1a707b-0x16d;const _0xc3d5cc=_0xc3d5();let _0x297324=_0xc3d5cc[_0x1a707b];return _0x297324;}import{getOpencodeConfigDir,getOpencodeSkillsDir}from'./utils/opencodeConfig.js';const skillsToRemove=['ranger',_0x46877b(0x18e),_0x46877b(0x17a),_0x46877b(0x1a2)],opencodePluginName=_0x46877b(0x186);function parseJsonc(_0x5cc79b){const _0x155d5e=_0x46877b,_0x287420=_0x5cc79b[_0x155d5e(0x178)](/\/\*[\s\S]*?\*\//g,''),_0x3ae769=_0x287420[_0x155d5e(0x178)](/^\s*\/\/.*$/gm,''),_0xc3b209=_0x3ae769[_0x155d5e(0x178)](/,\s*([}\]])/g,'$1');return JSON[_0x155d5e(0x1a8)](_0xc3b209);}async function removeOpencodePluginConfig(_0x250b36){const _0x336164=_0x46877b,_0x524d66={'vFRhl':_0x336164(0x16f),'UusYt':'utf-8','nCaHa':function(_0x5b2b11,_0x3f7d4e){return _0x5b2b11(_0x3f7d4e);},'LIrnm':function(_0x42ea29,_0x4f1018){return _0x42ea29===_0x4f1018;},'RfZUS':function(_0x1f53c4,_0x1095b4){return _0x1f53c4+_0x1095b4;}};if(!existsSync(_0x250b36))return![];let _0x168bfc;try{const _0x4d55d7=await readFile(_0x250b36,_0x524d66[_0x336164(0x195)]);_0x168bfc=_0x524d66[_0x336164(0x1ab)](parseJsonc,_0x4d55d7);}catch{return![];}const _0x4730ce=Array['isArray'](_0x168bfc[_0x336164(0x19a)])?_0x168bfc[_0x336164(0x19a)]:[];if(_0x524d66['LIrnm'](_0x4730ce[_0x336164(0x175)],0x0))return![];const _0x5a8dbe=_0x4730ce[_0x336164(0x183)](_0x1acb49=>{const _0x226638=_0x336164;if(typeof _0x1acb49!==_0x524d66[_0x226638(0x190)])return!![];return _0x1acb49!==opencodePluginName;});if(_0x5a8dbe[_0x336164(0x175)]===_0x4730ce['length'])return![];return _0x5a8dbe[_0x336164(0x175)]===0x0?delete _0x168bfc[_0x336164(0x19a)]:_0x168bfc['plugin']=_0x5a8dbe,await writeFile(_0x250b36,_0x524d66[_0x336164(0x196)](JSON['stringify'](_0x168bfc,null,0x2),'\x0a')),!![];}async function uninstallClaudePlugin(_0x3324cb){const _0x24f6bd=_0x46877b,_0x4c7b01={'tAGHh':'--scope','CVYiR':_0x24f6bd(0x17e),'wJLWn':_0x24f6bd(0x1a7),'mFcKO':_0x24f6bd(0x172)};return new Promise(_0x436166=>{const _0x236fbb=_0x24f6bd,_0x46bc38={'neUqD':function(_0x29e5fb,_0x4b63e9){return _0x29e5fb(_0x4b63e9);},'axZsR':function(_0x2fafff,_0x5c8060){return _0x2fafff===_0x5c8060;}},_0x4ba8b2=['plugin',_0x236fbb(0x16d),'ranger@trailhead'];_0x3324cb&&_0x4ba8b2[_0x236fbb(0x193)](_0x4c7b01[_0x236fbb(0x1a0)],_0x3324cb);const _0x33a332=spawn(_0x4c7b01['CVYiR'],_0x4ba8b2,{'stdio':[_0x4c7b01['wJLWn'],_0x4c7b01[_0x236fbb(0x1a4)],_0x4c7b01['wJLWn']],'cwd':_0x3324cb?getProjectRoot():undefined,'shell':process[_0x236fbb(0x17d)]===_0x4c7b01['mFcKO']});_0x33a332['on'](_0x236fbb(0x16e),_0x33e1d7=>{const _0x1b43ce=_0x236fbb;_0x46bc38[_0x1b43ce(0x1a6)](_0x436166,_0x46bc38['axZsR'](_0x33e1d7,0x0));}),_0x33a332['on'](_0x236fbb(0x188),()=>{_0x436166(![]);});});}async function removeMarketplace(){const _0x499c3e={'YNPSp':function(_0x2ed498,_0x3bbb0a){return _0x2ed498(_0x3bbb0a);},'iAbyF':function(_0x2d8be4,_0xa7b1d5,_0x11099d,_0x4d8c56){return _0x2d8be4(_0xa7b1d5,_0x11099d,_0x4d8c56);},'KORtf':'marketplace','oEtSe':'ignore','RRtzO':function(_0x469f53,_0x1c854e){return _0x469f53===_0x1c854e;},'xMHFT':'win32','fRvVp':'close'};return new Promise(_0x4539ca=>{const _0x422e6a=_0x2973,_0x22f47a=_0x499c3e['iAbyF'](spawn,_0x422e6a(0x17e),['plugin',_0x499c3e[_0x422e6a(0x180)],_0x422e6a(0x182),'trailhead'],{'stdio':[_0x499c3e[_0x422e6a(0x189)],_0x422e6a(0x1a7),_0x499c3e[_0x422e6a(0x189)]],'shell':_0x499c3e['RRtzO'](process[_0x422e6a(0x17d)],_0x499c3e['xMHFT'])});_0x22f47a['on'](_0x499c3e['fRvVp'],_0x2408c5=>{_0x4539ca(_0x2408c5===0x0);}),_0x22f47a['on']('error',()=>{const _0x526c26=_0x422e6a;_0x499c3e[_0x526c26(0x19e)](_0x4539ca,![]);});});}export async function clean(){const _0x515bd0=_0x46877b,_0x465e3a={'cdsQQ':'\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','WVblG':function(_0x17b318){return _0x17b318();},'iheKJ':function(_0x23d256,_0x28c650){return _0x23d256(_0x28c650);},'OZCCx':_0x515bd0(0x18f),'WaskG':function(_0xf0d61){return _0xf0d61();},'Ndbkc':function(_0x2a9486,_0x106d88,_0x1e80d4){return _0x2a9486(_0x106d88,_0x1e80d4);},'yQDcR':function(_0x3ce6c6,_0x35af04){return _0x3ce6c6(_0x35af04);},'QbTBj':function(_0x166e54){return _0x166e54();},'EFOAK':function(_0x34c8b8,_0x253b22,_0x45b01d){return _0x34c8b8(_0x253b22,_0x45b01d);},'fageb':_0x515bd0(0x19f),'FNMnk':'project','yGdPo':_0x515bd0(0x174),'KxeSh':function(_0x260c9d,_0x9d32e1){return _0x260c9d(_0x9d32e1);},'JOacq':function(_0x3ec20f,_0x45863c){return _0x3ec20f(_0x45863c);},'aVnNi':function(_0xa76650,_0x215508){return _0xa76650(_0x215508);},'EVNNT':'✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)','RCWQj':'✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','HkpyQ':'✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','eAhsF':_0x515bd0(0x18d)};console['log'](_0x465e3a['cdsQQ']);let _0xb05b95=![];try{await _0x465e3a[_0x515bd0(0x18b)](deleteAllCredentials),console['log']('✓\x20Removed\x20stored\x20credentials'),_0xb05b95=!![];}catch{}const _0x1a905f=getCacheFile();existsSync(_0x1a905f)&&(await rm(_0x1a905f),_0xb05b95=!![]);const _0x42e0a4=_0x465e3a[_0x515bd0(0x18b)](getRangerDir);_0x465e3a['iheKJ'](existsSync,_0x42e0a4)&&(await rm(_0x42e0a4,{'recursive':!![]}),console[_0x515bd0(0x198)](_0x465e3a[_0x515bd0(0x177)]),_0xb05b95=!![]);const _0x6eaa82=_0x465e3a['WaskG'](getProjectSkillsDir);for(const _0x190d49 of skillsToRemove){const _0x157197=_0x465e3a[_0x515bd0(0x1a1)](join,_0x6eaa82,_0x190d49);_0x465e3a[_0x515bd0(0x19d)](existsSync,_0x157197)&&(await _0x465e3a['Ndbkc'](rm,_0x157197,{'recursive':!![]}),console['log']('✓\x20Removed\x20project\x20skill:\x20'+_0x190d49),_0xb05b95=!![]);}const _0x25c08b=_0x465e3a['QbTBj'](getUserSkillsDir);for(const _0x5b3229 of skillsToRemove){const _0x4637e6=_0x465e3a['EFOAK'](join,_0x25c08b,_0x5b3229);existsSync(_0x4637e6)&&(await rm(_0x4637e6,{'recursive':!![]}),console['log']('✓\x20Removed\x20user\x20skill:\x20'+_0x5b3229),_0xb05b95=!![]);}const _0x11aeb2=getOpencodeSkillsDir(_0x515bd0(0x17b));for(const _0x5c3def of skillsToRemove){const _0x2862fa=join(_0x11aeb2,_0x5c3def);existsSync(_0x2862fa)&&(await _0x465e3a[_0x515bd0(0x18a)](rm,_0x2862fa,{'recursive':!![]}),console['log']('✓\x20Removed\x20OpenCode\x20project\x20skill:\x20'+_0x5c3def),_0xb05b95=!![]);}const _0x454e6f=getOpencodeSkillsDir(_0x465e3a['fageb']);for(const _0x54263d of skillsToRemove){const _0x1a4177=_0x465e3a[_0x515bd0(0x18a)](join,_0x454e6f,_0x54263d);existsSync(_0x1a4177)&&(await _0x465e3a['Ndbkc'](rm,_0x1a4177,{'recursive':!![]}),console['log']('✓\x20Removed\x20OpenCode\x20user\x20skill:\x20'+_0x54263d),_0xb05b95=!![]);}const _0x2de9ce=join(_0x465e3a[_0x515bd0(0x19d)](getOpencodeConfigDir,_0x465e3a['FNMnk']),_0x465e3a['yGdPo']);await _0x465e3a[_0x515bd0(0x1a9)](removeOpencodePluginConfig,_0x2de9ce)&&(console[_0x515bd0(0x198)](_0x515bd0(0x181)),_0xb05b95=!![]);const _0x3b3a89=join(_0x465e3a[_0x515bd0(0x179)](getOpencodeConfigDir,_0x465e3a[_0x515bd0(0x1a3)]),_0x515bd0(0x174));await _0x465e3a[_0x515bd0(0x176)](removeOpencodePluginConfig,_0x3b3a89)&&(console[_0x515bd0(0x198)](_0x465e3a[_0x515bd0(0x17c)]),_0xb05b95=!![]);const _0x2f4fc1=await uninstallClaudePlugin();_0x2f4fc1&&(console['log'](_0x465e3a[_0x515bd0(0x18c)]),_0xb05b95=!![]);const _0x599d6c=await uninstallClaudePlugin(_0x465e3a[_0x515bd0(0x199)]);_0x599d6c&&(console[_0x515bd0(0x198)](_0x465e3a[_0x515bd0(0x187)]),_0xb05b95=!![]);const _0x4965e8=await removeMarketplace();_0x4965e8&&(console[_0x515bd0(0x198)](_0x465e3a['eAhsF']),_0xb05b95=!![]),_0xb05b95?console['log'](_0x515bd0(0x192)):console['log'](_0x515bd0(0x197));}
1
+ const _0x1cade7=_0x3912;(function(_0x596813,_0x570e21){const _0xce5c86=_0x3912,_0xb73c59=_0x596813();while(!![]){try{const _0x7e8988=parseInt(_0xce5c86(0x16f))/0x1+parseInt(_0xce5c86(0x171))/0x2*(-parseInt(_0xce5c86(0x16c))/0x3)+-parseInt(_0xce5c86(0x170))/0x4+-parseInt(_0xce5c86(0x18b))/0x5*(parseInt(_0xce5c86(0x178))/0x6)+parseInt(_0xce5c86(0x166))/0x7+parseInt(_0xce5c86(0x16e))/0x8*(-parseInt(_0xce5c86(0x172))/0x9)+-parseInt(_0xce5c86(0x189))/0xa*(parseInt(_0xce5c86(0x164))/0xb);if(_0x7e8988===_0x570e21)break;else _0xb73c59['push'](_0xb73c59['shift']());}catch(_0x589181){_0xb73c59['push'](_0xb73c59['shift']());}}}(_0x5c92,0xd19f9));import{rm,readFile,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{spawn}from'child_process';function _0x3912(_0x569125,_0x433c4d){_0x569125=_0x569125-0x15f;const _0x5c9253=_0x5c92();let _0x39123f=_0x5c9253[_0x569125];return _0x39123f;}import{deleteAllCredentials}from'./utils/keychain.js';import{getProjectRoot,getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getRangerDir}from'./utils/rangerRoot.js';function _0x5c92(){const _0x1571f0=['wSQaC','cgrjj','log','pGpTR','ignore','lhdxb','wWSty','@ranger-testing/opencode-plugin','claude','project','platform','✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)','plugin','CzVwr','length','10eSEfqN','filter','45foBZOz','laVEF','user','error','feature-tracker','Nothing\x20to\x20clean\x20up.\x0a','✓\x20Removed\x20user\x20skill:\x20','✓\x20Removed\x20OpenCode\x20project\x20skill:\x20','vNDkc','jgmxM','✓\x20Removed\x20OpenCode\x20user\x20skill:\x20','close','e2e-test-recommender','marketplace','XJiMH','string','7724365HOJfaX','MRTCQ','10198272QwJpBm','✓\x20Removed\x20trailhead\x20marketplace','Gbost','gGHPk','bug-bash','replace','123LhuDlK','vhcYn','2013272xxPlqw','1528123wPeqVY','1539908EkushQ','33738vgsEah','9hTtujs','✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','MPOSM','\x0a✅\x20Cleanup\x20complete!\x0a','stringify','utf-8','63948wPilZD','Ofipa'];_0x5c92=function(){return _0x1571f0;};return _0x5c92();}import{getCacheFile}from'./utils/sessionCache.js';import{getOpencodeConfigDir,getOpencodeSkillsDir}from'./utils/opencodeConfig.js';const skillsToRemove=['ranger',_0x1cade7(0x18f),_0x1cade7(0x16a),_0x1cade7(0x160)],opencodePluginName=_0x1cade7(0x181);function parseJsonc(_0x12396a){const _0x2f2176=_0x1cade7,_0x1a9ede=_0x12396a[_0x2f2176(0x16b)](/\/\*[\s\S]*?\*\//g,''),_0x28de11=_0x1a9ede[_0x2f2176(0x16b)](/^\s*\/\/.*$/gm,''),_0x503b8e=_0x28de11['replace'](/,\s*([}\]])/g,'$1');return JSON['parse'](_0x503b8e);}async function removeOpencodePluginConfig(_0x478a7d){const _0x2d992a=_0x1cade7,_0x22dcfa={'lhdxb':function(_0x19d3e7,_0x37b095){return _0x19d3e7!==_0x37b095;},'XkUqZ':_0x2d992a(0x177),'QrPxn':function(_0x29612f,_0xf6a8df){return _0x29612f(_0xf6a8df);},'Gbost':function(_0x59f6a8,_0x47f903){return _0x59f6a8===_0x47f903;},'Ofipa':function(_0x39202f,_0xff02cd,_0x6dd68f){return _0x39202f(_0xff02cd,_0x6dd68f);},'gGHPk':function(_0x3be5a7,_0x4f6b81){return _0x3be5a7+_0x4f6b81;}};if(!existsSync(_0x478a7d))return![];let _0x9a7db5;try{const _0xc008e8=await readFile(_0x478a7d,_0x22dcfa['XkUqZ']);_0x9a7db5=_0x22dcfa['QrPxn'](parseJsonc,_0xc008e8);}catch{return![];}const _0xbbd764=Array['isArray'](_0x9a7db5[_0x2d992a(0x186)])?_0x9a7db5[_0x2d992a(0x186)]:[];if(_0xbbd764[_0x2d992a(0x188)]===0x0)return![];const _0x11cb1d=_0xbbd764[_0x2d992a(0x18a)](_0x4b4f51=>{const _0xfcd229=_0x2d992a;if(typeof _0x4b4f51!==_0xfcd229(0x163))return!![];return _0x22dcfa[_0xfcd229(0x17f)](_0x4b4f51,opencodePluginName);});if(_0x22dcfa[_0x2d992a(0x168)](_0x11cb1d['length'],_0xbbd764['length']))return![];return _0x11cb1d[_0x2d992a(0x188)]===0x0?delete _0x9a7db5[_0x2d992a(0x186)]:_0x9a7db5[_0x2d992a(0x186)]=_0x11cb1d,await _0x22dcfa[_0x2d992a(0x179)](writeFile,_0x478a7d,_0x22dcfa[_0x2d992a(0x169)](JSON[_0x2d992a(0x176)](_0x9a7db5,null,0x2),'\x0a')),!![];}async function uninstallClaudePlugin(_0x111ee5){const _0x3720eb=_0x1cade7,_0x2ccbd7={'eVLOI':function(_0x1daa45,_0x29298a){return _0x1daa45(_0x29298a);},'NdNzA':'plugin','laVEF':'--scope','Kmdgm':function(_0x1ebd50,_0x42e74b,_0x3379bc,_0x37c7a5){return _0x1ebd50(_0x42e74b,_0x3379bc,_0x37c7a5);},'vNDkc':_0x3720eb(0x17e),'vhcYn':function(_0xf5463a){return _0xf5463a();}};return new Promise(_0x5c854e=>{const _0x54b91d=_0x3720eb,_0x28922c=[_0x2ccbd7['NdNzA'],'uninstall','ranger@trailhead'];_0x111ee5&&_0x28922c['push'](_0x2ccbd7[_0x54b91d(0x18c)],_0x111ee5);const _0x1cda7e=_0x2ccbd7['Kmdgm'](spawn,_0x54b91d(0x182),_0x28922c,{'stdio':[_0x2ccbd7[_0x54b91d(0x193)],_0x54b91d(0x17e),'ignore'],'cwd':_0x111ee5?_0x2ccbd7[_0x54b91d(0x16d)](getProjectRoot):undefined,'shell':process[_0x54b91d(0x184)]==='win32'});_0x1cda7e['on']('close',_0x27b1a0=>{_0x5c854e(_0x27b1a0===0x0);}),_0x1cda7e['on'](_0x54b91d(0x18e),()=>{_0x2ccbd7['eVLOI'](_0x5c854e,![]);});});}async function removeMarketplace(){const _0x4a37af=_0x1cade7,_0x29e006={'XJiMH':function(_0x28097d,_0x111e31,_0x2e7e82,_0x3355df){return _0x28097d(_0x111e31,_0x2e7e82,_0x3355df);},'jgmxM':'plugin','FVKbB':'trailhead','CzVwr':'ignore','QTfxS':function(_0x27297a,_0x593f47){return _0x27297a===_0x593f47;},'AeZMC':_0x4a37af(0x15f),'zZRzC':_0x4a37af(0x18e)};return new Promise(_0x1ead6d=>{const _0x1f5b46=_0x4a37af,_0x387e20={'WfNTZ':function(_0x54fbb0,_0x355481){return _0x54fbb0(_0x355481);}},_0x318ed9=_0x29e006[_0x1f5b46(0x162)](spawn,'claude',[_0x29e006[_0x1f5b46(0x194)],_0x1f5b46(0x161),'remove',_0x29e006['FVKbB']],{'stdio':[_0x29e006[_0x1f5b46(0x187)],'ignore','ignore'],'shell':_0x29e006['QTfxS'](process[_0x1f5b46(0x184)],'win32')});_0x318ed9['on'](_0x29e006['AeZMC'],_0x19d5d8=>{_0x1ead6d(_0x19d5d8===0x0);}),_0x318ed9['on'](_0x29e006['zZRzC'],()=>{_0x387e20['WfNTZ'](_0x1ead6d,![]);});});}export async function clean(){const _0x162b09=_0x1cade7,_0x11480f={'bGBaL':function(_0x2558ed){return _0x2558ed();},'cgrjj':function(_0x337235,_0x1d0ce4){return _0x337235(_0x1d0ce4);},'MRTCQ':function(_0x1279a2){return _0x1279a2();},'pGpTR':_0x162b09(0x183),'wWSty':function(_0xda81e8,_0x20397e,_0x1d4703){return _0xda81e8(_0x20397e,_0x1d4703);},'wSQaC':_0x162b09(0x18d),'HjyZJ':'opencode.json','MPOSM':function(_0x537199,_0x5f3b45){return _0x537199(_0x5f3b45);},'NJxft':_0x162b09(0x173),'QsQAT':_0x162b09(0x167),'SqdNv':_0x162b09(0x175)};console['log']('\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a');let _0x3ec225=![];try{await _0x11480f['bGBaL'](deleteAllCredentials),console[_0x162b09(0x17c)]('✓\x20Removed\x20stored\x20credentials'),_0x3ec225=!![];}catch{}const _0x572dc0=getCacheFile();existsSync(_0x572dc0)&&(await _0x11480f[_0x162b09(0x17b)](rm,_0x572dc0),_0x3ec225=!![]);const _0x58ca4f=getRangerDir();_0x11480f['cgrjj'](existsSync,_0x58ca4f)&&(await rm(_0x58ca4f,{'recursive':!![]}),console[_0x162b09(0x17c)]('✓\x20Removed\x20.ranger/\x20directory'),_0x3ec225=!![]);const _0x39d533=_0x11480f[_0x162b09(0x165)](getProjectSkillsDir);for(const _0x5bc329 of skillsToRemove){const _0x4dfcc0=join(_0x39d533,_0x5bc329);existsSync(_0x4dfcc0)&&(await rm(_0x4dfcc0,{'recursive':!![]}),console['log']('✓\x20Removed\x20project\x20skill:\x20'+_0x5bc329),_0x3ec225=!![]);}const _0x3681b8=getUserSkillsDir();for(const _0x154be2 of skillsToRemove){const _0x38a672=join(_0x3681b8,_0x154be2);existsSync(_0x38a672)&&(await rm(_0x38a672,{'recursive':!![]}),console['log'](_0x162b09(0x191)+_0x154be2),_0x3ec225=!![]);}const _0x3bd53b=_0x11480f[_0x162b09(0x17b)](getOpencodeSkillsDir,_0x11480f[_0x162b09(0x17d)]);for(const _0x1be5e7 of skillsToRemove){const _0x197d70=_0x11480f[_0x162b09(0x180)](join,_0x3bd53b,_0x1be5e7);existsSync(_0x197d70)&&(await _0x11480f['wWSty'](rm,_0x197d70,{'recursive':!![]}),console[_0x162b09(0x17c)](_0x162b09(0x192)+_0x1be5e7),_0x3ec225=!![]);}const _0x543579=getOpencodeSkillsDir(_0x11480f['wSQaC']);for(const _0x291413 of skillsToRemove){const _0x4c4b3b=_0x11480f['wWSty'](join,_0x543579,_0x291413);existsSync(_0x4c4b3b)&&(await rm(_0x4c4b3b,{'recursive':!![]}),console['log'](_0x162b09(0x195)+_0x291413),_0x3ec225=!![]);}const _0x5d17c=join(getOpencodeConfigDir('project'),_0x11480f['HjyZJ']);await _0x11480f['cgrjj'](removeOpencodePluginConfig,_0x5d17c)&&(console[_0x162b09(0x17c)]('✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)'),_0x3ec225=!![]);const _0xe7a664=join(_0x11480f['MPOSM'](getOpencodeConfigDir,_0x11480f[_0x162b09(0x17a)]),'opencode.json');await _0x11480f['MPOSM'](removeOpencodePluginConfig,_0xe7a664)&&(console[_0x162b09(0x17c)](_0x162b09(0x185)),_0x3ec225=!![]);const _0x58fd78=await uninstallClaudePlugin();_0x58fd78&&(console[_0x162b09(0x17c)](_0x11480f['NJxft']),_0x3ec225=!![]);const _0x8371e=await _0x11480f[_0x162b09(0x174)](uninstallClaudePlugin,_0x11480f['pGpTR']);_0x8371e&&(console[_0x162b09(0x17c)]('✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)'),_0x3ec225=!![]);const _0x924c5a=await removeMarketplace();_0x924c5a&&(console['log'](_0x11480f['QsQAT']),_0x3ec225=!![]),_0x3ec225?console['log'](_0x11480f['SqdNv']):console['log'](_0x162b09(0x190));}
@@ -1 +1 @@
1
- function _0x4486(){const _0x5b3e80=['\x20<key>\x22\x20to\x20remove\x20individual\x20values.','\x20=\x20','FZpzh','Invalid\x20value\x20for\x20','cloud','bKgKy','local','klHDB','(not\x20set)','GmpbJ','1466648TwYlOZ','ePSpF','USXtN','Cleared\x20local\x20overrides\x20for\x20\x22','kGAbn','naTPO','xdsmt','alsoExistsElsewhere','wAOqr','6331810kETQQg','\x22\x20not\x20found','\x20for\x20\x22','8414kfPLhr','iDzov','iCrov','9456hderGy','log','\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20','Key\x20\x22','5ZkHSkP','7254wMPeYW','CPhoE','kind','1756660ikhHrH','mFkuJ','8886QXuHGa','eyhQd','FJsRf','4520871ANTNMg','headless','false','ejeaf','dbUoj','XRpXR','NdVbY','stringify','wiPSL','Removed\x20','cwd','3993100uHBVvT',':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22','PJcxY','\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.','isSafeInteger','undefined','No\x20configuration\x20set\x20for\x20\x22','settings','\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20','RjFex','\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.','startsWith'];_0x4486=function(){return _0x5b3e80;};return _0x4486();}function _0x278b(_0x3a12cf,_0x1b75fd){_0x3a12cf=_0x3a12cf-0x19f;const _0x448683=_0x4486();let _0x278b5e=_0x448683[_0x3a12cf];return _0x278b5e;}const _0x1dac44=_0x278b;(function(_0x2fffd5,_0x10a33d){const _0x28ca0d=_0x278b,_0x155d39=_0x2fffd5();while(!![]){try{const _0x4e1c12=-parseInt(_0x28ca0d(0x1a2))/0x1+parseInt(_0x28ca0d(0x1c8))/0x2+parseInt(_0x28ca0d(0x1a7))/0x3+parseInt(_0x28ca0d(0x1b2))/0x4*(-parseInt(_0x28ca0d(0x1db))/0x5)+parseInt(_0x28ca0d(0x1a4))/0x6*(parseInt(_0x28ca0d(0x1d4))/0x7)+-parseInt(_0x28ca0d(0x1d7))/0x8*(parseInt(_0x28ca0d(0x19f))/0x9)+parseInt(_0x28ca0d(0x1d1))/0xa;if(_0x4e1c12===_0x10a33d)break;else _0x155d39['push'](_0x155d39['shift']());}catch(_0x3c0fff){_0x155d39['push'](_0x155d39['shift']());}}}(_0x4486,0xe6f4d));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=[_0x1dac44(0x1a8),'allowInsecureLocalhost'];function parseLocalValue(_0x2b5b9f,_0x2500f2){const _0x212a9c=_0x1dac44,_0x44d244={'USXtN':function(_0x4f38f7,_0x2d117b){return _0x4f38f7===_0x2d117b;},'nOWMj':'true','AUZGp':function(_0x364729,_0x3db737){return _0x364729===_0x3db737;},'RjFex':'false'};if(BOOLEAN_KEYS['includes'](_0x2b5b9f)){if(_0x44d244[_0x212a9c(0x1ca)](_0x2500f2,_0x44d244['nOWMj']))return!![];if(_0x44d244['AUZGp'](_0x2500f2,_0x44d244[_0x212a9c(0x1bb)]))return![];throw new Error(_0x212a9c(0x1c1)+_0x2b5b9f+_0x212a9c(0x1b3));}return _0x2500f2;}function parseOverrideValue(_0x3e218f){const _0x55ede8=_0x1dac44,_0x4dc21b={'hgxvJ':'null','wiPSL':function(_0x4174e8,_0x1f9903){return _0x4174e8(_0x1f9903);}};if(_0x3e218f==='true')return!![];if(_0x3e218f===_0x55ede8(0x1a9))return![];if(_0x3e218f===_0x4dc21b['hgxvJ'])return null;if(_0x3e218f===_0x55ede8(0x1b7))return undefined;if(/^-?\d+$/['test'](_0x3e218f)){const _0x5823f8=Number(_0x3e218f);if(Number[_0x55ede8(0x1b6)](_0x5823f8))return _0x5823f8;}if(/^-?\d+\.\d+$/['test'](_0x3e218f)){const _0x4a1f84=_0x4dc21b[_0x55ede8(0x1af)](Number,_0x3e218f);if(!Number['isNaN'](_0x4a1f84))return _0x4a1f84;}const _0x4c0a14=_0x3e218f['trim']();if(_0x4c0a14['startsWith']('{')&&_0x4c0a14['endsWith']('}')||_0x4c0a14[_0x55ede8(0x1bd)]('[')&&_0x4c0a14['endsWith'](']'))try{return JSON['parse'](_0x4c0a14);}catch{}return _0x3e218f;}async function resolveProfileTarget(_0x5c93b8){const _0x4f6825=_0x1dac44,_0x5a2621={'kGAbn':function(_0xb9eeb3,_0x42d7d3){return _0xb9eeb3(_0x42d7d3);},'mFkuJ':function(_0x46725f,_0x586be4){return _0x46725f(_0x586be4);},'mgsim':_0x4f6825(0x1c2)},_0x58c8be=_0x5a2621[_0x4f6825(0x1cc)](existsSync,getEnvDir(_0x5c93b8));let _0xdc2ba0=![];try{const _0x581c55=await _0x5a2621[_0x4f6825(0x1a3)](fetchCloudProfile,_0x5c93b8);_0xdc2ba0=_0x5a2621[_0x4f6825(0x1a3)](Boolean,_0x581c55);}catch{}if(_0xdc2ba0)return{'kind':_0x5a2621['mgsim'],'alsoExistsElsewhere':_0x58c8be};if(_0x58c8be)return{'kind':_0x4f6825(0x1c4),'alsoExistsElsewhere':![]};throw new Error('Profile\x20\x22'+_0x5c93b8+_0x4f6825(0x1ba)+_0x5c93b8);}function printDualExistsHint(_0x5edac3){const _0x6ac1f8=_0x1dac44;console['log']('\x20\x20Note:\x20\x22'+_0x5edac3+_0x6ac1f8(0x1b5));}function getProjectPath(){const _0x5d1e22=_0x1dac44;return process[_0x5d1e22(0x1b1)]();}async function loadEffectiveCloudSettings(_0x55363c){const _0x3bbac9=_0x1dac44,_0x53a284={'eyhQd':function(_0x1c4931,_0x192870){return _0x1c4931(_0x192870);},'QsxRq':function(_0x227147,_0x24c87a,_0x2d002d){return _0x227147(_0x24c87a,_0x2d002d);},'naTPO':function(_0x2af335){return _0x2af335();},'xdsmt':function(_0x3d123c,_0x5d2454){return _0x3d123c??_0x5d2454;}},_0x2de1b4=await _0x53a284[_0x3bbac9(0x1a5)](fetchCloudProfile,_0x55363c),_0x4978d9=_0x53a284['QsxRq'](readProfileOverrides,_0x53a284[_0x3bbac9(0x1cd)](getProjectPath),_0x55363c);return mergeCloudProfileSettings(_0x2de1b4?.[_0x3bbac9(0x1b9)]??{},_0x53a284[_0x3bbac9(0x1ce)](_0x4978d9,undefined));}export async function configSet(_0x10041c,_0x853c10,_0x4b9a3c){const _0x1c2ec6=_0x1dac44,_0x29de32={'CPhoE':function(_0x922a04,_0x104947){return _0x922a04===_0x104947;},'FZpzh':function(_0x5932ab){return _0x5932ab();}},_0x39257d=await resolveProfileTarget(_0x10041c);if(_0x29de32[_0x1c2ec6(0x1a0)](_0x39257d['kind'],_0x1c2ec6(0x1c2))){if(_0x39257d[_0x1c2ec6(0x1cf)])printDualExistsHint(_0x10041c);const _0x3be7cb=parseOverrideValue(_0x4b9a3c);setProfileOverride(getProjectPath(),_0x10041c,_0x853c10,_0x3be7cb),console[_0x1c2ec6(0x1d8)]('Set\x20'+_0x853c10+'\x20=\x20'+JSON['stringify'](_0x3be7cb)+_0x1c2ec6(0x1d3)+_0x10041c+'\x22');return;}const _0x472985=parseLocalValue(_0x853c10,_0x4b9a3c);setProfileOverride(_0x29de32[_0x1c2ec6(0x1c0)](getProjectPath),_0x10041c,_0x853c10,_0x472985),console['log']('Set\x20'+_0x853c10+_0x1c2ec6(0x1bf)+_0x472985+_0x1c2ec6(0x1d3)+_0x10041c+'\x22');}export async function configGet(_0x277ad1,_0x14b9a6){const _0x374a71=_0x1dac44,_0x465f0c={'vTfGF':function(_0x45d3cd,_0xbe631c){return _0x45d3cd(_0xbe631c);},'iCrov':'cloud','gMNDZ':function(_0x121cce,_0x35ab99){return _0x121cce===_0x35ab99;},'ejeaf':'object','PJcxY':function(_0x2870b3,_0x590619,_0x8871d4){return _0x2870b3(_0x590619,_0x8871d4);}},_0x49ef91=await _0x465f0c['vTfGF'](resolveProfileTarget,_0x277ad1);if(_0x49ef91['kind']===_0x465f0c[_0x374a71(0x1d6)]){const _0x2446b0=await loadEffectiveCloudSettings(_0x277ad1),_0x106458=getNestedValue(_0x2446b0,_0x14b9a6);if(_0x106458===undefined)console['log'](_0x374a71(0x1c6));else _0x465f0c['gMNDZ'](typeof _0x106458,_0x465f0c[_0x374a71(0x1aa)])?console['log'](JSON[_0x374a71(0x1ae)](_0x106458,null,0x2)):console['log'](_0x106458);return;}const _0x1081b5=await _0x465f0c['vTfGF'](loadSettings,_0x277ad1),_0x134148=_0x465f0c[_0x374a71(0x1b4)](getNestedValue,_0x1081b5,_0x14b9a6);if(_0x134148===undefined)console[_0x374a71(0x1d8)](_0x374a71(0x1c6));else typeof _0x134148===_0x465f0c['ejeaf']?console[_0x374a71(0x1d8)](JSON['stringify'](_0x134148,null,0x2)):console[_0x374a71(0x1d8)](_0x134148);}export async function configList(_0x207e72){const _0x5dac80=_0x1dac44,_0x48d90b={'FJsRf':function(_0x1b93d8,_0x26e3eb){return _0x1b93d8===_0x26e3eb;},'dbUoj':function(_0x33bfe2,_0x46edc0){return _0x33bfe2(_0x46edc0);},'XRpXR':function(_0x4bb8aa,_0x476d2e){return _0x4bb8aa(_0x476d2e);}},_0x45bca4=await resolveProfileTarget(_0x207e72);if(_0x48d90b[_0x5dac80(0x1a6)](_0x45bca4[_0x5dac80(0x1a1)],'cloud')){const _0x5513de=await _0x48d90b[_0x5dac80(0x1ab)](loadEffectiveCloudSettings,_0x207e72);if(!_0x5513de||_0x48d90b['FJsRf'](Object['keys'](_0x5513de)['length'],0x0)){console[_0x5dac80(0x1d8)]('No\x20configuration\x20set\x20for\x20\x22'+_0x207e72+'\x22');return;}console[_0x5dac80(0x1d8)](JSON['stringify'](_0x5513de,null,0x2));return;}const _0x30e471=getSettingsPath(_0x207e72);if(!_0x48d90b[_0x5dac80(0x1ac)](existsSync,_0x30e471)){console['log'](_0x5dac80(0x1b8)+_0x207e72+'\x22');return;}const _0x546779=await loadSettings(_0x207e72),_0x4cfe81=formatSettings(_0x546779);!_0x4cfe81?console[_0x5dac80(0x1d8)]('No\x20configuration\x20set\x20for\x20\x22'+_0x207e72+'\x22'):console[_0x5dac80(0x1d8)](_0x4cfe81);}export async function configUnset(_0x273832,_0x1241dc){const _0x13f7ea=_0x1dac44,_0x56cd65={'klHDB':function(_0x4a4f29,_0x5cf343){return _0x4a4f29===_0x5cf343;},'psXBX':_0x13f7ea(0x1c2),'iDzov':function(_0x145d7f){return _0x145d7f();},'bKgKy':function(_0x440d6f,_0x2ebc1b){return _0x440d6f(_0x2ebc1b);},'GmpbJ':function(_0x2dd608,_0x333d2c,_0x27e358){return _0x2dd608(_0x333d2c,_0x27e358);}},_0x4d9642=await resolveProfileTarget(_0x273832);if(_0x56cd65[_0x13f7ea(0x1c5)](_0x4d9642[_0x13f7ea(0x1a1)],_0x56cd65['psXBX'])){if(_0x4d9642['alsoExistsElsewhere'])printDualExistsHint(_0x273832);const _0x38cef4=unsetProfileOverride(getProjectPath(),_0x273832,_0x1241dc);_0x38cef4?console[_0x13f7ea(0x1d8)]('Removed\x20'+_0x1241dc+_0x13f7ea(0x1d3)+_0x273832+'\x22'):console['log']('Key\x20\x22'+_0x1241dc+'\x22\x20not\x20found');return;}const _0x23f825=unsetProfileOverride(_0x56cd65[_0x13f7ea(0x1d5)](getProjectPath),_0x273832,_0x1241dc);if(_0x23f825){console['log'](_0x13f7ea(0x1b0)+_0x1241dc);return;}const _0x290a33=await _0x56cd65[_0x13f7ea(0x1c3)](loadSettings,_0x273832),_0x53b09d=_0x56cd65[_0x13f7ea(0x1c7)](deleteNestedValue,_0x290a33,_0x1241dc);_0x53b09d?console['log'](_0x13f7ea(0x1da)+_0x1241dc+'\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22'+_0x273832+_0x13f7ea(0x1bc)):console[_0x13f7ea(0x1d8)](_0x13f7ea(0x1da)+_0x1241dc+_0x13f7ea(0x1d2));}export async function configReset(_0x1c3310){const _0x347ccb=_0x1dac44,_0x152bdd={'ePSpF':function(_0x1e34e9,_0x24c1f0){return _0x1e34e9(_0x24c1f0);},'NdVbY':function(_0x4fbcb3,_0x24d048){return _0x4fbcb3===_0x24d048;},'wAOqr':function(_0x440c9e){return _0x440c9e();}},_0x52db9d=await _0x152bdd[_0x347ccb(0x1c9)](resolveProfileTarget,_0x1c3310);if(_0x152bdd[_0x347ccb(0x1ad)](_0x52db9d[_0x347ccb(0x1a1)],'cloud')){resetProfileOverrides(_0x152bdd[_0x347ccb(0x1d0)](getProjectPath),_0x1c3310),console['log'](_0x347ccb(0x1cb)+_0x1c3310+'\x22');return;}console['log']('\x22'+_0x1c3310+_0x347ccb(0x1d9)+_0x1c3310+_0x347ccb(0x1be));}
1
+ const _0x4343d1=_0x1133;(function(_0x2d65cc,_0x50e81e){const _0x1cbbb6=_0x1133,_0x58aeb2=_0x2d65cc();while(!![]){try{const _0x24b0a4=-parseInt(_0x1cbbb6(0x18c))/0x1+parseInt(_0x1cbbb6(0x191))/0x2*(parseInt(_0x1cbbb6(0x184))/0x3)+parseInt(_0x1cbbb6(0x189))/0x4+parseInt(_0x1cbbb6(0x1b1))/0x5+-parseInt(_0x1cbbb6(0x1a9))/0x6+parseInt(_0x1cbbb6(0x1a7))/0x7+-parseInt(_0x1cbbb6(0x182))/0x8*(-parseInt(_0x1cbbb6(0x1a4))/0x9);if(_0x24b0a4===_0x50e81e)break;else _0x58aeb2['push'](_0x58aeb2['shift']());}catch(_0x22ac17){_0x58aeb2['push'](_0x58aeb2['shift']());}}}(_0x11f7,0xe3468));import{existsSync}from'fs';import{loadSettings,getNestedValue,deleteNestedValue,formatSettings,getSettingsPath,getEnvDir}from'./utils/settings.js';import{fetchCloudProfile}from'./utils/cloudProfile.js';import{mergeCloudProfileSettings,readProfileOverrides,resetProfileOverrides,setProfileOverride,unsetProfileOverride}from'./utils/projectsConfig.js';function _0x1133(_0x591d76,_0x348dd9){_0x591d76=_0x591d76-0x17c;const _0x11f70d=_0x11f7();let _0x1133a=_0x11f70d[_0x591d76];return _0x1133a;}const BOOLEAN_KEYS=[_0x4343d1(0x185),'allowInsecureLocalhost'];function parseLocalValue(_0x9b7aea,_0x284634){const _0x48e0be=_0x4343d1,_0x2de147={'NZmRU':function(_0x99aeb7,_0x2a75a2){return _0x99aeb7===_0x2a75a2;}};if(BOOLEAN_KEYS[_0x48e0be(0x1b4)](_0x9b7aea)){if(_0x2de147[_0x48e0be(0x1aa)](_0x284634,'true'))return!![];if(_0x284634==='false')return![];throw new Error(_0x48e0be(0x196)+_0x9b7aea+_0x48e0be(0x1a2));}return _0x284634;}function parseOverrideValue(_0x19257e){const _0x5c3c4e=_0x4343d1,_0x8fd4b2={'FfVzR':function(_0x1bde8f,_0x39bafb){return _0x1bde8f===_0x39bafb;},'yQuXL':_0x5c3c4e(0x1ab),'DZvXw':'false','PkQKK':'null','FIdLZ':function(_0xbcc118,_0x9bf43){return _0xbcc118(_0x9bf43);}};if(_0x8fd4b2['FfVzR'](_0x19257e,_0x8fd4b2['yQuXL']))return!![];if(_0x8fd4b2[_0x5c3c4e(0x199)](_0x19257e,_0x8fd4b2['DZvXw']))return![];if(_0x19257e===_0x8fd4b2['PkQKK'])return null;if(_0x19257e==='undefined')return undefined;if(/^-?\d+$/['test'](_0x19257e)){const _0x4275d5=_0x8fd4b2['FIdLZ'](Number,_0x19257e);if(Number['isSafeInteger'](_0x4275d5))return _0x4275d5;}if(/^-?\d+\.\d+$/['test'](_0x19257e)){const _0x446861=Number(_0x19257e);if(!Number[_0x5c3c4e(0x1b0)](_0x446861))return _0x446861;}const _0x22bfa4=_0x19257e['trim']();if(_0x22bfa4[_0x5c3c4e(0x1ad)]('{')&&_0x22bfa4['endsWith']('}')||_0x22bfa4['startsWith']('[')&&_0x22bfa4['endsWith'](']'))try{return JSON[_0x5c3c4e(0x19a)](_0x22bfa4);}catch{}return _0x19257e;}async function resolveProfileTarget(_0x9dcee3){const _0xec17eb=_0x4343d1,_0x142d73={'rLMrQ':function(_0x1a8019,_0x245e7d){return _0x1a8019(_0x245e7d);},'mFura':function(_0x4cf18f,_0x484789){return _0x4cf18f(_0x484789);},'XoEAl':'cloud','Lleey':_0xec17eb(0x17f)},_0x256d82=_0x142d73['rLMrQ'](existsSync,getEnvDir(_0x9dcee3));let _0x350a5e=![];try{const _0x5afb4b=await _0x142d73['mFura'](fetchCloudProfile,_0x9dcee3);_0x350a5e=Boolean(_0x5afb4b);}catch{}if(_0x350a5e)return{'kind':_0x142d73[_0xec17eb(0x17c)],'alsoExistsElsewhere':_0x256d82};if(_0x256d82)return{'kind':_0x142d73['Lleey'],'alsoExistsElsewhere':![]};throw new Error(_0xec17eb(0x1b2)+_0x9dcee3+_0xec17eb(0x19f)+_0x9dcee3);}function printDualExistsHint(_0x548fd8){console['log']('\x20\x20Note:\x20\x22'+_0x548fd8+'\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.');}function getProjectPath(){const _0x28e590=_0x4343d1;return process[_0x28e590(0x18a)]();}async function loadEffectiveCloudSettings(_0x5f1971){const _0x466607=_0x4343d1,_0x4deed4={'aCJVh':function(_0x39ea3c,_0x37c382){return _0x39ea3c(_0x37c382);},'rwtep':function(_0xeb9ebd){return _0xeb9ebd();}},_0x189cde=await _0x4deed4[_0x466607(0x1a3)](fetchCloudProfile,_0x5f1971),_0x3adf44=readProfileOverrides(_0x4deed4[_0x466607(0x18d)](getProjectPath),_0x5f1971);return mergeCloudProfileSettings(_0x189cde?.[_0x466607(0x17d)]??{},_0x3adf44??undefined);}export async function configSet(_0xbb5401,_0x8acc0e,_0x474cbe){const _0x4468e3=_0x4343d1,_0x26ad8f={'YTiKJ':function(_0x26adf5,_0x1a5973){return _0x26adf5(_0x1a5973);},'lZHWw':'cloud','wNsBN':function(_0x1eb63a){return _0x1eb63a();}},_0x26c953=await _0x26ad8f[_0x4468e3(0x1a0)](resolveProfileTarget,_0xbb5401);if(_0x26c953[_0x4468e3(0x1b3)]===_0x26ad8f[_0x4468e3(0x188)]){if(_0x26c953[_0x4468e3(0x194)])printDualExistsHint(_0xbb5401);const _0x5cf888=_0x26ad8f['YTiKJ'](parseOverrideValue,_0x474cbe);setProfileOverride(_0x26ad8f['wNsBN'](getProjectPath),_0xbb5401,_0x8acc0e,_0x5cf888),console['log'](_0x4468e3(0x193)+_0x8acc0e+_0x4468e3(0x1a8)+JSON[_0x4468e3(0x18e)](_0x5cf888)+'\x20for\x20\x22'+_0xbb5401+'\x22');return;}const _0x265f78=parseLocalValue(_0x8acc0e,_0x474cbe);setProfileOverride(getProjectPath(),_0xbb5401,_0x8acc0e,_0x265f78),console[_0x4468e3(0x187)]('Set\x20'+_0x8acc0e+'\x20=\x20'+_0x265f78+'\x20for\x20\x22'+_0xbb5401+'\x22');}export async function configGet(_0x3e9b93,_0x25e93e){const _0x1924fa=_0x4343d1,_0xb754a3={'PyenQ':function(_0x33ccee,_0x57ebee){return _0x33ccee(_0x57ebee);},'UxUuf':function(_0x4088f4,_0xccdd50){return _0x4088f4===_0xccdd50;},'FfCbw':_0x1924fa(0x1af)},_0x28ae44=await _0xb754a3[_0x1924fa(0x186)](resolveProfileTarget,_0x3e9b93);if(_0x28ae44[_0x1924fa(0x1b3)]===_0x1924fa(0x18f)){const _0x14d12f=await _0xb754a3['PyenQ'](loadEffectiveCloudSettings,_0x3e9b93),_0x574261=getNestedValue(_0x14d12f,_0x25e93e);if(_0x574261===undefined)console[_0x1924fa(0x187)](_0x1924fa(0x19c));else _0xb754a3['UxUuf'](typeof _0x574261,_0x1924fa(0x1af))?console['log'](JSON['stringify'](_0x574261,null,0x2)):console['log'](_0x574261);return;}const _0x5b30cc=await loadSettings(_0x3e9b93),_0x32107d=getNestedValue(_0x5b30cc,_0x25e93e);if(_0x32107d===undefined)console['log'](_0x1924fa(0x19c));else _0xb754a3['UxUuf'](typeof _0x32107d,_0xb754a3[_0x1924fa(0x19b)])?console['log'](JSON[_0x1924fa(0x18e)](_0x32107d,null,0x2)):console['log'](_0x32107d);}function _0x11f7(){const _0x2539fc=['aCJVh','9okIDSo','Removed\x20','\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.','3084599BDZHPP','\x20=\x20','10738098sFrptV','NZmRU','true','bhroy','startsWith','\x20<key>\x22\x20to\x20remove\x20individual\x20values.','object','isNaN','450425AZzeVA','Profile\x20\x22','kind','includes','XoEAl','settings','\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22','local','xXWBc','length','14622536ucMHFj','No\x20configuration\x20set\x20for\x20\x22','87mddoYd','headless','PyenQ','log','lZHWw','2517820YYfUdr','cwd','Key\x20\x22','1744207PPkdyb','rwtep','stringify','cloud','nsgIC','101848KCGNpB','FRvFx','Set\x20','alsoExistsElsewhere','Cleared\x20local\x20overrides\x20for\x20\x22','Invalid\x20value\x20for\x20','\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20','RMBJB','FfVzR','parse','FfCbw','(not\x20set)','\x20for\x20\x22','amaXa','\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20','YTiKJ','ywRPV',':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22'];_0x11f7=function(){return _0x2539fc;};return _0x11f7();}export async function configList(_0x271b9b){const _0x59c964=_0x4343d1,_0x1e67a5={'awBpr':'cloud','FofSs':function(_0x2112a8,_0x1746be){return _0x2112a8(_0x1746be);},'ucwBS':function(_0x36ac0a,_0x3c742e){return _0x36ac0a===_0x3c742e;},'mqeWd':function(_0x37d547,_0x119ca5){return _0x37d547(_0x119ca5);},'FEqdf':function(_0x2da2d8,_0xffb351){return _0x2da2d8(_0xffb351);}},_0x341ffb=await resolveProfileTarget(_0x271b9b);if(_0x341ffb['kind']===_0x1e67a5['awBpr']){const _0x424003=await _0x1e67a5['FofSs'](loadEffectiveCloudSettings,_0x271b9b);if(!_0x424003||_0x1e67a5['ucwBS'](Object['keys'](_0x424003)[_0x59c964(0x181)],0x0)){console['log'](_0x59c964(0x183)+_0x271b9b+'\x22');return;}console['log'](JSON[_0x59c964(0x18e)](_0x424003,null,0x2));return;}const _0x5c3174=_0x1e67a5['mqeWd'](getSettingsPath,_0x271b9b);if(!_0x1e67a5['FEqdf'](existsSync,_0x5c3174)){console[_0x59c964(0x187)](_0x59c964(0x183)+_0x271b9b+'\x22');return;}const _0x397dd3=await loadSettings(_0x271b9b),_0x4fba46=formatSettings(_0x397dd3);!_0x4fba46?console[_0x59c964(0x187)](_0x59c964(0x183)+_0x271b9b+'\x22'):console[_0x59c964(0x187)](_0x4fba46);}export async function configUnset(_0x27ca5d,_0x41ea05){const _0x3d2561=_0x4343d1,_0x32ac3a={'FRvFx':function(_0xd7aaaa,_0x34cd9c){return _0xd7aaaa(_0x34cd9c);},'amaXa':_0x3d2561(0x18f),'ywRPV':function(_0x931acf,_0x2815e7,_0x4cf2a6,_0x44e157){return _0x931acf(_0x2815e7,_0x4cf2a6,_0x44e157);},'nsgIC':function(_0x4d42f3,_0xa5b83d,_0x10c252,_0x578447){return _0x4d42f3(_0xa5b83d,_0x10c252,_0x578447);},'QMLFK':function(_0x17088e,_0x455f04,_0x394843){return _0x17088e(_0x455f04,_0x394843);}},_0x4d6f73=await _0x32ac3a[_0x3d2561(0x192)](resolveProfileTarget,_0x27ca5d);if(_0x4d6f73['kind']===_0x32ac3a[_0x3d2561(0x19e)]){if(_0x4d6f73[_0x3d2561(0x194)])printDualExistsHint(_0x27ca5d);const _0x450249=_0x32ac3a[_0x3d2561(0x1a1)](unsetProfileOverride,getProjectPath(),_0x27ca5d,_0x41ea05);_0x450249?console[_0x3d2561(0x187)](_0x3d2561(0x1a5)+_0x41ea05+_0x3d2561(0x19d)+_0x27ca5d+'\x22'):console['log']('Key\x20\x22'+_0x41ea05+'\x22\x20not\x20found');return;}const _0x10fec0=_0x32ac3a[_0x3d2561(0x190)](unsetProfileOverride,getProjectPath(),_0x27ca5d,_0x41ea05);if(_0x10fec0){console['log']('Removed\x20'+_0x41ea05);return;}const _0x5af632=await loadSettings(_0x27ca5d),_0x3c9443=_0x32ac3a['QMLFK'](deleteNestedValue,_0x5af632,_0x41ea05);_0x3c9443?console['log'](_0x3d2561(0x18b)+_0x41ea05+_0x3d2561(0x17e)+_0x27ca5d+_0x3d2561(0x1a6)):console[_0x3d2561(0x187)]('Key\x20\x22'+_0x41ea05+'\x22\x20not\x20found');}export async function configReset(_0x373c51){const _0x4ca736=_0x4343d1,_0x1d6eab={'xXWBc':function(_0xad427a,_0x35661c){return _0xad427a(_0x35661c);},'RMBJB':_0x4ca736(0x18f),'bhroy':function(_0x717b89,_0x101d35,_0x28dcb2){return _0x717b89(_0x101d35,_0x28dcb2);}},_0x157e45=await _0x1d6eab[_0x4ca736(0x180)](resolveProfileTarget,_0x373c51);if(_0x157e45[_0x4ca736(0x1b3)]===_0x1d6eab[_0x4ca736(0x198)]){_0x1d6eab[_0x4ca736(0x1ac)](resetProfileOverrides,getProjectPath(),_0x373c51),console['log'](_0x4ca736(0x195)+_0x373c51+'\x22');return;}console['log']('\x22'+_0x373c51+_0x4ca736(0x197)+_0x373c51+_0x4ca736(0x1ae));}
@@ -1 +1 @@
1
- const _0x24ca8d=_0x4be0;(function(_0x4131d3,_0x2054f7){const _0xf66305=_0x4be0,_0x405c57=_0x4131d3();while(!![]){try{const _0x42a352=parseInt(_0xf66305(0x1ae))/0x1+-parseInt(_0xf66305(0x1a8))/0x2*(-parseInt(_0xf66305(0x19b))/0x3)+-parseInt(_0xf66305(0x19a))/0x4+-parseInt(_0xf66305(0x197))/0x5+-parseInt(_0xf66305(0x18f))/0x6*(parseInt(_0xf66305(0x19c))/0x7)+parseInt(_0xf66305(0x184))/0x8*(parseInt(_0xf66305(0x18c))/0x9)+-parseInt(_0xf66305(0x193))/0xa*(parseInt(_0xf66305(0x19f))/0xb);if(_0x42a352===_0x2054f7)break;else _0x405c57['push'](_0x405c57['shift']());}catch(_0x52ed48){_0x405c57['push'](_0x405c57['shift']());}}}(_0x433c,0xbc644));import{readdir,stat}from'fs/promises';function _0x4be0(_0x558f31,_0x12fa5a){_0x558f31=_0x558f31-0x184;const _0x433c5f=_0x433c();let _0x4be003=_0x433c5f[_0x558f31];return _0x4be003;}import{join}from'path';import{existsSync}from'fs';import{getRangerDir}from'./utils/rangerRoot.js';import{loadSettings}from'./utils/settings.js';import{readActiveProfileName}from'./utils/activeProfile.js';function _0x433c(){const _0x26e657=['1377iGKoXD','MApLD','has','1268214tSWbgB','\x20\x20\x20\x20\x20\x20Session:\x20','IWyjG','sessions','667210BbEDSN','qsAZL','name','sort','539325UdBmKO','log','\x20[cloud]','4847796VYVMTi','7053hOudRj','7qELMRx','endsWith','JqkOX','44AXavhV','\x20\x20\x20\x20\x20\x20Details:\x20','sessionUpdatedAt','bug-bashes','\x20\x20\x20\x20\x20\x20URL:\x20','zQjAG','local','legacy','environmentKey','210LqPgmM','length','RYNTK','map','startsWith','\x0aNo\x20profiles\x20found.','817650NYANIu','78704ASACvZ','mkFGI','isDirectory','aqRXE','\x0aCloud\x20Profiles:','environmentDetails','includes','AmpuE'];_0x433c=function(){return _0x26e657;};return _0x433c();}import{listCloudProfiles}from'./utils/cloudProfile.js';const NON_ENV_DIRS=[_0x24ca8d(0x192),_0x24ca8d(0x1a2),'reports','local','ci'];export async function getEnvNames(){const _0x4d0fe7=_0x24ca8d,_0x458e06={'MApLD':_0x4d0fe7(0x1a5),'aqRXE':function(_0x5b9d95,_0x2873c6,_0x625925){return _0x5b9d95(_0x2873c6,_0x625925);},'RYNTK':function(_0x77120b,_0x443e5a){return _0x77120b(_0x443e5a);},'JqkOX':function(_0x3638e7,_0x43e7fd,_0x16d713){return _0x3638e7(_0x43e7fd,_0x16d713);},'AmpuE':'settings.json'},_0x271088=getRangerDir();if(!existsSync(_0x271088))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x1bd481=await readActiveProfileName(),_0x53911f=[],_0x36344a={},_0x3c9707=join(_0x271088,_0x458e06[_0x4d0fe7(0x18d)]);if(existsSync(_0x3c9707)){const _0x500929=await readdir(_0x3c9707);for(const _0x45ae67 of _0x500929){const _0x50c2be=_0x458e06['aqRXE'](join,_0x3c9707,_0x45ae67),_0x608227=await stat(_0x50c2be);_0x608227[_0x4d0fe7(0x186)]()&&(_0x53911f['push'](_0x45ae67),_0x36344a[_0x45ae67]=_0x4d0fe7(0x1a5));}}const _0x3ae227=_0x458e06['aqRXE'](join,_0x271088,'ci');if(existsSync(_0x3ae227)){const _0x342005=await _0x458e06[_0x4d0fe7(0x1aa)](readdir,_0x3ae227);for(const _0xffc43e of _0x342005){const _0x6e4a29=_0x458e06['JqkOX'](join,_0x3ae227,_0xffc43e),_0x1142a7=await _0x458e06[_0x4d0fe7(0x1aa)](stat,_0x6e4a29);_0x1142a7[_0x4d0fe7(0x186)]()&&(_0x53911f['push'](_0xffc43e),_0x36344a[_0xffc43e]='ci');}}const _0xa8ac67=await _0x458e06[_0x4d0fe7(0x1aa)](readdir,_0x271088);for(const _0x1672db of _0xa8ac67){if(NON_ENV_DIRS[_0x4d0fe7(0x18a)](_0x1672db))continue;if(_0x1672db[_0x4d0fe7(0x1ac)]('.'))continue;if(_0x1672db[_0x4d0fe7(0x19d)]('.txt'))continue;const _0x493160=_0x458e06[_0x4d0fe7(0x187)](join,_0x271088,_0x1672db),_0x3c0658=await _0x458e06[_0x4d0fe7(0x1aa)](stat,_0x493160);_0x3c0658[_0x4d0fe7(0x186)]()&&existsSync(_0x458e06[_0x4d0fe7(0x19e)](join,_0x493160,_0x458e06[_0x4d0fe7(0x18b)]))&&(!_0x53911f['includes'](_0x1672db)&&(_0x53911f['push'](_0x1672db),_0x36344a[_0x1672db]=_0x4d0fe7(0x1a6)));}return{'envNames':_0x53911f,'activeEnv':_0x1bd481,'envTypes':_0x36344a};}export async function envList(){const _0x491602=_0x24ca8d,_0x35dfcd={'mkFGI':function(_0x3578e7){return _0x3578e7();},'qsAZL':function(_0x3f7e5d,_0x419dde){return _0x3f7e5d>_0x419dde;},'zQjAG':'\x0aLocal\x20Profiles:','RqEuy':_0x491602(0x1a5),'IWyjG':function(_0x307b3b,_0x13a6f0){return _0x307b3b(_0x13a6f0);},'anhMu':function(_0x2576e5,_0x1b939a){return _0x2576e5===_0x1b939a;},'nksfP':_0x491602(0x1a6),'umLEP':function(_0x5df176,_0x59c329){return _0x5df176>_0x59c329;},'nfqwt':'no\x20session'},{envNames:_0x4082c1,activeEnv:_0x416bf7,envTypes:_0x475adf}=await _0x35dfcd[_0x491602(0x185)](getEnvNames);let _0x45226e=[];try{_0x45226e=await _0x35dfcd[_0x491602(0x185)](listCloudProfiles);}catch{}if(_0x4082c1[_0x491602(0x1a9)]===0x0&&_0x45226e['length']===0x0){console['log'](_0x491602(0x1ad)),console[_0x491602(0x198)]('Run:\x20ranger\x20profile\x20add\x20<profile-name>');return;}const _0x4ab769=new Set(_0x45226e[_0x491602(0x1ab)](_0xc4fa97=>_0xc4fa97['name']));if(_0x35dfcd[_0x491602(0x194)](_0x4082c1['length'],0x0)){console[_0x491602(0x198)](_0x35dfcd[_0x491602(0x1a4)]);for(const _0x57bf66 of _0x4082c1[_0x491602(0x196)]()){const _0x125fab=_0x57bf66===_0x416bf7&&!_0x4ab769[_0x491602(0x18e)](_0x57bf66),_0x2eaf33=_0x475adf[_0x57bf66]||_0x35dfcd['RqEuy'],_0x545d80=await _0x35dfcd[_0x491602(0x191)](loadSettings,_0x57bf66),_0xfd5a8d=_0x35dfcd['anhMu'](_0x2eaf33,_0x35dfcd['nksfP'])?'':'\x20['+_0x2eaf33+']';console['log']('\x20\x20'+(_0x125fab?'*\x20':'\x20\x20')+_0x57bf66+_0xfd5a8d),_0x545d80['baseUrl']&&console[_0x491602(0x198)](_0x491602(0x1a3)+_0x545d80['baseUrl']),_0x545d80[_0x491602(0x189)]&&console['log'](_0x491602(0x1a0)+_0x545d80['environmentDetails']);}}if(_0x35dfcd['umLEP'](_0x45226e[_0x491602(0x1a9)],0x0)){console['log'](_0x491602(0x188));for(const _0x53adad of _0x45226e[_0x491602(0x196)]((_0x297e4e,_0x3d614d)=>_0x297e4e[_0x491602(0x195)]['localeCompare'](_0x3d614d['name']))){const _0x4452cc=_0x53adad[_0x491602(0x195)]===_0x416bf7,_0x22336a=_0x53adad[_0x491602(0x1a7)]?'\x20('+_0x53adad['environmentKey']+')':'',_0x152af8=_0x53adad[_0x491602(0x1a1)]?'cached\x20(updated\x20'+_0x53adad[_0x491602(0x1a1)]+')':_0x35dfcd['nfqwt'];console[_0x491602(0x198)]('\x20\x20'+(_0x4452cc?'*\x20':'\x20\x20')+_0x53adad['name']+_0x491602(0x199)+_0x22336a),console[_0x491602(0x198)](_0x491602(0x190)+_0x152af8);}}_0x416bf7&&console['log']('\x0a*\x20=\x20active\x20profile');}
1
+ const _0x4cb18e=_0x42d8;function _0x42d8(_0x4ef2a0,_0x31d99d){_0x4ef2a0=_0x4ef2a0-0x1c7;const _0x11b954=_0x11b9();let _0x42d8d6=_0x11b954[_0x4ef2a0];return _0x42d8d6;}(function(_0xdb812d,_0x1a3a51){const _0x110464=_0x42d8,_0x355d26=_0xdb812d();while(!![]){try{const _0x1fd3cd=-parseInt(_0x110464(0x1df))/0x1*(parseInt(_0x110464(0x1d5))/0x2)+-parseInt(_0x110464(0x1ca))/0x3+-parseInt(_0x110464(0x1ed))/0x4+-parseInt(_0x110464(0x1d6))/0x5+-parseInt(_0x110464(0x1e2))/0x6+-parseInt(_0x110464(0x1e9))/0x7+parseInt(_0x110464(0x1dd))/0x8;if(_0x1fd3cd===_0x1a3a51)break;else _0x355d26['push'](_0x355d26['shift']());}catch(_0x521b3e){_0x355d26['push'](_0x355d26['shift']());}}}(_0x11b9,0xb7b87));import{readdir,stat}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{getRangerDir}from'./utils/rangerRoot.js';import{loadSettings}from'./utils/settings.js';import{readActiveProfileName}from'./utils/activeProfile.js';import{listCloudProfiles}from'./utils/cloudProfile.js';const NON_ENV_DIRS=[_0x4cb18e(0x1ea),'bug-bashes',_0x4cb18e(0x1d9),'local','ci'];export async function getEnvNames(){const _0x4245e7=_0x4cb18e,_0x30ca03={'tTGyy':function(_0x5d5b0d){return _0x5d5b0d();},'KyRCU':function(_0x4d5070,_0x242277,_0x25f044){return _0x4d5070(_0x242277,_0x25f044);},'ucMIE':_0x4245e7(0x1e0),'uvztj':function(_0x20453a,_0x4176be){return _0x20453a(_0x4176be);},'PZdCr':function(_0x4b17c5,_0x1a81a4){return _0x4b17c5(_0x1a81a4);},'JkOhV':function(_0xa44b14,_0x788fe3){return _0xa44b14(_0x788fe3);},'vRbab':function(_0x3c66ea,_0x12b33b){return _0x3c66ea(_0x12b33b);},'tTKsD':function(_0x1df6c0,_0x5715ca,_0x2088d8){return _0x1df6c0(_0x5715ca,_0x2088d8);},'HuNxo':'legacy'},_0x10556f=_0x30ca03[_0x4245e7(0x1de)](getRangerDir);if(!existsSync(_0x10556f))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x1b194d=await readActiveProfileName(),_0x278b73=[],_0x27b672={},_0x4b8220=_0x30ca03[_0x4245e7(0x1ce)](join,_0x10556f,_0x30ca03['ucMIE']);if(existsSync(_0x4b8220)){const _0x2c0f2f=await readdir(_0x4b8220);for(const _0x5e4e39 of _0x2c0f2f){const _0x1f4128=join(_0x4b8220,_0x5e4e39),_0x5b5d85=await _0x30ca03['uvztj'](stat,_0x1f4128);_0x5b5d85[_0x4245e7(0x1c9)]()&&(_0x278b73[_0x4245e7(0x1e5)](_0x5e4e39),_0x27b672[_0x5e4e39]=_0x30ca03['ucMIE']);}}const _0x2faca5=join(_0x10556f,'ci');if(_0x30ca03[_0x4245e7(0x1c8)](existsSync,_0x2faca5)){const _0x5afeb3=await _0x30ca03['JkOhV'](readdir,_0x2faca5);for(const _0x41bf81 of _0x5afeb3){const _0x91edec=_0x30ca03[_0x4245e7(0x1ce)](join,_0x2faca5,_0x41bf81),_0xf063e1=await _0x30ca03[_0x4245e7(0x1d3)](stat,_0x91edec);_0xf063e1['isDirectory']()&&(_0x278b73['push'](_0x41bf81),_0x27b672[_0x41bf81]='ci');}}const _0x548977=await readdir(_0x10556f);for(const _0x386432 of _0x548977){if(NON_ENV_DIRS['includes'](_0x386432))continue;if(_0x386432[_0x4245e7(0x1e3)]('.'))continue;if(_0x386432['endsWith'](_0x4245e7(0x1eb)))continue;const _0x32bfe6=join(_0x10556f,_0x386432),_0xf454ae=await _0x30ca03[_0x4245e7(0x1d3)](stat,_0x32bfe6);_0xf454ae['isDirectory']()&&_0x30ca03['vRbab'](existsSync,_0x30ca03['tTKsD'](join,_0x32bfe6,'settings.json'))&&(!_0x278b73['includes'](_0x386432)&&(_0x278b73['push'](_0x386432),_0x27b672[_0x386432]=_0x30ca03['HuNxo']));}return{'envNames':_0x278b73,'activeEnv':_0x1b194d,'envTypes':_0x27b672};}export async function envList(){const _0x4904de=_0x4cb18e,_0x704380={'Omkly':function(_0x25e000){return _0x25e000();},'YJxMH':function(_0xc3ba0c,_0x469aca){return _0xc3ba0c===_0x469aca;},'bywcp':_0x4904de(0x1cb),'TJBLC':'Run:\x20ranger\x20profile\x20add\x20<profile-name>','oksNx':function(_0x3e2381,_0x391b07){return _0x3e2381>_0x391b07;},'CHhpe':'local','zCeCB':function(_0x28bbbd,_0x3c3e8e){return _0x28bbbd(_0x3c3e8e);},'hSuhI':'legacy','HAnLl':'\x0aCloud\x20Profiles:','HeQGS':function(_0x2a2f7a,_0x5edd86){return _0x2a2f7a===_0x5edd86;},'xdOvu':'no\x20session'},{envNames:_0x3192b9,activeEnv:_0x2397fd,envTypes:_0x383c3e}=await _0x704380[_0x4904de(0x1c7)](getEnvNames);let _0x53cbc2=[];try{_0x53cbc2=await _0x704380['Omkly'](listCloudProfiles);}catch{}if(_0x3192b9['length']===0x0&&_0x704380['YJxMH'](_0x53cbc2['length'],0x0)){console[_0x4904de(0x1db)](_0x704380[_0x4904de(0x1d4)]),console[_0x4904de(0x1db)](_0x704380['TJBLC']);return;}const _0x47c9a8=new Set(_0x53cbc2[_0x4904de(0x1d7)](_0x4a0575=>_0x4a0575[_0x4904de(0x1e8)]));if(_0x704380['oksNx'](_0x3192b9['length'],0x0)){console[_0x4904de(0x1db)](_0x4904de(0x1e4));for(const _0x32dd19 of _0x3192b9['sort']()){const _0x4cb202=_0x32dd19===_0x2397fd&&!_0x47c9a8[_0x4904de(0x1d0)](_0x32dd19),_0x3f3212=_0x383c3e[_0x32dd19]||_0x704380['CHhpe'],_0x5741a4=await _0x704380['zCeCB'](loadSettings,_0x32dd19),_0x5f17de=_0x3f3212===_0x704380['hSuhI']?'':'\x20['+_0x3f3212+']';console[_0x4904de(0x1db)]('\x20\x20'+(_0x4cb202?'*\x20':'\x20\x20')+_0x32dd19+_0x5f17de),_0x5741a4['baseUrl']&&console['log'](_0x4904de(0x1da)+_0x5741a4[_0x4904de(0x1cd)]),_0x5741a4['environmentDetails']&&console['log']('\x20\x20\x20\x20\x20\x20Details:\x20'+_0x5741a4[_0x4904de(0x1e1)]);}}if(_0x53cbc2['length']>0x0){console['log'](_0x704380[_0x4904de(0x1e7)]);for(const _0x9541da of _0x53cbc2[_0x4904de(0x1cf)]((_0x264f64,_0x40e63c)=>_0x264f64[_0x4904de(0x1e8)][_0x4904de(0x1dc)](_0x40e63c[_0x4904de(0x1e8)]))){const _0x4f517b=_0x704380[_0x4904de(0x1d2)](_0x9541da[_0x4904de(0x1e8)],_0x2397fd),_0x5a9972=_0x9541da[_0x4904de(0x1d1)]?'\x20('+_0x9541da[_0x4904de(0x1d1)]+')':'',_0x329dc8=_0x9541da['sessionUpdatedAt']?'cached\x20(updated\x20'+_0x9541da[_0x4904de(0x1cc)]+')':_0x704380[_0x4904de(0x1e6)];console[_0x4904de(0x1db)]('\x20\x20'+(_0x4f517b?'*\x20':'\x20\x20')+_0x9541da['name']+_0x4904de(0x1d8)+_0x5a9972),console[_0x4904de(0x1db)](_0x4904de(0x1ec)+_0x329dc8);}}_0x2397fd&&console[_0x4904de(0x1db)]('\x0a*\x20=\x20active\x20profile');}function _0x11b9(){const _0x2bb4fb=['log','localeCompare','47960040JQlVZL','tTGyy','45463ZVcsXQ','local','environmentDetails','5664540inikwy','startsWith','\x0aLocal\x20Profiles\x20(legacy):','push','xdOvu','HAnLl','name','6326460DekgwC','sessions','.txt','\x20\x20\x20\x20\x20\x20Session:\x20','327732ZaisJz','Omkly','PZdCr','isDirectory','4114164JLrevI','\x0aNo\x20profiles\x20found.','sessionUpdatedAt','baseUrl','KyRCU','sort','has','environmentKey','HeQGS','vRbab','bywcp','38yWEyQA','5387490rANJww','map','\x20[cloud]','reports','\x20\x20\x20\x20\x20\x20URL:\x20'];_0x11b9=function(){return _0x2bb4fb;};return _0x11b9();}
@@ -1 +1 @@
1
- const _0x455191=_0xea2f;(function(_0x359d55,_0x73b88e){const _0x44de3b=_0xea2f,_0x4e5b80=_0x359d55();while(!![]){try{const _0x43b49e=parseInt(_0x44de3b(0x12d))/0x1*(parseInt(_0x44de3b(0xd2))/0x2)+parseInt(_0x44de3b(0x121))/0x3*(parseInt(_0x44de3b(0x144))/0x4)+-parseInt(_0x44de3b(0x11b))/0x5+-parseInt(_0x44de3b(0xfe))/0x6*(parseInt(_0x44de3b(0x116))/0x7)+-parseInt(_0x44de3b(0x131))/0x8+-parseInt(_0x44de3b(0x15c))/0x9*(parseInt(_0x44de3b(0x10d))/0xa)+parseInt(_0x44de3b(0x162))/0xb;if(_0x43b49e===_0x73b88e)break;else _0x4e5b80['push'](_0x4e5b80['shift']());}catch(_0x59beb1){_0x4e5b80['push'](_0x4e5b80['shift']());}}}(_0x4f03,0xd8510));import{readFile,writeFile,mkdir}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{execSync}from'child_process';import _0x49b5e8 from'inquirer';import{createFeature,listFeatures,getFeature,updateFeature,getFeatureReport,getFeatureReportMarkdown,listFeatureSessions,startSession,concludeSession,createChecklistItem,getActionItems,getItemFeedback,softDeleteFeature,restoreFeature,updateChecklistItem}from'./utils/featureApi.js';import{getBrowserSessionSteps}from'./utils/browserSessionsApi.js';import{getApiBaseUrl}from'./utils/environment.js';import{getRangerDir}from'./utils/rangerRoot.js';import{registerSession}from'./utils/sessionCache.js';import{getEnvNames}from'./env.js';import{formatProfileRequiredMessage}from'./utils/profileMessages.js';import{listCloudProfiles}from'./utils/cloudProfile.js';const ACTIVE_FEATURE_FILE=_0x455191(0xfa),bold=_0x529136=>_0x455191(0x184)+_0x529136+'\x1b[0m';function getGitRepoUrl(){const _0xffe878=_0x455191,_0x2e0ecb={'aaMgR':function(_0x5e661f,_0x4b9282,_0x322493){return _0x5e661f(_0x4b9282,_0x322493);},'JlihD':_0xffe878(0x182),'uQQec':'pipe','LYgRD':'github.com/'};try{const _0x306380=_0x2e0ecb['aaMgR'](execSync,_0x2e0ecb[_0xffe878(0x16a)],{'encoding':_0xffe878(0x1a5),'stdio':[_0x2e0ecb[_0xffe878(0x126)],_0x2e0ecb['uQQec'],_0x2e0ecb['uQQec']]})['trim']();return _0x306380[_0xffe878(0x192)](/\.git$/,'')[_0xffe878(0x192)](/^git@github\.com:/,_0x2e0ecb[_0xffe878(0x161)])[_0xffe878(0x192)](/^https?:\/\//,'');}catch{return undefined;}}function getGitBranch(){const _0x247b84=_0x455191,_0x3ace9a={'wXNPI':_0x247b84(0x1a5),'jwYlB':_0x247b84(0x12e)};try{return execSync(_0x247b84(0x141),{'encoding':_0x3ace9a[_0x247b84(0xef)],'stdio':[_0x247b84(0x12e),_0x247b84(0x12e),_0x3ace9a[_0x247b84(0x114)]]})['trim']();}catch{return undefined;}}export async function getActiveFeatureId(){const _0xd56fd4={'PNtde':function(_0x34d083,_0x3b9e9e,_0x190d42){return _0x34d083(_0x3b9e9e,_0x190d42);},'MgDkV':function(_0x1045a0){return _0x1045a0();},'lrtUO':'utf-8'},_0x511aba=_0xd56fd4['PNtde'](join,_0xd56fd4['MgDkV'](getRangerDir),ACTIVE_FEATURE_FILE);if(!existsSync(_0x511aba))return null;try{const _0x4aa3eb=await _0xd56fd4['PNtde'](readFile,_0x511aba,_0xd56fd4['lrtUO']);return _0x4aa3eb['trim']()||null;}catch{return null;}}async function setActiveFeatureId(_0x21b938){const _0x27d11f=_0x455191,_0x2f8f70={'VBkLd':function(_0x26fe22){return _0x26fe22();},'kDTzX':function(_0xd90a59,_0x236268,_0x1b39ed){return _0xd90a59(_0x236268,_0x1b39ed);},'HoeFG':function(_0x3a745b,_0x203639,_0x1d6d24,_0x18befe){return _0x3a745b(_0x203639,_0x1d6d24,_0x18befe);}},_0x5197c4=_0x2f8f70[_0x27d11f(0x17f)](getRangerDir),_0xc00c4e=join(_0x5197c4,ACTIVE_FEATURE_FILE);!existsSync(_0x5197c4)&&await _0x2f8f70[_0x27d11f(0x128)](mkdir,_0x5197c4,{'recursive':!![]}),await _0x2f8f70[_0x27d11f(0x150)](writeFile,_0xc00c4e,_0x21b938,'utf-8');}function getProgressDisplay(_0x5b54fb){const _0x32dd59=_0x455191,_0x392150={'AodpI':function(_0x3d76f5,_0x207f72){return _0x3d76f5+_0x207f72;},'EAmAQ':function(_0x22ce96,_0x509b11){return _0x22ce96===_0x509b11;},'UimQv':function(_0x1d9272,_0x33a413){return _0x1d9272*_0x33a413;},'YUJWP':function(_0x1bd9c6,_0x5da90c){return _0x1bd9c6-_0x5da90c;},'yfnZm':function(_0x4765df,_0x1dd426){return _0x4765df>_0x1dd426;}},_0x4e6f64=_0x5b54fb['verifiedItems']||0x0,_0x9383d1=_0x5b54fb[_0x32dd59(0x136)]||0x0,_0x264c7e=_0x5b54fb[_0x32dd59(0x119)]||0x0,_0x2b6143=_0x5b54fb[_0x32dd59(0xcc)]||0x0,_0x55543e=_0x5b54fb[_0x32dd59(0x16d)]||0x0,_0x1d5ac7=_0x392150[_0x32dd59(0x10f)](_0x4e6f64+_0x9383d1,_0x264c7e)+_0x2b6143+_0x55543e;if(_0x392150[_0x32dd59(0x17a)](_0x1d5ac7,0x0))return'-';const _0x3aedd3=0xa,_0x3268d4=Math['round'](_0x392150[_0x32dd59(0x129)](_0x4e6f64/_0x1d5ac7,_0x3aedd3)),_0x578466='█'['repeat'](_0x3268d4)+'░'[_0x32dd59(0xf4)](_0x392150['YUJWP'](_0x3aedd3,_0x3268d4)),_0xb820cd=[];if(_0x264c7e>0x0)_0xb820cd['push'](_0x264c7e+_0x32dd59(0x199));if(_0x392150[_0x32dd59(0x179)](_0x2b6143,0x0))_0xb820cd['push'](_0x2b6143+'\x20incomplete');if(_0x9383d1>0x0)_0xb820cd[_0x32dd59(0xf0)](_0x9383d1+'\x20in\x20progress');const _0x339adf=_0x392150['yfnZm'](_0xb820cd[_0x32dd59(0x19b)],0x0)?'\x20('+_0xb820cd[_0x32dd59(0x11a)](',\x20')+')':'';return _0x578466+'\x20'+_0x4e6f64+'/'+_0x1d5ac7+'\x20verified'+_0x339adf;}function getCurrentSessionItems(_0x367a6d,_0x446846){const _0x1adfac=_0x455191;if(!_0x367a6d[_0x1adfac(0x17d)])return _0x446846['filter'](_0x48bf26=>!_0x48bf26[_0x1adfac(0x18a)]);return _0x446846['filter'](_0xc60b2b=>_0xc60b2b[_0x1adfac(0x18a)]===_0x367a6d['currentSessionId']||!_0xc60b2b[_0x1adfac(0x18a)]);}function _0x4f03(){const _0x2d9638=['/artifacts/','\x20\x20\x20\x20\x20Progress:\x20','No\x20scenarios\x20found.','stats','ylNeY','latestReview','description','jEHkZ','RhhuZ','kSCSZ','write','toLocaleString','UbTfn','assetType','DFaVS','zfSiT','offset','wXNPI','push','):\x20\x22','get','YcArI','repeat','RsgbZ','VkABZ','\x20scenarios.','assets','blockedReason','active-feature.txt','in_progress','short','error','1542WLPlSB','\x0a✅\x20Resumed\x20feature\x20review:\x20','scenarios','JCSwn','incomplete','approved','trim','vrpql','\x20--current-branch','dashboardUrl','\x20\x20\x20\x20\x20📋\x20Selector:\x20','fxwYY','jdumC','textContent','\x20\x20\x20Branch:\x20','3948600wOEepS','pJhue','AodpI','asHeD','completedAt','.md','\x0a✅\x20Session\x20is\x20already\x20completed.','jwYlB','Multiple\x20feature\x20reviews\x20found.\x20Select\x20one:','32088nzjWOM','screenshotUrls','type','blockedItems','join','4786470jycbpT','jCPPW','iftRX','mDLsj','all','No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','54EcfLUg','agentResponse','RANGER_TEST_USERNAME','gitBranch','terminalReason','uQQec','\x0aConcluding\x20session...','kDTzX','UimQv','\x20\x20\x20ID:\x20','ready','scenario','5tNoTuk','pipe','\x20(v','has','11654224guGPEM','\x20\x20\x20\x20\x20📍\x20Annotation:\x20point\x20at\x20(','No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','\x20\x20\x20To\x20restore\x20it,\x20run:\x20ranger\x20restore\x20','\x20\x20Expected\x20flow:','verificationInProgressItems','linkedSession','No\x20active\x20session\x20for\x20this\x20feature\x20review.','tpRdg','\x20\x20\x20Created:\x20','incompleteReason','\x20\x20\x20\x20\x20📷\x20Screenshot:\x20','\x20\x20\x20\x20\x20📍\x20Annotation:\x20','content','toLocaleDateString','limit','git\x20rev-parse\x20--abbrev-ref\x20HEAD','mTBuJ','XtFWL','210460PnhjYf','items','\x20\x20\x20\x20\x20\x20Blocked:\x20','yOAer','\x20\x20\x20\x20\x20🎯\x20Element:\x20<','\x0a❌\x20Cannot\x20edit\x20scenario:\x20feature\x20review\x20has\x20an\x20active\x20review.','en-US','filter','Scenario\x20','AHwRP','\x0a⚠️\x20\x20','find','HoeFG','\x0a❌\x20Invalid\x20scenario\x20number(s):\x20','\x20\x20\x20Updated\x20branch\x20to:\x20','bPkSp','\x20—\x20','pjnTR','canonicalFlow','env','name','kWVZZ','\x20/\x20','\x0a❌\x20Invalid\x20scenario\x20index:\x20','9ZKqTAp','any','uqODk','\x0a\x20\x20\x20Scenarios:','uvRNy','LYgRD','39774757uttzAf','\x0a✅\x20Report\x20generated:\x20','authorName','stdout','Run:\x20ranger\x20create\x20\x22<name>\x22\x20to\x20create\x20a\x20new\x20feature\x20review','submittedAt','sGjBc','version','JlihD','gitRepoUrl','isInteger','pendingItems','closed','dAKOv','log','split','reports','rNYCB','YpEBX','YVlzU','vPJVk','ohoQU','\x20\x20\x20\x20\x20\x20Incomplete:\x20','yfnZm','EAmAQ','isKeyStep','unaddressedComments','currentSessionId','selector','VBkLd','qGrpx','oGBpf','git\x20remote\x20get-url\x20origin','\x0a✅\x20Scenario\x20added','\x1b[1m','\x20\x20\x20Progress:\x20','createdAt','browserSessionId','ryDbh','domRef','sessionId','storage','\x20\x20\x20▶️\x20Started\x20session\x20','\x20--limit\x20','kppUY','bDdZT','spatial','Step\x20','replace','timing','qpjlv','\x20>\x20','Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','wALUZ','WXXZS','\x20blocked','NNPBM','length','\x0a✅\x20Restored\x20feature\x20review:\x20','checklistItems','verification_in_progress','AoaAY','canceledReason','\x0a❌\x20No\x20scenarios\x20found\x20to\x20edit.','point','exit','\x0aNo\x20feature\x20reviews\x20found.','utf-8','slice','ziNyc','\x0aNon-interactive\x20mode\x20detected.\x20Multiple\x20feature\x20reviews\x20found:','includeDeleted','\x20Session\x20','incompleteItems','\x20\x20\x20Repository:\x20','toFixed','PtwIt','\x0a✅\x20Scenario\x20updated','\x20scenario(s).','124038Fldfmx','status','map','cHaiC','YGNka','totalCount','Next\x20page:\x20ranger\x20list\x20--offset\x20','style','after','assetUrl','currentBranch','lckZM'];_0x4f03=function(){return _0x2d9638;};return _0x4f03();}function displayFeature(_0x3fff91,_0x4ffda3){const _0x9d6ec5=_0x455191,_0x37c34f={'ziNyc':function(_0x5a5ea6,_0x418280){return _0x5a5ea6>_0x418280;},'vrpql':_0x9d6ec5(0x15f),'DFaVS':function(_0x3c672c,_0x160f1e){return _0x3c672c===_0x160f1e;},'PtwIt':_0x9d6ec5(0x103),'YVlzU':_0x9d6ec5(0x102),'wALUZ':function(_0x4062eb,_0x514d31){return _0x4062eb===_0x514d31;},'uvRNy':_0x9d6ec5(0x16e),'fHrFs':_0x9d6ec5(0x19e),'rFFcl':function(_0x11c247,_0x260ab1){return _0x11c247>_0x260ab1;},'ohoQU':function(_0x3df8e0,_0x4658eb){return _0x3df8e0+_0x4658eb;},'bPkSp':function(_0x55cf4e,_0x27a9b4){return _0x55cf4e===_0x27a9b4;},'vXjPb':function(_0xe1364d,_0x2dc094){return _0xe1364d===_0x2dc094;}};console[_0x9d6ec5(0x170)]('\x0a'+_0x3fff91['name']+'\x20('+_0x3fff91[_0x9d6ec5(0x107)]+')');_0x3fff91[_0x9d6ec5(0xe1)]&&console['log']('\x20\x20\x20Progress:\x20'+getProgressDisplay(_0x3fff91[_0x9d6ec5(0xe1)]));_0x3fff91[_0x9d6ec5(0xe4)]&&console[_0x9d6ec5(0x170)]('\x20\x20\x20Description:\x20'+_0x3fff91['description']);_0x3fff91['gitRepoUrl']&&console[_0x9d6ec5(0x170)](_0x9d6ec5(0xcd)+_0x3fff91[_0x9d6ec5(0x16b)]);_0x3fff91['gitBranch']&&console['log'](_0x9d6ec5(0x10c)+_0x3fff91['gitBranch']);console['log'](_0x9d6ec5(0x13a)+new Date(_0x3fff91[_0x9d6ec5(0x186)])['toLocaleString']());_0x3fff91['completedAt']&&console['log']('\x20\x20\x20Completed:\x20'+new Date(_0x3fff91['completedAt'])['toLocaleString']());if(_0x4ffda3&&_0x37c34f[_0x9d6ec5(0x1a7)](_0x4ffda3[_0x9d6ec5(0x19b)],0x0)){console['log'](_0x37c34f[_0x9d6ec5(0x105)]);for(let _0x88c204=0x0;_0x88c204<_0x4ffda3[_0x9d6ec5(0x19b)];_0x88c204++){const _0x589df8=_0x4ffda3[_0x88c204];let _0xb4b462;if(_0x37c34f[_0x9d6ec5(0xec)](_0x589df8['status'],_0x9d6ec5(0x16e))&&_0x589df8['terminalReason']===_0x37c34f[_0x9d6ec5(0xcf)])_0xb4b462='✅';else{if(_0x37c34f['DFaVS'](_0x589df8['status'],'verified'))_0xb4b462='🟢';else{if(_0x589df8['status']===_0x37c34f[_0x9d6ec5(0x175)])_0xb4b462='🟠';else{if(_0x37c34f['wALUZ'](_0x589df8['status'],'blocked'))_0xb4b462='🛑';else{if(_0x37c34f[_0x9d6ec5(0xec)](_0x589df8['status'],_0x37c34f[_0x9d6ec5(0x160)]))_0xb4b462='⛔';else _0x589df8['status']===_0x37c34f['fHrFs']?_0xb4b462='⏳':_0xb4b462='⬜';}}}}const _0x5c25d2=_0x37c34f['rFFcl'](_0x589df8[_0x9d6ec5(0x169)],0x1)?_0x9d6ec5(0x12f)+_0x589df8['version']+')':'',_0x5a9f5c=_0x589df8['version']>0x1&&_0x589df8['parentItemId']&&_0x589df8[_0x9d6ec5(0xd3)]!==_0x37c34f['uvRNy']&&_0x589df8['status']!=='verified'?'\x20[has\x20reviewer\x20feedback]':'';console['log']('\x20\x20\x20'+_0x37c34f[_0x9d6ec5(0x177)](_0x88c204,0x1)+'.\x20'+_0xb4b462+'\x20'+_0x589df8['description']+_0x5c25d2+_0x5a9f5c);_0x589df8['status']==='blocked'&&_0x589df8['blockedReason']&&console[_0x9d6ec5(0x170)](_0x9d6ec5(0x146)+_0x589df8[_0x9d6ec5(0xf9)]);_0x37c34f[_0x9d6ec5(0x153)](_0x589df8[_0x9d6ec5(0xd3)],'incomplete')&&_0x589df8['incompleteReason']&&console['log'](_0x9d6ec5(0x178)+_0x589df8['incompleteReason']);if(_0x589df8[_0x9d6ec5(0xd3)]===_0x37c34f['uvRNy']&&_0x37c34f[_0x9d6ec5(0x197)](_0x589df8[_0x9d6ec5(0x125)],_0x9d6ec5(0x103)))console[_0x9d6ec5(0x170)]('\x20\x20\x20\x20\x20\x20Approved');else _0x37c34f['vXjPb'](_0x589df8['status'],_0x37c34f[_0x9d6ec5(0x160)])&&_0x589df8['canceledReason']&&console['log']('\x20\x20\x20\x20\x20\x20Cancelled:\x20'+_0x589df8['canceledReason']);}}}export async function featureCreate(_0x25e41c,_0x3835b3){const _0x2e1050=_0x455191,_0x20da5b={'zfSiT':function(_0x282be5,_0x217655){return _0x282be5===_0x217655;},'RsgbZ':function(_0x31945d){return _0x31945d();},'AoaAY':'\x0aCreating\x20feature\x20review...','ONcpZ':function(_0x3e5a71,_0x3c3dbc){return _0x3e5a71(_0x3c3dbc);},'DlCdH':function(_0x4fcc28,_0x5310c8){return _0x4fcc28(_0x5310c8);},'NNPBM':function(_0x599c82,_0x226bdc){return _0x599c82(_0x226bdc);},'mmBxm':function(_0x34e4ea,_0x49d8b0,_0x4f6fd6){return _0x34e4ea(_0x49d8b0,_0x4f6fd6);}},{envNames:_0x3be200}=await getEnvNames();if(_0x3be200[_0x2e1050(0x19b)]===0x0&&!process['env'][_0x2e1050(0x123)]){let _0x4bf60c=0x0;try{_0x4bf60c=(await listCloudProfiles())[_0x2e1050(0x19b)];}catch{_0x4bf60c=0x1;}_0x20da5b[_0x2e1050(0xed)](_0x4bf60c,0x0)&&console['warn']('\x0a'+formatProfileRequiredMessage(_0x3b729d=>bold(_0x3b729d)));}const _0x4d5f44=_0x3835b3[_0x2e1050(0x100)]?_0x3835b3[_0x2e1050(0x100)]['map'](_0x5ac65c=>_0x5ac65c[_0x2e1050(0x104)]()):[],_0x29460b=getGitRepoUrl(),_0x4fcadd=_0x20da5b[_0x2e1050(0xf5)](getGitBranch);console['log'](_0x20da5b[_0x2e1050(0x19f)]);const _0x5b4ba6=await _0x20da5b['ONcpZ'](createFeature,{'name':_0x25e41c,'description':_0x3835b3[_0x2e1050(0xe4)],'checklist':_0x4d5f44,'gitRepoUrl':_0x29460b,'gitBranch':_0x4fcadd});await _0x20da5b['DlCdH'](setActiveFeatureId,_0x5b4ba6['id']),await _0x20da5b[_0x2e1050(0x19a)](tryStartCurrentSession,_0x5b4ba6['id']);const _0x1e148e=process[_0x2e1050(0x157)]['CLAUDE_SESSION_ID'];_0x1e148e&&_0x20da5b['mmBxm'](registerSession,_0x1e148e,_0x5b4ba6['id']),console['log']('\x0a✅\x20Feature\x20review\x20created:\x20'+_0x5b4ba6['id']),displayFeature(_0x5b4ba6,_0x5b4ba6[_0x2e1050(0x19d)]),console['log']('\x0a➡️\x20\x20Set\x20as\x20active\x20feature\x20review');}export async function featureList(_0x486a01){const _0x528c80=_0x455191,_0x1be227={'WXXZS':function(_0x3197a6){return _0x3197a6();},'jCPPW':'1|5|4|2|0|3','OtAtF':function(_0x2f304,_0x5767e4){return _0x2f304(_0x5767e4);},'pEKft':'\x20--include-deleted'},_0x38da55={'limit':_0x486a01['limit']??0xa,'offset':_0x486a01['offset']??0x0,'includeDeleted':_0x486a01['includeDeleted']};_0x486a01[_0x528c80(0xdc)]&&(_0x38da55['gitRepoUrl']=_0x1be227[_0x528c80(0x198)](getGitRepoUrl),_0x38da55[_0x528c80(0x124)]=getGitBranch());const _0x30efcc=await listFeatures(_0x38da55);if(_0x30efcc[_0x528c80(0x145)]['length']===0x0){console['log'](_0x528c80(0x1a4));return;}const _0x361915=_0x30efcc[_0x528c80(0xd7)]>_0x30efcc['items'][_0x528c80(0x19b)]?'Showing\x20'+_0x30efcc['items']['length']+'\x20of\x20'+_0x30efcc[_0x528c80(0xd7)]:_0x30efcc[_0x528c80(0xd7)]+'\x20feature\x20review(s)\x20found';console['log']('\x0a'+_0x361915+':\x0a');for(const _0x3f59f7 of _0x30efcc['items']){const _0x45dceb=_0x1be227[_0x528c80(0x11c)]['split']('|');let _0x57cd56=0x0;while(!![]){switch(_0x45dceb[_0x57cd56++]){case'0':console['log'](_0x528c80(0x13a)+new Date(_0x3f59f7['createdAt'])['toLocaleDateString']());continue;case'1':console[_0x528c80(0x170)](''+_0x3f59f7[_0x528c80(0x158)]);continue;case'2':_0x3f59f7[_0x528c80(0x124)]&&console[_0x528c80(0x170)]('\x20\x20\x20Branch:\x20'+_0x3f59f7['gitBranch']);continue;case'3':console['log']('');continue;case'4':_0x3f59f7['stats']&&console[_0x528c80(0x170)](_0x528c80(0x185)+_0x1be227['OtAtF'](getProgressDisplay,_0x3f59f7['stats']));continue;case'5':console['log'](_0x528c80(0x12a)+_0x3f59f7['id']);continue;}break;}}const _0x48dbf8=_0x38da55[_0x528c80(0x140)]??0xa,_0x240f50=(_0x38da55[_0x528c80(0xee)]??0x0)+_0x30efcc['items']['length'];if(_0x240f50<_0x30efcc[_0x528c80(0xd7)]){const _0x5f4e2f=_0x48dbf8!==0xa?_0x528c80(0x18d)+_0x48dbf8:'',_0x1b4d2a=_0x486a01[_0x528c80(0xdc)]?_0x528c80(0x106):'',_0x404dbc=_0x486a01[_0x528c80(0x1a9)]?_0x1be227['pEKft']:'';console[_0x528c80(0x170)](_0x528c80(0xd8)+_0x240f50+_0x5f4e2f+_0x1b4d2a+_0x404dbc);}}export async function featureShow(_0x14d54d){const _0x4318dc=_0x455191,_0x2b20c6={'pJhue':function(_0x3360f5,_0x243cc1,_0x5614f9){return _0x3360f5(_0x243cc1,_0x5614f9);}},_0x183655=_0x14d54d||await getActiveFeatureId();if(!_0x183655)throw new Error(_0x4318dc(0x133));const _0x21d822=await getFeature(_0x183655);_0x2b20c6[_0x4318dc(0x10e)](displayFeature,_0x21d822,_0x21d822[_0x4318dc(0x19d)]);}export async function featureResume(_0x15beb3){const _0x1ef07c=_0x455191,_0x2eb68a={'qpjlv':function(_0x4da653,_0x3a0f9e){return _0x4da653(_0x3a0f9e);},'ryDbh':function(_0x3f7a5f){return _0x3f7a5f();},'InaGN':function(_0x4e7948,_0x14c639){return _0x4e7948!==_0x14c639;},'xhmeC':function(_0xebc01,_0x56f177,_0x1259d6){return _0xebc01(_0x56f177,_0x1259d6);},'fxwYY':function(_0x160706,_0x40d70c){return _0x160706(_0x40d70c);},'rNYCB':function(_0x39cb8a){return _0x39cb8a();},'NVSoZ':function(_0x5250b9,_0xc5f7c9){return _0x5250b9||_0xc5f7c9;},'hHgxq':_0x1ef07c(0x15d),'asHeD':'selected','dAKOv':function(_0x4bd0d3,_0x397aee){return _0x4bd0d3(_0x397aee);}};if(_0x15beb3){const _0x409118=await _0x2eb68a['qpjlv'](getFeature,_0x15beb3);await setActiveFeatureId(_0x409118['id']);const _0x555c4c=_0x2eb68a[_0x1ef07c(0x188)](getGitBranch);_0x555c4c&&_0x2eb68a['InaGN'](_0x555c4c,_0x409118['gitBranch'])&&(await _0x2eb68a['xhmeC'](updateFeature,_0x409118['id'],{'gitBranch':_0x555c4c}),console['log']('\x20\x20\x20Updated\x20branch\x20to:\x20'+_0x555c4c));console['log']('\x0a✅\x20Resumed\x20feature\x20review:\x20'+_0x409118[_0x1ef07c(0x158)]+'\x20('+_0x409118['id']+')'),await tryStartCurrentSession(_0x409118['id']);const _0x3c3c71=process['env']['CLAUDE_SESSION_ID'];_0x3c3c71&&registerSession(_0x3c3c71,_0x409118['id']);_0x2eb68a['xhmeC'](displayFeature,_0x409118,_0x409118['checklistItems']),await _0x2eb68a[_0x1ef07c(0x109)](printFeedbackNudge,_0x409118['id']);return;}const _0x7cf641=getGitRepoUrl(),_0x139047=_0x2eb68a[_0x1ef07c(0x173)](getGitBranch);if(!_0x7cf641&&!_0x139047)throw new Error('Not\x20in\x20a\x20git\x20repository.');console['log']('\x0aSearching\x20for\x20feature\x20reviews\x20matching:\x20'+_0x2eb68a['NVSoZ'](_0x7cf641,_0x2eb68a['hHgxq'])+_0x1ef07c(0x15a)+(_0x139047||_0x1ef07c(0x15d))+'...');const _0x17de42=await _0x2eb68a[_0x1ef07c(0x109)](listFeatures,{'gitRepoUrl':_0x7cf641,'gitBranch':_0x139047}),_0x229229=_0x17de42['items']['filter'](_0x2c4d0b=>_0x2c4d0b[_0x1ef07c(0xd3)]?_0x2c4d0b['status']!=='verified':!_0x2c4d0b['completedAt']);if(_0x229229[_0x1ef07c(0x19b)]===0x0){console[_0x1ef07c(0x170)]('\x0aNo\x20matching\x20active\x20feature\x20reviews\x20found.'),console[_0x1ef07c(0x170)](_0x1ef07c(0x166));return;}let _0x5d0fe1;if(_0x229229[_0x1ef07c(0x19b)]===0x1)_0x5d0fe1=_0x229229[0x0];else{const _0x4f98ae=process['stdin']['isTTY']&&process[_0x1ef07c(0x165)]['isTTY'];if(!_0x4f98ae){console['log'](_0x1ef07c(0x1a8));for(const _0x93184a of _0x229229){console['log']('\x20\x20'+_0x93184a['name']),console[_0x1ef07c(0x170)]('\x20\x20\x20\x20\x20ID:\x20'+_0x93184a['id']),_0x93184a['stats']&&console['log'](_0x1ef07c(0xdf)+_0x2eb68a['qpjlv'](getProgressDisplay,_0x93184a[_0x1ef07c(0xe1)])),_0x93184a[_0x1ef07c(0x124)]&&console['log']('\x20\x20\x20\x20\x20Branch:\x20'+_0x93184a['gitBranch']);}throw new Error('Please\x20specify\x20the\x20feature\x20review\x20ID:\x20ranger\x20resume\x20<id>');}const {selected:_0x94ecaf}=await _0x49b5e8['prompt']([{'type':'list','name':_0x2eb68a[_0x1ef07c(0x110)],'message':_0x1ef07c(0x115),'choices':_0x229229['map'](_0x419637=>({'name':_0x419637[_0x1ef07c(0x158)]+'\x20('+_0x419637['id']+')','value':_0x419637['id']}))}]);_0x5d0fe1=_0x229229[_0x1ef07c(0x14f)](_0x59cf4d=>_0x59cf4d['id']===_0x94ecaf);}await _0x2eb68a[_0x1ef07c(0x16f)](setActiveFeatureId,_0x5d0fe1['id']);_0x139047&&_0x139047!==_0x5d0fe1[_0x1ef07c(0x124)]&&(await updateFeature(_0x5d0fe1['id'],{'gitBranch':_0x139047}),console['log'](_0x1ef07c(0x152)+_0x139047));console['log'](_0x1ef07c(0xff)+_0x5d0fe1['name']+'\x20('+_0x5d0fe1['id']+')'),await _0x2eb68a[_0x1ef07c(0x194)](tryStartCurrentSession,_0x5d0fe1['id']);const _0x2fc5b3=await _0x2eb68a['dAKOv'](getFeature,_0x5d0fe1['id']),_0x1e0537=process['env']['CLAUDE_SESSION_ID'];_0x1e0537&&registerSession(_0x1e0537,_0x2fc5b3['id']),displayFeature(_0x2fc5b3,_0x2fc5b3['checklistItems']),await printFeedbackNudge(_0x2fc5b3['id']);}async function printFeedbackNudge(_0x4b250c){const _0x4a6e46=_0x455191;try{const {items:_0x277461}=await getActionItems(_0x4b250c);let _0x1a939e=0x0,_0x173c1a=0x0;for(const _0x6f4a41 of _0x277461){const _0x2bc67d=await getItemFeedback(_0x4b250c,_0x6f4a41['id']);_0x2bc67d['unaddressedComments']['length']>0x0&&(_0x1a939e+=_0x2bc67d['unaddressedComments'][_0x4a6e46(0x19b)],_0x173c1a++);}_0x1a939e>0x0&&(console[_0x4a6e46(0x170)](_0x4a6e46(0x14e)+_0x1a939e+'\x20unaddressed\x20reviewer\x20comment(s)\x20across\x20'+_0x173c1a+_0x4a6e46(0xd1)),console['log']('\x20\x20\x20Run\x20`ranger\x20get-review`\x20to\x20see\x20what\x20needs\x20to\x20be\x20fixed.'));}catch{}}async function tryStartCurrentSession(_0x20893b){const _0x573324=_0x455191,_0x519f8a={'AHwRP':function(_0x13c8b3,_0x9c9629){return _0x13c8b3(_0x9c9629);}};try{const {sessions:_0x41297c}=await _0x519f8a[_0x573324(0x14d)](listFeatureSessions,_0x20893b),_0xf705c6=_0x41297c['find'](_0x8a4735=>_0x8a4735['status']===_0x573324(0x12b));_0xf705c6&&(await startSession(_0x20893b,_0xf705c6['id']),console['log'](_0x573324(0x18c)+_0xf705c6['iteration']));}catch{}}function _0xea2f(_0x36d32,_0x41dad5){_0x36d32=_0x36d32-0xcc;const _0x4f039f=_0x4f03();let _0xea2fe4=_0x4f039f[_0x36d32];return _0xea2fe4;}export async function featureReport(_0x38209f,_0x50d07a){const _0x18de00=_0x455191,_0xe7de13={'mDLsj':function(_0x145a25){return _0x145a25();},'jWwMC':'\x0aGenerating\x20report...','jEHkZ':function(_0x5005fb,_0x67f808,_0x3fc0b9,_0x464bd2){return _0x5005fb(_0x67f808,_0x3fc0b9,_0x464bd2);},'HrjDH':function(_0x348fa7,_0xd5809c){return _0x348fa7(_0xd5809c);},'WtgBc':function(_0x35fce1,_0x404b1e,_0x321602){return _0x35fce1(_0x404b1e,_0x321602);}},_0x2ec03a=_0x38209f||await _0xe7de13[_0x18de00(0x11e)](getActiveFeatureId);if(!_0x2ec03a)throw new Error(_0x18de00(0x120));console['log'](_0xe7de13['jWwMC']);const _0x3cfb68=await getFeatureReportMarkdown(_0x2ec03a,{'style':_0x50d07a[_0x18de00(0xd9)]}),_0x34f96f=_0x50d07a['output']||_0xe7de13[_0x18de00(0xe5)](join,_0xe7de13[_0x18de00(0x11e)](getRangerDir),_0x18de00(0x172),_0x2ec03a+_0x18de00(0x112)),_0x4b644e=join(_0x34f96f,'..');!_0xe7de13['HrjDH'](existsSync,_0x4b644e)&&await _0xe7de13['WtgBc'](mkdir,_0x4b644e,{'recursive':!![]}),await _0xe7de13['jEHkZ'](writeFile,_0x34f96f,_0x3cfb68,'utf-8'),console['log'](_0x18de00(0x163)+_0x34f96f);}function getScenarioResult(_0x1dc3cd){const _0x5bd365=_0x455191,_0x53c795={'jdumC':function(_0x4cf2ae,_0x3f901e){return _0x4cf2ae===_0x3f901e;},'sGjBc':'closed','mRBgK':'verification_in_progress','uqODk':_0x5bd365(0xfb)};if(_0x53c795['jdumC'](_0x1dc3cd[_0x5bd365(0xd3)],_0x5bd365(0x16e)))return _0x1dc3cd['terminalReason']??_0x53c795[_0x5bd365(0x168)];if(_0x53c795[_0x5bd365(0x10a)](_0x1dc3cd[_0x5bd365(0xd3)],_0x53c795['mRBgK']))return _0x53c795[_0x5bd365(0x15e)];return _0x1dc3cd['status'];}function getScenarioRationale(_0x25f7c7,_0x5f126b){const _0x3d5ff1=_0x455191;if(_0x5f126b)return _0x5f126b;if(_0x25f7c7['blockedReason'])return _0x25f7c7[_0x3d5ff1(0xf9)];if(_0x25f7c7[_0x3d5ff1(0x13b)])return _0x25f7c7['incompleteReason'];if(_0x25f7c7['canceledReason'])return _0x25f7c7[_0x3d5ff1(0x1a0)];if(_0x25f7c7['notes'])return _0x25f7c7['notes'];return null;}export async function featureReportPrDescription(_0x972fe0,_0x2d08e9){const _0x23ef30=_0x455191,_0x5aca2e={'sRRLZ':'No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','UWdzR':function(_0x26113c,_0x4f7b29,_0x3abaff){return _0x26113c(_0x4f7b29,_0x3abaff);},'ZwKRy':'\x0a❌\x20No\x20scenarios\x20found\x20to\x20include.','iQyBZ':function(_0x4fb5be,_0x12abb9){return _0x4fb5be+_0x12abb9;},'pCLCG':function(_0x224d13,_0x359437){return _0x224d13===_0x359437;},'tpRdg':'\x0a❌\x20All\x20scenarios\x20were\x20excluded.'},_0x5dd39e=_0x972fe0||await getActiveFeatureId();if(!_0x5dd39e)throw new Error(_0x5aca2e['sRRLZ']);const _0x23c05e=await getFeature(_0x5dd39e),_0x357595=_0x23c05e[_0x23ef30(0x19d)]||[],_0x41c68c=_0x5aca2e['UWdzR'](getCurrentSessionItems,_0x23c05e,_0x357595);_0x41c68c[_0x23ef30(0x19b)]===0x0&&(console['error'](_0x5aca2e['ZwKRy']),process['exit'](0x1));const _0x1becf5=_0x2d08e9['excludeScenarios']??[],_0x800b3a=_0x1becf5['filter'](_0x2af888=>!Number[_0x23ef30(0x16c)](_0x2af888)||_0x2af888<0x1||_0x2af888>_0x41c68c[_0x23ef30(0x19b)]);if(_0x800b3a[_0x23ef30(0x19b)]>0x0){console[_0x23ef30(0xfd)](_0x23ef30(0x151)+_0x800b3a[_0x23ef30(0x11a)](',\x20')),console['log']('\x0aAvailable\x20scenarios:');for(let _0x2cc996=0x0;_0x2cc996<_0x41c68c['length'];_0x2cc996++){console['log']('\x20\x20'+_0x5aca2e['iQyBZ'](_0x2cc996,0x1)+'.\x20'+_0x41c68c[_0x2cc996]['description']);}process[_0x23ef30(0x1a3)](0x1);}const _0x25f875=new Set(_0x1becf5[_0x23ef30(0xd4)](_0x2747e6=>_0x2747e6-0x1)),_0x301bd5=_0x41c68c[_0x23ef30(0x14b)]((_0x1c104d,_0x4be15a)=>!_0x25f875[_0x23ef30(0x130)](_0x4be15a));_0x5aca2e['pCLCG'](_0x301bd5[_0x23ef30(0x19b)],0x0)&&(console['error'](_0x5aca2e[_0x23ef30(0x139)]),process[_0x23ef30(0x1a3)](0x1));if(_0x2d08e9['json'])await outputJsonReport(_0x5dd39e,_0x23c05e,_0x301bd5);else{const _0x237895=await getFeatureReportMarkdown(_0x5dd39e,{'itemIds':_0x301bd5['map'](_0x187d16=>_0x187d16['id'])});process[_0x23ef30(0x165)][_0x23ef30(0xe8)](_0x237895['trimEnd']()+'\x0a');}}async function outputJsonReport(_0x4e459b,_0x4df671,_0x158848){const _0x10af0c=_0x455191,_0xc7d74e={'yOAer':function(_0x4d892a,_0x1cf148){return _0x4d892a(_0x1cf148);},'qfhoC':function(_0x5a1d36,_0x4cd4e0){return _0x5a1d36>_0x4cd4e0;},'YpEBX':function(_0x251cb8){return _0x251cb8();}},_0x58f43f=_0xc7d74e[_0x10af0c(0x174)](getApiBaseUrl),_0x502e6f=await getFeatureReport(_0x4e459b),_0x3e3076=new Map(_0x502e6f[_0x10af0c(0x19d)][_0x10af0c(0xd4)](_0x56bf0c=>[_0x56bf0c['id'],_0x56bf0c])),_0x5b5b49=await Promise[_0x10af0c(0x11f)](_0x158848[_0x10af0c(0xd4)](async _0x286121=>{const _0x206fe0=_0x10af0c,_0x5a0a96=_0x3e3076[_0x206fe0(0xf2)](_0x286121['id']),_0x315a05=_0x5a0a96?.[_0x206fe0(0x137)]??null;let _0x4edd4f=[];if(_0x286121['browserSessionId'])try{const {steps:_0x4662f7}=await _0xc7d74e['yOAer'](getBrowserSessionSteps,_0x286121[_0x206fe0(0x187)]);_0xc7d74e['qfhoC'](_0x4662f7['length'],0x0)&&(_0x4edd4f=_0x4662f7[_0x206fe0(0xd4)](_0x29144c=>{const _0xd2b2ac=_0x206fe0,_0x41aec2=_0x29144c['assets'][_0xd2b2ac(0x14f)](_0x243fef=>_0x243fef[_0xd2b2ac(0xeb)]==='screenshot'&&_0x243fef[_0xd2b2ac(0x193)]===_0xd2b2ac(0xda))??_0x29144c[_0xd2b2ac(0xf8)][_0xd2b2ac(0x14f)](_0x3188e0=>_0x3188e0[_0xd2b2ac(0xeb)]==='screenshot');let _0x548224=null,_0x4c5029=null;if(_0x41aec2){const _0xd7dc54=_0x41aec2[_0xd2b2ac(0x18b)]['location'][_0xd2b2ac(0x171)]('/')['pop']();_0x548224=_0x58f43f+'/api/v1/mcp/browser-sessions/'+_0x286121[_0xd2b2ac(0x187)]+_0xd2b2ac(0xde)+_0xd7dc54,_0xd7dc54&&(_0x4c5029=_0xd7dc54[_0xd2b2ac(0x192)](/\.\w+$/,'')[_0xd2b2ac(0x192)](/^(key_)?\d+_/,'')[_0xd2b2ac(0x192)](/[-_]/g,'\x20'));}return{'description':_0x4c5029||_0x29144c['description']||_0x29144c['stepName']||_0xd2b2ac(0x191)+_0x29144c['position'],'screenshot':_0x548224,'is_key_step':_0x29144c[_0xd2b2ac(0x17b)]};}));}catch{}return _0x4edd4f['length']===0x0&&_0x315a05?.['screenshotUrls']&&(_0x4edd4f=_0x315a05[_0x206fe0(0x117)][_0x206fe0(0xd4)]((_0x417ac2,_0x5adc53)=>({'description':'Screenshot\x20'+(_0x5adc53+0x1),'screenshot':_0x417ac2,'is_key_step':![]}))),{'description':_0x286121[_0x206fe0(0xe4)],'result':_0xc7d74e[_0x206fe0(0x147)](getScenarioResult,_0x286121),'rationale':getScenarioRationale(_0x286121,_0x315a05?.[_0x206fe0(0x122)]),'steps':_0x4edd4f};})),_0x42a526={'url':_0x4df671[_0x10af0c(0x107)],'scenarios':_0x5b5b49};process['stdout']['write'](JSON['stringify'](_0x42a526,null,0x2)+'\x0a');}export async function featureConcludeSession(_0x168cfd){const _0x47e6c8=_0x455191,_0x37ba81={'JCSwn':function(_0x1dc737){return _0x1dc737();},'oGBpf':'completed','lckZM':function(_0x5caf77,_0x45cc18){return _0x5caf77!==_0x45cc18;}},_0x240fae=_0x168cfd||await _0x37ba81[_0x47e6c8(0x101)](getActiveFeatureId);if(!_0x240fae)throw new Error('No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review');const _0x29c456=await getFeature(_0x240fae);if(!_0x29c456['currentSessionId'])throw new Error(_0x47e6c8(0x138));const {sessions:_0x4c78e7}=await listFeatureSessions(_0x240fae),_0x5b4f4f=_0x4c78e7['find'](_0x241b45=>_0x241b45['id']===_0x29c456['currentSessionId']);if(!_0x5b4f4f)throw new Error('Current\x20session\x20not\x20found.');if(_0x5b4f4f[_0x47e6c8(0xd3)]===_0x37ba81[_0x47e6c8(0x181)]){console[_0x47e6c8(0x170)](_0x47e6c8(0x113));return;}if(_0x37ba81[_0x47e6c8(0xdd)](_0x5b4f4f[_0x47e6c8(0xd3)],_0x47e6c8(0xfb)))throw new Error('Cannot\x20conclude\x20session\x20with\x20status:\x20'+_0x5b4f4f['status']);console['log'](_0x47e6c8(0x127)),await concludeSession(_0x240fae,_0x29c456[_0x47e6c8(0x17d)]),console[_0x47e6c8(0x170)]('\x0a✅\x20Session\x20'+_0x5b4f4f['iteration']+'\x20concluded.'),console[_0x47e6c8(0x170)]('\x20\x20\x20The\x20feature\x20review\x20is\x20now\x20ready\x20for\x20human\x20review\x20on\x20the\x20Ranger\x20dashboard.');}export async function featureSessions(_0x429ddc){const _0x270719=_0x455191,_0x5d463c={'sIjqG':function(_0x51e36c){return _0x51e36c();},'XtFWL':function(_0xc381c0,_0x4af47f){return _0xc381c0(_0x4af47f);},'UAzdt':function(_0x465dff,_0x55fc74){return _0x465dff===_0x55fc74;},'QQxSa':'completed'},_0x5a59c8=_0x429ddc||await _0x5d463c['sIjqG'](getActiveFeatureId);if(!_0x5a59c8)throw new Error(_0x270719(0x120));const _0x1ca129=await _0x5d463c[_0x270719(0x143)](getFeature,_0x5a59c8);console[_0x270719(0x170)]('\x0a📁\x20Sessions\x20for\x20feature\x20review:\x20'+_0x1ca129[_0x270719(0x158)]+'\x0a');const {sessions:_0x45e712}=await listFeatureSessions(_0x5a59c8);if(_0x5d463c['UAzdt'](_0x45e712[_0x270719(0x19b)],0x0)){console['log']('No\x20sessions\x20found.');return;}for(const _0x357a33 of _0x45e712){const _0x206e5d=_0x357a33['status']===_0x5d463c['QQxSa']?'✅':_0x357a33[_0x270719(0xd3)]==='in_progress'?'🔄':'▶️';console['log'](_0x206e5d+_0x270719(0x1aa)+_0x357a33['iteration']+'\x20('+_0x357a33['id']+')'),console[_0x270719(0x170)]('\x20\x20\x20Status:\x20'+_0x357a33['status']),console[_0x270719(0x170)]('\x20\x20\x20Created:\x20'+new Date(_0x357a33['createdAt'])[_0x270719(0xe9)]()),_0x357a33['completedAt']&&console[_0x270719(0x170)]('\x20\x20\x20Completed:\x20'+new Date(_0x357a33[_0x270719(0x111)])[_0x270719(0xe9)]()),console[_0x270719(0x170)]('');}}export async function featureAddScenario(_0x28b292,_0x3ec5b8){const _0x5a86a1=_0x455191,_0x2d2d1d={'ZFMPI':function(_0x63e4a8){return _0x63e4a8();},'WczBY':function(_0x15aab5,_0xf75251,_0x7e41c2){return _0x15aab5(_0xf75251,_0x7e41c2);}},_0x54ee5d=_0x3ec5b8||await _0x2d2d1d['ZFMPI'](getActiveFeatureId);if(!_0x54ee5d)throw new Error('No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review');const _0x977a83=await getFeature(_0x54ee5d);if(_0x977a83[_0x5a86a1(0xe3)]&&!_0x977a83['latestReview'][_0x5a86a1(0x167)])throw new Error('Cannot\x20add\x20scenario:\x20feature\x20review\x20has\x20an\x20active\x20review.\x20Please\x20finish\x20your\x20review\x20first:\x20'+_0x977a83['dashboardUrl']);await _0x2d2d1d['WczBY'](createChecklistItem,_0x54ee5d,_0x28b292);const _0x231715=await getFeature(_0x54ee5d);console[_0x5a86a1(0x170)](_0x5a86a1(0x183)),displayFeature(_0x231715,_0x231715[_0x5a86a1(0x19d)]);}export async function featureEditScenario(_0x16cc0c,_0x2ed000){const _0x4a145a=_0x455191,_0x944d23={'OuXWm':function(_0x154c3e,_0x4589c1){return _0x154c3e(_0x4589c1);},'kSCSZ':'Please\x20finish\x20your\x20review\x20first:','vVcAh':function(_0x2c40d1,_0x5ba2f6){return _0x2c40d1===_0x5ba2f6;},'kWVZZ':_0x4a145a(0x1a1),'RhhuZ':'\x0a❌\x20No\x20scenario\x20number\x20provided.\x20Use\x20--scenario\x20<number>.','klDff':'\x0aAvailable\x20scenarios:','YcArI':function(_0x11bbd5,_0x3d5d20){return _0x11bbd5<_0x3d5d20;},'OLTil':function(_0x337e8d,_0x3b2dbc){return _0x337e8d>=_0x3b2dbc;},'cHaiC':function(_0x2bbe0e,_0x345a67){return _0x2bbe0e+_0x345a67;},'pjnTR':function(_0x3a6bae,_0x1ccae2,_0x2da972,_0x4732cc){return _0x3a6bae(_0x1ccae2,_0x2da972,_0x4732cc);}},_0x443e80=_0x2ed000['id']||await getActiveFeatureId();!_0x443e80&&(console['error']('\x0a❌\x20No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.'),console[_0x4a145a(0xfd)](_0x4a145a(0x196)),process[_0x4a145a(0x1a3)](0x1));const _0x16719e=await _0x944d23['OuXWm'](getFeature,_0x443e80);_0x16719e[_0x4a145a(0xe3)]&&!_0x16719e['latestReview']['submittedAt']&&(console['error'](_0x4a145a(0x149)),console[_0x4a145a(0xfd)](_0x944d23[_0x4a145a(0xe7)]),console[_0x4a145a(0xfd)]('\x20\x20'+_0x16719e['dashboardUrl']),process[_0x4a145a(0x1a3)](0x1));const _0x446625=_0x16719e[_0x4a145a(0x19d)]||[];_0x944d23['vVcAh'](_0x446625['length'],0x0)&&(console[_0x4a145a(0xfd)](_0x944d23[_0x4a145a(0x159)]),process['exit'](0x1));if(_0x2ed000['scenario']===undefined){console['error'](_0x944d23[_0x4a145a(0xe6)]),console['log'](_0x944d23['klDff']);for(let _0x46d5fd=0x0;_0x46d5fd<_0x446625[_0x4a145a(0x19b)];_0x46d5fd++){console[_0x4a145a(0x170)]('\x20\x20'+(_0x46d5fd+0x1)+'.\x20'+_0x446625[_0x46d5fd]['description']);}process['exit'](0x1);}const _0x1f8653=_0x2ed000[_0x4a145a(0x12c)]-0x1;if(_0x944d23['YcArI'](_0x1f8653,0x0)||_0x944d23['OLTil'](_0x1f8653,_0x446625['length'])){console[_0x4a145a(0xfd)](_0x4a145a(0x15b)+_0x2ed000[_0x4a145a(0x12c)]+'.\x20Feature\x20review\x20has\x20'+_0x446625['length']+_0x4a145a(0xf7)),console['log']('\x0aAvailable\x20scenarios:');for(let _0x335a1d=0x0;_0x944d23[_0x4a145a(0xf3)](_0x335a1d,_0x446625['length']);_0x335a1d++){console[_0x4a145a(0x170)]('\x20\x20'+_0x944d23[_0x4a145a(0xd5)](_0x335a1d,0x1)+'.\x20'+_0x446625[_0x335a1d][_0x4a145a(0xe4)]);}process[_0x4a145a(0x1a3)](0x1);}const _0x124b8d=_0x446625[_0x1f8653];await _0x944d23[_0x4a145a(0x155)](updateChecklistItem,_0x443e80,_0x124b8d['id'],{'description':_0x16cc0c});const _0xc50a13=await getFeature(_0x443e80);console['log'](_0x4a145a(0xd0)),displayFeature(_0xc50a13,_0xc50a13[_0x4a145a(0x19d)]);}async function downloadFeedbackImage(_0x171724,_0x152daa){const _0x56f26b=_0x455191,_0x5f06de={'mTBuJ':function(_0x210915,_0x37bb85,_0x36b8d9){return _0x210915(_0x37bb85,_0x36b8d9);},'iftRX':'feedback-images'};try{const _0x33b31d=_0x5f06de[_0x56f26b(0x142)](join,getRangerDir(),_0x5f06de[_0x56f26b(0x11d)]);await _0x5f06de[_0x56f26b(0x142)](mkdir,_0x33b31d,{'recursive':!![]});const _0x62742e=join(_0x33b31d,'comment_'+_0x152daa+'.png'),_0x1d943e=await fetch(_0x171724);if(!_0x1d943e['ok'])return null;const _0x55c536=Buffer['from'](await _0x1d943e['arrayBuffer']());return await writeFile(_0x62742e,_0x55c536),_0x62742e;}catch{return null;}}export async function featureGetReview(_0x4fb15c){const _0x159b6c=_0x455191,_0x211776={'bDdZT':_0x159b6c(0x133),'kppUY':function(_0x3b7428,_0x493369){return _0x3b7428(_0x493369);},'vPJVk':function(_0xeb1253,_0x5b0f5d){return _0xeb1253===_0x5b0f5d;},'BHgAY':_0x159b6c(0xe0),'JqDta':function(_0x4d9fb5,_0x296e43){return _0x4d9fb5<_0x296e43;},'uBJQJ':function(_0x15484e,_0x53e3cb){return _0x15484e>_0x53e3cb;},'iuRLJ':function(_0x548f31,_0x28f75b){return _0x548f31>_0x28f75b;},'qGrpx':function(_0x4f9a2f,_0x53275a){return _0x4f9a2f+_0x53275a;},'ylNeY':_0x159b6c(0x14a),'YGNka':'Unknown','UbTfn':function(_0x1342d1,_0x3f0ee7){return _0x1342d1===_0x3f0ee7;}},_0x25c1fe=_0x4fb15c||await getActiveFeatureId();if(!_0x25c1fe)throw new Error(_0x211776[_0x159b6c(0x18f)]);const _0x1d0ff7=await getFeature(_0x25c1fe),{items:_0x521281}=await _0x211776[_0x159b6c(0x18e)](getActionItems,_0x25c1fe);console[_0x159b6c(0x170)]('\x0a📋\x20Feedback\x20for:\x20'+_0x1d0ff7['name']+'\x20('+_0x1d0ff7['id']+')\x0a');if(_0x211776[_0x159b6c(0x176)](_0x521281['length'],0x0)){console[_0x159b6c(0x170)](_0x211776['BHgAY']);return;}for(let _0x26668b=0x0;_0x211776['JqDta'](_0x26668b,_0x521281[_0x159b6c(0x19b)]);_0x26668b++){const _0x369b20=_0x521281[_0x26668b],_0x2a1f71=_0x211776['uBJQJ'](_0x369b20[_0x159b6c(0x169)],0x1)?'\x20(v'+_0x369b20['version']+')':'',_0x2485f1=await getItemFeedback(_0x25c1fe,_0x369b20['id']);if(_0x211776['iuRLJ'](_0x2485f1[_0x159b6c(0x17c)][_0x159b6c(0x19b)],0x0)){console[_0x159b6c(0x170)](_0x159b6c(0x14c)+_0x211776[_0x159b6c(0x180)](_0x26668b,0x1)+':\x20\x22'+_0x369b20['description']+'\x22'+_0x2a1f71+_0x159b6c(0x154)+_0x2485f1[_0x159b6c(0x17c)]['length']+'\x20unaddressed\x20comment(s)');for(const _0x343b63 of _0x2485f1['unaddressedComments']){const _0xdcedb=new Date(_0x343b63[_0x159b6c(0x186)])[_0x159b6c(0x13f)](_0x211776[_0x159b6c(0xe2)],{'month':_0x159b6c(0xfc),'day':'numeric'}),_0xf36755=_0x343b63[_0x159b6c(0x164)]||_0x343b63['authorEmail']||_0x211776[_0x159b6c(0xd6)];console['log']('\x20\x20💬\x20'+_0xf36755+'\x20('+_0xdcedb+_0x159b6c(0xf1)+_0x343b63[_0x159b6c(0x13e)]+'\x22');if(_0x343b63[_0x159b6c(0xdb)]){const _0x7682a3=await downloadFeedbackImage(_0x343b63['assetUrl'],_0x343b63['id']);_0x7682a3&&console[_0x159b6c(0x170)](_0x159b6c(0x13c)+_0x7682a3);}if(_0x343b63['domRef']){const _0x36ca1e=_0x343b63[_0x159b6c(0x189)][_0x159b6c(0x17e)]['split'](_0x159b6c(0x195))['pop']()?.[_0x159b6c(0x171)](':')[0x0]||'element',_0x5d7ee8=_0x343b63['domRef']['textContent']?'\x20\x22'+_0x343b63['domRef'][_0x159b6c(0x10b)][_0x159b6c(0x1a6)](0x0,0x3c)+'\x22':'';console['log'](_0x159b6c(0x148)+_0x36ca1e+'>'+_0x5d7ee8),console[_0x159b6c(0x170)](_0x159b6c(0x108)+_0x343b63['domRef']['selector']);}else{if(_0x343b63[_0x159b6c(0x190)]){const _0x413377=_0x343b63['spatial']['coordinates'];_0x211776[_0x159b6c(0xea)](_0x343b63['spatial']['type'],_0x159b6c(0x1a2))&&_0x413377['length']>=0x2?console['log'](_0x159b6c(0x132)+_0x413377[0x0][_0x159b6c(0xce)](0x2)+',\x20'+_0x413377[0x1]['toFixed'](0x2)+')'):console[_0x159b6c(0x170)](_0x159b6c(0x13d)+_0x343b63[_0x159b6c(0x190)][_0x159b6c(0x118)]+'\x20at\x20['+_0x413377['map'](_0x379d26=>_0x379d26[_0x159b6c(0xce)](0x2))['join'](',\x20')+']');}}}if(_0x2485f1['canonicalFlow']){console['log'](_0x159b6c(0x135));for(const _0x508c52 of _0x2485f1[_0x159b6c(0x156)][_0x159b6c(0x171)]('\x0a')){console['log']('\x20\x20\x20\x20'+_0x508c52);}}}else console['log']('Scenario\x20'+(_0x26668b+0x1)+':\x20\x22'+_0x369b20['description']+'\x22'+_0x2a1f71+'\x20—\x20no\x20comments'),console[_0x159b6c(0x170)]('\x20\x20✅\x20No\x20feedback\x20to\x20address');console['log']('');}}export async function featureDelete(_0x1f5f43){const _0x5f3992=_0x455191,_0x2582b4={'VkABZ':function(_0x5599ed,_0x4afacb){return _0x5599ed+_0x4afacb;},'ixGVO':_0x5f3992(0x134)},_0x4c7c6c=_0x1f5f43||await getActiveFeatureId();if(!_0x4c7c6c)throw new Error(_0x5f3992(0x133));const _0xec401c=await getFeature(_0x4c7c6c);await softDeleteFeature(_0x4c7c6c),console['log']('\x0a🗑️\x20\x20Deleted\x20feature\x20review:\x20'+_0xec401c['name']+'\x20('+_0x4c7c6c+')'),console[_0x5f3992(0x170)](_0x2582b4[_0x5f3992(0xf6)](_0x2582b4['ixGVO'],_0x4c7c6c));}export async function featureRestore(_0x1d6b6e){const _0x3539cf=_0x455191,_0x2efde8={'iipao':function(_0x36257e,_0xc0f324){return _0x36257e(_0xc0f324);}};await restoreFeature(_0x1d6b6e);const _0x2130cc=await _0x2efde8['iipao'](getFeature,_0x1d6b6e);console[_0x3539cf(0x170)](_0x3539cf(0x19c)+_0x2130cc[_0x3539cf(0x158)]+'\x20('+_0x1d6b6e+')'),displayFeature(_0x2130cc,_0x2130cc[_0x3539cf(0x19d)]);}
1
+ const _0x24d357=_0x50f1;(function(_0x3ffff7,_0x55ba8d){const _0x28bd5e=_0x50f1,_0x23d0a9=_0x3ffff7();while(!![]){try{const _0x2cbd94=parseInt(_0x28bd5e(0x177))/0x1*(parseInt(_0x28bd5e(0x138))/0x2)+-parseInt(_0x28bd5e(0x1cf))/0x3+-parseInt(_0x28bd5e(0x12f))/0x4*(parseInt(_0x28bd5e(0x1af))/0x5)+-parseInt(_0x28bd5e(0x18b))/0x6*(-parseInt(_0x28bd5e(0x19e))/0x7)+parseInt(_0x28bd5e(0x1ae))/0x8+parseInt(_0x28bd5e(0x1ba))/0x9*(parseInt(_0x28bd5e(0x193))/0xa)+parseInt(_0x28bd5e(0x132))/0xb;if(_0x2cbd94===_0x55ba8d)break;else _0x23d0a9['push'](_0x23d0a9['shift']());}catch(_0x3cf32d){_0x23d0a9['push'](_0x23d0a9['shift']());}}}(_0x4e83,0x9b97c));import{readFile,writeFile,mkdir}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{execSync}from'child_process';import _0x32f418 from'inquirer';import{createFeature,listFeatures,getFeature,updateFeature,getFeatureReport,getFeatureReportMarkdown,listFeatureSessions,startSession,concludeSession,createChecklistItem,getActionItems,getItemFeedback,softDeleteFeature,restoreFeature,updateChecklistItem}from'./utils/featureApi.js';import{getBrowserSessionSteps}from'./utils/browserSessionsApi.js';import{getApiBaseUrl}from'./utils/environment.js';import{getRangerDir}from'./utils/rangerRoot.js';function _0x4e83(){const _0x3d5c1b=['0|5|3|1|2|4','Showing\x20','\x20scenario(s).','FfVUN','from','iteration','\x0a📁\x20Sessions\x20for\x20feature\x20review:\x20','\x20in\x20progress','LxsqR','\x0a❌\x20Invalid\x20scenario\x20number(s):\x20','version','utf-8','pipe','\x20blocked','LaeAm','toLocaleString','efpmj','json','No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','verified','\x20—\x20','7528etjjXa','numeric','FoxFX','14787289TCvirx','totalCount',':\x20\x22','wxfzr','prompt','push','2kSCARL','screenshotUrls','linkedSession','rhhvd','items','\x20\x20\x20Branch:\x20','selected','blockedReason','incompleteReason','canonicalFlow','CvTmO','\x20\x20\x20\x20\x20Progress:\x20','\x0a\x20\x20\x20Scenarios:','No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','CLAUDE_SESSION_ID','checklistItems','domRef','RANGER_TEST_USERNAME','EsGKu','filter','assetUrl','\x0a❌\x20Invalid\x20scenario\x20index:\x20','spatial','scenario','limit','\x20of\x20','\x20\x20\x20Progress:\x20','\x20\x20\x20Repository:\x20','\x20\x20\x20\x20','\x1b[1m','\x20--current-branch','fyFGW','yxRxR','aVLLZ','exit','ieYiA','Screenshot\x20','latestReview','warn','in_progress','):\x20\x22','arrayBuffer','wCyHW','NWuGu','LFxCg','error','\x20Session\x20','\x0a✅\x20Scenario\x20added','zBOBd','qEKpr','GKbOg','\x0aCreating\x20feature\x20review...','closed','PLqIh','RdpVj','scenarios','reports','\x20\x20\x20Completed:\x20','North','\x0a❌\x20No\x20scenarios\x20found\x20to\x20edit.','\x20[has\x20reviewer\x20feedback]','LIfdF','\x0a➡️\x20\x20Set\x20as\x20active\x20feature\x20review','5777CTRdkg','createdAt','\x20—\x20no\x20comments','No\x20scenarios\x20found.','unaddressedComments','yciUj','\x20concluded.','Not\x20in\x20a\x20git\x20repository.','terminalReason','Run:\x20ranger\x20create\x20\x22<name>\x22\x20to\x20create\x20a\x20new\x20feature\x20review','approved','replace','pSsQs','/api/v1/mcp/browser-sessions/','completed','includeDeleted','qaDwI','screenshot','\x20\x20\x20','TxuyN','2502vKuIKv','canceledReason','\x0a❌\x20No\x20scenarios\x20found\x20to\x20include.','agentResponse','1|4|5|0|3|2','coordinates','\x20\x20\x20▶️\x20Started\x20session\x20','active-feature.txt','169250RLkFka','\x20\x20\x20\x20\x20Branch:\x20','...','pop','JytAy','.\x20Feature\x20review\x20has\x20','currentSessionId','hKEEB','IfFTA','Next\x20page:\x20ranger\x20list\x20--offset\x20','incompleteItems','11809vNveWs','FRVkL','\x20\x20\x20Updated\x20branch\x20to:\x20','sessionId','browserSessionId','stepName','DiGJX','env','has','rhwSJ','verification_in_progress','notes','ossGH','stringify','trim','dashboardUrl','4542728NKiQqI','3385MKAWHX','qTxoV','Please\x20finish\x20your\x20review\x20first:','xRjPL','FYPLP','UJBKc','\x20\x20\x20Created:\x20','\x20\x20\x20\x20\x20\x20Approved','PJSMG','dQTyC','vQdGi','18MgBlzs','log','map','mjqXf','WzfpX','isTTY','\x0a✅\x20Resumed\x20feature\x20review:\x20','blocked','git\x20rev-parse\x20--abbrev-ref\x20HEAD','toFixed','AwIXB','\x20\x20\x20ID:\x20','\x0aNo\x20matching\x20active\x20feature\x20reviews\x20found.','currentBranch','lxZjZ','gitBranch','gAFVF','completedAt','CKgxp','Cannot\x20conclude\x20session\x20with\x20status:\x20','HMwkl','2231472dYtBNe','pendingItems','\x20/\x20','\x20at\x20[','\x0a✅\x20Session\x20','Scenario\x20','offset','name','write','github.com/','assetType','\x0a❌\x20Cannot\x20edit\x20scenario:\x20feature\x20review\x20has\x20an\x20active\x20review.','\x20\x20\x20\x20\x20📋\x20Selector:\x20','guLad','\x0aAvailable\x20scenarios:','length','cOGZJ','No\x20active\x20session\x20for\x20this\x20feature\x20review.','psuBM','toLocaleDateString','\x0a🗑️\x20\x20Deleted\x20feature\x20review:\x20','vVBWR','parentItemId','status','description','stats','split','\x20feature\x20review(s)\x20found','submittedAt','LzDWL','\x20\x20Expected\x20flow:','\x20\x20\x20\x20\x20📍\x20Annotation:\x20point\x20at\x20(','authorName','MGVuE','\x20\x20\x20\x20\x20🎯\x20Element:\x20<','Current\x20session\x20not\x20found.','\x0aSearching\x20for\x20feature\x20reviews\x20matching:\x20'];_0x4e83=function(){return _0x3d5c1b;};return _0x4e83();}import{registerSession}from'./utils/sessionCache.js';import{getEnvNames}from'./env.js';import{formatProfileRequiredMessage}from'./utils/profileMessages.js';import{listCloudProfiles}from'./utils/cloudProfile.js';const ACTIVE_FEATURE_FILE=_0x24d357(0x192),bold=_0x4887ec=>_0x24d357(0x155)+_0x4887ec+'\x1b[0m';function getGitRepoUrl(){const _0x4ce97c=_0x24d357,_0x1da8b6={'DolBx':'git\x20remote\x20get-url\x20origin','rhhvd':'pipe'};try{const _0x381d10=execSync(_0x1da8b6['DolBx'],{'encoding':'utf-8','stdio':[_0x4ce97c(0x126),_0x1da8b6[_0x4ce97c(0x13b)],_0x1da8b6['rhhvd']]})[_0x4ce97c(0x1ac)]();return _0x381d10[_0x4ce97c(0x182)](/\.git$/,'')[_0x4ce97c(0x182)](/^git@github\.com:/,_0x4ce97c(0x1d8))[_0x4ce97c(0x182)](/^https?:\/\//,'');}catch{return undefined;}}function _0x50f1(_0x424933,_0x4e77bf){_0x424933=_0x424933-0x118;const _0x4e8332=_0x4e83();let _0x50f155=_0x4e8332[_0x424933];return _0x50f155;}function getGitBranch(){const _0x476dfa=_0x24d357,_0x387bed={'EncHD':_0x476dfa(0x1c2),'qDrAc':_0x476dfa(0x125)};try{return execSync(_0x387bed['EncHD'],{'encoding':_0x387bed['qDrAc'],'stdio':[_0x476dfa(0x126),_0x476dfa(0x126),_0x476dfa(0x126)]})['trim']();}catch{return undefined;}}export async function getActiveFeatureId(){const _0x408c7d=_0x24d357,_0x5e2e8b={'fQuFl':function(_0x4c30be,_0x4887e5,_0x13cac9){return _0x4c30be(_0x4887e5,_0x13cac9);},'QrkwK':function(_0x2ed0b4){return _0x2ed0b4();},'LFxCg':'utf-8'},_0x29162b=_0x5e2e8b['fQuFl'](join,_0x5e2e8b['QrkwK'](getRangerDir),ACTIVE_FEATURE_FILE);if(!existsSync(_0x29162b))return null;try{const _0x4a9fa9=await _0x5e2e8b['fQuFl'](readFile,_0x29162b,_0x5e2e8b[_0x408c7d(0x164)]);return _0x4a9fa9['trim']()||null;}catch{return null;}}async function setActiveFeatureId(_0x29f11b){const _0x18d059=_0x24d357,_0x353b6d={'dlUkp':function(_0x4f8f5f,_0x3dd47c,_0x2bba3d){return _0x4f8f5f(_0x3dd47c,_0x2bba3d);},'SLGDc':function(_0x4a607d,_0x4f302d){return _0x4a607d(_0x4f302d);},'gAFVF':function(_0xf1cf0b,_0x58a9f9,_0xd67b6d,_0x3f42dd){return _0xf1cf0b(_0x58a9f9,_0xd67b6d,_0x3f42dd);},'WpoVY':'utf-8'},_0x3a71bd=getRangerDir(),_0xff13e9=_0x353b6d['dlUkp'](join,_0x3a71bd,ACTIVE_FEATURE_FILE);!_0x353b6d['SLGDc'](existsSync,_0x3a71bd)&&await mkdir(_0x3a71bd,{'recursive':!![]}),await _0x353b6d[_0x18d059(0x1ca)](writeFile,_0xff13e9,_0x29f11b,_0x353b6d['WpoVY']);}function getProgressDisplay(_0x191095){const _0x3a7cd2=_0x24d357,_0x1cdbf7={'lxZjZ':function(_0x2073f2,_0x5b8e56){return _0x2073f2+_0x5b8e56;},'mdMig':function(_0x42c3b8,_0x38917a){return _0x42c3b8+_0x38917a;},'teNji':function(_0x114723,_0x5d9cc5){return _0x114723===_0x5d9cc5;},'UJBKc':function(_0x1825c1,_0x3d4dd6){return _0x1825c1*_0x3d4dd6;},'yxRxR':function(_0x2cc928,_0x36d205){return _0x2cc928-_0x36d205;},'PJSMG':function(_0x249072,_0x2ac006){return _0x249072>_0x2ac006;}},_0x3b8281=_0x191095['verifiedItems']||0x0,_0x5d6082=_0x191095['verificationInProgressItems']||0x0,_0x5de6ab=_0x191095['blockedItems']||0x0,_0x1d35d0=_0x191095[_0x3a7cd2(0x19d)]||0x0,_0x3cfd0d=_0x191095[_0x3a7cd2(0x1d0)]||0x0,_0x356c82=_0x1cdbf7[_0x3a7cd2(0x1c8)](_0x1cdbf7[_0x3a7cd2(0x1c8)](_0x1cdbf7['mdMig'](_0x3b8281,_0x5d6082),_0x5de6ab)+_0x1d35d0,_0x3cfd0d);if(_0x1cdbf7['teNji'](_0x356c82,0x0))return'-';const _0x43ef54=0xa,_0x1df4a4=Math['round'](_0x1cdbf7[_0x3a7cd2(0x1b4)](_0x3b8281/_0x356c82,_0x43ef54)),_0x1b193a=_0x1cdbf7[_0x3a7cd2(0x1c8)]('█'['repeat'](_0x1df4a4),'░'['repeat'](_0x1cdbf7[_0x3a7cd2(0x158)](_0x43ef54,_0x1df4a4))),_0x5c7b0c=[];if(_0x5de6ab>0x0)_0x5c7b0c['push'](_0x5de6ab+_0x3a7cd2(0x127));if(_0x1d35d0>0x0)_0x5c7b0c[_0x3a7cd2(0x137)](_0x1d35d0+'\x20incomplete');if(_0x1cdbf7[_0x3a7cd2(0x1b7)](_0x5d6082,0x0))_0x5c7b0c['push'](_0x5d6082+_0x3a7cd2(0x121));const _0x173efd=_0x1cdbf7['PJSMG'](_0x5c7b0c['length'],0x0)?'\x20('+_0x5c7b0c['join'](',\x20')+')':'';return _0x1b193a+'\x20'+_0x3b8281+'/'+_0x356c82+'\x20verified'+_0x173efd;}function getCurrentSessionItems(_0x523315,_0x3323e4){const _0x493324=_0x24d357;if(!_0x523315[_0x493324(0x199)])return _0x3323e4[_0x493324(0x14b)](_0x187248=>!_0x187248['sessionId']);return _0x3323e4['filter'](_0x2ad8af=>_0x2ad8af[_0x493324(0x1a1)]===_0x523315[_0x493324(0x199)]||!_0x2ad8af['sessionId']);}function displayFeature(_0xab87e5,_0xa4937){const _0x490e82=_0x24d357,_0x5c0f9c={'vVBWR':function(_0x29a565,_0x597940){return _0x29a565(_0x597940);},'vQdGi':function(_0x298981,_0x542064){return _0x298981>_0x542064;},'PWEjl':function(_0x10df9d,_0x430529){return _0x10df9d<_0x430529;},'xRjPL':_0x490e82(0x16c),'NGLZU':'approved','plMSb':function(_0x5c0aef,_0x5ac2cd){return _0x5c0aef===_0x5ac2cd;},'FfVUN':'incomplete','hgwhS':_0x490e82(0x1c1),'ieYiA':'verification_in_progress','GJNyt':function(_0x596a33,_0xcb5871){return _0x596a33>_0xcb5871;},'ivzyP':function(_0x579816,_0x2ba67b){return _0x579816!==_0x2ba67b;},'oezZn':'verified','rhwSJ':function(_0x5007fc,_0x1c49d5){return _0x5007fc===_0x1c49d5;},'Yvoex':function(_0x174760,_0x585eb0){return _0x174760===_0x585eb0;}};console[_0x490e82(0x1bb)]('\x0a'+_0xab87e5[_0x490e82(0x1d6)]+'\x20('+_0xab87e5[_0x490e82(0x1ad)]+')');_0xab87e5['stats']&&console[_0x490e82(0x1bb)]('\x20\x20\x20Progress:\x20'+_0x5c0f9c[_0x490e82(0x1e4)](getProgressDisplay,_0xab87e5['stats']));_0xab87e5[_0x490e82(0x1e7)]&&console['log']('\x20\x20\x20Description:\x20'+_0xab87e5[_0x490e82(0x1e7)]);_0xab87e5['gitRepoUrl']&&console[_0x490e82(0x1bb)](_0x490e82(0x153)+_0xab87e5['gitRepoUrl']);_0xab87e5['gitBranch']&&console[_0x490e82(0x1bb)](_0x490e82(0x13d)+_0xab87e5['gitBranch']);console[_0x490e82(0x1bb)]('\x20\x20\x20Created:\x20'+new Date(_0xab87e5[_0x490e82(0x178)])['toLocaleString']());_0xab87e5['completedAt']&&console['log']('\x20\x20\x20Completed:\x20'+new Date(_0xab87e5['completedAt'])[_0x490e82(0x129)]());if(_0xa4937&&_0x5c0f9c[_0x490e82(0x1b9)](_0xa4937['length'],0x0)){console['log'](_0x490e82(0x144));for(let _0x3ffc36=0x0;_0x5c0f9c['PWEjl'](_0x3ffc36,_0xa4937[_0x490e82(0x1de)]);_0x3ffc36++){const _0x292091=_0xa4937[_0x3ffc36];let _0xb9a2f9;if(_0x292091['status']===_0x5c0f9c[_0x490e82(0x1b2)]&&_0x292091[_0x490e82(0x17f)]===_0x5c0f9c['NGLZU'])_0xb9a2f9='✅';else{if(_0x292091['status']===_0x490e82(0x12d))_0xb9a2f9='🟢';else{if(_0x5c0f9c['plMSb'](_0x292091['status'],_0x5c0f9c['FfVUN']))_0xb9a2f9='🟠';else{if(_0x292091[_0x490e82(0x1e6)]===_0x5c0f9c['hgwhS'])_0xb9a2f9='🛑';else{if(_0x292091['status']==='closed')_0xb9a2f9='⛔';else _0x292091[_0x490e82(0x1e6)]===_0x5c0f9c[_0x490e82(0x15b)]?_0xb9a2f9='⏳':_0xb9a2f9='⬜';}}}}const _0x206ab1=_0x5c0f9c['GJNyt'](_0x292091['version'],0x1)?'\x20(v'+_0x292091['version']+')':'',_0x112186=_0x292091['version']>0x1&&_0x292091[_0x490e82(0x1e5)]&&_0x5c0f9c['ivzyP'](_0x292091['status'],_0x5c0f9c['xRjPL'])&&_0x292091['status']!==_0x5c0f9c['oezZn']?_0x490e82(0x174):'';console['log'](_0x490e82(0x189)+(_0x3ffc36+0x1)+'.\x20'+_0xb9a2f9+'\x20'+_0x292091['description']+_0x206ab1+_0x112186);_0x5c0f9c[_0x490e82(0x1a7)](_0x292091[_0x490e82(0x1e6)],_0x5c0f9c['hgwhS'])&&_0x292091[_0x490e82(0x13f)]&&console['log']('\x20\x20\x20\x20\x20\x20Blocked:\x20'+_0x292091['blockedReason']);_0x292091[_0x490e82(0x1e6)]===_0x5c0f9c[_0x490e82(0x11d)]&&_0x292091[_0x490e82(0x140)]&&console[_0x490e82(0x1bb)]('\x20\x20\x20\x20\x20\x20Incomplete:\x20'+_0x292091[_0x490e82(0x140)]);if(_0x292091[_0x490e82(0x1e6)]===_0x5c0f9c['xRjPL']&&_0x292091['terminalReason']===_0x490e82(0x181))console[_0x490e82(0x1bb)](_0x490e82(0x1b6));else _0x5c0f9c['Yvoex'](_0x292091[_0x490e82(0x1e6)],_0x490e82(0x16c))&&_0x292091[_0x490e82(0x18c)]&&console['log']('\x20\x20\x20\x20\x20\x20Cancelled:\x20'+_0x292091['canceledReason']);}}}export async function featureCreate(_0x2bdca7,_0x3e4554){const _0x2f2fc5=_0x24d357,_0x1e8222={'CvTmO':function(_0x329532){return _0x329532();},'MbqdY':function(_0x38b831,_0x1200f4){return _0x38b831===_0x1200f4;},'EyscD':function(_0x3d5351,_0xd39390){return _0x3d5351(_0xd39390);},'MBFQR':function(_0x387f06,_0x5dc229,_0x24a17d){return _0x387f06(_0x5dc229,_0x24a17d);},'ossGH':function(_0x1b0b31,_0x5131e8,_0x330163){return _0x1b0b31(_0x5131e8,_0x330163);}},{envNames:_0x337eca}=await getEnvNames();if(_0x337eca['length']===0x0&&!process[_0x2f2fc5(0x1a5)][_0x2f2fc5(0x149)]){let _0x30d623=0x0;try{_0x30d623=(await _0x1e8222[_0x2f2fc5(0x142)](listCloudProfiles))['length'];}catch{_0x30d623=0x1;}_0x1e8222['MbqdY'](_0x30d623,0x0)&&console[_0x2f2fc5(0x15e)]('\x0a'+formatProfileRequiredMessage(_0x503db0=>bold(_0x503db0)));}const _0x364130=_0x3e4554['scenarios']?_0x3e4554[_0x2f2fc5(0x16f)]['map'](_0xa49a06=>_0xa49a06['trim']()):[],_0x11b503=_0x1e8222[_0x2f2fc5(0x142)](getGitRepoUrl),_0x3872dc=_0x1e8222['CvTmO'](getGitBranch);console['log'](_0x2f2fc5(0x16b));const _0x1fcf90=await createFeature({'name':_0x2bdca7,'description':_0x3e4554[_0x2f2fc5(0x1e7)],'checklist':_0x364130,'gitRepoUrl':_0x11b503,'gitBranch':_0x3872dc});await _0x1e8222['EyscD'](setActiveFeatureId,_0x1fcf90['id']),await tryStartCurrentSession(_0x1fcf90['id']);const _0x5c4896=process['env'][_0x2f2fc5(0x146)];_0x5c4896&&_0x1e8222['MBFQR'](registerSession,_0x5c4896,_0x1fcf90['id']),console[_0x2f2fc5(0x1bb)]('\x0a✅\x20Feature\x20review\x20created:\x20'+_0x1fcf90['id']),_0x1e8222[_0x2f2fc5(0x1aa)](displayFeature,_0x1fcf90,_0x1fcf90['checklistItems']),console[_0x2f2fc5(0x1bb)](_0x2f2fc5(0x176));}export async function featureList(_0x3146b3){const _0x38c2ce=_0x24d357,_0x43b31b={'rEjer':function(_0x493d73){return _0x493d73();},'jWTVE':function(_0x40a185,_0x27ee5a){return _0x40a185===_0x27ee5a;},'oPBPk':'\x0aNo\x20feature\x20reviews\x20found.','aVLLZ':_0x38c2ce(0x11a),'efpmj':function(_0x54b281,_0x321522){return _0x54b281(_0x321522);},'FRVkL':function(_0x2a41fc,_0x58dc20){return _0x2a41fc!==_0x58dc20;}},_0x53e9ef={'limit':_0x3146b3['limit']??0xa,'offset':_0x3146b3['offset']??0x0,'includeDeleted':_0x3146b3[_0x38c2ce(0x186)]};_0x3146b3['currentBranch']&&(_0x53e9ef['gitRepoUrl']=getGitRepoUrl(),_0x53e9ef[_0x38c2ce(0x1c9)]=_0x43b31b['rEjer'](getGitBranch));const _0x565c33=await listFeatures(_0x53e9ef);if(_0x43b31b['jWTVE'](_0x565c33['items'][_0x38c2ce(0x1de)],0x0)){console['log'](_0x43b31b['oPBPk']);return;}const _0x4c8ad6=_0x565c33['totalCount']>_0x565c33['items']['length']?_0x38c2ce(0x11b)+_0x565c33[_0x38c2ce(0x13c)]['length']+_0x38c2ce(0x151)+_0x565c33[_0x38c2ce(0x133)]:_0x565c33['totalCount']+_0x38c2ce(0x1ea);console['log']('\x0a'+_0x4c8ad6+':\x0a');for(const _0x229080 of _0x565c33[_0x38c2ce(0x13c)]){const _0x5567a8=_0x43b31b[_0x38c2ce(0x159)][_0x38c2ce(0x1e9)]('|');let _0x2ba154=0x0;while(!![]){switch(_0x5567a8[_0x2ba154++]){case'0':console[_0x38c2ce(0x1bb)](''+_0x229080['name']);continue;case'1':_0x229080[_0x38c2ce(0x1c9)]&&console['log']('\x20\x20\x20Branch:\x20'+_0x229080['gitBranch']);continue;case'2':console['log'](_0x38c2ce(0x1b5)+new Date(_0x229080['createdAt'])[_0x38c2ce(0x1e2)]());continue;case'3':_0x229080['stats']&&console[_0x38c2ce(0x1bb)](_0x38c2ce(0x152)+_0x43b31b[_0x38c2ce(0x12a)](getProgressDisplay,_0x229080['stats']));continue;case'4':console['log']('');continue;case'5':console['log'](_0x38c2ce(0x1c5)+_0x229080['id']);continue;}break;}}const _0x540c14=_0x53e9ef[_0x38c2ce(0x150)]??0xa,_0x4729fc=(_0x53e9ef[_0x38c2ce(0x1d5)]??0x0)+_0x565c33['items']['length'];if(_0x4729fc<_0x565c33[_0x38c2ce(0x133)]){const _0x21a8ee=_0x43b31b[_0x38c2ce(0x19f)](_0x540c14,0xa)?'\x20--limit\x20'+_0x540c14:'',_0x2166e1=_0x3146b3[_0x38c2ce(0x1c7)]?_0x38c2ce(0x156):'',_0x5e79f4=_0x3146b3['includeDeleted']?'\x20--include-deleted':'';console['log'](_0x38c2ce(0x19c)+_0x4729fc+_0x21a8ee+_0x2166e1+_0x5e79f4);}}export async function featureShow(_0x3e8ec5){const _0x3c7780={'jqtFI':'No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review'},_0x58d156=_0x3e8ec5||await getActiveFeatureId();if(!_0x58d156)throw new Error(_0x3c7780['jqtFI']);const _0x464319=await getFeature(_0x58d156);displayFeature(_0x464319,_0x464319['checklistItems']);}export async function featureResume(_0x4ce80e){const _0x1a7426=_0x24d357,_0x3a4d81={'VTxzb':function(_0x2c391f){return _0x2c391f();},'GKbOg':function(_0x158743,_0x45c24e){return _0x158743(_0x45c24e);},'YIvSd':function(_0x239663,_0x40a60b,_0x53b5db){return _0x239663(_0x40a60b,_0x53b5db);},'North':function(_0x58a594){return _0x58a594();},'CnbIP':_0x1a7426(0x17e),'xtLsu':'any','wxfzr':function(_0x1f7966,_0x1d2621){return _0x1f7966===_0x1d2621;},'IoBgz':'Please\x20specify\x20the\x20feature\x20review\x20ID:\x20ranger\x20resume\x20<id>','hKEEB':'Multiple\x20feature\x20reviews\x20found.\x20Select\x20one:','wCyHW':function(_0x4ef9fd,_0x4fc0e2){return _0x4ef9fd!==_0x4fc0e2;},'psuBM':function(_0x50f99f,_0x2fd2ed){return _0x50f99f(_0x2fd2ed);},'TxuyN':function(_0x2c8891,_0xea6c59,_0x5be473){return _0x2c8891(_0xea6c59,_0x5be473);}};if(_0x4ce80e){const _0x3e107d=await getFeature(_0x4ce80e);await setActiveFeatureId(_0x3e107d['id']);const _0x512cc0=_0x3a4d81['VTxzb'](getGitBranch);_0x512cc0&&_0x512cc0!==_0x3e107d[_0x1a7426(0x1c9)]&&(await updateFeature(_0x3e107d['id'],{'gitBranch':_0x512cc0}),console[_0x1a7426(0x1bb)](_0x1a7426(0x1a0)+_0x512cc0));console[_0x1a7426(0x1bb)](_0x1a7426(0x1c0)+_0x3e107d['name']+'\x20('+_0x3e107d['id']+')'),await _0x3a4d81[_0x1a7426(0x16a)](tryStartCurrentSession,_0x3e107d['id']);const _0x4822a5=process[_0x1a7426(0x1a5)]['CLAUDE_SESSION_ID'];_0x4822a5&&_0x3a4d81['YIvSd'](registerSession,_0x4822a5,_0x3e107d['id']);displayFeature(_0x3e107d,_0x3e107d[_0x1a7426(0x147)]),await _0x3a4d81['GKbOg'](printFeedbackNudge,_0x3e107d['id']);return;}const _0x330419=_0x3a4d81[_0x1a7426(0x172)](getGitRepoUrl),_0x1dca65=_0x3a4d81['VTxzb'](getGitBranch);if(!_0x330419&&!_0x1dca65)throw new Error(_0x3a4d81['CnbIP']);console[_0x1a7426(0x1bb)](_0x1a7426(0x119)+(_0x330419||_0x3a4d81['xtLsu'])+_0x1a7426(0x1d1)+(_0x1dca65||'any')+_0x1a7426(0x195));const _0x3f35b4=await listFeatures({'gitRepoUrl':_0x330419,'gitBranch':_0x1dca65}),_0x22ffed=_0x3f35b4['items'][_0x1a7426(0x14b)](_0x4182b0=>_0x4182b0[_0x1a7426(0x1e6)]?_0x4182b0[_0x1a7426(0x1e6)]!==_0x1a7426(0x12d):!_0x4182b0[_0x1a7426(0x1cb)]);if(_0x3a4d81[_0x1a7426(0x135)](_0x22ffed[_0x1a7426(0x1de)],0x0)){console[_0x1a7426(0x1bb)](_0x1a7426(0x1c6)),console[_0x1a7426(0x1bb)](_0x1a7426(0x180));return;}let _0x5c5179;if(_0x22ffed['length']===0x1)_0x5c5179=_0x22ffed[0x0];else{const _0x1dba5e=process['stdin']['isTTY']&&process['stdout'][_0x1a7426(0x1bf)];if(!_0x1dba5e){console['log']('\x0aNon-interactive\x20mode\x20detected.\x20Multiple\x20feature\x20reviews\x20found:');for(const _0x4f2029 of _0x22ffed){console[_0x1a7426(0x1bb)]('\x20\x20'+_0x4f2029[_0x1a7426(0x1d6)]),console[_0x1a7426(0x1bb)]('\x20\x20\x20\x20\x20ID:\x20'+_0x4f2029['id']),_0x4f2029[_0x1a7426(0x1e8)]&&console[_0x1a7426(0x1bb)](_0x1a7426(0x143)+getProgressDisplay(_0x4f2029['stats'])),_0x4f2029[_0x1a7426(0x1c9)]&&console[_0x1a7426(0x1bb)](_0x1a7426(0x194)+_0x4f2029[_0x1a7426(0x1c9)]);}throw new Error(_0x3a4d81['IoBgz']);}const {selected:_0x310b70}=await _0x32f418[_0x1a7426(0x136)]([{'type':'list','name':_0x1a7426(0x13e),'message':_0x3a4d81[_0x1a7426(0x19a)],'choices':_0x22ffed[_0x1a7426(0x1bc)](_0x5041b4=>({'name':_0x5041b4['name']+'\x20('+_0x5041b4['id']+')','value':_0x5041b4['id']}))}]);_0x5c5179=_0x22ffed['find'](_0x91d30f=>_0x91d30f['id']===_0x310b70);}await _0x3a4d81[_0x1a7426(0x16a)](setActiveFeatureId,_0x5c5179['id']);_0x1dca65&&_0x3a4d81[_0x1a7426(0x162)](_0x1dca65,_0x5c5179[_0x1a7426(0x1c9)])&&(await updateFeature(_0x5c5179['id'],{'gitBranch':_0x1dca65}),console['log']('\x20\x20\x20Updated\x20branch\x20to:\x20'+_0x1dca65));console['log']('\x0a✅\x20Resumed\x20feature\x20review:\x20'+_0x5c5179[_0x1a7426(0x1d6)]+'\x20('+_0x5c5179['id']+')'),await _0x3a4d81[_0x1a7426(0x1e1)](tryStartCurrentSession,_0x5c5179['id']);const _0x527527=await getFeature(_0x5c5179['id']),_0x259e65=process['env'][_0x1a7426(0x146)];_0x259e65&&registerSession(_0x259e65,_0x527527['id']),_0x3a4d81[_0x1a7426(0x18a)](displayFeature,_0x527527,_0x527527[_0x1a7426(0x147)]),await printFeedbackNudge(_0x527527['id']);}async function printFeedbackNudge(_0x39bff1){const _0x443232=_0x24d357,_0x45b0e0={'JytAy':function(_0x40a059,_0x2463b6){return _0x40a059(_0x2463b6);},'jcvWc':function(_0xb6b19f,_0x4e123a){return _0xb6b19f>_0x4e123a;}};try{const {items:_0x3a0c88}=await _0x45b0e0[_0x443232(0x197)](getActionItems,_0x39bff1);let _0x377b2f=0x0,_0x179758=0x0;for(const _0xa59cd7 of _0x3a0c88){const _0x2bbbc8=await getItemFeedback(_0x39bff1,_0xa59cd7['id']);_0x45b0e0['jcvWc'](_0x2bbbc8[_0x443232(0x17b)]['length'],0x0)&&(_0x377b2f+=_0x2bbbc8['unaddressedComments']['length'],_0x179758++);}_0x377b2f>0x0&&(console[_0x443232(0x1bb)]('\x0a⚠️\x20\x20'+_0x377b2f+'\x20unaddressed\x20reviewer\x20comment(s)\x20across\x20'+_0x179758+_0x443232(0x11c)),console[_0x443232(0x1bb)]('\x20\x20\x20Run\x20`ranger\x20get-review`\x20to\x20see\x20what\x20needs\x20to\x20be\x20fixed.'));}catch{}}async function tryStartCurrentSession(_0x88daee){const _0x574a30=_0x24d357,_0x5d56b6={'EqcGt':function(_0x37bac2,_0x4dfa29,_0x5ac92c){return _0x37bac2(_0x4dfa29,_0x5ac92c);}};try{const {sessions:_0x3f695f}=await listFeatureSessions(_0x88daee),_0x279e57=_0x3f695f['find'](_0x3428c8=>_0x3428c8['status']==='ready');_0x279e57&&(await _0x5d56b6['EqcGt'](startSession,_0x88daee,_0x279e57['id']),console[_0x574a30(0x1bb)](_0x574a30(0x191)+_0x279e57['iteration']));}catch{}}export async function featureReport(_0x4598b2,_0x2e56eb){const _0x575205=_0x24d357,_0x17c076={'pxgpB':function(_0x17c897){return _0x17c897();},'qTxoV':'No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','IfFTA':function(_0x228099,_0x3e952d,_0x32bd83,_0xef5f23){return _0x228099(_0x3e952d,_0x32bd83,_0xef5f23);},'qaDwI':function(_0x30b7cd){return _0x30b7cd();},'EtUky':_0x575205(0x170),'EsGKu':function(_0x4d3a97,_0x2f39ad,_0x45302d){return _0x4d3a97(_0x2f39ad,_0x45302d);},'auhCy':function(_0x3e0ae5,_0x4bf80f,_0xd7fe9d,_0x30629e){return _0x3e0ae5(_0x4bf80f,_0xd7fe9d,_0x30629e);}},_0x55ba14=_0x4598b2||await _0x17c076['pxgpB'](getActiveFeatureId);if(!_0x55ba14)throw new Error(_0x17c076[_0x575205(0x1b0)]);console[_0x575205(0x1bb)]('\x0aGenerating\x20report...');const _0x1e8d2a=await getFeatureReportMarkdown(_0x55ba14,{'style':_0x2e56eb['style']}),_0x19be0c=_0x2e56eb['output']||_0x17c076[_0x575205(0x19b)](join,_0x17c076[_0x575205(0x187)](getRangerDir),_0x17c076['EtUky'],_0x55ba14+'.md'),_0x241646=_0x17c076[_0x575205(0x14a)](join,_0x19be0c,'..');!existsSync(_0x241646)&&await _0x17c076[_0x575205(0x14a)](mkdir,_0x241646,{'recursive':!![]}),await _0x17c076['auhCy'](writeFile,_0x19be0c,_0x1e8d2a,_0x575205(0x125)),console[_0x575205(0x1bb)]('\x0a✅\x20Report\x20generated:\x20'+_0x19be0c);}function getScenarioResult(_0x55698b){const _0x329803=_0x24d357,_0x3ff30b={'LIfdF':function(_0xe1fb58,_0x54ce4b){return _0xe1fb58===_0x54ce4b;},'iyPuo':'closed','yCbKc':'in_progress'};if(_0x3ff30b[_0x329803(0x175)](_0x55698b[_0x329803(0x1e6)],_0x3ff30b['iyPuo']))return _0x55698b['terminalReason']??_0x329803(0x16c);if(_0x55698b['status']===_0x329803(0x1a8))return _0x3ff30b['yCbKc'];return _0x55698b['status'];}function getScenarioRationale(_0xf222c5,_0x379e5f){const _0x3e419b=_0x24d357,_0x4df157={'XMFpO':_0x3e419b(0x18f)},_0x558267=_0x4df157['XMFpO'][_0x3e419b(0x1e9)]('|');let _0x5ec274=0x0;while(!![]){switch(_0x558267[_0x5ec274++]){case'0':if(_0xf222c5['canceledReason'])return _0xf222c5['canceledReason'];continue;case'1':if(_0x379e5f)return _0x379e5f;continue;case'2':return null;case'3':if(_0xf222c5['notes'])return _0xf222c5[_0x3e419b(0x1a9)];continue;case'4':if(_0xf222c5[_0x3e419b(0x13f)])return _0xf222c5[_0x3e419b(0x13f)];continue;case'5':if(_0xf222c5[_0x3e419b(0x140)])return _0xf222c5[_0x3e419b(0x140)];continue;}break;}}export async function featureReportPrDescription(_0x2a1573,_0x1e9c4a){const _0x42d04e=_0x24d357,_0x329ec5={'HMwkl':function(_0x5dcc16){return _0x5dcc16();},'cOGZJ':_0x42d04e(0x12c),'pSsQs':function(_0x3ae8c3,_0x2f8bf1){return _0x3ae8c3===_0x2f8bf1;},'WzfpX':_0x42d04e(0x18d),'Nvotv':'\x0aAvailable\x20scenarios:','hAYUL':function(_0x31aa16,_0x41f94d){return _0x31aa16+_0x41f94d;},'GNokD':'\x0a❌\x20All\x20scenarios\x20were\x20excluded.'},_0x1deefc=_0x2a1573||await _0x329ec5[_0x42d04e(0x1ce)](getActiveFeatureId);if(!_0x1deefc)throw new Error(_0x329ec5[_0x42d04e(0x1df)]);const _0x553640=await getFeature(_0x1deefc),_0x4c322b=_0x553640['checklistItems']||[],_0x5cbec7=getCurrentSessionItems(_0x553640,_0x4c322b);_0x329ec5[_0x42d04e(0x183)](_0x5cbec7['length'],0x0)&&(console['error'](_0x329ec5[_0x42d04e(0x1be)]),process[_0x42d04e(0x15a)](0x1));const _0x18e921=_0x1e9c4a['excludeScenarios']??[],_0x31985a=_0x18e921[_0x42d04e(0x14b)](_0x5df255=>!Number['isInteger'](_0x5df255)||_0x5df255<0x1||_0x5df255>_0x5cbec7['length']);if(_0x31985a[_0x42d04e(0x1de)]>0x0){console[_0x42d04e(0x165)](_0x42d04e(0x123)+_0x31985a['join'](',\x20')),console[_0x42d04e(0x1bb)](_0x329ec5['Nvotv']);for(let _0x9b0d88=0x0;_0x9b0d88<_0x5cbec7['length'];_0x9b0d88++){console['log']('\x20\x20'+_0x329ec5['hAYUL'](_0x9b0d88,0x1)+'.\x20'+_0x5cbec7[_0x9b0d88]['description']);}process['exit'](0x1);}const _0xeb590f=new Set(_0x18e921[_0x42d04e(0x1bc)](_0x2186dd=>_0x2186dd-0x1)),_0x2a13da=_0x5cbec7[_0x42d04e(0x14b)]((_0x2c05c7,_0x1f9445)=>!_0xeb590f[_0x42d04e(0x1a6)](_0x1f9445));_0x2a13da[_0x42d04e(0x1de)]===0x0&&(console[_0x42d04e(0x165)](_0x329ec5['GNokD']),process['exit'](0x1));if(_0x1e9c4a[_0x42d04e(0x12b)])await outputJsonReport(_0x1deefc,_0x553640,_0x2a13da);else{const _0x26ccf8=await getFeatureReportMarkdown(_0x1deefc,{'itemIds':_0x2a13da['map'](_0x404c97=>_0x404c97['id'])});process['stdout'][_0x42d04e(0x1d7)](_0x26ccf8['trimEnd']()+'\x0a');}}async function outputJsonReport(_0x235a44,_0xdf0dd2,_0xd8ae90){const _0x2da812=_0x24d357,_0x55d5d3={'YSqCy':function(_0x5e0ed1,_0xb5c459){return _0x5e0ed1>_0xb5c459;},'fesvJ':function(_0x7b8ee9,_0x46b74c){return _0x7b8ee9(_0x46b74c);},'dyoqF':function(_0x51c535){return _0x51c535();},'gWKsf':function(_0x54fba2,_0x2d2821){return _0x54fba2(_0x2d2821);},'JUbfe':function(_0x4a114d,_0x51192b){return _0x4a114d+_0x51192b;}},_0x1da074=_0x55d5d3['dyoqF'](getApiBaseUrl),_0x4fc319=await _0x55d5d3['gWKsf'](getFeatureReport,_0x235a44),_0x4e72a2=new Map(_0x4fc319['checklistItems']['map'](_0x1b352a=>[_0x1b352a['id'],_0x1b352a])),_0x5d1290=await Promise['all'](_0xd8ae90['map'](async _0x5e6fa1=>{const _0x3d6fd5=_0x50f1,_0x10e16b=_0x4e72a2['get'](_0x5e6fa1['id']),_0x1e5426=_0x10e16b?.[_0x3d6fd5(0x13a)]??null;let _0x21325b=[];if(_0x5e6fa1[_0x3d6fd5(0x1a2)])try{const {steps:_0x114821}=await getBrowserSessionSteps(_0x5e6fa1[_0x3d6fd5(0x1a2)]);_0x55d5d3['YSqCy'](_0x114821[_0x3d6fd5(0x1de)],0x0)&&(_0x21325b=_0x114821[_0x3d6fd5(0x1bc)](_0x71fc87=>{const _0x49711c=_0x3d6fd5,_0x4c53b4=_0x71fc87['assets']['find'](_0x26eb67=>_0x26eb67[_0x49711c(0x1d9)]===_0x49711c(0x188)&&_0x26eb67['timing']==='after')??_0x71fc87['assets']['find'](_0x4c5205=>_0x4c5205[_0x49711c(0x1d9)]===_0x49711c(0x188));let _0x4006d=null,_0x149350=null;if(_0x4c53b4){const _0x41e426=_0x4c53b4['storage']['location']['split']('/')[_0x49711c(0x196)]();_0x4006d=_0x1da074+_0x49711c(0x184)+_0x5e6fa1['browserSessionId']+'/artifacts/'+_0x41e426,_0x41e426&&(_0x149350=_0x41e426['replace'](/\.\w+$/,'')[_0x49711c(0x182)](/^(key_)?\d+_/,'')['replace'](/[-_]/g,'\x20'));}return{'description':_0x149350||_0x71fc87['description']||_0x71fc87[_0x49711c(0x1a3)]||'Step\x20'+_0x71fc87['position'],'screenshot':_0x4006d,'is_key_step':_0x71fc87['isKeyStep']};}));}catch{}return _0x21325b['length']===0x0&&_0x1e5426?.[_0x3d6fd5(0x139)]&&(_0x21325b=_0x1e5426['screenshotUrls'][_0x3d6fd5(0x1bc)]((_0x30f1cd,_0x31ec9d)=>({'description':_0x3d6fd5(0x15c)+(_0x31ec9d+0x1),'screenshot':_0x30f1cd,'is_key_step':![]}))),{'description':_0x5e6fa1['description'],'result':_0x55d5d3['fesvJ'](getScenarioResult,_0x5e6fa1),'rationale':getScenarioRationale(_0x5e6fa1,_0x1e5426?.[_0x3d6fd5(0x18e)]),'steps':_0x21325b};})),_0x172995={'url':_0xdf0dd2[_0x2da812(0x1ad)],'scenarios':_0x5d1290};process['stdout']['write'](_0x55d5d3['JUbfe'](JSON[_0x2da812(0x1ab)](_0x172995,null,0x2),'\x0a'));}export async function featureConcludeSession(_0x2280b6){const _0x53485f=_0x24d357,_0x4c7435={'AwIXB':function(_0x27c757,_0x4df0a4){return _0x27c757(_0x4df0a4);},'mbFrY':_0x53485f(0x118),'fyFGW':'completed','mjqXf':'\x0a✅\x20Session\x20is\x20already\x20completed.','WMSnF':'\x0aConcluding\x20session...'},_0x1c6dc8=_0x2280b6||await getActiveFeatureId();if(!_0x1c6dc8)throw new Error(_0x53485f(0x145));const _0x10082b=await _0x4c7435[_0x53485f(0x1c4)](getFeature,_0x1c6dc8);if(!_0x10082b[_0x53485f(0x199)])throw new Error(_0x53485f(0x1e0));const {sessions:_0x3b9c39}=await listFeatureSessions(_0x1c6dc8),_0x323f56=_0x3b9c39['find'](_0x2f193e=>_0x2f193e['id']===_0x10082b['currentSessionId']);if(!_0x323f56)throw new Error(_0x4c7435['mbFrY']);if(_0x323f56[_0x53485f(0x1e6)]===_0x4c7435[_0x53485f(0x157)]){console['log'](_0x4c7435[_0x53485f(0x1bd)]);return;}if(_0x323f56[_0x53485f(0x1e6)]!==_0x53485f(0x15f))throw new Error(_0x53485f(0x1cd)+_0x323f56[_0x53485f(0x1e6)]);console[_0x53485f(0x1bb)](_0x4c7435['WMSnF']),await concludeSession(_0x1c6dc8,_0x10082b['currentSessionId']),console[_0x53485f(0x1bb)](_0x53485f(0x1d3)+_0x323f56[_0x53485f(0x11f)]+_0x53485f(0x17d)),console[_0x53485f(0x1bb)]('\x20\x20\x20The\x20feature\x20review\x20is\x20now\x20ready\x20for\x20human\x20review\x20on\x20the\x20Ranger\x20dashboard.');}export async function featureSessions(_0x1eb9f6){const _0x510adf=_0x24d357,_0x374dde={'EuWpR':function(_0x5c1014){return _0x5c1014();},'PLqIh':_0x510adf(0x12c),'NWuGu':function(_0x572761,_0x3b3181){return _0x572761(_0x3b3181);}},_0x21c25f=_0x1eb9f6||await _0x374dde['EuWpR'](getActiveFeatureId);if(!_0x21c25f)throw new Error(_0x374dde[_0x510adf(0x16d)]);const _0x5eb6c2=await _0x374dde['NWuGu'](getFeature,_0x21c25f);console[_0x510adf(0x1bb)](_0x510adf(0x120)+_0x5eb6c2[_0x510adf(0x1d6)]+'\x0a');const {sessions:_0x227d91}=await _0x374dde[_0x510adf(0x163)](listFeatureSessions,_0x21c25f);if(_0x227d91['length']===0x0){console['log']('No\x20sessions\x20found.');return;}for(const _0x364b65 of _0x227d91){const _0x3a34b2=_0x364b65[_0x510adf(0x1e6)]===_0x510adf(0x185)?'✅':_0x364b65[_0x510adf(0x1e6)]==='in_progress'?'🔄':'▶️';console[_0x510adf(0x1bb)](_0x3a34b2+_0x510adf(0x166)+_0x364b65[_0x510adf(0x11f)]+'\x20('+_0x364b65['id']+')'),console['log']('\x20\x20\x20Status:\x20'+_0x364b65['status']),console[_0x510adf(0x1bb)]('\x20\x20\x20Created:\x20'+new Date(_0x364b65[_0x510adf(0x178)])['toLocaleString']()),_0x364b65['completedAt']&&console[_0x510adf(0x1bb)](_0x510adf(0x171)+new Date(_0x364b65[_0x510adf(0x1cb)])['toLocaleString']()),console[_0x510adf(0x1bb)]('');}}export async function featureAddScenario(_0x53e11c,_0x54ae61){const _0x2f81ad=_0x24d357,_0x55638d={'DiGJX':function(_0x3941bf){return _0x3941bf();},'GHCoo':function(_0x3ffafd,_0x50c422,_0xbd55e6){return _0x3ffafd(_0x50c422,_0xbd55e6);},'LOQQp':function(_0x1bb9bb,_0x496e69){return _0x1bb9bb(_0x496e69);}},_0xac4ffc=_0x54ae61||await _0x55638d[_0x2f81ad(0x1a4)](getActiveFeatureId);if(!_0xac4ffc)throw new Error(_0x2f81ad(0x145));const _0x4b0dc3=await getFeature(_0xac4ffc);if(_0x4b0dc3[_0x2f81ad(0x15d)]&&!_0x4b0dc3['latestReview']['submittedAt'])throw new Error('Cannot\x20add\x20scenario:\x20feature\x20review\x20has\x20an\x20active\x20review.\x20Please\x20finish\x20your\x20review\x20first:\x20'+_0x4b0dc3[_0x2f81ad(0x1ad)]);await _0x55638d['GHCoo'](createChecklistItem,_0xac4ffc,_0x53e11c);const _0x283a75=await _0x55638d['LOQQp'](getFeature,_0xac4ffc);console[_0x2f81ad(0x1bb)](_0x2f81ad(0x167)),displayFeature(_0x283a75,_0x283a75['checklistItems']);}export async function featureEditScenario(_0x1da771,_0x3738b0){const _0x10aa4b=_0x24d357,_0x2d9ebf={'MGVuE':function(_0x277996){return _0x277996();},'QKYlt':'\x0a❌\x20No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','HNFpg':'Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','klYQO':function(_0x5599f6,_0x340884){return _0x5599f6(_0x340884);},'dQTyC':function(_0x3dca38,_0xf8e7a4){return _0x3dca38===_0xf8e7a4;},'OTGDK':_0x10aa4b(0x173),'GztSh':_0x10aa4b(0x1dd),'PMZCM':function(_0x1da774,_0x58fd28){return _0x1da774+_0x58fd28;},'qEKpr':function(_0x3cb902,_0x433dae){return _0x3cb902-_0x433dae;},'CKgxp':function(_0x52509a,_0x293b8d){return _0x52509a+_0x293b8d;},'EKwUC':function(_0x568064,_0x107df3,_0x231b68,_0x3a080c){return _0x568064(_0x107df3,_0x231b68,_0x3a080c);},'cYABu':function(_0x437ca5,_0x4cc404,_0x1bb7f5){return _0x437ca5(_0x4cc404,_0x1bb7f5);}},_0x4fff97=_0x3738b0['id']||await _0x2d9ebf[_0x10aa4b(0x1f0)](getActiveFeatureId);!_0x4fff97&&(console['error'](_0x2d9ebf['QKYlt']),console['error'](_0x2d9ebf['HNFpg']),process[_0x10aa4b(0x15a)](0x1));const _0x3da1a9=await _0x2d9ebf['klYQO'](getFeature,_0x4fff97);_0x3da1a9[_0x10aa4b(0x15d)]&&!_0x3da1a9['latestReview'][_0x10aa4b(0x1eb)]&&(console['error'](_0x10aa4b(0x1da)),console[_0x10aa4b(0x165)](_0x10aa4b(0x1b1)),console[_0x10aa4b(0x165)]('\x20\x20'+_0x3da1a9['dashboardUrl']),process[_0x10aa4b(0x15a)](0x1));const _0x3c0394=_0x3da1a9[_0x10aa4b(0x147)]||[];_0x2d9ebf['dQTyC'](_0x3c0394[_0x10aa4b(0x1de)],0x0)&&(console['error'](_0x2d9ebf['OTGDK']),process[_0x10aa4b(0x15a)](0x1));if(_0x2d9ebf[_0x10aa4b(0x1b8)](_0x3738b0['scenario'],undefined)){console['error']('\x0a❌\x20No\x20scenario\x20number\x20provided.\x20Use\x20--scenario\x20<number>.'),console['log'](_0x2d9ebf['GztSh']);for(let _0x308240=0x0;_0x308240<_0x3c0394[_0x10aa4b(0x1de)];_0x308240++){console[_0x10aa4b(0x1bb)]('\x20\x20'+_0x2d9ebf['PMZCM'](_0x308240,0x1)+'.\x20'+_0x3c0394[_0x308240]['description']);}process[_0x10aa4b(0x15a)](0x1);}const _0x26f630=_0x2d9ebf[_0x10aa4b(0x169)](_0x3738b0[_0x10aa4b(0x14f)],0x1);if(_0x26f630<0x0||_0x26f630>=_0x3c0394[_0x10aa4b(0x1de)]){console['error'](_0x10aa4b(0x14d)+_0x3738b0['scenario']+_0x10aa4b(0x198)+_0x3c0394[_0x10aa4b(0x1de)]+'\x20scenarios.'),console['log']('\x0aAvailable\x20scenarios:');for(let _0xf5f409=0x0;_0xf5f409<_0x3c0394[_0x10aa4b(0x1de)];_0xf5f409++){console['log']('\x20\x20'+_0x2d9ebf[_0x10aa4b(0x1cc)](_0xf5f409,0x1)+'.\x20'+_0x3c0394[_0xf5f409][_0x10aa4b(0x1e7)]);}process[_0x10aa4b(0x15a)](0x1);}const _0x56bc76=_0x3c0394[_0x26f630];await _0x2d9ebf['EKwUC'](updateChecklistItem,_0x4fff97,_0x56bc76['id'],{'description':_0x1da771});const _0x81cbe=await _0x2d9ebf['klYQO'](getFeature,_0x4fff97);console[_0x10aa4b(0x1bb)]('\x0a✅\x20Scenario\x20updated'),_0x2d9ebf['cYABu'](displayFeature,_0x81cbe,_0x81cbe['checklistItems']);}async function downloadFeedbackImage(_0x608aac,_0x1ec51e){const _0x2409ca=_0x24d357,_0x2b2239={'YiITU':'feedback-images','FoxFX':function(_0xdfc907,_0x229236,_0x400188){return _0xdfc907(_0x229236,_0x400188);},'pzAlP':function(_0x2cb0f6,_0x11ee67){return _0x2cb0f6(_0x11ee67);}};try{const _0x40444f=join(getRangerDir(),_0x2b2239['YiITU']);await mkdir(_0x40444f,{'recursive':!![]});const _0x4537e0=_0x2b2239[_0x2409ca(0x131)](join,_0x40444f,'comment_'+_0x1ec51e+'.png'),_0x37efc6=await _0x2b2239['pzAlP'](fetch,_0x608aac);if(!_0x37efc6['ok'])return null;const _0x4ed454=Buffer[_0x2409ca(0x11e)](await _0x37efc6[_0x2409ca(0x161)]());return await _0x2b2239['FoxFX'](writeFile,_0x4537e0,_0x4ed454),_0x4537e0;}catch{return null;}}export async function featureGetReview(_0x5f18e6){const _0x312f0f=_0x24d357,_0x39c98d={'RdpVj':function(_0x591bf0){return _0x591bf0();},'guLad':'No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','FYPLP':_0x312f0f(0x17a),'yciUj':function(_0x59a31f,_0x4303ce){return _0x59a31f>_0x4303ce;},'CvsjS':'en-US','KRBfa':'point','LaeAm':function(_0x9d00e2,_0x3fa25e){return _0x9d00e2+_0x3fa25e;}},_0x3bed7b=_0x5f18e6||await _0x39c98d[_0x312f0f(0x16e)](getActiveFeatureId);if(!_0x3bed7b)throw new Error(_0x39c98d[_0x312f0f(0x1dc)]);const _0x2594ae=await getFeature(_0x3bed7b),{items:_0xce874f}=await getActionItems(_0x3bed7b);console[_0x312f0f(0x1bb)]('\x0a📋\x20Feedback\x20for:\x20'+_0x2594ae[_0x312f0f(0x1d6)]+'\x20('+_0x2594ae['id']+')\x0a');if(_0xce874f['length']===0x0){console[_0x312f0f(0x1bb)](_0x39c98d[_0x312f0f(0x1b3)]);return;}for(let _0x45fa13=0x0;_0x45fa13<_0xce874f[_0x312f0f(0x1de)];_0x45fa13++){const _0x115067=_0xce874f[_0x45fa13],_0x5b0ab1=_0x39c98d[_0x312f0f(0x17c)](_0x115067[_0x312f0f(0x124)],0x1)?'\x20(v'+_0x115067[_0x312f0f(0x124)]+')':'',_0x4d0cde=await getItemFeedback(_0x3bed7b,_0x115067['id']);if(_0x4d0cde['unaddressedComments'][_0x312f0f(0x1de)]>0x0){console[_0x312f0f(0x1bb)](_0x312f0f(0x1d4)+(_0x45fa13+0x1)+_0x312f0f(0x134)+_0x115067['description']+'\x22'+_0x5b0ab1+_0x312f0f(0x12e)+_0x4d0cde[_0x312f0f(0x17b)]['length']+'\x20unaddressed\x20comment(s)');for(const _0x1589e2 of _0x4d0cde[_0x312f0f(0x17b)]){const _0x1896fb=new Date(_0x1589e2['createdAt'])['toLocaleDateString'](_0x39c98d['CvsjS'],{'month':'short','day':_0x312f0f(0x130)}),_0x2f73c5=_0x1589e2[_0x312f0f(0x1ef)]||_0x1589e2['authorEmail']||'Unknown';console['log']('\x20\x20💬\x20'+_0x2f73c5+'\x20('+_0x1896fb+_0x312f0f(0x160)+_0x1589e2['content']+'\x22');if(_0x1589e2['assetUrl']){const _0x2f3876=await downloadFeedbackImage(_0x1589e2[_0x312f0f(0x14c)],_0x1589e2['id']);_0x2f3876&&console[_0x312f0f(0x1bb)]('\x20\x20\x20\x20\x20📷\x20Screenshot:\x20'+_0x2f3876);}if(_0x1589e2[_0x312f0f(0x148)]){const _0xadd8aa=_0x1589e2[_0x312f0f(0x148)]['selector'][_0x312f0f(0x1e9)]('\x20>\x20')['pop']()?.[_0x312f0f(0x1e9)](':')[0x0]||'element',_0x1b16ed=_0x1589e2['domRef']['textContent']?'\x20\x22'+_0x1589e2[_0x312f0f(0x148)]['textContent']['slice'](0x0,0x3c)+'\x22':'';console[_0x312f0f(0x1bb)](_0x312f0f(0x1f1)+_0xadd8aa+'>'+_0x1b16ed),console['log'](_0x312f0f(0x1db)+_0x1589e2[_0x312f0f(0x148)]['selector']);}else{if(_0x1589e2['spatial']){const _0x2108d7=_0x1589e2[_0x312f0f(0x14e)][_0x312f0f(0x190)];_0x1589e2[_0x312f0f(0x14e)]['type']===_0x39c98d['KRBfa']&&_0x2108d7['length']>=0x2?console[_0x312f0f(0x1bb)](_0x312f0f(0x1ee)+_0x2108d7[0x0]['toFixed'](0x2)+',\x20'+_0x2108d7[0x1][_0x312f0f(0x1c3)](0x2)+')'):console[_0x312f0f(0x1bb)]('\x20\x20\x20\x20\x20📍\x20Annotation:\x20'+_0x1589e2['spatial']['type']+_0x312f0f(0x1d2)+_0x2108d7['map'](_0x4b19d4=>_0x4b19d4[_0x312f0f(0x1c3)](0x2))['join'](',\x20')+']');}}}if(_0x4d0cde[_0x312f0f(0x141)]){console[_0x312f0f(0x1bb)](_0x312f0f(0x1ed));for(const _0x2fd090 of _0x4d0cde[_0x312f0f(0x141)]['split']('\x0a')){console['log'](_0x312f0f(0x154)+_0x2fd090);}}}else console['log']('Scenario\x20'+_0x39c98d[_0x312f0f(0x128)](_0x45fa13,0x1)+_0x312f0f(0x134)+_0x115067['description']+'\x22'+_0x5b0ab1+_0x312f0f(0x179)),console['log']('\x20\x20✅\x20No\x20feedback\x20to\x20address');console['log']('');}}export async function featureDelete(_0x2a2f25){const _0x1d999f=_0x24d357,_0x5f5cdd={'EfSHv':_0x1d999f(0x145),'VKwMj':function(_0x2ff31c,_0x42cbdc){return _0x2ff31c(_0x42cbdc);},'aYoUS':function(_0x188a04,_0x642039){return _0x188a04+_0x642039;},'zBOBd':'\x20\x20\x20To\x20restore\x20it,\x20run:\x20ranger\x20restore\x20'},_0x45a35e=_0x2a2f25||await getActiveFeatureId();if(!_0x45a35e)throw new Error(_0x5f5cdd['EfSHv']);const _0x2cae14=await getFeature(_0x45a35e);await _0x5f5cdd['VKwMj'](softDeleteFeature,_0x45a35e),console['log'](_0x1d999f(0x1e3)+_0x2cae14['name']+'\x20('+_0x45a35e+')'),console[_0x1d999f(0x1bb)](_0x5f5cdd['aYoUS'](_0x5f5cdd[_0x1d999f(0x168)],_0x45a35e));}export async function featureRestore(_0x3167b9){const _0xec319e=_0x24d357,_0x231f31={'LxsqR':function(_0x4c1fa9,_0x8a8a08){return _0x4c1fa9(_0x8a8a08);},'LzDWL':function(_0x38d15a,_0x5aabc8){return _0x38d15a(_0x5aabc8);}};await _0x231f31[_0xec319e(0x122)](restoreFeature,_0x3167b9);const _0x43bc72=await _0x231f31[_0xec319e(0x1ec)](getFeature,_0x3167b9);console[_0xec319e(0x1bb)]('\x0a✅\x20Restored\x20feature\x20review:\x20'+_0x43bc72['name']+'\x20('+_0x3167b9+')'),displayFeature(_0x43bc72,_0x43bc72['checklistItems']);}