@ranger-testing/ranger-cli 3.1.4 → 3.1.5-alpha.aebd071-49
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/deleteProfile.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/mcpBootstrap.js +1 -1
- package/build/commands/migrateProfile.js +1 -1
- package/build/commands/setup/claude.js +1 -1
- package/build/commands/setup/opencode.js +1 -1
- package/build/commands/setupCi.js +1 -1
- package/build/commands/skillup.js +1 -1
- package/build/commands/start.js +1 -1
- package/build/commands/status.js +1 -1
- package/build/commands/update.js +1 -1
- package/build/commands/updateEnv.js +1 -1
- package/build/commands/useEnv.js +1 -1
- package/build/commands/utils/activeProfile.js +1 -1
- package/build/commands/utils/agentEnv.js +1 -1
- package/build/commands/utils/browserSessionsApi.js +1 -1
- package/build/commands/utils/claudeConfig.js +1 -1
- package/build/commands/utils/claudeOverrideSettings.js +1 -1
- package/build/commands/utils/claudePlugin.js +1 -1
- package/build/commands/utils/cloudProfile.js +1 -1
- package/build/commands/utils/cloudProfileSession.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/fixWebmDuration.js +1 -1
- package/build/commands/utils/gitTracked.js +1 -1
- package/build/commands/utils/keychain.js +1 -1
- package/build/commands/utils/legacyWarning.js +1 -1
- package/build/commands/utils/localAgentInstallationsApi.js +1 -1
- package/build/commands/utils/matchAuthEnvironment.js +1 -1
- package/build/commands/utils/mcpImageBase64.js +1 -1
- package/build/commands/utils/model.js +1 -1
- package/build/commands/utils/novaActCli.js +1 -1
- package/build/commands/utils/opencodeConfig.js +1 -1
- package/build/commands/utils/organizationEnvApi.js +1 -1
- package/build/commands/utils/playwrightCli.js +1 -1
- package/build/commands/utils/profileMessages.js +1 -1
- package/build/commands/utils/profileSetupBanner.js +1 -1
- package/build/commands/utils/projectsConfig.js +1 -1
- package/build/commands/utils/rangerConfig.js +1 -1
- package/build/commands/utils/rangerRoot.js +1 -1
- package/build/commands/utils/rangerwrightCli.js +1 -1
- package/build/commands/utils/resolveProfileContext.js +1 -1
- package/build/commands/utils/resolveProfileUrl.js +1 -1
- package/build/commands/utils/retry.js +1 -1
- package/build/commands/utils/scenarioOriginCheck.js +1 -1
- package/build/commands/utils/sessionCache.js +1 -1
- package/build/commands/utils/settings.js +1 -1
- package/build/commands/utils/skillContent.js +1 -1
- package/build/commands/utils/skills.js +1 -1
- package/build/commands/utils/stitchWebmFiles.js +1 -1
- package/build/commands/utils/telemetry.js +1 -1
- package/build/commands/utils/tokenRefresh.js +1 -1
- package/build/commands/utils/traceSnapshotMapper.js +1 -1
- package/build/commands/utils/tunnelClient.js +1 -1
- package/build/commands/utils/userApi.js +1 -1
- package/build/commands/utils/version.js +1 -1
- package/build/commands/verifyFeature.js +1 -1
- package/build/commands/verifyFeatureCli.js +1 -1
- package/build/commands/verifyFeatureNovaCli.js +1 -1
- package/build/commands/verifyFeatureRangerwrightCli.js +1 -1
- package/package.json +5 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const _0x409b08=_0x5cf1;(function(_0x46ee77,_0x55a136){const _0x451f34=_0x5cf1,_0x58944c=_0x46ee77();while(!![]){try{const _0x3a54bb=parseInt(_0x451f34(0x15a))/0x1+parseInt(_0x451f34(0x163))/0x2+parseInt(_0x451f34(0x157))/0x3+-parseInt(_0x451f34(0x172))/0x4+-parseInt(_0x451f34(0x158))/0x5+-parseInt(_0x451f34(0x17c))/0x6+-parseInt(_0x451f34(0x164))/0x7*(-parseInt(_0x451f34(0x156))/0x8);if(_0x3a54bb===_0x55a136)break;else _0x58944c['push'](_0x58944c['shift']());}catch(_0x37a142){_0x58944c['push'](_0x58944c['shift']());}}}(_0x48eb,0x8279c));import{spawn}from'child_process';import{createRequire}from'module';import{dirname,join}from'path';import{readFileSync}from'fs';import{quoteShellArg}from'./playwrightCli.js';export const RANGERWRIGHT_CLI_PACKAGE=_0x409b08(0x176);export const RANGERWRIGHT_CLI_BINARY=_0x409b08(0x165);function readPackageJson(_0x2b3b79){const _0x490415=_0x409b08,_0x438a04={'MeMtC':_0x490415(0x188)},_0x3bc66a=readFileSync(_0x2b3b79,_0x490415(0x15b)),_0x14687a=JSON['parse'](_0x3bc66a);if(!_0x14687a||typeof _0x14687a!==_0x438a04['MeMtC'])return{};return _0x14687a;}function _0x48eb(){const _0x13bd80=['sessionId','SIGKILL','\x20binary','ignore','404900kcbXJr','2135bsHBwB','rangerwright','pipe','ljBcT','close','\x20signal=','caBzN','/package.json','TuSeg','length','bin','cgUmh','join','WqEtC','3507812KRukiG','resolve','--json','SIGTERM','@ranger-testing/rangerwright','slice','timed\x20out\x20after\x20','oPtXZ','assign','exited\x20with\x20code=','5205534YYTqLp','data','stdout','socketPath','map','timeoutMs','rangerwright-cli\x20','kkTPn','XSlic','YjBJQ','QJaFf','kill','object','TaTDO','toString','subcommand','48344AhvcQG','1630413fTICzn','2198005KFdlQl','PjKUa','129535MWDRcu','utf-8','match','argv','lNKAO'];_0x48eb=function(){return _0x13bd80;};return _0x48eb();}export function resolveRangerwrightCliBinary(){const _0x18f8ea=_0x409b08,_0x453f6b={'JzNGd':function(_0x2f00ed,_0x141b1b){return _0x2f00ed(_0x141b1b);},'oPtXZ':function(_0x3f7be6,_0x65441,_0x178be5){return _0x3f7be6(_0x65441,_0x178be5);}},_0xaaf55=createRequire(process[_0x18f8ea(0x15d)][0x1]||join(process['cwd'](),'package.json')),_0x47f15d=_0xaaf55[_0x18f8ea(0x173)](RANGERWRIGHT_CLI_PACKAGE+_0x18f8ea(0x16b)),_0x17d491=_0x453f6b['JzNGd'](dirname,_0x47f15d),_0x1b2b07=readPackageJson(_0x47f15d),_0x28bc65=typeof _0x1b2b07[_0x18f8ea(0x16e)]==='string'?_0x1b2b07[_0x18f8ea(0x16e)]:_0x1b2b07[_0x18f8ea(0x16e)]?.[RANGERWRIGHT_CLI_BINARY];if(!_0x28bc65)throw new Error(RANGERWRIGHT_CLI_PACKAGE+'\x20does\x20not\x20expose\x20a\x20'+RANGERWRIGHT_CLI_BINARY+_0x18f8ea(0x161));return _0x453f6b[_0x18f8ea(0x179)](join,_0x17d491,_0x28bc65);}function _0x5cf1(_0x10be1b,_0x40e8e8){_0x10be1b=_0x10be1b-0x153;const _0x48eb8c=_0x48eb();let _0x5cf1db=_0x48eb8c[_0x10be1b];return _0x5cf1db;}export function buildRangerwrightCliEnv(_0x45504b){const _0x2f07c8=_0x409b08;return{'RANGERWRIGHT_SESSION':_0x45504b[_0x2f07c8(0x15f)],'RANGERWRIGHT_CONFIG':_0x45504b['configPath'],'RANGERWRIGHT_ARTIFACT_DIR':_0x45504b['artifactDir'],..._0x45504b[_0x2f07c8(0x17f)]?{'RANGERWRIGHT_SOCKET_PATH':_0x45504b['socketPath']}:{}};}export function applyRangerwrightCliEnv(_0x5665f3,_0x45665b){const _0x1dcf5c=_0x409b08;Object[_0x1dcf5c(0x17a)](_0x5665f3,buildRangerwrightCliEnv(_0x45665b));}export function buildRangerwrightCliCommandPrefix(_0x4fe9ab=resolveRangerwrightCliBinary()){const _0x35dae6={'gCvQZ':function(_0x44dcf8,_0x115c8c){return _0x44dcf8(_0x115c8c);}};return _0x35dae6['gCvQZ'](quoteShellArg,_0x4fe9ab)+'\x20--json';}function getRangerwrightSubcommand(_0x3a4c8e){return _0x3a4c8e[0x0]??'unknown';}export function buildRangerwrightCliInvocation(_0x186241,_0x2095d9){const _0x220825=_0x409b08,_0x4122a8={'TaTDO':function(_0x553645){return _0x553645();},'Kkbwn':function(_0x40766a,_0x13480d){return _0x40766a(_0x13480d);},'TuSeg':function(_0x3c09c9,_0x2dc1d){return _0x3c09c9(_0x2dc1d);}},_0x2ad182=_0x186241['binaryPath']??_0x4122a8[_0x220825(0x153)](resolveRangerwrightCliBinary),_0x10e987=[_0x220825(0x174),..._0x2095d9];return{'command':_0x2ad182,'args':_0x10e987,'shellCommand':[_0x4122a8['Kkbwn'](quoteShellArg,_0x2ad182),'--json',..._0x2095d9[_0x220825(0x180)](quoteShellArg)][_0x220825(0x170)]('\x20'),'subcommand':_0x4122a8[_0x220825(0x16c)](getRangerwrightSubcommand,_0x2095d9)};}function truncateOutput(_0x44450e,_0x37a5c6=0x7d0){const _0x5cfa8a=_0x409b08,_0x4f5235={'cgUmh':function(_0x2428c5,_0x41f795){return _0x2428c5>_0x41f795;}};return _0x4f5235[_0x5cfa8a(0x16f)](_0x44450e[_0x5cfa8a(0x16d)],_0x37a5c6)?_0x44450e[_0x5cfa8a(0x177)](0x0,_0x37a5c6)+'...':_0x44450e;}export async function runRangerwrightCliCommand(_0xc4de85){const _0x3f36df=_0x409b08,_0x376c54={'OGLMe':function(_0x3c4347,_0x191cde){return _0x3c4347(_0x191cde);},'zmLup':function(_0x5cf4f6,_0x3f8a3f){return _0x5cf4f6??_0x3f8a3f;},'YjBJQ':'null','caBzN':function(_0x359ae2,_0x437331){return _0x359ae2??_0x437331;},'lNKAO':function(_0x18a456,_0xa58116){return _0x18a456(_0xa58116);},'ljBcT':_0x3f36df(0x160),'PjKUa':function(_0x49f4c3,_0x339257){return _0x49f4c3(_0x339257);},'EVjuo':_0x3f36df(0x162),'WqEtC':_0x3f36df(0x17d),'QJaFf':'error','kkTPn':_0x3f36df(0x168),'QciVj':function(_0x54fa60,_0x514216,_0x287ded){return _0x54fa60(_0x514216,_0x287ded);},'IlVfp':function(_0x5318b8,_0x2c7fef){return _0x5318b8(_0x2c7fef);}},_0xd26421=_0x376c54['QciVj'](buildRangerwrightCliInvocation,_0xc4de85,_0xc4de85['commandArgs']),_0x15c8f4={..._0xc4de85['env']??process['env'],..._0x376c54['IlVfp'](buildRangerwrightCliEnv,_0xc4de85)};return new Promise((_0x41f07a,_0x539369)=>{const _0x22f4c5=_0x3f36df,_0x4fb237={'eSyNz':_0x376c54[_0x22f4c5(0x167)],'XSlic':function(_0x5aeee6,_0x32b26e){const _0x36065d=_0x22f4c5;return _0x376c54[_0x36065d(0x159)](_0x5aeee6,_0x32b26e);}},_0x5899e0=spawn(_0xd26421['command'],_0xd26421['args'],{'cwd':_0xc4de85['cwd'],'env':_0x15c8f4,'stdio':[_0x376c54['EVjuo'],_0x22f4c5(0x166),_0x22f4c5(0x166)]});let _0x1cd9e4='',_0x30502e='',_0x585cec=![];const _0x161572=_0xc4de85['timeoutMs']&&_0xc4de85['timeoutMs']>0x0?setTimeout(()=>{const _0x2d99ed=_0x22f4c5;_0x585cec=!![],_0x5899e0['kill'](_0x2d99ed(0x175)),setTimeout(()=>{const _0x36cfe2=_0x2d99ed;try{_0x5899e0[_0x36cfe2(0x187)](_0x4fb237['eSyNz']);}catch{}},0x3e8);},_0xc4de85[_0x22f4c5(0x181)]):null;_0x5899e0[_0x22f4c5(0x17e)]?.['on'](_0x376c54[_0x22f4c5(0x171)],_0x4380e3=>{const _0x2110a2=_0x22f4c5;_0x1cd9e4+=_0x4380e3[_0x2110a2(0x154)]();}),_0x5899e0['stderr']?.['on'](_0x376c54['WqEtC'],_0x5b2ab2=>{_0x30502e+=_0x5b2ab2['toString']();}),_0x5899e0['on'](_0x376c54[_0x22f4c5(0x186)],_0x3803c2=>{const _0x41340f=_0x22f4c5;if(_0x161572)_0x4fb237[_0x41340f(0x184)](clearTimeout,_0x161572);_0x4fb237['XSlic'](_0x539369,_0x3803c2);}),_0x5899e0['on'](_0x376c54[_0x22f4c5(0x183)],(_0x11be96,_0xf8a226)=>{const _0x1ca107=_0x22f4c5;if(_0x161572)_0x376c54['OGLMe'](clearTimeout,_0x161572);if(_0x11be96===0x0){_0x41f07a({'stdout':_0x1cd9e4,'stderr':_0x30502e,'invocation':_0xd26421});return;}const _0x34eda3=_0x585cec?_0x1ca107(0x178)+_0xc4de85['timeoutMs']+'ms':_0x1ca107(0x17b)+_0x376c54['zmLup'](_0x11be96,_0x376c54[_0x1ca107(0x185)])+_0x1ca107(0x169)+_0x376c54[_0x1ca107(0x16a)](_0xf8a226,'null');_0x376c54['OGLMe'](_0x539369,new Error(_0x1ca107(0x182)+_0xd26421[_0x1ca107(0x155)]+'\x20'+_0x34eda3+'\x0astdout:\x20'+_0x376c54[_0x1ca107(0x15e)](truncateOutput,_0x1cd9e4)+'\x0astderr:\x20'+truncateOutput(_0x30502e)));});});}export function parseRangerwrightCliCommand(_0x42fb2e){const _0x1cbb9d=_0x409b08,_0x448a34=_0x42fb2e[_0x1cbb9d(0x15c)](/(?:^|\s)(?:"[^"]*rangerwright(?:\/build\/cli\.js)?"|'[^']*rangerwright(?:\/build\/cli\.js)?'|\S*rangerwright(?:\/build\/cli\.js)?)(?:\s+--json)?\s+([a-z-]+)/);return _0x448a34?.[0x1]??null;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x408763,_0x140cc1){const _0x553d3a=_0x112d,_0x30aec5=_0x408763();while(!![]){try{const _0x174a2c=parseInt(_0x553d3a(0x123))/0x1*(parseInt(_0x553d3a(0x15d))/0x2)+parseInt(_0x553d3a(0x158))/0x3+parseInt(_0x553d3a(0x127))/0x4+-parseInt(_0x553d3a(0x146))/0x5*(parseInt(_0x553d3a(0x131))/0x6)+parseInt(_0x553d3a(0x132))/0x7*(-parseInt(_0x553d3a(0x169))/0x8)+parseInt(_0x553d3a(0x167))/0x9*(-parseInt(_0x553d3a(0x16b))/0xa)+parseInt(_0x553d3a(0x155))/0xb;if(_0x174a2c===_0x140cc1)break;else _0x30aec5['push'](_0x30aec5['shift']());}catch(_0x466901){_0x30aec5['push'](_0x30aec5['shift']());}}}(_0x4b06,0x215f4));import{existsSync}from'fs';import _0x4d62b7 from'inquirer';function _0x4b06(){const _0x3038c3=['RANGER_TEST_USERNAME','1990881aDFaMK','\x22.\x20Pass\x20--profile\x20','1168616ueWfce','Ranger\x20can\x27t\x20verify\x20with\x20a\x20browser\x20until\x20a\x20profile\x20is\x20set\x20up.\x20Options:\x0a','10wkLWJT','baseUrl','53669XqsxUg','glvby','FTTwS','url','627348AElVvO','`ranger\x20profile\x20add`\x20to\x20create\x20one.','Hycnt','lnLys','local','cloud','\x20\x20Note:\x20--env\x20\x22','kJDNZ','\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x0a','\x20baseUrl\x20<url>','1448004frwHVH','7XRGxvf','cwd','cdpEndpoint','ZuzZh','TbLPu','No\x20baseUrl\x20configured\x20for\x20profile\x20\x22','RANGER_SESSION_STATE_PATH=','zBnWV','ttzqS','envStartPath','iFwis','string','\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one,\x20or\x0a','env','authPath','\x20\x20-\x20pass\x20--profile\x20<name>\x20/\x20set\x20RANGER_PROFILE,\x20or\x0a','key','startPath','`\x20to\x20recreate\x20it.','\x22\x20is\x20ignored\x20when\x20--profile\x20is\x20set;\x20the\x20profile\x27s\x20own\x20auth\x20environment\x20applies.','5IDXWKl','prompt','rLWxo','\x22\x20not\x20found.\x20Run:\x20ranger\x20profile\x20add\x20','\x22\x20only\x20affects\x20ad-hoc\x20profile\x20resolution;\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20use\x20it.','\x20\x20Warning:\x20','egJvD','message','domains','muWip','list','LpXku','Active\x20profile\x20\x22','\x22\x20no\x20longer\x20exists\x20(or\x20could\x20not\x20be\x20fetched).\x20Options:\x0a','resolvedEnv','2186602NyjAOR','telemetry','log','364044iqwZmc','name','RANGER_SESSION_STATE_PATH','pAthR','environmentKey','10LvhkGA','xQCWJ','\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20once,\x20or\x0a','VItYa','Profile\x20\x22','\x20does\x20not\x20exist.','source','baseUrlSource','authEnv'];_0x4b06=function(){return _0x3038c3;};return _0x4b06();}import{ApiError,fetchAuthConfig,fetchCloudProfile,listCloudProfiles,resolveAdHocProfile,resolveCloudProfileSession}from'./cloudProfile.js';import{isInteractive,resolveAuthEnvironmentLocally}from'./cloudProfileSession.js';function _0x112d(_0x286e40,_0x5369c6){_0x286e40=_0x286e40-0x123;const _0x4b0660=_0x4b06();let _0x112dae=_0x4b0660[_0x286e40];return _0x112dae;}import{mergeCloudProfileSettings,readProfileOverrides}from'./projectsConfig.js';import{readUrlEnvVars,resolveProfileUrl}from'./resolveProfileUrl.js';import{getEnvDir,loadSettings,resolveEnvVars}from'./settings.js';import{readActiveProfileName}from'./activeProfile.js';export async function resolveProfileContext(_0xdedac1){const _0x1451b9=_0x112d,_0x25713b={'VItYa':function(_0x4d6f5c){return _0x4d6f5c();},'glvby':function(_0xcb7cc7,_0x5d5026){return _0xcb7cc7!==_0x5d5026;},'ZuzZh':function(_0x218534,_0x1b27af){return _0x218534===_0x1b27af;},'JkBTk':function(_0x49284c,_0x3473b){return _0x49284c+_0x3473b;},'zBnWV':function(_0x354931,_0x2f2fef){return _0x354931+_0x2f2fef;},'fbHDn':_0x1451b9(0x141),'lnLys':_0x1451b9(0x15f),'LpXku':_0x1451b9(0x128),'eHQkb':function(_0x38fcba){return _0x38fcba();},'xQCWJ':_0x1451b9(0x150),'pAthR':'Local\x20profile','YENer':_0x1451b9(0x12b),'egJvD':_0x1451b9(0x12c),'Hycnt':function(_0x13e405,_0x484e5a,_0x1cef0b){return _0x13e405(_0x484e5a,_0x1cef0b);},'iFwis':function(_0x264ddb,_0x7fc46a){return _0x264ddb(_0x7fc46a);},'VMkYS':function(_0x414ea8,_0x3a0e62){return _0x414ea8(_0x3a0e62);},'bpaik':function(_0x28aedf,_0x2acb46){return _0x28aedf(_0x2acb46);},'FTTwS':function(_0x3b9a56,_0x1235bc){return _0x3b9a56(_0x1235bc);},'muWip':function(_0x3d1481,_0x4890bd){return _0x3d1481+_0x4890bd;},'rLWxo':function(_0x59b851,_0x133166){return _0x59b851+_0x133166;},'xjDUh':'\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20to\x20switch\x20(see\x20`ranger\x20profile\x20ls`),\x20or\x0a','kJDNZ':'\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one\x20ad\x20hoc,\x20or\x0a','CbdhC':function(_0x433ac0,_0x168926){return _0x433ac0&&_0x168926;}},_0x56c4ff=_0xdedac1['profile'];let _0xb6fc86=_0x56c4ff,_0x141e34=null;const _0x422559=_0x56c4ff?null:await _0x25713b['VItYa'](readActiveProfileName);if(_0xdedac1['authEnv']&&_0x56c4ff)console['log']('\x20\x20Note:\x20--env\x20\x22'+_0xdedac1[_0x1451b9(0x165)]+_0x1451b9(0x145));else _0xdedac1[_0x1451b9(0x165)]&&!process[_0x1451b9(0x13f)][_0x1451b9(0x166)]&&console['log'](_0x1451b9(0x12d)+_0xdedac1[_0x1451b9(0x165)]+_0x1451b9(0x14a));if(!_0x56c4ff&&process['env'][_0x1451b9(0x166)])try{const _0x51d500=await resolveAdHocProfile({'targetUrl':_0xdedac1['baseUrl']??readUrlEnvVars()['envBaseUrl'],'envKey':_0xdedac1[_0x1451b9(0x165)]});_0x51d500&&(_0x422559&&_0x25713b[_0x1451b9(0x124)](_0x422559,_0x51d500[_0x1451b9(0x159)])&&console['log']('\x20\x20RANGER_TEST_USERNAME\x20is\x20set\x20—\x20using\x20profile\x20\x22'+_0x51d500['name']+'\x22\x20instead\x20of\x20the\x20saved\x20active\x20profile\x20\x22'+_0x422559+_0x1451b9(0x168)+_0x422559+'\x20to\x20override.'),_0xb6fc86=_0x51d500['name'],_0x141e34=_0x51d500['profile']);}catch(_0x317f6d){if(!_0x422559||_0xdedac1['authEnv'])throw _0x317f6d;console[_0x1451b9(0x157)](_0x1451b9(0x14b)+(_0x317f6d instanceof Error?_0x317f6d[_0x1451b9(0x14d)]:String(_0x317f6d))),console['log']('\x20\x20Falling\x20back\x20to\x20saved\x20active\x20profile\x20\x22'+_0x422559+'\x22.');}if(!_0xb6fc86)_0xb6fc86=_0x422559??undefined;if(!_0xb6fc86)try{const _0x17a562=await _0x25713b['VItYa'](listCloudProfiles);if(_0x25713b[_0x1451b9(0x135)](_0x17a562['length'],0x1)){const _0x53c762=_0x17a562[0x0];_0xb6fc86=_0x53c762['name'],console[_0x1451b9(0x157)]('\x0aUsing\x20the\x20only\x20cloud\x20profile\x20for\x20your\x20org:\x20'+_0x53c762[_0x1451b9(0x159)]),console['log']('\x20\x20(pass\x20--profile\x20<name>\x20to\x20pin,\x20or\x20RANGER_TEST_USERNAME=...\x20to\x20materialize\x20a\x20new\x20one)');}}catch{}if(!_0xb6fc86)throw new Error(_0x25713b['JkBTk'](_0x25713b[_0x1451b9(0x139)](_0x1451b9(0x16a),_0x1451b9(0x13e)),_0x25713b['fbHDn'])+_0x25713b[_0x1451b9(0x12a)]+'\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20<name>`\x20to\x20create\x20a\x20new\x20one.');const _0x5ea535=getEnvDir(_0xb6fc86),_0x43ec5a=existsSync(_0x5ea535);let _0x3149d6=_0x141e34,_0x2886f0=![];if(!_0x3149d6)try{_0x3149d6=await fetchCloudProfile(_0xb6fc86);if(!_0x3149d6)_0x2886f0=!![];}catch(_0x1135f8){_0x1135f8 instanceof ApiError&&_0x1135f8['status']===0x194&&(_0x2886f0=!![]);}if(_0x56c4ff&&_0x2886f0&&!_0x43ec5a&&!_0x3149d6)throw new Error(_0x1451b9(0x161)+_0x56c4ff+_0x1451b9(0x12f)+'\x20\x20Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20'+_0x25713b[_0x1451b9(0x151)]);if(_0x3149d6&&_0x43ec5a){let _0x4ef584=!![];if(_0x25713b['eHQkb'](isInteractive)){const {source:_0x1e6f2a}=await _0x4d62b7[_0x1451b9(0x147)]([{'type':_0x25713b[_0x1451b9(0x15e)],'name':_0x1451b9(0x163),'message':_0x1451b9(0x161)+_0xb6fc86+'\x22\x20exists\x20both\x20locally\x20and\x20in\x20the\x20cloud.\x20Which\x20one\x20should\x20be\x20used?','choices':[{'name':'Cloud\x20profile\x20(recommended)','value':_0x1451b9(0x12c)},{'name':_0x25713b[_0x1451b9(0x15b)],'value':_0x25713b['YENer']}],'default':_0x25713b['egJvD']}]);_0x4ef584=_0x1e6f2a===_0x25713b[_0x1451b9(0x14c)];}if(!_0x4ef584)_0x3149d6=null;}const _0x5ef393=_0x25713b[_0x1451b9(0x129)](readProfileOverrides,process[_0x1451b9(0x133)](),_0xb6fc86);let _0x381e94=null,_0x3fa04c,_0x31b19b,_0x10bc80,_0x154e3a,_0x3a5c58=null,_0x267a79,_0x30652d;const _0x39bdb5=_0x25713b[_0x1451b9(0x13c)](expandOverrides,_0x5ef393),_0x578a60=_0x25713b[_0x1451b9(0x160)](readUrlEnvVars);if(_0x3149d6){_0x381e94=_0x3149d6;const _0x24d575=_0x3149d6['settings']??{},_0x5bbc6b=_0x25713b['Hycnt'](mergeCloudProfileSettings,_0x24d575,_0x5ef393??undefined),_0x5be998={..._0x3149d6,'settings':_0x5bbc6b};_0x3a5c58={'baseUrl':_0x25713b['VMkYS'](expandString,_0x24d575['baseUrl']),'startPath':_0x25713b['bpaik'](expandString,_0x24d575[_0x1451b9(0x143)])};const _0x143886=await fetchAuthConfig(),_0x2556c9=_0x143886?_0x25713b[_0x1451b9(0x129)](resolveAuthEnvironmentLocally,_0x143886,_0x3149d6[_0x1451b9(0x15c)]):null;_0x267a79=_0x2556c9?.[_0x1451b9(0x14e)]?.[0x0],_0x30652d=_0x2556c9?.[_0x1451b9(0x142)];const _0x2b56ec=_0x25713b['iFwis'](resolveProfileUrl,{'flagBaseUrl':_0xdedac1[_0x1451b9(0x16c)],'flagStartPath':_0xdedac1['startPath'],'envBaseUrl':_0x578a60['envBaseUrl'],'envStartPath':_0x578a60['envStartPath'],'projectOverrides':_0x39bdb5,'cloudSettings':_0x3a5c58,'authEnvironmentDomain':_0x267a79}),_0x2efa4c=process[_0x1451b9(0x13f)][_0x1451b9(0x15a)];if(_0x2efa4c){if(!existsSync(_0x2efa4c))throw new Error(_0x1451b9(0x138)+_0x2efa4c+_0x1451b9(0x162));_0x3fa04c=_0x2efa4c,_0x31b19b=resolveEnvVars(_0x5bbc6b),_0x10bc80=Boolean(_0x31b19b[_0x1451b9(0x134)]);}else{const _0x1a97ec=await _0x25713b[_0x1451b9(0x129)](resolveCloudProfileSession,_0x5be998,{'effectiveBaseUrl':_0x2b56ec[_0x1451b9(0x16c)],'telemetry':_0xdedac1[_0x1451b9(0x156)]});_0x3fa04c=_0x1a97ec[_0x1451b9(0x140)],_0x31b19b=_0x25713b[_0x1451b9(0x125)](resolveEnvVars,_0x1a97ec['settings']),_0x10bc80=_0x25713b[_0x1451b9(0x125)](Boolean,_0x31b19b[_0x1451b9(0x134)]),_0x267a79=_0x1a97ec[_0x1451b9(0x154)]?.[_0x1451b9(0x14e)]?.[0x0],_0x30652d=_0x1a97ec['resolvedEnv']?.[_0x1451b9(0x142)];}}else{if(!_0x43ec5a){const _0x259034=!_0x56c4ff;throw new Error(_0x259034?_0x25713b[_0x1451b9(0x14f)](_0x25713b[_0x1451b9(0x148)](_0x1451b9(0x152)+_0xb6fc86+_0x1451b9(0x153),_0x25713b['xjDUh'])+_0x25713b[_0x1451b9(0x12e)],'\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20'+_0xb6fc86+_0x1451b9(0x144)):'Profile\x20\x22'+_0xb6fc86+_0x1451b9(0x149)+_0xb6fc86);}const _0xf4655c=await loadSettings(_0xb6fc86);_0x31b19b=resolveEnvVars(_0xf4655c),_0x10bc80=Boolean(_0x31b19b['cdpEndpoint']),_0x154e3a=_0x31b19b[_0x1451b9(0x16c)];}const _0x130f38=resolveProfileUrl({'flagBaseUrl':_0xdedac1['baseUrl'],'flagStartPath':_0xdedac1[_0x1451b9(0x143)],'envBaseUrl':_0x578a60['envBaseUrl'],'envStartPath':_0x578a60[_0x1451b9(0x13b)],'localSettingsBaseUrl':_0x154e3a,'projectOverrides':_0x39bdb5,'cloudSettings':_0x3a5c58,'authEnvironmentDomain':_0x267a79}),_0x518706=_0x130f38[_0x1451b9(0x126)]??_0x130f38[_0x1451b9(0x16c)];if(_0x25713b['CbdhC'](!_0x518706,!_0x10bc80))throw new Error(_0x1451b9(0x137)+_0xb6fc86+'\x22.\x20Run:\x20ranger\x20profile\x20config\x20set\x20'+_0xb6fc86+_0x1451b9(0x130));return{'activeProfile':_0xb6fc86,'resolvedCloudProfile':_0x381e94,'cloudAuthPath':_0x3fa04c,'resolvedSettings':_0x31b19b,'isCdpMode':_0x10bc80,'url':_0x518706,'baseUrlSource':_0x130f38[_0x1451b9(0x164)],'authEnvKey':_0x30652d,'startPath':_0x130f38['startPath']};}function expandString(_0x338fab){const _0x427b32=_0x112d,_0x230970={'ttzqS':_0x427b32(0x13d),'TbLPu':function(_0x1ec70f,_0x28e1ae){return _0x1ec70f(_0x28e1ae);}};if(typeof _0x338fab!==_0x230970[_0x427b32(0x13a)])return _0x338fab;return _0x230970[_0x427b32(0x136)](resolveEnvVars,_0x338fab);}function expandOverrides(_0x5dfad3){const _0x4b0bd0=_0x112d,_0x337d73={'jflaV':function(_0x5c8613,_0x4785f9){return _0x5c8613===_0x4785f9;}};if(!_0x5dfad3)return _0x5dfad3;const _0x5062d1={..._0x5dfad3};return _0x337d73['jflaV'](typeof _0x5062d1['baseUrl'],_0x4b0bd0(0x13d))&&(_0x5062d1[_0x4b0bd0(0x16c)]=resolveEnvVars(_0x5062d1[_0x4b0bd0(0x16c)])),typeof _0x5062d1['startPath']===_0x4b0bd0(0x13d)&&(_0x5062d1['startPath']=resolveEnvVars(_0x5062d1['startPath'])),_0x5062d1;}
|
|
1
|
+
(function(_0x9914d4,_0x59f887){const _0x2ea050=_0x1bd3,_0x12519c=_0x9914d4();while(!![]){try{const _0x24854f=-parseInt(_0x2ea050(0x184))/0x1+-parseInt(_0x2ea050(0x173))/0x2*(-parseInt(_0x2ea050(0x15b))/0x3)+-parseInt(_0x2ea050(0x14a))/0x4+-parseInt(_0x2ea050(0x154))/0x5*(parseInt(_0x2ea050(0x178))/0x6)+parseInt(_0x2ea050(0x161))/0x7*(parseInt(_0x2ea050(0x179))/0x8)+parseInt(_0x2ea050(0x14d))/0x9+-parseInt(_0x2ea050(0x180))/0xa;if(_0x24854f===_0x59f887)break;else _0x12519c['push'](_0x12519c['shift']());}catch(_0x5508a4){_0x12519c['push'](_0x12519c['shift']());}}}(_0x3860,0xe486d));function _0x1bd3(_0x61349c,_0x24ce6c){_0x61349c=_0x61349c-0x148;const _0x386040=_0x3860();let _0x1bd3ed=_0x386040[_0x61349c];return _0x1bd3ed;}import{existsSync}from'fs';import _0x3a472f from'inquirer';import{ApiError,fetchAuthConfig,fetchCloudProfile,listCloudProfiles,resolveAdHocProfile,resolveCloudProfileSession}from'./cloudProfile.js';import{isInteractive,resolveAuthEnvironmentLocally}from'./cloudProfileSession.js';import{mergeCloudProfileSettings,readProfileOverrides}from'./projectsConfig.js';import{readUrlEnvVars,resolveProfileUrl}from'./resolveProfileUrl.js';import{getEnvDir,loadSettings,resolveEnvVars}from'./settings.js';import{readActiveProfileName}from'./activeProfile.js';export async function resolveProfileContext(_0x3159af){const _0x59ce15=_0x1bd3,_0x4be6f9={'mmWlq':function(_0x402668,_0x3fce59){return _0x402668(_0x3fce59);},'TMREU':function(_0xea0ff7){return _0xea0ff7();},'royxk':function(_0x1bb8ab,_0x3fd22f){return _0x1bb8ab!==_0x3fd22f;},'oaKTT':function(_0x2509f3,_0x314aa3){return _0x2509f3(_0x314aa3);},'fqbOA':function(_0x54b79d,_0x868e9a){return _0x54b79d??_0x868e9a;},'TxspL':function(_0x5ec26f,_0x450bba){return _0x5ec26f===_0x450bba;},'YKXgN':function(_0x21d3b3,_0x3de09c){return _0x21d3b3+_0x3de09c;},'fdkIB':function(_0x34478f,_0x8a6d14){return _0x34478f+_0x8a6d14;},'msinZ':_0x59ce15(0x152),'VaUhM':_0x59ce15(0x176),'RdXMK':function(_0x4a0dbb,_0x211051){return _0x4a0dbb instanceof _0x211051;},'vsHDp':function(_0x466ff2,_0x19c1fd){return _0x466ff2&&_0x19c1fd;},'fCRYA':function(_0x271dc9,_0x37c74f){return _0x271dc9+_0x37c74f;},'dpYxv':'`ranger\x20profile\x20add`\x20to\x20create\x20one.','JVrIW':function(_0x4cfa82,_0x3d993f){return _0x4cfa82&&_0x3d993f;},'ntFEE':'source','rqJQo':'Cloud\x20profile\x20(recommended)','gMjVz':'Local\x20profile','cwbZq':function(_0x490d67,_0x342849,_0x1634ee){return _0x490d67(_0x342849,_0x1634ee);},'gycTp':function(_0x4b63c6,_0x2c3726){return _0x4b63c6(_0x2c3726);},'nxcTJ':function(_0x436f78,_0x56d1e2,_0x41098a){return _0x436f78(_0x56d1e2,_0x41098a);},'YBvzD':function(_0x2f7641,_0xd0941d){return _0x2f7641(_0xd0941d);},'ybwGj':function(_0x1dec86,_0x4d70b9){return _0x1dec86(_0x4d70b9);},'ZQEwl':function(_0x55f484,_0x2c0efe){return _0x55f484+_0x2c0efe;},'EacTz':_0x59ce15(0x16c),'asbNQ':'\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one\x20ad\x20hoc,\x20or\x0a','sFzPC':function(_0x310467,_0x178484){return _0x310467&&_0x178484;}},_0x124aa5=_0x3159af['profile'];let _0x390a49=_0x124aa5,_0x22c5ec=null;const _0xab1744=_0x124aa5?null:await readActiveProfileName();if(_0x3159af['authEnv']&&_0x124aa5)console[_0x59ce15(0x148)]('\x20\x20Note:\x20--env\x20\x22'+_0x3159af['authEnv']+'\x22\x20is\x20ignored\x20when\x20--profile\x20is\x20set;\x20the\x20profile\x27s\x20own\x20auth\x20environment\x20applies.');else _0x3159af[_0x59ce15(0x162)]&&!process[_0x59ce15(0x15e)][_0x59ce15(0x16a)]&&console['log'](_0x59ce15(0x160)+_0x3159af['authEnv']+_0x59ce15(0x169));if(!_0x124aa5&&process[_0x59ce15(0x15e)][_0x59ce15(0x16a)])try{const _0x3a594e=await _0x4be6f9['mmWlq'](resolveAdHocProfile,{'targetUrl':_0x3159af['baseUrl']??_0x4be6f9['TMREU'](readUrlEnvVars)['envBaseUrl'],'envKey':_0x3159af['authEnv']});_0x3a594e&&(_0xab1744&&_0x4be6f9[_0x59ce15(0x14e)](_0xab1744,_0x3a594e['name'])&&console[_0x59ce15(0x148)](_0x59ce15(0x185)+_0x3a594e[_0x59ce15(0x15c)]+_0x59ce15(0x171)+_0xab1744+'\x22.\x20Pass\x20--profile\x20'+_0xab1744+_0x59ce15(0x186)),_0x390a49=_0x3a594e[_0x59ce15(0x15c)],_0x22c5ec=_0x3a594e[_0x59ce15(0x18a)]);}catch(_0x3e4c98){if(!_0xab1744||_0x3159af['authEnv'])throw _0x3e4c98;console['log']('\x20\x20Warning:\x20'+(_0x3e4c98 instanceof Error?_0x3e4c98['message']:_0x4be6f9['oaKTT'](String,_0x3e4c98))),console[_0x59ce15(0x148)](_0x59ce15(0x158)+_0xab1744+'\x22.');}if(!_0x390a49)_0x390a49=_0x4be6f9[_0x59ce15(0x17e)](_0xab1744,undefined);if(!_0x390a49)try{const _0x5e748d=await listCloudProfiles();if(_0x4be6f9['TxspL'](_0x5e748d['length'],0x1)){const _0x1695c4=_0x5e748d[0x0];_0x390a49=_0x1695c4['name'],console[_0x59ce15(0x148)](_0x59ce15(0x159)+_0x1695c4['name']),console[_0x59ce15(0x148)](_0x59ce15(0x164));}}catch{}if(!_0x390a49)throw new Error(_0x4be6f9[_0x59ce15(0x150)](_0x4be6f9[_0x59ce15(0x182)](_0x4be6f9['msinZ'],_0x59ce15(0x16f))+_0x59ce15(0x157)+'\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20once,\x20or\x0a',_0x4be6f9['VaUhM']));const _0x809ad9=getEnvDir(_0x390a49),_0x381d74=_0x4be6f9[_0x59ce15(0x17c)](existsSync,_0x809ad9);let _0x197c83=_0x22c5ec,_0x277aa7=![];if(!_0x197c83)try{_0x197c83=await _0x4be6f9['mmWlq'](fetchCloudProfile,_0x390a49);if(!_0x197c83)_0x277aa7=!![];}catch(_0x7e8f0c){_0x4be6f9['RdXMK'](_0x7e8f0c,ApiError)&&_0x7e8f0c[_0x59ce15(0x189)]===0x194&&(_0x277aa7=!![]);}if(_0x4be6f9[_0x59ce15(0x14f)](_0x124aa5,_0x277aa7)&&!_0x381d74&&!_0x197c83)throw new Error(_0x4be6f9[_0x59ce15(0x182)](_0x4be6f9[_0x59ce15(0x17b)]('Profile\x20\x22'+_0x124aa5+'\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x0a',_0x59ce15(0x15f)),_0x4be6f9[_0x59ce15(0x155)]));if(_0x4be6f9[_0x59ce15(0x163)](_0x197c83,_0x381d74)){let _0x1cac70=!![];if(isInteractive()){const {source:_0x263236}=await _0x3a472f[_0x59ce15(0x165)]([{'type':_0x59ce15(0x17a),'name':_0x4be6f9['ntFEE'],'message':_0x59ce15(0x15d)+_0x390a49+_0x59ce15(0x16e),'choices':[{'name':_0x4be6f9['rqJQo'],'value':_0x59ce15(0x170)},{'name':_0x4be6f9['gMjVz'],'value':'local'}],'default':_0x59ce15(0x170)}]);_0x1cac70=_0x263236==='cloud';}if(!_0x1cac70)_0x197c83=null;}const _0x356c38=_0x4be6f9['cwbZq'](readProfileOverrides,process['cwd'](),_0x390a49);let _0x2ff84c=null,_0x11775a,_0x27d64e,_0x873606,_0x5e9439,_0x4bf740=null,_0x37f4ee,_0x5a8615;const _0x131b2e=_0x4be6f9['gycTp'](expandOverrides,_0x356c38),_0x3f5308=readUrlEnvVars();if(_0x197c83){_0x2ff84c=_0x197c83;const _0x108e8e=_0x197c83['settings']??{},_0x1d140f=_0x4be6f9['nxcTJ'](mergeCloudProfileSettings,_0x108e8e,_0x4be6f9[_0x59ce15(0x17e)](_0x356c38,undefined)),_0x10fa2b={..._0x197c83,'settings':_0x1d140f};_0x4bf740={'baseUrl':_0x4be6f9['gycTp'](expandString,_0x108e8e['baseUrl']),'startPath':_0x4be6f9['YBvzD'](expandString,_0x108e8e['startPath'])};const _0x1d1416=await fetchAuthConfig(),_0x1391c7=_0x1d1416?_0x4be6f9['cwbZq'](resolveAuthEnvironmentLocally,_0x1d1416,_0x197c83['environmentKey']):null;_0x37f4ee=_0x1391c7?.['domains']?.[0x0],_0x5a8615=_0x1391c7?.[_0x59ce15(0x14c)];const _0x3621d7=_0x4be6f9['oaKTT'](resolveProfileUrl,{'flagBaseUrl':_0x3159af[_0x59ce15(0x177)],'flagStartPath':_0x3159af[_0x59ce15(0x16b)],'envBaseUrl':_0x3f5308[_0x59ce15(0x166)],'envStartPath':_0x3f5308['envStartPath'],'projectOverrides':_0x131b2e,'cloudSettings':_0x4bf740,'authEnvironmentDomain':_0x37f4ee}),_0x5a7319=process[_0x59ce15(0x15e)]['RANGER_SESSION_STATE_PATH'];if(_0x5a7319){if(!_0x4be6f9[_0x59ce15(0x149)](existsSync,_0x5a7319))throw new Error(_0x59ce15(0x181)+_0x5a7319+_0x59ce15(0x14b));_0x11775a=_0x5a7319,_0x27d64e=resolveEnvVars(_0x1d140f),_0x873606=Boolean(_0x27d64e[_0x59ce15(0x17d)]);}else{const _0x339085=await resolveCloudProfileSession(_0x10fa2b,{'effectiveBaseUrl':_0x3621d7[_0x59ce15(0x177)],'telemetry':_0x3159af[_0x59ce15(0x15a)]});_0x11775a=_0x339085['authPath'],_0x27d64e=resolveEnvVars(_0x339085['settings']),_0x873606=Boolean(_0x27d64e[_0x59ce15(0x17d)]),_0x37f4ee=_0x339085['resolvedEnv']?.[_0x59ce15(0x16d)]?.[0x0],_0x5a8615=_0x339085[_0x59ce15(0x187)]?.['key'];}}else{if(!_0x381d74){const _0x6c28d1=!_0x124aa5;throw new Error(_0x6c28d1?_0x4be6f9[_0x59ce15(0x167)]('Active\x20profile\x20\x22'+_0x390a49+_0x59ce15(0x156),_0x4be6f9['EacTz'])+_0x4be6f9['asbNQ']+(_0x59ce15(0x175)+_0x390a49+'`\x20to\x20recreate\x20it.'):_0x59ce15(0x15d)+_0x390a49+_0x59ce15(0x153)+_0x390a49);}const _0x2d3a53=await loadSettings(_0x390a49);_0x27d64e=resolveEnvVars(_0x2d3a53),_0x873606=_0x4be6f9[_0x59ce15(0x151)](Boolean,_0x27d64e['cdpEndpoint']),_0x5e9439=_0x27d64e[_0x59ce15(0x177)];}const _0xc60699=resolveProfileUrl({'flagBaseUrl':_0x3159af['baseUrl'],'flagStartPath':_0x3159af[_0x59ce15(0x16b)],'envBaseUrl':_0x3f5308[_0x59ce15(0x166)],'envStartPath':_0x3f5308[_0x59ce15(0x17f)],'localSettingsBaseUrl':_0x5e9439,'projectOverrides':_0x131b2e,'cloudSettings':_0x4bf740,'authEnvironmentDomain':_0x37f4ee}),_0x2d535a=_0xc60699[_0x59ce15(0x174)]??_0xc60699[_0x59ce15(0x177)];if(_0x4be6f9[_0x59ce15(0x168)](!_0x2d535a,!_0x873606))throw new Error(_0x59ce15(0x172)+_0x390a49+'\x22.\x20Run:\x20ranger\x20profile\x20config\x20set\x20'+_0x390a49+'\x20baseUrl\x20<url>');return{'activeProfile':_0x390a49,'resolvedCloudProfile':_0x2ff84c,'cloudAuthPath':_0x11775a,'resolvedSettings':_0x27d64e,'isCdpMode':_0x873606,'url':_0x2d535a,'baseUrlSource':_0xc60699['baseUrlSource'],'authEnvKey':_0x5a8615,'startPath':_0xc60699[_0x59ce15(0x16b)]};}function _0x3860(){const _0x35cfd7=['ybwGj','4315340BVwNwp','\x20does\x20not\x20exist.','key','11712195GwhOQR','royxk','vsHDp','YKXgN','YBvzD','Ranger\x20can\x27t\x20verify\x20with\x20a\x20browser\x20until\x20a\x20profile\x20is\x20set\x20up.\x20Options:\x0a','\x22\x20not\x20found.\x20Run:\x20ranger\x20profile\x20add\x20','8205GDvwQK','dpYxv','\x22\x20no\x20longer\x20exists\x20(or\x20could\x20not\x20be\x20fetched).\x20Options:\x0a','\x20\x20-\x20pass\x20--profile\x20<name>\x20/\x20set\x20RANGER_PROFILE,\x20or\x0a','\x20\x20Falling\x20back\x20to\x20saved\x20active\x20profile\x20\x22','\x0aUsing\x20the\x20only\x20cloud\x20profile\x20for\x20your\x20org:\x20','telemetry','29217qzDkBM','name','Profile\x20\x22','env','\x20\x20Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20','\x20\x20Note:\x20--env\x20\x22','858053epENOs','authEnv','JVrIW','\x20\x20(pass\x20--profile\x20<name>\x20to\x20pin,\x20or\x20RANGER_TEST_USERNAME=...\x20to\x20materialize\x20a\x20new\x20one)','prompt','envBaseUrl','ZQEwl','sFzPC','\x22\x20only\x20affects\x20ad-hoc\x20profile\x20resolution;\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20use\x20it.','RANGER_TEST_USERNAME','startPath','\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20to\x20switch\x20(see\x20`ranger\x20profile\x20ls`),\x20or\x0a','domains','\x22\x20exists\x20both\x20locally\x20and\x20in\x20the\x20cloud.\x20Which\x20one\x20should\x20be\x20used?','\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one,\x20or\x0a','cloud','\x22\x20instead\x20of\x20the\x20saved\x20active\x20profile\x20\x22','No\x20baseUrl\x20configured\x20for\x20profile\x20\x22','334TBFymi','url','\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20','\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20<name>`\x20to\x20create\x20a\x20new\x20one.','baseUrl','1284FMolJm','88vYFJJh','list','fCRYA','oaKTT','cdpEndpoint','fqbOA','envStartPath','18588120bDXMpm','RANGER_SESSION_STATE_PATH=','fdkIB','npuwK','51271vlHqaf','\x20\x20RANGER_TEST_USERNAME\x20is\x20set\x20—\x20using\x20profile\x20\x22','\x20to\x20override.','resolvedEnv','CNJzG','status','profile','log'];_0x3860=function(){return _0x35cfd7;};return _0x3860();}function expandString(_0x161fe2){const _0x1ad454={'yELXg':function(_0x37328b,_0x4b145e){return _0x37328b(_0x4b145e);}};if(typeof _0x161fe2!=='string')return _0x161fe2;return _0x1ad454['yELXg'](resolveEnvVars,_0x161fe2);}function expandOverrides(_0x37bca8){const _0x13de88=_0x1bd3,_0x1205ef={'popoS':function(_0x4e264e,_0x5578b0){return _0x4e264e===_0x5578b0;},'CNJzG':'string','npuwK':function(_0x36ec51,_0x10c3ae){return _0x36ec51(_0x10c3ae);},'eZiMH':function(_0xc275fe,_0x2e14cf){return _0xc275fe(_0x2e14cf);}};if(!_0x37bca8)return _0x37bca8;const _0x351249={..._0x37bca8};return _0x1205ef['popoS'](typeof _0x351249['baseUrl'],_0x1205ef[_0x13de88(0x188)])&&(_0x351249['baseUrl']=_0x1205ef[_0x13de88(0x183)](resolveEnvVars,_0x351249['baseUrl'])),_0x1205ef['popoS'](typeof _0x351249['startPath'],'string')&&(_0x351249[_0x13de88(0x16b)]=_0x1205ef['eZiMH'](resolveEnvVars,_0x351249['startPath'])),_0x351249;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4d714e,_0x1101d1){const _0x50acc8=_0x3d18,_0x22d541=_0x4d714e();while(!![]){try{const _0x505c07=-parseInt(_0x50acc8(0x207))/0x1+-parseInt(_0x50acc8(0x205))/0x2*(-parseInt(_0x50acc8(0x1fb))/0x3)+-parseInt(_0x50acc8(0x204))/0x4+parseInt(_0x50acc8(0x201))/0x5*(parseInt(_0x50acc8(0x1fe))/0x6)+parseInt(_0x50acc8(0x20e))/0x7+parseInt(_0x50acc8(0x202))/0x8+-parseInt(_0x50acc8(0x208))/0x9;if(_0x505c07===_0x1101d1)break;else _0x22d541['push'](_0x22d541['shift']());}catch(_0x307c9d){_0x22d541['push'](_0x22d541['shift']());}}}(_0x5b5f,0xf2843));function firstDefined(..._0x1df6d4){const _0x103b14=_0x3d18,_0x154b58={'IdTuO':function(_0x27bf4f,_0x415ed3){return _0x27bf4f!==_0x415ed3;}};for(const _0x2ab785 of _0x1df6d4){if(_0x2ab785!==undefined&&_0x154b58[_0x103b14(0x1f1)](_0x2ab785,null)&&_0x2ab785!=='')return _0x2ab785;}return undefined;}function normalizeAuthEnvironmentDomain(_0x37cb0f){if(!_0x37cb0f)return undefined;if(/^[a-z][a-z0-9+.-]*:\/\//i['test'](_0x37cb0f))return _0x37cb0f;return'https://'+_0x37cb0f;}export function resolveBaseUrlWithSource(_0x2b19a2){const _0x16f65d=_0x3d18,_0x204632={'hZjIw':function(_0x16484c,_0x3f2f3f){return _0x16484c in _0x3f2f3f;},'CdWma':'baseUrl','xfCLp':function(_0x366739,_0x3a5c81){return _0x366739===_0x3a5c81;},'UbUut':_0x16f65d(0x1fc),'QjowY':_0x16f65d(0x1fd),'vrnnc':'cloud\x20profile\x20settings','dycfp':function(_0x5ad695,_0xe0fa2b){return _0x5ad695(_0xe0fa2b);},'bEElT':function(_0x50b94b,_0x3e4341){return _0x50b94b!==_0x3e4341;},'baZbJ':function(_0x36e402,_0x57f783){return _0x36e402!==_0x57f783;},'OeVwZ':function(_0x47dc98,_0x3b71cf){return _0x47dc98!==_0x3b71cf;}},_0x5a733c=_0x2b19a2[_0x16f65d(0x1f0)],_0x166da4=!!_0x5a733c&&_0x204632[_0x16f65d(0x20c)](_0x204632['CdWma'],_0x5a733c),_0x4bd94f=_0x5a733c?.['baseUrl'],_0x1fab6d=!(_0x166da4&&_0x204632[_0x16f65d(0x1f8)](_0x4bd94f,null)),_0x3bb812=[[_0x2b19a2[_0x16f65d(0x20a)],_0x16f65d(0x203)],[_0x2b19a2['envBaseUrl'],_0x204632[_0x16f65d(0x1f6)]],[_0x2b19a2['localSettingsBaseUrl'],'local\x20profile\x20settings'],[_0x204632['xfCLp'](typeof _0x4bd94f,_0x16f65d(0x200))?_0x4bd94f:undefined,_0x204632[_0x16f65d(0x1f2)]],[_0x1fab6d?_0x2b19a2[_0x16f65d(0x20b)]?.[_0x16f65d(0x206)]:undefined,_0x204632['vrnnc']],[_0x1fab6d?_0x204632[_0x16f65d(0x1f4)](normalizeAuthEnvironmentDomain,_0x2b19a2[_0x16f65d(0x20d)]):undefined,_0x16f65d(0x209)]];for(const [_0x12c0c6,_0x4168c2]of _0x3bb812){if(_0x204632['bEElT'](_0x12c0c6,undefined)&&_0x204632['baZbJ'](_0x12c0c6,null)&&_0x204632[_0x16f65d(0x1ff)](_0x12c0c6,''))return{'baseUrl':_0x12c0c6,'source':_0x4168c2};}return{};}export function resolveBaseUrl(_0x160a0b){const _0x585a92=_0x3d18;return resolveBaseUrlWithSource(_0x160a0b)[_0x585a92(0x206)];}function _0x5b5f(){const _0x1d74e2=['ekoiT','3oIHAez','RANGER_BASE_URL','projects.json\x20override','2869302ngsswk','OeVwZ','string','5YCUSAb','1731144IOtaVZ','--base-url','237264IGBvpx','1834516aKoBCi','baseUrl','1476393EJsRmt','2435634fKUmwe','auth\x20environment\x20domain','flagBaseUrl','cloudSettings','hZjIw','authEnvironmentDomain','8314698iUenGW','tjtfx','projectOverrides','IdTuO','QjowY','startsWith','dycfp','flagStartPath','UbUut','endsWith','xfCLp','startPath'];_0x5b5f=function(){return _0x1d74e2;};return _0x5b5f();}function _0x3d18(_0x4d7135,_0x391695){_0x4d7135=_0x4d7135-0x1f0;const _0x5b5f85=_0x5b5f();let _0x3d18d2=_0x5b5f85[_0x4d7135];return _0x3d18d2;}export function resolveStartPath(_0x90aa0b){const _0x98d58a=_0x3d18,_0x2b22e7={'ekoiT':function(_0x4f6ee2,_0xaf9afc){return _0x4f6ee2 in _0xaf9afc;},'mEwKN':_0x98d58a(0x200)},_0x2c25cd=_0x90aa0b['projectOverrides'],_0x4a7f94=!!_0x2c25cd&&_0x2b22e7[_0x98d58a(0x1fa)]('startPath',_0x2c25cd),_0x1785d6=_0x2c25cd?.[_0x98d58a(0x1f9)],_0x588f9e=!(_0x4a7f94&&_0x1785d6===null);return firstDefined(_0x90aa0b[_0x98d58a(0x1f5)],_0x90aa0b['envStartPath'],typeof _0x1785d6===_0x2b22e7['mEwKN']?_0x1785d6:undefined,_0x588f9e?_0x90aa0b[_0x98d58a(0x20b)]?.['startPath']:undefined);}export function joinBaseAndPath(_0x203001,_0x476694){const _0x5ea7ad=_0x3d18,_0xddfc7a={'tjtfx':function(_0x51f7e4,_0x101daf){return _0x51f7e4+_0x101daf;}};if(!_0x203001)return undefined;if(!_0x476694)return _0x203001;const _0x1e4b1e=_0x203001[_0x5ea7ad(0x1f7)]('/')?_0x203001['slice'](0x0,-0x1):_0x203001,_0x22e4e2=_0x476694[_0x5ea7ad(0x1f3)]('/')?_0x476694:_0xddfc7a[_0x5ea7ad(0x20f)]('/',_0x476694);return _0x1e4b1e+_0x22e4e2;}export function resolveProfileUrl(_0x2771f7){const _0x566e88={'YJZji':function(_0x4501b4,_0xe41027){return _0x4501b4(_0xe41027);},'YwHNC':function(_0x368247,_0x4222a3,_0x57a0b2){return _0x368247(_0x4222a3,_0x57a0b2);}},{baseUrl:_0x518c87,source:_0x3a7c74}=resolveBaseUrlWithSource(_0x2771f7),_0x669a9e=_0x566e88['YJZji'](resolveStartPath,_0x2771f7);return{'baseUrl':_0x518c87,'baseUrlSource':_0x3a7c74,'startPath':_0x669a9e,'url':_0x566e88['YwHNC'](joinBaseAndPath,_0x518c87,_0x669a9e)};}export function readUrlEnvVars(_0x3ecbe4=process['env']){const _0x1e4dc5=_0x3d18;return{'envBaseUrl':_0x3ecbe4[_0x1e4dc5(0x1fc)],'envStartPath':_0x3ecbe4['RANGER_START_PATH']};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0x39a3(_0x20897a,_0x37a3f1){_0x20897a=_0x20897a-0x1de;const _0x4855b4=_0x4855();let _0x39a3a3=_0x4855b4[_0x20897a];return _0x39a3a3;}function _0x4855(){const _0x356969=['ms...','1259414BTlUYS','9pdVcNs','543190evgQOH','15468NkdFfX','label','BucOk','1OIrsRx','104OJMFhs','3327192szpePy','LVSTX','40061VqUgRD','baseDelayMs','861750GHnFGB','RyxnB','2948340TSsBOJ','308eLBylP'];_0x4855=function(){return _0x356969;};return _0x4855();}(function(_0x5a099f,_0x526d96){const _0x17739b=_0x39a3,_0x464b6f=_0x5a099f();while(!![]){try{const _0x1a30a7=-parseInt(_0x17739b(0x1e8))/0x1*(parseInt(_0x17739b(0x1e2))/0x2)+-parseInt(_0x17739b(0x1e5))/0x3*(-parseInt(_0x17739b(0x1e0))/0x4)+-parseInt(_0x17739b(0x1e4))/0x5+parseInt(_0x17739b(0x1ee))/0x6+-parseInt(_0x17739b(0x1ec))/0x7*(parseInt(_0x17739b(0x1e9))/0x8)+-parseInt(_0x17739b(0x1e3))/0x9*(-parseInt(_0x17739b(0x1df))/0xa)+parseInt(_0x17739b(0x1ea))/0xb;if(_0x1a30a7===_0x526d96)break;else _0x464b6f['push'](_0x464b6f['shift']());}catch(_0x44e84a){_0x464b6f['push'](_0x464b6f['shift']());}}}(_0x4855,0x4f64f));const DEFAULT_MAX_RETRIES=0x3,DEFAULT_BASE_DELAY_MS=0x1f4;export async function withRetry(_0x1b82b1,_0x38be19){const _0x4c7174=_0x39a3,_0x27459f={'RyxnB':function(_0x3dc05e){return _0x3dc05e();},'LVSTX':function(_0x5c4836,_0xb4bf4b){return _0x5c4836(_0xb4bf4b);},'BucOk':function(_0x12b427,_0x505556){return _0x12b427+_0x505556;}},_0x2c594b=_0x38be19?.['maxRetries']??DEFAULT_MAX_RETRIES,_0x25ee04=_0x38be19?.[_0x4c7174(0x1ed)]??DEFAULT_BASE_DELAY_MS;let _0x3ce778;for(let _0xe784d2=0x0;_0xe784d2<=_0x2c594b;_0xe784d2++){try{return await _0x27459f[_0x4c7174(0x1de)](_0x1b82b1);}catch(_0x518831){_0x3ce778=_0x518831 instanceof Error?_0x518831:new Error(_0x27459f[_0x4c7174(0x1eb)](String,_0x518831));if(_0xe784d2<_0x2c594b){const _0x56f1dd=_0x25ee04*Math['pow'](0x2,_0xe784d2);_0x38be19?.[_0x4c7174(0x1e6)]&&console['error'](_0x38be19[_0x4c7174(0x1e6)]+'\x20failed\x20(attempt\x20'+_0x27459f[_0x4c7174(0x1e7)](_0xe784d2,0x1)+'/'+(_0x2c594b+0x1)+'),\x20retrying\x20in\x20'+_0x56f1dd+_0x4c7174(0x1e1)),await new Promise(_0x2f2acc=>setTimeout(_0x2f2acc,_0x56f1dd));}}}throw _0x3ce778;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x943e,_0x470d27){const _0x501943=_0x3168,_0x4f34fc=_0x943e();while(!![]){try{const _0x2ca7c2=-parseInt(_0x501943(0xf1))/0x1+parseInt(_0x501943(0xf3))/0x2*(-parseInt(_0x501943(0xef))/0x3)+parseInt(_0x501943(0xed))/0x4+-parseInt(_0x501943(0xf2))/0x5*(-parseInt(_0x501943(0xf7))/0x6)+-parseInt(_0x501943(0xf6))/0x7*(-parseInt(_0x501943(0xf8))/0x8)+-parseInt(_0x501943(0xee))/0x9*(parseInt(_0x501943(0xf0))/0xa)+parseInt(_0x501943(0xec))/0xb*(parseInt(_0x501943(0xf4))/0xc);if(_0x2ca7c2===_0x470d27)break;else _0x4f34fc['push'](_0x4f34fc['shift']());}catch(_0x4fab19){_0x4f34fc['push'](_0x4f34fc['shift']());}}}(_0x2058,0x5a013));const ABSOLUTE_URL_PATTERN=/https?:\/\/[^\s"'<>()\[\]]+/gi;export function extractUrlOrigins(_0xceb902){const _0x1548f8=_0x3168,_0x20266a=new Set();for(const _0x138c60 of _0xceb902['matchAll'](ABSOLUTE_URL_PATTERN)){const _0x570773=_0x138c60[0x0][_0x1548f8(0xea)](/[.,;:!?]+$/,'');try{_0x20266a[_0x1548f8(0xf5)](new URL(_0x570773)[_0x1548f8(0xeb)]);}catch{}}return[..._0x20266a];}function _0x3168(_0x5cd3b1,_0x1d88e1){_0x5cd3b1=_0x5cd3b1-0xea;const _0x20580f=_0x2058();let _0x316875=_0x20580f[_0x5cd3b1];return _0x316875;}export function findScenarioOriginMismatches(_0xa8a73b,_0xbe5216){const _0x121796={'GDYIy':function(_0x3d0241,_0x481ed8){return _0x3d0241(_0x481ed8);}};let _0x1ea6cd;try{_0x1ea6cd=new URL(_0xbe5216)['origin'];}catch{return[];}return _0x121796['GDYIy'](extractUrlOrigins,_0xa8a73b)['filter'](_0x174cab=>_0x174cab!==_0x1ea6cd);}function _0x2058(){const _0x340727=['143690TClPnx','1192726iMXRdq','96UXAszd','add','371MTRNty','6hMtkGk','66512cmQcgR','replace','origin','1002397UiBlqs','2633316muorzZ','207grkNiI','3FnIKtY','128680AbqWMk','595739MJihku'];_0x2058=function(){return _0x340727;};return _0x2058();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x39918b=_0x3ee1;(function(_0x57e62e,_0x4ae911){const _0x2039c2=_0x3ee1,_0x1873c6=_0x57e62e();while(!![]){try{const _0x3fc259=parseInt(_0x2039c2(0xc5))/0x1*(-parseInt(_0x2039c2(0xd3))/0x2)+parseInt(_0x2039c2(0xb5))/0x3*(parseInt(_0x2039c2(0xc2))/0x4)+-parseInt(_0x2039c2(0xb6))/0x5+parseInt(_0x2039c2(0xbd))/0x6*(-parseInt(_0x2039c2(0xcf))/0x7)+parseInt(_0x2039c2(0xc8))/0x8+parseInt(_0x2039c2(0xda))/0x9*(-parseInt(_0x2039c2(0xc3))/0xa)+parseInt(_0x2039c2(0xd2))/0xb*(parseInt(_0x2039c2(0xc4))/0xc);if(_0x3fc259===_0x4ae911)break;else _0x1873c6['push'](_0x1873c6['shift']());}catch(_0x4b3b01){_0x1873c6['push'](_0x1873c6['shift']());}}}(_0x1334,0x2b8d8));import*as _0x24ad0d from'fs';import*as _0x4bf313 from'path';import*as _0x5dc103 from'os';import{execSync}from'child_process';const CACHE_FILE=_0x4bf313[_0x39918b(0xab)](_0x5dc103[_0x39918b(0xb2)](),'.claude','.ranger_cache.json');function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0x2bf693=_0x39918b,_0x452dfe={'FBMnn':_0x2bf693(0xe3)};try{if(_0x24ad0d['existsSync'](CACHE_FILE)){const _0x1752a5=JSON['parse'](_0x24ad0d['readFileSync'](CACHE_FILE,_0x452dfe[_0x2bf693(0xdd)]));return{'version':0x3,'sessions':_0x1752a5['sessions']||{},'branches':_0x1752a5['branches']||{},'lastEnabledSessionClearedAt':_0x1752a5[_0x2bf693(0xd1)]};}}catch{}return createEmptyCache();}function saveCache(_0x39f4f8){const _0x244090=_0x39918b;try{const _0x226b0b=_0x4bf313[_0x244090(0xcc)](CACHE_FILE);!_0x24ad0d[_0x244090(0xc1)](_0x226b0b)&&_0x24ad0d['mkdirSync'](_0x226b0b,{'recursive':!![]}),_0x24ad0d[_0x244090(0xb1)](CACHE_FILE,JSON['stringify'](_0x39f4f8,null,0x2));}catch{}}export function getCurrentBranch(){const _0x3e1f3b=_0x39918b,_0x2fca24={'camcm':function(_0x58c733,_0x592588,_0x13ce5d){return _0x58c733(_0x592588,_0x13ce5d);},'ExGoQ':_0x3e1f3b(0xd4),'mRBJS':_0x3e1f3b(0xe3),'Uqfqy':_0x3e1f3b(0xb8),'iOWbr':function(_0x57bdee,_0x52c0c3){return _0x57bdee===_0x52c0c3;},'aNJFI':_0x3e1f3b(0xae)};try{const _0x1b5fc9=_0x2fca24[_0x3e1f3b(0xd6)](execSync,_0x2fca24['ExGoQ'],{'encoding':_0x2fca24['mRBJS'],'stdio':[_0x3e1f3b(0xb8),_0x2fca24[_0x3e1f3b(0xc7)],_0x3e1f3b(0xb8)]})['trim']();if(!_0x1b5fc9||_0x2fca24[_0x3e1f3b(0xe0)](_0x1b5fc9,_0x2fca24[_0x3e1f3b(0xb7)]))return null;return _0x1b5fc9;}catch{return null;}}export function enableBranch(_0x5b0c1e){const _0x960449={'bGSbu':function(_0x3c0e6b){return _0x3c0e6b();}},_0x3fab79=_0x960449['bGSbu'](loadCache);_0x3fab79['branches'][_0x5b0c1e]=!![],saveCache(_0x3fab79);}export function disableBranch(_0x2030cd){const _0x3dbd50=_0x39918b,_0x3007ff={'clYFI':function(_0x821c31,_0x28496d){return _0x821c31(_0x28496d);}},_0x3b8cfc=loadCache();delete _0x3b8cfc['branches'][_0x2030cd],_0x3007ff[_0x3dbd50(0xcb)](saveCache,_0x3b8cfc);}function _0x3ee1(_0x1398ae,_0x5372d5){_0x1398ae=_0x1398ae-0xaa;const _0x133492=_0x1334();let _0x3ee12f=_0x133492[_0x1398ae];return _0x3ee12f;}export function isBranchEnabled(_0x10ce76){const _0x328dfa=_0x39918b,_0x13d370={'KUgHG':function(_0x1fb40c,_0x253cdf){return _0x1fb40c===_0x253cdf;}},_0x125b76=loadCache();return _0x13d370['KUgHG'](_0x125b76[_0x328dfa(0xd9)][_0x10ce76],!![]);}function getOrCreateSession(_0x295381,_0x47963c){return!_0x295381['sessions'][_0x47963c]&&(_0x295381['sessions'][_0x47963c]={}),_0x295381['sessions'][_0x47963c];}export function enableSession(_0x5bf9b9){const _0x492a7a=_0x39918b,_0x3efb51={'dVtXi':function(_0x5cfcd9){return _0x5cfcd9();},'RnegA':function(_0x598cb1,_0x3fd85f,_0x4e3f1a){return _0x598cb1(_0x3fd85f,_0x4e3f1a);},'KSkUd':function(_0x2b389b,_0xaa01d7){return _0x2b389b!==_0xaa01d7;},'pSHfE':function(_0x29e9cb,_0xfdd0cc){return _0x29e9cb(_0xfdd0cc);}},_0x454a6e=_0x3efb51['dVtXi'](loadCache),_0x41edb1=_0x3efb51['RnegA'](getOrCreateSession,_0x454a6e,_0x5bf9b9);_0x41edb1['enabled']=!![];const _0x5a5f43=getCurrentBranch();_0x5a5f43&&_0x5a5f43!==_0x492a7a(0xe4)&&_0x3efb51['KSkUd'](_0x5a5f43,_0x492a7a(0xbf))&&(_0x454a6e[_0x492a7a(0xd9)][_0x5a5f43]=!![],_0x41edb1[_0x492a7a(0xdc)]=_0x5a5f43),_0x3efb51['pSHfE'](saveCache,_0x454a6e);}export function isSessionEnabled(_0x3753b3){const _0x2805cc=_0x39918b,_0x36607d={'fzmFq':function(_0x3dd81f){return _0x3dd81f();},'drnce':function(_0x53e595){return _0x53e595();},'lRpDj':'main','RWPRu':function(_0x31268f,_0x237849){return _0x31268f===_0x237849;}},_0x23fc31=_0x36607d[_0x2805cc(0xc9)](loadCache),_0x2d4135=_0x36607d['drnce'](getCurrentBranch);if(!_0x2d4135||_0x2d4135===_0x36607d[_0x2805cc(0xb9)]||_0x2d4135===_0x2805cc(0xbf))return _0x23fc31[_0x2805cc(0xbb)][_0x3753b3]?.['enabled']===!![];const _0x2cb568=_0x23fc31['branches'][_0x2d4135]===!![],_0x36cad8=_0x36607d['RWPRu'](_0x23fc31[_0x2805cc(0xbb)][_0x3753b3]?.['enabled'],!![]);return _0x2cb568||_0x36cad8;}export function disableSession(_0x53037f){const _0x7cb726=_0x39918b,_0x178522={'XXlik':function(_0x3e4976,_0x2ff04c,_0x2dd97f){return _0x3e4976(_0x2ff04c,_0x2dd97f);},'BcRRf':function(_0x4ebb2d,_0x55ae47){return _0x4ebb2d(_0x55ae47);}},_0x164a05=loadCache(),_0x24be06=_0x178522['XXlik'](getOrCreateSession,_0x164a05,_0x53037f);_0x24be06[_0x7cb726(0xe1)]=![],_0x178522['BcRRf'](saveCache,_0x164a05);}export function updateBranchTracking(_0x403112){const _0x379a35=_0x39918b,_0x4a23a7={'fMGoU':function(_0x4072ab){return _0x4072ab();},'UMgBb':function(_0x209e42,_0x1f9ce3){return _0x209e42===_0x1f9ce3;},'AvUds':'master','xHPdX':function(_0x1fa202,_0x563d2f){return _0x1fa202!==_0x563d2f;},'UrvXa':function(_0xf30e65,_0x3bcc1c){return _0xf30e65(_0x3bcc1c);}},_0x4ebd2d=loadCache(),_0x315582=_0x4ebd2d[_0x379a35(0xbb)][_0x403112];if(!_0x315582?.[_0x379a35(0xe1)])return;const _0x42c77f=_0x4a23a7[_0x379a35(0xaa)](getCurrentBranch);if(!_0x42c77f||_0x42c77f==='main'||_0x4a23a7['UMgBb'](_0x42c77f,_0x4a23a7[_0x379a35(0xdb)]))return;_0x4a23a7[_0x379a35(0xaf)](_0x315582[_0x379a35(0xdc)],_0x42c77f)&&(_0x4ebd2d[_0x379a35(0xd9)][_0x42c77f]=!![],_0x315582['currentBranch']=_0x42c77f,_0x4a23a7['UrvXa'](saveCache,_0x4ebd2d));}export function initBranchTracking(_0x3f0de5){const _0x5d44e8=_0x39918b,_0x5403ea={'RtJiW':function(_0x531dc9){return _0x531dc9();},'nnPnM':function(_0x56a577,_0x3f5979){return _0x56a577===_0x3f5979;},'QnjNz':'master','SJBud':function(_0x394976,_0x56339f,_0x1efdf6){return _0x394976(_0x56339f,_0x1efdf6);}},_0x295bf1=_0x5403ea['RtJiW'](loadCache),_0x55a7e7=getCurrentBranch();if(!_0x55a7e7||_0x5403ea[_0x5d44e8(0xde)](_0x55a7e7,'main')||_0x55a7e7===_0x5403ea[_0x5d44e8(0xce)])return;if(_0x5403ea['nnPnM'](_0x295bf1[_0x5d44e8(0xd9)][_0x55a7e7],!![])){const _0x57e938=_0x5403ea['SJBud'](getOrCreateSession,_0x295bf1,_0x3f0de5);_0x57e938['enabled']=!![],_0x57e938['currentBranch']=_0x55a7e7,saveCache(_0x295bf1);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;function _0x1334(){const _0x59c820=['40bSqNLm','5421648mxicOo','331736aVADGj','cnpES','Uqfqy','2221072YTClqB','fzmFq','MsicI','clYFI','dirname','lastStopReminderAt','QnjNz','7dMVhqG','BZvAl','lastEnabledSessionClearedAt','11wPLMAA','2dOgNMY','git\x20rev-parse\x20--abbrev-ref\x20HEAD','rwZOa','camcm','xTCnE','XQeKh','branches','53595yPevIO','AvUds','currentBranch','FBMnn','nnPnM','RfQXH','iOWbr','enabled','JsYEU','utf-8','main','fMGoU','join','clear','registeredAt','HEAD','xHPdX','featureId','writeFileSync','homedir','HGCcP','tAVJx','45705ABZqjp','918360ErjadQ','aNJFI','pipe','lRpDj','lastPlanReminderAt','sessions','YtFAy','162318BbgeOE','tNhcD','master','now','existsSync','4FdaSPU'];_0x1334=function(){return _0x59c820;};return _0x1334();}export function recordEnabledSessionCleared(_0x555af4){const _0x22f23d=_0x39918b,_0x34153a={'iqAjZ':function(_0x500525){return _0x500525();},'wULWh':function(_0x220a83,_0x5f45b9){return _0x220a83(_0x5f45b9);}},_0x31f1c5=_0x34153a['iqAjZ'](loadCache),_0x27a032=_0x31f1c5[_0x22f23d(0xbb)][_0x555af4];_0x27a032?.[_0x22f23d(0xe1)]&&(_0x31f1c5[_0x22f23d(0xd1)]=Date[_0x22f23d(0xc0)](),_0x34153a['wULWh'](saveCache,_0x31f1c5));}export function shouldAutoEnableAfterClear(_0x584cb2){const _0x23fe41=_0x39918b,_0x2cf1f8={'snfXv':function(_0x35519d,_0x22d6e4){return _0x35519d!==_0x22d6e4;},'mwbRz':_0x23fe41(0xac),'cDhuF':function(_0x50f474,_0x1aeea2){return _0x50f474-_0x1aeea2;},'BZvAl':function(_0x371bf8,_0x423467){return _0x371bf8<=_0x423467;}};if(_0x2cf1f8['snfXv'](_0x584cb2,_0x2cf1f8['mwbRz']))return![];const _0xf506a0=loadCache(),_0x2801e1=_0xf506a0[_0x23fe41(0xd1)];if(!_0x2801e1)return![];const _0x2c5ab8=_0x2cf1f8['cDhuF'](Date[_0x23fe41(0xc0)](),_0x2801e1);return _0x2cf1f8[_0x23fe41(0xd0)](_0x2c5ab8,CLEAR_AUTO_ENABLE_WINDOW_MS);}export function autoEnableAfterClear(_0x4f571a){const _0xca29dc=_0x39918b,_0x1f3ae9={'cnpES':function(_0x1b1763){return _0x1b1763();},'YtFAy':function(_0x378521,_0x56b856){return _0x378521!==_0x56b856;},'ZpDpd':'master','ltGYD':function(_0x41ced9,_0x1224b1){return _0x41ced9(_0x1224b1);}},_0x4b8afe=_0x1f3ae9[_0xca29dc(0xc6)](loadCache),_0x505e44=getOrCreateSession(_0x4b8afe,_0x4f571a);_0x505e44['enabled']=!![];const _0xb965d3=_0x1f3ae9[_0xca29dc(0xc6)](getCurrentBranch);_0xb965d3&&_0x1f3ae9[_0xca29dc(0xbc)](_0xb965d3,'main')&&_0x1f3ae9['YtFAy'](_0xb965d3,_0x1f3ae9['ZpDpd'])&&(_0x505e44['currentBranch']=_0xb965d3),delete _0x4b8afe['lastEnabledSessionClearedAt'],_0x1f3ae9['ltGYD'](saveCache,_0x4b8afe);}export function registerSession(_0x73676c,_0xd410a2){const _0x152a4a=_0x39918b,_0x1dc61f={'XQeKh':function(_0x59bbb9){return _0x59bbb9();},'tAVJx':function(_0x6fa130,_0x39afba,_0x2970ae){return _0x6fa130(_0x39afba,_0x2970ae);},'pCtOI':function(_0x257a3c,_0x540303){return _0x257a3c(_0x540303);}},_0x57bb9e=_0x1dc61f[_0x152a4a(0xd8)](loadCache),_0x14cadf=_0x1dc61f[_0x152a4a(0xb4)](getOrCreateSession,_0x57bb9e,_0x73676c);_0x14cadf[_0x152a4a(0xb0)]=_0xd410a2,_0x14cadf['registeredAt']=new Date()['toISOString'](),_0x1dc61f['pCtOI'](saveCache,_0x57bb9e);}export function getSessionEntry(_0x50d51e){const _0x36210e=_0x39918b,_0x3f5cb9={'rwZOa':function(_0x2d4f18){return _0x2d4f18();}},_0x28579d=_0x3f5cb9[_0x36210e(0xd5)](loadCache),_0x5654d7=_0x28579d[_0x36210e(0xbb)][_0x50d51e];if(_0x5654d7?.[_0x36210e(0xb0)]&&_0x5654d7?.[_0x36210e(0xad)])return{'featureId':_0x5654d7[_0x36210e(0xb0)],'registeredAt':_0x5654d7[_0x36210e(0xad)]};return null;}export function unregisterSession(_0x221826){const _0x3e1087=_0x39918b,_0x55f8d4={'HGCcP':function(_0x1fea7e){return _0x1fea7e();},'NobhJ':function(_0x1cd673,_0x22fe03){return _0x1cd673(_0x22fe03);}},_0x228c4b=_0x55f8d4[_0x3e1087(0xb3)](loadCache),_0x47bdf7=_0x228c4b['sessions'][_0x221826];_0x47bdf7&&(delete _0x47bdf7['featureId'],delete _0x47bdf7['registeredAt'],_0x55f8d4['NobhJ'](saveCache,_0x228c4b));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0x2bee4b){const _0x5cf1e1=_0x39918b,_0x40157b={'tNhcD':function(_0x34234b){return _0x34234b();},'xTCnE':function(_0x541036,_0x2ff261,_0x36b28d){return _0x541036(_0x2ff261,_0x36b28d);},'MsicI':function(_0x3273d3,_0x337c52){return _0x3273d3>=_0x337c52;},'JsYEU':function(_0x4a875e,_0x1c9d65){return _0x4a875e-_0x1c9d65;},'UqtOK':function(_0x4ebc98,_0x3884f5){return _0x4ebc98(_0x3884f5);}},_0xf6bce3=_0x40157b[_0x5cf1e1(0xbe)](loadCache),_0x3b7fd6=_0x40157b[_0x5cf1e1(0xd7)](getOrCreateSession,_0xf6bce3,_0x2bee4b),_0x25c414=_0x3b7fd6['lastPlanReminderAt']||0x0,_0x1066c3=Date['now']();if(_0x40157b[_0x5cf1e1(0xca)](_0x40157b[_0x5cf1e1(0xe2)](_0x1066c3,_0x25c414),PLAN_REMINDER_INTERVAL_MS))return _0x3b7fd6[_0x5cf1e1(0xba)]=_0x1066c3,_0x40157b['UqtOK'](saveCache,_0xf6bce3),!![];return![];}export function shouldShowStopReminder(_0x460ac6){const _0x36835c=_0x39918b,_0x3fc918={'bOmes':function(_0x49f522){return _0x49f522();},'RfQXH':function(_0x21f4ff,_0x314a7b){return _0x21f4ff>=_0x314a7b;},'rWqWY':function(_0x8f7b59,_0x3a06a4){return _0x8f7b59-_0x3a06a4;},'kytBn':function(_0x39880c,_0x482f04){return _0x39880c(_0x482f04);}},_0x1000d6=_0x3fc918['bOmes'](loadCache),_0x5487c6=getOrCreateSession(_0x1000d6,_0x460ac6),_0x27ce44=_0x5487c6[_0x36835c(0xcd)]||0x0,_0x206efe=Date['now']();if(_0x3fc918[_0x36835c(0xdf)](_0x3fc918['rWqWY'](_0x206efe,_0x27ce44),STOP_REMINDER_INTERVAL_MS))return _0x5487c6['lastStopReminderAt']=_0x206efe,_0x3fc918['kytBn'](saveCache,_0x1000d6),!![];return![];}export function hasSessionBeenPrompted(_0x51eef0){const _0x2a6d08=_0x39918b,_0x4cc54d=loadCache();return _0x4cc54d[_0x2a6d08(0xbb)][_0x51eef0]?.['prompted']===!![];}export function markSessionPrompted(_0x4ce77e){const _0x1ea0fc={'lsesW':function(_0x4330b9){return _0x4330b9();}},_0x84351=_0x1ea0fc['lsesW'](loadCache),_0x1bcfa6=getOrCreateSession(_0x84351,_0x4ce77e);_0x1bcfa6['prompted']=!![],saveCache(_0x84351);}export function getCacheFile(){return CACHE_FILE;}
|
|
1
|
+
const _0x397bde=_0x5b0d;(function(_0x5c822b,_0x49b42f){const _0x42ca1c=_0x5b0d,_0x4a2825=_0x5c822b();while(!![]){try{const _0x2f94a2=-parseInt(_0x42ca1c(0x14c))/0x1+parseInt(_0x42ca1c(0x171))/0x2+parseInt(_0x42ca1c(0x15b))/0x3*(-parseInt(_0x42ca1c(0x163))/0x4)+parseInt(_0x42ca1c(0x160))/0x5+parseInt(_0x42ca1c(0x142))/0x6+parseInt(_0x42ca1c(0x162))/0x7+parseInt(_0x42ca1c(0x147))/0x8*(-parseInt(_0x42ca1c(0x15f))/0x9);if(_0x2f94a2===_0x49b42f)break;else _0x4a2825['push'](_0x4a2825['shift']());}catch(_0x593d08){_0x4a2825['push'](_0x4a2825['shift']());}}}(_0x4d73,0x55872));import*as _0x1d78c2 from'fs';import*as _0x411c09 from'path';import*as _0x3660d3 from'os';import{execSync}from'child_process';function _0x5b0d(_0x258d8f,_0xddd432){_0x258d8f=_0x258d8f-0x13e;const _0x4d737f=_0x4d73();let _0x5b0dc1=_0x4d737f[_0x258d8f];return _0x5b0dc1;}const CACHE_FILE=_0x411c09[_0x397bde(0x15e)](_0x3660d3['homedir'](),_0x397bde(0x156),'.ranger_cache.json');function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0x99eb83=_0x397bde,_0x260200={'MXRza':_0x99eb83(0x158)};try{if(_0x1d78c2[_0x99eb83(0x168)](CACHE_FILE)){const _0x4e6408=JSON['parse'](_0x1d78c2['readFileSync'](CACHE_FILE,_0x260200[_0x99eb83(0x13f)]));return{'version':0x3,'sessions':_0x4e6408[_0x99eb83(0x16c)]||{},'branches':_0x4e6408[_0x99eb83(0x16e)]||{},'lastEnabledSessionClearedAt':_0x4e6408['lastEnabledSessionClearedAt']};}}catch{}return createEmptyCache();}function saveCache(_0x15ccfb){const _0x200c85=_0x397bde;try{const _0xd55b52=_0x411c09['dirname'](CACHE_FILE);!_0x1d78c2['existsSync'](_0xd55b52)&&_0x1d78c2[_0x200c85(0x167)](_0xd55b52,{'recursive':!![]}),_0x1d78c2['writeFileSync'](CACHE_FILE,JSON[_0x200c85(0x14f)](_0x15ccfb,null,0x2));}catch{}}export function getCurrentBranch(){const _0x419822=_0x397bde,_0x4b81a5={'TXRGv':function(_0x2304a4,_0x513f08,_0x2a7a38){return _0x2304a4(_0x513f08,_0x2a7a38);},'HjwRb':'pipe','WLWGw':_0x419822(0x14d)};try{const _0x3ff1d6=_0x4b81a5['TXRGv'](execSync,_0x419822(0x143),{'encoding':'utf-8','stdio':[_0x4b81a5['HjwRb'],_0x4b81a5['HjwRb'],'pipe']})[_0x419822(0x13e)]();if(!_0x3ff1d6||_0x3ff1d6===_0x4b81a5[_0x419822(0x16d)])return null;return _0x3ff1d6;}catch{return null;}}export function enableBranch(_0x1ae1b9){const _0x56aa05={'zRPDP':function(_0x5d2dd0,_0x4b8202){return _0x5d2dd0(_0x4b8202);}},_0x39034c=loadCache();_0x39034c['branches'][_0x1ae1b9]=!![],_0x56aa05['zRPDP'](saveCache,_0x39034c);}export function disableBranch(_0x1d1e56){const _0x6f2cb5=_0x397bde,_0x4d0c39={'JboEJ':function(_0x45d503,_0x1e92f0){return _0x45d503(_0x1e92f0);}},_0x2f4235=loadCache();delete _0x2f4235['branches'][_0x1d1e56],_0x4d0c39[_0x6f2cb5(0x15c)](saveCache,_0x2f4235);}export function isBranchEnabled(_0x3c7f06){const _0x3b4f4b=_0x397bde,_0x4a2136={'Szfap':function(_0x2f6466){return _0x2f6466();},'HTjIA':function(_0x499b6d,_0x262216){return _0x499b6d===_0x262216;}},_0x2f67ac=_0x4a2136['Szfap'](loadCache);return _0x4a2136['HTjIA'](_0x2f67ac[_0x3b4f4b(0x16e)][_0x3c7f06],!![]);}function _0x4d73(){const _0x194105=['77596wjYlUk','LPDrm','now','fdLnB','mkdirSync','existsSync','RcEMH','oaMgr','currentBranch','sessions','WLWGw','branches','registeredAt','SIhSJ','1067552knoSkj','trim','MXRza','yAxtf','nASjB','2345418wcrXxD','git\x20rev-parse\x20--abbrev-ref\x20HEAD','featureId','enabled','jEhOJ','480JPsuDg','main','gJJUD','lastPlanReminderAt','lastStopReminderAt','582206WXetXZ','HEAD','cnFbi','stringify','FXrRF','bXqmU','toISOString','icfBZ','prompted','master','.claude','lastEnabledSessionClearedAt','utf-8','WHzTS','QYdsG','42kLFLhM','JboEJ','kxjYG','join','30411ZrLGln','1824370VVsdUq','iFXDy','821107bpmFXE'];_0x4d73=function(){return _0x194105;};return _0x4d73();}function getOrCreateSession(_0x8c22d4,_0x4b70c6){return!_0x8c22d4['sessions'][_0x4b70c6]&&(_0x8c22d4['sessions'][_0x4b70c6]={}),_0x8c22d4['sessions'][_0x4b70c6];}export function enableSession(_0x45aa7a){const _0x34bbd1=_0x397bde,_0x12dc31={'fdLnB':function(_0x29a42c,_0x12c5ca,_0x596568){return _0x29a42c(_0x12c5ca,_0x596568);},'RcEMH':function(_0x1be75e){return _0x1be75e();},'cnFbi':function(_0x387d1e,_0xf2ae84){return _0x387d1e(_0xf2ae84);}},_0x3a1d84=loadCache(),_0x2e7682=_0x12dc31[_0x34bbd1(0x166)](getOrCreateSession,_0x3a1d84,_0x45aa7a);_0x2e7682['enabled']=!![];const _0x1bcdd3=_0x12dc31[_0x34bbd1(0x169)](getCurrentBranch);_0x1bcdd3&&_0x1bcdd3!==_0x34bbd1(0x148)&&_0x1bcdd3!=='master'&&(_0x3a1d84[_0x34bbd1(0x16e)][_0x1bcdd3]=!![],_0x2e7682['currentBranch']=_0x1bcdd3),_0x12dc31[_0x34bbd1(0x14e)](saveCache,_0x3a1d84);}export function isSessionEnabled(_0x3606c4){const _0x19dde9=_0x397bde,_0x3caf05={'FXrRF':function(_0x138c75){return _0x138c75();},'SIhSJ':function(_0x4c6bea){return _0x4c6bea();},'bkCTL':function(_0x2ce076,_0x5d6dd9){return _0x2ce076===_0x5d6dd9;},'uBbQN':'master','yWAhk':function(_0x1fa3d4,_0xcba275){return _0x1fa3d4===_0xcba275;}},_0x553a2f=_0x3caf05[_0x19dde9(0x150)](loadCache),_0x2913c6=_0x3caf05[_0x19dde9(0x170)](getCurrentBranch);if(!_0x2913c6||_0x2913c6===_0x19dde9(0x148)||_0x3caf05['bkCTL'](_0x2913c6,_0x3caf05['uBbQN']))return _0x553a2f['sessions'][_0x3606c4]?.[_0x19dde9(0x145)]===!![];const _0x29b393=_0x553a2f[_0x19dde9(0x16e)][_0x2913c6]===!![],_0x244e47=_0x3caf05['yWAhk'](_0x553a2f[_0x19dde9(0x16c)][_0x3606c4]?.['enabled'],!![]);return _0x29b393||_0x244e47;}export function disableSession(_0x3cf630){const _0x326883={'xKWYP':function(_0x5f4914,_0x5d92e6,_0x260de0){return _0x5f4914(_0x5d92e6,_0x260de0);},'wwPQX':function(_0x31763e,_0x4d0cbb){return _0x31763e(_0x4d0cbb);}},_0x531d62=loadCache(),_0x5bc2cc=_0x326883['xKWYP'](getOrCreateSession,_0x531d62,_0x3cf630);_0x5bc2cc['enabled']=![],_0x326883['wwPQX'](saveCache,_0x531d62);}export function updateBranchTracking(_0x3f52ab){const _0x72fca0=_0x397bde,_0x22faf9={'jEhOJ':function(_0x57279c){return _0x57279c();},'yAxtf':function(_0x688cb0){return _0x688cb0();},'uIoLQ':function(_0x1cf610,_0x4b59dc){return _0x1cf610===_0x4b59dc;},'kxjYG':function(_0x75a95a,_0x18bad4){return _0x75a95a===_0x18bad4;},'ubFmN':'master'},_0x3f0738=_0x22faf9[_0x72fca0(0x146)](loadCache),_0x1c6549=_0x3f0738[_0x72fca0(0x16c)][_0x3f52ab];if(!_0x1c6549?.['enabled'])return;const _0x2d7029=_0x22faf9[_0x72fca0(0x140)](getCurrentBranch);if(!_0x2d7029||_0x22faf9['uIoLQ'](_0x2d7029,'main')||_0x22faf9[_0x72fca0(0x15d)](_0x2d7029,_0x22faf9['ubFmN']))return;_0x1c6549[_0x72fca0(0x16b)]!==_0x2d7029&&(_0x3f0738['branches'][_0x2d7029]=!![],_0x1c6549[_0x72fca0(0x16b)]=_0x2d7029,saveCache(_0x3f0738));}export function initBranchTracking(_0x3eacf4){const _0x67b1ee=_0x397bde,_0x5c212f={'bXqmU':function(_0x2751f4){return _0x2751f4();},'LPDrm':function(_0x2f27a1,_0x1b82a3){return _0x2f27a1===_0x1b82a3;},'gJJUD':function(_0x5d4b63,_0x3e80b1,_0x27fd26){return _0x5d4b63(_0x3e80b1,_0x27fd26);}},_0x48fdd3=loadCache(),_0x276875=_0x5c212f[_0x67b1ee(0x151)](getCurrentBranch);if(!_0x276875||_0x5c212f[_0x67b1ee(0x164)](_0x276875,'main')||_0x276875==='master')return;if(_0x48fdd3[_0x67b1ee(0x16e)][_0x276875]===!![]){const _0x3c32b7=_0x5c212f[_0x67b1ee(0x149)](getOrCreateSession,_0x48fdd3,_0x3eacf4);_0x3c32b7[_0x67b1ee(0x145)]=!![],_0x3c32b7['currentBranch']=_0x276875,saveCache(_0x48fdd3);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;export function recordEnabledSessionCleared(_0x5a166a){const _0x199039=_0x397bde,_0x447320=loadCache(),_0xfff95b=_0x447320['sessions'][_0x5a166a];_0xfff95b?.['enabled']&&(_0x447320['lastEnabledSessionClearedAt']=Date[_0x199039(0x165)](),saveCache(_0x447320));}export function shouldAutoEnableAfterClear(_0x2efb26){const _0x5a2433=_0x397bde,_0xb8f754={'icfBZ':function(_0x4eb4c0,_0x24869e){return _0x4eb4c0!==_0x24869e;},'glvrN':'clear','oaMgr':function(_0x2550c7,_0x4cf108){return _0x2550c7-_0x4cf108;},'nASjB':function(_0x548761,_0x4c326b){return _0x548761<=_0x4c326b;}};if(_0xb8f754[_0x5a2433(0x153)](_0x2efb26,_0xb8f754['glvrN']))return![];const _0x37dd07=loadCache(),_0xafa036=_0x37dd07[_0x5a2433(0x157)];if(!_0xafa036)return![];const _0xd5dd5d=_0xb8f754[_0x5a2433(0x16a)](Date[_0x5a2433(0x165)](),_0xafa036);return _0xb8f754[_0x5a2433(0x141)](_0xd5dd5d,CLEAR_AUTO_ENABLE_WINDOW_MS);}export function autoEnableAfterClear(_0xdc7851){const _0x3bda77=_0x397bde,_0x245b0f={'qkDNZ':function(_0x555c07){return _0x555c07();},'WHzTS':'main','NGYMQ':function(_0xf2e957,_0x534537){return _0xf2e957!==_0x534537;}},_0xde6f78=_0x245b0f['qkDNZ'](loadCache),_0x1e27b0=getOrCreateSession(_0xde6f78,_0xdc7851);_0x1e27b0['enabled']=!![];const _0x6b5ee2=getCurrentBranch();_0x6b5ee2&&_0x6b5ee2!==_0x245b0f[_0x3bda77(0x159)]&&_0x245b0f['NGYMQ'](_0x6b5ee2,_0x3bda77(0x155))&&(_0x1e27b0['currentBranch']=_0x6b5ee2),delete _0xde6f78['lastEnabledSessionClearedAt'],saveCache(_0xde6f78);}export function registerSession(_0xb00542,_0x33fdc6){const _0x4fc86f=_0x397bde,_0x26b3a3={'eFhWb':function(_0x570d65,_0x3d44c8){return _0x570d65(_0x3d44c8);}},_0x1b0690=loadCache(),_0x3afd46=getOrCreateSession(_0x1b0690,_0xb00542);_0x3afd46[_0x4fc86f(0x144)]=_0x33fdc6,_0x3afd46['registeredAt']=new Date()[_0x4fc86f(0x152)](),_0x26b3a3['eFhWb'](saveCache,_0x1b0690);}export function getSessionEntry(_0x510526){const _0x2b09f1=_0x397bde,_0x484bec=loadCache(),_0x48fe9c=_0x484bec['sessions'][_0x510526];if(_0x48fe9c?.['featureId']&&_0x48fe9c?.[_0x2b09f1(0x16f)])return{'featureId':_0x48fe9c[_0x2b09f1(0x144)],'registeredAt':_0x48fe9c[_0x2b09f1(0x16f)]};return null;}export function unregisterSession(_0x37abce){const _0x308eca=_0x397bde,_0x4cecfc=loadCache(),_0xd15943=_0x4cecfc[_0x308eca(0x16c)][_0x37abce];_0xd15943&&(delete _0xd15943['featureId'],delete _0xd15943['registeredAt'],saveCache(_0x4cecfc));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0xce4c63){const _0x110784=_0x397bde,_0x21d46e={'yzywo':function(_0x20b613){return _0x20b613();},'xjOmd':function(_0x27b455,_0x307e60){return _0x27b455-_0x307e60;},'QYdsG':function(_0xdeb7d6,_0x2a6d39){return _0xdeb7d6(_0x2a6d39);}},_0x2bd13c=_0x21d46e['yzywo'](loadCache),_0x576b46=getOrCreateSession(_0x2bd13c,_0xce4c63),_0x26a5de=_0x576b46['lastPlanReminderAt']||0x0,_0x469930=Date['now']();if(_0x21d46e['xjOmd'](_0x469930,_0x26a5de)>=PLAN_REMINDER_INTERVAL_MS)return _0x576b46[_0x110784(0x14a)]=_0x469930,_0x21d46e[_0x110784(0x15a)](saveCache,_0x2bd13c),!![];return![];}export function shouldShowStopReminder(_0x4e23af){const _0x5a4fae=_0x397bde,_0x168aff={'jbEgm':function(_0x55ba79,_0x3e3e6c,_0x2a0baf){return _0x55ba79(_0x3e3e6c,_0x2a0baf);},'ZieJE':function(_0x1fe827,_0x3a6f7b){return _0x1fe827-_0x3a6f7b;}},_0x5c893b=loadCache(),_0x4f1ec6=_0x168aff['jbEgm'](getOrCreateSession,_0x5c893b,_0x4e23af),_0x5b4abe=_0x4f1ec6[_0x5a4fae(0x14b)]||0x0,_0x5ec2d6=Date['now']();if(_0x168aff['ZieJE'](_0x5ec2d6,_0x5b4abe)>=STOP_REMINDER_INTERVAL_MS)return _0x4f1ec6[_0x5a4fae(0x14b)]=_0x5ec2d6,saveCache(_0x5c893b),!![];return![];}export function hasSessionBeenPrompted(_0x29c3e8){const _0x5f3c36=_0x397bde,_0x5587ef={'iFXDy':function(_0x1368b8){return _0x1368b8();}},_0x380d2b=_0x5587ef[_0x5f3c36(0x161)](loadCache);return _0x380d2b[_0x5f3c36(0x16c)][_0x29c3e8]?.[_0x5f3c36(0x154)]===!![];}export function markSessionPrompted(_0x5f225e){const _0x1d27d0=_0x397bde,_0x3670ec=loadCache(),_0x577994=getOrCreateSession(_0x3670ec,_0x5f225e);_0x577994[_0x1d27d0(0x154)]=!![],saveCache(_0x3670ec);}export function getCacheFile(){return CACHE_FILE;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x497371=_0x3a60;(function(_0x553558,_0x14ac0d){const _0x4f6b26=_0x3a60,_0x3beb4b=_0x553558();while(!![]){try{const _0x3e3c18=parseInt(_0x4f6b26(0x15a))/0x1+-parseInt(_0x4f6b26(0x190))/0x2+parseInt(_0x4f6b26(0x19f))/0x3*(-parseInt(_0x4f6b26(0x156))/0x4)+parseInt(_0x4f6b26(0x166))/0x5*(parseInt(_0x4f6b26(0x151))/0x6)+-parseInt(_0x4f6b26(0x15b))/0x7+parseInt(_0x4f6b26(0x136))/0x8+parseInt(_0x4f6b26(0x189))/0x9;if(_0x3e3c18===_0x14ac0d)break;else _0x3beb4b['push'](_0x3beb4b['shift']());}catch(_0x1b9883){_0x3beb4b['push'](_0x3beb4b['shift']());}}}(_0x54e0,0x62f46));import{readFile,writeFile,mkdir,unlink}from'fs/promises';import{join,dirname}from'path';import{existsSync}from'fs';import{tmpdir}from'os';import{randomUUID}from'crypto';import{chromium}from'playwright';import{decrypt}from'./crypto.js';import{getToken}from'./keychain.js';function _0x54e0(){const _0x558a1b=['jiSYg','pqYPc','HCDGm','ndQNB','doEvn','Environment\x20variable\x20','core','ZoZeg','GeUbu','KJSQb','857916gNnOGd','forWrite','ENOENT','YOjDd','PKQaX','DGbOn','stringify','590950gnVoTn','Failed\x20to\x20decrypt\x20auth\x20state:\x20','dvuwQ','playwright-cli','--allow-insecure-localhost','CMIPx','length','\x22\x20to\x20legacy\x20path\x20','ftDSY','file','local','--disable-setuid-sandbox','bfaDL','vAHKn','zHYub','12wzhzro','Sjvqd','location','oksuz','HzDWr','baseUrl','kpFVm','KGwxz','userAgent','Refusing\x20to\x20write\x20profile\x20\x22','OFkNT','isArray','pCjdH','split','string','pdf','browser','extraHTTPHeaders','bSikD','TrKRp','entries','executablePath','path','install','includes','none','See\x20https://docs.ranger.net/main/concepts/profiles\x20for\x20setup\x20options.','bumdg','psqGS','5873312YxpmWJ','object','ZUgDy','jRddQ','cdpEndpoint','.json','clipboard-read','AKqcm','env','args','boolean','GXfXx','VCvLn','nova-user-data','storageState','KnrUz','stagehand','That\x20directory\x20is\x20read-only\x20now.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','BtUvc','FIGxr','filter','contextOptions','auth.json.enc','xcUon','warn','settings.json','tabs','552XoQxnx','map','kujQO','catch','all','559940fIzEfg','keys','sessions','now','269493wSCcxQ','2904972CukltM','headers','Default','allowInsecureLocalhost','bswcw','getuid','parse','--disable-features=WebBluetooth','--unsafely-treat-insecure-origin-as-secure=http://localhost','utf-8','No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','31345LWCrNJ','Failed\x20to\x20clean\x20up\x20temp\x20file\x20','storageStatePath','indexOf','--disable-web-security','XmAKW','legacy','header','JjJxD','Vvqvu','vAmLB','QlESa','-cli','headless','startsWith','join','IOvrB','fTqRb','PnCZJ','iFsEx','locations','aDTLn','anEGi','usoRr','eetYE'];_0x54e0=function(){return _0x558a1b;};return _0x54e0();}import{getRangerDir,getRangerHomeDir}from'./rangerRoot.js';function findEnvInRoot(_0x23dfcf,_0x6f4f5b){const _0x3f30f2=_0x3a60,_0xb0b4e3={'IOvrB':function(_0x24e232,_0x438776,_0x32fb3f,_0x4d8937){return _0x24e232(_0x438776,_0x32fb3f,_0x4d8937);},'pDaEb':'local','PSpwP':function(_0x4d6d80,_0x30ed80,_0x1bcc7e){return _0x4d6d80(_0x30ed80,_0x1bcc7e);},'GXfXx':function(_0x32e331,_0x3d05ac){return _0x32e331(_0x3d05ac);}},_0x69575a=_0xb0b4e3[_0x3f30f2(0x176)](join,_0x6f4f5b,'ci',_0x23dfcf),_0x39d393=join(_0x6f4f5b,_0xb0b4e3['pDaEb'],_0x23dfcf),_0x442462=join(_0x6f4f5b,_0x23dfcf),_0x480161=join(_0x6f4f5b,_0x3f30f2(0x19a)),_0x3e6264=_0xb0b4e3['PSpwP'](join,_0x6f4f5b,'ci');if(existsSync(_0x69575a))return _0x69575a;if(existsSync(_0x39d393))return _0x39d393;if(_0xb0b4e3['GXfXx'](existsSync,_0x442462)&&(_0x442462!==_0x480161&&_0x442462!==_0x3e6264?!![]:_0xb0b4e3[_0x3f30f2(0x141)](hasLegacyProfileFiles,_0x442462)))return _0x442462;return null;}export function getEnvDir(_0x5b9158,_0x28f293={}){const _0x2f9594=_0x3a60,_0x4f1934={'dsttA':function(_0x57ea94){return _0x57ea94();},'uAEni':function(_0x14c816,_0xd611df,_0x5318ce){return _0x14c816(_0xd611df,_0x5318ce);},'kujQO':function(_0x441690,_0x5694a5){return _0x441690(_0x5694a5);},'YOjDd':function(_0xa40636){return _0xa40636();},'bSikD':function(_0x194bd2,_0x33fe59){return _0x194bd2!==_0x33fe59;},'zHYub':function(_0x2e0de2,_0x2a6224,_0x4cb465){return _0x2e0de2(_0x2a6224,_0x4cb465);},'JjJxD':function(_0x136dda,_0x3b3e99,_0x3be8a1,_0x2b6830){return _0x136dda(_0x3b3e99,_0x3be8a1,_0x2b6830);},'SjpBr':'local','CMIPx':function(_0x22139f,_0x366f11,_0x3d1b9d){return _0x22139f(_0x366f11,_0x3d1b9d);}},_0x232fab=_0x4f1934['dsttA'](getRangerDir),_0x2f74f2=_0x4f1934['uAEni'](findEnvInRoot,_0x5b9158,_0x232fab);if(_0x2f74f2){if(_0x28f293[_0x2f9594(0x18a)]&&_0x4f1934[_0x2f9594(0x153)](isLegacyEnvPath,_0x2f74f2))throw legacyWriteError(_0x5b9158,_0x2f74f2);return _0x2f74f2;}const _0x1bfb61=_0x4f1934[_0x2f9594(0x18c)](getRangerHomeDir);if(_0x4f1934[_0x2f9594(0x12b)](_0x1bfb61,_0x232fab)){const _0x1b4f7d=_0x4f1934[_0x2f9594(0x19e)](findEnvInRoot,_0x5b9158,_0x1bfb61);if(_0x1b4f7d){if(_0x28f293['forWrite']&&_0x4f1934['kujQO'](isLegacyEnvPath,_0x1b4f7d))throw legacyWriteError(_0x5b9158,_0x1b4f7d);return _0x1b4f7d;}}const _0x53544c=_0x4f1934[_0x2f9594(0x16e)](join,_0x1bfb61,_0x4f1934['SjpBr'],_0x5b9158);if(_0x28f293['forWrite'])throw _0x4f1934[_0x2f9594(0x195)](legacyWriteError,_0x5b9158,_0x53544c);return _0x53544c;}function isLegacyEnvPath(_0x1294b0){const _0x3350ff=_0x3a60,_0x249dd4=getRangerDir(),_0x345e02=getRangerHomeDir();for(const _0x11052e of new Set([_0x249dd4,_0x345e02])){const _0x29453b=_0x11052e['endsWith']('/')?_0x11052e:_0x11052e+'/';if(_0x1294b0===_0x11052e||_0x1294b0[_0x3350ff(0x174)](_0x29453b))return!![];}return![];}function _0x3a60(_0x455da0,_0x43a7ea){_0x455da0=_0x455da0-0x11a;const _0x54e00e=_0x54e0();let _0x3a608e=_0x54e00e[_0x455da0];return _0x3a608e;}function legacyWriteError(_0x49dcbc,_0x1d9f5b){const _0x4fc0bb=_0x3a60,_0xd939a2={'fklgL':function(_0x2360a7,_0x443e6b){return _0x2360a7+_0x443e6b;}};return new Error(_0xd939a2['fklgL'](_0x4fc0bb(0x122)+_0x49dcbc+_0x4fc0bb(0x197)+_0x1d9f5b+'.\x0a'+_0x4fc0bb(0x147),'\x20\x20ranger\x20profile\x20add\x20<name>\x0a')+_0x4fc0bb(0x133));}export function findExistingEnv(_0x3fced6,_0x43c20e){const _0x4fd91a=_0x3a60,_0x309e24={'zhhba':function(_0x3e5220){return _0x3e5220();},'Vvqvu':function(_0x54dd1d,_0x5ade97,_0xc3eb6d){return _0x54dd1d(_0x5ade97,_0xc3eb6d);},'WVeAV':function(_0x5d1308,_0x463583){return _0x5d1308(_0x463583);},'gSUPW':function(_0x4ccb3c,_0x2eb9d3){return _0x4ccb3c===_0x2eb9d3;},'xcUon':_0x4fd91a(0x16c),'ebveg':function(_0x1ee96a,_0x2f093c){return _0x1ee96a===_0x2f093c;}},_0x1ca367=_0x43c20e?.['rangerDir'],_0x5a0ed5=_0x1ca367?[_0x1ca367]:[getRangerDir(),_0x309e24['zhhba'](getRangerHomeDir)]['filter']((_0x588d5d,_0x9f9ce0,_0x937831)=>_0x937831[_0x4fd91a(0x169)](_0x588d5d)===_0x9f9ce0),_0x5ef767=_0x43c20e?.[_0x4fd91a(0x17a)]??['ci','local','legacy'];for(const _0x3c3203 of _0x5a0ed5){const _0x2359f1=join(_0x3c3203,_0x4fd91a(0x19a)),_0x3c31bb=_0x309e24[_0x4fd91a(0x16f)](join,_0x3c3203,'ci'),_0x40efa6=[{'location':'ci','path':join(_0x3c3203,'ci',_0x3fced6)},{'location':'local','path':join(_0x3c3203,'local',_0x3fced6)},{'location':_0x4fd91a(0x16c),'path':join(_0x3c3203,_0x3fced6)}];for(const _0x36cbdd of _0x40efa6){if(_0x5ef767['includes'](_0x36cbdd['location'])&&_0x309e24['WVeAV'](existsSync,_0x36cbdd['path'])){if(_0x309e24['gSUPW'](_0x36cbdd[_0x4fd91a(0x11b)],_0x309e24[_0x4fd91a(0x14d)])&&(_0x36cbdd[_0x4fd91a(0x12f)]===_0x2359f1||_0x309e24['ebveg'](_0x36cbdd['path'],_0x3c31bb))&&!hasLegacyProfileFiles(_0x36cbdd[_0x4fd91a(0x12f)]))continue;return{'path':_0x36cbdd[_0x4fd91a(0x12f)],'location':_0x36cbdd['location']};}}}return null;}function hasLegacyProfileFiles(_0x4d629c){const _0x334c6f=_0x3a60,_0x502263={'kpFVm':_0x334c6f(0x14f),'KJSQb':_0x334c6f(0x14c)};return existsSync(join(_0x4d629c,_0x502263[_0x334c6f(0x11f)]))||existsSync(join(_0x4d629c,'auth.json'))||existsSync(join(_0x4d629c,_0x502263[_0x334c6f(0x188)]));}export function isEnvCi(_0x38ffad){const _0x98feb7=_0x3a60,_0x4ffb25={'JLmEy':function(_0x361829,_0x3e0c3a){return _0x361829(_0x3e0c3a);},'hvLBP':function(_0x1cafee,_0x2a020f,_0x5cc5b9,_0x22c67b){return _0x1cafee(_0x2a020f,_0x5cc5b9,_0x22c67b);},'ftDSY':function(_0x3097d4,_0x41c9ad){return _0x3097d4!==_0x41c9ad;},'TcEiY':function(_0x761103){return _0x761103();},'eetYE':function(_0x3fa40e,_0x765b73,_0x121d79,_0x2e9a96){return _0x3fa40e(_0x765b73,_0x121d79,_0x2e9a96);}};if(_0x4ffb25['JLmEy'](existsSync,_0x4ffb25['hvLBP'](join,getRangerDir(),'ci',_0x38ffad)))return!![];const _0x1091c7=getRangerHomeDir();if(_0x4ffb25[_0x98feb7(0x198)](_0x1091c7,_0x4ffb25['TcEiY'](getRangerDir))&&existsSync(_0x4ffb25[_0x98feb7(0x17e)](join,_0x1091c7,'ci',_0x38ffad)))return!![];return![];}export async function cleanupTempFiles(_0x3957e6){const _0x592ae9=_0x3a60,_0x257d2=[_0x3957e6['tempAuthPath'],_0x3957e6['configPath']][_0x592ae9(0x14a)](Boolean);await Promise[_0x592ae9(0x155)](_0x257d2[_0x592ae9(0x152)](_0x464501=>unlink(_0x464501)['catch'](_0x52fe46=>{const _0xcd0c6=_0x592ae9;_0x52fe46['code']!==_0xcd0c6(0x18b)&&console[_0xcd0c6(0x14e)](_0xcd0c6(0x167)+_0x464501+':',_0x52fe46['message']);})));}export function getSettingsPath(_0x367d5f){const _0x134eb3=_0x3a60,_0x3786a0={'yhanR':function(_0x30b46e,_0x536200,_0x497d3f){return _0x30b46e(_0x536200,_0x497d3f);},'BHzpr':function(_0xbceda5,_0x2606d7){return _0xbceda5(_0x2606d7);}};return _0x3786a0['yhanR'](join,_0x3786a0['BHzpr'](getEnvDir,_0x367d5f),_0x134eb3(0x14f));}export async function loadSettings(_0x30cb61){const _0x526bad=_0x3a60,_0x24b9c9={'msOnc':function(_0x3c783e,_0x4854de){return _0x3c783e(_0x4854de);},'jRddQ':function(_0x24142d,_0x47f879,_0x11beef){return _0x24142d(_0x47f879,_0x11beef);},'rJemF':_0x526bad(0x164)},_0x38728d=_0x24b9c9['msOnc'](getSettingsPath,_0x30cb61);if(!_0x24b9c9['msOnc'](existsSync,_0x38728d))return{};try{const _0x23943f=await _0x24b9c9[_0x526bad(0x139)](readFile,_0x38728d,_0x24b9c9['rJemF']);return JSON[_0x526bad(0x161)](_0x23943f);}catch{return{};}}export async function saveSettings(_0x30878f,_0x144470){const _0xd538fa=_0x3a60,_0x1eaddf={'vAHKn':function(_0x2f22a2,_0x2cce2b){return _0x2f22a2(_0x2cce2b);},'ndQNB':function(_0x49b9ca,_0x17a815,_0x218659){return _0x49b9ca(_0x17a815,_0x218659);}},_0x389e59=_0x1eaddf['vAHKn'](getSettingsPath,_0x30878f),_0x500621=_0x1eaddf[_0xd538fa(0x19d)](dirname,_0x389e59);!_0x1eaddf[_0xd538fa(0x19d)](existsSync,_0x500621)&&await mkdir(_0x500621,{'recursive':!![]}),await _0x1eaddf[_0xd538fa(0x182)](writeFile,_0x389e59,JSON['stringify'](_0x144470,null,0x2));}export function resolveEnvVars(_0x449fb7){const _0x2efdfd=_0x3a60,_0x23e86f={'oksuz':_0x2efdfd(0x127)};if(typeof _0x449fb7===_0x23e86f[_0x2efdfd(0x11c)])return _0x449fb7['replace'](/\$\{(\w+)\}/g,(_0x4130cb,_0x1b5bf0)=>{const _0x416643=_0x2efdfd,_0x626ce1=process[_0x416643(0x13e)][_0x1b5bf0];if(_0x626ce1===undefined)throw new Error(_0x416643(0x184)+_0x1b5bf0+'\x20is\x20not\x20set');return _0x626ce1;});if(Array['isArray'](_0x449fb7))return _0x449fb7['map'](resolveEnvVars);if(_0x449fb7&&typeof _0x449fb7===_0x2efdfd(0x137))return Object['fromEntries'](Object['entries'](_0x449fb7)[_0x2efdfd(0x152)](([_0x339db5,_0x4ba3a4])=>[_0x339db5,resolveEnvVars(_0x4ba3a4)]));return _0x449fb7;}const isRecord=_0xaf371b=>typeof _0xaf371b===_0x497371(0x137)&&_0xaf371b!==null&&!Array[_0x497371(0x124)](_0xaf371b),asRecord=_0x54acc0=>isRecord(_0x54acc0)?_0x54acc0:undefined,mergeHeaders=(_0x514b8d,_0x11fd07)=>{const _0x45792e=_0x497371,_0x469330={'CbtAx':function(_0xce25fe,_0x22668a){return _0xce25fe??_0x22668a;}},_0xd3a670={..._0x469330['CbtAx'](_0x514b8d,{}),..._0x11fd07??{}};return Object[_0x45792e(0x157)](_0xd3a670)[_0x45792e(0x196)]?_0xd3a670:undefined;},SAFE_MODE_ARGS=[_0x497371(0x162)],ALLOW_LOCALHOST_ARGS=[_0x497371(0x16a),'--allow-running-insecure-content',_0x497371(0x163),_0x497371(0x194)];export function buildBrowserOptionsFromSettings(_0x46361e,_0x4a574c={}){const _0xd9ca86=_0x497371,_0x31befb={'ZSWVd':function(_0x26e817,_0x3cd017){return _0x26e817(_0x3cd017);},'bswcw':function(_0x1dd50b,_0x51c287){return _0x1dd50b===_0x51c287;},'bfaDL':_0xd9ca86(0x127),'OQcqq':function(_0x4db2dc,_0x47938d,_0x55a9ca){return _0x4db2dc(_0x47938d,_0x55a9ca);},'WRNVZ':function(_0x2a9013,_0x23323b){return _0x2a9013(_0x23323b);}},_0x13a9d1=_0x31befb['ZSWVd'](asRecord,_0x46361e['browser']),_0x5b3e48={...asRecord(_0x13a9d1?.['launchOptions'])??{}};typeof _0x4a574c['headless']===_0xd9ca86(0x140)&&(_0x5b3e48['headless']=_0x4a574c[_0xd9ca86(0x173)]);if(_0x46361e['safeMode']){const _0x5f1063=_0x5b3e48['args']??[],_0x4a8bfc=SAFE_MODE_ARGS['filter'](_0x5aed4a=>!_0x5f1063[_0xd9ca86(0x131)](_0x5aed4a));_0x5b3e48[_0xd9ca86(0x13f)]=[..._0x5f1063,..._0x4a8bfc];}if(_0x46361e[_0xd9ca86(0x15e)]){const _0x10ff9e=_0x5b3e48[_0xd9ca86(0x13f)]??[],_0x4b9208=ALLOW_LOCALHOST_ARGS[_0xd9ca86(0x14a)](_0x6fbd1e=>!_0x10ff9e['includes'](_0x6fbd1e));_0x5b3e48[_0xd9ca86(0x13f)]=[..._0x10ff9e,..._0x4b9208];}const _0x330259={...asRecord(_0x13a9d1?.[_0xd9ca86(0x14b)])??{}};_0x330259['ignoreHTTPSErrors']=!![];_0x31befb[_0xd9ca86(0x15f)](typeof _0x46361e['userAgent'],_0x31befb[_0xd9ca86(0x19c)])&&(_0x330259[_0xd9ca86(0x121)]=_0x46361e['userAgent']);const _0x568b9e=_0x31befb['OQcqq'](mergeHeaders,_0x31befb['ZSWVd'](asRecord,_0x330259[_0xd9ca86(0x12a)]),_0x31befb['WRNVZ'](asRecord,_0x46361e[_0xd9ca86(0x15c)]));return _0x568b9e?_0x330259[_0xd9ca86(0x12a)]=_0x568b9e:delete _0x330259[_0xd9ca86(0x12a)],_0x4a574c[_0xd9ca86(0x168)]&&(_0x330259[_0xd9ca86(0x144)]=_0x4a574c['storageStatePath']),{'launchOptions':_0x5b3e48,'contextOptions':_0x330259};}export async function resolveProfileStorageState(_0x41e56c){return resolveLocalAuthPath(getEnvDir(_0x41e56c));}async function resolveLocalAuthPath(_0x7e4612){const _0x192d7a=_0x497371,_0x46505={'pCjdH':function(_0x2969da,_0x1c0f65,_0xad660a){return _0x2969da(_0x1c0f65,_0xad660a);},'XHbmm':_0x192d7a(0x14c),'iFsEx':function(_0x46d7f6,_0xebf8b){return _0x46d7f6(_0xebf8b);},'pqYPc':function(_0x31acda){return _0x31acda();},'qDKtQ':function(_0x111520,_0x5890e4){return _0x111520 instanceof _0x5890e4;}},_0x386bda=_0x46505[_0x192d7a(0x125)](join,_0x7e4612,_0x46505['XHbmm']),_0x14fece=join(_0x7e4612,'auth.json');if(existsSync(_0x386bda))try{const _0x334354=await getToken();if(!_0x334354)throw new Error(_0x192d7a(0x165));const _0x32f63a=await _0x46505['iFsEx'](readFile,_0x386bda),_0x4299dc=decrypt(_0x32f63a,_0x334354),_0x11dfff=join(_0x46505[_0x192d7a(0x180)](tmpdir),'ranger-auth-'+Date[_0x192d7a(0x159)]()+_0x192d7a(0x13b));return await writeFile(_0x11dfff,_0x4299dc),{'storageStatePath':_0x11dfff,'tempAuthPath':_0x11dfff};}catch(_0x581de1){const _0x5e9553=_0x46505['qDKtQ'](_0x581de1,Error)?_0x581de1['message']:_0x46505[_0x192d7a(0x179)](String,_0x581de1);throw new Error(_0x192d7a(0x191)+_0x5e9553);}if(_0x46505['iFsEx'](existsSync,_0x14fece))return{'storageStatePath':_0x14fece};return{};}export async function buildPlaywrightConfig(_0x788507,_0x22fafd,_0x238e1f,_0x597796,_0x59ac70){const _0x3c5139=_0x497371,_0xd58118={'QlESa':function(_0x25c839,_0x3ae38e,_0x37227d,_0x92f3d7,_0x2ccf0c,_0x389352,_0x2b677){return _0x25c839(_0x3ae38e,_0x37227d,_0x92f3d7,_0x2ccf0c,_0x389352,_0x2b677);},'JIgBP':function(_0x2f7635,_0x2f24b3){return _0x2f7635(_0x2f24b3);},'FIGxr':function(_0x3541e1,_0xc8772d,_0x2e2526,_0x42ade1,_0x2f04d0,_0x546178,_0x16bcb5){return _0x3541e1(_0xc8772d,_0x2e2526,_0x42ade1,_0x2f04d0,_0x546178,_0x16bcb5);},'Ezrom':'stagehand','anEGi':function(_0x97f15c,_0x54949f){return _0x97f15c(_0x54949f);}};if(_0x59ac70)return _0xd58118[_0x3c5139(0x171)](buildPlaywrightConfigCore,_0x788507,_0x59ac70,_0x22fafd,_0x238e1f,_0x597796,_0x3c5139(0x146));const {storageStatePath:_0x155ab2,tempAuthPath:_0x190469}=await resolveLocalAuthPath(_0xd58118['JIgBP'](getEnvDir,_0x22fafd));try{const _0x59e788=await _0xd58118[_0x3c5139(0x149)](buildPlaywrightConfigCore,_0x788507,_0x155ab2,_0x22fafd,_0x238e1f,_0x597796,_0xd58118['Ezrom']);return{..._0x59e788,'tempAuthPath':_0x190469};}catch(_0x5c788c){_0x190469&&await _0xd58118[_0x3c5139(0x17c)](unlink,_0x190469)[_0x3c5139(0x154)](()=>{});throw _0x5c788c;}}export async function buildPlaywrightConfigCore(_0x12cf83,_0x5884b3,_0x30fbcf,_0x5f3d6e,_0x2bc4d2,_0x300b84=_0x497371(0x146)){const _0xa73f78=_0x497371,_0x5f15fa={'qjBbt':function(_0x5387ad,_0xf7d193,_0x1decfe){return _0x5387ad(_0xf7d193,_0x1decfe);},'PnCZJ':function(_0x173d6e,_0x2c375c){return _0x173d6e===_0x2c375c;},'SianN':'--no-sandbox','zWXKj':_0xa73f78(0x13c),'QMUyd':function(_0x13a2d1,_0x4afd2d){return _0x13a2d1(_0x4afd2d);},'zewmu':_0xa73f78(0x199),'cTXlZ':'vision','doEvn':'allow','DUImh':function(_0x1a3f9a,_0x3689b8){return _0x1a3f9a===_0x3689b8;},'eZhoK':function(_0x4768d8,_0x59c392){return _0x4768d8===_0x59c392;},'YyolC':'ranger-config','aPKhf':function(_0x4aea9f,_0x36b253,_0x483021){return _0x4aea9f(_0x36b253,_0x483021);},'AKqcm':_0xa73f78(0x193),'fTqRb':function(_0x1748a6,_0x4242a4,_0x135c37){return _0x1748a6(_0x4242a4,_0x135c37);},'oVPHJ':function(_0x26a72e,_0x18edbf,_0x31cb3c){return _0x26a72e(_0x18edbf,_0x31cb3c);}},_0x2ec9d8=_0x5f3d6e||randomUUID(),_0x134420=join(getRangerDir(),_0xa73f78(0x158),_0x2ec9d8),_0x55cd86=_0x5f15fa['QMUyd'](Boolean,_0x12cf83[_0xa73f78(0x13a)]),_0x35b003=_0x55cd86?{'browserName':'chromium','cdpEndpoint':_0x12cf83['cdpEndpoint']}:((()=>{const _0x287a2e=_0xa73f78,{launchOptions:_0x20702a,contextOptions:_0x19a1fe}=_0x5f15fa['qjBbt'](buildBrowserOptionsFromSettings,_0x12cf83,{'headless':_0x2bc4d2?![]:_0x12cf83['headless']??!![],'storageStatePath':_0x5884b3});if(_0x5f15fa[_0x287a2e(0x178)](process['getuid']?.(),0x0)){const _0x2283ee=[_0x5f15fa['SianN'],_0x287a2e(0x19b)],_0x4cadc2=_0x20702a['args']??[],_0x5ad9cb=_0x2283ee['filter'](_0x5cb2af=>!_0x4cadc2['includes'](_0x5cb2af));_0x20702a[_0x287a2e(0x13f)]=[..._0x4cadc2,..._0x5ad9cb];}return{'isolated':!![],'browserName':'chromium','launchOptions':_0x20702a,'contextOptions':{..._0x19a1fe,'permissions':[_0x5f15fa['zWXKj'],'clipboard-write'],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x34bea8=_0x300b84==='playwright-cli'?{'browser':_0x35b003,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x134420,'outputMode':_0x5f15fa['zewmu'],'codegen':_0xa73f78(0x132)}:{'name':_0x30fbcf,'browser':_0x35b003,'capabilities':[_0xa73f78(0x185),_0xa73f78(0x150),_0xa73f78(0x130),_0xa73f78(0x128),_0x5f15fa['cTXlZ']],'imageResponses':_0x5f15fa[_0xa73f78(0x183)],'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x134420};if(!_0x55cd86){const _0x5d785e=_0x34bea8[_0xa73f78(0x129)],_0x523991=_0x5d785e['contextOptions'];if(_0x5f15fa['DUImh'](_0x523991[_0xa73f78(0x121)],undefined))delete _0x523991['userAgent'];if(_0x5f15fa['eZhoK'](_0x523991[_0xa73f78(0x144)],undefined))delete _0x523991[_0xa73f78(0x144)];}const _0x162ec7=join(tmpdir(),_0x5f15fa['YyolC']);!existsSync(_0x162ec7)&&await _0x5f15fa['aPKhf'](mkdir,_0x162ec7,{'recursive':!![]});const _0x329775=_0x300b84===_0x5f15fa[_0xa73f78(0x13d)]?_0xa73f78(0x172):'',_0xfe0f43=_0x5f15fa[_0xa73f78(0x177)](join,_0x162ec7,_0x30fbcf+'-'+Date[_0xa73f78(0x159)]()+_0x329775+'.json');return await _0x5f15fa['oVPHJ'](writeFile,_0xfe0f43,JSON[_0xa73f78(0x18f)](_0x34bea8,null,0x2)),{'configPath':_0xfe0f43,'storageStatePath':_0x5884b3};}export async function buildPlaywrightCliConfig(_0x12043c,_0x13ad6c,_0x3bf0ca,_0x259f16,_0x57737f){const _0x172265=_0x497371,_0x5cb26e={'ZEqZL':function(_0x1b4762,_0x54969c,_0x29ddb5,_0x4ff5b3,_0x1a24ce,_0x2be852,_0x490487){return _0x1b4762(_0x54969c,_0x29ddb5,_0x4ff5b3,_0x1a24ce,_0x2be852,_0x490487);},'HCDGm':function(_0x352aac,_0x38b40c){return _0x352aac(_0x38b40c);},'TQojH':function(_0x5ba33a,_0x1ce5f6){return _0x5ba33a(_0x1ce5f6);},'xNhrR':_0x172265(0x193)};if(_0x57737f)return _0x5cb26e['ZEqZL'](buildPlaywrightConfigCore,_0x12043c,_0x57737f,_0x13ad6c,_0x3bf0ca,_0x259f16,'playwright-cli');const {storageStatePath:_0x4de365,tempAuthPath:_0x12a288}=await _0x5cb26e[_0x172265(0x181)](resolveLocalAuthPath,_0x5cb26e['TQojH'](getEnvDir,_0x13ad6c));try{const _0x1c770d=await buildPlaywrightConfigCore(_0x12043c,_0x4de365,_0x13ad6c,_0x3bf0ca,_0x259f16,_0x5cb26e['xNhrR']);return{..._0x1c770d,'tempAuthPath':_0x12a288};}catch(_0x54b169){_0x12a288&&await unlink(_0x12a288)[_0x172265(0x154)](()=>{});throw _0x54b169;}}export async function buildRangerwrightCliConfig(_0x2d1d0d,_0x476627,_0xd27e89,_0xdac380,_0x115b7b){const _0x541004=_0x497371,_0x47c5a1={'Sjvqd':function(_0x32f66f,_0x14402c,_0x52111a){return _0x32f66f(_0x14402c,_0x52111a);},'pUeIs':function(_0x49e0c6,_0x5e8cff){return _0x49e0c6===_0x5e8cff;},'itwIP':'--no-sandbox','usoRr':'chromium','nwMne':'clipboard-write','ZoZeg':function(_0x4c3eac,_0x1941f3){return _0x4c3eac(_0x1941f3);},'TrKRp':function(_0x56aabb,_0x3393e8){return _0x56aabb===_0x3393e8;},'IBCZp':function(_0x35e578,_0x115fe9){return _0x35e578===_0x115fe9;},'OFkNT':'ranger-config','vAmLB':function(_0x4f76a2,_0x5e5a55,_0x366c45){return _0x4f76a2(_0x5e5a55,_0x366c45);},'eYMIz':function(_0xe10782,_0x42827f){return _0xe10782(_0x42827f);}},{storageStatePath:_0x214cb6,tempAuthPath:_0x32b188}=_0x115b7b?{'storageStatePath':_0x115b7b,'tempAuthPath':undefined}:await resolveLocalAuthPath(getEnvDir(_0x476627)),_0x44d557=_0xd27e89||randomUUID(),_0x3a52cf=join(getRangerDir(),_0x541004(0x158),_0x44d557),_0x478e08=_0x47c5a1[_0x541004(0x186)](Boolean,_0x2d1d0d[_0x541004(0x13a)]),_0x514cc7=_0x478e08?{'browserName':_0x47c5a1[_0x541004(0x17d)],'cdpEndpoint':_0x2d1d0d[_0x541004(0x13a)]}:((()=>{const _0x1fd98c=_0x541004,{launchOptions:_0x518c87,contextOptions:_0x2004f4}=_0x47c5a1[_0x1fd98c(0x11a)](buildBrowserOptionsFromSettings,_0x2d1d0d,{'headless':_0xdac380?![]:_0x2d1d0d[_0x1fd98c(0x173)]??!![],'storageStatePath':_0x214cb6});if(_0x47c5a1['pUeIs'](process[_0x1fd98c(0x160)]?.(),0x0)){const _0x3fb8e5=[_0x47c5a1['itwIP'],_0x1fd98c(0x19b)],_0x29c9ed=_0x518c87[_0x1fd98c(0x13f)]??[],_0x268b49=_0x3fb8e5['filter'](_0x599a9a=>!_0x29c9ed[_0x1fd98c(0x131)](_0x599a9a));_0x518c87['args']=[..._0x29c9ed,..._0x268b49];}return{'browserName':_0x47c5a1[_0x1fd98c(0x17d)],'launchOptions':_0x518c87,'contextOptions':{..._0x2004f4,'permissions':['clipboard-read',_0x47c5a1['nwMne']],'viewport':{'width':0x500,'height':0x2d0}}};})());if(!_0x478e08){const _0x342672=_0x514cc7['contextOptions'];if(_0x342672){if(_0x47c5a1[_0x541004(0x12c)](_0x342672[_0x541004(0x121)],undefined))delete _0x342672[_0x541004(0x121)];if(_0x47c5a1['IBCZp'](_0x342672[_0x541004(0x144)],undefined))delete _0x342672['storageState'];}}const _0x1ac050={'browser':_0x514cc7,'outputDir':_0x3a52cf,'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'settle':{'navigationLoadTimeoutMs':0x7530,'networkSettleTimeoutMs':0x1388,'networkIdleWindowMs':0x1f4,'postActionAnimationFrameCount':0x2}};let _0x5df3be;try{const _0x22e184=_0x47c5a1['Sjvqd'](join,tmpdir(),_0x47c5a1[_0x541004(0x123)]);!_0x47c5a1['ZoZeg'](existsSync,_0x22e184)&&await mkdir(_0x22e184,{'recursive':!![]}),_0x5df3be=join(_0x22e184,_0x476627+'-'+Date['now']()+'-rangerwright.json'),await _0x47c5a1[_0x541004(0x170)](writeFile,_0x5df3be,JSON[_0x541004(0x18f)](_0x1ac050,null,0x2));}catch(_0x1f98fa){_0x32b188&&await _0x47c5a1['eYMIz'](unlink,_0x32b188)[_0x541004(0x154)](()=>{});throw _0x1f98fa;}return{'configPath':_0x5df3be,'storageStatePath':_0x214cb6,'tempAuthPath':_0x32b188,'outputDir':_0x3a52cf};}export async function buildNovaActCliConfig(_0x41f587,_0x25deee,_0x41d995,_0x39eb62,_0x572ffb){const _0x3769bd=_0x497371,_0x4e2bba={'jiSYg':function(_0x10b24c,_0x3f3820){return _0x10b24c(_0x3f3820);},'RkSFs':function(_0x5a98cc){return _0x5a98cc();},'psqGS':_0x3769bd(0x158),'bumdg':function(_0x4ed507,_0x2545b5,_0x4735cc){return _0x4ed507(_0x2545b5,_0x4735cc);},'KGwxz':function(_0x5ba99f,_0x3daebd,_0x4b1369){return _0x5ba99f(_0x3daebd,_0x4b1369);},'AhgeM':_0x3769bd(0x15d),'PKQaX':function(_0x4e7fd2,_0x2b24c5){return _0x4e7fd2===_0x2b24c5;},'aDTLn':'--disable-setuid-sandbox','XmAKW':function(_0x15ec9a,_0xcd95bb){return _0x15ec9a===_0xcd95bb;}},{storageStatePath:_0x598beb,tempAuthPath:_0x1a255f}=_0x572ffb?{'storageStatePath':_0x572ffb,'tempAuthPath':undefined}:await _0x4e2bba['jiSYg'](resolveLocalAuthPath,_0x4e2bba['jiSYg'](getEnvDir,_0x25deee)),_0x346f0=_0x41d995||_0x4e2bba['RkSFs'](randomUUID),_0x54bfa5=join(_0x4e2bba['RkSFs'](getRangerDir),_0x4e2bba[_0x3769bd(0x135)],_0x346f0),_0x5c4908=_0x4e2bba[_0x3769bd(0x134)](join,_0x54bfa5,_0x3769bd(0x143)),_0x4f6093=_0x598beb?_0x4e2bba[_0x3769bd(0x120)](join,_0x5c4908,_0x4e2bba['AhgeM']):undefined,{launchOptions:_0x4133e3,contextOptions:_0x4a5e95}=buildBrowserOptionsFromSettings(_0x41f587,{'headless':_0x39eb62?![]:_0x41f587['headless']??!![],'storageStatePath':_0x598beb});if(_0x4e2bba[_0x3769bd(0x18d)](process[_0x3769bd(0x160)]?.(),0x0)){const _0x236f4a=['--no-sandbox',_0x4e2bba[_0x3769bd(0x17b)]],_0x31c4f5=_0x4133e3['args']??[],_0x458096=_0x236f4a['filter'](_0x3f9831=>!_0x31c4f5['includes'](_0x3f9831));_0x4133e3[_0x3769bd(0x13f)]=[..._0x31c4f5,..._0x458096];}const _0x261eb2=typeof _0x4133e3[_0x3769bd(0x12e)]==='string'?_0x4133e3['executablePath']:_0x598beb?chromium['executablePath']():undefined;return{'storageStatePath':_0x598beb,'tempAuthPath':_0x1a255f,'baseUrl':_0x41f587[_0x3769bd(0x11e)],'headless':Boolean(_0x4133e3[_0x3769bd(0x173)]),'userDataDir':_0x5c4908,'browserProfilePath':_0x4f6093,'executablePath':_0x261eb2,'launchArgs':Array['isArray'](_0x4133e3['args'])?_0x4133e3[_0x3769bd(0x13f)][_0x3769bd(0x14a)](_0x474339=>typeof _0x474339==='string'):[],'userAgent':_0x4e2bba[_0x3769bd(0x16b)](typeof _0x4a5e95['userAgent'],_0x3769bd(0x127))?_0x4a5e95['userAgent']:undefined,'extraHTTPHeaders':_0x4a5e95[_0x3769bd(0x12a)],'allowInsecureLocalhost':Boolean(_0x41f587['allowInsecureLocalhost']),'safeMode':Boolean(_0x41f587['safeMode']),'cdpEndpoint':_0x41f587[_0x3769bd(0x13a)],'isCdpMode':_0x4e2bba[_0x3769bd(0x17f)](Boolean,_0x41f587['cdpEndpoint'])};}export function getNestedValue(_0xfa28a,_0x578647){const _0x499923=_0x497371,_0x137fcb={'iXcwc':function(_0x5d56b7,_0x49d129){return _0x5d56b7(_0x49d129);},'jvvMl':function(_0x4c6b26,_0x179574){return _0x4c6b26===_0x179574;},'kUbDg':function(_0x41f5ff,_0x2b385b){return _0x41f5ff===_0x2b385b;},'COKqp':_0x499923(0x137)},_0xc1e3b2=_0x137fcb['iXcwc'](parseKeyPath,_0x578647);let _0x31bf5e=_0xfa28a;for(const _0x3f1c8f of _0xc1e3b2){if(_0x137fcb['jvvMl'](_0x31bf5e,null)||_0x137fcb['kUbDg'](_0x31bf5e,undefined)||typeof _0x31bf5e!==_0x137fcb['COKqp'])return undefined;_0x31bf5e=_0x31bf5e[_0x3f1c8f];}return _0x31bf5e;}export function setNestedValue(_0x10c633,_0x2ba36f,_0x544fca){const _0x34cbd3=_0x497371,_0xb630c6={'xDdxJ':function(_0x56498a,_0x9e81a5){return _0x56498a(_0x9e81a5);},'BtUvc':function(_0x39c994,_0x563a4a){return _0x39c994-_0x563a4a;},'mApyJ':function(_0x2c26e5,_0x29849c){return _0x2c26e5 in _0x29849c;},'aFeat':function(_0x4bd1a2,_0x763a36){return _0x4bd1a2!==_0x763a36;},'ZUgDy':function(_0xc4ea85,_0x34ce4c){return _0xc4ea85-_0x34ce4c;}},_0x8623d8=_0xb630c6['xDdxJ'](parseKeyPath,_0x2ba36f);let _0xdb9174=_0x10c633;for(let _0x186b26=0x0;_0x186b26<_0xb630c6[_0x34cbd3(0x148)](_0x8623d8['length'],0x1);_0x186b26++){const _0x34d1b1=_0x8623d8[_0x186b26];(!_0xb630c6['mApyJ'](_0x34d1b1,_0xdb9174)||_0xb630c6['aFeat'](typeof _0xdb9174[_0x34d1b1],_0x34cbd3(0x137)))&&(_0xdb9174[_0x34d1b1]={}),_0xdb9174=_0xdb9174[_0x34d1b1];}_0xdb9174[_0x8623d8[_0xb630c6[_0x34cbd3(0x138)](_0x8623d8[_0x34cbd3(0x196)],0x1)]]=_0x544fca;}export function deleteNestedValue(_0x11f5a9,_0x2cc2c6){const _0x5d8e3b=_0x497371,_0x12741a={'dvuwQ':function(_0x56cc73,_0x252c62){return _0x56cc73<_0x252c62;},'GeUbu':function(_0x5c5b13,_0x1a2f9b){return _0x5c5b13===_0x1a2f9b;},'VCvLn':function(_0x1df2e1,_0x560b6f){return _0x1df2e1!==_0x560b6f;},'DGbOn':'object','hvRvB':function(_0x3fab20,_0x38e3c8){return _0x3fab20 in _0x38e3c8;}},_0x5a6df9=parseKeyPath(_0x2cc2c6);let _0x520c47=_0x11f5a9;for(let _0x52d8c3=0x0;_0x12741a[_0x5d8e3b(0x192)](_0x52d8c3,_0x5a6df9['length']-0x1);_0x52d8c3++){if(_0x520c47===null||_0x12741a[_0x5d8e3b(0x187)](_0x520c47,undefined)||_0x12741a[_0x5d8e3b(0x142)](typeof _0x520c47,_0x12741a[_0x5d8e3b(0x18e)]))return![];_0x520c47=_0x520c47[_0x5a6df9[_0x52d8c3]];}if(_0x520c47===null||_0x520c47===undefined||typeof _0x520c47!=='object')return![];const _0xdc38b7=_0x5a6df9[_0x5a6df9['length']-0x1];if(_0x12741a['hvRvB'](_0xdc38b7,_0x520c47))return delete _0x520c47[_0xdc38b7],!![];return![];}function parseKeyPath(_0x46d7e7){const _0x563245=_0x497371,_0x25da48={'yHCgF':_0x563245(0x15c),'WxnMs':function(_0x18c2ee,_0x13218c){return _0x18c2ee===_0x13218c;},'KqoqI':'setupHeaders'},_0x55cb20=_0x46d7e7[_0x563245(0x126)]('.');return _0x55cb20[0x0]===_0x563245(0x16d)&&(_0x55cb20[0x0]=_0x25da48['yHCgF']),_0x25da48['WxnMs'](_0x55cb20[0x0],'setupHeader')&&(_0x55cb20[0x0]=_0x25da48['KqoqI']),_0x55cb20;}export function formatSettings(_0x5cb7b5,_0x24ba80=0x0){const _0x46f319=_0x497371,_0x4f4b29={'KnrUz':function(_0x4e2e43,_0x2248e9){return _0x4e2e43===_0x2248e9;},'svovD':_0x46f319(0x137),'HzDWr':function(_0x504a7d,_0x10bd76){return _0x504a7d!==_0x10bd76;}},_0x2ff251=[],_0x1cab13='\x20\x20'['repeat'](_0x24ba80);for(const [_0x4f8e06,_0x210802]of Object['entries'](_0x5cb7b5)){if(_0x210802===undefined)continue;if(_0x4f4b29[_0x46f319(0x145)](typeof _0x210802,_0x4f4b29['svovD'])&&_0x4f4b29[_0x46f319(0x11d)](_0x210802,null)){_0x2ff251['push'](''+_0x1cab13+_0x4f8e06+':');for(const [_0x4970ba,_0x1888e4]of Object[_0x46f319(0x12d)](_0x210802)){_0x2ff251['push'](_0x1cab13+'\x20\x20'+_0x4970ba+':\x20'+_0x1888e4);}}else _0x2ff251['push'](''+_0x1cab13+_0x4f8e06+':\x20'+_0x210802);}return _0x2ff251[_0x46f319(0x175)]('\x0a');}
|
|
1
|
+
const _0x50ffde=_0x16ef;function _0x16ef(_0x46bc75,_0x14b911){_0x46bc75=_0x46bc75-0x168;const _0x227b94=_0x227b();let _0x16efde=_0x227b94[_0x46bc75];return _0x16efde;}(function(_0x24e58e,_0x531f97){const _0x4387d9=_0x16ef,_0x201b9f=_0x24e58e();while(!![]){try{const _0x1c0f3c=parseInt(_0x4387d9(0x1bb))/0x1+parseInt(_0x4387d9(0x198))/0x2*(parseInt(_0x4387d9(0x1c2))/0x3)+-parseInt(_0x4387d9(0x1e5))/0x4*(-parseInt(_0x4387d9(0x1c6))/0x5)+-parseInt(_0x4387d9(0x177))/0x6+-parseInt(_0x4387d9(0x169))/0x7*(parseInt(_0x4387d9(0x1c9))/0x8)+-parseInt(_0x4387d9(0x1b0))/0x9*(parseInt(_0x4387d9(0x19d))/0xa)+parseInt(_0x4387d9(0x1d8))/0xb;if(_0x1c0f3c===_0x531f97)break;else _0x201b9f['push'](_0x201b9f['shift']());}catch(_0x16b50c){_0x201b9f['push'](_0x201b9f['shift']());}}}(_0x227b,0x45a77));import{readFile,writeFile,mkdir,unlink}from'fs/promises';import{join,dirname}from'path';import{existsSync}from'fs';import{tmpdir}from'os';import{randomUUID}from'crypto';import{chromium}from'playwright';import{decrypt}from'./crypto.js';import{getToken}from'./keychain.js';import{getRangerDir,getRangerHomeDir}from'./rangerRoot.js';function findEnvInRoot(_0x26a593,_0x59f881){const _0x963bbd=_0x16ef,_0x577822={'nKdFy':function(_0x120c9d,_0x21b5fe,_0x4c81b7,_0x504274){return _0x120c9d(_0x21b5fe,_0x4c81b7,_0x504274);},'iApHf':'local','xcORf':function(_0x2e36c0,_0x307a28,_0x20ded3){return _0x2e36c0(_0x307a28,_0x20ded3);},'PELSs':function(_0x2042c6,_0x1b47b3,_0x553f87){return _0x2042c6(_0x1b47b3,_0x553f87);},'AvvBi':function(_0x22b726,_0x468ba9,_0x126fc3){return _0x22b726(_0x468ba9,_0x126fc3);},'bQpJd':function(_0x5504e6,_0x44722c){return _0x5504e6(_0x44722c);}},_0x5c4835=join(_0x59f881,'ci',_0x26a593),_0x2cd59f=_0x577822['nKdFy'](join,_0x59f881,_0x577822['iApHf'],_0x26a593),_0x131b4b=_0x577822['xcORf'](join,_0x59f881,_0x26a593),_0x3c75de=_0x577822[_0x963bbd(0x1b2)](join,_0x59f881,_0x577822['iApHf']),_0x46c201=_0x577822['AvvBi'](join,_0x59f881,'ci');if(existsSync(_0x5c4835))return _0x5c4835;if(_0x577822['bQpJd'](existsSync,_0x2cd59f))return _0x2cd59f;if(_0x577822['bQpJd'](existsSync,_0x131b4b)&&(_0x131b4b!==_0x3c75de&&_0x131b4b!==_0x46c201?!![]:hasLegacyProfileFiles(_0x131b4b)))return _0x131b4b;return null;}export function getEnvDir(_0x20e20a,_0x560d90={}){const _0x3299b6=_0x16ef,_0x53fbdb={'jxuqa':function(_0x3ddfaf){return _0x3ddfaf();},'cIjLg':function(_0x55dbf0,_0x4eb8be){return _0x55dbf0(_0x4eb8be);},'JDtPm':function(_0x1cc7a0,_0x2b1d13){return _0x1cc7a0!==_0x2b1d13;},'yWkjZ':function(_0x598466,_0x33ffa9,_0x2b6c27){return _0x598466(_0x33ffa9,_0x2b6c27);}},_0x51a809=_0x53fbdb['jxuqa'](getRangerDir),_0x5e4f9b=findEnvInRoot(_0x20e20a,_0x51a809);if(_0x5e4f9b){if(_0x560d90[_0x3299b6(0x1e0)]&&_0x53fbdb[_0x3299b6(0x1a6)](isLegacyEnvPath,_0x5e4f9b))throw legacyWriteError(_0x20e20a,_0x5e4f9b);return _0x5e4f9b;}const _0x1b8378=_0x53fbdb[_0x3299b6(0x1cf)](getRangerHomeDir);if(_0x53fbdb['JDtPm'](_0x1b8378,_0x51a809)){const _0x5d4ee0=findEnvInRoot(_0x20e20a,_0x1b8378);if(_0x5d4ee0){if(_0x560d90['forWrite']&&_0x53fbdb['cIjLg'](isLegacyEnvPath,_0x5d4ee0))throw _0x53fbdb[_0x3299b6(0x1cd)](legacyWriteError,_0x20e20a,_0x5d4ee0);return _0x5d4ee0;}}const _0x26efed=join(_0x1b8378,'local',_0x20e20a);if(_0x560d90[_0x3299b6(0x1e0)])throw _0x53fbdb[_0x3299b6(0x1cd)](legacyWriteError,_0x20e20a,_0x26efed);return _0x26efed;}function _0x227b(){const _0x14197c=['qbAcS','entries','HCuXc','rangerDir','cIjLg','executablePath','YUNnu','message','filter','string','vTRTj','includes','fromEntries','VdKlq','45wiaSlW','clipboard-read','PELSs','qJdVM','playwright-cli','gWifA','--allow-insecure-localhost','catch','headless','ZSqis','lVzIj','126395KNBFLE','kwrbx','ranger-auth-','JZYGd','ZrZZO','AFSsa','KLUhH','99unSQlo','.json','now','location','275jRXgyz','LqmTM','--allow-running-insecure-content','552HUpCVc','wqszQ','ENOENT','cdpEndpoint','yWkjZ','VcWqV','jxuqa','args','WQONc','WHoNP','storageState','extraHTTPHeaders','vGNxm','zixvx','tempAuthPath','2616812pnoRwW','Spxlz','WWyLf','ignoreHTTPSErrors','-cli','dXLNA','TGhYI','--no-sandbox','forWrite','isArray','lMKOr','zkdYI','legacy','33836JmCZfN','HpCQG','setupHeaders','vtDKp','install','storageStatePath','map','safeMode','CzZAV','vision','browser','userAgent','48062AUPwgy','parse','EPAyu','MhjMR','launchOptions','pSMjV','rDhCE','--disable-web-security','olAZA','LsENF','path','allow','stagehand','getuid','449280iqNAOS','headers','WUJCQ','dMJmG','No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','contextOptions','riWLi','\x20is\x20not\x20set','locations','auedo','setupHeader','smNgG','tNnjZ','MwKsE','-rangerwright.json','JZnKq','WJpJb','HAdCe','chromium','length','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','repeat','CbJyC','--disable-setuid-sandbox','pESoR','EBMxi','env','boolean','hhIXF','startsWith','stringify','nova-user-data','file','3930biwQNG','UsuLj','Caqym','auth.json.enc','settings.json','120880Ccaevu','--disable-features=WebBluetooth','local','UKuSH','fqOPw'];_0x227b=function(){return _0x14197c;};return _0x227b();}function isLegacyEnvPath(_0x5017e8){const _0x134ea6=_0x16ef,_0x5e395d={'TGhYI':function(_0x55778b){return _0x55778b();},'riWLi':function(_0x149fcf,_0x3b44de){return _0x149fcf+_0x3b44de;},'YUNnu':function(_0x4d39f7,_0x3d84a7){return _0x4d39f7===_0x3d84a7;}},_0x3d690f=_0x5e395d[_0x134ea6(0x1de)](getRangerDir),_0x35a4bd=getRangerHomeDir();for(const _0x1776ce of new Set([_0x3d690f,_0x35a4bd])){const _0x2d935f=_0x1776ce['endsWith']('/')?_0x1776ce:_0x5e395d[_0x134ea6(0x17d)](_0x1776ce,'/');if(_0x5e395d[_0x134ea6(0x1a8)](_0x5017e8,_0x1776ce)||_0x5017e8[_0x134ea6(0x194)](_0x2d935f))return!![];}return![];}function legacyWriteError(_0x4a038c,_0x3fa76b){const _0x37ccfa=_0x16ef,_0x1e4f4d={'yBmIk':function(_0x2150f3,_0x243b6f){return _0x2150f3+_0x243b6f;}};return new Error(_0x1e4f4d['yBmIk']('Refusing\x20to\x20write\x20profile\x20\x22'+_0x4a038c+'\x22\x20to\x20legacy\x20path\x20'+_0x3fa76b+'.\x0a'+'That\x20directory\x20is\x20read-only\x20now.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a'+_0x37ccfa(0x18b),'See\x20https://docs.ranger.net/main/concepts/profiles\x20for\x20setup\x20options.'));}export function findExistingEnv(_0x13155b,_0x12e42e){const _0x377a7c=_0x16ef,_0x2d555c={'jdjdZ':function(_0xf71908){return _0xf71908();},'olAZA':'legacy','fqOPw':function(_0x34f546,_0xb3c52e,_0xb16e2c){return _0x34f546(_0xb3c52e,_0xb16e2c);},'UKuSH':function(_0x236110,_0x281513,_0x1c3740,_0x51653f){return _0x236110(_0x281513,_0x1c3740,_0x51653f);},'dMJmG':_0x377a7c(0x19f),'jSXLz':function(_0x1ce4ca,_0xf41b92){return _0x1ce4ca(_0xf41b92);},'lTWtd':function(_0x5bd337,_0x3c2a2e){return _0x5bd337===_0x3c2a2e;},'Ioxay':function(_0xbd9c9b,_0xddf775){return _0xbd9c9b===_0xddf775;}},_0x11c449=_0x12e42e?.[_0x377a7c(0x1a5)],_0x14b3f6=_0x11c449?[_0x11c449]:[_0x2d555c['jdjdZ'](getRangerDir),getRangerHomeDir()]['filter']((_0x4eed16,_0x27b0fa,_0x2ac4af)=>_0x2ac4af['indexOf'](_0x4eed16)===_0x27b0fa),_0x32742b=_0x12e42e?.[_0x377a7c(0x17f)]??['ci','local',_0x2d555c['olAZA']];for(const _0x1d21f7 of _0x14b3f6){const _0x1658df=join(_0x1d21f7,_0x377a7c(0x19f)),_0x11ef4e=_0x2d555c[_0x377a7c(0x1a1)](join,_0x1d21f7,'ci'),_0x1003d8=[{'location':'ci','path':_0x2d555c[_0x377a7c(0x1a0)](join,_0x1d21f7,'ci',_0x13155b)},{'location':_0x377a7c(0x19f),'path':join(_0x1d21f7,_0x2d555c[_0x377a7c(0x17a)],_0x13155b)},{'location':_0x377a7c(0x1e4),'path':join(_0x1d21f7,_0x13155b)}];for(const _0x190ed4 of _0x1003d8){if(_0x32742b[_0x377a7c(0x1ad)](_0x190ed4[_0x377a7c(0x1c5)])&&_0x2d555c['jSXLz'](existsSync,_0x190ed4['path'])){if(_0x190ed4['location']===_0x2d555c[_0x377a7c(0x171)]&&(_0x2d555c['lTWtd'](_0x190ed4['path'],_0x1658df)||_0x2d555c['Ioxay'](_0x190ed4['path'],_0x11ef4e))&&!_0x2d555c['jSXLz'](hasLegacyProfileFiles,_0x190ed4[_0x377a7c(0x173)]))continue;return{'path':_0x190ed4[_0x377a7c(0x173)],'location':_0x190ed4[_0x377a7c(0x1c5)]};}}}return null;}function hasLegacyProfileFiles(_0x241324){const _0x8f2e3b=_0x16ef,_0x2de6ad={'HvJgR':function(_0x2a3709,_0x4ed8b4){return _0x2a3709(_0x4ed8b4);},'yfuNT':_0x8f2e3b(0x19c),'CbJyC':function(_0x26201d,_0x38349f){return _0x26201d(_0x38349f);},'LsENF':function(_0x48d52b,_0x11abc4,_0x70aac2){return _0x48d52b(_0x11abc4,_0x70aac2);}};return _0x2de6ad['HvJgR'](existsSync,join(_0x241324,_0x2de6ad['yfuNT']))||existsSync(join(_0x241324,'auth.json'))||_0x2de6ad[_0x8f2e3b(0x18d)](existsSync,_0x2de6ad[_0x8f2e3b(0x172)](join,_0x241324,_0x8f2e3b(0x19b)));}export function isEnvCi(_0x521845){const _0x57d58d=_0x16ef,_0x23dddb={'WWevn':function(_0x544489,_0x551768){return _0x544489(_0x551768);},'XEDdu':function(_0x4b5e5e){return _0x4b5e5e();},'VcWqV':function(_0x42c1ea){return _0x42c1ea();},'XWijo':function(_0x19bcde,_0x25a8e5){return _0x19bcde!==_0x25a8e5;},'TtrgV':function(_0x4e9c5,_0x1596b6,_0x3e1e4f,_0x4001fc){return _0x4e9c5(_0x1596b6,_0x3e1e4f,_0x4001fc);}};if(_0x23dddb['WWevn'](existsSync,join(_0x23dddb['XEDdu'](getRangerDir),'ci',_0x521845)))return!![];const _0x349e0a=_0x23dddb[_0x57d58d(0x1ce)](getRangerHomeDir);if(_0x23dddb['XWijo'](_0x349e0a,_0x23dddb['VcWqV'](getRangerDir))&&existsSync(_0x23dddb['TtrgV'](join,_0x349e0a,'ci',_0x521845)))return!![];return![];}export async function cleanupTempFiles(_0x4b06b9){const _0x53f4ff=_0x16ef,_0x2e38b9=[_0x4b06b9[_0x53f4ff(0x1d7)],_0x4b06b9['configPath']]['filter'](Boolean);await Promise['all'](_0x2e38b9[_0x53f4ff(0x1eb)](_0xd20c88=>unlink(_0xd20c88)[_0x53f4ff(0x1b7)](_0x44d62d=>{const _0x5e1b88=_0x53f4ff;_0x44d62d['code']!==_0x5e1b88(0x1cb)&&console['warn']('Failed\x20to\x20clean\x20up\x20temp\x20file\x20'+_0xd20c88+':',_0x44d62d[_0x5e1b88(0x1a9)]);})));}export function getSettingsPath(_0x269d2f){const _0x423342=_0x16ef,_0x11bea1={'WUJCQ':function(_0x2a1355,_0x3ec048,_0x1f34c0){return _0x2a1355(_0x3ec048,_0x1f34c0);},'UsuLj':function(_0x5d2b0b,_0x2ee71b){return _0x5d2b0b(_0x2ee71b);}};return _0x11bea1[_0x423342(0x179)](join,_0x11bea1[_0x423342(0x199)](getEnvDir,_0x269d2f),_0x423342(0x19c));}export async function loadSettings(_0x400afd){const _0xfd5d07=_0x16ef,_0x7dca12={'MhjMR':function(_0x2f2e28,_0x15bade){return _0x2f2e28(_0x15bade);},'xHizU':function(_0x171b3f,_0x3b2166,_0x52fe77){return _0x171b3f(_0x3b2166,_0x52fe77);}},_0x2de308=getSettingsPath(_0x400afd);if(!_0x7dca12[_0xfd5d07(0x16c)](existsSync,_0x2de308))return{};try{const _0xa2d52=await _0x7dca12['xHizU'](readFile,_0x2de308,'utf-8');return JSON[_0xfd5d07(0x16a)](_0xa2d52);}catch{return{};}}export async function saveSettings(_0x4d2a58,_0x18cff2){const _0x168b03=_0x16ef,_0x5cca47={'ygtAC':function(_0x193e35,_0xb32ea0){return _0x193e35(_0xb32ea0);}},_0x4a9171=_0x5cca47['ygtAC'](getSettingsPath,_0x4d2a58),_0x34e13d=dirname(_0x4a9171);!existsSync(_0x34e13d)&&await mkdir(_0x34e13d,{'recursive':!![]}),await writeFile(_0x4a9171,JSON[_0x168b03(0x195)](_0x18cff2,null,0x2));}export function resolveEnvVars(_0x506e92){const _0x4ab64f=_0x16ef,_0x40149d={'smNgG':function(_0x1b34a9,_0x848ea2){return _0x1b34a9===_0x848ea2;},'ytznA':'object'};if(typeof _0x506e92==='string')return _0x506e92['replace'](/\$\{(\w+)\}/g,(_0xfcaa66,_0x488c36)=>{const _0x568dc8=_0x16ef,_0x52f8bc=process[_0x568dc8(0x191)][_0x488c36];if(_0x52f8bc===undefined)throw new Error('Environment\x20variable\x20'+_0x488c36+_0x568dc8(0x17e));return _0x52f8bc;});if(Array[_0x4ab64f(0x1e1)](_0x506e92))return _0x506e92[_0x4ab64f(0x1eb)](resolveEnvVars);if(_0x506e92&&_0x40149d[_0x4ab64f(0x182)](typeof _0x506e92,_0x40149d['ytznA']))return Object[_0x4ab64f(0x1ae)](Object[_0x4ab64f(0x1a3)](_0x506e92)[_0x4ab64f(0x1eb)](([_0x5a1edd,_0x27aeb7])=>[_0x5a1edd,resolveEnvVars(_0x27aeb7)]));return _0x506e92;}const isRecord=_0x446b25=>typeof _0x446b25==='object'&&_0x446b25!==null&&!Array[_0x50ffde(0x1e1)](_0x446b25),asRecord=_0x1da1eb=>isRecord(_0x1da1eb)?_0x1da1eb:undefined,mergeHeaders=(_0x1aa128,_0x18af06)=>{const _0x4aba0d=_0x50ffde,_0x273883={'lMKOr':function(_0xc7b833,_0x197172){return _0xc7b833??_0x197172;}},_0x495971={..._0x273883[_0x4aba0d(0x1e2)](_0x1aa128,{}),..._0x18af06??{}};return Object['keys'](_0x495971)['length']?_0x495971:undefined;},SAFE_MODE_ARGS=[_0x50ffde(0x19e)],ALLOW_LOCALHOST_ARGS=[_0x50ffde(0x170),_0x50ffde(0x1c8),'--unsafely-treat-insecure-origin-as-secure=http://localhost',_0x50ffde(0x1b6)];export function buildBrowserOptionsFromSettings(_0x28cae3,_0x2d947d={}){const _0x5d8b5c=_0x50ffde,_0x1dca26={'zkdYI':function(_0x2a01ca,_0x43380b){return _0x2a01ca(_0x43380b);},'lVzIj':function(_0x58755e,_0x3fac7e){return _0x58755e(_0x3fac7e);},'RrgYi':function(_0x2d4fc9,_0x12b83a){return _0x2d4fc9===_0x12b83a;},'CQuJE':function(_0x138c0d,_0x8f65f9){return _0x138c0d(_0x8f65f9);},'AFSsa':'string','EBMxi':function(_0x5f5cf6,_0x141bc5){return _0x5f5cf6(_0x141bc5);}},_0x5bab2a=_0x1dca26[_0x5d8b5c(0x1e3)](asRecord,_0x28cae3['browser']),_0x20d462={..._0x1dca26['lVzIj'](asRecord,_0x5bab2a?.[_0x5d8b5c(0x16d)])??{}};_0x1dca26['RrgYi'](typeof _0x2d947d['headless'],_0x5d8b5c(0x192))&&(_0x20d462[_0x5d8b5c(0x1b8)]=_0x2d947d[_0x5d8b5c(0x1b8)]);if(_0x28cae3[_0x5d8b5c(0x1ec)]){const _0x26be17=_0x20d462['args']??[],_0x2a5437=SAFE_MODE_ARGS[_0x5d8b5c(0x1aa)](_0x59c6c4=>!_0x26be17[_0x5d8b5c(0x1ad)](_0x59c6c4));_0x20d462['args']=[..._0x26be17,..._0x2a5437];}if(_0x28cae3['allowInsecureLocalhost']){const _0x1cf3a1=_0x20d462['args']??[],_0x3c3b0e=ALLOW_LOCALHOST_ARGS['filter'](_0x21f4be=>!_0x1cf3a1['includes'](_0x21f4be));_0x20d462['args']=[..._0x1cf3a1,..._0x3c3b0e];}const _0x6a3867={..._0x1dca26['CQuJE'](asRecord,_0x5bab2a?.[_0x5d8b5c(0x17c)])??{}};_0x6a3867[_0x5d8b5c(0x1db)]=!![];typeof _0x28cae3[_0x5d8b5c(0x168)]===_0x1dca26[_0x5d8b5c(0x1c0)]&&(_0x6a3867['userAgent']=_0x28cae3['userAgent']);const _0x504836=mergeHeaders(_0x1dca26[_0x5d8b5c(0x1ba)](asRecord,_0x6a3867[_0x5d8b5c(0x1d4)]),_0x1dca26[_0x5d8b5c(0x190)](asRecord,_0x28cae3['headers']));return _0x504836?_0x6a3867[_0x5d8b5c(0x1d4)]=_0x504836:delete _0x6a3867['extraHTTPHeaders'],_0x2d947d['storageStatePath']&&(_0x6a3867[_0x5d8b5c(0x1d3)]=_0x2d947d[_0x5d8b5c(0x1ea)]),{'launchOptions':_0x20d462,'contextOptions':_0x6a3867};}export async function resolveProfileStorageState(_0x2f3f74){return resolveLocalAuthPath(getEnvDir(_0x2f3f74));}async function resolveLocalAuthPath(_0x134702){const _0x4d42c2=_0x50ffde,_0x2d5791={'kfgRF':'auth.json.enc','EPAyu':function(_0x1cb200,_0x10b768){return _0x1cb200(_0x10b768);},'BaoBV':function(_0x43daa7){return _0x43daa7();},'czURL':_0x4d42c2(0x17b),'qbAcS':function(_0x1c539b,_0x7d6473,_0x3d2f3d){return _0x1c539b(_0x7d6473,_0x3d2f3d);},'CzZAV':function(_0x23cce6,_0x1384a7){return _0x23cce6 instanceof _0x1384a7;}},_0x53ad2f=join(_0x134702,_0x2d5791['kfgRF']),_0x1d5f9d=join(_0x134702,'auth.json');if(_0x2d5791[_0x4d42c2(0x16b)](existsSync,_0x53ad2f))try{const _0x412e0d=await _0x2d5791['BaoBV'](getToken);if(!_0x412e0d)throw new Error(_0x2d5791['czURL']);const _0x53b0fe=await readFile(_0x53ad2f),_0x3baa00=_0x2d5791[_0x4d42c2(0x1a2)](decrypt,_0x53b0fe,_0x412e0d),_0x23f117=_0x2d5791[_0x4d42c2(0x1a2)](join,_0x2d5791['BaoBV'](tmpdir),_0x4d42c2(0x1bd)+Date['now']()+'.json');return await _0x2d5791[_0x4d42c2(0x1a2)](writeFile,_0x23f117,_0x3baa00),{'storageStatePath':_0x23f117,'tempAuthPath':_0x23f117};}catch(_0x4ff639){const _0x1f259a=_0x2d5791[_0x4d42c2(0x1ed)](_0x4ff639,Error)?_0x4ff639['message']:_0x2d5791['EPAyu'](String,_0x4ff639);throw new Error('Failed\x20to\x20decrypt\x20auth\x20state:\x20'+_0x1f259a);}if(existsSync(_0x1d5f9d))return{'storageStatePath':_0x1d5f9d};return{};}export async function buildPlaywrightConfig(_0x1084ce,_0x157628,_0x465397,_0x2a18f7,_0x5ebbea){const _0xb227e7=_0x50ffde,_0x4fc346={'Spxlz':function(_0x5129a3,_0x76b0b9){return _0x5129a3(_0x76b0b9);},'pKcAZ':_0xb227e7(0x175),'TMPsL':function(_0x23deeb,_0x1ddee2){return _0x23deeb(_0x1ddee2);}};if(_0x5ebbea)return buildPlaywrightConfigCore(_0x1084ce,_0x5ebbea,_0x157628,_0x465397,_0x2a18f7,'stagehand');const {storageStatePath:_0x22833a,tempAuthPath:_0x3d3884}=await _0x4fc346[_0xb227e7(0x1d9)](resolveLocalAuthPath,getEnvDir(_0x157628));try{const _0x58725b=await buildPlaywrightConfigCore(_0x1084ce,_0x22833a,_0x157628,_0x465397,_0x2a18f7,_0x4fc346['pKcAZ']);return{..._0x58725b,'tempAuthPath':_0x3d3884};}catch(_0x2c27ed){_0x3d3884&&await _0x4fc346['TMPsL'](unlink,_0x3d3884)[_0xb227e7(0x1b7)](()=>{});throw _0x2c27ed;}}export async function buildPlaywrightConfigCore(_0x566c02,_0x219ca7,_0x2e2f56,_0x19a4fb,_0x5d06f1,_0x57cd73='stagehand'){const _0x3ef6e5=_0x50ffde,_0x2caeb3={'VdKlq':function(_0x4ca357,_0x547520){return _0x4ca357===_0x547520;},'MwKsE':'--disable-setuid-sandbox','sFOAM':'chromium','HsRzu':function(_0x50dd9a){return _0x50dd9a();},'pESoR':function(_0x34f20a,_0x38e8f5,_0x106b6d,_0x3903d0){return _0x34f20a(_0x38e8f5,_0x106b6d,_0x3903d0);},'MLxGr':function(_0x49602e){return _0x49602e();},'LoQLJ':_0x3ef6e5(0x197),'OjDUO':'core','gWifA':_0x3ef6e5(0x1e9),'Caqym':'pdf','LVpKX':function(_0x2129cc,_0x390ddb,_0x4c7e9d){return _0x2129cc(_0x390ddb,_0x4c7e9d);},'GzDBa':'ranger-config','glYNQ':_0x3ef6e5(0x1b4),'FqaPK':_0x3ef6e5(0x1dc)},_0x21dce3=_0x19a4fb||_0x2caeb3['HsRzu'](randomUUID),_0x4991e7=_0x2caeb3[_0x3ef6e5(0x18f)](join,_0x2caeb3['MLxGr'](getRangerDir),'sessions',_0x21dce3),_0x368604=Boolean(_0x566c02['cdpEndpoint']),_0x57fae7=_0x368604?{'browserName':_0x2caeb3['sFOAM'],'cdpEndpoint':_0x566c02[_0x3ef6e5(0x1cc)]}:((()=>{const _0x39c8c0=_0x3ef6e5,{launchOptions:_0x2a74a8,contextOptions:_0x191e26}=buildBrowserOptionsFromSettings(_0x566c02,{'headless':_0x5d06f1?![]:_0x566c02[_0x39c8c0(0x1b8)]??!![],'storageStatePath':_0x219ca7});if(_0x2caeb3['VdKlq'](process[_0x39c8c0(0x176)]?.(),0x0)){const _0x85c941=['--no-sandbox',_0x2caeb3[_0x39c8c0(0x184)]],_0x50f61f=_0x2a74a8[_0x39c8c0(0x1d0)]??[],_0x329cea=_0x85c941['filter'](_0x251c68=>!_0x50f61f[_0x39c8c0(0x1ad)](_0x251c68));_0x2a74a8['args']=[..._0x50f61f,..._0x329cea];}return{'isolated':!![],'browserName':_0x2caeb3['sFOAM'],'launchOptions':_0x2a74a8,'contextOptions':{..._0x191e26,'permissions':[_0x39c8c0(0x1b1),'clipboard-write'],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x302051=_0x57cd73==='playwright-cli'?{'browser':_0x57fae7,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x4991e7,'outputMode':_0x2caeb3['LoQLJ'],'codegen':'none'}:{'name':_0x2e2f56,'browser':_0x57fae7,'capabilities':[_0x2caeb3['OjDUO'],'tabs',_0x2caeb3[_0x3ef6e5(0x1b5)],_0x2caeb3[_0x3ef6e5(0x19a)],_0x3ef6e5(0x1ee)],'imageResponses':_0x3ef6e5(0x174),'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x4991e7};if(!_0x368604){const _0x13af5c=_0x302051[_0x3ef6e5(0x1ef)],_0x1de859=_0x13af5c[_0x3ef6e5(0x17c)];if(_0x2caeb3[_0x3ef6e5(0x1af)](_0x1de859[_0x3ef6e5(0x168)],undefined))delete _0x1de859[_0x3ef6e5(0x168)];if(_0x1de859['storageState']===undefined)delete _0x1de859['storageState'];}const _0xbb688a=_0x2caeb3['LVpKX'](join,_0x2caeb3['HsRzu'](tmpdir),_0x2caeb3['GzDBa']);!existsSync(_0xbb688a)&&await mkdir(_0xbb688a,{'recursive':!![]});const _0xfd8873=_0x57cd73===_0x2caeb3['glYNQ']?_0x2caeb3['FqaPK']:'',_0x580351=join(_0xbb688a,_0x2e2f56+'-'+Date[_0x3ef6e5(0x1c4)]()+_0xfd8873+_0x3ef6e5(0x1c3));return await writeFile(_0x580351,JSON['stringify'](_0x302051,null,0x2)),{'configPath':_0x580351,'storageStatePath':_0x219ca7};}export async function buildPlaywrightCliConfig(_0x2b2f40,_0x3d4e4d,_0x1bbbe5,_0x73122c,_0x587161){const _0x2f45ae=_0x50ffde,_0x4d18ee={'dXLNA':_0x2f45ae(0x1b4),'JZYGd':function(_0x42efd7,_0x123407,_0x2170b1,_0x4c6240,_0x2e916b,_0x4dfc7c,_0xc47e24){return _0x42efd7(_0x123407,_0x2170b1,_0x4c6240,_0x2e916b,_0x4dfc7c,_0xc47e24);}};if(_0x587161)return buildPlaywrightConfigCore(_0x2b2f40,_0x587161,_0x3d4e4d,_0x1bbbe5,_0x73122c,_0x4d18ee[_0x2f45ae(0x1dd)]);const {storageStatePath:_0x3a9421,tempAuthPath:_0x584e41}=await resolveLocalAuthPath(getEnvDir(_0x3d4e4d));try{const _0x16794c=await _0x4d18ee[_0x2f45ae(0x1be)](buildPlaywrightConfigCore,_0x2b2f40,_0x3a9421,_0x3d4e4d,_0x1bbbe5,_0x73122c,'playwright-cli');return{..._0x16794c,'tempAuthPath':_0x584e41};}catch(_0xe6d329){_0x584e41&&await unlink(_0x584e41)['catch'](()=>{});throw _0xe6d329;}}export async function buildRangerwrightCliConfig(_0x40a5b1,_0x3dea8c,_0x52d1dc,_0x5a161d,_0x5dd129){const _0x5f1d7d=_0x50ffde,_0x12bc3d={'wqszQ':function(_0x1d2e1c,_0x2fb427){return _0x1d2e1c===_0x2fb427;},'LqmTM':'--no-sandbox','xMzIe':'--disable-setuid-sandbox','WHoNP':'chromium','qJdVM':_0x5f1d7d(0x1b1),'mxuUq':function(_0x42ce3f,_0x3e57c9){return _0x42ce3f(_0x3e57c9);},'auedo':function(_0x968d39,_0x54e143){return _0x968d39(_0x54e143);},'JZnKq':function(_0x411682){return _0x411682();},'ZrZZO':function(_0x19ab40,_0x5d7de4,_0x592bb8,_0x155a37){return _0x19ab40(_0x5d7de4,_0x592bb8,_0x155a37);},'HAdCe':'sessions','UcJyC':function(_0x12f4d4,_0x1dbef2){return _0x12f4d4(_0x1dbef2);},'hhIXF':function(_0x3dd08b,_0x2d1247){return _0x3dd08b===_0x2d1247;},'tNEhH':function(_0x58b277,_0x9c47d7,_0xa33c59){return _0x58b277(_0x9c47d7,_0xa33c59);},'WQONc':function(_0x5dc043,_0x5374a0,_0x274a82){return _0x5dc043(_0x5374a0,_0x274a82);},'EJNtL':function(_0x467847,_0x559f38){return _0x467847(_0x559f38);}},{storageStatePath:_0x4991c4,tempAuthPath:_0x5a3c0f}=_0x5dd129?{'storageStatePath':_0x5dd129,'tempAuthPath':undefined}:await _0x12bc3d['mxuUq'](resolveLocalAuthPath,_0x12bc3d[_0x5f1d7d(0x180)](getEnvDir,_0x3dea8c)),_0x5b61bc=_0x52d1dc||_0x12bc3d[_0x5f1d7d(0x186)](randomUUID),_0x4abfe9=_0x12bc3d[_0x5f1d7d(0x1bf)](join,_0x12bc3d[_0x5f1d7d(0x186)](getRangerDir),_0x12bc3d[_0x5f1d7d(0x188)],_0x5b61bc),_0x4a47d1=_0x12bc3d['UcJyC'](Boolean,_0x40a5b1['cdpEndpoint']),_0x29769f=_0x4a47d1?{'browserName':_0x5f1d7d(0x189),'cdpEndpoint':_0x40a5b1['cdpEndpoint']}:((()=>{const _0x51fd17=_0x5f1d7d,{launchOptions:_0x5a5aad,contextOptions:_0x4c8cc4}=buildBrowserOptionsFromSettings(_0x40a5b1,{'headless':_0x5a161d?![]:_0x40a5b1['headless']??!![],'storageStatePath':_0x4991c4});if(_0x12bc3d[_0x51fd17(0x1ca)](process[_0x51fd17(0x176)]?.(),0x0)){const _0x3039d5=[_0x12bc3d[_0x51fd17(0x1c7)],_0x12bc3d['xMzIe']],_0xc5898b=_0x5a5aad['args']??[],_0x240460=_0x3039d5[_0x51fd17(0x1aa)](_0x3a213c=>!_0xc5898b[_0x51fd17(0x1ad)](_0x3a213c));_0x5a5aad['args']=[..._0xc5898b,..._0x240460];}return{'browserName':_0x12bc3d[_0x51fd17(0x1d2)],'launchOptions':_0x5a5aad,'contextOptions':{..._0x4c8cc4,'permissions':[_0x12bc3d[_0x51fd17(0x1b3)],'clipboard-write'],'viewport':{'width':0x500,'height':0x2d0}}};})());if(!_0x4a47d1){const _0x27df4d=_0x29769f['contextOptions'];if(_0x27df4d){if(_0x12bc3d[_0x5f1d7d(0x193)](_0x27df4d['userAgent'],undefined))delete _0x27df4d[_0x5f1d7d(0x168)];if(_0x12bc3d[_0x5f1d7d(0x193)](_0x27df4d['storageState'],undefined))delete _0x27df4d['storageState'];}}const _0x318bc3={'browser':_0x29769f,'outputDir':_0x4abfe9,'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'settle':{'navigationLoadTimeoutMs':0x7530,'networkSettleTimeoutMs':0x1388,'networkIdleWindowMs':0x1f4,'postActionAnimationFrameCount':0x2}};let _0x4314bc;try{const _0x2719e7=_0x12bc3d['tNEhH'](join,tmpdir(),'ranger-config');!existsSync(_0x2719e7)&&await mkdir(_0x2719e7,{'recursive':!![]}),_0x4314bc=join(_0x2719e7,_0x3dea8c+'-'+Date[_0x5f1d7d(0x1c4)]()+_0x5f1d7d(0x185)),await _0x12bc3d[_0x5f1d7d(0x1d1)](writeFile,_0x4314bc,JSON['stringify'](_0x318bc3,null,0x2));}catch(_0x5d02c8){_0x5a3c0f&&await _0x12bc3d['EJNtL'](unlink,_0x5a3c0f)[_0x5f1d7d(0x1b7)](()=>{});throw _0x5d02c8;}return{'configPath':_0x4314bc,'storageStatePath':_0x4991c4,'tempAuthPath':_0x5a3c0f,'outputDir':_0x4abfe9};}export async function buildNovaActCliConfig(_0xe2c980,_0x56b796,_0x380af4,_0x2ae99b,_0x300faf){const _0x4a0963=_0x50ffde,_0x421ab5={'ZSqis':function(_0x128cf8,_0x4c908a){return _0x128cf8(_0x4c908a);},'scQDx':function(_0x5cf191){return _0x5cf191();},'WJpJb':_0x4a0963(0x196),'pSMjV':'Default','HCuXc':function(_0x1d4148,_0x169c89,_0x1e4da5){return _0x1d4148(_0x169c89,_0x1e4da5);},'ywuwG':function(_0x4880b6,_0x290ce2){return _0x4880b6===_0x290ce2;},'cXyqi':_0x4a0963(0x1df),'mKoJS':_0x4a0963(0x18e),'vGNxm':function(_0x179abd,_0x21df35){return _0x179abd(_0x21df35);}},{storageStatePath:_0x250bce,tempAuthPath:_0x223aca}=_0x300faf?{'storageStatePath':_0x300faf,'tempAuthPath':undefined}:await _0x421ab5['ZSqis'](resolveLocalAuthPath,getEnvDir(_0x56b796)),_0x4c46de=_0x380af4||randomUUID(),_0x357030=join(_0x421ab5['scQDx'](getRangerDir),'sessions',_0x4c46de),_0x233c64=join(_0x357030,_0x421ab5[_0x4a0963(0x187)]),_0x5bcb49=_0x250bce?join(_0x233c64,_0x421ab5[_0x4a0963(0x16e)]):undefined,{launchOptions:_0x5dcd13,contextOptions:_0x482a35}=_0x421ab5[_0x4a0963(0x1a4)](buildBrowserOptionsFromSettings,_0xe2c980,{'headless':_0x2ae99b?![]:_0xe2c980['headless']??!![],'storageStatePath':_0x250bce});if(_0x421ab5['ywuwG'](process[_0x4a0963(0x176)]?.(),0x0)){const _0x564edb=[_0x421ab5['cXyqi'],_0x421ab5['mKoJS']],_0x5ec1d5=_0x5dcd13['args']??[],_0x1feb45=_0x564edb[_0x4a0963(0x1aa)](_0xf0adf3=>!_0x5ec1d5[_0x4a0963(0x1ad)](_0xf0adf3));_0x5dcd13['args']=[..._0x5ec1d5,..._0x1feb45];}const _0x24e7c8=typeof _0x5dcd13[_0x4a0963(0x1a7)]===_0x4a0963(0x1ab)?_0x5dcd13[_0x4a0963(0x1a7)]:_0x250bce?chromium['executablePath']():undefined;return{'storageStatePath':_0x250bce,'tempAuthPath':_0x223aca,'baseUrl':_0xe2c980['baseUrl'],'headless':_0x421ab5['ZSqis'](Boolean,_0x5dcd13['headless']),'userDataDir':_0x233c64,'browserProfilePath':_0x5bcb49,'executablePath':_0x24e7c8,'launchArgs':Array[_0x4a0963(0x1e1)](_0x5dcd13[_0x4a0963(0x1d0)])?_0x5dcd13[_0x4a0963(0x1d0)]['filter'](_0x2e64ae=>typeof _0x2e64ae==='string'):[],'userAgent':_0x421ab5['ywuwG'](typeof _0x482a35['userAgent'],_0x4a0963(0x1ab))?_0x482a35[_0x4a0963(0x168)]:undefined,'extraHTTPHeaders':_0x482a35['extraHTTPHeaders'],'allowInsecureLocalhost':_0x421ab5[_0x4a0963(0x1b9)](Boolean,_0xe2c980['allowInsecureLocalhost']),'safeMode':_0x421ab5['ZSqis'](Boolean,_0xe2c980['safeMode']),'cdpEndpoint':_0xe2c980['cdpEndpoint'],'isCdpMode':_0x421ab5[_0x4a0963(0x1d5)](Boolean,_0xe2c980['cdpEndpoint'])};}export function getNestedValue(_0x34f029,_0x4791a6){const _0x17899d=_0x50ffde,_0x1366ce={'tNnjZ':function(_0x4e6b64,_0x3d4254){return _0x4e6b64===_0x3d4254;},'vTRTj':function(_0x5e67d9,_0x111304){return _0x5e67d9===_0x111304;}},_0x3b4cb7=parseKeyPath(_0x4791a6);let _0x1aea51=_0x34f029;for(const _0x323f6e of _0x3b4cb7){if(_0x1366ce[_0x17899d(0x183)](_0x1aea51,null)||_0x1366ce[_0x17899d(0x1ac)](_0x1aea51,undefined)||typeof _0x1aea51!=='object')return undefined;_0x1aea51=_0x1aea51[_0x323f6e];}return _0x1aea51;}export function setNestedValue(_0x29b932,_0x360692,_0x50485d){const _0x1bd387=_0x50ffde,_0x4f66dc={'zGGYY':function(_0x23c9fc,_0x4d4321){return _0x23c9fc<_0x4d4321;},'Bqtuu':function(_0xdb7b6,_0x13de10){return _0xdb7b6!==_0x13de10;}},_0x503281=parseKeyPath(_0x360692);let _0x2837d7=_0x29b932;for(let _0x1456bd=0x0;_0x4f66dc['zGGYY'](_0x1456bd,_0x503281['length']-0x1);_0x1456bd++){const _0x34a9ab=_0x503281[_0x1456bd];(!(_0x34a9ab in _0x2837d7)||_0x4f66dc['Bqtuu'](typeof _0x2837d7[_0x34a9ab],'object'))&&(_0x2837d7[_0x34a9ab]={}),_0x2837d7=_0x2837d7[_0x34a9ab];}_0x2837d7[_0x503281[_0x503281[_0x1bd387(0x18a)]-0x1]]=_0x50485d;}export function deleteNestedValue(_0x1fc248,_0xfb0eb3){const _0x350705=_0x50ffde,_0x1b635f={'kwrbx':function(_0x4c8f2b,_0x4ed1f3){return _0x4c8f2b(_0x4ed1f3);},'EZDKt':function(_0x1b24f9,_0x11e175){return _0x1b24f9<_0x11e175;},'vtDKp':function(_0x48dee3,_0x3dd5b1){return _0x48dee3===_0x3dd5b1;},'jOuEg':'object','OBrko':function(_0x400a99,_0x16cd1b){return _0x400a99===_0x16cd1b;},'JTlDv':function(_0x268a44,_0x24e0a5){return _0x268a44===_0x24e0a5;}},_0x3c73f7=_0x1b635f[_0x350705(0x1bc)](parseKeyPath,_0xfb0eb3);let _0x43ed59=_0x1fc248;for(let _0x45e7fe=0x0;_0x1b635f['EZDKt'](_0x45e7fe,_0x3c73f7[_0x350705(0x18a)]-0x1);_0x45e7fe++){if(_0x43ed59===null||_0x1b635f[_0x350705(0x1e8)](_0x43ed59,undefined)||typeof _0x43ed59!==_0x1b635f['jOuEg'])return![];_0x43ed59=_0x43ed59[_0x3c73f7[_0x45e7fe]];}if(_0x1b635f['OBrko'](_0x43ed59,null)||_0x1b635f['JTlDv'](_0x43ed59,undefined)||typeof _0x43ed59!==_0x1b635f['jOuEg'])return![];const _0x26a24e=_0x3c73f7[_0x3c73f7[_0x350705(0x18a)]-0x1];if(_0x26a24e in _0x43ed59)return delete _0x43ed59[_0x26a24e],!![];return![];}function parseKeyPath(_0x1f26d5){const _0x47c561=_0x50ffde,_0x2daf4c={'zixvx':function(_0x8bf690,_0x297197){return _0x8bf690===_0x297197;},'nkTMq':'header','HpCQG':_0x47c561(0x178),'WWyLf':_0x47c561(0x181)},_0x13c702=_0x1f26d5['split']('.');return _0x2daf4c['zixvx'](_0x13c702[0x0],_0x2daf4c['nkTMq'])&&(_0x13c702[0x0]=_0x2daf4c[_0x47c561(0x1e6)]),_0x2daf4c[_0x47c561(0x1d6)](_0x13c702[0x0],_0x2daf4c[_0x47c561(0x1da)])&&(_0x13c702[0x0]=_0x47c561(0x1e7)),_0x13c702;}export function formatSettings(_0x509ad6,_0xec41e6=0x0){const _0x1a6038=_0x50ffde,_0x1487a9={'rDhCE':function(_0x2b858f,_0x1b0697){return _0x2b858f===_0x1b0697;},'KLUhH':function(_0x3f6a69,_0x291d73){return _0x3f6a69!==_0x291d73;}},_0x41c0fc=[],_0x5333b9='\x20\x20'[_0x1a6038(0x18c)](_0xec41e6);for(const [_0x516a1f,_0x28304d]of Object['entries'](_0x509ad6)){if(_0x1487a9['rDhCE'](_0x28304d,undefined))continue;if(_0x1487a9[_0x1a6038(0x16f)](typeof _0x28304d,'object')&&_0x1487a9[_0x1a6038(0x1c1)](_0x28304d,null)){_0x41c0fc['push'](''+_0x5333b9+_0x516a1f+':');for(const [_0x5c7f5a,_0x19b94f]of Object['entries'](_0x28304d)){_0x41c0fc['push'](_0x5333b9+'\x20\x20'+_0x5c7f5a+':\x20'+_0x19b94f);}}else _0x41c0fc['push'](''+_0x5333b9+_0x516a1f+':\x20'+_0x28304d);}return _0x41c0fc['join']('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x284a31,_0x452337){const _0x16cd77=_0x1e71,_0x76758f=_0x284a31();while(!![]){try{const _0x27693c=parseInt(_0x16cd77(0xd5))/0x1+parseInt(_0x16cd77(0xdc))/0x2+parseInt(_0x16cd77(0xdb))/0x3+-parseInt(_0x16cd77(0xd7))/0x4+-parseInt(_0x16cd77(0xda))/0x5+-parseInt(_0x16cd77(0xd6))/0x6*(-parseInt(_0x16cd77(0xdf))/0x7)+-parseInt(_0x16cd77(0xd9))/0x8*(-parseInt(_0x16cd77(0xde))/0x9);if(_0x27693c===_0x452337)break;else _0x76758f['push'](_0x76758f['shift']());}catch(_0x2d4bda){_0x76758f['push'](_0x76758f['shift']());}}}(_0xfe73,0xb23a6));function _0x1e71(_0x12842a,_0x1a8d18){_0x12842a=_0x12842a-0xd3;const _0xfe730f=_0xfe73();let _0x1e71e2=_0xfe730f[_0x12842a];return _0x1e71e2;}import{readFileSync}from'fs';function _0xfe73(){const _0x5c30e7=['5106300TKzTtn','ranger/SKILL.md','17912zUxcdz','1505265qNuIJf','485751ODlgOK','1221546WTyBNr','wXXiP','1647LENnjt','7zEZQpg','skills','oiDms','nxHOB','360558ophBbT','4587990ASPRNi'];_0xfe73=function(){return _0x5c30e7;};return _0xfe73();}import{dirname,join}from'path';import{fileURLToPath}from'url';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);export function readSkillContent(_0x4ec1b5){const _0xbb25dc=_0x1e71,_0x3ec9e4={'wXXiP':function(_0x49d938,_0xb0f47a,_0x19c7a7,_0x219543,_0x12194b){return _0x49d938(_0xb0f47a,_0x19c7a7,_0x219543,_0x12194b);},'oiDms':_0xbb25dc(0xe0)},_0x5591d4=_0x3ec9e4[_0xbb25dc(0xdd)](join,__dirname,'..','..',_0x3ec9e4[_0xbb25dc(0xd3)]),_0x4cfb83=join(_0x5591d4,_0x4ec1b5);try{return readFileSync(_0x4cfb83,'utf-8');}catch{return'';}}export function getRangerSkillContent(){const _0x5c0492=_0x1e71,_0x33a132={'nxHOB':function(_0x26b0c,_0x5942b0){return _0x26b0c(_0x5942b0);}};return _0x33a132[_0x5c0492(0xd4)](readSkillContent,_0x5c0492(0xd8));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x539de8=_0x3a13;(function(_0x3cb74d,_0x3816f1){const _0x14966c=_0x3a13,_0x447293=_0x3cb74d();while(!![]){try{const _0x1f4798=-parseInt(_0x14966c(0xa1))/0x1+-parseInt(_0x14966c(0x7e))/0x2*(-parseInt(_0x14966c(0x80))/0x3)+parseInt(_0x14966c(0x8b))/0x4*(-parseInt(_0x14966c(0x8a))/0x5)+-parseInt(_0x14966c(0x95))/0x6+-parseInt(_0x14966c(0xa7))/0x7+parseInt(_0x14966c(0xa8))/0x8+parseInt(_0x14966c(0x93))/0x9*(parseInt(_0x14966c(0x97))/0xa);if(_0x1f4798===_0x3816f1)break;else _0x447293['push'](_0x447293['shift']());}catch(_0x107b4a){_0x447293['push'](_0x447293['shift']());}}}(_0x3b9e,0xb9c7f));import{readFile,writeFile,mkdir,readdir,copyFile,rm}from'fs/promises';import{join,dirname}from'path';import{existsSync,statSync}from'fs';import{fileURLToPath}from'url';import{logLocalAgentInstallation}from'./localAgentInstallationsApi.js';import{getSkillsDir}from'./claudeConfig.js';import{getOpencodeSkillsDir}from'./opencodeConfig.js';function _0x3a13(_0x4390e5,_0x43861a){_0x4390e5=_0x4390e5-0x7c;const _0x3b9e77=_0x3b9e();let _0x3a13a3=_0x3b9e77[_0x4390e5];return _0x3a13a3;}function _0x3b9e(){const _0x321219=['815036RAxVdh','\x20\x20Files:\x20','Invalid\x20skill\x20frontmatter','push','ioojw','catch','7700882MWdXtv','4481984lLFrMr','trim','utf-8','10042rlflVd','match','201cnwIse','endsWith','nPHpC','scsbA','xSlFp','\x20\x20Installed\x20skill:\x20','skills','TDnIA','join','length','290WqiSTv','46240GNSlLr','ranger','\x20\x20Skill\x20not\x20found:\x20','reYzo','oEULj','opencode','\x20\x20Failed\x20to\x20remove\x20deprecated\x20skill:\x20','RSAZQ','1932651FkeVyH','dHTVA','761532zfwKqy','e2e-test-recommender','120OuwRQP','.md','isDirectory','warn','SKILL.md','JGGck','log','\x20\x20Location:\x20','aECnC','NbooG'];_0x3b9e=function(){return _0x321219;};return _0x3b9e();}const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);export const RANGER_MANAGED_SKILLS=[_0x539de8(0x8c)];export const DEPRECATED_SKILLS=[_0x539de8(0x96),'bug-bash','feature-tracker'];export async function installSkill(_0x2348c6,_0x5dbb0f={}){const _0x4ae759=_0x539de8,_0x2aed6d={'ioojw':'project','aECnC':'claude','scsbA':function(_0x48c166){return _0x48c166();},'xSlFp':function(_0x153933,_0x5eac52,_0x574bd7){return _0x153933(_0x5eac52,_0x574bd7);},'GdnKl':function(_0x35df4a,_0x21eccb,_0x385fe2){return _0x35df4a(_0x21eccb,_0x385fe2);},'HwKEy':function(_0x23f063,_0x558d2d){return _0x23f063(_0x558d2d);},'dHTVA':function(_0x454877,_0x3a7025){return _0x454877(_0x3a7025);},'rzmfy':function(_0x3f2d07,_0x155d97){return _0x3f2d07(_0x155d97);},'nPHpC':function(_0x4a368d,_0x478788,_0x51f7f1){return _0x4a368d(_0x478788,_0x51f7f1);},'QpHHN':function(_0x425ab9,_0x2b6f2a,_0x1ee429){return _0x425ab9(_0x2b6f2a,_0x1ee429);},'cNEAT':function(_0x173a73,_0x4aa6e4,_0x17633d){return _0x173a73(_0x4aa6e4,_0x17633d);},'cddLv':_0x4ae759(0x7d),'NbooG':function(_0x3491a7,_0x53c1ad){return _0x3491a7(_0x53c1ad);}},{level:level=_0x2aed6d[_0x4ae759(0xa5)],cliVersion:_0x3a6f58,platform:platform=_0x2aed6d[_0x4ae759(0x9f)]}=_0x5dbb0f,_0x308cdc=_0x2aed6d[_0x4ae759(0x83)](getSourceSkillsDir),_0x138e2f=_0x2aed6d[_0x4ae759(0x84)](join,_0x308cdc,_0x2348c6),_0x158889=_0x2aed6d['GdnKl'](join,_0x308cdc,_0x2348c6+_0x4ae759(0x98)),_0x57867d=_0x2aed6d['HwKEy'](existsSync,_0x138e2f)&&statSync(_0x138e2f)[_0x4ae759(0x99)]()&&_0x2aed6d[_0x4ae759(0x94)](existsSync,join(_0x138e2f,_0x4ae759(0x9b))),_0x1c97ef=_0x2aed6d['HwKEy'](existsSync,_0x158889);if(!_0x57867d&&!_0x1c97ef)return console[_0x4ae759(0x9a)](_0x4ae759(0x8d)+_0x2348c6),![];const _0x50cf47=platform===_0x4ae759(0x90)?_0x2aed6d[_0x4ae759(0x94)](getOpencodeSkillsDir,level):_0x2aed6d['rzmfy'](getSkillsDir,level),_0x4605b4=_0x2aed6d[_0x4ae759(0x84)](join,_0x50cf47,_0x2348c6);await mkdir(_0x4605b4,{'recursive':!![]});let _0x5e9246,_0x5e48fc=[];if(_0x57867d){const _0x2d0c7f=await readdir(_0x138e2f),_0xfea655=_0x2d0c7f['filter'](_0x49146b=>_0x49146b[_0x4ae759(0x81)](_0x4ae759(0x98)));for(const _0x34333f of _0xfea655){const _0x54de3c=_0x2aed6d[_0x4ae759(0x84)](join,_0x138e2f,_0x34333f),_0x1bf4e0=_0x2aed6d[_0x4ae759(0x82)](join,_0x4605b4,_0x34333f);await _0x2aed6d['QpHHN'](copyFile,_0x54de3c,_0x1bf4e0),_0x5e48fc[_0x4ae759(0xa4)](_0x34333f);}_0x5e9246=await _0x2aed6d['cNEAT'](readFile,join(_0x138e2f,_0x4ae759(0x9b)),_0x4ae759(0x7d));}else{_0x5e9246=await readFile(_0x158889,_0x2aed6d['cddLv']);const _0x39e6c0=join(_0x4605b4,'SKILL.md');await writeFile(_0x39e6c0,_0x5e9246,_0x4ae759(0x7d)),_0x5e48fc['push']('SKILL.md');}const {name:_0x494546}=_0x2aed6d[_0x4ae759(0xa0)](parseFrontmatter,_0x5e9246);return console[_0x4ae759(0x9d)](_0x4ae759(0x85)+_0x494546),console['log'](_0x4ae759(0x9e)+_0x4605b4),_0x5e48fc[_0x4ae759(0x89)]>0x1&&console[_0x4ae759(0x9d)](_0x4ae759(0xa2)+_0x5e48fc[_0x4ae759(0x88)](',\x20')),logLocalAgentInstallation(_0x2348c6,{'skillDisplayName':_0x494546,'installLevel':level},_0x3a6f58)[_0x4ae759(0xa6)](()=>{}),!![];}function getSourceSkillsDir(){const _0x339dc0=_0x539de8,_0x2dc4c6={'JGGck':function(_0x5d9567,_0x1f94cc,_0x2817ea,_0x4e42b7,_0x120ed5){return _0x5d9567(_0x1f94cc,_0x2817ea,_0x4e42b7,_0x120ed5);},'TDnIA':_0x339dc0(0x86),'oEULj':function(_0x58251d,_0x38cc49,_0x40459e,_0x5d7e68,_0x30f9ab,_0x5f405c){return _0x58251d(_0x38cc49,_0x40459e,_0x5d7e68,_0x30f9ab,_0x5f405c);},'RSAZQ':function(_0x217fd0,_0x54bf9c){return _0x217fd0(_0x54bf9c);}},_0x23a770=[_0x2dc4c6[_0x339dc0(0x9c)](join,__dirname,'..','..',_0x2dc4c6['TDnIA']),_0x2dc4c6[_0x339dc0(0x8f)](join,__dirname,'..','..','..',_0x2dc4c6[_0x339dc0(0x87)])];for(const _0x453f05 of _0x23a770){if(_0x2dc4c6[_0x339dc0(0x92)](existsSync,_0x453f05))return _0x453f05;}return _0x23a770[0x0];}function parseFrontmatter(_0x50d9ce){const _0xa75297=_0x539de8,_0x5778fd=_0x50d9ce['match'](/^---\n([\s\S]+?)\n---/);if(!_0x5778fd)throw new Error(_0xa75297(0xa3));const _0x4147b6=_0x5778fd[0x1],_0x259bf7=_0x4147b6['match'](/name:\s*(.+)/),_0x3ca6fb=_0x4147b6[_0xa75297(0x7f)](/description:\s*"?(.+?)"?\n/);return{'name':_0x259bf7?.[0x1][_0xa75297(0x7c)]()||'','description':_0x3ca6fb?.[0x1][_0xa75297(0x7c)]()||''};}export async function removeSkill(_0x52ab72,_0x3125ac){const _0x308ab6=_0x539de8,_0x5a92dc={'reYzo':function(_0x468fd9,_0x448707,_0x5ce294){return _0x468fd9(_0x448707,_0x5ce294);}},_0x31eb02=getSkillsDir(_0x3125ac),_0x25a840=join(_0x31eb02,_0x52ab72);if(!existsSync(_0x25a840))return![];try{return await _0x5a92dc[_0x308ab6(0x8e)](rm,_0x25a840,{'recursive':!![]}),console[_0x308ab6(0x9d)]('\x20\x20Removed\x20deprecated\x20skill:\x20'+_0x52ab72),!![];}catch{return console['warn'](_0x308ab6(0x91)+_0x52ab72),![];}}
|