@ranger-testing/ranger-cli 2.4.6 → 2.5.0
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/claudeOverrideSettings.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/tokenRefresh.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/build/skills/ranger/SKILL.md +38 -41
- package/build/skills/ranger/create.md +5 -13
- package/build/skills/ranger/feedback.md +3 -3
- package/build/skills/ranger/start.md +13 -13
- package/build/skills/ranger/verify.md +15 -28
- package/package.json +5 -3
- package/scripts/postinstall.js +4 -1
package/build/commands/update.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x81c05d,_0x42298f){const _0x2164b6=_0x5ee8,_0x4f663e=_0x81c05d();while(!![]){try{const _0x12de27=parseInt(_0x2164b6(0x1dc))/0x1+parseInt(_0x2164b6(0x1fe))/0x2*(parseInt(_0x2164b6(0x203))/0x3)+parseInt(_0x2164b6(0x1e9))/0x4+-parseInt(_0x2164b6(0x1f3))/0x5*(parseInt(_0x2164b6(0x20a))/0x6)+parseInt(_0x2164b6(0x1fb))/0x7+-parseInt(_0x2164b6(0x1da))/0x8*(-parseInt(_0x2164b6(0x204))/0x9)+-parseInt(_0x2164b6(0x1d6))/0xa*(parseInt(_0x2164b6(0x1d1))/0xb);if(_0x12de27===_0x42298f)break;else _0x4f663e['push'](_0x4f663e['shift']());}catch(_0x374017){_0x4f663e['push'](_0x4f663e['shift']());}}}(_0xea9c,0x72c16));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';import{isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';async function runInstall(){const _0xb76d55=_0x5ee8,_0x5c747f={'XOKYj':function(_0x3dc9d2,_0x46a0c4){return _0x3dc9d2===_0x46a0c4;},'oPCWw':_0xb76d55(0x1f1),'WfiYG':_0xb76d55(0x1e2),'ZubDd':_0xb76d55(0x1d3)};return new Promise(_0x2a3980=>{const _0x128980=_0xb76d55,_0x41cc63={'yoaBi':function(_0x3ca4d0,_0x4b9443){return _0x3ca4d0(_0x4b9443);},'wpxMF':function(_0x305ec5,_0x64f326){const _0x11246a=_0x5ee8;return _0x5c747f[_0x11246a(0x1de)](_0x305ec5,_0x64f326);}};console[_0x128980(0x1e5)]('\x0aInstalling\x20'+PACKAGE_NAME+_0x128980(0x1eb));const _0x3e7792=spawn(_0x5c747f[_0x128980(0x1dd)],[_0x128980(0x1f9),'-g',PACKAGE_NAME+_0x128980(0x1e7)],{'stdio':'inherit','shell':process[_0x128980(0x208)]==='win32'});_0x3e7792['on'](_0x5c747f['WfiYG'],_0x567bfe=>{_0x41cc63['yoaBi'](_0x2a3980,_0x41cc63['wpxMF'](_0x567bfe,0x0));}),_0x3e7792['on'](_0x5c747f['ZubDd'],()=>{_0x2a3980(![]);});});}async function updateClaudeMarketplace(){const _0x24ff6f=_0x5ee8,_0x36e79f={'NJpku':function(_0x402eca,_0x11fa0b){return _0x402eca(_0x11fa0b);},'TLuKA':function(_0x28bbab,_0x3e9199){return _0x28bbab===_0x3e9199;},'ZlkVg':function(_0x1e9119,_0x18a486,_0x40f8dc,_0x4d0743){return _0x1e9119(_0x18a486,_0x40f8dc,_0x4d0743);},'lhLom':'plugin','HBtmI':_0x24ff6f(0x1e1),'tLsZh':_0x24ff6f(0x1ff),'vZqwX':'win32','fvOOW':'close'};return new Promise(_0x736175=>{const _0x9b2ac7=_0x24ff6f,_0xbfb273={'QsZDs':function(_0x341818,_0x1688dd){return _0x341818(_0x1688dd);}},_0x4da9ec=_0x36e79f['ZlkVg'](spawn,'claude',[_0x36e79f['lhLom'],_0x36e79f['HBtmI'],_0x9b2ac7(0x1ee),_0x36e79f['tLsZh']],{'stdio':_0x9b2ac7(0x1ec),'shell':process[_0x9b2ac7(0x208)]===_0x36e79f[_0x9b2ac7(0x1d4)]});_0x4da9ec['on'](_0x36e79f['fvOOW'],_0x5418e4=>{const _0x150a85=_0x9b2ac7;_0x36e79f['NJpku'](_0x736175,_0x36e79f[_0x150a85(0x1e6)](_0x5418e4,0x0));}),_0x4da9ec['on']('error',()=>{_0xbfb273['QsZDs'](_0x736175,![]);});});}async function updateClaudePlugin(_0x30bad0){const _0x188486=_0x5ee8,_0x40f9ba={'yREmj':function(_0x434b9d,_0x5be433){return _0x434b9d(_0x5be433);},'tWMBr':function(_0x155a7b,_0x3ba51c){return _0x155a7b===_0x3ba51c;},'oaqDQ':function(_0x2ef2ae,_0x52a91b){return _0x2ef2ae(_0x52a91b);},'lpVme':_0x188486(0x1ee),'GIkvZ':'ranger@trailhead','BTBeG':_0x188486(0x1fa),'iYTFP':'claude','qhTKg':_0x188486(0x1d0),'wAqSI':'close','ulhap':'error'};return new Promise(_0x49fa83=>{const _0x29ba99=_0x188486,_0x122682={'yiPBB':function(_0x1b069c,_0x56b92f){return _0x40f9ba['oaqDQ'](_0x1b069c,_0x56b92f);}},_0x59abc3=['plugin',_0x40f9ba[_0x29ba99(0x1e4)],_0x40f9ba[_0x29ba99(0x1fc)]];_0x30bad0&&_0x59abc3['push'](_0x40f9ba['BTBeG'],_0x30bad0);const _0x4f08e1=spawn(_0x40f9ba['iYTFP'],_0x59abc3,{'stdio':'pipe','shell':_0x40f9ba[_0x29ba99(0x207)](process['platform'],_0x40f9ba['qhTKg'])});_0x4f08e1['on'](_0x40f9ba['wAqSI'],_0x5ee4c8=>{const _0x53a4b6=_0x29ba99;_0x40f9ba[_0x53a4b6(0x205)](_0x49fa83,_0x40f9ba[_0x53a4b6(0x207)](_0x5ee4c8,0x0));}),_0x4f08e1['on'](_0x40f9ba[_0x29ba99(0x1df)],()=>{_0x122682['yiPBB'](_0x49fa83,![]);});});}function _0x5ee8(_0x26b905,_0x4a930a){_0x26b905=_0x26b905-0x1cd;const _0xea9c6e=_0xea9c();let _0x5ee84a=_0xea9c6e[_0x26b905];return _0x5ee84a;}function isSkillInstalled(_0x36f698,_0x51da0a,_0x363104){const _0x18cfd3=_0x5ee8,_0x1e66eb={'vfHgS':function(_0x5dd7a1,_0x4aa2aa){return _0x5dd7a1===_0x4aa2aa;},'UfOYv':function(_0x3bf878,_0x2f44e3){return _0x3bf878(_0x2f44e3);},'xudUz':function(_0x443746,_0x1f9fa7){return _0x443746(_0x1f9fa7);},'UyADQ':function(_0x3e9a12,_0x5ee9bd,_0x4d0166){return _0x3e9a12(_0x5ee9bd,_0x4d0166);}},_0x5a6d4c=_0x1e66eb[_0x18cfd3(0x1f8)](_0x363104,'opencode')?_0x1e66eb[_0x18cfd3(0x201)](getOpencodeSkillsDir,_0x51da0a):_0x1e66eb['xudUz'](getSkillsDir,_0x51da0a),_0x18256b=_0x1e66eb[_0x18cfd3(0x1ed)](join,_0x5a6d4c,_0x36f698);return _0x1e66eb[_0x18cfd3(0x201)](existsSync,_0x18256b);}async function reinstallSkills(_0x5235ea){const _0x59ff0f=_0x5ee8,_0xe712a={'sJYiT':'project','lumft':function(_0x2eb3a2,_0x498464,_0xb16d7,_0x5184b8){return _0x2eb3a2(_0x498464,_0xb16d7,_0x5184b8);},'UMoJr':'claude','UynVv':function(_0x29b526,_0x20ac47,_0x457959,_0xb893ed){return _0x29b526(_0x20ac47,_0x457959,_0xb893ed);},'OBWCE':_0x59ff0f(0x202)},_0x461405=[_0xe712a['sJYiT'],'user'],_0x545bf5=[];for(const _0x34d395 of _0x461405){for(const _0x2733f8 of RANGER_MANAGED_SKILLS){_0xe712a['lumft'](isSkillInstalled,_0x2733f8,_0x34d395,_0xe712a['UMoJr'])&&_0x545bf5['push']({'skillName':_0x2733f8,'level':_0x34d395,'platform':_0x59ff0f(0x206)}),_0xe712a['UynVv'](isSkillInstalled,_0x2733f8,_0x34d395,'opencode')&&_0x545bf5['push']({'skillName':_0x2733f8,'level':_0x34d395,'platform':'opencode'});}}for(const _0x2911b4 of _0x461405){for(const _0x3d383f of DEPRECATED_SKILLS){await removeSkill(_0x3d383f,_0x2911b4);}}if(_0x545bf5['length']===0x0){console[_0x59ff0f(0x1e5)](_0xe712a[_0x59ff0f(0x1cf)]);return;}console['log'](_0x59ff0f(0x1ea)+_0x545bf5[_0x59ff0f(0x1f4)]+_0x59ff0f(0x1d8));for(const {skillName:_0x4e9cb9,level:_0x3b9a49,platform:_0x406f16}of _0x545bf5){try{await installSkill(_0x4e9cb9,{'level':_0x3b9a49,'cliVersion':_0x5235ea,'platform':_0x406f16});}catch(_0x14a713){console['warn'](_0x59ff0f(0x1f2)+_0x406f16+'\x20'+_0x3b9a49+'\x20skill\x20'+_0x4e9cb9+':',_0x14a713);}}}function _0xea9c(){const _0x729d0f=['EBPQM','UfOYv','\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.','7563zsEXDx','920466TITvqH','yREmj','claude','tWMBr','platform','active-profile.txt','570SlnfXO','version','yhfyu','OBWCE','win32','11PwZkET','split','error','vZqwX','queGx','24350660nRrrpN','some','\x20ranger-managed\x20skill(s)...','Update\x20failed.','40VyYGNY','\x0aSuccessfully\x20installed\x20latest\x20version.','871912QVZWaY','oPCWw','XOKYj','ulhap','qWIZC','marketplace','close','\x0a✅\x20Update\x20complete!','lpVme','log','TLuKA','@latest','utf-8','3139036erLBqd','\x0aReinstalling\x20','@latest...\x0a','pipe','UyADQ','update','project','endsWith','npm','\x20\x20Failed\x20to\x20reinstall\x20','19920FzvKet','length','\x0aCould\x20not\x20check\x20latest\x20version:\x20','trim','active-feature.txt','vfHgS','install','--scope','6467629orDsxM','GIkvZ','Checking\x20for\x20updates...','152KINmOM','trailhead'];_0xea9c=function(){return _0x729d0f;};return _0xea9c();}async function ensureActiveProfileGitignored(){const _0x45d423=_0x5ee8,_0x2a138e={'queGx':function(_0x1da482){return _0x1da482();},'yhfyu':function(_0x4b59ac,_0x2bd6a2){return _0x4b59ac(_0x2bd6a2);},'yjOQV':function(_0x1914d0,_0x52d918,_0x5b4521){return _0x1914d0(_0x52d918,_0x5b4521);},'EBPQM':_0x45d423(0x1e8),'YSAvH':function(_0x369fd5,_0x3fa4e8,_0x5fb96,_0x536e0f){return _0x369fd5(_0x3fa4e8,_0x5fb96,_0x536e0f);}},_0x18d882=join(_0x2a138e[_0x45d423(0x1d5)](getRangerDir),'.gitignore');if(!_0x2a138e[_0x45d423(0x1ce)](existsSync,_0x18d882))return![];let _0x2ebb4b='';try{_0x2ebb4b=await _0x2a138e['yjOQV'](readFile,_0x18d882,_0x2a138e[_0x45d423(0x200)]);}catch{return![];}const _0x29eb0b=_0x2ebb4b[_0x45d423(0x1d2)](/\r?\n/);if(_0x29eb0b[_0x45d423(0x1d7)](_0x9222ce=>_0x9222ce[_0x45d423(0x1f6)]()==='active-profile.txt'))return![];let _0x48eabf=_0x29eb0b['findIndex'](_0x1225e8=>_0x1225e8['trim']()===_0x45d423(0x1f7));_0x48eabf===-0x1&&(_0x48eabf=_0x29eb0b['length']);_0x29eb0b['splice'](_0x48eabf,0x0,_0x45d423(0x209));let _0x473840=_0x29eb0b['join']('\x0a');!_0x473840[_0x45d423(0x1f0)]('\x0a')&&(_0x473840+='\x0a');try{await _0x2a138e['YSAvH'](writeFile,_0x18d882,_0x473840,_0x2a138e['EBPQM']);}catch{return![];}return!![];}export async function update(){const _0x1f8358=_0x5ee8,_0x59ed24={'dhanu':function(_0x2351fb){return _0x2351fb();},'rirFS':function(_0x24458b){return _0x24458b();},'sGhPB':_0x1f8358(0x1d9),'MOlVo':function(_0x1447ad,_0x4ac49f){return _0x1447ad(_0x4ac49f);},'mYuBw':'trailhead','Czuqf':'\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','ZJZcg':_0x1f8358(0x1ef),'qWIZC':'✓\x20Migrated\x20active\x20profile\x20file'},_0x55db51=getCurrentVersion();console[_0x1f8358(0x1e5)]('\x0aCurrent\x20version:\x20'+_0x55db51),console[_0x1f8358(0x1e5)](_0x1f8358(0x1fd));const _0x5785f9=_0x59ed24['dhanu'](getLatestVersion);let _0x438f59=_0x55db51;if(!_0x5785f9['version']){console['warn'](_0x1f8358(0x1f5)+_0x5785f9['error']),console[_0x1f8358(0x1e5)]('Attempting\x20install\x20anyway...');const _0x4464c0=await runInstall();if(_0x4464c0)console[_0x1f8358(0x1e5)](_0x1f8358(0x1db)),_0x438f59=_0x59ed24['rirFS'](getCurrentVersion);else throw new Error('Update\x20failed:\x20'+_0x5785f9['error']);}else{const _0x2812b8=_0x5785f9[_0x1f8358(0x1cd)];console[_0x1f8358(0x1e5)]('Latest\x20version:\x20\x20'+_0x2812b8);const _0x35960b=compareVersions(_0x55db51,_0x2812b8);if(_0x35960b===0x0)console[_0x1f8358(0x1e5)]('\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.');else{if(_0x35960b<0x0)console['log']('\x0aYour\x20version\x20('+_0x55db51+')\x20is\x20newer\x20than\x20the\x20published\x20version\x20('+_0x2812b8+').');else{const _0x5172c2=await _0x59ed24['rirFS'](runInstall);if(_0x5172c2)console['log']('\x0aSuccessfully\x20updated\x20to\x20version\x20'+_0x2812b8),_0x438f59=_0x2812b8;else throw new Error(_0x59ed24['sGhPB']);}}}await _0x59ed24['MOlVo'](reinstallSkills,_0x438f59);const _0x7f1d67=await isMarketplaceAdded(_0x59ed24['mYuBw']),_0xf24347=await isPluginInstalled('ranger@trailhead');if(_0x7f1d67){const _0x119168=await updateClaudeMarketplace();_0x119168&&console[_0x1f8358(0x1e5)]('\x0aClaude\x20marketplace\x20updated\x20(trailhead).');}if(_0xf24347){const _0x312228=await updateClaudePlugin();_0x312228&&console['log'](_0x59ed24['Czuqf']);const _0x4152f9=await updateClaudePlugin(_0x59ed24['ZJZcg']);_0x4152f9&&console[_0x1f8358(0x1e5)]((_0x312228?'':'\x0a')+'Claude\x20plugin\x20updated\x20(project\x20scope).');}const _0x3cf401=await migrateActiveProfileFile();_0x3cf401&&console['log'](_0x59ed24[_0x1f8358(0x1e0)]);const _0x46bd05=await ensureActiveProfileGitignored();console['log'](_0x1f8358(0x1e3));}
|
|
1
|
+
(function(_0x408da2,_0x5ee673){const _0x3aec71=_0x9df0,_0x2cb1b1=_0x408da2();while(!![]){try{const _0x42ac3b=-parseInt(_0x3aec71(0xc6))/0x1+-parseInt(_0x3aec71(0xc3))/0x2+-parseInt(_0x3aec71(0x95))/0x3+parseInt(_0x3aec71(0xc0))/0x4*(-parseInt(_0x3aec71(0xa2))/0x5)+parseInt(_0x3aec71(0xbe))/0x6*(-parseInt(_0x3aec71(0xaa))/0x7)+-parseInt(_0x3aec71(0x9c))/0x8+parseInt(_0x3aec71(0xad))/0x9;if(_0x42ac3b===_0x5ee673)break;else _0x2cb1b1['push'](_0x2cb1b1['shift']());}catch(_0x51b91d){_0x2cb1b1['push'](_0x2cb1b1['shift']());}}}(_0x120a,0x41272));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';function _0x9df0(_0x3ab143,_0x140ec6){_0x3ab143=_0x3ab143-0x91;const _0x120a86=_0x120a();let _0x9df062=_0x120a86[_0x3ab143];return _0x9df062;}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';function _0x120a(){const _0x2f68df=['inherit','yYNOY','MGvki','Update\x20failed:\x20','trailhead','SeGiR','ZLyzE','wnNFd','push','update','zRLrU','\x0aClaude\x20plugin\x20updated\x20(project\x20scope).','splice','RzFYl','2406oRUgiK','\x0aClaude\x20marketplace\x20updated\x20(trailhead).','631508WaeIBn','ZQBrx','scope','591520koPgyw','JIfrD','tWfYk','142520VdGuxA','nTKkG','platform','project','error','Dvndd','oLLaU','timeoutMs','ebPBY','\x0aSuccessfully\x20updated\x20to\x20version\x20','DRdvR','GCqmi','RTbFB','\x20\x20Failed\x20to\x20reinstall\x20','\x20skill\x20','warn','1285311oeAIex','ZKIEf','@latest','plugin','fAjDz','ignore','stdio','356976AiqHqm','log','\x0aCould\x20not\x20check\x20latest\x20version:\x20','trim','claude','npm','5pXIpOA','XESlv','cJHOP','VQlYB','OLNLx','INmHy','--scope','\x20scope\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).','287xcLhik','close',')\x20is\x20newer\x20than\x20the\x20published\x20version\x20(','12172707qmPYvO','IobEW','kill'];_0x120a=function(){return _0x2f68df;};return _0x120a();}import{migrateActiveProfileFile}from'./utils/activeProfile.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getPluginInfo,isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';const CLAUDE_COMMAND_TIMEOUT_MS=0x1d4c0;async function runCommand(_0x1e711c,_0x1568c3,_0x5bcbfb){const _0x2ebeed=_0x9df0,_0x168565={'XOIJa':function(_0xf3a837,_0x5ed38a){return _0xf3a837(_0x5ed38a);},'NGOgk':function(_0x59ba43,_0xd05a6d){return _0x59ba43(_0xd05a6d);},'ebPBY':function(_0xff8614,_0x217ea1){return _0xff8614===_0x217ea1;},'DRdvR':function(_0x3408ed,_0x41a551,_0x3d5f6f,_0x510b9d){return _0x3408ed(_0x41a551,_0x3d5f6f,_0x510b9d);},'tWRIM':_0x2ebeed(0xb0),'MGvki':function(_0x10b54a,_0x3d181a){return _0x10b54a===_0x3d181a;},'QmYUA':function(_0x33ae1c,_0x3ec17a,_0x4548a9){return _0x33ae1c(_0x3ec17a,_0x4548a9);},'LYEnV':_0x2ebeed(0xab),'ZQBrx':_0x2ebeed(0xca)};return new Promise(_0x2f8090=>{const _0x3f9471=_0x2ebeed;let _0x48cb2b=![],_0x559b51;const _0x4a27bf=_0x20acbf=>{if(_0x48cb2b)return;_0x48cb2b=!![],_0x559b51&&clearTimeout(_0x559b51),_0x168565['XOIJa'](_0x2f8090,_0x20acbf);},_0x25a128=_0x168565[_0x3f9471(0xd0)](spawn,_0x1e711c,_0x1568c3,{'stdio':[_0x3f9471(0x9a),_0x5bcbfb?.['stdio']??_0x3f9471(0xb0),_0x5bcbfb?.[_0x3f9471(0x9b)]??_0x168565['tWRIM']],'shell':_0x168565[_0x3f9471(0xb2)](process[_0x3f9471(0xc8)],'win32')});_0x559b51=_0x5bcbfb?.[_0x3f9471(0xcd)]?_0x168565['QmYUA'](setTimeout,()=>{const _0x3be474=_0x3f9471;_0x25a128[_0x3be474(0xaf)](),_0x25a128['unref'](),_0x4a27bf(![]);},_0x5bcbfb['timeoutMs']):undefined,_0x25a128['on'](_0x168565['LYEnV'],_0x5db815=>{const _0x32f780=_0x3f9471;_0x168565['NGOgk'](_0x4a27bf,_0x168565[_0x32f780(0xce)](_0x5db815,0x0));}),_0x25a128['on'](_0x168565[_0x3f9471(0xc1)],()=>{_0x4a27bf(![]);});});}async function runInstall(){const _0x18f7b4=_0x9df0,_0x393ee3={'czupc':_0x18f7b4(0xa1),'cJHOP':'install','RzFYl':_0x18f7b4(0xb0),'tWfYk':function(_0x2acaab,_0x5a7250){return _0x2acaab===_0x5a7250;},'yQajj':'win32','INmHy':'close'};return new Promise(_0x19827c=>{const _0x2a410a=_0x18f7b4,_0x2ffc19={'sRMIc':function(_0x53ab04,_0x4093ec){return _0x53ab04(_0x4093ec);}};console[_0x2a410a(0x9d)]('\x0aInstalling\x20'+PACKAGE_NAME+'@latest...\x0a');const _0x13d156=spawn(_0x393ee3['czupc'],[_0x393ee3[_0x2a410a(0xa4)],'-g',PACKAGE_NAME+_0x2a410a(0x97)],{'stdio':[_0x2a410a(0x9a),_0x393ee3[_0x2a410a(0xbd)],_0x2a410a(0xb0)],'shell':_0x393ee3[_0x2a410a(0xc5)](process['platform'],_0x393ee3['yQajj'])});_0x13d156['on'](_0x393ee3[_0x2a410a(0xa7)],_0x2f63a1=>{_0x19827c(_0x2f63a1===0x0);}),_0x13d156['on'](_0x2a410a(0xca),()=>{_0x2ffc19['sRMIc'](_0x19827c,![]);});});}async function updateClaudeMarketplace(){const _0x3ff419=_0x9df0,_0x327edf={'JIfrD':_0x3ff419(0xa0),'GMDMF':'marketplace','XqsMf':_0x3ff419(0xb9)},_0x68ab18=await runCommand(_0x327edf[_0x3ff419(0xc4)],[_0x3ff419(0x98),_0x327edf['GMDMF'],_0x327edf['XqsMf'],'trailhead'],{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS});if(!_0x68ab18)throw new Error('Claude\x20marketplace\x20update\x20command\x20failed\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).');}async function updateClaudePlugin(_0x33f2e2){const _0x33129c=_0x9df0,_0x439629={'QHXaQ':'ranger@trailhead','OLNLx':function(_0x3c61e6,_0x4ddb5d,_0x285579,_0x631c41){return _0x3c61e6(_0x4ddb5d,_0x285579,_0x631c41);},'NnkeV':function(_0x4d9270,_0x72e557){return _0x4d9270??_0x72e557;}},_0x16642d=['plugin',_0x33129c(0xb9),_0x439629['QHXaQ']];_0x33f2e2&&_0x16642d['push'](_0x33129c(0xa8),_0x33f2e2);const _0x23f82b=await _0x439629[_0x33129c(0xa6)](runCommand,'claude',_0x16642d,{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS});if(!_0x23f82b){const _0x50392e=_0x439629['NnkeV'](_0x33f2e2,'user');throw new Error('Claude\x20plugin\x20update\x20failed\x20for\x20'+_0x50392e+_0x33129c(0xa9));}}function isSkillInstalled(_0x4e8c44,_0x3d0bce,_0x4dfc6c){const _0x30bfa9=_0x9df0,_0x2056ea={'ZLyzE':'opencode','IobEW':function(_0x2ae739,_0x367125){return _0x2ae739(_0x367125);}},_0x2e882f=_0x4dfc6c===_0x2056ea[_0x30bfa9(0xb6)]?getOpencodeSkillsDir(_0x3d0bce):_0x2056ea[_0x30bfa9(0xae)](getSkillsDir,_0x3d0bce),_0x49faff=join(_0x2e882f,_0x4e8c44);return existsSync(_0x49faff);}async function reinstallSkills(_0x6d3dfb){const _0x49a325=_0x9df0,_0x2e3205={'lbJZe':_0x49a325(0xc9),'SeGiR':function(_0x31c5f8,_0x4e0aeb,_0x1f3a6a,_0x19b6b1){return _0x31c5f8(_0x4e0aeb,_0x1f3a6a,_0x19b6b1);},'yYNOY':_0x49a325(0xa0),'NhbJV':'opencode','XESlv':function(_0x14fa3b,_0x53e5f4,_0x1978b4){return _0x14fa3b(_0x53e5f4,_0x1978b4);},'jjbVt':function(_0x213667,_0x4a69e3){return _0x213667===_0x4a69e3;}},_0x1173fb=[_0x2e3205['lbJZe'],'user'],_0x56f5f8=[];for(const _0x29200b of _0x1173fb){for(const _0x587c57 of RANGER_MANAGED_SKILLS){_0x2e3205[_0x49a325(0xb5)](isSkillInstalled,_0x587c57,_0x29200b,_0x2e3205['yYNOY'])&&_0x56f5f8[_0x49a325(0xb8)]({'skillName':_0x587c57,'level':_0x29200b,'platform':_0x2e3205[_0x49a325(0xb1)]}),isSkillInstalled(_0x587c57,_0x29200b,_0x2e3205['NhbJV'])&&_0x56f5f8['push']({'skillName':_0x587c57,'level':_0x29200b,'platform':_0x2e3205['NhbJV']});}}for(const _0xc456ad of _0x1173fb){for(const _0x2a9767 of DEPRECATED_SKILLS){await _0x2e3205[_0x49a325(0xa3)](removeSkill,_0x2a9767,_0xc456ad);}}if(_0x2e3205['jjbVt'](_0x56f5f8['length'],0x0)){console['log']('\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.');return;}console['log']('\x0aReinstalling\x20'+_0x56f5f8['length']+'\x20ranger-managed\x20skill(s)...');for(const {skillName:_0x43c96f,level:_0x20f703,platform:_0x42bb4a}of _0x56f5f8){try{await _0x2e3205[_0x49a325(0xa3)](installSkill,_0x43c96f,{'level':_0x20f703,'cliVersion':_0x6d3dfb,'platform':_0x42bb4a});}catch(_0x157721){console[_0x49a325(0x94)](_0x49a325(0x92)+_0x42bb4a+'\x20'+_0x20f703+_0x49a325(0x93)+_0x43c96f+':',_0x157721);}}}async function ensureActiveProfileGitignored(){const _0x3aa3f3=_0x9df0,_0x3d9db2={'ABoSS':function(_0x5245fe,_0x547e0e,_0x4d54c2){return _0x5245fe(_0x547e0e,_0x4d54c2);},'RQsbn':function(_0x16052c,_0xc0ebcc){return _0x16052c(_0xc0ebcc);},'VQlYB':function(_0x5ef802,_0x33c01b,_0x41947d){return _0x5ef802(_0x33c01b,_0x41947d);},'uGLao':'utf-8'},_0x52036c=_0x3d9db2['ABoSS'](join,getRangerDir(),'.gitignore');if(!_0x3d9db2['RQsbn'](existsSync,_0x52036c))return![];let _0x423ab4='';try{_0x423ab4=await _0x3d9db2[_0x3aa3f3(0xa5)](readFile,_0x52036c,_0x3d9db2['uGLao']);}catch{return![];}const _0x30527f=_0x423ab4['split'](/\r?\n/);if(_0x30527f['some'](_0x18437f=>_0x18437f['trim']()==='active-profile.txt'))return![];let _0x55c45e=_0x30527f['findIndex'](_0x138a01=>_0x138a01[_0x3aa3f3(0x9f)]()==='active-feature.txt');_0x55c45e===-0x1&&(_0x55c45e=_0x30527f['length']);_0x30527f[_0x3aa3f3(0xbc)](_0x55c45e,0x0,'active-profile.txt');let _0x4fe2ce=_0x30527f['join']('\x0a');!_0x4fe2ce['endsWith']('\x0a')&&(_0x4fe2ce+='\x0a');try{await writeFile(_0x52036c,_0x4fe2ce,'utf-8');}catch{return![];}return!![];}export async function update(){const _0x51c6c5=_0x9df0,_0x398259={'ZKIEf':function(_0x3816ff){return _0x3816ff();},'AteEG':'Checking\x20for\x20updates...','Dvndd':'Attempting\x20install\x20anyway...','zRLrU':function(_0x40ca7f){return _0x40ca7f();},'cpPHz':function(_0x911eca,_0x177ee1){return _0x911eca===_0x177ee1;},'nTKkG':'Update\x20failed.','oZBlG':function(_0x4af8a8,_0x1aa09a){return _0x4af8a8(_0x1aa09a);},'wnNFd':function(_0x1750b5,_0x22b710){return _0x1750b5(_0x22b710);},'RTbFB':_0x51c6c5(0xb4),'oLLaU':_0x51c6c5(0xbf),'GCqmi':'ranger@trailhead','fAjDz':_0x51c6c5(0xc9),'xLEsW':function(_0x518ee9,_0x465565){return _0x518ee9(_0x465565);}},_0x283b27=_0x398259['ZKIEf'](getCurrentVersion);console['log']('\x0aCurrent\x20version:\x20'+_0x283b27),console['log'](_0x398259['AteEG']);const _0x38e062=getLatestVersion();let _0x389136=_0x283b27;if(!_0x38e062['version']){console[_0x51c6c5(0x94)](_0x51c6c5(0x9e)+_0x38e062[_0x51c6c5(0xca)]),console[_0x51c6c5(0x9d)](_0x398259[_0x51c6c5(0xcb)]);const _0x533a8a=await _0x398259[_0x51c6c5(0x96)](runInstall);if(_0x533a8a)console['log']('\x0aSuccessfully\x20installed\x20latest\x20version.'),_0x389136=_0x398259[_0x51c6c5(0xba)](getCurrentVersion);else throw new Error(_0x51c6c5(0xb3)+_0x38e062[_0x51c6c5(0xca)]);}else{const _0x480dea=_0x38e062['version'];console['log']('Latest\x20version:\x20\x20'+_0x480dea);const _0x599f48=compareVersions(_0x283b27,_0x480dea);if(_0x398259['cpPHz'](_0x599f48,0x0))console['log']('\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.');else{if(_0x599f48<0x0)console['log']('\x0aYour\x20version\x20('+_0x283b27+_0x51c6c5(0xac)+_0x480dea+').');else{const _0x121d4c=await _0x398259[_0x51c6c5(0xba)](runInstall);if(_0x121d4c)console[_0x51c6c5(0x9d)](_0x51c6c5(0xcf)+_0x480dea),_0x389136=_0x480dea;else throw new Error(_0x398259[_0x51c6c5(0xc7)]);}}}await _0x398259['oZBlG'](reinstallSkills,_0x389136);const _0x81679a=await _0x398259['wnNFd'](isMarketplaceAdded,_0x398259[_0x51c6c5(0x91)]),_0x64922b=await isPluginInstalled('ranger@trailhead');_0x81679a&&(await updateClaudeMarketplace(),console['log'](_0x398259[_0x51c6c5(0xcc)]));if(_0x64922b){const _0xb10cb1=await _0x398259[_0x51c6c5(0xb7)](getPluginInfo,_0x398259[_0x51c6c5(0xd1)]);_0xb10cb1?.[_0x51c6c5(0xc2)]===_0x398259[_0x51c6c5(0x99)]?(await _0x398259['xLEsW'](updateClaudePlugin,_0x398259['fAjDz']),console['log'](_0x51c6c5(0xbb))):(await _0x398259['ZKIEf'](updateClaudePlugin),console[_0x51c6c5(0x9d)]('\x0aClaude\x20plugin\x20updated\x20(user\x20scope).'));}const _0xed4550=await migrateActiveProfileFile();_0xed4550&&console[_0x51c6c5(0x9d)]('✓\x20Migrated\x20active\x20profile\x20file');const _0x53d7dd=await ensureActiveProfileGitignored();console['log']('\x0a✅\x20Update\x20complete!');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x245ff5,_0x3b0e73){const _0x3a986f=_0x42d3,_0xa54169=_0x245ff5();while(!![]){try{const _0xb6214b=-parseInt(_0x3a986f(0x15e))/0x1+parseInt(_0x3a986f(0x153))/0x2+parseInt(_0x3a986f(0x16a))/0x3*(parseInt(_0x3a986f(0x169))/0x4)+-parseInt(_0x3a986f(0x14a))/0x5+parseInt(_0x3a986f(0x16e))/0x6*(-parseInt(_0x3a986f(0x142))/0x7)+-parseInt(_0x3a986f(0x170))/0x8+parseInt(_0x3a986f(0x161))/0x9*(parseInt(_0x3a986f(0x16b))/0xa);if(_0xb6214b===_0x3b0e73)break;else _0xa54169['push'](_0xa54169['shift']());}catch(_0x49c536){_0xa54169['push'](_0xa54169['shift']());}}}(_0x88ef,0xa8f78));import{writeFile,readFile,unlink}from'fs/promises';function _0x42d3(_0x30ae8d,_0x499a48){_0x30ae8d=_0x30ae8d-0x13f;const _0x88ef9a=_0x88ef();let _0x42d3b0=_0x88ef9a[_0x30ae8d];return _0x42d3b0;}import{join}from'path';import{existsSync}from'fs';import{chromium}from'playwright';function _0x88ef(){const _0x45ce81=['isTTY','SiuKr','\x0a✅\x20Profile\x20\x22','Saving\x20authentication\x20state...','goto','\x22\x20authentication\x20updated','✓\x20Updated\x20config:\x20','close','\x20\x20Run\x20ranger\x20setup\x20in\x20CI\x20to\x20decrypt\x20at\x20runtime.','813327bMvfhJ','Profile\x20\x22','\x20\x20Could\x20not\x20encrypt:\x20No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','3132qqIWVU','Qofdx','vAfJB','ZgRBp','stringify','uvvtQ','extraHTTPHeaders','baseUrl','12ftWLCl','905697LzUkkb','84930IBiusK','browser_auth','✓\x20Encrypted\x20auth\x20saved\x20to:\x20','512718WAbewW','eYHFL','1265720sEvnTB','Enable\x20safe\x20mode\x20and\x20try\x20again:\x20ranger\x20profile\x20config\x20set\x20','\x20\x20\x20Update\x20your\x20authentication\x20as\x20needed.','EsYLO','auth.json','string','CuiCK','\x20\x20You\x20can\x20safely\x20commit\x20this\x20file\x20to\x20git.','Config\x20not\x20found\x20at\x20','.enc','catch','98cVYvJo','\x20\x20\x20A\x20browser\x20will\x20open\x20with\x20your\x20existing\x20session\x20(if\x20any).','config_write','QCETH','setupHeaders','uSWbc','IdmNs','newPage','5478600hVekYi','log','CXlnD','\x20safeMode\x20true\x0a','Browser\x20closed\x20before\x20authentication\x20was\x20saved.','browser','contextOptions','allowInsecureLocalhost','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','188862mWQkhQ','gyaIK'];_0x88ef=function(){return _0x45ce81;};return _0x88ef();}import{encrypt}from'./utils/crypto.js';import{getToken}from'./utils/keychain.js';import{buildBrowserOptionsFromSettings,getEnvDir,isEnvCi,resolveEnvVars}from'./utils/settings.js';import{addProfileSetupBanner}from'./utils/profileSetupBanner.js';export async function updateEnv(_0x30f093,_0xc78b76,_0x13bca1){const _0x39bf56=_0x42d3,_0x106244={'RHLnz':function(_0x58d73c){return _0x58d73c();},'FEaaU':function(_0x2931ee,_0x38545f){return _0x2931ee(_0x38545f);},'SiuKr':'settings.json','eYHFL':function(_0x1ea435,_0x4358fb,_0x1a729d){return _0x1ea435(_0x4358fb,_0x1a729d);},'ppBkY':_0x39bf56(0x174),'ZgRBp':function(_0x2130eb,_0x258bc5){return _0x2130eb+_0x258bc5;},'Qofdx':_0x39bf56(0x152),'uSWbc':function(_0x44b57b,_0x3899ef){return _0x44b57b(_0x3899ef);},'gyaIK':_0x39bf56(0x16c),'EsYLO':'\x0a📋\x20Authentication\x20Update','atlNj':_0x39bf56(0x143),'wzIaH':_0x39bf56(0x172),'QCETH':'\x20\x20\x20When\x20you\x20are\x20done,\x20close\x20the\x20browser.\x0a','uvvtQ':function(_0x21518d,_0x169a31){return _0x21518d||_0x169a31;},'vAfJB':'\x0aThe\x20browser\x20closed\x20unexpectedly\x20before\x20authentication\x20could\x20be\x20saved.','oOajU':'This\x20can\x20happen\x20due\x20to\x20a\x20browser\x20compatibility\x20issue\x20on\x20some\x20systems.\x0a','CXlnD':_0x39bf56(0x14e),'oBynS':function(_0x1551d6,_0x4990e2,_0x27a635){return _0x1551d6(_0x4990e2,_0x27a635);},'AKIUV':_0x39bf56(0x15d),'IdmNs':_0x39bf56(0x144),'MVxYj':function(_0x958ae9,_0x30775c,_0x5d01b7){return _0x958ae9(_0x30775c,_0x5d01b7);}},_0x1c516=_0x106244['FEaaU'](getEnvDir,_0x30f093),_0x5b8a86=join(_0x1c516,_0x106244[_0x39bf56(0x156)]),_0x2480ca=_0x106244['eYHFL'](join,_0x1c516,_0x106244['ppBkY']),_0x382b4e=_0x106244[_0x39bf56(0x164)](_0x2480ca,_0x39bf56(0x140)),_0x58f422=process['stdin']['isTTY']&&process['stdout'][_0x39bf56(0x155)];if(!_0x58f422)throw new Error(_0x106244[_0x39bf56(0x162)]);if(!_0x106244['uSWbc'](existsSync,_0x1c516))throw new Error(_0x39bf56(0x15f)+_0x30f093+'\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x30f093);if(!existsSync(_0x5b8a86))throw new Error(_0x39bf56(0x13f)+_0x5b8a86+'.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x30f093);const _0x14d4b8=await readFile(_0x5b8a86,'utf-8'),_0x4794be=JSON['parse'](_0x14d4b8),_0x18a068=_0x106244[_0x39bf56(0x147)](resolveEnvVars,_0x4794be),_0x529eab=typeof _0x18a068[_0x39bf56(0x168)]===_0x39bf56(0x175)?_0x18a068[_0x39bf56(0x168)]:undefined,_0x260484=existsSync(_0x2480ca),_0x54450f=isEnvCi(_0x30f093);_0xc78b76?.['trackPhaseStart'](_0x106244[_0x39bf56(0x154)]),console['log'](_0x106244[_0x39bf56(0x173)]),console['log'](_0x106244['atlNj']),console[_0x39bf56(0x14b)](_0x106244['wzIaH']),console['log'](_0x106244[_0x39bf56(0x145)]);const {launchOptions:_0x197d5b,contextOptions:_0x3a0f79}=buildBrowserOptionsFromSettings(_0x18a068,{'headless':![],'storageStatePath':_0x260484?_0x2480ca:undefined});_0x18a068[_0x39bf56(0x146)]&&(_0x3a0f79[_0x39bf56(0x167)]={..._0x3a0f79['extraHTTPHeaders'],..._0x18a068['setupHeaders']});const _0x487ea3=await chromium['launch'](_0x197d5b);let _0x422378=null;try{_0x422378=await _0x487ea3['newContext'](_0x3a0f79),await addProfileSetupBanner(_0x422378);const _0x482416=await _0x422378[_0x39bf56(0x149)]();await _0x482416[_0x39bf56(0x159)](_0x106244[_0x39bf56(0x166)](_0x529eab,'about:blank'));let _0x2b958c=![];await new Promise(_0x2b6612=>{const _0x1812bf=_0x39bf56,_0x364a10={'CuiCK':function(_0x3ecf77){return _0x106244['RHLnz'](_0x3ecf77);}};_0x482416['on'](_0x1812bf(0x15c),async()=>{const _0x29153a=_0x1812bf;try{console[_0x29153a(0x14b)](_0x29153a(0x158)),await _0x422378?.['storageState']({'path':_0x2480ca}),_0x2b958c=!![];}catch{}_0x364a10[_0x29153a(0x176)](_0x2b6612);});});if(!_0x2b958c){console[_0x39bf56(0x14b)](_0x106244[_0x39bf56(0x163)]);!_0x18a068['safeMode']&&(console['log'](_0x106244['oOajU']),console[_0x39bf56(0x14b)](_0x39bf56(0x171)+_0x30f093+_0x39bf56(0x14d)));throw new Error(_0x106244[_0x39bf56(0x14c)]);}}finally{_0x422378&&await _0x422378[_0x39bf56(0x15c)]()['catch'](()=>{}),await _0x487ea3[_0x39bf56(0x15c)]()[_0x39bf56(0x141)](()=>{});}if(_0x54450f){const _0x3b57b6=await _0x106244['oBynS'](readFile,_0x2480ca,'utf-8'),_0x1c5d01=await getToken();if(!_0x1c5d01)console['error'](_0x39bf56(0x160)),console['log']('✓\x20Auth\x20state\x20saved\x20to:\x20'+_0x2480ca);else{const _0x24c185=_0x106244['oBynS'](encrypt,_0x3b57b6,_0x1c5d01);await _0x106244[_0x39bf56(0x16f)](writeFile,_0x382b4e,_0x24c185),await _0x106244['uSWbc'](unlink,_0x2480ca),console['log'](_0x39bf56(0x16d)+_0x382b4e),console['log'](_0x39bf56(0x177)),console[_0x39bf56(0x14b)](_0x106244['AKIUV']);}}else console['log']('✓\x20Auth\x20state\x20saved\x20to:\x20'+_0x2480ca);_0xc78b76?.['trackPhaseEnd'](_0x106244[_0x39bf56(0x154)]),_0xc78b76?.['trackPhaseStart'](_0x106244[_0x39bf56(0x148)]),_0x4794be['browser']=_0x4794be['browser']||{},_0x4794be['browser'][_0x39bf56(0x150)]=_0x4794be[_0x39bf56(0x14f)]['contextOptions']||{},_0x4794be[_0x39bf56(0x14f)]['contextOptions']['storageState']=_0x2480ca,_0x13bca1?.['allowInsecureLocalhost']===!![]&&(_0x4794be[_0x39bf56(0x151)]=!![]),await _0x106244['MVxYj'](writeFile,_0x5b8a86,JSON[_0x39bf56(0x165)](_0x4794be,null,0x2)),console[_0x39bf56(0x14b)](_0x39bf56(0x15b)+_0x5b8a86),_0xc78b76?.['trackPhaseEnd'](_0x106244[_0x39bf56(0x148)]),console['log'](_0x39bf56(0x157)+_0x30f093+_0x39bf56(0x15a));}
|
package/build/commands/useEnv.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0x4b51(){const _0x3c21aa=['Config\x20not\x20found\x20at\x20','\x0a✓\x20Now\x20using\x20profile\x20\x22','gSmGd','3147fVqjQU','1163504EcPqdv','3009310xrttYy','610337rpingN','244202LzAAAf','22vzJRLU','410056xjVuRY','9ORfFgG','2512115DHmvKf','30VJLRZj','754Gjouji'];_0x4b51=function(){return _0x3c21aa;};return _0x4b51();}(function(_0xed8453,_0x32d01b){const _0x10166f=_0x595e,_0xd668e0=_0xed8453();while(!![]){try{const _0xc6fad5=-parseInt(_0x10166f(0xfa))/0x1+-parseInt(_0x10166f(0x100))/0x2*(parseInt(_0x10166f(0x104))/0x3)+parseInt(_0x10166f(0xfc))/0x4+parseInt(_0x10166f(0xfe))/0x5+parseInt(_0x10166f(0xff))/0x6*(-parseInt(_0x10166f(0xf9))/0x7)+-parseInt(_0x10166f(0x105))/0x8*(-parseInt(_0x10166f(0xfd))/0x9)+parseInt(_0x10166f(0x106))/0xa*(parseInt(_0x10166f(0xfb))/0xb);if(_0xc6fad5===_0x32d01b)break;else _0xd668e0['push'](_0xd668e0['shift']());}catch(_0x3fdbf0){_0xd668e0['push'](_0xd668e0['shift']());}}}(_0x4b51,0x4387f));import{join}from'path';import{existsSync}from'fs';import{getEnvDir}from'./utils/settings.js';import{writeActiveProfileName}from'./utils/activeProfile.js';function _0x595e(_0x182277,_0x203764){_0x182277=_0x182277-0xf9;const _0x4b519a=_0x4b51();let _0x595eaa=_0x4b519a[_0x182277];return _0x595eaa;}export async function useEnv(_0x7dfce1){const _0x597506=_0x595e,_0x29f69b={'gSmGd':function(_0x193bff,_0x4344c8){return _0x193bff(_0x4344c8);}},_0x5938d4=getEnvDir(_0x7dfce1),_0x55a8b0=join(_0x5938d4,'settings.json');if(!_0x29f69b['gSmGd'](existsSync,_0x5938d4))throw new Error('Profile\x20\x22'+_0x7dfce1+'\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x7dfce1);if(!existsSync(_0x55a8b0))throw new Error(_0x597506(0x101)+_0x55a8b0+'.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x7dfce1);await _0x29f69b[_0x597506(0x103)](writeActiveProfileName,_0x7dfce1),console['log'](_0x597506(0x102)+_0x7dfce1+'\x22');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function _0x29c8(){const _0x4b95df=['GBsJy','mNCZO','151AzCFdK','utf-8','HHtnD','244ELjXHM','1440XEdmqF','2201805zREDxZ','Hhlal','2170oPTwpk','trim','RBhbP','active-profile.txt','7lXTAxR','848452kBkeTt','1104690DLdWhE','4574688hknKhi','active-env.txt','2449555tQDpAR','40bDYGYf','Gbsgv'];_0x29c8=function(){return _0x4b95df;};return _0x29c8();}const _0x99b40b=_0x995f;(function(_0xb95933,_0x1dc369){const _0x1cf029=_0x995f,_0x13bce9=_0xb95933();while(!![]){try{const _0x5593ec=parseInt(_0x1cf029(0x10f))/0x1*(parseInt(_0x1cf029(0x101))/0x2)+parseInt(_0x1cf029(0x113))/0x3*(parseInt(_0x1cf029(0x112))/0x4)+parseInt(_0x1cf029(0x10a))/0x5+-parseInt(_0x1cf029(0x107))/0x6+-parseInt(_0x1cf029(0x105))/0x7*(parseInt(_0x1cf029(0x108))/0x8)+parseInt(_0x1cf029(0x114))/0x9+parseInt(_0x1cf029(0x10b))/0xa*(parseInt(_0x1cf029(0x106))/0xb);if(_0x5593ec===_0x1dc369)break;else _0x13bce9['push'](_0x13bce9['shift']());}catch(_0x2de73a){_0x13bce9['push'](_0x13bce9['shift']());}}}(_0x29c8,0x753f8));import{existsSync}from'fs';import{mkdir,readFile,rename,unlink,writeFile}from'fs/promises';import{join}from'path';function _0x995f(_0x585b6f,_0x4ccf54){_0x585b6f=_0x585b6f-0x101;const _0x29c808=_0x29c8();let _0x995f25=_0x29c808[_0x585b6f];return _0x995f25;}import{getRangerDir}from'./rangerRoot.js';const ACTIVE_PROFILE_FILE=_0x99b40b(0x104),LEGACY_ACTIVE_ENV_FILE=_0x99b40b(0x109);function getActiveProfilePath(){const _0x4ce19d=_0x99b40b,_0x308cd3={'mNCZO':function(_0xf2c0d2,_0x4dfb36,_0x5c586e){return _0xf2c0d2(_0x4dfb36,_0x5c586e);}};return _0x308cd3[_0x4ce19d(0x10e)](join,getRangerDir(),ACTIVE_PROFILE_FILE);}function getLegacyActiveEnvPath(){return join(getRangerDir(),LEGACY_ACTIVE_ENV_FILE);}async function migrateLegacyActiveEnv(){const _0x33b350=_0x99b40b,_0x329e74={'YrJaZ':function(_0x422579){return _0x422579();},'lWygK':function(_0x526a31,_0x481cbb,_0x1accc1){return _0x526a31(_0x481cbb,_0x1accc1);},'RBhbP':function(_0x4aa9db){return _0x4aa9db();},'Hhlal':function(_0x15220f,_0x885efd,_0x3ecae2,_0x523dda){return _0x15220f(_0x885efd,_0x3ecae2,_0x523dda);},'wSOyq':_0x33b350(0x110),'QUDCk':function(_0x17921b,_0x5db3ba){return _0x17921b(_0x5db3ba);}},_0x14eefd=_0x329e74['YrJaZ'](getLegacyActiveEnvPath);if(!existsSync(_0x14eefd))return null;let _0xe6c53a=null;try{_0xe6c53a=(await readFile(_0x14eefd,'utf-8'))['trim']()||null;}catch{_0xe6c53a=null;}if(!_0xe6c53a)return null;const _0x3a57a0=getActiveProfilePath();try{await _0x329e74['lWygK'](rename,_0x14eefd,_0x3a57a0);}catch{try{const _0x2b1a22=_0x329e74[_0x33b350(0x103)](getRangerDir);await mkdir(_0x2b1a22,{'recursive':!![]}),await _0x329e74[_0x33b350(0x115)](writeFile,_0x3a57a0,_0xe6c53a,_0x329e74['wSOyq']),await _0x329e74['QUDCk'](unlink,_0x14eefd);}catch{}}return _0xe6c53a;}export async function readActiveProfileName(){const _0x468573=_0x99b40b,_0x4713e8={'sIaxh':function(_0x1e9d89,_0x184d67){return _0x1e9d89(_0x184d67);},'HHtnD':function(_0x2805c3,_0x4be995,_0x1c1a9a){return _0x2805c3(_0x4be995,_0x1c1a9a);},'Gbsgv':_0x468573(0x110)},_0x8e32a4=getActiveProfilePath();if(_0x4713e8['sIaxh'](existsSync,_0x8e32a4))try{return(await _0x4713e8[_0x468573(0x111)](readFile,_0x8e32a4,_0x4713e8[_0x468573(0x10c)]))[_0x468573(0x102)]()||null;}catch{return null;}return await migrateLegacyActiveEnv();}export async function writeActiveProfileName(_0x1557fe){const _0x30fc81=_0x99b40b,_0x12fbe3={'wpmhD':function(_0x484494){return _0x484494();},'GBsJy':function(_0x2d0858,_0x5a8a91,_0xcbdd1){return _0x2d0858(_0x5a8a91,_0xcbdd1);},'gHRsB':function(_0xcd387c){return _0xcd387c();},'yTVcp':'utf-8'},_0x23729f=_0x12fbe3['wpmhD'](getRangerDir);await _0x12fbe3[_0x30fc81(0x10d)](mkdir,_0x23729f,{'recursive':!![]});const _0x2f53ec=_0x12fbe3['gHRsB'](getActiveProfilePath);await writeFile(_0x2f53ec,_0x1557fe,_0x12fbe3['yTVcp']);const _0x3436e8=getLegacyActiveEnvPath();if(existsSync(_0x3436e8))try{await unlink(_0x3436e8);}catch{}}export async function migrateActiveProfileFile(){const _0x3dfa09={'Bnkyw':function(_0x279f99,_0x3ae716){return _0x279f99!==_0x3ae716;}},_0x136c47=await migrateLegacyActiveEnv();return _0x3dfa09['Bnkyw'](_0x136c47,null);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x491919=_0x1a14;(function(_0x44cb0e,_0x59d65e){const _0x48fbc1=_0x1a14,_0x591462=_0x44cb0e();while(!![]){try{const _0x5cfbd4=-parseInt(_0x48fbc1(0x140))/0x1+-parseInt(_0x48fbc1(0x15a))/0x2+-parseInt(_0x48fbc1(0x142))/0x3*(parseInt(_0x48fbc1(0x159))/0x4)+-parseInt(_0x48fbc1(0x144))/0x5+-parseInt(_0x48fbc1(0x13e))/0x6+-parseInt(_0x48fbc1(0x164))/0x7*(parseInt(_0x48fbc1(0x14c))/0x8)+parseInt(_0x48fbc1(0x13c))/0x9;if(_0x5cfbd4===_0x59d65e)break;else _0x591462['push'](_0x591462['shift']());}catch(_0x4a331b){_0x591462['push'](_0x591462['shift']());}}}(_0x252c,0x22a6e));import{delimiter,join}from'path';function _0x1a14(_0xf712bc,_0x272d60){_0xf712bc=_0xf712bc-0x139;const _0x252cdf=_0x252c();let _0x1a146e=_0x252cdf[_0xf712bc];return _0x1a146e;}import{tmpdir}from'os';import{mkdirSync}from'fs';import{getAiProxyUrl}from'./environment.js';const AGENT_ENV_PASSTHROUGH_KEYS=['PATH',_0x491919(0x162),_0x491919(0x143),_0x491919(0x14a),'TEMP','USERPROFILE',_0x491919(0x160),'LOCALAPPDATA','XDG_CACHE_HOME',_0x491919(0x155),_0x491919(0x165),_0x491919(0x153),'CHROME_BIN',_0x491919(0x13a),_0x491919(0x152),_0x491919(0x154),'npm_config_userconfig','NPM_CONFIG_USERCONFIG','npm_config_prefix',_0x491919(0x149),'npm_config_registry',_0x491919(0x14e),'DEBUG',_0x491919(0x148),_0x491919(0x158),'RANGER_DISABLE_MCP'],UNEXPANDED_PATH_TOKEN_PATTERNS=['${PATH}','$PATH',_0x491919(0x145)];function _0x252c(){const _0x1766d8=['PATH\x20is\x20missing\x20core\x20system\x20directories\x20like\x20`/usr/bin`\x20and\x20`/bin`.','NPM_CONFIG_REGISTRY','nNUzS','Your\x20PATH\x20looks\x20incomplete\x20for\x20browser\x20automation.\x20Ranger\x20will\x20keep\x20going,\x20but\x20browser\x20setup\x20may\x20fail.','TEMP','npm_config_cache','PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD','NPM_CONFIG_CACHE','XDG_CONFIG_HOME','PATH\x20contains\x20an\x20unexpanded\x20placeholder\x20like\x20`${PATH}`\x20instead\x20of\x20the\x20expanded\x20current\x20PATH.','byokEnabled','RANGER_TEST_SKIP_BROWSER_WAIT','4HamvON','119264heHZRg','JJBKC','PATH\x20is\x20empty,\x20so\x20npm\x20and\x20core\x20system\x20tools\x20may\x20be\x20unavailable.','Session\x20token\x20is\x20required\x20when\x20RANGER_BYOK=false','win32','length','APPDATA','sessionToken','HOME','env','1617035eRSyZd','PLAYWRIGHT_BROWSERS_PATH','string','CHROMIUM_BIN','includes','10701999PakHei','fromEntries','1373112qsDGvY','abkEn','207407CAUVbb','push','711453XKumpz','TMPDIR','415650pPkYNy','%PATH%','WXNvU','KaqtJ','NODE_ENV','NPM_CONFIG_PREFIX','TMP','filter','8PRSMnO'];_0x252c=function(){return _0x1766d8;};return _0x252c();}export function getAgentPathHealthWarning(_0x40296f,_0x53c717=process['platform']){const _0x267c09=_0x491919,_0x508ff7={'JJBKC':function(_0xe897e6,_0x5d897a){return _0xe897e6||_0x5d897a;},'abkEn':function(_0x496ba9,_0x4c63ff){return _0x496ba9===_0x4c63ff;},'nNUzS':_0x267c09(0x156),'lxNkE':_0x267c09(0x15e)},_0x27fbff=[],_0x1dd2ce=_0x508ff7[_0x267c09(0x15b)](_0x40296f,'')['split'](delimiter)['filter'](Boolean);_0x508ff7[_0x267c09(0x13f)](_0x1dd2ce['length'],0x0)&&_0x27fbff[_0x267c09(0x141)](_0x267c09(0x15c));UNEXPANDED_PATH_TOKEN_PATTERNS['some'](_0x12574b=>(_0x40296f||'')[_0x267c09(0x13b)](_0x12574b))&&_0x27fbff[_0x267c09(0x141)](_0x508ff7[_0x267c09(0x14f)]);if(_0x53c717!==_0x508ff7['lxNkE']){const _0x1a1ccf=_0x1dd2ce['includes']('/usr/bin'),_0x789ad0=_0x1dd2ce['includes']('/bin');!_0x1a1ccf&&!_0x789ad0&&_0x27fbff[_0x267c09(0x141)](_0x267c09(0x14d));}if(_0x27fbff[_0x267c09(0x15f)]===0x0)return null;return{'summary':_0x267c09(0x150),'issues':_0x27fbff};}export function buildAgentEnv(_0x1d9791){const _0x5a15f8=_0x491919,_0x291f64={'TCLfK':_0x5a15f8(0x15d),'lNVYE':'TMPDIR','zbxuY':_0x5a15f8(0x14a),'WXNvU':_0x5a15f8(0x151),'KaqtJ':'ranger-claude-tmp'};if(_0x1d9791[_0x5a15f8(0x157)])return Object[_0x5a15f8(0x13d)](Object['entries'](process[_0x5a15f8(0x163)])[_0x5a15f8(0x14b)](_0x4a5f91=>typeof _0x4a5f91[0x1]===_0x5a15f8(0x139)));if(!_0x1d9791[_0x5a15f8(0x161)])throw new Error(_0x291f64['TCLfK']);const _0x1ad954={'ANTHROPIC_API_KEY':_0x1d9791[_0x5a15f8(0x161)],'ANTHROPIC_BASE_URL':getAiProxyUrl()};for(const _0x3be27b of AGENT_ENV_PASSTHROUGH_KEYS){const _0x3724ae=process['env'][_0x3be27b];_0x3724ae&&![_0x291f64['lNVYE'],_0x291f64['zbxuY'],_0x291f64['WXNvU']]['includes'](_0x3be27b)&&(_0x1ad954[_0x3be27b]=_0x3724ae);}const _0x14337e=join(tmpdir(),_0x291f64[_0x5a15f8(0x147)]);try{mkdirSync(_0x14337e,{'recursive':!![]});}catch{}return _0x1ad954['TMPDIR']=_0x14337e,_0x1ad954['TMP']=_0x14337e,_0x1ad954[_0x291f64[_0x5a15f8(0x146)]]=_0x14337e,_0x1ad954;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x2b4718,_0x3dfe79){const _0x4117f5=_0x59a1,_0x40dbad=_0x2b4718();while(!![]){try{const _0x395d70=-parseInt(_0x4117f5(0x16b))/0x1+-parseInt(_0x4117f5(0x165))/0x2*(parseInt(_0x4117f5(0x126))/0x3)+-parseInt(_0x4117f5(0x14c))/0x4+parseInt(_0x4117f5(0x171))/0x5+-parseInt(_0x4117f5(0x17d))/0x6+parseInt(_0x4117f5(0x15e))/0x7*(-parseInt(_0x4117f5(0x166))/0x8)+parseInt(_0x4117f5(0x160))/0x9;if(_0x395d70===_0x3dfe79)break;else _0x40dbad['push'](_0x40dbad['shift']());}catch(_0x50ee2b){_0x40dbad['push'](_0x40dbad['shift']());}}}(_0x41e7,0x75184));const _0x1e05f4=(function(){const _0x3516f5=_0x59a1,_0x109870={'cgqaU':function(_0x2b7d1e,_0x15c21e,_0x5daffb,_0x574e6f){return _0x2b7d1e(_0x15c21e,_0x5daffb,_0x574e6f);},'JOfER':_0x3516f5(0x157),'qViru':'iGpKn'};let _0x4a515c=!![];return function(_0x2f9d01,_0x184f90){const _0x18c250=_0x3516f5,_0x44795f={'nyyXp':function(_0x44262c,_0x417c4f,_0x382062,_0x54588b){return _0x109870['cgqaU'](_0x44262c,_0x417c4f,_0x382062,_0x54588b);},'LvUVF':_0x109870['JOfER'],'BFUrU':_0x109870[_0x18c250(0x12f)]},_0x459599=_0x4a515c?function(){const _0x5eea06=_0x18c250;if(_0x44795f[_0x5eea06(0x189)]!==_0x44795f[_0x5eea06(0x189)])return _0x44795f[_0x5eea06(0x13d)](_0x4c990f,_0x441032,_0x2639b8,_0x44795f[_0x5eea06(0x17c)]);else{if(_0x184f90){const _0x2ce2fe=_0x184f90[_0x5eea06(0x132)](_0x2f9d01,arguments);return _0x184f90=null,_0x2ce2fe;}}}:function(){};return _0x4a515c=![],_0x459599;};}()),_0x268c5b=_0x1e05f4(this,function(){const _0x36a857=_0x59a1,_0x527892={'bRmKl':_0x36a857(0x154)};return _0x268c5b[_0x36a857(0x172)]()['search'](_0x527892[_0x36a857(0x162)])[_0x36a857(0x172)]()[_0x36a857(0x152)](_0x268c5b)[_0x36a857(0x16a)](_0x36a857(0x154));});_0x268c5b();import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{createHash}from'crypto';import{withRetry}from'./retry.js';export async function createBrowserSession(_0x35ba45){const _0xde4849=_0x59a1,_0x405ec3={'RtzvV':function(_0x12ee04){return _0x12ee04();},'hGedz':function(_0x3a7384,_0x1f288d,_0x2d20a3){return _0x3a7384(_0x1f288d,_0x2d20a3);},'zVmLG':_0xde4849(0x178),'MNhbk':_0xde4849(0x164),'aSWTH':function(_0x5428cc,_0x59897b){return _0x5428cc===_0x59897b;},'zkOEf':_0xde4849(0x190),'LBBVp':'LWXNK'},_0x2cd4e5=await _0x405ec3['RtzvV'](getToken);if(!_0x2cd4e5)throw new Error(_0xde4849(0x163));const _0x292800=getApiBaseUrl(),_0x5675d9=await _0x405ec3['hGedz'](fetch,_0x292800+_0xde4849(0x123),{'method':_0x405ec3[_0xde4849(0x139)],'headers':{'Authorization':'Bearer\x20'+_0x2cd4e5,'Content-Type':_0x405ec3[_0xde4849(0x150)]},'body':JSON[_0xde4849(0x17e)]({'environmentName':_0x35ba45?.['environmentName'],'settings':_0x35ba45?.[_0xde4849(0x134)],'task':_0x35ba45?.[_0xde4849(0x170)],'url':_0x35ba45?.[_0xde4849(0x124)],'featureId':_0x35ba45?.[_0xde4849(0x13f)],'checklistItemId':_0x35ba45?.[_0xde4849(0x155)]})});if(!_0x5675d9['ok']){if(_0x405ec3[_0xde4849(0x182)](_0x405ec3[_0xde4849(0x161)],_0x405ec3['LBBVp'])){const _0x1db774=_0x110266?function(){if(_0x53ebf1){const _0x58676b=_0x42e81c['apply'](_0x219995,arguments);return _0x1fb02f=null,_0x58676b;}}:function(){};return _0x3dd759=![],_0x1db774;}else{const _0x53db89=await _0x5675d9['text']();throw new Error('Failed\x20to\x20create\x20browser\x20session:\x20'+_0x53db89);}}return _0x5675d9[_0xde4849(0x175)]();}export async function updateBrowserSession(_0x284a55,_0x434ce3){const _0x5cce5f=_0x59a1,_0x477412={'BgxBD':function(_0x155348,_0x387145,_0x5e39d1,_0x528576){return _0x155348(_0x387145,_0x5e39d1,_0x528576);},'rOWLc':_0x5cce5f(0x18a),'IavUk':function(_0x4f3c3e){return _0x4f3c3e();},'hnHIO':_0x5cce5f(0x163),'IHJxf':_0x5cce5f(0x151),'OWjuM':'application/json','bFRFS':function(_0x2e2538,_0x2c4b9b){return _0x2e2538!==_0x2c4b9b;},'TLUzS':'YxoOG','QEmYs':_0x5cce5f(0x191),'KpJHg':function(_0x36c74f,_0x1e3e9c,_0x1aaaec){return _0x36c74f(_0x1e3e9c,_0x1aaaec);}};return _0x477412[_0x5cce5f(0x141)](withRetry,async()=>{const _0x4a2a24=_0x5cce5f,_0x814b63=await _0x477412[_0x4a2a24(0x13c)](getToken);if(!_0x814b63)throw new Error(_0x477412[_0x4a2a24(0x13b)]);const _0x1063d4=getApiBaseUrl(),_0x116542=await fetch(_0x1063d4+_0x4a2a24(0x14b)+_0x284a55,{'method':_0x477412[_0x4a2a24(0x18f)],'headers':{'Authorization':_0x4a2a24(0x125)+_0x814b63,'Content-Type':_0x477412['OWjuM']},'body':JSON[_0x4a2a24(0x17e)](_0x434ce3)});if(!_0x116542['ok']){if(_0x477412['bFRFS'](_0x477412[_0x4a2a24(0x16d)],_0x477412[_0x4a2a24(0x135)])){const _0x274f87=await _0x116542[_0x4a2a24(0x159)]();throw new Error(_0x4a2a24(0x13a)+_0x274f87);}else return _0x477412[_0x4a2a24(0x130)](_0x340a93,_0x461109,_0x51f264,_0x477412['rOWLc']);}return _0x116542[_0x4a2a24(0x175)]();},{'label':_0x5cce5f(0x149)});}export async function getBrowserSession(_0x84b270){const _0x4b08db=_0x59a1,_0x391038={'vNEoo':function(_0x2dc2a1){return _0x2dc2a1();},'SMzwx':function(_0x12998f,_0x1c4a25,_0x54cb7f){return _0x12998f(_0x1c4a25,_0x54cb7f);},'wSGtV':'GET'},_0x2ead1b=await getToken();if(!_0x2ead1b)throw new Error(_0x4b08db(0x163));const _0x36b1d1=_0x391038['vNEoo'](getApiBaseUrl),_0x4c19a3=await _0x391038[_0x4b08db(0x153)](fetch,_0x36b1d1+'/api/v1/mcp/browser-sessions/'+_0x84b270,{'method':_0x391038[_0x4b08db(0x138)],'headers':{'Authorization':_0x4b08db(0x125)+_0x2ead1b}});if(!_0x4c19a3['ok']){const _0x264589=await _0x4c19a3['text']();throw new Error(_0x4b08db(0x131)+_0x264589);}return _0x4c19a3['json']();}export async function getUploadUrls(_0x539dec,_0x51c304,_0x2151ed,_0x59f6bd){const _0x62d330=_0x59a1,_0x28ce79={'KVqhm':function(_0x3c72e5){return _0x3c72e5();},'xsskK':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','lfXMV':_0x62d330(0x178),'mZaGg':_0x62d330(0x164),'kEqds':function(_0x5174c0,_0x204a29){return _0x5174c0!==_0x204a29;},'JNWrF':function(_0x5e1286,_0x56fad1){return _0x5e1286!==_0x56fad1;}},_0x13df77=await _0x28ce79[_0x62d330(0x146)](getToken);if(!_0x13df77)throw new Error(_0x28ce79[_0x62d330(0x18e)]);const _0x472ffc=getApiBaseUrl(),_0x56bf1c=await fetch(_0x472ffc+_0x62d330(0x14b)+_0x539dec+_0x62d330(0x17a),{'method':_0x28ce79[_0x62d330(0x15d)],'headers':{'Authorization':'Bearer\x20'+_0x13df77,'Content-Type':_0x28ce79[_0x62d330(0x136)]},'body':JSON[_0x62d330(0x17e)]({'filename':_0x51c304,'filetype':_0x2151ed,..._0x28ce79['kEqds'](_0x59f6bd?.[_0x62d330(0x15b)],undefined)&&{'size':_0x59f6bd[_0x62d330(0x15b)]},..._0x59f6bd?.[_0x62d330(0x18c)]!==undefined&&{'checksum':_0x59f6bd[_0x62d330(0x18c)]},..._0x28ce79['JNWrF'](_0x59f6bd?.[_0x62d330(0x14a)],undefined)&&{'metadata':_0x59f6bd[_0x62d330(0x14a)]}})});if(!_0x56bf1c['ok']){const _0x55a9b2=await _0x56bf1c[_0x62d330(0x159)]();throw new Error(_0x62d330(0x15f)+_0x55a9b2);}return _0x56bf1c[_0x62d330(0x175)]();}export async function uploadFile(_0x1ac187,_0x33d724,_0x159712){const _0x3461c1=_0x59a1,_0x2c6c48={'yePiK':function(_0x2a433e,_0x430832,_0x4558c9){return _0x2a433e(_0x430832,_0x4558c9);}},_0x122b86=await _0x2c6c48[_0x3461c1(0x194)](fetch,_0x1ac187,{'method':_0x3461c1(0x14d),'headers':{'Content-Type':_0x159712,'Content-Length':_0x33d724['length'][_0x3461c1(0x172)]()},'body':_0x33d724});if(!_0x122b86['ok']){const _0x268ebc=await _0x122b86[_0x3461c1(0x159)]();throw new Error('Failed\x20to\x20upload\x20file:\x20'+_0x268ebc);}}export async function uploadTrace(_0x3d0cc0,_0x1e1342){const _0x1f0596=_0x59a1,_0x56f8f8={'UMKtf':function(_0x471566,_0x3a3493,_0x5c78fc,_0x4978c5){return _0x471566(_0x3a3493,_0x5c78fc,_0x4978c5);},'CvquF':_0x1f0596(0x18a)};return _0x56f8f8[_0x1f0596(0x17f)](uploadFile,_0x3d0cc0,_0x1e1342,_0x56f8f8['CvquF']);}export async function uploadConversation(_0x348134,_0x388ac1){const _0x340167=_0x59a1,_0x32ada5={'MAvWi':_0x340167(0x184)};return uploadFile(_0x348134,_0x388ac1,_0x32ada5[_0x340167(0x129)]);}function _0x41e7(){const _0x3ea2e3=['EwvqAuS','l2fWAs92ms9Ty3aVyNjVD3nLCI1ZzxnZAw9UCW','DxjS','qMvHCMvYia','odK4ogffru5RzG','C2vZC2LVBLrVA2vU','qLDqvgS','tuf2v2K','vw5HvNy','l2fWAs92ms9Ty3aVChjVEhKTC2vZC2LVBG','q2rzrvu','wgzcwey','DeHqsee','CvzPCNu','qMD4qKq','rMfPBgvKihrVigDLDcbICM93C2vYihnLC3nPB246ia','yxbWBhK','u1vntwO','C2v0DgLUz3m','uuvTwxm','BvPHr2C','CLLADgO','D1nhDfy','ELzTteC','rMfPBgvKihrVihvWzgf0zsbICM93C2vYihnLC3nPB246ia','Ag5isu8','swf2vwS','BNL5wha','rMfPBgvKihrVignYzwf0zsb2zxjPzMLJyxrPB24GC3rLCdOG','zMvHDhvYzuLK','yujSteO','s3bksgC','EK5dzLq','sfjmD2e','tLrXwhu','vhDcExC','s1zXAg0','r2XVqu0','DK12vhC','DxbKyxrLqNjVD3nLCLnLC3nPB24','Bwv0ywrHDge','l2fWAs92ms9Ty3aVyNjVD3nLCI1ZzxnZAw9UCY8','otaZodm2EvrwwNzg','ufvu','tgjyqvO','DxbKyxrL','tu5OyMS','uefuq0G','y29UC3rYDwn0B3i','u016D3G','kcGOlISPkYKRksSK','y2HLy2TSAxn0sxrLBuLK','q3nhtM4','DMLKzw8VD2vIBq','thbKvNK','Dgv4Da','ug9uExi','C2L6zq','t1vQDxi','Bgzytvy','mte5yLPJqLn0','rMfPBgvKihrVigDLDcb1CgXVywqGvvjmCZOG','mtuXodm0ntbUCeHPvuC','EMTprwy','yLjTs2W','tM8GqvbjihrVA2vUignVBMzPz3vYzwqUifj1BJOGCMfUz2vYihnLDhvWifT0B2TLBL0','yxbWBgLJyxrPB24VANnVBG','mte2B3zZv25M','mZy2mZq0C2XlCLDM','z2P0zxG','twvYtNO','rgHrt2u','C2vHCMnO','ndm5mZa2tgHXwfbj','r0vu','veXvELm','yunWueq','l3n0zxbZ','DgfZAW','mJa1odC0mgjsD3jUDa','Dg9tDhjPBMC','s3HLrKG','Ahr0Chm6lY90CMfJzs5WBgf5D3jPz2H0lMrLDI8/DhjHy2u9','ANnVBG','BLfNBvm','zwDWA20','ue9tva','wfflC00','l3vWBg9Hzc11CMXZ','v01Ts0u','thzvvKy','otK4nhHNsKrZCG','C3rYAw5NAwz5','vu1lDgy','rMfPBgvKihrVihvWzgf0zsb2zxjPzMLJyxrPB24GC3rLCdOG','teHvu1y','yvnxveG','l3n0zxbZlW','yxbWBgLJyxrPB24VANnVBMW','t3PXzKK','u2rbD2K','rMfPBgvKihrVignYzwf0zsbZDgvWigfZC2v0oIa','yMfZzty0','qKzvCLu','yxbWBgLJyxrPB24VEMLW','zgLNzxn0','y2HLy2TZDw0','ruP6suG','EhnZA0S','suHkEgy','DLPUEg4','vwToCeC','EwDuwxa','l2fZC2v0CW'];_0x41e7=function(){return _0x3ea2e3;};return _0x41e7();}export async function uploadScreenshot(_0x200866,_0x2892c0){const _0x214121=_0x59a1,_0x46d4f3={'OUjur':function(_0x49c374,_0x12090f,_0x51eb01,_0x294a0d){return _0x49c374(_0x12090f,_0x51eb01,_0x294a0d);},'fhaKE':'image/png'};return _0x46d4f3[_0x214121(0x15c)](uploadFile,_0x200866,_0x2892c0,_0x46d4f3['fhaKE']);}export async function uploadVideo(_0x337ced,_0x573edd){const _0x390bc2=_0x59a1,_0x2f12fd={'AmVHz':function(_0x1d6209,_0x5c74cf,_0xee3fb5,_0x19fc92){return _0x1d6209(_0x5c74cf,_0xee3fb5,_0x19fc92);},'nQgmS':'video/webm'};return _0x2f12fd['AmVHz'](uploadFile,_0x337ced,_0x573edd,_0x2f12fd[_0x390bc2(0x176)]);}export function buildTraceViewerUrl(_0x4cba28){const _0x1bf185=_0x59a1,_0x567864={'HRLwa':function(_0x3e4d86,_0x2d0114){return _0x3e4d86(_0x2d0114);}},_0x413e52=_0x567864[_0x1bf185(0x143)](encodeURIComponent,_0x4cba28);return _0x1bf185(0x174)+_0x413e52;}function _0x59a1(_0xaebd7e,_0x95fd8e){_0xaebd7e=_0xaebd7e-0x123;const _0x4fbd59=_0x41e7();let _0x268c5b=_0x4fbd59[_0xaebd7e];if(_0x59a1['AFsJLH']===undefined){var _0x1e05f4=function(_0x56c7c4){const _0x31bcde='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x561fab='',_0x41d5ce='',_0x39433f=_0x561fab+_0x1e05f4;for(let _0x2e22d5=0x0,_0x3ff4cb,_0x260ba2,_0x4fcefe=0x0;_0x260ba2=_0x56c7c4['charAt'](_0x4fcefe++);~_0x260ba2&&(_0x3ff4cb=_0x2e22d5%0x4?_0x3ff4cb*0x40+_0x260ba2:_0x260ba2,_0x2e22d5++%0x4)?_0x561fab+=_0x39433f['charCodeAt'](_0x4fcefe+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x3ff4cb>>(-0x2*_0x2e22d5&0x6)):_0x2e22d5:0x0){_0x260ba2=_0x31bcde['indexOf'](_0x260ba2);}for(let _0x3bbebc=0x0,_0x447e2f=_0x561fab['length'];_0x3bbebc<_0x447e2f;_0x3bbebc++){_0x41d5ce+='%'+('00'+_0x561fab['charCodeAt'](_0x3bbebc)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x41d5ce);};_0x59a1['SzVRvY']=_0x1e05f4,_0x59a1['Eroqky']={},_0x59a1['AFsJLH']=!![];}const _0x41e70d=_0x4fbd59[0x0],_0x59a1f1=_0xaebd7e+_0x41e70d,_0x18bb10=_0x59a1['Eroqky'][_0x59a1f1];if(!_0x18bb10){const _0x110266=function(_0x1ae62b){this['mVfexm']=_0x1ae62b,this['LBcpzK']=[0x1,0x0,0x0],this['uTJvgc']=function(){return'newState';},this['GCXade']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['NfZDIh']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x110266['prototype']['uzxENy']=function(){const _0x43d06c=new RegExp(this['GCXade']+this['NfZDIh']),_0x1a1daf=_0x43d06c['test'](this['uTJvgc']['toString']())?--this['LBcpzK'][0x1]:--this['LBcpzK'][0x0];return this['powwex'](_0x1a1daf);},_0x110266['prototype']['powwex']=function(_0x278a46){if(!Boolean(~_0x278a46))return _0x278a46;return this['SGlsVT'](this['mVfexm']);},_0x110266['prototype']['SGlsVT']=function(_0x3dd759){for(let _0x53ebf1=0x0,_0x6152d4=this['LBcpzK']['length'];_0x53ebf1<_0x6152d4;_0x53ebf1++){this['LBcpzK']['push'](Math['round'](Math['random']())),_0x6152d4=this['LBcpzK']['length'];}return _0x3dd759(this['LBcpzK'][0x0]);},new _0x110266(_0x59a1)['uzxENy'](),_0x268c5b=_0x59a1['SzVRvY'](_0x268c5b),_0x59a1['Eroqky'][_0x59a1f1]=_0x268c5b;}else _0x268c5b=_0x18bb10;return _0x268c5b;}export async function getProxySessionToken(){const _0x393190=_0x59a1,_0xeabf40={'egpkm':_0x393190(0x163),'LbXAZ':'zLBLJ','rYZtj':function(_0x4df14f){return _0x4df14f();},'dgXeV':function(_0x2144bc,_0x3d209e,_0x12ca85){return _0x2144bc(_0x3d209e,_0x12ca85);},'mcFKc':_0x393190(0x178)},_0x5c3f23=await getToken();if(!_0x5c3f23){if(_0xeabf40[_0x393190(0x14e)]===_0xeabf40[_0x393190(0x14e)])throw new Error(_0xeabf40[_0x393190(0x177)]);else throw new _0x3e64dd(_0xeabf40[_0x393190(0x177)]);}const _0x501fa2=_0xeabf40[_0x393190(0x137)](getApiBaseUrl),_0x5c580a=await _0xeabf40['dgXeV'](fetch,_0x501fa2+_0x393190(0x12b),{'method':_0xeabf40['mcFKc'],'headers':{'Authorization':_0x393190(0x125)+_0x5c3f23}});if(!_0x5c580a['ok']){const _0x399229=await _0x5c580a[_0x393190(0x159)]();throw new Error('Failed\x20to\x20get\x20proxy\x20session\x20token:\x20'+_0x399229);}const _0x355f2a=await _0x5c580a[_0x393190(0x175)]();return _0x355f2a[_0x393190(0x127)];}export function computeChecksum(_0x9a2ace){const _0xa962e5=_0x59a1,_0x3a9110={'MerNz':'md5'};return createHash(_0x3a9110[_0xa962e5(0x168)])[_0xa962e5(0x14f)](_0x9a2ace)[_0xa962e5(0x18b)](_0xa962e5(0x188));}export async function createVerificationStep(_0x2bce3d,_0x121279){const _0x1516e6=_0x59a1,_0x3bdcdd={'GloAM':_0x1516e6(0x163),'KxeFH':function(_0x13ef37){return _0x13ef37();},'UnaVv':function(_0x190fe0,_0x78c8ef){return _0x190fe0!==_0x78c8ef;},'XQKsM':_0x1516e6(0x167),'PoTyr':function(_0x447fc6){return _0x447fc6();},'tHPHA':_0x1516e6(0x164),'sMujB':'ZfqfT','DhQOe':_0x1516e6(0x158)},_0x3a9b51=await _0x3bdcdd[_0x1516e6(0x173)](getToken);if(!_0x3a9b51){if(_0x3bdcdd[_0x1516e6(0x12a)](_0x1516e6(0x167),_0x3bdcdd[_0x1516e6(0x179)]))throw new _0x4231fe(_0x3bdcdd[_0x1516e6(0x147)]);else throw new Error(_0x3bdcdd[_0x1516e6(0x147)]);}const _0x4ffae7=_0x3bdcdd[_0x1516e6(0x15a)](getApiBaseUrl),_0x48fa33=await fetch(_0x4ffae7+_0x1516e6(0x14b)+_0x2bce3d+_0x1516e6(0x16f),{'method':'POST','headers':{'Authorization':_0x1516e6(0x125)+_0x3a9b51,'Content-Type':_0x3bdcdd[_0x1516e6(0x12e)]},'body':JSON[_0x1516e6(0x17e)](_0x121279)});if(!_0x48fa33['ok']){if(_0x3bdcdd['sMujB']!==_0x3bdcdd[_0x1516e6(0x169)]){const _0x3860ac=await _0x48fa33[_0x1516e6(0x159)]();throw new Error(_0x1516e6(0x13e)+_0x3860ac);}else throw new _0x2c66be(_0x3bdcdd[_0x1516e6(0x147)]);}return _0x48fa33[_0x1516e6(0x175)]();}export async function createStepAsset(_0x52ec2f,_0x3eba2a,_0x4cba90){const _0x218da6=_0x59a1,_0xb7a901={'SdAwi':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','NTqXu':function(_0x25a051){return _0x25a051();},'CsGNn':_0x218da6(0x192),'euLZT':_0x218da6(0x142),'aBlLJ':function(_0x4899ca){return _0x4899ca();},'TwByw':function(_0x42e997,_0x27e27c,_0x5d3026){return _0x42e997(_0x27e27c,_0x5d3026);},'dHnum':_0x218da6(0x178),'vMvTw':_0x218da6(0x164)},_0x479a09=await _0xb7a901[_0x218da6(0x144)](getToken);if(!_0x479a09){if(_0xb7a901[_0x218da6(0x156)]!==_0xb7a901['euLZT'])throw new Error(_0xb7a901[_0x218da6(0x186)]);else throw new _0x36a8d7(_0xb7a901[_0x218da6(0x186)]);}const _0x1d0e49=_0xb7a901[_0x218da6(0x140)](getApiBaseUrl),_0x331dd4=await _0xb7a901[_0x218da6(0x145)](fetch,_0x1d0e49+'/api/v1/mcp/browser-sessions/'+_0x52ec2f+_0x218da6(0x183)+_0x3eba2a+_0x218da6(0x193),{'method':_0xb7a901['dHnum'],'headers':{'Authorization':_0x218da6(0x125)+_0x479a09,'Content-Type':_0xb7a901[_0x218da6(0x148)]},'body':JSON[_0x218da6(0x17e)](_0x4cba90)});if(!_0x331dd4['ok']){const _0x2790cf=await _0x331dd4['text']();throw new Error(_0x218da6(0x187)+_0x2790cf);}return _0x331dd4[_0x218da6(0x175)]();}export async function updateVerificationStep(_0x376d7a,_0x35bd22,_0x517569){const _0x1465f9=_0x59a1,_0x1239e1={'LHUSV':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','pGcdR':function(_0xe40f01){return _0xe40f01();},'UnzZZ':function(_0xccd4dc,_0x304725,_0x4eceb5){return _0xccd4dc(_0x304725,_0x4eceb5);},'iOiVl':'application/json','BWPTk':function(_0x446195,_0x1ff5f6){return _0x446195!==_0x1ff5f6;},'WMmKE':'jaydZ'},_0x4cd35a=await getToken();if(!_0x4cd35a)throw new Error(_0x1239e1[_0x1465f9(0x181)]);const _0x34ce66=_0x1239e1['pGcdR'](getApiBaseUrl),_0x47cc51=await _0x1239e1['UnzZZ'](fetch,_0x34ce66+_0x1465f9(0x14b)+_0x376d7a+_0x1465f9(0x183)+_0x35bd22,{'method':_0x1465f9(0x151),'headers':{'Authorization':'Bearer\x20'+_0x4cd35a,'Content-Type':_0x1239e1['iOiVl']},'body':JSON[_0x1465f9(0x17e)](_0x517569)});if(!_0x47cc51['ok']){if(_0x1239e1[_0x1465f9(0x128)](_0x1465f9(0x12c),_0x1239e1[_0x1465f9(0x17b)])){const _0x168790=await _0x47cc51[_0x1465f9(0x159)]();throw new Error(_0x1465f9(0x180)+_0x168790);}else throw new _0x4af374(_0x1239e1['LHUSV']);}}export async function getBrowserSessionSteps(_0x179c03){const _0x199f19=_0x59a1,_0x230827={'EJzIH':function(_0x595ae9,_0x1d62d5,_0x4913e2,_0x7a3a49){return _0x595ae9(_0x1d62d5,_0x4913e2,_0x7a3a49);},'SUMMj':'application/jsonl','IYdGz':function(_0x4e113c){return _0x4e113c();},'OzqfI':_0x199f19(0x163),'tqZoX':function(_0xdfbbc2){return _0xdfbbc2();},'XfBXF':function(_0x22203d,_0x26e85c){return _0x22203d===_0x26e85c;},'owSpU':'ymorY','aCpPD':'YgDWH'},_0x29ce95=await _0x230827['IYdGz'](getToken);if(!_0x29ce95)throw new Error(_0x230827[_0x199f19(0x185)]);const _0x317545=_0x230827['tqZoX'](getApiBaseUrl),_0x296f8e=await fetch(_0x317545+'/api/v1/mcp/browser-sessions/'+_0x179c03+'/steps',{'method':_0x199f19(0x16c),'headers':{'Authorization':_0x199f19(0x125)+_0x29ce95}});if(!_0x296f8e['ok']){if(_0x230827[_0x199f19(0x12d)](_0x230827['owSpU'],_0x230827[_0x199f19(0x16e)]))return _0x230827[_0x199f19(0x18d)](_0x50d9db,_0x34b29c,_0x445b4f,_0x230827[_0x199f19(0x133)]);else{const _0x56588b=await _0x296f8e[_0x199f19(0x159)]();throw new Error('Failed\x20to\x20get\x20browser\x20session\x20steps:\x20'+_0x56588b);}}return _0x296f8e[_0x199f19(0x175)]();}
|
|
1
|
+
(function(_0x24005a,_0x4afc79){const _0x59a428=_0x1fd8,_0x20aacf=_0x24005a();while(!![]){try{const _0x5aa4c3=parseInt(_0x59a428(0x191))/0x1*(parseInt(_0x59a428(0x138))/0x2)+-parseInt(_0x59a428(0x144))/0x3+-parseInt(_0x59a428(0x169))/0x4+-parseInt(_0x59a428(0x14e))/0x5+parseInt(_0x59a428(0x15f))/0x6*(parseInt(_0x59a428(0x121))/0x7)+parseInt(_0x59a428(0x124))/0x8*(parseInt(_0x59a428(0x174))/0x9)+parseInt(_0x59a428(0x13a))/0xa;if(_0x5aa4c3===_0x4afc79)break;else _0x20aacf['push'](_0x20aacf['shift']());}catch(_0x3b6197){_0x20aacf['push'](_0x20aacf['shift']());}}}(_0x1ae3,0x1e061));const _0x3e70d3=(function(){const _0x336a72=_0x1fd8,_0x140491={'vihwQ':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','rzNAG':function(_0x304c7b,_0xdc7fe5){return _0x304c7b===_0xdc7fe5;},'DGjcT':_0x336a72(0x129)};let _0x5414eb=!![];return function(_0x297e2f,_0x47c669){const _0x49238b=_0x5414eb?function(){const _0x18e8f8=_0x1fd8,_0x10160b={'ajiHp':_0x140491[_0x18e8f8(0x173)]};if(_0x140491[_0x18e8f8(0x135)]('xZuxN',_0x140491['DGjcT']))throw new _0x1fcf82(_0x10160b[_0x18e8f8(0x110)]);else{if(_0x47c669){const _0x4ca4d1=_0x47c669[_0x18e8f8(0x184)](_0x297e2f,arguments);return _0x47c669=null,_0x4ca4d1;}}}:function(){};return _0x5414eb=![],_0x49238b;};}()),_0x5a7328=_0x3e70d3(this,function(){const _0x704da2=_0x1fd8,_0x579f96={'fRMmG':_0x704da2(0x14a)};return _0x5a7328[_0x704da2(0x16f)]()['search'](_0x579f96['fRMmG'])[_0x704da2(0x16f)]()[_0x704da2(0x175)](_0x5a7328)['search'](_0x579f96[_0x704da2(0x16d)]);});_0x5a7328();import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{createHash}from'crypto';import{withRetry}from'./retry.js';export async function createBrowserSession(_0x511358){const _0x373040=_0x1fd8,_0x3c7a0a={'wihah':_0x373040(0x163),'qPWvX':function(_0x18640d){return _0x18640d();},'bEvqy':function(_0x5ba5a9,_0x3ae824,_0x5195fe){return _0x5ba5a9(_0x3ae824,_0x5195fe);},'LgqxR':'POST','wfUtC':_0x373040(0x17b)},_0x22b950=await getToken();if(!_0x22b950)throw new Error(_0x3c7a0a['wihah']);const _0x3a865f=_0x3c7a0a[_0x373040(0x18c)](getApiBaseUrl),_0x5333f5=await _0x3c7a0a[_0x373040(0x136)](fetch,_0x3a865f+_0x373040(0x134),{'method':_0x3c7a0a[_0x373040(0x14f)],'headers':{'Authorization':_0x373040(0x185)+_0x22b950,'Content-Type':_0x3c7a0a[_0x373040(0x164)]},'body':JSON[_0x373040(0x16b)]({'environmentName':_0x511358?.[_0x373040(0x15c)],'settings':_0x511358?.[_0x373040(0x14d)],'task':_0x511358?.[_0x373040(0x171)],'url':_0x511358?.[_0x373040(0x111)],'featureId':_0x511358?.['featureId'],'checklistItemId':_0x511358?.[_0x373040(0x180)]})});if(!_0x5333f5['ok']){const _0x5d3d84=await _0x5333f5['text']();throw new Error(_0x373040(0x11f)+_0x5d3d84);}return _0x5333f5[_0x373040(0x17a)]();}export async function updateBrowserSession(_0x43d17a,_0x557027){const _0x5e5b1b=_0x1fd8,_0x54d7cc={'MjzOd':_0x5e5b1b(0x163),'kpqtx':function(_0x1a7450,_0x437b38){return _0x1a7450===_0x437b38;},'ZoiWI':_0x5e5b1b(0x15e),'XqpEu':_0x5e5b1b(0x165),'WwJvs':function(_0x67bb79){return _0x67bb79();},'ZHxDY':_0x5e5b1b(0x17b),'YwQzv':function(_0x53e5c2,_0x2abe3d,_0x25c2d7){return _0x53e5c2(_0x2abe3d,_0x25c2d7);}};return _0x54d7cc[_0x5e5b1b(0x155)](withRetry,async()=>{const _0x161d03=_0x5e5b1b;if(_0x54d7cc[_0x161d03(0x182)](_0x54d7cc[_0x161d03(0x157)],_0x54d7cc[_0x161d03(0x12d)]))throw new _0x3489d2(_0x54d7cc[_0x161d03(0x119)]);else{const _0x382f8a=await _0x54d7cc[_0x161d03(0x189)](getToken);if(!_0x382f8a)throw new Error(_0x54d7cc['MjzOd']);const _0x254781=_0x54d7cc[_0x161d03(0x189)](getApiBaseUrl),_0x2f7553=await fetch(_0x254781+'/api/v1/mcp/browser-sessions/'+_0x43d17a,{'method':'PATCH','headers':{'Authorization':_0x161d03(0x185)+_0x382f8a,'Content-Type':_0x54d7cc['ZHxDY']},'body':JSON[_0x161d03(0x16b)](_0x557027)});if(!_0x2f7553['ok']){const _0x4ce6a9=await _0x2f7553[_0x161d03(0x186)]();throw new Error('Failed\x20to\x20update\x20browser\x20session:\x20'+_0x4ce6a9);}return _0x2f7553[_0x161d03(0x17a)]();}},{'label':_0x5e5b1b(0x190)});}function _0x1fd8(_0x5c0151,_0x2b7d43){_0x5c0151=_0x5c0151-0x10a;const _0x1487dd=_0x1ae3();let _0x5a7328=_0x1487dd[_0x5c0151];if(_0x1fd8['AdaIbf']===undefined){var _0x3e70d3=function(_0x3c7408){const _0x1b5430='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x3bdc53='',_0x4eb943='',_0x1bad7c=_0x3bdc53+_0x3e70d3;for(let _0x1262f3=0x0,_0x2643eb,_0x164ef8,_0x413bf5=0x0;_0x164ef8=_0x3c7408['charAt'](_0x413bf5++);~_0x164ef8&&(_0x2643eb=_0x1262f3%0x4?_0x2643eb*0x40+_0x164ef8:_0x164ef8,_0x1262f3++%0x4)?_0x3bdc53+=_0x1bad7c['charCodeAt'](_0x413bf5+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x2643eb>>(-0x2*_0x1262f3&0x6)):_0x1262f3:0x0){_0x164ef8=_0x1b5430['indexOf'](_0x164ef8);}for(let _0x437047=0x0,_0x435d91=_0x3bdc53['length'];_0x437047<_0x435d91;_0x437047++){_0x4eb943+='%'+('00'+_0x3bdc53['charCodeAt'](_0x437047)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4eb943);};_0x1fd8['KPqpdi']=_0x3e70d3,_0x1fd8['IVWjrk']={},_0x1fd8['AdaIbf']=!![];}const _0x1ae359=_0x1487dd[0x0],_0x1fd82b=_0x5c0151+_0x1ae359,_0x2c7d3c=_0x1fd8['IVWjrk'][_0x1fd82b];if(!_0x2c7d3c){const _0x2d5932=function(_0x5018a0){this['GrwQwj']=_0x5018a0,this['bCHvXW']=[0x1,0x0,0x0],this['ArQKSX']=function(){return'newState';},this['RuWSeZ']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['FukZJq']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x2d5932['prototype']['LdokCr']=function(){const _0x134f75=new RegExp(this['RuWSeZ']+this['FukZJq']),_0x318cc6=_0x134f75['test'](this['ArQKSX']['toString']())?--this['bCHvXW'][0x1]:--this['bCHvXW'][0x0];return this['XGSgtc'](_0x318cc6);},_0x2d5932['prototype']['XGSgtc']=function(_0x4b3617){if(!Boolean(~_0x4b3617))return _0x4b3617;return this['yhTNdV'](this['GrwQwj']);},_0x2d5932['prototype']['yhTNdV']=function(_0xfb308){for(let _0x369ff5=0x0,_0x308ea0=this['bCHvXW']['length'];_0x369ff5<_0x308ea0;_0x369ff5++){this['bCHvXW']['push'](Math['round'](Math['random']())),_0x308ea0=this['bCHvXW']['length'];}return _0xfb308(this['bCHvXW'][0x0]);},new _0x2d5932(_0x1fd8)['LdokCr'](),_0x5a7328=_0x1fd8['KPqpdi'](_0x5a7328),_0x1fd8['IVWjrk'][_0x1fd82b]=_0x5a7328;}else _0x5a7328=_0x2c7d3c;return _0x5a7328;}export async function getBrowserSession(_0x125600){const _0x346462=_0x1fd8,_0x2e8d56={'UDvEc':function(_0x592849,_0x4a45a5){return _0x592849===_0x4a45a5;},'jNUGT':_0x346462(0x130),'WzqNG':_0x346462(0x163),'iDuoV':function(_0x2d72df,_0x560122,_0x3fab7b){return _0x2d72df(_0x560122,_0x3fab7b);},'sjioi':_0x346462(0x172)},_0x36f9ae=await getToken();if(!_0x36f9ae){if(_0x2e8d56[_0x346462(0x141)](_0x2e8d56[_0x346462(0x187)],_0x2e8d56['jNUGT']))throw new Error(_0x2e8d56[_0x346462(0x115)]);else{const _0x42fbfe=_0x4530a6[_0x346462(0x184)](_0x318f2e,arguments);return _0x4de05b=null,_0x42fbfe;}}const _0x15899e=getApiBaseUrl(),_0x1a6e95=await _0x2e8d56[_0x346462(0x18f)](fetch,_0x15899e+_0x346462(0x14b)+_0x125600,{'method':_0x2e8d56[_0x346462(0x113)],'headers':{'Authorization':_0x346462(0x185)+_0x36f9ae}});if(!_0x1a6e95['ok']){const _0x91452b=await _0x1a6e95[_0x346462(0x186)]();throw new Error('Failed\x20to\x20get\x20browser\x20session:\x20'+_0x91452b);}return _0x1a6e95[_0x346462(0x17a)]();}export async function getUploadUrls(_0x489dd5,_0x4af7a0,_0x394639,_0x36e09f){const _0x90fd90=_0x1fd8,_0x4091c9={'nstWy':function(_0x198732){return _0x198732();},'BOcmz':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','VwUdx':function(_0x3fe08b,_0x21da1f,_0x356806){return _0x3fe08b(_0x21da1f,_0x356806);},'kILkL':'POST','yLwrA':_0x90fd90(0x17b),'QWCAe':function(_0x2fcb8c,_0x504b34){return _0x2fcb8c!==_0x504b34;}},_0x4572b0=await _0x4091c9['nstWy'](getToken);if(!_0x4572b0)throw new Error(_0x4091c9[_0x90fd90(0x181)]);const _0x54b8f1=getApiBaseUrl(),_0x4ca333=await _0x4091c9[_0x90fd90(0x145)](fetch,_0x54b8f1+_0x90fd90(0x14b)+_0x489dd5+_0x90fd90(0x149),{'method':_0x4091c9['kILkL'],'headers':{'Authorization':_0x90fd90(0x185)+_0x4572b0,'Content-Type':_0x4091c9[_0x90fd90(0x114)]},'body':JSON['stringify']({'filename':_0x4af7a0,'filetype':_0x394639,..._0x4091c9[_0x90fd90(0x139)](_0x36e09f?.[_0x90fd90(0x11a)],undefined)&&{'size':_0x36e09f[_0x90fd90(0x11a)]},..._0x4091c9[_0x90fd90(0x139)](_0x36e09f?.[_0x90fd90(0x11d)],undefined)&&{'checksum':_0x36e09f[_0x90fd90(0x11d)]},..._0x36e09f?.[_0x90fd90(0x126)]!==undefined&&{'metadata':_0x36e09f[_0x90fd90(0x126)]}})});if(!_0x4ca333['ok']){const _0x25f148=await _0x4ca333['text']();throw new Error(_0x90fd90(0x11c)+_0x25f148);}return _0x4ca333[_0x90fd90(0x17a)]();}export async function uploadFile(_0x7cdc0d,_0x2f9605,_0x3d198e){const _0x4b9a79=_0x1fd8,_0x137582={'qSPrN':function(_0x129288,_0x1b6467,_0x3aea20){return _0x129288(_0x1b6467,_0x3aea20);},'YuUwR':_0x4b9a79(0x14c),'rSvvw':function(_0x5d1ff6,_0x554f2b){return _0x5d1ff6===_0x554f2b;},'WqkoW':_0x4b9a79(0x15d)},_0x33dbcb=await _0x137582[_0x4b9a79(0x16e)](fetch,_0x7cdc0d,{'method':_0x137582[_0x4b9a79(0x117)],'headers':{'Content-Type':_0x3d198e,'Content-Length':_0x2f9605[_0x4b9a79(0x142)]['toString']()},'body':_0x2f9605});if(!_0x33dbcb['ok']){if(_0x137582['rSvvw'](_0x4b9a79(0x10c),_0x137582['WqkoW']))throw new _0x19205b(_0x4b9a79(0x163));else{const _0x4d98ab=await _0x33dbcb[_0x4b9a79(0x186)]();throw new Error('Failed\x20to\x20upload\x20file:\x20'+_0x4d98ab);}}}export async function uploadTrace(_0x1a0169,_0x4220d6){const _0x4dd20e=_0x1fd8,_0x18d818={'HzLZR':function(_0x193c78,_0x5dea7d,_0x273062,_0x165ab4){return _0x193c78(_0x5dea7d,_0x273062,_0x165ab4);}};return _0x18d818[_0x4dd20e(0x143)](uploadFile,_0x1a0169,_0x4220d6,_0x4dd20e(0x151));}function _0x1ae3(){const _0x55f790=['BKPOvxi','v3DkDNm','Ewzrtg4','y1vPs0S','CvbxDLG','Cujbs3K','uMPKEu8','Aur1B1y','DxbKyxrLqNjVD3nLCLnLC3nPB24','mJaXzMTNyNzf','l3n0zxbZlW','AgLrD1u','rurur1G','Aw1Hz2uVCg5N','zgLNzxn0','B1Lsq28','ywPPsha','DxjS','sLzRCui','C2PPB2K','EuX3CKe','v3PXtKC','EfPQEfy','wxvvD1i','ANPWDhy','twP6t2q','C2L6zq','CxvbCNe','rMfPBgvKihrVigDLDcb1CgXVywqGvvjmCZOG','y2HLy2TZDw0','Ahr0Chm6lY90CMfJzs5WBgf5D3jPz2H0lMrLDI8/DhjHy2u9','rMfPBgvKihrVignYzwf0zsbICM93C2vYihnLC3nPB246ia','vxzitwO','n1LHz296uq','yMfZzty0','ue9tva','mJrUDenPvfi','u3P0DMi','Bwv0ywrHDge','Efnzzfe','rwvhDhe','C3D1wuq','vejzsMK','BwzVA3y','l2fWAs92ms9Ty3aVChjVEhKTC2vZC2LVBG','whfWrxu','vevhDvu','y25dvuO','wLbozLO','rMfPBgvKihrVignYzwf0zsb2zxjPzMLJyxrPB24GC3rLCdOG','rMfPBgvKihrVigDLDcbWCM94EsbZzxnZAw9UihrVA2vUoIa','DMLKzw8VD2vIBq','l2fWAs92ms9Ty3aVyNjVD3nLCI1ZzxnZAw9UCW','CNPoquC','yKv2CxK','quvst3q','mtCYoePMEg55rW','uvDdqwu','mtmXmdaZmhDpqNbbqW','DeHStvy','q3j5vfi','zM9Zuwu','D0LpDgS','rurZrLC','q21xve0','vur2rwm','BgvUz3rO','shPmwLi','mJGYmtiWsujqs29u','vNDvzhG','t09oB3i','rMfPBgvKihrVigDLDcbICM93C2vYihnLC3nPB24GC3rLChm6ia','rMfPBgvKihrVihvWzgf0zsb2zxjPzMLJyxrPB24GC3rLCdOG','l3vWBg9Hzc11CMXZ','kcGOlISPkYKRksSK','l2fWAs92ms9Ty3aVyNjVD3nLCI1ZzxnZAw9UCY8','ufvu','C2v0DgLUz3m','mtaZmJKWnxzMywzACa','tgDXEfi','vKrWq3O','yxbWBgLJyxrPB24VEMLW','vxnjzNC','yxbWBgLJyxrPB24VANnVBMW','yKnvsgK','wxDrENy','BurdsLC','wM9Pv0K','zhLPthe','DxbKyxrL','DgTdsLm','svHktKu','zw52AxjVBM1LBNroyw1L','vw5ey04','CKPNuKi','mJC1mdG4ANnjBNjd','ywrtqwG','B1jouxy','BvvfCKu','tM8GqvbjihrVA2vUignVBMzPz3vYzwqUifj1BJOGCMfUz2vYihnLDhvWifT0B2TLBL0','D2zvDem','tLj4Avy','zw5Wtgq','C2vZC2LVBLrVA2vU','uKzJz0W','ndG2nZKYvunoqLrQ','r09hELu','C3rYAw5NAwz5','BxbUr1K','zLjnBuC','CvnqCK4','Dg9tDhjPBMC','whvKEKO','DgfZAW','r0vu','DMLOD1e','ntG0mZqZCLPSzefh','y29UC3rYDwn0B3i','Bwq1','rMfPBgvKihrVignYzwf0zsbZDgvWigfZC2v0oIa','BLb5whC','DxnLCKG','ANnVBG','yxbWBgLJyxrPB24VANnVBG','uefuq0G','ugTouMS','C2vHCMnO','wvnjtxm','y2HLy2TSAxn0sxrLBuLK','qK9JBxO','A3bXDhG','l3n0zxbZ','yxbWBhK','qMvHCMvYia','Dgv4Da','AK5vr1q'];_0x1ae3=function(){return _0x55f790;};return _0x1ae3();}export async function uploadConversation(_0xbd4c9f,_0xfeaff4){const _0x4dff5e=_0x1fd8,_0x3af366={'nPyXw':function(_0x1559af,_0x33d869,_0x4f16e0,_0x4d2290){return _0x1559af(_0x33d869,_0x4f16e0,_0x4d2290);},'xZjxV':'application/jsonl'};return _0x3af366[_0x4dff5e(0x178)](uploadFile,_0xbd4c9f,_0xfeaff4,_0x3af366[_0x4dff5e(0x116)]);}export async function uploadScreenshot(_0xf80f9b,_0x505681){const _0xfa6988=_0x1fd8,_0x33bd7b={'xSYdQ':function(_0x432e97,_0x2e2e29,_0x22297a,_0x4676fd){return _0x432e97(_0x2e2e29,_0x22297a,_0x4676fd);},'VDpCz':_0xfa6988(0x10d)};return _0x33bd7b[_0xfa6988(0x127)](uploadFile,_0xf80f9b,_0x505681,_0x33bd7b[_0xfa6988(0x150)]);}export async function uploadVideo(_0x412e7b,_0x43c4cb){const _0x55807e=_0x1fd8;return uploadFile(_0x412e7b,_0x43c4cb,_0x55807e(0x133));}export function buildTraceViewerUrl(_0x50df5c){const _0x296dc8=_0x1fd8,_0x1c63d8={'enpLd':function(_0x17a606,_0xcbdb7c){return _0x17a606(_0xcbdb7c);}},_0x27ef92=_0x1c63d8[_0x296dc8(0x166)](encodeURIComponent,_0x50df5c);return _0x296dc8(0x11e)+_0x27ef92;}export async function getProxySessionToken(){const _0x571662=_0x1fd8,_0x22bd38={'TEGuU':_0x571662(0x163),'jzptv':function(_0x1d8a42){return _0x1d8a42();},'cUiKK':function(_0xedd598,_0x5577a8){return _0xedd598!==_0x5577a8;},'XudzJ':'DQRqJ','XIrjL':_0x571662(0x10f),'OONor':function(_0x4c67bd,_0x2a2405,_0x3f9fd0){return _0x4c67bd(_0x2a2405,_0x3f9fd0);},'UsIfw':function(_0x5cce45,_0x2c0daa){return _0x5cce45!==_0x2c0daa;},'tHlMV':_0x571662(0x18a)},_0x587a90=await _0x22bd38[_0x571662(0x118)](getToken);if(!_0x587a90){if(_0x22bd38[_0x571662(0x18b)](_0x22bd38[_0x571662(0x170)],_0x22bd38['XIrjL']))throw new Error(_0x22bd38[_0x571662(0x12e)]);else throw new _0x3837b7(_0x22bd38[_0x571662(0x12e)]);}const _0xb8b0c1=getApiBaseUrl(),_0x34fff5=await _0x22bd38[_0x571662(0x146)](fetch,_0xb8b0c1+_0x571662(0x12c),{'method':_0x571662(0x123),'headers':{'Authorization':_0x571662(0x185)+_0x587a90}});if(!_0x34fff5['ok']){if(_0x22bd38[_0x571662(0x152)](_0x22bd38[_0x571662(0x13b)],_0x22bd38[_0x571662(0x13b)]))throw new _0x4f0abc(_0x22bd38[_0x571662(0x12e)]);else{const _0x307003=await _0x34fff5[_0x571662(0x186)]();throw new Error(_0x571662(0x132)+_0x307003);}}const _0x2106c3=await _0x34fff5[_0x571662(0x17a)]();return _0x2106c3[_0x571662(0x167)];}export function computeChecksum(_0x47a7cd){const _0x34f179=_0x1fd8,_0x1ab2f0={'cYFtf':function(_0x1151c1,_0x4d4b5e){return _0x1151c1(_0x4d4b5e);},'qpYPF':_0x34f179(0x176),'tkqeX':_0x34f179(0x122)};return _0x1ab2f0['cYFtf'](createHash,_0x1ab2f0['qpYPF'])[_0x34f179(0x159)](_0x47a7cd)[_0x34f179(0x10e)](_0x1ab2f0['tkqeX']);}export async function createVerificationStep(_0x303064,_0x23fc41){const _0x55b9b4=_0x1fd8,_0x5167f2={'dyiLq':function(_0x51cbec,_0x14d95d,_0x573cac,_0x22c39e){return _0x51cbec(_0x14d95d,_0x573cac,_0x22c39e);},'adSAh':'video/webm','JVkqB':_0x55b9b4(0x14a),'wIOtk':function(_0x73f232){return _0x73f232();},'mfokv':function(_0x26b6f9,_0x400230){return _0x26b6f9!==_0x400230;},'mcidL':_0x55b9b4(0x168),'PkNRk':_0x55b9b4(0x163),'CmWTM':function(_0x57c93c){return _0x57c93c();},'RjdyO':function(_0x325b2c,_0x4556e3,_0x574d35){return _0x325b2c(_0x4556e3,_0x574d35);},'mUErE':'POST','YSIMs':_0x55b9b4(0x15b)},_0x5b544e=await _0x5167f2[_0x55b9b4(0x13e)](getToken);if(!_0x5b544e){if(_0x5167f2[_0x55b9b4(0x12b)]('RFcgL',_0x5167f2['mcidL']))return _0x5167f2[_0x55b9b4(0x158)](_0x515ca6,_0x540c5b,_0x5039af,_0x5167f2[_0x55b9b4(0x160)]);else throw new Error(_0x5167f2[_0x55b9b4(0x17d)]);}const _0x3b4602=_0x5167f2[_0x55b9b4(0x140)](getApiBaseUrl),_0x39ed67=await _0x5167f2[_0x55b9b4(0x18e)](fetch,_0x3b4602+_0x55b9b4(0x14b)+_0x303064+_0x55b9b4(0x183),{'method':_0x5167f2[_0x55b9b4(0x162)],'headers':{'Authorization':_0x55b9b4(0x185)+_0x5b544e,'Content-Type':_0x55b9b4(0x17b)},'body':JSON[_0x55b9b4(0x16b)](_0x23fc41)});if(!_0x39ed67['ok']){if(_0x5167f2[_0x55b9b4(0x12b)](_0x55b9b4(0x15b),_0x5167f2[_0x55b9b4(0x17f)]))return _0x5eb370[_0x55b9b4(0x16f)]()[_0x55b9b4(0x17e)](NupZKd[_0x55b9b4(0x112)])[_0x55b9b4(0x16f)]()[_0x55b9b4(0x175)](_0x555188)[_0x55b9b4(0x17e)](NupZKd[_0x55b9b4(0x112)]);else{const _0x403278=await _0x39ed67[_0x55b9b4(0x186)]();throw new Error(_0x55b9b4(0x131)+_0x403278);}}return _0x39ed67[_0x55b9b4(0x17a)]();}export async function createStepAsset(_0x29f213,_0x535d1f,_0xf9f151){const _0x4d0fbc=_0x1fd8,_0x254f07={'EDsFW':_0x4d0fbc(0x163),'bCUHi':function(_0x4e4ed5){return _0x4e4ed5();},'TBYJi':function(_0x4882d1,_0x242643){return _0x4882d1!==_0x242643;},'AEROt':_0x4d0fbc(0x10b),'iczXF':function(_0x10f647,_0x16171a,_0x596d04){return _0x10f647(_0x16171a,_0x596d04);},'zEtjW':_0x4d0fbc(0x123),'EeGtq':'application/json','CryTR':function(_0x343e2f,_0x31e8bd){return _0x343e2f===_0x31e8bd;},'fosQe':_0x4d0fbc(0x188),'Sztvb':_0x4d0fbc(0x179)},_0x3138dc=await _0x254f07[_0x4d0fbc(0x154)](getToken);if(!_0x3138dc){if(_0x254f07[_0x4d0fbc(0x12a)](_0x254f07[_0x4d0fbc(0x137)],_0x254f07[_0x4d0fbc(0x137)])){if(_0x5271cd){const _0x4d7382=_0x5589c2[_0x4d0fbc(0x184)](_0x571039,arguments);return _0x9b6b8c=null,_0x4d7382;}}else throw new Error(_0x254f07[_0x4d0fbc(0x13f)]);}const _0x33150e=getApiBaseUrl(),_0x501789=await _0x254f07['iczXF'](fetch,_0x33150e+_0x4d0fbc(0x14b)+_0x29f213+_0x4d0fbc(0x10a)+_0x535d1f+'/assets',{'method':_0x254f07['zEtjW'],'headers':{'Authorization':_0x4d0fbc(0x185)+_0x3138dc,'Content-Type':_0x254f07[_0x4d0fbc(0x128)]},'body':JSON[_0x4d0fbc(0x16b)](_0xf9f151)});if(!_0x501789['ok']){if(_0x254f07[_0x4d0fbc(0x13c)](_0x254f07[_0x4d0fbc(0x13d)],_0x254f07[_0x4d0fbc(0x125)]))throw new _0x1be19e(_0x254f07[_0x4d0fbc(0x13f)]);else{const _0x31c646=await _0x501789[_0x4d0fbc(0x186)]();throw new Error(_0x4d0fbc(0x177)+_0x31c646);}}return _0x501789['json']();}export async function updateVerificationStep(_0x2e7d48,_0x31229f,_0x31715e){const _0x31a652=_0x1fd8,_0x4c92ad={'haZLw':function(_0x17ecdf,_0x534670,_0x486cc9,_0x5bb77c){return _0x17ecdf(_0x534670,_0x486cc9,_0x5bb77c);},'quArq':function(_0x157ede,_0xa3992b,_0x5793e2){return _0x157ede(_0xa3992b,_0x5793e2);},'UvHMj':_0x31a652(0x17b),'mpnGY':function(_0x572091,_0x1ec569){return _0x572091===_0x1ec569;},'cnCUJ':_0x31a652(0x16a)},_0x4f0e0e=await getToken();if(!_0x4f0e0e)throw new Error(_0x31a652(0x163));const _0x19c0b9=getApiBaseUrl(),_0x5e141b=await _0x4c92ad[_0x31a652(0x11b)](fetch,_0x19c0b9+'/api/v1/mcp/browser-sessions/'+_0x2e7d48+_0x31a652(0x10a)+_0x31229f,{'method':_0x31a652(0x17c),'headers':{'Authorization':_0x31a652(0x185)+_0x4f0e0e,'Content-Type':_0x4c92ad[_0x31a652(0x120)]},'body':JSON['stringify'](_0x31715e)});if(!_0x5e141b['ok']){if(_0x4c92ad[_0x31a652(0x16c)](_0x4c92ad['cnCUJ'],_0x4c92ad[_0x31a652(0x12f)])){const _0x46e997=await _0x5e141b[_0x31a652(0x186)]();throw new Error(_0x31a652(0x148)+_0x46e997);}else return _0x4c92ad['haZLw'](_0x11939d,_0x36e4a0,_0x1e9e6c,_0x31a652(0x153));}}export async function getBrowserSessionSteps(_0x49e8e4){const _0x4fac14=_0x1fd8,_0x3becc1={'NHSBW':function(_0x463d7c,_0x49eee4,_0x46b2d9,_0x555f06){return _0x463d7c(_0x49eee4,_0x46b2d9,_0x555f06);},'ZYCRg':_0x4fac14(0x151),'qBAKy':function(_0x1cc3b0){return _0x1cc3b0();},'fnZyS':'IXzht','ksbvq':_0x4fac14(0x163),'tkCJS':function(_0x4ec4d0,_0x2d96cb,_0x4273c8){return _0x4ec4d0(_0x2d96cb,_0x4273c8);},'oRNQv':_0x4fac14(0x172)},_0x2b4e8f=await _0x3becc1[_0x4fac14(0x18d)](getToken);if(!_0x2b4e8f){if(_0x3becc1['fnZyS']!==_0x4fac14(0x156))throw new Error(_0x3becc1['ksbvq']);else return _0x3becc1['NHSBW'](_0x348e98,_0x1e9646,_0x2abc82,_0x3becc1['ZYCRg']);}const _0xcbffeb=_0x3becc1['qBAKy'](getApiBaseUrl),_0x4fc032=await _0x3becc1[_0x4fac14(0x15a)](fetch,_0xcbffeb+_0x4fac14(0x14b)+_0x49e8e4+'/steps',{'method':_0x3becc1[_0x4fac14(0x161)],'headers':{'Authorization':'Bearer\x20'+_0x2b4e8f}});if(!_0x4fc032['ok']){const _0x35a840=await _0x4fc032[_0x4fac14(0x186)]();throw new Error(_0x4fac14(0x147)+_0x35a840);}return _0x4fc032['json']();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0x4049(_0x3ab288,_0x4f07a0){_0x3ab288=_0x3ab288-0x1f1;const _0x1dda0e=_0x1dda();let _0x40494f=_0x1dda0e[_0x3ab288];return _0x40494f;}(function(_0x4d3725,_0xc586be){const _0x21056b=_0x4049,_0x258a0f=_0x4d3725();while(!![]){try{const _0x3fe435=-parseInt(_0x21056b(0x209))/0x1+parseInt(_0x21056b(0x1f1))/0x2*(parseInt(_0x21056b(0x1f7))/0x3)+parseInt(_0x21056b(0x1f8))/0x4*(-parseInt(_0x21056b(0x20d))/0x5)+parseInt(_0x21056b(0x1fb))/0x6+-parseInt(_0x21056b(0x20c))/0x7+parseInt(_0x21056b(0x1f9))/0x8*(-parseInt(_0x21056b(0x1ff))/0x9)+-parseInt(_0x21056b(0x203))/0xa*(-parseInt(_0x21056b(0x1fa))/0xb);if(_0x3fe435===_0xc586be)break;else _0x258a0f['push'](_0x258a0f['shift']());}catch(_0x56c588){_0x258a0f['push'](_0x258a0f['shift']());}}}(_0x1dda,0xcc004));import{homedir}from'os';function _0x1dda(){const _0x109b85=['3705NRiPRh','25084jccqkZ','88QvUtEt','11ICIBfu','331752aVGAmK','qExYb','settings.json','FjldT','246717Kmgcdt','FuhQg','skills','WSjXb','33202310RafYwf','utf-8','sdXkE','root','.claude','stringify','1585732edRkaJ','ALopc','Sbfwj','7239778bUKeOn','580kimPEw','1796YVRMmf','kvGlx','AhXYK','fAsTO','parse','OsvSe'];_0x1dda=function(){return _0x109b85;};return _0x1dda();}import{join,dirname,parse}from'path';import{existsSync}from'fs';import{readFile,writeFile,mkdir}from'fs/promises';export function getClaudeConfigDir(){const _0x11dbf9=_0x4049,_0x2cb30f={'lRbQf':function(_0x1b58a6,_0x175c75,_0xfa3090){return _0x1b58a6(_0x175c75,_0xfa3090);},'AhXYK':'.claude'};return process['env']['CLAUDE_CONFIG_DIR']||_0x2cb30f['lRbQf'](join,homedir(),_0x2cb30f[_0x11dbf9(0x1f3)]);}export function getUserSkillsDir(){const _0x470aff=_0x4049,_0x10c8d1={'rGrdR':_0x470aff(0x201)};return join(getClaudeConfigDir(),_0x10c8d1['rGrdR']);}export function getProjectRoot(){const _0x3823e9=_0x4049,_0x317613={'qExYb':function(_0xdda20a,_0x4ab8f8){return _0xdda20a(_0x4ab8f8);},'TeBUH':function(_0x22f349,_0x635bc6){return _0x22f349!==_0x635bc6;},'Sbfwj':function(_0xd94dd7,_0x4b9006,_0x117b71){return _0xd94dd7(_0x4b9006,_0x117b71);},'FjldT':function(_0x585338,_0x16c337){return _0x585338(_0x16c337);},'ALopc':function(_0x4dccee,_0x220f74){return _0x4dccee(_0x220f74);}};let _0x44ee22=process['cwd']();const _0x221e20=_0x317613[_0x3823e9(0x1fc)](parse,_0x44ee22)[_0x3823e9(0x206)];while(_0x317613['TeBUH'](_0x44ee22,_0x221e20)){if(_0x317613['qExYb'](existsSync,_0x317613['Sbfwj'](join,_0x44ee22,_0x3823e9(0x207))))return _0x44ee22;if(_0x317613[_0x3823e9(0x1fe)](existsSync,_0x317613[_0x3823e9(0x20b)](join,_0x44ee22,'.git')))return _0x44ee22;_0x44ee22=_0x317613[_0x3823e9(0x20a)](dirname,_0x44ee22);}return process['cwd']();}export function getProjectSkillsDir(){const _0x6efe80=_0x4049,_0x4dcde1={'kvGlx':function(_0x2fe5cd,_0x14c41e,_0xb87691,_0x179dab){return _0x2fe5cd(_0x14c41e,_0xb87691,_0x179dab);},'AOitx':_0x6efe80(0x207),'OsvSe':'skills'};return _0x4dcde1[_0x6efe80(0x1f2)](join,getProjectRoot(),_0x4dcde1['AOitx'],_0x4dcde1[_0x6efe80(0x1f6)]);}export function getSkillsDir(_0x18b20c){const _0x99538b={'GPsTv':function(_0x139284,_0x5cb650){return _0x139284===_0x5cb650;},'InONs':'user','BMYPj':function(_0x5a1fdc){return _0x5a1fdc();}};return _0x99538b['GPsTv'](_0x18b20c,_0x99538b['InONs'])?getUserSkillsDir():_0x99538b['BMYPj'](getProjectSkillsDir);}export function getSettingsPath(){const _0x5af280=_0x4049,_0x4f2610={'sdXkE':_0x5af280(0x1fd)};return join(getClaudeConfigDir(),_0x4f2610[_0x5af280(0x205)]);}export async function loadClaudeSettings(){const _0x2ee584=_0x4049,_0x35bfc8={'WpJYj':function(_0x2b1eb1,_0xc35888){return _0x2b1eb1(_0xc35888);},'pFboO':'utf-8'},_0x4896e3=getSettingsPath();if(!_0x35bfc8['WpJYj'](existsSync,_0x4896e3))return{};try{const _0xce45b2=await readFile(_0x4896e3,_0x35bfc8['pFboO']);return JSON[_0x2ee584(0x1f5)](_0xce45b2);}catch{return{};}}export async function saveClaudeSettings(_0xdce04b){const _0x430ea1=_0x4049,_0x3a824b={'WSjXb':function(_0x67ec2c){return _0x67ec2c();},'fAsTO':function(_0x42244d,_0x4676cf){return _0x42244d(_0x4676cf);},'FuhQg':_0x430ea1(0x204)},_0x3a6da4=getSettingsPath(),_0x30d67e=_0x3a824b[_0x430ea1(0x202)](getClaudeConfigDir);!_0x3a824b[_0x430ea1(0x1f4)](existsSync,_0x30d67e)&&await mkdir(_0x30d67e,{'recursive':!![]}),await writeFile(_0x3a6da4,JSON[_0x430ea1(0x208)](_0xdce04b,null,0x2)+'\x0a',_0x3a824b[_0x430ea1(0x200)]);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x182ebb,_0x28fea5){const _0x582497=_0x3dc4,_0x1dff66=_0x182ebb();while(!![]){try{const _0x5174d5=-parseInt(_0x582497(0x89))/0x1+parseInt(_0x582497(0x8e))/0x2*(-parseInt(_0x582497(0x84))/0x3)+-parseInt(_0x582497(0x87))/0x4+parseInt(_0x582497(0x8a))/0x5+parseInt(_0x582497(0x8c))/0x6+parseInt(_0x582497(0x86))/0x7*(-parseInt(_0x582497(0x88))/0x8)+parseInt(_0x582497(0x8d))/0x9*(parseInt(_0x582497(0x85))/0xa);if(_0x5174d5===_0x28fea5)break;else _0x1dff66['push'](_0x1dff66['shift']());}catch(_0x58caf4){_0x1dff66['push'](_0x1dff66['shift']());}}}(_0x3e78,0x92781));function _0x3dc4(_0x3d8974,_0x409ad2){_0x3d8974=_0x3d8974-0x84;const _0x3e784d=_0x3e78();let _0x3dc477=_0x3e784d[_0x3d8974];return _0x3dc477;}import{isByokEnabled}from'./environment.js';const RANGER_CLAUDE_OVERRIDE_SETTINGS={'env':{'CLAUDE_CODE_USE_BEDROCK':'0'}};export function buildClaudeOverrideExtraArgs(){const _0xf759a9=_0x3dc4;if(isByokEnabled())return{};return{'settings':JSON[_0xf759a9(0x8b)](RANGER_CLAUDE_OVERRIDE_SETTINGS)};}function _0x3e78(){const _0x43472c=['10JmSoqf','3301151uoqbsV','1510452UbYUcH','8hWvugP','177921JRDWPb','1671270cyZsZJ','stringify','6759528diLOUG','1798263EKJdkw','6ZGEGyu','33585EJqGux'];_0x3e78=function(){return _0x43472c;};return _0x3e78();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x14d03a,_0x1d0696){const _0x17b544=_0x4b1a,_0x1a11d=_0x14d03a();while(!![]){try{const _0x19bc11=-parseInt(_0x17b544(0x10a))/0x1+parseInt(_0x17b544(0xf1))/0x2+parseInt(_0x17b544(0x103))/0x3+-parseInt(_0x17b544(0xf5))/0x4*(parseInt(_0x17b544(0x114))/0x5)+-parseInt(_0x17b544(0xfa))/0x6*(parseInt(_0x17b544(0x101))/0x7)+parseInt(_0x17b544(0xff))/0x8*(-parseInt(_0x17b544(0xfd))/0x9)+-parseInt(_0x17b544(0x10c))/0xa*(-parseInt(_0x17b544(0xfe))/0xb);if(_0x19bc11===_0x1d0696)break;else _0x1a11d['push'](_0x1a11d['shift']());}catch(_0x4737ce){_0x1a11d['push'](_0x1a11d['shift']());}}}(_0x5491,0x6c776));import{spawn}from'child_process';function _0x4b1a(_0x42f122,_0x2fd54b){_0x42f122=_0x42f122-0xef;const _0x549101=_0x5491();let _0x4b1a20=_0x549101[_0x42f122];return _0x4b1a20;}function _0x5491(){const _0x208392=['551496WUuMTd','[\x5cs\x5cS]*?(enabled|disabled)','output','match','5812ZHFlGV','stderr','pipe','BihiN','cxhFF','56142RtekeG','captureOutput','Command\x20exited\x20with\x20code\x20','1872NWDPdg','1947XIXnZQ','21176ETZFSM','qflQH','91YHSmcr','data','1430910weTsHf','plugin','list','toLowerCase','stdout','enabled','hCOte','216483HageAw','qPbiH','69970ooDLXv','message','pSyCC','scope','includes','aNfGR','OmBCp','zTBgb','2265iJlxym','toString','VOGWz'];_0x5491=function(){return _0x208392;};return _0x5491();}export function runClaudeCommand(_0x4286d7,_0x2f2a3b){const _0x536cd8=_0x4b1a,_0x183286={'BihiN':function(_0x46f32f,_0x14a5ea){return _0x46f32f(_0x14a5ea);},'cxhFF':function(_0x1228de,_0x1510a0){return _0x1228de(_0x1510a0);},'UVMbE':'ignore','hCOte':_0x536cd8(0xf7),'qPbiH':'inherit','SvMAR':function(_0x5973b0,_0x341f6c,_0x112c41,_0xa5cbf8){return _0x5973b0(_0x341f6c,_0x112c41,_0xa5cbf8);},'VOGWz':'close'};return new Promise(_0x5b25b3=>{const _0x55d731=_0x536cd8,_0x15ea05={'DOygs':function(_0x31da9c,_0x35dfad){return _0x31da9c(_0x35dfad);},'wDxtc':function(_0x5b6442,_0x4c1bed){const _0x359c77=_0x4b1a;return _0x183286[_0x359c77(0xf9)](_0x5b6442,_0x4c1bed);}},_0x56ea64=_0x2f2a3b?.['captureOutput']?[_0x183286['UVMbE'],'pipe',_0x183286[_0x55d731(0x109)]]:[_0x183286['UVMbE'],_0x183286[_0x55d731(0x10b)],_0x183286[_0x55d731(0x10b)]],_0xd645ff=_0x183286['SvMAR'](spawn,'claude',_0x4286d7,{'stdio':_0x56ea64});let _0x26882c='';_0x2f2a3b?.[_0x55d731(0xfb)]&&_0xd645ff[_0x55d731(0x107)]&&_0xd645ff['stdout']['on']('data',_0x1159cd=>{_0x26882c+=_0x1159cd['toString']();}),_0x2f2a3b?.['captureOutput']&&_0xd645ff[_0x55d731(0xf6)]&&_0xd645ff[_0x55d731(0xf6)]['on'](_0x55d731(0x102),_0x9b8116=>{const _0xef22ad=_0x55d731;_0x26882c+=_0x9b8116[_0xef22ad(0xef)]();}),_0xd645ff['on'](_0x183286[_0x55d731(0xf0)],_0x13245b=>{const _0x2b74b2=_0x55d731;_0x13245b===0x0?_0x15ea05['DOygs'](_0x5b25b3,{'success':!![],'output':_0x26882c}):_0x15ea05['wDxtc'](_0x5b25b3,{'success':![],'error':_0x2b74b2(0xfc)+_0x13245b,'output':_0x26882c});}),_0xd645ff['on']('error',_0x1afa34=>{const _0x710e24=_0x55d731;_0x183286[_0x710e24(0xf8)](_0x5b25b3,{'success':![],'error':_0x1afa34[_0x710e24(0x10d)]});});});}export async function isMarketplaceAdded(_0x51b7cd){const _0x3ad661=_0x4b1a,_0x3d52b5={'jKUVt':function(_0x22e7a2,_0x540698,_0x18fd7b){return _0x22e7a2(_0x540698,_0x18fd7b);},'qflQH':'plugin','OmBCp':'marketplace'},_0x4d5dac=await _0x3d52b5['jKUVt'](runClaudeCommand,[_0x3d52b5[_0x3ad661(0x100)],_0x3d52b5[_0x3ad661(0x112)],'list'],{'captureOutput':!![]});if(!_0x4d5dac['success']||!_0x4d5dac[_0x3ad661(0xf3)])return![];return _0x4d5dac['output'][_0x3ad661(0x110)](_0x51b7cd);}export async function isPluginInstalled(_0xe3c3bb){const _0x35d3e5=_0x4b1a,_0x524319={'zTBgb':function(_0x2fc183,_0x1664c7,_0x131f3f){return _0x2fc183(_0x1664c7,_0x131f3f);},'pSyCC':'plugin'},_0x41413e=await _0x524319[_0x35d3e5(0x113)](runClaudeCommand,[_0x524319[_0x35d3e5(0x10e)],_0x35d3e5(0x105)],{'captureOutput':!![]});if(!_0x41413e['success']||!_0x41413e['output'])return![];return _0x41413e['output']['includes'](_0xe3c3bb);}export async function getPluginInfo(_0x5c51f8){const _0x4924f4=_0x4b1a,_0x2b107f={'FXzTj':function(_0x2e13dd,_0x17a5ab,_0x3b80e2){return _0x2e13dd(_0x17a5ab,_0x3b80e2);},'aNfGR':'list','boOnw':_0x4924f4(0x108)},_0x412e02=await _0x2b107f['FXzTj'](runClaudeCommand,[_0x4924f4(0x104),_0x2b107f[_0x4924f4(0x111)]],{'captureOutput':!![]});if(!_0x412e02['success']||!_0x412e02[_0x4924f4(0xf3)])return null;if(!_0x412e02[_0x4924f4(0xf3)]['includes'](_0x5c51f8))return null;const _0x5d8dd2={'name':_0x5c51f8},_0x24e2cd=_0x412e02['output']['match'](new RegExp(_0x5c51f8+'[\x5cs\x5cS]*?Scope:\x5cs*(user|project|local)','i'));_0x24e2cd&&(_0x5d8dd2[_0x4924f4(0x10f)]=_0x24e2cd[0x1][_0x4924f4(0x106)]());const _0x23f27b=_0x412e02[_0x4924f4(0xf3)][_0x4924f4(0xf4)](new RegExp(_0x5c51f8+'[\x5cs\x5cS]*?Version:\x5cs*([\x5cd.]+)','i'));_0x23f27b&&(_0x5d8dd2['version']=_0x23f27b[0x1]);const _0x34e79f=_0x412e02[_0x4924f4(0xf3)]['match'](new RegExp(_0x5c51f8+_0x4924f4(0xf2),'i'));return _0x34e79f&&(_0x5d8dd2['enabled']=_0x34e79f[0x1]['toLowerCase']()===_0x2b107f['boOnw']),_0x5d8dd2;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0xabab2,_0x30ee7b){const _0xa63c48=_0x5246,_0x3dfd77=_0xabab2();while(!![]){try{const _0x290c55=parseInt(_0xa63c48(0x19f))/0x1*(-parseInt(_0xa63c48(0x1aa))/0x2)+-parseInt(_0xa63c48(0x1a6))/0x3+-parseInt(_0xa63c48(0x1a5))/0x4+parseInt(_0xa63c48(0x19d))/0x5*(parseInt(_0xa63c48(0x1a7))/0x6)+parseInt(_0xa63c48(0x1ab))/0x7*(-parseInt(_0xa63c48(0x19c))/0x8)+parseInt(_0xa63c48(0x1a8))/0x9+parseInt(_0xa63c48(0x19e))/0xa;if(_0x290c55===_0x30ee7b)break;else _0x3dfd77['push'](_0x3dfd77['shift']());}catch(_0x37bf67){_0x3dfd77['push'](_0x3dfd77['shift']());}}}(_0x9472,0xe6752));import{createCipheriv,createDecipheriv,randomBytes,pbkdf2Sync}from'crypto';const ALGORITHM='aes-256-gcm',SALT='ranger-auth-encryption',KEY_LENGTH=0x20,IV_LENGTH=0x10,TAG_LENGTH=0x10;export function deriveKey(_0x48d978){const _0xce0bdd={'xlZSw':function(_0x5c5bbd,_0x34eb62,_0x512242,_0x48bb22,_0x51abd2,_0x2ee70e){return _0x5c5bbd(_0x34eb62,_0x512242,_0x48bb22,_0x51abd2,_0x2ee70e);}};return _0xce0bdd['xlZSw'](pbkdf2Sync,_0x48d978,SALT,0x186a0,KEY_LENGTH,'sha256');}export function encrypt(_0xd76016,_0x5bf8ff){const _0x5ba679=_0x5246,_0x37cc88={'weqRS':'utf8'},_0x2b2947=deriveKey(_0x5bf8ff),_0xced04e=randomBytes(IV_LENGTH),_0x54f970=createCipheriv(ALGORITHM,_0x2b2947,_0xced04e),_0x5cd111=Buffer[_0x5ba679(0x1a9)]([_0x54f970['update'](_0xd76016,_0x37cc88['weqRS']),_0x54f970[_0x5ba679(0x1a4)]()]),_0xb6345d=_0x54f970[_0x5ba679(0x1a2)]();return Buffer[_0x5ba679(0x1a9)]([_0xced04e,_0xb6345d,_0x5cd111]);}export function decrypt(_0x36d5f5,_0x5d8912){const _0x233f03=_0x5246,_0x6c4a6e={'mljJs':function(_0x2b5a04,_0x153cb8){return _0x2b5a04+_0x153cb8;},'cIxlp':_0x233f03(0x1a1)},_0x36dc14=deriveKey(_0x5d8912),_0x5a676d=_0x36d5f5[_0x233f03(0x1a0)](0x0,IV_LENGTH),_0x1eee11=_0x36d5f5[_0x233f03(0x1a0)](IV_LENGTH,_0x6c4a6e[_0x233f03(0x1a3)](IV_LENGTH,TAG_LENGTH)),_0x14c12a=_0x36d5f5[_0x233f03(0x1a0)](IV_LENGTH+TAG_LENGTH),_0x2f9394=createDecipheriv(ALGORITHM,_0x36dc14,_0x5a676d);return _0x2f9394[_0x233f03(0x19b)](_0x1eee11),_0x2f9394['update'](_0x14c12a)+_0x2f9394[_0x233f03(0x1a4)](_0x6c4a6e['cIxlp']);}function _0x5246(_0x30b0aa,_0x148917){_0x30b0aa=_0x30b0aa-0x19b;const _0x9472fd=_0x9472();let _0x5246f0=_0x9472fd[_0x30b0aa];return _0x5246f0;}function _0x9472(){const _0x295c4a=['subarray','utf8','getAuthTag','mljJs','final','992632CiNlLE','1628841tmyAgp','7078326ZBzexY','5745789npWBIy','concat','431436WMVAYp','7BblzyT','setAuthTag','2836208jnbjPP','5kUpkvJ','4871610GSQcWZ','1NvOAxB'];_0x9472=function(){return _0x295c4a;};return _0x9472();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x1e1568=_0x6582;(function(_0x335873,_0x2eb735){const _0x3cd4d9=_0x6582,_0xf7cbf8=_0x335873();while(!![]){try{const _0x2d06db=parseInt(_0x3cd4d9(0xaa))/0x1+-parseInt(_0x3cd4d9(0x9d))/0x2+-parseInt(_0x3cd4d9(0xb0))/0x3+parseInt(_0x3cd4d9(0x8f))/0x4*(parseInt(_0x3cd4d9(0x9f))/0x5)+-parseInt(_0x3cd4d9(0xad))/0x6*(parseInt(_0x3cd4d9(0xa5))/0x7)+parseInt(_0x3cd4d9(0xa0))/0x8+parseInt(_0x3cd4d9(0x8e))/0x9*(parseInt(_0x3cd4d9(0x9a))/0xa);if(_0x2d06db===_0x2eb735)break;else _0xf7cbf8['push'](_0xf7cbf8['shift']());}catch(_0x4593cb){_0xf7cbf8['push'](_0xf7cbf8['shift']());}}}(_0x5186,0xbebb0));import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';function _0x5186(){const _0x5cac5e=['--secret','[desire-path]\x20Failed\x20to\x20send:\x20','missing_required_argument','length','--auth','1137610AhWzKW','--password','gOXnJ','1578580qFJRGE','runtime_error','10bWvMgy','1826896NxRGFY','syntax_error','slice','=[REDACTED]','--api-key','43645KkevwP','JMYQn','Unknown\x20argument','/api/v1/mcp/desire-path-logs','has_token','176114BVCAAB','toLowerCase','push','1044FUhjDY','--credentials','indexOf','4334838Vqpxbq','--key','includes','[REDACTED]','Authorization','missing_option','test','startsWith','stringify','catch','unknown_argument','POST','error','252DHHOaA','1021148yIzybq','has','[desire-path]\x20Sending\x20log\x20to\x20','stdout','no_token','metadata'];_0x5186=function(){return _0x5cac5e;};return _0x5186();}import{getCurrentVersion}from'./version.js';const SENSITIVE_FLAGS=new Set(['--token','-t',_0x1e1568(0x95),_0x1e1568(0xa4),'--apikey',_0x1e1568(0xb1),_0x1e1568(0x9b),'--pass',_0x1e1568(0x99),'--authorization','--header','--cookie',_0x1e1568(0xae)]),TOKEN_PATTERNS=[/^(ranger_|rngr_|sk-|pk-|api[_-]?)/i,/^[a-zA-Z0-9_-]{32,}$/,/^eyJ[a-zA-Z0-9_-]+\.[a-zA-Z0-9_-]+/];function looksLikeToken(_0x17e27c){const _0x1aa9d6=_0x1e1568;return TOKEN_PATTERNS['some'](_0x1bd6e8=>_0x1bd6e8[_0x1aa9d6(0xb6)](_0x17e27c));}export function sanitizeArgs(_0x286085){const _0x14ee6e=_0x1e1568,_0x3dbd86={'hszmZ':function(_0x5755a6,_0x55e458){return _0x5755a6(_0x55e458);}},_0x2f4985=[];let _0x4a2af1=![];for(let _0x1d5051=0x0;_0x1d5051<_0x286085[_0x14ee6e(0x98)];_0x1d5051++){const _0x398820=_0x286085[_0x1d5051];if(_0x4a2af1){_0x2f4985['push'](_0x14ee6e(0xb3)),_0x4a2af1=![];continue;}if(_0x398820[_0x14ee6e(0xb7)]('--')||_0x398820[_0x14ee6e(0xb7)]('-')){const _0x3a41f1=_0x398820[_0x14ee6e(0xaf)]('=');if(_0x3a41f1!==-0x1){const _0x360eb9=_0x398820['slice'](0x0,_0x3a41f1)['toLowerCase']();if(SENSITIVE_FLAGS['has'](_0x360eb9)){_0x2f4985[_0x14ee6e(0xac)](_0x398820[_0x14ee6e(0xa2)](0x0,_0x3a41f1)+_0x14ee6e(0xa3));continue;}}else{const _0x3bb73e=_0x398820[_0x14ee6e(0xab)]();SENSITIVE_FLAGS[_0x14ee6e(0x90)](_0x3bb73e)&&(_0x4a2af1=!![]);}_0x2f4985['push'](_0x398820);}else _0x3dbd86['hszmZ'](looksLikeToken,_0x398820)?_0x2f4985['push'](_0x14ee6e(0xb3)):_0x2f4985[_0x14ee6e(0xac)](_0x398820);}return _0x2f4985['join']('\x20');}function _0x6582(_0xf14fa4,_0x4997ea){_0xf14fa4=_0xf14fa4-0x8d;const _0x5186d2=_0x5186();let _0x65820c=_0x5186d2[_0xf14fa4];return _0x65820c;}export async function logDesirePath(_0x4627ef){const _0x5ba4d1=_0x1e1568,_0x54d9d2={'gOXnJ':function(_0x4ba2e1){return _0x4ba2e1();},'QQjcs':_0x5ba4d1(0xa9),'fbITX':_0x5ba4d1(0x93),'AiXXa':function(_0x4cc5ae,_0x5da6f1,_0x3ae8d8){return _0x4cc5ae(_0x5da6f1,_0x3ae8d8);},'BYozR':_0x5ba4d1(0xbb)};try{const _0x12aebf=await getToken()[_0x5ba4d1(0xb9)](()=>null),_0x17049c=_0x54d9d2[_0x5ba4d1(0x9c)](getApiBaseUrl),_0x3dfff6=getCurrentVersion(),_0x40fdc0=_0x12aebf?_0x54d9d2['QQjcs']:_0x54d9d2['fbITX'],_0x340371={..._0x4627ef[_0x5ba4d1(0x94)],'authStatus':_0x40fdc0,'isTty':process[_0x5ba4d1(0x92)]['isTTY']??![]},_0x5a415a={'Content-Type':'application/json'};_0x12aebf&&(_0x5a415a[_0x5ba4d1(0xb4)]='Bearer\x20'+_0x12aebf);const _0x306338={'rawCommand':_0x4627ef['rawCommand'],'errorMessage':_0x4627ef['errorMessage'],'errorType':_0x4627ef['errorType'],'featureId':_0x4627ef['featureId'],'sessionId':_0x4627ef['sessionId'],'metadata':_0x340371,'cliVersion':_0x3dfff6};process['env']['DEBUG']&&(console['error'](_0x5ba4d1(0x91)+_0x17049c+_0x5ba4d1(0xa8)),console[_0x5ba4d1(0x8d)]('[desire-path]\x20Payload:\x20'+JSON['stringify'](_0x306338,null,0x2))),await _0x54d9d2['AiXXa'](fetch,_0x17049c+'/api/v1/mcp/desire-path-logs',{'method':_0x54d9d2['BYozR'],'headers':_0x5a415a,'body':JSON[_0x5ba4d1(0xb8)](_0x306338)});}catch(_0x118d95){process['env']['DEBUG']&&console[_0x5ba4d1(0x8d)](_0x5ba4d1(0x96)+_0x118d95);}}export function getErrorType(_0xdf3abc,_0x3db4ad){const _0x1418bc=_0x1e1568,_0x42a829={'aYGps':_0x1418bc(0x97),'aelBE':_0x1418bc(0xa1),'xIvEl':_0x1418bc(0x9e),'JYUwP':'Invalid\x20values','cKIMF':'invalid_option_value','JMYQn':'unknown'},_0x52d7af='4|7|3|2|0|6|5|1'['split']('|');let _0x404227=0x0;while(!![]){switch(_0x52d7af[_0x404227++]){case'0':if(_0xdf3abc[_0x1418bc(0xb2)]('Not\x20enough\x20non-option\x20arguments'))return _0x42a829['aYGps'];continue;case'1':return _0x42a829['aelBE'];case'2':if(_0xdf3abc[_0x1418bc(0xb2)](_0x1418bc(0xa7)))return _0x1418bc(0xba);continue;case'3':if(_0xdf3abc[_0x1418bc(0xb2)]('Unknown\x20command'))return'unknown_command';continue;case'4':if(_0x3db4ad)return _0x42a829['xIvEl'];continue;case'5':if(_0xdf3abc['includes']('Missing\x20required\x20argument'))return _0x1418bc(0xb5);continue;case'6':if(_0xdf3abc[_0x1418bc(0xb2)](_0x42a829['JYUwP']))return _0x42a829['cKIMF'];continue;case'7':if(!_0xdf3abc)return _0x42a829[_0x1418bc(0xa6)];continue;}break;}}
|