@ranger-testing/ranger-cli 2.5.4-alpha.36a12ca-10 → 2.5.4-alpha.57338f5-12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/build/cli.js +1 -1
  2. package/build/commands/addEnv.js +1 -1
  3. package/build/commands/authEncrypt.js +1 -1
  4. package/build/commands/clean.js +1 -1
  5. package/build/commands/config.js +1 -1
  6. package/build/commands/env.js +1 -1
  7. package/build/commands/feature.js +1 -1
  8. package/build/commands/hook.js +1 -1
  9. package/build/commands/hooks/autoPrompt.js +1 -1
  10. package/build/commands/hooks/disable.js +1 -1
  11. package/build/commands/hooks/enable.js +1 -1
  12. package/build/commands/hooks/exitPlanMode.js +1 -1
  13. package/build/commands/hooks/index.js +1 -1
  14. package/build/commands/hooks/output.js +1 -1
  15. package/build/commands/hooks/planReminder.js +1 -1
  16. package/build/commands/hooks/planStart.js +1 -1
  17. package/build/commands/hooks/postEdit.js +1 -1
  18. package/build/commands/hooks/preCompact.js +1 -1
  19. package/build/commands/hooks/sessionEnd.js +1 -1
  20. package/build/commands/hooks/sessionStart.js +1 -1
  21. package/build/commands/hooks/stopHook.js +1 -1
  22. package/build/commands/index.js +1 -1
  23. package/build/commands/login.js +1 -1
  24. package/build/commands/mcpBootstrap.js +1 -1
  25. package/build/commands/migrateProfile.js +1 -1
  26. package/build/commands/setup/claude.js +1 -1
  27. package/build/commands/setup/opencode.js +1 -1
  28. package/build/commands/setupCi.js +1 -1
  29. package/build/commands/skillup.js +1 -1
  30. package/build/commands/start.js +1 -1
  31. package/build/commands/status.js +1 -1
  32. package/build/commands/update.js +1 -1
  33. package/build/commands/updateEnv.js +1 -1
  34. package/build/commands/useEnv.js +1 -1
  35. package/build/commands/utils/activeProfile.js +1 -1
  36. package/build/commands/utils/agentEnv.js +1 -1
  37. package/build/commands/utils/browserSessionsApi.js +1 -1
  38. package/build/commands/utils/claudeConfig.js +1 -1
  39. package/build/commands/utils/claudeOverrideSettings.js +1 -1
  40. package/build/commands/utils/claudePlugin.js +1 -1
  41. package/build/commands/utils/cloudProfile.js +1 -1
  42. package/build/commands/utils/cloudProfileSession.js +1 -1
  43. package/build/commands/utils/crypto.js +1 -1
  44. package/build/commands/utils/desirePathLog.js +1 -1
  45. package/build/commands/utils/deviceAuth.js +1 -1
  46. package/build/commands/utils/environment.js +1 -1
  47. package/build/commands/utils/featureApi.js +1 -1
  48. package/build/commands/utils/fixWebmDuration.js +1 -1
  49. package/build/commands/utils/gitTracked.js +1 -1
  50. package/build/commands/utils/keychain.js +1 -1
  51. package/build/commands/utils/legacyWarning.js +1 -0
  52. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  53. package/build/commands/utils/matchAuthEnvironment.js +1 -1
  54. package/build/commands/utils/mcpImageBase64.js +1 -1
  55. package/build/commands/utils/model.js +1 -1
  56. package/build/commands/utils/opencodeConfig.js +1 -1
  57. package/build/commands/utils/playwrightCli.js +1 -1
  58. package/build/commands/utils/profileMessages.js +1 -1
  59. package/build/commands/utils/profileSetupBanner.js +1 -1
  60. package/build/commands/utils/projectsConfig.js +1 -1
  61. package/build/commands/utils/rangerConfig.js +1 -1
  62. package/build/commands/utils/rangerRoot.js +1 -1
  63. package/build/commands/utils/resolveProfileContext.js +1 -1
  64. package/build/commands/utils/resolveProfileUrl.js +1 -1
  65. package/build/commands/utils/retry.js +1 -1
  66. package/build/commands/utils/sessionCache.js +1 -1
  67. package/build/commands/utils/settings.js +1 -1
  68. package/build/commands/utils/skillContent.js +1 -1
  69. package/build/commands/utils/skills.js +1 -1
  70. package/build/commands/utils/stitchWebmFiles.js +1 -1
  71. package/build/commands/utils/telemetry.js +1 -1
  72. package/build/commands/utils/tokenRefresh.js +1 -1
  73. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  74. package/build/commands/utils/userApi.js +1 -1
  75. package/build/commands/utils/version.js +1 -1
  76. package/build/commands/verifyFeature.js +1 -1
  77. package/build/commands/verifyFeatureCli.js +1 -1
  78. package/build/skills/ranger/SKILL.md +13 -7
  79. package/build/skills/ranger/create.md +16 -3
  80. package/build/skills/ranger/verify.md +23 -10
  81. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x5935af,_0x3fec67){const _0x3218d1=_0x5dea,_0x442f8b=_0x5935af();while(!![]){try{const _0x5ac69c=parseInt(_0x3218d1(0xc4))/0x1+parseInt(_0x3218d1(0xe4))/0x2+parseInt(_0x3218d1(0x118))/0x3+parseInt(_0x3218d1(0x108))/0x4*(parseInt(_0x3218d1(0xc3))/0x5)+-parseInt(_0x3218d1(0xb5))/0x6+parseInt(_0x3218d1(0xfe))/0x7*(-parseInt(_0x3218d1(0xcf))/0x8)+-parseInt(_0x3218d1(0x12f))/0x9*(parseInt(_0x3218d1(0xdc))/0xa);if(_0x5ac69c===_0x3fec67)break;else _0x442f8b['push'](_0x442f8b['shift']());}catch(_0x5cad51){_0x442f8b['push'](_0x442f8b['shift']());}}}(_0x9c8c,0x94012));import{mkdir,writeFile,readFile,readdir,unlink,rm,mkdtemp,rename}from'fs/promises';function _0x9c8c(){const _0x45946c=['\x20\x20\x20Creating\x20it\x20in\x20','\x0a\x20\x20(domains:\x20','Removed\x20existing\x20profile\x20at\x20','144lnbaZE','\x20\x20\x20If\x20you\x20are\x20an\x20agent,\x20background\x20this\x20process\x20and\x20let\x20your\x20user\x20know\x20they\x20need\x20to\x20complete\x20browser\x20authentication.\x0a','signal','\x20--safe-mode\x20\x20\x20\x20(disables\x20browser\x20features\x20that\x20can\x20cause\x20crashes)','eaFIP','user_declined','includes','prompt','legacy','jixCU','Missing\x20API\x20token;\x20aborting\x20CI\x20profile\x20creation.','⚠\x20Could\x20not\x20reach\x20','JIAJU','62490fwjaOc','Zrjbd','Warning:\x20Could\x20not\x20remove\x20old\x20profile\x20at\x20','pWZMD','ldZnb','origin','storageState','use_suggestion','68904yAXuxQ','HTTP\x20','EYvjA','length','\x22\x20configured','log','overwrite','✓\x20Encrypted\x20auth\x20saved\x20to:\x20','WHMRd','--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','ypElB','trackPhaseStart','NOWYx','--disable-features=WebBluetooth','rWJJU','goto','env','no_auth_config','now','user','location','saveToCloud','\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20','close','push','\x27\x20created,\x20linked\x20to\x20env\x20\x27','179228TkxKPM','iKHzT','exit','test','--allow-insecure-localhost','keys','trackPhaseEnd','\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','isTTY','trim','49252oaNljV','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','✓\x20Created\x20settings:\x20','.backup-','force','fetch\x20failed','finally','.tmp-','Saving\x20authentication\x20state...','aUFEe','indexOf','isProtocolError','Use\x20','RhQcv','Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.','confirm','742722WbIfDS','catch','\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.','error','ayuxn','tjXwJ','jpQqO','\x0a\x20\x20\x20⚠\x20This\x20step\x20requires\x20human\x20interaction\x20in\x20a\x20browser.','WMEDQ','Warning:\x20Could\x20not\x20remove\x20old\x20profile\x20backup\x20at\x20','path','\x0a🌐\x20Profile\x20Setup\x0a','VOTWi','Profile\x20\x22','\x0a\x20\x20Could\x20not\x20reach\x20','\x0a⚠️\x20\x20Profile\x20\x22','NODE_TLS_REJECT_UNAUTHORIZED','url_setup','Could\x20not\x20reach\x20','✓\x20Auth\x20state\x20saved\x20to:\x20','\x20\x20Set\x20active\x20profile:\x20','profile.add.autoRouted','uvwpc','612VmyvqH','\x20\x20ranger\x20profile\x20add\x20','This\x20can\x20happen\x20due\x20to\x20a\x20browser\x20compatibility\x20issue\x20on\x20some\x20systems.\x0a','utf-8','vygZU','EEwKo','CTMbI','message','NcVIE','local','profile.add.autoRouteSkipped','environments','settings.json','input','status','some','Aborted.','rIIER','JSZVC','Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','ZgmMD','allowInsecureLocalhost','startsWith','fCZrV','about:blank','1810056KQjjsy','url','name','safeMode','http://localhost:3000','BVPxW','MIagZ','cdpEndpoint','cIdzg','uPJDX','XXLoL',').\x20Falling\x20back\x20to\x20local\x20profile.','\x20would\x20shadow\x20the\x20existing\x20profile.','\x20\x20\x20A\x20browser\x20will\x20open.\x20Please\x20log\x20in\x20to\x20the\x20profile\x20you\x20want\x20to\x20test\x20so\x20Ranger\x20can\x20access\x20it.','265KLdgAJ','859091lQFkPT','--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.','domains','\x22\x20already\x20exists.\x20Choose\x20a\x20different\x20name\x20or\x20delete\x20the\x20existing\x20profile\x20first.','baseUrl','What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?',')\x0a\x20\x20Save\x20\x27','\x22.\x20Expected\x20\x22Name:\x20Value\x22.'];_0x9c8c=function(){return _0x45946c;};return _0x9c8c();}import{join}from'path';import{existsSync}from'fs';import _0x4d5eff 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';import{addProfileSetupBanner}from'./utils/profileSetupBanner.js';import{fetchAuthConfig,createCloudProfile,ApiError}from'./utils/cloudProfile.js';import{matchAuthEnvironment}from'./utils/matchAuthEnvironment.js';import{isPathGitTracked}from'./utils/gitTracked.js';function _0x5dea(_0xfc178c,_0x1372e7){_0xfc178c=_0xfc178c-0x9f;const _0x9c8c21=_0x9c8c();let _0x5dea10=_0x9c8c21[_0xfc178c];return _0x5dea10;}async function checkUrlReachability(_0x4a2325){const _0x1a64f5=_0x5dea,_0x3392c0={'JSZVC':function(_0x221dce,_0x378558,_0x5a545a){return _0x221dce(_0x378558,_0x5a545a);},'NOWYx':'HEAD','pWZMD':function(_0x4de510,_0xa0e09f){return _0x4de510<_0xa0e09f;},'RhQcv':function(_0x38b3cb,_0x21574a){return _0x38b3cb(_0x21574a);},'ODUtq':function(_0x4964d2,_0xa75c5c){return _0x4964d2===_0xa75c5c;}};try{const _0x5a51d4=new AbortController(),_0x3e5476=_0x3392c0[_0x1a64f5(0xae)](setTimeout,()=>_0x5a51d4['abort'](),0x1388),_0x1afb13={'method':_0x3392c0[_0x1a64f5(0xf0)],'signal':_0x5a51d4[_0x1a64f5(0xd1)],'redirect':'manual'};/^https:\/\/localhost(:\d+)?/i['test'](_0x4a2325)&&(process['env'][_0x1a64f5(0x128)]='0');const _0x5ac5fc=await fetch(_0x4a2325,_0x1afb13);delete process[_0x1a64f5(0xf4)][_0x1a64f5(0x128)],clearTimeout(_0x3e5476);if(_0x3392c0[_0x1a64f5(0xdf)](_0x5ac5fc[_0x1a64f5(0xaa)],0x190))return{'ok':!![]};return{'ok':![],'error':_0x1a64f5(0xe5)+_0x5ac5fc['status']};}catch(_0x54056c){delete process['env'][_0x1a64f5(0x128)];const _0x3d71e8=_0x54056c,_0x3162ca=_0x3d71e8['message']||_0x3392c0[_0x1a64f5(0x115)](String,_0x54056c),_0xdf02c1=_0x3162ca[_0x1a64f5(0xd5)]('Invalid\x20URL')||_0x3392c0['ODUtq'](_0x3d71e8[_0x1a64f5(0xb7)],'TypeError')||_0x3162ca[_0x1a64f5(0xd5)](_0x1a64f5(0x10d));return{'ok':![],'error':_0x3162ca,'isProtocolError':_0xdf02c1};}}async function sweepOrphanLocalProfile(_0x24a17b,_0x2295fb,_0x415213){const _0x16360d=_0x5dea,_0x326391={'Aomvu':'local','jpQqO':function(_0x398dcc,_0x2e8782,_0x762469){return _0x398dcc(_0x2e8782,_0x762469);},'VOTWi':function(_0x30b697,_0x26d209){return _0x30b697(_0x26d209);},'NZTLm':function(_0xe5e88a,_0x347f4f){return _0xe5e88a(_0x347f4f);}},_0x43e1ce=join(_0x2295fb,_0x326391['Aomvu']),_0x171f37=join(_0x43e1ce,_0x24a17b);existsSync(_0x171f37)&&(_0x415213&&await isPathGitTracked(_0x171f37)?console[_0x16360d(0xe9)]('\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20'+_0x171f37+_0x16360d(0x11a)):(await _0x326391[_0x16360d(0x11e)](rm,_0x171f37,{'recursive':!![],'force':!![]}),console[_0x16360d(0xe9)]('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x171f37)));if(_0x326391[_0x16360d(0x124)](existsSync,_0x43e1ce)){let _0x46809e=[];try{_0x46809e=await _0x326391['NZTLm'](readdir,_0x43e1ce);}catch{return;}const _0x5de641=_0x16360d(0x10f)+_0x24a17b+'-';for(const _0x20a7c8 of _0x46809e){if(!_0x20a7c8[_0x16360d(0xb2)](_0x5de641))continue;const _0x280d1d=join(_0x43e1ce,_0x20a7c8);await rm(_0x280d1d,{'recursive':!![],'force':!![]}),console['log'](_0x16360d(0xfa)+_0x280d1d);}}}async function tryAutoRouteCloudProfile(_0x671990,_0x464cb2,_0x1c0303,_0x19a2d7,_0xb7935){const _0x1d89c6=_0x5dea,_0x2aa99d={'bkSUC':function(_0x171e59,_0x430b41){return _0x171e59===_0x430b41;},'slXPv':function(_0x2368ed){return _0x2368ed();},'uPJDX':_0x1d89c6(0xa6),'TSVAN':function(_0x1c1dd7,_0x820af3,_0x35ab99){return _0x1c1dd7(_0x820af3,_0x35ab99);},'Umams':function(_0x172aef,_0x252750,_0x3b7b79,_0x365eb5){return _0x172aef(_0x252750,_0x3b7b79,_0x365eb5);},'MIagZ':function(_0x3bcc67,_0x55ef52){return _0x3bcc67 instanceof _0x55ef52;},'Zrjbd':function(_0x162d5f,_0xa8cb80){return _0x162d5f+_0xa8cb80;},'eaFIP':function(_0x237a9b){return _0x237a9b();},'xPGif':function(_0x452366,_0x1c5e1f){return _0x452366(_0x1c5e1f);},'JJWci':_0x1d89c6(0x12d)};let _0x5ae836;try{_0x5ae836=await _0x2aa99d['slXPv'](fetchAuthConfig);}catch{return _0xb7935?.[_0x1d89c6(0x104)](_0x1d89c6(0xa6),{'reason':_0x1d89c6(0xf5),'profileName':_0x671990}),![];}if(!_0x5ae836||!_0x5ae836['environments']||Object[_0x1d89c6(0x103)](_0x5ae836['environments'])[_0x1d89c6(0xe7)]===0x0)return _0xb7935?.['trackPhaseEnd'](_0x2aa99d['uPJDX'],{'reason':'no_auth_config','profileName':_0x671990}),![];const _0x1ba7b7=_0x2aa99d['TSVAN'](matchAuthEnvironment,_0x464cb2,_0x5ae836);if(!_0x1ba7b7)return console['log']('No\x20auth\x20env\x20matches\x20this\x20URL.\x20Creating\x20local\x20profile.'),_0xb7935?.[_0x1d89c6(0x104)](_0x2aa99d[_0x1d89c6(0xbe)],{'reason':'no_match','profileName':_0x671990}),![];const _0x48e503=_0x5ae836[_0x1d89c6(0xa7)][_0x1ba7b7],_0x5a842e=_0x48e503?.[_0x1d89c6(0xc6)]??[];if(_0x19a2d7&&!_0x1c0303['yes']){const {saveToCloud:_0xb7769c}=await _0x4d5eff[_0x1d89c6(0xd6)]([{'type':_0x1d89c6(0x117),'name':_0x1d89c6(0xf9),'message':'Found\x20auth\x20environment\x20\x27'+_0x1ba7b7+'\x27\x20matching\x20'+_0x464cb2+_0x1d89c6(0xcd)+_0x5a842e['join'](',\x20')+_0x1d89c6(0xca)+_0x671990+'\x27\x20to\x20the\x20cloud?','default':!![]}]);if(!_0xb7769c)return _0xb7935?.[_0x1d89c6(0x104)](_0x1d89c6(0xa6),{'reason':_0x1d89c6(0xd4),'profileName':_0x671990}),![];}const _0x55a14a=_0x5a842e[_0x1d89c6(0xab)](_0x3f4324=>{const _0x53dc59=_0x1d89c6;try{return _0x2aa99d['bkSUC'](new URL(_0x3f4324)[_0x53dc59(0xe1)],new URL(_0x464cb2)['origin']);}catch{return![];}}),_0x7e908d={};!_0x55a14a&&(_0x7e908d[_0x1d89c6(0xc8)]=_0x464cb2);try{await _0x2aa99d['Umams'](createCloudProfile,_0x671990,_0x1ba7b7,{'settings':_0x7e908d});}catch(_0x51ce93){if(_0x2aa99d[_0x1d89c6(0xbb)](_0x51ce93,ApiError)&&_0x51ce93['status']===0x199){console[_0x1d89c6(0x11b)]('\x0a\x20\x20A\x20cloud\x20profile\x20named\x20\x22'+_0x671990+_0x1d89c6(0xc7));throw _0x51ce93;}return console['log']('\x20\x20Could\x20not\x20reach\x20Ranger\x20API\x20to\x20create\x20a\x20cloud\x20profile\x20('+(_0x51ce93 instanceof Error?_0x51ce93['message']:String(_0x51ce93))+_0x1d89c6(0xc0)),_0xb7935?.[_0x1d89c6(0x104)](_0x2aa99d['uPJDX'],{'reason':_0x1d89c6(0xf5),'profileName':_0x671990}),![];}console['log'](_0x2aa99d[_0x1d89c6(0xdd)]('✓\x20Cloud\x20profile\x20\x27'+_0x671990+_0x1d89c6(0xfd)+_0x1ba7b7+'\x27.\x0a','\x20\x20Next:\x20RANGER_TEST_USERNAME=...\x20RANGER_TEST_PASSWORD=...\x20ranger\x20go\x20--profile\x20'+_0x671990));try{await sweepOrphanLocalProfile(_0x671990,getRangerHomeDir(),![]);const _0x46fa4d=_0x2aa99d[_0x1d89c6(0xd3)](getRangerDir);_0x46fa4d!==_0x2aa99d['eaFIP'](getRangerHomeDir)&&await sweepOrphanLocalProfile(_0x671990,_0x46fa4d,!![]);}catch(_0x500836){console[_0x1d89c6(0xe9)]('\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20('+(_0x500836 instanceof Error?_0x500836[_0x1d89c6(0xa3)]:_0x2aa99d['xPGif'](String,_0x500836))+').');}return _0xb7935?.[_0x1d89c6(0x104)](_0x2aa99d['JJWci'],{'envKey':_0x1ba7b7,'profileName':_0x671990}),!![];}export async function addEnv(_0x282262,_0x14be0f={},_0x2ec181){const _0x4f3704=_0x5dea,_0x43b30f={'ayuxn':function(_0x3ab2bd){return _0x3ab2bd();},'CTMbI':function(_0x10fcb7){return _0x10fcb7();},'BVPxW':function(_0x4cdaf2,_0x9c1e10,_0x1c5c33){return _0x4cdaf2(_0x9c1e10,_0x1c5c33);},'aUFEe':function(_0x57519f,_0x26998e){return _0x57519f(_0x26998e);},'qhTjR':function(_0x470c28,_0x136973,_0x4ab107,_0x2ab0ea,_0x5e4c17,_0x7312e7){return _0x470c28(_0x136973,_0x4ab107,_0x2ab0ea,_0x5e4c17,_0x7312e7);},'fCZrV':function(_0x126184,_0x1edc80){return _0x126184===_0x1edc80;},'VvXdF':_0x4f3704(0x117),'UWtHE':'shouldReplace','PXIWd':_0x4f3704(0x105),'uvwpc':'\x20\x20Make\x20sure\x20your\x20Electron\x20app\x20(or\x20browser)\x20is\x20running\x20with\x20remote\x20debugging\x20enabled.\x0a','UBPWH':function(_0x489cdb,_0x29aecd){return _0x489cdb(_0x29aecd);},'aTxTg':_0x4f3704(0xa9),'YwseE':_0x4f3704(0xc8),'afGQE':_0x4f3704(0xaf),'tjXwJ':'list','nWQIA':'What\x20would\x20you\x20like\x20to\x20do?','ypElB':'retry','ugThX':function(_0x39c15a,_0x55e22e){return _0x39c15a===_0x55e22e;},'vygZU':function(_0x2730b0,_0x18627e){return _0x2730b0===_0x18627e;},'EYvjA':'continue','JIAJU':_0x4f3704(0x129),'voXZj':function(_0x40e0bb,_0x1cd88d){return _0x40e0bb(_0x1cd88d);},'zuzQQ':function(_0x42ba22,_0x3ef2fd,_0x463a4e){return _0x42ba22(_0x3ef2fd,_0x463a4e);},'jixCU':function(_0x555441,_0x43a7f3,_0x26ab6d){return _0x555441(_0x43a7f3,_0x26ab6d);},'Nnnhp':'auth.json','aWHlH':'SIGINT','WHMRd':function(_0x2c482a,_0x1a6b82){return _0x2c482a(_0x1a6b82);},'tWFyg':'browser_auth','rIIER':'\x0a📋\x20Authentication\x20Setup','FkwWq':_0x4f3704(0xc2),'ZgmMD':'\x20\x20\x20When\x20done\x20logging\x20in,\x20close\x20the\x20browser\x20to\x20save\x20the\x20session.','lbPNK':_0x4f3704(0x11f),'EYFPh':_0x4f3704(0xd0),'rWJJU':function(_0x43c51f,_0x44c5e0){return _0x43c51f>_0x44c5e0;},'ldZnb':function(_0x2c08ad,_0x3a396f){return _0x2c08ad||_0x3a396f;},'IyzHh':'\x0aThe\x20browser\x20closed\x20unexpectedly\x20before\x20authentication\x20could\x20be\x20saved.','YeSaK':_0x4f3704(0x131),'cIdzg':'You\x20can\x20try\x20again\x20with\x20one\x20of:','EEwKo':_0x4f3704(0x9f),'WMEDQ':function(_0x53ea62){return _0x53ea62();},'BMYNG':'\x20\x20Could\x20not\x20encrypt:\x20No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','Dafmc':_0x4f3704(0xd9),'rBpLG':function(_0x25b3bf,_0x206ff7,_0x3dc3ba){return _0x25b3bf(_0x206ff7,_0x3dc3ba);},'zWYTN':function(_0x277ab8,_0x2afbbd){return _0x277ab8+_0x2afbbd;},'TiXEd':'.enc','YnzaV':'\x20\x20You\x20can\x20safely\x20commit\x20this\x20file\x20to\x20git.','XXLoL':_0x4f3704(0xa8),'QeeoA':function(_0x1e7d5a,_0x5aadfb,_0x5e75c1){return _0x1e7d5a(_0x5aadfb,_0x5e75c1);},'NcVIE':'config_write'},_0x5bbfd6=_0x14be0f['ci']??![],_0x331264=_0x5bbfd6?'ci':_0x4f3704(0xa5),_0x5b98d6=_0x14be0f['scope']===_0x4f3704(0xf7)?_0x43b30f['ayuxn'](getRangerHomeDir):_0x43b30f[_0x4f3704(0xa2)](getRangerDir),_0x11c287=join(_0x5b98d6,_0x331264,_0x282262),_0x49f941={};if(_0x14be0f['setupHeader'])for(const _0x247fff of _0x14be0f['setupHeader']){const _0x521056=_0x247fff[_0x4f3704(0x112)](':');if(_0x521056===-0x1)throw new Error('Invalid\x20--setup-header\x20format:\x20\x22'+_0x247fff+_0x4f3704(0xcb));const _0x4c8f6b=_0x247fff['slice'](0x0,_0x521056)['trim'](),_0x4f6db1=_0x247fff['slice'](_0x521056+0x1)['trim']();_0x49f941[_0x4c8f6b]=_0x4f6db1;}const _0x4a7953=_0x43b30f[_0x4f3704(0xba)](join,_0x5b98d6,_0x331264);if(_0x14be0f[_0x4f3704(0xbc)]!==undefined&&_0x14be0f['cdpEndpoint'][_0x4f3704(0x107)]()==='')throw new Error(_0x4f3704(0xed));if(_0x14be0f[_0x4f3704(0xbc)]&&_0x14be0f['url'])throw new Error('--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.');if(_0x14be0f['cdpEndpoint']&&_0x14be0f['ci'])throw new Error(_0x4f3704(0xc5));const _0x4af6b8=_0x43b30f[_0x4f3704(0x111)](Boolean,_0x14be0f[_0x4f3704(0xbc)]),_0x395db2=!_0x14be0f['skipAuth']&&!_0x4af6b8,_0x1cf9b4=process['stdin'][_0x4f3704(0x106)]&&process['stdout']['isTTY'];if(!_0x1cf9b4&&!_0x14be0f['url']&&!_0x4af6b8)throw new Error(_0x4f3704(0x109));if(!_0x5bbfd6&&!_0x14be0f['skipAuth']&&!_0x4af6b8&&_0x14be0f[_0x4f3704(0xb6)]){const _0x1c4d59=await _0x43b30f['qhTjR'](tryAutoRouteCloudProfile,_0x282262,_0x14be0f['url'],_0x14be0f,_0x1cf9b4,_0x2ec181);if(_0x1c4d59)return;}const _0xcc2b7d=findExistingEnv(_0x282262,{'rangerDir':_0x5b98d6});let _0x2a77d5=null;if(_0xcc2b7d){if(!_0x1cf9b4)_0x2a77d5=_0xcc2b7d;else{if(_0x43b30f[_0x4f3704(0xb3)](_0xcc2b7d[_0x4f3704(0xf8)],_0x331264)){const {overwrite:_0x1216e8}=await _0x4d5eff[_0x4f3704(0xd6)]([{'type':_0x43b30f['VvXdF'],'name':_0x4f3704(0xea),'message':_0x4f3704(0x125)+_0x282262+'\x22\x20already\x20exists.\x20Overwrite?','default':![]}]);if(!_0x1216e8){console[_0x4f3704(0xe9)]('Aborted.');return;}_0x2a77d5=_0xcc2b7d;}else{const _0x1b1d10=_0x43b30f['fCZrV'](_0xcc2b7d[_0x4f3704(0xf8)],_0x4f3704(0xd7))?'root\x20(.ranger/)':_0xcc2b7d['location'];console[_0x4f3704(0x11b)](_0x4f3704(0x127)+_0x282262+'\x22\x20already\x20exists\x20in\x20'+_0x1b1d10+':\x20'+_0xcc2b7d[_0x4f3704(0x122)]),console['error'](_0x4f3704(0xcc)+_0x331264+_0x4f3704(0xc1));const {shouldReplace:_0x17f52e}=await _0x4d5eff[_0x4f3704(0xd6)]([{'type':_0x4f3704(0x117),'name':_0x43b30f['UWtHE'],'message':'Delete\x20existing\x20and\x20create\x20new\x20in\x20'+_0x331264+'?','default':![]}]);if(!_0x17f52e){console['log'](_0x4f3704(0xac));return;}_0x2a77d5=_0xcc2b7d;}}}_0x2ec181?.[_0x4f3704(0xef)](_0x4f3704(0x129));let _0x2ca134='';if(_0x4af6b8)console[_0x4f3704(0xe9)](_0x43b30f['PXIWd']),console[_0x4f3704(0xe9)]('\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20'+_0x14be0f['cdpEndpoint']),console['log'](_0x43b30f[_0x4f3704(0x12e)]);else{if(_0x14be0f[_0x4f3704(0xb6)]){_0x2ca134=_0x14be0f[_0x4f3704(0xb6)];const _0x56d32c=await _0x43b30f['UBPWH'](checkUrlReachability,_0x2ca134);if(!_0x56d32c['ok']&&!_0x14be0f['force'])throw new Error(_0x4f3704(0x12a)+_0x2ca134+':\x20'+_0x56d32c[_0x4f3704(0x11b)]+'\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.');!_0x56d32c['ok']&&_0x14be0f[_0x4f3704(0x10c)]&&console['log'](_0x4f3704(0xda)+_0x2ca134+':\x20'+_0x56d32c[_0x4f3704(0x11b)]+'\x20(continuing\x20with\x20--force)');}else{console[_0x4f3704(0xe9)](_0x4f3704(0x123)),console['log']('\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.'),console[_0x4f3704(0xe9)]('\x20\x20Ranger\x20will\x20open\x20it\x20in\x20a\x20browser\x20so\x20you\x20can\x20log\x20in\x20and\x20save\x20your\x20session.\x0a');let _0x2e31f5=![];while(!![]){const _0x4585a1=await _0x4d5eff[_0x4f3704(0xd6)]([{'type':_0x43b30f['aTxTg'],'name':_0x43b30f['YwseE'],'message':_0x2e31f5?_0x43b30f['afGQE']:_0x4f3704(0xc9),'default':_0x2ca134||_0x4f3704(0xb9)}]);_0x2ca134=_0x4585a1['baseUrl'];const _0x5218e9=await checkUrlReachability(_0x2ca134);if(_0x5218e9['ok'])break;const _0x396563=/^[a-zA-Z][\w+.-]*:\/\//['test'](_0x2ca134),_0x1008eb=_0x5218e9[_0x4f3704(0x113)]&&!_0x396563,_0x4572ce=_0x1008eb?'http://'+_0x2ca134:null;_0x2e31f5=!![],console[_0x4f3704(0xe9)](_0x4f3704(0x126)+_0x2ca134+':\x20'+_0x5218e9['error']);_0x4572ce&&console[_0x4f3704(0xe9)]('\x20\x20Did\x20you\x20mean\x20'+_0x4572ce+'?');const {action:_0x3702c9}=await _0x4d5eff[_0x4f3704(0xd6)]([{'type':_0x43b30f[_0x4f3704(0x11d)],'name':'action','message':_0x43b30f['nWQIA'],'choices':[..._0x4572ce?[{'name':_0x4f3704(0x114)+_0x4572ce,'value':_0x4f3704(0xe3)}]:[],{'name':'Enter\x20a\x20different\x20URL','value':_0x43b30f[_0x4f3704(0xee)]},{'name':'Continue\x20anyway','value':'continue'}]}]);if(_0x43b30f['ugThX'](_0x3702c9,_0x4f3704(0xe3))&&_0x4572ce){_0x2ca134=_0x4572ce;const _0x3f763f=await checkUrlReachability(_0x2ca134);if(_0x3f763f['ok'])break;console[_0x4f3704(0xe9)]('\x0a\x20\x20Still\x20could\x20not\x20reach\x20'+_0x2ca134+':\x20'+_0x3f763f['error']);}else{if(_0x43b30f[_0x4f3704(0xa0)](_0x3702c9,_0x43b30f[_0x4f3704(0xe6)]))break;}}}}_0x2ec181?.[_0x4f3704(0x104)](_0x43b30f[_0x4f3704(0xdb)]);const _0x4e5005={};if(_0x2a77d5){const _0x1e9171=await _0x43b30f['voXZj'](loadSettings,_0x282262);Object['assign'](_0x4e5005,_0x1e9171['setupHeaders']);}Object['assign'](_0x4e5005,_0x49f941),await mkdir(_0x4a7953,{'recursive':!![]});try{const _0x4dba2c=await readdir(_0x4a7953),_0x4168f8='.tmp-'+_0x282262+'-';for(const _0x539591 of _0x4dba2c){_0x539591['startsWith'](_0x4168f8)&&await _0x43b30f['zuzQQ'](rm,join(_0x4a7953,_0x539591),{'recursive':!![],'force':!![]});}}catch{}const _0x1b099e=await _0x43b30f['aUFEe'](mkdtemp,_0x43b30f['jixCU'](join,_0x4a7953,'.tmp-'+_0x282262+'-')),_0x1899e4=join(_0x1b099e,_0x43b30f['Nnnhp']),_0x182fdd=()=>{const _0x44c080=_0x4f3704;rm(_0x1b099e,{'recursive':!![],'force':!![]})[_0x44c080(0x119)](()=>{})[_0x44c080(0x10e)](()=>{const _0x374d33=_0x44c080;process[_0x374d33(0x100)](0x82);});};process['once'](_0x43b30f['aWHlH'],_0x182fdd);const _0x4995b9=_0x43b30f[_0x4f3704(0xec)](Boolean,_0x2ca134)&&/^https:\/\/localhost(:\d+)?/i[_0x4f3704(0x101)](_0x2ca134);try{if(_0x395db2){_0x2ec181?.[_0x4f3704(0xef)](_0x43b30f['tWFyg']),console[_0x4f3704(0xe9)](_0x43b30f[_0x4f3704(0xad)]),console[_0x4f3704(0xe9)](_0x43b30f['FkwWq']),console['log'](_0x43b30f[_0x4f3704(0xb0)]);!_0x1cf9b4?(console[_0x4f3704(0xe9)](_0x43b30f['lbPNK']),console['log'](_0x43b30f['EYFPh'])):console['log']('');await new Promise(_0x2eebe6=>setTimeout(_0x2eebe6,0xbb8));const _0x9d5a1c=[];_0x14be0f[_0x4f3704(0xb8)]&&_0x9d5a1c[_0x4f3704(0xfc)](_0x4f3704(0xf1));const _0x2e5afa=_0x14be0f[_0x4f3704(0xb1)]||_0x4995b9;_0x2e5afa&&_0x9d5a1c['push'](_0x4f3704(0x102));const _0x395de4=await chromium['launch']({'headless':![],..._0x43b30f[_0x4f3704(0xf2)](_0x9d5a1c['length'],0x0)?{'args':_0x9d5a1c}:{}});try{const _0x5364d8=_0x43b30f['rWJJU'](Object[_0x4f3704(0x103)](_0x4e5005)['length'],0x0),_0x697a10={'ignoreHTTPSErrors':!![]};_0x5364d8&&(_0x697a10['extraHTTPHeaders']=_0x4e5005);const _0x432f97=await _0x395de4['newContext'](_0x697a10);await addProfileSetupBanner(_0x432f97);const _0xeb0adf=await _0x432f97['newPage']();await _0xeb0adf[_0x4f3704(0xf3)](_0x43b30f[_0x4f3704(0xe0)](_0x2ca134,_0x4f3704(0xb4)));let _0x2dfa42=![];await new Promise(_0xc6b593=>{const _0x5d9239=_0x4f3704,_0x2ca385={'axIos':_0x5d9239(0x110),'iKHzT':function(_0x149fb5){const _0x5e2d16=_0x5d9239;return _0x43b30f[_0x5e2d16(0x11c)](_0x149fb5);}};_0xeb0adf['on'](_0x5d9239(0xfb),async()=>{const _0x4b868e=_0x5d9239;try{console[_0x4b868e(0xe9)](_0x2ca385['axIos']),await _0x432f97[_0x4b868e(0xe2)]({'path':_0x1899e4}),_0x2dfa42=!![];}catch{}_0x2ca385[_0x4b868e(0xff)](_0xc6b593);});});if(!_0x2dfa42){console['log'](_0x43b30f['IyzHh']);!_0x14be0f[_0x4f3704(0xb8)]&&(console['log'](_0x43b30f['YeSaK']),console['log'](_0x43b30f[_0x4f3704(0xbd)]),console['log']('\x20\x20ranger\x20profile\x20add\x20'+_0x282262+_0x4f3704(0xd2)),console[_0x4f3704(0xe9)](_0x4f3704(0x130)+_0x282262+'\x20--skip-auth\x20\x20\x20\x20(skip\x20browser\x20auth\x20entirely)\x0a'));throw new Error('Browser\x20closed\x20before\x20authentication\x20was\x20saved.');}}finally{await _0x395de4['close']()['catch'](()=>{});}if(_0x5bbfd6){const _0x24f7d3=await readFile(_0x1899e4,_0x43b30f[_0x4f3704(0xa1)]),_0x40f58b=await _0x43b30f[_0x4f3704(0x120)](getToken);if(!_0x40f58b){console[_0x4f3704(0x11b)](_0x43b30f['BMYNG']),await unlink(_0x1899e4)['catch'](()=>{});throw new Error(_0x43b30f['Dafmc']);}else{const _0x35662c=_0x43b30f['rBpLG'](encrypt,_0x24f7d3,_0x40f58b);await writeFile(_0x43b30f['zWYTN'](_0x1899e4,_0x43b30f['TiXEd']),_0x35662c),await unlink(_0x1899e4),console[_0x4f3704(0xe9)](_0x4f3704(0xeb)+_0x1899e4+'.enc'),console[_0x4f3704(0xe9)](_0x43b30f['YnzaV']),console[_0x4f3704(0xe9)]('\x20\x20Run\x20ranger\x20setup\x20in\x20CI\x20to\x20decrypt\x20at\x20runtime.');}}else console[_0x4f3704(0xe9)](_0x4f3704(0x12b)+_0x1899e4);_0x2ec181?.[_0x4f3704(0x104)]('browser_auth');}_0x2ec181?.[_0x4f3704(0xef)]('config_write');const _0x4387cc={};_0x2ca134&&(_0x4387cc['baseUrl']=_0x2ca134);_0x14be0f['cdpEndpoint']&&(_0x4387cc['cdpEndpoint']=_0x14be0f[_0x4f3704(0xbc)],_0x4387cc['isElectron']=!![]);(_0x14be0f[_0x4f3704(0xb1)]||_0x4995b9)&&(_0x4387cc['allowInsecureLocalhost']=!![]);_0x14be0f[_0x4f3704(0xb8)]&&(_0x4387cc[_0x4f3704(0xb8)]=!![]);Object['keys'](_0x4e5005)[_0x4f3704(0xe7)]>0x0&&(_0x4387cc['setupHeaders']=_0x4e5005);await writeFile(join(_0x1b099e,'settings.json'),JSON['stringify'](_0x4387cc,null,0x2)),console[_0x4f3704(0xe9)](_0x4f3704(0x10a)+_0x43b30f[_0x4f3704(0xd8)](join,_0x11c287,_0x43b30f[_0x4f3704(0xbf)]));if(_0x43b30f['ugThX'](_0x2a77d5?.['location'],_0x331264)){const _0x475d7b=_0x2a77d5[_0x4f3704(0x122)]+_0x4f3704(0x10b)+Date[_0x4f3704(0xf6)]();await rename(_0x2a77d5[_0x4f3704(0x122)],_0x475d7b);try{await rename(_0x1b099e,_0x11c287);}catch(_0x8b637a){await rename(_0x475d7b,_0x2a77d5['path']);throw _0x8b637a;}try{await rm(_0x475d7b,{'recursive':!![]});}catch{console[_0x4f3704(0xe9)](_0x4f3704(0x121)+_0x475d7b);}}else{await _0x43b30f['QeeoA'](rename,_0x1b099e,_0x11c287);if(_0x2a77d5)try{await rm(_0x2a77d5['path'],{'recursive':!![]}),console['log'](_0x4f3704(0xce)+_0x2a77d5[_0x4f3704(0x122)]);}catch{console['log'](_0x4f3704(0xde)+_0x2a77d5['path']);}}try{await _0x43b30f[_0x4f3704(0xec)](writeActiveProfileName,_0x282262),console['log'](_0x4f3704(0x12c)+_0x282262);}catch{console[_0x4f3704(0xe9)](_0x4f3704(0x116));}_0x2ec181?.['trackPhaseEnd'](_0x43b30f[_0x4f3704(0xa4)]),console[_0x4f3704(0xe9)]('\x0a\x20\x20Profile\x20\x22'+_0x282262+_0x4f3704(0xe8));}catch(_0x15099c){await _0x43b30f['zuzQQ'](rm,_0x1b099e,{'recursive':!![],'force':!![]});throw _0x15099c;}finally{process['off']('SIGINT',_0x182fdd);}}
1
+ (function(_0x33f85d,_0x50efd1){const _0x2b80d9=_0x304e,_0x346106=_0x33f85d();while(!![]){try{const _0x520538=-parseInt(_0x2b80d9(0x16e))/0x1*(-parseInt(_0x2b80d9(0x165))/0x2)+parseInt(_0x2b80d9(0x141))/0x3+-parseInt(_0x2b80d9(0x18a))/0x4*(-parseInt(_0x2b80d9(0x158))/0x5)+parseInt(_0x2b80d9(0x18d))/0x6*(-parseInt(_0x2b80d9(0x131))/0x7)+parseInt(_0x2b80d9(0x180))/0x8*(parseInt(_0x2b80d9(0x17b))/0x9)+-parseInt(_0x2b80d9(0x15e))/0xa*(parseInt(_0x2b80d9(0x199))/0xb)+parseInt(_0x2b80d9(0x138))/0xc;if(_0x520538===_0x50efd1)break;else _0x346106['push'](_0x346106['shift']());}catch(_0x1a5808){_0x346106['push'](_0x346106['shift']());}}}(_0x46e4,0xa83c2));import{readdir,rm}from'fs/promises';import{join}from'path';function _0x304e(_0x47eaac,_0x33c2df){_0x47eaac=_0x47eaac-0x131;const _0x46e489=_0x46e4();let _0x304edd=_0x46e489[_0x47eaac];return _0x304edd;}import{existsSync}from'fs';import _0x26d8dc from'inquirer';import{getRangerDir,getRangerHomeDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{fetchAuthConfig,createCloudProfile,ApiError}from'./utils/cloudProfile.js';import{matchAuthEnvironment}from'./utils/matchAuthEnvironment.js';import{isPathGitTracked}from'./utils/gitTracked.js';import{setProfileOverride}from'./utils/projectsConfig.js';async function checkUrlReachability(_0x270d25){const _0x4f7ac8=_0x304e,_0x4c7f33={'gmyDy':function(_0x3fc6e6,_0x381562,_0x1b0526){return _0x3fc6e6(_0x381562,_0x1b0526);},'BDXUh':'manual','Ckeup':function(_0x472e79,_0x82a2d1){return _0x472e79(_0x82a2d1);},'OsRIc':function(_0x353355,_0x53d8b1){return _0x353355<_0x53d8b1;},'PbCDt':_0x4f7ac8(0x147),'cJAdL':_0x4f7ac8(0x16d),'VkTkX':'fetch\x20failed'};try{const _0x37fb6b=new AbortController(),_0x45cede=_0x4c7f33[_0x4f7ac8(0x14f)](setTimeout,()=>_0x37fb6b[_0x4f7ac8(0x14c)](),0x1388),_0x1640c6={'method':'HEAD','signal':_0x37fb6b[_0x4f7ac8(0x167)],'redirect':_0x4c7f33['BDXUh']};/^https:\/\/localhost(:\d+)?/i[_0x4f7ac8(0x194)](_0x270d25)&&(process[_0x4f7ac8(0x164)][_0x4f7ac8(0x142)]='0');const _0x15b392=await fetch(_0x270d25,_0x1640c6);delete process['env']['NODE_TLS_REJECT_UNAUTHORIZED'],_0x4c7f33['Ckeup'](clearTimeout,_0x45cede);if(_0x4c7f33['OsRIc'](_0x15b392[_0x4f7ac8(0x16b)],0x190))return{'ok':!![]};return{'ok':![],'error':_0x4f7ac8(0x16f)+_0x15b392[_0x4f7ac8(0x16b)]};}catch(_0x31c020){delete process[_0x4f7ac8(0x164)]['NODE_TLS_REJECT_UNAUTHORIZED'];const _0x250162=_0x31c020,_0x2a389c=_0x250162['message']||_0x4c7f33['Ckeup'](String,_0x31c020),_0x399570=_0x2a389c[_0x4f7ac8(0x159)](_0x4c7f33[_0x4f7ac8(0x13c)])||_0x250162[_0x4f7ac8(0x134)]===_0x4c7f33['cJAdL']||_0x2a389c['includes'](_0x4c7f33[_0x4f7ac8(0x13f)]);return{'ok':![],'error':_0x2a389c,'isProtocolError':_0x399570};}}async function sweepOrphanLocalProfile(_0x238142,_0x111307,_0xd2b534){const _0x4a8250=_0x304e,_0x56900d={'Vezjn':function(_0x18e2ae,_0x5adc42,_0x5d455e){return _0x18e2ae(_0x5adc42,_0x5d455e);},'FTMRu':function(_0x185d4b,_0x470b08){return _0x185d4b(_0x470b08);},'mvsKM':function(_0x2939d9,_0x219403,_0x1a8541){return _0x2939d9(_0x219403,_0x1a8541);}},_0x1e1900=join(_0x111307,_0x4a8250(0x15c)),_0x4962b1=_0x56900d[_0x4a8250(0x15f)](join,_0x1e1900,_0x238142);existsSync(_0x4962b1)&&(_0xd2b534&&await _0x56900d[_0x4a8250(0x149)](isPathGitTracked,_0x4962b1)?console[_0x4a8250(0x18b)]('\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20'+_0x4962b1+_0x4a8250(0x13b)):(await rm(_0x4962b1,{'recursive':!![],'force':!![]}),console[_0x4a8250(0x18b)]('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x4962b1)));if(existsSync(_0x1e1900)){let _0x2406cb=[];try{_0x2406cb=await readdir(_0x1e1900);}catch{return;}const _0x22d507=_0x4a8250(0x176)+_0x238142+'-';for(const _0x32dd1d of _0x2406cb){if(!_0x32dd1d['startsWith'](_0x22d507))continue;const _0x40b7b0=_0x56900d['Vezjn'](join,_0x1e1900,_0x32dd1d);await _0x56900d['mvsKM'](rm,_0x40b7b0,{'recursive':!![],'force':!![]}),console['log']('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x40b7b0);}}}async function sweepOrphansBestEffort(_0x4ee9f9){const _0x119af0=_0x304e,_0x18db0d={'IyRiR':function(_0x234df8,_0x2e7079,_0x1f4baf,_0x39616e){return _0x234df8(_0x2e7079,_0x1f4baf,_0x39616e);},'HoqsH':function(_0xd8fa39){return _0xd8fa39();},'fEnPW':function(_0x48e1ea,_0x421826){return _0x48e1ea!==_0x421826;},'RQcYJ':function(_0x5b966d,_0x30e697){return _0x5b966d(_0x30e697);}};try{await _0x18db0d[_0x119af0(0x19c)](sweepOrphanLocalProfile,_0x4ee9f9,_0x18db0d[_0x119af0(0x19f)](getRangerHomeDir),![]);const _0x22d2a9=getRangerDir();_0x18db0d[_0x119af0(0x152)](_0x22d2a9,getRangerHomeDir())&&await sweepOrphanLocalProfile(_0x4ee9f9,_0x22d2a9,!![]);}catch(_0x28043c){console[_0x119af0(0x18b)](_0x119af0(0x193)+(_0x28043c instanceof Error?_0x28043c[_0x119af0(0x163)]:_0x18db0d['RQcYJ'](String,_0x28043c))+').');}}async function markActive(_0x5edf18){const _0xc4d736=_0x304e,_0x22c985={'tDgOB':function(_0x1f15ac,_0x3bc129){return _0x1f15ac(_0x3bc129);}};try{await _0x22c985['tDgOB'](writeActiveProfileName,_0x5edf18),console['log'](_0xc4d736(0x171)+_0x5edf18);}catch{console[_0xc4d736(0x18b)](_0xc4d736(0x151));}}function _0x46e4(){const _0x1caf39=['origin','1285290YRQRvD','NODE_TLS_REJECT_UNAUTHORIZED','keys','\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a','skipAuth','\x20\x20\x20\x20\x20\x20\x20\x20to\x20materialize\x20a\x20session\x20via\x20server-side\x20login.','Invalid\x20URL','Use\x20the\x20new\x20flow:\x0a','FTMRu','FyEDB','retry','abort','\x27\x20created,\x20linked\x20to\x20env\x20\x27','profile.add.autoRouted','gmyDy','error','Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.','fEnPW','agWlS','PPaTS','no_auth_config','some','force','5WryGlH','includes','\x0a\x20\x20Still\x20could\x20not\x20reach\x20','HiQft','local','setupHeader','717310SzXBWv','Vezjn','GiYsv','MrqRx','cdpEndpoint','message','env','2DIgNsm','cwd','signal','\x22\x20already\x20exists.\x20Choose\x20a\x20different\x20name\x20or\x20delete\x20the\x20existing\x20profile\x20first.','MRMPr','url','status','stdout','TypeError','1239258yyOfRQ','HTTP\x20','xceYh','\x20\x20Set\x20active\x20profile:\x20','Could\x20not\x20reach\x20','length','setupHeaders','baseUrl','.tmp-','ISgDl','wlmOy','exit','fZHGO','45cqiCLY','trim','gYoSZ','\x0a\x20\x20Could\x20not\x20reach\x20','oEEwe','1204712koXsfk','eiRYb','use_suggestion','indexOf','list','Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','\x0a\x20\x20This\x20org\x20has\x20no\x20cloud-profile\x20auth\x20config\x20configured.\x20Ask\x20an\x20admin\x20to\x20set\x20one\x20up,\x20or\x20pass\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session.','http://localhost:3000','yes','Enter\x20a\x20different\x20URL','216508hHjJWw','log','aiYbg','47106tAiiza','✓\x20Cloud\x20profile\x20\x27','vjwrv','See:\x20docs/feature/cloud-profiles-old-vs-new-structure.md','prompt','\x22.\x20Expected\x20\x22Name:\x20Value\x22.','\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20(','test','hbiVD','continue','\x0a\x20\x20A\x20cloud\x20profile\x20named\x20\x22','trackPhaseEnd','187nXkOAO','\x27.\x0a','JPuPU','IyRiR','join','isTTY','HoqsH','profile.add.autoRouteSkipped','saveToCloud','WdBwK','623ouPfeB','DrOlz','input','name','isElectron','Found\x20auth\x20environment\x20\x27','slice','1589952AYmvtF','KTqri','\x27\x20created\x20(CDP).','\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.','PbCDt','\x22:\x20','user_declined','VkTkX'];_0x46e4=function(){return _0x1caf39;};return _0x46e4();}async function tryAutoRouteCloudProfile(_0x47dd21,_0x242d5c,_0x4fa38a,_0x12143d,_0x28b3a0){const _0x588383=_0x304e,_0x5894eb={'oEEwe':function(_0x1fb115,_0x103cfd){return _0x1fb115===_0x103cfd;},'aiYbg':function(_0x2ccc5d,_0x89d4e0){return _0x2ccc5d instanceof _0x89d4e0;},'wlmOy':'profile.add.autoRouteSkipped','gYoSZ':_0x588383(0x155),'JRHfu':function(_0xf9d91f,_0x461783,_0x4ba5a7){return _0xf9d91f(_0x461783,_0x4ba5a7);},'fZHGO':'\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.','agWlS':function(_0x47c3e9,_0x3bc5c4,_0x79fffc,_0x505476){return _0x47c3e9(_0x3bc5c4,_0x79fffc,_0x505476);},'MRMPr':function(_0x196965,_0x441685){return _0x196965 instanceof _0x441685;}};let _0x18e853;try{_0x18e853=await fetchAuthConfig();}catch(_0x32aff8){return _0x28b3a0?.[_0x588383(0x198)]('profile.add.autoRouteSkipped',{'reason':'no_auth_config','profileName':_0x47dd21}),console['error']('\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20'+(_0x5894eb[_0x588383(0x18c)](_0x32aff8,Error)?_0x32aff8[_0x588383(0x163)]:String(_0x32aff8))),![];}if(!_0x18e853||!_0x18e853['environments']||Object[_0x588383(0x143)](_0x18e853['environments'])['length']===0x0)return _0x28b3a0?.['trackPhaseEnd'](_0x5894eb[_0x588383(0x178)],{'reason':_0x5894eb[_0x588383(0x17d)],'profileName':_0x47dd21}),console['error'](_0x588383(0x186)),![];const _0x2613a6=_0x5894eb['JRHfu'](matchAuthEnvironment,_0x242d5c,_0x18e853);if(!_0x2613a6)return _0x28b3a0?.['trackPhaseEnd']('profile.add.autoRouteSkipped',{'reason':'no_match','profileName':_0x47dd21}),console[_0x588383(0x150)]('\x0a\x20\x20No\x20auth\x20env\x20matches\x20'+_0x242d5c+'.\x20Configured\x20envs:\x20'+Object['keys'](_0x18e853['environments'])['join'](',\x20')+'.'),![];const _0x50bc6d=_0x18e853['environments'][_0x2613a6],_0x47bab1=_0x50bc6d?.['domains']??[];if(_0x12143d&&!_0x4fa38a[_0x588383(0x188)]){const {saveToCloud:_0x1be636}=await _0x26d8dc[_0x588383(0x191)]([{'type':'confirm','name':_0x588383(0x1a1),'message':_0x588383(0x136)+_0x2613a6+'\x27\x20matching\x20'+_0x242d5c+'\x0a\x20\x20(domains:\x20'+_0x47bab1[_0x588383(0x19d)](',\x20')+')\x0a\x20\x20Save\x20\x27'+_0x47dd21+'\x27\x20to\x20the\x20cloud?','default':!![]}]);if(!_0x1be636)return _0x28b3a0?.[_0x588383(0x198)](_0x588383(0x1a0),{'reason':_0x588383(0x13e),'profileName':_0x47dd21}),console[_0x588383(0x150)](_0x5894eb[_0x588383(0x17a)]),![];}const _0x470cc5=_0x47bab1[_0x588383(0x156)](_0x498cfb=>{const _0x8ef8ee=_0x588383;try{return _0x5894eb[_0x8ef8ee(0x17f)](new URL(_0x498cfb)['origin'],new URL(_0x242d5c)[_0x8ef8ee(0x140)]);}catch{return![];}}),_0x4f2434={};!_0x470cc5&&(_0x4f2434[_0x588383(0x175)]=_0x242d5c);try{await _0x5894eb[_0x588383(0x153)](createCloudProfile,_0x47dd21,_0x2613a6,{'settings':_0x4f2434});}catch(_0x54bf89){if(_0x5894eb[_0x588383(0x169)](_0x54bf89,ApiError)&&_0x54bf89[_0x588383(0x16b)]===0x199){console['error']('\x0a\x20\x20A\x20cloud\x20profile\x20named\x20\x22'+_0x47dd21+_0x588383(0x168));throw _0x54bf89;}throw _0x54bf89;}return console[_0x588383(0x18b)]('✓\x20Cloud\x20profile\x20\x27'+_0x47dd21+_0x588383(0x14d)+_0x2613a6+_0x588383(0x19a)+('\x20\x20Next:\x20RANGER_TEST_USERNAME=...\x20RANGER_TEST_PASSWORD=...\x20ranger\x20go\x20--profile\x20'+_0x47dd21)),await sweepOrphansBestEffort(_0x47dd21),_0x28b3a0?.['trackPhaseEnd'](_0x588383(0x14e),{'envKey':_0x2613a6,'profileName':_0x47dd21}),!![];}async function createUnconfiguredCloudProfile(_0x58e2c8,_0x37a734){const _0x2bdb82=_0x304e,_0x1b2838={'MrqRx':function(_0x92185,_0x1ab30b){return _0x92185 instanceof _0x1ab30b;}};try{await createCloudProfile(_0x58e2c8,undefined,{'settings':_0x37a734});}catch(_0x249780){_0x1b2838[_0x2bdb82(0x161)](_0x249780,ApiError)&&_0x249780['status']===0x199&&console['error'](_0x2bdb82(0x197)+_0x58e2c8+_0x2bdb82(0x168));throw _0x249780;}}export async function addEnv(_0x2e7b27,_0x1caa16={},_0x4e0370){const _0x37b2e6=_0x304e,_0x4578ef={'GiYsv':function(_0x5651ae,_0x4a3826){return _0x5651ae+_0x4a3826;},'uGaNY':function(_0x24538b,_0x3656f7){return _0x24538b+_0x3656f7;},'KTqri':_0x37b2e6(0x190),'BBFQx':function(_0x2ba731,_0xce676e){return _0x2ba731===_0xce676e;},'hCxJU':function(_0x50e548,_0x3e605d){return _0x50e548+_0x3e605d;},'FyEDB':function(_0x5d06ea,_0x5d1640){return _0x5d06ea!==_0x5d1640;},'JPuPU':function(_0x1f3658,_0x46383b){return _0x1f3658===_0x46383b;},'kCGAc':'--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','TzVvl':'--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','vjwrv':function(_0x43a043,_0x22b00f){return _0x43a043(_0x22b00f);},'djWvf':'Please\x20provide\x20--url\x20when\x20running\x20in\x20non-interactive\x20mode.\x0aMake\x20sure\x20the\x20service\x20is\x20running\x20on\x20that\x20port\x20before\x20retrying.\x0aExample:\x20ranger\x20profile\x20add\x20local\x20--url\x20http://localhost:3000','oXyZo':function(_0x276560,_0x38a21a,_0x1a0c98){return _0x276560(_0x38a21a,_0x1a0c98);},'KAIWB':_0x37b2e6(0x162),'WdBwK':function(_0x319dba,_0x92050d,_0x4e88c9,_0xa15eee,_0x41126e){return _0x319dba(_0x92050d,_0x4e88c9,_0xa15eee,_0x41126e);},'nzuTM':_0x37b2e6(0x135),'ISgDl':function(_0x3d84bf,_0x3cfe31){return _0x3d84bf instanceof _0x3cfe31;},'ENHLj':function(_0x31c58e,_0x5830d9){return _0x31c58e>_0x5830d9;},'EqsTw':function(_0x453be3,_0x170dd6){return _0x453be3+_0x170dd6;},'jiqtn':function(_0x336b04,_0x2e372e){return _0x336b04(_0x2e372e);},'QPYAp':'\x0a🌐\x20Profile\x20Setup\x0a','xceYh':'\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','FxKfc':_0x37b2e6(0x185),'VqhEK':_0x37b2e6(0x187),'CAeVK':function(_0x1c60a7,_0xec07f3){return _0x1c60a7(_0xec07f3);},'hbiVD':_0x37b2e6(0x184),'OdkXs':'action','DrOlz':'What\x20would\x20you\x20like\x20to\x20do?','PPaTS':_0x37b2e6(0x189),'HZpQs':'Continue\x20anyway','ihEGx':_0x37b2e6(0x196),'eiRYb':function(_0x180821,_0xa673e5,_0x5a4f34,_0x58a11b,_0x1c9834,_0x55eb44){return _0x180821(_0xa673e5,_0x5a4f34,_0x58a11b,_0x1c9834,_0x55eb44);},'HiQft':function(_0x3c3e43,_0x2acf2c){return _0x3c3e43(_0x2acf2c);}};_0x1caa16['ci']&&(console['error'](_0x4578ef[_0x37b2e6(0x160)](_0x4578ef[_0x37b2e6(0x160)](_0x4578ef['uGaNY'](_0x4578ef['GiYsv']('ranger\x20profile\x20add\x20--ci\x20writes\x20to\x20the\x20legacy\x20.ranger/ci/\x20tree\x20which\x20is\x20no\x20longer\x20supported.\x0a'+'Cloud\x20profiles\x20store\x20session\x20state\x20server-side;\x20the\x20--ci\x20flag\x20is\x20gone.\x0a',_0x37b2e6(0x148)),'\x20\x20RANGER_TEST_USERNAME=...\x20RANGER_TEST_PASSWORD=...\x20ranger\x20go\x20--base-url\x20<url>\x0a'),'For\x20a\x20shared\x20cloud\x20profile:\x20ranger\x20profile\x20add\x20<account-email>\x0a'),_0x4578ef[_0x37b2e6(0x139)])),process['exit'](0x1));const _0x385b29={};if(_0x1caa16[_0x37b2e6(0x15d)])for(const _0x490023 of _0x1caa16[_0x37b2e6(0x15d)]){const _0x54e0c0=_0x490023[_0x37b2e6(0x183)](':');if(_0x4578ef['BBFQx'](_0x54e0c0,-0x1))throw new Error('Invalid\x20--setup-header\x20format:\x20\x22'+_0x490023+_0x37b2e6(0x192));const _0x504904=_0x490023['slice'](0x0,_0x54e0c0)[_0x37b2e6(0x17c)](),_0x3f1b5f=_0x490023[_0x37b2e6(0x137)](_0x4578ef['hCxJU'](_0x54e0c0,0x1))['trim']();_0x385b29[_0x504904]=_0x3f1b5f;}if(_0x4578ef[_0x37b2e6(0x14a)](_0x1caa16[_0x37b2e6(0x162)],undefined)&&_0x4578ef[_0x37b2e6(0x19b)](_0x1caa16[_0x37b2e6(0x162)]['trim'](),''))throw new Error(_0x4578ef['kCGAc']);if(_0x1caa16[_0x37b2e6(0x162)]&&_0x1caa16[_0x37b2e6(0x16a)])throw new Error(_0x4578ef['TzVvl']);const _0x1bf837=_0x4578ef['vjwrv'](Boolean,_0x1caa16[_0x37b2e6(0x162)]),_0x1f4065=process['stdin'][_0x37b2e6(0x19e)]&&process[_0x37b2e6(0x16c)][_0x37b2e6(0x19e)];if(!_0x1f4065&&!_0x1caa16['url']&&!_0x1bf837&&!_0x1caa16['skipAuth'])throw new Error(_0x4578ef['djWvf']);if(_0x1bf837){const _0xc7213e=_0x1caa16['cdpEndpoint'];console[_0x37b2e6(0x18b)]('\x0a🔌\x20CDP\x20Profile\x20Setup\x0a'),console[_0x37b2e6(0x18b)]('\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20'+_0xc7213e);const _0x50586b={'cdpEndpoint':_0xc7213e,'isElectron':!![]};Object[_0x37b2e6(0x143)](_0x385b29)[_0x37b2e6(0x173)]>0x0&&(_0x50586b[_0x37b2e6(0x174)]=_0x385b29);await _0x4578ef['oXyZo'](createUnconfiguredCloudProfile,_0x2e7b27,_0x50586b);try{setProfileOverride(process[_0x37b2e6(0x166)](),_0x2e7b27,_0x4578ef['KAIWB'],_0xc7213e),_0x4578ef[_0x37b2e6(0x1a2)](setProfileOverride,process['cwd'](),_0x2e7b27,_0x4578ef['nzuTM'],!![]);}catch(_0x8dafb4){console['error']('\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20'+(_0x4578ef[_0x37b2e6(0x177)](_0x8dafb4,Error)?_0x8dafb4[_0x37b2e6(0x163)]:_0x4578ef['vjwrv'](String,_0x8dafb4)));}console['log'](_0x37b2e6(0x18e)+_0x2e7b27+_0x37b2e6(0x13a)),await sweepOrphansBestEffort(_0x2e7b27),await markActive(_0x2e7b27);return;}if(_0x1caa16[_0x37b2e6(0x145)]){const _0x5ac572={};_0x1caa16[_0x37b2e6(0x16a)]&&(_0x5ac572['baseUrl']=_0x1caa16[_0x37b2e6(0x16a)]);_0x4578ef['ENHLj'](Object['keys'](_0x385b29)['length'],0x0)&&(_0x5ac572['setupHeaders']=_0x385b29);await createUnconfiguredCloudProfile(_0x2e7b27,_0x5ac572),console[_0x37b2e6(0x18b)](_0x4578ef['EqsTw'](_0x4578ef['GiYsv']('✓\x20Cloud\x20profile\x20\x27'+_0x2e7b27+'\x27\x20created\x20with\x20no\x20session.\x0a','\x20\x20Next:\x20set\x20RANGER_TEST_USERNAME\x20/\x20RANGER_TEST_PASSWORD\x20and\x20run\x0a')+('\x20\x20\x20\x20\x20\x20\x20\x20`ranger\x20go\x20--profile\x20'+_0x2e7b27+'`\x0a'),_0x37b2e6(0x146))),await _0x4578ef[_0x37b2e6(0x18f)](sweepOrphansBestEffort,_0x2e7b27),await _0x4578ef['jiqtn'](markActive,_0x2e7b27);return;}if(_0x1caa16['url']){const _0xcb3341=_0x1caa16['url'],_0x234b94=await _0x4578ef['vjwrv'](checkUrlReachability,_0xcb3341);if(!_0x234b94['ok']&&!_0x1caa16[_0x37b2e6(0x157)])throw new Error(_0x37b2e6(0x172)+_0xcb3341+':\x20'+_0x234b94[_0x37b2e6(0x150)]+'\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.');!_0x234b94['ok']&&_0x1caa16[_0x37b2e6(0x157)]&&console['log']('⚠\x20Could\x20not\x20reach\x20'+_0xcb3341+':\x20'+_0x234b94[_0x37b2e6(0x150)]+'\x20(continuing\x20with\x20--force)');}else{console['log'](_0x4578ef['QPYAp']),console['log'](_0x4578ef[_0x37b2e6(0x170)]),console['log'](_0x37b2e6(0x144));let _0x2fe0af='',_0x3344ce=![];while(!![]){const _0x2b5045=await _0x26d8dc[_0x37b2e6(0x191)]([{'type':_0x37b2e6(0x133),'name':'baseUrl','message':_0x3344ce?_0x4578ef['FxKfc']:'What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','default':_0x2fe0af||_0x4578ef['VqhEK']}]);_0x2fe0af=_0x2b5045['baseUrl'];const _0x5c7298=await _0x4578ef['CAeVK'](checkUrlReachability,_0x2fe0af);if(_0x5c7298['ok'])break;const _0x3e0307=/^[a-zA-Z][\w+.-]*:\/\//['test'](_0x2fe0af),_0x4f6eda=_0x5c7298['isProtocolError']&&!_0x3e0307,_0x3d4ac5=_0x4f6eda?'http://'+_0x2fe0af:null;_0x3344ce=!![],console['log'](_0x37b2e6(0x17e)+_0x2fe0af+':\x20'+_0x5c7298['error']);_0x3d4ac5&&console['log']('\x20\x20Did\x20you\x20mean\x20'+_0x3d4ac5+'?');const {action:_0xb5b7}=await _0x26d8dc['prompt']([{'type':_0x4578ef[_0x37b2e6(0x195)],'name':_0x4578ef['OdkXs'],'message':_0x4578ef[_0x37b2e6(0x132)],'choices':[..._0x3d4ac5?[{'name':'Use\x20'+_0x3d4ac5,'value':'use_suggestion'}]:[],{'name':_0x4578ef[_0x37b2e6(0x154)],'value':_0x37b2e6(0x14b)},{'name':_0x4578ef['HZpQs'],'value':_0x4578ef['ihEGx']}]}]);if(_0xb5b7===_0x37b2e6(0x182)&&_0x3d4ac5){_0x2fe0af=_0x3d4ac5;const _0x36a25c=await checkUrlReachability(_0x2fe0af);if(_0x36a25c['ok'])break;console[_0x37b2e6(0x18b)](_0x37b2e6(0x15a)+_0x2fe0af+':\x20'+_0x36a25c['error']);}else{if(_0xb5b7==='continue')break;}}_0x1caa16={..._0x1caa16,'url':_0x2fe0af};}let _0x68fdf9=![];try{_0x68fdf9=await _0x4578ef[_0x37b2e6(0x181)](tryAutoRouteCloudProfile,_0x2e7b27,_0x1caa16[_0x37b2e6(0x16a)],_0x1caa16,_0x1f4065,_0x4e0370);}catch(_0x4315a8){console['error']('\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22'+_0x2e7b27+_0x37b2e6(0x13d)+(_0x4578ef['ISgDl'](_0x4315a8,Error)?_0x4315a8[_0x37b2e6(0x163)]:String(_0x4315a8))),process[_0x37b2e6(0x179)](0x1);}!_0x68fdf9&&process[_0x37b2e6(0x179)](0x1),await _0x4578ef[_0x37b2e6(0x15b)](markActive,_0x2e7b27);}
@@ -1 +1 @@
1
- (function(_0x2b1fbd,_0x25612b){const _0x40d422=_0x39d0,_0x34e0ce=_0x2b1fbd();while(!![]){try{const _0xb3e439=parseInt(_0x40d422(0x1e2))/0x1+parseInt(_0x40d422(0x1d8))/0x2*(-parseInt(_0x40d422(0x1d2))/0x3)+-parseInt(_0x40d422(0x1db))/0x4*(parseInt(_0x40d422(0x1d3))/0x5)+-parseInt(_0x40d422(0x1e1))/0x6+parseInt(_0x40d422(0x1dc))/0x7*(-parseInt(_0x40d422(0x1d5))/0x8)+parseInt(_0x40d422(0x1dd))/0x9+parseInt(_0x40d422(0x1d0))/0xa*(parseInt(_0x40d422(0x1de))/0xb);if(_0xb3e439===_0x25612b)break;else _0x34e0ce['push'](_0x34e0ce['shift']());}catch(_0x3de4a8){_0x34e0ce['push'](_0x34e0ce['shift']());}}}(_0xf7e4,0x9014e));import{readFile,writeFile}from'fs/promises';function _0xf7e4(){const _0x4127aa=['log','\x20\x20The\x20encrypted\x20auth.json.enc\x20can\x20be\x20committed.','110AUVDgD','utf-8','12711BlgacS','2863535olTPww','No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','8lBojae','DFhYm','jFgXv','382fXODNg','\x20\x20You\x20can\x20safely\x20commit\x20this\x20file\x20to\x20git.','.\x20Run\x20first:\x20ranger\x20profile\x20add\x20with\x20authentication,\x20or\x20ranger\x20profile\x20update','8ijmGom','6264097jbgJDa','2060118oyuKJv','2285679ZQbmyT','\x0a✓\x20Encrypted\x20auth\x20saved\x20to:\x20','aLvDY','37440oHGfAX','931369OvZTkd','vAdqs','\x20\x20Run\x20ranger\x20setup\x20in\x20CI\x20to\x20decrypt\x20at\x20runtime.'];_0xf7e4=function(){return _0x4127aa;};return _0xf7e4();}import{join}from'path';import{existsSync}from'fs';function _0x39d0(_0x1926bb,_0x406adb){_0x1926bb=_0x1926bb-0x1d0;const _0xf7e410=_0xf7e4();let _0x39d0f5=_0xf7e410[_0x1926bb];return _0x39d0f5;}import{encrypt}from'./utils/crypto.js';import{getToken}from'./utils/keychain.js';import{getEnvDir}from'./utils/settings.js';export async function authEncrypt(_0x28cdfc){const _0x126048=_0x39d0,_0x4b5ca0={'aLvDY':function(_0x14742d,_0x2d54ab){return _0x14742d(_0x2d54ab);},'DFhYm':function(_0x38492e,_0xdeeda2){return _0x38492e+_0xdeeda2;},'PMHJb':function(_0x4273d6,_0x14550c){return _0x4273d6(_0x14550c);},'xhBwO':function(_0x4ccc33){return _0x4ccc33();},'vAdqs':_0x126048(0x1d4),'jFgXv':_0x126048(0x1d1),'ZNeLk':function(_0x418caa,_0x28a804,_0x22db6f){return _0x418caa(_0x28a804,_0x22db6f);},'Qvnlp':_0x126048(0x1e4)},_0x3b9686=_0x4b5ca0[_0x126048(0x1e0)](getEnvDir,_0x28cdfc),_0xeb874e=join(_0x3b9686,'auth.json'),_0xf1a163=_0x4b5ca0[_0x126048(0x1d6)](_0xeb874e,'.enc');if(!_0x4b5ca0['aLvDY'](existsSync,_0x3b9686))throw new Error('Profile\x20\x22'+_0x28cdfc+'\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x28cdfc);if(!_0x4b5ca0['PMHJb'](existsSync,_0xeb874e))throw new Error('No\x20auth.json\x20found\x20at\x20'+_0xeb874e+_0x126048(0x1da));const _0x46d97c=await _0x4b5ca0['xhBwO'](getToken);if(!_0x46d97c)throw new Error(_0x4b5ca0[_0x126048(0x1e3)]);const _0xb0d61d=await readFile(_0xeb874e,_0x4b5ca0[_0x126048(0x1d7)]),_0x1a2a4f=encrypt(_0xb0d61d,_0x46d97c);await _0x4b5ca0['ZNeLk'](writeFile,_0xf1a163,_0x1a2a4f),console[_0x126048(0x1e5)](_0x126048(0x1df)+_0xf1a163),console[_0x126048(0x1e5)](_0x126048(0x1d9)),console[_0x126048(0x1e5)](_0x4b5ca0['Qvnlp']),_0x4b5ca0['PMHJb'](existsSync,_0xf1a163)&&(console['log']('\x0a\x20\x20The\x20plaintext\x20auth.json\x20is\x20gitignored\x20for\x20security.'),console[_0x126048(0x1e5)](_0x126048(0x1e6)));}
1
+ (function(_0x19fc95,_0xf24bb0){var _0x43bb37=_0x5d38,_0x4622b3=_0x19fc95();while(!![]){try{var _0x39d308=parseInt(_0x43bb37(0x1dd))/0x1*(-parseInt(_0x43bb37(0x1db))/0x2)+parseInt(_0x43bb37(0x1da))/0x3+parseInt(_0x43bb37(0x1d3))/0x4+parseInt(_0x43bb37(0x1d2))/0x5*(-parseInt(_0x43bb37(0x1e2))/0x6)+-parseInt(_0x43bb37(0x1d8))/0x7*(-parseInt(_0x43bb37(0x1d1))/0x8)+parseInt(_0x43bb37(0x1de))/0x9*(parseInt(_0x43bb37(0x1e0))/0xa)+parseInt(_0x43bb37(0x1d4))/0xb;if(_0x39d308===_0xf24bb0)break;else _0x4622b3['push'](_0x4622b3['shift']());}catch(_0x2ddb3f){_0x4622b3['push'](_0x4622b3['shift']());}}}(_0x4538,0x2066d));export async function authEncrypt(_0x33c39a){var _0x4a15e9=_0x5d38,_0x4f55b9={'ygiXI':function(_0x45fddd,_0xd6d6e){return _0x45fddd+_0xd6d6e;},'wLSdJ':function(_0x2bf04d,_0x52a5e){return _0x2bf04d+_0x52a5e;},'exagv':'For\x20SSO/headed\x20login:\x20ranger\x20profile\x20add\x20<account-email>\x0a','TDgFj':_0x4a15e9(0x1e1)};console[_0x4a15e9(0x1df)](_0x4f55b9['ygiXI'](_0x4f55b9['wLSdJ'](_0x4f55b9[_0x4a15e9(0x1d7)]('ranger\x20profile\x20encrypt-auth\x20writes\x20to\x20the\x20legacy\x20.ranger/ci/\x20tree\x20which\x20is\x20no\x20longer\x20supported.\x0a',_0x4a15e9(0x1d6))+'Use\x20the\x20new\x20flow:\x0a','\x20\x20RANGER_TEST_USERNAME=...\x20RANGER_TEST_PASSWORD=...\x20ranger\x20go\x20--base-url\x20<url>\x0a')+_0x4f55b9[_0x4a15e9(0x1d9)],_0x4f55b9[_0x4a15e9(0x1d5)])),process[_0x4a15e9(0x1dc)](0x1);}function _0x5d38(_0x479397,_0x28dc6d){_0x479397=_0x479397-0x1d1;var _0x4538eb=_0x4538();var _0x5d3866=_0x4538eb[_0x479397];return _0x5d3866;}function _0x4538(){var _0x197dc2=['9JOSMbc','666CVRgHx','error','34900aUwAUL','See:\x20docs/feature/cloud-profiles-old-vs-new-structure.md','6becFrZ','8UYHydw','674165sKqwXt','145828tEZWUL','279158gsynXD','TDgFj','Cloud\x20profiles\x20store\x20session\x20state\x20server-side;\x20encrypted\x20on-disk\x20auth\x20is\x20gone.\x0a','ygiXI','241948EYYdkL','exagv','25602rUhTQH','21254wmQXvP','exit'];_0x4538=function(){return _0x197dc2;};return _0x4538();}
@@ -1 +1 @@
1
- const _0x2f183c=_0xbe02;(function(_0x28201b,_0x1a022f){const _0x545871=_0xbe02,_0x499a5e=_0x28201b();while(!![]){try{const _0x14a291=parseInt(_0x545871(0xe8))/0x1*(parseInt(_0x545871(0x102))/0x2)+parseInt(_0x545871(0xf0))/0x3+-parseInt(_0x545871(0xda))/0x4+-parseInt(_0x545871(0xf2))/0x5*(-parseInt(_0x545871(0xcc))/0x6)+-parseInt(_0x545871(0xe6))/0x7+-parseInt(_0x545871(0xc9))/0x8+parseInt(_0x545871(0xfa))/0x9*(parseInt(_0x545871(0xee))/0xa);if(_0x14a291===_0x1a022f)break;else _0x499a5e['push'](_0x499a5e['shift']());}catch(_0x28affe){_0x499a5e['push'](_0x499a5e['shift']());}}}(_0x3471,0x2ab89));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','feature-tracker',_0x2f183c(0xf4),'e2e-test-recommender'],opencodePluginName=_0x2f183c(0xd8);function parseJsonc(_0xe853f2){const _0x53a89e=_0x2f183c,_0x61979=_0xe853f2[_0x53a89e(0xf6)](/\/\*[\s\S]*?\*\//g,''),_0x40af98=_0x61979['replace'](/^\s*\/\/.*$/gm,''),_0x7b28dd=_0x40af98[_0x53a89e(0xf6)](/,\s*([}\]])/g,'$1');return JSON['parse'](_0x7b28dd);}async function removeOpencodePluginConfig(_0x1f4a9f){const _0x2745e1=_0x2f183c,_0x1e6340={'GKsqs':function(_0x4dd3fe,_0x23ee85){return _0x4dd3fe!==_0x23ee85;},'EHDHa':'string','PpmRV':function(_0x1a3fcb,_0x2139aa){return _0x1a3fcb!==_0x2139aa;},'LOWhv':function(_0x8d840f,_0x2cfce3,_0x8742bb){return _0x8d840f(_0x2cfce3,_0x8742bb);},'CpYCj':function(_0x8abe13,_0x3e2cc4){return _0x8abe13===_0x3e2cc4;},'HYKim':function(_0x4af379,_0x147f87){return _0x4af379+_0x147f87;}};if(!existsSync(_0x1f4a9f))return![];let _0x3040e5;try{const _0x528137=await _0x1e6340[_0x2745e1(0xf3)](readFile,_0x1f4a9f,'utf-8');_0x3040e5=parseJsonc(_0x528137);}catch{return![];}const _0x4c55ea=Array[_0x2745e1(0xe5)](_0x3040e5[_0x2745e1(0xdc)])?_0x3040e5['plugin']:[];if(_0x1e6340['CpYCj'](_0x4c55ea['length'],0x0))return![];const _0x125257=_0x4c55ea['filter'](_0x14b071=>{const _0x3a0d37=_0x2745e1;if(_0x1e6340[_0x3a0d37(0xe3)](typeof _0x14b071,_0x1e6340['EHDHa']))return!![];return _0x1e6340[_0x3a0d37(0xd4)](_0x14b071,opencodePluginName);});if(_0x1e6340['CpYCj'](_0x125257[_0x2745e1(0xfd)],_0x4c55ea['length']))return![];return _0x1e6340[_0x2745e1(0xff)](_0x125257[_0x2745e1(0xfd)],0x0)?delete _0x3040e5[_0x2745e1(0xdc)]:_0x3040e5[_0x2745e1(0xdc)]=_0x125257,await writeFile(_0x1f4a9f,_0x1e6340[_0x2745e1(0xd7)](JSON['stringify'](_0x3040e5,null,0x2),'\x0a')),!![];}async function uninstallClaudePlugin(_0x312a6e){const _0x564c25=_0x2f183c,_0x583b51={'MKXHt':function(_0x2bf177,_0x3dd587){return _0x2bf177(_0x3dd587);},'NIlxK':function(_0x33731f,_0x1f27f2){return _0x33731f===_0x1f27f2;},'rVqSz':_0x564c25(0xe7),'AXqWP':_0x564c25(0xd0),'KGKod':function(_0x384a7c,_0x584c63,_0x58d2e3,_0x256c1d){return _0x384a7c(_0x584c63,_0x58d2e3,_0x256c1d);},'hIDYu':_0x564c25(0xca),'mGrlY':_0x564c25(0xde)};return new Promise(_0x5836ec=>{const _0x40c9fb=_0x564c25,_0x2f4b4b=[_0x40c9fb(0xdc),'uninstall',_0x583b51['rVqSz']];_0x312a6e&&_0x2f4b4b['push'](_0x583b51['AXqWP'],_0x312a6e);const _0x2c6918=_0x583b51['KGKod'](spawn,_0x583b51[_0x40c9fb(0xf7)],_0x2f4b4b,{'stdio':_0x40c9fb(0xed),'shell':process['platform']===_0x583b51['mGrlY']});_0x2c6918['on'](_0x40c9fb(0xe0),_0x2f1415=>{const _0x11c92f=_0x40c9fb;_0x583b51['MKXHt'](_0x5836ec,_0x583b51[_0x11c92f(0xd1)](_0x2f1415,0x0));}),_0x2c6918['on'](_0x40c9fb(0xf1),()=>{_0x5836ec(![]);});});}async function removeMarketplace(){const _0x395dca=_0x2f183c,_0x2b5c6e={'tKqCo':function(_0x1dcf00,_0x56a0fe){return _0x1dcf00===_0x56a0fe;},'QyEAp':function(_0x33433f,_0x575970){return _0x33433f(_0x575970);},'fEWRp':function(_0x2964ab,_0x192b8c,_0x26f21b,_0x22aa8e){return _0x2964ab(_0x192b8c,_0x26f21b,_0x22aa8e);},'fqKfR':_0x395dca(0xcb),'ckdqg':_0x395dca(0xe4),'skRJO':_0x395dca(0xeb),'fIrVG':_0x395dca(0xed)};return new Promise(_0x3b079b=>{const _0x45381e=_0x395dca,_0x3d3f14=_0x2b5c6e['fEWRp'](spawn,'claude',[_0x45381e(0xdc),_0x2b5c6e[_0x45381e(0xf5)],_0x2b5c6e['ckdqg'],_0x2b5c6e[_0x45381e(0xdb)]],{'stdio':_0x2b5c6e[_0x45381e(0xdf)],'shell':process['platform']==='win32'});_0x3d3f14['on'](_0x45381e(0xe0),_0x381d15=>{const _0x56ea8f=_0x45381e;_0x3b079b(_0x2b5c6e[_0x56ea8f(0xe1)](_0x381d15,0x0));}),_0x3d3f14['on']('error',()=>{_0x2b5c6e['QyEAp'](_0x3b079b,![]);});});}function _0xbe02(_0x502292,_0x389eba){_0x502292=_0x502292-0xc9;const _0x3471f1=_0x3471();let _0xbe02ee=_0x3471f1[_0x502292];return _0xbe02ee;}function _0x3471(){const _0x304183=['✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','141273iYldnB','✓\x20Removed\x20stored\x20credentials','✓\x20Removed\x20trailhead\x20marketplace','length','\x0a✅\x20Cleanup\x20complete!\x0a','CpYCj','eprMe','lrbgI','410654eFzZHj','log','ScayG','2680848vcirWL','claude','marketplace','274914BIZOGx','\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','RrDNI','bhRKX','--scope','NIlxK','✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','eTIoH','PpmRV','project','✓\x20Removed\x20project\x20skill:\x20','HYKim','@ranger-testing/opencode-plugin','xbTvP','233588OltqPQ','skRJO','plugin','YpeUG','win32','fIrVG','close','tKqCo','bTjsf','GKsqs','remove','isArray','1005942kAwiWm','ranger@trailhead','1oLGNir','✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','✓\x20Removed\x20OpenCode\x20user\x20skill:\x20','trailhead','✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)','pipe','100DLOoDL','✓\x20Removed\x20.ranger/\x20directory','774777cGiClF','error','10nrtBNc','LOWhv','bug-bash','fqKfR','replace','hIDYu','vyqVF'];_0x3471=function(){return _0x304183;};return _0x3471();}export async function clean(){const _0x4fdf38=_0x2f183c,_0x543764={'NNHSz':_0x4fdf38(0xcd),'bTjsf':function(_0x35fe9f){return _0x35fe9f();},'lrbgI':function(_0x46be5a,_0x19a1f0){return _0x46be5a(_0x19a1f0);},'RrDNI':function(_0x478e1c,_0x32bb04){return _0x478e1c(_0x32bb04);},'bhRKX':function(_0xd49377,_0x1f4332,_0x33cd67){return _0xd49377(_0x1f4332,_0x33cd67);},'eprMe':_0x4fdf38(0xef),'POrNc':function(_0x3394d7){return _0x3394d7();},'MHLuK':function(_0x1b6469,_0x23690e){return _0x1b6469(_0x23690e);},'vyqVF':_0x4fdf38(0xd5),'xbTvP':function(_0x41c513,_0xfc04b5,_0x3fc126){return _0x41c513(_0xfc04b5,_0x3fc126);},'eTIoH':function(_0x283b24,_0x2bff3e){return _0x283b24(_0x2bff3e);},'YpeUG':'user','ScayG':'opencode.json','FiaAN':function(_0x54deb6,_0x51a1f4){return _0x54deb6(_0x51a1f4);},'hiAMW':_0x4fdf38(0xf9)};console[_0x4fdf38(0x103)](_0x543764['NNHSz']);let _0x40ef49=![];try{await _0x543764['bTjsf'](deleteAllCredentials),console['log'](_0x4fdf38(0xfb)),_0x40ef49=!![];}catch{}const _0x2653c0=getCacheFile();_0x543764['lrbgI'](existsSync,_0x2653c0)&&(await _0x543764[_0x4fdf38(0xce)](rm,_0x2653c0),_0x40ef49=!![]);const _0x24ed9a=_0x543764[_0x4fdf38(0xe2)](getRangerDir);_0x543764[_0x4fdf38(0x101)](existsSync,_0x24ed9a)&&(await _0x543764[_0x4fdf38(0xcf)](rm,_0x24ed9a,{'recursive':!![]}),console['log'](_0x543764[_0x4fdf38(0x100)]),_0x40ef49=!![]);const _0x3c9dda=_0x543764['POrNc'](getProjectSkillsDir);for(const _0x5d139c of skillsToRemove){const _0x3eaacb=join(_0x3c9dda,_0x5d139c);existsSync(_0x3eaacb)&&(await rm(_0x3eaacb,{'recursive':!![]}),console[_0x4fdf38(0x103)](_0x4fdf38(0xd6)+_0x5d139c),_0x40ef49=!![]);}const _0x512876=getUserSkillsDir();for(const _0x3878f8 of skillsToRemove){const _0x213d28=join(_0x512876,_0x3878f8);existsSync(_0x213d28)&&(await rm(_0x213d28,{'recursive':!![]}),console[_0x4fdf38(0x103)]('✓\x20Removed\x20user\x20skill:\x20'+_0x3878f8),_0x40ef49=!![]);}const _0x46a57f=_0x543764['MHLuK'](getOpencodeSkillsDir,_0x543764[_0x4fdf38(0xf8)]);for(const _0x10255b of skillsToRemove){const _0x3f8f1b=_0x543764['bhRKX'](join,_0x46a57f,_0x10255b);existsSync(_0x3f8f1b)&&(await _0x543764['xbTvP'](rm,_0x3f8f1b,{'recursive':!![]}),console[_0x4fdf38(0x103)]('✓\x20Removed\x20OpenCode\x20project\x20skill:\x20'+_0x10255b),_0x40ef49=!![]);}const _0x6450fb=_0x543764['eTIoH'](getOpencodeSkillsDir,_0x543764[_0x4fdf38(0xdd)]);for(const _0x11dd3b of skillsToRemove){const _0x3eb139=join(_0x6450fb,_0x11dd3b);_0x543764[_0x4fdf38(0xd3)](existsSync,_0x3eb139)&&(await rm(_0x3eb139,{'recursive':!![]}),console['log'](_0x4fdf38(0xea)+_0x11dd3b),_0x40ef49=!![]);}const _0x5476a7=join(getOpencodeConfigDir(_0x543764[_0x4fdf38(0xf8)]),_0x543764[_0x4fdf38(0x104)]);await removeOpencodePluginConfig(_0x5476a7)&&(console['log'](_0x4fdf38(0xe9)),_0x40ef49=!![]);const _0x33f4b4=_0x543764[_0x4fdf38(0xd9)](join,_0x543764['FiaAN'](getOpencodeConfigDir,_0x543764[_0x4fdf38(0xdd)]),_0x543764[_0x4fdf38(0x104)]);await _0x543764['RrDNI'](removeOpencodePluginConfig,_0x33f4b4)&&(console[_0x4fdf38(0x103)](_0x4fdf38(0xec)),_0x40ef49=!![]);const _0x23d4ef=await _0x543764['bTjsf'](uninstallClaudePlugin);_0x23d4ef&&(console[_0x4fdf38(0x103)](_0x4fdf38(0xd2)),_0x40ef49=!![]);const _0x1fc363=await _0x543764[_0x4fdf38(0xd3)](uninstallClaudePlugin,_0x543764[_0x4fdf38(0xf8)]);_0x1fc363&&(console['log'](_0x543764['hiAMW']),_0x40ef49=!![]);const _0x95d0cf=await _0x543764[_0x4fdf38(0xe2)](removeMarketplace);_0x95d0cf&&(console['log'](_0x4fdf38(0xfc)),_0x40ef49=!![]),_0x40ef49?console['log'](_0x4fdf38(0xfe)):console[_0x4fdf38(0x103)]('Nothing\x20to\x20clean\x20up.\x0a');}
1
+ const _0x59c348=_0x16aa;(function(_0x1db2e8,_0x48c158){const _0x532a99=_0x16aa,_0x459009=_0x1db2e8();while(!![]){try{const _0x1fc1d8=-parseInt(_0x532a99(0x1d9))/0x1*(-parseInt(_0x532a99(0x1de))/0x2)+-parseInt(_0x532a99(0x1b3))/0x3+parseInt(_0x532a99(0x1b7))/0x4*(parseInt(_0x532a99(0x1c6))/0x5)+-parseInt(_0x532a99(0x1b6))/0x6*(-parseInt(_0x532a99(0x1d4))/0x7)+parseInt(_0x532a99(0x1c5))/0x8+-parseInt(_0x532a99(0x1d5))/0x9*(-parseInt(_0x532a99(0x1df))/0xa)+parseInt(_0x532a99(0x1c3))/0xb*(-parseInt(_0x532a99(0x1e0))/0xc);if(_0x1fc1d8===_0x48c158)break;else _0x459009['push'](_0x459009['shift']());}catch(_0x2f1614){_0x459009['push'](_0x459009['shift']());}}}(_0x2d38,0x35498));import{rm,readFile,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';function _0x16aa(_0x231c3f,_0xab716d){_0x231c3f=_0x231c3f-0x1af;const _0x2d386c=_0x2d38();let _0x16aab0=_0x2d386c[_0x231c3f];return _0x16aab0;}import{spawn}from'child_process';import{deleteAllCredentials}from'./utils/keychain.js';import{getProjectRoot,getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getCacheFile}from'./utils/sessionCache.js';function _0x2d38(){const _0x3df5a2=['469170qwfwOf','kuZxp','error','bBwfc','11UMymtH','parse','CRyrj','dTDUW','hAmmS','19742TbCPux','20TOKwBl','6477756dfiHgw','tPYZD','rHIYP','✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','UYLpr','QQPOV','Hcqqz','log','USglo','ignore','platform','close','win32','marketplace','39894BPPHew','isArray','KDgjF','44706vARcZy','4zOItFS','claude','FpICW','plugin','BbsPu','UUdmb','lRCaJ','\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','feature-tracker','user','eyyyc','GXLYx','11CscilB','replace','901536kzInsj','1744895kxOccE','CdZDU','oIUYa','uninstall','VXkfW','length','✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)','✓\x20Removed\x20OpenCode\x20user\x20skill:\x20','rFUQK','IdLCj','BOJxr','✓\x20Removed\x20project\x20skill:\x20','stringify','nDGEj','91RrdcHp'];_0x2d38=function(){return _0x3df5a2;};return _0x2d38();}import{getOpencodeConfigDir,getOpencodeSkillsDir}from'./utils/opencodeConfig.js';const skillsToRemove=['ranger',_0x59c348(0x1bf),'bug-bash','e2e-test-recommender'],opencodePluginName='@ranger-testing/opencode-plugin';function parseJsonc(_0x5b8d26){const _0x2cda05=_0x59c348,_0x3800f3=_0x5b8d26['replace'](/\/\*[\s\S]*?\*\//g,''),_0x380abf=_0x3800f3[_0x2cda05(0x1c4)](/^\s*\/\/.*$/gm,''),_0x4fc25c=_0x380abf[_0x2cda05(0x1c4)](/,\s*([}\]])/g,'$1');return JSON[_0x2cda05(0x1da)](_0x4fc25c);}async function removeOpencodePluginConfig(_0x3288b4){const _0x154491=_0x59c348,_0x1240e3={'hKlzk':function(_0xc23dcb,_0xb01fd9){return _0xc23dcb!==_0xb01fd9;},'pNTKi':function(_0x370de0,_0x40adf1){return _0x370de0(_0x40adf1);},'wiXYK':function(_0x1548aa,_0x156608,_0x1db826){return _0x1548aa(_0x156608,_0x1db826);},'KZfdI':'utf-8','JSSAH':function(_0x172c9f,_0x3538b2){return _0x172c9f(_0x3538b2);},'IdLCj':function(_0x5709ec,_0x337fe9){return _0x5709ec===_0x337fe9;},'iuvKT':function(_0x158a65,_0x2960c4){return _0x158a65===_0x2960c4;}};if(!_0x1240e3['pNTKi'](existsSync,_0x3288b4))return![];let _0x1df23c;try{const _0x1544f9=await _0x1240e3['wiXYK'](readFile,_0x3288b4,_0x1240e3['KZfdI']);_0x1df23c=_0x1240e3['JSSAH'](parseJsonc,_0x1544f9);}catch{return![];}const _0x240aec=Array[_0x154491(0x1b4)](_0x1df23c['plugin'])?_0x1df23c[_0x154491(0x1ba)]:[];if(_0x1240e3[_0x154491(0x1cf)](_0x240aec[_0x154491(0x1cb)],0x0))return![];const _0x54d9f7=_0x240aec['filter'](_0x40609c=>{if(typeof _0x40609c!=='string')return!![];return _0x1240e3['hKlzk'](_0x40609c,opencodePluginName);});if(_0x1240e3[_0x154491(0x1cf)](_0x54d9f7[_0x154491(0x1cb)],_0x240aec[_0x154491(0x1cb)]))return![];return _0x1240e3['iuvKT'](_0x54d9f7['length'],0x0)?delete _0x1df23c[_0x154491(0x1ba)]:_0x1df23c[_0x154491(0x1ba)]=_0x54d9f7,await writeFile(_0x3288b4,JSON[_0x154491(0x1d2)](_0x1df23c,null,0x2)+'\x0a'),!![];}async function uninstallClaudePlugin(_0x11a42d){const _0xcd7bc=_0x59c348,_0x32cfba={'BOJxr':function(_0x38d650,_0x168cb5){return _0x38d650(_0x168cb5);},'tPYZD':'plugin','dTDUW':_0xcd7bc(0x1c9),'nJUhX':'ranger@trailhead','ozcBj':'--scope','UUdmb':function(_0x584266,_0x33c083,_0x7886b6,_0x199684){return _0x584266(_0x33c083,_0x7886b6,_0x199684);},'GXLYx':_0xcd7bc(0x1e9),'hAmmS':function(_0x5d2d37){return _0x5d2d37();},'kuZxp':_0xcd7bc(0x1b1),'Hcqqz':'close','UYLpr':_0xcd7bc(0x1d7)};return new Promise(_0x3bb09a=>{const _0x37778a=_0xcd7bc,_0x42fc9e=[_0x32cfba[_0x37778a(0x1e1)],_0x32cfba[_0x37778a(0x1dc)],_0x32cfba['nJUhX']];_0x11a42d&&_0x42fc9e['push'](_0x32cfba['ozcBj'],_0x11a42d);const _0x4fa61f=_0x32cfba[_0x37778a(0x1bc)](spawn,'claude',_0x42fc9e,{'stdio':[_0x32cfba['GXLYx'],_0x32cfba[_0x37778a(0x1c2)],'ignore'],'cwd':_0x11a42d?_0x32cfba[_0x37778a(0x1dd)](getProjectRoot):undefined,'shell':process[_0x37778a(0x1af)]===_0x32cfba[_0x37778a(0x1d6)]});_0x4fa61f['on'](_0x32cfba[_0x37778a(0x1e6)],_0x2a70b8=>{const _0x3d298d=_0x37778a;_0x32cfba[_0x3d298d(0x1d0)](_0x3bb09a,_0x2a70b8===0x0);}),_0x4fa61f['on'](_0x32cfba[_0x37778a(0x1e4)],()=>{_0x32cfba['BOJxr'](_0x3bb09a,![]);});});}async function removeMarketplace(){const _0x5ca7ea=_0x59c348,_0x465202={'tNptM':function(_0xa7296,_0x42a04e){return _0xa7296(_0x42a04e);},'KDgjF':function(_0x465f97,_0x1aaf5e){return _0x465f97===_0x1aaf5e;},'ukoZe':_0x5ca7ea(0x1b8),'lRCaJ':_0x5ca7ea(0x1ba),'nDGEj':_0x5ca7ea(0x1b2),'CRyrj':'trailhead','BbsPu':_0x5ca7ea(0x1e9),'QQPOV':_0x5ca7ea(0x1b0)};return new Promise(_0x565e56=>{const _0x11ff4a=_0x5ca7ea,_0x46f4d7={'Xzagd':function(_0x4c6970,_0x10e44e){return _0x465202['tNptM'](_0x4c6970,_0x10e44e);},'kDdUG':function(_0x4f0b4b,_0x45bc73){const _0x41cc69=_0x16aa;return _0x465202[_0x41cc69(0x1b5)](_0x4f0b4b,_0x45bc73);}},_0x348471=spawn(_0x465202['ukoZe'],[_0x465202[_0x11ff4a(0x1bd)],_0x465202[_0x11ff4a(0x1d3)],'remove',_0x465202[_0x11ff4a(0x1db)]],{'stdio':[_0x465202['BbsPu'],_0x465202[_0x11ff4a(0x1bb)],_0x465202['BbsPu']],'shell':process[_0x11ff4a(0x1af)]===_0x11ff4a(0x1b1)});_0x348471['on'](_0x465202[_0x11ff4a(0x1e5)],_0x26cb9c=>{_0x46f4d7['Xzagd'](_0x565e56,_0x46f4d7['kDdUG'](_0x26cb9c,0x0));}),_0x348471['on'](_0x11ff4a(0x1d7),()=>{_0x565e56(![]);});});}export async function clean(){const _0x13d74a=_0x59c348,_0x1fa483={'IdmCs':_0x13d74a(0x1be),'USglo':'✓\x20Removed\x20stored\x20credentials','CdZDU':function(_0x202684,_0x55830e){return _0x202684(_0x55830e);},'InwYx':function(_0x2b9f4c,_0x882526,_0x2fdf58){return _0x2b9f4c(_0x882526,_0x2fdf58);},'oIKwI':'✓\x20Removed\x20.ranger/\x20directory','VXkfW':function(_0xb83325,_0x25a014,_0x703344){return _0xb83325(_0x25a014,_0x703344);},'bBwfc':function(_0x4442cf){return _0x4442cf();},'ThRoF':function(_0x33b227,_0x4a58f1,_0x3289a6){return _0x33b227(_0x4a58f1,_0x3289a6);},'rFUQK':function(_0x56ad9d,_0x4a1a39,_0x21c759){return _0x56ad9d(_0x4a1a39,_0x21c759);},'ICzZz':function(_0x3343d4,_0x425a83,_0x3c1ebf){return _0x3343d4(_0x425a83,_0x3c1ebf);},'NhktB':function(_0x4abd8c,_0x16f32f,_0x385674){return _0x4abd8c(_0x16f32f,_0x385674);},'FSOfz':_0x13d74a(0x1c0),'EZDpE':'opencode.json','oIUYa':_0x13d74a(0x1cc),'TftZW':'project','eyyyc':_0x13d74a(0x1e3),'FpICW':'✓\x20Removed\x20trailhead\x20marketplace','rHIYP':'\x0a✅\x20Cleanup\x20complete!\x0a'};console[_0x13d74a(0x1e7)](_0x1fa483['IdmCs']);let _0x3b5eea=![];try{await deleteAllCredentials(),console['log'](_0x1fa483[_0x13d74a(0x1e8)]),_0x3b5eea=!![];}catch{}const _0xf76a31=getCacheFile();existsSync(_0xf76a31)&&(await _0x1fa483[_0x13d74a(0x1c7)](rm,_0xf76a31),_0x3b5eea=!![]);const _0xb80ae3=getRangerDir();_0x1fa483['CdZDU'](existsSync,_0xb80ae3)&&(await _0x1fa483['InwYx'](rm,_0xb80ae3,{'recursive':!![]}),console['log'](_0x1fa483['oIKwI']),_0x3b5eea=!![]);const _0x4bca53=getProjectSkillsDir();for(const _0x27c4ec of skillsToRemove){const _0x2749e0=_0x1fa483['VXkfW'](join,_0x4bca53,_0x27c4ec);existsSync(_0x2749e0)&&(await _0x1fa483[_0x13d74a(0x1ca)](rm,_0x2749e0,{'recursive':!![]}),console['log'](_0x13d74a(0x1d1)+_0x27c4ec),_0x3b5eea=!![]);}const _0x282f0b=_0x1fa483['bBwfc'](getUserSkillsDir);for(const _0x5b337c of skillsToRemove){const _0x3d7a22=_0x1fa483['ThRoF'](join,_0x282f0b,_0x5b337c);existsSync(_0x3d7a22)&&(await rm(_0x3d7a22,{'recursive':!![]}),console['log']('✓\x20Removed\x20user\x20skill:\x20'+_0x5b337c),_0x3b5eea=!![]);}const _0x50da42=_0x1fa483['CdZDU'](getOpencodeSkillsDir,'project');for(const _0x19f9a0 of skillsToRemove){const _0x27e1ae=_0x1fa483[_0x13d74a(0x1ce)](join,_0x50da42,_0x19f9a0);existsSync(_0x27e1ae)&&(await _0x1fa483['ICzZz'](rm,_0x27e1ae,{'recursive':!![]}),console[_0x13d74a(0x1e7)]('✓\x20Removed\x20OpenCode\x20project\x20skill:\x20'+_0x19f9a0),_0x3b5eea=!![]);}const _0x223c7c=_0x1fa483['CdZDU'](getOpencodeSkillsDir,'user');for(const _0x581474 of skillsToRemove){const _0x3d57d0=_0x1fa483['NhktB'](join,_0x223c7c,_0x581474);existsSync(_0x3d57d0)&&(await _0x1fa483['InwYx'](rm,_0x3d57d0,{'recursive':!![]}),console['log'](_0x13d74a(0x1cd)+_0x581474),_0x3b5eea=!![]);}const _0x590822=_0x1fa483['ICzZz'](join,getOpencodeConfigDir('project'),'opencode.json');await removeOpencodePluginConfig(_0x590822)&&(console['log']('✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)'),_0x3b5eea=!![]);const _0x2e8995=_0x1fa483[_0x13d74a(0x1ca)](join,_0x1fa483[_0x13d74a(0x1c7)](getOpencodeConfigDir,_0x1fa483['FSOfz']),_0x1fa483['EZDpE']);await _0x1fa483['CdZDU'](removeOpencodePluginConfig,_0x2e8995)&&(console[_0x13d74a(0x1e7)](_0x1fa483[_0x13d74a(0x1c8)]),_0x3b5eea=!![]);const _0x4b5755=await _0x1fa483[_0x13d74a(0x1d8)](uninstallClaudePlugin);_0x4b5755&&(console[_0x13d74a(0x1e7)]('✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)'),_0x3b5eea=!![]);const _0x10a2c4=await _0x1fa483[_0x13d74a(0x1c7)](uninstallClaudePlugin,_0x1fa483['TftZW']);_0x10a2c4&&(console[_0x13d74a(0x1e7)](_0x1fa483[_0x13d74a(0x1c1)]),_0x3b5eea=!![]);const _0xe5a66c=await _0x1fa483['bBwfc'](removeMarketplace);_0xe5a66c&&(console['log'](_0x1fa483[_0x13d74a(0x1b9)]),_0x3b5eea=!![]),_0x3b5eea?console['log'](_0x1fa483[_0x13d74a(0x1e2)]):console['log']('Nothing\x20to\x20clean\x20up.\x0a');}
@@ -1 +1 @@
1
- (function(_0xfc6844,_0x443eaf){const _0x43f1f6=_0x28f8,_0x4eecc0=_0xfc6844();while(!![]){try{const _0x326450=parseInt(_0x43f1f6(0x193))/0x1+-parseInt(_0x43f1f6(0x199))/0x2+parseInt(_0x43f1f6(0x1b9))/0x3+parseInt(_0x43f1f6(0x1ae))/0x4*(parseInt(_0x43f1f6(0x19b))/0x5)+-parseInt(_0x43f1f6(0x19d))/0x6+parseInt(_0x43f1f6(0x1b8))/0x7*(parseInt(_0x43f1f6(0x1af))/0x8)+-parseInt(_0x43f1f6(0x196))/0x9;if(_0x326450===_0x443eaf)break;else _0x4eecc0['push'](_0x4eecc0['shift']());}catch(_0x378bf3){_0x4eecc0['push'](_0x4eecc0['shift']());}}}(_0x28a4,0x7aa2e));import{existsSync}from'fs';import{loadSettings,saveSettings,getNestedValue,setNestedValue,deleteNestedValue,formatSettings,getSettingsPath,getEnvDir}from'./utils/settings.js';function _0x28a4(){const _0x5f8741=['JRoFY','No\x20configuration\x20set\x20for\x20\x22','MNryu','object','endsWith','\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20','MbXpe','Removed\x20','\x20<key>\x22\x20to\x20remove\x20individual\x20values.','trim','SFMuw','zABQO','parse','UhJsd','\x20for\x20\x22','false','714628sFvAMB','256424jaiDMT','BcBbC','alsoExistsElsewhere','pJlPn','stringify','(not\x20set)',':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22','VhKBO','ZcmfV','217IEKNpc','2609043AKiSRS','GRUyA','undefined','null','kind','\x22\x20not\x20found','true','test','startsWith','length','isSafeInteger','445637okmOQd','iBOiS','\x20=\x20','11336886GIryXF','raITo','isNaN','1839160KVNPGs','eBjyV','25zSOQaM','log','3124164bGWJDq'];_0x28a4=function(){return _0x5f8741;};return _0x28a4();}import{fetchCloudProfile}from'./utils/cloudProfile.js';import{mergeCloudProfileSettings,readProfileOverrides,resetProfileOverrides,setProfileOverride,unsetProfileOverride}from'./utils/projectsConfig.js';const BOOLEAN_KEYS=['headless','allowInsecureLocalhost'];function parseLocalValue(_0x58f6a9,_0x395b85){const _0x41b30f=_0x28f8,_0x3cafbe={'MxsiS':'true','cTsXg':function(_0x36a488,_0x3913f1){return _0x36a488===_0x3913f1;}};if(BOOLEAN_KEYS['includes'](_0x58f6a9)){if(_0x395b85===_0x3cafbe['MxsiS'])return!![];if(_0x3cafbe['cTsXg'](_0x395b85,'false'))return![];throw new Error('Invalid\x20value\x20for\x20'+_0x58f6a9+_0x41b30f(0x1b5));}return _0x395b85;}function parseOverrideValue(_0x1e3350){const _0x41a277=_0x28f8,_0x2d903e={'WXGhH':_0x41a277(0x18e),'BcBbC':function(_0x11d7cb,_0x2907c6){return _0x11d7cb===_0x2907c6;},'MbXpe':_0x41a277(0x1bc),'wMSkL':_0x41a277(0x1bb),'JRoFY':function(_0x32ad0e,_0x3cd657){return _0x32ad0e(_0x3cd657);}};if(_0x1e3350===_0x2d903e['WXGhH'])return!![];if(_0x2d903e[_0x41a277(0x1b0)](_0x1e3350,_0x41a277(0x1ad)))return![];if(_0x1e3350===_0x2d903e[_0x41a277(0x1a4)])return null;if(_0x1e3350===_0x2d903e['wMSkL'])return undefined;if(/^-?\d+$/[_0x41a277(0x18f)](_0x1e3350)){const _0x3453af=_0x2d903e[_0x41a277(0x19e)](Number,_0x1e3350);if(Number[_0x41a277(0x192)](_0x3453af))return _0x3453af;}if(/^-?\d+\.\d+$/[_0x41a277(0x18f)](_0x1e3350)){const _0x3ed186=Number(_0x1e3350);if(!Number[_0x41a277(0x198)](_0x3ed186))return _0x3ed186;}const _0x5e863f=_0x1e3350[_0x41a277(0x1a7)]();if(_0x5e863f['startsWith']('{')&&_0x5e863f['endsWith']('}')||_0x5e863f[_0x41a277(0x190)]('[')&&_0x5e863f[_0x41a277(0x1a2)](']'))try{return JSON[_0x41a277(0x1aa)](_0x5e863f);}catch{}return _0x1e3350;}async function resolveProfileTarget(_0x27ed56){const _0x223542=_0x28f8,_0x456d37={'eBjyV':function(_0x5157e3,_0x481cbf){return _0x5157e3(_0x481cbf);},'GRUyA':'local'},_0x226707=existsSync(getEnvDir(_0x27ed56));let _0x514865=![];try{const _0x500caa=await _0x456d37[_0x223542(0x19a)](fetchCloudProfile,_0x27ed56);_0x514865=_0x456d37[_0x223542(0x19a)](Boolean,_0x500caa);}catch{}if(_0x514865)return{'kind':'cloud','alsoExistsElsewhere':_0x226707};if(_0x226707)return{'kind':_0x456d37[_0x223542(0x1ba)],'alsoExistsElsewhere':![]};throw new Error('Profile\x20\x22'+_0x27ed56+'\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20'+_0x27ed56);}function printDualExistsHint(_0x4454b1){const _0x16ebec=_0x28f8;console[_0x16ebec(0x19c)]('\x20\x20Note:\x20\x22'+_0x4454b1+'\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.');}function getProjectPath(){return process['cwd']();}async function loadEffectiveCloudSettings(_0x3f3e38){const _0x45bf87={'hdKlA':function(_0x2ff1bf,_0xe1794e,_0x4db5ef){return _0x2ff1bf(_0xe1794e,_0x4db5ef);},'cFnLa':function(_0x1d3093,_0x59cd4b){return _0x1d3093??_0x59cd4b;}},_0x45a73b=await fetchCloudProfile(_0x3f3e38),_0x46570a=_0x45bf87['hdKlA'](readProfileOverrides,getProjectPath(),_0x3f3e38);return mergeCloudProfileSettings(_0x45a73b?.['settings']??{},_0x45bf87['cFnLa'](_0x46570a,undefined));}export async function configSet(_0x50c95f,_0x5f119b,_0x222c67){const _0x4c7dfd=_0x28f8,_0x4ad217={'KUMoL':function(_0x246d0e,_0x6610cb){return _0x246d0e(_0x6610cb);},'IdZWV':function(_0x3e28ba,_0x13ec7f){return _0x3e28ba===_0x13ec7f;},'kSwOL':function(_0x3a6635,_0xfc842e){return _0x3a6635(_0xfc842e);},'PySQL':function(_0x2c5938,_0x386e07,_0xf52731,_0x1ad612,_0x2b7e52){return _0x2c5938(_0x386e07,_0xf52731,_0x1ad612,_0x2b7e52);},'SUQlX':function(_0x70db0f){return _0x70db0f();},'MNryu':function(_0x5ab2a5,_0x991f6e,_0x4b6579){return _0x5ab2a5(_0x991f6e,_0x4b6579);}},_0x2b207e=await _0x4ad217['KUMoL'](resolveProfileTarget,_0x50c95f);if(_0x4ad217['IdZWV'](_0x2b207e['kind'],'cloud')){if(_0x2b207e['alsoExistsElsewhere'])_0x4ad217['kSwOL'](printDualExistsHint,_0x50c95f);const _0x4bd502=parseOverrideValue(_0x222c67);_0x4ad217['PySQL'](setProfileOverride,_0x4ad217['SUQlX'](getProjectPath),_0x50c95f,_0x5f119b,_0x4bd502),console[_0x4c7dfd(0x19c)]('Set\x20'+_0x5f119b+_0x4c7dfd(0x195)+JSON[_0x4c7dfd(0x1b3)](_0x4bd502)+_0x4c7dfd(0x1ac)+_0x50c95f+'\x22');return;}const _0x5945dc=await _0x4ad217['KUMoL'](loadSettings,_0x50c95f),_0x5ca594=parseLocalValue(_0x5f119b,_0x222c67);setNestedValue(_0x5945dc,_0x5f119b,_0x5ca594),await _0x4ad217[_0x4c7dfd(0x1a0)](saveSettings,_0x50c95f,_0x5945dc),console['log']('Set\x20'+_0x5f119b+_0x4c7dfd(0x195)+_0x5ca594+_0x4c7dfd(0x1ac)+_0x50c95f+'\x22');}export async function configGet(_0x5e9108,_0xce98d7){const _0x3158af=_0x28f8,_0x10ea7f={'iBOiS':function(_0xc7f07a,_0x55df3b){return _0xc7f07a===_0x55df3b;},'YGCob':'cloud','raITo':function(_0x4325fd,_0x581bed){return _0x4325fd(_0x581bed);},'DhcJS':function(_0x354a78,_0x1552fb,_0xb8ae34){return _0x354a78(_0x1552fb,_0xb8ae34);},'eRCNO':_0x3158af(0x1a1),'EiprP':function(_0x46dd90,_0x7628c2){return _0x46dd90(_0x7628c2);}},_0x1800fd=await resolveProfileTarget(_0x5e9108);if(_0x10ea7f['iBOiS'](_0x1800fd[_0x3158af(0x1bd)],_0x10ea7f['YGCob'])){const _0x3aeb9f=await _0x10ea7f[_0x3158af(0x197)](loadEffectiveCloudSettings,_0x5e9108),_0x61b93a=_0x10ea7f['DhcJS'](getNestedValue,_0x3aeb9f,_0xce98d7);if(_0x61b93a===undefined)console[_0x3158af(0x19c)](_0x3158af(0x1b4));else _0x10ea7f['iBOiS'](typeof _0x61b93a,_0x10ea7f['eRCNO'])?console[_0x3158af(0x19c)](JSON[_0x3158af(0x1b3)](_0x61b93a,null,0x2)):console['log'](_0x61b93a);return;}const _0x1782c5=await _0x10ea7f['EiprP'](loadSettings,_0x5e9108),_0x1bec42=getNestedValue(_0x1782c5,_0xce98d7);if(_0x10ea7f['iBOiS'](_0x1bec42,undefined))console[_0x3158af(0x19c)]('(not\x20set)');else _0x10ea7f[_0x3158af(0x194)](typeof _0x1bec42,_0x3158af(0x1a1))?console['log'](JSON['stringify'](_0x1bec42,null,0x2)):console[_0x3158af(0x19c)](_0x1bec42);}function _0x28f8(_0x4d70fe,_0x175981){_0x4d70fe=_0x4d70fe-0x18d;const _0x28a405=_0x28a4();let _0x28f87e=_0x28a405[_0x4d70fe];return _0x28f87e;}export async function configList(_0x1a9d28){const _0x33adc1=_0x28f8,_0x5e0aeb={'zABQO':function(_0x2135c3,_0x22c7d1){return _0x2135c3(_0x22c7d1);},'CoCVP':function(_0x2a0c2e,_0x340218){return _0x2a0c2e===_0x340218;},'ZcmfV':'cloud'},_0x6de389=await _0x5e0aeb['zABQO'](resolveProfileTarget,_0x1a9d28);if(_0x5e0aeb['CoCVP'](_0x6de389['kind'],_0x5e0aeb[_0x33adc1(0x1b7)])){const _0x387b3e=await _0x5e0aeb[_0x33adc1(0x1a9)](loadEffectiveCloudSettings,_0x1a9d28);if(!_0x387b3e||Object['keys'](_0x387b3e)[_0x33adc1(0x191)]===0x0){console['log'](_0x33adc1(0x19f)+_0x1a9d28+'\x22');return;}console['log'](JSON['stringify'](_0x387b3e,null,0x2));return;}const _0x440f7b=_0x5e0aeb[_0x33adc1(0x1a9)](getSettingsPath,_0x1a9d28);if(!existsSync(_0x440f7b)){console[_0x33adc1(0x19c)](_0x33adc1(0x19f)+_0x1a9d28+'\x22');return;}const _0x598083=await _0x5e0aeb['zABQO'](loadSettings,_0x1a9d28),_0x253a68=formatSettings(_0x598083);!_0x253a68?console['log'](_0x33adc1(0x19f)+_0x1a9d28+'\x22'):console['log'](_0x253a68);}export async function configUnset(_0x2e6ce1,_0x4b7c25){const _0x4a81ef=_0x28f8,_0x141ccf={'ARRWP':function(_0x5496e7,_0x3a39a5){return _0x5496e7(_0x3a39a5);},'pahLy':function(_0x234b55,_0x160c33){return _0x234b55(_0x160c33);},'UhJsd':function(_0xb06311){return _0xb06311();},'VhKBO':function(_0x1e2b91,_0x307873){return _0x1e2b91(_0x307873);},'EmMIj':function(_0x44a52e,_0x31ffdc,_0x2d3e67){return _0x44a52e(_0x31ffdc,_0x2d3e67);}},_0xe4dde5=await _0x141ccf['ARRWP'](resolveProfileTarget,_0x2e6ce1);if(_0xe4dde5['kind']==='cloud'){if(_0xe4dde5[_0x4a81ef(0x1b1)])_0x141ccf['pahLy'](printDualExistsHint,_0x2e6ce1);const _0x41f172=unsetProfileOverride(_0x141ccf[_0x4a81ef(0x1ab)](getProjectPath),_0x2e6ce1,_0x4b7c25);_0x41f172?console['log'](_0x4a81ef(0x1a5)+_0x4b7c25+'\x20for\x20\x22'+_0x2e6ce1+'\x22'):console[_0x4a81ef(0x19c)]('Key\x20\x22'+_0x4b7c25+_0x4a81ef(0x18d));return;}const _0x41fa03=await _0x141ccf[_0x4a81ef(0x1b6)](loadSettings,_0x2e6ce1),_0x15f8cf=deleteNestedValue(_0x41fa03,_0x4b7c25);_0x15f8cf?(await _0x141ccf['EmMIj'](saveSettings,_0x2e6ce1,_0x41fa03),console['log']('Removed\x20'+_0x4b7c25)):console['log']('Key\x20\x22'+_0x4b7c25+'\x22\x20not\x20found');}export async function configReset(_0x140f2c){const _0x3b4647=_0x28f8,_0x44e9c0={'iEpwG':function(_0x2267ed,_0x97c368){return _0x2267ed===_0x97c368;},'pJlPn':'cloud','SFMuw':function(_0x46de71,_0x3d69aa,_0x8ac8a6){return _0x46de71(_0x3d69aa,_0x8ac8a6);},'SqFyN':function(_0x1085c8){return _0x1085c8();}},_0x5a74e0=await resolveProfileTarget(_0x140f2c);if(_0x44e9c0['iEpwG'](_0x5a74e0[_0x3b4647(0x1bd)],_0x44e9c0[_0x3b4647(0x1b2)])){_0x44e9c0[_0x3b4647(0x1a8)](resetProfileOverrides,_0x44e9c0['SqFyN'](getProjectPath),_0x140f2c),console[_0x3b4647(0x19c)]('Cleared\x20local\x20overrides\x20for\x20\x22'+_0x140f2c+'\x22');return;}console['log']('\x22'+_0x140f2c+_0x3b4647(0x1a3)+_0x140f2c+_0x3b4647(0x1a6));}
1
+ const _0x43a503=_0x34bc;(function(_0x5c6e40,_0x30ced7){const _0x1a068c=_0x34bc,_0x539ca3=_0x5c6e40();while(!![]){try{const _0x3a9807=-parseInt(_0x1a068c(0xe0))/0x1*(-parseInt(_0x1a068c(0xe2))/0x2)+parseInt(_0x1a068c(0xd5))/0x3*(parseInt(_0x1a068c(0xd9))/0x4)+-parseInt(_0x1a068c(0xdf))/0x5+-parseInt(_0x1a068c(0xd0))/0x6+-parseInt(_0x1a068c(0xc0))/0x7*(-parseInt(_0x1a068c(0xc2))/0x8)+parseInt(_0x1a068c(0xe7))/0x9+-parseInt(_0x1a068c(0xbc))/0xa;if(_0x3a9807===_0x30ced7)break;else _0x539ca3['push'](_0x539ca3['shift']());}catch(_0x44eb83){_0x539ca3['push'](_0x539ca3['shift']());}}}(_0x15af,0xd8c29));import{existsSync}from'fs';import{loadSettings,getNestedValue,deleteNestedValue,formatSettings,getSettingsPath,getEnvDir}from'./utils/settings.js';import{fetchCloudProfile}from'./utils/cloudProfile.js';import{mergeCloudProfileSettings,readProfileOverrides,resetProfileOverrides,setProfileOverride,unsetProfileOverride}from'./utils/projectsConfig.js';function _0x15af(){const _0x3b338c=['OcOBS','allowInsecureLocalhost','includes','headless','log','Cleared\x20local\x20overrides\x20for\x20\x22','10734300wkHhsh','AllWk','(not\x20set)','null','9381463TejdnP','peyFC','8lMtVSh','\x22\x20not\x20found','\x20for\x20\x22','true','No\x20configuration\x20set\x20for\x20\x22','faIuX','vNsOM','length','keys','xkfKV','alsoExistsElsewhere','PmRgw','endsWith','cloud','10483302qVkqRK','\x20<key>\x22\x20to\x20remove\x20individual\x20values.','EfdWd','\x20=\x20','undefined','18jkzshE','NpbMh','kind','bOpKu','975404yVshXw','\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22','cwd','gJqrr','startsWith','yppCJ','6516945PzZpBf','1plmPfG','Invalid\x20value\x20for\x20','3360982zursVB','Key\x20\x22',':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22','parse','JSCRi','4752711iDbVuv','object','Removed\x20'];_0x15af=function(){return _0x3b338c;};return _0x15af();}const BOOLEAN_KEYS=[_0x43a503(0xb9),_0x43a503(0xb7)];function parseLocalValue(_0x3bca43,_0x160a0e){const _0x3f680a=_0x43a503,_0x376ed4={'xkfKV':'false'};if(BOOLEAN_KEYS[_0x3f680a(0xb8)](_0x3bca43)){if(_0x160a0e==='true')return!![];if(_0x160a0e===_0x376ed4[_0x3f680a(0xcb)])return![];throw new Error(_0x3f680a(0xe1)+_0x3bca43+_0x3f680a(0xe4));}return _0x160a0e;}function parseOverrideValue(_0x99368d){const _0x255cb3=_0x43a503,_0x4b8e68={'RDfmI':function(_0x1d5b02,_0x560c5c){return _0x1d5b02===_0x560c5c;},'lqSfk':_0x255cb3(0xbf),'PmRgw':function(_0x404d97,_0x1728e6){return _0x404d97(_0x1728e6);}};if(_0x99368d===_0x255cb3(0xc5))return!![];if(_0x4b8e68['RDfmI'](_0x99368d,'false'))return![];if(_0x4b8e68['RDfmI'](_0x99368d,_0x4b8e68['lqSfk']))return null;if(_0x99368d===_0x255cb3(0xd4))return undefined;if(/^-?\d+$/['test'](_0x99368d)){const _0x44c923=Number(_0x99368d);if(Number['isSafeInteger'](_0x44c923))return _0x44c923;}if(/^-?\d+\.\d+$/['test'](_0x99368d)){const _0x3ae58f=_0x4b8e68[_0x255cb3(0xcd)](Number,_0x99368d);if(!Number['isNaN'](_0x3ae58f))return _0x3ae58f;}const _0x4dd56e=_0x99368d['trim']();if(_0x4dd56e[_0x255cb3(0xdd)]('{')&&_0x4dd56e[_0x255cb3(0xce)]('}')||_0x4dd56e[_0x255cb3(0xdd)]('[')&&_0x4dd56e[_0x255cb3(0xce)](']'))try{return JSON[_0x255cb3(0xe5)](_0x4dd56e);}catch{}return _0x99368d;}async function resolveProfileTarget(_0x3ea1c5){const _0x1f20ce=_0x43a503,_0x3b2d03={'FobQO':function(_0x4871ac,_0x39a3f2){return _0x4871ac(_0x39a3f2);},'OcOBS':function(_0x356060,_0x352dd7){return _0x356060(_0x352dd7);},'YdGNT':'local'},_0x36909f=existsSync(_0x3b2d03['FobQO'](getEnvDir,_0x3ea1c5));let _0x4185c3=![];try{const _0x55157e=await fetchCloudProfile(_0x3ea1c5);_0x4185c3=_0x3b2d03[_0x1f20ce(0xea)](Boolean,_0x55157e);}catch{}if(_0x4185c3)return{'kind':'cloud','alsoExistsElsewhere':_0x36909f};if(_0x36909f)return{'kind':_0x3b2d03['YdGNT'],'alsoExistsElsewhere':![]};throw new Error('Profile\x20\x22'+_0x3ea1c5+'\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20'+_0x3ea1c5);}function printDualExistsHint(_0x2bf9ce){console['log']('\x20\x20Note:\x20\x22'+_0x2bf9ce+'\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.');}function getProjectPath(){const _0x1bdc97=_0x43a503;return process[_0x1bdc97(0xdb)]();}async function loadEffectiveCloudSettings(_0x1e2b19){const _0x56a519=_0x43a503,_0x20b0cd={'bOpKu':function(_0x173a23,_0x2eceb2,_0x8fff22){return _0x173a23(_0x2eceb2,_0x8fff22);}},_0x15ff7a=await fetchCloudProfile(_0x1e2b19),_0x5aa38c=readProfileOverrides(getProjectPath(),_0x1e2b19);return _0x20b0cd[_0x56a519(0xd8)](mergeCloudProfileSettings,_0x15ff7a?.['settings']??{},_0x5aa38c??undefined);}export async function configSet(_0x4af076,_0x118ea5,_0x47427a){const _0x1b00bc=_0x43a503,_0x4ceea6={'gJqrr':function(_0x4b4708,_0x1b5c1a){return _0x4b4708(_0x1b5c1a);},'jeqAH':function(_0x52e1d0,_0x97054d){return _0x52e1d0===_0x97054d;},'ZgSAV':'cloud','Krvfg':function(_0x294db3,_0x3b0d30){return _0x294db3(_0x3b0d30);},'peyFC':function(_0x179bd1,_0x137f4a){return _0x179bd1(_0x137f4a);},'tRhwm':function(_0x37be95,_0x419f00,_0x4d460f,_0x1e6d75,_0x5a95b5){return _0x37be95(_0x419f00,_0x4d460f,_0x1e6d75,_0x5a95b5);}},_0x1ae772=await _0x4ceea6[_0x1b00bc(0xdc)](resolveProfileTarget,_0x4af076);if(_0x4ceea6['jeqAH'](_0x1ae772[_0x1b00bc(0xd7)],_0x4ceea6['ZgSAV'])){if(_0x1ae772[_0x1b00bc(0xcc)])_0x4ceea6['Krvfg'](printDualExistsHint,_0x4af076);const _0x1a70ec=_0x4ceea6[_0x1b00bc(0xc1)](parseOverrideValue,_0x47427a);_0x4ceea6['tRhwm'](setProfileOverride,getProjectPath(),_0x4af076,_0x118ea5,_0x1a70ec),console[_0x1b00bc(0xba)]('Set\x20'+_0x118ea5+'\x20=\x20'+JSON['stringify'](_0x1a70ec)+_0x1b00bc(0xc4)+_0x4af076+'\x22');return;}const _0x1a7f9c=parseLocalValue(_0x118ea5,_0x47427a);setProfileOverride(getProjectPath(),_0x4af076,_0x118ea5,_0x1a7f9c),console[_0x1b00bc(0xba)]('Set\x20'+_0x118ea5+_0x1b00bc(0xd3)+_0x1a7f9c+_0x1b00bc(0xc4)+_0x4af076+'\x22');}export async function configGet(_0x41e48f,_0x10fb84){const _0x468c7b=_0x43a503,_0x4f2671={'eCutU':function(_0xec18c6,_0xd3f863){return _0xec18c6(_0xd3f863);},'YDiHq':function(_0x5e94d0,_0x15591b){return _0x5e94d0===_0x15591b;},'faIuX':function(_0x148577,_0x4576b5){return _0x148577===_0x4576b5;},'UFFmU':function(_0x581380,_0x5e6f30){return _0x581380(_0x5e6f30);},'EfdWd':function(_0x5c49bb,_0x35d572){return _0x5c49bb===_0x35d572;},'ZTIsk':'object'},_0x9ffdc0=await _0x4f2671['eCutU'](resolveProfileTarget,_0x41e48f);if(_0x9ffdc0['kind']==='cloud'){const _0x3af3d9=await loadEffectiveCloudSettings(_0x41e48f),_0x4ee1a0=getNestedValue(_0x3af3d9,_0x10fb84);if(_0x4f2671['YDiHq'](_0x4ee1a0,undefined))console[_0x468c7b(0xba)](_0x468c7b(0xbe));else _0x4f2671[_0x468c7b(0xc7)](typeof _0x4ee1a0,_0x468c7b(0xe8))?console['log'](JSON['stringify'](_0x4ee1a0,null,0x2)):console[_0x468c7b(0xba)](_0x4ee1a0);return;}const _0x549abb=await _0x4f2671['UFFmU'](loadSettings,_0x41e48f),_0x1e1a73=getNestedValue(_0x549abb,_0x10fb84);if(_0x4f2671[_0x468c7b(0xd2)](_0x1e1a73,undefined))console[_0x468c7b(0xba)]('(not\x20set)');else typeof _0x1e1a73===_0x4f2671['ZTIsk']?console['log'](JSON['stringify'](_0x1e1a73,null,0x2)):console[_0x468c7b(0xba)](_0x1e1a73);}function _0x34bc(_0x216936,_0x3159fd){_0x216936=_0x216936-0xb7;const _0x15af26=_0x15af();let _0x34bc0f=_0x15af26[_0x216936];return _0x34bc0f;}export async function configList(_0x646c44){const _0x51ff29=_0x43a503,_0x891f79={'mnspa':function(_0x2b8050,_0x594ad4){return _0x2b8050(_0x594ad4);},'AllWk':function(_0x3c56d7,_0x24f4e2){return _0x3c56d7===_0x24f4e2;},'JSCRi':_0x51ff29(0xcf)},_0x386adb=await _0x891f79['mnspa'](resolveProfileTarget,_0x646c44);if(_0x891f79[_0x51ff29(0xbd)](_0x386adb[_0x51ff29(0xd7)],_0x891f79[_0x51ff29(0xe6)])){const _0x1d1402=await loadEffectiveCloudSettings(_0x646c44);if(!_0x1d1402||_0x891f79['AllWk'](Object[_0x51ff29(0xca)](_0x1d1402)[_0x51ff29(0xc9)],0x0)){console['log'](_0x51ff29(0xc6)+_0x646c44+'\x22');return;}console[_0x51ff29(0xba)](JSON['stringify'](_0x1d1402,null,0x2));return;}const _0x10f732=getSettingsPath(_0x646c44);if(!existsSync(_0x10f732)){console[_0x51ff29(0xba)](_0x51ff29(0xc6)+_0x646c44+'\x22');return;}const _0x3285a5=await loadSettings(_0x646c44),_0x4c2293=_0x891f79['mnspa'](formatSettings,_0x3285a5);!_0x4c2293?console[_0x51ff29(0xba)](_0x51ff29(0xc6)+_0x646c44+'\x22'):console[_0x51ff29(0xba)](_0x4c2293);}export async function configUnset(_0x26203a,_0x6210d9){const _0x2b69ac=_0x43a503,_0x27d0f0={'eBxIh':function(_0x27c08f,_0x59bc9d){return _0x27c08f===_0x59bc9d;},'DfgWn':_0x2b69ac(0xcf),'yppCJ':function(_0x3e34dd,_0x59d936,_0x52e910,_0x264d36){return _0x3e34dd(_0x59d936,_0x52e910,_0x264d36);},'NpbMh':function(_0x3020c1){return _0x3020c1();}},_0x277753=await resolveProfileTarget(_0x26203a);if(_0x27d0f0['eBxIh'](_0x277753['kind'],_0x27d0f0['DfgWn'])){if(_0x277753[_0x2b69ac(0xcc)])printDualExistsHint(_0x26203a);const _0x3e1711=_0x27d0f0[_0x2b69ac(0xde)](unsetProfileOverride,_0x27d0f0[_0x2b69ac(0xd6)](getProjectPath),_0x26203a,_0x6210d9);_0x3e1711?console[_0x2b69ac(0xba)](_0x2b69ac(0xe9)+_0x6210d9+'\x20for\x20\x22'+_0x26203a+'\x22'):console['log']('Key\x20\x22'+_0x6210d9+'\x22\x20not\x20found');return;}const _0x286a63=unsetProfileOverride(getProjectPath(),_0x26203a,_0x6210d9);if(_0x286a63){console[_0x2b69ac(0xba)]('Removed\x20'+_0x6210d9);return;}const _0x2c887f=await loadSettings(_0x26203a),_0x491c14=deleteNestedValue(_0x2c887f,_0x6210d9);_0x491c14?console[_0x2b69ac(0xba)](_0x2b69ac(0xe3)+_0x6210d9+_0x2b69ac(0xda)+_0x26203a+'\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.'):console['log'](_0x2b69ac(0xe3)+_0x6210d9+_0x2b69ac(0xc3));}export async function configReset(_0x4f7fb6){const _0xa2ad1d=_0x43a503,_0x5db501={'vNsOM':function(_0x58f3f7,_0x3f76f6){return _0x58f3f7===_0x3f76f6;},'ixHPL':function(_0x28442d,_0x1a2624,_0x464854){return _0x28442d(_0x1a2624,_0x464854);},'pJHyL':function(_0xb078a8){return _0xb078a8();}},_0x131f3a=await resolveProfileTarget(_0x4f7fb6);if(_0x5db501[_0xa2ad1d(0xc8)](_0x131f3a[_0xa2ad1d(0xd7)],'cloud')){_0x5db501['ixHPL'](resetProfileOverrides,_0x5db501['pJHyL'](getProjectPath),_0x4f7fb6),console['log'](_0xa2ad1d(0xbb)+_0x4f7fb6+'\x22');return;}console[_0xa2ad1d(0xba)]('\x22'+_0x4f7fb6+'\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20'+_0x4f7fb6+_0xa2ad1d(0xd1));}
@@ -1 +1 @@
1
- (function(_0x27cf60,_0x23b00a){const _0xa4002c=_0x259b,_0x529f9a=_0x27cf60();while(!![]){try{const _0x14722a=parseInt(_0xa4002c(0x1b8))/0x1+parseInt(_0xa4002c(0x1a5))/0x2+parseInt(_0xa4002c(0x1a1))/0x3*(-parseInt(_0xa4002c(0x1b2))/0x4)+parseInt(_0xa4002c(0x19f))/0x5+-parseInt(_0xa4002c(0x1ad))/0x6+-parseInt(_0xa4002c(0x1b6))/0x7+parseInt(_0xa4002c(0x1c2))/0x8;if(_0x14722a===_0x23b00a)break;else _0x529f9a['push'](_0x529f9a['shift']());}catch(_0x45ffb1){_0x529f9a['push'](_0x529f9a['shift']());}}}(_0x236a,0x1d2d3));import{readdir,stat}from'fs/promises';function _0x259b(_0x33a7c0,_0x23e71d){_0x33a7c0=_0x33a7c0-0x19e;const _0x236aa8=_0x236a();let _0x259b44=_0x236aa8[_0x33a7c0];return _0x259b44;}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','bug-bashes','reports','local','ci'];export async function getEnvNames(){const _0x3e69d0=_0x259b,_0xd58a8f={'HNhJq':function(_0x366c5c,_0x5d9ec3){return _0x366c5c(_0x5d9ec3);},'JBiZI':function(_0x5de2ba){return _0x5de2ba();},'olTgc':_0x3e69d0(0x1b3),'jXJVp':function(_0x4e541f,_0x5bb4c7){return _0x4e541f(_0x5bb4c7);},'DEXIO':function(_0x4bad0a,_0x3bd0c5){return _0x4bad0a(_0x3bd0c5);},'CsrbJ':function(_0x157757,_0x535cd2,_0x2c83f2){return _0x157757(_0x535cd2,_0x2c83f2);},'lWkan':function(_0x3a68a3,_0x172a5d,_0x25eb01){return _0x3a68a3(_0x172a5d,_0x25eb01);},'Jylik':'legacy'},_0x1dfc93=getRangerDir();if(!_0xd58a8f[_0x3e69d0(0x1b4)](existsSync,_0x1dfc93))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x236f2b=await _0xd58a8f['JBiZI'](readActiveProfileName),_0x52acd4=[],_0x148a04={},_0x426f1b=join(_0x1dfc93,_0xd58a8f['olTgc']);if(_0xd58a8f['jXJVp'](existsSync,_0x426f1b)){const _0x494977=await readdir(_0x426f1b);for(const _0xeb7776 of _0x494977){const _0x5f59f5=join(_0x426f1b,_0xeb7776),_0x437f57=await stat(_0x5f59f5);_0x437f57['isDirectory']()&&(_0x52acd4['push'](_0xeb7776),_0x148a04[_0xeb7776]=_0xd58a8f['olTgc']);}}const _0x2638ee=join(_0x1dfc93,'ci');if(_0xd58a8f['HNhJq'](existsSync,_0x2638ee)){const _0x4a5b76=await readdir(_0x2638ee);for(const _0x1c4f7b of _0x4a5b76){const _0x26d7c8=join(_0x2638ee,_0x1c4f7b),_0x368b3c=await _0xd58a8f['DEXIO'](stat,_0x26d7c8);_0x368b3c['isDirectory']()&&(_0x52acd4[_0x3e69d0(0x1a9)](_0x1c4f7b),_0x148a04[_0x1c4f7b]='ci');}}const _0x1f9ec1=await _0xd58a8f['HNhJq'](readdir,_0x1dfc93);for(const _0x4819d2 of _0x1f9ec1){if(NON_ENV_DIRS[_0x3e69d0(0x1b1)](_0x4819d2))continue;if(_0x4819d2['startsWith']('.'))continue;if(_0x4819d2['endsWith'](_0x3e69d0(0x1bb)))continue;const _0x377f91=_0xd58a8f[_0x3e69d0(0x1a6)](join,_0x1dfc93,_0x4819d2),_0x2a00be=await stat(_0x377f91);_0x2a00be['isDirectory']()&&_0xd58a8f[_0x3e69d0(0x1b9)](existsSync,_0xd58a8f[_0x3e69d0(0x1a4)](join,_0x377f91,'settings.json'))&&(!_0x52acd4['includes'](_0x4819d2)&&(_0x52acd4[_0x3e69d0(0x1a9)](_0x4819d2),_0x148a04[_0x4819d2]=_0xd58a8f['Jylik']));}return{'envNames':_0x52acd4,'activeEnv':_0x236f2b,'envTypes':_0x148a04};}export async function envList(){const _0x46543c=_0x259b,_0x240a28={'kwTwN':function(_0x296580){return _0x296580();},'FNhUY':function(_0x43c8af,_0x450655){return _0x43c8af===_0x450655;},'imkpG':'\x0aNo\x20profiles\x20found.','kUqzt':_0x46543c(0x1ae),'XZODZ':'\x0aLocal\x20Profiles:','hVawG':_0x46543c(0x1b3),'SBMBl':'legacy','IIANh':function(_0x282f5e,_0x45087f){return _0x282f5e>_0x45087f;}},{envNames:_0xb5d78d,activeEnv:_0x35bcef,envTypes:_0x57cfd0}=await _0x240a28['kwTwN'](getEnvNames);let _0x245eb9=[];try{_0x245eb9=await _0x240a28[_0x46543c(0x1ba)](listCloudProfiles);}catch{}if(_0xb5d78d[_0x46543c(0x1ab)]===0x0&&_0x240a28[_0x46543c(0x1bd)](_0x245eb9['length'],0x0)){console['log'](_0x240a28['imkpG']),console[_0x46543c(0x1c1)](_0x240a28[_0x46543c(0x1b5)]);return;}const _0x109d4e=new Set(_0x245eb9[_0x46543c(0x1b7)](_0x398d84=>_0x398d84[_0x46543c(0x1a8)]));if(_0xb5d78d['length']>0x0){console['log'](_0x240a28['XZODZ']);for(const _0x1e2279 of _0xb5d78d['sort']()){const _0xc84058=_0x1e2279===_0x35bcef&&!_0x109d4e[_0x46543c(0x1aa)](_0x1e2279),_0x27947c=_0x57cfd0[_0x1e2279]||_0x240a28[_0x46543c(0x1a3)],_0xc3959f=await loadSettings(_0x1e2279),_0x558f70=_0x240a28[_0x46543c(0x1bd)](_0x27947c,_0x240a28[_0x46543c(0x1af)])?'':'\x20['+_0x27947c+']';console['log']('\x20\x20'+(_0xc84058?'*\x20':'\x20\x20')+_0x1e2279+_0x558f70),_0xc3959f[_0x46543c(0x1c0)]&&console[_0x46543c(0x1c1)]('\x20\x20\x20\x20\x20\x20URL:\x20'+_0xc3959f[_0x46543c(0x1c0)]),_0xc3959f['environmentDetails']&&console['log'](_0x46543c(0x1a2)+_0xc3959f[_0x46543c(0x19e)]);}}if(_0x240a28['IIANh'](_0x245eb9['length'],0x0)){console[_0x46543c(0x1c1)](_0x46543c(0x1bf));for(const _0x5096a4 of _0x245eb9[_0x46543c(0x1a0)]((_0x1bdb8f,_0x2d134e)=>_0x1bdb8f['name']['localeCompare'](_0x2d134e['name']))){const _0x1b01b8=_0x240a28[_0x46543c(0x1bd)](_0x5096a4['name'],_0x35bcef),_0x38e63b=_0x5096a4[_0x46543c(0x1ac)]?'\x20('+_0x5096a4[_0x46543c(0x1ac)]+')':'',_0x285302=_0x5096a4[_0x46543c(0x1be)]?'cached\x20(updated\x20'+_0x5096a4['sessionUpdatedAt']+')':_0x46543c(0x1b0);console[_0x46543c(0x1c1)]('\x20\x20'+(_0x1b01b8?'*\x20':'\x20\x20')+_0x5096a4['name']+'\x20[cloud]'+_0x38e63b),console['log'](_0x46543c(0x1bc)+_0x285302);}}_0x35bcef&&console[_0x46543c(0x1c1)](_0x46543c(0x1a7));}function _0x236a(){const _0x4decf1=['.txt','\x20\x20\x20\x20\x20\x20Session:\x20','FNhUY','sessionUpdatedAt','\x0aCloud\x20Profiles:','baseUrl','log','519248gSjvON','environmentDetails','790775oJJTZf','sort','3VpjAJb','\x20\x20\x20\x20\x20\x20Details:\x20','hVawG','lWkan','315490kKvcsy','CsrbJ','\x0a*\x20=\x20active\x20profile','name','push','has','length','environmentKey','1163556fhZnlY','Run:\x20ranger\x20profile\x20add\x20<profile-name>','SBMBl','no\x20session','includes','376988uGUgdT','local','HNhJq','kUqzt','898072BRhdEa','map','155170NaTaNV','DEXIO','kwTwN'];_0x236a=function(){return _0x4decf1;};return _0x236a();}
1
+ const _0x47a0ca=_0x5366;(function(_0x5574d6,_0x424c14){const _0x57f4e6=_0x5366,_0x17994e=_0x5574d6();while(!![]){try{const _0x16d8c0=-parseInt(_0x57f4e6(0x15d))/0x1*(parseInt(_0x57f4e6(0x156))/0x2)+-parseInt(_0x57f4e6(0x16f))/0x3*(-parseInt(_0x57f4e6(0x168))/0x4)+-parseInt(_0x57f4e6(0x163))/0x5+parseInt(_0x57f4e6(0x158))/0x6+-parseInt(_0x57f4e6(0x157))/0x7*(parseInt(_0x57f4e6(0x161))/0x8)+parseInt(_0x57f4e6(0x162))/0x9+parseInt(_0x57f4e6(0x177))/0xa;if(_0x16d8c0===_0x424c14)break;else _0x17994e['push'](_0x17994e['shift']());}catch(_0x56447e){_0x17994e['push'](_0x17994e['shift']());}}}(_0x1b8f,0x2f6ef));import{readdir,stat}from'fs/promises';function _0x1b8f(){const _0x4ae781=['qrjno','environmentDetails','\x0aNo\x20profiles\x20found.','JUuvi','push','reports','2861150VREXhK','local','settings.json','sessionUpdatedAt','isDirectory','includes','\x0a*\x20=\x20active\x20profile','318cLGjRl','7ytYoHU','1752978Bnqahb','otBxB','length','log','eMgwl','1945guqeZV','localeCompare','bug-bashes','name','1691608gTpiZq','2647035KcuKRX','1882870mOBfrg','nkiGO','sort','gywhP','baseUrl','438348IJzrKr','PNtMI','TMMGZ','Run:\x20ranger\x20profile\x20add\x20<profile-name>','environmentKey','has','legacy','6NWUpla','startsWith'];_0x1b8f=function(){return _0x4ae781;};return _0x1b8f();}import{join}from'path';import{existsSync}from'fs';import{getRangerDir}from'./utils/rangerRoot.js';import{loadSettings}from'./utils/settings.js';import{readActiveProfileName}from'./utils/activeProfile.js';import{listCloudProfiles}from'./utils/cloudProfile.js';const NON_ENV_DIRS=['sessions',_0x47a0ca(0x15f),_0x47a0ca(0x176),'local','ci'];export async function getEnvNames(){const _0x586c51=_0x47a0ca,_0x1c291f={'nkiGO':function(_0x326151,_0x2b8a78){return _0x326151(_0x2b8a78);},'BTjtv':_0x586c51(0x178),'eMgwl':function(_0x519d2b,_0x1d949f,_0x56a69e){return _0x519d2b(_0x1d949f,_0x56a69e);},'TMMGZ':function(_0x25ecee,_0x2c7d08){return _0x25ecee(_0x2c7d08);},'gywhP':function(_0x5f660b,_0x1999ef){return _0x5f660b(_0x1999ef);},'XHsjb':_0x586c51(0x16e)},_0x1bcc8d=getRangerDir();if(!_0x1c291f[_0x586c51(0x164)](existsSync,_0x1bcc8d))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x35351a=await readActiveProfileName(),_0x27bfe0=[],_0x427936={},_0x453d41=join(_0x1bcc8d,_0x1c291f['BTjtv']);if(existsSync(_0x453d41)){const _0x1296f1=await _0x1c291f[_0x586c51(0x164)](readdir,_0x453d41);for(const _0x40d4d5 of _0x1296f1){const _0x23f720=join(_0x453d41,_0x40d4d5),_0x15d718=await _0x1c291f['nkiGO'](stat,_0x23f720);_0x15d718[_0x586c51(0x17b)]()&&(_0x27bfe0[_0x586c51(0x175)](_0x40d4d5),_0x427936[_0x40d4d5]=_0x586c51(0x178));}}const _0x267968=_0x1c291f[_0x586c51(0x15c)](join,_0x1bcc8d,'ci');if(_0x1c291f['nkiGO'](existsSync,_0x267968)){const _0x3ab36b=await _0x1c291f[_0x586c51(0x16a)](readdir,_0x267968);for(const _0x4cfe3b of _0x3ab36b){const _0x5c7bed=join(_0x267968,_0x4cfe3b),_0x250d6b=await _0x1c291f[_0x586c51(0x166)](stat,_0x5c7bed);_0x250d6b['isDirectory']()&&(_0x27bfe0[_0x586c51(0x175)](_0x4cfe3b),_0x427936[_0x4cfe3b]='ci');}}const _0x3d9e1d=await readdir(_0x1bcc8d);for(const _0x46fb91 of _0x3d9e1d){if(NON_ENV_DIRS[_0x586c51(0x17c)](_0x46fb91))continue;if(_0x46fb91[_0x586c51(0x170)]('.'))continue;if(_0x46fb91['endsWith']('.txt'))continue;const _0x771332=join(_0x1bcc8d,_0x46fb91),_0x4ac258=await stat(_0x771332);_0x4ac258['isDirectory']()&&_0x1c291f[_0x586c51(0x16a)](existsSync,join(_0x771332,_0x586c51(0x179)))&&(!_0x27bfe0[_0x586c51(0x17c)](_0x46fb91)&&(_0x27bfe0[_0x586c51(0x175)](_0x46fb91),_0x427936[_0x46fb91]=_0x1c291f['XHsjb']));}return{'envNames':_0x27bfe0,'activeEnv':_0x35351a,'envTypes':_0x427936};}function _0x5366(_0x5202ec,_0xef2856){_0x5202ec=_0x5202ec-0x155;const _0x1b8f3c=_0x1b8f();let _0x5366e6=_0x1b8f3c[_0x5202ec];return _0x5366e6;}export async function envList(){const _0x22f268=_0x47a0ca,_0x4aa719={'cbHTF':function(_0x4eb091){return _0x4eb091();},'JreOa':function(_0x46521c,_0x1104b2){return _0x46521c===_0x1104b2;},'jmmFj':_0x22f268(0x173),'JUuvi':_0x22f268(0x16b),'otBxB':function(_0x2ce85b,_0x244502){return _0x2ce85b===_0x244502;},'fxsql':'legacy','PNtMI':function(_0x38ba63,_0x368fed){return _0x38ba63>_0x368fed;},'qrjno':'no\x20session'},{envNames:_0x403a40,activeEnv:_0x2f54d3,envTypes:_0x1f54d4}=await _0x4aa719['cbHTF'](getEnvNames);let _0x5ba032=[];try{_0x5ba032=await _0x4aa719['cbHTF'](listCloudProfiles);}catch{}if(_0x4aa719['JreOa'](_0x403a40['length'],0x0)&&_0x5ba032['length']===0x0){console[_0x22f268(0x15b)](_0x4aa719['jmmFj']),console[_0x22f268(0x15b)](_0x4aa719[_0x22f268(0x174)]);return;}const _0x35f4ed=new Set(_0x5ba032['map'](_0x427f5d=>_0x427f5d[_0x22f268(0x160)]));if(_0x403a40['length']>0x0){console['log']('\x0aLocal\x20Profiles:');for(const _0x5e46bb of _0x403a40[_0x22f268(0x165)]()){const _0x29d0a1=_0x4aa719[_0x22f268(0x159)](_0x5e46bb,_0x2f54d3)&&!_0x35f4ed[_0x22f268(0x16d)](_0x5e46bb),_0x5cc8a5=_0x1f54d4[_0x5e46bb]||'local',_0x19a280=await loadSettings(_0x5e46bb),_0x499293=_0x5cc8a5===_0x4aa719['fxsql']?'':'\x20['+_0x5cc8a5+']';console['log']('\x20\x20'+(_0x29d0a1?'*\x20':'\x20\x20')+_0x5e46bb+_0x499293),_0x19a280[_0x22f268(0x167)]&&console['log']('\x20\x20\x20\x20\x20\x20URL:\x20'+_0x19a280['baseUrl']),_0x19a280[_0x22f268(0x172)]&&console['log']('\x20\x20\x20\x20\x20\x20Details:\x20'+_0x19a280[_0x22f268(0x172)]);}}if(_0x4aa719[_0x22f268(0x169)](_0x5ba032[_0x22f268(0x15a)],0x0)){console[_0x22f268(0x15b)]('\x0aCloud\x20Profiles:');for(const _0x289c3e of _0x5ba032['sort']((_0x1dee00,_0x49a4f4)=>_0x1dee00[_0x22f268(0x160)][_0x22f268(0x15e)](_0x49a4f4[_0x22f268(0x160)]))){const _0x322ee0=_0x289c3e['name']===_0x2f54d3,_0x145c3e=_0x289c3e['environmentKey']?'\x20('+_0x289c3e[_0x22f268(0x16c)]+')':'',_0x289191=_0x289c3e['sessionUpdatedAt']?'cached\x20(updated\x20'+_0x289c3e[_0x22f268(0x17a)]+')':_0x4aa719[_0x22f268(0x171)];console['log']('\x20\x20'+(_0x322ee0?'*\x20':'\x20\x20')+_0x289c3e['name']+'\x20[cloud]'+_0x145c3e),console['log']('\x20\x20\x20\x20\x20\x20Session:\x20'+_0x289191);}}_0x2f54d3&&console['log'](_0x22f268(0x155));}
@@ -1 +1 @@
1
- const _0x48552e=_0x94bc;(function(_0x499508,_0x1e5a2b){const _0x3d9048=_0x94bc,_0x516fa7=_0x499508();while(!![]){try{const _0x2250de=parseInt(_0x3d9048(0x150))/0x1+-parseInt(_0x3d9048(0x19d))/0x2*(-parseInt(_0x3d9048(0x113))/0x3)+-parseInt(_0x3d9048(0x126))/0x4*(parseInt(_0x3d9048(0x187))/0x5)+parseInt(_0x3d9048(0x101))/0x6*(parseInt(_0x3d9048(0xe5))/0x7)+-parseInt(_0x3d9048(0x142))/0x8*(parseInt(_0x3d9048(0x13a))/0x9)+parseInt(_0x3d9048(0xcf))/0xa*(parseInt(_0x3d9048(0xd7))/0xb)+-parseInt(_0x3d9048(0xf5))/0xc;if(_0x2250de===_0x1e5a2b)break;else _0x516fa7['push'](_0x516fa7['shift']());}catch(_0x5e8ff3){_0x516fa7['push'](_0x516fa7['shift']());}}}(_0x1bb3,0xbb244));import{readFile,writeFile,mkdir}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{execSync}from'child_process';import _0x8c3609 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=_0x48552e(0x16f),bold=_0x32db3a=>_0x48552e(0xf8)+_0x32db3a+'\x1b[0m';function getGitRepoUrl(){const _0x20183a=_0x48552e,_0x5cb2c5={'YfNkv':function(_0xe8e4ec,_0x5d8d70,_0x8da28c){return _0xe8e4ec(_0x5d8d70,_0x8da28c);},'aIiEh':'git\x20remote\x20get-url\x20origin','QKkyi':'pipe'};try{const _0x45c6d1=_0x5cb2c5[_0x20183a(0x186)](execSync,_0x5cb2c5[_0x20183a(0x11b)],{'encoding':'utf-8','stdio':['pipe',_0x5cb2c5['QKkyi'],_0x20183a(0xf6)]})[_0x20183a(0x10e)]();return _0x45c6d1[_0x20183a(0x122)](/\.git$/,'')['replace'](/^git@github\.com:/,_0x20183a(0x102))['replace'](/^https?:\/\//,'');}catch{return undefined;}}function getGitBranch(){const _0x109bb2=_0x48552e,_0x50f301={'wlvno':function(_0x196acb,_0x33f7b5,_0x127641){return _0x196acb(_0x33f7b5,_0x127641);},'VBSMv':'utf-8'};try{return _0x50f301['wlvno'](execSync,_0x109bb2(0xc9),{'encoding':_0x50f301[_0x109bb2(0x137)],'stdio':['pipe',_0x109bb2(0xf6),_0x109bb2(0xf6)]})['trim']();}catch{return undefined;}}export async function getActiveFeatureId(){const _0x1c4603=_0x48552e,_0x50dbd9={'gsQsA':function(_0x3f4cfb){return _0x3f4cfb();},'kxRfi':_0x1c4603(0xfa)},_0x55df1e=join(_0x50dbd9[_0x1c4603(0x1a5)](getRangerDir),ACTIVE_FEATURE_FILE);if(!existsSync(_0x55df1e))return null;try{const _0x101682=await readFile(_0x55df1e,_0x50dbd9['kxRfi']);return _0x101682[_0x1c4603(0x10e)]()||null;}catch{return null;}}function _0x94bc(_0x17baea,_0x1c4fae){_0x17baea=_0x17baea-0xc3;const _0x1bb3a9=_0x1bb3();let _0x94bc7f=_0x1bb3a9[_0x17baea];return _0x94bc7f;}async function setActiveFeatureId(_0x1a2da1){const _0x2520d2=_0x48552e,_0x2726a0={'loiWD':function(_0x2b87b5){return _0x2b87b5();},'sqMPq':function(_0x8b550c,_0x528eb0){return _0x8b550c(_0x528eb0);},'QdvgH':function(_0x57a93a,_0x408521,_0x5c5618){return _0x57a93a(_0x408521,_0x5c5618);},'rulIh':_0x2520d2(0xfa)},_0xaf371b=_0x2726a0['loiWD'](getRangerDir),_0x2c192b=join(_0xaf371b,ACTIVE_FEATURE_FILE);!_0x2726a0['sqMPq'](existsSync,_0xaf371b)&&await _0x2726a0['QdvgH'](mkdir,_0xaf371b,{'recursive':!![]}),await writeFile(_0x2c192b,_0x1a2da1,_0x2726a0[_0x2520d2(0x18c)]);}function getProgressDisplay(_0x1a0c13){const _0xf5e535=_0x48552e,_0x404ac8={'bMWJb':function(_0xc49e3f,_0x1e3d93){return _0xc49e3f+_0x1e3d93;},'JkKlE':function(_0x2271e0,_0x31b77f){return _0x2271e0/_0x31b77f;},'kQRpx':function(_0x2026c2,_0x1b10cf){return _0x2026c2>_0x1b10cf;}},_0x4d2101=_0x1a0c13['verifiedItems']||0x0,_0x552fa7=_0x1a0c13['verificationInProgressItems']||0x0,_0x4aeb15=_0x1a0c13[_0xf5e535(0xec)]||0x0,_0x2a77f9=_0x1a0c13[_0xf5e535(0x193)]||0x0,_0x1b43a0=_0x1a0c13[_0xf5e535(0x11a)]||0x0,_0x3ee44c=_0x404ac8['bMWJb'](_0x404ac8[_0xf5e535(0x183)](_0x4d2101+_0x552fa7,_0x4aeb15)+_0x2a77f9,_0x1b43a0);if(_0x3ee44c===0x0)return'-';const _0x2c90df=0xa,_0x186e98=Math[_0xf5e535(0x123)](_0x404ac8[_0xf5e535(0x19b)](_0x4d2101,_0x3ee44c)*_0x2c90df),_0x13fcdd=_0x404ac8['bMWJb']('█'['repeat'](_0x186e98),'░'['repeat'](_0x2c90df-_0x186e98)),_0x7ac38f=[];if(_0x404ac8['kQRpx'](_0x4aeb15,0x0))_0x7ac38f['push'](_0x4aeb15+_0xf5e535(0x130));if(_0x404ac8[_0xf5e535(0xdd)](_0x2a77f9,0x0))_0x7ac38f['push'](_0x2a77f9+_0xf5e535(0x121));if(_0x404ac8[_0xf5e535(0xdd)](_0x552fa7,0x0))_0x7ac38f[_0xf5e535(0xe9)](_0x552fa7+_0xf5e535(0x19e));const _0x51fbec=_0x7ac38f[_0xf5e535(0x188)]>0x0?'\x20('+_0x7ac38f['join'](',\x20')+')':'';return _0x13fcdd+'\x20'+_0x4d2101+'/'+_0x3ee44c+'\x20verified'+_0x51fbec;}function getCurrentSessionItems(_0x29c170,_0xdc078b){const _0x4b29c2=_0x48552e;if(!_0x29c170['currentSessionId'])return _0xdc078b['filter'](_0x58cb9f=>!_0x58cb9f['sessionId']);return _0xdc078b['filter'](_0x3f8f99=>_0x3f8f99[_0x4b29c2(0x181)]===_0x29c170['currentSessionId']||!_0x3f8f99[_0x4b29c2(0x181)]);}function displayFeature(_0x446f0c,_0x15a04a){const _0x34fdb4=_0x48552e,_0x17a1b1={'wbcOy':'\x0a\x20\x20\x20Scenarios:','jCvTb':function(_0x22478b,_0xde2f4e){return _0x22478b<_0xde2f4e;},'LrGHH':_0x34fdb4(0x192),'OSTmj':function(_0x49e4df,_0x1d4146){return _0x49e4df===_0x1d4146;},'fdqgb':function(_0x1900bb,_0x128197){return _0x1900bb===_0x128197;},'fjUaj':'verified','pwefr':function(_0x484988,_0x2628b8){return _0x484988===_0x2628b8;},'pfypM':'incomplete','PULiq':_0x34fdb4(0xe8),'fwGls':function(_0x19f785,_0x33fba2){return _0x19f785>_0x33fba2;},'EVhZY':function(_0x216bcb,_0x385b9b){return _0x216bcb!==_0x385b9b;},'tWkGg':'\x20[has\x20reviewer\x20feedback]','SBZRG':function(_0x1d8aec,_0x1887cd){return _0x1d8aec===_0x1887cd;},'DudCu':_0x34fdb4(0x160),'bZAEY':function(_0x4fbd14,_0x2b8f2a){return _0x4fbd14===_0x2b8f2a;},'ORNBU':function(_0x2a71da,_0x58cda3){return _0x2a71da===_0x58cda3;},'IjVbJ':'approved','rchcY':function(_0x466416,_0x51376d){return _0x466416===_0x51376d;}};console[_0x34fdb4(0xff)]('\x0a'+_0x446f0c[_0x34fdb4(0x11e)]+'\x20('+_0x446f0c[_0x34fdb4(0x195)]+')');_0x446f0c['stats']&&console[_0x34fdb4(0xff)]('\x20\x20\x20Progress:\x20'+getProgressDisplay(_0x446f0c[_0x34fdb4(0xfb)]));_0x446f0c[_0x34fdb4(0xe3)]&&console['log']('\x20\x20\x20Description:\x20'+_0x446f0c[_0x34fdb4(0xe3)]);_0x446f0c[_0x34fdb4(0xef)]&&console['log'](_0x34fdb4(0x133)+_0x446f0c[_0x34fdb4(0xef)]);_0x446f0c[_0x34fdb4(0x176)]&&console['log'](_0x34fdb4(0x109)+_0x446f0c['gitBranch']);console[_0x34fdb4(0xff)](_0x34fdb4(0xf7)+new Date(_0x446f0c['createdAt'])[_0x34fdb4(0xe1)]());_0x446f0c[_0x34fdb4(0x19c)]&&console[_0x34fdb4(0xff)](_0x34fdb4(0x170)+new Date(_0x446f0c['completedAt'])[_0x34fdb4(0xe1)]());if(_0x15a04a&&_0x15a04a['length']>0x0){console['log'](_0x17a1b1['wbcOy']);for(let _0x252186=0x0;_0x17a1b1['jCvTb'](_0x252186,_0x15a04a['length']);_0x252186++){const _0x19c758=_0x15a04a[_0x252186];let _0x20c06d;if(_0x19c758['status']===_0x17a1b1[_0x34fdb4(0x107)]&&_0x17a1b1['OSTmj'](_0x19c758['terminalReason'],'approved'))_0x20c06d='✅';else{if(_0x17a1b1[_0x34fdb4(0x14c)](_0x19c758['status'],_0x17a1b1['fjUaj']))_0x20c06d='🟢';else{if(_0x17a1b1[_0x34fdb4(0xeb)](_0x19c758[_0x34fdb4(0xcc)],_0x17a1b1['pfypM']))_0x20c06d='🟠';else{if(_0x19c758[_0x34fdb4(0xcc)]==='blocked')_0x20c06d='🛑';else{if(_0x19c758['status']===_0x17a1b1['LrGHH'])_0x20c06d='⛔';else _0x19c758['status']===_0x17a1b1['PULiq']?_0x20c06d='⏳':_0x20c06d='⬜';}}}}const _0x3af39f=_0x19c758[_0x34fdb4(0xc3)]>0x1?_0x34fdb4(0xf3)+_0x19c758['version']+')':'',_0x2ddeb1=_0x17a1b1[_0x34fdb4(0xd9)](_0x19c758[_0x34fdb4(0xc3)],0x1)&&_0x19c758[_0x34fdb4(0x16c)]&&_0x17a1b1[_0x34fdb4(0xea)](_0x19c758[_0x34fdb4(0xcc)],_0x34fdb4(0x192))&&_0x17a1b1[_0x34fdb4(0xea)](_0x19c758[_0x34fdb4(0xcc)],'verified')?_0x17a1b1[_0x34fdb4(0x108)]:'';console['log'](_0x34fdb4(0xf0)+(_0x252186+0x1)+'.\x20'+_0x20c06d+'\x20'+_0x19c758[_0x34fdb4(0xe3)]+_0x3af39f+_0x2ddeb1);_0x17a1b1['SBZRG'](_0x19c758[_0x34fdb4(0xcc)],_0x17a1b1[_0x34fdb4(0xe6)])&&_0x19c758[_0x34fdb4(0x196)]&&console['log'](_0x34fdb4(0x18e)+_0x19c758['blockedReason']);_0x19c758[_0x34fdb4(0xcc)]===_0x34fdb4(0x13b)&&_0x19c758['incompleteReason']&&console['log'](_0x34fdb4(0x171)+_0x19c758[_0x34fdb4(0xca)]);if(_0x17a1b1[_0x34fdb4(0x103)](_0x19c758['status'],_0x17a1b1[_0x34fdb4(0x107)])&&_0x17a1b1[_0x34fdb4(0x15c)](_0x19c758[_0x34fdb4(0x191)],_0x17a1b1[_0x34fdb4(0x10c)]))console['log']('\x20\x20\x20\x20\x20\x20Approved');else _0x17a1b1[_0x34fdb4(0x18a)](_0x19c758['status'],_0x17a1b1[_0x34fdb4(0x107)])&&_0x19c758[_0x34fdb4(0x17e)]&&console[_0x34fdb4(0xff)](_0x34fdb4(0x10b)+_0x19c758[_0x34fdb4(0x17e)]);}}}export async function featureCreate(_0x55449c,_0x4c7a04){const _0x85715f=_0x48552e,_0x541c2a={'GaOur':function(_0x8f349f){return _0x8f349f();},'YLfCu':function(_0x1c57f5,_0x2cf434){return _0x1c57f5===_0x2cf434;},'MvhqS':function(_0x322841,_0x257fb1){return _0x322841(_0x257fb1);},'duvdR':function(_0x2e2266){return _0x2e2266();}},{envNames:_0x354db9}=await getEnvNames();if(_0x354db9['length']===0x0&&!process[_0x85715f(0x1a7)]['RANGER_TEST_USERNAME']){let _0x1217c8=0x0;try{_0x1217c8=(await _0x541c2a[_0x85715f(0x120)](listCloudProfiles))[_0x85715f(0x188)];}catch{_0x1217c8=0x1;}_0x541c2a[_0x85715f(0x173)](_0x1217c8,0x0)&&console[_0x85715f(0x168)]('\x0a'+_0x541c2a['MvhqS'](formatProfileRequiredMessage,_0x6dbdb0=>bold(_0x6dbdb0)));}const _0x4855bb=_0x4c7a04[_0x85715f(0x194)]?_0x4c7a04[_0x85715f(0x194)]['map'](_0x5cadaf=>_0x5cadaf['trim']()):[],_0x3a7231=_0x541c2a['duvdR'](getGitRepoUrl),_0x2fe4ba=_0x541c2a['GaOur'](getGitBranch);console[_0x85715f(0xff)](_0x85715f(0xc6));const _0x2142d8=await createFeature({'name':_0x55449c,'description':_0x4c7a04['description'],'checklist':_0x4855bb,'gitRepoUrl':_0x3a7231,'gitBranch':_0x2fe4ba});await setActiveFeatureId(_0x2142d8['id']),await tryStartCurrentSession(_0x2142d8['id']);const _0x5cd665=process[_0x85715f(0x1a7)]['CLAUDE_SESSION_ID'];_0x5cd665&&registerSession(_0x5cd665,_0x2142d8['id']),console['log']('\x0a✅\x20Feature\x20review\x20created:\x20'+_0x2142d8['id']),displayFeature(_0x2142d8,_0x2142d8[_0x85715f(0x156)]),console[_0x85715f(0xff)](_0x85715f(0x12c));}export async function featureList(_0x228064){const _0x2ab1fc=_0x48552e,_0x37b134={'bsQET':function(_0x340518){return _0x340518();},'xYOPD':function(_0x21b6dd,_0x137264){return _0x21b6dd(_0x137264);},'NZXDs':'\x0aNo\x20feature\x20reviews\x20found.','Xenqx':function(_0x57b0aa,_0x9afd81){return _0x57b0aa>_0x9afd81;},'HMeJo':_0x2ab1fc(0xc5),'qSIiG':function(_0xd59613,_0x53c553){return _0xd59613(_0x53c553);},'InEYT':function(_0x44fa9a,_0x5cc8d4){return _0x44fa9a<_0x5cc8d4;},'HznDy':function(_0x330447,_0xb7d8af){return _0x330447!==_0xb7d8af;},'noJuJ':'\x20--current-branch','EphBC':_0x2ab1fc(0x174)},_0x1760e8={'limit':_0x228064[_0x2ab1fc(0x179)]??0xa,'offset':_0x228064['offset']??0x0,'includeDeleted':_0x228064['includeDeleted']};_0x228064[_0x2ab1fc(0x12f)]&&(_0x1760e8[_0x2ab1fc(0xef)]=_0x37b134[_0x2ab1fc(0x13e)](getGitRepoUrl),_0x1760e8[_0x2ab1fc(0x176)]=getGitBranch());const _0x2c7e64=await _0x37b134['xYOPD'](listFeatures,_0x1760e8);if(_0x2c7e64[_0x2ab1fc(0x105)][_0x2ab1fc(0x188)]===0x0){console['log'](_0x37b134['NZXDs']);return;}const _0x23cc1e=_0x37b134[_0x2ab1fc(0xdb)](_0x2c7e64[_0x2ab1fc(0x116)],_0x2c7e64['items']['length'])?'Showing\x20'+_0x2c7e64['items']['length']+_0x2ab1fc(0x14f)+_0x2c7e64[_0x2ab1fc(0x116)]:_0x2c7e64['totalCount']+_0x2ab1fc(0xd8);console[_0x2ab1fc(0xff)]('\x0a'+_0x23cc1e+':\x0a');for(const _0x56204c of _0x2c7e64[_0x2ab1fc(0x105)]){const _0xae4066=_0x37b134['HMeJo']['split']('|');let _0x4a0b72=0x0;while(!![]){switch(_0xae4066[_0x4a0b72++]){case'0':console[_0x2ab1fc(0xff)]('\x20\x20\x20Created:\x20'+new Date(_0x56204c[_0x2ab1fc(0x148)])[_0x2ab1fc(0x165)]());continue;case'1':console['log'](''+_0x56204c['name']);continue;case'2':console[_0x2ab1fc(0xff)]('');continue;case'3':console['log'](_0x2ab1fc(0xfe)+_0x56204c['id']);continue;case'4':_0x56204c[_0x2ab1fc(0x176)]&&console[_0x2ab1fc(0xff)]('\x20\x20\x20Branch:\x20'+_0x56204c['gitBranch']);continue;case'5':_0x56204c[_0x2ab1fc(0xfb)]&&console[_0x2ab1fc(0xff)]('\x20\x20\x20Progress:\x20'+_0x37b134[_0x2ab1fc(0x10a)](getProgressDisplay,_0x56204c[_0x2ab1fc(0xfb)]));continue;}break;}}const _0x46d353=_0x1760e8['limit']??0xa,_0x419695=(_0x1760e8[_0x2ab1fc(0x139)]??0x0)+_0x2c7e64['items'][_0x2ab1fc(0x188)];if(_0x37b134[_0x2ab1fc(0x177)](_0x419695,_0x2c7e64[_0x2ab1fc(0x116)])){const _0x11e817=_0x37b134['HznDy'](_0x46d353,0xa)?_0x2ab1fc(0x166)+_0x46d353:'',_0x1f2fa9=_0x228064[_0x2ab1fc(0x12f)]?_0x37b134['noJuJ']:'',_0x19142c=_0x228064[_0x2ab1fc(0x182)]?_0x37b134[_0x2ab1fc(0x198)]:'';console[_0x2ab1fc(0xff)]('Next\x20page:\x20ranger\x20list\x20--offset\x20'+_0x419695+_0x11e817+_0x1f2fa9+_0x19142c);}}export async function featureShow(_0x3381ae){const _0x421219=_0x48552e,_0xaf30ad={'GlEKC':_0x421219(0xd4),'VKzSr':function(_0x4d6585,_0x292e9c){return _0x4d6585(_0x292e9c);},'CsjRy':function(_0x411eac,_0x43eb33,_0x26d1b7){return _0x411eac(_0x43eb33,_0x26d1b7);}},_0x4dcbbc=_0x3381ae||await getActiveFeatureId();if(!_0x4dcbbc)throw new Error(_0xaf30ad[_0x421219(0xe4)]);const _0x4db2cd=await _0xaf30ad['VKzSr'](getFeature,_0x4dcbbc);_0xaf30ad[_0x421219(0xf4)](displayFeature,_0x4db2cd,_0x4db2cd[_0x421219(0x156)]);}export async function featureResume(_0x3f35e0){const _0x551edd=_0x48552e,_0x206bb5={'TMoZz':function(_0xf9aa8a,_0x477159){return _0xf9aa8a(_0x477159);},'tflCZ':function(_0x2f68b5,_0x2b0d64,_0x20ae26){return _0x2f68b5(_0x2b0d64,_0x20ae26);},'ELUyK':function(_0x4ecf0c){return _0x4ecf0c();},'TfgNf':'any','XqKLa':function(_0x321a81,_0x1bffa9){return _0x321a81===_0x1bffa9;},'ucJCW':_0x551edd(0x19a),'satnn':'\x0aNon-interactive\x20mode\x20detected.\x20Multiple\x20feature\x20reviews\x20found:','EakHB':'Please\x20specify\x20the\x20feature\x20review\x20ID:\x20ranger\x20resume\x20<id>','mkPRu':_0x551edd(0xe7),'TQgdx':_0x551edd(0x17b)};if(_0x3f35e0){const _0x35711e=await _0x206bb5['TMoZz'](getFeature,_0x3f35e0);await setActiveFeatureId(_0x35711e['id']);const _0x46747f=getGitBranch();_0x46747f&&_0x46747f!==_0x35711e['gitBranch']&&(await _0x206bb5[_0x551edd(0x1a8)](updateFeature,_0x35711e['id'],{'gitBranch':_0x46747f}),console['log'](_0x551edd(0x131)+_0x46747f));console[_0x551edd(0xff)]('\x0a✅\x20Resumed\x20feature\x20review:\x20'+_0x35711e[_0x551edd(0x11e)]+'\x20('+_0x35711e['id']+')'),await tryStartCurrentSession(_0x35711e['id']);const _0x4be47e=process[_0x551edd(0x1a7)]['CLAUDE_SESSION_ID'];_0x4be47e&&_0x206bb5[_0x551edd(0x1a8)](registerSession,_0x4be47e,_0x35711e['id']);displayFeature(_0x35711e,_0x35711e['checklistItems']),await _0x206bb5[_0x551edd(0x180)](printFeedbackNudge,_0x35711e['id']);return;}const _0x21e39f=_0x206bb5['ELUyK'](getGitRepoUrl),_0x5b6858=getGitBranch();if(!_0x21e39f&&!_0x5b6858)throw new Error('Not\x20in\x20a\x20git\x20repository.');console['log']('\x0aSearching\x20for\x20feature\x20reviews\x20matching:\x20'+(_0x21e39f||_0x551edd(0x152))+'\x20/\x20'+(_0x5b6858||_0x206bb5[_0x551edd(0xfc)])+'...');const _0x367dfd=await listFeatures({'gitRepoUrl':_0x21e39f,'gitBranch':_0x5b6858}),_0xc50b6c=_0x367dfd[_0x551edd(0x105)]['filter'](_0x3b47ab=>_0x3b47ab[_0x551edd(0xcc)]?_0x3b47ab['status']!=='verified':!_0x3b47ab[_0x551edd(0x19c)]);if(_0x206bb5['XqKLa'](_0xc50b6c['length'],0x0)){console['log']('\x0aNo\x20matching\x20active\x20feature\x20reviews\x20found.'),console[_0x551edd(0xff)](_0x206bb5[_0x551edd(0x157)]);return;}let _0x3a89cc;if(_0xc50b6c['length']===0x1)_0x3a89cc=_0xc50b6c[0x0];else{const _0x3e8552=process[_0x551edd(0x12b)]['isTTY']&&process['stdout']['isTTY'];if(!_0x3e8552){console['log'](_0x206bb5['satnn']);for(const _0xea23e6 of _0xc50b6c){console['log']('\x20\x20'+_0xea23e6[_0x551edd(0x11e)]),console[_0x551edd(0xff)]('\x20\x20\x20\x20\x20ID:\x20'+_0xea23e6['id']),_0xea23e6['stats']&&console['log']('\x20\x20\x20\x20\x20Progress:\x20'+getProgressDisplay(_0xea23e6[_0x551edd(0xfb)])),_0xea23e6[_0x551edd(0x176)]&&console['log']('\x20\x20\x20\x20\x20Branch:\x20'+_0xea23e6['gitBranch']);}throw new Error(_0x206bb5['EakHB']);}const {selected:_0x92477b}=await _0x8c3609[_0x551edd(0xf9)]([{'type':_0x206bb5[_0x551edd(0xe0)],'name':_0x551edd(0xfd),'message':_0x206bb5['TQgdx'],'choices':_0xc50b6c[_0x551edd(0x124)](_0x57788f=>({'name':_0x57788f[_0x551edd(0x11e)]+'\x20('+_0x57788f['id']+')','value':_0x57788f['id']}))}]);_0x3a89cc=_0xc50b6c[_0x551edd(0x16d)](_0x51d05b=>_0x51d05b['id']===_0x92477b);}await setActiveFeatureId(_0x3a89cc['id']);_0x5b6858&&_0x5b6858!==_0x3a89cc[_0x551edd(0x176)]&&(await updateFeature(_0x3a89cc['id'],{'gitBranch':_0x5b6858}),console['log'](_0x551edd(0x131)+_0x5b6858));console['log']('\x0a✅\x20Resumed\x20feature\x20review:\x20'+_0x3a89cc['name']+'\x20('+_0x3a89cc['id']+')'),await _0x206bb5[_0x551edd(0x180)](tryStartCurrentSession,_0x3a89cc['id']);const _0x137396=await getFeature(_0x3a89cc['id']),_0xe51ab9=process['env']['CLAUDE_SESSION_ID'];_0xe51ab9&&registerSession(_0xe51ab9,_0x137396['id']),displayFeature(_0x137396,_0x137396['checklistItems']),await _0x206bb5['TMoZz'](printFeedbackNudge,_0x137396['id']);}async function printFeedbackNudge(_0x3f5a9b){const _0x16220c=_0x48552e,_0x22177b={'EkdcM':function(_0x3b6b62,_0x5989f0,_0x3c06d7){return _0x3b6b62(_0x5989f0,_0x3c06d7);},'rRIFw':function(_0x386c5b,_0x35d3e5){return _0x386c5b>_0x35d3e5;},'dMydk':_0x16220c(0x153)};try{const {items:_0x2f024c}=await getActionItems(_0x3f5a9b);let _0x475fb8=0x0,_0x78892b=0x0;for(const _0x18ac4e of _0x2f024c){const _0x2d61ef=await _0x22177b['EkdcM'](getItemFeedback,_0x3f5a9b,_0x18ac4e['id']);_0x2d61ef[_0x16220c(0x114)]['length']>0x0&&(_0x475fb8+=_0x2d61ef[_0x16220c(0x114)]['length'],_0x78892b++);}_0x22177b[_0x16220c(0x12e)](_0x475fb8,0x0)&&(console['log']('\x0a⚠️\x20\x20'+_0x475fb8+'\x20unaddressed\x20reviewer\x20comment(s)\x20across\x20'+_0x78892b+_0x16220c(0xd5)),console['log'](_0x22177b[_0x16220c(0x149)]));}catch{}}async function tryStartCurrentSession(_0x47f0c1){const _0x54ed18=_0x48552e,_0x341618={'Qhley':function(_0x3c8acd,_0xa24ec1){return _0x3c8acd(_0xa24ec1);}};try{const {sessions:_0x576f0f}=await _0x341618['Qhley'](listFeatureSessions,_0x47f0c1),_0x127af0=_0x576f0f['find'](_0x4967e8=>_0x4967e8['status']===_0x54ed18(0x1a4));_0x127af0&&(await startSession(_0x47f0c1,_0x127af0['id']),console['log'](_0x54ed18(0x127)+_0x127af0['iteration']));}catch{}}export async function featureReport(_0x3119d9,_0x1a9980){const _0x1f39bb=_0x48552e,_0x4604e3={'IKeOf':function(_0x241c2d){return _0x241c2d();},'OGDrP':_0x1f39bb(0x115),'iBYDE':function(_0x473cba,_0x3189b3,_0x759f7,_0x4c594c){return _0x473cba(_0x3189b3,_0x759f7,_0x4c594c);},'DXFHn':function(_0x5f4856){return _0x5f4856();},'oVdUp':function(_0x511e89,_0x11f0d5,_0x2d94bc){return _0x511e89(_0x11f0d5,_0x2d94bc);},'qARiO':_0x1f39bb(0xfa)},_0x2515dc=_0x3119d9||await _0x4604e3['IKeOf'](getActiveFeatureId);if(!_0x2515dc)throw new Error('No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.');console[_0x1f39bb(0xff)](_0x4604e3[_0x1f39bb(0xf2)]);const _0x2f6a0f=await getFeatureReportMarkdown(_0x2515dc,{'style':_0x1a9980[_0x1f39bb(0x110)]}),_0x29201d=_0x1a9980[_0x1f39bb(0x19f)]||_0x4604e3[_0x1f39bb(0x118)](join,_0x4604e3[_0x1f39bb(0x10f)](getRangerDir),_0x1f39bb(0x18f),_0x2515dc+_0x1f39bb(0x159)),_0x1bc85e=join(_0x29201d,'..');!existsSync(_0x1bc85e)&&await _0x4604e3['oVdUp'](mkdir,_0x1bc85e,{'recursive':!![]}),await writeFile(_0x29201d,_0x2f6a0f,_0x4604e3[_0x1f39bb(0x1a3)]),console[_0x1f39bb(0xff)]('\x0a✅\x20Report\x20generated:\x20'+_0x29201d);}function getScenarioResult(_0xffbe8a){const _0x2f7f0d=_0x48552e,_0x81a4d5={'lXpQI':'closed','EzNOI':function(_0x4a075e,_0x366ab2){return _0x4a075e===_0x366ab2;},'ZBvkH':'verification_in_progress','ROoit':'in_progress'};if(_0xffbe8a[_0x2f7f0d(0xcc)]===_0x2f7f0d(0x192))return _0xffbe8a[_0x2f7f0d(0x191)]??_0x81a4d5[_0x2f7f0d(0xd1)];if(_0x81a4d5[_0x2f7f0d(0x190)](_0xffbe8a[_0x2f7f0d(0xcc)],_0x81a4d5[_0x2f7f0d(0x155)]))return _0x81a4d5['ROoit'];return _0xffbe8a[_0x2f7f0d(0xcc)];}function getScenarioRationale(_0x5d2624,_0x478ed9){const _0x13ac13=_0x48552e;if(_0x478ed9)return _0x478ed9;if(_0x5d2624[_0x13ac13(0x196)])return _0x5d2624[_0x13ac13(0x196)];if(_0x5d2624[_0x13ac13(0xca)])return _0x5d2624[_0x13ac13(0xca)];if(_0x5d2624['canceledReason'])return _0x5d2624['canceledReason'];if(_0x5d2624[_0x13ac13(0xc4)])return _0x5d2624[_0x13ac13(0xc4)];return null;}export async function featureReportPrDescription(_0x3baf03,_0x5ae788){const _0x27e890=_0x48552e,_0x532b5d={'eSZzV':'No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','OjAoU':function(_0x47d0f2,_0x26f09f){return _0x47d0f2(_0x26f09f);},'ORVly':_0x27e890(0x1a6),'hCjGL':function(_0x4cef7e,_0x118242){return _0x4cef7e>_0x118242;},'QCKxZ':_0x27e890(0x14b),'orIrO':function(_0x58b9f8,_0x104e82){return _0x58b9f8<_0x104e82;},'bEAQv':function(_0x21190e,_0x11df28){return _0x21190e===_0x11df28;},'QEpDi':'\x0a❌\x20All\x20scenarios\x20were\x20excluded.'},_0x4d2ea1=_0x3baf03||await getActiveFeatureId();if(!_0x4d2ea1)throw new Error(_0x532b5d[_0x27e890(0xd6)]);const _0x2ba4cd=await _0x532b5d[_0x27e890(0x18b)](getFeature,_0x4d2ea1),_0x145c72=_0x2ba4cd[_0x27e890(0x156)]||[],_0x54363e=getCurrentSessionItems(_0x2ba4cd,_0x145c72);_0x54363e['length']===0x0&&(console[_0x27e890(0xe2)](_0x532b5d[_0x27e890(0x10d)]),process[_0x27e890(0x136)](0x1));const _0x2606b7=_0x5ae788[_0x27e890(0x138)]??[],_0x5dadff=_0x2606b7['filter'](_0x509915=>!Number['isInteger'](_0x509915)||_0x509915<0x1||_0x509915>_0x54363e['length']);if(_0x532b5d[_0x27e890(0x16b)](_0x5dadff[_0x27e890(0x188)],0x0)){console['error']('\x0a❌\x20Invalid\x20scenario\x20number(s):\x20'+_0x5dadff[_0x27e890(0x172)](',\x20')),console['log'](_0x532b5d['QCKxZ']);for(let _0x59845a=0x0;_0x532b5d['orIrO'](_0x59845a,_0x54363e['length']);_0x59845a++){console[_0x27e890(0xff)]('\x20\x20'+(_0x59845a+0x1)+'.\x20'+_0x54363e[_0x59845a]['description']);}process['exit'](0x1);}const _0xe8d0df=new Set(_0x2606b7['map'](_0x1c09ae=>_0x1c09ae-0x1)),_0x515732=_0x54363e[_0x27e890(0xd3)]((_0x554e1e,_0x5d698c)=>!_0xe8d0df[_0x27e890(0x151)](_0x5d698c));_0x532b5d['bEAQv'](_0x515732['length'],0x0)&&(console[_0x27e890(0xe2)](_0x532b5d['QEpDi']),process['exit'](0x1));if(_0x5ae788['json'])await outputJsonReport(_0x4d2ea1,_0x2ba4cd,_0x515732);else{const _0x63d83f=await getFeatureReportMarkdown(_0x4d2ea1,{'itemIds':_0x515732['map'](_0x41703f=>_0x41703f['id'])});process['stdout']['write'](_0x63d83f[_0x27e890(0x1a1)]()+'\x0a');}}async function outputJsonReport(_0x374fa2,_0x28d09f,_0xac2d1){const _0xc2a81f=_0x48552e,_0x449032={'pABjf':function(_0x154cd5,_0x1c0a6){return _0x154cd5>_0x1c0a6;},'GqVMO':function(_0x4f51b5,_0x22096a){return _0x4f51b5(_0x22096a);}},_0x2f9660=getApiBaseUrl(),_0x5d049e=await _0x449032['GqVMO'](getFeatureReport,_0x374fa2),_0x49bd56=new Map(_0x5d049e['checklistItems'][_0xc2a81f(0x124)](_0x2cf423=>[_0x2cf423['id'],_0x2cf423])),_0x295bd3=await Promise['all'](_0xac2d1[_0xc2a81f(0x124)](async _0x4a210e=>{const _0x4b02d2=_0xc2a81f,_0x3e5fa3=_0x49bd56['get'](_0x4a210e['id']),_0x6242ea=_0x3e5fa3?.['linkedSession']??null;let _0x569ea3=[];if(_0x4a210e['browserSessionId'])try{const {steps:_0x3414a7}=await getBrowserSessionSteps(_0x4a210e[_0x4b02d2(0x117)]);_0x449032['pABjf'](_0x3414a7[_0x4b02d2(0x188)],0x0)&&(_0x569ea3=_0x3414a7['map'](_0x21b717=>{const _0x185369=_0x4b02d2,_0x4885e0=_0x21b717['assets']['find'](_0x11faf6=>_0x11faf6['assetType']===_0x185369(0x100)&&_0x11faf6['timing']==='after')??_0x21b717[_0x185369(0x17c)]['find'](_0x128ebe=>_0x128ebe['assetType']==='screenshot');let _0x137355=null,_0x47ef07=null;if(_0x4885e0){const _0x2eeff2=_0x4885e0[_0x185369(0x15a)][_0x185369(0x154)][_0x185369(0x167)]('/')['pop']();_0x137355=_0x2f9660+_0x185369(0x162)+_0x4a210e['browserSessionId']+'/artifacts/'+_0x2eeff2,_0x2eeff2&&(_0x47ef07=_0x2eeff2['replace'](/\.\w+$/,'')[_0x185369(0x122)](/^(key_)?\d+_/,'')['replace'](/[-_]/g,'\x20'));}return{'description':_0x47ef07||_0x21b717['description']||_0x21b717['stepName']||_0x185369(0xce)+_0x21b717[_0x185369(0x132)],'screenshot':_0x137355,'is_key_step':_0x21b717['isKeyStep']};}));}catch{}return _0x569ea3[_0x4b02d2(0x188)]===0x0&&_0x6242ea?.['screenshotUrls']&&(_0x569ea3=_0x6242ea['screenshotUrls']['map']((_0x38828b,_0x5a3fdc)=>({'description':'Screenshot\x20'+(_0x5a3fdc+0x1),'screenshot':_0x38828b,'is_key_step':![]}))),{'description':_0x4a210e['description'],'result':getScenarioResult(_0x4a210e),'rationale':getScenarioRationale(_0x4a210e,_0x6242ea?.[_0x4b02d2(0x197)]),'steps':_0x569ea3};})),_0x565961={'url':_0x28d09f['dashboardUrl'],'scenarios':_0x295bd3};process[_0xc2a81f(0x112)][_0xc2a81f(0x189)](JSON['stringify'](_0x565961,null,0x2)+'\x0a');}export async function featureConcludeSession(_0x28bc96){const _0x50eac1=_0x48552e,_0x1db7b3={'AsorW':function(_0x2dcf16){return _0x2dcf16();},'GQqUY':function(_0x26d9b7,_0x958e69){return _0x26d9b7(_0x958e69);},'wfYEi':function(_0x196920,_0x1fba79){return _0x196920===_0x1fba79;},'PpOsO':_0x50eac1(0x17a),'BIoJX':function(_0x236e0b,_0x1ec0a6){return _0x236e0b!==_0x1ec0a6;},'BLeAP':_0x50eac1(0x1a0),'GoGqf':'\x0aConcluding\x20session...'},_0x228a2=_0x28bc96||await _0x1db7b3['AsorW'](getActiveFeatureId);if(!_0x228a2)throw new Error(_0x50eac1(0xd4));const _0x169f4a=await getFeature(_0x228a2);if(!_0x169f4a['currentSessionId'])throw new Error('No\x20active\x20session\x20for\x20this\x20feature\x20review.');const {sessions:_0x24ea6}=await _0x1db7b3['GQqUY'](listFeatureSessions,_0x228a2),_0x3bdd91=_0x24ea6[_0x50eac1(0x16d)](_0x54d3ee=>_0x54d3ee['id']===_0x169f4a['currentSessionId']);if(!_0x3bdd91)throw new Error('Current\x20session\x20not\x20found.');if(_0x1db7b3[_0x50eac1(0x119)](_0x3bdd91[_0x50eac1(0xcc)],'completed')){console['log'](_0x1db7b3['PpOsO']);return;}if(_0x1db7b3[_0x50eac1(0x13f)](_0x3bdd91[_0x50eac1(0xcc)],_0x1db7b3['BLeAP']))throw new Error(_0x50eac1(0x125)+_0x3bdd91['status']);console['log'](_0x1db7b3['GoGqf']),await concludeSession(_0x228a2,_0x169f4a[_0x50eac1(0xdf)]),console['log']('\x0a✅\x20Session\x20'+_0x3bdd91['iteration']+_0x50eac1(0xcb)),console['log'](_0x50eac1(0x13d));}export async function featureSessions(_0x5ba7ae){const _0x4b2127=_0x48552e,_0x1a4501={'ChYkZ':function(_0x5a8907,_0x10324c){return _0x5a8907(_0x10324c);},'FzTqz':'completed'},_0x2f26fa=_0x5ba7ae||await getActiveFeatureId();if(!_0x2f26fa)throw new Error(_0x4b2127(0x15d));const _0x254fcc=await getFeature(_0x2f26fa);console['log'](_0x4b2127(0x17d)+_0x254fcc['name']+'\x0a');const {sessions:_0x181586}=await _0x1a4501[_0x4b2127(0x175)](listFeatureSessions,_0x2f26fa);if(_0x181586['length']===0x0){console['log'](_0x4b2127(0x1a2));return;}for(const _0x48ca02 of _0x181586){const _0x8ce256=_0x48ca02[_0x4b2127(0xcc)]===_0x1a4501['FzTqz']?'✅':_0x48ca02[_0x4b2127(0xcc)]==='in_progress'?'🔄':'▶️';console[_0x4b2127(0xff)](_0x8ce256+'\x20Session\x20'+_0x48ca02[_0x4b2127(0x147)]+'\x20('+_0x48ca02['id']+')'),console[_0x4b2127(0xff)](_0x4b2127(0x12d)+_0x48ca02[_0x4b2127(0xcc)]),console['log'](_0x4b2127(0xf7)+new Date(_0x48ca02[_0x4b2127(0x148)])['toLocaleString']()),_0x48ca02[_0x4b2127(0x19c)]&&console['log']('\x20\x20\x20Completed:\x20'+new Date(_0x48ca02['completedAt'])[_0x4b2127(0xe1)]()),console[_0x4b2127(0xff)]('');}}export async function featureAddScenario(_0x365860,_0x27fce7){const _0x13a381=_0x48552e,_0x229828={'hANBS':function(_0x31412c,_0x10121d,_0x3f6e29){return _0x31412c(_0x10121d,_0x3f6e29);},'CMxJk':function(_0x7dceaa,_0x3df64f){return _0x7dceaa(_0x3df64f);}},_0xe05fd3=_0x27fce7||await getActiveFeatureId();if(!_0xe05fd3)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 _0x587dea=await getFeature(_0xe05fd3);if(_0x587dea['latestReview']&&!_0x587dea[_0x13a381(0x14d)][_0x13a381(0x128)])throw new Error('Cannot\x20add\x20scenario:\x20feature\x20review\x20has\x20an\x20active\x20review.\x20Please\x20finish\x20your\x20review\x20first:\x20'+_0x587dea[_0x13a381(0x195)]);await _0x229828['hANBS'](createChecklistItem,_0xe05fd3,_0x365860);const _0x236b33=await _0x229828[_0x13a381(0x143)](getFeature,_0xe05fd3);console[_0x13a381(0xff)]('\x0a✅\x20Scenario\x20added'),displayFeature(_0x236b33,_0x236b33['checklistItems']);}export async function featureEditScenario(_0x9039b,_0x53549f){const _0xedc241=_0x48552e,_0x3bb430={'tDyet':_0xedc241(0x15e),'Aqles':function(_0x169bad,_0x5820e4){return _0x169bad(_0x5820e4);},'nkzja':'\x0a❌\x20Cannot\x20edit\x20scenario:\x20feature\x20review\x20has\x20an\x20active\x20review.','bKlip':_0xedc241(0x18d),'uwfGZ':_0xedc241(0xee),'FJYuu':function(_0x268403,_0x7c171e){return _0x268403<_0x7c171e;},'umzwt':function(_0x4bd814,_0x261008){return _0x4bd814-_0x261008;},'qcQVA':function(_0x187c4b,_0x4b0c26){return _0x187c4b>=_0x4b0c26;},'ByhOG':function(_0x31b8e2,_0x3a093d){return _0x31b8e2+_0x3a093d;},'dSxZB':function(_0x160b62,_0x39e62a,_0x3c942a){return _0x160b62(_0x39e62a,_0x3c942a);}},_0x5f0fab=_0x53549f['id']||await getActiveFeatureId();!_0x5f0fab&&(console[_0xedc241(0xe2)](_0xedc241(0x15b)),console[_0xedc241(0xe2)](_0x3bb430['tDyet']),process[_0xedc241(0x136)](0x1));const _0xfc5693=await _0x3bb430['Aqles'](getFeature,_0x5f0fab);_0xfc5693[_0xedc241(0x14d)]&&!_0xfc5693[_0xedc241(0x14d)]['submittedAt']&&(console['error'](_0x3bb430[_0xedc241(0x144)]),console[_0xedc241(0xe2)]('Please\x20finish\x20your\x20review\x20first:'),console['error']('\x20\x20'+_0xfc5693['dashboardUrl']),process[_0xedc241(0x136)](0x1));const _0x1cc31d=_0xfc5693[_0xedc241(0x156)]||[];_0x1cc31d[_0xedc241(0x188)]===0x0&&(console['error'](_0x3bb430['bKlip']),process[_0xedc241(0x136)](0x1));if(_0x53549f[_0xedc241(0x134)]===undefined){console[_0xedc241(0xe2)](_0x3bb430[_0xedc241(0x145)]),console[_0xedc241(0xff)]('\x0aAvailable\x20scenarios:');for(let _0x79ba26=0x0;_0x3bb430['FJYuu'](_0x79ba26,_0x1cc31d[_0xedc241(0x188)]);_0x79ba26++){console[_0xedc241(0xff)]('\x20\x20'+(_0x79ba26+0x1)+'.\x20'+_0x1cc31d[_0x79ba26][_0xedc241(0xe3)]);}process[_0xedc241(0x136)](0x1);}const _0x27fb25=_0x3bb430[_0xedc241(0xc8)](_0x53549f[_0xedc241(0x134)],0x1);if(_0x3bb430['FJYuu'](_0x27fb25,0x0)||_0x3bb430[_0xedc241(0x16a)](_0x27fb25,_0x1cc31d[_0xedc241(0x188)])){console['error']('\x0a❌\x20Invalid\x20scenario\x20index:\x20'+_0x53549f['scenario']+_0xedc241(0xde)+_0x1cc31d['length']+_0xedc241(0x164)),console['log']('\x0aAvailable\x20scenarios:');for(let _0x4888b5=0x0;_0x3bb430[_0xedc241(0xd2)](_0x4888b5,_0x1cc31d['length']);_0x4888b5++){console['log']('\x20\x20'+_0x3bb430[_0xedc241(0xc7)](_0x4888b5,0x1)+'.\x20'+_0x1cc31d[_0x4888b5]['description']);}process[_0xedc241(0x136)](0x1);}const _0x3368d8=_0x1cc31d[_0x27fb25];await updateChecklistItem(_0x5f0fab,_0x3368d8['id'],{'description':_0x9039b});const _0x569e21=await getFeature(_0x5f0fab);console['log'](_0xedc241(0x184)),_0x3bb430[_0xedc241(0x158)](displayFeature,_0x569e21,_0x569e21[_0xedc241(0x156)]);}async function downloadFeedbackImage(_0x4c6414,_0x551731){const _0x4401fa=_0x48552e,_0x1909c0={'NozQw':function(_0x465a30){return _0x465a30();},'JZicb':_0x4401fa(0x15f),'dGxaH':function(_0x1bcefb,_0x57afd3,_0x1bee3a){return _0x1bcefb(_0x57afd3,_0x1bee3a);}};try{const _0x3e5949=join(_0x1909c0[_0x4401fa(0x11c)](getRangerDir),_0x1909c0['JZicb']);await mkdir(_0x3e5949,{'recursive':!![]});const _0x78eed3=_0x1909c0[_0x4401fa(0x16e)](join,_0x3e5949,_0x4401fa(0x106)+_0x551731+'.png'),_0x2e300f=await fetch(_0x4c6414);if(!_0x2e300f['ok'])return null;const _0x388cec=Buffer['from'](await _0x2e300f['arrayBuffer']());return await writeFile(_0x78eed3,_0x388cec),_0x78eed3;}catch{return null;}}export async function featureGetReview(_0x1ae7b2){const _0x12332b=_0x48552e,_0x4f484a={'GQYVK':function(_0x4d77ad,_0x5d5701){return _0x4d77ad(_0x5d5701);},'QCQoc':function(_0x43bbf6,_0x1d6e75){return _0x43bbf6(_0x1d6e75);},'npelk':function(_0x5f4338,_0x492bac){return _0x5f4338<_0x492bac;},'tpaTq':function(_0x759352,_0x39f6c2,_0x281046){return _0x759352(_0x39f6c2,_0x281046);},'yyVjM':function(_0x371a50,_0x1b2b1f){return _0x371a50+_0x1b2b1f;},'bnpmL':_0x12332b(0x141),'XbQML':_0x12332b(0x163)},_0x4ef99e=_0x1ae7b2||await getActiveFeatureId();if(!_0x4ef99e)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 _0x4ac40e=await _0x4f484a['GQYVK'](getFeature,_0x4ef99e),{items:_0xd7cdc5}=await _0x4f484a['QCQoc'](getActionItems,_0x4ef99e);console['log'](_0x12332b(0x199)+_0x4ac40e[_0x12332b(0x11e)]+'\x20('+_0x4ac40e['id']+')\x0a');if(_0xd7cdc5['length']===0x0){console[_0x12332b(0xff)](_0x12332b(0x169));return;}for(let _0x2b1964=0x0;_0x4f484a['npelk'](_0x2b1964,_0xd7cdc5[_0x12332b(0x188)]);_0x2b1964++){const _0x5a195d=_0xd7cdc5[_0x2b1964],_0x2dabe3=_0x5a195d['version']>0x1?_0x12332b(0xf3)+_0x5a195d['version']+')':'',_0x47e1e9=await _0x4f484a['tpaTq'](getItemFeedback,_0x4ef99e,_0x5a195d['id']);if(_0x47e1e9['unaddressedComments']['length']>0x0){console[_0x12332b(0xff)]('Scenario\x20'+_0x4f484a[_0x12332b(0x14e)](_0x2b1964,0x1)+_0x12332b(0xcd)+_0x5a195d['description']+'\x22'+_0x2dabe3+'\x20—\x20'+_0x47e1e9['unaddressedComments'][_0x12332b(0x188)]+_0x12332b(0x146));for(const _0x476172 of _0x47e1e9[_0x12332b(0x114)]){const _0x33906f=new Date(_0x476172['createdAt'])[_0x12332b(0x165)](_0x4f484a[_0x12332b(0x178)],{'month':'short','day':'numeric'}),_0x2e245c=_0x476172['authorName']||_0x476172['authorEmail']||_0x4f484a[_0x12332b(0x13c)];console['log']('\x20\x20💬\x20'+_0x2e245c+'\x20('+_0x33906f+_0x12332b(0xf1)+_0x476172['content']+'\x22');if(_0x476172[_0x12332b(0xda)]){const _0x145bd8=await downloadFeedbackImage(_0x476172[_0x12332b(0xda)],_0x476172['id']);_0x145bd8&&console[_0x12332b(0xff)]('\x20\x20\x20\x20\x20📷\x20Screenshot:\x20'+_0x145bd8);}if(_0x476172['domRef']){const _0x3e0c33=_0x476172['domRef']['selector'][_0x12332b(0x167)]('\x20>\x20')['pop']()?.['split'](':')[0x0]||_0x12332b(0x14a),_0x580e6e=_0x476172['domRef']['textContent']?'\x20\x22'+_0x476172[_0x12332b(0x11d)]['textContent'][_0x12332b(0x111)](0x0,0x3c)+'\x22':'';console[_0x12332b(0xff)]('\x20\x20\x20\x20\x20🎯\x20Element:\x20<'+_0x3e0c33+'>'+_0x580e6e),console['log']('\x20\x20\x20\x20\x20📋\x20Selector:\x20'+_0x476172['domRef'][_0x12332b(0x17f)]);}else{if(_0x476172['spatial']){const _0x3947be=_0x476172['spatial']['coordinates'];_0x476172[_0x12332b(0x11f)][_0x12332b(0x185)]===_0x12332b(0x12a)&&_0x3947be['length']>=0x2?console['log'](_0x12332b(0xdc)+_0x3947be[0x0]['toFixed'](0x2)+',\x20'+_0x3947be[0x1][_0x12332b(0x129)](0x2)+')'):console[_0x12332b(0xff)]('\x20\x20\x20\x20\x20📍\x20Annotation:\x20'+_0x476172['spatial'][_0x12332b(0x185)]+_0x12332b(0x161)+_0x3947be[_0x12332b(0x124)](_0x14e697=>_0x14e697['toFixed'](0x2))[_0x12332b(0x172)](',\x20')+']');}}}if(_0x47e1e9['canonicalFlow']){console[_0x12332b(0xff)](_0x12332b(0xd0));for(const _0x3909f9 of _0x47e1e9[_0x12332b(0x135)][_0x12332b(0x167)]('\x0a')){console['log']('\x20\x20\x20\x20'+_0x3909f9);}}}else console['log']('Scenario\x20'+(_0x2b1964+0x1)+_0x12332b(0xcd)+_0x5a195d[_0x12332b(0xe3)]+'\x22'+_0x2dabe3+'\x20—\x20no\x20comments'),console['log']('\x20\x20✅\x20No\x20feedback\x20to\x20address');console['log']('');}}export async function featureDelete(_0x5bbb58){const _0x37bc61=_0x48552e,_0x399b94={'gwILx':function(_0x389e90){return _0x389e90();},'mXLeL':_0x37bc61(0xd4),'ZKRnc':_0x37bc61(0x140)},_0x4a43de=_0x5bbb58||await _0x399b94['gwILx'](getActiveFeatureId);if(!_0x4a43de)throw new Error(_0x399b94['mXLeL']);const _0x642097=await getFeature(_0x4a43de);await softDeleteFeature(_0x4a43de),console['log']('\x0a🗑️\x20\x20Deleted\x20feature\x20review:\x20'+_0x642097[_0x37bc61(0x11e)]+'\x20('+_0x4a43de+')'),console[_0x37bc61(0xff)](_0x399b94['ZKRnc']+_0x4a43de);}function _0x1bb3(){const _0x3359fb=['Step\x20','178850GUWVgm','\x20\x20Expected\x20flow:','lXpQI','FJYuu','filter','No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','\x20scenario(s).','eSZzV','770BtRLKa','\x20feature\x20review(s)\x20found','fwGls','assetUrl','Xenqx','\x20\x20\x20\x20\x20📍\x20Annotation:\x20point\x20at\x20(','kQRpx','.\x20Feature\x20review\x20has\x20','currentSessionId','mkPRu','toLocaleString','error','description','GlEKC','119189GnikRJ','DudCu','list','verification_in_progress','push','EVhZY','pwefr','blockedItems','WvESO','\x0a❌\x20No\x20scenario\x20number\x20provided.\x20Use\x20--scenario\x20<number>.','gitRepoUrl','\x20\x20\x20','):\x20\x22','OGDrP','\x20(v','CsjRy','33991620ZltRyW','pipe','\x20\x20\x20Created:\x20','\x1b[1m','prompt','utf-8','stats','TfgNf','selected','\x20\x20\x20ID:\x20','log','screenshot','186pMklPE','github.com/','bZAEY','\x0a✅\x20Restored\x20feature\x20review:\x20','items','comment_','LrGHH','tWkGg','\x20\x20\x20Branch:\x20','qSIiG','\x20\x20\x20\x20\x20\x20Cancelled:\x20','IjVbJ','ORVly','trim','DXFHn','style','slice','stdout','320523UHHxUU','unaddressedComments','\x0aGenerating\x20report...','totalCount','browserSessionId','iBYDE','wfYEi','pendingItems','aIiEh','NozQw','domRef','name','spatial','GaOur','\x20incomplete','replace','round','map','Cannot\x20conclude\x20session\x20with\x20status:\x20','5096cdBiYI','\x20\x20\x20▶️\x20Started\x20session\x20','submittedAt','toFixed','point','stdin','\x0a➡️\x20\x20Set\x20as\x20active\x20feature\x20review','\x20\x20\x20Status:\x20','rRIFw','currentBranch','\x20blocked','\x20\x20\x20Updated\x20branch\x20to:\x20','position','\x20\x20\x20Repository:\x20','scenario','canonicalFlow','exit','VBSMv','excludeScenarios','offset','7539165uawIaP','incomplete','XbQML','\x20\x20\x20The\x20feature\x20review\x20is\x20now\x20ready\x20for\x20human\x20review\x20on\x20the\x20Ranger\x20dashboard.','bsQET','BIoJX','\x20\x20\x20To\x20restore\x20it,\x20run:\x20ranger\x20restore\x20','en-US','8dogHHP','CMxJk','nkzja','uwfGZ','\x20unaddressed\x20comment(s)','iteration','createdAt','dMydk','element','\x0aAvailable\x20scenarios:','fdqgb','latestReview','yyVjM','\x20of\x20','1285968HxbKhk','has','any','\x20\x20\x20Run\x20`ranger\x20get-review`\x20to\x20see\x20what\x20needs\x20to\x20be\x20fixed.','location','ZBvkH','checklistItems','ucJCW','dSxZB','.md','storage','\x0a❌\x20No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','ORNBU','No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','feedback-images','blocked','\x20at\x20[','/api/v1/mcp/browser-sessions/','Unknown','\x20scenarios.','toLocaleDateString','\x20--limit\x20','split','warn','No\x20scenarios\x20found.','qcQVA','hCjGL','parentItemId','find','dGxaH','active-feature.txt','\x20\x20\x20Completed:\x20','\x20\x20\x20\x20\x20\x20Incomplete:\x20','join','YLfCu','\x20--include-deleted','ChYkZ','gitBranch','InEYT','bnpmL','limit','\x0a✅\x20Session\x20is\x20already\x20completed.','Multiple\x20feature\x20reviews\x20found.\x20Select\x20one:','assets','\x0a📁\x20Sessions\x20for\x20feature\x20review:\x20','canceledReason','selector','TMoZz','sessionId','includeDeleted','bMWJb','\x0a✅\x20Scenario\x20updated','type','YfNkv','70tbOCfo','length','write','rchcY','OjAoU','rulIh','\x0a❌\x20No\x20scenarios\x20found\x20to\x20edit.','\x20\x20\x20\x20\x20\x20Blocked:\x20','reports','EzNOI','terminalReason','closed','incompleteItems','scenarios','dashboardUrl','blockedReason','agentResponse','EphBC','\x0a📋\x20Feedback\x20for:\x20','Run:\x20ranger\x20create\x20\x22<name>\x22\x20to\x20create\x20a\x20new\x20feature\x20review','JkKlE','completedAt','26HGjOUb','\x20in\x20progress','output','in_progress','trimEnd','No\x20sessions\x20found.','qARiO','ready','gsQsA','\x0a❌\x20No\x20scenarios\x20found\x20to\x20include.','env','tflCZ','version','notes','1|3|5|4|0|2','\x0aCreating\x20feature\x20review...','ByhOG','umzwt','git\x20rev-parse\x20--abbrev-ref\x20HEAD','incompleteReason','\x20concluded.','status',':\x20\x22'];_0x1bb3=function(){return _0x3359fb;};return _0x1bb3();}export async function featureRestore(_0x2011fb){const _0x3613c7=_0x48552e,_0x1649de={'WvESO':function(_0x4bc2eb,_0x2df1f0,_0x4623fa){return _0x4bc2eb(_0x2df1f0,_0x4623fa);}};await restoreFeature(_0x2011fb);const _0x1f4117=await getFeature(_0x2011fb);console['log'](_0x3613c7(0x104)+_0x1f4117[_0x3613c7(0x11e)]+'\x20('+_0x2011fb+')'),_0x1649de[_0x3613c7(0xed)](displayFeature,_0x1f4117,_0x1f4117['checklistItems']);}
1
+ const _0x114e9e=_0x949b;(function(_0x102b27,_0x55c4db){const _0x27f248=_0x949b,_0xdbff46=_0x102b27();while(!![]){try{const _0x443453=parseInt(_0x27f248(0x27f))/0x1*(parseInt(_0x27f248(0x249))/0x2)+-parseInt(_0x27f248(0x282))/0x3+parseInt(_0x27f248(0x286))/0x4*(-parseInt(_0x27f248(0x278))/0x5)+parseInt(_0x27f248(0x1ec))/0x6+parseInt(_0x27f248(0x203))/0x7*(parseInt(_0x27f248(0x270))/0x8)+-parseInt(_0x27f248(0x23d))/0x9*(-parseInt(_0x27f248(0x232))/0xa)+-parseInt(_0x27f248(0x227))/0xb;if(_0x443453===_0x55c4db)break;else _0xdbff46['push'](_0xdbff46['shift']());}catch(_0x31fc4c){_0xdbff46['push'](_0xdbff46['shift']());}}}(_0x3e5f,0x633f9));import{readFile,writeFile,mkdir}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{execSync}from'child_process';import _0x5e4fc6 from'inquirer';import{createFeature,listFeatures,getFeature,updateFeature,getFeatureReport,getFeatureReportMarkdown,listFeatureSessions,startSession,concludeSession,createChecklistItem,getActionItems,getItemFeedback,softDeleteFeature,restoreFeature,updateChecklistItem}from'./utils/featureApi.js';import{getBrowserSessionSteps}from'./utils/browserSessionsApi.js';import{getApiBaseUrl}from'./utils/environment.js';import{getRangerDir}from'./utils/rangerRoot.js';import{registerSession}from'./utils/sessionCache.js';import{getEnvNames}from'./env.js';import{formatProfileRequiredMessage}from'./utils/profileMessages.js';import{listCloudProfiles}from'./utils/cloudProfile.js';const ACTIVE_FEATURE_FILE='active-feature.txt',bold=_0x27c370=>_0x114e9e(0x264)+_0x27c370+'\x1b[0m';function getGitRepoUrl(){const _0x2a32f2=_0x114e9e,_0x21ef69={'BmQjC':'pipe','jDahX':'github.com/'};try{const _0x5c38fb=execSync(_0x2a32f2(0x1f5),{'encoding':'utf-8','stdio':[_0x21ef69[_0x2a32f2(0x2b6)],_0x2a32f2(0x29f),_0x2a32f2(0x29f)]})[_0x2a32f2(0x262)]();return _0x5c38fb['replace'](/\.git$/,'')[_0x2a32f2(0x277)](/^git@github\.com:/,_0x21ef69['jDahX'])['replace'](/^https?:\/\//,'');}catch{return undefined;}}function getGitBranch(){const _0x5c01db=_0x114e9e,_0x300079={'GNyIc':function(_0xe9f6f6,_0x3aea17,_0x3c25c1){return _0xe9f6f6(_0x3aea17,_0x3c25c1);},'wylnX':'utf-8','yITGp':'pipe'};try{return _0x300079['GNyIc'](execSync,_0x5c01db(0x29a),{'encoding':_0x300079[_0x5c01db(0x24e)],'stdio':[_0x300079[_0x5c01db(0x220)],_0x300079[_0x5c01db(0x220)],_0x300079['yITGp']]})[_0x5c01db(0x262)]();}catch{return undefined;}}export async function getActiveFeatureId(){const _0x2da0ab=_0x114e9e,_0xdfbf6b={'vngHY':function(_0xfdf03a){return _0xfdf03a();},'YTMPH':_0x2da0ab(0x2a3)},_0x170210=join(_0xdfbf6b['vngHY'](getRangerDir),ACTIVE_FEATURE_FILE);if(!existsSync(_0x170210))return null;try{const _0x59a0ec=await readFile(_0x170210,_0xdfbf6b[_0x2da0ab(0x24c)]);return _0x59a0ec['trim']()||null;}catch{return null;}}async function setActiveFeatureId(_0x2c437b){const _0x484e7c=_0x114e9e,_0x1fada2={'Itapx':function(_0x5db000,_0x1d9638,_0x376083){return _0x5db000(_0x1d9638,_0x376083);},'OdIFg':function(_0x143678,_0x37d0cd,_0x223387,_0x5aa6af){return _0x143678(_0x37d0cd,_0x223387,_0x5aa6af);}},_0x1ff12c=getRangerDir(),_0x48e469=_0x1fada2[_0x484e7c(0x2a7)](join,_0x1ff12c,ACTIVE_FEATURE_FILE);!existsSync(_0x1ff12c)&&await mkdir(_0x1ff12c,{'recursive':!![]}),await _0x1fada2[_0x484e7c(0x21a)](writeFile,_0x48e469,_0x2c437b,'utf-8');}function getProgressDisplay(_0xb97f2){const _0x52a641=_0x114e9e,_0x42754e={'gMWux':function(_0x9c4c3e,_0x5eb6cf){return _0x9c4c3e+_0x5eb6cf;},'ndDKM':function(_0x245775,_0x14cdf7){return _0x245775+_0x14cdf7;},'jcGAH':function(_0x522a01,_0x2a7a87){return _0x522a01===_0x2a7a87;},'ALCWA':function(_0x281f2b,_0x3b537f){return _0x281f2b>_0x3b537f;}},_0x32fb50=_0xb97f2['verifiedItems']||0x0,_0x202f15=_0xb97f2['verificationInProgressItems']||0x0,_0x2a008d=_0xb97f2[_0x52a641(0x291)]||0x0,_0x4c19cd=_0xb97f2['incompleteItems']||0x0,_0x231787=_0xb97f2[_0x52a641(0x21d)]||0x0,_0x112803=_0x42754e['gMWux'](_0x42754e[_0x52a641(0x1eb)](_0x42754e[_0x52a641(0x1eb)](_0x42754e[_0x52a641(0x25b)](_0x32fb50,_0x202f15),_0x2a008d),_0x4c19cd),_0x231787);if(_0x42754e[_0x52a641(0x2b2)](_0x112803,0x0))return'-';const _0x28f60f=0xa,_0x326caa=Math[_0x52a641(0x1f3)](_0x32fb50/_0x112803*_0x28f60f),_0x2cde32='█'[_0x52a641(0x281)](_0x326caa)+'░'['repeat'](_0x28f60f-_0x326caa),_0x503548=[];if(_0x2a008d>0x0)_0x503548[_0x52a641(0x225)](_0x2a008d+'\x20blocked');if(_0x4c19cd>0x0)_0x503548['push'](_0x4c19cd+_0x52a641(0x1f9));if(_0x42754e[_0x52a641(0x28e)](_0x202f15,0x0))_0x503548['push'](_0x202f15+_0x52a641(0x239));const _0x105d22=_0x42754e['ALCWA'](_0x503548[_0x52a641(0x2ac)],0x0)?'\x20('+_0x503548['join'](',\x20')+')':'';return _0x2cde32+'\x20'+_0x32fb50+'/'+_0x112803+_0x52a641(0x200)+_0x105d22;}function getCurrentSessionItems(_0x13e70d,_0x2bd1c3){const _0x126eca=_0x114e9e;if(!_0x13e70d['currentSessionId'])return _0x2bd1c3['filter'](_0x5b7a62=>!_0x5b7a62['sessionId']);return _0x2bd1c3[_0x126eca(0x24a)](_0x4852d2=>_0x4852d2[_0x126eca(0x258)]===_0x13e70d[_0x126eca(0x28a)]||!_0x4852d2['sessionId']);}function displayFeature(_0x314945,_0x1de6ad){const _0x15721f=_0x114e9e,_0x5be45b={'vbuyd':function(_0x53f398,_0x5a99a2){return _0x53f398>_0x5a99a2;},'BokjM':_0x15721f(0x1e8),'fBuWm':function(_0x456cc7,_0x227805){return _0x456cc7<_0x227805;},'txlYJ':'verified','vJKbq':'incomplete','OzlGX':function(_0x202836,_0x4550b0){return _0x202836===_0x4550b0;},'xdFyJ':'blocked','HIKZF':_0x15721f(0x233),'kZNQi':function(_0x120e3c,_0x56cb1c){return _0x120e3c>_0x56cb1c;},'nDLuM':function(_0x388b50,_0x1fae25){return _0x388b50!==_0x1fae25;},'eYYzC':'\x20[has\x20reviewer\x20feedback]','JXXya':function(_0x1d89a0,_0x47c453){return _0x1d89a0===_0x47c453;},'rXiry':function(_0x19ea57,_0x27f01f){return _0x19ea57===_0x27f01f;},'uvaiY':_0x15721f(0x2ba),'ABetd':'approved'};console['log']('\x0a'+_0x314945['name']+'\x20('+_0x314945['dashboardUrl']+')');_0x314945['stats']&&console[_0x15721f(0x23e)](_0x15721f(0x224)+getProgressDisplay(_0x314945['stats']));_0x314945[_0x15721f(0x253)]&&console['log'](_0x15721f(0x247)+_0x314945['description']);_0x314945[_0x15721f(0x23a)]&&console[_0x15721f(0x23e)]('\x20\x20\x20Repository:\x20'+_0x314945[_0x15721f(0x23a)]);_0x314945[_0x15721f(0x25c)]&&console['log']('\x20\x20\x20Branch:\x20'+_0x314945['gitBranch']);console[_0x15721f(0x23e)](_0x15721f(0x26a)+new Date(_0x314945['createdAt'])[_0x15721f(0x2aa)]());_0x314945['completedAt']&&console['log']('\x20\x20\x20Completed:\x20'+new Date(_0x314945['completedAt'])['toLocaleString']());if(_0x1de6ad&&_0x5be45b['vbuyd'](_0x1de6ad['length'],0x0)){console[_0x15721f(0x23e)](_0x5be45b[_0x15721f(0x21c)]);for(let _0x5b9aa2=0x0;_0x5be45b['fBuWm'](_0x5b9aa2,_0x1de6ad['length']);_0x5b9aa2++){const _0x2b792a=_0x1de6ad[_0x5b9aa2];let _0x834a71;if(_0x2b792a['status']===_0x15721f(0x2ba)&&_0x2b792a[_0x15721f(0x255)]===_0x15721f(0x288))_0x834a71='✅';else{if(_0x2b792a['status']===_0x5be45b[_0x15721f(0x2ae)])_0x834a71='🟢';else{if(_0x2b792a['status']===_0x5be45b['vJKbq'])_0x834a71='🟠';else{if(_0x5be45b['OzlGX'](_0x2b792a[_0x15721f(0x1f7)],_0x5be45b[_0x15721f(0x283)]))_0x834a71='🛑';else{if(_0x5be45b[_0x15721f(0x287)](_0x2b792a[_0x15721f(0x1f7)],_0x15721f(0x2ba)))_0x834a71='⛔';else _0x2b792a[_0x15721f(0x1f7)]===_0x5be45b[_0x15721f(0x1fe)]?_0x834a71='⏳':_0x834a71='⬜';}}}}const _0x420ca1=_0x2b792a['version']>0x1?'\x20(v'+_0x2b792a['version']+')':'',_0x48081e=_0x5be45b['kZNQi'](_0x2b792a[_0x15721f(0x2ab)],0x1)&&_0x2b792a['parentItemId']&&_0x5be45b[_0x15721f(0x294)](_0x2b792a[_0x15721f(0x1f7)],'closed')&&_0x2b792a['status']!=='verified'?_0x5be45b['eYYzC']:'';console[_0x15721f(0x23e)]('\x20\x20\x20'+(_0x5b9aa2+0x1)+'.\x20'+_0x834a71+'\x20'+_0x2b792a['description']+_0x420ca1+_0x48081e);_0x5be45b['JXXya'](_0x2b792a[_0x15721f(0x1f7)],_0x5be45b['xdFyJ'])&&_0x2b792a['blockedReason']&&console['log'](_0x15721f(0x273)+_0x2b792a['blockedReason']);_0x5be45b['rXiry'](_0x2b792a['status'],_0x5be45b[_0x15721f(0x20e)])&&_0x2b792a[_0x15721f(0x2b1)]&&console['log']('\x20\x20\x20\x20\x20\x20Incomplete:\x20'+_0x2b792a['incompleteReason']);if(_0x2b792a['status']===_0x5be45b[_0x15721f(0x2be)]&&_0x5be45b['OzlGX'](_0x2b792a[_0x15721f(0x255)],_0x5be45b[_0x15721f(0x24b)]))console['log'](_0x15721f(0x1e9));else _0x5be45b[_0x15721f(0x287)](_0x2b792a[_0x15721f(0x1f7)],_0x5be45b['uvaiY'])&&_0x2b792a[_0x15721f(0x20d)]&&console['log']('\x20\x20\x20\x20\x20\x20Cancelled:\x20'+_0x2b792a[_0x15721f(0x20d)]);}}}export async function featureCreate(_0x3c2af1,_0x261fc0){const _0x182d19=_0x114e9e,_0x4de1a4={'gwFfD':function(_0x2a7cc7){return _0x2a7cc7();},'gksrd':function(_0x4f97b7,_0x54219d){return _0x4f97b7===_0x54219d;},'aKUNd':function(_0x1726d4){return _0x1726d4();},'MnPRz':function(_0x516d60){return _0x516d60();},'vSsPd':function(_0x41448a){return _0x41448a();},'lGtad':function(_0x1d86d1,_0x4d5975){return _0x1d86d1(_0x4d5975);}},{envNames:_0x2b33c1}=await _0x4de1a4['gwFfD'](getEnvNames);if(_0x4de1a4['gksrd'](_0x2b33c1['length'],0x0)&&!process['env']['RANGER_TEST_USERNAME']){let _0x2a07e7=0x0;try{_0x2a07e7=(await _0x4de1a4['aKUNd'](listCloudProfiles))[_0x182d19(0x2ac)];}catch{_0x2a07e7=0x1;}_0x2a07e7===0x0&&console['warn']('\x0a'+formatProfileRequiredMessage(_0x37effb=>bold(_0x37effb)));}const _0x1b63bc=_0x261fc0[_0x182d19(0x254)]?_0x261fc0['scenarios'][_0x182d19(0x1e2)](_0x21770e=>_0x21770e[_0x182d19(0x262)]()):[],_0x4cb2fb=_0x4de1a4['MnPRz'](getGitRepoUrl),_0x3b751f=_0x4de1a4[_0x182d19(0x256)](getGitBranch);console[_0x182d19(0x23e)](_0x182d19(0x1fb));const _0x120ded=await _0x4de1a4['lGtad'](createFeature,{'name':_0x3c2af1,'description':_0x261fc0[_0x182d19(0x253)],'checklist':_0x1b63bc,'gitRepoUrl':_0x4cb2fb,'gitBranch':_0x3b751f});await setActiveFeatureId(_0x120ded['id']),await _0x4de1a4[_0x182d19(0x27a)](tryStartCurrentSession,_0x120ded['id']);const _0x2a86ce=process[_0x182d19(0x222)]['CLAUDE_SESSION_ID'];_0x2a86ce&&registerSession(_0x2a86ce,_0x120ded['id']),console['log'](_0x182d19(0x241)+_0x120ded['id']),displayFeature(_0x120ded,_0x120ded[_0x182d19(0x27e)]),console[_0x182d19(0x23e)](_0x182d19(0x295));}export async function featureList(_0x3d6143){const _0x136280=_0x114e9e,_0xa1c9b5={'HJdBg':function(_0x3f3ef3){return _0x3f3ef3();},'ahnOT':function(_0x4a943a,_0x1c0d83){return _0x4a943a(_0x1c0d83);},'rMTds':function(_0x44fa72,_0x2147fb){return _0x44fa72>_0x2147fb;},'HOYVz':function(_0x5409de,_0x59d9e5){return _0x5409de<_0x59d9e5;},'OglQg':function(_0x1be696,_0x50e0d7){return _0x1be696!==_0x50e0d7;},'huZAK':_0x136280(0x2b3),'lvCpc':'\x20--include-deleted'},_0x1d032a={'limit':_0x3d6143['limit']??0xa,'offset':_0x3d6143['offset']??0x0,'includeDeleted':_0x3d6143[_0x136280(0x263)]};_0x3d6143[_0x136280(0x1f4)]&&(_0x1d032a[_0x136280(0x23a)]=getGitRepoUrl(),_0x1d032a['gitBranch']=_0xa1c9b5['HJdBg'](getGitBranch));const _0x101895=await _0xa1c9b5[_0x136280(0x2c1)](listFeatures,_0x1d032a);if(_0x101895['items']['length']===0x0){console[_0x136280(0x23e)](_0x136280(0x259));return;}const _0x5ba27d=_0xa1c9b5['rMTds'](_0x101895[_0x136280(0x252)],_0x101895[_0x136280(0x272)][_0x136280(0x2ac)])?'Showing\x20'+_0x101895['items']['length']+'\x20of\x20'+_0x101895['totalCount']:_0x101895['totalCount']+_0x136280(0x24f);console[_0x136280(0x23e)]('\x0a'+_0x5ba27d+':\x0a');for(const _0x166b53 of _0x101895['items']){const _0x3f0664=_0x136280(0x22c)[_0x136280(0x1ed)]('|');let _0x33eec9=0x0;while(!![]){switch(_0x3f0664[_0x33eec9++]){case'0':console[_0x136280(0x23e)]('\x20\x20\x20ID:\x20'+_0x166b53['id']);continue;case'1':_0x166b53[_0x136280(0x216)]&&console[_0x136280(0x23e)](_0x136280(0x224)+_0xa1c9b5[_0x136280(0x2c1)](getProgressDisplay,_0x166b53['stats']));continue;case'2':console['log']('\x20\x20\x20Created:\x20'+new Date(_0x166b53[_0x136280(0x1fa)])[_0x136280(0x268)]());continue;case'3':console['log'](''+_0x166b53[_0x136280(0x1e4)]);continue;case'4':_0x166b53['gitBranch']&&console[_0x136280(0x23e)](_0x136280(0x2c8)+_0x166b53['gitBranch']);continue;case'5':console[_0x136280(0x23e)]('');continue;}break;}}const _0x53cfa0=_0x1d032a['limit']??0xa,_0x296dcd=(_0x1d032a[_0x136280(0x223)]??0x0)+_0x101895['items'][_0x136280(0x2ac)];if(_0xa1c9b5[_0x136280(0x2c3)](_0x296dcd,_0x101895['totalCount'])){const _0x2a79ba=_0xa1c9b5[_0x136280(0x20f)](_0x53cfa0,0xa)?_0x136280(0x250)+_0x53cfa0:'',_0x407e93=_0x3d6143['currentBranch']?_0xa1c9b5['huZAK']:'',_0x368ff6=_0x3d6143['includeDeleted']?_0xa1c9b5['lvCpc']:'';console['log'](_0x136280(0x2c0)+_0x296dcd+_0x2a79ba+_0x407e93+_0x368ff6);}}export async function featureShow(_0x5a3b36){const _0x5141c0=_0x114e9e,_0x33d0f6={'eCjTJ':'No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','DHUYN':function(_0x27110f,_0x19fc1d){return _0x27110f(_0x19fc1d);}},_0x27da61=_0x5a3b36||await getActiveFeatureId();if(!_0x27da61)throw new Error(_0x33d0f6[_0x5141c0(0x2bc)]);const _0x10f71d=await _0x33d0f6[_0x5141c0(0x218)](getFeature,_0x27da61);displayFeature(_0x10f71d,_0x10f71d[_0x5141c0(0x27e)]);}export async function featureResume(_0x460a83){const _0x11f8a7=_0x114e9e,_0x2157f4={'bDfam':function(_0x19b56c,_0x15e3c0){return _0x19b56c(_0x15e3c0);},'BqEbf':function(_0x2fc4ed,_0x194572){return _0x2fc4ed(_0x194572);},'udCTz':function(_0x100ad4){return _0x100ad4();},'gmiLf':function(_0x461769,_0x3758fb){return _0x461769!==_0x3758fb;},'AbYlm':function(_0x34cc3f,_0x4e29e0,_0x4dbaaa){return _0x34cc3f(_0x4e29e0,_0x4dbaaa);},'qqmgh':function(_0x371c07,_0x59b1aa){return _0x371c07(_0x59b1aa);},'wRDQc':'Not\x20in\x20a\x20git\x20repository.','lSkpu':function(_0x22d07c,_0x1510de){return _0x22d07c||_0x1510de;},'WipJC':function(_0x4af600,_0x4e2cef){return _0x4af600===_0x4e2cef;},'mcylB':'\x0aNo\x20matching\x20active\x20feature\x20reviews\x20found.','YkcoZ':_0x11f8a7(0x1e3),'uQydu':function(_0x42a674,_0x25e8cf){return _0x42a674===_0x25e8cf;},'MjgQN':'\x0aNon-interactive\x20mode\x20detected.\x20Multiple\x20feature\x20reviews\x20found:','radQK':function(_0x1bc432,_0x1f5c04){return _0x1bc432(_0x1f5c04);},'bnyYc':function(_0x3ebd67,_0x19bb85){return _0x3ebd67!==_0x19bb85;},'rvgqL':function(_0x4829f5,_0x303287){return _0x4829f5(_0x303287);}};if(_0x460a83){const _0x226ba1=await _0x2157f4[_0x11f8a7(0x20c)](getFeature,_0x460a83);await _0x2157f4['BqEbf'](setActiveFeatureId,_0x226ba1['id']);const _0xa011bc=_0x2157f4[_0x11f8a7(0x230)](getGitBranch);_0xa011bc&&_0x2157f4['gmiLf'](_0xa011bc,_0x226ba1['gitBranch'])&&(await _0x2157f4[_0x11f8a7(0x1ff)](updateFeature,_0x226ba1['id'],{'gitBranch':_0xa011bc}),console[_0x11f8a7(0x23e)](_0x11f8a7(0x1e7)+_0xa011bc));console['log']('\x0a✅\x20Resumed\x20feature\x20review:\x20'+_0x226ba1['name']+'\x20('+_0x226ba1['id']+')'),await tryStartCurrentSession(_0x226ba1['id']);const _0x3c7f96=process[_0x11f8a7(0x222)][_0x11f8a7(0x2a4)];_0x3c7f96&&_0x2157f4['AbYlm'](registerSession,_0x3c7f96,_0x226ba1['id']);displayFeature(_0x226ba1,_0x226ba1[_0x11f8a7(0x27e)]),await _0x2157f4['qqmgh'](printFeedbackNudge,_0x226ba1['id']);return;}const _0x1495ea=getGitRepoUrl(),_0x914c0e=_0x2157f4['udCTz'](getGitBranch);if(!_0x1495ea&&!_0x914c0e)throw new Error(_0x2157f4[_0x11f8a7(0x1e6)]);console['log']('\x0aSearching\x20for\x20feature\x20reviews\x20matching:\x20'+_0x2157f4['lSkpu'](_0x1495ea,_0x11f8a7(0x2bd))+'\x20/\x20'+(_0x914c0e||_0x11f8a7(0x2bd))+_0x11f8a7(0x274));const _0x2a35bc=await listFeatures({'gitRepoUrl':_0x1495ea,'gitBranch':_0x914c0e}),_0x24ddaf=_0x2a35bc['items']['filter'](_0x13a462=>_0x13a462['status']?_0x13a462[_0x11f8a7(0x1f7)]!==_0x11f8a7(0x2a5):!_0x13a462[_0x11f8a7(0x1f2)]);if(_0x2157f4[_0x11f8a7(0x2a0)](_0x24ddaf[_0x11f8a7(0x2ac)],0x0)){console[_0x11f8a7(0x23e)](_0x2157f4['mcylB']),console[_0x11f8a7(0x23e)](_0x2157f4[_0x11f8a7(0x2a1)]);return;}let _0x147946;if(_0x2157f4[_0x11f8a7(0x2b4)](_0x24ddaf['length'],0x1))_0x147946=_0x24ddaf[0x0];else{const _0x1fa1b4=process[_0x11f8a7(0x23b)]['isTTY']&&process['stdout'][_0x11f8a7(0x2b7)];if(!_0x1fa1b4){console[_0x11f8a7(0x23e)](_0x2157f4['MjgQN']);for(const _0x374f7f of _0x24ddaf){console[_0x11f8a7(0x23e)]('\x20\x20'+_0x374f7f['name']),console['log']('\x20\x20\x20\x20\x20ID:\x20'+_0x374f7f['id']),_0x374f7f[_0x11f8a7(0x216)]&&console[_0x11f8a7(0x23e)]('\x20\x20\x20\x20\x20Progress:\x20'+_0x2157f4['radQK'](getProgressDisplay,_0x374f7f[_0x11f8a7(0x216)])),_0x374f7f[_0x11f8a7(0x25c)]&&console['log'](_0x11f8a7(0x2a6)+_0x374f7f['gitBranch']);}throw new Error('Please\x20specify\x20the\x20feature\x20review\x20ID:\x20ranger\x20resume\x20<id>');}const {selected:_0x3a1101}=await _0x5e4fc6['prompt']([{'type':_0x11f8a7(0x240),'name':'selected','message':_0x11f8a7(0x298),'choices':_0x24ddaf[_0x11f8a7(0x1e2)](_0x21269d=>({'name':_0x21269d[_0x11f8a7(0x1e4)]+'\x20('+_0x21269d['id']+')','value':_0x21269d['id']}))}]);_0x147946=_0x24ddaf[_0x11f8a7(0x25e)](_0x131216=>_0x131216['id']===_0x3a1101);}await setActiveFeatureId(_0x147946['id']);_0x914c0e&&_0x2157f4['bnyYc'](_0x914c0e,_0x147946[_0x11f8a7(0x25c)])&&(await updateFeature(_0x147946['id'],{'gitBranch':_0x914c0e}),console['log']('\x20\x20\x20Updated\x20branch\x20to:\x20'+_0x914c0e));console[_0x11f8a7(0x23e)](_0x11f8a7(0x280)+_0x147946['name']+'\x20('+_0x147946['id']+')'),await _0x2157f4['qqmgh'](tryStartCurrentSession,_0x147946['id']);const _0x2f1c99=await getFeature(_0x147946['id']),_0x13c2cc=process[_0x11f8a7(0x222)][_0x11f8a7(0x2a4)];_0x13c2cc&&registerSession(_0x13c2cc,_0x2f1c99['id']),displayFeature(_0x2f1c99,_0x2f1c99[_0x11f8a7(0x27e)]),await _0x2157f4['rvgqL'](printFeedbackNudge,_0x2f1c99['id']);}async function printFeedbackNudge(_0x587f60){const _0x507f7a=_0x114e9e,_0x35a8b7={'EcoCw':function(_0x31196e,_0x256f66,_0x5eaed7){return _0x31196e(_0x256f66,_0x5eaed7);},'ggrcP':function(_0x1c3055,_0xb9a9a2){return _0x1c3055>_0xb9a9a2;},'jORga':function(_0x3f73d7,_0x5cf8d0){return _0x3f73d7>_0x5cf8d0;}};try{const {items:_0x34275b}=await getActionItems(_0x587f60);let _0x55eb70=0x0,_0x273006=0x0;for(const _0x1553dc of _0x34275b){const _0x3cc1a2=await _0x35a8b7[_0x507f7a(0x213)](getItemFeedback,_0x587f60,_0x1553dc['id']);_0x35a8b7['ggrcP'](_0x3cc1a2[_0x507f7a(0x207)]['length'],0x0)&&(_0x55eb70+=_0x3cc1a2['unaddressedComments']['length'],_0x273006++);}_0x35a8b7['jORga'](_0x55eb70,0x0)&&(console[_0x507f7a(0x23e)](_0x507f7a(0x20b)+_0x55eb70+'\x20unaddressed\x20reviewer\x20comment(s)\x20across\x20'+_0x273006+_0x507f7a(0x2a2)),console['log']('\x20\x20\x20Run\x20`ranger\x20get-review`\x20to\x20see\x20what\x20needs\x20to\x20be\x20fixed.'));}catch{}}async function tryStartCurrentSession(_0x33e95c){const _0x287f0a=_0x114e9e,_0xdd96d0={'OQDNB':function(_0xfb337e,_0x6dea5a){return _0xfb337e(_0x6dea5a);}};try{const {sessions:_0x12997d}=await _0xdd96d0['OQDNB'](listFeatureSessions,_0x33e95c),_0x3186f5=_0x12997d['find'](_0x3a3e3e=>_0x3a3e3e[_0x287f0a(0x1f7)]===_0x287f0a(0x1f1));_0x3186f5&&(await startSession(_0x33e95c,_0x3186f5['id']),console['log']('\x20\x20\x20▶️\x20Started\x20session\x20'+_0x3186f5['iteration']));}catch{}}function _0x949b(_0x3da59f,_0x210c13){_0x3da59f=_0x3da59f-0x1de;const _0x3e5fb1=_0x3e5f();let _0x949bc7=_0x3e5fb1[_0x3da59f];return _0x949bc7;}export async function featureReport(_0x26b196,_0x385686){const _0xcf316a=_0x114e9e,_0x3b544f={'dVZBE':function(_0x5427ca){return _0x5427ca();},'jpAwb':function(_0x2d79b0,_0x1372d0,_0x131a6b,_0x59deaf){return _0x2d79b0(_0x1372d0,_0x131a6b,_0x59deaf);},'xANRq':function(_0x3d8a79,_0x5882cb){return _0x3d8a79(_0x5882cb);},'XMgYR':function(_0x14725f,_0xa91e23,_0x45ca98){return _0x14725f(_0xa91e23,_0x45ca98);},'myOMQ':_0xcf316a(0x2a3)},_0x51bc2b=_0x26b196||await _0x3b544f[_0xcf316a(0x1e0)](getActiveFeatureId);if(!_0x51bc2b)throw new Error(_0xcf316a(0x212));console['log']('\x0aGenerating\x20report...');const _0x2bf667=await getFeatureReportMarkdown(_0x51bc2b,{'style':_0x385686['style']}),_0x6a8d5f=_0x385686[_0xcf316a(0x2a8)]||_0x3b544f[_0xcf316a(0x290)](join,getRangerDir(),'reports',_0x51bc2b+'.md'),_0xaa1a2e=join(_0x6a8d5f,'..');!_0x3b544f['xANRq'](existsSync,_0xaa1a2e)&&await _0x3b544f['XMgYR'](mkdir,_0xaa1a2e,{'recursive':!![]}),await writeFile(_0x6a8d5f,_0x2bf667,_0x3b544f['myOMQ']),console[_0xcf316a(0x23e)](_0xcf316a(0x1f6)+_0x6a8d5f);}function getScenarioResult(_0x122db9){const _0x155acf=_0x114e9e,_0x4477d5={'hOytY':function(_0x398613,_0x88ffc6){return _0x398613===_0x88ffc6;},'NDpcD':_0x155acf(0x2ba),'NHHvo':'in_progress'};if(_0x4477d5['hOytY'](_0x122db9['status'],'closed'))return _0x122db9[_0x155acf(0x255)]??_0x4477d5[_0x155acf(0x208)];if(_0x4477d5[_0x155acf(0x242)](_0x122db9['status'],_0x155acf(0x233)))return _0x4477d5[_0x155acf(0x21f)];return _0x122db9['status'];}function getScenarioRationale(_0x1b7cad,_0x4088d7){const _0x18c65d=_0x114e9e;if(_0x4088d7)return _0x4088d7;if(_0x1b7cad[_0x18c65d(0x26c)])return _0x1b7cad[_0x18c65d(0x26c)];if(_0x1b7cad['incompleteReason'])return _0x1b7cad[_0x18c65d(0x2b1)];if(_0x1b7cad[_0x18c65d(0x20d)])return _0x1b7cad['canceledReason'];if(_0x1b7cad[_0x18c65d(0x2b5)])return _0x1b7cad[_0x18c65d(0x2b5)];return null;}export async function featureReportPrDescription(_0x497905,_0x4bb1c0){const _0x1a91d2=_0x114e9e,_0x3e70e6={'mPqOq':function(_0x869267){return _0x869267();},'hfLvi':_0x1a91d2(0x296),'koJxA':function(_0x4c77c2,_0x342a11){return _0x4c77c2<_0x342a11;},'PsWAa':function(_0x46d0a9,_0x2a9655){return _0x46d0a9===_0x2a9655;},'Lidwp':function(_0x31cde6,_0x398cae,_0x108d70,_0xd5eca9){return _0x31cde6(_0x398cae,_0x108d70,_0xd5eca9);},'hwqkf':function(_0x591365,_0x4be051,_0x5c99bd){return _0x591365(_0x4be051,_0x5c99bd);}},_0x1ce6b2=_0x497905||await _0x3e70e6[_0x1a91d2(0x29d)](getActiveFeatureId);if(!_0x1ce6b2)throw new Error('No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.');const _0x571d0c=await getFeature(_0x1ce6b2),_0x5401fe=_0x571d0c[_0x1a91d2(0x27e)]||[],_0x1217e0=getCurrentSessionItems(_0x571d0c,_0x5401fe);_0x1217e0['length']===0x0&&(console['error'](_0x3e70e6[_0x1a91d2(0x284)]),process[_0x1a91d2(0x25f)](0x1));const _0x588d0a=_0x4bb1c0['excludeScenarios']??[],_0x299553=_0x588d0a['filter'](_0x2661fe=>!Number[_0x1a91d2(0x261)](_0x2661fe)||_0x2661fe<0x1||_0x2661fe>_0x1217e0[_0x1a91d2(0x2ac)]);if(_0x299553['length']>0x0){console['error']('\x0a❌\x20Invalid\x20scenario\x20number(s):\x20'+_0x299553[_0x1a91d2(0x2c9)](',\x20')),console[_0x1a91d2(0x23e)](_0x1a91d2(0x236));for(let _0x321ba4=0x0;_0x3e70e6[_0x1a91d2(0x209)](_0x321ba4,_0x1217e0['length']);_0x321ba4++){console['log']('\x20\x20'+(_0x321ba4+0x1)+'.\x20'+_0x1217e0[_0x321ba4]['description']);}process[_0x1a91d2(0x25f)](0x1);}const _0x343362=new Set(_0x588d0a['map'](_0x40d6e8=>_0x40d6e8-0x1)),_0x13dde2=_0x1217e0['filter']((_0x194ada,_0x4c39fa)=>!_0x343362['has'](_0x4c39fa));_0x3e70e6['PsWAa'](_0x13dde2[_0x1a91d2(0x2ac)],0x0)&&(console[_0x1a91d2(0x20a)](_0x1a91d2(0x28f)),process['exit'](0x1));if(_0x4bb1c0[_0x1a91d2(0x202)])await _0x3e70e6['Lidwp'](outputJsonReport,_0x1ce6b2,_0x571d0c,_0x13dde2);else{const _0x28b515=await _0x3e70e6['hwqkf'](getFeatureReportMarkdown,_0x1ce6b2,{'itemIds':_0x13dde2['map'](_0x3110fc=>_0x3110fc['id'])});process['stdout'][_0x1a91d2(0x2ad)](_0x28b515['trimEnd']()+'\x0a');}}async function outputJsonReport(_0x475b60,_0x6495df,_0x48dbf4){const _0x554866=_0x114e9e,_0x315b99={'FUdhB':function(_0x3af426,_0x31515b){return _0x3af426===_0x31515b;},'dPFqH':function(_0x1b844c,_0x18c8f0){return _0x1b844c(_0x18c8f0);},'vYLXP':function(_0x22ca85,_0x1d2b7f){return _0x22ca85+_0x1d2b7f;}},_0x3c39e8=getApiBaseUrl(),_0x8839b1=await _0x315b99[_0x554866(0x22f)](getFeatureReport,_0x475b60),_0x25fc4a=new Map(_0x8839b1[_0x554866(0x27e)]['map'](_0x268c89=>[_0x268c89['id'],_0x268c89])),_0x1cd101=await Promise['all'](_0x48dbf4[_0x554866(0x1e2)](async _0x4e15bb=>{const _0x3824d5=_0x554866,_0x4cb5fd=_0x25fc4a[_0x3824d5(0x205)](_0x4e15bb['id']),_0x5ca194=_0x4cb5fd?.['linkedSession']??null;let _0x38050a=[];if(_0x4e15bb['browserSessionId'])try{const {steps:_0x19ba29}=await getBrowserSessionSteps(_0x4e15bb[_0x3824d5(0x26b)]);_0x19ba29['length']>0x0&&(_0x38050a=_0x19ba29['map'](_0x3df033=>{const _0x2b1e0f=_0x3824d5,_0x43a1f3=_0x3df033[_0x2b1e0f(0x285)][_0x2b1e0f(0x25e)](_0x869f16=>_0x869f16[_0x2b1e0f(0x1f8)]==='screenshot'&&_0x869f16[_0x2b1e0f(0x245)]===_0x2b1e0f(0x231))??_0x3df033['assets']['find'](_0x23c36e=>_0x23c36e['assetType']===_0x2b1e0f(0x2b0));let _0x1a9acc=null,_0x13c426=null;if(_0x43a1f3){const _0x41a18a=_0x43a1f3[_0x2b1e0f(0x23c)]['location']['split']('/')[_0x2b1e0f(0x26e)]();_0x1a9acc=_0x3c39e8+'/api/v1/mcp/browser-sessions/'+_0x4e15bb['browserSessionId']+'/artifacts/'+_0x41a18a,_0x41a18a&&(_0x13c426=_0x41a18a['replace'](/\.\w+$/,'')['replace'](/^(key_)?\d+_/,'')['replace'](/[-_]/g,'\x20'));}return{'description':_0x13c426||_0x3df033['description']||_0x3df033['stepName']||'Step\x20'+_0x3df033[_0x2b1e0f(0x1f0)],'screenshot':_0x1a9acc,'is_key_step':_0x3df033['isKeyStep']};}));}catch{}return _0x315b99[_0x3824d5(0x1fd)](_0x38050a['length'],0x0)&&_0x5ca194?.[_0x3824d5(0x1de)]&&(_0x38050a=_0x5ca194['screenshotUrls'][_0x3824d5(0x1e2)]((_0x185cde,_0x25e3b8)=>({'description':_0x3824d5(0x2a9)+(_0x25e3b8+0x1),'screenshot':_0x185cde,'is_key_step':![]}))),{'description':_0x4e15bb['description'],'result':getScenarioResult(_0x4e15bb),'rationale':getScenarioRationale(_0x4e15bb,_0x5ca194?.['agentResponse']),'steps':_0x38050a};})),_0x40ad14={'url':_0x6495df[_0x554866(0x2cb)],'scenarios':_0x1cd101};process[_0x554866(0x24d)]['write'](_0x315b99['vYLXP'](JSON[_0x554866(0x267)](_0x40ad14,null,0x2),'\x0a'));}export async function featureConcludeSession(_0x2cf0c7){const _0x19f39a=_0x114e9e,_0x19cc93={'HuLIZ':'No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','bYZoe':function(_0x174dd6,_0x59eee6){return _0x174dd6(_0x59eee6);},'vgwfM':_0x19f39a(0x279),'ZIwoF':function(_0x39bae3,_0xc3e87e){return _0x39bae3(_0xc3e87e);},'AJrjw':'completed','tilxE':_0x19f39a(0x2bb),'QmGHk':function(_0x1b2bae,_0x1f150f,_0xcbe88a){return _0x1b2bae(_0x1f150f,_0xcbe88a);}},_0x4270ba=_0x2cf0c7||await getActiveFeatureId();if(!_0x4270ba)throw new Error(_0x19cc93['HuLIZ']);const _0xd75ec1=await _0x19cc93[_0x19f39a(0x204)](getFeature,_0x4270ba);if(!_0xd75ec1[_0x19f39a(0x28a)])throw new Error(_0x19cc93[_0x19f39a(0x2c4)]);const {sessions:_0x10addc}=await _0x19cc93[_0x19f39a(0x251)](listFeatureSessions,_0x4270ba),_0x2cc60e=_0x10addc['find'](_0x150731=>_0x150731['id']===_0xd75ec1['currentSessionId']);if(!_0x2cc60e)throw new Error(_0x19f39a(0x246));if(_0x2cc60e[_0x19f39a(0x1f7)]===_0x19cc93[_0x19f39a(0x219)]){console['log'](_0x19cc93[_0x19f39a(0x25d)]);return;}if(_0x2cc60e['status']!==_0x19f39a(0x1fc))throw new Error(_0x19f39a(0x235)+_0x2cc60e[_0x19f39a(0x1f7)]);console['log']('\x0aConcluding\x20session...'),await _0x19cc93[_0x19f39a(0x215)](concludeSession,_0x4270ba,_0xd75ec1[_0x19f39a(0x28a)]),console['log'](_0x19f39a(0x22e)+_0x2cc60e['iteration']+_0x19f39a(0x21b)),console[_0x19f39a(0x23e)]('\x20\x20\x20The\x20feature\x20review\x20is\x20now\x20ready\x20for\x20human\x20review\x20on\x20the\x20Ranger\x20dashboard.');}export async function featureSessions(_0x1c09b7){const _0x1491e3=_0x114e9e,_0x56e65d={'oWsvN':'No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','HCDVf':function(_0x32ff4a,_0x1b3702){return _0x32ff4a(_0x1b3702);},'wooIN':function(_0x2a719b,_0x416004){return _0x2a719b(_0x416004);},'anTfh':function(_0x562131,_0x191f0a){return _0x562131===_0x191f0a;},'ztCAT':'completed'},_0x5f4424=_0x1c09b7||await getActiveFeatureId();if(!_0x5f4424)throw new Error(_0x56e65d['oWsvN']);const _0x12cbcf=await _0x56e65d[_0x1491e3(0x238)](getFeature,_0x5f4424);console[_0x1491e3(0x23e)](_0x1491e3(0x1df)+_0x12cbcf[_0x1491e3(0x1e4)]+'\x0a');const {sessions:_0x43d4d2}=await _0x56e65d['wooIN'](listFeatureSessions,_0x5f4424);if(_0x56e65d['anTfh'](_0x43d4d2[_0x1491e3(0x2ac)],0x0)){console[_0x1491e3(0x23e)]('No\x20sessions\x20found.');return;}for(const _0x18513e of _0x43d4d2){const _0x3ccf8f=_0x56e65d[_0x1491e3(0x206)](_0x18513e['status'],_0x56e65d[_0x1491e3(0x28b)])?'✅':_0x18513e[_0x1491e3(0x1f7)]==='in_progress'?'🔄':'▶️';console['log'](_0x3ccf8f+_0x1491e3(0x229)+_0x18513e[_0x1491e3(0x22a)]+'\x20('+_0x18513e['id']+')'),console['log'](_0x1491e3(0x2b8)+_0x18513e['status']),console['log'](_0x1491e3(0x26a)+new Date(_0x18513e[_0x1491e3(0x1fa)])[_0x1491e3(0x2aa)]()),_0x18513e['completedAt']&&console['log']('\x20\x20\x20Completed:\x20'+new Date(_0x18513e['completedAt'])['toLocaleString']()),console[_0x1491e3(0x23e)]('');}}export async function featureAddScenario(_0x1dc1e4,_0x5d6f67){const _0x300253=_0x114e9e,_0x30ee9d={'vNPYF':function(_0x4acb61,_0x550381,_0xdf6694){return _0x4acb61(_0x550381,_0xdf6694);}},_0x5b874e=_0x5d6f67||await getActiveFeatureId();if(!_0x5b874e)throw new Error('No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review');const _0x1fcf28=await getFeature(_0x5b874e);if(_0x1fcf28[_0x300253(0x2c5)]&&!_0x1fcf28[_0x300253(0x2c5)]['submittedAt'])throw new Error('Cannot\x20add\x20scenario:\x20feature\x20review\x20has\x20an\x20active\x20review.\x20Please\x20finish\x20your\x20review\x20first:\x20'+_0x1fcf28['dashboardUrl']);await _0x30ee9d[_0x300253(0x27b)](createChecklistItem,_0x5b874e,_0x1dc1e4);const _0x3a3877=await getFeature(_0x5b874e);console['log'](_0x300253(0x226)),_0x30ee9d[_0x300253(0x27b)](displayFeature,_0x3a3877,_0x3a3877[_0x300253(0x27e)]);}function _0x3e5f(){const _0x40b399=['ZIwoF','totalCount','description','scenarios','terminalReason','vSsPd','FZZxL','sessionId','\x0aNo\x20feature\x20reviews\x20found.','submittedAt','ndDKM','gitBranch','tilxE','find','exit','Unknown','isInteger','trim','includeDeleted','\x1b[1m','\x20\x20✅\x20No\x20feedback\x20to\x20address','wPUiK','stringify','toLocaleDateString','ZQRgC','\x20\x20\x20Created:\x20','browserSessionId','blockedReason','domRef','pop','GQeIz','18584aeAELX','ORXtK','items','\x20\x20\x20\x20\x20\x20Blocked:\x20','...','\x0a✅\x20Restored\x20feature\x20review:\x20','icgJQ','replace','1045505iOlHaf','No\x20active\x20session\x20for\x20this\x20feature\x20review.','lGtad','vNPYF','\x20\x20\x20\x20\x20🎯\x20Element:\x20<','textContent','checklistItems','23nfXOxT','\x0a✅\x20Resumed\x20feature\x20review:\x20','repeat','1896261ZWafkr','xdFyJ','hfLvi','assets','4DpqMMe','OzlGX','approved','\x20unaddressed\x20comment(s)','currentSessionId','ztCAT','No\x20scenarios\x20found.','from','ALCWA','\x0a❌\x20All\x20scenarios\x20were\x20excluded.','jpAwb','blockedItems','MRUNQ','Scenario\x20','nDLuM','\x0a➡️\x20\x20Set\x20as\x20active\x20feature\x20review','\x0a❌\x20No\x20scenarios\x20found\x20to\x20include.','\x0a📋\x20Feedback\x20for:\x20','Multiple\x20feature\x20reviews\x20found.\x20Select\x20one:','qpoHV','git\x20rev-parse\x20--abbrev-ref\x20HEAD','tCuMH','type','mPqOq','\x20at\x20[','pipe','WipJC','YkcoZ','\x20scenario(s).','utf-8','CLAUDE_SESSION_ID','verified','\x20\x20\x20\x20\x20Branch:\x20','Itapx','output','Screenshot\x20','toLocaleString','version','length','write','txlYJ','zsDYu','screenshot','incompleteReason','jcGAH','\x20--current-branch','uQydu','notes','BmQjC','isTTY','\x20\x20\x20Status:\x20','\x20\x20💬\x20','closed','\x0a✅\x20Session\x20is\x20already\x20completed.','eCjTJ','any','uvaiY','element','Next\x20page:\x20ranger\x20list\x20--offset\x20','ahnOT','\x20\x20\x20To\x20restore\x20it,\x20run:\x20ranger\x20restore\x20','HOYVz','vgwfM','latestReview','\x20—\x20','numeric','\x20\x20\x20Branch:\x20','join','MSnSc','dashboardUrl','screenshotUrls','\x0a📁\x20Sessions\x20for\x20feature\x20review:\x20','dVZBE','spatial','map','Run:\x20ranger\x20create\x20\x22<name>\x22\x20to\x20create\x20a\x20new\x20feature\x20review','name','\x20\x20\x20\x20\x20📍\x20Annotation:\x20point\x20at\x20(','wRDQc','\x20\x20\x20Updated\x20branch\x20to:\x20','\x0a\x20\x20\x20Scenarios:','\x20\x20\x20\x20\x20\x20Approved','toFixed','gMWux','1756482SsUAQg','split','Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','HjiVb','position','ready','completedAt','round','currentBranch','git\x20remote\x20get-url\x20origin','\x0a✅\x20Report\x20generated:\x20','status','assetType','\x20incomplete','createdAt','\x0aCreating\x20feature\x20review...','in_progress','FUdhB','HIKZF','AbYlm','\x20verified','canonicalFlow','json','2289wrHkDi','bYZoe','get','anTfh','unaddressedComments','NDpcD','koJxA','error','\x0a⚠️\x20\x20','bDfam','canceledReason','vJKbq','OglQg','\x0a❌\x20Cannot\x20edit\x20scenario:\x20feature\x20review\x20has\x20an\x20active\x20review.','.\x20Feature\x20review\x20has\x20','No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','EcoCw','YHaUR','QmGHk','stats','arrayBuffer','DHUYN','AJrjw','OdIFg','\x20concluded.','BokjM','pendingItems','\x0a❌\x20No\x20scenarios\x20found\x20to\x20edit.','NHHvo','yITGp','\x20—\x20no\x20comments','env','offset','\x20\x20\x20Progress:\x20','push','\x0a✅\x20Scenario\x20added','6643747vkkJHo','nUeXw','\x20Session\x20','iteration','\x20scenarios.','3|0|1|4|2|5','scenario','\x0a✅\x20Session\x20','dPFqH','udCTz','after','3173990IlPfkk','verification_in_progress','\x0a✅\x20Scenario\x20updated','Cannot\x20conclude\x20session\x20with\x20status:\x20','\x0aAvailable\x20scenarios:','\x20\x20\x20\x20','HCDVf','\x20in\x20progress','gitRepoUrl','stdin','storage','9CQrspz','log','en-US','list','\x0a✅\x20Feature\x20review\x20created:\x20','hOytY',':\x20\x22','qNXJY','timing','Current\x20session\x20not\x20found.','\x20\x20\x20Description:\x20','\x20(v','41906GKejPp','filter','ABetd','YTMPH','stdout','wylnX','\x20feature\x20review(s)\x20found','\x20--limit\x20'];_0x3e5f=function(){return _0x40b399;};return _0x3e5f();}export async function featureEditScenario(_0x5595d4,_0x3ca1c1){const _0x524053=_0x114e9e,_0x5a956a={'MMjnO':'\x0a❌\x20No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','UwtMk':_0x524053(0x210),'qNXJY':'Please\x20finish\x20your\x20review\x20first:','UkDUZ':function(_0x41c218,_0xa89d61){return _0x41c218===_0xa89d61;},'MRUNQ':function(_0x5abc3e,_0x925de9){return _0x5abc3e+_0x925de9;},'zsDYu':function(_0x1c6a2a,_0x1efcf4){return _0x1c6a2a<_0x1efcf4;},'sDMcK':_0x524053(0x236),'icgJQ':function(_0x2042df,_0x536bc8,_0x5ef4b7){return _0x2042df(_0x536bc8,_0x5ef4b7);}},_0x5b23c3=_0x3ca1c1['id']||await getActiveFeatureId();!_0x5b23c3&&(console['error'](_0x5a956a['MMjnO']),console['error'](_0x524053(0x1ee)),process[_0x524053(0x25f)](0x1));const _0x1c83d7=await getFeature(_0x5b23c3);_0x1c83d7['latestReview']&&!_0x1c83d7[_0x524053(0x2c5)][_0x524053(0x25a)]&&(console[_0x524053(0x20a)](_0x5a956a['UwtMk']),console['error'](_0x5a956a[_0x524053(0x244)]),console['error']('\x20\x20'+_0x1c83d7['dashboardUrl']),process[_0x524053(0x25f)](0x1));const _0x749bde=_0x1c83d7['checklistItems']||[];_0x5a956a['UkDUZ'](_0x749bde[_0x524053(0x2ac)],0x0)&&(console['error'](_0x524053(0x21e)),process['exit'](0x1));if(_0x3ca1c1[_0x524053(0x22d)]===undefined){console['error']('\x0a❌\x20No\x20scenario\x20number\x20provided.\x20Use\x20--scenario\x20<number>.'),console['log']('\x0aAvailable\x20scenarios:');for(let _0x2c753b=0x0;_0x2c753b<_0x749bde['length'];_0x2c753b++){console[_0x524053(0x23e)]('\x20\x20'+_0x5a956a[_0x524053(0x292)](_0x2c753b,0x1)+'.\x20'+_0x749bde[_0x2c753b]['description']);}process['exit'](0x1);}const _0x4b1a7b=_0x3ca1c1[_0x524053(0x22d)]-0x1;if(_0x5a956a[_0x524053(0x2af)](_0x4b1a7b,0x0)||_0x4b1a7b>=_0x749bde['length']){console[_0x524053(0x20a)]('\x0a❌\x20Invalid\x20scenario\x20index:\x20'+_0x3ca1c1['scenario']+_0x524053(0x211)+_0x749bde['length']+_0x524053(0x22b)),console[_0x524053(0x23e)](_0x5a956a['sDMcK']);for(let _0x19148f=0x0;_0x5a956a[_0x524053(0x2af)](_0x19148f,_0x749bde[_0x524053(0x2ac)]);_0x19148f++){console['log']('\x20\x20'+(_0x19148f+0x1)+'.\x20'+_0x749bde[_0x19148f][_0x524053(0x253)]);}process[_0x524053(0x25f)](0x1);}const _0x5d28f6=_0x749bde[_0x4b1a7b];await updateChecklistItem(_0x5b23c3,_0x5d28f6['id'],{'description':_0x5595d4});const _0x8aeeab=await getFeature(_0x5b23c3);console['log'](_0x524053(0x234)),_0x5a956a[_0x524053(0x276)](displayFeature,_0x8aeeab,_0x8aeeab[_0x524053(0x27e)]);}async function downloadFeedbackImage(_0x2eddf9,_0xfdd53b){const _0x30d9aa=_0x114e9e,_0x300067={'MSnSc':function(_0x43a297,_0x19017b,_0x505aaf){return _0x43a297(_0x19017b,_0x505aaf);},'GQeIz':function(_0xfc7eb4){return _0xfc7eb4();},'ZQRgC':function(_0x27c900,_0x125d5b,_0x189fd8){return _0x27c900(_0x125d5b,_0x189fd8);}};try{const _0x46d73a=_0x300067[_0x30d9aa(0x2ca)](join,_0x300067[_0x30d9aa(0x26f)](getRangerDir),'feedback-images');await _0x300067['MSnSc'](mkdir,_0x46d73a,{'recursive':!![]});const _0x8d2f59=_0x300067['MSnSc'](join,_0x46d73a,'comment_'+_0xfdd53b+'.png'),_0x17cd93=await fetch(_0x2eddf9);if(!_0x17cd93['ok'])return null;const _0x5394df=Buffer[_0x30d9aa(0x28d)](await _0x17cd93[_0x30d9aa(0x217)]());return await _0x300067[_0x30d9aa(0x269)](writeFile,_0x8d2f59,_0x5394df),_0x8d2f59;}catch{return null;}}export async function featureGetReview(_0x15601f){const _0x2fda8e=_0x114e9e,_0x2f3163={'qpoHV':'No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','nUeXw':function(_0x50d6e5,_0x19796a){return _0x50d6e5>_0x19796a;},'HjiVb':function(_0x5f06c2,_0x121041,_0x3d32e7){return _0x5f06c2(_0x121041,_0x3d32e7);},'SGiIW':function(_0x3e4948,_0x232e3e){return _0x3e4948>_0x232e3e;},'ORXtK':function(_0x19ed57,_0x295a0a){return _0x19ed57+_0x295a0a;},'FaQqv':_0x2fda8e(0x260),'QZBvJ':_0x2fda8e(0x2bf),'FZZxL':function(_0x584e10,_0x4d1854){return _0x584e10===_0x4d1854;},'YHaUR':'point'},_0x1fdde1=_0x15601f||await getActiveFeatureId();if(!_0x1fdde1)throw new Error(_0x2f3163[_0x2fda8e(0x299)]);const _0x3edbaa=await getFeature(_0x1fdde1),{items:_0x5604c2}=await getActionItems(_0x1fdde1);console['log'](_0x2fda8e(0x297)+_0x3edbaa['name']+'\x20('+_0x3edbaa['id']+')\x0a');if(_0x5604c2['length']===0x0){console['log'](_0x2fda8e(0x28c));return;}for(let _0x3d9297=0x0;_0x3d9297<_0x5604c2[_0x2fda8e(0x2ac)];_0x3d9297++){const _0x54c56a=_0x5604c2[_0x3d9297],_0x57b781=_0x2f3163[_0x2fda8e(0x228)](_0x54c56a[_0x2fda8e(0x2ab)],0x1)?_0x2fda8e(0x248)+_0x54c56a[_0x2fda8e(0x2ab)]+')':'',_0x6fa2a1=await _0x2f3163[_0x2fda8e(0x1ef)](getItemFeedback,_0x1fdde1,_0x54c56a['id']);if(_0x2f3163['SGiIW'](_0x6fa2a1[_0x2fda8e(0x207)][_0x2fda8e(0x2ac)],0x0)){console[_0x2fda8e(0x23e)](_0x2fda8e(0x293)+_0x2f3163['ORXtK'](_0x3d9297,0x1)+':\x20\x22'+_0x54c56a[_0x2fda8e(0x253)]+'\x22'+_0x57b781+_0x2fda8e(0x2c6)+_0x6fa2a1[_0x2fda8e(0x207)]['length']+_0x2fda8e(0x289));for(const _0x110f65 of _0x6fa2a1[_0x2fda8e(0x207)]){const _0x248879=new Date(_0x110f65['createdAt'])['toLocaleDateString'](_0x2fda8e(0x23f),{'month':'short','day':_0x2fda8e(0x2c7)}),_0x334976=_0x110f65['authorName']||_0x110f65['authorEmail']||_0x2f3163['FaQqv'];console['log'](_0x2fda8e(0x2b9)+_0x334976+'\x20('+_0x248879+'):\x20\x22'+_0x110f65['content']+'\x22');if(_0x110f65['assetUrl']){const _0x54e401=await downloadFeedbackImage(_0x110f65['assetUrl'],_0x110f65['id']);_0x54e401&&console['log']('\x20\x20\x20\x20\x20📷\x20Screenshot:\x20'+_0x54e401);}if(_0x110f65['domRef']){const _0x37ce37=_0x110f65[_0x2fda8e(0x26d)]['selector'][_0x2fda8e(0x1ed)]('\x20>\x20')[_0x2fda8e(0x26e)]()?.[_0x2fda8e(0x1ed)](':')[0x0]||_0x2f3163['QZBvJ'],_0x2ec66b=_0x110f65['domRef']['textContent']?'\x20\x22'+_0x110f65[_0x2fda8e(0x26d)][_0x2fda8e(0x27d)]['slice'](0x0,0x3c)+'\x22':'';console[_0x2fda8e(0x23e)](_0x2fda8e(0x27c)+_0x37ce37+'>'+_0x2ec66b),console['log']('\x20\x20\x20\x20\x20📋\x20Selector:\x20'+_0x110f65[_0x2fda8e(0x26d)]['selector']);}else{if(_0x110f65[_0x2fda8e(0x1e1)]){const _0x1aad48=_0x110f65['spatial']['coordinates'];_0x2f3163[_0x2fda8e(0x257)](_0x110f65['spatial'][_0x2fda8e(0x29c)],_0x2f3163[_0x2fda8e(0x214)])&&_0x1aad48[_0x2fda8e(0x2ac)]>=0x2?console['log'](_0x2fda8e(0x1e5)+_0x1aad48[0x0][_0x2fda8e(0x1ea)](0x2)+',\x20'+_0x1aad48[0x1][_0x2fda8e(0x1ea)](0x2)+')'):console[_0x2fda8e(0x23e)]('\x20\x20\x20\x20\x20📍\x20Annotation:\x20'+_0x110f65[_0x2fda8e(0x1e1)]['type']+_0x2fda8e(0x29e)+_0x1aad48['map'](_0xf8795e=>_0xf8795e['toFixed'](0x2))[_0x2fda8e(0x2c9)](',\x20')+']');}}}if(_0x6fa2a1[_0x2fda8e(0x201)]){console[_0x2fda8e(0x23e)]('\x20\x20Expected\x20flow:');for(const _0x37240c of _0x6fa2a1[_0x2fda8e(0x201)][_0x2fda8e(0x1ed)]('\x0a')){console['log'](_0x2fda8e(0x237)+_0x37240c);}}}else console['log']('Scenario\x20'+_0x2f3163[_0x2fda8e(0x271)](_0x3d9297,0x1)+_0x2fda8e(0x243)+_0x54c56a['description']+'\x22'+_0x57b781+_0x2fda8e(0x221)),console['log'](_0x2fda8e(0x265));console[_0x2fda8e(0x23e)]('');}}export async function featureDelete(_0xa3a36b){const _0x386881=_0x114e9e,_0x55c1bb={'tCuMH':function(_0x3b2b47){return _0x3b2b47();},'dRwJD':'No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','wPUiK':function(_0x2b59de,_0x12a094){return _0x2b59de(_0x12a094);},'eremE':function(_0x4c503c,_0x208f8c){return _0x4c503c(_0x208f8c);},'GfFXX':function(_0x2cf1e8,_0x407b4d){return _0x2cf1e8+_0x407b4d;},'CPubY':_0x386881(0x2c2)},_0x5c66a8=_0xa3a36b||await _0x55c1bb[_0x386881(0x29b)](getActiveFeatureId);if(!_0x5c66a8)throw new Error(_0x55c1bb['dRwJD']);const _0x2ceef7=await _0x55c1bb[_0x386881(0x266)](getFeature,_0x5c66a8);await _0x55c1bb['eremE'](softDeleteFeature,_0x5c66a8),console[_0x386881(0x23e)]('\x0a🗑️\x20\x20Deleted\x20feature\x20review:\x20'+_0x2ceef7['name']+'\x20('+_0x5c66a8+')'),console[_0x386881(0x23e)](_0x55c1bb['GfFXX'](_0x55c1bb['CPubY'],_0x5c66a8));}export async function featureRestore(_0x3a1402){const _0xc66e07=_0x114e9e,_0x1f2db7={'DYCpO':function(_0x4b7541,_0x243319){return _0x4b7541(_0x243319);}};await _0x1f2db7['DYCpO'](restoreFeature,_0x3a1402);const _0x53b943=await getFeature(_0x3a1402);console['log'](_0xc66e07(0x275)+_0x53b943[_0xc66e07(0x1e4)]+'\x20('+_0x3a1402+')'),displayFeature(_0x53b943,_0x53b943['checklistItems']);}
@@ -1 +1 @@
1
- (function(_0x14ad71,_0x3a1b17){const _0x2c15f9=_0x4bd6,_0x12d9b2=_0x14ad71();while(!![]){try{const _0x18fbfa=parseInt(_0x2c15f9(0x10f))/0x1*(parseInt(_0x2c15f9(0x112))/0x2)+parseInt(_0x2c15f9(0x10b))/0x3+parseInt(_0x2c15f9(0x11e))/0x4*(-parseInt(_0x2c15f9(0x117))/0x5)+-parseInt(_0x2c15f9(0x115))/0x6+-parseInt(_0x2c15f9(0x119))/0x7*(parseInt(_0x2c15f9(0x111))/0x8)+parseInt(_0x2c15f9(0x110))/0x9+-parseInt(_0x2c15f9(0x10a))/0xa*(-parseInt(_0x2c15f9(0x10c))/0xb);if(_0x18fbfa===_0x3a1b17)break;else _0x12d9b2['push'](_0x12d9b2['shift']());}catch(_0x1bcca8){_0x12d9b2['push'](_0x12d9b2['shift']());}}}(_0x35a4,0xe42b1));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 _0x4bd6(_0xcf114e,_0x2caf7e){_0xcf114e=_0xcf114e-0x10a;const _0x35a419=_0x35a4();let _0x4bd6aa=_0x35a419[_0xcf114e];return _0x4bd6aa;}function _0x35a4(){const _0x93f53a=['3238NyFrYX','5168592qJGzCJ','88qeclAy','964GvKGYz','exit','oJbZg','9753114RNgkpf','Unknown\x20hook:\x20','174855qYKrFG','Valid\x20hooks:\x20','1037757uLvGnD','SIGHUP','wBQhF','wqdtF','error','44mGeqUo','20ExlZxJ','103200RbVfOz','13233737rPccOa','once','SIGTERM'];_0x35a4=function(){return _0x93f53a;};return _0x35a4();}let cancellationHandlersInstalled=![];function installCancellationHandlers(){const _0x2f1b55=_0x4bd6,_0x146d62={'wqdtF':'SIGINT','wBQhF':_0x2f1b55(0x10e)};if(cancellationHandlersInstalled)return;const _0x15496e=()=>{const _0x8c9875=_0x2f1b55;process[_0x8c9875(0x113)](0x0);};process['once'](_0x146d62[_0x2f1b55(0x11c)],_0x15496e),process[_0x2f1b55(0x10d)](_0x146d62[_0x2f1b55(0x11b)],_0x15496e),process[_0x2f1b55(0x10d)](_0x2f1b55(0x11a),_0x15496e),cancellationHandlersInstalled=!![];}export async function hook(_0x13630e,_0x54552d){const _0x4848df=_0x4bd6,_0x785774={'oJbZg':function(_0x58bc85,_0x4b1b99){return _0x58bc85(_0x4b1b99);}};installCancellationHandlers();const _0x441510=HOOKS[_0x13630e];if(!_0x441510){const _0x62a41a=Object['keys'](HOOKS)['join'](',\x20');console[_0x4848df(0x11d)](_0x4848df(0x116)+_0x13630e),console[_0x4848df(0x11d)](_0x4848df(0x118)+_0x62a41a),process[_0x4848df(0x113)](0x1);}await _0x785774[_0x4848df(0x114)](_0x441510,_0x54552d);}
1
+ (function(_0x48d4a5,_0x288efa){const _0x55ef18=_0x2695,_0x137a68=_0x48d4a5();while(!![]){try{const _0x46cf33=parseInt(_0x55ef18(0x1c3))/0x1+-parseInt(_0x55ef18(0x1c8))/0x2+-parseInt(_0x55ef18(0x1c9))/0x3+-parseInt(_0x55ef18(0x1cb))/0x4+-parseInt(_0x55ef18(0x1d1))/0x5+parseInt(_0x55ef18(0x1cd))/0x6+-parseInt(_0x55ef18(0x1c5))/0x7*(-parseInt(_0x55ef18(0x1cc))/0x8);if(_0x46cf33===_0x288efa)break;else _0x137a68['push'](_0x137a68['shift']());}catch(_0x23350b){_0x137a68['push'](_0x137a68['shift']());}}}(_0x4c58,0x28039));import{sessionStart,sessionEnd,preCompact,postEdit,planStart,planReminder,exitPlanMode,stopHook,enable,disable,autoPrompt}from'./hooks/index.js';const HOOKS={'session-start':sessionStart,'session-end':sessionEnd,'pre-compact':preCompact,'post-edit':postEdit,'plan-start':planStart,'plan-reminder':planReminder,'exit-plan-mode':exitPlanMode,'stop':stopHook,'enable':enable,'disable':disable,'auto-prompt':autoPrompt};let cancellationHandlersInstalled=![];function installCancellationHandlers(){const _0x27a8a3=_0x2695,_0x2d724f={'HjjNm':_0x27a8a3(0x1c4),'iwDEw':_0x27a8a3(0x1d0),'xkFKE':'SIGHUP'};if(cancellationHandlersInstalled)return;const _0x216a21=()=>{process['exit'](0x0);};process['once'](_0x2d724f['HjjNm'],_0x216a21),process['once'](_0x2d724f['iwDEw'],_0x216a21),process['once'](_0x2d724f[_0x27a8a3(0x1ce)],_0x216a21),cancellationHandlersInstalled=!![];}function _0x2695(_0x42db2b,_0x1c196c){_0x42db2b=_0x42db2b-0x1c3;const _0x4c581c=_0x4c58();let _0x269506=_0x4c581c[_0x42db2b];return _0x269506;}export async function hook(_0x3a66b3,_0x42a159){const _0x340da8=_0x2695,_0x16aece={'fFLbf':function(_0x53e88e,_0x2da120){return _0x53e88e(_0x2da120);}};installCancellationHandlers();const _0x5ad5c0=HOOKS[_0x3a66b3];if(!_0x5ad5c0){const _0x51ad7c=Object[_0x340da8(0x1c6)](HOOKS)['join'](',\x20');console[_0x340da8(0x1cf)]('Unknown\x20hook:\x20'+_0x3a66b3),console[_0x340da8(0x1cf)](_0x340da8(0x1ca)+_0x51ad7c),process[_0x340da8(0x1c7)](0x1);}await _0x16aece['fFLbf'](_0x5ad5c0,_0x42a159);}function _0x4c58(){const _0x167397=['40587MtIyvc','Valid\x20hooks:\x20','824196TAFgxO','4422984AJRksH','1168764nwYtyi','xkFKE','error','SIGTERM','843510CgGAii','8803QibZKB','SIGINT','7nfgyuJ','keys','exit','408586RgCRer'];_0x4c58=function(){return _0x167397;};return _0x4c58();}