@ranger-testing/ranger-cli 2.1.8 → 2.2.1

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 (67) 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/setup/claude.js +1 -1
  25. package/build/commands/setup/opencode.js +1 -1
  26. package/build/commands/setupCi.js +1 -1
  27. package/build/commands/skillup.js +1 -1
  28. package/build/commands/start.js +1 -1
  29. package/build/commands/status.js +1 -1
  30. package/build/commands/update.js +1 -1
  31. package/build/commands/updateEnv.js +1 -1
  32. package/build/commands/useEnv.js +1 -1
  33. package/build/commands/utils/activeProfile.js +1 -1
  34. package/build/commands/utils/browserSessionsApi.js +1 -1
  35. package/build/commands/utils/claudeConfig.js +1 -1
  36. package/build/commands/utils/claudePlugin.js +1 -1
  37. package/build/commands/utils/crypto.js +1 -1
  38. package/build/commands/utils/desirePathLog.js +1 -1
  39. package/build/commands/utils/deviceAuth.js +1 -1
  40. package/build/commands/utils/environment.js +1 -1
  41. package/build/commands/utils/featureApi.js +1 -1
  42. package/build/commands/utils/featureReportGenerator.js +1 -1
  43. package/build/commands/utils/fixWebmDuration.js +1 -1
  44. package/build/commands/utils/git.js +1 -1
  45. package/build/commands/utils/keychain.js +1 -1
  46. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  47. package/build/commands/utils/mcpImageBase64.js +1 -1
  48. package/build/commands/utils/model.js +1 -1
  49. package/build/commands/utils/opencodeConfig.js +1 -1
  50. package/build/commands/utils/profileMessages.js +1 -1
  51. package/build/commands/utils/profileSetupBanner.js +1 -1
  52. package/build/commands/utils/rangerConfig.js +1 -1
  53. package/build/commands/utils/rangerRoot.js +1 -1
  54. package/build/commands/utils/reportGenerator.js +1 -1
  55. package/build/commands/utils/retry.js +1 -1
  56. package/build/commands/utils/sessionCache.js +1 -1
  57. package/build/commands/utils/settings.js +1 -1
  58. package/build/commands/utils/skillContent.js +1 -1
  59. package/build/commands/utils/skills.js +1 -1
  60. package/build/commands/utils/stitchWebmFiles.js +1 -0
  61. package/build/commands/utils/telemetry.js +1 -1
  62. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  63. package/build/commands/utils/userApi.js +1 -1
  64. package/build/commands/utils/version.js +1 -1
  65. package/build/commands/verifyFeature.js +1 -1
  66. package/build/commands/verifyInBrowser.js +1 -1
  67. package/package.json +1 -1
