@ranger-testing/ranger-cli 2.1.3 → 2.1.5
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/browserSessionsApi.js +1 -1
- package/build/commands/utils/claudeConfig.js +1 -1
- package/build/commands/utils/claudePlugin.js +1 -1
- package/build/commands/utils/crypto.js +1 -1
- package/build/commands/utils/desirePathLog.js +1 -1
- package/build/commands/utils/deviceAuth.js +1 -1
- package/build/commands/utils/environment.js +1 -1
- package/build/commands/utils/featureApi.js +1 -1
- package/build/commands/utils/featureReportGenerator.js +1 -1
- package/build/commands/utils/fixWebmDuration.js +1 -1
- package/build/commands/utils/git.js +1 -1
- package/build/commands/utils/keychain.js +1 -1
- package/build/commands/utils/localAgentInstallationsApi.js +1 -1
- package/build/commands/utils/mcpImageBase64.js +1 -1
- package/build/commands/utils/model.js +1 -1
- package/build/commands/utils/opencodeConfig.js +1 -1
- package/build/commands/utils/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/telemetry.js +1 -1
- package/build/commands/utils/traceSnapshotMapper.js +1 -1
- package/build/commands/utils/userApi.js +1 -1
- package/build/commands/utils/version.js +1 -1
- package/build/commands/verifyFeature.js +1 -1
- package/build/commands/verifyInBrowser.js +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x593bbe,_0x295cf3){const _0x5a9757=_0x419c,_0x84bad8=_0x593bbe();while(!![]){try{const _0x4cabfe=parseInt(_0x5a9757(0x9f))/0x1*(-parseInt(_0x5a9757(0x94))/0x2)+-parseInt(_0x5a9757(0xa7))/0x3*(-parseInt(_0x5a9757(0x91))/0x4)+parseInt(_0x5a9757(0x98))/0x5*(-parseInt(_0x5a9757(0x81))/0x6)+-parseInt(_0x5a9757(0x84))/0x7+parseInt(_0x5a9757(0xa5))/0x8+parseInt(_0x5a9757(0x80))/0x9+parseInt(_0x5a9757(0x7e))/0xa;if(_0x4cabfe===_0x295cf3)break;else _0x84bad8['push'](_0x84bad8['shift']());}catch(_0x1bcc96){_0x84bad8['push'](_0x84bad8['shift']());}}}(_0x1ad1,0xb19d9));function _0x1ad1(){const _0x45f0d5=['catch','OVdQX','5YvfdLp','settings.json','close','trackPhaseStart','FznJp','cBvhQ','7336072BZwbQV','\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20','2687730qoCzPa','gvtwr','QWMFU','pBuxH','\x20\x20\x20Update\x20your\x20authentication\x20as\x20needed.','log','\x20\x20\x20A\x20browser\x20will\x20open\x20with\x20your\x20existing\x20session\x20(if\x20any).','isTTY','baseUrl','JYPXk','Non-interactive\x20mode\x20detected.\x0aThe\x20\x22ranger\x20profile\x20update\x22\x20command\x20requires\x20interactive\x20browser\x20authentication\x20and\x20cannot\x20be\x20run\x20in\x20non-TTY\x20environments\x20(CI,\x20scripts,\x20Claude\x20Code).\x0aTo\x20update\x20profile\x20authentication:\x0a\x20\x201.\x20Run\x20\x22ranger\x20profile\x20update\x20<name>\x22\x20in\x20an\x20interactive\x20terminal\x0a\x20\x202.\x20Commit\x20the\x20updated\x20encrypted\x20auth\x20file\x20to\x20git','\x20\x20Could\x20not\x20encrypt:\x20No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','stdout','6291990MvhKmd','zfHMU','5236488jGZBGU','12qnBChe','✓\x20Auth\x20state\x20saved\x20to:\x20','✓\x20Updated\x20config:\x20','94605drJLGL','iAbeR','trackPhaseEnd','Gwfsl','sybSy','BRgUV','newPage','Profile\x20\x22','yzKzb','Config\x20not\x20found\x20at\x20','.\x20Run\x20first:\x20ranger\x20profile\x20add\x20','storageState','\x0a✅\x20Profile\x20\x22','4hXXrAi','browser','Osptq','460124pERxHF','stringify','string','✓\x20Encrypted\x20auth\x20saved\x20to:\x20','2831530joLIWT','browser_auth','OzCVX','utf-8','\x22\x20authentication\x20updated'];_0x1ad1=function(){return _0x45f0d5;};return _0x1ad1();}import{writeFile,readFile,unlink}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{chromium}from'playwright';import{encrypt}from'./utils/crypto.js';import{getToken}from'./utils/keychain.js';import{getEnvDir,isEnvCi}from'./utils/settings.js';function _0x419c(_0x545b53,_0x93597c){_0x545b53=_0x545b53-0x78;const _0x1ad1b1=_0x1ad1();let _0x419cef=_0x1ad1b1[_0x545b53];return _0x419cef;}import{addProfileSetupBanner}from'./utils/profileSetupBanner.js';export async function updateEnv(_0x112307,_0x321e2d){const _0x135acd=_0x419c,_0x5cae73={'wAezJ':_0x135acd(0xa1),'OVdQX':function(_0x1b215b,_0x601007){return _0x1b215b(_0x601007);},'iAbeR':function(_0x2f1be8,_0x3b5fe0,_0x1a9a87){return _0x2f1be8(_0x3b5fe0,_0x1a9a87);},'zfHMU':'auth.json','BRgUV':_0x135acd(0x96),'OzCVX':function(_0x1c8910,_0x8d324d){return _0x1c8910(_0x8d324d);},'sybSy':_0x135acd(0xad),'pNuLv':_0x135acd(0xab),'QWMFU':'\x20\x20\x20When\x20you\x20are\x20done,\x20close\x20the\x20browser.\x0a','yzKzb':function(_0xfc6632,_0x4d12cc){return _0xfc6632||_0x4d12cc;},'FznJp':'about:blank','cBvhQ':_0x135acd(0x9b),'yCoQy':function(_0x45c23a,_0x509838,_0x1f5546){return _0x45c23a(_0x509838,_0x1f5546);},'JYPXk':function(_0x2e0c3f,_0x2b4b9a){return _0x2e0c3f(_0x2b4b9a);},'Gwfsl':'\x20\x20You\x20can\x20safely\x20commit\x20this\x20file\x20to\x20git.','pBuxH':'\x20\x20Run\x20ranger\x20setup\x20in\x20CI\x20to\x20decrypt\x20at\x20runtime.'},_0xe010dd=_0x5cae73[_0x135acd(0x9e)](getEnvDir,_0x112307),_0x3d7ffd=_0x5cae73['iAbeR'](join,_0xe010dd,_0x135acd(0xa0)),_0xe820d5=_0x5cae73[_0x135acd(0x85)](join,_0xe010dd,_0x5cae73[_0x135acd(0x7f)]),_0x3f5e50=_0xe820d5+'.enc',_0x1b2e4f=process['stdin']['isTTY']&&process[_0x135acd(0x7d)][_0x135acd(0x78)];if(!_0x1b2e4f)throw new Error(_0x135acd(0x7b));if(!_0x5cae73['OVdQX'](existsSync,_0xe010dd))throw new Error(_0x135acd(0x8b)+_0x112307+_0x135acd(0xa6)+_0x112307);if(!_0x5cae73[_0x135acd(0x9e)](existsSync,_0x3d7ffd))throw new Error(_0x135acd(0x8d)+_0x3d7ffd+_0x135acd(0x8e)+_0x112307);const _0x26fbe1=await _0x5cae73[_0x135acd(0x85)](readFile,_0x3d7ffd,'utf-8'),_0x17d820=JSON['parse'](_0x26fbe1),_0x1a2b14=typeof _0x17d820['baseUrl']===_0x5cae73[_0x135acd(0x89)]?_0x17d820[_0x135acd(0x79)]:undefined,_0x502745=existsSync(_0xe820d5),_0x453391=_0x5cae73[_0x135acd(0x9a)](isEnvCi,_0x112307);_0x321e2d?.[_0x135acd(0xa2)](_0x135acd(0x99)),console['log']('\x0a📋\x20Authentication\x20Update'),console['log'](_0x5cae73[_0x135acd(0x88)]),console[_0x135acd(0xac)](_0x5cae73['pNuLv']),console['log'](_0x5cae73[_0x135acd(0xa9)]);const _0x1d976c=await chromium['launch']({'headless':![]}),_0xe525a6=_0x502745?{'storageState':_0xe820d5}:{};let _0x54203a=null;try{_0x54203a=await _0x1d976c['newContext'](_0xe525a6),await _0x5cae73[_0x135acd(0x9e)](addProfileSetupBanner,_0x54203a);const _0x20f003=await _0x54203a[_0x135acd(0x8a)]();await _0x20f003['goto'](_0x5cae73[_0x135acd(0x8c)](_0x1a2b14,_0x5cae73[_0x135acd(0xa3)])),await new Promise(_0x3ad0ef=>{const _0x314539={'Osptq':'Saving\x20authentication\x20state...','gvtwr':function(_0x289ee6){return _0x289ee6();}};_0x20f003['on'](_0x5cae73['wAezJ'],async()=>{const _0x579f4e=_0x419c;try{console['log'](_0x314539[_0x579f4e(0x93)]),await _0x54203a?.[_0x579f4e(0x8f)]({'path':_0xe820d5}),_0x3ad0ef();}catch{_0x314539[_0x579f4e(0xa8)](_0x3ad0ef);}});});}finally{_0x54203a&&await _0x54203a[_0x135acd(0xa1)]()[_0x135acd(0x9d)](()=>{}),await _0x1d976c['close']()['catch'](()=>{});}if(_0x453391){const _0x5c3bf6=await readFile(_0xe820d5,_0x5cae73[_0x135acd(0xa4)]),_0x4c3706=await getToken();if(!_0x4c3706)console['error'](_0x135acd(0x7c)),console[_0x135acd(0xac)]('✓\x20Auth\x20state\x20saved\x20to:\x20'+_0xe820d5);else{const _0x1dc696=_0x5cae73['yCoQy'](encrypt,_0x5c3bf6,_0x4c3706);await writeFile(_0x3f5e50,_0x1dc696),await _0x5cae73[_0x135acd(0x7a)](unlink,_0xe820d5),console['log'](_0x135acd(0x97)+_0x3f5e50),console['log'](_0x5cae73[_0x135acd(0x87)]),console[_0x135acd(0xac)](_0x5cae73[_0x135acd(0xaa)]);}}else console[_0x135acd(0xac)](_0x135acd(0x82)+_0xe820d5);_0x321e2d?.['trackPhaseEnd'](_0x135acd(0x99)),_0x321e2d?.['trackPhaseStart']('config_write'),_0x17d820['browser']=_0x17d820[_0x135acd(0x92)]||{},_0x17d820[_0x135acd(0x92)]['contextOptions']=_0x17d820[_0x135acd(0x92)]['contextOptions']||{},_0x17d820['browser']['contextOptions'][_0x135acd(0x8f)]=_0xe820d5,await _0x5cae73[_0x135acd(0x85)](writeFile,_0x3d7ffd,JSON[_0x135acd(0x95)](_0x17d820,null,0x2)),console[_0x135acd(0xac)](_0x135acd(0x83)+_0x3d7ffd),_0x321e2d?.[_0x135acd(0x86)]('config_write'),console['log'](_0x135acd(0x90)+_0x112307+_0x135acd(0x9c));}
|
package/build/commands/useEnv.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x31a1(_0x340d97,_0x5b688d){_0x340d97=_0x340d97-0x1be;const _0x3e4b7c=_0x3e4b();let _0x31a1d5=_0x3e4b7c[_0x340d97];return _0x31a1d5;}(function(_0x1e58aa,_0x2becb9){const _0x242e1c=_0x31a1,_0x3a968b=_0x1e58aa();while(!![]){try{const _0x18d150=-parseInt(_0x242e1c(0x1be))/0x1*(parseInt(_0x242e1c(0x1c6))/0x2)+parseInt(_0x242e1c(0x1c7))/0x3+-parseInt(_0x242e1c(0x1c3))/0x4*(-parseInt(_0x242e1c(0x1c2))/0x5)+-parseInt(_0x242e1c(0x1bf))/0x6+-parseInt(_0x242e1c(0x1c0))/0x7+parseInt(_0x242e1c(0x1c8))/0x8*(-parseInt(_0x242e1c(0x1c9))/0x9)+parseInt(_0x242e1c(0x1c5))/0xa;if(_0x18d150===_0x2becb9)break;else _0x3a968b['push'](_0x3a968b['shift']());}catch(_0x4bdee8){_0x3a968b['push'](_0x3a968b['shift']());}}}(_0x3e4b,0x93bc9));import{join}from'path';import{existsSync}from'fs';import{getEnvDir}from'./utils/settings.js';function _0x3e4b(){const _0x3b3ea3=['settings.json','1537mODSiZ','5003664IwraNH','3905300IRpyji','.\x20Run\x20first:\x20ranger\x20profile\x20add\x20','5fylFxe','2091108xLTIyR','ChsAR','21790470jayOIx','76EIYkra','465822RCHDlD','6413752RHowpA','9wCqAYB'];_0x3e4b=function(){return _0x3b3ea3;};return _0x3e4b();}import{writeActiveProfileName}from'./utils/activeProfile.js';export async function useEnv(_0x2c2085){const _0x5c2d13=_0x31a1,_0x530acb={'zhzCk':function(_0x4d37f2,_0x3eb70f,_0x3feb58){return _0x4d37f2(_0x3eb70f,_0x3feb58);},'HDyKp':_0x5c2d13(0x1ca),'fgyYj':function(_0x5e1a05,_0x132bfa){return _0x5e1a05(_0x132bfa);},'ChsAR':function(_0x3ca8e2,_0x39865e){return _0x3ca8e2(_0x39865e);}},_0x25affe=getEnvDir(_0x2c2085),_0x6fc07e=_0x530acb['zhzCk'](join,_0x25affe,_0x530acb['HDyKp']);if(!_0x530acb['fgyYj'](existsSync,_0x25affe))throw new Error('Profile\x20\x22'+_0x2c2085+'\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x2c2085);if(!_0x530acb[_0x5c2d13(0x1c4)](existsSync,_0x6fc07e))throw new Error('Config\x20not\x20found\x20at\x20'+_0x6fc07e+_0x5c2d13(0x1c1)+_0x2c2085);await writeActiveProfileName(_0x2c2085),console['log']('\x0a✓\x20Now\x20using\x20profile\x20\x22'+_0x2c2085+'\x22');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const _0x7b20df=_0x1bab;(function(_0x26b74f,_0x2b758d){const _0x2cdcb5=_0x1bab,_0x5072d9=_0x26b74f();while(!![]){try{const _0x8c1fb4=parseInt(_0x2cdcb5(0xbe))/0x1+-parseInt(_0x2cdcb5(0xac))/0x2*(parseInt(_0x2cdcb5(0xba))/0x3)+parseInt(_0x2cdcb5(0xae))/0x4*(parseInt(_0x2cdcb5(0xb8))/0x5)+parseInt(_0x2cdcb5(0xbb))/0x6*(parseInt(_0x2cdcb5(0xad))/0x7)+-parseInt(_0x2cdcb5(0xab))/0x8+parseInt(_0x2cdcb5(0xb4))/0x9+-parseInt(_0x2cdcb5(0xbd))/0xa*(-parseInt(_0x2cdcb5(0xb6))/0xb);if(_0x8c1fb4===_0x2b758d)break;else _0x5072d9['push'](_0x5072d9['shift']());}catch(_0x1a8436){_0x5072d9['push'](_0x5072d9['shift']());}}}(_0x3896,0xf3379));import{existsSync}from'fs';function _0x3896(){const _0x1076a7=['DNPBz','11EPfyZZ','vgQGH','185OlThFg','SydnG','2084463xPQPCg','6228SSiINH','active-profile.txt','2840590qDwrNF','933114qJEOqM','trim','Ibwfr','15557992oUQiEW','4XmpCSL','7028XKZTah','16444hUfGkJ','utf-8','ljIap','DhKcI','WLNIS','faeBX','17272584gWNFJO'];_0x3896=function(){return _0x1076a7;};return _0x3896();}import{mkdir,readFile,rename,unlink,writeFile}from'fs/promises';import{join}from'path';function _0x1bab(_0xce809c,_0x57be00){_0xce809c=_0xce809c-0xaa;const _0x3896fe=_0x3896();let _0x1bab5e=_0x3896fe[_0xce809c];return _0x1bab5e;}import{getRangerDir}from'./rangerRoot.js';const ACTIVE_PROFILE_FILE=_0x7b20df(0xbc),LEGACY_ACTIVE_ENV_FILE='active-env.txt';function getActiveProfilePath(){const _0x2479e2=_0x7b20df,_0x3f43d5={'WLNIS':function(_0x234b84,_0x2e3d6b,_0x562927){return _0x234b84(_0x2e3d6b,_0x562927);}};return _0x3f43d5[_0x2479e2(0xb2)](join,getRangerDir(),ACTIVE_PROFILE_FILE);}function getLegacyActiveEnvPath(){const _0xb9099=_0x7b20df,_0x4ce2d1={'ljIap':function(_0x70d531,_0x516c5d,_0x813132){return _0x70d531(_0x516c5d,_0x813132);},'HZBLB':function(_0x5f1a04){return _0x5f1a04();}};return _0x4ce2d1[_0xb9099(0xb0)](join,_0x4ce2d1['HZBLB'](getRangerDir),LEGACY_ACTIVE_ENV_FILE);}async function migrateLegacyActiveEnv(){const _0x3ef962=_0x7b20df,_0x1343aa={'aYxVp':'utf-8','faeBX':function(_0x6516d8){return _0x6516d8();},'DhKcI':function(_0x39293c,_0x45b401,_0x1f6d89){return _0x39293c(_0x45b401,_0x1f6d89);}},_0x9f5579=getLegacyActiveEnvPath();if(!existsSync(_0x9f5579))return null;let _0x16b642=null;try{_0x16b642=(await readFile(_0x9f5579,_0x1343aa['aYxVp']))[_0x3ef962(0xbf)]()||null;}catch{_0x16b642=null;}if(!_0x16b642)return null;const _0x5ee4e2=_0x1343aa[_0x3ef962(0xb3)](getActiveProfilePath);try{await rename(_0x9f5579,_0x5ee4e2);}catch{try{const _0x38198b=getRangerDir();await _0x1343aa[_0x3ef962(0xb1)](mkdir,_0x38198b,{'recursive':!![]}),await writeFile(_0x5ee4e2,_0x16b642,_0x1343aa['aYxVp']),await unlink(_0x9f5579);}catch{}}return _0x16b642;}export async function readActiveProfileName(){const _0x323734=_0x7b20df,_0x35628c={'bOIuy':function(_0x533274){return _0x533274();},'tKtEN':function(_0x33cb3c,_0xa42ab7,_0x1c5a8e){return _0x33cb3c(_0xa42ab7,_0x1c5a8e);}},_0xfdacc0=_0x35628c['bOIuy'](getActiveProfilePath);if(existsSync(_0xfdacc0))try{return(await _0x35628c['tKtEN'](readFile,_0xfdacc0,_0x323734(0xaf)))['trim']()||null;}catch{return null;}return await migrateLegacyActiveEnv();}export async function writeActiveProfileName(_0x357d1a){const _0x3e4952=_0x7b20df,_0x49bee3={'vgQGH':function(_0x159c47){return _0x159c47();},'Ibwfr':function(_0x1d074c,_0x19c8e9,_0x2f58af){return _0x1d074c(_0x19c8e9,_0x2f58af);},'SydnG':function(_0x543d2c,_0x1a49cd,_0x409145,_0x55a1fb){return _0x543d2c(_0x1a49cd,_0x409145,_0x55a1fb);},'DNPBz':function(_0x142b27,_0x185bf5){return _0x142b27(_0x185bf5);}},_0x33769d=_0x49bee3[_0x3e4952(0xb7)](getRangerDir);await _0x49bee3[_0x3e4952(0xaa)](mkdir,_0x33769d,{'recursive':!![]});const _0x3a3c33=_0x49bee3[_0x3e4952(0xb7)](getActiveProfilePath);await _0x49bee3[_0x3e4952(0xb9)](writeFile,_0x3a3c33,_0x357d1a,'utf-8');const _0x46dda6=getLegacyActiveEnvPath();if(_0x49bee3[_0x3e4952(0xb5)](existsSync,_0x46dda6))try{await unlink(_0x46dda6);}catch{}}export async function migrateActiveProfileFile(){const _0x1d4947={'fyJIg':function(_0x4e8e27){return _0x4e8e27();}},_0x22244b=await _0x1d4947['fyJIg'](migrateLegacyActiveEnv);return _0x22244b!==null;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x1b00fe,_0x4da7d1){const _0x15f707=_0x3391,_0x10f76f=_0x1b00fe();while(!![]){try{const _0x3eb2d4=parseInt(_0x15f707(0x1c9))/0x1+-parseInt(_0x15f707(0x19f))/0x2*(-parseInt(_0x15f707(0x1d2))/0x3)+parseInt(_0x15f707(0x1db))/0x4+-parseInt(_0x15f707(0x207))/0x5*(parseInt(_0x15f707(0x1f1))/0x6)+-parseInt(_0x15f707(0x20b))/0x7*(-parseInt(_0x15f707(0x19d))/0x8)+parseInt(_0x15f707(0x189))/0x9*(-parseInt(_0x15f707(0x20c))/0xa)+parseInt(_0x15f707(0x1d4))/0xb;if(_0x3eb2d4===_0x4da7d1)break;else _0x10f76f['push'](_0x10f76f['shift']());}catch(_0xfb6cbb){_0x10f76f['push'](_0x10f76f['shift']());}}}(_0x26a5,0x5f2f8));const _0x5c8722=(function(){const _0xa3f19f=_0x3391,_0x32ffe1={'kLIGX':function(_0x3aa0e4,_0x8cc879){return _0x3aa0e4!==_0x8cc879;},'pKUxe':_0xa3f19f(0x1bc),'MnEwI':_0xa3f19f(0x211),'zdgVZ':_0xa3f19f(0x1d9),'kGgFO':function(_0x529d78,_0x10d1c3){return _0x529d78!==_0x10d1c3;},'VCZbD':_0xa3f19f(0x1a6),'CZzrA':'NjcOD'};let _0x1a322a=!![];return function(_0x2170a6,_0x27bbcb){const _0x4eaa3c=_0xa3f19f;if(_0x32ffe1[_0x4eaa3c(0x213)](_0x32ffe1['VCZbD'],_0x32ffe1[_0x4eaa3c(0x1b3)])){const _0x1c5154=_0x1a322a?function(){const _0xb5688d=_0x4eaa3c;if(_0x32ffe1['kLIGX'](_0x32ffe1[_0xb5688d(0x1a8)],_0x32ffe1[_0xb5688d(0x199)])){if(_0x27bbcb){const _0x48fa34=_0x27bbcb['apply'](_0x2170a6,arguments);return _0x27bbcb=null,_0x48fa34;}}else{const _0x34756b=_0x48bdc2?function(){const _0x796d99=_0xb5688d;if(_0x58f846){const _0xce71d3=_0x59e2c3[_0x796d99(0x1f3)](_0x1f4e22,arguments);return _0x3035a9=null,_0xce71d3;}}:function(){};return _0x45ca31=![],_0x34756b;}}:function(){};return _0x1a322a=![],_0x1c5154;}else throw new _0x78e6c0(_0x32ffe1[_0x4eaa3c(0x208)]);};}()),_0x32b7dd=_0x5c8722(this,function(){const _0x4b37f8=_0x3391,_0x2fe876={'RazNa':_0x4b37f8(0x19a)};return _0x32b7dd[_0x4b37f8(0x200)]()['search'](_0x2fe876[_0x4b37f8(0x1bb)])[_0x4b37f8(0x200)]()[_0x4b37f8(0x19b)](_0x32b7dd)[_0x4b37f8(0x1de)](_0x4b37f8(0x19a));});_0x32b7dd();import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{createHash}from'crypto';import{withRetry}from'./retry.js';export async function createBrowserSession(_0x536f8b){const _0x5ba1d9=_0x3391,_0x1b27a7={'ayGpF':_0x5ba1d9(0x19a),'oiQJV':function(_0xa84a9c){return _0xa84a9c();},'LLilJ':_0x5ba1d9(0x1a2),'oygNQ':_0x5ba1d9(0x1c8),'bzlZQ':_0x5ba1d9(0x1d9),'nEjKD':function(_0x52a3bd){return _0x52a3bd();},'KmjTo':_0x5ba1d9(0x18a),'FnLrF':_0x5ba1d9(0x1d0)},_0x33086b=await _0x1b27a7[_0x5ba1d9(0x18f)](getToken);if(!_0x33086b){if(_0x1b27a7[_0x5ba1d9(0x190)]===_0x1b27a7[_0x5ba1d9(0x205)])return _0x202fe2(_0x44901e,_0x133ab8,'application/zip');else throw new Error(_0x1b27a7['bzlZQ']);}const _0x27980b=_0x1b27a7[_0x5ba1d9(0x188)](getApiBaseUrl),_0x17bf79=await fetch(_0x27980b+_0x5ba1d9(0x1e8),{'method':_0x5ba1d9(0x1cd),'headers':{'Authorization':_0x5ba1d9(0x212)+_0x33086b,'Content-Type':_0x1b27a7['KmjTo']},'body':JSON[_0x5ba1d9(0x1c3)]({'environmentName':_0x536f8b?.[_0x5ba1d9(0x1d8)],'settings':_0x536f8b?.[_0x5ba1d9(0x1da)],'task':_0x536f8b?.[_0x5ba1d9(0x1f6)],'url':_0x536f8b?.[_0x5ba1d9(0x195)],'featureId':_0x536f8b?.[_0x5ba1d9(0x1c6)],'checklistItemId':_0x536f8b?.['checklistItemId']})});if(!_0x17bf79['ok']){if(_0x1b27a7[_0x5ba1d9(0x1f9)]!==_0x5ba1d9(0x1d0))return _0xa19f13[_0x5ba1d9(0x200)]()[_0x5ba1d9(0x1de)](bUgjbA['ayGpF'])[_0x5ba1d9(0x200)]()['constructor'](_0x25cff9)[_0x5ba1d9(0x1de)](bUgjbA[_0x5ba1d9(0x1b0)]);else{const _0x2f88e6=await _0x17bf79['text']();throw new Error(_0x5ba1d9(0x1d5)+_0x2f88e6);}}return _0x17bf79[_0x5ba1d9(0x1a1)]();}export async function updateBrowserSession(_0x3d9bd3,_0x55021c){const _0x73f567=_0x3391,_0x29c962={'hKXAo':_0x73f567(0x1d9),'mzvai':function(_0x1599b7){return _0x1599b7();},'PkICg':function(_0x5bac7a,_0x194c3d,_0x5be6f2){return _0x5bac7a(_0x194c3d,_0x5be6f2);},'aDspo':_0x73f567(0x18a),'nLbeW':_0x73f567(0x20a)};return _0x29c962['PkICg'](withRetry,async()=>{const _0x3a5021=_0x73f567,_0x2a430e=await getToken();if(!_0x2a430e)throw new Error(_0x29c962[_0x3a5021(0x1ce)]);const _0x2dec78=_0x29c962[_0x3a5021(0x1fe)](getApiBaseUrl),_0x3165f6=await _0x29c962[_0x3a5021(0x1dc)](fetch,_0x2dec78+'/api/v1/mcp/browser-sessions/'+_0x3d9bd3,{'method':_0x3a5021(0x1af),'headers':{'Authorization':_0x3a5021(0x212)+_0x2a430e,'Content-Type':_0x29c962[_0x3a5021(0x18c)]},'body':JSON[_0x3a5021(0x1c3)](_0x55021c)});if(!_0x3165f6['ok']){const _0x2fe6d5=await _0x3165f6[_0x3a5021(0x1e2)]();throw new Error(_0x3a5021(0x1a5)+_0x2fe6d5);}return _0x3165f6[_0x3a5021(0x1a1)]();},{'label':_0x29c962[_0x73f567(0x20f)]});}export async function getBrowserSession(_0x32919d){const _0x509bfd=_0x3391,_0x291dd3={'ScXCB':function(_0x2579e9){return _0x2579e9();},'JQtkz':_0x509bfd(0x1d9),'JKZys':function(_0x28944f,_0x1a2900,_0x14af5c){return _0x28944f(_0x1a2900,_0x14af5c);},'FAydJ':'GET','FOkDc':function(_0x5cdba5,_0x203f10){return _0x5cdba5===_0x203f10;},'IMAto':_0x509bfd(0x1f7),'yaPxD':_0x509bfd(0x18b)},_0x30a9c0=await _0x291dd3['ScXCB'](getToken);if(!_0x30a9c0)throw new Error(_0x291dd3[_0x509bfd(0x1c2)]);const _0x2db8dd=_0x291dd3['ScXCB'](getApiBaseUrl),_0x4b605f=await _0x291dd3[_0x509bfd(0x214)](fetch,_0x2db8dd+_0x509bfd(0x1f2)+_0x32919d,{'method':_0x291dd3[_0x509bfd(0x1dd)],'headers':{'Authorization':'Bearer\x20'+_0x30a9c0}});if(!_0x4b605f['ok']){if(_0x291dd3[_0x509bfd(0x18e)](_0x291dd3[_0x509bfd(0x196)],_0x291dd3[_0x509bfd(0x201)])){const _0x37f6a6=_0x1325c7(_0x1719d8);return'https://trace.playwright.dev/?trace='+_0x37f6a6;}else{const _0x4cbd6b=await _0x4b605f[_0x509bfd(0x1e2)]();throw new Error(_0x509bfd(0x1e9)+_0x4cbd6b);}}return _0x4b605f[_0x509bfd(0x1a1)]();}function _0x3391(_0x505152,_0x3da808){_0x505152=_0x505152-0x187;const _0x730589=_0x26a5();let _0x32b7dd=_0x730589[_0x505152];if(_0x3391['DElIuI']===undefined){var _0x5c8722=function(_0x411863){const _0x5ca59d='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x58c743='',_0x19c19c='',_0x519d1d=_0x58c743+_0x5c8722;for(let _0x5ded4b=0x0,_0x195f59,_0x2918be,_0x542473=0x0;_0x2918be=_0x411863['charAt'](_0x542473++);~_0x2918be&&(_0x195f59=_0x5ded4b%0x4?_0x195f59*0x40+_0x2918be:_0x2918be,_0x5ded4b++%0x4)?_0x58c743+=_0x519d1d['charCodeAt'](_0x542473+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x195f59>>(-0x2*_0x5ded4b&0x6)):_0x5ded4b:0x0){_0x2918be=_0x5ca59d['indexOf'](_0x2918be);}for(let _0x93dbda=0x0,_0x426560=_0x58c743['length'];_0x93dbda<_0x426560;_0x93dbda++){_0x19c19c+='%'+('00'+_0x58c743['charCodeAt'](_0x93dbda)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x19c19c);};_0x3391['uNSOIq']=_0x5c8722,_0x3391['uWnhsB']={},_0x3391['DElIuI']=!![];}const _0x26a5c3=_0x730589[0x0],_0x339146=_0x505152+_0x26a5c3,_0x1c28c0=_0x3391['uWnhsB'][_0x339146];if(!_0x1c28c0){const _0x48bdc2=function(_0x3af2f1){this['EDBvbI']=_0x3af2f1,this['HaoEjn']=[0x1,0x0,0x0],this['XoyrRL']=function(){return'newState';},this['cRHTLr']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['WwINHP']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x48bdc2['prototype']['rrBMuu']=function(){const _0x1e4cc8=new RegExp(this['cRHTLr']+this['WwINHP']),_0x5726e1=_0x1e4cc8['test'](this['XoyrRL']['toString']())?--this['HaoEjn'][0x1]:--this['HaoEjn'][0x0];return this['dXlfxD'](_0x5726e1);},_0x48bdc2['prototype']['dXlfxD']=function(_0x2b5930){if(!Boolean(~_0x2b5930))return _0x2b5930;return this['dfEIQp'](this['EDBvbI']);},_0x48bdc2['prototype']['dfEIQp']=function(_0x45ca31){for(let _0x58f846=0x0,_0x290b9a=this['HaoEjn']['length'];_0x58f846<_0x290b9a;_0x58f846++){this['HaoEjn']['push'](Math['round'](Math['random']())),_0x290b9a=this['HaoEjn']['length'];}return _0x45ca31(this['HaoEjn'][0x0]);},new _0x48bdc2(_0x3391)['rrBMuu'](),_0x32b7dd=_0x3391['uNSOIq'](_0x32b7dd),_0x3391['uWnhsB'][_0x339146]=_0x32b7dd;}else _0x32b7dd=_0x1c28c0;return _0x32b7dd;}export async function getUploadUrls(_0x55c6c3,_0x37fc44,_0x40148d,_0x1229da){const _0x4ede0e=_0x3391,_0x4b2cea={'jrtfl':function(_0x35e4a6,_0x42fa4e){return _0x35e4a6===_0x42fa4e;},'qPQfB':'zMewo','tueLz':_0x4ede0e(0x1d9),'LrQXx':function(_0x471114){return _0x471114();},'NSVRl':function(_0x2096fb,_0x538e17,_0x4ffb73){return _0x2096fb(_0x538e17,_0x4ffb73);},'EmscH':_0x4ede0e(0x18a),'CtWWs':function(_0x1ee1c4,_0x3ac773){return _0x1ee1c4!==_0x3ac773;},'quAGp':function(_0x1be1d8,_0x3092d4){return _0x1be1d8!==_0x3092d4;},'CxovJ':function(_0x2d4e41,_0x3ecc58){return _0x2d4e41!==_0x3ecc58;}},_0x16e9cf=await getToken();if(!_0x16e9cf){if(_0x4b2cea[_0x4ede0e(0x1e3)](_0x4ede0e(0x1ea),_0x4b2cea[_0x4ede0e(0x1e5)]))throw new Error(_0x4b2cea[_0x4ede0e(0x1c5)]);else{const _0x34c98e=_0x57c587['apply'](_0x1696d0,arguments);return _0x126511=null,_0x34c98e;}}const _0x325055=_0x4b2cea[_0x4ede0e(0x19e)](getApiBaseUrl),_0xf0e157=await _0x4b2cea['NSVRl'](fetch,_0x325055+_0x4ede0e(0x1f2)+_0x55c6c3+_0x4ede0e(0x1ec),{'method':_0x4ede0e(0x1cd),'headers':{'Authorization':_0x4ede0e(0x212)+_0x16e9cf,'Content-Type':_0x4b2cea[_0x4ede0e(0x1a0)]},'body':JSON[_0x4ede0e(0x1c3)]({'filename':_0x37fc44,'filetype':_0x40148d,..._0x4b2cea[_0x4ede0e(0x1cf)](_0x1229da?.[_0x4ede0e(0x191)],undefined)&&{'size':_0x1229da[_0x4ede0e(0x191)]},..._0x4b2cea[_0x4ede0e(0x1ca)](_0x1229da?.['checksum'],undefined)&&{'checksum':_0x1229da[_0x4ede0e(0x1fa)]},..._0x4b2cea[_0x4ede0e(0x1ff)](_0x1229da?.['metadata'],undefined)&&{'metadata':_0x1229da['metadata']}})});if(!_0xf0e157['ok']){const _0x5c9145=await _0xf0e157['text']();throw new Error(_0x4ede0e(0x1c7)+_0x5c9145);}return _0xf0e157[_0x4ede0e(0x1a1)]();}export async function uploadFile(_0x12e11d,_0x239e90,_0x164118){const _0x17aade=_0x3391,_0x1f33c5={'YMSsd':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','JCxSd':_0x17aade(0x202),'xHoLD':function(_0x539f91,_0x459218){return _0x539f91!==_0x459218;},'HvohB':_0x17aade(0x1b1),'KXKqK':_0x17aade(0x1eb)},_0x9d0bf4=await fetch(_0x12e11d,{'method':_0x1f33c5[_0x17aade(0x1ba)],'headers':{'Content-Type':_0x164118,'Content-Length':_0x239e90['length'][_0x17aade(0x200)]()},'body':_0x239e90});if(!_0x9d0bf4['ok']){if(_0x1f33c5[_0x17aade(0x1e6)](_0x1f33c5[_0x17aade(0x1c1)],_0x1f33c5[_0x17aade(0x1ed)])){const _0x2c210a=await _0x9d0bf4[_0x17aade(0x1e2)]();throw new Error(_0x17aade(0x1bd)+_0x2c210a);}else throw new _0x4639a3(_0x1f33c5['YMSsd']);}}export async function uploadTrace(_0x15c7cb,_0x42e224){const _0x377f87=_0x3391,_0xdc8f12={'gOqJc':function(_0x1deafa,_0x2c8d23,_0x1dbed2,_0x4ea5f7){return _0x1deafa(_0x2c8d23,_0x1dbed2,_0x4ea5f7);},'fULad':'application/zip'};return _0xdc8f12['gOqJc'](uploadFile,_0x15c7cb,_0x42e224,_0xdc8f12[_0x377f87(0x1b2)]);}export async function uploadConversation(_0xdbe894,_0x469c4b){const _0x547612=_0x3391,_0x37af3a={'VJVKy':function(_0x4b2343,_0x5dab85,_0x57e95f,_0x453768){return _0x4b2343(_0x5dab85,_0x57e95f,_0x453768);},'fmEQC':'application/jsonl'};return _0x37af3a[_0x547612(0x197)](uploadFile,_0xdbe894,_0x469c4b,_0x37af3a['fmEQC']);}function _0x26a5(){const _0x4e0212=['tM8GqvbjihrVA2vUignVBMzPz3vYzwqUifj1BJOGCMfUz2vYihnLDhvWifT0B2TLBL0','C2v0DgLUz3m','nJeXmZGWD0vxAK1M','ugTjq2C','rKf5zeO','C2vHCMnO','yujIqvi','Bgnivxq','Cg9wCfq','Dgv4Da','ANj0zMW','Aw1Hz2uVCg5N','CvbrzKi','EeHVteq','zfn4vxK','l2fWAs92ms9Ty3aVyNjVD3nLCI1ZzxnZAw9UCW','rMfPBgvKihrVigDLDcbICM93C2vYihnLC3nPB246ia','EK1LD28','EeDXrwe','l3vWBg9Hzc11CMXZ','s1HlCuS','A2P3wNe','y051r1e','qvjOz3i','nNPLExDmAW','l2fWAs92ms9Ty3aVyNjVD3nLCI1ZzxnZAw9UCY8','yxbWBhK','t3PMseC','q3HZCMO','DgfZAW','D0Tjtwm','Ew1TqKq','rM5mCKy','y2HLy2TZDw0','z3zWC1q','z0n6CMO','BvLgq1q','BxP2ywK','q3HVDKO','Dg9tDhjPBMC','EwfqEeq','ufvu','A0L4CgW','l3n0zxbZ','B3LNtLe','uffQwvK','mJGYnZu5nwn5uKHNtG','EMrNvLO','ruviu3K','DxbKyxrLqNjVD3nLCLnLC3nPB24','nJq3odCXvNHTy01m','ntm0odmWAu12zMjc','vNfIqxy','zfbhEgy','BKXIzvC','verjsgi','ExHPD3G','qMvHCMvYia','A0DNrK8','sKTAExm','t25OzhG','BKvQs0q','nZjyuNrcAKS','yxbWBgLJyxrPB24VANnVBG','CenJEgC','yurZCg8','Exz6uwe','rK9Rrgm','B2LrsLy','teXPBeO','C2L6zq','r3L1yK4','s3DcyM4','ufryvM4','DxjS','su1bDg8','vKPws3K','rMfPBgvKihrVignYzwf0zsbZDgvWigfZC2v0oIa','tw5fD0K','kcGOlISPkYKRksSK','y29UC3rYDwn0B3i','rvbSEva','oe9lDwnQwa','thjrwhG','mtaYuMfOtg1S','rw1Zy0G','ANnVBG','DKL1DeS','wLHureW','DMLKzw8VD2vIBq','rMfPBgvKihrVihvWzgf0zsbICM93C2vYihnLC3nPB246ia','rhDequ0','A2jhvNG','CeTvEgu','l2fWAs92ms9Ty3aVChjVEhKTC2vZC2LVBG','yMfZzty0','zwrvBhK','EfLjr0C','yxjcB1i','Ahr0Chm6lY90CMfJzs5WBgf5D3jPz2H0lMrLDI8/DhjHy2u9','uefuq0G','yxLhCey','DNH4suG','zLvmywq','q1P6CKe','D3nTDgG','ue53uwW','rwvIqwK','sKzTEha','zgLNzxn0','Bxfoz3q','sKn4u2q','uMf6tMe','weveswK','rMfPBgvKihrVihvWBg9HzcbMAwXLoIa','Efz1ENG','v1zcEK0','l3n0zxbZlW','shzVAei','sLf0A3O','C3rYAw5NAwz5','DKLSrMm','DhvLthO','zMvHDhvYzuLK','rMfPBgvKihrVigDLDcb1CgXVywqGvvjmCZOG','sefeCeq','ntq1nZCZCM9AtKXA','Cxvbr3a','Axb2vgy','Bwq1','ue9tva','AeTyqw8','q3rxv3m','tvfYD24','rMfPBgvKihrVignYzwf0zsb2zxjPzMLJyxrPB24GC3rLCdOG','mJa3ntDIBfDtv2O','l2fZC2v0CW','mJyZmtq1m1HbBxvsBa','rMfPBgvKihrVignYzwf0zsbICM93C2vYihnLC3nPB246ia','zNzqsuO','C2vZC2LVBLrVA2vU','zw52AxjVBM1LBNroyw1L'];_0x26a5=function(){return _0x4e0212;};return _0x26a5();}export async function uploadScreenshot(_0x411e6e,_0x4d03cd){const _0x8cdcd5=_0x3391,_0xb92ad1={'PNwQl':_0x8cdcd5(0x1e4)};return uploadFile(_0x411e6e,_0x4d03cd,_0xb92ad1[_0x8cdcd5(0x1b5)]);}export async function uploadVideo(_0x26ca02,_0x5f4f4c){const _0xe356e1=_0x3391,_0x561cb0={'TDIHb':function(_0x40bbe2,_0x2960a5,_0x5d403b,_0x251cfd){return _0x40bbe2(_0x2960a5,_0x5d403b,_0x251cfd);},'arBoR':_0xe356e1(0x1a4)};return _0x561cb0[_0xe356e1(0x210)](uploadFile,_0x26ca02,_0x5f4f4c,_0x561cb0[_0xe356e1(0x1ad)]);}export function buildTraceViewerUrl(_0x397b04){const _0x29a2c5=_0x3391,_0xc385bb={'kJVqy':function(_0x2c5499,_0x50b8ae){return _0x2c5499(_0x50b8ae);}},_0x2c3b96=_0xc385bb['kJVqy'](encodeURIComponent,_0x397b04);return _0x29a2c5(0x1ae)+_0x2c3b96;}export async function getProxySessionToken(){const _0x25e0de=_0x3391,_0x5ab64d={'VqbAv':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','xYIGG':function(_0x8eb500){return _0x8eb500();},'xVuzx':function(_0x4df1ff,_0x299f16){return _0x4df1ff===_0x299f16;},'ARhgr':_0x25e0de(0x1a3),'gvpsT':function(_0x5a8516,_0x4348e0,_0x594814){return _0x5a8516(_0x4348e0,_0x594814);},'EebAi':'POST'},_0x33c0b4=await _0x5ab64d['xYIGG'](getToken);if(!_0x33c0b4){if(_0x5ab64d[_0x25e0de(0x1be)](_0x5ab64d[_0x25e0de(0x1f0)],_0x25e0de(0x1ab)))throw new _0x47b7ef(_0x5ab64d[_0x25e0de(0x20d)]);else throw new Error(_0x5ab64d[_0x25e0de(0x20d)]);}const _0x1b2005=_0x5ab64d[_0x25e0de(0x1ac)](getApiBaseUrl),_0x87c507=await _0x5ab64d[_0x25e0de(0x1fb)](fetch,_0x1b2005+_0x25e0de(0x1a9),{'method':_0x5ab64d[_0x25e0de(0x1b6)],'headers':{'Authorization':_0x25e0de(0x212)+_0x33c0b4}});if(!_0x87c507['ok']){const _0x2f2faf=await _0x87c507[_0x25e0de(0x1e2)]();throw new Error('Failed\x20to\x20get\x20proxy\x20session\x20token:\x20'+_0x2f2faf);}const _0x804dbf=await _0x87c507['json']();return _0x804dbf[_0x25e0de(0x1d7)];}export function computeChecksum(_0x4595ad){const _0x4b429b=_0x3391,_0x477712={'wsmth':function(_0x49053b,_0x37c5ec){return _0x49053b(_0x37c5ec);},'EPlyP':_0x4b429b(0x1cc),'WVBzM':_0x4b429b(0x1aa)};return _0x477712[_0x4b429b(0x1b4)](createHash,_0x477712[_0x4b429b(0x19c)])['update'](_0x4595ad)[_0x4b429b(0x1b8)](_0x477712[_0x4b429b(0x1bf)]);}export async function createVerificationStep(_0x4fa3e8,_0x4e7324){const _0x3abc00=_0x3391,_0x17009c={'lcHUt':function(_0x1239b3,_0x27b297,_0x42cdbc,_0x143c17){return _0x1239b3(_0x27b297,_0x42cdbc,_0x143c17);},'poVpT':_0x3abc00(0x1e4),'dSxUy':function(_0x546430){return _0x546430();},'ipvTf':_0x3abc00(0x1d9),'Onhdx':function(_0x2538a4){return _0x2538a4();},'iKeJt':_0x3abc00(0x1cd),'aBbAR':_0x3abc00(0x18a),'Cxsrj':function(_0x1a02d1,_0xfcb07d){return _0x1a02d1!==_0xfcb07d;},'dPGxf':_0x3abc00(0x209)},_0x2e52a1=await _0x17009c[_0x3abc00(0x1e7)](getToken);if(!_0x2e52a1)throw new Error(_0x17009c[_0x3abc00(0x1cb)]);const _0x47d9da=_0x17009c[_0x3abc00(0x187)](getApiBaseUrl),_0x3f7d8e=await fetch(_0x47d9da+_0x3abc00(0x1f2)+_0x4fa3e8+_0x3abc00(0x204),{'method':_0x17009c['iKeJt'],'headers':{'Authorization':'Bearer\x20'+_0x2e52a1,'Content-Type':_0x17009c[_0x3abc00(0x1df)]},'body':JSON[_0x3abc00(0x1c3)](_0x4e7324)});if(!_0x3f7d8e['ok']){if(_0x17009c[_0x3abc00(0x1f5)](_0x17009c[_0x3abc00(0x20e)],_0x17009c[_0x3abc00(0x20e)]))return _0x17009c[_0x3abc00(0x1e0)](_0x4416bc,_0x415171,_0x226c80,_0x17009c[_0x3abc00(0x1e1)]);else{const _0x1edb13=await _0x3f7d8e['text']();throw new Error(_0x3abc00(0x1d1)+_0x1edb13);}}return _0x3f7d8e[_0x3abc00(0x1a1)]();}export async function createStepAsset(_0x2ffa45,_0x3423e7,_0x651364){const _0x2fd441=_0x3391,_0x2ea41b={'cNuGQ':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','gCzrj':function(_0x2b4e54){return _0x2b4e54();},'OzfHG':_0x2fd441(0x18a),'kbGVx':function(_0x372e40,_0x45923e){return _0x372e40===_0x45923e;},'PTXVn':_0x2fd441(0x193),'vIlFc':_0x2fd441(0x192)},_0x537fda=await getToken();if(!_0x537fda)throw new Error(_0x2ea41b[_0x2fd441(0x1ef)]);const _0x3e9a80=_0x2ea41b[_0x2fd441(0x1fc)](getApiBaseUrl),_0xfbe76e=await fetch(_0x3e9a80+_0x2fd441(0x1f2)+_0x2ffa45+_0x2fd441(0x1c0)+_0x3423e7+_0x2fd441(0x1d3),{'method':'POST','headers':{'Authorization':_0x2fd441(0x212)+_0x537fda,'Content-Type':_0x2ea41b[_0x2fd441(0x1f4)]},'body':JSON['stringify'](_0x651364)});if(!_0xfbe76e['ok']){if(_0x2ea41b[_0x2fd441(0x1a7)](_0x2ea41b[_0x2fd441(0x194)],_0x2ea41b[_0x2fd441(0x1c4)]))throw new _0x506775(_0x2ea41b[_0x2fd441(0x1ef)]);else{const _0x5a7a62=await _0xfbe76e[_0x2fd441(0x1e2)]();throw new Error(_0x2fd441(0x198)+_0x5a7a62);}}return _0xfbe76e[_0x2fd441(0x1a1)]();}export async function updateVerificationStep(_0x22c7b0,_0x36f389,_0x4091df){const _0xd1ce64=_0x3391,_0x3127e6={'RvPHQ':function(_0x56c46e,_0x32ec90,_0x2a7ee4,_0x2b0ff9){return _0x56c46e(_0x32ec90,_0x2a7ee4,_0x2b0ff9);},'PQjYY':'video/webm','fvPIJ':function(_0x39721f){return _0x39721f();},'kjwZq':_0xd1ce64(0x203),'mqNgt':'BYfBb','JFmxp':_0xd1ce64(0x1d9),'ymmBD':function(_0x4bc2b9,_0x449578,_0x4d9106){return _0x4bc2b9(_0x449578,_0x4d9106);},'mYFCT':'PATCH','yvzQa':_0xd1ce64(0x18a)},_0x1b96ed=await _0x3127e6[_0xd1ce64(0x1d6)](getToken);if(!_0x1b96ed){if(_0x3127e6[_0xd1ce64(0x1ee)]===_0x3127e6[_0xd1ce64(0x1b9)])return _0x3127e6['RvPHQ'](_0x266f84,_0x15a222,_0x568555,_0x3127e6[_0xd1ce64(0x206)]);else throw new Error(_0x3127e6[_0xd1ce64(0x1b7)]);}const _0x209502=getApiBaseUrl(),_0x283977=await _0x3127e6[_0xd1ce64(0x1f8)](fetch,_0x209502+_0xd1ce64(0x1f2)+_0x22c7b0+_0xd1ce64(0x1c0)+_0x36f389,{'method':_0x3127e6[_0xd1ce64(0x1fd)],'headers':{'Authorization':'Bearer\x20'+_0x1b96ed,'Content-Type':_0x3127e6[_0xd1ce64(0x18d)]},'body':JSON[_0xd1ce64(0x1c3)](_0x4091df)});if(!_0x283977['ok']){const _0x35f115=await _0x283977[_0xd1ce64(0x1e2)]();throw new Error('Failed\x20to\x20update\x20verification\x20step:\x20'+_0x35f115);}}
|
|
1
|
+
(function(_0x299fa4,_0x236651){const _0x1e984c=_0x455b,_0x46d021=_0x299fa4();while(!![]){try{const _0x360d38=parseInt(_0x1e984c(0x12f))/0x1+-parseInt(_0x1e984c(0x12e))/0x2+parseInt(_0x1e984c(0x109))/0x3+-parseInt(_0x1e984c(0xd2))/0x4*(parseInt(_0x1e984c(0xfd))/0x5)+parseInt(_0x1e984c(0x116))/0x6+parseInt(_0x1e984c(0x114))/0x7*(-parseInt(_0x1e984c(0x139))/0x8)+parseInt(_0x1e984c(0x105))/0x9;if(_0x360d38===_0x236651)break;else _0x46d021['push'](_0x46d021['shift']());}catch(_0x3358e8){_0x46d021['push'](_0x46d021['shift']());}}}(_0x3c17,0xcf4d9));const _0xd8841c=(function(){const _0x5e6633=_0x455b,_0x533123={'HLRUb':function(_0x4be49a,_0x238044){return _0x4be49a!==_0x238044;},'QpvbB':_0x5e6633(0xdb),'EdPdB':_0x5e6633(0xeb)};let _0x25155b=!![];return function(_0x4dc452,_0x5a591b){const _0x30bf0e=_0x5e6633,_0x15badd={'NAXXs':function(_0x63e4fc,_0x3e09da){const _0x1be0a8=_0x455b;return _0x533123[_0x1be0a8(0x107)](_0x63e4fc,_0x3e09da);},'PDoVW':_0x533123[_0x30bf0e(0x113)],'ErBdN':_0x533123['EdPdB']},_0x311c6b=_0x25155b?function(){const _0x3c7b3e=_0x30bf0e;if(_0x5a591b){if(_0x15badd['NAXXs'](_0x15badd[_0x3c7b3e(0xe2)],_0x15badd[_0x3c7b3e(0x11a)])){const _0x219ac0=_0x5a591b[_0x3c7b3e(0x127)](_0x4dc452,arguments);return _0x5a591b=null,_0x219ac0;}else{const _0x41f6b4=_0x28404c[_0x3c7b3e(0x127)](_0x3340ed,arguments);return _0x54d172=null,_0x41f6b4;}}}:function(){};return _0x25155b=![],_0x311c6b;};}()),_0x376775=_0xd8841c(this,function(){const _0x2a69e6=_0x455b,_0x488892={'GCNVC':'(((.+)+)+)+$'};return _0x376775[_0x2a69e6(0xce)]()[_0x2a69e6(0xd6)](_0x488892[_0x2a69e6(0x136)])[_0x2a69e6(0xce)]()[_0x2a69e6(0xf8)](_0x376775)[_0x2a69e6(0xd6)](_0x488892['GCNVC']);});_0x376775();import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';function _0x3c17(){const _0x495e23=['s21VA0q','ruHWwge','mtCYtgDeAvHO','C2vZC2LVBLrVA2vU','Dgv4Da','zgLNzxn0','C2vHCMnO','rMfPBgvKihrVihvWzgf0zsbICM93C2vYihnLC3nPB246ia','tuTMvLK','yxbWBgLJyxrPB24VANnVBMW','y2HLy2TZDw0','BMvgyu8','C3rYAw5NAwz5','DuDLCMu','ChrqteO','ALrVt3K','yMfZzty0','DKLbwK0','uerVvLC','vujkvMm','C2L6zq','rMfPBgvKihrVigDLDcbICM93C2vYihnLC3nPB246ia','r0vu','C01Iv2W','l2fWAs92ms9Ty3aVyNjVD3nLCI1ZzxnZAw9UCY8','ALPZvg8','CfbRzKS','wvvjuui','sxvKt2e','vuftzLm','DwjXreu','tg9XuwS','DgfZAW','l2fWAs92ms9Ty3aVChjVEhKTC2vZC2LVBG','CM1gr08','teHvEui','uMnfzxO','Dhblrhm','rMfPBgvKihrVignYzwf0zsb2zxjPzMLJyxrPB24GC3rLCdOG','DxbKyxrL','y29UC3rYDwn0B3i','v0vftMW','AMjvz0m','Ahr0Chm6lY90CMfJzs5WBgf5D3jPz2H0lMrLDI8/DhjHy2u9','AeHxq2W','ntCXnZvVAxboBuK','DxbKyxrLqNjVD3nLCLnLC3nPB24','A0Turwu','AK5yvgK','l2fWAs92ms9Ty3aVyNjVD3nLCI1ZzxnZAw9UCW','vKvVz2m','AgDhr2e','z09xrhu','nZaYmJiWnxferw5XBq','rwnhrK4','seXsvwi','q0zVuNy','mJq3nJeWngLxAgPLAG','q09mtgG','DgHWEhy','l2fZC2v0CW','DK5XCxq','yxbWBgLJyxrPB24VEMLW','BwTiwNu','BKrMB3y','tMTrvKS','CK1AAvC','uxb2yKi','ntK5mZa1B1rXzeDI','ANnVBG','mZu4mZqXmgPlsu1jAa','kcGOlISPkYKRksSK','Cvrqu1m','EKnxB2S','rxjcze4','svj2zvG','rMfPBgvKihrVigDLDcb1CgXVywqGvvjmCZOG','Eu1fyu0','v1PYqKi','tM8GqvbjihrVA2vUignVBMzPz3vYzwqUifj1BJOGCMfUz2vYihnLDhvWifT0B2TLBL0','ufjRsw0','yxbWBgLJyxrPB24VANnVBG','zw52AxjVBM1LBNroyw1L','Cvftv3q','qLvruw0','rMfPBgvKihrVignYzwf0zsbZDgvWigfZC2v0oIa','shfxu1y','yxbWBhK','ufvu','se9fzey','rMfPBgvKihrVignYzwf0zsbICM93C2vYihnLC3nPB246ia','qwv5zeW','EK9fBhe','l3vWBg9Hzc11CMXZ','mZm0nZGZogPnzfzPAq','mta2odCZneH0Dg9Kva','qMvHCMvYia','BgPAB1a','tLPvqNG','thzyvw4','twf1shO','l3n0zxbZlW','r0novKm','t1HJEhi','Cwvdzwu','mJrYwwLJsNe','y2HLy2TSAxn0sxrLBuLK','Bwv0ywrHDge','ue9tva','quTjBey','Aw1Hz2uVCg5N','vwrfyLe','l3n0zxbZ','rMfPBgvKihrVihvWzgf0zsb2zxjPzMLJyxrPB24GC3rLCdOG','AeHWre8','r1riCxO','ANH3rwq','vfnXq2y','DfLnDKi','DfbVA24','ANHutfG','EhDpDuS','zMvHDhvYzuLK','Bwq1','rMfPBgvKihrVihvWBg9HzcbMAwXLoIa','BgvUz3rO','q3zPy0y','vKnWywu','ALjlrxK','rMX2wxm','Dg9tDhjPBMC','v1bSAxm'];_0x3c17=function(){return _0x495e23;};return _0x3c17();}import{createHash}from'crypto';import{withRetry}from'./retry.js';function _0x455b(_0x4a1b95,_0x132bfc){_0x4a1b95=_0x4a1b95-0xc9;const _0x22ee0f=_0x3c17();let _0x376775=_0x22ee0f[_0x4a1b95];if(_0x455b['uCNmVR']===undefined){var _0xd8841c=function(_0x1d9609){const _0x4e7d05='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2ae61e='',_0xc8ac3f='',_0x15609e=_0x2ae61e+_0xd8841c;for(let _0x39794a=0x0,_0x476d9a,_0x12ad33,_0x327681=0x0;_0x12ad33=_0x1d9609['charAt'](_0x327681++);~_0x12ad33&&(_0x476d9a=_0x39794a%0x4?_0x476d9a*0x40+_0x12ad33:_0x12ad33,_0x39794a++%0x4)?_0x2ae61e+=_0x15609e['charCodeAt'](_0x327681+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x476d9a>>(-0x2*_0x39794a&0x6)):_0x39794a:0x0){_0x12ad33=_0x4e7d05['indexOf'](_0x12ad33);}for(let _0x538a13=0x0,_0x2bebfb=_0x2ae61e['length'];_0x538a13<_0x2bebfb;_0x538a13++){_0xc8ac3f+='%'+('00'+_0x2ae61e['charCodeAt'](_0x538a13)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0xc8ac3f);};_0x455b['OeaonW']=_0xd8841c,_0x455b['bcARUO']={},_0x455b['uCNmVR']=!![];}const _0x3c17f2=_0x22ee0f[0x0],_0x455b60=_0x4a1b95+_0x3c17f2,_0x41c758=_0x455b['bcARUO'][_0x455b60];if(!_0x41c758){const _0x6f6d8=function(_0xec7c8f){this['tsMoPY']=_0xec7c8f,this['YDflMT']=[0x1,0x0,0x0],this['xdYmGS']=function(){return'newState';},this['meIGKU']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['rVKuHG']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x6f6d8['prototype']['IhUWtL']=function(){const _0x4266c9=new RegExp(this['meIGKU']+this['rVKuHG']),_0xb73aab=_0x4266c9['test'](this['xdYmGS']['toString']())?--this['YDflMT'][0x1]:--this['YDflMT'][0x0];return this['sLzjoF'](_0xb73aab);},_0x6f6d8['prototype']['sLzjoF']=function(_0xc6e14d){if(!Boolean(~_0xc6e14d))return _0xc6e14d;return this['stTUvC'](this['tsMoPY']);},_0x6f6d8['prototype']['stTUvC']=function(_0x1cc7ae){for(let _0x3f442e=0x0,_0x586517=this['YDflMT']['length'];_0x3f442e<_0x586517;_0x3f442e++){this['YDflMT']['push'](Math['round'](Math['random']())),_0x586517=this['YDflMT']['length'];}return _0x1cc7ae(this['YDflMT'][0x0]);},new _0x6f6d8(_0x455b)['IhUWtL'](),_0x376775=_0x455b['OeaonW'](_0x376775),_0x455b['bcARUO'][_0x455b60]=_0x376775;}else _0x376775=_0x41c758;return _0x376775;}export async function createBrowserSession(_0x2eff06){const _0x3d9cb7=_0x455b,_0x38a105={'hHWCl':_0x3d9cb7(0x11f),'sMbWl':function(_0x25ed70,_0xc5afe2,_0x920404){return _0x25ed70(_0xc5afe2,_0x920404);},'vIAZM':'POST','IRveX':function(_0x456d5c,_0x3d33fd){return _0x456d5c===_0x3d33fd;},'kKTEe':_0x3d9cb7(0x111)},_0x29bace=await getToken();if(!_0x29bace)throw new Error(_0x3d9cb7(0x11f));const _0xba2a07=getApiBaseUrl(),_0x20082f=await _0x38a105[_0x3d9cb7(0xe7)](fetch,_0xba2a07+_0x3d9cb7(0x101),{'method':_0x38a105[_0x3d9cb7(0xe1)],'headers':{'Authorization':_0x3d9cb7(0x130)+_0x29bace,'Content-Type':_0x3d9cb7(0x121)},'body':JSON['stringify']({'environmentName':_0x2eff06?.[_0x3d9cb7(0x122)],'settings':_0x2eff06?.['settings'],'task':_0x2eff06?.[_0x3d9cb7(0xf0)],'url':_0x2eff06?.['url'],'featureId':_0x2eff06?.[_0x3d9cb7(0x14a)],'checklistItemId':_0x2eff06?.[_0x3d9cb7(0x13a)]})});if(!_0x20082f['ok']){if(_0x38a105[_0x3d9cb7(0x11b)](_0x38a105[_0x3d9cb7(0xff)],_0x38a105[_0x3d9cb7(0xff)])){const _0x551224=await _0x20082f['text']();throw new Error(_0x3d9cb7(0x12a)+_0x551224);}else throw new _0x20ce8c(_0x38a105[_0x3d9cb7(0xfc)]);}return _0x20082f['json']();}export async function updateBrowserSession(_0x32c235,_0x2bb57f){const _0x58e002=_0x455b,_0x4a9cc0={'WPlis':_0x58e002(0x11f),'zCWok':'md5','TSqCf':function(_0x15566b,_0x2f9524){return _0x15566b!==_0x2f9524;},'MmTDf':_0x58e002(0xea),'qeCee':function(_0x13c28d){return _0x13c28d();},'OcCyH':'LHUyB','GTHqz':function(_0x3471e7,_0x107c07,_0x184a66){return _0x3471e7(_0x107c07,_0x184a66);},'yMEaM':'application/json','CHqDR':_0x58e002(0xe9),'sznvR':_0x58e002(0x129),'tpKDs':_0x58e002(0xfe)};return withRetry(async()=>{const _0x128275=_0x58e002,_0x424bad={'uGere':_0x4a9cc0['WPlis']};if(_0x4a9cc0['TSqCf'](_0x4a9cc0['MmTDf'],'pPkfK'))throw new _0x17a2b2(_0x424bad[_0x128275(0xdd)]);else{const _0x4ef681=await _0x4a9cc0['qeCee'](getToken);if(!_0x4ef681){if(_0x4a9cc0[_0x128275(0x145)](_0x128275(0xf3),_0x4a9cc0['OcCyH']))throw new _0xa66f1f(_0x4a9cc0[_0x128275(0xcf)]);else throw new Error(_0x4a9cc0[_0x128275(0xcf)]);}const _0x5e8901=_0x4a9cc0[_0x128275(0x138)](getApiBaseUrl),_0x4152f0=await _0x4a9cc0[_0x128275(0x143)](fetch,_0x5e8901+_0x128275(0xe8)+_0x32c235,{'method':'PATCH','headers':{'Authorization':'Bearer\x20'+_0x4ef681,'Content-Type':_0x4a9cc0[_0x128275(0x11d)]},'body':JSON[_0x128275(0xdc)](_0x2bb57f)});if(!_0x4152f0['ok']){if(_0x4a9cc0['CHqDR']!==_0x4a9cc0['sznvR']){const _0x3bf43c=await _0x4152f0['text']();throw new Error(_0x128275(0xd7)+_0x3bf43c);}else return _0x21a25a(_0x4a9cc0[_0x128275(0x119)])[_0x128275(0xf7)](_0x4ad0fe)[_0x128275(0xd5)](_0x128275(0xe0));}return _0x4152f0['json']();}},{'label':_0x4a9cc0[_0x58e002(0xf5)]});}export async function getBrowserSession(_0x734f28){const _0x7fb115=_0x455b,_0x5d5a16={'Pvjhe':function(_0x84e505,_0x39711,_0x39d0e5,_0x288235){return _0x84e505(_0x39711,_0x39d0e5,_0x288235);},'KVsnT':_0x7fb115(0x13e),'NZUBx':function(_0xcb6032){return _0xcb6032();},'KmokD':_0x7fb115(0x11f),'jbUgC':function(_0x160366,_0x20301b,_0x10d3f3){return _0x160366(_0x20301b,_0x10d3f3);},'rmFGO':_0x7fb115(0xe6),'rMZiW':function(_0x1b016c,_0x4a3ab2){return _0x1b016c===_0x4a3ab2;},'nDfov':'yqhHE','AKIlF':_0x7fb115(0xcb)},_0x46c299=await _0x5d5a16[_0x7fb115(0x132)](getToken);if(!_0x46c299)throw new Error(_0x5d5a16[_0x7fb115(0xd0)]);const _0x437584=getApiBaseUrl(),_0x107923=await _0x5d5a16[_0x7fb115(0xfa)](fetch,_0x437584+_0x7fb115(0xe8)+_0x734f28,{'method':_0x5d5a16[_0x7fb115(0xf2)],'headers':{'Authorization':_0x7fb115(0x130)+_0x46c299}});if(!_0x107923['ok']){if(_0x5d5a16[_0x7fb115(0x112)](_0x5d5a16[_0x7fb115(0x110)],_0x5d5a16[_0x7fb115(0x13d)]))return _0x5d5a16['Pvjhe'](_0x129985,_0x30efa5,_0x18e27d,_0x5d5a16['KVsnT']);else{const _0x23523e=await _0x107923[_0x7fb115(0xd4)]();throw new Error(_0x7fb115(0xe5)+_0x23523e);}}return _0x107923[_0x7fb115(0x115)]();}export async function getUploadUrls(_0x544686,_0x1190a3,_0xa15df0,_0x504ddf){const _0x2b88f5=_0x455b,_0xa3f663={'jRKEy':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','qTPSS':function(_0x248169){return _0x248169();},'thpxv':function(_0xffc4c3,_0x491cd9,_0x398ebb){return _0xffc4c3(_0x491cd9,_0x398ebb);},'gOWDu':_0x2b88f5(0x13c),'OXcxr':_0x2b88f5(0x121),'WEENl':function(_0xe1e775,_0x2bd267){return _0xe1e775!==_0x2bd267;},'LvXUn':_0x2b88f5(0x100),'qQSWt':_0x2b88f5(0x146)},_0x5d4ff0=await _0xa3f663[_0x2b88f5(0x118)](getToken);if(!_0x5d4ff0)throw new Error(_0xa3f663[_0x2b88f5(0xcc)]);const _0x782ef8=_0xa3f663[_0x2b88f5(0x118)](getApiBaseUrl),_0x56a0bb=await _0xa3f663[_0x2b88f5(0x10b)](fetch,_0x782ef8+_0x2b88f5(0xe8)+_0x544686+_0x2b88f5(0x12d),{'method':_0xa3f663[_0x2b88f5(0x104)],'headers':{'Authorization':'Bearer\x20'+_0x5d4ff0,'Content-Type':_0xa3f663[_0x2b88f5(0x137)]},'body':JSON['stringify']({'filename':_0x1190a3,'filetype':_0xa15df0,..._0xa3f663['WEENl'](_0x504ddf?.[_0x2b88f5(0xe4)],undefined)&&{'size':_0x504ddf[_0x2b88f5(0xe4)]},..._0xa3f663[_0x2b88f5(0xf9)](_0x504ddf?.[_0x2b88f5(0xda)],undefined)&&{'checksum':_0x504ddf[_0x2b88f5(0xda)]},..._0xa3f663['WEENl'](_0x504ddf?.[_0x2b88f5(0x13b)],undefined)&&{'metadata':_0x504ddf[_0x2b88f5(0x13b)]}})});if(!_0x56a0bb['ok']){if(_0xa3f663[_0x2b88f5(0x133)]===_0xa3f663[_0x2b88f5(0x123)])throw new _0x4d2306(_0xa3f663[_0x2b88f5(0xcc)]);else{const _0x365a5c=await _0x56a0bb[_0x2b88f5(0xd4)]();throw new Error(_0x2b88f5(0x11c)+_0x365a5c);}}return _0x56a0bb[_0x2b88f5(0x115)]();}export async function uploadFile(_0x119d78,_0x1502e3,_0x3c5e44){const _0x484b2b=_0x455b,_0x44b6b8={'hgGGa':'(((.+)+)+)+$','LoqQk':function(_0x50d8b0,_0x362d7f,_0x52d240){return _0x50d8b0(_0x362d7f,_0x52d240);},'NMUOm':_0x484b2b(0x128),'CvicF':function(_0x22d80a,_0x2df234){return _0x22d80a!==_0x2df234;},'UBJVc':_0x484b2b(0xde)},_0x2790d1=await _0x44b6b8[_0x484b2b(0xef)](fetch,_0x119d78,{'method':_0x44b6b8['NMUOm'],'headers':{'Content-Type':_0x3c5e44,'Content-Length':_0x1502e3[_0x484b2b(0xc9)][_0x484b2b(0xce)]()},'body':_0x1502e3});if(!_0x2790d1['ok']){if(_0x44b6b8[_0x484b2b(0xca)](_0x44b6b8[_0x484b2b(0xe3)],_0x44b6b8['UBJVc']))return _0x23dc45[_0x484b2b(0xce)]()[_0x484b2b(0xd6)](_0x484b2b(0x117))['toString']()[_0x484b2b(0xf8)](_0x138106)[_0x484b2b(0xd6)](ZTEyDp[_0x484b2b(0x103)]);else{const _0x5a7e06=await _0x2790d1[_0x484b2b(0xd4)]();throw new Error(_0x484b2b(0x14c)+_0x5a7e06);}}}export async function uploadTrace(_0x470a24,_0x4ad034){const _0x155c57=_0x455b,_0x3f474e={'BUQQm':_0x155c57(0x10e)};return uploadFile(_0x470a24,_0x4ad034,_0x3f474e[_0x155c57(0x124)]);}export async function uploadConversation(_0x52a453,_0x43f9f0){const _0x5998f7=_0x455b,_0x5f03c9={'ljZoP':function(_0x17e10d,_0xdeebdc,_0x1a456e,_0x16e3db){return _0x17e10d(_0xdeebdc,_0x1a456e,_0x16e3db);}};return _0x5f03c9[_0x5998f7(0x131)](uploadFile,_0x52a453,_0x43f9f0,_0x5998f7(0xd9));}export async function uploadScreenshot(_0x5b1be4,_0x3d7551){return uploadFile(_0x5b1be4,_0x3d7551,'image/png');}export async function uploadVideo(_0x353fcb,_0x378683){const _0x13c23b=_0x455b,_0x2065b5={'vNqqt':function(_0x2e09a5,_0x58df51,_0x5dcdb0,_0x5503fd){return _0x2e09a5(_0x58df51,_0x5dcdb0,_0x5503fd);}};return _0x2065b5[_0x13c23b(0x10d)](uploadFile,_0x353fcb,_0x378683,'video/webm');}export function buildTraceViewerUrl(_0x366eca){const _0x3d3494=_0x455b,_0x4bd842={'QvNVW':function(_0x5aee75,_0x49f214){return _0x5aee75(_0x49f214);}},_0x4e6e3b=_0x4bd842['QvNVW'](encodeURIComponent,_0x366eca);return _0x3d3494(0xfb)+_0x4e6e3b;}export async function getProxySessionToken(){const _0x51d9b1=_0x455b,_0x3ff3b3={'COLLh':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','jxwEd':function(_0x442ed9,_0x2e47d8,_0x262c71){return _0x442ed9(_0x2e47d8,_0x262c71);},'EHpXa':_0x51d9b1(0x13c),'UdEbQ':function(_0x3be344,_0x5ce0e1){return _0x3be344===_0x5ce0e1;},'EcGFN':'xrFYl','hqtOj':_0x51d9b1(0x108)},_0x5dd24a=await getToken();if(!_0x5dd24a)throw new Error(_0x3ff3b3[_0x51d9b1(0x10a)]);const _0x2481d7=getApiBaseUrl(),_0x3ab42e=await _0x3ff3b3[_0x51d9b1(0x144)](fetch,_0x2481d7+_0x51d9b1(0xf1),{'method':_0x3ff3b3[_0x51d9b1(0xd1)],'headers':{'Authorization':_0x51d9b1(0x130)+_0x5dd24a}});if(!_0x3ab42e['ok']){if(_0x3ff3b3[_0x51d9b1(0x13f)](_0x3ff3b3[_0x51d9b1(0x106)],_0x3ff3b3['hqtOj'])){if(_0x587a77){const _0x20845d=_0x449d43[_0x51d9b1(0x127)](_0x1f2ad8,arguments);return _0x3e2f41=null,_0x20845d;}}else{const _0x523a95=await _0x3ab42e[_0x51d9b1(0xd4)]();throw new Error('Failed\x20to\x20get\x20proxy\x20session\x20token:\x20'+_0x523a95);}}const _0x48d9e6=await _0x3ab42e[_0x51d9b1(0x115)]();return _0x48d9e6[_0x51d9b1(0xd3)];}export function computeChecksum(_0x1e263d){const _0x3d157e=_0x455b,_0x3166be={'MauHz':_0x3d157e(0x14b),'xwOuK':_0x3d157e(0xe0)};return createHash(_0x3166be[_0x3d157e(0x134)])[_0x3d157e(0xf7)](_0x1e263d)[_0x3d157e(0xd5)](_0x3166be[_0x3d157e(0x149)]);}export async function createVerificationStep(_0x8ea068,_0xa39946){const _0xda4d7d=_0x455b,_0x2a7089={'VEogc':function(_0x28a69f,_0x302e9e,_0x3424b9,_0x5810f2){return _0x28a69f(_0x302e9e,_0x3424b9,_0x5810f2);},'WZrBB':_0xda4d7d(0xd9),'AeydL':function(_0x36b4b4){return _0x36b4b4();},'tPokn':_0xda4d7d(0x10f),'HqWSV':_0xda4d7d(0x11f),'jzJbw':function(_0x5d0502){return _0x5d0502();},'MKfVY':function(_0x244436,_0x4a7c60,_0x108ca7){return _0x244436(_0x4a7c60,_0x108ca7);},'jxTLX':_0xda4d7d(0x13c),'UASfS':'application/json','PRkIm':function(_0x281d27,_0x265c3d){return _0x281d27===_0x265c3d;},'cIxKp':_0xda4d7d(0xdf)},_0x250d0d=await _0x2a7089[_0xda4d7d(0x12b)](getToken);if(!_0x250d0d){if('mbGqy'===_0x2a7089[_0xda4d7d(0x147)]){const _0x413dc8=_0x6f6d8?function(){const _0x390178=_0xda4d7d;if(_0x3f442e){const _0x5d2658=_0x499b43[_0x390178(0x127)](_0x58dbb6,arguments);return _0xf99afe=null,_0x5d2658;}}:function(){};return _0x1cc7ae=![],_0x413dc8;}else throw new Error(_0x2a7089[_0xda4d7d(0x126)]);}const _0x33b25a=_0x2a7089['jzJbw'](getApiBaseUrl),_0x3132e6=await _0x2a7089[_0xda4d7d(0xd8)](fetch,_0x33b25a+'/api/v1/mcp/browser-sessions/'+_0x8ea068+_0xda4d7d(0x140),{'method':_0x2a7089[_0xda4d7d(0x148)],'headers':{'Authorization':_0xda4d7d(0x130)+_0x250d0d,'Content-Type':_0x2a7089[_0xda4d7d(0xed)]},'body':JSON[_0xda4d7d(0xdc)](_0xa39946)});if(!_0x3132e6['ok']){if(_0x2a7089[_0xda4d7d(0x120)](_0x2a7089['cIxKp'],_0x2a7089['cIxKp'])){const _0x359714=await _0x3132e6[_0xda4d7d(0xd4)]();throw new Error(_0xda4d7d(0xf6)+_0x359714);}else return _0x2a7089[_0xda4d7d(0x102)](_0x24dc86,_0x3c3296,_0x30d3b9,_0x2a7089[_0xda4d7d(0x11e)]);}return _0x3132e6['json']();}export async function createStepAsset(_0x5e118c,_0x1ca110,_0x144392){const _0x30b9ed=_0x455b,_0x1b466b={'FlvYs':function(_0x252666){return _0x252666();},'UiIGu':_0x30b9ed(0x11f),'QNFMi':function(_0x210919,_0x48f9c3,_0xe8eb95){return _0x210919(_0x48f9c3,_0xe8eb95);},'Tmbrh':_0x30b9ed(0x13c),'ubqDE':_0x30b9ed(0x121)},_0x3be17d=await _0x1b466b[_0x30b9ed(0xcd)](getToken);if(!_0x3be17d)throw new Error(_0x1b466b['UiIGu']);const _0x1f348d=_0x1b466b[_0x30b9ed(0xcd)](getApiBaseUrl),_0x586250=await _0x1b466b['QNFMi'](fetch,_0x1f348d+'/api/v1/mcp/browser-sessions/'+_0x5e118c+_0x30b9ed(0x135)+_0x1ca110+_0x30b9ed(0x10c),{'method':_0x1b466b['Tmbrh'],'headers':{'Authorization':'Bearer\x20'+_0x3be17d,'Content-Type':_0x1b466b[_0x30b9ed(0xee)]},'body':JSON[_0x30b9ed(0xdc)](_0x144392)});if(!_0x586250['ok']){const _0x32d0ae=await _0x586250['text']();throw new Error(_0x30b9ed(0x125)+_0x32d0ae);}return _0x586250[_0x30b9ed(0x115)]();}export async function updateVerificationStep(_0x1fb6d8,_0x3539db,_0x5d17c0){const _0x3e6276=_0x455b,_0x4feeb5={'IudOa':_0x3e6276(0x11f),'hHpDO':function(_0x44c010){return _0x44c010();},'RcEez':'mxTVJ','zOElq':function(_0x16e03e,_0x1b073d,_0x547518){return _0x16e03e(_0x1b073d,_0x547518);}},_0x14c4bd=await _0x4feeb5[_0x3e6276(0x142)](getToken);if(!_0x14c4bd){if(_0x4feeb5[_0x3e6276(0xf4)]===_0x4feeb5['RcEez'])throw new Error(_0x3e6276(0x11f));else throw new _0x3d6aa5(_0x4feeb5[_0x3e6276(0xec)]);}const _0x536bbf=_0x4feeb5['hHpDO'](getApiBaseUrl),_0x32432c=await _0x4feeb5[_0x3e6276(0x12c)](fetch,_0x536bbf+'/api/v1/mcp/browser-sessions/'+_0x1fb6d8+_0x3e6276(0x135)+_0x3539db,{'method':'PATCH','headers':{'Authorization':'Bearer\x20'+_0x14c4bd,'Content-Type':'application/json'},'body':JSON['stringify'](_0x5d17c0)});if(!_0x32432c['ok']){const _0xdf343b=await _0x32432c[_0x3e6276(0xd4)]();throw new Error(_0x3e6276(0x141)+_0xdf343b);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x506457,_0x4f405d){const _0x2cb587=_0x39c6,_0x44ddb8=_0x506457();while(!![]){try{const _0x354166=parseInt(_0x2cb587(0x1b2))/0x1+parseInt(_0x2cb587(0x1ad))/0x2+parseInt(_0x2cb587(0x1a8))/0x3+parseInt(_0x2cb587(0x1c1))/0x4*(-parseInt(_0x2cb587(0x1bd))/0x5)+-parseInt(_0x2cb587(0x1bf))/0x6+parseInt(_0x2cb587(0x1b8))/0x7+-parseInt(_0x2cb587(0x1b9))/0x8*(parseInt(_0x2cb587(0x1bc))/0x9);if(_0x354166===_0x4f405d)break;else _0x44ddb8['push'](_0x44ddb8['shift']());}catch(_0x4878bd){_0x44ddb8['push'](_0x44ddb8['shift']());}}}(_0x3cdc,0xa429d));import{homedir}from'os';import{join,dirname,parse}from'path';import{existsSync}from'fs';import{readFile,writeFile,mkdir}from'fs/promises';export function getClaudeConfigDir(){const _0xe559d5=_0x39c6,_0x13c512={'cDZGw':function(_0x58c5fa){return _0x58c5fa();},'ytQSj':'.claude'};return process['env'][_0xe559d5(0x1b4)]||join(_0x13c512['cDZGw'](homedir),_0x13c512[_0xe559d5(0x1b0)]);}export function getUserSkillsDir(){return join(getClaudeConfigDir(),'skills');}export function getProjectRoot(){const _0x4eb3ac=_0x39c6,_0x2a71ad={'QiYfN':function(_0x364114,_0x2d05d5){return _0x364114(_0x2d05d5);},'kYmvY':function(_0x254d21,_0x4c6dcb,_0x58acb3){return _0x254d21(_0x4c6dcb,_0x58acb3);},'BvxtP':_0x4eb3ac(0x1af)};let _0x1ad0fd=process[_0x4eb3ac(0x1ba)]();const _0x10b896=_0x2a71ad[_0x4eb3ac(0x1a9)](parse,_0x1ad0fd)['root'];while(_0x1ad0fd!==_0x10b896){if(existsSync(_0x2a71ad['kYmvY'](join,_0x1ad0fd,'.claude')))return _0x1ad0fd;if(_0x2a71ad['QiYfN'](existsSync,join(_0x1ad0fd,_0x2a71ad[_0x4eb3ac(0x1b1)])))return _0x1ad0fd;_0x1ad0fd=dirname(_0x1ad0fd);}return process['cwd']();}export function getProjectSkillsDir(){const _0x3f517e=_0x39c6,_0x315b0b={'KfzdH':function(_0x451501){return _0x451501();},'uOcqV':'skills'};return join(_0x315b0b[_0x3f517e(0x1be)](getProjectRoot),'.claude',_0x315b0b['uOcqV']);}export function getSkillsDir(_0x3633a2){return _0x3633a2==='user'?getUserSkillsDir():getProjectSkillsDir();}export function getSettingsPath(){const _0x538490=_0x39c6,_0x186c62={'qjbHz':function(_0x320e95){return _0x320e95();},'GbbNi':'settings.json'};return join(_0x186c62[_0x538490(0x1b6)](getClaudeConfigDir),_0x186c62['GbbNi']);}export async function loadClaudeSettings(){const _0x288d9a=_0x39c6,_0x48fd76=getSettingsPath();if(!existsSync(_0x48fd76))return{};try{const _0x5c5d7f=await readFile(_0x48fd76,_0x288d9a(0x1c0));return JSON['parse'](_0x5c5d7f);}catch{return{};}}export async function saveClaudeSettings(_0x341513){const _0x23aaa3=_0x39c6,_0x29d03f={'XqASK':function(_0x20a445,_0x669d5a){return _0x20a445(_0x669d5a);},'diZli':function(_0x527019,_0x49ab2a,_0x378fbb){return _0x527019(_0x49ab2a,_0x378fbb);},'vEAKP':function(_0x1d7aca,_0x1ff098){return _0x1d7aca+_0x1ff098;}},_0x45d1a9=getSettingsPath(),_0x1d404c=getClaudeConfigDir();!_0x29d03f[_0x23aaa3(0x1ac)](existsSync,_0x1d404c)&&await _0x29d03f[_0x23aaa3(0x1b3)](mkdir,_0x1d404c,{'recursive':!![]}),await writeFile(_0x45d1a9,_0x29d03f['vEAKP'](JSON[_0x23aaa3(0x1ae)](_0x341513,null,0x2),'\x0a'),_0x23aaa3(0x1c0));}function _0x39c6(_0x2d2b04,_0x2d6cec){_0x2d2b04=_0x2d2b04-0x1a8;const _0x3cdc88=_0x3cdc();let _0x39c60a=_0x3cdc88[_0x2d2b04];return _0x39c60a;}export function hasRangerServerInSettings(_0x564f60){const _0x21cd60=_0x39c6,_0xe05baa={'KQpZM':function(_0x56a1c1,_0x2cf056){return _0x56a1c1!==_0x2cf056;},'HItdo':_0x21cd60(0x1aa)};return _0xe05baa[_0x21cd60(0x1b5)](_0x564f60[_0x21cd60(0x1ab)]?.[_0xe05baa[_0x21cd60(0x1b7)]],undefined);}function _0x3cdc(){const _0x1d8888=['885332efPgOT','40nXjedR','cwd','data-mcp-server','18891yLvfyn','641735ZSXjYo','KfzdH','4398948TABqkY','utf-8','28GSHNfs','2736828hSwPSX','QiYfN','ranger','mcpServers','XqASK','472466kUtBOM','stringify','.git','ytQSj','BvxtP','1039510viKKDh','diZli','CLAUDE_CONFIG_DIR','KQpZM','qjbHz','HItdo'];_0x3cdc=function(){return _0x1d8888;};return _0x3cdc();}export function setRangerServerInSettings(_0x30cc5a){const _0x1a373c=_0x39c6,_0x3ce3a8={'QKjXh':_0x1a373c(0x1bb)};!_0x30cc5a['mcpServers']&&(_0x30cc5a[_0x1a373c(0x1ab)]={}),_0x30cc5a['mcpServers'][_0x1a373c(0x1aa)]={'command':'npx','args':['@ranger-testing/ranger-cli',_0x3ce3a8['QKjXh']]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x1747(){const _0xa8f9f=['output','inherit','enabled','2674410HLEaiW','7568oEMAWD','data','pipe','2147888FVgFcL','2204613svPPHe','close','JFZfG','toLowerCase','match','UwnwC','nlXJJ','SOJXM','4728234bPzccG','mkkJn','plugin','includes','20szvKeB','1KGloam','claude','success','[\x5cs\x5cS]*?Version:\x5cs*([\x5cd.]+)','1344634AVwciA','captureOutput','JCGyE','2539821mbllDz','version','3157MNASMD','wNPxV','message','list','[\x5cs\x5cS]*?Scope:\x5cs*(user|project|local)','stdout'];_0x1747=function(){return _0xa8f9f;};return _0x1747();}(function(_0x8c2c2a,_0x3ae998){const _0x27dee5=_0xcb25,_0x5d488f=_0x8c2c2a();while(!![]){try{const _0x2fa2db=-parseInt(_0x27dee5(0x1cb))/0x1*(-parseInt(_0x27dee5(0x1cf))/0x2)+parseInt(_0x27dee5(0x1d2))/0x3+-parseInt(_0x27dee5(0x1bd))/0x4+-parseInt(_0x27dee5(0x1b9))/0x5+-parseInt(_0x27dee5(0x1c6))/0x6+-parseInt(_0x27dee5(0x1b0))/0x7*(-parseInt(_0x27dee5(0x1ba))/0x8)+-parseInt(_0x27dee5(0x1be))/0x9*(-parseInt(_0x27dee5(0x1ca))/0xa);if(_0x2fa2db===_0x3ae998)break;else _0x5d488f['push'](_0x5d488f['shift']());}catch(_0x30e9e1){_0x5d488f['push'](_0x5d488f['shift']());}}}(_0x1747,0x8c867));import{spawn}from'child_process';export function runClaudeCommand(_0x3d6abb,_0x15daa9){const _0x11924a=_0xcb25,_0x3f3453={'vzUyI':function(_0x3f36f7,_0x2b4857){return _0x3f36f7(_0x2b4857);},'YOqYz':_0x11924a(0x1b7),'mkkJn':function(_0x172d48,_0x1e3bfb,_0x3d7251,_0x3b6256){return _0x172d48(_0x1e3bfb,_0x3d7251,_0x3b6256);},'JCGyE':_0x11924a(0x1cc),'blkiD':_0x11924a(0x1bb),'wNPxV':'error'};return new Promise(_0x1a7b5e=>{const _0x45b4ba=_0x11924a,_0x14739d={'IzHcz':function(_0x49aae3,_0x4f07d3){return _0x49aae3(_0x4f07d3);},'JFZfG':function(_0x228be4,_0x45f6d2){return _0x3f3453['vzUyI'](_0x228be4,_0x45f6d2);}},_0x374650=_0x15daa9?.[_0x45b4ba(0x1d0)]?_0x45b4ba(0x1bc):_0x3f3453['YOqYz'],_0x533e54=_0x3f3453[_0x45b4ba(0x1c7)](spawn,_0x3f3453[_0x45b4ba(0x1d1)],_0x3d6abb,{'stdio':_0x374650});let _0x6f5197='';_0x15daa9?.['captureOutput']&&_0x533e54[_0x45b4ba(0x1b5)]&&_0x533e54['stdout']['on']('data',_0x26ab76=>{_0x6f5197+=_0x26ab76['toString']();}),_0x15daa9?.[_0x45b4ba(0x1d0)]&&_0x533e54['stderr']&&_0x533e54['stderr']['on'](_0x3f3453['blkiD'],_0x3e447d=>{_0x6f5197+=_0x3e447d['toString']();}),_0x533e54['on'](_0x45b4ba(0x1bf),_0x30d599=>{const _0x27e796=_0x45b4ba;_0x30d599===0x0?_0x14739d['IzHcz'](_0x1a7b5e,{'success':!![],'output':_0x6f5197}):_0x14739d[_0x27e796(0x1c0)](_0x1a7b5e,{'success':![],'error':'Command\x20exited\x20with\x20code\x20'+_0x30d599,'output':_0x6f5197});}),_0x533e54['on'](_0x3f3453[_0x45b4ba(0x1b1)],_0x227dc8=>{const _0x1818e9=_0x45b4ba;_0x1a7b5e({'success':![],'error':_0x227dc8[_0x1818e9(0x1b2)]});});});}export async function isMarketplaceAdded(_0x415044){const _0x393469=_0xcb25,_0x582ca2={'nlXJJ':'plugin'},_0x42b2ef=await runClaudeCommand([_0x582ca2[_0x393469(0x1c4)],'marketplace','list'],{'captureOutput':!![]});if(!_0x42b2ef['success']||!_0x42b2ef[_0x393469(0x1b6)])return![];return _0x42b2ef['output'][_0x393469(0x1c9)](_0x415044);}function _0xcb25(_0x4a424b,_0xe2a68){_0x4a424b=_0x4a424b-0x1b0;const _0x174798=_0x1747();let _0xcb25fa=_0x174798[_0x4a424b];return _0xcb25fa;}export async function isPluginInstalled(_0xbf6731){const _0x33fd49=_0xcb25,_0x56f8c9={'XhPQX':_0x33fd49(0x1c8)},_0x5ccdef=await runClaudeCommand([_0x56f8c9['XhPQX'],'list'],{'captureOutput':!![]});if(!_0x5ccdef['success']||!_0x5ccdef[_0x33fd49(0x1b6)])return![];return _0x5ccdef['output']['includes'](_0xbf6731);}export async function getPluginInfo(_0x28cdea){const _0x42a01f=_0xcb25,_0x1f4e90={'hhubG':function(_0x549d95,_0x2fc0d7,_0x58c80d){return _0x549d95(_0x2fc0d7,_0x58c80d);},'unVrA':'plugin','SOJXM':_0x42a01f(0x1b3),'UwnwC':function(_0x14de59,_0x788f8d){return _0x14de59===_0x788f8d;},'bnLRl':'enabled'},_0x13838e=await _0x1f4e90['hhubG'](runClaudeCommand,[_0x1f4e90['unVrA'],_0x1f4e90[_0x42a01f(0x1c5)]],{'captureOutput':!![]});if(!_0x13838e[_0x42a01f(0x1cd)]||!_0x13838e[_0x42a01f(0x1b6)])return null;if(!_0x13838e['output'][_0x42a01f(0x1c9)](_0x28cdea))return null;const _0x297978={'name':_0x28cdea},_0x36bbf8=_0x13838e['output'][_0x42a01f(0x1c2)](new RegExp(_0x28cdea+_0x42a01f(0x1b4),'i'));_0x36bbf8&&(_0x297978['scope']=_0x36bbf8[0x1][_0x42a01f(0x1c1)]());const _0x32d0c2=_0x13838e['output'][_0x42a01f(0x1c2)](new RegExp(_0x28cdea+_0x42a01f(0x1ce),'i'));_0x32d0c2&&(_0x297978[_0x42a01f(0x1d3)]=_0x32d0c2[0x1]);const _0xc0f827=_0x13838e['output'][_0x42a01f(0x1c2)](new RegExp(_0x28cdea+'[\x5cs\x5cS]*?(enabled|disabled)','i'));return _0xc0f827&&(_0x297978[_0x42a01f(0x1b8)]=_0x1f4e90[_0x42a01f(0x1c3)](_0xc0f827[0x1]['toLowerCase'](),_0x1f4e90['bnLRl'])),_0x297978;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const _0x1cb927=_0xe897;function _0xc335(){const _0x347d72=['subarray','16DnVCuB','2743713mxWARA','256fUqVgW','12mwpwCL','44978gpQKGJ','aes-256-gcm','18348902RBEkSq','7dmsXiB','utf8','7687370mRKFYs','42lcvJvx','getAuthTag','MyObq','553056nSPrrC','final','concat','bBAWC','update','520062qJsrJc','37195njQGsd'];_0xc335=function(){return _0x347d72;};return _0xc335();}function _0xe897(_0x432a34,_0x4d5cea){_0x432a34=_0x432a34-0xa3;const _0xc3352a=_0xc335();let _0xe897f4=_0xc3352a[_0x432a34];return _0xe897f4;}(function(_0x3be5d9,_0x5ccde1){const _0x387695=_0xe897,_0x1e9564=_0x3be5d9();while(!![]){try{const _0x2c625a=-parseInt(_0x387695(0xb7))/0x1+-parseInt(_0x387695(0xae))/0x2*(parseInt(_0x387695(0xb4))/0x3)+parseInt(_0x387695(0xac))/0x4*(-parseInt(_0x387695(0xa8))/0x5)+-parseInt(_0x387695(0xa7))/0x6*(-parseInt(_0x387695(0xb1))/0x7)+-parseInt(_0x387695(0xaa))/0x8*(parseInt(_0x387695(0xab))/0x9)+parseInt(_0x387695(0xb3))/0xa+parseInt(_0x387695(0xb0))/0xb*(parseInt(_0x387695(0xad))/0xc);if(_0x2c625a===_0x5ccde1)break;else _0x1e9564['push'](_0x1e9564['shift']());}catch(_0x5b42d6){_0x1e9564['push'](_0x1e9564['shift']());}}}(_0xc335,0x8b1b8));import{createCipheriv,createDecipheriv,randomBytes,pbkdf2Sync}from'crypto';const ALGORITHM=_0x1cb927(0xaf),SALT='ranger-auth-encryption',KEY_LENGTH=0x20,IV_LENGTH=0x10,TAG_LENGTH=0x10;export function deriveKey(_0x2328e8){const _0x822111={'fzobJ':function(_0x1b41b9,_0x1e92cd,_0x2c0748,_0x478b0a,_0x386a26,_0x128fcb){return _0x1b41b9(_0x1e92cd,_0x2c0748,_0x478b0a,_0x386a26,_0x128fcb);},'pMoeF':'sha256'};return _0x822111['fzobJ'](pbkdf2Sync,_0x2328e8,SALT,0x186a0,KEY_LENGTH,_0x822111['pMoeF']);}export function encrypt(_0x516fe6,_0x4895ba){const _0x28966d=_0x1cb927,_0x37b49f={'QUtap':function(_0x47aa09,_0x26a102){return _0x47aa09(_0x26a102);},'MyObq':function(_0x42b480,_0x292841,_0x435c64,_0x2946f5){return _0x42b480(_0x292841,_0x435c64,_0x2946f5);}},_0x896e9f=_0x37b49f['QUtap'](deriveKey,_0x4895ba),_0x5cc567=randomBytes(IV_LENGTH),_0x308cc7=_0x37b49f[_0x28966d(0xb6)](createCipheriv,ALGORITHM,_0x896e9f,_0x5cc567),_0x2304fa=Buffer['concat']([_0x308cc7[_0x28966d(0xa6)](_0x516fe6,'utf8'),_0x308cc7['final']()]),_0x2321c8=_0x308cc7[_0x28966d(0xb5)]();return Buffer[_0x28966d(0xa4)]([_0x5cc567,_0x2321c8,_0x2304fa]);}export function decrypt(_0x3760c2,_0x121e06){const _0x4e02d0=_0x1cb927,_0x1169c7={'eIVPH':function(_0x395029,_0x3ca777){return _0x395029(_0x3ca777);},'bBAWC':function(_0x578018,_0x134775){return _0x578018+_0x134775;}},_0x3b712c=_0x1169c7['eIVPH'](deriveKey,_0x121e06),_0x3c23ea=_0x3760c2['subarray'](0x0,IV_LENGTH),_0x12ee2c=_0x3760c2[_0x4e02d0(0xa9)](IV_LENGTH,_0x1169c7[_0x4e02d0(0xa5)](IV_LENGTH,TAG_LENGTH)),_0x519952=_0x3760c2[_0x4e02d0(0xa9)](IV_LENGTH+TAG_LENGTH),_0x2acc5d=createDecipheriv(ALGORITHM,_0x3b712c,_0x3c23ea);return _0x2acc5d['setAuthTag'](_0x12ee2c),_0x2acc5d['update'](_0x519952)+_0x2acc5d[_0x4e02d0(0xa3)](_0x4e02d0(0xb2));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x56de17=_0x5c43;(function(_0x1d63de,_0x3978d5){const _0x1f00f1=_0x5c43,_0x2d82f1=_0x1d63de();while(!![]){try{const _0x13098a=-parseInt(_0x1f00f1(0x17e))/0x1*(-parseInt(_0x1f00f1(0x186))/0x2)+parseInt(_0x1f00f1(0x1b0))/0x3*(-parseInt(_0x1f00f1(0x1ac))/0x4)+parseInt(_0x1f00f1(0x1a3))/0x5+parseInt(_0x1f00f1(0x17f))/0x6*(-parseInt(_0x1f00f1(0x182))/0x7)+-parseInt(_0x1f00f1(0x181))/0x8*(-parseInt(_0x1f00f1(0x1a5))/0x9)+parseInt(_0x1f00f1(0x19c))/0xa+parseInt(_0x1f00f1(0x185))/0xb*(-parseInt(_0x1f00f1(0x1a8))/0xc);if(_0x13098a===_0x3978d5)break;else _0x2d82f1['push'](_0x2d82f1['shift']());}catch(_0x2f06d5){_0x2d82f1['push'](_0x2d82f1['shift']());}}}(_0x19a8,0xb2b41));import{getToken}from'./keychain.js';function _0x5c43(_0x320484,_0x4245f3){_0x320484=_0x320484-0x17b;const _0x19a8e9=_0x19a8();let _0x5c4312=_0x19a8e9[_0x320484];return _0x5c4312;}import{getApiBaseUrl}from'./environment.js';import{getCurrentVersion}from'./version.js';const SENSITIVE_FLAGS=new Set(['--token','-t','--secret',_0x56de17(0x18d),'--apikey',_0x56de17(0x19e),'--password','--pass',_0x56de17(0x1a9),_0x56de17(0x1a0),'--header','--cookie',_0x56de17(0x1b1)]),TOKEN_PATTERNS=[/^(ranger_|rngr_|sk-|pk-|api[_-]?)/i,/^[a-zA-Z0-9_-]{32,}$/,/^eyJ[a-zA-Z0-9_-]+\.[a-zA-Z0-9_-]+/];function looksLikeToken(_0x1bd845){const _0x28a5f8=_0x56de17;return TOKEN_PATTERNS['some'](_0x4f9c51=>_0x4f9c51[_0x28a5f8(0x1a4)](_0x1bd845));}export function sanitizeArgs(_0x7ccd97){const _0x15ee8f=_0x56de17,_0x570a3d=[];let _0x28a5a7=![];for(let _0x9b6ca9=0x0;_0x9b6ca9<_0x7ccd97[_0x15ee8f(0x19d)];_0x9b6ca9++){const _0x2e7eff=_0x7ccd97[_0x9b6ca9];if(_0x28a5a7){_0x570a3d['push']('[REDACTED]'),_0x28a5a7=![];continue;}if(_0x2e7eff['startsWith']('--')||_0x2e7eff['startsWith']('-')){const _0x3a2a57=_0x2e7eff['indexOf']('=');if(_0x3a2a57!==-0x1){const _0x51ca9d=_0x2e7eff[_0x15ee8f(0x189)](0x0,_0x3a2a57)[_0x15ee8f(0x18a)]();if(SENSITIVE_FLAGS['has'](_0x51ca9d)){_0x570a3d[_0x15ee8f(0x19a)](_0x2e7eff[_0x15ee8f(0x189)](0x0,_0x3a2a57)+'=[REDACTED]');continue;}}else{const _0x2b4fd8=_0x2e7eff['toLowerCase']();SENSITIVE_FLAGS[_0x15ee8f(0x1ab)](_0x2b4fd8)&&(_0x28a5a7=!![]);}_0x570a3d['push'](_0x2e7eff);}else looksLikeToken(_0x2e7eff)?_0x570a3d['push']('[REDACTED]'):_0x570a3d[_0x15ee8f(0x19a)](_0x2e7eff);}return _0x570a3d[_0x15ee8f(0x184)]('\x20');}export async function logDesirePath(_0x5e8044){const _0x35a611=_0x56de17,_0x3b664c={'DWEnx':function(_0x46c3b8){return _0x46c3b8();},'vSBmg':'has_token','SMAtZ':_0x35a611(0x191),'dPMih':_0x35a611(0x198),'eZPVP':function(_0x3c951a,_0x56aa1c,_0x40f461){return _0x3c951a(_0x56aa1c,_0x40f461);},'SJXmS':_0x35a611(0x1aa)};try{const _0x3edc16=await _0x3b664c[_0x35a611(0x1ae)](getToken)[_0x35a611(0x1af)](()=>null),_0x510bdc=getApiBaseUrl(),_0x21d0ad=getCurrentVersion(),_0x143086=_0x3edc16?_0x3b664c['vSBmg']:_0x3b664c[_0x35a611(0x190)],_0x1a732c={..._0x5e8044[_0x35a611(0x1a1)],'authStatus':_0x143086,'isTty':process['stdout']['isTTY']??![]},_0x5780dd={'Content-Type':_0x3b664c[_0x35a611(0x18c)]};_0x3edc16&&(_0x5780dd['Authorization']='Bearer\x20'+_0x3edc16);const _0x29c5ee={'rawCommand':_0x5e8044[_0x35a611(0x187)],'errorMessage':_0x5e8044['errorMessage'],'errorType':_0x5e8044['errorType'],'featureId':_0x5e8044['featureId'],'sessionId':_0x5e8044['sessionId'],'metadata':_0x1a732c,'cliVersion':_0x21d0ad};process['env'][_0x35a611(0x194)]&&(console[_0x35a611(0x17d)]('[desire-path]\x20Sending\x20log\x20to\x20'+_0x510bdc+'/api/v1/mcp/desire-path-logs'),console[_0x35a611(0x17d)](_0x35a611(0x18f)+JSON[_0x35a611(0x1a2)](_0x29c5ee,null,0x2))),await _0x3b664c[_0x35a611(0x180)](fetch,_0x510bdc+'/api/v1/mcp/desire-path-logs',{'method':_0x3b664c['SJXmS'],'headers':_0x5780dd,'body':JSON['stringify'](_0x29c5ee)});}catch(_0x546ecc){process['env'][_0x35a611(0x194)]&&console[_0x35a611(0x17d)](_0x35a611(0x188)+_0x546ecc);}}export function getErrorType(_0x19a83e,_0x287977){const _0x318546=_0x56de17,_0x2ed6bf={'BHCDd':_0x318546(0x1a6),'UfTiF':_0x318546(0x196),'qbhRS':'unknown_command','AszwJ':'Unknown\x20argument','XBfWf':_0x318546(0x1ad),'IymLL':_0x318546(0x1a7),'hHzkp':_0x318546(0x19b),'lmmrL':'syntax_error'};if(_0x287977)return'runtime_error';if(!_0x19a83e)return _0x2ed6bf['BHCDd'];if(_0x19a83e['includes'](_0x2ed6bf[_0x318546(0x192)]))return _0x2ed6bf[_0x318546(0x197)];if(_0x19a83e[_0x318546(0x19f)](_0x2ed6bf[_0x318546(0x17b)]))return _0x2ed6bf[_0x318546(0x193)];if(_0x19a83e[_0x318546(0x19f)](_0x2ed6bf[_0x318546(0x195)]))return _0x2ed6bf[_0x318546(0x17c)];if(_0x19a83e['includes'](_0x318546(0x18b)))return'invalid_option_value';if(_0x19a83e[_0x318546(0x19f)](_0x318546(0x199)))return _0x318546(0x18e);return _0x2ed6bf[_0x318546(0x183)];}function _0x19a8(){const _0x402841=['includes','--authorization','metadata','stringify','2548360MzpksJ','test','21213ZTnuQt','unknown','Not\x20enough\x20non-option\x20arguments','4776gGVclr','--auth','POST','has','110312mNJQFG','unknown_argument','DWEnx','catch','42eJmTSq','--credentials','AszwJ','hHzkp','error','1440809dsxWTn','30WageUo','eZPVP','4448gfsFgu','194642IVZLhs','lmmrL','join','91366iedCGa','2jnVsqh','rawCommand','[desire-path]\x20Failed\x20to\x20send:\x20','slice','toLowerCase','Invalid\x20values','dPMih','--api-key','missing_option','[desire-path]\x20Payload:\x20','SMAtZ','no_token','UfTiF','XBfWf','DEBUG','IymLL','Unknown\x20command','qbhRS','application/json','Missing\x20required\x20argument','push','missing_required_argument','13019060Qirglh','length','--key'];_0x19a8=function(){return _0x402841;};return _0x19a8();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x2cde13=_0x8740;(function(_0x1d6ca8,_0x4dd920){const _0x3b9991=_0x8740,_0x52e88b=_0x1d6ca8();while(!![]){try{const _0x3350ef=parseInt(_0x3b9991(0x14a))/0x1*(parseInt(_0x3b9991(0x126))/0x2)+parseInt(_0x3b9991(0x12f))/0x3+parseInt(_0x3b9991(0x139))/0x4+-parseInt(_0x3b9991(0x14b))/0x5+parseInt(_0x3b9991(0x12c))/0x6+-parseInt(_0x3b9991(0x11f))/0x7+-parseInt(_0x3b9991(0x120))/0x8;if(_0x3350ef===_0x4dd920)break;else _0x52e88b['push'](_0x52e88b['shift']());}catch(_0x5ddd17){_0x52e88b['push'](_0x52e88b['shift']());}}}(_0x44c6,0x951c4));import{exec}from'child_process';import{getCurrentEnvironment,ENVIRONMENT_CONFIGS,getApiBaseUrl}from'./environment.js';import{storeToken,storeRefreshToken}from'./keychain.js';const WORKOS_DEVICE_AUTH_URL=_0x2cde13(0x13d),WORKOS_TOKEN_URL='https://api.workos.com/user_management/authenticate';function _0x44c6(){const _0x4b4694=['iVoAT','Failed\x20to\x20create\x20organization:\x20','\x20\x20\x20A\x20human\x20needs\x20to\x20complete\x20authentication\x20in\x20the\x20browser.\x0a','user_code','oexpJ','VVAMP','CLI\x20Key','NAHHs','xVTdo','json','interval','Failed\x20to\x20refresh\x20token\x20with\x20org:\x20','Code:\x20','darwin','email','tNzOu','stdout','log','length','firstName','afuPx','2578625dqsyfj','4142096wZBkju','verification_uri_complete','QdScn','status','token','GET','39652DwngfV','/api-keys','application/json','ExxpV','name','Device\x20authorization\x20timed\x20out','3590700mRuAoe','\x0a🔐\x20Opening\x20browser\x20to\x20log\x20in...','Provisioning\x20API\x20key...','106680rYgpXp','error','qfcIe','ClkVF','application/x-www-form-urlencoded','platform','FljYd','UeUjQ','authorization_pending','text','3058260WSAyaM','refresh_token','error_description','KvzRX','https://api.workos.com/user_management/authorize/device','LUazW','mcp:write','GhTZl','access_token','Failed\x20to\x20provision\x20API\x20key:\x20','Invalid\x20JWT\x20format','stringify','vnIWT','split','write','WHXjw','Setting\x20up\x20your\x20organization...','17GkyaAL','1193620XEpANh','bpjbT'];_0x44c6=function(){return _0x4b4694;};return _0x44c6();}export async function requestDeviceCode(_0x32c830){const _0x2dc212=_0x2cde13,_0x3703d0={'ClkVF':function(_0x1db115,_0x31033e,_0x432d7b){return _0x1db115(_0x31033e,_0x432d7b);}},_0x5d568d=await _0x3703d0[_0x2dc212(0x132)](fetch,WORKOS_DEVICE_AUTH_URL,{'method':'POST','headers':{'Content-Type':_0x2dc212(0x133)},'body':new URLSearchParams({'client_id':_0x32c830})});if(!_0x5d568d['ok']){const _0x1381ba=await _0x5d568d['text']();throw new Error('Failed\x20to\x20request\x20device\x20code:\x20'+_0x5d568d['status']+'\x20'+_0x1381ba);}return _0x5d568d[_0x2dc212(0x156)]();}function _0x8740(_0x372eb4,_0x1acd94){_0x372eb4=_0x372eb4-0x116;const _0x44c619=_0x44c6();let _0x8740ae=_0x44c619[_0x372eb4];return _0x8740ae;}export async function pollForTokens(_0x14acf9,_0x1b3af8,_0x56eca6,_0x40eca1){const _0x4e2c27=_0x2cde13,_0x123a3c={'VHkHK':function(_0x1a619d,_0x35ec2e){return _0x1a619d+_0x35ec2e;},'afuPx':function(_0xf5b734,_0x362dc0){return _0xf5b734*_0x362dc0;},'FcdER':function(_0x2baa12,_0x4cae88){return _0x2baa12*_0x4cae88;},'FljYd':function(_0x565137,_0x4b6338){return _0x565137(_0x4b6338);},'rwBFL':'POST','vnIWT':_0x4e2c27(0x133),'FTdFz':'Authentication\x20failed'},_0x1d7988=_0x123a3c['VHkHK'](Date['now'](),_0x123a3c[_0x4e2c27(0x11e)](_0x40eca1,0x3e8));let _0xe115a0=_0x123a3c['FcdER'](_0x56eca6,0x3e8);while(Date['now']()<_0x1d7988){await _0x123a3c[_0x4e2c27(0x135)](sleep,_0xe115a0);const _0x2b64b8=await fetch(WORKOS_TOKEN_URL,{'method':_0x123a3c['rwBFL'],'headers':{'Content-Type':_0x123a3c[_0x4e2c27(0x145)]},'body':new URLSearchParams({'client_id':_0x14acf9,'device_code':_0x1b3af8,'grant_type':'urn:ietf:params:oauth:grant-type:device_code'})});if(_0x2b64b8['ok'])return _0x2b64b8['json']();const _0x356319=await _0x2b64b8['json']();if(_0x356319['error']===_0x4e2c27(0x137))continue;if(_0x356319['error']==='slow_down'){_0xe115a0+=0x3e8;continue;}throw new Error(_0x356319[_0x4e2c27(0x13b)]||_0x356319[_0x4e2c27(0x130)]||_0x123a3c['FTdFz']);}throw new Error(_0x4e2c27(0x12b));}async function fetchUserProfile(_0x2d9858){const _0x34a520=_0x2cde13,_0x3140fd={'ExxpV':function(_0x4448f0,_0x21bd10,_0x5227c1){return _0x4448f0(_0x21bd10,_0x5227c1);}},_0x58aeb4=getApiBaseUrl();try{const _0x4c22fb=await _0x3140fd[_0x34a520(0x129)](fetch,_0x58aeb4+'/organization/me',{'method':_0x34a520(0x125),'headers':{'workos-token':_0x2d9858}});if(_0x4c22fb['ok'])return _0x4c22fb[_0x34a520(0x156)]();}catch{}return null;}function buildKeyName(_0x9456b1,_0x3cf988){const _0x4169b7=_0x2cde13,_0x328dc8={'NAHHs':function(_0x9149b6,_0x4050c2){return _0x9149b6===_0x4050c2;},'LUazW':function(_0x28d009,_0x4821c0){return _0x28d009+_0x4821c0;}},_0x587ac6=_0x3cf988['filter'](_0x51f3f7=>_0x51f3f7['name']===_0x9456b1||_0x51f3f7[_0x4169b7(0x12a)]['startsWith'](_0x9456b1+'\x20('));if(_0x328dc8[_0x4169b7(0x154)](_0x587ac6[_0x4169b7(0x11c)],0x0))return _0x9456b1;return _0x9456b1+'\x20('+_0x328dc8[_0x4169b7(0x13e)](_0x587ac6['length'],0x1)+')';}export async function provisionApiKey(_0x11077e){const _0xafcdf2=_0x2cde13,_0x1afe2e={'HJPSg':'application/json','VVAMP':_0xafcdf2(0x153),'nYmpr':function(_0x2b8812,_0x78b3df,_0x38c146){return _0x2b8812(_0x78b3df,_0x38c146);},'hsjlC':function(_0x3231ed,_0xf5c4d2,_0x2968ac){return _0x3231ed(_0xf5c4d2,_0x2968ac);},'GhTZl':_0xafcdf2(0x13f)},_0x49cf45=getApiBaseUrl(),_0x3f13d7={'Content-Type':_0x1afe2e['HJPSg'],'workos-token':_0x11077e},_0x5d61c7=await fetchUserProfile(_0x11077e),_0x5a041a=_0x5d61c7?.[_0xafcdf2(0x11d)]||_0x5d61c7?.[_0xafcdf2(0x118)]?.['split']('@')[0x0],_0x23d9e2=_0x5a041a?_0x5a041a+'\x27s\x20CLI\x20Key':_0x1afe2e[_0xafcdf2(0x152)];let _0x128dea=[];try{const _0x3dc0fa=await _0x1afe2e['nYmpr'](fetch,_0x49cf45+'/api-keys',{'method':_0xafcdf2(0x125),'headers':_0x3f13d7});if(_0x3dc0fa['ok']){const _0x4ac793=await _0x3dc0fa['json']();_0x128dea=_0x4ac793['apiKeys'];}}catch{}const _0x4f3026=_0x1afe2e['nYmpr'](buildKeyName,_0x23d9e2,_0x128dea),_0x2a9c03=await _0x1afe2e['hsjlC'](fetch,_0x49cf45+_0xafcdf2(0x127),{'method':'POST','headers':_0x3f13d7,'body':JSON[_0xafcdf2(0x144)]({'name':_0x4f3026,'scope':_0x1afe2e[_0xafcdf2(0x140)]})});if(!_0x2a9c03['ok']){const _0x5d975e=await _0x2a9c03[_0xafcdf2(0x138)]();throw new Error(_0xafcdf2(0x142)+_0x2a9c03[_0xafcdf2(0x123)]+'\x20'+_0x5d975e);}const _0x395601=await _0x2a9c03[_0xafcdf2(0x156)]();return _0x395601['apiKey'][_0xafcdf2(0x124)];}export function openBrowser(_0x2279cd){const _0x4ddc11=_0x2cde13,_0x36d931={'xVTdo':_0x4ddc11(0x117),'bpjbT':function(_0xdd27f8,_0x17985c){return _0xdd27f8===_0x17985c;},'tvcpu':'start'},_0xd9b069=process[_0x4ddc11(0x134)],_0x2b96ff=_0xd9b069===_0x36d931[_0x4ddc11(0x155)]?'open':_0x36d931[_0x4ddc11(0x14c)](_0xd9b069,'win32')?_0x36d931['tvcpu']:'xdg-open';exec(_0x2b96ff+'\x20'+JSON['stringify'](_0x2279cd));}function decodeJwtPayload(_0x43884d){const _0x3de853=_0x2cde13,_0x4be1e3={'gTwdo':function(_0xde8f50,_0x20b0ea){return _0xde8f50!==_0x20b0ea;},'iVoAT':_0x3de853(0x143)},_0x24d0de=_0x43884d[_0x3de853(0x146)]('.');if(_0x4be1e3['gTwdo'](_0x24d0de[_0x3de853(0x11c)],0x3))throw new Error(_0x4be1e3[_0x3de853(0x14d)]);const _0x3e6443=Buffer['from'](_0x24d0de[0x1],'base64url')['toString']('utf-8');return JSON['parse'](_0x3e6443);}async function selfServeSignup(_0xe414da){const _0xc170b0=_0x2cde13,_0x1263f3={'hCcwZ':function(_0x340dd6,_0x589016,_0x27b06e){return _0x340dd6(_0x589016,_0x27b06e);},'WHXjw':_0xc170b0(0x128)},_0x3e85ae=getApiBaseUrl(),_0x34f6da=await _0x1263f3['hCcwZ'](fetch,_0x3e85ae+'/organization/self-serve-signup',{'method':'POST','headers':{'Content-Type':_0x1263f3[_0xc170b0(0x148)],'workos-token':_0xe414da}});if(!_0x34f6da['ok']){const _0x1d771d=await _0x34f6da['text']();throw new Error(_0xc170b0(0x14e)+_0x34f6da[_0xc170b0(0x123)]+'\x20'+_0x1d771d);}return _0x34f6da[_0xc170b0(0x156)]();}async function refreshTokenWithOrg(_0x309091,_0x1817de,_0x1ba312){const _0x552ca8=_0x2cde13,_0x3acabc={'qfcIe':function(_0x5792b0,_0x3437c4,_0x4c1df9){return _0x5792b0(_0x3437c4,_0x4c1df9);},'KvzRX':'POST','oexpJ':_0x552ca8(0x13a)},_0x1a3bb8=await _0x3acabc[_0x552ca8(0x131)](fetch,WORKOS_TOKEN_URL,{'method':_0x3acabc[_0x552ca8(0x13c)],'headers':{'Content-Type':_0x552ca8(0x133)},'body':new URLSearchParams({'client_id':_0x309091,'grant_type':_0x3acabc[_0x552ca8(0x151)],'refresh_token':_0x1817de,'organization_id':_0x1ba312})});if(!_0x1a3bb8['ok']){const _0x3bf269=await _0x1a3bb8['text']();throw new Error(_0x552ca8(0x158)+_0x1a3bb8['status']+'\x20'+_0x3bf269);}return _0x1a3bb8[_0x552ca8(0x156)]();}export async function runDeviceAuthFlow(){const _0x3037d9=_0x2cde13,_0x4d3d3f={'tNzOu':function(_0x3bcd36,_0x132022){return _0x3bcd36(_0x132022);},'UeUjQ':_0x3037d9(0x14f),'QdScn':function(_0x45ae0f,_0x310aff,_0x225430,_0x1f5cec,_0x5557b1){return _0x45ae0f(_0x310aff,_0x225430,_0x1f5cec,_0x5557b1);},'cdSum':_0x3037d9(0x149)},_0x45778b=getCurrentEnvironment(),_0x1b8711=ENVIRONMENT_CONFIGS[_0x45778b]['workosClientId'],_0x5e3420=await _0x4d3d3f['tNzOu'](requestDeviceCode,_0x1b8711);console[_0x3037d9(0x11b)](_0x3037d9(0x12d)),console['log'](_0x4d3d3f[_0x3037d9(0x136)]),_0x4d3d3f['tNzOu'](openBrowser,_0x5e3420['verification_uri_complete']),console['log']('If\x20the\x20browser\x20doesn\x27t\x20open,\x20visit:\x20'+_0x5e3420[_0x3037d9(0x121)]),console[_0x3037d9(0x11b)](_0x3037d9(0x116)+_0x5e3420[_0x3037d9(0x150)]+'\x0a'),process[_0x3037d9(0x11a)][_0x3037d9(0x147)]('Waiting\x20for\x20authentication...');let _0xc71265=await _0x4d3d3f[_0x3037d9(0x122)](pollForTokens,_0x1b8711,_0x5e3420['device_code'],_0x5e3420[_0x3037d9(0x157)],_0x5e3420['expires_in']);console['log']('\x20✓');const _0x289ef0=_0x4d3d3f['tNzOu'](decodeJwtPayload,_0xc71265[_0x3037d9(0x141)]);if(!_0x289ef0['org_id']){process['stdout'][_0x3037d9(0x147)](_0x4d3d3f['cdSum']);const {organizationId:_0x28edfb}=await _0x4d3d3f[_0x3037d9(0x119)](selfServeSignup,_0xc71265[_0x3037d9(0x141)]);_0xc71265=await refreshTokenWithOrg(_0x1b8711,_0xc71265['refresh_token'],_0x28edfb),console['log']('\x20✓');}process[_0x3037d9(0x11a)]['write'](_0x3037d9(0x12e));const _0x5535a7=await _0x4d3d3f['tNzOu'](provisionApiKey,_0xc71265['access_token']);return console[_0x3037d9(0x11b)]('\x20✓'),await storeToken(_0x5535a7),_0xc71265['refresh_token']&&await storeRefreshToken(_0xc71265['refresh_token']),_0x5535a7;}function sleep(_0x2aa73e){return new Promise(_0x3ed6aa=>setTimeout(_0x3ed6aa,_0x2aa73e));}
|
|
1
|
+
const _0x1ed1c5=_0x521f;(function(_0x1fe0ba,_0x3a39cd){const _0x11348d=_0x521f,_0x5e03a2=_0x1fe0ba();while(!![]){try{const _0x31783b=-parseInt(_0x11348d(0x21e))/0x1*(-parseInt(_0x11348d(0x210))/0x2)+parseInt(_0x11348d(0x1ec))/0x3+parseInt(_0x11348d(0x224))/0x4*(parseInt(_0x11348d(0x1fc))/0x5)+parseInt(_0x11348d(0x217))/0x6*(parseInt(_0x11348d(0x206))/0x7)+parseInt(_0x11348d(0x1e5))/0x8*(parseInt(_0x11348d(0x204))/0x9)+parseInt(_0x11348d(0x1ff))/0xa*(-parseInt(_0x11348d(0x1e7))/0xb)+-parseInt(_0x11348d(0x1f2))/0xc;if(_0x31783b===_0x3a39cd)break;else _0x5e03a2['push'](_0x5e03a2['shift']());}catch(_0x256aac){_0x5e03a2['push'](_0x5e03a2['shift']());}}}(_0x6918,0x5019a));import{exec}from'child_process';import{getCurrentEnvironment,ENVIRONMENT_CONFIGS,getApiBaseUrl}from'./environment.js';import{storeToken,storeRefreshToken}from'./keychain.js';function _0x6918(){const _0x2ce2df=['mcp:write','\x0a🔐\x20Opening\x20browser\x20to\x20log\x20in...','WOhnt','write','CLI\x20Key','apiKeys','365082JUXGGq','https://api.workos.com/user_management/authenticate','oTaOP','expires_in','length','application/json','status','3dyUlSV','POST','from','stringify','REqJQ','\x20\x20\x20A\x20human\x20needs\x20to\x20complete\x20authentication\x20in\x20the\x20browser.\x0a','3872ScMIeK','LKRxT','Failed\x20to\x20provision\x20API\x20key:\x20','start','Failed\x20to\x20create\x20organization:\x20','org_id','workosClientId','authorization_pending','verification_uri_complete','log','8ETKkkN','stdout','22bXoJFs','/organization/self-serve-signup','LtOGh','nccrr','GET','1259361hdeYVS','json','CVgCr','Code:\x20','Failed\x20to\x20refresh\x20token\x20with\x20org:\x20','hcbkz','15299748keUZLR','GOrUG','apiKey','application/x-www-form-urlencoded','Provisioning\x20API\x20key...','device_code','text','parse','https://api.workos.com/user_management/authorize/device','toString','3130fJIsVX','Device\x20authorization\x20timed\x20out','access_token','590830EfOCtI','interval','HEcpD','Waiting\x20for\x20authentication...','refresh_token','217269SCkjdF','split','14gInmEB','xdg-open','KFxQL','startsWith','iyIvy','pivGi','now','/api-keys','token','open','366430PByYRH'];_0x6918=function(){return _0x2ce2df;};return _0x6918();}const WORKOS_DEVICE_AUTH_URL=_0x1ed1c5(0x1fa),WORKOS_TOKEN_URL=_0x1ed1c5(0x218);export async function requestDeviceCode(_0x181c65){const _0x1d9d3c=_0x1ed1c5,_0x3f2ed5={'rCFBg':'application/x-www-form-urlencoded'},_0xa4cf9d=await fetch(WORKOS_DEVICE_AUTH_URL,{'method':_0x1d9d3c(0x21f),'headers':{'Content-Type':_0x3f2ed5['rCFBg']},'body':new URLSearchParams({'client_id':_0x181c65})});if(!_0xa4cf9d['ok']){const _0x3d7996=await _0xa4cf9d[_0x1d9d3c(0x1f8)]();throw new Error('Failed\x20to\x20request\x20device\x20code:\x20'+_0xa4cf9d['status']+'\x20'+_0x3d7996);}return _0xa4cf9d[_0x1d9d3c(0x1ed)]();}export async function pollForTokens(_0x4f4966,_0x3c8a9f,_0x27ef0c,_0x3d271a){const _0x24b519=_0x1ed1c5,_0x383ba6={'mMtCZ':function(_0x197602,_0x4901c2){return _0x197602+_0x4901c2;},'oTaOP':function(_0x37bad8,_0x555d11){return _0x37bad8*_0x555d11;},'cbiTm':function(_0x54927a,_0xe47000){return _0x54927a(_0xe47000);},'pivGi':'urn:ietf:params:oauth:grant-type:device_code'},_0x48c94b=_0x383ba6['mMtCZ'](Date[_0x24b519(0x20c)](),_0x383ba6[_0x24b519(0x219)](_0x3d271a,0x3e8));let _0x3db02f=_0x383ba6[_0x24b519(0x219)](_0x27ef0c,0x3e8);while(Date[_0x24b519(0x20c)]()<_0x48c94b){await _0x383ba6['cbiTm'](sleep,_0x3db02f);const _0xa4386a=await fetch(WORKOS_TOKEN_URL,{'method':_0x24b519(0x21f),'headers':{'Content-Type':_0x24b519(0x1f5)},'body':new URLSearchParams({'client_id':_0x4f4966,'device_code':_0x3c8a9f,'grant_type':_0x383ba6[_0x24b519(0x20b)]})});if(_0xa4386a['ok'])return _0xa4386a['json']();const _0x494043=await _0xa4386a[_0x24b519(0x1ed)]();if(_0x494043['error']===_0x24b519(0x1e2))continue;if(_0x494043['error']==='slow_down'){_0x3db02f+=0x3e8;continue;}throw new Error(_0x494043['error_description']||_0x494043['error']||'Authentication\x20failed');}throw new Error(_0x24b519(0x1fd));}async function fetchUserProfile(_0x6b58d3){const _0x2834b1=_0x1ed1c5,_0x2f14bd={'hcbkz':function(_0x31b811,_0x440143,_0x14bddf){return _0x31b811(_0x440143,_0x14bddf);},'wOhZr':_0x2834b1(0x1eb)},_0x6f4483=getApiBaseUrl();try{const _0x1c6363=await _0x2f14bd[_0x2834b1(0x1f1)](fetch,_0x6f4483+'/organization/me',{'method':_0x2f14bd['wOhZr'],'headers':{'workos-token':_0x6b58d3}});if(_0x1c6363['ok'])return _0x1c6363['json']();}catch{}return null;}function buildKeyName(_0x28575c,_0x5d8e8a){const _0x5430fb=_0x1ed1c5,_0xeb9f9={'KFxQL':function(_0xc1f2bd,_0x249cb5){return _0xc1f2bd+_0x249cb5;}},_0x494dd9=_0x5d8e8a['filter'](_0x210c3d=>_0x210c3d['name']===_0x28575c||_0x210c3d['name'][_0x5430fb(0x209)](_0x28575c+'\x20('));if(_0x494dd9[_0x5430fb(0x21b)]===0x0)return _0x28575c;return _0x28575c+'\x20('+_0xeb9f9[_0x5430fb(0x208)](_0x494dd9['length'],0x1)+')';}export async function provisionApiKey(_0x4d33b9){const _0x12da92=_0x1ed1c5,_0x375fb3={'LKRxT':function(_0x4e04be){return _0x4e04be();},'AzAfi':_0x12da92(0x215),'WOhnt':function(_0x57968c,_0x223a5f,_0x5c8760){return _0x57968c(_0x223a5f,_0x5c8760);}},_0x5d7855=_0x375fb3[_0x12da92(0x225)](getApiBaseUrl),_0x4b2c28={'Content-Type':_0x12da92(0x21c),'workos-token':_0x4d33b9},_0x1fd335=await fetchUserProfile(_0x4d33b9),_0x3f35d1=_0x1fd335?.['firstName']||_0x1fd335?.['email']?.[_0x12da92(0x205)]('@')[0x0],_0x2eac8c=_0x3f35d1?_0x3f35d1+'\x27s\x20CLI\x20Key':_0x375fb3['AzAfi'];let _0x1cffad=[];try{const _0x208006=await fetch(_0x5d7855+_0x12da92(0x20d),{'method':_0x12da92(0x1eb),'headers':_0x4b2c28});if(_0x208006['ok']){const _0x35e8c5=await _0x208006[_0x12da92(0x1ed)]();_0x1cffad=_0x35e8c5[_0x12da92(0x216)];}}catch{}const _0x222cb0=buildKeyName(_0x2eac8c,_0x1cffad),_0x549cc7=await _0x375fb3[_0x12da92(0x213)](fetch,_0x5d7855+'/api-keys',{'method':'POST','headers':_0x4b2c28,'body':JSON[_0x12da92(0x221)]({'name':_0x222cb0,'scope':_0x12da92(0x211)})});if(!_0x549cc7['ok']){const _0x25fe0f=await _0x549cc7['text']();throw new Error(_0x12da92(0x1dd)+_0x549cc7['status']+'\x20'+_0x25fe0f);}const _0x1cb7fd=await _0x549cc7[_0x12da92(0x1ed)]();return _0x1cb7fd[_0x12da92(0x1f4)][_0x12da92(0x20e)];}function _0x521f(_0x5ebc63,_0x4d5f34){_0x5ebc63=_0x5ebc63-0x1dd;const _0x691825=_0x6918();let _0x521f9e=_0x691825[_0x5ebc63];return _0x521f9e;}export function openBrowser(_0x1728c9){const _0xa91322=_0x1ed1c5,_0x1dc046={'nccrr':function(_0x127684,_0x3db4e5){return _0x127684===_0x3db4e5;},'GOrUG':_0xa91322(0x20f),'fDVnP':function(_0x24ed3c,_0x3a8ef0){return _0x24ed3c(_0x3a8ef0);}},_0x3f088b=process['platform'],_0x26babe=_0x1dc046['nccrr'](_0x3f088b,'darwin')?_0x1dc046[_0xa91322(0x1f3)]:_0x1dc046[_0xa91322(0x1ea)](_0x3f088b,'win32')?_0xa91322(0x1de):_0xa91322(0x207);_0x1dc046['fDVnP'](exec,_0x26babe+'\x20'+JSON[_0xa91322(0x221)](_0x1728c9));}function decodeJwtPayload(_0x382b33){const _0x7bd4a4=_0x1ed1c5,_0x85df50={'REqJQ':function(_0x23e294,_0xf69e86){return _0x23e294!==_0xf69e86;},'iVnMV':'base64url','VaqxS':'utf-8'},_0x14d64b=_0x382b33[_0x7bd4a4(0x205)]('.');if(_0x85df50[_0x7bd4a4(0x222)](_0x14d64b[_0x7bd4a4(0x21b)],0x3))throw new Error('Invalid\x20JWT\x20format');const _0x1545f9=Buffer[_0x7bd4a4(0x220)](_0x14d64b[0x1],_0x85df50['iVnMV'])[_0x7bd4a4(0x1fb)](_0x85df50['VaqxS']);return JSON[_0x7bd4a4(0x1f9)](_0x1545f9);}async function selfServeSignup(_0x384907){const _0x3dff41=_0x1ed1c5,_0x53b720={'LtOGh':function(_0x1bb99b){return _0x1bb99b();}},_0x5e970b=_0x53b720[_0x3dff41(0x1e9)](getApiBaseUrl),_0x1c82a2=await fetch(_0x5e970b+_0x3dff41(0x1e8),{'method':'POST','headers':{'Content-Type':'application/json','workos-token':_0x384907}});if(!_0x1c82a2['ok']){const _0x446eb8=await _0x1c82a2['text']();throw new Error(_0x3dff41(0x1df)+_0x1c82a2[_0x3dff41(0x21d)]+'\x20'+_0x446eb8);}return _0x1c82a2[_0x3dff41(0x1ed)]();}async function refreshTokenWithOrg(_0x4d2a17,_0x2c4771,_0x33712f){const _0x54368e=_0x1ed1c5,_0x11071b={'EyWkW':_0x54368e(0x21f),'HEcpD':_0x54368e(0x1f5),'iyIvy':'refresh_token'},_0x2f5602=await fetch(WORKOS_TOKEN_URL,{'method':_0x11071b['EyWkW'],'headers':{'Content-Type':_0x11071b[_0x54368e(0x201)]},'body':new URLSearchParams({'client_id':_0x4d2a17,'grant_type':_0x11071b[_0x54368e(0x20a)],'refresh_token':_0x2c4771,'organization_id':_0x33712f})});if(!_0x2f5602['ok']){const _0x31df66=await _0x2f5602[_0x54368e(0x1f8)]();throw new Error(_0x54368e(0x1f0)+_0x2f5602['status']+'\x20'+_0x31df66);}return _0x2f5602['json']();}export async function runDeviceAuthFlow(){const _0x404fbb=_0x1ed1c5,_0x4b3f71={'CVgCr':function(_0x3e3e72){return _0x3e3e72();},'kJFZx':function(_0x313459,_0x55576c,_0x17195e,_0x240b78){return _0x313459(_0x55576c,_0x17195e,_0x240b78);}},_0x5b2c3c=_0x4b3f71[_0x404fbb(0x1ee)](getCurrentEnvironment),_0x104e39=ENVIRONMENT_CONFIGS[_0x5b2c3c][_0x404fbb(0x1e1)],_0x2cff25=await requestDeviceCode(_0x104e39);console['log'](_0x404fbb(0x212)),console[_0x404fbb(0x1e4)](_0x404fbb(0x223)),openBrowser(_0x2cff25[_0x404fbb(0x1e3)]),console[_0x404fbb(0x1e4)]('If\x20the\x20browser\x20doesn\x27t\x20open,\x20visit:\x20'+_0x2cff25[_0x404fbb(0x1e3)]),console[_0x404fbb(0x1e4)](_0x404fbb(0x1ef)+_0x2cff25['user_code']+'\x0a'),process[_0x404fbb(0x1e6)][_0x404fbb(0x214)](_0x404fbb(0x202));let _0x49bc10=await pollForTokens(_0x104e39,_0x2cff25[_0x404fbb(0x1f7)],_0x2cff25[_0x404fbb(0x200)],_0x2cff25[_0x404fbb(0x21a)]);console[_0x404fbb(0x1e4)]('\x20✓');const _0x138aee=decodeJwtPayload(_0x49bc10[_0x404fbb(0x1fe)]);if(!_0x138aee[_0x404fbb(0x1e0)]){process[_0x404fbb(0x1e6)][_0x404fbb(0x214)]('Setting\x20up\x20your\x20organization...');const {organizationId:_0xa31bea}=await selfServeSignup(_0x49bc10['access_token']);_0x49bc10=await _0x4b3f71['kJFZx'](refreshTokenWithOrg,_0x104e39,_0x49bc10[_0x404fbb(0x203)],_0xa31bea),console['log']('\x20✓');}process[_0x404fbb(0x1e6)][_0x404fbb(0x214)](_0x404fbb(0x1f6));const _0x3dfa18=await provisionApiKey(_0x49bc10[_0x404fbb(0x1fe)]);return console[_0x404fbb(0x1e4)]('\x20✓'),await storeToken(_0x3dfa18),_0x49bc10[_0x404fbb(0x203)]&&await storeRefreshToken(_0x49bc10['refresh_token']),_0x3dfa18;}function sleep(_0x4641bc){return new Promise(_0x10c8a9=>setTimeout(_0x10c8a9,_0x4641bc));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const _0x1b5bfd=_0x3018;(function(_0x26caf5,_0x42cf14){const _0x3ae3c4=_0x3018,_0x558fb2=_0x26caf5();while(!![]){try{const _0xe8e5bb=parseInt(_0x3ae3c4(0x194))/0x1+-parseInt(_0x3ae3c4(0x18b))/0x2+-parseInt(_0x3ae3c4(0x195))/0x3+-parseInt(_0x3ae3c4(0x189))/0x4*(-parseInt(_0x3ae3c4(0x187))/0x5)+parseInt(_0x3ae3c4(0x19c))/0x6+-parseInt(_0x3ae3c4(0x198))/0x7+parseInt(_0x3ae3c4(0x197))/0x8;if(_0xe8e5bb===_0x42cf14)break;else _0x558fb2['push'](_0x558fb2['shift']());}catch(_0x1122ee){_0x558fb2['push'](_0x558fb2['shift']());}}}(_0x4cc7,0x37609));export const ENVIRONMENT_CONFIGS={'prod':{'apiBaseUrl':_0x1b5bfd(0x191),'workosClientId':_0x1b5bfd(0x19b),'aiProxyUrl':_0x1b5bfd(0x190)},'staging':{'apiBaseUrl':_0x1b5bfd(0x192),'workosClientId':_0x1b5bfd(0x188),'aiProxyUrl':_0x1b5bfd(0x18c)},'local':{'apiBaseUrl':_0x1b5bfd(0x18d),'workosClientId':_0x1b5bfd(0x188),'aiProxyUrl':_0x1b5bfd(0x196)}};export const DEFAULT_ENVIRONMENT=_0x1b5bfd(0x18e);export function isValidEnvironment(_0x50b3cf){const _0x3a16fe=_0x1b5bfd,_0x541a1e={'VvqRJ':function(_0x4fb170,_0x5c9c56){return _0x4fb170===_0x5c9c56;},'HfANV':function(_0x429523,_0x4f152e){return _0x429523===_0x4f152e;},'twjcF':_0x3a16fe(0x193)};return _0x541a1e['VvqRJ'](_0x50b3cf,_0x3a16fe(0x18e))||_0x541a1e[_0x3a16fe(0x18f)](_0x50b3cf,_0x541a1e[_0x3a16fe(0x18a)])||_0x50b3cf===_0x3a16fe(0x19a);}function _0x3018(_0x21ee83,_0x462566){_0x21ee83=_0x21ee83-0x187;const _0x4cc7a=_0x4cc7();let _0x3018b1=_0x4cc7a[_0x21ee83];return _0x3018b1;}export function getCurrentEnvironment(){const _0x1f6c4e=process['env']['RANGER_CLI_ENV'];if(_0x1f6c4e&&isValidEnvironment(_0x1f6c4e))return _0x1f6c4e;return DEFAULT_ENVIRONMENT;}export function getApiBaseUrl(){const _0x39f4da={'SbMnn':function(_0x48fba1){return _0x48fba1();}};return ENVIRONMENT_CONFIGS[_0x39f4da['SbMnn'](getCurrentEnvironment)]['apiBaseUrl'];}function _0x4cc7(){const _0x12d037=['client_01J9CBYM2DKWV9HM17D95Z540K','4wxPNCG','twjcF','611914JpmVRa','https://ai-proxy-301751771437.us-central1.run.app','http://localhost:8080','prod','HfANV','https://ai-proxy-716115358910.us-central1.run.app','https://api.ranger.net','https://api.staging.ranger.net','staging','369914orHsxd','267252CqBJaM','http://localhost:8090','1636104nTXMVH','1225784qEERcB','aiProxyUrl','local','client_01J9CBYM7M5ZETCF7G6614DXR2','1134708sNPxiH','167165cZYsuc'];_0x4cc7=function(){return _0x12d037;};return _0x4cc7();}export function getAiProxyUrl(){const _0x5b12f9=_0x1b5bfd,_0x3d8ec8={'elXKD':function(_0x18d17a){return _0x18d17a();}};return ENVIRONMENT_CONFIGS[_0x3d8ec8['elXKD'](getCurrentEnvironment)][_0x5b12f9(0x199)];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x19831e,_0x20ef54){const _0x52a81a=_0x34d1,_0x2c3da5=_0x19831e();while(!![]){try{const _0x57a825=-parseInt(_0x52a81a(0xb0))/0x1+-parseInt(_0x52a81a(0xa6))/0x2*(-parseInt(_0x52a81a(0xbf))/0x3)+-parseInt(_0x52a81a(0xcf))/0x4*(parseInt(_0x52a81a(0xba))/0x5)+parseInt(_0x52a81a(0xb1))/0x6*(-parseInt(_0x52a81a(0xaf))/0x7)+parseInt(_0x52a81a(0x96))/0x8+-parseInt(_0x52a81a(0xc3))/0x9*(parseInt(_0x52a81a(0xbd))/0xa)+-parseInt(_0x52a81a(0xbb))/0xb*(-parseInt(_0x52a81a(0xdd))/0xc);if(_0x57a825===_0x20ef54)break;else _0x2c3da5['push'](_0x2c3da5['shift']());}catch(_0x12c9c7){_0x2c3da5['push'](_0x2c3da5['shift']());}}}(_0x3a24,0x46b14));import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{withRetry}from'./retry.js';export async function createFeature(_0x4ad860){const _0x14f847=_0x34d1,_0x254aa8={'hMIOQ':function(_0x5a0b3c,_0x27cf8b,_0x1def38){return _0x5a0b3c(_0x27cf8b,_0x1def38);},'iCscx':_0x14f847(0xd3)},_0x599451=await getToken();if(!_0x599451)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0x1ef8b3=getApiBaseUrl(),_0x1bc8e8=await _0x254aa8['hMIOQ'](fetch,_0x1ef8b3+_0x14f847(0x9d),{'method':'POST','headers':{'Authorization':'Bearer\x20'+_0x599451,'Content-Type':_0x254aa8['iCscx']},'body':JSON[_0x14f847(0xa3)](_0x4ad860)});if(!_0x1bc8e8['ok']){const _0x29cf22=await _0x1bc8e8[_0x14f847(0xa2)]();throw new Error(_0x14f847(0xda)+_0x29cf22);}return _0x1bc8e8['json']();}export async function listFeatures(_0xf3b198){const _0xc79581=_0x34d1,_0xde3172={'QvYQm':function(_0x31788d){return _0x31788d();},'SbTcT':_0xc79581(0xde),'xwczD':function(_0x5990b1){return _0x5990b1();},'ZpkZJ':_0xc79581(0xd7),'CSwSu':'limit','ddYpu':_0xc79581(0xd0),'YDzpe':_0xc79581(0xd1),'nyuAL':_0xc79581(0xa1),'RmkQP':'GET'},_0x4285b5=await _0xde3172[_0xc79581(0xc8)](getToken);if(!_0x4285b5)throw new Error(_0xde3172['SbTcT']);const _0x69b3d3=_0xde3172['xwczD'](getApiBaseUrl),_0x33f13f=new URLSearchParams();if(_0xf3b198?.[_0xc79581(0xd7)])_0x33f13f['set'](_0xde3172[_0xc79581(0xb8)],_0xf3b198[_0xc79581(0xd7)]);if(_0xf3b198?.[_0xc79581(0xa7)])_0x33f13f['set'](_0xc79581(0xa7),_0xf3b198['gitBranch']);if(_0xf3b198?.[_0xc79581(0xca)])_0x33f13f[_0xc79581(0xb3)](_0xde3172['CSwSu'],_0xf3b198[_0xc79581(0xca)]['toString']());if(_0xf3b198?.[_0xc79581(0xd0)])_0x33f13f[_0xc79581(0xb3)](_0xde3172[_0xc79581(0xce)],_0xf3b198[_0xc79581(0xd0)][_0xc79581(0x9e)]());if(_0xf3b198?.[_0xc79581(0xd1)])_0x33f13f['set'](_0xde3172[_0xc79581(0xad)],_0xde3172['nyuAL']);const _0x356664=_0x69b3d3+'/api/v1/mcp/features'+(_0x33f13f[_0xc79581(0x9e)]()?'?'+_0x33f13f['toString']():''),_0x21f86e=await fetch(_0x356664,{'method':_0xde3172['RmkQP'],'headers':{'Authorization':_0xc79581(0xd9)+_0x4285b5}});if(!_0x21f86e['ok']){const _0x42e805=await _0x21f86e[_0xc79581(0xa2)]();throw new Error('Failed\x20to\x20list\x20feature\x20reviews:\x20'+_0x42e805);}return _0x21f86e['json']();}export async function getFeature(_0x40e797){const _0x222529=_0x34d1,_0x373b1e={'UaVmN':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]'},_0x16da8a=await getToken();if(!_0x16da8a)throw new Error(_0x373b1e[_0x222529(0xd5)]);const _0xbcc205=getApiBaseUrl(),_0x7fc40=await fetch(_0xbcc205+'/api/v1/mcp/features/'+_0x40e797,{'method':'GET','headers':{'Authorization':'Bearer\x20'+_0x16da8a}});if(!_0x7fc40['ok']){const _0x4b5900=await _0x7fc40[_0x222529(0xa2)]();throw new Error(_0x222529(0x98)+_0x4b5900);}return _0x7fc40['json']();}export async function updateFeature(_0x43eba5,_0x36360a){const _0x4b436e=_0x34d1,_0x57f1a4={'mtfyD':function(_0x4274f0){return _0x4274f0();},'HzIxp':function(_0x4b8ea5,_0x2b0e8a,_0x5101a4){return _0x4b8ea5(_0x2b0e8a,_0x5101a4);}},_0x55deea=await _0x57f1a4['mtfyD'](getToken);if(!_0x55deea)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0x2bc55d=_0x57f1a4['mtfyD'](getApiBaseUrl),_0x38c177=await _0x57f1a4['HzIxp'](fetch,_0x2bc55d+'/api/v1/mcp/features/'+_0x43eba5,{'method':_0x4b436e(0xc7),'headers':{'Authorization':'Bearer\x20'+_0x55deea,'Content-Type':'application/json'},'body':JSON[_0x4b436e(0xa3)](_0x36360a)});if(!_0x38c177['ok']){const _0xde69fe=await _0x38c177[_0x4b436e(0xa2)]();throw new Error('Failed\x20to\x20update\x20feature\x20review:\x20'+_0xde69fe);}return _0x38c177['json']();}export async function createChecklistItem(_0x10649c,_0x2a0bd0,_0x4e764c){const _0x1b5089=_0x34d1,_0x43964e={'FNUlj':function(_0x23e9ff){return _0x23e9ff();},'rzHmf':_0x1b5089(0xde),'GbJOH':function(_0x10e0e5,_0x39038c,_0x42978e){return _0x10e0e5(_0x39038c,_0x42978e);},'AnyqS':'POST','MoTIc':'application/json'},_0x497d44=await _0x43964e[_0x1b5089(0x9b)](getToken);if(!_0x497d44)throw new Error(_0x43964e['rzHmf']);const _0x49cf03=getApiBaseUrl(),_0x36ac34=await _0x43964e['GbJOH'](fetch,_0x49cf03+_0x1b5089(0x97)+_0x10649c+'/checklist',{'method':_0x43964e['AnyqS'],'headers':{'Authorization':_0x1b5089(0xd9)+_0x497d44,'Content-Type':_0x43964e['MoTIc']},'body':JSON['stringify']({'description':_0x2a0bd0,'position':_0x4e764c})});if(!_0x36ac34['ok']){const _0x3dd051=await _0x36ac34['text']();throw new Error('Failed\x20to\x20create\x20scenario:\x20'+_0x3dd051);}return _0x36ac34[_0x1b5089(0xd4)]();}export async function updateChecklistItem(_0x5bc30a,_0x45bad7,_0x1ca87e){const _0x1ae1ee=_0x34d1,_0x2cb293={'jykMD':function(_0x206793){return _0x206793();},'NqbJS':_0x1ae1ee(0xcd)};return withRetry(async()=>{const _0x19a00b=_0x1ae1ee,_0x4c2855=await getToken();if(!_0x4c2855)throw new Error(_0x19a00b(0xde));const _0x3f8418=_0x2cb293[_0x19a00b(0x9f)](getApiBaseUrl),_0x3f3684=await fetch(_0x3f8418+'/api/v1/mcp/features/'+_0x5bc30a+_0x19a00b(0xcb)+_0x45bad7,{'method':'PATCH','headers':{'Authorization':_0x19a00b(0xd9)+_0x4c2855,'Content-Type':_0x19a00b(0xd3)},'body':JSON[_0x19a00b(0xa3)](_0x1ca87e)});if(!_0x3f3684['ok']){const _0x5da59a=await _0x3f3684[_0x19a00b(0xa2)]();throw new Error(_0x19a00b(0xc0)+_0x5da59a);}return _0x3f3684[_0x19a00b(0xd4)]();},{'label':_0x2cb293['NqbJS']});}export async function getFeatureReport(_0x17ad95){const _0x5c39ad=_0x34d1,_0x420420={'sBuEN':_0x5c39ad(0xde),'UAdtM':function(_0x4d38f4,_0x53a1e2,_0x368ddf){return _0x4d38f4(_0x53a1e2,_0x368ddf);}},_0x5eef95=await getToken();if(!_0x5eef95)throw new Error(_0x420420[_0x5c39ad(0xb7)]);const _0x197fb7=getApiBaseUrl(),_0x1a8649=await _0x420420[_0x5c39ad(0xe1)](fetch,_0x197fb7+'/api/v1/mcp/features/'+_0x17ad95+_0x5c39ad(0xa0),{'method':_0x5c39ad(0xb9),'headers':{'Authorization':_0x5c39ad(0xd9)+_0x5eef95}});if(!_0x1a8649['ok']){const _0x518bf2=await _0x1a8649[_0x5c39ad(0xa2)]();throw new Error('Failed\x20to\x20get\x20feature\x20review\x20report:\x20'+_0x518bf2);}return _0x1a8649['json']();}export async function getFeatureReportMarkdown(_0x22e38e,_0x226e7f){const _0x4dae7f=_0x34d1,_0x28fd8c={'hzsMx':function(_0x596ea9){return _0x596ea9();},'Wpmhj':function(_0x20469a,_0x554b98){return _0x20469a(_0x554b98);},'YYeML':_0x4dae7f(0xa4),'HbzFF':'sessionId','TnTNq':function(_0x25e801,_0x34bdf5,_0x1910a8){return _0x25e801(_0x34bdf5,_0x1910a8);}},_0x8d2bc3=await _0x28fd8c[_0x4dae7f(0xd8)](getToken);if(!_0x8d2bc3)throw new Error(_0x4dae7f(0xde));const _0x14912c=getApiBaseUrl(),_0x4526ff=new URLSearchParams(),_0x2587b0=(_0x226e7f?.[_0x4dae7f(0xa4)]?.['length']??0x0)>0x0,_0x552e4a=_0x28fd8c['Wpmhj'](Boolean,_0x226e7f?.[_0x4dae7f(0xc9)]);_0x2587b0&&_0x226e7f?.[_0x4dae7f(0xa4)]&&_0x4526ff['set'](_0x28fd8c[_0x4dae7f(0xb2)],_0x226e7f['itemIds'][_0x4dae7f(0xcc)](','));_0x552e4a&&_0x226e7f?.['sessionId']&&_0x4526ff['set'](_0x28fd8c['HbzFF'],_0x226e7f['sessionId']);!_0x2587b0&&!_0x552e4a&&_0x226e7f?.['style']&&_0x4526ff[_0x4dae7f(0xb3)]('style',_0x226e7f['style']);const _0x5456a6=_0x14912c+_0x4dae7f(0x97)+_0x22e38e+_0x4dae7f(0xac),_0xf1e9ed=''+_0x5456a6+(_0x4526ff[_0x4dae7f(0x9e)]()?'?'+_0x4526ff[_0x4dae7f(0x9e)]():''),_0x561134=await _0x28fd8c[_0x4dae7f(0xb6)](fetch,_0xf1e9ed,{'method':_0x4dae7f(0xb9),'headers':{'Authorization':_0x4dae7f(0xd9)+_0x8d2bc3}});if(!_0x561134['ok']){const _0x29a6d=await _0x561134['text']();throw new Error(_0x4dae7f(0xb5)+_0x29a6d);}return _0x561134[_0x4dae7f(0xa2)]();}function _0x34d1(_0x30f0ae,_0x40789d){_0x30f0ae=_0x30f0ae-0x96;const _0x3a247b=_0x3a24();let _0x34d1e1=_0x3a247b[_0x30f0ae];return _0x34d1e1;}export async function listFeatureSessions(_0x70c1ad){const _0xc0744a=_0x34d1,_0x2bd992={'HZEAR':function(_0x5a35a4){return _0x5a35a4();},'wGXNu':function(_0x1af67e){return _0x1af67e();},'nzoGY':function(_0x32c1c5,_0x268887,_0x268a01){return _0x32c1c5(_0x268887,_0x268a01);}},_0x2d7717=await _0x2bd992[_0xc0744a(0xa8)](getToken);if(!_0x2d7717)throw new Error(_0xc0744a(0xde));const _0x29e8a5=_0x2bd992['wGXNu'](getApiBaseUrl),_0x360a71=await _0x2bd992[_0xc0744a(0xc6)](fetch,_0x29e8a5+'/api/v1/mcp/features/'+_0x70c1ad+_0xc0744a(0xdc),{'method':_0xc0744a(0xb9),'headers':{'Authorization':'Bearer\x20'+_0x2d7717}});if(!_0x360a71['ok']){const _0x5ed126=await _0x360a71['text']();throw new Error(_0xc0744a(0xdb)+_0x5ed126);}return _0x360a71['json']();}export async function startSession(_0x1d5a8a,_0xae1c24){const _0xb00346=_0x34d1,_0x5ae116={'GhXKl':function(_0x5ca539){return _0x5ca539();},'qDwuj':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','ifKWu':'POST'},_0xc220cf=await _0x5ae116['GhXKl'](getToken);if(!_0xc220cf)throw new Error(_0x5ae116['qDwuj']);const _0x2f8077=_0x5ae116[_0xb00346(0xd2)](getApiBaseUrl),_0x2be898=await fetch(_0x2f8077+'/api/v1/mcp/features/'+_0x1d5a8a+'/sessions/'+_0xae1c24+_0xb00346(0xbe),{'method':_0x5ae116[_0xb00346(0xc4)],'headers':{'Authorization':_0xb00346(0xd9)+_0xc220cf}});if(!_0x2be898['ok']){const _0x5b443c=await _0x2be898[_0xb00346(0xa2)]();throw new Error(_0xb00346(0xab)+_0x5b443c);}return _0x2be898[_0xb00346(0xd4)]();}function _0x3a24(){const _0x3821f4=['GET','75KEpMRy','1408rHTGxE','/comments/address','10aRKmbI','/start','127047iaJesW','Failed\x20to\x20update\x20scenario:\x20','Failed\x20to\x20get\x20item\x20feedback:\x20','WSYTV','2883429cjIIhy','ifKWu','BYJAD','nzoGY','PATCH','QvYQm','sessionId','limit','/checklist/','join','updateChecklistItem','ddYpu','42788rQjipO','offset','includeDeleted','GhXKl','application/json','json','UaVmN','DDtuH','gitRepoUrl','hzsMx','Bearer\x20','Failed\x20to\x20create\x20feature\x20review:\x20','Failed\x20to\x20list\x20sessions:\x20','/sessions','92328QBvRqJ','No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','Failed\x20to\x20mark\x20comments\x20as\x20addressed:\x20','uVvrg','UAdtM','cZOMC','2036504lRiviT','/api/v1/mcp/features/','Failed\x20to\x20get\x20feature\x20review:\x20','/feedback','/conclude','FNUlj','/action-items','/api/v1/mcp/features','toString','jykMD','/report','true','text','stringify','itemIds','POST','12cZVVuf','gitBranch','HZEAR','OsQNc','Failed\x20to\x20get\x20action\x20items:\x20','Failed\x20to\x20start\x20session:\x20','/report/markdown','YDzpe','/sessions/','7vaTBAD','503358fzWuch','1318434cQoUqH','YYeML','set','BogeX','Failed\x20to\x20get\x20feature\x20review\x20report\x20markdown:\x20','TnTNq','sBuEN','ZpkZJ'];_0x3a24=function(){return _0x3821f4;};return _0x3a24();}export async function concludeSession(_0x38cb3e,_0x2c3df){const _0x4e18ba=_0x34d1,_0x301dda={'uVvrg':_0x4e18ba(0xa5)},_0x5a819a=await getToken();if(!_0x5a819a)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0x3a47d0=getApiBaseUrl(),_0x56ea73=await fetch(_0x3a47d0+'/api/v1/mcp/features/'+_0x38cb3e+_0x4e18ba(0xae)+_0x2c3df+_0x4e18ba(0x9a),{'method':_0x301dda[_0x4e18ba(0xe0)],'headers':{'Authorization':'Bearer\x20'+_0x5a819a}});if(!_0x56ea73['ok']){const _0x3b3b54=await _0x56ea73[_0x4e18ba(0xa2)]();throw new Error('Failed\x20to\x20conclude\x20session:\x20'+_0x3b3b54);}return _0x56ea73['json']();}export async function getActionItems(_0x5d3f32){const _0x5341df=_0x34d1,_0x25caaa={'OsQNc':function(_0x7ae5ff){return _0x7ae5ff();},'ysevm':_0x5341df(0xde),'NcFwZ':function(_0x2084fa,_0x3e5af4,_0x57f632){return _0x2084fa(_0x3e5af4,_0x57f632);},'XdUmF':'GET'},_0x36f409=await _0x25caaa[_0x5341df(0xa9)](getToken);if(!_0x36f409)throw new Error(_0x25caaa['ysevm']);const _0x46a162=getApiBaseUrl(),_0x255fec=await _0x25caaa['NcFwZ'](fetch,_0x46a162+'/api/v1/mcp/features/'+_0x5d3f32+_0x5341df(0x9c),{'method':_0x25caaa['XdUmF'],'headers':{'Authorization':'Bearer\x20'+_0x36f409}});if(!_0x255fec['ok']){const _0x51a7d9=await _0x255fec['text']();throw new Error(_0x5341df(0xaa)+_0x51a7d9);}return _0x255fec['json']();}export async function getItemFeedback(_0x20ec14,_0x153924){const _0x3fa139=_0x34d1,_0x1e108={'cZOMC':function(_0x5c8295){return _0x5c8295();},'BYJAD':_0x3fa139(0xde),'ZdxlN':'GET'},_0x53ede6=await _0x1e108[_0x3fa139(0xe2)](getToken);if(!_0x53ede6)throw new Error(_0x1e108[_0x3fa139(0xc5)]);const _0x352e88=getApiBaseUrl(),_0xd2cf59=await fetch(_0x352e88+_0x3fa139(0x97)+_0x20ec14+'/checklist-items/'+_0x153924+_0x3fa139(0x99),{'method':_0x1e108['ZdxlN'],'headers':{'Authorization':_0x3fa139(0xd9)+_0x53ede6}});if(!_0xd2cf59['ok']){const _0x5c59b2=await _0xd2cf59[_0x3fa139(0xa2)]();throw new Error(_0x3fa139(0xc1)+_0x5c59b2);}return _0xd2cf59[_0x3fa139(0xd4)]();}export async function markCommentsAddressed(_0x5ea331,_0x25b07c,_0x39c66a){const _0x31911f=_0x34d1,_0x3b9a2c={'rkpbi':_0x31911f(0xde),'GKWyY':function(_0x570e2a){return _0x570e2a();},'WSYTV':'POST'},_0x46f104=await getToken();if(!_0x46f104)throw new Error(_0x3b9a2c['rkpbi']);const _0x521a68=_0x3b9a2c['GKWyY'](getApiBaseUrl),_0x106966=await fetch(_0x521a68+'/api/v1/mcp/features/'+_0x5ea331+_0x31911f(0xbc),{'method':_0x3b9a2c[_0x31911f(0xc2)],'headers':{'Authorization':'Bearer\x20'+_0x46f104,'Content-Type':'application/json'},'body':JSON['stringify']({'checklistItemId':_0x25b07c,'commentIds':_0x39c66a})});if(!_0x106966['ok']){const _0x20f99b=await _0x106966['text']();throw new Error(_0x31911f(0xdf)+_0x20f99b);}}export async function softDeleteFeature(_0x4f3543){const _0x2a5451=_0x34d1,_0x3233da=await getToken();if(!_0x3233da)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0x3897a7=getApiBaseUrl(),_0x3079e9=await fetch(_0x3897a7+'/api/v1/mcp/features/'+_0x4f3543,{'method':'DELETE','headers':{'Authorization':_0x2a5451(0xd9)+_0x3233da}});if(!_0x3079e9['ok']){const _0x2dfecf=await _0x3079e9[_0x2a5451(0xa2)]();throw new Error('Failed\x20to\x20delete\x20feature\x20review:\x20'+_0x2dfecf);}}export async function restoreFeature(_0x57359b){const _0x194c7d=_0x34d1,_0x173e60={'DDtuH':_0x194c7d(0xde),'HFaUx':function(_0x40bc08){return _0x40bc08();},'Coduu':function(_0x4a5ce1,_0x2e7a5a,_0x2e951e){return _0x4a5ce1(_0x2e7a5a,_0x2e951e);},'BogeX':'POST'},_0xd34ebd=await getToken();if(!_0xd34ebd)throw new Error(_0x173e60[_0x194c7d(0xd6)]);const _0x13e614=_0x173e60['HFaUx'](getApiBaseUrl),_0x5567ef=await _0x173e60['Coduu'](fetch,_0x13e614+_0x194c7d(0x97)+_0x57359b+'/restore',{'method':_0x173e60[_0x194c7d(0xb4)],'headers':{'Authorization':_0x194c7d(0xd9)+_0xd34ebd}});if(!_0x5567ef['ok']){const _0x967fd6=await _0x5567ef['text']();throw new Error('Failed\x20to\x20restore\x20feature\x20review:\x20'+_0x967fd6);}}
|
|
1
|
+
(function(_0x4eae11,_0x205ee3){const _0x232670=_0x15c0,_0x224635=_0x4eae11();while(!![]){try{const _0x212500=parseInt(_0x232670(0x11d))/0x1*(-parseInt(_0x232670(0x11c))/0x2)+parseInt(_0x232670(0x10b))/0x3+parseInt(_0x232670(0x129))/0x4*(parseInt(_0x232670(0x13a))/0x5)+-parseInt(_0x232670(0x10f))/0x6+-parseInt(_0x232670(0x14a))/0x7*(parseInt(_0x232670(0x112))/0x8)+-parseInt(_0x232670(0x119))/0x9+parseInt(_0x232670(0x102))/0xa;if(_0x212500===_0x205ee3)break;else _0x224635['push'](_0x224635['shift']());}catch(_0x4282ef){_0x224635['push'](_0x224635['shift']());}}}(_0x1707,0x69832));function _0x1707(){const _0x3a365a=['Djyvq','70vqXiDV','No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','eVUBS','Failed\x20to\x20restore\x20feature\x20review:\x20','OejfF','dgJtk','13221800UIlocd','Failed\x20to\x20conclude\x20session:\x20','vfQDk','Failed\x20to\x20delete\x20feature\x20review:\x20','style','NjZil','ZVUUW','/report','rbYcu','2575230nOfOKZ','PATCH','Failed\x20to\x20list\x20feature\x20reviews:\x20','Bearer\x20','2170566QYQDTx','json','gitRepoUrl','670040qzeLRr','/api/v1/mcp/features/','offset','set','fGFWX','Pztdw','stringify','3396933HwiTDV','Failed\x20to\x20mark\x20comments\x20as\x20addressed:\x20','text','2cWhmEe','846577tBJGur','cHTGc','length','fgMgp','toString','AfAfv','POST','/api/v1/mcp/features','limit','sessionId','oxija','CZMJe','1468WdNlNt','/report/markdown','zXvQu','RlMOL','Failed\x20to\x20get\x20item\x20feedback:\x20','TFWmF','zTpQP','GET','gitBranch','/feedback','itemIds','qAzqX','BUDXY','hCIGf','/restore','Failed\x20to\x20get\x20feature\x20review\x20report\x20markdown:\x20','join','9195pZjRMJ','/comments/address','IdYrF','SHALB','ZSmWv','hUFXy','/checklist','rdRTb','application/json','updateChecklistItem','ygKod','UyYru','Failed\x20to\x20get\x20action\x20items:\x20','Failed\x20to\x20update\x20scenario:\x20','Failed\x20to\x20get\x20feature\x20review\x20report:\x20'];_0x1707=function(){return _0x3a365a;};return _0x1707();}import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{withRetry}from'./retry.js';export async function createFeature(_0x127ee0){const _0x35e5be=_0x15c0,_0x3fe4d9={'ujTdl':function(_0x5ec286){return _0x5ec286();},'qAzqX':function(_0x32d73d,_0x39c2dd,_0x3e7b9b){return _0x32d73d(_0x39c2dd,_0x3e7b9b);},'pGBJc':_0x35e5be(0x142)},_0x5ce5cd=await _0x3fe4d9['ujTdl'](getToken);if(!_0x5ce5cd)throw new Error(_0x35e5be(0x14b));const _0x4ec96d=getApiBaseUrl(),_0x17ee98=await _0x3fe4d9[_0x35e5be(0x134)](fetch,_0x4ec96d+_0x35e5be(0x124),{'method':_0x35e5be(0x123),'headers':{'Authorization':_0x35e5be(0x10e)+_0x5ce5cd,'Content-Type':_0x3fe4d9['pGBJc']},'body':JSON[_0x35e5be(0x118)](_0x127ee0)});if(!_0x17ee98['ok']){const _0x52ff66=await _0x17ee98[_0x35e5be(0x11b)]();throw new Error('Failed\x20to\x20create\x20feature\x20review:\x20'+_0x52ff66);}return _0x17ee98[_0x35e5be(0x110)]();}export async function listFeatures(_0x2295ea){const _0x376c6c=_0x15c0,_0xb3938={'TFWmF':function(_0xec6358){return _0xec6358();},'UyYru':_0x376c6c(0x14b),'yalUl':'gitRepoUrl','dgJtk':_0x376c6c(0x125),'OejfF':_0x376c6c(0x114),'HLGyI':'includeDeleted','VmYJE':'true','BUDXY':function(_0x1f4ff6,_0x240d2d,_0x1b0bd1){return _0x1f4ff6(_0x240d2d,_0x1b0bd1);}},_0x436108=await _0xb3938[_0x376c6c(0x12e)](getToken);if(!_0x436108)throw new Error(_0xb3938[_0x376c6c(0x145)]);const _0x373f9f=getApiBaseUrl(),_0x53a94a=new URLSearchParams();if(_0x2295ea?.[_0x376c6c(0x111)])_0x53a94a['set'](_0xb3938['yalUl'],_0x2295ea['gitRepoUrl']);if(_0x2295ea?.['gitBranch'])_0x53a94a['set'](_0x376c6c(0x131),_0x2295ea['gitBranch']);if(_0x2295ea?.[_0x376c6c(0x125)])_0x53a94a['set'](_0xb3938[_0x376c6c(0x101)],_0x2295ea['limit'][_0x376c6c(0x121)]());if(_0x2295ea?.[_0x376c6c(0x114)])_0x53a94a['set'](_0xb3938[_0x376c6c(0x100)],_0x2295ea['offset']['toString']());if(_0x2295ea?.['includeDeleted'])_0x53a94a[_0x376c6c(0x115)](_0xb3938['HLGyI'],_0xb3938['VmYJE']);const _0x4a7244=_0x373f9f+_0x376c6c(0x124)+(_0x53a94a[_0x376c6c(0x121)]()?'?'+_0x53a94a['toString']():''),_0x2148ba=await _0xb3938[_0x376c6c(0x135)](fetch,_0x4a7244,{'method':_0x376c6c(0x130),'headers':{'Authorization':'Bearer\x20'+_0x436108}});if(!_0x2148ba['ok']){const _0x29a8ab=await _0x2148ba[_0x376c6c(0x11b)]();throw new Error(_0x376c6c(0x10d)+_0x29a8ab);}return _0x2148ba['json']();}export async function getFeature(_0xb7d489){const _0x25267e=_0x15c0,_0x5b36ed={'oxija':_0x25267e(0x14b),'fgMgp':function(_0x3beb05){return _0x3beb05();},'fGFWX':function(_0x5e02d6,_0x512f03,_0x3dece1){return _0x5e02d6(_0x512f03,_0x3dece1);},'GinkP':'GET'},_0x13dfe0=await getToken();if(!_0x13dfe0)throw new Error(_0x5b36ed[_0x25267e(0x127)]);const _0x471d0c=_0x5b36ed[_0x25267e(0x120)](getApiBaseUrl),_0x1d19ca=await _0x5b36ed[_0x25267e(0x116)](fetch,_0x471d0c+_0x25267e(0x113)+_0xb7d489,{'method':_0x5b36ed['GinkP'],'headers':{'Authorization':'Bearer\x20'+_0x13dfe0}});if(!_0x1d19ca['ok']){const _0x2e4e47=await _0x1d19ca[_0x25267e(0x11b)]();throw new Error('Failed\x20to\x20get\x20feature\x20review:\x20'+_0x2e4e47);}return _0x1d19ca['json']();}export async function updateFeature(_0x2f1b10,_0x750445){const _0x5aebd7=_0x15c0,_0x3581ce={'vtQRb':function(_0x1550db){return _0x1550db();}},_0xc38090=await _0x3581ce['vtQRb'](getToken);if(!_0xc38090)throw new Error(_0x5aebd7(0x14b));const _0x2edf37=getApiBaseUrl(),_0x531aa2=await fetch(_0x2edf37+'/api/v1/mcp/features/'+_0x2f1b10,{'method':_0x5aebd7(0x10c),'headers':{'Authorization':_0x5aebd7(0x10e)+_0xc38090,'Content-Type':'application/json'},'body':JSON['stringify'](_0x750445)});if(!_0x531aa2['ok']){const _0x266f1b=await _0x531aa2[_0x5aebd7(0x11b)]();throw new Error('Failed\x20to\x20update\x20feature\x20review:\x20'+_0x266f1b);}return _0x531aa2['json']();}export async function createChecklistItem(_0x5cd086,_0x298226,_0xc0801f){const _0x2dd564=_0x15c0,_0x5c3af9={'ZVUUW':function(_0x716644){return _0x716644();},'NjZil':function(_0x192d3f){return _0x192d3f();},'stedJ':function(_0x30ad9d,_0x215002,_0x3138c7){return _0x30ad9d(_0x215002,_0x3138c7);},'NZkyZ':_0x2dd564(0x142)},_0x4363a6=await _0x5c3af9[_0x2dd564(0x108)](getToken);if(!_0x4363a6)throw new Error(_0x2dd564(0x14b));const _0x569493=_0x5c3af9[_0x2dd564(0x107)](getApiBaseUrl),_0x41d056=await _0x5c3af9['stedJ'](fetch,_0x569493+'/api/v1/mcp/features/'+_0x5cd086+_0x2dd564(0x140),{'method':_0x2dd564(0x123),'headers':{'Authorization':'Bearer\x20'+_0x4363a6,'Content-Type':_0x5c3af9['NZkyZ']},'body':JSON[_0x2dd564(0x118)]({'description':_0x298226,'position':_0xc0801f})});if(!_0x41d056['ok']){const _0x31d535=await _0x41d056[_0x2dd564(0x11b)]();throw new Error('Failed\x20to\x20create\x20scenario:\x20'+_0x31d535);}return _0x41d056['json']();}export async function updateChecklistItem(_0x6f98a7,_0x89366a,_0x20a502){const _0x598e0b=_0x15c0,_0x3292e8={'AfAfv':function(_0x522c3c,_0x5839f8,_0x261ac7){return _0x522c3c(_0x5839f8,_0x261ac7);},'oXBAT':'application/json','ExLwm':_0x598e0b(0x143)};return withRetry(async()=>{const _0x5188a0=_0x598e0b,_0x5f54d3=await getToken();if(!_0x5f54d3)throw new Error(_0x5188a0(0x14b));const _0x15eab8=getApiBaseUrl(),_0x463358=await _0x3292e8[_0x5188a0(0x122)](fetch,_0x15eab8+'/api/v1/mcp/features/'+_0x6f98a7+'/checklist/'+_0x89366a,{'method':_0x5188a0(0x10c),'headers':{'Authorization':_0x5188a0(0x10e)+_0x5f54d3,'Content-Type':_0x3292e8['oXBAT']},'body':JSON['stringify'](_0x20a502)});if(!_0x463358['ok']){const _0x1fd1c7=await _0x463358['text']();throw new Error(_0x5188a0(0x147)+_0x1fd1c7);}return _0x463358[_0x5188a0(0x110)]();},{'label':_0x3292e8['ExLwm']});}export async function getFeatureReport(_0x132dce){const _0x1c3160=_0x15c0,_0x1800ac={'hUFXy':function(_0x19372c){return _0x19372c();},'rbYcu':_0x1c3160(0x14b)},_0x146c51=await _0x1800ac['hUFXy'](getToken);if(!_0x146c51)throw new Error(_0x1800ac[_0x1c3160(0x10a)]);const _0x5f4205=_0x1800ac[_0x1c3160(0x13f)](getApiBaseUrl),_0x9c0c97=await fetch(_0x5f4205+'/api/v1/mcp/features/'+_0x132dce+_0x1c3160(0x109),{'method':'GET','headers':{'Authorization':_0x1c3160(0x10e)+_0x146c51}});if(!_0x9c0c97['ok']){const _0x1f3e8c=await _0x9c0c97['text']();throw new Error(_0x1c3160(0x148)+_0x1f3e8c);}return _0x9c0c97['json']();}export async function getFeatureReportMarkdown(_0x456898,_0x2bce28){const _0x17fb7b=_0x15c0,_0x49d185={'bIees':function(_0x14e1c8,_0x64071c){return _0x14e1c8>_0x64071c;},'zXvQu':_0x17fb7b(0x133),'CZMJe':_0x17fb7b(0x106),'RlMOL':_0x17fb7b(0x130)},_0x3a9f39=await getToken();if(!_0x3a9f39)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0xdc0155=getApiBaseUrl(),_0x2873a3=new URLSearchParams(),_0x1eb1fc=_0x49d185['bIees'](_0x2bce28?.[_0x17fb7b(0x133)]?.[_0x17fb7b(0x11f)]??0x0,0x0),_0x2f0eb1=Boolean(_0x2bce28?.['sessionId']);_0x1eb1fc&&_0x2bce28?.[_0x17fb7b(0x133)]&&_0x2873a3['set'](_0x49d185[_0x17fb7b(0x12b)],_0x2bce28['itemIds'][_0x17fb7b(0x139)](','));_0x2f0eb1&&_0x2bce28?.[_0x17fb7b(0x126)]&&_0x2873a3[_0x17fb7b(0x115)]('sessionId',_0x2bce28[_0x17fb7b(0x126)]);!_0x1eb1fc&&!_0x2f0eb1&&_0x2bce28?.[_0x17fb7b(0x106)]&&_0x2873a3['set'](_0x49d185[_0x17fb7b(0x128)],_0x2bce28[_0x17fb7b(0x106)]);const _0x24e64e=_0xdc0155+_0x17fb7b(0x113)+_0x456898+_0x17fb7b(0x12a),_0x4e1474=''+_0x24e64e+(_0x2873a3['toString']()?'?'+_0x2873a3['toString']():''),_0x226a3b=await fetch(_0x4e1474,{'method':_0x49d185[_0x17fb7b(0x12c)],'headers':{'Authorization':_0x17fb7b(0x10e)+_0x3a9f39}});if(!_0x226a3b['ok']){const _0x205adf=await _0x226a3b['text']();throw new Error(_0x17fb7b(0x138)+_0x205adf);}return _0x226a3b[_0x17fb7b(0x11b)]();}export async function listFeatureSessions(_0x3a9e16){const _0x3808eb=_0x15c0,_0x204675={'RlWcP':function(_0x432866){return _0x432866();},'eVUBS':'GET'},_0x3516d4=await getToken();if(!_0x3516d4)throw new Error(_0x3808eb(0x14b));const _0xaaaff8=_0x204675['RlWcP'](getApiBaseUrl),_0x29cd3b=await fetch(_0xaaaff8+'/api/v1/mcp/features/'+_0x3a9e16+'/sessions',{'method':_0x204675[_0x3808eb(0x14c)],'headers':{'Authorization':_0x3808eb(0x10e)+_0x3516d4}});if(!_0x29cd3b['ok']){const _0x8a6989=await _0x29cd3b['text']();throw new Error('Failed\x20to\x20list\x20sessions:\x20'+_0x8a6989);}return _0x29cd3b[_0x3808eb(0x110)]();}export async function startSession(_0xe6c5ae,_0xda47f6){const _0x17e7d1=_0x15c0,_0x3f59bd={'gaOLA':function(_0x3d4c5e,_0x11dc1c,_0x3c0182){return _0x3d4c5e(_0x11dc1c,_0x3c0182);},'vfQDk':'POST'},_0x146684=await getToken();if(!_0x146684)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0x5389a8=getApiBaseUrl(),_0x1bac16=await _0x3f59bd['gaOLA'](fetch,_0x5389a8+_0x17e7d1(0x113)+_0xe6c5ae+'/sessions/'+_0xda47f6+'/start',{'method':_0x3f59bd[_0x17e7d1(0x104)],'headers':{'Authorization':'Bearer\x20'+_0x146684}});if(!_0x1bac16['ok']){const _0x80b298=await _0x1bac16[_0x17e7d1(0x11b)]();throw new Error('Failed\x20to\x20start\x20session:\x20'+_0x80b298);}return _0x1bac16[_0x17e7d1(0x110)]();}export async function concludeSession(_0xc6b464,_0x51637b){const _0x45ea76=_0x15c0,_0x3cd5e9={'SHALB':_0x45ea76(0x123)},_0x27f9ab=await getToken();if(!_0x27f9ab)throw new Error(_0x45ea76(0x14b));const _0x47e105=getApiBaseUrl(),_0x145ebb=await fetch(_0x47e105+'/api/v1/mcp/features/'+_0xc6b464+'/sessions/'+_0x51637b+'/conclude',{'method':_0x3cd5e9[_0x45ea76(0x13d)],'headers':{'Authorization':'Bearer\x20'+_0x27f9ab}});if(!_0x145ebb['ok']){const _0x550b85=await _0x145ebb['text']();throw new Error(_0x45ea76(0x103)+_0x550b85);}return _0x145ebb[_0x45ea76(0x110)]();}export async function getActionItems(_0x29b625){const _0x53afe6=_0x15c0,_0x4cd0c5={'rdRTb':function(_0x2f451e){return _0x2f451e();},'hCIGf':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','MYkZS':'GET'},_0x721bed=await _0x4cd0c5[_0x53afe6(0x141)](getToken);if(!_0x721bed)throw new Error(_0x4cd0c5[_0x53afe6(0x136)]);const _0x1633e4=getApiBaseUrl(),_0xf77b78=await fetch(_0x1633e4+_0x53afe6(0x113)+_0x29b625+'/action-items',{'method':_0x4cd0c5['MYkZS'],'headers':{'Authorization':'Bearer\x20'+_0x721bed}});if(!_0xf77b78['ok']){const _0x1b2cd9=await _0xf77b78['text']();throw new Error(_0x53afe6(0x146)+_0x1b2cd9);}return _0xf77b78['json']();}export async function getItemFeedback(_0x432560,_0x253970){const _0x21999a=_0x15c0,_0x461ea2={'zTpQP':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','cHTGc':function(_0x5cc81d,_0x2a3bdd,_0x5c9b32){return _0x5cc81d(_0x2a3bdd,_0x5c9b32);},'WIidn':_0x21999a(0x130)},_0x30cbfe=await getToken();if(!_0x30cbfe)throw new Error(_0x461ea2[_0x21999a(0x12f)]);const _0x4e7893=getApiBaseUrl(),_0x2baf4b=await _0x461ea2[_0x21999a(0x11e)](fetch,_0x4e7893+_0x21999a(0x113)+_0x432560+'/checklist-items/'+_0x253970+_0x21999a(0x132),{'method':_0x461ea2['WIidn'],'headers':{'Authorization':_0x21999a(0x10e)+_0x30cbfe}});if(!_0x2baf4b['ok']){const _0x5bb840=await _0x2baf4b['text']();throw new Error(_0x21999a(0x12d)+_0x5bb840);}return _0x2baf4b[_0x21999a(0x110)]();}export async function markCommentsAddressed(_0x1346a6,_0x1c3d11,_0x2d746c){const _0x372abe=_0x15c0,_0x55fa00={'ygKod':function(_0x36322f){return _0x36322f();},'MLcQO':function(_0x21b5ed,_0x138937,_0x3f93ef){return _0x21b5ed(_0x138937,_0x3f93ef);},'IdYrF':'POST'},_0x2d1adf=await _0x55fa00[_0x372abe(0x144)](getToken);if(!_0x2d1adf)throw new Error(_0x372abe(0x14b));const _0x41e97f=getApiBaseUrl(),_0x1870c7=await _0x55fa00['MLcQO'](fetch,_0x41e97f+'/api/v1/mcp/features/'+_0x1346a6+_0x372abe(0x13b),{'method':_0x55fa00[_0x372abe(0x13c)],'headers':{'Authorization':_0x372abe(0x10e)+_0x2d1adf,'Content-Type':_0x372abe(0x142)},'body':JSON[_0x372abe(0x118)]({'checklistItemId':_0x1c3d11,'commentIds':_0x2d746c})});if(!_0x1870c7['ok']){const _0x46af51=await _0x1870c7['text']();throw new Error(_0x372abe(0x11a)+_0x46af51);}}function _0x15c0(_0x19cdcd,_0x28a905){_0x19cdcd=_0x19cdcd-0xff;const _0x1707ae=_0x1707();let _0x15c0b8=_0x1707ae[_0x19cdcd];return _0x15c0b8;}export async function softDeleteFeature(_0x274330){const _0x31fd80=_0x15c0,_0x470996={'fnoCk':_0x31fd80(0x14b),'Djyvq':function(_0xb8dfc6){return _0xb8dfc6();},'Pztdw':'DELETE'},_0x1ca2b8=await getToken();if(!_0x1ca2b8)throw new Error(_0x470996['fnoCk']);const _0x27bb31=_0x470996[_0x31fd80(0x149)](getApiBaseUrl),_0x13254a=await fetch(_0x27bb31+'/api/v1/mcp/features/'+_0x274330,{'method':_0x470996[_0x31fd80(0x117)],'headers':{'Authorization':_0x31fd80(0x10e)+_0x1ca2b8}});if(!_0x13254a['ok']){const _0x2c7b74=await _0x13254a[_0x31fd80(0x11b)]();throw new Error(_0x31fd80(0x105)+_0x2c7b74);}}export async function restoreFeature(_0x19e24b){const _0xdf9871=_0x15c0,_0xc391ea={'LeeOX':function(_0x4daeb1){return _0x4daeb1();},'ZSmWv':_0xdf9871(0x123)},_0x450119=await getToken();if(!_0x450119)throw new Error(_0xdf9871(0x14b));const _0x236f71=_0xc391ea['LeeOX'](getApiBaseUrl),_0x32ecac=await fetch(_0x236f71+'/api/v1/mcp/features/'+_0x19e24b+_0xdf9871(0x137),{'method':_0xc391ea[_0xdf9871(0x13e)],'headers':{'Authorization':'Bearer\x20'+_0x450119}});if(!_0x32ecac['ok']){const _0x58fe92=await _0x32ecac['text']();throw new Error(_0xdf9871(0xff)+_0x58fe92);}}
|