@ranger-testing/ranger-cli 3.1.6-alpha.4de822b-51 → 3.1.6-alpha.aca5f9c-53
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/build/skills/ranger/SKILL.md +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x4a20db,_0x3ba643){const _0x57abf8=_0x2921,_0x2dceb3=_0x4a20db();while(!![]){try{const _0x50ed3a=parseInt(_0x57abf8(0x18a))/0x1*(parseInt(_0x57abf8(0x179))/0x2)+-parseInt(_0x57abf8(0x190))/0x3+-parseInt(_0x57abf8(0x1a1))/0x4*(parseInt(_0x57abf8(0x1a8))/0x5)+parseInt(_0x57abf8(0x196))/0x6+-parseInt(_0x57abf8(0x194))/0x7*(-parseInt(_0x57abf8(0x1a5))/0x8)+-parseInt(_0x57abf8(0x189))/0x9*(parseInt(_0x57abf8(0x1b3))/0xa)+parseInt(_0x57abf8(0x19c))/0xb*(parseInt(_0x57abf8(0x1b2))/0xc);if(_0x50ed3a===_0x3ba643)break;else _0x2dceb3['push'](_0x2dceb3['shift']());}catch(_0x45b74c){_0x2dceb3['push'](_0x2dceb3['shift']());}}}(_0x13e4,0x573ac));import{existsSync}from'fs';function _0x2921(_0x2560f4,_0x36b1a6){_0x2560f4=_0x2560f4-0x177;const _0x13e408=_0x13e4();let _0x2921b5=_0x13e408[_0x2560f4];return _0x2921b5;}import _0x23e111 from'inquirer';import{ApiError,fetchAuthConfig,fetchCloudProfile,listCloudProfiles,resolveAdHocProfile,resolveCloudProfileSession}from'./cloudProfile.js';import{isInteractive,resolveAuthEnvironmentLocally}from'./cloudProfileSession.js';function _0x13e4(){const _0x31fea6=['domains','373284XHUoZq','local','\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one,\x20or\x0a','log','startPath','Rdexr','584364MaxRIW','dAidO','\x20does\x20not\x20exist.','\x20to\x20override.','llZRH','69524HAFvlb','\x22\x20not\x20found.\x20Run:\x20ranger\x20profile\x20add\x20','eBEKY','envBaseUrl','32yFGusM','telemetry','\x22\x20is\x20ignored\x20when\x20--profile\x20is\x20set;\x20the\x20profile\x27s\x20own\x20auth\x20environment\x20applies.','180XoHAmY','cdpEndpoint','name','\x20baseUrl\x20<url>','YCXfH','`\x20to\x20recreate\x20it.','No\x20baseUrl\x20configured\x20for\x20profile\x20\x22','HEpAS','XSxLp','status','96xWiLBD','27110xrLaAw','ASOar','\x20\x20Warning:\x20','780226LicNNt','bhBXi','\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20once,\x20or\x0a','`ranger\x20profile\x20add`\x20to\x20create\x20one.','cloud','cwd','key','authEnv','\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20<name>`\x20to\x20create\x20a\x20new\x20one.','env','\x22\x20no\x20longer\x20exists\x20(or\x20could\x20not\x20be\x20fetched).\x20Options:\x0a','fTPOJ','baseUrl','\x22\x20instead\x20of\x20the\x20saved\x20active\x20profile\x20\x22','authPath','Profile\x20\x22','693LBYElq','1PPgQlU','RANGER_SESSION_STATE_PATH=','\x20\x20(pass\x20--profile\x20<name>\x20to\x20pin,\x20or\x20RANGER_TEST_USERNAME=...\x20to\x20materialize\x20a\x20new\x20one)','profile','cncgP','RANGER_TEST_USERNAME','852828gSKyay','KzmfT','RANGER_SESSION_STATE_PATH','TIaRI','1047746uBKAsW'];_0x13e4=function(){return _0x31fea6;};return _0x13e4();}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(_0x1def7d){const _0x56acf1=_0x2921,_0x300f12={'fTPOJ':function(_0x5a7288,_0x58a427){return _0x5a7288 instanceof _0x58a427;},'ASOar':function(_0x5ee493){return _0x5ee493();},'XHebW':function(_0x26b2ce,_0xffb378){return _0x26b2ce+_0xffb378;},'eBEKY':function(_0x3e5de3,_0x43589a){return _0x3e5de3+_0x43589a;},'qFQxA':_0x56acf1(0x198),'kEiRx':_0x56acf1(0x181),'QYWfo':function(_0x59c798,_0x443178){return _0x59c798(_0x443178);},'dAidO':function(_0x24a4ab,_0x13fe79){return _0x24a4ab(_0x13fe79);},'HmbkS':function(_0x4756af,_0x5a32fe){return _0x4756af instanceof _0x5a32fe;},'XSxLp':function(_0x20e95f,_0x18bad1){return _0x20e95f+_0x18bad1;},'HEpAS':'\x20\x20Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20','nJwVu':function(_0x1762d5,_0x30b911){return _0x1762d5&&_0x30b911;},'llZRH':'list','YCXfH':'source','SaPDT':'Cloud\x20profile\x20(recommended)','DErDO':_0x56acf1(0x17d),'KzmfT':_0x56acf1(0x197),'bhBXi':function(_0x1264d1,_0x13f40d){return _0x1264d1(_0x13f40d);},'hWQil':function(_0x56e629){return _0x56e629();},'OySco':function(_0x36a805,_0x339020){return _0x36a805??_0x339020;},'zoYRM':function(_0x61defd){return _0x61defd();},'nFvzt':function(_0x4c17ab,_0x59d056,_0x63d12b){return _0x4c17ab(_0x59d056,_0x63d12b);},'ErBhT':function(_0x20a0a7,_0x43ebc2){return _0x20a0a7(_0x43ebc2);},'Rdexr':function(_0x45d24d,_0x2cf74d){return _0x45d24d(_0x2cf74d);},'IbEdg':function(_0x2d5f90,_0x15f757){return _0x2d5f90(_0x15f757);},'cvYJZ':function(_0x17220c,_0x2593ac){return _0x17220c+_0x2593ac;},'cncgP':'\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one\x20ad\x20hoc,\x20or\x0a','Wkldf':function(_0xaf727a,_0x229ab4){return _0xaf727a&&_0x229ab4;}},_0x19cdcf=_0x1def7d[_0x56acf1(0x18d)];let _0x1b6c82=_0x19cdcf,_0x4f236c=null;const _0x24d5de=_0x19cdcf?null:await readActiveProfileName();if(_0x1def7d[_0x56acf1(0x180)]&&_0x19cdcf)console[_0x56acf1(0x199)]('\x20\x20Note:\x20--env\x20\x22'+_0x1def7d[_0x56acf1(0x180)]+_0x56acf1(0x1a7));else _0x1def7d[_0x56acf1(0x180)]&&!process['env'][_0x56acf1(0x18f)]&&console[_0x56acf1(0x199)]('\x20\x20Note:\x20--env\x20\x22'+_0x1def7d['authEnv']+'\x22\x20only\x20affects\x20ad-hoc\x20profile\x20resolution;\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20use\x20it.');if(!_0x19cdcf&&process[_0x56acf1(0x182)][_0x56acf1(0x18f)])try{const _0x30c2cd=await resolveAdHocProfile({'targetUrl':_0x1def7d[_0x56acf1(0x185)]??readUrlEnvVars()[_0x56acf1(0x1a4)],'envKey':_0x1def7d['authEnv']});_0x30c2cd&&(_0x24d5de&&_0x24d5de!==_0x30c2cd['name']&&console[_0x56acf1(0x199)]('\x20\x20RANGER_TEST_USERNAME\x20is\x20set\x20—\x20using\x20profile\x20\x22'+_0x30c2cd[_0x56acf1(0x1aa)]+_0x56acf1(0x186)+_0x24d5de+'\x22.\x20Pass\x20--profile\x20'+_0x24d5de+_0x56acf1(0x19f)),_0x1b6c82=_0x30c2cd['name'],_0x4f236c=_0x30c2cd['profile']);}catch(_0x14316c){if(!_0x24d5de||_0x1def7d[_0x56acf1(0x180)])throw _0x14316c;console[_0x56acf1(0x199)](_0x56acf1(0x178)+(_0x300f12[_0x56acf1(0x184)](_0x14316c,Error)?_0x14316c['message']:String(_0x14316c))),console['log']('\x20\x20Falling\x20back\x20to\x20saved\x20active\x20profile\x20\x22'+_0x24d5de+'\x22.');}if(!_0x1b6c82)_0x1b6c82=_0x24d5de??undefined;if(!_0x1b6c82)try{const _0x50d1b9=await _0x300f12[_0x56acf1(0x177)](listCloudProfiles);if(_0x50d1b9['length']===0x1){const _0x4703f9=_0x50d1b9[0x0];_0x1b6c82=_0x4703f9[_0x56acf1(0x1aa)],console[_0x56acf1(0x199)]('\x0aUsing\x20the\x20only\x20cloud\x20profile\x20for\x20your\x20org:\x20'+_0x4703f9['name']),console[_0x56acf1(0x199)](_0x56acf1(0x18c));}}catch{}if(!_0x1b6c82)throw new Error(_0x300f12['XHebW'](_0x300f12[_0x56acf1(0x1a3)](_0x300f12['eBEKY']('Ranger\x20can\x27t\x20verify\x20with\x20a\x20browser\x20until\x20a\x20profile\x20is\x20set\x20up.\x20Options:\x0a',_0x300f12['qFQxA']),'\x20\x20-\x20pass\x20--profile\x20<name>\x20/\x20set\x20RANGER_PROFILE,\x20or\x0a')+_0x56acf1(0x17b),_0x300f12['kEiRx']));const _0x1bdece=_0x300f12['QYWfo'](getEnvDir,_0x1b6c82),_0x3d0823=_0x300f12[_0x56acf1(0x19d)](existsSync,_0x1bdece);let _0x269f07=_0x4f236c,_0x158514=![];if(!_0x269f07)try{_0x269f07=await fetchCloudProfile(_0x1b6c82);if(!_0x269f07)_0x158514=!![];}catch(_0x3ce108){_0x300f12['HmbkS'](_0x3ce108,ApiError)&&_0x3ce108[_0x56acf1(0x1b1)]===0x194&&(_0x158514=!![]);}if(_0x19cdcf&&_0x158514&&!_0x3d0823&&!_0x269f07)throw new Error(_0x300f12[_0x56acf1(0x1b0)](_0x300f12[_0x56acf1(0x1a3)](_0x56acf1(0x188)+_0x19cdcf+'\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x0a',_0x300f12[_0x56acf1(0x1af)]),_0x56acf1(0x17c)));if(_0x300f12['nJwVu'](_0x269f07,_0x3d0823)){let _0x351252=!![];if(isInteractive()){const {source:_0x186dca}=await _0x23e111['prompt']([{'type':_0x300f12[_0x56acf1(0x1a0)],'name':_0x300f12[_0x56acf1(0x1ac)],'message':_0x56acf1(0x188)+_0x1b6c82+'\x22\x20exists\x20both\x20locally\x20and\x20in\x20the\x20cloud.\x20Which\x20one\x20should\x20be\x20used?','choices':[{'name':_0x300f12['SaPDT'],'value':_0x300f12['DErDO']},{'name':'Local\x20profile','value':_0x300f12[_0x56acf1(0x191)]}],'default':_0x300f12['DErDO']}]);_0x351252=_0x186dca===_0x56acf1(0x17d);}if(!_0x351252)_0x269f07=null;}const _0x368d6e=readProfileOverrides(process[_0x56acf1(0x17e)](),_0x1b6c82);let _0x3c8729=null,_0x2e897f,_0x258142,_0x109731,_0x215bf7,_0x2a6442=null,_0x43c01a,_0x327b1a;const _0x4d5674=_0x300f12[_0x56acf1(0x17a)](expandOverrides,_0x368d6e),_0x1deb6d=_0x300f12['hWQil'](readUrlEnvVars);if(_0x269f07){_0x3c8729=_0x269f07;const _0x4f9970=_0x269f07['settings']??{},_0x1c7f84=mergeCloudProfileSettings(_0x4f9970,_0x300f12['OySco'](_0x368d6e,undefined)),_0x316837={..._0x269f07,'settings':_0x1c7f84};_0x2a6442={'baseUrl':expandString(_0x4f9970['baseUrl']),'startPath':expandString(_0x4f9970['startPath'])};const _0xeb1cd6=await _0x300f12['zoYRM'](fetchAuthConfig),_0x30f05c=_0xeb1cd6?_0x300f12['nFvzt'](resolveAuthEnvironmentLocally,_0xeb1cd6,_0x269f07['environmentKey']):null;_0x43c01a=_0x30f05c?.[_0x56acf1(0x195)]?.[0x0],_0x327b1a=_0x30f05c?.[_0x56acf1(0x17f)];const _0x216f72=resolveProfileUrl({'flagBaseUrl':_0x1def7d['baseUrl'],'flagStartPath':_0x1def7d[_0x56acf1(0x19a)],'envBaseUrl':_0x1deb6d[_0x56acf1(0x1a4)],'envStartPath':_0x1deb6d['envStartPath'],'projectOverrides':_0x4d5674,'cloudSettings':_0x2a6442,'authEnvironmentDomain':_0x43c01a}),_0x4c4918=process['env'][_0x56acf1(0x192)];if(_0x4c4918){if(!_0x300f12['ErBhT'](existsSync,_0x4c4918))throw new Error(_0x56acf1(0x18b)+_0x4c4918+_0x56acf1(0x19e));_0x2e897f=_0x4c4918,_0x258142=_0x300f12['Rdexr'](resolveEnvVars,_0x1c7f84),_0x109731=_0x300f12['IbEdg'](Boolean,_0x258142[_0x56acf1(0x1a9)]);}else{const _0x2a675e=await _0x300f12['nFvzt'](resolveCloudProfileSession,_0x316837,{'effectiveBaseUrl':_0x216f72[_0x56acf1(0x185)],'telemetry':_0x1def7d[_0x56acf1(0x1a6)]});_0x2e897f=_0x2a675e[_0x56acf1(0x187)],_0x258142=resolveEnvVars(_0x2a675e['settings']),_0x109731=Boolean(_0x258142['cdpEndpoint']),_0x43c01a=_0x2a675e['resolvedEnv']?.[_0x56acf1(0x195)]?.[0x0],_0x327b1a=_0x2a675e['resolvedEnv']?.['key'];}}else{if(!_0x3d0823){const _0x2c1c5c=!_0x19cdcf;throw new Error(_0x2c1c5c?_0x300f12['cvYJZ']('Active\x20profile\x20\x22'+_0x1b6c82+_0x56acf1(0x183),'\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20to\x20switch\x20(see\x20`ranger\x20profile\x20ls`),\x20or\x0a')+_0x300f12[_0x56acf1(0x18e)]+('\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20'+_0x1b6c82+_0x56acf1(0x1ad)):'Profile\x20\x22'+_0x1b6c82+_0x56acf1(0x1a2)+_0x1b6c82);}const _0xbb518c=await loadSettings(_0x1b6c82);_0x258142=_0x300f12[_0x56acf1(0x19b)](resolveEnvVars,_0xbb518c),_0x109731=_0x300f12[_0x56acf1(0x17a)](Boolean,_0x258142['cdpEndpoint']),_0x215bf7=_0x258142['baseUrl'];}const _0x1cf9bb=resolveProfileUrl({'flagBaseUrl':_0x1def7d[_0x56acf1(0x185)],'flagStartPath':_0x1def7d[_0x56acf1(0x19a)],'envBaseUrl':_0x1deb6d['envBaseUrl'],'envStartPath':_0x1deb6d['envStartPath'],'localSettingsBaseUrl':_0x215bf7,'projectOverrides':_0x4d5674,'cloudSettings':_0x2a6442,'authEnvironmentDomain':_0x43c01a}),_0x51ddb6=_0x1cf9bb['url']??_0x1cf9bb[_0x56acf1(0x185)];if(_0x300f12['Wkldf'](!_0x51ddb6,!_0x109731))throw new Error(_0x56acf1(0x1ae)+_0x1b6c82+'\x22.\x20Run:\x20ranger\x20profile\x20config\x20set\x20'+_0x1b6c82+_0x56acf1(0x1ab));return{'activeProfile':_0x1b6c82,'resolvedCloudProfile':_0x3c8729,'cloudAuthPath':_0x2e897f,'resolvedSettings':_0x258142,'isCdpMode':_0x109731,'url':_0x51ddb6,'baseUrlSource':_0x1cf9bb['baseUrlSource'],'authEnvKey':_0x327b1a,'startPath':_0x1cf9bb[_0x56acf1(0x19a)]};}function expandString(_0x14003b){const _0x31e5f9=_0x2921,_0x21267c={'DdJoJ':'string','TIaRI':function(_0x3afeb5,_0x4cdec5){return _0x3afeb5(_0x4cdec5);}};if(typeof _0x14003b!==_0x21267c['DdJoJ'])return _0x14003b;return _0x21267c[_0x31e5f9(0x193)](resolveEnvVars,_0x14003b);}function expandOverrides(_0xbf8bdb){const _0x2d1a25=_0x2921,_0x43d24c={'jTfgZ':function(_0x369549,_0x3583a2){return _0x369549===_0x3583a2;}};if(!_0xbf8bdb)return _0xbf8bdb;const _0x53f86f={..._0xbf8bdb};return _0x43d24c['jTfgZ'](typeof _0x53f86f[_0x2d1a25(0x185)],'string')&&(_0x53f86f['baseUrl']=resolveEnvVars(_0x53f86f['baseUrl'])),_0x43d24c['jTfgZ'](typeof _0x53f86f['startPath'],'string')&&(_0x53f86f[_0x2d1a25(0x19a)]=resolveEnvVars(_0x53f86f['startPath'])),_0x53f86f;}
|
|
1
|
+
(function(_0x2bac2d,_0x6de1e1){const _0xa2c6ff=_0x5766,_0x4b04e0=_0x2bac2d();while(!![]){try{const _0x14fd02=parseInt(_0xa2c6ff(0x1c4))/0x1*(-parseInt(_0xa2c6ff(0x1e2))/0x2)+parseInt(_0xa2c6ff(0x1db))/0x3*(parseInt(_0xa2c6ff(0x1bd))/0x4)+parseInt(_0xa2c6ff(0x1e5))/0x5+-parseInt(_0xa2c6ff(0x1d3))/0x6*(-parseInt(_0xa2c6ff(0x1d7))/0x7)+-parseInt(_0xa2c6ff(0x1a7))/0x8+parseInt(_0xa2c6ff(0x1b6))/0x9+-parseInt(_0xa2c6ff(0x1da))/0xa;if(_0x14fd02===_0x6de1e1)break;else _0x4b04e0['push'](_0x4b04e0['shift']());}catch(_0x304f06){_0x4b04e0['push'](_0x4b04e0['shift']());}}}(_0xc601,0xdde11));import{existsSync}from'fs';function _0xc601(){const _0x3c7f71=['\x22\x20only\x20affects\x20ad-hoc\x20profile\x20resolution;\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20use\x20it.','log','RANGER_TEST_USERNAME','cCBPf','\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x0a','pfOAC','307117DuUVpt','clDQo','SvDSN','profile','No\x20baseUrl\x20configured\x20for\x20profile\x20\x22','GQjzq','authEnv','\x20to\x20override.','WQyYJ','env','VyPMn','\x22.\x20Pass\x20--profile\x20','tULfA','cloud','\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20<name>`\x20to\x20create\x20a\x20new\x20one.','36132vBvwco','uCMuE','\x22\x20no\x20longer\x20exists\x20(or\x20could\x20not\x20be\x20fetched).\x20Options:\x0a','HLTUg','329iXfCNE','prompt','Cloud\x20profile\x20(recommended)','20102450UDYTQi','1233eLwaBC','baseUrl','vtzCP','\x20baseUrl\x20<url>','aluQm','vayfc','\x22\x20is\x20used\x20as\x20the\x20auth-environment\x20assertion\x20for\x20\x22','2xDHPFv','\x22\x20this\x20run\x20(overrides\x20the\x20profile\x27s\x20pinned\x20env\x20for\x20login).','\x22\x20instead\x20of\x20the\x20saved\x20active\x20profile\x20\x22','6737840SxvWLc','uvemY','\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20once,\x20or\x0a','domains','\x20\x20(pass\x20--profile\x20<name>\x20to\x20pin,\x20or\x20RANGER_TEST_USERNAME=...\x20to\x20materialize\x20a\x20new\x20one)','Ranger\x20can\x27t\x20verify\x20with\x20a\x20browser\x20until\x20a\x20profile\x20is\x20set\x20up.\x20Options:\x0a','name','string','2502696WKndwt','uVzop','envStartPath','PNIjE','`\x20to\x20recreate\x20it.','\x20\x20Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20','\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one\x20ad\x20hoc,\x20or\x0a','\x20\x20-\x20pass\x20--profile\x20<name>\x20/\x20set\x20RANGER_PROFILE,\x20or\x0a','startPath','\x20does\x20not\x20exist.','\x0aUsing\x20the\x20only\x20cloud\x20profile\x20for\x20your\x20org:\x20','WZMUg','\x22\x20not\x20found.\x20Run:\x20ranger\x20profile\x20add\x20','Local\x20profile','\x22\x20exists\x20both\x20locally\x20and\x20in\x20the\x20cloud.\x20Which\x20one\x20should\x20be\x20used?','12378123mqzrJV','list','jCRRR','VehBx','length','key','DRTTb','5188pFYeDJ'];_0xc601=function(){return _0x3c7f71;};return _0xc601();}import _0x3b835f 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(_0x5c2cf2){const _0x3cf38f=_0x5766,_0x517efe={'udhKa':function(_0x55be20,_0x32bdd0){return _0x55be20!==_0x32bdd0;},'uvemY':function(_0xd65434,_0x4f83d5){return _0xd65434??_0x4f83d5;},'kDTOy':function(_0x3eae49,_0x4a21d7){return _0x3eae49+_0x4a21d7;},'gctGz':function(_0x34d2b2,_0x275b2b){return _0x34d2b2+_0x275b2b;},'tULfA':_0x3cf38f(0x1ae),'YVVIt':_0x3cf38f(0x1e7),'pfOAC':function(_0x16b689,_0x43d674){return _0x16b689(_0x43d674);},'HLTUg':function(_0x3df6a6,_0x4424d6){return _0x3df6a6 instanceof _0x4424d6;},'WZMUg':function(_0x18f5eb,_0x3944e1){return _0x18f5eb===_0x3944e1;},'PNIjE':function(_0x23a426,_0x2e66d1){return _0x23a426&&_0x2e66d1;},'SEGKG':function(_0x391d18,_0x42cf4a){return _0x391d18+_0x42cf4a;},'jCRRR':function(_0x435314,_0x5ab133){return _0x435314+_0x5ab133;},'vtzCP':'`ranger\x20profile\x20add`\x20to\x20create\x20one.','WQyYJ':function(_0x31e4eb){return _0x31e4eb();},'aluQm':_0x3cf38f(0x1b7),'DCrGe':_0x3cf38f(0x1d9),'VyPMn':'local','cCBPf':_0x3cf38f(0x1d1),'GQjzq':function(_0x42e0e1,_0x19af80){return _0x42e0e1(_0x19af80);},'KQgDp':function(_0x29a5a2,_0x319fb2,_0x1c1916){return _0x29a5a2(_0x319fb2,_0x1c1916);},'TzfCu':function(_0x30bff8,_0x3e61ad,_0x106d2f){return _0x30bff8(_0x3e61ad,_0x106d2f);},'DRTTb':function(_0x3c8e6c,_0xeb6259){return _0x3c8e6c(_0xeb6259);},'clDQo':function(_0x59caa4,_0x22250d){return _0x59caa4+_0x22250d;},'uCMuE':function(_0x3f0baf,_0x317958){return _0x3f0baf+_0x317958;},'OwpzI':function(_0x46085e,_0x5b3e4c){return _0x46085e+_0x5b3e4c;},'VehBx':_0x3cf38f(0x1ad),'SvDSN':function(_0x3ed7aa,_0x544b1e){return _0x3ed7aa(_0x544b1e);},'uVzop':function(_0x36238c,_0x34a240){return _0x36238c&&_0x34a240;}},_0x515ef5=_0x5c2cf2['profile'];let _0x319a89=_0x515ef5,_0x44f5c8=null;const _0x114aea=_0x515ef5?null:await readActiveProfileName();if(_0x5c2cf2[_0x3cf38f(0x1ca)]&&_0x515ef5)console['log']('\x20\x20Note:\x20--env\x20\x22'+_0x5c2cf2[_0x3cf38f(0x1ca)]+_0x3cf38f(0x1e1)+_0x515ef5+_0x3cf38f(0x1e3));else _0x5c2cf2['authEnv']&&!process[_0x3cf38f(0x1cd)][_0x3cf38f(0x1c0)]&&console[_0x3cf38f(0x1bf)]('\x20\x20Note:\x20--env\x20\x22'+_0x5c2cf2['authEnv']+_0x3cf38f(0x1be));if(!_0x515ef5&&process[_0x3cf38f(0x1cd)][_0x3cf38f(0x1c0)])try{const _0x2fa2c6=await resolveAdHocProfile({'targetUrl':_0x5c2cf2[_0x3cf38f(0x1dc)]??readUrlEnvVars()['envBaseUrl'],'envKey':_0x5c2cf2['authEnv']});_0x2fa2c6&&(_0x114aea&&_0x517efe['udhKa'](_0x114aea,_0x2fa2c6[_0x3cf38f(0x1a5)])&&console[_0x3cf38f(0x1bf)]('\x20\x20RANGER_TEST_USERNAME\x20is\x20set\x20—\x20using\x20profile\x20\x22'+_0x2fa2c6['name']+_0x3cf38f(0x1e4)+_0x114aea+_0x3cf38f(0x1cf)+_0x114aea+_0x3cf38f(0x1cb)),_0x319a89=_0x2fa2c6[_0x3cf38f(0x1a5)],_0x44f5c8=_0x2fa2c6[_0x3cf38f(0x1c7)]);}catch(_0x5c0907){if(!_0x114aea||_0x5c2cf2['authEnv'])throw _0x5c0907;console['log']('\x20\x20Warning:\x20'+(_0x5c0907 instanceof Error?_0x5c0907['message']:String(_0x5c0907))),console['log']('\x20\x20Falling\x20back\x20to\x20saved\x20active\x20profile\x20\x22'+_0x114aea+'\x22.');}if(!_0x319a89)_0x319a89=_0x517efe[_0x3cf38f(0x1e6)](_0x114aea,undefined);if(!_0x319a89)try{const _0x3fde9c=await listCloudProfiles();if(_0x3fde9c[_0x3cf38f(0x1ba)]===0x1){const _0x4bfb80=_0x3fde9c[0x0];_0x319a89=_0x4bfb80['name'],console[_0x3cf38f(0x1bf)](_0x3cf38f(0x1b1)+_0x4bfb80[_0x3cf38f(0x1a5)]),console['log'](_0x3cf38f(0x1e9));}}catch{}if(!_0x319a89)throw new Error(_0x517efe['kDTOy'](_0x517efe['gctGz'](_0x517efe['gctGz'](_0x3cf38f(0x1a4),'\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one,\x20or\x0a')+_0x517efe[_0x3cf38f(0x1d0)],_0x517efe['YVVIt']),_0x3cf38f(0x1d2)));const _0x456bac=_0x517efe['pfOAC'](getEnvDir,_0x319a89),_0x210795=_0x517efe['pfOAC'](existsSync,_0x456bac);let _0x53114c=_0x44f5c8,_0x26cecb=![];if(!_0x53114c)try{_0x53114c=await fetchCloudProfile(_0x319a89);if(!_0x53114c)_0x26cecb=!![];}catch(_0x15b438){_0x517efe[_0x3cf38f(0x1d6)](_0x15b438,ApiError)&&_0x517efe[_0x3cf38f(0x1b2)](_0x15b438['status'],0x194)&&(_0x26cecb=!![]);}if(_0x517efe[_0x3cf38f(0x1aa)](_0x515ef5,_0x26cecb)&&!_0x210795&&!_0x53114c)throw new Error(_0x517efe['SEGKG'](_0x517efe[_0x3cf38f(0x1b8)]('Profile\x20\x22'+_0x515ef5+_0x3cf38f(0x1c2),_0x3cf38f(0x1ac)),_0x517efe[_0x3cf38f(0x1dd)]));if(_0x53114c&&_0x210795){let _0x3cf2ad=!![];if(_0x517efe[_0x3cf38f(0x1cc)](isInteractive)){const {source:_0x2c9727}=await _0x3b835f[_0x3cf38f(0x1d8)]([{'type':_0x517efe[_0x3cf38f(0x1df)],'name':'source','message':'Profile\x20\x22'+_0x319a89+_0x3cf38f(0x1b5),'choices':[{'name':_0x517efe['DCrGe'],'value':'cloud'},{'name':_0x3cf38f(0x1b4),'value':_0x517efe[_0x3cf38f(0x1ce)]}],'default':_0x517efe[_0x3cf38f(0x1c1)]}]);_0x3cf2ad=_0x517efe[_0x3cf38f(0x1b2)](_0x2c9727,_0x517efe[_0x3cf38f(0x1c1)]);}if(!_0x3cf2ad)_0x53114c=null;}const _0x34cd89=readProfileOverrides(process['cwd'](),_0x319a89);let _0x4de318=null,_0x417605,_0x5e7c6d,_0x532aca,_0x7082f6,_0x21b4c5=null,_0x572fe7,_0x50796a;const _0x282f4a=expandOverrides(_0x34cd89),_0x247dd5=readUrlEnvVars();if(_0x53114c){_0x4de318=_0x53114c;const _0x3dfd0b=_0x53114c['settings']??{},_0x2aaba4=mergeCloudProfileSettings(_0x3dfd0b,_0x34cd89??undefined),_0x2c637f={..._0x53114c,'settings':_0x2aaba4};_0x21b4c5={'baseUrl':_0x517efe['pfOAC'](expandString,_0x3dfd0b['baseUrl']),'startPath':_0x517efe['GQjzq'](expandString,_0x3dfd0b['startPath'])};const _0x4b4a40=await _0x517efe[_0x3cf38f(0x1cc)](fetchAuthConfig),_0x5529b1=_0x4b4a40?_0x517efe['KQgDp'](resolveAuthEnvironmentLocally,_0x4b4a40,_0x53114c['environmentKey']):null;_0x572fe7=_0x5529b1?.['domains']?.[0x0],_0x50796a=_0x5529b1?.['key'];const _0xb10b1e=resolveProfileUrl({'flagBaseUrl':_0x5c2cf2['baseUrl'],'flagStartPath':_0x5c2cf2[_0x3cf38f(0x1af)],'envBaseUrl':_0x247dd5['envBaseUrl'],'envStartPath':_0x247dd5[_0x3cf38f(0x1a9)],'projectOverrides':_0x282f4a,'cloudSettings':_0x21b4c5,'authEnvironmentDomain':_0x572fe7}),_0x37b1fd=process['env']['RANGER_SESSION_STATE_PATH'];if(_0x37b1fd){if(!existsSync(_0x37b1fd))throw new Error('RANGER_SESSION_STATE_PATH='+_0x37b1fd+_0x3cf38f(0x1b0));_0x417605=_0x37b1fd,_0x5e7c6d=_0x517efe[_0x3cf38f(0x1c9)](resolveEnvVars,_0x2aaba4),_0x532aca=Boolean(_0x5e7c6d['cdpEndpoint']);}else{const _0x47fd0f=await _0x517efe['TzfCu'](resolveCloudProfileSession,_0x2c637f,{'effectiveBaseUrl':_0xb10b1e['baseUrl'],'telemetry':_0x5c2cf2['telemetry'],'assertedEnv':_0x5c2cf2['authEnv']});_0x417605=_0x47fd0f['authPath'],_0x5e7c6d=_0x517efe['DRTTb'](resolveEnvVars,_0x47fd0f['settings']),_0x532aca=Boolean(_0x5e7c6d['cdpEndpoint']),_0x572fe7=_0x47fd0f['resolvedEnv']?.[_0x3cf38f(0x1e8)]?.[0x0],_0x50796a=_0x47fd0f['resolvedEnv']?.[_0x3cf38f(0x1bb)];}}else{if(!_0x210795){const _0x4d7e8f=!_0x515ef5;throw new Error(_0x4d7e8f?_0x517efe[_0x3cf38f(0x1c5)](_0x517efe[_0x3cf38f(0x1d4)](_0x517efe['OwpzI']('Active\x20profile\x20\x22'+_0x319a89+_0x3cf38f(0x1d5),'\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20to\x20switch\x20(see\x20`ranger\x20profile\x20ls`),\x20or\x0a'),_0x517efe[_0x3cf38f(0x1b9)]),'\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20'+_0x319a89+_0x3cf38f(0x1ab)):'Profile\x20\x22'+_0x319a89+_0x3cf38f(0x1b3)+_0x319a89);}const _0xbcc97f=await loadSettings(_0x319a89);_0x5e7c6d=_0x517efe[_0x3cf38f(0x1bc)](resolveEnvVars,_0xbcc97f),_0x532aca=_0x517efe[_0x3cf38f(0x1c3)](Boolean,_0x5e7c6d['cdpEndpoint']),_0x7082f6=_0x5e7c6d['baseUrl'];}const _0x126296=_0x517efe[_0x3cf38f(0x1c6)](resolveProfileUrl,{'flagBaseUrl':_0x5c2cf2[_0x3cf38f(0x1dc)],'flagStartPath':_0x5c2cf2['startPath'],'envBaseUrl':_0x247dd5['envBaseUrl'],'envStartPath':_0x247dd5[_0x3cf38f(0x1a9)],'localSettingsBaseUrl':_0x7082f6,'projectOverrides':_0x282f4a,'cloudSettings':_0x21b4c5,'authEnvironmentDomain':_0x572fe7}),_0xbb9150=_0x126296['url']??_0x126296['baseUrl'];if(_0x517efe[_0x3cf38f(0x1a8)](!_0xbb9150,!_0x532aca))throw new Error(_0x3cf38f(0x1c8)+_0x319a89+'\x22.\x20Run:\x20ranger\x20profile\x20config\x20set\x20'+_0x319a89+_0x3cf38f(0x1de));return{'activeProfile':_0x319a89,'resolvedCloudProfile':_0x4de318,'cloudAuthPath':_0x417605,'resolvedSettings':_0x5e7c6d,'isCdpMode':_0x532aca,'url':_0xbb9150,'baseUrlSource':_0x126296['baseUrlSource'],'authEnvKey':_0x50796a,'startPath':_0x126296[_0x3cf38f(0x1af)]};}function _0x5766(_0x3fafb4,_0xe308bc){_0x3fafb4=_0x3fafb4-0x1a4;const _0xc6014a=_0xc601();let _0x576680=_0xc6014a[_0x3fafb4];return _0x576680;}function expandString(_0x4186a8){const _0x8d1560=_0x5766,_0x5af598={'NlhnS':function(_0x4fa6de,_0x5cbca4){return _0x4fa6de(_0x5cbca4);}};if(typeof _0x4186a8!==_0x8d1560(0x1a6))return _0x4186a8;return _0x5af598['NlhnS'](resolveEnvVars,_0x4186a8);}function expandOverrides(_0x5e3f01){const _0x3c891e=_0x5766,_0x5c9b36={'IuGYP':function(_0x36d353,_0x5a4012){return _0x36d353(_0x5a4012);},'vayfc':_0x3c891e(0x1a6)};if(!_0x5e3f01)return _0x5e3f01;const _0x2961d4={..._0x5e3f01};return typeof _0x2961d4[_0x3c891e(0x1dc)]==='string'&&(_0x2961d4[_0x3c891e(0x1dc)]=_0x5c9b36['IuGYP'](resolveEnvVars,_0x2961d4[_0x3c891e(0x1dc)])),typeof _0x2961d4['startPath']===_0x5c9b36[_0x3c891e(0x1e0)]&&(_0x2961d4['startPath']=resolveEnvVars(_0x2961d4['startPath'])),_0x2961d4;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function _0x8f87(){const _0xd5c64d=['auth\x20environment\x20domain','endsWith','2624778BIlRyU','slice','1736dJLnNP','string','2562216RXgBCj','cloud\x20profile\x20settings','startsWith','1GknMRQ','40656AxQaIy','4rXTYni','13677048fBosRA','11303150QnAipR','flagStartPath','startPath','8269440OjhNuz','projects.json\x20override','--base-url','uUtLV','RANGER_START_PATH','1955082kqxUFY','cloudSettings','11ZTzGJN','projectOverrides','test','CGfCH','baseUrl','HTTCg'];_0x8f87=function(){return _0xd5c64d;};return _0x8f87();}function _0x40ea(_0x1f7745,_0x3f4ac9){_0x1f7745=_0x1f7745-0x141;const _0x8f87b3=_0x8f87();let _0x40ea7e=_0x8f87b3[_0x1f7745];return _0x40ea7e;}(function(_0x54fde0,_0x513741){const _0x106a51=_0x40ea,_0x17e036=_0x54fde0();while(!![]){try{const _0x46d07a=parseInt(_0x106a51(0x144))/0x1*(parseInt(_0x106a51(0x150))/0x2)+parseInt(_0x106a51(0x141))/0x3*(-parseInt(_0x106a51(0x146))/0x4)+parseInt(_0x106a51(0x14b))/0x5+-parseInt(_0x106a51(0x145))/0x6*(-parseInt(_0x106a51(0x15c))/0x7)+-parseInt(_0x106a51(0x147))/0x8+parseInt(_0x106a51(0x15a))/0x9+-parseInt(_0x106a51(0x148))/0xa*(parseInt(_0x106a51(0x152))/0xb);if(_0x46d07a===_0x513741)break;else _0x17e036['push'](_0x17e036['shift']());}catch(_0x272e2d){_0x17e036['push'](_0x17e036['shift']());}}}(_0x8f87,0xde0bd));function firstDefined(..._0x3c06eb){const _0x1d7210={'sYXKe':function(_0x57eade,_0x42177b){return _0x57eade!==_0x42177b;}};for(const _0x110b12 of _0x3c06eb){if(_0x1d7210['sYXKe'](_0x110b12,undefined)&&_0x1d7210['sYXKe'](_0x110b12,null)&&_0x110b12!=='')return _0x110b12;}return undefined;}function normalizeAuthEnvironmentDomain(_0x3b5499){const _0x1dea03=_0x40ea;if(!_0x3b5499)return undefined;if(/^[a-z][a-z0-9+.-]*:\/\//i[_0x1dea03(0x154)](_0x3b5499))return _0x3b5499;return'https://'+_0x3b5499;}export function resolveBaseUrlWithSource(_0x57d925){const _0x267983=_0x40ea,_0x999c6b={'tzsmM':function(_0x2bed16,_0x50a725){return _0x2bed16 in _0x50a725;},'aHoOT':function(_0x3c0017,_0xf0795f){return _0x3c0017===_0xf0795f;},'CGfCH':_0x267983(0x14d),'aGQxN':'local\x20profile\x20settings','sTpgO':function(_0x554dff,_0xd619bb){return _0x554dff===_0xd619bb;},'WSyFc':_0x267983(0x15d),'uUtLV':function(_0x41ac91,_0x183fdc){return _0x41ac91!==_0x183fdc;}},_0x545622=_0x57d925['projectOverrides'],_0xe3496a=!!_0x545622&&_0x999c6b['tzsmM']('baseUrl',_0x545622),_0x15d747=_0x545622?.[_0x267983(0x156)],_0x2080b8=!(_0xe3496a&&_0x999c6b['aHoOT'](_0x15d747,null)),_0x18fb29=[[_0x57d925['flagBaseUrl'],_0x999c6b[_0x267983(0x155)]],[_0x57d925['envBaseUrl'],'RANGER_BASE_URL'],[_0x57d925['localSettingsBaseUrl'],_0x999c6b['aGQxN']],[_0x999c6b['sTpgO'](typeof _0x15d747,_0x999c6b['WSyFc'])?_0x15d747:undefined,_0x267983(0x14c)],[_0x2080b8?_0x57d925['cloudSettings']?.['baseUrl']:undefined,_0x267983(0x142)],[_0x2080b8?normalizeAuthEnvironmentDomain(_0x57d925['authEnvironmentDomain']):undefined,_0x267983(0x158)]];for(const [_0x5f19bd,_0x44e40d]of _0x18fb29){if(_0x999c6b[_0x267983(0x14e)](_0x5f19bd,undefined)&&_0x999c6b['uUtLV'](_0x5f19bd,null)&&_0x5f19bd!=='')return{'baseUrl':_0x5f19bd,'source':_0x44e40d};}return{};}export function resolveBaseUrl(_0x1db143){const _0x525bb4=_0x40ea;return resolveBaseUrlWithSource(_0x1db143)[_0x525bb4(0x156)];}export function resolveStartPath(_0x44825a){const _0x2c4e73=_0x40ea,_0x3d35fc={'HTTCg':function(_0x2c37cb,_0x3194b7){return _0x2c37cb===_0x3194b7;}},_0x45edaa=_0x44825a[_0x2c4e73(0x153)],_0x442832=!!_0x45edaa&&'startPath'in _0x45edaa,_0x3e0117=_0x45edaa?.['startPath'],_0x6e9c9=!(_0x442832&&_0x3e0117===null);return firstDefined(_0x44825a[_0x2c4e73(0x149)],_0x44825a['envStartPath'],_0x3d35fc[_0x2c4e73(0x157)](typeof _0x3e0117,'string')?_0x3e0117:undefined,_0x6e9c9?_0x44825a[_0x2c4e73(0x151)]?.[_0x2c4e73(0x14a)]:undefined);}export function joinBaseAndPath(_0x151a0b,_0x3cda7e){const _0x9ca8a9=_0x40ea,_0x594568={'bSpYr':function(_0x48d597,_0x802e52){return _0x48d597+_0x802e52;}};if(!_0x151a0b)return undefined;if(!_0x3cda7e)return _0x151a0b;const _0x153dd7=_0x151a0b[_0x9ca8a9(0x159)]('/')?_0x151a0b[_0x9ca8a9(0x15b)](0x0,-0x1):_0x151a0b,_0x5777b3=_0x3cda7e[_0x9ca8a9(0x143)]('/')?_0x3cda7e:'/'+_0x3cda7e;return _0x594568['bSpYr'](_0x153dd7,_0x5777b3);}export function resolveProfileUrl(_0x178099){const _0x7b8381={'GqsHv':function(_0x1e2456,_0xfc0e5b){return _0x1e2456(_0xfc0e5b);}},{baseUrl:_0x58df19,source:_0x43e8df}=_0x7b8381['GqsHv'](resolveBaseUrlWithSource,_0x178099),_0x59002d=resolveStartPath(_0x178099);return{'baseUrl':_0x58df19,'baseUrlSource':_0x43e8df,'startPath':_0x59002d,'url':joinBaseAndPath(_0x58df19,_0x59002d)};}export function readUrlEnvVars(_0x541d37=process['env']){const _0x1b1bc0=_0x40ea;return{'envBaseUrl':_0x541d37['RANGER_BASE_URL'],'envStartPath':_0x541d37[_0x1b1bc0(0x14f)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0xee7c(){const _0x1278aa=['maxRetries','pow','3fiAAvJ','85279UEzdpx','),\x20retrying\x20in\x20','67212QfHSXf','5851678dKhALa','error','5696526YKjlkX','20YRbchA','30015gxwiar','351szHlDJ','426ZXsqid','3496qqOWDg','4394224wltfKm','tMYrG','2JQLsMr','180sCWtkZ','IouGT'];_0xee7c=function(){return _0x1278aa;};return _0xee7c();}function _0x1ead(_0x18da5f,_0x513f38){_0x18da5f=_0x18da5f-0x180;const _0xee7c09=_0xee7c();let _0x1eadc0=_0xee7c09[_0x18da5f];return _0x1eadc0;}(function(_0xa44cdd,_0x49217f){const _0x400091=_0x1ead,_0x36450c=_0xa44cdd();while(!![]){try{const _0x1d0a5c=parseInt(_0x400091(0x182))/0x1*(-parseInt(_0x400091(0x18f))/0x2)+-parseInt(_0x400091(0x181))/0x3*(-parseInt(_0x400091(0x18d))/0x4)+-parseInt(_0x400091(0x189))/0x5*(parseInt(_0x400091(0x18b))/0x6)+-parseInt(_0x400091(0x185))/0x7+parseInt(_0x400091(0x18c))/0x8*(parseInt(_0x400091(0x190))/0x9)+parseInt(_0x400091(0x188))/0xa*(parseInt(_0x400091(0x187))/0xb)+-parseInt(_0x400091(0x184))/0xc*(parseInt(_0x400091(0x18a))/0xd);if(_0x1d0a5c===_0x49217f)break;else _0x36450c['push'](_0x36450c['shift']());}catch(_0x5ee836){_0x36450c['push'](_0x36450c['shift']());}}}(_0xee7c,0x9d503));const DEFAULT_MAX_RETRIES=0x3,DEFAULT_BASE_DELAY_MS=0x1f4;export async function withRetry(_0x587abc,_0xa065c7){const _0x32d98c=_0x1ead,_0x2219e5={'IouGT':function(_0x2c3692,_0x37d3c0){return _0x2c3692<=_0x37d3c0;},'LFfuW':function(_0x2a6b10){return _0x2a6b10();},'ezZOe':function(_0x24ad7f,_0x4893dc){return _0x24ad7f instanceof _0x4893dc;},'tMYrG':function(_0x1e8ce6,_0x57b122){return _0x1e8ce6*_0x57b122;}},_0x9cf8cd=_0xa065c7?.[_0x32d98c(0x192)]??DEFAULT_MAX_RETRIES,_0x237160=_0xa065c7?.['baseDelayMs']??DEFAULT_BASE_DELAY_MS;let _0x552faa;for(let _0x21508b=0x0;_0x2219e5[_0x32d98c(0x191)](_0x21508b,_0x9cf8cd);_0x21508b++){try{return await _0x2219e5['LFfuW'](_0x587abc);}catch(_0x272ab3){_0x552faa=_0x2219e5['ezZOe'](_0x272ab3,Error)?_0x272ab3:new Error(String(_0x272ab3));if(_0x21508b<_0x9cf8cd){const _0x2b300c=_0x2219e5[_0x32d98c(0x18e)](_0x237160,Math[_0x32d98c(0x180)](0x2,_0x21508b));_0xa065c7?.['label']&&console[_0x32d98c(0x186)](_0xa065c7['label']+'\x20failed\x20(attempt\x20'+(_0x21508b+0x1)+'/'+(_0x9cf8cd+0x1)+_0x32d98c(0x183)+_0x2b300c+'ms...'),await new Promise(_0x3c5e33=>setTimeout(_0x3c5e33,_0x2b300c));}}}throw _0x552faa;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2213ee,_0xad16a7){const _0x6ba0a=_0x22e5,_0x3f7d1c=_0x2213ee();while(!![]){try{const _0x5485dc=-parseInt(_0x6ba0a(0x17a))/0x1+parseInt(_0x6ba0a(0x17b))/0x2*(-parseInt(_0x6ba0a(0x179))/0x3)+-parseInt(_0x6ba0a(0x180))/0x4+parseInt(_0x6ba0a(0x177))/0x5*(-parseInt(_0x6ba0a(0x17f))/0x6)+-parseInt(_0x6ba0a(0x178))/0x7+-parseInt(_0x6ba0a(0x17d))/0x8*(-parseInt(_0x6ba0a(0x176))/0x9)+parseInt(_0x6ba0a(0x17c))/0xa;if(_0x5485dc===_0xad16a7)break;else _0x3f7d1c['push'](_0x3f7d1c['shift']());}catch(_0x5d51d3){_0x3f7d1c['push'](_0x3f7d1c['shift']());}}}(_0x1660,0xce5bc));const ABSOLUTE_URL_PATTERN=/https?:\/\/[^\s"'<>()\[\]]+/gi;export function extractUrlOrigins(_0x160102){const _0x368883=_0x22e5,_0xa23e12=new Set();for(const _0xeef57a of _0x160102['matchAll'](ABSOLUTE_URL_PATTERN)){const _0x7d8a34=_0xeef57a[0x0]['replace'](/[.,;:!?]+$/,'');try{_0xa23e12[_0x368883(0x17e)](new URL(_0x7d8a34)['origin']);}catch{}}return[..._0xa23e12];}function _0x1660(){const _0x23e326=['888979YjdLaI','2iFNmzj','48975770aXVKKI','206344IwkiPL','add','5020662DKpANT','5989188xMXZbZ','filter','396CozwHs','10NFNJJf','4452441OAnWXa','1473996avbQSV'];_0x1660=function(){return _0x23e326;};return _0x1660();}function _0x22e5(_0x5edd45,_0x5433a6){_0x5edd45=_0x5edd45-0x176;const _0x1660fa=_0x1660();let _0x22e5f4=_0x1660fa[_0x5edd45];return _0x22e5f4;}export function findScenarioOriginMismatches(_0x48c23f,_0xcc527f){const _0x544c2c=_0x22e5;let _0x58f2a9;try{_0x58f2a9=new URL(_0xcc527f)['origin'];}catch{return[];}return extractUrlOrigins(_0x48c23f)[_0x544c2c(0x181)](_0x31243e=>_0x31243e!==_0x58f2a9);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x2b10aa=_0x5e71;(function(_0x3a40cf,_0x3774ca){const _0x1634b8=_0x5e71,_0x296292=_0x3a40cf();while(!![]){try{const _0x5b1df2=parseInt(_0x1634b8(0x1bd))/0x1+-parseInt(_0x1634b8(0x19a))/0x2+-parseInt(_0x1634b8(0x199))/0x3*(parseInt(_0x1634b8(0x191))/0x4)+parseInt(_0x1634b8(0x1be))/0x5+parseInt(_0x1634b8(0x1b6))/0x6+parseInt(_0x1634b8(0x19d))/0x7*(parseInt(_0x1634b8(0x19e))/0x8)+parseInt(_0x1634b8(0x1ae))/0x9*(-parseInt(_0x1634b8(0x1bf))/0xa);if(_0x5b1df2===_0x3774ca)break;else _0x296292['push'](_0x296292['shift']());}catch(_0x513745){_0x296292['push'](_0x296292['shift']());}}}(_0xdbd3,0x8848c));import*as _0x20f1c2 from'fs';import*as _0x241b89 from'path';function _0x5e71(_0x16aaec,_0x48a433){_0x16aaec=_0x16aaec-0x18f;const _0xdbd383=_0xdbd3();let _0x5e71e4=_0xdbd383[_0x16aaec];return _0x5e71e4;}import*as _0x4d4a8a from'os';import{execSync}from'child_process';const CACHE_FILE=_0x241b89['join'](_0x4d4a8a[_0x2b10aa(0x1b7)](),'.claude','.ranger_cache.json');function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0x32a95a=_0x2b10aa,_0x32c51f={'dnDLx':'utf-8','tpQEv':function(_0x4fd4e8){return _0x4fd4e8();}};try{if(_0x20f1c2[_0x32a95a(0x1a5)](CACHE_FILE)){const _0x6288c7=JSON[_0x32a95a(0x1b3)](_0x20f1c2[_0x32a95a(0x1b5)](CACHE_FILE,_0x32c51f['dnDLx']));return{'version':0x3,'sessions':_0x6288c7['sessions']||{},'branches':_0x6288c7['branches']||{},'lastEnabledSessionClearedAt':_0x6288c7[_0x32a95a(0x1ad)]};}}catch{}return _0x32c51f[_0x32a95a(0x1a0)](createEmptyCache);}function saveCache(_0x16aa27){const _0x3f0463=_0x2b10aa;try{const _0x310ab9=_0x241b89['dirname'](CACHE_FILE);!_0x20f1c2[_0x3f0463(0x1a5)](_0x310ab9)&&_0x20f1c2[_0x3f0463(0x1a8)](_0x310ab9,{'recursive':!![]}),_0x20f1c2[_0x3f0463(0x1c0)](CACHE_FILE,JSON[_0x3f0463(0x195)](_0x16aa27,null,0x2));}catch{}}export function getCurrentBranch(){const _0x2b87bc=_0x2b10aa,_0x5cb8a8={'XbNkG':'git\x20rev-parse\x20--abbrev-ref\x20HEAD','inITI':'utf-8','aOqVs':'pipe'};try{const _0xe10f31=execSync(_0x5cb8a8[_0x2b87bc(0x1bc)],{'encoding':_0x5cb8a8[_0x2b87bc(0x1a9)],'stdio':[_0x2b87bc(0x19c),_0x5cb8a8[_0x2b87bc(0x190)],_0x2b87bc(0x19c)]})['trim']();if(!_0xe10f31||_0xe10f31==='HEAD')return null;return _0xe10f31;}catch{return null;}}export function enableBranch(_0x30fc95){const _0x4d6137={'tceCw':function(_0x19a18d){return _0x19a18d();},'mjXjh':function(_0x339fd1,_0x3d5a41){return _0x339fd1(_0x3d5a41);}},_0x35efb2=_0x4d6137['tceCw'](loadCache);_0x35efb2['branches'][_0x30fc95]=!![],_0x4d6137['mjXjh'](saveCache,_0x35efb2);}export function disableBranch(_0x317ca4){const _0x57a29c=_0x2b10aa,_0x178191={'MZACj':function(_0x3c7919){return _0x3c7919();}},_0x341e87=_0x178191['MZACj'](loadCache);delete _0x341e87[_0x57a29c(0x197)][_0x317ca4],saveCache(_0x341e87);}export function isBranchEnabled(_0x29e6ec){const _0x4fa303=_0x2b10aa,_0xa72d6f={'eCAUq':function(_0xa9d800){return _0xa9d800();}},_0x9d374f=_0xa72d6f['eCAUq'](loadCache);return _0x9d374f[_0x4fa303(0x197)][_0x29e6ec]===!![];}function getOrCreateSession(_0x5746e5,_0x17197c){const _0x1df848=_0x2b10aa;return!_0x5746e5['sessions'][_0x17197c]&&(_0x5746e5[_0x1df848(0x1ba)][_0x17197c]={}),_0x5746e5['sessions'][_0x17197c];}function _0xdbd3(){const _0x33ea1c=['VfNiW','26031gKzLDo','67360mTyvqr','EKhVK','pipe','30037mmmPNB','752iaSGNl','NXiGG','tpQEv','yBMGO','YIFgx','uADNN','main','existsSync','dKYjA','jtgPb','mkdirSync','inITI','tJLKX','eiDut','HceGh','lastEnabledSessionClearedAt','36RcXGtj','SaOop','OTGLD','master','UPIlt','parse','prompted','readFileSync','3398616KlSUsB','homedir','featureId','clear','sessions','currentBranch','XbNkG','637152rjdLNC','4085715IKxHDM','4298460hRALIx','writeFileSync','lastStopReminderAt','enabled','aOqVs','52bxnMlf','JDqoS','WmDpT','registeredAt','stringify','now','branches'];_0xdbd3=function(){return _0x33ea1c;};return _0xdbd3();}export function enableSession(_0x4d4ef6){const _0x2c11c2=_0x2b10aa,_0x2c16f9={'JlGxr':function(_0x359809){return _0x359809();},'tJLKX':function(_0x33ffc4,_0x341410){return _0x33ffc4!==_0x341410;}},_0x4c4762=_0x2c16f9['JlGxr'](loadCache),_0x1277a1=getOrCreateSession(_0x4c4762,_0x4d4ef6);_0x1277a1[_0x2c11c2(0x18f)]=!![];const _0x4c6340=getCurrentBranch();_0x4c6340&&_0x4c6340!==_0x2c11c2(0x1a4)&&_0x2c16f9[_0x2c11c2(0x1aa)](_0x4c6340,'master')&&(_0x4c4762[_0x2c11c2(0x197)][_0x4c6340]=!![],_0x1277a1['currentBranch']=_0x4c6340),saveCache(_0x4c4762);}export function isSessionEnabled(_0x42e4bf){const _0x1e378c=_0x2b10aa,_0x176e68={'uADNN':function(_0x1815c5){return _0x1815c5();},'eosDe':'master','dKYjA':function(_0x37698b,_0x419c41){return _0x37698b===_0x419c41;},'oFIQF':function(_0x1f6217,_0x5e6f93){return _0x1f6217||_0x5e6f93;}},_0x50ce1e=loadCache(),_0xf27c3f=_0x176e68[_0x1e378c(0x1a3)](getCurrentBranch);if(!_0xf27c3f||_0xf27c3f==='main'||_0xf27c3f===_0x176e68['eosDe'])return _0x176e68['dKYjA'](_0x50ce1e[_0x1e378c(0x1ba)][_0x42e4bf]?.['enabled'],!![]);const _0x305645=_0x50ce1e[_0x1e378c(0x197)][_0xf27c3f]===!![],_0x3adc7f=_0x176e68[_0x1e378c(0x1a6)](_0x50ce1e[_0x1e378c(0x1ba)][_0x42e4bf]?.['enabled'],!![]);return _0x176e68['oFIQF'](_0x305645,_0x3adc7f);}export function disableSession(_0x3b08ac){const _0x97c052=_0x2b10aa,_0x529346={'HceGh':function(_0x5d7d84,_0x2b3128,_0x540be8){return _0x5d7d84(_0x2b3128,_0x540be8);}},_0x466511=loadCache(),_0x1fa810=_0x529346[_0x97c052(0x1ac)](getOrCreateSession,_0x466511,_0x3b08ac);_0x1fa810['enabled']=![],saveCache(_0x466511);}export function updateBranchTracking(_0x41468d){const _0x1709d3=_0x2b10aa,_0x3b6147={'yBMGO':function(_0x5dc55f,_0x319943){return _0x5dc55f===_0x319943;},'sGGDs':function(_0x57b67c,_0x504547){return _0x57b67c===_0x504547;},'eiDut':function(_0x2904eb,_0x3f5664){return _0x2904eb!==_0x3f5664;},'SKVdb':function(_0x22a5ef,_0x1c17a4){return _0x22a5ef(_0x1c17a4);}},_0x162410=loadCache(),_0x111db0=_0x162410['sessions'][_0x41468d];if(!_0x111db0?.['enabled'])return;const _0x220d60=getCurrentBranch();if(!_0x220d60||_0x3b6147[_0x1709d3(0x1a1)](_0x220d60,_0x1709d3(0x1a4))||_0x3b6147['sGGDs'](_0x220d60,'master'))return;_0x3b6147[_0x1709d3(0x1ab)](_0x111db0['currentBranch'],_0x220d60)&&(_0x162410['branches'][_0x220d60]=!![],_0x111db0['currentBranch']=_0x220d60,_0x3b6147['SKVdb'](saveCache,_0x162410));}export function initBranchTracking(_0x58a0e3){const _0x5bb32f=_0x2b10aa,_0xce27c7={'QOzhZ':function(_0x1e3ed8){return _0x1e3ed8();},'bkNvQ':function(_0x606543){return _0x606543();},'WvzUb':_0x5bb32f(0x1a4),'UPIlt':function(_0x554ae8,_0x40d636){return _0x554ae8===_0x40d636;},'VfNiW':'master'},_0x51da90=_0xce27c7['QOzhZ'](loadCache),_0x27351b=_0xce27c7['bkNvQ'](getCurrentBranch);if(!_0x27351b||_0x27351b===_0xce27c7['WvzUb']||_0xce27c7['UPIlt'](_0x27351b,_0xce27c7[_0x5bb32f(0x198)]))return;if(_0xce27c7[_0x5bb32f(0x1b2)](_0x51da90[_0x5bb32f(0x197)][_0x27351b],!![])){const _0x318527=getOrCreateSession(_0x51da90,_0x58a0e3);_0x318527[_0x5bb32f(0x18f)]=!![],_0x318527['currentBranch']=_0x27351b,saveCache(_0x51da90);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;export function recordEnabledSessionCleared(_0x2b8895){const _0xe1cf57=_0x2b10aa,_0x4a55ad={'SaOop':function(_0x6ca71f){return _0x6ca71f();}},_0x5c08f4=_0x4a55ad[_0xe1cf57(0x1af)](loadCache),_0x32e7fe=_0x5c08f4[_0xe1cf57(0x1ba)][_0x2b8895];_0x32e7fe?.['enabled']&&(_0x5c08f4['lastEnabledSessionClearedAt']=Date['now'](),saveCache(_0x5c08f4));}export function shouldAutoEnableAfterClear(_0x2e9aaa){const _0x53f812=_0x2b10aa,_0x443cea={'EKhVK':function(_0xa2e7b1,_0x5a15df){return _0xa2e7b1!==_0x5a15df;},'NXiGG':function(_0xe6abf7,_0x1fb878){return _0xe6abf7<=_0x1fb878;}};if(_0x443cea[_0x53f812(0x19b)](_0x2e9aaa,_0x53f812(0x1b9)))return![];const _0x615afd=loadCache(),_0x1f1f06=_0x615afd[_0x53f812(0x1ad)];if(!_0x1f1f06)return![];const _0xc1adb5=Date['now']()-_0x1f1f06;return _0x443cea[_0x53f812(0x19f)](_0xc1adb5,CLEAR_AUTO_ENABLE_WINDOW_MS);}export function autoEnableAfterClear(_0x5a8637){const _0x35f003=_0x2b10aa,_0x3be81c={'WmDpT':function(_0x5bacc6,_0x14e326,_0x389975){return _0x5bacc6(_0x14e326,_0x389975);},'JDqoS':function(_0x34fd61,_0x18505){return _0x34fd61!==_0x18505;},'JeqDx':function(_0x289f50,_0x3e4091){return _0x289f50(_0x3e4091);}},_0x1cb941=loadCache(),_0x12c2ba=_0x3be81c[_0x35f003(0x193)](getOrCreateSession,_0x1cb941,_0x5a8637);_0x12c2ba[_0x35f003(0x18f)]=!![];const _0x14781c=getCurrentBranch();_0x14781c&&_0x3be81c[_0x35f003(0x192)](_0x14781c,_0x35f003(0x1a4))&&_0x14781c!==_0x35f003(0x1b1)&&(_0x12c2ba[_0x35f003(0x1bb)]=_0x14781c),delete _0x1cb941['lastEnabledSessionClearedAt'],_0x3be81c['JeqDx'](saveCache,_0x1cb941);}export function registerSession(_0x38ce0f,_0x1170b1){const _0x30ce05=_0x2b10aa,_0x9f2c8a=loadCache(),_0x7fc379=getOrCreateSession(_0x9f2c8a,_0x38ce0f);_0x7fc379[_0x30ce05(0x1b8)]=_0x1170b1,_0x7fc379[_0x30ce05(0x194)]=new Date()['toISOString'](),saveCache(_0x9f2c8a);}export function getSessionEntry(_0x532093){const _0x529e24=_0x2b10aa,_0x24ad10={'YIFgx':function(_0x113b40){return _0x113b40();}},_0x1bcf46=_0x24ad10[_0x529e24(0x1a2)](loadCache),_0x1292e2=_0x1bcf46[_0x529e24(0x1ba)][_0x532093];if(_0x1292e2?.[_0x529e24(0x1b8)]&&_0x1292e2?.[_0x529e24(0x194)])return{'featureId':_0x1292e2['featureId'],'registeredAt':_0x1292e2[_0x529e24(0x194)]};return null;}export function unregisterSession(_0x13aed6){const _0x39fb62=_0x2b10aa,_0x1cfacf={'OTGLD':function(_0x5199fe){return _0x5199fe();}},_0x3e61b2=_0x1cfacf[_0x39fb62(0x1b0)](loadCache),_0x16009c=_0x3e61b2['sessions'][_0x13aed6];_0x16009c&&(delete _0x16009c['featureId'],delete _0x16009c['registeredAt'],saveCache(_0x3e61b2));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0x58d20d){const _0x4f9bd1=_0x2b10aa,_0x3da037={'WVyXM':function(_0x476d11,_0x5d8308){return _0x476d11>=_0x5d8308;},'jtgPb':function(_0x4e2cef,_0x3d81fe){return _0x4e2cef-_0x3d81fe;}},_0x14a668=loadCache(),_0x307361=getOrCreateSession(_0x14a668,_0x58d20d),_0x40cf17=_0x307361['lastPlanReminderAt']||0x0,_0x3a8440=Date[_0x4f9bd1(0x196)]();if(_0x3da037['WVyXM'](_0x3da037[_0x4f9bd1(0x1a7)](_0x3a8440,_0x40cf17),PLAN_REMINDER_INTERVAL_MS))return _0x307361['lastPlanReminderAt']=_0x3a8440,saveCache(_0x14a668),!![];return![];}export function shouldShowStopReminder(_0x57492a){const _0x2290a2=_0x2b10aa,_0x506896={'AWMLm':function(_0x51dfc4,_0x29c1a2,_0xdbc4f9){return _0x51dfc4(_0x29c1a2,_0xdbc4f9);},'zgAHj':function(_0x524c19,_0x2eb6e0){return _0x524c19-_0x2eb6e0;}},_0x189584=loadCache(),_0x1cd615=_0x506896['AWMLm'](getOrCreateSession,_0x189584,_0x57492a),_0x42ff5c=_0x1cd615[_0x2290a2(0x1c1)]||0x0,_0x650f8a=Date['now']();if(_0x506896['zgAHj'](_0x650f8a,_0x42ff5c)>=STOP_REMINDER_INTERVAL_MS)return _0x1cd615['lastStopReminderAt']=_0x650f8a,saveCache(_0x189584),!![];return![];}export function hasSessionBeenPrompted(_0x24afeb){const _0x269de1=_0x2b10aa,_0x1fc016={'drabF':function(_0x3e1b6f,_0x15f86b){return _0x3e1b6f===_0x15f86b;}},_0x20d705=loadCache();return _0x1fc016['drabF'](_0x20d705[_0x269de1(0x1ba)][_0x24afeb]?.[_0x269de1(0x1b4)],!![]);}export function markSessionPrompted(_0x5c25f6){const _0x4024ab={'kIrNo':function(_0x4b69aa){return _0x4b69aa();},'NPzWo':function(_0x4fa83f,_0x3581b3,_0x46b8c9){return _0x4fa83f(_0x3581b3,_0x46b8c9);},'Nsowm':function(_0x15b9f9,_0x27be9b){return _0x15b9f9(_0x27be9b);}},_0x5a07ab=_0x4024ab['kIrNo'](loadCache),_0x236497=_0x4024ab['NPzWo'](getOrCreateSession,_0x5a07ab,_0x5c25f6);_0x236497['prompted']=!![],_0x4024ab['Nsowm'](saveCache,_0x5a07ab);}export function getCacheFile(){return CACHE_FILE;}
|
|
1
|
+
const _0x11df5c=_0x5bbf;(function(_0xc80909,_0xf7eed4){const _0x589dfe=_0x5bbf,_0x3214aa=_0xc80909();while(!![]){try{const _0xafde39=-parseInt(_0x589dfe(0x18d))/0x1+-parseInt(_0x589dfe(0x1a6))/0x2*(parseInt(_0x589dfe(0x194))/0x3)+-parseInt(_0x589dfe(0x19e))/0x4*(parseInt(_0x589dfe(0x17a))/0x5)+parseInt(_0x589dfe(0x1aa))/0x6+-parseInt(_0x589dfe(0x19d))/0x7+-parseInt(_0x589dfe(0x181))/0x8+parseInt(_0x589dfe(0x1a0))/0x9;if(_0xafde39===_0xf7eed4)break;else _0x3214aa['push'](_0x3214aa['shift']());}catch(_0x301aa7){_0x3214aa['push'](_0x3214aa['shift']());}}}(_0x53c1,0x988c9));import*as _0x5f232d from'fs';import*as _0x4f9fe8 from'path';import*as _0x402764 from'os';import{execSync}from'child_process';const CACHE_FILE=_0x4f9fe8['join'](_0x402764[_0x11df5c(0x17f)](),'.claude','.ranger_cache.json');function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0x1f3f9c=_0x11df5c,_0x36c527={'DaYhB':'utf-8'};try{if(_0x5f232d[_0x1f3f9c(0x187)](CACHE_FILE)){const _0x3e58a9=JSON[_0x1f3f9c(0x1a9)](_0x5f232d[_0x1f3f9c(0x17b)](CACHE_FILE,_0x36c527[_0x1f3f9c(0x190)]));return{'version':0x3,'sessions':_0x3e58a9['sessions']||{},'branches':_0x3e58a9['branches']||{},'lastEnabledSessionClearedAt':_0x3e58a9['lastEnabledSessionClearedAt']};}}catch{}return createEmptyCache();}function saveCache(_0x5e3b1c){const _0x42a5bd=_0x11df5c;try{const _0x364b64=_0x4f9fe8['dirname'](CACHE_FILE);!_0x5f232d['existsSync'](_0x364b64)&&_0x5f232d['mkdirSync'](_0x364b64,{'recursive':!![]}),_0x5f232d[_0x42a5bd(0x198)](CACHE_FILE,JSON[_0x42a5bd(0x1a4)](_0x5e3b1c,null,0x2));}catch{}}function _0x5bbf(_0x11268e,_0x29a823){_0x11268e=_0x11268e-0x176;const _0x53c19e=_0x53c1();let _0x5bbfaa=_0x53c19e[_0x11268e];return _0x5bbfaa;}export function getCurrentBranch(){const _0x31e7ca=_0x11df5c,_0xf0c654={'IVkTX':function(_0x3a821b,_0x3fd08f,_0x390455){return _0x3a821b(_0x3fd08f,_0x390455);},'LEwty':'git\x20rev-parse\x20--abbrev-ref\x20HEAD','vVnwJ':_0x31e7ca(0x186),'tnNSs':function(_0x53f625,_0x25f6dd){return _0x53f625===_0x25f6dd;}};try{const _0x3e389a=_0xf0c654['IVkTX'](execSync,_0xf0c654['LEwty'],{'encoding':'utf-8','stdio':['pipe',_0xf0c654[_0x31e7ca(0x19c)],_0xf0c654[_0x31e7ca(0x19c)]]})['trim']();if(!_0x3e389a||_0xf0c654[_0x31e7ca(0x17d)](_0x3e389a,_0x31e7ca(0x19f)))return null;return _0x3e389a;}catch{return null;}}export function enableBranch(_0x3d7ba2){const _0x27126e=_0x11df5c,_0x5eb6b1={'zwLQw':function(_0x8de795){return _0x8de795();},'MBTRf':function(_0x36e0c9,_0x28d717){return _0x36e0c9(_0x28d717);}},_0x13fb8b=_0x5eb6b1[_0x27126e(0x185)](loadCache);_0x13fb8b['branches'][_0x3d7ba2]=!![],_0x5eb6b1[_0x27126e(0x18b)](saveCache,_0x13fb8b);}export function disableBranch(_0x18a365){const _0x561cdc=_0x11df5c,_0x3dc111={'XKcWz':function(_0x29bc48){return _0x29bc48();},'cTAEP':function(_0x4d834c,_0x13c2ef){return _0x4d834c(_0x13c2ef);}},_0x326351=_0x3dc111['XKcWz'](loadCache);delete _0x326351[_0x561cdc(0x1a5)][_0x18a365],_0x3dc111[_0x561cdc(0x18c)](saveCache,_0x326351);}export function isBranchEnabled(_0x9c2109){const _0x57feaa=_0x11df5c,_0x45de5d={'vRCQG':function(_0x2e058b,_0x5b95e0){return _0x2e058b===_0x5b95e0;}},_0x4b9efb=loadCache();return _0x45de5d[_0x57feaa(0x184)](_0x4b9efb[_0x57feaa(0x1a5)][_0x9c2109],!![]);}function getOrCreateSession(_0x8c913a,_0x450b70){const _0x20c9b6=_0x11df5c;return!_0x8c913a[_0x20c9b6(0x1a1)][_0x450b70]&&(_0x8c913a['sessions'][_0x450b70]={}),_0x8c913a['sessions'][_0x450b70];}export function enableSession(_0xa8fc96){const _0x358752=_0x11df5c,_0x3205ad={'rQSsN':function(_0x318d22,_0x123a8f,_0x1f9174){return _0x318d22(_0x123a8f,_0x1f9174);},'WCjCY':function(_0x48e14d,_0x199a32){return _0x48e14d!==_0x199a32;},'YVTum':'master'},_0x553cc7=loadCache(),_0x3af0b0=_0x3205ad[_0x358752(0x1a2)](getOrCreateSession,_0x553cc7,_0xa8fc96);_0x3af0b0['enabled']=!![];const _0x1d8d88=getCurrentBranch();_0x1d8d88&&_0x3205ad['WCjCY'](_0x1d8d88,'main')&&_0x1d8d88!==_0x3205ad['YVTum']&&(_0x553cc7['branches'][_0x1d8d88]=!![],_0x3af0b0[_0x358752(0x177)]=_0x1d8d88),saveCache(_0x553cc7);}export function isSessionEnabled(_0x380359){const _0x32d24f=_0x11df5c,_0x1704c6={'ZugKO':function(_0x593470){return _0x593470();},'NUoKY':function(_0x5cf8f6,_0x2b99c8){return _0x5cf8f6===_0x2b99c8;},'eGmfb':_0x32d24f(0x199),'lwLGE':_0x32d24f(0x192),'vxLhm':function(_0x3f6035,_0x3bdb65){return _0x3f6035===_0x3bdb65;}},_0x297257=loadCache(),_0x4df420=_0x1704c6[_0x32d24f(0x197)](getCurrentBranch);if(!_0x4df420||_0x1704c6[_0x32d24f(0x1ac)](_0x4df420,_0x1704c6[_0x32d24f(0x182)])||_0x4df420===_0x1704c6[_0x32d24f(0x17c)])return _0x297257[_0x32d24f(0x1a1)][_0x380359]?.['enabled']===!![];const _0x32eb68=_0x1704c6['NUoKY'](_0x297257['branches'][_0x4df420],!![]),_0xaa2ed6=_0x1704c6[_0x32d24f(0x18f)](_0x297257['sessions'][_0x380359]?.['enabled'],!![]);return _0x32eb68||_0xaa2ed6;}export function disableSession(_0x399191){const _0xb8df96=_0x11df5c,_0x443141={'pGMVR':function(_0x3e6297,_0x151bd8,_0x378b3a){return _0x3e6297(_0x151bd8,_0x378b3a);},'JwWis':function(_0x49fe9c,_0x11ddf0){return _0x49fe9c(_0x11ddf0);}},_0x4158c8=loadCache(),_0x3502a9=_0x443141['pGMVR'](getOrCreateSession,_0x4158c8,_0x399191);_0x3502a9[_0xb8df96(0x176)]=![],_0x443141['JwWis'](saveCache,_0x4158c8);}export function updateBranchTracking(_0x53058a){const _0xdf8104=_0x11df5c,_0x13d68d={'ohBSm':function(_0x72cca7){return _0x72cca7();},'GBYRw':function(_0xd3168,_0xdece63){return _0xd3168===_0xdece63;},'xNtVy':function(_0x17c8cd,_0x4a251f){return _0x17c8cd===_0x4a251f;},'AvYUN':function(_0x4df141,_0xb86417){return _0x4df141!==_0xb86417;},'poajh':function(_0x51d370,_0x4634f0){return _0x51d370(_0x4634f0);}},_0x43d98b=_0x13d68d['ohBSm'](loadCache),_0x28b9d5=_0x43d98b['sessions'][_0x53058a];if(!_0x28b9d5?.[_0xdf8104(0x176)])return;const _0xd6e452=getCurrentBranch();if(!_0xd6e452||_0x13d68d['GBYRw'](_0xd6e452,_0xdf8104(0x199))||_0x13d68d['xNtVy'](_0xd6e452,'master'))return;_0x13d68d['AvYUN'](_0x28b9d5['currentBranch'],_0xd6e452)&&(_0x43d98b[_0xdf8104(0x1a5)][_0xd6e452]=!![],_0x28b9d5['currentBranch']=_0xd6e452,_0x13d68d[_0xdf8104(0x1ad)](saveCache,_0x43d98b));}export function initBranchTracking(_0x2bc12d){const _0x2cee20=_0x11df5c,_0x2b26a1={'EbPog':function(_0x3008a0){return _0x3008a0();},'UPmuW':_0x2cee20(0x199),'ToZSR':'master','NeOwu':function(_0x1f7e5a,_0x2c5188){return _0x1f7e5a===_0x2c5188;},'OAEvq':function(_0x11bd15,_0x42af3f){return _0x11bd15(_0x42af3f);}},_0x446e42=_0x2b26a1['EbPog'](loadCache),_0x4fba56=_0x2b26a1[_0x2cee20(0x196)](getCurrentBranch);if(!_0x4fba56||_0x4fba56===_0x2b26a1['UPmuW']||_0x4fba56===_0x2b26a1[_0x2cee20(0x19a)])return;if(_0x2b26a1[_0x2cee20(0x17e)](_0x446e42['branches'][_0x4fba56],!![])){const _0x1dc831=getOrCreateSession(_0x446e42,_0x2bc12d);_0x1dc831['enabled']=!![],_0x1dc831[_0x2cee20(0x177)]=_0x4fba56,_0x2b26a1[_0x2cee20(0x1a7)](saveCache,_0x446e42);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;export function recordEnabledSessionCleared(_0x1d31f0){const _0x1d1ab0={'ctDJZ':function(_0x2d2ed7){return _0x2d2ed7();},'klWeE':function(_0x3fa282,_0x11f15a){return _0x3fa282(_0x11f15a);}},_0x1fd2ab=_0x1d1ab0['ctDJZ'](loadCache),_0x1fe2d3=_0x1fd2ab['sessions'][_0x1d31f0];_0x1fe2d3?.['enabled']&&(_0x1fd2ab['lastEnabledSessionClearedAt']=Date['now'](),_0x1d1ab0['klWeE'](saveCache,_0x1fd2ab));}export function shouldAutoEnableAfterClear(_0x1b0482){const _0x43f207=_0x11df5c,_0x3f0c18={'jmpbQ':function(_0x4bb38e,_0x16b250){return _0x4bb38e!==_0x16b250;},'SXTVX':_0x43f207(0x19b),'cPdxz':function(_0xd805a){return _0xd805a();},'LQToN':function(_0x5432c1,_0x3bc9e2){return _0x5432c1<=_0x3bc9e2;}};if(_0x3f0c18[_0x43f207(0x188)](_0x1b0482,_0x3f0c18['SXTVX']))return![];const _0x2d7b7f=_0x3f0c18['cPdxz'](loadCache),_0x41d6f5=_0x2d7b7f['lastEnabledSessionClearedAt'];if(!_0x41d6f5)return![];const _0x552450=Date[_0x43f207(0x180)]()-_0x41d6f5;return _0x3f0c18[_0x43f207(0x1a8)](_0x552450,CLEAR_AUTO_ENABLE_WINDOW_MS);}function _0x53c1(){const _0x40395e=['stringify','branches','596WeyPFr','OAEvq','LQToN','parse','5197920WhsSNx','featureId','NUoKY','poajh','lastStopReminderAt','enabled','currentBranch','GsVbx','bBKre','79010xmrzGf','readFileSync','lwLGE','tnNSs','NeOwu','homedir','now','6885880pqijmq','eGmfb','lastEnabledSessionClearedAt','vRCQG','zwLQw','pipe','existsSync','jmpbQ','registeredAt','kWkOt','MBTRf','cTAEP','855976WXIOEt','vBMPD','vxLhm','DaYhB','UapWn','master','prompted','11079oOuqKQ','FvhZo','EbPog','ZugKO','writeFileSync','main','ToZSR','clear','vVnwJ','8537711RYiNMc','4HEuqsq','HEAD','34300989vllnyl','sessions','rQSsN','lastPlanReminderAt'];_0x53c1=function(){return _0x40395e;};return _0x53c1();}export function autoEnableAfterClear(_0x291e48){const _0x326b47=_0x11df5c,_0x290307={'FvhZo':function(_0x51a695){return _0x51a695();},'GmSTd':function(_0x1306e0,_0x2a5436){return _0x1306e0(_0x2a5436);}},_0x140c9b=_0x290307[_0x326b47(0x195)](loadCache),_0x40867a=getOrCreateSession(_0x140c9b,_0x291e48);_0x40867a['enabled']=!![];const _0x252ea1=getCurrentBranch();_0x252ea1&&_0x252ea1!==_0x326b47(0x199)&&_0x252ea1!=='master'&&(_0x40867a['currentBranch']=_0x252ea1),delete _0x140c9b[_0x326b47(0x183)],_0x290307['GmSTd'](saveCache,_0x140c9b);}export function registerSession(_0x29f712,_0x13a978){const _0x8ca1d6=_0x11df5c,_0x264ff0={'bBKre':function(_0x432a7f){return _0x432a7f();},'vBMPD':function(_0x27e1a5,_0x129053){return _0x27e1a5(_0x129053);}},_0x298d8=_0x264ff0[_0x8ca1d6(0x179)](loadCache),_0xc1c5b3=getOrCreateSession(_0x298d8,_0x29f712);_0xc1c5b3['featureId']=_0x13a978,_0xc1c5b3['registeredAt']=new Date()['toISOString'](),_0x264ff0[_0x8ca1d6(0x18e)](saveCache,_0x298d8);}export function getSessionEntry(_0x213d6c){const _0x4ac597=_0x11df5c,_0x45b880={'BlpgG':function(_0x108a87){return _0x108a87();}},_0x403de2=_0x45b880['BlpgG'](loadCache),_0x56c60d=_0x403de2['sessions'][_0x213d6c];if(_0x56c60d?.[_0x4ac597(0x1ab)]&&_0x56c60d?.[_0x4ac597(0x189)])return{'featureId':_0x56c60d['featureId'],'registeredAt':_0x56c60d[_0x4ac597(0x189)]};return null;}export function unregisterSession(_0x164688){const _0x5e66c9=_0x11df5c,_0x43ff07={'GsVbx':function(_0x2c4c1d,_0xfe62c2){return _0x2c4c1d(_0xfe62c2);}},_0x29ffef=loadCache(),_0x354abb=_0x29ffef['sessions'][_0x164688];_0x354abb&&(delete _0x354abb['featureId'],delete _0x354abb['registeredAt'],_0x43ff07[_0x5e66c9(0x178)](saveCache,_0x29ffef));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0x446b37){const _0x173397=_0x11df5c,_0x28e71c={'QlJfN':function(_0x2a2871){return _0x2a2871();},'ZbfWK':function(_0x4794b8,_0x4289b7){return _0x4794b8(_0x4289b7);}},_0x1c0ada=_0x28e71c['QlJfN'](loadCache),_0x4d6fd4=getOrCreateSession(_0x1c0ada,_0x446b37),_0x2d90bf=_0x4d6fd4[_0x173397(0x1a3)]||0x0,_0x49fe00=Date['now']();if(_0x49fe00-_0x2d90bf>=PLAN_REMINDER_INTERVAL_MS)return _0x4d6fd4[_0x173397(0x1a3)]=_0x49fe00,_0x28e71c['ZbfWK'](saveCache,_0x1c0ada),!![];return![];}export function shouldShowStopReminder(_0x4c552e){const _0x196d79=_0x11df5c,_0x574223={'QLyTK':function(_0x1de0ee){return _0x1de0ee();},'PuKWo':function(_0x1cdc9c,_0x5eaa5d){return _0x1cdc9c-_0x5eaa5d;},'kWkOt':function(_0x46b304,_0x112780){return _0x46b304(_0x112780);}},_0x5e8540=_0x574223['QLyTK'](loadCache),_0x522fb6=getOrCreateSession(_0x5e8540,_0x4c552e),_0x367e6d=_0x522fb6[_0x196d79(0x1ae)]||0x0,_0x5120ce=Date['now']();if(_0x574223['PuKWo'](_0x5120ce,_0x367e6d)>=STOP_REMINDER_INTERVAL_MS)return _0x522fb6['lastStopReminderAt']=_0x5120ce,_0x574223[_0x196d79(0x18a)](saveCache,_0x5e8540),!![];return![];}export function hasSessionBeenPrompted(_0x424f46){const _0x542d36=_0x11df5c,_0x4f2c4e=loadCache();return _0x4f2c4e[_0x542d36(0x1a1)][_0x424f46]?.['prompted']===!![];}export function markSessionPrompted(_0x59f96b){const _0x4bb039=_0x11df5c,_0x2441b0={'UapWn':function(_0x203dd8,_0x1bea91,_0x5b53c8){return _0x203dd8(_0x1bea91,_0x5b53c8);}},_0x5f2850=loadCache(),_0x20136e=_0x2441b0[_0x4bb039(0x191)](getOrCreateSession,_0x5f2850,_0x59f96b);_0x20136e[_0x4bb039(0x193)]=!![],saveCache(_0x5f2850);}export function getCacheFile(){return CACHE_FILE;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x3317b6=_0x2f56;(function(_0x2de584,_0x31438a){const _0x4cfbc3=_0x2f56,_0x3ab6cf=_0x2de584();while(!![]){try{const _0x36d535=parseInt(_0x4cfbc3(0xe5))/0x1*(parseInt(_0x4cfbc3(0xe4))/0x2)+parseInt(_0x4cfbc3(0xc4))/0x3*(-parseInt(_0x4cfbc3(0xf8))/0x4)+-parseInt(_0x4cfbc3(0x124))/0x5*(parseInt(_0x4cfbc3(0x116))/0x6)+parseInt(_0x4cfbc3(0xef))/0x7*(parseInt(_0x4cfbc3(0xcc))/0x8)+parseInt(_0x4cfbc3(0x125))/0x9*(parseInt(_0x4cfbc3(0x145))/0xa)+parseInt(_0x4cfbc3(0x11c))/0xb*(parseInt(_0x4cfbc3(0xc5))/0xc)+-parseInt(_0x4cfbc3(0x12c))/0xd;if(_0x36d535===_0x31438a)break;else _0x3ab6cf['push'](_0x3ab6cf['shift']());}catch(_0x2352a5){_0x3ab6cf['push'](_0x3ab6cf['shift']());}}}(_0x8c18,0xebd1d));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(_0x25f074,_0xbeb10e){const _0x5ea4ea=_0x2f56,_0x151da3={'xvcDw':'local','AaCdh':function(_0x2867d7,_0x2c5899,_0x55df9a){return _0x2867d7(_0x2c5899,_0x55df9a);},'pyCZE':function(_0x1bda26,_0x45cc8e,_0x53add6){return _0x1bda26(_0x45cc8e,_0x53add6);},'KUZUN':function(_0x1bacd5,_0x3eb340,_0x4b4892){return _0x1bacd5(_0x3eb340,_0x4b4892);},'XOBvd':function(_0x498707,_0x4f7199){return _0x498707(_0x4f7199);},'RqNiY':function(_0x2fccf5,_0x5e9aea){return _0x2fccf5!==_0x5e9aea;}},_0x427298=join(_0xbeb10e,'ci',_0x25f074),_0x26ef64=join(_0xbeb10e,_0x151da3[_0x5ea4ea(0xe9)],_0x25f074),_0x26a9f9=_0x151da3[_0x5ea4ea(0xcf)](join,_0xbeb10e,_0x25f074),_0x4a7ffc=_0x151da3[_0x5ea4ea(0xd9)](join,_0xbeb10e,_0x151da3[_0x5ea4ea(0xe9)]),_0x59622d=_0x151da3['KUZUN'](join,_0xbeb10e,'ci');if(_0x151da3[_0x5ea4ea(0x12a)](existsSync,_0x427298))return _0x427298;if(_0x151da3['XOBvd'](existsSync,_0x26ef64))return _0x26ef64;if(existsSync(_0x26a9f9)&&(_0x151da3[_0x5ea4ea(0xc6)](_0x26a9f9,_0x4a7ffc)&&_0x26a9f9!==_0x59622d?!![]:hasLegacyProfileFiles(_0x26a9f9)))return _0x26a9f9;return null;}export function getEnvDir(_0x5ca78b,_0x2450ff={}){const _0x527128=_0x2f56,_0x3073d6={'lumBZ':function(_0x4eab8b,_0x58f30,_0x259ea3){return _0x4eab8b(_0x58f30,_0x259ea3);},'RHIXn':function(_0x2ffdaa){return _0x2ffdaa();},'RKMGb':function(_0x35631c,_0x1b072e){return _0x35631c!==_0x1b072e;},'wbxNt':_0x527128(0xf7)},_0x375b1d=getRangerDir(),_0xaa1320=findEnvInRoot(_0x5ca78b,_0x375b1d);if(_0xaa1320){if(_0x2450ff[_0x527128(0xdc)]&&isLegacyEnvPath(_0xaa1320))throw _0x3073d6['lumBZ'](legacyWriteError,_0x5ca78b,_0xaa1320);return _0xaa1320;}const _0xada725=_0x3073d6['RHIXn'](getRangerHomeDir);if(_0x3073d6['RKMGb'](_0xada725,_0x375b1d)){const _0x3054d4=_0x3073d6['lumBZ'](findEnvInRoot,_0x5ca78b,_0xada725);if(_0x3054d4){if(_0x2450ff[_0x527128(0xdc)]&&isLegacyEnvPath(_0x3054d4))throw legacyWriteError(_0x5ca78b,_0x3054d4);return _0x3054d4;}}const _0x46f6cf=join(_0xada725,_0x3073d6[_0x527128(0x138)],_0x5ca78b);if(_0x2450ff['forWrite'])throw _0x3073d6[_0x527128(0x13b)](legacyWriteError,_0x5ca78b,_0x46f6cf);return _0x46f6cf;}function isLegacyEnvPath(_0x477caf){const _0x5e9e3c=_0x2f56,_0x404000={'xJdGr':function(_0x54e776){return _0x54e776();},'wnuyI':function(_0x59dfab,_0x3962e8){return _0x59dfab+_0x3962e8;},'tYUoG':function(_0x126ea9,_0x4dc2ca){return _0x126ea9===_0x4dc2ca;}},_0x540829=_0x404000[_0x5e9e3c(0xe1)](getRangerDir),_0x8771ad=_0x404000[_0x5e9e3c(0xe1)](getRangerHomeDir);for(const _0x3adcf8 of new Set([_0x540829,_0x8771ad])){const _0x5a1e17=_0x3adcf8[_0x5e9e3c(0xeb)]('/')?_0x3adcf8:_0x404000['wnuyI'](_0x3adcf8,'/');if(_0x404000[_0x5e9e3c(0xf1)](_0x477caf,_0x3adcf8)||_0x477caf['startsWith'](_0x5a1e17))return!![];}return![];}function _0x2f56(_0x2c248c,_0x24eaed){_0x2c248c=_0x2c248c-0xc0;const _0x8c182b=_0x8c18();let _0x2f5680=_0x8c182b[_0x2c248c];return _0x2f5680;}function legacyWriteError(_0x2a5930,_0x2f4787){const _0x2ee8a6=_0x2f56,_0x262e45={'rweoa':function(_0x74903b,_0x55826a){return _0x74903b+_0x55826a;},'ULUSx':function(_0x580af7,_0x4ce45c){return _0x580af7+_0x4ce45c;}};return new Error(_0x262e45[_0x2ee8a6(0xcd)](_0x262e45[_0x2ee8a6(0xf0)](_0x2ee8a6(0x105)+_0x2a5930+_0x2ee8a6(0xc0)+_0x2f4787+'.\x0a','That\x20directory\x20is\x20read-only\x20now.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a'),'\x20\x20ranger\x20profile\x20add\x20<name>\x0a')+_0x2ee8a6(0xc2));}export function findExistingEnv(_0x2947cd,_0x23fced){const _0x2bef10=_0x2f56,_0x3f9a82={'FMBnT':'local','pEJMe':_0x2bef10(0x10f),'cQGUv':function(_0x867f43,_0x497d73,_0x15b3c3){return _0x867f43(_0x497d73,_0x15b3c3);},'qEZEY':function(_0x7b4fbe,_0x5e706c){return _0x7b4fbe===_0x5e706c;}},_0x179cfb=_0x23fced?.[_0x2bef10(0x146)],_0x3c4bf7=_0x179cfb?[_0x179cfb]:[getRangerDir(),getRangerHomeDir()]['filter']((_0x43efb9,_0x264afa,_0x362b54)=>_0x362b54['indexOf'](_0x43efb9)===_0x264afa),_0x1ab827=_0x23fced?.[_0x2bef10(0x107)]??['ci',_0x3f9a82[_0x2bef10(0x11f)],_0x3f9a82['pEJMe']];for(const _0x5caf9a of _0x3c4bf7){const _0x29cc14=_0x3f9a82[_0x2bef10(0xe3)](join,_0x5caf9a,_0x3f9a82['FMBnT']),_0x7851ce=_0x3f9a82['cQGUv'](join,_0x5caf9a,'ci'),_0x3cbb6f=[{'location':'ci','path':join(_0x5caf9a,'ci',_0x2947cd)},{'location':_0x3f9a82[_0x2bef10(0x11f)],'path':join(_0x5caf9a,_0x2bef10(0xf7),_0x2947cd)},{'location':_0x3f9a82[_0x2bef10(0xe8)],'path':_0x3f9a82['cQGUv'](join,_0x5caf9a,_0x2947cd)}];for(const _0x1c24dd of _0x3cbb6f){if(_0x1ab827[_0x2bef10(0xdb)](_0x1c24dd['location'])&&existsSync(_0x1c24dd['path'])){if(_0x1c24dd[_0x2bef10(0xdf)]===_0x3f9a82['pEJMe']&&(_0x3f9a82['qEZEY'](_0x1c24dd[_0x2bef10(0x143)],_0x29cc14)||_0x3f9a82['qEZEY'](_0x1c24dd[_0x2bef10(0x143)],_0x7851ce))&&!hasLegacyProfileFiles(_0x1c24dd[_0x2bef10(0x143)]))continue;return{'path':_0x1c24dd[_0x2bef10(0x143)],'location':_0x1c24dd['location']};}}}return null;}function hasLegacyProfileFiles(_0xe224f){const _0x2d1b4b=_0x2f56,_0x54d501={'ukadg':function(_0x5ce8ab,_0x11a187){return _0x5ce8ab(_0x11a187);},'mexoN':_0x2d1b4b(0xf9),'yUeQF':function(_0x2a71ab,_0x302ce5,_0x3b1015){return _0x2a71ab(_0x302ce5,_0x3b1015);},'gfccJ':function(_0xd93da9,_0x44eaa9){return _0xd93da9(_0x44eaa9);}};return _0x54d501[_0x2d1b4b(0x119)](existsSync,join(_0xe224f,_0x54d501['mexoN']))||existsSync(_0x54d501['yUeQF'](join,_0xe224f,'auth.json'))||_0x54d501['gfccJ'](existsSync,join(_0xe224f,_0x2d1b4b(0xd7)));}export function isEnvCi(_0x529a47){const _0x21a238=_0x2f56,_0x146ff6={'EESty':function(_0x368919,_0x20a6a2,_0x38eff1,_0x3568fa){return _0x368919(_0x20a6a2,_0x38eff1,_0x3568fa);},'gZXWp':function(_0x321544){return _0x321544();},'SUxDl':function(_0x20611a,_0x244269){return _0x20611a!==_0x244269;},'GLWZh':function(_0x59d24a,_0x188acb,_0x4b40f8,_0x483347){return _0x59d24a(_0x188acb,_0x4b40f8,_0x483347);}};if(existsSync(_0x146ff6[_0x21a238(0x108)](join,_0x146ff6[_0x21a238(0xf5)](getRangerDir),'ci',_0x529a47)))return!![];const _0x30abc8=_0x146ff6[_0x21a238(0xf5)](getRangerHomeDir);if(_0x146ff6['SUxDl'](_0x30abc8,getRangerDir())&&existsSync(_0x146ff6['GLWZh'](join,_0x30abc8,'ci',_0x529a47)))return!![];return![];}export async function cleanupTempFiles(_0x44ad94){const _0x1f0042=_0x2f56,_0x74ed5b={'ROEFh':'ENOENT'},_0x1307a7=[_0x44ad94['tempAuthPath'],_0x44ad94['configPath']][_0x1f0042(0xfa)](Boolean);await Promise[_0x1f0042(0xc9)](_0x1307a7['map'](_0x2049d2=>unlink(_0x2049d2)['catch'](_0x32669=>{const _0x1d2fd3=_0x1f0042;_0x32669[_0x1d2fd3(0xfe)]!==_0x74ed5b['ROEFh']&&console['warn']('Failed\x20to\x20clean\x20up\x20temp\x20file\x20'+_0x2049d2+':',_0x32669[_0x1d2fd3(0xea)]);})));}export function getSettingsPath(_0x29c28c){const _0x5780e2=_0x2f56,_0x98ee19={'zxljF':function(_0x1825d4,_0x377c58,_0x3e78c1){return _0x1825d4(_0x377c58,_0x3e78c1);},'rcvVm':_0x5780e2(0xf9)};return _0x98ee19['zxljF'](join,getEnvDir(_0x29c28c),_0x98ee19[_0x5780e2(0x117)]);}export async function loadSettings(_0x20af4e){const _0x4b307a=_0x2f56,_0x18ee35={'ShRSB':function(_0x49271b,_0x54fb3b){return _0x49271b(_0x54fb3b);}},_0x65bf64=_0x18ee35[_0x4b307a(0x135)](getSettingsPath,_0x20af4e);if(!existsSync(_0x65bf64))return{};try{const _0x2f8099=await readFile(_0x65bf64,_0x4b307a(0x11b));return JSON['parse'](_0x2f8099);}catch{return{};}}export async function saveSettings(_0x566f6c,_0x5f3872){const _0x1c127b=_0x2f56,_0x7d7632={'MuKLI':function(_0x4c8826,_0x13bd4d){return _0x4c8826(_0x13bd4d);}},_0x460b3f=getSettingsPath(_0x566f6c),_0x5ad81b=dirname(_0x460b3f);!_0x7d7632[_0x1c127b(0xf6)](existsSync,_0x5ad81b)&&await mkdir(_0x5ad81b,{'recursive':!![]}),await writeFile(_0x460b3f,JSON['stringify'](_0x5f3872,null,0x2));}export function resolveEnvVars(_0x207812){const _0x31b435=_0x2f56,_0x277991={'XeOLF':function(_0x31267d,_0x529b23){return _0x31267d===_0x529b23;},'eNAXD':'object'};if(typeof _0x207812===_0x31b435(0xed))return _0x207812[_0x31b435(0xce)](/\$\{(\w+)\}/g,(_0x135246,_0xecc0d5)=>{const _0x53a04e=_0x31b435,_0x15efc9=process[_0x53a04e(0xda)][_0xecc0d5];if(_0x277991[_0x53a04e(0xd8)](_0x15efc9,undefined))throw new Error(_0x53a04e(0xff)+_0xecc0d5+_0x53a04e(0x134));return _0x15efc9;});if(Array[_0x31b435(0xe6)](_0x207812))return _0x207812['map'](resolveEnvVars);if(_0x207812&&typeof _0x207812===_0x277991['eNAXD'])return Object[_0x31b435(0xd3)](Object['entries'](_0x207812)[_0x31b435(0x133)](([_0x5e256c,_0x1e9d8b])=>[_0x5e256c,resolveEnvVars(_0x1e9d8b)]));return _0x207812;}const isRecord=_0x88f889=>typeof _0x88f889==='object'&&_0x88f889!==null&&!Array[_0x3317b6(0xe6)](_0x88f889),asRecord=_0x3598ef=>isRecord(_0x3598ef)?_0x3598ef:undefined,mergeHeaders=(_0x571b60,_0xd14dfd)=>{const _0x245455={'WztKg':function(_0x219637,_0x357b9d){return _0x219637??_0x357b9d;}},_0x44589c={..._0x245455['WztKg'](_0x571b60,{}),..._0xd14dfd??{}};return Object['keys'](_0x44589c)['length']?_0x44589c:undefined;},SAFE_MODE_ARGS=['--disable-features=WebBluetooth'],ALLOW_LOCALHOST_ARGS=[_0x3317b6(0xf2),'--allow-running-insecure-content','--unsafely-treat-insecure-origin-as-secure=http://localhost',_0x3317b6(0xee)];export function buildBrowserOptionsFromSettings(_0x4b5163,_0xdcea01={}){const _0x1cdb6e=_0x3317b6,_0x47d95d={'wNvSJ':function(_0x3a1666,_0x1d886a){return _0x3a1666(_0x1d886a);},'DXVRV':'boolean','OVgiF':function(_0x396e9e,_0x1a15ce){return _0x396e9e(_0x1a15ce);},'UAwPZ':function(_0x8a4a2d,_0xaba98f){return _0x8a4a2d===_0xaba98f;},'KhVFZ':_0x1cdb6e(0xed),'QohGK':function(_0x34912b,_0x179bfb,_0x39e9ed){return _0x34912b(_0x179bfb,_0x39e9ed);}},_0x17d72a=_0x47d95d[_0x1cdb6e(0x140)](asRecord,_0x4b5163['browser']),_0x2a9535={..._0x47d95d['wNvSJ'](asRecord,_0x17d72a?.[_0x1cdb6e(0xd4)])??{}};typeof _0xdcea01['headless']===_0x47d95d[_0x1cdb6e(0x10b)]&&(_0x2a9535['headless']=_0xdcea01['headless']);if(_0x4b5163['safeMode']){const _0x244f55=_0x2a9535[_0x1cdb6e(0xe0)]??[],_0x115029=SAFE_MODE_ARGS[_0x1cdb6e(0xfa)](_0x5232c8=>!_0x244f55[_0x1cdb6e(0xdb)](_0x5232c8));_0x2a9535['args']=[..._0x244f55,..._0x115029];}if(_0x4b5163[_0x1cdb6e(0xd6)]){const _0x3b1134=_0x2a9535['args']??[],_0x4f7575=ALLOW_LOCALHOST_ARGS['filter'](_0x3accc6=>!_0x3b1134['includes'](_0x3accc6));_0x2a9535['args']=[..._0x3b1134,..._0x4f7575];}const _0x45a7cc={..._0x47d95d['OVgiF'](asRecord,_0x17d72a?.['contextOptions'])??{}};_0x45a7cc['ignoreHTTPSErrors']=!![];_0x47d95d[_0x1cdb6e(0xc1)](typeof _0x4b5163['userAgent'],_0x47d95d['KhVFZ'])&&(_0x45a7cc['userAgent']=_0x4b5163[_0x1cdb6e(0xde)]);const _0x2f91f8=_0x47d95d['QohGK'](mergeHeaders,_0x47d95d[_0x1cdb6e(0x121)](asRecord,_0x45a7cc['extraHTTPHeaders']),_0x47d95d['OVgiF'](asRecord,_0x4b5163[_0x1cdb6e(0xd0)]));return _0x2f91f8?_0x45a7cc[_0x1cdb6e(0xfd)]=_0x2f91f8:delete _0x45a7cc[_0x1cdb6e(0xfd)],_0xdcea01['storageStatePath']&&(_0x45a7cc[_0x1cdb6e(0x120)]=_0xdcea01['storageStatePath']),{'launchOptions':_0x2a9535,'contextOptions':_0x45a7cc};}export async function resolveProfileStorageState(_0x1ce7cb){const _0x561503=_0x3317b6,_0x5b5942={'jkTLo':function(_0xb6748b,_0x57cc89){return _0xb6748b(_0x57cc89);}};return resolveLocalAuthPath(_0x5b5942[_0x561503(0xc7)](getEnvDir,_0x1ce7cb));}async function resolveLocalAuthPath(_0x152ae9){const _0x29a177=_0x3317b6,_0x461c50={'lRdgR':'auth.json.enc','OjQFr':function(_0x5b9cc3,_0x4c1ed3,_0x663112){return _0x5b9cc3(_0x4c1ed3,_0x663112);},'aBAoG':function(_0x52ba03){return _0x52ba03();},'Vopru':'No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','ZfnNn':function(_0x506113,_0x3e894d,_0x33de5c){return _0x506113(_0x3e894d,_0x33de5c);}},_0x5de4de=join(_0x152ae9,_0x461c50['lRdgR']),_0xada33a=_0x461c50['OjQFr'](join,_0x152ae9,'auth.json');if(existsSync(_0x5de4de))try{const _0x5c404a=await _0x461c50['aBAoG'](getToken);if(!_0x5c404a)throw new Error(_0x461c50['Vopru']);const _0x567d45=await readFile(_0x5de4de),_0x5658cf=_0x461c50['ZfnNn'](decrypt,_0x567d45,_0x5c404a),_0x4a1711=_0x461c50[_0x29a177(0x126)](join,_0x461c50['aBAoG'](tmpdir),_0x29a177(0xc3)+Date['now']()+_0x29a177(0xfb));return await writeFile(_0x4a1711,_0x5658cf),{'storageStatePath':_0x4a1711,'tempAuthPath':_0x4a1711};}catch(_0x4a74c0){const _0x5b7b7b=_0x4a74c0 instanceof Error?_0x4a74c0['message']:String(_0x4a74c0);throw new Error(_0x29a177(0x123)+_0x5b7b7b);}if(existsSync(_0xada33a))return{'storageStatePath':_0xada33a};return{};}export async function buildPlaywrightConfig(_0x4da0e5,_0x88cdaa,_0x48a970,_0x41952d,_0x567eca){const _0x4ef444=_0x3317b6,_0x34f72e={'GxCWb':function(_0x16b6d6,_0xb1f61f,_0x2a18c4,_0x2b1440,_0xc7d82e,_0x46ab2b,_0x461c80){return _0x16b6d6(_0xb1f61f,_0x2a18c4,_0x2b1440,_0xc7d82e,_0x46ab2b,_0x461c80);},'DRyKr':_0x4ef444(0xf3),'dlZAo':function(_0x261128,_0x96d584){return _0x261128(_0x96d584);},'ElGRM':function(_0x7a893a,_0x520ff7,_0x2e6a61,_0xe4d932,_0x19654b,_0x4df5be,_0x47b95c){return _0x7a893a(_0x520ff7,_0x2e6a61,_0xe4d932,_0x19654b,_0x4df5be,_0x47b95c);}};if(_0x567eca)return _0x34f72e[_0x4ef444(0x122)](buildPlaywrightConfigCore,_0x4da0e5,_0x567eca,_0x88cdaa,_0x48a970,_0x41952d,_0x34f72e[_0x4ef444(0xd2)]);const {storageStatePath:_0x5e6593,tempAuthPath:_0x5ff5fd}=await _0x34f72e[_0x4ef444(0x113)](resolveLocalAuthPath,getEnvDir(_0x88cdaa));try{const _0x444b0a=await _0x34f72e['ElGRM'](buildPlaywrightConfigCore,_0x4da0e5,_0x5e6593,_0x88cdaa,_0x48a970,_0x41952d,'stagehand');return{..._0x444b0a,'tempAuthPath':_0x5ff5fd};}catch(_0x3d486a){_0x5ff5fd&&await unlink(_0x5ff5fd)['catch'](()=>{});throw _0x3d486a;}}export async function buildPlaywrightConfigCore(_0x7bc6d4,_0x1d136e,_0x4a789c,_0x33504e,_0x56ed9a,_0xe0a31='stagehand'){const _0x41b6da=_0x3317b6,_0x1840f3={'TXoUU':'chromium','yrqnc':_0x41b6da(0xd1),'AMRLh':function(_0x37a23b){return _0x37a23b();},'uagQR':function(_0x4f27a3,_0x203b25,_0x28d4c6,_0x4d198a){return _0x4f27a3(_0x203b25,_0x28d4c6,_0x4d198a);},'JdXrd':function(_0x411c43,_0x5cb45e){return _0x411c43(_0x5cb45e);},'JyOwE':function(_0x312e29,_0x670356){return _0x312e29===_0x670356;},'NDGqF':'file','Wgomj':'tabs','wxLuo':'install','jgavo':'pdf','pmfqU':_0x41b6da(0x130),'zvQnQ':function(_0x423713,_0xc2b4ef,_0x534a63){return _0x423713(_0xc2b4ef,_0x534a63);},'GilSX':function(_0x49801f,_0x3d6d02){return _0x49801f===_0x3d6d02;},'QKeBW':'playwright-cli','fSXvR':'-cli'},_0x44412a=_0x33504e||_0x1840f3[_0x41b6da(0x104)](randomUUID),_0x1fe0c4=_0x1840f3['uagQR'](join,getRangerDir(),_0x41b6da(0x115),_0x44412a),_0x57083a=_0x1840f3['JdXrd'](Boolean,_0x7bc6d4['cdpEndpoint']),_0x43e699=_0x57083a?{'browserName':_0x1840f3[_0x41b6da(0x114)],'cdpEndpoint':_0x7bc6d4['cdpEndpoint']}:((()=>{const _0x4108c6=_0x41b6da,{launchOptions:_0x5eaf9a,contextOptions:_0x5cd227}=buildBrowserOptionsFromSettings(_0x7bc6d4,{'headless':_0x56ed9a?![]:_0x7bc6d4[_0x4108c6(0x10d)]??!![],'storageStatePath':_0x1d136e});if(process['getuid']?.()===0x0){const _0xafe25d=[_0x4108c6(0x142),'--disable-setuid-sandbox'],_0x47228c=_0x5eaf9a['args']??[],_0x36bba5=_0xafe25d[_0x4108c6(0xfa)](_0x323d07=>!_0x47228c['includes'](_0x323d07));_0x5eaf9a['args']=[..._0x47228c,..._0x36bba5];}return{'isolated':!![],'browserName':_0x1840f3['TXoUU'],'launchOptions':_0x5eaf9a,'contextOptions':{..._0x5cd227,'permissions':[_0x1840f3['yrqnc'],_0x4108c6(0x10a)],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x5f4eb6=_0x1840f3['JyOwE'](_0xe0a31,'playwright-cli')?{'browser':_0x43e699,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x1fe0c4,'outputMode':_0x1840f3[_0x41b6da(0x11d)],'codegen':'none'}:{'name':_0x4a789c,'browser':_0x43e699,'capabilities':[_0x41b6da(0x132),_0x1840f3['Wgomj'],_0x1840f3[_0x41b6da(0x12b)],_0x1840f3['jgavo'],_0x1840f3[_0x41b6da(0x13d)]],'imageResponses':'allow','saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x1fe0c4};if(!_0x57083a){const _0x16c51b=_0x5f4eb6[_0x41b6da(0x12e)],_0x3ff25d=_0x16c51b['contextOptions'];if(_0x1840f3['JyOwE'](_0x3ff25d['userAgent'],undefined))delete _0x3ff25d[_0x41b6da(0xde)];if(_0x3ff25d['storageState']===undefined)delete _0x3ff25d[_0x41b6da(0x120)];}const _0x235302=_0x1840f3[_0x41b6da(0xec)](join,tmpdir(),_0x41b6da(0x100));!existsSync(_0x235302)&&await mkdir(_0x235302,{'recursive':!![]});const _0x41b1a5=_0x1840f3[_0x41b6da(0x110)](_0xe0a31,_0x1840f3[_0x41b6da(0xd5)])?_0x1840f3['fSXvR']:'',_0x482a26=join(_0x235302,_0x4a789c+'-'+Date['now']()+_0x41b1a5+_0x41b6da(0xfb));return await _0x1840f3[_0x41b6da(0xec)](writeFile,_0x482a26,JSON[_0x41b6da(0x144)](_0x5f4eb6,null,0x2)),{'configPath':_0x482a26,'storageStatePath':_0x1d136e};}export async function buildPlaywrightCliConfig(_0x2ba2aa,_0x5f1547,_0x29d179,_0x56a557,_0xa008e6){const _0x44222a=_0x3317b6,_0x532ae5={'mrauw':function(_0x5ea0c3,_0x13d41a,_0x9536,_0x32fa03,_0x6fc041,_0x335c26,_0x151e60){return _0x5ea0c3(_0x13d41a,_0x9536,_0x32fa03,_0x6fc041,_0x335c26,_0x151e60);},'NxzYz':_0x44222a(0x11a)};if(_0xa008e6)return _0x532ae5[_0x44222a(0x13e)](buildPlaywrightConfigCore,_0x2ba2aa,_0xa008e6,_0x5f1547,_0x29d179,_0x56a557,'playwright-cli');const {storageStatePath:_0x2811bf,tempAuthPath:_0x2273ce}=await resolveLocalAuthPath(getEnvDir(_0x5f1547));try{const _0x2ffc19=await _0x532ae5['mrauw'](buildPlaywrightConfigCore,_0x2ba2aa,_0x2811bf,_0x5f1547,_0x29d179,_0x56a557,_0x532ae5['NxzYz']);return{..._0x2ffc19,'tempAuthPath':_0x2273ce};}catch(_0x4c995e){_0x2273ce&&await unlink(_0x2273ce)[_0x44222a(0x141)](()=>{});throw _0x4c995e;}}export async function buildRangerwrightCliConfig(_0x557a5,_0x45c77d,_0xeae1f1,_0x58053b,_0x2c04c6){const _0x5aca55=_0x3317b6,_0x4ad933={'xGTzB':function(_0x27d514,_0x42e5dc){return _0x27d514===_0x42e5dc;},'bwBCq':'clipboard-read','EkIgh':function(_0x6c7d8d,_0x4d16b5){return _0x6c7d8d(_0x4d16b5);},'JkSWu':function(_0x1ea5c6,_0x38abfc,_0x440bc5,_0x1087d4){return _0x1ea5c6(_0x38abfc,_0x440bc5,_0x1087d4);},'IhpyK':function(_0x2b58a4){return _0x2b58a4();},'HhTkn':'sessions','avIoU':function(_0x33a64f,_0x1d5775){return _0x33a64f(_0x1d5775);},'GKUxe':'chromium'},{storageStatePath:_0x5e3b68,tempAuthPath:_0x935029}=_0x2c04c6?{'storageStatePath':_0x2c04c6,'tempAuthPath':undefined}:await resolveLocalAuthPath(_0x4ad933[_0x5aca55(0x139)](getEnvDir,_0x45c77d)),_0x5821ec=_0xeae1f1||randomUUID(),_0xd2a2bf=_0x4ad933['JkSWu'](join,_0x4ad933['IhpyK'](getRangerDir),_0x4ad933['HhTkn'],_0x5821ec),_0x168e04=_0x4ad933[_0x5aca55(0x101)](Boolean,_0x557a5[_0x5aca55(0x129)]),_0x396c78=_0x168e04?{'browserName':_0x4ad933['GKUxe'],'cdpEndpoint':_0x557a5['cdpEndpoint']}:((()=>{const _0x4820d9=_0x5aca55,{launchOptions:_0xc47f26,contextOptions:_0x27e1a8}=buildBrowserOptionsFromSettings(_0x557a5,{'headless':_0x58053b?![]:_0x557a5[_0x4820d9(0x10d)]??!![],'storageStatePath':_0x5e3b68});if(_0x4ad933[_0x4820d9(0xcb)](process[_0x4820d9(0x11e)]?.(),0x0)){const _0x4560ec=[_0x4820d9(0x142),_0x4820d9(0xe2)],_0x4c0076=_0xc47f26[_0x4820d9(0xe0)]??[],_0x57b85d=_0x4560ec['filter'](_0x1783a2=>!_0x4c0076['includes'](_0x1783a2));_0xc47f26[_0x4820d9(0xe0)]=[..._0x4c0076,..._0x57b85d];}return{'browserName':'chromium','launchOptions':_0xc47f26,'contextOptions':{..._0x27e1a8,'permissions':[_0x4ad933['bwBCq'],'clipboard-write'],'viewport':{'width':0x500,'height':0x2d0}}};})());if(!_0x168e04){const _0xc6a93e=_0x396c78['contextOptions'];if(_0xc6a93e){if(_0x4ad933[_0x5aca55(0xcb)](_0xc6a93e['userAgent'],undefined))delete _0xc6a93e['userAgent'];if(_0xc6a93e[_0x5aca55(0x120)]===undefined)delete _0xc6a93e['storageState'];}}const _0x29eef6={'browser':_0x396c78,'outputDir':_0xd2a2bf,'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'settle':{'navigationLoadTimeoutMs':0x7530,'networkSettleTimeoutMs':0x1388,'networkIdleWindowMs':0x1f4,'postActionAnimationFrameCount':0x2}};let _0x54b581;try{const _0x5216fb=join(tmpdir(),'ranger-config');!existsSync(_0x5216fb)&&await mkdir(_0x5216fb,{'recursive':!![]}),_0x54b581=join(_0x5216fb,_0x45c77d+'-'+Date[_0x5aca55(0x10c)]()+_0x5aca55(0x118)),await writeFile(_0x54b581,JSON['stringify'](_0x29eef6,null,0x2));}catch(_0x2e5983){_0x935029&&await _0x4ad933['avIoU'](unlink,_0x935029)[_0x5aca55(0x141)](()=>{});throw _0x2e5983;}return{'configPath':_0x54b581,'storageStatePath':_0x5e3b68,'tempAuthPath':_0x935029,'outputDir':_0xd2a2bf};}export async function buildNovaActCliConfig(_0x5f13cc,_0x563112,_0x9875b7,_0x1cc341,_0x5db7ec){const _0x5d7ea6=_0x3317b6,_0x3ea2ef={'QsySB':function(_0xc753ed){return _0xc753ed();},'phjGK':_0x5d7ea6(0x115),'ISXqM':function(_0x551166,_0x10efe7,_0x5e92ac){return _0x551166(_0x10efe7,_0x5e92ac);},'hhVBe':function(_0x36b69f,_0x3eff3b){return _0x36b69f===_0x3eff3b;},'VYMJg':_0x5d7ea6(0xed),'exUxf':function(_0x8d8935,_0xaf6057){return _0x8d8935(_0xaf6057);},'JHJkw':function(_0x3b7a07,_0x5f3f1f){return _0x3b7a07(_0x5f3f1f);},'jwDeU':function(_0x83f0a9,_0x5e3007){return _0x83f0a9(_0x5e3007);}},{storageStatePath:_0x59cfe3,tempAuthPath:_0x14f8d5}=_0x5db7ec?{'storageStatePath':_0x5db7ec,'tempAuthPath':undefined}:await resolveLocalAuthPath(getEnvDir(_0x563112)),_0xfee6a3=_0x9875b7||_0x3ea2ef[_0x5d7ea6(0x13f)](randomUUID),_0x5a0a7e=join(getRangerDir(),_0x3ea2ef[_0x5d7ea6(0x12d)],_0xfee6a3),_0x3013d0=join(_0x5a0a7e,'nova-user-data'),_0x3dec77=_0x59cfe3?_0x3ea2ef['ISXqM'](join,_0x3013d0,_0x5d7ea6(0x106)):undefined,{launchOptions:_0x384755,contextOptions:_0x5bdf10}=buildBrowserOptionsFromSettings(_0x5f13cc,{'headless':_0x1cc341?![]:_0x5f13cc[_0x5d7ea6(0x10d)]??!![],'storageStatePath':_0x59cfe3});if(_0x3ea2ef[_0x5d7ea6(0xe7)](process[_0x5d7ea6(0x11e)]?.(),0x0)){const _0x364e26=[_0x5d7ea6(0x142),_0x5d7ea6(0xe2)],_0x4d0681=_0x384755['args']??[],_0x1ca5fc=_0x364e26['filter'](_0x54e266=>!_0x4d0681[_0x5d7ea6(0xdb)](_0x54e266));_0x384755['args']=[..._0x4d0681,..._0x1ca5fc];}const _0x250ca2=typeof _0x384755['executablePath']===_0x3ea2ef[_0x5d7ea6(0x10e)]?_0x384755[_0x5d7ea6(0x12f)]:_0x59cfe3?chromium['executablePath']():undefined;return{'storageStatePath':_0x59cfe3,'tempAuthPath':_0x14f8d5,'baseUrl':_0x5f13cc[_0x5d7ea6(0x102)],'headless':_0x3ea2ef[_0x5d7ea6(0xc8)](Boolean,_0x384755[_0x5d7ea6(0x10d)]),'userDataDir':_0x3013d0,'browserProfilePath':_0x3dec77,'executablePath':_0x250ca2,'launchArgs':Array['isArray'](_0x384755[_0x5d7ea6(0xe0)])?_0x384755['args']['filter'](_0x322f0c=>typeof _0x322f0c===_0x5d7ea6(0xed)):[],'userAgent':typeof _0x5bdf10[_0x5d7ea6(0xde)]===_0x5d7ea6(0xed)?_0x5bdf10[_0x5d7ea6(0xde)]:undefined,'extraHTTPHeaders':_0x5bdf10['extraHTTPHeaders'],'allowInsecureLocalhost':_0x3ea2ef[_0x5d7ea6(0xc8)](Boolean,_0x5f13cc[_0x5d7ea6(0xd6)]),'safeMode':_0x3ea2ef['JHJkw'](Boolean,_0x5f13cc[_0x5d7ea6(0x13a)]),'cdpEndpoint':_0x5f13cc['cdpEndpoint'],'isCdpMode':_0x3ea2ef['jwDeU'](Boolean,_0x5f13cc[_0x5d7ea6(0x129)])};}export function getNestedValue(_0x4a4b4c,_0x704992){const _0x44fe46=_0x3317b6,_0xd87550={'BGHIS':function(_0x1d6831,_0x2f0926){return _0x1d6831(_0x2f0926);},'poVDK':function(_0x522a26,_0x5ce6eb){return _0x522a26===_0x5ce6eb;},'OdxHK':function(_0x4eefee,_0x4b1e56){return _0x4eefee===_0x4b1e56;},'ddURF':function(_0x12f328,_0x189aaf){return _0x12f328!==_0x189aaf;},'sgDKK':_0x44fe46(0x13c)},_0xcf6dd=_0xd87550['BGHIS'](parseKeyPath,_0x704992);let _0x3c53f8=_0x4a4b4c;for(const _0x4064a7 of _0xcf6dd){if(_0xd87550['poVDK'](_0x3c53f8,null)||_0xd87550[_0x44fe46(0x128)](_0x3c53f8,undefined)||_0xd87550['ddURF'](typeof _0x3c53f8,_0xd87550[_0x44fe46(0xdd)]))return undefined;_0x3c53f8=_0x3c53f8[_0x4064a7];}return _0x3c53f8;}export function setNestedValue(_0x285421,_0x2200c5,_0x2761a3){const _0x1b1614=_0x3317b6,_0x1861ef={'lNNKH':function(_0x468764,_0x59cafa){return _0x468764(_0x59cafa);},'yAOCf':function(_0xc7d3b1,_0x535b4d){return _0xc7d3b1<_0x535b4d;},'WRGTU':function(_0x417b36,_0xc7b671){return _0x417b36 in _0xc7b671;},'cJKex':function(_0x32e56e,_0x2d6f62){return _0x32e56e-_0x2d6f62;}},_0x34b9eb=_0x1861ef['lNNKH'](parseKeyPath,_0x2200c5);let _0x5f02a5=_0x285421;for(let _0x18a626=0x0;_0x1861ef[_0x1b1614(0xfc)](_0x18a626,_0x34b9eb['length']-0x1);_0x18a626++){const _0x40aefe=_0x34b9eb[_0x18a626];(!_0x1861ef['WRGTU'](_0x40aefe,_0x5f02a5)||typeof _0x5f02a5[_0x40aefe]!==_0x1b1614(0x13c))&&(_0x5f02a5[_0x40aefe]={}),_0x5f02a5=_0x5f02a5[_0x40aefe];}_0x5f02a5[_0x34b9eb[_0x1861ef['cJKex'](_0x34b9eb[_0x1b1614(0x137)],0x1)]]=_0x2761a3;}export function deleteNestedValue(_0x41f69f,_0xfe1e84){const _0x4f4939=_0x3317b6,_0x1b3c05={'cTDds':function(_0x3e2acc,_0x42a5b){return _0x3e2acc(_0x42a5b);},'zluZD':function(_0x5c21e4,_0x3f544d){return _0x5c21e4-_0x3f544d;},'HBIrL':function(_0x173038,_0x3bedbc){return _0x173038===_0x3bedbc;},'vSpCa':function(_0x219e5f,_0xc32df2){return _0x219e5f===_0xc32df2;},'wNpRm':_0x4f4939(0x13c),'jFaVE':function(_0x379f35,_0x54ff6d){return _0x379f35!==_0x54ff6d;}},_0x466b0b=_0x1b3c05['cTDds'](parseKeyPath,_0xfe1e84);let _0x166048=_0x41f69f;for(let _0x284c05=0x0;_0x284c05<_0x1b3c05[_0x4f4939(0x127)](_0x466b0b['length'],0x1);_0x284c05++){if(_0x1b3c05['HBIrL'](_0x166048,null)||_0x1b3c05[_0x4f4939(0x136)](_0x166048,undefined)||typeof _0x166048!==_0x1b3c05[_0x4f4939(0x112)])return![];_0x166048=_0x166048[_0x466b0b[_0x284c05]];}if(_0x1b3c05[_0x4f4939(0x136)](_0x166048,null)||_0x166048===undefined||_0x1b3c05['jFaVE'](typeof _0x166048,_0x1b3c05['wNpRm']))return![];const _0xd8ab2a=_0x466b0b[_0x466b0b['length']-0x1];if(_0xd8ab2a in _0x166048)return delete _0x166048[_0xd8ab2a],!![];return![];}function parseKeyPath(_0x165727){const _0x54ca27=_0x3317b6,_0x3b4840={'PscCT':function(_0x328c28,_0x5c1806){return _0x328c28===_0x5c1806;},'cJJJu':'headers','pGoYC':_0x54ca27(0x111),'Zooum':_0x54ca27(0x109)},_0x1d1df3=_0x165727['split']('.');return _0x3b4840[_0x54ca27(0xca)](_0x1d1df3[0x0],'header')&&(_0x1d1df3[0x0]=_0x3b4840['cJJJu']),_0x1d1df3[0x0]===_0x3b4840['pGoYC']&&(_0x1d1df3[0x0]=_0x3b4840['Zooum']),_0x1d1df3;}function _0x8c18(){const _0x36bb97=['EkIgh','safeMode','lumBZ','object','pmfqU','mrauw','QsySB','wNvSJ','catch','--no-sandbox','path','stringify','20cWYCvI','rangerDir','\x22\x20to\x20legacy\x20path\x20','UAwPZ','See\x20https://docs.ranger.net/main/concepts/profiles\x20for\x20setup\x20options.','ranger-auth-','692235uXrwoe','4632JFLfQE','RqNiY','jkTLo','exUxf','all','PscCT','xGTzB','8TfeVTd','rweoa','replace','AaCdh','headers','clipboard-read','DRyKr','fromEntries','launchOptions','QKeBW','allowInsecureLocalhost','auth.json.enc','XeOLF','pyCZE','env','includes','forWrite','sgDKK','userAgent','location','args','xJdGr','--disable-setuid-sandbox','cQGUv','3754922pumVaw','1rYrULo','isArray','hhVBe','pEJMe','xvcDw','message','endsWith','zvQnQ','string','--allow-insecure-localhost','2100161IOzTdc','ULUSx','tYUoG','--disable-web-security','stagehand','push','gZXWp','MuKLI','local','16QFQJMx','settings.json','filter','.json','yAOCf','extraHTTPHeaders','code','Environment\x20variable\x20','ranger-config','avIoU','baseUrl','xoeDx','AMRLh','Refusing\x20to\x20write\x20profile\x20\x22','Default','locations','EESty','setupHeaders','clipboard-write','DXVRV','now','headless','VYMJg','legacy','GilSX','setupHeader','wNpRm','dlZAo','TXoUU','sessions','6NJXLsc','rcvVm','-rangerwright.json','ukadg','playwright-cli','utf-8','51469FymfJS','NDGqF','getuid','FMBnT','storageState','OVgiF','GxCWb','Failed\x20to\x20decrypt\x20auth\x20state:\x20','433850UDjqBn','4799106XZlQib','ZfnNn','zluZD','OdxHK','cdpEndpoint','XOBvd','wxLuo','39966927VYhIgW','phjGK','browser','executablePath','vision','join','core','map','\x20is\x20not\x20set','ShRSB','vSpCa','length','wbxNt'];_0x8c18=function(){return _0x36bb97;};return _0x8c18();}export function formatSettings(_0x59a643,_0x22bd25=0x0){const _0x1dc1d6=_0x3317b6,_0x8fe0ce={'xoeDx':function(_0x1618a2,_0x1b4236){return _0x1618a2===_0x1b4236;},'DBwKn':_0x1dc1d6(0x13c)},_0x1dc67f=[],_0x4922d9='\x20\x20'['repeat'](_0x22bd25);for(const [_0x15f3a6,_0xa5a09]of Object['entries'](_0x59a643)){if(_0xa5a09===undefined)continue;if(_0x8fe0ce[_0x1dc1d6(0x103)](typeof _0xa5a09,_0x8fe0ce['DBwKn'])&&_0xa5a09!==null){_0x1dc67f['push'](''+_0x4922d9+_0x15f3a6+':');for(const [_0x46aeaa,_0x4bed8c]of Object['entries'](_0xa5a09)){_0x1dc67f[_0x1dc1d6(0xf4)](_0x4922d9+'\x20\x20'+_0x46aeaa+':\x20'+_0x4bed8c);}}else _0x1dc67f['push'](''+_0x4922d9+_0x15f3a6+':\x20'+_0xa5a09);}return _0x1dc67f[_0x1dc1d6(0x131)]('\x0a');}
|
|
1
|
+
const _0x31c664=_0x3abf;(function(_0xc168d,_0x4679e7){const _0x537684=_0x3abf,_0x4b0254=_0xc168d();while(!![]){try{const _0x5ce987=-parseInt(_0x537684(0x1a1))/0x1+parseInt(_0x537684(0x14a))/0x2+parseInt(_0x537684(0x178))/0x3+-parseInt(_0x537684(0x15c))/0x4+-parseInt(_0x537684(0x1c1))/0x5*(-parseInt(_0x537684(0x15d))/0x6)+parseInt(_0x537684(0x1ad))/0x7+-parseInt(_0x537684(0x1c7))/0x8*(parseInt(_0x537684(0x149))/0x9);if(_0x5ce987===_0x4679e7)break;else _0x4b0254['push'](_0x4b0254['shift']());}catch(_0x37ce87){_0x4b0254['push'](_0x4b0254['shift']());}}}(_0x5f9b,0x4d8f4));import{readFile,writeFile,mkdir,unlink}from'fs/promises';function _0x5f9b(){const _0x2cf7af=['-cli','FjoYa','DBNLr','RXezv','4095833wJGZgu','safeMode','iuUkm','legacy','UlxrX','jBUNB','Refusing\x20to\x20write\x20profile\x20\x22','ranger-config','huynR','UoLwp','allow','No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','args','CjhZX','string','--allow-insecure-localhost','lIUqE','gdLXD','klJtT','XltUC','356705UNJRSM','ClygZ','yCgBF','LJkjR','cefHN','UdQEz','32488DFfIXf','length','browser','XeINN','MKIQP','--no-sandbox','63jQxnin','514664WcaOip','--disable-setuid-sandbox','Oyusv','pRTjD','Aantw','userAgent','lVtyY','BbUCm','LRjSD','WKWmm','setupHeader','Environment\x20variable\x20','indexOf','lzLPo','allowInsecureLocalhost','install','jFvRb','VBqYN','2378596KqamrO','6tkzVMx','clipboard-read','rangerDir','ignoreHTTPSErrors','core','message','replace','forWrite','sessions','baseUrl','qLycn','path','ENOENT','FLCVR','map','PtvAg','headless','playwright-cli','cdpEndpoint','filter','MBJCp','That\x20directory\x20is\x20read-only\x20now.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','object','vnfrW','chromium','DRpnj','storageStatePath','810948qJFznj','extraHTTPHeaders','rbhNJ','repeat','ITVWa','pIiYG','auth.json.enc','GYzMO','snaED','BSrhW','qgVEr','clipboard-write','keys','warn','\x20is\x20not\x20set','split','fromEntries','catch','QkYaz','Failed\x20to\x20clean\x20up\x20temp\x20file\x20','sfwCK','agLXQ','LOolY','fNxrc','headers','stagehand','getuid','Default','entries','fNsZB','Thvrm','local','YMYLs','lzGww','includes','stringify','kHiis','file','launchOptions','LtdbH','isArray','243348hjGliu','rPJVM','now','HaLOT','storageState','contextOptions','NLHaD','iFKMD'];_0x5f9b=function(){return _0x2cf7af;};return _0x5f9b();}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(_0x4443e5,_0x5a2683){const _0x254931=_0x3abf,_0x49601f={'Dbfsf':_0x254931(0x197),'mwfMi':function(_0x246f30,_0x546921,_0x3657f7){return _0x246f30(_0x546921,_0x3657f7);},'CjhZX':function(_0x271e06,_0x3c6282){return _0x271e06(_0x3c6282);},'gdLXD':function(_0x557632,_0x974242){return _0x557632!==_0x974242;},'lVtyY':function(_0x458623,_0x5039d3){return _0x458623(_0x5039d3);}},_0x449e7f=join(_0x5a2683,'ci',_0x4443e5),_0x15a8ff=join(_0x5a2683,_0x49601f['Dbfsf'],_0x4443e5),_0x310d3b=_0x49601f['mwfMi'](join,_0x5a2683,_0x4443e5),_0x2bbb20=join(_0x5a2683,'local'),_0xc9cb7=join(_0x5a2683,'ci');if(existsSync(_0x449e7f))return _0x449e7f;if(_0x49601f[_0x254931(0x1ba)](existsSync,_0x15a8ff))return _0x15a8ff;if(_0x49601f['CjhZX'](existsSync,_0x310d3b)&&(_0x49601f[_0x254931(0x1be)](_0x310d3b,_0x2bbb20)&&_0x49601f[_0x254931(0x1be)](_0x310d3b,_0xc9cb7)?!![]:_0x49601f[_0x254931(0x150)](hasLegacyProfileFiles,_0x310d3b)))return _0x310d3b;return null;}export function getEnvDir(_0x4ff28d,_0x1146d2={}){const _0x198e25=_0x3abf,_0x19eb03={'ITVWa':function(_0x370871){return _0x370871();},'pYPnB':function(_0x42cb1a,_0x536c67){return _0x42cb1a(_0x536c67);},'Thvrm':'local'},_0x4d6bdf=_0x19eb03[_0x198e25(0x17c)](getRangerDir),_0x1c463e=findEnvInRoot(_0x4ff28d,_0x4d6bdf);if(_0x1c463e){if(_0x1146d2[_0x198e25(0x164)]&&_0x19eb03['pYPnB'](isLegacyEnvPath,_0x1c463e))throw legacyWriteError(_0x4ff28d,_0x1c463e);return _0x1c463e;}const _0x424df9=getRangerHomeDir();if(_0x424df9!==_0x4d6bdf){const _0x734ca8=findEnvInRoot(_0x4ff28d,_0x424df9);if(_0x734ca8){if(_0x1146d2[_0x198e25(0x164)]&&isLegacyEnvPath(_0x734ca8))throw legacyWriteError(_0x4ff28d,_0x734ca8);return _0x734ca8;}}const _0xc11f08=join(_0x424df9,_0x19eb03[_0x198e25(0x196)],_0x4ff28d);if(_0x1146d2['forWrite'])throw legacyWriteError(_0x4ff28d,_0xc11f08);return _0xc11f08;}function isLegacyEnvPath(_0xaa8a8c){const _0x2131b7=_0x3abf,_0x11161e={'sfwCK':function(_0x158561){return _0x158561();},'hublb':function(_0x4a4413,_0x3a386e){return _0x4a4413+_0x3a386e;},'LJkjR':function(_0x2829da,_0x2d48f6){return _0x2829da===_0x2d48f6;}},_0x2d4126=getRangerDir(),_0x303b91=_0x11161e[_0x2131b7(0x18c)](getRangerHomeDir);for(const _0x5b22ab of new Set([_0x2d4126,_0x303b91])){const _0x23779f=_0x5b22ab['endsWith']('/')?_0x5b22ab:_0x11161e['hublb'](_0x5b22ab,'/');if(_0x11161e[_0x2131b7(0x1c4)](_0xaa8a8c,_0x5b22ab)||_0xaa8a8c['startsWith'](_0x23779f))return!![];}return![];}function legacyWriteError(_0x54b008,_0x39180c){const _0x504e54=_0x3abf;return new Error(_0x504e54(0x1b3)+_0x54b008+'\x22\x20to\x20legacy\x20path\x20'+_0x39180c+'.\x0a'+_0x504e54(0x172)+'\x20\x20ranger\x20profile\x20add\x20<name>\x0a'+'See\x20https://docs.ranger.net/main/concepts/profiles\x20for\x20setup\x20options.');}export function findExistingEnv(_0x59b912,_0x44f320){const _0x20813=_0x3abf,_0x46858e={'qNaFc':function(_0x2b5c12){return _0x2b5c12();},'PtvAg':_0x20813(0x197),'Oyusv':'legacy','UdQEz':function(_0x57f9f9,_0x23e6d8,_0x4fae55){return _0x57f9f9(_0x23e6d8,_0x4fae55);},'iFKMD':function(_0xe2262d,_0x443e62,_0x581cc9,_0x379aad){return _0xe2262d(_0x443e62,_0x581cc9,_0x379aad);},'ACPlu':function(_0x47795a,_0x202436,_0x44b1d1,_0x3b11fe){return _0x47795a(_0x202436,_0x44b1d1,_0x3b11fe);},'XeINN':function(_0x337ebf,_0x59f2dc){return _0x337ebf(_0x59f2dc);},'snaED':function(_0x1a5b09,_0x5ea603){return _0x1a5b09===_0x5ea603;},'hfWdF':function(_0x31a314,_0x467dda){return _0x31a314(_0x467dda);}},_0x3d32b8=_0x44f320?.[_0x20813(0x15f)],_0x4a7db0=_0x3d32b8?[_0x3d32b8]:[getRangerDir(),_0x46858e['qNaFc'](getRangerHomeDir)]['filter']((_0x36c1aa,_0x27f960,_0x9c0c63)=>_0x9c0c63[_0x20813(0x156)](_0x36c1aa)===_0x27f960),_0x549047=_0x44f320?.['locations']??['ci',_0x46858e[_0x20813(0x16c)],_0x46858e[_0x20813(0x14c)]];for(const _0x291250 of _0x4a7db0){const _0x4835d7=_0x46858e[_0x20813(0x1c6)](join,_0x291250,_0x20813(0x197)),_0x392758=join(_0x291250,'ci'),_0x550bce=[{'location':'ci','path':_0x46858e[_0x20813(0x1a8)](join,_0x291250,'ci',_0x59b912)},{'location':'local','path':_0x46858e['ACPlu'](join,_0x291250,_0x46858e[_0x20813(0x16c)],_0x59b912)},{'location':_0x46858e['Oyusv'],'path':join(_0x291250,_0x59b912)}];for(const _0x30baf1 of _0x550bce){if(_0x549047['includes'](_0x30baf1['location'])&&_0x46858e[_0x20813(0x1ca)](existsSync,_0x30baf1['path'])){if(_0x46858e['snaED'](_0x30baf1['location'],_0x20813(0x1b0))&&(_0x46858e[_0x20813(0x180)](_0x30baf1['path'],_0x4835d7)||_0x46858e[_0x20813(0x180)](_0x30baf1['path'],_0x392758))&&!_0x46858e['hfWdF'](hasLegacyProfileFiles,_0x30baf1[_0x20813(0x168)]))continue;return{'path':_0x30baf1[_0x20813(0x168)],'location':_0x30baf1['location']};}}}return null;}function hasLegacyProfileFiles(_0x12e0d8){const _0x29eb54=_0x3abf,_0xfbc4c1={'pRTjD':function(_0x4b1e4d,_0x3a2595){return _0x4b1e4d(_0x3a2595);},'ywXAj':function(_0x5efa65,_0x19ce46,_0x52b059){return _0x5efa65(_0x19ce46,_0x52b059);}};return _0xfbc4c1[_0x29eb54(0x14d)](existsSync,join(_0x12e0d8,'settings.json'))||_0xfbc4c1['pRTjD'](existsSync,join(_0x12e0d8,'auth.json'))||_0xfbc4c1[_0x29eb54(0x14d)](existsSync,_0xfbc4c1['ywXAj'](join,_0x12e0d8,_0x29eb54(0x17e)));}export function isEnvCi(_0x22fa6c){const _0x1b5fea=_0x3abf,_0x6b2cda={'qBGVJ':function(_0x5450fe,_0x684921){return _0x5450fe(_0x684921);},'UoLwp':function(_0x5e1200){return _0x5e1200();},'EcGvS':function(_0x371364,_0x5639cf){return _0x371364!==_0x5639cf;},'qgVEr':function(_0x3d7ade,_0x23d3fe){return _0x3d7ade(_0x23d3fe);},'VBqYN':function(_0x297266,_0x45a6ca,_0x58faeb,_0x127276){return _0x297266(_0x45a6ca,_0x58faeb,_0x127276);}};if(_0x6b2cda['qBGVJ'](existsSync,join(getRangerDir(),'ci',_0x22fa6c)))return!![];const _0x49f650=_0x6b2cda['UoLwp'](getRangerHomeDir);if(_0x6b2cda['EcGvS'](_0x49f650,_0x6b2cda[_0x1b5fea(0x1b6)](getRangerDir))&&_0x6b2cda[_0x1b5fea(0x182)](existsSync,_0x6b2cda[_0x1b5fea(0x15b)](join,_0x49f650,'ci',_0x22fa6c)))return!![];return![];}export async function cleanupTempFiles(_0xaea625){const _0xbbe125=_0x3abf,_0x5a6640={'jFvRb':function(_0x233b0d,_0x38f0bd){return _0x233b0d!==_0x38f0bd;}},_0x5649be=[_0xaea625['tempAuthPath'],_0xaea625['configPath']]['filter'](Boolean);await Promise['all'](_0x5649be[_0xbbe125(0x16b)](_0x3563cf=>unlink(_0x3563cf)['catch'](_0x3a37cc=>{const _0x3f5f37=_0xbbe125;_0x5a6640[_0x3f5f37(0x15a)](_0x3a37cc['code'],_0x3f5f37(0x169))&&console[_0x3f5f37(0x185)](_0x3f5f37(0x18b)+_0x3563cf+':',_0x3a37cc[_0x3f5f37(0x162)]);})));}export function getSettingsPath(_0xa7a01f){return join(getEnvDir(_0xa7a01f),'settings.json');}export async function loadSettings(_0x4ddf41){const _0x5e00e2={'jGvDj':function(_0xf23c46,_0x417439){return _0xf23c46(_0x417439);}},_0x5266ca=_0x5e00e2['jGvDj'](getSettingsPath,_0x4ddf41);if(!existsSync(_0x5266ca))return{};try{const _0x2671e8=await readFile(_0x5266ca,'utf-8');return JSON['parse'](_0x2671e8);}catch{return{};}}export async function saveSettings(_0x5177a2,_0x572028){const _0x5e6fd7=_0x3abf,_0x453cfa={'qLycn':function(_0x438fd0,_0x1a3242){return _0x438fd0(_0x1a3242);},'MKIQP':function(_0x2c95a6,_0x79cd69){return _0x2c95a6(_0x79cd69);}},_0x7e3d7b=_0x453cfa['qLycn'](getSettingsPath,_0x5177a2),_0x577127=_0x453cfa[_0x5e6fd7(0x167)](dirname,_0x7e3d7b);!_0x453cfa[_0x5e6fd7(0x1cb)](existsSync,_0x577127)&&await mkdir(_0x577127,{'recursive':!![]}),await writeFile(_0x7e3d7b,JSON['stringify'](_0x572028,null,0x2));}export function resolveEnvVars(_0x517ca2){const _0x4f9803=_0x3abf,_0x3932c5={'kssjv':function(_0x4f6876,_0x1da5e6){return _0x4f6876===_0x1da5e6;},'rERdh':_0x4f9803(0x1bb),'ptUbC':function(_0x13d590,_0x399f6c){return _0x13d590===_0x399f6c;}};if(typeof _0x517ca2===_0x3932c5['rERdh'])return _0x517ca2[_0x4f9803(0x163)](/\$\{(\w+)\}/g,(_0x1af523,_0x2641a9)=>{const _0x2dda6c=_0x4f9803,_0x794c8a=process['env'][_0x2641a9];if(_0x3932c5['kssjv'](_0x794c8a,undefined))throw new Error(_0x2dda6c(0x155)+_0x2641a9+_0x2dda6c(0x186));return _0x794c8a;});if(Array[_0x4f9803(0x1a0)](_0x517ca2))return _0x517ca2['map'](resolveEnvVars);if(_0x517ca2&&_0x3932c5['ptUbC'](typeof _0x517ca2,'object'))return Object[_0x4f9803(0x188)](Object[_0x4f9803(0x194)](_0x517ca2)[_0x4f9803(0x16b)](([_0x2f949d,_0x3c2340])=>[_0x2f949d,resolveEnvVars(_0x3c2340)]));return _0x517ca2;}const isRecord=_0x5303d2=>typeof _0x5303d2==='object'&&_0x5303d2!==null&&!Array[_0x31c664(0x1a0)](_0x5303d2),asRecord=_0x270862=>isRecord(_0x270862)?_0x270862:undefined,mergeHeaders=(_0x386808,_0x2b232b)=>{const _0xf8588b=_0x31c664,_0x3709cb={'FUxCT':function(_0x485bc0,_0x47d0d6){return _0x485bc0??_0x47d0d6;}},_0x57803f={..._0x3709cb['FUxCT'](_0x386808,{}),..._0x3709cb['FUxCT'](_0x2b232b,{})};return Object[_0xf8588b(0x184)](_0x57803f)['length']?_0x57803f:undefined;},SAFE_MODE_ARGS=['--disable-features=WebBluetooth'],ALLOW_LOCALHOST_ARGS=['--disable-web-security','--allow-running-insecure-content','--unsafely-treat-insecure-origin-as-secure=http://localhost',_0x31c664(0x1bc)];export function buildBrowserOptionsFromSettings(_0xad161d,_0x5780e3={}){const _0x3d9db8=_0x31c664,_0x3a6e85={'YMYLs':function(_0x3ef2c1,_0x182131){return _0x3ef2c1(_0x182131);},'FjoYa':_0x3d9db8(0x1bb),'TkVlF':function(_0x302d5c,_0x1b0638,_0x407a90){return _0x302d5c(_0x1b0638,_0x407a90);}},_0x373500=asRecord(_0xad161d['browser']),_0x42b179={...asRecord(_0x373500?.[_0x3d9db8(0x19e)])??{}};typeof _0x5780e3[_0x3d9db8(0x16d)]==='boolean'&&(_0x42b179['headless']=_0x5780e3[_0x3d9db8(0x16d)]);if(_0xad161d['safeMode']){const _0xbccf21=_0x42b179['args']??[],_0x21a81b=SAFE_MODE_ARGS[_0x3d9db8(0x170)](_0x48ee92=>!_0xbccf21['includes'](_0x48ee92));_0x42b179['args']=[..._0xbccf21,..._0x21a81b];}if(_0xad161d[_0x3d9db8(0x158)]){const _0x483ef3=_0x42b179['args']??[],_0x3d0c99=ALLOW_LOCALHOST_ARGS[_0x3d9db8(0x170)](_0x877d9d=>!_0x483ef3['includes'](_0x877d9d));_0x42b179['args']=[..._0x483ef3,..._0x3d0c99];}const _0x14abbf={..._0x3a6e85[_0x3d9db8(0x198)](asRecord,_0x373500?.[_0x3d9db8(0x1a6)])??{}};_0x14abbf[_0x3d9db8(0x160)]=!![];typeof _0xad161d[_0x3d9db8(0x14f)]===_0x3a6e85[_0x3d9db8(0x1aa)]&&(_0x14abbf['userAgent']=_0xad161d['userAgent']);const _0x401485=_0x3a6e85['TkVlF'](mergeHeaders,asRecord(_0x14abbf['extraHTTPHeaders']),asRecord(_0xad161d[_0x3d9db8(0x190)]));return _0x401485?_0x14abbf['extraHTTPHeaders']=_0x401485:delete _0x14abbf[_0x3d9db8(0x179)],_0x5780e3[_0x3d9db8(0x177)]&&(_0x14abbf[_0x3d9db8(0x1a5)]=_0x5780e3['storageStatePath']),{'launchOptions':_0x42b179,'contextOptions':_0x14abbf};}export async function resolveProfileStorageState(_0x2abcce){const _0x496b22=_0x31c664,_0x139588={'rbhNJ':function(_0x3b2a6b,_0x41e385){return _0x3b2a6b(_0x41e385);}};return resolveLocalAuthPath(_0x139588[_0x496b22(0x17a)](getEnvDir,_0x2abcce));}async function resolveLocalAuthPath(_0x3c4655){const _0x3a50d8=_0x31c664,_0x5f5c95={'BtXCy':function(_0x492bcb,_0x45e5d3,_0x2bccf0){return _0x492bcb(_0x45e5d3,_0x2bccf0);},'HQNmW':function(_0x235b88,_0xf29c8d,_0x59ba7){return _0x235b88(_0xf29c8d,_0x59ba7);},'oYHZw':function(_0x4ba1c2){return _0x4ba1c2();},'huynR':function(_0x198b0f,_0x573cde){return _0x198b0f(_0x573cde);},'NLHaD':function(_0x1f5f5e,_0x306215){return _0x1f5f5e(_0x306215);}},_0x5d0eb1=_0x5f5c95['BtXCy'](join,_0x3c4655,'auth.json.enc'),_0x2a7961=join(_0x3c4655,'auth.json');if(existsSync(_0x5d0eb1))try{const _0x1b4caf=await getToken();if(!_0x1b4caf)throw new Error(_0x3a50d8(0x1b8));const _0xd31cd7=await readFile(_0x5d0eb1),_0x4e182a=_0x5f5c95['HQNmW'](decrypt,_0xd31cd7,_0x1b4caf),_0x1fede4=join(_0x5f5c95['oYHZw'](tmpdir),'ranger-auth-'+Date['now']()+'.json');return await writeFile(_0x1fede4,_0x4e182a),{'storageStatePath':_0x1fede4,'tempAuthPath':_0x1fede4};}catch(_0x5ec1b1){const _0x28e109=_0x5ec1b1 instanceof Error?_0x5ec1b1[_0x3a50d8(0x162)]:_0x5f5c95[_0x3a50d8(0x1b5)](String,_0x5ec1b1);throw new Error('Failed\x20to\x20decrypt\x20auth\x20state:\x20'+_0x28e109);}if(_0x5f5c95[_0x3a50d8(0x1a7)](existsSync,_0x2a7961))return{'storageStatePath':_0x2a7961};return{};}export async function buildPlaywrightConfig(_0x28a14e,_0x4976e7,_0x3feec2,_0x319d65,_0x45afee){const _0x4e9930=_0x31c664,_0x48fe31={'RDLCb':_0x4e9930(0x191),'CHDmA':function(_0x20f404,_0x14bc76){return _0x20f404(_0x14bc76);},'QkYaz':function(_0x1cf4fa,_0xa331e,_0xedcbb0,_0x5f917f,_0x27942a,_0x4f517b,_0x209c44){return _0x1cf4fa(_0xa331e,_0xedcbb0,_0x5f917f,_0x27942a,_0x4f517b,_0x209c44);},'xQEvy':function(_0x2f3d1e,_0x4d4e95){return _0x2f3d1e(_0x4d4e95);}};if(_0x45afee)return buildPlaywrightConfigCore(_0x28a14e,_0x45afee,_0x4976e7,_0x3feec2,_0x319d65,_0x48fe31['RDLCb']);const {storageStatePath:_0x688923,tempAuthPath:_0x199ad2}=await _0x48fe31['CHDmA'](resolveLocalAuthPath,getEnvDir(_0x4976e7));try{const _0x338c0a=await _0x48fe31[_0x4e9930(0x18a)](buildPlaywrightConfigCore,_0x28a14e,_0x688923,_0x4976e7,_0x3feec2,_0x319d65,'stagehand');return{..._0x338c0a,'tempAuthPath':_0x199ad2};}catch(_0x4a6174){_0x199ad2&&await _0x48fe31['xQEvy'](unlink,_0x199ad2)['catch'](()=>{});throw _0x4a6174;}}export async function buildPlaywrightConfigCore(_0x4ad08a,_0x54b6d7,_0x5d1db3,_0x25b107,_0x40e4c9,_0x2d4833=_0x31c664(0x191)){const _0xd94087=_0x31c664,_0x4985b7={'seMsb':function(_0x14f3e8,_0x1fc771){return _0x14f3e8===_0x1fc771;},'RXezv':_0xd94087(0x148),'yldsC':_0xd94087(0x15e),'agLXQ':_0xd94087(0x183),'XltUC':_0xd94087(0x175),'ZjhKs':function(_0x2b19ab,_0x3c13d5){return _0x2b19ab===_0x3c13d5;},'kHiis':_0xd94087(0x161),'WKWmm':_0xd94087(0x159),'udtdf':'pdf','DRpnj':_0xd94087(0x1b7),'rPJVM':function(_0x7d0db8,_0x3d48e2){return _0x7d0db8===_0x3d48e2;},'FLCVR':function(_0x2e0b4e,_0x3a905f){return _0x2e0b4e===_0x3a905f;},'jRTlA':_0xd94087(0x1b4),'pIiYG':function(_0x553069,_0x149122){return _0x553069(_0x149122);},'XKnbf':_0xd94087(0x1a9),'HaLOT':function(_0x5090bb,_0x159aef,_0xf1a80){return _0x5090bb(_0x159aef,_0xf1a80);},'BlGPo':function(_0x1cb6ae,_0x1c49fd,_0x54f278){return _0x1cb6ae(_0x1c49fd,_0x54f278);}},_0x368031=_0x25b107||randomUUID(),_0x1e3990=join(getRangerDir(),'sessions',_0x368031),_0x57aa63=Boolean(_0x4ad08a[_0xd94087(0x16f)]),_0x17b107=_0x57aa63?{'browserName':_0x4985b7[_0xd94087(0x1c0)],'cdpEndpoint':_0x4ad08a[_0xd94087(0x16f)]}:((()=>{const _0x343ae0=_0xd94087,{launchOptions:_0x199ff1,contextOptions:_0x63e12c}=buildBrowserOptionsFromSettings(_0x4ad08a,{'headless':_0x40e4c9?![]:_0x4ad08a[_0x343ae0(0x16d)]??!![],'storageStatePath':_0x54b6d7});if(_0x4985b7['seMsb'](process[_0x343ae0(0x192)]?.(),0x0)){const _0x166671=[_0x4985b7[_0x343ae0(0x1ac)],_0x343ae0(0x14b)],_0x4a29b0=_0x199ff1['args']??[],_0x3105cf=_0x166671[_0x343ae0(0x170)](_0x52714d=>!_0x4a29b0['includes'](_0x52714d));_0x199ff1[_0x343ae0(0x1b9)]=[..._0x4a29b0,..._0x3105cf];}return{'isolated':!![],'browserName':'chromium','launchOptions':_0x199ff1,'contextOptions':{..._0x63e12c,'permissions':[_0x4985b7['yldsC'],_0x4985b7[_0x343ae0(0x18d)]],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x52d9ba=_0x4985b7['ZjhKs'](_0x2d4833,'playwright-cli')?{'browser':_0x17b107,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x1e3990,'outputMode':_0xd94087(0x19d),'codegen':'none'}:{'name':_0x5d1db3,'browser':_0x17b107,'capabilities':[_0x4985b7[_0xd94087(0x19c)],'tabs',_0x4985b7[_0xd94087(0x153)],_0x4985b7['udtdf'],'vision'],'imageResponses':_0x4985b7[_0xd94087(0x176)],'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x1e3990};if(!_0x57aa63){const _0x275e10=_0x52d9ba[_0xd94087(0x1c9)],_0x1eb04e=_0x275e10['contextOptions'];if(_0x4985b7[_0xd94087(0x1a2)](_0x1eb04e[_0xd94087(0x14f)],undefined))delete _0x1eb04e['userAgent'];if(_0x4985b7[_0xd94087(0x16a)](_0x1eb04e['storageState'],undefined))delete _0x1eb04e['storageState'];}const _0x257542=join(tmpdir(),_0x4985b7['jRTlA']);!_0x4985b7[_0xd94087(0x17d)](existsSync,_0x257542)&&await mkdir(_0x257542,{'recursive':!![]});const _0x409b66=_0x2d4833==='playwright-cli'?_0x4985b7['XKnbf']:'',_0x2b9f24=_0x4985b7[_0xd94087(0x1a4)](join,_0x257542,_0x5d1db3+'-'+Date['now']()+_0x409b66+'.json');return await _0x4985b7['BlGPo'](writeFile,_0x2b9f24,JSON[_0xd94087(0x19b)](_0x52d9ba,null,0x2)),{'configPath':_0x2b9f24,'storageStatePath':_0x54b6d7};}export async function buildPlaywrightCliConfig(_0x2d13df,_0x3a5bfe,_0x5b2fd2,_0xde2ec7,_0x131054){const _0x56c448=_0x31c664,_0x5b9793={'MBJCp':function(_0x20d1b5,_0x1cf7aa,_0x891218,_0x31e216,_0x2e8051,_0x37cb14,_0x1886e6){return _0x20d1b5(_0x1cf7aa,_0x891218,_0x31e216,_0x2e8051,_0x37cb14,_0x1886e6);},'iWMaH':'playwright-cli','ytSWE':function(_0x1077f4,_0x5de47d){return _0x1077f4(_0x5de47d);}};if(_0x131054)return _0x5b9793[_0x56c448(0x171)](buildPlaywrightConfigCore,_0x2d13df,_0x131054,_0x3a5bfe,_0x5b2fd2,_0xde2ec7,_0x5b9793['iWMaH']);const {storageStatePath:_0x2034ff,tempAuthPath:_0x147b46}=await _0x5b9793['ytSWE'](resolveLocalAuthPath,getEnvDir(_0x3a5bfe));try{const _0x1d63bf=await _0x5b9793[_0x56c448(0x171)](buildPlaywrightConfigCore,_0x2d13df,_0x2034ff,_0x3a5bfe,_0x5b2fd2,_0xde2ec7,_0x56c448(0x16e));return{..._0x1d63bf,'tempAuthPath':_0x147b46};}catch(_0x10ca40){_0x147b46&&await unlink(_0x147b46)[_0x56c448(0x189)](()=>{});throw _0x10ca40;}}export async function buildRangerwrightCliConfig(_0x2e13ee,_0x2882a1,_0x2a17a4,_0x2c524b,_0x4c44a5){const _0x1c2c8b=_0x31c664,_0xf90918={'iuUkm':function(_0x22aa6a,_0x313fbe){return _0x22aa6a===_0x313fbe;},'GYzMO':'--disable-setuid-sandbox','lzLPo':_0x1c2c8b(0x175),'YIJwu':_0x1c2c8b(0x15e),'HHHRW':'clipboard-write','cefHN':function(_0x15e9e5,_0x415342){return _0x15e9e5(_0x415342);},'xoRnX':function(_0x1decc7){return _0x1decc7();},'LtdbH':_0x1c2c8b(0x165),'bGWuQ':function(_0x458312,_0x40815d){return _0x458312===_0x40815d;},'gzuod':_0x1c2c8b(0x1b4),'LOolY':function(_0x363981,_0x2e0fc7,_0x4d803c){return _0x363981(_0x2e0fc7,_0x4d803c);}},{storageStatePath:_0x3e4b0b,tempAuthPath:_0x2a02c8}=_0x4c44a5?{'storageStatePath':_0x4c44a5,'tempAuthPath':undefined}:await _0xf90918['cefHN'](resolveLocalAuthPath,getEnvDir(_0x2882a1)),_0x261a73=_0x2a17a4||_0xf90918['xoRnX'](randomUUID),_0x3706af=join(_0xf90918['xoRnX'](getRangerDir),_0xf90918[_0x1c2c8b(0x19f)],_0x261a73),_0x515ddd=_0xf90918[_0x1c2c8b(0x1c5)](Boolean,_0x2e13ee['cdpEndpoint']),_0x4f5cfa=_0x515ddd?{'browserName':_0xf90918[_0x1c2c8b(0x157)],'cdpEndpoint':_0x2e13ee[_0x1c2c8b(0x16f)]}:((()=>{const _0x3b7484=_0x1c2c8b,{launchOptions:_0x5941eb,contextOptions:_0x15d262}=buildBrowserOptionsFromSettings(_0x2e13ee,{'headless':_0x2c524b?![]:_0x2e13ee[_0x3b7484(0x16d)]??!![],'storageStatePath':_0x3e4b0b});if(_0xf90918[_0x3b7484(0x1af)](process[_0x3b7484(0x192)]?.(),0x0)){const _0x2f7524=[_0x3b7484(0x148),_0xf90918[_0x3b7484(0x17f)]],_0x56e84e=_0x5941eb['args']??[],_0x32af91=_0x2f7524[_0x3b7484(0x170)](_0x177ac1=>!_0x56e84e[_0x3b7484(0x19a)](_0x177ac1));_0x5941eb['args']=[..._0x56e84e,..._0x32af91];}return{'browserName':_0xf90918['lzLPo'],'launchOptions':_0x5941eb,'contextOptions':{..._0x15d262,'permissions':[_0xf90918['YIJwu'],_0xf90918['HHHRW']],'viewport':{'width':0x500,'height':0x2d0}}};})());if(!_0x515ddd){const _0x2e4afb=_0x4f5cfa['contextOptions'];if(_0x2e4afb){if(_0xf90918['iuUkm'](_0x2e4afb['userAgent'],undefined))delete _0x2e4afb['userAgent'];if(_0xf90918['bGWuQ'](_0x2e4afb['storageState'],undefined))delete _0x2e4afb['storageState'];}}const _0xd48633={'browser':_0x4f5cfa,'outputDir':_0x3706af,'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'settle':{'navigationLoadTimeoutMs':0x7530,'networkSettleTimeoutMs':0x1388,'networkIdleWindowMs':0x1f4,'postActionAnimationFrameCount':0x2}};let _0x3166ce;try{const _0x4ed312=join(tmpdir(),_0xf90918['gzuod']);!existsSync(_0x4ed312)&&await _0xf90918[_0x1c2c8b(0x18e)](mkdir,_0x4ed312,{'recursive':!![]}),_0x3166ce=join(_0x4ed312,_0x2882a1+'-'+Date[_0x1c2c8b(0x1a3)]()+'-rangerwright.json'),await writeFile(_0x3166ce,JSON['stringify'](_0xd48633,null,0x2));}catch(_0x1fd68a){_0x2a02c8&&await unlink(_0x2a02c8)[_0x1c2c8b(0x189)](()=>{});throw _0x1fd68a;}return{'configPath':_0x3166ce,'storageStatePath':_0x3e4b0b,'tempAuthPath':_0x2a02c8,'outputDir':_0x3706af};}export async function buildNovaActCliConfig(_0x26f9c5,_0x4b8a17,_0x1de20c,_0x3b9f3c,_0x28b813){const _0x39b04c=_0x31c664,_0x2c126b={'qGffA':function(_0x3f8f00,_0x518b96){return _0x3f8f00(_0x518b96);},'XEIVS':function(_0x608190,_0x4489de,_0x5ced3c,_0x537f65){return _0x608190(_0x4489de,_0x5ced3c,_0x537f65);},'zgtRq':function(_0xfbfbcf,_0x145eda,_0x1b4ad7){return _0xfbfbcf(_0x145eda,_0x1b4ad7);},'DBNLr':'nova-user-data','MckcW':function(_0x224c83,_0x1fb729,_0xf8997e){return _0x224c83(_0x1fb729,_0xf8997e);},'yCgBF':_0x39b04c(0x193),'YlPLm':function(_0x5b21df,_0x249fe5,_0x358c32){return _0x5b21df(_0x249fe5,_0x358c32);},'RPeqk':function(_0x341f55,_0x33d585){return _0x341f55===_0x33d585;},'lzGww':function(_0x587ad2,_0x485d7d){return _0x587ad2(_0x485d7d);},'KtWOf':function(_0x7d5a90,_0x5a4f2d){return _0x7d5a90===_0x5a4f2d;},'XjeSg':'string','zbcCs':function(_0xca2f05,_0x123a5b){return _0xca2f05(_0x123a5b);}},{storageStatePath:_0x530708,tempAuthPath:_0x528c20}=_0x28b813?{'storageStatePath':_0x28b813,'tempAuthPath':undefined}:await _0x2c126b['qGffA'](resolveLocalAuthPath,getEnvDir(_0x4b8a17)),_0x16dc31=_0x1de20c||randomUUID(),_0x2b280e=_0x2c126b['XEIVS'](join,getRangerDir(),'sessions',_0x16dc31),_0x1c31d9=_0x2c126b['zgtRq'](join,_0x2b280e,_0x2c126b[_0x39b04c(0x1ab)]),_0x3a8a94=_0x530708?_0x2c126b['MckcW'](join,_0x1c31d9,_0x2c126b[_0x39b04c(0x1c3)]):undefined,{launchOptions:_0x388ec4,contextOptions:_0x5b92bf}=_0x2c126b['YlPLm'](buildBrowserOptionsFromSettings,_0x26f9c5,{'headless':_0x3b9f3c?![]:_0x26f9c5[_0x39b04c(0x16d)]??!![],'storageStatePath':_0x530708});if(_0x2c126b['RPeqk'](process['getuid']?.(),0x0)){const _0x44ef33=[_0x39b04c(0x148),_0x39b04c(0x14b)],_0x56614c=_0x388ec4['args']??[],_0x30ebd5=_0x44ef33['filter'](_0x385e03=>!_0x56614c[_0x39b04c(0x19a)](_0x385e03));_0x388ec4['args']=[..._0x56614c,..._0x30ebd5];}const _0x2b3f7b=_0x2c126b['RPeqk'](typeof _0x388ec4['executablePath'],'string')?_0x388ec4['executablePath']:_0x530708?chromium['executablePath']():undefined;return{'storageStatePath':_0x530708,'tempAuthPath':_0x528c20,'baseUrl':_0x26f9c5[_0x39b04c(0x166)],'headless':_0x2c126b[_0x39b04c(0x199)](Boolean,_0x388ec4[_0x39b04c(0x16d)]),'userDataDir':_0x1c31d9,'browserProfilePath':_0x3a8a94,'executablePath':_0x2b3f7b,'launchArgs':Array[_0x39b04c(0x1a0)](_0x388ec4['args'])?_0x388ec4['args']['filter'](_0x311e62=>typeof _0x311e62===_0x39b04c(0x1bb)):[],'userAgent':_0x2c126b['KtWOf'](typeof _0x5b92bf['userAgent'],_0x2c126b['XjeSg'])?_0x5b92bf[_0x39b04c(0x14f)]:undefined,'extraHTTPHeaders':_0x5b92bf['extraHTTPHeaders'],'allowInsecureLocalhost':_0x2c126b['qGffA'](Boolean,_0x26f9c5[_0x39b04c(0x158)]),'safeMode':_0x2c126b['zbcCs'](Boolean,_0x26f9c5[_0x39b04c(0x1ae)]),'cdpEndpoint':_0x26f9c5['cdpEndpoint'],'isCdpMode':_0x2c126b['zbcCs'](Boolean,_0x26f9c5[_0x39b04c(0x16f)])};}export function getNestedValue(_0x4b4c3d,_0x3863d0){const _0x450e4e=_0x31c664,_0x5f41a6={'fNsZB':function(_0x11b9fd,_0x2f2e3f){return _0x11b9fd===_0x2f2e3f;},'fNxrc':function(_0x16aa16,_0x42414f){return _0x16aa16!==_0x42414f;},'FyewZ':_0x450e4e(0x173)},_0x41fc80=parseKeyPath(_0x3863d0);let _0x58dfa2=_0x4b4c3d;for(const _0x41352c of _0x41fc80){if(_0x5f41a6['fNsZB'](_0x58dfa2,null)||_0x5f41a6[_0x450e4e(0x195)](_0x58dfa2,undefined)||_0x5f41a6[_0x450e4e(0x18f)](typeof _0x58dfa2,_0x5f41a6['FyewZ']))return undefined;_0x58dfa2=_0x58dfa2[_0x41352c];}return _0x58dfa2;}function _0x3abf(_0x436c48,_0xcec82d){_0x436c48=_0x436c48-0x148;const _0x5f9bf1=_0x5f9b();let _0x3abfac=_0x5f9bf1[_0x436c48];return _0x3abfac;}export function setNestedValue(_0x2de153,_0x45fd80,_0x1ba9bd){const _0x1449f6=_0x31c664,_0x3b6414={'UbZwf':function(_0x547b08,_0xecb174){return _0x547b08(_0xecb174);},'vnfrW':function(_0x141027,_0x3dddd0){return _0x141027<_0x3dddd0;},'jBUNB':function(_0x271f53,_0x555e18){return _0x271f53 in _0x555e18;},'lIUqE':function(_0x44fc4b,_0x5d4fd1){return _0x44fc4b!==_0x5d4fd1;},'Aantw':_0x1449f6(0x173),'BbUCm':function(_0x303e58,_0x278961){return _0x303e58-_0x278961;}},_0x293688=_0x3b6414['UbZwf'](parseKeyPath,_0x45fd80);let _0x37c99a=_0x2de153;for(let _0x3b576c=0x0;_0x3b6414[_0x1449f6(0x174)](_0x3b576c,_0x293688[_0x1449f6(0x1c8)]-0x1);_0x3b576c++){const _0x53565c=_0x293688[_0x3b576c];(!_0x3b6414[_0x1449f6(0x1b2)](_0x53565c,_0x37c99a)||_0x3b6414[_0x1449f6(0x1bd)](typeof _0x37c99a[_0x53565c],_0x3b6414[_0x1449f6(0x14e)]))&&(_0x37c99a[_0x53565c]={}),_0x37c99a=_0x37c99a[_0x53565c];}_0x37c99a[_0x293688[_0x3b6414[_0x1449f6(0x151)](_0x293688[_0x1449f6(0x1c8)],0x1)]]=_0x1ba9bd;}export function deleteNestedValue(_0x401f4a,_0x47fbc8){const _0x3ca36d=_0x31c664,_0x3e5645={'LRjSD':function(_0x228940,_0x3d9304){return _0x228940<_0x3d9304;},'ZLcFl':'object','BSrhW':function(_0x5857d1,_0x43beae){return _0x5857d1===_0x43beae;},'UlxrX':function(_0x5b2fff,_0x6f2533){return _0x5b2fff-_0x6f2533;}},_0x4d01a7=parseKeyPath(_0x47fbc8);let _0x17b216=_0x401f4a;for(let _0x299775=0x0;_0x3e5645[_0x3ca36d(0x152)](_0x299775,_0x4d01a7['length']-0x1);_0x299775++){if(_0x17b216===null||_0x17b216===undefined||typeof _0x17b216!==_0x3e5645['ZLcFl'])return![];_0x17b216=_0x17b216[_0x4d01a7[_0x299775]];}if(_0x3e5645[_0x3ca36d(0x181)](_0x17b216,null)||_0x17b216===undefined||typeof _0x17b216!==_0x3ca36d(0x173))return![];const _0x1514a9=_0x4d01a7[_0x3e5645[_0x3ca36d(0x1b1)](_0x4d01a7[_0x3ca36d(0x1c8)],0x1)];if(_0x1514a9 in _0x17b216)return delete _0x17b216[_0x1514a9],!![];return![];}function parseKeyPath(_0xcab3eb){const _0x2e387f=_0x31c664,_0x108863={'yKzii':'headers','RJaUd':_0x2e387f(0x154),'klJtT':'setupHeaders'},_0x1a6db8=_0xcab3eb[_0x2e387f(0x187)]('.');return _0x1a6db8[0x0]==='header'&&(_0x1a6db8[0x0]=_0x108863['yKzii']),_0x1a6db8[0x0]===_0x108863['RJaUd']&&(_0x1a6db8[0x0]=_0x108863[_0x2e387f(0x1bf)]),_0x1a6db8;}export function formatSettings(_0x13139a,_0x540bbd=0x0){const _0x5e8172=_0x31c664,_0x4a61c8={'AdEuk':function(_0x28d256,_0x5123e4){return _0x28d256===_0x5123e4;},'ClygZ':function(_0x589f20,_0x95a339){return _0x589f20!==_0x95a339;}},_0xdf5c89=[],_0x188eb0='\x20\x20'[_0x5e8172(0x17b)](_0x540bbd);for(const [_0x1d84b9,_0x44d442]of Object[_0x5e8172(0x194)](_0x13139a)){if(_0x44d442===undefined)continue;if(_0x4a61c8['AdEuk'](typeof _0x44d442,_0x5e8172(0x173))&&_0x4a61c8[_0x5e8172(0x1c2)](_0x44d442,null)){_0xdf5c89['push'](''+_0x188eb0+_0x1d84b9+':');for(const [_0x52e565,_0x522de0]of Object[_0x5e8172(0x194)](_0x44d442)){_0xdf5c89['push'](_0x188eb0+'\x20\x20'+_0x52e565+':\x20'+_0x522de0);}}else _0xdf5c89['push'](''+_0x188eb0+_0x1d84b9+':\x20'+_0x44d442);}return _0xdf5c89['join']('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5c7de5,_0x30914b){const _0xf10c98=_0x270f,_0x3997b4=_0x5c7de5();while(!![]){try{const _0x59b813=-parseInt(_0xf10c98(0x78))/0x1+parseInt(_0xf10c98(0x7d))/0x2*(parseInt(_0xf10c98(0x75))/0x3)+parseInt(_0xf10c98(0x7b))/0x4*(parseInt(_0xf10c98(0x7c))/0x5)+-parseInt(_0xf10c98(0x76))/0x6+parseInt(_0xf10c98(0x74))/0x7+-parseInt(_0xf10c98(0x71))/0x8*(-parseInt(_0xf10c98(0x72))/0x9)+parseInt(_0xf10c98(0x73))/0xa*(-parseInt(_0xf10c98(0x77))/0xb);if(_0x59b813===_0x30914b)break;else _0x3997b4['push'](_0x3997b4['shift']());}catch(_0x24bfe0){_0x3997b4['push'](_0x3997b4['shift']());}}}(_0x367b,0x20eab));import{readFileSync}from'fs';import{dirname,join}from'path';import{fileURLToPath}from'url';function _0x270f(_0x1d65db,_0x834caf){_0x1d65db=_0x1d65db-0x71;const _0x367b15=_0x367b();let _0x270fe4=_0x367b15[_0x1d65db];return _0x270fe4;}function _0x367b(){const _0x583775=['10ZVIAYg','584542yBtBOW','10737vhTCIi','356388GoCzBF','2967261CXRDQX','27853Gfntpd','niDqM','utf-8','4ytbocd','630095jZfnzX','74ZWxGNn','ranger/SKILL.md','8WAMGJv','1348929ThSgsP'];_0x367b=function(){return _0x583775;};return _0x367b();}const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);export function readSkillContent(_0x2b4930){const _0x23ca94=_0x270f,_0x3f287d={'niDqM':function(_0x29d38c,_0x95e852,_0x4ed341){return _0x29d38c(_0x95e852,_0x4ed341);},'JpVxE':function(_0x19e462,_0x3e93e2,_0x360e80){return _0x19e462(_0x3e93e2,_0x360e80);},'KvZKQ':_0x23ca94(0x7a)},_0x79f6ad=join(__dirname,'..','..','skills'),_0x24b123=_0x3f287d[_0x23ca94(0x79)](join,_0x79f6ad,_0x2b4930);try{return _0x3f287d['JpVxE'](readFileSync,_0x24b123,_0x3f287d['KvZKQ']);}catch{return'';}}export function getRangerSkillContent(){const _0x3f1b8b=_0x270f,_0x2abdcf={'SDBdZ':function(_0x1ac41b,_0x584f1b){return _0x1ac41b(_0x584f1b);}};return _0x2abdcf['SDBdZ'](readSkillContent,_0x3f1b8b(0x7e));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x2e3a67=_0x11ab;(function(_0x5e68f1,_0x30bae7){const _0x1c6187=_0x11ab,_0x3d4c1f=_0x5e68f1();while(!![]){try{const _0x8971cc=-parseInt(_0x1c6187(0xc6))/0x1*(-parseInt(_0x1c6187(0xa4))/0x2)+-parseInt(_0x1c6187(0xbc))/0x3*(-parseInt(_0x1c6187(0xc0))/0x4)+-parseInt(_0x1c6187(0xa0))/0x5+parseInt(_0x1c6187(0xc8))/0x6*(-parseInt(_0x1c6187(0xac))/0x7)+parseInt(_0x1c6187(0xb2))/0x8*(-parseInt(_0x1c6187(0xb3))/0x9)+parseInt(_0x1c6187(0xab))/0xa*(parseInt(_0x1c6187(0xb4))/0xb)+parseInt(_0x1c6187(0xbb))/0xc;if(_0x8971cc===_0x30bae7)break;else _0x3d4c1f['push'](_0x3d4c1f['shift']());}catch(_0x12a50b){_0x3d4c1f['push'](_0x3d4c1f['shift']());}}}(_0x2251,0xa3197));import{readFile,writeFile,mkdir,readdir,copyFile,rm}from'fs/promises';import{join,dirname}from'path';import{existsSync,statSync}from'fs';function _0x2251(){const _0x22b0e5=['claude','e2e-test-recommender','EEclZ','\x20\x20Skill\x20not\x20found:\x20','136VhoOKh','540369dXMcIF','100331esLPQG','length','\x20\x20Files:\x20','riscR','filter','weLzL','skills','305292eqsJSx','522afuSmi','\x20\x20Removed\x20deprecated\x20skill:\x20','\x20\x20Failed\x20to\x20remove\x20deprecated\x20skill:\x20','Invalid\x20skill\x20frontmatter','24780xdhnbQ','\x20\x20Installed\x20skill:\x20','push','catch','.md','project','49XNuzEi','VfCYJ','2454eLcaaZ','Yceuk','EuWWA','1630955cmSdPs','plDKm','trim','join','5142AGZudn','log','HHcNg','match','warn','isDirectory','pzKkR','890UpJuJP','448zjslOe','utf-8'];_0x2251=function(){return _0x22b0e5;};return _0x2251();}import{fileURLToPath}from'url';import{logLocalAgentInstallation}from'./localAgentInstallationsApi.js';import{getSkillsDir}from'./claudeConfig.js';import{getOpencodeSkillsDir}from'./opencodeConfig.js';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);export const RANGER_MANAGED_SKILLS=['ranger'];export const DEPRECATED_SKILLS=[_0x2e3a67(0xaf),'bug-bash','feature-tracker'];export async function installSkill(_0x5531fe,_0x449f71={}){const _0x523310=_0x2e3a67,_0x127119={'VfCYJ':function(_0x9a9544){return _0x9a9544();},'Yceuk':function(_0x4b9bf3,_0x5177e2){return _0x4b9bf3(_0x5177e2);},'joGTY':function(_0x338eb9,_0x2c9fdd,_0x4f97ca){return _0x338eb9(_0x2c9fdd,_0x4f97ca);},'akiVV':function(_0x5515e5,_0x30f2d5){return _0x5515e5===_0x30f2d5;},'lVGiR':'opencode','EuWWA':function(_0x5f3087,_0x544290,_0x43b95e){return _0x5f3087(_0x544290,_0x43b95e);},'VUIdQ':function(_0x36a7a6,_0x14e295,_0x10e69e){return _0x36a7a6(_0x14e295,_0x10e69e);},'uWlGJ':function(_0x256310,_0x39a8e5,_0x47cb15){return _0x256310(_0x39a8e5,_0x47cb15);},'riscR':function(_0x1e0e03,_0x1cc496,_0x1a13e0){return _0x1e0e03(_0x1cc496,_0x1a13e0);},'kxSdB':_0x523310(0xad),'HHcNg':function(_0x105067,_0x5702f5,_0x72d516){return _0x105067(_0x5702f5,_0x72d516);},'weLzL':'SKILL.md','pzKkR':function(_0x10d89a,_0x581706,_0x55dba7,_0x38b73f){return _0x10d89a(_0x581706,_0x55dba7,_0x38b73f);},'EEclZ':function(_0x3539a8,_0x4f2686,_0xf7ef3d,_0x24a3cb){return _0x3539a8(_0x4f2686,_0xf7ef3d,_0x24a3cb);}},{level:level=_0x523310(0xc5),cliVersion:_0x43d19a,platform:platform=_0x523310(0xae)}=_0x449f71,_0x4c85e4=_0x127119[_0x523310(0xc7)](getSourceSkillsDir),_0x2aaaac=join(_0x4c85e4,_0x5531fe),_0x2ba23b=join(_0x4c85e4,_0x5531fe+_0x523310(0xc4)),_0x378dc2=existsSync(_0x2aaaac)&&_0x127119['Yceuk'](statSync,_0x2aaaac)[_0x523310(0xa9)]()&&existsSync(_0x127119['joGTY'](join,_0x2aaaac,'SKILL.md')),_0x15b526=_0x127119['Yceuk'](existsSync,_0x2ba23b);if(!_0x378dc2&&!_0x15b526)return console['warn'](_0x523310(0xb1)+_0x5531fe),![];const _0x447894=_0x127119['akiVV'](platform,_0x127119['lVGiR'])?getOpencodeSkillsDir(level):getSkillsDir(level),_0xd47f36=_0x127119[_0x523310(0x9f)](join,_0x447894,_0x5531fe);await _0x127119['EuWWA'](mkdir,_0xd47f36,{'recursive':!![]});let _0x1fe45,_0x31838a=[];if(_0x378dc2){const _0x3d3a2e=await _0x127119[_0x523310(0xc9)](readdir,_0x2aaaac),_0x1fc963=_0x3d3a2e[_0x523310(0xb8)](_0x5ddb5e=>_0x5ddb5e['endsWith']('.md'));for(const _0x3a2afb of _0x1fc963){const _0x5f2bf5=_0x127119['VUIdQ'](join,_0x2aaaac,_0x3a2afb),_0x452881=join(_0xd47f36,_0x3a2afb);await _0x127119['uWlGJ'](copyFile,_0x5f2bf5,_0x452881),_0x31838a[_0x523310(0xc2)](_0x3a2afb);}_0x1fe45=await _0x127119[_0x523310(0xb7)](readFile,join(_0x2aaaac,'SKILL.md'),_0x127119['kxSdB']);}else{_0x1fe45=await _0x127119[_0x523310(0xa6)](readFile,_0x2ba23b,'utf-8');const _0x9cd6a9=join(_0xd47f36,_0x127119[_0x523310(0xb9)]);await _0x127119[_0x523310(0xaa)](writeFile,_0x9cd6a9,_0x1fe45,'utf-8'),_0x31838a['push']('SKILL.md');}const {name:_0x5b1e8a}=parseFrontmatter(_0x1fe45);return console[_0x523310(0xa5)](_0x523310(0xc1)+_0x5b1e8a),console['log']('\x20\x20Location:\x20'+_0xd47f36),_0x31838a[_0x523310(0xb5)]>0x1&&console['log'](_0x523310(0xb6)+_0x31838a[_0x523310(0xa3)](',\x20')),_0x127119[_0x523310(0xb0)](logLocalAgentInstallation,_0x5531fe,{'skillDisplayName':_0x5b1e8a,'installLevel':level},_0x43d19a)[_0x523310(0xc3)](()=>{}),!![];}function _0x11ab(_0x42c455,_0x166a35){_0x42c455=_0x42c455-0x9f;const _0x2251e9=_0x2251();let _0x11abba=_0x2251e9[_0x42c455];return _0x11abba;}function getSourceSkillsDir(){const _0x10d94b=_0x2e3a67,_0x27f10e={'plDKm':function(_0x3d4ab7,_0x2a846c,_0x2ffa34,_0x2787c5,_0x11fe07,_0x14ab78){return _0x3d4ab7(_0x2a846c,_0x2ffa34,_0x2787c5,_0x11fe07,_0x14ab78);},'dDpXz':'skills'},_0x1e7898=[join(__dirname,'..','..',_0x10d94b(0xba)),_0x27f10e[_0x10d94b(0xa1)](join,__dirname,'..','..','..',_0x27f10e['dDpXz'])];for(const _0xb14585 of _0x1e7898){if(existsSync(_0xb14585))return _0xb14585;}return _0x1e7898[0x0];}function parseFrontmatter(_0x14a0c0){const _0x177fff=_0x2e3a67,_0x311069={'roJAM':_0x177fff(0xbf)},_0x2c12d9=_0x14a0c0[_0x177fff(0xa7)](/^---\n([\s\S]+?)\n---/);if(!_0x2c12d9)throw new Error(_0x311069['roJAM']);const _0x163b49=_0x2c12d9[0x1],_0x354258=_0x163b49['match'](/name:\s*(.+)/),_0x5b3eb1=_0x163b49['match'](/description:\s*"?(.+?)"?\n/);return{'name':_0x354258?.[0x1][_0x177fff(0xa2)]()||'','description':_0x5b3eb1?.[0x1]['trim']()||''};}export async function removeSkill(_0x4b3e94,_0x133bfd){const _0x3968e7=_0x2e3a67,_0x2f111d={'sVvyU':function(_0x5299aa,_0x20c767,_0x1b9c77){return _0x5299aa(_0x20c767,_0x1b9c77);},'toLaX':function(_0x2c7406,_0x4714dd){return _0x2c7406(_0x4714dd);}},_0x5839cd=getSkillsDir(_0x133bfd),_0x5eff30=_0x2f111d['sVvyU'](join,_0x5839cd,_0x4b3e94);if(!_0x2f111d['toLaX'](existsSync,_0x5eff30))return![];try{return await rm(_0x5eff30,{'recursive':!![]}),console[_0x3968e7(0xa5)](_0x3968e7(0xbd)+_0x4b3e94),!![];}catch{return console[_0x3968e7(0xa8)](_0x3968e7(0xbe)+_0x4b3e94),![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x36ba89=_0x11ce;(function(_0x473f31,_0x3a9ffb){const _0x302745=_0x11ce,_0x5531a6=_0x473f31();while(!![]){try{const _0x52a2e4=-parseInt(_0x302745(0xb0))/0x1+parseInt(_0x302745(0x73))/0x2*(-parseInt(_0x302745(0xa2))/0x3)+-parseInt(_0x302745(0x9c))/0x4*(-parseInt(_0x302745(0x93))/0x5)+-parseInt(_0x302745(0x78))/0x6+parseInt(_0x302745(0xac))/0x7*(parseInt(_0x302745(0x94))/0x8)+parseInt(_0x302745(0x79))/0x9*(parseInt(_0x302745(0xb5))/0xa)+parseInt(_0x302745(0x7d))/0xb*(-parseInt(_0x302745(0xa5))/0xc);if(_0x52a2e4===_0x3a9ffb)break;else _0x5531a6['push'](_0x5531a6['shift']());}catch(_0x277358){_0x5531a6['push'](_0x5531a6['shift']());}}}(_0x145f,0x71f17));function _0x11ce(_0x1a63ff,_0x333a5a){_0x1a63ff=_0x1a63ff-0x72;const _0x145f5c=_0x145f();let _0x11ce57=_0x145f5c[_0x1a63ff];return _0x11ce57;}import{readFileSync,writeFileSync}from'fs';const ID_SEGMENT=0x18538067,ID_INFO=0x1549a966,ID_CLUSTER=0x1f43b675,ID_TIMESTAMP=0xe7,ID_TIMESTAMP_SCALE=0x2ad7b1,ID_SIMPLE_BLOCK=0xa3;function readVint(_0x57818c,_0x25f552){const _0x401b6c=_0x11ce,_0x5b6751={'hAHtt':function(_0xfc109b,_0x10c0c5){return _0xfc109b>=_0x10c0c5;},'VqSyH':function(_0xf8de2e,_0x552091){return _0xf8de2e&_0x552091;},'ClNkZ':function(_0x272356,_0x1a951a){return _0x272356+_0x1a951a;}};if(_0x5b6751['hAHtt'](_0x25f552,_0x57818c[_0x401b6c(0xa9)]))return[0x0,0x0];const _0x3fda9d=_0x57818c[_0x25f552];let _0x48484e=0x1,_0x5d68be=0x80;while(_0x48484e<=0x8&&!_0x5b6751[_0x401b6c(0xb9)](_0x3fda9d,_0x5d68be)){_0x48484e++,_0x5d68be>>=0x1;}if(_0x25f552+_0x48484e>_0x57818c[_0x401b6c(0xa9)])return[0x0,0x0];let _0x5ce327=_0x3fda9d&_0x5d68be-0x1;for(let _0xb9b90a=0x1;_0xb9b90a<_0x48484e;_0xb9b90a++){_0x5ce327=_0x5ce327*0x100+_0x57818c[_0x5b6751[_0x401b6c(0x72)](_0x25f552,_0xb9b90a)];}return[_0x5ce327,_0x48484e];}function readId(_0x1d20be,_0x3f8614){const _0x2a9fc2=_0x11ce,_0x31b511={'Nyiju':function(_0x6e079a,_0x29166e){return _0x6e079a>=_0x29166e;},'OygqL':function(_0x4335ae,_0x3e5f2e){return _0x4335ae>_0x3e5f2e;},'EIYkA':function(_0x4d56f9,_0x41b231){return _0x4d56f9+_0x41b231;},'BSnVE':function(_0x525e7b,_0x446b83){return _0x525e7b+_0x446b83;},'BFKgt':function(_0x5eb900,_0x3cacdb){return _0x5eb900*_0x3cacdb;}};if(_0x31b511[_0x2a9fc2(0xad)](_0x3f8614,_0x1d20be['length']))return[0x0,0x0];const _0x3c505c=_0x1d20be[_0x3f8614];let _0x48c52d;if(_0x3c505c>=0x80)_0x48c52d=0x1;else{if(_0x31b511[_0x2a9fc2(0xad)](_0x3c505c,0x40))_0x48c52d=0x2;else{if(_0x31b511[_0x2a9fc2(0xad)](_0x3c505c,0x20))_0x48c52d=0x3;else{if(_0x3c505c>=0x10)_0x48c52d=0x4;else return[_0x3c505c,0x1];}}}if(_0x31b511['OygqL'](_0x31b511[_0x2a9fc2(0xa7)](_0x3f8614,_0x48c52d),_0x1d20be['length']))return[0x0,0x0];let _0xfcee74=0x0;for(let _0x1373ca=0x0;_0x1373ca<_0x48c52d;_0x1373ca++){_0xfcee74=_0x31b511['BSnVE'](_0x31b511['BFKgt'](_0xfcee74,0x100),_0x1d20be[_0x3f8614+_0x1373ca]);}return[_0xfcee74,_0x48c52d];}function readUint(_0x5b967d,_0x5eb70e,_0x3ec00c){const _0x567867=_0x11ce,_0x1fcb30={'GSbNd':function(_0x2e7d52,_0x5b8d2d){return _0x2e7d52+_0x5b8d2d;},'dfUbE':function(_0x4eada3,_0x1b7eec){return _0x4eada3*_0x1b7eec;},'UoJnB':function(_0x26e3ea,_0x38c4ac){return _0x26e3ea+_0x38c4ac;}};let _0x31c03e=0x0;for(let _0x4c2d20=0x0;_0x4c2d20<_0x3ec00c;_0x4c2d20++){_0x31c03e=_0x1fcb30['GSbNd'](_0x1fcb30[_0x567867(0xb3)](_0x31c03e,0x100),_0x5b967d[_0x1fcb30['UoJnB'](_0x5eb70e,_0x4c2d20)]);}return _0x31c03e;}function isUnknownSize(_0x3f8bf3,_0x88c9b6){const _0xe9c683=_0x11ce,_0x115bd8={'KQnCr':function(_0x59a69d,_0x2179b4){return _0x59a69d*_0x2179b4;}};return _0x3f8bf3===Math[_0xe9c683(0x91)](0x2,_0x115bd8[_0xe9c683(0x9d)](0x7,_0x88c9b6))-0x1;}function writeVint(_0x5a35d7,_0x278ec4){const _0x14c3be=_0x11ce,_0x5827eb={'gFTgV':function(_0x1a1a42,_0x3a84d1){return _0x1a1a42||_0x3a84d1;},'wOXZT':function(_0x5a63ca,_0x68a99c){return _0x5a63ca-_0x68a99c;}};let _0x4ed0af=_0x5827eb['gFTgV'](_0x278ec4,0x1);while(Math[_0x14c3be(0x91)](0x2,0x7*_0x4ed0af)-0x2<_0x5a35d7)_0x4ed0af++;const _0x44f0c4=Buffer['alloc'](_0x4ed0af);for(let _0x46efad=_0x5827eb['wOXZT'](_0x4ed0af,0x1);_0x46efad>=0x0;_0x46efad--){_0x44f0c4[_0x46efad]=_0x5a35d7&0xff,_0x5a35d7=Math[_0x14c3be(0xa1)](_0x5a35d7/0x100);}return _0x44f0c4[0x0]|=0x1<<_0x5827eb['wOXZT'](0x8,_0x4ed0af),_0x44f0c4;}function writeUint(_0x31dd08,_0x482a0c){const _0x321b34=_0x11ce,_0x5a9ece={'iuHbj':function(_0xdba077,_0x43654a){return _0xdba077>=_0x43654a;},'qWRia':function(_0x5bd8de,_0x2c3f2e){return _0x5bd8de/_0x2c3f2e;}},_0x3ddf3e=Buffer['alloc'](_0x482a0c);for(let _0x222769=_0x482a0c-0x1;_0x5a9ece['iuHbj'](_0x222769,0x0);_0x222769--){_0x3ddf3e[_0x222769]=_0x31dd08&0xff,_0x31dd08=Math['floor'](_0x5a9ece[_0x321b34(0x86)](_0x31dd08,0x100));}return _0x3ddf3e;}function writeUnknownSizeVint(_0x1a0330){const _0x3a0613=Buffer['alloc'](_0x1a0330,0xff);return _0x3a0613[0x0]=0xff>>_0x1a0330-0x1,_0x3a0613;}function uintSize(_0xbae153){if(_0xbae153===0x0)return 0x1;let _0x5f4cbe=0x0,_0x236afc=_0xbae153;while(_0x236afc>0x0){_0x5f4cbe++,_0x236afc=Math['floor'](_0x236afc/0x100);}return _0x5f4cbe;}function _0x145f(){const _0x411b66=['rsghr','UFHfF','231beyKDH','uUdhw','KEggz','wDpUP','iojUa','stitchWebmFiles.ts','sEaGq','xDUsH','copy','qWRia','hLsDb','fRKdQ','has','slice','push','EMtGg','JVJHO','NcLtc','seeaa','YygdW','pow','IMKoS','10GfoQkX','4204520EpYaLq','maxTicks','CGryK','endsWith','JXbbP','UxGsA','AvJBR','bodyBeforeTimestamp','1308716fGBTwk','KQnCr','QkZkD','Stitching\x20failed\x20or\x20only\x20one\x20input\x20file.','indexOf','floor','344379Dndwry','MdjTo','argv','42324IHIfUZ','FRJgE','EIYkA','yTVIy','length','concat','vBRKA','7SnEJAL','Nyiju','UULeA','tZpRl','429111rRLmYh','lrJxo','wdHFh','dfUbE','IcFUl','20VSgTdJ','kLaUM','mEsYo','zHRZJ','VqSyH','stitchWebmFiles.js','ClNkZ','2xZoWEH','max','jVmqP','min','EKMuk','4486494SBdshd','2936286KcUzMV','from'];_0x145f=function(){return _0x411b66;};return _0x145f();}function findTimestampScale(_0x5f2966,_0x11457d){const _0x54c8f3=_0x11ce,_0x38b324={'UxGsA':function(_0x10c934,_0x5523ee){return _0x10c934+_0x5523ee;},'wDpUP':function(_0x387724,_0x39d16f,_0x38205b){return _0x387724(_0x39d16f,_0x38205b);},'QkZkD':function(_0x9a8a84,_0x3a9198){return _0x9a8a84===_0x3a9198;},'MdjTo':function(_0x40e862,_0x5ec191,_0x43e69a,_0x6e73cb){return _0x40e862(_0x5ec191,_0x43e69a,_0x6e73cb);},'FRJgE':function(_0x28acc8,_0x4b9b86){return _0x28acc8+_0x4b9b86;},'UULeA':function(_0x2fbe5f,_0x495be1){return _0x2fbe5f===_0x495be1;},'PwwTx':function(_0x5dec46,_0x1fad11,_0x5cea8f){return _0x5dec46(_0x1fad11,_0x5cea8f);}};let _0x214e80=_0x11457d;const _0x2bb78d=Math['min'](_0x5f2966['length'],_0x38b324[_0x54c8f3(0x99)](_0x11457d,0x2710));while(_0x214e80<_0x2bb78d){const [_0x3fcef3,_0x51d057]=readId(_0x5f2966,_0x214e80),[_0x579cdf,_0x5ea4db]=_0x38b324['wDpUP'](readVint,_0x5f2966,_0x214e80+_0x51d057);if(_0x38b324[_0x54c8f3(0x9e)](_0x3fcef3,ID_INFO)){let _0x4c1625=_0x38b324['UxGsA'](_0x38b324[_0x54c8f3(0x99)](_0x214e80,_0x51d057),_0x5ea4db);const _0x26d7e2=_0x38b324[_0x54c8f3(0x99)](_0x4c1625,_0x579cdf);while(_0x4c1625<_0x26d7e2){const [_0x58cf2f,_0x293e44]=readId(_0x5f2966,_0x4c1625),[_0x518d06,_0x148e99]=_0x38b324[_0x54c8f3(0x80)](readVint,_0x5f2966,_0x38b324['UxGsA'](_0x4c1625,_0x293e44));if(_0x38b324['QkZkD'](_0x58cf2f,ID_TIMESTAMP_SCALE))return _0x38b324[_0x54c8f3(0xa3)](readUint,_0x5f2966,_0x38b324[_0x54c8f3(0xa6)](_0x38b324[_0x54c8f3(0xa6)](_0x4c1625,_0x293e44),_0x148e99),_0x518d06);_0x4c1625+=_0x293e44+_0x148e99+_0x518d06;}break;}if(_0x38b324[_0x54c8f3(0xae)](_0x3fcef3,ID_CLUSTER))break;if(_0x38b324['PwwTx'](isUnknownSize,_0x579cdf,_0x5ea4db))break;_0x214e80+=_0x38b324['FRJgE'](_0x51d057+_0x5ea4db,_0x579cdf);}return 0xf4240;}function findFirstClusterOffset(_0x7259bb,_0x26cbf7){const _0x391799=_0x11ce,_0x5347fa={'gfhBE':function(_0x51774d,_0x216423){return _0x51774d<_0x216423;},'eTIak':function(_0x27e060,_0x15c81e){return _0x27e060+_0x15c81e;}};let _0x2f1290=_0x26cbf7;while(_0x5347fa['gfhBE'](_0x2f1290,_0x7259bb['length'])){const [_0x132e6d,_0x2a7484]=readId(_0x7259bb,_0x2f1290);if(_0x132e6d===ID_CLUSTER)return _0x2f1290;const [_0x49daf2,_0xd2a160]=readVint(_0x7259bb,_0x5347fa['eTIak'](_0x2f1290,_0x2a7484));if(isUnknownSize(_0x49daf2,_0xd2a160))return _0x2f1290;_0x2f1290+=_0x2a7484+_0xd2a160+_0x49daf2;}return _0x7259bb[_0x391799(0xa9)];}function findClusterEnd(_0x303cfd,_0xd8272d,_0x286e3e,_0x1253d1){const _0x4af98d=_0x11ce,_0x3df8a9={'UFHfF':function(_0x5640ef,_0x1f8765,_0x3cfe81){return _0x5640ef(_0x1f8765,_0x3cfe81);},'KZWje':function(_0x1fe5b1,_0x413d69){return _0x1fe5b1+_0x413d69;},'mEsYo':function(_0xe09e51,_0x209916){return _0xe09e51<_0x209916;},'FDxha':function(_0x5dd716,_0x4b199c,_0x1a1caf){return _0x5dd716(_0x4b199c,_0x1a1caf);},'IMKoS':function(_0x52e77d,_0x5cffd1,_0x4ccfbf){return _0x52e77d(_0x5cffd1,_0x4ccfbf);},'EMtGg':function(_0x479fa3,_0x49e713,_0x206e1c){return _0x479fa3(_0x49e713,_0x206e1c);},'JVJHO':function(_0x24f639,_0x5953b4){return _0x24f639+_0x5953b4;}};if(!_0x3df8a9[_0x4af98d(0x7c)](isUnknownSize,_0x286e3e,_0x1253d1))return _0x3df8a9['KZWje'](_0xd8272d,_0x286e3e);const _0x9aaf00=new Set([ID_CLUSTER,0x1c53bb6b,0x1254c367]);let _0x19e84a=_0xd8272d;while(_0x3df8a9[_0x4af98d(0xb7)](_0x19e84a,_0x303cfd[_0x4af98d(0xa9)]-0x4)){const [_0x24d0e5,_0x579fcd]=_0x3df8a9['FDxha'](readId,_0x303cfd,_0x19e84a);if(_0x9aaf00[_0x4af98d(0x89)](_0x24d0e5))return _0x19e84a;const [_0x5ad6a2,_0x4f3bc0]=_0x3df8a9[_0x4af98d(0x92)](readVint,_0x303cfd,_0x19e84a+_0x579fcd);if(_0x3df8a9[_0x4af98d(0x8c)](isUnknownSize,_0x5ad6a2,_0x4f3bc0))return _0x303cfd[_0x4af98d(0xa9)];_0x19e84a+=_0x3df8a9[_0x4af98d(0x8d)](_0x579fcd+_0x4f3bc0,_0x5ad6a2);}return _0x303cfd['length'];}function extractClusters(_0x48a0ed,_0x3af3fa){const _0xa130af=_0x11ce,_0x52cf75={'lrJxo':function(_0x15bfb5,_0x291e8d,_0x4cec76){return _0x15bfb5(_0x291e8d,_0x4cec76);},'NcLtc':function(_0x4f7faf,_0x25b6e3){return _0x4f7faf+_0x25b6e3;},'Vpqnp':function(_0x57a3d7,_0x3c3bb5,_0x5c8c42,_0x54784e,_0x20fa8e){return _0x57a3d7(_0x3c3bb5,_0x5c8c42,_0x54784e,_0x20fa8e);},'CGryK':function(_0x140d1c,_0x332fb4){return _0x140d1c<_0x332fb4;},'YygdW':function(_0x9c44c8,_0x4c0c92,_0x23afec){return _0x9c44c8(_0x4c0c92,_0x23afec);},'zHRZJ':function(_0x3f44fc,_0x383f50){return _0x3f44fc+_0x383f50;},'qbPhk':function(_0x353d01,_0x16bdc2,_0x2b2053,_0x4b7215){return _0x353d01(_0x16bdc2,_0x2b2053,_0x4b7215);},'kUTHT':function(_0x485a79,_0xb7e372){return _0x485a79+_0xb7e372;},'YZtEy':function(_0x3cf9b9,_0x2310e4){return _0x3cf9b9+_0x2310e4;},'xDUsH':function(_0x1683c2,_0x507802){return _0x1683c2+_0x507802;},'yTVIy':function(_0x584318,_0x592b6a){return _0x584318===_0x592b6a;},'seeaa':function(_0x3fc0cc,_0x3f5e68,_0x120566){return _0x3fc0cc(_0x3f5e68,_0x120566);},'AvJBR':function(_0x15ef4d,_0x46d4b4){return _0x15ef4d+_0x46d4b4;},'jVmqP':function(_0x2dba52,_0x56d530){return _0x2dba52+_0x56d530;},'vBRKA':function(_0x19a051,_0x386efc){return _0x19a051>_0x386efc;},'hLsDb':function(_0x1ef355,_0x126d4b){return _0x1ef355===_0x126d4b;},'IcFUl':function(_0x2f8f7e,_0x2221fd){return _0x2f8f7e+_0x2221fd;}},_0x393194=[],_0x197864=Buffer[_0xa130af(0x7a)]([0x1f,0x43,0xb6,0x75]);let _0xf61ade=0x0;while(_0xf61ade<_0x48a0ed['length']){const _0x4934d9=_0x48a0ed[_0xa130af(0xa0)](_0x197864,_0xf61ade);if(_0x4934d9===-0x1)break;const [_0x1a70ac,_0x22ff26]=readId(_0x48a0ed,_0x4934d9);if(_0x1a70ac!==ID_CLUSTER){_0xf61ade=_0x4934d9+0x1;continue;}const [_0x30a6cf,_0x2b535d]=_0x52cf75[_0xa130af(0xb1)](readVint,_0x48a0ed,_0x52cf75[_0xa130af(0x8e)](_0x4934d9,_0x22ff26)),_0x579df2=_0x52cf75[_0xa130af(0x8e)](_0x4934d9+_0x22ff26,_0x2b535d),_0x5d7ff6=_0x52cf75['Vpqnp'](findClusterEnd,_0x48a0ed,_0x579df2,_0x30a6cf,_0x2b535d);let _0x23f08e=_0x579df2,_0x5a6904=0x0,_0x49c7bc=0x2,_0x51524c=![],_0x202a71=Buffer['alloc'](0x0),_0x565d80=Buffer['alloc'](0x0);while(_0x52cf75[_0xa130af(0x96)](_0x23f08e,_0x5d7ff6)){const [_0x32126d,_0x10bd77]=_0x52cf75['lrJxo'](readId,_0x48a0ed,_0x23f08e),[_0x25b928,_0x216cd7]=_0x52cf75[_0xa130af(0x90)](readVint,_0x48a0ed,_0x52cf75[_0xa130af(0xb8)](_0x23f08e,_0x10bd77));if(_0x32126d===ID_TIMESTAMP){_0x5a6904=_0x52cf75['qbPhk'](readUint,_0x48a0ed,_0x52cf75['kUTHT'](_0x23f08e,_0x10bd77)+_0x216cd7,_0x25b928),_0x49c7bc=_0x25b928,_0x51524c=!![],_0x202a71=_0x48a0ed[_0xa130af(0x8a)](_0x579df2,_0x23f08e);const _0x29a8a6=_0x52cf75[_0xa130af(0xb8)](_0x52cf75['zHRZJ'](_0x23f08e+_0x10bd77,_0x216cd7),_0x25b928);_0x565d80=_0x48a0ed['slice'](_0x29a8a6,_0x5d7ff6);break;}if(_0x32126d===ID_CLUSTER)break;if(_0x52cf75['lrJxo'](isUnknownSize,_0x25b928,_0x216cd7))break;_0x23f08e+=_0x52cf75['YZtEy'](_0x10bd77+_0x216cd7,_0x25b928);}!_0x51524c&&(_0x565d80=_0x48a0ed['slice'](_0x579df2,_0x5d7ff6));let _0x3ede28=_0x5a6904;_0x23f08e=_0x579df2;while(_0x23f08e<_0x5d7ff6){const [_0x294d6d,_0x3f5421]=readId(_0x48a0ed,_0x23f08e),[_0x1c1c6a,_0x582eca]=readVint(_0x48a0ed,_0x52cf75[_0xa130af(0x84)](_0x23f08e,_0x3f5421));if(_0x52cf75[_0xa130af(0xa8)](_0x294d6d,ID_SIMPLE_BLOCK)&&_0x1c1c6a>=0x4){const _0x573bd1=_0x52cf75['zHRZJ'](_0x23f08e,_0x3f5421)+_0x582eca,[,_0x73daf0]=_0x52cf75[_0xa130af(0x8f)](readVint,_0x48a0ed,_0x573bd1),_0x189523=_0x48a0ed['readInt16BE'](_0x52cf75[_0xa130af(0x9a)](_0x573bd1,_0x73daf0)),_0x3d7349=_0x52cf75[_0xa130af(0x75)](_0x5a6904,_0x189523);if(_0x52cf75[_0xa130af(0xab)](_0x3d7349,_0x3ede28))_0x3ede28=_0x3d7349;}if(_0x52cf75[_0xa130af(0x87)](_0x294d6d,ID_CLUSTER))break;if(isUnknownSize(_0x1c1c6a,_0x582eca))break;_0x23f08e+=_0x52cf75['AvJBR'](_0x52cf75[_0xa130af(0xb4)](_0x3f5421,_0x582eca),_0x1c1c6a);}_0x393194[_0xa130af(0x8b)]({'timestamp':_0x5a6904,'maxTicks':_0x3ede28,'bodyBeforeTimestamp':_0x202a71,'bodyAfterTimestamp':_0x565d80,'timestampElementSize':_0x49c7bc}),_0xf61ade=_0x5d7ff6;}return _0x393194;}function parseWebm(_0x5830a2){const _0x5498da=_0x11ce,_0x30e89e={'JXbbP':function(_0x2d8ca7,_0x43b663,_0x4f4ac6){return _0x2d8ca7(_0x43b663,_0x4f4ac6);},'fRKdQ':function(_0x5dc944,_0x3544f6){return _0x5dc944!==_0x3544f6;},'rsghr':function(_0x1d9891,_0x13ce28){return _0x1d9891+_0x13ce28;},'ibfpL':function(_0x494378,_0x1f4f59,_0x3f3839){return _0x494378(_0x1f4f59,_0x3f3839);}};let _0x29fc35=0x0;const [,_0x3c1de9]=_0x30e89e[_0x5498da(0x98)](readId,_0x5830a2,_0x29fc35),[_0x252759,_0x52bc11]=readVint(_0x5830a2,_0x29fc35+_0x3c1de9);_0x29fc35+=_0x3c1de9+_0x52bc11+_0x252759;const [_0x3dc9e4,_0x173cf0]=_0x30e89e['JXbbP'](readId,_0x5830a2,_0x29fc35);if(_0x30e89e[_0x5498da(0x88)](_0x3dc9e4,ID_SEGMENT))return null;const [,_0x35ee91]=readVint(_0x5830a2,_0x29fc35+_0x173cf0),_0x588003=_0x30e89e[_0x5498da(0x7b)](_0x29fc35+_0x173cf0,_0x35ee91),_0x37913f=findTimestampScale(_0x5830a2,_0x588003),_0xd1a848=findFirstClusterOffset(_0x5830a2,_0x588003),_0x4bdf86=_0x5830a2[_0x5498da(0x8a)](0x0,_0xd1a848),_0x416732=_0x30e89e['ibfpL'](extractClusters,_0x5830a2,_0x37913f);let _0x4880d1=0x0;for(const _0x2fe6bc of _0x416732){if(_0x2fe6bc['maxTicks']>_0x4880d1)_0x4880d1=_0x2fe6bc[_0x5498da(0x95)];}return{'header':_0x4bdf86,'clusters':_0x416732,'timestampScale':_0x37913f,'maxTimestampTicks':_0x4880d1};}function buildCluster(_0x5df17b,_0x36a9d8,_0x4d4bd0){const _0x3d685c=_0x11ce,_0x5ba6fd={'wdHFh':function(_0x305efb,_0x2f6618,_0x5c1a40){return _0x305efb(_0x2f6618,_0x5c1a40);},'iojUa':function(_0x36bb22,_0x444a0f){return _0x36bb22(_0x444a0f);}},_0x4b1f53=Buffer[_0x3d685c(0x7a)]([0x1f,0x43,0xb6,0x75]),_0x2382f9=Math[_0x3d685c(0x74)](0x4,uintSize(_0x5df17b)),_0x4e0ec5=Buffer['concat']([Buffer['from']([ID_TIMESTAMP]),writeVint(_0x2382f9),_0x5ba6fd[_0x3d685c(0xb2)](writeUint,_0x5df17b,_0x2382f9)]),_0x16c8a5=Buffer[_0x3d685c(0xaa)]([_0x36a9d8,_0x4e0ec5,_0x4d4bd0]),_0x4fe895=_0x5ba6fd[_0x3d685c(0x81)](writeVint,_0x16c8a5['length']);return Buffer[_0x3d685c(0xaa)]([_0x4b1f53,_0x4fe895,_0x16c8a5]);}const ID_DURATION=0x4489;function rebuildHeaderWithoutDuration(_0xbef616){const _0x5174d5=_0x11ce,_0x1488ff={'tZpRl':function(_0x3e165c,_0x377305,_0x286d19){return _0x3e165c(_0x377305,_0x286d19);},'KEggz':function(_0x3e279b,_0x174104){return _0x3e279b+_0x174104;},'zkMBO':function(_0x309f10,_0x57a28a){return _0x309f10===_0x57a28a;},'EKMuk':function(_0x2956b2,_0x26c078){return _0x2956b2!==_0x26c078;},'LzeGI':function(_0xf3781e,_0x14ac2b){return _0xf3781e+_0x14ac2b;}},_0x3b8ab2=Buffer['from'](_0xbef616);let _0x4dcb6=0x0;const [,_0x194113]=_0x1488ff[_0x5174d5(0xaf)](readId,_0x3b8ab2,_0x4dcb6),[_0x2ea531,_0x2223f4]=_0x1488ff[_0x5174d5(0xaf)](readVint,_0x3b8ab2,_0x1488ff[_0x5174d5(0x7f)](_0x4dcb6,_0x194113)),_0x4d9f5d=_0x4dcb6+_0x194113+_0x2223f4+_0x2ea531,[,_0x7cc7ef]=readId(_0x3b8ab2,_0x4d9f5d),[,_0x50f606]=readVint(_0x3b8ab2,_0x1488ff['KEggz'](_0x4d9f5d,_0x7cc7ef)),_0x276ca2=_0x1488ff[_0x5174d5(0x7f)](_0x4d9f5d+_0x7cc7ef,_0x50f606),_0x3ddc8e=writeUnknownSizeVint(_0x50f606);_0x3ddc8e[_0x5174d5(0x85)](_0x3b8ab2,_0x4d9f5d+_0x7cc7ef);let _0x2bd015=_0x276ca2;const _0x3269ee=Math[_0x5174d5(0x76)](_0x3b8ab2['length'],_0x276ca2+0x2710);while(_0x2bd015<_0x3269ee){const [_0x227a5a,_0x5888d8]=_0x1488ff['tZpRl'](readId,_0x3b8ab2,_0x2bd015),[_0x5d82f3,_0x37f05d]=readVint(_0x3b8ab2,_0x1488ff[_0x5174d5(0x7f)](_0x2bd015,_0x5888d8));if(_0x1488ff['zkMBO'](_0x227a5a,ID_CLUSTER))break;if(_0x1488ff[_0x5174d5(0xaf)](isUnknownSize,_0x5d82f3,_0x37f05d))break;if(_0x227a5a===ID_INFO){const _0x4b2766=_0x1488ff['KEggz'](_0x2bd015+_0x5888d8,_0x37f05d),_0x16c3ff=_0x4b2766+_0x5d82f3,_0x334bbe=[];let _0x6711d9=_0x4b2766;while(_0x6711d9<_0x16c3ff){const [_0x60a422,_0x453b68]=readId(_0x3b8ab2,_0x6711d9),[_0x530b51,_0x3af732]=readVint(_0x3b8ab2,_0x6711d9+_0x453b68),_0x11a7d1=_0x453b68+_0x3af732+_0x530b51;_0x1488ff[_0x5174d5(0x77)](_0x60a422,ID_DURATION)&&_0x334bbe[_0x5174d5(0x8b)](_0x3b8ab2['slice'](_0x6711d9,_0x1488ff['LzeGI'](_0x6711d9,_0x11a7d1))),_0x6711d9+=_0x11a7d1;}const _0xe8655d=Buffer['concat'](_0x334bbe),_0x5effee=Buffer[_0x5174d5(0xaa)]([_0x3b8ab2[_0x5174d5(0x8a)](_0x2bd015,_0x2bd015+_0x5888d8),_0x1488ff[_0x5174d5(0xaf)](writeVint,_0xe8655d[_0x5174d5(0xa9)],_0x37f05d)]);return Buffer[_0x5174d5(0xaa)]([_0x3b8ab2['slice'](0x0,_0x2bd015),_0x5effee,_0xe8655d,_0x3b8ab2['slice'](_0x16c3ff)]);}_0x2bd015+=_0x1488ff[_0x5174d5(0x7f)](_0x5888d8,_0x37f05d)+_0x5d82f3;}return _0x3b8ab2;}export function stitchWebmFiles(_0x2be2bb,_0x16147b){const _0xbfa7f3=_0x11ce,_0x298e7d={'sEaGq':function(_0x5ee53d,_0x354ffe){return _0x5ee53d<=_0x354ffe;},'kLaUM':function(_0x954563,_0x3da437){return _0x954563(_0x3da437);},'hpvwC':function(_0x4ddf3a,_0x5913b5){return _0x4ddf3a+_0x5913b5;},'uUdhw':function(_0x489ccb,_0x32e21f,_0x2d8f2f){return _0x489ccb(_0x32e21f,_0x2d8f2f);}};if(_0x298e7d[_0xbfa7f3(0x83)](_0x2be2bb['length'],0x1))return![];const _0x1d336a=[];for(const _0x25533f of _0x2be2bb){const _0x1dec9a=readFileSync(_0x25533f),_0x57a57=_0x298e7d[_0xbfa7f3(0xb6)](parseWebm,_0x1dec9a);if(!_0x57a57||_0x57a57['clusters']['length']===0x0)return![];_0x1d336a['push'](_0x57a57);}const _0x9e97a3=_0x1d336a[0x0],_0x1ae9c2=rebuildHeaderWithoutDuration(_0x9e97a3['header']),_0x59b977=[_0x1ae9c2];let _0x4384b0=0x0;for(let _0x463313=0x0;_0x463313<_0x1d336a[_0xbfa7f3(0xa9)];_0x463313++){const _0x1ccb9c=_0x1d336a[_0x463313];for(const _0x207490 of _0x1ccb9c['clusters']){const _0x41a017=_0x298e7d['hpvwC'](_0x207490['timestamp'],_0x4384b0);_0x59b977[_0xbfa7f3(0x8b)](buildCluster(_0x41a017,_0x207490[_0xbfa7f3(0x9b)],_0x207490['bodyAfterTimestamp']));}const _0x183b3d=0x1e;_0x4384b0+=_0x1ccb9c['maxTimestampTicks']+_0x183b3d;}return _0x298e7d[_0xbfa7f3(0x7e)](writeFileSync,_0x16147b,Buffer['concat'](_0x59b977)),!![];}if(process[_0x36ba89(0xa4)][0x1]?.[_0x36ba89(0x97)](_0x36ba89(0x82))||process['argv'][0x1]?.['endsWith'](_0x36ba89(0xba))){const args=process['argv'][_0x36ba89(0x8a)](0x2);args[_0x36ba89(0xa9)]<0x3&&(console['error']('Usage:\x20stitchWebmFiles\x20<input1.webm>\x20<input2.webm>\x20[...]\x20<output.webm>'),process['exit'](0x1));const output=args[args[_0x36ba89(0xa9)]-0x1],inputs=args['slice'](0x0,-0x1),ok=stitchWebmFiles(inputs,output);ok?console['log']('Stitched\x20'+inputs[_0x36ba89(0xa9)]+'\x20files\x20->\x20'+output):console['log'](_0x36ba89(0x9f));}
|
|
1
|
+
const _0x425631=_0x8098;(function(_0x16abbb,_0x567257){const _0x2507c1=_0x8098,_0x38a2ff=_0x16abbb();while(!![]){try{const _0x5194cf=parseInt(_0x2507c1(0x1cd))/0x1+-parseInt(_0x2507c1(0x1bb))/0x2*(-parseInt(_0x2507c1(0x1bf))/0x3)+-parseInt(_0x2507c1(0x1eb))/0x4*(parseInt(_0x2507c1(0x1f3))/0x5)+parseInt(_0x2507c1(0x1ee))/0x6+parseInt(_0x2507c1(0x1ca))/0x7*(parseInt(_0x2507c1(0x1e1))/0x8)+-parseInt(_0x2507c1(0x1d4))/0x9*(parseInt(_0x2507c1(0x1df))/0xa)+parseInt(_0x2507c1(0x1b9))/0xb;if(_0x5194cf===_0x567257)break;else _0x38a2ff['push'](_0x38a2ff['shift']());}catch(_0x39ed2f){_0x38a2ff['push'](_0x38a2ff['shift']());}}}(_0x495d,0x902ac));import{readFileSync,writeFileSync}from'fs';const ID_SEGMENT=0x18538067,ID_INFO=0x1549a966,ID_CLUSTER=0x1f43b675,ID_TIMESTAMP=0xe7,ID_TIMESTAMP_SCALE=0x2ad7b1,ID_SIMPLE_BLOCK=0xa3;function readVint(_0x5f1922,_0x12f051){const _0x2ad3e9=_0x8098,_0x320d39={'IgZSz':function(_0x31466a,_0x37a5bd){return _0x31466a<=_0x37a5bd;},'UxNsZ':function(_0x118bed,_0x407ce3){return _0x118bed&_0x407ce3;},'LBHgt':function(_0x1a3133,_0x1a0ca2){return _0x1a3133+_0x1a0ca2;},'ZxZnC':function(_0x4670e7,_0x2b6ef1){return _0x4670e7-_0x2b6ef1;},'haRwT':function(_0xc1b2a4,_0x5cbf25){return _0xc1b2a4<_0x5cbf25;}};if(_0x12f051>=_0x5f1922['length'])return[0x0,0x0];const _0x4846bf=_0x5f1922[_0x12f051];let _0x36d913=0x1,_0x3e49d2=0x80;while(_0x320d39['IgZSz'](_0x36d913,0x8)&&!_0x320d39['UxNsZ'](_0x4846bf,_0x3e49d2)){_0x36d913++,_0x3e49d2>>=0x1;}if(_0x320d39['LBHgt'](_0x12f051,_0x36d913)>_0x5f1922[_0x2ad3e9(0x1ff)])return[0x0,0x0];let _0x50e929=_0x4846bf&_0x320d39['ZxZnC'](_0x3e49d2,0x1);for(let _0x4db04b=0x1;_0x320d39[_0x2ad3e9(0x201)](_0x4db04b,_0x36d913);_0x4db04b++){_0x50e929=_0x50e929*0x100+_0x5f1922[_0x12f051+_0x4db04b];}return[_0x50e929,_0x36d913];}function readId(_0x265184,_0x12eca8){const _0x4b9f02=_0x8098,_0x50f668={'gKORm':function(_0x56e3b8,_0x2c067a){return _0x56e3b8>=_0x2c067a;},'Igwia':function(_0x5e9796,_0x10623a){return _0x5e9796<_0x10623a;},'Hwjqj':function(_0xa020c3,_0xd5c1a){return _0xa020c3+_0xd5c1a;},'DVBDc':function(_0x24998e,_0x53be75){return _0x24998e*_0x53be75;}};if(_0x12eca8>=_0x265184[_0x4b9f02(0x1ff)])return[0x0,0x0];const _0x26e32f=_0x265184[_0x12eca8];let _0x41891f;if(_0x26e32f>=0x80)_0x41891f=0x1;else{if(_0x26e32f>=0x40)_0x41891f=0x2;else{if(_0x50f668[_0x4b9f02(0x1c0)](_0x26e32f,0x20))_0x41891f=0x3;else{if(_0x26e32f>=0x10)_0x41891f=0x4;else return[_0x26e32f,0x1];}}}if(_0x12eca8+_0x41891f>_0x265184[_0x4b9f02(0x1ff)])return[0x0,0x0];let _0x146800=0x0;for(let _0x4a74d8=0x0;_0x50f668[_0x4b9f02(0x1e6)](_0x4a74d8,_0x41891f);_0x4a74d8++){_0x146800=_0x50f668[_0x4b9f02(0x204)](_0x50f668[_0x4b9f02(0x1e9)](_0x146800,0x100),_0x265184[_0x50f668['Hwjqj'](_0x12eca8,_0x4a74d8)]);}return[_0x146800,_0x41891f];}function readUint(_0x54ded9,_0x5e42e7,_0x758ea3){const _0x583b85=_0x8098,_0x4d42ee={'KONzN':function(_0x3c980e,_0x32640b){return _0x3c980e<_0x32640b;},'MVuZa':function(_0x44a9a6,_0x5407d8){return _0x44a9a6+_0x5407d8;}};let _0x52fbba=0x0;for(let _0xe996b1=0x0;_0x4d42ee[_0x583b85(0x1bd)](_0xe996b1,_0x758ea3);_0xe996b1++){_0x52fbba=_0x52fbba*0x100+_0x54ded9[_0x4d42ee['MVuZa'](_0x5e42e7,_0xe996b1)];}return _0x52fbba;}function _0x8098(_0x3ded1d,_0x449b3b){_0x3ded1d=_0x3ded1d-0x1b8;const _0x495d88=_0x495d();let _0x8098dc=_0x495d88[_0x3ded1d];return _0x8098dc;}function isUnknownSize(_0x4db4e3,_0x4e7a7e){const _0x4cd50f={'aHpOa':function(_0x440766,_0x4b1e7e){return _0x440766-_0x4b1e7e;},'LQDVk':function(_0x531f4e,_0x14eac2){return _0x531f4e*_0x14eac2;}};return _0x4db4e3===_0x4cd50f['aHpOa'](Math['pow'](0x2,_0x4cd50f['LQDVk'](0x7,_0x4e7a7e)),0x1);}function _0x495d(){const _0x4878ab=['pow','timestamp','clusters','zRvte','Igwia','maxTicks','concat','DVBDc','JPjyi','8HrUnLb','Teecj','JZloX','305550ozTviE','endsWith','XMJiX','indexOf','OiFhv','2942930rdaloB','has','JEtOF','CbjZW','hdYxs','MuIwn','QoKjY','log','floor','push','esVtj','OiDcn','length','HlttF','haRwT','QQiGR','CVmRF','Hwjqj','from','QOYGv','SIFeC','ATODM','gxlME','vPxlb','13388287iioqsI','wAdxo','644ySxRid','efIIj','KONzN','ZYQKA','534VFnlnm','gKORm','argv','min','maxTimestampTicks','\x20files\x20->\x20','Mppzn','stitchWebmFiles.js','VfkIt','aFWhD','xITmY','7TeDVrh','sARWI','mrtjB','969341xZGMsK','alloc','jWjbj','oklvT','wqnBh','WLLFX','nhzpg','9SCwalu','NMETx','xBCKN','slice','ccLGP','error','MqdMF','AllaB','header','Usage:\x20stitchWebmFiles\x20<input1.webm>\x20<input2.webm>\x20[...]\x20<output.webm>','Stitching\x20failed\x20or\x20only\x20one\x20input\x20file.','8163460CrIgJR','TBder','2314616wblQQT'];_0x495d=function(){return _0x4878ab;};return _0x495d();}function writeVint(_0x2122cb,_0x1af15f){const _0x1320e0=_0x8098,_0x3a785b={'pXVUb':function(_0x277f92,_0x279c8f){return _0x277f92<_0x279c8f;},'vNOsj':function(_0x518e53,_0xfc1171){return _0x518e53-_0xfc1171;},'kUjau':function(_0x34058e,_0x240187){return _0x34058e>=_0x240187;},'gRwjk':function(_0x1b6a80,_0x40c79c){return _0x1b6a80&_0x40c79c;},'ZimoA':function(_0x1c3ba7,_0xea8458){return _0x1c3ba7<<_0xea8458;}};let _0x5e6847=_0x1af15f||0x1;while(_0x3a785b['pXVUb'](_0x3a785b['vNOsj'](Math[_0x1320e0(0x1e2)](0x2,0x7*_0x5e6847),0x2),_0x2122cb))_0x5e6847++;const _0x550cd6=Buffer['alloc'](_0x5e6847);for(let _0x591722=_0x5e6847-0x1;_0x3a785b['kUjau'](_0x591722,0x0);_0x591722--){_0x550cd6[_0x591722]=_0x3a785b['gRwjk'](_0x2122cb,0xff),_0x2122cb=Math['floor'](_0x2122cb/0x100);}return _0x550cd6[0x0]|=_0x3a785b['ZimoA'](0x1,0x8-_0x5e6847),_0x550cd6;}function writeUint(_0x504a17,_0x3d3c2e){const _0x257a7b=_0x8098,_0x3bdd37={'wAdxo':function(_0x2a57aa,_0x9e01b4){return _0x2a57aa>=_0x9e01b4;},'sARWI':function(_0x42f48b,_0x32e410){return _0x42f48b&_0x32e410;}},_0x72c45d=Buffer['alloc'](_0x3d3c2e);for(let _0x143015=_0x3d3c2e-0x1;_0x3bdd37[_0x257a7b(0x1ba)](_0x143015,0x0);_0x143015--){_0x72c45d[_0x143015]=_0x3bdd37[_0x257a7b(0x1cb)](_0x504a17,0xff),_0x504a17=Math[_0x257a7b(0x1fb)](_0x504a17/0x100);}return _0x72c45d;}function writeUnknownSizeVint(_0x42b56d){const _0x419c23=_0x8098,_0x340a0d={'CVmRF':function(_0x2cf451,_0x2738f1){return _0x2cf451>>_0x2738f1;},'WLLFX':function(_0x11a801,_0x346d1c){return _0x11a801-_0x346d1c;}},_0x5e501c=Buffer[_0x419c23(0x1ce)](_0x42b56d,0xff);return _0x5e501c[0x0]=_0x340a0d[_0x419c23(0x203)](0xff,_0x340a0d[_0x419c23(0x1d2)](_0x42b56d,0x1)),_0x5e501c;}function uintSize(_0x39ed2a){const _0x56286f=_0x8098,_0x40af8e={'Mppzn':function(_0x4a8baa,_0x35ecb6){return _0x4a8baa===_0x35ecb6;},'OiDcn':function(_0x49deaa,_0x51fcec){return _0x49deaa/_0x51fcec;}};if(_0x40af8e[_0x56286f(0x1c5)](_0x39ed2a,0x0))return 0x1;let _0x181ac0=0x0,_0x168313=_0x39ed2a;while(_0x168313>0x0){_0x181ac0++,_0x168313=Math['floor'](_0x40af8e[_0x56286f(0x1fe)](_0x168313,0x100));}return _0x181ac0;}function findTimestampScale(_0x18be80,_0x171201){const _0x1dae4a=_0x8098,_0x36bb78={'xITmY':function(_0x129568,_0x179ebe){return _0x129568+_0x179ebe;},'gxlME':function(_0x22a5c1,_0x11901a){return _0x22a5c1<_0x11901a;},'efIIj':function(_0x338319,_0x38d43c){return _0x338319===_0x38d43c;},'MuIwn':function(_0x104e7f,_0x40531e){return _0x104e7f+_0x40531e;},'JEtOF':function(_0x6138ea,_0x2fdcf9,_0x4ece46){return _0x6138ea(_0x2fdcf9,_0x4ece46);},'JPjyi':function(_0x44420e,_0x9309f0,_0x230cb0,_0x59e13d){return _0x44420e(_0x9309f0,_0x230cb0,_0x59e13d);},'HlttF':function(_0x5d74a8,_0x5f1594){return _0x5d74a8+_0x5f1594;},'SOawk':function(_0x1b6d36,_0x421fc2){return _0x1b6d36+_0x421fc2;},'LZwLm':function(_0x1e8a67,_0x34d5dc,_0x3792ad){return _0x1e8a67(_0x34d5dc,_0x3792ad);}};let _0x5a79a5=_0x171201;const _0x574082=Math[_0x1dae4a(0x1c2)](_0x18be80[_0x1dae4a(0x1ff)],_0x36bb78[_0x1dae4a(0x1c9)](_0x171201,0x2710));while(_0x36bb78[_0x1dae4a(0x209)](_0x5a79a5,_0x574082)){const [_0x2f8396,_0x3582e4]=readId(_0x18be80,_0x5a79a5),[_0x222f10,_0x1b05a6]=readVint(_0x18be80,_0x36bb78['xITmY'](_0x5a79a5,_0x3582e4));if(_0x36bb78[_0x1dae4a(0x1bc)](_0x2f8396,ID_INFO)){let _0x4c0315=_0x36bb78[_0x1dae4a(0x1f8)](_0x5a79a5,_0x3582e4)+_0x1b05a6;const _0x1ff019=_0x4c0315+_0x222f10;while(_0x4c0315<_0x1ff019){const [_0x2aa750,_0x25caaf]=_0x36bb78[_0x1dae4a(0x1f5)](readId,_0x18be80,_0x4c0315),[_0xff9c23,_0x4cb103]=readVint(_0x18be80,_0x4c0315+_0x25caaf);if(_0x2aa750===ID_TIMESTAMP_SCALE)return _0x36bb78[_0x1dae4a(0x1ea)](readUint,_0x18be80,_0x36bb78[_0x1dae4a(0x200)](_0x4c0315,_0x25caaf)+_0x4cb103,_0xff9c23);_0x4c0315+=_0x36bb78['SOawk'](_0x25caaf,_0x4cb103)+_0xff9c23;}break;}if(_0x36bb78[_0x1dae4a(0x1bc)](_0x2f8396,ID_CLUSTER))break;if(_0x36bb78['LZwLm'](isUnknownSize,_0x222f10,_0x1b05a6))break;_0x5a79a5+=_0x36bb78['MuIwn'](_0x3582e4,_0x1b05a6)+_0x222f10;}return 0xf4240;}function findFirstClusterOffset(_0x4b0c0b,_0x929d81){const _0x5c41a7=_0x8098,_0x5eb836={'aFWhD':function(_0x5b5df2,_0xed7ae0){return _0x5b5df2+_0xed7ae0;}};let _0x28f68d=_0x929d81;while(_0x28f68d<_0x4b0c0b[_0x5c41a7(0x1ff)]){const [_0x5d98f3,_0xfe411a]=readId(_0x4b0c0b,_0x28f68d);if(_0x5d98f3===ID_CLUSTER)return _0x28f68d;const [_0x3963dc,_0x3bc2c2]=readVint(_0x4b0c0b,_0x5eb836['aFWhD'](_0x28f68d,_0xfe411a));if(isUnknownSize(_0x3963dc,_0x3bc2c2))return _0x28f68d;_0x28f68d+=_0x5eb836[_0x5c41a7(0x1c8)](_0xfe411a+_0x3bc2c2,_0x3963dc);}return _0x4b0c0b[_0x5c41a7(0x1ff)];}function findClusterEnd(_0x57fc3e,_0x23b6d2,_0x1f47a4,_0x262ed2){const _0x4201c4=_0x8098,_0x35a176={'xBCKN':function(_0x7ca894,_0x344bad,_0x5d4ba2){return _0x7ca894(_0x344bad,_0x5d4ba2);},'sPWGZ':function(_0x47e814,_0x3c5878){return _0x47e814+_0x3c5878;},'wfPzb':function(_0x4b441d,_0x4d8027){return _0x4b441d-_0x4d8027;},'QQiGR':function(_0x1f0ec0,_0x3c236c,_0x4718d5){return _0x1f0ec0(_0x3c236c,_0x4718d5);},'SIFeC':function(_0x1eda36,_0x14498f,_0x467c4d){return _0x1eda36(_0x14498f,_0x467c4d);}};if(!_0x35a176[_0x4201c4(0x1d6)](isUnknownSize,_0x1f47a4,_0x262ed2))return _0x35a176['sPWGZ'](_0x23b6d2,_0x1f47a4);const _0x384930=new Set([ID_CLUSTER,0x1c53bb6b,0x1254c367]);let _0x348d53=_0x23b6d2;while(_0x348d53<_0x35a176['wfPzb'](_0x57fc3e['length'],0x4)){const [_0x4820da,_0x311a1b]=_0x35a176[_0x4201c4(0x202)](readId,_0x57fc3e,_0x348d53);if(_0x384930[_0x4201c4(0x1f4)](_0x4820da))return _0x348d53;const [_0x464356,_0x4b8b06]=_0x35a176[_0x4201c4(0x207)](readVint,_0x57fc3e,_0x348d53+_0x311a1b);if(isUnknownSize(_0x464356,_0x4b8b06))return _0x57fc3e[_0x4201c4(0x1ff)];_0x348d53+=_0x35a176['sPWGZ'](_0x311a1b,_0x4b8b06)+_0x464356;}return _0x57fc3e['length'];}function extractClusters(_0x1d4e3e,_0x16429c){const _0x4608cd=_0x8098,_0x4ac201={'wqnBh':function(_0x250964,_0x1da35e){return _0x250964<_0x1da35e;},'nhzpg':function(_0x19fbbc,_0x42b711){return _0x19fbbc===_0x42b711;},'MqdMF':function(_0x557a36,_0x32a7eb){return _0x557a36+_0x32a7eb;},'jWjbj':function(_0x9b420e,_0x1bfbab){return _0x9b420e+_0x1bfbab;},'hdYxs':function(_0x3c111f,_0x5f18ac){return _0x3c111f+_0x5f18ac;},'XWDdZ':function(_0x5b559c,_0x329c58){return _0x5b559c+_0x329c58;},'YKAfE':function(_0x574b0f,_0x416fe5,_0x2f32ff){return _0x574b0f(_0x416fe5,_0x2f32ff);},'oklvT':function(_0x231303,_0x5511d0,_0x2270b3,_0x140595){return _0x231303(_0x5511d0,_0x2270b3,_0x140595);},'XMJiX':function(_0x271ce7,_0x5be8bf){return _0x271ce7+_0x5be8bf;},'TBder':function(_0xc8ca36,_0x5542e7,_0x33bb3a){return _0xc8ca36(_0x5542e7,_0x33bb3a);},'AllaB':function(_0x3068ba,_0xea3304){return _0x3068ba+_0xea3304;},'NFbHb':function(_0x9b5b46,_0x4aa1af){return _0x9b5b46+_0x4aa1af;},'Teecj':function(_0x2a5f71,_0x23a181){return _0x2a5f71+_0x23a181;},'zRvte':function(_0x2131df,_0x397f4b){return _0x2131df+_0x397f4b;}},_0x470786=[],_0x12b716=Buffer[_0x4608cd(0x205)]([0x1f,0x43,0xb6,0x75]);let _0x5443f4=0x0;while(_0x4ac201[_0x4608cd(0x1d1)](_0x5443f4,_0x1d4e3e['length'])){const _0x4db3f2=_0x1d4e3e[_0x4608cd(0x1f1)](_0x12b716,_0x5443f4);if(_0x4ac201[_0x4608cd(0x1d3)](_0x4db3f2,-0x1))break;const [_0x2e2fd1,_0x194c55]=readId(_0x1d4e3e,_0x4db3f2);if(_0x2e2fd1!==ID_CLUSTER){_0x5443f4=_0x4ac201['MqdMF'](_0x4db3f2,0x1);continue;}const [_0x584a7c,_0x40bfff]=readVint(_0x1d4e3e,_0x4ac201[_0x4608cd(0x1cf)](_0x4db3f2,_0x194c55)),_0x628c6b=_0x4ac201['hdYxs'](_0x4ac201['XWDdZ'](_0x4db3f2,_0x194c55),_0x40bfff),_0x1f0927=findClusterEnd(_0x1d4e3e,_0x628c6b,_0x584a7c,_0x40bfff);let _0x2ecbc0=_0x628c6b,_0x44ea09=0x0,_0x4c2453=0x2,_0x12dbd9=![],_0x4a3af4=Buffer[_0x4608cd(0x1ce)](0x0),_0x5d600d=Buffer['alloc'](0x0);while(_0x2ecbc0<_0x1f0927){const [_0x490fb2,_0x27e52b]=readId(_0x1d4e3e,_0x2ecbc0),[_0x325c52,_0x4f6316]=_0x4ac201['YKAfE'](readVint,_0x1d4e3e,_0x2ecbc0+_0x27e52b);if(_0x490fb2===ID_TIMESTAMP){_0x44ea09=_0x4ac201[_0x4608cd(0x1d0)](readUint,_0x1d4e3e,_0x4ac201[_0x4608cd(0x1f7)](_0x2ecbc0+_0x27e52b,_0x4f6316),_0x325c52),_0x4c2453=_0x325c52,_0x12dbd9=!![],_0x4a3af4=_0x1d4e3e['slice'](_0x628c6b,_0x2ecbc0);const _0x56de13=_0x4ac201[_0x4608cd(0x1f0)](_0x4ac201[_0x4608cd(0x1da)](_0x2ecbc0,_0x27e52b)+_0x4f6316,_0x325c52);_0x5d600d=_0x1d4e3e[_0x4608cd(0x1d7)](_0x56de13,_0x1f0927);break;}if(_0x490fb2===ID_CLUSTER)break;if(_0x4ac201[_0x4608cd(0x1e0)](isUnknownSize,_0x325c52,_0x4f6316))break;_0x2ecbc0+=_0x27e52b+_0x4f6316+_0x325c52;}!_0x12dbd9&&(_0x5d600d=_0x1d4e3e['slice'](_0x628c6b,_0x1f0927));let _0x32db63=_0x44ea09;_0x2ecbc0=_0x628c6b;while(_0x2ecbc0<_0x1f0927){const [_0x3ec492,_0x4b5678]=readId(_0x1d4e3e,_0x2ecbc0),[_0x271fb0,_0x383083]=_0x4ac201[_0x4608cd(0x1e0)](readVint,_0x1d4e3e,_0x4ac201[_0x4608cd(0x1db)](_0x2ecbc0,_0x4b5678));if(_0x4ac201[_0x4608cd(0x1d3)](_0x3ec492,ID_SIMPLE_BLOCK)&&_0x271fb0>=0x4){const _0x501bd8=_0x4ac201['NFbHb'](_0x2ecbc0,_0x4b5678)+_0x383083,[,_0x10352e]=readVint(_0x1d4e3e,_0x501bd8),_0xa9db21=_0x1d4e3e['readInt16BE'](_0x4ac201[_0x4608cd(0x1ec)](_0x501bd8,_0x10352e)),_0x1bf0cf=_0x44ea09+_0xa9db21;if(_0x1bf0cf>_0x32db63)_0x32db63=_0x1bf0cf;}if(_0x3ec492===ID_CLUSTER)break;if(isUnknownSize(_0x271fb0,_0x383083))break;_0x2ecbc0+=_0x4ac201[_0x4608cd(0x1e5)](_0x4b5678,_0x383083)+_0x271fb0;}_0x470786['push']({'timestamp':_0x44ea09,'maxTicks':_0x32db63,'bodyBeforeTimestamp':_0x4a3af4,'bodyAfterTimestamp':_0x5d600d,'timestampElementSize':_0x4c2453}),_0x5443f4=_0x1f0927;}return _0x470786;}function parseWebm(_0x3a8dd9){const _0x365c3b=_0x8098,_0x2d9760={'QoKjY':function(_0x21bd8f,_0x3cc3bb,_0x35096f){return _0x21bd8f(_0x3cc3bb,_0x35096f);},'VfkIt':function(_0x4849b5,_0x217a4f){return _0x4849b5+_0x217a4f;},'uqkxh':function(_0x22367f,_0x82edcc){return _0x22367f!==_0x82edcc;},'QOYGv':function(_0xeb18eb,_0x538ca9){return _0xeb18eb+_0x538ca9;},'oHhTx':function(_0xad1d79,_0x25f6a8){return _0xad1d79+_0x25f6a8;},'CBuds':function(_0x5b091b,_0x3bfcd4,_0x570226){return _0x5b091b(_0x3bfcd4,_0x570226);}};let _0x5f18e8=0x0;const [,_0x40ec74]=_0x2d9760[_0x365c3b(0x1f9)](readId,_0x3a8dd9,_0x5f18e8),[_0x46bf46,_0x32807e]=readVint(_0x3a8dd9,_0x5f18e8+_0x40ec74);_0x5f18e8+=_0x2d9760['VfkIt'](_0x40ec74+_0x32807e,_0x46bf46);const [_0x234c3a,_0x2547d0]=readId(_0x3a8dd9,_0x5f18e8);if(_0x2d9760['uqkxh'](_0x234c3a,ID_SEGMENT))return null;const [,_0x28d7b6]=readVint(_0x3a8dd9,_0x2d9760[_0x365c3b(0x1c7)](_0x5f18e8,_0x2547d0)),_0x45df38=_0x2d9760[_0x365c3b(0x206)](_0x2d9760['oHhTx'](_0x5f18e8,_0x2547d0),_0x28d7b6),_0x514710=findTimestampScale(_0x3a8dd9,_0x45df38),_0x541872=findFirstClusterOffset(_0x3a8dd9,_0x45df38),_0x345f9b=_0x3a8dd9['slice'](0x0,_0x541872),_0x3db70b=_0x2d9760['CBuds'](extractClusters,_0x3a8dd9,_0x514710);let _0x1e11d6=0x0;for(const _0x61a48d of _0x3db70b){if(_0x61a48d[_0x365c3b(0x1e7)]>_0x1e11d6)_0x1e11d6=_0x61a48d['maxTicks'];}return{'header':_0x345f9b,'clusters':_0x3db70b,'timestampScale':_0x514710,'maxTimestampTicks':_0x1e11d6};}function buildCluster(_0x175057,_0x51cd97,_0x117e87){const _0x3275d1=_0x8098,_0x5b6a54={'CbjZW':function(_0x574824,_0x5a98d5){return _0x574824(_0x5a98d5);},'ZYQKA':function(_0x56fb66,_0x2f7822,_0x4c2b05){return _0x56fb66(_0x2f7822,_0x4c2b05);},'vPxlb':function(_0x317183,_0x151f72){return _0x317183(_0x151f72);}},_0x56ea27=Buffer['from']([0x1f,0x43,0xb6,0x75]),_0x148f6b=Math['max'](0x4,uintSize(_0x175057)),_0x1235d8=Buffer['concat']([Buffer[_0x3275d1(0x205)]([ID_TIMESTAMP]),_0x5b6a54[_0x3275d1(0x1f6)](writeVint,_0x148f6b),_0x5b6a54[_0x3275d1(0x1be)](writeUint,_0x175057,_0x148f6b)]),_0x51c860=Buffer[_0x3275d1(0x1e8)]([_0x51cd97,_0x1235d8,_0x117e87]),_0x38c533=_0x5b6a54[_0x3275d1(0x1b8)](writeVint,_0x51c860[_0x3275d1(0x1ff)]);return Buffer['concat']([_0x56ea27,_0x38c533,_0x51c860]);}const ID_DURATION=0x4489;function rebuildHeaderWithoutDuration(_0x212def){const _0x1477e6=_0x8098,_0x280403={'rreQF':function(_0x4da6dd,_0x43a5b4,_0x46f91b){return _0x4da6dd(_0x43a5b4,_0x46f91b);},'ATODM':function(_0x39fcd8,_0x5e1757){return _0x39fcd8+_0x5e1757;},'mrtjB':function(_0x342366,_0x291460,_0x1c074c){return _0x342366(_0x291460,_0x1c074c);},'NMETx':function(_0x3a755d,_0x42db40,_0x25ec14){return _0x3a755d(_0x42db40,_0x25ec14);},'lCqcx':function(_0x54f84d,_0x192bc8){return _0x54f84d+_0x192bc8;},'esVtj':function(_0x4b2bdc,_0x1a513){return _0x4b2bdc<_0x1a513;},'xbdwq':function(_0x50fb5d,_0x405ae9){return _0x50fb5d+_0x405ae9;},'uneNi':function(_0x2f709a,_0x4283c7,_0x2bfc06){return _0x2f709a(_0x4283c7,_0x2bfc06);}},_0x213444=Buffer['from'](_0x212def);let _0x519e2c=0x0;const [,_0x446bc0]=readId(_0x213444,_0x519e2c),[_0x3fb4dc,_0x3c3c96]=_0x280403['rreQF'](readVint,_0x213444,_0x519e2c+_0x446bc0),_0x2ca448=_0x280403[_0x1477e6(0x208)](_0x519e2c+_0x446bc0+_0x3c3c96,_0x3fb4dc),[,_0x4c2c85]=_0x280403[_0x1477e6(0x1cc)](readId,_0x213444,_0x2ca448),[,_0x3e453b]=_0x280403['NMETx'](readVint,_0x213444,_0x2ca448+_0x4c2c85),_0x27a317=_0x280403['ATODM'](_0x2ca448+_0x4c2c85,_0x3e453b),_0x18d31e=writeUnknownSizeVint(_0x3e453b);_0x18d31e['copy'](_0x213444,_0x2ca448+_0x4c2c85);let _0x3342b4=_0x27a317;const _0x10d11c=Math['min'](_0x213444['length'],_0x280403['lCqcx'](_0x27a317,0x2710));while(_0x280403[_0x1477e6(0x1fd)](_0x3342b4,_0x10d11c)){const [_0x44c95f,_0x440d13]=readId(_0x213444,_0x3342b4),[_0x286361,_0x4b5f70]=readVint(_0x213444,_0x3342b4+_0x440d13);if(_0x44c95f===ID_CLUSTER)break;if(isUnknownSize(_0x286361,_0x4b5f70))break;if(_0x44c95f===ID_INFO){const _0x2427fc=_0x280403['ATODM'](_0x3342b4+_0x440d13,_0x4b5f70),_0x14ca5d=_0x280403['ATODM'](_0x2427fc,_0x286361),_0x184b16=[];let _0x21f519=_0x2427fc;while(_0x280403['esVtj'](_0x21f519,_0x14ca5d)){const [_0x2e2b8c,_0x238e51]=_0x280403[_0x1477e6(0x1d5)](readId,_0x213444,_0x21f519),[_0x1e4660,_0x390ae1]=readVint(_0x213444,_0x280403['xbdwq'](_0x21f519,_0x238e51)),_0x495a4f=_0x280403[_0x1477e6(0x208)](_0x238e51+_0x390ae1,_0x1e4660);_0x2e2b8c!==ID_DURATION&&_0x184b16[_0x1477e6(0x1fc)](_0x213444[_0x1477e6(0x1d7)](_0x21f519,_0x280403[_0x1477e6(0x208)](_0x21f519,_0x495a4f))),_0x21f519+=_0x495a4f;}const _0x37fcf3=Buffer[_0x1477e6(0x1e8)](_0x184b16),_0x2bc9ed=Buffer['concat']([_0x213444['slice'](_0x3342b4,_0x3342b4+_0x440d13),_0x280403['uneNi'](writeVint,_0x37fcf3['length'],_0x4b5f70)]);return Buffer[_0x1477e6(0x1e8)]([_0x213444['slice'](0x0,_0x3342b4),_0x2bc9ed,_0x37fcf3,_0x213444['slice'](_0x14ca5d)]);}_0x3342b4+=_0x440d13+_0x4b5f70+_0x286361;}return _0x213444;}export function stitchWebmFiles(_0x103a41,_0x3852be){const _0x29b68f=_0x8098,_0x1cceaa={'ccLGP':function(_0x24b05a,_0x43ffd4){return _0x24b05a(_0x43ffd4);},'JZloX':function(_0x10f01f,_0x3fb22d){return _0x10f01f===_0x3fb22d;},'PWrVy':function(_0x570b37,_0x2c9c5d){return _0x570b37<_0x2c9c5d;},'YRKQs':function(_0xe71829,_0x318f5a){return _0xe71829+_0x318f5a;},'OiFhv':function(_0x4cddbd,_0x39519f,_0xdf31e2){return _0x4cddbd(_0x39519f,_0xdf31e2);}};if(_0x103a41[_0x29b68f(0x1ff)]<=0x1)return![];const _0x5b7a4e=[];for(const _0x1263ab of _0x103a41){const _0x553544=_0x1cceaa[_0x29b68f(0x1d8)](readFileSync,_0x1263ab),_0x1b40ac=_0x1cceaa['ccLGP'](parseWebm,_0x553544);if(!_0x1b40ac||_0x1cceaa[_0x29b68f(0x1ed)](_0x1b40ac[_0x29b68f(0x1e4)][_0x29b68f(0x1ff)],0x0))return![];_0x5b7a4e[_0x29b68f(0x1fc)](_0x1b40ac);}const _0x1177a5=_0x5b7a4e[0x0],_0x571291=_0x1cceaa['ccLGP'](rebuildHeaderWithoutDuration,_0x1177a5[_0x29b68f(0x1dc)]),_0x41196b=[_0x571291];let _0x481023=0x0;for(let _0x411b13=0x0;_0x1cceaa['PWrVy'](_0x411b13,_0x5b7a4e['length']);_0x411b13++){const _0x7296e8=_0x5b7a4e[_0x411b13];for(const _0x5e51c6 of _0x7296e8[_0x29b68f(0x1e4)]){const _0x5b51b9=_0x1cceaa['YRKQs'](_0x5e51c6[_0x29b68f(0x1e3)],_0x481023);_0x41196b[_0x29b68f(0x1fc)](buildCluster(_0x5b51b9,_0x5e51c6['bodyBeforeTimestamp'],_0x5e51c6['bodyAfterTimestamp']));}const _0x553f5e=0x1e;_0x481023+=_0x7296e8[_0x29b68f(0x1c3)]+_0x553f5e;}return _0x1cceaa[_0x29b68f(0x1f2)](writeFileSync,_0x3852be,Buffer[_0x29b68f(0x1e8)](_0x41196b)),!![];}if(process[_0x425631(0x1c1)][0x1]?.['endsWith']('stitchWebmFiles.ts')||process['argv'][0x1]?.[_0x425631(0x1ef)](_0x425631(0x1c6))){const args=process[_0x425631(0x1c1)]['slice'](0x2);args[_0x425631(0x1ff)]<0x3&&(console[_0x425631(0x1d9)](_0x425631(0x1dd)),process['exit'](0x1));const output=args[args[_0x425631(0x1ff)]-0x1],inputs=args[_0x425631(0x1d7)](0x0,-0x1),ok=stitchWebmFiles(inputs,output);ok?console[_0x425631(0x1fa)]('Stitched\x20'+inputs['length']+_0x425631(0x1c4)+output):console[_0x425631(0x1fa)](_0x425631(0x1de));}
|