@@ -1 +1 @@
1
- function _0x4c53(_0x142057,_0x56fd82){_0x142057=_0x142057-0x8b;const _0x2475bd=_0x2475();let _0x4c5365=_0x2475bd[_0x142057];return _0x4c5365;}(function(_0x3a1f91,_0x3a7197){const _0x1e5a94=_0x4c53,_0x15ee11=_0x3a1f91();while(!![]){try{const _0x306969=parseInt(_0x1e5a94(0xbd))/0x1+-parseInt(_0x1e5a94(0xaf))/0x2+parseInt(_0x1e5a94(0xb9))/0x3*(-parseInt(_0x1e5a94(0xb0))/0x4)+parseInt(_0x1e5a94(0x98))/0x5+parseInt(_0x1e5a94(0xb2))/0x6*(-parseInt(_0x1e5a94(0x95))/0x7)+parseInt(_0x1e5a94(0xa3))/0x8+-parseInt(_0x1e5a94(0xbc))/0x9;if(_0x306969===_0x3a7197)break;else _0x15ee11['push'](_0x15ee11['shift']());}catch(_0x524e7f){_0x15ee11['push'](_0x15ee11['shift']());}}}(_0x2475,0x67221));import{writeFile,readFile,unlink}from'fs/promises';import{join}from'path';function _0x2475(){const _0xaa1dd=['close','ytPOA','isTTY','utf-8','YRMBB','Non-interactive\x20mode\x20detected.\x0aThe\x20\x22ranger\x20profile\x20update\x22\x20command\x20requires\x20interactive\x20browser\x20authentication\x20and\x20cannot\x20be\x20run\x20in\x20non-TTY\x20environments\x20(CI,\x20scripts,\x20Claude\x20Code).\x0aTo\x20update\x20profile\x20authentication:\x0a\x20\x201.\x20Run\x20\x22ranger\x20profile\x20update\x20<name>\x22\x20in\x20an\x20interactive\x20terminal\x0a\x20\x202.\x20Commit\x20the\x20updated\x20encrypted\x20auth\x20file\x20to\x20git','stdout','pgUEK','7kzzsis','catch','Profile\x20\x22','2495570zjvfKu','about:blank','storageState','\x20\x20\x20Update\x20your\x20authentication\x20as\x20needed.','\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20','Saving\x20authentication\x20state...','settings.json','✓\x20Encrypted\x20auth\x20saved\x20to:\x20','UuOdd','goto','log','5862752sbfveg','OsnSZ','✓\x20Auth\x20state\x20saved\x20to:\x20','\x0a📋\x20Authentication\x20Update','browser','stdin','iSXWZ','MWjGR','QzVxq','.enc','browser_auth','\x0a✅\x20Profile\x20\x22','939502yazpvl','152gUAsmP','config_write','3086046AVxrpg','WyZlw','\x20\x20\x20A\x20browser\x20will\x20open\x20with\x20your\x20existing\x20session\x20(if\x20any).','QMZHQ','error','✓\x20Updated\x20config:\x20','launch','15987lfWVhT','contextOptions','string','286776IJxaVz','408933iSAKDz','wCDeZ','OtTox','stringify'];_0x2475=function(){return _0xaa1dd;};return _0x2475();}import{existsSync}from'fs';import{chromium}from'playwright';import{encrypt}from'./utils/crypto.js';import{getToken}from'./utils/keychain.js';import{buildBrowserOptionsFromSettings,getEnvDir,isEnvCi,resolveEnvVars}from'./utils/settings.js';import{addProfileSetupBanner}from'./utils/profileSetupBanner.js';export async function updateEnv(_0x37a155,_0x43a854){const _0x3b81c7=_0x4c53,_0x2c2baa={'YRMBB':_0x3b81c7(0x9d),'OsnSZ':function(_0x41b8a6){return _0x41b8a6();},'jTTjs':_0x3b81c7(0x8d),'ytPOA':function(_0x3381d1,_0x513120){return _0x3381d1(_0x513120);},'fqBiV':function(_0x1d3960,_0x30a447,_0x1ed2e3){return _0x1d3960(_0x30a447,_0x1ed2e3);},'LwHKO':_0x3b81c7(0x9e),'iSXWZ':'auth.json','WyZlw':function(_0x419250,_0x39e87c){return _0x419250+_0x39e87c;},'QMZHQ':function(_0x8d127,_0x23c110){return _0x8d127(_0x23c110);},'wCDeZ':_0x3b81c7(0x90),'UuOdd':function(_0x3208af,_0x289b5d){return _0x3208af===_0x289b5d;},'VXBmH':_0x3b81c7(0xbb),'FXiOq':function(_0x3bce18,_0x362157){return _0x3bce18(_0x362157);},'OtTox':_0x3b81c7(0xa6),'MWjGR':_0x3b81c7(0xb4),'mCRAN':_0x3b81c7(0x9b),'kTHRA':'\x20\x20\x20When\x20you\x20are\x20done,\x20close\x20the\x20browser.\x0a','YGfoj':function(_0x4aa7ab,_0x463614){return _0x4aa7ab||_0x463614;},'pgUEK':function(_0x6a88e,_0x1c31de,_0x5687d2){return _0x6a88e(_0x1c31de,_0x5687d2);},'QzVxq':_0x3b81c7(0xb1)},_0x5daeb2=_0x2c2baa[_0x3b81c7(0x8e)](getEnvDir,_0x37a155),_0xb06e0d=_0x2c2baa['fqBiV'](join,_0x5daeb2,_0x2c2baa['LwHKO']),_0x48509f=join(_0x5daeb2,_0x2c2baa[_0x3b81c7(0xa9)]),_0x2b2bfe=_0x2c2baa[_0x3b81c7(0xb3)](_0x48509f,_0x3b81c7(0xac)),_0x4e68b0=process[_0x3b81c7(0xa8)][_0x3b81c7(0x8f)]&&process[_0x3b81c7(0x93)]['isTTY'];if(!_0x4e68b0)throw new Error(_0x3b81c7(0x92));if(!existsSync(_0x5daeb2))throw new Error(_0x3b81c7(0x97)+_0x37a155+_0x3b81c7(0x9c)+_0x37a155);if(!_0x2c2baa[_0x3b81c7(0xb5)](existsSync,_0xb06e0d))throw new Error('Config\x20not\x20found\x20at\x20'+_0xb06e0d+'.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x37a155);const _0x2db447=await readFile(_0xb06e0d,_0x2c2baa[_0x3b81c7(0xbe)]),_0x2e4879=JSON['parse'](_0x2db447),_0x3b8513=_0x2c2baa[_0x3b81c7(0x8e)](resolveEnvVars,_0x2e4879),_0x509c45=_0x2c2baa[_0x3b81c7(0xa0)](typeof _0x3b8513['baseUrl'],_0x2c2baa['VXBmH'])?_0x3b8513['baseUrl']:undefined,_0x6895c4=_0x2c2baa['FXiOq'](existsSync,_0x48509f),_0x50f7f9=isEnvCi(_0x37a155);_0x43a854?.['trackPhaseStart'](_0x3b81c7(0xad)),console['log'](_0x2c2baa[_0x3b81c7(0x8b)]),console[_0x3b81c7(0xa2)](_0x2c2baa[_0x3b81c7(0xaa)]),console['log'](_0x2c2baa['mCRAN']),console['log'](_0x2c2baa['kTHRA']);const {launchOptions:_0x5c44dc,contextOptions:_0x32f9dd}=buildBrowserOptionsFromSettings(_0x3b8513,{'headless':![],'storageStatePath':_0x6895c4?_0x48509f:undefined}),_0x53bdc3=await chromium[_0x3b81c7(0xb8)](_0x5c44dc);let _0x2345f6=null;try{_0x2345f6=await _0x53bdc3['newContext'](_0x32f9dd),await addProfileSetupBanner(_0x2345f6);const _0x4a6d65=await _0x2345f6['newPage']();await _0x4a6d65[_0x3b81c7(0xa1)](_0x2c2baa['YGfoj'](_0x509c45,_0x3b81c7(0x99))),await new Promise(_0x371217=>{_0x4a6d65['on'](_0x2c2baa['jTTjs'],async()=>{const _0xe975b5=_0x4c53;try{console[_0xe975b5(0xa2)](_0x2c2baa[_0xe975b5(0x91)]),await _0x2345f6?.[_0xe975b5(0x9a)]({'path':_0x48509f}),_0x371217();}catch{_0x2c2baa['OsnSZ'](_0x371217);}});});}finally{_0x2345f6&&await _0x2345f6[_0x3b81c7(0x8d)]()[_0x3b81c7(0x96)](()=>{}),await _0x53bdc3['close']()['catch'](()=>{});}if(_0x50f7f9){const _0x282c6a=await readFile(_0x48509f,_0x2c2baa['wCDeZ']),_0x56c73f=await _0x2c2baa[_0x3b81c7(0xa4)](getToken);if(!_0x56c73f)console[_0x3b81c7(0xb6)]('\x20\x20Could\x20not\x20encrypt:\x20No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]'),console[_0x3b81c7(0xa2)](_0x3b81c7(0xa5)+_0x48509f);else{const _0x234a7d=_0x2c2baa[_0x3b81c7(0x94)](encrypt,_0x282c6a,_0x56c73f);await writeFile(_0x2b2bfe,_0x234a7d),await unlink(_0x48509f),console['log'](_0x3b81c7(0x9f)+_0x2b2bfe),console['log']('\x20\x20You\x20can\x20safely\x20commit\x20this\x20file\x20to\x20git.'),console['log']('\x20\x20Run\x20ranger\x20setup\x20in\x20CI\x20to\x20decrypt\x20at\x20runtime.');}}else console['log'](_0x3b81c7(0xa5)+_0x48509f);_0x43a854?.['trackPhaseEnd'](_0x3b81c7(0xad)),_0x43a854?.['trackPhaseStart'](_0x2c2baa['QzVxq']),_0x2e4879['browser']=_0x2e4879[_0x3b81c7(0xa7)]||{},_0x2e4879[_0x3b81c7(0xa7)][_0x3b81c7(0xba)]=_0x2e4879['browser'][_0x3b81c7(0xba)]||{},_0x2e4879[_0x3b81c7(0xa7)][_0x3b81c7(0xba)]['storageState']=_0x48509f,await writeFile(_0xb06e0d,JSON[_0x3b81c7(0x8c)](_0x2e4879,null,0x2)),console['log'](_0x3b81c7(0xb7)+_0xb06e0d),_0x43a854?.['trackPhaseEnd'](_0x2c2baa[_0x3b81c7(0xab)]),console[_0x3b81c7(0xa2)](_0x3b81c7(0xae)+_0x37a155+'\x22\x20authentication\x20updated');}
1
+ (function(_0x1822ea,_0x458643){const _0x5c6b14=_0x260f,_0x135097=_0x1822ea();while(!![]){try{const _0x1e4680=-parseInt(_0x5c6b14(0x103))/0x1*(parseInt(_0x5c6b14(0x122))/0x2)+parseInt(_0x5c6b14(0x117))/0x3+-parseInt(_0x5c6b14(0x10e))/0x4*(-parseInt(_0x5c6b14(0x109))/0x5)+parseInt(_0x5c6b14(0x110))/0x6+parseInt(_0x5c6b14(0x10a))/0x7*(parseInt(_0x5c6b14(0xfb))/0x8)+-parseInt(_0x5c6b14(0x10b))/0x9*(-parseInt(_0x5c6b14(0x114))/0xa)+parseInt(_0x5c6b14(0xfd))/0xb*(-parseInt(_0x5c6b14(0x112))/0xc);if(_0x1e4680===_0x458643)break;else _0x135097['push'](_0x135097['shift']());}catch(_0x249173){_0x135097['push'](_0x135097['shift']());}}}(_0x4604,0xe84d8));import{writeFile,readFile,unlink}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{chromium}from'playwright';function _0x260f(_0xdc119d,_0x23d86d){_0xdc119d=_0xdc119d-0xf9;const _0x46047d=_0x4604();let _0x260f4b=_0x46047d[_0xdc119d];return _0x260f4b;}import{encrypt}from'./utils/crypto.js';import{getToken}from'./utils/keychain.js';import{buildBrowserOptionsFromSettings,getEnvDir,isEnvCi,resolveEnvVars}from'./utils/settings.js';import{addProfileSetupBanner}from'./utils/profileSetupBanner.js';export async function updateEnv(_0x48ef5f,_0x26c77a){const _0xafbffc=_0x260f,_0x35af39={'PuyLI':function(_0x183d45){return _0x183d45();},'edWyX':function(_0x5301ef,_0x4f15d3){return _0x5301ef+_0x4f15d3;},'BmvMi':_0xafbffc(0x128),'HUCYs':_0xafbffc(0x11e),'RRJTR':function(_0x329015,_0x50b38d){return _0x329015(_0x50b38d);},'MYFMv':'utf-8','DbPbS':function(_0x4fdb46,_0x3c40e2){return _0x4fdb46===_0x3c40e2;},'yaMTr':function(_0x468daa,_0x133774,_0x26c3a8){return _0x468daa(_0x133774,_0x26c3a8);},'PumXH':_0xafbffc(0x10f),'pPrSe':function(_0x2ef7a4,_0x41d8f6,_0x4a0fda){return _0x2ef7a4(_0x41d8f6,_0x4a0fda);},'Zexge':_0xafbffc(0x10d)},_0x341c7e=getEnvDir(_0x48ef5f),_0x40c569=join(_0x341c7e,_0xafbffc(0x108)),_0xb8b805=join(_0x341c7e,_0xafbffc(0x121)),_0x3e6ab3=_0x35af39['edWyX'](_0xb8b805,_0x35af39[_0xafbffc(0x116)]),_0x48bf1a=process[_0xafbffc(0x102)][_0xafbffc(0x115)]&&process['stdout'][_0xafbffc(0x115)];if(!_0x48bf1a)throw new Error(_0x35af39['HUCYs']);if(!_0x35af39[_0xafbffc(0x120)](existsSync,_0x341c7e))throw new Error('Profile\x20\x22'+_0x48ef5f+_0xafbffc(0x123)+_0x48ef5f);if(!_0x35af39[_0xafbffc(0x120)](existsSync,_0x40c569))throw new Error(_0xafbffc(0x118)+_0x40c569+_0xafbffc(0x11f)+_0x48ef5f);const _0x2b9515=await readFile(_0x40c569,_0x35af39['MYFMv']),_0x33bc59=JSON['parse'](_0x2b9515),_0x350b23=resolveEnvVars(_0x33bc59),_0x4b7e42=_0x35af39[_0xafbffc(0xfe)](typeof _0x350b23[_0xafbffc(0x107)],'string')?_0x350b23[_0xafbffc(0x107)]:undefined,_0x22bbce=_0x35af39[_0xafbffc(0x120)](existsSync,_0xb8b805),_0x1fd735=isEnvCi(_0x48ef5f);_0x26c77a?.['trackPhaseStart']('browser_auth'),console['log'](_0xafbffc(0x126)),console[_0xafbffc(0x11a)](_0xafbffc(0x100)),console['log'](_0xafbffc(0x11d)),console['log'](_0xafbffc(0x105));const {launchOptions:_0x20ced8,contextOptions:_0x27ace9}=_0x35af39['yaMTr'](buildBrowserOptionsFromSettings,_0x350b23,{'headless':![],'storageStatePath':_0x22bbce?_0xb8b805:undefined}),_0x5a3513=await chromium['launch'](_0x20ced8);let _0x5963f7=null;try{_0x5963f7=await _0x5a3513[_0xafbffc(0x119)](_0x27ace9),await addProfileSetupBanner(_0x5963f7);const _0x16c2dc=await _0x5963f7[_0xafbffc(0x113)]();await _0x16c2dc[_0xafbffc(0xfc)](_0x4b7e42||'about:blank'),await new Promise(_0x56580a=>{const _0x4e12ae=_0xafbffc;_0x16c2dc['on'](_0x4e12ae(0x10c),async()=>{const _0x5d2676=_0x4e12ae;try{console[_0x5d2676(0x11a)](_0x5d2676(0x11b)),await _0x5963f7?.['storageState']({'path':_0xb8b805}),_0x56580a();}catch{_0x35af39['PuyLI'](_0x56580a);}});});}finally{_0x5963f7&&await _0x5963f7['close']()['catch'](()=>{}),await _0x5a3513[_0xafbffc(0x10c)]()['catch'](()=>{});}if(_0x1fd735){const _0x45894d=await readFile(_0xb8b805,_0xafbffc(0x127)),_0xa24d5a=await getToken();if(!_0xa24d5a)console[_0xafbffc(0x124)](_0x35af39[_0xafbffc(0x101)]),console['log']('✓\x20Auth\x20state\x20saved\x20to:\x20'+_0xb8b805);else{const _0x305673=encrypt(_0x45894d,_0xa24d5a);await _0x35af39['pPrSe'](writeFile,_0x3e6ab3,_0x305673),await unlink(_0xb8b805),console[_0xafbffc(0x11a)](_0xafbffc(0x11c)+_0x3e6ab3),console[_0xafbffc(0x11a)](_0xafbffc(0x104)),console['log']('\x20\x20Run\x20ranger\x20setup\x20in\x20CI\x20to\x20decrypt\x20at\x20runtime.');}}else console[_0xafbffc(0x11a)]('✓\x20Auth\x20state\x20saved\x20to:\x20'+_0xb8b805);_0x26c77a?.['trackPhaseEnd']('browser_auth'),_0x26c77a?.['trackPhaseStart'](_0x35af39['Zexge']),_0x33bc59['browser']=_0x33bc59['browser']||{},_0x33bc59[_0xafbffc(0x125)]['contextOptions']=_0x33bc59[_0xafbffc(0x125)][_0xafbffc(0x106)]||{},_0x33bc59[_0xafbffc(0x125)]['contextOptions']['storageState']=_0xb8b805,await writeFile(_0x40c569,JSON[_0xafbffc(0xfa)](_0x33bc59,null,0x2)),console['log'](_0xafbffc(0xf9)+_0x40c569),_0x26c77a?.[_0xafbffc(0xff)]('config_write'),console['log']('\x0a✅\x20Profile\x20\x22'+_0x48ef5f+_0xafbffc(0x111));}function _0x4604(){const _0x1d416c=['\x20\x20\x20Update\x20your\x20authentication\x20as\x20needed.','Non-interactive\x20mode\x20detected.\x0aThe\x20\x22ranger\x20profile\x20update\x22\x20command\x20requires\x20interactive\x20browser\x20authentication\x20and\x20cannot\x20be\x20run\x20in\x20non-TTY\x20environments\x20(CI,\x20scripts,\x20Claude\x20Code).\x0aTo\x20update\x20profile\x20authentication:\x0a\x20\x201.\x20Run\x20\x22ranger\x20profile\x20update\x20<name>\x22\x20in\x20an\x20interactive\x20terminal\x0a\x20\x202.\x20Commit\x20the\x20updated\x20encrypted\x20auth\x20file\x20to\x20git','.\x20Run\x20first:\x20ranger\x20profile\x20add\x20','RRJTR','auth.json','400366CGhBKy','\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20','error','browser','\x0a📋\x20Authentication\x20Update','utf-8','.enc','✓\x20Updated\x20config:\x20','stringify','1577064KjepnQ','goto','1034NPXgvq','DbPbS','trackPhaseEnd','\x20\x20\x20A\x20browser\x20will\x20open\x20with\x20your\x20existing\x20session\x20(if\x20any).','PumXH','stdin','2qMpYwv','\x20\x20You\x20can\x20safely\x20commit\x20this\x20file\x20to\x20git.','\x20\x20\x20When\x20you\x20are\x20done,\x20close\x20the\x20browser.\x0a','contextOptions','baseUrl','settings.json','48715ctdkaU','63pNLqaG','9oQJTcp','close','config_write','644rcDwmg','\x20\x20Could\x20not\x20encrypt:\x20No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','5621508sMrqEb','\x22\x20authentication\x20updated','731532VRgTHF','newPage','14071530JqkBOU','isTTY','BmvMi','4185963xFnupd','Config\x20not\x20found\x20at\x20','newContext','log','Saving\x20authentication\x20state...','✓\x20Encrypted\x20auth\x20saved\x20to:\x20'];_0x4604=function(){return _0x1d416c;};return _0x4604();}
@@ -1 +1 @@
1
- (function(_0x54f586,_0x454c85){const _0x1c4d90=_0x56a5,_0x7f08b3=_0x54f586();while(!![]){try{const _0x1c0fef=-parseInt(_0x1c4d90(0x117))/0x1+parseInt(_0x1c4d90(0x112))/0x2+parseInt(_0x1c4d90(0x10d))/0x3*(parseInt(_0x1c4d90(0x10f))/0x4)+-parseInt(_0x1c4d90(0x111))/0x5+parseInt(_0x1c4d90(0x115))/0x6+parseInt(_0x1c4d90(0x10c))/0x7*(-parseInt(_0x1c4d90(0x10e))/0x8)+-parseInt(_0x1c4d90(0x113))/0x9*(-parseInt(_0x1c4d90(0x119))/0xa);if(_0x1c0fef===_0x454c85)break;else _0x7f08b3['push'](_0x7f08b3['shift']());}catch(_0x5e1dd2){_0x7f08b3['push'](_0x7f08b3['shift']());}}}(_0x1170,0x769d5));function _0x56a5(_0x1361fa,_0x367242){_0x1361fa=_0x1361fa-0x10b;const _0x117025=_0x1170();let _0x56a546=_0x117025[_0x1361fa];return _0x56a546;}import{join}from'path';function _0x1170(){const _0x1c3192=['17253YmWhdH','288hYBVtX','116aGAaCa','.\x20Run\x20first:\x20ranger\x20profile\x20add\x20','3412510PEwTRH','732448EOQpNh','2259gTofco','IZFhZ','2939922ecjOdX','ksoJP','741412EvRinj','Profile\x20\x22','69670YMzkak','\x0a✓\x20Now\x20using\x20profile\x20\x22','167601VWbGWk'];_0x1170=function(){return _0x1c3192;};return _0x1170();}import{existsSync}from'fs';import{getEnvDir}from'./utils/settings.js';import{writeActiveProfileName}from'./utils/activeProfile.js';export async function useEnv(_0x17440d){const _0x3b9337=_0x56a5,_0x2f2c99={'IZFhZ':function(_0xc3a3c7,_0x27efeb){return _0xc3a3c7(_0x27efeb);},'ksoJP':'settings.json','AkoHA':function(_0x1a1800,_0x3f8457){return _0x1a1800(_0x3f8457);}},_0x47bd42=_0x2f2c99[_0x3b9337(0x114)](getEnvDir,_0x17440d),_0x335a2b=join(_0x47bd42,_0x2f2c99[_0x3b9337(0x116)]);if(!existsSync(_0x47bd42))throw new Error(_0x3b9337(0x118)+_0x17440d+'\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x17440d);if(!_0x2f2c99['AkoHA'](existsSync,_0x335a2b))throw new Error('Config\x20not\x20found\x20at\x20'+_0x335a2b+_0x3b9337(0x110)+_0x17440d);await writeActiveProfileName(_0x17440d),console['log'](_0x3b9337(0x10b)+_0x17440d+'\x22');}
1
+ (function(_0x5e0669,_0x114926){const _0x364797=_0xdbcd,_0x2c0ca1=_0x5e0669();while(!![]){try{const _0x19f843=-parseInt(_0x364797(0xba))/0x1+parseInt(_0x364797(0xc1))/0x2+-parseInt(_0x364797(0xc3))/0x3*(parseInt(_0x364797(0xbb))/0x4)+parseInt(_0x364797(0xbe))/0x5*(-parseInt(_0x364797(0xc4))/0x6)+parseInt(_0x364797(0xca))/0x7*(parseInt(_0x364797(0xc7))/0x8)+parseInt(_0x364797(0xc0))/0x9+parseInt(_0x364797(0xc2))/0xa;if(_0x19f843===_0x114926)break;else _0x2c0ca1['push'](_0x2c0ca1['shift']());}catch(_0x4858f2){_0x2c0ca1['push'](_0x2c0ca1['shift']());}}}(_0xe5d7,0x79ace));function _0xe5d7(){const _0x248d14=['38818WBihKB','33284JNAPVE','QeJwQ','log','126385gLnLhE','RWuNA','8011656qpwTqT','620362CJzfAe','2839540BZVyCa','342LinWYE','174fevppX','Config\x20not\x20found\x20at\x20','COBFQ','96IABuMq','\x0a✓\x20Now\x20using\x20profile\x20\x22','.\x20Run\x20first:\x20ranger\x20profile\x20add\x20','428463tIgDOb'];_0xe5d7=function(){return _0x248d14;};return _0xe5d7();}function _0xdbcd(_0x36da8f,_0x45ac8b){_0x36da8f=_0x36da8f-0xba;const _0xe5d754=_0xe5d7();let _0xdbcdf1=_0xe5d754[_0x36da8f];return _0xdbcdf1;}import{join}from'path';import{existsSync}from'fs';import{getEnvDir}from'./utils/settings.js';import{writeActiveProfileName}from'./utils/activeProfile.js';export async function useEnv(_0x3c0631){const _0x26fc1d=_0xdbcd,_0x4e4bcf={'COBFQ':function(_0x1b0b9c,_0x55170f,_0x4c4d96){return _0x1b0b9c(_0x55170f,_0x4c4d96);},'QeJwQ':'settings.json','RWuNA':function(_0x21ba9,_0x58ba63){return _0x21ba9(_0x58ba63);},'kkjYn':function(_0x272f8f,_0x3b69d6){return _0x272f8f(_0x3b69d6);}},_0x5552e1=getEnvDir(_0x3c0631),_0x6e1821=_0x4e4bcf[_0x26fc1d(0xc6)](join,_0x5552e1,_0x4e4bcf[_0x26fc1d(0xbc)]);if(!_0x4e4bcf['RWuNA'](existsSync,_0x5552e1))throw new Error('Profile\x20\x22'+_0x3c0631+'\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x3c0631);if(!_0x4e4bcf['kkjYn'](existsSync,_0x6e1821))throw new Error(_0x26fc1d(0xc5)+_0x6e1821+_0x26fc1d(0xc9)+_0x3c0631);await _0x4e4bcf[_0x26fc1d(0xbf)](writeActiveProfileName,_0x3c0631),console[_0x26fc1d(0xbd)](_0x26fc1d(0xc8)+_0x3c0631+'\x22');}
@@ -1 +1 @@
1
- (function(_0xd9e902,_0x357c6f){const _0x3d05d0=_0x2b39,_0x40df43=_0xd9e902();while(!![]){try{const _0x2246f1=parseInt(_0x3d05d0(0x120))/0x1*(-parseInt(_0x3d05d0(0x11d))/0x2)+-parseInt(_0x3d05d0(0x110))/0x3+-parseInt(_0x3d05d0(0x11f))/0x4*(-parseInt(_0x3d05d0(0x11a))/0x5)+-parseInt(_0x3d05d0(0x117))/0x6+parseInt(_0x3d05d0(0x11e))/0x7+parseInt(_0x3d05d0(0x116))/0x8*(parseInt(_0x3d05d0(0x118))/0x9)+-parseInt(_0x3d05d0(0x114))/0xa*(-parseInt(_0x3d05d0(0x10f))/0xb);if(_0x2246f1===_0x357c6f)break;else _0x40df43['push'](_0x40df43['shift']());}catch(_0x11bd30){_0x40df43['push'](_0x40df43['shift']());}}}(_0x9959,0x98a8f));import{existsSync}from'fs';import{mkdir,readFile,rename,unlink,writeFile}from'fs/promises';import{join}from'path';function _0x2b39(_0x126ee3,_0x4c0928){_0x126ee3=_0x126ee3-0x10e;const _0x99593=_0x9959();let _0x2b39f3=_0x99593[_0x126ee3];return _0x2b39f3;}import{getRangerDir}from'./rangerRoot.js';function _0x9959(){const _0x1c32c7=['trim','4322980TQgvCD','XyboH','8884112mIGYch','4633104QiaftS','9KGyvlt','cWyEO','5YaWMVs','NrwvM','hlbdd','2746hxvHPf','716282MwrJcR','3031880pkklwS','140FrcQsg','utf-8','11EMzECy','2440227vLIkPO','aQZtJ','Xblor'];_0x9959=function(){return _0x1c32c7;};return _0x9959();}const ACTIVE_PROFILE_FILE='active-profile.txt',LEGACY_ACTIVE_ENV_FILE='active-env.txt';function getActiveProfilePath(){return join(getRangerDir(),ACTIVE_PROFILE_FILE);}function getLegacyActiveEnvPath(){const _0x467473={'wlnGs':function(_0x39dbe5,_0xb47209,_0x23b4e0){return _0x39dbe5(_0xb47209,_0x23b4e0);}};return _0x467473['wlnGs'](join,getRangerDir(),LEGACY_ACTIVE_ENV_FILE);}async function migrateLegacyActiveEnv(){const _0x564a5b=_0x2b39,_0x1a5e3c={'NrwvM':function(_0x71c6e7,_0x51f380,_0x3b63bd){return _0x71c6e7(_0x51f380,_0x3b63bd);},'FxCYp':function(_0x3d29f2){return _0x3d29f2();},'hlbdd':'utf-8'},_0x5e045c=getLegacyActiveEnvPath();if(!existsSync(_0x5e045c))return null;let _0x121f9f=null;try{_0x121f9f=(await _0x1a5e3c[_0x564a5b(0x11b)](readFile,_0x5e045c,_0x564a5b(0x10e)))[_0x564a5b(0x113)]()||null;}catch{_0x121f9f=null;}if(!_0x121f9f)return null;const _0x11ed55=_0x1a5e3c['FxCYp'](getActiveProfilePath);try{await rename(_0x5e045c,_0x11ed55);}catch{try{const _0x2d73ce=getRangerDir();await _0x1a5e3c['NrwvM'](mkdir,_0x2d73ce,{'recursive':!![]}),await writeFile(_0x11ed55,_0x121f9f,_0x1a5e3c[_0x564a5b(0x11c)]),await unlink(_0x5e045c);}catch{}}return _0x121f9f;}export async function readActiveProfileName(){const _0x59c028=_0x2b39,_0x1cdae6={'GqtJy':function(_0x2818d7){return _0x2818d7();},'Xblor':function(_0x13bde5,_0x566fca,_0x5c3b75){return _0x13bde5(_0x566fca,_0x5c3b75);},'oNHkR':_0x59c028(0x10e)},_0x48edba=_0x1cdae6['GqtJy'](getActiveProfilePath);if(existsSync(_0x48edba))try{return(await _0x1cdae6[_0x59c028(0x112)](readFile,_0x48edba,_0x1cdae6['oNHkR']))['trim']()||null;}catch{return null;}return await _0x1cdae6['GqtJy'](migrateLegacyActiveEnv);}export async function writeActiveProfileName(_0x644182){const _0x4a7a7f=_0x2b39,_0xe0e149={'cWyEO':function(_0x37f6b4){return _0x37f6b4();},'QgYaj':function(_0xa26726,_0x5b2266,_0x523369){return _0xa26726(_0x5b2266,_0x523369);},'XyboH':_0x4a7a7f(0x10e),'kfvGa':function(_0x96fe19,_0x50ae02){return _0x96fe19(_0x50ae02);},'aQZtJ':function(_0x29704c,_0x191a65){return _0x29704c(_0x191a65);}},_0x35e5dd=_0xe0e149['cWyEO'](getRangerDir);await _0xe0e149['QgYaj'](mkdir,_0x35e5dd,{'recursive':!![]});const _0x59e5bd=_0xe0e149[_0x4a7a7f(0x119)](getActiveProfilePath);await writeFile(_0x59e5bd,_0x644182,_0xe0e149[_0x4a7a7f(0x115)]);const _0x37e9d8=getLegacyActiveEnvPath();if(_0xe0e149['kfvGa'](existsSync,_0x37e9d8))try{await _0xe0e149[_0x4a7a7f(0x111)](unlink,_0x37e9d8);}catch{}}export async function migrateActiveProfileFile(){const _0x362663={'njwNx':function(_0xf528e0){return _0xf528e0();},'FPzod':function(_0x27448a,_0x433fec){return _0x27448a!==_0x433fec;}},_0x59af1c=await _0x362663['njwNx'](migrateLegacyActiveEnv);return _0x362663['FPzod'](_0x59af1c,null);}
1
+ const _0x19ffce=_0x1d96;(function(_0x1afc84,_0x2c7255){const _0x4c99e3=_0x1d96,_0x5dfcf8=_0x1afc84();while(!![]){try{const _0xd8f945=-parseInt(_0x4c99e3(0x134))/0x1+-parseInt(_0x4c99e3(0x12d))/0x2+-parseInt(_0x4c99e3(0x12b))/0x3+-parseInt(_0x4c99e3(0x12f))/0x4*(-parseInt(_0x4c99e3(0x137))/0x5)+parseInt(_0x4c99e3(0x126))/0x6+-parseInt(_0x4c99e3(0x12c))/0x7*(-parseInt(_0x4c99e3(0x132))/0x8)+-parseInt(_0x4c99e3(0x127))/0x9*(parseInt(_0x4c99e3(0x130))/0xa);if(_0xd8f945===_0x2c7255)break;else _0x5dfcf8['push'](_0x5dfcf8['shift']());}catch(_0x5639c1){_0x5dfcf8['push'](_0x5dfcf8['shift']());}}}(_0x285c,0xd8bfb));import{existsSync}from'fs';import{mkdir,readFile,rename,unlink,writeFile}from'fs/promises';import{join}from'path';function _0x285c(){const _0x2e45b8=['ukPMv','DgDIm','2532441pjdNuL','7XmkSzo','881288ShVHDj','utf-8','820EkKhAG','10YkHeNS','QwjMB','12858280sBbmQs','awPZe','739553MxYovx','active-profile.txt','YfOjo','17725gSXxJQ','Umitn','8945856wqlCHF','8215551LgXVlA','sOOOT'];_0x285c=function(){return _0x2e45b8;};return _0x285c();}import{getRangerDir}from'./rangerRoot.js';const ACTIVE_PROFILE_FILE=_0x19ffce(0x135),LEGACY_ACTIVE_ENV_FILE='active-env.txt';function getActiveProfilePath(){const _0xddcaed=_0x19ffce,_0xa51281={'DgDIm':function(_0x1ea21c){return _0x1ea21c();}};return join(_0xa51281[_0xddcaed(0x12a)](getRangerDir),ACTIVE_PROFILE_FILE);}function getLegacyActiveEnvPath(){const _0x437524=_0x19ffce,_0x4b54a4={'awPZe':function(_0x4d5486,_0x227828,_0x43208c){return _0x4d5486(_0x227828,_0x43208c);}};return _0x4b54a4[_0x437524(0x133)](join,getRangerDir(),LEGACY_ACTIVE_ENV_FILE);}function _0x1d96(_0x49695d,_0x24193c){_0x49695d=_0x49695d-0x126;const _0x285c8b=_0x285c();let _0x1d9647=_0x285c8b[_0x49695d];return _0x1d9647;}async function migrateLegacyActiveEnv(){const _0x322cbb=_0x19ffce,_0xd63a7c={'ALszv':function(_0x231592,_0x17fad9,_0x1492f0){return _0x231592(_0x17fad9,_0x1492f0);},'EFMmH':_0x322cbb(0x12e),'dBtbE':function(_0x1626e8){return _0x1626e8();},'Umitn':function(_0x2044e9,_0x21822f,_0x1ed193){return _0x2044e9(_0x21822f,_0x1ed193);}},_0xc871e=getLegacyActiveEnvPath();if(!existsSync(_0xc871e))return null;let _0x26603f=null;try{_0x26603f=(await _0xd63a7c['ALszv'](readFile,_0xc871e,_0xd63a7c['EFMmH']))['trim']()||null;}catch{_0x26603f=null;}if(!_0x26603f)return null;const _0x42ffec=_0xd63a7c['dBtbE'](getActiveProfilePath);try{await _0xd63a7c[_0x322cbb(0x138)](rename,_0xc871e,_0x42ffec);}catch{try{const _0x5888a7=_0xd63a7c['dBtbE'](getRangerDir);await mkdir(_0x5888a7,{'recursive':!![]}),await writeFile(_0x42ffec,_0x26603f,'utf-8'),await unlink(_0xc871e);}catch{}}return _0x26603f;}export async function readActiveProfileName(){const _0x3eb6d6=_0x19ffce,_0x4ae9f0={'ukPMv':function(_0x58e993){return _0x58e993();},'QwjMB':function(_0x5c3d60,_0x24857d){return _0x5c3d60(_0x24857d);},'sOOOT':_0x3eb6d6(0x12e)},_0x5298c3=_0x4ae9f0[_0x3eb6d6(0x129)](getActiveProfilePath);if(_0x4ae9f0[_0x3eb6d6(0x131)](existsSync,_0x5298c3))try{return(await readFile(_0x5298c3,_0x4ae9f0[_0x3eb6d6(0x128)]))['trim']()||null;}catch{return null;}return await _0x4ae9f0['ukPMv'](migrateLegacyActiveEnv);}export async function writeActiveProfileName(_0x5e9d19){const _0x3af34a=_0x19ffce,_0x286990={'YfOjo':function(_0x1ee851){return _0x1ee851();},'MPGDF':'utf-8','xFanM':function(_0x58db59,_0xf8c7cc){return _0x58db59(_0xf8c7cc);}},_0x293b4c=_0x286990[_0x3af34a(0x136)](getRangerDir);await mkdir(_0x293b4c,{'recursive':!![]});const _0x1fb271=getActiveProfilePath();await writeFile(_0x1fb271,_0x5e9d19,_0x286990['MPGDF']);const _0x1191a1=_0x286990[_0x3af34a(0x136)](getLegacyActiveEnvPath);if(_0x286990['xFanM'](existsSync,_0x1191a1))try{await unlink(_0x1191a1);}catch{}}export async function migrateActiveProfileFile(){const _0xac85e8={'UQkfc':function(_0x3ad526,_0x2ebb9e){return _0x3ad526!==_0x2ebb9e;}},_0x5bd19f=await migrateLegacyActiveEnv();return _0xac85e8['UQkfc'](_0x5bd19f,null);}
@@ -1 +1 @@
1
- (function(_0x307c75,_0x3e6846){const _0x4ca6e2=_0x12d1,_0xa75c29=_0x307c75();while(!![]){try{const _0x1204a0=parseInt(_0x4ca6e2(0x164))/0x1*(-parseInt(_0x4ca6e2(0x125))/0x2)+parseInt(_0x4ca6e2(0x112))/0x3+parseInt(_0x4ca6e2(0x15d))/0x4+-parseInt(_0x4ca6e2(0x19a))/0x5*(-parseInt(_0x4ca6e2(0x13c))/0x6)+parseInt(_0x4ca6e2(0x190))/0x7+parseInt(_0x4ca6e2(0x14f))/0x8*(-parseInt(_0x4ca6e2(0x11a))/0x9)+-parseInt(_0x4ca6e2(0x183))/0xa;if(_0x1204a0===_0x3e6846)break;else _0xa75c29['push'](_0xa75c29['shift']());}catch(_0x5a9ab3){_0xa75c29['push'](_0xa75c29['shift']());}}}(_0x5143,0xd92f3));const _0x2be380=(function(){const _0x4c5942=_0x12d1,_0xd1d139={'BcMmG':_0x4c5942(0x12e),'LsPWO':function(_0x309a9a,_0x5eae40){return _0x309a9a!==_0x5eae40;},'GDRrG':_0x4c5942(0x160),'lSSly':'Ilhil'};let _0x59f68c=!![];return function(_0x15737c,_0x573e58){const _0x900453=_0x4c5942,_0x3a727f={'NkpZx':_0xd1d139[_0x900453(0x123)],'UjXgD':function(_0x19e8c7,_0x3b2e0e){return _0xd1d139['LsPWO'](_0x19e8c7,_0x3b2e0e);},'VfkaP':_0xd1d139[_0x900453(0x155)]};if(_0xd1d139[_0x900453(0x172)]!==_0xd1d139['lSSly'])throw new _0x3e9a8f(_0xd1d139['BcMmG']);else{const _0x169833=_0x59f68c?function(){const _0x23fd95=_0x900453;if(_0x573e58){if(_0x3a727f[_0x23fd95(0x13a)](_0x3a727f[_0x23fd95(0x114)],_0x3a727f[_0x23fd95(0x114)]))throw new _0x451483(_0x3a727f[_0x23fd95(0x174)]);else{const _0x435f54=_0x573e58['apply'](_0x15737c,arguments);return _0x573e58=null,_0x435f54;}}}:function(){};return _0x59f68c=![],_0x169833;}};}()),_0x22524f=_0x2be380(this,function(){const _0x2dfc26=_0x12d1,_0x31e2dd={'UCcPO':_0x2dfc26(0x167)};return _0x22524f[_0x2dfc26(0x10e)]()[_0x2dfc26(0x169)](_0x2dfc26(0x167))['toString']()[_0x2dfc26(0x134)](_0x22524f)[_0x2dfc26(0x169)](_0x31e2dd['UCcPO']);});_0x22524f();import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{createHash}from'crypto';import{withRetry}from'./retry.js';export async function createBrowserSession(_0x4b4191){const _0x4a9780=_0x12d1,_0x517306={'uxDzE':function(_0x1c4c4e,_0xd88a14,_0x587bb2,_0x5701f2){return _0x1c4c4e(_0xd88a14,_0x587bb2,_0x5701f2);},'AKHvq':_0x4a9780(0x18d),'EzftM':function(_0x25ee2b,_0x1b55ee,_0x11e973,_0x17b767){return _0x25ee2b(_0x1b55ee,_0x11e973,_0x17b767);},'shpaH':function(_0x1d283b){return _0x1d283b();},'KmsZR':function(_0x4d96ef,_0x4bb065){return _0x4d96ef!==_0x4bb065;},'fYCst':'OaOtC','adAwh':_0x4a9780(0x132),'uTIjd':_0x4a9780(0x12e),'zNGnb':function(_0x2ffade){return _0x2ffade();},'cPreD':function(_0x3095fc,_0x27338c,_0x4035c0){return _0x3095fc(_0x27338c,_0x4035c0);},'zuHJT':_0x4a9780(0x11f),'tnUZk':_0x4a9780(0x15b)},_0x3dac1e=await _0x517306[_0x4a9780(0x131)](getToken);if(!_0x3dac1e){if(_0x517306[_0x4a9780(0x150)](_0x517306['fYCst'],_0x517306[_0x4a9780(0x127)]))throw new Error(_0x517306[_0x4a9780(0x117)]);else return _0x517306[_0x4a9780(0x166)](_0x5f17ba,_0x3ed36f,_0x46fd17,_0x517306[_0x4a9780(0x14a)]);}const _0x4a7484=_0x517306[_0x4a9780(0x137)](getApiBaseUrl),_0x7d9fed=await _0x517306[_0x4a9780(0x15a)](fetch,_0x4a7484+_0x4a9780(0x15e),{'method':_0x4a9780(0x120),'headers':{'Authorization':'Bearer\x20'+_0x3dac1e,'Content-Type':_0x517306[_0x4a9780(0x197)]},'body':JSON[_0x4a9780(0x180)]({'environmentName':_0x4b4191?.[_0x4a9780(0x146)],'settings':_0x4b4191?.[_0x4a9780(0x148)],'task':_0x4b4191?.['task'],'url':_0x4b4191?.[_0x4a9780(0x153)],'featureId':_0x4b4191?.[_0x4a9780(0x147)],'checklistItemId':_0x4b4191?.[_0x4a9780(0x159)]})});if(!_0x7d9fed['ok']){if(_0x517306['tnUZk']!==_0x517306['tnUZk'])return _0x517306[_0x4a9780(0x10b)](_0xb3ff54,_0xcc63c6,_0x33dd16,_0x4a9780(0x10d));else{const _0x3caa42=await _0x7d9fed[_0x4a9780(0x143)]();throw new Error(_0x4a9780(0x144)+_0x3caa42);}}return _0x7d9fed[_0x4a9780(0x194)]();}export async function updateBrowserSession(_0x258645,_0x2802cb){const _0x1c75f0=_0x12d1,_0x4b3783={'OAUqS':function(_0x4ad25e){return _0x4ad25e();},'FkEEc':_0x1c75f0(0x12e),'bxjpW':_0x1c75f0(0x17f),'VhumH':'application/json','GIGFU':function(_0x435a76,_0x4795db,_0x31c786){return _0x435a76(_0x4795db,_0x31c786);}};return _0x4b3783[_0x1c75f0(0x139)](withRetry,async()=>{const _0x53f183=_0x1c75f0,_0x267e50=await _0x4b3783[_0x53f183(0x15f)](getToken);if(!_0x267e50)throw new Error(_0x4b3783[_0x53f183(0x162)]);const _0x2271fc=_0x4b3783[_0x53f183(0x15f)](getApiBaseUrl),_0x59d1b2=await fetch(_0x2271fc+_0x53f183(0x14d)+_0x258645,{'method':_0x4b3783[_0x53f183(0x195)],'headers':{'Authorization':_0x53f183(0x136)+_0x267e50,'Content-Type':_0x4b3783[_0x53f183(0x13e)]},'body':JSON['stringify'](_0x2802cb)});if(!_0x59d1b2['ok']){const _0x4063ed=await _0x59d1b2['text']();throw new Error(_0x53f183(0x170)+_0x4063ed);}return _0x59d1b2[_0x53f183(0x194)]();},{'label':'updateBrowserSession'});}export async function getBrowserSession(_0x178fd5){const _0x5884ec=_0x12d1,_0x1e936d={'lGaqu':function(_0x2f3a0c){return _0x2f3a0c();},'OVaoD':_0x5884ec(0x12e),'ycvyv':'GET'},_0x4083dc=await _0x1e936d['lGaqu'](getToken);if(!_0x4083dc)throw new Error(_0x1e936d[_0x5884ec(0x18e)]);const _0x1ac33f=_0x1e936d['lGaqu'](getApiBaseUrl),_0x12b68f=await fetch(_0x1ac33f+_0x5884ec(0x14d)+_0x178fd5,{'method':_0x1e936d[_0x5884ec(0x17a)],'headers':{'Authorization':_0x5884ec(0x136)+_0x4083dc}});if(!_0x12b68f['ok']){const _0x173b4f=await _0x12b68f[_0x5884ec(0x143)]();throw new Error(_0x5884ec(0x138)+_0x173b4f);}return _0x12b68f[_0x5884ec(0x194)]();}export async function getUploadUrls(_0x53b25e,_0x54f248,_0x2b1488,_0x4696dd){const _0x150d8a=_0x12d1,_0x45f63e={'wKQOE':_0x150d8a(0x16f),'iHsfG':_0x150d8a(0x198),'QVEWb':function(_0xafb56b){return _0xafb56b();},'agIYD':_0x150d8a(0x121),'VLVnQ':_0x150d8a(0x157),'xiVfx':_0x150d8a(0x12e),'hwuII':'POST','kEKwG':_0x150d8a(0x11f),'lRxmv':function(_0x31c395,_0x53c61a){return _0x31c395!==_0x53c61a;},'Hfmev':function(_0xbafa31,_0x301d63){return _0xbafa31!==_0x301d63;},'YbQBJ':'wtxUB','ULEue':_0x150d8a(0x142)},_0x89a87=await _0x45f63e[_0x150d8a(0x122)](getToken);if(!_0x89a87){if(_0x45f63e[_0x150d8a(0x11d)]!==_0x45f63e[_0x150d8a(0x193)])throw new Error(_0x45f63e[_0x150d8a(0x156)]);else{if(_0x1a0326){const _0x82b98=_0x354488[_0x150d8a(0x171)](_0x596836,arguments);return _0x525e3f=null,_0x82b98;}}}const _0x42edba=_0x45f63e[_0x150d8a(0x122)](getApiBaseUrl),_0x5c6dc0=await fetch(_0x42edba+_0x150d8a(0x14d)+_0x53b25e+_0x150d8a(0x149),{'method':_0x45f63e[_0x150d8a(0x192)],'headers':{'Authorization':_0x150d8a(0x136)+_0x89a87,'Content-Type':_0x45f63e[_0x150d8a(0x196)]},'body':JSON[_0x150d8a(0x180)]({'filename':_0x54f248,'filetype':_0x2b1488,..._0x45f63e[_0x150d8a(0x18c)](_0x4696dd?.[_0x150d8a(0x186)],undefined)&&{'size':_0x4696dd[_0x150d8a(0x186)]},..._0x45f63e[_0x150d8a(0x17b)](_0x4696dd?.[_0x150d8a(0x141)],undefined)&&{'checksum':_0x4696dd[_0x150d8a(0x141)]},..._0x45f63e[_0x150d8a(0x17b)](_0x4696dd?.[_0x150d8a(0x133)],undefined)&&{'metadata':_0x4696dd[_0x150d8a(0x133)]}})});if(!_0x5c6dc0['ok']){if(_0x45f63e[_0x150d8a(0x17b)](_0x45f63e[_0x150d8a(0x16d)],_0x45f63e[_0x150d8a(0x126)])){const _0xac6420=await _0x5c6dc0[_0x150d8a(0x143)]();throw new Error('Failed\x20to\x20get\x20upload\x20URLs:\x20'+_0xac6420);}else return _0x2b78cd(_0x45f63e['wKQOE'])[_0x150d8a(0x118)](_0x1053f6)[_0x150d8a(0x179)](_0x45f63e[_0x150d8a(0x13b)]);}return _0x5c6dc0[_0x150d8a(0x194)]();}export async function uploadFile(_0x5bcdf9,_0x5f0fc2,_0x46ace5){const _0x249c45=_0x12d1,_0xe4404f={'Yscbg':_0x249c45(0x16a)},_0x3eab20=await fetch(_0x5bcdf9,{'method':_0xe4404f['Yscbg'],'headers':{'Content-Type':_0x46ace5,'Content-Length':_0x5f0fc2[_0x249c45(0x10c)][_0x249c45(0x10e)]()},'body':_0x5f0fc2});if(!_0x3eab20['ok']){const _0x1887f8=await _0x3eab20['text']();throw new Error(_0x249c45(0x181)+_0x1887f8);}}export async function uploadTrace(_0x1fe14e,_0x5749e9){const _0x4f5b92=_0x12d1,_0x25515b={'kqUXi':function(_0x22fe52,_0x33f026,_0x2ff931,_0x25bf33){return _0x22fe52(_0x33f026,_0x2ff931,_0x25bf33);},'MOSUj':_0x4f5b92(0x199)};return _0x25515b[_0x4f5b92(0x182)](uploadFile,_0x1fe14e,_0x5749e9,_0x25515b[_0x4f5b92(0x15c)]);}export async function uploadConversation(_0x5060c0,_0x13dac6){const _0xf63cbf=_0x12d1,_0x5e7b63={'qinQP':function(_0x1a71c5,_0x1e0f30,_0x114ea0,_0x5984c8){return _0x1a71c5(_0x1e0f30,_0x114ea0,_0x5984c8);},'HWcIi':_0xf63cbf(0x18d)};return _0x5e7b63[_0xf63cbf(0x184)](uploadFile,_0x5060c0,_0x13dac6,_0x5e7b63[_0xf63cbf(0x189)]);}function _0x12d1(_0x5398cc,_0x5d9f24){_0x5398cc=_0x5398cc-0x10b;const _0x579fd6=_0x5143();let _0x22524f=_0x579fd6[_0x5398cc];if(_0x12d1['VSCIMY']===undefined){var _0x2be380=function(_0x39baa0){const _0xe244c3='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x3787b6='',_0x3674ac='',_0x592552=_0x3787b6+_0x2be380;for(let _0x21ccde=0x0,_0x365ebd,_0xf10364,_0x37a4e6=0x0;_0xf10364=_0x39baa0['charAt'](_0x37a4e6++);~_0xf10364&&(_0x365ebd=_0x21ccde%0x4?_0x365ebd*0x40+_0xf10364:_0xf10364,_0x21ccde++%0x4)?_0x3787b6+=_0x592552['charCodeAt'](_0x37a4e6+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x365ebd>>(-0x2*_0x21ccde&0x6)):_0x21ccde:0x0){_0xf10364=_0xe244c3['indexOf'](_0xf10364);}for(let _0x43328b=0x0,_0x519077=_0x3787b6['length'];_0x43328b<_0x519077;_0x43328b++){_0x3674ac+='%'+('00'+_0x3787b6['charCodeAt'](_0x43328b)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3674ac);};_0x12d1['UgaDNu']=_0x2be380,_0x12d1['KsjanL']={},_0x12d1['VSCIMY']=!![];}const _0x51437f=_0x579fd6[0x0],_0x12d1d1=_0x5398cc+_0x51437f,_0x448f2d=_0x12d1['KsjanL'][_0x12d1d1];if(!_0x448f2d){const _0xad0065=function(_0x1d3113){this['HDYFeK']=_0x1d3113,this['pABEzl']=[0x1,0x0,0x0],this['KqiLIk']=function(){return'newState';},this['kXfHjY']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['VaqPKg']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0xad0065['prototype']['Jesqgt']=function(){const _0x4e085c=new RegExp(this['kXfHjY']+this['VaqPKg']),_0x280100=_0x4e085c['test'](this['KqiLIk']['toString']())?--this['pABEzl'][0x1]:--this['pABEzl'][0x0];return this['SVPBfm'](_0x280100);},_0xad0065['prototype']['SVPBfm']=function(_0x5d9b5b){if(!Boolean(~_0x5d9b5b))return _0x5d9b5b;return this['qeysdW'](this['HDYFeK']);},_0xad0065['prototype']['qeysdW']=function(_0x52da3a){for(let _0x1713b2=0x0,_0x19a2f1=this['pABEzl']['length'];_0x1713b2<_0x19a2f1;_0x1713b2++){this['pABEzl']['push'](Math['round'](Math['random']())),_0x19a2f1=this['pABEzl']['length'];}return _0x52da3a(this['pABEzl'][0x0]);},new _0xad0065(_0x12d1)['Jesqgt'](),_0x22524f=_0x12d1['UgaDNu'](_0x22524f),_0x12d1['KsjanL'][_0x12d1d1]=_0x22524f;}else _0x22524f=_0x448f2d;return _0x22524f;}export async function uploadScreenshot(_0x3f81af,_0x81f46d){const _0x55162b=_0x12d1,_0x5db55e={'CkdvK':function(_0x5d4463,_0x4a2ba9,_0xa26aec,_0x405316){return _0x5d4463(_0x4a2ba9,_0xa26aec,_0x405316);},'yiEar':_0x55162b(0x11e)};return _0x5db55e[_0x55162b(0x11b)](uploadFile,_0x3f81af,_0x81f46d,_0x5db55e[_0x55162b(0x113)]);}export async function uploadVideo(_0x4b1c01,_0x1f416f){const _0x12ab2d=_0x12d1,_0x107446={'oJynR':function(_0xedda1b,_0x463e46,_0x5eef89,_0x2b2fff){return _0xedda1b(_0x463e46,_0x5eef89,_0x2b2fff);},'sQkQB':_0x12ab2d(0x10d)};return _0x107446['oJynR'](uploadFile,_0x4b1c01,_0x1f416f,_0x107446[_0x12ab2d(0x188)]);}export function buildTraceViewerUrl(_0x3b8348){const _0x37aa8c=_0x12d1,_0xf31d1d={'HJKcD':function(_0xfe460b,_0x31af42){return _0xfe460b(_0x31af42);}},_0x127df8=_0xf31d1d[_0x37aa8c(0x18a)](encodeURIComponent,_0x3b8348);return _0x37aa8c(0x145)+_0x127df8;}export async function getProxySessionToken(){const _0x16ece7=_0x12d1,_0x1d81d7={'YzTea':_0x16ece7(0x12e),'Szoev':function(_0xa888c4){return _0xa888c4();},'AEJPf':function(_0x517596,_0x139772){return _0x517596!==_0x139772;},'FEplu':'IQgpD','Jfsss':function(_0x198ea3){return _0x198ea3();},'mZcgK':function(_0x5be179,_0x57731b,_0xd5037e){return _0x5be179(_0x57731b,_0xd5037e);},'kXrgC':_0x16ece7(0x120),'TBsaj':_0x16ece7(0x12d),'omGNw':_0x16ece7(0x16c)},_0x3815d2=await _0x1d81d7[_0x16ece7(0x185)](getToken);if(!_0x3815d2){if(_0x1d81d7[_0x16ece7(0x151)](_0x1d81d7[_0x16ece7(0x13d)],'IQgpD'))throw new _0x481a23(_0x1d81d7['YzTea']);else throw new Error(_0x1d81d7[_0x16ece7(0x17e)]);}const _0x100ba2=_0x1d81d7[_0x16ece7(0x12f)](getApiBaseUrl),_0x50b5b3=await _0x1d81d7[_0x16ece7(0x124)](fetch,_0x100ba2+_0x16ece7(0x152),{'method':_0x1d81d7[_0x16ece7(0x11c)],'headers':{'Authorization':'Bearer\x20'+_0x3815d2}});if(!_0x50b5b3['ok']){if(_0x1d81d7[_0x16ece7(0x151)](_0x1d81d7[_0x16ece7(0x165)],_0x1d81d7[_0x16ece7(0x111)])){const _0x3d2d02=await _0x50b5b3['text']();throw new Error(_0x16ece7(0x140)+_0x3d2d02);}else throw new _0x55b3a7(_0x1d81d7[_0x16ece7(0x17e)]);}const _0x32219c=await _0x50b5b3[_0x16ece7(0x194)]();return _0x32219c[_0x16ece7(0x14b)];}function _0x5143(){const _0x35066c=['s21ZwLi','quvkugy','l2fWAs92ms9Ty3aVChjVEhKTC2vZC2LVBG','DxjS','z252tge','r0rsCKC','EgLwzNG','yNbStgy','wMfHEvG','y2HLy2TSAxn0sxrLBuLK','y1bYzuq','whLsCfC','tu9tvwO','ntu3mdaWmhjJrNPvEa','l2fWAs92ms9Ty3aVyNjVD3nLCI1ZzxnZAw9UCW','t0fvCvm','venKDhO','rLjIrem','rMTfrwm','CuDQu0q','ndmXmJaWAKryBMXT','vejZywO','DxHeEKu','kcGOlISPkYKRksSK','DNfPzgq','C2vHCMnO','ufvu','CNvIsMG','DMfKt0C','wwjrqKO','A0vTvuO','Bwq1','rMfPBgvKihrVihvWzgf0zsbICM93C2vYihnLC3nPB246ia','yxbWBhK','BfntBhK','l3n0zxbZ','tMTWwNG','sfPWr1u','uM5ZCva','BM5xyui','C1nmz0O','zgLNzxn0','Ewn2Exy','sgzTzxy','u2n4vxa','AK9WvNO','wxPuzwe','uefuq0G','C3rYAw5NAwz5','rMfPBgvKihrVihvWBg9HzcbMAwXLoIa','A3fvwgK','otC0mtyWmfbcsLbJEa','CwLUuva','u3PVzxy','C2L6zq','EhrUC0m','C1fRuui','sfDJswK','sePly0q','CMnlt3G','Bfj4Bxy','yxbWBgLJyxrPB24VANnVBMW','t1zHB0q','rMfPBgvKihrVihvWzgf0zsb2zxjPzMLJyxrPB24GC3rLCdOG','mteYnJi1mtb2Ag1cqwq','rMfPBgvKihrVignYzwf0zsbZDgvWigfZC2v0oIa','AhD1suK','vKXwBLe','ANnVBG','yNHQCfC','A0vlD0C','ENvisLq','yMfZzty0','yxbWBgLJyxrPB24VEMLW','ndviENvfteO','rxPMDe0','BgvUz3rO','DMLKzw8VD2vIBq','Dg9tDhjPBMC','ELjbtvC','Bvjktgu','B21htNC','ndeWndeWnwLKyM92DG','EwLfyxi','vMzRyva','sxzivMm','Dhbyzeu','DvrjAMq','DxbKyxrL','l3n0zxbZlW','mteWmda4mZv3zwjdseS','q2TKDKS','A1HYz0m','ywDjwuq','Aw1Hz2uVCg5N','yxbWBgLJyxrPB24VANnVBG','ue9tva','y3bSCw8','uvzfv2i','qMnnBuC','BvPJz0S','nNDTse9cDG','vuXfDwu','ywrbD2G','tuv5q3e','Bxbsy2C','r1Peq2i','AMPLvLu','yvHUA0C','wKXOCfO','tM8GqvbjihrVA2vUignVBMzPz3vYzwqUifj1BJOGCMfUz2vYihnLDhvWifT0B2TLBL0','sMzZC3m','yvLozfK','C2HWyuG','BLDVv0m','Bwv0ywrHDge','y29UC3rYDwn0B3i','zKjbAKW','qMvHCMvYia','EK5hBMi','rMfPBgvKihrVigDLDcbICM93C2vYihnLC3nPB246ia','r0LhrLu','vwPyz0q','AuHZzKC','nJC5ofzpv0fPwq','rKvWBhu','vMH1BuG','l2fZC2v0CW','rMfPBgvKihrVigDLDcbWCM94EsbZzxnZAw9UihrVA2vUoIa','y2HLy2TZDw0','ExLnBNG','Dgv4Da','rMfPBgvKihrVignYzwf0zsbICM93C2vYihnLC3nPB246ia','Ahr0Chm6lY90CMfJzs5WBgf5D3jPz2H0lMrLDI8/DhjHy2u9','zw52AxjVBM1LBNroyw1L','zMvHDhvYzuLK','C2v0DgLUz3m','l3vWBg9Hzc11CMXZ','quTiDNe','C2vZC2LVBLrVA2vU','DxjcEK0','l2fWAs92ms9Ty3aVyNjVD3nLCI1ZzxnZAw9UCY8','yKfuCvC','oe1QBMTgAW'];_0x5143=function(){return _0x35066c;};return _0x5143();}export function computeChecksum(_0x46177f){const _0x3899b4=_0x12d1,_0x238292={'jjeVU':function(_0x3cad9d,_0x3ce9c6){return _0x3cad9d(_0x3ce9c6);},'QBeWk':'md5'};return _0x238292[_0x3899b4(0x12b)](createHash,_0x238292['QBeWk'])['update'](_0x46177f)['digest']('base64');}export async function createVerificationStep(_0x532984,_0x3ef6e2){const _0xc76541=_0x12d1,_0x5c5174={'HZpGU':function(_0x360b7a,_0x286ef9,_0xcea11,_0x4eed06){return _0x360b7a(_0x286ef9,_0xcea11,_0x4eed06);},'urBzM':function(_0x1eebad){return _0x1eebad();},'mRJLe':function(_0x4a3d21,_0x36a659){return _0x4a3d21===_0x36a659;},'zRAMW':'MzbWU','kzFAh':_0xc76541(0x12e),'MEyCq':function(_0x7a5b10){return _0x7a5b10();},'aXnkG':'POST','kEmUJ':_0xc76541(0x11f)},_0x5f1b63=await _0x5c5174[_0xc76541(0x14c)](getToken);if(!_0x5f1b63){if(_0x5c5174[_0xc76541(0x110)](_0x5c5174[_0xc76541(0x10f)],_0x5c5174[_0xc76541(0x10f)]))throw new Error(_0x5c5174['kzFAh']);else return _0x5c5174[_0xc76541(0x175)](_0x27b5f2,_0x1b2d7f,_0x1d8e13,_0xc76541(0x11e));}const _0x16d79d=_0x5c5174[_0xc76541(0x128)](getApiBaseUrl),_0x2a54da=await fetch(_0x16d79d+_0xc76541(0x14d)+_0x532984+_0xc76541(0x173),{'method':_0x5c5174[_0xc76541(0x12c)],'headers':{'Authorization':_0xc76541(0x136)+_0x5f1b63,'Content-Type':_0x5c5174[_0xc76541(0x16e)]},'body':JSON['stringify'](_0x3ef6e2)});if(!_0x2a54da['ok']){const _0x2cd312=await _0x2a54da[_0xc76541(0x143)]();throw new Error('Failed\x20to\x20create\x20verification\x20step:\x20'+_0x2cd312);}return _0x2a54da[_0xc76541(0x194)]();}export async function createStepAsset(_0x3804dd,_0x4d999c,_0x4560d2){const _0x12c593=_0x12d1,_0x540bf3={'nnWaB':function(_0x295af8,_0x1c9b0a){return _0x295af8!==_0x1c9b0a;},'mpRcg':_0x12c593(0x18b),'tpXdE':'GrCUF','tdIsq':_0x12c593(0x12e),'aYNdY':function(_0x5cc58f){return _0x5cc58f();},'rubJh':function(_0x51491f,_0x973a19,_0xeb45a5){return _0x51491f(_0x973a19,_0xeb45a5);},'fBAjL':_0x12c593(0x120),'xtnsC':_0x12c593(0x11f)},_0x4a0b07=await getToken();if(!_0x4a0b07){if(_0x540bf3[_0x12c593(0x177)](_0x540bf3[_0x12c593(0x129)],_0x540bf3[_0x12c593(0x116)]))throw new Error(_0x540bf3['tdIsq']);else{const _0x120c8c=_0x556570[_0x12c593(0x171)](_0x45d981,arguments);return _0x46efe8=null,_0x120c8c;}}const _0x1fc78b=_0x540bf3[_0x12c593(0x130)](getApiBaseUrl),_0x1ca746=await _0x540bf3[_0x12c593(0x16b)](fetch,_0x1fc78b+_0x12c593(0x14d)+_0x3804dd+_0x12c593(0x119)+_0x4d999c+_0x12c593(0x13f),{'method':_0x540bf3[_0x12c593(0x135)],'headers':{'Authorization':_0x12c593(0x136)+_0x4a0b07,'Content-Type':_0x540bf3[_0x12c593(0x187)]},'body':JSON[_0x12c593(0x180)](_0x4560d2)});if(!_0x1ca746['ok']){const _0x1d23da=await _0x1ca746[_0x12c593(0x143)]();throw new Error(_0x12c593(0x191)+_0x1d23da);}return _0x1ca746['json']();}export async function updateVerificationStep(_0x26cb72,_0x1e2a74,_0x346519){const _0x2eac81=_0x12d1,_0x28bea6={'jOpVz':function(_0x4ae513,_0x630f54,_0x182145,_0xf8e5d9){return _0x4ae513(_0x630f54,_0x182145,_0xf8e5d9);},'qGjSD':_0x2eac81(0x199),'vXjux':function(_0x3c8bad,_0x578dae){return _0x3c8bad!==_0x578dae;},'IvHVc':_0x2eac81(0x168),'FRbDC':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','RnsqP':function(_0x9eb61b){return _0x9eb61b();},'bATqW':_0x2eac81(0x17f),'GZDCb':_0x2eac81(0x11f),'ScxUp':'bJfNQ','ZaayX':_0x2eac81(0x154)},_0x520947=await getToken();if(!_0x520947){if(_0x28bea6['vXjux'](_0x2eac81(0x178),_0x28bea6[_0x2eac81(0x115)]))throw new Error(_0x28bea6[_0x2eac81(0x161)]);else{const _0x378be9=_0xad0065?function(){const _0xa0a4c2=_0x2eac81;if(_0x1713b2){const _0xa72821=_0x3a6f7c[_0xa0a4c2(0x171)](_0x5b40b9,arguments);return _0x181339=null,_0xa72821;}}:function(){};return _0x52da3a=![],_0x378be9;}}const _0x3f9a6e=_0x28bea6[_0x2eac81(0x176)](getApiBaseUrl),_0x3f298f=await fetch(_0x3f9a6e+_0x2eac81(0x14d)+_0x26cb72+_0x2eac81(0x119)+_0x1e2a74,{'method':_0x28bea6[_0x2eac81(0x14e)],'headers':{'Authorization':_0x2eac81(0x136)+_0x520947,'Content-Type':_0x28bea6[_0x2eac81(0x12a)]},'body':JSON['stringify'](_0x346519)});if(!_0x3f298f['ok']){if(_0x28bea6[_0x2eac81(0x17c)]===_0x28bea6[_0x2eac81(0x158)])return _0x28bea6[_0x2eac81(0x17d)](_0x32edf6,_0x2ce91e,_0x2134fc,_0x28bea6[_0x2eac81(0x163)]);else{const _0xdcb85c=await _0x3f298f[_0x2eac81(0x143)]();throw new Error(_0x2eac81(0x18f)+_0xdcb85c);}}}
1
+ (function(_0x364d80,_0x28bcb2){const _0x2e8390=_0x3498,_0x3aad48=_0x364d80();while(!![]){try{const _0x4bd40e=parseInt(_0x2e8390(0x1fa))/0x1*(-parseInt(_0x2e8390(0x1f1))/0x2)+-parseInt(_0x2e8390(0x24d))/0x3+-parseInt(_0x2e8390(0x24b))/0x4*(-parseInt(_0x2e8390(0x209))/0x5)+parseInt(_0x2e8390(0x224))/0x6+parseInt(_0x2e8390(0x250))/0x7*(-parseInt(_0x2e8390(0x239))/0x8)+parseInt(_0x2e8390(0x223))/0x9+-parseInt(_0x2e8390(0x1fd))/0xa*(-parseInt(_0x2e8390(0x24f))/0xb);if(_0x4bd40e===_0x28bcb2)break;else _0x3aad48['push'](_0x3aad48['shift']());}catch(_0x21338a){_0x3aad48['push'](_0x3aad48['shift']());}}}(_0x4a35,0xd1050));const _0x12ce67=(function(){const _0x26edbe=_0x3498,_0x3639c3={'lFBAu':_0x26edbe(0x1ee),'VXXJw':'GxGXm','iuunH':function(_0x4bb6a7,_0x58443b){return _0x4bb6a7!==_0x58443b;},'HdaMn':_0x26edbe(0x22e),'mkwgJ':function(_0x526bbe,_0x1d0c28){return _0x526bbe===_0x1d0c28;},'JNzCZ':'BThJr'};let _0x206452=!![];return function(_0x3e8637,_0x433870){const _0x140bef=_0x26edbe,_0x584e84={'rvCcZ':_0x3639c3[_0x140bef(0x240)],'gUoTB':function(_0x4a4d1f,_0x2f9670){return _0x4a4d1f===_0x2f9670;},'kFxhR':_0x3639c3[_0x140bef(0x1e8)],'UjBCl':function(_0x4976b7,_0x2041c6){const _0x4a956f=_0x140bef;return _0x3639c3[_0x4a956f(0x237)](_0x4976b7,_0x2041c6);},'hyRCc':_0x3639c3[_0x140bef(0x1fe)],'PZNtz':_0x140bef(0x233)};if(_0x3639c3[_0x140bef(0x25a)](_0x3639c3[_0x140bef(0x206)],_0x3639c3['JNzCZ'])){const _0x5124a6=_0x206452?function(){const _0xfed09a=_0x140bef,_0x2ef5b9={'eDhgc':_0x584e84[_0xfed09a(0x23b)],'BjbyX':function(_0x490808,_0x447b9d,_0x364975,_0xfe447){return _0x490808(_0x447b9d,_0x364975,_0xfe447);},'xcpcz':'application/jsonl'};if(_0x584e84['gUoTB'](_0x584e84[_0xfed09a(0x213)],_0x584e84[_0xfed09a(0x213)])){if(_0x433870){if(_0x584e84['UjBCl'](_0x584e84['hyRCc'],_0x584e84[_0xfed09a(0x234)])){const _0x51d2dd=_0x433870[_0xfed09a(0x23e)](_0x3e8637,arguments);return _0x433870=null,_0x51d2dd;}else throw new _0x4c2e61(_0x2ef5b9[_0xfed09a(0x25f)]);}}else return _0x2ef5b9[_0xfed09a(0x22a)](_0x2258c9,_0x21b5c2,_0x537d54,_0x2ef5b9[_0xfed09a(0x257)]);}:function(){};return _0x206452=![],_0x5124a6;}else{const _0x3d45be=_0x117b17?function(){const _0x3006bb=_0x140bef;if(_0xc0ded4){const _0x4527a1=_0x19ca96[_0x3006bb(0x23e)](_0x4aeaac,arguments);return _0x563c1d=null,_0x4527a1;}}:function(){};return _0x50c91c=![],_0x3d45be;}};}()),_0x58f27b=_0x12ce67(this,function(){const _0x4a3d74=_0x3498,_0x731df2={'okaDT':_0x4a3d74(0x241)};return _0x58f27b[_0x4a3d74(0x21f)]()[_0x4a3d74(0x227)]('(((.+)+)+)+$')[_0x4a3d74(0x21f)]()['constructor'](_0x58f27b)[_0x4a3d74(0x227)](_0x731df2[_0x4a3d74(0x203)]);});_0x58f27b();import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{createHash}from'crypto';import{withRetry}from'./retry.js';export async function createBrowserSession(_0x597f2b){const _0x4522f2=_0x3498,_0x57d2d1={'ycNWK':_0x4522f2(0x1ee),'scFOL':function(_0x22062c){return _0x22062c();},'FlMaa':function(_0x2532ed){return _0x2532ed();},'FEAfj':function(_0x5953a5,_0x57a7d7,_0x41067e){return _0x5953a5(_0x57a7d7,_0x41067e);},'dmgfy':_0x4522f2(0x229),'tjGBr':function(_0x1d027a,_0x3ae289){return _0x1d027a===_0x3ae289;},'tJAvc':'JlNee','sCkcS':_0x4522f2(0x212)},_0x2a5868=await _0x57d2d1[_0x4522f2(0x219)](getToken);if(!_0x2a5868)throw new Error(_0x57d2d1[_0x4522f2(0x253)]);const _0x32604e=_0x57d2d1[_0x4522f2(0x249)](getApiBaseUrl),_0x5b3c22=await _0x57d2d1['FEAfj'](fetch,_0x32604e+_0x4522f2(0x226),{'method':_0x57d2d1['dmgfy'],'headers':{'Authorization':'Bearer\x20'+_0x2a5868,'Content-Type':_0x4522f2(0x246)},'body':JSON[_0x4522f2(0x238)]({'environmentName':_0x597f2b?.['environmentName'],'settings':_0x597f2b?.['settings'],'task':_0x597f2b?.[_0x4522f2(0x22d)],'url':_0x597f2b?.[_0x4522f2(0x247)],'featureId':_0x597f2b?.[_0x4522f2(0x221)],'checklistItemId':_0x597f2b?.[_0x4522f2(0x20c)]})});if(!_0x5b3c22['ok']){if(_0x57d2d1[_0x4522f2(0x1ff)](_0x57d2d1['tJAvc'],_0x57d2d1[_0x4522f2(0x24a)]))throw new _0xd02386(_0x57d2d1[_0x4522f2(0x253)]);else{const _0x5c1648=await _0x5b3c22[_0x4522f2(0x222)]();throw new Error(_0x4522f2(0x204)+_0x5c1648);}}return _0x5b3c22[_0x4522f2(0x236)]();}function _0x3498(_0x2f90fe,_0x42b160){_0x2f90fe=_0x2f90fe-0x1e7;const _0x3ae9c2=_0x4a35();let _0x58f27b=_0x3ae9c2[_0x2f90fe];if(_0x3498['gMcCPp']===undefined){var _0x12ce67=function(_0x332568){const _0x53e79c='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xf60604='',_0x4a115d='',_0x55e160=_0xf60604+_0x12ce67;for(let _0x8dd6e=0x0,_0x55ee44,_0x90a8bf,_0x2e9334=0x0;_0x90a8bf=_0x332568['charAt'](_0x2e9334++);~_0x90a8bf&&(_0x55ee44=_0x8dd6e%0x4?_0x55ee44*0x40+_0x90a8bf:_0x90a8bf,_0x8dd6e++%0x4)?_0xf60604+=_0x55e160['charCodeAt'](_0x2e9334+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x55ee44>>(-0x2*_0x8dd6e&0x6)):_0x8dd6e:0x0){_0x90a8bf=_0x53e79c['indexOf'](_0x90a8bf);}for(let _0x135980=0x0,_0x26f1ad=_0xf60604['length'];_0x135980<_0x26f1ad;_0x135980++){_0x4a115d+='%'+('00'+_0xf60604['charCodeAt'](_0x135980)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4a115d);};_0x3498['cHAupG']=_0x12ce67,_0x3498['MlhWmh']={},_0x3498['gMcCPp']=!![];}const _0x4a3596=_0x3ae9c2[0x0],_0x3498da=_0x2f90fe+_0x4a3596,_0x2a0570=_0x3498['MlhWmh'][_0x3498da];if(!_0x2a0570){const _0x117b17=function(_0xc34082){this['CkajpS']=_0xc34082,this['BsPTMd']=[0x1,0x0,0x0],this['uCcplt']=function(){return'newState';},this['QasMVd']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['dgpzaN']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x117b17['prototype']['lsjWCE']=function(){const _0xeeccc4=new RegExp(this['QasMVd']+this['dgpzaN']),_0xd83fcf=_0xeeccc4['test'](this['uCcplt']['toString']())?--this['BsPTMd'][0x1]:--this['BsPTMd'][0x0];return this['bGYtXP'](_0xd83fcf);},_0x117b17['prototype']['bGYtXP']=function(_0x350c0c){if(!Boolean(~_0x350c0c))return _0x350c0c;return this['hhCVkU'](this['CkajpS']);},_0x117b17['prototype']['hhCVkU']=function(_0x50c91c){for(let _0xc0ded4=0x0,_0x1ef386=this['BsPTMd']['length'];_0xc0ded4<_0x1ef386;_0xc0ded4++){this['BsPTMd']['push'](Math['round'](Math['random']())),_0x1ef386=this['BsPTMd']['length'];}return _0x50c91c(this['BsPTMd'][0x0]);},new _0x117b17(_0x3498)['lsjWCE'](),_0x58f27b=_0x3498['cHAupG'](_0x58f27b),_0x3498['MlhWmh'][_0x3498da]=_0x58f27b;}else _0x58f27b=_0x2a0570;return _0x58f27b;}export async function updateBrowserSession(_0x39a809,_0x48887f){const _0x5716b9=_0x3498,_0x4d5f86={'eCDUh':function(_0x203be1,_0x4bbbfe,_0x1b91bf,_0x5edcb2){return _0x203be1(_0x4bbbfe,_0x1b91bf,_0x5edcb2);},'LOmOW':_0x5716b9(0x216),'akkmz':_0x5716b9(0x1ee),'XoNwA':function(_0x51ed9c){return _0x51ed9c();},'vlcjS':function(_0x336e69,_0x2a039e,_0x5c4355){return _0x336e69(_0x2a039e,_0x5c4355);},'ppHay':'PATCH','lnxYP':function(_0x39810a,_0x39861e){return _0x39810a!==_0x39861e;},'LHNbs':'cBKSO','jtzCf':function(_0x3b6bb8,_0x4e2e9a,_0x3494db){return _0x3b6bb8(_0x4e2e9a,_0x3494db);},'WnnAo':'updateBrowserSession'};return _0x4d5f86['jtzCf'](withRetry,async()=>{const _0x2fc37b=_0x5716b9,_0x40d1a2=await getToken();if(!_0x40d1a2)throw new Error(_0x4d5f86[_0x2fc37b(0x23f)]);const _0x48a430=_0x4d5f86[_0x2fc37b(0x1ea)](getApiBaseUrl),_0x5e38e9=await _0x4d5f86[_0x2fc37b(0x235)](fetch,_0x48a430+_0x2fc37b(0x25b)+_0x39a809,{'method':_0x4d5f86[_0x2fc37b(0x232)],'headers':{'Authorization':_0x2fc37b(0x260)+_0x40d1a2,'Content-Type':_0x2fc37b(0x246)},'body':JSON[_0x2fc37b(0x238)](_0x48887f)});if(!_0x5e38e9['ok']){if(_0x4d5f86[_0x2fc37b(0x25d)](_0x4d5f86[_0x2fc37b(0x25c)],_0x4d5f86['LHNbs']))return _0x4d5f86['eCDUh'](_0x47bc7c,_0x171794,_0x3df639,_0x4d5f86[_0x2fc37b(0x20d)]);else{const _0x10f760=await _0x5e38e9[_0x2fc37b(0x222)]();throw new Error('Failed\x20to\x20update\x20browser\x20session:\x20'+_0x10f760);}}return _0x5e38e9[_0x2fc37b(0x236)]();},{'label':_0x4d5f86['WnnAo']});}export async function getBrowserSession(_0x14a4dd){const _0x49b621=_0x3498,_0x375d97={'btJWe':_0x49b621(0x1ee),'xLynk':function(_0x43ea8b){return _0x43ea8b();},'BPqVY':'GET'},_0x51e4f7=await getToken();if(!_0x51e4f7)throw new Error(_0x375d97[_0x49b621(0x21c)]);const _0x4562ff=_0x375d97[_0x49b621(0x202)](getApiBaseUrl),_0x88182c=await fetch(_0x4562ff+_0x49b621(0x25b)+_0x14a4dd,{'method':_0x375d97['BPqVY'],'headers':{'Authorization':_0x49b621(0x260)+_0x51e4f7}});if(!_0x88182c['ok']){const _0x33e46=await _0x88182c['text']();throw new Error(_0x49b621(0x20a)+_0x33e46);}return _0x88182c[_0x49b621(0x236)]();}export async function getUploadUrls(_0x5e7acb,_0x338881,_0xb3ea78,_0x436136){const _0x123ec9=_0x3498,_0x244f80={'MPqVk':_0x123ec9(0x1ee),'VYNEK':function(_0x462872){return _0x462872();},'djzPp':function(_0x1f075c,_0x4b79ce,_0x477318){return _0x1f075c(_0x4b79ce,_0x477318);},'hRDsd':_0x123ec9(0x246),'AkacY':function(_0x4434f9,_0x191802){return _0x4434f9!==_0x191802;},'jMYMG':_0x123ec9(0x259)},_0x3914fc=await _0x244f80[_0x123ec9(0x217)](getToken);if(!_0x3914fc)throw new Error(_0x244f80[_0x123ec9(0x1f9)]);const _0x3da762=getApiBaseUrl(),_0x27b535=await _0x244f80[_0x123ec9(0x21b)](fetch,_0x3da762+'/api/v1/mcp/browser-sessions/'+_0x5e7acb+_0x123ec9(0x1ed),{'method':_0x123ec9(0x229),'headers':{'Authorization':_0x123ec9(0x260)+_0x3914fc,'Content-Type':_0x244f80[_0x123ec9(0x1fb)]},'body':JSON[_0x123ec9(0x238)]({'filename':_0x338881,'filetype':_0xb3ea78,..._0x244f80['AkacY'](_0x436136?.[_0x123ec9(0x242)],undefined)&&{'size':_0x436136[_0x123ec9(0x242)]},..._0x436136?.[_0x123ec9(0x1e7)]!==undefined&&{'checksum':_0x436136[_0x123ec9(0x1e7)]},..._0x436136?.[_0x123ec9(0x231)]!==undefined&&{'metadata':_0x436136[_0x123ec9(0x231)]}})});if(!_0x27b535['ok']){if(_0x123ec9(0x20e)!==_0x244f80[_0x123ec9(0x1f3)]){const _0x578396=await _0x27b535['text']();throw new Error('Failed\x20to\x20get\x20upload\x20URLs:\x20'+_0x578396);}else throw new _0x21d13b(_0x244f80[_0x123ec9(0x1f9)]);}return _0x27b535['json']();}export async function uploadFile(_0x2a99f6,_0x4bfcd1,_0xd3b462){const _0x4b6cdd=_0x3498,_0x1a2ada={'QNPoK':function(_0x2efb99,_0x190427,_0xab03bc){return _0x2efb99(_0x190427,_0xab03bc);}},_0x72e11e=await _0x1a2ada['QNPoK'](fetch,_0x2a99f6,{'method':_0x4b6cdd(0x1f5),'headers':{'Content-Type':_0xd3b462,'Content-Length':_0x4bfcd1[_0x4b6cdd(0x21e)][_0x4b6cdd(0x21f)]()},'body':_0x4bfcd1});if(!_0x72e11e['ok']){const _0x4131b0=await _0x72e11e[_0x4b6cdd(0x222)]();throw new Error(_0x4b6cdd(0x1f0)+_0x4131b0);}}export async function uploadTrace(_0x48e58f,_0x3c9ac2){const _0x43b413=_0x3498,_0x4606cc={'oUZMN':function(_0x2b6676,_0x2326e4,_0x444dec,_0x3ba510){return _0x2b6676(_0x2326e4,_0x444dec,_0x3ba510);},'JBnGU':_0x43b413(0x218)};return _0x4606cc[_0x43b413(0x200)](uploadFile,_0x48e58f,_0x3c9ac2,_0x4606cc[_0x43b413(0x201)]);}export async function uploadConversation(_0x2672cd,_0x23b6dd){const _0x11d026={'zjtmg':function(_0x4fc4ad,_0xe9cd38,_0x153e52,_0x5721d7){return _0x4fc4ad(_0xe9cd38,_0x153e52,_0x5721d7);},'inGhQ':'application/jsonl'};return _0x11d026['zjtmg'](uploadFile,_0x2672cd,_0x23b6dd,_0x11d026['inGhQ']);}export async function uploadScreenshot(_0x21d64b,_0x3780b7){const _0x2f8547=_0x3498,_0x51e201={'XZitw':_0x2f8547(0x216)};return uploadFile(_0x21d64b,_0x3780b7,_0x51e201[_0x2f8547(0x230)]);}export async function uploadVideo(_0x289c68,_0x5ef990){const _0xa95186=_0x3498,_0x18d86e={'fBxWR':function(_0x563fc0,_0x22f6e8,_0x392026,_0x42f816){return _0x563fc0(_0x22f6e8,_0x392026,_0x42f816);}};return _0x18d86e[_0xa95186(0x225)](uploadFile,_0x289c68,_0x5ef990,'video/webm');}export function buildTraceViewerUrl(_0x3e4446){const _0x3147fa=_0x3498,_0x1dd017={'FKkqS':function(_0x6d727b,_0x4a386d){return _0x6d727b(_0x4a386d);}},_0x1686d1=_0x1dd017[_0x3147fa(0x251)](encodeURIComponent,_0x3e4446);return _0x3147fa(0x20b)+_0x1686d1;}export async function getProxySessionToken(){const _0x27d89a=_0x3498,_0x312232={'GzRie':_0x27d89a(0x248),'ekmLd':function(_0x1206c0){return _0x1206c0();},'fnlXp':_0x27d89a(0x229),'laFGc':function(_0x3b1271,_0x45adde){return _0x3b1271===_0x45adde;},'kigeh':'xlZVE','VWOEK':_0x27d89a(0x1f8)},_0x4e42c0=await getToken();if(!_0x4e42c0)throw new Error(_0x27d89a(0x1ee));const _0x166d9e=_0x312232[_0x27d89a(0x1ef)](getApiBaseUrl),_0x3c9e56=await fetch(_0x166d9e+'/api/v1/mcp/proxy-session',{'method':_0x312232[_0x27d89a(0x207)],'headers':{'Authorization':_0x27d89a(0x260)+_0x4e42c0}});if(!_0x3c9e56['ok']){if(_0x312232['laFGc'](_0x312232[_0x27d89a(0x254)],_0x312232['VWOEK']))return _0x4dc1ea(_0x6ee9c1,_0x1153d9,_0x312232['GzRie']);else{const _0x5e1c6b=await _0x3c9e56['text']();throw new Error('Failed\x20to\x20get\x20proxy\x20session\x20token:\x20'+_0x5e1c6b);}}const _0x57a1d0=await _0x3c9e56[_0x27d89a(0x236)]();return _0x57a1d0['sessionToken'];}export function computeChecksum(_0xaabf4c){const _0x12ff52=_0x3498,_0x311bf9={'kALFp':function(_0x272975,_0x4838dc){return _0x272975(_0x4838dc);},'iekrQ':'base64'};return _0x311bf9['kALFp'](createHash,_0x12ff52(0x1ec))[_0x12ff52(0x20f)](_0xaabf4c)[_0x12ff52(0x258)](_0x311bf9[_0x12ff52(0x25e)]);}export async function createVerificationStep(_0x16287b,_0x134a07){const _0x34d2cd=_0x3498,_0x43b37d={'thGsO':_0x34d2cd(0x1ee),'zqMNU':function(_0x2a3e51,_0x464ba5,_0x179b41){return _0x2a3e51(_0x464ba5,_0x179b41);},'nvvNw':_0x34d2cd(0x246)},_0x434bfc=await getToken();if(!_0x434bfc)throw new Error(_0x43b37d[_0x34d2cd(0x23d)]);const _0x4ef831=getApiBaseUrl(),_0x1dc0ab=await _0x43b37d['zqMNU'](fetch,_0x4ef831+_0x34d2cd(0x25b)+_0x16287b+_0x34d2cd(0x23c),{'method':_0x34d2cd(0x229),'headers':{'Authorization':_0x34d2cd(0x260)+_0x434bfc,'Content-Type':_0x43b37d[_0x34d2cd(0x210)]},'body':JSON[_0x34d2cd(0x238)](_0x134a07)});if(!_0x1dc0ab['ok']){const _0x4fdfcb=await _0x1dc0ab[_0x34d2cd(0x222)]();throw new Error('Failed\x20to\x20create\x20verification\x20step:\x20'+_0x4fdfcb);}return _0x1dc0ab[_0x34d2cd(0x236)]();}export async function createStepAsset(_0x4c0ffb,_0x52222c,_0x57afc6){const _0x4f7801=_0x3498,_0x124f3b={'JlrBl':_0x4f7801(0x1ee),'vNxmS':function(_0x45f743,_0x516106){return _0x45f743(_0x516106);},'DvolC':function(_0x5714cf,_0xac1476){return _0x5714cf===_0xac1476;},'FmAqP':_0x4f7801(0x1eb),'nmcbY':_0x4f7801(0x1f2),'Iepmk':function(_0x3b9377){return _0x3b9377();},'yIVBi':function(_0x1e6f65,_0x4b9975,_0x5e954b){return _0x1e6f65(_0x4b9975,_0x5e954b);},'FMmjN':_0x4f7801(0x229),'ZIPmi':_0x4f7801(0x246),'ViRUL':_0x4f7801(0x228)},_0x4150f7=await getToken();if(!_0x4150f7){if(_0x124f3b[_0x4f7801(0x1f4)](_0x124f3b['FmAqP'],_0x124f3b[_0x4f7801(0x24e)]))throw new _0x1e1a71(_0x124f3b['JlrBl']);else throw new Error(_0x124f3b[_0x4f7801(0x23a)]);}const _0x415241=_0x124f3b[_0x4f7801(0x22c)](getApiBaseUrl),_0x2f54be=await _0x124f3b[_0x4f7801(0x22b)](fetch,_0x415241+_0x4f7801(0x25b)+_0x4c0ffb+_0x4f7801(0x205)+_0x52222c+_0x4f7801(0x211),{'method':_0x124f3b[_0x4f7801(0x256)],'headers':{'Authorization':_0x4f7801(0x260)+_0x4150f7,'Content-Type':_0x124f3b[_0x4f7801(0x1e9)]},'body':JSON[_0x4f7801(0x238)](_0x57afc6)});if(!_0x2f54be['ok']){if(_0x124f3b[_0x4f7801(0x1f4)](_0x124f3b['ViRUL'],_0x124f3b[_0x4f7801(0x243)])){const _0x4c643e=await _0x2f54be[_0x4f7801(0x222)]();throw new Error(_0x4f7801(0x1f6)+_0x4c643e);}else{const _0x4b8615=_0x124f3b['vNxmS'](_0x31e69e,_0xc9b441);return _0x4f7801(0x20b)+_0x4b8615;}}return _0x2f54be[_0x4f7801(0x236)]();}export async function updateVerificationStep(_0x42d5ac,_0x5ee6e8,_0xf5adfb){const _0x691df8=_0x3498,_0x4d29c1={'pbpED':function(_0x2fb8be){return _0x2fb8be();},'Vtxke':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','JzPAT':function(_0x27288f,_0x16cb46,_0x239146){return _0x27288f(_0x16cb46,_0x239146);},'YrrBk':_0x691df8(0x21a)},_0x205395=await _0x4d29c1[_0x691df8(0x252)](getToken);if(!_0x205395)throw new Error(_0x4d29c1[_0x691df8(0x220)]);const _0x42dd80=getApiBaseUrl(),_0x2babcb=await _0x4d29c1[_0x691df8(0x208)](fetch,_0x42dd80+_0x691df8(0x25b)+_0x42d5ac+'/steps/'+_0x5ee6e8,{'method':_0x4d29c1[_0x691df8(0x1fc)],'headers':{'Authorization':_0x691df8(0x260)+_0x205395,'Content-Type':_0x691df8(0x246)},'body':JSON[_0x691df8(0x238)](_0xf5adfb)});if(!_0x2babcb['ok']){const _0x37a101=await _0x2babcb[_0x691df8(0x222)]();throw new Error('Failed\x20to\x20update\x20verification\x20step:\x20'+_0x37a101);}}function _0x4a35(){const _0x2c635f=['mZyYnta4nLDxsMDZCW','BM1JyLK','mte3nZGXng9qz01swG','n0D1tK1XDW','rKTRCvm','CgjWruq','Ewnov0S','A2LNzwG','Bvvbwe0','rK1TAK4','EgnWy3O','zgLNzxn0','Bfj6z3G','BwT3z0O','l2fWAs92ms9Ty3aVyNjVD3nLCI1ZzxnZAw9UCY8','teHoyNm','Bg54wva','AwvRCLe','zurOz2m','qMvHCMvYia','y2HLy2TZDw0','vLHysNC','wKLqBwK','wg9oD0e','tejbs3K','Bwq1','l3vWBg9Hzc11CMXZ','tM8GqvbjihrVA2vUignVBMzPz3vYzwqUifj1BJOGCMfUz2vYihnLDhvWifT0B2TLBL0','zwTTtgq','rMfPBgvKihrVihvWBg9HzcbMAwXLoIa','mZqXmZuWugXbDvLS','wLvlCe4','AK1ztuC','rhzVBem','ufvu','rMfPBgvKihrVignYzwf0zsbZDgvWigfZC2v0oIa','uvHxtKm','tLn3AvO','tvbXvMS','n05ivgHYzW','AfjeC2q','wxjYqMS','otb0zfvnALC','sgrHtw4','DgPhqNi','B1vAtu4','sKjUr1u','EeX5BMS','B2THrfq','rMfPBgvKihrVignYzwf0zsbICM93C2vYihnLC3nPB246ia','l3n0zxbZlW','sK56q1O','zM5Swha','sNPqqvq','mtKZodCWrNz1zvzi','rMfPBgvKihrVigDLDcbICM93C2vYihnLC3nPB246ia','Ahr0Chm6lY90CMfJzs5WBgf5D3jPz2H0lMrLDI8/DhjHy2u9','y2HLy2TSAxn0sxrLBuLK','te9Tt1C','wfrkwhm','DxbKyxrL','BNz2tNC','l2fZC2v0CW','tg5OCe0','A0z4Afi','rKnwtMO','C0Ltt2G','Aw1Hz2uVCg5N','vLLoruS','yxbWBgLJyxrPB24VEMLW','C2ngt0W','uefuq0G','zgP6uha','yNrkv2u','sgvxCK0','BgvUz3rO','Dg9tDhjPBMC','vNr4A2u','zMvHDhvYzuLK','Dgv4Da','mZmZmZiYmNn4tunmDG','ndK3nZK2mef4AfHXEq','zKj4v1i','l2fWAs92ms9Ty3aVyNjVD3nLCI1ZzxnZAw9UCW','C2vHCMnO','wLD4rgm','ue9tva','qMPIEvG','EuLwqMK','swvWBwS','DgfZAW','EeT0sLK','shrryvC','wfPPDhC','Bwv0ywrHDge','ChbiyxK','wenVAuS','ufPoDhO','DMXJALm','ANnVBG','Axv1BKG','C3rYAw5NAwz5','oduXntC2rMv2y2Hw','sMXYqMW','CNzdy1O','l3n0zxbZ','DgHhC08','yxbWBhK','ywTRBxO','Bezcqxu','kcGOlISPkYKRksSK','C2L6zq','vMLsvuW','rMfPBgvKihrVigDLDcbICM93C2vYihnLC3nPB24GC3rLChm6ia','yMfZzty0','yxbWBgLJyxrPB24VANnVBG','DxjS','DMLKzw8VD2vIBq','rMXnywe','C0nRy1m','mti0ru1my21q','re5guuy'];_0x4a35=function(){return _0x2c635f;};return _0x4a35();}export async function getBrowserSessionSteps(_0x16f1f5){const _0x590db8=_0x3498,_0x43f7fe={'sISOh':function(_0x1ccab4,_0x32aecc){return _0x1ccab4(_0x32aecc);},'QXWNC':_0x590db8(0x245),'FCVNj':function(_0xa46bca){return _0xa46bca();},'JeUmX':function(_0x4af24b,_0x55cc0f){return _0x4af24b===_0x55cc0f;},'DNFQF':_0x590db8(0x255),'HeWrM':function(_0x5bc492,_0x3e9072,_0x1da8a9){return _0x5bc492(_0x3e9072,_0x1da8a9);},'HtQaW':'GET'},_0x320e88=await _0x43f7fe[_0x590db8(0x214)](getToken);if(!_0x320e88){if(_0x43f7fe['JeUmX'](_0x590db8(0x255),_0x43f7fe[_0x590db8(0x24c)]))throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');else return _0x43f7fe[_0x590db8(0x215)](_0x360ee8,_0x590db8(0x1ec))[_0x590db8(0x20f)](_0x2c6b24)[_0x590db8(0x258)](_0x43f7fe[_0x590db8(0x1f7)]);}const _0x2a1354=getApiBaseUrl(),_0x4e3a88=await _0x43f7fe[_0x590db8(0x21d)](fetch,_0x2a1354+_0x590db8(0x25b)+_0x16f1f5+_0x590db8(0x23c),{'method':_0x43f7fe[_0x590db8(0x22f)],'headers':{'Authorization':_0x590db8(0x260)+_0x320e88}});if(!_0x4e3a88['ok']){const _0x65ba06=await _0x4e3a88[_0x590db8(0x222)]();throw new Error(_0x590db8(0x244)+_0x65ba06);}return _0x4e3a88[_0x590db8(0x236)]();}
@@ -1 +1 @@
1
- function _0x1c13(){const _0x1ff1d0=['yOBEV','VHsOX','Exdpq','cwd','4095744PcypIh','.claude','KkisL','8017137dtsDVP','108489WvaAYr','utf-8','ofNjs','77HVlVfB','5250310NWTIyq','user','ranger','4CjvUGj','settings.json','parse','16AVMuir','mcpServers','4989761wevZpt','368110eVMDqh','3996711hkOQIw','18KilncI','FUImK','root','CLAUDE_CONFIG_DIR','env','lzIDu'];_0x1c13=function(){return _0x1ff1d0;};return _0x1c13();}(function(_0x29f60b,_0xced9e0){const _0xdc0296=_0x5351,_0x12218a=_0x29f60b();while(!![]){try{const _0x2c14c4=parseInt(_0xdc0296(0x111))/0x1*(-parseInt(_0xdc0296(0x103))/0x2)+-parseInt(_0xdc0296(0x102))/0x3*(-parseInt(_0xdc0296(0xfb))/0x4)+-parseInt(_0xdc0296(0xf8))/0x5+parseInt(_0xdc0296(0x10d))/0x6+parseInt(_0xdc0296(0x100))/0x7*(parseInt(_0xdc0296(0xfe))/0x8)+-parseInt(_0xdc0296(0x110))/0x9+parseInt(_0xdc0296(0x101))/0xa*(parseInt(_0xdc0296(0xf7))/0xb);if(_0x2c14c4===_0xced9e0)break;else _0x12218a['push'](_0x12218a['shift']());}catch(_0x29d064){_0x12218a['push'](_0x12218a['shift']());}}}(_0x1c13,0xbea80));import{homedir}from'os';import{join,dirname,parse}from'path';function _0x5351(_0x349cd5,_0x481e9e){_0x349cd5=_0x349cd5-0xf6;const _0x1c13b5=_0x1c13();let _0x53512c=_0x1c13b5[_0x349cd5];return _0x53512c;}import{existsSync}from'fs';import{readFile,writeFile,mkdir}from'fs/promises';export function getClaudeConfigDir(){const _0x39c9ac=_0x5351,_0xf39e21={'oDLeG':function(_0x578313,_0x38166b,_0x3bacb8){return _0x578313(_0x38166b,_0x3bacb8);}};return process[_0x39c9ac(0x107)][_0x39c9ac(0x106)]||_0xf39e21['oDLeG'](join,homedir(),'.claude');}export function getUserSkillsDir(){const _0x4853c3=_0x5351,_0x1ed77b={'Exdpq':function(_0x54a775,_0x44a1f5,_0x43326d){return _0x54a775(_0x44a1f5,_0x43326d);},'JpqxT':'skills'};return _0x1ed77b[_0x4853c3(0x10b)](join,getClaudeConfigDir(),_0x1ed77b['JpqxT']);}export function getProjectRoot(){const _0x5dfb28=_0x5351,_0x1d9f2c={'VHsOX':function(_0x3739d5,_0x52f9dd){return _0x3739d5!==_0x52f9dd;},'ofNjs':function(_0x12e409,_0x1a47bd,_0xd718f2){return _0x12e409(_0x1a47bd,_0xd718f2);},'KkisL':_0x5dfb28(0x10e),'WICrx':function(_0x26e229,_0xa77a9e){return _0x26e229(_0xa77a9e);}};let _0x258f06=process['cwd']();const _0x37ebec=parse(_0x258f06)[_0x5dfb28(0x105)];while(_0x1d9f2c[_0x5dfb28(0x10a)](_0x258f06,_0x37ebec)){if(existsSync(_0x1d9f2c['ofNjs'](join,_0x258f06,_0x1d9f2c[_0x5dfb28(0x10f)])))return _0x258f06;if(existsSync(_0x1d9f2c[_0x5dfb28(0xf6)](join,_0x258f06,'.git')))return _0x258f06;_0x258f06=_0x1d9f2c['WICrx'](dirname,_0x258f06);}return process[_0x5dfb28(0x10c)]();}export function getProjectSkillsDir(){const _0x460698=_0x5351,_0x592ef5={'iFpqN':function(_0x26e998){return _0x26e998();},'mwrVO':_0x460698(0x10e),'fzWJJ':'skills'};return join(_0x592ef5['iFpqN'](getProjectRoot),_0x592ef5['mwrVO'],_0x592ef5['fzWJJ']);}export function getSkillsDir(_0x2a3bed){const _0xdada4e=_0x5351,_0x1742da={'Yyxpy':function(_0xdfef83){return _0xdfef83();},'SgvNQ':function(_0x358e33){return _0x358e33();}};return _0x2a3bed===_0xdada4e(0xf9)?_0x1742da['Yyxpy'](getUserSkillsDir):_0x1742da['SgvNQ'](getProjectSkillsDir);}export function getSettingsPath(){const _0x4eeffc=_0x5351,_0x8c6778={'yOBEV':function(_0x63a913,_0x2d4149,_0x3fe47a){return _0x63a913(_0x2d4149,_0x3fe47a);},'nlUaW':_0x4eeffc(0xfc)};return _0x8c6778[_0x4eeffc(0x109)](join,getClaudeConfigDir(),_0x8c6778['nlUaW']);}export async function loadClaudeSettings(){const _0x896d0=_0x5351,_0x4538c8=getSettingsPath();if(!existsSync(_0x4538c8))return{};try{const _0x5e25ee=await readFile(_0x4538c8,_0x896d0(0x112));return JSON[_0x896d0(0xfd)](_0x5e25ee);}catch{return{};}}export async function saveClaudeSettings(_0x1ea48f){const _0x5e6556=_0x5351,_0x697395={'FUImK':function(_0x49ba5c){return _0x49ba5c();},'sHInV':function(_0x363c36,_0x2531f0){return _0x363c36+_0x2531f0;},'lzIDu':'utf-8'},_0x4c8c52=getSettingsPath(),_0x477bea=_0x697395[_0x5e6556(0x104)](getClaudeConfigDir);!existsSync(_0x477bea)&&await mkdir(_0x477bea,{'recursive':!![]}),await writeFile(_0x4c8c52,_0x697395['sHInV'](JSON['stringify'](_0x1ea48f,null,0x2),'\x0a'),_0x697395[_0x5e6556(0x108)]);}export function hasRangerServerInSettings(_0x4590b1){const _0x33cffe=_0x5351,_0x44c158={'FERAv':_0x33cffe(0xfa)};return _0x4590b1['mcpServers']?.[_0x44c158['FERAv']]!==undefined;}export function setRangerServerInSettings(_0xca7c7e){const _0x124ec2=_0x5351,_0x1829ae={'qFBGh':'@ranger-testing/ranger-cli','ETjlk':'data-mcp-server'};!_0xca7c7e[_0x124ec2(0xff)]&&(_0xca7c7e['mcpServers']={}),_0xca7c7e['mcpServers'][_0x124ec2(0xfa)]={'command':'npx','args':[_0x1829ae['qFBGh'],_0x1829ae['ETjlk']]};}
1
+ function _0x4915(_0x48ec83,_0x1192f2){_0x48ec83=_0x48ec83-0xd0;const _0x36563e=_0x3656();let _0x4915b6=_0x36563e[_0x48ec83];return _0x4915b6;}function _0x3656(){const _0x4aa7a5=['1091701HajABh','9eYGBTS','nkCKy','parse','5ZLdKbu','XFjCx','2099218AbWvcZ','3000651AKGAUQ','uJoIl','env','PQTPk','288348dEreoq','ranger','cwd','pjbNj','RTabu','226093KKceIb','.git','kHzQm','pGMmW','ELaFi','XHrmX','6145928EqGfKC','grWBK','253ZSNSYk','zNofW','settings.json','425230HGQrsa','npx','.claude','6WHkFFv'];_0x3656=function(){return _0x4aa7a5;};return _0x3656();}(function(_0x2d7a15,_0x138a7b){const _0x120468=_0x4915,_0x17827f=_0x2d7a15();while(!![]){try{const _0x55852f=-parseInt(_0x120468(0xd1))/0x1+parseInt(_0x120468(0xd7))/0x2+parseInt(_0x120468(0xd8))/0x3+parseInt(_0x120468(0xdc))/0x4*(-parseInt(_0x120468(0xd5))/0x5)+parseInt(_0x120468(0xd0))/0x6*(parseInt(_0x120468(0xe1))/0x7)+-parseInt(_0x120468(0xe7))/0x8*(-parseInt(_0x120468(0xd2))/0x9)+parseInt(_0x120468(0xec))/0xa*(-parseInt(_0x120468(0xe9))/0xb);if(_0x55852f===_0x138a7b)break;else _0x17827f['push'](_0x17827f['shift']());}catch(_0x59c803){_0x17827f['push'](_0x17827f['shift']());}}}(_0x3656,0xacfc5));import{homedir}from'os';import{join,dirname,parse}from'path';import{existsSync}from'fs';import{readFile,writeFile,mkdir}from'fs/promises';export function getClaudeConfigDir(){const _0x2105f9=_0x4915,_0x538e21={'uJoIl':'.claude'};return process[_0x2105f9(0xda)]['CLAUDE_CONFIG_DIR']||join(homedir(),_0x538e21[_0x2105f9(0xd9)]);}export function getUserSkillsDir(){return join(getClaudeConfigDir(),'skills');}export function getProjectRoot(){const _0x95b745=_0x4915,_0x23bb90={'glOjV':function(_0x2b3783,_0x1c8b4e){return _0x2b3783(_0x1c8b4e);},'PQTPk':_0x95b745(0xe2)};let _0xd09c8d=process[_0x95b745(0xde)]();const _0x9d3d1f=_0x23bb90['glOjV'](parse,_0xd09c8d)['root'];while(_0xd09c8d!==_0x9d3d1f){if(existsSync(join(_0xd09c8d,_0x95b745(0xee))))return _0xd09c8d;if(existsSync(join(_0xd09c8d,_0x23bb90[_0x95b745(0xdb)])))return _0xd09c8d;_0xd09c8d=dirname(_0xd09c8d);}return process['cwd']();}export function getProjectSkillsDir(){const _0x6fd7e9=_0x4915,_0x45a08f={'ELaFi':function(_0x194065){return _0x194065();},'nkCKy':'.claude','bRDME':'skills'};return join(_0x45a08f[_0x6fd7e9(0xe5)](getProjectRoot),_0x45a08f[_0x6fd7e9(0xd3)],_0x45a08f['bRDME']);}export function getSkillsDir(_0x141daa){const _0x10714f=_0x4915,_0x1fd249={'XHrmX':function(_0x3a8396,_0x2dce36){return _0x3a8396===_0x2dce36;},'grWBK':function(_0x68187f){return _0x68187f();}};return _0x1fd249[_0x10714f(0xe6)](_0x141daa,'user')?getUserSkillsDir():_0x1fd249[_0x10714f(0xe8)](getProjectSkillsDir);}export function getSettingsPath(){const _0x45fd1a=_0x4915,_0x2eb4a7={'pjbNj':function(_0x464455,_0x28d8a4,_0x702cac){return _0x464455(_0x28d8a4,_0x702cac);},'pGMmW':function(_0x6d59a5){return _0x6d59a5();},'kHzQm':_0x45fd1a(0xeb)};return _0x2eb4a7[_0x45fd1a(0xdf)](join,_0x2eb4a7[_0x45fd1a(0xe4)](getClaudeConfigDir),_0x2eb4a7[_0x45fd1a(0xe3)]);}export async function loadClaudeSettings(){const _0x58d323=_0x4915,_0x429d45=getSettingsPath();if(!existsSync(_0x429d45))return{};try{const _0x2d58b6=await readFile(_0x429d45,'utf-8');return JSON[_0x58d323(0xd4)](_0x2d58b6);}catch{return{};}}export async function saveClaudeSettings(_0x4e351c){const _0x2dbaf7=_0x4915,_0x277783={'XFjCx':function(_0x5a864e){return _0x5a864e();},'RTabu':function(_0x1f65da,_0x1e1c3c){return _0x1f65da(_0x1e1c3c);},'VrWcA':function(_0x2cb032,_0x323f0e,_0x321e10,_0x3c5621){return _0x2cb032(_0x323f0e,_0x321e10,_0x3c5621);},'uVgCX':function(_0x34d506,_0x183ece){return _0x34d506+_0x183ece;}},_0x1923c4=getSettingsPath(),_0x170e26=_0x277783[_0x2dbaf7(0xd6)](getClaudeConfigDir);!_0x277783[_0x2dbaf7(0xe0)](existsSync,_0x170e26)&&await mkdir(_0x170e26,{'recursive':!![]}),await _0x277783['VrWcA'](writeFile,_0x1923c4,_0x277783['uVgCX'](JSON['stringify'](_0x4e351c,null,0x2),'\x0a'),'utf-8');}export function hasRangerServerInSettings(_0x46f33f){const _0x4bbde8=_0x4915,_0x59e337={'bRDMX':function(_0x54fee0,_0x4ab212){return _0x54fee0!==_0x4ab212;}};return _0x59e337['bRDMX'](_0x46f33f['mcpServers']?.[_0x4bbde8(0xdd)],undefined);}export function setRangerServerInSettings(_0xf29116){const _0x2ffd76=_0x4915,_0x2c9710={'mvMql':'@ranger-testing/ranger-cli','zNofW':'data-mcp-server'};!_0xf29116['mcpServers']&&(_0xf29116['mcpServers']={}),_0xf29116['mcpServers'][_0x2ffd76(0xdd)]={'command':_0x2ffd76(0xed),'args':[_0x2c9710['mvMql'],_0x2c9710[_0x2ffd76(0xea)]]};}
@@ -1 +1 @@
1
- (function(_0x180fa4,_0x3a8dd0){const _0x3e8ff3=_0xced6,_0x3044b7=_0x180fa4();while(!![]){try{const _0x1c118b=parseInt(_0x3e8ff3(0x11a))/0x1*(-parseInt(_0x3e8ff3(0x120))/0x2)+parseInt(_0x3e8ff3(0x12b))/0x3*(-parseInt(_0x3e8ff3(0x121))/0x4)+parseInt(_0x3e8ff3(0x125))/0x5+parseInt(_0x3e8ff3(0x13b))/0x6+parseInt(_0x3e8ff3(0x12f))/0x7*(parseInt(_0x3e8ff3(0x136))/0x8)+-parseInt(_0x3e8ff3(0x11d))/0x9*(parseInt(_0x3e8ff3(0x133))/0xa)+-parseInt(_0x3e8ff3(0x119))/0xb*(parseInt(_0x3e8ff3(0x12a))/0xc);if(_0x1c118b===_0x3a8dd0)break;else _0x3044b7['push'](_0x3044b7['shift']());}catch(_0x48d4c5){_0x3044b7['push'](_0x3044b7['shift']());}}}(_0x418b,0xa6c6e));function _0x418b(){const _0x9817b1=['268XxXLJV','scope','claude','captureOutput','5275335dDfxYi','jAqKl','NJBcf','enabled','cCmSn','1224VPdqFf','10398DbrMJj','match','[\x5cs\x5cS]*?Version:\x5cs*([\x5cd.]+)','toString','308IRKHpN','DswOI','ltjYH','plugin','1270wtNWou','inherit','Command\x20exited\x20with\x20code\x20','234264ovECug','stdout','HTNbg','[\x5cs\x5cS]*?(enabled|disabled)','orQXG','1949016uZOSda','pipe','error','marketplace','success','includes','data','53735OcuSnD','3UDqKoC','message','version','44883KFHxGU','stderr','output','414264WHvlBk'];_0x418b=function(){return _0x9817b1;};return _0x418b();}import{spawn}from'child_process';export function runClaudeCommand(_0x4c78ce,_0x4ce6f3){const _0x1011e9=_0xced6,_0x559771={'gQyxX':function(_0x23a38e,_0x283200){return _0x23a38e(_0x283200);},'jAqKl':_0x1011e9(0x13c),'NJBcf':_0x1011e9(0x134),'ltjYH':_0x1011e9(0x118),'UTSBG':_0x1011e9(0x13d)};return new Promise(_0x28dc8d=>{const _0x278226=_0x1011e9,_0xdab747={'UluxX':function(_0x43337c,_0x36ac6c){return _0x43337c===_0x36ac6c;}},_0x3c6ce0=_0x4ce6f3?.[_0x278226(0x124)]?_0x559771[_0x278226(0x126)]:_0x559771[_0x278226(0x127)],_0x24baf1=spawn(_0x278226(0x123),_0x4c78ce,{'stdio':_0x3c6ce0});let _0x4aefe6='';_0x4ce6f3?.['captureOutput']&&_0x24baf1[_0x278226(0x137)]&&_0x24baf1[_0x278226(0x137)]['on'](_0x559771[_0x278226(0x131)],_0x59a76a=>{const _0x5099a0=_0x278226;_0x4aefe6+=_0x59a76a[_0x5099a0(0x12e)]();}),_0x4ce6f3?.['captureOutput']&&_0x24baf1['stderr']&&_0x24baf1[_0x278226(0x11e)]['on'](_0x559771[_0x278226(0x131)],_0x5ad2ef=>{_0x4aefe6+=_0x5ad2ef['toString']();}),_0x24baf1['on']('close',_0x1f8ac4=>{const _0x2be52f=_0x278226;_0xdab747['UluxX'](_0x1f8ac4,0x0)?_0x28dc8d({'success':!![],'output':_0x4aefe6}):_0x28dc8d({'success':![],'error':_0x2be52f(0x135)+_0x1f8ac4,'output':_0x4aefe6});}),_0x24baf1['on'](_0x559771['UTSBG'],_0x3fa7d3=>{const _0x14d332=_0x278226;_0x559771['gQyxX'](_0x28dc8d,{'success':![],'error':_0x3fa7d3[_0x14d332(0x11b)]});});});}function _0xced6(_0x18b207,_0x59f0cf){_0x18b207=_0x18b207-0x116;const _0x418b20=_0x418b();let _0xced6ac=_0x418b20[_0x18b207];return _0xced6ac;}export async function isMarketplaceAdded(_0x2881ab){const _0xf5655=_0xced6,_0x564b80={'orQXG':function(_0x5f1947,_0x1b97dd,_0x59f590){return _0x5f1947(_0x1b97dd,_0x59f590);},'HTNbg':_0xf5655(0x132)},_0xfc47f=await _0x564b80[_0xf5655(0x13a)](runClaudeCommand,[_0x564b80[_0xf5655(0x138)],_0xf5655(0x13e),'list'],{'captureOutput':!![]});if(!_0xfc47f['success']||!_0xfc47f['output'])return![];return _0xfc47f['output']['includes'](_0x2881ab);}export async function isPluginInstalled(_0x5d13ab){const _0x44ee7b=_0xced6,_0x33cb92={'uFsVa':'list'},_0x235bdb=await runClaudeCommand([_0x44ee7b(0x132),_0x33cb92['uFsVa']],{'captureOutput':!![]});if(!_0x235bdb['success']||!_0x235bdb['output'])return![];return _0x235bdb['output'][_0x44ee7b(0x117)](_0x5d13ab);}export async function getPluginInfo(_0xbc1574){const _0x533e06=_0xced6,_0x3ce614={'cCmSn':function(_0x283435,_0x616a45,_0x5b2df6){return _0x283435(_0x616a45,_0x5b2df6);},'KWbbD':'plugin','DswOI':'list','pLDEb':function(_0x466e63,_0xacaa02){return _0x466e63===_0xacaa02;}},_0x192aaa=await _0x3ce614[_0x533e06(0x129)](runClaudeCommand,[_0x3ce614['KWbbD'],_0x3ce614[_0x533e06(0x130)]],{'captureOutput':!![]});if(!_0x192aaa[_0x533e06(0x116)]||!_0x192aaa['output'])return null;if(!_0x192aaa['output'][_0x533e06(0x117)](_0xbc1574))return null;const _0x3ad30c={'name':_0xbc1574},_0x4f993b=_0x192aaa[_0x533e06(0x11f)][_0x533e06(0x12c)](new RegExp(_0xbc1574+'[\x5cs\x5cS]*?Scope:\x5cs*(user|project|local)','i'));_0x4f993b&&(_0x3ad30c[_0x533e06(0x122)]=_0x4f993b[0x1]['toLowerCase']());const _0x5792a6=_0x192aaa['output']['match'](new RegExp(_0xbc1574+_0x533e06(0x12d),'i'));_0x5792a6&&(_0x3ad30c[_0x533e06(0x11c)]=_0x5792a6[0x1]);const _0x3222bd=_0x192aaa['output']['match'](new RegExp(_0xbc1574+_0x533e06(0x139),'i'));return _0x3222bd&&(_0x3ad30c[_0x533e06(0x128)]=_0x3ce614['pLDEb'](_0x3222bd[0x1]['toLowerCase'](),'enabled')),_0x3ad30c;}
1
+ (function(_0x165c6a,_0x35f49c){const _0x51f5c1=_0x16e1,_0x2a80cd=_0x165c6a();while(!![]){try{const _0x7de53f=-parseInt(_0x51f5c1(0x17c))/0x1*(parseInt(_0x51f5c1(0x18c))/0x2)+-parseInt(_0x51f5c1(0x17d))/0x3*(-parseInt(_0x51f5c1(0x183))/0x4)+-parseInt(_0x51f5c1(0x17e))/0x5*(parseInt(_0x51f5c1(0x187))/0x6)+parseInt(_0x51f5c1(0x185))/0x7+parseInt(_0x51f5c1(0x170))/0x8+parseInt(_0x51f5c1(0x17f))/0x9+-parseInt(_0x51f5c1(0x18a))/0xa;if(_0x7de53f===_0x35f49c)break;else _0x2a80cd['push'](_0x2a80cd['shift']());}catch(_0x318322){_0x2a80cd['push'](_0x2a80cd['shift']());}}}(_0x3116,0xdefa6));import{spawn}from'child_process';export function runClaudeCommand(_0x39e80a,_0x592662){const _0xbd44a8=_0x16e1,_0x371ad9={'VbQFF':function(_0x25b749,_0x3e0625){return _0x25b749===_0x3e0625;},'UoZgB':_0xbd44a8(0x176),'lgqNU':function(_0x446624,_0x286e5f,_0x9caa6,_0x3d56af){return _0x446624(_0x286e5f,_0x9caa6,_0x3d56af);},'GkapF':'claude','tIZTO':_0xbd44a8(0x179),'TgezH':'close','ydybP':'error'};return new Promise(_0x4182bc=>{const _0x58c1ab=_0xbd44a8,_0x74b5bd=_0x592662?.[_0x58c1ab(0x17b)]?'pipe':_0x371ad9[_0x58c1ab(0x18d)],_0x2e7704=_0x371ad9['lgqNU'](spawn,_0x371ad9['GkapF'],_0x39e80a,{'stdio':_0x74b5bd});let _0x12db3c='';_0x592662?.[_0x58c1ab(0x17b)]&&_0x2e7704[_0x58c1ab(0x184)]&&_0x2e7704['stdout']['on'](_0x371ad9[_0x58c1ab(0x18b)],_0x591ee9=>{const _0x37d1f1=_0x58c1ab;_0x12db3c+=_0x591ee9[_0x37d1f1(0x17a)]();}),_0x592662?.['captureOutput']&&_0x2e7704[_0x58c1ab(0x175)]&&_0x2e7704[_0x58c1ab(0x175)]['on']('data',_0x1ee811=>{_0x12db3c+=_0x1ee811['toString']();}),_0x2e7704['on'](_0x371ad9['TgezH'],_0x13a432=>{_0x371ad9['VbQFF'](_0x13a432,0x0)?_0x4182bc({'success':!![],'output':_0x12db3c}):_0x4182bc({'success':![],'error':'Command\x20exited\x20with\x20code\x20'+_0x13a432,'output':_0x12db3c});}),_0x2e7704['on'](_0x371ad9['ydybP'],_0x322e14=>{const _0x815269=_0x58c1ab;_0x4182bc({'success':![],'error':_0x322e14[_0x815269(0x186)]});});});}export async function isMarketplaceAdded(_0x1bef80){const _0x390702=_0x16e1,_0x5311f7=await runClaudeCommand([_0x390702(0x189),'marketplace','list'],{'captureOutput':!![]});if(!_0x5311f7['success']||!_0x5311f7[_0x390702(0x18e)])return![];return _0x5311f7['output'][_0x390702(0x188)](_0x1bef80);}function _0x3116(){const _0x41061c=['stdout','5519654VBJafu','message','6bdldFx','includes','plugin','13962930MKXtXQ','tIZTO','8506ccWZPr','UoZgB','output','ZjeBD','10233960qwbavD','toLowerCase','[\x5cs\x5cS]*?(enabled|disabled)','cLtvv','VUItX','stderr','inherit','enabled','[\x5cs\x5cS]*?Version:\x5cs*([\x5cd.]+)','data','toString','captureOutput','353pQMuBY','244638KIZvpb','6248855iQXaub','13725864KxuOpm','Jhluh','success','list','72SgCppe'];_0x3116=function(){return _0x41061c;};return _0x3116();}export async function isPluginInstalled(_0xcc4ffc){const _0x2427ba=_0x16e1,_0xd75d45={'VUItX':function(_0x16eebd,_0x1f23eb,_0x29465f){return _0x16eebd(_0x1f23eb,_0x29465f);},'cLtvv':'plugin'},_0x545e25=await _0xd75d45[_0x2427ba(0x174)](runClaudeCommand,[_0xd75d45[_0x2427ba(0x173)],_0x2427ba(0x182)],{'captureOutput':!![]});if(!_0x545e25['success']||!_0x545e25['output'])return![];return _0x545e25[_0x2427ba(0x18e)][_0x2427ba(0x188)](_0xcc4ffc);}function _0x16e1(_0x3060ce,_0x5328cc){_0x3060ce=_0x3060ce-0x16f;const _0x311644=_0x3116();let _0x16e14a=_0x311644[_0x3060ce];return _0x16e14a;}export async function getPluginInfo(_0x2a306f){const _0x2cef36=_0x16e1,_0x433c43={'FxqWy':function(_0x3c7cb2,_0x52de9a,_0x403073){return _0x3c7cb2(_0x52de9a,_0x403073);},'Jhluh':_0x2cef36(0x189),'ZjeBD':_0x2cef36(0x177)},_0x4d10fd=await _0x433c43['FxqWy'](runClaudeCommand,[_0x433c43[_0x2cef36(0x180)],'list'],{'captureOutput':!![]});if(!_0x4d10fd[_0x2cef36(0x181)]||!_0x4d10fd['output'])return null;if(!_0x4d10fd['output'][_0x2cef36(0x188)](_0x2a306f))return null;const _0x364b12={'name':_0x2a306f},_0x1b7284=_0x4d10fd['output']['match'](new RegExp(_0x2a306f+'[\x5cs\x5cS]*?Scope:\x5cs*(user|project|local)','i'));_0x1b7284&&(_0x364b12['scope']=_0x1b7284[0x1][_0x2cef36(0x171)]());const _0x393c47=_0x4d10fd['output']['match'](new RegExp(_0x2a306f+_0x2cef36(0x178),'i'));_0x393c47&&(_0x364b12['version']=_0x393c47[0x1]);const _0x4f9b01=_0x4d10fd[_0x2cef36(0x18e)]['match'](new RegExp(_0x2a306f+_0x2cef36(0x172),'i'));return _0x4f9b01&&(_0x364b12[_0x2cef36(0x177)]=_0x4f9b01[0x1][_0x2cef36(0x171)]()===_0x433c43[_0x2cef36(0x16f)]),_0x364b12;}
@@ -1 +1 @@
1
- const _0x913e50=_0x4c8d;(function(_0x194f23,_0x1848f1){const _0x2c3a15=_0x4c8d,_0x2ea2a7=_0x194f23();while(!![]){try{const _0x9baef0=parseInt(_0x2c3a15(0xf0))/0x1+parseInt(_0x2c3a15(0xe7))/0x2*(parseInt(_0x2c3a15(0xe5))/0x3)+parseInt(_0x2c3a15(0xe3))/0x4*(parseInt(_0x2c3a15(0xe6))/0x5)+-parseInt(_0x2c3a15(0xe4))/0x6+parseInt(_0x2c3a15(0xeb))/0x7+parseInt(_0x2c3a15(0xf1))/0x8*(-parseInt(_0x2c3a15(0xe9))/0x9)+parseInt(_0x2c3a15(0xf5))/0xa;if(_0x9baef0===_0x1848f1)break;else _0x2ea2a7['push'](_0x2ea2a7['shift']());}catch(_0x4a1ce4){_0x2ea2a7['push'](_0x2ea2a7['shift']());}}}(_0x154d,0x7b584));import{createCipheriv,createDecipheriv,randomBytes,pbkdf2Sync}from'crypto';const ALGORITHM=_0x913e50(0xf6),SALT='ranger-auth-encryption',KEY_LENGTH=0x20,IV_LENGTH=0x10,TAG_LENGTH=0x10;export function deriveKey(_0x4a86af){const _0x182516=_0x913e50,_0x467789={'LBGpz':function(_0x3de863,_0x15d3f5,_0x4be900,_0x135b38,_0x34f039,_0x3469d9){return _0x3de863(_0x15d3f5,_0x4be900,_0x135b38,_0x34f039,_0x3469d9);}};return _0x467789['LBGpz'](pbkdf2Sync,_0x4a86af,SALT,0x186a0,KEY_LENGTH,_0x182516(0xea));}function _0x4c8d(_0x19153d,_0x197bf6){_0x19153d=_0x19153d-0xe3;const _0x154d8c=_0x154d();let _0x4c8d2d=_0x154d8c[_0x19153d];return _0x4c8d2d;}function _0x154d(){const _0x1dd31e=['9RbWXEs','1838905pWRZwu','269714YjOAKO','getAuthTag','318069KgmSHs','sha256','1027873SCtLtg','utf8','concat','JTNlR','lsIWb','716695AocPlL','176dguwXs','update','final','subarray','2012550GNRtcx','aes-256-gcm','brRwP','8zefNXg','5533200tjQqGS'];_0x154d=function(){return _0x1dd31e;};return _0x154d();}export function encrypt(_0x30e040,_0x26b4a7){const _0x1a3e96=_0x913e50,_0x47c00f={'JTNlR':function(_0x41c578,_0x520c22){return _0x41c578(_0x520c22);},'lsIWb':function(_0x27a9c5,_0x52ba8d,_0x38af35,_0xfa643a){return _0x27a9c5(_0x52ba8d,_0x38af35,_0xfa643a);},'brRwP':'utf8'},_0xeeee3=_0x47c00f['JTNlR'](deriveKey,_0x26b4a7),_0x39abea=_0x47c00f[_0x1a3e96(0xee)](randomBytes,IV_LENGTH),_0x16311b=_0x47c00f[_0x1a3e96(0xef)](createCipheriv,ALGORITHM,_0xeeee3,_0x39abea),_0x105e95=Buffer['concat']([_0x16311b['update'](_0x30e040,_0x47c00f[_0x1a3e96(0xf7)]),_0x16311b[_0x1a3e96(0xf3)]()]),_0x103dab=_0x16311b[_0x1a3e96(0xe8)]();return Buffer[_0x1a3e96(0xed)]([_0x39abea,_0x103dab,_0x105e95]);}export function decrypt(_0x43cd75,_0x300aa9){const _0x11d8cc=_0x913e50,_0x36fa84=deriveKey(_0x300aa9),_0x38dabb=_0x43cd75[_0x11d8cc(0xf4)](0x0,IV_LENGTH),_0x54e7fa=_0x43cd75[_0x11d8cc(0xf4)](IV_LENGTH,IV_LENGTH+TAG_LENGTH),_0x5017c8=_0x43cd75['subarray'](IV_LENGTH+TAG_LENGTH),_0x89621e=createDecipheriv(ALGORITHM,_0x36fa84,_0x38dabb);return _0x89621e['setAuthTag'](_0x54e7fa),_0x89621e[_0x11d8cc(0xf2)](_0x5017c8)+_0x89621e['final'](_0x11d8cc(0xec));}
1
+ (function(_0x469ac1,_0x2ab660){const _0x15d7b2=_0x1080,_0xde7007=_0x469ac1();while(!![]){try{const _0x351fba=-parseInt(_0x15d7b2(0x70))/0x1+parseInt(_0x15d7b2(0x6c))/0x2+-parseInt(_0x15d7b2(0x76))/0x3+parseInt(_0x15d7b2(0x6a))/0x4+parseInt(_0x15d7b2(0x79))/0x5*(-parseInt(_0x15d7b2(0x6b))/0x6)+-parseInt(_0x15d7b2(0x77))/0x7+-parseInt(_0x15d7b2(0x6d))/0x8*(-parseInt(_0x15d7b2(0x7b))/0x9);if(_0x351fba===_0x2ab660)break;else _0xde7007['push'](_0xde7007['shift']());}catch(_0x2c4859){_0xde7007['push'](_0xde7007['shift']());}}}(_0x401d,0x36cf7));function _0x1080(_0x3a3095,_0x171146){_0x3a3095=_0x3a3095-0x6a;const _0x401d07=_0x401d();let _0x1080a5=_0x401d07[_0x3a3095];return _0x1080a5;}import{createCipheriv,createDecipheriv,randomBytes,pbkdf2Sync}from'crypto';const ALGORITHM='aes-256-gcm',SALT='ranger-auth-encryption',KEY_LENGTH=0x20,IV_LENGTH=0x10,TAG_LENGTH=0x10;function _0x401d(){const _0x53adf0=['96PGcpsE','setAuthTag','skmPa','232296DthueV','update','getAuthTag','subarray','concat','LkGAS','660360spZlhK','806519xuDDwR','sha256','35MIUysS','ESGif','240525ferVZj','utf8','1235104sxgZDH','185148tobtMC','757332bpNhoV'];_0x401d=function(){return _0x53adf0;};return _0x401d();}export function deriveKey(_0x5193dd){const _0x3c09e3=_0x1080,_0x252f6d={'ESGif':function(_0x46274e,_0x402fa7,_0x5e3f91,_0x1da6f1,_0x2d54db,_0x56edfd){return _0x46274e(_0x402fa7,_0x5e3f91,_0x1da6f1,_0x2d54db,_0x56edfd);}};return _0x252f6d[_0x3c09e3(0x7a)](pbkdf2Sync,_0x5193dd,SALT,0x186a0,KEY_LENGTH,_0x3c09e3(0x78));}export function encrypt(_0x3e57fe,_0xbc9682){const _0x435e6b=_0x1080,_0x557242={'LkGAS':function(_0x4b57f7,_0x44d931){return _0x4b57f7(_0x44d931);},'skmPa':function(_0x2318f1,_0x476a9a,_0x3ee119,_0x4e617d){return _0x2318f1(_0x476a9a,_0x3ee119,_0x4e617d);}},_0x8b3c3b=deriveKey(_0xbc9682),_0x356214=_0x557242[_0x435e6b(0x75)](randomBytes,IV_LENGTH),_0x37da10=_0x557242[_0x435e6b(0x6f)](createCipheriv,ALGORITHM,_0x8b3c3b,_0x356214),_0x582846=Buffer[_0x435e6b(0x74)]([_0x37da10[_0x435e6b(0x71)](_0x3e57fe,_0x435e6b(0x7c)),_0x37da10['final']()]),_0x254464=_0x37da10[_0x435e6b(0x72)]();return Buffer['concat']([_0x356214,_0x254464,_0x582846]);}export function decrypt(_0x2ed7de,_0x6ab6f0){const _0x2924a0=_0x1080,_0x3d8add={'wXiPg':function(_0x3c347a,_0x42b325){return _0x3c347a+_0x42b325;}},_0x5a112d=deriveKey(_0x6ab6f0),_0x544c47=_0x2ed7de[_0x2924a0(0x73)](0x0,IV_LENGTH),_0x2a17fa=_0x2ed7de['subarray'](IV_LENGTH,IV_LENGTH+TAG_LENGTH),_0x36eb45=_0x2ed7de[_0x2924a0(0x73)](_0x3d8add['wXiPg'](IV_LENGTH,TAG_LENGTH)),_0x17bf50=createDecipheriv(ALGORITHM,_0x5a112d,_0x544c47);return _0x17bf50[_0x2924a0(0x6e)](_0x2a17fa),_0x3d8add['wXiPg'](_0x17bf50[_0x2924a0(0x71)](_0x36eb45),_0x17bf50['final'](_0x2924a0(0x7c)));}
@@ -1 +1 @@
1
- const _0x569622=_0x5fde;(function(_0x762633,_0x264214){const _0x2736e2=_0x5fde,_0xc55a89=_0x762633();while(!![]){try{const _0x32916a=parseInt(_0x2736e2(0xa5))/0x1+parseInt(_0x2736e2(0x79))/0x2*(-parseInt(_0x2736e2(0x98))/0x3)+-parseInt(_0x2736e2(0x94))/0x4+-parseInt(_0x2736e2(0x8b))/0x5+-parseInt(_0x2736e2(0x84))/0x6*(-parseInt(_0x2736e2(0xa3))/0x7)+parseInt(_0x2736e2(0x9c))/0x8*(-parseInt(_0x2736e2(0x99))/0x9)+parseInt(_0x2736e2(0x70))/0xa;if(_0x32916a===_0x264214)break;else _0xc55a89['push'](_0xc55a89['shift']());}catch(_0x1148c9){_0xc55a89['push'](_0xc55a89['shift']());}}}(_0x7d65,0x46d08));import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{getCurrentVersion}from'./version.js';function _0x7d65(){const _0x5b55bb=['8155ZVkMep','rawCommand','373557OBjaBg','Bearer\x20','LoBut','--password','4196510iYGcMc','errorType','PDUkK','invalid_option_value','slice','bGRyo','Missing\x20required\x20argument','missing_option','featureId','46652pqwKdk','zplPJ','--api-key','--cookie','Unknown\x20argument','startsWith','xBpcI','no_token','YffOX','isTTY','DEBUG','1008tYUTWZ','[desire-path]\x20Payload:\x20','syntax_error','--token','length','/api/v1/mcp/desire-path-logs','test','24855BmHeMx','scdyr','includes','--apikey','some','QRbsQ','Not\x20enough\x20non-option\x20arguments','error','stringify','1723296bxDNZU','join','toLowerCase','--auth','33ymCGlv','9gkuYat','runtime_error','unknown','51928eiJOqp','has','--secret','ScctO','push','env','split'];_0x7d65=function(){return _0x5b55bb;};return _0x7d65();}const SENSITIVE_FLAGS=new Set([_0x569622(0x87),'-t',_0x569622(0x9e),_0x569622(0x7b),_0x569622(0x8e),'--key',_0x569622(0x6f),'--pass',_0x569622(0x97),'--authorization','--header',_0x569622(0x7c),'--credentials']),TOKEN_PATTERNS=[/^(ranger_|rngr_|sk-|pk-|api[_-]?)/i,/^[a-zA-Z0-9_-]{32,}$/,/^eyJ[a-zA-Z0-9_-]+\.[a-zA-Z0-9_-]+/];function looksLikeToken(_0x3676f3){const _0x209795=_0x569622;return TOKEN_PATTERNS[_0x209795(0x8f)](_0x2386ab=>_0x2386ab[_0x209795(0x8a)](_0x3676f3));}export function sanitizeArgs(_0x555e42){const _0x3d1ff6=_0x569622,_0x2ee34c={'xBpcI':function(_0x4b1e8f,_0x30f10){return _0x4b1e8f<_0x30f10;},'YffOX':'[REDACTED]','tDGSj':function(_0x495441,_0x470beb){return _0x495441!==_0x470beb;},'zpOOG':function(_0x1aee6e,_0xb2b4b3){return _0x1aee6e(_0xb2b4b3);}},_0x5a86eb=[];let _0x3990e6=![];for(let _0x9fd74f=0x0;_0x2ee34c[_0x3d1ff6(0x7f)](_0x9fd74f,_0x555e42[_0x3d1ff6(0x88)]);_0x9fd74f++){const _0x1d9456=_0x555e42[_0x9fd74f];if(_0x3990e6){_0x5a86eb['push'](_0x2ee34c[_0x3d1ff6(0x81)]),_0x3990e6=![];continue;}if(_0x1d9456[_0x3d1ff6(0x7e)]('--')||_0x1d9456[_0x3d1ff6(0x7e)]('-')){const _0x305967=_0x1d9456['indexOf']('=');if(_0x2ee34c['tDGSj'](_0x305967,-0x1)){const _0x3411f8=_0x1d9456['slice'](0x0,_0x305967)[_0x3d1ff6(0x96)]();if(SENSITIVE_FLAGS['has'](_0x3411f8)){_0x5a86eb['push'](_0x1d9456[_0x3d1ff6(0x74)](0x0,_0x305967)+'=[REDACTED]');continue;}}else{const _0x465cba=_0x1d9456[_0x3d1ff6(0x96)]();SENSITIVE_FLAGS[_0x3d1ff6(0x9d)](_0x465cba)&&(_0x3990e6=!![]);}_0x5a86eb['push'](_0x1d9456);}else _0x2ee34c['zpOOG'](looksLikeToken,_0x1d9456)?_0x5a86eb['push'](_0x2ee34c['YffOX']):_0x5a86eb[_0x3d1ff6(0xa0)](_0x1d9456);}return _0x5a86eb[_0x3d1ff6(0x95)]('\x20');}export async function logDesirePath(_0x289f0e){const _0x19c3f7=_0x569622,_0x4ce15d={'QRbsQ':function(_0x539e97){return _0x539e97();},'LoBut':function(_0x20a895,_0x1b876a,_0x5a4550){return _0x20a895(_0x1b876a,_0x5a4550);}};try{const _0x4f3ab6=await _0x4ce15d[_0x19c3f7(0x90)](getToken)['catch'](()=>null),_0x3de50d=_0x4ce15d['QRbsQ'](getApiBaseUrl),_0x9a0434=getCurrentVersion(),_0x9b39e6=_0x4f3ab6?'has_token':_0x19c3f7(0x80),_0x402897={..._0x289f0e['metadata'],'authStatus':_0x9b39e6,'isTty':process['stdout'][_0x19c3f7(0x82)]??![]},_0x17fb91={'Content-Type':'application/json'};_0x4f3ab6&&(_0x17fb91['Authorization']=_0x19c3f7(0x6d)+_0x4f3ab6);const _0x1fa9a6={'rawCommand':_0x289f0e[_0x19c3f7(0xa4)],'errorMessage':_0x289f0e['errorMessage'],'errorType':_0x289f0e[_0x19c3f7(0x71)],'featureId':_0x289f0e[_0x19c3f7(0x78)],'sessionId':_0x289f0e['sessionId'],'metadata':_0x402897,'cliVersion':_0x9a0434};process['env']['DEBUG']&&(console[_0x19c3f7(0x92)]('[desire-path]\x20Sending\x20log\x20to\x20'+_0x3de50d+_0x19c3f7(0x89)),console[_0x19c3f7(0x92)](_0x19c3f7(0x85)+JSON[_0x19c3f7(0x93)](_0x1fa9a6,null,0x2))),await _0x4ce15d[_0x19c3f7(0x6e)](fetch,_0x3de50d+_0x19c3f7(0x89),{'method':'POST','headers':_0x17fb91,'body':JSON[_0x19c3f7(0x93)](_0x1fa9a6)});}catch(_0x405165){process[_0x19c3f7(0xa1)][_0x19c3f7(0x83)]&&console['error']('[desire-path]\x20Failed\x20to\x20send:\x20'+_0x405165);}}function _0x5fde(_0x5a7092,_0x4a68b4){_0x5a7092=_0x5a7092-0x6d;const _0x7d65c3=_0x7d65();let _0x5fdef8=_0x7d65c3[_0x5a7092];return _0x5fdef8;}export function getErrorType(_0xeb7f2f,_0x55f07c){const _0x295c85=_0x569622,_0x4afddd={'HxBTO':'4|1|3|5|2|7|0|6','GhUEh':_0x295c85(0x77),'scdyr':_0x295c85(0x9b),'PDUkK':_0x295c85(0x91),'zplPJ':'Unknown\x20command','ScctO':_0x295c85(0x9a),'sjCuk':_0x295c85(0x7d),'bGRyo':'Invalid\x20values','xImYX':_0x295c85(0x73)},_0x15464b=_0x4afddd['HxBTO'][_0x295c85(0xa2)]('|');let _0x56e9dd=0x0;while(!![]){switch(_0x15464b[_0x56e9dd++]){case'0':if(_0xeb7f2f['includes'](_0x295c85(0x76)))return _0x4afddd['GhUEh'];continue;case'1':if(!_0xeb7f2f)return _0x4afddd[_0x295c85(0x8c)];continue;case'2':if(_0xeb7f2f['includes'](_0x4afddd[_0x295c85(0x72)]))return'missing_required_argument';continue;case'3':if(_0xeb7f2f[_0x295c85(0x8d)](_0x4afddd[_0x295c85(0x7a)]))return'unknown_command';continue;case'4':if(_0x55f07c)return _0x4afddd[_0x295c85(0x9f)];continue;case'5':if(_0xeb7f2f['includes'](_0x4afddd['sjCuk']))return'unknown_argument';continue;case'6':return _0x295c85(0x86);case'7':if(_0xeb7f2f['includes'](_0x4afddd[_0x295c85(0x75)]))return _0x4afddd['xImYX'];continue;}break;}}
1
+ const _0x1d72a2=_0x35ac;function _0x35ac(_0x5a97b8,_0x450253){_0x5a97b8=_0x5a97b8-0x11a;const _0xba30e7=_0xba30();let _0x35ac68=_0xba30e7[_0x5a97b8];return _0x35ac68;}(function(_0x12a383,_0x220935){const _0x515616=_0x35ac,_0x587456=_0x12a383();while(!![]){try{const _0x2af616=parseInt(_0x515616(0x11f))/0x1+parseInt(_0x515616(0x12e))/0x2+parseInt(_0x515616(0x142))/0x3+parseInt(_0x515616(0x132))/0x4*(-parseInt(_0x515616(0x13c))/0x5)+-parseInt(_0x515616(0x11c))/0x6*(parseInt(_0x515616(0x120))/0x7)+-parseInt(_0x515616(0x144))/0x8+parseInt(_0x515616(0x12a))/0x9;if(_0x2af616===_0x220935)break;else _0x587456['push'](_0x587456['shift']());}catch(_0x37401e){_0x587456['push'](_0x587456['shift']());}}}(_0xba30,0x6619b));import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';function _0xba30(){const _0x246506=['has','45956mHPxFR','GcDtx','DEBUG','POST','--auth','invalid_option_value','--password','rawCommand','qCUCJ','Authorization','315pvKDev','indexOf','yaDvD','no_token','missing_option','join','1898613yYuEcu','[desire-path]\x20Payload:\x20','5071680wnjebS','catch','env','EBcVt','stdout','/api/v1/mcp/desire-path-logs','--apikey','error','rIeIg','Invalid\x20values','--token','--api-key','--key','=[REDACTED]','2502fUqodP','goYUR','--header','22413odOqMB','9121WDtbDL','--pass','startsWith','Bearer\x20','has_token','stringify','metadata','LlPzH','guSwX','toLowerCase','13127112jewRWt','includes','--credentials','--cookie','410938deelXz','[REDACTED]','dBpYG'];_0xba30=function(){return _0x246506;};return _0xba30();}import{getCurrentVersion}from'./version.js';const SENSITIVE_FLAGS=new Set([_0x1d72a2(0x14e),'-t','--secret',_0x1d72a2(0x14f),_0x1d72a2(0x14a),_0x1d72a2(0x11a),_0x1d72a2(0x138),_0x1d72a2(0x121),_0x1d72a2(0x136),'--authorization',_0x1d72a2(0x11e),_0x1d72a2(0x12d),_0x1d72a2(0x12c)]),TOKEN_PATTERNS=[/^(ranger_|rngr_|sk-|pk-|api[_-]?)/i,/^[a-zA-Z0-9_-]{32,}$/,/^eyJ[a-zA-Z0-9_-]+\.[a-zA-Z0-9_-]+/];function looksLikeToken(_0x219d83){return TOKEN_PATTERNS['some'](_0x5e8956=>_0x5e8956['test'](_0x219d83));}export function sanitizeArgs(_0x3a73ca){const _0x533734=_0x1d72a2,_0x4d5dc8={'gQVCx':function(_0x2958a4,_0x5a73e0){return _0x2958a4!==_0x5a73e0;},'KabWV':function(_0x1a59e4,_0x16a90e){return _0x1a59e4(_0x16a90e);}},_0x58b8c1=[];let _0x546385=![];for(let _0x9a1629=0x0;_0x9a1629<_0x3a73ca['length'];_0x9a1629++){const _0x3185bd=_0x3a73ca[_0x9a1629];if(_0x546385){_0x58b8c1['push'](_0x533734(0x12f)),_0x546385=![];continue;}if(_0x3185bd[_0x533734(0x122)]('--')||_0x3185bd['startsWith']('-')){const _0x4f1e18=_0x3185bd[_0x533734(0x13d)]('=');if(_0x4d5dc8['gQVCx'](_0x4f1e18,-0x1)){const _0x31fbcb=_0x3185bd['slice'](0x0,_0x4f1e18)['toLowerCase']();if(SENSITIVE_FLAGS['has'](_0x31fbcb)){_0x58b8c1['push'](_0x3185bd['slice'](0x0,_0x4f1e18)+_0x533734(0x11b));continue;}}else{const _0x1e18cc=_0x3185bd[_0x533734(0x129)]();SENSITIVE_FLAGS[_0x533734(0x131)](_0x1e18cc)&&(_0x546385=!![]);}_0x58b8c1['push'](_0x3185bd);}else _0x4d5dc8['KabWV'](looksLikeToken,_0x3185bd)?_0x58b8c1['push'](_0x533734(0x12f)):_0x58b8c1['push'](_0x3185bd);}return _0x58b8c1[_0x533734(0x141)]('\x20');}export async function logDesirePath(_0x39a236){const _0x4089b7=_0x1d72a2,_0x100000={'goYUR':function(_0x3edfd6){return _0x3edfd6();},'qCUCJ':_0x4089b7(0x124),'yaDvD':_0x4089b7(0x13f),'rIeIg':'application/json','aaPaY':_0x4089b7(0x135)};try{const _0x4ca61a=await _0x100000['goYUR'](getToken)[_0x4089b7(0x145)](()=>null),_0x4dd07f=_0x100000[_0x4089b7(0x11d)](getApiBaseUrl),_0x2312e8=getCurrentVersion(),_0x48b9ee=_0x4ca61a?_0x100000[_0x4089b7(0x13a)]:_0x100000[_0x4089b7(0x13e)],_0x1c3502={..._0x39a236[_0x4089b7(0x126)],'authStatus':_0x48b9ee,'isTty':process[_0x4089b7(0x148)]['isTTY']??![]},_0x5a00b9={'Content-Type':_0x100000[_0x4089b7(0x14c)]};_0x4ca61a&&(_0x5a00b9[_0x4089b7(0x13b)]=_0x4089b7(0x123)+_0x4ca61a);const _0xd4ff3={'rawCommand':_0x39a236[_0x4089b7(0x139)],'errorMessage':_0x39a236['errorMessage'],'errorType':_0x39a236['errorType'],'featureId':_0x39a236['featureId'],'sessionId':_0x39a236['sessionId'],'metadata':_0x1c3502,'cliVersion':_0x2312e8};process['env']['DEBUG']&&(console[_0x4089b7(0x14b)]('[desire-path]\x20Sending\x20log\x20to\x20'+_0x4dd07f+_0x4089b7(0x149)),console[_0x4089b7(0x14b)](_0x4089b7(0x143)+JSON[_0x4089b7(0x125)](_0xd4ff3,null,0x2))),await fetch(_0x4dd07f+_0x4089b7(0x149),{'method':_0x100000['aaPaY'],'headers':_0x5a00b9,'body':JSON[_0x4089b7(0x125)](_0xd4ff3)});}catch(_0x4ab030){process[_0x4089b7(0x146)][_0x4089b7(0x134)]&&console[_0x4089b7(0x14b)]('[desire-path]\x20Failed\x20to\x20send:\x20'+_0x4ab030);}}export function getErrorType(_0x2ee4ca,_0x239e3b){const _0x3fd804=_0x1d72a2,_0x4fd383={'dBpYG':'runtime_error','guSwX':'unknown','NHDZH':'unknown_argument','EBcVt':_0x3fd804(0x14d),'LlPzH':'Missing\x20required\x20argument','GcDtx':_0x3fd804(0x140)};if(_0x239e3b)return _0x4fd383[_0x3fd804(0x130)];if(!_0x2ee4ca)return _0x4fd383[_0x3fd804(0x128)];if(_0x2ee4ca[_0x3fd804(0x12b)]('Unknown\x20command'))return'unknown_command';if(_0x2ee4ca['includes']('Unknown\x20argument'))return _0x4fd383['NHDZH'];if(_0x2ee4ca['includes']('Not\x20enough\x20non-option\x20arguments'))return'missing_required_argument';if(_0x2ee4ca[_0x3fd804(0x12b)](_0x4fd383[_0x3fd804(0x147)]))return _0x3fd804(0x137);if(_0x2ee4ca[_0x3fd804(0x12b)](_0x4fd383[_0x3fd804(0x127)]))return _0x4fd383[_0x3fd804(0x133)];return'syntax_error';}
@@ -1 +1 @@
1
- const _0x2e1bb4=_0x5cdd;(function(_0x1a7182,_0x5bddf4){const _0x561949=_0x5cdd,_0x10b7df=_0x1a7182();while(!![]){try{const _0x288909=parseInt(_0x561949(0x18c))/0x1+parseInt(_0x561949(0x1c9))/0x2+parseInt(_0x561949(0x1be))/0x3*(-parseInt(_0x561949(0x1ab))/0x4)+parseInt(_0x561949(0x1a1))/0x5+-parseInt(_0x561949(0x1c6))/0x6+parseInt(_0x561949(0x1bb))/0x7*(-parseInt(_0x561949(0x1bc))/0x8)+parseInt(_0x561949(0x1ae))/0x9*(-parseInt(_0x561949(0x1c1))/0xa);if(_0x288909===_0x5bddf4)break;else _0x10b7df['push'](_0x10b7df['shift']());}catch(_0x8a0d3f){_0x10b7df['push'](_0x10b7df['shift']());}}}(_0x3cc3,0x19d45));import{exec}from'child_process';import{getCurrentEnvironment,ENVIRONMENT_CONFIGS,getApiBaseUrl}from'./environment.js';import{storeToken,storeRefreshToken}from'./keychain.js';const WORKOS_DEVICE_AUTH_URL=_0x2e1bb4(0x1aa),WORKOS_TOKEN_URL=_0x2e1bb4(0x1ca);export async function requestDeviceCode(_0x473ddc){const _0x523efb=_0x2e1bb4,_0x1965a9={'ADltO':'application/x-www-form-urlencoded'},_0x335961=await fetch(WORKOS_DEVICE_AUTH_URL,{'method':_0x523efb(0x1b9),'headers':{'Content-Type':_0x1965a9[_0x523efb(0x1cb)]},'body':new URLSearchParams({'client_id':_0x473ddc})});if(!_0x335961['ok']){const _0xb15ab4=await _0x335961['text']();throw new Error(_0x523efb(0x18a)+_0x335961[_0x523efb(0x1c4)]+'\x20'+_0xb15ab4);}return _0x335961[_0x523efb(0x19f)]();}export async function pollForTokens(_0x444008,_0x3b125e,_0x3a8d13,_0x5270d2){const _0x389c93=_0x2e1bb4,_0x3353b8={'FBBQX':function(_0x14f9c3,_0x4c3b79){return _0x14f9c3+_0x4c3b79;},'cBTlF':function(_0x5796a3,_0x169fb8){return _0x5796a3*_0x169fb8;},'WQSRP':function(_0x20ad9b,_0x5217fc){return _0x20ad9b*_0x5217fc;},'OqvTl':function(_0x43340b,_0xedeab8,_0x2dee64){return _0x43340b(_0xedeab8,_0x2dee64);},'xYrGZ':_0x389c93(0x1b9),'wMCjz':function(_0xf9128f,_0xf85bcf){return _0xf9128f===_0xf85bcf;},'IjQDm':_0x389c93(0x1a3),'bDvbJ':'slow_down','rmbPn':_0x389c93(0x18d)},_0x145335=_0x3353b8['FBBQX'](Date[_0x389c93(0x1a4)](),_0x3353b8[_0x389c93(0x1bf)](_0x5270d2,0x3e8));let _0xc9767f=_0x3353b8['WQSRP'](_0x3a8d13,0x3e8);while(Date['now']()<_0x145335){await sleep(_0xc9767f);const _0xb6de01=await _0x3353b8[_0x389c93(0x195)](fetch,WORKOS_TOKEN_URL,{'method':_0x3353b8[_0x389c93(0x19e)],'headers':{'Content-Type':_0x389c93(0x19a)},'body':new URLSearchParams({'client_id':_0x444008,'device_code':_0x3b125e,'grant_type':_0x389c93(0x1b4)})});if(_0xb6de01['ok'])return _0xb6de01['json']();const _0x2b2250=await _0xb6de01['json']();if(_0x3353b8[_0x389c93(0x1c2)](_0x2b2250['error'],_0x3353b8['IjQDm']))continue;if(_0x2b2250[_0x389c93(0x1b8)]===_0x3353b8[_0x389c93(0x1a2)]){_0xc9767f+=0x3e8;continue;}throw new Error(_0x2b2250['error_description']||_0x2b2250[_0x389c93(0x1b8)]||'Authentication\x20failed');}throw new Error(_0x3353b8[_0x389c93(0x1af)]);}async function fetchUserProfile(_0x3c2750){const _0x4cf46e=_0x2e1bb4,_0x58cb6c={'GdSkE':function(_0x5279ac){return _0x5279ac();},'rIsqq':_0x4cf46e(0x198)},_0x7cfd42=_0x58cb6c[_0x4cf46e(0x196)](getApiBaseUrl);try{const _0x585906=await fetch(_0x7cfd42+'/organization/me',{'method':_0x58cb6c['rIsqq'],'headers':{'workos-token':_0x3c2750}});if(_0x585906['ok'])return _0x585906['json']();}catch{}return null;}function buildKeyName(_0x2c1bb0,_0x31d044){const _0x135364=_0x2e1bb4,_0x52c99d={'lrxMt':function(_0x53179d,_0x404ccb){return _0x53179d===_0x404ccb;}},_0x465028=_0x31d044[_0x135364(0x192)](_0x205f0f=>_0x205f0f[_0x135364(0x18b)]===_0x2c1bb0||_0x205f0f[_0x135364(0x18b)]['startsWith'](_0x2c1bb0+'\x20('));if(_0x52c99d['lrxMt'](_0x465028[_0x135364(0x194)],0x0))return _0x2c1bb0;return _0x2c1bb0+'\x20('+(_0x465028[_0x135364(0x194)]+0x1)+')';}export async function provisionApiKey(_0x42df6f){const _0x2455a2=_0x2e1bb4,_0x2cab0a={'fNUrf':_0x2455a2(0x1c0),'BgaGg':function(_0x21c14b,_0x26c7eb){return _0x21c14b(_0x26c7eb);},'WPUnV':_0x2455a2(0x198),'UpGAR':function(_0x56c900,_0x39488b,_0x57cac3){return _0x56c900(_0x39488b,_0x57cac3);},'gyJUv':'mcp:write'},_0x1390de=getApiBaseUrl(),_0x5a4682={'Content-Type':_0x2cab0a[_0x2455a2(0x1b0)],'workos-token':_0x42df6f},_0x3cb7b8=await _0x2cab0a['BgaGg'](fetchUserProfile,_0x42df6f),_0x83ca10=_0x3cb7b8?.[_0x2455a2(0x1b5)]||_0x3cb7b8?.[_0x2455a2(0x18e)]?.['split']('@')[0x0],_0x359221=_0x83ca10?_0x83ca10+_0x2455a2(0x19b):'CLI\x20Key';let _0x2cf8bf=[];try{const _0x2a14a8=await fetch(_0x1390de+'/api-keys',{'method':_0x2cab0a['WPUnV'],'headers':_0x5a4682});if(_0x2a14a8['ok']){const _0x2686cd=await _0x2a14a8[_0x2455a2(0x19f)]();_0x2cf8bf=_0x2686cd[_0x2455a2(0x1b1)];}}catch{}const _0x3696b7=_0x2cab0a['UpGAR'](buildKeyName,_0x359221,_0x2cf8bf),_0x28a7ab=await _0x2cab0a['UpGAR'](fetch,_0x1390de+_0x2455a2(0x1c5),{'method':'POST','headers':_0x5a4682,'body':JSON['stringify']({'name':_0x3696b7,'scope':_0x2cab0a[_0x2455a2(0x1bd)]})});if(!_0x28a7ab['ok']){const _0x1ec8e2=await _0x28a7ab['text']();throw new Error('Failed\x20to\x20provision\x20API\x20key:\x20'+_0x28a7ab['status']+'\x20'+_0x1ec8e2);}const _0x16fb2e=await _0x28a7ab[_0x2455a2(0x19f)]();return _0x16fb2e['apiKey'][_0x2455a2(0x1ac)];}export function openBrowser(_0x49565b){const _0x5c6bae=_0x2e1bb4,_0x41dca6={'fAZOr':function(_0x492aef,_0x169f9d){return _0x492aef===_0x169f9d;},'AjLgU':'open','SDHfW':_0x5c6bae(0x1c7),'rTTqs':function(_0x1f0dea,_0x4fbdf3){return _0x1f0dea(_0x4fbdf3);}},_0x1a6b19=process['platform'],_0x8590d6=_0x41dca6['fAZOr'](_0x1a6b19,_0x5c6bae(0x1a7))?_0x41dca6['AjLgU']:_0x1a6b19===_0x5c6bae(0x190)?'start':_0x41dca6['SDHfW'];_0x41dca6['rTTqs'](exec,_0x8590d6+'\x20'+JSON[_0x5c6bae(0x19d)](_0x49565b));}function _0x3cc3(){const _0xfb0563=['urn:ietf:params:oauth:grant-type:device_code','firstName','LwwoU','stdout','error','POST','\x20\x20\x20A\x20human\x20needs\x20to\x20complete\x20authentication\x20in\x20the\x20browser.\x0a','75593lgWOUX','40UtTRaZ','gyJUv','33MQWAzx','cBTlF','application/json','9090oqUruJ','wMCjz','access_token','status','/api-keys','536670lISqEn','xdg-open','refresh_token','271168wBRptq','https://api.workos.com/user_management/authenticate','ADltO','BGjqM','If\x20the\x20browser\x20doesn\x27t\x20open,\x20visit:\x20','parse','Failed\x20to\x20request\x20device\x20code:\x20','name','187892TGSFfU','Device\x20authorization\x20timed\x20out','email','workosClientId','win32','Invalid\x20JWT\x20format','filter','from','length','OqvTl','GdSkE','write','GET','Failed\x20to\x20create\x20organization:\x20','application/x-www-form-urlencoded','\x27s\x20CLI\x20Key','log','stringify','xYrGZ','json','zvppw','888090FwpCDT','bDvbJ','authorization_pending','now','JteUq','\x0a🔐\x20Opening\x20browser\x20to\x20log\x20in...','darwin','QGjwP','Waiting\x20for\x20authentication...','https://api.workos.com/user_management/authorize/device','23492qGVwuo','token','qEwIS','1854baRbwV','rmbPn','fNUrf','apiKeys','xpjLj','sCVRK'];_0x3cc3=function(){return _0xfb0563;};return _0x3cc3();}function _0x5cdd(_0x5e7560,_0x41137c){_0x5e7560=_0x5e7560-0x187;const _0x3cc3e9=_0x3cc3();let _0x5cddd7=_0x3cc3e9[_0x5e7560];return _0x5cddd7;}function decodeJwtPayload(_0x1ab288){const _0x30fdd6=_0x2e1bb4,_0x544d9b={'xpjLj':'base64url','LXkwI':'utf-8'},_0x345cbf=_0x1ab288['split']('.');if(_0x345cbf['length']!==0x3)throw new Error(_0x30fdd6(0x191));const _0x285e1a=Buffer[_0x30fdd6(0x193)](_0x345cbf[0x1],_0x544d9b[_0x30fdd6(0x1b2)])['toString'](_0x544d9b['LXkwI']);return JSON[_0x30fdd6(0x189)](_0x285e1a);}async function selfServeSignup(_0xc00703){const _0x2888d7=_0x2e1bb4,_0x711fcb={'vaTqS':function(_0x50353f,_0x282e41,_0x9390fe){return _0x50353f(_0x282e41,_0x9390fe);},'qEwIS':'POST','QGjwP':'application/json'},_0x4bde8e=getApiBaseUrl(),_0x4cf981=await _0x711fcb['vaTqS'](fetch,_0x4bde8e+'/organization/self-serve-signup',{'method':_0x711fcb[_0x2888d7(0x1ad)],'headers':{'Content-Type':_0x711fcb[_0x2888d7(0x1a8)],'workos-token':_0xc00703}});if(!_0x4cf981['ok']){const _0x3b650b=await _0x4cf981['text']();throw new Error(_0x2888d7(0x199)+_0x4cf981['status']+'\x20'+_0x3b650b);}return _0x4cf981[_0x2888d7(0x19f)]();}async function refreshTokenWithOrg(_0x728a4e,_0x184bf5,_0x1608ac){const _0x138339=_0x2e1bb4,_0x479311={'BGjqM':_0x138339(0x1b9),'sCVRK':_0x138339(0x19a)},_0x12367a=await fetch(WORKOS_TOKEN_URL,{'method':_0x479311[_0x138339(0x187)],'headers':{'Content-Type':_0x479311[_0x138339(0x1b3)]},'body':new URLSearchParams({'client_id':_0x728a4e,'grant_type':_0x138339(0x1c8),'refresh_token':_0x184bf5,'organization_id':_0x1608ac})});if(!_0x12367a['ok']){const _0x7fba1b=await _0x12367a['text']();throw new Error('Failed\x20to\x20refresh\x20token\x20with\x20org:\x20'+_0x12367a[_0x138339(0x1c4)]+'\x20'+_0x7fba1b);}return _0x12367a['json']();}export async function runDeviceAuthFlow(){const _0x19e73b=_0x2e1bb4,_0x150bad={'JteUq':function(_0x116ea1,_0x200a03){return _0x116ea1(_0x200a03);},'TDhnh':_0x19e73b(0x1a6),'kAxyW':_0x19e73b(0x1ba),'LwwoU':'Setting\x20up\x20your\x20organization...','zvppw':function(_0x2eed8e,_0x24e205,_0x2e4b54,_0x455e44){return _0x2eed8e(_0x24e205,_0x2e4b54,_0x455e44);},'nJBBq':function(_0x498b6a,_0xc25e1f){return _0x498b6a(_0xc25e1f);},'YIhvg':function(_0x1b002b,_0x405fec){return _0x1b002b(_0x405fec);}},_0x2a0c3b=getCurrentEnvironment(),_0x12cfe8=ENVIRONMENT_CONFIGS[_0x2a0c3b][_0x19e73b(0x18f)],_0x596ed0=await _0x150bad[_0x19e73b(0x1a5)](requestDeviceCode,_0x12cfe8);console['log'](_0x150bad['TDhnh']),console['log'](_0x150bad['kAxyW']),openBrowser(_0x596ed0['verification_uri_complete']),console['log'](_0x19e73b(0x188)+_0x596ed0['verification_uri_complete']),console[_0x19e73b(0x19c)]('Code:\x20'+_0x596ed0['user_code']+'\x0a'),process['stdout']['write'](_0x19e73b(0x1a9));let _0x477838=await pollForTokens(_0x12cfe8,_0x596ed0['device_code'],_0x596ed0['interval'],_0x596ed0['expires_in']);console[_0x19e73b(0x19c)]('\x20✓');const _0x222c3b=decodeJwtPayload(_0x477838[_0x19e73b(0x1c3)]);if(!_0x222c3b['org_id']){process['stdout'][_0x19e73b(0x197)](_0x150bad[_0x19e73b(0x1b6)]);const {organizationId:_0x5325e2}=await selfServeSignup(_0x477838['access_token']);_0x477838=await _0x150bad[_0x19e73b(0x1a0)](refreshTokenWithOrg,_0x12cfe8,_0x477838['refresh_token'],_0x5325e2),console['log']('\x20✓');}process[_0x19e73b(0x1b7)][_0x19e73b(0x197)]('Provisioning\x20API\x20key...');const _0x3d5d94=await provisionApiKey(_0x477838[_0x19e73b(0x1c3)]);return console['log']('\x20✓'),await _0x150bad['nJBBq'](storeToken,_0x3d5d94),_0x477838[_0x19e73b(0x1c8)]&&await _0x150bad['YIhvg'](storeRefreshToken,_0x477838[_0x19e73b(0x1c8)]),_0x3d5d94;}function sleep(_0x55f7c9){return new Promise(_0x82f6ac=>setTimeout(_0x82f6ac,_0x55f7c9));}
1
+ const _0xe73600=_0x47cd;(function(_0x13b4c8,_0x5b3c2f){const _0x1c10a0=_0x47cd,_0x25143a=_0x13b4c8();while(!![]){try{const _0x1a414a=-parseInt(_0x1c10a0(0xb8))/0x1+parseInt(_0x1c10a0(0xd8))/0x2+parseInt(_0x1c10a0(0xda))/0x3*(parseInt(_0x1c10a0(0xe8))/0x4)+parseInt(_0x1c10a0(0xb7))/0x5+parseInt(_0x1c10a0(0xd0))/0x6*(-parseInt(_0x1c10a0(0xed))/0x7)+-parseInt(_0x1c10a0(0xb5))/0x8*(-parseInt(_0x1c10a0(0xac))/0x9)+parseInt(_0x1c10a0(0xad))/0xa;if(_0x1a414a===_0x5b3c2f)break;else _0x25143a['push'](_0x25143a['shift']());}catch(_0x159c0b){_0x25143a['push'](_0x25143a['shift']());}}}(_0x1f9b,0x8f371));function _0x47cd(_0x13a10d,_0x450f3c){_0x13a10d=_0x13a10d-0xaa;const _0x1f9be7=_0x1f9b();let _0x47cdb5=_0x1f9be7[_0x13a10d];return _0x47cdb5;}function _0x1f9b(){const _0x4b2893=['UjXYX','QMUwL','json','1521HyHMKa','4011740DbeEsG','FizNX','organizationId','toString','ObmbQ','https://api.workos.com/user_management/authenticate','POST','error_description','14296mqAnnF','hwXmd','2582890yHgHqh','977941KhgnQS','utf-8','Invalid\x20JWT\x20format','startsWith','EBwhs','stringify','Failed\x20to\x20request\x20device\x20code:\x20','write','Failed\x20to\x20provision\x20API\x20key:\x20','org_id','VjgFr','start','length','mcp:write','application/x-www-form-urlencoded','xdg-open','darwin','stdout','Select\x20an\x20organization:','dUfnp','base64url','QMfXw','kEoPX','iIYsC','2982OZcfJS','https://api.workos.com/user_management/authorize/device','Multiple\x20organizations\x20available\x20but\x20cannot\x20prompt\x20for\x20selection\x20in\x20non-interactive\x20mode.\x0a','text','name','user_code','workosClientId','Failed\x20to\x20fetch\x20memberships:\x20','812652yPydZm','token','48252loPWcQ','ajKFM','list','application/json','BMVMD','Setting\x20up\x20your\x20organization...','/api-keys','Qqaki','access_token','kKdei','aeLIr','Failed\x20to\x20create\x20organization:\x20','error','log','212NiZvSE','yjLEO','status','YbStj','GET','12873wwgRJx','qcfIE','Failed\x20to\x20refresh\x20token\x20with\x20org:\x20','selected','Using\x20organization:\x20','\x20\x20\x20A\x20human\x20needs\x20to\x20complete\x20authentication\x20in\x20the\x20browser.\x0a','slow_down','stdin','split','zztSa','platform','authorization_pending','email','refresh_token','NBsAP','SpDZp','/organization/my-memberships','verification_uri_complete','isTTY','nNueU'];_0x1f9b=function(){return _0x4b2893;};return _0x1f9b();}import{exec}from'child_process';import _0x3ffb7e from'inquirer';import{getCurrentEnvironment,ENVIRONMENT_CONFIGS,getApiBaseUrl}from'./environment.js';import{storeToken,storeRefreshToken}from'./keychain.js';const WORKOS_DEVICE_AUTH_URL=_0xe73600(0xd1),WORKOS_TOKEN_URL=_0xe73600(0xb2);export async function requestDeviceCode(_0xc6a51a){const _0x59e183=_0xe73600,_0x56e9e3={'aTyba':'application/x-www-form-urlencoded'},_0xd583a2=await fetch(WORKOS_DEVICE_AUTH_URL,{'method':'POST','headers':{'Content-Type':_0x56e9e3['aTyba']},'body':new URLSearchParams({'client_id':_0xc6a51a})});if(!_0xd583a2['ok']){const _0x2954b3=await _0xd583a2[_0x59e183(0xd3)]();throw new Error(_0x59e183(0xbe)+_0xd583a2['status']+'\x20'+_0x2954b3);}return _0xd583a2['json']();}export async function pollForTokens(_0x10b9d0,_0x32fbcc,_0x52e2c3,_0x20f319){const _0x3496b2=_0xe73600,_0x810ced={'UjikZ':function(_0x3a154e,_0x350812){return _0x3a154e+_0x350812;},'SpDZp':function(_0x27cd19,_0x41c4e9){return _0x27cd19*_0x41c4e9;},'BMVMD':function(_0x455d24,_0x133ef6){return _0x455d24(_0x133ef6);},'UjXYX':function(_0x3862b9,_0x644069,_0x3728e6){return _0x3862b9(_0x644069,_0x3728e6);},'iIYsC':_0x3496b2(0xb3),'ObmbQ':_0x3496b2(0xc6),'QMUwL':'urn:ietf:params:oauth:grant-type:device_code','cgoPP':function(_0x5846c2,_0x49eafd){return _0x5846c2===_0x49eafd;},'yjLEO':function(_0x5c5e52,_0x1f97d7){return _0x5c5e52===_0x1f97d7;},'qcfIE':'Authentication\x20failed','hwXmd':'Device\x20authorization\x20timed\x20out'},_0x2ca0a9=_0x810ced['UjikZ'](Date['now'](),_0x810ced[_0x3496b2(0xfc)](_0x20f319,0x3e8));let _0x3a94f9=_0x52e2c3*0x3e8;while(Date['now']()<_0x2ca0a9){await _0x810ced[_0x3496b2(0xde)](sleep,_0x3a94f9);const _0x40a7b7=await _0x810ced[_0x3496b2(0x101)](fetch,WORKOS_TOKEN_URL,{'method':_0x810ced[_0x3496b2(0xcf)],'headers':{'Content-Type':_0x810ced[_0x3496b2(0xb1)]},'body':new URLSearchParams({'client_id':_0x10b9d0,'device_code':_0x32fbcc,'grant_type':_0x810ced[_0x3496b2(0xaa)]})});if(_0x40a7b7['ok'])return _0x40a7b7[_0x3496b2(0xab)]();const _0x2596f8=await _0x40a7b7['json']();if(_0x810ced['cgoPP'](_0x2596f8['error'],_0x3496b2(0xf8)))continue;if(_0x810ced[_0x3496b2(0xe9)](_0x2596f8[_0x3496b2(0xe6)],_0x3496b2(0xf3))){_0x3a94f9+=0x3e8;continue;}throw new Error(_0x2596f8[_0x3496b2(0xb4)]||_0x2596f8[_0x3496b2(0xe6)]||_0x810ced[_0x3496b2(0xee)]);}throw new Error(_0x810ced[_0x3496b2(0xb6)]);}async function fetchUserProfile(_0xac4953){const _0x34f87f=_0xe73600,_0x2a829d=getApiBaseUrl();try{const _0x155cad=await fetch(_0x2a829d+'/organization/me',{'method':'GET','headers':{'workos-token':_0xac4953}});if(_0x155cad['ok'])return _0x155cad[_0x34f87f(0xab)]();}catch{}return null;}function buildKeyName(_0x31db52,_0x295261){const _0x52e213=_0xe73600,_0x5e5d33={'eRvgY':function(_0x5dbfcc,_0x43f6a6){return _0x5dbfcc+_0x43f6a6;}},_0x58a501=_0x295261['filter'](_0x45b805=>_0x45b805[_0x52e213(0xd4)]===_0x31db52||_0x45b805['name'][_0x52e213(0xbb)](_0x31db52+'\x20('));if(_0x58a501[_0x52e213(0xc4)]===0x0)return _0x31db52;return _0x31db52+'\x20('+_0x5e5d33['eRvgY'](_0x58a501[_0x52e213(0xc4)],0x1)+')';}export async function provisionApiKey(_0x500e3e){const _0xfbbc69=_0xe73600,_0x9adb8c={'zztSa':_0xfbbc69(0xdd),'FizNX':function(_0x2be461,_0x2e52cd){return _0x2be461(_0x2e52cd);},'peJjM':function(_0x12a761,_0x51cc0e,_0x393024){return _0x12a761(_0x51cc0e,_0x393024);},'kKdei':function(_0x446f76,_0x383574,_0x4406ae){return _0x446f76(_0x383574,_0x4406ae);},'idEMk':_0xfbbc69(0xc5)},_0x45cd36=getApiBaseUrl(),_0x1d38db={'Content-Type':_0x9adb8c[_0xfbbc69(0xf6)],'workos-token':_0x500e3e},_0x27026f=await _0x9adb8c[_0xfbbc69(0xae)](fetchUserProfile,_0x500e3e),_0x4048b0=_0x27026f?.['firstName']||_0x27026f?.[_0xfbbc69(0xf9)]?.['split']('@')[0x0],_0xea0d82=_0x4048b0?_0x4048b0+'\x27s\x20CLI\x20Key':'CLI\x20Key';let _0xc3a650=[];try{const _0x171354=await _0x9adb8c['peJjM'](fetch,_0x45cd36+_0xfbbc69(0xe0),{'method':_0xfbbc69(0xec),'headers':_0x1d38db});if(_0x171354['ok']){const _0x2048ad=await _0x171354[_0xfbbc69(0xab)]();_0xc3a650=_0x2048ad['apiKeys'];}}catch{}const _0x4b951e=buildKeyName(_0xea0d82,_0xc3a650),_0x327ada=await _0x9adb8c[_0xfbbc69(0xe3)](fetch,_0x45cd36+'/api-keys',{'method':'POST','headers':_0x1d38db,'body':JSON['stringify']({'name':_0x4b951e,'scope':_0x9adb8c['idEMk']})});if(!_0x327ada['ok']){const _0x15f7a7=await _0x327ada['text']();throw new Error(_0xfbbc69(0xc0)+_0x327ada[_0xfbbc69(0xea)]+'\x20'+_0x15f7a7);}const _0x575c77=await _0x327ada['json']();return _0x575c77['apiKey'][_0xfbbc69(0xd9)];}export function openBrowser(_0x123938){const _0x3d5aed=_0xe73600,_0x49b076={'cErrT':function(_0xcf1382,_0x321f05){return _0xcf1382===_0x321f05;},'kEoPX':_0x3d5aed(0xc8),'hmFoe':'open','yzERE':function(_0x3f0f7a,_0x527d70){return _0x3f0f7a(_0x527d70);}},_0x28bb62=process[_0x3d5aed(0xf7)],_0x3e62bc=_0x49b076['cErrT'](_0x28bb62,_0x49b076[_0x3d5aed(0xce)])?_0x49b076['hmFoe']:_0x49b076['cErrT'](_0x28bb62,'win32')?_0x3d5aed(0xc3):_0x3d5aed(0xc7);_0x49b076['yzERE'](exec,_0x3e62bc+'\x20'+JSON[_0x3d5aed(0xbd)](_0x123938));}function decodeJwtPayload(_0xac0d71){const _0x4a3ebc=_0xe73600,_0x82eb8f={'nNueU':_0x4a3ebc(0xba)},_0x5e9d68=_0xac0d71[_0x4a3ebc(0xf5)]('.');if(_0x5e9d68['length']!==0x3)throw new Error(_0x82eb8f[_0x4a3ebc(0x100)]);const _0x4adf1c=Buffer['from'](_0x5e9d68[0x1],_0x4a3ebc(0xcc))[_0x4a3ebc(0xb0)](_0x4a3ebc(0xb9));return JSON['parse'](_0x4adf1c);}async function selfServeSignup(_0x440efd){const _0x3ebe2b=_0xe73600,_0x2876c3={'qlujs':function(_0xa09795,_0x33ac57,_0x27e3cd){return _0xa09795(_0x33ac57,_0x27e3cd);}},_0x5f0c98=getApiBaseUrl(),_0x2aea79=await _0x2876c3['qlujs'](fetch,_0x5f0c98+'/organization/self-serve-signup',{'method':'POST','headers':{'Content-Type':_0x3ebe2b(0xdd),'workos-token':_0x440efd}});if(!_0x2aea79['ok']){const _0x3f2eaa=await _0x2aea79[_0x3ebe2b(0xd3)]();throw new Error(_0x3ebe2b(0xe5)+_0x2aea79[_0x3ebe2b(0xea)]+'\x20'+_0x3f2eaa);}return _0x2aea79['json']();}async function fetchMyMemberships(_0x3cb2ad){const _0x341933=_0xe73600,_0xc9d5dd={'aeLIr':'GET'},_0x50d0d1=getApiBaseUrl(),_0x2cb06a=await fetch(_0x50d0d1+_0x341933(0xfd),{'method':_0xc9d5dd[_0x341933(0xe4)],'headers':{'workos-token':_0x3cb2ad}});if(!_0x2cb06a['ok']){const _0x337d72=await _0x2cb06a['text']();throw new Error(_0x341933(0xd7)+_0x2cb06a['status']+'\x20'+_0x337d72);}const _0x23f8b5=await _0x2cb06a['json']();return _0x23f8b5['memberships'];}async function refreshTokenWithOrg(_0x296d63,_0x5e7492,_0x24c493){const _0x53529d=_0xe73600,_0x126cb9={'JyLLs':function(_0x24d4e2,_0x6b0a13,_0x244062){return _0x24d4e2(_0x6b0a13,_0x244062);},'GAsVy':'application/x-www-form-urlencoded','QMfXw':'refresh_token'},_0xd3cd8a=await _0x126cb9['JyLLs'](fetch,WORKOS_TOKEN_URL,{'method':_0x53529d(0xb3),'headers':{'Content-Type':_0x126cb9['GAsVy']},'body':new URLSearchParams({'client_id':_0x296d63,'grant_type':_0x126cb9[_0x53529d(0xcd)],'refresh_token':_0x5e7492,'organization_id':_0x24c493})});if(!_0xd3cd8a['ok']){const _0x135357=await _0xd3cd8a[_0x53529d(0xd3)]();throw new Error(_0x53529d(0xef)+_0xd3cd8a[_0x53529d(0xea)]+'\x20'+_0x135357);}return _0xd3cd8a[_0x53529d(0xab)]();}export async function runDeviceAuthFlow(){const _0x78d9fa=_0xe73600,_0xf49a87={'ajKFM':function(_0x563a17){return _0x563a17();},'Qqaki':function(_0xfac551,_0x27e68c){return _0xfac551(_0x27e68c);},'YbStj':'\x0a🔐\x20Opening\x20browser\x20to\x20log\x20in...','sfzGL':function(_0x3a7a5b,_0x217591){return _0x3a7a5b(_0x217591);},'noqKm':function(_0x3e828a,_0x48514f){return _0x3e828a===_0x48514f;},'NBsAP':_0x78d9fa(0xdf),'EBwhs':function(_0xa201b2,_0x19374e){return _0xa201b2(_0x19374e);},'uduuE':_0x78d9fa(0xdc),'VjgFr':_0x78d9fa(0xf0),'dUfnp':function(_0x50a021,_0x30949c){return _0x50a021(_0x30949c);}},_0x2ff931=_0xf49a87[_0x78d9fa(0xdb)](getCurrentEnvironment),_0x622e27=ENVIRONMENT_CONFIGS[_0x2ff931][_0x78d9fa(0xd6)],_0x3baed9=await _0xf49a87['Qqaki'](requestDeviceCode,_0x622e27);console['log'](_0xf49a87[_0x78d9fa(0xeb)]),console[_0x78d9fa(0xe7)](_0x78d9fa(0xf2)),_0xf49a87['sfzGL'](openBrowser,_0x3baed9['verification_uri_complete']),console[_0x78d9fa(0xe7)]('If\x20the\x20browser\x20doesn\x27t\x20open,\x20visit:\x20'+_0x3baed9[_0x78d9fa(0xfe)]),console[_0x78d9fa(0xe7)]('Code:\x20'+_0x3baed9[_0x78d9fa(0xd5)]+'\x0a'),process[_0x78d9fa(0xc9)][_0x78d9fa(0xbf)]('Waiting\x20for\x20authentication...');let _0x3502e9=await pollForTokens(_0x622e27,_0x3baed9['device_code'],_0x3baed9['interval'],_0x3baed9['expires_in']);console['log']('\x20✓');const _0x2b0fec=_0xf49a87['sfzGL'](decodeJwtPayload,_0x3502e9[_0x78d9fa(0xe2)]);if(!_0x2b0fec[_0x78d9fa(0xc1)]){const _0x3cfd52=await fetchMyMemberships(_0x3502e9['access_token']);let _0x173da9;if(_0xf49a87['noqKm'](_0x3cfd52['length'],0x0)){process['stdout']['write'](_0xf49a87[_0x78d9fa(0xfb)]);const _0x2227d8=await _0xf49a87[_0x78d9fa(0xbc)](selfServeSignup,_0x3502e9[_0x78d9fa(0xe2)]);_0x173da9=_0x2227d8[_0x78d9fa(0xaf)],console['log']('\x20✓');}else{if(_0xf49a87['noqKm'](_0x3cfd52[_0x78d9fa(0xc4)],0x1))_0x173da9=_0x3cfd52[0x0][_0x78d9fa(0xaf)],console['log'](_0x78d9fa(0xf1)+_0x3cfd52[0x0][_0x78d9fa(0xd4)]);else{const _0x537319=process[_0x78d9fa(0xf4)][_0x78d9fa(0xff)]&&process[_0x78d9fa(0xc9)]['isTTY'];if(!_0x537319)throw new Error(_0x78d9fa(0xd2)+'Use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.');const {selected:_0x1dd12d}=await _0x3ffb7e['prompt']([{'type':_0xf49a87['uduuE'],'name':_0xf49a87[_0x78d9fa(0xc2)],'message':_0x78d9fa(0xca),'choices':_0x3cfd52['map'](_0x490075=>({'name':_0x490075['name'],'value':_0x490075[_0x78d9fa(0xaf)]}))}]);_0x173da9=_0x1dd12d;}}_0x3502e9=await refreshTokenWithOrg(_0x622e27,_0x3502e9[_0x78d9fa(0xfa)],_0x173da9);}process['stdout']['write']('Provisioning\x20API\x20key...');const _0x1afd9f=await _0xf49a87[_0x78d9fa(0xcb)](provisionApiKey,_0x3502e9['access_token']);return console['log']('\x20✓'),await _0xf49a87[_0x78d9fa(0xe1)](storeToken,_0x1afd9f),_0x3502e9[_0x78d9fa(0xfa)]&&await storeRefreshToken(_0x3502e9[_0x78d9fa(0xfa)]),_0x1afd9f;}function sleep(_0x40e63e){return new Promise(_0x52b9e9=>setTimeout(_0x52b9e9,_0x40e63e));}
@@ -1 +1 @@
1
- function _0x3166(){const _0x487405=['4298DLBkxn','UagcL','1512504LzELgO','https://api.ranger.net','7278zuSkmo','76428ScQtzX','126483snxPkw','74pRxjdw','local','client_01J9CBYM2DKWV9HM17D95Z540K','3141eZmMuQ','https://ai-proxy-716115358910.us-central1.run.app','40tWdLIG','266aGTokn','staging','OzDmv','3454MUPkCF','aiProxyUrl','1888YweAgc','prod','5360LARecl'];_0x3166=function(){return _0x487405;};return _0x3166();}const _0x12a06f=_0x5622;function _0x5622(_0x1302e6,_0xb5733e){_0x1302e6=_0x1302e6-0x18d;const _0x316623=_0x3166();let _0x56220f=_0x316623[_0x1302e6];return _0x56220f;}(function(_0x279ef7,_0x1abfad){const _0x749014=_0x5622,_0x5d9c80=_0x279ef7();while(!![]){try{const _0x28b195=parseInt(_0x749014(0x18d))/0x1*(-parseInt(_0x749014(0x19b))/0x2)+parseInt(_0x749014(0x1a1))/0x3+parseInt(_0x749014(0x1a0))/0x4*(parseInt(_0x749014(0x192))/0x5)+parseInt(_0x749014(0x19f))/0x6*(-parseInt(_0x749014(0x193))/0x7)+-parseInt(_0x749014(0x198))/0x8*(-parseInt(_0x749014(0x190))/0x9)+parseInt(_0x749014(0x19a))/0xa*(parseInt(_0x749014(0x196))/0xb)+-parseInt(_0x749014(0x19d))/0xc;if(_0x28b195===_0x1abfad)break;else _0x5d9c80['push'](_0x5d9c80['shift']());}catch(_0x23705c){_0x5d9c80['push'](_0x5d9c80['shift']());}}}(_0x3166,0x1bf5b));export const ENVIRONMENT_CONFIGS={'prod':{'apiBaseUrl':_0x12a06f(0x19e),'workosClientId':'client_01J9CBYM7M5ZETCF7G6614DXR2','aiProxyUrl':_0x12a06f(0x191)},'staging':{'apiBaseUrl':'https://api.staging.ranger.net','workosClientId':_0x12a06f(0x18f),'aiProxyUrl':'https://ai-proxy-301751771437.us-central1.run.app'},'local':{'apiBaseUrl':'http://localhost:8080','workosClientId':_0x12a06f(0x18f),'aiProxyUrl':'http://localhost:8090'}};export const DEFAULT_ENVIRONMENT=_0x12a06f(0x199);export function isValidEnvironment(_0x58f2c1){const _0x195d77=_0x12a06f,_0x494dd={'OzDmv':function(_0x14383,_0x2677ec){return _0x14383===_0x2677ec;},'UagcL':_0x195d77(0x199),'rTHhn':_0x195d77(0x194),'XpIZv':_0x195d77(0x18e)};return _0x494dd[_0x195d77(0x195)](_0x58f2c1,_0x494dd[_0x195d77(0x19c)])||_0x494dd[_0x195d77(0x195)](_0x58f2c1,_0x494dd['rTHhn'])||_0x58f2c1===_0x494dd['XpIZv'];}export function getCurrentEnvironment(){const _0x5461b2=process['env']['RANGER_CLI_ENV'];if(_0x5461b2&&isValidEnvironment(_0x5461b2))return _0x5461b2;return DEFAULT_ENVIRONMENT;}export function getApiBaseUrl(){return ENVIRONMENT_CONFIGS[getCurrentEnvironment()]['apiBaseUrl'];}export function getAiProxyUrl(){const _0x47dd59=_0x12a06f;return ENVIRONMENT_CONFIGS[getCurrentEnvironment()][_0x47dd59(0x197)];}
1
+ const _0x5500ca=_0x58f0;function _0x58f0(_0x421570,_0x2275ea){_0x421570=_0x421570-0x186;const _0x2c820d=_0x2c82();let _0x58f0f1=_0x2c820d[_0x421570];return _0x58f0f1;}(function(_0xf6bebc,_0x11b89b){const _0x492216=_0x58f0,_0x123d58=_0xf6bebc();while(!![]){try{const _0x11f448=parseInt(_0x492216(0x18f))/0x1+parseInt(_0x492216(0x196))/0x2+parseInt(_0x492216(0x191))/0x3*(-parseInt(_0x492216(0x198))/0x4)+-parseInt(_0x492216(0x186))/0x5+parseInt(_0x492216(0x18e))/0x6+-parseInt(_0x492216(0x18d))/0x7+parseInt(_0x492216(0x193))/0x8;if(_0x11f448===_0x11b89b)break;else _0x123d58['push'](_0x123d58['shift']());}catch(_0x259a1d){_0x123d58['push'](_0x123d58['shift']());}}}(_0x2c82,0xc329d));export const ENVIRONMENT_CONFIGS={'prod':{'apiBaseUrl':'https://api.ranger.net','workosClientId':_0x5500ca(0x195),'aiProxyUrl':'https://ai-proxy-716115358910.us-central1.run.app'},'staging':{'apiBaseUrl':'https://api.staging.ranger.net','workosClientId':_0x5500ca(0x194),'aiProxyUrl':_0x5500ca(0x187)},'local':{'apiBaseUrl':_0x5500ca(0x199),'workosClientId':'client_01J9CBYM2DKWV9HM17D95Z540K','aiProxyUrl':_0x5500ca(0x189)}};export const DEFAULT_ENVIRONMENT='prod';function _0x2c82(){const _0x41cc41=['client_01J9CBYM7M5ZETCF7G6614DXR2','2169308fFzwpr','Xgzik','1436IrcSlA','http://localhost:8080','6291975DmnMPP','https://ai-proxy-301751771437.us-central1.run.app','local','http://localhost:8090','WTkgv','jQPyy','apiBaseUrl','3116085XVIeOS','234522mGnTCb','621321EGfxha','RANGER_CLI_ENV','3081vYqGtk','ZbGAw','9012560ggPytq','client_01J9CBYM2DKWV9HM17D95Z540K'];_0x2c82=function(){return _0x41cc41;};return _0x2c82();}export function isValidEnvironment(_0x33c0f5){const _0x311c7b=_0x5500ca,_0x12f69a={'Xgzik':function(_0x2ec6b0,_0x4ba3fa){return _0x2ec6b0===_0x4ba3fa;},'WTkgv':'prod','jQPyy':function(_0x30f58c,_0x57aa5b){return _0x30f58c===_0x57aa5b;}};return _0x12f69a[_0x311c7b(0x197)](_0x33c0f5,_0x12f69a[_0x311c7b(0x18a)])||_0x33c0f5==='staging'||_0x12f69a[_0x311c7b(0x18b)](_0x33c0f5,_0x311c7b(0x188));}export function getCurrentEnvironment(){const _0x3930e3=_0x5500ca,_0x4aeaf6={'ZbGAw':function(_0x48782d,_0x13705f){return _0x48782d(_0x13705f);}},_0x344a4c=process['env'][_0x3930e3(0x190)];if(_0x344a4c&&_0x4aeaf6[_0x3930e3(0x192)](isValidEnvironment,_0x344a4c))return _0x344a4c;return DEFAULT_ENVIRONMENT;}export function getApiBaseUrl(){const _0x4c605b=_0x5500ca,_0x18adb2={'spWCK':function(_0x2f3876){return _0x2f3876();}};return ENVIRONMENT_CONFIGS[_0x18adb2['spWCK'](getCurrentEnvironment)][_0x4c605b(0x18c)];}export function getAiProxyUrl(){return ENVIRONMENT_CONFIGS[getCurrentEnvironment()]['aiProxyUrl'];}
@@ -1 +1 @@
1
- (function(_0x38e5d4,_0x475890){const _0x3ac777=_0x1f8f,_0x3e0fe6=_0x38e5d4();while(!![]){try{const _0x16147a=-parseInt(_0x3ac777(0x107))/0x1*(-parseInt(_0x3ac777(0xf9))/0x2)+-parseInt(_0x3ac777(0xe7))/0x3+parseInt(_0x3ac777(0x102))/0x4+-parseInt(_0x3ac777(0xe0))/0x5+-parseInt(_0x3ac777(0x100))/0x6+parseInt(_0x3ac777(0xe2))/0x7+parseInt(_0x3ac777(0xfb))/0x8*(parseInt(_0x3ac777(0xff))/0x9);if(_0x16147a===_0x475890)break;else _0x3e0fe6['push'](_0x3e0fe6['shift']());}catch(_0x41a943){_0x3e0fe6['push'](_0x3e0fe6['shift']());}}}(_0x4d6b,0xea084));import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{withRetry}from'./retry.js';function _0x1f8f(_0x6569e7,_0x3b095a){_0x6569e7=_0x6569e7-0xcc;const _0x4d6b10=_0x4d6b();let _0x1f8f7e=_0x4d6b10[_0x6569e7];return _0x1f8f7e;}function _0x4d6b(){const _0x2db10b=['toString','offset','limit','itemIds','includeDeleted','gitBranch','rhdmm','application/json','Bearer\x20','/checklist/','1431380ovQwPC','PSAfM','5053538zloCBS','pLwpb','GET','stringify','fvLzI','656940pVkgSR','gitRepoUrl','No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','lfrAJ','json','Failed\x20to\x20get\x20feature\x20review\x20report:\x20','HBLZu','set','OjumP','OGQPk','ivBFU','POST','NaEYk','text','Failed\x20to\x20create\x20scenario:\x20','Failed\x20to\x20update\x20feature\x20review:\x20','uImwH','PATCH','1240zZHUnJ','JBYlY','427048ZVkkEv','qdWod','style','lrdhe','18RTtCSa','4553652iLAgBf','/api/v1/mcp/features/','1948152oPBvvi','Failed\x20to\x20conclude\x20session:\x20','wgqVX','Yilef','Failed\x20to\x20create\x20feature\x20review:\x20','1463siBgPl','pyMcs','GNiQt','/api/v1/mcp/features','UQTUZ','OaEQM','EIrVo','hpXYB','LgmRG','iujYE','/report'];_0x4d6b=function(){return _0x2db10b;};return _0x4d6b();}export async function createFeature(_0x5e0154){const _0x4bda5e=_0x1f8f,_0x5cbddd={'ivBFU':_0x4bda5e(0xe9),'emaTO':function(_0x4ad16c){return _0x4ad16c();},'hpXYB':function(_0x38f746,_0x37b986,_0x3e085d){return _0x38f746(_0x37b986,_0x3e085d);},'iujYE':_0x4bda5e(0xf2)},_0x1195a0=await getToken();if(!_0x1195a0)throw new Error(_0x5cbddd[_0x4bda5e(0xf1)]);const _0x3242fb=_0x5cbddd['emaTO'](getApiBaseUrl),_0x1263ae=await _0x5cbddd[_0x4bda5e(0xd2)](fetch,_0x3242fb+_0x4bda5e(0xce),{'method':_0x5cbddd[_0x4bda5e(0xd4)],'headers':{'Authorization':_0x4bda5e(0xde)+_0x1195a0,'Content-Type':_0x4bda5e(0xdd)},'body':JSON[_0x4bda5e(0xe5)](_0x5e0154)});if(!_0x1263ae['ok']){const _0x346091=await _0x1263ae[_0x4bda5e(0xf4)]();throw new Error(_0x4bda5e(0x106)+_0x346091);}return _0x1263ae[_0x4bda5e(0xeb)]();}export async function listFeatures(_0x22c192){const _0x5c5612=_0x1f8f,_0x454581={'rhdmm':function(_0x5cc6be){return _0x5cc6be();},'PMenE':'gitRepoUrl','UQTUZ':_0x5c5612(0xdb),'GNiQt':_0x5c5612(0xd8),'ebxfJ':_0x5c5612(0xda),'GZVjo':function(_0x44d261,_0x14fcfa,_0x2216a7){return _0x44d261(_0x14fcfa,_0x2216a7);},'pLwpb':'GET'},_0x578b99=await _0x454581[_0x5c5612(0xdc)](getToken);if(!_0x578b99)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0x2a4375=getApiBaseUrl(),_0x42e682=new URLSearchParams();if(_0x22c192?.[_0x5c5612(0xe8)])_0x42e682['set'](_0x454581['PMenE'],_0x22c192[_0x5c5612(0xe8)]);if(_0x22c192?.['gitBranch'])_0x42e682[_0x5c5612(0xee)](_0x454581[_0x5c5612(0xcf)],_0x22c192[_0x5c5612(0xdb)]);if(_0x22c192?.['limit'])_0x42e682[_0x5c5612(0xee)](_0x454581[_0x5c5612(0xcd)],_0x22c192[_0x5c5612(0xd8)][_0x5c5612(0xd6)]());if(_0x22c192?.[_0x5c5612(0xd7)])_0x42e682[_0x5c5612(0xee)](_0x5c5612(0xd7),_0x22c192['offset'][_0x5c5612(0xd6)]());if(_0x22c192?.['includeDeleted'])_0x42e682['set'](_0x454581['ebxfJ'],'true');const _0x109707=_0x2a4375+_0x5c5612(0xce)+(_0x42e682[_0x5c5612(0xd6)]()?'?'+_0x42e682[_0x5c5612(0xd6)]():''),_0x5a6932=await _0x454581['GZVjo'](fetch,_0x109707,{'method':_0x454581[_0x5c5612(0xe3)],'headers':{'Authorization':_0x5c5612(0xde)+_0x578b99}});if(!_0x5a6932['ok']){const _0x556672=await _0x5a6932['text']();throw new Error('Failed\x20to\x20list\x20feature\x20reviews:\x20'+_0x556672);}return _0x5a6932[_0x5c5612(0xeb)]();}export async function getFeature(_0x107994){const _0x292f03=_0x1f8f,_0x290cc4={'qdWod':_0x292f03(0xe9),'wgqVX':function(_0x3e3307){return _0x3e3307();}},_0x127604=await getToken();if(!_0x127604)throw new Error(_0x290cc4[_0x292f03(0xfc)]);const _0x241bd3=_0x290cc4[_0x292f03(0x104)](getApiBaseUrl),_0x34f17b=await fetch(_0x241bd3+_0x292f03(0x101)+_0x107994,{'method':_0x292f03(0xe4),'headers':{'Authorization':'Bearer\x20'+_0x127604}});if(!_0x34f17b['ok']){const _0x38812d=await _0x34f17b['text']();throw new Error('Failed\x20to\x20get\x20feature\x20review:\x20'+_0x38812d);}return _0x34f17b[_0x292f03(0xeb)]();}export async function updateFeature(_0xa87a19,_0x3ad4a1){const _0x2c704e=_0x1f8f,_0x3d2ab3={'hJvIj':function(_0x3975ea){return _0x3975ea();},'EIrVo':function(_0x3e0f83,_0x5eb97a,_0x4374fe){return _0x3e0f83(_0x5eb97a,_0x4374fe);},'HBLZu':_0x2c704e(0xf8),'Yilef':_0x2c704e(0xdd)},_0x58fc86=await _0x3d2ab3['hJvIj'](getToken);if(!_0x58fc86)throw new Error(_0x2c704e(0xe9));const _0x5aa8fe=getApiBaseUrl(),_0x4b0358=await _0x3d2ab3[_0x2c704e(0xd1)](fetch,_0x5aa8fe+'/api/v1/mcp/features/'+_0xa87a19,{'method':_0x3d2ab3[_0x2c704e(0xed)],'headers':{'Authorization':_0x2c704e(0xde)+_0x58fc86,'Content-Type':_0x3d2ab3[_0x2c704e(0x105)]},'body':JSON['stringify'](_0x3ad4a1)});if(!_0x4b0358['ok']){const _0x36e2d7=await _0x4b0358[_0x2c704e(0xf4)]();throw new Error(_0x2c704e(0xf6)+_0x36e2d7);}return _0x4b0358[_0x2c704e(0xeb)]();}export async function createChecklistItem(_0x2ab93c,_0x5b50f9,_0x42a451){const _0x435007=_0x1f8f,_0x21b0a2={'JVUMc':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','EiLhY':function(_0x50c00d){return _0x50c00d();},'lfrAJ':function(_0x5774f7,_0xc5aa2d,_0x409e6a){return _0x5774f7(_0xc5aa2d,_0x409e6a);},'lrdhe':_0x435007(0xf2),'pssWK':'application/json'},_0x173bbc=await getToken();if(!_0x173bbc)throw new Error(_0x21b0a2['JVUMc']);const _0x219058=_0x21b0a2['EiLhY'](getApiBaseUrl),_0x3e5f09=await _0x21b0a2[_0x435007(0xea)](fetch,_0x219058+'/api/v1/mcp/features/'+_0x2ab93c+'/checklist',{'method':_0x21b0a2[_0x435007(0xfe)],'headers':{'Authorization':'Bearer\x20'+_0x173bbc,'Content-Type':_0x21b0a2['pssWK']},'body':JSON[_0x435007(0xe5)]({'description':_0x5b50f9,'position':_0x42a451})});if(!_0x3e5f09['ok']){const _0x430771=await _0x3e5f09[_0x435007(0xf4)]();throw new Error(_0x435007(0xf5)+_0x430771);}return _0x3e5f09['json']();}export async function updateChecklistItem(_0x2a2b20,_0x47035d,_0x5a04cf){const _0x44673f=_0x1f8f,_0x42cb35={'ytzUk':_0x44673f(0xe9),'fvLzI':function(_0x1d7b0f,_0x59f294,_0x35687e){return _0x1d7b0f(_0x59f294,_0x35687e);}};return withRetry(async()=>{const _0x1d538b=_0x44673f,_0x5e84df=await getToken();if(!_0x5e84df)throw new Error(_0x42cb35['ytzUk']);const _0x20b695=getApiBaseUrl(),_0x441c50=await _0x42cb35[_0x1d538b(0xe6)](fetch,_0x20b695+'/api/v1/mcp/features/'+_0x2a2b20+_0x1d538b(0xdf)+_0x47035d,{'method':'PATCH','headers':{'Authorization':_0x1d538b(0xde)+_0x5e84df,'Content-Type':_0x1d538b(0xdd)},'body':JSON[_0x1d538b(0xe5)](_0x5a04cf)});if(!_0x441c50['ok']){const _0x3dfc77=await _0x441c50[_0x1d538b(0xf4)]();throw new Error('Failed\x20to\x20update\x20scenario:\x20'+_0x3dfc77);}return _0x441c50[_0x1d538b(0xeb)]();},{'label':'updateChecklistItem'});}export async function getFeatureReport(_0x317525){const _0x5348f1=_0x1f8f,_0xe8d3af={'PhgkB':function(_0x59033d){return _0x59033d();},'IWYxK':function(_0x15cc80,_0x45e00f,_0x119a91){return _0x15cc80(_0x45e00f,_0x119a91);},'OaEQM':'GET'},_0x32d763=await getToken();if(!_0x32d763)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0x5cac7b=_0xe8d3af['PhgkB'](getApiBaseUrl),_0xbed629=await _0xe8d3af['IWYxK'](fetch,_0x5cac7b+_0x5348f1(0x101)+_0x317525+_0x5348f1(0xd5),{'method':_0xe8d3af[_0x5348f1(0xd0)],'headers':{'Authorization':_0x5348f1(0xde)+_0x32d763}});if(!_0xbed629['ok']){const _0x2d1ff5=await _0xbed629[_0x5348f1(0xf4)]();throw new Error(_0x5348f1(0xec)+_0x2d1ff5);}return _0xbed629[_0x5348f1(0xeb)]();}export async function getFeatureReportMarkdown(_0x3ef691,_0x3b055a){const _0x551adc=_0x1f8f,_0x5db271={'LgmRG':function(_0x2ea0c4){return _0x2ea0c4();},'DrmSS':function(_0x5bb331,_0x2bf7a0){return _0x5bb331>_0x2bf7a0;},'NaEYk':'itemIds','RfpOc':'sessionId','uImwH':_0x551adc(0xe4)},_0x1ed542=await getToken();if(!_0x1ed542)throw new Error(_0x551adc(0xe9));const _0x7705ed=_0x5db271[_0x551adc(0xd3)](getApiBaseUrl),_0x146374=new URLSearchParams(),_0x8f13b8=_0x5db271['DrmSS'](_0x3b055a?.[_0x551adc(0xd9)]?.['length']??0x0,0x0),_0x92f431=Boolean(_0x3b055a?.['sessionId']);_0x8f13b8&&_0x3b055a?.['itemIds']&&_0x146374['set'](_0x5db271[_0x551adc(0xf3)],_0x3b055a['itemIds']['join'](','));_0x92f431&&_0x3b055a?.['sessionId']&&_0x146374[_0x551adc(0xee)](_0x5db271['RfpOc'],_0x3b055a['sessionId']);!_0x8f13b8&&!_0x92f431&&_0x3b055a?.['style']&&_0x146374[_0x551adc(0xee)]('style',_0x3b055a[_0x551adc(0xfd)]);const _0x457e15=_0x7705ed+'/api/v1/mcp/features/'+_0x3ef691+'/report/markdown',_0x5743e7=''+_0x457e15+(_0x146374[_0x551adc(0xd6)]()?'?'+_0x146374['toString']():''),_0x52f3eb=await fetch(_0x5743e7,{'method':_0x5db271[_0x551adc(0xf7)],'headers':{'Authorization':'Bearer\x20'+_0x1ed542}});if(!_0x52f3eb['ok']){const _0x42f6d2=await _0x52f3eb['text']();throw new Error('Failed\x20to\x20get\x20feature\x20review\x20report\x20markdown:\x20'+_0x42f6d2);}return _0x52f3eb[_0x551adc(0xf4)]();}export async function listFeatureSessions(_0x3008a5){const _0xc0670a=_0x1f8f,_0xdc05d2={'oIAOB':function(_0x5d8f04){return _0x5d8f04();},'ifMKA':'GET'},_0xb77375=await getToken();if(!_0xb77375)throw new Error(_0xc0670a(0xe9));const _0x5a130b=_0xdc05d2['oIAOB'](getApiBaseUrl),_0x3e5107=await fetch(_0x5a130b+_0xc0670a(0x101)+_0x3008a5+'/sessions',{'method':_0xdc05d2['ifMKA'],'headers':{'Authorization':_0xc0670a(0xde)+_0xb77375}});if(!_0x3e5107['ok']){const _0x5e3edf=await _0x3e5107[_0xc0670a(0xf4)]();throw new Error('Failed\x20to\x20list\x20sessions:\x20'+_0x5e3edf);}return _0x3e5107['json']();}export async function startSession(_0x137de4,_0x15bca4){const _0x5ed41e=_0x1f8f,_0x1dae93=await getToken();if(!_0x1dae93)throw new Error(_0x5ed41e(0xe9));const _0x30ecce=getApiBaseUrl(),_0x267b53=await fetch(_0x30ecce+_0x5ed41e(0x101)+_0x137de4+'/sessions/'+_0x15bca4+'/start',{'method':_0x5ed41e(0xf2),'headers':{'Authorization':_0x5ed41e(0xde)+_0x1dae93}});if(!_0x267b53['ok']){const _0x611bbc=await _0x267b53['text']();throw new Error('Failed\x20to\x20start\x20session:\x20'+_0x611bbc);}return _0x267b53['json']();}export async function concludeSession(_0x1b5a36,_0x22a46b){const _0x2db246=_0x1f8f,_0x3ddf22={'pdqZh':function(_0x26df6b,_0x1e79cd,_0x16d3dc){return _0x26df6b(_0x1e79cd,_0x16d3dc);}},_0xf52f61=await getToken();if(!_0xf52f61)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0x2ff327=getApiBaseUrl(),_0x2f9f53=await _0x3ddf22['pdqZh'](fetch,_0x2ff327+_0x2db246(0x101)+_0x1b5a36+'/sessions/'+_0x22a46b+'/conclude',{'method':'POST','headers':{'Authorization':'Bearer\x20'+_0xf52f61}});if(!_0x2f9f53['ok']){const _0xacde5b=await _0x2f9f53['text']();throw new Error(_0x2db246(0x103)+_0xacde5b);}return _0x2f9f53[_0x2db246(0xeb)]();}export async function getActionItems(_0x25aeeb){const _0x81c652=_0x1f8f,_0x1ac9cc={'hXFWJ':function(_0x5a5b00){return _0x5a5b00();},'JBYlY':function(_0x342c36){return _0x342c36();},'YWnKp':function(_0x2711c4,_0x2b1894,_0x3238b8){return _0x2711c4(_0x2b1894,_0x3238b8);},'jdiLM':_0x81c652(0xe4)},_0x58326c=await _0x1ac9cc['hXFWJ'](getToken);if(!_0x58326c)throw new Error(_0x81c652(0xe9));const _0x2b3689=_0x1ac9cc[_0x81c652(0xfa)](getApiBaseUrl),_0x1ccd15=await _0x1ac9cc['YWnKp'](fetch,_0x2b3689+_0x81c652(0x101)+_0x25aeeb+'/action-items',{'method':_0x1ac9cc['jdiLM'],'headers':{'Authorization':_0x81c652(0xde)+_0x58326c}});if(!_0x1ccd15['ok']){const _0x4f6df6=await _0x1ccd15[_0x81c652(0xf4)]();throw new Error('Failed\x20to\x20get\x20action\x20items:\x20'+_0x4f6df6);}return _0x1ccd15[_0x81c652(0xeb)]();}export async function getItemFeedback(_0xd3361f,_0x29d54a){const _0x3354ea=_0x1f8f,_0x304863=await getToken();if(!_0x304863)throw new Error(_0x3354ea(0xe9));const _0x8af967=getApiBaseUrl(),_0x4c3cc4=await fetch(_0x8af967+'/api/v1/mcp/features/'+_0xd3361f+'/checklist-items/'+_0x29d54a+'/feedback',{'method':_0x3354ea(0xe4),'headers':{'Authorization':'Bearer\x20'+_0x304863}});if(!_0x4c3cc4['ok']){const _0x17328e=await _0x4c3cc4[_0x3354ea(0xf4)]();throw new Error('Failed\x20to\x20get\x20item\x20feedback:\x20'+_0x17328e);}return _0x4c3cc4[_0x3354ea(0xeb)]();}export async function markCommentsAddressed(_0xac8a65,_0x277bc1,_0x4dc2b6){const _0x4041de=_0x1f8f,_0x508e64={'HsAAu':function(_0x395b57){return _0x395b57();},'OjumP':_0x4041de(0xe9),'Tzypb':function(_0x108cff){return _0x108cff();},'PSAfM':function(_0x413e10,_0x762830,_0x3c260c){return _0x413e10(_0x762830,_0x3c260c);},'pyMcs':'POST'},_0x409d74=await _0x508e64['HsAAu'](getToken);if(!_0x409d74)throw new Error(_0x508e64[_0x4041de(0xef)]);const _0x1fc9d0=_0x508e64['Tzypb'](getApiBaseUrl),_0x308200=await _0x508e64[_0x4041de(0xe1)](fetch,_0x1fc9d0+_0x4041de(0x101)+_0xac8a65+'/comments/address',{'method':_0x508e64[_0x4041de(0xcc)],'headers':{'Authorization':_0x4041de(0xde)+_0x409d74,'Content-Type':_0x4041de(0xdd)},'body':JSON[_0x4041de(0xe5)]({'checklistItemId':_0x277bc1,'commentIds':_0x4dc2b6})});if(!_0x308200['ok']){const _0x5114fb=await _0x308200[_0x4041de(0xf4)]();throw new Error('Failed\x20to\x20mark\x20comments\x20as\x20addressed:\x20'+_0x5114fb);}}export async function softDeleteFeature(_0xbde06e){const _0x4c4fe9=_0x1f8f,_0x14f410={'TPaJW':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','OGQPk':function(_0x7dc020,_0x4c47b0,_0x5ab8d2){return _0x7dc020(_0x4c47b0,_0x5ab8d2);},'bciBR':'DELETE'},_0x46d128=await getToken();if(!_0x46d128)throw new Error(_0x14f410['TPaJW']);const _0x1d654a=getApiBaseUrl(),_0x3a13fc=await _0x14f410[_0x4c4fe9(0xf0)](fetch,_0x1d654a+'/api/v1/mcp/features/'+_0xbde06e,{'method':_0x14f410['bciBR'],'headers':{'Authorization':'Bearer\x20'+_0x46d128}});if(!_0x3a13fc['ok']){const _0x3428b0=await _0x3a13fc[_0x4c4fe9(0xf4)]();throw new Error('Failed\x20to\x20delete\x20feature\x20review:\x20'+_0x3428b0);}}export async function restoreFeature(_0x251730){const _0x863f20=_0x1f8f,_0x438ccc=await getToken();if(!_0x438ccc)throw new Error(_0x863f20(0xe9));const _0x42e2fb=getApiBaseUrl(),_0x570ce3=await fetch(_0x42e2fb+'/api/v1/mcp/features/'+_0x251730+'/restore',{'method':'POST','headers':{'Authorization':_0x863f20(0xde)+_0x438ccc}});if(!_0x570ce3['ok']){const _0x4d15f8=await _0x570ce3['text']();throw new Error('Failed\x20to\x20restore\x20feature\x20review:\x20'+_0x4d15f8);}}
1
+ (function(_0x4c4b0a,_0x5806b1){const _0x4a408a=_0x307f,_0x35a9cf=_0x4c4b0a();while(!![]){try{const _0x44d090=parseInt(_0x4a408a(0x83))/0x1+-parseInt(_0x4a408a(0xba))/0x2*(parseInt(_0x4a408a(0xbd))/0x3)+-parseInt(_0x4a408a(0x82))/0x4*(parseInt(_0x4a408a(0xb3))/0x5)+parseInt(_0x4a408a(0x94))/0x6+-parseInt(_0x4a408a(0xb6))/0x7*(-parseInt(_0x4a408a(0x88))/0x8)+-parseInt(_0x4a408a(0xa4))/0x9+parseInt(_0x4a408a(0x87))/0xa;if(_0x44d090===_0x5806b1)break;else _0x35a9cf['push'](_0x35a9cf['shift']());}catch(_0x5c6a70){_0x35a9cf['push'](_0x35a9cf['shift']());}}}(_0x4178,0x7193f));import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{withRetry}from'./retry.js';export async function createFeature(_0x4e8904){const _0xbdb20e=_0x307f,_0x1a2e50={'diFcK':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','RwRdu':'application/json'},_0x3823b5=await getToken();if(!_0x3823b5)throw new Error(_0x1a2e50[_0xbdb20e(0x9e)]);const _0x199fa5=getApiBaseUrl(),_0x2f9b2b=await fetch(_0x199fa5+'/api/v1/mcp/features',{'method':'POST','headers':{'Authorization':_0xbdb20e(0xad)+_0x3823b5,'Content-Type':_0x1a2e50['RwRdu']},'body':JSON['stringify'](_0x4e8904)});if(!_0x2f9b2b['ok']){const _0x4326b0=await _0x2f9b2b[_0xbdb20e(0x9c)]();throw new Error('Failed\x20to\x20create\x20feature\x20review:\x20'+_0x4326b0);}return _0x2f9b2b['json']();}export async function listFeatures(_0x2b8147){const _0x16960=_0x307f,_0x35eb2e={'PYRax':function(_0x12f4e5){return _0x12f4e5();},'mqbHL':'gitRepoUrl','vpIwO':_0x16960(0x8b),'pRbHW':function(_0x4784b9,_0x245548,_0x270260){return _0x4784b9(_0x245548,_0x270260);},'BBWat':'GET'},_0x434bd1=await _0x35eb2e[_0x16960(0xa7)](getToken);if(!_0x434bd1)throw new Error(_0x16960(0xbc));const _0x4520c6=getApiBaseUrl(),_0x109594=new URLSearchParams();if(_0x2b8147?.['gitRepoUrl'])_0x109594[_0x16960(0xc2)](_0x35eb2e[_0x16960(0x9f)],_0x2b8147['gitRepoUrl']);if(_0x2b8147?.[_0x16960(0x92)])_0x109594[_0x16960(0xc2)]('gitBranch',_0x2b8147[_0x16960(0x92)]);if(_0x2b8147?.[_0x16960(0xc3)])_0x109594['set'](_0x16960(0xc3),_0x2b8147['limit'][_0x16960(0xb9)]());if(_0x2b8147?.['offset'])_0x109594[_0x16960(0xc2)](_0x16960(0xbe),_0x2b8147[_0x16960(0xbe)]['toString']());if(_0x2b8147?.[_0x16960(0x8b)])_0x109594['set'](_0x35eb2e['vpIwO'],_0x16960(0xaa));const _0x47237e=_0x4520c6+_0x16960(0xc4)+(_0x109594[_0x16960(0xb9)]()?'?'+_0x109594['toString']():''),_0x131462=await _0x35eb2e[_0x16960(0xbb)](fetch,_0x47237e,{'method':_0x35eb2e['BBWat'],'headers':{'Authorization':'Bearer\x20'+_0x434bd1}});if(!_0x131462['ok']){const _0x264d31=await _0x131462[_0x16960(0x9c)]();throw new Error(_0x16960(0xc0)+_0x264d31);}return _0x131462[_0x16960(0xa8)]();}export async function getFeature(_0x16d9b7){const _0x129176=_0x307f,_0x417c9b={'CmETI':function(_0x4194f5){return _0x4194f5();},'yUwjG':_0x129176(0xbc),'kKsGT':function(_0x268843,_0x893d13,_0x6c6266){return _0x268843(_0x893d13,_0x6c6266);},'vmUEO':'GET'},_0x16ef07=await _0x417c9b['CmETI'](getToken);if(!_0x16ef07)throw new Error(_0x417c9b['yUwjG']);const _0x69a6a=getApiBaseUrl(),_0x4ce705=await _0x417c9b[_0x129176(0xb2)](fetch,_0x69a6a+'/api/v1/mcp/features/'+_0x16d9b7,{'method':_0x417c9b['vmUEO'],'headers':{'Authorization':_0x129176(0xad)+_0x16ef07}});if(!_0x4ce705['ok']){const _0x1625e8=await _0x4ce705[_0x129176(0x9c)]();throw new Error('Failed\x20to\x20get\x20feature\x20review:\x20'+_0x1625e8);}return _0x4ce705['json']();}function _0x4178(){const _0x5f252c=['/api/v1/mcp/features','style','4LJUELY','594222EXTRfs','Failed\x20to\x20create\x20scenario:\x20','MJfMf','/restore','5451160dfstfg','2216888PrWbmT','/api/v1/mcp/features/','rUCwU','includeDeleted','/sessions/','Failed\x20to\x20restore\x20feature\x20review:\x20','PrzkG','DELETE','/checklist-items/','uImDa','gitBranch','TOHqR','973722PheAHl','FbOoQ','XgndY','Failed\x20to\x20list\x20sessions:\x20','application/json','/checklist','/report','ULmvY','text','POST','diFcK','mqbHL','VAmNx','itemIds','Failed\x20to\x20start\x20session:\x20','EhuQy','3166875wxEWaq','PvULm','SfFge','PYRax','json','GET','true','cVoNm','/action-items','Bearer\x20','Failed\x20to\x20mark\x20comments\x20as\x20addressed:\x20','RqZRl','nYsyt','/comments/address','kKsGT','1726660weDgNp','PATCH','sessionId','7LKTEKR','EmDMU','stringify','toString','2wJMygE','pRbHW','No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','1248942rphSGr','offset','zSuZW','Failed\x20to\x20list\x20feature\x20reviews:\x20','SCByG','set','limit'];_0x4178=function(){return _0x5f252c;};return _0x4178();}export async function updateFeature(_0x5e0676,_0x474b42){const _0x536280=_0x307f,_0x48c1cb={'fiZfo':_0x536280(0xbc),'SdBBI':function(_0x56a3e3,_0x8fd941,_0x32d6c8){return _0x56a3e3(_0x8fd941,_0x32d6c8);},'NQDVT':'PATCH','nTAWq':_0x536280(0x98)},_0x466fa5=await getToken();if(!_0x466fa5)throw new Error(_0x48c1cb['fiZfo']);const _0x392048=getApiBaseUrl(),_0x5fe8e3=await _0x48c1cb['SdBBI'](fetch,_0x392048+'/api/v1/mcp/features/'+_0x5e0676,{'method':_0x48c1cb['NQDVT'],'headers':{'Authorization':_0x536280(0xad)+_0x466fa5,'Content-Type':_0x48c1cb['nTAWq']},'body':JSON['stringify'](_0x474b42)});if(!_0x5fe8e3['ok']){const _0x453707=await _0x5fe8e3[_0x536280(0x9c)]();throw new Error('Failed\x20to\x20update\x20feature\x20review:\x20'+_0x453707);}return _0x5fe8e3[_0x536280(0xa8)]();}export async function createChecklistItem(_0x46cdc0,_0x53a088,_0x4ddd41){const _0x6d7f90=_0x307f,_0x440cf7={'RqZRl':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','nYsyt':function(_0x57be6a,_0x55034b,_0x6af337){return _0x57be6a(_0x55034b,_0x6af337);}},_0x15b129=await getToken();if(!_0x15b129)throw new Error(_0x440cf7[_0x6d7f90(0xaf)]);const _0x2034c7=getApiBaseUrl(),_0x30b4e0=await _0x440cf7[_0x6d7f90(0xb0)](fetch,_0x2034c7+_0x6d7f90(0x89)+_0x46cdc0+_0x6d7f90(0x99),{'method':'POST','headers':{'Authorization':'Bearer\x20'+_0x15b129,'Content-Type':'application/json'},'body':JSON[_0x6d7f90(0xb8)]({'description':_0x53a088,'position':_0x4ddd41})});if(!_0x30b4e0['ok']){const _0x5296f0=await _0x30b4e0['text']();throw new Error(_0x6d7f90(0x84)+_0x5296f0);}return _0x30b4e0[_0x6d7f90(0xa8)]();}export async function updateChecklistItem(_0x4e0980,_0x300fda,_0x87ee7b){const _0x3b3a75={'uImDa':function(_0x591d4d){return _0x591d4d();},'hVqiD':'application/json'};return withRetry(async()=>{const _0xc48212=_0x307f,_0x463076=await getToken();if(!_0x463076)throw new Error(_0xc48212(0xbc));const _0x20ed8f=_0x3b3a75[_0xc48212(0x91)](getApiBaseUrl),_0x3eed35=await fetch(_0x20ed8f+'/api/v1/mcp/features/'+_0x4e0980+'/checklist/'+_0x300fda,{'method':_0xc48212(0xb4),'headers':{'Authorization':'Bearer\x20'+_0x463076,'Content-Type':_0x3b3a75['hVqiD']},'body':JSON['stringify'](_0x87ee7b)});if(!_0x3eed35['ok']){const _0x56bfb7=await _0x3eed35[_0xc48212(0x9c)]();throw new Error('Failed\x20to\x20update\x20scenario:\x20'+_0x56bfb7);}return _0x3eed35['json']();},{'label':'updateChecklistItem'});}function _0x307f(_0x232a09,_0x46485f){_0x232a09=_0x232a09-0x81;const _0x4178f8=_0x4178();let _0x307ff6=_0x4178f8[_0x232a09];return _0x307ff6;}export async function getFeatureReport(_0x2c7285){const _0x1b5236=_0x307f,_0x480e45={'CNhtR':function(_0x4303e5){return _0x4303e5();}},_0x46647c=await _0x480e45['CNhtR'](getToken);if(!_0x46647c)throw new Error(_0x1b5236(0xbc));const _0x365832=getApiBaseUrl(),_0x46f0ed=await fetch(_0x365832+_0x1b5236(0x89)+_0x2c7285+_0x1b5236(0x9a),{'method':'GET','headers':{'Authorization':_0x1b5236(0xad)+_0x46647c}});if(!_0x46f0ed['ok']){const _0x558c38=await _0x46f0ed[_0x1b5236(0x9c)]();throw new Error('Failed\x20to\x20get\x20feature\x20review\x20report:\x20'+_0x558c38);}return _0x46f0ed[_0x1b5236(0xa8)]();}export async function getFeatureReportMarkdown(_0x58228d,_0x497717){const _0x1f6c78=_0x307f,_0x59e46c={'zSuZW':function(_0x556e62){return _0x556e62();},'SCByG':function(_0x3bd640,_0x13c994){return _0x3bd640>_0x13c994;},'LLxSl':function(_0x159513,_0x11a440){return _0x159513(_0x11a440);},'QYnSy':_0x1f6c78(0xa1),'ULmvY':_0x1f6c78(0xb5),'cVoNm':'GET'},_0xf894b=await _0x59e46c[_0x1f6c78(0xbf)](getToken);if(!_0xf894b)throw new Error(_0x1f6c78(0xbc));const _0xf08e39=getApiBaseUrl(),_0x33ee1d=new URLSearchParams(),_0x1063e0=_0x59e46c[_0x1f6c78(0xc1)](_0x497717?.['itemIds']?.['length']??0x0,0x0),_0x109730=_0x59e46c['LLxSl'](Boolean,_0x497717?.['sessionId']);_0x1063e0&&_0x497717?.[_0x1f6c78(0xa1)]&&_0x33ee1d[_0x1f6c78(0xc2)](_0x59e46c['QYnSy'],_0x497717[_0x1f6c78(0xa1)]['join'](','));_0x109730&&_0x497717?.['sessionId']&&_0x33ee1d[_0x1f6c78(0xc2)](_0x59e46c[_0x1f6c78(0x9b)],_0x497717[_0x1f6c78(0xb5)]);!_0x1063e0&&!_0x109730&&_0x497717?.[_0x1f6c78(0x81)]&&_0x33ee1d['set']('style',_0x497717['style']);const _0x53433=_0xf08e39+_0x1f6c78(0x89)+_0x58228d+'/report/markdown',_0x540cf9=''+_0x53433+(_0x33ee1d['toString']()?'?'+_0x33ee1d['toString']():''),_0x33a3c3=await fetch(_0x540cf9,{'method':_0x59e46c[_0x1f6c78(0xab)],'headers':{'Authorization':'Bearer\x20'+_0xf894b}});if(!_0x33a3c3['ok']){const _0x5671b6=await _0x33a3c3[_0x1f6c78(0x9c)]();throw new Error('Failed\x20to\x20get\x20feature\x20review\x20report\x20markdown:\x20'+_0x5671b6);}return _0x33a3c3['text']();}export async function listFeatureSessions(_0x4b4359){const _0x1078db=_0x307f,_0x4f2e77={'NFERK':function(_0x351856){return _0x351856();},'ZXpdT':function(_0x580169){return _0x580169();},'MJfMf':function(_0x344928,_0x26e7af,_0x271ef6){return _0x344928(_0x26e7af,_0x271ef6);},'PvULm':_0x1078db(0xa9)},_0x4bafd2=await _0x4f2e77['NFERK'](getToken);if(!_0x4bafd2)throw new Error(_0x1078db(0xbc));const _0x2815c8=_0x4f2e77['ZXpdT'](getApiBaseUrl),_0x4ba70b=await _0x4f2e77[_0x1078db(0x85)](fetch,_0x2815c8+'/api/v1/mcp/features/'+_0x4b4359+'/sessions',{'method':_0x4f2e77[_0x1078db(0xa5)],'headers':{'Authorization':'Bearer\x20'+_0x4bafd2}});if(!_0x4ba70b['ok']){const _0x345744=await _0x4ba70b['text']();throw new Error(_0x1078db(0x97)+_0x345744);}return _0x4ba70b[_0x1078db(0xa8)]();}export async function startSession(_0x1291d2,_0x367f9f){const _0x54d79e=_0x307f,_0x331c01={'VAmNx':function(_0x233994){return _0x233994();}},_0x314bbd=await _0x331c01[_0x54d79e(0xa0)](getToken);if(!_0x314bbd)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0x5816d7=getApiBaseUrl(),_0x15e289=await fetch(_0x5816d7+'/api/v1/mcp/features/'+_0x1291d2+_0x54d79e(0x8c)+_0x367f9f+'/start',{'method':_0x54d79e(0x9d),'headers':{'Authorization':_0x54d79e(0xad)+_0x314bbd}});if(!_0x15e289['ok']){const _0x32c5a7=await _0x15e289['text']();throw new Error(_0x54d79e(0xa2)+_0x32c5a7);}return _0x15e289[_0x54d79e(0xa8)]();}export async function concludeSession(_0x881f3f,_0x42f963){const _0x2109ed=_0x307f,_0x50da42={'SfFge':function(_0x54375c){return _0x54375c();},'TOHqR':function(_0x589dbe,_0xe68a83,_0x2e91c9){return _0x589dbe(_0xe68a83,_0x2e91c9);}},_0x5d99d3=await _0x50da42['SfFge'](getToken);if(!_0x5d99d3)throw new Error(_0x2109ed(0xbc));const _0x46c059=_0x50da42[_0x2109ed(0xa6)](getApiBaseUrl),_0x5c99ac=await _0x50da42[_0x2109ed(0x93)](fetch,_0x46c059+_0x2109ed(0x89)+_0x881f3f+'/sessions/'+_0x42f963+'/conclude',{'method':'POST','headers':{'Authorization':'Bearer\x20'+_0x5d99d3}});if(!_0x5c99ac['ok']){const _0x3cb11f=await _0x5c99ac['text']();throw new Error('Failed\x20to\x20conclude\x20session:\x20'+_0x3cb11f);}return _0x5c99ac['json']();}export async function getActionItems(_0x33635d){const _0x1fdad5=_0x307f,_0x54fa62={'FbOoQ':_0x1fdad5(0xa9)},_0x221e0d=await getToken();if(!_0x221e0d)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0x2fdd00=getApiBaseUrl(),_0x4e7980=await fetch(_0x2fdd00+'/api/v1/mcp/features/'+_0x33635d+_0x1fdad5(0xac),{'method':_0x54fa62[_0x1fdad5(0x95)],'headers':{'Authorization':'Bearer\x20'+_0x221e0d}});if(!_0x4e7980['ok']){const _0x26477=await _0x4e7980[_0x1fdad5(0x9c)]();throw new Error('Failed\x20to\x20get\x20action\x20items:\x20'+_0x26477);}return _0x4e7980[_0x1fdad5(0xa8)]();}export async function getItemFeedback(_0x2f6afc,_0x1edaef){const _0x25610f=_0x307f,_0x56517f={'VgGPM':function(_0x2e97ed,_0x3f97f6,_0x5e7f39){return _0x2e97ed(_0x3f97f6,_0x5e7f39);},'EmDMU':_0x25610f(0xa9)},_0xe2a8b5=await getToken();if(!_0xe2a8b5)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0x25f4aa=getApiBaseUrl(),_0x349b95=await _0x56517f['VgGPM'](fetch,_0x25f4aa+'/api/v1/mcp/features/'+_0x2f6afc+_0x25610f(0x90)+_0x1edaef+'/feedback',{'method':_0x56517f[_0x25610f(0xb7)],'headers':{'Authorization':'Bearer\x20'+_0xe2a8b5}});if(!_0x349b95['ok']){const _0x668b96=await _0x349b95['text']();throw new Error('Failed\x20to\x20get\x20item\x20feedback:\x20'+_0x668b96);}return _0x349b95['json']();}export async function markCommentsAddressed(_0x13d832,_0x234e7d,_0x548101){const _0x1acf23=_0x307f,_0x4e6102={'XgndY':function(_0xc986b8){return _0xc986b8();},'PrzkG':function(_0xa563,_0x13f3a3,_0x1b8b34){return _0xa563(_0x13f3a3,_0x1b8b34);}},_0x5dcd8b=await _0x4e6102[_0x1acf23(0x96)](getToken);if(!_0x5dcd8b)throw new Error(_0x1acf23(0xbc));const _0x15e5a7=getApiBaseUrl(),_0x5c3432=await _0x4e6102[_0x1acf23(0x8e)](fetch,_0x15e5a7+'/api/v1/mcp/features/'+_0x13d832+_0x1acf23(0xb1),{'method':_0x1acf23(0x9d),'headers':{'Authorization':'Bearer\x20'+_0x5dcd8b,'Content-Type':'application/json'},'body':JSON[_0x1acf23(0xb8)]({'checklistItemId':_0x234e7d,'commentIds':_0x548101})});if(!_0x5c3432['ok']){const _0x52cef6=await _0x5c3432[_0x1acf23(0x9c)]();throw new Error(_0x1acf23(0xae)+_0x52cef6);}}export async function softDeleteFeature(_0x34e025){const _0x32fef8=_0x307f,_0x3c2f49={'EhuQy':function(_0xd57d21){return _0xd57d21();},'rUCwU':function(_0x458a3b,_0xd3fb16,_0x58aea0){return _0x458a3b(_0xd3fb16,_0x58aea0);},'yRuBb':_0x32fef8(0x8f)},_0x414851=await getToken();if(!_0x414851)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0x3dfd5b=_0x3c2f49[_0x32fef8(0xa3)](getApiBaseUrl),_0x59fb2b=await _0x3c2f49[_0x32fef8(0x8a)](fetch,_0x3dfd5b+_0x32fef8(0x89)+_0x34e025,{'method':_0x3c2f49['yRuBb'],'headers':{'Authorization':'Bearer\x20'+_0x414851}});if(!_0x59fb2b['ok']){const _0x3f1918=await _0x59fb2b[_0x32fef8(0x9c)]();throw new Error('Failed\x20to\x20delete\x20feature\x20review:\x20'+_0x3f1918);}}export async function restoreFeature(_0x430282){const _0x157d2d=_0x307f,_0x3ce755={'DdrEl':function(_0xaccb9a){return _0xaccb9a();},'pIRjw':function(_0x3c86ca,_0x268f07,_0x2bf5cf){return _0x3c86ca(_0x268f07,_0x2bf5cf);}},_0x2e91ca=await _0x3ce755['DdrEl'](getToken);if(!_0x2e91ca)throw new Error(_0x157d2d(0xbc));const _0x3f1572=getApiBaseUrl(),_0x130772=await _0x3ce755['pIRjw'](fetch,_0x3f1572+_0x157d2d(0x89)+_0x430282+_0x157d2d(0x86),{'method':_0x157d2d(0x9d),'headers':{'Authorization':'Bearer\x20'+_0x2e91ca}});if(!_0x130772['ok']){const _0x318dd0=await _0x130772[_0x157d2d(0x9c)]();throw new Error(_0x157d2d(0x8d)+_0x318dd0);}}