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

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 (82) hide show
  1. package/README.md +14 -36
  2. package/build/cli.js +1 -1
  3. package/build/commands/addEnv.js +1 -1
  4. package/build/commands/authEncrypt.js +1 -1
  5. package/build/commands/clean.js +1 -1
  6. package/build/commands/config.js +1 -1
  7. package/build/commands/env.js +1 -1
  8. package/build/commands/feature.js +1 -1
  9. package/build/commands/hook.js +1 -1
  10. package/build/commands/hooks/autoPrompt.js +1 -1
  11. package/build/commands/hooks/disable.js +1 -1
  12. package/build/commands/hooks/enable.js +1 -1
  13. package/build/commands/hooks/exitPlanMode.js +1 -1
  14. package/build/commands/hooks/index.js +1 -1
  15. package/build/commands/hooks/output.js +1 -1
  16. package/build/commands/hooks/planReminder.js +1 -1
  17. package/build/commands/hooks/planStart.js +1 -1
  18. package/build/commands/hooks/postEdit.js +1 -1
  19. package/build/commands/hooks/preCompact.js +1 -1
  20. package/build/commands/hooks/sessionEnd.js +1 -1
  21. package/build/commands/hooks/sessionStart.js +1 -1
  22. package/build/commands/hooks/stopHook.js +1 -1
  23. package/build/commands/index.js +1 -1
  24. package/build/commands/login.js +1 -1
  25. package/build/commands/mcpBootstrap.js +1 -1
  26. package/build/commands/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/crypto.js +1 -1
  42. package/build/commands/utils/desirePathLog.js +1 -1
  43. package/build/commands/utils/deviceAuth.js +1 -1
  44. package/build/commands/utils/environment.js +1 -1
  45. package/build/commands/utils/featureApi.js +1 -1
  46. package/build/commands/utils/fixWebmDuration.js +1 -1
  47. package/build/commands/utils/keychain.js +1 -1
  48. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  49. package/build/commands/utils/mcpImageBase64.js +1 -1
  50. package/build/commands/utils/model.js +1 -1
  51. package/build/commands/utils/opencodeConfig.js +1 -1
  52. package/build/commands/utils/playwrightCli.js +1 -1
  53. package/build/commands/utils/profileMessages.js +1 -1
  54. package/build/commands/utils/profileSetupBanner.js +1 -1
  55. package/build/commands/utils/rangerConfig.js +1 -1
  56. package/build/commands/utils/rangerRoot.js +1 -1
  57. package/build/commands/utils/retry.js +1 -1
  58. package/build/commands/utils/sessionCache.js +1 -1
  59. package/build/commands/utils/settings.js +1 -1
  60. package/build/commands/utils/skillContent.js +1 -1
  61. package/build/commands/utils/skills.js +1 -1
  62. package/build/commands/utils/stitchWebmFiles.js +1 -1
  63. package/build/commands/utils/telemetry.js +1 -1
  64. package/build/commands/utils/tokenRefresh.js +1 -1
  65. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  66. package/build/commands/utils/userApi.js +1 -1
  67. package/build/commands/utils/version.js +1 -1
  68. package/build/commands/verifyFeature.js +1 -1
  69. package/build/commands/verifyFeatureCli.js +1 -1
  70. package/build/skills/ranger/SKILL.md +6 -36
  71. package/build/skills/ranger/create.md +0 -19
  72. package/build/skills/ranger/verify.md +7 -46
  73. package/package.json +3 -8
  74. package/build/commands/migrateProfile.js +0 -1
  75. package/build/commands/utils/cloudProfile.js +0 -1
  76. package/build/commands/utils/cloudProfileSession.js +0 -1
  77. package/build/commands/utils/gitTracked.js +0 -1
  78. package/build/commands/utils/legacyWarning.js +0 -1
  79. package/build/commands/utils/matchAuthEnvironment.js +0 -1
  80. package/build/commands/utils/projectsConfig.js +0 -1
  81. package/build/commands/utils/resolveProfileContext.js +0 -1
  82. package/build/commands/utils/resolveProfileUrl.js +0 -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(_0x1e65e0,_0x3b23c9){const _0x2617e6=_0x409c,_0x457ae2=_0x1e65e0();while(!![]){try{const _0x213fe8=parseInt(_0x2617e6(0xe0))/0x1*(parseInt(_0x2617e6(0xc3))/0x2)+parseInt(_0x2617e6(0xd8))/0x3+parseInt(_0x2617e6(0x125))/0x4*(-parseInt(_0x2617e6(0xba))/0x5)+-parseInt(_0x2617e6(0x132))/0x6*(-parseInt(_0x2617e6(0xc4))/0x7)+-parseInt(_0x2617e6(0xf5))/0x8*(-parseInt(_0x2617e6(0xd1))/0x9)+parseInt(_0x2617e6(0x105))/0xa*(-parseInt(_0x2617e6(0x12b))/0xb)+-parseInt(_0x2617e6(0x110))/0xc;if(_0x213fe8===_0x3b23c9)break;else _0x457ae2['push'](_0x457ae2['shift']());}catch(_0x30dd83){_0x457ae2['push'](_0x457ae2['shift']());}}}(_0x58d8,0xa95bf));import{mkdir,writeFile,readFile,unlink,rm,mkdtemp,rename}from'fs/promises';import{join}from'path';import _0x4dbb64 from'inquirer';import{chromium}from'playwright';import{findExistingEnv,loadSettings}from'./utils/settings.js';import{encrypt}from'./utils/crypto.js';import{getToken}from'./utils/keychain.js';import{getRangerDir,getRangerHomeDir}from'./utils/rangerRoot.js';function _0x409c(_0x496bad,_0x376467){_0x496bad=_0x496bad-0xb0;const _0x58d826=_0x58d8();let _0x409cba=_0x58d826[_0x496bad];return _0x409cba;}import{writeActiveProfileName}from'./utils/activeProfile.js';import{addProfileSetupBanner}from'./utils/profileSetupBanner.js';async function checkUrlReachability(_0x323df2){const _0x108aa8=_0x409c,_0x109c10={'OhRtV':function(_0x387d7f,_0xcafb61,_0x172154){return _0x387d7f(_0xcafb61,_0x172154);},'KGDjy':'HEAD','yrWTK':'manual','HSUXW':function(_0x3a98de,_0x4b2bb7){return _0x3a98de(_0x4b2bb7);},'NLBoA':_0x108aa8(0xd0),'MVgDw':function(_0x13ef12,_0x313a00){return _0x13ef12===_0x313a00;},'wWeHX':_0x108aa8(0xb3)};try{const _0x17d89e=new AbortController(),_0x4b1423=_0x109c10[_0x108aa8(0xc2)](setTimeout,()=>_0x17d89e['abort'](),0x1388),_0x450d13={'method':_0x109c10['KGDjy'],'signal':_0x17d89e['signal'],'redirect':_0x109c10['yrWTK']};/^https:\/\/localhost(:\d+)?/i[_0x108aa8(0x108)](_0x323df2)&&(process['env']['NODE_TLS_REJECT_UNAUTHORIZED']='0');const _0x360efb=await fetch(_0x323df2,_0x450d13);delete process[_0x108aa8(0xbf)]['NODE_TLS_REJECT_UNAUTHORIZED'],_0x109c10['HSUXW'](clearTimeout,_0x4b1423);if(_0x360efb['status']<0x190)return{'ok':!![]};return{'ok':![],'error':_0x108aa8(0xf1)+_0x360efb['status']};}catch(_0x2e6c19){delete process['env']['NODE_TLS_REJECT_UNAUTHORIZED'];const _0x24e286=_0x2e6c19,_0x2f03fe=_0x24e286[_0x108aa8(0xf8)]||_0x109c10[_0x108aa8(0x12c)](String,_0x2e6c19),_0x341a64=_0x2f03fe['includes'](_0x109c10['NLBoA'])||_0x109c10['MVgDw'](_0x24e286[_0x108aa8(0xdb)],'TypeError')||_0x2f03fe[_0x108aa8(0xed)](_0x109c10['wWeHX']);return{'ok':![],'error':_0x2f03fe,'isProtocolError':_0x341a64};}}export async function addEnv(_0x3b1dac,_0x550d59={},_0x5c3aa1){const _0x5714c3=_0x409c,_0x396852={'rzKpx':'close','Ppkfo':'user','sekTg':function(_0x179e02,_0x2b5ba1,_0x193a7d,_0x3fa2c8){return _0x179e02(_0x2b5ba1,_0x193a7d,_0x3fa2c8);},'dHQsn':function(_0x193106,_0x56b60d){return _0x193106+_0x56b60d;},'WHseH':function(_0x2f5b26,_0x3b6d64,_0x52499b){return _0x2f5b26(_0x3b6d64,_0x52499b);},'JHCto':function(_0x55395e,_0x28e75d){return _0x55395e!==_0x28e75d;},'Gqutq':_0x5714c3(0x12e),'grUEZ':function(_0x321e11,_0x44fdd9,_0x55be4e){return _0x321e11(_0x44fdd9,_0x55be4e);},'mpEbN':function(_0x19b1b6,_0x434c74){return _0x19b1b6===_0x434c74;},'ljQAr':'confirm','divnj':'overwrite','rkjQy':_0x5714c3(0xc5),'fIbzP':_0x5714c3(0x106),'MKjoA':function(_0x3b7d4f,_0x3de76a){return _0x3b7d4f(_0x3de76a);},'RYOFr':_0x5714c3(0x10b),'SXyas':'\x20\x20Ranger\x20will\x20open\x20it\x20in\x20a\x20browser\x20so\x20you\x20can\x20log\x20in\x20and\x20save\x20your\x20session.\x0a','oSNbB':'baseUrl','WtDbt':_0x5714c3(0xb1),'lXYAS':_0x5714c3(0xe1),'CkQzA':function(_0x4e78ab,_0x1bd660){return _0x4e78ab||_0x1bd660;},'RhQbh':function(_0x560a92,_0x7fea36){return _0x560a92(_0x7fea36);},'NoRho':_0x5714c3(0xf2),'IKZRi':_0x5714c3(0x107),'tLlqx':_0x5714c3(0xdf),'jWQiQ':'continue','akOxP':function(_0x454576,_0x23afae){return _0x454576===_0x23afae;},'ymNMD':_0x5714c3(0x12f),'TmlUs':function(_0x1fe122,_0x2c09b6){return _0x1fe122(_0x2c09b6);},'CndcK':function(_0x47fe2b,_0x4a843a){return _0x47fe2b===_0x4a843a;},'QjPVT':_0x5714c3(0xf9),'jpezy':function(_0x3e8b2f,_0x4bf73a){return _0x3e8b2f(_0x4bf73a);},'GBKsZ':function(_0x1e1081,_0x54d3fd,_0x25fe19){return _0x1e1081(_0x54d3fd,_0x25fe19);},'DXQiH':_0x5714c3(0x122),'ZSBnQ':_0x5714c3(0xe2),'oAuqg':'\x20\x20\x20A\x20browser\x20will\x20open.\x20Please\x20log\x20in\x20to\x20the\x20profile\x20you\x20want\x20to\x20test\x20so\x20Ranger\x20can\x20access\x20it.','hFkxi':'\x20\x20\x20When\x20done\x20logging\x20in,\x20close\x20the\x20browser\x20to\x20save\x20the\x20session.','qjNwX':_0x5714c3(0x119),'QAvhl':'--allow-insecure-localhost','Fzzbs':function(_0x3aea90,_0x4c59c9){return _0x3aea90||_0x4c59c9;},'nUXBg':_0x5714c3(0xc7),'AoEWo':_0x5714c3(0xcb),'jPaeT':'You\x20can\x20try\x20again\x20with\x20one\x20of:','dcFiR':'Browser\x20closed\x20before\x20authentication\x20was\x20saved.','aNPqa':function(_0x31bbde){return _0x31bbde();},'tkfsX':_0x5714c3(0xe5),'YVGAL':function(_0x91f294,_0x5d7191){return _0x91f294(_0x5d7191);},'fKHKD':_0x5714c3(0x130),'Rmame':function(_0x2dc0fb,_0x4e78a4,_0x457dd6){return _0x2dc0fb(_0x4e78a4,_0x457dd6);},'AlDWN':function(_0x370e73,_0x4d131f){return _0x370e73+_0x4d131f;},'sGmGM':'\x20\x20You\x20can\x20safely\x20commit\x20this\x20file\x20to\x20git.','ZcAJi':_0x5714c3(0x104),'XXzFo':'config_write','RHiFo':function(_0x234f0c,_0xcbbcce,_0x2f5569){return _0x234f0c(_0xcbbcce,_0x2f5569);},'TNRWa':function(_0x35b015,_0x32f82e){return _0x35b015(_0x32f82e);},'MKYeI':_0x5714c3(0xbe),'WWAWI':function(_0x7008bc,_0x589471,_0x2915ac){return _0x7008bc(_0x589471,_0x2915ac);}},_0x4ee75c=_0x550d59['ci']??![],_0x33327f=_0x4ee75c?'ci':_0x5714c3(0x121),_0xc43885=_0x550d59[_0x5714c3(0xb8)]===_0x396852['Ppkfo']?getRangerHomeDir():getRangerDir(),_0x38d099=_0x396852['sekTg'](join,_0xc43885,_0x33327f,_0x3b1dac),_0x9eeca8={};if(_0x550d59[_0x5714c3(0x116)])for(const _0x38232c of _0x550d59['setupHeader']){const _0x3e1531=_0x38232c['indexOf'](':');if(_0x3e1531===-0x1)throw new Error('Invalid\x20--setup-header\x20format:\x20\x22'+_0x38232c+'\x22.\x20Expected\x20\x22Name:\x20Value\x22.');const _0x48fa74=_0x38232c[_0x5714c3(0xbc)](0x0,_0x3e1531)[_0x5714c3(0xb5)](),_0x9d0156=_0x38232c['slice'](_0x396852[_0x5714c3(0x120)](_0x3e1531,0x1))[_0x5714c3(0xb5)]();_0x9eeca8[_0x48fa74]=_0x9d0156;}const _0x3adcfd=_0x396852[_0x5714c3(0xcc)](join,_0xc43885,_0x33327f);if(_0x396852['JHCto'](_0x550d59['cdpEndpoint'],undefined)&&_0x550d59[_0x5714c3(0xc9)][_0x5714c3(0xb5)]()==='')throw new Error(_0x396852['Gqutq']);if(_0x550d59[_0x5714c3(0xc9)]&&_0x550d59['url'])throw new Error('--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.');if(_0x550d59['cdpEndpoint']&&_0x550d59['ci'])throw new Error('--ci\x20and\x20--cdp-endpoint\x20cannot\x20be\x20used\x20together.\x20Electron/CDP\x20profiles\x20only\x20work\x20with\x20a\x20locally\x20running\x20app\x20and\x20are\x20not\x20supported\x20in\x20CI.');const _0x394d67=Boolean(_0x550d59[_0x5714c3(0xc9)]),_0x29fd85=!_0x550d59[_0x5714c3(0x11f)]&&!_0x394d67,_0x509f3a=process[_0x5714c3(0x11b)][_0x5714c3(0x102)]&&process['stdout']['isTTY'];if(!_0x509f3a&&!_0x550d59[_0x5714c3(0x114)]&&!_0x394d67)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');const _0x37960f=_0x396852['grUEZ'](findExistingEnv,_0x3b1dac,{'rangerDir':_0xc43885});let _0x52d69c=null;if(_0x37960f){if(!_0x509f3a)_0x52d69c=_0x37960f;else{if(_0x396852[_0x5714c3(0xec)](_0x37960f[_0x5714c3(0x10c)],_0x33327f)){const {overwrite:_0x26ed03}=await _0x4dbb64['prompt']([{'type':_0x396852[_0x5714c3(0x131)],'name':_0x396852['divnj'],'message':'Profile\x20\x22'+_0x3b1dac+'\x22\x20already\x20exists.\x20Overwrite?','default':![]}]);if(!_0x26ed03){console['log']('Aborted.');return;}_0x52d69c=_0x37960f;}else{const _0x463012=_0x396852[_0x5714c3(0xec)](_0x37960f[_0x5714c3(0x10c)],'legacy')?'root\x20(.ranger/)':_0x37960f[_0x5714c3(0x10c)];console['error'](_0x5714c3(0x10a)+_0x3b1dac+'\x22\x20already\x20exists\x20in\x20'+_0x463012+':\x20'+_0x37960f[_0x5714c3(0xc1)]),console['error']('\x20\x20\x20Creating\x20it\x20in\x20'+_0x33327f+'\x20would\x20shadow\x20the\x20existing\x20profile.');const {shouldReplace:_0x57d747}=await _0x4dbb64[_0x5714c3(0xd9)]([{'type':_0x5714c3(0xd4),'name':_0x5714c3(0x10f),'message':'Delete\x20existing\x20and\x20create\x20new\x20in\x20'+_0x33327f+'?','default':![]}]);if(!_0x57d747){console[_0x5714c3(0xcf)](_0x396852[_0x5714c3(0xd7)]);return;}_0x52d69c=_0x37960f;}}}_0x5c3aa1?.['trackPhaseStart'](_0x5714c3(0xf9));let _0x47f07e='';if(_0x394d67)console['log'](_0x396852[_0x5714c3(0xb4)]),console[_0x5714c3(0xcf)]('\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20'+_0x550d59['cdpEndpoint']),console['log'](_0x5714c3(0xfa));else{if(_0x550d59[_0x5714c3(0x114)]){_0x47f07e=_0x550d59['url'];const _0x5ff7e2=await _0x396852[_0x5714c3(0xde)](checkUrlReachability,_0x47f07e);if(!_0x5ff7e2['ok']&&!_0x550d59['force'])throw new Error('Could\x20not\x20reach\x20'+_0x47f07e+':\x20'+_0x5ff7e2[_0x5714c3(0x129)]+_0x5714c3(0xee));!_0x5ff7e2['ok']&&_0x550d59[_0x5714c3(0x128)]&&console[_0x5714c3(0xcf)](_0x5714c3(0xf3)+_0x47f07e+':\x20'+_0x5ff7e2['error']+_0x5714c3(0x103));}else{console['log'](_0x396852[_0x5714c3(0x11e)]),console[_0x5714c3(0xcf)](_0x5714c3(0x123)),console['log'](_0x396852[_0x5714c3(0x117)]);let _0x3cd0fa=![];while(!![]){const _0x27f66d=await _0x4dbb64[_0x5714c3(0xd9)]([{'type':'input','name':_0x396852[_0x5714c3(0xce)],'message':_0x3cd0fa?_0x396852['WtDbt']:_0x396852['lXYAS'],'default':_0x396852[_0x5714c3(0xfd)](_0x47f07e,_0x5714c3(0xbb))}]);_0x47f07e=_0x27f66d['baseUrl'];const _0x3952b9=await _0x396852[_0x5714c3(0xd2)](checkUrlReachability,_0x47f07e);if(_0x3952b9['ok'])break;const _0x4413d9=/^[a-zA-Z][\w+.-]*:\/\//[_0x5714c3(0x108)](_0x47f07e),_0x1f6d86=_0x3952b9['isProtocolError']&&!_0x4413d9,_0xce4183=_0x1f6d86?_0x5714c3(0x126)+_0x47f07e:null;_0x3cd0fa=!![],console['log'](_0x5714c3(0x10e)+_0x47f07e+':\x20'+_0x3952b9['error']);_0xce4183&&console['log']('\x20\x20Did\x20you\x20mean\x20'+_0xce4183+'?');const {action:_0xd66dff}=await _0x4dbb64['prompt']([{'type':_0x5714c3(0xe4),'name':_0x396852[_0x5714c3(0xb7)],'message':_0x396852[_0x5714c3(0xbd)],'choices':[..._0xce4183?[{'name':'Use\x20'+_0xce4183,'value':'use_suggestion'}]:[],{'name':_0x396852[_0x5714c3(0xfe)],'value':'retry'},{'name':_0x5714c3(0xe3),'value':_0x396852['jWQiQ']}]}]);if(_0x396852['akOxP'](_0xd66dff,_0x396852[_0x5714c3(0x10d)])&&_0xce4183){_0x47f07e=_0xce4183;const _0x5ecc62=await _0x396852['TmlUs'](checkUrlReachability,_0x47f07e);if(_0x5ecc62['ok'])break;console[_0x5714c3(0xcf)](_0x5714c3(0x12a)+_0x47f07e+':\x20'+_0x5ecc62['error']);}else{if(_0x396852[_0x5714c3(0x127)](_0xd66dff,_0x5714c3(0xb2)))break;}}}}_0x5c3aa1?.[_0x5714c3(0xda)](_0x396852['QjPVT']);const _0x3de90b={};if(_0x52d69c){const _0x5e73fd=await loadSettings(_0x3b1dac);Object[_0x5714c3(0xd6)](_0x3de90b,_0x5e73fd['setupHeaders']);}Object['assign'](_0x3de90b,_0x9eeca8),await _0x396852[_0x5714c3(0xcc)](mkdir,_0x3adcfd,{'recursive':!![]});const _0x34421b=await _0x396852['jpezy'](mkdtemp,_0x396852['WHseH'](join,_0x3adcfd,'.tmp-'+_0x3b1dac+'-')),_0x590349=_0x396852['GBKsZ'](join,_0x34421b,_0x5714c3(0x11d)),_0x386932=_0x396852['RhQbh'](Boolean,_0x47f07e)&&/^https:\/\/localhost(:\d+)?/i['test'](_0x47f07e);try{if(_0x29fd85){_0x5c3aa1?.[_0x5714c3(0xb9)](_0x396852['DXQiH']),console[_0x5714c3(0xcf)](_0x396852[_0x5714c3(0xd3)]),console['log'](_0x396852[_0x5714c3(0x112)]),console[_0x5714c3(0xcf)](_0x396852[_0x5714c3(0xe6)]);!_0x509f3a?(console['log'](_0x5714c3(0x11a)),console['log'](_0x396852[_0x5714c3(0xef)])):console['log']('');await new Promise(_0x604305=>setTimeout(_0x604305,0xbb8));const _0x252328=[];_0x550d59[_0x5714c3(0xca)]&&_0x252328[_0x5714c3(0xf6)](_0x5714c3(0xff));const _0x46bcba=_0x550d59['allowInsecureLocalhost']||_0x386932;_0x46bcba&&_0x252328[_0x5714c3(0xf6)](_0x396852[_0x5714c3(0xc6)]);const _0x123339=await chromium[_0x5714c3(0xf4)]({'headless':![],..._0x252328['length']>0x0?{'args':_0x252328}:{}});try{const _0x73bcda=Object['keys'](_0x3de90b)[_0x5714c3(0x111)]>0x0,_0x16865d={'ignoreHTTPSErrors':!![]};_0x73bcda&&(_0x16865d['extraHTTPHeaders']=_0x3de90b);const _0x25735f=await _0x123339['newContext'](_0x16865d);await addProfileSetupBanner(_0x25735f);const _0x323753=await _0x25735f['newPage']();await _0x323753[_0x5714c3(0xeb)](_0x396852['Fzzbs'](_0x47f07e,_0x396852['nUXBg']));let _0x55de33=![];await new Promise(_0x5525d8=>{const _0x2e912e={'OTsnM':'Saving\x20authentication\x20state...','BlKEl':function(_0x1790b8){return _0x1790b8();}};_0x323753['on'](_0x396852['rzKpx'],async()=>{const _0xabbcda=_0x409c;try{console['log'](_0x2e912e[_0xabbcda(0xfc)]),await _0x25735f['storageState']({'path':_0x590349}),_0x55de33=!![];}catch{}_0x2e912e[_0xabbcda(0x100)](_0x5525d8);});});if(!_0x55de33){console['log'](_0x396852['AoEWo']);!_0x550d59[_0x5714c3(0xca)]&&(console[_0x5714c3(0xcf)]('This\x20can\x20happen\x20due\x20to\x20a\x20browser\x20compatibility\x20issue\x20on\x20some\x20systems.\x0a'),console[_0x5714c3(0xcf)](_0x396852['jPaeT']),console[_0x5714c3(0xcf)]('\x20\x20ranger\x20profile\x20add\x20'+_0x3b1dac+'\x20--safe-mode\x20\x20\x20\x20(disables\x20browser\x20features\x20that\x20can\x20cause\x20crashes)'),console['log']('\x20\x20ranger\x20profile\x20add\x20'+_0x3b1dac+'\x20--skip-auth\x20\x20\x20\x20(skip\x20browser\x20auth\x20entirely)\x0a'));throw new Error(_0x396852[_0x5714c3(0xea)]);}}finally{await _0x123339['close']()['catch'](()=>{});}if(_0x4ee75c){const _0x5d4208=await readFile(_0x590349,_0x5714c3(0x124)),_0x65e9e4=await _0x396852[_0x5714c3(0x109)](getToken);if(!_0x65e9e4){console['error'](_0x396852['tkfsX']),await _0x396852[_0x5714c3(0xdc)](unlink,_0x590349)['catch'](()=>{});throw new Error(_0x396852[_0x5714c3(0x12d)]);}else{const _0x388cfb=_0x396852[_0x5714c3(0xc8)](encrypt,_0x5d4208,_0x65e9e4);await _0x396852[_0x5714c3(0x11c)](writeFile,_0x396852['AlDWN'](_0x590349,_0x5714c3(0x113)),_0x388cfb),await _0x396852[_0x5714c3(0x101)](unlink,_0x590349),console[_0x5714c3(0xcf)]('✓\x20Encrypted\x20auth\x20saved\x20to:\x20'+_0x590349+_0x5714c3(0x113)),console[_0x5714c3(0xcf)](_0x396852[_0x5714c3(0x115)]),console['log'](_0x396852[_0x5714c3(0xb0)]);}}else console[_0x5714c3(0xcf)](_0x5714c3(0xdd)+_0x590349);_0x5c3aa1?.[_0x5714c3(0xda)](_0x396852['DXQiH']);}_0x5c3aa1?.[_0x5714c3(0xb9)](_0x396852['XXzFo']);const _0x2dba53={};_0x47f07e&&(_0x2dba53[_0x5714c3(0xf0)]=_0x47f07e);_0x550d59['cdpEndpoint']&&(_0x2dba53[_0x5714c3(0xc9)]=_0x550d59[_0x5714c3(0xc9)],_0x2dba53[_0x5714c3(0xe7)]=!![]);(_0x550d59[_0x5714c3(0x118)]||_0x386932)&&(_0x2dba53[_0x5714c3(0x118)]=!![]);_0x550d59['safeMode']&&(_0x2dba53['safeMode']=!![]);Object['keys'](_0x3de90b)['length']>0x0&&(_0x2dba53[_0x5714c3(0xcd)]=_0x3de90b);await writeFile(join(_0x34421b,_0x5714c3(0xe8)),JSON[_0x5714c3(0xd5)](_0x2dba53,null,0x2)),console['log'](_0x5714c3(0xb6)+join(_0x38d099,'settings.json'));if(_0x396852['mpEbN'](_0x52d69c?.[_0x5714c3(0x10c)],_0x33327f)){const _0x37f8cc=_0x52d69c['path']+'.backup-'+Date['now']();await _0x396852[_0x5714c3(0xc8)](rename,_0x52d69c[_0x5714c3(0xc1)],_0x37f8cc);try{await _0x396852['grUEZ'](rename,_0x34421b,_0x38d099);}catch(_0x2de28e){await _0x396852['RHiFo'](rename,_0x37f8cc,_0x52d69c['path']);throw _0x2de28e;}try{await rm(_0x37f8cc,{'recursive':!![]});}catch{console[_0x5714c3(0xcf)]('Warning:\x20Could\x20not\x20remove\x20old\x20profile\x20backup\x20at\x20'+_0x37f8cc);}}else{await _0x396852['GBKsZ'](rename,_0x34421b,_0x38d099);if(_0x52d69c)try{await rm(_0x52d69c['path'],{'recursive':!![]}),console['log'](_0x5714c3(0xfb)+_0x52d69c[_0x5714c3(0xc1)]);}catch{console[_0x5714c3(0xcf)]('Warning:\x20Could\x20not\x20remove\x20old\x20profile\x20at\x20'+_0x52d69c[_0x5714c3(0xc1)]);}}try{await _0x396852[_0x5714c3(0xf7)](writeActiveProfileName,_0x3b1dac),console[_0x5714c3(0xcf)]('\x20\x20Set\x20active\x20profile:\x20'+_0x3b1dac);}catch{console[_0x5714c3(0xcf)](_0x396852['MKYeI']);}_0x5c3aa1?.['trackPhaseEnd'](_0x396852[_0x5714c3(0xe9)]),console['log']('\x0a\x20\x20Profile\x20\x22'+_0x3b1dac+'\x22\x20configured');}catch(_0xeca34b){await _0x396852[_0x5714c3(0xc0)](rm,_0x34421b,{'recursive':!![],'force':!![]});throw _0xeca34b;}}function _0x58d8(){const _0x53aaa6=['Rmame','cdpEndpoint','safeMode','\x0aThe\x20browser\x20closed\x20unexpectedly\x20before\x20authentication\x20could\x20be\x20saved.','WHseH','setupHeaders','oSNbB','log','Invalid\x20URL','313515SdxHgh','RhQbh','ZSBnQ','confirm','stringify','assign','rkjQy','3204954URDPhs','prompt','trackPhaseEnd','name','YVGAL','✓\x20Auth\x20state\x20saved\x20to:\x20','MKjoA','Enter\x20a\x20different\x20URL','4GrfQfo','What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','\x0a📋\x20Authentication\x20Setup','Continue\x20anyway','list','\x20\x20Could\x20not\x20encrypt:\x20No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','hFkxi','isElectron','settings.json','XXzFo','dcFiR','goto','mpEbN','includes','\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.','qjNwX','baseUrl','HTTP\x20','action','⚠\x20Could\x20not\x20reach\x20','launch','88iDSPap','push','TNRWa','message','url_setup','\x20\x20Make\x20sure\x20your\x20Electron\x20app\x20(or\x20browser)\x20is\x20running\x20with\x20remote\x20debugging\x20enabled.\x0a','Removed\x20existing\x20profile\x20at\x20','OTsnM','CkQzA','tLlqx','--disable-features=WebBluetooth','BlKEl','TmlUs','isTTY','\x20(continuing\x20with\x20--force)','\x20\x20Run\x20ranger\x20setup\x20in\x20CI\x20to\x20decrypt\x20at\x20runtime.','170bIZIrY','\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','What\x20would\x20you\x20like\x20to\x20do?','test','aNPqa','\x0a⚠️\x20\x20Profile\x20\x22','\x0a🌐\x20Profile\x20Setup\x0a','location','ymNMD','\x0a\x20\x20Could\x20not\x20reach\x20','shouldReplace','12321684TJppoQ','length','oAuqg','.enc','url','sGmGM','setupHeader','SXyas','allowInsecureLocalhost','\x20\x20\x20If\x20you\x20are\x20an\x20agent,\x20background\x20this\x20process\x20and\x20let\x20your\x20user\x20know\x20they\x20need\x20to\x20complete\x20browser\x20authentication.\x0a','\x0a\x20\x20\x20⚠\x20This\x20step\x20requires\x20human\x20interaction\x20in\x20a\x20browser.','stdin','grUEZ','auth.json','RYOFr','skipAuth','dHQsn','local','browser_auth','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','utf-8','1272uObCAe','http://','CndcK','force','error','\x0a\x20\x20Still\x20could\x20not\x20reach\x20','126467XyZJim','HSUXW','fKHKD','--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','use_suggestion','Missing\x20API\x20token;\x20aborting\x20CI\x20profile\x20creation.','ljQAr','12zDSVtU','ZcAJi','Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','continue','fetch\x20failed','fIbzP','trim','✓\x20Created\x20settings:\x20','NoRho','scope','trackPhaseStart','15735PwtlGP','http://localhost:3000','slice','IKZRi','Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.','env','WWAWI','path','OhRtV','73574oTQCRC','4613161HrFABW','Aborted.','QAvhl','about:blank'];_0x58d8=function(){return _0x53aaa6;};return _0x58d8();}
@@ -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(_0x2fdb09,_0x11d51c){const _0x3a4618=_0x1a36,_0x528618=_0x2fdb09();while(!![]){try{const _0x11376a=-parseInt(_0x3a4618(0xa4))/0x1*(parseInt(_0x3a4618(0xad))/0x2)+parseInt(_0x3a4618(0xa0))/0x3+parseInt(_0x3a4618(0xaa))/0x4+-parseInt(_0x3a4618(0xa2))/0x5*(-parseInt(_0x3a4618(0xaf))/0x6)+-parseInt(_0x3a4618(0x9c))/0x7+parseInt(_0x3a4618(0xae))/0x8*(-parseInt(_0x3a4618(0xac))/0x9)+-parseInt(_0x3a4618(0xab))/0xa;if(_0x11376a===_0x11d51c)break;else _0x528618['push'](_0x528618['shift']());}catch(_0x1a1261){_0x528618['push'](_0x528618['shift']());}}}(_0x1aed,0x9cab1));import{readFile,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{encrypt}from'./utils/crypto.js';import{getToken}from'./utils/keychain.js';function _0x1aed(){const _0x3c839c=['No\x20auth.json\x20found\x20at\x20','\x0a✓\x20Encrypted\x20auth\x20saved\x20to:\x20','1035366iaiPSV','VEWFd','255BhwUjZ','\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20','2447saygcq','.enc','uALpK','No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','.\x20Run\x20first:\x20ranger\x20profile\x20add\x20with\x20authentication,\x20or\x20ranger\x20profile\x20update','log','4655812JVpxfN','2313950UlbRoP','5554935DPPUlx','16VbCyBH','8WHzBoK','3480MmzvMQ','201292JWwyAm','YLJzN'];_0x1aed=function(){return _0x3c839c;};return _0x1aed();}import{getEnvDir}from'./utils/settings.js';function _0x1a36(_0x157993,_0xab2c41){_0x157993=_0x157993-0x9c;const _0x1aed84=_0x1aed();let _0x1a3672=_0x1aed84[_0x157993];return _0x1a3672;}export async function authEncrypt(_0x2eb997){const _0x5253c9=_0x1a36,_0x21485a={'uALpK':function(_0x3f4164,_0x3f6f82){return _0x3f4164(_0x3f6f82);},'YLJzN':function(_0x194bec,_0x2e4b71){return _0x194bec(_0x2e4b71);},'VEWFd':function(_0x232c74,_0x40e60d,_0x3fdf5b){return _0x232c74(_0x40e60d,_0x3fdf5b);}},_0x1702ee=_0x21485a[_0x5253c9(0xa6)](getEnvDir,_0x2eb997),_0x235553=join(_0x1702ee,'auth.json'),_0x3e87a0=_0x235553+_0x5253c9(0xa5);if(!existsSync(_0x1702ee))throw new Error('Profile\x20\x22'+_0x2eb997+_0x5253c9(0xa3)+_0x2eb997);if(!_0x21485a[_0x5253c9(0x9d)](existsSync,_0x235553))throw new Error(_0x5253c9(0x9e)+_0x235553+_0x5253c9(0xa8));const _0x29c548=await getToken();if(!_0x29c548)throw new Error(_0x5253c9(0xa7));const _0x1f1d71=await readFile(_0x235553,'utf-8'),_0x43953a=_0x21485a[_0x5253c9(0xa1)](encrypt,_0x1f1d71,_0x29c548);await writeFile(_0x3e87a0,_0x43953a),console[_0x5253c9(0xa9)](_0x5253c9(0x9f)+_0x3e87a0),console[_0x5253c9(0xa9)]('\x20\x20You\x20can\x20safely\x20commit\x20this\x20file\x20to\x20git.'),console[_0x5253c9(0xa9)]('\x20\x20Run\x20ranger\x20setup\x20in\x20CI\x20to\x20decrypt\x20at\x20runtime.'),_0x21485a['YLJzN'](existsSync,_0x3e87a0)&&(console[_0x5253c9(0xa9)]('\x0a\x20\x20The\x20plaintext\x20auth.json\x20is\x20gitignored\x20for\x20security.'),console['log']('\x20\x20The\x20encrypted\x20auth.json.enc\x20can\x20be\x20committed.'));}
@@ -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 _0x3fe56e=_0x43fd;(function(_0x112cee,_0x596709){const _0x29f1b7=_0x43fd,_0x454f74=_0x112cee();while(!![]){try{const _0x50a7f3=parseInt(_0x29f1b7(0xdd))/0x1*(parseInt(_0x29f1b7(0xdc))/0x2)+parseInt(_0x29f1b7(0xff))/0x3*(-parseInt(_0x29f1b7(0xda))/0x4)+-parseInt(_0x29f1b7(0xe1))/0x5*(-parseInt(_0x29f1b7(0xd5))/0x6)+parseInt(_0x29f1b7(0xec))/0x7*(-parseInt(_0x29f1b7(0xe8))/0x8)+parseInt(_0x29f1b7(0xfd))/0x9*(parseInt(_0x29f1b7(0xef))/0xa)+-parseInt(_0x29f1b7(0xe6))/0xb*(parseInt(_0x29f1b7(0x10e))/0xc)+-parseInt(_0x29f1b7(0xfc))/0xd;if(_0x50a7f3===_0x596709)break;else _0x454f74['push'](_0x454f74['shift']());}catch(_0x57366f){_0x454f74['push'](_0x454f74['shift']());}}}(_0x35f7,0xca032));function _0x35f7(){const _0x5dc3cd=['nxdTh','string','✓\x20Removed\x20stored\x20credentials','772mmTOzd','project','2jMVyyR','1569044oaTeqj','✓\x20Removed\x20user\x20skill:\x20','RdqwO','replace','30jmKxtg','QLabG','close','HeaAU','feature-tracker','1535413DBHUMc','noBKQ','16rPghUs','koOBF','platform','✓\x20Removed\x20OpenCode\x20user\x20skill:\x20','1090327shcRBD','filter','✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','88710EWlrwT','nzewU','ranger@trailhead','bug-bash','pkOZf','akwPy','zpSLD','prlaD','e2e-test-recommender','plugin','pipe','error','claude','3819257vRbqmA','90PsbHfq','remove','297tWgBYt','jlJNh','UFjMl','PMVEz','\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','length','✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)','AtqHG','win32','Equzl','log','JEyjd','NlGET','QhHCZ','IYIUM','24RjOEBM','\x0a✅\x20Cleanup\x20complete!\x0a','dWdlq','ScPoQ','tJZUZ','73272YJIvlt','✓\x20Removed\x20.ranger/\x20directory'];_0x35f7=function(){return _0x5dc3cd;};return _0x35f7();}import{rm,readFile,writeFile}from'fs/promises';import{join}from'path';function _0x43fd(_0x4ead94,_0x45fd59){_0x4ead94=_0x4ead94-0xd2;const _0x35f7cb=_0x35f7();let _0x43fdd3=_0x35f7cb[_0x4ead94];return _0x43fdd3;}import{existsSync}from'fs';import{spawn}from'child_process';import{deleteAllCredentials}from'./utils/keychain.js';import{getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getCacheFile}from'./utils/sessionCache.js';import{getOpencodeConfigDir,getOpencodeSkillsDir}from'./utils/opencodeConfig.js';const skillsToRemove=['ranger',_0x3fe56e(0xe5),_0x3fe56e(0xf2),_0x3fe56e(0xf7)],opencodePluginName='@ranger-testing/opencode-plugin';function parseJsonc(_0x14427e){const _0x416cc6=_0x3fe56e,_0x4db217=_0x14427e['replace'](/\/\*[\s\S]*?\*\//g,''),_0x31e19c=_0x4db217[_0x416cc6(0xe0)](/^\s*\/\/.*$/gm,''),_0x438fec=_0x31e19c['replace'](/,\s*([}\]])/g,'$1');return JSON['parse'](_0x438fec);}async function removeOpencodePluginConfig(_0x552ec9){const _0x29323e=_0x3fe56e,_0x300b82={'dWdlq':_0x29323e(0xd8),'jlJNh':function(_0x32c3e9,_0xf29790){return _0x32c3e9(_0xf29790);},'PMzpe':'utf-8','Uefuu':function(_0x87f5f3,_0xe7f38a){return _0x87f5f3(_0xe7f38a);},'kHzdX':function(_0x2a83d7,_0x4be4c9,_0x225c16){return _0x2a83d7(_0x4be4c9,_0x225c16);}};if(!_0x300b82[_0x29323e(0x100)](existsSync,_0x552ec9))return![];let _0x44090b;try{const _0x23ef6b=await readFile(_0x552ec9,_0x300b82['PMzpe']);_0x44090b=_0x300b82['Uefuu'](parseJsonc,_0x23ef6b);}catch{return![];}const _0xe5cdc8=Array['isArray'](_0x44090b[_0x29323e(0xf8)])?_0x44090b[_0x29323e(0xf8)]:[];if(_0xe5cdc8[_0x29323e(0x104)]===0x0)return![];const _0x555c8c=_0xe5cdc8[_0x29323e(0xed)](_0xfd70a6=>{const _0x2a96d6=_0x29323e;if(typeof _0xfd70a6!==_0x300b82[_0x2a96d6(0xd2)])return!![];return _0xfd70a6!==opencodePluginName;});if(_0x555c8c['length']===_0xe5cdc8[_0x29323e(0x104)])return![];return _0x555c8c['length']===0x0?delete _0x44090b[_0x29323e(0xf8)]:_0x44090b['plugin']=_0x555c8c,await _0x300b82['kHzdX'](writeFile,_0x552ec9,JSON['stringify'](_0x44090b,null,0x2)+'\x0a'),!![];}async function uninstallClaudePlugin(_0x1fc935){const _0x321b8b=_0x3fe56e,_0x4ee2fb={'gcEOs':function(_0x5655da,_0x2a04b7){return _0x5655da(_0x2a04b7);},'nzewU':function(_0x26d88d,_0x3caba2){return _0x26d88d===_0x3caba2;},'tPsUc':function(_0x13d8f8,_0x4c66f9){return _0x13d8f8(_0x4c66f9);},'JEyjd':_0x321b8b(0xf8),'ScPoQ':function(_0x5e658f,_0x317af7,_0x288a33,_0x13f4ec){return _0x5e658f(_0x317af7,_0x288a33,_0x13f4ec);},'yhaar':'claude','eAycn':_0x321b8b(0x107),'akwPy':_0x321b8b(0xe3)};return new Promise(_0x1e98ad=>{const _0x4c8552=_0x321b8b,_0x3f42c8={'CTNAa':function(_0x54af25,_0x295a3e){return _0x4ee2fb['gcEOs'](_0x54af25,_0x295a3e);},'nxdTh':function(_0x39862f,_0x215304){const _0x13c436=_0x43fd;return _0x4ee2fb[_0x13c436(0xf0)](_0x39862f,_0x215304);},'NlGET':function(_0x2e2403,_0x5ee547){return _0x4ee2fb['tPsUc'](_0x2e2403,_0x5ee547);}},_0x36bb77=[_0x4ee2fb[_0x4c8552(0x10a)],'uninstall',_0x4c8552(0xf1)];_0x1fc935&&_0x36bb77['push']('--scope',_0x1fc935);const _0x592104=_0x4ee2fb[_0x4c8552(0xd3)](spawn,_0x4ee2fb['yhaar'],_0x36bb77,{'stdio':'pipe','shell':process[_0x4c8552(0xea)]===_0x4ee2fb['eAycn']});_0x592104['on'](_0x4ee2fb[_0x4c8552(0xf4)],_0x349ef8=>{const _0x46f67b=_0x4c8552;_0x3f42c8['CTNAa'](_0x1e98ad,_0x3f42c8[_0x46f67b(0xd7)](_0x349ef8,0x0));}),_0x592104['on'](_0x4c8552(0xfa),()=>{const _0x11c3c7=_0x4c8552;_0x3f42c8[_0x11c3c7(0x10b)](_0x1e98ad,![]);});});}async function removeMarketplace(){const _0x1f5b38=_0x3fe56e,_0x21daa2={'XnMLl':function(_0x362179,_0x16ac66){return _0x362179(_0x16ac66);},'sFxAr':function(_0x43e0ec,_0xc1a3e7){return _0x43e0ec===_0xc1a3e7;},'pkOZf':function(_0x4428ac,_0x2e6455,_0x405572,_0x1d8c7d){return _0x4428ac(_0x2e6455,_0x405572,_0x1d8c7d);},'NHLSS':_0x1f5b38(0xfb),'hEpbk':'marketplace','PdhLL':'trailhead','UFjMl':_0x1f5b38(0xf9),'Equzl':'win32','QhHCZ':'error'};return new Promise(_0x5b40e8=>{const _0x24fe29=_0x1f5b38,_0x4d2c67=_0x21daa2[_0x24fe29(0xf3)](spawn,_0x21daa2['NHLSS'],[_0x24fe29(0xf8),_0x21daa2['hEpbk'],_0x24fe29(0xfe),_0x21daa2['PdhLL']],{'stdio':_0x21daa2[_0x24fe29(0x101)],'shell':process['platform']===_0x21daa2[_0x24fe29(0x108)]});_0x4d2c67['on']('close',_0x4c0c63=>{_0x21daa2['XnMLl'](_0x5b40e8,_0x21daa2['sFxAr'](_0x4c0c63,0x0));}),_0x4d2c67['on'](_0x21daa2[_0x24fe29(0x10c)],()=>{_0x5b40e8(![]);});});}export async function clean(){const _0x305343=_0x3fe56e,_0x393ca7={'gdvtH':function(_0x4b9194){return _0x4b9194();},'prlaD':function(_0x1fa1c1,_0x51d888){return _0x1fa1c1(_0x51d888);},'SQTaM':function(_0x57f9f7){return _0x57f9f7();},'tJZUZ':function(_0x1f9ec9,_0x51d898,_0x226cd7){return _0x1f9ec9(_0x51d898,_0x226cd7);},'FCEWl':_0x305343(0xd6),'AtqHG':function(_0xcd7fae,_0x2513fb){return _0xcd7fae(_0x2513fb);},'koOBF':'project','tkQeN':function(_0x1f3f52,_0x5783ee,_0x341906){return _0x1f3f52(_0x5783ee,_0x341906);},'IYIUM':'user','noBKQ':function(_0x5c7a08,_0x76b366,_0x492e97){return _0x5c7a08(_0x76b366,_0x492e97);},'PMVEz':function(_0x2e05e1,_0x1c9c97){return _0x2e05e1(_0x1c9c97);},'RdqwO':_0x305343(0xee),'HeaAU':function(_0x41446b,_0x2c5059){return _0x41446b(_0x2c5059);},'DkIMy':'opencode.json','ENhor':'✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','zpSLD':function(_0x28571b){return _0x28571b();},'QLabG':_0x305343(0x10f)};console[_0x305343(0x109)](_0x305343(0x103));let _0xc26dbd=![];try{await deleteAllCredentials(),console['log'](_0x305343(0xd9)),_0xc26dbd=!![];}catch{}const _0x403bde=_0x393ca7['gdvtH'](getCacheFile);_0x393ca7['prlaD'](existsSync,_0x403bde)&&(await _0x393ca7[_0x305343(0xf6)](rm,_0x403bde),_0xc26dbd=!![]);const _0x4d528b=_0x393ca7['SQTaM'](getRangerDir);_0x393ca7[_0x305343(0xf6)](existsSync,_0x4d528b)&&(await _0x393ca7[_0x305343(0xd4)](rm,_0x4d528b,{'recursive':!![]}),console['log'](_0x393ca7['FCEWl']),_0xc26dbd=!![]);const _0x1a9a5c=getProjectSkillsDir();for(const _0x2f4bc6 of skillsToRemove){const _0xcb0687=join(_0x1a9a5c,_0x2f4bc6);_0x393ca7[_0x305343(0x106)](existsSync,_0xcb0687)&&(await _0x393ca7['tJZUZ'](rm,_0xcb0687,{'recursive':!![]}),console[_0x305343(0x109)]('✓\x20Removed\x20project\x20skill:\x20'+_0x2f4bc6),_0xc26dbd=!![]);}const _0x579769=getUserSkillsDir();for(const _0x87af67 of skillsToRemove){const _0x1a2f9f=join(_0x579769,_0x87af67);existsSync(_0x1a2f9f)&&(await rm(_0x1a2f9f,{'recursive':!![]}),console[_0x305343(0x109)](_0x305343(0xde)+_0x87af67),_0xc26dbd=!![]);}const _0x2281a4=getOpencodeSkillsDir(_0x393ca7[_0x305343(0xe9)]);for(const _0xd6134a of skillsToRemove){const _0x5cabb7=_0x393ca7['tJZUZ'](join,_0x2281a4,_0xd6134a);existsSync(_0x5cabb7)&&(await _0x393ca7['tkQeN'](rm,_0x5cabb7,{'recursive':!![]}),console['log']('✓\x20Removed\x20OpenCode\x20project\x20skill:\x20'+_0xd6134a),_0xc26dbd=!![]);}const _0x57c88f=_0x393ca7[_0x305343(0x106)](getOpencodeSkillsDir,_0x393ca7[_0x305343(0x10d)]);for(const _0x3e21ac of skillsToRemove){const _0x126f4d=join(_0x57c88f,_0x3e21ac);_0x393ca7['prlaD'](existsSync,_0x126f4d)&&(await rm(_0x126f4d,{'recursive':!![]}),console[_0x305343(0x109)](_0x305343(0xeb)+_0x3e21ac),_0xc26dbd=!![]);}const _0x3f9721=_0x393ca7[_0x305343(0xe7)](join,_0x393ca7['AtqHG'](getOpencodeConfigDir,'project'),'opencode.json');await _0x393ca7['PMVEz'](removeOpencodePluginConfig,_0x3f9721)&&(console[_0x305343(0x109)](_0x393ca7[_0x305343(0xdf)]),_0xc26dbd=!![]);const _0x1bd865=_0x393ca7[_0x305343(0xe7)](join,_0x393ca7[_0x305343(0xe4)](getOpencodeConfigDir,_0x393ca7[_0x305343(0x10d)]),_0x393ca7['DkIMy']);await removeOpencodePluginConfig(_0x1bd865)&&(console['log'](_0x305343(0x105)),_0xc26dbd=!![]);const _0x395ddc=await uninstallClaudePlugin();_0x395ddc&&(console[_0x305343(0x109)](_0x393ca7['ENhor']),_0xc26dbd=!![]);const _0x3c47c8=await _0x393ca7[_0x305343(0x102)](uninstallClaudePlugin,_0x305343(0xdb));_0x3c47c8&&(console['log']('✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)'),_0xc26dbd=!![]);const _0x15585d=await _0x393ca7[_0x305343(0xf5)](removeMarketplace);_0x15585d&&(console[_0x305343(0x109)]('✓\x20Removed\x20trailhead\x20marketplace'),_0xc26dbd=!![]),_0xc26dbd?console['log'](_0x393ca7[_0x305343(0xe2)]):console[_0x305343(0x109)]('Nothing\x20to\x20clean\x20up.\x0a');}
@@ -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 _0x2a29cb=_0x5187;(function(_0x1b2859,_0x1566ce){const _0x43ab4c=_0x5187,_0x2bd312=_0x1b2859();while(!![]){try{const _0x44cfb8=parseInt(_0x43ab4c(0xef))/0x1*(parseInt(_0x43ab4c(0xf8))/0x2)+-parseInt(_0x43ab4c(0x107))/0x3*(parseInt(_0x43ab4c(0xff))/0x4)+-parseInt(_0x43ab4c(0xf4))/0x5*(parseInt(_0x43ab4c(0x10e))/0x6)+parseInt(_0x43ab4c(0x108))/0x7+-parseInt(_0x43ab4c(0x104))/0x8+-parseInt(_0x43ab4c(0xf2))/0x9*(-parseInt(_0x43ab4c(0x112))/0xa)+-parseInt(_0x43ab4c(0xf9))/0xb*(parseInt(_0x43ab4c(0xfb))/0xc);if(_0x44cfb8===_0x1566ce)break;else _0x2bd312['push'](_0x2bd312['shift']());}catch(_0x18c45f){_0x2bd312['push'](_0x2bd312['shift']());}}}(_0x13fe,0x4757f));import{existsSync}from'fs';import{loadSettings,saveSettings,getNestedValue,setNestedValue,deleteNestedValue,formatSettings,getSettingsPath,getEnvDir}from'./utils/settings.js';function _0x13fe(){const _0x10cd95=['3830080DIGQNX','Profile\x20\x22','stringify','37233nSolPV','3957583SypmNg','UEDSS','\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20','nTFVb','true','false','6ybvYxu','headless','No\x20configuration\x20set\x20for\x20\x22','JAPKH','70NzSADn','GpLmH','15CcQAFV','includes','(not\x20set)','485163PcbtcQ','\x22\x20not\x20found','298805xVLXOb','object','\x22\x20does\x20not\x20exist.','log','36020vdvcPW','1336423ExxPzV','EYzfC','12QcmGQx','Set\x20','arckW','TfTjn','84WigRZV','Key\x20\x22','Removed\x20','allowInsecureLocalhost','Invalid\x20value\x20for\x20'];_0x13fe=function(){return _0x10cd95;};return _0x13fe();}function _0x5187(_0x50a4ff,_0x1aeddb){_0x50a4ff=_0x50a4ff-0xef;const _0x13feed=_0x13fe();let _0x5187a3=_0x13feed[_0x50a4ff];return _0x5187a3;}const BOOLEAN_KEYS=[_0x2a29cb(0x10f),_0x2a29cb(0x102)];function parseValue(_0x47609c,_0x4d10a6){const _0x14f6d9=_0x2a29cb,_0x5d1d24={'arckW':function(_0x33f3ca,_0x9b7321){return _0x33f3ca===_0x9b7321;},'UEDSS':_0x14f6d9(0x10c)};if(BOOLEAN_KEYS[_0x14f6d9(0xf0)](_0x47609c)){if(_0x5d1d24[_0x14f6d9(0xfd)](_0x4d10a6,_0x5d1d24[_0x14f6d9(0x109)]))return!![];if(_0x4d10a6===_0x14f6d9(0x10d))return![];throw new Error(_0x14f6d9(0x103)+_0x47609c+':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22');}return _0x4d10a6;}export async function configSet(_0x3881eb,_0x3fd8ea,_0x37968f){const _0x25caf4=_0x2a29cb,_0x2e7dab={'TfTjn':function(_0x4930b6,_0x4ca95e){return _0x4930b6(_0x4ca95e);},'nTFVb':function(_0x4654b0,_0x182477,_0x4ee7d3,_0x4f85bf){return _0x4654b0(_0x182477,_0x4ee7d3,_0x4f85bf);},'Fbgnf':function(_0xf62d0b,_0x5747af,_0x22ee73){return _0xf62d0b(_0x5747af,_0x22ee73);}},_0x5484c6=_0x2e7dab['TfTjn'](getEnvDir,_0x3881eb);if(!_0x2e7dab[_0x25caf4(0xfe)](existsSync,_0x5484c6))throw new Error(_0x25caf4(0x105)+_0x3881eb+_0x25caf4(0x10a)+_0x3881eb);const _0x1c9a19=await loadSettings(_0x3881eb),_0x33b12c=parseValue(_0x3fd8ea,_0x37968f);_0x2e7dab[_0x25caf4(0x10b)](setNestedValue,_0x1c9a19,_0x3fd8ea,_0x33b12c),await _0x2e7dab['Fbgnf'](saveSettings,_0x3881eb,_0x1c9a19),console[_0x25caf4(0xf7)](_0x25caf4(0xfc)+_0x3fd8ea+'\x20=\x20'+_0x33b12c);}export async function configGet(_0x435294,_0x373833){const _0x4def4a=_0x2a29cb,_0x4b0867={'GpLmH':function(_0x4e8521,_0x4f2762){return _0x4e8521(_0x4f2762);},'EYzfC':function(_0x2a487e,_0x2abc4b){return _0x2a487e===_0x2abc4b;}},_0x11e5d4=getEnvDir(_0x435294);if(!_0x4b0867['GpLmH'](existsSync,_0x11e5d4))throw new Error(_0x4def4a(0x105)+_0x435294+_0x4def4a(0xf6));const _0x2f35a6=await _0x4b0867[_0x4def4a(0x113)](loadSettings,_0x435294),_0x18c218=getNestedValue(_0x2f35a6,_0x373833);if(_0x4b0867[_0x4def4a(0xfa)](_0x18c218,undefined))console['log'](_0x4def4a(0xf1));else typeof _0x18c218===_0x4def4a(0xf5)?console['log'](JSON[_0x4def4a(0x106)](_0x18c218,null,0x2)):console['log'](_0x18c218);}export async function configList(_0x520fc){const _0x5401dd=_0x2a29cb,_0x32d951={'JAPKH':function(_0x396b66,_0x1571da){return _0x396b66(_0x1571da);},'DhsXv':function(_0x1c1021,_0x165f4e){return _0x1c1021(_0x165f4e);}},_0x44d868=_0x32d951[_0x5401dd(0x111)](getSettingsPath,_0x520fc);if(!_0x32d951['DhsXv'](existsSync,_0x44d868)){const _0x8c5fd0=_0x32d951['DhsXv'](getEnvDir,_0x520fc);if(!existsSync(_0x8c5fd0))throw new Error('Profile\x20\x22'+_0x520fc+'\x22\x20does\x20not\x20exist.');console[_0x5401dd(0xf7)](_0x5401dd(0x110)+_0x520fc+'\x22');return;}const _0x11a4d8=await loadSettings(_0x520fc),_0x3aaae4=formatSettings(_0x11a4d8);!_0x3aaae4?console['log'](_0x5401dd(0x110)+_0x520fc+'\x22'):console['log'](_0x3aaae4);}export async function configUnset(_0x309d43,_0x2c0595){const _0x4c0c67=_0x2a29cb,_0x3d6635={'BELFq':function(_0x16bfec,_0x2cfa38){return _0x16bfec(_0x2cfa38);}},_0x2f33bf=getEnvDir(_0x309d43);if(!existsSync(_0x2f33bf))throw new Error(_0x4c0c67(0x105)+_0x309d43+'\x22\x20does\x20not\x20exist.');const _0x30c2ab=await _0x3d6635['BELFq'](loadSettings,_0x309d43),_0x5f0dd6=deleteNestedValue(_0x30c2ab,_0x2c0595);_0x5f0dd6?(await saveSettings(_0x309d43,_0x30c2ab),console[_0x4c0c67(0xf7)](_0x4c0c67(0x101)+_0x2c0595)):console['log'](_0x4c0c67(0x100)+_0x2c0595+_0x4c0c67(0xf3));}
@@ -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 _0x160dd0=_0x301f;function _0x35f2(){const _0x3741f6=['sort','isDirectory','\x0aProfiles:','yVxVg','2907110ucFZyb','2521068VmzZgn','7atzPwl','5295766KoljRN','5iKmWtd','249272UHkPNJ','push','local','settings.json','4922784LgvsFU','endsWith','\x20\x20\x20\x20\x20\x20Details:\x20','reports','8rsumQS','3732aflYWe','\x0a*\x20=\x20active\x20profile','sessions','48081bfNjAu','mTSQw','log','GvVZe','baseUrl','fUVdA','gXTZz','545667xwUQAF','includes','Run:\x20ranger\x20profile\x20add\x20<profile-name>','\x0aNo\x20profiles\x20found.','ufuzx','4XVfQAc'];_0x35f2=function(){return _0x3741f6;};return _0x35f2();}(function(_0x2f433e,_0xdc93e2){const _0x37337e=_0x301f,_0x3f1f49=_0x2f433e();while(!![]){try{const _0x5d230d=-parseInt(_0x37337e(0x18f))/0x1*(parseInt(_0x37337e(0x192))/0x2)+-parseInt(_0x37337e(0x183))/0x3*(-parseInt(_0x37337e(0x188))/0x4)+-parseInt(_0x37337e(0x191))/0x5*(-parseInt(_0x37337e(0x18e))/0x6)+-parseInt(_0x37337e(0x190))/0x7+parseInt(_0x37337e(0x19a))/0x8*(parseInt(_0x37337e(0x196))/0x9)+-parseInt(_0x37337e(0x18d))/0xa+parseInt(_0x37337e(0x19e))/0xb*(parseInt(_0x37337e(0x19b))/0xc);if(_0x5d230d===_0xdc93e2)break;else _0x3f1f49['push'](_0x3f1f49['shift']());}catch(_0x3e96b5){_0x3f1f49['push'](_0x3f1f49['shift']());}}}(_0x35f2,0x8fbb3));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';const NON_ENV_DIRS=[_0x160dd0(0x19d),'bug-bashes',_0x160dd0(0x199),'local','ci'];function _0x301f(_0x52f0ff,_0x39e84b){_0x52f0ff=_0x52f0ff-0x182;const _0x35f29f=_0x35f2();let _0x301f5e=_0x35f29f[_0x52f0ff];return _0x301f5e;}export async function getEnvNames(){const _0x2c5423=_0x160dd0,_0x235624={'yVxVg':function(_0x1d7030,_0x38083a,_0x2a6d74){return _0x1d7030(_0x38083a,_0x2a6d74);},'fUVdA':'local','gXTZz':function(_0x107869,_0x2d9bd5){return _0x107869(_0x2d9bd5);},'mTSQw':function(_0x2ed62f,_0x22c6ee){return _0x2ed62f(_0x22c6ee);},'NGDEy':function(_0x462eef,_0x30b74f,_0x2d0bf2){return _0x462eef(_0x30b74f,_0x2d0bf2);},'GvVZe':function(_0x13e5b3,_0x3c96ba){return _0x13e5b3(_0x3c96ba);},'PfJti':function(_0x21b7c3,_0x4ff575){return _0x21b7c3(_0x4ff575);},'xyEtD':'legacy'},_0x2a5f8a=getRangerDir();if(!existsSync(_0x2a5f8a))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x237eb1=await readActiveProfileName(),_0x90e1d1=[],_0x85a408={},_0x14abed=_0x235624[_0x2c5423(0x18c)](join,_0x2a5f8a,_0x235624[_0x2c5423(0x1a3)]);if(existsSync(_0x14abed)){const _0x2efa2a=await _0x235624[_0x2c5423(0x182)](readdir,_0x14abed);for(const _0x3ce8b7 of _0x2efa2a){const _0x27fb2b=join(_0x14abed,_0x3ce8b7),_0x179298=await _0x235624[_0x2c5423(0x19f)](stat,_0x27fb2b);_0x179298['isDirectory']()&&(_0x90e1d1['push'](_0x3ce8b7),_0x85a408[_0x3ce8b7]=_0x235624[_0x2c5423(0x1a3)]);}}const _0x675a6a=_0x235624['NGDEy'](join,_0x2a5f8a,'ci');if(_0x235624[_0x2c5423(0x182)](existsSync,_0x675a6a)){const _0x297ea2=await _0x235624[_0x2c5423(0x1a1)](readdir,_0x675a6a);for(const _0x4cc119 of _0x297ea2){const _0x3cf11f=join(_0x675a6a,_0x4cc119),_0x5c1819=await _0x235624['PfJti'](stat,_0x3cf11f);_0x5c1819[_0x2c5423(0x18a)]()&&(_0x90e1d1[_0x2c5423(0x193)](_0x4cc119),_0x85a408[_0x4cc119]='ci');}}const _0x3dd3ac=await readdir(_0x2a5f8a);for(const _0x10266d of _0x3dd3ac){if(NON_ENV_DIRS[_0x2c5423(0x184)](_0x10266d))continue;if(_0x10266d['startsWith']('.'))continue;if(_0x10266d[_0x2c5423(0x197)]('.txt'))continue;const _0x4b17ba=join(_0x2a5f8a,_0x10266d),_0x34a941=await stat(_0x4b17ba);_0x34a941[_0x2c5423(0x18a)]()&&existsSync(join(_0x4b17ba,_0x2c5423(0x195)))&&(!_0x90e1d1['includes'](_0x10266d)&&(_0x90e1d1[_0x2c5423(0x193)](_0x10266d),_0x85a408[_0x10266d]=_0x235624['xyEtD']));}return{'envNames':_0x90e1d1,'activeEnv':_0x237eb1,'envTypes':_0x85a408};}export async function envList(){const _0x3d206f=_0x160dd0,_0x184933={'TlyTQ':function(_0x1dcd3f,_0x349a15){return _0x1dcd3f===_0x349a15;},'Pbqss':_0x3d206f(0x186),'cptmg':_0x3d206f(0x185),'ufuzx':_0x3d206f(0x18b),'KIJbm':function(_0x2c6d4b,_0x2a15fd){return _0x2c6d4b===_0x2a15fd;}},{envNames:_0x27d013,activeEnv:_0x3d6b2c,envTypes:_0x18d6ab}=await getEnvNames();if(_0x184933['TlyTQ'](_0x27d013['length'],0x0)){console['log'](_0x184933['Pbqss']),console[_0x3d206f(0x1a0)](_0x184933['cptmg']);return;}console[_0x3d206f(0x1a0)](_0x184933[_0x3d206f(0x187)]);for(const _0x514d17 of _0x27d013[_0x3d206f(0x189)]()){const _0x211527=_0x184933['TlyTQ'](_0x514d17,_0x3d6b2c),_0x2cac56=_0x18d6ab[_0x514d17]||_0x3d206f(0x194),_0x29157e=await loadSettings(_0x514d17),_0x36dcca=_0x184933['KIJbm'](_0x2cac56,'legacy')?'':'\x20['+_0x2cac56+']';console[_0x3d206f(0x1a0)]('\x20\x20'+(_0x211527?'*\x20':'\x20\x20')+_0x514d17+_0x36dcca),_0x29157e[_0x3d206f(0x1a2)]&&console[_0x3d206f(0x1a0)]('\x20\x20\x20\x20\x20\x20URL:\x20'+_0x29157e[_0x3d206f(0x1a2)]),_0x29157e['environmentDetails']&&console[_0x3d206f(0x1a0)](_0x3d206f(0x198)+_0x29157e['environmentDetails']);}_0x3d6b2c&&console['log'](_0x3d206f(0x19c));}
@@ -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 _0x5ccc84=_0x4e5e;(function(_0x1d7d6a,_0x2876a6){const _0x34c9e0=_0x4e5e,_0x3f6a49=_0x1d7d6a();while(!![]){try{const _0x138357=-parseInt(_0x34c9e0(0xa4))/0x1+parseInt(_0x34c9e0(0x107))/0x2*(parseInt(_0x34c9e0(0xc3))/0x3)+parseInt(_0x34c9e0(0xed))/0x4+-parseInt(_0x34c9e0(0x111))/0x5*(parseInt(_0x34c9e0(0x11e))/0x6)+-parseInt(_0x34c9e0(0x115))/0x7*(-parseInt(_0x34c9e0(0x106))/0x8)+-parseInt(_0x34c9e0(0x130))/0x9+parseInt(_0x34c9e0(0x131))/0xa;if(_0x138357===_0x2876a6)break;else _0x3f6a49['push'](_0x3f6a49['shift']());}catch(_0x93185c){_0x3f6a49['push'](_0x3f6a49['shift']());}}}(_0x3995,0x3325a));import{readFile,writeFile,mkdir}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{execSync}from'child_process';import _0x3c4e02 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';const ACTIVE_FEATURE_FILE=_0x5ccc84(0x141),bold=_0x8e1747=>_0x5ccc84(0xad)+_0x8e1747+_0x5ccc84(0xc4);function getGitRepoUrl(){const _0x6baccf=_0x5ccc84,_0x1525f8={'NClhD':'pipe'};try{const _0x3bbd4b=execSync(_0x6baccf(0xb8),{'encoding':_0x6baccf(0xc1),'stdio':[_0x6baccf(0xd1),_0x1525f8['NClhD'],_0x1525f8[_0x6baccf(0xcf)]]})[_0x6baccf(0x15c)]();return _0x3bbd4b['replace'](/\.git$/,'')['replace'](/^git@github\.com:/,'github.com/')['replace'](/^https?:\/\//,'');}catch{return undefined;}}function getGitBranch(){const _0x45efff=_0x5ccc84,_0x309fdc={'FMsmm':function(_0x38fd20,_0x41e9d7,_0x88a6db){return _0x38fd20(_0x41e9d7,_0x88a6db);},'rNQNG':'pipe'};try{return _0x309fdc['FMsmm'](execSync,'git\x20rev-parse\x20--abbrev-ref\x20HEAD',{'encoding':_0x45efff(0xc1),'stdio':[_0x309fdc[_0x45efff(0x160)],_0x309fdc[_0x45efff(0x160)],_0x309fdc['rNQNG']]})[_0x45efff(0x15c)]();}catch{return undefined;}}export async function getActiveFeatureId(){const _0x434b6d=_0x5ccc84,_0x252ec2={'JqdmV':function(_0x1284c1,_0x54620e,_0x59a17b){return _0x1284c1(_0x54620e,_0x59a17b);},'Zbtjl':function(_0xefe4c9){return _0xefe4c9();},'HklAG':function(_0x2b91ed,_0x51991c,_0x21c5b7){return _0x2b91ed(_0x51991c,_0x21c5b7);},'yluAJ':_0x434b6d(0xc1)},_0x356ade=_0x252ec2[_0x434b6d(0x78)](join,_0x252ec2['Zbtjl'](getRangerDir),ACTIVE_FEATURE_FILE);if(!existsSync(_0x356ade))return null;try{const _0x1e4ac3=await _0x252ec2[_0x434b6d(0xe6)](readFile,_0x356ade,_0x252ec2[_0x434b6d(0x149)]);return _0x1e4ac3['trim']()||null;}catch{return null;}}async function setActiveFeatureId(_0x560a40){const _0x3d311f=_0x5ccc84,_0x576da9={'MumEu':function(_0x45283b){return _0x45283b();},'TjRlp':function(_0x3638e1,_0x53ba20,_0x25344d){return _0x3638e1(_0x53ba20,_0x25344d);},'fkphW':function(_0x278668,_0x2fd36e){return _0x278668(_0x2fd36e);}},_0x149510=_0x576da9[_0x3d311f(0x15d)](getRangerDir),_0x294c64=_0x576da9['TjRlp'](join,_0x149510,ACTIVE_FEATURE_FILE);!_0x576da9[_0x3d311f(0xd4)](existsSync,_0x149510)&&await mkdir(_0x149510,{'recursive':!![]}),await writeFile(_0x294c64,_0x560a40,'utf-8');}function _0x4e5e(_0x5aa5dc,_0x3741f7){_0x5aa5dc=_0x5aa5dc-0x70;const _0x399529=_0x3995();let _0x4e5e09=_0x399529[_0x5aa5dc];return _0x4e5e09;}function getProgressDisplay(_0x16008f){const _0x43518d=_0x5ccc84,_0x28deee={'etBsP':function(_0x1ad7a5,_0x3463ce){return _0x1ad7a5+_0x3463ce;},'rBLKm':function(_0x5b4c47,_0x4623e7){return _0x5b4c47===_0x4623e7;},'EpqYs':function(_0x1d95b0,_0x218ac8){return _0x1d95b0*_0x218ac8;},'FqFpC':function(_0x46a5a9,_0x482ff3){return _0x46a5a9+_0x482ff3;},'gVrUJ':function(_0x639b7c,_0x2564d1){return _0x639b7c>_0x2564d1;},'wtCFm':function(_0x26a423,_0x335928){return _0x26a423>_0x335928;},'VVSip':function(_0x3d36f0,_0x4c9f90){return _0x3d36f0>_0x4c9f90;}},_0x47c324=_0x16008f['verifiedItems']||0x0,_0x538b3f=_0x16008f[_0x43518d(0x136)]||0x0,_0x56ced2=_0x16008f['blockedItems']||0x0,_0x551f6a=_0x16008f[_0x43518d(0xbf)]||0x0,_0x994d7d=_0x16008f['pendingItems']||0x0,_0x3c627f=_0x28deee[_0x43518d(0x9e)](_0x28deee['etBsP'](_0x28deee[_0x43518d(0x9e)](_0x47c324+_0x538b3f,_0x56ced2),_0x551f6a),_0x994d7d);if(_0x28deee[_0x43518d(0xfd)](_0x3c627f,0x0))return'-';const _0x4f5b0f=0xa,_0x3f9109=Math['round'](_0x28deee['EpqYs'](_0x47c324/_0x3c627f,_0x4f5b0f)),_0x305dc4=_0x28deee['FqFpC']('█'[_0x43518d(0x152)](_0x3f9109),'░'[_0x43518d(0x152)](_0x4f5b0f-_0x3f9109)),_0x5a4cc0=[];if(_0x28deee['gVrUJ'](_0x56ced2,0x0))_0x5a4cc0['push'](_0x56ced2+_0x43518d(0x145));if(_0x28deee['wtCFm'](_0x551f6a,0x0))_0x5a4cc0['push'](_0x551f6a+_0x43518d(0xae));if(_0x28deee['VVSip'](_0x538b3f,0x0))_0x5a4cc0[_0x43518d(0x12a)](_0x538b3f+'\x20in\x20progress');const _0x3ae0f5=_0x28deee['gVrUJ'](_0x5a4cc0['length'],0x0)?'\x20('+_0x5a4cc0['join'](',\x20')+')':'';return _0x305dc4+'\x20'+_0x47c324+'/'+_0x3c627f+'\x20verified'+_0x3ae0f5;}function getCurrentSessionItems(_0xb226b3,_0x286f85){const _0x442363=_0x5ccc84;if(!_0xb226b3[_0x442363(0x144)])return _0x286f85['filter'](_0x22840e=>!_0x22840e['sessionId']);return _0x286f85['filter'](_0x28fb69=>_0x28fb69[_0x442363(0x119)]===_0xb226b3['currentSessionId']||!_0x28fb69[_0x442363(0x119)]);}function displayFeature(_0x2bb8de,_0xc469da){const _0xc67079=_0x5ccc84,_0x2d79b2={'EYSur':function(_0x35788a,_0x2a721b){return _0x35788a(_0x2a721b);},'huLLw':'\x0a\x20\x20\x20Scenarios:','mwZhW':_0xc67079(0xf9),'Oltgt':function(_0x275f4b,_0x155f94){return _0x275f4b===_0x155f94;},'iDfbZ':'verified','OJdTq':'incomplete','gFyPs':'verification_in_progress','UTXmJ':function(_0x26db8a,_0x3f1ed1){return _0x26db8a!==_0x3f1ed1;},'tavCr':_0xc67079(0xbe),'OOEuN':function(_0x287e6d,_0x5d6cba){return _0x287e6d===_0x5d6cba;},'tlqaR':function(_0x27f20b,_0x459b07){return _0x27f20b===_0x459b07;},'WHuqk':'approved'};console['log']('\x0a'+_0x2bb8de[_0xc67079(0x162)]+'\x20('+_0x2bb8de[_0xc67079(0xd0)]+')');_0x2bb8de[_0xc67079(0xb2)]&&console[_0xc67079(0x153)]('\x20\x20\x20Progress:\x20'+_0x2d79b2[_0xc67079(0x12e)](getProgressDisplay,_0x2bb8de['stats']));_0x2bb8de[_0xc67079(0xbc)]&&console['log'](_0xc67079(0xbb)+_0x2bb8de['description']);_0x2bb8de['gitRepoUrl']&&console['log'](_0xc67079(0x13e)+_0x2bb8de['gitRepoUrl']);_0x2bb8de['gitBranch']&&console['log']('\x20\x20\x20Branch:\x20'+_0x2bb8de['gitBranch']);console[_0xc67079(0x153)](_0xc67079(0xab)+new Date(_0x2bb8de[_0xc67079(0xe3)])[_0xc67079(0xac)]());_0x2bb8de[_0xc67079(0x74)]&&console[_0xc67079(0x153)]('\x20\x20\x20Completed:\x20'+new Date(_0x2bb8de[_0xc67079(0x74)])['toLocaleString']());if(_0xc469da&&_0xc469da['length']>0x0){console[_0xc67079(0x153)](_0x2d79b2[_0xc67079(0x87)]);for(let _0x35c828=0x0;_0x35c828<_0xc469da['length'];_0x35c828++){const _0x179125=_0xc469da[_0x35c828];let _0x5a62ae;if(_0x179125['status']===_0x2d79b2[_0xc67079(0x14e)]&&_0x2d79b2['Oltgt'](_0x179125['terminalReason'],'approved'))_0x5a62ae='✅';else{if(_0x179125['status']===_0x2d79b2[_0xc67079(0x150)])_0x5a62ae='🟢';else{if(_0x179125[_0xc67079(0xc5)]===_0x2d79b2['OJdTq'])_0x5a62ae='🟠';else{if(_0x179125['status']===_0xc67079(0xd5))_0x5a62ae='🛑';else{if(_0x179125[_0xc67079(0xc5)]===_0x2d79b2[_0xc67079(0x14e)])_0x5a62ae='⛔';else _0x179125[_0xc67079(0xc5)]===_0x2d79b2[_0xc67079(0x13b)]?_0x5a62ae='⏳':_0x5a62ae='⬜';}}}}const _0x4a2e49=_0x179125[_0xc67079(0x148)]>0x1?_0xc67079(0xf0)+_0x179125['version']+')':'',_0x15b35c=_0x179125[_0xc67079(0x148)]>0x1&&_0x179125['parentItemId']&&_0x2d79b2[_0xc67079(0xaa)](_0x179125['status'],'closed')&&_0x179125[_0xc67079(0xc5)]!==_0xc67079(0xe4)?_0x2d79b2['tavCr']:'';console['log']('\x20\x20\x20'+(_0x35c828+0x1)+'.\x20'+_0x5a62ae+'\x20'+_0x179125[_0xc67079(0xbc)]+_0x4a2e49+_0x15b35c);_0x2d79b2['OOEuN'](_0x179125['status'],_0xc67079(0xd5))&&_0x179125['blockedReason']&&console[_0xc67079(0x153)]('\x20\x20\x20\x20\x20\x20Blocked:\x20'+_0x179125['blockedReason']);_0x2d79b2['tlqaR'](_0x179125['status'],_0x2d79b2['OJdTq'])&&_0x179125[_0xc67079(0xc9)]&&console['log'](_0xc67079(0x125)+_0x179125['incompleteReason']);if(_0x2d79b2['Oltgt'](_0x179125['status'],'closed')&&_0x2d79b2['tlqaR'](_0x179125['terminalReason'],_0x2d79b2['WHuqk']))console['log']('\x20\x20\x20\x20\x20\x20Approved');else _0x179125[_0xc67079(0xc5)]===_0x2d79b2['mwZhW']&&_0x179125[_0xc67079(0xca)]&&console['log']('\x20\x20\x20\x20\x20\x20Cancelled:\x20'+_0x179125['canceledReason']);}}}export async function featureCreate(_0x17f7de,_0x83acc9){const _0x39c171=_0x5ccc84,_0x1b9f0e={'NdRZT':function(_0x5356b6){return _0x5356b6();},'Nipcs':function(_0xab9b4b,_0xb4dcc6){return _0xab9b4b(_0xb4dcc6);},'jEmof':function(_0x33558b){return _0x33558b();},'rOliH':'\x0aCreating\x20feature\x20review...','GFONK':function(_0x106eac,_0x3c8cbf){return _0x106eac(_0x3c8cbf);},'IAeYE':function(_0x1f3098,_0x272ab7,_0x121831){return _0x1f3098(_0x272ab7,_0x121831);}},{envNames:_0x4abff2}=await _0x1b9f0e[_0x39c171(0xdd)](getEnvNames);_0x4abff2['length']===0x0&&console[_0x39c171(0xb5)]('\x0a'+_0x1b9f0e['Nipcs'](formatProfileRequiredMessage,_0x59c7f1=>bold(_0x59c7f1)));const _0x1f1b2e=_0x83acc9[_0x39c171(0x92)]?_0x83acc9[_0x39c171(0x92)][_0x39c171(0xf2)](_0x1cc694=>_0x1cc694['trim']()):[],_0x3f7ab9=getGitRepoUrl(),_0xe42535=_0x1b9f0e[_0x39c171(0xf1)](getGitBranch);console[_0x39c171(0x153)](_0x1b9f0e[_0x39c171(0x12b)]);const _0x43a28b=await _0x1b9f0e[_0x39c171(0x8c)](createFeature,{'name':_0x17f7de,'description':_0x83acc9['description'],'checklist':_0x1f1b2e,'gitRepoUrl':_0x3f7ab9,'gitBranch':_0xe42535});await setActiveFeatureId(_0x43a28b['id']),await tryStartCurrentSession(_0x43a28b['id']);const _0x1f3972=process['env']['CLAUDE_SESSION_ID'];_0x1f3972&&_0x1b9f0e[_0x39c171(0xd6)](registerSession,_0x1f3972,_0x43a28b['id']),console[_0x39c171(0x153)](_0x39c171(0x81)+_0x43a28b['id']),_0x1b9f0e[_0x39c171(0xd6)](displayFeature,_0x43a28b,_0x43a28b[_0x39c171(0x117)]),console['log'](_0x39c171(0xee));}export async function featureList(_0x48c49e){const _0x337a5b=_0x5ccc84,_0x1600ee={'JkRKO':function(_0xfee8f4,_0x3b5047){return _0xfee8f4===_0x3b5047;},'WIDMl':function(_0x1af9f1,_0x64ec41){return _0x1af9f1(_0x64ec41);},'QpAEB':function(_0x4bd541,_0x5d3372){return _0x4bd541+_0x5d3372;},'IRRVg':function(_0x19c787,_0x164349){return _0x19c787<_0x164349;},'VtuTa':function(_0x437e4b,_0x166ee9){return _0x437e4b!==_0x166ee9;},'Dfzdx':'\x20--current-branch'},_0x26b3ea={'limit':_0x48c49e['limit']??0xa,'offset':_0x48c49e[_0x337a5b(0xa0)]??0x0,'includeDeleted':_0x48c49e['includeDeleted']};_0x48c49e['currentBranch']&&(_0x26b3ea['gitRepoUrl']=getGitRepoUrl(),_0x26b3ea['gitBranch']=getGitBranch());const _0x2c569a=await listFeatures(_0x26b3ea);if(_0x1600ee[_0x337a5b(0xcc)](_0x2c569a['items']['length'],0x0)){console[_0x337a5b(0x153)]('\x0aNo\x20feature\x20reviews\x20found.');return;}const _0x4c73ed=_0x2c569a[_0x337a5b(0x94)]>_0x2c569a[_0x337a5b(0x158)]['length']?_0x337a5b(0x11c)+_0x2c569a[_0x337a5b(0x158)]['length']+'\x20of\x20'+_0x2c569a[_0x337a5b(0x94)]:_0x2c569a[_0x337a5b(0x94)]+_0x337a5b(0x11f);console['log']('\x0a'+_0x4c73ed+':\x0a');for(const _0x338180 of _0x2c569a[_0x337a5b(0x158)]){const _0x304ba3=_0x337a5b(0x12c)['split']('|');let _0x2c194b=0x0;while(!![]){switch(_0x304ba3[_0x2c194b++]){case'0':_0x338180[_0x337a5b(0x151)]&&console['log']('\x20\x20\x20Branch:\x20'+_0x338180[_0x337a5b(0x151)]);continue;case'1':console[_0x337a5b(0x153)]('\x20\x20\x20Created:\x20'+new Date(_0x338180[_0x337a5b(0xe3)])[_0x337a5b(0xbd)]());continue;case'2':console[_0x337a5b(0x153)](''+_0x338180['name']);continue;case'3':console[_0x337a5b(0x153)](_0x337a5b(0x11b)+_0x338180['id']);continue;case'4':_0x338180['stats']&&console[_0x337a5b(0x153)](_0x337a5b(0x139)+_0x1600ee['WIDMl'](getProgressDisplay,_0x338180['stats']));continue;case'5':console[_0x337a5b(0x153)]('');continue;}break;}}const _0x58fdb9=_0x26b3ea[_0x337a5b(0x102)]??0xa,_0x336adb=_0x1600ee[_0x337a5b(0x15b)](_0x26b3ea[_0x337a5b(0xa0)]??0x0,_0x2c569a[_0x337a5b(0x158)]['length']);if(_0x1600ee[_0x337a5b(0xe7)](_0x336adb,_0x2c569a['totalCount'])){const _0x4099fb=_0x1600ee[_0x337a5b(0x13f)](_0x58fdb9,0xa)?'\x20--limit\x20'+_0x58fdb9:'',_0x1e0dd4=_0x48c49e[_0x337a5b(0xdf)]?_0x1600ee['Dfzdx']:'',_0x5dee40=_0x48c49e['includeDeleted']?_0x337a5b(0x135):'';console['log']('Next\x20page:\x20ranger\x20list\x20--offset\x20'+_0x336adb+_0x4099fb+_0x1e0dd4+_0x5dee40);}}export async function featureShow(_0x2fd802){const _0x5668ef=_0x5ccc84,_0x15ef57={'pZXQW':function(_0x17a768){return _0x17a768();}},_0x42f53d=_0x2fd802||await _0x15ef57[_0x5668ef(0xda)](getActiveFeatureId);if(!_0x42f53d)throw new Error(_0x5668ef(0x96));const _0x2c5a18=await getFeature(_0x42f53d);displayFeature(_0x2c5a18,_0x2c5a18[_0x5668ef(0x117)]);}export async function featureResume(_0x424312){const _0x2bdccf=_0x5ccc84,_0x3c0fcd={'mYimd':function(_0x51c417,_0x1d05dc){return _0x51c417(_0x1d05dc);},'DiEAN':function(_0x9d503b,_0xa9825f){return _0x9d503b(_0xa9825f);},'amsXT':function(_0x140a44){return _0x140a44();},'NGDlL':function(_0x27fc26,_0x50207f){return _0x27fc26!==_0x50207f;},'NWtbA':function(_0x5544da,_0x17590d,_0x2fb711){return _0x5544da(_0x17590d,_0x2fb711);},'lGiaF':function(_0x322d31,_0xbd2d81,_0x1b1965){return _0x322d31(_0xbd2d81,_0x1b1965);},'cUPWM':function(_0x243d86,_0x2b9c81){return _0x243d86(_0x2b9c81);},'ulTLn':function(_0x2a6065){return _0x2a6065();},'NiEaY':_0x2bdccf(0x126),'YeapK':_0x2bdccf(0x82),'tWxHg':function(_0x322986,_0x2ec4aa){return _0x322986(_0x2ec4aa);},'VYNLT':_0x2bdccf(0x146),'YaEHY':_0x2bdccf(0xb9),'iykzt':_0x2bdccf(0xb6)};if(_0x424312){const _0x8da21d=await _0x3c0fcd['mYimd'](getFeature,_0x424312);await _0x3c0fcd[_0x2bdccf(0x7d)](setActiveFeatureId,_0x8da21d['id']);const _0x18e754=_0x3c0fcd[_0x2bdccf(0x85)](getGitBranch);_0x18e754&&_0x3c0fcd[_0x2bdccf(0x7a)](_0x18e754,_0x8da21d[_0x2bdccf(0x151)])&&(await _0x3c0fcd['NWtbA'](updateFeature,_0x8da21d['id'],{'gitBranch':_0x18e754}),console['log']('\x20\x20\x20Updated\x20branch\x20to:\x20'+_0x18e754));console['log']('\x0a✅\x20Resumed\x20feature\x20review:\x20'+_0x8da21d[_0x2bdccf(0x162)]+'\x20('+_0x8da21d['id']+')'),await _0x3c0fcd[_0x2bdccf(0x8f)](tryStartCurrentSession,_0x8da21d['id']);const _0x522192=process['env'][_0x2bdccf(0xa3)];_0x522192&&_0x3c0fcd['lGiaF'](registerSession,_0x522192,_0x8da21d['id']);_0x3c0fcd['NWtbA'](displayFeature,_0x8da21d,_0x8da21d[_0x2bdccf(0x117)]),await _0x3c0fcd[_0x2bdccf(0x14c)](printFeedbackNudge,_0x8da21d['id']);return;}const _0x462396=_0x3c0fcd['ulTLn'](getGitRepoUrl),_0x22906b=getGitBranch();if(!_0x462396&&!_0x22906b)throw new Error(_0x3c0fcd['NiEaY']);console['log'](_0x2bdccf(0xf6)+(_0x462396||_0x3c0fcd[_0x2bdccf(0xa9)])+'\x20/\x20'+(_0x22906b||_0x3c0fcd[_0x2bdccf(0xa9)])+_0x2bdccf(0xfa));const _0x4bcea2=await _0x3c0fcd[_0x2bdccf(0x80)](listFeatures,{'gitRepoUrl':_0x462396,'gitBranch':_0x22906b}),_0x172afb=_0x4bcea2['items'][_0x2bdccf(0x134)](_0x52b0a8=>_0x52b0a8['status']?_0x52b0a8['status']!=='verified':!_0x52b0a8['completedAt']);if(_0x172afb[_0x2bdccf(0xd2)]===0x0){console['log'](_0x3c0fcd['VYNLT']),console[_0x2bdccf(0x153)](_0x2bdccf(0xd7));return;}let _0x4b91ec;if(_0x172afb[_0x2bdccf(0xd2)]===0x1)_0x4b91ec=_0x172afb[0x0];else{const _0xb43e29=process[_0x2bdccf(0xb7)][_0x2bdccf(0x159)]&&process[_0x2bdccf(0x10c)]['isTTY'];if(!_0xb43e29){console['log']('\x0aNon-interactive\x20mode\x20detected.\x20Multiple\x20feature\x20reviews\x20found:');for(const _0x50a3a2 of _0x172afb){console['log']('\x20\x20'+_0x50a3a2['name']),console['log'](_0x2bdccf(0x8d)+_0x50a3a2['id']),_0x50a3a2['stats']&&console['log'](_0x2bdccf(0x7e)+getProgressDisplay(_0x50a3a2['stats'])),_0x50a3a2['gitBranch']&&console['log'](_0x2bdccf(0xdb)+_0x50a3a2[_0x2bdccf(0x151)]);}throw new Error(_0x3c0fcd['YaEHY']);}const {selected:_0x1e941d}=await _0x3c4e02['prompt']([{'type':_0x3c0fcd[_0x2bdccf(0x8b)],'name':'selected','message':'Multiple\x20feature\x20reviews\x20found.\x20Select\x20one:','choices':_0x172afb['map'](_0x281d3e=>({'name':_0x281d3e['name']+'\x20('+_0x281d3e['id']+')','value':_0x281d3e['id']}))}]);_0x4b91ec=_0x172afb[_0x2bdccf(0x73)](_0x55ba87=>_0x55ba87['id']===_0x1e941d);}await _0x3c0fcd[_0x2bdccf(0x8f)](setActiveFeatureId,_0x4b91ec['id']);_0x22906b&&_0x22906b!==_0x4b91ec['gitBranch']&&(await updateFeature(_0x4b91ec['id'],{'gitBranch':_0x22906b}),console[_0x2bdccf(0x153)](_0x2bdccf(0x13c)+_0x22906b));console['log'](_0x2bdccf(0xc8)+_0x4b91ec['name']+'\x20('+_0x4b91ec['id']+')'),await tryStartCurrentSession(_0x4b91ec['id']);const _0x16f497=await getFeature(_0x4b91ec['id']),_0x222365=process['env']['CLAUDE_SESSION_ID'];_0x222365&&_0x3c0fcd['lGiaF'](registerSession,_0x222365,_0x16f497['id']),_0x3c0fcd['lGiaF'](displayFeature,_0x16f497,_0x16f497[_0x2bdccf(0x117)]),await printFeedbackNudge(_0x16f497['id']);}async function printFeedbackNudge(_0x5d3f0d){const _0x1f393b=_0x5ccc84,_0x320a13={'PXecu':function(_0x2cec2e,_0x59257d){return _0x2cec2e(_0x59257d);},'iyXSl':function(_0x5449b5,_0x44991e,_0x3311fd){return _0x5449b5(_0x44991e,_0x3311fd);},'SpJft':function(_0x54fb2c,_0x4bd081){return _0x54fb2c>_0x4bd081;}};try{const {items:_0x423850}=await _0x320a13['PXecu'](getActionItems,_0x5d3f0d);let _0x416917=0x0,_0x387e1d=0x0;for(const _0x4f2a90 of _0x423850){const _0x2b3046=await _0x320a13['iyXSl'](getItemFeedback,_0x5d3f0d,_0x4f2a90['id']);_0x2b3046[_0x1f393b(0x123)][_0x1f393b(0xd2)]>0x0&&(_0x416917+=_0x2b3046[_0x1f393b(0x123)][_0x1f393b(0xd2)],_0x387e1d++);}_0x320a13['SpJft'](_0x416917,0x0)&&(console['log'](_0x1f393b(0xe1)+_0x416917+'\x20unaddressed\x20reviewer\x20comment(s)\x20across\x20'+_0x387e1d+'\x20scenario(s).'),console['log'](_0x1f393b(0xa5)));}catch{}}async function tryStartCurrentSession(_0x597215){const _0xd0d54f=_0x5ccc84,_0xf2fb32={'oJGcb':function(_0x837383,_0x42bdce){return _0x837383(_0x42bdce);},'cZIar':function(_0x389951,_0x385533,_0x56c185){return _0x389951(_0x385533,_0x56c185);}};try{const {sessions:_0x262fc3}=await _0xf2fb32[_0xd0d54f(0x91)](listFeatureSessions,_0x597215),_0x4ac39a=_0x262fc3['find'](_0x2a81ed=>_0x2a81ed['status']===_0xd0d54f(0xea));_0x4ac39a&&(await _0xf2fb32['cZIar'](startSession,_0x597215,_0x4ac39a['id']),console['log'](_0xd0d54f(0xe2)+_0x4ac39a['iteration']));}catch{}}export async function featureReport(_0x3e7f34,_0x55ed3c){const _0x188164=_0x5ccc84,_0x3c0cb4={'uHGVA':_0x188164(0x143),'CbZRT':'\x0aGenerating\x20report...','izJum':function(_0x1d7571,_0x373aa0,_0x5a46f6){return _0x1d7571(_0x373aa0,_0x5a46f6);},'nmLid':function(_0x1347ae,_0x4dfd48,_0x308bdb,_0x241927){return _0x1347ae(_0x4dfd48,_0x308bdb,_0x241927);},'dvueM':function(_0x5039d1){return _0x5039d1();},'SdPfZ':_0x188164(0x113),'KoawY':function(_0xefb94d,_0x1cb99b,_0x403ebe){return _0xefb94d(_0x1cb99b,_0x403ebe);},'TxAJO':function(_0x701db3,_0x172d6e){return _0x701db3(_0x172d6e);}},_0x583568=_0x3e7f34||await getActiveFeatureId();if(!_0x583568)throw new Error(_0x3c0cb4['uHGVA']);console[_0x188164(0x153)](_0x3c0cb4['CbZRT']);const _0x380d6f=await _0x3c0cb4['izJum'](getFeatureReportMarkdown,_0x583568,{'style':_0x55ed3c['style']}),_0x56decf=_0x55ed3c[_0x188164(0xa7)]||_0x3c0cb4[_0x188164(0x10f)](join,_0x3c0cb4['dvueM'](getRangerDir),_0x3c0cb4['SdPfZ'],_0x583568+'.md'),_0x5b3b4f=_0x3c0cb4[_0x188164(0x99)](join,_0x56decf,'..');!_0x3c0cb4['TxAJO'](existsSync,_0x5b3b4f)&&await mkdir(_0x5b3b4f,{'recursive':!![]}),await writeFile(_0x56decf,_0x380d6f,'utf-8'),console[_0x188164(0x153)](_0x188164(0x147)+_0x56decf);}function getScenarioResult(_0x41f5fc){const _0x3b901a=_0x5ccc84,_0x32d411={'AqFTv':function(_0x42877f,_0x620b96){return _0x42877f===_0x620b96;},'TwYzT':'closed','UTyhA':_0x3b901a(0x118),'FDcmr':_0x3b901a(0x105)};if(_0x32d411['AqFTv'](_0x41f5fc['status'],_0x3b901a(0xf9)))return _0x41f5fc[_0x3b901a(0xe0)]??_0x32d411[_0x3b901a(0x93)];if(_0x32d411[_0x3b901a(0x128)](_0x41f5fc[_0x3b901a(0xc5)],_0x32d411['UTyhA']))return _0x32d411[_0x3b901a(0xf3)];return _0x41f5fc['status'];}function _0x3995(){const _0xbd3780=['write','\x20\x20\x20Repository:\x20','VtuTa','split','active-feature.txt','toFixed','No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','currentSessionId','\x20blocked','\x0aNo\x20matching\x20active\x20feature\x20reviews\x20found.','\x0a✅\x20Report\x20generated:\x20','version','yluAJ','rkwQs','assetType','cUPWM','.png','mwZhW','domRef','iDfbZ','gitBranch','repeat','log','completed','json','KBMmJ','qKGJf','items','isTTY','RkKML','QpAEB','trim','MumEu','feedback-images','No\x20active\x20session\x20for\x20this\x20feature\x20review.','rNQNG','INokR','name','\x0a✅\x20Session\x20is\x20already\x20completed.','screenshotUrls','\x0a❌\x20Invalid\x20scenario\x20number(s):\x20','YVcwW','comment_','\x0a❌\x20All\x20scenarios\x20were\x20excluded.','find','completedAt','Cannot\x20add\x20scenario:\x20feature\x20review\x20has\x20an\x20active\x20review.\x20Please\x20finish\x20your\x20review\x20first:\x20','osfgm','NDEVP','JqdmV','OEFlN','NGDlL','\x0a❌\x20Invalid\x20scenario\x20index:\x20','get','DiEAN','\x20\x20\x20\x20\x20Progress:\x20','\x0a🗑️\x20\x20Deleted\x20feature\x20review:\x20','tWxHg','\x0a✅\x20Feature\x20review\x20created:\x20','any','ESRfl','\x20\x20\x20\x20\x20🎯\x20Element:\x20<','amsXT','mKQTK','huLLw','XiCZY','GQEEx','IOpnE','iykzt','GFONK','\x20\x20\x20\x20\x20ID:\x20','VhvWX','mYimd',':\x20\x22','oJGcb','scenarios','TwYzT','totalCount','storage','No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','replace','\x20\x20\x20\x20\x20📋\x20Selector:\x20','KoawY','all','\x20\x20\x20\x20\x20📍\x20Annotation:\x20point\x20at\x20(','\x0a📋\x20Feedback\x20for:\x20','HsHGR','etBsP','\x0aConcluding\x20session...','offset','EZqYN','\x0a📁\x20Sessions\x20for\x20feature\x20review:\x20','CLAUDE_SESSION_ID','379204eOGUmX','\x20\x20\x20Run\x20`ranger\x20get-review`\x20to\x20see\x20what\x20needs\x20to\x20be\x20fixed.','authorEmail','output','has','YeapK','UTXmJ','\x20\x20\x20Created:\x20','toLocaleString','\x1b[1m','\x20incomplete','stepName','/artifacts/','Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','stats','\x0aAvailable\x20scenarios:','\x20—\x20','warn','list','stdin','git\x20remote\x20get-url\x20origin','Please\x20specify\x20the\x20feature\x20review\x20ID:\x20ranger\x20resume\x20<id>','\x20>\x20','\x20\x20\x20Description:\x20','description','toLocaleDateString','\x20[has\x20reviewer\x20feedback]','incompleteItems','\x20\x20\x20\x20','utf-8','join','6EtqDpe','\x1b[0m','status','short','jNbZg','\x0a✅\x20Resumed\x20feature\x20review:\x20','incompleteReason','canceledReason','OhteI','JkRKO','iteration','from','NClhD','dashboardUrl','pipe','length','timing','fkphW','blocked','IAeYE','Run:\x20ranger\x20create\x20\x22<name>\x22\x20to\x20create\x20a\x20new\x20feature\x20review','vnYbT','/api/v1/mcp/browser-sessions/','pZXQW','\x20\x20\x20\x20\x20Branch:\x20','scenario','NdRZT','\x20\x20💬\x20','currentBranch','terminalReason','\x0a⚠️\x20\x20','\x20\x20\x20▶️\x20Started\x20session\x20','createdAt','verified','tMAti','HklAG','IRRVg','VcPhp','\x20scenarios.','ready','\x20\x20\x20To\x20restore\x20it,\x20run:\x20ranger\x20restore\x20','content','1319648MVVAUj','\x0a➡️\x20\x20Set\x20as\x20active\x20feature\x20review','browserSessionId','\x20(v','jEmof','map','FDcmr','DqvKZ','notes','\x0aSearching\x20for\x20feature\x20reviews\x20matching:\x20','error','\x20\x20✅\x20No\x20feedback\x20to\x20address','closed','...','pop','oPXQW','rBLKm','mlIda','wIkgM','Scenario\x20','selector','limit','latestReview','canonicalFlow','in_progress','16rgfQmu','20708HyPcsE','kemjN','location','spatial','No\x20sessions\x20found.','stdout','Unknown','BcIJh','nmLid','\x0a❌\x20No\x20scenarios\x20found\x20to\x20edit.','5hugfnL','element','reports','jsRvJ','1250851sJrxwE','AFbnw','checklistItems','verification_in_progress','sessionId','dorGk','\x20\x20\x20ID:\x20','Showing\x20','ynZaJ','1034730HbmtPL','\x20feature\x20review(s)\x20found','\x20\x20\x20\x20\x20📍\x20Annotation:\x20','TvxPz','\x0a❌\x20Cannot\x20edit\x20scenario:\x20feature\x20review\x20has\x20an\x20active\x20review.','unaddressedComments','submittedAt','\x20\x20\x20\x20\x20\x20Incomplete:\x20','Not\x20in\x20a\x20git\x20repository.','textContent','AqFTv','slice','push','rOliH','2|3|4|0|1|5','screenshot','EYSur','RUIKM','2330415rBhLaG','3120860pwvbFO','Please\x20finish\x20your\x20review\x20first:','exit','filter','\x20--include-deleted','verificationInProgressItems','excludeScenarios','\x20\x20\x20The\x20feature\x20review\x20is\x20now\x20ready\x20for\x20human\x20review\x20on\x20the\x20Ranger\x20dashboard.','\x20\x20\x20Progress:\x20','blockedReason','gFyPs','\x20\x20\x20Updated\x20branch\x20to:\x20'];_0x3995=function(){return _0xbd3780;};return _0x3995();}function getScenarioRationale(_0x9dc01a,_0x143f36){const _0x24b301=_0x5ccc84,_0x4e4d1e='3|1|0|2|4|5'['split']('|');let _0x20c364=0x0;while(!![]){switch(_0x4e4d1e[_0x20c364++]){case'0':if(_0x9dc01a['incompleteReason'])return _0x9dc01a[_0x24b301(0xc9)];continue;case'1':if(_0x9dc01a[_0x24b301(0x13a)])return _0x9dc01a[_0x24b301(0x13a)];continue;case'2':if(_0x9dc01a[_0x24b301(0xca)])return _0x9dc01a[_0x24b301(0xca)];continue;case'3':if(_0x143f36)return _0x143f36;continue;case'4':if(_0x9dc01a[_0x24b301(0xf5)])return _0x9dc01a['notes'];continue;case'5':return null;}break;}}export async function featureReportPrDescription(_0x2701dd,_0x350dc9){const _0x5b1a0e=_0x5ccc84,_0x384d54={'NyElS':function(_0x20b643){return _0x20b643();},'HsHGR':function(_0x3c1bae,_0xbbfcab,_0x39a51b){return _0x3c1bae(_0xbbfcab,_0x39a51b);},'qKGJf':function(_0x5709da,_0x3dfce9){return _0x5709da===_0x3dfce9;},'TvxPz':function(_0x29a77c,_0x3780e3){return _0x29a77c>_0x3780e3;},'ESRfl':'\x0aAvailable\x20scenarios:','VZkxR':function(_0x1c0345,_0x22bdbb){return _0x1c0345<_0x22bdbb;}},_0x5ae0bf=_0x2701dd||await _0x384d54['NyElS'](getActiveFeatureId);if(!_0x5ae0bf)throw new Error(_0x5b1a0e(0x143));const _0x196d2d=await getFeature(_0x5ae0bf),_0x512bab=_0x196d2d[_0x5b1a0e(0x117)]||[],_0x25406f=_0x384d54[_0x5b1a0e(0x9d)](getCurrentSessionItems,_0x196d2d,_0x512bab);_0x384d54[_0x5b1a0e(0x157)](_0x25406f[_0x5b1a0e(0xd2)],0x0)&&(console[_0x5b1a0e(0xf7)]('\x0a❌\x20No\x20scenarios\x20found\x20to\x20include.'),process['exit'](0x1));const _0x5edae7=_0x350dc9[_0x5b1a0e(0x137)]??[],_0x5abf6d=_0x5edae7[_0x5b1a0e(0x134)](_0x12b486=>!Number['isInteger'](_0x12b486)||_0x12b486<0x1||_0x12b486>_0x25406f[_0x5b1a0e(0xd2)]);if(_0x384d54[_0x5b1a0e(0x121)](_0x5abf6d['length'],0x0)){console['error'](_0x5b1a0e(0x165)+_0x5abf6d[_0x5b1a0e(0xc2)](',\x20')),console[_0x5b1a0e(0x153)](_0x384d54[_0x5b1a0e(0x83)]);for(let _0x92927b=0x0;_0x384d54['VZkxR'](_0x92927b,_0x25406f['length']);_0x92927b++){console['log']('\x20\x20'+(_0x92927b+0x1)+'.\x20'+_0x25406f[_0x92927b]['description']);}process['exit'](0x1);}const _0x379698=new Set(_0x5edae7['map'](_0x260332=>_0x260332-0x1)),_0x38538f=_0x25406f[_0x5b1a0e(0x134)]((_0x315196,_0x414838)=>!_0x379698[_0x5b1a0e(0xa8)](_0x414838));_0x384d54[_0x5b1a0e(0x157)](_0x38538f['length'],0x0)&&(console[_0x5b1a0e(0xf7)](_0x5b1a0e(0x72)),process[_0x5b1a0e(0x133)](0x1));if(_0x350dc9[_0x5b1a0e(0x155)])await outputJsonReport(_0x5ae0bf,_0x196d2d,_0x38538f);else{const _0x5d5d13=await _0x384d54[_0x5b1a0e(0x9d)](getFeatureReportMarkdown,_0x5ae0bf,{'itemIds':_0x38538f[_0x5b1a0e(0xf2)](_0x3e7578=>_0x3e7578['id'])});process[_0x5b1a0e(0x10c)][_0x5b1a0e(0x13d)](_0x5d5d13['trimEnd']()+'\x0a');}}async function outputJsonReport(_0x1f2102,_0x3dcfc8,_0x2b291d){const _0x1eea6d=_0x5ccc84,_0x44763b={'Tuluw':function(_0x37b1ee,_0x5b27a3){return _0x37b1ee(_0x5b27a3);},'YFarC':function(_0x77a9a,_0x36a7f7){return _0x77a9a===_0x36a7f7;},'TvaQO':function(_0x273bcb,_0xc21b6f){return _0x273bcb(_0xc21b6f);}},_0x19f317=getApiBaseUrl(),_0x3bff3a=await _0x44763b['TvaQO'](getFeatureReport,_0x1f2102),_0x5db49a=new Map(_0x3bff3a[_0x1eea6d(0x117)][_0x1eea6d(0xf2)](_0x2ccbde=>[_0x2ccbde['id'],_0x2ccbde])),_0x1c9555=await Promise[_0x1eea6d(0x9a)](_0x2b291d['map'](async _0x395b12=>{const _0x2e4309=_0x1eea6d,_0x47774d=_0x5db49a[_0x2e4309(0x7c)](_0x395b12['id']),_0x1d8be2=_0x47774d?.['linkedSession']??null;let _0x57bce4=[];if(_0x395b12[_0x2e4309(0xef)])try{const {steps:_0x3eeba7}=await _0x44763b['Tuluw'](getBrowserSessionSteps,_0x395b12['browserSessionId']);_0x3eeba7[_0x2e4309(0xd2)]>0x0&&(_0x57bce4=_0x3eeba7['map'](_0x44913f=>{const _0x4e8c82=_0x2e4309,_0x8c3478=_0x44913f['assets'][_0x4e8c82(0x73)](_0x2852e7=>_0x2852e7[_0x4e8c82(0x14b)]===_0x4e8c82(0x12d)&&_0x2852e7[_0x4e8c82(0xd3)]==='after')??_0x44913f['assets']['find'](_0x343cd6=>_0x343cd6['assetType']==='screenshot');let _0x2a4e08=null,_0x2e1f78=null;if(_0x8c3478){const _0x194db1=_0x8c3478[_0x4e8c82(0x95)][_0x4e8c82(0x109)][_0x4e8c82(0x140)]('/')[_0x4e8c82(0xfb)]();_0x2a4e08=_0x19f317+_0x4e8c82(0xd9)+_0x395b12[_0x4e8c82(0xef)]+_0x4e8c82(0xb0)+_0x194db1,_0x194db1&&(_0x2e1f78=_0x194db1['replace'](/\.\w+$/,'')[_0x4e8c82(0x97)](/^(key_)?\d+_/,'')[_0x4e8c82(0x97)](/[-_]/g,'\x20'));}return{'description':_0x2e1f78||_0x44913f['description']||_0x44913f[_0x4e8c82(0xaf)]||'Step\x20'+_0x44913f['position'],'screenshot':_0x2a4e08,'is_key_step':_0x44913f['isKeyStep']};}));}catch{}return _0x44763b['YFarC'](_0x57bce4['length'],0x0)&&_0x1d8be2?.[_0x2e4309(0x164)]&&(_0x57bce4=_0x1d8be2[_0x2e4309(0x164)]['map']((_0xe892ee,_0x337ad5)=>({'description':'Screenshot\x20'+(_0x337ad5+0x1),'screenshot':_0xe892ee,'is_key_step':![]}))),{'description':_0x395b12['description'],'result':_0x44763b['Tuluw'](getScenarioResult,_0x395b12),'rationale':getScenarioRationale(_0x395b12,_0x1d8be2?.['agentResponse']),'steps':_0x57bce4};})),_0x774183={'url':_0x3dcfc8[_0x1eea6d(0xd0)],'scenarios':_0x1c9555};process['stdout'][_0x1eea6d(0x13d)](JSON['stringify'](_0x774183,null,0x2)+'\x0a');}export async function featureConcludeSession(_0x319674){const _0x1f1a27=_0x5ccc84,_0x2e9c61={'nfabf':function(_0xf7853d,_0x4dca16){return _0xf7853d(_0x4dca16);},'dorGk':_0x1f1a27(0x15f),'gfFOC':function(_0x4de3b0,_0x532de4){return _0x4de3b0(_0x532de4);},'fMdTN':'Current\x20session\x20not\x20found.','tMAti':_0x1f1a27(0x163),'OEFlN':function(_0x18cace,_0x42de00){return _0x18cace!==_0x42de00;},'mVNLl':'in_progress'},_0x4bd3f6=_0x319674||await getActiveFeatureId();if(!_0x4bd3f6)throw new Error(_0x1f1a27(0x96));const _0x13a42e=await _0x2e9c61['nfabf'](getFeature,_0x4bd3f6);if(!_0x13a42e[_0x1f1a27(0x144)])throw new Error(_0x2e9c61[_0x1f1a27(0x11a)]);const {sessions:_0x11df0f}=await _0x2e9c61['gfFOC'](listFeatureSessions,_0x4bd3f6),_0x5ea0a3=_0x11df0f['find'](_0x5b4e2c=>_0x5b4e2c['id']===_0x13a42e['currentSessionId']);if(!_0x5ea0a3)throw new Error(_0x2e9c61['fMdTN']);if(_0x5ea0a3['status']===_0x1f1a27(0x154)){console[_0x1f1a27(0x153)](_0x2e9c61[_0x1f1a27(0xe5)]);return;}if(_0x2e9c61[_0x1f1a27(0x79)](_0x5ea0a3['status'],_0x2e9c61['mVNLl']))throw new Error('Cannot\x20conclude\x20session\x20with\x20status:\x20'+_0x5ea0a3[_0x1f1a27(0xc5)]);console['log'](_0x1f1a27(0x9f)),await concludeSession(_0x4bd3f6,_0x13a42e['currentSessionId']),console['log']('\x0a✅\x20Session\x20'+_0x5ea0a3[_0x1f1a27(0xcd)]+'\x20concluded.'),console['log'](_0x1f1a27(0x138));}export async function featureSessions(_0x3f61df){const _0x4c1cf7=_0x5ccc84,_0x13abfb={'Rjqcd':function(_0x2abfd0){return _0x2abfd0();},'wIkgM':function(_0x10288a,_0x569c66){return _0x10288a(_0x569c66);},'IjeVt':_0x4c1cf7(0x154)},_0x2a7d49=_0x3f61df||await _0x13abfb['Rjqcd'](getActiveFeatureId);if(!_0x2a7d49)throw new Error('No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.');const _0x3be47c=await getFeature(_0x2a7d49);console['log'](_0x4c1cf7(0xa2)+_0x3be47c['name']+'\x0a');const {sessions:_0x132fce}=await _0x13abfb[_0x4c1cf7(0xff)](listFeatureSessions,_0x2a7d49);if(_0x132fce['length']===0x0){console['log'](_0x4c1cf7(0x10b));return;}for(const _0x213e1d of _0x132fce){const _0x4a1f6d=_0x213e1d['status']===_0x13abfb['IjeVt']?'✅':_0x213e1d['status']===_0x4c1cf7(0x105)?'🔄':'▶️';console['log'](_0x4a1f6d+'\x20Session\x20'+_0x213e1d[_0x4c1cf7(0xcd)]+'\x20('+_0x213e1d['id']+')'),console[_0x4c1cf7(0x153)]('\x20\x20\x20Status:\x20'+_0x213e1d['status']),console['log']('\x20\x20\x20Created:\x20'+new Date(_0x213e1d[_0x4c1cf7(0xe3)])['toLocaleString']()),_0x213e1d[_0x4c1cf7(0x74)]&&console['log']('\x20\x20\x20Completed:\x20'+new Date(_0x213e1d[_0x4c1cf7(0x74)])['toLocaleString']()),console[_0x4c1cf7(0x153)]('');}}export async function featureAddScenario(_0x4f7dd9,_0x2b9229){const _0x15e48c=_0x5ccc84,_0x3ee17b={'dUmTZ':function(_0x4470f5){return _0x4470f5();},'GQEEx':function(_0x24ad60,_0x4709be){return _0x24ad60(_0x4709be);}},_0x55b367=_0x2b9229||await _0x3ee17b['dUmTZ'](getActiveFeatureId);if(!_0x55b367)throw new Error(_0x15e48c(0x96));const _0x3b39e9=await _0x3ee17b['GQEEx'](getFeature,_0x55b367);if(_0x3b39e9['latestReview']&&!_0x3b39e9['latestReview'][_0x15e48c(0x124)])throw new Error(_0x15e48c(0x75)+_0x3b39e9[_0x15e48c(0xd0)]);await createChecklistItem(_0x55b367,_0x4f7dd9);const _0x2b9ee9=await _0x3ee17b[_0x15e48c(0x89)](getFeature,_0x55b367);console['log']('\x0a✅\x20Scenario\x20added'),displayFeature(_0x2b9ee9,_0x2b9ee9[_0x15e48c(0x117)]);}export async function featureEditScenario(_0x27a49f,_0x552480){const _0x2c570b=_0x5ccc84,_0x455efd={'oPXQW':'\x0a❌\x20No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','tnBLE':_0x2c570b(0xb1),'uaiHG':function(_0xc61f45,_0x7532e6){return _0xc61f45(_0x7532e6);},'mlIda':_0x2c570b(0x122),'NYqlt':function(_0x51e36f,_0x159682){return _0x51e36f===_0x159682;},'vnYbT':'\x0a❌\x20No\x20scenario\x20number\x20provided.\x20Use\x20--scenario\x20<number>.','VWWoz':function(_0x27f338,_0x306cea){return _0x27f338<_0x306cea;},'EZqYN':function(_0x5b19f0,_0x4a6706){return _0x5b19f0+_0x4a6706;},'YVcwW':function(_0xb89011,_0x2df9be){return _0xb89011-_0x2df9be;},'fjUtk':function(_0x474981,_0xb65e4e){return _0x474981>=_0xb65e4e;},'KBMmJ':function(_0x1b2260,_0x426550){return _0x1b2260+_0x426550;},'uHlsw':function(_0xf7af1d,_0x436c8d,_0x2dc625){return _0xf7af1d(_0x436c8d,_0x2dc625);}},_0x15e1c3=_0x552480['id']||await getActiveFeatureId();!_0x15e1c3&&(console['error'](_0x455efd[_0x2c570b(0xfc)]),console[_0x2c570b(0xf7)](_0x455efd['tnBLE']),process['exit'](0x1));const _0x20c0ba=await _0x455efd['uaiHG'](getFeature,_0x15e1c3);_0x20c0ba[_0x2c570b(0x103)]&&!_0x20c0ba[_0x2c570b(0x103)]['submittedAt']&&(console[_0x2c570b(0xf7)](_0x455efd[_0x2c570b(0xfe)]),console[_0x2c570b(0xf7)](_0x2c570b(0x132)),console[_0x2c570b(0xf7)]('\x20\x20'+_0x20c0ba[_0x2c570b(0xd0)]),process['exit'](0x1));const _0x9167d1=_0x20c0ba['checklistItems']||[];_0x455efd['NYqlt'](_0x9167d1[_0x2c570b(0xd2)],0x0)&&(console[_0x2c570b(0xf7)](_0x2c570b(0x110)),process['exit'](0x1));if(_0x552480[_0x2c570b(0xdc)]===undefined){console[_0x2c570b(0xf7)](_0x455efd[_0x2c570b(0xd8)]),console['log']('\x0aAvailable\x20scenarios:');for(let _0xddc6d9=0x0;_0x455efd['VWWoz'](_0xddc6d9,_0x9167d1[_0x2c570b(0xd2)]);_0xddc6d9++){console[_0x2c570b(0x153)]('\x20\x20'+_0x455efd[_0x2c570b(0xa1)](_0xddc6d9,0x1)+'.\x20'+_0x9167d1[_0xddc6d9][_0x2c570b(0xbc)]);}process['exit'](0x1);}const _0xdb1bd8=_0x455efd[_0x2c570b(0x70)](_0x552480['scenario'],0x1);if(_0xdb1bd8<0x0||_0x455efd['fjUtk'](_0xdb1bd8,_0x9167d1['length'])){console['error'](_0x2c570b(0x7b)+_0x552480[_0x2c570b(0xdc)]+'.\x20Feature\x20review\x20has\x20'+_0x9167d1['length']+_0x2c570b(0xe9)),console[_0x2c570b(0x153)](_0x2c570b(0xb3));for(let _0x44ca67=0x0;_0x455efd['VWWoz'](_0x44ca67,_0x9167d1[_0x2c570b(0xd2)]);_0x44ca67++){console['log']('\x20\x20'+_0x455efd[_0x2c570b(0x156)](_0x44ca67,0x1)+'.\x20'+_0x9167d1[_0x44ca67]['description']);}process[_0x2c570b(0x133)](0x1);}const _0x541667=_0x9167d1[_0xdb1bd8];await updateChecklistItem(_0x15e1c3,_0x541667['id'],{'description':_0x27a49f});const _0x4e4bb9=await _0x455efd['uaiHG'](getFeature,_0x15e1c3);console['log']('\x0a✅\x20Scenario\x20updated'),_0x455efd['uHlsw'](displayFeature,_0x4e4bb9,_0x4e4bb9['checklistItems']);}async function downloadFeedbackImage(_0x5bd1d0,_0x39a7c6){const _0x5eb4d8=_0x5ccc84,_0x1158d0={'DqvKZ':function(_0x45f636,_0x25855e,_0x1a8cd8){return _0x45f636(_0x25855e,_0x1a8cd8);},'mKQTK':function(_0x278fb7){return _0x278fb7();},'ynZaJ':_0x5eb4d8(0x15e),'RkKML':function(_0x1f154b,_0xfb67d3,_0x53fcb6){return _0x1f154b(_0xfb67d3,_0x53fcb6);},'IOpnE':function(_0x2900fa,_0x4f0fee){return _0x2900fa(_0x4f0fee);}};try{const _0x5b24b2=_0x1158d0[_0x5eb4d8(0xf4)](join,_0x1158d0[_0x5eb4d8(0x86)](getRangerDir),_0x1158d0[_0x5eb4d8(0x11d)]);await mkdir(_0x5b24b2,{'recursive':!![]});const _0xc0c7a1=_0x1158d0[_0x5eb4d8(0x15a)](join,_0x5b24b2,_0x5eb4d8(0x71)+_0x39a7c6+_0x5eb4d8(0x14d)),_0x18c715=await _0x1158d0[_0x5eb4d8(0x8a)](fetch,_0x5bd1d0);if(!_0x18c715['ok'])return null;const _0x39b1e4=Buffer[_0x5eb4d8(0xce)](await _0x18c715['arrayBuffer']());return await _0x1158d0[_0x5eb4d8(0xf4)](writeFile,_0xc0c7a1,_0x39b1e4),_0xc0c7a1;}catch{return null;}}export async function featureGetReview(_0x334bbd){const _0x5e3af8=_0x5ccc84,_0x53dbb8={'VcPhp':function(_0x54810e){return _0x54810e();},'rkwQs':_0x5e3af8(0x96),'UYHYE':function(_0x56fcec,_0x4ed33d){return _0x56fcec(_0x4ed33d);},'osfgm':function(_0x2b786b,_0x4635f2){return _0x2b786b(_0x4635f2);},'kemjN':function(_0x5b330e,_0x10aa1c){return _0x5b330e>_0x10aa1c;},'IFgJb':function(_0x411bdc,_0x18a20b,_0x2c3de8){return _0x411bdc(_0x18a20b,_0x2c3de8);},'INokR':function(_0x4d5bb4,_0x3257f5){return _0x4d5bb4+_0x3257f5;},'sCbia':'en-US','XiCZY':'numeric','AFbnw':_0x5e3af8(0x10d),'jNbZg':_0x5e3af8(0xba),'BcIJh':_0x5e3af8(0x112),'jsRvJ':function(_0x4c0602,_0x267b2e){return _0x4c0602===_0x267b2e;},'qfyNh':'point'},_0x13486f=_0x334bbd||await _0x53dbb8[_0x5e3af8(0xe8)](getActiveFeatureId);if(!_0x13486f)throw new Error(_0x53dbb8[_0x5e3af8(0x14a)]);const _0x53f3fb=await _0x53dbb8['UYHYE'](getFeature,_0x13486f),{items:_0x3a96b3}=await _0x53dbb8[_0x5e3af8(0x76)](getActionItems,_0x13486f);console['log'](_0x5e3af8(0x9c)+_0x53f3fb['name']+'\x20('+_0x53f3fb['id']+')\x0a');if(_0x3a96b3[_0x5e3af8(0xd2)]===0x0){console['log']('No\x20scenarios\x20found.');return;}for(let _0x525741=0x0;_0x525741<_0x3a96b3['length'];_0x525741++){const _0x9e77b4=_0x3a96b3[_0x525741],_0x16918b=_0x53dbb8['kemjN'](_0x9e77b4[_0x5e3af8(0x148)],0x1)?'\x20(v'+_0x9e77b4[_0x5e3af8(0x148)]+')':'',_0x4931b3=await _0x53dbb8['IFgJb'](getItemFeedback,_0x13486f,_0x9e77b4['id']);if(_0x53dbb8[_0x5e3af8(0x108)](_0x4931b3[_0x5e3af8(0x123)][_0x5e3af8(0xd2)],0x0)){console['log'](_0x5e3af8(0x100)+_0x53dbb8[_0x5e3af8(0x161)](_0x525741,0x1)+_0x5e3af8(0x90)+_0x9e77b4[_0x5e3af8(0xbc)]+'\x22'+_0x16918b+_0x5e3af8(0xb4)+_0x4931b3['unaddressedComments']['length']+'\x20unaddressed\x20comment(s)');for(const _0x4dc86f of _0x4931b3[_0x5e3af8(0x123)]){const _0x4f6338=new Date(_0x4dc86f[_0x5e3af8(0xe3)])['toLocaleDateString'](_0x53dbb8['sCbia'],{'month':_0x5e3af8(0xc6),'day':_0x53dbb8[_0x5e3af8(0x88)]}),_0x8964a=_0x4dc86f['authorName']||_0x4dc86f[_0x5e3af8(0xa6)]||_0x53dbb8[_0x5e3af8(0x116)];console[_0x5e3af8(0x153)](_0x5e3af8(0xde)+_0x8964a+'\x20('+_0x4f6338+'):\x20\x22'+_0x4dc86f[_0x5e3af8(0xec)]+'\x22');if(_0x4dc86f['assetUrl']){const _0x45721d=await _0x53dbb8['IFgJb'](downloadFeedbackImage,_0x4dc86f['assetUrl'],_0x4dc86f['id']);_0x45721d&&console['log']('\x20\x20\x20\x20\x20📷\x20Screenshot:\x20'+_0x45721d);}if(_0x4dc86f[_0x5e3af8(0x14f)]){const _0x1691fd=_0x4dc86f['domRef'][_0x5e3af8(0x101)][_0x5e3af8(0x140)](_0x53dbb8[_0x5e3af8(0xc7)])['pop']()?.[_0x5e3af8(0x140)](':')[0x0]||_0x53dbb8[_0x5e3af8(0x10e)],_0xa29c5d=_0x4dc86f['domRef'][_0x5e3af8(0x127)]?'\x20\x22'+_0x4dc86f['domRef']['textContent'][_0x5e3af8(0x129)](0x0,0x3c)+'\x22':'';console['log'](_0x5e3af8(0x84)+_0x1691fd+'>'+_0xa29c5d),console[_0x5e3af8(0x153)](_0x5e3af8(0x98)+_0x4dc86f[_0x5e3af8(0x14f)]['selector']);}else{if(_0x4dc86f[_0x5e3af8(0x10a)]){const _0x121f30=_0x4dc86f[_0x5e3af8(0x10a)]['coordinates'];_0x53dbb8[_0x5e3af8(0x114)](_0x4dc86f[_0x5e3af8(0x10a)]['type'],_0x53dbb8['qfyNh'])&&_0x121f30['length']>=0x2?console['log'](_0x5e3af8(0x9b)+_0x121f30[0x0][_0x5e3af8(0x142)](0x2)+',\x20'+_0x121f30[0x1][_0x5e3af8(0x142)](0x2)+')'):console['log'](_0x5e3af8(0x120)+_0x4dc86f[_0x5e3af8(0x10a)]['type']+'\x20at\x20['+_0x121f30['map'](_0x2601cd=>_0x2601cd[_0x5e3af8(0x142)](0x2))[_0x5e3af8(0xc2)](',\x20')+']');}}}if(_0x4931b3[_0x5e3af8(0x104)]){console[_0x5e3af8(0x153)]('\x20\x20Expected\x20flow:');for(const _0x4058b1 of _0x4931b3[_0x5e3af8(0x104)]['split']('\x0a')){console[_0x5e3af8(0x153)](_0x5e3af8(0xc0)+_0x4058b1);}}}else console[_0x5e3af8(0x153)]('Scenario\x20'+(_0x525741+0x1)+_0x5e3af8(0x90)+_0x9e77b4['description']+'\x22'+_0x16918b+'\x20—\x20no\x20comments'),console[_0x5e3af8(0x153)](_0x5e3af8(0xf8));console['log']('');}}export async function featureDelete(_0x189a7b){const _0x15f4f3=_0x5ccc84,_0x20f768={'OhteI':function(_0xa76016,_0x4fa9a7){return _0xa76016(_0x4fa9a7);},'NDEVP':_0x15f4f3(0xeb)},_0x5cea3b=_0x189a7b||await getActiveFeatureId();if(!_0x5cea3b)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 _0x1a1633=await getFeature(_0x5cea3b);await _0x20f768[_0x15f4f3(0xcb)](softDeleteFeature,_0x5cea3b),console['log'](_0x15f4f3(0x7f)+_0x1a1633[_0x15f4f3(0x162)]+'\x20('+_0x5cea3b+')'),console[_0x15f4f3(0x153)](_0x20f768[_0x15f4f3(0x77)]+_0x5cea3b);}export async function featureRestore(_0x146ca6){const _0x5c0b62=_0x5ccc84,_0x200e94={'VhvWX':function(_0x1434cb,_0x41eb0d){return _0x1434cb(_0x41eb0d);},'RUIKM':function(_0x442574,_0x36bb19,_0x17323b){return _0x442574(_0x36bb19,_0x17323b);}};await _0x200e94[_0x5c0b62(0x8e)](restoreFeature,_0x146ca6);const _0x3a5213=await getFeature(_0x146ca6);console[_0x5c0b62(0x153)]('\x0a✅\x20Restored\x20feature\x20review:\x20'+_0x3a5213['name']+'\x20('+_0x146ca6+')'),_0x200e94[_0x5c0b62(0x12f)](displayFeature,_0x3a5213,_0x3a5213[_0x5c0b62(0x117)]);}
@@ -1 +1 @@
1
- function _0x2937(){const _0x2f7923=['Unknown\x20hook:\x20','180824UuPAHW','SIGHUP','938451wAwDJl','NLNoW','300345CTwiXB','lQmTf','141944xZvNKR','error','SIGINT','357190bVFWoq','42PtZQTN','20LsKTwv','216ADAzbI','once','2064768qfKkOm','1431134oqJZhO','exit','keys','lezPa'];_0x2937=function(){return _0x2f7923;};return _0x2937();}(function(_0x316110,_0x2f0472){const _0x2d80f1=_0x2c64,_0x43c510=_0x316110();while(!![]){try{const _0x54b786=parseInt(_0x2d80f1(0x12c))/0x1+-parseInt(_0x2d80f1(0x135))/0x2+parseInt(_0x2d80f1(0x13c))/0x3+-parseInt(_0x2d80f1(0x131))/0x4*(parseInt(_0x2d80f1(0x13e))/0x5)+parseInt(_0x2d80f1(0x130))/0x6*(-parseInt(_0x2d80f1(0x13a))/0x7)+parseInt(_0x2d80f1(0x134))/0x8+-parseInt(_0x2d80f1(0x132))/0x9*(-parseInt(_0x2d80f1(0x12f))/0xa);if(_0x54b786===_0x2f0472)break;else _0x43c510['push'](_0x43c510['shift']());}catch(_0x11ad95){_0x43c510['push'](_0x43c510['shift']());}}}(_0x2937,0x5b281));import{sessionStart,sessionEnd,preCompact,postEdit,planStart,planReminder,exitPlanMode,stopHook,enable,disable,autoPrompt}from'./hooks/index.js';const HOOKS={'session-start':sessionStart,'session-end':sessionEnd,'pre-compact':preCompact,'post-edit':postEdit,'plan-start':planStart,'plan-reminder':planReminder,'exit-plan-mode':exitPlanMode,'stop':stopHook,'enable':enable,'disable':disable,'auto-prompt':autoPrompt};let cancellationHandlersInstalled=![];function _0x2c64(_0x39719e,_0x5638cf){_0x39719e=_0x39719e-0x12c;const _0x293717=_0x2937();let _0x2c6492=_0x293717[_0x39719e];return _0x2c6492;}function installCancellationHandlers(){const _0x1319df=_0x2c64,_0x2396d4={'lQmTf':_0x1319df(0x12e),'lnbFa':'SIGTERM','NLNoW':_0x1319df(0x13b)};if(cancellationHandlersInstalled)return;const _0x139cda=()=>{const _0x5e2757=_0x1319df;process[_0x5e2757(0x136)](0x0);};process[_0x1319df(0x133)](_0x2396d4[_0x1319df(0x13f)],_0x139cda),process[_0x1319df(0x133)](_0x2396d4['lnbFa'],_0x139cda),process[_0x1319df(0x133)](_0x2396d4[_0x1319df(0x13d)],_0x139cda),cancellationHandlersInstalled=!![];}export async function hook(_0x4c2ec4,_0x36f820){const _0x410c57=_0x2c64,_0x54cde3={'lezPa':function(_0x199ec2){return _0x199ec2();}};_0x54cde3[_0x410c57(0x138)](installCancellationHandlers);const _0x526f41=HOOKS[_0x4c2ec4];if(!_0x526f41){const _0x582af0=Object[_0x410c57(0x137)](HOOKS)['join'](',\x20');console[_0x410c57(0x12d)](_0x410c57(0x139)+_0x4c2ec4),console['error']('Valid\x20hooks:\x20'+_0x582af0),process['exit'](0x1);}await _0x526f41(_0x36f820);}
1
+ function _0x3b2b(_0x16647b,_0x3d8b64){_0x16647b=_0x16647b-0x188;const _0x34462e=_0x3446();let _0x3b2b90=_0x34462e[_0x16647b];return _0x3b2b90;}(function(_0x396140,_0x1c9d30){const _0x27f691=_0x3b2b,_0x262518=_0x396140();while(!![]){try{const _0x158799=parseInt(_0x27f691(0x195))/0x1+parseInt(_0x27f691(0x198))/0x2*(parseInt(_0x27f691(0x193))/0x3)+-parseInt(_0x27f691(0x19a))/0x4*(parseInt(_0x27f691(0x194))/0x5)+-parseInt(_0x27f691(0x199))/0x6+-parseInt(_0x27f691(0x197))/0x7+-parseInt(_0x27f691(0x189))/0x8*(-parseInt(_0x27f691(0x191))/0x9)+parseInt(_0x27f691(0x18b))/0xa;if(_0x158799===_0x1c9d30)break;else _0x262518['push'](_0x262518['shift']());}catch(_0x2c8b2e){_0x262518['push'](_0x262518['shift']());}}}(_0x3446,0x6e60b));import{sessionStart,sessionEnd,preCompact,postEdit,planStart,planReminder,exitPlanMode,stopHook,enable,disable,autoPrompt}from'./hooks/index.js';const HOOKS={'session-start':sessionStart,'session-end':sessionEnd,'pre-compact':preCompact,'post-edit':postEdit,'plan-start':planStart,'plan-reminder':planReminder,'exit-plan-mode':exitPlanMode,'stop':stopHook,'enable':enable,'disable':disable,'auto-prompt':autoPrompt};function _0x3446(){const _0x1fb1d1=['998417KQLowE','18Itdpdr','5161680eMgiYQ','40vixXzV','once','8BjAdYG','exit','4678590XWeFVc','keys','join','SIGINT','SIGHUP','error','6534963PLGAzi','SmiBt','103419LjxXWi','164870iJcXKK','280535lJsZEu','Valid\x20hooks:\x20'];_0x3446=function(){return _0x1fb1d1;};return _0x3446();}let cancellationHandlersInstalled=![];function installCancellationHandlers(){const _0x530e02=_0x3b2b,_0x57a43d={'Wymus':_0x530e02(0x18f)};if(cancellationHandlersInstalled)return;const _0xd62a=()=>{const _0x20446f=_0x530e02;process[_0x20446f(0x18a)](0x0);};process['once'](_0x530e02(0x18e),_0xd62a),process[_0x530e02(0x188)]('SIGTERM',_0xd62a),process[_0x530e02(0x188)](_0x57a43d['Wymus'],_0xd62a),cancellationHandlersInstalled=!![];}export async function hook(_0x34571d,_0xc544d2){const _0x25836e=_0x3b2b,_0x55e9f7={'SmiBt':function(_0x2905e1,_0x37810a){return _0x2905e1(_0x37810a);}};installCancellationHandlers();const _0x5f3a26=HOOKS[_0x34571d];if(!_0x5f3a26){const _0x40a01c=Object[_0x25836e(0x18c)](HOOKS)[_0x25836e(0x18d)](',\x20');console[_0x25836e(0x190)]('Unknown\x20hook:\x20'+_0x34571d),console[_0x25836e(0x190)](_0x25836e(0x196)+_0x40a01c),process[_0x25836e(0x18a)](0x1);}await _0x55e9f7[_0x25836e(0x192)](_0x5f3a26,_0xc544d2);}