@ranger-testing/ranger-cli 2.4.2 → 2.4.3
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.
- package/build/cli.js +1 -1
- package/build/commands/addEnv.js +1 -1
- package/build/commands/authEncrypt.js +1 -1
- package/build/commands/clean.js +1 -1
- package/build/commands/config.js +1 -1
- package/build/commands/env.js +1 -1
- package/build/commands/feature.js +1 -1
- package/build/commands/hook.js +1 -1
- package/build/commands/hooks/autoPrompt.js +1 -1
- package/build/commands/hooks/disable.js +1 -1
- package/build/commands/hooks/enable.js +1 -1
- package/build/commands/hooks/exitPlanMode.js +1 -1
- package/build/commands/hooks/index.js +1 -1
- package/build/commands/hooks/output.js +1 -1
- package/build/commands/hooks/planReminder.js +1 -1
- package/build/commands/hooks/planStart.js +1 -1
- package/build/commands/hooks/postEdit.js +1 -1
- package/build/commands/hooks/preCompact.js +1 -1
- package/build/commands/hooks/sessionEnd.js +1 -1
- package/build/commands/hooks/sessionStart.js +1 -1
- package/build/commands/hooks/stopHook.js +1 -1
- package/build/commands/index.js +1 -1
- package/build/commands/login.js +1 -1
- package/build/commands/setup/claude.js +1 -1
- package/build/commands/setup/opencode.js +1 -1
- package/build/commands/setupCi.js +1 -1
- package/build/commands/skillup.js +1 -1
- package/build/commands/start.js +1 -1
- package/build/commands/status.js +1 -1
- package/build/commands/update.js +1 -1
- package/build/commands/updateEnv.js +1 -1
- package/build/commands/useEnv.js +1 -1
- package/build/commands/utils/activeProfile.js +1 -1
- package/build/commands/utils/agentEnv.js +1 -1
- package/build/commands/utils/browserSessionsApi.js +1 -1
- package/build/commands/utils/claudeConfig.js +1 -1
- package/build/commands/utils/claudePlugin.js +1 -1
- package/build/commands/utils/crypto.js +1 -1
- package/build/commands/utils/desirePathLog.js +1 -1
- package/build/commands/utils/deviceAuth.js +1 -1
- package/build/commands/utils/environment.js +1 -1
- package/build/commands/utils/featureApi.js +1 -1
- package/build/commands/utils/featureReportGenerator.js +1 -1
- package/build/commands/utils/fixWebmDuration.js +1 -1
- package/build/commands/utils/git.js +1 -1
- package/build/commands/utils/keychain.js +1 -1
- package/build/commands/utils/localAgentInstallationsApi.js +1 -1
- package/build/commands/utils/mcpImageBase64.js +1 -1
- package/build/commands/utils/model.js +1 -1
- package/build/commands/utils/opencodeConfig.js +1 -1
- package/build/commands/utils/playwrightCli.js +1 -1
- package/build/commands/utils/profileMessages.js +1 -1
- package/build/commands/utils/profileSetupBanner.js +1 -1
- package/build/commands/utils/rangerConfig.js +1 -1
- package/build/commands/utils/rangerRoot.js +1 -1
- package/build/commands/utils/reportGenerator.js +1 -1
- package/build/commands/utils/retry.js +1 -1
- package/build/commands/utils/sessionCache.js +1 -1
- package/build/commands/utils/settings.js +1 -1
- package/build/commands/utils/skillContent.js +1 -1
- package/build/commands/utils/skills.js +1 -1
- package/build/commands/utils/stitchWebmFiles.js +1 -1
- package/build/commands/utils/telemetry.js +1 -1
- package/build/commands/utils/traceSnapshotMapper.js +1 -1
- package/build/commands/utils/userApi.js +1 -1
- package/build/commands/utils/version.js +1 -1
- package/build/commands/verifyFeature.js +1 -1
- package/build/commands/verifyFeatureCli.js +1 -1
- package/build/commands/verifyInBrowser.js +1 -1
- package/package.json +1 -1
package/build/commands/update.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x1b2bec,_0x3a1f30){const _0x1b5f9c=_0x31fa,_0x4d084d=_0x1b2bec();while(!![]){try{const _0x55261a=parseInt(_0x1b5f9c(0x230))/0x1+-parseInt(_0x1b5f9c(0x205))/0x2+-parseInt(_0x1b5f9c(0x227))/0x3+parseInt(_0x1b5f9c(0x229))/0x4*(parseInt(_0x1b5f9c(0x22f))/0x5)+parseInt(_0x1b5f9c(0x220))/0x6+-parseInt(_0x1b5f9c(0x225))/0x7*(parseInt(_0x1b5f9c(0x212))/0x8)+parseInt(_0x1b5f9c(0x204))/0x9;if(_0x55261a===_0x3a1f30)break;else _0x4d084d['push'](_0x4d084d['shift']());}catch(_0x3adabd){_0x4d084d['push'](_0x4d084d['shift']());}}}(_0x2cea,0xccd1d));import{spawn}from'child_process';import{existsSync}from'fs';import{readFile,writeFile}from'fs/promises';import{installSkill,removeSkill,RANGER_MANAGED_SKILLS,DEPRECATED_SKILLS}from'./utils/skills.js';import{PACKAGE_NAME,getCurrentVersion,getLatestVersion,compareVersions}from'./utils/version.js';import{getSkillsDir}from'./utils/claudeConfig.js';import{getOpencodeSkillsDir}from'./utils/opencodeConfig.js';function _0x31fa(_0x2b34e8,_0x218a4f){_0x2b34e8=_0x2b34e8-0x1e9;const _0x2cea22=_0x2cea();let _0x31fa8d=_0x2cea22[_0x2b34e8];return _0x31fa8d;}import{join}from'path';import{migrateActiveProfileFile}from'./utils/activeProfile.js';function _0x2cea(){const _0x37a004=['emBLL','sscCM','\x0aClaude\x20marketplace\x20updated\x20(trailhead).','claude','findIndex','push','jyOIk','ranger@trailhead','jRKfZ','6427840xwbkZN','\x0aCould\x20not\x20check\x20latest\x20version:\x20','plugin','version','split','utf-8','splice','\x0aYour\x20version\x20(','wYJZN','nORwR','lITnP','SiRWi','npm','GOvPa','8737290ZdWQYX','\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.','\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.','trim','length','7TlYYPk','Attempting\x20install\x20anyway...','1480707KoQGWw','\x0aReinstalling\x20','3768pmCTqW','platform','wAnYe','error','kGtpX','\x0a✅\x20Update\x20complete!','1805EBnDkB','1104798dRdbzq','gcfps','close','opencode','active-feature.txt','rXhYB','sNCJB','pipe','log','Latest\x20version:\x20\x20','\x0aInstalling\x20','UuVFm','\x20ranger-managed\x20skill(s)...','MfptZ','\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','Update\x20failed:\x20','sdHzD','project','UpCJz','gKFmI','--scope','trailhead','active-profile.txt','Claude\x20plugin\x20updated\x20(project\x20scope).','sfgXP','win32','IuNPl','\x20skill\x20','Checking\x20for\x20updates...','4571127szcplp','2545976GNCIdQ','fJjUQ','update','jHNmr'];_0x2cea=function(){return _0x37a004;};return _0x2cea();}import{getRangerDir}from'./utils/rangerRoot.js';import{isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';async function runInstall(){const _0x32e83c=_0x31fa,_0x2caa2d={'sdHzD':function(_0x4e1fbd,_0x16ffa4,_0x4e4bd9,_0xb79bdb){return _0x4e1fbd(_0x16ffa4,_0x4e4bd9,_0xb79bdb);},'wRJzx':_0x32e83c(0x21e),'lITnP':'install','wcqjK':'inherit','emBLL':_0x32e83c(0x1e9)};return new Promise(_0x5d7b2d=>{const _0x2ab963=_0x32e83c,_0x2500f8={'eMdyb':function(_0x42d28f,_0x15f330){return _0x42d28f(_0x15f330);}};console[_0x2ab963(0x1ef)](_0x2ab963(0x1f1)+PACKAGE_NAME+'@latest...\x0a');const _0x490496=_0x2caa2d[_0x2ab963(0x1f7)](spawn,_0x2caa2d['wRJzx'],[_0x2caa2d[_0x2ab963(0x21c)],'-g',PACKAGE_NAME+'@latest'],{'stdio':_0x2caa2d['wcqjK'],'shell':process[_0x2ab963(0x22a)]===_0x2ab963(0x200)});_0x490496['on'](_0x2caa2d[_0x2ab963(0x209)],_0x2daf31=>{_0x2500f8['eMdyb'](_0x5d7b2d,_0x2daf31===0x0);}),_0x490496['on'](_0x2ab963(0x22c),()=>{_0x5d7b2d(![]);});});}async function updateClaudeMarketplace(){const _0x88a605=_0x31fa,_0x4bcbd2={'kGtpX':function(_0x1024a0,_0x222c42){return _0x1024a0(_0x222c42);},'sBglX':_0x88a605(0x214),'tZweb':'marketplace','nORwR':_0x88a605(0x207),'gKFmI':'trailhead','IuNPl':'pipe','wPGHw':function(_0x5b9789,_0x358f00){return _0x5b9789===_0x358f00;},'EZtGl':'error'};return new Promise(_0x12e4a0=>{const _0x5c303e=_0x88a605,_0x41df20=spawn(_0x5c303e(0x20c),[_0x4bcbd2['sBglX'],_0x4bcbd2['tZweb'],_0x4bcbd2[_0x5c303e(0x21b)],_0x4bcbd2[_0x5c303e(0x1fa)]],{'stdio':_0x4bcbd2[_0x5c303e(0x201)],'shell':_0x4bcbd2['wPGHw'](process[_0x5c303e(0x22a)],'win32')});_0x41df20['on'](_0x5c303e(0x1e9),_0x1e42b4=>{const _0x474691=_0x5c303e;_0x4bcbd2[_0x474691(0x22d)](_0x12e4a0,_0x1e42b4===0x0);}),_0x41df20['on'](_0x4bcbd2['EZtGl'],()=>{_0x12e4a0(![]);});});}async function updateClaudePlugin(_0x2a0094){const _0x4e121b=_0x31fa,_0x34cb3e={'lfStP':'plugin','eynsO':'update','UuVFm':'ranger@trailhead','yjIxI':_0x4e121b(0x1fb),'gcfps':function(_0x1b725b,_0x298403,_0x56b164,_0x3678c1){return _0x1b725b(_0x298403,_0x56b164,_0x3678c1);},'sfgXP':_0x4e121b(0x1ee),'jHNmr':'win32'};return new Promise(_0x1ce34a=>{const _0x207ba3=_0x4e121b,_0x18cea8=[_0x34cb3e['lfStP'],_0x34cb3e['eynsO'],_0x34cb3e[_0x207ba3(0x1f2)]];_0x2a0094&&_0x18cea8['push'](_0x34cb3e['yjIxI'],_0x2a0094);const _0x19dfa9=_0x34cb3e[_0x207ba3(0x231)](spawn,_0x207ba3(0x20c),_0x18cea8,{'stdio':_0x34cb3e[_0x207ba3(0x1ff)],'shell':process[_0x207ba3(0x22a)]===_0x34cb3e[_0x207ba3(0x208)]});_0x19dfa9['on'](_0x207ba3(0x1e9),_0x36eb56=>{_0x1ce34a(_0x36eb56===0x0);}),_0x19dfa9['on'](_0x207ba3(0x22c),()=>{_0x1ce34a(![]);});});}function isSkillInstalled(_0x103d8d,_0x3585dc,_0x520bdb){const _0x45f313=_0x31fa,_0x5e9df1={'GOvPa':function(_0x41acc4,_0x25a710){return _0x41acc4(_0x25a710);},'rXhYB':function(_0x19f84f,_0x1d39ee,_0x530a48){return _0x19f84f(_0x1d39ee,_0x530a48);}},_0x3a72f3=_0x520bdb===_0x45f313(0x1ea)?getOpencodeSkillsDir(_0x3585dc):_0x5e9df1[_0x45f313(0x21f)](getSkillsDir,_0x3585dc),_0x31073b=_0x5e9df1[_0x45f313(0x1ec)](join,_0x3a72f3,_0x103d8d);return _0x5e9df1['GOvPa'](existsSync,_0x31073b);}async function reinstallSkills(_0x484376){const _0x8f4ea=_0x31fa,_0x4372b6={'jRKfZ':_0x8f4ea(0x1f8),'SiRWi':'claude','CtiAj':_0x8f4ea(0x1ea),'sNCJB':function(_0xb8f881,_0x243ca2,_0x3f1ec5){return _0xb8f881(_0x243ca2,_0x3f1ec5);},'xLHpl':_0x8f4ea(0x222)},_0x25525d=[_0x4372b6[_0x8f4ea(0x211)],'user'],_0x36b5cd=[];for(const _0x3175a9 of _0x25525d){for(const _0x264013 of RANGER_MANAGED_SKILLS){isSkillInstalled(_0x264013,_0x3175a9,_0x4372b6[_0x8f4ea(0x21d)])&&_0x36b5cd[_0x8f4ea(0x20e)]({'skillName':_0x264013,'level':_0x3175a9,'platform':'claude'}),isSkillInstalled(_0x264013,_0x3175a9,_0x4372b6['CtiAj'])&&_0x36b5cd[_0x8f4ea(0x20e)]({'skillName':_0x264013,'level':_0x3175a9,'platform':'opencode'});}}for(const _0x3b12f3 of _0x25525d){for(const _0x115a92 of DEPRECATED_SKILLS){await _0x4372b6[_0x8f4ea(0x1ed)](removeSkill,_0x115a92,_0x3b12f3);}}if(_0x36b5cd[_0x8f4ea(0x224)]===0x0){console[_0x8f4ea(0x1ef)](_0x4372b6['xLHpl']);return;}console[_0x8f4ea(0x1ef)](_0x8f4ea(0x228)+_0x36b5cd['length']+_0x8f4ea(0x1f3));for(const {skillName:_0x36af10,level:_0x135afa,platform:_0xff5c31}of _0x36b5cd){try{await installSkill(_0x36af10,{'level':_0x135afa,'cliVersion':_0x484376,'platform':_0xff5c31});}catch(_0x4bcb71){console['warn']('\x20\x20Failed\x20to\x20reinstall\x20'+_0xff5c31+'\x20'+_0x135afa+_0x8f4ea(0x202)+_0x36af10+':',_0x4bcb71);}}}async function ensureActiveProfileGitignored(){const _0x3001da=_0x31fa,_0x35a1bf={'wAnYe':function(_0x3da2ed,_0x56defd,_0x5a791e){return _0x3da2ed(_0x56defd,_0x5a791e);},'mYlAA':function(_0x14a7e1,_0x2a3c6c){return _0x14a7e1(_0x2a3c6c);},'wYJZN':_0x3001da(0x217)},_0x3dce1c=_0x35a1bf[_0x3001da(0x22b)](join,getRangerDir(),'.gitignore');if(!_0x35a1bf['mYlAA'](existsSync,_0x3dce1c))return![];let _0xebde7b='';try{_0xebde7b=await readFile(_0x3dce1c,_0x35a1bf[_0x3001da(0x21a)]);}catch{return![];}const _0x3dd2a7=_0xebde7b[_0x3001da(0x216)](/\r?\n/);if(_0x3dd2a7['some'](_0x4978cf=>_0x4978cf['trim']()===_0x3001da(0x1fd)))return![];let _0x4be6d6=_0x3dd2a7[_0x3001da(0x20d)](_0x10ad84=>_0x10ad84[_0x3001da(0x223)]()===_0x3001da(0x1eb));_0x4be6d6===-0x1&&(_0x4be6d6=_0x3dd2a7[_0x3001da(0x224)]);_0x3dd2a7[_0x3001da(0x218)](_0x4be6d6,0x0,'active-profile.txt');let _0xa070fa=_0x3dd2a7['join']('\x0a');!_0xa070fa['endsWith']('\x0a')&&(_0xa070fa+='\x0a');try{await writeFile(_0x3dce1c,_0xa070fa,_0x3001da(0x217));}catch{return![];}return!![];}export async function update(){const _0x2eba0a=_0x31fa,_0x12588f={'NxdQj':_0x2eba0a(0x203),'IRmVc':function(_0x1d612a){return _0x1d612a();},'fJjUQ':_0x2eba0a(0x226),'jyOIk':function(_0x2931af,_0x39b8c2){return _0x2931af<_0x39b8c2;},'sscCM':function(_0x521b35,_0x5cf4c2){return _0x521b35(_0x5cf4c2);},'wmTmF':_0x2eba0a(0x1fc),'MfptZ':function(_0x411775){return _0x411775();},'wFZVN':function(_0x328396,_0x404962){return _0x328396(_0x404962);},'UpCJz':'✓\x20Migrated\x20active\x20profile\x20file'},_0x5644fa=getCurrentVersion();console[_0x2eba0a(0x1ef)]('\x0aCurrent\x20version:\x20'+_0x5644fa),console[_0x2eba0a(0x1ef)](_0x12588f['NxdQj']);const _0x60d929=_0x12588f['IRmVc'](getLatestVersion);let _0x46057b=_0x5644fa;if(!_0x60d929[_0x2eba0a(0x215)]){console['warn'](_0x2eba0a(0x213)+_0x60d929[_0x2eba0a(0x22c)]),console['log'](_0x12588f[_0x2eba0a(0x206)]);const _0x223b40=await _0x12588f['IRmVc'](runInstall);if(_0x223b40)console[_0x2eba0a(0x1ef)]('\x0aSuccessfully\x20installed\x20latest\x20version.'),_0x46057b=_0x12588f['IRmVc'](getCurrentVersion);else throw new Error(_0x2eba0a(0x1f6)+_0x60d929[_0x2eba0a(0x22c)]);}else{const _0x1fe6ce=_0x60d929['version'];console['log'](_0x2eba0a(0x1f0)+_0x1fe6ce);const _0x37cec2=compareVersions(_0x5644fa,_0x1fe6ce);if(_0x37cec2===0x0)console[_0x2eba0a(0x1ef)](_0x2eba0a(0x221));else{if(_0x12588f[_0x2eba0a(0x20f)](_0x37cec2,0x0))console[_0x2eba0a(0x1ef)](_0x2eba0a(0x219)+_0x5644fa+')\x20is\x20newer\x20than\x20the\x20published\x20version\x20('+_0x1fe6ce+').');else{const _0x1b9f29=await runInstall();if(_0x1b9f29)console['log']('\x0aSuccessfully\x20updated\x20to\x20version\x20'+_0x1fe6ce),_0x46057b=_0x1fe6ce;else throw new Error('Update\x20failed.');}}}await _0x12588f[_0x2eba0a(0x20a)](reinstallSkills,_0x46057b);const _0x3a9339=await _0x12588f['sscCM'](isMarketplaceAdded,_0x12588f['wmTmF']),_0x2d11fb=await isPluginInstalled(_0x2eba0a(0x210));if(_0x3a9339){const _0x1271e7=await updateClaudeMarketplace();_0x1271e7&&console[_0x2eba0a(0x1ef)](_0x2eba0a(0x20b));}if(_0x2d11fb){const _0x463dca=await _0x12588f[_0x2eba0a(0x1f4)](updateClaudePlugin);_0x463dca&&console['log'](_0x2eba0a(0x1f5));const _0x3688f5=await _0x12588f['wFZVN'](updateClaudePlugin,'project');_0x3688f5&&console[_0x2eba0a(0x1ef)]((_0x463dca?'':'\x0a')+_0x2eba0a(0x1fe));}const _0x19a0e2=await migrateActiveProfileFile();_0x19a0e2&&console['log'](_0x12588f[_0x2eba0a(0x1f9)]);const _0x220138=await ensureActiveProfileGitignored();console['log'](_0x2eba0a(0x22e));}
|
|
1
|
+
(function(_0x5d7b60,_0x528e94){const _0x9c1012=_0xf92a,_0x32315f=_0x5d7b60();while(!![]){try{const _0x58c581=parseInt(_0x9c1012(0x115))/0x1+parseInt(_0x9c1012(0xfa))/0x2+-parseInt(_0x9c1012(0x10f))/0x3*(parseInt(_0x9c1012(0xe3))/0x4)+-parseInt(_0x9c1012(0xe0))/0x5*(-parseInt(_0x9c1012(0x110))/0x6)+parseInt(_0x9c1012(0x127))/0x7*(parseInt(_0x9c1012(0xe6))/0x8)+-parseInt(_0x9c1012(0x11b))/0x9+parseInt(_0x9c1012(0xeb))/0xa*(-parseInt(_0x9c1012(0x11e))/0xb);if(_0x58c581===_0x528e94)break;else _0x32315f['push'](_0x32315f['shift']());}catch(_0x1f47d6){_0x32315f['push'](_0x32315f['shift']());}}}(_0x4b5a,0x591cf));import{spawn}from'child_process';import{existsSync}from'fs';import{readFile,writeFile}from'fs/promises';import{installSkill,removeSkill,RANGER_MANAGED_SKILLS,DEPRECATED_SKILLS}from'./utils/skills.js';import{PACKAGE_NAME,getCurrentVersion,getLatestVersion,compareVersions}from'./utils/version.js';import{getSkillsDir}from'./utils/claudeConfig.js';import{getOpencodeSkillsDir}from'./utils/opencodeConfig.js';import{join}from'path';import{migrateActiveProfileFile}from'./utils/activeProfile.js';import{getRangerDir}from'./utils/rangerRoot.js';function _0xf92a(_0x2dc285,_0x4c1251){_0x2dc285=_0x2dc285-0xdf;const _0x4b5a18=_0x4b5a();let _0xf92a96=_0x4b5a18[_0x2dc285];return _0xf92a96;}function _0x4b5a(){const _0x265eb1=['\x0aCould\x20not\x20check\x20latest\x20version:\x20','35uGHySm','version','Update\x20failed.','236AlIWKg','VPFRA','@latest','117176qRYWOX','GtugG','Claude\x20plugin\x20updated\x20(project\x20scope).','Checking\x20for\x20updates...','log','8873190VUxUdx','tDjbr','active-feature.txt','some','oyylK','IWMJO','platform','endsWith','inherit','\x20skill\x20','equve','length','active-profile.txt','jdaBu','rkyMa','838446fACrzo','uOZbu','pipe','project','EQOZb','install','BCFXy','IkMYn','plugin','\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.','dunGT','\x0aSuccessfully\x20updated\x20to\x20version\x20','\x0a✅\x20Update\x20complete!','join','error','\x0aCurrent\x20version:\x20','ranger@trailhead','\x0aReinstalling\x20','jJFnm','RAeEF','\x0aClaude\x20marketplace\x20updated\x20(trailhead).','5862NZFUyi','25512moxvFQ','claude','YAJcG','Attempting\x20install\x20anyway...','scYeD','716003LSWCPG','RMfCi','Egyrf','win32','ikJGD','update','3053853ZoujRF','push','nOtAJ','11lzEwaA','user','findIndex','opencode','EKSuW','HUZbI','gMgRO','split','npm','259QdwdYD','✓\x20Migrated\x20active\x20profile\x20file'];_0x4b5a=function(){return _0x265eb1;};return _0x4b5a();}import{isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';async function runInstall(){const _0x174f07=_0xf92a,_0x3001e1={'rkyMa':function(_0x263bf8,_0x19882c){return _0x263bf8(_0x19882c);},'HEZFf':function(_0x2760bd,_0x1a6dce){return _0x2760bd===_0x1a6dce;},'nOtAJ':function(_0x2641fe,_0x4c97a1,_0x5be600,_0x5211e5){return _0x2641fe(_0x4c97a1,_0x5be600,_0x5211e5);},'CAlUC':_0x174f07(0xff),'YAJcG':'win32','RAeEF':'close'};return new Promise(_0x30c996=>{const _0x54ba99=_0x174f07,_0x55709e={'GtugG':function(_0x4fb207,_0x1468e0){const _0x59cdca=_0xf92a;return _0x3001e1[_0x59cdca(0xf9)](_0x4fb207,_0x1468e0);},'sxWcb':function(_0x2398a9,_0x119e81){return _0x3001e1['HEZFf'](_0x2398a9,_0x119e81);}};console['log']('\x0aInstalling\x20'+PACKAGE_NAME+'@latest...\x0a');const _0x55ddc2=_0x3001e1[_0x54ba99(0x11d)](spawn,_0x54ba99(0x126),[_0x3001e1['CAlUC'],'-g',PACKAGE_NAME+_0x54ba99(0xe5)],{'stdio':_0x54ba99(0xf3),'shell':process[_0x54ba99(0xf1)]===_0x3001e1[_0x54ba99(0x112)]});_0x55ddc2['on'](_0x3001e1[_0x54ba99(0x10d)],_0x3014e4=>{const _0x43f7a3=_0x54ba99;_0x55709e[_0x43f7a3(0xe7)](_0x30c996,_0x55709e['sxWcb'](_0x3014e4,0x0));}),_0x55ddc2['on']('error',()=>{_0x30c996(![]);});});}async function updateClaudeMarketplace(){const _0x5cfa34=_0xf92a,_0x15b6ab={'YczMI':function(_0xcb5f0b,_0x3bac07){return _0xcb5f0b(_0x3bac07);},'RMfCi':function(_0x22865c,_0x67347d){return _0x22865c===_0x67347d;},'TKqyy':'claude','AmaMQ':_0x5cfa34(0x102),'IWMJO':'marketplace','Egyrf':_0x5cfa34(0x11a),'EQOZb':_0x5cfa34(0xfc),'DZnUh':_0x5cfa34(0x118),'ikJGD':'close'};return new Promise(_0x4e87c3=>{const _0x3cd924=_0x5cfa34,_0x37f5a2={'nZAtT':function(_0x4720e0,_0x3bdef8){const _0x51d413=_0xf92a;return _0x15b6ab[_0x51d413(0x116)](_0x4720e0,_0x3bdef8);}},_0x17fcfc=spawn(_0x15b6ab['TKqyy'],[_0x15b6ab['AmaMQ'],_0x15b6ab[_0x3cd924(0xf0)],_0x15b6ab[_0x3cd924(0x117)],'trailhead'],{'stdio':_0x15b6ab[_0x3cd924(0xfe)],'shell':process['platform']===_0x15b6ab['DZnUh']});_0x17fcfc['on'](_0x15b6ab[_0x3cd924(0x119)],_0x5f5d1a=>{_0x4e87c3(_0x37f5a2['nZAtT'](_0x5f5d1a,0x0));}),_0x17fcfc['on']('error',()=>{_0x15b6ab['YczMI'](_0x4e87c3,![]);});});}async function updateClaudePlugin(_0x2af212){const _0x4a86b9=_0xf92a,_0x4e7a5f={'itnsv':function(_0x49021d,_0x466730){return _0x49021d(_0x466730);},'qpFYa':_0x4a86b9(0x102),'gMgRO':'claude','EKSuW':_0x4a86b9(0x118),'scYeD':'close'};return new Promise(_0x29e9a9=>{const _0x443eed=_0x4a86b9,_0xdd44ec={'jyXzA':function(_0x416209,_0x175f7f){return _0x4e7a5f['itnsv'](_0x416209,_0x175f7f);}},_0x37ab99=[_0x4e7a5f['qpFYa'],_0x443eed(0x11a),'ranger@trailhead'];_0x2af212&&_0x37ab99[_0x443eed(0x11c)]('--scope',_0x2af212);const _0x4f1e96=spawn(_0x4e7a5f[_0x443eed(0x124)],_0x37ab99,{'stdio':'pipe','shell':process['platform']===_0x4e7a5f[_0x443eed(0x122)]});_0x4f1e96['on'](_0x4e7a5f[_0x443eed(0x114)],_0x1e003a=>{_0x29e9a9(_0x1e003a===0x0);}),_0x4f1e96['on']('error',()=>{_0xdd44ec['jyXzA'](_0x29e9a9,![]);});});}function isSkillInstalled(_0x124581,_0x26139d,_0x42beb4){const _0x571e80=_0xf92a,_0x2bf62f={'dunGT':_0x571e80(0x121),'tDjbr':function(_0x198518,_0xf3d753){return _0x198518(_0xf3d753);}},_0x5f5c08=_0x42beb4===_0x2bf62f[_0x571e80(0x104)]?getOpencodeSkillsDir(_0x26139d):_0x2bf62f[_0x571e80(0xec)](getSkillsDir,_0x26139d),_0x278936=join(_0x5f5c08,_0x124581);return existsSync(_0x278936);}async function reinstallSkills(_0x7381fe){const _0x416705=_0xf92a,_0x26e9cb={'ZUShG':_0x416705(0x11f),'qXBvx':function(_0xa22eb7,_0x43b1ee,_0x3f8dc5,_0x25316f){return _0xa22eb7(_0x43b1ee,_0x3f8dc5,_0x25316f);},'uOZbu':_0x416705(0x111),'hOfxN':function(_0x15a209,_0x4dd3cb,_0x348066,_0x5a912d){return _0x15a209(_0x4dd3cb,_0x348066,_0x5a912d);}},_0x2355c3=[_0x416705(0xfd),_0x26e9cb['ZUShG']],_0x28de9a=[];for(const _0x562963 of _0x2355c3){for(const _0x389334 of RANGER_MANAGED_SKILLS){_0x26e9cb['qXBvx'](isSkillInstalled,_0x389334,_0x562963,_0x26e9cb['uOZbu'])&&_0x28de9a['push']({'skillName':_0x389334,'level':_0x562963,'platform':_0x26e9cb[_0x416705(0xfb)]}),_0x26e9cb['hOfxN'](isSkillInstalled,_0x389334,_0x562963,'opencode')&&_0x28de9a[_0x416705(0x11c)]({'skillName':_0x389334,'level':_0x562963,'platform':_0x416705(0x121)});}}for(const _0x3feeba of _0x2355c3){for(const _0x10f53a of DEPRECATED_SKILLS){await removeSkill(_0x10f53a,_0x3feeba);}}if(_0x28de9a[_0x416705(0xf6)]===0x0){console[_0x416705(0xea)](_0x416705(0x103));return;}console[_0x416705(0xea)](_0x416705(0x10b)+_0x28de9a['length']+'\x20ranger-managed\x20skill(s)...');for(const {skillName:_0x2673ca,level:_0x54e2cb,platform:_0x2fcba0}of _0x28de9a){try{await installSkill(_0x2673ca,{'level':_0x54e2cb,'cliVersion':_0x7381fe,'platform':_0x2fcba0});}catch(_0x3fc84f){console['warn']('\x20\x20Failed\x20to\x20reinstall\x20'+_0x2fcba0+'\x20'+_0x54e2cb+_0x416705(0xf4)+_0x2673ca+':',_0x3fc84f);}}}async function ensureActiveProfileGitignored(){const _0x22607a=_0xf92a,_0x17eb01={'gCTsn':function(_0x2113c6){return _0x2113c6();},'fvOfk':function(_0x1ce346,_0x10a535){return _0x1ce346(_0x10a535);},'pDBZB':'utf-8','HUZbI':'active-profile.txt','oyylK':function(_0x358797,_0x402af6,_0x2e4dd8,_0x35498a){return _0x358797(_0x402af6,_0x2e4dd8,_0x35498a);}},_0x3c8e00=join(_0x17eb01['gCTsn'](getRangerDir),'.gitignore');if(!_0x17eb01['fvOfk'](existsSync,_0x3c8e00))return![];let _0x1894dd='';try{_0x1894dd=await readFile(_0x3c8e00,_0x17eb01['pDBZB']);}catch{return![];}const _0x31b3d2=_0x1894dd[_0x22607a(0x125)](/\r?\n/);if(_0x31b3d2[_0x22607a(0xee)](_0x36de9e=>_0x36de9e['trim']()===_0x22607a(0xf7)))return![];let _0x3bed99=_0x31b3d2[_0x22607a(0x120)](_0x2c9896=>_0x2c9896['trim']()===_0x22607a(0xed));_0x3bed99===-0x1&&(_0x3bed99=_0x31b3d2['length']);_0x31b3d2['splice'](_0x3bed99,0x0,_0x17eb01[_0x22607a(0x123)]);let _0x1c542b=_0x31b3d2[_0x22607a(0x107)]('\x0a');!_0x1c542b[_0x22607a(0xf2)]('\x0a')&&(_0x1c542b+='\x0a');try{await _0x17eb01[_0x22607a(0xef)](writeFile,_0x3c8e00,_0x1c542b,_0x17eb01['pDBZB']);}catch{return![];}return!![];}export async function update(){const _0xf5bcbb=_0xf92a,_0x46e50c={'VPFRA':function(_0x596489){return _0x596489();},'WlcfC':_0xf5bcbb(0xe9),'equve':_0xf5bcbb(0x113),'jJFnm':'\x0aSuccessfully\x20installed\x20latest\x20version.','IkMYn':function(_0x27f1a6){return _0x27f1a6();},'HXbzR':function(_0x45afa3,_0xcdb750,_0x4f5488){return _0x45afa3(_0xcdb750,_0x4f5488);},'BCFXy':function(_0x1bb36e,_0x3a0b4f){return _0x1bb36e===_0x3a0b4f;},'VkNRW':function(_0xa3136c,_0x5c6714){return _0xa3136c(_0x5c6714);},'avzoa':'trailhead','jdaBu':_0xf5bcbb(0x10e),'mhaLe':'\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','lbWta':_0xf5bcbb(0xfd)},_0x18a57c=_0x46e50c[_0xf5bcbb(0xe4)](getCurrentVersion);console[_0xf5bcbb(0xea)](_0xf5bcbb(0x109)+_0x18a57c),console[_0xf5bcbb(0xea)](_0x46e50c['WlcfC']);const _0x2f350f=getLatestVersion();let _0x914923=_0x18a57c;if(!_0x2f350f[_0xf5bcbb(0xe1)]){console['warn'](_0xf5bcbb(0xdf)+_0x2f350f[_0xf5bcbb(0x108)]),console[_0xf5bcbb(0xea)](_0x46e50c[_0xf5bcbb(0xf5)]);const _0xab334b=await _0x46e50c['VPFRA'](runInstall);if(_0xab334b)console[_0xf5bcbb(0xea)](_0x46e50c[_0xf5bcbb(0x10c)]),_0x914923=_0x46e50c[_0xf5bcbb(0x101)](getCurrentVersion);else throw new Error('Update\x20failed:\x20'+_0x2f350f['error']);}else{const _0x508247=_0x2f350f[_0xf5bcbb(0xe1)];console[_0xf5bcbb(0xea)]('Latest\x20version:\x20\x20'+_0x508247);const _0x142be1=_0x46e50c['HXbzR'](compareVersions,_0x18a57c,_0x508247);if(_0x46e50c[_0xf5bcbb(0x100)](_0x142be1,0x0))console[_0xf5bcbb(0xea)]('\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.');else{if(_0x142be1<0x0)console['log']('\x0aYour\x20version\x20('+_0x18a57c+')\x20is\x20newer\x20than\x20the\x20published\x20version\x20('+_0x508247+').');else{const _0x2710b8=await runInstall();if(_0x2710b8)console['log'](_0xf5bcbb(0x105)+_0x508247),_0x914923=_0x508247;else throw new Error(_0xf5bcbb(0xe2));}}}await reinstallSkills(_0x914923);const _0x5bee87=await _0x46e50c['VkNRW'](isMarketplaceAdded,_0x46e50c['avzoa']),_0x179af7=await _0x46e50c['VkNRW'](isPluginInstalled,_0xf5bcbb(0x10a));if(_0x5bee87){const _0x34a374=await _0x46e50c['IkMYn'](updateClaudeMarketplace);_0x34a374&&console[_0xf5bcbb(0xea)](_0x46e50c[_0xf5bcbb(0xf8)]);}if(_0x179af7){const _0x425ac0=await updateClaudePlugin();_0x425ac0&&console[_0xf5bcbb(0xea)](_0x46e50c['mhaLe']);const _0x3d5eaa=await updateClaudePlugin(_0x46e50c['lbWta']);_0x3d5eaa&&console['log']((_0x425ac0?'':'\x0a')+_0xf5bcbb(0xe8));}const _0x3a35ba=await _0x46e50c[_0xf5bcbb(0xe4)](migrateActiveProfileFile);_0x3a35ba&&console['log'](_0xf5bcbb(0x128));const _0x38776f=await ensureActiveProfileGitignored();console['log'](_0xf5bcbb(0x106));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xadb0b8,_0x3b9f37){const _0x3bf010=_0xc387,_0x3e57bc=_0xadb0b8();while(!![]){try{const _0x500365=parseInt(_0x3bf010(0x1b7))/0x1*(-parseInt(_0x3bf010(0x19d))/0x2)+parseInt(_0x3bf010(0x1ad))/0x3+-parseInt(_0x3bf010(0x1bd))/0x4*(-parseInt(_0x3bf010(0x1b0))/0x5)+-parseInt(_0x3bf010(0x1c4))/0x6+parseInt(_0x3bf010(0x1a2))/0x7*(parseInt(_0x3bf010(0x1a1))/0x8)+-parseInt(_0x3bf010(0x1be))/0x9*(parseInt(_0x3bf010(0x199))/0xa)+parseInt(_0x3bf010(0x19c))/0xb;if(_0x500365===_0x3b9f37)break;else _0x3e57bc['push'](_0x3e57bc['shift']());}catch(_0x5f502e){_0x3e57bc['push'](_0x3e57bc['shift']());}}}(_0x5b25,0x3d4d3));function _0x5b25(){const _0x58ba84=['48140hIRzNU','2700LTLCjt','\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20','stdin','\x20\x20Run\x20ranger\x20setup\x20in\x20CI\x20to\x20decrypt\x20at\x20runtime.','browser','browser_auth','1983804PTkrge','launch','rRuRK','\x20\x20\x20When\x20you\x20are\x20done,\x20close\x20the\x20browser.\x0a','error','3900FigXKC','\x0a✅\x20Profile\x20\x22','✓\x20Updated\x20config:\x20','2165702inVuvy','4fjDOmO','safeMode','baseUrl','stdout','56552lhvmUr','161xEworg','✓\x20Encrypted\x20auth\x20saved\x20to:\x20','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','\x20\x20You\x20can\x20safely\x20commit\x20this\x20file\x20to\x20git.','fnowo','string','\x0aThe\x20browser\x20closed\x20unexpectedly\x20before\x20authentication\x20could\x20be\x20saved.','\x20\x20\x20A\x20browser\x20will\x20open\x20with\x20your\x20existing\x20session\x20(if\x20any).','Jqlsi','YisnN','about:blank','59070QCpkLP','\x20\x20\x20Update\x20your\x20authentication\x20as\x20needed.','setupHeaders','140tFDCbE','storageState','VHiWM','QHSfI','\x0a📋\x20Authentication\x20Update','mVhxo','qcSjQ','8707mfpJoR','catch','extraHTTPHeaders','isTTY','log','yJcQJ'];_0x5b25=function(){return _0x58ba84;};return _0x5b25();}import{writeFile,readFile,unlink}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{chromium}from'playwright';import{encrypt}from'./utils/crypto.js';function _0xc387(_0x547777,_0xf15e54){_0x547777=_0x547777-0x198;const _0x5b25d4=_0x5b25();let _0xc387f9=_0x5b25d4[_0x547777];return _0xc387f9;}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(_0x4479b9,_0x21732c,_0x5c859b){const _0x365fc9=_0xc387,_0xa8509f={'rRuRK':'Saving\x20authentication\x20state...','YisnN':'settings.json','QHSfI':'auth.json','yJcQJ':function(_0x28a8a6,_0x51a14d){return _0x28a8a6(_0x51a14d);},'mVhxo':function(_0x2fd609,_0xd2029,_0x4f1c92){return _0x2fd609(_0xd2029,_0x4f1c92);},'Jqlsi':function(_0xd7a2d3,_0x2f6c38){return _0xd7a2d3===_0x2f6c38;},'AtmKS':_0x365fc9(0x1c3),'VHiWM':_0x365fc9(0x1a9),'qcSjQ':_0x365fc9(0x1ae),'raKak':_0x365fc9(0x1c7),'ePWoe':_0x365fc9(0x1a8),'HGURB':'Browser\x20closed\x20before\x20authentication\x20was\x20saved.','YMmMC':'utf-8','jbWXE':function(_0x509fd3){return _0x509fd3();},'HBIwc':'\x20\x20Could\x20not\x20encrypt:\x20No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','WiZco':function(_0x392080,_0x4c6084,_0xef6851){return _0x392080(_0x4c6084,_0xef6851);},'fnowo':'config_write'},_0x357fef=getEnvDir(_0x4479b9),_0x234ff9=join(_0x357fef,_0xa8509f[_0x365fc9(0x1ab)]),_0x12729c=join(_0x357fef,_0xa8509f[_0x365fc9(0x1b3)]),_0x560356=_0x12729c+'.enc',_0x1d2759=process[_0x365fc9(0x1c0)]['isTTY']&&process[_0x365fc9(0x1a0)][_0x365fc9(0x1ba)];if(!_0x1d2759)throw new Error(_0x365fc9(0x1a4));if(!_0xa8509f[_0x365fc9(0x1bc)](existsSync,_0x357fef))throw new Error('Profile\x20\x22'+_0x4479b9+_0x365fc9(0x1bf)+_0x4479b9);if(!existsSync(_0x234ff9))throw new Error('Config\x20not\x20found\x20at\x20'+_0x234ff9+'.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x4479b9);const _0x3f9c73=await _0xa8509f[_0x365fc9(0x1b5)](readFile,_0x234ff9,'utf-8'),_0x5bdbfe=JSON['parse'](_0x3f9c73),_0x3237bb=resolveEnvVars(_0x5bdbfe),_0x29de9c=_0xa8509f[_0x365fc9(0x1aa)](typeof _0x3237bb['baseUrl'],_0x365fc9(0x1a7))?_0x3237bb[_0x365fc9(0x19f)]:undefined,_0x872119=existsSync(_0x12729c),_0x3a7760=_0xa8509f['yJcQJ'](isEnvCi,_0x4479b9);_0x21732c?.['trackPhaseStart'](_0xa8509f['AtmKS']),console['log'](_0x365fc9(0x1b4)),console['log'](_0xa8509f[_0x365fc9(0x1b2)]),console[_0x365fc9(0x1bb)](_0xa8509f[_0x365fc9(0x1b6)]),console['log'](_0xa8509f['raKak']);const {launchOptions:_0x14c90f,contextOptions:_0x2719ee}=buildBrowserOptionsFromSettings(_0x3237bb,{'headless':![],'storageStatePath':_0x872119?_0x12729c:undefined});_0x3237bb[_0x365fc9(0x1af)]&&(_0x2719ee[_0x365fc9(0x1b9)]={..._0x2719ee[_0x365fc9(0x1b9)],..._0x3237bb['setupHeaders']});const _0x326555=await chromium[_0x365fc9(0x1c5)](_0x14c90f);let _0x422699=null;try{_0x422699=await _0x326555['newContext'](_0x2719ee),await addProfileSetupBanner(_0x422699);const _0x210098=await _0x422699['newPage']();await _0x210098['goto'](_0x29de9c||_0x365fc9(0x1ac));let _0x124946=![];await new Promise(_0x17eff7=>{_0x210098['on']('close',async()=>{const _0x3e54a3=_0xc387;try{console[_0x3e54a3(0x1bb)](_0xa8509f[_0x3e54a3(0x1c6)]),await _0x422699?.[_0x3e54a3(0x1b1)]({'path':_0x12729c}),_0x124946=!![];}catch{}_0x17eff7();});});if(!_0x124946){console[_0x365fc9(0x1bb)](_0xa8509f['ePWoe']);!_0x3237bb[_0x365fc9(0x19e)]&&(console[_0x365fc9(0x1bb)]('This\x20can\x20happen\x20due\x20to\x20a\x20browser\x20compatibility\x20issue\x20on\x20some\x20systems.\x0a'),console[_0x365fc9(0x1bb)]('Enable\x20safe\x20mode\x20and\x20try\x20again:\x20ranger\x20profile\x20config\x20set\x20'+_0x4479b9+'\x20safeMode\x20true\x0a'));throw new Error(_0xa8509f['HGURB']);}}finally{_0x422699&&await _0x422699['close']()[_0x365fc9(0x1b8)](()=>{}),await _0x326555['close']()['catch'](()=>{});}if(_0x3a7760){const _0x23b16f=await readFile(_0x12729c,_0xa8509f['YMmMC']),_0x2328f0=await _0xa8509f['jbWXE'](getToken);if(!_0x2328f0)console[_0x365fc9(0x198)](_0xa8509f['HBIwc']),console['log']('✓\x20Auth\x20state\x20saved\x20to:\x20'+_0x12729c);else{const _0x2eca5b=encrypt(_0x23b16f,_0x2328f0);await _0xa8509f['WiZco'](writeFile,_0x560356,_0x2eca5b),await unlink(_0x12729c),console['log'](_0x365fc9(0x1a3)+_0x560356),console['log'](_0x365fc9(0x1a5)),console[_0x365fc9(0x1bb)](_0x365fc9(0x1c1));}}else console['log']('✓\x20Auth\x20state\x20saved\x20to:\x20'+_0x12729c);_0x21732c?.['trackPhaseEnd'](_0x365fc9(0x1c3)),_0x21732c?.['trackPhaseStart']('config_write'),_0x5bdbfe['browser']=_0x5bdbfe[_0x365fc9(0x1c2)]||{},_0x5bdbfe[_0x365fc9(0x1c2)]['contextOptions']=_0x5bdbfe[_0x365fc9(0x1c2)]['contextOptions']||{},_0x5bdbfe['browser']['contextOptions']['storageState']=_0x12729c,_0x5c859b?.['allowInsecureLocalhost']===!![]&&(_0x5bdbfe['allowInsecureLocalhost']=!![]),await writeFile(_0x234ff9,JSON['stringify'](_0x5bdbfe,null,0x2)),console[_0x365fc9(0x1bb)](_0x365fc9(0x19b)+_0x234ff9),_0x21732c?.['trackPhaseEnd'](_0xa8509f[_0x365fc9(0x1a6)]),console['log'](_0x365fc9(0x19a)+_0x4479b9+'\x22\x20authentication\x20updated');}
|
package/build/commands/useEnv.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x53158e,_0xd74350){const _0x32df86=_0x165d,_0x487bc2=_0x53158e();while(!![]){try{const _0x5bc91f=-parseInt(_0x32df86(0x18a))/0x1*(parseInt(_0x32df86(0x185))/0x2)+-parseInt(_0x32df86(0x183))/0x3*(-parseInt(_0x32df86(0x18c))/0x4)+-parseInt(_0x32df86(0x18d))/0x5+-parseInt(_0x32df86(0x186))/0x6+parseInt(_0x32df86(0x188))/0x7+parseInt(_0x32df86(0x187))/0x8+parseInt(_0x32df86(0x184))/0x9;if(_0x5bc91f===_0xd74350)break;else _0x487bc2['push'](_0x487bc2['shift']());}catch(_0x3c6f91){_0x487bc2['push'](_0x487bc2['shift']());}}}(_0x13bd,0x56a90));function _0x13bd(){const _0x2b95f0=['1918045XnEiCN','\x0a✓\x20Now\x20using\x20profile\x20\x22','Profile\x20\x22','452073isCNEl','6272919QRDixt','2FCnDHG','2545836oaDDAR','2825648KtWsVn','3088617nrdMIi','log','479244xfoiwG','BpRkF','4LhFQTr'];_0x13bd=function(){return _0x2b95f0;};return _0x13bd();}function _0x165d(_0x3d06f7,_0x595be9){_0x3d06f7=_0x3d06f7-0x181;const _0x13bde5=_0x13bd();let _0x165d9a=_0x13bde5[_0x3d06f7];return _0x165d9a;}import{join}from'path';import{existsSync}from'fs';import{getEnvDir}from'./utils/settings.js';import{writeActiveProfileName}from'./utils/activeProfile.js';export async function useEnv(_0x2bbb8b){const _0x51e77c=_0x165d,_0x9d7095={'EebQm':function(_0x114d60,_0x373f95,_0x10417f){return _0x114d60(_0x373f95,_0x10417f);},'qijkO':'settings.json','BpRkF':function(_0x78adc1,_0x3f37f6){return _0x78adc1(_0x3f37f6);}},_0x4e99b7=getEnvDir(_0x2bbb8b),_0x34a44e=_0x9d7095['EebQm'](join,_0x4e99b7,_0x9d7095['qijkO']);if(!_0x9d7095['BpRkF'](existsSync,_0x4e99b7))throw new Error(_0x51e77c(0x182)+_0x2bbb8b+'\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x2bbb8b);if(!_0x9d7095[_0x51e77c(0x18b)](existsSync,_0x34a44e))throw new Error('Config\x20not\x20found\x20at\x20'+_0x34a44e+'.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x2bbb8b);await writeActiveProfileName(_0x2bbb8b),console[_0x51e77c(0x189)](_0x51e77c(0x181)+_0x2bbb8b+'\x22');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function _0x492b(_0x1945ba,_0x5eefd6){_0x1945ba=_0x1945ba-0x1a9;const _0x1b712c=_0x1b71();let _0x492b79=_0x1b712c[_0x1945ba];return _0x492b79;}const _0x2cfe8f=_0x492b;(function(_0x140ad8,_0x1f0cfa){const _0x403849=_0x492b,_0x1107c9=_0x140ad8();while(!![]){try{const _0x226a58=parseInt(_0x403849(0x1aa))/0x1+-parseInt(_0x403849(0x1ac))/0x2+-parseInt(_0x403849(0x1b9))/0x3+-parseInt(_0x403849(0x1b7))/0x4+-parseInt(_0x403849(0x1b3))/0x5*(parseInt(_0x403849(0x1b0))/0x6)+parseInt(_0x403849(0x1a9))/0x7+parseInt(_0x403849(0x1b6))/0x8*(parseInt(_0x403849(0x1ab))/0x9);if(_0x226a58===_0x1f0cfa)break;else _0x1107c9['push'](_0x1107c9['shift']());}catch(_0x5f4bd5){_0x1107c9['push'](_0x1107c9['shift']());}}}(_0x1b71,0x36e89));import{existsSync}from'fs';function _0x1b71(){const _0x23b611=['100021NSxjfL','1598175HPvsFc','895944KMOUno','rbXeo','rMKZR','active-env.txt','1916070HZRjpp','trim','utf-8','5NjAczm','BmUIo','qAQdi','56IpHaeD','665216aoGqGg','pbAIp','604359TnysWo','118531oIRQNk'];_0x1b71=function(){return _0x23b611;};return _0x1b71();}import{mkdir,readFile,rename,unlink,writeFile}from'fs/promises';import{join}from'path';import{getRangerDir}from'./rangerRoot.js';const ACTIVE_PROFILE_FILE='active-profile.txt',LEGACY_ACTIVE_ENV_FILE=_0x2cfe8f(0x1af);function getActiveProfilePath(){const _0x39b45c=_0x2cfe8f,_0x34c907={'rbXeo':function(_0x4ae17d,_0x416839,_0x3f011c){return _0x4ae17d(_0x416839,_0x3f011c);}};return _0x34c907[_0x39b45c(0x1ad)](join,getRangerDir(),ACTIVE_PROFILE_FILE);}function getLegacyActiveEnvPath(){const _0x2466c8={'gDfkE':function(_0x4edf62,_0x20c2a0,_0x40db4c){return _0x4edf62(_0x20c2a0,_0x40db4c);}};return _0x2466c8['gDfkE'](join,getRangerDir(),LEGACY_ACTIVE_ENV_FILE);}async function migrateLegacyActiveEnv(){const _0x175362=_0x2cfe8f,_0x4d2fea={'rMKZR':function(_0x55a7e8){return _0x55a7e8();},'bXMyR':function(_0x4e0738,_0x5d85bc){return _0x4e0738(_0x5d85bc);},'qAQdi':'utf-8'},_0x58ba90=_0x4d2fea[_0x175362(0x1ae)](getLegacyActiveEnvPath);if(!_0x4d2fea['bXMyR'](existsSync,_0x58ba90))return null;let _0xa6c787=null;try{_0xa6c787=(await readFile(_0x58ba90,_0x175362(0x1b2)))[_0x175362(0x1b1)]()||null;}catch{_0xa6c787=null;}if(!_0xa6c787)return null;const _0x824c56=getActiveProfilePath();try{await rename(_0x58ba90,_0x824c56);}catch{try{const _0x504922=getRangerDir();await mkdir(_0x504922,{'recursive':!![]}),await writeFile(_0x824c56,_0xa6c787,_0x4d2fea[_0x175362(0x1b5)]),await unlink(_0x58ba90);}catch{}}return _0xa6c787;}export async function readActiveProfileName(){const _0x169e1f=_0x2cfe8f,_0x532026={'oBYcV':function(_0x13a00d,_0x11a1a6){return _0x13a00d(_0x11a1a6);},'MzniN':function(_0x14132f,_0x2e2dad,_0x179c6f){return _0x14132f(_0x2e2dad,_0x179c6f);},'pbAIp':'utf-8','cUQZZ':function(_0x1d9b77){return _0x1d9b77();}},_0x388701=getActiveProfilePath();if(_0x532026['oBYcV'](existsSync,_0x388701))try{return(await _0x532026['MzniN'](readFile,_0x388701,_0x532026[_0x169e1f(0x1b8)]))[_0x169e1f(0x1b1)]()||null;}catch{return null;}return await _0x532026['cUQZZ'](migrateLegacyActiveEnv);}export async function writeActiveProfileName(_0x45e956){const _0x187eea=_0x2cfe8f,_0x400ca6={'BmUIo':function(_0x42eb52){return _0x42eb52();},'JKNdI':function(_0x38f99c,_0x50fce6,_0x49e9aa){return _0x38f99c(_0x50fce6,_0x49e9aa);},'LJgtH':function(_0x772516,_0x3d10b5,_0x1afe64,_0x272194){return _0x772516(_0x3d10b5,_0x1afe64,_0x272194);}},_0x1e0263=_0x400ca6[_0x187eea(0x1b4)](getRangerDir);await _0x400ca6['JKNdI'](mkdir,_0x1e0263,{'recursive':!![]});const _0x2ef591=_0x400ca6['BmUIo'](getActiveProfilePath);await _0x400ca6['LJgtH'](writeFile,_0x2ef591,_0x45e956,'utf-8');const _0x36191c=getLegacyActiveEnvPath();if(existsSync(_0x36191c))try{await unlink(_0x36191c);}catch{}}export async function migrateActiveProfileFile(){const _0x189b3f={'pbcPg':function(_0x6b5676){return _0x6b5676();}},_0x240f63=await _0x189b3f['pbcPg'](migrateLegacyActiveEnv);return _0x240f63!==null;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x42e5a4=_0x57a3;(function(_0x359bb7,_0x2a565f){const _0x57eea1=_0x57a3,_0x4ed850=_0x359bb7();while(!![]){try{const _0x462e43=-parseInt(_0x57eea1(0x13d))/0x1+-parseInt(_0x57eea1(0x138))/0x2+-parseInt(_0x57eea1(0x132))/0x3+parseInt(_0x57eea1(0x13a))/0x4+parseInt(_0x57eea1(0x12a))/0x5+parseInt(_0x57eea1(0x12e))/0x6+parseInt(_0x57eea1(0x13e))/0x7;if(_0x462e43===_0x2a565f)break;else _0x4ed850['push'](_0x4ed850['shift']());}catch(_0x2e5fad){_0x4ed850['push'](_0x4ed850['shift']());}}}(_0x49ea,0xbaac8));function _0x57a3(_0x1ac35a,_0x3c91b3){_0x1ac35a=_0x1ac35a-0x128;const _0x49eaa6=_0x49ea();let _0x57a3f5=_0x49eaa6[_0x1ac35a];return _0x57a3f5;}import{delimiter}from'path';import{getAiProxyUrl}from'./environment.js';function _0x49ea(){const _0x5644a1=['npm_config_cache','platform','NPM_CONFIG_CACHE','3339297PNoonE','length','some','APPDATA','XDG_CONFIG_HOME','split','393748uJardj','PATH\x20is\x20empty,\x20so\x20npm\x20and\x20core\x20system\x20tools\x20may\x20be\x20unavailable.','3549832CDeqsU','/bin','filter','562728gxRyTa','7493794EgRthD','${PATH}','NPM_CONFIG_REGISTRY','TMP','$PATH','HOME','PLAYWRIGHT_BROWSERS_PATH','env','PATH\x20contains\x20an\x20unexpanded\x20placeholder\x20like\x20`${PATH}`\x20instead\x20of\x20the\x20expanded\x20current\x20PATH.','NPM_CONFIG_PREFIX','PATH','TEMP','471020sVQtWr','LOCALAPPDATA','push','includes','3510678EIGQdv'];_0x49ea=function(){return _0x5644a1;};return _0x49ea();}const AGENT_ENV_PASSTHROUGH_KEYS=[_0x42e5a4(0x128),_0x42e5a4(0x143),'TMPDIR',_0x42e5a4(0x141),_0x42e5a4(0x129),'USERPROFILE',_0x42e5a4(0x135),_0x42e5a4(0x12b),'XDG_CACHE_HOME',_0x42e5a4(0x136),_0x42e5a4(0x144),'PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD','CHROME_BIN','CHROMIUM_BIN',_0x42e5a4(0x12f),_0x42e5a4(0x131),'npm_config_userconfig','NPM_CONFIG_USERCONFIG','npm_config_prefix',_0x42e5a4(0x147),'npm_config_registry',_0x42e5a4(0x140)],UNEXPANDED_PATH_TOKEN_PATTERNS=[_0x42e5a4(0x13f),_0x42e5a4(0x142),'%PATH%'];export function getAgentPathHealthWarning(_0x1fcee2,_0x568452=process[_0x42e5a4(0x130)]){const _0x2d7d50=_0x42e5a4,_0x5ce607={'kAhUg':function(_0x1fef75,_0x79f654){return _0x1fef75||_0x79f654;},'HfkSv':_0x2d7d50(0x139),'KLpyj':_0x2d7d50(0x146),'ifSwc':function(_0x10b028,_0x5a6fdf){return _0x10b028!==_0x5a6fdf;},'oOyLE':'win32','epvJy':'PATH\x20is\x20missing\x20core\x20system\x20directories\x20like\x20`/usr/bin`\x20and\x20`/bin`.'},_0x52893b=[],_0x8236ef=_0x5ce607['kAhUg'](_0x1fcee2,'')[_0x2d7d50(0x137)](delimiter)[_0x2d7d50(0x13c)](Boolean);_0x8236ef[_0x2d7d50(0x133)]===0x0&&_0x52893b['push'](_0x5ce607['HfkSv']);UNEXPANDED_PATH_TOKEN_PATTERNS[_0x2d7d50(0x134)](_0x1f941e=>(_0x1fcee2||'')['includes'](_0x1f941e))&&_0x52893b['push'](_0x5ce607['KLpyj']);if(_0x5ce607['ifSwc'](_0x568452,_0x5ce607['oOyLE'])){const _0x5391b4=_0x8236ef['includes']('/usr/bin'),_0x17307d=_0x8236ef[_0x2d7d50(0x12d)](_0x2d7d50(0x13b));!_0x5391b4&&!_0x17307d&&_0x52893b[_0x2d7d50(0x12c)](_0x5ce607['epvJy']);}if(_0x52893b['length']===0x0)return null;return{'summary':'Your\x20PATH\x20looks\x20incomplete\x20for\x20browser\x20automation.\x20Ranger\x20will\x20keep\x20going,\x20but\x20browser\x20setup\x20may\x20fail.','issues':_0x52893b};}export function buildAgentEnv(_0x39963d){const _0x1c78d9=_0x42e5a4,_0x17d290={'ANTHROPIC_API_KEY':_0x39963d,'ANTHROPIC_BASE_URL':getAiProxyUrl()};for(const _0x2b0b5f of AGENT_ENV_PASSTHROUGH_KEYS){const _0x2f9d8b=process[_0x1c78d9(0x145)][_0x2b0b5f];_0x2f9d8b&&(_0x17d290[_0x2b0b5f]=_0x2f9d8b);}return _0x17d290;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x599db6,_0x10b115){const _0x2ca1ef=_0x3493,_0x176183=_0x599db6();while(!![]){try{const _0xc1ba6e=-parseInt(_0x2ca1ef(0x1d7))/0x1+parseInt(_0x2ca1ef(0x1de))/0x2+parseInt(_0x2ca1ef(0x1ef))/0x3*(parseInt(_0x2ca1ef(0x1c1))/0x4)+parseInt(_0x2ca1ef(0x19a))/0x5+-parseInt(_0x2ca1ef(0x181))/0x6+parseInt(_0x2ca1ef(0x1a7))/0x7+-parseInt(_0x2ca1ef(0x197))/0x8;if(_0xc1ba6e===_0x10b115)break;else _0x176183['push'](_0x176183['shift']());}catch(_0x13740d){_0x176183['push'](_0x176183['shift']());}}}(_0x4e1f,0xa4dc6));const _0x324e49=(function(){const _0x328ea2={'GOHCL':function(_0x428b96,_0x532991,_0x257e24,_0x258562){return _0x428b96(_0x532991,_0x257e24,_0x258562);},'fPEtO':function(_0x46a5c7,_0x36e9b8){return _0x46a5c7!==_0x36e9b8;}};let _0x4f80dc=!![];return function(_0x369672,_0xce0f8c){const _0x4bb85b=_0x3493,_0x1c1a2f={'HpDnr':function(_0x2a5829,_0x5db2a1,_0x50cb51,_0x140d16){const _0xf6e846=_0x3493;return _0x328ea2[_0xf6e846(0x1da)](_0x2a5829,_0x5db2a1,_0x50cb51,_0x140d16);},'HLbbI':function(_0x238582,_0x309a70){const _0x1bee28=_0x3493;return _0x328ea2[_0x1bee28(0x17f)](_0x238582,_0x309a70);},'bYYPP':_0x4bb85b(0x1c4)},_0x4b48ee=_0x4f80dc?function(){const _0x50c5e4=_0x4bb85b,_0x1f3ce2={'jzpkn':function(_0x2eb3c6,_0x377cc8,_0x2385d4,_0xbeeb44){const _0x405686=_0x3493;return _0x1c1a2f[_0x405686(0x198)](_0x2eb3c6,_0x377cc8,_0x2385d4,_0xbeeb44);}};if(_0xce0f8c){if(_0x1c1a2f[_0x50c5e4(0x1a6)](_0x50c5e4(0x1c4),_0x1c1a2f[_0x50c5e4(0x189)]))return _0x1f3ce2[_0x50c5e4(0x1a2)](_0x599374,_0x8dc381,_0x3cc621,'video/webm');else{const _0xd596bb=_0xce0f8c[_0x50c5e4(0x196)](_0x369672,arguments);return _0xce0f8c=null,_0xd596bb;}}}:function(){};return _0x4f80dc=![],_0x4b48ee;};}()),_0x565415=_0x324e49(this,function(){const _0x51cc7a=_0x3493,_0x315dcb={'UXNvZ':_0x51cc7a(0x1cc)};return _0x565415[_0x51cc7a(0x184)]()[_0x51cc7a(0x1e9)](_0x51cc7a(0x1cc))[_0x51cc7a(0x184)]()['constructor'](_0x565415)['search'](_0x315dcb[_0x51cc7a(0x1cf)]);});_0x565415();import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{createHash}from'crypto';import{withRetry}from'./retry.js';export async function createBrowserSession(_0x3c9065){const _0x171bb1=_0x3493,_0x484582={'IitTX':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','BCSPw':function(_0xc36ce8){return _0xc36ce8();},'HItHb':function(_0x4db466,_0x1f7689,_0x5891e4){return _0x4db466(_0x1f7689,_0x5891e4);},'ENzJz':_0x171bb1(0x1ae),'wciPl':_0x171bb1(0x19c),'wWQOx':function(_0x1cb9bd,_0x343d65){return _0x1cb9bd!==_0x343d65;},'vHCXS':_0x171bb1(0x1d2)},_0x1d980c=await getToken();if(!_0x1d980c)throw new Error(_0x171bb1(0x1c0));const _0xe10ac3=_0x484582[_0x171bb1(0x1ce)](getApiBaseUrl),_0x4d046d=await _0x484582[_0x171bb1(0x1ed)](fetch,_0xe10ac3+'/api/v1/mcp/browser-sessions',{'method':_0x484582[_0x171bb1(0x18f)],'headers':{'Authorization':_0x171bb1(0x1d8)+_0x1d980c,'Content-Type':_0x484582[_0x171bb1(0x1be)]},'body':JSON[_0x171bb1(0x1a5)]({'environmentName':_0x3c9065?.[_0x171bb1(0x1bc)],'settings':_0x3c9065?.[_0x171bb1(0x1ba)],'task':_0x3c9065?.[_0x171bb1(0x192)],'url':_0x3c9065?.[_0x171bb1(0x183)],'featureId':_0x3c9065?.[_0x171bb1(0x1d1)],'checklistItemId':_0x3c9065?.['checklistItemId']})});if(!_0x4d046d['ok']){if(_0x484582[_0x171bb1(0x1b6)](_0x484582['vHCXS'],_0x484582[_0x171bb1(0x1d4)]))throw new _0x4ace76(_0x484582[_0x171bb1(0x18e)]);else{const _0x2d6743=await _0x4d046d[_0x171bb1(0x1ac)]();throw new Error(_0x171bb1(0x1c3)+_0x2d6743);}}return _0x4d046d[_0x171bb1(0x18a)]();}function _0x3493(_0x157c5d,_0x5725a5){_0x157c5d=_0x157c5d-0x178;const _0x2d3182=_0x4e1f();let _0x565415=_0x2d3182[_0x157c5d];if(_0x3493['nZHsnM']===undefined){var _0x324e49=function(_0x488afc){const _0x32f44d='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x57720a='',_0x213f9b='',_0x3816ff=_0x57720a+_0x324e49;for(let _0x3fc34d=0x0,_0xf9c585,_0x49ca0f,_0x263245=0x0;_0x49ca0f=_0x488afc['charAt'](_0x263245++);~_0x49ca0f&&(_0xf9c585=_0x3fc34d%0x4?_0xf9c585*0x40+_0x49ca0f:_0x49ca0f,_0x3fc34d++%0x4)?_0x57720a+=_0x3816ff['charCodeAt'](_0x263245+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0xf9c585>>(-0x2*_0x3fc34d&0x6)):_0x3fc34d:0x0){_0x49ca0f=_0x32f44d['indexOf'](_0x49ca0f);}for(let _0x45205d=0x0,_0x203aba=_0x57720a['length'];_0x45205d<_0x203aba;_0x45205d++){_0x213f9b+='%'+('00'+_0x57720a['charCodeAt'](_0x45205d)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x213f9b);};_0x3493['JFQtJe']=_0x324e49,_0x3493['jSqYAf']={},_0x3493['nZHsnM']=!![];}const _0x4e1fbc=_0x2d3182[0x0],_0x349386=_0x157c5d+_0x4e1fbc,_0x2607f6=_0x3493['jSqYAf'][_0x349386];if(!_0x2607f6){const _0x4cde4b=function(_0x3db043){this['TLMQRf']=_0x3db043,this['PtDLnN']=[0x1,0x0,0x0],this['KMTiJR']=function(){return'newState';},this['BudbVe']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['CtvlGz']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x4cde4b['prototype']['brdgzz']=function(){const _0x585c92=new RegExp(this['BudbVe']+this['CtvlGz']),_0x54d73c=_0x585c92['test'](this['KMTiJR']['toString']())?--this['PtDLnN'][0x1]:--this['PtDLnN'][0x0];return this['dedOyA'](_0x54d73c);},_0x4cde4b['prototype']['dedOyA']=function(_0x2da5dc){if(!Boolean(~_0x2da5dc))return _0x2da5dc;return this['ERzJqk'](this['TLMQRf']);},_0x4cde4b['prototype']['ERzJqk']=function(_0x4f4ed4){for(let _0x2b1a0f=0x0,_0x216c55=this['PtDLnN']['length'];_0x2b1a0f<_0x216c55;_0x2b1a0f++){this['PtDLnN']['push'](Math['round'](Math['random']())),_0x216c55=this['PtDLnN']['length'];}return _0x4f4ed4(this['PtDLnN'][0x0]);},new _0x4cde4b(_0x3493)['brdgzz'](),_0x565415=_0x3493['JFQtJe'](_0x565415),_0x3493['jSqYAf'][_0x349386]=_0x565415;}else _0x565415=_0x2607f6;return _0x565415;}export async function updateBrowserSession(_0x30e496,_0x12deab){const _0xe3fd52=_0x3493,_0x38c32b={'gxuXa':_0xe3fd52(0x1c0),'KSvVf':function(_0x4a2ce2,_0x226316){return _0x4a2ce2===_0x226316;},'eZbsp':_0xe3fd52(0x1c9),'NmEBX':function(_0x1e3d36){return _0x1e3d36();},'ZiSqR':'LTVSa','rrgWO':function(_0x418ef4){return _0x418ef4();},'dwwjg':function(_0x5c526e,_0x3c5508,_0x379381){return _0x5c526e(_0x3c5508,_0x379381);},'uXpVQ':'application/json','Qjrgx':_0xe3fd52(0x187)};return withRetry(async()=>{const _0x1881ce=_0xe3fd52,_0x1fb054={'pWjzH':_0x38c32b['gxuXa']};if(_0x38c32b[_0x1881ce(0x1a0)](_0x1881ce(0x1c9),_0x38c32b['eZbsp'])){const _0x38e1d7=await _0x38c32b['NmEBX'](getToken);if(!_0x38e1d7){if(_0x38c32b['ZiSqR']===_0x1881ce(0x1e6))throw new Error(_0x38c32b[_0x1881ce(0x188)]);else throw new _0x3257d6(_0x1fb054[_0x1881ce(0x1d3)]);}const _0x279666=_0x38c32b[_0x1881ce(0x1b9)](getApiBaseUrl),_0x3f2d33=await _0x38c32b[_0x1881ce(0x1bf)](fetch,_0x279666+'/api/v1/mcp/browser-sessions/'+_0x30e496,{'method':_0x1881ce(0x19d),'headers':{'Authorization':_0x1881ce(0x1d8)+_0x38e1d7,'Content-Type':_0x38c32b['uXpVQ']},'body':JSON[_0x1881ce(0x1a5)](_0x12deab)});if(!_0x3f2d33['ok']){const _0x1c4b62=await _0x3f2d33[_0x1881ce(0x1ac)]();throw new Error(_0x1881ce(0x1b1)+_0x1c4b62);}return _0x3f2d33[_0x1881ce(0x18a)]();}else throw new _0x148b90(_0x1fb054['pWjzH']);},{'label':_0x38c32b[_0xe3fd52(0x1e1)]});}export async function getBrowserSession(_0x162c8d){const _0x1e2dd7=_0x3493,_0x3f0583={'VBgVO':function(_0x1eef72){return _0x1eef72();},'pSSYQ':function(_0xe01d2f,_0x3775b9,_0x34f436){return _0xe01d2f(_0x3775b9,_0x34f436);},'aywEl':'GET'},_0x555af2=await _0x3f0583[_0x1e2dd7(0x1b2)](getToken);if(!_0x555af2)throw new Error(_0x1e2dd7(0x1c0));const _0xb1b94=_0x3f0583[_0x1e2dd7(0x1b2)](getApiBaseUrl),_0x14f54c=await _0x3f0583[_0x1e2dd7(0x199)](fetch,_0xb1b94+_0x1e2dd7(0x1ee)+_0x162c8d,{'method':_0x3f0583['aywEl'],'headers':{'Authorization':_0x1e2dd7(0x1d8)+_0x555af2}});if(!_0x14f54c['ok']){const _0x28884b=await _0x14f54c['text']();throw new Error('Failed\x20to\x20get\x20browser\x20session:\x20'+_0x28884b);}return _0x14f54c[_0x1e2dd7(0x18a)]();}export async function getUploadUrls(_0x37b0f6,_0x3c4bf2,_0x1f37df,_0x346153){const _0x3bb16d=_0x3493,_0x48fe1a={'lyQYm':_0x3bb16d(0x1c0),'vCCld':function(_0x4d54d4){return _0x4d54d4();},'XBOkh':function(_0x3ee8ea,_0x399c87,_0xfbe373){return _0x3ee8ea(_0x399c87,_0xfbe373);},'USkzf':_0x3bb16d(0x1ae),'XsHUZ':_0x3bb16d(0x19c),'SVHQo':function(_0x2f95c2,_0x417a46){return _0x2f95c2!==_0x417a46;},'iqGsg':function(_0x65d9f6,_0x1ecb4d){return _0x65d9f6!==_0x1ecb4d;}},_0x9009e3=await getToken();if(!_0x9009e3)throw new Error(_0x48fe1a[_0x3bb16d(0x1e8)]);const _0x450329=_0x48fe1a[_0x3bb16d(0x1ea)](getApiBaseUrl),_0x5bfdd5=await _0x48fe1a[_0x3bb16d(0x1d9)](fetch,_0x450329+_0x3bb16d(0x1ee)+_0x37b0f6+_0x3bb16d(0x178),{'method':_0x48fe1a[_0x3bb16d(0x180)],'headers':{'Authorization':_0x3bb16d(0x1d8)+_0x9009e3,'Content-Type':_0x48fe1a[_0x3bb16d(0x19f)]},'body':JSON['stringify']({'filename':_0x3c4bf2,'filetype':_0x1f37df,..._0x48fe1a[_0x3bb16d(0x1e3)](_0x346153?.[_0x3bb16d(0x1a1)],undefined)&&{'size':_0x346153[_0x3bb16d(0x1a1)]},..._0x48fe1a[_0x3bb16d(0x1e5)](_0x346153?.['checksum'],undefined)&&{'checksum':_0x346153['checksum']},..._0x346153?.['metadata']!==undefined&&{'metadata':_0x346153['metadata']}})});if(!_0x5bfdd5['ok']){const _0x5a3f91=await _0x5bfdd5[_0x3bb16d(0x1ac)]();throw new Error('Failed\x20to\x20get\x20upload\x20URLs:\x20'+_0x5a3f91);}return _0x5bfdd5[_0x3bb16d(0x18a)]();}export async function uploadFile(_0x30a1cd,_0x1fead3,_0x11ad92){const _0x38f476=_0x3493,_0xf2d6b2={'woIkD':function(_0x2caf9d,_0x5ed260,_0xb113cd){return _0x2caf9d(_0x5ed260,_0xb113cd);},'YbDIV':_0x38f476(0x1a3)},_0x2fce18=await _0xf2d6b2[_0x38f476(0x1e0)](fetch,_0x30a1cd,{'method':_0xf2d6b2['YbDIV'],'headers':{'Content-Type':_0x11ad92,'Content-Length':_0x1fead3[_0x38f476(0x1ec)]['toString']()},'body':_0x1fead3});if(!_0x2fce18['ok']){const _0x56b3d6=await _0x2fce18[_0x38f476(0x1ac)]();throw new Error(_0x38f476(0x1af)+_0x56b3d6);}}export async function uploadTrace(_0x1515cb,_0x4ac4c8){const _0x20fddd=_0x3493,_0x57dcfe={'XUeIg':function(_0x531bcb,_0x82614d,_0x4fbcb1,_0x5b90af){return _0x531bcb(_0x82614d,_0x4fbcb1,_0x5b90af);},'lTRCF':_0x20fddd(0x1ca)};return _0x57dcfe['XUeIg'](uploadFile,_0x1515cb,_0x4ac4c8,_0x57dcfe[_0x20fddd(0x1b8)]);}export async function uploadConversation(_0x23e472,_0x43c1ee){const _0x44db1d=_0x3493,_0xc5b6cf={'UgksN':function(_0x1dfffc,_0x4bae0f,_0x377341,_0x1f61f8){return _0x1dfffc(_0x4bae0f,_0x377341,_0x1f61f8);}};return _0xc5b6cf[_0x44db1d(0x1b0)](uploadFile,_0x23e472,_0x43c1ee,_0x44db1d(0x186));}export async function uploadScreenshot(_0x27734f,_0x41e450){const _0x5ed302=_0x3493,_0x3e8494={'qPyWs':function(_0x57669d,_0x8a917f,_0x10681c,_0x35eaf8){return _0x57669d(_0x8a917f,_0x10681c,_0x35eaf8);}};return _0x3e8494[_0x5ed302(0x1b4)](uploadFile,_0x27734f,_0x41e450,_0x5ed302(0x1d0));}export async function uploadVideo(_0x5a3cae,_0x4e6194){const _0x22c049=_0x3493,_0x233288={'fBqJd':function(_0x1b0939,_0x3dc10d,_0x35aeeb,_0x12545a){return _0x1b0939(_0x3dc10d,_0x35aeeb,_0x12545a);},'uvcGK':_0x22c049(0x17b)};return _0x233288[_0x22c049(0x1e7)](uploadFile,_0x5a3cae,_0x4e6194,_0x233288[_0x22c049(0x1dd)]);}export function buildTraceViewerUrl(_0x50b6c5){const _0x468d29=_0x3493,_0x556743={'UkYsi':function(_0xad23c0,_0x268856){return _0xad23c0(_0x268856);}},_0x2e3654=_0x556743['UkYsi'](encodeURIComponent,_0x50b6c5);return _0x468d29(0x19b)+_0x2e3654;}export async function getProxySessionToken(){const _0xe87630=_0x3493,_0x1d0a23={'NjytG':function(_0xb30208){return _0xb30208();},'QuKOD':_0xe87630(0x1c0)},_0x4408a6=await _0x1d0a23[_0xe87630(0x1b7)](getToken);if(!_0x4408a6)throw new Error(_0x1d0a23[_0xe87630(0x182)]);const _0x4b9512=_0x1d0a23['NjytG'](getApiBaseUrl),_0x39058c=await fetch(_0x4b9512+_0xe87630(0x1b3),{'method':_0xe87630(0x1ae),'headers':{'Authorization':_0xe87630(0x1d8)+_0x4408a6}});if(!_0x39058c['ok']){const _0x158188=await _0x39058c[_0xe87630(0x1ac)]();throw new Error(_0xe87630(0x191)+_0x158188);}const _0x5ef817=await _0x39058c[_0xe87630(0x18a)]();return _0x5ef817[_0xe87630(0x1c8)];}export function computeChecksum(_0x59c1b5){const _0x4e8e6c=_0x3493,_0x2eef73={'zmkTt':function(_0x344772,_0x1041aa){return _0x344772(_0x1041aa);},'QDsfI':_0x4e8e6c(0x193),'BEnpp':_0x4e8e6c(0x1bb)};return _0x2eef73['zmkTt'](createHash,_0x2eef73[_0x4e8e6c(0x185)])[_0x4e8e6c(0x1df)](_0x59c1b5)['digest'](_0x2eef73[_0x4e8e6c(0x1ad)]);}export async function createVerificationStep(_0x12428b,_0x3df09f){const _0x5d06ca=_0x3493,_0x49a485={'KomME':_0x5d06ca(0x1c0),'eoewd':function(_0x4815d9){return _0x4815d9();},'NPYSl':_0x5d06ca(0x1ae),'YdmmC':'application/json'},_0x31e0a4=await getToken();if(!_0x31e0a4)throw new Error(_0x49a485[_0x5d06ca(0x1dc)]);const _0x3ce6f2=_0x49a485[_0x5d06ca(0x1d6)](getApiBaseUrl),_0x22d2bc=await fetch(_0x3ce6f2+_0x5d06ca(0x1ee)+_0x12428b+_0x5d06ca(0x17a),{'method':_0x49a485[_0x5d06ca(0x1b5)],'headers':{'Authorization':_0x5d06ca(0x1d8)+_0x31e0a4,'Content-Type':_0x49a485[_0x5d06ca(0x1a9)]},'body':JSON[_0x5d06ca(0x1a5)](_0x3df09f)});if(!_0x22d2bc['ok']){const _0x4e187d=await _0x22d2bc[_0x5d06ca(0x1ac)]();throw new Error(_0x5d06ca(0x1c2)+_0x4e187d);}return _0x22d2bc[_0x5d06ca(0x18a)]();}export async function createStepAsset(_0x24737a,_0x2a02c2,_0xa7fac3){const _0x307a1d=_0x3493,_0x4cd4ce={'Pxywc':function(_0x385c45,_0x780dcd,_0x4ed7c2,_0x153c20){return _0x385c45(_0x780dcd,_0x4ed7c2,_0x153c20);},'PYSqy':'application/jsonl','iThlh':function(_0x1ad36f){return _0x1ad36f();},'VTyHT':function(_0x5e8c96,_0x33f16c){return _0x5e8c96!==_0x33f16c;},'MRLGV':_0x307a1d(0x179),'eyWRl':function(_0x293d1d,_0x56047d,_0x1afdbf){return _0x293d1d(_0x56047d,_0x1afdbf);},'IMKYy':'POST','FAMFr':_0x307a1d(0x19c),'hYWqh':_0x307a1d(0x1c7)},_0x3244de=await _0x4cd4ce[_0x307a1d(0x1ab)](getToken);if(!_0x3244de){if(_0x4cd4ce[_0x307a1d(0x17c)](_0x307a1d(0x179),_0x4cd4ce[_0x307a1d(0x194)]))return _0x4cd4ce[_0x307a1d(0x1c5)](_0x183a75,_0xa766c1,_0x3f155f,_0x4cd4ce[_0x307a1d(0x190)]);else throw new Error(_0x307a1d(0x1c0));}const _0x37dba0=getApiBaseUrl(),_0x489a06=await _0x4cd4ce[_0x307a1d(0x1aa)](fetch,_0x37dba0+_0x307a1d(0x1ee)+_0x24737a+_0x307a1d(0x1bd)+_0x2a02c2+_0x307a1d(0x1cd),{'method':_0x4cd4ce[_0x307a1d(0x1e4)],'headers':{'Authorization':'Bearer\x20'+_0x3244de,'Content-Type':_0x4cd4ce[_0x307a1d(0x195)]},'body':JSON[_0x307a1d(0x1a5)](_0xa7fac3)});if(!_0x489a06['ok']){if(_0x4cd4ce[_0x307a1d(0x1a4)]===_0x4cd4ce[_0x307a1d(0x1a4)]){const _0x4ac40b=await _0x489a06['text']();throw new Error(_0x307a1d(0x17d)+_0x4ac40b);}else throw new _0x2e877f(_0x307a1d(0x1c0));}return _0x489a06[_0x307a1d(0x18a)]();}function _0x4e1f(){const _0x48c7d3=['zhD3AMC','tM8GqvbjihrVA2vUignVBMzPz3vYzwqUifj1BJOGCMfUz2vYihnLDhvWifT0B2TLBL0','mtu2ELPWB0Pc','rMfPBgvKihrVignYzwf0zsb2zxjPzMLJyxrPB24GC3rLCdOG','rMfPBgvKihrVignYzwf0zsbICM93C2vYihnLC3nPB246ia','uw9Zt2S','uhH5D2m','t2TUsLu','EhzzCLK','C2vZC2LVBLrVA2vU','z1vHEM4','yxbWBgLJyxrPB24VEMLW','r0vu','kcGOlISPkYKRksSK','l2fZC2v0CW','qKntuhC','vvHoDLO','Aw1Hz2uVCg5N','zMvHDhvYzuLK','Aw1gzMS','CfDQEKG','DKHdwfm','rMfPBgvKihrVihvWzgf0zsb2zxjPzMLJyxrPB24GC3rLCdOG','zw9LD2q','mJy5otKWsNL2wNHn','qMvHCMvYia','wejpA2G','r09iq0W','DxvpD0e','s29Ttuu','DxzJr0S','mJq1nte2vMD1ELj1','DxbKyxrL','D29jA0q','uwPYz3G','DhnvrNG','u1ziuw8','su1lwxK','AxfhC2C','tfrwu2e','zKjXsMq','BhLrww0','C2vHCMnO','DKndBgq','EhPsB00','BgvUz3rO','seL0sgi','l2fWAs92ms9Ty3aVyNjVD3nLCI1ZzxnZAw9UCY8','ndqYndfjAKjhqK0','l3vWBg9Hzc11CMXZ','AgPRuMm','l3n0zxbZ','DMLKzw8VD2vIBq','vLr5sfq','rMfPBgvKihrVignYzwf0zsbZDgvWigfZC2v0oIa','veneu2u','zLbfDe8','vvnREMy','mJiWmde1oeneA0DJtG','uxvlt0q','DxjS','Dg9tDhjPBMC','uurZzKK','yxbWBgLJyxrPB24VANnVBMW','DxbKyxrLqNjVD3nLCLnLC3nPB24','z3H1wge','yLLzufa','ANnVBG','zwvMyNe','uvLIwKi','quTjtMe','swL0vfG','ru56sNO','ufLtCxK','rMfPBgvKihrVigDLDcbWCM94EsbZzxnZAw9UihrVA2vUoIa','DgfZAW','Bwq1','tvjmr1y','rKfnrNi','yxbWBhK','mJGYmJqWofLsyvz6zG','shbeBNi','Cfntwve','mZy2mtu0meX4Bgfuwa','Ahr0Chm6lY90CMfJzs5WBgf5D3jPz2H0lMrLDI8/DhjHy2u9','yxbWBgLJyxrPB24VANnVBG','uefuq0G','zgLNzxn0','whnivvO','s1n2vMy','C2L6zq','ANPWA24','ufvu','AfLxCwG','C3rYAw5NAwz5','seXIyKK','mty0mtG4nvHewwTgtq','ze9zs20','wwrTBum','zxLxuMW','AvrOBgG','Dgv4Da','qKvUCha','ue9tva','rMfPBgvKihrVihvWBg9HzcbMAwXLoIa','vwDRC04','rMfPBgvKihrVihvWzgf0zsbICM93C2vYihnLC3nPB246ia','vKjNvK8','l2fWAs92ms9Ty3aVChjVEhKTC2vZC2LVBG','Cvb5v3m','tLbzu2W','D1Drt3G','tMP5DeC','Bfrsq0y','CNjNv08','C2v0DgLUz3m','yMfZzty0','zw52AxjVBM1LBNroyw1L','l3n0zxbZlW','D2nPugW'];_0x4e1f=function(){return _0x48c7d3;};return _0x4e1f();}export async function updateVerificationStep(_0x47885c,_0x181f34,_0x3183ea){const _0x4eba6f=_0x3493,_0x4d1b8a={'tsUFx':_0x4eba6f(0x1bb),'xzRoM':function(_0x407e1c){return _0x407e1c();},'CRMRL':_0x4eba6f(0x1c0),'uuOwA':function(_0x2dee79){return _0x2dee79();},'AKINa':_0x4eba6f(0x19d),'OknJU':_0x4eba6f(0x19c),'TCDSe':function(_0x3c3b98,_0xec0911){return _0x3c3b98!==_0xec0911;},'dOYKm':'eefbq'},_0x31448e=await _0x4d1b8a[_0x4eba6f(0x1eb)](getToken);if(!_0x31448e)throw new Error(_0x4d1b8a['CRMRL']);const _0x13576d=_0x4d1b8a[_0x4eba6f(0x1db)](getApiBaseUrl),_0x419b62=await fetch(_0x13576d+_0x4eba6f(0x1ee)+_0x47885c+'/steps/'+_0x181f34,{'method':_0x4d1b8a[_0x4eba6f(0x18d)],'headers':{'Authorization':_0x4eba6f(0x1d8)+_0x31448e,'Content-Type':_0x4d1b8a[_0x4eba6f(0x1c6)]},'body':JSON['stringify'](_0x3183ea)});if(!_0x419b62['ok']){if(_0x4d1b8a[_0x4eba6f(0x17e)](_0x4d1b8a[_0x4eba6f(0x1a8)],_0x4eba6f(0x18b)))return _0x12ce71('md5')[_0x4eba6f(0x1df)](_0x4e4cab)[_0x4eba6f(0x19e)](_0x4d1b8a[_0x4eba6f(0x1e2)]);else{const _0x500f6e=await _0x419b62['text']();throw new Error(_0x4eba6f(0x1d5)+_0x500f6e);}}}export async function getBrowserSessionSteps(_0x14da3c){const _0xa5b41=_0x3493,_0x892542={'xVDCK':function(_0x4e9f77){return _0x4e9f77();},'YzJzO':_0xa5b41(0x1c0),'QYbZB':function(_0x305cf3){return _0x305cf3();},'zKPOV':function(_0x4f8a53,_0x8f5510,_0x2acaee){return _0x4f8a53(_0x8f5510,_0x2acaee);},'ksfPv':_0xa5b41(0x1cb)},_0x2f6c7c=await _0x892542['xVDCK'](getToken);if(!_0x2f6c7c)throw new Error(_0x892542['YzJzO']);const _0x572652=_0x892542[_0xa5b41(0x18c)](getApiBaseUrl),_0x43186c=await _0x892542['zKPOV'](fetch,_0x572652+'/api/v1/mcp/browser-sessions/'+_0x14da3c+'/steps',{'method':_0x892542['ksfPv'],'headers':{'Authorization':_0xa5b41(0x1d8)+_0x2f6c7c}});if(!_0x43186c['ok']){const _0x445a03=await _0x43186c[_0xa5b41(0x1ac)]();throw new Error('Failed\x20to\x20get\x20browser\x20session\x20steps:\x20'+_0x445a03);}return _0x43186c[_0xa5b41(0x18a)]();}
|
|
1
|
+
(function(_0x15f431,_0x1c8ca3){const _0x2300a2=_0x2cde,_0x3108f1=_0x15f431();while(!![]){try{const _0x46a71a=parseInt(_0x2300a2(0x188))/0x1+-parseInt(_0x2300a2(0x19a))/0x2*(parseInt(_0x2300a2(0x1e3))/0x3)+-parseInt(_0x2300a2(0x19c))/0x4+parseInt(_0x2300a2(0x17b))/0x5+parseInt(_0x2300a2(0x1de))/0x6*(-parseInt(_0x2300a2(0x18b))/0x7)+parseInt(_0x2300a2(0x183))/0x8*(-parseInt(_0x2300a2(0x1c3))/0x9)+-parseInt(_0x2300a2(0x1b1))/0xa*(-parseInt(_0x2300a2(0x1aa))/0xb);if(_0x46a71a===_0x1c8ca3)break;else _0x3108f1['push'](_0x3108f1['shift']());}catch(_0x4ab623){_0x3108f1['push'](_0x3108f1['shift']());}}}(_0x9e63,0x5f87c));const _0x611979=(function(){let _0x1ae622=!![];return function(_0x5b7bd8,_0x4e337b){const _0x5030c0=_0x1ae622?function(){const _0x373884=_0x2cde;if(_0x4e337b){const _0x2f827d=_0x4e337b[_0x373884(0x1b7)](_0x5b7bd8,arguments);return _0x4e337b=null,_0x2f827d;}}:function(){};return _0x1ae622=![],_0x5030c0;};}()),_0x231c36=_0x611979(this,function(){const _0x519940=_0x2cde,_0x3f77a4={'WIhJT':_0x519940(0x1ba)};return _0x231c36[_0x519940(0x1c5)]()[_0x519940(0x192)](_0x3f77a4[_0x519940(0x1b8)])['toString']()[_0x519940(0x1b9)](_0x231c36)[_0x519940(0x192)](_0x3f77a4[_0x519940(0x1b8)]);});_0x231c36();function _0x9e63(){const _0x594979=['Aeroqve','yxbWBgLJyxrPB24VANnVBMW','AgvcqKC','owLstvPOrW','ruXLuxq','Dg9tDhjPBMC','qLnbB3O','rxn0u2G','yKf2C1G','EfPfBvi','BhPkAgO','Cejxv0u','tg1etfq','yKH0t0G','s1vbweO','zgjVAhy','ue9Nrgy','rMfPBgvKihrVignYzwf0zsbICM93C2vYihnLC3nPB246ia','rMfPBgvKihrVigDLDcbICM93C2vYihnLC3nPB24GC3rLChm6ia','l3n0zxbZ','zgLNzxn0','z2XPzxG','qMvHCMvYia','u2vjEfe','D3Dnq3O','BKvzCKm','Dgv4Da','DxbKyxrL','yLDQsuu','l3n0zxbZlW','ndHZDg5xqMu','DvzQyNO','q0DsrvO','z05KCvy','Cvv1AKK','mZnmsK9Tyva','Aw1kEuy','yunMqwK','ufvu','u2Xkzw4','DfbLree','q2zmrwG','DxjS','AwnTvg8','yxbWBgLJyxrPB24VANnVBG','CvLxCK4','rMfPBgvKihrVignYzwf0zsbZDgvWigfZC2v0oIa','y2Lcue4','uvbVq3a','zgjmtKi','r0Xts3m','AvLlu1C','mJG2mZi5mhHqr05esW','BxffzLu','uhrpBMe','Aw1Hz2uVCg5N','l2fWAs92ms9Ty3aVChjVEhKTC2vZC2LVBG','r0vu','tvrSu3G','A2DWu3G','nti1ntC2oezfv1jxsq','ExDOAvO','uKXKzhC','yxPMuMO','t1fvB1C','nty4mdmZr2jWwvzA','BgvUz3rO','ANnVBG','mJK4mZq3t1bTtKnt','rMfPBgvKihrVihvWzgf0zsb2zxjPzMLJyxrPB24GC3rLCdOG','l2fWAs92ms9Ty3aVyNjVD3nLCI1ZzxnZAw9UCW','ue9tva','wLP5seq','vfv4ueO','l3vWBg9Hzc11CMXZ','C2vHCMnO','wfLrsfu','C2v0DgLUz3m','thDxv3i','vxDTwNK','C2L6zq','ugDwvxe','uefuq0G','ntG0mJbiBM5RDLy','yxbWBgLJyxrPB24VEMLW','ote3mZqWwwXHrw1j','vxj0AKu','rMfPBgvKihrVihvWBg9HzcbMAwXLoIa','zMvHDhvYzuLK','rMfPBgvKihrVigDLDcbWCM94EsbZzxnZAw9UihrVA2vUoIa','Bwv0ywrHDge','tfPxEeq','sMnJuw4','rMfPBgvKihrVihvWzgf0zsbICM93C2vYihnLC3nPB246ia','EgDPEKS','y2HLy2TZDw0','Bwq1','zgjXsva','yMfZzty0','ntvVqxHZEvO','ruPMqKG','A090v3O','BwroshC','C2vZC2LVBLrVA2vU','rMfPBgvKihrVignYzwf0zsb2zxjPzMLJyxrPB24GC3rLCdOG','C3rYAw5NAwz5','mtu5odm3meHMqvfNEq','y2HLy2TSAxn0sxrLBuLK','qM9LExa','Ahr0Chm6lY90CMfJzs5WBgf5D3jPz2H0lMrLDI8/DhjHy2u9','DMLKzw8VD2vIBq','u05PAva','yxbWBhK','v0LOsLq','y29UC3rYDwn0B3i','kcGOlISPkYKRksSK','BwTnEKO','l2fWAs92ms9Ty3aVyNjVD3nLCI1ZzxnZAw9UCY8','rMfPBgvKihrVigDLDcbICM93C2vYihnLC3nPB246ia','tM8GqvbjihrVA2vUignVBMzPz3vYzwqUifj1BJOGCMfUz2vYihnLDhvWifT0B2TLBL0','CfrdreK'];_0x9e63=function(){return _0x594979;};return _0x9e63();}import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{createHash}from'crypto';import{withRetry}from'./retry.js';export async function createBrowserSession(_0x359a10){const _0x1e77fc=_0x2cde,_0x1a9ea9={'TUxPJ':function(_0x4181c0){return _0x4181c0();},'RAXHr':'yGNvC','bAvsX':function(_0x12c269,_0x46de4d,_0x191ac9){return _0x12c269(_0x46de4d,_0x191ac9);},'OQUoW':'POST','gliex':_0x1e77fc(0x173)},_0xef66ce=await _0x1a9ea9[_0x1e77fc(0x190)](getToken);if(!_0xef66ce){if(_0x1a9ea9['RAXHr']!=='EDhzj')throw new Error(_0x1e77fc(0x1be));else{const _0x4ea18b=_0x43bcbc?function(){const _0x55ef0c=_0x1e77fc;if(_0x5eeb1c){const _0x1d6f98=_0x4563e6[_0x55ef0c(0x1b7)](_0x59c5e7,arguments);return _0x4aec23=null,_0x1d6f98;}}:function(){};return _0x2f82a0=![],_0x4ea18b;}}const _0x5d53c5=_0x1a9ea9[_0x1e77fc(0x190)](getApiBaseUrl),_0x521eaa=await _0x1a9ea9[_0x1e77fc(0x1c8)](fetch,_0x5d53c5+_0x1e77fc(0x18d),{'method':_0x1a9ea9[_0x1e77fc(0x187)],'headers':{'Authorization':_0x1e77fc(0x1d6)+_0xef66ce,'Content-Type':_0x1a9ea9[_0x1e77fc(0x1d5)]},'body':JSON[_0x1e77fc(0x1b0)]({'environmentName':_0x359a10?.['environmentName'],'settings':_0x359a10?.[_0x1e77fc(0x194)],'task':_0x359a10?.['task'],'url':_0x359a10?.[_0x1e77fc(0x1ea)],'featureId':_0x359a10?.[_0x1e77fc(0x19f)],'checklistItemId':_0x359a10?.[_0x1e77fc(0x1b2)]})});if(!_0x521eaa['ok']){const _0x5485ba=await _0x521eaa[_0x1e77fc(0x1da)]();throw new Error(_0x1e77fc(0x1d1)+_0x5485ba);}return _0x521eaa['json']();}export async function updateBrowserSession(_0x39d90a,_0x48da0c){const _0x28b309=_0x2cde,_0x32b5fd={'WAJNw':_0x28b309(0x1ba),'hDNAQ':_0x28b309(0x1be),'dbqIP':_0x28b309(0x196),'nEYrC':function(_0xb46acb){return _0xb46acb();},'dbLNB':function(_0x517627){return _0x517627();},'SeIxQ':function(_0x43f5df,_0x5b24af,_0x198b59){return _0x43f5df(_0x5b24af,_0x198b59);},'zOXET':_0x28b309(0x199),'qTzDf':function(_0x39eec7,_0x39db99){return _0x39eec7!==_0x39db99;},'lzJhj':_0x28b309(0x182),'heBBG':function(_0x448d11,_0x4d9c36,_0x43197d){return _0x448d11(_0x4d9c36,_0x43197d);}};return _0x32b5fd[_0x28b309(0x1c2)](withRetry,async()=>{const _0x57a54f=_0x28b309,_0x3b2c3a={'tpFUw':_0x32b5fd['WAJNw'],'mkMzJ':_0x32b5fd[_0x57a54f(0x1c0)]};if(_0x32b5fd[_0x57a54f(0x1a8)]==='UwmZy'){const _0x36f0e0=await _0x32b5fd[_0x57a54f(0x1d9)](getToken);if(!_0x36f0e0)throw new Error(_0x57a54f(0x1be));const _0x4dd453=_0x32b5fd[_0x57a54f(0x178)](getApiBaseUrl),_0x1964f9=await _0x32b5fd[_0x57a54f(0x1d7)](fetch,_0x4dd453+'/api/v1/mcp/browser-sessions/'+_0x39d90a,{'method':_0x32b5fd['zOXET'],'headers':{'Authorization':_0x57a54f(0x1d6)+_0x36f0e0,'Content-Type':_0x57a54f(0x173)},'body':JSON[_0x57a54f(0x1b0)](_0x48da0c)});if(!_0x1964f9['ok']){if(_0x32b5fd['qTzDf'](_0x32b5fd[_0x57a54f(0x1ca)],_0x32b5fd[_0x57a54f(0x1ca)]))return _0x11df80['toString']()[_0x57a54f(0x192)](Kyexph['tpFUw'])['toString']()[_0x57a54f(0x1b9)](_0x391829)[_0x57a54f(0x192)](_0x57a54f(0x1ba));else{const _0x4264c3=await _0x1964f9['text']();throw new Error(_0x57a54f(0x1a4)+_0x4264c3);}}return _0x1964f9[_0x57a54f(0x18a)]();}else throw new _0x4a74c9(_0x3b2c3a[_0x57a54f(0x1bb)]);},{'label':'updateBrowserSession'});}export async function getBrowserSession(_0x5c6c19){const _0x4722bc=_0x2cde,_0x15c739={'dBVge':function(_0x1969ff,_0x5a28af){return _0x1969ff(_0x5a28af);},'ZZyHD':function(_0x3413b8){return _0x3413b8();},'fGApp':function(_0x187d4a,_0x16eb0e){return _0x187d4a===_0x16eb0e;},'VOsYX':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','PtOna':function(_0xa23c45,_0x16ed09,_0xad5b3c){return _0xa23c45(_0x16ed09,_0xad5b3c);},'CGREZ':_0x4722bc(0x180)},_0x554b06=await _0x15c739[_0x4722bc(0x18f)](getToken);if(!_0x554b06){if(_0x15c739['fGApp']('RFEEJ','RFEEJ'))throw new Error(_0x15c739['VOsYX']);else{const _0x30bcdc=_0x15c739['dBVge'](_0x1de4e8,_0x52af90);return _0x4722bc(0x1b4)+_0x30bcdc;}}const _0x3836f1=_0x15c739[_0x4722bc(0x18f)](getApiBaseUrl),_0x96823=await _0x15c739[_0x4722bc(0x17d)](fetch,_0x3836f1+_0x4722bc(0x1bc)+_0x5c6c19,{'method':_0x15c739[_0x4722bc(0x1e0)],'headers':{'Authorization':'Bearer\x20'+_0x554b06}});if(!_0x96823['ok']){const _0x1650de=await _0x96823['text']();throw new Error(_0x4722bc(0x1bd)+_0x1650de);}return _0x96823[_0x4722bc(0x18a)]();}export async function getUploadUrls(_0x9c661a,_0x3ad81c,_0x5936af,_0x3e6fc6){const _0x1da07a=_0x2cde,_0x34a0c2={'ywhiZ':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','ELeQt':function(_0x2fba33){return _0x2fba33();},'LwWWr':function(_0x4b3065,_0x467c3a){return _0x4b3065!==_0x467c3a;},'mdNHw':_0x1da07a(0x1a2),'icmTo':'POST','uVjbz':_0x1da07a(0x173),'UrtjE':function(_0x52d06e,_0x2247e7){return _0x52d06e!==_0x2247e7;},'pTCDI':function(_0x124d42,_0x4d607a){return _0x124d42===_0x4d607a;},'kzmli':_0x1da07a(0x185)},_0x7246b3=await _0x34a0c2[_0x1da07a(0x1c4)](getToken);if(!_0x7246b3){if(_0x34a0c2[_0x1da07a(0x195)](_0x34a0c2[_0x1da07a(0x1ad)],_0x34a0c2['mdNHw']))throw new _0x36cbbe(_0x34a0c2[_0x1da07a(0x184)]);else throw new Error(_0x34a0c2[_0x1da07a(0x184)]);}const _0x7d1d59=getApiBaseUrl(),_0x509e7b=await fetch(_0x7d1d59+_0x1da07a(0x1bc)+_0x9c661a+_0x1da07a(0x191),{'method':_0x34a0c2[_0x1da07a(0x1eb)],'headers':{'Authorization':_0x1da07a(0x1d6)+_0x7246b3,'Content-Type':_0x34a0c2[_0x1da07a(0x1df)]},'body':JSON[_0x1da07a(0x1b0)]({'filename':_0x3ad81c,'filetype':_0x5936af,..._0x34a0c2[_0x1da07a(0x19d)](_0x3e6fc6?.[_0x1da07a(0x197)],undefined)&&{'size':_0x3e6fc6['size']},..._0x3e6fc6?.[_0x1da07a(0x1a6)]!==undefined&&{'checksum':_0x3e6fc6[_0x1da07a(0x1a6)]},..._0x34a0c2[_0x1da07a(0x195)](_0x3e6fc6?.[_0x1da07a(0x1a1)],undefined)&&{'metadata':_0x3e6fc6[_0x1da07a(0x1a1)]}})});if(!_0x509e7b['ok']){if(_0x34a0c2[_0x1da07a(0x1bf)](_0x1da07a(0x1c6),_0x34a0c2['kzmli']))throw new _0x5d848f(_0x1da07a(0x1be));else{const _0x43149f=await _0x509e7b[_0x1da07a(0x1da)]();throw new Error('Failed\x20to\x20get\x20upload\x20URLs:\x20'+_0x43149f);}}return _0x509e7b['json']();}export async function uploadFile(_0xa5a716,_0x550445,_0xcad7e2){const _0x3a6042=_0x2cde,_0x11873d={'XYQHU':_0x3a6042(0x1be),'ayfVT':function(_0x1d997d,_0x3b110a){return _0x1d997d!==_0x3b110a;},'POgDf':'mbDhl'},_0x4ab4f6=await fetch(_0xa5a716,{'method':_0x3a6042(0x1e6),'headers':{'Content-Type':_0xcad7e2,'Content-Length':_0x550445[_0x3a6042(0x189)][_0x3a6042(0x1c5)]()},'body':_0x550445});if(!_0x4ab4f6['ok']){if(_0x11873d['ayfVT'](_0x11873d[_0x3a6042(0x1d0)],_0x11873d[_0x3a6042(0x1d0)]))throw new _0x1ba1c3(_0x11873d[_0x3a6042(0x193)]);else{const _0xd11e33=await _0x4ab4f6['text']();throw new Error(_0x3a6042(0x19e)+_0xd11e33);}}}export async function uploadTrace(_0x1508f3,_0x445783){const _0x5290e0=_0x2cde,_0x154803={'xZEmR':function(_0x2c03ef,_0xbbe37d,_0x285aee,_0x22ec91){return _0x2c03ef(_0xbbe37d,_0x285aee,_0x22ec91);},'Boeyp':_0x5290e0(0x19b)};return _0x154803[_0x5290e0(0x1c9)](uploadFile,_0x1508f3,_0x445783,_0x154803[_0x5290e0(0x1b3)]);}export async function uploadConversation(_0x6b7439,_0x6de4e5){const _0x513e7e=_0x2cde,_0x348947={'fvvEA':function(_0x5c208b,_0x3a1f2f,_0x3b0724,_0x20a3fc){return _0x5c208b(_0x3a1f2f,_0x3b0724,_0x20a3fc);}};return _0x348947['fvvEA'](uploadFile,_0x6b7439,_0x6de4e5,_0x513e7e(0x1c1));}export async function uploadScreenshot(_0x37a5aa,_0x1b52fd){const _0x442989=_0x2cde,_0x69e665={'bHtOH':function(_0x2c3d91,_0xf359c6,_0x3082f5,_0x1d99d1){return _0x2c3d91(_0xf359c6,_0x3082f5,_0x1d99d1);},'evozi':_0x442989(0x17e)};return _0x69e665[_0x442989(0x1cd)](uploadFile,_0x37a5aa,_0x1b52fd,_0x69e665['evozi']);}export async function uploadVideo(_0x368708,_0x3ba2f7){const _0x53a370=_0x2cde,_0x39f50f={'xgizK':function(_0x48f2c3,_0x599e04,_0x286aed,_0xc95ac3){return _0x48f2c3(_0x599e04,_0x286aed,_0xc95ac3);},'tPeDA':_0x53a370(0x1b5)};return _0x39f50f[_0x53a370(0x1a5)](uploadFile,_0x368708,_0x3ba2f7,_0x39f50f[_0x53a370(0x1e8)]);}export function buildTraceViewerUrl(_0x2c0421){const _0x283c71=_0x2cde,_0x345f2c={'TXYtq':function(_0x160d84,_0x1c66e0){return _0x160d84(_0x1c66e0);}},_0x163cf1=_0x345f2c['TXYtq'](encodeURIComponent,_0x2c0421);return _0x283c71(0x1b4)+_0x163cf1;}export async function getProxySessionToken(){const _0x57e062=_0x2cde,_0x547947={'SNiiP':function(_0x49676c){return _0x49676c();},'SlJen':_0x57e062(0x1be),'isMEy':'POST'},_0x37a1e3=await _0x547947[_0x57e062(0x1b6)](getToken);if(!_0x37a1e3)throw new Error(_0x547947[_0x57e062(0x1e7)]);const _0x2c2b3d=_0x547947[_0x57e062(0x1b6)](getApiBaseUrl),_0x41e830=await fetch(_0x2c2b3d+_0x57e062(0x17f),{'method':_0x547947['isMEy'],'headers':{'Authorization':_0x57e062(0x1d6)+_0x37a1e3}});if(!_0x41e830['ok']){const _0x3ed111=await _0x41e830[_0x57e062(0x1da)]();throw new Error(_0x57e062(0x1a0)+_0x3ed111);}const _0x1fbebc=await _0x41e830['json']();return _0x1fbebc[_0x57e062(0x1ae)];}export function computeChecksum(_0x426eab){const _0x517250=_0x2cde,_0x553e75={'iScHK':function(_0x5f272f,_0x1ecb50){return _0x5f272f(_0x1ecb50);},'KUAXJ':_0x517250(0x1a7)};return _0x553e75['iScHK'](createHash,_0x553e75[_0x517250(0x1ce)])[_0x517250(0x1db)](_0x426eab)[_0x517250(0x1d4)](_0x517250(0x1a9));}export async function createVerificationStep(_0x967cda,_0x381108){const _0x5a9108=_0x2cde,_0x5554d3={'kOtWz':_0x5a9108(0x1be),'EstSh':function(_0x58a9e4){return _0x58a9e4();},'GLSKs':function(_0x3f5674,_0x147318){return _0x3f5674===_0x147318;},'MTlSx':_0x5a9108(0x1e9),'dbohv':function(_0x3670e0){return _0x3670e0();},'ciBPN':function(_0x277e2d,_0x8d24c,_0x56115d){return _0x277e2d(_0x8d24c,_0x56115d);},'JccQn':_0x5a9108(0x18e),'imJyF':_0x5a9108(0x173)},_0xd7efa9=await _0x5554d3[_0x5a9108(0x1c7)](getToken);if(!_0xd7efa9){if(_0x5554d3[_0x5a9108(0x179)](_0x5554d3[_0x5a9108(0x181)],_0x5a9108(0x1e5)))throw new _0x36c9df(_0x5554d3[_0x5a9108(0x1ac)]);else throw new Error(_0x5554d3[_0x5a9108(0x1ac)]);}const _0x5790e0=_0x5554d3[_0x5a9108(0x1cf)](getApiBaseUrl),_0xa13e90=await _0x5554d3[_0x5a9108(0x176)](fetch,_0x5790e0+_0x5a9108(0x1bc)+_0x967cda+_0x5a9108(0x1d3),{'method':_0x5554d3[_0x5a9108(0x1a3)],'headers':{'Authorization':_0x5a9108(0x1d6)+_0xd7efa9,'Content-Type':_0x5554d3[_0x5a9108(0x1e4)]},'body':JSON[_0x5a9108(0x1b0)](_0x381108)});if(!_0xa13e90['ok']){const _0x22c13e=await _0xa13e90[_0x5a9108(0x1da)]();throw new Error(_0x5a9108(0x1af)+_0x22c13e);}return _0xa13e90[_0x5a9108(0x18a)]();}function _0x2cde(_0x74d9fb,_0x546bca){_0x74d9fb=_0x74d9fb-0x173;const _0x4a3b90=_0x9e63();let _0x231c36=_0x4a3b90[_0x74d9fb];if(_0x2cde['FkhTaC']===undefined){var _0x611979=function(_0x3bd474){const _0x4e4fe2='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4c50ab='',_0x4a7504='',_0x46efe7=_0x4c50ab+_0x611979;for(let _0x3775be=0x0,_0x103659,_0x3868ce,_0x3cd2f6=0x0;_0x3868ce=_0x3bd474['charAt'](_0x3cd2f6++);~_0x3868ce&&(_0x103659=_0x3775be%0x4?_0x103659*0x40+_0x3868ce:_0x3868ce,_0x3775be++%0x4)?_0x4c50ab+=_0x46efe7['charCodeAt'](_0x3cd2f6+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x103659>>(-0x2*_0x3775be&0x6)):_0x3775be:0x0){_0x3868ce=_0x4e4fe2['indexOf'](_0x3868ce);}for(let _0xa771c7=0x0,_0x32b318=_0x4c50ab['length'];_0xa771c7<_0x32b318;_0xa771c7++){_0x4a7504+='%'+('00'+_0x4c50ab['charCodeAt'](_0xa771c7)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4a7504);};_0x2cde['rAIgTO']=_0x611979,_0x2cde['LriAOi']={},_0x2cde['FkhTaC']=!![];}const _0x9e6341=_0x4a3b90[0x0],_0x2cde26=_0x74d9fb+_0x9e6341,_0x4cc67b=_0x2cde['LriAOi'][_0x2cde26];if(!_0x4cc67b){const _0x43bcbc=function(_0x39fd00){this['cCgKVd']=_0x39fd00,this['YnxKFd']=[0x1,0x0,0x0],this['MAetUK']=function(){return'newState';},this['AHHkAD']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['kqiEMA']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x43bcbc['prototype']['xCTVii']=function(){const _0x3e2b62=new RegExp(this['AHHkAD']+this['kqiEMA']),_0x380e45=_0x3e2b62['test'](this['MAetUK']['toString']())?--this['YnxKFd'][0x1]:--this['YnxKFd'][0x0];return this['emwDEF'](_0x380e45);},_0x43bcbc['prototype']['emwDEF']=function(_0x336439){if(!Boolean(~_0x336439))return _0x336439;return this['FdcWNs'](this['cCgKVd']);},_0x43bcbc['prototype']['FdcWNs']=function(_0x2f82a0){for(let _0x5eeb1c=0x0,_0x5d946d=this['YnxKFd']['length'];_0x5eeb1c<_0x5d946d;_0x5eeb1c++){this['YnxKFd']['push'](Math['round'](Math['random']())),_0x5d946d=this['YnxKFd']['length'];}return _0x2f82a0(this['YnxKFd'][0x0]);},new _0x43bcbc(_0x2cde)['xCTVii'](),_0x231c36=_0x2cde['rAIgTO'](_0x231c36),_0x2cde['LriAOi'][_0x2cde26]=_0x231c36;}else _0x231c36=_0x4cc67b;return _0x231c36;}export async function createStepAsset(_0x47cac9,_0x5631b6,_0xd6beb2){const _0x4d9df8=_0x2cde,_0x4d7e94={'pBWWE':function(_0x5ab6c6){return _0x5ab6c6();},'uTIMW':function(_0x114d76){return _0x114d76();},'LmDLT':_0x4d9df8(0x18e)},_0x474907=await _0x4d7e94[_0x4d9df8(0x1cb)](getToken);if(!_0x474907)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0x180579=_0x4d7e94['uTIMW'](getApiBaseUrl),_0x4250c0=await fetch(_0x180579+'/api/v1/mcp/browser-sessions/'+_0x47cac9+_0x4d9df8(0x1dd)+_0x5631b6+'/assets',{'method':_0x4d7e94[_0x4d9df8(0x1cc)],'headers':{'Authorization':'Bearer\x20'+_0x474907,'Content-Type':_0x4d9df8(0x173)},'body':JSON[_0x4d9df8(0x1b0)](_0xd6beb2)});if(!_0x4250c0['ok']){const _0x390253=await _0x4250c0[_0x4d9df8(0x1da)]();throw new Error(_0x4d9df8(0x175)+_0x390253);}return _0x4250c0[_0x4d9df8(0x18a)]();}export async function updateVerificationStep(_0xdc8262,_0x54135d,_0x32e429){const _0x1b0773=_0x2cde,_0x43e92d={'azfRj':function(_0x32ccc5,_0x449bc1,_0x534088,_0x315ea3){return _0x32ccc5(_0x449bc1,_0x534088,_0x315ea3);},'iYKSW':_0x1b0773(0x19b),'PgVUq':function(_0x54705d){return _0x54705d();},'mqEfU':_0x1b0773(0x1be),'QPoCp':_0x1b0773(0x199),'EJfBH':_0x1b0773(0x173),'myhaP':function(_0x1a10f4,_0x49ac74){return _0x1a10f4===_0x49ac74;},'gNdqV':_0x1b0773(0x1d8)},_0x5d5169=await _0x43e92d[_0x1b0773(0x198)](getToken);if(!_0x5d5169)throw new Error(_0x43e92d[_0x1b0773(0x17c)]);const _0x24ea91=_0x43e92d[_0x1b0773(0x198)](getApiBaseUrl),_0x12a6a7=await fetch(_0x24ea91+_0x1b0773(0x1bc)+_0xdc8262+_0x1b0773(0x1dd)+_0x54135d,{'method':_0x43e92d[_0x1b0773(0x177)],'headers':{'Authorization':_0x1b0773(0x1d6)+_0x5d5169,'Content-Type':_0x43e92d[_0x1b0773(0x1ab)]},'body':JSON['stringify'](_0x32e429)});if(!_0x12a6a7['ok']){if(_0x43e92d['myhaP'](_0x43e92d[_0x1b0773(0x1e1)],_0x43e92d[_0x1b0773(0x1e1)])){const _0x3857d4=await _0x12a6a7[_0x1b0773(0x1da)]();throw new Error(_0x1b0773(0x18c)+_0x3857d4);}else return _0x43e92d[_0x1b0773(0x186)](_0x1842cf,_0x2bc0ab,_0x40a1aa,_0x43e92d[_0x1b0773(0x17a)]);}}export async function getBrowserSessionSteps(_0x280909){const _0xd5d9ec=_0x2cde,_0x33d740={'qUujI':function(_0x1e1244){return _0x1e1244();},'bWjIE':function(_0x54151f){return _0x54151f();},'qYWrN':function(_0x3e86ed,_0x1dfd78,_0x308e2e){return _0x3e86ed(_0x1dfd78,_0x308e2e);}},_0x441f6f=await _0x33d740[_0xd5d9ec(0x1e2)](getToken);if(!_0x441f6f)throw new Error(_0xd5d9ec(0x1be));const _0x1a12f9=_0x33d740[_0xd5d9ec(0x1dc)](getApiBaseUrl),_0x883747=await _0x33d740[_0xd5d9ec(0x174)](fetch,_0x1a12f9+_0xd5d9ec(0x1bc)+_0x280909+_0xd5d9ec(0x1d3),{'method':_0xd5d9ec(0x180),'headers':{'Authorization':_0xd5d9ec(0x1d6)+_0x441f6f}});if(!_0x883747['ok']){const _0x110bca=await _0x883747[_0xd5d9ec(0x1da)]();throw new Error(_0xd5d9ec(0x1d2)+_0x110bca);}return _0x883747[_0xd5d9ec(0x18a)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x51ff3b,_0x184258){const _0x52430c=_0x27d6,_0xe9f0d0=_0x51ff3b();while(!![]){try{const _0x54ceb0=parseInt(_0x52430c(0xa1))/0x1+parseInt(_0x52430c(0xa8))/0x2+-parseInt(_0x52430c(0xa5))/0x3+parseInt(_0x52430c(0xa6))/0x4+-parseInt(_0x52430c(0x9d))/0x5+-parseInt(_0x52430c(0xa7))/0x6+parseInt(_0x52430c(0x9e))/0x7;if(_0x54ceb0===_0x184258)break;else _0xe9f0d0['push'](_0xe9f0d0['shift']());}catch(_0xd2ab6e){_0xe9f0d0['push'](_0xe9f0d0['shift']());}}}(_0x1dae,0xbb71b));function _0x1dae(){const _0x30a5dd=['skills','5608775UiZusI','9428825ZGAtHq','utf-8','qAQGr','1098203cdwLVS','OVxnU','yVGmg','Uwvkc','2417484lFtNrJ','208592NJhLIa','3574158FSAeyc','1587442kdZbON','parse','pUbEp','zPiuF','rIPyf','env','.claude'];_0x1dae=function(){return _0x30a5dd;};return _0x1dae();}function _0x27d6(_0x352582,_0x5d3eb9){_0x352582=_0x352582-0x96;const _0x1dae7e=_0x1dae();let _0x27d6db=_0x1dae7e[_0x352582];return _0x27d6db;}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 _0x1a7cef=_0x27d6,_0x2bcd11={'qtyzA':function(_0x4f88f2){return _0x4f88f2();},'lMZiI':_0x1a7cef(0x9b)};return process[_0x1a7cef(0x9a)]['CLAUDE_CONFIG_DIR']||join(_0x2bcd11['qtyzA'](homedir),_0x2bcd11['lMZiI']);}export function getUserSkillsDir(){const _0x5c52ca=_0x27d6,_0x19198b={'rIPyf':function(_0x5502ea,_0x18cd73,_0x5877d7){return _0x5502ea(_0x18cd73,_0x5877d7);},'Uwvkc':function(_0x6b41fd){return _0x6b41fd();}};return _0x19198b[_0x5c52ca(0x99)](join,_0x19198b[_0x5c52ca(0xa4)](getClaudeConfigDir),_0x5c52ca(0x9c));}export function getProjectRoot(){const _0x8e5870=_0x27d6,_0x50478a={'YBLHH':function(_0x48eb36,_0x539caa){return _0x48eb36(_0x539caa);},'Vxtrl':function(_0x316f14,_0x542f4a,_0x5a942f){return _0x316f14(_0x542f4a,_0x5a942f);},'yVGmg':_0x8e5870(0x9b),'CgLjA':function(_0x5694ef,_0x140b85){return _0x5694ef(_0x140b85);}};let _0x9e04a4=process['cwd']();const _0x25328e=parse(_0x9e04a4)['root'];while(_0x9e04a4!==_0x25328e){if(_0x50478a['YBLHH'](existsSync,_0x50478a['Vxtrl'](join,_0x9e04a4,_0x50478a[_0x8e5870(0xa3)])))return _0x9e04a4;if(_0x50478a['CgLjA'](existsSync,join(_0x9e04a4,'.git')))return _0x9e04a4;_0x9e04a4=_0x50478a['CgLjA'](dirname,_0x9e04a4);}return process['cwd']();}export function getProjectSkillsDir(){const _0x56c43d=_0x27d6,_0x3a9a55={'ExFVN':_0x56c43d(0x9c)};return join(getProjectRoot(),'.claude',_0x3a9a55['ExFVN']);}export function getSkillsDir(_0x54bced){const _0x306183={'NWtBm':'user','nahfK':function(_0xa498c1){return _0xa498c1();}};return _0x54bced===_0x306183['NWtBm']?_0x306183['nahfK'](getUserSkillsDir):getProjectSkillsDir();}export function getSettingsPath(){const _0x166ba5={'hmVqd':function(_0x3bed91,_0x2ea885,_0x5d90ec){return _0x3bed91(_0x2ea885,_0x5d90ec);}};return _0x166ba5['hmVqd'](join,getClaudeConfigDir(),'settings.json');}export async function loadClaudeSettings(){const _0x5a9001=_0x27d6,_0x4c52a6={'pDuYJ':function(_0x1e9535,_0x28670e,_0x26d461){return _0x1e9535(_0x28670e,_0x26d461);},'oaWmy':_0x5a9001(0x9f)},_0xd9154c=getSettingsPath();if(!existsSync(_0xd9154c))return{};try{const _0x393a06=await _0x4c52a6['pDuYJ'](readFile,_0xd9154c,_0x4c52a6['oaWmy']);return JSON[_0x5a9001(0x96)](_0x393a06);}catch{return{};}}export async function saveClaudeSettings(_0x110da1){const _0x3e5be7=_0x27d6,_0x1e1443={'OVxnU':function(_0x484e1e){return _0x484e1e();},'zPiuF':function(_0x283377,_0x3a50c1){return _0x283377(_0x3a50c1);},'qAQGr':function(_0x59c524,_0x25663e,_0x3f5415){return _0x59c524(_0x25663e,_0x3f5415);},'pUbEp':function(_0x183b4c,_0x40033b,_0x556b64,_0x6fc49a){return _0x183b4c(_0x40033b,_0x556b64,_0x6fc49a);}},_0x3f2219=getSettingsPath(),_0x227f8b=_0x1e1443[_0x3e5be7(0xa2)](getClaudeConfigDir);!_0x1e1443[_0x3e5be7(0x98)](existsSync,_0x227f8b)&&await _0x1e1443[_0x3e5be7(0xa0)](mkdir,_0x227f8b,{'recursive':!![]}),await _0x1e1443[_0x3e5be7(0x97)](writeFile,_0x3f2219,JSON['stringify'](_0x110da1,null,0x2)+'\x0a',_0x3e5be7(0x9f));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x52c9fc,_0x4d3bff){const _0x15d643=_0x4e4f,_0x1b3ed6=_0x52c9fc();while(!![]){try{const _0x22d1b4=-parseInt(_0x15d643(0xd0))/0x1*(parseInt(_0x15d643(0xd6))/0x2)+parseInt(_0x15d643(0xe7))/0x3*(-parseInt(_0x15d643(0xcd))/0x4)+parseInt(_0x15d643(0xdf))/0x5+-parseInt(_0x15d643(0xd4))/0x6+parseInt(_0x15d643(0xde))/0x7*(parseInt(_0x15d643(0xc5))/0x8)+parseInt(_0x15d643(0xc9))/0x9*(parseInt(_0x15d643(0xda))/0xa)+-parseInt(_0x15d643(0xd3))/0xb*(parseInt(_0x15d643(0xcc))/0xc);if(_0x22d1b4===_0x4d3bff)break;else _0x1b3ed6['push'](_0x1b3ed6['shift']());}catch(_0x30cb4c){_0x1b3ed6['push'](_0x1b3ed6['shift']());}}}(_0x5edb,0x4477b));import{spawn}from'child_process';export function runClaudeCommand(_0xdf6099,_0x46c8b3){const _0x2f6a5d=_0x4e4f,_0x228f62={'rnJaH':function(_0x57f093,_0x13fcd7){return _0x57f093===_0x13fcd7;},'TMfWx':function(_0xc485f4,_0x1417ba){return _0xc485f4(_0x1417ba);},'rkVbe':_0x2f6a5d(0xc7),'WrnSw':_0x2f6a5d(0xd5),'aZCbC':'data'};return new Promise(_0xec1d16=>{const _0x5b44df=_0x2f6a5d,_0x55ee79=_0x46c8b3?.[_0x5b44df(0xe6)]?_0x228f62['rkVbe']:'inherit',_0x1737aa=spawn(_0x228f62[_0x5b44df(0xd8)],_0xdf6099,{'stdio':_0x55ee79});let _0x36714b='';_0x46c8b3?.[_0x5b44df(0xe6)]&&_0x1737aa['stdout']&&_0x1737aa['stdout']['on']('data',_0x561515=>{const _0x4c0283=_0x5b44df;_0x36714b+=_0x561515[_0x4c0283(0xcb)]();}),_0x46c8b3?.['captureOutput']&&_0x1737aa[_0x5b44df(0xe4)]&&_0x1737aa['stderr']['on'](_0x228f62['aZCbC'],_0x11ec54=>{const _0xc59ba0=_0x5b44df;_0x36714b+=_0x11ec54[_0xc59ba0(0xcb)]();}),_0x1737aa['on'](_0x5b44df(0xc6),_0x52695a=>{const _0x3c12a1=_0x5b44df;_0x228f62[_0x3c12a1(0xd2)](_0x52695a,0x0)?_0x228f62['TMfWx'](_0xec1d16,{'success':!![],'output':_0x36714b}):_0xec1d16({'success':![],'error':_0x3c12a1(0xc3)+_0x52695a,'output':_0x36714b});}),_0x1737aa['on'](_0x5b44df(0xe8),_0x16ebc3=>{const _0x3b9360=_0x5b44df;_0xec1d16({'success':![],'error':_0x16ebc3[_0x3b9360(0xc4)]});});});}function _0x5edb(){const _0x29c545=['2616175rjTYqA','success','version','xbAXI','[\x5cs\x5cS]*?Scope:\x5cs*(user|project|local)','stderr','scope','captureOutput','3dWuiuQ','error','plugin','Command\x20exited\x20with\x20code\x20','message','328QJyslj','close','pipe','kCAtR','1734669NtRXfC','xuLFs','toString','538296VFYiWg','1636652wfaJTN','[\x5cs\x5cS]*?Version:\x5cs*([\x5cd.]+)','wBfsV','3217mhifsr','match','rnJaH','77ufDTVX','1259592vpmWOl','claude','44amejod','WaSMz','WrnSw','enabled','20uOCgCx','list','toLowerCase','output','64127cCmtQv'];_0x5edb=function(){return _0x29c545;};return _0x5edb();}export async function isMarketplaceAdded(_0x5e3b4d){const _0x3e9142=_0x4e4f,_0x5e3148={'wBfsV':function(_0x4b12b2,_0x15816a,_0x58458b){return _0x4b12b2(_0x15816a,_0x58458b);}},_0x2ca7f6=await _0x5e3148[_0x3e9142(0xcf)](runClaudeCommand,['plugin','marketplace',_0x3e9142(0xdb)],{'captureOutput':!![]});if(!_0x2ca7f6['success']||!_0x2ca7f6['output'])return![];return _0x2ca7f6['output']['includes'](_0x5e3b4d);}export async function isPluginInstalled(_0x1ad973){const _0x4430e8=_0x4e4f,_0x325b5c={'WaSMz':function(_0x31432b,_0x12e2c0,_0x14b02a){return _0x31432b(_0x12e2c0,_0x14b02a);},'MmuSr':_0x4430e8(0xe9)},_0x35e046=await _0x325b5c[_0x4430e8(0xd7)](runClaudeCommand,[_0x325b5c['MmuSr'],'list'],{'captureOutput':!![]});if(!_0x35e046[_0x4430e8(0xe0)]||!_0x35e046[_0x4430e8(0xdd)])return![];return _0x35e046[_0x4430e8(0xdd)]['includes'](_0x1ad973);}function _0x4e4f(_0xcb31c7,_0x3c002d){_0xcb31c7=_0xcb31c7-0xc3;const _0x5edbd0=_0x5edb();let _0x4e4f27=_0x5edbd0[_0xcb31c7];return _0x4e4f27;}export async function getPluginInfo(_0x1da6ed){const _0x42a55a=_0x4e4f,_0x1a83b4={'kCAtR':function(_0x5289e9,_0x1e47a9,_0x49d745){return _0x5289e9(_0x1e47a9,_0x49d745);},'oJsRX':'list','xbAXI':function(_0x16634c,_0x2cd5dc){return _0x16634c===_0x2cd5dc;},'xuLFs':'enabled'},_0x58062e=await _0x1a83b4[_0x42a55a(0xc8)](runClaudeCommand,[_0x42a55a(0xe9),_0x1a83b4['oJsRX']],{'captureOutput':!![]});if(!_0x58062e[_0x42a55a(0xe0)]||!_0x58062e['output'])return null;if(!_0x58062e['output']['includes'](_0x1da6ed))return null;const _0x16847d={'name':_0x1da6ed},_0x1ba501=_0x58062e[_0x42a55a(0xdd)]['match'](new RegExp(_0x1da6ed+_0x42a55a(0xe3),'i'));_0x1ba501&&(_0x16847d[_0x42a55a(0xe5)]=_0x1ba501[0x1]['toLowerCase']());const _0x41804e=_0x58062e[_0x42a55a(0xdd)][_0x42a55a(0xd1)](new RegExp(_0x1da6ed+_0x42a55a(0xce),'i'));_0x41804e&&(_0x16847d[_0x42a55a(0xe1)]=_0x41804e[0x1]);const _0x50abd6=_0x58062e['output']['match'](new RegExp(_0x1da6ed+'[\x5cs\x5cS]*?(enabled|disabled)','i'));return _0x50abd6&&(_0x16847d[_0x42a55a(0xd9)]=_0x1a83b4[_0x42a55a(0xe2)](_0x50abd6[0x1][_0x42a55a(0xdc)](),_0x1a83b4[_0x42a55a(0xca)])),_0x16847d;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const _0x4fa9f3=_0x28a5;(function(_0x3fdf9f,_0x545540){const _0x31eca3=_0x28a5,_0x299aa2=_0x3fdf9f();while(!![]){try{const _0x5cbd74=-parseInt(_0x31eca3(0x109))/0x1*(-parseInt(_0x31eca3(0x106))/0x2)+parseInt(_0x31eca3(0x115))/0x3*(parseInt(_0x31eca3(0x10a))/0x4)+-parseInt(_0x31eca3(0x10f))/0x5*(parseInt(_0x31eca3(0x112))/0x6)+-parseInt(_0x31eca3(0x113))/0x7+parseInt(_0x31eca3(0x10c))/0x8*(-parseInt(_0x31eca3(0x117))/0x9)+parseInt(_0x31eca3(0x118))/0xa+parseInt(_0x31eca3(0x10b))/0xb;if(_0x5cbd74===_0x545540)break;else _0x299aa2['push'](_0x299aa2['shift']());}catch(_0x51102a){_0x299aa2['push'](_0x299aa2['shift']());}}}(_0x2aad,0xbdcf1));function _0x2aad(){const _0x248a15=['8973573GHsooD','update','3pKrmWh','aes-256-gcm','1931211hNBGvt','11856930kDcgDU','gCEVi','final','sha256','222368nUprxC','Vngvd','utf8','8NPZplX','2920208nkWqqB','3267297XzWDcP','32RAVnKC','wZtES','subarray','5QPZQyN','ranger-auth-encryption','getAuthTag','1107192GcIJhL'];_0x2aad=function(){return _0x248a15;};return _0x2aad();}function _0x28a5(_0x5a1504,_0x490aaa){_0x5a1504=_0x5a1504-0x104;const _0x2aadd3=_0x2aad();let _0x28a562=_0x2aadd3[_0x5a1504];return _0x28a562;}import{createCipheriv,createDecipheriv,randomBytes,pbkdf2Sync}from'crypto';const ALGORITHM=_0x4fa9f3(0x116),SALT=_0x4fa9f3(0x110),KEY_LENGTH=0x20,IV_LENGTH=0x10,TAG_LENGTH=0x10;export function deriveKey(_0x179371){const _0x291ecc=_0x4fa9f3,_0x5b0bd6={'dvcBT':_0x291ecc(0x105)};return pbkdf2Sync(_0x179371,SALT,0x186a0,KEY_LENGTH,_0x5b0bd6['dvcBT']);}export function encrypt(_0x34d9fe,_0x1ad4cc){const _0x2bcf1a=_0x4fa9f3,_0x5c6b90={'QwwIP':function(_0x24f1cb,_0x410fae){return _0x24f1cb(_0x410fae);},'gCEVi':function(_0x1c999f,_0x50e2a8){return _0x1c999f(_0x50e2a8);},'gjpZi':'utf8'},_0x2639e1=_0x5c6b90['QwwIP'](deriveKey,_0x1ad4cc),_0x55a01d=_0x5c6b90[_0x2bcf1a(0x119)](randomBytes,IV_LENGTH),_0x41efff=createCipheriv(ALGORITHM,_0x2639e1,_0x55a01d),_0x8fce2d=Buffer['concat']([_0x41efff[_0x2bcf1a(0x114)](_0x34d9fe,_0x5c6b90['gjpZi']),_0x41efff[_0x2bcf1a(0x104)]()]),_0xa4f18a=_0x41efff[_0x2bcf1a(0x111)]();return Buffer['concat']([_0x55a01d,_0xa4f18a,_0x8fce2d]);}export function decrypt(_0x70f812,_0x302b69){const _0x3a851f=_0x4fa9f3,_0x3cf899={'wZtES':function(_0x2af457,_0x7c37e7){return _0x2af457+_0x7c37e7;},'Vngvd':function(_0x425ffc,_0x1c5fc3){return _0x425ffc+_0x1c5fc3;}},_0x51a777=deriveKey(_0x302b69),_0x330b5c=_0x70f812['subarray'](0x0,IV_LENGTH),_0x43d580=_0x70f812[_0x3a851f(0x10e)](IV_LENGTH,_0x3cf899[_0x3a851f(0x10d)](IV_LENGTH,TAG_LENGTH)),_0x23c4b2=_0x70f812[_0x3a851f(0x10e)](IV_LENGTH+TAG_LENGTH),_0x27d9cf=createDecipheriv(ALGORITHM,_0x51a777,_0x330b5c);return _0x27d9cf['setAuthTag'](_0x43d580),_0x3cf899[_0x3a851f(0x107)](_0x27d9cf[_0x3a851f(0x114)](_0x23c4b2),_0x27d9cf['final'](_0x3a851f(0x108)));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x2ffae3=_0x445d;(function(_0x3455a5,_0x284ffe){const _0x4cf575=_0x445d,_0x557201=_0x3455a5();while(!![]){try{const _0x1379fd=parseInt(_0x4cf575(0xfe))/0x1+parseInt(_0x4cf575(0xda))/0x2*(-parseInt(_0x4cf575(0xfb))/0x3)+-parseInt(_0x4cf575(0xdd))/0x4*(parseInt(_0x4cf575(0xf0))/0x5)+parseInt(_0x4cf575(0xf8))/0x6*(parseInt(_0x4cf575(0x100))/0x7)+-parseInt(_0x4cf575(0xdb))/0x8+-parseInt(_0x4cf575(0xec))/0x9*(parseInt(_0x4cf575(0xf3))/0xa)+parseInt(_0x4cf575(0xf2))/0xb*(parseInt(_0x4cf575(0xd8))/0xc);if(_0x1379fd===_0x284ffe)break;else _0x557201['push'](_0x557201['shift']());}catch(_0x3798e9){_0x557201['push'](_0x557201['shift']());}}}(_0x57fa,0x3dba3));function _0x445d(_0x291f7b,_0x43dd13){_0x291f7b=_0x291f7b-0xd4;const _0x57faed=_0x57fa();let _0x445d98=_0x57faed[_0x291f7b];return _0x445d98;}import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{getCurrentVersion}from'./version.js';const SENSITIVE_FLAGS=new Set([_0x2ffae3(0xdc),'-t',_0x2ffae3(0xe6),'--api-key',_0x2ffae3(0xe0),_0x2ffae3(0xe4),'--password',_0x2ffae3(0xe8),'--auth',_0x2ffae3(0xfc),_0x2ffae3(0xe9),'--cookie','--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(_0x32f698){return TOKEN_PATTERNS['some'](_0x411e0b=>_0x411e0b['test'](_0x32f698));}export function sanitizeArgs(_0x437a61){const _0x41a511=_0x2ffae3,_0x42d7a8={'BWFqT':function(_0x48bd71,_0x296867){return _0x48bd71<_0x296867;},'ZrlZq':_0x41a511(0xf6),'LtXai':function(_0x1568d4,_0x2f2515){return _0x1568d4(_0x2f2515);}},_0x3e4220=[];let _0x3949a6=![];for(let _0x24d067=0x0;_0x42d7a8[_0x41a511(0xd4)](_0x24d067,_0x437a61[_0x41a511(0xf5)]);_0x24d067++){const _0x390a0e=_0x437a61[_0x24d067];if(_0x3949a6){_0x3e4220[_0x41a511(0x103)](_0x42d7a8['ZrlZq']),_0x3949a6=![];continue;}if(_0x390a0e['startsWith']('--')||_0x390a0e['startsWith']('-')){const _0x540074=_0x390a0e['indexOf']('=');if(_0x540074!==-0x1){const _0x48b80b=_0x390a0e['slice'](0x0,_0x540074)['toLowerCase']();if(SENSITIVE_FLAGS[_0x41a511(0x107)](_0x48b80b)){_0x3e4220[_0x41a511(0x103)](_0x390a0e['slice'](0x0,_0x540074)+_0x41a511(0xff));continue;}}else{const _0x28ae7f=_0x390a0e['toLowerCase']();SENSITIVE_FLAGS['has'](_0x28ae7f)&&(_0x3949a6=!![]);}_0x3e4220['push'](_0x390a0e);}else _0x42d7a8[_0x41a511(0x104)](looksLikeToken,_0x390a0e)?_0x3e4220['push'](_0x41a511(0xf6)):_0x3e4220[_0x41a511(0x103)](_0x390a0e);}return _0x3e4220[_0x41a511(0xd5)]('\x20');}export async function logDesirePath(_0x4971c0){const _0x330380=_0x2ffae3,_0x48df97={'VZWum':function(_0x401bdb){return _0x401bdb();},'JFmub':'application/json','hnAVD':function(_0x265baf,_0x2e47ee,_0x1d8102){return _0x265baf(_0x2e47ee,_0x1d8102);},'eJJpE':'POST'};try{const _0x70e87c=await getToken()[_0x330380(0xf4)](()=>null),_0x1c3b81=getApiBaseUrl(),_0x18a8df=_0x48df97[_0x330380(0xd7)](getCurrentVersion),_0xc46e41=_0x70e87c?'has_token':_0x330380(0xee),_0x2a6d7f={..._0x4971c0['metadata'],'authStatus':_0xc46e41,'isTty':process[_0x330380(0xdf)][_0x330380(0xde)]??![]},_0x178586={'Content-Type':_0x48df97['JFmub']};_0x70e87c&&(_0x178586[_0x330380(0xe3)]='Bearer\x20'+_0x70e87c);const _0x254cd7={'rawCommand':_0x4971c0['rawCommand'],'errorMessage':_0x4971c0['errorMessage'],'errorType':_0x4971c0[_0x330380(0xd6)],'featureId':_0x4971c0['featureId'],'sessionId':_0x4971c0['sessionId'],'metadata':_0x2a6d7f,'cliVersion':_0x18a8df};process['env']['DEBUG']&&(console[_0x330380(0xe2)](_0x330380(0x105)+_0x1c3b81+_0x330380(0xe7)),console[_0x330380(0xe2)](_0x330380(0xef)+JSON[_0x330380(0xfa)](_0x254cd7,null,0x2))),await _0x48df97[_0x330380(0xf1)](fetch,_0x1c3b81+'/api/v1/mcp/desire-path-logs',{'method':_0x48df97['eJJpE'],'headers':_0x178586,'body':JSON['stringify'](_0x254cd7)});}catch(_0x4a39fe){process[_0x330380(0x101)][_0x330380(0xf9)]&&console['error']('[desire-path]\x20Failed\x20to\x20send:\x20'+_0x4a39fe);}}function _0x57fa(){const _0x10152b=['--header','5|1|4|7|6|0|3|2','zEiwb','99MxbNKk','includes','no_token','[desire-path]\x20Payload:\x20','1640sOSWWs','hnAVD','110VdQBYg','74950jTaIrM','catch','length','[REDACTED]','unknown_argument','197646rSwqhY','DEBUG','stringify','3uNzWUr','--authorization','oUlrD','424519HrTWUf','=[REDACTED]','98BFZjPU','env','Unknown\x20command','push','LtXai','[desire-path]\x20Sending\x20log\x20to\x20','syntax_error','has','BWFqT','join','errorType','VZWum','45096eTOWnW','GLwxZ','100828nAFBMq','2204056JHXiDi','--token','3196GPRzcH','isTTY','stdout','--apikey','missing_required_argument','error','Authorization','--key','missing_option','--secret','/api/v1/mcp/desire-path-logs','--pass'];_0x57fa=function(){return _0x10152b;};return _0x57fa();}export function getErrorType(_0x3e2d55,_0x5d5509){const _0x596364=_0x2ffae3,_0x23a30b={'GLwxZ':'Invalid\x20values','MxgGe':_0x596364(0x102),'oUlrD':'runtime_error','zEiwb':'Not\x20enough\x20non-option\x20arguments'},_0x1c990b=_0x596364(0xea)['split']('|');let _0x221d5f=0x0;while(!![]){switch(_0x1c990b[_0x221d5f++]){case'0':if(_0x3e2d55[_0x596364(0xed)](_0x23a30b[_0x596364(0xd9)]))return'invalid_option_value';continue;case'1':if(!_0x3e2d55)return'unknown';continue;case'2':return _0x596364(0x106);case'3':if(_0x3e2d55['includes']('Missing\x20required\x20argument'))return _0x596364(0xe5);continue;case'4':if(_0x3e2d55[_0x596364(0xed)](_0x23a30b['MxgGe']))return'unknown_command';continue;case'5':if(_0x5d5509)return _0x23a30b[_0x596364(0xfd)];continue;case'6':if(_0x3e2d55[_0x596364(0xed)](_0x23a30b[_0x596364(0xeb)]))return _0x596364(0xe1);continue;case'7':if(_0x3e2d55[_0x596364(0xed)]('Unknown\x20argument'))return _0x596364(0xf7);continue;}break;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x23c67e=_0x583c;(function(_0x48abdd,_0x3fb574){const _0x1a852e=_0x583c,_0xda301c=_0x48abdd();while(!![]){try{const _0x284512=parseInt(_0x1a852e(0x158))/0x1+parseInt(_0x1a852e(0x18e))/0x2*(-parseInt(_0x1a852e(0x17b))/0x3)+parseInt(_0x1a852e(0x194))/0x4+parseInt(_0x1a852e(0x151))/0x5+parseInt(_0x1a852e(0x165))/0x6*(-parseInt(_0x1a852e(0x185))/0x7)+-parseInt(_0x1a852e(0x157))/0x8+-parseInt(_0x1a852e(0x153))/0x9*(parseInt(_0x1a852e(0x170))/0xa);if(_0x284512===_0x3fb574)break;else _0xda301c['push'](_0xda301c['shift']());}catch(_0x5c5051){_0xda301c['push'](_0xda301c['shift']());}}}(_0xb6f5,0xde408));import{exec}from'child_process';import _0x296c1f from'inquirer';import{getCurrentEnvironment,ENVIRONMENT_CONFIGS,getApiBaseUrl}from'./environment.js';function _0xb6f5(){const _0x3d5c42=['Failed\x20to\x20provision\x20API\x20key:\x20','20648KxjjIn','697761RrnEAI','TgPCV','workosClientId','KXQVW','VPbEC','NWEay','Authentication\x20failed','status','Using\x20organization:\x20','Setting\x20up\x20your\x20organization...','log','Failed\x20to\x20refresh\x20token\x20with\x20org:\x20','apiKey','44466gKQmpJ','\x20\x20\x20A\x20human\x20needs\x20to\x20complete\x20authentication\x20in\x20the\x20browser.\x0a','error_description','https://api.workos.com/user_management/authenticate','utf-8','apiKeys','application/x-www-form-urlencoded','refresh_token','application/json','user_code','verification_uri_complete','10wHPbUw','authorization_pending','now','text','xdg-open','Failed\x20to\x20request\x20device\x20code:\x20','jEdLm','split','stdout','VySgU','qPTEL','1275789ZFdwWh','Multiple\x20organizations\x20available\x20but\x20cannot\x20prompt\x20for\x20selection\x20in\x20non-interactive\x20mode.\x0a','stringify','name','map','CpzQP','Lrxjd','length','organizationId','expires_in','623nSwZdP','jccjg','write','startsWith','\x27s\x20CLI\x20Key','error','uTMIt','json','https://api.workos.com/user_management/authorize/device','2rIVgGi','rUycE','darwin','isTTY','qHQIS','eXtnD','6105408vtMICh','GET','GNFJG','6348255inPlPI','list','13463973RYOZvG','Select\x20an\x20organization:','access_token'];_0xb6f5=function(){return _0x3d5c42;};return _0xb6f5();}import{storeToken,storeRefreshToken}from'./keychain.js';const WORKOS_DEVICE_AUTH_URL=_0x23c67e(0x18d),WORKOS_TOKEN_URL=_0x23c67e(0x168);export async function requestDeviceCode(_0x75612f){const _0x55cbd4=_0x23c67e,_0x1e245c={'jccjg':'POST','EDDfQ':'application/x-www-form-urlencoded'},_0x25ee02=await fetch(WORKOS_DEVICE_AUTH_URL,{'method':_0x1e245c[_0x55cbd4(0x186)],'headers':{'Content-Type':_0x1e245c['EDDfQ']},'body':new URLSearchParams({'client_id':_0x75612f})});if(!_0x25ee02['ok']){const _0xeeca9c=await _0x25ee02[_0x55cbd4(0x173)]();throw new Error(_0x55cbd4(0x175)+_0x25ee02['status']+'\x20'+_0xeeca9c);}return _0x25ee02['json']();}export async function pollForTokens(_0x518ae6,_0xe12e11,_0x2882ce,_0x299929){const _0x204ffa=_0x23c67e,_0x52b49b={'rUycE':function(_0xe95ab4,_0x35ce93){return _0xe95ab4+_0x35ce93;},'NeSgu':function(_0x286f8f,_0x3cbc66){return _0x286f8f*_0x3cbc66;},'VySgU':function(_0x498703,_0x450d30){return _0x498703<_0x450d30;},'eELwV':function(_0x1a8406,_0x56dace){return _0x1a8406(_0x56dace);},'NGBFq':function(_0xcb333,_0x33402f,_0x1a390d){return _0xcb333(_0x33402f,_0x1a390d);},'qStOM':_0x204ffa(0x16b),'CpzQP':function(_0x138e89,_0x402116){return _0x138e89===_0x402116;},'Lrxjd':_0x204ffa(0x171),'PRiNy':function(_0x28467e,_0x320a2b){return _0x28467e===_0x320a2b;}},_0x416e58=_0x52b49b[_0x204ffa(0x18f)](Date['now'](),_0x52b49b['NeSgu'](_0x299929,0x3e8));let _0x24b3e7=_0x2882ce*0x3e8;while(_0x52b49b[_0x204ffa(0x179)](Date[_0x204ffa(0x172)](),_0x416e58)){await _0x52b49b['eELwV'](sleep,_0x24b3e7);const _0x30ce3b=await _0x52b49b['NGBFq'](fetch,WORKOS_TOKEN_URL,{'method':'POST','headers':{'Content-Type':_0x52b49b['qStOM']},'body':new URLSearchParams({'client_id':_0x518ae6,'device_code':_0xe12e11,'grant_type':'urn:ietf:params:oauth:grant-type:device_code'})});if(_0x30ce3b['ok'])return _0x30ce3b['json']();const _0x4fe024=await _0x30ce3b[_0x204ffa(0x18c)]();if(_0x52b49b[_0x204ffa(0x180)](_0x4fe024['error'],_0x52b49b[_0x204ffa(0x181)]))continue;if(_0x52b49b['PRiNy'](_0x4fe024['error'],'slow_down')){_0x24b3e7+=0x3e8;continue;}throw new Error(_0x4fe024[_0x204ffa(0x167)]||_0x4fe024[_0x204ffa(0x18a)]||_0x204ffa(0x15e));}throw new Error('Device\x20authorization\x20timed\x20out');}async function fetchUserProfile(_0x5396f9){const _0x36f1e2=_0x23c67e,_0x46a4e3={'mpQel':_0x36f1e2(0x195)},_0xf1844c=getApiBaseUrl();try{const _0x3b9878=await fetch(_0xf1844c+'/organization/me',{'method':_0x46a4e3['mpQel'],'headers':{'workos-token':_0x5396f9}});if(_0x3b9878['ok'])return _0x3b9878[_0x36f1e2(0x18c)]();}catch{}return null;}function buildKeyName(_0x36cd69,_0x93237c){const _0x45d4a0=_0x23c67e,_0x31d030=_0x93237c['filter'](_0x23a35f=>_0x23a35f['name']===_0x36cd69||_0x23a35f[_0x45d4a0(0x17e)][_0x45d4a0(0x188)](_0x36cd69+'\x20('));if(_0x31d030['length']===0x0)return _0x36cd69;return _0x36cd69+'\x20('+(_0x31d030['length']+0x1)+')';}function _0x583c(_0x57f0f1,_0x65151f){_0x57f0f1=_0x57f0f1-0x150;const _0xb6f505=_0xb6f5();let _0x583c06=_0xb6f505[_0x57f0f1];return _0x583c06;}export async function provisionApiKey(_0x175d7b){const _0x2afbca=_0x23c67e,_0x4dbf79={'NWEay':function(_0xd795b0){return _0xd795b0();},'jhCDi':'CLI\x20Key','TgPCV':function(_0x1e05e1,_0x433617,_0x15066a){return _0x1e05e1(_0x433617,_0x15066a);}},_0x43e1ee=_0x4dbf79[_0x2afbca(0x15d)](getApiBaseUrl),_0x59f732={'Content-Type':'application/json','workos-token':_0x175d7b},_0x478465=await fetchUserProfile(_0x175d7b),_0x4e8979=_0x478465?.['firstName']||_0x478465?.['email']?.[_0x2afbca(0x177)]('@')[0x0],_0x17867e=_0x4e8979?_0x4e8979+_0x2afbca(0x189):_0x4dbf79['jhCDi'];let _0x357b5d=[];try{const _0xf1f13d=await fetch(_0x43e1ee+'/api-keys',{'method':_0x2afbca(0x195),'headers':_0x59f732});if(_0xf1f13d['ok']){const _0x3ac9d0=await _0xf1f13d[_0x2afbca(0x18c)]();_0x357b5d=_0x3ac9d0[_0x2afbca(0x16a)];}}catch{}const _0x3b0846=_0x4dbf79[_0x2afbca(0x159)](buildKeyName,_0x17867e,_0x357b5d),_0x5c4ae3=await _0x4dbf79[_0x2afbca(0x159)](fetch,_0x43e1ee+'/api-keys',{'method':'POST','headers':_0x59f732,'body':JSON[_0x2afbca(0x17d)]({'name':_0x3b0846,'scope':'mcp:write'})});if(!_0x5c4ae3['ok']){const _0x5ef1c1=await _0x5c4ae3['text']();throw new Error(_0x2afbca(0x156)+_0x5c4ae3[_0x2afbca(0x15f)]+'\x20'+_0x5ef1c1);}const _0x22aa97=await _0x5c4ae3['json']();return _0x22aa97[_0x2afbca(0x164)]['token'];}export function openBrowser(_0x16101d){const _0x46caa1=_0x23c67e,_0x4086f7={'MNibE':function(_0x431030,_0x1f5d61){return _0x431030===_0x1f5d61;},'LSHtE':function(_0x3080ba,_0x5e3bfd){return _0x3080ba===_0x5e3bfd;},'gSkTG':'win32','pXsLN':function(_0x3e8370,_0x5ec3e8){return _0x3e8370(_0x5ec3e8);}},_0xc0a6b6=process['platform'],_0x1a8687=_0x4086f7['MNibE'](_0xc0a6b6,_0x46caa1(0x190))?'open':_0x4086f7['LSHtE'](_0xc0a6b6,_0x4086f7['gSkTG'])?'start':_0x46caa1(0x174);_0x4086f7['pXsLN'](exec,_0x1a8687+'\x20'+JSON['stringify'](_0x16101d));}function decodeJwtPayload(_0x19bc31){const _0x350827=_0x23c67e,_0x48c006={'iFjCc':function(_0x5e7a8e,_0x42a467){return _0x5e7a8e!==_0x42a467;},'uTMIt':'Invalid\x20JWT\x20format','eXtnD':_0x350827(0x169)},_0x21c63b=_0x19bc31[_0x350827(0x177)]('.');if(_0x48c006['iFjCc'](_0x21c63b['length'],0x3))throw new Error(_0x48c006[_0x350827(0x18b)]);const _0xd52c30=Buffer['from'](_0x21c63b[0x1],'base64url')['toString'](_0x48c006[_0x350827(0x193)]);return JSON['parse'](_0xd52c30);}async function selfServeSignup(_0x6ab139){const _0x1cd009=_0x23c67e,_0x47e085={'GNFJG':_0x1cd009(0x16d)},_0x3a6f77=getApiBaseUrl(),_0x2bba20=await fetch(_0x3a6f77+'/organization/self-serve-signup',{'method':'POST','headers':{'Content-Type':_0x47e085[_0x1cd009(0x150)],'workos-token':_0x6ab139}});if(!_0x2bba20['ok']){const _0x2965f7=await _0x2bba20['text']();throw new Error('Failed\x20to\x20create\x20organization:\x20'+_0x2bba20['status']+'\x20'+_0x2965f7);}return _0x2bba20[_0x1cd009(0x18c)]();}async function fetchMyMemberships(_0x2e1963){const _0x5ad636=_0x23c67e,_0x5c3267={'qPTEL':'GET'},_0x508cb9=getApiBaseUrl(),_0x205b1a=await fetch(_0x508cb9+'/organization/my-memberships',{'method':_0x5c3267[_0x5ad636(0x17a)],'headers':{'workos-token':_0x2e1963}});if(!_0x205b1a['ok']){const _0x5deb51=await _0x205b1a[_0x5ad636(0x173)]();throw new Error('Failed\x20to\x20fetch\x20memberships:\x20'+_0x205b1a[_0x5ad636(0x15f)]+'\x20'+_0x5deb51);}const _0x183a86=await _0x205b1a['json']();return _0x183a86['memberships'];}async function refreshTokenWithOrg(_0x4caea8,_0x4f057b,_0x138e63){const _0x3f2693=_0x23c67e,_0x34d54b=await fetch(WORKOS_TOKEN_URL,{'method':'POST','headers':{'Content-Type':'application/x-www-form-urlencoded'},'body':new URLSearchParams({'client_id':_0x4caea8,'grant_type':'refresh_token','refresh_token':_0x4f057b,'organization_id':_0x138e63})});if(!_0x34d54b['ok']){const _0x112bdc=await _0x34d54b['text']();throw new Error(_0x3f2693(0x163)+_0x34d54b[_0x3f2693(0x15f)]+'\x20'+_0x112bdc);}return _0x34d54b['json']();}export async function runDeviceAuthFlow(){const _0x1508c6=_0x23c67e,_0x43e609={'WIMZY':_0x1508c6(0x166),'oCgML':function(_0x18a74e,_0x3a0d16,_0xaefa1a,_0x15d147,_0x480149){return _0x18a74e(_0x3a0d16,_0xaefa1a,_0x15d147,_0x480149);},'qHQIS':function(_0x4c4980,_0x10de56){return _0x4c4980===_0x10de56;},'jEdLm':function(_0x252706,_0x4ff4df){return _0x252706+_0x4ff4df;},'VPbEC':_0x1508c6(0x17c),'cJeFO':_0x1508c6(0x154),'KXQVW':function(_0x520f98,_0x1d2308,_0x302808,_0x5952e6){return _0x520f98(_0x1d2308,_0x302808,_0x5952e6);},'FrppF':function(_0x18b521,_0xed2f14){return _0x18b521(_0xed2f14);}},_0x2f0773=getCurrentEnvironment(),_0x481b3d=ENVIRONMENT_CONFIGS[_0x2f0773][_0x1508c6(0x15a)],_0x452066=await requestDeviceCode(_0x481b3d);console['log']('\x0a🔐\x20Opening\x20browser\x20to\x20log\x20in...'),console[_0x1508c6(0x162)](_0x43e609['WIMZY']),openBrowser(_0x452066[_0x1508c6(0x16f)]),console['log']('If\x20the\x20browser\x20doesn\x27t\x20open,\x20visit:\x20'+_0x452066['verification_uri_complete']),console[_0x1508c6(0x162)]('Code:\x20'+_0x452066[_0x1508c6(0x16e)]+'\x0a'),process[_0x1508c6(0x178)][_0x1508c6(0x187)]('Waiting\x20for\x20authentication...');let _0x5cfd7b=await _0x43e609['oCgML'](pollForTokens,_0x481b3d,_0x452066['device_code'],_0x452066['interval'],_0x452066[_0x1508c6(0x184)]);console['log']('\x20✓');const _0x5aafa7=decodeJwtPayload(_0x5cfd7b['access_token']);if(!_0x5aafa7['org_id']){const _0x1ba5b2=await fetchMyMemberships(_0x5cfd7b[_0x1508c6(0x155)]);let _0x234f27;if(_0x43e609[_0x1508c6(0x192)](_0x1ba5b2['length'],0x0)){process[_0x1508c6(0x178)][_0x1508c6(0x187)](_0x1508c6(0x161));const _0xdc3d7=await selfServeSignup(_0x5cfd7b['access_token']);_0x234f27=_0xdc3d7[_0x1508c6(0x183)],console['log']('\x20✓');}else{if(_0x1ba5b2[_0x1508c6(0x182)]===0x1)_0x234f27=_0x1ba5b2[0x0]['organizationId'],console[_0x1508c6(0x162)](_0x1508c6(0x160)+_0x1ba5b2[0x0][_0x1508c6(0x17e)]);else{const _0x18dde2=process['stdin']['isTTY']&&process[_0x1508c6(0x178)][_0x1508c6(0x191)];if(!_0x18dde2)throw new Error(_0x43e609[_0x1508c6(0x176)](_0x43e609[_0x1508c6(0x15c)],'Use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.'));const {selected:_0x29b8ba}=await _0x296c1f['prompt']([{'type':_0x1508c6(0x152),'name':'selected','message':_0x43e609['cJeFO'],'choices':_0x1ba5b2[_0x1508c6(0x17f)](_0x4c93b1=>({'name':_0x4c93b1[_0x1508c6(0x17e)],'value':_0x4c93b1[_0x1508c6(0x183)]}))}]);_0x234f27=_0x29b8ba;}}_0x5cfd7b=await _0x43e609[_0x1508c6(0x15b)](refreshTokenWithOrg,_0x481b3d,_0x5cfd7b[_0x1508c6(0x16c)],_0x234f27);}process['stdout'][_0x1508c6(0x187)]('Provisioning\x20API\x20key...');const _0x49e7ca=await provisionApiKey(_0x5cfd7b[_0x1508c6(0x155)]);return console['log']('\x20✓'),await storeToken(_0x49e7ca),_0x5cfd7b[_0x1508c6(0x16c)]&&await _0x43e609['FrppF'](storeRefreshToken,_0x5cfd7b['refresh_token']),_0x49e7ca;}function sleep(_0x167d97){return new Promise(_0x49c714=>setTimeout(_0x49c714,_0x167d97));}
|
|
1
|
+
const _0x52700b=_0x150b;(function(_0x4aa3e8,_0x5e6219){const _0x4b7f76=_0x150b,_0x4d008b=_0x4aa3e8();while(!![]){try{const _0x1c068e=parseInt(_0x4b7f76(0xb7))/0x1*(parseInt(_0x4b7f76(0x9f))/0x2)+-parseInt(_0x4b7f76(0x88))/0x3+-parseInt(_0x4b7f76(0x83))/0x4*(parseInt(_0x4b7f76(0x97))/0x5)+-parseInt(_0x4b7f76(0xb3))/0x6+parseInt(_0x4b7f76(0xb4))/0x7+parseInt(_0x4b7f76(0xbb))/0x8*(-parseInt(_0x4b7f76(0x8a))/0x9)+parseInt(_0x4b7f76(0x85))/0xa;if(_0x1c068e===_0x5e6219)break;else _0x4d008b['push'](_0x4d008b['shift']());}catch(_0x48eb68){_0x4d008b['push'](_0x4d008b['shift']());}}}(_0x5ca2,0x8872b));import{exec}from'child_process';import _0x4e443f from'inquirer';import{getCurrentEnvironment,ENVIRONMENT_CONFIGS,getApiBaseUrl}from'./environment.js';function _0x150b(_0x1e3a85,_0x2b8ef4){_0x1e3a85=_0x1e3a85-0x81;const _0x5ca25d=_0x5ca2();let _0x150bde=_0x5ca25d[_0x1e3a85];return _0x150bde;}import{storeToken,storeRefreshToken}from'./keychain.js';const WORKOS_DEVICE_AUTH_URL=_0x52700b(0x99),WORKOS_TOKEN_URL=_0x52700b(0x87);export async function requestDeviceCode(_0x4a4d11){const _0x117485=_0x52700b,_0x168650={'HThOg':function(_0x23fd42,_0xf93c60,_0x3a770d){return _0x23fd42(_0xf93c60,_0x3a770d);}},_0x20ea57=await _0x168650['HThOg'](fetch,WORKOS_DEVICE_AUTH_URL,{'method':'POST','headers':{'Content-Type':'application/x-www-form-urlencoded'},'body':new URLSearchParams({'client_id':_0x4a4d11})});if(!_0x20ea57['ok']){const _0x1996d7=await _0x20ea57[_0x117485(0xc0)]();throw new Error('Failed\x20to\x20request\x20device\x20code:\x20'+_0x20ea57[_0x117485(0xc7)]+'\x20'+_0x1996d7);}return _0x20ea57[_0x117485(0xcd)]();}export async function pollForTokens(_0x34143d,_0x33d4d8,_0x302732,_0x4b9852){const _0x2526df=_0x52700b,_0x354adc={'suchG':function(_0x548150,_0x24def0){return _0x548150+_0x24def0;},'JaxDC':function(_0x457821,_0x1b365a){return _0x457821*_0x1b365a;},'xiWKG':function(_0x29edab,_0x3abb74){return _0x29edab<_0x3abb74;},'PBPDt':function(_0x15d758,_0xe1ac4a,_0x3190e7){return _0x15d758(_0xe1ac4a,_0x3190e7);},'bummF':'urn:ietf:params:oauth:grant-type:device_code','SyoUO':_0x2526df(0xb0),'kYqBp':function(_0x58d382,_0x9481fc){return _0x58d382===_0x9481fc;},'ybDKc':'slow_down','mcFaV':'Authentication\x20failed','wsQtH':'Device\x20authorization\x20timed\x20out'},_0x173223=_0x354adc['suchG'](Date['now'](),_0x354adc['JaxDC'](_0x4b9852,0x3e8));let _0x22c1d0=_0x302732*0x3e8;while(_0x354adc['xiWKG'](Date['now'](),_0x173223)){await sleep(_0x22c1d0);const _0x22c0f8=await _0x354adc['PBPDt'](fetch,WORKOS_TOKEN_URL,{'method':'POST','headers':{'Content-Type':_0x2526df(0xbf)},'body':new URLSearchParams({'client_id':_0x34143d,'device_code':_0x33d4d8,'grant_type':_0x354adc['bummF']})});if(_0x22c0f8['ok'])return _0x22c0f8[_0x2526df(0xcd)]();const _0x366b07=await _0x22c0f8['json']();if(_0x366b07[_0x2526df(0xc6)]===_0x354adc[_0x2526df(0xc3)])continue;if(_0x354adc['kYqBp'](_0x366b07[_0x2526df(0xc6)],_0x354adc[_0x2526df(0xa0)])){_0x22c1d0+=0x3e8;continue;}throw new Error(_0x366b07['error_description']||_0x366b07['error']||_0x354adc['mcFaV']);}throw new Error(_0x354adc[_0x2526df(0xa2)]);}function _0x5ca2(){const _0x38d996=['\x27s\x20CLI\x20Key','/organization/self-serve-signup','PbkYx','length','Setting\x20up\x20your\x20organization...','write','ikuBx','authorization_pending','HfBcm','organizationId','27882yBczGs','633458nlpFTE','application/json','xnuij','36iXapUi','list','stringify','name','680ZvOPjO','startsWith','OPTVp','ghGME','application/x-www-form-urlencoded','text','FFOzT','apiKeys','SyoUO','org_id','access_token','error','status','stdin','/organization/my-memberships','filter','firstName','XBobm','json','xJlMQ','split','selected','99616aSatqs','/api-keys','16333420yepUIQ','YCCvH','https://api.workos.com/user_management/authenticate','2848023ItQyzo','isTTY','68121iEdfxj','kbCAx','log','toString','darwin','Waiting\x20for\x20authentication...','base64url','device_code','mcp:write','start','utf-8','Rmamr','Provisioning\x20API\x20key...','30YLudRS','Bynhz','https://api.workos.com/user_management/authorize/device','NDkCW','CLI\x20Key','xjUCi','GET','Multiple\x20organizations\x20available\x20but\x20cannot\x20prompt\x20for\x20selection\x20in\x20non-interactive\x20mode.\x0a','32324QGUJEc','ybDKc','xdg-open','wsQtH','email','ruGRc','POST','OXhad','dNwkV','interval'];_0x5ca2=function(){return _0x38d996;};return _0x5ca2();}async function fetchUserProfile(_0x4be645){const _0x1e12b5=_0x52700b,_0x48adf8={'iFPcp':function(_0x355903){return _0x355903();},'ikuBx':_0x1e12b5(0x9d)},_0x3bfd97=_0x48adf8['iFPcp'](getApiBaseUrl);try{const _0x431bc4=await fetch(_0x3bfd97+'/organization/me',{'method':_0x48adf8[_0x1e12b5(0xaf)],'headers':{'workos-token':_0x4be645}});if(_0x431bc4['ok'])return _0x431bc4[_0x1e12b5(0xcd)]();}catch{}return null;}function buildKeyName(_0x16500c,_0xb8772c){const _0x39e7d7=_0x52700b,_0x17eef8=_0xb8772c[_0x39e7d7(0xca)](_0x55bd38=>_0x55bd38[_0x39e7d7(0xba)]===_0x16500c||_0x55bd38['name'][_0x39e7d7(0xbc)](_0x16500c+'\x20('));if(_0x17eef8['length']===0x0)return _0x16500c;return _0x16500c+'\x20('+(_0x17eef8[_0x39e7d7(0xac)]+0x1)+')';}export async function provisionApiKey(_0xf0c07c){const _0x1b5f6c=_0x52700b,_0x3f8b99={'Bynhz':function(_0x43fb3b){return _0x43fb3b();},'xjUCi':_0x1b5f6c(0xb5),'xJlMQ':function(_0x400e23,_0x3c4106){return _0x400e23(_0x3c4106);},'ThGgy':_0x1b5f6c(0x9b),'MHNhy':function(_0x3af520,_0x219a73,_0x1f0709){return _0x3af520(_0x219a73,_0x1f0709);},'XBobm':_0x1b5f6c(0x92)},_0x5462b2=_0x3f8b99[_0x1b5f6c(0x98)](getApiBaseUrl),_0x38afa8={'Content-Type':_0x3f8b99[_0x1b5f6c(0x9c)],'workos-token':_0xf0c07c},_0x59ff8e=await _0x3f8b99[_0x1b5f6c(0xce)](fetchUserProfile,_0xf0c07c),_0x13b7e5=_0x59ff8e?.[_0x1b5f6c(0xcb)]||_0x59ff8e?.[_0x1b5f6c(0xa3)]?.[_0x1b5f6c(0x81)]('@')[0x0],_0x461826=_0x13b7e5?_0x13b7e5+_0x1b5f6c(0xa9):_0x3f8b99['ThGgy'];let _0xe9adfd=[];try{const _0x2d2fdd=await fetch(_0x5462b2+_0x1b5f6c(0x84),{'method':'GET','headers':_0x38afa8});if(_0x2d2fdd['ok']){const _0x3692eb=await _0x2d2fdd[_0x1b5f6c(0xcd)]();_0xe9adfd=_0x3692eb[_0x1b5f6c(0xc2)];}}catch{}const _0x13222f=_0x3f8b99['MHNhy'](buildKeyName,_0x461826,_0xe9adfd),_0x5ef6a2=await fetch(_0x5462b2+_0x1b5f6c(0x84),{'method':_0x1b5f6c(0xa5),'headers':_0x38afa8,'body':JSON['stringify']({'name':_0x13222f,'scope':_0x3f8b99[_0x1b5f6c(0xcc)]})});if(!_0x5ef6a2['ok']){const _0x124d26=await _0x5ef6a2['text']();throw new Error('Failed\x20to\x20provision\x20API\x20key:\x20'+_0x5ef6a2[_0x1b5f6c(0xc7)]+'\x20'+_0x124d26);}const _0x3e154c=await _0x5ef6a2['json']();return _0x3e154c['apiKey']['token'];}export function openBrowser(_0x6a9cca){const _0x530794=_0x52700b,_0x19e963={'xnuij':function(_0x314a73,_0x18ac1c){return _0x314a73===_0x18ac1c;},'kbCAx':_0x530794(0x8e),'WAMkl':function(_0x5c7a5b,_0x2ffb25){return _0x5c7a5b===_0x2ffb25;},'sfkJx':'win32','HfBcm':_0x530794(0x93),'ruGRc':function(_0x4d08ce,_0x57a042){return _0x4d08ce(_0x57a042);}},_0x51b180=process['platform'],_0x40087e=_0x19e963[_0x530794(0xb6)](_0x51b180,_0x19e963[_0x530794(0x8b)])?'open':_0x19e963['WAMkl'](_0x51b180,_0x19e963['sfkJx'])?_0x19e963[_0x530794(0xb1)]:_0x530794(0xa1);_0x19e963[_0x530794(0xa4)](exec,_0x40087e+'\x20'+JSON[_0x530794(0xb9)](_0x6a9cca));}function decodeJwtPayload(_0xb4086e){const _0x128a10=_0x52700b,_0x4d2746={'YDFek':'Invalid\x20JWT\x20format','dNwkV':_0x128a10(0x94)},_0x389aa2=_0xb4086e['split']('.');if(_0x389aa2['length']!==0x3)throw new Error(_0x4d2746['YDFek']);const _0x4ed92e=Buffer['from'](_0x389aa2[0x1],_0x128a10(0x90))[_0x128a10(0x8d)](_0x4d2746[_0x128a10(0xa7)]);return JSON['parse'](_0x4ed92e);}async function selfServeSignup(_0x19e09f){const _0x48594f=_0x52700b,_0x5159c3={'PbkYx':function(_0x578ed9){return _0x578ed9();},'UWJmm':'POST'},_0x26c9e7=_0x5159c3[_0x48594f(0xab)](getApiBaseUrl),_0x379329=await fetch(_0x26c9e7+_0x48594f(0xaa),{'method':_0x5159c3['UWJmm'],'headers':{'Content-Type':'application/json','workos-token':_0x19e09f}});if(!_0x379329['ok']){const _0x348098=await _0x379329[_0x48594f(0xc0)]();throw new Error('Failed\x20to\x20create\x20organization:\x20'+_0x379329['status']+'\x20'+_0x348098);}return _0x379329['json']();}async function fetchMyMemberships(_0x24054e){const _0x5d2770=_0x52700b,_0x3083a5={'nLChM':_0x5d2770(0x9d)},_0x33ff34=getApiBaseUrl(),_0x29e488=await fetch(_0x33ff34+_0x5d2770(0xc9),{'method':_0x3083a5['nLChM'],'headers':{'workos-token':_0x24054e}});if(!_0x29e488['ok']){const _0x2cd17a=await _0x29e488['text']();throw new Error('Failed\x20to\x20fetch\x20memberships:\x20'+_0x29e488[_0x5d2770(0xc7)]+'\x20'+_0x2cd17a);}const _0x4f05e7=await _0x29e488[_0x5d2770(0xcd)]();return _0x4f05e7['memberships'];}async function refreshTokenWithOrg(_0x4f2e0c,_0x4abef1,_0x4b7f78){const _0xa1a04=_0x52700b,_0x1a2fa8={'NDkCW':'POST'},_0x483759=await fetch(WORKOS_TOKEN_URL,{'method':_0x1a2fa8[_0xa1a04(0x9a)],'headers':{'Content-Type':_0xa1a04(0xbf)},'body':new URLSearchParams({'client_id':_0x4f2e0c,'grant_type':'refresh_token','refresh_token':_0x4abef1,'organization_id':_0x4b7f78})});if(!_0x483759['ok']){const _0x3e8e71=await _0x483759[_0xa1a04(0xc0)]();throw new Error('Failed\x20to\x20refresh\x20token\x20with\x20org:\x20'+_0x483759['status']+'\x20'+_0x3e8e71);}return _0x483759['json']();}export async function runDeviceAuthFlow(){const _0x2b0e4f=_0x52700b,_0x2a2471={'RbscH':function(_0x39dac7){return _0x39dac7();},'IEvZq':'\x0a🔐\x20Opening\x20browser\x20to\x20log\x20in...','FFOzT':'\x20\x20\x20A\x20human\x20needs\x20to\x20complete\x20authentication\x20in\x20the\x20browser.\x0a','Rmamr':function(_0x1c1850,_0x429b57){return _0x1c1850(_0x429b57);},'mbJFA':_0x2b0e4f(0x8f),'GWlYJ':function(_0x72f4b4,_0x416537,_0x4d01ff,_0x5e7501,_0x29594f){return _0x72f4b4(_0x416537,_0x4d01ff,_0x5e7501,_0x29594f);},'VREXz':function(_0x4341b9,_0x4e951c){return _0x4341b9===_0x4e951c;},'hHqAA':_0x2b0e4f(0xad),'OPTVp':function(_0xc4b3f6,_0x244e24){return _0xc4b3f6===_0x244e24;},'OXhad':function(_0x307fb8,_0x5d223b){return _0x307fb8+_0x5d223b;},'YCCvH':'Use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.','paAOs':_0x2b0e4f(0xb8),'rPTyY':_0x2b0e4f(0x82),'iYSDm':function(_0x5d4066,_0x3daa3b,_0x42344f,_0xc0685f){return _0x5d4066(_0x3daa3b,_0x42344f,_0xc0685f);},'ghGME':_0x2b0e4f(0x96)},_0x4e0d1e=_0x2a2471['RbscH'](getCurrentEnvironment),_0x4be022=ENVIRONMENT_CONFIGS[_0x4e0d1e]['workosClientId'],_0x16c9a6=await requestDeviceCode(_0x4be022);console[_0x2b0e4f(0x8c)](_0x2a2471['IEvZq']),console[_0x2b0e4f(0x8c)](_0x2a2471[_0x2b0e4f(0xc1)]),_0x2a2471[_0x2b0e4f(0x95)](openBrowser,_0x16c9a6['verification_uri_complete']),console[_0x2b0e4f(0x8c)]('If\x20the\x20browser\x20doesn\x27t\x20open,\x20visit:\x20'+_0x16c9a6['verification_uri_complete']),console[_0x2b0e4f(0x8c)]('Code:\x20'+_0x16c9a6['user_code']+'\x0a'),process['stdout'][_0x2b0e4f(0xae)](_0x2a2471['mbJFA']);let _0x58d529=await _0x2a2471['GWlYJ'](pollForTokens,_0x4be022,_0x16c9a6[_0x2b0e4f(0x91)],_0x16c9a6[_0x2b0e4f(0xa8)],_0x16c9a6['expires_in']);console['log']('\x20✓');const _0x1589a7=decodeJwtPayload(_0x58d529[_0x2b0e4f(0xc5)]);if(!_0x1589a7[_0x2b0e4f(0xc4)]){const _0x1e07c6=await fetchMyMemberships(_0x58d529['access_token']);let _0x12c314;if(_0x2a2471['VREXz'](_0x1e07c6[_0x2b0e4f(0xac)],0x0)){process['stdout'][_0x2b0e4f(0xae)](_0x2a2471['hHqAA']);const _0x39f029=await selfServeSignup(_0x58d529[_0x2b0e4f(0xc5)]);_0x12c314=_0x39f029['organizationId'],console['log']('\x20✓');}else{if(_0x2a2471[_0x2b0e4f(0xbd)](_0x1e07c6['length'],0x1))_0x12c314=_0x1e07c6[0x0]['organizationId'],console[_0x2b0e4f(0x8c)]('Using\x20organization:\x20'+_0x1e07c6[0x0]['name']);else{const _0xfa23ca=process[_0x2b0e4f(0xc8)]['isTTY']&&process['stdout'][_0x2b0e4f(0x89)];if(!_0xfa23ca)throw new Error(_0x2a2471[_0x2b0e4f(0xa6)](_0x2b0e4f(0x9e),_0x2a2471[_0x2b0e4f(0x86)]));const {selected:_0x878110}=await _0x4e443f['prompt']([{'type':_0x2a2471['paAOs'],'name':_0x2a2471['rPTyY'],'message':'Select\x20an\x20organization:','choices':_0x1e07c6['map'](_0x40fc23=>({'name':_0x40fc23[_0x2b0e4f(0xba)],'value':_0x40fc23[_0x2b0e4f(0xb2)]}))}]);_0x12c314=_0x878110;}}_0x58d529=await _0x2a2471['iYSDm'](refreshTokenWithOrg,_0x4be022,_0x58d529['refresh_token'],_0x12c314);}process['stdout'][_0x2b0e4f(0xae)](_0x2a2471[_0x2b0e4f(0xbe)]);const _0x11b8fc=await provisionApiKey(_0x58d529['access_token']);return console['log']('\x20✓'),await _0x2a2471['Rmamr'](storeToken,_0x11b8fc),_0x58d529['refresh_token']&&await storeRefreshToken(_0x58d529['refresh_token']),_0x11b8fc;}function sleep(_0x1f5139){return new Promise(_0x21d756=>setTimeout(_0x21d756,_0x1f5139));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x3563df=_0x17db;(function(_0x7d02be,_0x48d93f){const _0x84791b=_0x17db,_0x23d663=_0x7d02be();while(!![]){try{const _0x44431e=parseInt(_0x84791b(0xcf))/0x1*(parseInt(_0x84791b(0xc9))/0x2)+-parseInt(_0x84791b(0xda))/0x3+parseInt(_0x84791b(0xdb))/0x4+-parseInt(_0x84791b(0xdc))/0x5*(-parseInt(_0x84791b(0xdd))/0x6)+-parseInt(_0x84791b(0xdf))/0x7*(-parseInt(_0x84791b(0xd6))/0x8)+parseInt(_0x84791b(0xc7))/0x9+-parseInt(_0x84791b(0xcd))/0xa*(parseInt(_0x84791b(0xd4))/0xb);if(_0x44431e===_0x48d93f)break;else _0x23d663['push'](_0x23d663['shift']());}catch(_0x2a31bf){_0x23d663['push'](_0x23d663['shift']());}}}(_0x3ce4,0x4bf31));export const ENVIRONMENT_CONFIGS={'prod':{'apiBaseUrl':_0x3563df(0xca),'workosClientId':'client_01J9CBYM7M5ZETCF7G6614DXR2','aiProxyUrl':_0x3563df(0xd0)},'staging':{'apiBaseUrl':_0x3563df(0xd1),'workosClientId':_0x3563df(0xcc),'aiProxyUrl':'https://ai-proxy-301751771437.us-central1.run.app'},'local':{'apiBaseUrl':_0x3563df(0xce),'workosClientId':'client_01J9CBYM2DKWV9HM17D95Z540K','aiProxyUrl':'http://localhost:8090'}};function _0x3ce4(){const _0x5e68d7=['https://api.staging.ranger.net','MSyon','staging','44gVRQkh','local','4631672puuEpt','aiProxyUrl','LjbcC','playwright-cli','1633365WfhuCN','740768EvCdBV','22905yyyzKr','642rOVxKl','RANGER_CLI_ENV','7ESJpuD','RANGER_DISABLE_MCP','2283363pPOWcX','zLtqz','227914jGudHK','https://api.ranger.net','FxuEE','client_01J9CBYM2DKWV9HM17D95Z540K','2485880hpUWkj','http://localhost:8080','3tiCWZe','https://ai-proxy-716115358910.us-central1.run.app'];_0x3ce4=function(){return _0x5e68d7;};return _0x3ce4();}export const DEFAULT_ENVIRONMENT='prod';function _0x17db(_0x141177,_0x4fcb76){_0x141177=_0x141177-0xc7;const _0x3ce4b6=_0x3ce4();let _0x17db61=_0x3ce4b6[_0x141177];return _0x17db61;}export function isValidEnvironment(_0x52cab6){const _0x5a951f=_0x3563df,_0xec31b7={'MSyon':function(_0x44f1f6,_0x2250c3){return _0x44f1f6===_0x2250c3;},'FxuEE':_0x5a951f(0xd3)};return _0x52cab6==='prod'||_0xec31b7[_0x5a951f(0xd2)](_0x52cab6,_0xec31b7[_0x5a951f(0xcb)])||_0x52cab6===_0x5a951f(0xd5);}export function getCurrentEnvironment(){const _0xf282a4=_0x3563df,_0x2111b6={'LjbcC':function(_0x186c5a,_0x90cb5a){return _0x186c5a(_0x90cb5a);}},_0x309292=process['env'][_0xf282a4(0xde)];if(_0x309292&&_0x2111b6[_0xf282a4(0xd8)](isValidEnvironment,_0x309292))return _0x309292;return DEFAULT_ENVIRONMENT;}export function getApiBaseUrl(){const _0x4183b7=_0x3563df,_0x4d81e0={'zLtqz':function(_0x323f26){return _0x323f26();}};return ENVIRONMENT_CONFIGS[_0x4d81e0[_0x4183b7(0xc8)](getCurrentEnvironment)]['apiBaseUrl'];}export function getAiProxyUrl(){const _0x4075b6=_0x3563df;return ENVIRONMENT_CONFIGS[getCurrentEnvironment()][_0x4075b6(0xd7)];}export function isMcpDisabled(){const _0x4376b0=_0x3563df;return process['env'][_0x4376b0(0xe0)]==='true';}export function getVerificationTransport(){const _0x23b707=_0x3563df,_0x59c673={'rFecc':function(_0x5e8624){return _0x5e8624();},'tJjpn':'mcp'};return _0x59c673['rFecc'](isMcpDisabled)?_0x23b707(0xd9):_0x59c673['tJjpn'];}
|