@ranger-testing/ranger-cli 2.5.4-alpha.57338f5-12 → 2.5.4-alpha.8c24bb2-15

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 (81) hide show
  1. package/README.md +36 -14
  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/migrateProfile.js +1 -1
  27. package/build/commands/setup/claude.js +1 -1
  28. package/build/commands/setup/opencode.js +1 -1
  29. package/build/commands/setupCi.js +1 -1
  30. package/build/commands/skillup.js +1 -1
  31. package/build/commands/start.js +1 -1
  32. package/build/commands/status.js +1 -1
  33. package/build/commands/update.js +1 -1
  34. package/build/commands/updateEnv.js +1 -1
  35. package/build/commands/useEnv.js +1 -1
  36. package/build/commands/utils/activeProfile.js +1 -1
  37. package/build/commands/utils/agentEnv.js +1 -1
  38. package/build/commands/utils/browserSessionsApi.js +1 -1
  39. package/build/commands/utils/claudeConfig.js +1 -1
  40. package/build/commands/utils/claudeOverrideSettings.js +1 -1
  41. package/build/commands/utils/claudePlugin.js +1 -1
  42. package/build/commands/utils/cloudProfile.js +1 -1
  43. package/build/commands/utils/cloudProfileSession.js +1 -1
  44. package/build/commands/utils/crypto.js +1 -1
  45. package/build/commands/utils/desirePathLog.js +1 -1
  46. package/build/commands/utils/deviceAuth.js +1 -1
  47. package/build/commands/utils/environment.js +1 -1
  48. package/build/commands/utils/featureApi.js +1 -1
  49. package/build/commands/utils/fixWebmDuration.js +1 -1
  50. package/build/commands/utils/gitTracked.js +1 -1
  51. package/build/commands/utils/keychain.js +1 -1
  52. package/build/commands/utils/legacyWarning.js +1 -1
  53. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  54. package/build/commands/utils/matchAuthEnvironment.js +1 -1
  55. package/build/commands/utils/mcpImageBase64.js +1 -1
  56. package/build/commands/utils/model.js +1 -1
  57. package/build/commands/utils/opencodeConfig.js +1 -1
  58. package/build/commands/utils/playwrightCli.js +1 -1
  59. package/build/commands/utils/profileMessages.js +1 -1
  60. package/build/commands/utils/profileSetupBanner.js +1 -1
  61. package/build/commands/utils/projectsConfig.js +1 -1
  62. package/build/commands/utils/rangerConfig.js +1 -1
  63. package/build/commands/utils/rangerRoot.js +1 -1
  64. package/build/commands/utils/resolveProfileContext.js +1 -1
  65. package/build/commands/utils/resolveProfileUrl.js +1 -1
  66. package/build/commands/utils/retry.js +1 -1
  67. package/build/commands/utils/sessionCache.js +1 -1
  68. package/build/commands/utils/settings.js +1 -1
  69. package/build/commands/utils/skillContent.js +1 -1
  70. package/build/commands/utils/skills.js +1 -1
  71. package/build/commands/utils/stitchWebmFiles.js +1 -1
  72. package/build/commands/utils/telemetry.js +1 -1
  73. package/build/commands/utils/tokenRefresh.js +1 -1
  74. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  75. package/build/commands/utils/userApi.js +1 -1
  76. package/build/commands/utils/version.js +1 -1
  77. package/build/commands/verifyFeature.js +1 -1
  78. package/build/commands/verifyFeatureCli.js +1 -1
  79. package/build/skills/ranger/SKILL.md +15 -5
  80. package/build/skills/ranger/verify.md +15 -3
  81. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x33f85d,_0x50efd1){const _0x2b80d9=_0x304e,_0x346106=_0x33f85d();while(!![]){try{const _0x520538=-parseInt(_0x2b80d9(0x16e))/0x1*(-parseInt(_0x2b80d9(0x165))/0x2)+parseInt(_0x2b80d9(0x141))/0x3+-parseInt(_0x2b80d9(0x18a))/0x4*(-parseInt(_0x2b80d9(0x158))/0x5)+parseInt(_0x2b80d9(0x18d))/0x6*(-parseInt(_0x2b80d9(0x131))/0x7)+parseInt(_0x2b80d9(0x180))/0x8*(parseInt(_0x2b80d9(0x17b))/0x9)+-parseInt(_0x2b80d9(0x15e))/0xa*(parseInt(_0x2b80d9(0x199))/0xb)+parseInt(_0x2b80d9(0x138))/0xc;if(_0x520538===_0x50efd1)break;else _0x346106['push'](_0x346106['shift']());}catch(_0x1a5808){_0x346106['push'](_0x346106['shift']());}}}(_0x46e4,0xa83c2));import{readdir,rm}from'fs/promises';import{join}from'path';function _0x304e(_0x47eaac,_0x33c2df){_0x47eaac=_0x47eaac-0x131;const _0x46e489=_0x46e4();let _0x304edd=_0x46e489[_0x47eaac];return _0x304edd;}import{existsSync}from'fs';import _0x26d8dc from'inquirer';import{getRangerDir,getRangerHomeDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{fetchAuthConfig,createCloudProfile,ApiError}from'./utils/cloudProfile.js';import{matchAuthEnvironment}from'./utils/matchAuthEnvironment.js';import{isPathGitTracked}from'./utils/gitTracked.js';import{setProfileOverride}from'./utils/projectsConfig.js';async function checkUrlReachability(_0x270d25){const _0x4f7ac8=_0x304e,_0x4c7f33={'gmyDy':function(_0x3fc6e6,_0x381562,_0x1b0526){return _0x3fc6e6(_0x381562,_0x1b0526);},'BDXUh':'manual','Ckeup':function(_0x472e79,_0x82a2d1){return _0x472e79(_0x82a2d1);},'OsRIc':function(_0x353355,_0x53d8b1){return _0x353355<_0x53d8b1;},'PbCDt':_0x4f7ac8(0x147),'cJAdL':_0x4f7ac8(0x16d),'VkTkX':'fetch\x20failed'};try{const _0x37fb6b=new AbortController(),_0x45cede=_0x4c7f33[_0x4f7ac8(0x14f)](setTimeout,()=>_0x37fb6b[_0x4f7ac8(0x14c)](),0x1388),_0x1640c6={'method':'HEAD','signal':_0x37fb6b[_0x4f7ac8(0x167)],'redirect':_0x4c7f33['BDXUh']};/^https:\/\/localhost(:\d+)?/i[_0x4f7ac8(0x194)](_0x270d25)&&(process[_0x4f7ac8(0x164)][_0x4f7ac8(0x142)]='0');const _0x15b392=await fetch(_0x270d25,_0x1640c6);delete process['env']['NODE_TLS_REJECT_UNAUTHORIZED'],_0x4c7f33['Ckeup'](clearTimeout,_0x45cede);if(_0x4c7f33['OsRIc'](_0x15b392[_0x4f7ac8(0x16b)],0x190))return{'ok':!![]};return{'ok':![],'error':_0x4f7ac8(0x16f)+_0x15b392[_0x4f7ac8(0x16b)]};}catch(_0x31c020){delete process[_0x4f7ac8(0x164)]['NODE_TLS_REJECT_UNAUTHORIZED'];const _0x250162=_0x31c020,_0x2a389c=_0x250162['message']||_0x4c7f33['Ckeup'](String,_0x31c020),_0x399570=_0x2a389c[_0x4f7ac8(0x159)](_0x4c7f33[_0x4f7ac8(0x13c)])||_0x250162[_0x4f7ac8(0x134)]===_0x4c7f33['cJAdL']||_0x2a389c['includes'](_0x4c7f33[_0x4f7ac8(0x13f)]);return{'ok':![],'error':_0x2a389c,'isProtocolError':_0x399570};}}async function sweepOrphanLocalProfile(_0x238142,_0x111307,_0xd2b534){const _0x4a8250=_0x304e,_0x56900d={'Vezjn':function(_0x18e2ae,_0x5adc42,_0x5d455e){return _0x18e2ae(_0x5adc42,_0x5d455e);},'FTMRu':function(_0x185d4b,_0x470b08){return _0x185d4b(_0x470b08);},'mvsKM':function(_0x2939d9,_0x219403,_0x1a8541){return _0x2939d9(_0x219403,_0x1a8541);}},_0x1e1900=join(_0x111307,_0x4a8250(0x15c)),_0x4962b1=_0x56900d[_0x4a8250(0x15f)](join,_0x1e1900,_0x238142);existsSync(_0x4962b1)&&(_0xd2b534&&await _0x56900d[_0x4a8250(0x149)](isPathGitTracked,_0x4962b1)?console[_0x4a8250(0x18b)]('\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20'+_0x4962b1+_0x4a8250(0x13b)):(await rm(_0x4962b1,{'recursive':!![],'force':!![]}),console[_0x4a8250(0x18b)]('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x4962b1)));if(existsSync(_0x1e1900)){let _0x2406cb=[];try{_0x2406cb=await readdir(_0x1e1900);}catch{return;}const _0x22d507=_0x4a8250(0x176)+_0x238142+'-';for(const _0x32dd1d of _0x2406cb){if(!_0x32dd1d['startsWith'](_0x22d507))continue;const _0x40b7b0=_0x56900d['Vezjn'](join,_0x1e1900,_0x32dd1d);await _0x56900d['mvsKM'](rm,_0x40b7b0,{'recursive':!![],'force':!![]}),console['log']('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x40b7b0);}}}async function sweepOrphansBestEffort(_0x4ee9f9){const _0x119af0=_0x304e,_0x18db0d={'IyRiR':function(_0x234df8,_0x2e7079,_0x1f4baf,_0x39616e){return _0x234df8(_0x2e7079,_0x1f4baf,_0x39616e);},'HoqsH':function(_0xd8fa39){return _0xd8fa39();},'fEnPW':function(_0x48e1ea,_0x421826){return _0x48e1ea!==_0x421826;},'RQcYJ':function(_0x5b966d,_0x30e697){return _0x5b966d(_0x30e697);}};try{await _0x18db0d[_0x119af0(0x19c)](sweepOrphanLocalProfile,_0x4ee9f9,_0x18db0d[_0x119af0(0x19f)](getRangerHomeDir),![]);const _0x22d2a9=getRangerDir();_0x18db0d[_0x119af0(0x152)](_0x22d2a9,getRangerHomeDir())&&await sweepOrphanLocalProfile(_0x4ee9f9,_0x22d2a9,!![]);}catch(_0x28043c){console[_0x119af0(0x18b)](_0x119af0(0x193)+(_0x28043c instanceof Error?_0x28043c[_0x119af0(0x163)]:_0x18db0d['RQcYJ'](String,_0x28043c))+').');}}async function markActive(_0x5edf18){const _0xc4d736=_0x304e,_0x22c985={'tDgOB':function(_0x1f15ac,_0x3bc129){return _0x1f15ac(_0x3bc129);}};try{await _0x22c985['tDgOB'](writeActiveProfileName,_0x5edf18),console['log'](_0xc4d736(0x171)+_0x5edf18);}catch{console[_0xc4d736(0x18b)](_0xc4d736(0x151));}}function _0x46e4(){const _0x1caf39=['origin','1285290YRQRvD','NODE_TLS_REJECT_UNAUTHORIZED','keys','\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a','skipAuth','\x20\x20\x20\x20\x20\x20\x20\x20to\x20materialize\x20a\x20session\x20via\x20server-side\x20login.','Invalid\x20URL','Use\x20the\x20new\x20flow:\x0a','FTMRu','FyEDB','retry','abort','\x27\x20created,\x20linked\x20to\x20env\x20\x27','profile.add.autoRouted','gmyDy','error','Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.','fEnPW','agWlS','PPaTS','no_auth_config','some','force','5WryGlH','includes','\x0a\x20\x20Still\x20could\x20not\x20reach\x20','HiQft','local','setupHeader','717310SzXBWv','Vezjn','GiYsv','MrqRx','cdpEndpoint','message','env','2DIgNsm','cwd','signal','\x22\x20already\x20exists.\x20Choose\x20a\x20different\x20name\x20or\x20delete\x20the\x20existing\x20profile\x20first.','MRMPr','url','status','stdout','TypeError','1239258yyOfRQ','HTTP\x20','xceYh','\x20\x20Set\x20active\x20profile:\x20','Could\x20not\x20reach\x20','length','setupHeaders','baseUrl','.tmp-','ISgDl','wlmOy','exit','fZHGO','45cqiCLY','trim','gYoSZ','\x0a\x20\x20Could\x20not\x20reach\x20','oEEwe','1204712koXsfk','eiRYb','use_suggestion','indexOf','list','Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','\x0a\x20\x20This\x20org\x20has\x20no\x20cloud-profile\x20auth\x20config\x20configured.\x20Ask\x20an\x20admin\x20to\x20set\x20one\x20up,\x20or\x20pass\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session.','http://localhost:3000','yes','Enter\x20a\x20different\x20URL','216508hHjJWw','log','aiYbg','47106tAiiza','✓\x20Cloud\x20profile\x20\x27','vjwrv','See:\x20docs/feature/cloud-profiles-old-vs-new-structure.md','prompt','\x22.\x20Expected\x20\x22Name:\x20Value\x22.','\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20(','test','hbiVD','continue','\x0a\x20\x20A\x20cloud\x20profile\x20named\x20\x22','trackPhaseEnd','187nXkOAO','\x27.\x0a','JPuPU','IyRiR','join','isTTY','HoqsH','profile.add.autoRouteSkipped','saveToCloud','WdBwK','623ouPfeB','DrOlz','input','name','isElectron','Found\x20auth\x20environment\x20\x27','slice','1589952AYmvtF','KTqri','\x27\x20created\x20(CDP).','\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.','PbCDt','\x22:\x20','user_declined','VkTkX'];_0x46e4=function(){return _0x1caf39;};return _0x46e4();}async function tryAutoRouteCloudProfile(_0x47dd21,_0x242d5c,_0x4fa38a,_0x12143d,_0x28b3a0){const _0x588383=_0x304e,_0x5894eb={'oEEwe':function(_0x1fb115,_0x103cfd){return _0x1fb115===_0x103cfd;},'aiYbg':function(_0x2ccc5d,_0x89d4e0){return _0x2ccc5d instanceof _0x89d4e0;},'wlmOy':'profile.add.autoRouteSkipped','gYoSZ':_0x588383(0x155),'JRHfu':function(_0xf9d91f,_0x461783,_0x4ba5a7){return _0xf9d91f(_0x461783,_0x4ba5a7);},'fZHGO':'\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.','agWlS':function(_0x47c3e9,_0x3bc5c4,_0x79fffc,_0x505476){return _0x47c3e9(_0x3bc5c4,_0x79fffc,_0x505476);},'MRMPr':function(_0x196965,_0x441685){return _0x196965 instanceof _0x441685;}};let _0x18e853;try{_0x18e853=await fetchAuthConfig();}catch(_0x32aff8){return _0x28b3a0?.[_0x588383(0x198)]('profile.add.autoRouteSkipped',{'reason':'no_auth_config','profileName':_0x47dd21}),console['error']('\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20'+(_0x5894eb[_0x588383(0x18c)](_0x32aff8,Error)?_0x32aff8[_0x588383(0x163)]:String(_0x32aff8))),![];}if(!_0x18e853||!_0x18e853['environments']||Object[_0x588383(0x143)](_0x18e853['environments'])['length']===0x0)return _0x28b3a0?.['trackPhaseEnd'](_0x5894eb[_0x588383(0x178)],{'reason':_0x5894eb[_0x588383(0x17d)],'profileName':_0x47dd21}),console['error'](_0x588383(0x186)),![];const _0x2613a6=_0x5894eb['JRHfu'](matchAuthEnvironment,_0x242d5c,_0x18e853);if(!_0x2613a6)return _0x28b3a0?.['trackPhaseEnd']('profile.add.autoRouteSkipped',{'reason':'no_match','profileName':_0x47dd21}),console[_0x588383(0x150)]('\x0a\x20\x20No\x20auth\x20env\x20matches\x20'+_0x242d5c+'.\x20Configured\x20envs:\x20'+Object['keys'](_0x18e853['environments'])['join'](',\x20')+'.'),![];const _0x50bc6d=_0x18e853['environments'][_0x2613a6],_0x47bab1=_0x50bc6d?.['domains']??[];if(_0x12143d&&!_0x4fa38a[_0x588383(0x188)]){const {saveToCloud:_0x1be636}=await _0x26d8dc[_0x588383(0x191)]([{'type':'confirm','name':_0x588383(0x1a1),'message':_0x588383(0x136)+_0x2613a6+'\x27\x20matching\x20'+_0x242d5c+'\x0a\x20\x20(domains:\x20'+_0x47bab1[_0x588383(0x19d)](',\x20')+')\x0a\x20\x20Save\x20\x27'+_0x47dd21+'\x27\x20to\x20the\x20cloud?','default':!![]}]);if(!_0x1be636)return _0x28b3a0?.[_0x588383(0x198)](_0x588383(0x1a0),{'reason':_0x588383(0x13e),'profileName':_0x47dd21}),console[_0x588383(0x150)](_0x5894eb[_0x588383(0x17a)]),![];}const _0x470cc5=_0x47bab1[_0x588383(0x156)](_0x498cfb=>{const _0x8ef8ee=_0x588383;try{return _0x5894eb[_0x8ef8ee(0x17f)](new URL(_0x498cfb)['origin'],new URL(_0x242d5c)[_0x8ef8ee(0x140)]);}catch{return![];}}),_0x4f2434={};!_0x470cc5&&(_0x4f2434[_0x588383(0x175)]=_0x242d5c);try{await _0x5894eb[_0x588383(0x153)](createCloudProfile,_0x47dd21,_0x2613a6,{'settings':_0x4f2434});}catch(_0x54bf89){if(_0x5894eb[_0x588383(0x169)](_0x54bf89,ApiError)&&_0x54bf89[_0x588383(0x16b)]===0x199){console['error']('\x0a\x20\x20A\x20cloud\x20profile\x20named\x20\x22'+_0x47dd21+_0x588383(0x168));throw _0x54bf89;}throw _0x54bf89;}return console[_0x588383(0x18b)]('✓\x20Cloud\x20profile\x20\x27'+_0x47dd21+_0x588383(0x14d)+_0x2613a6+_0x588383(0x19a)+('\x20\x20Next:\x20RANGER_TEST_USERNAME=...\x20RANGER_TEST_PASSWORD=...\x20ranger\x20go\x20--profile\x20'+_0x47dd21)),await sweepOrphansBestEffort(_0x47dd21),_0x28b3a0?.['trackPhaseEnd'](_0x588383(0x14e),{'envKey':_0x2613a6,'profileName':_0x47dd21}),!![];}async function createUnconfiguredCloudProfile(_0x58e2c8,_0x37a734){const _0x2bdb82=_0x304e,_0x1b2838={'MrqRx':function(_0x92185,_0x1ab30b){return _0x92185 instanceof _0x1ab30b;}};try{await createCloudProfile(_0x58e2c8,undefined,{'settings':_0x37a734});}catch(_0x249780){_0x1b2838[_0x2bdb82(0x161)](_0x249780,ApiError)&&_0x249780['status']===0x199&&console['error'](_0x2bdb82(0x197)+_0x58e2c8+_0x2bdb82(0x168));throw _0x249780;}}export async function addEnv(_0x2e7b27,_0x1caa16={},_0x4e0370){const _0x37b2e6=_0x304e,_0x4578ef={'GiYsv':function(_0x5651ae,_0x4a3826){return _0x5651ae+_0x4a3826;},'uGaNY':function(_0x24538b,_0x3656f7){return _0x24538b+_0x3656f7;},'KTqri':_0x37b2e6(0x190),'BBFQx':function(_0x2ba731,_0xce676e){return _0x2ba731===_0xce676e;},'hCxJU':function(_0x50e548,_0x3e605d){return _0x50e548+_0x3e605d;},'FyEDB':function(_0x5d06ea,_0x5d1640){return _0x5d06ea!==_0x5d1640;},'JPuPU':function(_0x1f3658,_0x46383b){return _0x1f3658===_0x46383b;},'kCGAc':'--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','TzVvl':'--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','vjwrv':function(_0x43a043,_0x22b00f){return _0x43a043(_0x22b00f);},'djWvf':'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','oXyZo':function(_0x276560,_0x38a21a,_0x1a0c98){return _0x276560(_0x38a21a,_0x1a0c98);},'KAIWB':_0x37b2e6(0x162),'WdBwK':function(_0x319dba,_0x92050d,_0x4e88c9,_0xa15eee,_0x41126e){return _0x319dba(_0x92050d,_0x4e88c9,_0xa15eee,_0x41126e);},'nzuTM':_0x37b2e6(0x135),'ISgDl':function(_0x3d84bf,_0x3cfe31){return _0x3d84bf instanceof _0x3cfe31;},'ENHLj':function(_0x31c58e,_0x5830d9){return _0x31c58e>_0x5830d9;},'EqsTw':function(_0x453be3,_0x170dd6){return _0x453be3+_0x170dd6;},'jiqtn':function(_0x336b04,_0x2e372e){return _0x336b04(_0x2e372e);},'QPYAp':'\x0a🌐\x20Profile\x20Setup\x0a','xceYh':'\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','FxKfc':_0x37b2e6(0x185),'VqhEK':_0x37b2e6(0x187),'CAeVK':function(_0x1c60a7,_0xec07f3){return _0x1c60a7(_0xec07f3);},'hbiVD':_0x37b2e6(0x184),'OdkXs':'action','DrOlz':'What\x20would\x20you\x20like\x20to\x20do?','PPaTS':_0x37b2e6(0x189),'HZpQs':'Continue\x20anyway','ihEGx':_0x37b2e6(0x196),'eiRYb':function(_0x180821,_0xa673e5,_0x5a4f34,_0x58a11b,_0x1c9834,_0x55eb44){return _0x180821(_0xa673e5,_0x5a4f34,_0x58a11b,_0x1c9834,_0x55eb44);},'HiQft':function(_0x3c3e43,_0x2acf2c){return _0x3c3e43(_0x2acf2c);}};_0x1caa16['ci']&&(console['error'](_0x4578ef[_0x37b2e6(0x160)](_0x4578ef[_0x37b2e6(0x160)](_0x4578ef['uGaNY'](_0x4578ef['GiYsv']('ranger\x20profile\x20add\x20--ci\x20writes\x20to\x20the\x20legacy\x20.ranger/ci/\x20tree\x20which\x20is\x20no\x20longer\x20supported.\x0a'+'Cloud\x20profiles\x20store\x20session\x20state\x20server-side;\x20the\x20--ci\x20flag\x20is\x20gone.\x0a',_0x37b2e6(0x148)),'\x20\x20RANGER_TEST_USERNAME=...\x20RANGER_TEST_PASSWORD=...\x20ranger\x20go\x20--base-url\x20<url>\x0a'),'For\x20a\x20shared\x20cloud\x20profile:\x20ranger\x20profile\x20add\x20<account-email>\x0a'),_0x4578ef[_0x37b2e6(0x139)])),process['exit'](0x1));const _0x385b29={};if(_0x1caa16[_0x37b2e6(0x15d)])for(const _0x490023 of _0x1caa16[_0x37b2e6(0x15d)]){const _0x54e0c0=_0x490023[_0x37b2e6(0x183)](':');if(_0x4578ef['BBFQx'](_0x54e0c0,-0x1))throw new Error('Invalid\x20--setup-header\x20format:\x20\x22'+_0x490023+_0x37b2e6(0x192));const _0x504904=_0x490023['slice'](0x0,_0x54e0c0)[_0x37b2e6(0x17c)](),_0x3f1b5f=_0x490023[_0x37b2e6(0x137)](_0x4578ef['hCxJU'](_0x54e0c0,0x1))['trim']();_0x385b29[_0x504904]=_0x3f1b5f;}if(_0x4578ef[_0x37b2e6(0x14a)](_0x1caa16[_0x37b2e6(0x162)],undefined)&&_0x4578ef[_0x37b2e6(0x19b)](_0x1caa16[_0x37b2e6(0x162)]['trim'](),''))throw new Error(_0x4578ef['kCGAc']);if(_0x1caa16[_0x37b2e6(0x162)]&&_0x1caa16[_0x37b2e6(0x16a)])throw new Error(_0x4578ef['TzVvl']);const _0x1bf837=_0x4578ef['vjwrv'](Boolean,_0x1caa16[_0x37b2e6(0x162)]),_0x1f4065=process['stdin'][_0x37b2e6(0x19e)]&&process[_0x37b2e6(0x16c)][_0x37b2e6(0x19e)];if(!_0x1f4065&&!_0x1caa16['url']&&!_0x1bf837&&!_0x1caa16['skipAuth'])throw new Error(_0x4578ef['djWvf']);if(_0x1bf837){const _0xc7213e=_0x1caa16['cdpEndpoint'];console[_0x37b2e6(0x18b)]('\x0a🔌\x20CDP\x20Profile\x20Setup\x0a'),console[_0x37b2e6(0x18b)]('\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20'+_0xc7213e);const _0x50586b={'cdpEndpoint':_0xc7213e,'isElectron':!![]};Object[_0x37b2e6(0x143)](_0x385b29)[_0x37b2e6(0x173)]>0x0&&(_0x50586b[_0x37b2e6(0x174)]=_0x385b29);await _0x4578ef['oXyZo'](createUnconfiguredCloudProfile,_0x2e7b27,_0x50586b);try{setProfileOverride(process[_0x37b2e6(0x166)](),_0x2e7b27,_0x4578ef['KAIWB'],_0xc7213e),_0x4578ef[_0x37b2e6(0x1a2)](setProfileOverride,process['cwd'](),_0x2e7b27,_0x4578ef['nzuTM'],!![]);}catch(_0x8dafb4){console['error']('\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20'+(_0x4578ef[_0x37b2e6(0x177)](_0x8dafb4,Error)?_0x8dafb4[_0x37b2e6(0x163)]:_0x4578ef['vjwrv'](String,_0x8dafb4)));}console['log'](_0x37b2e6(0x18e)+_0x2e7b27+_0x37b2e6(0x13a)),await sweepOrphansBestEffort(_0x2e7b27),await markActive(_0x2e7b27);return;}if(_0x1caa16[_0x37b2e6(0x145)]){const _0x5ac572={};_0x1caa16[_0x37b2e6(0x16a)]&&(_0x5ac572['baseUrl']=_0x1caa16[_0x37b2e6(0x16a)]);_0x4578ef['ENHLj'](Object['keys'](_0x385b29)['length'],0x0)&&(_0x5ac572['setupHeaders']=_0x385b29);await createUnconfiguredCloudProfile(_0x2e7b27,_0x5ac572),console[_0x37b2e6(0x18b)](_0x4578ef['EqsTw'](_0x4578ef['GiYsv']('✓\x20Cloud\x20profile\x20\x27'+_0x2e7b27+'\x27\x20created\x20with\x20no\x20session.\x0a','\x20\x20Next:\x20set\x20RANGER_TEST_USERNAME\x20/\x20RANGER_TEST_PASSWORD\x20and\x20run\x0a')+('\x20\x20\x20\x20\x20\x20\x20\x20`ranger\x20go\x20--profile\x20'+_0x2e7b27+'`\x0a'),_0x37b2e6(0x146))),await _0x4578ef[_0x37b2e6(0x18f)](sweepOrphansBestEffort,_0x2e7b27),await _0x4578ef['jiqtn'](markActive,_0x2e7b27);return;}if(_0x1caa16['url']){const _0xcb3341=_0x1caa16['url'],_0x234b94=await _0x4578ef['vjwrv'](checkUrlReachability,_0xcb3341);if(!_0x234b94['ok']&&!_0x1caa16[_0x37b2e6(0x157)])throw new Error(_0x37b2e6(0x172)+_0xcb3341+':\x20'+_0x234b94[_0x37b2e6(0x150)]+'\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.');!_0x234b94['ok']&&_0x1caa16[_0x37b2e6(0x157)]&&console['log']('⚠\x20Could\x20not\x20reach\x20'+_0xcb3341+':\x20'+_0x234b94[_0x37b2e6(0x150)]+'\x20(continuing\x20with\x20--force)');}else{console['log'](_0x4578ef['QPYAp']),console['log'](_0x4578ef[_0x37b2e6(0x170)]),console['log'](_0x37b2e6(0x144));let _0x2fe0af='',_0x3344ce=![];while(!![]){const _0x2b5045=await _0x26d8dc[_0x37b2e6(0x191)]([{'type':_0x37b2e6(0x133),'name':'baseUrl','message':_0x3344ce?_0x4578ef['FxKfc']:'What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','default':_0x2fe0af||_0x4578ef['VqhEK']}]);_0x2fe0af=_0x2b5045['baseUrl'];const _0x5c7298=await _0x4578ef['CAeVK'](checkUrlReachability,_0x2fe0af);if(_0x5c7298['ok'])break;const _0x3e0307=/^[a-zA-Z][\w+.-]*:\/\//['test'](_0x2fe0af),_0x4f6eda=_0x5c7298['isProtocolError']&&!_0x3e0307,_0x3d4ac5=_0x4f6eda?'http://'+_0x2fe0af:null;_0x3344ce=!![],console['log'](_0x37b2e6(0x17e)+_0x2fe0af+':\x20'+_0x5c7298['error']);_0x3d4ac5&&console['log']('\x20\x20Did\x20you\x20mean\x20'+_0x3d4ac5+'?');const {action:_0xb5b7}=await _0x26d8dc['prompt']([{'type':_0x4578ef[_0x37b2e6(0x195)],'name':_0x4578ef['OdkXs'],'message':_0x4578ef[_0x37b2e6(0x132)],'choices':[..._0x3d4ac5?[{'name':'Use\x20'+_0x3d4ac5,'value':'use_suggestion'}]:[],{'name':_0x4578ef[_0x37b2e6(0x154)],'value':_0x37b2e6(0x14b)},{'name':_0x4578ef['HZpQs'],'value':_0x4578ef['ihEGx']}]}]);if(_0xb5b7===_0x37b2e6(0x182)&&_0x3d4ac5){_0x2fe0af=_0x3d4ac5;const _0x36a25c=await checkUrlReachability(_0x2fe0af);if(_0x36a25c['ok'])break;console[_0x37b2e6(0x18b)](_0x37b2e6(0x15a)+_0x2fe0af+':\x20'+_0x36a25c['error']);}else{if(_0xb5b7==='continue')break;}}_0x1caa16={..._0x1caa16,'url':_0x2fe0af};}let _0x68fdf9=![];try{_0x68fdf9=await _0x4578ef[_0x37b2e6(0x181)](tryAutoRouteCloudProfile,_0x2e7b27,_0x1caa16[_0x37b2e6(0x16a)],_0x1caa16,_0x1f4065,_0x4e0370);}catch(_0x4315a8){console['error']('\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22'+_0x2e7b27+_0x37b2e6(0x13d)+(_0x4578ef['ISgDl'](_0x4315a8,Error)?_0x4315a8[_0x37b2e6(0x163)]:String(_0x4315a8))),process[_0x37b2e6(0x179)](0x1);}!_0x68fdf9&&process[_0x37b2e6(0x179)](0x1),await _0x4578ef[_0x37b2e6(0x15b)](markActive,_0x2e7b27);}
1
+ (function(_0x57cb46,_0x1779b2){const _0x5cbb64=_0x1ccb,_0x39dfe5=_0x57cb46();while(!![]){try{const _0x226840=-parseInt(_0x5cbb64(0xe8))/0x1+parseInt(_0x5cbb64(0xb1))/0x2+-parseInt(_0x5cbb64(0x90))/0x3+parseInt(_0x5cbb64(0xa7))/0x4*(-parseInt(_0x5cbb64(0xfc))/0x5)+-parseInt(_0x5cbb64(0x113))/0x6*(parseInt(_0x5cbb64(0xbb))/0x7)+parseInt(_0x5cbb64(0x92))/0x8*(parseInt(_0x5cbb64(0xc3))/0x9)+parseInt(_0x5cbb64(0x104))/0xa;if(_0x226840===_0x1779b2)break;else _0x39dfe5['push'](_0x39dfe5['shift']());}catch(_0x24c1e0){_0x39dfe5['push'](_0x39dfe5['shift']());}}}(_0x2219,0xe2feb));import{readdir,rm}from'fs/promises';function _0x1ccb(_0x3f4d15,_0xb0fae2){_0x3f4d15=_0x3f4d15-0x86;const _0x2219d7=_0x2219();let _0x1ccbb7=_0x2219d7[_0x3f4d15];return _0x1ccbb7;}import{join}from'path';import{existsSync}from'fs';import _0x2dcd12 from'inquirer';import{getRangerDir,getRangerHomeDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{fetchAuthConfig,createCloudProfile,manualBrowserLogin,ApiError}from'./utils/cloudProfile.js';import{matchAuthEnvironment}from'./utils/matchAuthEnvironment.js';import{isPathGitTracked}from'./utils/gitTracked.js';import{setProfileOverride}from'./utils/projectsConfig.js';async function checkUrlReachability(_0x2e9668){const _0x2a4155=_0x1ccb,_0x11ef35={'txMRn':function(_0x31ccd9,_0xf7a979,_0x408367){return _0x31ccd9(_0xf7a979,_0x408367);},'axsfL':_0x2a4155(0x94),'ZDlLU':function(_0x56a192,_0x1022a8,_0x2080a4){return _0x56a192(_0x1022a8,_0x2080a4);},'UUNiW':function(_0x52e36,_0x34b9dd){return _0x52e36(_0x34b9dd);},'iAEex':_0x2a4155(0xbe),'KlFOH':'TypeError','csBgQ':_0x2a4155(0x8f)};try{const _0x212e5b=new AbortController(),_0x1c4d32=_0x11ef35[_0x2a4155(0x8e)](setTimeout,()=>_0x212e5b['abort'](),0x1388),_0x2eb8df={'method':_0x11ef35[_0x2a4155(0xf3)],'signal':_0x212e5b[_0x2a4155(0x96)],'redirect':'manual'};/^https:\/\/localhost(:\d+)?/i[_0x2a4155(0x9b)](_0x2e9668)&&(process['env'][_0x2a4155(0x111)]='0');const _0x340361=await _0x11ef35['ZDlLU'](fetch,_0x2e9668,_0x2eb8df);delete process[_0x2a4155(0xc7)]['NODE_TLS_REJECT_UNAUTHORIZED'],_0x11ef35['UUNiW'](clearTimeout,_0x1c4d32);if(_0x340361[_0x2a4155(0xd2)]<0x190)return{'ok':!![]};return{'ok':![],'error':_0x2a4155(0xf6)+_0x340361[_0x2a4155(0xd2)]};}catch(_0x3604d8){delete process['env'][_0x2a4155(0x111)];const _0x2eb70c=_0x3604d8,_0x25d5dd=_0x2eb70c[_0x2a4155(0x88)]||_0x11ef35['UUNiW'](String,_0x3604d8),_0x1bc596=_0x25d5dd['includes'](_0x11ef35[_0x2a4155(0xde)])||_0x2eb70c['name']===_0x11ef35[_0x2a4155(0x8a)]||_0x25d5dd['includes'](_0x11ef35['csBgQ']);return{'ok':![],'error':_0x25d5dd,'isProtocolError':_0x1bc596};}}async function sweepOrphanLocalProfile(_0x5e5b82,_0xeabd0d,_0x1cbfc7){const _0x140367=_0x1ccb,_0x185369={'SoFXM':function(_0x10b09d,_0x1d374c,_0x290600){return _0x10b09d(_0x1d374c,_0x290600);},'hCjgR':function(_0x538460,_0x5e7b3a){return _0x538460(_0x5e7b3a);},'qgEKO':function(_0xb5b0c7,_0xd18ccc){return _0xb5b0c7(_0xd18ccc);},'pFxmR':function(_0x174c83,_0xc313b5,_0x1a0379){return _0x174c83(_0xc313b5,_0x1a0379);}},_0x4b5944=join(_0xeabd0d,'local'),_0x3e8b50=_0x185369[_0x140367(0xc9)](join,_0x4b5944,_0x5e5b82);_0x185369['hCjgR'](existsSync,_0x3e8b50)&&(_0x1cbfc7&&await isPathGitTracked(_0x3e8b50)?console['log'](_0x140367(0x8c)+_0x3e8b50+_0x140367(0x107)):(await rm(_0x3e8b50,{'recursive':!![],'force':!![]}),console[_0x140367(0x10f)](_0x140367(0xf4)+_0x3e8b50)));if(_0x185369['hCjgR'](existsSync,_0x4b5944)){let _0x89aa95=[];try{_0x89aa95=await _0x185369['qgEKO'](readdir,_0x4b5944);}catch{return;}const _0x23a033=_0x140367(0xb2)+_0x5e5b82+'-';for(const _0x407ac1 of _0x89aa95){if(!_0x407ac1['startsWith'](_0x23a033))continue;const _0x31ba5f=join(_0x4b5944,_0x407ac1);await _0x185369[_0x140367(0xeb)](rm,_0x31ba5f,{'recursive':!![],'force':!![]}),console['log'](_0x140367(0xf4)+_0x31ba5f);}}}async function sweepOrphansBestEffort(_0x440035){const _0xc56261=_0x1ccb,_0x217fb6={'hrKWm':function(_0x46d4d6){return _0x46d4d6();},'HvCFR':function(_0x553ae9,_0x53b556){return _0x553ae9!==_0x53b556;},'ZnBII':function(_0x426c61,_0x5826f2,_0x533f72,_0x2934bf){return _0x426c61(_0x5826f2,_0x533f72,_0x2934bf);},'sXZUY':function(_0x282eff,_0x5b8dc1){return _0x282eff(_0x5b8dc1);}};try{await sweepOrphanLocalProfile(_0x440035,_0x217fb6[_0xc56261(0xa5)](getRangerHomeDir),![]);const _0x142d42=getRangerDir();_0x217fb6[_0xc56261(0xa3)](_0x142d42,getRangerHomeDir())&&await _0x217fb6['ZnBII'](sweepOrphanLocalProfile,_0x440035,_0x142d42,!![]);}catch(_0x138f89){console['log']('\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20('+(_0x138f89 instanceof Error?_0x138f89[_0xc56261(0x88)]:_0x217fb6['sXZUY'](String,_0x138f89))+').');}}function _0x2219(){const _0x2d9354=['NODE_TLS_REJECT_UNAUTHORIZED','qEsLf','6lMjugY','kclsx','Continue\x20anyway','dLzxO','message','wzYau','KlFOH','\x27\x20to\x20the\x20cloud?','\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20','Invalid\x20--setup-header\x20format:\x20\x22','txMRn','fetch\x20failed','2728770xuwigC','The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a','16blepca','JaZwt','HEAD','profile.add.autoRouted','signal','FePJk','PQuEB','\x20\x20Did\x20you\x20mean\x20','Xgeql','test','What\x20would\x20you\x20like\x20to\x20do?','xrCQW','url','TwaaD','gKzkh','\x20--url\x20','kkoed','HvCFR','keys','hrKWm','\x20\x20Set\x20active\x20profile:\x20','4ccNraG','some','\x27\x20matching\x20','ZfHFa','setupHeader','kBUVw','xrBCT','length',')\x0a\x20\x20Save\x20\x27','--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','1480024FaajiJ','.tmp-','\x0a\x20\x20Could\x20not\x20reach\x20','bnsnM','MgsgD','jHgTj','join','⚠\x20Could\x20not\x20reach\x20','sHMnE','\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a','7350427YnHeDf','wtSaj','jvnDh','Invalid\x20URL','http://localhost:3000','yarPX','QTDMC','EYenb','1956807zxjItH','\x0a\x20\x20A\x20cloud\x20profile\x20named\x20\x22','list','XcqtM','env','no_auth_config','SoFXM','Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','exit','\x22.\x20Expected\x20\x22Name:\x20Value\x22.','MBqnO','Ibpju','\x20(continuing\x20with\x20--force)','input','environments','status','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','Could\x20not\x20reach\x20','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.','OuabX','imANl','yes','\x20\x20Next:\x20set\x20RANGER_TEST_USERNAME\x20/\x20RANGER_TEST_PASSWORD\x20and\x20run\x0a','bpbfQ','\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20','\x0a\x20\x20No\x20auth\x20env\x20matches\x20','capture','iAEex','✓\x20Cloud\x20profile\x20\x27','\x20\x20\x20\x20\x20\x20\x20\x20`ranger\x20go\x20--profile\x20','YCyOG','Enter\x20a\x20different\x20URL','isElectron','Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','profile.add.autoRouteSkipped','confirm','ePeOx','96128weuRni','setupHeaders','baseUrl','pFxmR','ayCTd','\x20\x20Next:\x20ranger\x20go\x20--profile\x20','What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','lJnxI','gUehO','DkwVS','retry','axsfL','\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20','trackPhaseEnd','HTTP\x20','error','nZdzE','krgql','use_suggestion','no_match','5243545yvivPo','\x0a🌐\x20Profile\x20Setup\x0a','cwd','skipAuth','\x27\x20created\x20with\x20a\x20captured\x20session.\x0a','continue','yQAEn','trim','28594010ENlQoD','\x0a\x20\x20Still\x20could\x20not\x20reach\x20','origin','\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.','force','\x27\x20created\x20(CDP).','aGFoN','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a','\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a','cdpEndpoint','\x22:\x20','log','isTTY'];_0x2219=function(){return _0x2d9354;};return _0x2219();}async function markActive(_0x250ec2){const _0x184ba5=_0x1ccb,_0x2a0e0d={'dLzxO':function(_0x30b422,_0x170d77){return _0x30b422(_0x170d77);},'Ztueq':'Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.'};try{await _0x2a0e0d[_0x184ba5(0x87)](writeActiveProfileName,_0x250ec2),console[_0x184ba5(0x10f)](_0x184ba5(0xa6)+_0x250ec2);}catch{console['log'](_0x2a0e0d['Ztueq']);}}async function tryAutoRouteCloudProfile(_0x447e81,_0x5878c9,_0x38354b,_0x5b3ef5,_0x368810){const _0x1920b3=_0x1ccb,_0x33210f={'sHMnE':function(_0x1f6e0c,_0x4ebbe8){return _0x1f6e0c===_0x4ebbe8;},'FePJk':_0x1920b3(0xc8),'Xgeql':function(_0x3f159e,_0x3fd1c1){return _0x3f159e instanceof _0x3fd1c1;},'yarPX':function(_0x246f33,_0x56d696){return _0x246f33(_0x56d696);},'aGFoN':function(_0x2d93e9,_0x161fb4){return _0x2d93e9===_0x161fb4;},'qEsLf':function(_0x32a397,_0x1ab38c,_0x5b74b6,_0x42ff68,_0x48c06c){return _0x32a397(_0x1ab38c,_0x5b74b6,_0x42ff68,_0x48c06c);},'krgql':function(_0x47ede0,_0x104a5c){return _0x47ede0+_0x104a5c;},'THoUJ':function(_0x296fec,_0x1041a7){return _0x296fec+_0x1041a7;},'yQAEn':'\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','MgsgD':'\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a','jvnDh':'\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','JaZwt':_0x1920b3(0xfb),'TnWJD':'confirm','EYenb':'profile.add.autoRouteSkipped','DJpIi':_0x1920b3(0xd5),'ayCTd':function(_0x5bc77f,_0x46337d,_0x51345e,_0x45dea3){return _0x5bc77f(_0x46337d,_0x51345e,_0x45dea3);},'QTDMC':_0x1920b3(0x95)};let _0x128996;try{_0x128996=await fetchAuthConfig();}catch(_0x33322f){return _0x368810?.[_0x1920b3(0xf5)](_0x1920b3(0xe5),{'reason':_0x33210f[_0x1920b3(0x97)],'profileName':_0x447e81}),console['error'](_0x1920b3(0xdb)+(_0x33210f[_0x1920b3(0x9a)](_0x33322f,Error)?_0x33322f[_0x1920b3(0x88)]:_0x33210f[_0x1920b3(0xc0)](String,_0x33322f))),![];}if(!_0x128996||!_0x128996[_0x1920b3(0xd1)]||_0x33210f[_0x1920b3(0x10a)](Object['keys'](_0x128996['environments'])[_0x1920b3(0xae)],0x0)){if(_0x5b3ef5)return await _0x33210f[_0x1920b3(0x112)](captureEnvLessProfile,_0x447e81,_0x5878c9,_0x38354b,_0x368810);return _0x368810?.[_0x1920b3(0xf5)](_0x1920b3(0xe5),{'reason':_0x1920b3(0xc8),'profileName':_0x447e81}),console['error'](_0x33210f['krgql'](_0x33210f['THoUJ'](_0x33210f[_0x1920b3(0xf9)](_0x33210f[_0x1920b3(0x102)],'\x0a')+_0x33210f[_0x1920b3(0xb5)],'\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20'+_0x447e81+_0x1920b3(0xa1)+_0x5878c9+'\x20--skip-auth\x0a')+'\x0a'+_0x1920b3(0xba),_0x33210f[_0x1920b3(0xbd)])),![];}const _0x516b82=matchAuthEnvironment(_0x5878c9,_0x128996);if(!_0x516b82)return _0x368810?.[_0x1920b3(0xf5)](_0x1920b3(0xe5),{'reason':_0x33210f[_0x1920b3(0x93)],'profileName':_0x447e81}),console[_0x1920b3(0xf7)](_0x1920b3(0xdc)+_0x5878c9+'.\x20Configured\x20envs:\x20'+Object[_0x1920b3(0xa4)](_0x128996['environments'])[_0x1920b3(0xb7)](',\x20')+'.'),![];const _0x4551c1=_0x128996['environments'][_0x516b82],_0x4182ad=_0x4551c1?.['domains']??[];if(_0x5b3ef5&&!_0x38354b[_0x1920b3(0xd8)]){const {saveToCloud:_0x29a338}=await _0x2dcd12['prompt']([{'type':_0x33210f['TnWJD'],'name':'saveToCloud','message':'Found\x20auth\x20environment\x20\x27'+_0x516b82+_0x1920b3(0xa9)+_0x5878c9+'\x0a\x20\x20(domains:\x20'+_0x4182ad[_0x1920b3(0xb7)](',\x20')+_0x1920b3(0xaf)+_0x447e81+_0x1920b3(0x8b),'default':!![]}]);if(!_0x29a338)return _0x368810?.[_0x1920b3(0xf5)](_0x33210f[_0x1920b3(0xc2)],{'reason':'user_declined','profileName':_0x447e81}),console['error'](_0x33210f['DJpIi']),![];}const _0x4c4f29=_0x4182ad[_0x1920b3(0xa8)](_0x409d86=>{const _0x53434d=_0x1920b3;try{return _0x33210f[_0x53434d(0xb9)](new URL(_0x409d86)[_0x53434d(0x106)],new URL(_0x5878c9)[_0x53434d(0x106)]);}catch{return![];}}),_0x28d251={};!_0x4c4f29&&(_0x28d251[_0x1920b3(0xea)]=_0x5878c9);try{await _0x33210f[_0x1920b3(0xec)](createCloudProfile,_0x447e81,_0x516b82,{'settings':_0x28d251});}catch(_0x17e423){if(_0x17e423 instanceof ApiError&&_0x17e423[_0x1920b3(0xd2)]===0x199){console[_0x1920b3(0xf7)]('\x0a\x20\x20A\x20cloud\x20profile\x20named\x20\x22'+_0x447e81+'\x22\x20already\x20exists.\x20Choose\x20a\x20different\x20name\x20or\x20delete\x20the\x20existing\x20profile\x20first.');throw _0x17e423;}throw _0x17e423;}return console[_0x1920b3(0x10f)]('✓\x20Profile\x20\x27'+_0x447e81+'\x27\x20created.\x0a'+(_0x1920b3(0xed)+_0x447e81)),await _0x33210f[_0x1920b3(0xc0)](sweepOrphansBestEffort,_0x447e81),_0x368810?.[_0x1920b3(0xf5)](_0x33210f[_0x1920b3(0xc1)],{'envKey':_0x516b82,'profileName':_0x447e81}),!![];}async function createUnconfiguredCloudProfile(_0x20addb,_0x4358bf){const _0x1bdc91=_0x1ccb,_0x320df2={'oIGXQ':function(_0x3084b9,_0x122c82){return _0x3084b9 instanceof _0x122c82;}};try{await createCloudProfile(_0x20addb,undefined,{'settings':_0x4358bf});}catch(_0x130e1d){_0x320df2['oIGXQ'](_0x130e1d,ApiError)&&_0x130e1d['status']===0x199&&console[_0x1bdc91(0xf7)](_0x1bdc91(0xc4)+_0x20addb+'\x22\x20already\x20exists.\x20Choose\x20a\x20different\x20name\x20or\x20delete\x20the\x20existing\x20profile\x20first.');throw _0x130e1d;}}async function captureEnvLessProfile(_0x39e272,_0x1895c0,_0x364ba2,_0x1521af){const _0x151706=_0x1ccb,_0x130dc1={'MBqnO':_0x151706(0xe6),'hUaCL':_0x151706(0xdd),'YCyOG':function(_0x5cb051,_0x40e937){return _0x5cb051+_0x40e937;},'OuabX':function(_0xfd80d2,_0xab010a,_0x311619,_0x33aa8d){return _0xfd80d2(_0xab010a,_0x311619,_0x33aa8d);},'LLzjZ':function(_0x305a9c,_0x449fce){return _0x305a9c instanceof _0x449fce;},'PpMpP':function(_0x5db77c,_0xe07b64){return _0x5db77c===_0xe07b64;},'jHgTj':function(_0x2de723,_0x4336d4,_0x3fd26e){return _0x2de723(_0x4336d4,_0x3fd26e);},'cJkfR':function(_0x18b19a,_0x34dba6){return _0x18b19a>_0x34dba6;},'bpbfQ':function(_0x5240a6,_0x1fd886){return _0x5240a6+_0x1fd886;}};if(!_0x364ba2['yes']){const {capture:_0x480b48}=await _0x2dcd12['prompt']([{'type':_0x130dc1[_0x151706(0xcd)],'name':_0x130dc1['hUaCL'],'message':_0x151706(0xe4),'default':!![]}]);if(!_0x480b48)return _0x1521af?.['trackPhaseEnd'](_0x151706(0xe5),{'reason':'user_declined','profileName':_0x39e272}),console[_0x151706(0xf7)](_0x151706(0x10b)+'\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.'),![];}const _0x1d7c67={};if(_0x364ba2['setupHeader'])for(const _0x2e1c96 of _0x364ba2['setupHeader']){const _0x57c77f=_0x2e1c96['indexOf'](':');if(_0x57c77f===-0x1)continue;_0x1d7c67[_0x2e1c96['slice'](0x0,_0x57c77f)['trim']()]=_0x2e1c96['slice'](_0x130dc1[_0x151706(0xe1)](_0x57c77f,0x1))[_0x151706(0x103)]();}const _0x5743d9={'baseUrl':_0x1895c0};Object[_0x151706(0xa4)](_0x1d7c67)['length']>0x0&&(_0x5743d9[_0x151706(0xe9)]=_0x1d7c67);let _0x4dd9ac;try{_0x4dd9ac=await _0x130dc1[_0x151706(0xd6)](createCloudProfile,_0x39e272,undefined,{'settings':_0x5743d9});}catch(_0x58c7fe){_0x130dc1['LLzjZ'](_0x58c7fe,ApiError)&&_0x130dc1['PpMpP'](_0x58c7fe['status'],0x199)&&console[_0x151706(0xf7)]('\x0a\x20\x20A\x20cloud\x20profile\x20named\x20\x22'+_0x39e272+'\x22\x20already\x20exists.\x20Choose\x20a\x20different\x20name\x20or\x20delete\x20the\x20existing\x20profile\x20first.');throw _0x58c7fe;}return await _0x130dc1[_0x151706(0xb6)](manualBrowserLogin,_0x4dd9ac,{'key':'','domains':[_0x1895c0],'setupHeaders':_0x130dc1['cJkfR'](Object['keys'](_0x1d7c67)['length'],0x0)?_0x1d7c67:undefined}),console[_0x151706(0x10f)](_0x130dc1[_0x151706(0xda)]('\x0a✓\x20Profile\x20\x27'+_0x39e272+_0x151706(0x100),'\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x39e272)),await sweepOrphansBestEffort(_0x39e272),_0x1521af?.['trackPhaseEnd'](_0x151706(0x95),{'envKey':null,'profileName':_0x39e272}),!![];}export async function addEnv(_0x4fa0bd,_0x3d073b={},_0x56a1b3){const _0x2e6b85=_0x1ccb,_0x26c769={'lJnxI':function(_0x26d8d6,_0x179df6){return _0x26d8d6+_0x179df6;},'Pqabr':function(_0xd9e6b,_0x1f0bd8){return _0xd9e6b+_0x1f0bd8;},'ZfHFa':'To\x20set\x20up\x20a\x20profile,\x20run:\x0a','imANl':'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','NUHuu':'\x20\x20https://docs.ranger.net/main/concepts/profiles','wtSaj':function(_0x2bea53,_0x36b018){return _0x2bea53===_0x36b018;},'EpyCD':_0x2e6b85(0xb0),'ePeOx':'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','Ibpju':'\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','PQuEB':function(_0x3d6605,_0x2b73fb){return _0x3d6605>_0x2b73fb;},'FlDYW':function(_0x2473bf,_0x3e9edc,_0x3f6057){return _0x2473bf(_0x3e9edc,_0x3f6057);},'xrCQW':'cdpEndpoint','EdvDf':function(_0x3d3922,_0x9d17cd,_0x3f14cf,_0x56cb73,_0x1e8a3c){return _0x3d3922(_0x9d17cd,_0x3f14cf,_0x56cb73,_0x1e8a3c);},'bnsnM':function(_0x5af2f1,_0x22ccde){return _0x5af2f1(_0x22ccde);},'xrBCT':function(_0x164e3e,_0x31b467){return _0x164e3e(_0x31b467);},'gUehO':function(_0x455e38,_0x4dc206,_0x28ce7f){return _0x455e38(_0x4dc206,_0x28ce7f);},'EGviA':function(_0x148a25,_0x42e53f){return _0x148a25+_0x42e53f;},'wmtnA':function(_0x51d2e5,_0x4db55e){return _0x51d2e5(_0x4db55e);},'gKzkh':function(_0x131c32,_0x45616d){return _0x131c32(_0x45616d);},'wzYau':_0x2e6b85(0xfd),'TwaaD':_0x2e6b85(0xd3),'kclsx':_0x2e6b85(0x10c),'DkwVS':_0x2e6b85(0xd0),'zXcyw':'baseUrl','nZdzE':function(_0x9739e1,_0x419053){return _0x9739e1||_0x419053;},'syxtj':_0x2e6b85(0xc5),'SsXXR':'action','XcqtM':_0x2e6b85(0x9c),'kkoed':_0x2e6b85(0xe2),'FJiYd':_0x2e6b85(0x86),'kBUVw':_0x2e6b85(0x101),'WlzHE':function(_0x4edd42,_0x44f5a9){return _0x4edd42 instanceof _0x44f5a9;}};_0x3d073b['ci']&&(console[_0x2e6b85(0xf7)](_0x26c769[_0x2e6b85(0xef)](_0x26c769['Pqabr'](_0x2e6b85(0x91)+'for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a'+'\x0a'+_0x26c769[_0x2e6b85(0xaa)]+'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','\x0a')+_0x26c769[_0x2e6b85(0xd7)],_0x26c769['NUHuu'])),process['exit'](0x1));const _0x2dc22c={};if(_0x3d073b['setupHeader'])for(const _0x40826d of _0x3d073b[_0x2e6b85(0xab)]){const _0x1df92b=_0x40826d['indexOf'](':');if(_0x26c769[_0x2e6b85(0xbc)](_0x1df92b,-0x1))throw new Error(_0x2e6b85(0x8d)+_0x40826d+_0x2e6b85(0xcc));const _0x5cb754=_0x40826d['slice'](0x0,_0x1df92b)['trim'](),_0x5103c5=_0x40826d['slice'](_0x1df92b+0x1)['trim']();_0x2dc22c[_0x5cb754]=_0x5103c5;}if(_0x3d073b[_0x2e6b85(0x10d)]!==undefined&&_0x3d073b[_0x2e6b85(0x10d)]['trim']()==='')throw new Error('--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222');if(_0x3d073b[_0x2e6b85(0x10d)]&&_0x3d073b['url'])throw new Error(_0x26c769['EpyCD']);const _0x2e41b8=Boolean(_0x3d073b['cdpEndpoint']),_0x11af3c=process['stdin'][_0x2e6b85(0x110)]&&process['stdout'][_0x2e6b85(0x110)];if(!_0x11af3c&&!_0x3d073b['url']&&!_0x2e41b8&&!_0x3d073b[_0x2e6b85(0xff)])throw new Error(_0x26c769[_0x2e6b85(0xe7)]);if(_0x2e41b8){const _0x500b55=_0x3d073b[_0x2e6b85(0x10d)];console['log'](_0x26c769[_0x2e6b85(0xce)]),console['log']('\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20'+_0x500b55);const _0x2fc88f={'cdpEndpoint':_0x500b55,'isElectron':!![]};_0x26c769[_0x2e6b85(0x98)](Object[_0x2e6b85(0xa4)](_0x2dc22c)['length'],0x0)&&(_0x2fc88f['setupHeaders']=_0x2dc22c);await _0x26c769['FlDYW'](createUnconfiguredCloudProfile,_0x4fa0bd,_0x2fc88f);try{setProfileOverride(process[_0x2e6b85(0xfe)](),_0x4fa0bd,_0x26c769[_0x2e6b85(0x9d)],_0x500b55),_0x26c769['EdvDf'](setProfileOverride,process['cwd'](),_0x4fa0bd,_0x2e6b85(0xe3),!![]);}catch(_0x5a57b1){console['error']('\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20'+(_0x5a57b1 instanceof Error?_0x5a57b1[_0x2e6b85(0x88)]:_0x26c769[_0x2e6b85(0xb4)](String,_0x5a57b1)));}console[_0x2e6b85(0x10f)](_0x2e6b85(0xdf)+_0x4fa0bd+_0x2e6b85(0x109)),await _0x26c769[_0x2e6b85(0xad)](sweepOrphansBestEffort,_0x4fa0bd),await markActive(_0x4fa0bd);return;}if(_0x3d073b[_0x2e6b85(0xff)]){const _0x18aab2={};_0x3d073b[_0x2e6b85(0x9e)]&&(_0x18aab2['baseUrl']=_0x3d073b['url']);Object['keys'](_0x2dc22c)['length']>0x0&&(_0x18aab2['setupHeaders']=_0x2dc22c);await _0x26c769[_0x2e6b85(0xf0)](createUnconfiguredCloudProfile,_0x4fa0bd,_0x18aab2),console['log'](_0x26c769['EGviA'](_0x26c769['lJnxI'](_0x2e6b85(0xdf)+_0x4fa0bd+'\x27\x20created\x20with\x20no\x20session.\x0a',_0x2e6b85(0xd9)),_0x2e6b85(0xe0)+_0x4fa0bd+'`\x0a')+'\x20\x20\x20\x20\x20\x20\x20\x20to\x20materialize\x20a\x20session\x20via\x20server-side\x20login.'),await sweepOrphansBestEffort(_0x4fa0bd),await _0x26c769['wmtnA'](markActive,_0x4fa0bd);return;}if(_0x3d073b[_0x2e6b85(0x9e)]){const _0x8c23ee=_0x3d073b[_0x2e6b85(0x9e)],_0x12f688=await _0x26c769[_0x2e6b85(0xa0)](checkUrlReachability,_0x8c23ee);if(!_0x12f688['ok']&&!_0x3d073b['force'])throw new Error(_0x2e6b85(0xd4)+_0x8c23ee+':\x20'+_0x12f688['error']+'\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.');!_0x12f688['ok']&&_0x3d073b[_0x2e6b85(0x108)]&&console['log'](_0x2e6b85(0xb8)+_0x8c23ee+':\x20'+_0x12f688['error']+_0x2e6b85(0xcf));}else{console['log'](_0x26c769[_0x2e6b85(0x89)]),console['log'](_0x26c769[_0x2e6b85(0x9f)]),console['log'](_0x26c769[_0x2e6b85(0x114)]);let _0x322f1a='',_0x34da02=![];while(!![]){const _0x107810=await _0x2dcd12['prompt']([{'type':_0x26c769[_0x2e6b85(0xf1)],'name':_0x26c769['zXcyw'],'message':_0x34da02?_0x2e6b85(0xca):_0x2e6b85(0xee),'default':_0x26c769[_0x2e6b85(0xf8)](_0x322f1a,_0x2e6b85(0xbf))}]);_0x322f1a=_0x107810['baseUrl'];const _0x515a41=await checkUrlReachability(_0x322f1a);if(_0x515a41['ok'])break;const _0x579109=/^[a-zA-Z][\w+.-]*:\/\//[_0x2e6b85(0x9b)](_0x322f1a),_0x4d5d8e=_0x515a41['isProtocolError']&&!_0x579109,_0xe6d345=_0x4d5d8e?'http://'+_0x322f1a:null;_0x34da02=!![],console[_0x2e6b85(0x10f)](_0x2e6b85(0xb3)+_0x322f1a+':\x20'+_0x515a41[_0x2e6b85(0xf7)]);_0xe6d345&&console[_0x2e6b85(0x10f)](_0x2e6b85(0x99)+_0xe6d345+'?');const {action:_0x47f4aa}=await _0x2dcd12['prompt']([{'type':_0x26c769['syxtj'],'name':_0x26c769['SsXXR'],'message':_0x26c769[_0x2e6b85(0xc6)],'choices':[..._0xe6d345?[{'name':'Use\x20'+_0xe6d345,'value':_0x2e6b85(0xfa)}]:[],{'name':_0x26c769[_0x2e6b85(0xa2)],'value':_0x2e6b85(0xf2)},{'name':_0x26c769['FJiYd'],'value':_0x26c769['kBUVw']}]}]);if(_0x26c769['wtSaj'](_0x47f4aa,_0x2e6b85(0xfa))&&_0xe6d345){_0x322f1a=_0xe6d345;const _0x5701f5=await checkUrlReachability(_0x322f1a);if(_0x5701f5['ok'])break;console['log'](_0x2e6b85(0x105)+_0x322f1a+':\x20'+_0x5701f5[_0x2e6b85(0xf7)]);}else{if(_0x26c769['wtSaj'](_0x47f4aa,_0x26c769[_0x2e6b85(0xac)]))break;}}_0x3d073b={..._0x3d073b,'url':_0x322f1a};}let _0x534787=![];try{_0x534787=await tryAutoRouteCloudProfile(_0x4fa0bd,_0x3d073b['url'],_0x3d073b,_0x11af3c,_0x56a1b3);}catch(_0x2729d3){console['error']('\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22'+_0x4fa0bd+_0x2e6b85(0x10e)+(_0x26c769['WlzHE'](_0x2729d3,Error)?_0x2729d3[_0x2e6b85(0x88)]:String(_0x2729d3))),process[_0x2e6b85(0xcb)](0x1);}!_0x534787&&process['exit'](0x1),await markActive(_0x4fa0bd);}
@@ -1 +1 @@
1
- (function(_0x19fc95,_0xf24bb0){var _0x43bb37=_0x5d38,_0x4622b3=_0x19fc95();while(!![]){try{var _0x39d308=parseInt(_0x43bb37(0x1dd))/0x1*(-parseInt(_0x43bb37(0x1db))/0x2)+parseInt(_0x43bb37(0x1da))/0x3+parseInt(_0x43bb37(0x1d3))/0x4+parseInt(_0x43bb37(0x1d2))/0x5*(-parseInt(_0x43bb37(0x1e2))/0x6)+-parseInt(_0x43bb37(0x1d8))/0x7*(-parseInt(_0x43bb37(0x1d1))/0x8)+parseInt(_0x43bb37(0x1de))/0x9*(parseInt(_0x43bb37(0x1e0))/0xa)+parseInt(_0x43bb37(0x1d4))/0xb;if(_0x39d308===_0xf24bb0)break;else _0x4622b3['push'](_0x4622b3['shift']());}catch(_0x2ddb3f){_0x4622b3['push'](_0x4622b3['shift']());}}}(_0x4538,0x2066d));export async function authEncrypt(_0x33c39a){var _0x4a15e9=_0x5d38,_0x4f55b9={'ygiXI':function(_0x45fddd,_0xd6d6e){return _0x45fddd+_0xd6d6e;},'wLSdJ':function(_0x2bf04d,_0x52a5e){return _0x2bf04d+_0x52a5e;},'exagv':'For\x20SSO/headed\x20login:\x20ranger\x20profile\x20add\x20<account-email>\x0a','TDgFj':_0x4a15e9(0x1e1)};console[_0x4a15e9(0x1df)](_0x4f55b9['ygiXI'](_0x4f55b9['wLSdJ'](_0x4f55b9[_0x4a15e9(0x1d7)]('ranger\x20profile\x20encrypt-auth\x20writes\x20to\x20the\x20legacy\x20.ranger/ci/\x20tree\x20which\x20is\x20no\x20longer\x20supported.\x0a',_0x4a15e9(0x1d6))+'Use\x20the\x20new\x20flow:\x0a','\x20\x20RANGER_TEST_USERNAME=...\x20RANGER_TEST_PASSWORD=...\x20ranger\x20go\x20--base-url\x20<url>\x0a')+_0x4f55b9[_0x4a15e9(0x1d9)],_0x4f55b9[_0x4a15e9(0x1d5)])),process[_0x4a15e9(0x1dc)](0x1);}function _0x5d38(_0x479397,_0x28dc6d){_0x479397=_0x479397-0x1d1;var _0x4538eb=_0x4538();var _0x5d3866=_0x4538eb[_0x479397];return _0x5d3866;}function _0x4538(){var _0x197dc2=['9JOSMbc','666CVRgHx','error','34900aUwAUL','See:\x20docs/feature/cloud-profiles-old-vs-new-structure.md','6becFrZ','8UYHydw','674165sKqwXt','145828tEZWUL','279158gsynXD','TDgFj','Cloud\x20profiles\x20store\x20session\x20state\x20server-side;\x20encrypted\x20on-disk\x20auth\x20is\x20gone.\x0a','ygiXI','241948EYYdkL','exagv','25602rUhTQH','21254wmQXvP','exit'];_0x4538=function(){return _0x197dc2;};return _0x4538();}
1
+ (function(_0x9b9863,_0x1e064d){var _0x2162de=_0x13c0,_0x22e1ff=_0x9b9863();while(!![]){try{var _0x5bdb9f=-parseInt(_0x2162de(0x159))/0x1*(-parseInt(_0x2162de(0x162))/0x2)+parseInt(_0x2162de(0x15a))/0x3+parseInt(_0x2162de(0x156))/0x4+parseInt(_0x2162de(0x15f))/0x5*(parseInt(_0x2162de(0x15b))/0x6)+parseInt(_0x2162de(0x15e))/0x7+parseInt(_0x2162de(0x155))/0x8+-parseInt(_0x2162de(0x164))/0x9;if(_0x5bdb9f===_0x1e064d)break;else _0x22e1ff['push'](_0x22e1ff['shift']());}catch(_0x14dca7){_0x22e1ff['push'](_0x22e1ff['shift']());}}}(_0x130e,0x3bab6));export async function authEncrypt(_0x14089f){var _0x4809b6=_0x13c0,_0x56b860={'SDwNv':function(_0x4b64a6,_0x1bea46){return _0x4b64a6+_0x1bea46;},'yxCma':function(_0x4e2e26,_0x325481){return _0x4e2e26+_0x325481;},'iGnvG':_0x4809b6(0x158),'ocuPD':'session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a','FRMRa':_0x4809b6(0x15d),'EfpKm':'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a'};console['error'](_0x56b860['SDwNv'](_0x56b860[_0x4809b6(0x15c)](_0x56b860['iGnvG']+_0x56b860[_0x4809b6(0x163)],'\x0a')+'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a',_0x56b860['FRMRa'])+'\x0a'+_0x56b860[_0x4809b6(0x157)]+_0x4809b6(0x161)),process[_0x4809b6(0x160)](0x1);}function _0x13c0(_0x1f26e4,_0x33f115){_0x1f26e4=_0x1f26e4-0x155;var _0x130e16=_0x130e();var _0x13c049=_0x130e16[_0x1f26e4];return _0x13c049;}function _0x130e(){var _0x2893b0=['\x20\x20https://docs.ranger.net/main/concepts/profiles','85588yxQMLL','ocuPD','15885918HJgclQ','3473320gjVVJI','1477236IxgnoJ','EfpKm','ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','3lesGkS','1190985VayNtv','225678pXFarh','yxCma','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','2658271bZqDhR','40WkxOEZ','exit'];_0x130e=function(){return _0x2893b0;};return _0x130e();}
@@ -1 +1 @@
1
- const _0x59c348=_0x16aa;(function(_0x1db2e8,_0x48c158){const _0x532a99=_0x16aa,_0x459009=_0x1db2e8();while(!![]){try{const _0x1fc1d8=-parseInt(_0x532a99(0x1d9))/0x1*(-parseInt(_0x532a99(0x1de))/0x2)+-parseInt(_0x532a99(0x1b3))/0x3+parseInt(_0x532a99(0x1b7))/0x4*(parseInt(_0x532a99(0x1c6))/0x5)+-parseInt(_0x532a99(0x1b6))/0x6*(-parseInt(_0x532a99(0x1d4))/0x7)+parseInt(_0x532a99(0x1c5))/0x8+-parseInt(_0x532a99(0x1d5))/0x9*(-parseInt(_0x532a99(0x1df))/0xa)+parseInt(_0x532a99(0x1c3))/0xb*(-parseInt(_0x532a99(0x1e0))/0xc);if(_0x1fc1d8===_0x48c158)break;else _0x459009['push'](_0x459009['shift']());}catch(_0x2f1614){_0x459009['push'](_0x459009['shift']());}}}(_0x2d38,0x35498));import{rm,readFile,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';function _0x16aa(_0x231c3f,_0xab716d){_0x231c3f=_0x231c3f-0x1af;const _0x2d386c=_0x2d38();let _0x16aab0=_0x2d386c[_0x231c3f];return _0x16aab0;}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 _0x2d38(){const _0x3df5a2=['469170qwfwOf','kuZxp','error','bBwfc','11UMymtH','parse','CRyrj','dTDUW','hAmmS','19742TbCPux','20TOKwBl','6477756dfiHgw','tPYZD','rHIYP','✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','UYLpr','QQPOV','Hcqqz','log','USglo','ignore','platform','close','win32','marketplace','39894BPPHew','isArray','KDgjF','44706vARcZy','4zOItFS','claude','FpICW','plugin','BbsPu','UUdmb','lRCaJ','\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','feature-tracker','user','eyyyc','GXLYx','11CscilB','replace','901536kzInsj','1744895kxOccE','CdZDU','oIUYa','uninstall','VXkfW','length','✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)','✓\x20Removed\x20OpenCode\x20user\x20skill:\x20','rFUQK','IdLCj','BOJxr','✓\x20Removed\x20project\x20skill:\x20','stringify','nDGEj','91RrdcHp'];_0x2d38=function(){return _0x3df5a2;};return _0x2d38();}import{getOpencodeConfigDir,getOpencodeSkillsDir}from'./utils/opencodeConfig.js';const skillsToRemove=['ranger',_0x59c348(0x1bf),'bug-bash','e2e-test-recommender'],opencodePluginName='@ranger-testing/opencode-plugin';function parseJsonc(_0x5b8d26){const _0x2cda05=_0x59c348,_0x3800f3=_0x5b8d26['replace'](/\/\*[\s\S]*?\*\//g,''),_0x380abf=_0x3800f3[_0x2cda05(0x1c4)](/^\s*\/\/.*$/gm,''),_0x4fc25c=_0x380abf[_0x2cda05(0x1c4)](/,\s*([}\]])/g,'$1');return JSON[_0x2cda05(0x1da)](_0x4fc25c);}async function removeOpencodePluginConfig(_0x3288b4){const _0x154491=_0x59c348,_0x1240e3={'hKlzk':function(_0xc23dcb,_0xb01fd9){return _0xc23dcb!==_0xb01fd9;},'pNTKi':function(_0x370de0,_0x40adf1){return _0x370de0(_0x40adf1);},'wiXYK':function(_0x1548aa,_0x156608,_0x1db826){return _0x1548aa(_0x156608,_0x1db826);},'KZfdI':'utf-8','JSSAH':function(_0x172c9f,_0x3538b2){return _0x172c9f(_0x3538b2);},'IdLCj':function(_0x5709ec,_0x337fe9){return _0x5709ec===_0x337fe9;},'iuvKT':function(_0x158a65,_0x2960c4){return _0x158a65===_0x2960c4;}};if(!_0x1240e3['pNTKi'](existsSync,_0x3288b4))return![];let _0x1df23c;try{const _0x1544f9=await _0x1240e3['wiXYK'](readFile,_0x3288b4,_0x1240e3['KZfdI']);_0x1df23c=_0x1240e3['JSSAH'](parseJsonc,_0x1544f9);}catch{return![];}const _0x240aec=Array[_0x154491(0x1b4)](_0x1df23c['plugin'])?_0x1df23c[_0x154491(0x1ba)]:[];if(_0x1240e3[_0x154491(0x1cf)](_0x240aec[_0x154491(0x1cb)],0x0))return![];const _0x54d9f7=_0x240aec['filter'](_0x40609c=>{if(typeof _0x40609c!=='string')return!![];return _0x1240e3['hKlzk'](_0x40609c,opencodePluginName);});if(_0x1240e3[_0x154491(0x1cf)](_0x54d9f7[_0x154491(0x1cb)],_0x240aec[_0x154491(0x1cb)]))return![];return _0x1240e3['iuvKT'](_0x54d9f7['length'],0x0)?delete _0x1df23c[_0x154491(0x1ba)]:_0x1df23c[_0x154491(0x1ba)]=_0x54d9f7,await writeFile(_0x3288b4,JSON[_0x154491(0x1d2)](_0x1df23c,null,0x2)+'\x0a'),!![];}async function uninstallClaudePlugin(_0x11a42d){const _0xcd7bc=_0x59c348,_0x32cfba={'BOJxr':function(_0x38d650,_0x168cb5){return _0x38d650(_0x168cb5);},'tPYZD':'plugin','dTDUW':_0xcd7bc(0x1c9),'nJUhX':'ranger@trailhead','ozcBj':'--scope','UUdmb':function(_0x584266,_0x33c083,_0x7886b6,_0x199684){return _0x584266(_0x33c083,_0x7886b6,_0x199684);},'GXLYx':_0xcd7bc(0x1e9),'hAmmS':function(_0x5d2d37){return _0x5d2d37();},'kuZxp':_0xcd7bc(0x1b1),'Hcqqz':'close','UYLpr':_0xcd7bc(0x1d7)};return new Promise(_0x3bb09a=>{const _0x37778a=_0xcd7bc,_0x42fc9e=[_0x32cfba[_0x37778a(0x1e1)],_0x32cfba[_0x37778a(0x1dc)],_0x32cfba['nJUhX']];_0x11a42d&&_0x42fc9e['push'](_0x32cfba['ozcBj'],_0x11a42d);const _0x4fa61f=_0x32cfba[_0x37778a(0x1bc)](spawn,'claude',_0x42fc9e,{'stdio':[_0x32cfba['GXLYx'],_0x32cfba[_0x37778a(0x1c2)],'ignore'],'cwd':_0x11a42d?_0x32cfba[_0x37778a(0x1dd)](getProjectRoot):undefined,'shell':process[_0x37778a(0x1af)]===_0x32cfba[_0x37778a(0x1d6)]});_0x4fa61f['on'](_0x32cfba[_0x37778a(0x1e6)],_0x2a70b8=>{const _0x3d298d=_0x37778a;_0x32cfba[_0x3d298d(0x1d0)](_0x3bb09a,_0x2a70b8===0x0);}),_0x4fa61f['on'](_0x32cfba[_0x37778a(0x1e4)],()=>{_0x32cfba['BOJxr'](_0x3bb09a,![]);});});}async function removeMarketplace(){const _0x5ca7ea=_0x59c348,_0x465202={'tNptM':function(_0xa7296,_0x42a04e){return _0xa7296(_0x42a04e);},'KDgjF':function(_0x465f97,_0x1aaf5e){return _0x465f97===_0x1aaf5e;},'ukoZe':_0x5ca7ea(0x1b8),'lRCaJ':_0x5ca7ea(0x1ba),'nDGEj':_0x5ca7ea(0x1b2),'CRyrj':'trailhead','BbsPu':_0x5ca7ea(0x1e9),'QQPOV':_0x5ca7ea(0x1b0)};return new Promise(_0x565e56=>{const _0x11ff4a=_0x5ca7ea,_0x46f4d7={'Xzagd':function(_0x4c6970,_0x10e44e){return _0x465202['tNptM'](_0x4c6970,_0x10e44e);},'kDdUG':function(_0x4f0b4b,_0x45bc73){const _0x41cc69=_0x16aa;return _0x465202[_0x41cc69(0x1b5)](_0x4f0b4b,_0x45bc73);}},_0x348471=spawn(_0x465202['ukoZe'],[_0x465202[_0x11ff4a(0x1bd)],_0x465202[_0x11ff4a(0x1d3)],'remove',_0x465202[_0x11ff4a(0x1db)]],{'stdio':[_0x465202['BbsPu'],_0x465202[_0x11ff4a(0x1bb)],_0x465202['BbsPu']],'shell':process[_0x11ff4a(0x1af)]===_0x11ff4a(0x1b1)});_0x348471['on'](_0x465202[_0x11ff4a(0x1e5)],_0x26cb9c=>{_0x46f4d7['Xzagd'](_0x565e56,_0x46f4d7['kDdUG'](_0x26cb9c,0x0));}),_0x348471['on'](_0x11ff4a(0x1d7),()=>{_0x565e56(![]);});});}export async function clean(){const _0x13d74a=_0x59c348,_0x1fa483={'IdmCs':_0x13d74a(0x1be),'USglo':'✓\x20Removed\x20stored\x20credentials','CdZDU':function(_0x202684,_0x55830e){return _0x202684(_0x55830e);},'InwYx':function(_0x2b9f4c,_0x882526,_0x2fdf58){return _0x2b9f4c(_0x882526,_0x2fdf58);},'oIKwI':'✓\x20Removed\x20.ranger/\x20directory','VXkfW':function(_0xb83325,_0x25a014,_0x703344){return _0xb83325(_0x25a014,_0x703344);},'bBwfc':function(_0x4442cf){return _0x4442cf();},'ThRoF':function(_0x33b227,_0x4a58f1,_0x3289a6){return _0x33b227(_0x4a58f1,_0x3289a6);},'rFUQK':function(_0x56ad9d,_0x4a1a39,_0x21c759){return _0x56ad9d(_0x4a1a39,_0x21c759);},'ICzZz':function(_0x3343d4,_0x425a83,_0x3c1ebf){return _0x3343d4(_0x425a83,_0x3c1ebf);},'NhktB':function(_0x4abd8c,_0x16f32f,_0x385674){return _0x4abd8c(_0x16f32f,_0x385674);},'FSOfz':_0x13d74a(0x1c0),'EZDpE':'opencode.json','oIUYa':_0x13d74a(0x1cc),'TftZW':'project','eyyyc':_0x13d74a(0x1e3),'FpICW':'✓\x20Removed\x20trailhead\x20marketplace','rHIYP':'\x0a✅\x20Cleanup\x20complete!\x0a'};console[_0x13d74a(0x1e7)](_0x1fa483['IdmCs']);let _0x3b5eea=![];try{await deleteAllCredentials(),console['log'](_0x1fa483[_0x13d74a(0x1e8)]),_0x3b5eea=!![];}catch{}const _0xf76a31=getCacheFile();existsSync(_0xf76a31)&&(await _0x1fa483[_0x13d74a(0x1c7)](rm,_0xf76a31),_0x3b5eea=!![]);const _0xb80ae3=getRangerDir();_0x1fa483['CdZDU'](existsSync,_0xb80ae3)&&(await _0x1fa483['InwYx'](rm,_0xb80ae3,{'recursive':!![]}),console['log'](_0x1fa483['oIKwI']),_0x3b5eea=!![]);const _0x4bca53=getProjectSkillsDir();for(const _0x27c4ec of skillsToRemove){const _0x2749e0=_0x1fa483['VXkfW'](join,_0x4bca53,_0x27c4ec);existsSync(_0x2749e0)&&(await _0x1fa483[_0x13d74a(0x1ca)](rm,_0x2749e0,{'recursive':!![]}),console['log'](_0x13d74a(0x1d1)+_0x27c4ec),_0x3b5eea=!![]);}const _0x282f0b=_0x1fa483['bBwfc'](getUserSkillsDir);for(const _0x5b337c of skillsToRemove){const _0x3d7a22=_0x1fa483['ThRoF'](join,_0x282f0b,_0x5b337c);existsSync(_0x3d7a22)&&(await rm(_0x3d7a22,{'recursive':!![]}),console['log']('✓\x20Removed\x20user\x20skill:\x20'+_0x5b337c),_0x3b5eea=!![]);}const _0x50da42=_0x1fa483['CdZDU'](getOpencodeSkillsDir,'project');for(const _0x19f9a0 of skillsToRemove){const _0x27e1ae=_0x1fa483[_0x13d74a(0x1ce)](join,_0x50da42,_0x19f9a0);existsSync(_0x27e1ae)&&(await _0x1fa483['ICzZz'](rm,_0x27e1ae,{'recursive':!![]}),console[_0x13d74a(0x1e7)]('✓\x20Removed\x20OpenCode\x20project\x20skill:\x20'+_0x19f9a0),_0x3b5eea=!![]);}const _0x223c7c=_0x1fa483['CdZDU'](getOpencodeSkillsDir,'user');for(const _0x581474 of skillsToRemove){const _0x3d57d0=_0x1fa483['NhktB'](join,_0x223c7c,_0x581474);existsSync(_0x3d57d0)&&(await _0x1fa483['InwYx'](rm,_0x3d57d0,{'recursive':!![]}),console['log'](_0x13d74a(0x1cd)+_0x581474),_0x3b5eea=!![]);}const _0x590822=_0x1fa483['ICzZz'](join,getOpencodeConfigDir('project'),'opencode.json');await removeOpencodePluginConfig(_0x590822)&&(console['log']('✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)'),_0x3b5eea=!![]);const _0x2e8995=_0x1fa483[_0x13d74a(0x1ca)](join,_0x1fa483[_0x13d74a(0x1c7)](getOpencodeConfigDir,_0x1fa483['FSOfz']),_0x1fa483['EZDpE']);await _0x1fa483['CdZDU'](removeOpencodePluginConfig,_0x2e8995)&&(console[_0x13d74a(0x1e7)](_0x1fa483[_0x13d74a(0x1c8)]),_0x3b5eea=!![]);const _0x4b5755=await _0x1fa483[_0x13d74a(0x1d8)](uninstallClaudePlugin);_0x4b5755&&(console[_0x13d74a(0x1e7)]('✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)'),_0x3b5eea=!![]);const _0x10a2c4=await _0x1fa483[_0x13d74a(0x1c7)](uninstallClaudePlugin,_0x1fa483['TftZW']);_0x10a2c4&&(console[_0x13d74a(0x1e7)](_0x1fa483[_0x13d74a(0x1c1)]),_0x3b5eea=!![]);const _0xe5a66c=await _0x1fa483['bBwfc'](removeMarketplace);_0xe5a66c&&(console['log'](_0x1fa483[_0x13d74a(0x1b9)]),_0x3b5eea=!![]),_0x3b5eea?console['log'](_0x1fa483[_0x13d74a(0x1e2)]):console['log']('Nothing\x20to\x20clean\x20up.\x0a');}
1
+ const _0xc18fe5=_0x48e0;(function(_0x425b30,_0x463551){const _0x45febc=_0x48e0,_0x30b370=_0x425b30();while(!![]){try{const _0x17eeb7=parseInt(_0x45febc(0x149))/0x1+parseInt(_0x45febc(0x15b))/0x2+-parseInt(_0x45febc(0x161))/0x3+parseInt(_0x45febc(0x144))/0x4+-parseInt(_0x45febc(0x168))/0x5*(-parseInt(_0x45febc(0x140))/0x6)+-parseInt(_0x45febc(0x165))/0x7*(parseInt(_0x45febc(0x16a))/0x8)+parseInt(_0x45febc(0x151))/0x9*(parseInt(_0x45febc(0x15d))/0xa);if(_0x17eeb7===_0x463551)break;else _0x30b370['push'](_0x30b370['shift']());}catch(_0x4d93b1){_0x30b370['push'](_0x30b370['shift']());}}}(_0x2768,0xc9067));import{rm,readFile,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';function _0x48e0(_0x5d7bcc,_0x5defa3){_0x5d7bcc=_0x5d7bcc-0x13d;const _0x276862=_0x2768();let _0x48e0cf=_0x276862[_0x5d7bcc];return _0x48e0cf;}import{spawn}from'child_process';import{deleteAllCredentials}from'./utils/keychain.js';import{getProjectRoot,getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';function _0x2768(){const _0x2cc1f8=['length','user','--scope','bFGSe','replace','close','bug-bash','fALYv','80464VNsXlB','PFrka','18400lavCCT','marketplace','✓\x20Removed\x20trailhead\x20marketplace','yBGfl','1309401jItDXF','log','stringify','czAMU','7uhZXCI','GwewY','rEIQj','54850SXayTG','error','6058616SumJNE','fzFxB','filter','LStax','utf-8','QrBZi','HrquN','✓\x20Removed\x20OpenCode\x20user\x20skill:\x20','platform','e2e-test-recommender','414mqmpas','RJllJ','Nothing\x20to\x20clean\x20up.\x0a','ranger','83304CzAUHv','ujffC','ILnbf','xyimZ','isArray','325205Bvluns','plugin','string','ignore','\x0a✅\x20Cleanup\x20complete!\x0a','fttZW','claude','remove','4275pLfaMp','RzeBf'];_0x2768=function(){return _0x2cc1f8;};return _0x2768();}import{getRangerDir}from'./utils/rangerRoot.js';import{getCacheFile}from'./utils/sessionCache.js';import{getOpencodeConfigDir,getOpencodeSkillsDir}from'./utils/opencodeConfig.js';const skillsToRemove=[_0xc18fe5(0x143),'feature-tracker',_0xc18fe5(0x159),_0xc18fe5(0x13f)],opencodePluginName='@ranger-testing/opencode-plugin';function parseJsonc(_0x5879dd){const _0x5cb08=_0xc18fe5,_0x440a54=_0x5879dd[_0x5cb08(0x157)](/\/\*[\s\S]*?\*\//g,''),_0x8d6501=_0x440a54[_0x5cb08(0x157)](/^\s*\/\/.*$/gm,''),_0xeadee7=_0x8d6501[_0x5cb08(0x157)](/,\s*([}\]])/g,'$1');return JSON['parse'](_0xeadee7);}async function removeOpencodePluginConfig(_0x2781a6){const _0x11fdb3=_0xc18fe5,_0x406f11={'ujffC':function(_0x5b8f6f,_0x972abc){return _0x5b8f6f!==_0x972abc;},'bWEUE':function(_0x5bdbad,_0x2ac4e5){return _0x5bdbad(_0x2ac4e5);},'HrquN':function(_0x1b3dde,_0x11cc08){return _0x1b3dde===_0x11cc08;},'cVAwh':function(_0xc1be57,_0x296b14,_0x1f34a0){return _0xc1be57(_0x296b14,_0x1f34a0);}};if(!existsSync(_0x2781a6))return![];let _0x5ccdf9;try{const _0x37f69=await readFile(_0x2781a6,_0x11fdb3(0x16e));_0x5ccdf9=_0x406f11['bWEUE'](parseJsonc,_0x37f69);}catch{return![];}const _0x23f942=Array[_0x11fdb3(0x148)](_0x5ccdf9['plugin'])?_0x5ccdf9[_0x11fdb3(0x14a)]:[];if(_0x23f942[_0x11fdb3(0x153)]===0x0)return![];const _0xba61db=_0x23f942[_0x11fdb3(0x16c)](_0x3569a9=>{const _0x3f94e6=_0x11fdb3;if(_0x406f11[_0x3f94e6(0x145)](typeof _0x3569a9,_0x3f94e6(0x14b)))return!![];return _0x3569a9!==opencodePluginName;});if(_0x406f11[_0x11fdb3(0x170)](_0xba61db['length'],_0x23f942['length']))return![];return _0xba61db['length']===0x0?delete _0x5ccdf9[_0x11fdb3(0x14a)]:_0x5ccdf9[_0x11fdb3(0x14a)]=_0xba61db,await _0x406f11['cVAwh'](writeFile,_0x2781a6,JSON[_0x11fdb3(0x163)](_0x5ccdf9,null,0x2)+'\x0a'),!![];}async function uninstallClaudePlugin(_0x5a34a1){const _0x3294b7=_0xc18fe5,_0x4ab109={'YurWd':function(_0x3ba278,_0x5343b0){return _0x3ba278(_0x5343b0);},'rEIQj':_0x3294b7(0x14a),'BEnUR':'uninstall','PFrka':'ranger@trailhead','zKhQD':_0x3294b7(0x155),'QrBZi':function(_0xaa876e,_0x110161,_0x5074be,_0x515a08){return _0xaa876e(_0x110161,_0x5074be,_0x515a08);},'ZqUbJ':'ignore','hAywy':_0x3294b7(0x169)};return new Promise(_0x3e6eff=>{const _0x503409=_0x3294b7,_0x576e6c={'iRszR':function(_0x160c21,_0x5105a7){return _0x4ab109['YurWd'](_0x160c21,_0x5105a7);}},_0x4bf6ee=[_0x4ab109[_0x503409(0x167)],_0x4ab109['BEnUR'],_0x4ab109[_0x503409(0x15c)]];_0x5a34a1&&_0x4bf6ee['push'](_0x4ab109['zKhQD'],_0x5a34a1);const _0x170f4f=_0x4ab109[_0x503409(0x16f)](spawn,_0x503409(0x14f),_0x4bf6ee,{'stdio':[_0x503409(0x14c),_0x4ab109['ZqUbJ'],_0x4ab109['ZqUbJ']],'cwd':_0x5a34a1?getProjectRoot():undefined,'shell':process[_0x503409(0x13e)]==='win32'});_0x170f4f['on'](_0x503409(0x158),_0x4708be=>{_0x576e6c['iRszR'](_0x3e6eff,_0x4708be===0x0);}),_0x170f4f['on'](_0x4ab109['hAywy'],()=>{_0x3e6eff(![]);});});}async function removeMarketplace(){const _0x43b4c5=_0xc18fe5,_0xddee86={'ILnbf':_0x43b4c5(0x14c),'qFeDs':_0x43b4c5(0x158),'fttZW':'error'};return new Promise(_0x2176a9=>{const _0x40b408=_0x43b4c5,_0x14fa51={'bFGSe':function(_0x2abdf2,_0x12f69f){return _0x2abdf2(_0x12f69f);}},_0x2779c2=spawn(_0x40b408(0x14f),['plugin',_0x40b408(0x15e),_0x40b408(0x150),'trailhead'],{'stdio':[_0xddee86[_0x40b408(0x146)],_0x40b408(0x14c),_0xddee86['ILnbf']],'shell':process[_0x40b408(0x13e)]==='win32'});_0x2779c2['on'](_0xddee86['qFeDs'],_0x313863=>{_0x2176a9(_0x313863===0x0);}),_0x2779c2['on'](_0xddee86[_0x40b408(0x14e)],()=>{const _0x534cf0=_0x40b408;_0x14fa51[_0x534cf0(0x156)](_0x2176a9,![]);});});}export async function clean(){const _0x1821a7=_0xc18fe5,_0x51b337={'fzFxB':'\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','RJllJ':'✓\x20Removed\x20stored\x20credentials','xyimZ':function(_0x152f0c,_0x3e6dd6,_0x97c01c){return _0x152f0c(_0x3e6dd6,_0x97c01c);},'hsGmA':function(_0x2fe7b5,_0x17fdf3){return _0x2fe7b5(_0x17fdf3);},'tOjYx':function(_0x24e096,_0x3cd38f,_0x5907fe){return _0x24e096(_0x3cd38f,_0x5907fe);},'kwbYK':function(_0x1c44a0){return _0x1c44a0();},'yBGfl':function(_0x6e08a2,_0x15572b){return _0x6e08a2(_0x15572b);},'fALYv':'project','GwewY':function(_0x2f457f,_0x5124a7){return _0x2f457f(_0x5124a7);},'PlVcG':function(_0x1e1d11,_0x10e62b){return _0x1e1d11(_0x10e62b);},'egtyO':function(_0x1067db,_0x454894,_0x54317e){return _0x1067db(_0x454894,_0x54317e);},'wnmpA':function(_0x25d419,_0x4f3221){return _0x25d419(_0x4f3221);},'czAMU':'opencode.json','LStax':'✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','RzeBf':'✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','IOele':_0x1821a7(0x15f)};console['log'](_0x51b337[_0x1821a7(0x16b)]);let _0x3e5233=![];try{await deleteAllCredentials(),console['log'](_0x51b337[_0x1821a7(0x141)]),_0x3e5233=!![];}catch{}const _0x48666d=getCacheFile();existsSync(_0x48666d)&&(await rm(_0x48666d),_0x3e5233=!![]);const _0x224c35=getRangerDir();existsSync(_0x224c35)&&(await rm(_0x224c35,{'recursive':!![]}),console[_0x1821a7(0x162)]('✓\x20Removed\x20.ranger/\x20directory'),_0x3e5233=!![]);const _0xbbeb59=getProjectSkillsDir();for(const _0x4c6aca of skillsToRemove){const _0x3e3a69=_0x51b337[_0x1821a7(0x147)](join,_0xbbeb59,_0x4c6aca);_0x51b337['hsGmA'](existsSync,_0x3e3a69)&&(await _0x51b337['tOjYx'](rm,_0x3e3a69,{'recursive':!![]}),console[_0x1821a7(0x162)]('✓\x20Removed\x20project\x20skill:\x20'+_0x4c6aca),_0x3e5233=!![]);}const _0x58f668=_0x51b337['kwbYK'](getUserSkillsDir);for(const _0x3a3ece of skillsToRemove){const _0x1623d1=_0x51b337['tOjYx'](join,_0x58f668,_0x3a3ece);existsSync(_0x1623d1)&&(await rm(_0x1623d1,{'recursive':!![]}),console['log']('✓\x20Removed\x20user\x20skill:\x20'+_0x3a3ece),_0x3e5233=!![]);}const _0xdcafab=_0x51b337[_0x1821a7(0x160)](getOpencodeSkillsDir,_0x51b337[_0x1821a7(0x15a)]);for(const _0x1c19a4 of skillsToRemove){const _0x6e0d38=_0x51b337['xyimZ'](join,_0xdcafab,_0x1c19a4);_0x51b337[_0x1821a7(0x166)](existsSync,_0x6e0d38)&&(await rm(_0x6e0d38,{'recursive':!![]}),console['log']('✓\x20Removed\x20OpenCode\x20project\x20skill:\x20'+_0x1c19a4),_0x3e5233=!![]);}const _0x2a3871=_0x51b337[_0x1821a7(0x166)](getOpencodeSkillsDir,_0x1821a7(0x154));for(const _0x2e2b66 of skillsToRemove){const _0x38c46d=join(_0x2a3871,_0x2e2b66);_0x51b337['PlVcG'](existsSync,_0x38c46d)&&(await rm(_0x38c46d,{'recursive':!![]}),console['log'](_0x1821a7(0x13d)+_0x2e2b66),_0x3e5233=!![]);}const _0xd93dbd=_0x51b337['egtyO'](join,_0x51b337['wnmpA'](getOpencodeConfigDir,_0x51b337['fALYv']),_0x51b337['czAMU']);await removeOpencodePluginConfig(_0xd93dbd)&&(console[_0x1821a7(0x162)]('✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)'),_0x3e5233=!![]);const _0x1fa8d2=_0x51b337[_0x1821a7(0x147)](join,getOpencodeConfigDir('user'),_0x51b337[_0x1821a7(0x164)]);await _0x51b337['GwewY'](removeOpencodePluginConfig,_0x1fa8d2)&&(console['log']('✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)'),_0x3e5233=!![]);const _0x48b31e=await uninstallClaudePlugin();_0x48b31e&&(console['log'](_0x51b337[_0x1821a7(0x16d)]),_0x3e5233=!![]);const _0x4c3140=await _0x51b337['hsGmA'](uninstallClaudePlugin,'project');_0x4c3140&&(console['log'](_0x51b337[_0x1821a7(0x152)]),_0x3e5233=!![]);const _0x33d7f4=await removeMarketplace();_0x33d7f4&&(console[_0x1821a7(0x162)](_0x51b337['IOele']),_0x3e5233=!![]),_0x3e5233?console['log'](_0x1821a7(0x14d)):console['log'](_0x1821a7(0x142));}
@@ -1 +1 @@
1
- const _0x43a503=_0x34bc;(function(_0x5c6e40,_0x30ced7){const _0x1a068c=_0x34bc,_0x539ca3=_0x5c6e40();while(!![]){try{const _0x3a9807=-parseInt(_0x1a068c(0xe0))/0x1*(-parseInt(_0x1a068c(0xe2))/0x2)+parseInt(_0x1a068c(0xd5))/0x3*(parseInt(_0x1a068c(0xd9))/0x4)+-parseInt(_0x1a068c(0xdf))/0x5+-parseInt(_0x1a068c(0xd0))/0x6+-parseInt(_0x1a068c(0xc0))/0x7*(-parseInt(_0x1a068c(0xc2))/0x8)+parseInt(_0x1a068c(0xe7))/0x9+-parseInt(_0x1a068c(0xbc))/0xa;if(_0x3a9807===_0x30ced7)break;else _0x539ca3['push'](_0x539ca3['shift']());}catch(_0x44eb83){_0x539ca3['push'](_0x539ca3['shift']());}}}(_0x15af,0xd8c29));import{existsSync}from'fs';import{loadSettings,getNestedValue,deleteNestedValue,formatSettings,getSettingsPath,getEnvDir}from'./utils/settings.js';import{fetchCloudProfile}from'./utils/cloudProfile.js';import{mergeCloudProfileSettings,readProfileOverrides,resetProfileOverrides,setProfileOverride,unsetProfileOverride}from'./utils/projectsConfig.js';function _0x15af(){const _0x3b338c=['OcOBS','allowInsecureLocalhost','includes','headless','log','Cleared\x20local\x20overrides\x20for\x20\x22','10734300wkHhsh','AllWk','(not\x20set)','null','9381463TejdnP','peyFC','8lMtVSh','\x22\x20not\x20found','\x20for\x20\x22','true','No\x20configuration\x20set\x20for\x20\x22','faIuX','vNsOM','length','keys','xkfKV','alsoExistsElsewhere','PmRgw','endsWith','cloud','10483302qVkqRK','\x20<key>\x22\x20to\x20remove\x20individual\x20values.','EfdWd','\x20=\x20','undefined','18jkzshE','NpbMh','kind','bOpKu','975404yVshXw','\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22','cwd','gJqrr','startsWith','yppCJ','6516945PzZpBf','1plmPfG','Invalid\x20value\x20for\x20','3360982zursVB','Key\x20\x22',':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22','parse','JSCRi','4752711iDbVuv','object','Removed\x20'];_0x15af=function(){return _0x3b338c;};return _0x15af();}const BOOLEAN_KEYS=[_0x43a503(0xb9),_0x43a503(0xb7)];function parseLocalValue(_0x3bca43,_0x160a0e){const _0x3f680a=_0x43a503,_0x376ed4={'xkfKV':'false'};if(BOOLEAN_KEYS[_0x3f680a(0xb8)](_0x3bca43)){if(_0x160a0e==='true')return!![];if(_0x160a0e===_0x376ed4[_0x3f680a(0xcb)])return![];throw new Error(_0x3f680a(0xe1)+_0x3bca43+_0x3f680a(0xe4));}return _0x160a0e;}function parseOverrideValue(_0x99368d){const _0x255cb3=_0x43a503,_0x4b8e68={'RDfmI':function(_0x1d5b02,_0x560c5c){return _0x1d5b02===_0x560c5c;},'lqSfk':_0x255cb3(0xbf),'PmRgw':function(_0x404d97,_0x1728e6){return _0x404d97(_0x1728e6);}};if(_0x99368d===_0x255cb3(0xc5))return!![];if(_0x4b8e68['RDfmI'](_0x99368d,'false'))return![];if(_0x4b8e68['RDfmI'](_0x99368d,_0x4b8e68['lqSfk']))return null;if(_0x99368d===_0x255cb3(0xd4))return undefined;if(/^-?\d+$/['test'](_0x99368d)){const _0x44c923=Number(_0x99368d);if(Number['isSafeInteger'](_0x44c923))return _0x44c923;}if(/^-?\d+\.\d+$/['test'](_0x99368d)){const _0x3ae58f=_0x4b8e68[_0x255cb3(0xcd)](Number,_0x99368d);if(!Number['isNaN'](_0x3ae58f))return _0x3ae58f;}const _0x4dd56e=_0x99368d['trim']();if(_0x4dd56e[_0x255cb3(0xdd)]('{')&&_0x4dd56e[_0x255cb3(0xce)]('}')||_0x4dd56e[_0x255cb3(0xdd)]('[')&&_0x4dd56e[_0x255cb3(0xce)](']'))try{return JSON[_0x255cb3(0xe5)](_0x4dd56e);}catch{}return _0x99368d;}async function resolveProfileTarget(_0x3ea1c5){const _0x1f20ce=_0x43a503,_0x3b2d03={'FobQO':function(_0x4871ac,_0x39a3f2){return _0x4871ac(_0x39a3f2);},'OcOBS':function(_0x356060,_0x352dd7){return _0x356060(_0x352dd7);},'YdGNT':'local'},_0x36909f=existsSync(_0x3b2d03['FobQO'](getEnvDir,_0x3ea1c5));let _0x4185c3=![];try{const _0x55157e=await fetchCloudProfile(_0x3ea1c5);_0x4185c3=_0x3b2d03[_0x1f20ce(0xea)](Boolean,_0x55157e);}catch{}if(_0x4185c3)return{'kind':'cloud','alsoExistsElsewhere':_0x36909f};if(_0x36909f)return{'kind':_0x3b2d03['YdGNT'],'alsoExistsElsewhere':![]};throw new Error('Profile\x20\x22'+_0x3ea1c5+'\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20'+_0x3ea1c5);}function printDualExistsHint(_0x2bf9ce){console['log']('\x20\x20Note:\x20\x22'+_0x2bf9ce+'\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.');}function getProjectPath(){const _0x1bdc97=_0x43a503;return process[_0x1bdc97(0xdb)]();}async function loadEffectiveCloudSettings(_0x1e2b19){const _0x56a519=_0x43a503,_0x20b0cd={'bOpKu':function(_0x173a23,_0x2eceb2,_0x8fff22){return _0x173a23(_0x2eceb2,_0x8fff22);}},_0x15ff7a=await fetchCloudProfile(_0x1e2b19),_0x5aa38c=readProfileOverrides(getProjectPath(),_0x1e2b19);return _0x20b0cd[_0x56a519(0xd8)](mergeCloudProfileSettings,_0x15ff7a?.['settings']??{},_0x5aa38c??undefined);}export async function configSet(_0x4af076,_0x118ea5,_0x47427a){const _0x1b00bc=_0x43a503,_0x4ceea6={'gJqrr':function(_0x4b4708,_0x1b5c1a){return _0x4b4708(_0x1b5c1a);},'jeqAH':function(_0x52e1d0,_0x97054d){return _0x52e1d0===_0x97054d;},'ZgSAV':'cloud','Krvfg':function(_0x294db3,_0x3b0d30){return _0x294db3(_0x3b0d30);},'peyFC':function(_0x179bd1,_0x137f4a){return _0x179bd1(_0x137f4a);},'tRhwm':function(_0x37be95,_0x419f00,_0x4d460f,_0x1e6d75,_0x5a95b5){return _0x37be95(_0x419f00,_0x4d460f,_0x1e6d75,_0x5a95b5);}},_0x1ae772=await _0x4ceea6[_0x1b00bc(0xdc)](resolveProfileTarget,_0x4af076);if(_0x4ceea6['jeqAH'](_0x1ae772[_0x1b00bc(0xd7)],_0x4ceea6['ZgSAV'])){if(_0x1ae772[_0x1b00bc(0xcc)])_0x4ceea6['Krvfg'](printDualExistsHint,_0x4af076);const _0x1a70ec=_0x4ceea6[_0x1b00bc(0xc1)](parseOverrideValue,_0x47427a);_0x4ceea6['tRhwm'](setProfileOverride,getProjectPath(),_0x4af076,_0x118ea5,_0x1a70ec),console[_0x1b00bc(0xba)]('Set\x20'+_0x118ea5+'\x20=\x20'+JSON['stringify'](_0x1a70ec)+_0x1b00bc(0xc4)+_0x4af076+'\x22');return;}const _0x1a7f9c=parseLocalValue(_0x118ea5,_0x47427a);setProfileOverride(getProjectPath(),_0x4af076,_0x118ea5,_0x1a7f9c),console[_0x1b00bc(0xba)]('Set\x20'+_0x118ea5+_0x1b00bc(0xd3)+_0x1a7f9c+_0x1b00bc(0xc4)+_0x4af076+'\x22');}export async function configGet(_0x41e48f,_0x10fb84){const _0x468c7b=_0x43a503,_0x4f2671={'eCutU':function(_0xec18c6,_0xd3f863){return _0xec18c6(_0xd3f863);},'YDiHq':function(_0x5e94d0,_0x15591b){return _0x5e94d0===_0x15591b;},'faIuX':function(_0x148577,_0x4576b5){return _0x148577===_0x4576b5;},'UFFmU':function(_0x581380,_0x5e6f30){return _0x581380(_0x5e6f30);},'EfdWd':function(_0x5c49bb,_0x35d572){return _0x5c49bb===_0x35d572;},'ZTIsk':'object'},_0x9ffdc0=await _0x4f2671['eCutU'](resolveProfileTarget,_0x41e48f);if(_0x9ffdc0['kind']==='cloud'){const _0x3af3d9=await loadEffectiveCloudSettings(_0x41e48f),_0x4ee1a0=getNestedValue(_0x3af3d9,_0x10fb84);if(_0x4f2671['YDiHq'](_0x4ee1a0,undefined))console[_0x468c7b(0xba)](_0x468c7b(0xbe));else _0x4f2671[_0x468c7b(0xc7)](typeof _0x4ee1a0,_0x468c7b(0xe8))?console['log'](JSON['stringify'](_0x4ee1a0,null,0x2)):console[_0x468c7b(0xba)](_0x4ee1a0);return;}const _0x549abb=await _0x4f2671['UFFmU'](loadSettings,_0x41e48f),_0x1e1a73=getNestedValue(_0x549abb,_0x10fb84);if(_0x4f2671[_0x468c7b(0xd2)](_0x1e1a73,undefined))console[_0x468c7b(0xba)]('(not\x20set)');else typeof _0x1e1a73===_0x4f2671['ZTIsk']?console['log'](JSON['stringify'](_0x1e1a73,null,0x2)):console[_0x468c7b(0xba)](_0x1e1a73);}function _0x34bc(_0x216936,_0x3159fd){_0x216936=_0x216936-0xb7;const _0x15af26=_0x15af();let _0x34bc0f=_0x15af26[_0x216936];return _0x34bc0f;}export async function configList(_0x646c44){const _0x51ff29=_0x43a503,_0x891f79={'mnspa':function(_0x2b8050,_0x594ad4){return _0x2b8050(_0x594ad4);},'AllWk':function(_0x3c56d7,_0x24f4e2){return _0x3c56d7===_0x24f4e2;},'JSCRi':_0x51ff29(0xcf)},_0x386adb=await _0x891f79['mnspa'](resolveProfileTarget,_0x646c44);if(_0x891f79[_0x51ff29(0xbd)](_0x386adb[_0x51ff29(0xd7)],_0x891f79[_0x51ff29(0xe6)])){const _0x1d1402=await loadEffectiveCloudSettings(_0x646c44);if(!_0x1d1402||_0x891f79['AllWk'](Object[_0x51ff29(0xca)](_0x1d1402)[_0x51ff29(0xc9)],0x0)){console['log'](_0x51ff29(0xc6)+_0x646c44+'\x22');return;}console[_0x51ff29(0xba)](JSON['stringify'](_0x1d1402,null,0x2));return;}const _0x10f732=getSettingsPath(_0x646c44);if(!existsSync(_0x10f732)){console[_0x51ff29(0xba)](_0x51ff29(0xc6)+_0x646c44+'\x22');return;}const _0x3285a5=await loadSettings(_0x646c44),_0x4c2293=_0x891f79['mnspa'](formatSettings,_0x3285a5);!_0x4c2293?console[_0x51ff29(0xba)](_0x51ff29(0xc6)+_0x646c44+'\x22'):console[_0x51ff29(0xba)](_0x4c2293);}export async function configUnset(_0x26203a,_0x6210d9){const _0x2b69ac=_0x43a503,_0x27d0f0={'eBxIh':function(_0x27c08f,_0x59bc9d){return _0x27c08f===_0x59bc9d;},'DfgWn':_0x2b69ac(0xcf),'yppCJ':function(_0x3e34dd,_0x59d936,_0x52e910,_0x264d36){return _0x3e34dd(_0x59d936,_0x52e910,_0x264d36);},'NpbMh':function(_0x3020c1){return _0x3020c1();}},_0x277753=await resolveProfileTarget(_0x26203a);if(_0x27d0f0['eBxIh'](_0x277753['kind'],_0x27d0f0['DfgWn'])){if(_0x277753[_0x2b69ac(0xcc)])printDualExistsHint(_0x26203a);const _0x3e1711=_0x27d0f0[_0x2b69ac(0xde)](unsetProfileOverride,_0x27d0f0[_0x2b69ac(0xd6)](getProjectPath),_0x26203a,_0x6210d9);_0x3e1711?console[_0x2b69ac(0xba)](_0x2b69ac(0xe9)+_0x6210d9+'\x20for\x20\x22'+_0x26203a+'\x22'):console['log']('Key\x20\x22'+_0x6210d9+'\x22\x20not\x20found');return;}const _0x286a63=unsetProfileOverride(getProjectPath(),_0x26203a,_0x6210d9);if(_0x286a63){console[_0x2b69ac(0xba)]('Removed\x20'+_0x6210d9);return;}const _0x2c887f=await loadSettings(_0x26203a),_0x491c14=deleteNestedValue(_0x2c887f,_0x6210d9);_0x491c14?console[_0x2b69ac(0xba)](_0x2b69ac(0xe3)+_0x6210d9+_0x2b69ac(0xda)+_0x26203a+'\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.'):console['log'](_0x2b69ac(0xe3)+_0x6210d9+_0x2b69ac(0xc3));}export async function configReset(_0x4f7fb6){const _0xa2ad1d=_0x43a503,_0x5db501={'vNsOM':function(_0x58f3f7,_0x3f76f6){return _0x58f3f7===_0x3f76f6;},'ixHPL':function(_0x28442d,_0x1a2624,_0x464854){return _0x28442d(_0x1a2624,_0x464854);},'pJHyL':function(_0xb078a8){return _0xb078a8();}},_0x131f3a=await resolveProfileTarget(_0x4f7fb6);if(_0x5db501[_0xa2ad1d(0xc8)](_0x131f3a[_0xa2ad1d(0xd7)],'cloud')){_0x5db501['ixHPL'](resetProfileOverrides,_0x5db501['pJHyL'](getProjectPath),_0x4f7fb6),console['log'](_0xa2ad1d(0xbb)+_0x4f7fb6+'\x22');return;}console[_0xa2ad1d(0xba)]('\x22'+_0x4f7fb6+'\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20'+_0x4f7fb6+_0xa2ad1d(0xd1));}
1
+ function _0xd96b(_0x5a2f82,_0x10f493){_0x5a2f82=_0x5a2f82-0x1a4;const _0x58c361=_0x58c3();let _0xd96bdd=_0x58c361[_0x5a2f82];return _0xd96bdd;}function _0x58c3(){const _0x1fca87=['12FoKhXz','log','fIkKX','12uJhldc','667797jHXzYw','keys','\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.','Invalid\x20value\x20for\x20','MTkZQ','undefined','NZpjs','kind','sdZdm','true','trim','cwd','Key\x20\x22','Profile\x20\x22',':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22','yqald','rgtan','isNaN','6294141RNygVn','8007TBZqoe','8620kSMMtK','Qzbyz','onRBh','\x20\x20Note:\x20\x22','9431543lfTLwQ','stringify','settings','\x22\x20not\x20found','bVdfL','cloud','RZgYd','10416110tHnYsz','720VCnrQf','object','FobrM','\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22','includes','YWpdT','alsoExistsElsewhere','aVoNh','kdygT','2076ANbbZz','endsWith','Cleared\x20local\x20overrides\x20for\x20\x22','wgbRs','false','306JuOejx','headless','No\x20configuration\x20set\x20for\x20\x22','\x20for\x20\x22','WvLfF','iAdal','tlKdX','test','jAHhI','startsWith','82116KxAftI'];_0x58c3=function(){return _0x1fca87;};return _0x58c3();}const _0x5ea09f=_0xd96b;(function(_0x425865,_0x37d5e7){const _0x4715e1=_0xd96b,_0x45134f=_0x425865();while(!![]){try{const _0x2dc9ee=-parseInt(_0x4715e1(0x1ba))/0x1*(parseInt(_0x4715e1(0x1d5))/0x2)+-parseInt(_0x4715e1(0x1a7))/0x3*(-parseInt(_0x4715e1(0x1a6))/0x4)+parseInt(_0x4715e1(0x1bb))/0x5*(-parseInt(_0x4715e1(0x1d0))/0x6)+parseInt(_0x4715e1(0x1b9))/0x7+parseInt(_0x4715e1(0x1c7))/0x8*(-parseInt(_0x4715e1(0x1df))/0x9)+parseInt(_0x4715e1(0x1c6))/0xa+-parseInt(_0x4715e1(0x1bf))/0xb*(-parseInt(_0x4715e1(0x1e0))/0xc);if(_0x2dc9ee===_0x37d5e7)break;else _0x45134f['push'](_0x45134f['shift']());}catch(_0xb621b8){_0x45134f['push'](_0x45134f['shift']());}}}(_0x58c3,0xc8fd1));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=[_0x5ea09f(0x1d6),'allowInsecureLocalhost'];function parseLocalValue(_0x39ab6c,_0x3bdeb6){const _0x5911e6=_0x5ea09f,_0x11de69={'onRBh':function(_0x3fc9ce,_0x14137d){return _0x3fc9ce===_0x14137d;},'sdZdm':'false'};if(BOOLEAN_KEYS[_0x5911e6(0x1cb)](_0x39ab6c)){if(_0x11de69[_0x5911e6(0x1bd)](_0x3bdeb6,_0x5911e6(0x1b0)))return!![];if(_0x3bdeb6===_0x11de69[_0x5911e6(0x1af)])return![];throw new Error(_0x5911e6(0x1aa)+_0x39ab6c+_0x5911e6(0x1b5));}return _0x3bdeb6;}function parseOverrideValue(_0x58178e){const _0x2f6779=_0x5ea09f,_0xed1a3d={'Qzbyz':function(_0x2f7d6a,_0x4bf20d){return _0x2f7d6a===_0x4bf20d;},'jAHhI':_0x2f6779(0x1b0),'MTkZQ':'null','NZpjs':_0x2f6779(0x1ac),'TEBBQ':function(_0x47486d,_0x140598){return _0x47486d(_0x140598);},'hSZSM':function(_0x185b6b,_0x555856){return _0x185b6b(_0x555856);}};if(_0xed1a3d['Qzbyz'](_0x58178e,_0xed1a3d[_0x2f6779(0x1dd)]))return!![];if(_0xed1a3d[_0x2f6779(0x1bc)](_0x58178e,_0x2f6779(0x1d4)))return![];if(_0x58178e===_0xed1a3d[_0x2f6779(0x1ab)])return null;if(_0xed1a3d['Qzbyz'](_0x58178e,_0xed1a3d[_0x2f6779(0x1ad)]))return undefined;if(/^-?\d+$/[_0x2f6779(0x1dc)](_0x58178e)){const _0x83c8df=_0xed1a3d['TEBBQ'](Number,_0x58178e);if(Number['isSafeInteger'](_0x83c8df))return _0x83c8df;}if(/^-?\d+\.\d+$/['test'](_0x58178e)){const _0x311ac8=_0xed1a3d['hSZSM'](Number,_0x58178e);if(!Number[_0x2f6779(0x1b8)](_0x311ac8))return _0x311ac8;}const _0x117b17=_0x58178e[_0x2f6779(0x1b1)]();if(_0x117b17[_0x2f6779(0x1de)]('{')&&_0x117b17['endsWith']('}')||_0x117b17[_0x2f6779(0x1de)]('[')&&_0x117b17[_0x2f6779(0x1d1)](']'))try{return JSON['parse'](_0x117b17);}catch{}return _0x58178e;}async function resolveProfileTarget(_0x4a27be){const _0x149203=_0x5ea09f,_0x3cd5bb={'bVdfL':function(_0x57ee75,_0x560577){return _0x57ee75(_0x560577);},'fIkKX':'cloud','bxpgl':'local'},_0x16a51c=existsSync(getEnvDir(_0x4a27be));let _0x427638=![];try{const _0x4eef87=await _0x3cd5bb[_0x149203(0x1c3)](fetchCloudProfile,_0x4a27be);_0x427638=Boolean(_0x4eef87);}catch{}if(_0x427638)return{'kind':_0x3cd5bb[_0x149203(0x1a5)],'alsoExistsElsewhere':_0x16a51c};if(_0x16a51c)return{'kind':_0x3cd5bb['bxpgl'],'alsoExistsElsewhere':![]};throw new Error(_0x149203(0x1b4)+_0x4a27be+'\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20'+_0x4a27be);}function printDualExistsHint(_0x2c42aa){const _0x166541=_0x5ea09f;console[_0x166541(0x1a4)](_0x166541(0x1be)+_0x2c42aa+'\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.');}function getProjectPath(){const _0x7bba34=_0x5ea09f;return process[_0x7bba34(0x1b2)]();}async function loadEffectiveCloudSettings(_0x572bd3){const _0x5577aa=_0x5ea09f,_0x3b4752={'CxSWa':function(_0x268cc0,_0x1a248c){return _0x268cc0(_0x1a248c);},'oqoAp':function(_0xa1a5dc,_0x5e4cf5,_0x43d00d){return _0xa1a5dc(_0x5e4cf5,_0x43d00d);},'kdygT':function(_0x289385){return _0x289385();},'Obtvh':function(_0x49a42a,_0x2d311f){return _0x49a42a??_0x2d311f;}},_0x3a5231=await _0x3b4752['CxSWa'](fetchCloudProfile,_0x572bd3),_0x5f2055=_0x3b4752['oqoAp'](readProfileOverrides,_0x3b4752[_0x5577aa(0x1cf)](getProjectPath),_0x572bd3);return _0x3b4752['oqoAp'](mergeCloudProfileSettings,_0x3a5231?.[_0x5577aa(0x1c1)]??{},_0x3b4752['Obtvh'](_0x5f2055,undefined));}export async function configSet(_0x5c1e24,_0x568095,_0x3999c2){const _0x923fd0=_0x5ea09f,_0x5f494a={'lNAFV':function(_0x967152,_0x4ddfe6){return _0x967152(_0x4ddfe6);},'tlKdX':function(_0x36b882,_0x47d674){return _0x36b882===_0x47d674;},'RkiLM':_0x923fd0(0x1c4),'yqald':function(_0x57dd10,_0x2fa3ae){return _0x57dd10(_0x2fa3ae);},'bldaA':function(_0x25fa87,_0x4d4992){return _0x25fa87(_0x4d4992);},'WvLfF':function(_0xf24907,_0x598a51,_0x2f772c,_0x4bd6d1,_0x2bc074){return _0xf24907(_0x598a51,_0x2f772c,_0x4bd6d1,_0x2bc074);},'pMeFY':function(_0x3b7429,_0x3e19af,_0x409580){return _0x3b7429(_0x3e19af,_0x409580);},'oulkH':function(_0x4f7a15,_0x34a4e5,_0x222387,_0x6ac00d,_0x49ead4){return _0x4f7a15(_0x34a4e5,_0x222387,_0x6ac00d,_0x49ead4);}},_0x158a04=await _0x5f494a['lNAFV'](resolveProfileTarget,_0x5c1e24);if(_0x5f494a[_0x923fd0(0x1db)](_0x158a04['kind'],_0x5f494a['RkiLM'])){if(_0x158a04[_0x923fd0(0x1cd)])_0x5f494a[_0x923fd0(0x1b6)](printDualExistsHint,_0x5c1e24);const _0x30f2a2=_0x5f494a['bldaA'](parseOverrideValue,_0x3999c2);_0x5f494a[_0x923fd0(0x1d9)](setProfileOverride,getProjectPath(),_0x5c1e24,_0x568095,_0x30f2a2),console[_0x923fd0(0x1a4)]('Set\x20'+_0x568095+'\x20=\x20'+JSON['stringify'](_0x30f2a2)+'\x20for\x20\x22'+_0x5c1e24+'\x22');return;}const _0x33cbef=_0x5f494a['pMeFY'](parseLocalValue,_0x568095,_0x3999c2);_0x5f494a['oulkH'](setProfileOverride,getProjectPath(),_0x5c1e24,_0x568095,_0x33cbef),console[_0x923fd0(0x1a4)]('Set\x20'+_0x568095+'\x20=\x20'+_0x33cbef+_0x923fd0(0x1d8)+_0x5c1e24+'\x22');}export async function configGet(_0x46dbad,_0x33a4ca){const _0x3111a5=_0x5ea09f,_0x2dbad3={'YWpdT':function(_0x57f1ef,_0x11ff96){return _0x57f1ef(_0x11ff96);},'rgtan':function(_0x135762,_0x24cecd){return _0x135762(_0x24cecd);},'aVoNh':function(_0x16fafb,_0x4b94ef){return _0x16fafb===_0x4b94ef;}},_0x30d5d2=await resolveProfileTarget(_0x46dbad);if(_0x30d5d2[_0x3111a5(0x1ae)]===_0x3111a5(0x1c4)){const _0x3b0354=await _0x2dbad3[_0x3111a5(0x1cc)](loadEffectiveCloudSettings,_0x46dbad),_0x1133b5=getNestedValue(_0x3b0354,_0x33a4ca);if(_0x1133b5===undefined)console['log']('(not\x20set)');else typeof _0x1133b5===_0x3111a5(0x1c8)?console[_0x3111a5(0x1a4)](JSON['stringify'](_0x1133b5,null,0x2)):console[_0x3111a5(0x1a4)](_0x1133b5);return;}const _0x1f6f16=await _0x2dbad3[_0x3111a5(0x1b7)](loadSettings,_0x46dbad),_0x28b9c9=getNestedValue(_0x1f6f16,_0x33a4ca);if(_0x2dbad3[_0x3111a5(0x1ce)](_0x28b9c9,undefined))console['log']('(not\x20set)');else typeof _0x28b9c9==='object'?console[_0x3111a5(0x1a4)](JSON['stringify'](_0x28b9c9,null,0x2)):console[_0x3111a5(0x1a4)](_0x28b9c9);}export async function configList(_0x3460ca){const _0x282325=_0x5ea09f,_0x463eba={'RZgYd':function(_0x4e0115,_0x8f51d0){return _0x4e0115===_0x8f51d0;},'FobrM':function(_0x2898e8,_0x353209){return _0x2898e8(_0x353209);}},_0x246da7=await resolveProfileTarget(_0x3460ca);if(_0x463eba[_0x282325(0x1c5)](_0x246da7['kind'],_0x282325(0x1c4))){const _0x53c4c5=await loadEffectiveCloudSettings(_0x3460ca);if(!_0x53c4c5||Object[_0x282325(0x1a8)](_0x53c4c5)['length']===0x0){console['log']('No\x20configuration\x20set\x20for\x20\x22'+_0x3460ca+'\x22');return;}console[_0x282325(0x1a4)](JSON[_0x282325(0x1c0)](_0x53c4c5,null,0x2));return;}const _0x8c19cf=_0x463eba[_0x282325(0x1c9)](getSettingsPath,_0x3460ca);if(!existsSync(_0x8c19cf)){console['log'](_0x282325(0x1d7)+_0x3460ca+'\x22');return;}const _0x1d7ad6=await _0x463eba['FobrM'](loadSettings,_0x3460ca),_0x568a64=formatSettings(_0x1d7ad6);!_0x568a64?console[_0x282325(0x1a4)]('No\x20configuration\x20set\x20for\x20\x22'+_0x3460ca+'\x22'):console[_0x282325(0x1a4)](_0x568a64);}export async function configUnset(_0x42ea8a,_0x17ed2b){const _0x44ef0b=_0x5ea09f,_0xf09e67={'kRkXf':function(_0x4c2ebd){return _0x4c2ebd();},'HbYkv':function(_0x69e896,_0xf8124a){return _0x69e896(_0xf8124a);},'MpTRn':function(_0x1b166c,_0x39d7fc,_0x1925b4){return _0x1b166c(_0x39d7fc,_0x1925b4);}},_0x23732f=await resolveProfileTarget(_0x42ea8a);if(_0x23732f['kind']===_0x44ef0b(0x1c4)){if(_0x23732f[_0x44ef0b(0x1cd)])printDualExistsHint(_0x42ea8a);const _0x34a0e3=unsetProfileOverride(getProjectPath(),_0x42ea8a,_0x17ed2b);_0x34a0e3?console['log']('Removed\x20'+_0x17ed2b+_0x44ef0b(0x1d8)+_0x42ea8a+'\x22'):console['log'](_0x44ef0b(0x1b3)+_0x17ed2b+'\x22\x20not\x20found');return;}const _0x16a240=unsetProfileOverride(_0xf09e67['kRkXf'](getProjectPath),_0x42ea8a,_0x17ed2b);if(_0x16a240){console['log']('Removed\x20'+_0x17ed2b);return;}const _0x7f9697=await _0xf09e67['HbYkv'](loadSettings,_0x42ea8a),_0x35f548=_0xf09e67['MpTRn'](deleteNestedValue,_0x7f9697,_0x17ed2b);_0x35f548?console[_0x44ef0b(0x1a4)]('Key\x20\x22'+_0x17ed2b+_0x44ef0b(0x1ca)+_0x42ea8a+_0x44ef0b(0x1a9)):console['log']('Key\x20\x22'+_0x17ed2b+_0x44ef0b(0x1c2));}export async function configReset(_0x361103){const _0x577c7c=_0x5ea09f,_0x352cfd={'wgbRs':function(_0x10ddd9,_0x1a7a49){return _0x10ddd9(_0x1a7a49);},'iAdal':function(_0x5386e5,_0x2fee2d){return _0x5386e5===_0x2fee2d;}},_0x16d657=await _0x352cfd[_0x577c7c(0x1d3)](resolveProfileTarget,_0x361103);if(_0x352cfd[_0x577c7c(0x1da)](_0x16d657['kind'],_0x577c7c(0x1c4))){resetProfileOverrides(getProjectPath(),_0x361103),console['log'](_0x577c7c(0x1d2)+_0x361103+'\x22');return;}console['log']('\x22'+_0x361103+'\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20'+_0x361103+'\x20<key>\x22\x20to\x20remove\x20individual\x20values.');}
@@ -1 +1 @@
1
- const _0x47a0ca=_0x5366;(function(_0x5574d6,_0x424c14){const _0x57f4e6=_0x5366,_0x17994e=_0x5574d6();while(!![]){try{const _0x16d8c0=-parseInt(_0x57f4e6(0x15d))/0x1*(parseInt(_0x57f4e6(0x156))/0x2)+-parseInt(_0x57f4e6(0x16f))/0x3*(-parseInt(_0x57f4e6(0x168))/0x4)+-parseInt(_0x57f4e6(0x163))/0x5+parseInt(_0x57f4e6(0x158))/0x6+-parseInt(_0x57f4e6(0x157))/0x7*(parseInt(_0x57f4e6(0x161))/0x8)+parseInt(_0x57f4e6(0x162))/0x9+parseInt(_0x57f4e6(0x177))/0xa;if(_0x16d8c0===_0x424c14)break;else _0x17994e['push'](_0x17994e['shift']());}catch(_0x56447e){_0x17994e['push'](_0x17994e['shift']());}}}(_0x1b8f,0x2f6ef));import{readdir,stat}from'fs/promises';function _0x1b8f(){const _0x4ae781=['qrjno','environmentDetails','\x0aNo\x20profiles\x20found.','JUuvi','push','reports','2861150VREXhK','local','settings.json','sessionUpdatedAt','isDirectory','includes','\x0a*\x20=\x20active\x20profile','318cLGjRl','7ytYoHU','1752978Bnqahb','otBxB','length','log','eMgwl','1945guqeZV','localeCompare','bug-bashes','name','1691608gTpiZq','2647035KcuKRX','1882870mOBfrg','nkiGO','sort','gywhP','baseUrl','438348IJzrKr','PNtMI','TMMGZ','Run:\x20ranger\x20profile\x20add\x20<profile-name>','environmentKey','has','legacy','6NWUpla','startsWith'];_0x1b8f=function(){return _0x4ae781;};return _0x1b8f();}import{join}from'path';import{existsSync}from'fs';import{getRangerDir}from'./utils/rangerRoot.js';import{loadSettings}from'./utils/settings.js';import{readActiveProfileName}from'./utils/activeProfile.js';import{listCloudProfiles}from'./utils/cloudProfile.js';const NON_ENV_DIRS=['sessions',_0x47a0ca(0x15f),_0x47a0ca(0x176),'local','ci'];export async function getEnvNames(){const _0x586c51=_0x47a0ca,_0x1c291f={'nkiGO':function(_0x326151,_0x2b8a78){return _0x326151(_0x2b8a78);},'BTjtv':_0x586c51(0x178),'eMgwl':function(_0x519d2b,_0x1d949f,_0x56a69e){return _0x519d2b(_0x1d949f,_0x56a69e);},'TMMGZ':function(_0x25ecee,_0x2c7d08){return _0x25ecee(_0x2c7d08);},'gywhP':function(_0x5f660b,_0x1999ef){return _0x5f660b(_0x1999ef);},'XHsjb':_0x586c51(0x16e)},_0x1bcc8d=getRangerDir();if(!_0x1c291f[_0x586c51(0x164)](existsSync,_0x1bcc8d))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x35351a=await readActiveProfileName(),_0x27bfe0=[],_0x427936={},_0x453d41=join(_0x1bcc8d,_0x1c291f['BTjtv']);if(existsSync(_0x453d41)){const _0x1296f1=await _0x1c291f[_0x586c51(0x164)](readdir,_0x453d41);for(const _0x40d4d5 of _0x1296f1){const _0x23f720=join(_0x453d41,_0x40d4d5),_0x15d718=await _0x1c291f['nkiGO'](stat,_0x23f720);_0x15d718[_0x586c51(0x17b)]()&&(_0x27bfe0[_0x586c51(0x175)](_0x40d4d5),_0x427936[_0x40d4d5]=_0x586c51(0x178));}}const _0x267968=_0x1c291f[_0x586c51(0x15c)](join,_0x1bcc8d,'ci');if(_0x1c291f['nkiGO'](existsSync,_0x267968)){const _0x3ab36b=await _0x1c291f[_0x586c51(0x16a)](readdir,_0x267968);for(const _0x4cfe3b of _0x3ab36b){const _0x5c7bed=join(_0x267968,_0x4cfe3b),_0x250d6b=await _0x1c291f[_0x586c51(0x166)](stat,_0x5c7bed);_0x250d6b['isDirectory']()&&(_0x27bfe0[_0x586c51(0x175)](_0x4cfe3b),_0x427936[_0x4cfe3b]='ci');}}const _0x3d9e1d=await readdir(_0x1bcc8d);for(const _0x46fb91 of _0x3d9e1d){if(NON_ENV_DIRS[_0x586c51(0x17c)](_0x46fb91))continue;if(_0x46fb91[_0x586c51(0x170)]('.'))continue;if(_0x46fb91['endsWith']('.txt'))continue;const _0x771332=join(_0x1bcc8d,_0x46fb91),_0x4ac258=await stat(_0x771332);_0x4ac258['isDirectory']()&&_0x1c291f[_0x586c51(0x16a)](existsSync,join(_0x771332,_0x586c51(0x179)))&&(!_0x27bfe0[_0x586c51(0x17c)](_0x46fb91)&&(_0x27bfe0[_0x586c51(0x175)](_0x46fb91),_0x427936[_0x46fb91]=_0x1c291f['XHsjb']));}return{'envNames':_0x27bfe0,'activeEnv':_0x35351a,'envTypes':_0x427936};}function _0x5366(_0x5202ec,_0xef2856){_0x5202ec=_0x5202ec-0x155;const _0x1b8f3c=_0x1b8f();let _0x5366e6=_0x1b8f3c[_0x5202ec];return _0x5366e6;}export async function envList(){const _0x22f268=_0x47a0ca,_0x4aa719={'cbHTF':function(_0x4eb091){return _0x4eb091();},'JreOa':function(_0x46521c,_0x1104b2){return _0x46521c===_0x1104b2;},'jmmFj':_0x22f268(0x173),'JUuvi':_0x22f268(0x16b),'otBxB':function(_0x2ce85b,_0x244502){return _0x2ce85b===_0x244502;},'fxsql':'legacy','PNtMI':function(_0x38ba63,_0x368fed){return _0x38ba63>_0x368fed;},'qrjno':'no\x20session'},{envNames:_0x403a40,activeEnv:_0x2f54d3,envTypes:_0x1f54d4}=await _0x4aa719['cbHTF'](getEnvNames);let _0x5ba032=[];try{_0x5ba032=await _0x4aa719['cbHTF'](listCloudProfiles);}catch{}if(_0x4aa719['JreOa'](_0x403a40['length'],0x0)&&_0x5ba032['length']===0x0){console[_0x22f268(0x15b)](_0x4aa719['jmmFj']),console[_0x22f268(0x15b)](_0x4aa719[_0x22f268(0x174)]);return;}const _0x35f4ed=new Set(_0x5ba032['map'](_0x427f5d=>_0x427f5d[_0x22f268(0x160)]));if(_0x403a40['length']>0x0){console['log']('\x0aLocal\x20Profiles:');for(const _0x5e46bb of _0x403a40[_0x22f268(0x165)]()){const _0x29d0a1=_0x4aa719[_0x22f268(0x159)](_0x5e46bb,_0x2f54d3)&&!_0x35f4ed[_0x22f268(0x16d)](_0x5e46bb),_0x5cc8a5=_0x1f54d4[_0x5e46bb]||'local',_0x19a280=await loadSettings(_0x5e46bb),_0x499293=_0x5cc8a5===_0x4aa719['fxsql']?'':'\x20['+_0x5cc8a5+']';console['log']('\x20\x20'+(_0x29d0a1?'*\x20':'\x20\x20')+_0x5e46bb+_0x499293),_0x19a280[_0x22f268(0x167)]&&console['log']('\x20\x20\x20\x20\x20\x20URL:\x20'+_0x19a280['baseUrl']),_0x19a280[_0x22f268(0x172)]&&console['log']('\x20\x20\x20\x20\x20\x20Details:\x20'+_0x19a280[_0x22f268(0x172)]);}}if(_0x4aa719[_0x22f268(0x169)](_0x5ba032[_0x22f268(0x15a)],0x0)){console[_0x22f268(0x15b)]('\x0aCloud\x20Profiles:');for(const _0x289c3e of _0x5ba032['sort']((_0x1dee00,_0x49a4f4)=>_0x1dee00[_0x22f268(0x160)][_0x22f268(0x15e)](_0x49a4f4[_0x22f268(0x160)]))){const _0x322ee0=_0x289c3e['name']===_0x2f54d3,_0x145c3e=_0x289c3e['environmentKey']?'\x20('+_0x289c3e[_0x22f268(0x16c)]+')':'',_0x289191=_0x289c3e['sessionUpdatedAt']?'cached\x20(updated\x20'+_0x289c3e[_0x22f268(0x17a)]+')':_0x4aa719[_0x22f268(0x171)];console['log']('\x20\x20'+(_0x322ee0?'*\x20':'\x20\x20')+_0x289c3e['name']+'\x20[cloud]'+_0x145c3e),console['log']('\x20\x20\x20\x20\x20\x20Session:\x20'+_0x289191);}}_0x2f54d3&&console['log'](_0x22f268(0x155));}
1
+ const _0x4973b1=_0x1e3a;function _0x1e3a(_0x4c1581,_0x35c9a1){_0x4c1581=_0x4c1581-0xa6;const _0x146dcb=_0x146d();let _0x1e3a16=_0x146dcb[_0x4c1581];return _0x1e3a16;}(function(_0x4e4f46,_0x36f0e4){const _0x4286b4=_0x1e3a,_0x20596b=_0x4e4f46();while(!![]){try{const _0x4865ee=parseInt(_0x4286b4(0xac))/0x1*(-parseInt(_0x4286b4(0xc8))/0x2)+-parseInt(_0x4286b4(0xb9))/0x3*(-parseInt(_0x4286b4(0xb2))/0x4)+-parseInt(_0x4286b4(0xb5))/0x5*(-parseInt(_0x4286b4(0xb0))/0x6)+parseInt(_0x4286b4(0xc7))/0x7+parseInt(_0x4286b4(0xb1))/0x8*(-parseInt(_0x4286b4(0xbe))/0x9)+parseInt(_0x4286b4(0xaa))/0xa*(parseInt(_0x4286b4(0xae))/0xb)+-parseInt(_0x4286b4(0xb7))/0xc;if(_0x4865ee===_0x36f0e4)break;else _0x20596b['push'](_0x20596b['shift']());}catch(_0x2cf2f9){_0x20596b['push'](_0x20596b['shift']());}}}(_0x146d,0x73da6));function _0x146d(){const _0x36fd2b=['pXsXN','mRJLx','QnStF','10ozoPwe','\x20\x20\x20\x20\x20\x20URL:\x20','172ZGyDRg','sort','7554899vpNpPg','legacy','243582HSIbFA','228968LUaPAw','202716rQjpjq','EMEBQ','FzOJr','95YmglKN','lWsPI','16529208wqLQsv','AEPxl','36EMWXsU','AbFHN','no\x20session','CkKsr','reports','261tnnwik','PAnwN','length','sessions','push','has','environmentKey','local','sessionUpdatedAt','6310787MGJMpz','3324hwhbTs','log'];_0x146d=function(){return _0x36fd2b;};return _0x146d();}import{readdir,stat}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{getRangerDir}from'./utils/rangerRoot.js';import{loadSettings}from'./utils/settings.js';import{readActiveProfileName}from'./utils/activeProfile.js';import{listCloudProfiles}from'./utils/cloudProfile.js';const NON_ENV_DIRS=[_0x4973b1(0xc1),'bug-bashes',_0x4973b1(0xbd),_0x4973b1(0xc5),'ci'];export async function getEnvNames(){const _0x49e42a=_0x4973b1,_0x2e6048={'PAnwN':function(_0x5db0be,_0x9bb2a7){return _0x5db0be(_0x9bb2a7);},'CkKsr':function(_0x102595){return _0x102595();},'lWsPI':_0x49e42a(0xc5),'hGqPE':function(_0x5cefbc,_0x372375){return _0x5cefbc(_0x372375);},'eqiky':function(_0x350d04,_0x524769,_0x5c6a14){return _0x350d04(_0x524769,_0x5c6a14);},'pXsXN':function(_0x40a046,_0x2a3f5b){return _0x40a046(_0x2a3f5b);},'eDkUN':'.txt','AEPxl':function(_0xd78ea2,_0x285f48,_0x300f47){return _0xd78ea2(_0x285f48,_0x300f47);},'jCtPc':function(_0x2b96c2,_0x5afcc5){return _0x2b96c2(_0x5afcc5);}},_0x1c3048=getRangerDir();if(!_0x2e6048[_0x49e42a(0xbf)](existsSync,_0x1c3048))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x594dbd=await _0x2e6048[_0x49e42a(0xbc)](readActiveProfileName),_0x5559b3=[],_0x1cee2b={},_0x21a915=join(_0x1c3048,_0x2e6048[_0x49e42a(0xb6)]);if(_0x2e6048['hGqPE'](existsSync,_0x21a915)){const _0x43a570=await readdir(_0x21a915);for(const _0x1ea81f of _0x43a570){const _0x2343f8=join(_0x21a915,_0x1ea81f),_0x294161=await stat(_0x2343f8);_0x294161['isDirectory']()&&(_0x5559b3[_0x49e42a(0xc2)](_0x1ea81f),_0x1cee2b[_0x1ea81f]=_0x2e6048['lWsPI']);}}const _0x450e75=_0x2e6048['eqiky'](join,_0x1c3048,'ci');if(existsSync(_0x450e75)){const _0x4b2284=await _0x2e6048[_0x49e42a(0xa7)](readdir,_0x450e75);for(const _0x3975ef of _0x4b2284){const _0x410531=join(_0x450e75,_0x3975ef),_0x46e4b7=await stat(_0x410531);_0x46e4b7['isDirectory']()&&(_0x5559b3[_0x49e42a(0xc2)](_0x3975ef),_0x1cee2b[_0x3975ef]='ci');}}const _0x372fe3=await readdir(_0x1c3048);for(const _0x14b260 of _0x372fe3){if(NON_ENV_DIRS['includes'](_0x14b260))continue;if(_0x14b260['startsWith']('.'))continue;if(_0x14b260['endsWith'](_0x2e6048['eDkUN']))continue;const _0x4de845=_0x2e6048[_0x49e42a(0xb8)](join,_0x1c3048,_0x14b260),_0x4f2e06=await stat(_0x4de845);_0x4f2e06['isDirectory']()&&_0x2e6048['jCtPc'](existsSync,_0x2e6048[_0x49e42a(0xb8)](join,_0x4de845,'settings.json'))&&(!_0x5559b3['includes'](_0x14b260)&&(_0x5559b3[_0x49e42a(0xc2)](_0x14b260),_0x1cee2b[_0x14b260]=_0x49e42a(0xaf)));}return{'envNames':_0x5559b3,'activeEnv':_0x594dbd,'envTypes':_0x1cee2b};}export async function envList(){const _0x1fd749=_0x4973b1,_0x3297b8={'ePFzf':function(_0xacddc2){return _0xacddc2();},'QnStF':function(_0x3eab13){return _0x3eab13();},'MJFPJ':function(_0x17b629,_0x2e3bdc){return _0x17b629===_0x2e3bdc;},'KojYO':'\x0aNo\x20profiles\x20found.','kKZXB':'Run:\x20ranger\x20profile\x20add\x20<profile-name>','UwIrA':'\x0aLocal\x20Profiles:','AbFHN':function(_0x4ecb9f,_0x2045a7){return _0x4ecb9f===_0x2045a7;},'mRJLx':'local','MMLDg':function(_0x39e78a,_0x5b5d7d){return _0x39e78a===_0x5b5d7d;},'gzebV':function(_0x3cd9ee,_0x3e85c3){return _0x3cd9ee>_0x3e85c3;},'FzOJr':'\x0aCloud\x20Profiles:','EMEBQ':_0x1fd749(0xbb)},{envNames:_0x3efe10,activeEnv:_0x37c7bb,envTypes:_0x474268}=await _0x3297b8['ePFzf'](getEnvNames);let _0x3a236a=[];try{_0x3a236a=await _0x3297b8[_0x1fd749(0xa9)](listCloudProfiles);}catch{}if(_0x3efe10['length']===0x0&&_0x3297b8['MJFPJ'](_0x3a236a[_0x1fd749(0xc0)],0x0)){console['log'](_0x3297b8['KojYO']),console[_0x1fd749(0xa6)](_0x3297b8['kKZXB']);return;}const _0x4d477a=new Set(_0x3a236a['map'](_0x464970=>_0x464970['name']));if(_0x3efe10[_0x1fd749(0xc0)]>0x0){console['log'](_0x3297b8['UwIrA']);for(const _0xdafff7 of _0x3efe10['sort']()){const _0x378422=_0x3297b8[_0x1fd749(0xba)](_0xdafff7,_0x37c7bb)&&!_0x4d477a[_0x1fd749(0xc3)](_0xdafff7),_0x5df5ab=_0x474268[_0xdafff7]||_0x3297b8[_0x1fd749(0xa8)],_0xafc6e4=await loadSettings(_0xdafff7),_0x33ff32=_0x3297b8['MMLDg'](_0x5df5ab,_0x1fd749(0xaf))?'':'\x20['+_0x5df5ab+']';console[_0x1fd749(0xa6)]('\x20\x20'+(_0x378422?'*\x20':'\x20\x20')+_0xdafff7+_0x33ff32),_0xafc6e4['baseUrl']&&console[_0x1fd749(0xa6)](_0x1fd749(0xab)+_0xafc6e4['baseUrl']),_0xafc6e4['environmentDetails']&&console['log']('\x20\x20\x20\x20\x20\x20Details:\x20'+_0xafc6e4['environmentDetails']);}}if(_0x3297b8['gzebV'](_0x3a236a[_0x1fd749(0xc0)],0x0)){console['log'](_0x3297b8[_0x1fd749(0xb4)]);for(const _0x3afa87 of _0x3a236a[_0x1fd749(0xad)]((_0x3c967d,_0x5da7a2)=>_0x3c967d['name']['localeCompare'](_0x5da7a2['name']))){const _0x48410e=_0x3afa87['name']===_0x37c7bb,_0x2c7131=_0x3afa87[_0x1fd749(0xc4)]?'\x20('+_0x3afa87['environmentKey']+')':'',_0x7fa853=_0x3afa87['sessionUpdatedAt']?'cached\x20(updated\x20'+_0x3afa87[_0x1fd749(0xc6)]+')':_0x3297b8[_0x1fd749(0xb3)];console['log']('\x20\x20'+(_0x48410e?'*\x20':'\x20\x20')+_0x3afa87['name']+'\x20[cloud]'+_0x2c7131),console[_0x1fd749(0xa6)]('\x20\x20\x20\x20\x20\x20Session:\x20'+_0x7fa853);}}_0x37c7bb&&console[_0x1fd749(0xa6)]('\x0a*\x20=\x20active\x20profile');}
@@ -1 +1 @@
1
- const _0x114e9e=_0x949b;(function(_0x102b27,_0x55c4db){const _0x27f248=_0x949b,_0xdbff46=_0x102b27();while(!![]){try{const _0x443453=parseInt(_0x27f248(0x27f))/0x1*(parseInt(_0x27f248(0x249))/0x2)+-parseInt(_0x27f248(0x282))/0x3+parseInt(_0x27f248(0x286))/0x4*(-parseInt(_0x27f248(0x278))/0x5)+parseInt(_0x27f248(0x1ec))/0x6+parseInt(_0x27f248(0x203))/0x7*(parseInt(_0x27f248(0x270))/0x8)+-parseInt(_0x27f248(0x23d))/0x9*(-parseInt(_0x27f248(0x232))/0xa)+-parseInt(_0x27f248(0x227))/0xb;if(_0x443453===_0x55c4db)break;else _0xdbff46['push'](_0xdbff46['shift']());}catch(_0x31fc4c){_0xdbff46['push'](_0xdbff46['shift']());}}}(_0x3e5f,0x633f9));import{readFile,writeFile,mkdir}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{execSync}from'child_process';import _0x5e4fc6 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='active-feature.txt',bold=_0x27c370=>_0x114e9e(0x264)+_0x27c370+'\x1b[0m';function getGitRepoUrl(){const _0x2a32f2=_0x114e9e,_0x21ef69={'BmQjC':'pipe','jDahX':'github.com/'};try{const _0x5c38fb=execSync(_0x2a32f2(0x1f5),{'encoding':'utf-8','stdio':[_0x21ef69[_0x2a32f2(0x2b6)],_0x2a32f2(0x29f),_0x2a32f2(0x29f)]})[_0x2a32f2(0x262)]();return _0x5c38fb['replace'](/\.git$/,'')[_0x2a32f2(0x277)](/^git@github\.com:/,_0x21ef69['jDahX'])['replace'](/^https?:\/\//,'');}catch{return undefined;}}function getGitBranch(){const _0x5c01db=_0x114e9e,_0x300079={'GNyIc':function(_0xe9f6f6,_0x3aea17,_0x3c25c1){return _0xe9f6f6(_0x3aea17,_0x3c25c1);},'wylnX':'utf-8','yITGp':'pipe'};try{return _0x300079['GNyIc'](execSync,_0x5c01db(0x29a),{'encoding':_0x300079[_0x5c01db(0x24e)],'stdio':[_0x300079[_0x5c01db(0x220)],_0x300079[_0x5c01db(0x220)],_0x300079['yITGp']]})[_0x5c01db(0x262)]();}catch{return undefined;}}export async function getActiveFeatureId(){const _0x2da0ab=_0x114e9e,_0xdfbf6b={'vngHY':function(_0xfdf03a){return _0xfdf03a();},'YTMPH':_0x2da0ab(0x2a3)},_0x170210=join(_0xdfbf6b['vngHY'](getRangerDir),ACTIVE_FEATURE_FILE);if(!existsSync(_0x170210))return null;try{const _0x59a0ec=await readFile(_0x170210,_0xdfbf6b[_0x2da0ab(0x24c)]);return _0x59a0ec['trim']()||null;}catch{return null;}}async function setActiveFeatureId(_0x2c437b){const _0x484e7c=_0x114e9e,_0x1fada2={'Itapx':function(_0x5db000,_0x1d9638,_0x376083){return _0x5db000(_0x1d9638,_0x376083);},'OdIFg':function(_0x143678,_0x37d0cd,_0x223387,_0x5aa6af){return _0x143678(_0x37d0cd,_0x223387,_0x5aa6af);}},_0x1ff12c=getRangerDir(),_0x48e469=_0x1fada2[_0x484e7c(0x2a7)](join,_0x1ff12c,ACTIVE_FEATURE_FILE);!existsSync(_0x1ff12c)&&await mkdir(_0x1ff12c,{'recursive':!![]}),await _0x1fada2[_0x484e7c(0x21a)](writeFile,_0x48e469,_0x2c437b,'utf-8');}function getProgressDisplay(_0xb97f2){const _0x52a641=_0x114e9e,_0x42754e={'gMWux':function(_0x9c4c3e,_0x5eb6cf){return _0x9c4c3e+_0x5eb6cf;},'ndDKM':function(_0x245775,_0x14cdf7){return _0x245775+_0x14cdf7;},'jcGAH':function(_0x522a01,_0x2a7a87){return _0x522a01===_0x2a7a87;},'ALCWA':function(_0x281f2b,_0x3b537f){return _0x281f2b>_0x3b537f;}},_0x32fb50=_0xb97f2['verifiedItems']||0x0,_0x202f15=_0xb97f2['verificationInProgressItems']||0x0,_0x2a008d=_0xb97f2[_0x52a641(0x291)]||0x0,_0x4c19cd=_0xb97f2['incompleteItems']||0x0,_0x231787=_0xb97f2[_0x52a641(0x21d)]||0x0,_0x112803=_0x42754e['gMWux'](_0x42754e[_0x52a641(0x1eb)](_0x42754e[_0x52a641(0x1eb)](_0x42754e[_0x52a641(0x25b)](_0x32fb50,_0x202f15),_0x2a008d),_0x4c19cd),_0x231787);if(_0x42754e[_0x52a641(0x2b2)](_0x112803,0x0))return'-';const _0x28f60f=0xa,_0x326caa=Math[_0x52a641(0x1f3)](_0x32fb50/_0x112803*_0x28f60f),_0x2cde32='█'[_0x52a641(0x281)](_0x326caa)+'░'['repeat'](_0x28f60f-_0x326caa),_0x503548=[];if(_0x2a008d>0x0)_0x503548[_0x52a641(0x225)](_0x2a008d+'\x20blocked');if(_0x4c19cd>0x0)_0x503548['push'](_0x4c19cd+_0x52a641(0x1f9));if(_0x42754e[_0x52a641(0x28e)](_0x202f15,0x0))_0x503548['push'](_0x202f15+_0x52a641(0x239));const _0x105d22=_0x42754e['ALCWA'](_0x503548[_0x52a641(0x2ac)],0x0)?'\x20('+_0x503548['join'](',\x20')+')':'';return _0x2cde32+'\x20'+_0x32fb50+'/'+_0x112803+_0x52a641(0x200)+_0x105d22;}function getCurrentSessionItems(_0x13e70d,_0x2bd1c3){const _0x126eca=_0x114e9e;if(!_0x13e70d['currentSessionId'])return _0x2bd1c3['filter'](_0x5b7a62=>!_0x5b7a62['sessionId']);return _0x2bd1c3[_0x126eca(0x24a)](_0x4852d2=>_0x4852d2[_0x126eca(0x258)]===_0x13e70d[_0x126eca(0x28a)]||!_0x4852d2['sessionId']);}function displayFeature(_0x314945,_0x1de6ad){const _0x15721f=_0x114e9e,_0x5be45b={'vbuyd':function(_0x53f398,_0x5a99a2){return _0x53f398>_0x5a99a2;},'BokjM':_0x15721f(0x1e8),'fBuWm':function(_0x456cc7,_0x227805){return _0x456cc7<_0x227805;},'txlYJ':'verified','vJKbq':'incomplete','OzlGX':function(_0x202836,_0x4550b0){return _0x202836===_0x4550b0;},'xdFyJ':'blocked','HIKZF':_0x15721f(0x233),'kZNQi':function(_0x120e3c,_0x56cb1c){return _0x120e3c>_0x56cb1c;},'nDLuM':function(_0x388b50,_0x1fae25){return _0x388b50!==_0x1fae25;},'eYYzC':'\x20[has\x20reviewer\x20feedback]','JXXya':function(_0x1d89a0,_0x47c453){return _0x1d89a0===_0x47c453;},'rXiry':function(_0x19ea57,_0x27f01f){return _0x19ea57===_0x27f01f;},'uvaiY':_0x15721f(0x2ba),'ABetd':'approved'};console['log']('\x0a'+_0x314945['name']+'\x20('+_0x314945['dashboardUrl']+')');_0x314945['stats']&&console[_0x15721f(0x23e)](_0x15721f(0x224)+getProgressDisplay(_0x314945['stats']));_0x314945[_0x15721f(0x253)]&&console['log'](_0x15721f(0x247)+_0x314945['description']);_0x314945[_0x15721f(0x23a)]&&console[_0x15721f(0x23e)]('\x20\x20\x20Repository:\x20'+_0x314945[_0x15721f(0x23a)]);_0x314945[_0x15721f(0x25c)]&&console['log']('\x20\x20\x20Branch:\x20'+_0x314945['gitBranch']);console[_0x15721f(0x23e)](_0x15721f(0x26a)+new Date(_0x314945['createdAt'])[_0x15721f(0x2aa)]());_0x314945['completedAt']&&console['log']('\x20\x20\x20Completed:\x20'+new Date(_0x314945['completedAt'])['toLocaleString']());if(_0x1de6ad&&_0x5be45b['vbuyd'](_0x1de6ad['length'],0x0)){console[_0x15721f(0x23e)](_0x5be45b[_0x15721f(0x21c)]);for(let _0x5b9aa2=0x0;_0x5be45b['fBuWm'](_0x5b9aa2,_0x1de6ad['length']);_0x5b9aa2++){const _0x2b792a=_0x1de6ad[_0x5b9aa2];let _0x834a71;if(_0x2b792a['status']===_0x15721f(0x2ba)&&_0x2b792a[_0x15721f(0x255)]===_0x15721f(0x288))_0x834a71='✅';else{if(_0x2b792a['status']===_0x5be45b[_0x15721f(0x2ae)])_0x834a71='🟢';else{if(_0x2b792a['status']===_0x5be45b['vJKbq'])_0x834a71='🟠';else{if(_0x5be45b['OzlGX'](_0x2b792a[_0x15721f(0x1f7)],_0x5be45b[_0x15721f(0x283)]))_0x834a71='🛑';else{if(_0x5be45b[_0x15721f(0x287)](_0x2b792a[_0x15721f(0x1f7)],_0x15721f(0x2ba)))_0x834a71='⛔';else _0x2b792a[_0x15721f(0x1f7)]===_0x5be45b[_0x15721f(0x1fe)]?_0x834a71='⏳':_0x834a71='⬜';}}}}const _0x420ca1=_0x2b792a['version']>0x1?'\x20(v'+_0x2b792a['version']+')':'',_0x48081e=_0x5be45b['kZNQi'](_0x2b792a[_0x15721f(0x2ab)],0x1)&&_0x2b792a['parentItemId']&&_0x5be45b[_0x15721f(0x294)](_0x2b792a[_0x15721f(0x1f7)],'closed')&&_0x2b792a['status']!=='verified'?_0x5be45b['eYYzC']:'';console[_0x15721f(0x23e)]('\x20\x20\x20'+(_0x5b9aa2+0x1)+'.\x20'+_0x834a71+'\x20'+_0x2b792a['description']+_0x420ca1+_0x48081e);_0x5be45b['JXXya'](_0x2b792a[_0x15721f(0x1f7)],_0x5be45b['xdFyJ'])&&_0x2b792a['blockedReason']&&console['log'](_0x15721f(0x273)+_0x2b792a['blockedReason']);_0x5be45b['rXiry'](_0x2b792a['status'],_0x5be45b[_0x15721f(0x20e)])&&_0x2b792a[_0x15721f(0x2b1)]&&console['log']('\x20\x20\x20\x20\x20\x20Incomplete:\x20'+_0x2b792a['incompleteReason']);if(_0x2b792a['status']===_0x5be45b[_0x15721f(0x2be)]&&_0x5be45b['OzlGX'](_0x2b792a[_0x15721f(0x255)],_0x5be45b[_0x15721f(0x24b)]))console['log'](_0x15721f(0x1e9));else _0x5be45b[_0x15721f(0x287)](_0x2b792a[_0x15721f(0x1f7)],_0x5be45b['uvaiY'])&&_0x2b792a[_0x15721f(0x20d)]&&console['log']('\x20\x20\x20\x20\x20\x20Cancelled:\x20'+_0x2b792a[_0x15721f(0x20d)]);}}}export async function featureCreate(_0x3c2af1,_0x261fc0){const _0x182d19=_0x114e9e,_0x4de1a4={'gwFfD':function(_0x2a7cc7){return _0x2a7cc7();},'gksrd':function(_0x4f97b7,_0x54219d){return _0x4f97b7===_0x54219d;},'aKUNd':function(_0x1726d4){return _0x1726d4();},'MnPRz':function(_0x516d60){return _0x516d60();},'vSsPd':function(_0x41448a){return _0x41448a();},'lGtad':function(_0x1d86d1,_0x4d5975){return _0x1d86d1(_0x4d5975);}},{envNames:_0x2b33c1}=await _0x4de1a4['gwFfD'](getEnvNames);if(_0x4de1a4['gksrd'](_0x2b33c1['length'],0x0)&&!process['env']['RANGER_TEST_USERNAME']){let _0x2a07e7=0x0;try{_0x2a07e7=(await _0x4de1a4['aKUNd'](listCloudProfiles))[_0x182d19(0x2ac)];}catch{_0x2a07e7=0x1;}_0x2a07e7===0x0&&console['warn']('\x0a'+formatProfileRequiredMessage(_0x37effb=>bold(_0x37effb)));}const _0x1b63bc=_0x261fc0[_0x182d19(0x254)]?_0x261fc0['scenarios'][_0x182d19(0x1e2)](_0x21770e=>_0x21770e[_0x182d19(0x262)]()):[],_0x4cb2fb=_0x4de1a4['MnPRz'](getGitRepoUrl),_0x3b751f=_0x4de1a4[_0x182d19(0x256)](getGitBranch);console[_0x182d19(0x23e)](_0x182d19(0x1fb));const _0x120ded=await _0x4de1a4['lGtad'](createFeature,{'name':_0x3c2af1,'description':_0x261fc0[_0x182d19(0x253)],'checklist':_0x1b63bc,'gitRepoUrl':_0x4cb2fb,'gitBranch':_0x3b751f});await setActiveFeatureId(_0x120ded['id']),await _0x4de1a4[_0x182d19(0x27a)](tryStartCurrentSession,_0x120ded['id']);const _0x2a86ce=process[_0x182d19(0x222)]['CLAUDE_SESSION_ID'];_0x2a86ce&&registerSession(_0x2a86ce,_0x120ded['id']),console['log'](_0x182d19(0x241)+_0x120ded['id']),displayFeature(_0x120ded,_0x120ded[_0x182d19(0x27e)]),console[_0x182d19(0x23e)](_0x182d19(0x295));}export async function featureList(_0x3d6143){const _0x136280=_0x114e9e,_0xa1c9b5={'HJdBg':function(_0x3f3ef3){return _0x3f3ef3();},'ahnOT':function(_0x4a943a,_0x1c0d83){return _0x4a943a(_0x1c0d83);},'rMTds':function(_0x44fa72,_0x2147fb){return _0x44fa72>_0x2147fb;},'HOYVz':function(_0x5409de,_0x59d9e5){return _0x5409de<_0x59d9e5;},'OglQg':function(_0x1be696,_0x50e0d7){return _0x1be696!==_0x50e0d7;},'huZAK':_0x136280(0x2b3),'lvCpc':'\x20--include-deleted'},_0x1d032a={'limit':_0x3d6143['limit']??0xa,'offset':_0x3d6143['offset']??0x0,'includeDeleted':_0x3d6143[_0x136280(0x263)]};_0x3d6143[_0x136280(0x1f4)]&&(_0x1d032a[_0x136280(0x23a)]=getGitRepoUrl(),_0x1d032a['gitBranch']=_0xa1c9b5['HJdBg'](getGitBranch));const _0x101895=await _0xa1c9b5[_0x136280(0x2c1)](listFeatures,_0x1d032a);if(_0x101895['items']['length']===0x0){console[_0x136280(0x23e)](_0x136280(0x259));return;}const _0x5ba27d=_0xa1c9b5['rMTds'](_0x101895[_0x136280(0x252)],_0x101895[_0x136280(0x272)][_0x136280(0x2ac)])?'Showing\x20'+_0x101895['items']['length']+'\x20of\x20'+_0x101895['totalCount']:_0x101895['totalCount']+_0x136280(0x24f);console[_0x136280(0x23e)]('\x0a'+_0x5ba27d+':\x0a');for(const _0x166b53 of _0x101895['items']){const _0x3f0664=_0x136280(0x22c)[_0x136280(0x1ed)]('|');let _0x33eec9=0x0;while(!![]){switch(_0x3f0664[_0x33eec9++]){case'0':console[_0x136280(0x23e)]('\x20\x20\x20ID:\x20'+_0x166b53['id']);continue;case'1':_0x166b53[_0x136280(0x216)]&&console[_0x136280(0x23e)](_0x136280(0x224)+_0xa1c9b5[_0x136280(0x2c1)](getProgressDisplay,_0x166b53['stats']));continue;case'2':console['log']('\x20\x20\x20Created:\x20'+new Date(_0x166b53[_0x136280(0x1fa)])[_0x136280(0x268)]());continue;case'3':console['log'](''+_0x166b53[_0x136280(0x1e4)]);continue;case'4':_0x166b53['gitBranch']&&console[_0x136280(0x23e)](_0x136280(0x2c8)+_0x166b53['gitBranch']);continue;case'5':console[_0x136280(0x23e)]('');continue;}break;}}const _0x53cfa0=_0x1d032a['limit']??0xa,_0x296dcd=(_0x1d032a[_0x136280(0x223)]??0x0)+_0x101895['items'][_0x136280(0x2ac)];if(_0xa1c9b5[_0x136280(0x2c3)](_0x296dcd,_0x101895['totalCount'])){const _0x2a79ba=_0xa1c9b5[_0x136280(0x20f)](_0x53cfa0,0xa)?_0x136280(0x250)+_0x53cfa0:'',_0x407e93=_0x3d6143['currentBranch']?_0xa1c9b5['huZAK']:'',_0x368ff6=_0x3d6143['includeDeleted']?_0xa1c9b5['lvCpc']:'';console['log'](_0x136280(0x2c0)+_0x296dcd+_0x2a79ba+_0x407e93+_0x368ff6);}}export async function featureShow(_0x5a3b36){const _0x5141c0=_0x114e9e,_0x33d0f6={'eCjTJ':'No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','DHUYN':function(_0x27110f,_0x19fc1d){return _0x27110f(_0x19fc1d);}},_0x27da61=_0x5a3b36||await getActiveFeatureId();if(!_0x27da61)throw new Error(_0x33d0f6[_0x5141c0(0x2bc)]);const _0x10f71d=await _0x33d0f6[_0x5141c0(0x218)](getFeature,_0x27da61);displayFeature(_0x10f71d,_0x10f71d[_0x5141c0(0x27e)]);}export async function featureResume(_0x460a83){const _0x11f8a7=_0x114e9e,_0x2157f4={'bDfam':function(_0x19b56c,_0x15e3c0){return _0x19b56c(_0x15e3c0);},'BqEbf':function(_0x2fc4ed,_0x194572){return _0x2fc4ed(_0x194572);},'udCTz':function(_0x100ad4){return _0x100ad4();},'gmiLf':function(_0x461769,_0x3758fb){return _0x461769!==_0x3758fb;},'AbYlm':function(_0x34cc3f,_0x4e29e0,_0x4dbaaa){return _0x34cc3f(_0x4e29e0,_0x4dbaaa);},'qqmgh':function(_0x371c07,_0x59b1aa){return _0x371c07(_0x59b1aa);},'wRDQc':'Not\x20in\x20a\x20git\x20repository.','lSkpu':function(_0x22d07c,_0x1510de){return _0x22d07c||_0x1510de;},'WipJC':function(_0x4af600,_0x4e2cef){return _0x4af600===_0x4e2cef;},'mcylB':'\x0aNo\x20matching\x20active\x20feature\x20reviews\x20found.','YkcoZ':_0x11f8a7(0x1e3),'uQydu':function(_0x42a674,_0x25e8cf){return _0x42a674===_0x25e8cf;},'MjgQN':'\x0aNon-interactive\x20mode\x20detected.\x20Multiple\x20feature\x20reviews\x20found:','radQK':function(_0x1bc432,_0x1f5c04){return _0x1bc432(_0x1f5c04);},'bnyYc':function(_0x3ebd67,_0x19bb85){return _0x3ebd67!==_0x19bb85;},'rvgqL':function(_0x4829f5,_0x303287){return _0x4829f5(_0x303287);}};if(_0x460a83){const _0x226ba1=await _0x2157f4[_0x11f8a7(0x20c)](getFeature,_0x460a83);await _0x2157f4['BqEbf'](setActiveFeatureId,_0x226ba1['id']);const _0xa011bc=_0x2157f4[_0x11f8a7(0x230)](getGitBranch);_0xa011bc&&_0x2157f4['gmiLf'](_0xa011bc,_0x226ba1['gitBranch'])&&(await _0x2157f4[_0x11f8a7(0x1ff)](updateFeature,_0x226ba1['id'],{'gitBranch':_0xa011bc}),console[_0x11f8a7(0x23e)](_0x11f8a7(0x1e7)+_0xa011bc));console['log']('\x0a✅\x20Resumed\x20feature\x20review:\x20'+_0x226ba1['name']+'\x20('+_0x226ba1['id']+')'),await tryStartCurrentSession(_0x226ba1['id']);const _0x3c7f96=process[_0x11f8a7(0x222)][_0x11f8a7(0x2a4)];_0x3c7f96&&_0x2157f4['AbYlm'](registerSession,_0x3c7f96,_0x226ba1['id']);displayFeature(_0x226ba1,_0x226ba1[_0x11f8a7(0x27e)]),await _0x2157f4['qqmgh'](printFeedbackNudge,_0x226ba1['id']);return;}const _0x1495ea=getGitRepoUrl(),_0x914c0e=_0x2157f4['udCTz'](getGitBranch);if(!_0x1495ea&&!_0x914c0e)throw new Error(_0x2157f4[_0x11f8a7(0x1e6)]);console['log']('\x0aSearching\x20for\x20feature\x20reviews\x20matching:\x20'+_0x2157f4['lSkpu'](_0x1495ea,_0x11f8a7(0x2bd))+'\x20/\x20'+(_0x914c0e||_0x11f8a7(0x2bd))+_0x11f8a7(0x274));const _0x2a35bc=await listFeatures({'gitRepoUrl':_0x1495ea,'gitBranch':_0x914c0e}),_0x24ddaf=_0x2a35bc['items']['filter'](_0x13a462=>_0x13a462['status']?_0x13a462[_0x11f8a7(0x1f7)]!==_0x11f8a7(0x2a5):!_0x13a462[_0x11f8a7(0x1f2)]);if(_0x2157f4[_0x11f8a7(0x2a0)](_0x24ddaf[_0x11f8a7(0x2ac)],0x0)){console[_0x11f8a7(0x23e)](_0x2157f4['mcylB']),console[_0x11f8a7(0x23e)](_0x2157f4[_0x11f8a7(0x2a1)]);return;}let _0x147946;if(_0x2157f4[_0x11f8a7(0x2b4)](_0x24ddaf['length'],0x1))_0x147946=_0x24ddaf[0x0];else{const _0x1fa1b4=process[_0x11f8a7(0x23b)]['isTTY']&&process['stdout'][_0x11f8a7(0x2b7)];if(!_0x1fa1b4){console[_0x11f8a7(0x23e)](_0x2157f4['MjgQN']);for(const _0x374f7f of _0x24ddaf){console[_0x11f8a7(0x23e)]('\x20\x20'+_0x374f7f['name']),console['log']('\x20\x20\x20\x20\x20ID:\x20'+_0x374f7f['id']),_0x374f7f[_0x11f8a7(0x216)]&&console[_0x11f8a7(0x23e)]('\x20\x20\x20\x20\x20Progress:\x20'+_0x2157f4['radQK'](getProgressDisplay,_0x374f7f[_0x11f8a7(0x216)])),_0x374f7f[_0x11f8a7(0x25c)]&&console['log'](_0x11f8a7(0x2a6)+_0x374f7f['gitBranch']);}throw new Error('Please\x20specify\x20the\x20feature\x20review\x20ID:\x20ranger\x20resume\x20<id>');}const {selected:_0x3a1101}=await _0x5e4fc6['prompt']([{'type':_0x11f8a7(0x240),'name':'selected','message':_0x11f8a7(0x298),'choices':_0x24ddaf[_0x11f8a7(0x1e2)](_0x21269d=>({'name':_0x21269d[_0x11f8a7(0x1e4)]+'\x20('+_0x21269d['id']+')','value':_0x21269d['id']}))}]);_0x147946=_0x24ddaf[_0x11f8a7(0x25e)](_0x131216=>_0x131216['id']===_0x3a1101);}await setActiveFeatureId(_0x147946['id']);_0x914c0e&&_0x2157f4['bnyYc'](_0x914c0e,_0x147946[_0x11f8a7(0x25c)])&&(await updateFeature(_0x147946['id'],{'gitBranch':_0x914c0e}),console['log']('\x20\x20\x20Updated\x20branch\x20to:\x20'+_0x914c0e));console[_0x11f8a7(0x23e)](_0x11f8a7(0x280)+_0x147946['name']+'\x20('+_0x147946['id']+')'),await _0x2157f4['qqmgh'](tryStartCurrentSession,_0x147946['id']);const _0x2f1c99=await getFeature(_0x147946['id']),_0x13c2cc=process[_0x11f8a7(0x222)][_0x11f8a7(0x2a4)];_0x13c2cc&&registerSession(_0x13c2cc,_0x2f1c99['id']),displayFeature(_0x2f1c99,_0x2f1c99[_0x11f8a7(0x27e)]),await _0x2157f4['rvgqL'](printFeedbackNudge,_0x2f1c99['id']);}async function printFeedbackNudge(_0x587f60){const _0x507f7a=_0x114e9e,_0x35a8b7={'EcoCw':function(_0x31196e,_0x256f66,_0x5eaed7){return _0x31196e(_0x256f66,_0x5eaed7);},'ggrcP':function(_0x1c3055,_0xb9a9a2){return _0x1c3055>_0xb9a9a2;},'jORga':function(_0x3f73d7,_0x5cf8d0){return _0x3f73d7>_0x5cf8d0;}};try{const {items:_0x34275b}=await getActionItems(_0x587f60);let _0x55eb70=0x0,_0x273006=0x0;for(const _0x1553dc of _0x34275b){const _0x3cc1a2=await _0x35a8b7[_0x507f7a(0x213)](getItemFeedback,_0x587f60,_0x1553dc['id']);_0x35a8b7['ggrcP'](_0x3cc1a2[_0x507f7a(0x207)]['length'],0x0)&&(_0x55eb70+=_0x3cc1a2['unaddressedComments']['length'],_0x273006++);}_0x35a8b7['jORga'](_0x55eb70,0x0)&&(console[_0x507f7a(0x23e)](_0x507f7a(0x20b)+_0x55eb70+'\x20unaddressed\x20reviewer\x20comment(s)\x20across\x20'+_0x273006+_0x507f7a(0x2a2)),console['log']('\x20\x20\x20Run\x20`ranger\x20get-review`\x20to\x20see\x20what\x20needs\x20to\x20be\x20fixed.'));}catch{}}async function tryStartCurrentSession(_0x33e95c){const _0x287f0a=_0x114e9e,_0xdd96d0={'OQDNB':function(_0xfb337e,_0x6dea5a){return _0xfb337e(_0x6dea5a);}};try{const {sessions:_0x12997d}=await _0xdd96d0['OQDNB'](listFeatureSessions,_0x33e95c),_0x3186f5=_0x12997d['find'](_0x3a3e3e=>_0x3a3e3e[_0x287f0a(0x1f7)]===_0x287f0a(0x1f1));_0x3186f5&&(await startSession(_0x33e95c,_0x3186f5['id']),console['log']('\x20\x20\x20▶️\x20Started\x20session\x20'+_0x3186f5['iteration']));}catch{}}function _0x949b(_0x3da59f,_0x210c13){_0x3da59f=_0x3da59f-0x1de;const _0x3e5fb1=_0x3e5f();let _0x949bc7=_0x3e5fb1[_0x3da59f];return _0x949bc7;}export async function featureReport(_0x26b196,_0x385686){const _0xcf316a=_0x114e9e,_0x3b544f={'dVZBE':function(_0x5427ca){return _0x5427ca();},'jpAwb':function(_0x2d79b0,_0x1372d0,_0x131a6b,_0x59deaf){return _0x2d79b0(_0x1372d0,_0x131a6b,_0x59deaf);},'xANRq':function(_0x3d8a79,_0x5882cb){return _0x3d8a79(_0x5882cb);},'XMgYR':function(_0x14725f,_0xa91e23,_0x45ca98){return _0x14725f(_0xa91e23,_0x45ca98);},'myOMQ':_0xcf316a(0x2a3)},_0x51bc2b=_0x26b196||await _0x3b544f[_0xcf316a(0x1e0)](getActiveFeatureId);if(!_0x51bc2b)throw new Error(_0xcf316a(0x212));console['log']('\x0aGenerating\x20report...');const _0x2bf667=await getFeatureReportMarkdown(_0x51bc2b,{'style':_0x385686['style']}),_0x6a8d5f=_0x385686[_0xcf316a(0x2a8)]||_0x3b544f[_0xcf316a(0x290)](join,getRangerDir(),'reports',_0x51bc2b+'.md'),_0xaa1a2e=join(_0x6a8d5f,'..');!_0x3b544f['xANRq'](existsSync,_0xaa1a2e)&&await _0x3b544f['XMgYR'](mkdir,_0xaa1a2e,{'recursive':!![]}),await writeFile(_0x6a8d5f,_0x2bf667,_0x3b544f['myOMQ']),console[_0xcf316a(0x23e)](_0xcf316a(0x1f6)+_0x6a8d5f);}function getScenarioResult(_0x122db9){const _0x155acf=_0x114e9e,_0x4477d5={'hOytY':function(_0x398613,_0x88ffc6){return _0x398613===_0x88ffc6;},'NDpcD':_0x155acf(0x2ba),'NHHvo':'in_progress'};if(_0x4477d5['hOytY'](_0x122db9['status'],'closed'))return _0x122db9[_0x155acf(0x255)]??_0x4477d5[_0x155acf(0x208)];if(_0x4477d5[_0x155acf(0x242)](_0x122db9['status'],_0x155acf(0x233)))return _0x4477d5[_0x155acf(0x21f)];return _0x122db9['status'];}function getScenarioRationale(_0x1b7cad,_0x4088d7){const _0x18c65d=_0x114e9e;if(_0x4088d7)return _0x4088d7;if(_0x1b7cad[_0x18c65d(0x26c)])return _0x1b7cad[_0x18c65d(0x26c)];if(_0x1b7cad['incompleteReason'])return _0x1b7cad[_0x18c65d(0x2b1)];if(_0x1b7cad[_0x18c65d(0x20d)])return _0x1b7cad['canceledReason'];if(_0x1b7cad[_0x18c65d(0x2b5)])return _0x1b7cad[_0x18c65d(0x2b5)];return null;}export async function featureReportPrDescription(_0x497905,_0x4bb1c0){const _0x1a91d2=_0x114e9e,_0x3e70e6={'mPqOq':function(_0x869267){return _0x869267();},'hfLvi':_0x1a91d2(0x296),'koJxA':function(_0x4c77c2,_0x342a11){return _0x4c77c2<_0x342a11;},'PsWAa':function(_0x46d0a9,_0x2a9655){return _0x46d0a9===_0x2a9655;},'Lidwp':function(_0x31cde6,_0x398cae,_0x108d70,_0xd5eca9){return _0x31cde6(_0x398cae,_0x108d70,_0xd5eca9);},'hwqkf':function(_0x591365,_0x4be051,_0x5c99bd){return _0x591365(_0x4be051,_0x5c99bd);}},_0x1ce6b2=_0x497905||await _0x3e70e6[_0x1a91d2(0x29d)](getActiveFeatureId);if(!_0x1ce6b2)throw new Error('No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.');const _0x571d0c=await getFeature(_0x1ce6b2),_0x5401fe=_0x571d0c[_0x1a91d2(0x27e)]||[],_0x1217e0=getCurrentSessionItems(_0x571d0c,_0x5401fe);_0x1217e0['length']===0x0&&(console['error'](_0x3e70e6[_0x1a91d2(0x284)]),process[_0x1a91d2(0x25f)](0x1));const _0x588d0a=_0x4bb1c0['excludeScenarios']??[],_0x299553=_0x588d0a['filter'](_0x2661fe=>!Number[_0x1a91d2(0x261)](_0x2661fe)||_0x2661fe<0x1||_0x2661fe>_0x1217e0[_0x1a91d2(0x2ac)]);if(_0x299553['length']>0x0){console['error']('\x0a❌\x20Invalid\x20scenario\x20number(s):\x20'+_0x299553[_0x1a91d2(0x2c9)](',\x20')),console[_0x1a91d2(0x23e)](_0x1a91d2(0x236));for(let _0x321ba4=0x0;_0x3e70e6[_0x1a91d2(0x209)](_0x321ba4,_0x1217e0['length']);_0x321ba4++){console['log']('\x20\x20'+(_0x321ba4+0x1)+'.\x20'+_0x1217e0[_0x321ba4]['description']);}process[_0x1a91d2(0x25f)](0x1);}const _0x343362=new Set(_0x588d0a['map'](_0x40d6e8=>_0x40d6e8-0x1)),_0x13dde2=_0x1217e0['filter']((_0x194ada,_0x4c39fa)=>!_0x343362['has'](_0x4c39fa));_0x3e70e6['PsWAa'](_0x13dde2[_0x1a91d2(0x2ac)],0x0)&&(console[_0x1a91d2(0x20a)](_0x1a91d2(0x28f)),process['exit'](0x1));if(_0x4bb1c0[_0x1a91d2(0x202)])await _0x3e70e6['Lidwp'](outputJsonReport,_0x1ce6b2,_0x571d0c,_0x13dde2);else{const _0x28b515=await _0x3e70e6['hwqkf'](getFeatureReportMarkdown,_0x1ce6b2,{'itemIds':_0x13dde2['map'](_0x3110fc=>_0x3110fc['id'])});process['stdout'][_0x1a91d2(0x2ad)](_0x28b515['trimEnd']()+'\x0a');}}async function outputJsonReport(_0x475b60,_0x6495df,_0x48dbf4){const _0x554866=_0x114e9e,_0x315b99={'FUdhB':function(_0x3af426,_0x31515b){return _0x3af426===_0x31515b;},'dPFqH':function(_0x1b844c,_0x18c8f0){return _0x1b844c(_0x18c8f0);},'vYLXP':function(_0x22ca85,_0x1d2b7f){return _0x22ca85+_0x1d2b7f;}},_0x3c39e8=getApiBaseUrl(),_0x8839b1=await _0x315b99[_0x554866(0x22f)](getFeatureReport,_0x475b60),_0x25fc4a=new Map(_0x8839b1[_0x554866(0x27e)]['map'](_0x268c89=>[_0x268c89['id'],_0x268c89])),_0x1cd101=await Promise['all'](_0x48dbf4[_0x554866(0x1e2)](async _0x4e15bb=>{const _0x3824d5=_0x554866,_0x4cb5fd=_0x25fc4a[_0x3824d5(0x205)](_0x4e15bb['id']),_0x5ca194=_0x4cb5fd?.['linkedSession']??null;let _0x38050a=[];if(_0x4e15bb['browserSessionId'])try{const {steps:_0x19ba29}=await getBrowserSessionSteps(_0x4e15bb[_0x3824d5(0x26b)]);_0x19ba29['length']>0x0&&(_0x38050a=_0x19ba29['map'](_0x3df033=>{const _0x2b1e0f=_0x3824d5,_0x43a1f3=_0x3df033[_0x2b1e0f(0x285)][_0x2b1e0f(0x25e)](_0x869f16=>_0x869f16[_0x2b1e0f(0x1f8)]==='screenshot'&&_0x869f16[_0x2b1e0f(0x245)]===_0x2b1e0f(0x231))??_0x3df033['assets']['find'](_0x23c36e=>_0x23c36e['assetType']===_0x2b1e0f(0x2b0));let _0x1a9acc=null,_0x13c426=null;if(_0x43a1f3){const _0x41a18a=_0x43a1f3[_0x2b1e0f(0x23c)]['location']['split']('/')[_0x2b1e0f(0x26e)]();_0x1a9acc=_0x3c39e8+'/api/v1/mcp/browser-sessions/'+_0x4e15bb['browserSessionId']+'/artifacts/'+_0x41a18a,_0x41a18a&&(_0x13c426=_0x41a18a['replace'](/\.\w+$/,'')['replace'](/^(key_)?\d+_/,'')['replace'](/[-_]/g,'\x20'));}return{'description':_0x13c426||_0x3df033['description']||_0x3df033['stepName']||'Step\x20'+_0x3df033[_0x2b1e0f(0x1f0)],'screenshot':_0x1a9acc,'is_key_step':_0x3df033['isKeyStep']};}));}catch{}return _0x315b99[_0x3824d5(0x1fd)](_0x38050a['length'],0x0)&&_0x5ca194?.[_0x3824d5(0x1de)]&&(_0x38050a=_0x5ca194['screenshotUrls'][_0x3824d5(0x1e2)]((_0x185cde,_0x25e3b8)=>({'description':_0x3824d5(0x2a9)+(_0x25e3b8+0x1),'screenshot':_0x185cde,'is_key_step':![]}))),{'description':_0x4e15bb['description'],'result':getScenarioResult(_0x4e15bb),'rationale':getScenarioRationale(_0x4e15bb,_0x5ca194?.['agentResponse']),'steps':_0x38050a};})),_0x40ad14={'url':_0x6495df[_0x554866(0x2cb)],'scenarios':_0x1cd101};process[_0x554866(0x24d)]['write'](_0x315b99['vYLXP'](JSON[_0x554866(0x267)](_0x40ad14,null,0x2),'\x0a'));}export async function featureConcludeSession(_0x2cf0c7){const _0x19f39a=_0x114e9e,_0x19cc93={'HuLIZ':'No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','bYZoe':function(_0x174dd6,_0x59eee6){return _0x174dd6(_0x59eee6);},'vgwfM':_0x19f39a(0x279),'ZIwoF':function(_0x39bae3,_0xc3e87e){return _0x39bae3(_0xc3e87e);},'AJrjw':'completed','tilxE':_0x19f39a(0x2bb),'QmGHk':function(_0x1b2bae,_0x1f150f,_0xcbe88a){return _0x1b2bae(_0x1f150f,_0xcbe88a);}},_0x4270ba=_0x2cf0c7||await getActiveFeatureId();if(!_0x4270ba)throw new Error(_0x19cc93['HuLIZ']);const _0xd75ec1=await _0x19cc93[_0x19f39a(0x204)](getFeature,_0x4270ba);if(!_0xd75ec1[_0x19f39a(0x28a)])throw new Error(_0x19cc93[_0x19f39a(0x2c4)]);const {sessions:_0x10addc}=await _0x19cc93[_0x19f39a(0x251)](listFeatureSessions,_0x4270ba),_0x2cc60e=_0x10addc['find'](_0x150731=>_0x150731['id']===_0xd75ec1['currentSessionId']);if(!_0x2cc60e)throw new Error(_0x19f39a(0x246));if(_0x2cc60e[_0x19f39a(0x1f7)]===_0x19cc93[_0x19f39a(0x219)]){console['log'](_0x19cc93[_0x19f39a(0x25d)]);return;}if(_0x2cc60e['status']!==_0x19f39a(0x1fc))throw new Error(_0x19f39a(0x235)+_0x2cc60e[_0x19f39a(0x1f7)]);console['log']('\x0aConcluding\x20session...'),await _0x19cc93[_0x19f39a(0x215)](concludeSession,_0x4270ba,_0xd75ec1[_0x19f39a(0x28a)]),console['log'](_0x19f39a(0x22e)+_0x2cc60e['iteration']+_0x19f39a(0x21b)),console[_0x19f39a(0x23e)]('\x20\x20\x20The\x20feature\x20review\x20is\x20now\x20ready\x20for\x20human\x20review\x20on\x20the\x20Ranger\x20dashboard.');}export async function featureSessions(_0x1c09b7){const _0x1491e3=_0x114e9e,_0x56e65d={'oWsvN':'No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','HCDVf':function(_0x32ff4a,_0x1b3702){return _0x32ff4a(_0x1b3702);},'wooIN':function(_0x2a719b,_0x416004){return _0x2a719b(_0x416004);},'anTfh':function(_0x562131,_0x191f0a){return _0x562131===_0x191f0a;},'ztCAT':'completed'},_0x5f4424=_0x1c09b7||await getActiveFeatureId();if(!_0x5f4424)throw new Error(_0x56e65d['oWsvN']);const _0x12cbcf=await _0x56e65d[_0x1491e3(0x238)](getFeature,_0x5f4424);console[_0x1491e3(0x23e)](_0x1491e3(0x1df)+_0x12cbcf[_0x1491e3(0x1e4)]+'\x0a');const {sessions:_0x43d4d2}=await _0x56e65d['wooIN'](listFeatureSessions,_0x5f4424);if(_0x56e65d['anTfh'](_0x43d4d2[_0x1491e3(0x2ac)],0x0)){console[_0x1491e3(0x23e)]('No\x20sessions\x20found.');return;}for(const _0x18513e of _0x43d4d2){const _0x3ccf8f=_0x56e65d[_0x1491e3(0x206)](_0x18513e['status'],_0x56e65d[_0x1491e3(0x28b)])?'✅':_0x18513e[_0x1491e3(0x1f7)]==='in_progress'?'🔄':'▶️';console['log'](_0x3ccf8f+_0x1491e3(0x229)+_0x18513e[_0x1491e3(0x22a)]+'\x20('+_0x18513e['id']+')'),console['log'](_0x1491e3(0x2b8)+_0x18513e['status']),console['log'](_0x1491e3(0x26a)+new Date(_0x18513e[_0x1491e3(0x1fa)])[_0x1491e3(0x2aa)]()),_0x18513e['completedAt']&&console['log']('\x20\x20\x20Completed:\x20'+new Date(_0x18513e['completedAt'])['toLocaleString']()),console[_0x1491e3(0x23e)]('');}}export async function featureAddScenario(_0x1dc1e4,_0x5d6f67){const _0x300253=_0x114e9e,_0x30ee9d={'vNPYF':function(_0x4acb61,_0x550381,_0xdf6694){return _0x4acb61(_0x550381,_0xdf6694);}},_0x5b874e=_0x5d6f67||await getActiveFeatureId();if(!_0x5b874e)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 _0x1fcf28=await getFeature(_0x5b874e);if(_0x1fcf28[_0x300253(0x2c5)]&&!_0x1fcf28[_0x300253(0x2c5)]['submittedAt'])throw new Error('Cannot\x20add\x20scenario:\x20feature\x20review\x20has\x20an\x20active\x20review.\x20Please\x20finish\x20your\x20review\x20first:\x20'+_0x1fcf28['dashboardUrl']);await _0x30ee9d[_0x300253(0x27b)](createChecklistItem,_0x5b874e,_0x1dc1e4);const _0x3a3877=await getFeature(_0x5b874e);console['log'](_0x300253(0x226)),_0x30ee9d[_0x300253(0x27b)](displayFeature,_0x3a3877,_0x3a3877[_0x300253(0x27e)]);}function _0x3e5f(){const _0x40b399=['ZIwoF','totalCount','description','scenarios','terminalReason','vSsPd','FZZxL','sessionId','\x0aNo\x20feature\x20reviews\x20found.','submittedAt','ndDKM','gitBranch','tilxE','find','exit','Unknown','isInteger','trim','includeDeleted','\x1b[1m','\x20\x20✅\x20No\x20feedback\x20to\x20address','wPUiK','stringify','toLocaleDateString','ZQRgC','\x20\x20\x20Created:\x20','browserSessionId','blockedReason','domRef','pop','GQeIz','18584aeAELX','ORXtK','items','\x20\x20\x20\x20\x20\x20Blocked:\x20','...','\x0a✅\x20Restored\x20feature\x20review:\x20','icgJQ','replace','1045505iOlHaf','No\x20active\x20session\x20for\x20this\x20feature\x20review.','lGtad','vNPYF','\x20\x20\x20\x20\x20🎯\x20Element:\x20<','textContent','checklistItems','23nfXOxT','\x0a✅\x20Resumed\x20feature\x20review:\x20','repeat','1896261ZWafkr','xdFyJ','hfLvi','assets','4DpqMMe','OzlGX','approved','\x20unaddressed\x20comment(s)','currentSessionId','ztCAT','No\x20scenarios\x20found.','from','ALCWA','\x0a❌\x20All\x20scenarios\x20were\x20excluded.','jpAwb','blockedItems','MRUNQ','Scenario\x20','nDLuM','\x0a➡️\x20\x20Set\x20as\x20active\x20feature\x20review','\x0a❌\x20No\x20scenarios\x20found\x20to\x20include.','\x0a📋\x20Feedback\x20for:\x20','Multiple\x20feature\x20reviews\x20found.\x20Select\x20one:','qpoHV','git\x20rev-parse\x20--abbrev-ref\x20HEAD','tCuMH','type','mPqOq','\x20at\x20[','pipe','WipJC','YkcoZ','\x20scenario(s).','utf-8','CLAUDE_SESSION_ID','verified','\x20\x20\x20\x20\x20Branch:\x20','Itapx','output','Screenshot\x20','toLocaleString','version','length','write','txlYJ','zsDYu','screenshot','incompleteReason','jcGAH','\x20--current-branch','uQydu','notes','BmQjC','isTTY','\x20\x20\x20Status:\x20','\x20\x20💬\x20','closed','\x0a✅\x20Session\x20is\x20already\x20completed.','eCjTJ','any','uvaiY','element','Next\x20page:\x20ranger\x20list\x20--offset\x20','ahnOT','\x20\x20\x20To\x20restore\x20it,\x20run:\x20ranger\x20restore\x20','HOYVz','vgwfM','latestReview','\x20—\x20','numeric','\x20\x20\x20Branch:\x20','join','MSnSc','dashboardUrl','screenshotUrls','\x0a📁\x20Sessions\x20for\x20feature\x20review:\x20','dVZBE','spatial','map','Run:\x20ranger\x20create\x20\x22<name>\x22\x20to\x20create\x20a\x20new\x20feature\x20review','name','\x20\x20\x20\x20\x20📍\x20Annotation:\x20point\x20at\x20(','wRDQc','\x20\x20\x20Updated\x20branch\x20to:\x20','\x0a\x20\x20\x20Scenarios:','\x20\x20\x20\x20\x20\x20Approved','toFixed','gMWux','1756482SsUAQg','split','Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','HjiVb','position','ready','completedAt','round','currentBranch','git\x20remote\x20get-url\x20origin','\x0a✅\x20Report\x20generated:\x20','status','assetType','\x20incomplete','createdAt','\x0aCreating\x20feature\x20review...','in_progress','FUdhB','HIKZF','AbYlm','\x20verified','canonicalFlow','json','2289wrHkDi','bYZoe','get','anTfh','unaddressedComments','NDpcD','koJxA','error','\x0a⚠️\x20\x20','bDfam','canceledReason','vJKbq','OglQg','\x0a❌\x20Cannot\x20edit\x20scenario:\x20feature\x20review\x20has\x20an\x20active\x20review.','.\x20Feature\x20review\x20has\x20','No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','EcoCw','YHaUR','QmGHk','stats','arrayBuffer','DHUYN','AJrjw','OdIFg','\x20concluded.','BokjM','pendingItems','\x0a❌\x20No\x20scenarios\x20found\x20to\x20edit.','NHHvo','yITGp','\x20—\x20no\x20comments','env','offset','\x20\x20\x20Progress:\x20','push','\x0a✅\x20Scenario\x20added','6643747vkkJHo','nUeXw','\x20Session\x20','iteration','\x20scenarios.','3|0|1|4|2|5','scenario','\x0a✅\x20Session\x20','dPFqH','udCTz','after','3173990IlPfkk','verification_in_progress','\x0a✅\x20Scenario\x20updated','Cannot\x20conclude\x20session\x20with\x20status:\x20','\x0aAvailable\x20scenarios:','\x20\x20\x20\x20','HCDVf','\x20in\x20progress','gitRepoUrl','stdin','storage','9CQrspz','log','en-US','list','\x0a✅\x20Feature\x20review\x20created:\x20','hOytY',':\x20\x22','qNXJY','timing','Current\x20session\x20not\x20found.','\x20\x20\x20Description:\x20','\x20(v','41906GKejPp','filter','ABetd','YTMPH','stdout','wylnX','\x20feature\x20review(s)\x20found','\x20--limit\x20'];_0x3e5f=function(){return _0x40b399;};return _0x3e5f();}export async function featureEditScenario(_0x5595d4,_0x3ca1c1){const _0x524053=_0x114e9e,_0x5a956a={'MMjnO':'\x0a❌\x20No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','UwtMk':_0x524053(0x210),'qNXJY':'Please\x20finish\x20your\x20review\x20first:','UkDUZ':function(_0x41c218,_0xa89d61){return _0x41c218===_0xa89d61;},'MRUNQ':function(_0x5abc3e,_0x925de9){return _0x5abc3e+_0x925de9;},'zsDYu':function(_0x1c6a2a,_0x1efcf4){return _0x1c6a2a<_0x1efcf4;},'sDMcK':_0x524053(0x236),'icgJQ':function(_0x2042df,_0x536bc8,_0x5ef4b7){return _0x2042df(_0x536bc8,_0x5ef4b7);}},_0x5b23c3=_0x3ca1c1['id']||await getActiveFeatureId();!_0x5b23c3&&(console['error'](_0x5a956a['MMjnO']),console['error'](_0x524053(0x1ee)),process[_0x524053(0x25f)](0x1));const _0x1c83d7=await getFeature(_0x5b23c3);_0x1c83d7['latestReview']&&!_0x1c83d7[_0x524053(0x2c5)][_0x524053(0x25a)]&&(console[_0x524053(0x20a)](_0x5a956a['UwtMk']),console['error'](_0x5a956a[_0x524053(0x244)]),console['error']('\x20\x20'+_0x1c83d7['dashboardUrl']),process[_0x524053(0x25f)](0x1));const _0x749bde=_0x1c83d7['checklistItems']||[];_0x5a956a['UkDUZ'](_0x749bde[_0x524053(0x2ac)],0x0)&&(console['error'](_0x524053(0x21e)),process['exit'](0x1));if(_0x3ca1c1[_0x524053(0x22d)]===undefined){console['error']('\x0a❌\x20No\x20scenario\x20number\x20provided.\x20Use\x20--scenario\x20<number>.'),console['log']('\x0aAvailable\x20scenarios:');for(let _0x2c753b=0x0;_0x2c753b<_0x749bde['length'];_0x2c753b++){console[_0x524053(0x23e)]('\x20\x20'+_0x5a956a[_0x524053(0x292)](_0x2c753b,0x1)+'.\x20'+_0x749bde[_0x2c753b]['description']);}process['exit'](0x1);}const _0x4b1a7b=_0x3ca1c1[_0x524053(0x22d)]-0x1;if(_0x5a956a[_0x524053(0x2af)](_0x4b1a7b,0x0)||_0x4b1a7b>=_0x749bde['length']){console[_0x524053(0x20a)]('\x0a❌\x20Invalid\x20scenario\x20index:\x20'+_0x3ca1c1['scenario']+_0x524053(0x211)+_0x749bde['length']+_0x524053(0x22b)),console[_0x524053(0x23e)](_0x5a956a['sDMcK']);for(let _0x19148f=0x0;_0x5a956a[_0x524053(0x2af)](_0x19148f,_0x749bde[_0x524053(0x2ac)]);_0x19148f++){console['log']('\x20\x20'+(_0x19148f+0x1)+'.\x20'+_0x749bde[_0x19148f][_0x524053(0x253)]);}process[_0x524053(0x25f)](0x1);}const _0x5d28f6=_0x749bde[_0x4b1a7b];await updateChecklistItem(_0x5b23c3,_0x5d28f6['id'],{'description':_0x5595d4});const _0x8aeeab=await getFeature(_0x5b23c3);console['log'](_0x524053(0x234)),_0x5a956a[_0x524053(0x276)](displayFeature,_0x8aeeab,_0x8aeeab[_0x524053(0x27e)]);}async function downloadFeedbackImage(_0x2eddf9,_0xfdd53b){const _0x30d9aa=_0x114e9e,_0x300067={'MSnSc':function(_0x43a297,_0x19017b,_0x505aaf){return _0x43a297(_0x19017b,_0x505aaf);},'GQeIz':function(_0xfc7eb4){return _0xfc7eb4();},'ZQRgC':function(_0x27c900,_0x125d5b,_0x189fd8){return _0x27c900(_0x125d5b,_0x189fd8);}};try{const _0x46d73a=_0x300067[_0x30d9aa(0x2ca)](join,_0x300067[_0x30d9aa(0x26f)](getRangerDir),'feedback-images');await _0x300067['MSnSc'](mkdir,_0x46d73a,{'recursive':!![]});const _0x8d2f59=_0x300067['MSnSc'](join,_0x46d73a,'comment_'+_0xfdd53b+'.png'),_0x17cd93=await fetch(_0x2eddf9);if(!_0x17cd93['ok'])return null;const _0x5394df=Buffer[_0x30d9aa(0x28d)](await _0x17cd93[_0x30d9aa(0x217)]());return await _0x300067[_0x30d9aa(0x269)](writeFile,_0x8d2f59,_0x5394df),_0x8d2f59;}catch{return null;}}export async function featureGetReview(_0x15601f){const _0x2fda8e=_0x114e9e,_0x2f3163={'qpoHV':'No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','nUeXw':function(_0x50d6e5,_0x19796a){return _0x50d6e5>_0x19796a;},'HjiVb':function(_0x5f06c2,_0x121041,_0x3d32e7){return _0x5f06c2(_0x121041,_0x3d32e7);},'SGiIW':function(_0x3e4948,_0x232e3e){return _0x3e4948>_0x232e3e;},'ORXtK':function(_0x19ed57,_0x295a0a){return _0x19ed57+_0x295a0a;},'FaQqv':_0x2fda8e(0x260),'QZBvJ':_0x2fda8e(0x2bf),'FZZxL':function(_0x584e10,_0x4d1854){return _0x584e10===_0x4d1854;},'YHaUR':'point'},_0x1fdde1=_0x15601f||await getActiveFeatureId();if(!_0x1fdde1)throw new Error(_0x2f3163[_0x2fda8e(0x299)]);const _0x3edbaa=await getFeature(_0x1fdde1),{items:_0x5604c2}=await getActionItems(_0x1fdde1);console['log'](_0x2fda8e(0x297)+_0x3edbaa['name']+'\x20('+_0x3edbaa['id']+')\x0a');if(_0x5604c2['length']===0x0){console['log'](_0x2fda8e(0x28c));return;}for(let _0x3d9297=0x0;_0x3d9297<_0x5604c2[_0x2fda8e(0x2ac)];_0x3d9297++){const _0x54c56a=_0x5604c2[_0x3d9297],_0x57b781=_0x2f3163[_0x2fda8e(0x228)](_0x54c56a[_0x2fda8e(0x2ab)],0x1)?_0x2fda8e(0x248)+_0x54c56a[_0x2fda8e(0x2ab)]+')':'',_0x6fa2a1=await _0x2f3163[_0x2fda8e(0x1ef)](getItemFeedback,_0x1fdde1,_0x54c56a['id']);if(_0x2f3163['SGiIW'](_0x6fa2a1[_0x2fda8e(0x207)][_0x2fda8e(0x2ac)],0x0)){console[_0x2fda8e(0x23e)](_0x2fda8e(0x293)+_0x2f3163['ORXtK'](_0x3d9297,0x1)+':\x20\x22'+_0x54c56a[_0x2fda8e(0x253)]+'\x22'+_0x57b781+_0x2fda8e(0x2c6)+_0x6fa2a1[_0x2fda8e(0x207)]['length']+_0x2fda8e(0x289));for(const _0x110f65 of _0x6fa2a1[_0x2fda8e(0x207)]){const _0x248879=new Date(_0x110f65['createdAt'])['toLocaleDateString'](_0x2fda8e(0x23f),{'month':'short','day':_0x2fda8e(0x2c7)}),_0x334976=_0x110f65['authorName']||_0x110f65['authorEmail']||_0x2f3163['FaQqv'];console['log'](_0x2fda8e(0x2b9)+_0x334976+'\x20('+_0x248879+'):\x20\x22'+_0x110f65['content']+'\x22');if(_0x110f65['assetUrl']){const _0x54e401=await downloadFeedbackImage(_0x110f65['assetUrl'],_0x110f65['id']);_0x54e401&&console['log']('\x20\x20\x20\x20\x20📷\x20Screenshot:\x20'+_0x54e401);}if(_0x110f65['domRef']){const _0x37ce37=_0x110f65[_0x2fda8e(0x26d)]['selector'][_0x2fda8e(0x1ed)]('\x20>\x20')[_0x2fda8e(0x26e)]()?.[_0x2fda8e(0x1ed)](':')[0x0]||_0x2f3163['QZBvJ'],_0x2ec66b=_0x110f65['domRef']['textContent']?'\x20\x22'+_0x110f65[_0x2fda8e(0x26d)][_0x2fda8e(0x27d)]['slice'](0x0,0x3c)+'\x22':'';console[_0x2fda8e(0x23e)](_0x2fda8e(0x27c)+_0x37ce37+'>'+_0x2ec66b),console['log']('\x20\x20\x20\x20\x20📋\x20Selector:\x20'+_0x110f65[_0x2fda8e(0x26d)]['selector']);}else{if(_0x110f65[_0x2fda8e(0x1e1)]){const _0x1aad48=_0x110f65['spatial']['coordinates'];_0x2f3163[_0x2fda8e(0x257)](_0x110f65['spatial'][_0x2fda8e(0x29c)],_0x2f3163[_0x2fda8e(0x214)])&&_0x1aad48[_0x2fda8e(0x2ac)]>=0x2?console['log'](_0x2fda8e(0x1e5)+_0x1aad48[0x0][_0x2fda8e(0x1ea)](0x2)+',\x20'+_0x1aad48[0x1][_0x2fda8e(0x1ea)](0x2)+')'):console[_0x2fda8e(0x23e)]('\x20\x20\x20\x20\x20📍\x20Annotation:\x20'+_0x110f65[_0x2fda8e(0x1e1)]['type']+_0x2fda8e(0x29e)+_0x1aad48['map'](_0xf8795e=>_0xf8795e['toFixed'](0x2))[_0x2fda8e(0x2c9)](',\x20')+']');}}}if(_0x6fa2a1[_0x2fda8e(0x201)]){console[_0x2fda8e(0x23e)]('\x20\x20Expected\x20flow:');for(const _0x37240c of _0x6fa2a1[_0x2fda8e(0x201)][_0x2fda8e(0x1ed)]('\x0a')){console['log'](_0x2fda8e(0x237)+_0x37240c);}}}else console['log']('Scenario\x20'+_0x2f3163[_0x2fda8e(0x271)](_0x3d9297,0x1)+_0x2fda8e(0x243)+_0x54c56a['description']+'\x22'+_0x57b781+_0x2fda8e(0x221)),console['log'](_0x2fda8e(0x265));console[_0x2fda8e(0x23e)]('');}}export async function featureDelete(_0xa3a36b){const _0x386881=_0x114e9e,_0x55c1bb={'tCuMH':function(_0x3b2b47){return _0x3b2b47();},'dRwJD':'No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','wPUiK':function(_0x2b59de,_0x12a094){return _0x2b59de(_0x12a094);},'eremE':function(_0x4c503c,_0x208f8c){return _0x4c503c(_0x208f8c);},'GfFXX':function(_0x2cf1e8,_0x407b4d){return _0x2cf1e8+_0x407b4d;},'CPubY':_0x386881(0x2c2)},_0x5c66a8=_0xa3a36b||await _0x55c1bb[_0x386881(0x29b)](getActiveFeatureId);if(!_0x5c66a8)throw new Error(_0x55c1bb['dRwJD']);const _0x2ceef7=await _0x55c1bb[_0x386881(0x266)](getFeature,_0x5c66a8);await _0x55c1bb['eremE'](softDeleteFeature,_0x5c66a8),console[_0x386881(0x23e)]('\x0a🗑️\x20\x20Deleted\x20feature\x20review:\x20'+_0x2ceef7['name']+'\x20('+_0x5c66a8+')'),console[_0x386881(0x23e)](_0x55c1bb['GfFXX'](_0x55c1bb['CPubY'],_0x5c66a8));}export async function featureRestore(_0x3a1402){const _0xc66e07=_0x114e9e,_0x1f2db7={'DYCpO':function(_0x4b7541,_0x243319){return _0x4b7541(_0x243319);}};await _0x1f2db7['DYCpO'](restoreFeature,_0x3a1402);const _0x53b943=await getFeature(_0x3a1402);console['log'](_0xc66e07(0x275)+_0x53b943[_0xc66e07(0x1e4)]+'\x20('+_0x3a1402+')'),displayFeature(_0x53b943,_0x53b943['checklistItems']);}
1
+ const _0x1aa91e=_0x24b2;(function(_0x5e6c4c,_0x54634b){const _0x49d35d=_0x24b2,_0x2b3ca4=_0x5e6c4c();while(!![]){try{const _0x2ce4eb=parseInt(_0x49d35d(0x1c9))/0x1*(-parseInt(_0x49d35d(0x189))/0x2)+parseInt(_0x49d35d(0x1df))/0x3*(-parseInt(_0x49d35d(0x239))/0x4)+parseInt(_0x49d35d(0x1d5))/0x5+-parseInt(_0x49d35d(0x1a4))/0x6+-parseInt(_0x49d35d(0x207))/0x7*(-parseInt(_0x49d35d(0x1e7))/0x8)+-parseInt(_0x49d35d(0x21d))/0x9+-parseInt(_0x49d35d(0x1a2))/0xa*(-parseInt(_0x49d35d(0x1dd))/0xb);if(_0x2ce4eb===_0x54634b)break;else _0x2b3ca4['push'](_0x2b3ca4['shift']());}catch(_0x283c05){_0x2b3ca4['push'](_0x2b3ca4['shift']());}}}(_0xf350,0x4b27f));import{readFile,writeFile,mkdir}from'fs/promises';import{join}from'path';import{existsSync}from'fs';function _0x24b2(_0x2214dd,_0x453f7a){_0x2214dd=_0x2214dd-0x167;const _0xf35032=_0xf350();let _0x24b2ad=_0xf35032[_0x2214dd];return _0x24b2ad;}import{execSync}from'child_process';import _0x24e748 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=_0x1aa91e(0x1ed),bold=_0x3de9ed=>_0x1aa91e(0x208)+_0x3de9ed+_0x1aa91e(0x1a0);function getGitRepoUrl(){const _0x430611=_0x1aa91e,_0x2f01b0={'bHnDy':_0x430611(0x20a),'HDkld':'github.com/'};try{const _0x71f620=execSync('git\x20remote\x20get-url\x20origin',{'encoding':_0x430611(0x22f),'stdio':[_0x430611(0x20a),_0x2f01b0[_0x430611(0x1b8)],_0x430611(0x20a)]})[_0x430611(0x1f7)]();return _0x71f620['replace'](/\.git$/,'')['replace'](/^git@github\.com:/,_0x2f01b0[_0x430611(0x1fd)])['replace'](/^https?:\/\//,'');}catch{return undefined;}}function getGitBranch(){const _0x90f49d=_0x1aa91e,_0x579111={'LYsZb':function(_0x80740f,_0x221901,_0x2d9f03){return _0x80740f(_0x221901,_0x2d9f03);},'uejtM':_0x90f49d(0x20a)};try{return _0x579111['LYsZb'](execSync,'git\x20rev-parse\x20--abbrev-ref\x20HEAD',{'encoding':'utf-8','stdio':['pipe',_0x579111['uejtM'],_0x579111[_0x90f49d(0x20b)]]})['trim']();}catch{return undefined;}}export async function getActiveFeatureId(){const _0x5c7003=_0x1aa91e,_0x579e99={'wLRPp':function(_0x52849e,_0xf0a7a,_0x5d4483){return _0x52849e(_0xf0a7a,_0x5d4483);},'ofeXo':function(_0x4e802a){return _0x4e802a();},'yReqC':function(_0x51c3cd,_0x210fa4){return _0x51c3cd(_0x210fa4);},'fsXrZ':'utf-8'},_0x552515=_0x579e99[_0x5c7003(0x1d8)](join,_0x579e99[_0x5c7003(0x174)](getRangerDir),ACTIVE_FEATURE_FILE);if(!_0x579e99['yReqC'](existsSync,_0x552515))return null;try{const _0x57ac70=await readFile(_0x552515,_0x579e99['fsXrZ']);return _0x57ac70['trim']()||null;}catch{return null;}}async function setActiveFeatureId(_0x23caf3){const _0x489de9=_0x1aa91e,_0x286de8={'hqIAu':function(_0x26ee8d){return _0x26ee8d();},'pPnvV':function(_0x3d9c61,_0x19af4b,_0x1380eb){return _0x3d9c61(_0x19af4b,_0x1380eb);},'OZINg':function(_0x43f31f,_0x557ecf){return _0x43f31f(_0x557ecf);},'zdsEm':function(_0x4c10e2,_0x18b1ec,_0x567a3c,_0x34bea4){return _0x4c10e2(_0x18b1ec,_0x567a3c,_0x34bea4);}},_0x232c1b=_0x286de8['hqIAu'](getRangerDir),_0x7a7cba=_0x286de8['pPnvV'](join,_0x232c1b,ACTIVE_FEATURE_FILE);!_0x286de8[_0x489de9(0x1c5)](existsSync,_0x232c1b)&&await mkdir(_0x232c1b,{'recursive':!![]}),await _0x286de8[_0x489de9(0x1db)](writeFile,_0x7a7cba,_0x23caf3,_0x489de9(0x22f));}function getProgressDisplay(_0x44c618){const _0x36166e=_0x1aa91e,_0x29c226={'ZllUr':function(_0x7cf22f,_0x5114f4){return _0x7cf22f+_0x5114f4;},'LSbMe':function(_0x1c5a22,_0x3e13e1){return _0x1c5a22/_0x3e13e1;},'GOcbl':function(_0x326267,_0x33625c){return _0x326267-_0x33625c;},'sblSy':function(_0x5750de,_0x54f454){return _0x5750de>_0x54f454;}},_0x396ec3=_0x44c618['verifiedItems']||0x0,_0x50d773=_0x44c618['verificationInProgressItems']||0x0,_0x4f515a=_0x44c618['blockedItems']||0x0,_0x4e3e67=_0x44c618['incompleteItems']||0x0,_0x2a95d6=_0x44c618[_0x36166e(0x22a)]||0x0,_0x3ed735=_0x29c226['ZllUr'](_0x29c226[_0x36166e(0x223)](_0x396ec3+_0x50d773+_0x4f515a,_0x4e3e67),_0x2a95d6);if(_0x3ed735===0x0)return'-';const _0x2844f7=0xa,_0x4602ea=Math['round'](_0x29c226[_0x36166e(0x1d6)](_0x396ec3,_0x3ed735)*_0x2844f7),_0x4315b0=_0x29c226[_0x36166e(0x223)]('█'['repeat'](_0x4602ea),'░'['repeat'](_0x29c226['GOcbl'](_0x2844f7,_0x4602ea))),_0x70c647=[];if(_0x4f515a>0x0)_0x70c647[_0x36166e(0x219)](_0x4f515a+'\x20blocked');if(_0x29c226[_0x36166e(0x241)](_0x4e3e67,0x0))_0x70c647[_0x36166e(0x219)](_0x4e3e67+_0x36166e(0x1b9));if(_0x29c226['sblSy'](_0x50d773,0x0))_0x70c647[_0x36166e(0x219)](_0x50d773+_0x36166e(0x18d));const _0x252f0c=_0x70c647[_0x36166e(0x18b)]>0x0?'\x20('+_0x70c647[_0x36166e(0x180)](',\x20')+')':'';return _0x4315b0+'\x20'+_0x396ec3+'/'+_0x3ed735+'\x20verified'+_0x252f0c;}function getCurrentSessionItems(_0x431cbc,_0x51bdf2){const _0x1b6686=_0x1aa91e;if(!_0x431cbc['currentSessionId'])return _0x51bdf2['filter'](_0x3adba9=>!_0x3adba9[_0x1b6686(0x235)]);return _0x51bdf2['filter'](_0x4f2951=>_0x4f2951['sessionId']===_0x431cbc[_0x1b6686(0x210)]||!_0x4f2951[_0x1b6686(0x235)]);}function displayFeature(_0x1f3b60,_0x553e2c){const _0x49ed70=_0x1aa91e,_0x40286d={'zUIFh':function(_0x5046b8,_0x134549){return _0x5046b8(_0x134549);},'zlgca':function(_0x1f5f74,_0x2c8faa){return _0x1f5f74>_0x2c8faa;},'nYVjK':_0x49ed70(0x226),'LMrXO':function(_0x4ec29b,_0x70f58e){return _0x4ec29b===_0x70f58e;},'DClDe':'verified','UAaGn':function(_0x4e6934,_0x291dea){return _0x4e6934===_0x291dea;},'rBtDk':'verification_in_progress','iRZiQ':function(_0x4ba1d2,_0x376e9f){return _0x4ba1d2>_0x376e9f;},'wyaZe':function(_0x37f1bc,_0x505c9c){return _0x37f1bc!==_0x505c9c;},'ZVnCS':'incomplete','dcxpU':function(_0x2212fb,_0x48c2f1){return _0x2212fb===_0x48c2f1;}};console['log']('\x0a'+_0x1f3b60['name']+'\x20('+_0x1f3b60['dashboardUrl']+')');_0x1f3b60[_0x49ed70(0x1f6)]&&console['log'](_0x49ed70(0x1b3)+_0x40286d[_0x49ed70(0x188)](getProgressDisplay,_0x1f3b60[_0x49ed70(0x1f6)]));_0x1f3b60['description']&&console[_0x49ed70(0x168)](_0x49ed70(0x1ee)+_0x1f3b60['description']);_0x1f3b60[_0x49ed70(0x222)]&&console[_0x49ed70(0x168)]('\x20\x20\x20Repository:\x20'+_0x1f3b60[_0x49ed70(0x222)]);_0x1f3b60[_0x49ed70(0x1ca)]&&console[_0x49ed70(0x168)]('\x20\x20\x20Branch:\x20'+_0x1f3b60['gitBranch']);console[_0x49ed70(0x168)](_0x49ed70(0x22b)+new Date(_0x1f3b60['createdAt'])[_0x49ed70(0x1ff)]());_0x1f3b60['completedAt']&&console['log'](_0x49ed70(0x1d1)+new Date(_0x1f3b60['completedAt'])[_0x49ed70(0x1ff)]());if(_0x553e2c&&_0x40286d[_0x49ed70(0x1e1)](_0x553e2c['length'],0x0)){console[_0x49ed70(0x168)]('\x0a\x20\x20\x20Scenarios:');for(let _0x236b27=0x0;_0x236b27<_0x553e2c[_0x49ed70(0x18b)];_0x236b27++){const _0x3cb160=_0x553e2c[_0x236b27];let _0x5be76f;if(_0x3cb160['status']===_0x40286d['nYVjK']&&_0x40286d['LMrXO'](_0x3cb160['terminalReason'],_0x49ed70(0x243)))_0x5be76f='✅';else{if(_0x3cb160['status']===_0x40286d[_0x49ed70(0x19f)])_0x5be76f='🟢';else{if(_0x3cb160[_0x49ed70(0x1f4)]==='incomplete')_0x5be76f='🟠';else{if(_0x3cb160['status']==='blocked')_0x5be76f='🛑';else{if(_0x3cb160['status']===_0x40286d['nYVjK'])_0x5be76f='⛔';else _0x40286d['UAaGn'](_0x3cb160[_0x49ed70(0x1f4)],_0x40286d[_0x49ed70(0x1a7)])?_0x5be76f='⏳':_0x5be76f='⬜';}}}}const _0x59a090=_0x3cb160['version']>0x1?_0x49ed70(0x21c)+_0x3cb160[_0x49ed70(0x178)]+')':'',_0x13c146=_0x40286d[_0x49ed70(0x1f0)](_0x3cb160['version'],0x1)&&_0x3cb160['parentItemId']&&_0x40286d[_0x49ed70(0x21a)](_0x3cb160[_0x49ed70(0x1f4)],_0x40286d['nYVjK'])&&_0x3cb160[_0x49ed70(0x1f4)]!==_0x40286d['DClDe']?_0x49ed70(0x17a):'';console['log'](_0x49ed70(0x191)+(_0x236b27+0x1)+'.\x20'+_0x5be76f+'\x20'+_0x3cb160[_0x49ed70(0x1b6)]+_0x59a090+_0x13c146);_0x40286d[_0x49ed70(0x247)](_0x3cb160[_0x49ed70(0x1f4)],_0x49ed70(0x23c))&&_0x3cb160[_0x49ed70(0x1ef)]&&console[_0x49ed70(0x168)]('\x20\x20\x20\x20\x20\x20Blocked:\x20'+_0x3cb160['blockedReason']);_0x3cb160[_0x49ed70(0x1f4)]===_0x40286d[_0x49ed70(0x196)]&&_0x3cb160['incompleteReason']&&console['log'](_0x49ed70(0x216)+_0x3cb160[_0x49ed70(0x186)]);if(_0x3cb160['status']===_0x40286d['nYVjK']&&_0x40286d[_0x49ed70(0x247)](_0x3cb160[_0x49ed70(0x22c)],'approved'))console['log'](_0x49ed70(0x173));else _0x40286d['dcxpU'](_0x3cb160['status'],_0x40286d[_0x49ed70(0x16d)])&&_0x3cb160[_0x49ed70(0x1fe)]&&console[_0x49ed70(0x168)](_0x49ed70(0x1e9)+_0x3cb160[_0x49ed70(0x1fe)]);}}}export async function featureCreate(_0x5f38ca,_0x5b336a){const _0x366734=_0x1aa91e,_0x1e7706={'iyhYp':function(_0x3f7312,_0x527318){return _0x3f7312===_0x527318;},'DcfWv':function(_0x9a413a){return _0x9a413a();},'icPdA':function(_0x35eb16,_0xa62170){return _0x35eb16(_0xa62170);},'yWKgD':function(_0x563f21){return _0x563f21();},'pTjxf':'\x0aCreating\x20feature\x20review...','utlvS':function(_0x34b96b,_0xb86320){return _0x34b96b(_0xb86320);}},{envNames:_0x2c8fb2}=await getEnvNames();if(_0x1e7706[_0x366734(0x224)](_0x2c8fb2['length'],0x0)&&!process[_0x366734(0x1c3)]['RANGER_TEST_USERNAME']){let _0x313bba=0x0;try{_0x313bba=(await _0x1e7706[_0x366734(0x17b)](listCloudProfiles))[_0x366734(0x18b)];}catch{_0x313bba=0x1;}_0x313bba===0x0&&console['warn']('\x0a'+_0x1e7706['icPdA'](formatProfileRequiredMessage,_0xcdafeb=>bold(_0xcdafeb)));}const _0xcc14ab=_0x5b336a[_0x366734(0x242)]?_0x5b336a['scenarios'][_0x366734(0x17c)](_0x16c87a=>_0x16c87a['trim']()):[],_0x2cd7ed=_0x1e7706['yWKgD'](getGitRepoUrl),_0x14047f=getGitBranch();console[_0x366734(0x168)](_0x1e7706[_0x366734(0x23a)]);const _0x518538=await _0x1e7706['utlvS'](createFeature,{'name':_0x5f38ca,'description':_0x5b336a[_0x366734(0x1b6)],'checklist':_0xcc14ab,'gitRepoUrl':_0x2cd7ed,'gitBranch':_0x14047f});await _0x1e7706[_0x366734(0x1cc)](setActiveFeatureId,_0x518538['id']),await tryStartCurrentSession(_0x518538['id']);const _0x1c7652=process[_0x366734(0x1c3)]['CLAUDE_SESSION_ID'];_0x1c7652&&registerSession(_0x1c7652,_0x518538['id']),console[_0x366734(0x168)](_0x366734(0x193)+_0x518538['id']),displayFeature(_0x518538,_0x518538[_0x366734(0x1cd)]),console[_0x366734(0x168)]('\x0a➡️\x20\x20Set\x20as\x20active\x20feature\x20review');}export async function featureList(_0xa7938f){const _0x571b3b=_0x1aa91e,_0x197a21={'MIFil':function(_0x454914){return _0x454914();},'aHLSa':function(_0x274b9b,_0x4bca2b){return _0x274b9b>_0x4bca2b;},'BShHS':_0x571b3b(0x20f),'gHxxZ':function(_0x4e1eb1,_0x3bce3a){return _0x4e1eb1(_0x3bce3a);},'czmFr':function(_0x49af90,_0x34fb41){return _0x49af90+_0x34fb41;}},_0x31194b={'limit':_0xa7938f['limit']??0xa,'offset':_0xa7938f[_0x571b3b(0x1be)]??0x0,'includeDeleted':_0xa7938f['includeDeleted']};_0xa7938f['currentBranch']&&(_0x31194b[_0x571b3b(0x222)]=_0x197a21['MIFil'](getGitRepoUrl),_0x31194b['gitBranch']=getGitBranch());const _0xb1ca2a=await listFeatures(_0x31194b);if(_0xb1ca2a['items'][_0x571b3b(0x18b)]===0x0){console[_0x571b3b(0x168)]('\x0aNo\x20feature\x20reviews\x20found.');return;}const _0x20ffa4=_0x197a21['aHLSa'](_0xb1ca2a['totalCount'],_0xb1ca2a[_0x571b3b(0x214)][_0x571b3b(0x18b)])?_0x571b3b(0x1f8)+_0xb1ca2a[_0x571b3b(0x214)][_0x571b3b(0x18b)]+_0x571b3b(0x225)+_0xb1ca2a['totalCount']:_0xb1ca2a['totalCount']+'\x20feature\x20review(s)\x20found';console[_0x571b3b(0x168)]('\x0a'+_0x20ffa4+':\x0a');for(const _0xb0ed7b of _0xb1ca2a['items']){const _0x1e9954=_0x197a21['BShHS'][_0x571b3b(0x1bb)]('|');let _0x2eb248=0x0;while(!![]){switch(_0x1e9954[_0x2eb248++]){case'0':console[_0x571b3b(0x168)]('');continue;case'1':console[_0x571b3b(0x168)](_0x571b3b(0x22b)+new Date(_0xb0ed7b[_0x571b3b(0x240)])[_0x571b3b(0x1c6)]());continue;case'2':_0xb0ed7b['gitBranch']&&console['log']('\x20\x20\x20Branch:\x20'+_0xb0ed7b['gitBranch']);continue;case'3':console['log']('\x20\x20\x20ID:\x20'+_0xb0ed7b['id']);continue;case'4':_0xb0ed7b['stats']&&console['log'](_0x571b3b(0x1b3)+_0x197a21[_0x571b3b(0x169)](getProgressDisplay,_0xb0ed7b[_0x571b3b(0x1f6)]));continue;case'5':console[_0x571b3b(0x168)](''+_0xb0ed7b[_0x571b3b(0x16a)]);continue;}break;}}const _0x4396ce=_0x31194b[_0x571b3b(0x17d)]??0xa,_0x36549b=_0x197a21['czmFr'](_0x31194b[_0x571b3b(0x1be)]??0x0,_0xb1ca2a['items'][_0x571b3b(0x18b)]);if(_0x36549b<_0xb1ca2a[_0x571b3b(0x229)]){const _0x1b5ffe=_0x4396ce!==0xa?_0x571b3b(0x1e6)+_0x4396ce:'',_0x5acc42=_0xa7938f[_0x571b3b(0x215)]?'\x20--current-branch':'',_0x11005e=_0xa7938f['includeDeleted']?_0x571b3b(0x1ea):'';console['log']('Next\x20page:\x20ranger\x20list\x20--offset\x20'+_0x36549b+_0x1b5ffe+_0x5acc42+_0x11005e);}}export async function featureShow(_0xad52e4){const _0x1aa6a3=_0x1aa91e,_0x2ada67={'Yadqi':_0x1aa6a3(0x1e2),'OUqBU':function(_0x2e0c1,_0x16374a,_0x7b4c0a){return _0x2e0c1(_0x16374a,_0x7b4c0a);}},_0x4b655c=_0xad52e4||await getActiveFeatureId();if(!_0x4b655c)throw new Error(_0x2ada67['Yadqi']);const _0x467577=await getFeature(_0x4b655c);_0x2ada67['OUqBU'](displayFeature,_0x467577,_0x467577[_0x1aa6a3(0x1cd)]);}export async function featureResume(_0x2db0b3){const _0x18f469=_0x1aa91e,_0x29273f={'MZRXO':function(_0x3c804d,_0x1fcab3){return _0x3c804d(_0x1fcab3);},'CPrDl':function(_0x29bde5,_0x4811d7,_0x20e677){return _0x29bde5(_0x4811d7,_0x20e677);},'LvLWl':function(_0x5f33e3,_0x42d3d8){return _0x5f33e3(_0x42d3d8);},'SFvZd':'Not\x20in\x20a\x20git\x20repository.','XjHSK':function(_0x1f8267,_0x379f74){return _0x1f8267===_0x379f74;},'adjAC':'Please\x20specify\x20the\x20feature\x20review\x20ID:\x20ranger\x20resume\x20<id>','hRKII':'Multiple\x20feature\x20reviews\x20found.\x20Select\x20one:','ayqlv':function(_0x31f3d1,_0x2ffe2b,_0xfc8a9a){return _0x31f3d1(_0x2ffe2b,_0xfc8a9a);},'UVivx':function(_0x1c6620,_0x199aa8,_0x508b66){return _0x1c6620(_0x199aa8,_0x508b66);}};if(_0x2db0b3){const _0x16ed32=await _0x29273f[_0x18f469(0x167)](getFeature,_0x2db0b3);await setActiveFeatureId(_0x16ed32['id']);const _0xd1d561=getGitBranch();_0xd1d561&&_0xd1d561!==_0x16ed32['gitBranch']&&(await updateFeature(_0x16ed32['id'],{'gitBranch':_0xd1d561}),console['log']('\x20\x20\x20Updated\x20branch\x20to:\x20'+_0xd1d561));console['log']('\x0a✅\x20Resumed\x20feature\x20review:\x20'+_0x16ed32[_0x18f469(0x16a)]+'\x20('+_0x16ed32['id']+')'),await _0x29273f['MZRXO'](tryStartCurrentSession,_0x16ed32['id']);const _0xb6e0d2=process['env']['CLAUDE_SESSION_ID'];_0xb6e0d2&&registerSession(_0xb6e0d2,_0x16ed32['id']);_0x29273f[_0x18f469(0x232)](displayFeature,_0x16ed32,_0x16ed32[_0x18f469(0x1cd)]),await _0x29273f['LvLWl'](printFeedbackNudge,_0x16ed32['id']);return;}const _0x249fa0=getGitRepoUrl(),_0x511c7d=getGitBranch();if(!_0x249fa0&&!_0x511c7d)throw new Error(_0x29273f['SFvZd']);console[_0x18f469(0x168)]('\x0aSearching\x20for\x20feature\x20reviews\x20matching:\x20'+(_0x249fa0||_0x18f469(0x1e8))+_0x18f469(0x181)+(_0x511c7d||_0x18f469(0x1e8))+_0x18f469(0x1cf));const _0x507cae=await listFeatures({'gitRepoUrl':_0x249fa0,'gitBranch':_0x511c7d}),_0x5dcf37=_0x507cae[_0x18f469(0x214)][_0x18f469(0x1eb)](_0x74c376=>_0x74c376['status']?_0x74c376['status']!=='verified':!_0x74c376['completedAt']);if(_0x29273f[_0x18f469(0x183)](_0x5dcf37['length'],0x0)){console[_0x18f469(0x168)](_0x18f469(0x205)),console[_0x18f469(0x168)]('Run:\x20ranger\x20create\x20\x22<name>\x22\x20to\x20create\x20a\x20new\x20feature\x20review');return;}let _0x479864;if(_0x5dcf37['length']===0x1)_0x479864=_0x5dcf37[0x0];else{const _0x512474=process['stdin'][_0x18f469(0x1e5)]&&process['stdout'][_0x18f469(0x1e5)];if(!_0x512474){console[_0x18f469(0x168)](_0x18f469(0x182));for(const _0x2604d7 of _0x5dcf37){console[_0x18f469(0x168)]('\x20\x20'+_0x2604d7[_0x18f469(0x16a)]),console['log'](_0x18f469(0x1c8)+_0x2604d7['id']),_0x2604d7[_0x18f469(0x1f6)]&&console[_0x18f469(0x168)]('\x20\x20\x20\x20\x20Progress:\x20'+_0x29273f['MZRXO'](getProgressDisplay,_0x2604d7[_0x18f469(0x1f6)])),_0x2604d7[_0x18f469(0x1ca)]&&console['log']('\x20\x20\x20\x20\x20Branch:\x20'+_0x2604d7[_0x18f469(0x1ca)]);}throw new Error(_0x29273f['adjAC']);}const {selected:_0x1447ae}=await _0x24e748['prompt']([{'type':'list','name':_0x18f469(0x203),'message':_0x29273f['hRKII'],'choices':_0x5dcf37['map'](_0x2ae297=>({'name':_0x2ae297[_0x18f469(0x16a)]+'\x20('+_0x2ae297['id']+')','value':_0x2ae297['id']}))}]);_0x479864=_0x5dcf37['find'](_0x5ee6e3=>_0x5ee6e3['id']===_0x1447ae);}await setActiveFeatureId(_0x479864['id']);_0x511c7d&&_0x511c7d!==_0x479864[_0x18f469(0x1ca)]&&(await _0x29273f[_0x18f469(0x217)](updateFeature,_0x479864['id'],{'gitBranch':_0x511c7d}),console['log'](_0x18f469(0x1bd)+_0x511c7d));console['log'](_0x18f469(0x17e)+_0x479864['name']+'\x20('+_0x479864['id']+')'),await _0x29273f[_0x18f469(0x167)](tryStartCurrentSession,_0x479864['id']);const _0x404815=await getFeature(_0x479864['id']),_0x13658b=process[_0x18f469(0x1c3)]['CLAUDE_SESSION_ID'];_0x13658b&&_0x29273f['UVivx'](registerSession,_0x13658b,_0x404815['id']),_0x29273f['ayqlv'](displayFeature,_0x404815,_0x404815['checklistItems']),await printFeedbackNudge(_0x404815['id']);}async function printFeedbackNudge(_0x18577b){const _0x166a12=_0x1aa91e,_0x15d1a9={'xVSUO':function(_0x6536b9,_0x22237c){return _0x6536b9(_0x22237c);},'ZWNez':function(_0xd5982b,_0x5f0924){return _0xd5982b>_0x5f0924;},'TPCja':'\x20\x20\x20Run\x20`ranger\x20get-review`\x20to\x20see\x20what\x20needs\x20to\x20be\x20fixed.'};try{const {items:_0x7927d9}=await _0x15d1a9['xVSUO'](getActionItems,_0x18577b);let _0x5075c4=0x0,_0x146c32=0x0;for(const _0x3bf83a of _0x7927d9){const _0x1cda16=await getItemFeedback(_0x18577b,_0x3bf83a['id']);_0x15d1a9[_0x166a12(0x1dc)](_0x1cda16['unaddressedComments']['length'],0x0)&&(_0x5075c4+=_0x1cda16['unaddressedComments']['length'],_0x146c32++);}_0x15d1a9['ZWNez'](_0x5075c4,0x0)&&(console[_0x166a12(0x168)]('\x0a⚠️\x20\x20'+_0x5075c4+'\x20unaddressed\x20reviewer\x20comment(s)\x20across\x20'+_0x146c32+'\x20scenario(s).'),console['log'](_0x15d1a9[_0x166a12(0x194)]));}catch{}}function _0xf350(){const _0x2a31fa=['ZllUr','iyhYp','\x20of\x20','closed','riXqq','IpESt','totalCount','pendingItems','\x20\x20\x20Created:\x20','terminalReason','stdout','DBdWR','utf-8','IvJRP','\x0a❌\x20Cannot\x20edit\x20scenario:\x20feature\x20review\x20has\x20an\x20active\x20review.','CPrDl','lgUCs','xWPMl','sessionId','get','upvIh','/api/v1/mcp/browser-sessions/','4CgGejy','pTjxf','toFixed','blocked','completed','output','JeIeD','createdAt','sblSy','scenarios','approved','type','.md','write','UAaGn','stepName','MZRXO','log','gHxxZ','name','screenshotUrls','bVQjX','nYVjK','iteration','slice','\x0aGenerating\x20report...','Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','exit','\x20\x20\x20\x20\x20\x20Approved','ofeXo','assets','OGwgS','submittedAt','version','feedback-images','\x20[has\x20reviewer\x20feedback]','DcfWv','map','limit','\x0a✅\x20Resumed\x20feature\x20review:\x20','TVAMl','join','\x20/\x20','\x0aNon-interactive\x20mode\x20detected.\x20Multiple\x20feature\x20reviews\x20found:','XjHSK','CysfI','after','incompleteReason','find','zUIFh','22uiTDlb','No\x20scenarios\x20found.','length','\x0a✅\x20Scenario\x20updated','\x20in\x20progress','YOZGc','\x0aConcluding\x20session...','scenario','\x20\x20\x20','usoTq','\x0a✅\x20Feature\x20review\x20created:\x20','TPCja','json','ZVnCS','browserSessionId','\x20\x20\x20\x20','DtMXN','.\x20Feature\x20review\x20has\x20','\x20unaddressed\x20comment(s)','content','\x0a❌\x20No\x20scenario\x20number\x20provided.\x20Use\x20--scenario\x20<number>.','domRef','DClDe','\x1b[0m','zjfuj','582790zUSOUm','dYTYP','1364718TbvmNc','rJbLv','all','rBtDk','numeric','RWOPL','yNsyq','.png','from','short','completedAt','replace','cGWHD','textContent','pywZP','\x20\x20\x20Progress:\x20','KYdqb','\x20Session\x20','description','VVceJ','bHnDy','\x20incomplete','reports','split','\x20at\x20[','\x20\x20\x20Updated\x20branch\x20to:\x20','offset','error','TlWwT','blrpV','pop','env','\x0aAvailable\x20scenarios:','OZINg','toLocaleDateString','lXnGK','\x20\x20\x20\x20\x20ID:\x20','21739KDimxh','gitBranch','\x0a❌\x20No\x20scenarios\x20found\x20to\x20edit.','icPdA','checklistItems','Unknown','...','Scenario\x20','\x20\x20\x20Completed:\x20','/artifacts/','\x0a❌\x20Invalid\x20scenario\x20number(s):\x20','\x0a❌\x20Invalid\x20scenario\x20index:\x20','1774625lXmqOo','LSbMe','Please\x20finish\x20your\x20review\x20first:','wLRPp','dashboardUrl','VAdDS','zdsEm','ZWNez','143iKqUAd','vprdP','1152939wqCmEo','coordinates','zlgca','No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','SCIYi','kJMvP','isTTY','\x20--limit\x20','8JCavER','any','\x20\x20\x20\x20\x20\x20Cancelled:\x20','\x20--include-deleted','filter','linkedSession','active-feature.txt','\x20\x20\x20Description:\x20','blockedReason','iRZiQ','QbQyT','has','assetType','status','selector','stats','trim','Showing\x20','rRWvi','notes','\x0a❌\x20No\x20scenarios\x20found\x20to\x20include.','amjGB','HDkld','canceledReason','toLocaleString','Step\x20','storage','FKaYu','selected','No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','\x0aNo\x20matching\x20active\x20feature\x20reviews\x20found.','wzTmM','1045597YUKbnh','\x1b[1m','\x20concluded.','pipe','uejtM','Current\x20session\x20not\x20found.','\x20\x20\x20\x20\x20🎯\x20Element:\x20<','spatial','5|3|4|2|1|0','currentSessionId','in_progress','mxKaK','SgCim','items','currentBranch','\x20\x20\x20\x20\x20\x20Incomplete:\x20','ayqlv','\x20\x20✅\x20No\x20feedback\x20to\x20address','push','wyaZe','npVKH','\x20(v','928701tvxJQC','agentResponse','\x20\x20\x20To\x20restore\x20it,\x20run:\x20ranger\x20restore\x20','authorName','unaddressedComments','gitRepoUrl'];_0xf350=function(){return _0x2a31fa;};return _0xf350();}async function tryStartCurrentSession(_0xc634bc){const _0x1fddd9=_0x1aa91e,_0x1f2464={'rJbLv':function(_0x45a577,_0x4e8dc8){return _0x45a577(_0x4e8dc8);}};try{const {sessions:_0x5921ca}=await _0x1f2464[_0x1fddd9(0x1a5)](listFeatureSessions,_0xc634bc),_0x2f7d6c=_0x5921ca[_0x1fddd9(0x187)](_0x102b84=>_0x102b84['status']==='ready');_0x2f7d6c&&(await startSession(_0xc634bc,_0x2f7d6c['id']),console['log']('\x20\x20\x20▶️\x20Started\x20session\x20'+_0x2f7d6c['iteration']));}catch{}}export async function featureReport(_0x23ba56,_0x2ec276){const _0x2e4160=_0x1aa91e,_0xf59c2f={'QbQyT':function(_0x2c3ab3){return _0x2c3ab3();},'JeIeD':'No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','nXnES':_0x2e4160(0x170),'amjGB':_0x2e4160(0x1ba),'dYTYP':function(_0x20b2b0,_0x40edf5,_0x59e101){return _0x20b2b0(_0x40edf5,_0x59e101);},'uttOJ':function(_0x2b00c0,_0x5636d5){return _0x2b00c0(_0x5636d5);},'WzWvg':function(_0x348820,_0x5033a4,_0x2948db){return _0x348820(_0x5033a4,_0x2948db);},'upvIh':function(_0x583b7e,_0x89b69b,_0x3319de,_0x2bb03f){return _0x583b7e(_0x89b69b,_0x3319de,_0x2bb03f);}},_0x1f4fa9=_0x23ba56||await _0xf59c2f[_0x2e4160(0x1f1)](getActiveFeatureId);if(!_0x1f4fa9)throw new Error(_0xf59c2f[_0x2e4160(0x23f)]);console[_0x2e4160(0x168)](_0xf59c2f['nXnES']);const _0x278b3b=await getFeatureReportMarkdown(_0x1f4fa9,{'style':_0x2ec276['style']}),_0x5ae248=_0x2ec276[_0x2e4160(0x23e)]||join(getRangerDir(),_0xf59c2f[_0x2e4160(0x1fc)],_0x1f4fa9+_0x2e4160(0x245)),_0x1f9a0c=_0xf59c2f[_0x2e4160(0x1a3)](join,_0x5ae248,'..');!_0xf59c2f['uttOJ'](existsSync,_0x1f9a0c)&&await _0xf59c2f['WzWvg'](mkdir,_0x1f9a0c,{'recursive':!![]}),await _0xf59c2f[_0x2e4160(0x237)](writeFile,_0x5ae248,_0x278b3b,'utf-8'),console[_0x2e4160(0x168)]('\x0a✅\x20Report\x20generated:\x20'+_0x5ae248);}function getScenarioResult(_0x1c5ff7){const _0x2cb734=_0x1aa91e,_0x49a874={'Eflgv':function(_0xfce401,_0x3b6984){return _0xfce401===_0x3b6984;},'Nfypz':'closed','ukPbp':'verification_in_progress'};if(_0x49a874['Eflgv'](_0x1c5ff7['status'],_0x49a874['Nfypz']))return _0x1c5ff7[_0x2cb734(0x22c)]??_0x2cb734(0x226);if(_0x1c5ff7[_0x2cb734(0x1f4)]===_0x49a874['ukPbp'])return'in_progress';return _0x1c5ff7[_0x2cb734(0x1f4)];}function getScenarioRationale(_0x2ee7bf,_0x2c1e9a){const _0x53f9e1=_0x1aa91e;if(_0x2c1e9a)return _0x2c1e9a;if(_0x2ee7bf[_0x53f9e1(0x1ef)])return _0x2ee7bf['blockedReason'];if(_0x2ee7bf[_0x53f9e1(0x186)])return _0x2ee7bf['incompleteReason'];if(_0x2ee7bf['canceledReason'])return _0x2ee7bf['canceledReason'];if(_0x2ee7bf[_0x53f9e1(0x1fa)])return _0x2ee7bf['notes'];return null;}export async function featureReportPrDescription(_0x5dd64b,_0x3100f5){const _0x5bacb6=_0x1aa91e,_0x42eef8={'rRWvi':function(_0x19c0ac){return _0x19c0ac();},'yFFsg':'No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','CysfI':function(_0x480a96,_0x1ed622){return _0x480a96(_0x1ed622);},'TlWwT':function(_0x4142a6,_0xbe4763,_0x215473){return _0x4142a6(_0xbe4763,_0x215473);},'pywZP':function(_0x5c7ed8,_0x1cbe9f){return _0x5c7ed8===_0x1cbe9f;},'sygGX':function(_0x1c797f,_0x349153){return _0x1c797f>_0x349153;},'mxKaK':'\x0aAvailable\x20scenarios:','IvJRP':function(_0x249fae,_0x187d32){return _0x249fae<_0x187d32;},'npVKH':function(_0x4cc5f2,_0x1b8e65,_0x1547bc,_0x4480ce){return _0x4cc5f2(_0x1b8e65,_0x1547bc,_0x4480ce);}},_0x1ed268=_0x5dd64b||await _0x42eef8[_0x5bacb6(0x1f9)](getActiveFeatureId);if(!_0x1ed268)throw new Error(_0x42eef8['yFFsg']);const _0x1012d1=await _0x42eef8[_0x5bacb6(0x184)](getFeature,_0x1ed268),_0x162fec=_0x1012d1['checklistItems']||[],_0x25ec5e=_0x42eef8[_0x5bacb6(0x1c0)](getCurrentSessionItems,_0x1012d1,_0x162fec);_0x42eef8[_0x5bacb6(0x1b2)](_0x25ec5e['length'],0x0)&&(console[_0x5bacb6(0x1bf)](_0x5bacb6(0x1fb)),process['exit'](0x1));const _0x32c479=_0x3100f5['excludeScenarios']??[],_0x5c25c1=_0x32c479[_0x5bacb6(0x1eb)](_0x2cd1ee=>!Number['isInteger'](_0x2cd1ee)||_0x2cd1ee<0x1||_0x2cd1ee>_0x25ec5e[_0x5bacb6(0x18b)]);if(_0x42eef8['sygGX'](_0x5c25c1['length'],0x0)){console['error'](_0x5bacb6(0x1d3)+_0x5c25c1[_0x5bacb6(0x180)](',\x20')),console['log'](_0x42eef8[_0x5bacb6(0x212)]);for(let _0xb56252=0x0;_0x42eef8[_0x5bacb6(0x230)](_0xb56252,_0x25ec5e[_0x5bacb6(0x18b)]);_0xb56252++){console['log']('\x20\x20'+(_0xb56252+0x1)+'.\x20'+_0x25ec5e[_0xb56252]['description']);}process['exit'](0x1);}const _0x280228=new Set(_0x32c479['map'](_0x2a2e27=>_0x2a2e27-0x1)),_0x307367=_0x25ec5e['filter']((_0x18778a,_0x5e5756)=>!_0x280228[_0x5bacb6(0x1f2)](_0x5e5756));_0x307367['length']===0x0&&(console[_0x5bacb6(0x1bf)]('\x0a❌\x20All\x20scenarios\x20were\x20excluded.'),process['exit'](0x1));if(_0x3100f5[_0x5bacb6(0x195)])await _0x42eef8[_0x5bacb6(0x21b)](outputJsonReport,_0x1ed268,_0x1012d1,_0x307367);else{const _0x5c7f47=await getFeatureReportMarkdown(_0x1ed268,{'itemIds':_0x307367[_0x5bacb6(0x17c)](_0x5114c0=>_0x5114c0['id'])});process['stdout'][_0x5bacb6(0x246)](_0x5c7f47['trimEnd']()+'\x0a');}}async function outputJsonReport(_0x44af4c,_0x1aeda8,_0x5541e5){const _0x6b50=_0x1aa91e,_0x13cba6={'RWOPL':function(_0x25014c,_0x5c7cad){return _0x25014c===_0x5c7cad;},'IpESt':function(_0x363c80,_0x304ab1){return _0x363c80(_0x304ab1);},'dlUqa':function(_0x5f4f57,_0x371840,_0xc668a8){return _0x5f4f57(_0x371840,_0xc668a8);},'zjfuj':function(_0x5a3caa){return _0x5a3caa();},'TVAMl':function(_0x30e560,_0x4f51ef){return _0x30e560(_0x4f51ef);},'vprdP':function(_0x195319,_0x338768){return _0x195319+_0x338768;}},_0xb22b16=_0x13cba6[_0x6b50(0x1a1)](getApiBaseUrl),_0x58e928=await _0x13cba6[_0x6b50(0x17f)](getFeatureReport,_0x44af4c),_0x4760aa=new Map(_0x58e928[_0x6b50(0x1cd)][_0x6b50(0x17c)](_0x52d3e7=>[_0x52d3e7['id'],_0x52d3e7])),_0x5dce13=await Promise[_0x6b50(0x1a6)](_0x5541e5[_0x6b50(0x17c)](async _0x105ae6=>{const _0x3cdac1=_0x6b50,_0x20e9d6=_0x4760aa[_0x3cdac1(0x236)](_0x105ae6['id']),_0x545666=_0x20e9d6?.[_0x3cdac1(0x1ec)]??null;let _0x223380=[];if(_0x105ae6[_0x3cdac1(0x197)])try{const {steps:_0x6575f5}=await getBrowserSessionSteps(_0x105ae6['browserSessionId']);_0x6575f5['length']>0x0&&(_0x223380=_0x6575f5[_0x3cdac1(0x17c)](_0x29e367=>{const _0x2702bc=_0x3cdac1,_0x3eca98=_0x29e367[_0x2702bc(0x175)][_0x2702bc(0x187)](_0x29140b=>_0x29140b['assetType']==='screenshot'&&_0x29140b['timing']===_0x2702bc(0x185))??_0x29e367['assets']['find'](_0x427a8e=>_0x427a8e[_0x2702bc(0x1f3)]==='screenshot');let _0x43cd80=null,_0x274d67=null;if(_0x3eca98){const _0x1d1f6f=_0x3eca98[_0x2702bc(0x201)]['location']['split']('/')[_0x2702bc(0x1c2)]();_0x43cd80=_0xb22b16+_0x2702bc(0x238)+_0x105ae6[_0x2702bc(0x197)]+_0x2702bc(0x1d2)+_0x1d1f6f,_0x1d1f6f&&(_0x274d67=_0x1d1f6f[_0x2702bc(0x1af)](/\.\w+$/,'')[_0x2702bc(0x1af)](/^(key_)?\d+_/,'')['replace'](/[-_]/g,'\x20'));}return{'description':_0x274d67||_0x29e367[_0x2702bc(0x1b6)]||_0x29e367[_0x2702bc(0x248)]||_0x2702bc(0x200)+_0x29e367['position'],'screenshot':_0x43cd80,'is_key_step':_0x29e367['isKeyStep']};}));}catch{}return _0x13cba6[_0x3cdac1(0x1a9)](_0x223380['length'],0x0)&&_0x545666?.[_0x3cdac1(0x16b)]&&(_0x223380=_0x545666['screenshotUrls'][_0x3cdac1(0x17c)]((_0x3f0e80,_0x36eaa1)=>({'description':'Screenshot\x20'+(_0x36eaa1+0x1),'screenshot':_0x3f0e80,'is_key_step':![]}))),{'description':_0x105ae6['description'],'result':_0x13cba6[_0x3cdac1(0x228)](getScenarioResult,_0x105ae6),'rationale':_0x13cba6['dlUqa'](getScenarioRationale,_0x105ae6,_0x545666?.[_0x3cdac1(0x21e)]),'steps':_0x223380};})),_0x2ca5bc={'url':_0x1aeda8[_0x6b50(0x1d9)],'scenarios':_0x5dce13};process[_0x6b50(0x22d)][_0x6b50(0x246)](_0x13cba6[_0x6b50(0x1de)](JSON['stringify'](_0x2ca5bc,null,0x2),'\x0a'));}export async function featureConcludeSession(_0x3787f8){const _0x5b21c0=_0x1aa91e,_0x20ce67={'ZNamf':function(_0x2586aa){return _0x2586aa();},'VAdDS':function(_0x4eab77,_0x2b23da){return _0x4eab77(_0x2b23da);},'yNsyq':function(_0x457161,_0x5fd331){return _0x457161!==_0x5fd331;},'riXqq':'in_progress','PnXNC':function(_0xc6d73f,_0x452986,_0x51d6e2){return _0xc6d73f(_0x452986,_0x51d6e2);}},_0x275009=_0x3787f8||await _0x20ce67['ZNamf'](getActiveFeatureId);if(!_0x275009)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 _0x18a2d9=await getFeature(_0x275009);if(!_0x18a2d9[_0x5b21c0(0x210)])throw new Error('No\x20active\x20session\x20for\x20this\x20feature\x20review.');const {sessions:_0x4d6ed3}=await _0x20ce67[_0x5b21c0(0x1da)](listFeatureSessions,_0x275009),_0xae3fc8=_0x4d6ed3['find'](_0xf46a78=>_0xf46a78['id']===_0x18a2d9['currentSessionId']);if(!_0xae3fc8)throw new Error(_0x5b21c0(0x20c));if(_0xae3fc8[_0x5b21c0(0x1f4)]===_0x5b21c0(0x23d)){console[_0x5b21c0(0x168)]('\x0a✅\x20Session\x20is\x20already\x20completed.');return;}if(_0x20ce67[_0x5b21c0(0x1aa)](_0xae3fc8[_0x5b21c0(0x1f4)],_0x20ce67[_0x5b21c0(0x227)]))throw new Error('Cannot\x20conclude\x20session\x20with\x20status:\x20'+_0xae3fc8['status']);console[_0x5b21c0(0x168)](_0x5b21c0(0x18f)),await _0x20ce67['PnXNC'](concludeSession,_0x275009,_0x18a2d9[_0x5b21c0(0x210)]),console['log']('\x0a✅\x20Session\x20'+_0xae3fc8[_0x5b21c0(0x16e)]+_0x5b21c0(0x209)),console[_0x5b21c0(0x168)]('\x20\x20\x20The\x20feature\x20review\x20is\x20now\x20ready\x20for\x20human\x20review\x20on\x20the\x20Ranger\x20dashboard.');}export async function featureSessions(_0x479a91){const _0x345e55=_0x1aa91e,_0x5ee9ca={'kEJGy':function(_0x2eec89){return _0x2eec89();},'kJMvP':function(_0x10e518,_0x2cab35){return _0x10e518===_0x2cab35;},'mRCfA':function(_0x69e306,_0x4cd479){return _0x69e306===_0x4cd479;}},_0x58071c=_0x479a91||await _0x5ee9ca['kEJGy'](getActiveFeatureId);if(!_0x58071c)throw new Error(_0x345e55(0x204));const _0x5a5fcd=await getFeature(_0x58071c);console['log']('\x0a📁\x20Sessions\x20for\x20feature\x20review:\x20'+_0x5a5fcd[_0x345e55(0x16a)]+'\x0a');const {sessions:_0x4ba8b0}=await listFeatureSessions(_0x58071c);if(_0x5ee9ca[_0x345e55(0x1e4)](_0x4ba8b0['length'],0x0)){console['log']('No\x20sessions\x20found.');return;}for(const _0x4260ee of _0x4ba8b0){const _0x1af65d=_0x5ee9ca['kJMvP'](_0x4260ee['status'],'completed')?'✅':_0x5ee9ca['mRCfA'](_0x4260ee[_0x345e55(0x1f4)],_0x345e55(0x211))?'🔄':'▶️';console['log'](_0x1af65d+_0x345e55(0x1b5)+_0x4260ee['iteration']+'\x20('+_0x4260ee['id']+')'),console['log']('\x20\x20\x20Status:\x20'+_0x4260ee['status']),console[_0x345e55(0x168)](_0x345e55(0x22b)+new Date(_0x4260ee[_0x345e55(0x240)])['toLocaleString']()),_0x4260ee[_0x345e55(0x1ae)]&&console[_0x345e55(0x168)]('\x20\x20\x20Completed:\x20'+new Date(_0x4260ee[_0x345e55(0x1ae)])['toLocaleString']()),console[_0x345e55(0x168)]('');}}export async function featureAddScenario(_0x2aad7b,_0x15955c){const _0x491e91=_0x1aa91e,_0x477e94=_0x15955c||await getActiveFeatureId();if(!_0x477e94)throw new Error(_0x491e91(0x1e2));const _0x1d781c=await getFeature(_0x477e94);if(_0x1d781c['latestReview']&&!_0x1d781c['latestReview'][_0x491e91(0x177)])throw new Error('Cannot\x20add\x20scenario:\x20feature\x20review\x20has\x20an\x20active\x20review.\x20Please\x20finish\x20your\x20review\x20first:\x20'+_0x1d781c['dashboardUrl']);await createChecklistItem(_0x477e94,_0x2aad7b);const _0x3a21fc=await getFeature(_0x477e94);console[_0x491e91(0x168)]('\x0a✅\x20Scenario\x20added'),displayFeature(_0x3a21fc,_0x3a21fc['checklistItems']);}export async function featureEditScenario(_0x20d2e6,_0x46a165){const _0x25c062=_0x1aa91e,_0x2466ac={'YOZGc':function(_0x5b7681){return _0x5b7681();},'XkQLf':'\x0a❌\x20No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','KYdqb':function(_0x2a40f8,_0x329f62){return _0x2a40f8(_0x329f62);},'OxgpP':_0x25c062(0x231),'rZZhQ':_0x25c062(0x1d7),'lXnGK':_0x25c062(0x1cb),'qgBiD':function(_0x228c3f,_0x3f8138){return _0x228c3f===_0x3f8138;},'blrpV':_0x25c062(0x19d),'FKaYu':function(_0x4c5aae,_0x1b4905){return _0x4c5aae<_0x1b4905;},'VVceJ':function(_0x1f7bb3,_0x58a6a3){return _0x1f7bb3-_0x58a6a3;},'SCIYi':function(_0x586f9b,_0x2a2c01){return _0x586f9b<_0x2a2c01;},'cGWHD':function(_0x49fb6d,_0x11a639){return _0x49fb6d>=_0x11a639;},'lgUCs':function(_0x365d51,_0x52b589){return _0x365d51<_0x52b589;},'wzTmM':function(_0x426be2,_0x55981f){return _0x426be2+_0x55981f;},'FiqCY':function(_0x14ba57,_0x108631,_0x4a416d,_0x520455){return _0x14ba57(_0x108631,_0x4a416d,_0x520455);}},_0xf60330=_0x46a165['id']||await _0x2466ac[_0x25c062(0x18e)](getActiveFeatureId);!_0xf60330&&(console['error'](_0x2466ac['XkQLf']),console[_0x25c062(0x1bf)](_0x25c062(0x171)),process['exit'](0x1));const _0xea0a23=await _0x2466ac[_0x25c062(0x1b4)](getFeature,_0xf60330);_0xea0a23['latestReview']&&!_0xea0a23['latestReview'][_0x25c062(0x177)]&&(console[_0x25c062(0x1bf)](_0x2466ac['OxgpP']),console['error'](_0x2466ac['rZZhQ']),console[_0x25c062(0x1bf)]('\x20\x20'+_0xea0a23['dashboardUrl']),process[_0x25c062(0x172)](0x1));const _0xb71db5=_0xea0a23['checklistItems']||[];_0xb71db5[_0x25c062(0x18b)]===0x0&&(console['error'](_0x2466ac[_0x25c062(0x1c7)]),process[_0x25c062(0x172)](0x1));if(_0x2466ac['qgBiD'](_0x46a165['scenario'],undefined)){console[_0x25c062(0x1bf)](_0x2466ac[_0x25c062(0x1c1)]),console[_0x25c062(0x168)](_0x25c062(0x1c4));for(let _0x53adaf=0x0;_0x2466ac[_0x25c062(0x202)](_0x53adaf,_0xb71db5[_0x25c062(0x18b)]);_0x53adaf++){console['log']('\x20\x20'+(_0x53adaf+0x1)+'.\x20'+_0xb71db5[_0x53adaf]['description']);}process[_0x25c062(0x172)](0x1);}const _0x56f846=_0x2466ac[_0x25c062(0x1b7)](_0x46a165[_0x25c062(0x190)],0x1);if(_0x2466ac[_0x25c062(0x1e3)](_0x56f846,0x0)||_0x2466ac[_0x25c062(0x1b0)](_0x56f846,_0xb71db5['length'])){console['error'](_0x25c062(0x1d4)+_0x46a165['scenario']+_0x25c062(0x19a)+_0xb71db5[_0x25c062(0x18b)]+'\x20scenarios.'),console[_0x25c062(0x168)](_0x25c062(0x1c4));for(let _0xa47149=0x0;_0x2466ac[_0x25c062(0x233)](_0xa47149,_0xb71db5[_0x25c062(0x18b)]);_0xa47149++){console[_0x25c062(0x168)]('\x20\x20'+_0x2466ac[_0x25c062(0x206)](_0xa47149,0x1)+'.\x20'+_0xb71db5[_0xa47149]['description']);}process['exit'](0x1);}const _0x36dbec=_0xb71db5[_0x56f846];await _0x2466ac['FiqCY'](updateChecklistItem,_0xf60330,_0x36dbec['id'],{'description':_0x20d2e6});const _0xa1a18d=await getFeature(_0xf60330);console[_0x25c062(0x168)](_0x25c062(0x18c)),displayFeature(_0xa1a18d,_0xa1a18d['checklistItems']);}async function downloadFeedbackImage(_0x5851b7,_0x301dbc){const _0x120f76=_0x1aa91e,_0x596820={'bVQjX':function(_0xd0788){return _0xd0788();},'nQDNn':_0x120f76(0x179),'OGwgS':function(_0x4f040d,_0x7e21c3,_0x3e26c9){return _0x4f040d(_0x7e21c3,_0x3e26c9);},'rVDYf':function(_0x2cc3c0,_0x35c940){return _0x2cc3c0(_0x35c940);}};try{const _0x6c5c41=join(_0x596820[_0x120f76(0x16c)](getRangerDir),_0x596820['nQDNn']);await mkdir(_0x6c5c41,{'recursive':!![]});const _0x2c6da3=_0x596820[_0x120f76(0x176)](join,_0x6c5c41,'comment_'+_0x301dbc+_0x120f76(0x1ab)),_0x4b4155=await _0x596820['rVDYf'](fetch,_0x5851b7);if(!_0x4b4155['ok'])return null;const _0x37ac05=Buffer[_0x120f76(0x1ac)](await _0x4b4155['arrayBuffer']());return await writeFile(_0x2c6da3,_0x37ac05),_0x2c6da3;}catch{return null;}}export async function featureGetReview(_0x5ea486){const _0x222dfb=_0x1aa91e,_0x154223={'PpFJZ':function(_0x4d2c2d){return _0x4d2c2d();},'DtMXN':function(_0x490e4d,_0x3b5e08){return _0x490e4d(_0x3b5e08);},'OIGvP':function(_0x4f3966,_0x45c43a){return _0x4f3966===_0x45c43a;},'oeWsK':_0x222dfb(0x18a),'usoTq':function(_0x4e0263,_0x1a5da7){return _0x4e0263>_0x1a5da7;},'CLXMT':function(_0x5792d7,_0x2b4c57){return _0x5792d7+_0x2b4c57;},'xWPMl':_0x222dfb(0x1ad),'SgCim':_0x222dfb(0x1a8),'DBdWR':_0x222dfb(0x1ce),'AIyzK':'\x20>\x20'},_0x3a1a7e=_0x5ea486||await _0x154223['PpFJZ'](getActiveFeatureId);if(!_0x3a1a7e)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 _0x4240b8=await _0x154223[_0x222dfb(0x199)](getFeature,_0x3a1a7e),{items:_0x348eb5}=await getActionItems(_0x3a1a7e);console[_0x222dfb(0x168)]('\x0a📋\x20Feedback\x20for:\x20'+_0x4240b8['name']+'\x20('+_0x4240b8['id']+')\x0a');if(_0x154223['OIGvP'](_0x348eb5[_0x222dfb(0x18b)],0x0)){console['log'](_0x154223['oeWsK']);return;}for(let _0x3e9caf=0x0;_0x3e9caf<_0x348eb5[_0x222dfb(0x18b)];_0x3e9caf++){const _0x2d0b47=_0x348eb5[_0x3e9caf],_0xd31d2b=_0x2d0b47[_0x222dfb(0x178)]>0x1?_0x222dfb(0x21c)+_0x2d0b47[_0x222dfb(0x178)]+')':'',_0x20b84e=await getItemFeedback(_0x3a1a7e,_0x2d0b47['id']);if(_0x154223[_0x222dfb(0x192)](_0x20b84e[_0x222dfb(0x221)][_0x222dfb(0x18b)],0x0)){console[_0x222dfb(0x168)](_0x222dfb(0x1d0)+_0x154223['CLXMT'](_0x3e9caf,0x1)+':\x20\x22'+_0x2d0b47[_0x222dfb(0x1b6)]+'\x22'+_0xd31d2b+'\x20—\x20'+_0x20b84e[_0x222dfb(0x221)]['length']+_0x222dfb(0x19b));for(const _0x2bbfe2 of _0x20b84e['unaddressedComments']){const _0x26f2b4=new Date(_0x2bbfe2[_0x222dfb(0x240)])['toLocaleDateString']('en-US',{'month':_0x154223[_0x222dfb(0x234)],'day':_0x154223[_0x222dfb(0x213)]}),_0x404042=_0x2bbfe2[_0x222dfb(0x220)]||_0x2bbfe2['authorEmail']||_0x154223[_0x222dfb(0x22e)];console['log']('\x20\x20💬\x20'+_0x404042+'\x20('+_0x26f2b4+'):\x20\x22'+_0x2bbfe2[_0x222dfb(0x19c)]+'\x22');if(_0x2bbfe2['assetUrl']){const _0x5d2171=await downloadFeedbackImage(_0x2bbfe2['assetUrl'],_0x2bbfe2['id']);_0x5d2171&&console['log']('\x20\x20\x20\x20\x20📷\x20Screenshot:\x20'+_0x5d2171);}if(_0x2bbfe2[_0x222dfb(0x19e)]){const _0x293eb9=_0x2bbfe2['domRef'][_0x222dfb(0x1f5)][_0x222dfb(0x1bb)](_0x154223['AIyzK'])['pop']()?.[_0x222dfb(0x1bb)](':')[0x0]||'element',_0x3e2601=_0x2bbfe2[_0x222dfb(0x19e)][_0x222dfb(0x1b1)]?'\x20\x22'+_0x2bbfe2['domRef'][_0x222dfb(0x1b1)][_0x222dfb(0x16f)](0x0,0x3c)+'\x22':'';console[_0x222dfb(0x168)](_0x222dfb(0x20d)+_0x293eb9+'>'+_0x3e2601),console['log']('\x20\x20\x20\x20\x20📋\x20Selector:\x20'+_0x2bbfe2['domRef']['selector']);}else{if(_0x2bbfe2[_0x222dfb(0x20e)]){const _0x295024=_0x2bbfe2[_0x222dfb(0x20e)][_0x222dfb(0x1e0)];_0x2bbfe2['spatial']['type']==='point'&&_0x295024['length']>=0x2?console['log']('\x20\x20\x20\x20\x20📍\x20Annotation:\x20point\x20at\x20('+_0x295024[0x0]['toFixed'](0x2)+',\x20'+_0x295024[0x1][_0x222dfb(0x23b)](0x2)+')'):console[_0x222dfb(0x168)]('\x20\x20\x20\x20\x20📍\x20Annotation:\x20'+_0x2bbfe2[_0x222dfb(0x20e)][_0x222dfb(0x244)]+_0x222dfb(0x1bc)+_0x295024['map'](_0x3fcec9=>_0x3fcec9['toFixed'](0x2))[_0x222dfb(0x180)](',\x20')+']');}}}if(_0x20b84e['canonicalFlow']){console[_0x222dfb(0x168)]('\x20\x20Expected\x20flow:');for(const _0x17b339 of _0x20b84e['canonicalFlow']['split']('\x0a')){console['log'](_0x222dfb(0x198)+_0x17b339);}}}else console['log']('Scenario\x20'+(_0x3e9caf+0x1)+':\x20\x22'+_0x2d0b47[_0x222dfb(0x1b6)]+'\x22'+_0xd31d2b+'\x20—\x20no\x20comments'),console[_0x222dfb(0x168)](_0x222dfb(0x218));console[_0x222dfb(0x168)]('');}}export async function featureDelete(_0x251a9e){const _0x1dde4e=_0x1aa91e,_0x2dc16f={'gqzuk':'No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','njqpQ':function(_0x4e63f7,_0x49c7c6){return _0x4e63f7+_0x49c7c6;},'QBDMp':_0x1dde4e(0x21f)},_0x3bf86f=_0x251a9e||await getActiveFeatureId();if(!_0x3bf86f)throw new Error(_0x2dc16f['gqzuk']);const _0x47ffd2=await getFeature(_0x3bf86f);await softDeleteFeature(_0x3bf86f),console['log']('\x0a🗑️\x20\x20Deleted\x20feature\x20review:\x20'+_0x47ffd2['name']+'\x20('+_0x3bf86f+')'),console['log'](_0x2dc16f['njqpQ'](_0x2dc16f['QBDMp'],_0x3bf86f));}export async function featureRestore(_0x55f4a0){const _0x91aef8=_0x1aa91e;await restoreFeature(_0x55f4a0);const _0x1ae81b=await getFeature(_0x55f4a0);console['log']('\x0a✅\x20Restored\x20feature\x20review:\x20'+_0x1ae81b[_0x91aef8(0x16a)]+'\x20('+_0x55f4a0+')'),displayFeature(_0x1ae81b,_0x1ae81b[_0x91aef8(0x1cd)]);}
@@ -1 +1 @@
1
- (function(_0x48d4a5,_0x288efa){const _0x55ef18=_0x2695,_0x137a68=_0x48d4a5();while(!![]){try{const _0x46cf33=parseInt(_0x55ef18(0x1c3))/0x1+-parseInt(_0x55ef18(0x1c8))/0x2+-parseInt(_0x55ef18(0x1c9))/0x3+-parseInt(_0x55ef18(0x1cb))/0x4+-parseInt(_0x55ef18(0x1d1))/0x5+parseInt(_0x55ef18(0x1cd))/0x6+-parseInt(_0x55ef18(0x1c5))/0x7*(-parseInt(_0x55ef18(0x1cc))/0x8);if(_0x46cf33===_0x288efa)break;else _0x137a68['push'](_0x137a68['shift']());}catch(_0x23350b){_0x137a68['push'](_0x137a68['shift']());}}}(_0x4c58,0x28039));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 installCancellationHandlers(){const _0x27a8a3=_0x2695,_0x2d724f={'HjjNm':_0x27a8a3(0x1c4),'iwDEw':_0x27a8a3(0x1d0),'xkFKE':'SIGHUP'};if(cancellationHandlersInstalled)return;const _0x216a21=()=>{process['exit'](0x0);};process['once'](_0x2d724f['HjjNm'],_0x216a21),process['once'](_0x2d724f['iwDEw'],_0x216a21),process['once'](_0x2d724f[_0x27a8a3(0x1ce)],_0x216a21),cancellationHandlersInstalled=!![];}function _0x2695(_0x42db2b,_0x1c196c){_0x42db2b=_0x42db2b-0x1c3;const _0x4c581c=_0x4c58();let _0x269506=_0x4c581c[_0x42db2b];return _0x269506;}export async function hook(_0x3a66b3,_0x42a159){const _0x340da8=_0x2695,_0x16aece={'fFLbf':function(_0x53e88e,_0x2da120){return _0x53e88e(_0x2da120);}};installCancellationHandlers();const _0x5ad5c0=HOOKS[_0x3a66b3];if(!_0x5ad5c0){const _0x51ad7c=Object[_0x340da8(0x1c6)](HOOKS)['join'](',\x20');console[_0x340da8(0x1cf)]('Unknown\x20hook:\x20'+_0x3a66b3),console[_0x340da8(0x1cf)](_0x340da8(0x1ca)+_0x51ad7c),process[_0x340da8(0x1c7)](0x1);}await _0x16aece['fFLbf'](_0x5ad5c0,_0x42a159);}function _0x4c58(){const _0x167397=['40587MtIyvc','Valid\x20hooks:\x20','824196TAFgxO','4422984AJRksH','1168764nwYtyi','xkFKE','error','SIGTERM','843510CgGAii','8803QibZKB','SIGINT','7nfgyuJ','keys','exit','408586RgCRer'];_0x4c58=function(){return _0x167397;};return _0x4c58();}
1
+ (function(_0x4b3518,_0xabc1e){const _0x2e38d7=_0x4029,_0x1c6331=_0x4b3518();while(!![]){try{const _0xc56210=parseInt(_0x2e38d7(0xf3))/0x1+-parseInt(_0x2e38d7(0xf4))/0x2*(parseInt(_0x2e38d7(0xf9))/0x3)+parseInt(_0x2e38d7(0xf8))/0x4*(parseInt(_0x2e38d7(0xf6))/0x5)+-parseInt(_0x2e38d7(0xfa))/0x6+parseInt(_0x2e38d7(0xf7))/0x7+parseInt(_0x2e38d7(0xf5))/0x8+-parseInt(_0x2e38d7(0xf0))/0x9;if(_0xc56210===_0xabc1e)break;else _0x1c6331['push'](_0x1c6331['shift']());}catch(_0x17c503){_0x1c6331['push'](_0x1c6331['shift']());}}}(_0x52c7,0x24f83));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 _0x52c7(){const _0x489f51=['keys','SIGINT','186691FQFIoV','160NYIRHA','2181168cGXNiy','38015roEZNd','1328852DNSLKU','36fhkEGT','10047oOAhzu','1552380cJtdNT','exit','drVXx','Unknown\x20hook:\x20','355707sdihrH'];_0x52c7=function(){return _0x489f51;};return _0x52c7();}function installCancellationHandlers(){const _0x11b6ab=_0x4029,_0xf186eb={'drVXx':_0x11b6ab(0xf2)};if(cancellationHandlersInstalled)return;const _0x5a733e=()=>{process['exit'](0x0);};process['once'](_0xf186eb[_0x11b6ab(0xee)],_0x5a733e),process['once']('SIGTERM',_0x5a733e),process['once']('SIGHUP',_0x5a733e),cancellationHandlersInstalled=!![];}function _0x4029(_0x8d4de1,_0xafa85e){_0x8d4de1=_0x8d4de1-0xed;const _0x52c7d3=_0x52c7();let _0x40296b=_0x52c7d3[_0x8d4de1];return _0x40296b;}export async function hook(_0x480e02,_0x3a2f74){const _0x357cbd=_0x4029,_0x3cd79e={'fQtZz':function(_0x47601a){return _0x47601a();}};_0x3cd79e['fQtZz'](installCancellationHandlers);const _0x32e45d=HOOKS[_0x480e02];if(!_0x32e45d){const _0x246459=Object[_0x357cbd(0xf1)](HOOKS)['join'](',\x20');console['error'](_0x357cbd(0xef)+_0x480e02),console['error']('Valid\x20hooks:\x20'+_0x246459),process[_0x357cbd(0xed)](0x1);}await _0x32e45d(_0x3a2f74);}