@ranger-testing/ranger-cli 2.5.4-alpha.071b7bd-1 → 2.5.4-alpha.152f635-21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/README.md +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 -0
  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 -0
  43. package/build/commands/utils/cloudProfileSession.js +1 -0
  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 -0
  51. package/build/commands/utils/keychain.js +1 -1
  52. package/build/commands/utils/legacyWarning.js +1 -0
  53. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  54. package/build/commands/utils/matchAuthEnvironment.js +1 -0
  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 -0
  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 -0
  65. package/build/commands/utils/resolveProfileUrl.js +1 -0
  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 +36 -6
  80. package/build/skills/ranger/create.md +19 -0
  81. package/build/skills/ranger/verify.md +46 -7
  82. package/package.json +8 -3
@@ -1 +1 @@
1
- (function(_0x5b2467,_0x30ec30){const _0xd6da53=_0x5472,_0x537bf9=_0x5b2467();while(!![]){try{const _0x5a47f5=-parseInt(_0xd6da53(0xb3))/0x1*(-parseInt(_0xd6da53(0xa8))/0x2)+-parseInt(_0xd6da53(0x8d))/0x3+parseInt(_0xd6da53(0x7e))/0x4+parseInt(_0xd6da53(0xc0))/0x5*(-parseInt(_0xd6da53(0x8b))/0x6)+parseInt(_0xd6da53(0x7f))/0x7*(-parseInt(_0xd6da53(0xcf))/0x8)+parseInt(_0xd6da53(0x7b))/0x9*(parseInt(_0xd6da53(0xa1))/0xa)+parseInt(_0xd6da53(0xdd))/0xb;if(_0x5a47f5===_0x30ec30)break;else _0x537bf9['push'](_0x537bf9['shift']());}catch(_0x417946){_0x537bf9['push'](_0x537bf9['shift']());}}}(_0x57a8,0xee64b));function _0x5472(_0x50d7f1,_0xe49c73){_0x50d7f1=_0x50d7f1-0x6d;const _0x57a807=_0x57a8();let _0x547246=_0x57a807[_0x50d7f1];return _0x547246;}import{mkdir,writeFile,readFile,unlink,rm,mkdtemp,rename}from'fs/promises';import{join}from'path';import _0x1eac44 from'inquirer';import{chromium}from'playwright';import{findExistingEnv,loadSettings}from'./utils/settings.js';import{encrypt}from'./utils/crypto.js';import{getToken}from'./utils/keychain.js';import{getRangerDir,getRangerHomeDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';function _0x57a8(){const _0x120ee4=['Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','yNSan','Browser\x20closed\x20before\x20authentication\x20was\x20saved.','list','retry','Invalid\x20--setup-header\x20format:\x20\x22','.backup-','HEAD','close','location','action','push','14688ubDHRv','isTTY','now','\x20\x20Did\x20you\x20mean\x20','local','Warning:\x20Could\x20not\x20remove\x20old\x20profile\x20at\x20','Enter\x20a\x20different\x20URL','error','AMGQY','env','isProtocolError','test','shouldReplace','HTTP\x20','2428140xzyDrs','NODE_TLS_REJECT_UNAUTHORIZED','DNgiO','\x20\x20\x20If\x20you\x20are\x20an\x20agent,\x20background\x20this\x20process\x20and\x20let\x20your\x20user\x20know\x20they\x20need\x20to\x20complete\x20browser\x20authentication.\x0a','LODAb','confirm','ydyTv','Warning:\x20Could\x20not\x20remove\x20old\x20profile\x20backup\x20at\x20','DdzaZ','newPage','trackPhaseStart','goto','✓\x20Encrypted\x20auth\x20saved\x20to:\x20','\x22.\x20Expected\x20\x22Name:\x20Value\x22.','kVljb','\x22\x20configured','qyZoR','UxvtU','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','PPvNJ','Delete\x20existing\x20and\x20create\x20new\x20in\x20','\x0a🌐\x20Profile\x20Setup\x0a','stdin','trim','tZuCi','slice','21555XxPJiW','NVGjS','\x20\x20ranger\x20profile\x20add\x20','6045700tPrQTn','2429XtERkM','What\x20would\x20you\x20like\x20to\x20do?','prompt','name','setupHeader','.enc','ceyrL','npdGX','CvcZw','path','ltUIq','assign','373326KvGcgP','browser_auth','4281672cDJnJH','✓\x20Created\x20settings:\x20','zMSxn','includes','trackPhaseEnd','\x20(continuing\x20with\x20--force)','log','\x20\x20Run\x20ranger\x20setup\x20in\x20CI\x20to\x20decrypt\x20at\x20runtime.','\x20\x20\x20Creating\x20it\x20in\x20','WMJSJ','force','baseUrl','cdpEndpoint','eGzkL','IHNvB','fetch\x20failed','Missing\x20API\x20token;\x20aborting\x20CI\x20profile\x20creation.','newContext','--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','iGUSt','2170yPQlBc','wLqTR','Profile\x20\x22','url','length','JBqef','vasZM','4iZBhHR','TypeError','\x20--safe-mode\x20\x20\x20\x20(disables\x20browser\x20features\x20that\x20can\x20cause\x20crashes)','about:blank','Lyehl','auth.json','safeMode','\x0a📋\x20Authentication\x20Setup','\x0a\x20\x20Could\x20not\x20reach\x20','kzMDg','catch','425558mhBwiq','keys','skipAuth','Invalid\x20URL','use_suggestion','cmwhV','MxXPr','⚠\x20Could\x20not\x20reach\x20','url_setup','Removed\x20existing\x20profile\x20at\x20','UjlHs','Could\x20not\x20reach\x20','config_write','5vnMHCZ','message','Ykysc'];_0x57a8=function(){return _0x120ee4;};return _0x57a8();}import{addProfileSetupBanner}from'./utils/profileSetupBanner.js';async function checkUrlReachability(_0x56e3ff){const _0x2927fa=_0x5472,_0xb89df2={'eGzkL':function(_0x1db9e1,_0x39e67a,_0x581e02){return _0x1db9e1(_0x39e67a,_0x581e02);},'oUhac':_0x2927fa(0xca),'Ykysc':'manual','MoZPt':function(_0x3dd7a9,_0x2099b5,_0x3aed47){return _0x3dd7a9(_0x2099b5,_0x3aed47);},'qYlsq':function(_0x1a8593,_0x3ece34){return _0x1a8593(_0x3ece34);},'npdGX':_0x2927fa(0xb6),'OqpRp':function(_0x55b619,_0xd6661c){return _0x55b619===_0xd6661c;}};try{const _0x56a1ea=new AbortController(),_0x5946bd=_0xb89df2[_0x2927fa(0x9a)](setTimeout,()=>_0x56a1ea['abort'](),0x1388),_0x103eb0={'method':_0xb89df2['oUhac'],'signal':_0x56a1ea['signal'],'redirect':_0xb89df2[_0x2927fa(0xc2)]};/^https:\/\/localhost(:\d+)?/i[_0x2927fa(0xda)](_0x56e3ff)&&(process['env']['NODE_TLS_REJECT_UNAUTHORIZED']='0');const _0x3fa376=await _0xb89df2['MoZPt'](fetch,_0x56e3ff,_0x103eb0);delete process[_0x2927fa(0xd8)]['NODE_TLS_REJECT_UNAUTHORIZED'],_0xb89df2['qYlsq'](clearTimeout,_0x5946bd);if(_0x3fa376['status']<0x190)return{'ok':!![]};return{'ok':![],'error':_0x2927fa(0xdc)+_0x3fa376['status']};}catch(_0x284d3c){delete process[_0x2927fa(0xd8)][_0x2927fa(0xde)];const _0x1e3438=_0x284d3c,_0x3cb99b=_0x1e3438[_0x2927fa(0xc1)]||_0xb89df2['qYlsq'](String,_0x284d3c),_0x13065d=_0x3cb99b['includes'](_0xb89df2[_0x2927fa(0x86)])||_0xb89df2['OqpRp'](_0x1e3438[_0x2927fa(0x82)],_0x2927fa(0xa9))||_0x3cb99b[_0x2927fa(0x90)](_0x2927fa(0x9c));return{'ok':![],'error':_0x3cb99b,'isProtocolError':_0x13065d};}}export async function addEnv(_0x52a729,_0x1bcb45={},_0x2c51f9){const _0x42fc70=_0x5472,_0x3b7371={'yNSan':'Saving\x20authentication\x20state...','gvBUJ':function(_0x5e0a98,_0xafa037){return _0x5e0a98===_0xafa037;},'XpjxN':'user','nMWys':function(_0xbb4c6d){return _0xbb4c6d();},'IHNvB':function(_0x5f1fe2,_0x14a007){return _0x5f1fe2+_0x14a007;},'WMJSJ':function(_0x472a59,_0x547b7b,_0x140e48){return _0x472a59(_0x547b7b,_0x140e48);},'MxXPr':function(_0x47a753,_0x5a3f34){return _0x47a753!==_0x5a3f34;},'kVljb':_0x42fc70(0x9f),'ZbmfS':'--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','CvcZw':'--ci\x20and\x20--cdp-endpoint\x20cannot\x20be\x20used\x20together.\x20Electron/CDP\x20profiles\x20only\x20work\x20with\x20a\x20locally\x20running\x20app\x20and\x20are\x20not\x20supported\x20in\x20CI.','JsBlZ':function(_0x442314,_0x2bbf5c){return _0x442314(_0x2bbf5c);},'JBqef':function(_0x473ee4,_0x574fe1,_0x3fc08a){return _0x473ee4(_0x574fe1,_0x3fc08a);},'wLqTR':'Aborted.','DdzaZ':'legacy','APxiJ':_0x42fc70(0xbb),'ltUIq':'\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','LODAb':function(_0x2e3c2d,_0x677818){return _0x2e3c2d(_0x677818);},'AMGQY':_0x42fc70(0x76),'kzMDg':'\x20\x20Ranger\x20will\x20open\x20it\x20in\x20a\x20browser\x20so\x20you\x20can\x20log\x20in\x20and\x20save\x20your\x20session.\x0a','UjlHs':function(_0x39fc95,_0x19d7a6){return _0x39fc95||_0x19d7a6;},'cmwhV':'http://localhost:3000','DNgiO':function(_0x1a9a4f,_0xe9b374){return _0x1a9a4f(_0xe9b374);},'ceyrL':_0x42fc70(0x80),'XNFpD':'Continue\x20anyway','iGUSt':'continue','ydyTv':function(_0x176e00,_0x1680e3,_0x5de3){return _0x176e00(_0x1680e3,_0x5de3);},'cIJpA':'browser_auth','UxvtU':_0x42fc70(0xaf),'mCmqg':'\x0a\x20\x20\x20⚠\x20This\x20step\x20requires\x20human\x20interaction\x20in\x20a\x20browser.','ilMEQ':_0x42fc70(0xe0),'vasZM':'--disable-features=WebBluetooth','OezgP':function(_0x235f75,_0x20ce4e){return _0x235f75||_0x20ce4e;},'VrWna':_0x42fc70(0xab),'lbAFb':'\x0aThe\x20browser\x20closed\x20unexpectedly\x20before\x20authentication\x20could\x20be\x20saved.','PPvNJ':'You\x20can\x20try\x20again\x20with\x20one\x20of:','NVGjS':_0x42fc70(0xc5),'qyZoR':function(_0x418380,_0x12b1b9,_0x5d9f0f){return _0x418380(_0x12b1b9,_0x5d9f0f);},'zMSxn':'utf-8','FmGBB':function(_0x1ac4c2,_0x3d810c){return _0x1ac4c2(_0x3d810c);},'VDgPO':_0x42fc70(0x9d),'nDBHG':function(_0x5eb394,_0x5cff0f,_0x9eaea5){return _0x5eb394(_0x5cff0f,_0x9eaea5);},'DwYTv':function(_0x289363,_0x3eb95b){return _0x289363+_0x3eb95b;},'gRBnW':_0x42fc70(0x84),'tZuCi':'config_write','SpdWA':function(_0x5de283,_0x15c988){return _0x5de283>_0x15c988;},'QeVoF':function(_0x5761c7,_0x31273c,_0x2b552c){return _0x5761c7(_0x31273c,_0x2b552c);},'zyPiJ':function(_0x2ec979,_0x287a6e,_0x470802){return _0x2ec979(_0x287a6e,_0x470802);},'Lyehl':function(_0x30b19d,_0x38602b,_0x5598f5){return _0x30b19d(_0x38602b,_0x5598f5);},'OVsRq':function(_0x352250,_0x3a0d8e,_0x21f5c2){return _0x352250(_0x3a0d8e,_0x21f5c2);}},_0x534418=_0x1bcb45['ci']??![],_0x6a86ff=_0x534418?'ci':_0x42fc70(0xd3),_0x3f5b5c=_0x3b7371['gvBUJ'](_0x1bcb45['scope'],_0x3b7371['XpjxN'])?getRangerHomeDir():_0x3b7371['nMWys'](getRangerDir),_0x507b3c=join(_0x3f5b5c,_0x6a86ff,_0x52a729),_0x53b99e={};if(_0x1bcb45[_0x42fc70(0x83)])for(const _0x4f750c of _0x1bcb45['setupHeader']){const _0xc84b3b=_0x4f750c['indexOf'](':');if(_0xc84b3b===-0x1)throw new Error(_0x42fc70(0xc8)+_0x4f750c+_0x42fc70(0x6e));const _0xf6ecdb=_0x4f750c['slice'](0x0,_0xc84b3b)['trim'](),_0x1bcab7=_0x4f750c[_0x42fc70(0x7a)](_0x3b7371[_0x42fc70(0x9b)](_0xc84b3b,0x1))[_0x42fc70(0x78)]();_0x53b99e[_0xf6ecdb]=_0x1bcab7;}const _0x4f6835=_0x3b7371[_0x42fc70(0x96)](join,_0x3f5b5c,_0x6a86ff);if(_0x3b7371[_0x42fc70(0xb9)](_0x1bcb45[_0x42fc70(0x99)],undefined)&&_0x3b7371['gvBUJ'](_0x1bcb45[_0x42fc70(0x99)]['trim'](),''))throw new Error(_0x3b7371[_0x42fc70(0x6f)]);if(_0x1bcb45['cdpEndpoint']&&_0x1bcb45[_0x42fc70(0xa4)])throw new Error(_0x3b7371['ZbmfS']);if(_0x1bcb45[_0x42fc70(0x99)]&&_0x1bcb45['ci'])throw new Error(_0x3b7371[_0x42fc70(0x87)]);const _0x43026a=_0x3b7371['JsBlZ'](Boolean,_0x1bcb45[_0x42fc70(0x99)]),_0x46f603=!_0x1bcb45[_0x42fc70(0xb5)]&&!_0x43026a,_0x4aa789=process[_0x42fc70(0x77)]['isTTY']&&process['stdout'][_0x42fc70(0xd0)];if(!_0x4aa789&&!_0x1bcb45[_0x42fc70(0xa4)]&&!_0x43026a)throw new Error('Please\x20provide\x20--url\x20when\x20running\x20in\x20non-interactive\x20mode.\x0aMake\x20sure\x20the\x20service\x20is\x20running\x20on\x20that\x20port\x20before\x20retrying.\x0aExample:\x20ranger\x20profile\x20add\x20local\x20--url\x20http://localhost:3000');const _0xdc9935=_0x3b7371[_0x42fc70(0xa6)](findExistingEnv,_0x52a729,{'rangerDir':_0x3f5b5c});let _0x5087aa=null;if(_0xdc9935){if(!_0x4aa789)_0x5087aa=_0xdc9935;else{if(_0xdc9935['location']===_0x6a86ff){const {overwrite:_0x26512e}=await _0x1eac44['prompt']([{'type':'confirm','name':'overwrite','message':_0x42fc70(0xa3)+_0x52a729+'\x22\x20already\x20exists.\x20Overwrite?','default':![]}]);if(!_0x26512e){console['log'](_0x3b7371[_0x42fc70(0xa2)]);return;}_0x5087aa=_0xdc9935;}else{const _0x2f4fa4=_0xdc9935['location']===_0x3b7371[_0x42fc70(0xe5)]?'root\x20(.ranger/)':_0xdc9935[_0x42fc70(0xcc)];console['error']('\x0a⚠️\x20\x20Profile\x20\x22'+_0x52a729+'\x22\x20already\x20exists\x20in\x20'+_0x2f4fa4+':\x20'+_0xdc9935[_0x42fc70(0x88)]),console[_0x42fc70(0xd6)](_0x42fc70(0x95)+_0x6a86ff+'\x20would\x20shadow\x20the\x20existing\x20profile.');const {shouldReplace:_0x4431b1}=await _0x1eac44['prompt']([{'type':_0x42fc70(0xe2),'name':_0x42fc70(0xdb),'message':_0x42fc70(0x75)+_0x6a86ff+'?','default':![]}]);if(!_0x4431b1){console['log'](_0x3b7371['wLqTR']);return;}_0x5087aa=_0xdc9935;}}}_0x2c51f9?.[_0x42fc70(0xe7)](_0x3b7371['APxiJ']);let _0x1174c3='';if(_0x43026a)console[_0x42fc70(0x93)](_0x3b7371[_0x42fc70(0x89)]),console['log']('\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20'+_0x1bcb45[_0x42fc70(0x99)]),console[_0x42fc70(0x93)]('\x20\x20Make\x20sure\x20your\x20Electron\x20app\x20(or\x20browser)\x20is\x20running\x20with\x20remote\x20debugging\x20enabled.\x0a');else{if(_0x1bcb45[_0x42fc70(0xa4)]){_0x1174c3=_0x1bcb45[_0x42fc70(0xa4)];const _0x45ec58=await _0x3b7371[_0x42fc70(0xe1)](checkUrlReachability,_0x1174c3);if(!_0x45ec58['ok']&&!_0x1bcb45['force'])throw new Error(_0x42fc70(0xbe)+_0x1174c3+':\x20'+_0x45ec58['error']+'\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.');!_0x45ec58['ok']&&_0x1bcb45[_0x42fc70(0x97)]&&console['log'](_0x42fc70(0xba)+_0x1174c3+':\x20'+_0x45ec58[_0x42fc70(0xd6)]+_0x42fc70(0x92));}else{console[_0x42fc70(0x93)](_0x3b7371[_0x42fc70(0xd7)]),console[_0x42fc70(0x93)](_0x42fc70(0x73)),console['log'](_0x3b7371[_0x42fc70(0xb1)]);let _0x28e557=![];while(!![]){const _0x1e889f=await _0x1eac44['prompt']([{'type':'input','name':_0x42fc70(0x98),'message':_0x28e557?_0x42fc70(0xc3):'What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','default':_0x3b7371[_0x42fc70(0xbd)](_0x1174c3,_0x3b7371[_0x42fc70(0xb8)])}]);_0x1174c3=_0x1e889f['baseUrl'];const _0x4053cd=await _0x3b7371['DNgiO'](checkUrlReachability,_0x1174c3);if(_0x4053cd['ok'])break;const _0x529656=/^[a-zA-Z][\w+.-]*:\/\//['test'](_0x1174c3),_0x5dc5b2=_0x4053cd[_0x42fc70(0xd9)]&&!_0x529656,_0x28eab8=_0x5dc5b2?'http://'+_0x1174c3:null;_0x28e557=!![],console['log'](_0x42fc70(0xb0)+_0x1174c3+':\x20'+_0x4053cd['error']);_0x28eab8&&console[_0x42fc70(0x93)](_0x42fc70(0xd2)+_0x28eab8+'?');const {action:_0x1e3857}=await _0x1eac44[_0x42fc70(0x81)]([{'type':_0x42fc70(0xc6),'name':_0x42fc70(0xcd),'message':_0x3b7371[_0x42fc70(0x85)],'choices':[..._0x28eab8?[{'name':'Use\x20'+_0x28eab8,'value':_0x42fc70(0xb7)}]:[],{'name':_0x42fc70(0xd5),'value':_0x42fc70(0xc7)},{'name':_0x3b7371['XNFpD'],'value':'continue'}]}]);if(_0x3b7371['gvBUJ'](_0x1e3857,'use_suggestion')&&_0x28eab8){_0x1174c3=_0x28eab8;const _0x19fd9a=await _0x3b7371['JsBlZ'](checkUrlReachability,_0x1174c3);if(_0x19fd9a['ok'])break;console[_0x42fc70(0x93)]('\x0a\x20\x20Still\x20could\x20not\x20reach\x20'+_0x1174c3+':\x20'+_0x19fd9a['error']);}else{if(_0x1e3857===_0x3b7371[_0x42fc70(0xa0)])break;}}}}_0x2c51f9?.['trackPhaseEnd'](_0x42fc70(0xbb));const _0x516e14={};if(_0x5087aa){const _0x566019=await loadSettings(_0x52a729);Object[_0x42fc70(0x8a)](_0x516e14,_0x566019['setupHeaders']);}Object['assign'](_0x516e14,_0x53b99e),await _0x3b7371[_0x42fc70(0xe3)](mkdir,_0x4f6835,{'recursive':!![]});const _0x8810ef=await mkdtemp(join(_0x4f6835,'.tmp-'+_0x52a729+'-')),_0x189823=_0x3b7371['ydyTv'](join,_0x8810ef,_0x42fc70(0xad)),_0x2ca9a4=Boolean(_0x1174c3)&&/^https:\/\/localhost(:\d+)?/i[_0x42fc70(0xda)](_0x1174c3);try{if(_0x46f603){_0x2c51f9?.['trackPhaseStart'](_0x3b7371['cIJpA']),console[_0x42fc70(0x93)](_0x3b7371[_0x42fc70(0x72)]),console['log']('\x20\x20\x20A\x20browser\x20will\x20open.\x20Please\x20log\x20in\x20to\x20the\x20profile\x20you\x20want\x20to\x20test\x20so\x20Ranger\x20can\x20access\x20it.'),console['log']('\x20\x20\x20When\x20done\x20logging\x20in,\x20close\x20the\x20browser\x20to\x20save\x20the\x20session.');!_0x4aa789?(console[_0x42fc70(0x93)](_0x3b7371['mCmqg']),console['log'](_0x3b7371['ilMEQ'])):console['log']('');await new Promise(_0x24ce93=>setTimeout(_0x24ce93,0xbb8));const _0x5a26c3=[];_0x1bcb45[_0x42fc70(0xae)]&&_0x5a26c3[_0x42fc70(0xce)](_0x3b7371[_0x42fc70(0xa7)]);const _0x570eb4=_0x1bcb45['allowInsecureLocalhost']||_0x2ca9a4;_0x570eb4&&_0x5a26c3[_0x42fc70(0xce)]('--allow-insecure-localhost');const _0x383d2f=await chromium['launch']({'headless':![],..._0x5a26c3[_0x42fc70(0xa5)]>0x0?{'args':_0x5a26c3}:{}});try{const _0xc89ce0=Object[_0x42fc70(0xb4)](_0x516e14)['length']>0x0,_0x4b46c8={'ignoreHTTPSErrors':!![]};_0xc89ce0&&(_0x4b46c8['extraHTTPHeaders']=_0x516e14);const _0x127aa0=await _0x383d2f[_0x42fc70(0x9e)](_0x4b46c8);await _0x3b7371[_0x42fc70(0xdf)](addProfileSetupBanner,_0x127aa0);const _0x1c1c2c=await _0x127aa0[_0x42fc70(0xe6)]();await _0x1c1c2c[_0x42fc70(0xe8)](_0x3b7371['OezgP'](_0x1174c3,_0x3b7371['VrWna']));let _0x42e4e8=![];await new Promise(_0x4d1b5e=>{const _0x4f45c4=_0x42fc70;_0x1c1c2c['on'](_0x4f45c4(0xcb),async()=>{const _0x167785=_0x4f45c4;try{console[_0x167785(0x93)](_0x3b7371[_0x167785(0xc4)]),await _0x127aa0['storageState']({'path':_0x189823}),_0x42e4e8=!![];}catch{}_0x4d1b5e();});});if(!_0x42e4e8){console[_0x42fc70(0x93)](_0x3b7371['lbAFb']);!_0x1bcb45['safeMode']&&(console['log']('This\x20can\x20happen\x20due\x20to\x20a\x20browser\x20compatibility\x20issue\x20on\x20some\x20systems.\x0a'),console['log'](_0x3b7371[_0x42fc70(0x74)]),console['log']('\x20\x20ranger\x20profile\x20add\x20'+_0x52a729+_0x42fc70(0xaa)),console[_0x42fc70(0x93)](_0x42fc70(0x7d)+_0x52a729+'\x20--skip-auth\x20\x20\x20\x20(skip\x20browser\x20auth\x20entirely)\x0a'));throw new Error(_0x3b7371[_0x42fc70(0x7c)]);}}finally{await _0x383d2f[_0x42fc70(0xcb)]()[_0x42fc70(0xb2)](()=>{});}if(_0x534418){const _0x18f346=await _0x3b7371[_0x42fc70(0x71)](readFile,_0x189823,_0x3b7371[_0x42fc70(0x8f)]),_0x4d6889=await getToken();if(!_0x4d6889){console[_0x42fc70(0xd6)]('\x20\x20Could\x20not\x20encrypt:\x20No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]'),await _0x3b7371['FmGBB'](unlink,_0x189823)['catch'](()=>{});throw new Error(_0x3b7371['VDgPO']);}else{const _0x56cd3f=_0x3b7371['nDBHG'](encrypt,_0x18f346,_0x4d6889);await writeFile(_0x3b7371['DwYTv'](_0x189823,_0x3b7371['gRBnW']),_0x56cd3f),await unlink(_0x189823),console[_0x42fc70(0x93)](_0x42fc70(0x6d)+_0x189823+_0x42fc70(0x84)),console['log']('\x20\x20You\x20can\x20safely\x20commit\x20this\x20file\x20to\x20git.'),console[_0x42fc70(0x93)](_0x42fc70(0x94));}}else console['log']('✓\x20Auth\x20state\x20saved\x20to:\x20'+_0x189823);_0x2c51f9?.['trackPhaseEnd'](_0x42fc70(0x8c));}_0x2c51f9?.['trackPhaseStart'](_0x3b7371[_0x42fc70(0x79)]);const _0x557939={};_0x1174c3&&(_0x557939['baseUrl']=_0x1174c3);_0x1bcb45[_0x42fc70(0x99)]&&(_0x557939['cdpEndpoint']=_0x1bcb45['cdpEndpoint'],_0x557939['isElectron']=!![]);(_0x1bcb45['allowInsecureLocalhost']||_0x2ca9a4)&&(_0x557939['allowInsecureLocalhost']=!![]);_0x1bcb45[_0x42fc70(0xae)]&&(_0x557939[_0x42fc70(0xae)]=!![]);_0x3b7371['SpdWA'](Object[_0x42fc70(0xb4)](_0x516e14)['length'],0x0)&&(_0x557939['setupHeaders']=_0x516e14);await _0x3b7371['ydyTv'](writeFile,_0x3b7371['QeVoF'](join,_0x8810ef,'settings.json'),JSON['stringify'](_0x557939,null,0x2)),console[_0x42fc70(0x93)](_0x42fc70(0x8e)+join(_0x507b3c,'settings.json'));if(_0x5087aa?.[_0x42fc70(0xcc)]===_0x6a86ff){const _0x408dfc=_0x5087aa[_0x42fc70(0x88)]+_0x42fc70(0xc9)+Date[_0x42fc70(0xd1)]();await rename(_0x5087aa['path'],_0x408dfc);try{await rename(_0x8810ef,_0x507b3c);}catch(_0xd3f53b){await _0x3b7371['zyPiJ'](rename,_0x408dfc,_0x5087aa['path']);throw _0xd3f53b;}try{await _0x3b7371['ydyTv'](rm,_0x408dfc,{'recursive':!![]});}catch{console[_0x42fc70(0x93)](_0x42fc70(0xe4)+_0x408dfc);}}else{await _0x3b7371['qyZoR'](rename,_0x8810ef,_0x507b3c);if(_0x5087aa)try{await _0x3b7371[_0x42fc70(0xac)](rm,_0x5087aa['path'],{'recursive':!![]}),console['log'](_0x42fc70(0xbc)+_0x5087aa['path']);}catch{console['log'](_0x42fc70(0xd4)+_0x5087aa['path']);}}try{await writeActiveProfileName(_0x52a729),console['log']('\x20\x20Set\x20active\x20profile:\x20'+_0x52a729);}catch{console['log']('Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.');}_0x2c51f9?.[_0x42fc70(0x91)](_0x42fc70(0xbf)),console['log']('\x0a\x20\x20Profile\x20\x22'+_0x52a729+_0x42fc70(0x70));}catch(_0x4d3b73){await _0x3b7371['OVsRq'](rm,_0x8810ef,{'recursive':!![],'force':!![]});throw _0x4d3b73;}}
1
+ const _0x1902cd=_0x4764;(function(_0x1ccd48,_0x106cda){const _0x42d1c1=_0x4764,_0x590154=_0x1ccd48();while(!![]){try{const _0x5dea7d=parseInt(_0x42d1c1(0x1e5))/0x1*(-parseInt(_0x42d1c1(0x1b8))/0x2)+parseInt(_0x42d1c1(0x1d5))/0x3+-parseInt(_0x42d1c1(0x1bb))/0x4*(parseInt(_0x42d1c1(0x17e))/0x5)+parseInt(_0x42d1c1(0x174))/0x6+-parseInt(_0x42d1c1(0x173))/0x7*(parseInt(_0x42d1c1(0x1e8))/0x8)+-parseInt(_0x42d1c1(0x1be))/0x9+parseInt(_0x42d1c1(0x180))/0xa*(parseInt(_0x42d1c1(0x1c9))/0xb);if(_0x5dea7d===_0x106cda)break;else _0x590154['push'](_0x590154['shift']());}catch(_0x1b99ce){_0x590154['push'](_0x590154['shift']());}}}(_0x193c,0x1e4ee));import{readdir,rm}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import _0x2412c 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';const CLOUD_PROFILE_SHARING_WARNING=_0x1902cd(0x1c3);function warnCloudProfileSharedInOrg(){const _0x2fcd0b=_0x1902cd;if(!process['stdout']['isTTY'])return;console[_0x2fcd0b(0x1cc)](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x206fda){const _0x39bd97=_0x1902cd,_0x23c67a={'eqbPM':function(_0x330b78,_0x25e6cd,_0x703755){return _0x330b78(_0x25e6cd,_0x703755);},'RYMvq':_0x39bd97(0x1bd),'mwXvZ':function(_0x16db7e,_0x2866b6){return _0x16db7e===_0x2866b6;},'yBtOg':_0x39bd97(0x1ac)};try{const _0x5668da=new AbortController(),_0x4df2f9=_0x23c67a[_0x39bd97(0x1bf)](setTimeout,()=>_0x5668da[_0x39bd97(0x1b6)](),0x1388),_0x2ca6ef={'method':'HEAD','signal':_0x5668da[_0x39bd97(0x1cb)],'redirect':_0x23c67a[_0x39bd97(0x1ce)]};/^https:\/\/localhost(:\d+)?/i['test'](_0x206fda)&&(process[_0x39bd97(0x1ec)][_0x39bd97(0x1ad)]='0');const _0x43ffd8=await fetch(_0x206fda,_0x2ca6ef);delete process['env']['NODE_TLS_REJECT_UNAUTHORIZED'],clearTimeout(_0x4df2f9);if(_0x43ffd8[_0x39bd97(0x171)]<0x190)return{'ok':!![]};return{'ok':![],'error':_0x39bd97(0x1e3)+_0x43ffd8['status']};}catch(_0x41a856){delete process[_0x39bd97(0x1ec)][_0x39bd97(0x1ad)];const _0x2ee9da=_0x41a856,_0x37c7f9=_0x2ee9da[_0x39bd97(0x1d1)]||String(_0x41a856),_0x264df9=_0x37c7f9['includes']('Invalid\x20URL')||_0x23c67a['mwXvZ'](_0x2ee9da['name'],_0x39bd97(0x1ab))||_0x37c7f9['includes'](_0x23c67a[_0x39bd97(0x1ba)]);return{'ok':![],'error':_0x37c7f9,'isProtocolError':_0x264df9};}}async function sweepOrphanLocalProfile(_0x5d88ef,_0x7ce59b,_0x59551c){const _0x3bba2b=_0x1902cd,_0x1caadd={'yprdz':function(_0x2f1dfb,_0x48806d,_0x1a825a){return _0x2f1dfb(_0x48806d,_0x1a825a);},'zTGAH':function(_0x16e2d5,_0x1a70a7){return _0x16e2d5(_0x1a70a7);}},_0x376fa0=join(_0x7ce59b,_0x3bba2b(0x196)),_0x2839bf=_0x1caadd[_0x3bba2b(0x19d)](join,_0x376fa0,_0x5d88ef);existsSync(_0x2839bf)&&(_0x59551c&&await _0x1caadd[_0x3bba2b(0x1f2)](isPathGitTracked,_0x2839bf)?console[_0x3bba2b(0x1e6)]('\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20'+_0x2839bf+_0x3bba2b(0x1c7)):(await rm(_0x2839bf,{'recursive':!![],'force':!![]}),console['log'](_0x3bba2b(0x1a8)+_0x2839bf)));if(_0x1caadd[_0x3bba2b(0x1f2)](existsSync,_0x376fa0)){let _0x56cf6d=[];try{_0x56cf6d=await _0x1caadd[_0x3bba2b(0x1f2)](readdir,_0x376fa0);}catch{return;}const _0x15d582=_0x3bba2b(0x1d6)+_0x5d88ef+'-';for(const _0x3edc5c of _0x56cf6d){if(!_0x3edc5c['startsWith'](_0x15d582))continue;const _0x51d200=join(_0x376fa0,_0x3edc5c);await rm(_0x51d200,{'recursive':!![],'force':!![]}),console[_0x3bba2b(0x1e6)](_0x3bba2b(0x1a8)+_0x51d200);}}}async function sweepOrphansBestEffort(_0x15a67c){const _0x5a0ed0=_0x1902cd,_0x2d0394={'STxnR':function(_0x3f396b,_0x4ffd56,_0x40ccf7,_0x4a2cc7){return _0x3f396b(_0x4ffd56,_0x40ccf7,_0x4a2cc7);}};try{await sweepOrphanLocalProfile(_0x15a67c,getRangerHomeDir(),![]);const _0x4ce0f1=getRangerDir();_0x4ce0f1!==getRangerHomeDir()&&await _0x2d0394[_0x5a0ed0(0x178)](sweepOrphanLocalProfile,_0x15a67c,_0x4ce0f1,!![]);}catch(_0x3962e3){console[_0x5a0ed0(0x1e6)](_0x5a0ed0(0x1b9)+(_0x3962e3 instanceof Error?_0x3962e3['message']:String(_0x3962e3))+').');}}function _0x193c(){const _0x36dcc1=['\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.','5VBrCEQ','KVWXP','30210ttIcAh','\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','skipAuth','setupHeaders','BoHvB','\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a','Use\x20','OLpGB','join','Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.','`\x20again\x20without\x20--skip-auth.','no_auth_config','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20','TAtHw',')\x0a\x20\x20Save\x20\x27','profile.add.autoRouted','trackPhaseEnd','SWVAU','cwd','\x27\x20created.\x0a','stdout','\x0a🌐\x20Profile\x20Setup\x0a','local','YRiGy','isTTY','sCOsm','TBTUA','Could\x20not\x20reach\x20','\x20\x20Did\x20you\x20mean\x20','yprdz','kYZIN','InGZb','MHyka','origin','slice','prompt','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','Enter\x20a\x20different\x20URL','\x0a\x20\x20No\x20auth\x20env\x20matches\x20','\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20','error','setupHeader','TypeError','fetch\x20failed','NODE_TLS_REJECT_UNAUTHORIZED','ykNnv','✓\x20Profile\x20\x27','list','user_declined','WtEXC','--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','baseUrl','JUVYG','abort','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','334QFRWIi','\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20(','yBtOg','824812fnAXNH','http://','manual','1434123tHNjjM','eqbPM','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','\x20\x20https://docs.ranger.net/main/concepts/profiles','VbYtH','This\x20account\x20will\x20be\x20shared\x20with\x20everyone\x20at\x20your\x20organization','tgyDE','fjXSw','HaDSk','\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.','exit','1342PmClhs','capture','signal','warn','indexOf','RYMvq','isElectron','\x20(continuing\x20with\x20--force)','message','What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','mkJfw','Invalid\x20--setup-header\x20format:\x20\x22','561129aLFnKf','.tmp-','\x20\x20Next:\x20ranger\x20go\x20--profile\x20','test','length','CBSIB','yes','\x20--url\x20','trim','.\x20Configured\x20envs:\x20','url','no_match','yzHgv','\x0a\x20\x20A\x20profile\x20named\x20\x22','HTTP\x20','profile.add.autoRouteSkipped','471BzhWcv','log','action','32968QXYFeh','pKdWY','The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a','dQkiX','env','\x0a✓\x20Profile\x20\x27','JoWVV','hNfOO','⚠\x20Could\x20not\x20reach\x20','cdpEndpoint','zTGAH','bcatX','keys','retry','status','FWmrI','392lifmyp','1461120ehkooD','\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.','continue','\x20--skip-auth\x0a','STxnR','\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20','KoTiJ','hgBML','environments'];_0x193c=function(){return _0x36dcc1;};return _0x193c();}async function markActive(_0x29ed9a){const _0x293a79=_0x1902cd,_0x5c55b3={'yWdAx':_0x293a79(0x189)};try{await writeActiveProfileName(_0x29ed9a),console[_0x293a79(0x1e6)]('\x20\x20Set\x20active\x20profile:\x20'+_0x29ed9a);}catch{console[_0x293a79(0x1e6)](_0x5c55b3['yWdAx']);}}async function tryAutoRouteCloudProfile(_0x53c350,_0x233b70,_0x13cfb0,_0x21a5dd,_0xd298d){const _0x37ae2d=_0x1902cd,_0x44a09a={'sCOsm':function(_0x30e0aa){return _0x30e0aa();},'OLBKu':function(_0x7d486c,_0x4c67a0){return _0x7d486c instanceof _0x4c67a0;},'JoWVV':function(_0x406f83,_0x379f3e,_0x44b93c,_0x54f2b9,_0x50cab8){return _0x406f83(_0x379f3e,_0x44b93c,_0x54f2b9,_0x50cab8);},'EluzQ':_0x37ae2d(0x1e4),'GtPmR':function(_0x46806e,_0x558066){return _0x46806e+_0x558066;},'bcatX':'\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a','InGZb':function(_0x53cdb8,_0x3a96c9,_0x2e6dfe,_0x3ab806){return _0x53cdb8(_0x3a96c9,_0x2e6dfe,_0x3ab806);},'dzYOC':function(_0x34153c){return _0x34153c();},'WMJgB':function(_0x29543f,_0x2c0a86){return _0x29543f instanceof _0x2c0a86;},'YRiGy':function(_0x218322,_0x3b5ba2){return _0x218322===_0x3b5ba2;},'OLpGB':function(_0x5d20b7,_0x4f7b06){return _0x5d20b7+_0x4f7b06;},'PmMdX':function(_0x10a32a,_0x515f95){return _0x10a32a(_0x515f95);}};let _0x52db5d;try{_0x52db5d=await _0x44a09a[_0x37ae2d(0x199)](fetchAuthConfig);}catch(_0x4d4c82){return _0xd298d?.[_0x37ae2d(0x190)](_0x37ae2d(0x1e4),{'reason':_0x37ae2d(0x18b),'profileName':_0x53c350}),console['error']('\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20'+(_0x44a09a['OLBKu'](_0x4d4c82,Error)?_0x4d4c82[_0x37ae2d(0x1d1)]:String(_0x4d4c82))),![];}if(!_0x52db5d||!_0x52db5d[_0x37ae2d(0x17c)]||Object[_0x37ae2d(0x1f4)](_0x52db5d[_0x37ae2d(0x17c)])['length']===0x0){if(_0x21a5dd)return await _0x44a09a[_0x37ae2d(0x1ee)](captureEnvLessProfile,_0x53c350,_0x233b70,_0x13cfb0,_0xd298d);return _0xd298d?.['trackPhaseEnd'](_0x44a09a['EluzQ'],{'reason':_0x37ae2d(0x18b),'profileName':_0x53c350}),console['error'](_0x44a09a['GtPmR'](_0x44a09a['GtPmR']('\x0a\x20\x20Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team\x20yet\x20—\x20that\x27s\x20the\x20path\x20that\x20lets\x20Ranger\x20log\x20into\x20your\x20app\x20for\x20you\x20in\x20CI\x20/\x20background\x20agents.\x0a'+'\x0a'+_0x44a09a[_0x37ae2d(0x1f3)],_0x37ae2d(0x18c)+_0x53c350+_0x37ae2d(0x1dc)+_0x233b70+_0x37ae2d(0x177))+'\x0a','\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a')+'\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login'),![];}const _0x5b99ad=matchAuthEnvironment(_0x233b70,_0x52db5d);if(!_0x5b99ad)return _0xd298d?.['trackPhaseEnd'](_0x37ae2d(0x1e4),{'reason':_0x37ae2d(0x1e0),'profileName':_0x53c350}),console[_0x37ae2d(0x1a9)](_0x37ae2d(0x1a7)+_0x233b70+_0x37ae2d(0x1de)+Object['keys'](_0x52db5d['environments'])['join'](',\x20')+'.'),![];const _0x1847a5=_0x52db5d[_0x37ae2d(0x17c)][_0x5b99ad],_0x5a0c7e=_0x1847a5?.['domains']??[];if(_0x21a5dd&&!_0x13cfb0[_0x37ae2d(0x1db)]){const {saveToCloud:_0x2e20fc}=await _0x2412c['prompt']([{'type':'confirm','name':'saveToCloud','message':'Found\x20auth\x20environment\x20\x27'+_0x5b99ad+'\x27\x20matching\x20'+_0x233b70+'\x0a\x20\x20(domains:\x20'+_0x5a0c7e[_0x37ae2d(0x188)](',\x20')+_0x37ae2d(0x18e)+_0x53c350+'\x27\x20to\x20the\x20cloud?','default':!![]}]);if(!_0x2e20fc)return _0xd298d?.['trackPhaseEnd'](_0x44a09a['EluzQ'],{'reason':_0x37ae2d(0x1b1),'profileName':_0x53c350}),console['error'](_0x37ae2d(0x17d)),![];}const _0x4dd82f=_0x5a0c7e['some'](_0x327905=>{const _0x2c55fa=_0x37ae2d;try{return new URL(_0x327905)[_0x2c55fa(0x1a1)]===new URL(_0x233b70)['origin'];}catch{return![];}}),_0x1de2d1={};!_0x4dd82f&&(_0x1de2d1[_0x37ae2d(0x1b4)]=_0x233b70);try{await _0x44a09a[_0x37ae2d(0x19f)](createCloudProfile,_0x53c350,_0x5b99ad,{'settings':_0x1de2d1}),_0x44a09a['dzYOC'](warnCloudProfileSharedInOrg);}catch(_0x2261ce){if(_0x44a09a['WMJgB'](_0x2261ce,ApiError)&&_0x44a09a[_0x37ae2d(0x197)](_0x2261ce['status'],0x199)){console['error'](_0x44a09a[_0x37ae2d(0x187)](_0x37ae2d(0x1e2)+_0x53c350+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a',_0x37ae2d(0x1a4)+_0x53c350));throw _0x2261ce;}throw _0x2261ce;}return console['log'](_0x44a09a['OLpGB']('✓\x20Profile\x20\x27'+_0x53c350+_0x37ae2d(0x193),_0x37ae2d(0x1d7)+_0x53c350)),await _0x44a09a['PmMdX'](sweepOrphansBestEffort,_0x53c350),_0xd298d?.[_0x37ae2d(0x190)](_0x37ae2d(0x18f),{'envKey':_0x5b99ad,'profileName':_0x53c350}),!![];}async function createUnconfiguredCloudProfile(_0x185a01,_0x561c3f){const _0x363cdd=_0x1902cd,_0x23833f={'gdJnc':function(_0x4c8e7c,_0x4abe62,_0x36cf03,_0x25331d){return _0x4c8e7c(_0x4abe62,_0x36cf03,_0x25331d);},'KoTiJ':function(_0x46e277){return _0x46e277();}};try{await _0x23833f['gdJnc'](createCloudProfile,_0x185a01,undefined,{'settings':_0x561c3f}),_0x23833f[_0x363cdd(0x17a)](warnCloudProfileSharedInOrg);}catch(_0xde022a){_0xde022a instanceof ApiError&&_0xde022a['status']===0x199&&console[_0x363cdd(0x1a9)]('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x185a01+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a'+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x185a01));throw _0xde022a;}}function _0x4764(_0x43c729,_0x5f176e){_0x43c729=_0x43c729-0x170;const _0x193c4c=_0x193c();let _0x47644=_0x193c4c[_0x43c729];return _0x47644;}async function captureEnvLessProfile(_0x1829f2,_0x15caf3,_0x215710,_0x2428f6){const _0x126df8=_0x1902cd,_0x473334={'KVWXP':_0x126df8(0x1a5),'mkJfw':function(_0x4d8644,_0x31823e){return _0x4d8644===_0x31823e;},'hgBML':function(_0x2193fd,_0x1084cd){return _0x2193fd+_0x1084cd;},'JUVYG':function(_0x115271,_0x23b02e){return _0x115271>_0x23b02e;},'cpJCQ':function(_0x52e3af,_0x421775,_0x47aacf,_0x2e9dc0){return _0x52e3af(_0x421775,_0x47aacf,_0x2e9dc0);},'lsPNp':function(_0x118164){return _0x118164();},'kYZIN':function(_0x541293,_0x2baf5e){return _0x541293+_0x2baf5e;},'SWVAU':function(_0x125fb8,_0xd0746c,_0x466c16){return _0x125fb8(_0xd0746c,_0x466c16);},'dQkiX':function(_0x150d19,_0x356033){return _0x150d19(_0x356033);},'gsckp':'profile.add.autoRouted'};if(!_0x215710[_0x126df8(0x1db)]){const {capture:_0x3af564}=await _0x2412c['prompt']([{'type':'confirm','name':_0x126df8(0x1ca),'message':_0x473334[_0x126df8(0x17f)],'default':!![]}]);if(!_0x3af564)return _0x2428f6?.[_0x126df8(0x190)]('profile.add.autoRouteSkipped',{'reason':_0x126df8(0x1b1),'profileName':_0x1829f2}),console[_0x126df8(0x1a9)]('\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a'+_0x126df8(0x175)),![];}const _0x35fac0={};if(_0x215710[_0x126df8(0x1aa)])for(const _0x1805b2 of _0x215710['setupHeader']){const _0x4f31f6=_0x1805b2[_0x126df8(0x1cd)](':');if(_0x473334[_0x126df8(0x1d3)](_0x4f31f6,-0x1))continue;_0x35fac0[_0x1805b2[_0x126df8(0x1a2)](0x0,_0x4f31f6)[_0x126df8(0x1dd)]()]=_0x1805b2['slice'](_0x473334[_0x126df8(0x17b)](_0x4f31f6,0x1))[_0x126df8(0x1dd)]();}const _0xa4a2ca={'baseUrl':_0x15caf3};_0x473334['JUVYG'](Object['keys'](_0x35fac0)[_0x126df8(0x1d9)],0x0)&&(_0xa4a2ca['setupHeaders']=_0x35fac0);let _0x1e3d15;try{_0x1e3d15=await _0x473334['cpJCQ'](createCloudProfile,_0x1829f2,undefined,{'settings':_0xa4a2ca}),_0x473334['lsPNp'](warnCloudProfileSharedInOrg);}catch(_0x239679){_0x239679 instanceof ApiError&&_0x239679[_0x126df8(0x171)]===0x199&&console[_0x126df8(0x1a9)](_0x473334[_0x126df8(0x19e)]('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x1829f2+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a',_0x126df8(0x1a4)+_0x1829f2));throw _0x239679;}return await _0x473334[_0x126df8(0x191)](manualBrowserLogin,_0x1e3d15,{'key':'','domains':[_0x15caf3],'setupHeaders':_0x473334[_0x126df8(0x1b5)](Object['keys'](_0x35fac0)[_0x126df8(0x1d9)],0x0)?_0x35fac0:undefined}),console[_0x126df8(0x1e6)](_0x126df8(0x1ed)+_0x1829f2+'\x27\x20created\x20with\x20a\x20captured\x20session.\x0a'+(_0x126df8(0x1d7)+_0x1829f2)),await _0x473334[_0x126df8(0x1eb)](sweepOrphansBestEffort,_0x1829f2),_0x2428f6?.[_0x126df8(0x190)](_0x473334['gsckp'],{'envKey':null,'profileName':_0x1829f2}),!![];}export async function addEnv(_0x428740,_0x45d965={},_0x2775bc){const _0x29993c=_0x1902cd,_0x59bf47={'TAtHw':function(_0x5e27f7,_0x4b5e7d){return _0x5e27f7+_0x4b5e7d;},'CBSIB':function(_0x95a9a6,_0x260d2d){return _0x95a9a6+_0x260d2d;},'ZwBRS':_0x29993c(0x1ea),'hNfOO':_0x29993c(0x1b7),'qbuwQ':'--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','TBTUA':'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','BoHvB':function(_0x469fa8,_0x556b59){return _0x469fa8>_0x556b59;},'FWmrI':function(_0x5dea46,_0xfd5ee9,_0x6e7999){return _0x5dea46(_0xfd5ee9,_0x6e7999);},'zJXqt':function(_0xbca5e4,_0x11eb1e,_0x311fa4,_0x138c1d,_0x24427a){return _0xbca5e4(_0x11eb1e,_0x311fa4,_0x138c1d,_0x24427a);},'yzHgv':'cdpEndpoint','utZUP':function(_0x3e72b1,_0x332d5e){return _0x3e72b1 instanceof _0x332d5e;},'tgyDE':function(_0x372e20,_0x12c2ea){return _0x372e20(_0x12c2ea);},'WtEXC':function(_0x39f5fd,_0x2f700b){return _0x39f5fd(_0x2f700b);},'ystwN':function(_0x9b282b,_0x1bb02a){return _0x9b282b>_0x1bb02a;},'AxAhE':_0x29993c(0x1c0),'MZRYG':'input','ykNnv':'baseUrl','zxYQD':'Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','VbYtH':'http://localhost:3000','HaDSk':_0x29993c(0x1e7),'pKdWY':'What\x20would\x20you\x20like\x20to\x20do?','MHyka':function(_0x299b16,_0x26b9d9){return _0x299b16===_0x26b9d9;},'fjXSw':function(_0x146708,_0x35f190){return _0x146708(_0x35f190);}};_0x45d965['ci']&&(console[_0x29993c(0x1a9)](_0x59bf47[_0x29993c(0x18d)](_0x59bf47[_0x29993c(0x1da)](_0x59bf47[_0x29993c(0x1da)](_0x59bf47['ZwBRS']+'for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a','\x0a')+'To\x20set\x20up\x20a\x20profile,\x20run:\x0a',_0x59bf47[_0x29993c(0x1ef)])+'\x0a'+'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a',_0x29993c(0x1c1))),process['exit'](0x1));const _0x5089c9={};if(_0x45d965['setupHeader'])for(const _0x669221 of _0x45d965['setupHeader']){const _0x237450=_0x669221['indexOf'](':');if(_0x237450===-0x1)throw new Error(_0x29993c(0x1d4)+_0x669221+'\x22.\x20Expected\x20\x22Name:\x20Value\x22.');const _0x1749bb=_0x669221[_0x29993c(0x1a2)](0x0,_0x237450)['trim'](),_0xf9813a=_0x669221['slice'](_0x59bf47['CBSIB'](_0x237450,0x1))[_0x29993c(0x1dd)]();_0x5089c9[_0x1749bb]=_0xf9813a;}if(_0x45d965['cdpEndpoint']!==undefined&&_0x45d965[_0x29993c(0x1f1)]['trim']()==='')throw new Error(_0x29993c(0x1b3));if(_0x45d965[_0x29993c(0x1f1)]&&_0x45d965[_0x29993c(0x1df)])throw new Error(_0x59bf47['qbuwQ']);const _0x5469cd=Boolean(_0x45d965['cdpEndpoint']),_0x2281ec=process['stdin'][_0x29993c(0x198)]&&process[_0x29993c(0x194)]['isTTY'];if(!_0x2281ec&&!_0x45d965['url']&&!_0x5469cd&&!_0x45d965[_0x29993c(0x182)])throw new Error(_0x59bf47[_0x29993c(0x19a)]);if(_0x5469cd){const _0x387e91=_0x45d965[_0x29993c(0x1f1)];console[_0x29993c(0x1e6)](_0x29993c(0x181)),console['log']('\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20'+_0x387e91);const _0x18cccf={'cdpEndpoint':_0x387e91,'isElectron':!![]};_0x59bf47[_0x29993c(0x184)](Object[_0x29993c(0x1f4)](_0x5089c9)['length'],0x0)&&(_0x18cccf[_0x29993c(0x183)]=_0x5089c9);await _0x59bf47[_0x29993c(0x172)](createUnconfiguredCloudProfile,_0x428740,_0x18cccf);try{_0x59bf47['zJXqt'](setProfileOverride,process[_0x29993c(0x192)](),_0x428740,_0x59bf47[_0x29993c(0x1e1)],_0x387e91),_0x59bf47['zJXqt'](setProfileOverride,process['cwd'](),_0x428740,_0x29993c(0x1cf),!![]);}catch(_0x158669){console[_0x29993c(0x1a9)]('\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20'+(_0x59bf47['utZUP'](_0x158669,Error)?_0x158669['message']:String(_0x158669)));}console[_0x29993c(0x1e6)]('✓\x20Cloud\x20profile\x20\x27'+_0x428740+'\x27\x20created\x20(CDP).'),await _0x59bf47[_0x29993c(0x1c4)](sweepOrphansBestEffort,_0x428740),await _0x59bf47[_0x29993c(0x1b2)](markActive,_0x428740);return;}if(_0x45d965['skipAuth']){const _0x4268c4={};_0x45d965['url']&&(_0x4268c4[_0x29993c(0x1b4)]=_0x45d965[_0x29993c(0x1df)]);_0x59bf47['ystwN'](Object['keys'](_0x5089c9)['length'],0x0)&&(_0x4268c4[_0x29993c(0x183)]=_0x5089c9);await _0x59bf47[_0x29993c(0x172)](createUnconfiguredCloudProfile,_0x428740,_0x4268c4),console['log'](_0x29993c(0x1af)+_0x428740+'\x27\x20created\x20(no\x20session).\x0a'+(_0x29993c(0x179)+_0x428740+_0x29993c(0x18a))),await sweepOrphansBestEffort(_0x428740),await _0x59bf47['tgyDE'](markActive,_0x428740);return;}if(_0x45d965[_0x29993c(0x1df)]){const _0x3b3f77=_0x45d965[_0x29993c(0x1df)],_0x358a38=await _0x59bf47[_0x29993c(0x1c4)](checkUrlReachability,_0x3b3f77);if(!_0x358a38['ok']&&!_0x45d965['force'])throw new Error(_0x29993c(0x19b)+_0x3b3f77+':\x20'+_0x358a38['error']+'\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.');!_0x358a38['ok']&&_0x45d965['force']&&console[_0x29993c(0x1e6)](_0x29993c(0x1f0)+_0x3b3f77+':\x20'+_0x358a38['error']+_0x29993c(0x1d0));}else{console['log'](_0x29993c(0x195)),console[_0x29993c(0x1e6)](_0x59bf47['AxAhE']),console[_0x29993c(0x1e6)](_0x29993c(0x185));let _0x18563e='',_0x2cf923=![];while(!![]){const _0x352084=await _0x2412c[_0x29993c(0x1a3)]([{'type':_0x59bf47['MZRYG'],'name':_0x59bf47[_0x29993c(0x1ae)],'message':_0x2cf923?_0x59bf47['zxYQD']:_0x29993c(0x1d2),'default':_0x18563e||_0x59bf47[_0x29993c(0x1c2)]}]);_0x18563e=_0x352084[_0x29993c(0x1b4)];const _0x4728ba=await checkUrlReachability(_0x18563e);if(_0x4728ba['ok'])break;const _0x64888f=/^[a-zA-Z][\w+.-]*:\/\//[_0x29993c(0x1d8)](_0x18563e),_0x22fd85=_0x4728ba['isProtocolError']&&!_0x64888f,_0x574a2f=_0x22fd85?_0x29993c(0x1bc)+_0x18563e:null;_0x2cf923=!![],console['log']('\x0a\x20\x20Could\x20not\x20reach\x20'+_0x18563e+':\x20'+_0x4728ba[_0x29993c(0x1a9)]);_0x574a2f&&console[_0x29993c(0x1e6)](_0x29993c(0x19c)+_0x574a2f+'?');const {action:_0x52bbec}=await _0x2412c['prompt']([{'type':_0x29993c(0x1b0),'name':_0x59bf47[_0x29993c(0x1c6)],'message':_0x59bf47[_0x29993c(0x1e9)],'choices':[..._0x574a2f?[{'name':_0x29993c(0x186)+_0x574a2f,'value':'use_suggestion'}]:[],{'name':_0x29993c(0x1a6),'value':_0x29993c(0x170)},{'name':'Continue\x20anyway','value':_0x29993c(0x176)}]}]);if(_0x52bbec==='use_suggestion'&&_0x574a2f){_0x18563e=_0x574a2f;const _0xa7f3db=await _0x59bf47['tgyDE'](checkUrlReachability,_0x18563e);if(_0xa7f3db['ok'])break;console[_0x29993c(0x1e6)]('\x0a\x20\x20Still\x20could\x20not\x20reach\x20'+_0x18563e+':\x20'+_0xa7f3db['error']);}else{if(_0x59bf47[_0x29993c(0x1a0)](_0x52bbec,_0x29993c(0x176)))break;}}_0x45d965={..._0x45d965,'url':_0x18563e};}let _0x1dec5d=![];try{_0x1dec5d=await tryAutoRouteCloudProfile(_0x428740,_0x45d965[_0x29993c(0x1df)],_0x45d965,_0x2281ec,_0x2775bc);}catch(_0x4dbb81){console['error']('\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22'+_0x428740+'\x22:\x20'+(_0x4dbb81 instanceof Error?_0x4dbb81[_0x29993c(0x1d1)]:String(_0x4dbb81))),process[_0x29993c(0x1c8)](0x1);}!_0x1dec5d&&process['exit'](0x1),await _0x59bf47[_0x29993c(0x1c5)](markActive,_0x428740);}
@@ -1 +1 @@
1
- (function(_0x322e35,_0x599afc){const _0x12eac5=_0x5afb,_0x31df4e=_0x322e35();while(!![]){try{const _0x52a74a=-parseInt(_0x12eac5(0x1a7))/0x1*(-parseInt(_0x12eac5(0x1a4))/0x2)+-parseInt(_0x12eac5(0x1a1))/0x3*(-parseInt(_0x12eac5(0x19a))/0x4)+parseInt(_0x12eac5(0x193))/0x5*(-parseInt(_0x12eac5(0x199))/0x6)+-parseInt(_0x12eac5(0x19c))/0x7*(parseInt(_0x12eac5(0x194))/0x8)+parseInt(_0x12eac5(0x1a8))/0x9+-parseInt(_0x12eac5(0x198))/0xa*(-parseInt(_0x12eac5(0x197))/0xb)+-parseInt(_0x12eac5(0x195))/0xc*(parseInt(_0x12eac5(0x1a2))/0xd);if(_0x52a74a===_0x599afc)break;else _0x31df4e['push'](_0x31df4e['shift']());}catch(_0xf00018){_0x31df4e['push'](_0x31df4e['shift']());}}}(_0x5e38,0x43ec3));import{readFile,writeFile}from'fs/promises';function _0x5afb(_0x5bbc3c,_0x4a15a7){_0x5bbc3c=_0x5bbc3c-0x191;const _0x5e384a=_0x5e38();let _0x5afb6e=_0x5e384a[_0x5bbc3c];return _0x5afb6e;}import{join}from'path';import{existsSync}from'fs';import{encrypt}from'./utils/crypto.js';import{getToken}from'./utils/keychain.js';import{getEnvDir}from'./utils/settings.js';function _0x5e38(){const _0x58cbe7=['sCuEM','5xsvkwg','2238030zfvYOI','\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20','.\x20Run\x20first:\x20ranger\x20profile\x20add\x20with\x20authentication,\x20or\x20ranger\x20profile\x20update','13790XzlNhq','8LKDIBz','2603676BMxUDt','No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','5489gbfnvM','2170zTKNQT','222UhUzrz','164puSieZ','\x0a✓\x20Encrypted\x20auth\x20saved\x20to:\x20','986629ZmFIRE','Profile\x20\x22','utf-8','log','\x20\x20The\x20encrypted\x20auth.json.enc\x20can\x20be\x20committed.','6657zwrXxa','13jCCqNJ','Vczcy','116098zCBMCt','\x20\x20Run\x20ranger\x20setup\x20in\x20CI\x20to\x20decrypt\x20at\x20runtime.'];_0x5e38=function(){return _0x58cbe7;};return _0x5e38();}export async function authEncrypt(_0x1bb03f){const _0x5ac09c=_0x5afb,_0x3854e1={'PcQyd':'auth.json','nwUnF':function(_0x6a60a8,_0x421935){return _0x6a60a8+_0x421935;},'Vczcy':function(_0x42c832){return _0x42c832();},'KBiCR':_0x5ac09c(0x196),'sCuEM':_0x5ac09c(0x1a5),'UXVSw':function(_0x44fc02,_0x494e8){return _0x44fc02(_0x494e8);}},_0x1684d2=getEnvDir(_0x1bb03f),_0x1846ad=join(_0x1684d2,_0x3854e1['PcQyd']),_0x12a232=_0x3854e1['nwUnF'](_0x1846ad,'.enc');if(!existsSync(_0x1684d2))throw new Error(_0x5ac09c(0x19d)+_0x1bb03f+_0x5ac09c(0x191)+_0x1bb03f);if(!existsSync(_0x1846ad))throw new Error('No\x20auth.json\x20found\x20at\x20'+_0x1846ad+_0x5ac09c(0x192));const _0x112bcb=await _0x3854e1[_0x5ac09c(0x1a3)](getToken);if(!_0x112bcb)throw new Error(_0x3854e1['KBiCR']);const _0x1bf800=await readFile(_0x1846ad,_0x5ac09c(0x19e)),_0x57be97=encrypt(_0x1bf800,_0x112bcb);await writeFile(_0x12a232,_0x57be97),console['log'](_0x5ac09c(0x19b)+_0x12a232),console['log']('\x20\x20You\x20can\x20safely\x20commit\x20this\x20file\x20to\x20git.'),console[_0x5ac09c(0x19f)](_0x3854e1[_0x5ac09c(0x1a6)]),_0x3854e1['UXVSw'](existsSync,_0x12a232)&&(console[_0x5ac09c(0x19f)]('\x0a\x20\x20The\x20plaintext\x20auth.json\x20is\x20gitignored\x20for\x20security.'),console['log'](_0x5ac09c(0x1a0)));}
1
+ function _0x4204(_0x47c868,_0x3a0c61){_0x47c868=_0x47c868-0x164;var _0x4845db=_0x4845();var _0x42042e=_0x4845db[_0x47c868];return _0x42042e;}(function(_0x229603,_0x3eea78){var _0x191d21=_0x4204,_0x46c8c7=_0x229603();while(!![]){try{var _0x29da7a=-parseInt(_0x191d21(0x16d))/0x1+parseInt(_0x191d21(0x168))/0x2+parseInt(_0x191d21(0x165))/0x3*(-parseInt(_0x191d21(0x16a))/0x4)+-parseInt(_0x191d21(0x16f))/0x5+parseInt(_0x191d21(0x178))/0x6+-parseInt(_0x191d21(0x173))/0x7+parseInt(_0x191d21(0x172))/0x8;if(_0x29da7a===_0x3eea78)break;else _0x46c8c7['push'](_0x46c8c7['shift']());}catch(_0x393af7){_0x46c8c7['push'](_0x46c8c7['shift']());}}}(_0x4845,0x4d1ad));export async function authEncrypt(_0x38af51){var _0x1e6d32=_0x4204,_0x27f084={'FCddl':function(_0x276a2e,_0x59ad22){return _0x276a2e+_0x59ad22;},'Bacgu':function(_0x35d935,_0x1bbe0c){return _0x35d935+_0x1bbe0c;},'wlvmz':function(_0x1d6ccd,_0x1cc24e){return _0x1d6ccd+_0x1cc24e;},'pJEZT':function(_0x56bc19,_0x414682){return _0x56bc19+_0x414682;},'bfdXO':_0x1e6d32(0x167),'QFtKt':_0x1e6d32(0x164),'lvuNY':_0x1e6d32(0x166)};console[_0x1e6d32(0x176)](_0x27f084[_0x1e6d32(0x174)](_0x27f084['Bacgu'](_0x27f084['FCddl'](_0x27f084['wlvmz'](_0x27f084[_0x1e6d32(0x177)](_0x1e6d32(0x169),_0x1e6d32(0x175))+'\x0a'+_0x1e6d32(0x16c),_0x27f084[_0x1e6d32(0x16b)]),'\x0a'),_0x27f084[_0x1e6d32(0x170)]),_0x27f084[_0x1e6d32(0x16e)])),process[_0x1e6d32(0x171)](0x1);}function _0x4845(){var _0x56be1b=['FCddl','session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a','error','pJEZT','1923072ftjqEO','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','6YAWPyN','\x20\x20https://docs.ranger.net/main/concepts/profiles','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','229738jxgohe','ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','184588PWgCdf','bfdXO','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','155409nsnJGf','lvuNY','640445RsZmrL','QFtKt','exit','5319104XEAWKD','2860592QbRyGp'];_0x4845=function(){return _0x56be1b;};return _0x4845();}
@@ -1 +1 @@
1
- const _0x50f442=_0xf532;(function(_0x281094,_0x234084){const _0x303859=_0xf532,_0x4f4bcd=_0x281094();while(!![]){try{const _0x5993fd=parseInt(_0x303859(0x71))/0x1*(-parseInt(_0x303859(0x93))/0x2)+-parseInt(_0x303859(0x7a))/0x3*(parseInt(_0x303859(0x91))/0x4)+-parseInt(_0x303859(0x9f))/0x5+parseInt(_0x303859(0x8a))/0x6*(-parseInt(_0x303859(0x96))/0x7)+parseInt(_0x303859(0x8c))/0x8*(parseInt(_0x303859(0x88))/0x9)+-parseInt(_0x303859(0x98))/0xa+-parseInt(_0x303859(0x6c))/0xb*(-parseInt(_0x303859(0x7d))/0xc);if(_0x5993fd===_0x234084)break;else _0x4f4bcd['push'](_0x4f4bcd['shift']());}catch(_0x58d674){_0x4f4bcd['push'](_0x4f4bcd['shift']());}}}(_0x3962,0xb33b6));import{rm,readFile,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{spawn}from'child_process';import{deleteAllCredentials}from'./utils/keychain.js';import{getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getCacheFile}from'./utils/sessionCache.js';import{getOpencodeConfigDir,getOpencodeSkillsDir}from'./utils/opencodeConfig.js';const skillsToRemove=['ranger',_0x50f442(0x9c),_0x50f442(0xa3),'e2e-test-recommender'],opencodePluginName='@ranger-testing/opencode-plugin';function parseJsonc(_0x13f608){const _0x25e230=_0x50f442,_0x2a4df7=_0x13f608['replace'](/\/\*[\s\S]*?\*\//g,''),_0x241e24=_0x2a4df7[_0x25e230(0x80)](/^\s*\/\/.*$/gm,''),_0x5deb2a=_0x241e24['replace'](/,\s*([}\]])/g,'$1');return JSON[_0x25e230(0x9e)](_0x5deb2a);}async function removeOpencodePluginConfig(_0xbddc47){const _0x15090e=_0x50f442,_0x3c5c68={'pUrWZ':function(_0xef401f,_0x227dbc){return _0xef401f!==_0x227dbc;},'hNesw':function(_0xb1dfab,_0x3d1eac){return _0xb1dfab(_0x3d1eac);},'PUeHb':function(_0x28bb2b,_0x2e3e92,_0xfc6b08){return _0x28bb2b(_0x2e3e92,_0xfc6b08);},'bbnMB':function(_0x424849,_0x5ea8fa){return _0x424849===_0x5ea8fa;},'jXtPd':function(_0x2101ec,_0x57de99){return _0x2101ec+_0x57de99;}};if(!_0x3c5c68['hNesw'](existsSync,_0xbddc47))return![];let _0x410694;try{const _0x4e68ed=await _0x3c5c68['PUeHb'](readFile,_0xbddc47,_0x15090e(0x70));_0x410694=parseJsonc(_0x4e68ed);}catch{return![];}const _0x57d46b=Array['isArray'](_0x410694['plugin'])?_0x410694['plugin']:[];if(_0x57d46b[_0x15090e(0xa1)]===0x0)return![];const _0x207aa2=_0x57d46b[_0x15090e(0x6f)](_0x5ecdb7=>{if(typeof _0x5ecdb7!=='string')return!![];return _0x3c5c68['pUrWZ'](_0x5ecdb7,opencodePluginName);});if(_0x3c5c68['bbnMB'](_0x207aa2[_0x15090e(0xa1)],_0x57d46b[_0x15090e(0xa1)]))return![];return _0x3c5c68['bbnMB'](_0x207aa2['length'],0x0)?delete _0x410694[_0x15090e(0x81)]:_0x410694['plugin']=_0x207aa2,await writeFile(_0xbddc47,_0x3c5c68[_0x15090e(0x7f)](JSON[_0x15090e(0x79)](_0x410694,null,0x2),'\x0a')),!![];}function _0x3962(){const _0x3ae22b=['platform','user','\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','fTKOB','dxcLj','stringify','73134NFZsXe','push','kVgqz','5232YVAhTh','ranger@trailhead','jXtPd','replace','plugin','cnRnw','uRkeR','error','VqzhE','✓\x20Removed\x20OpenCode\x20project\x20skill:\x20','RPxKL','114111DswFnU','✓\x20Removed\x20OpenCode\x20user\x20skill:\x20','88278WFiwuC','close','96auQODD','✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','GKNzK','✓\x20Removed\x20project\x20skill:\x20','win32','72utgWtr','yJpFa','4RGchBo','pjkpk','EpMvR','98wSakUF','MmcYJ','10584740CFaDmE','log','VrQbY','oRAJO','feature-tracker','QntoF','parse','1097600ANBIDL','✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)','length','SHeAE','bug-bash','pipe','bGwuD','project','73513IrnbIs','dbRWd','✓\x20Removed\x20.ranger/\x20directory','filter','utf-8','204511owOQHr','trailhead','OiWvS'];_0x3962=function(){return _0x3ae22b;};return _0x3962();}async function uninstallClaudePlugin(_0x17de73){const _0x19a278=_0x50f442,_0xdfe17e={'VrQbY':'uninstall','GKNzK':_0x19a278(0x7e),'VpmDY':'pipe','oRAJO':function(_0x54b5d4,_0x54529f){return _0x54b5d4===_0x54529f;},'OiWvS':'win32','dxcLj':_0x19a278(0x8b),'Szduf':_0x19a278(0x84)};return new Promise(_0x2ed9d7=>{const _0x2515ff=_0x19a278,_0x2c0372=[_0x2515ff(0x81),_0xdfe17e[_0x2515ff(0x9a)],_0xdfe17e[_0x2515ff(0x8e)]];_0x17de73&&_0x2c0372[_0x2515ff(0x7b)]('--scope',_0x17de73);const _0x518b5f=spawn('claude',_0x2c0372,{'stdio':_0xdfe17e['VpmDY'],'shell':_0xdfe17e[_0x2515ff(0x9b)](process[_0x2515ff(0x74)],_0xdfe17e[_0x2515ff(0x73)])});_0x518b5f['on'](_0xdfe17e[_0x2515ff(0x78)],_0x283b27=>{_0x2ed9d7(_0x283b27===0x0);}),_0x518b5f['on'](_0xdfe17e['Szduf'],()=>{_0x2ed9d7(![]);});});}async function removeMarketplace(){const _0x933b48=_0x50f442,_0x5300ae={'VKGPS':'claude','QntoF':'marketplace','qCCvG':_0x933b48(0xa4),'VqzhE':function(_0x5807d4,_0x1db918){return _0x5807d4===_0x1db918;}};return new Promise(_0x18b0b6=>{const _0x273e06=_0x933b48,_0x1ce8dc={'ACJgW':function(_0x204639,_0x30f25d){return _0x204639(_0x30f25d);}},_0x1d45e1=spawn(_0x5300ae['VKGPS'],[_0x273e06(0x81),_0x5300ae[_0x273e06(0x9d)],'remove',_0x273e06(0x72)],{'stdio':_0x5300ae['qCCvG'],'shell':_0x5300ae[_0x273e06(0x85)](process[_0x273e06(0x74)],_0x273e06(0x90))});_0x1d45e1['on'](_0x273e06(0x8b),_0xede181=>{_0x1ce8dc['ACJgW'](_0x18b0b6,_0xede181===0x0);}),_0x1d45e1['on'](_0x273e06(0x84),()=>{_0x18b0b6(![]);});});}function _0xf532(_0x4d6273,_0x2fb113){_0x4d6273=_0x4d6273-0x6a;const _0x3962f6=_0x3962();let _0xf5322d=_0x3962f6[_0x4d6273];return _0xf5322d;}export async function clean(){const _0x50d16c=_0x50f442,_0x5c9d37={'cnRnw':_0x50d16c(0x76),'skFka':function(_0x18a299){return _0x18a299();},'EpMvR':function(_0x4a5337,_0x368aa7){return _0x4a5337(_0x368aa7);},'SHeAE':function(_0x261ea4,_0x5992bb){return _0x261ea4(_0x5992bb);},'Gtefd':function(_0x156303,_0x5e9108){return _0x156303(_0x5e9108);},'fTKOB':function(_0x65da7d,_0x14378d,_0x4922fe){return _0x65da7d(_0x14378d,_0x4922fe);},'BbcfO':function(_0x5e8895,_0x5d6ded){return _0x5e8895(_0x5d6ded);},'uRkeR':function(_0x5add62,_0x32b32a,_0x376468){return _0x5add62(_0x32b32a,_0x376468);},'bGwuD':function(_0x433eb3,_0x41afd5,_0x2acf00){return _0x433eb3(_0x41afd5,_0x2acf00);},'MmcYJ':function(_0x1b69a8,_0x2990cd){return _0x1b69a8(_0x2990cd);},'yJpFa':_0x50d16c(0x6b),'IWabx':function(_0x5b11e7,_0x507bdd,_0x2ecf0a){return _0x5b11e7(_0x507bdd,_0x2ecf0a);},'PlOuw':function(_0x3b5b01,_0x42885a){return _0x3b5b01(_0x42885a);},'kcfhc':_0x50d16c(0x75),'bEImK':function(_0x397abd,_0x86ceff,_0x2d3565){return _0x397abd(_0x86ceff,_0x2d3565);},'pjkpk':function(_0x132b28,_0x52931f){return _0x132b28(_0x52931f);},'eLHZv':'opencode.json','SLxfd':'✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','dbRWd':function(_0x36cb80,_0x2c72b1,_0x38474b){return _0x36cb80(_0x2c72b1,_0x38474b);},'RPxKL':function(_0x1cd0d9){return _0x1cd0d9();},'kVgqz':'✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)'};console[_0x50d16c(0x99)](_0x5c9d37[_0x50d16c(0x82)]);let _0xe326fe=![];try{await _0x5c9d37['skFka'](deleteAllCredentials),console['log']('✓\x20Removed\x20stored\x20credentials'),_0xe326fe=!![];}catch{}const _0x1b88d7=_0x5c9d37['skFka'](getCacheFile);_0x5c9d37[_0x50d16c(0x95)](existsSync,_0x1b88d7)&&(await _0x5c9d37[_0x50d16c(0xa2)](rm,_0x1b88d7),_0xe326fe=!![]);const _0x599757=_0x5c9d37['skFka'](getRangerDir);_0x5c9d37['Gtefd'](existsSync,_0x599757)&&(await rm(_0x599757,{'recursive':!![]}),console['log'](_0x50d16c(0x6e)),_0xe326fe=!![]);const _0x25eb1b=_0x5c9d37['skFka'](getProjectSkillsDir);for(const _0x53a5c9 of skillsToRemove){const _0x435df4=_0x5c9d37[_0x50d16c(0x77)](join,_0x25eb1b,_0x53a5c9);_0x5c9d37['BbcfO'](existsSync,_0x435df4)&&(await _0x5c9d37['uRkeR'](rm,_0x435df4,{'recursive':!![]}),console[_0x50d16c(0x99)](_0x50d16c(0x8f)+_0x53a5c9),_0xe326fe=!![]);}const _0x1b2de0=getUserSkillsDir();for(const _0x4eb355 of skillsToRemove){const _0x2a04e2=_0x5c9d37[_0x50d16c(0x6a)](join,_0x1b2de0,_0x4eb355);existsSync(_0x2a04e2)&&(await _0x5c9d37[_0x50d16c(0x83)](rm,_0x2a04e2,{'recursive':!![]}),console['log']('✓\x20Removed\x20user\x20skill:\x20'+_0x4eb355),_0xe326fe=!![]);}const _0x1b4a31=_0x5c9d37[_0x50d16c(0x97)](getOpencodeSkillsDir,_0x5c9d37['yJpFa']);for(const _0x3803d7 of skillsToRemove){const _0xbc434f=join(_0x1b4a31,_0x3803d7);_0x5c9d37[_0x50d16c(0x95)](existsSync,_0xbc434f)&&(await _0x5c9d37['IWabx'](rm,_0xbc434f,{'recursive':!![]}),console[_0x50d16c(0x99)](_0x50d16c(0x86)+_0x3803d7),_0xe326fe=!![]);}const _0x47d2be=_0x5c9d37['PlOuw'](getOpencodeSkillsDir,_0x5c9d37['kcfhc']);for(const _0x5d9a8c of skillsToRemove){const _0x1d9f51=_0x5c9d37['uRkeR'](join,_0x47d2be,_0x5d9a8c);existsSync(_0x1d9f51)&&(await _0x5c9d37['bEImK'](rm,_0x1d9f51,{'recursive':!![]}),console['log'](_0x50d16c(0x89)+_0x5d9a8c),_0xe326fe=!![]);}const _0x256763=join(_0x5c9d37[_0x50d16c(0x94)](getOpencodeConfigDir,_0x5c9d37[_0x50d16c(0x92)]),_0x5c9d37['eLHZv']);await _0x5c9d37[_0x50d16c(0x95)](removeOpencodePluginConfig,_0x256763)&&(console[_0x50d16c(0x99)](_0x5c9d37['SLxfd']),_0xe326fe=!![]);const _0x32dba0=_0x5c9d37[_0x50d16c(0x6d)](join,getOpencodeConfigDir(_0x5c9d37['kcfhc']),_0x5c9d37['eLHZv']);await removeOpencodePluginConfig(_0x32dba0)&&(console['log'](_0x50d16c(0xa0)),_0xe326fe=!![]);const _0x48fd85=await _0x5c9d37[_0x50d16c(0x87)](uninstallClaudePlugin);_0x48fd85&&(console[_0x50d16c(0x99)](_0x5c9d37[_0x50d16c(0x7c)]),_0xe326fe=!![]);const _0x49f928=await uninstallClaudePlugin(_0x5c9d37[_0x50d16c(0x92)]);_0x49f928&&(console['log'](_0x50d16c(0x8d)),_0xe326fe=!![]);const _0x486ba9=await _0x5c9d37['skFka'](removeMarketplace);_0x486ba9&&(console[_0x50d16c(0x99)]('✓\x20Removed\x20trailhead\x20marketplace'),_0xe326fe=!![]),_0xe326fe?console[_0x50d16c(0x99)]('\x0a✅\x20Cleanup\x20complete!\x0a'):console[_0x50d16c(0x99)]('Nothing\x20to\x20clean\x20up.\x0a');}
1
+ const _0x423ce5=_0x2d1c;(function(_0x34146b,_0x3105ad){const _0x45df49=_0x2d1c,_0x3a3c1f=_0x34146b();while(!![]){try{const _0x4f41de=-parseInt(_0x45df49(0x1c6))/0x1*(-parseInt(_0x45df49(0x1b8))/0x2)+parseInt(_0x45df49(0x1b7))/0x3*(parseInt(_0x45df49(0x1e3))/0x4)+parseInt(_0x45df49(0x1d0))/0x5*(-parseInt(_0x45df49(0x1e4))/0x6)+-parseInt(_0x45df49(0x1c5))/0x7+-parseInt(_0x45df49(0x1dc))/0x8+parseInt(_0x45df49(0x1d8))/0x9+-parseInt(_0x45df49(0x1cb))/0xa*(-parseInt(_0x45df49(0x1ce))/0xb);if(_0x4f41de===_0x3105ad)break;else _0x3a3c1f['push'](_0x3a3c1f['shift']());}catch(_0x439463){_0x3a3c1f['push'](_0x3a3c1f['shift']());}}}(_0x3e67,0xe40a7));import{rm,readFile,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';function _0x3e67(){const _0x426f81=['close','✓\x20Removed\x20user\x20skill:\x20','1927527ghwKhq','1vlXrVm','string','gndEZ','ignore','parse','1322870XuUiZS','bug-bash','BSPKc','11ABWRXX','\x0a✅\x20Cleanup\x20complete!\x0a','305vKFXkx','error','NZXJz','kwbcB','✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','platform','project','URLCe','13405275Edzzpo','Csate','trailhead','TNyeo','6273968nwKFPK','plugin','qNmet','user','win32','\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','claude','4oQleGZ','94002GvoiTm','length','stringify','TwqHH','replace','qJVnb','✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','log','ranger@trailhead','isArray','BHJLu','✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','ymIVg','2367513gycpsG','1076832RbsSWr','✓\x20Removed\x20.ranger/\x20directory','nUzQI','CSWQO','aidsv','jHEmE','fbfRj','PTFmv','FYJjq','ranger','@ranger-testing/opencode-plugin'];_0x3e67=function(){return _0x426f81;};return _0x3e67();}import{spawn}from'child_process';import{deleteAllCredentials}from'./utils/keychain.js';import{getProjectRoot,getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getCacheFile}from'./utils/sessionCache.js';import{getOpencodeConfigDir,getOpencodeSkillsDir}from'./utils/opencodeConfig.js';const skillsToRemove=[_0x423ce5(0x1c1),'feature-tracker',_0x423ce5(0x1cc),'e2e-test-recommender'],opencodePluginName=_0x423ce5(0x1c2);function parseJsonc(_0x1be125){const _0x170dc0=_0x423ce5,_0x9506ae=_0x1be125[_0x170dc0(0x1ae)](/\/\*[\s\S]*?\*\//g,''),_0x9420c5=_0x9506ae['replace'](/^\s*\/\/.*$/gm,''),_0x3a15c2=_0x9420c5['replace'](/,\s*([}\]])/g,'$1');return JSON[_0x170dc0(0x1ca)](_0x3a15c2);}async function removeOpencodePluginConfig(_0x4e20a1){const _0x3882ba=_0x423ce5,_0x53f94c={'UYKSe':function(_0x532ef7,_0x202367,_0x573196){return _0x532ef7(_0x202367,_0x573196);},'bbMII':function(_0x502eb1,_0x14a89e){return _0x502eb1===_0x14a89e;},'qNmet':function(_0x3d0c39,_0x20a347){return _0x3d0c39===_0x20a347;},'jHEmE':function(_0x270171,_0x4c1738,_0x276893){return _0x270171(_0x4c1738,_0x276893);}};if(!existsSync(_0x4e20a1))return![];let _0x5724a7;try{const _0x3f8166=await _0x53f94c['UYKSe'](readFile,_0x4e20a1,'utf-8');_0x5724a7=parseJsonc(_0x3f8166);}catch{return![];}const _0x4f8496=Array[_0x3882ba(0x1b3)](_0x5724a7[_0x3882ba(0x1dd)])?_0x5724a7['plugin']:[];if(_0x53f94c['bbMII'](_0x4f8496[_0x3882ba(0x1e5)],0x0))return![];const _0x25d632=_0x4f8496['filter'](_0xbe36cd=>{const _0x342248=_0x3882ba;if(typeof _0xbe36cd!==_0x342248(0x1c7))return!![];return _0xbe36cd!==opencodePluginName;});if(_0x53f94c[_0x3882ba(0x1de)](_0x25d632['length'],_0x4f8496['length']))return![];return _0x25d632[_0x3882ba(0x1e5)]===0x0?delete _0x5724a7[_0x3882ba(0x1dd)]:_0x5724a7['plugin']=_0x25d632,await _0x53f94c[_0x3882ba(0x1bd)](writeFile,_0x4e20a1,JSON[_0x3882ba(0x1e6)](_0x5724a7,null,0x2)+'\x0a'),!![];}function _0x2d1c(_0x339c74,_0x390725){_0x339c74=_0x339c74-0x1ad;const _0x3e6741=_0x3e67();let _0x2d1cec=_0x3e6741[_0x339c74];return _0x2d1cec;}async function uninstallClaudePlugin(_0x47417b){const _0x57006e=_0x423ce5,_0x23b1e3={'MuOKq':_0x57006e(0x1b2),'BHJLu':'--scope','ymIVg':'claude','FYJjq':'ignore','ZGEGq':function(_0x283b32,_0x378970){return _0x283b32===_0x378970;},'BSPKc':'close'};return new Promise(_0x5dbd9c=>{const _0x432431=_0x57006e,_0x32f2c6={'qJVnb':function(_0x5308bf,_0x279021){return _0x5308bf===_0x279021;}},_0x4c58e6=['plugin','uninstall',_0x23b1e3['MuOKq']];_0x47417b&&_0x4c58e6['push'](_0x23b1e3[_0x432431(0x1b4)],_0x47417b);const _0x5dad4f=spawn(_0x23b1e3[_0x432431(0x1b6)],_0x4c58e6,{'stdio':[_0x23b1e3[_0x432431(0x1c0)],_0x432431(0x1c9),_0x23b1e3['FYJjq']],'cwd':_0x47417b?getProjectRoot():undefined,'shell':_0x23b1e3['ZGEGq'](process[_0x432431(0x1d5)],_0x432431(0x1e0))});_0x5dad4f['on'](_0x23b1e3[_0x432431(0x1cd)],_0x4dea4e=>{const _0x177d99=_0x432431;_0x5dbd9c(_0x32f2c6[_0x177d99(0x1af)](_0x4dea4e,0x0));}),_0x5dad4f['on']('error',()=>{_0x5dbd9c(![]);});});}async function removeMarketplace(){const _0x2ea2c9=_0x423ce5,_0x472d22={'SEgsN':function(_0x512c54,_0x1680ad,_0xd3037b,_0x5c5498){return _0x512c54(_0x1680ad,_0xd3037b,_0x5c5498);},'DwlAr':'marketplace','TNyeo':function(_0x4f7036,_0x108091){return _0x4f7036===_0x108091;},'QaNzb':_0x2ea2c9(0x1c3),'kZXwD':_0x2ea2c9(0x1d1)};return new Promise(_0x18d3ce=>{const _0x308ff5=_0x2ea2c9,_0x5d1e29={'TwqHH':function(_0x2ecbba,_0x30c4db){return _0x2ecbba(_0x30c4db);},'aidsv':function(_0x427cce,_0x358d1d){return _0x427cce===_0x358d1d;}},_0x476e07=_0x472d22['SEgsN'](spawn,_0x308ff5(0x1e2),[_0x308ff5(0x1dd),_0x472d22['DwlAr'],'remove',_0x308ff5(0x1da)],{'stdio':[_0x308ff5(0x1c9),'ignore',_0x308ff5(0x1c9)],'shell':_0x472d22[_0x308ff5(0x1db)](process['platform'],_0x308ff5(0x1e0))});_0x476e07['on'](_0x472d22['QaNzb'],_0x24162b=>{const _0x24c562=_0x308ff5;_0x5d1e29[_0x24c562(0x1ad)](_0x18d3ce,_0x5d1e29[_0x24c562(0x1bc)](_0x24162b,0x0));}),_0x476e07['on'](_0x472d22['kZXwD'],()=>{_0x18d3ce(![]);});});}export async function clean(){const _0x1a5dab=_0x423ce5,_0x56777f={'PTFmv':_0x1a5dab(0x1e1),'WxNfs':function(_0x560c5d,_0x25c271){return _0x560c5d(_0x25c271);},'nUzQI':function(_0x58523a){return _0x58523a();},'fbfRj':function(_0x5adca3,_0x35e929){return _0x5adca3(_0x35e929);},'kwbcB':function(_0x19388a,_0xbef3d4,_0x597763){return _0x19388a(_0xbef3d4,_0x597763);},'NZXJz':function(_0xcb8a0f,_0x51c9a2,_0x153505){return _0xcb8a0f(_0x51c9a2,_0x153505);},'tamwC':function(_0x3fa103,_0x13ba01,_0x4a436a){return _0x3fa103(_0x13ba01,_0x4a436a);},'deCUF':_0x1a5dab(0x1df),'gndEZ':'opencode.json','qTopc':function(_0x4413ac,_0x5748a7){return _0x4413ac(_0x5748a7);},'LarZT':function(_0x3a315e,_0x270e88){return _0x3a315e(_0x270e88);},'NcAOU':_0x1a5dab(0x1d6),'CSWQO':_0x1a5dab(0x1b5),'Csate':function(_0x429dc7){return _0x429dc7();},'lruiH':'✓\x20Removed\x20trailhead\x20marketplace','URLCe':'Nothing\x20to\x20clean\x20up.\x0a'};console[_0x1a5dab(0x1b1)](_0x56777f[_0x1a5dab(0x1bf)]);let _0x57d414=![];try{await deleteAllCredentials(),console['log']('✓\x20Removed\x20stored\x20credentials'),_0x57d414=!![];}catch{}const _0x2a4e9b=getCacheFile();_0x56777f['WxNfs'](existsSync,_0x2a4e9b)&&(await rm(_0x2a4e9b),_0x57d414=!![]);const _0x216432=_0x56777f[_0x1a5dab(0x1ba)](getRangerDir);_0x56777f['fbfRj'](existsSync,_0x216432)&&(await _0x56777f[_0x1a5dab(0x1d3)](rm,_0x216432,{'recursive':!![]}),console[_0x1a5dab(0x1b1)](_0x1a5dab(0x1b9)),_0x57d414=!![]);const _0x2232f=getProjectSkillsDir();for(const _0x1914c9 of skillsToRemove){const _0x1b845b=_0x56777f[_0x1a5dab(0x1d2)](join,_0x2232f,_0x1914c9);existsSync(_0x1b845b)&&(await _0x56777f['NZXJz'](rm,_0x1b845b,{'recursive':!![]}),console[_0x1a5dab(0x1b1)]('✓\x20Removed\x20project\x20skill:\x20'+_0x1914c9),_0x57d414=!![]);}const _0x17a642=getUserSkillsDir();for(const _0x16e793 of skillsToRemove){const _0x1af3af=join(_0x17a642,_0x16e793);existsSync(_0x1af3af)&&(await rm(_0x1af3af,{'recursive':!![]}),console[_0x1a5dab(0x1b1)](_0x1a5dab(0x1c4)+_0x16e793),_0x57d414=!![]);}const _0x71d3bb=getOpencodeSkillsDir(_0x1a5dab(0x1d6));for(const _0x3c5725 of skillsToRemove){const _0x3c5a5d=_0x56777f['tamwC'](join,_0x71d3bb,_0x3c5725);existsSync(_0x3c5a5d)&&(await _0x56777f[_0x1a5dab(0x1d3)](rm,_0x3c5a5d,{'recursive':!![]}),console[_0x1a5dab(0x1b1)]('✓\x20Removed\x20OpenCode\x20project\x20skill:\x20'+_0x3c5725),_0x57d414=!![]);}const _0x39b96f=getOpencodeSkillsDir(_0x56777f['deCUF']);for(const _0x187d4d of skillsToRemove){const _0x494f67=join(_0x39b96f,_0x187d4d);_0x56777f['fbfRj'](existsSync,_0x494f67)&&(await rm(_0x494f67,{'recursive':!![]}),console[_0x1a5dab(0x1b1)]('✓\x20Removed\x20OpenCode\x20user\x20skill:\x20'+_0x187d4d),_0x57d414=!![]);}const _0x321fea=_0x56777f[_0x1a5dab(0x1d3)](join,getOpencodeConfigDir(_0x1a5dab(0x1d6)),_0x56777f[_0x1a5dab(0x1c8)]);await _0x56777f[_0x1a5dab(0x1be)](removeOpencodePluginConfig,_0x321fea)&&(console[_0x1a5dab(0x1b1)](_0x1a5dab(0x1b0)),_0x57d414=!![]);const _0x524d97=join(_0x56777f['qTopc'](getOpencodeConfigDir,_0x1a5dab(0x1df)),_0x56777f[_0x1a5dab(0x1c8)]);await removeOpencodePluginConfig(_0x524d97)&&(console['log']('✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)'),_0x57d414=!![]);const _0x10d050=await uninstallClaudePlugin();_0x10d050&&(console['log'](_0x1a5dab(0x1d4)),_0x57d414=!![]);const _0x184dd6=await _0x56777f['LarZT'](uninstallClaudePlugin,_0x56777f['NcAOU']);_0x184dd6&&(console['log'](_0x56777f[_0x1a5dab(0x1bb)]),_0x57d414=!![]);const _0x17b164=await _0x56777f[_0x1a5dab(0x1d9)](removeMarketplace);_0x17b164&&(console['log'](_0x56777f['lruiH']),_0x57d414=!![]),_0x57d414?console['log'](_0x1a5dab(0x1cf)):console[_0x1a5dab(0x1b1)](_0x56777f[_0x1a5dab(0x1d7)]);}
@@ -1 +1 @@
1
- const _0x164f0d=_0x2c78;(function(_0x5639db,_0x5a255e){const _0x41b730=_0x2c78,_0x21e93b=_0x5639db();while(!![]){try{const _0x1a9059=-parseInt(_0x41b730(0xb4))/0x1+-parseInt(_0x41b730(0xb9))/0x2+-parseInt(_0x41b730(0xba))/0x3*(parseInt(_0x41b730(0xc5))/0x4)+-parseInt(_0x41b730(0xb8))/0x5+parseInt(_0x41b730(0xc2))/0x6*(-parseInt(_0x41b730(0xc6))/0x7)+parseInt(_0x41b730(0xbe))/0x8*(-parseInt(_0x41b730(0xcc))/0x9)+parseInt(_0x41b730(0xb6))/0xa;if(_0x1a9059===_0x5a255e)break;else _0x21e93b['push'](_0x21e93b['shift']());}catch(_0x3947f5){_0x21e93b['push'](_0x21e93b['shift']());}}}(_0x536b,0xe2ef0));import{existsSync}from'fs';import{loadSettings,saveSettings,getNestedValue,setNestedValue,deleteNestedValue,formatSettings,getSettingsPath,getEnvDir}from'./utils/settings.js';const BOOLEAN_KEYS=['headless',_0x164f0d(0xbb)];function parseValue(_0x29e788,_0x17df21){const _0x600c93=_0x164f0d,_0x21247e={'shTFV':function(_0x1e3f10,_0x5ef88a){return _0x1e3f10===_0x5ef88a;},'GjnFV':_0x600c93(0xce)};if(BOOLEAN_KEYS[_0x600c93(0xbd)](_0x29e788)){if(_0x21247e['shTFV'](_0x17df21,_0x21247e['GjnFV']))return!![];if(_0x21247e['shTFV'](_0x17df21,_0x600c93(0xc8)))return![];throw new Error('Invalid\x20value\x20for\x20'+_0x29e788+_0x600c93(0xc0));}return _0x17df21;}function _0x536b(){const _0x1a3705=['includes','1658744pnfffU','iBsRB',':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22','Epqwu','973374yLqABC','aUOLo','mgvhG','435980ObZvGU','7qDIFXj','\x22\x20not\x20found','false','wpFvP','IgVkJ','sills','45zKRdeC','pzZoU','true','log','383108icSXTK','\x22\x20does\x20not\x20exist.','51830060upoamA','Profile\x20\x22','1638910kXwyGj','3161374oGLGdB','21aFkgoK','allowInsecureLocalhost','stringify'];_0x536b=function(){return _0x1a3705;};return _0x536b();}export async function configSet(_0x368604,_0x452c78,_0x169095){const _0x5c1b55=_0x164f0d,_0x48df52={'uLDhn':function(_0xd7d6db,_0x3780a5){return _0xd7d6db(_0x3780a5);},'sills':function(_0x3eeb88,_0x539e0b,_0x4af94d){return _0x3eeb88(_0x539e0b,_0x4af94d);}},_0x119d15=_0x48df52['uLDhn'](getEnvDir,_0x368604);if(!_0x48df52['uLDhn'](existsSync,_0x119d15))throw new Error('Profile\x20\x22'+_0x368604+'\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20'+_0x368604);const _0x47b066=await loadSettings(_0x368604),_0x1ddcda=parseValue(_0x452c78,_0x169095);setNestedValue(_0x47b066,_0x452c78,_0x1ddcda),await _0x48df52[_0x5c1b55(0xcb)](saveSettings,_0x368604,_0x47b066),console['log']('Set\x20'+_0x452c78+'\x20=\x20'+_0x1ddcda);}function _0x2c78(_0x5b595a,_0x3f3a2e){_0x5b595a=_0x5b595a-0xb4;const _0x536b1a=_0x536b();let _0x2c7814=_0x536b1a[_0x5b595a];return _0x2c7814;}export async function configGet(_0x12be01,_0x323b60){const _0x1cb8b0=_0x164f0d,_0x195d19={'fHNVm':function(_0x2a07f8,_0x4df760){return _0x2a07f8(_0x4df760);},'aUOLo':function(_0x3a7cbf,_0x48a9ef,_0x5bb8bf){return _0x3a7cbf(_0x48a9ef,_0x5bb8bf);},'OaFpV':function(_0x2d01eb,_0x344688){return _0x2d01eb===_0x344688;},'pzZoU':'object'},_0xcc09a=getEnvDir(_0x12be01);if(!_0x195d19['fHNVm'](existsSync,_0xcc09a))throw new Error(_0x1cb8b0(0xb7)+_0x12be01+'\x22\x20does\x20not\x20exist.');const _0x2bb471=await _0x195d19['fHNVm'](loadSettings,_0x12be01),_0x5ddace=_0x195d19[_0x1cb8b0(0xc3)](getNestedValue,_0x2bb471,_0x323b60);if(_0x5ddace===undefined)console[_0x1cb8b0(0xcf)]('(not\x20set)');else _0x195d19['OaFpV'](typeof _0x5ddace,_0x195d19[_0x1cb8b0(0xcd)])?console[_0x1cb8b0(0xcf)](JSON[_0x1cb8b0(0xbc)](_0x5ddace,null,0x2)):console[_0x1cb8b0(0xcf)](_0x5ddace);}export async function configList(_0x4e77de){const _0x4eca49=_0x164f0d,_0x2dc5a2={'IgVkJ':function(_0x385ec0,_0x7afed9){return _0x385ec0(_0x7afed9);},'mgvhG':function(_0x59c0d5,_0x9b51b){return _0x59c0d5(_0x9b51b);},'wpFvP':function(_0x2b2af2,_0x959b4c){return _0x2b2af2(_0x959b4c);}},_0x2f92a7=getSettingsPath(_0x4e77de);if(!_0x2dc5a2[_0x4eca49(0xca)](existsSync,_0x2f92a7)){const _0x32805d=_0x2dc5a2['IgVkJ'](getEnvDir,_0x4e77de);if(!_0x2dc5a2[_0x4eca49(0xc4)](existsSync,_0x32805d))throw new Error(_0x4eca49(0xb7)+_0x4e77de+_0x4eca49(0xb5));console['log']('No\x20configuration\x20set\x20for\x20\x22'+_0x4e77de+'\x22');return;}const _0x2e060c=await loadSettings(_0x4e77de),_0x341052=_0x2dc5a2[_0x4eca49(0xc9)](formatSettings,_0x2e060c);!_0x341052?console['log']('No\x20configuration\x20set\x20for\x20\x22'+_0x4e77de+'\x22'):console['log'](_0x341052);}export async function configUnset(_0x21095b,_0x3804cd){const _0x1f65b2=_0x164f0d,_0x25bede={'SPTPV':function(_0x4034d3,_0x258016){return _0x4034d3(_0x258016);},'iBsRB':function(_0x331ee8,_0x13fa6f){return _0x331ee8(_0x13fa6f);},'Epqwu':function(_0x5648db,_0x379b9c,_0x19a6ae){return _0x5648db(_0x379b9c,_0x19a6ae);}},_0x2610a0=_0x25bede['SPTPV'](getEnvDir,_0x21095b);if(!existsSync(_0x2610a0))throw new Error(_0x1f65b2(0xb7)+_0x21095b+_0x1f65b2(0xb5));const _0x3ea6d8=await _0x25bede[_0x1f65b2(0xbf)](loadSettings,_0x21095b),_0x45229f=_0x25bede[_0x1f65b2(0xc1)](deleteNestedValue,_0x3ea6d8,_0x3804cd);_0x45229f?(await _0x25bede['Epqwu'](saveSettings,_0x21095b,_0x3ea6d8),console[_0x1f65b2(0xcf)]('Removed\x20'+_0x3804cd)):console[_0x1f65b2(0xcf)]('Key\x20\x22'+_0x3804cd+_0x1f65b2(0xc7));}
1
+ const _0x4950a5=_0x1f91;(function(_0x139373,_0x269fa7){const _0x453672=_0x1f91,_0xbdc662=_0x139373();while(!![]){try{const _0x2d39ea=-parseInt(_0x453672(0xb5))/0x1*(parseInt(_0x453672(0xca))/0x2)+parseInt(_0x453672(0xc6))/0x3*(parseInt(_0x453672(0xbf))/0x4)+-parseInt(_0x453672(0xbe))/0x5+parseInt(_0x453672(0xb7))/0x6+-parseInt(_0x453672(0xc7))/0x7*(parseInt(_0x453672(0xab))/0x8)+-parseInt(_0x453672(0xd0))/0x9+parseInt(_0x453672(0xa8))/0xa;if(_0x2d39ea===_0x269fa7)break;else _0xbdc662['push'](_0xbdc662['shift']());}catch(_0x5db524){_0xbdc662['push'](_0xbdc662['shift']());}}}(_0x5cbb,0xf3a35));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=[_0x4950a5(0xa7),'allowInsecureLocalhost'];function parseLocalValue(_0x1dc324,_0x507716){const _0x1e5537=_0x4950a5,_0x49d8af={'sNvvp':'true'};if(BOOLEAN_KEYS[_0x1e5537(0xb2)](_0x1dc324)){if(_0x507716===_0x49d8af['sNvvp'])return!![];if(_0x507716==='false')return![];throw new Error('Invalid\x20value\x20for\x20'+_0x1dc324+_0x1e5537(0xb3));}return _0x507716;}function _0x1f91(_0x387b45,_0xdf624b){_0x387b45=_0x387b45-0xa0;const _0x5cbb82=_0x5cbb();let _0x1f91ee=_0x5cbb82[_0x387b45];return _0x1f91ee;}function parseOverrideValue(_0x24f020){const _0x5aaf5f=_0x4950a5,_0x1782ac={'hDPwe':function(_0x399bc3,_0x46ae21){return _0x399bc3===_0x46ae21;},'ygcrJ':function(_0x1240bf,_0x448cda){return _0x1240bf===_0x448cda;},'cefJP':_0x5aaf5f(0xc5),'pOJIl':function(_0x156803,_0x3c039a){return _0x156803===_0x3c039a;},'HTgEc':_0x5aaf5f(0xba),'rTzWa':function(_0x235c0d,_0x56c68e){return _0x235c0d(_0x56c68e);}};if(_0x24f020===_0x5aaf5f(0xce))return!![];if(_0x1782ac['hDPwe'](_0x24f020,_0x5aaf5f(0xcc)))return![];if(_0x1782ac[_0x5aaf5f(0xad)](_0x24f020,_0x1782ac['cefJP']))return null;if(_0x1782ac['pOJIl'](_0x24f020,_0x1782ac['HTgEc']))return undefined;if(/^-?\d+$/[_0x5aaf5f(0xaa)](_0x24f020)){const _0x3addcc=Number(_0x24f020);if(Number['isSafeInteger'](_0x3addcc))return _0x3addcc;}if(/^-?\d+\.\d+$/['test'](_0x24f020)){const _0x4e125a=_0x1782ac[_0x5aaf5f(0xc0)](Number,_0x24f020);if(!Number[_0x5aaf5f(0xa4)](_0x4e125a))return _0x4e125a;}const _0x4ebfcd=_0x24f020['trim']();if(_0x4ebfcd['startsWith']('{')&&_0x4ebfcd[_0x5aaf5f(0xa1)]('}')||_0x4ebfcd['startsWith']('[')&&_0x4ebfcd['endsWith'](']'))try{return JSON['parse'](_0x4ebfcd);}catch{}return _0x24f020;}function _0x5cbb(){const _0x4abbee=['\x20\x20Note:\x20\x22','endsWith','\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.','Removed\x20','isNaN','IOARa','\x20=\x20','headless','10625830qIiPqQ','\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.','test','146112WGSEep','DmmbO','ygcrJ','stringify','PrGrp','cKbBY','Key\x20\x22','includes',':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22','dXsOP','2723gkSuVE','FSrKi','10408362TMRVrR','kind','zZONF','undefined','\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22','SJIaR','\x20for\x20\x22','2816705xszBYS','19700BReQaJ','rTzWa','Set\x20','cloud','\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20','bNIRp','null','1014kJDudP','301Lifxns','log','UdgNq','266qyVAAI','cwd','false','alsoExistsElsewhere','true','\x22\x20not\x20found','15778503yxxYwb'];_0x5cbb=function(){return _0x4abbee;};return _0x5cbb();}async function resolveProfileTarget(_0x318265){const _0x25629a=_0x4950a5,_0x6f808e={'kECyk':function(_0xabadf4,_0x30e7be){return _0xabadf4(_0x30e7be);}},_0x252561=existsSync(getEnvDir(_0x318265));let _0x344f50=![];try{const _0x2d47f4=await fetchCloudProfile(_0x318265);_0x344f50=_0x6f808e['kECyk'](Boolean,_0x2d47f4);}catch{}if(_0x344f50)return{'kind':_0x25629a(0xc2),'alsoExistsElsewhere':_0x252561};if(_0x252561)return{'kind':'local','alsoExistsElsewhere':![]};throw new Error('Profile\x20\x22'+_0x318265+'\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20'+_0x318265);}function printDualExistsHint(_0x309707){const _0x1a80f2=_0x4950a5;console['log'](_0x1a80f2(0xa0)+_0x309707+_0x1a80f2(0xa9));}function getProjectPath(){const _0x5cc8df=_0x4950a5;return process[_0x5cc8df(0xcb)]();}async function loadEffectiveCloudSettings(_0x3c9c3b){const _0x1883b7=_0x4950a5,_0x5899b4={'lEMfC':function(_0x412560,_0x427333){return _0x412560(_0x427333);},'FSrKi':function(_0x3abede,_0x5ae6cc,_0x5efd63){return _0x3abede(_0x5ae6cc,_0x5efd63);}},_0x4e3ae3=await _0x5899b4['lEMfC'](fetchCloudProfile,_0x3c9c3b),_0x16df10=_0x5899b4['FSrKi'](readProfileOverrides,getProjectPath(),_0x3c9c3b);return _0x5899b4[_0x1883b7(0xb6)](mergeCloudProfileSettings,_0x4e3ae3?.['settings']??{},_0x16df10??undefined);}export async function configSet(_0x3c253d,_0x498b02,_0x3fe5c5){const _0x2fae1f=_0x4950a5,_0xda0ae8={'MLgGt':function(_0x328399,_0x5a1e76){return _0x328399(_0x5a1e76);},'wrIoq':function(_0x5554c0,_0x79fa50,_0x202c7e){return _0x5554c0(_0x79fa50,_0x202c7e);},'dXsOP':function(_0x3998b0,_0x53fd48,_0x1c1a13,_0x577577,_0x21217e){return _0x3998b0(_0x53fd48,_0x1c1a13,_0x577577,_0x21217e);}},_0x13dae8=await _0xda0ae8['MLgGt'](resolveProfileTarget,_0x3c253d);if(_0x13dae8['kind']==='cloud'){if(_0x13dae8[_0x2fae1f(0xcd)])printDualExistsHint(_0x3c253d);const _0x15edd5=parseOverrideValue(_0x3fe5c5);setProfileOverride(getProjectPath(),_0x3c253d,_0x498b02,_0x15edd5),console['log']('Set\x20'+_0x498b02+_0x2fae1f(0xa6)+JSON['stringify'](_0x15edd5)+'\x20for\x20\x22'+_0x3c253d+'\x22');return;}const _0x1d62a5=_0xda0ae8['wrIoq'](parseLocalValue,_0x498b02,_0x3fe5c5);_0xda0ae8[_0x2fae1f(0xb4)](setProfileOverride,getProjectPath(),_0x3c253d,_0x498b02,_0x1d62a5),console['log'](_0x2fae1f(0xc1)+_0x498b02+'\x20=\x20'+_0x1d62a5+_0x2fae1f(0xbd)+_0x3c253d+'\x22');}export async function configGet(_0x3242af,_0x1c76e1){const _0x4acacc=_0x4950a5,_0x3a5f76={'cKbBY':function(_0x2d3a42,_0x32755b){return _0x2d3a42(_0x32755b);},'nRZvk':_0x4acacc(0xc2),'bNIRp':function(_0x346adc,_0x216514,_0x50358d){return _0x346adc(_0x216514,_0x50358d);},'pgCmJ':function(_0x2243f1,_0x19d5b4){return _0x2243f1===_0x19d5b4;}},_0x913445=await _0x3a5f76[_0x4acacc(0xb0)](resolveProfileTarget,_0x3242af);if(_0x913445[_0x4acacc(0xb8)]===_0x3a5f76['nRZvk']){const _0x588dd0=await loadEffectiveCloudSettings(_0x3242af),_0x5daff4=_0x3a5f76[_0x4acacc(0xc4)](getNestedValue,_0x588dd0,_0x1c76e1);if(_0x5daff4===undefined)console['log']('(not\x20set)');else typeof _0x5daff4==='object'?console[_0x4acacc(0xc8)](JSON['stringify'](_0x5daff4,null,0x2)):console[_0x4acacc(0xc8)](_0x5daff4);return;}const _0x381b97=await loadSettings(_0x3242af),_0x2580e8=_0x3a5f76[_0x4acacc(0xc4)](getNestedValue,_0x381b97,_0x1c76e1);if(_0x3a5f76['pgCmJ'](_0x2580e8,undefined))console['log']('(not\x20set)');else _0x3a5f76['pgCmJ'](typeof _0x2580e8,'object')?console[_0x4acacc(0xc8)](JSON[_0x4acacc(0xae)](_0x2580e8,null,0x2)):console[_0x4acacc(0xc8)](_0x2580e8);}export async function configList(_0x5a0569){const _0x9b292b=_0x4950a5,_0x53487f={'QrSjc':function(_0x152b7a,_0x356d3b){return _0x152b7a===_0x356d3b;},'SJIaR':function(_0x1f2591,_0x11da4f){return _0x1f2591(_0x11da4f);}},_0x129ba1=await resolveProfileTarget(_0x5a0569);if(_0x53487f['QrSjc'](_0x129ba1[_0x9b292b(0xb8)],_0x9b292b(0xc2))){const _0x2986f2=await _0x53487f[_0x9b292b(0xbc)](loadEffectiveCloudSettings,_0x5a0569);if(!_0x2986f2||_0x53487f['QrSjc'](Object['keys'](_0x2986f2)['length'],0x0)){console[_0x9b292b(0xc8)]('No\x20configuration\x20set\x20for\x20\x22'+_0x5a0569+'\x22');return;}console[_0x9b292b(0xc8)](JSON[_0x9b292b(0xae)](_0x2986f2,null,0x2));return;}const _0x1c4024=getSettingsPath(_0x5a0569);if(!existsSync(_0x1c4024)){console[_0x9b292b(0xc8)]('No\x20configuration\x20set\x20for\x20\x22'+_0x5a0569+'\x22');return;}const _0x27ad1e=await _0x53487f[_0x9b292b(0xbc)](loadSettings,_0x5a0569),_0x30da42=_0x53487f['SJIaR'](formatSettings,_0x27ad1e);!_0x30da42?console['log']('No\x20configuration\x20set\x20for\x20\x22'+_0x5a0569+'\x22'):console[_0x9b292b(0xc8)](_0x30da42);}export async function configUnset(_0x27bdbb,_0x31f491){const _0x49cb7a=_0x4950a5,_0x2cde2={'teHkO':_0x49cb7a(0xc2),'IOARa':function(_0x584219,_0x38a578,_0xfd5241,_0x11fda8){return _0x584219(_0x38a578,_0xfd5241,_0x11fda8);},'zZONF':function(_0x468a23){return _0x468a23();},'DmmbO':function(_0x3ead8d){return _0x3ead8d();}},_0x79dd01=await resolveProfileTarget(_0x27bdbb);if(_0x79dd01[_0x49cb7a(0xb8)]===_0x2cde2['teHkO']){if(_0x79dd01[_0x49cb7a(0xcd)])printDualExistsHint(_0x27bdbb);const _0x934a41=_0x2cde2['IOARa'](unsetProfileOverride,_0x2cde2[_0x49cb7a(0xb9)](getProjectPath),_0x27bdbb,_0x31f491);_0x934a41?console['log']('Removed\x20'+_0x31f491+_0x49cb7a(0xbd)+_0x27bdbb+'\x22'):console[_0x49cb7a(0xc8)]('Key\x20\x22'+_0x31f491+_0x49cb7a(0xcf));return;}const _0x44c378=_0x2cde2[_0x49cb7a(0xa5)](unsetProfileOverride,_0x2cde2[_0x49cb7a(0xac)](getProjectPath),_0x27bdbb,_0x31f491);if(_0x44c378){console['log'](_0x49cb7a(0xa3)+_0x31f491);return;}const _0x5f3c36=await loadSettings(_0x27bdbb),_0x1fd7e5=deleteNestedValue(_0x5f3c36,_0x31f491);_0x1fd7e5?console[_0x49cb7a(0xc8)]('Key\x20\x22'+_0x31f491+_0x49cb7a(0xbb)+_0x27bdbb+_0x49cb7a(0xa2)):console['log'](_0x49cb7a(0xb1)+_0x31f491+'\x22\x20not\x20found');}export async function configReset(_0x57c6cd){const _0xbec91c=_0x4950a5,_0x5869a6={'YoVMK':function(_0x3c91b4,_0x1685f2){return _0x3c91b4===_0x1685f2;},'UdgNq':'cloud','xDXoG':function(_0x2369f1,_0x1bc476,_0x13b555){return _0x2369f1(_0x1bc476,_0x13b555);},'PrGrp':function(_0x1f552a){return _0x1f552a();}},_0xfe3b24=await resolveProfileTarget(_0x57c6cd);if(_0x5869a6['YoVMK'](_0xfe3b24[_0xbec91c(0xb8)],_0x5869a6[_0xbec91c(0xc9)])){_0x5869a6['xDXoG'](resetProfileOverrides,_0x5869a6[_0xbec91c(0xaf)](getProjectPath),_0x57c6cd),console['log']('Cleared\x20local\x20overrides\x20for\x20\x22'+_0x57c6cd+'\x22');return;}console['log']('\x22'+_0x57c6cd+_0xbec91c(0xc3)+_0x57c6cd+'\x20<key>\x22\x20to\x20remove\x20individual\x20values.');}
@@ -1 +1 @@
1
- function _0x54e0(){const _0x283e2f=['\x0aNo\x20profiles\x20found.','push','environmentDetails','dsurG','828YmaEAO','sort','includes','1250908EyVBcj','2907884PKUOqn','1036917BBkLXD','442SmcZBr','1384645IftQYH','gcjjz','tvSaL','679653DBrQGy','LQOfc','endsWith','legacy','1992528SiyDSD','log','UdEzO','isDirectory','sKODS','local','\x20\x20\x20\x20\x20\x20Details:\x20','startsWith','136kWpxgW','lqaOb'];_0x54e0=function(){return _0x283e2f;};return _0x54e0();}(function(_0x73ad11,_0x568c3b){const _0x57968c=_0x36ee,_0x519cbe=_0x73ad11();while(!![]){try{const _0x19d73b=-parseInt(_0x57968c(0x118))/0x1*(parseInt(_0x57968c(0x102))/0x2)+parseInt(_0x57968c(0x101))/0x3+parseInt(_0x57968c(0xff))/0x4+parseInt(_0x57968c(0x103))/0x5+parseInt(_0x57968c(0x10a))/0x6+parseInt(_0x57968c(0x100))/0x7+-parseInt(_0x57968c(0x112))/0x8*(parseInt(_0x57968c(0x106))/0x9);if(_0x19d73b===_0x568c3b)break;else _0x519cbe['push'](_0x519cbe['shift']());}catch(_0x334c2a){_0x519cbe['push'](_0x519cbe['shift']());}}}(_0x54e0,0x34bd2));import{readdir,stat}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{getRangerDir}from'./utils/rangerRoot.js';function _0x36ee(_0x338b7d,_0xb51fee){_0x338b7d=_0x338b7d-0xfe;const _0x54e01f=_0x54e0();let _0x36ee43=_0x54e01f[_0x338b7d];return _0x36ee43;}import{loadSettings}from'./utils/settings.js';import{readActiveProfileName}from'./utils/activeProfile.js';const NON_ENV_DIRS=['sessions','bug-bashes','reports','local','ci'];export async function getEnvNames(){const _0x3cc883=_0x36ee,_0x140e96={'UdEzO':function(_0x365ceb,_0x57b81c){return _0x365ceb(_0x57b81c);},'sKODS':function(_0x472c31,_0x132a59,_0x1b9d14){return _0x472c31(_0x132a59,_0x1b9d14);},'LQOfc':function(_0x303330,_0x40d6dc,_0x433d01){return _0x303330(_0x40d6dc,_0x433d01);},'RcdPE':function(_0x40affa,_0x143559){return _0x40affa(_0x143559);},'tvSaL':function(_0xa6545e,_0x31d9e3){return _0xa6545e(_0x31d9e3);},'neSNy':'.txt','dsurG':_0x3cc883(0x109)},_0x5c7912=getRangerDir();if(!existsSync(_0x5c7912))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x335a55=await readActiveProfileName(),_0x33132c=[],_0x6dc533={},_0x2c4f96=join(_0x5c7912,_0x3cc883(0x10f));if(_0x140e96[_0x3cc883(0x10c)](existsSync,_0x2c4f96)){const _0x1705fb=await _0x140e96[_0x3cc883(0x10c)](readdir,_0x2c4f96);for(const _0x4a467c of _0x1705fb){const _0xe63c00=_0x140e96[_0x3cc883(0x10e)](join,_0x2c4f96,_0x4a467c),_0x582449=await _0x140e96['UdEzO'](stat,_0xe63c00);_0x582449[_0x3cc883(0x10d)]()&&(_0x33132c[_0x3cc883(0x115)](_0x4a467c),_0x6dc533[_0x4a467c]=_0x3cc883(0x10f));}}const _0x111882=_0x140e96[_0x3cc883(0x10e)](join,_0x5c7912,'ci');if(existsSync(_0x111882)){const _0x12aa30=await readdir(_0x111882);for(const _0x45372b of _0x12aa30){const _0x30b7cf=_0x140e96[_0x3cc883(0x107)](join,_0x111882,_0x45372b),_0x388912=await _0x140e96['RcdPE'](stat,_0x30b7cf);_0x388912[_0x3cc883(0x10d)]()&&(_0x33132c['push'](_0x45372b),_0x6dc533[_0x45372b]='ci');}}const _0x2ea542=await _0x140e96[_0x3cc883(0x105)](readdir,_0x5c7912);for(const _0xe7f11e of _0x2ea542){if(NON_ENV_DIRS['includes'](_0xe7f11e))continue;if(_0xe7f11e[_0x3cc883(0x111)]('.'))continue;if(_0xe7f11e[_0x3cc883(0x108)](_0x140e96['neSNy']))continue;const _0x52c424=_0x140e96[_0x3cc883(0x107)](join,_0x5c7912,_0xe7f11e),_0x206981=await stat(_0x52c424);_0x206981[_0x3cc883(0x10d)]()&&existsSync(join(_0x52c424,'settings.json'))&&(!_0x33132c[_0x3cc883(0xfe)](_0xe7f11e)&&(_0x33132c[_0x3cc883(0x115)](_0xe7f11e),_0x6dc533[_0xe7f11e]=_0x140e96[_0x3cc883(0x117)]));}return{'envNames':_0x33132c,'activeEnv':_0x335a55,'envTypes':_0x6dc533};}export async function envList(){const _0x5adc93=_0x36ee,_0x52febe={'gnMkE':function(_0x5ee696,_0x362552){return _0x5ee696===_0x362552;},'Ooeul':'Run:\x20ranger\x20profile\x20add\x20<profile-name>','VMoWP':function(_0x55628e,_0x59757d){return _0x55628e===_0x59757d;},'gcjjz':_0x5adc93(0x10f),'lqaOb':function(_0x19886a,_0x174e74){return _0x19886a(_0x174e74);}},{envNames:_0x5a0874,activeEnv:_0x51fc8d,envTypes:_0x1f50fa}=await getEnvNames();if(_0x52febe['gnMkE'](_0x5a0874['length'],0x0)){console[_0x5adc93(0x10b)](_0x5adc93(0x114)),console[_0x5adc93(0x10b)](_0x52febe['Ooeul']);return;}console['log']('\x0aProfiles:');for(const _0x8c0428 of _0x5a0874[_0x5adc93(0x119)]()){const _0x589c7c=_0x52febe['VMoWP'](_0x8c0428,_0x51fc8d),_0x3eae2a=_0x1f50fa[_0x8c0428]||_0x52febe[_0x5adc93(0x104)],_0x173078=await _0x52febe[_0x5adc93(0x113)](loadSettings,_0x8c0428),_0x479ad7=_0x3eae2a===_0x5adc93(0x109)?'':'\x20['+_0x3eae2a+']';console['log']('\x20\x20'+(_0x589c7c?'*\x20':'\x20\x20')+_0x8c0428+_0x479ad7),_0x173078['baseUrl']&&console[_0x5adc93(0x10b)]('\x20\x20\x20\x20\x20\x20URL:\x20'+_0x173078['baseUrl']),_0x173078['environmentDetails']&&console[_0x5adc93(0x10b)](_0x5adc93(0x110)+_0x173078[_0x5adc93(0x116)]);}_0x51fc8d&&console[_0x5adc93(0x10b)]('\x0a*\x20=\x20active\x20profile');}
1
+ const _0x142e03=_0x17b0;(function(_0x5e4373,_0x4c2758){const _0x3ad60e=_0x17b0,_0x205b0b=_0x5e4373();while(!![]){try{const _0x1c9a32=-parseInt(_0x3ad60e(0x1b1))/0x1*(parseInt(_0x3ad60e(0x1aa))/0x2)+parseInt(_0x3ad60e(0x1b9))/0x3+-parseInt(_0x3ad60e(0x1be))/0x4*(parseInt(_0x3ad60e(0x1ca))/0x5)+parseInt(_0x3ad60e(0x1bd))/0x6+parseInt(_0x3ad60e(0x1bc))/0x7+-parseInt(_0x3ad60e(0x1c3))/0x8*(parseInt(_0x3ad60e(0x1ba))/0x9)+parseInt(_0x3ad60e(0x1a9))/0xa*(parseInt(_0x3ad60e(0x1c9))/0xb);if(_0x1c9a32===_0x4c2758)break;else _0x205b0b['push'](_0x205b0b['shift']());}catch(_0x3c0c92){_0x205b0b['push'](_0x205b0b['shift']());}}}(_0x43ac,0x43189));import{readdir,stat}from'fs/promises';function _0x43ac(){const _0xeb0bae=['\x0aLocal\x20Profiles\x20(legacy):','bug-bashes','zVhrB','ojkvi','startsWith','843110XkrTBc','40gJJuas','RyOie','legacy','XptCD','has','Run:\x20ranger\x20profile\x20add\x20<profile-name>','xdthk','7734pjqOEm','endsWith','length','push','local','environmentDetails','name','\x0aNo\x20profiles\x20found.','1134870NGuuOI','9ViZwLR','includes','1359281eNqneh','1447800BWmkai','4rmuSEd','sessionUpdatedAt','sort','BUcJe','\x20\x20\x20\x20\x20\x20Session:\x20','4068408ZYEMnz','oithb','ZTgfX','\x0a*\x20=\x20active\x20profile','log','isDirectory','66lNhaxJ','1907915osSVyZ'];_0x43ac=function(){return _0xeb0bae;};return _0x43ac();}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',_0x142e03(0x1cc),'reports',_0x142e03(0x1b5),'ci'];function _0x17b0(_0x282f5c,_0x36140c){_0x282f5c=_0x282f5c-0x1a9;const _0x43acbc=_0x43ac();let _0x17b02c=_0x43acbc[_0x282f5c];return _0x17b02c;}export async function getEnvNames(){const _0x51a0bd=_0x142e03,_0xc735e2={'zdREu':function(_0x4d3492){return _0x4d3492();},'gcFZg':function(_0x1ee927,_0x18a92f){return _0x1ee927(_0x18a92f);},'ZTgfX':'local','RyOie':function(_0x39cdc8,_0x5ca135){return _0x39cdc8(_0x5ca135);},'aDjtn':function(_0x1f74eb,_0x182bee){return _0x1f74eb(_0x182bee);},'ojkvi':function(_0x2afa99,_0x2e99c5,_0x42a46a){return _0x2afa99(_0x2e99c5,_0x42a46a);},'oithb':function(_0x231a0a,_0x7449f8){return _0x231a0a(_0x7449f8);},'BUcJe':function(_0x5e09a5,_0x508192,_0x3323d6){return _0x5e09a5(_0x508192,_0x3323d6);},'XptCD':'legacy'},_0x228dcb=_0xc735e2['zdREu'](getRangerDir);if(!_0xc735e2['gcFZg'](existsSync,_0x228dcb))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x2dadca=await readActiveProfileName(),_0x503681=[],_0x48499a={},_0x2f227c=join(_0x228dcb,_0xc735e2[_0x51a0bd(0x1c5)]);if(existsSync(_0x2f227c)){const _0x53522c=await readdir(_0x2f227c);for(const _0x481eac of _0x53522c){const _0x2680f3=join(_0x2f227c,_0x481eac),_0x305e84=await _0xc735e2[_0x51a0bd(0x1ab)](stat,_0x2680f3);_0x305e84['isDirectory']()&&(_0x503681['push'](_0x481eac),_0x48499a[_0x481eac]=_0x51a0bd(0x1b5));}}const _0x4e7b0f=join(_0x228dcb,'ci');if(existsSync(_0x4e7b0f)){const _0x52c51d=await readdir(_0x4e7b0f);for(const _0x274d4f of _0x52c51d){const _0x5c560e=join(_0x4e7b0f,_0x274d4f),_0x4f5927=await _0xc735e2['aDjtn'](stat,_0x5c560e);_0x4f5927[_0x51a0bd(0x1c8)]()&&(_0x503681[_0x51a0bd(0x1b4)](_0x274d4f),_0x48499a[_0x274d4f]='ci');}}const _0xac67e9=await readdir(_0x228dcb);for(const _0x236efb of _0xac67e9){if(NON_ENV_DIRS[_0x51a0bd(0x1bb)](_0x236efb))continue;if(_0x236efb[_0x51a0bd(0x1cf)]('.'))continue;if(_0x236efb[_0x51a0bd(0x1b2)]('.txt'))continue;const _0x5e5e79=_0xc735e2[_0x51a0bd(0x1ce)](join,_0x228dcb,_0x236efb),_0x3fa4d3=await _0xc735e2[_0x51a0bd(0x1c4)](stat,_0x5e5e79);_0x3fa4d3[_0x51a0bd(0x1c8)]()&&_0xc735e2['oithb'](existsSync,_0xc735e2[_0x51a0bd(0x1c1)](join,_0x5e5e79,'settings.json'))&&(!_0x503681['includes'](_0x236efb)&&(_0x503681['push'](_0x236efb),_0x48499a[_0x236efb]=_0xc735e2[_0x51a0bd(0x1ad)]));}return{'envNames':_0x503681,'activeEnv':_0x2dadca,'envTypes':_0x48499a};}export async function envList(){const _0x1b215c=_0x142e03,_0x52b042={'yOcJc':function(_0x3fb2d5){return _0x3fb2d5();},'DEhHG':_0x1b215c(0x1b8),'Jpavt':_0x1b215c(0x1af),'zVhrB':_0x1b215c(0x1cb),'ytOTC':'\x0aCloud\x20Profiles:','xdthk':'no\x20session'},{envNames:_0x34398e,activeEnv:_0x26acf0,envTypes:_0x416cd4}=await _0x52b042['yOcJc'](getEnvNames);let _0xed1fd1=[];try{_0xed1fd1=await listCloudProfiles();}catch{}if(_0x34398e['length']===0x0&&_0xed1fd1[_0x1b215c(0x1b3)]===0x0){console['log'](_0x52b042['DEhHG']),console[_0x1b215c(0x1c7)](_0x52b042['Jpavt']);return;}const _0x3c8a0e=new Set(_0xed1fd1['map'](_0x27cf9b=>_0x27cf9b[_0x1b215c(0x1b7)]));if(_0x34398e[_0x1b215c(0x1b3)]>0x0){console[_0x1b215c(0x1c7)](_0x52b042[_0x1b215c(0x1cd)]);for(const _0x168634 of _0x34398e[_0x1b215c(0x1c0)]()){const _0x405575=_0x168634===_0x26acf0&&!_0x3c8a0e[_0x1b215c(0x1ae)](_0x168634),_0xad814a=_0x416cd4[_0x168634]||_0x1b215c(0x1b5),_0x52cfb5=await loadSettings(_0x168634),_0x5a4cc1=_0xad814a===_0x1b215c(0x1ac)?'':'\x20['+_0xad814a+']';console[_0x1b215c(0x1c7)]('\x20\x20'+(_0x405575?'*\x20':'\x20\x20')+_0x168634+_0x5a4cc1),_0x52cfb5['baseUrl']&&console[_0x1b215c(0x1c7)]('\x20\x20\x20\x20\x20\x20URL:\x20'+_0x52cfb5['baseUrl']),_0x52cfb5[_0x1b215c(0x1b6)]&&console['log']('\x20\x20\x20\x20\x20\x20Details:\x20'+_0x52cfb5['environmentDetails']);}}if(_0xed1fd1[_0x1b215c(0x1b3)]>0x0){console['log'](_0x52b042['ytOTC']);for(const _0x56dda6 of _0xed1fd1['sort']((_0x24a99c,_0xc2a4ef)=>_0x24a99c[_0x1b215c(0x1b7)]['localeCompare'](_0xc2a4ef['name']))){const _0x47fda6=_0x56dda6['name']===_0x26acf0,_0x47d7cd=_0x56dda6['environmentKey']?'\x20('+_0x56dda6['environmentKey']+')':'',_0x4acdf9=_0x56dda6[_0x1b215c(0x1bf)]?'cached\x20(updated\x20'+_0x56dda6[_0x1b215c(0x1bf)]+')':_0x52b042[_0x1b215c(0x1b0)];console['log']('\x20\x20'+(_0x47fda6?'*\x20':'\x20\x20')+_0x56dda6[_0x1b215c(0x1b7)]+'\x20[cloud]'+_0x47d7cd),console[_0x1b215c(0x1c7)](_0x1b215c(0x1c2)+_0x4acdf9);}}_0x26acf0&&console[_0x1b215c(0x1c7)](_0x1b215c(0x1c6));}
@@ -1 +1 @@
1
- const _0x2869d5=_0x55af;(function(_0x3fbd5f,_0x1a2413){const _0x432a1e=_0x55af,_0x71d089=_0x3fbd5f();while(!![]){try{const _0x4c18c2=-parseInt(_0x432a1e(0x18a))/0x1*(parseInt(_0x432a1e(0x19c))/0x2)+-parseInt(_0x432a1e(0x18e))/0x3*(parseInt(_0x432a1e(0x116))/0x4)+-parseInt(_0x432a1e(0x10b))/0x5*(parseInt(_0x432a1e(0x10d))/0x6)+parseInt(_0x432a1e(0x11b))/0x7+-parseInt(_0x432a1e(0x143))/0x8*(-parseInt(_0x432a1e(0x1cb))/0x9)+-parseInt(_0x432a1e(0x159))/0xa*(parseInt(_0x432a1e(0x148))/0xb)+parseInt(_0x432a1e(0x16b))/0xc;if(_0x4c18c2===_0x1a2413)break;else _0x71d089['push'](_0x71d089['shift']());}catch(_0x3a9c45){_0x71d089['push'](_0x71d089['shift']());}}}(_0x3e43,0xd57b9));import{readFile,writeFile,mkdir}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{execSync}from'child_process';import _0x5d8f24 from'inquirer';import{createFeature,listFeatures,getFeature,updateFeature,getFeatureReport,getFeatureReportMarkdown,listFeatureSessions,startSession,concludeSession,createChecklistItem,getActionItems,getItemFeedback,softDeleteFeature,restoreFeature,updateChecklistItem}from'./utils/featureApi.js';import{getBrowserSessionSteps}from'./utils/browserSessionsApi.js';import{getApiBaseUrl}from'./utils/environment.js';import{getRangerDir}from'./utils/rangerRoot.js';import{registerSession}from'./utils/sessionCache.js';import{getEnvNames}from'./env.js';import{formatProfileRequiredMessage}from'./utils/profileMessages.js';const ACTIVE_FEATURE_FILE='active-feature.txt',bold=_0x41ed8e=>_0x2869d5(0x1c1)+_0x41ed8e+_0x2869d5(0x187);function getGitRepoUrl(){const _0x4df65e=_0x2869d5,_0x3e29da={'HFksl':'pipe'};try{const _0xac7d03=execSync(_0x4df65e(0x12e),{'encoding':'utf-8','stdio':[_0x3e29da['HFksl'],'pipe',_0x3e29da[_0x4df65e(0xfd)]]})[_0x4df65e(0x138)]();return _0xac7d03[_0x4df65e(0x166)](/\.git$/,'')['replace'](/^git@github\.com:/,'github.com/')['replace'](/^https?:\/\//,'');}catch{return undefined;}}function getGitBranch(){const _0x12b4ba=_0x2869d5,_0x2e9479={'wTHTg':'utf-8','JbkrB':_0x12b4ba(0x1a0)};try{return execSync(_0x12b4ba(0x140),{'encoding':_0x2e9479['wTHTg'],'stdio':[_0x2e9479[_0x12b4ba(0x17b)],_0x2e9479['JbkrB'],_0x12b4ba(0x1a0)]})[_0x12b4ba(0x138)]();}catch{return undefined;}}export async function getActiveFeatureId(){const _0x223af6=_0x2869d5,_0x1c70b7={'CjRou':function(_0x10a0d8,_0x22ddbd,_0x10eec8){return _0x10a0d8(_0x22ddbd,_0x10eec8);},'JWmRo':function(_0x2f8278,_0x5ce917){return _0x2f8278(_0x5ce917);}},_0xaaed0a=_0x1c70b7[_0x223af6(0x118)](join,getRangerDir(),ACTIVE_FEATURE_FILE);if(!_0x1c70b7['JWmRo'](existsSync,_0xaaed0a))return null;try{const _0x1a7888=await readFile(_0xaaed0a,'utf-8');return _0x1a7888['trim']()||null;}catch{return null;}}async function setActiveFeatureId(_0x251168){const _0x5a1302={'JVqRx':function(_0x1dbb86){return _0x1dbb86();},'eMfka':function(_0x398591,_0x203bcb){return _0x398591(_0x203bcb);}},_0x37312f=_0x5a1302['JVqRx'](getRangerDir),_0x2b87a8=join(_0x37312f,ACTIVE_FEATURE_FILE);!_0x5a1302['eMfka'](existsSync,_0x37312f)&&await mkdir(_0x37312f,{'recursive':!![]}),await writeFile(_0x2b87a8,_0x251168,'utf-8');}function getProgressDisplay(_0x4de442){const _0x21b62e=_0x2869d5,_0x1e589e={'GVdDq':function(_0x27fb94,_0x1328f9){return _0x27fb94===_0x1328f9;},'wNYOR':function(_0x2058bc,_0x2ee45c){return _0x2058bc*_0x2ee45c;},'Ngajw':function(_0x359a2c,_0x2e5af7){return _0x359a2c-_0x2e5af7;},'hLqxM':function(_0x2e6010,_0x1b651d){return _0x2e6010>_0x1b651d;}},_0x2366e0=_0x4de442['verifiedItems']||0x0,_0x279b25=_0x4de442['verificationInProgressItems']||0x0,_0x14e33d=_0x4de442['blockedItems']||0x0,_0x168903=_0x4de442['incompleteItems']||0x0,_0x2ae696=_0x4de442[_0x21b62e(0x182)]||0x0,_0x593b34=_0x2366e0+_0x279b25+_0x14e33d+_0x168903+_0x2ae696;if(_0x1e589e['GVdDq'](_0x593b34,0x0))return'-';const _0x23bdf9=0xa,_0x250975=Math[_0x21b62e(0x1c5)](_0x1e589e['wNYOR'](_0x2366e0/_0x593b34,_0x23bdf9)),_0x5d4931='█'[_0x21b62e(0x1ae)](_0x250975)+'░'[_0x21b62e(0x1ae)](_0x1e589e[_0x21b62e(0x15c)](_0x23bdf9,_0x250975)),_0xf0fdd2=[];if(_0x1e589e[_0x21b62e(0x129)](_0x14e33d,0x0))_0xf0fdd2[_0x21b62e(0x1b9)](_0x14e33d+'\x20blocked');if(_0x168903>0x0)_0xf0fdd2['push'](_0x168903+_0x21b62e(0x15b));if(_0x279b25>0x0)_0xf0fdd2[_0x21b62e(0x1b9)](_0x279b25+_0x21b62e(0x109));const _0xba038b=_0xf0fdd2[_0x21b62e(0x131)]>0x0?'\x20('+_0xf0fdd2[_0x21b62e(0x1a3)](',\x20')+')':'';return _0x5d4931+'\x20'+_0x2366e0+'/'+_0x593b34+_0x21b62e(0x105)+_0xba038b;}function _0x55af(_0x42b2c2,_0x503947){_0x42b2c2=_0x42b2c2-0xf9;const _0x3e435f=_0x3e43();let _0x55afe4=_0x3e435f[_0x42b2c2];return _0x55afe4;}function getCurrentSessionItems(_0x233504,_0x27a58c){const _0x3abf88=_0x2869d5;if(!_0x233504['currentSessionId'])return _0x27a58c[_0x3abf88(0x13b)](_0x3b859f=>!_0x3b859f['sessionId']);return _0x27a58c[_0x3abf88(0x13b)](_0x5c6dde=>_0x5c6dde[_0x3abf88(0x19f)]===_0x233504[_0x3abf88(0x181)]||!_0x5c6dde[_0x3abf88(0x19f)]);}function displayFeature(_0x9f1a01,_0x4db77a){const _0x562d44=_0x2869d5,_0x311e95={'VMRQY':function(_0x3d13c1,_0x4319b6){return _0x3d13c1>_0x4319b6;},'qwaJH':_0x562d44(0x119),'VtKlu':'approved','yChqE':function(_0x488fbd,_0x2c6e14){return _0x488fbd===_0x2c6e14;},'lzZBn':_0x562d44(0x192),'rXfaG':'closed','iqDxg':function(_0x2b036a,_0x45e22c){return _0x2b036a===_0x45e22c;},'RVMzV':function(_0x35a40a,_0x1988c3){return _0x35a40a>_0x1988c3;},'zIMWO':function(_0x20c184,_0x39a512){return _0x20c184!==_0x39a512;},'IhnYP':_0x562d44(0x111),'plheQ':function(_0x25c281,_0x20371b){return _0x25c281+_0x20371b;},'zFNVx':'blocked','CTkcW':function(_0x64a478,_0x540398){return _0x64a478===_0x540398;}};console['log']('\x0a'+_0x9f1a01['name']+'\x20('+_0x9f1a01[_0x562d44(0x126)]+')');_0x9f1a01[_0x562d44(0x178)]&&console[_0x562d44(0x17a)]('\x20\x20\x20Progress:\x20'+getProgressDisplay(_0x9f1a01[_0x562d44(0x178)]));_0x9f1a01[_0x562d44(0x191)]&&console[_0x562d44(0x17a)]('\x20\x20\x20Description:\x20'+_0x9f1a01['description']);_0x9f1a01['gitRepoUrl']&&console['log'](_0x562d44(0x1ac)+_0x9f1a01['gitRepoUrl']);_0x9f1a01['gitBranch']&&console[_0x562d44(0x17a)](_0x562d44(0x1a1)+_0x9f1a01['gitBranch']);console['log']('\x20\x20\x20Created:\x20'+new Date(_0x9f1a01[_0x562d44(0x196)])[_0x562d44(0x11d)]());_0x9f1a01[_0x562d44(0x1a2)]&&console['log']('\x20\x20\x20Completed:\x20'+new Date(_0x9f1a01['completedAt'])[_0x562d44(0x11d)]());if(_0x4db77a&&_0x311e95[_0x562d44(0x12d)](_0x4db77a['length'],0x0)){console['log'](_0x311e95['qwaJH']);for(let _0x4c256e=0x0;_0x4c256e<_0x4db77a['length'];_0x4c256e++){const _0x18e966=_0x4db77a[_0x4c256e];let _0x57bb34;if(_0x18e966[_0x562d44(0x176)]===_0x562d44(0x189)&&_0x18e966[_0x562d44(0x163)]===_0x311e95['VtKlu'])_0x57bb34='✅';else{if(_0x311e95['yChqE'](_0x18e966['status'],'verified'))_0x57bb34='🟢';else{if(_0x18e966['status']===_0x311e95[_0x562d44(0x139)])_0x57bb34='🟠';else{if(_0x18e966[_0x562d44(0x176)]==='blocked')_0x57bb34='🛑';else{if(_0x18e966[_0x562d44(0x176)]===_0x311e95[_0x562d44(0x125)])_0x57bb34='⛔';else _0x311e95[_0x562d44(0x12f)](_0x18e966[_0x562d44(0x176)],'verification_in_progress')?_0x57bb34='⏳':_0x57bb34='⬜';}}}}const _0x25c628=_0x311e95['RVMzV'](_0x18e966[_0x562d44(0x1ce)],0x1)?_0x562d44(0x1c3)+_0x18e966['version']+')':'',_0x29dd96=_0x311e95[_0x562d44(0x12d)](_0x18e966['version'],0x1)&&_0x18e966[_0x562d44(0x132)]&&_0x311e95[_0x562d44(0x10e)](_0x18e966['status'],_0x311e95['rXfaG'])&&_0x311e95[_0x562d44(0x10e)](_0x18e966['status'],_0x311e95['IhnYP'])?_0x562d44(0x198):'';console[_0x562d44(0x17a)](_0x562d44(0x19b)+_0x311e95[_0x562d44(0x110)](_0x4c256e,0x1)+'.\x20'+_0x57bb34+'\x20'+_0x18e966[_0x562d44(0x191)]+_0x25c628+_0x29dd96);_0x18e966[_0x562d44(0x176)]===_0x311e95['zFNVx']&&_0x18e966[_0x562d44(0x193)]&&console['log']('\x20\x20\x20\x20\x20\x20Blocked:\x20'+_0x18e966['blockedReason']);_0x18e966[_0x562d44(0x176)]==='incomplete'&&_0x18e966[_0x562d44(0x1b8)]&&console[_0x562d44(0x17a)]('\x20\x20\x20\x20\x20\x20Incomplete:\x20'+_0x18e966[_0x562d44(0x1b8)]);if(_0x18e966['status']==='closed'&&_0x311e95['CTkcW'](_0x18e966['terminalReason'],_0x311e95['VtKlu']))console[_0x562d44(0x17a)](_0x562d44(0x101));else _0x18e966['status']==='closed'&&_0x18e966[_0x562d44(0x173)]&&console[_0x562d44(0x17a)](_0x562d44(0x1b4)+_0x18e966[_0x562d44(0x173)]);}}}export async function featureCreate(_0x5e9ffb,_0x28ffa1){const _0x18f247=_0x2869d5,_0x2a2162={'YEqaT':function(_0x147275,_0x4fdb54){return _0x147275===_0x4fdb54;},'jwAjI':function(_0x166875){return _0x166875();},'LcOFS':function(_0x1d8826,_0x238f9c){return _0x1d8826(_0x238f9c);},'yhjAL':function(_0x42682a,_0x4ffc34){return _0x42682a(_0x4ffc34);},'SQZsr':function(_0x32978e,_0x4fbd85,_0xd77b8a){return _0x32978e(_0x4fbd85,_0xd77b8a);}},{envNames:_0x10e16c}=await getEnvNames();_0x2a2162['YEqaT'](_0x10e16c['length'],0x0)&&console[_0x18f247(0x14a)]('\x0a'+formatProfileRequiredMessage(_0x1b53eb=>bold(_0x1b53eb)));const _0x34ea4d=_0x28ffa1['scenarios']?_0x28ffa1['scenarios']['map'](_0x21640d=>_0x21640d[_0x18f247(0x138)]()):[],_0x2ef83f=_0x2a2162[_0x18f247(0xfe)](getGitRepoUrl),_0x3f0140=getGitBranch();console[_0x18f247(0x17a)]('\x0aCreating\x20feature\x20review...');const _0x319481=await createFeature({'name':_0x5e9ffb,'description':_0x28ffa1[_0x18f247(0x191)],'checklist':_0x34ea4d,'gitRepoUrl':_0x2ef83f,'gitBranch':_0x3f0140});await _0x2a2162[_0x18f247(0x10a)](setActiveFeatureId,_0x319481['id']),await _0x2a2162['yhjAL'](tryStartCurrentSession,_0x319481['id']);const _0x126264=process['env']['CLAUDE_SESSION_ID'];_0x126264&&_0x2a2162[_0x18f247(0x16d)](registerSession,_0x126264,_0x319481['id']),console['log']('\x0a✅\x20Feature\x20review\x20created:\x20'+_0x319481['id']),displayFeature(_0x319481,_0x319481[_0x18f247(0x17f)]),console[_0x18f247(0x17a)](_0x18f247(0x18d));}export async function featureList(_0x364034){const _0x1cd867=_0x2869d5,_0x173b9a={'AJrph':function(_0xb7b8d1){return _0xb7b8d1();},'UeuoN':function(_0x1121c7,_0x66f297){return _0x1121c7(_0x66f297);},'scRaY':function(_0x40343f,_0x171025){return _0x40343f(_0x171025);},'mMLkw':function(_0x1b5a2f,_0xaff0f5){return _0x1b5a2f+_0xaff0f5;},'mCewH':_0x1cd867(0x188),'KMHSd':'\x20--include-deleted'},_0x281aaf={'limit':_0x364034['limit']??0xa,'offset':_0x364034['offset']??0x0,'includeDeleted':_0x364034['includeDeleted']};_0x364034[_0x1cd867(0x1bb)]&&(_0x281aaf[_0x1cd867(0x12b)]=_0x173b9a['AJrph'](getGitRepoUrl),_0x281aaf[_0x1cd867(0x199)]=getGitBranch());const _0x461a9e=await _0x173b9a['UeuoN'](listFeatures,_0x281aaf);if(_0x461a9e[_0x1cd867(0x1c8)][_0x1cd867(0x131)]===0x0){console[_0x1cd867(0x17a)](_0x1cd867(0x1b6));return;}const _0xb10365=_0x461a9e['totalCount']>_0x461a9e['items'][_0x1cd867(0x131)]?'Showing\x20'+_0x461a9e[_0x1cd867(0x1c8)][_0x1cd867(0x131)]+_0x1cd867(0x1b0)+_0x461a9e['totalCount']:_0x461a9e[_0x1cd867(0x122)]+'\x20feature\x20review(s)\x20found';console[_0x1cd867(0x17a)]('\x0a'+_0xb10365+':\x0a');for(const _0x12df7d of _0x461a9e['items']){console['log'](''+_0x12df7d['name']),console[_0x1cd867(0x17a)](_0x1cd867(0x1c9)+_0x12df7d['id']),_0x12df7d[_0x1cd867(0x178)]&&console['log']('\x20\x20\x20Progress:\x20'+_0x173b9a[_0x1cd867(0x150)](getProgressDisplay,_0x12df7d[_0x1cd867(0x178)])),_0x12df7d['gitBranch']&&console['log']('\x20\x20\x20Branch:\x20'+_0x12df7d[_0x1cd867(0x199)]),console[_0x1cd867(0x17a)]('\x20\x20\x20Created:\x20'+new Date(_0x12df7d[_0x1cd867(0x196)])['toLocaleDateString']()),console['log']('');}const _0x785ccb=_0x281aaf[_0x1cd867(0x11f)]??0xa,_0x44ac77=_0x173b9a['mMLkw'](_0x281aaf['offset']??0x0,_0x461a9e['items']['length']);if(_0x44ac77<_0x461a9e['totalCount']){const _0x57aec9=_0x785ccb!==0xa?'\x20--limit\x20'+_0x785ccb:'',_0x7dbed4=_0x364034['currentBranch']?_0x173b9a[_0x1cd867(0x19d)]:'',_0x26ec17=_0x364034['includeDeleted']?_0x173b9a['KMHSd']:'';console[_0x1cd867(0x17a)](_0x1cd867(0x155)+_0x44ac77+_0x57aec9+_0x7dbed4+_0x26ec17);}}function _0x3e43(){const _0xd0c246=['\x20\x20\x20To\x20restore\x20it,\x20run:\x20ranger\x20restore\x20','scRaY','\x0a❌\x20No\x20scenarios\x20found\x20to\x20edit.','Run:\x20ranger\x20create\x20\x22<name>\x22\x20to\x20create\x20a\x20new\x20feature\x20review','\x20\x20\x20\x20\x20Progress:\x20','NKznY','Next\x20page:\x20ranger\x20list\x20--offset\x20','Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','json','Please\x20specify\x20the\x20feature\x20review\x20ID:\x20ranger\x20resume\x20<id>','2824560dUTKyz','\x0a❌\x20No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','\x20incomplete','Ngajw','peihP','\x20\x20✅\x20No\x20feedback\x20to\x20address','completed','No\x20scenarios\x20found.','content','\x20—\x20','terminalReason','Screenshot\x20','lQalh','replace','stepName','isTTY','stdout','4|5|0|1|3|2','35759064IujGFF','name','SQZsr','TWLDZ','No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','\x0a📁\x20Sessions\x20for\x20feature\x20review:\x20','\x0aAvailable\x20scenarios:','linkedSession','canceledReason','gBJZE','textContent','status','style','stats','isInteger','log','JbkrB','Rmkvf','numeric','PcxFg','checklistItems','exit','currentSessionId','pendingItems','tEgeD','/api/v1/mcp/browser-sessions/','IVgZD','\x0a✅\x20Restored\x20feature\x20review:\x20','\x1b[0m','\x20--current-branch','closed','4177TKZmGQ','\x20\x20\x20\x20\x20🎯\x20Element:\x20<','assetUrl','\x0a➡️\x20\x20Set\x20as\x20active\x20feature\x20review','11499HsrmiE','FXLNJ','toFixed','description','incomplete','blockedReason','ready','list','createdAt','in_progress','\x20[has\x20reviewer\x20feedback]','gitBranch','lRdGl','\x20\x20\x20','184pNPKxw','mCewH','CLAUDE_SESSION_ID','sessionId','pipe','\x20\x20\x20Branch:\x20','completedAt','join','KaLbF','latestReview','Cannot\x20add\x20scenario:\x20feature\x20review\x20has\x20an\x20active\x20review.\x20Please\x20finish\x20your\x20review\x20first:\x20','\x0a❌\x20All\x20scenarios\x20were\x20excluded.','\x0a❌\x20Invalid\x20scenario\x20number(s):\x20','env','all','DXEHn','\x20\x20\x20Repository:\x20','unaddressedComments','repeat','prompt','\x20of\x20','spatial','coordinates','npxkA','\x20\x20\x20\x20\x20\x20Cancelled:\x20','iteration','\x0aNo\x20feature\x20reviews\x20found.','timing','incompleteReason','push','\x0a✅\x20Session\x20is\x20already\x20completed.','currentBranch','submittedAt','No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','\x20Session\x20','mWkRH','ruOyX','\x1b[1m','\x0a✅\x20Scenario\x20updated','\x20(v','\x20at\x20[','round','MWUXw','\x20\x20\x20\x20\x20📷\x20Screenshot:\x20','items','\x20\x20\x20ID:\x20','split','11652714hXvuOd','Unknown','DCCDo','version','map','TbpQS','screenshotUrls','browserSessionId','\x0a✅\x20Resumed\x20feature\x20review:\x20','ZXwon','\x20concluded.','\x0aNo\x20matching\x20active\x20feature\x20reviews\x20found.','HFksl','jwAjI','\x0a🗑️\x20\x20Deleted\x20feature\x20review:\x20','iAIqc','\x20\x20\x20\x20\x20\x20Approved','cTWqN','\x20>\x20','\x20\x20\x20Updated\x20branch\x20to:\x20','\x20verified','AROtU','isKeyStep','\x20unaddressed\x20comment(s)','\x20in\x20progress','LcOFS','5760yxRLAe','Multiple\x20feature\x20reviews\x20found.\x20Select\x20one:','7794mXGhLf','zIMWO',':\x20\x22','plheQ','verified','assets','frmPU','canonicalFlow','has','1352PQTeUT','IcHpD','CjRou','\x0a\x20\x20\x20Scenarios:','verification_in_progress','4363877xJVuLz','QKMuS','toLocaleString','find','limit','fDULb','\x20\x20\x20\x20\x20📍\x20Annotation:\x20','totalCount','GBodT','screenshot','rXfaG','dashboardUrl','AIChm','agentResponse','hLqxM','HWaKb','gitRepoUrl','JqAGs','VMRQY','git\x20remote\x20get-url\x20origin','iqDxg','selected','length','parentItemId','.\x20Feature\x20review\x20has\x20','.png','error','domRef','HOUJD','trim','lzZBn','snMtb','filter','POuRF','pop','write','feedback-images','git\x20rev-parse\x20--abbrev-ref\x20HEAD','reports','type','8HWGNap','scenario','assetType','\x20\x20\x20\x20\x20Branch:\x20','hOyEA','33mfhgVT','WXQQa','warn','excludeScenarios','\x20scenario(s).','\x20\x20\x20Created:\x20','UProH'];_0x3e43=function(){return _0xd0c246;};return _0x3e43();}export async function featureShow(_0x233ecb){const _0x1b606a=_0x2869d5,_0x3d89d2={'ccLlK':function(_0x33a678){return _0x33a678();},'bBfUC':'No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','iAIqc':function(_0x16c16b,_0x2ac89e,_0xabe666){return _0x16c16b(_0x2ac89e,_0xabe666);}},_0x2434eb=_0x233ecb||await _0x3d89d2['ccLlK'](getActiveFeatureId);if(!_0x2434eb)throw new Error(_0x3d89d2['bBfUC']);const _0x4ac840=await getFeature(_0x2434eb);_0x3d89d2[_0x1b606a(0x100)](displayFeature,_0x4ac840,_0x4ac840[_0x1b606a(0x17f)]);}export async function featureResume(_0x59fda9){const _0x31197c=_0x2869d5,_0x275a88={'DCCDo':function(_0x4fc529,_0x9d9c16){return _0x4fc529(_0x9d9c16);},'FXLNJ':function(_0x199856,_0x390192,_0x38e51a){return _0x199856(_0x390192,_0x38e51a);},'NKznY':function(_0x313c10,_0x5ae81e){return _0x313c10&&_0x5ae81e;},'mWkRH':'any','KOVjo':function(_0x576907,_0x4a1098){return _0x576907===_0x4a1098;},'ruOyX':_0x31197c(0x152),'SFQcc':'\x0aNon-interactive\x20mode\x20detected.\x20Multiple\x20feature\x20reviews\x20found:','MagCK':_0x31197c(0x158),'AilSl':_0x31197c(0x195),'BTzBB':_0x31197c(0x10c),'QKMuS':function(_0x4afb37,_0x133da5){return _0x4afb37(_0x133da5);}};if(_0x59fda9){const _0x35050c=await getFeature(_0x59fda9);await _0x275a88['DCCDo'](setActiveFeatureId,_0x35050c['id']);const _0x4d1cdc=getGitBranch();_0x4d1cdc&&_0x4d1cdc!==_0x35050c['gitBranch']&&(await updateFeature(_0x35050c['id'],{'gitBranch':_0x4d1cdc}),console[_0x31197c(0x17a)](_0x31197c(0x104)+_0x4d1cdc));console['log'](_0x31197c(0xf9)+_0x35050c[_0x31197c(0x16c)]+'\x20('+_0x35050c['id']+')'),await tryStartCurrentSession(_0x35050c['id']);const _0xb1935d=process[_0x31197c(0x1a9)][_0x31197c(0x19e)];_0xb1935d&&registerSession(_0xb1935d,_0x35050c['id']);_0x275a88[_0x31197c(0x18f)](displayFeature,_0x35050c,_0x35050c[_0x31197c(0x17f)]),await printFeedbackNudge(_0x35050c['id']);return;}const _0x5507db=getGitRepoUrl(),_0x51c0fa=getGitBranch();if(_0x275a88[_0x31197c(0x154)](!_0x5507db,!_0x51c0fa))throw new Error('Not\x20in\x20a\x20git\x20repository.');console['log']('\x0aSearching\x20for\x20feature\x20reviews\x20matching:\x20'+(_0x5507db||_0x275a88[_0x31197c(0x1bf)])+'\x20/\x20'+(_0x51c0fa||_0x275a88['mWkRH'])+'...');const _0x1073ef=await listFeatures({'gitRepoUrl':_0x5507db,'gitBranch':_0x51c0fa}),_0x1a069f=_0x1073ef[_0x31197c(0x1c8)][_0x31197c(0x13b)](_0x47a33f=>_0x47a33f['status']?_0x47a33f['status']!=='verified':!_0x47a33f[_0x31197c(0x1a2)]);if(_0x275a88['KOVjo'](_0x1a069f[_0x31197c(0x131)],0x0)){console['log'](_0x31197c(0xfc)),console['log'](_0x275a88[_0x31197c(0x1c0)]);return;}let _0x519cbe;if(_0x275a88['KOVjo'](_0x1a069f['length'],0x1))_0x519cbe=_0x1a069f[0x0];else{const _0x25f8df=process['stdin'][_0x31197c(0x168)]&&process['stdout']['isTTY'];if(!_0x25f8df){console['log'](_0x275a88['SFQcc']);for(const _0x2615f4 of _0x1a069f){console['log']('\x20\x20'+_0x2615f4['name']),console[_0x31197c(0x17a)]('\x20\x20\x20\x20\x20ID:\x20'+_0x2615f4['id']),_0x2615f4[_0x31197c(0x178)]&&console[_0x31197c(0x17a)](_0x31197c(0x153)+_0x275a88[_0x31197c(0x1cd)](getProgressDisplay,_0x2615f4['stats'])),_0x2615f4[_0x31197c(0x199)]&&console['log'](_0x31197c(0x146)+_0x2615f4['gitBranch']);}throw new Error(_0x275a88['MagCK']);}const {selected:_0x4691f3}=await _0x5d8f24[_0x31197c(0x1af)]([{'type':_0x275a88['AilSl'],'name':_0x31197c(0x130),'message':_0x275a88['BTzBB'],'choices':_0x1a069f[_0x31197c(0x1cf)](_0x5f4360=>({'name':_0x5f4360['name']+'\x20('+_0x5f4360['id']+')','value':_0x5f4360['id']}))}]);_0x519cbe=_0x1a069f['find'](_0x2711d6=>_0x2711d6['id']===_0x4691f3);}await setActiveFeatureId(_0x519cbe['id']);_0x51c0fa&&_0x51c0fa!==_0x519cbe['gitBranch']&&(await _0x275a88['FXLNJ'](updateFeature,_0x519cbe['id'],{'gitBranch':_0x51c0fa}),console[_0x31197c(0x17a)](_0x31197c(0x104)+_0x51c0fa));console['log'](_0x31197c(0xf9)+_0x519cbe['name']+'\x20('+_0x519cbe['id']+')'),await _0x275a88[_0x31197c(0x11c)](tryStartCurrentSession,_0x519cbe['id']);const _0x3d29f9=await _0x275a88[_0x31197c(0x1cd)](getFeature,_0x519cbe['id']),_0x1b86da=process[_0x31197c(0x1a9)]['CLAUDE_SESSION_ID'];_0x1b86da&&_0x275a88[_0x31197c(0x18f)](registerSession,_0x1b86da,_0x3d29f9['id']),displayFeature(_0x3d29f9,_0x3d29f9[_0x31197c(0x17f)]),await _0x275a88[_0x31197c(0x1cd)](printFeedbackNudge,_0x3d29f9['id']);}async function printFeedbackNudge(_0x3063ee){const _0x3cadb2=_0x2869d5,_0x7a8ce9={'MWUXw':function(_0x435c48,_0x3d1de5,_0x5e5ac1){return _0x435c48(_0x3d1de5,_0x5e5ac1);},'tZtrU':'\x20\x20\x20Run\x20`ranger\x20get-review`\x20to\x20see\x20what\x20needs\x20to\x20be\x20fixed.'};try{const {items:_0x51c435}=await getActionItems(_0x3063ee);let _0x3d689f=0x0,_0xc7a149=0x0;for(const _0x50809f of _0x51c435){const _0x316f56=await _0x7a8ce9[_0x3cadb2(0x1c6)](getItemFeedback,_0x3063ee,_0x50809f['id']);_0x316f56[_0x3cadb2(0x1ad)][_0x3cadb2(0x131)]>0x0&&(_0x3d689f+=_0x316f56[_0x3cadb2(0x1ad)][_0x3cadb2(0x131)],_0xc7a149++);}_0x3d689f>0x0&&(console[_0x3cadb2(0x17a)]('\x0a⚠️\x20\x20'+_0x3d689f+'\x20unaddressed\x20reviewer\x20comment(s)\x20across\x20'+_0xc7a149+_0x3cadb2(0x14c)),console['log'](_0x7a8ce9['tZtrU']));}catch{}}async function tryStartCurrentSession(_0x1cba69){const _0x257caf=_0x2869d5,_0x31c9a3={'IcHpD':function(_0x205205,_0x3e8370){return _0x205205(_0x3e8370);}};try{const {sessions:_0x5e556d}=await _0x31c9a3[_0x257caf(0x117)](listFeatureSessions,_0x1cba69),_0x11928c=_0x5e556d['find'](_0xbdd681=>_0xbdd681['status']===_0x257caf(0x194));_0x11928c&&(await startSession(_0x1cba69,_0x11928c['id']),console[_0x257caf(0x17a)]('\x20\x20\x20▶️\x20Started\x20session\x20'+_0x11928c[_0x257caf(0x1b5)]));}catch{}}export async function featureReport(_0x59d711,_0x5dd53b){const _0x93de16=_0x2869d5,_0x35979c={'VQekv':function(_0x39b1b5){return _0x39b1b5();},'ZXwon':function(_0x258455,_0x1a57db,_0x338790){return _0x258455(_0x1a57db,_0x338790);},'RHPRl':function(_0x47abfa,_0x3de2ef,_0x576d88,_0x2cd1cd){return _0x47abfa(_0x3de2ef,_0x576d88,_0x2cd1cd);},'NFBhT':function(_0x223931,_0xb57ed3){return _0x223931(_0xb57ed3);},'gBJZE':function(_0x46534a,_0x19f08f,_0xa6378a,_0x47d6c1){return _0x46534a(_0x19f08f,_0xa6378a,_0x47d6c1);},'Ewslj':'utf-8'},_0x3069de=_0x59d711||await _0x35979c['VQekv'](getActiveFeatureId);if(!_0x3069de)throw new Error('No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.');console['log']('\x0aGenerating\x20report...');const _0x59eb6c=await _0x35979c[_0x93de16(0xfa)](getFeatureReportMarkdown,_0x3069de,{'style':_0x5dd53b[_0x93de16(0x177)]}),_0x5f22db=_0x5dd53b['output']||_0x35979c['RHPRl'](join,getRangerDir(),_0x93de16(0x141),_0x3069de+'.md'),_0x451b6a=_0x35979c['ZXwon'](join,_0x5f22db,'..');!_0x35979c['NFBhT'](existsSync,_0x451b6a)&&await mkdir(_0x451b6a,{'recursive':!![]}),await _0x35979c[_0x93de16(0x174)](writeFile,_0x5f22db,_0x59eb6c,_0x35979c['Ewslj']),console[_0x93de16(0x17a)]('\x0a✅\x20Report\x20generated:\x20'+_0x5f22db);}function getScenarioResult(_0x53d478){const _0x387c52=_0x2869d5,_0x34156b={'IVgZD':_0x387c52(0x189),'HOUJD':_0x387c52(0x11a)};if(_0x53d478['status']===_0x34156b[_0x387c52(0x185)])return _0x53d478['terminalReason']??_0x34156b[_0x387c52(0x185)];if(_0x53d478[_0x387c52(0x176)]===_0x34156b[_0x387c52(0x137)])return _0x387c52(0x197);return _0x53d478[_0x387c52(0x176)];}function getScenarioRationale(_0xf211f4,_0x269d57){const _0x551352=_0x2869d5,_0x435c13={'TbpQS':_0x551352(0x16a)},_0x31a9b3=_0x435c13[_0x551352(0x1d0)]['split']('|');let _0x234252=0x0;while(!![]){switch(_0x31a9b3[_0x234252++]){case'0':if(_0xf211f4[_0x551352(0x1b8)])return _0xf211f4[_0x551352(0x1b8)];continue;case'1':if(_0xf211f4[_0x551352(0x173)])return _0xf211f4['canceledReason'];continue;case'2':return null;case'3':if(_0xf211f4['notes'])return _0xf211f4['notes'];continue;case'4':if(_0x269d57)return _0x269d57;continue;case'5':if(_0xf211f4['blockedReason'])return _0xf211f4[_0x551352(0x193)];continue;}break;}}export async function featureReportPrDescription(_0x185889,_0x10cbc4){const _0x57e4cc=_0x2869d5,_0x59bda9={'xvNbP':_0x57e4cc(0x16f),'Rmkvf':'\x0a❌\x20No\x20scenarios\x20found\x20to\x20include.','lRdGl':function(_0x29987a,_0x4e117f,_0x2f151a,_0x5c12e1){return _0x29987a(_0x4e117f,_0x2f151a,_0x5c12e1);},'cTWqN':function(_0x3e4102,_0x223f61,_0xf4da6a){return _0x3e4102(_0x223f61,_0xf4da6a);}},_0x59bfec=_0x185889||await getActiveFeatureId();if(!_0x59bfec)throw new Error(_0x59bda9['xvNbP']);const _0x33689f=await getFeature(_0x59bfec),_0x3b7c23=_0x33689f['checklistItems']||[],_0x409188=getCurrentSessionItems(_0x33689f,_0x3b7c23);_0x409188[_0x57e4cc(0x131)]===0x0&&(console[_0x57e4cc(0x135)](_0x59bda9[_0x57e4cc(0x17c)]),process[_0x57e4cc(0x180)](0x1));const _0x5cddfd=_0x10cbc4[_0x57e4cc(0x14b)]??[],_0x8df020=_0x5cddfd[_0x57e4cc(0x13b)](_0xd10010=>!Number[_0x57e4cc(0x179)](_0xd10010)||_0xd10010<0x1||_0xd10010>_0x409188['length']);if(_0x8df020['length']>0x0){console['error'](_0x57e4cc(0x1a8)+_0x8df020['join'](',\x20')),console['log'](_0x57e4cc(0x171));for(let _0x7e6fd4=0x0;_0x7e6fd4<_0x409188[_0x57e4cc(0x131)];_0x7e6fd4++){console[_0x57e4cc(0x17a)]('\x20\x20'+(_0x7e6fd4+0x1)+'.\x20'+_0x409188[_0x7e6fd4]['description']);}process[_0x57e4cc(0x180)](0x1);}const _0x53f696=new Set(_0x5cddfd['map'](_0x4cbeea=>_0x4cbeea-0x1)),_0x3d8101=_0x409188['filter']((_0x3e1346,_0x5e7be6)=>!_0x53f696[_0x57e4cc(0x115)](_0x5e7be6));_0x3d8101['length']===0x0&&(console[_0x57e4cc(0x135)](_0x57e4cc(0x1a7)),process[_0x57e4cc(0x180)](0x1));if(_0x10cbc4[_0x57e4cc(0x157)])await _0x59bda9[_0x57e4cc(0x19a)](outputJsonReport,_0x59bfec,_0x33689f,_0x3d8101);else{const _0x41fdb1=await _0x59bda9[_0x57e4cc(0x102)](getFeatureReportMarkdown,_0x59bfec,{'itemIds':_0x3d8101[_0x57e4cc(0x1cf)](_0x5fe2b3=>_0x5fe2b3['id'])});process[_0x57e4cc(0x169)]['write'](_0x41fdb1['trimEnd']()+'\x0a');}}async function outputJsonReport(_0x52aa30,_0x2aa4b2,_0x50377b){const _0x21637f=_0x2869d5,_0x81058c={'MTOoa':function(_0x456f48,_0x4190e8){return _0x456f48(_0x4190e8);},'aXaZl':function(_0x530d66){return _0x530d66();}},_0x5df406=_0x81058c['aXaZl'](getApiBaseUrl),_0x3113f9=await getFeatureReport(_0x52aa30),_0x22f0c4=new Map(_0x3113f9['checklistItems'][_0x21637f(0x1cf)](_0x5bc489=>[_0x5bc489['id'],_0x5bc489])),_0x440837=await Promise[_0x21637f(0x1aa)](_0x50377b['map'](async _0x14f7fb=>{const _0x4b962f=_0x21637f,_0xdc5f30=_0x22f0c4['get'](_0x14f7fb['id']),_0xd7692a=_0xdc5f30?.[_0x4b962f(0x172)]??null;let _0x356b73=[];if(_0x14f7fb['browserSessionId'])try{const {steps:_0x34aa9c}=await _0x81058c['MTOoa'](getBrowserSessionSteps,_0x14f7fb[_0x4b962f(0x1d2)]);_0x34aa9c[_0x4b962f(0x131)]>0x0&&(_0x356b73=_0x34aa9c[_0x4b962f(0x1cf)](_0x2892d0=>{const _0x2f9ca2=_0x4b962f,_0x45aaf4=_0x2892d0[_0x2f9ca2(0x112)]['find'](_0x35d35a=>_0x35d35a['assetType']===_0x2f9ca2(0x124)&&_0x35d35a[_0x2f9ca2(0x1b7)]==='after')??_0x2892d0[_0x2f9ca2(0x112)]['find'](_0x3ee229=>_0x3ee229[_0x2f9ca2(0x145)]==='screenshot');let _0xa5a808=null,_0xee45c1=null;if(_0x45aaf4){const _0x9087e6=_0x45aaf4['storage']['location'][_0x2f9ca2(0x1ca)]('/')[_0x2f9ca2(0x13d)]();_0xa5a808=_0x5df406+_0x2f9ca2(0x184)+_0x14f7fb['browserSessionId']+'/artifacts/'+_0x9087e6,_0x9087e6&&(_0xee45c1=_0x9087e6['replace'](/\.\w+$/,'')[_0x2f9ca2(0x166)](/^(key_)?\d+_/,'')[_0x2f9ca2(0x166)](/[-_]/g,'\x20'));}return{'description':_0xee45c1||_0x2892d0[_0x2f9ca2(0x191)]||_0x2892d0[_0x2f9ca2(0x167)]||'Step\x20'+_0x2892d0['position'],'screenshot':_0xa5a808,'is_key_step':_0x2892d0[_0x2f9ca2(0x107)]};}));}catch{}return _0x356b73[_0x4b962f(0x131)]===0x0&&_0xd7692a?.['screenshotUrls']&&(_0x356b73=_0xd7692a[_0x4b962f(0x1d1)]['map']((_0x4a8a70,_0xda45fa)=>({'description':_0x4b962f(0x164)+(_0xda45fa+0x1),'screenshot':_0x4a8a70,'is_key_step':![]}))),{'description':_0x14f7fb[_0x4b962f(0x191)],'result':getScenarioResult(_0x14f7fb),'rationale':getScenarioRationale(_0x14f7fb,_0xd7692a?.[_0x4b962f(0x128)]),'steps':_0x356b73};})),_0x5a0ce7={'url':_0x2aa4b2[_0x21637f(0x126)],'scenarios':_0x440837};process['stdout'][_0x21637f(0x13e)](JSON['stringify'](_0x5a0ce7,null,0x2)+'\x0a');}export async function featureConcludeSession(_0x33c43c){const _0x43c955=_0x2869d5,_0x3b3ce3={'tEgeD':function(_0x4ad32e){return _0x4ad32e();},'frmPU':_0x43c955(0x1bd),'kDFAi':function(_0x308a95,_0x1f8eb1){return _0x308a95(_0x1f8eb1);},'Ogcej':'Current\x20session\x20not\x20found.','YdcFI':_0x43c955(0x1ba),'wiEus':function(_0x183bc4,_0x62df8f){return _0x183bc4!==_0x62df8f;},'IjiAH':'\x0aConcluding\x20session...','QgYuF':function(_0x82c5f,_0x20e9c7,_0xfdfb2a){return _0x82c5f(_0x20e9c7,_0xfdfb2a);}},_0x4be9c0=_0x33c43c||await _0x3b3ce3[_0x43c955(0x183)](getActiveFeatureId);if(!_0x4be9c0)throw new Error(_0x3b3ce3[_0x43c955(0x113)]);const _0x2caab2=await getFeature(_0x4be9c0);if(!_0x2caab2[_0x43c955(0x181)])throw new Error('No\x20active\x20session\x20for\x20this\x20feature\x20review.');const {sessions:_0x20e1a6}=await _0x3b3ce3['kDFAi'](listFeatureSessions,_0x4be9c0),_0x586516=_0x20e1a6[_0x43c955(0x11e)](_0x36b953=>_0x36b953['id']===_0x2caab2[_0x43c955(0x181)]);if(!_0x586516)throw new Error(_0x3b3ce3['Ogcej']);if(_0x586516[_0x43c955(0x176)]==='completed'){console['log'](_0x3b3ce3['YdcFI']);return;}if(_0x3b3ce3['wiEus'](_0x586516['status'],_0x43c955(0x197)))throw new Error('Cannot\x20conclude\x20session\x20with\x20status:\x20'+_0x586516[_0x43c955(0x176)]);console['log'](_0x3b3ce3['IjiAH']),await _0x3b3ce3['QgYuF'](concludeSession,_0x4be9c0,_0x2caab2['currentSessionId']),console[_0x43c955(0x17a)]('\x0a✅\x20Session\x20'+_0x586516[_0x43c955(0x1b5)]+_0x43c955(0xfb)),console['log']('\x20\x20\x20The\x20feature\x20review\x20is\x20now\x20ready\x20for\x20human\x20review\x20on\x20the\x20Ranger\x20dashboard.');}export async function featureSessions(_0x4b4a3c){const _0x2e8724=_0x2869d5,_0x259a8e={'nFwmJ':'No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','DXEHn':function(_0x120bb7,_0x479041){return _0x120bb7(_0x479041);},'UProH':function(_0x4a5074,_0x5b6e53){return _0x4a5074===_0x5b6e53;},'GBodT':'No\x20sessions\x20found.','rThup':_0x2e8724(0x15f)},_0x2adf65=_0x4b4a3c||await getActiveFeatureId();if(!_0x2adf65)throw new Error(_0x259a8e['nFwmJ']);const _0x585d57=await _0x259a8e[_0x2e8724(0x1ab)](getFeature,_0x2adf65);console['log'](_0x2e8724(0x170)+_0x585d57['name']+'\x0a');const {sessions:_0x21900f}=await listFeatureSessions(_0x2adf65);if(_0x259a8e[_0x2e8724(0x14e)](_0x21900f[_0x2e8724(0x131)],0x0)){console['log'](_0x259a8e[_0x2e8724(0x123)]);return;}for(const _0x2c950d of _0x21900f){const _0x570daa=_0x259a8e['UProH'](_0x2c950d['status'],_0x259a8e['rThup'])?'✅':_0x259a8e[_0x2e8724(0x14e)](_0x2c950d[_0x2e8724(0x176)],_0x2e8724(0x197))?'🔄':'▶️';console[_0x2e8724(0x17a)](_0x570daa+_0x2e8724(0x1be)+_0x2c950d[_0x2e8724(0x1b5)]+'\x20('+_0x2c950d['id']+')'),console[_0x2e8724(0x17a)]('\x20\x20\x20Status:\x20'+_0x2c950d[_0x2e8724(0x176)]),console[_0x2e8724(0x17a)](_0x2e8724(0x14d)+new Date(_0x2c950d[_0x2e8724(0x196)])[_0x2e8724(0x11d)]()),_0x2c950d['completedAt']&&console[_0x2e8724(0x17a)]('\x20\x20\x20Completed:\x20'+new Date(_0x2c950d['completedAt'])['toLocaleString']()),console[_0x2e8724(0x17a)]('');}}export async function featureAddScenario(_0x4e7823,_0x12045f){const _0x4c74fd=_0x2869d5,_0x4c359a={'VCZXB':function(_0x590ef4,_0x6297ce,_0x87a802){return _0x590ef4(_0x6297ce,_0x87a802);}},_0x529d4a=_0x12045f||await getActiveFeatureId();if(!_0x529d4a)throw new Error(_0x4c74fd(0x1bd));const _0xd0cd4c=await getFeature(_0x529d4a);if(_0xd0cd4c['latestReview']&&!_0xd0cd4c[_0x4c74fd(0x1a5)][_0x4c74fd(0x1bc)])throw new Error(_0x4c74fd(0x1a6)+_0xd0cd4c['dashboardUrl']);await _0x4c359a['VCZXB'](createChecklistItem,_0x529d4a,_0x4e7823);const _0x59d74e=await getFeature(_0x529d4a);console['log']('\x0a✅\x20Scenario\x20added'),_0x4c359a['VCZXB'](displayFeature,_0x59d74e,_0x59d74e[_0x4c74fd(0x17f)]);}export async function featureEditScenario(_0x21ca2d,_0x88532a){const _0x353b00=_0x2869d5,_0x1ad142={'sVqWn':function(_0x88117a,_0x23b5a9){return _0x88117a===_0x23b5a9;},'TWLDZ':'\x0aAvailable\x20scenarios:','kmjUI':function(_0x4b4dcf,_0x174996){return _0x4b4dcf<_0x174996;},'hOyEA':function(_0x4f1c0d,_0x4d4fae){return _0x4f1c0d-_0x4d4fae;},'PcxFg':function(_0x686766,_0x5563a2){return _0x686766>=_0x5563a2;},'HWaKb':function(_0x3b8ff6,_0x4336ac){return _0x3b8ff6+_0x4336ac;}},_0x52179c=_0x88532a['id']||await getActiveFeatureId();!_0x52179c&&(console[_0x353b00(0x135)](_0x353b00(0x15a)),console['error'](_0x353b00(0x156)),process['exit'](0x1));const _0xd079ab=await getFeature(_0x52179c);_0xd079ab[_0x353b00(0x1a5)]&&!_0xd079ab['latestReview'][_0x353b00(0x1bc)]&&(console[_0x353b00(0x135)]('\x0a❌\x20Cannot\x20edit\x20scenario:\x20feature\x20review\x20has\x20an\x20active\x20review.'),console['error']('Please\x20finish\x20your\x20review\x20first:'),console[_0x353b00(0x135)]('\x20\x20'+_0xd079ab['dashboardUrl']),process[_0x353b00(0x180)](0x1));const _0x432500=_0xd079ab['checklistItems']||[];_0x1ad142['sVqWn'](_0x432500[_0x353b00(0x131)],0x0)&&(console[_0x353b00(0x135)](_0x353b00(0x151)),process[_0x353b00(0x180)](0x1));if(_0x88532a[_0x353b00(0x144)]===undefined){console[_0x353b00(0x135)]('\x0a❌\x20No\x20scenario\x20number\x20provided.\x20Use\x20--scenario\x20<number>.'),console[_0x353b00(0x17a)](_0x1ad142[_0x353b00(0x16e)]);for(let _0xf2843e=0x0;_0x1ad142['kmjUI'](_0xf2843e,_0x432500['length']);_0xf2843e++){console[_0x353b00(0x17a)]('\x20\x20'+(_0xf2843e+0x1)+'.\x20'+_0x432500[_0xf2843e]['description']);}process[_0x353b00(0x180)](0x1);}const _0x139b98=_0x1ad142[_0x353b00(0x147)](_0x88532a[_0x353b00(0x144)],0x1);if(_0x139b98<0x0||_0x1ad142[_0x353b00(0x17e)](_0x139b98,_0x432500[_0x353b00(0x131)])){console['error']('\x0a❌\x20Invalid\x20scenario\x20index:\x20'+_0x88532a[_0x353b00(0x144)]+_0x353b00(0x133)+_0x432500['length']+'\x20scenarios.'),console['log'](_0x1ad142[_0x353b00(0x16e)]);for(let _0x5809f9=0x0;_0x5809f9<_0x432500[_0x353b00(0x131)];_0x5809f9++){console[_0x353b00(0x17a)]('\x20\x20'+_0x1ad142[_0x353b00(0x12a)](_0x5809f9,0x1)+'.\x20'+_0x432500[_0x5809f9]['description']);}process['exit'](0x1);}const _0x11f69c=_0x432500[_0x139b98];await updateChecklistItem(_0x52179c,_0x11f69c['id'],{'description':_0x21ca2d});const _0xa39039=await getFeature(_0x52179c);console['log'](_0x353b00(0x1c2)),displayFeature(_0xa39039,_0xa39039[_0x353b00(0x17f)]);}async function downloadFeedbackImage(_0x438687,_0x4a5d39){const _0x29820e=_0x2869d5,_0xb2ad99={'npxkA':function(_0x474f1c){return _0x474f1c();},'KaLbF':_0x29820e(0x13f),'lQalh':function(_0x27cfb7,_0x593339){return _0x27cfb7(_0x593339);},'JqAGs':function(_0x50e6e8,_0x20a6f0,_0x1b996b){return _0x50e6e8(_0x20a6f0,_0x1b996b);}};try{const _0x3f611b=join(_0xb2ad99[_0x29820e(0x1b3)](getRangerDir),_0xb2ad99[_0x29820e(0x1a4)]);await mkdir(_0x3f611b,{'recursive':!![]});const _0x1a6cb4=join(_0x3f611b,'comment_'+_0x4a5d39+_0x29820e(0x134)),_0xcea68d=await _0xb2ad99[_0x29820e(0x165)](fetch,_0x438687);if(!_0xcea68d['ok'])return null;const _0x2fc004=Buffer['from'](await _0xcea68d['arrayBuffer']());return await _0xb2ad99[_0x29820e(0x12c)](writeFile,_0x1a6cb4,_0x2fc004),_0x1a6cb4;}catch{return null;}}export async function featureGetReview(_0x54840a){const _0x3d11f2=_0x2869d5,_0x11ce79={'AIChm':_0x3d11f2(0x1bd),'PzHsm':function(_0x340944,_0x393eef){return _0x340944(_0x393eef);},'bszlY':_0x3d11f2(0x160),'FqSIr':function(_0x3176c5,_0x3f657a){return _0x3176c5+_0x3f657a;},'peihP':'en-US','Qguzh':_0x3d11f2(0x17d),'fDULb':function(_0x2f25a2,_0x4cdcca,_0x2947ea){return _0x2f25a2(_0x4cdcca,_0x2947ea);},'Rrwuh':'element','AROtU':function(_0x19b5ed,_0x4a2b13){return _0x19b5ed>=_0x4a2b13;}},_0x1b6c8a=_0x54840a||await getActiveFeatureId();if(!_0x1b6c8a)throw new Error(_0x11ce79[_0x3d11f2(0x127)]);const _0x400e1f=await _0x11ce79['PzHsm'](getFeature,_0x1b6c8a),{items:_0x5f508a}=await getActionItems(_0x1b6c8a);console['log']('\x0a📋\x20Feedback\x20for:\x20'+_0x400e1f[_0x3d11f2(0x16c)]+'\x20('+_0x400e1f['id']+')\x0a');if(_0x5f508a[_0x3d11f2(0x131)]===0x0){console['log'](_0x11ce79['bszlY']);return;}for(let _0x51eba9=0x0;_0x51eba9<_0x5f508a[_0x3d11f2(0x131)];_0x51eba9++){const _0x1ca688=_0x5f508a[_0x51eba9],_0x5d1279=_0x1ca688['version']>0x1?'\x20(v'+_0x1ca688[_0x3d11f2(0x1ce)]+')':'',_0x1fc4ab=await getItemFeedback(_0x1b6c8a,_0x1ca688['id']);if(_0x1fc4ab['unaddressedComments'][_0x3d11f2(0x131)]>0x0){console['log']('Scenario\x20'+_0x11ce79['FqSIr'](_0x51eba9,0x1)+_0x3d11f2(0x10f)+_0x1ca688[_0x3d11f2(0x191)]+'\x22'+_0x5d1279+_0x3d11f2(0x162)+_0x1fc4ab['unaddressedComments']['length']+_0x3d11f2(0x108));for(const _0x27aa05 of _0x1fc4ab['unaddressedComments']){const _0x4ebf99=new Date(_0x27aa05[_0x3d11f2(0x196)])['toLocaleDateString'](_0x11ce79[_0x3d11f2(0x15d)],{'month':'short','day':_0x11ce79['Qguzh']}),_0x5305ed=_0x27aa05['authorName']||_0x27aa05['authorEmail']||_0x3d11f2(0x1cc);console['log']('\x20\x20💬\x20'+_0x5305ed+'\x20('+_0x4ebf99+'):\x20\x22'+_0x27aa05[_0x3d11f2(0x161)]+'\x22');if(_0x27aa05['assetUrl']){const _0xba6203=await _0x11ce79[_0x3d11f2(0x120)](downloadFeedbackImage,_0x27aa05[_0x3d11f2(0x18c)],_0x27aa05['id']);_0xba6203&&console[_0x3d11f2(0x17a)](_0x3d11f2(0x1c7)+_0xba6203);}if(_0x27aa05['domRef']){const _0x21580a=_0x27aa05[_0x3d11f2(0x136)]['selector']['split'](_0x3d11f2(0x103))['pop']()?.['split'](':')[0x0]||_0x11ce79['Rrwuh'],_0x58545d=_0x27aa05[_0x3d11f2(0x136)][_0x3d11f2(0x175)]?'\x20\x22'+_0x27aa05[_0x3d11f2(0x136)][_0x3d11f2(0x175)]['slice'](0x0,0x3c)+'\x22':'';console['log'](_0x3d11f2(0x18b)+_0x21580a+'>'+_0x58545d),console['log']('\x20\x20\x20\x20\x20📋\x20Selector:\x20'+_0x27aa05['domRef']['selector']);}else{if(_0x27aa05['spatial']){const _0x23a806=_0x27aa05[_0x3d11f2(0x1b1)][_0x3d11f2(0x1b2)];_0x27aa05[_0x3d11f2(0x1b1)][_0x3d11f2(0x142)]==='point'&&_0x11ce79[_0x3d11f2(0x106)](_0x23a806[_0x3d11f2(0x131)],0x2)?console['log']('\x20\x20\x20\x20\x20📍\x20Annotation:\x20point\x20at\x20('+_0x23a806[0x0]['toFixed'](0x2)+',\x20'+_0x23a806[0x1][_0x3d11f2(0x190)](0x2)+')'):console['log'](_0x3d11f2(0x121)+_0x27aa05['spatial'][_0x3d11f2(0x142)]+_0x3d11f2(0x1c4)+_0x23a806[_0x3d11f2(0x1cf)](_0x4d1927=>_0x4d1927[_0x3d11f2(0x190)](0x2))[_0x3d11f2(0x1a3)](',\x20')+']');}}}if(_0x1fc4ab[_0x3d11f2(0x114)]){console['log']('\x20\x20Expected\x20flow:');for(const _0x2427b6 of _0x1fc4ab[_0x3d11f2(0x114)]['split']('\x0a')){console[_0x3d11f2(0x17a)]('\x20\x20\x20\x20'+_0x2427b6);}}}else console['log']('Scenario\x20'+(_0x51eba9+0x1)+':\x20\x22'+_0x1ca688[_0x3d11f2(0x191)]+'\x22'+_0x5d1279+'\x20—\x20no\x20comments'),console[_0x3d11f2(0x17a)](_0x3d11f2(0x15e));console['log']('');}}export async function featureDelete(_0x5a9917){const _0x31fc45=_0x2869d5,_0x2e1536={'POuRF':function(_0x162700){return _0x162700();},'jhtbu':function(_0x391070,_0x1e046a){return _0x391070(_0x1e046a);},'WXQQa':_0x31fc45(0x14f)},_0x28f4ce=_0x5a9917||await _0x2e1536[_0x31fc45(0x13c)](getActiveFeatureId);if(!_0x28f4ce)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 _0x4179ce=await getFeature(_0x28f4ce);await _0x2e1536['jhtbu'](softDeleteFeature,_0x28f4ce),console[_0x31fc45(0x17a)](_0x31fc45(0xff)+_0x4179ce['name']+'\x20('+_0x28f4ce+')'),console['log'](_0x2e1536[_0x31fc45(0x149)]+_0x28f4ce);}export async function featureRestore(_0xd0fb30){const _0x4b0f9e=_0x2869d5,_0x4a1095={'iSNRT':function(_0x2b9789,_0x2166e2){return _0x2b9789(_0x2166e2);},'snMtb':function(_0xb00d92,_0x2c537e){return _0xb00d92(_0x2c537e);}};await _0x4a1095['iSNRT'](restoreFeature,_0xd0fb30);const _0x1e2eb6=await _0x4a1095[_0x4b0f9e(0x13a)](getFeature,_0xd0fb30);console[_0x4b0f9e(0x17a)](_0x4b0f9e(0x186)+_0x1e2eb6[_0x4b0f9e(0x16c)]+'\x20('+_0xd0fb30+')'),displayFeature(_0x1e2eb6,_0x1e2eb6[_0x4b0f9e(0x17f)]);}
1
+ const _0x3da61c=_0xcb7e;(function(_0x142250,_0x509ac4){const _0x23bdfd=_0xcb7e,_0x3ccb5b=_0x142250();while(!![]){try{const _0x596c63=parseInt(_0x23bdfd(0x1b5))/0x1*(-parseInt(_0x23bdfd(0x23b))/0x2)+-parseInt(_0x23bdfd(0x218))/0x3+parseInt(_0x23bdfd(0x201))/0x4*(parseInt(_0x23bdfd(0x1df))/0x5)+parseInt(_0x23bdfd(0x25a))/0x6*(parseInt(_0x23bdfd(0x1a7))/0x7)+parseInt(_0x23bdfd(0x1b3))/0x8*(parseInt(_0x23bdfd(0x1bc))/0x9)+parseInt(_0x23bdfd(0x225))/0xa+-parseInt(_0x23bdfd(0x24e))/0xb*(-parseInt(_0x23bdfd(0x1d2))/0xc);if(_0x596c63===_0x509ac4)break;else _0x3ccb5b['push'](_0x3ccb5b['shift']());}catch(_0x34e730){_0x3ccb5b['push'](_0x3ccb5b['shift']());}}}(_0x47b2,0xd4829));import{readFile,writeFile,mkdir}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{execSync}from'child_process';function _0x47b2(){const _0x4a0b43=['style','map','Please\x20finish\x20your\x20review\x20first:','jzKDl','submittedAt','browserSessionId','Current\x20session\x20not\x20found.','canonicalFlow','7iHjqxP','type','EIqRb','split','totalCount','\x20unaddressed\x20comment(s)','\x0aAvailable\x20scenarios:','BLlOK','incomplete','EGWKl','en-US','/artifacts/','119032XMiygw','No\x20sessions\x20found.','870mvjgir','iWtpj','DvVGB','QqCcz','Cannot\x20conclude\x20session\x20with\x20status:\x20','currentSessionId','unaddressedComments','18xSTyPC','authorName','JkXhy','jbpzG','Next\x20page:\x20ranger\x20list\x20--offset\x20','UAPje','Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','repeat','VQiwv','Cannot\x20add\x20scenario:\x20feature\x20review\x20has\x20an\x20active\x20review.\x20Please\x20finish\x20your\x20review\x20first:\x20','isKeyStep','vQYfZ','\x20\x20💬\x20','BaJSp','toFixed','nDbQq','pZaDo','includeDeleted','assetType','pop','screenshotUrls','\x20/\x20','70044JqHAXZ','parentItemId','sessionId','gUrLQ','approved','filter','push','STuyz','feedback-images','scenario','\x20of\x20','\x0a❌\x20All\x20scenarios\x20were\x20excluded.','stepName','259645sSteUt','iteration','blockedItems','length','\x20>\x20','sOcDe','JGFyP','terminalReason','\x20\x20\x20Description:\x20','\x0aSearching\x20for\x20feature\x20reviews\x20matching:\x20','yYWEX','cIANK','\x0a✅\x20Scenario\x20updated','items','aHRnE','isTTY','AVFuL','\x20(v','canceledReason','\x0aNo\x20feature\x20reviews\x20found.','\x20\x20\x20Branch:\x20','spatial','\x0a➡️\x20\x20Set\x20as\x20active\x20feature\x20review','exit','utf-8','\x20\x20\x20\x20\x20🎯\x20Element:\x20<','stdout','completed','\x20\x20\x20\x20\x20Progress:\x20','dashboardUrl','element','\x0aNo\x20matching\x20active\x20feature\x20reviews\x20found.','Multiple\x20feature\x20reviews\x20found.\x20Select\x20one:','toLocaleString','24BOCdVa','jLoij','position','name','CLAUDE_SESSION_ID','all','\x20\x20\x20Progress:\x20','HtGpd','description','log','No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','\x0a❌\x20No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','feBKc','lpouT','\x20concluded.','\x20\x20\x20Completed:\x20','agentResponse','\x0a📋\x20Feedback\x20for:\x20','gitBranch','EAwRA','vnbpE','timing','ypOHW','3800007nGLVRB','join','\x1b[0m','\x20\x20\x20','\x20[has\x20reviewer\x20feedback]','avKwa','\x0aConcluding\x20session...','find','textContent','\x0a✅\x20Session\x20is\x20already\x20completed.','\x20\x20\x20\x20','completedAt','\x20at\x20[','2451930sYCxvY','DIJBj','\x0a✅\x20Report\x20generated:\x20','blocked','/api/v1/mcp/browser-sessions/','aBZuJ','scenarios','comment_','pLLUB','prompt','QkVGQ','any','incompleteItems','\x0a✅\x20Session\x20','stringify','xxWfZ','\x0a❌\x20Cannot\x20edit\x20scenario:\x20feature\x20review\x20has\x20an\x20active\x20review.','isInteger','\x20\x20\x20ID:\x20','toLocaleDateString','\x20--current-branch','\x20\x20\x20\x20\x20\x20Approved','1644eQbGGi','json','\x20scenarios.','QXIzJ','list','authorEmail','incompleteReason','\x0a✅\x20Resumed\x20feature\x20review:\x20','TODzP','XSBUr','WIGGc','after','NUdJK','latestReview','\x0a⚠️\x20\x20','QDblI','assetUrl','UWuhn','domRef','1166cJdlRk','zmKzS','jGkjA','version','ZkGtr','\x20\x20\x20\x20\x20📋\x20Selector:\x20','ZKWNy','\x20incomplete','verified','JBAOM','.png','No\x20active\x20session\x20for\x20this\x20feature\x20review.','9882018YeRvrb','pipe','BJEXi','No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','status','verifiedItems','PYGZU','\x20\x20\x20Run\x20`ranger\x20get-review`\x20to\x20see\x20what\x20needs\x20to\x20be\x20fixed.','\x20\x20\x20\x20\x20📷\x20Screenshot:\x20','BkarQ','env','checklistItems','createdAt','assets','EYiEn','has','notes','aRRtd','error','replace','HQiWm','limit','wXHyn','stats','Scenario\x20','\x0aGenerating\x20report...','arrayBuffer','offset'];_0x47b2=function(){return _0x4a0b43;};return _0x47b2();}import _0xb771c4 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=_0x1abf80=>'\x1b[1m'+_0x1abf80+_0x3da61c(0x21a);function getGitRepoUrl(){const _0x4b7f41=_0x3da61c,_0x4c8b21={'aalMe':function(_0x471bd3,_0x57a7a4,_0x154622){return _0x471bd3(_0x57a7a4,_0x154622);},'cIANK':_0x4b7f41(0x25b)};try{const _0x2e777e=_0x4c8b21['aalMe'](execSync,'git\x20remote\x20get-url\x20origin',{'encoding':_0x4b7f41(0x1f7),'stdio':[_0x4c8b21[_0x4b7f41(0x1ea)],_0x4b7f41(0x25b),_0x4c8b21[_0x4b7f41(0x1ea)]]})['trim']();return _0x2e777e['replace'](/\.git$/,'')['replace'](/^git@github\.com:/,'github.com/')[_0x4b7f41(0x26d)](/^https?:\/\//,'');}catch{return undefined;}}function getGitBranch(){const _0x443872=_0x3da61c,_0x5ba9fe={'ssHcN':'utf-8','aRRtd':_0x443872(0x25b)};try{return execSync('git\x20rev-parse\x20--abbrev-ref\x20HEAD',{'encoding':_0x5ba9fe['ssHcN'],'stdio':[_0x5ba9fe[_0x443872(0x26b)],'pipe',_0x443872(0x25b)]})['trim']();}catch{return undefined;}}export async function getActiveFeatureId(){const _0x53b3e5=_0x3da61c,_0x2415bf={'jLoij':function(_0x1657be,_0x503520,_0x2efe10){return _0x1657be(_0x503520,_0x2efe10);}},_0x51ddc6=_0x2415bf[_0x53b3e5(0x202)](join,getRangerDir(),ACTIVE_FEATURE_FILE);if(!existsSync(_0x51ddc6))return null;try{const _0x1cfc88=await readFile(_0x51ddc6,'utf-8');return _0x1cfc88['trim']()||null;}catch{return null;}}async function setActiveFeatureId(_0x5bb118){const _0x4258e3=_0x3da61c,_0x23c9d8={'pLLUB':function(_0x27ce77,_0xc1d3bd,_0x265574){return _0x27ce77(_0xc1d3bd,_0x265574);},'iKrrj':function(_0x568794,_0x4df154,_0x6e820c){return _0x568794(_0x4df154,_0x6e820c);},'POhus':function(_0x218712,_0x114001,_0x456141,_0x3ce0c6){return _0x218712(_0x114001,_0x456141,_0x3ce0c6);},'JBAOM':'utf-8'},_0xabcab4=getRangerDir(),_0x150610=_0x23c9d8[_0x4258e3(0x22d)](join,_0xabcab4,ACTIVE_FEATURE_FILE);!existsSync(_0xabcab4)&&await _0x23c9d8['iKrrj'](mkdir,_0xabcab4,{'recursive':!![]}),await _0x23c9d8['POhus'](writeFile,_0x150610,_0x5bb118,_0x23c9d8[_0x4258e3(0x257)]);}function getProgressDisplay(_0x2b1be4){const _0x49e9b7=_0x3da61c,_0x73b5d2={'IeNQf':function(_0x4dddff,_0x43c2fa){return _0x4dddff+_0x43c2fa;},'ISztd':function(_0x3e10f3,_0x5dbe55){return _0x3e10f3+_0x5dbe55;},'xdgTq':function(_0x1e57f3,_0x37e264){return _0x1e57f3+_0x37e264;},'DIJBj':function(_0x27279d,_0x5b1fe1){return _0x27279d===_0x5b1fe1;},'feBKc':function(_0x196266,_0x20dd8e){return _0x196266*_0x20dd8e;},'BLlOK':function(_0x4b7166,_0x3cee8e){return _0x4b7166/_0x3cee8e;},'EAwRA':function(_0x3a65de,_0xd7ec81){return _0x3a65de-_0xd7ec81;},'ABuWE':function(_0x50f6dd,_0x5e677e){return _0x50f6dd>_0x5e677e;},'ZKmGj':function(_0x3c3b70,_0x2eeb93){return _0x3c3b70>_0x2eeb93;}},_0x3c46d2=_0x2b1be4[_0x49e9b7(0x25f)]||0x0,_0x4a5a4b=_0x2b1be4['verificationInProgressItems']||0x0,_0x5ba602=_0x2b1be4[_0x49e9b7(0x1e1)]||0x0,_0x4a37cf=_0x2b1be4[_0x49e9b7(0x231)]||0x0,_0x5d67c3=_0x2b1be4['pendingItems']||0x0,_0x1ae3a5=_0x73b5d2['IeNQf'](_0x73b5d2['ISztd'](_0x73b5d2['xdgTq'](_0x3c46d2+_0x4a5a4b,_0x5ba602),_0x4a37cf),_0x5d67c3);if(_0x73b5d2[_0x49e9b7(0x226)](_0x1ae3a5,0x0))return'-';const _0x45180e=0xa,_0x27c5a1=Math['round'](_0x73b5d2[_0x49e9b7(0x20d)](_0x73b5d2[_0x49e9b7(0x1ae)](_0x3c46d2,_0x1ae3a5),_0x45180e)),_0xf2c86c='█'[_0x49e9b7(0x1c3)](_0x27c5a1)+'░'[_0x49e9b7(0x1c3)](_0x73b5d2[_0x49e9b7(0x214)](_0x45180e,_0x27c5a1)),_0x4e8a4b=[];if(_0x5ba602>0x0)_0x4e8a4b['push'](_0x5ba602+'\x20blocked');if(_0x4a37cf>0x0)_0x4e8a4b[_0x49e9b7(0x1d8)](_0x4a37cf+_0x49e9b7(0x255));if(_0x73b5d2['ABuWE'](_0x4a5a4b,0x0))_0x4e8a4b['push'](_0x4a5a4b+'\x20in\x20progress');const _0x2c204f=_0x73b5d2['ZKmGj'](_0x4e8a4b['length'],0x0)?'\x20('+_0x4e8a4b[_0x49e9b7(0x219)](',\x20')+')':'';return _0xf2c86c+'\x20'+_0x3c46d2+'/'+_0x1ae3a5+'\x20verified'+_0x2c204f;}function getCurrentSessionItems(_0x1967fd,_0x2ed5fc){const _0x5d1316=_0x3da61c;if(!_0x1967fd[_0x5d1316(0x1ba)])return _0x2ed5fc['filter'](_0x5cbec8=>!_0x5cbec8[_0x5d1316(0x1d4)]);return _0x2ed5fc[_0x5d1316(0x1d7)](_0x40106c=>_0x40106c['sessionId']===_0x1967fd['currentSessionId']||!_0x40106c[_0x5d1316(0x1d4)]);}function displayFeature(_0x3e2e70,_0x43ac2f){const _0x228e22=_0x3da61c,_0x30e3e2={'cvLIU':function(_0x15377f,_0x5e34fa){return _0x15377f>_0x5e34fa;},'SKVgv':'\x0a\x20\x20\x20Scenarios:','yYWEX':'closed','vnbpE':function(_0x18f07c,_0x650031){return _0x18f07c===_0x650031;},'IUzLf':function(_0x360f28,_0x35b8e2){return _0x360f28===_0x35b8e2;},'gUDol':function(_0x2e8bcd,_0x29b9df){return _0x2e8bcd===_0x29b9df;},'jURSy':function(_0x187575,_0x469a4b){return _0x187575===_0x469a4b;},'yNwCK':function(_0x2b4121,_0x28af9b){return _0x2b4121!==_0x28af9b;},'qqdho':'verified','lpouT':_0x228e22(0x21c),'LkQlj':function(_0x32b48e,_0x20bf0d){return _0x32b48e===_0x20bf0d;},'HvUhr':'incomplete','iWtpj':_0x228e22(0x1d6)};console['log']('\x0a'+_0x3e2e70[_0x228e22(0x204)]+'\x20('+_0x3e2e70[_0x228e22(0x1fc)]+')');_0x3e2e70['stats']&&console['log'](_0x228e22(0x207)+getProgressDisplay(_0x3e2e70['stats']));_0x3e2e70['description']&&console[_0x228e22(0x20a)](_0x228e22(0x1e7)+_0x3e2e70['description']);_0x3e2e70['gitRepoUrl']&&console[_0x228e22(0x20a)]('\x20\x20\x20Repository:\x20'+_0x3e2e70['gitRepoUrl']);_0x3e2e70[_0x228e22(0x213)]&&console[_0x228e22(0x20a)](_0x228e22(0x1f3)+_0x3e2e70[_0x228e22(0x213)]);console['log']('\x20\x20\x20Created:\x20'+new Date(_0x3e2e70['createdAt'])[_0x228e22(0x200)]());_0x3e2e70['completedAt']&&console[_0x228e22(0x20a)](_0x228e22(0x210)+new Date(_0x3e2e70[_0x228e22(0x223)])['toLocaleString']());if(_0x43ac2f&&_0x30e3e2['cvLIU'](_0x43ac2f['length'],0x0)){console['log'](_0x30e3e2['SKVgv']);for(let _0x1404c6=0x0;_0x1404c6<_0x43ac2f['length'];_0x1404c6++){const _0x4dc288=_0x43ac2f[_0x1404c6];let _0x56c5c1;if(_0x4dc288['status']===_0x30e3e2[_0x228e22(0x1e9)]&&_0x30e3e2[_0x228e22(0x215)](_0x4dc288['terminalReason'],_0x228e22(0x1d6)))_0x56c5c1='✅';else{if(_0x30e3e2['IUzLf'](_0x4dc288['status'],_0x228e22(0x256)))_0x56c5c1='🟢';else{if(_0x30e3e2[_0x228e22(0x215)](_0x4dc288['status'],_0x228e22(0x1af)))_0x56c5c1='🟠';else{if(_0x30e3e2['gUDol'](_0x4dc288['status'],_0x228e22(0x228)))_0x56c5c1='🛑';else{if(_0x30e3e2['jURSy'](_0x4dc288['status'],_0x30e3e2[_0x228e22(0x1e9)]))_0x56c5c1='⛔';else _0x30e3e2['vnbpE'](_0x4dc288['status'],'verification_in_progress')?_0x56c5c1='⏳':_0x56c5c1='⬜';}}}}const _0x4248e3=_0x4dc288['version']>0x1?_0x228e22(0x1f0)+_0x4dc288['version']+')':'',_0x667ca3=_0x30e3e2['cvLIU'](_0x4dc288['version'],0x1)&&_0x4dc288[_0x228e22(0x1d3)]&&_0x4dc288[_0x228e22(0x25e)]!=='closed'&&_0x30e3e2['yNwCK'](_0x4dc288[_0x228e22(0x25e)],_0x30e3e2['qqdho'])?_0x30e3e2[_0x228e22(0x20e)]:'';console['log'](_0x228e22(0x21b)+(_0x1404c6+0x1)+'.\x20'+_0x56c5c1+'\x20'+_0x4dc288[_0x228e22(0x209)]+_0x4248e3+_0x667ca3);_0x30e3e2['LkQlj'](_0x4dc288['status'],_0x228e22(0x228))&&_0x4dc288['blockedReason']&&console['log']('\x20\x20\x20\x20\x20\x20Blocked:\x20'+_0x4dc288['blockedReason']);_0x4dc288[_0x228e22(0x25e)]===_0x30e3e2['HvUhr']&&_0x4dc288[_0x228e22(0x241)]&&console['log']('\x20\x20\x20\x20\x20\x20Incomplete:\x20'+_0x4dc288[_0x228e22(0x241)]);if(_0x30e3e2['jURSy'](_0x4dc288['status'],_0x30e3e2[_0x228e22(0x1e9)])&&_0x4dc288[_0x228e22(0x1e6)]===_0x30e3e2[_0x228e22(0x1b6)])console[_0x228e22(0x20a)](_0x228e22(0x23a));else _0x4dc288['status']==='closed'&&_0x4dc288['canceledReason']&&console['log']('\x20\x20\x20\x20\x20\x20Cancelled:\x20'+_0x4dc288['canceledReason']);}}}export async function featureCreate(_0x30d8a0,_0x36a4e5){const _0x26c2a6=_0x3da61c,_0x18d766={'nDbQq':function(_0x36ce73){return _0x36ce73();},'zoifJ':function(_0x4e4554,_0x1279d5){return _0x4e4554===_0x1279d5;},'vaWbr':function(_0x3246ce,_0x36bf01){return _0x3246ce(_0x36bf01);},'kSCiW':function(_0x4e97c9,_0x47b79e,_0x2ac314){return _0x4e97c9(_0x47b79e,_0x2ac314);}},{envNames:_0x59e299}=await _0x18d766[_0x26c2a6(0x1cb)](getEnvNames);if(_0x18d766['zoifJ'](_0x59e299['length'],0x0)&&!process[_0x26c2a6(0x264)]['RANGER_TEST_USERNAME']){let _0x2c8ebc=0x0;try{_0x2c8ebc=(await listCloudProfiles())['length'];}catch{_0x2c8ebc=0x1;}_0x18d766['zoifJ'](_0x2c8ebc,0x0)&&console['warn']('\x0a'+formatProfileRequiredMessage(_0x40f4c8=>bold(_0x40f4c8)));}const _0x54f76e=_0x36a4e5[_0x26c2a6(0x22b)]?_0x36a4e5[_0x26c2a6(0x22b)][_0x26c2a6(0x277)](_0x451e3e=>_0x451e3e['trim']()):[],_0x3efe9e=getGitRepoUrl(),_0xa733eb=_0x18d766['nDbQq'](getGitBranch);console['log']('\x0aCreating\x20feature\x20review...');const _0x209c63=await createFeature({'name':_0x30d8a0,'description':_0x36a4e5['description'],'checklist':_0x54f76e,'gitRepoUrl':_0x3efe9e,'gitBranch':_0xa733eb});await _0x18d766['vaWbr'](setActiveFeatureId,_0x209c63['id']),await tryStartCurrentSession(_0x209c63['id']);const _0x22ab9f=process[_0x26c2a6(0x264)][_0x26c2a6(0x205)];_0x22ab9f&&registerSession(_0x22ab9f,_0x209c63['id']),console[_0x26c2a6(0x20a)]('\x0a✅\x20Feature\x20review\x20created:\x20'+_0x209c63['id']),_0x18d766['kSCiW'](displayFeature,_0x209c63,_0x209c63[_0x26c2a6(0x265)]),console['log'](_0x26c2a6(0x1f5));}export async function featureList(_0x52f9ea){const _0x59b21e=_0x3da61c,_0x43b4ea={'qhrlz':function(_0x412816,_0x57ac17){return _0x412816(_0x57ac17);},'XAkAX':_0x59b21e(0x1f2),'uIXRZ':function(_0x289c68,_0x2a265e){return _0x289c68!==_0x2a265e;}},_0xcbdefb={'limit':_0x52f9ea[_0x59b21e(0x26f)]??0xa,'offset':_0x52f9ea['offset']??0x0,'includeDeleted':_0x52f9ea[_0x59b21e(0x1cd)]};_0x52f9ea['currentBranch']&&(_0xcbdefb['gitRepoUrl']=getGitRepoUrl(),_0xcbdefb[_0x59b21e(0x213)]=getGitBranch());const _0x4df761=await _0x43b4ea['qhrlz'](listFeatures,_0xcbdefb);if(_0x4df761['items']['length']===0x0){console['log'](_0x43b4ea['XAkAX']);return;}const _0x590a9e=_0x4df761['totalCount']>_0x4df761[_0x59b21e(0x1ec)]['length']?'Showing\x20'+_0x4df761[_0x59b21e(0x1ec)][_0x59b21e(0x1e2)]+_0x59b21e(0x1dc)+_0x4df761[_0x59b21e(0x1ab)]:_0x4df761['totalCount']+'\x20feature\x20review(s)\x20found';console[_0x59b21e(0x20a)]('\x0a'+_0x590a9e+':\x0a');for(const _0x35b0e1 of _0x4df761['items']){console['log'](''+_0x35b0e1['name']),console['log'](_0x59b21e(0x237)+_0x35b0e1['id']),_0x35b0e1['stats']&&console[_0x59b21e(0x20a)](_0x59b21e(0x207)+getProgressDisplay(_0x35b0e1[_0x59b21e(0x271)])),_0x35b0e1[_0x59b21e(0x213)]&&console['log']('\x20\x20\x20Branch:\x20'+_0x35b0e1[_0x59b21e(0x213)]),console[_0x59b21e(0x20a)]('\x20\x20\x20Created:\x20'+new Date(_0x35b0e1[_0x59b21e(0x266)])[_0x59b21e(0x238)]()),console['log']('');}const _0x1ba2f8=_0xcbdefb[_0x59b21e(0x26f)]??0xa,_0x5752cb=(_0xcbdefb[_0x59b21e(0x275)]??0x0)+_0x4df761[_0x59b21e(0x1ec)][_0x59b21e(0x1e2)];if(_0x5752cb<_0x4df761[_0x59b21e(0x1ab)]){const _0x19b9c4=_0x43b4ea['uIXRZ'](_0x1ba2f8,0xa)?'\x20--limit\x20'+_0x1ba2f8:'',_0x144786=_0x52f9ea['currentBranch']?_0x59b21e(0x239):'',_0x5461fe=_0x52f9ea[_0x59b21e(0x1cd)]?'\x20--include-deleted':'';console['log'](_0x59b21e(0x1c0)+_0x5752cb+_0x19b9c4+_0x144786+_0x5461fe);}}function _0xcb7e(_0x52d42c,_0x5d3a6b){_0x52d42c=_0x52d42c-0x1a7;const _0x47b223=_0x47b2();let _0xcb7e06=_0x47b223[_0x52d42c];return _0xcb7e06;}export async function featureShow(_0x1542ba){const _0x1cdbcd=_0x3da61c,_0x36ba52={'CpUvt':_0x1cdbcd(0x25d)},_0x5940eb=_0x1542ba||await getActiveFeatureId();if(!_0x5940eb)throw new Error(_0x36ba52['CpUvt']);const _0x4fcfa4=await getFeature(_0x5940eb);displayFeature(_0x4fcfa4,_0x4fcfa4['checklistItems']);}export async function featureResume(_0x43b4d2){const _0x526975=_0x3da61c,_0x486a62={'AVFuL':function(_0x24399d,_0x5423fd){return _0x24399d(_0x5423fd);},'gGiZb':function(_0x1ddcf8,_0x1dd322){return _0x1ddcf8(_0x1dd322);},'VQiwv':function(_0x49feea,_0x2afef,_0x3419f5){return _0x49feea(_0x2afef,_0x3419f5);},'ToVWH':'any','BaJSp':function(_0x1c0833,_0x188540){return _0x1c0833===_0x188540;},'CktzH':'Run:\x20ranger\x20create\x20\x22<name>\x22\x20to\x20create\x20a\x20new\x20feature\x20review','EIqRb':function(_0x463c29,_0x122784){return _0x463c29===_0x122784;},'QDblI':'\x0aNon-interactive\x20mode\x20detected.\x20Multiple\x20feature\x20reviews\x20found:','cfeNT':_0x526975(0x23f),'ZkGtr':'selected','TODzP':_0x526975(0x1ff),'pavec':function(_0x28e3d7,_0x55d668){return _0x28e3d7!==_0x55d668;},'xxWfZ':function(_0x68c398,_0xf0ee){return _0x68c398(_0xf0ee);},'QXIzJ':function(_0x1a37b3,_0x55724d,_0x297392){return _0x1a37b3(_0x55724d,_0x297392);}};if(_0x43b4d2){const _0x39297c=await _0x486a62['AVFuL'](getFeature,_0x43b4d2);await _0x486a62['gGiZb'](setActiveFeatureId,_0x39297c['id']);const _0x2a4bdf=getGitBranch();_0x2a4bdf&&_0x2a4bdf!==_0x39297c[_0x526975(0x213)]&&(await updateFeature(_0x39297c['id'],{'gitBranch':_0x2a4bdf}),console['log']('\x20\x20\x20Updated\x20branch\x20to:\x20'+_0x2a4bdf));console['log'](_0x526975(0x242)+_0x39297c[_0x526975(0x204)]+'\x20('+_0x39297c['id']+')'),await _0x486a62[_0x526975(0x1ef)](tryStartCurrentSession,_0x39297c['id']);const _0x4c61c1=process['env'][_0x526975(0x205)];_0x4c61c1&&_0x486a62['VQiwv'](registerSession,_0x4c61c1,_0x39297c['id']);displayFeature(_0x39297c,_0x39297c['checklistItems']),await _0x486a62['AVFuL'](printFeedbackNudge,_0x39297c['id']);return;}const _0x2a46e9=getGitRepoUrl(),_0x1f9a44=getGitBranch();if(!_0x2a46e9&&!_0x1f9a44)throw new Error('Not\x20in\x20a\x20git\x20repository.');console[_0x526975(0x20a)](_0x526975(0x1e8)+(_0x2a46e9||_0x526975(0x230))+_0x526975(0x1d1)+(_0x1f9a44||_0x486a62['ToVWH'])+'...');const _0x5c51b8=await listFeatures({'gitRepoUrl':_0x2a46e9,'gitBranch':_0x1f9a44}),_0x7df236=_0x5c51b8['items'][_0x526975(0x1d7)](_0x9a9a15=>_0x9a9a15['status']?_0x9a9a15['status']!==_0x526975(0x256):!_0x9a9a15[_0x526975(0x223)]);if(_0x486a62[_0x526975(0x1c9)](_0x7df236[_0x526975(0x1e2)],0x0)){console['log'](_0x526975(0x1fe)),console[_0x526975(0x20a)](_0x486a62['CktzH']);return;}let _0x4a72db;if(_0x486a62[_0x526975(0x1a9)](_0x7df236['length'],0x1))_0x4a72db=_0x7df236[0x0];else{const _0x4e1d86=process['stdin'][_0x526975(0x1ee)]&&process[_0x526975(0x1f9)][_0x526975(0x1ee)];if(!_0x4e1d86){console['log'](_0x486a62[_0x526975(0x24a)]);for(const _0x3c1282 of _0x7df236){console[_0x526975(0x20a)]('\x20\x20'+_0x3c1282['name']),console[_0x526975(0x20a)]('\x20\x20\x20\x20\x20ID:\x20'+_0x3c1282['id']),_0x3c1282[_0x526975(0x271)]&&console['log'](_0x526975(0x1fb)+_0x486a62[_0x526975(0x1ef)](getProgressDisplay,_0x3c1282['stats'])),_0x3c1282[_0x526975(0x213)]&&console[_0x526975(0x20a)]('\x20\x20\x20\x20\x20Branch:\x20'+_0x3c1282['gitBranch']);}throw new Error('Please\x20specify\x20the\x20feature\x20review\x20ID:\x20ranger\x20resume\x20<id>');}const {selected:_0xc2c073}=await _0xb771c4[_0x526975(0x22e)]([{'type':_0x486a62['cfeNT'],'name':_0x486a62[_0x526975(0x252)],'message':_0x486a62[_0x526975(0x243)],'choices':_0x7df236[_0x526975(0x277)](_0x5f253d=>({'name':_0x5f253d['name']+'\x20('+_0x5f253d['id']+')','value':_0x5f253d['id']}))}]);_0x4a72db=_0x7df236[_0x526975(0x21f)](_0x4878f9=>_0x4878f9['id']===_0xc2c073);}await _0x486a62['gGiZb'](setActiveFeatureId,_0x4a72db['id']);_0x1f9a44&&_0x486a62['pavec'](_0x1f9a44,_0x4a72db['gitBranch'])&&(await updateFeature(_0x4a72db['id'],{'gitBranch':_0x1f9a44}),console['log']('\x20\x20\x20Updated\x20branch\x20to:\x20'+_0x1f9a44));console['log']('\x0a✅\x20Resumed\x20feature\x20review:\x20'+_0x4a72db['name']+'\x20('+_0x4a72db['id']+')'),await _0x486a62[_0x526975(0x234)](tryStartCurrentSession,_0x4a72db['id']);const _0x488dde=await getFeature(_0x4a72db['id']),_0x28aeff=process[_0x526975(0x264)]['CLAUDE_SESSION_ID'];_0x28aeff&&_0x486a62[_0x526975(0x1c4)](registerSession,_0x28aeff,_0x488dde['id']),_0x486a62[_0x526975(0x23e)](displayFeature,_0x488dde,_0x488dde['checklistItems']),await printFeedbackNudge(_0x488dde['id']);}async function printFeedbackNudge(_0x3c3715){const _0x57d48f=_0x3da61c,_0x4f508e={'mCbaW':function(_0x591d56,_0x133e22,_0x5a2497){return _0x591d56(_0x133e22,_0x5a2497);}};try{const {items:_0x5190b1}=await getActionItems(_0x3c3715);let _0x25da1c=0x0,_0x2c3bde=0x0;for(const _0x82fb96 of _0x5190b1){const _0x468d4e=await _0x4f508e['mCbaW'](getItemFeedback,_0x3c3715,_0x82fb96['id']);_0x468d4e[_0x57d48f(0x1bb)][_0x57d48f(0x1e2)]>0x0&&(_0x25da1c+=_0x468d4e['unaddressedComments'][_0x57d48f(0x1e2)],_0x2c3bde++);}_0x25da1c>0x0&&(console['log'](_0x57d48f(0x249)+_0x25da1c+'\x20unaddressed\x20reviewer\x20comment(s)\x20across\x20'+_0x2c3bde+'\x20scenario(s).'),console[_0x57d48f(0x20a)](_0x57d48f(0x261)));}catch{}}async function tryStartCurrentSession(_0x3e9259){const _0x1aa7de=_0x3da61c,_0x54b106={'NUGGv':function(_0x4cc3ed,_0x25279a,_0x40cae7){return _0x4cc3ed(_0x25279a,_0x40cae7);}};try{const {sessions:_0x5a2f09}=await listFeatureSessions(_0x3e9259),_0xe5dfd6=_0x5a2f09[_0x1aa7de(0x21f)](_0x2b868d=>_0x2b868d[_0x1aa7de(0x25e)]==='ready');_0xe5dfd6&&(await _0x54b106['NUGGv'](startSession,_0x3e9259,_0xe5dfd6['id']),console['log']('\x20\x20\x20▶️\x20Started\x20session\x20'+_0xe5dfd6['iteration']));}catch{}}export async function featureReport(_0x14b3a6,_0x2c6903){const _0x17302b=_0x3da61c,_0x1e14ae={'NUdJK':_0x17302b(0x273),'avKwa':function(_0x167167,_0x55b619,_0x287a68,_0x17a3ff){return _0x167167(_0x55b619,_0x287a68,_0x17a3ff);},'QqCcz':function(_0x2e9f0a){return _0x2e9f0a();},'VVjfG':function(_0x1271a3,_0x8be13f,_0x355283){return _0x1271a3(_0x8be13f,_0x355283);},'hkrSj':function(_0x236121,_0x54151a,_0x383385){return _0x236121(_0x54151a,_0x383385);},'jGkjA':'utf-8'},_0x551f80=_0x14b3a6||await getActiveFeatureId();if(!_0x551f80)throw new Error(_0x17302b(0x20b));console[_0x17302b(0x20a)](_0x1e14ae[_0x17302b(0x247)]);const _0x6c7139=await getFeatureReportMarkdown(_0x551f80,{'style':_0x2c6903[_0x17302b(0x276)]}),_0x346784=_0x2c6903['output']||_0x1e14ae[_0x17302b(0x21d)](join,_0x1e14ae[_0x17302b(0x1b8)](getRangerDir),'reports',_0x551f80+'.md'),_0x49bcf7=_0x1e14ae['VVjfG'](join,_0x346784,'..');!existsSync(_0x49bcf7)&&await _0x1e14ae['hkrSj'](mkdir,_0x49bcf7,{'recursive':!![]}),await writeFile(_0x346784,_0x6c7139,_0x1e14ae[_0x17302b(0x250)]),console[_0x17302b(0x20a)](_0x17302b(0x227)+_0x346784);}function getScenarioResult(_0x3068dd){const _0x53e256=_0x3da61c,_0x14d4a7={'UAPje':'closed','STuyz':'in_progress'};if(_0x3068dd[_0x53e256(0x25e)]===_0x14d4a7[_0x53e256(0x1c1)])return _0x3068dd[_0x53e256(0x1e6)]??'closed';if(_0x3068dd['status']==='verification_in_progress')return _0x14d4a7[_0x53e256(0x1d9)];return _0x3068dd[_0x53e256(0x25e)];}function getScenarioRationale(_0xadc25e,_0x28b095){const _0x4309e1=_0x3da61c;if(_0x28b095)return _0x28b095;if(_0xadc25e['blockedReason'])return _0xadc25e['blockedReason'];if(_0xadc25e['incompleteReason'])return _0xadc25e[_0x4309e1(0x241)];if(_0xadc25e[_0x4309e1(0x1f1)])return _0xadc25e[_0x4309e1(0x1f1)];if(_0xadc25e[_0x4309e1(0x26a)])return _0xadc25e['notes'];return null;}export async function featureReportPrDescription(_0x16497b,_0x1dc509){const _0x27c9fc=_0x3da61c,_0x528299={'OsJME':function(_0x16f3d2,_0x24fe8){return _0x16f3d2(_0x24fe8);},'JkXhy':'\x0a❌\x20No\x20scenarios\x20found\x20to\x20include.','wHczx':function(_0x6dd8ad,_0x3eb06a){return _0x6dd8ad>_0x3eb06a;},'Tdemy':_0x27c9fc(0x1ad),'JbdUP':function(_0x1ccc42,_0x8eb3b6){return _0x1ccc42<_0x8eb3b6;},'oahov':function(_0x1aaba9,_0x27a42b){return _0x1aaba9+_0x27a42b;}},_0x1d0656=_0x16497b||await getActiveFeatureId();if(!_0x1d0656)throw new Error(_0x27c9fc(0x20b));const _0x4dc75d=await _0x528299['OsJME'](getFeature,_0x1d0656),_0xd747c1=_0x4dc75d[_0x27c9fc(0x265)]||[],_0x180fd4=getCurrentSessionItems(_0x4dc75d,_0xd747c1);_0x180fd4['length']===0x0&&(console[_0x27c9fc(0x26c)](_0x528299[_0x27c9fc(0x1be)]),process[_0x27c9fc(0x1f6)](0x1));const _0x58548d=_0x1dc509['excludeScenarios']??[],_0x21cec5=_0x58548d['filter'](_0x478726=>!Number[_0x27c9fc(0x236)](_0x478726)||_0x478726<0x1||_0x478726>_0x180fd4[_0x27c9fc(0x1e2)]);if(_0x528299['wHczx'](_0x21cec5['length'],0x0)){console['error']('\x0a❌\x20Invalid\x20scenario\x20number(s):\x20'+_0x21cec5['join'](',\x20')),console[_0x27c9fc(0x20a)](_0x528299['Tdemy']);for(let _0x41c989=0x0;_0x528299['JbdUP'](_0x41c989,_0x180fd4[_0x27c9fc(0x1e2)]);_0x41c989++){console['log']('\x20\x20'+_0x528299['oahov'](_0x41c989,0x1)+'.\x20'+_0x180fd4[_0x41c989]['description']);}process['exit'](0x1);}const _0x251a48=new Set(_0x58548d['map'](_0x1f6da8=>_0x1f6da8-0x1)),_0x41c37b=_0x180fd4['filter']((_0x58cc19,_0x4df4d8)=>!_0x251a48[_0x27c9fc(0x269)](_0x4df4d8));_0x41c37b[_0x27c9fc(0x1e2)]===0x0&&(console['error'](_0x27c9fc(0x1dd)),process['exit'](0x1));if(_0x1dc509[_0x27c9fc(0x23c)])await outputJsonReport(_0x1d0656,_0x4dc75d,_0x41c37b);else{const _0x4e6a42=await getFeatureReportMarkdown(_0x1d0656,{'itemIds':_0x41c37b['map'](_0x159b0c=>_0x159b0c['id'])});process[_0x27c9fc(0x1f9)]['write'](_0x4e6a42['trimEnd']()+'\x0a');}}async function outputJsonReport(_0x594b59,_0x2ea75b,_0x5e8045){const _0x13f646=_0x3da61c,_0x1f7c1d={'gUrLQ':function(_0x1d485e,_0x5c77e1){return _0x1d485e>_0x5c77e1;},'HtGpd':function(_0x497c4f,_0x21ee18){return _0x497c4f(_0x21ee18);}},_0x409e77=getApiBaseUrl(),_0xa108b2=await getFeatureReport(_0x594b59),_0x4ee069=new Map(_0xa108b2['checklistItems']['map'](_0x4a2566=>[_0x4a2566['id'],_0x4a2566])),_0x27ac40=await Promise[_0x13f646(0x206)](_0x5e8045['map'](async _0x23386c=>{const _0xc02e8b=_0x13f646,_0x4de697=_0x4ee069['get'](_0x23386c['id']),_0x460e5a=_0x4de697?.['linkedSession']??null;let _0x501bcb=[];if(_0x23386c[_0xc02e8b(0x27b)])try{const {steps:_0x1928f3}=await getBrowserSessionSteps(_0x23386c[_0xc02e8b(0x27b)]);_0x1f7c1d[_0xc02e8b(0x1d5)](_0x1928f3['length'],0x0)&&(_0x501bcb=_0x1928f3[_0xc02e8b(0x277)](_0x5832dd=>{const _0x3f5428=_0xc02e8b,_0x2e0f9c=_0x5832dd['assets']['find'](_0x4bba5e=>_0x4bba5e[_0x3f5428(0x1ce)]==='screenshot'&&_0x4bba5e[_0x3f5428(0x216)]===_0x3f5428(0x246))??_0x5832dd[_0x3f5428(0x267)][_0x3f5428(0x21f)](_0x26c198=>_0x26c198[_0x3f5428(0x1ce)]==='screenshot');let _0x289e23=null,_0x4b0492=null;if(_0x2e0f9c){const _0x14719f=_0x2e0f9c['storage']['location'][_0x3f5428(0x1aa)]('/')['pop']();_0x289e23=_0x409e77+_0x3f5428(0x229)+_0x23386c['browserSessionId']+_0x3f5428(0x1b2)+_0x14719f,_0x14719f&&(_0x4b0492=_0x14719f['replace'](/\.\w+$/,'')['replace'](/^(key_)?\d+_/,'')[_0x3f5428(0x26d)](/[-_]/g,'\x20'));}return{'description':_0x4b0492||_0x5832dd['description']||_0x5832dd[_0x3f5428(0x1de)]||'Step\x20'+_0x5832dd[_0x3f5428(0x203)],'screenshot':_0x289e23,'is_key_step':_0x5832dd[_0x3f5428(0x1c6)]};}));}catch{}return _0x501bcb[_0xc02e8b(0x1e2)]===0x0&&_0x460e5a?.[_0xc02e8b(0x1d0)]&&(_0x501bcb=_0x460e5a[_0xc02e8b(0x1d0)]['map']((_0x2dc032,_0x494cbc)=>({'description':'Screenshot\x20'+(_0x494cbc+0x1),'screenshot':_0x2dc032,'is_key_step':![]}))),{'description':_0x23386c['description'],'result':_0x1f7c1d[_0xc02e8b(0x208)](getScenarioResult,_0x23386c),'rationale':getScenarioRationale(_0x23386c,_0x460e5a?.[_0xc02e8b(0x211)]),'steps':_0x501bcb};})),_0x4b52a9={'url':_0x2ea75b[_0x13f646(0x1fc)],'scenarios':_0x27ac40};process[_0x13f646(0x1f9)]['write'](JSON[_0x13f646(0x233)](_0x4b52a9,null,0x2)+'\x0a');}export async function featureConcludeSession(_0x2c06e3){const _0x40a1e2=_0x3da61c,_0x4901e0={'KivSp':function(_0x290dba){return _0x290dba();},'GapOz':'No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','PYGZU':function(_0x4fb59e,_0xe84871){return _0x4fb59e(_0xe84871);},'XSBUr':_0x40a1e2(0x259),'GaTjZ':_0x40a1e2(0x1fa),'NVIao':_0x40a1e2(0x221),'vQYfZ':function(_0x5ac015,_0x503f14){return _0x5ac015!==_0x503f14;},'UWuhn':'in_progress','FKmKV':_0x40a1e2(0x21e)},_0x417b2e=_0x2c06e3||await _0x4901e0['KivSp'](getActiveFeatureId);if(!_0x417b2e)throw new Error(_0x4901e0['GapOz']);const _0x16bb80=await _0x4901e0[_0x40a1e2(0x260)](getFeature,_0x417b2e);if(!_0x16bb80[_0x40a1e2(0x1ba)])throw new Error(_0x4901e0[_0x40a1e2(0x244)]);const {sessions:_0x34caa7}=await listFeatureSessions(_0x417b2e),_0x5c7caa=_0x34caa7['find'](_0x404935=>_0x404935['id']===_0x16bb80[_0x40a1e2(0x1ba)]);if(!_0x5c7caa)throw new Error(_0x40a1e2(0x27c));if(_0x5c7caa[_0x40a1e2(0x25e)]===_0x4901e0['GaTjZ']){console['log'](_0x4901e0['NVIao']);return;}if(_0x4901e0[_0x40a1e2(0x1c7)](_0x5c7caa[_0x40a1e2(0x25e)],_0x4901e0[_0x40a1e2(0x24c)]))throw new Error(_0x40a1e2(0x1b9)+_0x5c7caa['status']);console['log'](_0x4901e0['FKmKV']),await concludeSession(_0x417b2e,_0x16bb80[_0x40a1e2(0x1ba)]),console[_0x40a1e2(0x20a)](_0x40a1e2(0x232)+_0x5c7caa[_0x40a1e2(0x1e0)]+_0x40a1e2(0x20f)),console[_0x40a1e2(0x20a)]('\x20\x20\x20The\x20feature\x20review\x20is\x20now\x20ready\x20for\x20human\x20review\x20on\x20the\x20Ranger\x20dashboard.');}export async function featureSessions(_0x5844bd){const _0x3f2b4a=_0x3da61c,_0x610b31={'hEdDD':'No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','sOcDe':function(_0x40ed42,_0x4c315f){return _0x40ed42(_0x4c315f);},'XjVHs':_0x3f2b4a(0x1b4),'EGWKl':function(_0x30c805,_0x5429df){return _0x30c805===_0x5429df;}},_0x37d3b6=_0x5844bd||await getActiveFeatureId();if(!_0x37d3b6)throw new Error(_0x610b31['hEdDD']);const _0x22348c=await _0x610b31[_0x3f2b4a(0x1e4)](getFeature,_0x37d3b6);console['log']('\x0a📁\x20Sessions\x20for\x20feature\x20review:\x20'+_0x22348c[_0x3f2b4a(0x204)]+'\x0a');const {sessions:_0x25a188}=await listFeatureSessions(_0x37d3b6);if(_0x25a188['length']===0x0){console['log'](_0x610b31['XjVHs']);return;}for(const _0x20848e of _0x25a188){const _0x506abf=_0x610b31[_0x3f2b4a(0x1b0)](_0x20848e['status'],'completed')?'✅':_0x610b31['EGWKl'](_0x20848e['status'],'in_progress')?'🔄':'▶️';console[_0x3f2b4a(0x20a)](_0x506abf+'\x20Session\x20'+_0x20848e['iteration']+'\x20('+_0x20848e['id']+')'),console['log']('\x20\x20\x20Status:\x20'+_0x20848e[_0x3f2b4a(0x25e)]),console['log']('\x20\x20\x20Created:\x20'+new Date(_0x20848e[_0x3f2b4a(0x266)])[_0x3f2b4a(0x200)]()),_0x20848e['completedAt']&&console[_0x3f2b4a(0x20a)](_0x3f2b4a(0x210)+new Date(_0x20848e[_0x3f2b4a(0x223)])[_0x3f2b4a(0x200)]()),console['log']('');}}export async function featureAddScenario(_0x2d9f1e,_0xc80f47){const _0x276f35=_0x3da61c,_0x38ab70={'vXACl':function(_0x22d4aa){return _0x22d4aa();},'RIiZE':function(_0x3459ce,_0x6cf14a,_0x5f5565){return _0x3459ce(_0x6cf14a,_0x5f5565);}},_0x504c8a=_0xc80f47||await _0x38ab70['vXACl'](getActiveFeatureId);if(!_0x504c8a)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 _0x50875a=await getFeature(_0x504c8a);if(_0x50875a['latestReview']&&!_0x50875a[_0x276f35(0x248)][_0x276f35(0x27a)])throw new Error(_0x276f35(0x1c5)+_0x50875a[_0x276f35(0x1fc)]);await createChecklistItem(_0x504c8a,_0x2d9f1e);const _0x19e1e7=await getFeature(_0x504c8a);console['log']('\x0a✅\x20Scenario\x20added'),_0x38ab70['RIiZE'](displayFeature,_0x19e1e7,_0x19e1e7[_0x276f35(0x265)]);}export async function featureEditScenario(_0x277efb,_0x40a964){const _0x42745a=_0x3da61c,_0x57feba={'EYiEn':function(_0x42fb70){return _0x42fb70();},'BkarQ':_0x42745a(0x20c),'noanm':function(_0x3bf293,_0x445a8a){return _0x3bf293(_0x445a8a);},'GCurx':_0x42745a(0x278),'htqlS':'\x0a❌\x20No\x20scenarios\x20found\x20to\x20edit.','QkVGQ':'\x0a❌\x20No\x20scenario\x20number\x20provided.\x20Use\x20--scenario\x20<number>.','pZaDo':_0x42745a(0x1ad),'jbpzG':function(_0x69dbfa,_0x2bb2e6){return _0x69dbfa<_0x2bb2e6;},'DvVGB':function(_0x2d83ea,_0x46bfbc){return _0x2d83ea-_0x46bfbc;},'BGHzS':function(_0x2c35f4,_0x498375){return _0x2c35f4>=_0x498375;},'HQiWm':function(_0x9326,_0x4ff720){return _0x9326<_0x4ff720;},'zIfst':function(_0x5ef909,_0x2ecc41,_0x34af80){return _0x5ef909(_0x2ecc41,_0x34af80);}},_0x108c8b=_0x40a964['id']||await _0x57feba[_0x42745a(0x268)](getActiveFeatureId);!_0x108c8b&&(console[_0x42745a(0x26c)](_0x57feba[_0x42745a(0x263)]),console['error'](_0x42745a(0x1c2)),process[_0x42745a(0x1f6)](0x1));const _0x3f1cdd=await _0x57feba['noanm'](getFeature,_0x108c8b);_0x3f1cdd['latestReview']&&!_0x3f1cdd['latestReview'][_0x42745a(0x27a)]&&(console[_0x42745a(0x26c)](_0x42745a(0x235)),console[_0x42745a(0x26c)](_0x57feba['GCurx']),console[_0x42745a(0x26c)]('\x20\x20'+_0x3f1cdd['dashboardUrl']),process[_0x42745a(0x1f6)](0x1));const _0x4baaf3=_0x3f1cdd['checklistItems']||[];_0x4baaf3['length']===0x0&&(console[_0x42745a(0x26c)](_0x57feba['htqlS']),process[_0x42745a(0x1f6)](0x1));if(_0x40a964[_0x42745a(0x1db)]===undefined){console['error'](_0x57feba[_0x42745a(0x22f)]),console['log'](_0x57feba[_0x42745a(0x1cc)]);for(let _0x433255=0x0;_0x57feba[_0x42745a(0x1bf)](_0x433255,_0x4baaf3['length']);_0x433255++){console[_0x42745a(0x20a)]('\x20\x20'+(_0x433255+0x1)+'.\x20'+_0x4baaf3[_0x433255][_0x42745a(0x209)]);}process[_0x42745a(0x1f6)](0x1);}const _0x42f964=_0x57feba[_0x42745a(0x1b7)](_0x40a964['scenario'],0x1);if(_0x57feba[_0x42745a(0x1bf)](_0x42f964,0x0)||_0x57feba['BGHzS'](_0x42f964,_0x4baaf3[_0x42745a(0x1e2)])){console[_0x42745a(0x26c)]('\x0a❌\x20Invalid\x20scenario\x20index:\x20'+_0x40a964['scenario']+'.\x20Feature\x20review\x20has\x20'+_0x4baaf3[_0x42745a(0x1e2)]+_0x42745a(0x23d)),console[_0x42745a(0x20a)]('\x0aAvailable\x20scenarios:');for(let _0x16fd93=0x0;_0x57feba[_0x42745a(0x26e)](_0x16fd93,_0x4baaf3['length']);_0x16fd93++){console[_0x42745a(0x20a)]('\x20\x20'+(_0x16fd93+0x1)+'.\x20'+_0x4baaf3[_0x16fd93][_0x42745a(0x209)]);}process['exit'](0x1);}const _0x2baf36=_0x4baaf3[_0x42f964];await updateChecklistItem(_0x108c8b,_0x2baf36['id'],{'description':_0x277efb});const _0x31e990=await getFeature(_0x108c8b);console[_0x42745a(0x20a)](_0x42745a(0x1eb)),_0x57feba['zIfst'](displayFeature,_0x31e990,_0x31e990['checklistItems']);}async function downloadFeedbackImage(_0x14749b,_0x489a15){const _0x4ed86e=_0x3da61c,_0x5e21bd={'FYNDn':function(_0x3ceeb9){return _0x3ceeb9();},'pbMZi':_0x4ed86e(0x1da),'fjkFN':function(_0x5cdb9b,_0x32dae0,_0x10598d){return _0x5cdb9b(_0x32dae0,_0x10598d);},'xHCAp':function(_0x5f2e9e,_0x13c645){return _0x5f2e9e(_0x13c645);}};try{const _0x30d5f7=join(_0x5e21bd['FYNDn'](getRangerDir),_0x5e21bd['pbMZi']);await mkdir(_0x30d5f7,{'recursive':!![]});const _0x3cee72=_0x5e21bd['fjkFN'](join,_0x30d5f7,_0x4ed86e(0x22c)+_0x489a15+_0x4ed86e(0x258)),_0x5474c7=await _0x5e21bd['xHCAp'](fetch,_0x14749b);if(!_0x5474c7['ok'])return null;const _0x319534=Buffer['from'](await _0x5474c7[_0x4ed86e(0x274)]());return await writeFile(_0x3cee72,_0x319534),_0x3cee72;}catch{return null;}}export async function featureGetReview(_0x117bd7){const _0x3e3a39=_0x3da61c,_0x491fdb={'aBZuJ':function(_0x48d627){return _0x48d627();},'aHRnE':'No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','JGFyP':function(_0x11e888,_0xd1c835){return _0x11e888===_0xd1c835;},'wXHyn':'No\x20scenarios\x20found.','ZKWNy':function(_0x3cdad6,_0x3f6503){return _0x3cdad6>_0x3f6503;},'jzKDl':function(_0x5e0ea9,_0x481659,_0xe812e1){return _0x5e0ea9(_0x481659,_0xe812e1);},'ytviH':'short','JHdYz':'numeric','BJEXi':_0x3e3a39(0x1e3),'cAaxi':_0x3e3a39(0x1fd),'WIGGc':'point','TpsFa':function(_0x49e082,_0x359293){return _0x49e082+_0x359293;}},_0x3b16ef=_0x117bd7||await _0x491fdb[_0x3e3a39(0x22a)](getActiveFeatureId);if(!_0x3b16ef)throw new Error(_0x491fdb[_0x3e3a39(0x1ed)]);const _0x4d4537=await getFeature(_0x3b16ef),{items:_0x395dfa}=await getActionItems(_0x3b16ef);console['log'](_0x3e3a39(0x212)+_0x4d4537['name']+'\x20('+_0x4d4537['id']+')\x0a');if(_0x491fdb[_0x3e3a39(0x1e5)](_0x395dfa['length'],0x0)){console['log'](_0x491fdb[_0x3e3a39(0x270)]);return;}for(let _0xd42734=0x0;_0xd42734<_0x395dfa['length'];_0xd42734++){const _0x8721a7=_0x395dfa[_0xd42734],_0x51598d=_0x491fdb[_0x3e3a39(0x254)](_0x8721a7[_0x3e3a39(0x251)],0x1)?'\x20(v'+_0x8721a7[_0x3e3a39(0x251)]+')':'',_0x24a702=await _0x491fdb[_0x3e3a39(0x279)](getItemFeedback,_0x3b16ef,_0x8721a7['id']);if(_0x24a702['unaddressedComments']['length']>0x0){console[_0x3e3a39(0x20a)](_0x3e3a39(0x272)+(_0xd42734+0x1)+':\x20\x22'+_0x8721a7[_0x3e3a39(0x209)]+'\x22'+_0x51598d+'\x20—\x20'+_0x24a702[_0x3e3a39(0x1bb)][_0x3e3a39(0x1e2)]+_0x3e3a39(0x1ac));for(const _0x17b2ac of _0x24a702['unaddressedComments']){const _0x470afb=new Date(_0x17b2ac[_0x3e3a39(0x266)])[_0x3e3a39(0x238)](_0x3e3a39(0x1b1),{'month':_0x491fdb['ytviH'],'day':_0x491fdb['JHdYz']}),_0x1a5ce8=_0x17b2ac[_0x3e3a39(0x1bd)]||_0x17b2ac[_0x3e3a39(0x240)]||'Unknown';console['log'](_0x3e3a39(0x1c8)+_0x1a5ce8+'\x20('+_0x470afb+'):\x20\x22'+_0x17b2ac['content']+'\x22');if(_0x17b2ac[_0x3e3a39(0x24b)]){const _0x2f5be0=await _0x491fdb['jzKDl'](downloadFeedbackImage,_0x17b2ac[_0x3e3a39(0x24b)],_0x17b2ac['id']);_0x2f5be0&&console[_0x3e3a39(0x20a)](_0x3e3a39(0x262)+_0x2f5be0);}if(_0x17b2ac[_0x3e3a39(0x24d)]){const _0x38de3f=_0x17b2ac[_0x3e3a39(0x24d)]['selector']['split'](_0x491fdb[_0x3e3a39(0x25c)])[_0x3e3a39(0x1cf)]()?.['split'](':')[0x0]||_0x491fdb['cAaxi'],_0x223973=_0x17b2ac['domRef'][_0x3e3a39(0x220)]?'\x20\x22'+_0x17b2ac[_0x3e3a39(0x24d)]['textContent']['slice'](0x0,0x3c)+'\x22':'';console[_0x3e3a39(0x20a)](_0x3e3a39(0x1f8)+_0x38de3f+'>'+_0x223973),console['log'](_0x3e3a39(0x253)+_0x17b2ac['domRef']['selector']);}else{if(_0x17b2ac[_0x3e3a39(0x1f4)]){const _0x51db69=_0x17b2ac[_0x3e3a39(0x1f4)]['coordinates'];_0x17b2ac['spatial'][_0x3e3a39(0x1a8)]===_0x491fdb[_0x3e3a39(0x245)]&&_0x51db69['length']>=0x2?console[_0x3e3a39(0x20a)]('\x20\x20\x20\x20\x20📍\x20Annotation:\x20point\x20at\x20('+_0x51db69[0x0]['toFixed'](0x2)+',\x20'+_0x51db69[0x1][_0x3e3a39(0x1ca)](0x2)+')'):console[_0x3e3a39(0x20a)]('\x20\x20\x20\x20\x20📍\x20Annotation:\x20'+_0x17b2ac['spatial'][_0x3e3a39(0x1a8)]+_0x3e3a39(0x224)+_0x51db69[_0x3e3a39(0x277)](_0x46c0a9=>_0x46c0a9[_0x3e3a39(0x1ca)](0x2))['join'](',\x20')+']');}}}if(_0x24a702['canonicalFlow']){console['log']('\x20\x20Expected\x20flow:');for(const _0x3225e3 of _0x24a702[_0x3e3a39(0x27d)]['split']('\x0a')){console[_0x3e3a39(0x20a)](_0x3e3a39(0x222)+_0x3225e3);}}}else console['log'](_0x3e3a39(0x272)+_0x491fdb['TpsFa'](_0xd42734,0x1)+':\x20\x22'+_0x8721a7['description']+'\x22'+_0x51598d+'\x20—\x20no\x20comments'),console['log']('\x20\x20✅\x20No\x20feedback\x20to\x20address');console['log']('');}}export async function featureDelete(_0x5620b5){const _0x22f5e7=_0x3da61c,_0x142290={'ypOHW':function(_0x336849,_0xf076ca){return _0x336849(_0xf076ca);},'KYJPg':'\x20\x20\x20To\x20restore\x20it,\x20run:\x20ranger\x20restore\x20'},_0x1b8b65=_0x5620b5||await getActiveFeatureId();if(!_0x1b8b65)throw new Error(_0x22f5e7(0x25d));const _0x3e6ddf=await getFeature(_0x1b8b65);await _0x142290[_0x22f5e7(0x217)](softDeleteFeature,_0x1b8b65),console['log']('\x0a🗑️\x20\x20Deleted\x20feature\x20review:\x20'+_0x3e6ddf['name']+'\x20('+_0x1b8b65+')'),console[_0x22f5e7(0x20a)](_0x142290['KYJPg']+_0x1b8b65);}export async function featureRestore(_0x1544b1){const _0x300a2b=_0x3da61c,_0x46d9fa={'zmKzS':function(_0x2ce786,_0x3c0c47){return _0x2ce786(_0x3c0c47);},'XgIZe':function(_0x14e689,_0x1112a0,_0x4c0b27){return _0x14e689(_0x1112a0,_0x4c0b27);}};await _0x46d9fa[_0x300a2b(0x24f)](restoreFeature,_0x1544b1);const _0x5f76bb=await getFeature(_0x1544b1);console[_0x300a2b(0x20a)]('\x0a✅\x20Restored\x20feature\x20review:\x20'+_0x5f76bb['name']+'\x20('+_0x1544b1+')'),_0x46d9fa['XgIZe'](displayFeature,_0x5f76bb,_0x5f76bb[_0x300a2b(0x265)]);}
@@ -1 +1 @@
1
- (function(_0x1a8278,_0xc37b34){const _0x9ef686=_0x33a6,_0x5970ba=_0x1a8278();while(!![]){try{const _0x132257=-parseInt(_0x9ef686(0x118))/0x1+parseInt(_0x9ef686(0x116))/0x2*(-parseInt(_0x9ef686(0x119))/0x3)+-parseInt(_0x9ef686(0x114))/0x4+parseInt(_0x9ef686(0x113))/0x5*(-parseInt(_0x9ef686(0x117))/0x6)+parseInt(_0x9ef686(0x11b))/0x7*(parseInt(_0x9ef686(0x110))/0x8)+parseInt(_0x9ef686(0x11a))/0x9+parseInt(_0x9ef686(0x112))/0xa;if(_0x132257===_0xc37b34)break;else _0x5970ba['push'](_0x5970ba['shift']());}catch(_0x324ecf){_0x5970ba['push'](_0x5970ba['shift']());}}}(_0x5742,0x271c1));import{sessionStart,sessionEnd,preCompact,postEdit,planStart,planReminder,exitPlanMode,stopHook,enable,disable,autoPrompt}from'./hooks/index.js';const HOOKS={'session-start':sessionStart,'session-end':sessionEnd,'pre-compact':preCompact,'post-edit':postEdit,'plan-start':planStart,'plan-reminder':planReminder,'exit-plan-mode':exitPlanMode,'stop':stopHook,'enable':enable,'disable':disable,'auto-prompt':autoPrompt};function _0x33a6(_0x577aef,_0x360742){_0x577aef=_0x577aef-0x10e;const _0x57422c=_0x5742();let _0x33a6f8=_0x57422c[_0x577aef];return _0x33a6f8;}let cancellationHandlersInstalled=![];function installCancellationHandlers(){const _0x26b25a=_0x33a6,_0x49fe9e={'TMkei':_0x26b25a(0x10e),'FkiJd':'SIGHUP'};if(cancellationHandlersInstalled)return;const _0x1f0247=()=>{const _0x3ca1ba=_0x26b25a;process[_0x3ca1ba(0x111)](0x0);};process['once'](_0x26b25a(0x115),_0x1f0247),process[_0x26b25a(0x11c)](_0x49fe9e['TMkei'],_0x1f0247),process[_0x26b25a(0x11c)](_0x49fe9e['FkiJd'],_0x1f0247),cancellationHandlersInstalled=!![];}function _0x5742(){const _0x3da40e=['2699450grspON','4670jlXyBf','510988vNlUwk','SIGINT','169734JQazPs','222SJoviX','265938wjsaBJ','6JGhCza','1701513xBZApY','224kKafzb','once','error','Valid\x20hooks:\x20','SIGTERM','keys','74792hdxYHv','exit'];_0x5742=function(){return _0x3da40e;};return _0x5742();}export async function hook(_0x4cad5d,_0x15fb77){const _0xa9e2e=_0x33a6;installCancellationHandlers();const _0x7b7d06=HOOKS[_0x4cad5d];if(!_0x7b7d06){const _0x1ac4eb=Object[_0xa9e2e(0x10f)](HOOKS)['join'](',\x20');console[_0xa9e2e(0x11d)]('Unknown\x20hook:\x20'+_0x4cad5d),console['error'](_0xa9e2e(0x11e)+_0x1ac4eb),process[_0xa9e2e(0x111)](0x1);}await _0x7b7d06(_0x15fb77);}
1
+ function _0x654a(_0x429f7a,_0x33ea4c){_0x429f7a=_0x429f7a-0x1c7;const _0x353b65=_0x353b();let _0x654abf=_0x353b65[_0x429f7a];return _0x654abf;}(function(_0x3253d9,_0x100fd8){const _0x4a7748=_0x654a,_0x36db2b=_0x3253d9();while(!![]){try{const _0x18d50a=-parseInt(_0x4a7748(0x1cc))/0x1+parseInt(_0x4a7748(0x1d4))/0x2+parseInt(_0x4a7748(0x1d2))/0x3*(parseInt(_0x4a7748(0x1cf))/0x4)+-parseInt(_0x4a7748(0x1ca))/0x5+parseInt(_0x4a7748(0x1c7))/0x6+-parseInt(_0x4a7748(0x1d0))/0x7+parseInt(_0x4a7748(0x1ce))/0x8;if(_0x18d50a===_0x100fd8)break;else _0x36db2b['push'](_0x36db2b['shift']());}catch(_0x1d66b5){_0x36db2b['push'](_0x36db2b['shift']());}}}(_0x353b,0x3de8c));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 _0x49873b=_0x654a,_0x153ac7={'AywuD':'SIGINT','CkfLd':_0x49873b(0x1c9)};if(cancellationHandlersInstalled)return;const _0x575979=()=>{const _0x53679f=_0x49873b;process[_0x53679f(0x1c8)](0x0);};process['once'](_0x153ac7[_0x49873b(0x1d6)],_0x575979),process['once']('SIGTERM',_0x575979),process['once'](_0x153ac7[_0x49873b(0x1d1)],_0x575979),cancellationHandlersInstalled=!![];}function _0x353b(){const _0x145ca5=['3834368QYJOpV','882524IJYlMh','2053408oXuebo','CkfLd','6CHxtGw','Valid\x20hooks:\x20','286050TIMyHZ','join','AywuD','619962nDQBpw','exit','SIGHUP','741400gAwwvu','error','471706pXxqQo','SDOOr'];_0x353b=function(){return _0x145ca5;};return _0x353b();}export async function hook(_0x31458d,_0x5b303f){const _0x4a1615=_0x654a,_0x1244eb={'SDOOr':function(_0x284bc4){return _0x284bc4();}};_0x1244eb[_0x4a1615(0x1cd)](installCancellationHandlers);const _0x2e262e=HOOKS[_0x31458d];if(!_0x2e262e){const _0x4bc023=Object['keys'](HOOKS)[_0x4a1615(0x1d5)](',\x20');console[_0x4a1615(0x1cb)]('Unknown\x20hook:\x20'+_0x31458d),console[_0x4a1615(0x1cb)](_0x4a1615(0x1d3)+_0x4bc023),process['exit'](0x1);}await _0x2e262e(_0x5b303f);}